@eslamdevui/ui 3.2.0-beta.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/.nuxt/ui/accordion.ts +20 -0
- package/.nuxt/ui/alert.ts +264 -0
- package/.nuxt/ui/avatar-group.ts +52 -0
- package/.nuxt/ui/avatar.ts +54 -0
- package/.nuxt/ui/badge.ts +263 -0
- package/.nuxt/ui/breadcrumb.ts +45 -0
- package/.nuxt/ui/button-group.ts +16 -0
- package/.nuxt/ui/button.ts +378 -0
- package/.nuxt/ui/calendar.ts +103 -0
- package/.nuxt/ui/card.ts +34 -0
- package/.nuxt/ui/carousel.ts +38 -0
- package/.nuxt/ui/chat-message.ts +129 -0
- package/.nuxt/ui/chat-messages.ts +14 -0
- package/.nuxt/ui/chat-prompt-submit.ts +5 -0
- package/.nuxt/ui/chat-prompt.ts +35 -0
- package/.nuxt/ui/checkbox-group.ts +204 -0
- package/.nuxt/ui/checkbox.ts +236 -0
- package/.nuxt/ui/chip.ts +96 -0
- package/.nuxt/ui/collapsible.ts +6 -0
- package/.nuxt/ui/color-picker.ts +47 -0
- package/.nuxt/ui/command-palette.ts +51 -0
- package/.nuxt/ui/container.ts +3 -0
- package/.nuxt/ui/content-navigation.ts +339 -0
- package/.nuxt/ui/content-search-button.ts +6 -0
- package/.nuxt/ui/content-search.ts +6 -0
- package/.nuxt/ui/content-surround.ts +34 -0
- package/.nuxt/ui/content-toc.ts +150 -0
- package/.nuxt/ui/context-menu.ts +217 -0
- package/.nuxt/ui/dashboard-group.ts +3 -0
- package/.nuxt/ui/dashboard-navbar.ts +21 -0
- package/.nuxt/ui/dashboard-panel.ts +17 -0
- package/.nuxt/ui/dashboard-resize-handle.ts +3 -0
- package/.nuxt/ui/dashboard-search-button.ts +6 -0
- package/.nuxt/ui/dashboard-search.ts +6 -0
- package/.nuxt/ui/dashboard-sidebar-collapse.ts +9 -0
- package/.nuxt/ui/dashboard-sidebar-toggle.ts +9 -0
- package/.nuxt/ui/dashboard-sidebar.ts +37 -0
- package/.nuxt/ui/drawer.ts +126 -0
- package/.nuxt/ui/dropdown-menu.ts +218 -0
- package/.nuxt/ui/form-field.ts +48 -0
- package/.nuxt/ui/form.ts +3 -0
- package/.nuxt/ui/index.ts +71 -0
- package/.nuxt/ui/input-menu.ts +450 -0
- package/.nuxt/ui/input-number.ts +245 -0
- package/.nuxt/ui/input-tags.ts +310 -0
- package/.nuxt/ui/input.ts +289 -0
- package/.nuxt/ui/kbd.ts +31 -0
- package/.nuxt/ui/link.ts +22 -0
- package/.nuxt/ui/modal.ts +29 -0
- package/.nuxt/ui/navigation-menu.ts +510 -0
- package/.nuxt/ui/pagination.ts +13 -0
- package/.nuxt/ui/pin-input.ts +171 -0
- package/.nuxt/ui/popover.ts +6 -0
- package/.nuxt/ui/progress.ts +297 -0
- package/.nuxt/ui/prose.ts +321 -0
- package/.nuxt/ui/radio-group.ts +350 -0
- package/.nuxt/ui/select-menu.ts +351 -0
- package/.nuxt/ui/select.ts +346 -0
- package/.nuxt/ui/separator.ts +172 -0
- package/.nuxt/ui/skeleton.ts +3 -0
- package/.nuxt/ui/slideover.ts +71 -0
- package/.nuxt/ui/slider.ts +171 -0
- package/.nuxt/ui/stepper.ts +202 -0
- package/.nuxt/ui/switch.ts +131 -0
- package/.nuxt/ui/table.ts +148 -0
- package/.nuxt/ui/tabs.ts +256 -0
- package/.nuxt/ui/textarea.ts +294 -0
- package/.nuxt/ui/timeline.ts +321 -0
- package/.nuxt/ui/toast.ts +81 -0
- package/.nuxt/ui/toaster.ts +91 -0
- package/.nuxt/ui/tooltip.ts +9 -0
- package/.nuxt/ui/tree.ts +154 -0
- package/.nuxt/ui.css +146 -0
- package/LICENSE.md +9 -0
- package/README.md +147 -0
- package/cli/commands/make/component.mjs +95 -0
- package/cli/commands/make/index.mjs +14 -0
- package/cli/commands/make/locale.mjs +64 -0
- package/cli/index.mjs +15 -0
- package/cli/package.json +13 -0
- package/cli/templates.mjs +228 -0
- package/cli/utils.mjs +31 -0
- package/dist/module.d.mts +63 -0
- package/dist/module.json +13 -0
- package/dist/module.mjs +135 -0
- package/dist/runtime/components/Accordion.vue +73 -0
- package/dist/runtime/components/Accordion.vue.d.ts +77 -0
- package/dist/runtime/components/Alert.vue +88 -0
- package/dist/runtime/components/Alert.vue.d.ts +81 -0
- package/dist/runtime/components/App.vue +44 -0
- package/dist/runtime/components/App.vue.d.ts +24 -0
- package/dist/runtime/components/Avatar.vue +83 -0
- package/dist/runtime/components/Avatar.vue.d.ts +41 -0
- package/dist/runtime/components/AvatarGroup.vue +65 -0
- package/dist/runtime/components/AvatarGroup.vue.d.ts +31 -0
- package/dist/runtime/components/Badge.vue +60 -0
- package/dist/runtime/components/Badge.vue.d.ts +43 -0
- package/dist/runtime/components/Breadcrumb.vue +65 -0
- package/dist/runtime/components/Breadcrumb.vue.d.ts +66 -0
- package/dist/runtime/components/Button.vue +147 -0
- package/dist/runtime/components/Button.vue.d.ts +48 -0
- package/dist/runtime/components/ButtonGroup.vue +31 -0
- package/dist/runtime/components/ButtonGroup.vue.d.ts +34 -0
- package/dist/runtime/components/Calendar.vue +154 -0
- package/dist/runtime/components/Calendar.vue.d.ts +111 -0
- package/dist/runtime/components/Card.vue +37 -0
- package/dist/runtime/components/Card.vue.d.ts +29 -0
- package/dist/runtime/components/Carousel.vue +210 -0
- package/dist/runtime/components/Carousel.vue.d.ts +127 -0
- package/dist/runtime/components/ChatMessage.vue +87 -0
- package/dist/runtime/components/ChatMessage.vue.d.ts +130 -0
- package/dist/runtime/components/ChatMessages.vue +225 -0
- package/dist/runtime/components/ChatMessages.vue.d.ts +83 -0
- package/dist/runtime/components/ChatPrompt.vue +77 -0
- package/dist/runtime/components/ChatPrompt.vue.d.ts +60 -0
- package/dist/runtime/components/ChatPromptSubmit.vue +74 -0
- package/dist/runtime/components/ChatPromptSubmit.vue.d.ts +99 -0
- package/dist/runtime/components/Checkbox.vue +90 -0
- package/dist/runtime/components/Checkbox.vue.d.ts +73 -0
- package/dist/runtime/components/CheckboxGroup.vue +124 -0
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +84 -0
- package/dist/runtime/components/Chip.vue +48 -0
- package/dist/runtime/components/Chip.vue.d.ts +57 -0
- package/dist/runtime/components/Collapsible.vue +37 -0
- package/dist/runtime/components/Collapsible.vue.d.ts +35 -0
- package/dist/runtime/components/ColorPicker.vue +216 -0
- package/dist/runtime/components/ColorPicker.vue.d.ts +48 -0
- package/dist/runtime/components/CommandPalette.vue +275 -0
- package/dist/runtime/components/CommandPalette.vue.d.ts +187 -0
- package/dist/runtime/components/Container.vue +23 -0
- package/dist/runtime/components/Container.vue.d.ts +18 -0
- package/dist/runtime/components/ContextMenu.vue +61 -0
- package/dist/runtime/components/ContextMenu.vue.d.ts +109 -0
- package/dist/runtime/components/ContextMenuContent.vue +164 -0
- package/dist/runtime/components/ContextMenuContent.vue.d.ts +49 -0
- package/dist/runtime/components/DashboardGroup.vue +46 -0
- package/dist/runtime/components/DashboardGroup.vue.d.ts +27 -0
- package/dist/runtime/components/DashboardNavbar.vue +74 -0
- package/dist/runtime/components/DashboardNavbar.vue.d.ts +53 -0
- package/dist/runtime/components/DashboardPanel.vue +56 -0
- package/dist/runtime/components/DashboardPanel.vue.d.ts +28 -0
- package/dist/runtime/components/DashboardResizeHandle.vue +32 -0
- package/dist/runtime/components/DashboardResizeHandle.vue.d.ts +22 -0
- package/dist/runtime/components/DashboardSearch.vue +124 -0
- package/dist/runtime/components/DashboardSearch.vue.d.ts +48 -0
- package/dist/runtime/components/DashboardSearchButton.vue +72 -0
- package/dist/runtime/components/DashboardSearchButton.vue.d.ts +52 -0
- package/dist/runtime/components/DashboardSidebar.vue +170 -0
- package/dist/runtime/components/DashboardSidebar.vue.d.ts +72 -0
- package/dist/runtime/components/DashboardSidebarCollapse.vue +46 -0
- package/dist/runtime/components/DashboardSidebarCollapse.vue.d.ts +15 -0
- package/dist/runtime/components/DashboardSidebarToggle.vue +43 -0
- package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +19 -0
- package/dist/runtime/components/Drawer.vue +112 -0
- package/dist/runtime/components/Drawer.vue.d.ts +78 -0
- package/dist/runtime/components/DropdownMenu.vue +68 -0
- package/dist/runtime/components/DropdownMenu.vue.d.ts +119 -0
- package/dist/runtime/components/DropdownMenuContent.vue +171 -0
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +52 -0
- package/dist/runtime/components/Form.vue +210 -0
- package/dist/runtime/components/Form.vue.d.ts +70 -0
- package/dist/runtime/components/FormField.vue +90 -0
- package/dist/runtime/components/FormField.vue.d.ts +61 -0
- package/dist/runtime/components/Icon.vue +19 -0
- package/dist/runtime/components/Icon.vue.d.ts +8 -0
- package/dist/runtime/components/Input.vue +147 -0
- package/dist/runtime/components/Input.vue.d.ts +77 -0
- package/dist/runtime/components/InputMenu.vue +373 -0
- package/dist/runtime/components/InputMenu.vue.d.ts +534 -0
- package/dist/runtime/components/InputNumber.vue +144 -0
- package/dist/runtime/components/InputNumber.vue.d.ts +260 -0
- package/dist/runtime/components/InputTags.vue +159 -0
- package/dist/runtime/components/InputTags.vue.d.ts +183 -0
- package/dist/runtime/components/Kbd.vue +30 -0
- package/dist/runtime/components/Kbd.vue.d.ts +34 -0
- package/dist/runtime/components/Link.vue +127 -0
- package/dist/runtime/components/Link.vue.d.ts +93 -0
- package/dist/runtime/components/LinkBase.vue +57 -0
- package/dist/runtime/components/LinkBase.vue.d.ts +25 -0
- package/dist/runtime/components/Modal.vue +130 -0
- package/dist/runtime/components/Modal.vue.d.ts +106 -0
- package/dist/runtime/components/NavigationMenu.vue +275 -0
- package/dist/runtime/components/NavigationMenu.vue.d.ts +170 -0
- package/dist/runtime/components/OverlayProvider.vue +25 -0
- package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -0
- package/dist/runtime/components/Pagination.vue +97 -0
- package/dist/runtime/components/Pagination.vue.d.ts +118 -0
- package/dist/runtime/components/PinInput.vue +94 -0
- package/dist/runtime/components/PinInput.vue.d.ts +60 -0
- package/dist/runtime/components/Popover.vue +73 -0
- package/dist/runtime/components/Popover.vue.d.ts +64 -0
- package/dist/runtime/components/Progress.vue +132 -0
- package/dist/runtime/components/Progress.vue.d.ts +66 -0
- package/dist/runtime/components/RadioGroup.vue +133 -0
- package/dist/runtime/components/RadioGroup.vue.d.ts +93 -0
- package/dist/runtime/components/Select.vue +225 -0
- package/dist/runtime/components/Select.vue.d.ts +253 -0
- package/dist/runtime/components/SelectMenu.vue +328 -0
- package/dist/runtime/components/SelectMenu.vue.d.ts +302 -0
- package/dist/runtime/components/Separator.vue +53 -0
- package/dist/runtime/components/Separator.vue.d.ts +54 -0
- package/dist/runtime/components/Skeleton.vue +29 -0
- package/dist/runtime/components/Skeleton.vue.d.ts +17 -0
- package/dist/runtime/components/Slideover.vue +137 -0
- package/dist/runtime/components/Slideover.vue.d.ts +107 -0
- package/dist/runtime/components/Slider.vue +94 -0
- package/dist/runtime/components/Slider.vue.d.ts +58 -0
- package/dist/runtime/components/Stepper.vue +116 -0
- package/dist/runtime/components/Stepper.vue.d.ts +85 -0
- package/dist/runtime/components/Switch.vue +89 -0
- package/dist/runtime/components/Switch.vue.d.ts +70 -0
- package/dist/runtime/components/Table.vue +286 -0
- package/dist/runtime/components/Table.vue.d.ts +185 -0
- package/dist/runtime/components/Tabs.vue +84 -0
- package/dist/runtime/components/Tabs.vue.d.ts +93 -0
- package/dist/runtime/components/Textarea.vue +169 -0
- package/dist/runtime/components/Textarea.vue.d.ts +78 -0
- package/dist/runtime/components/Timeline.vue +92 -0
- package/dist/runtime/components/Timeline.vue.d.ts +70 -0
- package/dist/runtime/components/Toast.vue +129 -0
- package/dist/runtime/components/Toast.vue.d.ts +163 -0
- package/dist/runtime/components/Toaster.vue +111 -0
- package/dist/runtime/components/Toaster.vue.d.ts +44 -0
- package/dist/runtime/components/Tooltip.vue +62 -0
- package/dist/runtime/components/Tooltip.vue.d.ts +50 -0
- package/dist/runtime/components/Tree.vue +121 -0
- package/dist/runtime/components/Tree.vue.d.ts +113 -0
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue +16 -0
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue.d.ts +7 -0
- package/dist/runtime/components/color-mode/ColorModeButton.vue +45 -0
- package/dist/runtime/components/color-mode/ColorModeButton.vue.d.ts +24 -0
- package/dist/runtime/components/color-mode/ColorModeImage.vue +17 -0
- package/dist/runtime/components/color-mode/ColorModeImage.vue.d.ts +6 -0
- package/dist/runtime/components/color-mode/ColorModeSelect.vue +49 -0
- package/dist/runtime/components/color-mode/ColorModeSelect.vue.d.ts +7 -0
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue +44 -0
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue.d.ts +7 -0
- package/dist/runtime/components/locale/LocaleSelect.vue +61 -0
- package/dist/runtime/components/locale/LocaleSelect.vue.d.ts +16 -0
- package/dist/runtime/composables/color-mode/useColorMode.d.ts +3 -0
- package/dist/runtime/composables/color-mode/useColorMode.js +5 -0
- package/dist/runtime/composables/defineLocale.d.ts +11 -0
- package/dist/runtime/composables/defineLocale.js +9 -0
- package/dist/runtime/composables/defineShortcuts.d.ts +15 -0
- package/dist/runtime/composables/defineShortcuts.js +141 -0
- package/dist/runtime/composables/useAvatarGroup.d.ts +10 -0
- package/dist/runtime/composables/useAvatarGroup.js +10 -0
- package/dist/runtime/composables/useButtonGroup.d.ts +15 -0
- package/dist/runtime/composables/useButtonGroup.js +9 -0
- package/dist/runtime/composables/useComponentIcons.d.ts +39 -0
- package/dist/runtime/composables/useComponentIcons.js +26 -0
- package/dist/runtime/composables/useContentSearch.d.ts +6 -0
- package/dist/runtime/composables/useContentSearch.js +9 -0
- package/dist/runtime/composables/useFormField.d.ts +42 -0
- package/dist/runtime/composables/useFormField.js +66 -0
- package/dist/runtime/composables/useKbd.d.ts +36 -0
- package/dist/runtime/composables/useKbd.js +53 -0
- package/dist/runtime/composables/useLocale.d.ts +4 -0
- package/dist/runtime/composables/useLocale.js +10 -0
- package/dist/runtime/composables/useLocalePro.d.ts +3 -0
- package/dist/runtime/composables/useLocalePro.js +11 -0
- package/dist/runtime/composables/useOverlay.d.ts +38 -0
- package/dist/runtime/composables/useOverlay.js +85 -0
- package/dist/runtime/composables/usePortal.d.ts +6 -0
- package/dist/runtime/composables/usePortal.js +17 -0
- package/dist/runtime/composables/useResizable.d.ts +27 -0
- package/dist/runtime/composables/useResizable.js +173 -0
- package/dist/runtime/composables/useScrollspy.d.ts +6 -0
- package/dist/runtime/composables/useScrollspy.js +38 -0
- package/dist/runtime/composables/useToast.d.ts +13 -0
- package/dist/runtime/composables/useToast.js +62 -0
- package/dist/runtime/index.css +1 -0
- package/dist/runtime/inertia/components/Link.vue +132 -0
- package/dist/runtime/inertia/components/Link.vue.d.ts +63 -0
- package/dist/runtime/inertia/components/LinkBase.vue +68 -0
- package/dist/runtime/inertia/components/LinkBase.vue.d.ts +25 -0
- package/dist/runtime/inertia/stubs.d.ts +43 -0
- package/dist/runtime/inertia/stubs.js +82 -0
- package/dist/runtime/keyframes.css +1 -0
- package/dist/runtime/locale/ar.d.ts +3 -0
- package/dist/runtime/locale/ar.js +56 -0
- package/dist/runtime/locale/az.d.ts +3 -0
- package/dist/runtime/locale/az.js +55 -0
- package/dist/runtime/locale/bg.d.ts +3 -0
- package/dist/runtime/locale/bg.js +55 -0
- package/dist/runtime/locale/bn.d.ts +3 -0
- package/dist/runtime/locale/bn.js +55 -0
- package/dist/runtime/locale/ca.d.ts +3 -0
- package/dist/runtime/locale/ca.js +55 -0
- package/dist/runtime/locale/ckb.d.ts +3 -0
- package/dist/runtime/locale/ckb.js +56 -0
- package/dist/runtime/locale/cs.d.ts +3 -0
- package/dist/runtime/locale/cs.js +55 -0
- package/dist/runtime/locale/da.d.ts +3 -0
- package/dist/runtime/locale/da.js +55 -0
- package/dist/runtime/locale/de.d.ts +3 -0
- package/dist/runtime/locale/de.js +55 -0
- package/dist/runtime/locale/el.d.ts +3 -0
- package/dist/runtime/locale/el.js +55 -0
- package/dist/runtime/locale/en.d.ts +3 -0
- package/dist/runtime/locale/en.js +125 -0
- package/dist/runtime/locale/es.d.ts +3 -0
- package/dist/runtime/locale/es.js +55 -0
- package/dist/runtime/locale/et.d.ts +3 -0
- package/dist/runtime/locale/et.js +55 -0
- package/dist/runtime/locale/fa_ir.d.ts +3 -0
- package/dist/runtime/locale/fa_ir.js +56 -0
- package/dist/runtime/locale/fi.d.ts +3 -0
- package/dist/runtime/locale/fi.js +55 -0
- package/dist/runtime/locale/fr.d.ts +3 -0
- package/dist/runtime/locale/fr.js +55 -0
- package/dist/runtime/locale/he.d.ts +3 -0
- package/dist/runtime/locale/he.js +54 -0
- package/dist/runtime/locale/hi.d.ts +3 -0
- package/dist/runtime/locale/hi.js +55 -0
- package/dist/runtime/locale/hu.d.ts +3 -0
- package/dist/runtime/locale/hu.js +55 -0
- package/dist/runtime/locale/hy.d.ts +3 -0
- package/dist/runtime/locale/hy.js +55 -0
- package/dist/runtime/locale/id.d.ts +3 -0
- package/dist/runtime/locale/id.js +55 -0
- package/dist/runtime/locale/index.d.ts +51 -0
- package/dist/runtime/locale/index.js +51 -0
- package/dist/runtime/locale/it.d.ts +3 -0
- package/dist/runtime/locale/it.js +55 -0
- package/dist/runtime/locale/ja.d.ts +3 -0
- package/dist/runtime/locale/ja.js +55 -0
- package/dist/runtime/locale/kk.d.ts +3 -0
- package/dist/runtime/locale/kk.js +55 -0
- package/dist/runtime/locale/km.d.ts +3 -0
- package/dist/runtime/locale/km.js +55 -0
- package/dist/runtime/locale/ko.d.ts +3 -0
- package/dist/runtime/locale/ko.js +55 -0
- package/dist/runtime/locale/ky.d.ts +3 -0
- package/dist/runtime/locale/ky.js +55 -0
- package/dist/runtime/locale/lb.d.ts +3 -0
- package/dist/runtime/locale/lb.js +55 -0
- package/dist/runtime/locale/lt.d.ts +3 -0
- package/dist/runtime/locale/lt.js +55 -0
- package/dist/runtime/locale/mn.d.ts +3 -0
- package/dist/runtime/locale/mn.js +55 -0
- package/dist/runtime/locale/ms.d.ts +3 -0
- package/dist/runtime/locale/ms.js +55 -0
- package/dist/runtime/locale/nb_no.d.ts +3 -0
- package/dist/runtime/locale/nb_no.js +55 -0
- package/dist/runtime/locale/nl.d.ts +3 -0
- package/dist/runtime/locale/nl.js +55 -0
- package/dist/runtime/locale/pl.d.ts +3 -0
- package/dist/runtime/locale/pl.js +55 -0
- package/dist/runtime/locale/pt.d.ts +3 -0
- package/dist/runtime/locale/pt.js +55 -0
- package/dist/runtime/locale/pt_br.d.ts +3 -0
- package/dist/runtime/locale/pt_br.js +55 -0
- package/dist/runtime/locale/ro.d.ts +3 -0
- package/dist/runtime/locale/ro.js +55 -0
- package/dist/runtime/locale/ru.d.ts +3 -0
- package/dist/runtime/locale/ru.js +55 -0
- package/dist/runtime/locale/sk.d.ts +3 -0
- package/dist/runtime/locale/sk.js +55 -0
- package/dist/runtime/locale/sl.d.ts +3 -0
- package/dist/runtime/locale/sl.js +55 -0
- package/dist/runtime/locale/sv.d.ts +3 -0
- package/dist/runtime/locale/sv.js +55 -0
- package/dist/runtime/locale/th.d.ts +3 -0
- package/dist/runtime/locale/th.js +55 -0
- package/dist/runtime/locale/tj.d.ts +3 -0
- package/dist/runtime/locale/tj.js +55 -0
- package/dist/runtime/locale/tr.d.ts +3 -0
- package/dist/runtime/locale/tr.js +55 -0
- package/dist/runtime/locale/ug_cn.d.ts +3 -0
- package/dist/runtime/locale/ug_cn.js +56 -0
- package/dist/runtime/locale/uk.d.ts +3 -0
- package/dist/runtime/locale/uk.js +55 -0
- package/dist/runtime/locale/ur.d.ts +3 -0
- package/dist/runtime/locale/ur.js +56 -0
- package/dist/runtime/locale/uz.d.ts +3 -0
- package/dist/runtime/locale/uz.js +55 -0
- package/dist/runtime/locale/vi.d.ts +3 -0
- package/dist/runtime/locale/vi.js +55 -0
- package/dist/runtime/locale/zh_cn.d.ts +3 -0
- package/dist/runtime/locale/zh_cn.js +55 -0
- package/dist/runtime/locale/zh_tw.d.ts +3 -0
- package/dist/runtime/locale/zh_tw.js +55 -0
- package/dist/runtime/plugins/colors.d.ts +2 -0
- package/dist/runtime/plugins/colors.js +51 -0
- package/dist/runtime/types/app.config.d.ts +6 -0
- package/dist/runtime/types/content.d.ts +1 -0
- package/dist/runtime/types/content.js +0 -0
- package/dist/runtime/types/form.d.ts +87 -0
- package/dist/runtime/types/form.js +12 -0
- package/dist/runtime/types/index.d.ts +76 -0
- package/dist/runtime/types/index.js +76 -0
- package/dist/runtime/types/locale.d.ts +127 -0
- package/dist/runtime/types/locale.js +0 -0
- package/dist/runtime/types/prose.d.ts +1 -0
- package/dist/runtime/types/prose.js +0 -0
- package/dist/runtime/types/tv.d.ts +53 -0
- package/dist/runtime/types/tv.js +0 -0
- package/dist/runtime/types/utils.d.ts +41 -0
- package/dist/runtime/types/utils.js +1 -0
- package/dist/runtime/utils/content.d.ts +13 -0
- package/dist/runtime/utils/content.js +51 -0
- package/dist/runtime/utils/dashboard.d.ts +10 -0
- package/dist/runtime/utils/dashboard.js +5 -0
- package/dist/runtime/utils/form.d.ts +13 -0
- package/dist/runtime/utils/form.js +108 -0
- package/dist/runtime/utils/fuse.d.ts +4 -0
- package/dist/runtime/utils/fuse.js +63 -0
- package/dist/runtime/utils/index.d.ts +12 -0
- package/dist/runtime/utils/index.js +89 -0
- package/dist/runtime/utils/link.d.ts +7 -0
- package/dist/runtime/utils/link.js +47 -0
- package/dist/runtime/utils/locale.d.ts +15 -0
- package/dist/runtime/utils/locale.js +25 -0
- package/dist/runtime/utils/tv.d.ts +1 -0
- package/dist/runtime/utils/tv.js +4 -0
- package/dist/runtime/vue/components/Icon.vue +14 -0
- package/dist/runtime/vue/components/Icon.vue.d.ts +5 -0
- package/dist/runtime/vue/components/Link.vue +169 -0
- package/dist/runtime/vue/components/Link.vue.d.ts +93 -0
- package/dist/runtime/vue/components/color-mode/ColorModeButton.vue +34 -0
- package/dist/runtime/vue/components/color-mode/ColorModeButton.vue.d.ts +38 -0
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue +37 -0
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue.d.ts +5 -0
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +32 -0
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue.d.ts +5 -0
- package/dist/runtime/vue/composables/useAppConfig.d.ts +1 -0
- package/dist/runtime/vue/composables/useAppConfig.js +4 -0
- package/dist/runtime/vue/plugins/color-mode.d.ts +4 -0
- package/dist/runtime/vue/plugins/color-mode.js +6 -0
- package/dist/runtime/vue/plugins/head.d.ts +4 -0
- package/dist/runtime/vue/plugins/head.js +10 -0
- package/dist/runtime/vue/stubs.d.ts +40 -0
- package/dist/runtime/vue/stubs.js +74 -0
- package/dist/shared/ui.BcVNrqyb.mjs +5374 -0
- package/dist/types.d.mts +5 -0
- package/dist/unplugin.d.mts +88 -0
- package/dist/unplugin.mjs +242 -0
- package/dist/vite.d.mts +15 -0
- package/dist/vite.mjs +21 -0
- package/package.json +255 -0
- package/vue-plugin.d.ts +5 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
export type UseResizableProps = {
|
|
3
|
+
id?: string;
|
|
4
|
+
side?: 'left' | 'right';
|
|
5
|
+
minSize?: number;
|
|
6
|
+
maxSize?: number;
|
|
7
|
+
defaultSize?: number;
|
|
8
|
+
resizable?: boolean;
|
|
9
|
+
collapsible?: boolean;
|
|
10
|
+
collapsedSize?: number;
|
|
11
|
+
storage?: 'cookie' | 'local';
|
|
12
|
+
storageKey?: string;
|
|
13
|
+
persistent?: boolean;
|
|
14
|
+
unit?: '%' | 'rem' | 'px';
|
|
15
|
+
};
|
|
16
|
+
export type UseResizableReturn = {
|
|
17
|
+
el: Ref<HTMLElement | null>;
|
|
18
|
+
size: Ref<number>;
|
|
19
|
+
isDragging: Ref<boolean>;
|
|
20
|
+
isCollapsed: Ref<boolean>;
|
|
21
|
+
onMouseDown: (e: MouseEvent) => void;
|
|
22
|
+
onTouchStart: (e: TouchEvent) => void;
|
|
23
|
+
collapse: (value?: boolean) => void;
|
|
24
|
+
};
|
|
25
|
+
export declare const useResizable: (key: string, options?: Ref<UseResizableProps> | UseResizableProps, { collapsed }?: {
|
|
26
|
+
collapsed?: Ref<boolean>;
|
|
27
|
+
}) => UseResizableReturn;
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ref,
|
|
3
|
+
computed,
|
|
4
|
+
unref,
|
|
5
|
+
isRef,
|
|
6
|
+
watch
|
|
7
|
+
} from "vue";
|
|
8
|
+
import { useStorage } from "@vueuse/core";
|
|
9
|
+
import { useCookie } from "#imports";
|
|
10
|
+
export const useResizable = (key, options = {}, { collapsed = ref(false) } = {}) => {
|
|
11
|
+
const el = ref(null);
|
|
12
|
+
const opts = computed(() => ({
|
|
13
|
+
id: "",
|
|
14
|
+
side: "left",
|
|
15
|
+
minSize: 0,
|
|
16
|
+
maxSize: 100,
|
|
17
|
+
defaultSize: 0,
|
|
18
|
+
storage: "cookie",
|
|
19
|
+
persistent: true,
|
|
20
|
+
collapsible: false,
|
|
21
|
+
collapsedSize: 0,
|
|
22
|
+
resizable: true,
|
|
23
|
+
unit: "%",
|
|
24
|
+
storageKey: "dashboard",
|
|
25
|
+
...isRef(options) ? options.value : options
|
|
26
|
+
}));
|
|
27
|
+
const defaultStorageValue = {
|
|
28
|
+
size: opts.value.defaultSize,
|
|
29
|
+
collapsed: unref(collapsed) ?? false
|
|
30
|
+
};
|
|
31
|
+
const storageData = opts.value.persistent && (opts.value.resizable || opts.value.collapsible) ? opts.value.storage === "cookie" ? useCookie(key, { default: () => defaultStorageValue }) : useStorage(key, defaultStorageValue) : ref(defaultStorageValue);
|
|
32
|
+
const isCollapsed = computed({
|
|
33
|
+
get: () => storageData.value.collapsed,
|
|
34
|
+
set: (value) => {
|
|
35
|
+
if (!opts.value.collapsible) return;
|
|
36
|
+
if (isRef(collapsed)) {
|
|
37
|
+
collapsed.value = value;
|
|
38
|
+
}
|
|
39
|
+
storageData.value.collapsed = value;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const previousSize = ref(opts.value.defaultSize);
|
|
43
|
+
const size = computed({
|
|
44
|
+
get: () => storageData.value.size,
|
|
45
|
+
set: (value) => {
|
|
46
|
+
storageData.value.size = value;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const currentSize = computed(
|
|
50
|
+
() => isCollapsed.value ? opts.value.collapsedSize : size.value
|
|
51
|
+
);
|
|
52
|
+
const isDragging = ref(false);
|
|
53
|
+
const onMouseMove = (e, initialPos, initialSize) => {
|
|
54
|
+
if (!el.value || !opts.value.resizable) return;
|
|
55
|
+
const parentSize = el.value.parentElement?.offsetWidth || 1;
|
|
56
|
+
const delta = opts.value.side === "left" ? e.clientX - initialPos : initialPos - e.clientX;
|
|
57
|
+
const newSize = initialSize + delta;
|
|
58
|
+
let newValue;
|
|
59
|
+
switch (opts.value.unit) {
|
|
60
|
+
case "rem": {
|
|
61
|
+
const rootFontSize = Number.parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
62
|
+
newValue = newSize / rootFontSize;
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
case "px":
|
|
66
|
+
newValue = newSize;
|
|
67
|
+
break;
|
|
68
|
+
default:
|
|
69
|
+
newValue = newSize / parentSize * 100;
|
|
70
|
+
}
|
|
71
|
+
if (opts.value.collapsible && newValue < opts.value.collapsedSize + 4) {
|
|
72
|
+
collapse(true);
|
|
73
|
+
return;
|
|
74
|
+
} else if (isCollapsed.value) {
|
|
75
|
+
collapse(false);
|
|
76
|
+
}
|
|
77
|
+
size.value = Math.min(opts.value.maxSize, Math.max(opts.value.minSize, newValue));
|
|
78
|
+
};
|
|
79
|
+
const onMouseDown = (e) => {
|
|
80
|
+
if (!el.value || !opts.value.resizable) return;
|
|
81
|
+
e.preventDefault();
|
|
82
|
+
e.stopPropagation();
|
|
83
|
+
const elWidth = el.value.getBoundingClientRect().width;
|
|
84
|
+
if (!elWidth) return;
|
|
85
|
+
const initialX = e.clientX;
|
|
86
|
+
const initialWidth = elWidth;
|
|
87
|
+
isDragging.value = true;
|
|
88
|
+
const handleMouseMove = (e2) => onMouseMove(e2, initialX, initialWidth);
|
|
89
|
+
const handleMouseUp = () => {
|
|
90
|
+
isDragging.value = false;
|
|
91
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
92
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
93
|
+
};
|
|
94
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
95
|
+
document.addEventListener("mouseup", handleMouseUp);
|
|
96
|
+
};
|
|
97
|
+
const onTouchMove = (e, initialPos, initialSize) => {
|
|
98
|
+
if (!el.value || !opts.value.resizable || !e.touches[0]) return;
|
|
99
|
+
const parentSize = el.value.parentElement?.offsetWidth || 1;
|
|
100
|
+
const delta = opts.value.side === "left" ? e.touches[0].clientX - initialPos : initialPos - e.touches[0].clientX;
|
|
101
|
+
const newSize = initialSize + delta;
|
|
102
|
+
let newValue;
|
|
103
|
+
switch (opts.value.unit) {
|
|
104
|
+
case "rem": {
|
|
105
|
+
const rootFontSize = Number.parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
106
|
+
newValue = newSize / rootFontSize;
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
case "px":
|
|
110
|
+
newValue = newSize;
|
|
111
|
+
break;
|
|
112
|
+
default:
|
|
113
|
+
newValue = newSize / parentSize * 100;
|
|
114
|
+
}
|
|
115
|
+
if (opts.value.collapsible && newValue < opts.value.collapsedSize + 4) {
|
|
116
|
+
collapse(true);
|
|
117
|
+
return;
|
|
118
|
+
} else if (isCollapsed.value) {
|
|
119
|
+
collapse(false);
|
|
120
|
+
}
|
|
121
|
+
size.value = Math.min(opts.value.maxSize, Math.max(opts.value.minSize, newValue));
|
|
122
|
+
};
|
|
123
|
+
const onTouchStart = (e) => {
|
|
124
|
+
if (!el.value || !opts.value.resizable || !e.touches[0]) return;
|
|
125
|
+
e.preventDefault();
|
|
126
|
+
e.stopPropagation();
|
|
127
|
+
const elWidth = el.value.getBoundingClientRect().width;
|
|
128
|
+
if (!elWidth) return;
|
|
129
|
+
const initialX = e.touches[0].clientX;
|
|
130
|
+
const initialWidth = elWidth;
|
|
131
|
+
isDragging.value = true;
|
|
132
|
+
const handleTouchMove = (e2) => onTouchMove(e2, initialX, initialWidth);
|
|
133
|
+
const handleTouchEnd = () => {
|
|
134
|
+
isDragging.value = false;
|
|
135
|
+
document.removeEventListener("touchmove", handleTouchMove);
|
|
136
|
+
document.removeEventListener("touchend", handleTouchEnd);
|
|
137
|
+
document.removeEventListener("touchcancel", handleTouchEnd);
|
|
138
|
+
};
|
|
139
|
+
document.addEventListener("touchmove", handleTouchMove, { passive: false });
|
|
140
|
+
document.addEventListener("touchend", handleTouchEnd);
|
|
141
|
+
document.addEventListener("touchcancel", handleTouchEnd);
|
|
142
|
+
};
|
|
143
|
+
const collapse = (value) => {
|
|
144
|
+
if (!opts.value.collapsible) return;
|
|
145
|
+
const newCollapsed = value ?? !isCollapsed.value;
|
|
146
|
+
if (newCollapsed && !isCollapsed.value) {
|
|
147
|
+
previousSize.value = size.value;
|
|
148
|
+
} else if (!newCollapsed && isCollapsed.value) {
|
|
149
|
+
size.value = previousSize.value;
|
|
150
|
+
}
|
|
151
|
+
isCollapsed.value = newCollapsed;
|
|
152
|
+
};
|
|
153
|
+
if (isRef(collapsed) && storageData.value.collapsed) {
|
|
154
|
+
collapsed.value = storageData.value.collapsed;
|
|
155
|
+
}
|
|
156
|
+
if (isRef(collapsed)) {
|
|
157
|
+
watch(collapsed, (value) => {
|
|
158
|
+
if (!opts.value.collapsible) return;
|
|
159
|
+
if (storageData.value.collapsed !== value) {
|
|
160
|
+
storageData.value.collapsed = value;
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
return {
|
|
165
|
+
el,
|
|
166
|
+
size: currentSize,
|
|
167
|
+
isDragging,
|
|
168
|
+
isCollapsed,
|
|
169
|
+
onMouseDown,
|
|
170
|
+
onTouchStart,
|
|
171
|
+
collapse
|
|
172
|
+
};
|
|
173
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ref, watch, onBeforeMount, onBeforeUnmount } from "vue";
|
|
2
|
+
export function useScrollspy() {
|
|
3
|
+
const observer = ref(null);
|
|
4
|
+
const visibleHeadings = ref([]);
|
|
5
|
+
const activeHeadings = ref([]);
|
|
6
|
+
function observerCallback(entries) {
|
|
7
|
+
entries.forEach((entry) => {
|
|
8
|
+
const id = entry.target.id;
|
|
9
|
+
if (!id) return;
|
|
10
|
+
if (entry.isIntersecting) {
|
|
11
|
+
if (!visibleHeadings.value.includes(id)) {
|
|
12
|
+
visibleHeadings.value = [...visibleHeadings.value, id];
|
|
13
|
+
}
|
|
14
|
+
} else {
|
|
15
|
+
visibleHeadings.value = visibleHeadings.value.filter((h) => h !== id);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function updateHeadings(headings) {
|
|
20
|
+
headings.forEach((heading) => {
|
|
21
|
+
observer.value?.observe(heading);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
watch(visibleHeadings, (val, oldVal) => {
|
|
25
|
+
activeHeadings.value = val.length === 0 ? oldVal : val;
|
|
26
|
+
});
|
|
27
|
+
onBeforeMount(() => {
|
|
28
|
+
observer.value = new IntersectionObserver(observerCallback);
|
|
29
|
+
});
|
|
30
|
+
onBeforeUnmount(() => {
|
|
31
|
+
observer.value?.disconnect();
|
|
32
|
+
});
|
|
33
|
+
return {
|
|
34
|
+
visibleHeadings,
|
|
35
|
+
activeHeadings,
|
|
36
|
+
updateHeadings
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ToastProps, ToastEmits } from '../types';
|
|
2
|
+
import type { EmitsToProps } from '../types/utils';
|
|
3
|
+
export interface Toast extends Omit<ToastProps, 'defaultOpen'>, EmitsToProps<ToastEmits> {
|
|
4
|
+
id: string | number;
|
|
5
|
+
onClick?: (toast: Toast) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function useToast(): {
|
|
8
|
+
toasts: import("vue").Ref<Toast[], Toast[]>;
|
|
9
|
+
add: (toast: Partial<Toast>) => Toast;
|
|
10
|
+
update: (id: string | number, toast: Omit<Partial<Toast>, "id">) => void;
|
|
11
|
+
remove: (id: string | number) => void;
|
|
12
|
+
clear: () => void;
|
|
13
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ref, nextTick } from "vue";
|
|
2
|
+
import { useState } from "#imports";
|
|
3
|
+
export function useToast() {
|
|
4
|
+
const toasts = useState("toasts", () => []);
|
|
5
|
+
const maxToasts = 5;
|
|
6
|
+
const running = ref(false);
|
|
7
|
+
const queue = [];
|
|
8
|
+
const generateId = () => `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
9
|
+
async function processQueue() {
|
|
10
|
+
if (running.value || queue.length === 0) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
running.value = true;
|
|
14
|
+
while (queue.length > 0) {
|
|
15
|
+
const toast = queue.shift();
|
|
16
|
+
await nextTick();
|
|
17
|
+
toasts.value = [...toasts.value, toast].slice(-maxToasts);
|
|
18
|
+
}
|
|
19
|
+
running.value = false;
|
|
20
|
+
}
|
|
21
|
+
function add(toast) {
|
|
22
|
+
const body = {
|
|
23
|
+
id: generateId(),
|
|
24
|
+
open: true,
|
|
25
|
+
...toast
|
|
26
|
+
};
|
|
27
|
+
queue.push(body);
|
|
28
|
+
processQueue();
|
|
29
|
+
return body;
|
|
30
|
+
}
|
|
31
|
+
function update(id, toast) {
|
|
32
|
+
const index = toasts.value.findIndex((t) => t.id === id);
|
|
33
|
+
if (index !== -1) {
|
|
34
|
+
toasts.value[index] = {
|
|
35
|
+
...toasts.value[index],
|
|
36
|
+
...toast
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function remove(id) {
|
|
41
|
+
const index = toasts.value.findIndex((t) => t.id === id);
|
|
42
|
+
if (index !== -1) {
|
|
43
|
+
toasts.value[index] = {
|
|
44
|
+
...toasts.value[index],
|
|
45
|
+
open: false
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
setTimeout(() => {
|
|
49
|
+
toasts.value = toasts.value.filter((t) => t.id !== id);
|
|
50
|
+
}, 200);
|
|
51
|
+
}
|
|
52
|
+
function clear() {
|
|
53
|
+
toasts.value = [];
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
toasts,
|
|
57
|
+
add,
|
|
58
|
+
update,
|
|
59
|
+
remove,
|
|
60
|
+
clear
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "#build/ui.css";@import "./keyframes.css";@variant light (&:where(.light, .light *));@variant dark (&:where(.dark, .dark *));@layer base{body{@apply antialiased text-default bg-default scheme-light dark:scheme-dark}.light,:root{--ui-text-dimmed:var(--ui-color-neutral-400);--ui-text-muted:var(--ui-color-neutral-500);--ui-text-toned:var(--ui-color-neutral-600);--ui-text:var(--ui-color-neutral-700);--ui-text-highlighted:var(--ui-color-neutral-900);--ui-text-inverted:var(--color-white);--ui-bg:var(--color-white);--ui-bg-muted:var(--ui-color-neutral-50);--ui-bg-elevated:var(--ui-color-neutral-100);--ui-bg-accented:var(--ui-color-neutral-200);--ui-bg-inverted:var(--ui-color-neutral-900);--ui-border:var(--ui-color-neutral-200);--ui-border-muted:var(--ui-color-neutral-200);--ui-border-accented:var(--ui-color-neutral-300);--ui-border-inverted:var(--ui-color-neutral-900);--ui-radius:0.25rem;--ui-container:var(--container-7xl)}.dark{--ui-text-dimmed:var(--ui-color-neutral-500);--ui-text-muted:var(--ui-color-neutral-400);--ui-text-toned:var(--ui-color-neutral-300);--ui-text:var(--ui-color-neutral-200);--ui-text-highlighted:var(--color-white);--ui-text-inverted:var(--ui-color-neutral-900);--ui-bg:var(--ui-color-neutral-900);--ui-bg-muted:var(--ui-color-neutral-800);--ui-bg-elevated:var(--ui-color-neutral-800);--ui-bg-accented:var(--ui-color-neutral-700);--ui-bg-inverted:var(--color-white);--ui-border:var(--ui-color-neutral-800);--ui-border-muted:var(--ui-color-neutral-700);--ui-border-accented:var(--ui-color-neutral-700);--ui-border-inverted:var(--color-white)}}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/link";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { defu } from "defu";
|
|
8
|
+
import { useForwardProps } from "reka-ui";
|
|
9
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
10
|
+
import { usePage } from "@inertiajs/vue3";
|
|
11
|
+
import { hasProtocol } from "ufo";
|
|
12
|
+
import { useAppConfig } from "#imports";
|
|
13
|
+
import { tv } from "../../utils/tv";
|
|
14
|
+
import ULinkBase from "../../components/LinkBase.vue";
|
|
15
|
+
defineOptions({ inheritAttrs: false });
|
|
16
|
+
const props = defineProps({
|
|
17
|
+
as: { type: null, required: false, default: "button" },
|
|
18
|
+
type: { type: null, required: false, default: "button" },
|
|
19
|
+
disabled: { type: Boolean, required: false },
|
|
20
|
+
active: { type: Boolean, required: false, default: void 0 },
|
|
21
|
+
exact: { type: Boolean, required: false },
|
|
22
|
+
inactiveClass: { type: String, required: false, default: "" },
|
|
23
|
+
custom: { type: Boolean, required: false },
|
|
24
|
+
raw: { type: Boolean, required: false },
|
|
25
|
+
class: { type: null, required: false },
|
|
26
|
+
activeClass: { type: String, required: false, default: "" },
|
|
27
|
+
to: { type: String, required: false },
|
|
28
|
+
href: { type: String, required: false },
|
|
29
|
+
external: { type: Boolean, required: false },
|
|
30
|
+
target: { type: [String, Object, null], required: false },
|
|
31
|
+
ariaCurrentValue: { type: String, required: false },
|
|
32
|
+
data: { type: Object, required: false },
|
|
33
|
+
method: { type: String, required: false },
|
|
34
|
+
headers: { type: Object, required: false },
|
|
35
|
+
preserveScroll: { type: [Boolean, String, Function], required: false },
|
|
36
|
+
preserveState: { type: [Boolean, String, Function], required: false },
|
|
37
|
+
replace: { type: Boolean, required: false },
|
|
38
|
+
only: { type: Array, required: false },
|
|
39
|
+
except: { type: Array, required: false },
|
|
40
|
+
onCancelToken: { type: Function, required: false },
|
|
41
|
+
onBefore: { type: Function, required: false },
|
|
42
|
+
onStart: { type: Function, required: false },
|
|
43
|
+
onProgress: { type: Function, required: false },
|
|
44
|
+
onFinish: { type: Function, required: false },
|
|
45
|
+
onCancel: { type: Function, required: false },
|
|
46
|
+
onSuccess: { type: Function, required: false },
|
|
47
|
+
onError: { type: Function, required: false },
|
|
48
|
+
queryStringArrayFormat: { type: String, required: false },
|
|
49
|
+
async: { type: Boolean, required: false },
|
|
50
|
+
prefetch: { type: [Boolean, String, Array], required: false },
|
|
51
|
+
cacheFor: { type: [Number, String, Array], required: false }
|
|
52
|
+
});
|
|
53
|
+
defineSlots();
|
|
54
|
+
const page = usePage();
|
|
55
|
+
const appConfig = useAppConfig();
|
|
56
|
+
const routerLinkProps = useForwardProps(reactiveOmit(props, "as", "type", "disabled", "active", "exact", "activeClass", "inactiveClass", "to", "href", "raw", "custom", "class"));
|
|
57
|
+
const ui = computed(() => tv({
|
|
58
|
+
extend: tv(theme),
|
|
59
|
+
...defu({
|
|
60
|
+
variants: {
|
|
61
|
+
active: {
|
|
62
|
+
true: props.activeClass,
|
|
63
|
+
false: props.inactiveClass
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}, appConfig.ui?.link || {})
|
|
67
|
+
}));
|
|
68
|
+
const href = computed(() => props.to ?? props.href);
|
|
69
|
+
const isExternal = computed(() => {
|
|
70
|
+
if (props.external) {
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
if (!href.value) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
return typeof href.value === "string" && hasProtocol(href.value, { acceptRelative: true });
|
|
77
|
+
});
|
|
78
|
+
const isLinkActive = computed(() => {
|
|
79
|
+
if (props.active !== void 0) {
|
|
80
|
+
return props.active;
|
|
81
|
+
}
|
|
82
|
+
if (!href.value) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
if (props.exact && page.url === href.value) {
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
if (!props.exact && page.url.startsWith(href.value)) {
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
return false;
|
|
92
|
+
});
|
|
93
|
+
const linkClass = computed(() => {
|
|
94
|
+
const active = isLinkActive.value;
|
|
95
|
+
if (props.raw) {
|
|
96
|
+
return [props.class, active ? props.activeClass : props.inactiveClass];
|
|
97
|
+
}
|
|
98
|
+
return ui.value({ class: props.class, active, disabled: props.disabled });
|
|
99
|
+
});
|
|
100
|
+
</script>
|
|
101
|
+
|
|
102
|
+
<template>
|
|
103
|
+
<template v-if="custom">
|
|
104
|
+
<slot
|
|
105
|
+
v-bind="{
|
|
106
|
+
...$attrs,
|
|
107
|
+
...routerLinkProps,
|
|
108
|
+
as,
|
|
109
|
+
type,
|
|
110
|
+
disabled,
|
|
111
|
+
href,
|
|
112
|
+
active: isLinkActive,
|
|
113
|
+
isExternal
|
|
114
|
+
}"
|
|
115
|
+
/>
|
|
116
|
+
</template>
|
|
117
|
+
<ULinkBase
|
|
118
|
+
v-else
|
|
119
|
+
v-bind="{
|
|
120
|
+
...$attrs,
|
|
121
|
+
...routerLinkProps,
|
|
122
|
+
as,
|
|
123
|
+
type,
|
|
124
|
+
disabled,
|
|
125
|
+
href,
|
|
126
|
+
isExternal
|
|
127
|
+
}"
|
|
128
|
+
:class="linkClass"
|
|
129
|
+
>
|
|
130
|
+
<slot :active="isLinkActive" />
|
|
131
|
+
</ULinkBase>
|
|
132
|
+
</template>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes } from 'vue';
|
|
2
|
+
import type { InertiaLinkProps } from '@inertiajs/vue3';
|
|
3
|
+
interface NuxtLinkProps extends Omit<InertiaLinkProps, 'href' | 'onClick'> {
|
|
4
|
+
activeClass?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Route Location the link should navigate to when clicked on.
|
|
7
|
+
*/
|
|
8
|
+
to?: string;
|
|
9
|
+
/**
|
|
10
|
+
* An alias for `to`. If used with `to`, `href` will be ignored
|
|
11
|
+
*/
|
|
12
|
+
href?: NuxtLinkProps['to'];
|
|
13
|
+
/**
|
|
14
|
+
* Forces the link to be considered as external (true) or internal (false). This is helpful to handle edge-cases
|
|
15
|
+
*/
|
|
16
|
+
external?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Where to display the linked URL, as the name for a browsing context.
|
|
19
|
+
*/
|
|
20
|
+
target?: '_blank' | '_parent' | '_self' | '_top' | (string & {}) | null;
|
|
21
|
+
ariaCurrentValue?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface LinkProps extends NuxtLinkProps {
|
|
24
|
+
/**
|
|
25
|
+
* The element or component this component should render as when not a link.
|
|
26
|
+
* @defaultValue 'button'
|
|
27
|
+
*/
|
|
28
|
+
as?: any;
|
|
29
|
+
/**
|
|
30
|
+
* The type of the button when not a link.
|
|
31
|
+
* @defaultValue 'button'
|
|
32
|
+
*/
|
|
33
|
+
type?: ButtonHTMLAttributes['type'];
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
/** Force the link to be active independent of the current route. */
|
|
36
|
+
active?: boolean;
|
|
37
|
+
/** Will only be active if the current route is an exact match. */
|
|
38
|
+
exact?: boolean;
|
|
39
|
+
/** The class to apply when the link is inactive. */
|
|
40
|
+
inactiveClass?: string;
|
|
41
|
+
custom?: boolean;
|
|
42
|
+
/** When `true`, only styles from `class`, `activeClass`, and `inactiveClass` will be applied. */
|
|
43
|
+
raw?: boolean;
|
|
44
|
+
class?: any;
|
|
45
|
+
}
|
|
46
|
+
export interface LinkSlots {
|
|
47
|
+
default(props: {
|
|
48
|
+
active: boolean;
|
|
49
|
+
}): any;
|
|
50
|
+
}
|
|
51
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
|
|
52
|
+
type: "reset" | "submit" | "button";
|
|
53
|
+
as: any;
|
|
54
|
+
activeClass: string;
|
|
55
|
+
active: boolean;
|
|
56
|
+
inactiveClass: string;
|
|
57
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
|
|
58
|
+
export default _default;
|
|
59
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
60
|
+
new (): {
|
|
61
|
+
$slots: S;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { Primitive } from "reka-ui";
|
|
7
|
+
import { Link as InertiaLink } from "@inertiajs/vue3";
|
|
8
|
+
defineOptions({ inheritAttrs: false });
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
as: { type: String, required: false, default: "button" },
|
|
11
|
+
type: { type: String, required: false, default: "button" },
|
|
12
|
+
disabled: { type: Boolean, required: false },
|
|
13
|
+
onClick: { type: [Function, Array], required: false },
|
|
14
|
+
href: { type: String, required: false },
|
|
15
|
+
target: { type: [String, Object, null], required: false },
|
|
16
|
+
active: { type: Boolean, required: false },
|
|
17
|
+
isExternal: { type: Boolean, required: false }
|
|
18
|
+
});
|
|
19
|
+
function onClickWrapper(e) {
|
|
20
|
+
if (props.disabled) {
|
|
21
|
+
e.stopPropagation();
|
|
22
|
+
e.preventDefault();
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (props.onClick) {
|
|
26
|
+
for (const onClick of Array.isArray(props.onClick) ? props.onClick : [props.onClick]) {
|
|
27
|
+
onClick(e);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<InertiaLink
|
|
35
|
+
v-if="!!href && !isExternal && !disabled"
|
|
36
|
+
:href="href"
|
|
37
|
+
v-bind="{
|
|
38
|
+
target: target || (isExternal ? '_blank' : void 0),
|
|
39
|
+
...$attrs
|
|
40
|
+
}"
|
|
41
|
+
@click="onClickWrapper"
|
|
42
|
+
>
|
|
43
|
+
<slot />
|
|
44
|
+
</InertiaLink>
|
|
45
|
+
<Primitive
|
|
46
|
+
v-else
|
|
47
|
+
v-bind="href ? {
|
|
48
|
+
'as': 'a',
|
|
49
|
+
'href': disabled ? void 0 : href,
|
|
50
|
+
'aria-disabled': disabled ? 'true' : void 0,
|
|
51
|
+
'role': disabled ? 'link' : void 0,
|
|
52
|
+
'tabindex': disabled ? -1 : void 0,
|
|
53
|
+
'target': target || (isExternal ? '_blank' : void 0),
|
|
54
|
+
...$attrs
|
|
55
|
+
} : as === 'button' ? {
|
|
56
|
+
as,
|
|
57
|
+
type,
|
|
58
|
+
disabled,
|
|
59
|
+
...$attrs
|
|
60
|
+
} : {
|
|
61
|
+
as,
|
|
62
|
+
...$attrs
|
|
63
|
+
}"
|
|
64
|
+
@click="onClickWrapper"
|
|
65
|
+
>
|
|
66
|
+
<slot />
|
|
67
|
+
</Primitive>
|
|
68
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { LinkProps } from '../../types';
|
|
2
|
+
export interface LinkBaseProps {
|
|
3
|
+
as?: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
onClick?: ((e: MouseEvent) => void | Promise<void>) | Array<((e: MouseEvent) => void | Promise<void>)>;
|
|
7
|
+
href?: string;
|
|
8
|
+
target?: LinkProps['target'];
|
|
9
|
+
active?: boolean;
|
|
10
|
+
isExternal?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkBaseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkBaseProps> & Readonly<{}>, {
|
|
13
|
+
type: string;
|
|
14
|
+
as: string;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
16
|
+
default?: (props: {}) => any;
|
|
17
|
+
} & {
|
|
18
|
+
default?: (props: {}) => any;
|
|
19
|
+
}>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { NuxtApp } from '#app';
|
|
3
|
+
export { useHead } from '@unhead/vue';
|
|
4
|
+
export { useAppConfig } from '../vue/composables/useAppConfig';
|
|
5
|
+
export { defineShortcuts } from '../composables/defineShortcuts';
|
|
6
|
+
export { defineLocale } from '../composables/defineLocale';
|
|
7
|
+
export { useLocale } from '../composables/useLocale';
|
|
8
|
+
export declare const useRoute: () => {
|
|
9
|
+
fullPath: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const useRouter: () => void;
|
|
12
|
+
export declare const useColorMode: () => {
|
|
13
|
+
forced: boolean;
|
|
14
|
+
preference?: undefined;
|
|
15
|
+
readonly value?: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
preference: "system" | "light" | "dark";
|
|
18
|
+
readonly value: import("@vueuse/core").BasicColorMode;
|
|
19
|
+
forced: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare const useCookie: <T = string>(_name: string, _options?: Record<string, any>) => {
|
|
22
|
+
value: Ref<T, T>;
|
|
23
|
+
get: () => T;
|
|
24
|
+
set: () => void;
|
|
25
|
+
update: () => void;
|
|
26
|
+
refresh: () => Promise<Awaited<T>>;
|
|
27
|
+
remove: () => void;
|
|
28
|
+
};
|
|
29
|
+
export declare const useState: <T>(key: string, init: () => T) => Ref<T>;
|
|
30
|
+
export declare function useNuxtApp(): {
|
|
31
|
+
isHydrating: boolean;
|
|
32
|
+
payload: {
|
|
33
|
+
serverRendered: boolean;
|
|
34
|
+
};
|
|
35
|
+
hooks: import("hookable").Hookable<Record<string, any>, string>;
|
|
36
|
+
hook: <NameT extends string>(name: NameT, function_: any, options?: {
|
|
37
|
+
allowDeprecated?: boolean;
|
|
38
|
+
}) => () => void;
|
|
39
|
+
};
|
|
40
|
+
export declare function useRuntimeHook(name: string, fn: (...args: any[]) => void): void;
|
|
41
|
+
export declare function defineNuxtPlugin(plugin: (nuxtApp: NuxtApp) => void): {
|
|
42
|
+
install(app: import("vue").App<any>): void;
|
|
43
|
+
};
|