@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,24 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { KbdThemeSlots } from '../theme/kbd.js';
|
|
3
|
+
import type { UiProp } from '../utils/ui.js';
|
|
4
|
+
import { kbdTheme } from '../theme/kbd.js';
|
|
5
|
+
type KbdVariants = VariantProps<typeof kbdTheme>;
|
|
6
|
+
export interface KbdProps {
|
|
7
|
+
/** A key name resolved via a small built-in symbol map (`meta` -> ⌘, `up` -> ↑, ...) - falls back to the raw string itself when there's no match. Omit in favor of the default slot for anything more custom. */
|
|
8
|
+
value?: string;
|
|
9
|
+
size?: KbdVariants['size'];
|
|
10
|
+
ui?: UiProp<KbdThemeSlots>;
|
|
11
|
+
}
|
|
12
|
+
declare var __VLS_1: {};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
default?: (props: typeof __VLS_1) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<KbdProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KbdProps> & 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,72 @@
|
|
|
1
|
+
import type { ModalThemeSlots } from '../theme/modal.js';
|
|
2
|
+
import type { UiProp } from '../utils/ui.js';
|
|
3
|
+
export interface ModalProps {
|
|
4
|
+
open?: boolean;
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
/** Full-viewport layout instead of the default centered card. Still the initial state when `maximizable` is set - the toggle button takes over from there, optionally controllable via `v-model:fullscreen`. */
|
|
8
|
+
fullscreen?: boolean;
|
|
9
|
+
/** Shows a header button that toggles `fullscreen` at runtime, matching a comparable reference's own dialog maximize toggle - distinct from `fullscreen` alone, which only sets the initial/fixed layout with no way for the user to change it. */
|
|
10
|
+
maximizable?: boolean;
|
|
11
|
+
/** When `false`, Escape and an outside click (or, for a non-modal dialog, an outside element merely receiving focus) no longer close the dialog - the `escapeKeyDown`/`pointerDownOutside`/`focusOutside` events still fire, so a consumer can still react (e.g. a shake animation), but none of them close it on their own anymore. */
|
|
12
|
+
dismissible?: boolean;
|
|
13
|
+
/** Set `false` to render no close button at all - usually paired with `dismissible={false}` for a dialog that only closes via an explicit footer action. */
|
|
14
|
+
close?: boolean;
|
|
15
|
+
/** Forwarded to Reka UI's own DialogRoot `modal` prop - set `false` for a non-modal dialog that doesn't block interaction with the rest of the page (no focus trap, outside elements stay reachable). `overlay` below is independent of this - a non-modal dialog can still show a backdrop, and a modal one can hide it. */
|
|
16
|
+
modal?: boolean;
|
|
17
|
+
/** Set `false` to render no backdrop behind the dialog at all. */
|
|
18
|
+
overlay?: boolean;
|
|
19
|
+
/** Set `false` to skip the open/close animation entirely - this library's animation is CSS-only, so this just omits those classes rather than toggling a JS transition system. */
|
|
20
|
+
transition?: boolean;
|
|
21
|
+
/** When `false`, opening the dialog never moves keyboard focus into it - for a trigger that's meant to stay focused and interactive the whole time the dialog is open (e.g. a search input whose own typing keeps filtering the dialog's contents), rather than a one-off tap/click that hands off to the dialog's own content. Defaults to `true`, matching Reka's own out-of-the-box behavior. */
|
|
22
|
+
autoFocus?: boolean;
|
|
23
|
+
ui?: UiProp<ModalThemeSlots>;
|
|
24
|
+
}
|
|
25
|
+
export interface ModalEmits {
|
|
26
|
+
'update:open': [value: boolean];
|
|
27
|
+
'update:fullscreen': [value: boolean];
|
|
28
|
+
'escapeKeyDown': [event: KeyboardEvent];
|
|
29
|
+
'pointerDownOutside': [event: Event];
|
|
30
|
+
'focusOutside': [event: Event];
|
|
31
|
+
/** Fires once the close transition has actually finished (or immediately, if `transition` is off) - the signal a programmatic caller needs before it's safe to unmount this instance without cutting its exit animation short. */
|
|
32
|
+
'afterLeave': [];
|
|
33
|
+
}
|
|
34
|
+
declare var __VLS_16: {}, __VLS_65: {}, __VLS_67: {}, __VLS_91: "minimize-icon" | "maximize-icon", __VLS_92: {}, __VLS_112: {}, __VLS_119: {}, __VLS_121: {};
|
|
35
|
+
type __VLS_Slots = {} & {
|
|
36
|
+
[K in NonNullable<typeof __VLS_91>]?: (props: typeof __VLS_92) => any;
|
|
37
|
+
} & {
|
|
38
|
+
default?: (props: typeof __VLS_16) => any;
|
|
39
|
+
} & {
|
|
40
|
+
content?: (props: typeof __VLS_65) => any;
|
|
41
|
+
} & {
|
|
42
|
+
header?: (props: typeof __VLS_67) => any;
|
|
43
|
+
} & {
|
|
44
|
+
'close-icon'?: (props: typeof __VLS_112) => any;
|
|
45
|
+
} & {
|
|
46
|
+
body?: (props: typeof __VLS_119) => any;
|
|
47
|
+
} & {
|
|
48
|
+
footer?: (props: typeof __VLS_121) => any;
|
|
49
|
+
};
|
|
50
|
+
declare const __VLS_base: import("vue").DefineComponent<ModalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
51
|
+
"update:open": (value: boolean) => any;
|
|
52
|
+
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
53
|
+
pointerDownOutside: (event: Event) => any;
|
|
54
|
+
afterLeave: () => any;
|
|
55
|
+
focusOutside: (event: Event) => any;
|
|
56
|
+
"update:fullscreen": (value: boolean) => any;
|
|
57
|
+
}, string, import("vue").PublicProps, Readonly<ModalProps> & Readonly<{
|
|
58
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
59
|
+
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
60
|
+
onPointerDownOutside?: ((event: Event) => any) | undefined;
|
|
61
|
+
onAfterLeave?: (() => any) | undefined;
|
|
62
|
+
onFocusOutside?: ((event: Event) => any) | undefined;
|
|
63
|
+
"onUpdate:fullscreen"?: ((value: boolean) => any) | undefined;
|
|
64
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
65
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
66
|
+
declare const _default: typeof __VLS_export;
|
|
67
|
+
export default _default;
|
|
68
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
69
|
+
new (): {
|
|
70
|
+
$slots: S;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogRoot, DialogTitle, DialogTrigger, VisuallyHidden } from "reka-ui";
|
|
3
|
+
import { computed, ref, useSlots, watch, watchEffect } from "vue";
|
|
4
|
+
import { useIcons } from "../composables/use-icons";
|
|
5
|
+
import { useMessages } from "../composables/use-messages";
|
|
6
|
+
import { modalTheme } from "../theme/modal";
|
|
7
|
+
import { resolveSlot, useComponentTheme } from "../utils/ui";
|
|
8
|
+
import Button from "./Button.vue";
|
|
9
|
+
import Icon from "./Icon.vue";
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
open: { type: Boolean, required: false },
|
|
12
|
+
title: { type: String, required: false },
|
|
13
|
+
description: { type: String, required: false },
|
|
14
|
+
fullscreen: { type: Boolean, required: false },
|
|
15
|
+
maximizable: { type: Boolean, required: false },
|
|
16
|
+
dismissible: { type: Boolean, required: false, default: true },
|
|
17
|
+
close: { type: Boolean, required: false, default: true },
|
|
18
|
+
modal: { type: Boolean, required: false, default: true },
|
|
19
|
+
overlay: { type: Boolean, required: false, default: true },
|
|
20
|
+
transition: { type: Boolean, required: false, default: true },
|
|
21
|
+
autoFocus: { type: Boolean, required: false, default: true },
|
|
22
|
+
ui: { type: Object, required: false }
|
|
23
|
+
});
|
|
24
|
+
const emit = defineEmits(["update:open", "update:fullscreen", "escapeKeyDown", "pointerDownOutside", "focusOutside", "afterLeave"]);
|
|
25
|
+
function onEscapeKeyDown(event) {
|
|
26
|
+
if (!props.dismissible)
|
|
27
|
+
event.preventDefault();
|
|
28
|
+
emit("escapeKeyDown", event);
|
|
29
|
+
}
|
|
30
|
+
function onPointerDownOutside(event) {
|
|
31
|
+
if (!props.dismissible)
|
|
32
|
+
event.preventDefault();
|
|
33
|
+
emit("pointerDownOutside", event);
|
|
34
|
+
}
|
|
35
|
+
function onFocusOutside(event) {
|
|
36
|
+
if (!props.dismissible)
|
|
37
|
+
event.preventDefault();
|
|
38
|
+
emit("focusOutside", event);
|
|
39
|
+
}
|
|
40
|
+
function onOpenAutoFocus(event) {
|
|
41
|
+
if (!props.autoFocus)
|
|
42
|
+
event.preventDefault();
|
|
43
|
+
}
|
|
44
|
+
function onContentAnimationEnd(event) {
|
|
45
|
+
if (event.target !== event.currentTarget)
|
|
46
|
+
return;
|
|
47
|
+
if (event.target.getAttribute("data-state") === "closed")
|
|
48
|
+
emit("afterLeave");
|
|
49
|
+
}
|
|
50
|
+
const internalOpen = ref(props.open ?? false);
|
|
51
|
+
watch(() => props.open, (value) => {
|
|
52
|
+
if (value !== void 0)
|
|
53
|
+
internalOpen.value = value;
|
|
54
|
+
});
|
|
55
|
+
function onUpdateOpen(value) {
|
|
56
|
+
internalOpen.value = value;
|
|
57
|
+
emit("update:open", value);
|
|
58
|
+
}
|
|
59
|
+
watch(internalOpen, (value) => {
|
|
60
|
+
if (!value && !props.transition)
|
|
61
|
+
emit("afterLeave");
|
|
62
|
+
});
|
|
63
|
+
const internalFullscreen = ref(props.fullscreen ?? false);
|
|
64
|
+
watch(() => props.fullscreen, (value) => {
|
|
65
|
+
if (value !== void 0)
|
|
66
|
+
internalFullscreen.value = value;
|
|
67
|
+
});
|
|
68
|
+
function toggleFullscreen() {
|
|
69
|
+
internalFullscreen.value = !internalFullscreen.value;
|
|
70
|
+
emit("update:fullscreen", internalFullscreen.value);
|
|
71
|
+
}
|
|
72
|
+
const slots = useSlots();
|
|
73
|
+
if (import.meta.dev) {
|
|
74
|
+
watchEffect(() => {
|
|
75
|
+
if (!props.title && !slots.header && !slots.content)
|
|
76
|
+
console.warn("[SModal] no accessible name - pass a `title` prop, or a `header`/`content` slot containing a heading, so screen readers can announce this dialog.");
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
const icons = useIcons();
|
|
80
|
+
const messages = useMessages();
|
|
81
|
+
const theme = useComponentTheme("modal", modalTheme);
|
|
82
|
+
const ui = computed(() => theme.value({ fullscreen: internalFullscreen.value, transition: props.transition }));
|
|
83
|
+
const overlayProps = computed(() => resolveSlot(ui.value.overlay, props.ui?.overlay));
|
|
84
|
+
const contentProps = computed(() => resolveSlot(ui.value.content, props.ui?.content));
|
|
85
|
+
const headerProps = computed(() => resolveSlot(ui.value.header, props.ui?.header));
|
|
86
|
+
const headerActionsProps = computed(() => resolveSlot(ui.value.headerActions, props.ui?.headerActions));
|
|
87
|
+
const titleProps = computed(() => resolveSlot(ui.value.title, props.ui?.title));
|
|
88
|
+
const descriptionProps = computed(() => resolveSlot(ui.value.description, props.ui?.description));
|
|
89
|
+
const closeProps = computed(() => resolveSlot(ui.value.close, props.ui?.close));
|
|
90
|
+
const maximizeProps = computed(() => resolveSlot(ui.value.maximize, props.ui?.maximize));
|
|
91
|
+
const bodyProps = computed(() => resolveSlot(ui.value.body, props.ui?.body));
|
|
92
|
+
const footerProps = computed(() => resolveSlot(ui.value.footer, props.ui?.footer));
|
|
93
|
+
</script>
|
|
94
|
+
|
|
95
|
+
<template>
|
|
96
|
+
<DialogRoot :open="internalOpen" :modal="modal" @update:open="onUpdateOpen">
|
|
97
|
+
<DialogTrigger v-if="$slots.default" as-child>
|
|
98
|
+
<slot />
|
|
99
|
+
</DialogTrigger>
|
|
100
|
+
<DialogPortal>
|
|
101
|
+
<DialogOverlay v-if="overlay" v-bind="overlayProps" />
|
|
102
|
+
<DialogContent
|
|
103
|
+
v-bind="contentProps"
|
|
104
|
+
@escape-key-down="onEscapeKeyDown"
|
|
105
|
+
@pointer-down-outside="onPointerDownOutside"
|
|
106
|
+
@focus-outside="onFocusOutside"
|
|
107
|
+
@animationend="onContentAnimationEnd"
|
|
108
|
+
@open-auto-focus="onOpenAutoFocus"
|
|
109
|
+
>
|
|
110
|
+
<template v-if="$slots.content">
|
|
111
|
+
<!-- The content slot replaces our own header entirely, so a
|
|
112
|
+
consumer's `title`/`description` would otherwise go nowhere -
|
|
113
|
+
keep registering them with Reka (satisfies its own a11y
|
|
114
|
+
warning and gives screen readers a name/description) without
|
|
115
|
+
showing a second, visible title the consumer's own content
|
|
116
|
+
didn't ask for. -->
|
|
117
|
+
<VisuallyHidden v-if="title" as-child>
|
|
118
|
+
<DialogTitle v-bind="titleProps">
|
|
119
|
+
{{ title }}
|
|
120
|
+
</DialogTitle>
|
|
121
|
+
</VisuallyHidden>
|
|
122
|
+
<VisuallyHidden v-if="description" as-child>
|
|
123
|
+
<DialogDescription v-bind="descriptionProps">
|
|
124
|
+
{{ description }}
|
|
125
|
+
</DialogDescription>
|
|
126
|
+
</VisuallyHidden>
|
|
127
|
+
<slot name="content" />
|
|
128
|
+
</template>
|
|
129
|
+
<template v-else>
|
|
130
|
+
<div v-if="title || description || $slots.header || close || maximizable" v-bind="headerProps">
|
|
131
|
+
<div>
|
|
132
|
+
<slot name="header">
|
|
133
|
+
<DialogTitle v-if="title" v-bind="titleProps">
|
|
134
|
+
{{ title }}
|
|
135
|
+
</DialogTitle>
|
|
136
|
+
<DialogDescription v-if="description" v-bind="descriptionProps">
|
|
137
|
+
{{ description }}
|
|
138
|
+
</DialogDescription>
|
|
139
|
+
</slot>
|
|
140
|
+
</div>
|
|
141
|
+
<div v-bind="headerActionsProps">
|
|
142
|
+
<Button
|
|
143
|
+
v-if="maximizable"
|
|
144
|
+
size="sm"
|
|
145
|
+
variant="ghost"
|
|
146
|
+
color="neutral"
|
|
147
|
+
:aria-label="internalFullscreen ? messages.minimize : messages.maximize"
|
|
148
|
+
v-bind="maximizeProps"
|
|
149
|
+
@click="toggleFullscreen"
|
|
150
|
+
>
|
|
151
|
+
<template #icon="{ class: iconClass }">
|
|
152
|
+
<slot :name="internalFullscreen ? 'minimize-icon' : 'maximize-icon'">
|
|
153
|
+
<Icon :name="internalFullscreen ? icons.minimize : icons.maximize" :class="iconClass" />
|
|
154
|
+
</slot>
|
|
155
|
+
</template>
|
|
156
|
+
</Button>
|
|
157
|
+
<DialogClose v-if="close" as-child>
|
|
158
|
+
<Button size="sm" variant="ghost" color="neutral" :aria-label="messages.close" v-bind="closeProps">
|
|
159
|
+
<template #icon="{ class: iconClass }">
|
|
160
|
+
<slot name="close-icon">
|
|
161
|
+
<Icon :name="icons.close" :class="iconClass" />
|
|
162
|
+
</slot>
|
|
163
|
+
</template>
|
|
164
|
+
</Button>
|
|
165
|
+
</DialogClose>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
<div v-bind="bodyProps">
|
|
169
|
+
<slot name="body" />
|
|
170
|
+
</div>
|
|
171
|
+
<div v-if="$slots.footer" v-bind="footerProps">
|
|
172
|
+
<slot name="footer" />
|
|
173
|
+
</div>
|
|
174
|
+
</template>
|
|
175
|
+
</DialogContent>
|
|
176
|
+
</DialogPortal>
|
|
177
|
+
</DialogRoot>
|
|
178
|
+
</template>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { ModalThemeSlots } from '../theme/modal.js';
|
|
2
|
+
import type { UiProp } from '../utils/ui.js';
|
|
3
|
+
export interface ModalProps {
|
|
4
|
+
open?: boolean;
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
/** Full-viewport layout instead of the default centered card. Still the initial state when `maximizable` is set - the toggle button takes over from there, optionally controllable via `v-model:fullscreen`. */
|
|
8
|
+
fullscreen?: boolean;
|
|
9
|
+
/** Shows a header button that toggles `fullscreen` at runtime, matching a comparable reference's own dialog maximize toggle - distinct from `fullscreen` alone, which only sets the initial/fixed layout with no way for the user to change it. */
|
|
10
|
+
maximizable?: boolean;
|
|
11
|
+
/** When `false`, Escape and an outside click (or, for a non-modal dialog, an outside element merely receiving focus) no longer close the dialog - the `escapeKeyDown`/`pointerDownOutside`/`focusOutside` events still fire, so a consumer can still react (e.g. a shake animation), but none of them close it on their own anymore. */
|
|
12
|
+
dismissible?: boolean;
|
|
13
|
+
/** Set `false` to render no close button at all - usually paired with `dismissible={false}` for a dialog that only closes via an explicit footer action. */
|
|
14
|
+
close?: boolean;
|
|
15
|
+
/** Forwarded to Reka UI's own DialogRoot `modal` prop - set `false` for a non-modal dialog that doesn't block interaction with the rest of the page (no focus trap, outside elements stay reachable). `overlay` below is independent of this - a non-modal dialog can still show a backdrop, and a modal one can hide it. */
|
|
16
|
+
modal?: boolean;
|
|
17
|
+
/** Set `false` to render no backdrop behind the dialog at all. */
|
|
18
|
+
overlay?: boolean;
|
|
19
|
+
/** Set `false` to skip the open/close animation entirely - this library's animation is CSS-only, so this just omits those classes rather than toggling a JS transition system. */
|
|
20
|
+
transition?: boolean;
|
|
21
|
+
/** When `false`, opening the dialog never moves keyboard focus into it - for a trigger that's meant to stay focused and interactive the whole time the dialog is open (e.g. a search input whose own typing keeps filtering the dialog's contents), rather than a one-off tap/click that hands off to the dialog's own content. Defaults to `true`, matching Reka's own out-of-the-box behavior. */
|
|
22
|
+
autoFocus?: boolean;
|
|
23
|
+
ui?: UiProp<ModalThemeSlots>;
|
|
24
|
+
}
|
|
25
|
+
export interface ModalEmits {
|
|
26
|
+
'update:open': [value: boolean];
|
|
27
|
+
'update:fullscreen': [value: boolean];
|
|
28
|
+
'escapeKeyDown': [event: KeyboardEvent];
|
|
29
|
+
'pointerDownOutside': [event: Event];
|
|
30
|
+
'focusOutside': [event: Event];
|
|
31
|
+
/** Fires once the close transition has actually finished (or immediately, if `transition` is off) - the signal a programmatic caller needs before it's safe to unmount this instance without cutting its exit animation short. */
|
|
32
|
+
'afterLeave': [];
|
|
33
|
+
}
|
|
34
|
+
declare var __VLS_16: {}, __VLS_65: {}, __VLS_67: {}, __VLS_91: "minimize-icon" | "maximize-icon", __VLS_92: {}, __VLS_112: {}, __VLS_119: {}, __VLS_121: {};
|
|
35
|
+
type __VLS_Slots = {} & {
|
|
36
|
+
[K in NonNullable<typeof __VLS_91>]?: (props: typeof __VLS_92) => any;
|
|
37
|
+
} & {
|
|
38
|
+
default?: (props: typeof __VLS_16) => any;
|
|
39
|
+
} & {
|
|
40
|
+
content?: (props: typeof __VLS_65) => any;
|
|
41
|
+
} & {
|
|
42
|
+
header?: (props: typeof __VLS_67) => any;
|
|
43
|
+
} & {
|
|
44
|
+
'close-icon'?: (props: typeof __VLS_112) => any;
|
|
45
|
+
} & {
|
|
46
|
+
body?: (props: typeof __VLS_119) => any;
|
|
47
|
+
} & {
|
|
48
|
+
footer?: (props: typeof __VLS_121) => any;
|
|
49
|
+
};
|
|
50
|
+
declare const __VLS_base: import("vue").DefineComponent<ModalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
51
|
+
"update:open": (value: boolean) => any;
|
|
52
|
+
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
53
|
+
pointerDownOutside: (event: Event) => any;
|
|
54
|
+
afterLeave: () => any;
|
|
55
|
+
focusOutside: (event: Event) => any;
|
|
56
|
+
"update:fullscreen": (value: boolean) => any;
|
|
57
|
+
}, string, import("vue").PublicProps, Readonly<ModalProps> & Readonly<{
|
|
58
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
59
|
+
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
60
|
+
onPointerDownOutside?: ((event: Event) => any) | undefined;
|
|
61
|
+
onAfterLeave?: (() => any) | undefined;
|
|
62
|
+
onFocusOutside?: ((event: Event) => any) | undefined;
|
|
63
|
+
"onUpdate:fullscreen"?: ((value: boolean) => any) | undefined;
|
|
64
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
65
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
66
|
+
declare const _default: typeof __VLS_export;
|
|
67
|
+
export default _default;
|
|
68
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
69
|
+
new (): {
|
|
70
|
+
$slots: S;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useModal } from "../composables/use-modal";
|
|
3
|
+
import Modal from "./Modal.vue";
|
|
4
|
+
const { modals, close, remove } = useModal();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<Modal
|
|
9
|
+
v-for="instance in modals"
|
|
10
|
+
:key="instance.id"
|
|
11
|
+
:open="instance.isOpen"
|
|
12
|
+
:title="instance.title"
|
|
13
|
+
:description="instance.description"
|
|
14
|
+
:dismissible="instance.dismissible"
|
|
15
|
+
:modal="instance.modal"
|
|
16
|
+
:overlay="instance.overlay"
|
|
17
|
+
:transition="instance.transition"
|
|
18
|
+
@update:open="(open) => !open && close(instance.id)"
|
|
19
|
+
@after-leave="remove(instance.id)"
|
|
20
|
+
>
|
|
21
|
+
<template #content>
|
|
22
|
+
<component :is="instance.component" v-bind="instance.props" @close="(value) => close(instance.id, value)" />
|
|
23
|
+
</template>
|
|
24
|
+
</Modal>
|
|
25
|
+
</template>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,108 @@
|
|
|
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 NavigationMenuProps {
|
|
8
|
+
items: NavigationMenuItem[];
|
|
9
|
+
/** Horizontal uses Reka's real shared-viewport flyout for a single level of dropdown children. Vertical falls back to a recursive accordion (see NavigationMenuAccordionItem.vue) for arbitrary depth - Reka's own NavigationMenuContent isn't built for deep nested trees. */
|
|
10
|
+
orientation?: 'horizontal' | 'vertical';
|
|
11
|
+
color?: ButtonVariants['color'];
|
|
12
|
+
variant?: 'pill' | 'link';
|
|
13
|
+
/** Draws a bar/underline next to the active item, in addition to its own color styling. */
|
|
14
|
+
highlight?: boolean;
|
|
15
|
+
/** Icon-only rail mode (vertical only) - labels stay in the DOM for assistive tech (`sr-only`, not removed) but visually collapse to just each item's own leading icon. A parent with children renders as a themed Popover trigger instead of an expandable accordion row - no room for a nested list in an icon rail, so its children surface in a flyout next to the icon instead (the common "collapsed sidebar" pattern - VSCode's activity bar, Linear, Notion). */
|
|
16
|
+
collapsed?: boolean;
|
|
17
|
+
ui?: UiProp<NavigationMenuThemeSlots>;
|
|
18
|
+
}
|
|
19
|
+
declare var __VLS_8: {}, __VLS_17: string, __VLS_18: {
|
|
20
|
+
item: NavigationMenuItem;
|
|
21
|
+
active: boolean;
|
|
22
|
+
}, __VLS_34: string, __VLS_35: any, __VLS_47: string, __VLS_48: {
|
|
23
|
+
item: NavigationMenuItem;
|
|
24
|
+
}, __VLS_57: string, __VLS_58: {
|
|
25
|
+
item: NavigationMenuItem;
|
|
26
|
+
active: boolean;
|
|
27
|
+
}, __VLS_61: string, __VLS_62: {
|
|
28
|
+
item: NavigationMenuItem;
|
|
29
|
+
active: boolean;
|
|
30
|
+
}, __VLS_70: string, __VLS_71: {
|
|
31
|
+
item: NavigationMenuItem;
|
|
32
|
+
active: boolean;
|
|
33
|
+
}, __VLS_74: string, __VLS_75: {
|
|
34
|
+
item: NavigationMenuItem;
|
|
35
|
+
active: boolean;
|
|
36
|
+
}, __VLS_89: string, __VLS_90: {
|
|
37
|
+
item: NavigationMenuItem;
|
|
38
|
+
}, __VLS_107: string, __VLS_108: {
|
|
39
|
+
item: NavigationMenuItem;
|
|
40
|
+
active: boolean;
|
|
41
|
+
}, __VLS_111: string, __VLS_112: {
|
|
42
|
+
item: NavigationMenuItem;
|
|
43
|
+
active: boolean;
|
|
44
|
+
}, __VLS_120: string, __VLS_121: {
|
|
45
|
+
item: NavigationMenuItem;
|
|
46
|
+
active: boolean;
|
|
47
|
+
}, __VLS_124: string, __VLS_125: {
|
|
48
|
+
item: NavigationMenuItem;
|
|
49
|
+
active: boolean;
|
|
50
|
+
}, __VLS_142: string, __VLS_143: {
|
|
51
|
+
item: NavigationMenuItem;
|
|
52
|
+
active: boolean;
|
|
53
|
+
}, __VLS_146: string, __VLS_147: {
|
|
54
|
+
item: NavigationMenuItem;
|
|
55
|
+
active: boolean;
|
|
56
|
+
}, __VLS_155: string, __VLS_156: {
|
|
57
|
+
item: NavigationMenuItem;
|
|
58
|
+
active: boolean;
|
|
59
|
+
}, __VLS_159: string, __VLS_160: {
|
|
60
|
+
item: NavigationMenuItem;
|
|
61
|
+
active: boolean;
|
|
62
|
+
}, __VLS_162: {};
|
|
63
|
+
type __VLS_Slots = {} & {
|
|
64
|
+
[K in NonNullable<typeof __VLS_17>]?: (props: typeof __VLS_18) => any;
|
|
65
|
+
} & {
|
|
66
|
+
[K in NonNullable<typeof __VLS_34>]?: (props: typeof __VLS_35) => any;
|
|
67
|
+
} & {
|
|
68
|
+
[K in NonNullable<typeof __VLS_47>]?: (props: typeof __VLS_48) => any;
|
|
69
|
+
} & {
|
|
70
|
+
[K in NonNullable<typeof __VLS_57>]?: (props: typeof __VLS_58) => any;
|
|
71
|
+
} & {
|
|
72
|
+
[K in NonNullable<typeof __VLS_61>]?: (props: typeof __VLS_62) => any;
|
|
73
|
+
} & {
|
|
74
|
+
[K in NonNullable<typeof __VLS_70>]?: (props: typeof __VLS_71) => any;
|
|
75
|
+
} & {
|
|
76
|
+
[K in NonNullable<typeof __VLS_74>]?: (props: typeof __VLS_75) => any;
|
|
77
|
+
} & {
|
|
78
|
+
[K in NonNullable<typeof __VLS_89>]?: (props: typeof __VLS_90) => any;
|
|
79
|
+
} & {
|
|
80
|
+
[K in NonNullable<typeof __VLS_107>]?: (props: typeof __VLS_108) => any;
|
|
81
|
+
} & {
|
|
82
|
+
[K in NonNullable<typeof __VLS_111>]?: (props: typeof __VLS_112) => any;
|
|
83
|
+
} & {
|
|
84
|
+
[K in NonNullable<typeof __VLS_120>]?: (props: typeof __VLS_121) => any;
|
|
85
|
+
} & {
|
|
86
|
+
[K in NonNullable<typeof __VLS_124>]?: (props: typeof __VLS_125) => any;
|
|
87
|
+
} & {
|
|
88
|
+
[K in NonNullable<typeof __VLS_142>]?: (props: typeof __VLS_143) => any;
|
|
89
|
+
} & {
|
|
90
|
+
[K in NonNullable<typeof __VLS_146>]?: (props: typeof __VLS_147) => any;
|
|
91
|
+
} & {
|
|
92
|
+
[K in NonNullable<typeof __VLS_155>]?: (props: typeof __VLS_156) => any;
|
|
93
|
+
} & {
|
|
94
|
+
[K in NonNullable<typeof __VLS_159>]?: (props: typeof __VLS_160) => any;
|
|
95
|
+
} & {
|
|
96
|
+
'list-leading'?: (props: typeof __VLS_8) => any;
|
|
97
|
+
} & {
|
|
98
|
+
'list-trailing'?: (props: typeof __VLS_162) => any;
|
|
99
|
+
};
|
|
100
|
+
declare const __VLS_base: import("vue").DefineComponent<NavigationMenuProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NavigationMenuProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
101
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
102
|
+
declare const _default: typeof __VLS_export;
|
|
103
|
+
export default _default;
|
|
104
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
105
|
+
new (): {
|
|
106
|
+
$slots: S;
|
|
107
|
+
};
|
|
108
|
+
};
|