@agent-native/design-system 0.229.0 → 0.237.1
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/README.md +45 -16
- package/css/components/announcement.css +6 -0
- package/css/components/autocomplete.css +4 -0
- package/css/components/button.css +2 -0
- package/css/components/combobox.css +3 -0
- package/css/components/design-file-panel.css +5 -0
- package/css/components/dialog.css +2 -0
- package/css/components/dock-workspace.css +5 -0
- package/css/components/font-picker.css +7 -0
- package/css/components/icon-button.css +2 -0
- package/css/components/image-card.css +4 -0
- package/css/components/layer-tree.css +4 -0
- package/css/components/meter.css +1 -0
- package/css/components/progress.css +2 -0
- package/css/components/property-token.css +3 -0
- package/css/components/tabs.css +3 -0
- package/css/components/toast.css +2 -0
- package/css/direction.css +24 -0
- package/css/main.css +3 -2
- package/css/parts/accordion.css +4 -3
- package/css/parts/alert-dialog.css +19 -51
- package/css/parts/alignment-picker.css +363 -0
- package/css/parts/autocomplete.css +47 -117
- package/css/parts/avatar.css +3 -30
- package/css/parts/badge.css +11 -25
- package/css/parts/blockquote.css +1 -1
- package/css/parts/button.css +75 -61
- package/css/parts/callout.css +4 -24
- package/css/parts/card.css +31 -39
- package/css/parts/checkbox-cards.css +10 -11
- package/css/parts/checkbox-group.css +1 -1
- package/css/parts/checkbox.css +35 -18
- package/css/parts/code.css +4 -64
- package/css/parts/color-swatch.css +36 -0
- package/css/parts/combobox.css +24 -10
- package/css/parts/constraint-controls.css +140 -0
- package/css/parts/context-menu.css +1 -1
- package/css/parts/data-list.css +9 -22
- package/css/parts/design-file-panel.css +189 -0
- package/css/parts/design-property-inspector.css +200 -0
- package/css/parts/dialog.css +87 -91
- package/css/parts/dock-workspace.css +123 -0
- package/css/parts/drawer.css +14 -54
- package/css/parts/field.css +2 -2
- package/css/parts/fieldset.css +1 -1
- package/css/parts/font-picker.css +205 -0
- package/css/parts/grid-size-picker.css +220 -0
- package/css/parts/heading.css +1 -1
- package/css/parts/icon-button.css +2 -12
- package/css/parts/image-card.css +126 -0
- package/css/parts/input.css +37 -31
- package/css/parts/inset.css +1 -0
- package/css/parts/inspector.css +67 -0
- package/css/parts/item.css +5 -8
- package/css/parts/kbd.css +10 -49
- package/css/parts/layer-tree.css +174 -0
- package/css/parts/layout.css +18 -0
- package/css/parts/link.css +1 -1
- package/css/parts/menu.css +48 -47
- package/css/parts/menubar.css +3 -3
- package/css/parts/meter.css +28 -14
- package/css/parts/navigation-menu.css +6 -6
- package/css/parts/number-field.css +18 -12
- package/css/parts/otp-field.css +12 -26
- package/css/parts/page-header.css +1 -1
- package/css/parts/paint-editor.css +70 -0
- package/css/parts/popover.css +33 -36
- package/css/parts/preview-card.css +19 -21
- package/css/parts/progress.css +32 -18
- package/css/parts/property-list.css +34 -0
- package/css/parts/property-token.css +104 -0
- package/css/parts/radio-cards.css +28 -20
- package/css/parts/radio-group.css +28 -15
- package/css/parts/scroll-area.css +10 -17
- package/css/parts/segmented-control.css +66 -45
- package/css/parts/select.css +56 -53
- package/css/parts/separator.css +7 -19
- package/css/parts/sidebar.css +6 -9
- package/css/parts/skeleton.css +14 -1
- package/css/parts/slider.css +33 -24
- package/css/parts/spinner.css +5 -14
- package/css/parts/split-pane.css +117 -0
- package/css/parts/switch.css +73 -36
- package/css/parts/tab-nav.css +1 -1
- package/css/parts/table.css +23 -38
- package/css/parts/tabs.css +151 -30
- package/css/parts/text-area.css +11 -20
- package/css/parts/text.css +21 -58
- package/css/parts/toast.css +28 -19
- package/css/parts/toggle-group.css +1 -1
- package/css/parts/toggle.css +34 -21
- package/css/parts/toolbar.css +40 -37
- package/css/parts/tooltip.css +2 -2
- package/css/styles.css +18 -3
- package/css/text-style-utilities.css +113 -0
- package/css/text-styles.css +115 -0
- package/css/themes/agent-native.css +51 -44
- package/css/themes/analytics.css +40 -30
- package/css/themes/assets.css +40 -30
- package/css/themes/baseline.css +93 -28
- package/css/themes/brain.css +40 -30
- package/css/themes/calendar.css +40 -30
- package/css/themes/chat.css +40 -30
- package/css/themes/clips.css +40 -30
- package/css/themes/content.css +40 -30
- package/css/themes/crm.css +40 -30
- package/css/themes/design.css +40 -30
- package/css/themes/desktop.css +40 -30
- package/css/themes/dispatch.css +40 -30
- package/css/themes/docs.css +40 -30
- package/css/themes/factory.css +40 -30
- package/css/themes/forms.css +40 -30
- package/css/themes/mail.css +40 -30
- package/css/themes/plan.css +40 -30
- package/css/themes/slides.css +40 -30
- package/css/themes/tasks.css +40 -30
- package/css/tokens.css +93 -72
- package/dist/catalog/components/alert-dialog.d.ts +2 -0
- package/dist/catalog/components/alert-dialog.d.ts.map +1 -0
- package/dist/catalog/components/alert-dialog.js +2 -0
- package/dist/catalog/components/alert-dialog.js.map +1 -0
- package/dist/catalog/components/alignment-picker.d.ts +11 -0
- package/dist/catalog/components/alignment-picker.d.ts.map +1 -0
- package/dist/catalog/components/alignment-picker.js +12 -0
- package/dist/catalog/components/alignment-picker.js.map +1 -0
- package/dist/catalog/components/aspect-ratio.d.ts +7 -0
- package/dist/catalog/components/aspect-ratio.d.ts.map +1 -0
- package/dist/catalog/components/aspect-ratio.js +7 -0
- package/dist/catalog/components/aspect-ratio.js.map +1 -0
- package/dist/catalog/components/autocomplete.d.ts +13 -0
- package/dist/catalog/components/autocomplete.d.ts.map +1 -0
- package/dist/catalog/components/autocomplete.js +14 -0
- package/dist/catalog/components/autocomplete.js.map +1 -0
- package/dist/catalog/components/avatar.d.ts +7 -0
- package/dist/catalog/components/avatar.d.ts.map +1 -0
- package/dist/catalog/components/avatar.js +8 -0
- package/dist/catalog/components/avatar.js.map +1 -0
- package/dist/catalog/components/badge.d.ts +8 -0
- package/dist/catalog/components/badge.d.ts.map +1 -0
- package/dist/catalog/components/badge.js +9 -0
- package/dist/catalog/components/badge.js.map +1 -0
- package/dist/catalog/components/blockquote.d.ts +8 -0
- package/dist/catalog/components/blockquote.d.ts.map +1 -0
- package/dist/catalog/components/blockquote.js +9 -0
- package/dist/catalog/components/blockquote.js.map +1 -0
- package/dist/catalog/components/button.d.ts +29 -0
- package/dist/catalog/components/button.d.ts.map +1 -0
- package/dist/catalog/components/button.js +23 -0
- package/dist/catalog/components/button.js.map +1 -0
- package/dist/catalog/components/callout.d.ts +6 -0
- package/dist/catalog/components/callout.d.ts.map +1 -0
- package/dist/catalog/components/callout.js +7 -0
- package/dist/catalog/components/callout.js.map +1 -0
- package/dist/catalog/components/card.d.ts +4 -0
- package/dist/catalog/components/card.d.ts.map +1 -0
- package/dist/catalog/components/card.js +5 -0
- package/dist/catalog/components/card.js.map +1 -0
- package/dist/catalog/components/checkbox-cards.d.ts +7 -0
- package/dist/catalog/components/checkbox-cards.d.ts.map +1 -0
- package/dist/catalog/components/checkbox-cards.js +8 -0
- package/dist/catalog/components/checkbox-cards.js.map +1 -0
- package/dist/catalog/components/checkbox-group.d.ts +6 -0
- package/dist/catalog/components/checkbox-group.d.ts.map +1 -0
- package/dist/catalog/components/checkbox-group.js +7 -0
- package/dist/catalog/components/checkbox-group.js.map +1 -0
- package/dist/catalog/components/checkbox.d.ts +6 -0
- package/dist/catalog/components/checkbox.d.ts.map +1 -0
- package/dist/catalog/components/checkbox.js +7 -0
- package/dist/catalog/components/checkbox.js.map +1 -0
- package/dist/catalog/components/code.d.ts +9 -0
- package/dist/catalog/components/code.d.ts.map +1 -0
- package/dist/catalog/components/code.js +10 -0
- package/dist/catalog/components/code.js.map +1 -0
- package/dist/catalog/components/color-swatch.d.ts +5 -0
- package/dist/catalog/components/color-swatch.d.ts.map +1 -0
- package/dist/catalog/components/color-swatch.js +6 -0
- package/dist/catalog/components/color-swatch.js.map +1 -0
- package/dist/catalog/components/combobox.d.ts +13 -0
- package/dist/catalog/components/combobox.d.ts.map +1 -0
- package/dist/catalog/components/combobox.js +14 -0
- package/dist/catalog/components/combobox.js.map +1 -0
- package/dist/catalog/components/context-menu.d.ts +11 -0
- package/dist/catalog/components/context-menu.d.ts.map +1 -0
- package/dist/catalog/components/context-menu.js +12 -0
- package/dist/catalog/components/context-menu.js.map +1 -0
- package/dist/catalog/components/data-list.d.ts +5 -0
- package/dist/catalog/components/data-list.d.ts.map +1 -0
- package/dist/catalog/components/data-list.js +6 -0
- package/dist/catalog/components/data-list.js.map +1 -0
- package/dist/catalog/components/dialog.d.ts +2 -0
- package/dist/catalog/components/dialog.d.ts.map +1 -0
- package/dist/catalog/components/dialog.js +2 -0
- package/dist/catalog/components/dialog.js.map +1 -0
- package/dist/catalog/components/drawer.d.ts +4 -0
- package/dist/catalog/components/drawer.d.ts.map +1 -0
- package/dist/catalog/components/drawer.js +5 -0
- package/dist/catalog/components/drawer.js.map +1 -0
- package/dist/catalog/components/font-picker.d.ts +10 -0
- package/dist/catalog/components/font-picker.d.ts.map +1 -0
- package/dist/catalog/components/font-picker.js +11 -0
- package/dist/catalog/components/font-picker.js.map +1 -0
- package/dist/catalog/components/grid-size-picker.d.ts +11 -0
- package/dist/catalog/components/grid-size-picker.d.ts.map +1 -0
- package/dist/catalog/components/grid-size-picker.js +12 -0
- package/dist/catalog/components/grid-size-picker.js.map +1 -0
- package/dist/catalog/components/heading.d.ts +13 -0
- package/dist/catalog/components/heading.d.ts.map +1 -0
- package/dist/catalog/components/heading.js +9 -0
- package/dist/catalog/components/heading.js.map +1 -0
- package/dist/catalog/components/index.d.ts +56 -0
- package/dist/catalog/components/index.d.ts.map +1 -0
- package/dist/catalog/components/index.js +56 -0
- package/dist/catalog/components/index.js.map +1 -0
- package/dist/catalog/components/input.d.ts +11 -0
- package/dist/catalog/components/input.d.ts.map +1 -0
- package/dist/catalog/components/input.js +12 -0
- package/dist/catalog/components/input.js.map +1 -0
- package/dist/catalog/components/inset.d.ts +6 -0
- package/dist/catalog/components/inset.d.ts.map +1 -0
- package/dist/catalog/components/inset.js +7 -0
- package/dist/catalog/components/inset.js.map +1 -0
- package/dist/catalog/components/item.d.ts +11 -0
- package/dist/catalog/components/item.d.ts.map +1 -0
- package/dist/catalog/components/item.js +12 -0
- package/dist/catalog/components/item.js.map +1 -0
- package/dist/catalog/components/kbd.d.ts +4 -0
- package/dist/catalog/components/kbd.d.ts.map +1 -0
- package/dist/catalog/components/kbd.js +5 -0
- package/dist/catalog/components/kbd.js.map +1 -0
- package/dist/catalog/components/link.d.ts +10 -0
- package/dist/catalog/components/link.d.ts.map +1 -0
- package/dist/catalog/components/link.js +11 -0
- package/dist/catalog/components/link.js.map +1 -0
- package/dist/catalog/components/menu.d.ts +11 -0
- package/dist/catalog/components/menu.d.ts.map +1 -0
- package/dist/catalog/components/menu.js +12 -0
- package/dist/catalog/components/menu.js.map +1 -0
- package/dist/catalog/components/menubar.d.ts +11 -0
- package/dist/catalog/components/menubar.d.ts.map +1 -0
- package/dist/catalog/components/menubar.js +12 -0
- package/dist/catalog/components/menubar.js.map +1 -0
- package/dist/catalog/components/meter.d.ts +7 -0
- package/dist/catalog/components/meter.d.ts.map +1 -0
- package/dist/catalog/components/meter.js +8 -0
- package/dist/catalog/components/meter.js.map +1 -0
- package/dist/catalog/components/number-field.d.ts +8 -0
- package/dist/catalog/components/number-field.d.ts.map +1 -0
- package/dist/catalog/components/number-field.js +9 -0
- package/dist/catalog/components/number-field.js.map +1 -0
- package/dist/catalog/components/otp-field.d.ts +6 -0
- package/dist/catalog/components/otp-field.d.ts.map +1 -0
- package/dist/catalog/components/otp-field.js +7 -0
- package/dist/catalog/components/otp-field.js.map +1 -0
- package/dist/catalog/components/popover.d.ts +2 -0
- package/dist/catalog/components/popover.d.ts.map +1 -0
- package/dist/catalog/components/popover.js +2 -0
- package/dist/catalog/components/popover.js.map +1 -0
- package/dist/catalog/components/preview-card.d.ts +2 -0
- package/dist/catalog/components/preview-card.d.ts.map +1 -0
- package/dist/catalog/components/preview-card.js +2 -0
- package/dist/catalog/components/preview-card.js.map +1 -0
- package/dist/catalog/components/progress.d.ts +11 -0
- package/dist/catalog/components/progress.d.ts.map +1 -0
- package/dist/catalog/components/progress.js +12 -0
- package/dist/catalog/components/progress.js.map +1 -0
- package/dist/catalog/components/radio-cards.d.ts +7 -0
- package/dist/catalog/components/radio-cards.d.ts.map +1 -0
- package/dist/catalog/components/radio-cards.js +8 -0
- package/dist/catalog/components/radio-cards.js.map +1 -0
- package/dist/catalog/components/radio-group.d.ts +6 -0
- package/dist/catalog/components/radio-group.d.ts.map +1 -0
- package/dist/catalog/components/radio-group.js +7 -0
- package/dist/catalog/components/radio-group.js.map +1 -0
- package/dist/catalog/components/scroll-area.d.ts +5 -0
- package/dist/catalog/components/scroll-area.d.ts.map +1 -0
- package/dist/catalog/components/scroll-area.js +6 -0
- package/dist/catalog/components/scroll-area.js.map +1 -0
- package/dist/catalog/components/segmented-control.d.ts +7 -0
- package/dist/catalog/components/segmented-control.d.ts.map +1 -0
- package/dist/catalog/components/segmented-control.js +8 -0
- package/dist/catalog/components/segmented-control.js.map +1 -0
- package/dist/catalog/components/select.d.ts +15 -0
- package/dist/catalog/components/select.d.ts.map +1 -0
- package/dist/catalog/components/select.js +16 -0
- package/dist/catalog/components/select.js.map +1 -0
- package/dist/catalog/components/separator.d.ts +4 -0
- package/dist/catalog/components/separator.d.ts.map +1 -0
- package/dist/catalog/components/separator.js +5 -0
- package/dist/catalog/components/separator.js.map +1 -0
- package/dist/catalog/components/skeleton.d.ts +8 -0
- package/dist/catalog/components/skeleton.d.ts.map +1 -0
- package/dist/catalog/components/skeleton.js +8 -0
- package/dist/catalog/components/skeleton.js.map +1 -0
- package/dist/catalog/components/slider.d.ts +7 -0
- package/dist/catalog/components/slider.d.ts.map +1 -0
- package/dist/catalog/components/slider.js +8 -0
- package/dist/catalog/components/slider.js.map +1 -0
- package/dist/catalog/components/spinner.d.ts +8 -0
- package/dist/catalog/components/spinner.d.ts.map +1 -0
- package/dist/catalog/components/spinner.js +8 -0
- package/dist/catalog/components/spinner.js.map +1 -0
- package/dist/catalog/components/switch.d.ts +7 -0
- package/dist/catalog/components/switch.d.ts.map +1 -0
- package/dist/catalog/components/switch.js +8 -0
- package/dist/catalog/components/switch.js.map +1 -0
- package/dist/catalog/components/tab-nav.d.ts +8 -0
- package/dist/catalog/components/tab-nav.d.ts.map +1 -0
- package/dist/catalog/components/tab-nav.js +9 -0
- package/dist/catalog/components/tab-nav.js.map +1 -0
- package/dist/catalog/components/table.d.ts +23 -0
- package/dist/catalog/components/table.d.ts.map +1 -0
- package/dist/catalog/components/table.js +15 -0
- package/dist/catalog/components/table.js.map +1 -0
- package/dist/catalog/components/tabs.d.ts +8 -0
- package/dist/catalog/components/tabs.d.ts.map +1 -0
- package/dist/catalog/components/tabs.js +9 -0
- package/dist/catalog/components/tabs.js.map +1 -0
- package/dist/catalog/components/text-area.d.ts +8 -0
- package/dist/catalog/components/text-area.d.ts.map +1 -0
- package/dist/catalog/components/text-area.js +9 -0
- package/dist/catalog/components/text-area.js.map +1 -0
- package/dist/catalog/components/text.d.ts +13 -0
- package/dist/catalog/components/text.d.ts.map +1 -0
- package/dist/catalog/components/text.js +9 -0
- package/dist/catalog/components/text.js.map +1 -0
- package/dist/catalog/components/toast.d.ts +7 -0
- package/dist/catalog/components/toast.d.ts.map +1 -0
- package/dist/catalog/components/toast.js +8 -0
- package/dist/catalog/components/toast.js.map +1 -0
- package/dist/catalog/components/toggle-group.d.ts +9 -0
- package/dist/catalog/components/toggle-group.d.ts.map +1 -0
- package/dist/catalog/components/toggle-group.js +10 -0
- package/dist/catalog/components/toggle-group.js.map +1 -0
- package/dist/catalog/components/toggle.d.ts +9 -0
- package/dist/catalog/components/toggle.d.ts.map +1 -0
- package/dist/catalog/components/toggle.js +10 -0
- package/dist/catalog/components/toggle.js.map +1 -0
- package/dist/catalog/components/toolbar.d.ts +5 -0
- package/dist/catalog/components/toolbar.d.ts.map +1 -0
- package/dist/catalog/components/toolbar.js +6 -0
- package/dist/catalog/components/toolbar.js.map +1 -0
- package/dist/catalog/css-inputs.d.ts +258 -0
- package/dist/catalog/css-inputs.d.ts.map +1 -0
- package/dist/catalog/css-inputs.js +232 -0
- package/dist/catalog/css-inputs.js.map +1 -0
- package/dist/catalog/index.d.ts +6 -0
- package/dist/catalog/index.d.ts.map +1 -0
- package/dist/catalog/index.js +4 -0
- package/dist/catalog/index.js.map +1 -0
- package/dist/catalog/parts.d.ts +40 -0
- package/dist/catalog/parts.d.ts.map +1 -0
- package/dist/catalog/parts.js +971 -0
- package/dist/catalog/parts.js.map +1 -0
- package/dist/catalog/prop-types-source.d.ts +11 -0
- package/dist/catalog/prop-types-source.d.ts.map +1 -0
- package/dist/catalog/prop-types-source.js +75 -0
- package/dist/catalog/prop-types-source.js.map +1 -0
- package/dist/catalog/prop-types.generated.d.ts +1155 -0
- package/dist/catalog/prop-types.generated.d.ts.map +1 -0
- package/dist/catalog/prop-types.generated.js +3 -0
- package/dist/catalog/prop-types.generated.js.map +1 -0
- package/dist/catalog/props.d.ts +87 -0
- package/dist/catalog/props.d.ts.map +1 -0
- package/dist/catalog/props.js +142 -0
- package/dist/catalog/props.js.map +1 -0
- package/dist/css.d.ts +38 -0
- package/dist/css.d.ts.map +1 -0
- package/dist/css.js +257 -0
- package/dist/css.js.map +1 -0
- package/dist/generated-css.d.ts +6 -0
- package/dist/generated-css.d.ts.map +1 -0
- package/dist/generated-css.js +19 -0
- package/dist/generated-css.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/model/compare.d.ts +40 -0
- package/dist/model/compare.d.ts.map +1 -0
- package/dist/model/compare.js +83 -0
- package/dist/model/compare.js.map +1 -0
- package/dist/model/dom.d.ts +60 -0
- package/dist/model/dom.d.ts.map +1 -0
- package/dist/model/dom.js +192 -0
- package/dist/model/dom.js.map +1 -0
- package/dist/model/ids.d.ts +8 -0
- package/dist/model/ids.d.ts.map +1 -0
- package/dist/model/ids.js +25 -0
- package/dist/model/ids.js.map +1 -0
- package/dist/model/index.d.ts +8 -0
- package/dist/model/index.d.ts.map +1 -0
- package/dist/model/index.js +8 -0
- package/dist/model/index.js.map +1 -0
- package/dist/model/parts.d.ts +18 -0
- package/dist/model/parts.d.ts.map +1 -0
- package/dist/model/parts.js +91 -0
- package/dist/model/parts.js.map +1 -0
- package/dist/model/styles.d.ts +59 -0
- package/dist/model/styles.d.ts.map +1 -0
- package/dist/model/styles.js +191 -0
- package/dist/model/styles.js.map +1 -0
- package/dist/model/types.d.ts +96 -0
- package/dist/model/types.d.ts.map +1 -0
- package/dist/model/types.js +2 -0
- package/dist/model/types.js.map +1 -0
- package/dist/model/validate.d.ts +54 -0
- package/dist/model/validate.d.ts.map +1 -0
- package/dist/model/validate.js +92 -0
- package/dist/model/validate.js.map +1 -0
- package/dist/themes/appearances.d.ts +98 -0
- package/dist/themes/appearances.d.ts.map +1 -0
- package/dist/themes/appearances.js +98 -0
- package/dist/themes/appearances.js.map +1 -0
- package/dist/themes/baseline.d.ts +9 -0
- package/dist/themes/baseline.d.ts.map +1 -0
- package/dist/themes/baseline.js +21 -0
- package/dist/themes/baseline.js.map +1 -0
- package/dist/themes/index.d.ts +15 -0
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/index.js +68 -0
- package/dist/themes/index.js.map +1 -0
- package/dist/themes/reference.d.ts +7 -0
- package/dist/themes/reference.d.ts.map +1 -0
- package/dist/themes/reference.js +9 -0
- package/dist/themes/reference.js.map +1 -0
- package/dist/themes/shadcn.d.ts +21 -0
- package/dist/themes/shadcn.d.ts.map +1 -0
- package/dist/themes/shadcn.js +189 -0
- package/dist/themes/shadcn.js.map +1 -0
- package/dist/themes/types.d.ts +58 -0
- package/dist/themes/types.d.ts.map +1 -0
- package/dist/themes/types.js +2 -0
- package/dist/themes/types.js.map +1 -0
- package/dist/tokens/at.d.ts +6 -0
- package/dist/tokens/at.d.ts.map +1 -0
- package/dist/tokens/at.js +12 -0
- package/dist/tokens/at.js.map +1 -0
- package/dist/tokens/base.d.ts +21 -0
- package/dist/tokens/base.d.ts.map +1 -0
- package/dist/tokens/base.js +43 -0
- package/dist/tokens/base.js.map +1 -0
- package/dist/tokens/color/bezier.d.ts +2 -0
- package/dist/tokens/color/bezier.d.ts.map +1 -0
- package/dist/tokens/color/bezier.js +79 -0
- package/dist/tokens/color/bezier.js.map +1 -0
- package/dist/tokens/color/index.d.ts +3 -0
- package/dist/tokens/color/index.d.ts.map +1 -0
- package/dist/tokens/color/index.js +3 -0
- package/dist/tokens/color/index.js.map +1 -0
- package/dist/tokens/color/radix-generator.d.ts +31 -0
- package/dist/tokens/color/radix-generator.d.ts.map +1 -0
- package/dist/tokens/color/radix-generator.js +311 -0
- package/dist/tokens/color/radix-generator.js.map +1 -0
- package/dist/tokens/component-inputs.d.ts +15 -0
- package/dist/tokens/component-inputs.d.ts.map +1 -0
- package/dist/tokens/component-inputs.js +119 -0
- package/dist/tokens/component-inputs.js.map +1 -0
- package/dist/tokens/dtcg.d.ts +59 -0
- package/dist/tokens/dtcg.d.ts.map +1 -0
- package/dist/tokens/dtcg.js +214 -0
- package/dist/tokens/dtcg.js.map +1 -0
- package/dist/tokens/files/components.tokens.json +184 -0
- package/dist/tokens/files/foundations.tokens.json +322 -0
- package/dist/tokens/files/palette.tokens.json +58 -0
- package/dist/tokens/files/text-styles.tokens.json +158 -0
- package/dist/tokens/files/themes/agent-native.dark.tokens.json +391 -0
- package/dist/tokens/files/themes/agent-native.light.tokens.json +391 -0
- package/dist/tokens/files/themes/analytics.dark.tokens.json +391 -0
- package/dist/tokens/files/themes/analytics.light.tokens.json +391 -0
- package/dist/tokens/files/themes/assets.dark.tokens.json +391 -0
- package/dist/tokens/files/themes/assets.light.tokens.json +391 -0
- package/dist/tokens/files/themes/brain.dark.tokens.json +391 -0
- package/dist/tokens/files/themes/brain.light.tokens.json +391 -0
- package/dist/tokens/files/themes/calendar.dark.tokens.json +391 -0
- package/dist/tokens/files/themes/calendar.light.tokens.json +391 -0
- package/dist/tokens/files/themes/chat.dark.tokens.json +391 -0
- package/dist/tokens/files/themes/chat.light.tokens.json +391 -0
- package/dist/tokens/files/themes/clips.dark.tokens.json +391 -0
- package/dist/tokens/files/themes/clips.light.tokens.json +391 -0
- package/dist/tokens/files/themes/content.dark.tokens.json +391 -0
- package/dist/tokens/files/themes/content.light.tokens.json +391 -0
- package/dist/tokens/files/themes/crm.dark.tokens.json +391 -0
- package/dist/tokens/files/themes/crm.light.tokens.json +391 -0
- package/dist/tokens/files/themes/design.dark.tokens.json +391 -0
- package/dist/tokens/files/themes/design.light.tokens.json +391 -0
- package/dist/tokens/files/themes/desktop.dark.tokens.json +391 -0
- package/dist/tokens/files/themes/desktop.light.tokens.json +391 -0
- package/dist/tokens/files/themes/dispatch.dark.tokens.json +391 -0
- package/dist/tokens/files/themes/dispatch.light.tokens.json +391 -0
- package/dist/tokens/files/themes/docs.dark.tokens.json +391 -0
- package/dist/tokens/files/themes/docs.light.tokens.json +391 -0
- package/dist/tokens/files/themes/factory.dark.tokens.json +391 -0
- package/dist/tokens/files/themes/factory.light.tokens.json +391 -0
- package/dist/tokens/files/themes/forms.dark.tokens.json +391 -0
- package/dist/tokens/files/themes/forms.light.tokens.json +391 -0
- package/dist/tokens/files/themes/mail.dark.tokens.json +391 -0
- package/dist/tokens/files/themes/mail.light.tokens.json +391 -0
- package/dist/tokens/files/themes/plan.dark.tokens.json +391 -0
- package/dist/tokens/files/themes/plan.light.tokens.json +391 -0
- package/dist/tokens/files/themes/slides.dark.tokens.json +391 -0
- package/dist/tokens/files/themes/slides.light.tokens.json +391 -0
- package/dist/tokens/files/themes/tasks.dark.tokens.json +391 -0
- package/dist/tokens/files/themes/tasks.light.tokens.json +391 -0
- package/dist/tokens/palette.d.ts +46 -0
- package/dist/tokens/palette.d.ts.map +1 -0
- package/dist/tokens/palette.js +223 -0
- package/dist/tokens/palette.js.map +1 -0
- package/dist/tokens/primitives.d.ts +52 -0
- package/dist/tokens/primitives.d.ts.map +1 -0
- package/dist/tokens/primitives.js +80 -0
- package/dist/tokens/primitives.js.map +1 -0
- package/dist/tokens/roles.d.ts +37 -0
- package/dist/tokens/roles.d.ts.map +1 -0
- package/dist/tokens/roles.js +208 -0
- package/dist/tokens/roles.js.map +1 -0
- package/dist/tokens/round-trip.d.ts +50 -0
- package/dist/tokens/round-trip.d.ts.map +1 -0
- package/dist/tokens/round-trip.js +226 -0
- package/dist/tokens/round-trip.js.map +1 -0
- package/dist/tokens/source.d.ts +111 -0
- package/dist/tokens/source.d.ts.map +1 -0
- package/dist/tokens/source.js +311 -0
- package/dist/tokens/source.js.map +1 -0
- package/package.json +21 -15
- package/src/catalog/components/alert-dialog.ts +1 -9
- package/src/catalog/components/alignment-picker.ts +16 -0
- package/src/catalog/components/autocomplete.ts +2 -2
- package/src/catalog/components/avatar.ts +0 -3
- package/src/catalog/components/badge.ts +0 -2
- package/src/catalog/components/blockquote.ts +1 -2
- package/src/catalog/components/button.ts +14 -2
- package/src/catalog/components/callout.ts +1 -11
- package/src/catalog/components/card.ts +1 -6
- package/src/catalog/components/checkbox-cards.ts +1 -7
- package/src/catalog/components/checkbox-group.ts +1 -7
- package/src/catalog/components/checkbox.ts +1 -7
- package/src/catalog/components/code.ts +0 -5
- package/src/catalog/components/color-swatch.ts +6 -0
- package/src/catalog/components/combobox.ts +2 -2
- package/src/catalog/components/context-menu.ts +1 -3
- package/src/catalog/components/data-list.ts +0 -1
- package/src/catalog/components/dialog.ts +1 -9
- package/src/catalog/components/font-picker.ts +11 -0
- package/src/catalog/components/grid-size-picker.ts +12 -0
- package/src/catalog/components/heading.ts +10 -1
- package/src/catalog/components/index.ts +4 -3
- package/src/catalog/components/input.ts +2 -2
- package/src/catalog/components/item.ts +1 -6
- package/src/catalog/components/kbd.ts +1 -5
- package/src/catalog/components/link.ts +1 -5
- package/src/catalog/components/menu.ts +1 -3
- package/src/catalog/components/menubar.ts +1 -3
- package/src/catalog/components/meter.ts +0 -6
- package/src/catalog/components/number-field.ts +8 -3
- package/src/catalog/components/otp-field.ts +1 -3
- package/src/catalog/components/popover.ts +1 -9
- package/src/catalog/components/preview-card.ts +1 -9
- package/src/catalog/components/progress.ts +0 -6
- package/src/catalog/components/radio-cards.ts +1 -7
- package/src/catalog/components/radio-group.ts +1 -7
- package/src/catalog/components/scroll-area.ts +0 -5
- package/src/catalog/components/segmented-control.ts +2 -2
- package/src/catalog/components/select.ts +3 -3
- package/src/catalog/components/separator.ts +0 -5
- package/src/catalog/components/slider.ts +0 -6
- package/src/catalog/components/spinner.ts +0 -7
- package/src/catalog/components/switch.ts +0 -6
- package/src/catalog/components/tab-nav.ts +0 -1
- package/src/catalog/components/table.ts +0 -5
- package/src/catalog/components/tabs.ts +0 -1
- package/src/catalog/components/text-area.ts +2 -2
- package/src/catalog/components/text.ts +5 -0
- package/src/catalog/components/toggle-group.ts +3 -3
- package/src/catalog/components/toggle.ts +2 -2
- package/src/catalog/components/toolbar.ts +2 -2
- package/src/catalog/css-inputs.ts +261 -0
- package/src/catalog/index.ts +1 -0
- package/src/catalog/parts.ts +292 -49
- package/src/catalog/prop-types-source.ts +1 -1
- package/src/catalog/prop-types.generated.ts +179 -277
- package/src/catalog/props.ts +29 -11
- package/src/css.ts +115 -31
- package/src/generated-css.ts +12 -8
- package/src/model/compare.ts +11 -11
- package/src/model/dom.ts +30 -30
- package/src/model/index.ts +1 -0
- package/src/model/parts.ts +114 -0
- package/src/model/styles.ts +28 -28
- package/src/model/types.ts +2 -2
- package/src/model/validate.ts +4 -13
- package/src/themes/index.ts +13 -9
- package/src/themes/shadcn.ts +1 -1
- package/src/tokens/component-inputs.ts +165 -0
- package/src/tokens/files/components.tokens.json +184 -0
- package/src/tokens/files/foundations.tokens.json +5 -1
- package/src/tokens/files/text-styles.tokens.json +158 -0
- package/src/tokens/files/themes/agent-native.dark.tokens.json +0 -14
- package/src/tokens/files/themes/agent-native.light.tokens.json +0 -14
- package/src/tokens/primitives.ts +28 -3
- package/src/tokens/roles.ts +6 -6
- package/src/tokens/round-trip.ts +46 -1
- package/src/tokens/source.ts +114 -2
- package/css/parts/em.css +0 -16
- package/css/parts/quote.css +0 -18
- package/css/parts/strong.css +0 -15
- package/src/catalog/components/em.ts +0 -7
- package/src/catalog/components/quote.ts +0 -7
- package/src/catalog/components/strong.ts +0 -7
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { COMPONENTS_FILE, importComponentToken } from "./component-inputs.js";
|
|
2
|
+
import { colorComponents, colorToken, componentsToHex, componentsToHslTriplet, EXTENSION, flattenTokens, TokenError, unflattenTokens, } from "./dtcg.js";
|
|
3
|
+
import { createPalette } from "./palette.js";
|
|
4
|
+
import { FOUNDATIONS_FILE, PALETTE_FILE, readTokenFiles, THEME_MODES, THEME_NAMES, themeFile, } from "./source.js";
|
|
5
|
+
const MODE_LABELS = { light: "Light", dark: "Dark" };
|
|
6
|
+
export const COLLECTIONS = [
|
|
7
|
+
{
|
|
8
|
+
folder: "Foundations",
|
|
9
|
+
modes: [{ mode: "Value", source: FOUNDATIONS_FILE }],
|
|
10
|
+
},
|
|
11
|
+
{ folder: "Palette", modes: [{ mode: "Value", source: PALETTE_FILE }] },
|
|
12
|
+
{ folder: "Components", modes: [{ mode: "Value", source: COMPONENTS_FILE }] },
|
|
13
|
+
...THEME_NAMES.map((name) => ({
|
|
14
|
+
folder: `Theme ${name}`,
|
|
15
|
+
modes: THEME_MODES.map((mode) => ({
|
|
16
|
+
mode: MODE_LABELS[mode],
|
|
17
|
+
source: themeFile(name, mode),
|
|
18
|
+
})),
|
|
19
|
+
})),
|
|
20
|
+
];
|
|
21
|
+
const SUFFIX = ".tokens.json";
|
|
22
|
+
/** The files to import into Figma, by path: `<collection>/<mode>.tokens.json`. */
|
|
23
|
+
export function exportForFigma(sources) {
|
|
24
|
+
const files = new Map();
|
|
25
|
+
for (const collection of COLLECTIONS) {
|
|
26
|
+
for (const { mode, source } of collection.modes) {
|
|
27
|
+
if (!(source in sources)) {
|
|
28
|
+
throw new TokenError(source, "(file)", "is missing");
|
|
29
|
+
}
|
|
30
|
+
files.set(`${collection.folder}/${mode}${SUFFIX}`, sources[source]);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return files;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The text styles for Figma, which its variable import cannot create: each
|
|
37
|
+
* style's name and the Foundations variable each property binds to.
|
|
38
|
+
*/
|
|
39
|
+
export function textStylesForFigma(styles) {
|
|
40
|
+
return styles.map((style) => ({
|
|
41
|
+
name: style.name,
|
|
42
|
+
description: style.description,
|
|
43
|
+
variables: {
|
|
44
|
+
fontFamily: `font/family/${style.family}`,
|
|
45
|
+
fontSize: `font/size/${style.step}`,
|
|
46
|
+
lineHeight: `font/line-height/${style.step}`,
|
|
47
|
+
letterSpacing: `font/letter-spacing/${style.step}`,
|
|
48
|
+
fontWeight: `font/weight/${style.weight}`,
|
|
49
|
+
},
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
/** Token files as the formatter writes them: two-space JSON, number arrays on one line. */
|
|
53
|
+
export function formatTokenFile(group) {
|
|
54
|
+
return `${JSON.stringify(group, null, 2).replace(/\[\s+([^[\]{}"]*?)\s+\]/g, (_match, items) => `[${items.split(/,\s*/).join(", ")}]`)}\n`;
|
|
55
|
+
}
|
|
56
|
+
const ALIAS = /^\{(.+)\}$/;
|
|
57
|
+
function importToken(file, tokenPath, current, incoming, source) {
|
|
58
|
+
if (typeof incoming !== "object" || incoming === null) {
|
|
59
|
+
throw new TokenError(file, tokenPath, "is not a token");
|
|
60
|
+
}
|
|
61
|
+
const token = incoming;
|
|
62
|
+
if (token.$type !== current.$type) {
|
|
63
|
+
throw new TokenError(file, tokenPath, `is a ${String(token.$type)}, expected a ${current.$type}`);
|
|
64
|
+
}
|
|
65
|
+
if (source === COMPONENTS_FILE)
|
|
66
|
+
return importComponentToken(file, tokenPath, current, token);
|
|
67
|
+
const value = token.$value;
|
|
68
|
+
if (typeof value === "string" && ALIAS.test(value)) {
|
|
69
|
+
throw new TokenError(file, tokenPath, `is an alias of ${value}; give it its own value`);
|
|
70
|
+
}
|
|
71
|
+
const extensions = { ...current.$extensions };
|
|
72
|
+
for (const [key, extension] of Object.entries(token.$extensions ?? {})) {
|
|
73
|
+
if (key !== EXTENSION)
|
|
74
|
+
extensions[key] = extension;
|
|
75
|
+
}
|
|
76
|
+
const description = typeof token.$description === "string" && token.$description !== ""
|
|
77
|
+
? { $description: token.$description }
|
|
78
|
+
: {};
|
|
79
|
+
if (current.$type === "color") {
|
|
80
|
+
const components = colorComponents(value, file, tokenPath);
|
|
81
|
+
const before = colorComponents(current.$value, file, tokenPath);
|
|
82
|
+
if (componentsToHex(components) === componentsToHex(before)) {
|
|
83
|
+
return { ...current, ...description, $extensions: extensions };
|
|
84
|
+
}
|
|
85
|
+
const changed = colorToken(components, componentsToHslTriplet(components));
|
|
86
|
+
return {
|
|
87
|
+
...changed,
|
|
88
|
+
...description,
|
|
89
|
+
$extensions: { ...extensions, ...changed.$extensions },
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
if (current.$type === "number") {
|
|
93
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
94
|
+
throw new TokenError(file, tokenPath, "is not a finite number");
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
else if (typeof value !== "string" || value.trim() === "") {
|
|
98
|
+
throw new TokenError(file, tokenPath, "is not a non-empty string");
|
|
99
|
+
}
|
|
100
|
+
return { ...current, ...description, $value: value, $extensions: extensions };
|
|
101
|
+
}
|
|
102
|
+
function withoutEmptyExtensions(token) {
|
|
103
|
+
if (!token.$extensions || Object.keys(token.$extensions).length > 0) {
|
|
104
|
+
return token;
|
|
105
|
+
}
|
|
106
|
+
const trimmed = { $type: token.$type, $value: token.$value };
|
|
107
|
+
if (token.$description !== undefined) {
|
|
108
|
+
trimmed.$description = token.$description;
|
|
109
|
+
}
|
|
110
|
+
return trimmed;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* The source files for a Figma export, keyed by path under `files/`. Takes
|
|
114
|
+
* any subset of collections, but every mode of one it takes, and refuses an
|
|
115
|
+
* unknown file, a missing or extra token, a changed type, or a value code
|
|
116
|
+
* cannot read. Nothing is returned unless every file passes.
|
|
117
|
+
*/
|
|
118
|
+
export function importFromFigma(exported, sources) {
|
|
119
|
+
const problems = [];
|
|
120
|
+
const byFolder = new Map();
|
|
121
|
+
for (const [path, group] of exported) {
|
|
122
|
+
const [folder, fileName, ...nested] = path.split("/");
|
|
123
|
+
const collection = folder === undefined
|
|
124
|
+
? undefined
|
|
125
|
+
: COLLECTIONS.find((candidate) => candidate.folder.toLowerCase() === folder.toLowerCase());
|
|
126
|
+
if (!collection ||
|
|
127
|
+
fileName === undefined ||
|
|
128
|
+
nested.length > 0 ||
|
|
129
|
+
!fileName.endsWith(SUFFIX)) {
|
|
130
|
+
problems.push(`${path}: not a known collection file (<collection>/<mode>${SUFFIX})`);
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
const modes = byFolder.get(collection.folder) ?? new Map();
|
|
134
|
+
modes.set(fileName.slice(0, -SUFFIX.length).toLowerCase(), group);
|
|
135
|
+
byFolder.set(collection.folder, modes);
|
|
136
|
+
}
|
|
137
|
+
const files = new Map();
|
|
138
|
+
const changed = new Map();
|
|
139
|
+
for (const collection of COLLECTIONS) {
|
|
140
|
+
const modes = byFolder.get(collection.folder);
|
|
141
|
+
if (!modes)
|
|
142
|
+
continue;
|
|
143
|
+
const single = collection.modes.length === 1;
|
|
144
|
+
if (single && modes.size !== 1) {
|
|
145
|
+
problems.push(`${collection.folder}: has ${modes.size} modes, expected 1`);
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
for (const name of modes.keys()) {
|
|
149
|
+
if (!single &&
|
|
150
|
+
!collection.modes.some(({ mode }) => mode.toLowerCase() === name)) {
|
|
151
|
+
problems.push(`${collection.folder}/${name}${SUFFIX}: not a mode of this collection (${collection.modes.map(({ mode }) => mode).join(", ")})`);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
for (const { mode, source } of collection.modes) {
|
|
155
|
+
const group = single
|
|
156
|
+
? [...modes.values()][0]
|
|
157
|
+
: modes.get(mode.toLowerCase());
|
|
158
|
+
const label = `${collection.folder}/${mode}${SUFFIX}`;
|
|
159
|
+
if (group === undefined) {
|
|
160
|
+
problems.push(`${label}: is missing; export every mode of the collection`);
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
try {
|
|
164
|
+
const current = flattenTokens(sources[source], source);
|
|
165
|
+
const incoming = flattenTokens(group, label);
|
|
166
|
+
const next = new Map();
|
|
167
|
+
const changes = [];
|
|
168
|
+
for (const tokenPath of incoming.keys()) {
|
|
169
|
+
if (!current.has(tokenPath)) {
|
|
170
|
+
problems.push(`${label}: ${tokenPath} is not a token code reads`);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
for (const [tokenPath, token] of current) {
|
|
174
|
+
if (!incoming.has(tokenPath)) {
|
|
175
|
+
problems.push(`${label}: ${tokenPath} is missing`);
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
try {
|
|
179
|
+
const imported = withoutEmptyExtensions(importToken(label, tokenPath, token, incoming.get(tokenPath), source));
|
|
180
|
+
if (JSON.stringify(imported.$value) !== JSON.stringify(token.$value)) {
|
|
181
|
+
changes.push(tokenPath);
|
|
182
|
+
}
|
|
183
|
+
next.set(tokenPath, imported);
|
|
184
|
+
}
|
|
185
|
+
catch (error) {
|
|
186
|
+
if (!(error instanceof TokenError))
|
|
187
|
+
throw error;
|
|
188
|
+
problems.push(error.message);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
files.set(source, unflattenTokens(next));
|
|
192
|
+
if (changes.length > 0)
|
|
193
|
+
changed.set(source, changes);
|
|
194
|
+
}
|
|
195
|
+
catch (error) {
|
|
196
|
+
if (!(error instanceof TokenError))
|
|
197
|
+
throw error;
|
|
198
|
+
problems.push(error.message);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
if (problems.length === 0) {
|
|
203
|
+
const merged = { ...sources };
|
|
204
|
+
for (const [path, group] of files)
|
|
205
|
+
merged[path] = group;
|
|
206
|
+
try {
|
|
207
|
+
const read = readTokenFiles(merged);
|
|
208
|
+
createPalette(read.palette);
|
|
209
|
+
}
|
|
210
|
+
catch (error) {
|
|
211
|
+
problems.push(error instanceof Error ? error.message : String(error));
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
if (problems.length > 0)
|
|
215
|
+
throw new TokenImportError(problems);
|
|
216
|
+
return { files, changed };
|
|
217
|
+
}
|
|
218
|
+
export class TokenImportError extends Error {
|
|
219
|
+
problems;
|
|
220
|
+
constructor(problems) {
|
|
221
|
+
super(`The export was not imported; fix these and export again:\n${problems.map((problem) => ` ${problem}`).join("\n")}`);
|
|
222
|
+
this.problems = problems;
|
|
223
|
+
this.name = "TokenImportError";
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=round-trip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"round-trip.js","sourceRoot":"","sources":["../../src/tokens/round-trip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EACL,eAAe,EACf,UAAU,EACV,eAAe,EACf,sBAAsB,EAEtB,SAAS,EACT,aAAa,EACb,UAAU,EACV,eAAe,GAChB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,gBAAgB,EAChB,YAAY,EAEZ,cAAc,EACd,WAAW,EACX,WAAW,EACX,SAAS,GAEV,MAAM,aAAa,CAAC;AAQrB,MAAM,WAAW,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAW,CAAC;AAE9D,MAAM,CAAC,MAAM,WAAW,GAA0B;IAChD;QACE,MAAM,EAAE,aAAa;QACrB,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC;KACrD;IACD,EAAE,MAAM,EAAE,SAAS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C;QACxE,CAAC;IACH,CAAC;IACD,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,IAAI,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC9D,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAC5B,CAAC;AAED,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACpB,QAAQ;IAA7B,YAAqB,QAA2B;QAC9C,KAAK,CACH,6DAA6D,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACpH,CAAC;wBAHiB,QAAQ;QAI3B,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import textStylesFile from "./files/text-styles.tokens.json";
|
|
2
|
+
/** Every token file by its path under `files/`, as parsed JSON. */
|
|
3
|
+
export type TokenFiles = Readonly<Record<string, unknown>>;
|
|
4
|
+
export declare const TOKEN_FILES: TokenFiles;
|
|
5
|
+
export declare const FOUNDATIONS_FILE = "foundations.tokens.json";
|
|
6
|
+
export declare const PALETTE_FILE = "palette.tokens.json";
|
|
7
|
+
export declare const TEXT_STYLES_FILE = "text-styles.tokens.json";
|
|
8
|
+
export declare const THEME_NAMES: readonly string[];
|
|
9
|
+
export type ThemeMode = "light" | "dark";
|
|
10
|
+
export declare const THEME_MODES: readonly ThemeMode[];
|
|
11
|
+
export declare const themeFile: (name: string, mode: ThemeMode) => string;
|
|
12
|
+
declare const FONT_WEIGHT_NAMES: readonly ["light", "regular", "medium", "strong", "semibold", "bold"];
|
|
13
|
+
declare const FONT_FAMILY_NAMES: readonly ["sans", "heading", "mono", "wordmark"];
|
|
14
|
+
type TextStyleGroup = (typeof textStylesFile)["text-style"];
|
|
15
|
+
/** A text style's name, from the keys of `text-styles.tokens.json`. */
|
|
16
|
+
export type TextStyleName = keyof TextStyleGroup;
|
|
17
|
+
/** Each text style's name, in the order the file lists them. */
|
|
18
|
+
export declare const TEXT_STYLE_NAMES: readonly TextStyleName[];
|
|
19
|
+
export type FontWeightName = (typeof FONT_WEIGHT_NAMES)[number];
|
|
20
|
+
export type FontFamilyName = (typeof FONT_FAMILY_NAMES)[number];
|
|
21
|
+
/**
|
|
22
|
+
* A named text style: one step of the type scale (its size, line height and
|
|
23
|
+
* letter spacing together), a weight and a family. It is what a Figma text
|
|
24
|
+
* style and a `type-*` utility apply.
|
|
25
|
+
*/
|
|
26
|
+
export interface TextStyle {
|
|
27
|
+
readonly name: TextStyleName;
|
|
28
|
+
readonly description: string;
|
|
29
|
+
readonly step: number;
|
|
30
|
+
readonly weight: FontWeightName;
|
|
31
|
+
readonly family: FontFamilyName;
|
|
32
|
+
}
|
|
33
|
+
/** The type scale starts at step 0, the 10px step below the 12px UI base. */
|
|
34
|
+
export declare const TYPE_FIRST_STEP = 0;
|
|
35
|
+
/** One step of the type scale, as `--font-size-N` and its pairs set it. */
|
|
36
|
+
export interface TypeStep {
|
|
37
|
+
readonly step: number;
|
|
38
|
+
readonly size: number;
|
|
39
|
+
readonly lineHeight: number;
|
|
40
|
+
readonly letterSpacing: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Everything code reads from a set of token files. Throws a `TokenError` on
|
|
44
|
+
* the first file that is missing a token or holds one of the wrong shape.
|
|
45
|
+
*/
|
|
46
|
+
export declare function readTokenFiles(files: TokenFiles): {
|
|
47
|
+
foundations: {
|
|
48
|
+
controlHeights: number[];
|
|
49
|
+
controlIconSizes: number[];
|
|
50
|
+
sizeRamp: number[];
|
|
51
|
+
radiusSteps: number[];
|
|
52
|
+
typeRamp: TypeStep[];
|
|
53
|
+
fontWeights: Record<(typeof FONT_WEIGHT_NAMES)[number], number>;
|
|
54
|
+
fontFamilies: Record<(typeof FONT_FAMILY_NAMES)[number], string>;
|
|
55
|
+
};
|
|
56
|
+
switchCssInputs: Record<string, {
|
|
57
|
+
fallback: string;
|
|
58
|
+
description: string;
|
|
59
|
+
}>;
|
|
60
|
+
textStyles: TextStyle[];
|
|
61
|
+
palette: {
|
|
62
|
+
brand: string;
|
|
63
|
+
gray: string;
|
|
64
|
+
background: {
|
|
65
|
+
light: string;
|
|
66
|
+
dark: string;
|
|
67
|
+
};
|
|
68
|
+
status: {
|
|
69
|
+
danger: string;
|
|
70
|
+
warning: string;
|
|
71
|
+
success: string;
|
|
72
|
+
info: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
themes: Record<string, Record<ThemeMode, Record<string, string>>>;
|
|
76
|
+
};
|
|
77
|
+
export declare const FOUNDATIONS: {
|
|
78
|
+
controlHeights: number[];
|
|
79
|
+
controlIconSizes: number[];
|
|
80
|
+
sizeRamp: number[];
|
|
81
|
+
radiusSteps: number[];
|
|
82
|
+
typeRamp: TypeStep[];
|
|
83
|
+
fontWeights: Record<(typeof FONT_WEIGHT_NAMES)[number], number>;
|
|
84
|
+
fontFamilies: Record<(typeof FONT_FAMILY_NAMES)[number], string>;
|
|
85
|
+
};
|
|
86
|
+
export declare const TEXT_STYLE_DEFINITIONS: TextStyle[];
|
|
87
|
+
export declare const PALETTE_DEFAULTS: {
|
|
88
|
+
brand: string;
|
|
89
|
+
gray: string;
|
|
90
|
+
background: {
|
|
91
|
+
light: string;
|
|
92
|
+
dark: string;
|
|
93
|
+
};
|
|
94
|
+
status: {
|
|
95
|
+
danger: string;
|
|
96
|
+
warning: string;
|
|
97
|
+
success: string;
|
|
98
|
+
info: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* A theme's values from its light and dark token files. The appearance it
|
|
103
|
+
* renders with no class is `base`; the other carries only what differs.
|
|
104
|
+
*/
|
|
105
|
+
export declare function tokenThemeValues(name: string, defaultAppearance: ThemeMode): {
|
|
106
|
+
base: Record<string, string>;
|
|
107
|
+
dark?: Record<string, string>;
|
|
108
|
+
light?: Record<string, string>;
|
|
109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