@sewadah/selaras 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +131 -0
- package/dist/module.d.mts +22 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +127 -0
- package/dist/runtime/components/Accordion.d.vue.ts +59 -0
- package/dist/runtime/components/Accordion.vue +65 -0
- package/dist/runtime/components/Accordion.vue.d.ts +59 -0
- package/dist/runtime/components/Alert.d.vue.ts +39 -0
- package/dist/runtime/components/Alert.vue +64 -0
- package/dist/runtime/components/Alert.vue.d.ts +39 -0
- package/dist/runtime/components/AlertDialog.d.vue.ts +66 -0
- package/dist/runtime/components/AlertDialog.vue +116 -0
- package/dist/runtime/components/AlertDialog.vue.d.ts +66 -0
- package/dist/runtime/components/App.d.vue.ts +32 -0
- package/dist/runtime/components/App.vue +26 -0
- package/dist/runtime/components/App.vue.d.ts +32 -0
- package/dist/runtime/components/Autocomplete.d.vue.ts +61 -0
- package/dist/runtime/components/Autocomplete.vue +41 -0
- package/dist/runtime/components/Autocomplete.vue.d.ts +61 -0
- package/dist/runtime/components/Avatar.d.vue.ts +46 -0
- package/dist/runtime/components/Avatar.vue +64 -0
- package/dist/runtime/components/Avatar.vue.d.ts +46 -0
- package/dist/runtime/components/AvatarGroup.d.vue.ts +14 -0
- package/dist/runtime/components/AvatarGroup.vue +41 -0
- package/dist/runtime/components/AvatarGroup.vue.d.ts +14 -0
- package/dist/runtime/components/Badge.d.vue.ts +37 -0
- package/dist/runtime/components/Badge.vue +47 -0
- package/dist/runtime/components/Badge.vue.d.ts +37 -0
- package/dist/runtime/components/Breadcrumb.d.vue.ts +37 -0
- package/dist/runtime/components/Breadcrumb.vue +109 -0
- package/dist/runtime/components/Breadcrumb.vue.d.ts +37 -0
- package/dist/runtime/components/Button.d.vue.ts +45 -0
- package/dist/runtime/components/Button.vue +67 -0
- package/dist/runtime/components/Button.vue.d.ts +45 -0
- package/dist/runtime/components/ButtonGroup.d.vue.ts +22 -0
- package/dist/runtime/components/ButtonGroup.vue +21 -0
- package/dist/runtime/components/ButtonGroup.vue.d.ts +22 -0
- package/dist/runtime/components/Callout.d.vue.ts +27 -0
- package/dist/runtime/components/Callout.vue +47 -0
- package/dist/runtime/components/Callout.vue.d.ts +27 -0
- package/dist/runtime/components/Card.d.vue.ts +25 -0
- package/dist/runtime/components/Card.vue +30 -0
- package/dist/runtime/components/Card.vue.d.ts +25 -0
- package/dist/runtime/components/CardGroup.d.vue.ts +23 -0
- package/dist/runtime/components/CardGroup.vue +19 -0
- package/dist/runtime/components/CardGroup.vue.d.ts +23 -0
- package/dist/runtime/components/Checkbox.d.vue.ts +45 -0
- package/dist/runtime/components/Checkbox.vue +76 -0
- package/dist/runtime/components/Checkbox.vue.d.ts +45 -0
- package/dist/runtime/components/Chip.d.vue.ts +50 -0
- package/dist/runtime/components/Chip.vue +75 -0
- package/dist/runtime/components/Chip.vue.d.ts +50 -0
- package/dist/runtime/components/CodeButton.d.vue.ts +21 -0
- package/dist/runtime/components/CodeButton.vue +33 -0
- package/dist/runtime/components/CodeButton.vue.d.ts +21 -0
- package/dist/runtime/components/CodeGroup.d.vue.ts +3 -0
- package/dist/runtime/components/CodeGroup.vue +46 -0
- package/dist/runtime/components/CodeGroup.vue.d.ts +3 -0
- package/dist/runtime/components/CodeTree.d.vue.ts +17 -0
- package/dist/runtime/components/CodeTree.vue +56 -0
- package/dist/runtime/components/CodeTree.vue.d.ts +17 -0
- package/dist/runtime/components/Collapsible.d.vue.ts +44 -0
- package/dist/runtime/components/Collapsible.vue +52 -0
- package/dist/runtime/components/Collapsible.vue.d.ts +44 -0
- package/dist/runtime/components/ColorModeToggle.d.vue.ts +3 -0
- package/dist/runtime/components/ColorModeToggle.vue +24 -0
- package/dist/runtime/components/ColorModeToggle.vue.d.ts +3 -0
- package/dist/runtime/components/ColorPicker.d.vue.ts +30 -0
- package/dist/runtime/components/ColorPicker.vue +112 -0
- package/dist/runtime/components/ColorPicker.vue.d.ts +30 -0
- package/dist/runtime/components/Column.d.ts +72 -0
- package/dist/runtime/components/Column.js +34 -0
- package/dist/runtime/components/ColumnGroup.d.ts +33 -0
- package/dist/runtime/components/ColumnGroup.js +17 -0
- package/dist/runtime/components/CommandPalette.d.vue.ts +41 -0
- package/dist/runtime/components/CommandPalette.vue +208 -0
- package/dist/runtime/components/CommandPalette.vue.d.ts +41 -0
- package/dist/runtime/components/Container.d.vue.ts +22 -0
- package/dist/runtime/components/Container.vue +21 -0
- package/dist/runtime/components/Container.vue.d.ts +22 -0
- package/dist/runtime/components/ContentNavigation.d.vue.ts +31 -0
- package/dist/runtime/components/ContentNavigation.vue +64 -0
- package/dist/runtime/components/ContentNavigation.vue.d.ts +31 -0
- package/dist/runtime/components/ContentSurround.d.vue.ts +16 -0
- package/dist/runtime/components/ContentSurround.vue +46 -0
- package/dist/runtime/components/ContentSurround.vue.d.ts +16 -0
- package/dist/runtime/components/ContentToc.d.vue.ts +35 -0
- package/dist/runtime/components/ContentToc.vue +265 -0
- package/dist/runtime/components/ContentToc.vue.d.ts +35 -0
- package/dist/runtime/components/ContextMenu.d.vue.ts +33 -0
- package/dist/runtime/components/ContextMenu.vue +49 -0
- package/dist/runtime/components/ContextMenu.vue.d.ts +33 -0
- package/dist/runtime/components/DashboardGroup.d.vue.ts +24 -0
- package/dist/runtime/components/DashboardGroup.vue +52 -0
- package/dist/runtime/components/DashboardGroup.vue.d.ts +24 -0
- package/dist/runtime/components/DashboardNavbar.d.vue.ts +23 -0
- package/dist/runtime/components/DashboardNavbar.vue +33 -0
- package/dist/runtime/components/DashboardNavbar.vue.d.ts +23 -0
- package/dist/runtime/components/DashboardPanel.d.vue.ts +22 -0
- package/dist/runtime/components/DashboardPanel.vue +26 -0
- package/dist/runtime/components/DashboardPanel.vue.d.ts +22 -0
- package/dist/runtime/components/DashboardResizeHandle.d.vue.ts +8 -0
- package/dist/runtime/components/DashboardResizeHandle.vue +19 -0
- package/dist/runtime/components/DashboardResizeHandle.vue.d.ts +8 -0
- package/dist/runtime/components/DashboardSidebar.d.vue.ts +40 -0
- package/dist/runtime/components/DashboardSidebar.vue +117 -0
- package/dist/runtime/components/DashboardSidebar.vue.d.ts +40 -0
- package/dist/runtime/components/DashboardSidebarToggle.d.vue.ts +21 -0
- package/dist/runtime/components/DashboardSidebarToggle.vue +42 -0
- package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +21 -0
- package/dist/runtime/components/DatePicker.d.vue.ts +165 -0
- package/dist/runtime/components/DatePicker.vue +796 -0
- package/dist/runtime/components/DatePicker.vue.d.ts +165 -0
- package/dist/runtime/components/Drawer.d.vue.ts +74 -0
- package/dist/runtime/components/Drawer.vue +157 -0
- package/dist/runtime/components/Drawer.vue.d.ts +74 -0
- package/dist/runtime/components/DrawerRenderer.d.vue.ts +3 -0
- package/dist/runtime/components/DrawerRenderer.vue +30 -0
- package/dist/runtime/components/DrawerRenderer.vue.d.ts +3 -0
- package/dist/runtime/components/Dropdown.d.vue.ts +35 -0
- package/dist/runtime/components/Dropdown.vue +51 -0
- package/dist/runtime/components/Dropdown.vue.d.ts +35 -0
- package/dist/runtime/components/FileTree.d.vue.ts +28 -0
- package/dist/runtime/components/FileTree.vue +68 -0
- package/dist/runtime/components/FileTree.vue.d.ts +28 -0
- package/dist/runtime/components/FileUpload.d.vue.ts +68 -0
- package/dist/runtime/components/FileUpload.vue +226 -0
- package/dist/runtime/components/FileUpload.vue.d.ts +68 -0
- package/dist/runtime/components/FormField.d.vue.ts +37 -0
- package/dist/runtime/components/FormField.vue +72 -0
- package/dist/runtime/components/FormField.vue.d.ts +37 -0
- package/dist/runtime/components/Header.d.vue.ts +20 -0
- package/dist/runtime/components/Header.vue +23 -0
- package/dist/runtime/components/Header.vue.d.ts +20 -0
- package/dist/runtime/components/Icon.d.vue.ts +14 -0
- package/dist/runtime/components/Icon.vue +18 -0
- package/dist/runtime/components/Icon.vue.d.ts +14 -0
- package/dist/runtime/components/Input.d.vue.ts +41 -0
- package/dist/runtime/components/Input.vue +86 -0
- package/dist/runtime/components/Input.vue.d.ts +41 -0
- package/dist/runtime/components/InputGroup.d.vue.ts +22 -0
- package/dist/runtime/components/InputGroup.vue +21 -0
- package/dist/runtime/components/InputGroup.vue.d.ts +22 -0
- package/dist/runtime/components/InputNumber.d.vue.ts +37 -0
- package/dist/runtime/components/InputNumber.vue +173 -0
- package/dist/runtime/components/InputNumber.vue.d.ts +37 -0
- package/dist/runtime/components/Kbd.d.vue.ts +24 -0
- package/dist/runtime/components/Kbd.vue +42 -0
- package/dist/runtime/components/Kbd.vue.d.ts +24 -0
- package/dist/runtime/components/Modal.d.vue.ts +72 -0
- package/dist/runtime/components/Modal.vue +178 -0
- package/dist/runtime/components/Modal.vue.d.ts +72 -0
- package/dist/runtime/components/ModalRenderer.d.vue.ts +3 -0
- package/dist/runtime/components/ModalRenderer.vue +25 -0
- package/dist/runtime/components/ModalRenderer.vue.d.ts +3 -0
- package/dist/runtime/components/NavigationMenu.d.vue.ts +108 -0
- package/dist/runtime/components/NavigationMenu.vue +166 -0
- package/dist/runtime/components/NavigationMenu.vue.d.ts +108 -0
- package/dist/runtime/components/NavigationMenuAccordionItem.d.vue.ts +23 -0
- package/dist/runtime/components/NavigationMenuAccordionItem.vue +106 -0
- package/dist/runtime/components/NavigationMenuAccordionItem.vue.d.ts +23 -0
- package/dist/runtime/components/NavigationMenuFlyoutList.d.vue.ts +19 -0
- package/dist/runtime/components/NavigationMenuFlyoutList.vue +44 -0
- package/dist/runtime/components/NavigationMenuFlyoutList.vue.d.ts +19 -0
- package/dist/runtime/components/NavigationMenuFlyoutTrigger.d.vue.ts +49 -0
- package/dist/runtime/components/NavigationMenuFlyoutTrigger.vue +116 -0
- package/dist/runtime/components/NavigationMenuFlyoutTrigger.vue.d.ts +49 -0
- package/dist/runtime/components/PageAside.d.vue.ts +20 -0
- package/dist/runtime/components/PageAside.vue +26 -0
- package/dist/runtime/components/PageAside.vue.d.ts +20 -0
- package/dist/runtime/components/PageHeader.d.vue.ts +24 -0
- package/dist/runtime/components/PageHeader.vue +30 -0
- package/dist/runtime/components/PageHeader.vue.d.ts +24 -0
- package/dist/runtime/components/Pagination.d.vue.ts +42 -0
- package/dist/runtime/components/Pagination.vue +113 -0
- package/dist/runtime/components/Pagination.vue.d.ts +42 -0
- package/dist/runtime/components/PinInput.d.vue.ts +40 -0
- package/dist/runtime/components/PinInput.vue +66 -0
- package/dist/runtime/components/PinInput.vue.d.ts +40 -0
- package/dist/runtime/components/Popover.d.vue.ts +52 -0
- package/dist/runtime/components/Popover.vue +77 -0
- package/dist/runtime/components/Popover.vue.d.ts +52 -0
- package/dist/runtime/components/Progress.d.vue.ts +32 -0
- package/dist/runtime/components/Progress.vue +76 -0
- package/dist/runtime/components/Progress.vue.d.ts +32 -0
- package/dist/runtime/components/ProseH1.d.vue.ts +18 -0
- package/dist/runtime/components/ProseH1.vue +21 -0
- package/dist/runtime/components/ProseH1.vue.d.ts +18 -0
- package/dist/runtime/components/ProseH2.d.vue.ts +18 -0
- package/dist/runtime/components/ProseH2.vue +21 -0
- package/dist/runtime/components/ProseH2.vue.d.ts +18 -0
- package/dist/runtime/components/ProseH3.d.vue.ts +18 -0
- package/dist/runtime/components/ProseH3.vue +21 -0
- package/dist/runtime/components/ProseH3.vue.d.ts +18 -0
- package/dist/runtime/components/ProseH4.d.vue.ts +18 -0
- package/dist/runtime/components/ProseH4.vue +21 -0
- package/dist/runtime/components/ProseH4.vue.d.ts +18 -0
- package/dist/runtime/components/ProseH5.d.vue.ts +18 -0
- package/dist/runtime/components/ProseH5.vue +21 -0
- package/dist/runtime/components/ProseH5.vue.d.ts +18 -0
- package/dist/runtime/components/ProseH6.d.vue.ts +18 -0
- package/dist/runtime/components/ProseH6.vue +21 -0
- package/dist/runtime/components/ProseH6.vue.d.ts +18 -0
- package/dist/runtime/components/ProsePre.d.vue.ts +20 -0
- package/dist/runtime/components/ProsePre.vue +50 -0
- package/dist/runtime/components/ProsePre.vue.d.ts +20 -0
- package/dist/runtime/components/RadioGroup.d.vue.ts +50 -0
- package/dist/runtime/components/RadioGroup.vue +82 -0
- package/dist/runtime/components/RadioGroup.vue.d.ts +50 -0
- package/dist/runtime/components/Rating.d.vue.ts +36 -0
- package/dist/runtime/components/Rating.vue +83 -0
- package/dist/runtime/components/Rating.vue.d.ts +36 -0
- package/dist/runtime/components/ReadMore.d.vue.ts +20 -0
- package/dist/runtime/components/ReadMore.vue +59 -0
- package/dist/runtime/components/ReadMore.vue.d.ts +20 -0
- package/dist/runtime/components/ScrollArea.d.vue.ts +19 -0
- package/dist/runtime/components/ScrollArea.vue +37 -0
- package/dist/runtime/components/ScrollArea.vue.d.ts +19 -0
- package/dist/runtime/components/Select.d.vue.ts +60 -0
- package/dist/runtime/components/Select.vue +40 -0
- package/dist/runtime/components/Select.vue.d.ts +60 -0
- package/dist/runtime/components/Separator.d.vue.ts +27 -0
- package/dist/runtime/components/Separator.vue +36 -0
- package/dist/runtime/components/Separator.vue.d.ts +27 -0
- package/dist/runtime/components/Skeleton.d.vue.ts +13 -0
- package/dist/runtime/components/Skeleton.vue +17 -0
- package/dist/runtime/components/Skeleton.vue.d.ts +13 -0
- package/dist/runtime/components/Slideover.d.vue.ts +65 -0
- package/dist/runtime/components/Slideover.vue +140 -0
- package/dist/runtime/components/Slideover.vue.d.ts +65 -0
- package/dist/runtime/components/SlideoverRenderer.d.vue.ts +3 -0
- package/dist/runtime/components/SlideoverRenderer.vue +27 -0
- package/dist/runtime/components/SlideoverRenderer.vue.d.ts +3 -0
- package/dist/runtime/components/Slider.d.vue.ts +60 -0
- package/dist/runtime/components/Slider.vue +186 -0
- package/dist/runtime/components/Slider.vue.d.ts +60 -0
- package/dist/runtime/components/Splitter.d.vue.ts +41 -0
- package/dist/runtime/components/Splitter.vue +31 -0
- package/dist/runtime/components/Splitter.vue.d.ts +41 -0
- package/dist/runtime/components/SplitterPanel.d.vue.ts +55 -0
- package/dist/runtime/components/SplitterPanel.vue +52 -0
- package/dist/runtime/components/SplitterPanel.vue.d.ts +55 -0
- package/dist/runtime/components/SplitterResizeHandle.d.vue.ts +14 -0
- package/dist/runtime/components/SplitterResizeHandle.vue +22 -0
- package/dist/runtime/components/SplitterResizeHandle.vue.d.ts +14 -0
- package/dist/runtime/components/Stepper.d.vue.ts +57 -0
- package/dist/runtime/components/Stepper.vue +101 -0
- package/dist/runtime/components/Stepper.vue.d.ts +57 -0
- package/dist/runtime/components/Switch.d.vue.ts +49 -0
- package/dist/runtime/components/Switch.vue +73 -0
- package/dist/runtime/components/Switch.vue.d.ts +49 -0
- package/dist/runtime/components/Table.d.vue.ts +83 -0
- package/dist/runtime/components/Table.vue +339 -0
- package/dist/runtime/components/Table.vue.d.ts +83 -0
- package/dist/runtime/components/Tabs.d.vue.ts +43 -0
- package/dist/runtime/components/Tabs.vue +60 -0
- package/dist/runtime/components/Tabs.vue.d.ts +43 -0
- package/dist/runtime/components/Textarea.d.vue.ts +45 -0
- package/dist/runtime/components/Textarea.vue +110 -0
- package/dist/runtime/components/Textarea.vue.d.ts +45 -0
- package/dist/runtime/components/Theme.d.vue.ts +19 -0
- package/dist/runtime/components/Theme.vue +18 -0
- package/dist/runtime/components/Theme.vue.d.ts +19 -0
- package/dist/runtime/components/Toast.d.vue.ts +8 -0
- package/dist/runtime/components/Toast.vue +58 -0
- package/dist/runtime/components/Toast.vue.d.ts +8 -0
- package/dist/runtime/components/Toggle.d.vue.ts +38 -0
- package/dist/runtime/components/Toggle.vue +44 -0
- package/dist/runtime/components/Toggle.vue.d.ts +38 -0
- package/dist/runtime/components/ToggleGroup.d.vue.ts +48 -0
- package/dist/runtime/components/ToggleGroup.vue +61 -0
- package/dist/runtime/components/ToggleGroup.vue.d.ts +48 -0
- package/dist/runtime/components/Tooltip.d.vue.ts +28 -0
- package/dist/runtime/components/Tooltip.vue +40 -0
- package/dist/runtime/components/Tooltip.vue.d.ts +28 -0
- package/dist/runtime/components/Tree.d.vue.ts +64 -0
- package/dist/runtime/components/Tree.vue +139 -0
- package/dist/runtime/components/Tree.vue.d.ts +64 -0
- package/dist/runtime/composables/use-combobox-select.d.ts +45 -0
- package/dist/runtime/composables/use-combobox-select.js +80 -0
- package/dist/runtime/composables/use-command-palette.d.ts +8 -0
- package/dist/runtime/composables/use-command-palette.js +14 -0
- package/dist/runtime/composables/use-drawer.d.ts +42 -0
- package/dist/runtime/composables/use-drawer.js +44 -0
- package/dist/runtime/composables/use-form-field.d.ts +10 -0
- package/dist/runtime/composables/use-form-field.js +8 -0
- package/dist/runtime/composables/use-icons.d.ts +10 -0
- package/dist/runtime/composables/use-icons.js +7 -0
- package/dist/runtime/composables/use-locale.d.ts +12 -0
- package/dist/runtime/composables/use-locale.js +6 -0
- package/dist/runtime/composables/use-media-query.d.ts +11 -0
- package/dist/runtime/composables/use-media-query.js +15 -0
- package/dist/runtime/composables/use-messages.d.ts +12 -0
- package/dist/runtime/composables/use-messages.js +7 -0
- package/dist/runtime/composables/use-modal.d.ts +32 -0
- package/dist/runtime/composables/use-modal.js +39 -0
- package/dist/runtime/composables/use-ripple.d.ts +15 -0
- package/dist/runtime/composables/use-ripple.js +6 -0
- package/dist/runtime/composables/use-slideover.d.ts +36 -0
- package/dist/runtime/composables/use-slideover.js +41 -0
- package/dist/runtime/composables/use-table.d.ts +63 -0
- package/dist/runtime/composables/use-table.js +142 -0
- package/dist/runtime/composables/use-toast.d.ts +15 -0
- package/dist/runtime/composables/use-toast.js +16 -0
- package/dist/runtime/directives/index.d.ts +1 -0
- package/dist/runtime/directives/index.js +1 -0
- package/dist/runtime/directives/ripple.d.ts +16 -0
- package/dist/runtime/directives/ripple.js +80 -0
- package/dist/runtime/internal/ColorPickerBody.d.vue.ts +26 -0
- package/dist/runtime/internal/ColorPickerBody.vue +111 -0
- package/dist/runtime/internal/ColorPickerBody.vue.d.ts +26 -0
- package/dist/runtime/internal/ComboboxSelectBase.d.vue.ts +122 -0
- package/dist/runtime/internal/ComboboxSelectBase.vue +590 -0
- package/dist/runtime/internal/ComboboxSelectBase.vue.d.ts +122 -0
- package/dist/runtime/internal/ComboboxSelectBody.d.vue.ts +71 -0
- package/dist/runtime/internal/ComboboxSelectBody.vue +146 -0
- package/dist/runtime/internal/ComboboxSelectBody.vue.d.ts +71 -0
- package/dist/runtime/internal/DatePickerCalendarBody.d.vue.ts +71 -0
- package/dist/runtime/internal/DatePickerCalendarBody.vue +215 -0
- package/dist/runtime/internal/DatePickerCalendarBody.vue.d.ts +71 -0
- package/dist/runtime/internal/DatePickerRangeCalendarBody.d.vue.ts +37 -0
- package/dist/runtime/internal/DatePickerRangeCalendarBody.vue +96 -0
- package/dist/runtime/internal/DatePickerRangeCalendarBody.vue.d.ts +37 -0
- package/dist/runtime/internal/DatePickerTimeBody.d.vue.ts +33 -0
- package/dist/runtime/internal/DatePickerTimeBody.vue +53 -0
- package/dist/runtime/internal/DatePickerTimeBody.vue.d.ts +33 -0
- package/dist/runtime/internal/TimeStepper.d.vue.ts +28 -0
- package/dist/runtime/internal/TimeStepper.vue +99 -0
- package/dist/runtime/internal/TimeStepper.vue.d.ts +28 -0
- package/dist/runtime/prose.css +1 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/theme/accordion.d.ts +131 -0
- package/dist/runtime/theme/accordion.js +60 -0
- package/dist/runtime/theme/alert-dialog.d.ts +50 -0
- package/dist/runtime/theme/alert-dialog.js +30 -0
- package/dist/runtime/theme/alert.d.ts +62 -0
- package/dist/runtime/theme/alert.js +52 -0
- package/dist/runtime/theme/avatar-group.d.ts +59 -0
- package/dist/runtime/theme/avatar-group.js +18 -0
- package/dist/runtime/theme/avatar.d.ts +206 -0
- package/dist/runtime/theme/avatar.js +67 -0
- package/dist/runtime/theme/badge.d.ts +140 -0
- package/dist/runtime/theme/badge.js +90 -0
- package/dist/runtime/theme/breadcrumb.d.ts +86 -0
- package/dist/runtime/theme/breadcrumb.js +22 -0
- package/dist/runtime/theme/button-group.d.ts +53 -0
- package/dist/runtime/theme/button-group.js +21 -0
- package/dist/runtime/theme/button.d.ts +155 -0
- package/dist/runtime/theme/button.js +99 -0
- package/dist/runtime/theme/callout.d.ts +74 -0
- package/dist/runtime/theme/callout.js +23 -0
- package/dist/runtime/theme/card-group.d.ts +44 -0
- package/dist/runtime/theme/card-group.js +19 -0
- package/dist/runtime/theme/card.d.ts +62 -0
- package/dist/runtime/theme/card.js +23 -0
- package/dist/runtime/theme/checkbox.d.ts +218 -0
- package/dist/runtime/theme/checkbox.js +113 -0
- package/dist/runtime/theme/chip.d.ts +155 -0
- package/dist/runtime/theme/chip.js +86 -0
- package/dist/runtime/theme/code-button.d.ts +32 -0
- package/dist/runtime/theme/code-button.js +7 -0
- package/dist/runtime/theme/code-tree.d.ts +50 -0
- package/dist/runtime/theme/code-tree.js +13 -0
- package/dist/runtime/theme/collapsible.d.ts +95 -0
- package/dist/runtime/theme/collapsible.js +46 -0
- package/dist/runtime/theme/color-picker.d.ts +152 -0
- package/dist/runtime/theme/color-picker.js +83 -0
- package/dist/runtime/theme/command-palette.d.ts +110 -0
- package/dist/runtime/theme/command-palette.js +23 -0
- package/dist/runtime/theme/container.d.ts +62 -0
- package/dist/runtime/theme/container.js +18 -0
- package/dist/runtime/theme/content-navigation.d.ts +47 -0
- package/dist/runtime/theme/content-navigation.js +38 -0
- package/dist/runtime/theme/content-surround.d.ts +53 -0
- package/dist/runtime/theme/content-surround.js +22 -0
- package/dist/runtime/theme/content-toc.d.ts +56 -0
- package/dist/runtime/theme/content-toc.js +41 -0
- package/dist/runtime/theme/context-menu.d.ts +38 -0
- package/dist/runtime/theme/context-menu.js +21 -0
- package/dist/runtime/theme/dashboard-group.d.ts +26 -0
- package/dist/runtime/theme/dashboard-group.js +9 -0
- package/dist/runtime/theme/dashboard-navbar.d.ts +44 -0
- package/dist/runtime/theme/dashboard-navbar.js +9 -0
- package/dist/runtime/theme/dashboard-panel.d.ts +26 -0
- package/dist/runtime/theme/dashboard-panel.js +6 -0
- package/dist/runtime/theme/dashboard-resize-handle.d.ts +26 -0
- package/dist/runtime/theme/dashboard-resize-handle.js +17 -0
- package/dist/runtime/theme/dashboard-sidebar.d.ts +50 -0
- package/dist/runtime/theme/dashboard-sidebar.js +40 -0
- package/dist/runtime/theme/date-picker.d.ts +119 -0
- package/dist/runtime/theme/date-picker.js +75 -0
- package/dist/runtime/theme/drawer.d.ts +95 -0
- package/dist/runtime/theme/drawer.js +57 -0
- package/dist/runtime/theme/dropdown.d.ts +41 -0
- package/dist/runtime/theme/dropdown.js +21 -0
- package/dist/runtime/theme/file-tree.d.ts +56 -0
- package/dist/runtime/theme/file-tree.js +33 -0
- package/dist/runtime/theme/file-upload.d.ts +233 -0
- package/dist/runtime/theme/file-upload.js +63 -0
- package/dist/runtime/theme/form-field.d.ts +95 -0
- package/dist/runtime/theme/form-field.js +37 -0
- package/dist/runtime/theme/header.d.ts +38 -0
- package/dist/runtime/theme/header.js +8 -0
- package/dist/runtime/theme/icon.d.ts +80 -0
- package/dist/runtime/theme/icon.js +26 -0
- package/dist/runtime/theme/input-group.d.ts +95 -0
- package/dist/runtime/theme/input-group.js +39 -0
- package/dist/runtime/theme/input-number.d.ts +164 -0
- package/dist/runtime/theme/input-number.js +76 -0
- package/dist/runtime/theme/input.d.ts +185 -0
- package/dist/runtime/theme/input.js +72 -0
- package/dist/runtime/theme/kbd.d.ts +44 -0
- package/dist/runtime/theme/kbd.js +16 -0
- package/dist/runtime/theme/modal.d.ts +74 -0
- package/dist/runtime/theme/modal.js +58 -0
- package/dist/runtime/theme/navigation-menu.d.ts +224 -0
- package/dist/runtime/theme/navigation-menu.js +232 -0
- package/dist/runtime/theme/page-aside.d.ts +44 -0
- package/dist/runtime/theme/page-aside.js +17 -0
- package/dist/runtime/theme/page-header.d.ts +38 -0
- package/dist/runtime/theme/page-header.js +8 -0
- package/dist/runtime/theme/pagination.d.ts +68 -0
- package/dist/runtime/theme/pagination.js +21 -0
- package/dist/runtime/theme/pin-input.d.ts +131 -0
- package/dist/runtime/theme/pin-input.js +40 -0
- package/dist/runtime/theme/popover.d.ts +32 -0
- package/dist/runtime/theme/popover.js +7 -0
- package/dist/runtime/theme/progress.d.ts +185 -0
- package/dist/runtime/theme/progress.js +54 -0
- package/dist/runtime/theme/prose.d.ts +92 -0
- package/dist/runtime/theme/prose.js +17 -0
- package/dist/runtime/theme/radio-group.d.ts +239 -0
- package/dist/runtime/theme/radio-group.js +134 -0
- package/dist/runtime/theme/rating.d.ts +167 -0
- package/dist/runtime/theme/rating.js +77 -0
- package/dist/runtime/theme/read-more.d.ts +38 -0
- package/dist/runtime/theme/read-more.js +21 -0
- package/dist/runtime/theme/scroll-area.d.ts +50 -0
- package/dist/runtime/theme/scroll-area.js +10 -0
- package/dist/runtime/theme/select.d.ts +176 -0
- package/dist/runtime/theme/select.js +74 -0
- package/dist/runtime/theme/separator.d.ts +158 -0
- package/dist/runtime/theme/separator.js +63 -0
- package/dist/runtime/theme/skeleton.d.ts +35 -0
- package/dist/runtime/theme/skeleton.js +27 -0
- package/dist/runtime/theme/slideover.d.ts +107 -0
- package/dist/runtime/theme/slideover.js +62 -0
- package/dist/runtime/theme/slider.d.ts +227 -0
- package/dist/runtime/theme/slider.js +73 -0
- package/dist/runtime/theme/splitter-panel.d.ts +26 -0
- package/dist/runtime/theme/splitter-panel.js +9 -0
- package/dist/runtime/theme/splitter-resize-handle.d.ts +44 -0
- package/dist/runtime/theme/splitter-resize-handle.js +18 -0
- package/dist/runtime/theme/splitter.d.ts +35 -0
- package/dist/runtime/theme/splitter.js +15 -0
- package/dist/runtime/theme/stepper.d.ts +221 -0
- package/dist/runtime/theme/stepper.js +106 -0
- package/dist/runtime/theme/switch.d.ts +206 -0
- package/dist/runtime/theme/switch.js +84 -0
- package/dist/runtime/theme/table.d.ts +176 -0
- package/dist/runtime/theme/table.js +59 -0
- package/dist/runtime/theme/tabs.d.ts +59 -0
- package/dist/runtime/theme/tabs.js +44 -0
- package/dist/runtime/theme/textarea.d.ts +212 -0
- package/dist/runtime/theme/textarea.js +56 -0
- package/dist/runtime/theme/toast.d.ts +80 -0
- package/dist/runtime/theme/toast.js +31 -0
- package/dist/runtime/theme/toggle-group.d.ts +110 -0
- package/dist/runtime/theme/toggle-group.js +48 -0
- package/dist/runtime/theme/toggle.d.ts +92 -0
- package/dist/runtime/theme/toggle.js +48 -0
- package/dist/runtime/theme/tooltip.d.ts +44 -0
- package/dist/runtime/theme/tooltip.js +14 -0
- package/dist/runtime/theme/tree.d.ts +80 -0
- package/dist/runtime/theme/tree.js +32 -0
- package/dist/runtime/theme.css +1 -0
- package/dist/runtime/types/app-config.d.ts +15 -0
- package/dist/runtime/types/index.d.ts +82 -0
- package/dist/runtime/types/index.js +2 -0
- package/dist/runtime/utils/format-bytes.d.ts +2 -0
- package/dist/runtime/utils/format-bytes.js +9 -0
- package/dist/runtime/utils/fuzzy-match.d.ts +12 -0
- package/dist/runtime/utils/fuzzy-match.js +21 -0
- package/dist/runtime/utils/icons.d.ts +38 -0
- package/dist/runtime/utils/icons.js +51 -0
- package/dist/runtime/utils/injection-keys.d.ts +69 -0
- package/dist/runtime/utils/injection-keys.js +3 -0
- package/dist/runtime/utils/messages.d.ts +70 -0
- package/dist/runtime/utils/messages.js +68 -0
- package/dist/runtime/utils/navigation-menu.d.ts +32 -0
- package/dist/runtime/utils/navigation-menu.js +5 -0
- package/dist/runtime/utils/table-columns.d.ts +30 -0
- package/dist/runtime/utils/table-columns.js +89 -0
- package/dist/runtime/utils/table-export.d.ts +12 -0
- package/dist/runtime/utils/table-export.js +29 -0
- package/dist/runtime/utils/ui.d.ts +124 -0
- package/dist/runtime/utils/ui.js +74 -0
- package/dist/types.d.mts +3 -0
- package/package.json +99 -0
|
@@ -0,0 +1,590 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import {
|
|
3
|
+
ComboboxAnchor,
|
|
4
|
+
ComboboxArrow,
|
|
5
|
+
ComboboxContent,
|
|
6
|
+
ComboboxInput,
|
|
7
|
+
ComboboxPortal,
|
|
8
|
+
ComboboxRoot,
|
|
9
|
+
ComboboxTrigger,
|
|
10
|
+
TagsInputInput,
|
|
11
|
+
TagsInputItem,
|
|
12
|
+
TagsInputItemDelete,
|
|
13
|
+
TagsInputItemText,
|
|
14
|
+
TagsInputRoot,
|
|
15
|
+
useDirection
|
|
16
|
+
} from "reka-ui";
|
|
17
|
+
import { computed, ref } from "vue";
|
|
18
|
+
import Button from "../components/Button.vue";
|
|
19
|
+
import Chip from "../components/Chip.vue";
|
|
20
|
+
import Icon from "../components/Icon.vue";
|
|
21
|
+
import Modal from "../components/Modal.vue";
|
|
22
|
+
import Tooltip from "../components/Tooltip.vue";
|
|
23
|
+
import { useComboboxSelect } from "../composables/use-combobox-select";
|
|
24
|
+
import { useFormField } from "../composables/use-form-field";
|
|
25
|
+
import { useIcons } from "../composables/use-icons";
|
|
26
|
+
import { useIsMobile } from "../composables/use-media-query";
|
|
27
|
+
import { useMessages } from "../composables/use-messages";
|
|
28
|
+
import { selectTheme } from "../theme/select";
|
|
29
|
+
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
30
|
+
import ComboboxSelectBody from "./ComboboxSelectBody.vue";
|
|
31
|
+
defineOptions({ inheritAttrs: false });
|
|
32
|
+
const props = defineProps({
|
|
33
|
+
id: { type: String, required: false },
|
|
34
|
+
name: { type: String, required: false },
|
|
35
|
+
items: { type: Array, required: true },
|
|
36
|
+
valueKey: { type: String, required: false },
|
|
37
|
+
labelKey: { type: String, required: false },
|
|
38
|
+
modelValue: { type: [String, Array], required: false },
|
|
39
|
+
multiple: { type: Boolean, required: false },
|
|
40
|
+
searchable: { type: Boolean, required: false },
|
|
41
|
+
virtualize: { type: [Boolean, Object], required: false },
|
|
42
|
+
displayMode: { type: String, required: false, default: "comma" },
|
|
43
|
+
maxChips: { type: Number, required: false, default: 3 },
|
|
44
|
+
loading: { type: Boolean, required: false },
|
|
45
|
+
placeholder: { type: String, required: false },
|
|
46
|
+
disabled: { type: Boolean, required: false },
|
|
47
|
+
size: { type: null, required: false },
|
|
48
|
+
invalid: { type: Boolean, required: false },
|
|
49
|
+
color: { type: null, required: false, default: "primary" },
|
|
50
|
+
clearable: { type: Boolean, required: false },
|
|
51
|
+
dropdown: { type: Boolean, required: false },
|
|
52
|
+
creatable: { type: Boolean, required: false },
|
|
53
|
+
forceSelection: { type: Boolean, required: false },
|
|
54
|
+
searchTerm: { type: String, required: false },
|
|
55
|
+
resetSearchTermOnBlur: { type: Boolean, required: false, default: true },
|
|
56
|
+
resetSearchTermOnSelect: { type: Boolean, required: false, default: true },
|
|
57
|
+
arrow: { type: Boolean, required: false, default: false },
|
|
58
|
+
mobileModal: { type: Boolean, required: false },
|
|
59
|
+
ui: { type: Object, required: false }
|
|
60
|
+
});
|
|
61
|
+
const emit = defineEmits(["update:modelValue", "update:searchTerm"]);
|
|
62
|
+
const {
|
|
63
|
+
flatOptions,
|
|
64
|
+
selectedOptions,
|
|
65
|
+
visibleOptions,
|
|
66
|
+
overflowOptions,
|
|
67
|
+
commaText,
|
|
68
|
+
resolveOption,
|
|
69
|
+
toOption,
|
|
70
|
+
setValue,
|
|
71
|
+
removeValue,
|
|
72
|
+
hasMatchingOption,
|
|
73
|
+
commitCreatableText
|
|
74
|
+
} = useComboboxSelect(props, emit, { creatable: props.creatable });
|
|
75
|
+
function clear() {
|
|
76
|
+
setValue(props.multiple ? [] : void 0);
|
|
77
|
+
}
|
|
78
|
+
const selectedChipValue = ref();
|
|
79
|
+
const dir = useDirection();
|
|
80
|
+
function onTriggerKeydown(event) {
|
|
81
|
+
if (!props.multiple || props.displayMode !== "chip")
|
|
82
|
+
return;
|
|
83
|
+
const chips = visibleOptions.value;
|
|
84
|
+
if (!chips.length)
|
|
85
|
+
return;
|
|
86
|
+
const lastValue = chips.at(-1).value;
|
|
87
|
+
switch (event.key) {
|
|
88
|
+
case "Delete":
|
|
89
|
+
case "Backspace": {
|
|
90
|
+
if (selectedChipValue.value !== void 0) {
|
|
91
|
+
const index = chips.findIndex((o) => o.value === selectedChipValue.value);
|
|
92
|
+
const removedValue = selectedChipValue.value;
|
|
93
|
+
const remaining = chips.filter((o) => o.value !== removedValue);
|
|
94
|
+
selectedChipValue.value = remaining[Math.min(index, remaining.length - 1)]?.value;
|
|
95
|
+
removeValue(removedValue);
|
|
96
|
+
event.preventDefault();
|
|
97
|
+
} else if (event.key === "Backspace") {
|
|
98
|
+
selectedChipValue.value = lastValue;
|
|
99
|
+
event.preventDefault();
|
|
100
|
+
}
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
case "Home":
|
|
104
|
+
case "End":
|
|
105
|
+
case "ArrowRight":
|
|
106
|
+
case "ArrowLeft": {
|
|
107
|
+
const isForwardKey = dir.value === "rtl" ? event.key === "ArrowLeft" : event.key === "ArrowRight";
|
|
108
|
+
const isNext = isForwardKey || event.key === "End";
|
|
109
|
+
if (event.key === "Home") {
|
|
110
|
+
selectedChipValue.value = chips[0].value;
|
|
111
|
+
} else if (event.key === "End") {
|
|
112
|
+
selectedChipValue.value = lastValue;
|
|
113
|
+
} else if (!selectedChipValue.value) {
|
|
114
|
+
if (!isNext)
|
|
115
|
+
selectedChipValue.value = lastValue;
|
|
116
|
+
} else {
|
|
117
|
+
const index = chips.findIndex((o) => o.value === selectedChipValue.value);
|
|
118
|
+
const nextIndex = index + (isNext ? 1 : -1);
|
|
119
|
+
selectedChipValue.value = nextIndex >= chips.length ? void 0 : chips[Math.max(0, nextIndex)]?.value;
|
|
120
|
+
}
|
|
121
|
+
event.preventDefault();
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
case "ArrowUp":
|
|
125
|
+
case "ArrowDown": {
|
|
126
|
+
if (selectedChipValue.value !== void 0)
|
|
127
|
+
event.preventDefault();
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
default: {
|
|
131
|
+
selectedChipValue.value = void 0;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
const internalSearchText = ref(props.searchTerm ?? "");
|
|
136
|
+
const searchText = computed({
|
|
137
|
+
get: () => props.searchTerm ?? internalSearchText.value,
|
|
138
|
+
set: (value) => {
|
|
139
|
+
internalSearchText.value = value;
|
|
140
|
+
emit("update:searchTerm", value);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
function revertUnmatchedText() {
|
|
144
|
+
if (!props.forceSelection || !searchText.value || hasMatchingOption(searchText.value))
|
|
145
|
+
return false;
|
|
146
|
+
searchText.value = "";
|
|
147
|
+
return true;
|
|
148
|
+
}
|
|
149
|
+
function onSearchKeydown(event) {
|
|
150
|
+
if (event.key !== "Enter")
|
|
151
|
+
return;
|
|
152
|
+
if (revertUnmatchedText())
|
|
153
|
+
return;
|
|
154
|
+
if (commitCreatableText(searchText.value))
|
|
155
|
+
searchText.value = "";
|
|
156
|
+
}
|
|
157
|
+
function onSearchBlur() {
|
|
158
|
+
if (revertUnmatchedText())
|
|
159
|
+
return;
|
|
160
|
+
if (commitCreatableText(searchText.value))
|
|
161
|
+
searchText.value = "";
|
|
162
|
+
}
|
|
163
|
+
function onDropdownClick() {
|
|
164
|
+
searchText.value = "";
|
|
165
|
+
}
|
|
166
|
+
function displayValue(value) {
|
|
167
|
+
if (!props.creatable || props.multiple || !value || Array.isArray(value))
|
|
168
|
+
return "";
|
|
169
|
+
return resolveOption(value).label;
|
|
170
|
+
}
|
|
171
|
+
const virtualizeConfig = computed(() => {
|
|
172
|
+
if (!props.virtualize)
|
|
173
|
+
return null;
|
|
174
|
+
const opts = props.virtualize === true ? {} : props.virtualize;
|
|
175
|
+
return { estimateSize: opts.estimateSize ?? 32, overscan: opts.overscan ?? 8 };
|
|
176
|
+
});
|
|
177
|
+
const virtualizedOptions = computed(() => {
|
|
178
|
+
if (!props.searchable || !searchText.value)
|
|
179
|
+
return flatOptions.value;
|
|
180
|
+
const needle = searchText.value.toLowerCase();
|
|
181
|
+
return flatOptions.value.filter((option) => option.label.toLowerCase().includes(needle));
|
|
182
|
+
});
|
|
183
|
+
function groupOptions(group) {
|
|
184
|
+
return group.items.map(toOption);
|
|
185
|
+
}
|
|
186
|
+
const field = useFormField();
|
|
187
|
+
const selectId = computed(() => props.id ?? field?.id);
|
|
188
|
+
const selectInvalid = computed(() => props.invalid || (field?.invalid.value ?? false));
|
|
189
|
+
const describedBy = computed(() => field?.describedBy.value);
|
|
190
|
+
const effectiveSize = computed(() => props.size ?? field?.size ?? "md");
|
|
191
|
+
const clearSize = computed(() => ({ sm: "sm", md: "sm", lg: "md" })[effectiveSize.value]);
|
|
192
|
+
const icons = useIcons();
|
|
193
|
+
const messages = useMessages();
|
|
194
|
+
const theme = useComponentTheme("select", selectTheme);
|
|
195
|
+
const ui = computed(() => theme.value({ size: effectiveSize.value, color: props.color, invalid: selectInvalid.value }));
|
|
196
|
+
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
197
|
+
const triggerProps = computed(() => resolveSlot(ui.value.trigger, props.ui?.trigger));
|
|
198
|
+
const valueProps = computed(() => resolveSlot(ui.value.value, props.ui?.value));
|
|
199
|
+
const commaValueProps = computed(() => {
|
|
200
|
+
const override = props.ui?.value;
|
|
201
|
+
const overrideClass = typeof override === "string" ? override : override?.class;
|
|
202
|
+
return resolveSlot(ui.value.value, {
|
|
203
|
+
...typeof override === "object" && override !== null ? override : {},
|
|
204
|
+
class: [overrideClass, "flex-initial min-w-0"].filter(Boolean).join(" ")
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
const chipOverflowProps = computed(() => resolveSlot(ui.value.chipOverflow, props.ui?.chipOverflow));
|
|
208
|
+
const iconProps = computed(() => resolveSlot(ui.value.icon, props.ui?.icon));
|
|
209
|
+
const clearProps = computed(() => resolveSlot(ui.value.clear, props.ui?.clear));
|
|
210
|
+
const dropdownProps = computed(() => resolveSlot(ui.value.dropdown, props.ui?.dropdown));
|
|
211
|
+
const searchWrapperProps = computed(() => resolveSlot(ui.value.searchWrapper, props.ui?.searchWrapper));
|
|
212
|
+
const searchInputProps = computed(() => resolveSlot(ui.value.searchInput, props.ui?.searchInput));
|
|
213
|
+
const contentProps = computed(() => resolveSlot(ui.value.content, props.ui?.content));
|
|
214
|
+
const arrowProps = computed(() => resolveSlot(ui.value.arrow, props.ui?.arrow));
|
|
215
|
+
const viewportProps = computed(() => resolveSlot(ui.value.viewport, props.ui?.viewport));
|
|
216
|
+
const groupProps = computed(() => resolveSlot(ui.value.group, props.ui?.group));
|
|
217
|
+
const itemProps = computed(() => resolveSlot(ui.value.item, props.ui?.item));
|
|
218
|
+
const itemIndicatorProps = computed(() => resolveSlot(ui.value.itemIndicator, props.ui?.itemIndicator));
|
|
219
|
+
const emptyProps = computed(() => resolveSlot(ui.value.empty, props.ui?.empty));
|
|
220
|
+
const mobileContentProps = computed(() => resolveSlot(ui.value.mobileContent, props.ui?.mobileContent));
|
|
221
|
+
const internalOpen = ref(false);
|
|
222
|
+
const isMobile = useIsMobile();
|
|
223
|
+
const showMobileModal = computed(() => props.mobileModal && isMobile.value);
|
|
224
|
+
const bodyProps = computed(() => ({
|
|
225
|
+
searchable: props.searchable,
|
|
226
|
+
creatable: props.creatable,
|
|
227
|
+
searchText: searchText.value,
|
|
228
|
+
displayValue,
|
|
229
|
+
items: props.items,
|
|
230
|
+
flatOptions: flatOptions.value,
|
|
231
|
+
virtualizeConfig: virtualizeConfig.value,
|
|
232
|
+
virtualizedOptions: virtualizedOptions.value,
|
|
233
|
+
toOption,
|
|
234
|
+
groupOptions,
|
|
235
|
+
onSearchKeydown,
|
|
236
|
+
onSearchBlur,
|
|
237
|
+
searchWrapperProps: searchWrapperProps.value,
|
|
238
|
+
searchInputProps: searchInputProps.value,
|
|
239
|
+
viewportProps: viewportProps.value,
|
|
240
|
+
emptyProps: emptyProps.value,
|
|
241
|
+
groupProps: groupProps.value,
|
|
242
|
+
itemProps: itemProps.value,
|
|
243
|
+
itemIndicatorProps: itemIndicatorProps.value
|
|
244
|
+
}));
|
|
245
|
+
</script>
|
|
246
|
+
|
|
247
|
+
<template>
|
|
248
|
+
<ComboboxRoot
|
|
249
|
+
:open="internalOpen"
|
|
250
|
+
:model-value="modelValue"
|
|
251
|
+
:multiple="multiple"
|
|
252
|
+
:disabled="disabled"
|
|
253
|
+
:name="name ?? field?.name"
|
|
254
|
+
:ignore-filter="!searchable"
|
|
255
|
+
:reset-search-term-on-blur="resetSearchTermOnBlur"
|
|
256
|
+
:reset-search-term-on-select="resetSearchTermOnSelect"
|
|
257
|
+
v-bind="rootProps"
|
|
258
|
+
@update:open="internalOpen = $event"
|
|
259
|
+
@update:model-value="(value) => emit('update:modelValue', value)"
|
|
260
|
+
>
|
|
261
|
+
<ComboboxAnchor>
|
|
262
|
+
<!--
|
|
263
|
+
Select (creatable=false): a button trigger, opened by clicking anywhere
|
|
264
|
+
on it - the search input (if any) lives inside the popover instead.
|
|
265
|
+
Autocomplete (creatable=true): the input itself IS the trigger, so
|
|
266
|
+
typing is always available without opening anything first.
|
|
267
|
+
-->
|
|
268
|
+
<div
|
|
269
|
+
v-if="creatable"
|
|
270
|
+
:id="selectId"
|
|
271
|
+
data-ui-group-item
|
|
272
|
+
:aria-invalid="selectInvalid || void 0"
|
|
273
|
+
:aria-describedby="describedBy"
|
|
274
|
+
:aria-busy="loading || void 0"
|
|
275
|
+
v-bind="triggerProps"
|
|
276
|
+
>
|
|
277
|
+
<!--
|
|
278
|
+
TagsInputRoot doesn't own selection truth here - it only reads
|
|
279
|
+
visibleOptions to render chips and provides real per-chip keyboard
|
|
280
|
+
navigation (ArrowLeft/Right moves a virtual "selected" tag without
|
|
281
|
+
ever moving real DOM focus off the input; Backspace/Delete removes
|
|
282
|
+
it) via TagsInputInput's keydown handling. @remove-tag is the only
|
|
283
|
+
way its state flows back to us - removeValue is what actually
|
|
284
|
+
mutates the real modelValue.
|
|
285
|
+
-->
|
|
286
|
+
<TagsInputRoot
|
|
287
|
+
v-if="multiple && displayMode === 'chip'"
|
|
288
|
+
:model-value="visibleOptions.map((o) => o.value)"
|
|
289
|
+
delimiter=""
|
|
290
|
+
as-child
|
|
291
|
+
@remove-tag="removeValue"
|
|
292
|
+
>
|
|
293
|
+
<!--
|
|
294
|
+
as-child projects Chip itself as the tag element - TagsInputItem
|
|
295
|
+
still owns collection registration/arrow-key nav via whatever
|
|
296
|
+
it clones its props onto. TagsInputItemDelete keeps its own
|
|
297
|
+
<button> (safe here - this branch's own wrapper is a <div>,
|
|
298
|
+
not a button) by filling Chip's #remove slot instead of its
|
|
299
|
+
remove-icon slot, so Chip never renders a second, nested
|
|
300
|
+
interactive control for it to conflict with.
|
|
301
|
+
-->
|
|
302
|
+
<TagsInputItem
|
|
303
|
+
v-for="option in visibleOptions"
|
|
304
|
+
:key="option.value"
|
|
305
|
+
:value="option.value"
|
|
306
|
+
as-child
|
|
307
|
+
>
|
|
308
|
+
<Chip
|
|
309
|
+
size="sm"
|
|
310
|
+
color="primary"
|
|
311
|
+
variant="soft"
|
|
312
|
+
removable
|
|
313
|
+
:ui="{ root: 'data-[state=active]:ring-2 data-[state=active]:ring-[var(--ui-primary)]' }"
|
|
314
|
+
>
|
|
315
|
+
<TagsInputItemText as="span">
|
|
316
|
+
<slot name="item" :item="option.raw">
|
|
317
|
+
{{ option.label }}
|
|
318
|
+
</slot>
|
|
319
|
+
</TagsInputItemText>
|
|
320
|
+
<template #remove="{ class: removeClass }">
|
|
321
|
+
<TagsInputItemDelete :class="removeClass" :aria-label="messages.removeItem(option.label)">
|
|
322
|
+
<Icon :name="icons.close" class="size-3" />
|
|
323
|
+
</TagsInputItemDelete>
|
|
324
|
+
</template>
|
|
325
|
+
</Chip>
|
|
326
|
+
</TagsInputItem>
|
|
327
|
+
<ComboboxInput v-model="searchText" as-child>
|
|
328
|
+
<TagsInputInput
|
|
329
|
+
:display-value="displayValue"
|
|
330
|
+
:placeholder="placeholder"
|
|
331
|
+
v-bind="searchInputProps"
|
|
332
|
+
@keydown="onSearchKeydown"
|
|
333
|
+
@blur="onSearchBlur"
|
|
334
|
+
/>
|
|
335
|
+
</ComboboxInput>
|
|
336
|
+
</TagsInputRoot>
|
|
337
|
+
<ComboboxInput
|
|
338
|
+
v-else
|
|
339
|
+
v-model="searchText"
|
|
340
|
+
:display-value="displayValue"
|
|
341
|
+
:placeholder="placeholder"
|
|
342
|
+
v-bind="searchInputProps"
|
|
343
|
+
@keydown="onSearchKeydown"
|
|
344
|
+
@blur="onSearchBlur"
|
|
345
|
+
/>
|
|
346
|
+
<Tooltip v-if="overflowOptions.length" :text="overflowOptions.map((o) => o.label).join(', ')">
|
|
347
|
+
<span v-bind="chipOverflowProps">{{ messages.moreItems(overflowOptions.length) }}</span>
|
|
348
|
+
</Tooltip>
|
|
349
|
+
<!--
|
|
350
|
+
A plain Button, not ComboboxCancel as-child - this trigger is a
|
|
351
|
+
<div>, so unlike the non-creatable branch below there's no real
|
|
352
|
+
HTML-nesting reason to avoid a real <button> here. Dropped anyway
|
|
353
|
+
to keep both branches' clear button identical; ComboboxCancel's
|
|
354
|
+
own click-driven modelValue/search reset isn't needed since our
|
|
355
|
+
own clear() (via setValue) already covers it, and ComboboxInput's
|
|
356
|
+
display-value re-syncs the visible text once modelValue changes.
|
|
357
|
+
tabindex="-1" replicates the one bit of its behavior this used.
|
|
358
|
+
-->
|
|
359
|
+
<Button
|
|
360
|
+
v-if="clearable && !disabled && selectedOptions.length"
|
|
361
|
+
:size="clearSize"
|
|
362
|
+
variant="text"
|
|
363
|
+
color="neutral"
|
|
364
|
+
tabindex="-1"
|
|
365
|
+
:aria-label="messages.clear"
|
|
366
|
+
v-bind="clearProps"
|
|
367
|
+
@click.stop="clear"
|
|
368
|
+
>
|
|
369
|
+
<template #icon="{ class: iconClass }">
|
|
370
|
+
<slot name="clear-icon">
|
|
371
|
+
<Icon :name="icons.close" :class="iconClass" />
|
|
372
|
+
</slot>
|
|
373
|
+
</template>
|
|
374
|
+
</Button>
|
|
375
|
+
<slot v-if="loading" name="loading-icon">
|
|
376
|
+
<Icon :name="icons.loading" class="size-4 animate-spin" v-bind="iconProps" />
|
|
377
|
+
</slot>
|
|
378
|
+
<span v-if="loading" class="sr-only">{{ messages.loading }}</span>
|
|
379
|
+
<ComboboxTrigger v-if="dropdown" v-bind="dropdownProps" @click="onDropdownClick">
|
|
380
|
+
<slot name="dropdown-icon">
|
|
381
|
+
<Icon :name="icons.chevronDown" class="size-4" />
|
|
382
|
+
</slot>
|
|
383
|
+
</ComboboxTrigger>
|
|
384
|
+
</div>
|
|
385
|
+
|
|
386
|
+
<ComboboxTrigger
|
|
387
|
+
v-else
|
|
388
|
+
:id="selectId"
|
|
389
|
+
data-ui-group-item
|
|
390
|
+
:aria-invalid="selectInvalid || void 0"
|
|
391
|
+
:aria-describedby="describedBy"
|
|
392
|
+
:aria-busy="loading || void 0"
|
|
393
|
+
v-bind="triggerProps"
|
|
394
|
+
tabindex="0"
|
|
395
|
+
@keydown="onTriggerKeydown"
|
|
396
|
+
@blur="selectedChipValue = void 0"
|
|
397
|
+
>
|
|
398
|
+
<template v-if="multiple">
|
|
399
|
+
<!--
|
|
400
|
+
Both branches wrap their content (chips, or the comma-joined
|
|
401
|
+
text) together with the +N more tooltip in one flex-1 container -
|
|
402
|
+
that's what pushes the chevron to the trigger's far right edge,
|
|
403
|
+
while the tooltip itself stays immediately next to the visible
|
|
404
|
+
content rather than getting shoved all the way to the end too.
|
|
405
|
+
-->
|
|
406
|
+
<div v-if="displayMode === 'chip'" class="flex flex-1 flex-wrap items-center gap-1.5">
|
|
407
|
+
<Chip
|
|
408
|
+
v-for="option in visibleOptions"
|
|
409
|
+
:key="option.value"
|
|
410
|
+
size="sm"
|
|
411
|
+
color="primary"
|
|
412
|
+
variant="soft"
|
|
413
|
+
removable
|
|
414
|
+
:data-state="option.value === selectedChipValue ? 'active' : 'inactive'"
|
|
415
|
+
:aria-current="option.value === selectedChipValue || void 0"
|
|
416
|
+
:ui="{ root: 'data-[state=active]:ring-2 data-[state=active]:ring-[var(--ui-primary)]' }"
|
|
417
|
+
>
|
|
418
|
+
<slot name="item" :item="option.raw">
|
|
419
|
+
{{ option.label }}
|
|
420
|
+
</slot>
|
|
421
|
+
<!-- role="button", not a real <button> - this trigger already IS a <button> (ComboboxTrigger), see the clear button below for why. -->
|
|
422
|
+
<template #remove="{ class: removeClass }">
|
|
423
|
+
<span role="button" tabindex="-1" :class="removeClass" :aria-label="messages.removeItem(option.label)" @click.stop="removeValue(option.value)">
|
|
424
|
+
<Icon :name="icons.close" class="size-3" />
|
|
425
|
+
</span>
|
|
426
|
+
</template>
|
|
427
|
+
</Chip>
|
|
428
|
+
<span v-if="!selectedOptions.length" v-bind="valueProps" data-placeholder="">
|
|
429
|
+
{{ placeholder }}
|
|
430
|
+
</span>
|
|
431
|
+
<Tooltip v-if="overflowOptions.length" :text="overflowOptions.map((o) => o.label).join(', ')">
|
|
432
|
+
<span v-bind="chipOverflowProps">{{ messages.moreItems(overflowOptions.length) }}</span>
|
|
433
|
+
</Tooltip>
|
|
434
|
+
</div>
|
|
435
|
+
<div v-else class="flex flex-1 items-center gap-1.5">
|
|
436
|
+
<span v-bind="commaValueProps" :data-placeholder="!selectedOptions.length || void 0">
|
|
437
|
+
{{ commaText || placeholder }}
|
|
438
|
+
</span>
|
|
439
|
+
<Tooltip v-if="overflowOptions.length" :text="overflowOptions.map((o) => o.label).join(', ')">
|
|
440
|
+
<span v-bind="chipOverflowProps">{{ messages.moreItems(overflowOptions.length) }}</span>
|
|
441
|
+
</Tooltip>
|
|
442
|
+
</div>
|
|
443
|
+
</template>
|
|
444
|
+
<span v-else v-bind="valueProps" :data-placeholder="!selectedOptions.length || void 0">
|
|
445
|
+
<slot name="value" :selected="selectedOptions[0]">{{ selectedOptions[0]?.label || placeholder }}</slot>
|
|
446
|
+
</span>
|
|
447
|
+
|
|
448
|
+
<!--
|
|
449
|
+
as="span", not a real <button> - this trigger already IS a
|
|
450
|
+
<button> (ComboboxTrigger defaults as="button"), and HTML doesn't
|
|
451
|
+
allow nesting one inside another: the browser's own HTML parser
|
|
452
|
+
silently closes the outer button as soon as it hits the inner
|
|
453
|
+
one, which during SSR corrupts the whole trigger - everything
|
|
454
|
+
from this point on ends up as a sibling *outside* it once
|
|
455
|
+
hydration parses the server markup. role="button" replaces the
|
|
456
|
+
semantics a real <button> would have carried; tabindex="-1" was
|
|
457
|
+
already set here regardless, so nothing about keyboard
|
|
458
|
+
reachability changes.
|
|
459
|
+
-->
|
|
460
|
+
<Button
|
|
461
|
+
v-if="clearable && !disabled && selectedOptions.length"
|
|
462
|
+
as="span"
|
|
463
|
+
role="button"
|
|
464
|
+
:size="clearSize"
|
|
465
|
+
variant="text"
|
|
466
|
+
color="neutral"
|
|
467
|
+
tabindex="-1"
|
|
468
|
+
:aria-label="messages.clear"
|
|
469
|
+
v-bind="clearProps"
|
|
470
|
+
@click.stop="clear"
|
|
471
|
+
>
|
|
472
|
+
<template #icon="{ class: iconClass }">
|
|
473
|
+
<slot name="clear-icon">
|
|
474
|
+
<Icon :name="icons.close" :class="iconClass" />
|
|
475
|
+
</slot>
|
|
476
|
+
</template>
|
|
477
|
+
</Button>
|
|
478
|
+
<template v-if="loading">
|
|
479
|
+
<slot name="loading-icon">
|
|
480
|
+
<Icon :name="icons.loading" class="size-4 animate-spin" v-bind="iconProps" />
|
|
481
|
+
</slot>
|
|
482
|
+
</template>
|
|
483
|
+
<template v-else>
|
|
484
|
+
<slot name="dropdown-icon">
|
|
485
|
+
<Icon :name="icons.chevronDown" class="size-4" v-bind="iconProps" />
|
|
486
|
+
</slot>
|
|
487
|
+
</template>
|
|
488
|
+
<span v-if="loading" class="sr-only">{{ messages.loading }}</span>
|
|
489
|
+
</ComboboxTrigger>
|
|
490
|
+
</ComboboxAnchor>
|
|
491
|
+
|
|
492
|
+
<ComboboxPortal v-if="!showMobileModal">
|
|
493
|
+
<ComboboxContent position="popper" :side-offset="4" v-bind="contentProps">
|
|
494
|
+
<ComboboxSelectBody v-bind="bodyProps" @update:search-text="searchText = $event">
|
|
495
|
+
<template #header>
|
|
496
|
+
<slot name="header" />
|
|
497
|
+
</template>
|
|
498
|
+
<template #filter-icon>
|
|
499
|
+
<slot name="filter-icon" />
|
|
500
|
+
</template>
|
|
501
|
+
<template #empty>
|
|
502
|
+
<slot name="empty" />
|
|
503
|
+
</template>
|
|
504
|
+
<template #empty-filter>
|
|
505
|
+
<slot name="empty-filter" />
|
|
506
|
+
</template>
|
|
507
|
+
<template #item="scope">
|
|
508
|
+
<slot name="item" v-bind="scope" />
|
|
509
|
+
</template>
|
|
510
|
+
<template #group="scope">
|
|
511
|
+
<slot name="group" v-bind="scope" />
|
|
512
|
+
</template>
|
|
513
|
+
<template #footer>
|
|
514
|
+
<slot name="footer" />
|
|
515
|
+
</template>
|
|
516
|
+
</ComboboxSelectBody>
|
|
517
|
+
<ComboboxArrow v-if="arrow" v-bind="arrowProps" />
|
|
518
|
+
</ComboboxContent>
|
|
519
|
+
</ComboboxPortal>
|
|
520
|
+
<!--
|
|
521
|
+
Below 768px, presents the exact same ComboboxSelectBody - the same
|
|
522
|
+
Root-injected filtering/selection/keyboard behavior, unchanged -
|
|
523
|
+
inside a centered Modal instead of the small anchored popover above.
|
|
524
|
+
No ComboboxPortal here: Modal's own DialogPortal already teleports
|
|
525
|
+
#content as a whole, nesting a second teleport inside it would be
|
|
526
|
+
redundant. ComboboxContent still wraps it (no `position` prop, so
|
|
527
|
+
Reka renders it as a plain unstyled box rather than applying its own
|
|
528
|
+
Floating-UI positioning - confirmed by reading ComboboxContentImpl
|
|
529
|
+
directly) since ComboboxViewport/ComboboxItem's own context still
|
|
530
|
+
expects a ComboboxContent ancestor. `title`/`description` are
|
|
531
|
+
passed explicitly here - Modal's own dev-mode a11y warning is
|
|
532
|
+
satisfied merely by the content slot existing, so it won't catch a
|
|
533
|
+
name-less dialog on its own; Modal registers both with Reka
|
|
534
|
+
(visually hidden) even though the content slot replaces its own
|
|
535
|
+
visible header.
|
|
536
|
+
-->
|
|
537
|
+
<!--
|
|
538
|
+
auto-focus="!creatable" - Select's own trigger is a one-off tap (a
|
|
539
|
+
button; once the modal opens, the next interaction is tapping an
|
|
540
|
+
item, or typing into a *different* search box that lives inside the
|
|
541
|
+
modal itself), so Reka's default open-autofocus is fine, even
|
|
542
|
+
helpful for a keyboard user. Autocomplete's trigger *is* the search
|
|
543
|
+
input itself, typed into continuously while the modal stays open -
|
|
544
|
+
Reka's default there stole focus away on the very first keystroke
|
|
545
|
+
(confirmed live: opening via typing immediately re-focused the
|
|
546
|
+
modal's own content, silently dropping every character typed
|
|
547
|
+
afterward) - the same class of bug DatePicker's own range-mode
|
|
548
|
+
autofocus interference was, just triggered by every keystroke
|
|
549
|
+
instead of a single click.
|
|
550
|
+
:ui content - overrides Modal's own default rounded-lg down to
|
|
551
|
+
rounded-md, matching every other floating panel in this library
|
|
552
|
+
(Select/Autocomplete/DatePicker's own desktop popovers all use
|
|
553
|
+
rounded-md) - rounded-lg reads noticeably heavier/rounder than the
|
|
554
|
+
desktop equivalent for what's otherwise the same surface.
|
|
555
|
+
-->
|
|
556
|
+
<Modal
|
|
557
|
+
v-else :open="internalOpen" :title="placeholder || messages.search" :description="messages.searchDescription"
|
|
558
|
+
:auto-focus="!creatable" :ui="{ content: 'rounded-[var(--ui-radius-md)]' }"
|
|
559
|
+
@update:open="internalOpen = $event"
|
|
560
|
+
>
|
|
561
|
+
<template #content>
|
|
562
|
+
<ComboboxContent v-bind="mobileContentProps">
|
|
563
|
+
<ComboboxSelectBody v-bind="bodyProps" @update:search-text="searchText = $event">
|
|
564
|
+
<template #header>
|
|
565
|
+
<slot name="header" />
|
|
566
|
+
</template>
|
|
567
|
+
<template #filter-icon>
|
|
568
|
+
<slot name="filter-icon" />
|
|
569
|
+
</template>
|
|
570
|
+
<template #empty>
|
|
571
|
+
<slot name="empty" />
|
|
572
|
+
</template>
|
|
573
|
+
<template #empty-filter>
|
|
574
|
+
<slot name="empty-filter" />
|
|
575
|
+
</template>
|
|
576
|
+
<template #item="scope">
|
|
577
|
+
<slot name="item" v-bind="scope" />
|
|
578
|
+
</template>
|
|
579
|
+
<template #group="scope">
|
|
580
|
+
<slot name="group" v-bind="scope" />
|
|
581
|
+
</template>
|
|
582
|
+
<template #footer>
|
|
583
|
+
<slot name="footer" />
|
|
584
|
+
</template>
|
|
585
|
+
</ComboboxSelectBody>
|
|
586
|
+
</ComboboxContent>
|
|
587
|
+
</template>
|
|
588
|
+
</Modal>
|
|
589
|
+
</ComboboxRoot>
|
|
590
|
+
</template>
|