@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
|
@@ -3,6 +3,7 @@ import { TreeItem, TreeRoot } from "reka-ui";
|
|
|
3
3
|
import { computed, mergeProps, ref, watch } from "vue";
|
|
4
4
|
import { useIcons } from "../composables/use-icons";
|
|
5
5
|
import { treeTheme } from "../theme/tree";
|
|
6
|
+
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
6
7
|
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
7
8
|
import Checkbox from "./Checkbox.vue";
|
|
8
9
|
import Icon from "./Icon.vue";
|
|
@@ -21,6 +22,7 @@ const props = defineProps({
|
|
|
21
22
|
getKey: { type: Function, required: false },
|
|
22
23
|
getChildren: { type: Function, required: false },
|
|
23
24
|
size: { type: null, required: false },
|
|
25
|
+
color: { type: null, required: false },
|
|
24
26
|
ui: { type: Object, required: false }
|
|
25
27
|
});
|
|
26
28
|
const emit = defineEmits(["update:modelValue", "update:expanded"]);
|
|
@@ -50,7 +52,8 @@ function onUpdateExpanded(value) {
|
|
|
50
52
|
emit("update:expanded", value);
|
|
51
53
|
}
|
|
52
54
|
const theme = useComponentTheme("tree", treeTheme);
|
|
53
|
-
const
|
|
55
|
+
const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "primary", "primary"));
|
|
56
|
+
const ui = computed(() => theme.value({ size: props.size, color: effectiveColor.value }));
|
|
54
57
|
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
55
58
|
const itemProps = computed(() => resolveSlot(ui.value.item, props.ui?.item));
|
|
56
59
|
const toggleProps = computed(() => resolveSlot(ui.value.toggle, props.ui?.toggle));
|
|
@@ -77,6 +80,7 @@ function treeItemProps(entry, level) {
|
|
|
77
80
|
:propagate-select="propagateSelect"
|
|
78
81
|
:bubble-select="bubbleSelect"
|
|
79
82
|
:disabled="disabled"
|
|
83
|
+
:data-selaras-color="effectiveColor"
|
|
80
84
|
v-bind="rootProps"
|
|
81
85
|
@update:model-value="onUpdateModelValue"
|
|
82
86
|
@update:expanded="onUpdateExpanded"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { TreeThemeSlots } from '../theme/tree.js';
|
|
3
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
3
4
|
import type { UiProp } from '../utils/ui.js';
|
|
4
5
|
import { treeTheme } from '../theme/tree.js';
|
|
5
6
|
type TreeVariants = VariantProps<typeof treeTheme>;
|
|
@@ -31,6 +32,8 @@ export interface TreeProps {
|
|
|
31
32
|
/** @default item => item.children */
|
|
32
33
|
getChildren?: (item: TreeItemType) => TreeItemType[] | undefined;
|
|
33
34
|
size?: TreeVariants['size'];
|
|
35
|
+
/** The selected-row and keyboard-focus accent. @default 'primary' */
|
|
36
|
+
color?: ColorRole;
|
|
34
37
|
ui?: UiProp<TreeThemeSlots>;
|
|
35
38
|
}
|
|
36
39
|
export interface TreeEmits {
|
|
@@ -48,11 +51,11 @@ export interface TreeSlots {
|
|
|
48
51
|
}) => any;
|
|
49
52
|
}
|
|
50
53
|
declare const __VLS_base: import("vue").DefineComponent<TreeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
51
|
-
"update:modelValue": (value: TreeItemType | TreeItemType[]) => any;
|
|
52
54
|
"update:expanded": (value: string[]) => any;
|
|
55
|
+
"update:modelValue": (value: TreeItemType | TreeItemType[]) => any;
|
|
53
56
|
}, string, import("vue").PublicProps, Readonly<TreeProps> & Readonly<{
|
|
54
|
-
"onUpdate:modelValue"?: ((value: TreeItemType | TreeItemType[]) => any) | undefined;
|
|
55
57
|
"onUpdate:expanded"?: ((value: string[]) => any) | undefined;
|
|
58
|
+
"onUpdate:modelValue"?: ((value: TreeItemType | TreeItemType[]) => any) | undefined;
|
|
56
59
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
57
60
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
58
61
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
import type { Component
|
|
2
|
-
export interface DrawerInstance {
|
|
3
|
-
id: number;
|
|
4
|
-
component: Component;
|
|
5
|
-
props: Record<string, unknown>;
|
|
6
|
-
isOpen: boolean;
|
|
7
|
-
title?: string;
|
|
8
|
-
description?: string;
|
|
9
|
-
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
10
|
-
handle?: boolean;
|
|
11
|
-
snapPoints?: (number | string)[];
|
|
12
|
-
snapPoint?: number | string | null;
|
|
13
|
-
snapToSequentialPoints?: boolean;
|
|
14
|
-
dismissible?: boolean;
|
|
15
|
-
modal?: boolean | 'trap-focus';
|
|
16
|
-
overlay?: boolean;
|
|
17
|
-
transition?: boolean;
|
|
18
|
-
resolve: (value: unknown) => void;
|
|
19
|
-
}
|
|
1
|
+
import type { Component } from 'vue';
|
|
20
2
|
export interface UseDrawerOpenOptions {
|
|
21
3
|
props?: Record<string, unknown>;
|
|
22
4
|
/** Registered with Reka as the drawer's accessible name, visually hidden - the opened component still supplies its own visible header via the content slot. */
|
|
@@ -34,9 +16,6 @@ export interface UseDrawerOpenOptions {
|
|
|
34
16
|
transition?: boolean;
|
|
35
17
|
}
|
|
36
18
|
export interface UseDrawerReturn {
|
|
37
|
-
drawers: Ref<DrawerInstance[]>;
|
|
38
19
|
open: <T = void>(component: Component, options?: UseDrawerOpenOptions) => Promise<T | undefined>;
|
|
39
|
-
close: (id: number, value?: unknown) => void;
|
|
40
|
-
remove: (id: number) => void;
|
|
41
20
|
}
|
|
42
21
|
export declare function useDrawer(): UseDrawerReturn;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { markRaw
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { markRaw } from "vue";
|
|
2
|
+
import { useDrawerService } from "../internal/programmatic-services.js";
|
|
3
|
+
import { useProgrammaticThemeSnapshot } from "../utils/programmatic-theme.js";
|
|
4
4
|
export function useDrawer() {
|
|
5
|
+
const service = useDrawerService();
|
|
6
|
+
const snapshotTheme = useProgrammaticThemeSnapshot();
|
|
5
7
|
function open(component, options) {
|
|
8
|
+
if (import.meta.server)
|
|
9
|
+
return Promise.reject(new Error("[useDrawer] open() is client-only. Render SDrawer declaratively during SSR."));
|
|
6
10
|
return new Promise((resolve) => {
|
|
7
|
-
|
|
8
|
-
id:
|
|
11
|
+
service.instances.value.push({
|
|
12
|
+
id: service.nextId(),
|
|
9
13
|
// Vue components are meant to stay an opaque, non-reactive value -
|
|
10
14
|
// without this, pushing one into this reactive array wraps it in
|
|
11
15
|
// a reactive proxy too, which Vue's own dev warning flags as
|
|
@@ -13,6 +17,7 @@ export function useDrawer() {
|
|
|
13
17
|
component: markRaw(component),
|
|
14
18
|
props: options?.props ?? {},
|
|
15
19
|
isOpen: true,
|
|
20
|
+
_settled: false,
|
|
16
21
|
title: options?.title,
|
|
17
22
|
description: options?.description,
|
|
18
23
|
side: options?.side,
|
|
@@ -24,21 +29,10 @@ export function useDrawer() {
|
|
|
24
29
|
modal: options?.modal,
|
|
25
30
|
overlay: options?.overlay,
|
|
26
31
|
transition: options?.transition,
|
|
32
|
+
_theme: snapshotTheme(),
|
|
27
33
|
resolve
|
|
28
34
|
});
|
|
29
35
|
});
|
|
30
36
|
}
|
|
31
|
-
|
|
32
|
-
const instance = drawers.value.find((d) => d.id === id);
|
|
33
|
-
if (!instance)
|
|
34
|
-
return;
|
|
35
|
-
instance.isOpen = false;
|
|
36
|
-
instance.resolve(value);
|
|
37
|
-
}
|
|
38
|
-
function remove(id) {
|
|
39
|
-
const index = drawers.value.findIndex((d) => d.id === id);
|
|
40
|
-
if (index !== -1)
|
|
41
|
-
drawers.value.splice(index, 1);
|
|
42
|
-
}
|
|
43
|
-
return { drawers, open, close, remove };
|
|
37
|
+
return { open };
|
|
44
38
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ComputedRef } from 'vue';
|
|
2
2
|
import type { IconRegistry } from '../utils/icons.js';
|
|
3
3
|
/**
|
|
4
|
-
* Merges a consumer's app.config.icons override onto the default
|
|
5
|
-
* registry - mirrors useComponentTheme's
|
|
4
|
+
* Merges a consumer's app.config.selaras.icons override onto the default
|
|
5
|
+
* (Hugeicons) registry - mirrors useComponentTheme's selaras.ui.<key> merge (see
|
|
6
6
|
* ../utils/ui.ts), just for icon name strings instead of tv() themes, so a
|
|
7
7
|
* single semantic key (e.g. close) can be overridden once for every
|
|
8
8
|
* component that uses it rather than per component.
|
|
@@ -3,5 +3,5 @@ import { useAppConfig } from "#imports";
|
|
|
3
3
|
import { defaultIcons } from "../utils/icons.js";
|
|
4
4
|
export function useIcons() {
|
|
5
5
|
const appConfig = useAppConfig();
|
|
6
|
-
return computed(() => ({ ...defaultIcons, ...appConfig.icons }));
|
|
6
|
+
return computed(() => ({ ...defaultIcons, ...appConfig.selaras?.icons }));
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ComputedRef } from 'vue';
|
|
2
2
|
/**
|
|
3
3
|
* The app-wide default BCP-47 locale code, overridable via
|
|
4
|
-
* `app.config.locale` - mirrors useIcons()/useMessages()'s own
|
|
5
|
-
*
|
|
4
|
+
* `app.config.selaras.locale` - mirrors useIcons()/useMessages()'s own
|
|
5
|
+
* namespaced merge (see use-icons.ts), just for a single string
|
|
6
6
|
* instead of a registry. DatePicker/InputNumber/TimeStepper each read
|
|
7
7
|
* this as their own `locale` prop's fallback instead of hardcoding
|
|
8
8
|
* 'en-US' independently, so a consumer sets the locale once instead of
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
2
|
/**
|
|
3
|
-
* Whether the viewport is
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* than a one-off check, so a live resize across the breakpoint updates
|
|
9
|
-
* reactively instead of only being read once at mount.
|
|
3
|
+
* Whether the viewport is below the consumer's selected Tailwind breakpoint.
|
|
4
|
+
* False during SSR/first render; samples the generated CSS bridge on mount.
|
|
5
|
+
* Relative units stay in the native media query, whose font-size basis is
|
|
6
|
+
* different from an authored root font-size. Breakpoints are build-time theme
|
|
7
|
+
* conditions: runtime CSS changes do not rewrite compiled responsive utilities.
|
|
10
8
|
*/
|
|
11
|
-
export declare function useIsMobile(
|
|
9
|
+
export declare function useIsMobile(): Ref<boolean>;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { onMounted, onUnmounted, ref } from "vue";
|
|
2
|
-
export function useIsMobile(
|
|
2
|
+
export function useIsMobile() {
|
|
3
3
|
const isMobile = ref(false);
|
|
4
4
|
let mediaQuery;
|
|
5
5
|
function update() {
|
|
6
6
|
isMobile.value = mediaQuery?.matches ?? false;
|
|
7
7
|
}
|
|
8
8
|
onMounted(() => {
|
|
9
|
-
|
|
9
|
+
const breakpoint = getComputedStyle(document.documentElement).getPropertyValue("--selaras-adaptive-breakpoint").trim();
|
|
10
|
+
if (!/^(?:\d+(?:\.\d+)?|\.\d+)(?:px|rem|em)$/.test(breakpoint)) {
|
|
11
|
+
console.warn('[Selaras] Adaptive presentation requires a Tailwind breakpoint in px, rem or em. Import "#selaras/tailwind.css" in your Tailwind entry and define the selected --breakpoint-* token in @theme.');
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
mediaQuery = window.matchMedia(`(width < ${breakpoint})`);
|
|
10
15
|
update();
|
|
11
16
|
mediaQuery.addEventListener("change", update);
|
|
12
17
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ComputedRef } from 'vue';
|
|
2
2
|
import type { MessageRegistry } from '../utils/messages.js';
|
|
3
3
|
/**
|
|
4
|
-
* Merges a consumer's app.config.messages override onto the default
|
|
5
|
-
* (English) registry - mirrors useIcons' own
|
|
4
|
+
* Merges a consumer's app.config.selaras.messages override onto the default
|
|
5
|
+
* (English) registry - mirrors useIcons' own namespaced merge (see
|
|
6
6
|
* use-icons.ts), just for UI copy instead of icon names. This is where a
|
|
7
7
|
* consuming app wires up real translation: override every key with
|
|
8
8
|
* locale-aware text (or functions, for the interpolated ones), typically
|
|
@@ -3,5 +3,5 @@ import { useAppConfig } from "#imports";
|
|
|
3
3
|
import { defaultMessages } from "../utils/messages.js";
|
|
4
4
|
export function useMessages() {
|
|
5
5
|
const appConfig = useAppConfig();
|
|
6
|
-
return computed(() => ({ ...defaultMessages, ...appConfig.messages }));
|
|
6
|
+
return computed(() => ({ ...defaultMessages, ...appConfig.selaras?.messages }));
|
|
7
7
|
}
|
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
import type { Component
|
|
2
|
-
export interface ModalInstance {
|
|
3
|
-
id: number;
|
|
4
|
-
component: Component;
|
|
5
|
-
props: Record<string, unknown>;
|
|
6
|
-
isOpen: boolean;
|
|
7
|
-
title?: string;
|
|
8
|
-
description?: string;
|
|
9
|
-
dismissible?: boolean;
|
|
10
|
-
modal?: boolean;
|
|
11
|
-
overlay?: boolean;
|
|
12
|
-
transition?: boolean;
|
|
13
|
-
resolve: (value: unknown) => void;
|
|
14
|
-
}
|
|
1
|
+
import type { Component } from 'vue';
|
|
15
2
|
export interface UseModalOpenOptions {
|
|
16
3
|
props?: Record<string, unknown>;
|
|
17
4
|
/** Registered with Reka as the dialog's accessible name, visually hidden - the opened component still supplies its own visible header via the content slot. */
|
|
@@ -24,9 +11,6 @@ export interface UseModalOpenOptions {
|
|
|
24
11
|
transition?: boolean;
|
|
25
12
|
}
|
|
26
13
|
export interface UseModalReturn {
|
|
27
|
-
modals: Ref<ModalInstance[]>;
|
|
28
14
|
open: <T = void>(component: Component, options?: UseModalOpenOptions) => Promise<T | undefined>;
|
|
29
|
-
close: (id: number, value?: unknown) => void;
|
|
30
|
-
remove: (id: number) => void;
|
|
31
15
|
}
|
|
32
16
|
export declare function useModal(): UseModalReturn;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { markRaw
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { markRaw } from "vue";
|
|
2
|
+
import { useModalService } from "../internal/programmatic-services.js";
|
|
3
|
+
import { useProgrammaticThemeSnapshot } from "../utils/programmatic-theme.js";
|
|
4
4
|
export function useModal() {
|
|
5
|
+
const service = useModalService();
|
|
6
|
+
const snapshotTheme = useProgrammaticThemeSnapshot();
|
|
5
7
|
function open(component, options) {
|
|
8
|
+
if (import.meta.server)
|
|
9
|
+
return Promise.reject(new Error("[useModal] open() is client-only. Render SModal declaratively during SSR."));
|
|
6
10
|
return new Promise((resolve) => {
|
|
7
|
-
|
|
8
|
-
id:
|
|
11
|
+
service.instances.value.push({
|
|
12
|
+
id: service.nextId(),
|
|
9
13
|
// Vue components are meant to stay an opaque, non-reactive value -
|
|
10
14
|
// without this, pushing one into this reactive array wraps it in
|
|
11
15
|
// a reactive proxy too, which Vue's own dev warning flags as
|
|
@@ -13,27 +17,17 @@ export function useModal() {
|
|
|
13
17
|
component: markRaw(component),
|
|
14
18
|
props: options?.props ?? {},
|
|
15
19
|
isOpen: true,
|
|
20
|
+
_settled: false,
|
|
16
21
|
title: options?.title,
|
|
17
22
|
description: options?.description,
|
|
18
23
|
dismissible: options?.dismissible,
|
|
19
24
|
modal: options?.modal,
|
|
20
25
|
overlay: options?.overlay,
|
|
21
26
|
transition: options?.transition,
|
|
27
|
+
_theme: snapshotTheme(),
|
|
22
28
|
resolve
|
|
23
29
|
});
|
|
24
30
|
});
|
|
25
31
|
}
|
|
26
|
-
|
|
27
|
-
const instance = modals.value.find((m) => m.id === id);
|
|
28
|
-
if (!instance)
|
|
29
|
-
return;
|
|
30
|
-
instance.isOpen = false;
|
|
31
|
-
instance.resolve(value);
|
|
32
|
-
}
|
|
33
|
-
function remove(id) {
|
|
34
|
-
const index = modals.value.findIndex((m) => m.id === id);
|
|
35
|
-
if (index !== -1)
|
|
36
|
-
modals.value.splice(index, 1);
|
|
37
|
-
}
|
|
38
|
-
return { modals, open, close, remove };
|
|
32
|
+
return { open };
|
|
39
33
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ComputedRef } from 'vue';
|
|
2
2
|
/**
|
|
3
3
|
* Whether v-ripple should actually spawn a ripple - mirrors useIcons' own
|
|
4
|
-
* app.config merge (see use-icons.ts), just a single
|
|
5
|
-
*
|
|
4
|
+
* app.config merge (see use-icons.ts), just a single boolean instead of a
|
|
5
|
+
* registry object. Defaults to enabled; app.config.selaras.ripple =
|
|
6
6
|
* false turns it off globally for every component that binds v-ripple to
|
|
7
7
|
* this rather than hardcoding it unconditionally on.
|
|
8
8
|
*
|
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
import type { Component
|
|
2
|
-
export interface SlideoverInstance {
|
|
3
|
-
id: number;
|
|
4
|
-
component: Component;
|
|
5
|
-
props: Record<string, unknown>;
|
|
6
|
-
isOpen: boolean;
|
|
7
|
-
title?: string;
|
|
8
|
-
description?: string;
|
|
9
|
-
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
10
|
-
inset?: boolean;
|
|
11
|
-
dismissible?: boolean;
|
|
12
|
-
modal?: boolean;
|
|
13
|
-
overlay?: boolean;
|
|
14
|
-
transition?: boolean;
|
|
15
|
-
resolve: (value: unknown) => void;
|
|
16
|
-
}
|
|
1
|
+
import type { Component } from 'vue';
|
|
17
2
|
export interface UseSlideoverOpenOptions {
|
|
18
3
|
props?: Record<string, unknown>;
|
|
19
4
|
/** Registered with Reka as the panel's accessible name, visually hidden - the opened component still supplies its own visible header via the content slot. */
|
|
@@ -28,9 +13,6 @@ export interface UseSlideoverOpenOptions {
|
|
|
28
13
|
transition?: boolean;
|
|
29
14
|
}
|
|
30
15
|
export interface UseSlideoverReturn {
|
|
31
|
-
slideovers: Ref<SlideoverInstance[]>;
|
|
32
16
|
open: <T = void>(component: Component, options?: UseSlideoverOpenOptions) => Promise<T | undefined>;
|
|
33
|
-
close: (id: number, value?: unknown) => void;
|
|
34
|
-
remove: (id: number) => void;
|
|
35
17
|
}
|
|
36
18
|
export declare function useSlideover(): UseSlideoverReturn;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { markRaw
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { markRaw } from "vue";
|
|
2
|
+
import { useSlideoverService } from "../internal/programmatic-services.js";
|
|
3
|
+
import { useProgrammaticThemeSnapshot } from "../utils/programmatic-theme.js";
|
|
4
4
|
export function useSlideover() {
|
|
5
|
+
const service = useSlideoverService();
|
|
6
|
+
const snapshotTheme = useProgrammaticThemeSnapshot();
|
|
5
7
|
function open(component, options) {
|
|
8
|
+
if (import.meta.server)
|
|
9
|
+
return Promise.reject(new Error("[useSlideover] open() is client-only. Render SSlideover declaratively during SSR."));
|
|
6
10
|
return new Promise((resolve) => {
|
|
7
|
-
|
|
8
|
-
id:
|
|
11
|
+
service.instances.value.push({
|
|
12
|
+
id: service.nextId(),
|
|
9
13
|
// Vue components are meant to stay an opaque, non-reactive value -
|
|
10
14
|
// without this, pushing one into this reactive array wraps it in
|
|
11
15
|
// a reactive proxy too, which Vue's own dev warning flags as
|
|
@@ -13,6 +17,7 @@ export function useSlideover() {
|
|
|
13
17
|
component: markRaw(component),
|
|
14
18
|
props: options?.props ?? {},
|
|
15
19
|
isOpen: true,
|
|
20
|
+
_settled: false,
|
|
16
21
|
title: options?.title,
|
|
17
22
|
description: options?.description,
|
|
18
23
|
side: options?.side,
|
|
@@ -21,21 +26,10 @@ export function useSlideover() {
|
|
|
21
26
|
modal: options?.modal,
|
|
22
27
|
overlay: options?.overlay,
|
|
23
28
|
transition: options?.transition,
|
|
29
|
+
_theme: snapshotTheme(),
|
|
24
30
|
resolve
|
|
25
31
|
});
|
|
26
32
|
});
|
|
27
33
|
}
|
|
28
|
-
|
|
29
|
-
const instance = slideovers.value.find((s) => s.id === id);
|
|
30
|
-
if (!instance)
|
|
31
|
-
return;
|
|
32
|
-
instance.isOpen = false;
|
|
33
|
-
instance.resolve(value);
|
|
34
|
-
}
|
|
35
|
-
function remove(id) {
|
|
36
|
-
const index = slideovers.value.findIndex((s) => s.id === id);
|
|
37
|
-
if (index !== -1)
|
|
38
|
-
slideovers.value.splice(index, 1);
|
|
39
|
-
}
|
|
40
|
-
return { slideovers, open, close, remove };
|
|
34
|
+
return { open };
|
|
41
35
|
}
|
|
@@ -1,34 +1,91 @@
|
|
|
1
|
+
import type { ColumnDef, ColumnVisibilityState, ExpandedState, RowData, RowSelectionState, SortingState } from '@tanstack/vue-table';
|
|
1
2
|
import type { ComputedRef } from 'vue';
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* One fixed feature set for every STable instance, registered once at module
|
|
5
|
+
* scope - not per-instance. This is what createTableHook is for: it pre-binds
|
|
6
|
+
* TFeatures so STable never needs to expose a features generic to consumers,
|
|
7
|
+
* who only ever get this one capability set rather than TanStack's full
|
|
8
|
+
* a-la-carte feature menu. columnPinning/columnVisibility need no row model
|
|
9
|
+
* of their own (they don't change which rows exist, only column layout).
|
|
10
|
+
*/
|
|
11
|
+
declare const tableHook: import("@tanstack/vue-table").CreateTableHookResult<{
|
|
12
|
+
rowSortingFeature: import("@tanstack/vue-table").TableFeature;
|
|
13
|
+
rowSelectionFeature: import("@tanstack/vue-table").TableFeature;
|
|
14
|
+
rowPaginationFeature: import("@tanstack/vue-table").TableFeature;
|
|
15
|
+
rowExpandingFeature: import("@tanstack/vue-table").TableFeature;
|
|
16
|
+
columnFilteringFeature: import("@tanstack/vue-table").TableFeature;
|
|
17
|
+
columnVisibilityFeature: import("@tanstack/vue-table").TableFeature;
|
|
18
|
+
columnPinningFeature: import("@tanstack/vue-table").TableFeature;
|
|
19
|
+
globalFilteringFeature: import("@tanstack/vue-table").TableFeature;
|
|
20
|
+
sortedRowModel: (table: import("@tanstack/vue-table").Table<any, any>) => () => import("@tanstack/vue-table").RowModel<any, any>;
|
|
21
|
+
paginatedRowModel: (table: import("@tanstack/vue-table").Table<any, any>) => () => import("@tanstack/vue-table").RowModel<any, any>;
|
|
22
|
+
filteredRowModel: (table: import("@tanstack/vue-table").Table<any, any>) => () => import("@tanstack/vue-table").RowModel<any, any>;
|
|
23
|
+
expandedRowModel: (table: import("@tanstack/vue-table").Table<any, any>) => () => import("@tanstack/vue-table").RowModel<any, any>;
|
|
24
|
+
sortFns: {
|
|
25
|
+
alphanumeric: import("@tanstack/vue-table").CreatedSortFn<any, any>;
|
|
26
|
+
};
|
|
27
|
+
filterFns: {
|
|
28
|
+
includesString: import("@tanstack/vue-table").CreatedFilterFn<any, any>;
|
|
29
|
+
};
|
|
30
|
+
}, Record<string, import("@tanstack/vue-table").ComponentType<any>>, Record<string, import("@tanstack/vue-table").ComponentType<any>>, Record<string, import("@tanstack/vue-table").ComponentType<any>>>;
|
|
31
|
+
export type TableColumnDef<TData extends RowData = RowData> = ColumnDef<typeof tableHook.appFeatures, TData, any>;
|
|
32
|
+
export type TableSortingState = SortingState;
|
|
33
|
+
export type TableRowSelectionState = RowSelectionState;
|
|
34
|
+
export type TableExpandedState = ExpandedState;
|
|
35
|
+
export type TableColumnVisibilityState = ColumnVisibilityState;
|
|
36
|
+
export type TableGetRowId<TData extends RowData = RowData> = (row: TData, index: number) => string;
|
|
37
|
+
/** Creates TanStack v9 column definitions bound to STable's fixed feature set. */
|
|
38
|
+
export declare const createTableColumnHelper: <TData extends RowData>() => import("@tanstack/vue-table").AppColumnHelper<{
|
|
39
|
+
rowSortingFeature: import("@tanstack/vue-table").TableFeature;
|
|
40
|
+
rowSelectionFeature: import("@tanstack/vue-table").TableFeature;
|
|
41
|
+
rowPaginationFeature: import("@tanstack/vue-table").TableFeature;
|
|
42
|
+
rowExpandingFeature: import("@tanstack/vue-table").TableFeature;
|
|
43
|
+
columnFilteringFeature: import("@tanstack/vue-table").TableFeature;
|
|
44
|
+
columnVisibilityFeature: import("@tanstack/vue-table").TableFeature;
|
|
45
|
+
columnPinningFeature: import("@tanstack/vue-table").TableFeature;
|
|
46
|
+
globalFilteringFeature: import("@tanstack/vue-table").TableFeature;
|
|
47
|
+
sortedRowModel: (table: import("@tanstack/vue-table").Table<any, any>) => () => import("@tanstack/vue-table").RowModel<any, any>;
|
|
48
|
+
paginatedRowModel: (table: import("@tanstack/vue-table").Table<any, any>) => () => import("@tanstack/vue-table").RowModel<any, any>;
|
|
49
|
+
filteredRowModel: (table: import("@tanstack/vue-table").Table<any, any>) => () => import("@tanstack/vue-table").RowModel<any, any>;
|
|
50
|
+
expandedRowModel: (table: import("@tanstack/vue-table").Table<any, any>) => () => import("@tanstack/vue-table").RowModel<any, any>;
|
|
51
|
+
sortFns: {
|
|
52
|
+
alphanumeric: import("@tanstack/vue-table").CreatedSortFn<any, any>;
|
|
53
|
+
};
|
|
54
|
+
filterFns: {
|
|
55
|
+
includesString: import("@tanstack/vue-table").CreatedFilterFn<any, any>;
|
|
56
|
+
};
|
|
57
|
+
}, TData, Record<string, import("@tanstack/vue-table").ComponentType<any>>, Record<string, import("@tanstack/vue-table").ComponentType<any>>>;
|
|
58
|
+
interface UseTableProps<TData extends RowData> {
|
|
59
|
+
data: TData[];
|
|
4
60
|
selectable?: boolean;
|
|
5
61
|
pageSize?: number;
|
|
6
62
|
virtualize?: unknown;
|
|
7
|
-
sorting?:
|
|
8
|
-
defaultSorting?:
|
|
9
|
-
rowSelection?:
|
|
63
|
+
sorting?: TableSortingState;
|
|
64
|
+
defaultSorting?: TableSortingState;
|
|
65
|
+
rowSelection?: TableRowSelectionState;
|
|
10
66
|
globalFilter?: string;
|
|
11
67
|
pageIndex?: number;
|
|
12
|
-
expanded?:
|
|
13
|
-
columnVisibility?:
|
|
68
|
+
expanded?: TableExpandedState;
|
|
69
|
+
columnVisibility?: TableColumnVisibilityState;
|
|
70
|
+
getRowId?: TableGetRowId<TData>;
|
|
14
71
|
manualSorting?: boolean;
|
|
15
72
|
manualFiltering?: boolean;
|
|
16
73
|
manualPagination?: boolean;
|
|
17
74
|
}
|
|
18
75
|
interface UseTableEmit {
|
|
19
|
-
(event: 'update:sorting', value:
|
|
20
|
-
(event: 'update:rowSelection', value:
|
|
76
|
+
(event: 'update:sorting', value: TableSortingState): void;
|
|
77
|
+
(event: 'update:rowSelection', value: TableRowSelectionState): void;
|
|
21
78
|
(event: 'update:globalFilter', value: string): void;
|
|
22
79
|
(event: 'update:pageIndex', value: number): void;
|
|
23
|
-
(event: 'update:expanded', value:
|
|
24
|
-
(event: 'update:columnVisibility', value:
|
|
80
|
+
(event: 'update:expanded', value: TableExpandedState): void;
|
|
81
|
+
(event: 'update:columnVisibility', value: TableColumnVisibilityState): void;
|
|
25
82
|
}
|
|
26
83
|
/**
|
|
27
84
|
* Pure TanStack wiring - the final column defs (including any synthetic
|
|
28
85
|
* selection/expand column, which need to render SCheckbox/an expand button
|
|
29
86
|
* and so live in Table.vue instead) are passed in already built.
|
|
30
87
|
*/
|
|
31
|
-
export declare function useTable(props: UseTableProps
|
|
88
|
+
export declare function useTable<TData extends RowData>(props: UseTableProps<TData>, emit: UseTableEmit, columns: ComputedRef<TableColumnDef<TData>[]>, columnPinning: ComputedRef<{
|
|
32
89
|
start: string[];
|
|
33
90
|
end: string[];
|
|
34
91
|
}>): {
|
|
@@ -51,13 +108,13 @@ export declare function useTable(props: UseTableProps, emit: UseTableEmit, colum
|
|
|
51
108
|
filterFns: {
|
|
52
109
|
includesString: import("@tanstack/vue-table").CreatedFilterFn<any, any>;
|
|
53
110
|
};
|
|
54
|
-
},
|
|
55
|
-
sorting: import("vue").WritableComputedRef<
|
|
56
|
-
rowSelection: import("vue").WritableComputedRef<
|
|
111
|
+
}, TData, Record<string, import("@tanstack/vue-table").ComponentType<any>>, Record<string, import("@tanstack/vue-table").ComponentType<any>>, Record<string, import("@tanstack/vue-table").ComponentType<any>>>;
|
|
112
|
+
sorting: import("vue").WritableComputedRef<SortingState, SortingState>;
|
|
113
|
+
rowSelection: import("vue").WritableComputedRef<RowSelectionState, RowSelectionState>;
|
|
57
114
|
globalFilter: import("vue").WritableComputedRef<string, string>;
|
|
58
115
|
pageIndex: import("vue").WritableComputedRef<number, number>;
|
|
59
|
-
expanded: import("vue").WritableComputedRef<
|
|
60
|
-
columnVisibility: import("vue").WritableComputedRef<
|
|
116
|
+
expanded: import("vue").WritableComputedRef<ExpandedState, ExpandedState>;
|
|
117
|
+
columnVisibility: import("vue").WritableComputedRef<ColumnVisibilityState, ColumnVisibilityState>;
|
|
61
118
|
effectivePageSize: ComputedRef<number>;
|
|
62
119
|
};
|
|
63
120
|
export {};
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
sortFn_alphanumeric
|
|
17
17
|
} from "@tanstack/vue-table";
|
|
18
18
|
import { computed, ref } from "vue";
|
|
19
|
-
const
|
|
19
|
+
const tableHook = createTableHook({
|
|
20
20
|
features: {
|
|
21
21
|
rowSortingFeature,
|
|
22
22
|
rowSelectionFeature,
|
|
@@ -34,6 +34,8 @@ const { useAppTable } = createTableHook({
|
|
|
34
34
|
filterFns: { includesString: filterFn_includesString }
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
+
const { useAppTable } = tableHook;
|
|
38
|
+
export const createTableColumnHelper = tableHook.createAppColumnHelper;
|
|
37
39
|
export function useTable(props, emit, columns, columnPinning) {
|
|
38
40
|
const internalSorting = ref(props.defaultSorting ?? []);
|
|
39
41
|
const sorting = computed({
|
|
@@ -88,6 +90,7 @@ export function useTable(props, emit, columns, columnPinning) {
|
|
|
88
90
|
data: computed(() => props.data),
|
|
89
91
|
columns,
|
|
90
92
|
enableRowSelection: computed(() => !!props.selectable),
|
|
93
|
+
getRowId: props.getRowId,
|
|
91
94
|
// Row expansion otherwise only allows expanding rows that already have
|
|
92
95
|
// real hierarchical subRows - this table's own expansion is manual
|
|
93
96
|
// (detail content via the `expanded` slot), not a subRow tree.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { ColorRole } from '../utils/color-registry.js';
|
|
2
|
+
export interface ToastOptions {
|
|
3
3
|
title?: string;
|
|
4
4
|
description?: string;
|
|
5
5
|
duration?: number;
|
|
6
|
-
/**
|
|
7
|
-
color?:
|
|
6
|
+
/** Tints the icon and left-edge accent with any registered semantic role. Built-in feedback intents also select a default icon. */
|
|
7
|
+
color?: ColorRole;
|
|
8
8
|
/** Overrides the color's own default icon (or shows an icon with no color set at all). */
|
|
9
9
|
icon?: string;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
add: (toast: Omit<ToastItem, "id">) => number;
|
|
11
|
+
export interface UseToastReturn {
|
|
12
|
+
add: (toast: ToastOptions) => number;
|
|
14
13
|
remove: (id: number) => void;
|
|
15
|
-
}
|
|
14
|
+
}
|
|
15
|
+
export declare function useToast(): UseToastReturn;
|