@nuxt/ui 4.1.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/templates.mjs +2 -2
- package/dist/module.d.mts +10 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +7 -7
- package/dist/runtime/components/Accordion.vue +9 -8
- package/dist/runtime/components/Alert.vue +9 -8
- package/dist/runtime/components/App.d.vue.ts +1 -1
- package/dist/runtime/components/App.vue +2 -1
- package/dist/runtime/components/App.vue.d.ts +1 -1
- package/dist/runtime/components/AuthForm.d.vue.ts +9 -8
- package/dist/runtime/components/AuthForm.vue +28 -20
- package/dist/runtime/components/AuthForm.vue.d.ts +9 -8
- package/dist/runtime/components/Avatar.d.vue.ts +2 -1
- package/dist/runtime/components/Avatar.vue +4 -2
- package/dist/runtime/components/Avatar.vue.d.ts +2 -1
- package/dist/runtime/components/AvatarGroup.vue +3 -3
- package/dist/runtime/components/Badge.vue +5 -5
- package/dist/runtime/components/Banner.vue +9 -8
- package/dist/runtime/components/BlogPost.vue +19 -10
- package/dist/runtime/components/Breadcrumb.vue +9 -9
- package/dist/runtime/components/Button.vue +6 -4
- package/dist/runtime/components/Calendar.vue +12 -8
- package/dist/runtime/components/Card.vue +4 -4
- package/dist/runtime/components/Carousel.vue +10 -5
- package/dist/runtime/components/ChangelogVersion.vue +22 -14
- package/dist/runtime/components/ChangelogVersions.vue +4 -4
- package/dist/runtime/components/ChatMessage.vue +7 -7
- package/dist/runtime/components/ChatMessages.vue +4 -2
- package/dist/runtime/components/ChatPalette.vue +3 -3
- package/dist/runtime/components/ChatPrompt.d.vue.ts +3 -6
- package/dist/runtime/components/ChatPrompt.vue +23 -14
- package/dist/runtime/components/ChatPrompt.vue.d.ts +3 -6
- package/dist/runtime/components/ChatPromptSubmit.d.vue.ts +4 -4
- package/dist/runtime/components/ChatPromptSubmit.vue +51 -4
- package/dist/runtime/components/ChatPromptSubmit.vue.d.ts +4 -4
- package/dist/runtime/components/Checkbox.d.vue.ts +2 -1
- package/dist/runtime/components/Checkbox.vue +9 -8
- package/dist/runtime/components/Checkbox.vue.d.ts +2 -1
- package/dist/runtime/components/CheckboxGroup.vue +7 -4
- package/dist/runtime/components/Chip.vue +2 -2
- package/dist/runtime/components/Collapsible.vue +2 -2
- package/dist/runtime/components/ColorPicker.vue +7 -3
- package/dist/runtime/components/CommandPalette.vue +62 -37
- package/dist/runtime/components/ContextMenuContent.vue +19 -17
- package/dist/runtime/components/DashboardNavbar.vue +7 -6
- package/dist/runtime/components/DashboardPanel.vue +3 -1
- package/dist/runtime/components/DashboardSearch.vue +2 -1
- package/dist/runtime/components/DashboardSearchButton.d.vue.ts +2 -3
- package/dist/runtime/components/DashboardSearchButton.vue +47 -9
- package/dist/runtime/components/DashboardSearchButton.vue.d.ts +2 -3
- package/dist/runtime/components/DashboardSidebar.vue +9 -6
- package/dist/runtime/components/DashboardSidebarCollapse.d.vue.ts +7 -4
- package/dist/runtime/components/DashboardSidebarCollapse.vue +51 -7
- package/dist/runtime/components/DashboardSidebarCollapse.vue.d.ts +7 -4
- package/dist/runtime/components/DashboardSidebarToggle.d.vue.ts +7 -4
- package/dist/runtime/components/DashboardSidebarToggle.vue +52 -7
- package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +7 -4
- package/dist/runtime/components/DashboardToolbar.vue +3 -3
- package/dist/runtime/components/Drawer.d.vue.ts +1 -1
- package/dist/runtime/components/Drawer.vue +9 -9
- package/dist/runtime/components/Drawer.vue.d.ts +1 -1
- package/dist/runtime/components/DropdownMenu.vue +1 -1
- package/dist/runtime/components/DropdownMenuContent.vue +19 -17
- package/dist/runtime/components/Empty.vue +8 -8
- package/dist/runtime/components/Error.d.vue.ts +1 -1
- package/dist/runtime/components/Error.vue +5 -5
- package/dist/runtime/components/Error.vue.d.ts +1 -1
- package/dist/runtime/components/FileUpload.d.vue.ts +8 -2
- package/dist/runtime/components/FileUpload.vue +34 -24
- package/dist/runtime/components/FileUpload.vue.d.ts +8 -2
- package/dist/runtime/components/Footer.vue +7 -7
- package/dist/runtime/components/FooterColumns.vue +11 -11
- package/dist/runtime/components/Form.d.vue.ts +3 -2
- package/dist/runtime/components/Form.vue +3 -4
- package/dist/runtime/components/Form.vue.d.ts +3 -2
- package/dist/runtime/components/FormField.vue +8 -8
- package/dist/runtime/components/Header.vue +9 -8
- package/dist/runtime/components/Input.d.vue.ts +6 -6
- package/dist/runtime/components/Input.vue +9 -8
- package/dist/runtime/components/Input.vue.d.ts +6 -6
- package/dist/runtime/components/InputDate.d.vue.ts +89 -0
- package/dist/runtime/components/InputDate.vue +161 -0
- package/dist/runtime/components/InputDate.vue.d.ts +89 -0
- package/dist/runtime/components/InputMenu.d.vue.ts +6 -127
- package/dist/runtime/components/InputMenu.vue +50 -42
- package/dist/runtime/components/InputMenu.vue.d.ts +6 -127
- package/dist/runtime/components/InputNumber.d.vue.ts +24 -127
- package/dist/runtime/components/InputNumber.vue +8 -9
- package/dist/runtime/components/InputNumber.vue.d.ts +24 -127
- package/dist/runtime/components/InputTags.d.vue.ts +5 -108
- package/dist/runtime/components/InputTags.vue +19 -15
- package/dist/runtime/components/InputTags.vue.d.ts +5 -108
- package/dist/runtime/components/InputTime.d.vue.ts +72 -0
- package/dist/runtime/components/InputTime.vue +137 -0
- package/dist/runtime/components/InputTime.vue.d.ts +72 -0
- package/dist/runtime/components/Link.d.vue.ts +4 -49
- package/dist/runtime/components/Link.vue +1 -0
- package/dist/runtime/components/Link.vue.d.ts +4 -49
- package/dist/runtime/components/Marquee.d.vue.ts +1 -1
- package/dist/runtime/components/Marquee.vue +2 -6
- package/dist/runtime/components/Marquee.vue.d.ts +1 -1
- package/dist/runtime/components/Modal.d.vue.ts +7 -2
- package/dist/runtime/components/Modal.vue +52 -16
- package/dist/runtime/components/Modal.vue.d.ts +7 -2
- package/dist/runtime/components/NavigationMenu.d.vue.ts +44 -9
- package/dist/runtime/components/NavigationMenu.vue +73 -43
- package/dist/runtime/components/NavigationMenu.vue.d.ts +44 -9
- package/dist/runtime/components/Page.vue +4 -4
- package/dist/runtime/components/PageAnchors.vue +8 -8
- package/dist/runtime/components/PageAside.vue +6 -6
- package/dist/runtime/components/PageCTA.vue +9 -9
- package/dist/runtime/components/PageCard.vue +11 -10
- package/dist/runtime/components/PageFeature.vue +6 -6
- package/dist/runtime/components/PageHeader.vue +7 -7
- package/dist/runtime/components/PageHero.vue +10 -10
- package/dist/runtime/components/PageLinks.vue +8 -8
- package/dist/runtime/components/PageLogos.vue +6 -3
- package/dist/runtime/components/PageSection.vue +13 -13
- package/dist/runtime/components/Pagination.d.vue.ts +2 -2
- package/dist/runtime/components/Pagination.vue +8 -8
- package/dist/runtime/components/Pagination.vue.d.ts +2 -2
- package/dist/runtime/components/PinInput.d.vue.ts +2 -2
- package/dist/runtime/components/PinInput.vue +2 -0
- package/dist/runtime/components/PinInput.vue.d.ts +2 -2
- package/dist/runtime/components/Popover.vue +2 -2
- package/dist/runtime/components/PricingPlan.vue +28 -21
- package/dist/runtime/components/PricingTable.vue +35 -31
- package/dist/runtime/components/Progress.d.vue.ts +1 -1
- package/dist/runtime/components/Progress.vue +6 -6
- package/dist/runtime/components/Progress.vue.d.ts +1 -1
- package/dist/runtime/components/RadioGroup.d.vue.ts +5 -5
- package/dist/runtime/components/RadioGroup.vue +13 -11
- package/dist/runtime/components/RadioGroup.vue.d.ts +5 -5
- package/dist/runtime/components/Select.d.vue.ts +5 -106
- package/dist/runtime/components/Select.vue +26 -23
- package/dist/runtime/components/Select.vue.d.ts +5 -106
- package/dist/runtime/components/SelectMenu.d.vue.ts +6 -105
- package/dist/runtime/components/SelectMenu.vue +54 -40
- package/dist/runtime/components/SelectMenu.vue.d.ts +6 -105
- package/dist/runtime/components/Separator.vue +7 -7
- package/dist/runtime/components/Slideover.d.vue.ts +2 -2
- package/dist/runtime/components/Slideover.vue +9 -7
- package/dist/runtime/components/Slideover.vue.d.ts +2 -2
- package/dist/runtime/components/Slider.vue +5 -4
- package/dist/runtime/components/Stepper.vue +12 -10
- package/dist/runtime/components/Switch.d.vue.ts +2 -1
- package/dist/runtime/components/Switch.vue +10 -9
- package/dist/runtime/components/Switch.vue.d.ts +2 -1
- package/dist/runtime/components/Table.d.vue.ts +7 -6
- package/dist/runtime/components/Table.vue +37 -18
- package/dist/runtime/components/Table.vue.d.ts +7 -6
- package/dist/runtime/components/Tabs.vue +10 -7
- package/dist/runtime/components/Textarea.d.vue.ts +6 -5
- package/dist/runtime/components/Textarea.vue +9 -8
- package/dist/runtime/components/Textarea.vue.d.ts +6 -5
- package/dist/runtime/components/Timeline.vue +16 -7
- package/dist/runtime/components/Toast.vue +15 -12
- package/dist/runtime/components/Toaster.d.vue.ts +1 -1
- package/dist/runtime/components/Toaster.vue +2 -0
- package/dist/runtime/components/Toaster.vue.d.ts +1 -1
- package/dist/runtime/components/Tooltip.vue +4 -4
- package/dist/runtime/components/Tree.d.vue.ts +1 -1
- package/dist/runtime/components/Tree.vue +18 -11
- package/dist/runtime/components/Tree.vue.d.ts +1 -1
- package/dist/runtime/components/User.vue +13 -6
- package/dist/runtime/components/color-mode/ColorModeAvatar.d.vue.ts +3 -3
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue +16 -4
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue.d.ts +3 -3
- package/dist/runtime/components/color-mode/ColorModeButton.d.vue.ts +6 -13
- package/dist/runtime/components/color-mode/ColorModeButton.vue +59 -18
- package/dist/runtime/components/color-mode/ColorModeButton.vue.d.ts +6 -13
- package/dist/runtime/components/color-mode/ColorModeImage.d.vue.ts +4 -3
- package/dist/runtime/components/color-mode/ColorModeImage.vue +4 -0
- package/dist/runtime/components/color-mode/ColorModeImage.vue.d.ts +4 -3
- package/dist/runtime/components/color-mode/ColorModeSelect.d.vue.ts +5 -3
- package/dist/runtime/components/color-mode/ColorModeSelect.vue +45 -5
- package/dist/runtime/components/color-mode/ColorModeSelect.vue.d.ts +5 -3
- package/dist/runtime/components/color-mode/ColorModeSwitch.d.vue.ts +2 -2
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue +29 -5
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue.d.ts +2 -2
- package/dist/runtime/components/content/ContentNavigation.vue +13 -12
- package/dist/runtime/components/content/ContentSearch.vue +60 -65
- package/dist/runtime/components/content/ContentSearchButton.d.vue.ts +2 -3
- package/dist/runtime/components/content/ContentSearchButton.vue +47 -9
- package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +2 -3
- package/dist/runtime/components/content/ContentSurround.vue +6 -6
- package/dist/runtime/components/content/ContentToc.vue +15 -15
- package/dist/runtime/components/locale/LocaleSelect.d.vue.ts +10 -6
- package/dist/runtime/components/locale/LocaleSelect.vue +54 -6
- package/dist/runtime/components/locale/LocaleSelect.vue.d.ts +10 -6
- package/dist/runtime/composables/index.d.ts +8 -0
- package/dist/runtime/composables/index.js +8 -0
- package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
- package/dist/runtime/composables/useContentSearch.d.ts +5 -0
- package/dist/runtime/composables/useContentSearch.js +31 -1
- package/dist/runtime/composables/useFieldGroup.d.ts +1 -1
- package/dist/runtime/composables/useFileUpload.d.ts +2 -1
- package/dist/runtime/composables/useFileUpload.js +13 -4
- package/dist/runtime/composables/useFormField.d.ts +1 -1
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/inertia/components/Link.d.vue.ts +17 -10
- package/dist/runtime/inertia/components/Link.vue +7 -6
- package/dist/runtime/inertia/components/Link.vue.d.ts +17 -10
- package/dist/runtime/inertia/stubs.js +1 -1
- package/dist/runtime/keyframes.css +1 -1
- package/dist/runtime/locale/gl.d.ts +3 -0
- package/dist/runtime/locale/gl.js +129 -0
- package/dist/runtime/locale/index.d.ts +2 -0
- package/dist/runtime/locale/index.js +2 -0
- package/dist/runtime/locale/sq.d.ts +3 -0
- package/dist/runtime/locale/sq.js +129 -0
- package/dist/runtime/plugins/colors.js +8 -6
- package/dist/runtime/types/html.d.ts +8 -0
- package/dist/runtime/types/html.js +0 -0
- package/dist/runtime/types/index.d.ts +5 -0
- package/dist/runtime/types/index.js +5 -0
- package/dist/runtime/types/input.d.ts +5 -5
- package/dist/runtime/types/utils.d.ts +2 -0
- package/dist/runtime/utils/content.d.ts +2 -2
- package/dist/runtime/utils/link.d.ts +1 -0
- package/dist/runtime/utils/link.js +40 -24
- package/dist/runtime/utils/virtualizer.d.ts +6 -0
- package/dist/runtime/utils/virtualizer.js +30 -0
- package/dist/runtime/vue/components/Link.d.vue.ts +8 -37
- package/dist/runtime/vue/components/Link.vue +5 -10
- package/dist/runtime/vue/components/Link.vue.d.ts +8 -37
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.d.vue.ts +5 -3
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue +44 -3
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue.d.ts +5 -3
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.d.vue.ts +1 -1
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +24 -3
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue.d.ts +1 -1
- package/dist/runtime/vue/stubs.d.ts +1 -1
- package/dist/runtime/vue/stubs.js +1 -1
- package/dist/shared/{ui.Cmctwxv6.mjs → ui.B77q-Dvh.mjs} +397 -153
- package/dist/unplugin.d.mts +1 -0
- package/dist/unplugin.mjs +31 -3
- package/dist/vite.mjs +5 -3
- package/package.json +39 -34
- package/.nuxt/ui/accordion.ts +0 -20
- package/.nuxt/ui/alert.ts +0 -264
- package/.nuxt/ui/auth-form.ts +0 -20
- package/.nuxt/ui/avatar-group.ts +0 -52
- package/.nuxt/ui/avatar.ts +0 -54
- package/.nuxt/ui/badge.ts +0 -263
- package/.nuxt/ui/banner.ts +0 -108
- package/.nuxt/ui/blog-post.ts +0 -142
- package/.nuxt/ui/blog-posts.ts +0 -9
- package/.nuxt/ui/breadcrumb.ts +0 -45
- package/.nuxt/ui/button.ts +0 -378
- package/.nuxt/ui/calendar.ts +0 -315
- package/.nuxt/ui/card.ts +0 -34
- package/.nuxt/ui/carousel.ts +0 -38
- package/.nuxt/ui/changelog-version.ts +0 -41
- package/.nuxt/ui/changelog-versions.ts +0 -8
- package/.nuxt/ui/chat-message.ts +0 -136
- package/.nuxt/ui/chat-messages.ts +0 -14
- package/.nuxt/ui/chat-palette.ts +0 -8
- package/.nuxt/ui/chat-prompt-submit.ts +0 -5
- package/.nuxt/ui/chat-prompt.ts +0 -35
- package/.nuxt/ui/checkbox-group.ts +0 -204
- package/.nuxt/ui/checkbox.ts +0 -236
- package/.nuxt/ui/chip.ts +0 -96
- package/.nuxt/ui/collapsible.ts +0 -6
- package/.nuxt/ui/color-picker.ts +0 -47
- package/.nuxt/ui/command-palette.ts +0 -62
- package/.nuxt/ui/container.ts +0 -3
- package/.nuxt/ui/content/content-navigation.ts +0 -368
- package/.nuxt/ui/content/content-search-button.ts +0 -6
- package/.nuxt/ui/content/content-search.ts +0 -13
- package/.nuxt/ui/content/content-surround.ts +0 -34
- package/.nuxt/ui/content/content-toc.ts +0 -155
- package/.nuxt/ui/context-menu.ts +0 -219
- package/.nuxt/ui/dashboard-group.ts +0 -3
- package/.nuxt/ui/dashboard-navbar.ts +0 -21
- package/.nuxt/ui/dashboard-panel.ts +0 -17
- package/.nuxt/ui/dashboard-resize-handle.ts +0 -3
- package/.nuxt/ui/dashboard-search-button.ts +0 -6
- package/.nuxt/ui/dashboard-search.ts +0 -13
- package/.nuxt/ui/dashboard-sidebar-collapse.ts +0 -9
- package/.nuxt/ui/dashboard-sidebar-toggle.ts +0 -9
- package/.nuxt/ui/dashboard-sidebar.ts +0 -37
- package/.nuxt/ui/dashboard-toolbar.ts +0 -7
- package/.nuxt/ui/drawer.ts +0 -149
- package/.nuxt/ui/dropdown-menu.ts +0 -220
- package/.nuxt/ui/empty.ts +0 -83
- package/.nuxt/ui/error.ts +0 -9
- package/.nuxt/ui/field-group.ts +0 -16
- package/.nuxt/ui/file-upload.ts +0 -290
- package/.nuxt/ui/footer-columns.ts +0 -28
- package/.nuxt/ui/footer.ts +0 -11
- package/.nuxt/ui/form-field.ts +0 -48
- package/.nuxt/ui/form.ts +0 -3
- package/.nuxt/ui/header.ts +0 -25
- package/.nuxt/ui/index.ts +0 -106
- package/.nuxt/ui/input-menu.ts +0 -460
- package/.nuxt/ui/input-number.ts +0 -256
- package/.nuxt/ui/input-tags.ts +0 -310
- package/.nuxt/ui/input.ts +0 -289
- package/.nuxt/ui/kbd.ts +0 -195
- package/.nuxt/ui/link.ts +0 -22
- package/.nuxt/ui/main.ts +0 -3
- package/.nuxt/ui/marquee.ts +0 -66
- package/.nuxt/ui/modal.ts +0 -29
- package/.nuxt/ui/navigation-menu.ts +0 -510
- package/.nuxt/ui/page-anchors.ts +0 -30
- package/.nuxt/ui/page-aside.ts +0 -10
- package/.nuxt/ui/page-body.ts +0 -3
- package/.nuxt/ui/page-card.ts +0 -279
- package/.nuxt/ui/page-columns.ts +0 -3
- package/.nuxt/ui/page-cta.ts +0 -70
- package/.nuxt/ui/page-feature.ts +0 -26
- package/.nuxt/ui/page-grid.ts +0 -3
- package/.nuxt/ui/page-header.ts +0 -18
- package/.nuxt/ui/page-hero.ts +0 -44
- package/.nuxt/ui/page-links.ts +0 -25
- package/.nuxt/ui/page-list.ts +0 -8
- package/.nuxt/ui/page-logos.ts +0 -15
- package/.nuxt/ui/page-section.ts +0 -84
- package/.nuxt/ui/page.ts +0 -32
- package/.nuxt/ui/pagination.ts +0 -13
- package/.nuxt/ui/pin-input.ts +0 -171
- package/.nuxt/ui/popover.ts +0 -6
- package/.nuxt/ui/pricing-plan.ts +0 -101
- package/.nuxt/ui/pricing-plans.ts +0 -22
- package/.nuxt/ui/pricing-table.ts +0 -51
- package/.nuxt/ui/progress.ts +0 -297
- package/.nuxt/ui/prose/a.ts +0 -6
- package/.nuxt/ui/prose/accordion-item.ts +0 -3
- package/.nuxt/ui/prose/accordion.ts +0 -6
- package/.nuxt/ui/prose/badge.ts +0 -3
- package/.nuxt/ui/prose/blockquote.ts +0 -3
- package/.nuxt/ui/prose/callout.ts +0 -129
- package/.nuxt/ui/prose/card-group.ts +0 -3
- package/.nuxt/ui/prose/card.ts +0 -119
- package/.nuxt/ui/prose/code-collapse.ts +0 -19
- package/.nuxt/ui/prose/code-group.ts +0 -13
- package/.nuxt/ui/prose/code-icon.ts +0 -66
- package/.nuxt/ui/prose/code-preview.ts +0 -14
- package/.nuxt/ui/prose/code-tree.ts +0 -28
- package/.nuxt/ui/prose/code.ts +0 -27
- package/.nuxt/ui/prose/collapsible.ts +0 -12
- package/.nuxt/ui/prose/em.ts +0 -3
- package/.nuxt/ui/prose/field-group.ts +0 -3
- package/.nuxt/ui/prose/field.ts +0 -11
- package/.nuxt/ui/prose/h1.ts +0 -6
- package/.nuxt/ui/prose/h2.ts +0 -14
- package/.nuxt/ui/prose/h3.ts +0 -14
- package/.nuxt/ui/prose/h4.ts +0 -6
- package/.nuxt/ui/prose/hr.ts +0 -3
- package/.nuxt/ui/prose/icon.ts +0 -3
- package/.nuxt/ui/prose/img.ts +0 -23
- package/.nuxt/ui/prose/index.ts +0 -41
- package/.nuxt/ui/prose/kbd.ts +0 -3
- package/.nuxt/ui/prose/li.ts +0 -3
- package/.nuxt/ui/prose/ol.ts +0 -3
- package/.nuxt/ui/prose/p.ts +0 -3
- package/.nuxt/ui/prose/pre.ts +0 -17
- package/.nuxt/ui/prose/steps.ts +0 -19
- package/.nuxt/ui/prose/strong.ts +0 -3
- package/.nuxt/ui/prose/table.ts +0 -6
- package/.nuxt/ui/prose/tabs-item.ts +0 -3
- package/.nuxt/ui/prose/tabs.ts +0 -5
- package/.nuxt/ui/prose/tbody.ts +0 -3
- package/.nuxt/ui/prose/td.ts +0 -3
- package/.nuxt/ui/prose/th.ts +0 -3
- package/.nuxt/ui/prose/thead.ts +0 -3
- package/.nuxt/ui/prose/tr.ts +0 -3
- package/.nuxt/ui/prose/ul.ts +0 -3
- package/.nuxt/ui/radio-group.ts +0 -350
- package/.nuxt/ui/select-menu.ts +0 -361
- package/.nuxt/ui/select.ts +0 -348
- package/.nuxt/ui/separator.ts +0 -172
- package/.nuxt/ui/skeleton.ts +0 -3
- package/.nuxt/ui/slideover.ts +0 -71
- package/.nuxt/ui/slider.ts +0 -171
- package/.nuxt/ui/stepper.ts +0 -202
- package/.nuxt/ui/switch.ts +0 -131
- package/.nuxt/ui/table.ts +0 -162
- package/.nuxt/ui/tabs.ts +0 -258
- package/.nuxt/ui/textarea.ts +0 -294
- package/.nuxt/ui/timeline.ts +0 -321
- package/.nuxt/ui/toast.ts +0 -74
- package/.nuxt/ui/toaster.ts +0 -91
- package/.nuxt/ui/tooltip.ts +0 -9
- package/.nuxt/ui/tree.ts +0 -168
- package/.nuxt/ui/user.ts +0 -101
- package/.nuxt/ui.css +0 -146
- package/dist/runtime/vue/components/color-mode/ColorModeButton.d.vue.ts +0 -17
- package/dist/runtime/vue/components/color-mode/ColorModeButton.vue +0 -35
- package/dist/runtime/vue/components/color-mode/ColorModeButton.vue.d.ts +0 -17
|
@@ -3,7 +3,7 @@ import theme from "#build/ui/toast";
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
|
-
import { ref, computed, onMounted, nextTick } from "vue";
|
|
6
|
+
import { ref, computed, onMounted, nextTick, useTemplateRef } from "vue";
|
|
7
7
|
import { ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastClose, useForwardPropsEmits } from "reka-ui";
|
|
8
8
|
import { reactivePick } from "@vueuse/core";
|
|
9
9
|
import { useAppConfig } from "#imports";
|
|
@@ -42,14 +42,14 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.toast || {} }
|
|
|
42
42
|
orientation: props.orientation,
|
|
43
43
|
title: !!props.title || !!slots.title
|
|
44
44
|
}));
|
|
45
|
-
const
|
|
45
|
+
const rootRef = useTemplateRef("rootRef");
|
|
46
46
|
const height = ref(0);
|
|
47
47
|
onMounted(() => {
|
|
48
|
-
if (!
|
|
48
|
+
if (!rootRef.value) {
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
51
|
nextTick(() => {
|
|
52
|
-
height.value =
|
|
52
|
+
height.value = rootRef.value?.$el?.getBoundingClientRect()?.height;
|
|
53
53
|
});
|
|
54
54
|
});
|
|
55
55
|
defineExpose({
|
|
@@ -59,20 +59,21 @@ defineExpose({
|
|
|
59
59
|
|
|
60
60
|
<template>
|
|
61
61
|
<ToastRoot
|
|
62
|
-
ref="
|
|
62
|
+
ref="rootRef"
|
|
63
63
|
v-slot="{ remaining, duration, open }"
|
|
64
64
|
v-bind="rootProps"
|
|
65
65
|
:data-orientation="orientation"
|
|
66
|
+
data-slot="root"
|
|
66
67
|
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
67
68
|
:style="{ '--height': height }"
|
|
68
69
|
>
|
|
69
70
|
<slot name="leading" :ui="ui">
|
|
70
|
-
<UAvatar v-if="avatar" :size="props.ui?.avatarSize || ui.avatarSize()" v-bind="avatar" :class="ui.avatar({ class: props.ui?.avatar })" />
|
|
71
|
-
<UIcon v-else-if="icon" :name="icon" :class="ui.icon({ class: props.ui?.icon })" />
|
|
71
|
+
<UAvatar v-if="avatar" :size="props.ui?.avatarSize || ui.avatarSize()" v-bind="avatar" data-slot="avatar" :class="ui.avatar({ class: props.ui?.avatar })" />
|
|
72
|
+
<UIcon v-else-if="icon" :name="icon" data-slot="icon" :class="ui.icon({ class: props.ui?.icon })" />
|
|
72
73
|
</slot>
|
|
73
74
|
|
|
74
|
-
<div :class="ui.wrapper({ class: props.ui?.wrapper })">
|
|
75
|
-
<ToastTitle v-if="title || !!slots.title" :class="ui.title({ class: props.ui?.title })">
|
|
75
|
+
<div data-slot="wrapper" :class="ui.wrapper({ class: props.ui?.wrapper })">
|
|
76
|
+
<ToastTitle v-if="title || !!slots.title" data-slot="title" :class="ui.title({ class: props.ui?.title })">
|
|
76
77
|
<slot name="title">
|
|
77
78
|
<component :is="title()" v-if="typeof title === 'function'" />
|
|
78
79
|
<component :is="title" v-else-if="typeof title === 'object'" />
|
|
@@ -81,7 +82,7 @@ defineExpose({
|
|
|
81
82
|
</template>
|
|
82
83
|
</slot>
|
|
83
84
|
</ToastTitle>
|
|
84
|
-
<ToastDescription v-if="description || !!slots.description" :class="ui.description({ class: props.ui?.description })">
|
|
85
|
+
<ToastDescription v-if="description || !!slots.description" data-slot="description" :class="ui.description({ class: props.ui?.description })">
|
|
85
86
|
<slot name="description">
|
|
86
87
|
<component :is="description()" v-if="typeof description === 'function'" />
|
|
87
88
|
<component :is="description" v-else-if="typeof description === 'object'" />
|
|
@@ -91,7 +92,7 @@ defineExpose({
|
|
|
91
92
|
</slot>
|
|
92
93
|
</ToastDescription>
|
|
93
94
|
|
|
94
|
-
<div v-if="orientation === 'vertical' && (actions?.length || !!slots.actions)" :class="ui.actions({ class: props.ui?.actions })">
|
|
95
|
+
<div v-if="orientation === 'vertical' && (actions?.length || !!slots.actions)" data-slot="actions" :class="ui.actions({ class: props.ui?.actions })">
|
|
95
96
|
<slot name="actions">
|
|
96
97
|
<ToastAction v-for="(action, index) in actions" :key="index" :alt-text="action.label || 'Action'" as-child @click.stop>
|
|
97
98
|
<UButton size="xs" :color="color" v-bind="action" />
|
|
@@ -100,7 +101,7 @@ defineExpose({
|
|
|
100
101
|
</div>
|
|
101
102
|
</div>
|
|
102
103
|
|
|
103
|
-
<div v-if="orientation === 'horizontal' && (actions?.length || !!slots.actions) || close" :class="ui.actions({ class: props.ui?.actions, orientation: 'horizontal' })">
|
|
104
|
+
<div v-if="orientation === 'horizontal' && (actions?.length || !!slots.actions) || close" data-slot="actions" :class="ui.actions({ class: props.ui?.actions, orientation: 'horizontal' })">
|
|
104
105
|
<template v-if="orientation === 'horizontal' && (actions?.length || !!slots.actions)">
|
|
105
106
|
<slot name="actions">
|
|
106
107
|
<ToastAction v-for="(action, index) in actions" :key="index" :alt-text="action.label || 'Action'" as-child @click.stop>
|
|
@@ -118,6 +119,7 @@ defineExpose({
|
|
|
118
119
|
variant="link"
|
|
119
120
|
:aria-label="t('toast.close')"
|
|
120
121
|
v-bind="typeof close === 'object' ? close : {}"
|
|
122
|
+
data-slot="close"
|
|
121
123
|
:class="ui.close({ class: props.ui?.close })"
|
|
122
124
|
@click.stop
|
|
123
125
|
/>
|
|
@@ -131,6 +133,7 @@ defineExpose({
|
|
|
131
133
|
:color="color"
|
|
132
134
|
v-bind="typeof progress === 'object' ? progress : {}"
|
|
133
135
|
size="sm"
|
|
136
|
+
data-slot="progress"
|
|
134
137
|
:class="ui.progress({ class: props.ui?.progress })"
|
|
135
138
|
/>
|
|
136
139
|
</ToastRoot>
|
|
@@ -37,9 +37,9 @@ export interface ToasterSlots {
|
|
|
37
37
|
}
|
|
38
38
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ToasterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ToasterProps> & Readonly<{}>, {
|
|
39
39
|
progress: boolean;
|
|
40
|
+
max: number;
|
|
40
41
|
expand: boolean;
|
|
41
42
|
duration: number;
|
|
42
|
-
max: number;
|
|
43
43
|
portal: boolean | string | HTMLElement;
|
|
44
44
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ToasterSlots>;
|
|
45
45
|
declare const _default: typeof __VLS_export;
|
|
@@ -90,6 +90,7 @@ function getOffset(index) {
|
|
|
90
90
|
'--translate': expanded ? 'calc(var(--offset) * var(--translate-factor))' : 'calc(var(--before) * var(--gap))',
|
|
91
91
|
'--transform': 'translateY(var(--translate)) scale(var(--scale))'
|
|
92
92
|
}"
|
|
93
|
+
data-slot="base"
|
|
93
94
|
:class="ui.base({ class: [props.ui?.base, toast.onClick ? 'cursor-pointer' : void 0] })"
|
|
94
95
|
@update:open="onUpdateOpen($event, toast.id)"
|
|
95
96
|
@click="toast.onClick && toast.onClick(toast)"
|
|
@@ -98,6 +99,7 @@ function getOffset(index) {
|
|
|
98
99
|
<ToastPortal v-bind="portalProps">
|
|
99
100
|
<ToastViewport
|
|
100
101
|
:data-expanded="expanded"
|
|
102
|
+
data-slot="viewport"
|
|
101
103
|
:class="ui.viewport({ class: [props.ui?.viewport, props.class] })"
|
|
102
104
|
:style="{
|
|
103
105
|
'--scale-factor': '0.05',
|
|
@@ -37,9 +37,9 @@ export interface ToasterSlots {
|
|
|
37
37
|
}
|
|
38
38
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ToasterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ToasterProps> & Readonly<{}>, {
|
|
39
39
|
progress: boolean;
|
|
40
|
+
max: number;
|
|
40
41
|
expand: boolean;
|
|
41
42
|
duration: number;
|
|
42
|
-
max: number;
|
|
43
43
|
portal: boolean | string | HTMLElement;
|
|
44
44
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ToasterSlots>;
|
|
45
45
|
declare const _default: typeof __VLS_export;
|
|
@@ -47,16 +47,16 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.tooltip || {}
|
|
|
47
47
|
</TooltipTrigger>
|
|
48
48
|
|
|
49
49
|
<TooltipPortal v-bind="portalProps">
|
|
50
|
-
<TooltipContent v-bind="contentProps" :class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })">
|
|
50
|
+
<TooltipContent v-bind="contentProps" data-slot="content" :class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })">
|
|
51
51
|
<slot name="content" :ui="ui">
|
|
52
|
-
<span v-if="text" :class="ui.text({ class: props.ui?.text })">{{ text }}</span>
|
|
52
|
+
<span v-if="text" data-slot="text" :class="ui.text({ class: props.ui?.text })">{{ text }}</span>
|
|
53
53
|
|
|
54
|
-
<span v-if="kbds?.length" :class="ui.kbds({ class: props.ui?.kbds })">
|
|
54
|
+
<span v-if="kbds?.length" data-slot="kbds" :class="ui.kbds({ class: props.ui?.kbds })">
|
|
55
55
|
<UKbd v-for="(kbd, index) in kbds" :key="index" :size="props.ui?.kbdsSize || ui.kbdsSize()" v-bind="typeof kbd === 'string' ? { value: kbd } : kbd" />
|
|
56
56
|
</span>
|
|
57
57
|
</slot>
|
|
58
58
|
|
|
59
|
-
<TooltipArrow v-if="!!arrow" v-bind="arrowProps" :class="ui.arrow({ class: props.ui?.arrow })" />
|
|
59
|
+
<TooltipArrow v-if="!!arrow" v-bind="arrowProps" data-slot="arrow" :class="ui.arrow({ class: props.ui?.arrow })" />
|
|
60
60
|
</TooltipContent>
|
|
61
61
|
</TooltipPortal>
|
|
62
62
|
</TooltipRoot>
|
|
@@ -136,7 +136,7 @@ declare const __VLS_export: <T extends TreeItem[], M extends boolean = false>(__
|
|
|
136
136
|
"onUpdate:expanded"?: ((val: string[]) => any) | undefined;
|
|
137
137
|
}> & import("vue").PublicProps;
|
|
138
138
|
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
139
|
-
readonly $el:
|
|
139
|
+
readonly $el: HTMLElement;
|
|
140
140
|
}>) => void;
|
|
141
141
|
attrs: any;
|
|
142
142
|
slots: TreeSlots<T>;
|
|
@@ -3,12 +3,13 @@ import theme from "#build/ui/tree";
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
|
-
import { computed, toRef,
|
|
6
|
+
import { computed, toRef, useTemplateRef } from "vue";
|
|
7
7
|
import { TreeRoot, TreeItem, TreeVirtualizer, useForwardPropsEmits } from "reka-ui";
|
|
8
8
|
import { reactivePick, createReusableTemplate } from "@vueuse/core";
|
|
9
9
|
import { defu } from "defu";
|
|
10
10
|
import { useAppConfig } from "#imports";
|
|
11
11
|
import { get } from "../utils";
|
|
12
|
+
import { getEstimateSize } from "../utils/virtualizer";
|
|
12
13
|
import { tv } from "../utils/tv";
|
|
13
14
|
import UIcon from "./Icon.vue";
|
|
14
15
|
defineOptions({ inheritAttrs: false });
|
|
@@ -65,15 +66,12 @@ const flattenedPaddingFormula = computed(() => {
|
|
|
65
66
|
const config = sizeConfig[props.size || "md"];
|
|
66
67
|
return (level) => `calc(var(--spacing) * ${(level - 1) * config.perLevel + config.base})`;
|
|
67
68
|
});
|
|
68
|
-
const virtualizerProps = toRef(() =>
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
xl: 40
|
|
75
|
-
}[props.size || "md"]
|
|
76
|
-
}));
|
|
69
|
+
const virtualizerProps = toRef(() => {
|
|
70
|
+
if (!props.virtualize) return false;
|
|
71
|
+
return defu(typeof props.virtualize === "boolean" ? {} : props.virtualize, {
|
|
72
|
+
estimateSize: getEstimateSize(props.items || [], props.size || "md")
|
|
73
|
+
});
|
|
74
|
+
});
|
|
77
75
|
const [DefineTreeTemplate, ReuseTreeTemplate] = createReusableTemplate();
|
|
78
76
|
const [DefineItemTemplate, ReuseItemTemplate] = createReusableTemplate({
|
|
79
77
|
props: {
|
|
@@ -96,7 +94,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.tree || {} })
|
|
|
96
94
|
size: props.size,
|
|
97
95
|
virtualize: !!props.virtualize
|
|
98
96
|
}));
|
|
99
|
-
const rootRef =
|
|
97
|
+
const rootRef = useTemplateRef("rootRef");
|
|
100
98
|
function getItemLabel(item) {
|
|
101
99
|
return get(item, props.labelKey);
|
|
102
100
|
}
|
|
@@ -139,6 +137,7 @@ defineExpose({
|
|
|
139
137
|
:is="as.link"
|
|
140
138
|
:type="as.link === 'button' ? 'button' : void 0"
|
|
141
139
|
:disabled="item.disabled || disabled"
|
|
140
|
+
data-slot="link"
|
|
142
141
|
:class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], selected: isSelected, disabled: item.disabled || disabled })"
|
|
143
142
|
:style="!nested && level > 1 ? { paddingLeft: flattenedPaddingFormula(level) } : void 0"
|
|
144
143
|
>
|
|
@@ -155,17 +154,20 @@ defineExpose({
|
|
|
155
154
|
<UIcon
|
|
156
155
|
v-if="item.icon"
|
|
157
156
|
:name="item.icon"
|
|
157
|
+
data-slot="linkLeadingIcon"
|
|
158
158
|
:class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon] })"
|
|
159
159
|
/>
|
|
160
160
|
<UIcon
|
|
161
161
|
v-else-if="item.children?.length"
|
|
162
162
|
:name="isExpanded ? expandedIcon ?? appConfig.ui.icons.folderOpen : collapsedIcon ?? appConfig.ui.icons.folder"
|
|
163
|
+
data-slot="linkLeadingIcon"
|
|
163
164
|
:class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon] })"
|
|
164
165
|
/>
|
|
165
166
|
</slot>
|
|
166
167
|
|
|
167
168
|
<span
|
|
168
169
|
v-if="getItemLabel(item) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']"
|
|
170
|
+
data-slot="linkLabel"
|
|
169
171
|
:class="ui.linkLabel({ class: [props.ui?.linkLabel, item.ui?.linkLabel] })"
|
|
170
172
|
>
|
|
171
173
|
<slot
|
|
@@ -179,6 +181,7 @@ defineExpose({
|
|
|
179
181
|
|
|
180
182
|
<span
|
|
181
183
|
v-if="item.trailingIcon || item.children?.length || !!slots[item.slot ? `${item.slot}-trailing` : 'item-trailing']"
|
|
184
|
+
data-slot="linkTrailing"
|
|
182
185
|
:class="ui.linkTrailing({ class: [props.ui?.linkTrailing, item.ui?.linkTrailing] })"
|
|
183
186
|
>
|
|
184
187
|
<slot
|
|
@@ -189,11 +192,13 @@ defineExpose({
|
|
|
189
192
|
<UIcon
|
|
190
193
|
v-if="item.trailingIcon"
|
|
191
194
|
:name="item.trailingIcon"
|
|
195
|
+
data-slot="linkTrailingIcon"
|
|
192
196
|
:class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon] })"
|
|
193
197
|
/>
|
|
194
198
|
<UIcon
|
|
195
199
|
v-else-if="item.children?.length"
|
|
196
200
|
:name="trailingIcon ?? appConfig.ui.icons.chevronDown"
|
|
201
|
+
data-slot="linkTrailingIcon"
|
|
197
202
|
:class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon] })"
|
|
198
203
|
/>
|
|
199
204
|
</slot>
|
|
@@ -205,6 +210,7 @@ defineExpose({
|
|
|
205
210
|
<ul
|
|
206
211
|
v-if="nested && item.children?.length && isExpanded"
|
|
207
212
|
role="group"
|
|
213
|
+
data-slot="listWithChildren"
|
|
208
214
|
:class="ui.listWithChildren({ class: [props.ui?.listWithChildren, item.ui?.listWithChildren] })"
|
|
209
215
|
>
|
|
210
216
|
<ReuseTreeTemplate :items="item.children" :level="level + 1" />
|
|
@@ -224,6 +230,7 @@ defineExpose({
|
|
|
224
230
|
:as="as.root"
|
|
225
231
|
:model-value="modelValue"
|
|
226
232
|
:default-value="defaultValue"
|
|
233
|
+
data-slot="root"
|
|
227
234
|
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
228
235
|
:get-key="getItemKey"
|
|
229
236
|
:default-expanded="defaultExpanded"
|
|
@@ -136,7 +136,7 @@ declare const __VLS_export: <T extends TreeItem[], M extends boolean = false>(__
|
|
|
136
136
|
"onUpdate:expanded"?: ((val: string[]) => any) | undefined;
|
|
137
137
|
}> & import("vue").PublicProps;
|
|
138
138
|
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
139
|
-
readonly $el:
|
|
139
|
+
readonly $el: HTMLElement;
|
|
140
140
|
}>) => void;
|
|
141
141
|
attrs: any;
|
|
142
142
|
slots: TreeSlots<T>;
|
|
@@ -35,15 +35,22 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.user || {} })
|
|
|
35
35
|
</script>
|
|
36
36
|
|
|
37
37
|
<template>
|
|
38
|
-
<Primitive :as="as" :data-orientation="orientation" :class="ui.root({ class: [props.ui?.root, props.class] })" @click="onClick">
|
|
38
|
+
<Primitive :as="as" :data-orientation="orientation" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })" @click="onClick">
|
|
39
39
|
<slot name="avatar" :ui="ui">
|
|
40
40
|
<UChip v-if="chip && avatar" inset v-bind="typeof chip === 'object' ? chip : {}" :size="size">
|
|
41
|
-
<UAvatar :alt="name" v-bind="avatar" :size="size" :class="ui.avatar({ class: props.ui?.avatar })" />
|
|
41
|
+
<UAvatar :alt="name" v-bind="avatar" :size="size" data-slot="avatar" :class="ui.avatar({ class: props.ui?.avatar })" />
|
|
42
42
|
</UChip>
|
|
43
|
-
<UAvatar
|
|
43
|
+
<UAvatar
|
|
44
|
+
v-else-if="avatar"
|
|
45
|
+
:alt="name"
|
|
46
|
+
v-bind="avatar"
|
|
47
|
+
:size="size"
|
|
48
|
+
data-slot="avatar"
|
|
49
|
+
:class="ui.avatar({ class: props.ui?.avatar })"
|
|
50
|
+
/>
|
|
44
51
|
</slot>
|
|
45
52
|
|
|
46
|
-
<div :class="ui.wrapper({ class: props.ui?.wrapper })">
|
|
53
|
+
<div data-slot="wrapper" :class="ui.wrapper({ class: props.ui?.wrapper })">
|
|
47
54
|
<ULink
|
|
48
55
|
v-if="to"
|
|
49
56
|
:aria-label="name"
|
|
@@ -56,12 +63,12 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.user || {} })
|
|
|
56
63
|
</ULink>
|
|
57
64
|
|
|
58
65
|
<slot>
|
|
59
|
-
<p v-if="name || !!slots.name" :class="ui.name({ class: props.ui?.name })">
|
|
66
|
+
<p v-if="name || !!slots.name" data-slot="name" :class="ui.name({ class: props.ui?.name })">
|
|
60
67
|
<slot name="name">
|
|
61
68
|
{{ name }}
|
|
62
69
|
</slot>
|
|
63
70
|
</p>
|
|
64
|
-
<p v-if="description || !!slots.description" :class="ui.description({ class: props.ui?.description })">
|
|
71
|
+
<p v-if="description || !!slots.description" data-slot="description" :class="ui.description({ class: props.ui?.description })">
|
|
65
72
|
<slot name="description">
|
|
66
73
|
{{ description }}
|
|
67
74
|
</slot>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { AvatarProps } from '
|
|
2
|
-
export interface ColorModeAvatarProps extends
|
|
1
|
+
import type { AvatarProps } from '../../types';
|
|
2
|
+
export interface ColorModeAvatarProps extends Omit<AvatarProps, 'src'> {
|
|
3
3
|
light: string;
|
|
4
4
|
dark: string;
|
|
5
5
|
}
|
|
6
|
-
declare const __VLS_export: import("vue").DefineComponent<
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<ColorModeAvatarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeAvatarProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
7
|
declare const _default: typeof __VLS_export;
|
|
8
8
|
export default _default;
|
|
@@ -3,15 +3,27 @@
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
|
+
import { useForwardProps } from "reka-ui";
|
|
7
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
6
8
|
import UAvatar from "../Avatar.vue";
|
|
7
9
|
defineOptions({ inheritAttrs: false });
|
|
8
|
-
defineProps({
|
|
10
|
+
const props = defineProps({
|
|
9
11
|
light: { type: String, required: true },
|
|
10
|
-
dark: { type: String, required: true }
|
|
12
|
+
dark: { type: String, required: true },
|
|
13
|
+
as: { type: null, required: false },
|
|
14
|
+
alt: { type: String, required: false },
|
|
15
|
+
icon: { type: [String, Object], required: false },
|
|
16
|
+
text: { type: String, required: false },
|
|
17
|
+
size: { type: null, required: false },
|
|
18
|
+
chip: { type: [Boolean, Object], required: false },
|
|
19
|
+
class: { type: null, required: false },
|
|
20
|
+
style: { type: null, required: false },
|
|
21
|
+
ui: { type: null, required: false }
|
|
11
22
|
});
|
|
23
|
+
const avatarProps = useForwardProps(reactiveOmit(props, "light", "dark"));
|
|
12
24
|
</script>
|
|
13
25
|
|
|
14
26
|
<template>
|
|
15
|
-
<UAvatar :src="light" class="dark:hidden"
|
|
16
|
-
<UAvatar :src="dark" class="hidden dark:block"
|
|
27
|
+
<UAvatar v-bind="{ ...avatarProps, ...$attrs }" :src="light" class="dark:hidden" />
|
|
28
|
+
<UAvatar v-bind="{ ...avatarProps, ...$attrs }" :src="dark" class="hidden dark:block" />
|
|
17
29
|
</template>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { AvatarProps } from '
|
|
2
|
-
export interface ColorModeAvatarProps extends
|
|
1
|
+
import type { AvatarProps } from '../../types';
|
|
2
|
+
export interface ColorModeAvatarProps extends Omit<AvatarProps, 'src'> {
|
|
3
3
|
light: string;
|
|
4
4
|
dark: string;
|
|
5
5
|
}
|
|
6
|
-
declare const __VLS_export: import("vue").DefineComponent<
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<ColorModeAvatarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeAvatarProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
7
|
declare const _default: typeof __VLS_export;
|
|
8
8
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ButtonProps } from '
|
|
2
|
-
export interface ColorModeButtonProps extends
|
|
1
|
+
import type { ButtonProps } from '../../types';
|
|
2
|
+
export interface ColorModeButtonProps extends Omit<ButtonProps, 'color' | 'variant'> {
|
|
3
3
|
/**
|
|
4
4
|
* @defaultValue 'neutral'
|
|
5
5
|
*/
|
|
@@ -9,16 +9,9 @@ export interface ColorModeButtonProps extends /** @vue-ignore */ Pick<ButtonProp
|
|
|
9
9
|
*/
|
|
10
10
|
variant?: ButtonProps['variant'];
|
|
11
11
|
}
|
|
12
|
-
declare const __VLS_export:
|
|
13
|
-
color:
|
|
14
|
-
variant:
|
|
15
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any
|
|
16
|
-
fallback(props?: {}): any;
|
|
17
|
-
}>;
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<ColorModeButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeButtonProps> & Readonly<{}>, {
|
|
13
|
+
color: "error" | "info" | "primary" | "secondary" | "success" | "warning" | "neutral";
|
|
14
|
+
variant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
16
|
declare const _default: typeof __VLS_export;
|
|
19
17
|
export default _default;
|
|
20
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
-
new (): {
|
|
22
|
-
$slots: S;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
@@ -4,18 +4,62 @@
|
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed } from "vue";
|
|
7
|
+
import { useForwardProps } from "reka-ui";
|
|
8
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
7
9
|
import { useColorMode, useAppConfig } from "#imports";
|
|
8
10
|
import { useLocale } from "../../composables/useLocale";
|
|
9
11
|
import UButton from "../Button.vue";
|
|
10
12
|
defineOptions({ inheritAttrs: false });
|
|
11
|
-
defineProps({
|
|
13
|
+
const props = defineProps({
|
|
12
14
|
color: { type: null, required: false, default: "neutral" },
|
|
13
|
-
variant: { type: null, required: false, default: "ghost" }
|
|
15
|
+
variant: { type: null, required: false, default: "ghost" },
|
|
16
|
+
label: { type: String, required: false },
|
|
17
|
+
activeColor: { type: null, required: false },
|
|
18
|
+
activeVariant: { type: null, required: false },
|
|
19
|
+
size: { type: null, required: false },
|
|
20
|
+
square: { type: Boolean, required: false },
|
|
21
|
+
block: { type: Boolean, required: false },
|
|
22
|
+
loadingAuto: { type: Boolean, required: false },
|
|
23
|
+
onClick: { type: [Function, Array], required: false },
|
|
24
|
+
class: { type: null, required: false },
|
|
25
|
+
ui: { type: null, required: false },
|
|
26
|
+
icon: { type: [String, Object], required: false },
|
|
27
|
+
avatar: { type: Object, required: false },
|
|
28
|
+
leading: { type: Boolean, required: false },
|
|
29
|
+
leadingIcon: { type: [String, Object], required: false },
|
|
30
|
+
trailing: { type: Boolean, required: false },
|
|
31
|
+
trailingIcon: { type: [String, Object], required: false },
|
|
32
|
+
loading: { type: Boolean, required: false },
|
|
33
|
+
loadingIcon: { type: [String, Object], required: false },
|
|
34
|
+
as: { type: null, required: false },
|
|
35
|
+
type: { type: null, required: false },
|
|
36
|
+
disabled: { type: Boolean, required: false },
|
|
37
|
+
active: { type: Boolean, required: false },
|
|
38
|
+
exact: { type: Boolean, required: false },
|
|
39
|
+
exactQuery: { type: [Boolean, String], required: false },
|
|
40
|
+
exactHash: { type: Boolean, required: false },
|
|
41
|
+
inactiveClass: { type: String, required: false },
|
|
42
|
+
to: { type: null, required: false },
|
|
43
|
+
href: { type: null, required: false },
|
|
44
|
+
external: { type: Boolean, required: false },
|
|
45
|
+
target: { type: [String, Object, null], required: false },
|
|
46
|
+
rel: { type: [String, Object, null], required: false },
|
|
47
|
+
noRel: { type: Boolean, required: false },
|
|
48
|
+
prefetchedClass: { type: String, required: false },
|
|
49
|
+
prefetch: { type: Boolean, required: false },
|
|
50
|
+
prefetchOn: { type: [String, Object], required: false },
|
|
51
|
+
noPrefetch: { type: Boolean, required: false },
|
|
52
|
+
trailingSlash: { type: String, required: false },
|
|
53
|
+
activeClass: { type: String, required: false },
|
|
54
|
+
exactActiveClass: { type: String, required: false },
|
|
55
|
+
ariaCurrentValue: { type: String, required: false },
|
|
56
|
+
viewTransition: { type: Boolean, required: false },
|
|
57
|
+
replace: { type: Boolean, required: false }
|
|
14
58
|
});
|
|
15
|
-
defineSlots();
|
|
16
59
|
const { t } = useLocale();
|
|
17
60
|
const colorMode = useColorMode();
|
|
18
61
|
const appConfig = useAppConfig();
|
|
62
|
+
const buttonProps = useForwardProps(reactiveOmit(props, "icon"));
|
|
19
63
|
const isDark = computed({
|
|
20
64
|
get() {
|
|
21
65
|
return colorMode.value === "dark";
|
|
@@ -27,20 +71,17 @@ const isDark = computed({
|
|
|
27
71
|
</script>
|
|
28
72
|
|
|
29
73
|
<template>
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<slot name="fallback">
|
|
42
|
-
<div class="size-8" />
|
|
43
|
-
</slot>
|
|
74
|
+
<UButton
|
|
75
|
+
v-bind="{
|
|
76
|
+
...buttonProps,
|
|
77
|
+
'aria-label': isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark'),
|
|
78
|
+
...$attrs
|
|
79
|
+
}"
|
|
80
|
+
@click="isDark = !isDark"
|
|
81
|
+
>
|
|
82
|
+
<template #leading="{ ui }">
|
|
83
|
+
<UIcon :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" class="hidden dark:inline" :name="appConfig.ui.icons.dark" />
|
|
84
|
+
<UIcon :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" class="inline dark:hidden" :name="appConfig.ui.icons.light" />
|
|
44
85
|
</template>
|
|
45
|
-
</
|
|
86
|
+
</UButton>
|
|
46
87
|
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ButtonProps } from '
|
|
2
|
-
export interface ColorModeButtonProps extends
|
|
1
|
+
import type { ButtonProps } from '../../types';
|
|
2
|
+
export interface ColorModeButtonProps extends Omit<ButtonProps, 'color' | 'variant'> {
|
|
3
3
|
/**
|
|
4
4
|
* @defaultValue 'neutral'
|
|
5
5
|
*/
|
|
@@ -9,16 +9,9 @@ export interface ColorModeButtonProps extends /** @vue-ignore */ Pick<ButtonProp
|
|
|
9
9
|
*/
|
|
10
10
|
variant?: ButtonProps['variant'];
|
|
11
11
|
}
|
|
12
|
-
declare const __VLS_export:
|
|
13
|
-
color:
|
|
14
|
-
variant:
|
|
15
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any
|
|
16
|
-
fallback(props?: {}): any;
|
|
17
|
-
}>;
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<ColorModeButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeButtonProps> & Readonly<{}>, {
|
|
13
|
+
color: "error" | "info" | "primary" | "secondary" | "success" | "warning" | "neutral";
|
|
14
|
+
variant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
16
|
declare const _default: typeof __VLS_export;
|
|
19
17
|
export default _default;
|
|
20
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
-
new (): {
|
|
22
|
-
$slots: S;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
type
|
|
1
|
+
import type { ImgHTMLAttributes } from '../../types/html';
|
|
2
|
+
export interface ColorModeImageProps extends /** @vue-ignore */ Omit<ImgHTMLAttributes, 'src'> {
|
|
2
3
|
dark: string;
|
|
3
4
|
light: string;
|
|
4
|
-
}
|
|
5
|
-
declare const __VLS_export: import("vue").DefineComponent<
|
|
5
|
+
}
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<ColorModeImageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeImageProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
7
|
declare const _default: typeof __VLS_export;
|
|
7
8
|
export default _default;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
type
|
|
1
|
+
import type { ImgHTMLAttributes } from '../../types/html';
|
|
2
|
+
export interface ColorModeImageProps extends /** @vue-ignore */ Omit<ImgHTMLAttributes, 'src'> {
|
|
2
3
|
dark: string;
|
|
3
4
|
light: string;
|
|
4
|
-
}
|
|
5
|
-
declare const __VLS_export: import("vue").DefineComponent<
|
|
5
|
+
}
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<ColorModeImageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeImageProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
7
|
declare const _default: typeof __VLS_export;
|
|
7
8
|
export default _default;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { SelectMenuProps } from '
|
|
2
|
-
export interface ColorModeSelectProps extends
|
|
1
|
+
import type { SelectMenuProps, SelectMenuItem } from '../../types';
|
|
2
|
+
export interface ColorModeSelectProps extends Omit<SelectMenuProps<SelectMenuItem[]>, 'icon' | 'items' | 'modelValue'> {
|
|
3
3
|
}
|
|
4
|
-
declare const __VLS_export: import("vue").DefineComponent<ColorModeSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeSelectProps> & Readonly<{}>, {
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<ColorModeSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeSelectProps> & Readonly<{}>, {
|
|
5
|
+
searchInput: boolean | import("../Input.vue").InputProps;
|
|
6
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
7
|
declare const _default: typeof __VLS_export;
|
|
6
8
|
export default _default;
|