@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,116 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref, useSlots } from "vue";
|
|
3
|
+
import { navigationMenuTheme } from "../theme/navigation-menu";
|
|
4
|
+
import { resolveSlot, useComponentTheme } from "../utils/ui";
|
|
5
|
+
import Icon from "./Icon.vue";
|
|
6
|
+
import NavigationMenuFlyoutList from "./NavigationMenuFlyoutList.vue";
|
|
7
|
+
import Popover from "./Popover.vue";
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
item: { type: Object, required: true },
|
|
10
|
+
color: { type: null, required: false },
|
|
11
|
+
variant: { type: String, required: false },
|
|
12
|
+
highlight: { type: Boolean, required: false },
|
|
13
|
+
open: { type: Boolean, required: true },
|
|
14
|
+
anotherFlyoutOpen: { type: Boolean, required: false },
|
|
15
|
+
onSelect: { type: Function, required: true },
|
|
16
|
+
ui: { type: Object, required: false }
|
|
17
|
+
});
|
|
18
|
+
const emit = defineEmits(["update:open"]);
|
|
19
|
+
const slots = useSlots();
|
|
20
|
+
function slotName(item, suffix) {
|
|
21
|
+
const named = item.slot ? `${item.slot}${suffix}` : void 0;
|
|
22
|
+
if (named && slots[named])
|
|
23
|
+
return named;
|
|
24
|
+
return `item${suffix}`;
|
|
25
|
+
}
|
|
26
|
+
const theme = useComponentTheme("navigationMenu", navigationMenuTheme);
|
|
27
|
+
const ui = computed(() => theme.value({ orientation: "vertical", color: props.color, variant: props.variant, highlight: props.highlight, collapsed: true, active: false, disabled: props.item.disabled }));
|
|
28
|
+
let closeTimer;
|
|
29
|
+
function cancelClose() {
|
|
30
|
+
if (closeTimer !== void 0) {
|
|
31
|
+
clearTimeout(closeTimer);
|
|
32
|
+
closeTimer = void 0;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
let openedViaHover = false;
|
|
36
|
+
function openNow() {
|
|
37
|
+
cancelClose();
|
|
38
|
+
openedViaHover = true;
|
|
39
|
+
emit("update:open", true);
|
|
40
|
+
}
|
|
41
|
+
function scheduleClose() {
|
|
42
|
+
cancelClose();
|
|
43
|
+
closeTimer = setTimeout(() => {
|
|
44
|
+
emit("update:open", false);
|
|
45
|
+
}, 200);
|
|
46
|
+
}
|
|
47
|
+
function onTriggerClick() {
|
|
48
|
+
openedViaHover = false;
|
|
49
|
+
}
|
|
50
|
+
function onOpenAutoFocus(event) {
|
|
51
|
+
if (openedViaHover)
|
|
52
|
+
event.preventDefault();
|
|
53
|
+
}
|
|
54
|
+
const triggerRef = ref();
|
|
55
|
+
function getFocusableElements() {
|
|
56
|
+
return Array.from(document.querySelectorAll(
|
|
57
|
+
'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
58
|
+
));
|
|
59
|
+
}
|
|
60
|
+
function onContentKeydown(event) {
|
|
61
|
+
if (event.key !== "Tab" || !triggerRef.value)
|
|
62
|
+
return;
|
|
63
|
+
const contentEl = event.currentTarget;
|
|
64
|
+
const withinContent = getFocusableElements().filter((el) => contentEl.contains(el));
|
|
65
|
+
if (withinContent.length === 0)
|
|
66
|
+
return;
|
|
67
|
+
const active = document.activeElement;
|
|
68
|
+
const first = withinContent[0];
|
|
69
|
+
const last = withinContent[withinContent.length - 1];
|
|
70
|
+
if (!event.shiftKey && active === last) {
|
|
71
|
+
event.preventDefault();
|
|
72
|
+
event.stopPropagation();
|
|
73
|
+
const outside = getFocusableElements().filter((el) => !contentEl.contains(el));
|
|
74
|
+
const nextIndex = outside.indexOf(triggerRef.value) + 1;
|
|
75
|
+
emit("update:open", false);
|
|
76
|
+
outside[nextIndex]?.focus();
|
|
77
|
+
} else if (event.shiftKey && active === first) {
|
|
78
|
+
event.preventDefault();
|
|
79
|
+
event.stopPropagation();
|
|
80
|
+
emit("update:open", false);
|
|
81
|
+
triggerRef.value.focus();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
</script>
|
|
85
|
+
|
|
86
|
+
<template>
|
|
87
|
+
<Popover
|
|
88
|
+
:open="open" side="right" align="start" :return-focus-on-close="!anotherFlyoutOpen" :ui="{ content: 'p-2' }"
|
|
89
|
+
@update:open="emit('update:open', $event)" @open-auto-focus="onOpenAutoFocus"
|
|
90
|
+
>
|
|
91
|
+
<button
|
|
92
|
+
ref="triggerRef"
|
|
93
|
+
type="button"
|
|
94
|
+
:disabled="item.disabled"
|
|
95
|
+
v-bind="resolveSlot(ui.link, props.ui?.link)"
|
|
96
|
+
@mouseenter="openNow"
|
|
97
|
+
@mouseleave="scheduleClose"
|
|
98
|
+
@click="onTriggerClick"
|
|
99
|
+
>
|
|
100
|
+
<slot :name="slotName(item, '-leading')" :item="item" :active="false">
|
|
101
|
+
<Icon v-if="item.icon" :name="item.icon" v-bind="resolveSlot(ui.linkIcon, props.ui?.linkIcon)" />
|
|
102
|
+
<span v-else v-bind="resolveSlot(ui.linkIconFallback, props.ui?.linkIconFallback)" aria-hidden="true">{{ item.label.charAt(0) }}</span>
|
|
103
|
+
</slot>
|
|
104
|
+
<slot :name="slotName(item, '-label')" :item="item" :active="false">
|
|
105
|
+
<span v-bind="resolveSlot(ui.linkLabel, props.ui?.linkLabel)">{{ item.label }}</span>
|
|
106
|
+
</slot>
|
|
107
|
+
</button>
|
|
108
|
+
<template #content>
|
|
109
|
+
<div @mouseenter="cancelClose" @mouseleave="scheduleClose" @keydown="onContentKeydown">
|
|
110
|
+
<slot :name="slotName(item, '-content')" :item="item">
|
|
111
|
+
<NavigationMenuFlyoutList :items="item.children ?? []" :color="color" :variant="variant" :highlight="highlight" :on-select="onSelect" :ui="props.ui" root />
|
|
112
|
+
</slot>
|
|
113
|
+
</div>
|
|
114
|
+
</template>
|
|
115
|
+
</Popover>
|
|
116
|
+
</template>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { buttonTheme } from '../theme/button.js';
|
|
3
|
+
import type { NavigationMenuThemeSlots } from '../theme/navigation-menu.js';
|
|
4
|
+
import type { NavigationMenuItem } from '../utils/navigation-menu.js';
|
|
5
|
+
import type { UiProp } from '../utils/ui.js';
|
|
6
|
+
type ButtonVariants = VariantProps<typeof buttonTheme>;
|
|
7
|
+
export interface NavigationMenuFlyoutTriggerProps {
|
|
8
|
+
item: NavigationMenuItem;
|
|
9
|
+
color?: ButtonVariants['color'];
|
|
10
|
+
variant?: 'pill' | 'link';
|
|
11
|
+
highlight?: boolean;
|
|
12
|
+
open: boolean;
|
|
13
|
+
/** Whether a *different* sibling trigger currently holds the flyout - see the note above on why `return-focus-on-close` needs this rather than a flat `false`. */
|
|
14
|
+
anotherFlyoutOpen?: boolean;
|
|
15
|
+
onSelect: (item: NavigationMenuItem, event: Event) => void;
|
|
16
|
+
ui?: UiProp<NavigationMenuThemeSlots>;
|
|
17
|
+
}
|
|
18
|
+
export interface NavigationMenuFlyoutTriggerEmits {
|
|
19
|
+
'update:open': [value: boolean];
|
|
20
|
+
}
|
|
21
|
+
declare var __VLS_12: string, __VLS_13: {
|
|
22
|
+
item: NavigationMenuItem;
|
|
23
|
+
active: boolean;
|
|
24
|
+
}, __VLS_21: string, __VLS_22: {
|
|
25
|
+
item: NavigationMenuItem;
|
|
26
|
+
active: boolean;
|
|
27
|
+
}, __VLS_26: string, __VLS_27: {
|
|
28
|
+
item: NavigationMenuItem;
|
|
29
|
+
};
|
|
30
|
+
type __VLS_Slots = {} & {
|
|
31
|
+
[K in NonNullable<typeof __VLS_12>]?: (props: typeof __VLS_13) => any;
|
|
32
|
+
} & {
|
|
33
|
+
[K in NonNullable<typeof __VLS_21>]?: (props: typeof __VLS_22) => any;
|
|
34
|
+
} & {
|
|
35
|
+
[K in NonNullable<typeof __VLS_26>]?: (props: typeof __VLS_27) => any;
|
|
36
|
+
};
|
|
37
|
+
declare const __VLS_base: import("vue").DefineComponent<NavigationMenuFlyoutTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
38
|
+
"update:open": (value: boolean) => any;
|
|
39
|
+
}, string, import("vue").PublicProps, Readonly<NavigationMenuFlyoutTriggerProps> & Readonly<{
|
|
40
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
41
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
42
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
43
|
+
declare const _default: typeof __VLS_export;
|
|
44
|
+
export default _default;
|
|
45
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
46
|
+
new (): {
|
|
47
|
+
$slots: S;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { PageAsideThemeSlots } from '../theme/page-aside.js';
|
|
2
|
+
import type { UiProp } from '../utils/ui.js';
|
|
3
|
+
export interface PageAsideProps {
|
|
4
|
+
ui?: UiProp<PageAsideThemeSlots>;
|
|
5
|
+
}
|
|
6
|
+
declare var __VLS_1: {}, __VLS_9: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
header?: (props: typeof __VLS_1) => any;
|
|
9
|
+
} & {
|
|
10
|
+
default?: (props: typeof __VLS_9) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<PageAsideProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageAsideProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { pageAsideTheme } from "../theme/page-aside";
|
|
4
|
+
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
5
|
+
import ScrollArea from "./ScrollArea.vue";
|
|
6
|
+
defineOptions({ inheritAttrs: false });
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
ui: { type: Object, required: false }
|
|
9
|
+
});
|
|
10
|
+
const theme = useComponentTheme("pageAside", pageAsideTheme);
|
|
11
|
+
const ui = computed(() => theme.value());
|
|
12
|
+
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<aside v-bind="rootProps">
|
|
17
|
+
<div v-if="$slots.header" v-bind="resolveSlot(ui.header, props.ui?.header)">
|
|
18
|
+
<slot name="header" />
|
|
19
|
+
</div>
|
|
20
|
+
<ScrollArea v-bind="resolveSlot(ui.scrollArea, props.ui?.scrollArea)">
|
|
21
|
+
<div v-bind="resolveSlot(ui.body, props.ui?.body)">
|
|
22
|
+
<slot />
|
|
23
|
+
</div>
|
|
24
|
+
</ScrollArea>
|
|
25
|
+
</aside>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { PageAsideThemeSlots } from '../theme/page-aside.js';
|
|
2
|
+
import type { UiProp } from '../utils/ui.js';
|
|
3
|
+
export interface PageAsideProps {
|
|
4
|
+
ui?: UiProp<PageAsideThemeSlots>;
|
|
5
|
+
}
|
|
6
|
+
declare var __VLS_1: {}, __VLS_9: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
header?: (props: typeof __VLS_1) => any;
|
|
9
|
+
} & {
|
|
10
|
+
default?: (props: typeof __VLS_9) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<PageAsideProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageAsideProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { PageHeaderThemeSlots } from '../theme/page-header.js';
|
|
2
|
+
import type { UiProp } from '../utils/ui.js';
|
|
3
|
+
export interface PageHeaderProps {
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
ui?: UiProp<PageHeaderThemeSlots>;
|
|
7
|
+
}
|
|
8
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
title?: (props: typeof __VLS_1) => any;
|
|
11
|
+
} & {
|
|
12
|
+
description?: (props: typeof __VLS_3) => any;
|
|
13
|
+
} & {
|
|
14
|
+
default?: (props: typeof __VLS_5) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<PageHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { pageHeaderTheme } from "../theme/page-header";
|
|
4
|
+
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
5
|
+
defineOptions({ inheritAttrs: false });
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
title: { type: String, required: false },
|
|
8
|
+
description: { type: String, required: false },
|
|
9
|
+
ui: { type: Object, required: false }
|
|
10
|
+
});
|
|
11
|
+
const theme = useComponentTheme("pageHeader", pageHeaderTheme);
|
|
12
|
+
const ui = computed(() => theme.value());
|
|
13
|
+
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div v-bind="rootProps">
|
|
18
|
+
<h1 v-if="title || $slots.title" v-bind="resolveSlot(ui.title, props.ui?.title)">
|
|
19
|
+
<slot name="title">
|
|
20
|
+
{{ title }}
|
|
21
|
+
</slot>
|
|
22
|
+
</h1>
|
|
23
|
+
<p v-if="description || $slots.description" v-bind="resolveSlot(ui.description, props.ui?.description)">
|
|
24
|
+
<slot name="description">
|
|
25
|
+
{{ description }}
|
|
26
|
+
</slot>
|
|
27
|
+
</p>
|
|
28
|
+
<slot />
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { PageHeaderThemeSlots } from '../theme/page-header.js';
|
|
2
|
+
import type { UiProp } from '../utils/ui.js';
|
|
3
|
+
export interface PageHeaderProps {
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
ui?: UiProp<PageHeaderThemeSlots>;
|
|
7
|
+
}
|
|
8
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
title?: (props: typeof __VLS_1) => any;
|
|
11
|
+
} & {
|
|
12
|
+
description?: (props: typeof __VLS_3) => any;
|
|
13
|
+
} & {
|
|
14
|
+
default?: (props: typeof __VLS_5) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<PageHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { buttonTheme } from '../theme/button.js';
|
|
3
|
+
import type { PaginationThemeSlots } from '../theme/pagination.js';
|
|
4
|
+
import type { UiProp } from '../utils/ui.js';
|
|
5
|
+
import { paginationTheme } from '../theme/pagination.js';
|
|
6
|
+
type PaginationVariants = VariantProps<typeof paginationTheme>;
|
|
7
|
+
type ButtonVariants = VariantProps<typeof buttonTheme>;
|
|
8
|
+
export interface PaginationProps {
|
|
9
|
+
/** Total item count - paired with itemsPerPage to derive the page count, same shape as Reka's own PaginationRoot. */
|
|
10
|
+
total?: number;
|
|
11
|
+
itemsPerPage?: number;
|
|
12
|
+
/** Controlled current page (1-indexed). Omit and use defaultPage for uncontrolled usage. */
|
|
13
|
+
page?: number;
|
|
14
|
+
defaultPage?: number;
|
|
15
|
+
siblingCount?: number;
|
|
16
|
+
showEdges?: boolean;
|
|
17
|
+
/** Adds jump-to-first/jump-to-last buttons alongside the always-present Prev/Next. */
|
|
18
|
+
showFirstLast?: boolean;
|
|
19
|
+
/** Set `false` to hide Previous/Next entirely, for a bare page-number-only strip. */
|
|
20
|
+
showControls?: boolean;
|
|
21
|
+
/** Maps a page number to a route/href, rendering every control as a real link (progressive enhancement - clicking still drives the page change through Reka's own handling, same as a plain button). */
|
|
22
|
+
to?: (page: number) => string;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
size?: PaginationVariants['size'];
|
|
25
|
+
/** Inactive controls (First/Prev/Next/Last and non-current page numbers). */
|
|
26
|
+
color?: ButtonVariants['color'];
|
|
27
|
+
variant?: ButtonVariants['variant'];
|
|
28
|
+
/** The current page's own button. */
|
|
29
|
+
activeColor?: ButtonVariants['color'];
|
|
30
|
+
activeVariant?: ButtonVariants['variant'];
|
|
31
|
+
ui?: UiProp<PaginationThemeSlots>;
|
|
32
|
+
}
|
|
33
|
+
export interface PaginationEmits {
|
|
34
|
+
'update:page': [value: number];
|
|
35
|
+
}
|
|
36
|
+
declare const __VLS_export: import("vue").DefineComponent<PaginationProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
37
|
+
"update:page": (value: number) => any;
|
|
38
|
+
}, string, import("vue").PublicProps, Readonly<PaginationProps> & Readonly<{
|
|
39
|
+
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
40
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
41
|
+
declare const _default: typeof __VLS_export;
|
|
42
|
+
export default _default;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import {
|
|
3
|
+
PaginationEllipsis,
|
|
4
|
+
PaginationFirst,
|
|
5
|
+
PaginationLast,
|
|
6
|
+
PaginationList,
|
|
7
|
+
PaginationListItem,
|
|
8
|
+
PaginationNext,
|
|
9
|
+
PaginationPrev,
|
|
10
|
+
PaginationRoot
|
|
11
|
+
} from "reka-ui";
|
|
12
|
+
import { computed, resolveComponent } from "vue";
|
|
13
|
+
import { useIcons } from "../composables/use-icons";
|
|
14
|
+
import { useMessages } from "../composables/use-messages";
|
|
15
|
+
import { paginationTheme } from "../theme/pagination";
|
|
16
|
+
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
17
|
+
import Button from "./Button.vue";
|
|
18
|
+
defineOptions({ inheritAttrs: false });
|
|
19
|
+
const props = defineProps({
|
|
20
|
+
total: { type: Number, required: false, default: 0 },
|
|
21
|
+
itemsPerPage: { type: Number, required: false, default: 10 },
|
|
22
|
+
page: { type: Number, required: false },
|
|
23
|
+
defaultPage: { type: Number, required: false, default: 1 },
|
|
24
|
+
siblingCount: { type: Number, required: false, default: 1 },
|
|
25
|
+
showEdges: { type: Boolean, required: false, default: true },
|
|
26
|
+
showFirstLast: { type: Boolean, required: false, default: false },
|
|
27
|
+
showControls: { type: Boolean, required: false, default: true },
|
|
28
|
+
to: { type: Function, required: false },
|
|
29
|
+
disabled: { type: Boolean, required: false },
|
|
30
|
+
size: { type: null, required: false },
|
|
31
|
+
color: { type: null, required: false, default: "neutral" },
|
|
32
|
+
variant: { type: null, required: false, default: "ghost" },
|
|
33
|
+
activeColor: { type: null, required: false, default: "primary" },
|
|
34
|
+
activeVariant: { type: null, required: false, default: "solid" },
|
|
35
|
+
ui: { type: Object, required: false }
|
|
36
|
+
});
|
|
37
|
+
const emit = defineEmits(["update:page"]);
|
|
38
|
+
const icons = useIcons();
|
|
39
|
+
const messages = useMessages();
|
|
40
|
+
const theme = useComponentTheme("pagination", paginationTheme);
|
|
41
|
+
const ui = computed(() => theme.value({ size: props.size }));
|
|
42
|
+
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
43
|
+
const listProps = computed(() => resolveSlot(ui.value.list, props.ui?.list));
|
|
44
|
+
const ellipsisProps = computed(() => resolveSlot(ui.value.ellipsis, props.ui?.ellipsis));
|
|
45
|
+
const mirroredIconUi = { leadingIcon: "rtl:-scale-x-100" };
|
|
46
|
+
const NuxtLink = resolveComponent("NuxtLink");
|
|
47
|
+
function linkProps(page) {
|
|
48
|
+
return props.to ? { as: NuxtLink, to: props.to(page) } : {};
|
|
49
|
+
}
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<template>
|
|
53
|
+
<PaginationRoot
|
|
54
|
+
:page="page"
|
|
55
|
+
:default-page="defaultPage"
|
|
56
|
+
:total="total"
|
|
57
|
+
:items-per-page="itemsPerPage"
|
|
58
|
+
:sibling-count="siblingCount"
|
|
59
|
+
:show-edges="showEdges"
|
|
60
|
+
:disabled="disabled"
|
|
61
|
+
:aria-label="messages.pagination"
|
|
62
|
+
v-bind="rootProps"
|
|
63
|
+
@update:page="(value) => emit('update:page', value)"
|
|
64
|
+
>
|
|
65
|
+
<template #default="{ page: currentPage, pageCount }">
|
|
66
|
+
<!--
|
|
67
|
+
No `:disabled` bound on any nested Button below - Reka's own
|
|
68
|
+
PaginationPrev/Next/First/Last/ListItem each already compute their
|
|
69
|
+
own correct disabled value (boundary-aware, and folding in the
|
|
70
|
+
`disabled` prop passed to PaginationRoot above) and pass it down as
|
|
71
|
+
part of the asChild merge. Binding our own `:disabled="disabled"`
|
|
72
|
+
here would add an explicit (if often-undefined) `disabled` key to
|
|
73
|
+
Button's own vnode props - and Reka's asChild merge (see
|
|
74
|
+
reka-ui/src/Primitive/Slot.ts) gives the child's own props priority
|
|
75
|
+
over the primitive's attrs specifically so a consumer CAN override
|
|
76
|
+
them, which here would silently clobber Reka's correct value with
|
|
77
|
+
`undefined` on every page but the disabled boundary.
|
|
78
|
+
-->
|
|
79
|
+
<PaginationFirst v-if="showFirstLast" as-child>
|
|
80
|
+
<Button :variant="variant" :color="color" :size="size" :icon="icons.chevronsLeft" :aria-label="messages.first" :ui="mirroredIconUi" v-bind="linkProps(1)" />
|
|
81
|
+
</PaginationFirst>
|
|
82
|
+
<PaginationPrev v-if="showControls" as-child>
|
|
83
|
+
<Button :variant="variant" :color="color" :size="size" :icon="icons.chevronLeft" :aria-label="messages.previous" :ui="mirroredIconUi" v-bind="linkProps(currentPage - 1)" />
|
|
84
|
+
</PaginationPrev>
|
|
85
|
+
|
|
86
|
+
<PaginationList v-slot="{ items }" v-bind="listProps">
|
|
87
|
+
<template v-for="(item, index) in items" :key="item.type === 'ellipsis' ? `ellipsis-${index}` : item.value">
|
|
88
|
+
<PaginationEllipsis v-if="item.type === 'ellipsis'" v-bind="ellipsisProps">
|
|
89
|
+
…
|
|
90
|
+
</PaginationEllipsis>
|
|
91
|
+
<PaginationListItem v-else :value="item.value" as-child>
|
|
92
|
+
<Button
|
|
93
|
+
:variant="item.value === currentPage ? activeVariant : variant"
|
|
94
|
+
:color="item.value === currentPage ? activeColor : color"
|
|
95
|
+
:size="size"
|
|
96
|
+
square
|
|
97
|
+
v-bind="linkProps(item.value)"
|
|
98
|
+
>
|
|
99
|
+
{{ item.value }}
|
|
100
|
+
</Button>
|
|
101
|
+
</PaginationListItem>
|
|
102
|
+
</template>
|
|
103
|
+
</PaginationList>
|
|
104
|
+
|
|
105
|
+
<PaginationNext v-if="showControls" as-child>
|
|
106
|
+
<Button :variant="variant" :color="color" :size="size" :icon="icons.chevronRight" :aria-label="messages.next" :ui="mirroredIconUi" v-bind="linkProps(currentPage + 1)" />
|
|
107
|
+
</PaginationNext>
|
|
108
|
+
<PaginationLast v-if="showFirstLast" as-child>
|
|
109
|
+
<Button :variant="variant" :color="color" :size="size" :icon="icons.chevronsRight" :aria-label="messages.last" :ui="mirroredIconUi" v-bind="linkProps(pageCount)" />
|
|
110
|
+
</PaginationLast>
|
|
111
|
+
</template>
|
|
112
|
+
</PaginationRoot>
|
|
113
|
+
</template>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { buttonTheme } from '../theme/button.js';
|
|
3
|
+
import type { PaginationThemeSlots } from '../theme/pagination.js';
|
|
4
|
+
import type { UiProp } from '../utils/ui.js';
|
|
5
|
+
import { paginationTheme } from '../theme/pagination.js';
|
|
6
|
+
type PaginationVariants = VariantProps<typeof paginationTheme>;
|
|
7
|
+
type ButtonVariants = VariantProps<typeof buttonTheme>;
|
|
8
|
+
export interface PaginationProps {
|
|
9
|
+
/** Total item count - paired with itemsPerPage to derive the page count, same shape as Reka's own PaginationRoot. */
|
|
10
|
+
total?: number;
|
|
11
|
+
itemsPerPage?: number;
|
|
12
|
+
/** Controlled current page (1-indexed). Omit and use defaultPage for uncontrolled usage. */
|
|
13
|
+
page?: number;
|
|
14
|
+
defaultPage?: number;
|
|
15
|
+
siblingCount?: number;
|
|
16
|
+
showEdges?: boolean;
|
|
17
|
+
/** Adds jump-to-first/jump-to-last buttons alongside the always-present Prev/Next. */
|
|
18
|
+
showFirstLast?: boolean;
|
|
19
|
+
/** Set `false` to hide Previous/Next entirely, for a bare page-number-only strip. */
|
|
20
|
+
showControls?: boolean;
|
|
21
|
+
/** Maps a page number to a route/href, rendering every control as a real link (progressive enhancement - clicking still drives the page change through Reka's own handling, same as a plain button). */
|
|
22
|
+
to?: (page: number) => string;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
size?: PaginationVariants['size'];
|
|
25
|
+
/** Inactive controls (First/Prev/Next/Last and non-current page numbers). */
|
|
26
|
+
color?: ButtonVariants['color'];
|
|
27
|
+
variant?: ButtonVariants['variant'];
|
|
28
|
+
/** The current page's own button. */
|
|
29
|
+
activeColor?: ButtonVariants['color'];
|
|
30
|
+
activeVariant?: ButtonVariants['variant'];
|
|
31
|
+
ui?: UiProp<PaginationThemeSlots>;
|
|
32
|
+
}
|
|
33
|
+
export interface PaginationEmits {
|
|
34
|
+
'update:page': [value: number];
|
|
35
|
+
}
|
|
36
|
+
declare const __VLS_export: import("vue").DefineComponent<PaginationProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
37
|
+
"update:page": (value: number) => any;
|
|
38
|
+
}, string, import("vue").PublicProps, Readonly<PaginationProps> & Readonly<{
|
|
39
|
+
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
40
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
41
|
+
declare const _default: typeof __VLS_export;
|
|
42
|
+
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { PinInputThemeSlots } from '../theme/pin-input.js';
|
|
3
|
+
import type { UiProp } from '../utils/ui.js';
|
|
4
|
+
import { pinInputTheme } from '../theme/pin-input.js';
|
|
5
|
+
type PinInputVariants = VariantProps<typeof pinInputTheme>;
|
|
6
|
+
export interface PinInputProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
modelValue?: (string | number)[];
|
|
9
|
+
defaultValue?: (string | number)[];
|
|
10
|
+
/** Number of boxes. @default 5 */
|
|
11
|
+
length?: number;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
/** Password-style dot masking. */
|
|
14
|
+
mask?: boolean;
|
|
15
|
+
/** Sets autocomplete="one-time-code" for SMS autofill, and auto-focuses the first empty box. */
|
|
16
|
+
otp?: boolean;
|
|
17
|
+
/** 'number' enables the mobile numeric keypad but loses leading zeros - values are stored as real numbers, not strings ("007" becomes 7). @default 'text' */
|
|
18
|
+
type?: 'text' | 'number';
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
invalid?: boolean;
|
|
21
|
+
size?: PinInputVariants['size'];
|
|
22
|
+
color?: PinInputVariants['color'];
|
|
23
|
+
name?: string;
|
|
24
|
+
required?: boolean;
|
|
25
|
+
ui?: UiProp<PinInputThemeSlots>;
|
|
26
|
+
}
|
|
27
|
+
export interface PinInputEmits {
|
|
28
|
+
'update:modelValue': [value: (string | number)[]];
|
|
29
|
+
/** Fires once, when every box has a value. */
|
|
30
|
+
'complete': [value: (string | number)[]];
|
|
31
|
+
}
|
|
32
|
+
declare const __VLS_export: import("vue").DefineComponent<PinInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
|
+
"update:modelValue": (value: (string | number)[]) => any;
|
|
34
|
+
complete: (value: (string | number)[]) => any;
|
|
35
|
+
}, string, import("vue").PublicProps, Readonly<PinInputProps> & Readonly<{
|
|
36
|
+
"onUpdate:modelValue"?: ((value: (string | number)[]) => any) | undefined;
|
|
37
|
+
onComplete?: ((value: (string | number)[]) => any) | undefined;
|
|
38
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
declare const _default: typeof __VLS_export;
|
|
40
|
+
export default _default;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { PinInputInput, PinInputRoot } from "reka-ui";
|
|
3
|
+
import { computed } from "vue";
|
|
4
|
+
import { useFormField } from "../composables/use-form-field";
|
|
5
|
+
import { pinInputTheme } from "../theme/pin-input";
|
|
6
|
+
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
7
|
+
defineOptions({ inheritAttrs: false });
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
id: { type: String, required: false },
|
|
10
|
+
modelValue: { type: Array, required: false },
|
|
11
|
+
defaultValue: { type: Array, required: false },
|
|
12
|
+
length: { type: Number, required: false },
|
|
13
|
+
placeholder: { type: String, required: false },
|
|
14
|
+
mask: { type: Boolean, required: false },
|
|
15
|
+
otp: { type: Boolean, required: false },
|
|
16
|
+
type: { type: String, required: false, default: "text" },
|
|
17
|
+
disabled: { type: Boolean, required: false },
|
|
18
|
+
invalid: { type: Boolean, required: false },
|
|
19
|
+
size: { type: null, required: false },
|
|
20
|
+
color: { type: null, required: false },
|
|
21
|
+
name: { type: String, required: false },
|
|
22
|
+
required: { type: Boolean, required: false },
|
|
23
|
+
ui: { type: Object, required: false }
|
|
24
|
+
});
|
|
25
|
+
const emit = defineEmits(["update:modelValue", "complete"]);
|
|
26
|
+
const field = useFormField();
|
|
27
|
+
const pinInputId = computed(() => props.id ?? field?.id);
|
|
28
|
+
const pinInputInvalid = computed(() => props.invalid || (field?.invalid.value ?? false));
|
|
29
|
+
const effectiveSize = computed(() => props.size ?? field?.size ?? "md");
|
|
30
|
+
const describedBy = computed(() => field?.describedBy.value);
|
|
31
|
+
const theme = useComponentTheme("pinInput", pinInputTheme);
|
|
32
|
+
const ui = computed(() => theme.value({
|
|
33
|
+
size: effectiveSize.value,
|
|
34
|
+
color: props.color,
|
|
35
|
+
invalid: pinInputInvalid.value
|
|
36
|
+
}));
|
|
37
|
+
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
38
|
+
const inputProps = computed(() => resolveSlot(ui.value.input, props.ui?.input));
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<PinInputRoot
|
|
43
|
+
:id="pinInputId"
|
|
44
|
+
:model-value="modelValue"
|
|
45
|
+
:default-value="defaultValue"
|
|
46
|
+
:placeholder="placeholder"
|
|
47
|
+
:mask="mask"
|
|
48
|
+
:otp="otp"
|
|
49
|
+
:type="type"
|
|
50
|
+
:disabled="disabled"
|
|
51
|
+
:name="name ?? field?.name"
|
|
52
|
+
:required="required"
|
|
53
|
+
:aria-invalid="pinInputInvalid || void 0"
|
|
54
|
+
:aria-describedby="describedBy"
|
|
55
|
+
v-bind="rootProps"
|
|
56
|
+
@update:model-value="(value) => emit('update:modelValue', value)"
|
|
57
|
+
@complete="(value) => emit('complete', value)"
|
|
58
|
+
>
|
|
59
|
+
<PinInputInput
|
|
60
|
+
v-for="i in length ?? 5"
|
|
61
|
+
:key="i"
|
|
62
|
+
:index="i - 1"
|
|
63
|
+
v-bind="inputProps"
|
|
64
|
+
/>
|
|
65
|
+
</PinInputRoot>
|
|
66
|
+
</template>
|