handoff-app 0.15.2 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +1 -1
- package/.prettierignore +0 -2
- package/.prettierrc.json +8 -0
- package/.vscode/settings.json +11 -0
- package/Changelog.md +359 -9
- package/components.json +21 -0
- package/config/docs/{assets → foundations}/icon.md +3 -3
- package/config/docs/{assets → foundations}/icons.md +3 -3
- package/config/docs/foundations.md +65 -14
- package/config/docs/guidelines.md +11 -0
- package/config/docs/{components → system}/alert.md +4 -3
- package/config/docs/{components → system}/button.md +2 -2
- package/config/docs/{components → system}/checkbox.md +3 -3
- package/config/docs/{components → system}/input.md +3 -3
- package/config/docs/{components → system}/modal.md +3 -3
- package/config/docs/{components → system}/pagination.md +3 -3
- package/config/docs/{components → system}/radio.md +4 -3
- package/config/docs/{components → system}/select.md +3 -4
- package/config/docs/{components → system}/switch.md +3 -3
- package/config/docs/system/tokens/foundations/colors.md +19 -0
- package/config/docs/system/tokens/foundations/effects.md +19 -0
- package/config/docs/system/tokens/foundations/typography.md +19 -0
- package/config/docs/{components → system}/tooltip.md +4 -3
- package/config/docs/{components.md → system.md} +13 -4
- package/config/templates/integration/components/template/1.0.0/template.hbs +6 -0
- package/config/templates/integration/components/template/1.0.0/template.json +49 -0
- package/config/templates/integration/components/template/1.0.0/template.scss +2 -0
- package/config/templates/page.mdx +21 -25
- package/dist/api.d.ts +0 -4
- package/dist/api.js +1 -5
- package/dist/app.js +591 -473
- package/dist/changelog.d.ts +7 -7
- package/dist/changelog.js +32 -34
- package/dist/cli/eject.d.ts +0 -5
- package/dist/cli/eject.js +62 -140
- package/dist/cli/make.d.ts +1 -1
- package/dist/cli/make.js +161 -219
- package/dist/cli.js +18 -38
- package/dist/commands/build/app.js +8 -44
- package/dist/commands/build/components.d.ts +7 -0
- package/dist/commands/build/components.js +31 -0
- package/dist/commands/dev/index.js +8 -44
- package/dist/commands/eject/config.js +8 -44
- package/dist/commands/eject/exportables.js +8 -44
- package/dist/commands/eject/pages.js +8 -44
- package/dist/commands/eject/schemas.js +8 -44
- package/dist/commands/eject/theme.js +8 -44
- package/dist/commands/fetch/index.js +8 -44
- package/dist/commands/index.d.ts +0 -1
- package/dist/commands/index.js +21 -27
- package/dist/commands/make/{snippet.d.ts → component.d.ts} +2 -2
- package/dist/commands/make/component.js +37 -0
- package/dist/commands/make/exportable.js +14 -50
- package/dist/commands/make/integrationStyles.d.ts +6 -0
- package/dist/commands/make/integrationStyles.js +28 -0
- package/dist/commands/make/page.js +18 -54
- package/dist/commands/make/schema.js +14 -50
- package/dist/commands/make/template.js +18 -54
- package/dist/commands/start/index.js +8 -44
- package/dist/commands/utils.d.ts +1 -1
- package/dist/commands/utils.js +1 -1
- package/dist/commands/validate/components.d.ts +6 -0
- package/dist/commands/validate/components.js +28 -0
- package/dist/config.d.ts +6 -3
- package/dist/config.js +20 -63
- package/dist/documentation-object.d.ts +2 -2
- package/dist/documentation-object.js +34 -99
- package/dist/index.d.ts +84 -37
- package/dist/index.js +484 -390
- package/dist/pipeline.d.ts +10 -7
- package/dist/pipeline.js +285 -575
- package/dist/transformers/config.d.ts +2 -0
- package/dist/transformers/config.js +19 -0
- package/dist/transformers/plugins.d.ts +6 -0
- package/dist/transformers/plugins.js +350 -0
- package/dist/transformers/preview/component/api.d.ts +18 -0
- package/dist/transformers/preview/component/api.js +100 -0
- package/dist/transformers/preview/component/builder.d.ts +20 -0
- package/dist/transformers/preview/component/builder.js +157 -0
- package/dist/transformers/preview/component/css.d.ts +48 -0
- package/dist/transformers/preview/component/css.js +190 -0
- package/dist/transformers/preview/component/html.d.ts +19 -0
- package/dist/transformers/preview/component/html.js +80 -0
- package/dist/transformers/preview/component/javascript.d.ts +24 -0
- package/dist/transformers/preview/component/javascript.js +123 -0
- package/dist/transformers/preview/component/json.d.ts +3 -0
- package/dist/transformers/preview/component/json.js +57 -0
- package/dist/transformers/preview/component/versions.d.ts +1 -0
- package/dist/transformers/preview/component/versions.js +9 -0
- package/dist/transformers/preview/component.d.ts +78 -0
- package/dist/transformers/preview/component.js +117 -0
- package/dist/transformers/preview/types.d.ts +97 -2
- package/dist/transformers/preview/types.js +8 -0
- package/dist/types/config.d.ts +261 -0
- package/dist/{exporters/components/types.js → types/config.js} +1 -0
- package/dist/types.d.ts +64 -149
- package/dist/types.js +0 -1
- package/dist/utils/filter.d.ts +31 -0
- package/dist/utils/filter.js +106 -0
- package/dist/utils/fs.js +8 -8
- package/dist/utils/index.d.ts +1 -21
- package/dist/utils/index.js +3 -40
- package/dist/utils/prompt.js +38 -70
- package/docs/api.md +1 -0
- package/docs/api_spec.yml +0 -0
- package/docs/props.md +34 -0
- package/integration/components/accordion/1.0.0/accordion.hbs +30 -0
- package/integration/components/accordion/1.0.0/accordion.js +15 -0
- package/integration/components/accordion/1.0.0/accordion.json +149 -0
- package/integration/components/accordion/1.0.0/accordion.scss +10 -0
- package/integration/components/button/1.0.0/button.hbs +7 -0
- package/integration/components/button/1.0.0/button.json +44 -0
- package/integration/components/button/1.0.0/button.scss +2 -0
- package/integration/components/hero/1.0.0/hero.hbs +75 -0
- package/integration/components/hero/1.0.0/hero.json +262 -0
- package/integration/components/hero/1.0.0/hero.scss +15 -0
- package/integration/integration.config.json +84 -0
- package/integration/sass/main.scss +105 -0
- package/integration/sass/readme.md +3 -0
- package/integration/templates/alert/default.html +7 -0
- package/integration/templates/alert/horizontal.html +12 -0
- package/integration/templates/alert/vertical.html +12 -0
- package/integration/templates/alert/view.config.json +10 -0
- package/integration/templates/button/default.html +5 -0
- package/integration/templates/button/large.html +5 -0
- package/integration/templates/button/medium.html +5 -0
- package/integration/templates/button/primary/disabled.html +5 -0
- package/integration/templates/button/small.html +5 -0
- package/integration/templates/button/view.config.json +24 -0
- package/integration/templates/checkbox/default/off.html +10 -0
- package/integration/templates/checkbox/default/on.html +10 -0
- package/integration/templates/checkbox/default.html +22 -0
- package/integration/templates/checkbox/disabled.html +16 -0
- package/integration/templates/checkbox/view.config.json +26 -0
- package/integration/templates/input/complete.html +14 -0
- package/integration/templates/input/default.html +14 -0
- package/integration/templates/input/disabled.html +14 -0
- package/integration/templates/input/error.html +14 -0
- package/integration/templates/input/view.config.json +33 -0
- package/integration/templates/main.js +15 -0
- package/integration/templates/main.scss +31 -0
- package/integration/templates/modal/default.html +20 -0
- package/integration/templates/modal/view.config.json +16 -0
- package/integration/templates/pagination/default.html +31 -0
- package/integration/templates/pagination/lg.html +31 -0
- package/integration/templates/pagination/sm.html +31 -0
- package/integration/templates/pagination/view.config.json +6 -0
- package/integration/templates/radio/default/off.html +10 -0
- package/integration/templates/radio/default/on.html +10 -0
- package/integration/templates/radio/default.html +10 -0
- package/integration/templates/radio/disabled.html +16 -0
- package/integration/templates/radio/view.config.json +26 -0
- package/integration/templates/select/default.html +10 -0
- package/integration/templates/select/disabled.html +10 -0
- package/integration/templates/select/error.html +10 -0
- package/integration/templates/select/view.config.json +33 -0
- package/integration/templates/switch/default/off.html +10 -0
- package/integration/templates/switch/default/on.html +10 -0
- package/integration/templates/switch/default.html +8 -0
- package/integration/templates/switch/disabled.html +16 -0
- package/integration/templates/switch/view.config.json +26 -0
- package/integration/templates/tooltip/default.html +16 -0
- package/integration/templates/tooltip/view.config.json +6 -0
- package/package.json +61 -28
- package/postcss.config.js +6 -0
- package/src/api.ts +0 -4
- package/src/app/components/Component/BestPracticesCard.tsx +44 -0
- package/src/app/components/Component/ComponentLists.tsx +123 -0
- package/src/app/components/Component/Preview.tsx +555 -0
- package/src/app/components/ComponentDesignTokens.tsx +29 -17
- package/src/app/components/ComponentGuidelines.tsx +7 -5
- package/src/app/components/ComponentNotFound.tsx +8 -13
- package/src/app/components/ComponentSearch.tsx +95 -0
- package/src/app/components/CopyCode.tsx +31 -26
- package/src/app/components/DownloadTokens.tsx +23 -18
- package/src/app/components/Footer.tsx +14 -16
- package/src/app/components/Foundations/ColorGrid.tsx +324 -0
- package/src/app/components/Foundations/DisplayLogo.tsx +16 -0
- package/src/app/components/Foundations/RulesSheet.tsx +196 -0
- package/src/app/components/Foundations/TypographyExample.tsx +220 -0
- package/src/app/components/Layout/Header.tsx +45 -0
- package/src/app/components/Layout/Main.tsx +72 -0
- package/src/app/components/Layout/Markdown.tsx +37 -0
- package/src/app/components/Markdown/CodeHighlight.tsx +167 -46
- package/src/app/components/Markdown/MarkdownComponents.tsx +23 -21
- package/src/app/components/ModeSwitcher.tsx +29 -0
- package/src/app/components/Navigation/AnchorNav.tsx +101 -0
- package/src/app/components/{AnchorNavLink.tsx → Navigation/AnchorNavLink.tsx} +4 -2
- package/src/app/components/Navigation/AnchorNavNew.tsx +27 -0
- package/src/app/components/Navigation/MainNav.tsx +62 -0
- package/src/app/components/Navigation/MobileNav.tsx +95 -0
- package/src/app/components/Navigation/SideNav.tsx +133 -0
- package/src/app/components/SideNav/Custom.tsx +1 -4
- package/src/app/components/SideNavNew.tsx +285 -0
- package/src/app/components/Typography/Headers.tsx +50 -0
- package/src/app/components/Validation/ValidationResults.tsx +60 -0
- package/src/app/components/cards/CardsWithIcons.tsx +38 -0
- package/src/app/components/context/ConfigContext.tsx +41 -0
- package/src/app/components/context/HotReloadProvider.tsx +36 -0
- package/src/app/components/context/PreviewContext.tsx +143 -0
- package/src/app/components/{Header.tsx → old/Header.tsx} +12 -10
- package/src/app/components/ui/accordion.tsx +49 -0
- package/src/app/components/ui/alert.tsx +39 -0
- package/src/app/components/ui/badge.tsx +32 -0
- package/src/app/components/ui/breadcrumb.tsx +68 -0
- package/src/app/components/ui/button.tsx +43 -0
- package/src/app/components/ui/card.tsx +76 -0
- package/src/app/components/ui/collapsible.tsx +9 -0
- package/src/app/components/ui/drawer.tsx +103 -0
- package/src/app/components/ui/dropdown-menu.tsx +176 -0
- package/src/app/components/ui/input.tsx +22 -0
- package/src/app/components/ui/label.tsx +24 -0
- package/src/app/components/ui/mobile-nav.tsx +92 -0
- package/src/app/components/ui/navigation-menu.tsx +116 -0
- package/src/app/components/ui/popover.tsx +31 -0
- package/src/app/components/ui/radio-group.tsx +36 -0
- package/src/app/components/ui/select.tsx +132 -0
- package/src/app/components/ui/separator.tsx +29 -0
- package/src/app/components/ui/sheet.tsx +140 -0
- package/src/app/components/ui/sidebar.tsx +602 -0
- package/src/app/components/ui/skeleton.tsx +15 -0
- package/src/app/components/ui/table.tsx +60 -0
- package/src/app/components/ui/tabs.tsx +53 -0
- package/src/app/components/ui/toggle-group.tsx +49 -0
- package/src/app/components/ui/toggle.tsx +39 -0
- package/src/app/components/ui/tooltip.tsx +30 -0
- package/src/app/components/util/colors.ts +88 -0
- package/src/app/components/util/index.ts +242 -98
- package/src/app/components/util/theme-provider.tsx +11 -0
- package/src/app/components/util/token.ts +55 -12
- package/src/app/components.json +21 -0
- package/src/app/css/index.css +147 -0
- package/src/app/hooks/use-mobile.tsx +19 -0
- package/src/app/lib/utils.ts +13 -0
- package/src/app/mdx-components.tsx +9 -1
- package/src/app/next-env.d.ts +1 -1
- package/src/app/next.config.mjs +7 -6
- package/src/app/pages/[level1]/[level2]/index.tsx +17 -9
- package/src/app/pages/[level1]/index.tsx +17 -9
- package/src/app/pages/_app.tsx +1 -3
- package/src/app/pages/_document.tsx +4 -3
- package/src/app/pages/assets/fonts.tsx +20 -20
- package/src/app/pages/assets/index.tsx +13 -15
- package/src/app/pages/assets/logos.tsx +13 -15
- package/src/app/pages/foundations/changelog.tsx +219 -0
- package/src/app/pages/foundations/colors.tsx +40 -85
- package/src/app/pages/foundations/effects.tsx +77 -89
- package/src/app/pages/foundations/icons/[name]/index.tsx +147 -0
- package/src/app/pages/foundations/icons/index.tsx +138 -0
- package/src/app/pages/foundations/index.tsx +63 -64
- package/src/app/pages/foundations/logo.tsx +46 -89
- package/src/app/pages/foundations/typography.tsx +81 -101
- package/src/app/pages/index.tsx +166 -249
- package/src/app/pages/system/component/[component]/index.tsx +279 -0
- package/src/app/pages/system/component/index.tsx +92 -0
- package/src/app/pages/system/index.tsx +130 -0
- package/src/app/pages/system/tokens/components/[component]/index.tsx +364 -0
- package/src/app/pages/system/tokens/foundations/colors.tsx +124 -0
- package/src/app/pages/system/tokens/foundations/effects.tsx +111 -0
- package/src/app/pages/system/tokens/foundations/typography.tsx +128 -0
- package/src/app/pages/system/tokens/index.tsx +90 -0
- package/src/app/postcss.config.mjs +15 -0
- package/src/app/public/assets/css/preview.css +27 -0
- package/src/app/public/assets/images/blocks.svg +150 -0
- package/src/app/public/assets/images/check-circle.svg +10 -0
- package/src/app/public/assets/images/colors.svg +186 -0
- package/src/app/public/assets/images/components.svg +183 -0
- package/src/app/public/assets/images/illustration-sample-2.svg +102 -0
- package/src/app/public/assets/images/illustration-sample-3.svg +124 -0
- package/src/app/public/assets/images/illustration-sample-bw-1.svg +84 -0
- package/src/app/public/assets/images/illustration-sample-bw-2.svg +88 -0
- package/src/app/public/assets/images/illustration-sample-bw-3.svg +125 -0
- package/src/app/public/assets/images/illustration-sample.svg +110 -0
- package/src/app/public/assets/images/typography.svg +279 -0
- package/src/app/public/assets/images/usage-correct.png +0 -0
- package/src/app/public/assets/images/usage-wrong.png +0 -0
- package/src/app/public/assets/images/x-circle.svg +10 -0
- package/src/app/public/assets/js/preview.js +90 -0
- package/src/app/public/assets/svg/illustration-sample.svg +82 -0
- package/src/app/public/handoff-logo.svg +38 -0
- package/src/app/public/logo.svg +12 -7
- package/src/app/tailwind.config.js +80 -0
- package/src/app/tsconfig.json +4 -2
- package/src/app.ts +349 -107
- package/src/changelog.ts +11 -8
- package/src/cli/eject.ts +5 -36
- package/src/cli/make.ts +24 -19
- package/src/cli.ts +2 -2
- package/src/commands/build/app.ts +3 -3
- package/src/commands/build/components.ts +25 -0
- package/src/commands/dev/index.ts +3 -3
- package/src/commands/eject/config.ts +3 -3
- package/src/commands/eject/exportables.ts +3 -3
- package/src/commands/eject/pages.ts +3 -3
- package/src/commands/eject/schemas.ts +3 -3
- package/src/commands/eject/theme.ts +3 -3
- package/src/commands/fetch/index.ts +3 -3
- package/src/commands/index.ts +8 -14
- package/src/commands/make/component.ts +35 -0
- package/src/commands/make/exportable.ts +3 -3
- package/src/commands/make/integrationStyles.ts +20 -0
- package/src/commands/make/page.ts +3 -3
- package/src/commands/make/schema.ts +3 -3
- package/src/commands/make/template.ts +3 -3
- package/src/commands/start/index.ts +3 -3
- package/src/commands/validate/components.ts +20 -0
- package/src/config.ts +14 -21
- package/src/documentation-object.ts +26 -61
- package/src/index.d.ts +1 -18
- package/src/index.ts +477 -166
- package/src/pipeline.ts +221 -308
- package/src/transformers/config.ts +18 -0
- package/src/transformers/plugins.ts +386 -0
- package/src/transformers/preview/component/api.ts +106 -0
- package/src/transformers/preview/component/builder.ts +154 -0
- package/src/transformers/preview/component/css.ts +209 -0
- package/src/transformers/preview/component/html.ts +78 -0
- package/src/transformers/preview/component/javascript.ts +133 -0
- package/src/transformers/preview/component/json.ts +46 -0
- package/src/transformers/preview/component/versions.ts +3 -0
- package/src/transformers/preview/component.ts +129 -0
- package/src/transformers/preview/types.ts +91 -6
- package/src/types/config.ts +265 -0
- package/src/types.ts +66 -167
- package/src/utils/filter.ts +126 -0
- package/src/utils/index.ts +1 -36
- package/tailwind.config.ts +96 -0
- package/tsconfig.json +1 -1
- package/dist/commands/build/integration.d.ts +0 -6
- package/dist/commands/build/integration.js +0 -64
- package/dist/commands/build/recipe.d.ts +0 -6
- package/dist/commands/build/recipe.js +0 -64
- package/dist/commands/build/snippets.d.ts +0 -7
- package/dist/commands/build/snippets.js +0 -67
- package/dist/commands/eject/integration.d.ts +0 -6
- package/dist/commands/eject/integration.js +0 -64
- package/dist/commands/make/integration.d.ts +0 -6
- package/dist/commands/make/integration.js +0 -64
- package/dist/commands/make/snippet.js +0 -72
- package/dist/commands/rename/snippet.d.ts +0 -8
- package/dist/commands/rename/snippet.js +0 -72
- package/dist/exporters/assets.d.ts +0 -6
- package/dist/exporters/assets.js +0 -195
- package/dist/exporters/components/extractor.d.ts +0 -17
- package/dist/exporters/components/extractor.js +0 -402
- package/dist/exporters/components/index.d.ts +0 -10
- package/dist/exporters/components/index.js +0 -356
- package/dist/exporters/components/types.d.ts +0 -73
- package/dist/exporters/design.d.ts +0 -24
- package/dist/exporters/design.js +0 -223
- package/dist/exporters/utils.d.ts +0 -53
- package/dist/exporters/utils.js +0 -110
- package/dist/figma/api.d.ts +0 -18
- package/dist/figma/api.js +0 -83
- package/dist/figma/types.d.ts +0 -1163
- package/dist/figma/types.js +0 -2
- package/dist/plugin/index.d.ts +0 -1
- package/dist/plugin/index.js +0 -105
- package/dist/transformers/constants.d.ts +0 -1
- package/dist/transformers/constants.js +0 -4
- package/dist/transformers/css/component.d.ts +0 -17
- package/dist/transformers/css/component.js +0 -87
- package/dist/transformers/css/design/colors.d.ts +0 -2
- package/dist/transformers/css/design/colors.js +0 -10
- package/dist/transformers/css/design/effects.d.ts +0 -7
- package/dist/transformers/css/design/effects.js +0 -18
- package/dist/transformers/css/design/typography.d.ts +0 -2
- package/dist/transformers/css/design/typography.js +0 -25
- package/dist/transformers/css/index.d.ts +0 -5
- package/dist/transformers/css/index.js +0 -26
- package/dist/transformers/css/utils.js +0 -1
- package/dist/transformers/font/index.d.ts +0 -16
- package/dist/transformers/font/index.js +0 -154
- package/dist/transformers/font/types.d.ts +0 -3
- package/dist/transformers/font/types.js +0 -2
- package/dist/transformers/integration/index.d.ts +0 -50
- package/dist/transformers/integration/index.js +0 -445
- package/dist/transformers/integration/tailwind.d.ts +0 -6
- package/dist/transformers/integration/tailwind.js +0 -134
- package/dist/transformers/map/component.d.ts +0 -8
- package/dist/transformers/map/component.js +0 -20
- package/dist/transformers/map/design/colors.d.ts +0 -2
- package/dist/transformers/map/design/colors.js +0 -10
- package/dist/transformers/map/design/effects.d.ts +0 -2
- package/dist/transformers/map/design/effects.js +0 -13
- package/dist/transformers/map/design/typography.d.ts +0 -2
- package/dist/transformers/map/design/typography.js +0 -16
- package/dist/transformers/map/index.d.ts +0 -4
- package/dist/transformers/map/index.js +0 -46
- package/dist/transformers/preview/index.d.ts +0 -28
- package/dist/transformers/preview/index.js +0 -405
- package/dist/transformers/preview/utils.d.ts +0 -8
- package/dist/transformers/preview/utils.js +0 -119
- package/dist/transformers/scss/component.d.ts +0 -4
- package/dist/transformers/scss/component.js +0 -32
- package/dist/transformers/scss/design/colors.d.ts +0 -3
- package/dist/transformers/scss/design/colors.js +0 -19
- package/dist/transformers/scss/design/effects.d.ts +0 -3
- package/dist/transformers/scss/design/effects.js +0 -24
- package/dist/transformers/scss/design/typography.d.ts +0 -3
- package/dist/transformers/scss/design/typography.js +0 -32
- package/dist/transformers/scss/index.d.ts +0 -16
- package/dist/transformers/scss/index.js +0 -82
- package/dist/transformers/scss/types.d.ts +0 -5
- package/dist/transformers/scss/types.js +0 -2
- package/dist/transformers/sd/component.d.ts +0 -9
- package/dist/transformers/sd/component.js +0 -38
- package/dist/transformers/sd/design/colors.d.ts +0 -7
- package/dist/transformers/sd/design/colors.js +0 -20
- package/dist/transformers/sd/design/effects.d.ts +0 -7
- package/dist/transformers/sd/design/effects.js +0 -23
- package/dist/transformers/sd/design/typography.d.ts +0 -7
- package/dist/transformers/sd/design/typography.js +0 -43
- package/dist/transformers/sd/index.d.ts +0 -5
- package/dist/transformers/sd/index.js +0 -26
- package/dist/transformers/tokenSetTransformers.d.ts +0 -5
- package/dist/transformers/tokenSetTransformers.js +0 -119
- package/dist/transformers/tokens.d.ts +0 -5
- package/dist/transformers/tokens.js +0 -122
- package/dist/transformers/transformer.d.ts +0 -10
- package/dist/transformers/transformer.js +0 -46
- package/dist/transformers/types.d.ts +0 -63
- package/dist/transformers/types.js +0 -2
- package/dist/transformers/utils.d.ts +0 -51
- package/dist/transformers/utils.js +0 -119
- package/dist/types/plugin.d.ts +0 -27
- package/dist/types/plugin.js +0 -2
- package/dist/types/recipes.d.ts +0 -33
- package/dist/types/recipes.js +0 -2
- package/dist/types/tabs.d.ts +0 -4
- package/dist/types/tabs.js +0 -8
- package/dist/utils/convertColor.d.ts +0 -47
- package/dist/utils/convertColor.js +0 -265
- package/dist/utils/gradients.d.ts +0 -21
- package/dist/utils/gradients.js +0 -138
- package/dist/utils/integration.d.ts +0 -2
- package/dist/utils/integration.js +0 -68
- package/dist/utils/maps.d.ts +0 -2
- package/dist/utils/maps.js +0 -11
- package/dist/utils/math.d.ts +0 -31
- package/dist/utils/math.js +0 -80
- package/dist/utils/numbers.d.ts +0 -1
- package/dist/utils/numbers.js +0 -20
- package/dist/utils/preview.d.ts +0 -9
- package/dist/utils/preview.js +0 -219
- package/dist/utils/string.d.ts +0 -1
- package/dist/utils/string.js +0 -12
- package/src/app/components/AnchorNav.tsx +0 -33
- package/src/app/components/ComponentLists.tsx +0 -76
- package/src/app/components/ComponentPreview.tsx +0 -176
- package/src/app/components/Icon.tsx +0 -23
- package/src/app/components/MarkdownLayout.tsx +0 -40
- package/src/app/components/context/MdxContext.tsx +0 -72
- package/src/app/pages/assets/icons/[name]/index.tsx +0 -208
- package/src/app/pages/assets/icons/index.tsx +0 -135
- package/src/app/pages/changelog.tsx +0 -229
- package/src/app/pages/components/[component]/index.tsx +0 -352
- package/src/app/pages/components/index.tsx +0 -105
- package/src/app/sass/components/_all.scss +0 -32
- package/src/app/sass/components/_anchor-nav.scss +0 -51
- package/src/app/sass/components/_badge.scss +0 -12
- package/src/app/sass/components/_buttons.scss +0 -108
- package/src/app/sass/components/_card.scss +0 -256
- package/src/app/sass/components/_code-block.scss +0 -120
- package/src/app/sass/components/_color-preview.scss +0 -93
- package/src/app/sass/components/_component.scss +0 -105
- package/src/app/sass/components/_content.scss +0 -86
- package/src/app/sass/components/_footer.scss +0 -13
- package/src/app/sass/components/_forms.scss +0 -57
- package/src/app/sass/components/_hamburger-icon.scss +0 -108
- package/src/app/sass/components/_header.scss +0 -104
- package/src/app/sass/components/_hero.scss +0 -105
- package/src/app/sass/components/_kbar.scss +0 -92
- package/src/app/sass/components/_list.scss +0 -22
- package/src/app/sass/components/_mobilenav.scss +0 -81
- package/src/app/sass/components/_notification.scss +0 -32
- package/src/app/sass/components/_offcanvas.scss +0 -38
- package/src/app/sass/components/_page.scss +0 -63
- package/src/app/sass/components/_pagination.scss +0 -20
- package/src/app/sass/components/_sidenav.scss +0 -151
- package/src/app/sass/components/_tokens-preview.scss +0 -99
- package/src/app/sass/components/_tooltip.scss +0 -56
- package/src/app/sass/components/_typography.scss +0 -94
- package/src/app/sass/elements/_all.scss +0 -17
- package/src/app/sass/elements/_forms.scss +0 -17
- package/src/app/sass/elements/_headings.scss +0 -14
- package/src/app/sass/elements/_hr.scss +0 -13
- package/src/app/sass/elements/_images.scss +0 -20
- package/src/app/sass/elements/_links.scss +0 -12
- package/src/app/sass/elements/_media.scss +0 -18
- package/src/app/sass/elements/_page.scss +0 -42
- package/src/app/sass/elements/_tables.scss +0 -42
- package/src/app/sass/elements/_typography.scss +0 -75
- package/src/app/sass/generic/_all.scss +0 -11
- package/src/app/sass/generic/_box-sizing.scss +0 -19
- package/src/app/sass/generic/_normalize.scss +0 -341
- package/src/app/sass/generic/_reset.scss +0 -81
- package/src/app/sass/main.scss +0 -39
- package/src/app/sass/objects/_all.scss +0 -11
- package/src/app/sass/objects/_grid.scss +0 -96
- package/src/app/sass/objects/_icon.scss +0 -22
- package/src/app/sass/objects/_list.scss +0 -32
- package/src/app/sass/settings/_all.scss +0 -17
- package/src/app/sass/settings/_animations.scss +0 -25
- package/src/app/sass/settings/_breakpoints.scss +0 -16
- package/src/app/sass/settings/_buttons.scss +0 -50
- package/src/app/sass/settings/_colors.scss +0 -67
- package/src/app/sass/settings/_grid.scss +0 -11
- package/src/app/sass/settings/_hamburger-icon.scss +0 -19
- package/src/app/sass/settings/_offcanvas.scss +0 -7
- package/src/app/sass/settings/_spacing.scss +0 -23
- package/src/app/sass/settings/_typography.scss +0 -51
- package/src/app/sass/themes/_default.scss +0 -103
- package/src/app/sass/tools/_all.scss +0 -13
- package/src/app/sass/tools/_breakpoints.scss +0 -137
- package/src/app/sass/tools/_colors.scss +0 -46
- package/src/app/sass/tools/_grid.scss +0 -127
- package/src/app/sass/tools/_rem.scss +0 -78
- package/src/app/sass/tools/_typography.scss +0 -19
- package/src/app/sass/utilities/_all.scss +0 -14
- package/src/app/sass/utilities/_backgrounds.scss +0 -75
- package/src/app/sass/utilities/_flexbox.scss +0 -120
- package/src/app/sass/utilities/_layout.scss +0 -202
- package/src/app/sass/utilities/_other.scss +0 -65
- package/src/app/sass/utilities/_spacing.scss +0 -153
- package/src/app/sass/utilities/_typography.scss +0 -121
- package/src/app/sass/vendor/prism.scss +0 -254
- package/src/commands/build/integration.ts +0 -20
- package/src/commands/build/recipe.ts +0 -20
- package/src/commands/build/snippets.ts +0 -25
- package/src/commands/eject/integration.ts +0 -20
- package/src/commands/make/integration.ts +0 -20
- package/src/commands/make/snippet.ts +0 -33
- package/src/commands/rename/snippet.ts +0 -31
- package/src/exporters/assets.ts +0 -108
- package/src/exporters/components/extractor.ts +0 -462
- package/src/exporters/components/index.ts +0 -380
- package/src/exporters/components/types.ts +0 -80
- package/src/exporters/design.ts +0 -186
- package/src/exporters/utils.ts +0 -130
- package/src/figma/api.ts +0 -82
- package/src/figma/types.ts +0 -1326
- package/src/plugin/index.ts +0 -110
- package/src/transformers/css/component.ts +0 -94
- package/src/transformers/css/design/colors.ts +0 -11
- package/src/transformers/css/design/effects.ts +0 -19
- package/src/transformers/css/design/typography.ts +0 -26
- package/src/transformers/css/index.ts +0 -32
- package/src/transformers/font/index.ts +0 -77
- package/src/transformers/font/types.ts +0 -3
- package/src/transformers/integration/index.ts +0 -392
- package/src/transformers/integration/tailwind.ts +0 -133
- package/src/transformers/map/component.ts +0 -26
- package/src/transformers/map/design/colors.ts +0 -11
- package/src/transformers/map/design/effects.ts +0 -15
- package/src/transformers/map/design/typography.ts +0 -17
- package/src/transformers/map/index.ts +0 -40
- package/src/transformers/preview/index.ts +0 -292
- package/src/transformers/preview/utils.ts +0 -56
- package/src/transformers/scss/component.ts +0 -38
- package/src/transformers/scss/design/colors.ts +0 -21
- package/src/transformers/scss/design/effects.ts +0 -27
- package/src/transformers/scss/design/typography.ts +0 -34
- package/src/transformers/scss/index.ts +0 -69
- package/src/transformers/sd/component.ts +0 -49
- package/src/transformers/sd/design/colors.ts +0 -19
- package/src/transformers/sd/design/effects.ts +0 -22
- package/src/transformers/sd/design/typography.ts +0 -32
- package/src/transformers/sd/index.ts +0 -32
- package/src/transformers/tokens.ts +0 -158
- package/src/transformers/transformer.ts +0 -55
- package/src/transformers/types.ts +0 -92
- package/src/transformers/utils.ts +0 -158
- package/src/types/config.d.ts +0 -109
- package/src/types/plugin.d.ts +0 -17
- package/src/types/plugin.ts +0 -30
- package/src/types/recipes.ts +0 -34
- package/src/types/tabs.ts +0 -4
- package/src/utils/convertColor.ts +0 -266
- package/src/utils/gradients.ts +0 -149
- package/src/utils/integration.ts +0 -68
- package/src/utils/math.ts +0 -87
- package/src/utils/numbers.ts +0 -21
- package/src/utils/preview.ts +0 -180
- package/stylelint.config.js +0 -131
- /package/config/docs/{assets.md → foundations/assets.md} +0 -0
- /package/config/docs/{assets → foundations}/fonts.md +0 -0
- /package/config/docs/{assets → foundations}/logos.md +0 -0
- /package/config/docs/{changelog.md → guidelines/changelog.md} +0 -0
- /package/{dist/transformers/css/utils.d.ts → config/templates/integration/components/template/1.0.0/template.js} +0 -0
package/.eslintrc.json
CHANGED
package/.prettierignore
CHANGED
package/.prettierrc.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
3
|
+
"[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
|
|
4
|
+
"editor.formatOnSave": true,
|
|
5
|
+
"editor.codeActionsOnSave": {
|
|
6
|
+
"source.organizeImports": "explicit"
|
|
7
|
+
},
|
|
8
|
+
"[xml]": {
|
|
9
|
+
"editor.defaultFormatter": "redhat.vscode-xml"
|
|
10
|
+
}
|
|
11
|
+
}
|
package/Changelog.md
CHANGED
|
@@ -6,21 +6,372 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
6
6
|
and this project adheres to
|
|
7
7
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
8
8
|
|
|
9
|
+
## [0.17.0] - 2025-08-06
|
|
10
|
+
|
|
11
|
+
## Major Highlights
|
|
12
|
+
|
|
13
|
+
### Vite Migration
|
|
14
|
+
|
|
15
|
+
The project has transitioned from Webpack to Vite as the new build tool. This significantly improves performance, simplifies configuration, and lays the groundwork for future extensibility. Legacy integration steps and commands related to Webpack have been removed.
|
|
16
|
+
|
|
17
|
+
### Modularization via `handoff-core`
|
|
18
|
+
|
|
19
|
+
Core token pipeline logic has been extracted into a new shared package: `handoff-core`.
|
|
20
|
+
This change makes the internal architecture of `handoff-app` cleaner and enables easier maintenance across related tools like the Figma plugin.
|
|
21
|
+
|
|
22
|
+
### SSR and Hydration Support
|
|
23
|
+
|
|
24
|
+
Initial support for Server-Side Rendering (SSR) and hydration is now available.
|
|
25
|
+
|
|
26
|
+
- SSR is enabled for static previews and production-ready rendering
|
|
27
|
+
- Hydration allows React components to become interactive after being statically rendered
|
|
28
|
+
- These features are considered stable but may still evolve in upcoming releases
|
|
29
|
+
|
|
30
|
+
### JavaScript-Based Configuration
|
|
31
|
+
|
|
32
|
+
All configuration files now support JavaScript in addition to JSON.
|
|
33
|
+
You can now define your config using `handoff.config.js` or `handoff.config.cjs`, and other related files (such as component config files) also support JS formats.
|
|
34
|
+
JSON is still supported, but JavaScript usage is encouraged for better flexibility.
|
|
35
|
+
|
|
36
|
+
## Hook-Based Extensibility
|
|
37
|
+
|
|
38
|
+
A new hook system allows developers to customize parts of the build and schema pipeline.
|
|
39
|
+
**Available hooks:**
|
|
40
|
+
|
|
41
|
+
- `validateComponent`
|
|
42
|
+
- `ssrBuildConfig`
|
|
43
|
+
- `clientBuildConfig`
|
|
44
|
+
- `getSchemaFromExports`
|
|
45
|
+
- `schemaToProperties`
|
|
46
|
+
- `jsBuildConfig`
|
|
47
|
+
- `cssBuildConfig`
|
|
48
|
+
- `htmlBuildConfig`
|
|
49
|
+
|
|
50
|
+
## Additional Features
|
|
51
|
+
|
|
52
|
+
- Component schema export support to help generate documentation tables and property lists
|
|
53
|
+
- Preview filtering to improve navigation in large component libraries
|
|
54
|
+
- New transform generates `.tsx` pages from `.mdx` for better compatibility with typed docs
|
|
55
|
+
- Replaced use of unofficial Next.js APIs with `cross-spawn` for build and dev processes
|
|
56
|
+
- More informative error handling and validation messages
|
|
57
|
+
- Default doc format now set to `.mdx`
|
|
58
|
+
|
|
59
|
+
## Cleanup and Refactors
|
|
60
|
+
|
|
61
|
+
- Removed deprecated integrations and plugin code
|
|
62
|
+
- Dropped part of unused dependencies including `axios`
|
|
63
|
+
- Standardized configuration logic and naming
|
|
64
|
+
- Improved fallback behavior for missing component CSS or schema
|
|
65
|
+
- Cleaned up type definitions and utility functions
|
|
66
|
+
|
|
67
|
+
## Compatibility Notes
|
|
68
|
+
|
|
69
|
+
- Now tested with React 19 and Next.js 15
|
|
70
|
+
- Older React and Next versions may no longer be compatible
|
|
71
|
+
|
|
72
|
+
## [0.16.0] - 2025-06-03
|
|
73
|
+
|
|
74
|
+
This release is a major reorganization of Handoff. We've preserved the core
|
|
75
|
+
Figma Token ETL behavior, but this release significantly rethinks and improves
|
|
76
|
+
the documentation application.
|
|
77
|
+
|
|
78
|
+
**This is a significant breaking change. We recommend starting from a fresh
|
|
79
|
+
project.** Its possible to upgrade an existing Handoff project, but its
|
|
80
|
+
easier to start fresh. Previous versions of handoff depended on specific
|
|
81
|
+
structure. We're working to remove any structure or conventions, so you can
|
|
82
|
+
use handoff in any project as you see fit.
|
|
83
|
+
|
|
84
|
+
Contact us if you need help upgrading a legacy project handoff@convertiv.com.
|
|
85
|
+
|
|
86
|
+
### Justification
|
|
87
|
+
|
|
88
|
+
The Handoff documentation app was initial designed to complement the token e
|
|
89
|
+
xtraction and document simple tokens. Over time, we added the ability to
|
|
90
|
+
document Figma components in the application. We supported integrations that
|
|
91
|
+
would allow users to describe Figma components in code.
|
|
92
|
+
|
|
93
|
+
As we built out more complex design system documentation, we quickly hit the limits
|
|
94
|
+
of what we could build and describe with that simple system. We needed a way
|
|
95
|
+
to flexibly describe components - both defined in Figma, and standalone custom
|
|
96
|
+
components. There are other open source products like Storybook that have some
|
|
97
|
+
of this functionality but we were looking for a more flexible, and robust
|
|
98
|
+
architecture for describing and distributing components across ecosystems.
|
|
99
|
+
|
|
100
|
+
This release does a number major things -
|
|
101
|
+
|
|
102
|
+
- Introduces a new component architecture, allowing users to describe components
|
|
103
|
+
using handlebars, css, and JSON
|
|
104
|
+
- These components are built, compiled, and validated on each handoff build. The
|
|
105
|
+
build system is designed to be highly configurable.
|
|
106
|
+
- Each component has a set of typed properties allowing users to pass pass in
|
|
107
|
+
data to the component, and visualize variations
|
|
108
|
+
- Components can be annotated with metadata to allow users to provide robust
|
|
109
|
+
usage guidelines.
|
|
110
|
+
- Each component is semver versioned
|
|
111
|
+
-
|
|
112
|
+
- Publishes a robust API at /api/components.json that allows remote systems to
|
|
113
|
+
query the
|
|
114
|
+
- Each component is published at /api/component/{name}.json. This allows systems
|
|
115
|
+
to fetch just the relevant component.
|
|
116
|
+
- Completely redesigns and rearchitects the application.
|
|
117
|
+
- Redesigned using shadCn tailwind components
|
|
118
|
+
- Reorganized the information architecture to default to best practice in
|
|
119
|
+
organizing foundations, systems and guidelines.
|
|
120
|
+
- This architecture and design can be customized
|
|
121
|
+
|
|
122
|
+
See the demo site at demo.handoff.com and the demo code at h
|
|
123
|
+
https://github.com/Convertiv/handoff-demo to have a sample of how this should be
|
|
124
|
+
structured
|
|
125
|
+
|
|
126
|
+
## Component Structure
|
|
127
|
+
|
|
128
|
+
In this version components should be stored at `{integrationPath}/components`.
|
|
129
|
+
Each integration should be in a folder with a unique name. This name will be
|
|
130
|
+
used as the id for the component.
|
|
131
|
+
|
|
132
|
+
Within each component folder, there should be at least one folder, named
|
|
133
|
+
with a semver name. The structure of this should look like
|
|
134
|
+
|
|
135
|
+
- {integrationPath}
|
|
136
|
+
- components
|
|
137
|
+
- component1
|
|
138
|
+
- 1.0.0
|
|
139
|
+
- component1.json - Describes the component in a JSON format documented below
|
|
140
|
+
- component1.hbs - A handlebar template to describe the markup of the component
|
|
141
|
+
- component1.scss - An optional style sheet to include with the project
|
|
142
|
+
- component1.js - An optional js file to include with the project
|
|
143
|
+
|
|
144
|
+
### Minimum Component JSON
|
|
145
|
+
|
|
146
|
+
This is a sample json component to show how you can structure the component
|
|
147
|
+
documenation. Most of this is metadata used to construct robust documentation
|
|
148
|
+
for users.
|
|
149
|
+
|
|
150
|
+
The two important semantic sections are `previews` and `properties`. Properties
|
|
151
|
+
defines a list of properties the component accepts. They are defined using the
|
|
152
|
+
OpenAPI json specification.
|
|
153
|
+
|
|
154
|
+
Once you define a list of properties, you can then define a list of previews.
|
|
155
|
+
Each preview defines values for the properties. Handoff will then render a set
|
|
156
|
+
of html previews of your component. This way you can render variations
|
|
157
|
+
simply.
|
|
158
|
+
|
|
159
|
+
```JSON
|
|
160
|
+
{
|
|
161
|
+
"title": "Accordion",
|
|
162
|
+
"image": "https://placehold.co/1360x900",
|
|
163
|
+
"description": "Collapsible sections for toggling sections of content on and off.",
|
|
164
|
+
"figma": "https://www.figma.com/design/0gKWw8gYChpItKWzh8o23N/SS%26C-Design-System?node-id=301-598&t=qoaWE7Tx8sH4njGu-4",
|
|
165
|
+
"type": "block",
|
|
166
|
+
"group": "Accordion",
|
|
167
|
+
"categories": ["Components"],
|
|
168
|
+
"tags": ["accordion"],
|
|
169
|
+
"should_do": ["Show a list of items in an accordion format.", "Allow users to expand and collapse each item individually."],
|
|
170
|
+
"should_not_do": ["Use this component for a large number of items."],
|
|
171
|
+
"changelog": [
|
|
172
|
+
{
|
|
173
|
+
"version": "1.0.0",
|
|
174
|
+
"date": "2021-01-01",
|
|
175
|
+
"changes": ["Initial version."]
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
"previews": {
|
|
179
|
+
"generic": {
|
|
180
|
+
"title": "Generic",
|
|
181
|
+
"values": {
|
|
182
|
+
"id": "accordion",
|
|
183
|
+
"items": [
|
|
184
|
+
{
|
|
185
|
+
"id": "accordion-item-1",
|
|
186
|
+
"title": "Accordion Item 1",
|
|
187
|
+
"paragraph": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.",
|
|
188
|
+
"image": {
|
|
189
|
+
"url": "https://placehold.co/1360x900",
|
|
190
|
+
"alt": "Image alt text"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
}
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"properties": {
|
|
199
|
+
"id": {
|
|
200
|
+
"name": "ID",
|
|
201
|
+
"description": "Unique identifier for the accordion.",
|
|
202
|
+
"type": "text",
|
|
203
|
+
"default": "accordion",
|
|
204
|
+
"rules": {
|
|
205
|
+
"required": true,
|
|
206
|
+
"content": {
|
|
207
|
+
"min": 5,
|
|
208
|
+
"max": 25
|
|
209
|
+
},
|
|
210
|
+
"pattern": "^[a-z0-9-]+$"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"items": {
|
|
214
|
+
"name": "Items",
|
|
215
|
+
"description": "Accordion items",
|
|
216
|
+
"type": "array",
|
|
217
|
+
"items": {
|
|
218
|
+
"type": "object",
|
|
219
|
+
"properties": {
|
|
220
|
+
"id": {
|
|
221
|
+
"name": "ID",
|
|
222
|
+
"description": "Unique identifier for the accordion item.",
|
|
223
|
+
"type": "text",
|
|
224
|
+
"default": "accordion-item-1",
|
|
225
|
+
"rules": {
|
|
226
|
+
"required": true,
|
|
227
|
+
"content": {
|
|
228
|
+
"min": 5,
|
|
229
|
+
"max": 25
|
|
230
|
+
},
|
|
231
|
+
"pattern": "^[a-z0-9-]+$"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"title": {
|
|
235
|
+
"name": "Title",
|
|
236
|
+
"description": "Title of the accordion item.",
|
|
237
|
+
"type": "text",
|
|
238
|
+
"default": "Accordion Item 1",
|
|
239
|
+
"rules": {
|
|
240
|
+
"required": true,
|
|
241
|
+
"content": {
|
|
242
|
+
"min": 5,
|
|
243
|
+
"max": 25
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"paragraph": {
|
|
248
|
+
"name": "Paragraph",
|
|
249
|
+
"description": "Paragraph of the accordion item.",
|
|
250
|
+
"type": "text",
|
|
251
|
+
"default": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.",
|
|
252
|
+
"rules": {
|
|
253
|
+
"required": true,
|
|
254
|
+
"content": {
|
|
255
|
+
"min": 5,
|
|
256
|
+
"max": 100
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"image": {
|
|
261
|
+
"name": "Image",
|
|
262
|
+
"description": "Image of the accordion item.",
|
|
263
|
+
"type": "image",
|
|
264
|
+
"default": {
|
|
265
|
+
"url": "https://placehold.co/1360x900",
|
|
266
|
+
"alt": "Image alt text"
|
|
267
|
+
},
|
|
268
|
+
"rules": {
|
|
269
|
+
"required": true,
|
|
270
|
+
"dimensions": {
|
|
271
|
+
"min": {
|
|
272
|
+
"width": 1360,
|
|
273
|
+
"height": 900
|
|
274
|
+
},
|
|
275
|
+
"max": {
|
|
276
|
+
"width": 1360,
|
|
277
|
+
"height": 900
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"rules": {
|
|
285
|
+
"required": true,
|
|
286
|
+
"min": 1,
|
|
287
|
+
"max": 10
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### Handlebars Templates
|
|
295
|
+
|
|
296
|
+
We anticipate allowing other templating systems in the future, but in this
|
|
297
|
+
version, we support handlebars with limited logic. Using Handlebars allows
|
|
298
|
+
us to create a simple system that will be compatible with most downstream
|
|
299
|
+
platforms.
|
|
300
|
+
|
|
301
|
+
There are two special feature of this handlebars file -
|
|
302
|
+
|
|
303
|
+
- `#field` This allows you wrap a field in a tag. This allows handoff to inject
|
|
304
|
+
metadata around a field to make the field inline editable, and to allow us to
|
|
305
|
+
open a sidebar with metadata about the property. You don't have to use this
|
|
306
|
+
but its helpful.
|
|
307
|
+
- `style` and `script` - These tags allow us to inject automatically the built
|
|
308
|
+
script and style artifacts.
|
|
309
|
+
|
|
310
|
+
```html
|
|
311
|
+
<head>
|
|
312
|
+
{{{style}}} {{{script}}}
|
|
313
|
+
</head>
|
|
314
|
+
<body class="preview-body">
|
|
315
|
+
<section class="py-lg-12 py-8">
|
|
316
|
+
<div class="container">
|
|
317
|
+
<div class="row justify-content-center">
|
|
318
|
+
<div class="col-12 col-lg-10">
|
|
319
|
+
<div class="accordion accordion-spaced" id="{{properties.id}}">
|
|
320
|
+
{{#each properties.items}}
|
|
321
|
+
<div class="accordion-item">
|
|
322
|
+
<h3 class="accordion-header" id="{{../properties.id}}-heading-{{this.id}}">
|
|
323
|
+
<button
|
|
324
|
+
class="accordion-button"
|
|
325
|
+
type="button"
|
|
326
|
+
data-bs-toggle="collapse"
|
|
327
|
+
data-bs-target="#{{../properties.id}}-collapse-{{this.id}}"
|
|
328
|
+
aria-expanded="true"
|
|
329
|
+
aria-controls="{{../properties.id}}-collapse-{{this.id}}"
|
|
330
|
+
>
|
|
331
|
+
{{#field "items.title" }}{{this.title}}{{/field}}
|
|
332
|
+
</button>
|
|
333
|
+
</h3>
|
|
334
|
+
<div
|
|
335
|
+
id="{{../properties.id}}-collapse-{{this.id}}"
|
|
336
|
+
class="accordion-collapse collapse"
|
|
337
|
+
aria-labelledby="{{this.id}}"
|
|
338
|
+
data-bs-parent="#{{../properties.id}}-heading-{{this.id}}"
|
|
339
|
+
>
|
|
340
|
+
<div class="accordion-body w-lg-90 mx-lg-auto fs-lg">
|
|
341
|
+
<p>{{#field "items.paragraph" }}{{this.paragraph}}{{/field}}</p>
|
|
342
|
+
</div>
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
{{/each}}
|
|
346
|
+
</div>
|
|
347
|
+
</div>
|
|
348
|
+
</div>
|
|
349
|
+
</div>
|
|
350
|
+
</section>
|
|
351
|
+
</body>
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### Bugfixes
|
|
355
|
+
|
|
9
356
|
## [0.15.2] - 2024-12-11
|
|
357
|
+
|
|
10
358
|
This release fixes a small bug when pulling foundation tokens with nested names.
|
|
11
359
|
|
|
12
360
|
### Bugfixes
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
361
|
+
|
|
362
|
+
- Figma's name schema delivers names as {group}/{name}. If your foundation
|
|
363
|
+
(color, shadow, etc) names include a slash `Blue/100` Handoff would only grab
|
|
364
|
+
the first part of that name, and construct the token excluding the remaining
|
|
365
|
+
data. This patch resolves that so instead of getting `primitive-blue` you will
|
|
366
|
+
now get `primitive-blue-100` as your token.
|
|
18
367
|
|
|
19
368
|
## [0.15.1] - 2024-11-27
|
|
20
|
-
|
|
369
|
+
|
|
370
|
+
This is a minor release to fix several small typing issues that cause problems
|
|
21
371
|
in the linter when running as a local NPM package.
|
|
22
372
|
|
|
23
373
|
### Bugfixes
|
|
374
|
+
|
|
24
375
|
- Fixes a typing issue in the transformers when including the handoff core package
|
|
25
376
|
- Fixes a typing issue when including the ReferenceObject type
|
|
26
377
|
|
|
@@ -37,8 +388,8 @@ to structure and reuse styles across multiple large components.
|
|
|
37
388
|
component styles in the tokens export. This allows you to use foundation styles
|
|
38
389
|
as variables in component styles in CSS, SASS, and Style Dictionaries.
|
|
39
390
|
- To enable, set `useVariables` to `true` in the `handoff.config.json` file.
|
|
40
|
-
- You can also enable variable support via the `.env` var
|
|
41
|
-
|
|
391
|
+
- You can also enable variable support via the `.env` var
|
|
392
|
+
`HANDOFF_USE_VARIABLES`. You can use a boolean or string ("true"/"false")
|
|
42
393
|
- When enabled, Handoff will create variable references in the component styles
|
|
43
394
|
for the foundation styles wherever possible instead of using the string value.
|
|
44
395
|
- For example a color foundation style `Blue` in the `Primary` color group
|
|
@@ -169,7 +520,6 @@ This release fixes a couple of small path issues that affect running 0.13.0 from
|
|
|
169
520
|
### Changes
|
|
170
521
|
|
|
171
522
|
- **Integration System Overhaul**
|
|
172
|
-
|
|
173
523
|
- **Local Integrations Only:** From this release onward, only local (ejected) integrations are supported. Handoff will automatically use the locally found integration.
|
|
174
524
|
- Create a new local integration using `handoff-app make:integration` (or `eject:integration` which is still supported as an alias).
|
|
175
525
|
- Since there is no need to specify integration information, integration options in `handoff.config.json` such as name and version are no longer recognized, making the integration section of `handoff.config.json` obsolete.
|
package/components.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
+
"style": "new-york",
|
|
4
|
+
"rsc": false,
|
|
5
|
+
"tsx": true,
|
|
6
|
+
"tailwind": {
|
|
7
|
+
"config": "tailwind.config.ts",
|
|
8
|
+
"css": "src/app/css/index.css",
|
|
9
|
+
"baseColor": "zinc",
|
|
10
|
+
"cssVariables": true,
|
|
11
|
+
"prefix": ""
|
|
12
|
+
},
|
|
13
|
+
"aliases": {
|
|
14
|
+
"components": "src/app/components",
|
|
15
|
+
"utils": "src/app/lib/utils",
|
|
16
|
+
"ui": "src/app/components/ui",
|
|
17
|
+
"lib": "src/app/lib",
|
|
18
|
+
"hooks": "src/app/hooks"
|
|
19
|
+
},
|
|
20
|
+
"iconLibrary": "lucide"
|
|
21
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: Icon Library
|
|
3
3
|
description: Set of icons used to provide users with a way to process information faster and instinctively recognize actions signified by the icon.
|
|
4
|
-
metaTitle: '
|
|
4
|
+
metaTitle: 'Icon Library | Handoff Design System'
|
|
5
5
|
metaDescription: 'Set of icons used to provide users with a way to process information faster and instinctively recognize actions signified by the icon.'
|
|
6
|
-
---
|
|
6
|
+
---
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: Icon Library
|
|
3
3
|
description: Set of icons used to provide users with a way to process information faster and instinctively recognize actions signified by the icon.
|
|
4
|
-
metaTitle: '
|
|
4
|
+
metaTitle: 'Icon Library | Handoff Design System'
|
|
5
5
|
metaDescription: 'Set of icons used to provide users with a way to process information faster and instinctively recognize actions signified by the icon.'
|
|
6
|
-
---
|
|
6
|
+
---
|
|
@@ -1,23 +1,74 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Design Foundations
|
|
3
3
|
description: Sets of recommendations on how to apply design principles to provide a positive user experience.
|
|
4
|
-
weight:
|
|
4
|
+
weight: 0
|
|
5
5
|
image: hero-design
|
|
6
6
|
menuTitle: 'Foundations'
|
|
7
7
|
metaTitle: 'Design Foundations | Handoff Design System'
|
|
8
8
|
metaDescription: 'Sets of recommendations on how to apply design principles to provide a positive user experience.'
|
|
9
9
|
enabled: true
|
|
10
|
-
menu:
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
10
|
+
menu:
|
|
11
|
+
- title: Getting Started
|
|
12
|
+
menu:
|
|
13
|
+
- path: foundations
|
|
14
|
+
title: Foundations
|
|
15
|
+
- title: Foundations
|
|
16
|
+
menu:
|
|
17
|
+
- path: foundations/logo
|
|
18
|
+
title: Logo
|
|
19
|
+
image: react
|
|
20
|
+
menu:
|
|
21
|
+
- path: foundations/logo
|
|
22
|
+
title: Overview
|
|
23
|
+
- path: foundations/logo/resources
|
|
24
|
+
title: Resources
|
|
25
|
+
- path: foundations/colors
|
|
26
|
+
title: Colors
|
|
27
|
+
image: hero-colors
|
|
28
|
+
menu:
|
|
29
|
+
- path: foundations/colors
|
|
30
|
+
title: Our Colors
|
|
31
|
+
- path: foundations/colors/guidelines
|
|
32
|
+
title: Guidelines
|
|
33
|
+
- path: foundations/typography
|
|
34
|
+
title: Typography
|
|
35
|
+
image: hero-design
|
|
36
|
+
menu:
|
|
37
|
+
- path: foundations/typography
|
|
38
|
+
title: Overview
|
|
39
|
+
- path: foundations/typography/guidelines
|
|
40
|
+
title: Guidelines
|
|
41
|
+
- path: foundations/typography/resources
|
|
42
|
+
title: Resources
|
|
43
|
+
- path: foundations/grid
|
|
44
|
+
title: Grid
|
|
45
|
+
image: hero-effects
|
|
46
|
+
- path: foundations/effects
|
|
47
|
+
title: Effects
|
|
48
|
+
image: hero-effects
|
|
49
|
+
menu:
|
|
50
|
+
- path: foundations/effects
|
|
51
|
+
title: Our Effects
|
|
52
|
+
- path: foundations/effects/guidelines
|
|
53
|
+
title: Guidelines
|
|
54
|
+
- path: foundations/effects/resources
|
|
55
|
+
title: Resources
|
|
56
|
+
- path: foundations/icons
|
|
57
|
+
title: Icons
|
|
58
|
+
image: hero-effects
|
|
59
|
+
menu:
|
|
60
|
+
- path: foundations/icons
|
|
61
|
+
title: Library
|
|
62
|
+
- path: foundations/icons/guidelines
|
|
63
|
+
title: Guidelines
|
|
64
|
+
- title: Assets
|
|
65
|
+
menu:
|
|
66
|
+
- path: foundations/images
|
|
67
|
+
title: Images
|
|
68
|
+
image: hero-effects
|
|
69
|
+
menu:
|
|
70
|
+
- path: foundations/icons
|
|
71
|
+
title: Library
|
|
72
|
+
- path: foundations/icons/guidelines
|
|
73
|
+
title: Guidelines
|
|
23
74
|
---
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Guidelines
|
|
3
|
+
description: How to build out a robust project built on the designs, tokens, and components documented here.
|
|
4
|
+
weight: 10
|
|
5
|
+
image: hero-components
|
|
6
|
+
menuTitle: 'Guidelines'
|
|
7
|
+
metaTitle: 'Guidelines | Handoff Design System'
|
|
8
|
+
metaDescription: 'How to build out a robust project built on the designs, tokens, and components documented here.'
|
|
9
|
+
enabled: true
|
|
10
|
+
menu:
|
|
11
|
+
---
|
|
@@ -5,6 +5,7 @@ image: component-alert
|
|
|
5
5
|
metaTitle: 'Alerts | Handoff Design System'
|
|
6
6
|
metaDescription: 'Alerts are used to communicate a state that affects a system, feature or page. They are used to provide feedback about an action that has taken place.'
|
|
7
7
|
---
|
|
8
|
+
|
|
8
9
|
### Accessibility
|
|
9
10
|
|
|
10
11
|
Make it clear what this alert does for the user.
|
|
@@ -12,18 +13,18 @@ Make it clear what this alert does for the user.
|
|
|
12
13
|
<div className="c-do-dont">
|
|
13
14
|
<div className="c-do-dont__do">
|
|
14
15
|
|
|
15
|
-
<
|
|
16
|
+
<Check /> DO
|
|
16
17
|
|
|
17
18
|
- What to do with alerts
|
|
18
19
|
|
|
19
20
|
</div>
|
|
20
21
|
<div className="c-do-dont__dont">
|
|
21
22
|
|
|
22
|
-
<
|
|
23
|
+
<X /> DON'T
|
|
23
24
|
|
|
24
25
|
- What not to do with alerts
|
|
25
26
|
|
|
26
27
|
</div>
|
|
27
28
|
</div>
|
|
28
29
|
|
|
29
|
-
---
|
|
30
|
+
---
|
|
@@ -13,7 +13,7 @@ Make it clear what this button does for the user.
|
|
|
13
13
|
<div className="c-do-dont">
|
|
14
14
|
<div className="c-do-dont__do">
|
|
15
15
|
|
|
16
|
-
<
|
|
16
|
+
<Check /> DO
|
|
17
17
|
|
|
18
18
|
- Make it clear what this button does for the user.
|
|
19
19
|
- Use at most two buttons in one group.
|
|
@@ -22,7 +22,7 @@ Make it clear what this button does for the user.
|
|
|
22
22
|
</div>
|
|
23
23
|
<div className="c-do-dont__dont">
|
|
24
24
|
|
|
25
|
-
<
|
|
25
|
+
<X /> DON'T
|
|
26
26
|
|
|
27
27
|
- Use more than two words for call to action.
|
|
28
28
|
- First letter of each sentence defaults to a capital letter.
|
|
@@ -13,18 +13,18 @@ Make it clear what this checkboxes does for the user.
|
|
|
13
13
|
<div className="c-do-dont">
|
|
14
14
|
<div className="c-do-dont__do">
|
|
15
15
|
|
|
16
|
-
<
|
|
16
|
+
<Check /> DO
|
|
17
17
|
|
|
18
18
|
- What to do with checkboxes
|
|
19
19
|
|
|
20
20
|
</div>
|
|
21
21
|
<div className="c-do-dont__dont">
|
|
22
22
|
|
|
23
|
-
<
|
|
23
|
+
<X /> DON'T
|
|
24
24
|
|
|
25
25
|
- What not to do with checkboxes
|
|
26
26
|
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
29
29
|
|
|
30
|
-
---
|
|
30
|
+
---
|
|
@@ -14,18 +14,18 @@ Make it clear what this input does for the user.
|
|
|
14
14
|
<div className="c-do-dont">
|
|
15
15
|
<div className="c-do-dont__do">
|
|
16
16
|
|
|
17
|
-
<
|
|
17
|
+
<Check /> DO
|
|
18
18
|
|
|
19
19
|
- What to do with inputs
|
|
20
20
|
|
|
21
21
|
</div>
|
|
22
22
|
<div className="c-do-dont__dont">
|
|
23
23
|
|
|
24
|
-
<
|
|
24
|
+
<X /> DON'T
|
|
25
25
|
|
|
26
26
|
- What not to do with inputs
|
|
27
27
|
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
|
-
---
|
|
31
|
+
---
|