@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,119 @@
|
|
|
1
|
+
import { componentsToHex, EXTENSION, flattenTokens, hexToComponents, TokenError, } from "./dtcg.js";
|
|
2
|
+
import componentFile from "./files/components.tokens.json" with { type: "json" };
|
|
3
|
+
export const COMPONENTS_FILE = "components.tokens.json";
|
|
4
|
+
function cssColor(value, file, name) {
|
|
5
|
+
let channels;
|
|
6
|
+
let alpha;
|
|
7
|
+
if (typeof value === "string" && /^#[\da-f]{6}([\da-f]{2})?$/i.test(value)) {
|
|
8
|
+
channels = hexToComponents(value.slice(0, 7));
|
|
9
|
+
alpha = value.length === 9 ? parseInt(value.slice(7), 16) / 255 : 1;
|
|
10
|
+
}
|
|
11
|
+
else if (value &&
|
|
12
|
+
typeof value === "object" &&
|
|
13
|
+
"colorSpace" in value &&
|
|
14
|
+
value.colorSpace === "srgb" &&
|
|
15
|
+
"components" in value) {
|
|
16
|
+
channels = value.components;
|
|
17
|
+
alpha = "alpha" in value ? value.alpha : 1;
|
|
18
|
+
}
|
|
19
|
+
function channel(n) {
|
|
20
|
+
return typeof n === "number" && n >= 0 && n <= 1;
|
|
21
|
+
}
|
|
22
|
+
if (!Array.isArray(channels) ||
|
|
23
|
+
channels.length !== 3 ||
|
|
24
|
+
!channels.every(channel) ||
|
|
25
|
+
!channel(alpha)) {
|
|
26
|
+
throw new TokenError(file, name, "expected an sRGB color with components and alpha in the range 0–1");
|
|
27
|
+
}
|
|
28
|
+
const components = channels;
|
|
29
|
+
return {
|
|
30
|
+
colorSpace: "srgb",
|
|
31
|
+
components,
|
|
32
|
+
alpha,
|
|
33
|
+
hex: componentsToHex(components),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function rgba(value) {
|
|
37
|
+
const channels = [...value.components, value.alpha];
|
|
38
|
+
if (channels.every((n) => Math.abs(n - Math.round(n * 255) / 255) < 0.00000051)) {
|
|
39
|
+
return (value.hex +
|
|
40
|
+
(value.alpha === 1
|
|
41
|
+
? ""
|
|
42
|
+
: Math.round(value.alpha * 255)
|
|
43
|
+
.toString(16)
|
|
44
|
+
.padStart(2, "0")));
|
|
45
|
+
}
|
|
46
|
+
return "color(srgb " + value.components.join(" ") + " / " + value.alpha + ")";
|
|
47
|
+
}
|
|
48
|
+
function cssValue(token, file, name) {
|
|
49
|
+
const value = token.$value;
|
|
50
|
+
switch (token.$type) {
|
|
51
|
+
case "color":
|
|
52
|
+
return rgba(cssColor(value, file, name));
|
|
53
|
+
case "number":
|
|
54
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0)
|
|
55
|
+
throw new TokenError(file, name, "expected a nonnegative size in CSS pixels");
|
|
56
|
+
return value + "px";
|
|
57
|
+
case "string":
|
|
58
|
+
if (typeof value !== "string" ||
|
|
59
|
+
!/^(?:none|var\(--shadow-[1-6]\))$/.test(value))
|
|
60
|
+
throw new TokenError(file, name, "expected none or a shadow preset from var(--shadow-1) through var(--shadow-6)");
|
|
61
|
+
return value;
|
|
62
|
+
default:
|
|
63
|
+
throw new TokenError(file, name, "unsupported component token type");
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export function importComponentToken(file, name, current, incoming) {
|
|
67
|
+
const value = incoming.$type === "color"
|
|
68
|
+
? cssColor(incoming.$value, file, name)
|
|
69
|
+
: incoming.$value;
|
|
70
|
+
const changed = cssValue({ ...incoming, $value: value }, file, name) !==
|
|
71
|
+
cssValue(current, file, name);
|
|
72
|
+
const extensions = { ...current.$extensions };
|
|
73
|
+
if (changed)
|
|
74
|
+
delete extensions[EXTENSION];
|
|
75
|
+
for (const [key, extension] of Object.entries(incoming.$extensions ?? {})) {
|
|
76
|
+
if (key !== EXTENSION)
|
|
77
|
+
extensions[key] = extension;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
...current,
|
|
81
|
+
$value: changed ? value : current.$value,
|
|
82
|
+
...(typeof incoming.$description === "string" &&
|
|
83
|
+
incoming.$description.trim()
|
|
84
|
+
? { $description: incoming.$description }
|
|
85
|
+
: {}),
|
|
86
|
+
$extensions: extensions,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export function readSwitchComponent(group) {
|
|
90
|
+
const inputs = {};
|
|
91
|
+
const colorLiterals = {};
|
|
92
|
+
for (const [name, token] of flattenTokens(group, COMPONENTS_FILE)) {
|
|
93
|
+
const value = cssValue(token, COMPONENTS_FILE, name);
|
|
94
|
+
const binding = token.$extensions?.[EXTENSION];
|
|
95
|
+
const property = "--" + name.replaceAll(".", "-");
|
|
96
|
+
let fallback = value;
|
|
97
|
+
if (binding !== undefined) {
|
|
98
|
+
if (!binding ||
|
|
99
|
+
typeof binding !== "object" ||
|
|
100
|
+
!("cssVariable" in binding) ||
|
|
101
|
+
typeof binding.cssVariable !== "string" ||
|
|
102
|
+
!/^--[a-z][a-z0-9-]*$/.test(binding.cssVariable))
|
|
103
|
+
throw new TokenError(COMPONENTS_FILE, name, "invalid CSS variable binding");
|
|
104
|
+
fallback = "var(" + binding.cssVariable + ")";
|
|
105
|
+
}
|
|
106
|
+
else if (token.$type === "color") {
|
|
107
|
+
const literalName = "--component" + property.slice(1);
|
|
108
|
+
colorLiterals[literalName] = value;
|
|
109
|
+
fallback = "var(" + literalName + ")";
|
|
110
|
+
}
|
|
111
|
+
inputs[property] = {
|
|
112
|
+
fallback,
|
|
113
|
+
description: token.$description ?? "",
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
return { inputs, colorLiterals };
|
|
117
|
+
}
|
|
118
|
+
export const { inputs: switchCssInputs, colorLiterals: switchColorLiterals } = readSwitchComponent(componentFile);
|
|
119
|
+
//# sourceMappingURL=component-inputs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-inputs.js","sourceRoot":"","sources":["../../src/tokens/component-inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,SAAS,EACT,aAAa,EACb,eAAe,EACf,UAAU,GAGX,MAAM,WAAW,CA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AAU,CAClB,eAAe,EACf,IAAI,EACJ,8BAA8B,CAC/B,CAAC;YACJ,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,GAAG,CAAC;QAChD,CAAC;aAAM,IAAI,KAAK,CAAC,KAAK,KAAK,OAAO,EAAE,CAAC;YACnC,MAAM,WAAW,GAAG,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACtD,aAAa,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;YACnC,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,GAAG,CAAC;QACxC,CAAC;QACD,MAAM,CAAC,QAAQ,CAAC,GAAG;YACjB,QAAQ;YACR,WAAW,EAAE,KAAK,CAAC,YAAY,IAAI,EAAE;SACtC,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC;AACnC,CAAC;AAED,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,aAAa,EAAE,mBAAmB,EAAE,GAC1E,mBAAmB,CAAC,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/** Our extension: the exact HSL text a color came from, so it round-trips without drift. */
|
|
2
|
+
export declare const EXTENSION = "com.agent-native";
|
|
3
|
+
export interface DtcgColor {
|
|
4
|
+
colorSpace: "srgb";
|
|
5
|
+
components: [number, number, number];
|
|
6
|
+
alpha: number;
|
|
7
|
+
hex: string;
|
|
8
|
+
}
|
|
9
|
+
export type DtcgType = "color" | "number" | "string";
|
|
10
|
+
export interface DtcgToken {
|
|
11
|
+
$type: DtcgType;
|
|
12
|
+
$value: DtcgColor | number | string;
|
|
13
|
+
$description?: string;
|
|
14
|
+
$extensions?: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
export interface DtcgGroup {
|
|
17
|
+
[name: string]: DtcgToken | DtcgGroup;
|
|
18
|
+
}
|
|
19
|
+
export declare class TokenError extends Error {
|
|
20
|
+
readonly file: string;
|
|
21
|
+
readonly tokenPath: string;
|
|
22
|
+
constructor(file: string, tokenPath: string, problem: string);
|
|
23
|
+
}
|
|
24
|
+
/** Every token in a file by its dotted path (`font.size.1`). */
|
|
25
|
+
export declare function flattenTokens(group: unknown, file: string, prefix?: string): Map<string, DtcgToken>;
|
|
26
|
+
/** A token group from tokens by dotted path: the inverse of `flattenTokens`. */
|
|
27
|
+
export declare function unflattenTokens(tokens: ReadonlyMap<string, DtcgToken>): DtcgGroup;
|
|
28
|
+
/** `#rrggbb` from sRGB components in 0..1. */
|
|
29
|
+
export declare function componentsToHex(components: readonly number[]): string;
|
|
30
|
+
/** sRGB components in 0..1 from `#rrggbb`. */
|
|
31
|
+
export declare function hexToComponents(hex: string): [number, number, number];
|
|
32
|
+
/** The color token for a shadcn-style `H S% L%` triplet, keeping the text exactly. */
|
|
33
|
+
export declare function hslColorToken(triplet: string): DtcgToken;
|
|
34
|
+
export declare function colorToken(components: readonly number[], hsl?: string): DtcgToken;
|
|
35
|
+
/** `H S% L%` for sRGB components, at the precision a hand-written triplet uses. */
|
|
36
|
+
export declare function componentsToHslTriplet(components: readonly number[]): string;
|
|
37
|
+
/**
|
|
38
|
+
* The sRGB components of a color value: our object form, or a bare hex
|
|
39
|
+
* string, which some tools write instead.
|
|
40
|
+
*/
|
|
41
|
+
export declare function colorComponents(value: unknown, file: string, tokenPath: string): [number, number, number];
|
|
42
|
+
/** Reads typed values from one file's tokens, throwing on anything missing or mistyped. */
|
|
43
|
+
export declare class TokenReader {
|
|
44
|
+
readonly file: string;
|
|
45
|
+
private readonly tokens;
|
|
46
|
+
constructor(file: string, group: unknown);
|
|
47
|
+
paths(): string[];
|
|
48
|
+
token(tokenPath: string, type: DtcgType): DtcgToken;
|
|
49
|
+
number(tokenPath: string): number;
|
|
50
|
+
string(tokenPath: string): string;
|
|
51
|
+
/** A color as `#rrggbb`. */
|
|
52
|
+
hex(tokenPath: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* A color as an `H S% L%` triplet: the exact text it was written as, when
|
|
55
|
+
* the recorded text still describes the same color, else derived from it.
|
|
56
|
+
*/
|
|
57
|
+
hslTriplet(tokenPath: string): string;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=dtcg.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dtcg.d.ts","sourceRoot":"","sources":["../../src/tokens/dtcg.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,eAAO,MAAM,SAAS,qBAAqB,CAAC;AAE5C,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAErD,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,QAAQ,CAAC;IAChB,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,SAAS;IACxB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;CACvC;AAED,qBAAa,UAAW,SAAQ,KAAK;IAEjC,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM;IAF5B,YACW,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EAC1B,OAAO,EAAE,MAAM,EAIhB;CACF;AAMD,gEAAgE;AAChE,wBAAgB,aAAa,CAC3B,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,MAAM,EACZ,MAAM,SAAK,GACV,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAg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;OAGG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAapC;CACF"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
/** Our extension: the exact HSL text a color came from, so it round-trips without drift. */
|
|
2
|
+
export const EXTENSION = "com.agent-native";
|
|
3
|
+
export class TokenError extends Error {
|
|
4
|
+
file;
|
|
5
|
+
tokenPath;
|
|
6
|
+
constructor(file, tokenPath, problem) {
|
|
7
|
+
super(`${file}: ${tokenPath} ${problem}`);
|
|
8
|
+
this.file = file;
|
|
9
|
+
this.tokenPath = tokenPath;
|
|
10
|
+
this.name = "TokenError";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function isToken(node) {
|
|
14
|
+
return typeof node === "object" && node !== null && "$value" in node;
|
|
15
|
+
}
|
|
16
|
+
/** Every token in a file by its dotted path (`font.size.1`). */
|
|
17
|
+
export function flattenTokens(group, file, prefix = "") {
|
|
18
|
+
const tokens = new Map();
|
|
19
|
+
if (typeof group !== "object" || group === null || Array.isArray(group)) {
|
|
20
|
+
throw new TokenError(file, prefix || "(root)", "is not a token group");
|
|
21
|
+
}
|
|
22
|
+
for (const [name, node] of Object.entries(group)) {
|
|
23
|
+
if (name.startsWith("$"))
|
|
24
|
+
continue;
|
|
25
|
+
const tokenPath = prefix ? `${prefix}.${name}` : name;
|
|
26
|
+
if (isToken(node))
|
|
27
|
+
tokens.set(tokenPath, node);
|
|
28
|
+
else {
|
|
29
|
+
for (const [key, token] of flattenTokens(node, file, tokenPath)) {
|
|
30
|
+
tokens.set(key, token);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return tokens;
|
|
35
|
+
}
|
|
36
|
+
/** A token group from tokens by dotted path: the inverse of `flattenTokens`. */
|
|
37
|
+
export function unflattenTokens(tokens) {
|
|
38
|
+
const root = {};
|
|
39
|
+
for (const [tokenPath, token] of tokens) {
|
|
40
|
+
const names = tokenPath.split(".");
|
|
41
|
+
let group = root;
|
|
42
|
+
for (const name of names.slice(0, -1)) {
|
|
43
|
+
const next = group[name];
|
|
44
|
+
if (next === undefined) {
|
|
45
|
+
const created = {};
|
|
46
|
+
group[name] = created;
|
|
47
|
+
group = created;
|
|
48
|
+
}
|
|
49
|
+
else if (isToken(next)) {
|
|
50
|
+
throw new Error(`${tokenPath} nests under the token ${name}`);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
group = next;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
group[names.at(-1) ?? tokenPath] = token;
|
|
57
|
+
}
|
|
58
|
+
return root;
|
|
59
|
+
}
|
|
60
|
+
const HEX = /^#[0-9a-f]{6}$/i;
|
|
61
|
+
/** `#rrggbb` from sRGB components in 0..1. */
|
|
62
|
+
export function componentsToHex(components) {
|
|
63
|
+
return `#${components
|
|
64
|
+
.map((value) => Math.round(Math.min(1, Math.max(0, value)) * 255)
|
|
65
|
+
.toString(16)
|
|
66
|
+
.padStart(2, "0"))
|
|
67
|
+
.join("")}`;
|
|
68
|
+
}
|
|
69
|
+
/** sRGB components in 0..1 from `#rrggbb`. */
|
|
70
|
+
export function hexToComponents(hex) {
|
|
71
|
+
if (!HEX.test(hex))
|
|
72
|
+
throw new Error(`Not a #rrggbb color: ${hex}`);
|
|
73
|
+
const value = Number.parseInt(hex.slice(1), 16);
|
|
74
|
+
return [(value >> 16) / 255, ((value >> 8) & 255) / 255, (value & 255) / 255];
|
|
75
|
+
}
|
|
76
|
+
function hslToComponents(hue, saturation, lightness) {
|
|
77
|
+
const s = saturation / 100;
|
|
78
|
+
const l = lightness / 100;
|
|
79
|
+
const k = (n) => (n + hue / 30) % 12;
|
|
80
|
+
const a = s * Math.min(l, 1 - l);
|
|
81
|
+
const channel = (n) => l - a * Math.max(-1, Math.min(k(n) - 3, Math.min(9 - k(n), 1)));
|
|
82
|
+
return [channel(0), channel(8), channel(4)];
|
|
83
|
+
}
|
|
84
|
+
const HSL_TRIPLET = /^(-?[\d.]+)\s+([\d.]+)%\s+([\d.]+)%$/;
|
|
85
|
+
/** The color token for a shadcn-style `H S% L%` triplet, keeping the text exactly. */
|
|
86
|
+
export function hslColorToken(triplet) {
|
|
87
|
+
const match = HSL_TRIPLET.exec(triplet);
|
|
88
|
+
if (!match)
|
|
89
|
+
throw new Error(`Not an "H S% L%" triplet: ${triplet}`);
|
|
90
|
+
const components = hslToComponents(Number(match[1]), Number(match[2]), Number(match[3]));
|
|
91
|
+
return colorToken(components, triplet);
|
|
92
|
+
}
|
|
93
|
+
const round6 = (value) => Math.round(value * 1e6) / 1e6;
|
|
94
|
+
export function colorToken(components, hsl) {
|
|
95
|
+
const [r = 0, g = 0, b = 0] = components;
|
|
96
|
+
return {
|
|
97
|
+
$type: "color",
|
|
98
|
+
$value: {
|
|
99
|
+
colorSpace: "srgb",
|
|
100
|
+
components: [round6(r), round6(g), round6(b)],
|
|
101
|
+
alpha: 1,
|
|
102
|
+
hex: componentsToHex([r, g, b]),
|
|
103
|
+
},
|
|
104
|
+
...(hsl === undefined ? {} : { $extensions: { [EXTENSION]: { hsl } } }),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
/** `H S% L%` for sRGB components, at the precision a hand-written triplet uses. */
|
|
108
|
+
export function componentsToHslTriplet(components) {
|
|
109
|
+
const [r = 0, g = 0, b = 0] = components;
|
|
110
|
+
const max = Math.max(r, g, b);
|
|
111
|
+
const min = Math.min(r, g, b);
|
|
112
|
+
const lightness = (max + min) / 2;
|
|
113
|
+
let hue = 0;
|
|
114
|
+
let saturation = 0;
|
|
115
|
+
if (max !== min) {
|
|
116
|
+
const delta = max - min;
|
|
117
|
+
saturation =
|
|
118
|
+
lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);
|
|
119
|
+
hue =
|
|
120
|
+
max === r
|
|
121
|
+
? (g - b) / delta + (g < b ? 6 : 0)
|
|
122
|
+
: max === g
|
|
123
|
+
? (b - r) / delta + 2
|
|
124
|
+
: (r - g) / delta + 4;
|
|
125
|
+
hue *= 60;
|
|
126
|
+
}
|
|
127
|
+
const fixed = (value) => String(Math.round(value * 10) / 10);
|
|
128
|
+
return `${fixed(hue)} ${fixed(saturation * 100)}% ${fixed(lightness * 100)}%`;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* The sRGB components of a color value: our object form, or a bare hex
|
|
132
|
+
* string, which some tools write instead.
|
|
133
|
+
*/
|
|
134
|
+
export function colorComponents(value, file, tokenPath) {
|
|
135
|
+
if (typeof value === "string") {
|
|
136
|
+
if (!HEX.test(value)) {
|
|
137
|
+
throw new TokenError(file, tokenPath, `is not a #rrggbb color: ${value}`);
|
|
138
|
+
}
|
|
139
|
+
return hexToComponents(value);
|
|
140
|
+
}
|
|
141
|
+
if (typeof value !== "object" || value === null) {
|
|
142
|
+
throw new TokenError(file, tokenPath, "has no color value");
|
|
143
|
+
}
|
|
144
|
+
const color = value;
|
|
145
|
+
if (color.alpha !== undefined && color.alpha !== 1) {
|
|
146
|
+
throw new TokenError(file, tokenPath, "has an alpha; theme colors are opaque");
|
|
147
|
+
}
|
|
148
|
+
if (color.colorSpace === "srgb" &&
|
|
149
|
+
Array.isArray(color.components) &&
|
|
150
|
+
color.components.length === 3 &&
|
|
151
|
+
color.components.every((c) => typeof c === "number" && c >= 0 && c <= 1)) {
|
|
152
|
+
const [r, g, b] = color.components;
|
|
153
|
+
return [r, g, b];
|
|
154
|
+
}
|
|
155
|
+
if (typeof color.hex === "string" && HEX.test(color.hex)) {
|
|
156
|
+
return hexToComponents(color.hex);
|
|
157
|
+
}
|
|
158
|
+
throw new TokenError(file, tokenPath, "is not an sRGB color (colorSpace srgb with components, or hex)");
|
|
159
|
+
}
|
|
160
|
+
/** Reads typed values from one file's tokens, throwing on anything missing or mistyped. */
|
|
161
|
+
export class TokenReader {
|
|
162
|
+
file;
|
|
163
|
+
tokens;
|
|
164
|
+
constructor(file, group) {
|
|
165
|
+
this.file = file;
|
|
166
|
+
this.tokens = flattenTokens(group, file);
|
|
167
|
+
}
|
|
168
|
+
paths() {
|
|
169
|
+
return [...this.tokens.keys()];
|
|
170
|
+
}
|
|
171
|
+
token(tokenPath, type) {
|
|
172
|
+
const token = this.tokens.get(tokenPath);
|
|
173
|
+
if (!token)
|
|
174
|
+
throw new TokenError(this.file, tokenPath, "is missing");
|
|
175
|
+
if (token.$type !== type) {
|
|
176
|
+
throw new TokenError(this.file, tokenPath, `is a ${String(token.$type)}, expected a ${type}`);
|
|
177
|
+
}
|
|
178
|
+
return token;
|
|
179
|
+
}
|
|
180
|
+
number(tokenPath) {
|
|
181
|
+
const value = this.token(tokenPath, "number").$value;
|
|
182
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
183
|
+
throw new TokenError(this.file, tokenPath, "is not a finite number");
|
|
184
|
+
}
|
|
185
|
+
return value;
|
|
186
|
+
}
|
|
187
|
+
string(tokenPath) {
|
|
188
|
+
const value = this.token(tokenPath, "string").$value;
|
|
189
|
+
if (typeof value !== "string" || value.trim() === "") {
|
|
190
|
+
throw new TokenError(this.file, tokenPath, "is not a non-empty string");
|
|
191
|
+
}
|
|
192
|
+
return value;
|
|
193
|
+
}
|
|
194
|
+
/** A color as `#rrggbb`. */
|
|
195
|
+
hex(tokenPath) {
|
|
196
|
+
return componentsToHex(colorComponents(this.token(tokenPath, "color").$value, this.file, tokenPath));
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* A color as an `H S% L%` triplet: the exact text it was written as, when
|
|
200
|
+
* the recorded text still describes the same color, else derived from it.
|
|
201
|
+
*/
|
|
202
|
+
hslTriplet(tokenPath) {
|
|
203
|
+
const token = this.token(tokenPath, "color");
|
|
204
|
+
const components = colorComponents(token.$value, this.file, tokenPath);
|
|
205
|
+
const recorded = token.$extensions?.[EXTENSION]?.hsl;
|
|
206
|
+
if (typeof recorded === "string" && HSL_TRIPLET.test(recorded)) {
|
|
207
|
+
const recordedHex = componentsToHex(colorComponents(hslColorToken(recorded).$value, this.file, tokenPath));
|
|
208
|
+
if (recordedHex === componentsToHex(components))
|
|
209
|
+
return recorded;
|
|
210
|
+
}
|
|
211
|
+
return componentsToHslTriplet(components);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
//# sourceMappingURL=dtcg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dtcg.js","sourceRoot":"","sources":["../../src/tokens/dtcg.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAC;AAsB5C,MAAM,OAAO,UAAW,SAAQ,KAAK;IAExB,IAAI;IACJ,SAAS;IAFpB,YACW,IAAY,EACZ,SAAiB,EAC1B,OAAe;QAEf,KAAK,CAAC,GAAG,IAAI,KAAK,SAAS,IAAI,OAAO,EAAE,CAAC,CAAC;oBAJjC,IAAI;yBACJ,SAAS;QAIlB,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC3B,CAAC;CACF;AAED,SAAS,OAAO,CAAC,IAAa;IAC5B,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,QAAQ,IAAI,IAAI,CAAC;AACvE,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,aAAa,CAC3B,KAAc,EACd,IAAY,EACZ,MAAM,GAAG,EAAE;IAEX,MAAM,MAAM,GAAG,IAAI,GAAG,EAAqB,CAAC;IAC5C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACxE,MAAM,IAAI,UAAU,CAAC,IAAI,EAAE,MAAM,IAAI,QAAQ,EAAE,sBAAsB,CAAC,CAAC;IACzE,CAAC;IACD,KAAK,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,SAAS;QAC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,CAAC,CAAC;QAC1E,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,4BAA4B;IAC5B,GAAG,CAAC,SAAiB;QACnB,OAAO,eAAe,CACpB,eAAe,CACb,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,MAAM,EACrC,IAAI,CAAC,IAAI,EACT,SAAS,CACV,CACF,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,UAAU,CAAC,SAAiB;QAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC7C,MAAM,UAAU,GAAG,eAAe,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QACvE,MAAM,QAAQ,GACZ,KAAK,CAAC,WAAW,EAAE,CAAC,SAAS,CAC9B,EAAE,GAAG,CAAC;QACP,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC/D,MAAM,WAAW,GAAG,eAAe,CACjC,eAAe,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CACtE,CAAC;YACF,IAAI,WAAW,KAAK,eAAe,CAAC,UAAU,CAAC;gBAAE,OAAO,QAAQ,CAAC;QACnE,CAAC;QACD,OAAO,sBAAsB,CAAC,UAAU,CAAC,CAAC;IAC5C,CAAC;CACF"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
{
|
|
2
|
+
"switch": {
|
|
3
|
+
"height": {
|
|
4
|
+
"$type": "number",
|
|
5
|
+
"$value": 16,
|
|
6
|
+
"$description": "Track height in CSS pixels."
|
|
7
|
+
},
|
|
8
|
+
"width": {
|
|
9
|
+
"$type": "number",
|
|
10
|
+
"$value": 28,
|
|
11
|
+
"$description": "Track width in CSS pixels."
|
|
12
|
+
},
|
|
13
|
+
"inset": {
|
|
14
|
+
"$type": "number",
|
|
15
|
+
"$value": 2,
|
|
16
|
+
"$description": "Gap in CSS pixels between the thumb and the track edge."
|
|
17
|
+
},
|
|
18
|
+
"radius": {
|
|
19
|
+
"$type": "number",
|
|
20
|
+
"$value": 9999,
|
|
21
|
+
"$description": "Overrides the track corner radius, including when the radius prop is set. When this input is unset, an explicit radius prop uses var(--shape-control).",
|
|
22
|
+
"$extensions": {
|
|
23
|
+
"com.agent-native": {
|
|
24
|
+
"cssVariable": "--radius-full"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"surface-track-color": {
|
|
29
|
+
"$type": "color",
|
|
30
|
+
"$value": {
|
|
31
|
+
"colorSpace": "srgb",
|
|
32
|
+
"components": [0, 0, 0],
|
|
33
|
+
"alpha": 0.494118,
|
|
34
|
+
"hex": "#000000"
|
|
35
|
+
},
|
|
36
|
+
"$description": "Unchecked track in the surface variant.",
|
|
37
|
+
"$extensions": {
|
|
38
|
+
"com.agent-native": {
|
|
39
|
+
"cssVariable": "--gray-a10"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"surface-track-color-checked": {
|
|
44
|
+
"$type": "color",
|
|
45
|
+
"$value": {
|
|
46
|
+
"colorSpace": "srgb",
|
|
47
|
+
"components": [0.101961, 0.439216, 0.921569],
|
|
48
|
+
"alpha": 1,
|
|
49
|
+
"hex": "#1a70eb"
|
|
50
|
+
},
|
|
51
|
+
"$description": "Checked track in the surface variant.",
|
|
52
|
+
"$extensions": {
|
|
53
|
+
"com.agent-native": {
|
|
54
|
+
"cssVariable": "--accent-track"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"soft-track-color": {
|
|
59
|
+
"$type": "color",
|
|
60
|
+
"$value": {
|
|
61
|
+
"colorSpace": "srgb",
|
|
62
|
+
"components": [0, 0, 0],
|
|
63
|
+
"alpha": 0.090196,
|
|
64
|
+
"hex": "#000000"
|
|
65
|
+
},
|
|
66
|
+
"$description": "Unchecked track in the soft variant.",
|
|
67
|
+
"$extensions": {
|
|
68
|
+
"com.agent-native": {
|
|
69
|
+
"cssVariable": "--gray-a4"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"soft-track-color-checked": {
|
|
74
|
+
"$type": "color",
|
|
75
|
+
"$value": {
|
|
76
|
+
"colorSpace": "srgb",
|
|
77
|
+
"components": [0.003922, 0.419608, 1],
|
|
78
|
+
"alpha": 0.290196,
|
|
79
|
+
"hex": "#016bff"
|
|
80
|
+
},
|
|
81
|
+
"$description": "Checked track in the soft variant.",
|
|
82
|
+
"$extensions": {
|
|
83
|
+
"com.agent-native": {
|
|
84
|
+
"cssVariable": "--accent-a6"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"high-contrast-track-color-checked": {
|
|
89
|
+
"$type": "color",
|
|
90
|
+
"$value": {
|
|
91
|
+
"colorSpace": "srgb",
|
|
92
|
+
"components": [0.05098, 0.192157, 0.4],
|
|
93
|
+
"alpha": 1,
|
|
94
|
+
"hex": "#0d3166"
|
|
95
|
+
},
|
|
96
|
+
"$description": "Checked track when high contrast is enabled.",
|
|
97
|
+
"$extensions": {
|
|
98
|
+
"com.agent-native": {
|
|
99
|
+
"cssVariable": "--accent-12"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"thumb-color": {
|
|
104
|
+
"$type": "color",
|
|
105
|
+
"$value": {
|
|
106
|
+
"colorSpace": "srgb",
|
|
107
|
+
"components": [1, 1, 1],
|
|
108
|
+
"alpha": 1,
|
|
109
|
+
"hex": "#ffffff"
|
|
110
|
+
},
|
|
111
|
+
"$description": "Fill of the movable thumb.",
|
|
112
|
+
"$extensions": {
|
|
113
|
+
"com.agent-native": {
|
|
114
|
+
"cssVariable": "--surface-raised"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"thumb-shadow": {
|
|
119
|
+
"$type": "string",
|
|
120
|
+
"$value": "var(--shadow-2)",
|
|
121
|
+
"$description": "CSS shadow or elevation variable for the thumb."
|
|
122
|
+
},
|
|
123
|
+
"invalid-ring-color": {
|
|
124
|
+
"$type": "color",
|
|
125
|
+
"$value": {
|
|
126
|
+
"colorSpace": "srgb",
|
|
127
|
+
"components": [0.623529, 0.164706, 0.164706],
|
|
128
|
+
"alpha": 1,
|
|
129
|
+
"hex": "#9f2a2a"
|
|
130
|
+
},
|
|
131
|
+
"$description": "Ring around an invalid unchecked track.",
|
|
132
|
+
"$extensions": {
|
|
133
|
+
"com.agent-native": {
|
|
134
|
+
"cssVariable": "--fill-danger"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"disabled-track-color": {
|
|
139
|
+
"$type": "color",
|
|
140
|
+
"$value": {
|
|
141
|
+
"colorSpace": "srgb",
|
|
142
|
+
"components": [0, 0, 0],
|
|
143
|
+
"alpha": 0.058824,
|
|
144
|
+
"hex": "#000000"
|
|
145
|
+
},
|
|
146
|
+
"$description": "Track fill while disabled.",
|
|
147
|
+
"$extensions": {
|
|
148
|
+
"com.agent-native": {
|
|
149
|
+
"cssVariable": "--gray-a3"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"disabled-ring-color": {
|
|
154
|
+
"$type": "color",
|
|
155
|
+
"$value": {
|
|
156
|
+
"colorSpace": "srgb",
|
|
157
|
+
"components": [0, 0, 0],
|
|
158
|
+
"alpha": 0.14902,
|
|
159
|
+
"hex": "#000000"
|
|
160
|
+
},
|
|
161
|
+
"$description": "Ring around the disabled track and thumb.",
|
|
162
|
+
"$extensions": {
|
|
163
|
+
"com.agent-native": {
|
|
164
|
+
"cssVariable": "--gray-a6"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"disabled-thumb-color": {
|
|
169
|
+
"$type": "color",
|
|
170
|
+
"$value": {
|
|
171
|
+
"colorSpace": "srgb",
|
|
172
|
+
"components": [0.976471, 0.976471, 0.976471],
|
|
173
|
+
"alpha": 1,
|
|
174
|
+
"hex": "#f9f9f9"
|
|
175
|
+
},
|
|
176
|
+
"$description": "Thumb fill while disabled.",
|
|
177
|
+
"$extensions": {
|
|
178
|
+
"com.agent-native": {
|
|
179
|
+
"cssVariable": "--gray-2"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|