@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,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The color tints a person can pick (`data-appearance` on the root, set by
|
|
3
|
+
* core's change-appearance action), as overrides of a theme's own values.
|
|
4
|
+
* The Agent-Native theme ignores them.
|
|
5
|
+
*/
|
|
6
|
+
export const APPEARANCES = {
|
|
7
|
+
warm: {
|
|
8
|
+
light: {
|
|
9
|
+
background: "35 30% 97%",
|
|
10
|
+
"sidebar-background": "35 28% 95%",
|
|
11
|
+
accent: "30 35% 92%",
|
|
12
|
+
muted: "35 25% 94%",
|
|
13
|
+
primary: "25 65% 45%",
|
|
14
|
+
ring: "25 55% 50%",
|
|
15
|
+
},
|
|
16
|
+
dark: {
|
|
17
|
+
background: "28 14% 7%",
|
|
18
|
+
"sidebar-background": "28 14% 5%",
|
|
19
|
+
accent: "28 12% 14%",
|
|
20
|
+
muted: "28 10% 12%",
|
|
21
|
+
primary: "30 65% 65%",
|
|
22
|
+
ring: "30 55% 55%",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
ocean: {
|
|
26
|
+
light: {
|
|
27
|
+
background: "210 35% 97%",
|
|
28
|
+
"sidebar-background": "210 32% 95%",
|
|
29
|
+
accent: "200 40% 92%",
|
|
30
|
+
muted: "210 28% 94%",
|
|
31
|
+
primary: "205 70% 42%",
|
|
32
|
+
ring: "205 60% 50%",
|
|
33
|
+
},
|
|
34
|
+
dark: {
|
|
35
|
+
background: "215 25% 8%",
|
|
36
|
+
"sidebar-background": "215 28% 6%",
|
|
37
|
+
accent: "215 22% 15%",
|
|
38
|
+
muted: "215 20% 12%",
|
|
39
|
+
primary: "200 75% 65%",
|
|
40
|
+
ring: "200 65% 55%",
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
forest: {
|
|
44
|
+
light: {
|
|
45
|
+
background: "130 22% 97%",
|
|
46
|
+
"sidebar-background": "130 20% 95%",
|
|
47
|
+
accent: "135 28% 92%",
|
|
48
|
+
muted: "130 18% 94%",
|
|
49
|
+
primary: "145 55% 35%",
|
|
50
|
+
ring: "145 45% 45%",
|
|
51
|
+
},
|
|
52
|
+
dark: {
|
|
53
|
+
background: "140 14% 7%",
|
|
54
|
+
"sidebar-background": "140 14% 5%",
|
|
55
|
+
accent: "140 12% 14%",
|
|
56
|
+
muted: "140 10% 12%",
|
|
57
|
+
primary: "145 50% 60%",
|
|
58
|
+
ring: "145 40% 50%",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
rose: {
|
|
62
|
+
light: {
|
|
63
|
+
background: "340 35% 98%",
|
|
64
|
+
"sidebar-background": "340 32% 96%",
|
|
65
|
+
accent: "345 40% 93%",
|
|
66
|
+
muted: "340 28% 95%",
|
|
67
|
+
primary: "345 60% 50%",
|
|
68
|
+
ring: "345 50% 55%",
|
|
69
|
+
},
|
|
70
|
+
dark: {
|
|
71
|
+
background: "340 14% 8%",
|
|
72
|
+
"sidebar-background": "340 14% 6%",
|
|
73
|
+
accent: "340 14% 15%",
|
|
74
|
+
muted: "340 12% 12%",
|
|
75
|
+
primary: "345 65% 65%",
|
|
76
|
+
ring: "345 55% 55%",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
slate: {
|
|
80
|
+
light: {
|
|
81
|
+
background: "215 16% 96%",
|
|
82
|
+
"sidebar-background": "215 14% 94%",
|
|
83
|
+
accent: "215 18% 91%",
|
|
84
|
+
muted: "215 14% 93%",
|
|
85
|
+
primary: "215 25% 25%",
|
|
86
|
+
ring: "215 20% 40%",
|
|
87
|
+
},
|
|
88
|
+
dark: {
|
|
89
|
+
background: "215 14% 8%",
|
|
90
|
+
"sidebar-background": "215 14% 6%",
|
|
91
|
+
accent: "215 12% 14%",
|
|
92
|
+
muted: "215 10% 12%",
|
|
93
|
+
primary: "215 15% 75%",
|
|
94
|
+
ring: "215 12% 60%",
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=appearances.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appearances.js","sourceRoot":"","sources":["../../src/themes/appearances.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,UAAU,EAAE,YAAY;YACxB,oBAAoB,EAAE,YAAY;YAClC,MAAM,EAAE,YAAY;YACpB,KAAK,EAAE,YAAY;YACnB,OAAO,EAAE,YAAY;YACrB,IAAI,EAAE,YAAY;SACnB;QACD,IAAI,EAAE;YACJ,UAAU,EAAE,WAAW;YACvB,oBAAoB,EAAE,WAAW;YACjC,MAAM,EAAE,YAAY;YACpB,KAAK,EAAE,YAAY;YACnB,OAAO,EAAE,YAAY;YACrB,IAAI,EAAE,YAAY;SACnB;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE;YACL,UAAU,EAAE,aAAa;YACzB,oBAAoB,EAAE,aAAa;YACnC,MAAM,EAAE,aAAa;YACrB,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,aAAa;YACtB,IAAI,EAAE,aAAa;SACpB;QACD,IAAI,EAAE;YACJ,UAAU,EAAE,YAAY;YACxB,oBAAoB,EAAE,YAAY;YAClC,MAAM,EAAE,aAAa;YACrB,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,aAAa;YACtB,IAAI,EAAE,aAAa;SACpB;KACF;IACD,MAAM,EAAE;QACN,KAAK,EAAE;YACL,UAAU,EAAE,aAAa;YACzB,oBAAoB,EAAE,aAAa;YACnC,MAAM,EAAE,aAAa;YACrB,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,aAAa;YACtB,IAAI,EAAE,aAAa;SACpB;QACD,IAAI,EAAE;YACJ,UAAU,EAAE,YAAY;YACxB,oBAAoB,EAAE,YAAY;YAClC,MAAM,EAAE,aAAa;YACrB,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,aAAa;YACtB,IAAI,EAAE,aAAa;SACpB;KACF;IACD,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,UAAU,EAAE,aAAa;YACzB,oBAAoB,EAAE,aAAa;YACnC,MAAM,EAAE,aAAa;YACrB,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,aAAa;YACtB,IAAI,EAAE,aAAa;SACpB;QACD,IAAI,EAAE;YACJ,UAAU,EAAE,YAAY;YACxB,oBAAoB,EAAE,YAAY;YAClC,MAAM,EAAE,aAAa;YACrB,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,aAAa;YACtB,IAAI,EAAE,aAAa;SACpB;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE;YACL,UAAU,EAAE,aAAa;YACzB,oBAAoB,EAAE,aAAa;YACnC,MAAM,EAAE,aAAa;YACrB,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,aAAa;YACtB,IAAI,EAAE,aAAa;SACpB;QACD,IAAI,EAAE;YACJ,UAAU,EAAE,YAAY;YACxB,oBAAoB,EAAE,YAAY;YAClC,MAAM,EAAE,aAAa;YACrB,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,aAAa;YACtB,IAAI,EAAE,aAAa;SACpB;KACF;CASF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ThemeDefinition } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* The Agent-Native baseline: 24px controls on the 16/20/24/32 ramp, roles
|
|
4
|
+
* mapped straight onto the generated Radix scales, density and radius live.
|
|
5
|
+
* A preview of the look the `agent-native` theme moves to; apps do not pick
|
|
6
|
+
* it yet. Its shadcn values are written from the default scales.
|
|
7
|
+
*/
|
|
8
|
+
export declare const baselineTheme: ThemeDefinition;
|
|
9
|
+
//# sourceMappingURL=baseline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseline.d.ts","sourceRoot":"","sources":["../../src/themes/baseline.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAIlD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,eAU3B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createPalette, DEFAULT_PALETTE_INPUT } from "../tokens/palette.js";
|
|
2
|
+
import { FOCUS_RING_TOKENS, STANDARD_ROLES, STANDARD_SHAPE_TOKENS, } from "../tokens/roles.js";
|
|
3
|
+
const scales = createPalette(DEFAULT_PALETTE_INPUT);
|
|
4
|
+
/**
|
|
5
|
+
* The Agent-Native baseline: 24px controls on the 16/20/24/32 ramp, roles
|
|
6
|
+
* mapped straight onto the generated Radix scales, density and radius live.
|
|
7
|
+
* A preview of the look the `agent-native` theme moves to; apps do not pick
|
|
8
|
+
* it yet. Its shadcn values are written from the default scales.
|
|
9
|
+
*/
|
|
10
|
+
export const baselineTheme = {
|
|
11
|
+
name: "baseline",
|
|
12
|
+
label: "Baseline",
|
|
13
|
+
isDefault: false,
|
|
14
|
+
base: { ...STANDARD_ROLES, ...scales.light.legacy },
|
|
15
|
+
dark: { ...STANDARD_ROLES, ...scales.dark.legacy },
|
|
16
|
+
light: { ...STANDARD_ROLES, ...scales.light.legacy },
|
|
17
|
+
tokens: { ...FOCUS_RING_TOKENS, ...STANDARD_SHAPE_TOKENS },
|
|
18
|
+
palette: { light: scales.light, dark: scales.dark },
|
|
19
|
+
readsScales: true,
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=baseline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseline.js","sourceRoot":"","sources":["../../src/themes/baseline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAG5B,MAAM,MAAM,GAAG,aAAa,CAAC,qBAAqB,CAAC,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAoB;IAC5C,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,UAAU;IACjB,SAAS,EAAE,KAAK;IAChB,IAAI,EAAE,EAAE,GAAG,cAAc,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE;IACnD,IAAI,EAAE,EAAE,GAAG,cAAc,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE;IAClD,KAAK,EAAE,EAAE,GAAG,cAAc,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE;IACpD,MAAM,EAAE,EAAE,GAAG,iBAAiB,EAAE,GAAG,qBAAqB,EAAE;IAC1D,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE;IACnD,WAAW,EAAE,IAAI;CAClB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { baselineTheme } from "./baseline.js";
|
|
2
|
+
import type { ThemeDefinition } from "./types.js";
|
|
3
|
+
export { APPEARANCES } from "./appearances.js";
|
|
4
|
+
export { SHADCN_SLOTS, shadcn, shadcnTheme } from "./shadcn.js";
|
|
5
|
+
export type { ThemeDefinition, ThemeValues } from "./types.js";
|
|
6
|
+
export { baselineTheme };
|
|
7
|
+
/** The umbrella look every app can switch to; applied with no `data-app-theme`. */
|
|
8
|
+
export declare const agentNativeTheme: ThemeDefinition;
|
|
9
|
+
declare const APPS: readonly [readonly ["analytics", "Analytics", "dark"], readonly ["assets", "Assets", "light"], readonly ["brain", "Brain", "light"], readonly ["calendar", "Calendar", "light"], readonly ["chat", "Chat", "light"], readonly ["clips", "Clips", "light"], readonly ["content", "Content", "light"], readonly ["crm", "CRM", "light"], readonly ["design", "Design", "light"], readonly ["desktop", "Desktop", "light"], readonly ["dispatch", "Dispatch", "light"], readonly ["docs", "Docs", "light"], readonly ["factory", "Factory", "light"], readonly ["forms", "Forms", "light"], readonly ["mail", "Mail", "light"], readonly ["plan", "Plan", "light"], readonly ["slides", "Slides", "dark"], readonly ["tasks", "Tasks", "light"]];
|
|
10
|
+
export type AppThemeName = (typeof APPS)[number][0] | "agent-native" | "baseline";
|
|
11
|
+
/** One theme per app, named for the app; their values are their token files. */
|
|
12
|
+
export declare const APP_THEMES: readonly ThemeDefinition[];
|
|
13
|
+
export declare const THEMES: readonly ThemeDefinition[];
|
|
14
|
+
export declare function getTheme(name: string): ThemeDefinition | undefined;
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/themes/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAChE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,CAAC;AAmBzB,mFAAmF;AACnF,eAAO,MAAM,gBAAgB,EAAE,eAkB9B,CAAC;AAEF,QAAA,MAAM,IAAI,+sBAmBqE,CAAC;AAEhF,MAAM,MAAM,YAAY,GACpB,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GACxB,cAAc,GACd,UAAU,CAAC;AAEf,gFAAgF;AAChF,eAAO,MAAM,UAAU,EAAE,SAAS,eAAe,EAGhD,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,SAAS,eAAe,EAI5C,CAAC;AAEF,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAElE"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { tokenThemeValues } from "../tokens/source.js";
|
|
2
|
+
import { baselineTheme } from "./baseline.js";
|
|
3
|
+
import { shadcnTheme, themeProperties } from "./shadcn.js";
|
|
4
|
+
export { APPEARANCES } from "./appearances.js";
|
|
5
|
+
export { SHADCN_SLOTS, shadcn, shadcnTheme } from "./shadcn.js";
|
|
6
|
+
export { baselineTheme };
|
|
7
|
+
const AGENT_NATIVE_EXTRAS = {
|
|
8
|
+
base: {
|
|
9
|
+
"font-sans": "var(--font-family-sans)",
|
|
10
|
+
"font-wordmark": "var(--font-family-wordmark)",
|
|
11
|
+
"radius-xl": "var(--radius-5)",
|
|
12
|
+
"shadow-composer": "0 8px 15px var(--shadow-tint-a1)",
|
|
13
|
+
"agent-kit-composer-radius": "var(--radius-5)",
|
|
14
|
+
"agent-kit-composer-elevation": "var(--shadow-composer)",
|
|
15
|
+
},
|
|
16
|
+
dark: {
|
|
17
|
+
"shadow-composer": "0 8px 30px var(--shadow-tint-a2)",
|
|
18
|
+
"agent-kit-composer-elevation": "var(--shadow-composer)",
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
const agentNativeTokens = tokenThemeValues("agent-native", "light");
|
|
22
|
+
/** The umbrella look every app can switch to; applied with no `data-app-theme`. */
|
|
23
|
+
export const agentNativeTheme = {
|
|
24
|
+
...shadcnTheme({
|
|
25
|
+
name: "agent-native",
|
|
26
|
+
label: "Agent-Native",
|
|
27
|
+
isDefault: true,
|
|
28
|
+
values: agentNativeTokens,
|
|
29
|
+
}),
|
|
30
|
+
scopedOnly: {
|
|
31
|
+
base: themeProperties("agent-native", AGENT_NATIVE_EXTRAS.base, agentNativeTokens.base),
|
|
32
|
+
dark: themeProperties("agent-native", AGENT_NATIVE_EXTRAS.dark, {
|
|
33
|
+
...agentNativeTokens.base,
|
|
34
|
+
...agentNativeTokens.dark,
|
|
35
|
+
}),
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const APPS = [
|
|
39
|
+
["analytics", "Analytics", "dark"],
|
|
40
|
+
["assets", "Assets", "light"],
|
|
41
|
+
["brain", "Brain", "light"],
|
|
42
|
+
["calendar", "Calendar", "light"],
|
|
43
|
+
["chat", "Chat", "light"],
|
|
44
|
+
["clips", "Clips", "light"],
|
|
45
|
+
["content", "Content", "light"],
|
|
46
|
+
["crm", "CRM", "light"],
|
|
47
|
+
["design", "Design", "light"],
|
|
48
|
+
["desktop", "Desktop", "light"],
|
|
49
|
+
["dispatch", "Dispatch", "light"],
|
|
50
|
+
["docs", "Docs", "light"],
|
|
51
|
+
["factory", "Factory", "light"],
|
|
52
|
+
["forms", "Forms", "light"],
|
|
53
|
+
["mail", "Mail", "light"],
|
|
54
|
+
["plan", "Plan", "light"],
|
|
55
|
+
["slides", "Slides", "dark"],
|
|
56
|
+
["tasks", "Tasks", "light"],
|
|
57
|
+
];
|
|
58
|
+
/** One theme per app, named for the app; their values are their token files. */
|
|
59
|
+
export const APP_THEMES = APPS.map(([name, label, appearance]) => shadcnTheme({ name, label, values: tokenThemeValues(name, appearance) }));
|
|
60
|
+
export const THEMES = [
|
|
61
|
+
agentNativeTheme,
|
|
62
|
+
...APP_THEMES,
|
|
63
|
+
baselineTheme,
|
|
64
|
+
];
|
|
65
|
+
export function getTheme(name) {
|
|
66
|
+
return THEMES.find((theme) => theme.name === name);
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/themes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG3D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAA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not to
|
|
4
|
+
* an hsl alpha; the two paint alike but resolve to different computed colors.
|
|
5
|
+
*/
|
|
6
|
+
export declare const shadcn: (name: string, alpha?: number) => string;
|
|
7
|
+
//# sourceMappingURL=reference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../src/themes/reference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,MAAM,SAAU,MAAM,UAAU,MAAM,WAGsC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A reference to a palette slot, resolved to the theme's own value when the
|
|
3
|
+
* theme is built. Tailwind compiles `bg-primary/90` to this color-mix, not to
|
|
4
|
+
* an hsl alpha; the two paint alike but resolve to different computed colors.
|
|
5
|
+
*/
|
|
6
|
+
export const shadcn = (name, alpha) => alpha === undefined
|
|
7
|
+
? `hsl(var(--${name}))`
|
|
8
|
+
: `color-mix(in oklab, hsl(var(--${name})) ${Math.round(alpha * 100)}%, transparent)`;
|
|
9
|
+
//# sourceMappingURL=reference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference.js","sourceRoot":"","sources":["../../src/themes/reference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,IAAY,EAAE,KAAc,EAAE,EAAE,CACrD,KAAK,KAAK,SAAS;IACjB,CAAC,CAAC,aAAa,IAAI,IAAI;IACvB,CAAC,CAAC,iCAAiC,IAAI,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TokenMap } from "../tokens/primitives.js";
|
|
2
|
+
import { shadcn } from "./reference.js";
|
|
3
|
+
import type { ThemeDefinition, ThemeValues } from "./types.js";
|
|
4
|
+
export { shadcn };
|
|
5
|
+
/**
|
|
6
|
+
* The shadcn slots a palette theme fills. Themes write them out one way for
|
|
7
|
+
* components not yet migrated; nothing in the design system reads them.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SHADCN_SLOTS: readonly ["background", "foreground", "card", "card-foreground", "popover", "popover-foreground", "primary", "primary-foreground", "secondary", "secondary-foreground", "muted", "muted-foreground", "accent", "accent-foreground", "destructive", "destructive-foreground", "border", "input", "ring", "radius", "sidebar-background", "sidebar-foreground", "sidebar-primary", "sidebar-primary-foreground", "sidebar-accent", "sidebar-accent-foreground", "sidebar-border", "sidebar-ring"];
|
|
10
|
+
/**
|
|
11
|
+
* Properties a theme sets beyond its slots (`font-sans`, `shadow-composer`),
|
|
12
|
+
* with slot references resolved to the theme's own values.
|
|
13
|
+
*/
|
|
14
|
+
export declare function themeProperties(themeName: string, properties: Readonly<Record<string, string>>, values: Readonly<Record<string, string>>): TokenMap;
|
|
15
|
+
export declare function shadcnTheme({ name, label, isDefault, values, }: {
|
|
16
|
+
name: string;
|
|
17
|
+
label: string;
|
|
18
|
+
isDefault?: boolean;
|
|
19
|
+
values: ThemeValues;
|
|
20
|
+
}): ThemeDefinition;
|
|
21
|
+
//# sourceMappingURL=shadcn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadcn.d.ts","sourceRoot":"","sources":["../../src/themes/shadcn.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE/D,OAAO,EAAE,MAAM,EAAE,CAAC;AAElB;;;GAGG;AACH,eAAO,MAAM,YAAY,YACvB,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,iBAAiB,EACjB,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EACpB,WAAW,EACX,sBAAsB,EACtB,OAAO,EACP,kBAAkB,EAClB,QAAQ,EACR,mBAAmB,EACnB,aAAa,EACb,wBAAwB,EACxB,QAAQ,EACR,OAAO,EACP,MAAM,EACN,QAAQ,EACR,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,4BAA4B,EAC5B,gBAAgB,EAChB,2BAA2B,EAC3B,gBAAgB,EAChB,cAAc,CACN,CAAC;AAiHX;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAC5C,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GACvC,QAAQ,CAMV;AAkCD,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,KAAK,EACL,SAAiB,EACjB,MAAM,GACP,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;CACrB,GAAG,eAAe,CAuBlB"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import Color from "colorjs.io";
|
|
2
|
+
import { TAILWIND_SHADOWS } from "../tokens/base.js";
|
|
3
|
+
import { createPalette } from "../tokens/palette.js";
|
|
4
|
+
import { FOCUS_RING_TOKENS, STANDARD_ROLES } from "../tokens/roles.js";
|
|
5
|
+
import { shadcn } from "./reference.js";
|
|
6
|
+
export { shadcn };
|
|
7
|
+
/**
|
|
8
|
+
* The shadcn slots a palette theme fills. Themes write them out one way for
|
|
9
|
+
* components not yet migrated; nothing in the design system reads them.
|
|
10
|
+
*/
|
|
11
|
+
export const SHADCN_SLOTS = [
|
|
12
|
+
"background",
|
|
13
|
+
"foreground",
|
|
14
|
+
"card",
|
|
15
|
+
"card-foreground",
|
|
16
|
+
"popover",
|
|
17
|
+
"popover-foreground",
|
|
18
|
+
"primary",
|
|
19
|
+
"primary-foreground",
|
|
20
|
+
"secondary",
|
|
21
|
+
"secondary-foreground",
|
|
22
|
+
"muted",
|
|
23
|
+
"muted-foreground",
|
|
24
|
+
"accent",
|
|
25
|
+
"accent-foreground",
|
|
26
|
+
"destructive",
|
|
27
|
+
"destructive-foreground",
|
|
28
|
+
"border",
|
|
29
|
+
"input",
|
|
30
|
+
"ring",
|
|
31
|
+
"radius",
|
|
32
|
+
"sidebar-background",
|
|
33
|
+
"sidebar-foreground",
|
|
34
|
+
"sidebar-primary",
|
|
35
|
+
"sidebar-primary-foreground",
|
|
36
|
+
"sidebar-accent",
|
|
37
|
+
"sidebar-accent-foreground",
|
|
38
|
+
"sidebar-border",
|
|
39
|
+
"sidebar-ring",
|
|
40
|
+
];
|
|
41
|
+
const SLOTS = new Set(SHADCN_SLOTS);
|
|
42
|
+
const REFERENCE = /var\(--([a-z0-9-]+)(?:,\s*var\(--([a-z0-9-]+)\))?\)/g;
|
|
43
|
+
const own = (slot) => `--theme-${slot}`;
|
|
44
|
+
function resolve(themeName, tokens, values) {
|
|
45
|
+
const resolved = {};
|
|
46
|
+
for (const [key, expression] of Object.entries(tokens)) {
|
|
47
|
+
resolved[key] = expression.replace(REFERENCE, (match, name, fallback) => {
|
|
48
|
+
if (!SLOTS.has(name))
|
|
49
|
+
return match;
|
|
50
|
+
const slot = name in values
|
|
51
|
+
? name
|
|
52
|
+
: fallback !== undefined && fallback in values
|
|
53
|
+
? fallback
|
|
54
|
+
: undefined;
|
|
55
|
+
if (slot === undefined) {
|
|
56
|
+
throw new Error(`Theme ${themeName} has no "${name}" for ${key}; add it to the theme's values`);
|
|
57
|
+
}
|
|
58
|
+
return `var(${own(slot)})`;
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return resolved;
|
|
62
|
+
}
|
|
63
|
+
const SHADCN_ROLES = {
|
|
64
|
+
...STANDARD_ROLES,
|
|
65
|
+
"--surface-app": shadcn("background"),
|
|
66
|
+
"--surface-nav": "hsl(var(--sidebar-background, var(--background)))",
|
|
67
|
+
"--surface-canvas": shadcn("background"),
|
|
68
|
+
"--surface-raised": shadcn("popover"),
|
|
69
|
+
"--surface-sunken": shadcn("muted"),
|
|
70
|
+
"--surface-overlay": shadcn("background", 0.45),
|
|
71
|
+
"--surface-inverse": shadcn("foreground"),
|
|
72
|
+
"--fg-default": shadcn("foreground"),
|
|
73
|
+
"--fg-muted": "color-mix(in oklab, hsl(var(--muted-foreground)) 80%, hsl(var(--foreground)))",
|
|
74
|
+
"--fg-subtle": shadcn("muted-foreground"),
|
|
75
|
+
"--fg-disabled": "var(--gray-a8)",
|
|
76
|
+
"--fg-on-brand": shadcn("primary-foreground"),
|
|
77
|
+
"--fg-on-danger": shadcn("destructive-foreground"),
|
|
78
|
+
"--fg-brand": "var(--brand-text)",
|
|
79
|
+
"--fg-danger": "color-mix(in oklab, hsl(var(--destructive)) 60%, hsl(var(--foreground)))",
|
|
80
|
+
"--fg-inverse": shadcn("background"),
|
|
81
|
+
"--line-default": shadcn("border"),
|
|
82
|
+
"--line-subtle": shadcn("border"),
|
|
83
|
+
"--line-strong": shadcn("input"),
|
|
84
|
+
"--line-focus": shadcn("ring"),
|
|
85
|
+
"--fill-hover": shadcn("accent"),
|
|
86
|
+
"--fill-pressed": shadcn("accent"),
|
|
87
|
+
"--fill-selected": shadcn("accent"),
|
|
88
|
+
"--fill-neutral": shadcn("secondary"),
|
|
89
|
+
"--fill-neutral-hover": shadcn("secondary", 0.8),
|
|
90
|
+
"--fill-field": shadcn("background"),
|
|
91
|
+
"--fill-brand": shadcn("primary"),
|
|
92
|
+
"--fill-brand-hover": shadcn("primary", 0.9),
|
|
93
|
+
"--fill-brand-subtle": shadcn("primary", 0.1),
|
|
94
|
+
"--fill-danger": "color-mix(in oklab, hsl(var(--destructive)) 74%, black)",
|
|
95
|
+
"--fill-danger-hover": "color-mix(in oklab, hsl(var(--destructive)) 66%, black)",
|
|
96
|
+
"--fill-danger-subtle": shadcn("destructive", 0.1),
|
|
97
|
+
"--shadow-1": TAILWIND_SHADOWS.xs,
|
|
98
|
+
"--shadow-2": TAILWIND_SHADOWS.sm,
|
|
99
|
+
"--shadow-3": TAILWIND_SHADOWS.md,
|
|
100
|
+
"--shadow-4": TAILWIND_SHADOWS.lg,
|
|
101
|
+
"--shadow-5": TAILWIND_SHADOWS.xl,
|
|
102
|
+
"--shadow-6": TAILWIND_SHADOWS["2xl"],
|
|
103
|
+
};
|
|
104
|
+
const SHADCN_TOKENS = {
|
|
105
|
+
...FOCUS_RING_TOKENS,
|
|
106
|
+
"--shape-control": "calc(var(--radius) - 2px)",
|
|
107
|
+
"--shape-popup": "calc(var(--radius) - 2px)",
|
|
108
|
+
"--shape-card": "calc(var(--radius) + 4px)",
|
|
109
|
+
"--shape-panel": "var(--radius)",
|
|
110
|
+
"--shape-dialog": "var(--radius)",
|
|
111
|
+
"--shape-pill": "var(--radius-full)",
|
|
112
|
+
};
|
|
113
|
+
function declarations(themeName, values) {
|
|
114
|
+
const tokens = {};
|
|
115
|
+
for (const [name, value] of Object.entries(values)) {
|
|
116
|
+
if (SLOTS.has(name)) {
|
|
117
|
+
tokens[own(name)] = value;
|
|
118
|
+
tokens[`--${name}`] = `var(${own(name)})`;
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
tokens[`--${name}`] = value;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return resolve(themeName, tokens, values);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Properties a theme sets beyond its slots (`font-sans`, `shadow-composer`),
|
|
128
|
+
* with slot references resolved to the theme's own values.
|
|
129
|
+
*/
|
|
130
|
+
export function themeProperties(themeName, properties, values) {
|
|
131
|
+
const tokens = {};
|
|
132
|
+
for (const [name, value] of Object.entries(properties)) {
|
|
133
|
+
tokens[`--${name}`] = value;
|
|
134
|
+
}
|
|
135
|
+
return resolve(themeName, tokens, values);
|
|
136
|
+
}
|
|
137
|
+
function themePalette(name, light, dark) {
|
|
138
|
+
const color = (values, slot) => {
|
|
139
|
+
const value = values[slot];
|
|
140
|
+
if (value === undefined)
|
|
141
|
+
throw new Error(`Theme ${name} has no "${slot}"`);
|
|
142
|
+
const channels = /^(-?[\d.]+) ([\d.]+)% ([\d.]+)%$/.exec(value.trim());
|
|
143
|
+
if (!channels) {
|
|
144
|
+
throw new Error(`Theme ${name}'s "${slot}" is not an H S% L% triplet`);
|
|
145
|
+
}
|
|
146
|
+
const [, hue, saturation, lightness] = channels.map(Number);
|
|
147
|
+
return new Color("hsl", [hue ?? 0, saturation ?? 0, lightness ?? 0])
|
|
148
|
+
.to("srgb")
|
|
149
|
+
.toString({ format: "hex" });
|
|
150
|
+
};
|
|
151
|
+
const input = (values) => ({
|
|
152
|
+
brand: color(values, "primary"),
|
|
153
|
+
gray: color(values, "muted-foreground"),
|
|
154
|
+
background: {
|
|
155
|
+
light: color(light, "background"),
|
|
156
|
+
dark: color(dark, "background"),
|
|
157
|
+
},
|
|
158
|
+
status: { danger: color(values, "destructive") },
|
|
159
|
+
});
|
|
160
|
+
return {
|
|
161
|
+
light: createPalette(input(light)).light,
|
|
162
|
+
dark: createPalette(input(dark)).dark,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
export function shadcnTheme({ name, label, isDefault = false, values, }) {
|
|
166
|
+
const dark = { ...values.base, ...values.dark };
|
|
167
|
+
const light = { ...values.base, ...values.light };
|
|
168
|
+
return {
|
|
169
|
+
name,
|
|
170
|
+
label,
|
|
171
|
+
isDefault,
|
|
172
|
+
base: {
|
|
173
|
+
...resolve(name, SHADCN_ROLES, values.base),
|
|
174
|
+
...declarations(name, values.base),
|
|
175
|
+
},
|
|
176
|
+
dark: {
|
|
177
|
+
...resolve(name, SHADCN_ROLES, dark),
|
|
178
|
+
...declarations(name, dark),
|
|
179
|
+
},
|
|
180
|
+
light: {
|
|
181
|
+
...resolve(name, SHADCN_ROLES, light),
|
|
182
|
+
...declarations(name, light),
|
|
183
|
+
},
|
|
184
|
+
tokens: resolve(name, SHADCN_TOKENS, values.base),
|
|
185
|
+
palette: themePalette(name, light, dark),
|
|
186
|
+
readsScales: false,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=shadcn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadcn.js","sourceRoot":"","sources":["../../src/themes/shadcn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAqB,MAAM,sBAAsB,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGxC,OAAO,EAAE,MAAM,EAAE,CAAC;AAElB;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,YAAY;IACZ,YAAY;IACZ,MAAM;IACN,iBAAiB;IACjB,SAAS;IACT,oBAAoB;IACpB,SAAS;IACT,oBAAoB;IACpB,WAAW;IACX,sBAAsB;IACtB,OAAO;IACP,kBAAkB;IAClB,QAAQ;IACR,mBAAmB;IACnB,aAAa;IACb,wBAAwB;IACxB,QAAQ;IACR,OAAO;IACP,MAAM;IACN,QAAQ;IACR,oBAAoB;IACpB,oBAAoB;IACpB,iBAAiB;IACjB,4BAA4B;IAC5B,gBAAgB;IAChB,2BAA2B;IAC3B,gBAAgB;IAChB,cAAc;CACN,CAAC;AAEX,MAAM,KAAK,GAAwB,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC;AAEzD,MAAM,SAAS,GAAG,sDAAsD,CAAC;AAEzE,MAAM,GAAG,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,WAAW,IAAI,EAAE,CAAC;AAEhD,SAAS,OAAO,CACd,SAAiB,EACjB,MAAgB,EAChB,MAAwC;IAExC,MAAM,QAAQ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AAI,EAAE,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;KACtC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,EAC1B,IAAI,EACJ,KAAK,EACL,SAAS,GAAG,KAAK,EACjB,MAAM,GAMP;IACC,MAAM,IAAI,GAAG,EAAE,GAAG,MAAM,CAAC,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;IAChD,MAAM,KAAK,GAAG,EAAE,GAAG,MAAM,CAAC,IAAI,EAAE,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;IAClD,OAAO;QACL,IAAI;QACJ,KAAK;QACL,SAAS;QACT,IAAI,EAAE;YACJ,GAAG,OAAO,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC;YAC3C,GAAG,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC;SACnC;QACD,IAAI,EAAE;YACJ,GAAG,OAAO,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC;YACpC,GAAG,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC;SAC5B;QACD,KAAK,EAAE;YACL,GAAG,OAAO,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,CAAC;YACrC,GAAG,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC;SAC7B;QACD,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC;QACjD,OAAO,EAAE,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC;QACxC,WAAW,EAAE,KAAK;KACnB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { AppearanceTokens } from "../tokens/palette.js";
|
|
2
|
+
import type { TokenMap } from "../tokens/primitives.js";
|
|
3
|
+
/**
|
|
4
|
+
* A theme's own values, keyed by custom property name without the leading
|
|
5
|
+
* dashes: the shadcn slots (`primary`, `border`, `radius`, as HSL triplets or
|
|
6
|
+
* lengths) and any other value the theme sets (`font-sans`). `base` applies at
|
|
7
|
+
* the theme root; `dark` and `light` override it under `.dark` and `.light`.
|
|
8
|
+
*/
|
|
9
|
+
export interface ThemeValues {
|
|
10
|
+
base: Readonly<Record<string, string>>;
|
|
11
|
+
dark?: Readonly<Record<string, string>>;
|
|
12
|
+
light?: Readonly<Record<string, string>>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* One theme: everything an app picks with `data-app-theme` (palette, type, shape
|
|
16
|
+
* and part sizes). Each section is written to CSS as is; none of it reads a
|
|
17
|
+
* variable an app defines.
|
|
18
|
+
*/
|
|
19
|
+
export interface ThemeDefinition {
|
|
20
|
+
/** The `data-app-theme` value: an app's name, or `agent-native`. */
|
|
21
|
+
name: string;
|
|
22
|
+
label: string;
|
|
23
|
+
/** Applied with no `data-app-theme` attribute. Exactly one theme is the default. */
|
|
24
|
+
isDefault: boolean;
|
|
25
|
+
/** Roles and values at the theme root, in its default appearance. */
|
|
26
|
+
base: TokenMap;
|
|
27
|
+
/** Under `.dark`: a complete set, so a dark subtree of a light page resolves alone. */
|
|
28
|
+
dark: TokenMap;
|
|
29
|
+
/** Under `.light`: a complete set, likewise. */
|
|
30
|
+
light: TokenMap;
|
|
31
|
+
/**
|
|
32
|
+
* The theme's own color scales in each appearance, generated from its
|
|
33
|
+
* colors, so a part's `--accent-*` and `--gray-*` steps are this theme's
|
|
34
|
+
* wherever its attribute applies.
|
|
35
|
+
*/
|
|
36
|
+
palette: {
|
|
37
|
+
light: AppearanceTokens;
|
|
38
|
+
dark: AppearanceTokens;
|
|
39
|
+
};
|
|
40
|
+
/** Appearance-independent values (sizes, shapes), set once at the theme root. */
|
|
41
|
+
tokens: TokenMap;
|
|
42
|
+
/**
|
|
43
|
+
* The roles read the color scales, so they are re-declared wherever the
|
|
44
|
+
* scales change (`.light`, `.dark`, `[data-palette]`).
|
|
45
|
+
*/
|
|
46
|
+
readsScales: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Values written only inside this theme's own scope. They override toolkit
|
|
49
|
+
* and Tailwind defaults (the sans font, the composer's radius), so they
|
|
50
|
+
* never apply without the attribute and no other theme resets them: a
|
|
51
|
+
* reset to `initial` would erase those defaults, not restore them.
|
|
52
|
+
*/
|
|
53
|
+
scopedOnly?: {
|
|
54
|
+
base: TokenMap;
|
|
55
|
+
dark: TokenMap;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/themes/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACvC,IAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACxC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAC1C;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,oFAAoF;IACpF,SAAS,EAAE,OAAO,CAAC;IACnB,qEAAqE;IACrE,IAAI,EAAE,QAAQ,CAAC;IACf,uFAAuF;IACvF,IAAI,EAAE,QAAQ,CAAC;IACf,gDAAgD;IAChD,KAAK,EAAE,QAAQ,CAAC;IAChB;;;;OAIG;IACH,OAAO,EAAE;QAAE,KAAK,EAAE,gBAAgB,CAAC;QAAC,IAAI,EAAE,gBAAgB,CAAA;KAAE,CAAC;IAC7D,iFAAiF;IACjF,MAAM,EAAE,QAAQ,CAAC;IACjB;;;OAGG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,UAAU,CAAC,EAAE;QAAE,IAAI,EAAE,QAAQ,CAAC;QAAC,IAAI,EAAE,QAAQ,CAAA;KAAE,CAAC;CACjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/themes/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `values[index]`, or a RangeError. Token tables are fixed-length; a missing
|
|
3
|
+
* step is a bug, and returning undefined would print "undefinedpx" into CSS.
|
|
4
|
+
*/
|
|
5
|
+
export declare function at<T>(values: ArrayLike<T>, index: number): T;
|
|
6
|
+
//# sourceMappingURL=at.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"at.d.ts","sourceRoot":"","sources":["../../src/tokens/at.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,CAQ5D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `values[index]`, or a RangeError. Token tables are fixed-length; a missing
|
|
3
|
+
* step is a bug, and returning undefined would print "undefinedpx" into CSS.
|
|
4
|
+
*/
|
|
5
|
+
export function at(values, index) {
|
|
6
|
+
const value = values[index];
|
|
7
|
+
if (value === undefined) {
|
|
8
|
+
throw new RangeError(`Index ${index} is out of range for a table of ${values.length}`);
|
|
9
|
+
}
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=at.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"at.js","sourceRoot":"","sources":["../../src/tokens/at.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,EAAE,CAAI,MAAoB,EAAE,KAAa;IACvD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,UAAU,CAClB,SAAS,KAAK,mCAAmC,MAAM,CAAC,MAAM,EAAE,CACjE,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Appearance } from "./color/radix-generator.js";
|
|
2
|
+
/**
|
|
3
|
+
* Appearance-level literals that are not part of any generated scale: the
|
|
4
|
+
* translucent field fill, the dialog scrim, and the shadow tint ramp. Shadows
|
|
5
|
+
* stay black in both appearances; a tinted gray would lighten them in dark.
|
|
6
|
+
*/
|
|
7
|
+
export declare const BASE_BY_APPEARANCE: Record<Appearance, {
|
|
8
|
+
field: string;
|
|
9
|
+
overlay: string;
|
|
10
|
+
shadowTint: readonly string[];
|
|
11
|
+
}>;
|
|
12
|
+
/** Tailwind v4's default shadows, which the app themes reproduce exactly. */
|
|
13
|
+
export declare const TAILWIND_SHADOWS: {
|
|
14
|
+
readonly xs: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
|
|
15
|
+
readonly sm: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)";
|
|
16
|
+
readonly md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
|
|
17
|
+
readonly lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
|
|
18
|
+
readonly xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)";
|
|
19
|
+
readonly "2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)";
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/tokens/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CACrC,UAAU,EACV;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CA4BlE,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,gBAAgB;aAC3B,EAAE,EAAE,+BAA+B;aACnC,EAAE,EAAE,+DAA+D;aACnE,EAAE,EAAE,kEAAkE;aACtE,EAAE,EAAE,oEAAoE;aACxE,EAAE,EAAE,qEAAqE;aACzE,KAAK,EAAE,qCAAqC;CACpC,CAAC"}
|