@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,16 +1,24 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
-
import type { SelectItems, SelectOption } from '../composables/use-combobox-select.js';
|
|
3
2
|
import type { SelectThemeSlots } from '../theme/select.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
4
4
|
import type { UiProp } from '../utils/ui.js';
|
|
5
|
+
import type { SelectItems, SelectOption } from './combobox-select.js';
|
|
5
6
|
import { selectTheme } from '../theme/select.js';
|
|
6
7
|
type SelectVariants = VariantProps<typeof selectTheme>;
|
|
7
8
|
export interface ComboboxSelectBaseProps {
|
|
8
9
|
id?: string;
|
|
9
10
|
name?: string;
|
|
11
|
+
/** ID of an associated form outside the component's ancestors. */
|
|
12
|
+
form?: string;
|
|
10
13
|
items: SelectItems;
|
|
11
14
|
valueKey?: string;
|
|
12
15
|
labelKey?: string;
|
|
13
|
-
|
|
16
|
+
open?: boolean;
|
|
17
|
+
/** Initial uncontrolled open state. */
|
|
18
|
+
defaultOpen?: boolean;
|
|
19
|
+
modelValue?: string | number | (string | number)[];
|
|
20
|
+
/** Initial uncontrolled selection and native form reset target. */
|
|
21
|
+
defaultValue?: string | number | (string | number)[];
|
|
14
22
|
multiple?: boolean;
|
|
15
23
|
searchable?: boolean;
|
|
16
24
|
virtualize?: boolean | {
|
|
@@ -22,10 +30,11 @@ export interface ComboboxSelectBaseProps {
|
|
|
22
30
|
loading?: boolean;
|
|
23
31
|
placeholder?: string;
|
|
24
32
|
disabled?: boolean;
|
|
33
|
+
required?: boolean;
|
|
25
34
|
size?: SelectVariants['size'];
|
|
26
35
|
invalid?: boolean;
|
|
27
36
|
/** The focus-ring color - the resting (unfocused) ring stays neutral regardless. */
|
|
28
|
-
color?:
|
|
37
|
+
color?: ColorRole;
|
|
29
38
|
clearable?: boolean;
|
|
30
39
|
dropdown?: boolean;
|
|
31
40
|
creatable?: boolean;
|
|
@@ -35,30 +44,33 @@ export interface ComboboxSelectBaseProps {
|
|
|
35
44
|
resetSearchTermOnSelect?: boolean;
|
|
36
45
|
/** Shows a small pointer triangle connecting the panel to its trigger. */
|
|
37
46
|
arrow?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
|
|
47
|
+
/** Opts into the component's accessible small-screen presentation. */
|
|
48
|
+
adaptive?: boolean;
|
|
40
49
|
ui?: UiProp<SelectThemeSlots>;
|
|
41
50
|
}
|
|
42
51
|
export interface ComboboxSelectBaseEmits {
|
|
43
|
-
'update:
|
|
52
|
+
'update:open': [value: boolean];
|
|
53
|
+
'update:modelValue': [value: string | number | (string | number)[] | undefined];
|
|
44
54
|
'update:searchTerm': [value: string];
|
|
45
55
|
}
|
|
46
56
|
declare var __VLS_43: {
|
|
47
|
-
item: SelectOption
|
|
48
|
-
}, __VLS_94: {}, __VLS_101: {}, __VLS_116: {},
|
|
49
|
-
item: SelectOption
|
|
50
|
-
},
|
|
51
|
-
selected: import("
|
|
52
|
-
},
|
|
53
|
-
item: SelectOption
|
|
54
|
-
},
|
|
55
|
-
group: import("
|
|
56
|
-
},
|
|
57
|
-
item: SelectOption
|
|
58
|
-
},
|
|
59
|
-
group: import("
|
|
60
|
-
}
|
|
57
|
+
item: SelectOption<import("../utils/select-contracts.js").SelectValue>;
|
|
58
|
+
}, __VLS_94: {}, __VLS_101: {}, __VLS_116: {}, __VLS_140: {
|
|
59
|
+
item: SelectOption<import("../utils/select-contracts.js").SelectValue>;
|
|
60
|
+
}, __VLS_160: {
|
|
61
|
+
selected: import("./combobox-select.js").ResolvedOption | undefined;
|
|
62
|
+
}, __VLS_171: {}, __VLS_178: {}, __VLS_185: {}, __VLS_213: {}, __VLS_216: {}, __VLS_219: {}, __VLS_222: {}, __VLS_225: {
|
|
63
|
+
item: SelectOption<import("../utils/select-contracts.js").SelectValue>;
|
|
64
|
+
}, __VLS_228: {
|
|
65
|
+
group: import("./combobox-select.js").SelectOptionGroup<import("../utils/select-contracts.js").SelectValue>;
|
|
66
|
+
}, __VLS_231: {}, __VLS_267: string, __VLS_268: {}, __VLS_271: {
|
|
67
|
+
item: SelectOption<import("../utils/select-contracts.js").SelectValue>;
|
|
68
|
+
}, __VLS_274: {
|
|
69
|
+
group: import("./combobox-select.js").SelectOptionGroup<import("../utils/select-contracts.js").SelectValue>;
|
|
70
|
+
};
|
|
61
71
|
type __VLS_Slots = {} & {
|
|
72
|
+
[K in NonNullable<typeof __VLS_267>]?: (props: typeof __VLS_268) => any;
|
|
73
|
+
} & {
|
|
62
74
|
item?: (props: typeof __VLS_43) => any;
|
|
63
75
|
} & {
|
|
64
76
|
'clear-icon'?: (props: typeof __VLS_94) => any;
|
|
@@ -67,49 +79,41 @@ type __VLS_Slots = {} & {
|
|
|
67
79
|
} & {
|
|
68
80
|
'dropdown-icon'?: (props: typeof __VLS_116) => any;
|
|
69
81
|
} & {
|
|
70
|
-
item?: (props: typeof
|
|
71
|
-
} & {
|
|
72
|
-
value?: (props: typeof __VLS_158) => any;
|
|
73
|
-
} & {
|
|
74
|
-
'clear-icon'?: (props: typeof __VLS_169) => any;
|
|
75
|
-
} & {
|
|
76
|
-
'loading-icon'?: (props: typeof __VLS_176) => any;
|
|
77
|
-
} & {
|
|
78
|
-
'dropdown-icon'?: (props: typeof __VLS_183) => any;
|
|
79
|
-
} & {
|
|
80
|
-
header?: (props: typeof __VLS_211) => any;
|
|
82
|
+
item?: (props: typeof __VLS_140) => any;
|
|
81
83
|
} & {
|
|
82
|
-
|
|
84
|
+
value?: (props: typeof __VLS_160) => any;
|
|
83
85
|
} & {
|
|
84
|
-
|
|
86
|
+
'clear-icon'?: (props: typeof __VLS_171) => any;
|
|
85
87
|
} & {
|
|
86
|
-
'
|
|
88
|
+
'loading-icon'?: (props: typeof __VLS_178) => any;
|
|
87
89
|
} & {
|
|
88
|
-
|
|
90
|
+
'dropdown-icon'?: (props: typeof __VLS_185) => any;
|
|
89
91
|
} & {
|
|
90
|
-
|
|
92
|
+
header?: (props: typeof __VLS_213) => any;
|
|
91
93
|
} & {
|
|
92
|
-
|
|
94
|
+
'filter-icon'?: (props: typeof __VLS_216) => any;
|
|
93
95
|
} & {
|
|
94
|
-
|
|
96
|
+
empty?: (props: typeof __VLS_219) => any;
|
|
95
97
|
} & {
|
|
96
|
-
'filter
|
|
98
|
+
'empty-filter'?: (props: typeof __VLS_222) => any;
|
|
97
99
|
} & {
|
|
98
|
-
|
|
100
|
+
item?: (props: typeof __VLS_225) => any;
|
|
99
101
|
} & {
|
|
100
|
-
|
|
102
|
+
group?: (props: typeof __VLS_228) => any;
|
|
101
103
|
} & {
|
|
102
|
-
|
|
104
|
+
footer?: (props: typeof __VLS_231) => any;
|
|
103
105
|
} & {
|
|
104
|
-
|
|
106
|
+
item?: (props: typeof __VLS_271) => any;
|
|
105
107
|
} & {
|
|
106
|
-
|
|
108
|
+
group?: (props: typeof __VLS_274) => any;
|
|
107
109
|
};
|
|
108
110
|
declare const __VLS_base: import("vue").DefineComponent<ComboboxSelectBaseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
109
|
-
"update:modelValue": (value: string | string[] | undefined) => any;
|
|
111
|
+
"update:modelValue": (value: string | number | (string | number)[] | undefined) => any;
|
|
112
|
+
"update:open": (value: boolean) => any;
|
|
110
113
|
"update:searchTerm": (value: string) => any;
|
|
111
114
|
}, string, import("vue").PublicProps, Readonly<ComboboxSelectBaseProps> & Readonly<{
|
|
112
|
-
"onUpdate:modelValue"?: ((value: string | string[] | undefined) => any) | undefined;
|
|
115
|
+
"onUpdate:modelValue"?: ((value: string | number | (string | number)[] | undefined) => any) | undefined;
|
|
116
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
113
117
|
"onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
114
118
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
115
119
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ResolvedItemOption, SelectItems, SelectOption } from './combobox-select.js';
|
|
2
2
|
export interface ComboboxSelectBodyProps {
|
|
3
|
+
listbox?: boolean;
|
|
3
4
|
searchable?: boolean;
|
|
4
5
|
creatable?: boolean;
|
|
5
6
|
searchText: string;
|
|
6
7
|
displayValue: (value: unknown) => string;
|
|
7
8
|
items: SelectItems;
|
|
8
|
-
flatOptions:
|
|
9
|
+
flatOptions: ResolvedItemOption[];
|
|
9
10
|
virtualizeConfig: {
|
|
10
11
|
estimateSize: number;
|
|
11
12
|
overscan: number;
|
|
12
13
|
} | null;
|
|
13
|
-
virtualizedOptions:
|
|
14
|
-
toOption: (entry: SelectOption) =>
|
|
14
|
+
virtualizedOptions: ResolvedItemOption[];
|
|
15
|
+
toOption: (entry: SelectOption) => ResolvedItemOption;
|
|
15
16
|
groupOptions: (group: {
|
|
16
|
-
items: SelectOption[];
|
|
17
|
-
}) =>
|
|
17
|
+
items: readonly SelectOption[];
|
|
18
|
+
}) => ResolvedItemOption[];
|
|
18
19
|
onSearchKeydown: (event: KeyboardEvent) => void;
|
|
19
20
|
onSearchBlur: () => void;
|
|
20
21
|
searchWrapperProps?: Record<string, unknown>;
|
|
@@ -28,35 +29,40 @@ export interface ComboboxSelectBodyProps {
|
|
|
28
29
|
export interface ComboboxSelectBodyEmits {
|
|
29
30
|
'update:searchText': [value: string];
|
|
30
31
|
}
|
|
31
|
-
declare
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
declare function focusSearch(): boolean;
|
|
33
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_21: {}, __VLS_29: {}, __VLS_37: {}, __VLS_57: {
|
|
34
|
+
item: SelectOption<import("../utils/select-contracts.js").SelectValue>;
|
|
35
|
+
}, __VLS_82: {
|
|
36
|
+
group: import("./combobox-select.js").SelectOptionGroup<import("../utils/select-contracts.js").SelectValue>;
|
|
37
|
+
}, __VLS_90: {
|
|
38
|
+
item: SelectOption<import("../utils/select-contracts.js").SelectValue>;
|
|
39
|
+
}, __VLS_109: {
|
|
40
|
+
item: SelectOption<import("../utils/select-contracts.js").SelectValue>;
|
|
41
|
+
}, __VLS_122: {};
|
|
40
42
|
type __VLS_Slots = {} & {
|
|
41
43
|
header?: (props: typeof __VLS_1) => any;
|
|
42
44
|
} & {
|
|
43
45
|
'filter-icon'?: (props: typeof __VLS_3) => any;
|
|
44
46
|
} & {
|
|
45
|
-
empty?: (props: typeof
|
|
47
|
+
empty?: (props: typeof __VLS_21) => any;
|
|
46
48
|
} & {
|
|
47
|
-
'empty-filter'?: (props: typeof
|
|
49
|
+
'empty-filter'?: (props: typeof __VLS_29) => any;
|
|
48
50
|
} & {
|
|
49
|
-
|
|
51
|
+
'empty-filter'?: (props: typeof __VLS_37) => any;
|
|
50
52
|
} & {
|
|
51
|
-
|
|
53
|
+
item?: (props: typeof __VLS_57) => any;
|
|
52
54
|
} & {
|
|
53
|
-
|
|
55
|
+
group?: (props: typeof __VLS_82) => any;
|
|
54
56
|
} & {
|
|
55
|
-
item?: (props: typeof
|
|
57
|
+
item?: (props: typeof __VLS_90) => any;
|
|
56
58
|
} & {
|
|
57
|
-
|
|
59
|
+
item?: (props: typeof __VLS_109) => any;
|
|
60
|
+
} & {
|
|
61
|
+
footer?: (props: typeof __VLS_122) => any;
|
|
58
62
|
};
|
|
59
|
-
declare const __VLS_base: import("vue").DefineComponent<ComboboxSelectBodyProps, {
|
|
63
|
+
declare const __VLS_base: import("vue").DefineComponent<ComboboxSelectBodyProps, {
|
|
64
|
+
focusSearch: typeof focusSearch;
|
|
65
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
60
66
|
"update:searchText": (value: string) => any;
|
|
61
67
|
}, string, import("vue").PublicProps, Readonly<ComboboxSelectBodyProps> & Readonly<{
|
|
62
68
|
"onUpdate:searchText"?: ((value: string) => any) | undefined;
|
|
@@ -7,19 +7,29 @@ import {
|
|
|
7
7
|
ComboboxItemIndicator,
|
|
8
8
|
ComboboxLabel,
|
|
9
9
|
ComboboxViewport,
|
|
10
|
-
ComboboxVirtualizer
|
|
10
|
+
ComboboxVirtualizer,
|
|
11
|
+
ListboxContent,
|
|
12
|
+
ListboxFilter,
|
|
13
|
+
ListboxGroup,
|
|
14
|
+
ListboxGroupLabel,
|
|
15
|
+
ListboxItem,
|
|
16
|
+
ListboxItemIndicator,
|
|
17
|
+
ListboxVirtualizer,
|
|
18
|
+
useFilter
|
|
11
19
|
} from "reka-ui";
|
|
20
|
+
import { computed, mergeProps, ref, useId } from "vue";
|
|
12
21
|
import Icon from "../components/Icon.vue";
|
|
13
|
-
import { isOptionGroup } from "../composables/use-combobox-select";
|
|
14
22
|
import { useIcons } from "../composables/use-icons";
|
|
15
23
|
import { useMessages } from "../composables/use-messages";
|
|
24
|
+
import { isOptionGroup } from "./combobox-select";
|
|
16
25
|
defineOptions({ inheritAttrs: false });
|
|
17
|
-
defineProps({
|
|
26
|
+
const props = defineProps({
|
|
27
|
+
listbox: { type: Boolean, required: false },
|
|
18
28
|
searchable: { type: Boolean, required: false },
|
|
19
29
|
creatable: { type: Boolean, required: false },
|
|
20
30
|
searchText: { type: String, required: true },
|
|
21
31
|
displayValue: { type: Function, required: true },
|
|
22
|
-
items: { type:
|
|
32
|
+
items: { type: null, required: true },
|
|
23
33
|
flatOptions: { type: Array, required: true },
|
|
24
34
|
virtualizeConfig: { type: [Object, null], required: true },
|
|
25
35
|
virtualizedOptions: { type: Array, required: true },
|
|
@@ -38,6 +48,27 @@ defineProps({
|
|
|
38
48
|
const emit = defineEmits(["update:searchText"]);
|
|
39
49
|
const icons = useIcons();
|
|
40
50
|
const messages = useMessages();
|
|
51
|
+
const listboxId = `selaras-select-options-${useId()}`;
|
|
52
|
+
const searchInput = ref();
|
|
53
|
+
const { contains } = useFilter({ sensitivity: "base" });
|
|
54
|
+
const primitives = computed(() => props.listbox ? { input: ListboxFilter, viewport: ListboxContent, group: ListboxGroup, label: ListboxGroupLabel, item: ListboxItem, indicator: ListboxItemIndicator, virtualizer: ListboxVirtualizer } : { input: ComboboxInput, viewport: ComboboxViewport, group: ComboboxGroup, label: ComboboxLabel, item: ComboboxItem, indicator: ComboboxItemIndicator, virtualizer: ComboboxVirtualizer });
|
|
55
|
+
function matches(option) {
|
|
56
|
+
return !props.listbox || !props.searchable || contains(option.label, props.searchText);
|
|
57
|
+
}
|
|
58
|
+
const visibleOptions = computed(() => props.flatOptions.filter(matches));
|
|
59
|
+
const virtualOptions = computed(() => props.listbox ? visibleOptions.value : props.virtualizedOptions);
|
|
60
|
+
const filterInputProps = computed(() => mergeProps(
|
|
61
|
+
props.listbox ? { "role": "combobox", "aria-autocomplete": "list", "aria-expanded": true, "aria-controls": listboxId, "aria-label": messages.value.search } : { displayValue: props.displayValue },
|
|
62
|
+
props.searchInputProps ?? {}
|
|
63
|
+
));
|
|
64
|
+
function focusSearch() {
|
|
65
|
+
const element = searchInput.value?.$el;
|
|
66
|
+
if (!element)
|
|
67
|
+
return false;
|
|
68
|
+
element.focus();
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
defineExpose({ focusSearch });
|
|
41
72
|
</script>
|
|
42
73
|
|
|
43
74
|
<template>
|
|
@@ -45,13 +76,14 @@ const messages = useMessages();
|
|
|
45
76
|
|
|
46
77
|
<div v-if="searchable && !creatable" v-bind="searchWrapperProps">
|
|
47
78
|
<slot name="filter-icon">
|
|
48
|
-
<Icon :name="icons.search" class="size-4 text-[var(--
|
|
79
|
+
<Icon :name="icons.search" class="size-4 text-[var(--selaras-resolved-text-muted)]" />
|
|
49
80
|
</slot>
|
|
50
|
-
<
|
|
81
|
+
<component
|
|
82
|
+
:is="primitives.input"
|
|
83
|
+
ref="searchInput"
|
|
51
84
|
:model-value="searchText"
|
|
52
|
-
:display-value="displayValue"
|
|
53
85
|
:placeholder="messages.search"
|
|
54
|
-
v-bind="
|
|
86
|
+
v-bind="filterInputProps"
|
|
55
87
|
@update:model-value="(value) => emit('update:searchText', String(value ?? ''))"
|
|
56
88
|
@keydown="onSearchKeydown"
|
|
57
89
|
@blur="onSearchBlur"
|
|
@@ -63,29 +95,29 @@ const messages = useMessages();
|
|
|
63
95
|
{{ messages.noOptions }}
|
|
64
96
|
</slot>
|
|
65
97
|
</div>
|
|
66
|
-
<
|
|
67
|
-
<
|
|
98
|
+
<component :is="primitives.viewport" v-else :id="listbox ? listboxId : void 0" v-bind="viewportProps">
|
|
99
|
+
<div v-if="listbox && visibleOptions.length === 0" v-bind="emptyProps">
|
|
100
|
+
<slot name="empty-filter">
|
|
101
|
+
{{ messages.noResultsFound }}
|
|
102
|
+
</slot>
|
|
103
|
+
</div>
|
|
104
|
+
<ComboboxEmpty v-else-if="!listbox" v-bind="emptyProps">
|
|
68
105
|
<slot name="empty-filter">
|
|
69
106
|
{{ messages.noResultsFound }}
|
|
70
107
|
</slot>
|
|
71
108
|
</ComboboxEmpty>
|
|
72
109
|
|
|
73
|
-
<!--
|
|
74
|
-
@tanstack/vue-virtual measures real DOM/scroll state, so it can't
|
|
75
|
-
render identically during SSR - forcing it through anyway causes a
|
|
76
|
-
hydration mismatch that (confirmed empirically) breaks click
|
|
77
|
-
interactivity page-wide, not just on this component. Client-only
|
|
78
|
-
sidesteps it; the popover is closed at SSR time anyway, so there's
|
|
79
|
-
nothing meaningful to show real users in the fallback.
|
|
80
|
-
-->
|
|
110
|
+
<!-- Virtual row measurement needs client DOM, including default-open surfaces. -->
|
|
81
111
|
<ClientOnly v-if="virtualizeConfig">
|
|
82
|
-
<
|
|
112
|
+
<component
|
|
113
|
+
:is="primitives.virtualizer"
|
|
83
114
|
v-slot="{ option, virtualItem }"
|
|
84
|
-
:options="
|
|
115
|
+
:options="virtualOptions"
|
|
85
116
|
:estimate-size="virtualizeConfig.estimateSize"
|
|
86
117
|
:overscan="virtualizeConfig.overscan"
|
|
87
118
|
>
|
|
88
|
-
<
|
|
119
|
+
<component
|
|
120
|
+
:is="primitives.item"
|
|
89
121
|
:key="String(virtualItem.key)"
|
|
90
122
|
:value="option.value"
|
|
91
123
|
:disabled="option.disabled"
|
|
@@ -95,23 +127,24 @@ const messages = useMessages();
|
|
|
95
127
|
<slot name="item" :item="option.raw">
|
|
96
128
|
{{ option.label }}
|
|
97
129
|
</slot>
|
|
98
|
-
<
|
|
130
|
+
<component :is="primitives.indicator" v-bind="itemIndicatorProps">
|
|
99
131
|
<Icon :name="icons.check" class="size-4" />
|
|
100
|
-
</
|
|
101
|
-
</
|
|
102
|
-
</
|
|
132
|
+
</component>
|
|
133
|
+
</component>
|
|
134
|
+
</component>
|
|
103
135
|
</ClientOnly>
|
|
104
136
|
|
|
105
137
|
<template v-else>
|
|
106
138
|
<template v-for="(entry, index) in items" :key="index">
|
|
107
|
-
<
|
|
108
|
-
<
|
|
139
|
+
<component :is="primitives.group" v-if="isOptionGroup(entry) && groupOptions(entry).some(matches)">
|
|
140
|
+
<component :is="primitives.label" v-bind="groupProps">
|
|
109
141
|
<slot name="group" :group="entry">
|
|
110
142
|
{{ entry.label }}
|
|
111
143
|
</slot>
|
|
112
|
-
</
|
|
113
|
-
<
|
|
114
|
-
|
|
144
|
+
</component>
|
|
145
|
+
<component
|
|
146
|
+
:is="primitives.item"
|
|
147
|
+
v-for="option in groupOptions(entry).filter(matches)"
|
|
115
148
|
:key="option.value"
|
|
116
149
|
:value="option.value"
|
|
117
150
|
:disabled="option.disabled"
|
|
@@ -120,13 +153,14 @@ const messages = useMessages();
|
|
|
120
153
|
<slot name="item" :item="option.raw">
|
|
121
154
|
{{ option.label }}
|
|
122
155
|
</slot>
|
|
123
|
-
<
|
|
156
|
+
<component :is="primitives.indicator" v-bind="itemIndicatorProps">
|
|
124
157
|
<Icon :name="icons.check" class="size-4" />
|
|
125
|
-
</
|
|
126
|
-
</
|
|
127
|
-
</
|
|
128
|
-
<
|
|
129
|
-
|
|
158
|
+
</component>
|
|
159
|
+
</component>
|
|
160
|
+
</component>
|
|
161
|
+
<component
|
|
162
|
+
:is="primitives.item"
|
|
163
|
+
v-else-if="!isOptionGroup(entry) && matches(toOption(entry))"
|
|
130
164
|
:value="toOption(entry).value"
|
|
131
165
|
:disabled="toOption(entry).disabled"
|
|
132
166
|
v-bind="itemProps"
|
|
@@ -134,13 +168,13 @@ const messages = useMessages();
|
|
|
134
168
|
<slot name="item" :item="entry">
|
|
135
169
|
{{ toOption(entry).label }}
|
|
136
170
|
</slot>
|
|
137
|
-
<
|
|
171
|
+
<component :is="primitives.indicator" v-bind="itemIndicatorProps">
|
|
138
172
|
<Icon :name="icons.check" class="size-4" />
|
|
139
|
-
</
|
|
140
|
-
</
|
|
173
|
+
</component>
|
|
174
|
+
</component>
|
|
141
175
|
</template>
|
|
142
176
|
</template>
|
|
143
|
-
</
|
|
177
|
+
</component>
|
|
144
178
|
|
|
145
179
|
<slot name="footer" />
|
|
146
180
|
</template>
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ResolvedItemOption, SelectItems, SelectOption } from './combobox-select.js';
|
|
2
2
|
export interface ComboboxSelectBodyProps {
|
|
3
|
+
listbox?: boolean;
|
|
3
4
|
searchable?: boolean;
|
|
4
5
|
creatable?: boolean;
|
|
5
6
|
searchText: string;
|
|
6
7
|
displayValue: (value: unknown) => string;
|
|
7
8
|
items: SelectItems;
|
|
8
|
-
flatOptions:
|
|
9
|
+
flatOptions: ResolvedItemOption[];
|
|
9
10
|
virtualizeConfig: {
|
|
10
11
|
estimateSize: number;
|
|
11
12
|
overscan: number;
|
|
12
13
|
} | null;
|
|
13
|
-
virtualizedOptions:
|
|
14
|
-
toOption: (entry: SelectOption) =>
|
|
14
|
+
virtualizedOptions: ResolvedItemOption[];
|
|
15
|
+
toOption: (entry: SelectOption) => ResolvedItemOption;
|
|
15
16
|
groupOptions: (group: {
|
|
16
|
-
items: SelectOption[];
|
|
17
|
-
}) =>
|
|
17
|
+
items: readonly SelectOption[];
|
|
18
|
+
}) => ResolvedItemOption[];
|
|
18
19
|
onSearchKeydown: (event: KeyboardEvent) => void;
|
|
19
20
|
onSearchBlur: () => void;
|
|
20
21
|
searchWrapperProps?: Record<string, unknown>;
|
|
@@ -28,35 +29,40 @@ export interface ComboboxSelectBodyProps {
|
|
|
28
29
|
export interface ComboboxSelectBodyEmits {
|
|
29
30
|
'update:searchText': [value: string];
|
|
30
31
|
}
|
|
31
|
-
declare
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
declare function focusSearch(): boolean;
|
|
33
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_21: {}, __VLS_29: {}, __VLS_37: {}, __VLS_57: {
|
|
34
|
+
item: SelectOption<import("../utils/select-contracts.js").SelectValue>;
|
|
35
|
+
}, __VLS_82: {
|
|
36
|
+
group: import("./combobox-select.js").SelectOptionGroup<import("../utils/select-contracts.js").SelectValue>;
|
|
37
|
+
}, __VLS_90: {
|
|
38
|
+
item: SelectOption<import("../utils/select-contracts.js").SelectValue>;
|
|
39
|
+
}, __VLS_109: {
|
|
40
|
+
item: SelectOption<import("../utils/select-contracts.js").SelectValue>;
|
|
41
|
+
}, __VLS_122: {};
|
|
40
42
|
type __VLS_Slots = {} & {
|
|
41
43
|
header?: (props: typeof __VLS_1) => any;
|
|
42
44
|
} & {
|
|
43
45
|
'filter-icon'?: (props: typeof __VLS_3) => any;
|
|
44
46
|
} & {
|
|
45
|
-
empty?: (props: typeof
|
|
47
|
+
empty?: (props: typeof __VLS_21) => any;
|
|
46
48
|
} & {
|
|
47
|
-
'empty-filter'?: (props: typeof
|
|
49
|
+
'empty-filter'?: (props: typeof __VLS_29) => any;
|
|
48
50
|
} & {
|
|
49
|
-
|
|
51
|
+
'empty-filter'?: (props: typeof __VLS_37) => any;
|
|
50
52
|
} & {
|
|
51
|
-
|
|
53
|
+
item?: (props: typeof __VLS_57) => any;
|
|
52
54
|
} & {
|
|
53
|
-
|
|
55
|
+
group?: (props: typeof __VLS_82) => any;
|
|
54
56
|
} & {
|
|
55
|
-
item?: (props: typeof
|
|
57
|
+
item?: (props: typeof __VLS_90) => any;
|
|
56
58
|
} & {
|
|
57
|
-
|
|
59
|
+
item?: (props: typeof __VLS_109) => any;
|
|
60
|
+
} & {
|
|
61
|
+
footer?: (props: typeof __VLS_122) => any;
|
|
58
62
|
};
|
|
59
|
-
declare const __VLS_base: import("vue").DefineComponent<ComboboxSelectBodyProps, {
|
|
63
|
+
declare const __VLS_base: import("vue").DefineComponent<ComboboxSelectBodyProps, {
|
|
64
|
+
focusSearch: typeof focusSearch;
|
|
65
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
60
66
|
"update:searchText": (value: string) => any;
|
|
61
67
|
}, string, import("vue").PublicProps, Readonly<ComboboxSelectBodyProps> & Readonly<{
|
|
62
68
|
"onUpdate:searchText"?: ((value: string) => any) | undefined;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { DateValue } from '@internationalized/date';
|
|
2
|
-
import type {
|
|
3
|
-
import type { buttonTheme } from '../theme/button.js';
|
|
4
|
-
type ButtonVariants = VariantProps<typeof buttonTheme>;
|
|
2
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
5
3
|
export interface DatePickerCalendarBodyProps {
|
|
6
4
|
internalView: 'date' | 'month' | 'year';
|
|
7
|
-
color?:
|
|
8
|
-
activeColor?:
|
|
5
|
+
color?: ColorRole;
|
|
6
|
+
activeColor?: ColorRole;
|
|
9
7
|
placeholder: DateValue;
|
|
10
8
|
monthGridItems: {
|
|
11
9
|
value: DateValue;
|
|
@@ -60,9 +60,9 @@ defineProps({
|
|
|
60
60
|
const icons = useIcons();
|
|
61
61
|
const messages = useMessages();
|
|
62
62
|
const navButtonUi = { leadingIcon: "rtl:-scale-x-100" };
|
|
63
|
-
const headingButtonUi = "rounded-[var(--
|
|
63
|
+
const headingButtonUi = "rounded-[var(--selaras-resolved-radius-sm)] px-1.5 py-0.5 transition-colors hover:bg-[var(--selaras-resolved-surface-elevated)] disabled:hover:bg-transparent disabled:cursor-default";
|
|
64
64
|
const cellTriggerUi = {
|
|
65
|
-
base: "relative data-[today]:font-semibold data-[today]:after:absolute data-[today]:after:bottom-1 data-[today]:after:left-1/2 data-[today]:after:size-1 data-[today]:after:-translate-x-1/2 data-[today]:after:rounded-full data-[today]:after:bg-[var(--
|
|
65
|
+
base: "relative data-[today]:font-semibold data-[today]:after:absolute data-[today]:after:bottom-1 data-[today]:after:left-1/2 data-[today]:after:size-1 data-[today]:after:-translate-x-1/2 data-[today]:after:rounded-full data-[today]:after:bg-[var(--_selaras-color-fill)] data-[outside-view]:opacity-40 data-[unavailable]:opacity-40 data-[unavailable]:line-through"
|
|
66
66
|
};
|
|
67
67
|
</script>
|
|
68
68
|
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { DateValue } from '@internationalized/date';
|
|
2
|
-
import type {
|
|
3
|
-
import type { buttonTheme } from '../theme/button.js';
|
|
4
|
-
type ButtonVariants = VariantProps<typeof buttonTheme>;
|
|
2
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
5
3
|
export interface DatePickerCalendarBodyProps {
|
|
6
4
|
internalView: 'date' | 'month' | 'year';
|
|
7
|
-
color?:
|
|
8
|
-
activeColor?:
|
|
5
|
+
color?: ColorRole;
|
|
6
|
+
activeColor?: ColorRole;
|
|
9
7
|
placeholder: DateValue;
|
|
10
8
|
monthGridItems: {
|
|
11
9
|
value: DateValue;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { buttonTheme } from '../theme/button.js';
|
|
3
|
-
type ButtonVariants = VariantProps<typeof buttonTheme>;
|
|
1
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
4
2
|
export interface DatePickerRangeCalendarBodyProps {
|
|
5
|
-
color?:
|
|
6
|
-
activeColor?:
|
|
3
|
+
color?: ColorRole;
|
|
4
|
+
activeColor?: ColorRole;
|
|
7
5
|
headerProps?: Record<string, unknown>;
|
|
8
6
|
headingProps?: Record<string, unknown>;
|
|
9
7
|
gridsProps?: Record<string, unknown>;
|
|
@@ -31,7 +31,7 @@ const icons = useIcons();
|
|
|
31
31
|
const messages = useMessages();
|
|
32
32
|
const navButtonUi = { leadingIcon: "rtl:-scale-x-100" };
|
|
33
33
|
const rangeCellTriggerUi = {
|
|
34
|
-
base: "relative w-full rounded-none data-[selection-start]:rounded-s-full data-[selection-end]:rounded-e-full data-[today]:font-semibold data-[today]:after:absolute data-[today]:after:bottom-1 data-[today]:after:left-1/2 data-[today]:after:size-1 data-[today]:after:-translate-x-1/2 data-[today]:after:rounded-full data-[today]:after:bg-[var(--
|
|
34
|
+
base: "relative w-full rounded-none data-[selection-start]:rounded-s-full data-[selection-end]:rounded-e-full data-[today]:font-semibold data-[today]:after:absolute data-[today]:after:bottom-1 data-[today]:after:left-1/2 data-[today]:after:size-1 data-[today]:after:-translate-x-1/2 data-[today]:after:rounded-full data-[today]:after:bg-[var(--_selaras-color-fill)] data-[outside-view]:opacity-40 data-[unavailable]:opacity-40 data-[unavailable]:line-through"
|
|
35
35
|
};
|
|
36
36
|
</script>
|
|
37
37
|
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { buttonTheme } from '../theme/button.js';
|
|
3
|
-
type ButtonVariants = VariantProps<typeof buttonTheme>;
|
|
1
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
4
2
|
export interface DatePickerRangeCalendarBodyProps {
|
|
5
|
-
color?:
|
|
6
|
-
activeColor?:
|
|
3
|
+
color?: ColorRole;
|
|
4
|
+
activeColor?: ColorRole;
|
|
7
5
|
headerProps?: Record<string, unknown>;
|
|
8
6
|
headingProps?: Record<string, unknown>;
|
|
9
7
|
gridsProps?: Record<string, unknown>;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { buttonTheme } from '../theme/button.js';
|
|
3
|
-
type ButtonVariants = VariantProps<typeof buttonTheme>;
|
|
1
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
4
2
|
export interface DatePickerTimeBodyProps {
|
|
5
3
|
hour: number;
|
|
6
4
|
minute: number;
|
|
@@ -13,7 +11,7 @@ export interface DatePickerTimeBodyProps {
|
|
|
13
11
|
setHour: (hour24: number) => void;
|
|
14
12
|
setMinute: (minute: number) => void;
|
|
15
13
|
closeOnSelect?: boolean;
|
|
16
|
-
activeColor?:
|
|
14
|
+
activeColor?: ColorRole;
|
|
17
15
|
/** Closes the popover/modal - the Done button's own action. */
|
|
18
16
|
close: () => void;
|
|
19
17
|
timeSectionProps?: Record<string, unknown>;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { buttonTheme } from '../theme/button.js';
|
|
3
|
-
type ButtonVariants = VariantProps<typeof buttonTheme>;
|
|
1
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
4
2
|
export interface DatePickerTimeBodyProps {
|
|
5
3
|
hour: number;
|
|
6
4
|
minute: number;
|
|
@@ -13,7 +11,7 @@ export interface DatePickerTimeBodyProps {
|
|
|
13
11
|
setHour: (hour24: number) => void;
|
|
14
12
|
setMinute: (minute: number) => void;
|
|
15
13
|
closeOnSelect?: boolean;
|
|
16
|
-
activeColor?:
|
|
14
|
+
activeColor?: ColorRole;
|
|
17
15
|
/** Closes the popover/modal - the Done button's own action. */
|
|
18
16
|
close: () => void;
|
|
19
17
|
timeSectionProps?: Record<string, unknown>;
|