A toolkit for generating user interface components from ADL type definitions.
model/- the underlying state and events for adl derived UI elementsui/- a view implementation in terms of raw styled componentsmui/- a view implementation in terms of the material ui framework*-stories/- storybook stories for each of the above
in any given application either model+ui or model+mui should be used
Install tools locally, using proto or manually (see
.prototools for details)
Install node packages and generate code from adl:
pnpm install
Run the storybook and open in the default browser:
pnpm storybook
If you change the adl (adl/**.adl) and want to regenerate the typescript code, just rerun pnpm install.
-
copy
src/modeland eithersrc/muiorsrc/uito a folder in your target project. -
Ensure that your target project has adl generated typescript code to satisfy the following imports:
@/adl-gen/runtime
@/adl-gen/sys/types
@/adl-gen/sys/adlast
@/adl-gen/common/ui
- Update the target project's
package.jsonto include either material-ui (if you usedsrc/mui) or styled components (if you usedsrc/ui