@sewadah/selaras 0.1.1 → 0.3.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 +67 -20
- package/dist/module.d.mts +10 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +123 -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 +22 -12
- 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 +8 -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/ProsePre.d.vue.ts +4 -2
- package/dist/runtime/components/ProsePre.vue +9 -3
- package/dist/runtime/components/ProsePre.vue.d.ts +4 -2
- 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 +35 -50
- package/dist/runtime/theme/prose.js +24 -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 +62 -0
- package/dist/runtime/utils/color-registry.js +191 -0
- package/dist/runtime/utils/dtcg-colors.d.ts +25 -0
- package/dist/runtime/utils/dtcg-colors.js +40 -0
- package/dist/runtime/utils/file-icons.d.ts +8 -0
- package/dist/runtime/utils/file-icons.js +131 -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/navigation-menu.d.ts +3 -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 +19 -0
- package/dist/runtime/utils/seed-colors.js +207 -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 +83 -16
- package/dist/runtime/composables/use-combobox-select.d.ts +0 -45
|
@@ -2,18 +2,22 @@
|
|
|
2
2
|
import { computed, ref } from "vue";
|
|
3
3
|
import { useIcons } from "../composables/use-icons";
|
|
4
4
|
import { proseTheme } from "../theme/prose";
|
|
5
|
+
import { resolveFileIcon } from "../utils/file-icons";
|
|
5
6
|
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
6
7
|
import Badge from "./Badge.vue";
|
|
7
8
|
import Button from "./Button.vue";
|
|
9
|
+
import Icon from "./Icon.vue";
|
|
8
10
|
defineOptions({ inheritAttrs: false });
|
|
9
11
|
const props = defineProps({
|
|
10
12
|
code: { type: String, required: false },
|
|
11
13
|
language: { type: String, required: false },
|
|
12
14
|
filename: { type: String, required: false },
|
|
15
|
+
icon: { type: String, required: false },
|
|
13
16
|
highlights: { type: Array, required: false },
|
|
14
17
|
meta: { type: String, required: false }
|
|
15
18
|
});
|
|
16
19
|
const icons = useIcons();
|
|
20
|
+
const fileIcon = computed(() => props.icon ?? resolveFileIcon(props.language, props.filename));
|
|
17
21
|
const theme = useComponentTheme("prose", proseTheme);
|
|
18
22
|
const ui = computed(() => theme.value());
|
|
19
23
|
const preProps = useRootProps(() => ui.value.pre, () => void 0);
|
|
@@ -32,9 +36,11 @@ async function copy() {
|
|
|
32
36
|
<template>
|
|
33
37
|
<div v-bind="resolveSlot(ui.preWrapper, void 0)">
|
|
34
38
|
<div v-if="filename || language || code" v-bind="resolveSlot(ui.preHeader, void 0)">
|
|
35
|
-
<span v-
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
<span v-bind="resolveSlot(ui.preLabel, void 0)">
|
|
40
|
+
<Icon v-if="fileIcon" :name="fileIcon" v-bind="resolveSlot(ui.preIcon, void 0)" />
|
|
41
|
+
<span v-if="filename" v-bind="resolveSlot(ui.preFilename, void 0)">{{ filename }}</span>
|
|
42
|
+
<Badge v-else-if="language" :label="language" size="sm" variant="outline" />
|
|
43
|
+
</span>
|
|
38
44
|
<Button
|
|
39
45
|
v-if="code"
|
|
40
46
|
v-bind="resolveSlot(ui.preCopyButton, void 0)"
|
|
@@ -2,12 +2,14 @@ export interface ProsePreProps {
|
|
|
2
2
|
code?: string;
|
|
3
3
|
language?: string;
|
|
4
4
|
filename?: string;
|
|
5
|
+
/** Overrides the file-type icon resolved from `filename`/`language`. */
|
|
6
|
+
icon?: string;
|
|
5
7
|
highlights?: number[];
|
|
6
8
|
meta?: string;
|
|
7
9
|
}
|
|
8
|
-
declare var
|
|
10
|
+
declare var __VLS_18: {};
|
|
9
11
|
type __VLS_Slots = {} & {
|
|
10
|
-
default?: (props: typeof
|
|
12
|
+
default?: (props: typeof __VLS_18) => any;
|
|
11
13
|
};
|
|
12
14
|
declare const __VLS_base: import("vue").DefineComponent<ProsePreProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ProsePreProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
15
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { RadioGroupThemeSlots } from '../theme/radio-group.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { radioGroupTheme } from '../theme/radio-group.js';
|
|
5
6
|
export interface RadioItem {
|
|
@@ -19,7 +20,7 @@ export interface RadioGroupProps {
|
|
|
19
20
|
disabled?: boolean;
|
|
20
21
|
invalid?: boolean;
|
|
21
22
|
size?: RadioGroupVariants['size'];
|
|
22
|
-
color?:
|
|
23
|
+
color?: ColorRole;
|
|
23
24
|
orientation?: RadioGroupVariants['orientation'];
|
|
24
25
|
variant?: RadioGroupVariants['variant'];
|
|
25
26
|
ui?: UiProp<RadioGroupThemeSlots>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { RadioGroupIndicator, RadioGroupItem, RadioGroupRoot } from "reka-ui";
|
|
3
|
-
import { computed } from "vue";
|
|
3
|
+
import { computed, mergeProps } from "vue";
|
|
4
4
|
import { useFormField } from "../composables/use-form-field";
|
|
5
5
|
import { radioGroupTheme } from "../theme/radio-group";
|
|
6
|
-
import {
|
|
6
|
+
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
7
|
+
import { resolveSlot, useComponentTheme, useRootProps, useThemeBindings, withFallthroughClass } from "../utils/ui";
|
|
7
8
|
defineOptions({ inheritAttrs: false });
|
|
8
9
|
const props = defineProps({
|
|
9
10
|
id: { type: String, required: false },
|
|
@@ -28,17 +29,19 @@ const describedBy = computed(() => field?.describedBy.value);
|
|
|
28
29
|
const normalizedItems = computed(
|
|
29
30
|
() => props.items.map((item) => typeof item === "string" ? { label: item, value: item } : item)
|
|
30
31
|
);
|
|
32
|
+
const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "primary", "primary"));
|
|
31
33
|
const theme = useComponentTheme("radioGroup", radioGroupTheme);
|
|
32
34
|
const ui = computed(() => theme.value({
|
|
33
35
|
invalid: radioGroupInvalid.value,
|
|
34
36
|
size: effectiveSize.value,
|
|
35
|
-
color:
|
|
37
|
+
color: effectiveColor.value,
|
|
36
38
|
orientation: props.orientation,
|
|
37
39
|
variant: props.variant
|
|
38
40
|
}));
|
|
39
41
|
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
42
|
+
const themeBindings = useThemeBindings();
|
|
40
43
|
function itemWrapperPropsFor(item) {
|
|
41
|
-
return resolveSlot(ui.value.itemWrapper, withFallthroughClass(item.description ? "items-start" : void 0, props.ui?.itemWrapper));
|
|
44
|
+
return mergeProps(themeBindings.value, resolveSlot(ui.value.itemWrapper, withFallthroughClass(item.description ? "items-start" : void 0, props.ui?.itemWrapper)));
|
|
42
45
|
}
|
|
43
46
|
function itemPropsFor(item) {
|
|
44
47
|
return resolveSlot(ui.value.item, withFallthroughClass(item.description ? "mt-0.5" : void 0, props.ui?.item));
|
|
@@ -58,10 +61,11 @@ const labelGroupProps = computed(() => resolveSlot(ui.value.labelGroup, props.ui
|
|
|
58
61
|
:orientation="orientation"
|
|
59
62
|
:aria-invalid="radioGroupInvalid || void 0"
|
|
60
63
|
:aria-describedby="describedBy"
|
|
64
|
+
:data-selaras-color="effectiveColor"
|
|
61
65
|
v-bind="rootProps"
|
|
62
66
|
@update:model-value="(value) => emit('update:modelValue', value)"
|
|
63
67
|
>
|
|
64
|
-
<label v-for="item in normalizedItems" :key="item.value" v-bind="itemWrapperPropsFor(item)">
|
|
68
|
+
<label v-for="item in normalizedItems" :key="item.value" :data-selaras-color="radioGroupInvalid ? 'danger' : void 0" v-bind="itemWrapperPropsFor(item)">
|
|
65
69
|
<RadioGroupItem :value="item.value" :disabled="item.disabled" v-bind="itemPropsFor(item)">
|
|
66
70
|
<RadioGroupIndicator force-mount v-bind="indicatorProps" />
|
|
67
71
|
</RadioGroupItem>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { RadioGroupThemeSlots } from '../theme/radio-group.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { radioGroupTheme } from '../theme/radio-group.js';
|
|
5
6
|
export interface RadioItem {
|
|
@@ -19,7 +20,7 @@ export interface RadioGroupProps {
|
|
|
19
20
|
disabled?: boolean;
|
|
20
21
|
invalid?: boolean;
|
|
21
22
|
size?: RadioGroupVariants['size'];
|
|
22
|
-
color?:
|
|
23
|
+
color?: ColorRole;
|
|
23
24
|
orientation?: RadioGroupVariants['orientation'];
|
|
24
25
|
variant?: RadioGroupVariants['variant'];
|
|
25
26
|
ui?: UiProp<RadioGroupThemeSlots>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { RatingThemeSlots } from '../theme/rating.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { ratingTheme } from '../theme/rating.js';
|
|
5
6
|
type RatingVariants = VariantProps<typeof ratingTheme>;
|
|
@@ -19,7 +20,7 @@ export interface RatingProps {
|
|
|
19
20
|
invalid?: boolean;
|
|
20
21
|
orientation?: RatingVariants['orientation'];
|
|
21
22
|
size?: RatingVariants['size'];
|
|
22
|
-
color?:
|
|
23
|
+
color?: ColorRole;
|
|
23
24
|
name?: string;
|
|
24
25
|
required?: boolean;
|
|
25
26
|
ui?: UiProp<RatingThemeSlots>;
|
|
@@ -4,6 +4,7 @@ import { computed } from "vue";
|
|
|
4
4
|
import { useFormField } from "../composables/use-form-field";
|
|
5
5
|
import { useIcons } from "../composables/use-icons";
|
|
6
6
|
import { ratingTheme } from "../theme/rating";
|
|
7
|
+
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
7
8
|
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
8
9
|
import Icon from "./Icon.vue";
|
|
9
10
|
defineOptions({ inheritAttrs: false });
|
|
@@ -32,10 +33,11 @@ const effectiveSize = computed(() => props.size ?? field?.size ?? "md");
|
|
|
32
33
|
const describedBy = computed(() => field?.describedBy.value);
|
|
33
34
|
const icons = useIcons();
|
|
34
35
|
const theme = useComponentTheme("rating", ratingTheme);
|
|
36
|
+
const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "primary", "primary"));
|
|
35
37
|
const ui = computed(() => theme.value({
|
|
36
38
|
orientation: props.orientation,
|
|
37
39
|
size: effectiveSize.value,
|
|
38
|
-
color:
|
|
40
|
+
color: effectiveColor.value
|
|
39
41
|
}));
|
|
40
42
|
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
41
43
|
const itemProps = computed(() => resolveSlot(ui.value.item, props.ui?.item));
|
|
@@ -47,6 +49,7 @@ const fillIconProps = computed(() => resolveSlot(ui.value.fillIcon, props.ui?.fi
|
|
|
47
49
|
<template>
|
|
48
50
|
<RatingRoot
|
|
49
51
|
:id="ratingId"
|
|
52
|
+
:data-selaras-color="effectiveColor"
|
|
50
53
|
:model-value="modelValue"
|
|
51
54
|
:default-value="defaultValue"
|
|
52
55
|
:length="length"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { RatingThemeSlots } from '../theme/rating.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { ratingTheme } from '../theme/rating.js';
|
|
5
6
|
type RatingVariants = VariantProps<typeof ratingTheme>;
|
|
@@ -19,7 +20,7 @@ export interface RatingProps {
|
|
|
19
20
|
invalid?: boolean;
|
|
20
21
|
orientation?: RatingVariants['orientation'];
|
|
21
22
|
size?: RatingVariants['size'];
|
|
22
|
-
color?:
|
|
23
|
+
color?: ColorRole;
|
|
23
24
|
name?: string;
|
|
24
25
|
required?: boolean;
|
|
25
26
|
ui?: UiProp<RatingThemeSlots>;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { ReadMoreThemeSlots } from '../theme/read-more.js';
|
|
2
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
2
3
|
import type { UiProp } from '../utils/ui.js';
|
|
3
4
|
export interface ReadMoreProps {
|
|
4
5
|
/** Collapsed height in pixels - content shorter than this renders with no truncation UI at all. @default 200 */
|
|
5
6
|
previewHeight?: number;
|
|
7
|
+
/** The disclosure trigger accent. @default 'primary' */
|
|
8
|
+
color?: ColorRole;
|
|
6
9
|
ui?: UiProp<ReadMoreThemeSlots>;
|
|
7
10
|
}
|
|
8
11
|
declare var __VLS_1: {};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { computed, onMounted, onUnmounted, ref } from "vue";
|
|
2
|
+
import { computed, onMounted, onUnmounted, ref, useId } from "vue";
|
|
3
3
|
import { useIcons } from "../composables/use-icons";
|
|
4
4
|
import { useMessages } from "../composables/use-messages";
|
|
5
5
|
import { readMoreTheme } from "../theme/read-more";
|
|
6
|
+
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
6
7
|
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
7
8
|
import Icon from "./Icon.vue";
|
|
8
9
|
defineOptions({ inheritAttrs: false });
|
|
9
10
|
const props = defineProps({
|
|
10
11
|
previewHeight: { type: Number, required: false, default: 200 },
|
|
12
|
+
color: { type: null, required: false },
|
|
11
13
|
ui: { type: Object, required: false }
|
|
12
14
|
});
|
|
13
15
|
const icons = useIcons();
|
|
@@ -15,6 +17,7 @@ const messages = useMessages();
|
|
|
15
17
|
const contentEl = ref();
|
|
16
18
|
const contentHeight = ref(0);
|
|
17
19
|
const open = ref(false);
|
|
20
|
+
const contentId = `selaras-read-more-content-${useId()}`;
|
|
18
21
|
let resizeObserver;
|
|
19
22
|
onMounted(() => {
|
|
20
23
|
if (!contentEl.value)
|
|
@@ -37,7 +40,8 @@ function toggle() {
|
|
|
37
40
|
open.value = !open.value;
|
|
38
41
|
}
|
|
39
42
|
const theme = useComponentTheme("readMore", readMoreTheme);
|
|
40
|
-
const
|
|
43
|
+
const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "primary", "primary"));
|
|
44
|
+
const ui = computed(() => theme.value({ open: open.value, color: effectiveColor.value }));
|
|
41
45
|
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
42
46
|
const contentProps = computed(() => resolveSlot(ui.value.content, props.ui?.content));
|
|
43
47
|
const fadeProps = computed(() => resolveSlot(ui.value.fade, props.ui?.fade));
|
|
@@ -46,12 +50,26 @@ const triggerIconProps = computed(() => resolveSlot(ui.value.triggerIcon, props.
|
|
|
46
50
|
</script>
|
|
47
51
|
|
|
48
52
|
<template>
|
|
49
|
-
<div v-bind="rootProps">
|
|
50
|
-
<div
|
|
53
|
+
<div :data-selaras-color="effectiveColor" v-bind="rootProps">
|
|
54
|
+
<div
|
|
55
|
+
:id="contentId"
|
|
56
|
+
ref="contentEl"
|
|
57
|
+
:style="{ maxHeight }"
|
|
58
|
+
:inert="truncated && !open"
|
|
59
|
+
:aria-hidden="truncated && !open ? 'true' : void 0"
|
|
60
|
+
v-bind="contentProps"
|
|
61
|
+
>
|
|
51
62
|
<slot />
|
|
63
|
+
<div v-if="truncated && !open" v-bind="fadeProps" />
|
|
52
64
|
</div>
|
|
53
|
-
<
|
|
54
|
-
|
|
65
|
+
<button
|
|
66
|
+
v-if="truncated"
|
|
67
|
+
type="button"
|
|
68
|
+
:aria-controls="contentId"
|
|
69
|
+
:aria-expanded="open"
|
|
70
|
+
v-bind="triggerProps"
|
|
71
|
+
@click="toggle"
|
|
72
|
+
>
|
|
55
73
|
{{ open ? messages.showLess : messages.showMore }}
|
|
56
74
|
<Icon :name="icons.chevronDown" v-bind="triggerIconProps" />
|
|
57
75
|
</button>
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { ReadMoreThemeSlots } from '../theme/read-more.js';
|
|
2
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
2
3
|
import type { UiProp } from '../utils/ui.js';
|
|
3
4
|
export interface ReadMoreProps {
|
|
4
5
|
/** Collapsed height in pixels - content shorter than this renders with no truncation UI at all. @default 200 */
|
|
5
6
|
previewHeight?: number;
|
|
7
|
+
/** The disclosure trigger accent. @default 'primary' */
|
|
8
|
+
color?: ColorRole;
|
|
6
9
|
ui?: UiProp<ReadMoreThemeSlots>;
|
|
7
10
|
}
|
|
8
11
|
declare var __VLS_1: {};
|
|
@@ -1,60 +1,24 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
overscan?: number;
|
|
18
|
-
};
|
|
19
|
-
displayMode?: 'comma' | 'chip';
|
|
20
|
-
maxChips?: number;
|
|
21
|
-
loading?: boolean;
|
|
22
|
-
placeholder?: string;
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
size?: SelectVariants['size'];
|
|
25
|
-
invalid?: boolean;
|
|
26
|
-
/** The focus-ring color - the resting (unfocused) ring stays neutral regardless. */
|
|
27
|
-
color?: SelectVariants['color'];
|
|
28
|
-
clearable?: boolean;
|
|
29
|
-
searchTerm?: string;
|
|
30
|
-
resetSearchTermOnBlur?: boolean;
|
|
31
|
-
resetSearchTermOnSelect?: boolean;
|
|
32
|
-
/** Shows a small pointer triangle connecting the panel to its trigger. */
|
|
33
|
-
arrow?: boolean;
|
|
34
|
-
/** Below 768px viewport width, presents the dropdown as a centered Modal instead of a small anchored panel - easier to tap with a finger. Opt-in (defaults `false`) rather than automatic, so an existing usage's look never changes without asking for it. */
|
|
35
|
-
mobileModal?: boolean;
|
|
36
|
-
ui?: UiProp<SelectThemeSlots>;
|
|
37
|
-
}
|
|
38
|
-
export interface SelectEmits {
|
|
39
|
-
'update:modelValue': [value: string | string[] | undefined];
|
|
40
|
-
'update:searchTerm': [value: string];
|
|
41
|
-
}
|
|
42
|
-
declare var __VLS_10: string, __VLS_11: any;
|
|
43
|
-
type __VLS_Slots = {} & {
|
|
44
|
-
[K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any;
|
|
1
|
+
import type { SelectIdentity, SelectModel, SelectProps, SelectSlots } from '../utils/select-contracts.js';
|
|
2
|
+
export type { SelectEmits, SelectProps, SelectSlots } from '../utils/select-contracts.js';
|
|
3
|
+
declare const __VLS_export: <Entry extends object, Key extends string = "value", Multiple extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<SelectProps<Entry, Key, Multiple> & {
|
|
5
|
+
"onUpdate:modelValue"?: ((value: SelectModel<SelectIdentity<Entry, Key>, Multiple>) => any) | undefined;
|
|
6
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
7
|
+
"onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
8
|
+
}> & (typeof globalThis extends {
|
|
9
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
10
|
+
} ? P : {});
|
|
11
|
+
expose: (exposed: {}) => void;
|
|
12
|
+
attrs: any;
|
|
13
|
+
slots: SelectSlots<Entry, Key>;
|
|
14
|
+
emit: ((evt: "update:modelValue", value: SelectModel<SelectIdentity<Entry, Key>, Multiple>) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:searchTerm", value: string) => void);
|
|
15
|
+
}>) => import("vue").VNode & {
|
|
16
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
45
17
|
};
|
|
46
|
-
declare const __VLS_base: import("vue").DefineComponent<SelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
47
|
-
"update:modelValue": (value: string | string[] | undefined) => any;
|
|
48
|
-
"update:searchTerm": (value: string) => any;
|
|
49
|
-
}, string, import("vue").PublicProps, Readonly<SelectProps> & Readonly<{
|
|
50
|
-
"onUpdate:modelValue"?: ((value: string | string[] | undefined) => any) | undefined;
|
|
51
|
-
"onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
52
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
53
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
54
18
|
declare const _default: typeof __VLS_export;
|
|
55
19
|
export default _default;
|
|
56
|
-
type
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
};
|
|
20
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
21
|
+
[K in keyof T]: T[K];
|
|
22
|
+
} : {
|
|
23
|
+
[K in keyof T as K]: T[K];
|
|
24
|
+
}) & {};
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import {
|
|
2
|
+
import { useForwardProps } from "reka-ui";
|
|
3
|
+
import { getCurrentInstance } from "vue";
|
|
3
4
|
import ComboboxSelectBase from "../internal/ComboboxSelectBase.vue";
|
|
4
5
|
const props = defineProps({
|
|
5
6
|
id: { type: String, required: false },
|
|
6
7
|
name: { type: String, required: false },
|
|
8
|
+
form: { type: String, required: false },
|
|
7
9
|
items: { type: Array, required: true },
|
|
8
10
|
valueKey: { type: String, required: false },
|
|
9
11
|
labelKey: { type: String, required: false },
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
open: { type: Boolean, required: false },
|
|
13
|
+
defaultOpen: { type: Boolean, required: false },
|
|
14
|
+
modelValue: { type: null, required: false },
|
|
15
|
+
defaultValue: { type: null, required: false },
|
|
16
|
+
multiple: { type: null, required: false },
|
|
12
17
|
searchable: { type: Boolean, required: false },
|
|
13
18
|
virtualize: { type: [Boolean, Object], required: false },
|
|
14
19
|
displayMode: { type: String, required: false },
|
|
@@ -16,6 +21,7 @@ const props = defineProps({
|
|
|
16
21
|
loading: { type: Boolean, required: false },
|
|
17
22
|
placeholder: { type: String, required: false },
|
|
18
23
|
disabled: { type: Boolean, required: false },
|
|
24
|
+
required: { type: Boolean, required: false },
|
|
19
25
|
size: { type: null, required: false },
|
|
20
26
|
invalid: { type: Boolean, required: false },
|
|
21
27
|
color: { type: null, required: false },
|
|
@@ -24,17 +30,60 @@ const props = defineProps({
|
|
|
24
30
|
resetSearchTermOnBlur: { type: Boolean, required: false },
|
|
25
31
|
resetSearchTermOnSelect: { type: Boolean, required: false },
|
|
26
32
|
arrow: { type: Boolean, required: false },
|
|
27
|
-
|
|
33
|
+
adaptive: { type: Boolean, required: false },
|
|
28
34
|
ui: { type: Object, required: false }
|
|
29
35
|
});
|
|
30
|
-
const emit = defineEmits(["update:modelValue", "update:searchTerm"]);
|
|
31
|
-
const
|
|
36
|
+
const emit = defineEmits(["update:open", "update:modelValue", "update:searchTerm"]);
|
|
37
|
+
const slots = defineSlots();
|
|
38
|
+
const forwarded = useForwardProps(props);
|
|
39
|
+
const instance = getCurrentInstance();
|
|
40
|
+
function baseProps() {
|
|
41
|
+
const controlled = Object.hasOwn(instance.vnode.props ?? {}, "modelValue") || Object.hasOwn(instance.vnode.props ?? {}, "model-value");
|
|
42
|
+
return {
|
|
43
|
+
...forwarded.value,
|
|
44
|
+
items: props.items,
|
|
45
|
+
// useForwardProps omits undefined values; presence still owns selection.
|
|
46
|
+
...controlled ? { modelValue: props.modelValue } : {}
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function updateValue(value) {
|
|
50
|
+
emit("update:modelValue", value);
|
|
51
|
+
}
|
|
52
|
+
function itemData(item) {
|
|
53
|
+
return item;
|
|
54
|
+
}
|
|
55
|
+
function groupData(group) {
|
|
56
|
+
return group;
|
|
57
|
+
}
|
|
58
|
+
function selectedData(selected) {
|
|
59
|
+
return selected && {
|
|
60
|
+
...selected,
|
|
61
|
+
value: selected.value,
|
|
62
|
+
raw: selected.raw === void 0 ? void 0 : itemData(selected.raw)
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
const unscopedSlots = ["header", "footer", "empty", "empty-filter", "filter-icon", "clear-icon", "loading-icon", "dropdown-icon"];
|
|
32
66
|
</script>
|
|
33
67
|
|
|
34
68
|
<template>
|
|
35
|
-
<ComboboxSelectBase
|
|
36
|
-
|
|
37
|
-
|
|
69
|
+
<ComboboxSelectBase
|
|
70
|
+
v-bind="baseProps()"
|
|
71
|
+
:creatable="false"
|
|
72
|
+
@update:open="emit('update:open', $event)"
|
|
73
|
+
@update:model-value="updateValue"
|
|
74
|
+
@update:search-term="emit('update:searchTerm', $event)"
|
|
75
|
+
>
|
|
76
|
+
<template v-if="slots.item" #item="{ item }">
|
|
77
|
+
<slot name="item" :item="itemData(item)" />
|
|
78
|
+
</template>
|
|
79
|
+
<template v-if="slots.group" #group="{ group }">
|
|
80
|
+
<slot name="group" :group="groupData(group)" />
|
|
81
|
+
</template>
|
|
82
|
+
<template v-if="slots.value" #value="{ selected }">
|
|
83
|
+
<slot name="value" :selected="selectedData(selected)" />
|
|
84
|
+
</template>
|
|
85
|
+
<template v-for="slotName in unscopedSlots.filter((name) => slots[name])" :key="slotName" #[slotName]>
|
|
86
|
+
<slot :name="slotName" />
|
|
38
87
|
</template>
|
|
39
88
|
</ComboboxSelectBase>
|
|
40
89
|
</template>
|
|
@@ -1,60 +1,24 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
overscan?: number;
|
|
18
|
-
};
|
|
19
|
-
displayMode?: 'comma' | 'chip';
|
|
20
|
-
maxChips?: number;
|
|
21
|
-
loading?: boolean;
|
|
22
|
-
placeholder?: string;
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
size?: SelectVariants['size'];
|
|
25
|
-
invalid?: boolean;
|
|
26
|
-
/** The focus-ring color - the resting (unfocused) ring stays neutral regardless. */
|
|
27
|
-
color?: SelectVariants['color'];
|
|
28
|
-
clearable?: boolean;
|
|
29
|
-
searchTerm?: string;
|
|
30
|
-
resetSearchTermOnBlur?: boolean;
|
|
31
|
-
resetSearchTermOnSelect?: boolean;
|
|
32
|
-
/** Shows a small pointer triangle connecting the panel to its trigger. */
|
|
33
|
-
arrow?: boolean;
|
|
34
|
-
/** Below 768px viewport width, presents the dropdown as a centered Modal instead of a small anchored panel - easier to tap with a finger. Opt-in (defaults `false`) rather than automatic, so an existing usage's look never changes without asking for it. */
|
|
35
|
-
mobileModal?: boolean;
|
|
36
|
-
ui?: UiProp<SelectThemeSlots>;
|
|
37
|
-
}
|
|
38
|
-
export interface SelectEmits {
|
|
39
|
-
'update:modelValue': [value: string | string[] | undefined];
|
|
40
|
-
'update:searchTerm': [value: string];
|
|
41
|
-
}
|
|
42
|
-
declare var __VLS_10: string, __VLS_11: any;
|
|
43
|
-
type __VLS_Slots = {} & {
|
|
44
|
-
[K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any;
|
|
1
|
+
import type { SelectIdentity, SelectModel, SelectProps, SelectSlots } from '../utils/select-contracts.js';
|
|
2
|
+
export type { SelectEmits, SelectProps, SelectSlots } from '../utils/select-contracts.js';
|
|
3
|
+
declare const __VLS_export: <Entry extends object, Key extends string = "value", Multiple extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<SelectProps<Entry, Key, Multiple> & {
|
|
5
|
+
"onUpdate:modelValue"?: ((value: SelectModel<SelectIdentity<Entry, Key>, Multiple>) => any) | undefined;
|
|
6
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
7
|
+
"onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
8
|
+
}> & (typeof globalThis extends {
|
|
9
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
10
|
+
} ? P : {});
|
|
11
|
+
expose: (exposed: {}) => void;
|
|
12
|
+
attrs: any;
|
|
13
|
+
slots: SelectSlots<Entry, Key>;
|
|
14
|
+
emit: ((evt: "update:modelValue", value: SelectModel<SelectIdentity<Entry, Key>, Multiple>) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:searchTerm", value: string) => void);
|
|
15
|
+
}>) => import("vue").VNode & {
|
|
16
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
45
17
|
};
|
|
46
|
-
declare const __VLS_base: import("vue").DefineComponent<SelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
47
|
-
"update:modelValue": (value: string | string[] | undefined) => any;
|
|
48
|
-
"update:searchTerm": (value: string) => any;
|
|
49
|
-
}, string, import("vue").PublicProps, Readonly<SelectProps> & Readonly<{
|
|
50
|
-
"onUpdate:modelValue"?: ((value: string | string[] | undefined) => any) | undefined;
|
|
51
|
-
"onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
52
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
53
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
54
18
|
declare const _default: typeof __VLS_export;
|
|
55
19
|
export default _default;
|
|
56
|
-
type
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
};
|
|
20
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
21
|
+
[K in keyof T]: T[K];
|
|
22
|
+
} : {
|
|
23
|
+
[K in keyof T as K]: T[K];
|
|
24
|
+
}) & {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { SeparatorThemeSlots } from '../theme/separator.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { separatorTheme } from '../theme/separator.js';
|
|
5
6
|
type SeparatorVariants = VariantProps<typeof separatorTheme>;
|
|
@@ -7,7 +8,7 @@ type __VLS_Slots = SeparatorSlots;
|
|
|
7
8
|
export interface SeparatorProps {
|
|
8
9
|
orientation?: SeparatorVariants['orientation'];
|
|
9
10
|
variant?: SeparatorVariants['variant'];
|
|
10
|
-
color?:
|
|
11
|
+
color?: ColorRole;
|
|
11
12
|
/** Purely visual, not announced to assistive tech (role="none" instead of role="separator"). */
|
|
12
13
|
decorative?: boolean;
|
|
13
14
|
ui?: UiProp<SeparatorThemeSlots>;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { Separator } from "reka-ui";
|
|
3
3
|
import { computed } from "vue";
|
|
4
4
|
import { separatorTheme } from "../theme/separator";
|
|
5
|
+
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
5
6
|
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
6
7
|
defineOptions({ inheritAttrs: false });
|
|
7
8
|
const props = defineProps({
|
|
@@ -13,10 +14,11 @@ const props = defineProps({
|
|
|
13
14
|
});
|
|
14
15
|
defineSlots();
|
|
15
16
|
const theme = useComponentTheme("separator", separatorTheme);
|
|
17
|
+
const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "neutral", "neutral"));
|
|
16
18
|
const ui = computed(() => theme.value({
|
|
17
19
|
orientation: props.orientation,
|
|
18
20
|
variant: props.variant,
|
|
19
|
-
color:
|
|
21
|
+
color: effectiveColor.value
|
|
20
22
|
}));
|
|
21
23
|
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
22
24
|
const lineProps = computed(() => resolveSlot(ui.value.line, props.ui?.line));
|
|
@@ -24,7 +26,7 @@ const labelProps = computed(() => resolveSlot(ui.value.label, props.ui?.label));
|
|
|
24
26
|
</script>
|
|
25
27
|
|
|
26
28
|
<template>
|
|
27
|
-
<Separator :orientation="orientation" :decorative="decorative" v-bind="rootProps">
|
|
29
|
+
<Separator :orientation="orientation" :decorative="decorative" :data-selaras-color="effectiveColor" v-bind="rootProps">
|
|
28
30
|
<span v-bind="lineProps" />
|
|
29
31
|
<template v-if="$slots.default">
|
|
30
32
|
<span v-bind="labelProps">
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { SeparatorThemeSlots } from '../theme/separator.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { separatorTheme } from '../theme/separator.js';
|
|
5
6
|
type SeparatorVariants = VariantProps<typeof separatorTheme>;
|
|
@@ -7,7 +8,7 @@ type __VLS_Slots = SeparatorSlots;
|
|
|
7
8
|
export interface SeparatorProps {
|
|
8
9
|
orientation?: SeparatorVariants['orientation'];
|
|
9
10
|
variant?: SeparatorVariants['variant'];
|
|
10
|
-
color?:
|
|
11
|
+
color?: ColorRole;
|
|
11
12
|
/** Purely visual, not announced to assistive tech (role="none" instead of role="separator"). */
|
|
12
13
|
decorative?: boolean;
|
|
13
14
|
ui?: UiProp<SeparatorThemeSlots>;
|
|
@@ -2,6 +2,8 @@ import type { SlideoverThemeSlots } from '../theme/slideover.js';
|
|
|
2
2
|
import type { UiProp } from '../utils/ui.js';
|
|
3
3
|
export interface SlideoverProps {
|
|
4
4
|
open?: boolean;
|
|
5
|
+
/** Initial visibility for an uncontrolled slideover. Supplying `open` makes the parent authoritative. */
|
|
6
|
+
defaultOpen?: boolean;
|
|
5
7
|
title?: string;
|
|
6
8
|
description?: string;
|
|
7
9
|
/** Which edge the panel slides in from. */
|