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, and make them available in the curent shell (yarn, node, deno, and adl tools):
source deno/local-setup.sh
Install node packages and generate code from adl:
yarn
Run the storybook and open in the default browser:
yarn storybook
If you change the adl (adl/**.adl
) and want to regenerate the typescript code, just rerun yarn
.
-
copy
src/model
and eithersrc/mui
orsrc/ui
to 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.json
to include either material-ui (if you usedsrc/mui
) or styled components (if you usedsrc/ui