@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,7 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed, ref, useSlots } from "vue";
|
|
3
3
|
import { navigationMenuTheme } from "../theme/navigation-menu";
|
|
4
|
-
import {
|
|
4
|
+
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
5
|
+
import { resolveSlot, useComponentTheme, useThemeBindings } from "../utils/ui";
|
|
5
6
|
import Icon from "./Icon.vue";
|
|
6
7
|
import NavigationMenuFlyoutList from "./NavigationMenuFlyoutList.vue";
|
|
7
8
|
import Popover from "./Popover.vue";
|
|
@@ -24,7 +25,9 @@ function slotName(item, suffix) {
|
|
|
24
25
|
return `item${suffix}`;
|
|
25
26
|
}
|
|
26
27
|
const theme = useComponentTheme("navigationMenu", navigationMenuTheme);
|
|
27
|
-
const
|
|
28
|
+
const themeBindings = useThemeBindings();
|
|
29
|
+
const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "primary", "primary"));
|
|
30
|
+
const ui = computed(() => theme.value({ orientation: "vertical", color: effectiveColor.value, variant: props.variant, highlight: props.highlight, collapsed: true, active: false, disabled: props.item.disabled }));
|
|
28
31
|
let closeTimer;
|
|
29
32
|
function cancelClose() {
|
|
30
33
|
if (closeTimer !== void 0) {
|
|
@@ -92,6 +95,10 @@ function onContentKeydown(event) {
|
|
|
92
95
|
ref="triggerRef"
|
|
93
96
|
type="button"
|
|
94
97
|
:disabled="item.disabled"
|
|
98
|
+
:data-selaras-color="effectiveColor"
|
|
99
|
+
:data-selaras-theme="themeBindings['data-selaras-theme']"
|
|
100
|
+
:data-selaras-mode="themeBindings['data-selaras-mode']"
|
|
101
|
+
:style="themeBindings.style"
|
|
95
102
|
v-bind="resolveSlot(ui.link, props.ui?.link)"
|
|
96
103
|
@mouseenter="openNow"
|
|
97
104
|
@mouseleave="scheduleClose"
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
-
import type { buttonTheme } from '../theme/button.js';
|
|
3
1
|
import type { NavigationMenuThemeSlots } from '../theme/navigation-menu.js';
|
|
2
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
4
3
|
import type { NavigationMenuItem } from '../utils/navigation-menu.js';
|
|
5
4
|
import type { UiProp } from '../utils/ui.js';
|
|
6
|
-
type ButtonVariants = VariantProps<typeof buttonTheme>;
|
|
7
5
|
export interface NavigationMenuFlyoutTriggerProps {
|
|
8
6
|
item: NavigationMenuItem;
|
|
9
|
-
color?:
|
|
7
|
+
color?: ColorRole;
|
|
10
8
|
variant?: 'pill' | 'link';
|
|
11
9
|
highlight?: boolean;
|
|
12
10
|
open: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { buttonTheme } from '../theme/button.js';
|
|
3
3
|
import type { PaginationThemeSlots } from '../theme/pagination.js';
|
|
4
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
4
5
|
import type { UiProp } from '../utils/ui.js';
|
|
5
6
|
import { paginationTheme } from '../theme/pagination.js';
|
|
6
7
|
type PaginationVariants = VariantProps<typeof paginationTheme>;
|
|
@@ -23,10 +24,10 @@ export interface PaginationProps {
|
|
|
23
24
|
disabled?: boolean;
|
|
24
25
|
size?: PaginationVariants['size'];
|
|
25
26
|
/** Inactive controls (First/Prev/Next/Last and non-current page numbers). */
|
|
26
|
-
color?:
|
|
27
|
+
color?: ColorRole;
|
|
27
28
|
variant?: ButtonVariants['variant'];
|
|
28
29
|
/** The current page's own button. */
|
|
29
|
-
activeColor?:
|
|
30
|
+
activeColor?: ColorRole;
|
|
30
31
|
activeVariant?: ButtonVariants['variant'];
|
|
31
32
|
ui?: UiProp<PaginationThemeSlots>;
|
|
32
33
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { buttonTheme } from '../theme/button.js';
|
|
3
3
|
import type { PaginationThemeSlots } from '../theme/pagination.js';
|
|
4
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
4
5
|
import type { UiProp } from '../utils/ui.js';
|
|
5
6
|
import { paginationTheme } from '../theme/pagination.js';
|
|
6
7
|
type PaginationVariants = VariantProps<typeof paginationTheme>;
|
|
@@ -23,10 +24,10 @@ export interface PaginationProps {
|
|
|
23
24
|
disabled?: boolean;
|
|
24
25
|
size?: PaginationVariants['size'];
|
|
25
26
|
/** Inactive controls (First/Prev/Next/Last and non-current page numbers). */
|
|
26
|
-
color?:
|
|
27
|
+
color?: ColorRole;
|
|
27
28
|
variant?: ButtonVariants['variant'];
|
|
28
29
|
/** The current page's own button. */
|
|
29
|
-
activeColor?:
|
|
30
|
+
activeColor?: ColorRole;
|
|
30
31
|
activeVariant?: ButtonVariants['variant'];
|
|
31
32
|
ui?: UiProp<PaginationThemeSlots>;
|
|
32
33
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { PinInputThemeSlots } from '../theme/pin-input.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { pinInputTheme } from '../theme/pin-input.js';
|
|
5
6
|
type PinInputVariants = VariantProps<typeof pinInputTheme>;
|
|
@@ -19,7 +20,7 @@ export interface PinInputProps {
|
|
|
19
20
|
disabled?: boolean;
|
|
20
21
|
invalid?: boolean;
|
|
21
22
|
size?: PinInputVariants['size'];
|
|
22
|
-
color?:
|
|
23
|
+
color?: ColorRole;
|
|
23
24
|
name?: string;
|
|
24
25
|
required?: boolean;
|
|
25
26
|
ui?: UiProp<PinInputThemeSlots>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { PinInputInput, PinInputRoot } from "reka-ui";
|
|
3
|
-
import { computed } from "vue";
|
|
3
|
+
import { computed, mergeProps, useAttrs } from "vue";
|
|
4
4
|
import { useFormField } from "../composables/use-form-field";
|
|
5
5
|
import { pinInputTheme } from "../theme/pin-input";
|
|
6
|
-
import {
|
|
6
|
+
import { isNativeInputAttr } from "../utils/native-input";
|
|
7
|
+
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
8
|
+
import { resolveSlot, useComponentTheme, useFallthroughAttrs, useRootProps } from "../utils/ui";
|
|
7
9
|
defineOptions({ inheritAttrs: false });
|
|
8
10
|
const props = defineProps({
|
|
9
11
|
id: { type: String, required: false },
|
|
@@ -24,23 +26,28 @@ const props = defineProps({
|
|
|
24
26
|
});
|
|
25
27
|
const emit = defineEmits(["update:modelValue", "complete"]);
|
|
26
28
|
const field = useFormField();
|
|
29
|
+
const attrs = useAttrs();
|
|
27
30
|
const pinInputId = computed(() => props.id ?? field?.id);
|
|
28
31
|
const pinInputInvalid = computed(() => props.invalid || (field?.invalid.value ?? false));
|
|
29
32
|
const effectiveSize = computed(() => props.size ?? field?.size ?? "md");
|
|
30
|
-
const describedBy = computed(() => field?.describedBy.value);
|
|
33
|
+
const describedBy = computed(() => attrs["aria-describedby"] ?? field?.describedBy.value);
|
|
34
|
+
const labelledBy = computed(() => attrs["aria-labelledby"] ?? field?.labelId);
|
|
31
35
|
const theme = useComponentTheme("pinInput", pinInputTheme);
|
|
36
|
+
const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "primary", "primary"));
|
|
32
37
|
const ui = computed(() => theme.value({
|
|
33
38
|
size: effectiveSize.value,
|
|
34
|
-
color:
|
|
39
|
+
color: effectiveColor.value,
|
|
35
40
|
invalid: pinInputInvalid.value
|
|
36
41
|
}));
|
|
37
|
-
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
38
|
-
const
|
|
42
|
+
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root, { exclude: isNativeInputAttr });
|
|
43
|
+
const nativeInputAttrs = useFallthroughAttrs(isNativeInputAttr);
|
|
44
|
+
const inputProps = computed(() => mergeProps(resolveSlot(ui.value.input, props.ui?.input), nativeInputAttrs.value));
|
|
39
45
|
</script>
|
|
40
46
|
|
|
41
47
|
<template>
|
|
42
48
|
<PinInputRoot
|
|
43
49
|
:id="pinInputId"
|
|
50
|
+
role="group"
|
|
44
51
|
:model-value="modelValue"
|
|
45
52
|
:default-value="defaultValue"
|
|
46
53
|
:placeholder="placeholder"
|
|
@@ -52,6 +59,8 @@ const inputProps = computed(() => resolveSlot(ui.value.input, props.ui?.input));
|
|
|
52
59
|
:required="required"
|
|
53
60
|
:aria-invalid="pinInputInvalid || void 0"
|
|
54
61
|
:aria-describedby="describedBy"
|
|
62
|
+
:aria-labelledby="labelledBy"
|
|
63
|
+
:data-selaras-color="effectiveColor"
|
|
55
64
|
v-bind="rootProps"
|
|
56
65
|
@update:model-value="(value) => emit('update:modelValue', value)"
|
|
57
66
|
@complete="(value) => emit('complete', value)"
|
|
@@ -60,6 +69,8 @@ const inputProps = computed(() => resolveSlot(ui.value.input, props.ui?.input));
|
|
|
60
69
|
v-for="i in length ?? 5"
|
|
61
70
|
:key="i"
|
|
62
71
|
:index="i - 1"
|
|
72
|
+
:aria-invalid="pinInputInvalid || void 0"
|
|
73
|
+
:aria-describedby="describedBy"
|
|
63
74
|
v-bind="inputProps"
|
|
64
75
|
/>
|
|
65
76
|
</PinInputRoot>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { PinInputThemeSlots } from '../theme/pin-input.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { pinInputTheme } from '../theme/pin-input.js';
|
|
5
6
|
type PinInputVariants = VariantProps<typeof pinInputTheme>;
|
|
@@ -19,7 +20,7 @@ export interface PinInputProps {
|
|
|
19
20
|
disabled?: boolean;
|
|
20
21
|
invalid?: boolean;
|
|
21
22
|
size?: PinInputVariants['size'];
|
|
22
|
-
color?:
|
|
23
|
+
color?: ColorRole;
|
|
23
24
|
name?: string;
|
|
24
25
|
required?: boolean;
|
|
25
26
|
ui?: UiProp<PinInputThemeSlots>;
|
|
@@ -2,6 +2,8 @@ import type { PopoverThemeSlots } from '../theme/popover.js';
|
|
|
2
2
|
import type { UiProp } from '../utils/ui.js';
|
|
3
3
|
export interface PopoverProps {
|
|
4
4
|
open?: boolean;
|
|
5
|
+
/** Initial visibility for an uncontrolled popover. Supplying `open` makes the parent authoritative. */
|
|
6
|
+
defaultOpen?: boolean;
|
|
5
7
|
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
6
8
|
align?: 'start' | 'center' | 'end';
|
|
7
9
|
/** Forwarded to Reka UI's own PopoverRoot `modal` prop - `true` traps focus and blocks interaction with the rest of the page, like a lightweight modal dialog. */
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { PopoverArrow, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger } from "reka-ui";
|
|
3
|
-
import { computed, ref, watch } from "vue";
|
|
3
|
+
import { computed, getCurrentInstance, ref, watch } from "vue";
|
|
4
4
|
import { popoverTheme } from "../theme/popover";
|
|
5
|
-
import { resolveSlot, useComponentTheme } from "../utils/ui";
|
|
5
|
+
import { resolveSlot, useComponentTheme, useThemeBindings } from "../utils/ui";
|
|
6
6
|
const props = defineProps({
|
|
7
|
-
open: { type: Boolean, required: false },
|
|
7
|
+
open: { type: Boolean, required: false, default: void 0 },
|
|
8
|
+
defaultOpen: { type: Boolean, required: false },
|
|
8
9
|
side: { type: String, required: false, default: "bottom" },
|
|
9
10
|
align: { type: String, required: false, default: "center" },
|
|
10
11
|
modal: { type: Boolean, required: false, default: false },
|
|
@@ -38,16 +39,19 @@ function onOpenAutoFocus(event) {
|
|
|
38
39
|
emit("openAutoFocus", event);
|
|
39
40
|
}
|
|
40
41
|
const theme = useComponentTheme("popover", popoverTheme);
|
|
42
|
+
const themeBindings = useThemeBindings();
|
|
41
43
|
const ui = computed(() => theme.value());
|
|
42
44
|
const contentProps = computed(() => resolveSlot(ui.value.content, props.ui?.content));
|
|
43
45
|
const arrowProps = computed(() => resolveSlot(ui.value.arrow, props.ui?.arrow));
|
|
44
|
-
const
|
|
46
|
+
const isControlled = Object.hasOwn(getCurrentInstance()?.vnode.props ?? {}, "open");
|
|
47
|
+
const internalOpen = ref(props.open ?? props.defaultOpen ?? false);
|
|
45
48
|
watch(() => props.open, (value) => {
|
|
46
|
-
if (
|
|
47
|
-
internalOpen.value = value;
|
|
49
|
+
if (isControlled)
|
|
50
|
+
internalOpen.value = value ?? false;
|
|
48
51
|
});
|
|
49
52
|
function onUpdateOpen(value) {
|
|
50
|
-
|
|
53
|
+
if (!isControlled)
|
|
54
|
+
internalOpen.value = value;
|
|
51
55
|
emit("update:open", value);
|
|
52
56
|
}
|
|
53
57
|
</script>
|
|
@@ -59,6 +63,9 @@ function onUpdateOpen(value) {
|
|
|
59
63
|
</PopoverTrigger>
|
|
60
64
|
<PopoverPortal>
|
|
61
65
|
<PopoverContent
|
|
66
|
+
:data-selaras-theme="themeBindings['data-selaras-theme']"
|
|
67
|
+
:data-selaras-mode="themeBindings['data-selaras-mode']"
|
|
68
|
+
:style="themeBindings.style"
|
|
62
69
|
:side="side"
|
|
63
70
|
:align="align"
|
|
64
71
|
:side-offset="8"
|
|
@@ -2,6 +2,8 @@ import type { PopoverThemeSlots } from '../theme/popover.js';
|
|
|
2
2
|
import type { UiProp } from '../utils/ui.js';
|
|
3
3
|
export interface PopoverProps {
|
|
4
4
|
open?: boolean;
|
|
5
|
+
/** Initial visibility for an uncontrolled popover. Supplying `open` makes the parent authoritative. */
|
|
6
|
+
defaultOpen?: boolean;
|
|
5
7
|
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
6
8
|
align?: 'start' | 'center' | 'end';
|
|
7
9
|
/** Forwarded to Reka UI's own PopoverRoot `modal` prop - `true` traps focus and blocks interaction with the rest of the page, like a lightweight modal dialog. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { ProgressThemeSlots } from '../theme/progress.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { progressTheme } from '../theme/progress.js';
|
|
5
6
|
type ProgressVariants = VariantProps<typeof progressTheme>;
|
|
@@ -12,7 +13,7 @@ export interface ProgressProps {
|
|
|
12
13
|
/** @default 'linear' */
|
|
13
14
|
type?: 'linear' | 'circular';
|
|
14
15
|
size?: ProgressVariants['size'];
|
|
15
|
-
color?:
|
|
16
|
+
color?: ColorRole;
|
|
16
17
|
ui?: UiProp<ProgressThemeSlots>;
|
|
17
18
|
}
|
|
18
19
|
export interface ProgressSlots {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { ProgressIndicator, ProgressRoot } from "reka-ui";
|
|
3
3
|
import { computed } from "vue";
|
|
4
4
|
import { progressTheme } from "../theme/progress";
|
|
5
|
+
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
5
6
|
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
6
7
|
defineOptions({ inheritAttrs: false });
|
|
7
8
|
const props = defineProps({
|
|
@@ -28,14 +29,15 @@ const radius = computed(() => (circleSpec.value.diameter - circleSpec.value.stro
|
|
|
28
29
|
const circumference = computed(() => 2 * Math.PI * radius.value);
|
|
29
30
|
const dashOffset = computed(() => percent.value == null ? circumference.value * 0.75 : circumference.value * (1 - percent.value / 100));
|
|
30
31
|
const theme = useComponentTheme("progress", progressTheme);
|
|
32
|
+
const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "primary", "primary"));
|
|
31
33
|
const ui = computed(() => theme.value({
|
|
32
34
|
size: props.size,
|
|
33
|
-
color:
|
|
35
|
+
color: effectiveColor.value,
|
|
34
36
|
indeterminate: props.modelValue == null
|
|
35
37
|
}));
|
|
36
38
|
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
37
39
|
const indicatorProps = computed(() => resolveSlot(ui.value.indicator, props.ui?.indicator));
|
|
38
|
-
const circleRootProps =
|
|
40
|
+
const circleRootProps = useRootProps(() => ui.value.circleRoot, () => props.ui?.circleRoot);
|
|
39
41
|
const circleWrapperProps = computed(() => resolveSlot(ui.value.circleWrapper, props.ui?.circleWrapper));
|
|
40
42
|
const circleTrackProps = computed(() => resolveSlot(ui.value.circleTrack, props.ui?.circleTrack));
|
|
41
43
|
const circleIndicatorProps = computed(() => resolveSlot(ui.value.circleIndicator, props.ui?.circleIndicator));
|
|
@@ -43,10 +45,10 @@ const labelProps = computed(() => resolveSlot(ui.value.label, props.ui?.label));
|
|
|
43
45
|
</script>
|
|
44
46
|
|
|
45
47
|
<template>
|
|
46
|
-
<ProgressRoot v-if="type === 'linear'" :model-value="modelValue" :max="max" v-bind="rootProps">
|
|
48
|
+
<ProgressRoot v-if="type === 'linear'" :model-value="modelValue" :max="max" :data-selaras-color="effectiveColor" v-bind="rootProps">
|
|
47
49
|
<ProgressIndicator v-bind="indicatorProps" :style="modelValue == null ? void 0 : { width: `${percent}%` }" />
|
|
48
50
|
</ProgressRoot>
|
|
49
|
-
<ProgressRoot v-else :model-value="modelValue" :max="max" v-bind="circleRootProps">
|
|
51
|
+
<ProgressRoot v-else :model-value="modelValue" :max="max" :data-selaras-color="effectiveColor" v-bind="circleRootProps">
|
|
50
52
|
<svg :width="circleSpec.diameter" :height="circleSpec.diameter" :viewBox="`0 0 ${circleSpec.diameter} ${circleSpec.diameter}`" v-bind="circleWrapperProps">
|
|
51
53
|
<circle
|
|
52
54
|
:cx="circleSpec.diameter / 2"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { ProgressThemeSlots } from '../theme/progress.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { progressTheme } from '../theme/progress.js';
|
|
5
6
|
type ProgressVariants = VariantProps<typeof progressTheme>;
|
|
@@ -12,7 +13,7 @@ export interface ProgressProps {
|
|
|
12
13
|
/** @default 'linear' */
|
|
13
14
|
type?: 'linear' | 'circular';
|
|
14
15
|
size?: ProgressVariants['size'];
|
|
15
|
-
color?:
|
|
16
|
+
color?: ColorRole;
|
|
16
17
|
ui?: UiProp<ProgressThemeSlots>;
|
|
17
18
|
}
|
|
18
19
|
export interface ProgressSlots {
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { proseTheme } from "../theme/prose";
|
|
4
|
+
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
4
5
|
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
5
6
|
defineOptions({ inheritAttrs: false });
|
|
6
|
-
defineProps({
|
|
7
|
-
id: { type: String, required: false }
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
id: { type: String, required: false },
|
|
9
|
+
color: { type: null, required: false }
|
|
8
10
|
});
|
|
9
11
|
const theme = useComponentTheme("prose", proseTheme);
|
|
10
|
-
const
|
|
12
|
+
const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "primary", "primary"));
|
|
13
|
+
const ui = computed(() => theme.value({ color: effectiveColor.value }));
|
|
11
14
|
const rootProps = useRootProps(() => ui.value.h1, () => void 0);
|
|
12
15
|
</script>
|
|
13
16
|
|
|
14
17
|
<template>
|
|
15
|
-
<h1 :id="id" v-bind="rootProps">
|
|
18
|
+
<h1 :id="id" :data-selaras-color="effectiveColor" v-bind="rootProps">
|
|
16
19
|
<a v-if="id" :href="`#${id}`" v-bind="resolveSlot(ui.headingAnchor, void 0)">
|
|
17
20
|
<slot />
|
|
18
21
|
</a>
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { proseTheme } from "../theme/prose";
|
|
4
|
+
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
4
5
|
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
5
6
|
defineOptions({ inheritAttrs: false });
|
|
6
|
-
defineProps({
|
|
7
|
-
id: { type: String, required: false }
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
id: { type: String, required: false },
|
|
9
|
+
color: { type: null, required: false }
|
|
8
10
|
});
|
|
9
11
|
const theme = useComponentTheme("prose", proseTheme);
|
|
10
|
-
const
|
|
12
|
+
const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "primary", "primary"));
|
|
13
|
+
const ui = computed(() => theme.value({ color: effectiveColor.value }));
|
|
11
14
|
const rootProps = useRootProps(() => ui.value.h2, () => void 0);
|
|
12
15
|
</script>
|
|
13
16
|
|
|
14
17
|
<template>
|
|
15
|
-
<h2 :id="id" v-bind="rootProps">
|
|
18
|
+
<h2 :id="id" :data-selaras-color="effectiveColor" v-bind="rootProps">
|
|
16
19
|
<a v-if="id" :href="`#${id}`" v-bind="resolveSlot(ui.headingAnchor, void 0)">
|
|
17
20
|
<slot />
|
|
18
21
|
</a>
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { proseTheme } from "../theme/prose";
|
|
4
|
+
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
4
5
|
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
5
6
|
defineOptions({ inheritAttrs: false });
|
|
6
|
-
defineProps({
|
|
7
|
-
id: { type: String, required: false }
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
id: { type: String, required: false },
|
|
9
|
+
color: { type: null, required: false }
|
|
8
10
|
});
|
|
9
11
|
const theme = useComponentTheme("prose", proseTheme);
|
|
10
|
-
const
|
|
12
|
+
const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "primary", "primary"));
|
|
13
|
+
const ui = computed(() => theme.value({ color: effectiveColor.value }));
|
|
11
14
|
const rootProps = useRootProps(() => ui.value.h3, () => void 0);
|
|
12
15
|
</script>
|
|
13
16
|
|
|
14
17
|
<template>
|
|
15
|
-
<h3 :id="id" v-bind="rootProps">
|
|
18
|
+
<h3 :id="id" :data-selaras-color="effectiveColor" v-bind="rootProps">
|
|
16
19
|
<a v-if="id" :href="`#${id}`" v-bind="resolveSlot(ui.headingAnchor, void 0)">
|
|
17
20
|
<slot />
|
|
18
21
|
</a>
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { proseTheme } from "../theme/prose";
|
|
4
|
+
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
4
5
|
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
5
6
|
defineOptions({ inheritAttrs: false });
|
|
6
|
-
defineProps({
|
|
7
|
-
id: { type: String, required: false }
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
id: { type: String, required: false },
|
|
9
|
+
color: { type: null, required: false }
|
|
8
10
|
});
|
|
9
11
|
const theme = useComponentTheme("prose", proseTheme);
|
|
10
|
-
const
|
|
12
|
+
const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "primary", "primary"));
|
|
13
|
+
const ui = computed(() => theme.value({ color: effectiveColor.value }));
|
|
11
14
|
const rootProps = useRootProps(() => ui.value.h4, () => void 0);
|
|
12
15
|
</script>
|
|
13
16
|
|
|
14
17
|
<template>
|
|
15
|
-
<h4 :id="id" v-bind="rootProps">
|
|
18
|
+
<h4 :id="id" :data-selaras-color="effectiveColor" v-bind="rootProps">
|
|
16
19
|
<a v-if="id" :href="`#${id}`" v-bind="resolveSlot(ui.headingAnchor, void 0)">
|
|
17
20
|
<slot />
|
|
18
21
|
</a>
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { proseTheme } from "../theme/prose";
|
|
4
|
+
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
4
5
|
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
5
6
|
defineOptions({ inheritAttrs: false });
|
|
6
|
-
defineProps({
|
|
7
|
-
id: { type: String, required: false }
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
id: { type: String, required: false },
|
|
9
|
+
color: { type: null, required: false }
|
|
8
10
|
});
|
|
9
11
|
const theme = useComponentTheme("prose", proseTheme);
|
|
10
|
-
const
|
|
12
|
+
const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "primary", "primary"));
|
|
13
|
+
const ui = computed(() => theme.value({ color: effectiveColor.value }));
|
|
11
14
|
const rootProps = useRootProps(() => ui.value.h5, () => void 0);
|
|
12
15
|
</script>
|
|
13
16
|
|
|
14
17
|
<template>
|
|
15
|
-
<h5 :id="id" v-bind="rootProps">
|
|
18
|
+
<h5 :id="id" :data-selaras-color="effectiveColor" v-bind="rootProps">
|
|
16
19
|
<a v-if="id" :href="`#${id}`" v-bind="resolveSlot(ui.headingAnchor, void 0)">
|
|
17
20
|
<slot />
|
|
18
21
|
</a>
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { proseTheme } from "../theme/prose";
|
|
4
|
+
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
4
5
|
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
5
6
|
defineOptions({ inheritAttrs: false });
|
|
6
|
-
defineProps({
|
|
7
|
-
id: { type: String, required: false }
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
id: { type: String, required: false },
|
|
9
|
+
color: { type: null, required: false }
|
|
8
10
|
});
|
|
9
11
|
const theme = useComponentTheme("prose", proseTheme);
|
|
10
|
-
const
|
|
12
|
+
const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "primary", "primary"));
|
|
13
|
+
const ui = computed(() => theme.value({ color: effectiveColor.value }));
|
|
11
14
|
const rootProps = useRootProps(() => ui.value.h6, () => void 0);
|
|
12
15
|
</script>
|
|
13
16
|
|
|
14
17
|
<template>
|
|
15
|
-
<h6 :id="id" v-bind="rootProps">
|
|
18
|
+
<h6 :id="id" :data-selaras-color="effectiveColor" v-bind="rootProps">
|
|
16
19
|
<a v-if="id" :href="`#${id}`" v-bind="resolveSlot(ui.headingAnchor, void 0)">
|
|
17
20
|
<slot />
|
|
18
21
|
</a>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { RadioGroupThemeSlots } from '../theme/radio-group.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { radioGroupTheme } from '../theme/radio-group.js';
|
|
5
6
|
export interface RadioItem {
|
|
@@ -19,7 +20,7 @@ export interface RadioGroupProps {
|
|
|
19
20
|
disabled?: boolean;
|
|
20
21
|
invalid?: boolean;
|
|
21
22
|
size?: RadioGroupVariants['size'];
|
|
22
|
-
color?:
|
|
23
|
+
color?: ColorRole;
|
|
23
24
|
orientation?: RadioGroupVariants['orientation'];
|
|
24
25
|
variant?: RadioGroupVariants['variant'];
|
|
25
26
|
ui?: UiProp<RadioGroupThemeSlots>;
|