@sewadah/selaras 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +131 -0
- package/dist/module.d.mts +22 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +127 -0
- package/dist/runtime/components/Accordion.d.vue.ts +59 -0
- package/dist/runtime/components/Accordion.vue +65 -0
- package/dist/runtime/components/Accordion.vue.d.ts +59 -0
- package/dist/runtime/components/Alert.d.vue.ts +39 -0
- package/dist/runtime/components/Alert.vue +64 -0
- package/dist/runtime/components/Alert.vue.d.ts +39 -0
- package/dist/runtime/components/AlertDialog.d.vue.ts +66 -0
- package/dist/runtime/components/AlertDialog.vue +116 -0
- package/dist/runtime/components/AlertDialog.vue.d.ts +66 -0
- package/dist/runtime/components/App.d.vue.ts +32 -0
- package/dist/runtime/components/App.vue +26 -0
- package/dist/runtime/components/App.vue.d.ts +32 -0
- package/dist/runtime/components/Autocomplete.d.vue.ts +61 -0
- package/dist/runtime/components/Autocomplete.vue +41 -0
- package/dist/runtime/components/Autocomplete.vue.d.ts +61 -0
- package/dist/runtime/components/Avatar.d.vue.ts +46 -0
- package/dist/runtime/components/Avatar.vue +64 -0
- package/dist/runtime/components/Avatar.vue.d.ts +46 -0
- package/dist/runtime/components/AvatarGroup.d.vue.ts +14 -0
- package/dist/runtime/components/AvatarGroup.vue +41 -0
- package/dist/runtime/components/AvatarGroup.vue.d.ts +14 -0
- package/dist/runtime/components/Badge.d.vue.ts +37 -0
- package/dist/runtime/components/Badge.vue +47 -0
- package/dist/runtime/components/Badge.vue.d.ts +37 -0
- package/dist/runtime/components/Breadcrumb.d.vue.ts +37 -0
- package/dist/runtime/components/Breadcrumb.vue +109 -0
- package/dist/runtime/components/Breadcrumb.vue.d.ts +37 -0
- package/dist/runtime/components/Button.d.vue.ts +45 -0
- package/dist/runtime/components/Button.vue +67 -0
- package/dist/runtime/components/Button.vue.d.ts +45 -0
- package/dist/runtime/components/ButtonGroup.d.vue.ts +22 -0
- package/dist/runtime/components/ButtonGroup.vue +21 -0
- package/dist/runtime/components/ButtonGroup.vue.d.ts +22 -0
- package/dist/runtime/components/Callout.d.vue.ts +27 -0
- package/dist/runtime/components/Callout.vue +47 -0
- package/dist/runtime/components/Callout.vue.d.ts +27 -0
- package/dist/runtime/components/Card.d.vue.ts +25 -0
- package/dist/runtime/components/Card.vue +30 -0
- package/dist/runtime/components/Card.vue.d.ts +25 -0
- package/dist/runtime/components/CardGroup.d.vue.ts +23 -0
- package/dist/runtime/components/CardGroup.vue +19 -0
- package/dist/runtime/components/CardGroup.vue.d.ts +23 -0
- package/dist/runtime/components/Checkbox.d.vue.ts +45 -0
- package/dist/runtime/components/Checkbox.vue +76 -0
- package/dist/runtime/components/Checkbox.vue.d.ts +45 -0
- package/dist/runtime/components/Chip.d.vue.ts +50 -0
- package/dist/runtime/components/Chip.vue +75 -0
- package/dist/runtime/components/Chip.vue.d.ts +50 -0
- package/dist/runtime/components/CodeButton.d.vue.ts +21 -0
- package/dist/runtime/components/CodeButton.vue +33 -0
- package/dist/runtime/components/CodeButton.vue.d.ts +21 -0
- package/dist/runtime/components/CodeGroup.d.vue.ts +3 -0
- package/dist/runtime/components/CodeGroup.vue +46 -0
- package/dist/runtime/components/CodeGroup.vue.d.ts +3 -0
- package/dist/runtime/components/CodeTree.d.vue.ts +17 -0
- package/dist/runtime/components/CodeTree.vue +56 -0
- package/dist/runtime/components/CodeTree.vue.d.ts +17 -0
- package/dist/runtime/components/Collapsible.d.vue.ts +44 -0
- package/dist/runtime/components/Collapsible.vue +52 -0
- package/dist/runtime/components/Collapsible.vue.d.ts +44 -0
- package/dist/runtime/components/ColorModeToggle.d.vue.ts +3 -0
- package/dist/runtime/components/ColorModeToggle.vue +24 -0
- package/dist/runtime/components/ColorModeToggle.vue.d.ts +3 -0
- package/dist/runtime/components/ColorPicker.d.vue.ts +30 -0
- package/dist/runtime/components/ColorPicker.vue +112 -0
- package/dist/runtime/components/ColorPicker.vue.d.ts +30 -0
- package/dist/runtime/components/Column.d.ts +72 -0
- package/dist/runtime/components/Column.js +34 -0
- package/dist/runtime/components/ColumnGroup.d.ts +33 -0
- package/dist/runtime/components/ColumnGroup.js +17 -0
- package/dist/runtime/components/CommandPalette.d.vue.ts +41 -0
- package/dist/runtime/components/CommandPalette.vue +208 -0
- package/dist/runtime/components/CommandPalette.vue.d.ts +41 -0
- package/dist/runtime/components/Container.d.vue.ts +22 -0
- package/dist/runtime/components/Container.vue +21 -0
- package/dist/runtime/components/Container.vue.d.ts +22 -0
- package/dist/runtime/components/ContentNavigation.d.vue.ts +31 -0
- package/dist/runtime/components/ContentNavigation.vue +64 -0
- package/dist/runtime/components/ContentNavigation.vue.d.ts +31 -0
- package/dist/runtime/components/ContentSurround.d.vue.ts +16 -0
- package/dist/runtime/components/ContentSurround.vue +46 -0
- package/dist/runtime/components/ContentSurround.vue.d.ts +16 -0
- package/dist/runtime/components/ContentToc.d.vue.ts +35 -0
- package/dist/runtime/components/ContentToc.vue +265 -0
- package/dist/runtime/components/ContentToc.vue.d.ts +35 -0
- package/dist/runtime/components/ContextMenu.d.vue.ts +33 -0
- package/dist/runtime/components/ContextMenu.vue +49 -0
- package/dist/runtime/components/ContextMenu.vue.d.ts +33 -0
- package/dist/runtime/components/DashboardGroup.d.vue.ts +24 -0
- package/dist/runtime/components/DashboardGroup.vue +52 -0
- package/dist/runtime/components/DashboardGroup.vue.d.ts +24 -0
- package/dist/runtime/components/DashboardNavbar.d.vue.ts +23 -0
- package/dist/runtime/components/DashboardNavbar.vue +33 -0
- package/dist/runtime/components/DashboardNavbar.vue.d.ts +23 -0
- package/dist/runtime/components/DashboardPanel.d.vue.ts +22 -0
- package/dist/runtime/components/DashboardPanel.vue +26 -0
- package/dist/runtime/components/DashboardPanel.vue.d.ts +22 -0
- package/dist/runtime/components/DashboardResizeHandle.d.vue.ts +8 -0
- package/dist/runtime/components/DashboardResizeHandle.vue +19 -0
- package/dist/runtime/components/DashboardResizeHandle.vue.d.ts +8 -0
- package/dist/runtime/components/DashboardSidebar.d.vue.ts +40 -0
- package/dist/runtime/components/DashboardSidebar.vue +117 -0
- package/dist/runtime/components/DashboardSidebar.vue.d.ts +40 -0
- package/dist/runtime/components/DashboardSidebarToggle.d.vue.ts +21 -0
- package/dist/runtime/components/DashboardSidebarToggle.vue +42 -0
- package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +21 -0
- package/dist/runtime/components/DatePicker.d.vue.ts +165 -0
- package/dist/runtime/components/DatePicker.vue +796 -0
- package/dist/runtime/components/DatePicker.vue.d.ts +165 -0
- package/dist/runtime/components/Drawer.d.vue.ts +74 -0
- package/dist/runtime/components/Drawer.vue +157 -0
- package/dist/runtime/components/Drawer.vue.d.ts +74 -0
- package/dist/runtime/components/DrawerRenderer.d.vue.ts +3 -0
- package/dist/runtime/components/DrawerRenderer.vue +30 -0
- package/dist/runtime/components/DrawerRenderer.vue.d.ts +3 -0
- package/dist/runtime/components/Dropdown.d.vue.ts +35 -0
- package/dist/runtime/components/Dropdown.vue +51 -0
- package/dist/runtime/components/Dropdown.vue.d.ts +35 -0
- package/dist/runtime/components/FileTree.d.vue.ts +28 -0
- package/dist/runtime/components/FileTree.vue +68 -0
- package/dist/runtime/components/FileTree.vue.d.ts +28 -0
- package/dist/runtime/components/FileUpload.d.vue.ts +68 -0
- package/dist/runtime/components/FileUpload.vue +226 -0
- package/dist/runtime/components/FileUpload.vue.d.ts +68 -0
- package/dist/runtime/components/FormField.d.vue.ts +37 -0
- package/dist/runtime/components/FormField.vue +72 -0
- package/dist/runtime/components/FormField.vue.d.ts +37 -0
- package/dist/runtime/components/Header.d.vue.ts +20 -0
- package/dist/runtime/components/Header.vue +23 -0
- package/dist/runtime/components/Header.vue.d.ts +20 -0
- package/dist/runtime/components/Icon.d.vue.ts +14 -0
- package/dist/runtime/components/Icon.vue +18 -0
- package/dist/runtime/components/Icon.vue.d.ts +14 -0
- package/dist/runtime/components/Input.d.vue.ts +41 -0
- package/dist/runtime/components/Input.vue +86 -0
- package/dist/runtime/components/Input.vue.d.ts +41 -0
- package/dist/runtime/components/InputGroup.d.vue.ts +22 -0
- package/dist/runtime/components/InputGroup.vue +21 -0
- package/dist/runtime/components/InputGroup.vue.d.ts +22 -0
- package/dist/runtime/components/InputNumber.d.vue.ts +37 -0
- package/dist/runtime/components/InputNumber.vue +173 -0
- package/dist/runtime/components/InputNumber.vue.d.ts +37 -0
- package/dist/runtime/components/Kbd.d.vue.ts +24 -0
- package/dist/runtime/components/Kbd.vue +42 -0
- package/dist/runtime/components/Kbd.vue.d.ts +24 -0
- package/dist/runtime/components/Modal.d.vue.ts +72 -0
- package/dist/runtime/components/Modal.vue +178 -0
- package/dist/runtime/components/Modal.vue.d.ts +72 -0
- package/dist/runtime/components/ModalRenderer.d.vue.ts +3 -0
- package/dist/runtime/components/ModalRenderer.vue +25 -0
- package/dist/runtime/components/ModalRenderer.vue.d.ts +3 -0
- package/dist/runtime/components/NavigationMenu.d.vue.ts +108 -0
- package/dist/runtime/components/NavigationMenu.vue +166 -0
- package/dist/runtime/components/NavigationMenu.vue.d.ts +108 -0
- package/dist/runtime/components/NavigationMenuAccordionItem.d.vue.ts +23 -0
- package/dist/runtime/components/NavigationMenuAccordionItem.vue +106 -0
- package/dist/runtime/components/NavigationMenuAccordionItem.vue.d.ts +23 -0
- package/dist/runtime/components/NavigationMenuFlyoutList.d.vue.ts +19 -0
- package/dist/runtime/components/NavigationMenuFlyoutList.vue +44 -0
- package/dist/runtime/components/NavigationMenuFlyoutList.vue.d.ts +19 -0
- package/dist/runtime/components/NavigationMenuFlyoutTrigger.d.vue.ts +49 -0
- package/dist/runtime/components/NavigationMenuFlyoutTrigger.vue +116 -0
- package/dist/runtime/components/NavigationMenuFlyoutTrigger.vue.d.ts +49 -0
- package/dist/runtime/components/PageAside.d.vue.ts +20 -0
- package/dist/runtime/components/PageAside.vue +26 -0
- package/dist/runtime/components/PageAside.vue.d.ts +20 -0
- package/dist/runtime/components/PageHeader.d.vue.ts +24 -0
- package/dist/runtime/components/PageHeader.vue +30 -0
- package/dist/runtime/components/PageHeader.vue.d.ts +24 -0
- package/dist/runtime/components/Pagination.d.vue.ts +42 -0
- package/dist/runtime/components/Pagination.vue +113 -0
- package/dist/runtime/components/Pagination.vue.d.ts +42 -0
- package/dist/runtime/components/PinInput.d.vue.ts +40 -0
- package/dist/runtime/components/PinInput.vue +66 -0
- package/dist/runtime/components/PinInput.vue.d.ts +40 -0
- package/dist/runtime/components/Popover.d.vue.ts +52 -0
- package/dist/runtime/components/Popover.vue +77 -0
- package/dist/runtime/components/Popover.vue.d.ts +52 -0
- package/dist/runtime/components/Progress.d.vue.ts +32 -0
- package/dist/runtime/components/Progress.vue +76 -0
- package/dist/runtime/components/Progress.vue.d.ts +32 -0
- package/dist/runtime/components/ProseH1.d.vue.ts +18 -0
- package/dist/runtime/components/ProseH1.vue +21 -0
- package/dist/runtime/components/ProseH1.vue.d.ts +18 -0
- package/dist/runtime/components/ProseH2.d.vue.ts +18 -0
- package/dist/runtime/components/ProseH2.vue +21 -0
- package/dist/runtime/components/ProseH2.vue.d.ts +18 -0
- package/dist/runtime/components/ProseH3.d.vue.ts +18 -0
- package/dist/runtime/components/ProseH3.vue +21 -0
- package/dist/runtime/components/ProseH3.vue.d.ts +18 -0
- package/dist/runtime/components/ProseH4.d.vue.ts +18 -0
- package/dist/runtime/components/ProseH4.vue +21 -0
- package/dist/runtime/components/ProseH4.vue.d.ts +18 -0
- package/dist/runtime/components/ProseH5.d.vue.ts +18 -0
- package/dist/runtime/components/ProseH5.vue +21 -0
- package/dist/runtime/components/ProseH5.vue.d.ts +18 -0
- package/dist/runtime/components/ProseH6.d.vue.ts +18 -0
- package/dist/runtime/components/ProseH6.vue +21 -0
- package/dist/runtime/components/ProseH6.vue.d.ts +18 -0
- package/dist/runtime/components/ProsePre.d.vue.ts +20 -0
- package/dist/runtime/components/ProsePre.vue +50 -0
- package/dist/runtime/components/ProsePre.vue.d.ts +20 -0
- package/dist/runtime/components/RadioGroup.d.vue.ts +50 -0
- package/dist/runtime/components/RadioGroup.vue +82 -0
- package/dist/runtime/components/RadioGroup.vue.d.ts +50 -0
- package/dist/runtime/components/Rating.d.vue.ts +36 -0
- package/dist/runtime/components/Rating.vue +83 -0
- package/dist/runtime/components/Rating.vue.d.ts +36 -0
- package/dist/runtime/components/ReadMore.d.vue.ts +20 -0
- package/dist/runtime/components/ReadMore.vue +59 -0
- package/dist/runtime/components/ReadMore.vue.d.ts +20 -0
- package/dist/runtime/components/ScrollArea.d.vue.ts +19 -0
- package/dist/runtime/components/ScrollArea.vue +37 -0
- package/dist/runtime/components/ScrollArea.vue.d.ts +19 -0
- package/dist/runtime/components/Select.d.vue.ts +60 -0
- package/dist/runtime/components/Select.vue +40 -0
- package/dist/runtime/components/Select.vue.d.ts +60 -0
- package/dist/runtime/components/Separator.d.vue.ts +27 -0
- package/dist/runtime/components/Separator.vue +36 -0
- package/dist/runtime/components/Separator.vue.d.ts +27 -0
- package/dist/runtime/components/Skeleton.d.vue.ts +13 -0
- package/dist/runtime/components/Skeleton.vue +17 -0
- package/dist/runtime/components/Skeleton.vue.d.ts +13 -0
- package/dist/runtime/components/Slideover.d.vue.ts +65 -0
- package/dist/runtime/components/Slideover.vue +140 -0
- package/dist/runtime/components/Slideover.vue.d.ts +65 -0
- package/dist/runtime/components/SlideoverRenderer.d.vue.ts +3 -0
- package/dist/runtime/components/SlideoverRenderer.vue +27 -0
- package/dist/runtime/components/SlideoverRenderer.vue.d.ts +3 -0
- package/dist/runtime/components/Slider.d.vue.ts +60 -0
- package/dist/runtime/components/Slider.vue +186 -0
- package/dist/runtime/components/Slider.vue.d.ts +60 -0
- package/dist/runtime/components/Splitter.d.vue.ts +41 -0
- package/dist/runtime/components/Splitter.vue +31 -0
- package/dist/runtime/components/Splitter.vue.d.ts +41 -0
- package/dist/runtime/components/SplitterPanel.d.vue.ts +55 -0
- package/dist/runtime/components/SplitterPanel.vue +52 -0
- package/dist/runtime/components/SplitterPanel.vue.d.ts +55 -0
- package/dist/runtime/components/SplitterResizeHandle.d.vue.ts +14 -0
- package/dist/runtime/components/SplitterResizeHandle.vue +22 -0
- package/dist/runtime/components/SplitterResizeHandle.vue.d.ts +14 -0
- package/dist/runtime/components/Stepper.d.vue.ts +57 -0
- package/dist/runtime/components/Stepper.vue +101 -0
- package/dist/runtime/components/Stepper.vue.d.ts +57 -0
- package/dist/runtime/components/Switch.d.vue.ts +49 -0
- package/dist/runtime/components/Switch.vue +73 -0
- package/dist/runtime/components/Switch.vue.d.ts +49 -0
- package/dist/runtime/components/Table.d.vue.ts +83 -0
- package/dist/runtime/components/Table.vue +339 -0
- package/dist/runtime/components/Table.vue.d.ts +83 -0
- package/dist/runtime/components/Tabs.d.vue.ts +43 -0
- package/dist/runtime/components/Tabs.vue +60 -0
- package/dist/runtime/components/Tabs.vue.d.ts +43 -0
- package/dist/runtime/components/Textarea.d.vue.ts +45 -0
- package/dist/runtime/components/Textarea.vue +110 -0
- package/dist/runtime/components/Textarea.vue.d.ts +45 -0
- package/dist/runtime/components/Theme.d.vue.ts +19 -0
- package/dist/runtime/components/Theme.vue +18 -0
- package/dist/runtime/components/Theme.vue.d.ts +19 -0
- package/dist/runtime/components/Toast.d.vue.ts +8 -0
- package/dist/runtime/components/Toast.vue +58 -0
- package/dist/runtime/components/Toast.vue.d.ts +8 -0
- package/dist/runtime/components/Toggle.d.vue.ts +38 -0
- package/dist/runtime/components/Toggle.vue +44 -0
- package/dist/runtime/components/Toggle.vue.d.ts +38 -0
- package/dist/runtime/components/ToggleGroup.d.vue.ts +48 -0
- package/dist/runtime/components/ToggleGroup.vue +61 -0
- package/dist/runtime/components/ToggleGroup.vue.d.ts +48 -0
- package/dist/runtime/components/Tooltip.d.vue.ts +28 -0
- package/dist/runtime/components/Tooltip.vue +40 -0
- package/dist/runtime/components/Tooltip.vue.d.ts +28 -0
- package/dist/runtime/components/Tree.d.vue.ts +64 -0
- package/dist/runtime/components/Tree.vue +139 -0
- package/dist/runtime/components/Tree.vue.d.ts +64 -0
- package/dist/runtime/composables/use-combobox-select.d.ts +45 -0
- package/dist/runtime/composables/use-combobox-select.js +80 -0
- package/dist/runtime/composables/use-command-palette.d.ts +8 -0
- package/dist/runtime/composables/use-command-palette.js +14 -0
- package/dist/runtime/composables/use-drawer.d.ts +42 -0
- package/dist/runtime/composables/use-drawer.js +44 -0
- package/dist/runtime/composables/use-form-field.d.ts +10 -0
- package/dist/runtime/composables/use-form-field.js +8 -0
- package/dist/runtime/composables/use-icons.d.ts +10 -0
- package/dist/runtime/composables/use-icons.js +7 -0
- package/dist/runtime/composables/use-locale.d.ts +12 -0
- package/dist/runtime/composables/use-locale.js +6 -0
- package/dist/runtime/composables/use-media-query.d.ts +11 -0
- package/dist/runtime/composables/use-media-query.js +15 -0
- package/dist/runtime/composables/use-messages.d.ts +12 -0
- package/dist/runtime/composables/use-messages.js +7 -0
- package/dist/runtime/composables/use-modal.d.ts +32 -0
- package/dist/runtime/composables/use-modal.js +39 -0
- package/dist/runtime/composables/use-ripple.d.ts +15 -0
- package/dist/runtime/composables/use-ripple.js +6 -0
- package/dist/runtime/composables/use-slideover.d.ts +36 -0
- package/dist/runtime/composables/use-slideover.js +41 -0
- package/dist/runtime/composables/use-table.d.ts +63 -0
- package/dist/runtime/composables/use-table.js +142 -0
- package/dist/runtime/composables/use-toast.d.ts +15 -0
- package/dist/runtime/composables/use-toast.js +16 -0
- package/dist/runtime/directives/index.d.ts +1 -0
- package/dist/runtime/directives/index.js +1 -0
- package/dist/runtime/directives/ripple.d.ts +16 -0
- package/dist/runtime/directives/ripple.js +80 -0
- package/dist/runtime/internal/ColorPickerBody.d.vue.ts +26 -0
- package/dist/runtime/internal/ColorPickerBody.vue +111 -0
- package/dist/runtime/internal/ColorPickerBody.vue.d.ts +26 -0
- package/dist/runtime/internal/ComboboxSelectBase.d.vue.ts +122 -0
- package/dist/runtime/internal/ComboboxSelectBase.vue +590 -0
- package/dist/runtime/internal/ComboboxSelectBase.vue.d.ts +122 -0
- package/dist/runtime/internal/ComboboxSelectBody.d.vue.ts +71 -0
- package/dist/runtime/internal/ComboboxSelectBody.vue +146 -0
- package/dist/runtime/internal/ComboboxSelectBody.vue.d.ts +71 -0
- package/dist/runtime/internal/DatePickerCalendarBody.d.vue.ts +71 -0
- package/dist/runtime/internal/DatePickerCalendarBody.vue +215 -0
- package/dist/runtime/internal/DatePickerCalendarBody.vue.d.ts +71 -0
- package/dist/runtime/internal/DatePickerRangeCalendarBody.d.vue.ts +37 -0
- package/dist/runtime/internal/DatePickerRangeCalendarBody.vue +96 -0
- package/dist/runtime/internal/DatePickerRangeCalendarBody.vue.d.ts +37 -0
- package/dist/runtime/internal/DatePickerTimeBody.d.vue.ts +33 -0
- package/dist/runtime/internal/DatePickerTimeBody.vue +53 -0
- package/dist/runtime/internal/DatePickerTimeBody.vue.d.ts +33 -0
- package/dist/runtime/internal/TimeStepper.d.vue.ts +28 -0
- package/dist/runtime/internal/TimeStepper.vue +99 -0
- package/dist/runtime/internal/TimeStepper.vue.d.ts +28 -0
- package/dist/runtime/prose.css +1 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/theme/accordion.d.ts +131 -0
- package/dist/runtime/theme/accordion.js +60 -0
- package/dist/runtime/theme/alert-dialog.d.ts +50 -0
- package/dist/runtime/theme/alert-dialog.js +30 -0
- package/dist/runtime/theme/alert.d.ts +62 -0
- package/dist/runtime/theme/alert.js +52 -0
- package/dist/runtime/theme/avatar-group.d.ts +59 -0
- package/dist/runtime/theme/avatar-group.js +18 -0
- package/dist/runtime/theme/avatar.d.ts +206 -0
- package/dist/runtime/theme/avatar.js +67 -0
- package/dist/runtime/theme/badge.d.ts +140 -0
- package/dist/runtime/theme/badge.js +90 -0
- package/dist/runtime/theme/breadcrumb.d.ts +86 -0
- package/dist/runtime/theme/breadcrumb.js +22 -0
- package/dist/runtime/theme/button-group.d.ts +53 -0
- package/dist/runtime/theme/button-group.js +21 -0
- package/dist/runtime/theme/button.d.ts +155 -0
- package/dist/runtime/theme/button.js +99 -0
- package/dist/runtime/theme/callout.d.ts +74 -0
- package/dist/runtime/theme/callout.js +23 -0
- package/dist/runtime/theme/card-group.d.ts +44 -0
- package/dist/runtime/theme/card-group.js +19 -0
- package/dist/runtime/theme/card.d.ts +62 -0
- package/dist/runtime/theme/card.js +23 -0
- package/dist/runtime/theme/checkbox.d.ts +218 -0
- package/dist/runtime/theme/checkbox.js +113 -0
- package/dist/runtime/theme/chip.d.ts +155 -0
- package/dist/runtime/theme/chip.js +86 -0
- package/dist/runtime/theme/code-button.d.ts +32 -0
- package/dist/runtime/theme/code-button.js +7 -0
- package/dist/runtime/theme/code-tree.d.ts +50 -0
- package/dist/runtime/theme/code-tree.js +13 -0
- package/dist/runtime/theme/collapsible.d.ts +95 -0
- package/dist/runtime/theme/collapsible.js +46 -0
- package/dist/runtime/theme/color-picker.d.ts +152 -0
- package/dist/runtime/theme/color-picker.js +83 -0
- package/dist/runtime/theme/command-palette.d.ts +110 -0
- package/dist/runtime/theme/command-palette.js +23 -0
- package/dist/runtime/theme/container.d.ts +62 -0
- package/dist/runtime/theme/container.js +18 -0
- package/dist/runtime/theme/content-navigation.d.ts +47 -0
- package/dist/runtime/theme/content-navigation.js +38 -0
- package/dist/runtime/theme/content-surround.d.ts +53 -0
- package/dist/runtime/theme/content-surround.js +22 -0
- package/dist/runtime/theme/content-toc.d.ts +56 -0
- package/dist/runtime/theme/content-toc.js +41 -0
- package/dist/runtime/theme/context-menu.d.ts +38 -0
- package/dist/runtime/theme/context-menu.js +21 -0
- package/dist/runtime/theme/dashboard-group.d.ts +26 -0
- package/dist/runtime/theme/dashboard-group.js +9 -0
- package/dist/runtime/theme/dashboard-navbar.d.ts +44 -0
- package/dist/runtime/theme/dashboard-navbar.js +9 -0
- package/dist/runtime/theme/dashboard-panel.d.ts +26 -0
- package/dist/runtime/theme/dashboard-panel.js +6 -0
- package/dist/runtime/theme/dashboard-resize-handle.d.ts +26 -0
- package/dist/runtime/theme/dashboard-resize-handle.js +17 -0
- package/dist/runtime/theme/dashboard-sidebar.d.ts +50 -0
- package/dist/runtime/theme/dashboard-sidebar.js +40 -0
- package/dist/runtime/theme/date-picker.d.ts +119 -0
- package/dist/runtime/theme/date-picker.js +75 -0
- package/dist/runtime/theme/drawer.d.ts +95 -0
- package/dist/runtime/theme/drawer.js +57 -0
- package/dist/runtime/theme/dropdown.d.ts +41 -0
- package/dist/runtime/theme/dropdown.js +21 -0
- package/dist/runtime/theme/file-tree.d.ts +56 -0
- package/dist/runtime/theme/file-tree.js +33 -0
- package/dist/runtime/theme/file-upload.d.ts +233 -0
- package/dist/runtime/theme/file-upload.js +63 -0
- package/dist/runtime/theme/form-field.d.ts +95 -0
- package/dist/runtime/theme/form-field.js +37 -0
- package/dist/runtime/theme/header.d.ts +38 -0
- package/dist/runtime/theme/header.js +8 -0
- package/dist/runtime/theme/icon.d.ts +80 -0
- package/dist/runtime/theme/icon.js +26 -0
- package/dist/runtime/theme/input-group.d.ts +95 -0
- package/dist/runtime/theme/input-group.js +39 -0
- package/dist/runtime/theme/input-number.d.ts +164 -0
- package/dist/runtime/theme/input-number.js +76 -0
- package/dist/runtime/theme/input.d.ts +185 -0
- package/dist/runtime/theme/input.js +72 -0
- package/dist/runtime/theme/kbd.d.ts +44 -0
- package/dist/runtime/theme/kbd.js +16 -0
- package/dist/runtime/theme/modal.d.ts +74 -0
- package/dist/runtime/theme/modal.js +58 -0
- package/dist/runtime/theme/navigation-menu.d.ts +224 -0
- package/dist/runtime/theme/navigation-menu.js +232 -0
- package/dist/runtime/theme/page-aside.d.ts +44 -0
- package/dist/runtime/theme/page-aside.js +17 -0
- package/dist/runtime/theme/page-header.d.ts +38 -0
- package/dist/runtime/theme/page-header.js +8 -0
- package/dist/runtime/theme/pagination.d.ts +68 -0
- package/dist/runtime/theme/pagination.js +21 -0
- package/dist/runtime/theme/pin-input.d.ts +131 -0
- package/dist/runtime/theme/pin-input.js +40 -0
- package/dist/runtime/theme/popover.d.ts +32 -0
- package/dist/runtime/theme/popover.js +7 -0
- package/dist/runtime/theme/progress.d.ts +185 -0
- package/dist/runtime/theme/progress.js +54 -0
- package/dist/runtime/theme/prose.d.ts +92 -0
- package/dist/runtime/theme/prose.js +17 -0
- package/dist/runtime/theme/radio-group.d.ts +239 -0
- package/dist/runtime/theme/radio-group.js +134 -0
- package/dist/runtime/theme/rating.d.ts +167 -0
- package/dist/runtime/theme/rating.js +77 -0
- package/dist/runtime/theme/read-more.d.ts +38 -0
- package/dist/runtime/theme/read-more.js +21 -0
- package/dist/runtime/theme/scroll-area.d.ts +50 -0
- package/dist/runtime/theme/scroll-area.js +10 -0
- package/dist/runtime/theme/select.d.ts +176 -0
- package/dist/runtime/theme/select.js +74 -0
- package/dist/runtime/theme/separator.d.ts +158 -0
- package/dist/runtime/theme/separator.js +63 -0
- package/dist/runtime/theme/skeleton.d.ts +35 -0
- package/dist/runtime/theme/skeleton.js +27 -0
- package/dist/runtime/theme/slideover.d.ts +107 -0
- package/dist/runtime/theme/slideover.js +62 -0
- package/dist/runtime/theme/slider.d.ts +227 -0
- package/dist/runtime/theme/slider.js +73 -0
- package/dist/runtime/theme/splitter-panel.d.ts +26 -0
- package/dist/runtime/theme/splitter-panel.js +9 -0
- package/dist/runtime/theme/splitter-resize-handle.d.ts +44 -0
- package/dist/runtime/theme/splitter-resize-handle.js +18 -0
- package/dist/runtime/theme/splitter.d.ts +35 -0
- package/dist/runtime/theme/splitter.js +15 -0
- package/dist/runtime/theme/stepper.d.ts +221 -0
- package/dist/runtime/theme/stepper.js +106 -0
- package/dist/runtime/theme/switch.d.ts +206 -0
- package/dist/runtime/theme/switch.js +84 -0
- package/dist/runtime/theme/table.d.ts +176 -0
- package/dist/runtime/theme/table.js +59 -0
- package/dist/runtime/theme/tabs.d.ts +59 -0
- package/dist/runtime/theme/tabs.js +44 -0
- package/dist/runtime/theme/textarea.d.ts +212 -0
- package/dist/runtime/theme/textarea.js +56 -0
- package/dist/runtime/theme/toast.d.ts +80 -0
- package/dist/runtime/theme/toast.js +31 -0
- package/dist/runtime/theme/toggle-group.d.ts +110 -0
- package/dist/runtime/theme/toggle-group.js +48 -0
- package/dist/runtime/theme/toggle.d.ts +92 -0
- package/dist/runtime/theme/toggle.js +48 -0
- package/dist/runtime/theme/tooltip.d.ts +44 -0
- package/dist/runtime/theme/tooltip.js +14 -0
- package/dist/runtime/theme/tree.d.ts +80 -0
- package/dist/runtime/theme/tree.js +32 -0
- package/dist/runtime/theme.css +1 -0
- package/dist/runtime/types/app-config.d.ts +15 -0
- package/dist/runtime/types/index.d.ts +82 -0
- package/dist/runtime/types/index.js +2 -0
- package/dist/runtime/utils/format-bytes.d.ts +2 -0
- package/dist/runtime/utils/format-bytes.js +9 -0
- package/dist/runtime/utils/fuzzy-match.d.ts +12 -0
- package/dist/runtime/utils/fuzzy-match.js +21 -0
- package/dist/runtime/utils/icons.d.ts +38 -0
- package/dist/runtime/utils/icons.js +51 -0
- package/dist/runtime/utils/injection-keys.d.ts +69 -0
- package/dist/runtime/utils/injection-keys.js +3 -0
- package/dist/runtime/utils/messages.d.ts +70 -0
- package/dist/runtime/utils/messages.js +68 -0
- package/dist/runtime/utils/navigation-menu.d.ts +32 -0
- package/dist/runtime/utils/navigation-menu.js +5 -0
- package/dist/runtime/utils/table-columns.d.ts +30 -0
- package/dist/runtime/utils/table-columns.js +89 -0
- package/dist/runtime/utils/table-export.d.ts +12 -0
- package/dist/runtime/utils/table-export.js +29 -0
- package/dist/runtime/utils/ui.d.ts +124 -0
- package/dist/runtime/utils/ui.js +74 -0
- package/dist/types.d.mts +3 -0
- package/package.json +99 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import {
|
|
3
|
+
DatePickerCalendar,
|
|
4
|
+
DatePickerCell,
|
|
5
|
+
DatePickerCellTrigger,
|
|
6
|
+
DatePickerGrid,
|
|
7
|
+
DatePickerGridBody,
|
|
8
|
+
DatePickerGridHead,
|
|
9
|
+
DatePickerGridRow,
|
|
10
|
+
DatePickerHeadCell,
|
|
11
|
+
DatePickerHeader,
|
|
12
|
+
DatePickerHeading,
|
|
13
|
+
DatePickerNext,
|
|
14
|
+
DatePickerPrev
|
|
15
|
+
} from "reka-ui";
|
|
16
|
+
import Button from "../components/Button.vue";
|
|
17
|
+
import { useIcons } from "../composables/use-icons";
|
|
18
|
+
import { useMessages } from "../composables/use-messages";
|
|
19
|
+
import TimeStepper from "./TimeStepper.vue";
|
|
20
|
+
defineProps({
|
|
21
|
+
internalView: { type: String, required: true },
|
|
22
|
+
color: { type: null, required: false },
|
|
23
|
+
activeColor: { type: null, required: false },
|
|
24
|
+
placeholder: { type: Object, required: true },
|
|
25
|
+
monthGridItems: { type: Array, required: true },
|
|
26
|
+
yearGridItems: { type: Array, required: true },
|
|
27
|
+
decadeHeadingText: { type: String, required: true },
|
|
28
|
+
isMonthDisabled: { type: Function, required: true },
|
|
29
|
+
isYearDisabled: { type: Function, required: true },
|
|
30
|
+
selectMonth: { type: Function, required: true },
|
|
31
|
+
selectYear: { type: Function, required: true },
|
|
32
|
+
drillUp: { type: Function, required: true },
|
|
33
|
+
goToPreviousYear: { type: Function, required: true },
|
|
34
|
+
goToNextYear: { type: Function, required: true },
|
|
35
|
+
goToPreviousDecade: { type: Function, required: true },
|
|
36
|
+
goToNextDecade: { type: Function, required: true },
|
|
37
|
+
isTimeGranularity: { type: Boolean, required: true },
|
|
38
|
+
granularity: { type: String, required: false },
|
|
39
|
+
placeholderHour: { type: Number, required: true },
|
|
40
|
+
placeholderMinute: { type: Number, required: true },
|
|
41
|
+
hourCycle: { type: Number, required: false },
|
|
42
|
+
minuteStep: { type: Number, required: false },
|
|
43
|
+
locale: { type: String, required: false },
|
|
44
|
+
hourInputId: { type: String, required: true },
|
|
45
|
+
minuteInputId: { type: String, required: true },
|
|
46
|
+
setHour: { type: Function, required: true },
|
|
47
|
+
setMinute: { type: Function, required: true },
|
|
48
|
+
closeOnSelect: { type: Boolean, required: false },
|
|
49
|
+
close: { type: Function, required: true },
|
|
50
|
+
headerProps: { type: Object, required: false },
|
|
51
|
+
headingProps: { type: Object, required: false },
|
|
52
|
+
gridsProps: { type: Object, required: false },
|
|
53
|
+
gridProps: { type: Object, required: false },
|
|
54
|
+
gridHeadProps: { type: Object, required: false },
|
|
55
|
+
headCellProps: { type: Object, required: false },
|
|
56
|
+
cellProps: { type: Object, required: false },
|
|
57
|
+
viewGridProps: { type: Object, required: false },
|
|
58
|
+
timeSectionProps: { type: Object, required: false }
|
|
59
|
+
});
|
|
60
|
+
const icons = useIcons();
|
|
61
|
+
const messages = useMessages();
|
|
62
|
+
const navButtonUi = { leadingIcon: "rtl:-scale-x-100" };
|
|
63
|
+
const headingButtonUi = "rounded-[var(--ui-radius-sm)] px-1.5 py-0.5 transition-colors hover:bg-[var(--ui-bg-elevated)] disabled:hover:bg-transparent disabled:cursor-default";
|
|
64
|
+
const cellTriggerUi = {
|
|
65
|
+
base: "relative data-[today]:font-semibold data-[today]:after:absolute data-[today]:after:bottom-1 data-[today]:after:left-1/2 data-[today]:after:size-1 data-[today]:after:-translate-x-1/2 data-[today]:after:rounded-full data-[today]:after:bg-[var(--ui-primary)] data-[outside-view]:opacity-40 data-[unavailable]:opacity-40 data-[unavailable]:line-through"
|
|
66
|
+
};
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<template>
|
|
70
|
+
<DatePickerCalendar v-slot="{ grid, weekDays }">
|
|
71
|
+
<DatePickerHeader v-bind="headerProps">
|
|
72
|
+
<DatePickerPrev v-if="internalView === 'date'" as-child>
|
|
73
|
+
<Button variant="ghost" :color="color" size="sm" :icon="icons.chevronLeft" :aria-label="messages.previousMonth" :ui="navButtonUi" />
|
|
74
|
+
</DatePickerPrev>
|
|
75
|
+
<Button
|
|
76
|
+
v-else
|
|
77
|
+
variant="ghost"
|
|
78
|
+
:color="color"
|
|
79
|
+
size="sm"
|
|
80
|
+
:icon="icons.chevronLeft"
|
|
81
|
+
:aria-label="internalView === 'month' ? messages.previousYear : messages.previousDecade"
|
|
82
|
+
:ui="navButtonUi"
|
|
83
|
+
@click="internalView === 'month' ? goToPreviousYear() : goToPreviousDecade()"
|
|
84
|
+
/>
|
|
85
|
+
|
|
86
|
+
<DatePickerHeading v-if="internalView === 'date'" v-slot="{ headingValue }">
|
|
87
|
+
<button type="button" :class="headingButtonUi" v-bind="headingProps" :aria-label="messages.chooseMonth" @click="drillUp">
|
|
88
|
+
{{ headingValue }}
|
|
89
|
+
</button>
|
|
90
|
+
</DatePickerHeading>
|
|
91
|
+
<button
|
|
92
|
+
v-else
|
|
93
|
+
type="button"
|
|
94
|
+
dir="ltr"
|
|
95
|
+
:class="headingButtonUi"
|
|
96
|
+
v-bind="headingProps"
|
|
97
|
+
:disabled="internalView === 'year'"
|
|
98
|
+
:aria-label="internalView === 'month' ? messages.chooseYear : void 0"
|
|
99
|
+
@click="drillUp"
|
|
100
|
+
>
|
|
101
|
+
{{ internalView === "month" ? placeholder.year : decadeHeadingText }}
|
|
102
|
+
</button>
|
|
103
|
+
|
|
104
|
+
<DatePickerNext v-if="internalView === 'date'" as-child>
|
|
105
|
+
<Button variant="ghost" :color="color" size="sm" :icon="icons.chevronRight" :aria-label="messages.nextMonth" :ui="navButtonUi" />
|
|
106
|
+
</DatePickerNext>
|
|
107
|
+
<Button
|
|
108
|
+
v-else
|
|
109
|
+
variant="ghost"
|
|
110
|
+
:color="color"
|
|
111
|
+
size="sm"
|
|
112
|
+
:icon="icons.chevronRight"
|
|
113
|
+
:aria-label="internalView === 'month' ? messages.nextYear : messages.nextDecade"
|
|
114
|
+
:ui="navButtonUi"
|
|
115
|
+
@click="internalView === 'month' ? goToNextYear() : goToNextDecade()"
|
|
116
|
+
/>
|
|
117
|
+
</DatePickerHeader>
|
|
118
|
+
|
|
119
|
+
<div v-if="internalView === 'date'" v-bind="gridsProps">
|
|
120
|
+
<DatePickerGrid v-for="month in grid" :key="month.value.toString()" v-bind="gridProps">
|
|
121
|
+
<DatePickerGridHead v-bind="gridHeadProps">
|
|
122
|
+
<DatePickerGridRow>
|
|
123
|
+
<DatePickerHeadCell v-for="day in weekDays" :key="day" v-bind="headCellProps">
|
|
124
|
+
{{ day }}
|
|
125
|
+
</DatePickerHeadCell>
|
|
126
|
+
</DatePickerGridRow>
|
|
127
|
+
</DatePickerGridHead>
|
|
128
|
+
<DatePickerGridBody>
|
|
129
|
+
<DatePickerGridRow v-for="(week, weekIndex) in month.rows" :key="weekIndex">
|
|
130
|
+
<DatePickerCell v-for="date in week" :key="date.toString()" :date="date" v-bind="cellProps">
|
|
131
|
+
<DatePickerCellTrigger
|
|
132
|
+
v-slot="{ dayValue, selected, disabled: dayDisabled }"
|
|
133
|
+
:day="date"
|
|
134
|
+
:month="month.value"
|
|
135
|
+
as-child
|
|
136
|
+
>
|
|
137
|
+
<Button
|
|
138
|
+
:variant="selected ? 'solid' : 'ghost'"
|
|
139
|
+
:color="selected ? activeColor : color"
|
|
140
|
+
size="sm"
|
|
141
|
+
square
|
|
142
|
+
:disabled="dayDisabled"
|
|
143
|
+
:ui="cellTriggerUi"
|
|
144
|
+
>
|
|
145
|
+
<slot name="day" :date="date" :day-value="dayValue" :selected="selected" :disabled="dayDisabled">
|
|
146
|
+
{{ dayValue }}
|
|
147
|
+
</slot>
|
|
148
|
+
</Button>
|
|
149
|
+
</DatePickerCellTrigger>
|
|
150
|
+
</DatePickerCell>
|
|
151
|
+
</DatePickerGridRow>
|
|
152
|
+
</DatePickerGridBody>
|
|
153
|
+
</DatePickerGrid>
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
<div v-else-if="internalView === 'month'" v-bind="viewGridProps">
|
|
157
|
+
<Button
|
|
158
|
+
v-for="monthItem in monthGridItems"
|
|
159
|
+
:key="monthItem.value.month"
|
|
160
|
+
:variant="monthItem.value.month === placeholder.month ? 'solid' : 'ghost'"
|
|
161
|
+
:color="monthItem.value.month === placeholder.month ? activeColor : color"
|
|
162
|
+
size="sm"
|
|
163
|
+
:disabled="isMonthDisabled(monthItem.value)"
|
|
164
|
+
@click="selectMonth(monthItem.value)"
|
|
165
|
+
>
|
|
166
|
+
{{ monthItem.label }}
|
|
167
|
+
</Button>
|
|
168
|
+
</div>
|
|
169
|
+
|
|
170
|
+
<div v-else v-bind="viewGridProps">
|
|
171
|
+
<Button
|
|
172
|
+
v-for="yearItem in yearGridItems"
|
|
173
|
+
:key="yearItem.value"
|
|
174
|
+
:variant="yearItem.value === placeholder.year ? 'solid' : 'ghost'"
|
|
175
|
+
:color="yearItem.value === placeholder.year ? activeColor : color"
|
|
176
|
+
size="sm"
|
|
177
|
+
:disabled="isYearDisabled(yearItem.value)"
|
|
178
|
+
@click="selectYear(yearItem.value)"
|
|
179
|
+
>
|
|
180
|
+
{{ yearItem.label }}
|
|
181
|
+
</Button>
|
|
182
|
+
</div>
|
|
183
|
+
|
|
184
|
+
<template v-if="internalView === 'date' && isTimeGranularity">
|
|
185
|
+
<div v-bind="timeSectionProps">
|
|
186
|
+
<label :for="hourInputId" class="sr-only">{{ messages.hour }}</label>
|
|
187
|
+
<label v-if="granularity === 'minute'" :for="minuteInputId" class="sr-only">{{ messages.minute }}</label>
|
|
188
|
+
<TimeStepper
|
|
189
|
+
:hour="placeholderHour"
|
|
190
|
+
:minute="placeholderMinute"
|
|
191
|
+
:granularity="granularity === 'minute' ? 'minute' : 'hour'"
|
|
192
|
+
:hour-cycle="hourCycle"
|
|
193
|
+
:minute-step="minuteStep"
|
|
194
|
+
:locale="locale"
|
|
195
|
+
:hour-id="hourInputId"
|
|
196
|
+
:minute-id="minuteInputId"
|
|
197
|
+
@update:hour="setHour"
|
|
198
|
+
@update:minute="setMinute"
|
|
199
|
+
/>
|
|
200
|
+
</div>
|
|
201
|
+
<Button
|
|
202
|
+
v-if="closeOnSelect"
|
|
203
|
+
variant="solid"
|
|
204
|
+
:color="activeColor"
|
|
205
|
+
size="sm"
|
|
206
|
+
block
|
|
207
|
+
class="mt-2"
|
|
208
|
+
@click="close"
|
|
209
|
+
>
|
|
210
|
+
{{ messages.done }}
|
|
211
|
+
</Button>
|
|
212
|
+
</template>
|
|
213
|
+
<slot name="footer" />
|
|
214
|
+
</DatePickerCalendar>
|
|
215
|
+
</template>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { DateValue } from '@internationalized/date';
|
|
2
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import type { buttonTheme } from '../theme/button.js';
|
|
4
|
+
type ButtonVariants = VariantProps<typeof buttonTheme>;
|
|
5
|
+
export interface DatePickerCalendarBodyProps {
|
|
6
|
+
internalView: 'date' | 'month' | 'year';
|
|
7
|
+
color?: ButtonVariants['color'];
|
|
8
|
+
activeColor?: ButtonVariants['color'];
|
|
9
|
+
placeholder: DateValue;
|
|
10
|
+
monthGridItems: {
|
|
11
|
+
value: DateValue;
|
|
12
|
+
label: string;
|
|
13
|
+
}[];
|
|
14
|
+
yearGridItems: {
|
|
15
|
+
value: number;
|
|
16
|
+
label: string;
|
|
17
|
+
}[];
|
|
18
|
+
decadeHeadingText: string;
|
|
19
|
+
isMonthDisabled: (date: DateValue) => boolean;
|
|
20
|
+
isYearDisabled: (year: number) => boolean;
|
|
21
|
+
selectMonth: (date: DateValue) => void;
|
|
22
|
+
selectYear: (year: number) => void;
|
|
23
|
+
drillUp: () => void;
|
|
24
|
+
goToPreviousYear: () => void;
|
|
25
|
+
goToNextYear: () => void;
|
|
26
|
+
goToPreviousDecade: () => void;
|
|
27
|
+
goToNextDecade: () => void;
|
|
28
|
+
isTimeGranularity: boolean;
|
|
29
|
+
granularity?: 'year' | 'month' | 'day' | 'hour' | 'minute';
|
|
30
|
+
placeholderHour: number;
|
|
31
|
+
placeholderMinute: number;
|
|
32
|
+
hourCycle?: 12 | 24;
|
|
33
|
+
minuteStep?: number;
|
|
34
|
+
locale?: string;
|
|
35
|
+
hourInputId: string;
|
|
36
|
+
minuteInputId: string;
|
|
37
|
+
setHour: (hour24: number) => void;
|
|
38
|
+
setMinute: (minute: number) => void;
|
|
39
|
+
closeOnSelect?: boolean;
|
|
40
|
+
/** Closes the popover/modal - the Done button's own action. A plain callback, not a v-model, matching every other action prop here (selectMonth/drillUp/etc). */
|
|
41
|
+
close: () => void;
|
|
42
|
+
headerProps?: Record<string, unknown>;
|
|
43
|
+
headingProps?: Record<string, unknown>;
|
|
44
|
+
gridsProps?: Record<string, unknown>;
|
|
45
|
+
gridProps?: Record<string, unknown>;
|
|
46
|
+
gridHeadProps?: Record<string, unknown>;
|
|
47
|
+
headCellProps?: Record<string, unknown>;
|
|
48
|
+
cellProps?: Record<string, unknown>;
|
|
49
|
+
viewGridProps?: Record<string, unknown>;
|
|
50
|
+
timeSectionProps?: Record<string, unknown>;
|
|
51
|
+
}
|
|
52
|
+
declare var __VLS_110: {
|
|
53
|
+
date: DateValue;
|
|
54
|
+
dayValue: string;
|
|
55
|
+
selected: boolean;
|
|
56
|
+
disabled: boolean;
|
|
57
|
+
}, __VLS_144: {};
|
|
58
|
+
type __VLS_Slots = {} & {
|
|
59
|
+
day?: (props: typeof __VLS_110) => any;
|
|
60
|
+
} & {
|
|
61
|
+
footer?: (props: typeof __VLS_144) => any;
|
|
62
|
+
};
|
|
63
|
+
declare const __VLS_base: import("vue").DefineComponent<DatePickerCalendarBodyProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DatePickerCalendarBodyProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
64
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
65
|
+
declare const _default: typeof __VLS_export;
|
|
66
|
+
export default _default;
|
|
67
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
68
|
+
new (): {
|
|
69
|
+
$slots: S;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { buttonTheme } from '../theme/button.js';
|
|
3
|
+
type ButtonVariants = VariantProps<typeof buttonTheme>;
|
|
4
|
+
export interface DatePickerRangeCalendarBodyProps {
|
|
5
|
+
color?: ButtonVariants['color'];
|
|
6
|
+
activeColor?: ButtonVariants['color'];
|
|
7
|
+
headerProps?: Record<string, unknown>;
|
|
8
|
+
headingProps?: Record<string, unknown>;
|
|
9
|
+
gridsProps?: Record<string, unknown>;
|
|
10
|
+
gridProps?: Record<string, unknown>;
|
|
11
|
+
gridHeadProps?: Record<string, unknown>;
|
|
12
|
+
headCellProps?: Record<string, unknown>;
|
|
13
|
+
cellProps?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
declare var __VLS_95: {
|
|
16
|
+
date: import("reka-ui").DateValue;
|
|
17
|
+
dayValue: string;
|
|
18
|
+
selected: boolean;
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
selectionStart: boolean;
|
|
21
|
+
selectionEnd: boolean;
|
|
22
|
+
highlighted: boolean;
|
|
23
|
+
}, __VLS_97: {};
|
|
24
|
+
type __VLS_Slots = {} & {
|
|
25
|
+
day?: (props: typeof __VLS_95) => any;
|
|
26
|
+
} & {
|
|
27
|
+
footer?: (props: typeof __VLS_97) => any;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<DatePickerRangeCalendarBodyProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DatePickerRangeCalendarBodyProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import {
|
|
3
|
+
DateRangePickerCalendar,
|
|
4
|
+
DateRangePickerCell,
|
|
5
|
+
DateRangePickerCellTrigger,
|
|
6
|
+
DateRangePickerGrid,
|
|
7
|
+
DateRangePickerGridBody,
|
|
8
|
+
DateRangePickerGridHead,
|
|
9
|
+
DateRangePickerGridRow,
|
|
10
|
+
DateRangePickerHeadCell,
|
|
11
|
+
DateRangePickerHeader,
|
|
12
|
+
DateRangePickerHeading,
|
|
13
|
+
DateRangePickerNext,
|
|
14
|
+
DateRangePickerPrev
|
|
15
|
+
} from "reka-ui";
|
|
16
|
+
import Button from "../components/Button.vue";
|
|
17
|
+
import { useIcons } from "../composables/use-icons";
|
|
18
|
+
import { useMessages } from "../composables/use-messages";
|
|
19
|
+
defineProps({
|
|
20
|
+
color: { type: null, required: false },
|
|
21
|
+
activeColor: { type: null, required: false },
|
|
22
|
+
headerProps: { type: Object, required: false },
|
|
23
|
+
headingProps: { type: Object, required: false },
|
|
24
|
+
gridsProps: { type: Object, required: false },
|
|
25
|
+
gridProps: { type: Object, required: false },
|
|
26
|
+
gridHeadProps: { type: Object, required: false },
|
|
27
|
+
headCellProps: { type: Object, required: false },
|
|
28
|
+
cellProps: { type: Object, required: false }
|
|
29
|
+
});
|
|
30
|
+
const icons = useIcons();
|
|
31
|
+
const messages = useMessages();
|
|
32
|
+
const navButtonUi = { leadingIcon: "rtl:-scale-x-100" };
|
|
33
|
+
const rangeCellTriggerUi = {
|
|
34
|
+
base: "relative w-full rounded-none data-[selection-start]:rounded-s-full data-[selection-end]:rounded-e-full data-[today]:font-semibold data-[today]:after:absolute data-[today]:after:bottom-1 data-[today]:after:left-1/2 data-[today]:after:size-1 data-[today]:after:-translate-x-1/2 data-[today]:after:rounded-full data-[today]:after:bg-[var(--ui-primary)] data-[outside-view]:opacity-40 data-[unavailable]:opacity-40 data-[unavailable]:line-through"
|
|
35
|
+
};
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<template>
|
|
39
|
+
<DateRangePickerCalendar v-slot="{ grid, weekDays }">
|
|
40
|
+
<DateRangePickerHeader v-bind="headerProps">
|
|
41
|
+
<DateRangePickerPrev as-child>
|
|
42
|
+
<Button variant="ghost" :color="color" size="sm" :icon="icons.chevronLeft" :aria-label="messages.previousMonth" :ui="navButtonUi" />
|
|
43
|
+
</DateRangePickerPrev>
|
|
44
|
+
<DateRangePickerHeading v-bind="headingProps" />
|
|
45
|
+
<DateRangePickerNext as-child>
|
|
46
|
+
<Button variant="ghost" :color="color" size="sm" :icon="icons.chevronRight" :aria-label="messages.nextMonth" :ui="navButtonUi" />
|
|
47
|
+
</DateRangePickerNext>
|
|
48
|
+
</DateRangePickerHeader>
|
|
49
|
+
|
|
50
|
+
<div v-bind="gridsProps">
|
|
51
|
+
<DateRangePickerGrid v-for="month in grid" :key="month.value.toString()" v-bind="gridProps">
|
|
52
|
+
<DateRangePickerGridHead v-bind="gridHeadProps">
|
|
53
|
+
<DateRangePickerGridRow>
|
|
54
|
+
<DateRangePickerHeadCell v-for="day in weekDays" :key="day" v-bind="headCellProps">
|
|
55
|
+
{{ day }}
|
|
56
|
+
</DateRangePickerHeadCell>
|
|
57
|
+
</DateRangePickerGridRow>
|
|
58
|
+
</DateRangePickerGridHead>
|
|
59
|
+
<DateRangePickerGridBody>
|
|
60
|
+
<DateRangePickerGridRow v-for="(week, weekIndex) in month.rows" :key="weekIndex">
|
|
61
|
+
<DateRangePickerCell v-for="date in week" :key="date.toString()" :date="date" v-bind="cellProps">
|
|
62
|
+
<DateRangePickerCellTrigger
|
|
63
|
+
v-slot="{ dayValue, selectionStart, selectionEnd, highlighted, selected, disabled: dayDisabled }"
|
|
64
|
+
:day="date"
|
|
65
|
+
:month="month.value"
|
|
66
|
+
as-child
|
|
67
|
+
>
|
|
68
|
+
<Button
|
|
69
|
+
:variant="selectionStart || selectionEnd ? 'solid' : highlighted || selected ? 'soft' : 'ghost'"
|
|
70
|
+
:color="selectionStart || selectionEnd || highlighted || selected ? activeColor : color"
|
|
71
|
+
size="sm"
|
|
72
|
+
:disabled="dayDisabled"
|
|
73
|
+
:ui="rangeCellTriggerUi"
|
|
74
|
+
>
|
|
75
|
+
<slot
|
|
76
|
+
name="day"
|
|
77
|
+
:date="date"
|
|
78
|
+
:day-value="dayValue"
|
|
79
|
+
:selected="selected"
|
|
80
|
+
:disabled="dayDisabled"
|
|
81
|
+
:selection-start="selectionStart"
|
|
82
|
+
:selection-end="selectionEnd"
|
|
83
|
+
:highlighted="highlighted"
|
|
84
|
+
>
|
|
85
|
+
{{ dayValue }}
|
|
86
|
+
</slot>
|
|
87
|
+
</Button>
|
|
88
|
+
</DateRangePickerCellTrigger>
|
|
89
|
+
</DateRangePickerCell>
|
|
90
|
+
</DateRangePickerGridRow>
|
|
91
|
+
</DateRangePickerGridBody>
|
|
92
|
+
</DateRangePickerGrid>
|
|
93
|
+
</div>
|
|
94
|
+
<slot name="footer" />
|
|
95
|
+
</DateRangePickerCalendar>
|
|
96
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { buttonTheme } from '../theme/button.js';
|
|
3
|
+
type ButtonVariants = VariantProps<typeof buttonTheme>;
|
|
4
|
+
export interface DatePickerRangeCalendarBodyProps {
|
|
5
|
+
color?: ButtonVariants['color'];
|
|
6
|
+
activeColor?: ButtonVariants['color'];
|
|
7
|
+
headerProps?: Record<string, unknown>;
|
|
8
|
+
headingProps?: Record<string, unknown>;
|
|
9
|
+
gridsProps?: Record<string, unknown>;
|
|
10
|
+
gridProps?: Record<string, unknown>;
|
|
11
|
+
gridHeadProps?: Record<string, unknown>;
|
|
12
|
+
headCellProps?: Record<string, unknown>;
|
|
13
|
+
cellProps?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
declare var __VLS_95: {
|
|
16
|
+
date: import("reka-ui").DateValue;
|
|
17
|
+
dayValue: string;
|
|
18
|
+
selected: boolean;
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
selectionStart: boolean;
|
|
21
|
+
selectionEnd: boolean;
|
|
22
|
+
highlighted: boolean;
|
|
23
|
+
}, __VLS_97: {};
|
|
24
|
+
type __VLS_Slots = {} & {
|
|
25
|
+
day?: (props: typeof __VLS_95) => any;
|
|
26
|
+
} & {
|
|
27
|
+
footer?: (props: typeof __VLS_97) => any;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<DatePickerRangeCalendarBodyProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DatePickerRangeCalendarBodyProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { buttonTheme } from '../theme/button.js';
|
|
3
|
+
type ButtonVariants = VariantProps<typeof buttonTheme>;
|
|
4
|
+
export interface DatePickerTimeBodyProps {
|
|
5
|
+
hour: number;
|
|
6
|
+
minute: number;
|
|
7
|
+
granularity: 'hour' | 'minute';
|
|
8
|
+
hourCycle?: 12 | 24;
|
|
9
|
+
minuteStep?: number;
|
|
10
|
+
locale?: string;
|
|
11
|
+
hourInputId: string;
|
|
12
|
+
minuteInputId: string;
|
|
13
|
+
setHour: (hour24: number) => void;
|
|
14
|
+
setMinute: (minute: number) => void;
|
|
15
|
+
closeOnSelect?: boolean;
|
|
16
|
+
activeColor?: ButtonVariants['color'];
|
|
17
|
+
/** Closes the popover/modal - the Done button's own action. */
|
|
18
|
+
close: () => void;
|
|
19
|
+
timeSectionProps?: Record<string, unknown>;
|
|
20
|
+
}
|
|
21
|
+
declare var __VLS_9: {};
|
|
22
|
+
type __VLS_Slots = {} & {
|
|
23
|
+
footer?: (props: typeof __VLS_9) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<DatePickerTimeBodyProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DatePickerTimeBodyProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import Button from "../components/Button.vue";
|
|
3
|
+
import { useMessages } from "../composables/use-messages";
|
|
4
|
+
import TimeStepper from "./TimeStepper.vue";
|
|
5
|
+
defineProps({
|
|
6
|
+
hour: { type: Number, required: true },
|
|
7
|
+
minute: { type: Number, required: true },
|
|
8
|
+
granularity: { type: String, required: true },
|
|
9
|
+
hourCycle: { type: Number, required: false },
|
|
10
|
+
minuteStep: { type: Number, required: false },
|
|
11
|
+
locale: { type: String, required: false },
|
|
12
|
+
hourInputId: { type: String, required: true },
|
|
13
|
+
minuteInputId: { type: String, required: true },
|
|
14
|
+
setHour: { type: Function, required: true },
|
|
15
|
+
setMinute: { type: Function, required: true },
|
|
16
|
+
closeOnSelect: { type: Boolean, required: false },
|
|
17
|
+
activeColor: { type: null, required: false },
|
|
18
|
+
close: { type: Function, required: true },
|
|
19
|
+
timeSectionProps: { type: Object, required: false }
|
|
20
|
+
});
|
|
21
|
+
const messages = useMessages();
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<div v-bind="timeSectionProps">
|
|
26
|
+
<label :for="hourInputId" class="sr-only">{{ messages.hour }}</label>
|
|
27
|
+
<label v-if="granularity === 'minute'" :for="minuteInputId" class="sr-only">{{ messages.minute }}</label>
|
|
28
|
+
<TimeStepper
|
|
29
|
+
:hour="hour"
|
|
30
|
+
:minute="minute"
|
|
31
|
+
:granularity="granularity"
|
|
32
|
+
:hour-cycle="hourCycle"
|
|
33
|
+
:minute-step="minuteStep"
|
|
34
|
+
:locale="locale"
|
|
35
|
+
:hour-id="hourInputId"
|
|
36
|
+
:minute-id="minuteInputId"
|
|
37
|
+
@update:hour="setHour"
|
|
38
|
+
@update:minute="setMinute"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
<slot name="footer" />
|
|
42
|
+
<Button
|
|
43
|
+
v-if="closeOnSelect"
|
|
44
|
+
variant="solid"
|
|
45
|
+
:color="activeColor"
|
|
46
|
+
size="sm"
|
|
47
|
+
block
|
|
48
|
+
class="mt-2"
|
|
49
|
+
@click="close"
|
|
50
|
+
>
|
|
51
|
+
{{ messages.done }}
|
|
52
|
+
</Button>
|
|
53
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { buttonTheme } from '../theme/button.js';
|
|
3
|
+
type ButtonVariants = VariantProps<typeof buttonTheme>;
|
|
4
|
+
export interface DatePickerTimeBodyProps {
|
|
5
|
+
hour: number;
|
|
6
|
+
minute: number;
|
|
7
|
+
granularity: 'hour' | 'minute';
|
|
8
|
+
hourCycle?: 12 | 24;
|
|
9
|
+
minuteStep?: number;
|
|
10
|
+
locale?: string;
|
|
11
|
+
hourInputId: string;
|
|
12
|
+
minuteInputId: string;
|
|
13
|
+
setHour: (hour24: number) => void;
|
|
14
|
+
setMinute: (minute: number) => void;
|
|
15
|
+
closeOnSelect?: boolean;
|
|
16
|
+
activeColor?: ButtonVariants['color'];
|
|
17
|
+
/** Closes the popover/modal - the Done button's own action. */
|
|
18
|
+
close: () => void;
|
|
19
|
+
timeSectionProps?: Record<string, unknown>;
|
|
20
|
+
}
|
|
21
|
+
declare var __VLS_9: {};
|
|
22
|
+
type __VLS_Slots = {} & {
|
|
23
|
+
footer?: (props: typeof __VLS_9) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<DatePickerTimeBodyProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DatePickerTimeBodyProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface TimeStepperProps {
|
|
2
|
+
/** Always 24-hour (0-23), regardless of what's displayed. */
|
|
3
|
+
hour: number;
|
|
4
|
+
/** Only read/rendered when granularity is 'minute'. */
|
|
5
|
+
minute?: number;
|
|
6
|
+
granularity: 'hour' | 'minute';
|
|
7
|
+
/** Forces 12-hour or 24-hour display; defaults to whatever `locale` itself resolves to. */
|
|
8
|
+
hourCycle?: 12 | 24;
|
|
9
|
+
minuteStep?: number;
|
|
10
|
+
locale?: string;
|
|
11
|
+
size?: 'sm' | 'md' | 'lg';
|
|
12
|
+
/** Ids for the caller's own paired <label for> elements - neither SInputNumber nor SInput forward a bare aria-label to their inner <input>, so callers pair a real sr-only label instead. */
|
|
13
|
+
hourId?: string;
|
|
14
|
+
minuteId?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface TimeStepperEmits {
|
|
17
|
+
'update:hour': [value: number];
|
|
18
|
+
'update:minute': [value: number];
|
|
19
|
+
}
|
|
20
|
+
declare const __VLS_export: import("vue").DefineComponent<TimeStepperProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
"update:hour": (value: number) => any;
|
|
22
|
+
"update:minute": (value: number) => any;
|
|
23
|
+
}, string, import("vue").PublicProps, Readonly<TimeStepperProps> & Readonly<{
|
|
24
|
+
"onUpdate:hour"?: ((value: number) => any) | undefined;
|
|
25
|
+
"onUpdate:minute"?: ((value: number) => any) | undefined;
|
|
26
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|