@sewadah/selaras 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -13
- package/dist/module.d.mts +10 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +120 -36
- package/dist/runtime/components/Accordion.d.vue.ts +3 -0
- package/dist/runtime/components/Accordion.vue +5 -1
- package/dist/runtime/components/Accordion.vue.d.ts +3 -0
- package/dist/runtime/components/Alert.d.vue.ts +2 -1
- package/dist/runtime/components/Alert.vue +6 -3
- package/dist/runtime/components/Alert.vue.d.ts +2 -1
- package/dist/runtime/components/AlertDialog.d.vue.ts +2 -0
- package/dist/runtime/components/AlertDialog.vue +21 -8
- package/dist/runtime/components/AlertDialog.vue.d.ts +2 -0
- package/dist/runtime/components/App.vue +9 -2
- package/dist/runtime/components/Autocomplete.d.vue.ts +22 -58
- package/dist/runtime/components/Autocomplete.vue +50 -11
- package/dist/runtime/components/Autocomplete.vue.d.ts +22 -58
- package/dist/runtime/components/Avatar.d.vue.ts +2 -1
- package/dist/runtime/components/Avatar.vue +4 -2
- package/dist/runtime/components/Avatar.vue.d.ts +2 -1
- package/dist/runtime/components/Badge.d.vue.ts +3 -2
- package/dist/runtime/components/Badge.vue +8 -5
- package/dist/runtime/components/Badge.vue.d.ts +3 -2
- package/dist/runtime/components/Breadcrumb.d.vue.ts +3 -0
- package/dist/runtime/components/Breadcrumb.vue +5 -2
- package/dist/runtime/components/Breadcrumb.vue.d.ts +3 -0
- package/dist/runtime/components/Button.d.vue.ts +5 -2
- package/dist/runtime/components/Button.vue +5 -2
- package/dist/runtime/components/Button.vue.d.ts +5 -2
- package/dist/runtime/components/Checkbox.d.vue.ts +2 -1
- package/dist/runtime/components/Checkbox.vue +4 -2
- package/dist/runtime/components/Checkbox.vue.d.ts +2 -1
- package/dist/runtime/components/Chip.d.vue.ts +2 -1
- package/dist/runtime/components/Chip.vue +4 -2
- package/dist/runtime/components/Chip.vue.d.ts +2 -1
- package/dist/runtime/components/Collapsible.d.vue.ts +3 -0
- package/dist/runtime/components/Collapsible.vue +11 -6
- package/dist/runtime/components/Collapsible.vue.d.ts +3 -0
- package/dist/runtime/components/ColorPicker.d.vue.ts +13 -3
- package/dist/runtime/components/ColorPicker.vue +60 -14
- package/dist/runtime/components/ColorPicker.vue.d.ts +13 -3
- package/dist/runtime/components/Column.d.ts +1 -1
- package/dist/runtime/components/CommandPalette.vue +18 -16
- package/dist/runtime/components/ContentNavigation.d.vue.ts +3 -0
- package/dist/runtime/components/ContentNavigation.vue +6 -3
- package/dist/runtime/components/ContentNavigation.vue.d.ts +3 -0
- package/dist/runtime/components/ContentSurround.d.vue.ts +3 -0
- package/dist/runtime/components/ContentSurround.vue +7 -4
- package/dist/runtime/components/ContentSurround.vue.d.ts +3 -0
- package/dist/runtime/components/ContentToc.d.vue.ts +3 -0
- package/dist/runtime/components/ContentToc.vue +8 -5
- package/dist/runtime/components/ContentToc.vue.d.ts +3 -0
- package/dist/runtime/components/ContextMenu.vue +3 -2
- package/dist/runtime/components/DashboardSidebar.vue +1 -1
- package/dist/runtime/components/DashboardSidebarToggle.d.vue.ts +1 -0
- package/dist/runtime/components/DashboardSidebarToggle.vue +3 -1
- package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +1 -0
- package/dist/runtime/components/DatePicker.d.vue.ts +32 -23
- package/dist/runtime/components/DatePicker.vue +130 -60
- package/dist/runtime/components/DatePicker.vue.d.ts +32 -23
- package/dist/runtime/components/Drawer.d.vue.ts +2 -0
- package/dist/runtime/components/Drawer.vue +21 -8
- package/dist/runtime/components/Drawer.vue.d.ts +2 -0
- package/dist/runtime/components/DrawerRenderer.vue +28 -21
- package/dist/runtime/components/Dropdown.d.vue.ts +14 -4
- package/dist/runtime/components/Dropdown.vue +19 -4
- package/dist/runtime/components/Dropdown.vue.d.ts +14 -4
- package/dist/runtime/components/FileTree.d.vue.ts +3 -0
- package/dist/runtime/components/FileTree.vue +7 -3
- package/dist/runtime/components/FileTree.vue.d.ts +3 -0
- package/dist/runtime/components/FileUpload.d.vue.ts +2 -1
- package/dist/runtime/components/FileUpload.vue +75 -32
- package/dist/runtime/components/FileUpload.vue.d.ts +2 -1
- package/dist/runtime/components/FormField.d.vue.ts +2 -0
- package/dist/runtime/components/FormField.vue +12 -9
- package/dist/runtime/components/FormField.vue.d.ts +2 -0
- package/dist/runtime/components/Icon.d.vue.ts +2 -4
- package/dist/runtime/components/Icon.vue +7 -2
- package/dist/runtime/components/Icon.vue.d.ts +2 -4
- package/dist/runtime/components/Input.d.vue.ts +2 -1
- package/dist/runtime/components/Input.vue +12 -6
- package/dist/runtime/components/Input.vue.d.ts +2 -1
- package/dist/runtime/components/InputNumber.d.vue.ts +4 -1
- package/dist/runtime/components/InputNumber.vue +21 -8
- package/dist/runtime/components/InputNumber.vue.d.ts +4 -1
- package/dist/runtime/components/Modal.d.vue.ts +2 -0
- package/dist/runtime/components/Modal.vue +21 -8
- package/dist/runtime/components/Modal.vue.d.ts +2 -0
- package/dist/runtime/components/ModalRenderer.vue +23 -16
- package/dist/runtime/components/NavigationMenu.d.vue.ts +2 -4
- package/dist/runtime/components/NavigationMenu.vue +6 -4
- package/dist/runtime/components/NavigationMenu.vue.d.ts +2 -4
- package/dist/runtime/components/NavigationMenuAccordionItem.d.vue.ts +2 -4
- package/dist/runtime/components/NavigationMenuAccordionItem.vue +5 -3
- package/dist/runtime/components/NavigationMenuAccordionItem.vue.d.ts +2 -4
- package/dist/runtime/components/NavigationMenuFlyoutList.d.vue.ts +2 -4
- package/dist/runtime/components/NavigationMenuFlyoutList.vue +7 -4
- package/dist/runtime/components/NavigationMenuFlyoutList.vue.d.ts +2 -4
- package/dist/runtime/components/NavigationMenuFlyoutTrigger.d.vue.ts +2 -4
- package/dist/runtime/components/NavigationMenuFlyoutTrigger.vue +9 -2
- package/dist/runtime/components/NavigationMenuFlyoutTrigger.vue.d.ts +2 -4
- package/dist/runtime/components/Pagination.d.vue.ts +3 -2
- package/dist/runtime/components/Pagination.vue.d.ts +3 -2
- package/dist/runtime/components/PinInput.d.vue.ts +2 -1
- package/dist/runtime/components/PinInput.vue +17 -6
- package/dist/runtime/components/PinInput.vue.d.ts +2 -1
- package/dist/runtime/components/Popover.d.vue.ts +2 -0
- package/dist/runtime/components/Popover.vue +14 -7
- package/dist/runtime/components/Popover.vue.d.ts +2 -0
- package/dist/runtime/components/Progress.d.vue.ts +2 -1
- package/dist/runtime/components/Progress.vue +6 -4
- package/dist/runtime/components/Progress.vue.d.ts +2 -1
- package/dist/runtime/components/ProseH1.d.vue.ts +2 -0
- package/dist/runtime/components/ProseH1.vue +7 -4
- package/dist/runtime/components/ProseH1.vue.d.ts +2 -0
- package/dist/runtime/components/ProseH2.d.vue.ts +2 -0
- package/dist/runtime/components/ProseH2.vue +7 -4
- package/dist/runtime/components/ProseH2.vue.d.ts +2 -0
- package/dist/runtime/components/ProseH3.d.vue.ts +2 -0
- package/dist/runtime/components/ProseH3.vue +7 -4
- package/dist/runtime/components/ProseH3.vue.d.ts +2 -0
- package/dist/runtime/components/ProseH4.d.vue.ts +2 -0
- package/dist/runtime/components/ProseH4.vue +7 -4
- package/dist/runtime/components/ProseH4.vue.d.ts +2 -0
- package/dist/runtime/components/ProseH5.d.vue.ts +2 -0
- package/dist/runtime/components/ProseH5.vue +7 -4
- package/dist/runtime/components/ProseH5.vue.d.ts +2 -0
- package/dist/runtime/components/ProseH6.d.vue.ts +2 -0
- package/dist/runtime/components/ProseH6.vue +7 -4
- package/dist/runtime/components/ProseH6.vue.d.ts +2 -0
- package/dist/runtime/components/RadioGroup.d.vue.ts +2 -1
- package/dist/runtime/components/RadioGroup.vue +9 -5
- package/dist/runtime/components/RadioGroup.vue.d.ts +2 -1
- package/dist/runtime/components/Rating.d.vue.ts +2 -1
- package/dist/runtime/components/Rating.vue +4 -1
- package/dist/runtime/components/Rating.vue.d.ts +2 -1
- package/dist/runtime/components/ReadMore.d.vue.ts +3 -0
- package/dist/runtime/components/ReadMore.vue +24 -6
- package/dist/runtime/components/ReadMore.vue.d.ts +3 -0
- package/dist/runtime/components/Select.d.vue.ts +21 -57
- package/dist/runtime/components/Select.vue +58 -9
- package/dist/runtime/components/Select.vue.d.ts +21 -57
- package/dist/runtime/components/Separator.d.vue.ts +2 -1
- package/dist/runtime/components/Separator.vue +4 -2
- package/dist/runtime/components/Separator.vue.d.ts +2 -1
- package/dist/runtime/components/Slideover.d.vue.ts +2 -0
- package/dist/runtime/components/Slideover.vue +21 -8
- package/dist/runtime/components/Slideover.vue.d.ts +2 -0
- package/dist/runtime/components/SlideoverRenderer.vue +25 -18
- package/dist/runtime/components/Slider.d.vue.ts +2 -1
- package/dist/runtime/components/Slider.vue +4 -1
- package/dist/runtime/components/Slider.vue.d.ts +2 -1
- package/dist/runtime/components/SplitterResizeHandle.d.vue.ts +3 -0
- package/dist/runtime/components/SplitterResizeHandle.vue +5 -2
- package/dist/runtime/components/SplitterResizeHandle.vue.d.ts +3 -0
- package/dist/runtime/components/Stepper.d.vue.ts +2 -1
- package/dist/runtime/components/Stepper.vue +4 -1
- package/dist/runtime/components/Stepper.vue.d.ts +2 -1
- package/dist/runtime/components/Switch.d.vue.ts +2 -1
- package/dist/runtime/components/Switch.vue +4 -2
- package/dist/runtime/components/Switch.vue.d.ts +2 -1
- package/dist/runtime/components/Table.d.vue.ts +28 -80
- package/dist/runtime/components/Table.vue +25 -13
- package/dist/runtime/components/Table.vue.d.ts +28 -80
- package/dist/runtime/components/Tabs.d.vue.ts +3 -0
- package/dist/runtime/components/Tabs.vue +5 -1
- package/dist/runtime/components/Tabs.vue.d.ts +3 -0
- package/dist/runtime/components/Textarea.d.vue.ts +2 -1
- package/dist/runtime/components/Textarea.vue +11 -6
- package/dist/runtime/components/Textarea.vue.d.ts +2 -1
- package/dist/runtime/components/Theme.d.vue.ts +16 -5
- package/dist/runtime/components/Theme.vue +30 -5
- package/dist/runtime/components/Theme.vue.d.ts +16 -5
- package/dist/runtime/components/Toast.vue +11 -39
- package/dist/runtime/components/Toggle.d.vue.ts +2 -1
- package/dist/runtime/components/Toggle.vue +4 -1
- package/dist/runtime/components/Toggle.vue.d.ts +2 -1
- package/dist/runtime/components/ToggleGroup.d.vue.ts +2 -1
- package/dist/runtime/components/ToggleGroup.vue +4 -1
- package/dist/runtime/components/ToggleGroup.vue.d.ts +2 -1
- package/dist/runtime/components/Tooltip.vue +3 -2
- package/dist/runtime/components/Tree.d.vue.ts +5 -2
- package/dist/runtime/components/Tree.vue +5 -1
- package/dist/runtime/components/Tree.vue.d.ts +5 -2
- package/dist/runtime/composables/use-drawer.d.ts +1 -22
- package/dist/runtime/composables/use-drawer.js +12 -18
- package/dist/runtime/composables/use-form-field.d.ts +1 -0
- package/dist/runtime/composables/use-icons.d.ts +2 -2
- package/dist/runtime/composables/use-icons.js +1 -1
- package/dist/runtime/composables/use-locale.d.ts +2 -2
- package/dist/runtime/composables/use-locale.js +1 -1
- package/dist/runtime/composables/use-media-query.d.ts +6 -8
- package/dist/runtime/composables/use-media-query.js +7 -2
- package/dist/runtime/composables/use-messages.d.ts +2 -2
- package/dist/runtime/composables/use-messages.js +1 -1
- package/dist/runtime/composables/use-modal.d.ts +1 -17
- package/dist/runtime/composables/use-modal.js +12 -18
- package/dist/runtime/composables/use-ripple.d.ts +2 -2
- package/dist/runtime/composables/use-ripple.js +1 -1
- package/dist/runtime/composables/use-slideover.d.ts +1 -19
- package/dist/runtime/composables/use-slideover.js +12 -18
- package/dist/runtime/composables/use-table.d.ts +74 -17
- package/dist/runtime/composables/use-table.js +4 -1
- package/dist/runtime/composables/use-toast.d.ts +8 -8
- package/dist/runtime/composables/use-toast.js +9 -11
- package/dist/runtime/default-color-metadata.d.ts +4 -0
- package/dist/runtime/default-color-metadata.js +4 -0
- package/dist/runtime/default-colors.css +1 -0
- package/dist/runtime/internal/ColorPickerBody.d.vue.ts +1 -0
- package/dist/runtime/internal/ColorPickerBody.vue +24 -1
- package/dist/runtime/internal/ColorPickerBody.vue.d.ts +1 -0
- package/dist/runtime/internal/ComboboxSelectBase.d.vue.ts +50 -46
- package/dist/runtime/internal/ComboboxSelectBase.vue +340 -93
- package/dist/runtime/internal/ComboboxSelectBase.vue.d.ts +50 -46
- package/dist/runtime/internal/ComboboxSelectBody.d.vue.ts +29 -23
- package/dist/runtime/internal/ComboboxSelectBody.vue +74 -40
- package/dist/runtime/internal/ComboboxSelectBody.vue.d.ts +29 -23
- package/dist/runtime/internal/DatePickerCalendarBody.d.vue.ts +3 -5
- package/dist/runtime/internal/DatePickerCalendarBody.vue +2 -2
- package/dist/runtime/internal/DatePickerCalendarBody.vue.d.ts +3 -5
- package/dist/runtime/internal/DatePickerRangeCalendarBody.d.vue.ts +3 -5
- package/dist/runtime/internal/DatePickerRangeCalendarBody.vue +1 -1
- package/dist/runtime/internal/DatePickerRangeCalendarBody.vue.d.ts +3 -5
- package/dist/runtime/internal/DatePickerTimeBody.d.vue.ts +2 -4
- package/dist/runtime/internal/DatePickerTimeBody.vue.d.ts +2 -4
- package/dist/runtime/internal/ProgrammaticTheme.d.vue.ts +17 -0
- package/dist/runtime/internal/ProgrammaticTheme.vue +41 -0
- package/dist/runtime/internal/ProgrammaticTheme.vue.d.ts +17 -0
- package/dist/runtime/internal/TimeStepper.vue +1 -1
- package/dist/runtime/internal/ToastItemRenderer.d.vue.ts +14 -0
- package/dist/runtime/internal/ToastItemRenderer.vue +54 -0
- package/dist/runtime/internal/ToastItemRenderer.vue.d.ts +14 -0
- package/dist/runtime/internal/combobox-select.d.ts +52 -0
- package/dist/runtime/{composables/use-combobox-select.js → internal/combobox-select.js} +26 -11
- package/dist/runtime/internal/programmatic-services.d.ts +71 -0
- package/dist/runtime/internal/programmatic-services.js +61 -0
- package/dist/runtime/prose.css +1 -1
- package/dist/runtime/structural.css +1 -0
- package/dist/runtime/table.d.ts +3 -0
- package/dist/runtime/table.js +1 -0
- package/dist/runtime/theme/accordion.d.ts +27 -0
- package/dist/runtime/theme/accordion.js +15 -6
- package/dist/runtime/theme/alert-dialog.js +5 -5
- package/dist/runtime/theme/alert.js +6 -15
- package/dist/runtime/theme/avatar-group.js +2 -2
- package/dist/runtime/theme/avatar.js +12 -18
- package/dist/runtime/theme/badge.d.ts +39 -9
- package/dist/runtime/theme/badge.js +11 -40
- package/dist/runtime/theme/breadcrumb.d.ts +29 -47
- package/dist/runtime/theme/breadcrumb.js +16 -5
- package/dist/runtime/theme/button.d.ts +45 -15
- package/dist/runtime/theme/button.js +10 -57
- package/dist/runtime/theme/callout.js +7 -7
- package/dist/runtime/theme/card.js +7 -7
- package/dist/runtime/theme/checkbox.d.ts +21 -84
- package/dist/runtime/theme/checkbox.js +15 -36
- package/dist/runtime/theme/chip.js +4 -22
- package/dist/runtime/theme/code-button.js +2 -2
- package/dist/runtime/theme/code-tree.d.ts +3 -3
- package/dist/runtime/theme/code-tree.js +4 -4
- package/dist/runtime/theme/collapsible.d.ts +27 -0
- package/dist/runtime/theme/collapsible.js +12 -3
- package/dist/runtime/theme/color-picker.d.ts +18 -54
- package/dist/runtime/theme/color-picker.js +19 -18
- package/dist/runtime/theme/command-palette.d.ts +6 -6
- package/dist/runtime/theme/command-palette.js +12 -10
- package/dist/runtime/theme/content-navigation.d.ts +27 -0
- package/dist/runtime/theme/content-navigation.js +14 -5
- package/dist/runtime/theme/content-surround.d.ts +27 -0
- package/dist/runtime/theme/content-surround.js +13 -4
- package/dist/runtime/theme/content-toc.d.ts +27 -0
- package/dist/runtime/theme/content-toc.js +14 -5
- package/dist/runtime/theme/context-menu.js +7 -7
- package/dist/runtime/theme/dashboard-navbar.d.ts +6 -6
- package/dist/runtime/theme/dashboard-navbar.js +2 -2
- package/dist/runtime/theme/dashboard-resize-handle.js +3 -3
- package/dist/runtime/theme/dashboard-sidebar.js +3 -3
- package/dist/runtime/theme/date-picker.js +10 -10
- package/dist/runtime/theme/drawer.js +9 -9
- package/dist/runtime/theme/dropdown.js +7 -7
- package/dist/runtime/theme/file-tree.d.ts +27 -0
- package/dist/runtime/theme/file-tree.js +12 -3
- package/dist/runtime/theme/file-upload.d.ts +18 -72
- package/dist/runtime/theme/file-upload.js +20 -19
- package/dist/runtime/theme/form-field.js +5 -5
- package/dist/runtime/theme/header.d.ts +3 -3
- package/dist/runtime/theme/header.js +1 -1
- package/dist/runtime/theme/icon.d.ts +30 -57
- package/dist/runtime/theme/icon.js +19 -9
- package/dist/runtime/theme/input-number.d.ts +21 -63
- package/dist/runtime/theme/input-number.js +12 -12
- package/dist/runtime/theme/input.d.ts +21 -63
- package/dist/runtime/theme/input.js +12 -12
- package/dist/runtime/theme/kbd.js +1 -1
- package/dist/runtime/theme/modal.js +4 -4
- package/dist/runtime/theme/navigation-menu.d.ts +2 -0
- package/dist/runtime/theme/navigation-menu.js +17 -28
- package/dist/runtime/theme/page-header.js +3 -3
- package/dist/runtime/theme/pagination.js +1 -1
- package/dist/runtime/theme/pin-input.d.ts +21 -63
- package/dist/runtime/theme/pin-input.js +13 -11
- package/dist/runtime/theme/popover.js +2 -2
- package/dist/runtime/theme/progress.d.ts +21 -84
- package/dist/runtime/theme/progress.js +12 -12
- package/dist/runtime/theme/prose.d.ts +29 -50
- package/dist/runtime/theme/prose.js +22 -11
- package/dist/runtime/theme/radio-group.d.ts +21 -84
- package/dist/runtime/theme/radio-group.js +16 -22
- package/dist/runtime/theme/rating.d.ts +21 -63
- package/dist/runtime/theme/rating.js +10 -10
- package/dist/runtime/theme/read-more.d.ts +27 -0
- package/dist/runtime/theme/read-more.js +13 -4
- package/dist/runtime/theme/scroll-area.d.ts +3 -3
- package/dist/runtime/theme/scroll-area.js +2 -2
- package/dist/runtime/theme/select.d.ts +21 -54
- package/dist/runtime/theme/select.js +32 -24
- package/dist/runtime/theme/separator.d.ts +18 -54
- package/dist/runtime/theme/separator.js +16 -12
- package/dist/runtime/theme/skeleton.js +4 -4
- package/dist/runtime/theme/slideover.js +5 -5
- package/dist/runtime/theme/slider.d.ts +21 -84
- package/dist/runtime/theme/slider.js +14 -14
- package/dist/runtime/theme/splitter-resize-handle.d.ts +27 -0
- package/dist/runtime/theme/splitter-resize-handle.js +11 -1
- package/dist/runtime/theme/stepper.d.ts +21 -84
- package/dist/runtime/theme/stepper.js +12 -33
- package/dist/runtime/theme/switch.d.ts +21 -84
- package/dist/runtime/theme/switch.js +13 -13
- package/dist/runtime/theme/table.d.ts +27 -0
- package/dist/runtime/theme/table.js +31 -21
- package/dist/runtime/theme/tabs.d.ts +27 -0
- package/dist/runtime/theme/tabs.js +17 -7
- package/dist/runtime/theme/textarea.d.ts +21 -63
- package/dist/runtime/theme/textarea.js +12 -12
- package/dist/runtime/theme/toast.d.ts +12 -48
- package/dist/runtime/theme/toast.js +9 -9
- package/dist/runtime/theme/toggle-group.js +5 -11
- package/dist/runtime/theme/toggle.js +2 -12
- package/dist/runtime/theme/tooltip.d.ts +3 -3
- package/dist/runtime/theme/tooltip.js +3 -3
- package/dist/runtime/theme/tree.d.ts +27 -0
- package/dist/runtime/theme/tree.js +13 -3
- package/dist/runtime/theme-api.d.ts +15 -0
- package/dist/runtime/theme-api.js +12 -0
- package/dist/runtime/theme-config.d.ts +470 -0
- package/dist/runtime/theme-config.js +0 -0
- package/dist/runtime/theme.css +1 -1
- package/dist/runtime/types/app-config.d.ts +11 -8
- package/dist/runtime/types/index.d.ts +19 -1
- package/dist/runtime/utils/app-scoped-state.d.ts +2 -0
- package/dist/runtime/utils/app-scoped-state.js +13 -0
- package/dist/runtime/utils/autocomplete-contracts.d.ts +24 -0
- package/dist/runtime/utils/autocomplete-contracts.js +0 -0
- package/dist/runtime/utils/color-registry.d.ts +60 -0
- package/dist/runtime/utils/color-registry.js +187 -0
- package/dist/runtime/utils/dtcg-colors.d.ts +25 -0
- package/dist/runtime/utils/dtcg-colors.js +40 -0
- package/dist/runtime/utils/functional-tokens.d.ts +26 -0
- package/dist/runtime/utils/functional-tokens.js +54 -0
- package/dist/runtime/utils/icons.d.ts +3 -0
- package/dist/runtime/utils/icons.js +4 -0
- package/dist/runtime/utils/injection-keys.d.ts +12 -3
- package/dist/runtime/utils/native-input.d.ts +5 -0
- package/dist/runtime/utils/native-input.js +32 -0
- package/dist/runtime/utils/programmatic-theme.d.ts +17 -0
- package/dist/runtime/utils/programmatic-theme.js +59 -0
- package/dist/runtime/utils/registered-colors.d.ts +3 -0
- package/dist/runtime/utils/registered-colors.js +14 -0
- package/dist/runtime/utils/seed-colors.d.ts +18 -0
- package/dist/runtime/utils/seed-colors.js +199 -0
- package/dist/runtime/utils/select-contracts.d.ts +101 -0
- package/dist/runtime/utils/select-contracts.js +0 -0
- package/dist/runtime/utils/table-contracts.d.ts +60 -0
- package/dist/runtime/utils/table-contracts.js +0 -0
- package/dist/runtime/utils/ui.d.ts +26 -4
- package/dist/runtime/utils/ui.js +38 -5
- package/dist/tokens/default-colors.tokens.json +879 -0
- package/package.json +66 -10
- package/dist/runtime/composables/use-combobox-select.d.ts +0 -45
|
@@ -1,83 +1,31 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
estimateSize?: number;
|
|
25
|
-
overscan?: number;
|
|
26
|
-
};
|
|
27
|
-
/** Opts out of the local sorted/filtered/paginated row models - set when `data` is already sorted/filtered/paginated server-side, so this table doesn't redundantly (and incorrectly) reprocess an already-server-processed slice. `sorting`/`globalFilter`/`pageIndex` still drive the UI and still emit their `update:*` events the same way - only the *local row model* is skipped, not the state itself. `manualPagination` also suppresses the built-in Pagination UI entirely (there's no way to know the real page count from a server-paginated slice) - bring your own `SPagination`, bound to your own server metadata, the same way this table already expects you to bring your own search input for `globalFilter`. */
|
|
28
|
-
manualSorting?: boolean;
|
|
29
|
-
manualFiltering?: boolean;
|
|
30
|
-
manualPagination?: boolean;
|
|
31
|
-
/** Adds a class to a body row based on its own data - e.g. highlighting a flagged row. Called per row, not per render, so keep it cheap. */
|
|
32
|
-
rowClass?: (row: unknown) => string | undefined;
|
|
33
|
-
/** Same as `rowClass`, for inline styles. */
|
|
34
|
-
rowStyle?: (row: unknown) => Record<string, string> | undefined;
|
|
35
|
-
ui?: UiProp<TableThemeSlots>;
|
|
36
|
-
}
|
|
37
|
-
export interface TableEmits {
|
|
38
|
-
'update:sorting': [value: any[]];
|
|
39
|
-
'update:rowSelection': [value: Record<string, boolean>];
|
|
40
|
-
'update:globalFilter': [value: string];
|
|
41
|
-
'update:pageIndex': [value: number];
|
|
42
|
-
'update:expanded': [value: any];
|
|
43
|
-
'update:columnVisibility': [value: Record<string, boolean>];
|
|
44
|
-
'rowClick': [row: unknown, event: MouseEvent];
|
|
45
|
-
'rowContextmenu': [row: unknown, event: MouseEvent];
|
|
46
|
-
}
|
|
47
|
-
declare var __VLS_44: {
|
|
48
|
-
row: import("@tanstack/vue-table").RowData;
|
|
49
|
-
}, __VLS_51: {};
|
|
50
|
-
type __VLS_Slots = {} & {
|
|
51
|
-
expanded?: (props: typeof __VLS_44) => any;
|
|
52
|
-
} & {
|
|
53
|
-
empty?: (props: typeof __VLS_51) => any;
|
|
1
|
+
import type { RowData } from '@tanstack/vue-table';
|
|
2
|
+
import type { TableProps, TableSlots } from '../utils/table-contracts.js';
|
|
3
|
+
declare const __VLS_export: <TData extends RowData = RowData>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<TableProps<TData> & {
|
|
5
|
+
"onUpdate:sorting"?: ((value: import("@tanstack/vue-table").SortingState) => any) | undefined;
|
|
6
|
+
"onUpdate:rowSelection"?: ((value: import("@tanstack/vue-table").RowSelectionState) => any) | undefined;
|
|
7
|
+
"onUpdate:globalFilter"?: ((value: string) => any) | undefined;
|
|
8
|
+
"onUpdate:pageIndex"?: ((value: number) => any) | undefined;
|
|
9
|
+
"onUpdate:expanded"?: ((value: import("@tanstack/vue-table").ExpandedState) => any) | undefined;
|
|
10
|
+
"onUpdate:columnVisibility"?: ((value: import("@tanstack/vue-table").ColumnVisibilityState) => any) | undefined;
|
|
11
|
+
onRowClick?: ((row: TData, event: MouseEvent) => any) | undefined;
|
|
12
|
+
onRowContextmenu?: ((row: TData, event: MouseEvent) => any) | undefined;
|
|
13
|
+
}> & (typeof globalThis extends {
|
|
14
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
15
|
+
} ? P : {});
|
|
16
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
17
|
+
exportCsv: (filename?: string) => void;
|
|
18
|
+
}>) => void;
|
|
19
|
+
attrs: any;
|
|
20
|
+
slots: TableSlots<TData>;
|
|
21
|
+
emit: ((evt: "update:sorting", value: import("@tanstack/vue-table").SortingState) => void) & ((evt: "update:rowSelection", value: import("@tanstack/vue-table").RowSelectionState) => void) & ((evt: "update:globalFilter", value: string) => void) & ((evt: "update:pageIndex", value: number) => void) & ((evt: "update:expanded", value: import("@tanstack/vue-table").ExpandedState) => void) & ((evt: "update:columnVisibility", value: import("@tanstack/vue-table").ColumnVisibilityState) => void) & ((evt: "rowClick", row: TData, event: MouseEvent) => void) & ((evt: "rowContextmenu", row: TData, event: MouseEvent) => void);
|
|
22
|
+
}>) => import("vue").VNode & {
|
|
23
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
54
24
|
};
|
|
55
|
-
declare const __VLS_base: import("vue").DefineComponent<TableProps, {
|
|
56
|
-
exportCsv: (filename?: string) => void;
|
|
57
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
58
|
-
"update:sorting": (value: any[]) => any;
|
|
59
|
-
"update:rowSelection": (value: Record<string, boolean>) => any;
|
|
60
|
-
"update:globalFilter": (value: string) => any;
|
|
61
|
-
"update:pageIndex": (value: number) => any;
|
|
62
|
-
"update:expanded": (value: any) => any;
|
|
63
|
-
"update:columnVisibility": (value: Record<string, boolean>) => any;
|
|
64
|
-
rowClick: (row: unknown, event: MouseEvent) => any;
|
|
65
|
-
rowContextmenu: (row: unknown, event: MouseEvent) => any;
|
|
66
|
-
}, string, import("vue").PublicProps, Readonly<TableProps> & Readonly<{
|
|
67
|
-
"onUpdate:sorting"?: ((value: any[]) => any) | undefined;
|
|
68
|
-
"onUpdate:rowSelection"?: ((value: Record<string, boolean>) => any) | undefined;
|
|
69
|
-
"onUpdate:globalFilter"?: ((value: string) => any) | undefined;
|
|
70
|
-
"onUpdate:pageIndex"?: ((value: number) => any) | undefined;
|
|
71
|
-
"onUpdate:expanded"?: ((value: any) => any) | undefined;
|
|
72
|
-
"onUpdate:columnVisibility"?: ((value: Record<string, boolean>) => any) | undefined;
|
|
73
|
-
onRowClick?: ((row: unknown, event: MouseEvent) => any) | undefined;
|
|
74
|
-
onRowContextmenu?: ((row: unknown, event: MouseEvent) => any) | undefined;
|
|
75
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
76
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
77
25
|
declare const _default: typeof __VLS_export;
|
|
78
26
|
export default _default;
|
|
79
|
-
type
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
};
|
|
27
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
28
|
+
[K in keyof T]: T[K];
|
|
29
|
+
} : {
|
|
30
|
+
[K in keyof T as K]: T[K];
|
|
31
|
+
}) & {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { TabsThemeSlots } from '../theme/tabs.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { tabsTheme } from '../theme/tabs.js';
|
|
5
6
|
type TabsVariants = VariantProps<typeof tabsTheme>;
|
|
@@ -14,6 +15,8 @@ export interface TabsProps {
|
|
|
14
15
|
variant?: TabsVariants['variant'];
|
|
15
16
|
defaultValue?: string;
|
|
16
17
|
modelValue?: string;
|
|
18
|
+
/** The active tab's text and underline accent. @default 'primary' */
|
|
19
|
+
color?: ColorRole;
|
|
17
20
|
ui?: UiProp<TabsThemeSlots>;
|
|
18
21
|
}
|
|
19
22
|
export interface TabsEmits {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { TabsContent, TabsIndicator, TabsList, TabsRoot, TabsTrigger } from "reka-ui";
|
|
3
3
|
import { computed } from "vue";
|
|
4
4
|
import { tabsTheme } from "../theme/tabs";
|
|
5
|
+
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
5
6
|
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
6
7
|
import Icon from "./Icon.vue";
|
|
7
8
|
defineOptions({ inheritAttrs: false });
|
|
@@ -10,11 +11,13 @@ const props = defineProps({
|
|
|
10
11
|
variant: { type: null, required: false },
|
|
11
12
|
defaultValue: { type: String, required: false },
|
|
12
13
|
modelValue: { type: String, required: false },
|
|
14
|
+
color: { type: null, required: false },
|
|
13
15
|
ui: { type: Object, required: false }
|
|
14
16
|
});
|
|
15
17
|
defineEmits(["update:modelValue"]);
|
|
16
18
|
const theme = useComponentTheme("tabs", tabsTheme);
|
|
17
|
-
const
|
|
19
|
+
const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "primary", "primary"));
|
|
20
|
+
const ui = computed(() => theme.value({ variant: props.variant, color: effectiveColor.value }));
|
|
18
21
|
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
19
22
|
const listProps = computed(() => resolveSlot(ui.value.list, props.ui?.list));
|
|
20
23
|
const triggerProps = computed(() => resolveSlot(ui.value.trigger, props.ui?.trigger));
|
|
@@ -30,6 +33,7 @@ function itemValue(item, index) {
|
|
|
30
33
|
<TabsRoot
|
|
31
34
|
:default-value="defaultValue"
|
|
32
35
|
:model-value="modelValue"
|
|
36
|
+
:data-selaras-color="effectiveColor"
|
|
33
37
|
v-bind="rootProps"
|
|
34
38
|
@update:model-value="(value) => $emit('update:modelValue', value)"
|
|
35
39
|
>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { TabsThemeSlots } from '../theme/tabs.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { tabsTheme } from '../theme/tabs.js';
|
|
5
6
|
type TabsVariants = VariantProps<typeof tabsTheme>;
|
|
@@ -14,6 +15,8 @@ export interface TabsProps {
|
|
|
14
15
|
variant?: TabsVariants['variant'];
|
|
15
16
|
defaultValue?: string;
|
|
16
17
|
modelValue?: string;
|
|
18
|
+
/** The active tab's text and underline accent. @default 'primary' */
|
|
19
|
+
color?: ColorRole;
|
|
17
20
|
ui?: UiProp<TabsThemeSlots>;
|
|
18
21
|
}
|
|
19
22
|
export interface TabsEmits {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { TextareaThemeSlots } from '../theme/textarea.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { textareaTheme } from '../theme/textarea.js';
|
|
5
6
|
type TextareaVariants = VariantProps<typeof textareaTheme>;
|
|
@@ -13,7 +14,7 @@ export interface TextareaProps {
|
|
|
13
14
|
disabled?: boolean;
|
|
14
15
|
invalid?: boolean;
|
|
15
16
|
/** The focus-ring color - the resting (unfocused) ring stays neutral regardless. */
|
|
16
|
-
color?:
|
|
17
|
+
color?: ColorRole;
|
|
17
18
|
clearable?: boolean;
|
|
18
19
|
icon?: string;
|
|
19
20
|
trailingIcon?: string;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { computed, nextTick, onMounted, ref, watch } from "vue";
|
|
2
|
+
import { computed, mergeProps, nextTick, onMounted, ref, watch } from "vue";
|
|
3
3
|
import { useFormField } from "../composables/use-form-field";
|
|
4
4
|
import { useIcons } from "../composables/use-icons";
|
|
5
5
|
import { useMessages } from "../composables/use-messages";
|
|
6
6
|
import { textareaTheme } from "../theme/textarea";
|
|
7
|
-
import {
|
|
7
|
+
import { isNativeInputA11yAttr, isNativeInputAttr } from "../utils/native-input";
|
|
8
|
+
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
9
|
+
import { resolveSlot, useComponentTheme, useFallthroughAttrs, useRootProps } from "../utils/ui";
|
|
8
10
|
import Button from "./Button.vue";
|
|
9
11
|
import Icon from "./Icon.vue";
|
|
10
12
|
defineOptions({ inheritAttrs: false });
|
|
@@ -40,16 +42,19 @@ const clearSize = computed(() => ({ sm: "sm", md: "sm", lg: "md" })[effectiveSiz
|
|
|
40
42
|
const icons = useIcons();
|
|
41
43
|
const messages = useMessages();
|
|
42
44
|
const theme = useComponentTheme("textarea", textareaTheme);
|
|
45
|
+
const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "primary", "primary"));
|
|
43
46
|
const ui = computed(() => theme.value({
|
|
44
47
|
size: effectiveSize.value,
|
|
45
|
-
color:
|
|
48
|
+
color: effectiveColor.value,
|
|
46
49
|
invalid: textareaInvalid.value,
|
|
47
50
|
hasLeadingIcon: !!props.icon,
|
|
48
51
|
hasTrailingIcon: !!props.trailingIcon || showClear.value,
|
|
49
52
|
autoresize: props.autoresize
|
|
50
53
|
}));
|
|
51
|
-
const
|
|
52
|
-
const
|
|
54
|
+
const isTextareaAttr = (key) => isNativeInputAttr(key) || isNativeInputA11yAttr(key);
|
|
55
|
+
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root, { exclude: isTextareaAttr });
|
|
56
|
+
const nativeTextareaAttrs = useFallthroughAttrs(isTextareaAttr);
|
|
57
|
+
const baseProps = computed(() => mergeProps(resolveSlot(ui.value.base, props.ui?.base), nativeTextareaAttrs.value));
|
|
53
58
|
const textareaRef = ref();
|
|
54
59
|
async function resize() {
|
|
55
60
|
if (!props.autoresize || !textareaRef.value)
|
|
@@ -73,7 +78,7 @@ watch(() => props.modelValue, resize);
|
|
|
73
78
|
</script>
|
|
74
79
|
|
|
75
80
|
<template>
|
|
76
|
-
<div v-bind="rootProps">
|
|
81
|
+
<div :data-selaras-color="textareaInvalid ? 'danger' : effectiveColor" v-bind="rootProps">
|
|
77
82
|
<Icon v-if="icon" :name="icon" v-bind="resolveSlot(ui.leadingIcon, props.ui?.leadingIcon)" />
|
|
78
83
|
<textarea
|
|
79
84
|
:id="textareaId"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { TextareaThemeSlots } from '../theme/textarea.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { textareaTheme } from '../theme/textarea.js';
|
|
5
6
|
type TextareaVariants = VariantProps<typeof textareaTheme>;
|
|
@@ -13,7 +14,7 @@ export interface TextareaProps {
|
|
|
13
14
|
disabled?: boolean;
|
|
14
15
|
invalid?: boolean;
|
|
15
16
|
/** The focus-ring color - the resting (unfocused) ring stays neutral regardless. */
|
|
16
|
-
color?:
|
|
17
|
+
color?: ColorRole;
|
|
17
18
|
clearable?: boolean;
|
|
18
19
|
icon?: string;
|
|
19
20
|
trailingIcon?: string;
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
import type { ThemeDefaults, ThemeUiOverrides } from '../theme-config.js';
|
|
3
|
+
import type { RuntimeTokenOverrides } from '../utils/color-registry.js';
|
|
1
4
|
export interface ThemeProps {
|
|
2
|
-
/** Component-name-keyed slot-class overrides, same shape as app.config.ui but scoped to this subtree instead of the whole app - e.g. `{ button: { slots: { base: 'rounded-full' } } }`. */
|
|
3
|
-
ui?:
|
|
5
|
+
/** Component-name-keyed slot-class overrides, same shape as app.config.selaras.ui but scoped to this subtree instead of the whole app - e.g. `{ button: { slots: { base: 'rounded-full' } } }`. */
|
|
6
|
+
ui?: ThemeUiOverrides;
|
|
4
7
|
/** Component-name-keyed prop-default overrides - e.g. `{ button: { size: 'lg' } }`. Only respected by components that opt into reading useThemeProps for a given prop (see theming.md's "STheme" section for which ones currently do); an explicit prop on the component itself always wins. */
|
|
5
|
-
|
|
8
|
+
defaults?: ThemeDefaults;
|
|
9
|
+
/** Runtime role and functional token overrides by mode. Requires a DOM boundary through `as`. */
|
|
10
|
+
tokens?: RuntimeTokenOverrides;
|
|
11
|
+
/** Explicit DOM element/component that owns this theme scope. */
|
|
12
|
+
as?: string | Component;
|
|
13
|
+
/** Managed semantic mode. Explicit light/dark requires a DOM boundary. */
|
|
14
|
+
mode?: 'inherit' | 'light' | 'dark';
|
|
6
15
|
}
|
|
7
|
-
declare var
|
|
16
|
+
declare var __VLS_8: {}, __VLS_10: {};
|
|
8
17
|
type __VLS_Slots = {} & {
|
|
9
|
-
default?: (props: typeof
|
|
18
|
+
default?: (props: typeof __VLS_8) => any;
|
|
19
|
+
} & {
|
|
20
|
+
default?: (props: typeof __VLS_10) => any;
|
|
10
21
|
};
|
|
11
22
|
declare const __VLS_base: import("vue").DefineComponent<ThemeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ThemeProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
23
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,18 +1,43 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { computed, inject, provide } from "vue";
|
|
2
|
+
import { computed, inject, provide, useId, watchEffect } from "vue";
|
|
3
|
+
import { useAppConfig, useHead } from "#imports";
|
|
4
|
+
import { generateRuntimeTokenOverrideCss, mergeRuntimeTokenOverrides } from "../utils/color-registry";
|
|
3
5
|
import { THEME_INJECTION_KEY } from "../utils/injection-keys";
|
|
4
6
|
const props = defineProps({
|
|
5
|
-
ui: { type:
|
|
6
|
-
|
|
7
|
+
ui: { type: null, required: false },
|
|
8
|
+
defaults: { type: null, required: false },
|
|
9
|
+
tokens: { type: Object, required: false },
|
|
10
|
+
as: { type: null, required: false },
|
|
11
|
+
mode: { type: String, required: false }
|
|
7
12
|
});
|
|
8
13
|
const parent = inject(THEME_INJECTION_KEY, void 0);
|
|
14
|
+
const appConfig = useAppConfig();
|
|
15
|
+
const scopeId = `s${useId()}`;
|
|
16
|
+
const mode = computed(() => props.mode && props.mode !== "inherit" ? props.mode : parent?.value.mode ?? "root");
|
|
17
|
+
const inheritedTokens = computed(() => parent?.value.tokens ?? appConfig.selaras?.tokens);
|
|
18
|
+
const effectiveTokens = computed(() => props.as ? mergeRuntimeTokenOverrides(inheritedTokens.value, props.tokens) : inheritedTokens.value);
|
|
19
|
+
watchEffect(() => {
|
|
20
|
+
if (!props.as && (props.tokens || props.mode && props.mode !== "inherit"))
|
|
21
|
+
throw new Error("STheme tokens and explicit mode require a DOM boundary through the as prop.");
|
|
22
|
+
});
|
|
9
23
|
provide(THEME_INJECTION_KEY, computed(() => ({
|
|
10
24
|
ui: props.ui,
|
|
11
|
-
|
|
25
|
+
defaults: props.defaults,
|
|
26
|
+
scopeId: props.as ? scopeId : parent?.value?.scopeId,
|
|
27
|
+
tokens: effectiveTokens.value,
|
|
28
|
+
mode: mode.value,
|
|
12
29
|
parent: parent?.value
|
|
13
30
|
})));
|
|
31
|
+
const scopeSelector = `[data-selaras-theme="${scopeId}"]`;
|
|
32
|
+
const scopedTokenCss = computed(() => props.as ? generateRuntimeTokenOverrideCss(effectiveTokens.value ?? {}, scopeSelector) : "");
|
|
33
|
+
useHead({
|
|
34
|
+
style: [{ key: `selaras-theme-${scopeId}`, textContent: () => scopedTokenCss.value || void 0 }]
|
|
35
|
+
});
|
|
14
36
|
</script>
|
|
15
37
|
|
|
16
38
|
<template>
|
|
17
|
-
<
|
|
39
|
+
<component :is="as" v-if="as" :data-selaras-theme="scopeId" :data-selaras-mode="mode" :style="mode === 'root' ? void 0 : { colorScheme: mode }">
|
|
40
|
+
<slot />
|
|
41
|
+
</component>
|
|
42
|
+
<slot v-else />
|
|
18
43
|
</template>
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
import type { ThemeDefaults, ThemeUiOverrides } from '../theme-config.js';
|
|
3
|
+
import type { RuntimeTokenOverrides } from '../utils/color-registry.js';
|
|
1
4
|
export interface ThemeProps {
|
|
2
|
-
/** Component-name-keyed slot-class overrides, same shape as app.config.ui but scoped to this subtree instead of the whole app - e.g. `{ button: { slots: { base: 'rounded-full' } } }`. */
|
|
3
|
-
ui?:
|
|
5
|
+
/** Component-name-keyed slot-class overrides, same shape as app.config.selaras.ui but scoped to this subtree instead of the whole app - e.g. `{ button: { slots: { base: 'rounded-full' } } }`. */
|
|
6
|
+
ui?: ThemeUiOverrides;
|
|
4
7
|
/** Component-name-keyed prop-default overrides - e.g. `{ button: { size: 'lg' } }`. Only respected by components that opt into reading useThemeProps for a given prop (see theming.md's "STheme" section for which ones currently do); an explicit prop on the component itself always wins. */
|
|
5
|
-
|
|
8
|
+
defaults?: ThemeDefaults;
|
|
9
|
+
/** Runtime role and functional token overrides by mode. Requires a DOM boundary through `as`. */
|
|
10
|
+
tokens?: RuntimeTokenOverrides;
|
|
11
|
+
/** Explicit DOM element/component that owns this theme scope. */
|
|
12
|
+
as?: string | Component;
|
|
13
|
+
/** Managed semantic mode. Explicit light/dark requires a DOM boundary. */
|
|
14
|
+
mode?: 'inherit' | 'light' | 'dark';
|
|
6
15
|
}
|
|
7
|
-
declare var
|
|
16
|
+
declare var __VLS_8: {}, __VLS_10: {};
|
|
8
17
|
type __VLS_Slots = {} & {
|
|
9
|
-
default?: (props: typeof
|
|
18
|
+
default?: (props: typeof __VLS_8) => any;
|
|
19
|
+
} & {
|
|
20
|
+
default?: (props: typeof __VLS_10) => any;
|
|
10
21
|
};
|
|
11
22
|
declare const __VLS_base: import("vue").DefineComponent<ThemeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ThemeProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
23
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,57 +1,29 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import {
|
|
3
|
-
import { computed } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
2
|
+
import { ToastPortal, ToastViewport } from "reka-ui";
|
|
3
|
+
import { computed, onUnmounted } from "vue";
|
|
4
|
+
import { useToastService } from "../internal/programmatic-services";
|
|
5
|
+
import ProgrammaticTheme from "../internal/ProgrammaticTheme.vue";
|
|
6
|
+
import ToastItemRenderer from "../internal/ToastItemRenderer.vue";
|
|
7
7
|
import { toastTheme } from "../theme/toast";
|
|
8
8
|
import { resolveSlot, useComponentTheme } from "../utils/ui";
|
|
9
|
-
import Button from "./Button.vue";
|
|
10
|
-
import Icon from "./Icon.vue";
|
|
11
9
|
const props = defineProps({
|
|
12
10
|
ui: { type: Object, required: false }
|
|
13
11
|
});
|
|
14
|
-
const { toasts, remove } =
|
|
15
|
-
const icons = useIcons();
|
|
16
|
-
const messages = useMessages();
|
|
12
|
+
const { toasts, remove, dispose } = useToastService();
|
|
17
13
|
const theme = useComponentTheme("toast", toastTheme);
|
|
18
14
|
const ui = computed(() => theme.value());
|
|
19
15
|
const viewportProps = computed(() => resolveSlot(ui.value.viewport, props.ui?.viewport));
|
|
20
|
-
|
|
21
|
-
const descriptionProps = computed(() => resolveSlot(ui.value.description, props.ui?.description));
|
|
22
|
-
const closeProps = computed(() => resolveSlot(ui.value.close, props.ui?.close));
|
|
23
|
-
function rootPropsFor(toast) {
|
|
24
|
-
return resolveSlot(theme.value({ color: toast.color }).root, props.ui?.root);
|
|
25
|
-
}
|
|
26
|
-
function iconPropsFor(toast) {
|
|
27
|
-
return resolveSlot(theme.value({ color: toast.color }).icon, props.ui?.icon);
|
|
28
|
-
}
|
|
29
|
-
function iconNameFor(toast) {
|
|
30
|
-
return toast.icon ?? (toast.color ? icons.value[toast.color] : void 0);
|
|
31
|
-
}
|
|
16
|
+
onUnmounted(dispose);
|
|
32
17
|
</script>
|
|
33
18
|
|
|
34
19
|
<template>
|
|
35
|
-
<
|
|
20
|
+
<ProgrammaticTheme
|
|
36
21
|
v-for="toast in toasts"
|
|
37
22
|
:key="toast.id"
|
|
38
|
-
:
|
|
39
|
-
v-bind="rootPropsFor(toast)"
|
|
40
|
-
@update:open="(open) => !open && remove(toast.id)"
|
|
23
|
+
:snapshot="toast._theme"
|
|
41
24
|
>
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
<ToastTitle v-if="toast.title" v-bind="titleProps">
|
|
45
|
-
{{ toast.title }}
|
|
46
|
-
</ToastTitle>
|
|
47
|
-
<ToastDescription v-if="toast.description" v-bind="descriptionProps">
|
|
48
|
-
{{ toast.description }}
|
|
49
|
-
</ToastDescription>
|
|
50
|
-
</div>
|
|
51
|
-
<ToastClose as-child>
|
|
52
|
-
<Button size="sm" variant="ghost" color="neutral" :icon="icons.close" :aria-label="messages.close" v-bind="closeProps" />
|
|
53
|
-
</ToastClose>
|
|
54
|
-
</ToastRoot>
|
|
25
|
+
<ToastItemRenderer :toast="toast" :ui="props.ui" @remove="remove" />
|
|
26
|
+
</ProgrammaticTheme>
|
|
55
27
|
<ToastPortal>
|
|
56
28
|
<ToastViewport v-bind="viewportProps" />
|
|
57
29
|
</ToastPortal>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { ToggleThemeSlots } from '../theme/toggle.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { toggleTheme } from '../theme/toggle.js';
|
|
5
6
|
type ToggleVariants = VariantProps<typeof toggleTheme>;
|
|
@@ -9,7 +10,7 @@ export interface ToggleProps {
|
|
|
9
10
|
defaultValue?: boolean;
|
|
10
11
|
disabled?: boolean;
|
|
11
12
|
icon?: string;
|
|
12
|
-
color?:
|
|
13
|
+
color?: ColorRole;
|
|
13
14
|
size?: ToggleVariants['size'];
|
|
14
15
|
/** Forces (or blocks) the equal-width/height icon-only shape - same convention as Button's own `square`. */
|
|
15
16
|
square?: boolean;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { Toggle } from "reka-ui";
|
|
3
3
|
import { computed, useSlots } from "vue";
|
|
4
4
|
import { toggleTheme } from "../theme/toggle";
|
|
5
|
+
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
5
6
|
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
6
7
|
import Icon from "./Icon.vue";
|
|
7
8
|
defineOptions({ inheritAttrs: false });
|
|
@@ -20,8 +21,9 @@ defineSlots();
|
|
|
20
21
|
const slots = useSlots();
|
|
21
22
|
const iconOnly = computed(() => !slots.default);
|
|
22
23
|
const theme = useComponentTheme("toggle", toggleTheme);
|
|
24
|
+
const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "primary", "primary"));
|
|
23
25
|
const ui = computed(() => theme.value({
|
|
24
|
-
color:
|
|
26
|
+
color: effectiveColor.value,
|
|
25
27
|
size: props.size,
|
|
26
28
|
square: props.square ?? iconOnly.value
|
|
27
29
|
}));
|
|
@@ -33,6 +35,7 @@ const rootProps = useRootProps(() => ui.value.base, () => props.ui?.base);
|
|
|
33
35
|
:model-value="modelValue"
|
|
34
36
|
:default-value="defaultValue"
|
|
35
37
|
:disabled="disabled"
|
|
38
|
+
:data-selaras-color="effectiveColor"
|
|
36
39
|
v-bind="rootProps"
|
|
37
40
|
@update:model-value="(value) => emit('update:modelValue', value)"
|
|
38
41
|
>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { ToggleThemeSlots } from '../theme/toggle.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { toggleTheme } from '../theme/toggle.js';
|
|
5
6
|
type ToggleVariants = VariantProps<typeof toggleTheme>;
|
|
@@ -9,7 +10,7 @@ export interface ToggleProps {
|
|
|
9
10
|
defaultValue?: boolean;
|
|
10
11
|
disabled?: boolean;
|
|
11
12
|
icon?: string;
|
|
12
|
-
color?:
|
|
13
|
+
color?: ColorRole;
|
|
13
14
|
size?: ToggleVariants['size'];
|
|
14
15
|
/** Forces (or blocks) the equal-width/height icon-only shape - same convention as Button's own `square`. */
|
|
15
16
|
square?: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { ToggleGroupThemeSlots } from '../theme/toggle-group.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { toggleGroupTheme } from '../theme/toggle-group.js';
|
|
5
6
|
export interface ToggleGroupItemDef {
|
|
@@ -19,7 +20,7 @@ export interface ToggleGroupProps {
|
|
|
19
20
|
defaultValue?: string | string[];
|
|
20
21
|
disabled?: boolean;
|
|
21
22
|
orientation?: ToggleGroupVariants['orientation'];
|
|
22
|
-
color?:
|
|
23
|
+
color?: ColorRole;
|
|
23
24
|
size?: ToggleGroupVariants['size'];
|
|
24
25
|
ui?: UiProp<ToggleGroupThemeSlots>;
|
|
25
26
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { ToggleGroupItem, ToggleGroupRoot } from "reka-ui";
|
|
3
3
|
import { computed } from "vue";
|
|
4
4
|
import { toggleGroupTheme } from "../theme/toggle-group";
|
|
5
|
+
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
5
6
|
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
6
7
|
import Icon from "./Icon.vue";
|
|
7
8
|
defineOptions({ inheritAttrs: false });
|
|
@@ -22,10 +23,11 @@ const normalizedItems = computed(
|
|
|
22
23
|
() => props.items.map((item) => typeof item === "string" ? { label: item, value: item } : item)
|
|
23
24
|
);
|
|
24
25
|
const theme = useComponentTheme("toggleGroup", toggleGroupTheme);
|
|
26
|
+
const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "primary", "primary"));
|
|
25
27
|
const ui = computed(() => theme.value({
|
|
26
28
|
orientation: props.orientation,
|
|
27
29
|
size: props.size,
|
|
28
|
-
color:
|
|
30
|
+
color: effectiveColor.value
|
|
29
31
|
}));
|
|
30
32
|
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
31
33
|
const itemProps = computed(() => resolveSlot(ui.value.item, props.ui?.item));
|
|
@@ -42,6 +44,7 @@ function isPressed(item) {
|
|
|
42
44
|
:default-value="defaultValue"
|
|
43
45
|
:disabled="disabled"
|
|
44
46
|
:orientation="orientation"
|
|
47
|
+
:data-selaras-color="effectiveColor"
|
|
45
48
|
v-bind="rootProps"
|
|
46
49
|
@update:model-value="(value) => emit('update:modelValue', value)"
|
|
47
50
|
>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { ToggleGroupThemeSlots } from '../theme/toggle-group.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { toggleGroupTheme } from '../theme/toggle-group.js';
|
|
5
6
|
export interface ToggleGroupItemDef {
|
|
@@ -19,7 +20,7 @@ export interface ToggleGroupProps {
|
|
|
19
20
|
defaultValue?: string | string[];
|
|
20
21
|
disabled?: boolean;
|
|
21
22
|
orientation?: ToggleGroupVariants['orientation'];
|
|
22
|
-
color?:
|
|
23
|
+
color?: ColorRole;
|
|
23
24
|
size?: ToggleGroupVariants['size'];
|
|
24
25
|
ui?: UiProp<ToggleGroupThemeSlots>;
|
|
25
26
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { TooltipArrow, TooltipContent, TooltipPortal, TooltipRoot, TooltipTrigger } from "reka-ui";
|
|
3
3
|
import { computed } from "vue";
|
|
4
4
|
import { tooltipTheme } from "../theme/tooltip";
|
|
5
|
-
import { resolveSlot, useComponentTheme } from "../utils/ui";
|
|
5
|
+
import { resolveSlot, useComponentTheme, useThemeBindings } from "../utils/ui";
|
|
6
6
|
const props = defineProps({
|
|
7
7
|
text: { type: String, required: false },
|
|
8
8
|
side: { type: String, required: false, default: "top" },
|
|
@@ -13,6 +13,7 @@ const props = defineProps({
|
|
|
13
13
|
ui: { type: Object, required: false }
|
|
14
14
|
});
|
|
15
15
|
const theme = useComponentTheme("tooltip", tooltipTheme);
|
|
16
|
+
const themeBindings = useThemeBindings();
|
|
16
17
|
const ui = computed(() => theme.value());
|
|
17
18
|
const contentProps = computed(() => resolveSlot(ui.value.content, props.ui?.content));
|
|
18
19
|
const arrowProps = computed(() => resolveSlot(ui.value.arrow, props.ui?.arrow));
|
|
@@ -26,7 +27,7 @@ const kbdProps = computed(() => resolveSlot(ui.value.kbd, props.ui?.kbd));
|
|
|
26
27
|
<slot />
|
|
27
28
|
</TooltipTrigger>
|
|
28
29
|
<TooltipPortal>
|
|
29
|
-
<TooltipContent :side="side" :side-offset="6" v-bind="contentProps">
|
|
30
|
+
<TooltipContent :side="side" :side-offset="6" :data-selaras-theme="themeBindings['data-selaras-theme']" :data-selaras-mode="themeBindings['data-selaras-mode']" :style="themeBindings.style" v-bind="contentProps">
|
|
30
31
|
<slot name="content">
|
|
31
32
|
{{ text }}
|
|
32
33
|
</slot>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { TreeThemeSlots } from '../theme/tree.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { treeTheme } from '../theme/tree.js';
|
|
5
6
|
type TreeVariants = VariantProps<typeof treeTheme>;
|
|
@@ -31,6 +32,8 @@ export interface TreeProps {
|
|
|
31
32
|
/** @default item => item.children */
|
|
32
33
|
getChildren?: (item: TreeItemType) => TreeItemType[] | undefined;
|
|
33
34
|
size?: TreeVariants['size'];
|
|
35
|
+
/** The selected-row and keyboard-focus accent. @default 'primary' */
|
|
36
|
+
color?: ColorRole;
|
|
34
37
|
ui?: UiProp<TreeThemeSlots>;
|
|
35
38
|
}
|
|
36
39
|
export interface TreeEmits {
|
|
@@ -48,11 +51,11 @@ export interface TreeSlots {
|
|
|
48
51
|
}) => any;
|
|
49
52
|
}
|
|
50
53
|
declare const __VLS_base: import("vue").DefineComponent<TreeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
51
|
-
"update:modelValue": (value: TreeItemType | TreeItemType[]) => any;
|
|
52
54
|
"update:expanded": (value: string[]) => any;
|
|
55
|
+
"update:modelValue": (value: TreeItemType | TreeItemType[]) => any;
|
|
53
56
|
}, string, import("vue").PublicProps, Readonly<TreeProps> & Readonly<{
|
|
54
|
-
"onUpdate:modelValue"?: ((value: TreeItemType | TreeItemType[]) => any) | undefined;
|
|
55
57
|
"onUpdate:expanded"?: ((value: string[]) => any) | undefined;
|
|
58
|
+
"onUpdate:modelValue"?: ((value: TreeItemType | TreeItemType[]) => any) | undefined;
|
|
56
59
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
57
60
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
58
61
|
declare const _default: typeof __VLS_export;
|