@eslamdevui/ui 3.2.0-beta.1 → 3.2.0-beta.2
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/alert.ts +5 -0
- package/.nuxt/ui/badge.ts +5 -0
- package/.nuxt/ui/button-group.ts +13 -0
- package/.nuxt/ui/button.ts +5 -0
- package/.nuxt/ui/carousel.ts +5 -0
- package/.nuxt/ui/content/content-navigation.ts +339 -0
- package/.nuxt/ui/content/content-search-button.ts +6 -0
- package/.nuxt/ui/content/content-search.ts +6 -0
- package/.nuxt/ui/content/content-surround.ts +39 -0
- package/.nuxt/ui/content/content-toc.ts +150 -0
- package/.nuxt/ui/content/index.ts +5 -0
- package/.nuxt/ui/content-surround.ts +5 -0
- package/.nuxt/ui/content-toc.ts +6 -6
- package/.nuxt/ui/dashboard-navbar.ts +5 -0
- package/.nuxt/ui/dashboard-sidebar-collapse.ts +5 -0
- package/.nuxt/ui/dashboard-sidebar-toggle.ts +5 -0
- package/.nuxt/ui/dashboard-sidebar.ts +10 -0
- package/.nuxt/ui/error.ts +9 -0
- package/.nuxt/ui/index.ts +48 -1
- package/.nuxt/ui/input-menu.ts +9 -0
- package/.nuxt/ui/input-number.ts +5 -0
- package/.nuxt/ui/input-tags.ts +9 -0
- package/.nuxt/ui/input.ts +9 -0
- package/.nuxt/ui/prose/a.ts +6 -0
- package/.nuxt/ui/prose/accordion-item.ts +3 -0
- package/.nuxt/ui/prose/accordion.ts +6 -0
- package/.nuxt/ui/prose/badge.ts +3 -0
- package/.nuxt/ui/prose/blockquote.ts +3 -0
- package/.nuxt/ui/prose/callout.ts +129 -0
- package/.nuxt/ui/prose/card-group.ts +3 -0
- package/.nuxt/ui/prose/card.ts +119 -0
- package/.nuxt/ui/prose/code-collapse.ts +19 -0
- package/.nuxt/ui/prose/code-group.ts +13 -0
- package/.nuxt/ui/prose/code-icon.ts +66 -0
- package/.nuxt/ui/prose/code-preview.ts +14 -0
- package/.nuxt/ui/prose/code-tree.ts +28 -0
- package/.nuxt/ui/prose/code.ts +27 -0
- package/.nuxt/ui/prose/collapsible.ts +12 -0
- package/.nuxt/ui/prose/em.ts +3 -0
- package/.nuxt/ui/prose/field-group.ts +3 -0
- package/.nuxt/ui/prose/field.ts +11 -0
- package/.nuxt/ui/prose/h1.ts +6 -0
- package/.nuxt/ui/prose/h2.ts +14 -0
- package/.nuxt/ui/prose/h3.ts +14 -0
- package/.nuxt/ui/prose/h4.ts +6 -0
- package/.nuxt/ui/prose/hr.ts +3 -0
- package/.nuxt/ui/prose/icon.ts +3 -0
- package/.nuxt/ui/prose/img.ts +3 -0
- package/.nuxt/ui/prose/index.ts +41 -0
- package/.nuxt/ui/prose/kbd.ts +3 -0
- package/.nuxt/ui/prose/li.ts +3 -0
- package/.nuxt/ui/prose/ol.ts +3 -0
- package/.nuxt/ui/prose/p.ts +3 -0
- package/.nuxt/ui/prose/pre.ts +17 -0
- package/.nuxt/ui/prose/steps.ts +19 -0
- package/.nuxt/ui/prose/strong.ts +3 -0
- package/.nuxt/ui/prose/table.ts +6 -0
- package/.nuxt/ui/prose/tabs-item.ts +3 -0
- package/.nuxt/ui/prose/tabs.ts +5 -0
- package/.nuxt/ui/prose/tbody.ts +3 -0
- package/.nuxt/ui/prose/td.ts +3 -0
- package/.nuxt/ui/prose/th.ts +3 -0
- package/.nuxt/ui/prose/thead.ts +3 -0
- package/.nuxt/ui/prose/tr.ts +3 -0
- package/.nuxt/ui/prose/ul.ts +3 -0
- package/.nuxt/ui/select-menu.ts +9 -0
- package/.nuxt/ui/select.ts +9 -0
- package/.nuxt/ui/textarea.ts +9 -0
- package/.nuxt/ui/toast.ts +5 -0
- package/LICENSE.md +9 -9
- package/README.md +147 -147
- package/cli/commands/make/component.mjs +95 -95
- package/cli/commands/make/index.mjs +14 -14
- package/cli/commands/make/locale.mjs +64 -64
- package/cli/index.mjs +15 -15
- package/cli/package.json +13 -13
- package/cli/templates.mjs +236 -228
- package/cli/utils.mjs +31 -31
- package/dist/module.json +1 -1
- package/dist/module.mjs +18 -13
- package/dist/runtime/components/Accordion.vue +36 -36
- package/dist/runtime/components/Alert.vue +46 -46
- package/dist/runtime/components/App.vue +10 -10
- package/dist/runtime/components/Avatar.vue +27 -27
- package/dist/runtime/components/AvatarGroup.vue +4 -4
- package/dist/runtime/components/Badge.vue +16 -16
- package/dist/runtime/components/Breadcrumb.vue +32 -32
- package/dist/runtime/components/Button.vue +28 -28
- package/dist/runtime/components/ButtonGroup.vue +3 -3
- package/dist/runtime/components/Calendar.vue +74 -74
- package/dist/runtime/components/Card.vue +13 -13
- package/dist/runtime/components/Carousel.vue +58 -58
- package/dist/runtime/components/ChatMessage.vue +35 -35
- package/dist/runtime/components/ChatMessages.vue +71 -71
- package/dist/runtime/components/ChatMessages.vue.d.ts +1 -2
- package/dist/runtime/components/ChatPrompt.vue +30 -31
- package/dist/runtime/components/ChatPrompt.vue.d.ts +4 -4
- package/dist/runtime/components/ChatPromptSubmit.vue +10 -10
- package/dist/runtime/components/Checkbox.vue +33 -33
- package/dist/runtime/components/CheckboxGroup.vue +32 -32
- package/dist/runtime/components/Chip.vue +11 -11
- package/dist/runtime/components/Collapsible.vue +9 -9
- package/dist/runtime/components/ColorPicker.vue +30 -30
- package/dist/runtime/components/CommandPalette.vue +117 -117
- package/dist/runtime/components/Container.vue +3 -3
- package/dist/runtime/components/ContextMenu.vue +22 -22
- package/dist/runtime/components/ContextMenuContent.vue +105 -105
- package/dist/runtime/components/DashboardGroup.vue +3 -3
- package/dist/runtime/components/DashboardNavbar.vue +41 -41
- package/dist/runtime/components/DashboardNavbar.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardPanel.vue +29 -29
- package/dist/runtime/components/DashboardPanel.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardResizeHandle.vue +7 -7
- package/dist/runtime/components/DashboardSearch.vue +24 -25
- package/dist/runtime/components/DashboardSearch.vue.d.ts +3 -3
- package/dist/runtime/components/DashboardSearchButton.vue +63 -41
- package/dist/runtime/components/DashboardSearchButton.vue.d.ts +7 -1
- package/dist/runtime/components/DashboardSidebar.vue +77 -77
- package/dist/runtime/components/DashboardSidebarCollapse.vue +7 -7
- package/dist/runtime/components/DashboardSidebarCollapse.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardSidebarToggle.vue +14 -17
- package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +4 -6
- package/dist/runtime/components/Drawer.vue +55 -55
- package/dist/runtime/components/DropdownMenu.vue +24 -24
- package/dist/runtime/components/DropdownMenuContent.vue +107 -107
- package/dist/runtime/components/Error.vue +57 -0
- package/dist/runtime/components/Error.vue.d.ts +52 -0
- package/dist/runtime/components/Form.vue +8 -8
- package/dist/runtime/components/Form.vue.d.ts +1 -1
- package/dist/runtime/components/FormField.vue +37 -37
- package/dist/runtime/components/Icon.vue +1 -1
- package/dist/runtime/components/Input.vue +34 -34
- package/dist/runtime/components/InputMenu.vue +163 -163
- package/dist/runtime/components/InputNumber.vue +49 -49
- package/dist/runtime/components/InputTags.vue +55 -55
- package/dist/runtime/components/Kbd.vue +5 -5
- package/dist/runtime/components/Link.vue +14 -14
- package/dist/runtime/components/LinkBase.vue +8 -8
- package/dist/runtime/components/Modal.vue +69 -69
- package/dist/runtime/components/NavigationMenu.vue +166 -166
- package/dist/runtime/components/OverlayProvider.vue +9 -9
- package/dist/runtime/components/Pagination.vue +47 -47
- package/dist/runtime/components/PinInput.vue +20 -20
- package/dist/runtime/components/Popover.vue +17 -17
- package/dist/runtime/components/Progress.vue +19 -19
- package/dist/runtime/components/RadioGroup.vue +43 -43
- package/dist/runtime/components/Select.vue +96 -96
- package/dist/runtime/components/SelectMenu.vue +130 -130
- package/dist/runtime/components/Separator.vue +15 -15
- package/dist/runtime/components/Skeleton.vue +10 -10
- package/dist/runtime/components/Slideover.vue +76 -76
- package/dist/runtime/components/Slider.vue +27 -27
- package/dist/runtime/components/Stepper.vue +51 -51
- package/dist/runtime/components/Switch.vue +33 -33
- package/dist/runtime/components/Table.vue +77 -77
- package/dist/runtime/components/Tabs.vue +37 -37
- package/dist/runtime/components/Textarea.vue +33 -33
- package/dist/runtime/components/Timeline.vue +38 -38
- package/dist/runtime/components/Toast.vue +69 -69
- package/dist/runtime/components/Toaster.vue +28 -28
- package/dist/runtime/components/Tooltip.vue +19 -19
- package/dist/runtime/components/Tree.vue +60 -60
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue +2 -2
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue.d.ts +2 -2
- package/dist/runtime/components/color-mode/ColorModeButton.vue +16 -16
- package/dist/runtime/components/color-mode/ColorModeButton.vue.d.ts +3 -3
- package/dist/runtime/components/color-mode/ColorModeImage.vue +2 -2
- package/dist/runtime/components/color-mode/ColorModeSelect.vue +19 -19
- package/dist/runtime/components/color-mode/ColorModeSelect.vue.d.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue +19 -19
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue.d.ts +1 -1
- package/dist/runtime/components/content/ContentNavigation.vue +175 -0
- package/dist/runtime/components/content/ContentNavigation.vue.d.ts +53 -0
- package/dist/runtime/components/content/ContentSearch.vue +184 -0
- package/dist/runtime/components/content/ContentSearch.vue.d.ts +111 -0
- package/dist/runtime/components/content/ContentSearchButton.vue +95 -0
- package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +12 -0
- package/dist/runtime/components/content/ContentSurround.vue +61 -0
- package/dist/runtime/components/content/ContentSurround.vue.d.ts +59 -0
- package/dist/runtime/components/content/ContentToc.vue +146 -0
- package/dist/runtime/components/content/ContentToc.vue.d.ts +88 -0
- package/dist/runtime/components/locale/LocaleSelect.vue +20 -20
- package/dist/runtime/components/locale/LocaleSelect.vue.d.ts +1 -1
- package/dist/runtime/components/prose/A.vue +24 -0
- package/dist/runtime/components/prose/A.vue.d.ts +15 -0
- package/dist/runtime/components/prose/Accordion.vue +43 -0
- package/dist/runtime/components/prose/Accordion.vue.d.ts +16 -0
- package/dist/runtime/components/prose/AccordionItem.vue +25 -0
- package/dist/runtime/components/prose/AccordionItem.vue.d.ts +15 -0
- package/dist/runtime/components/prose/Badge.vue +21 -0
- package/dist/runtime/components/prose/Badge.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Blockquote.vue +21 -0
- package/dist/runtime/components/prose/Blockquote.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Callout.vue +60 -0
- package/dist/runtime/components/prose/Callout.vue.d.ts +26 -0
- package/dist/runtime/components/prose/Card.vue +83 -0
- package/dist/runtime/components/prose/Card.vue.d.ts +30 -0
- package/dist/runtime/components/prose/CardGroup.vue +21 -0
- package/dist/runtime/components/prose/CardGroup.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Code.vue +23 -0
- package/dist/runtime/components/prose/Code.vue.d.ts +22 -0
- package/dist/runtime/components/prose/CodeCollapse.vue +44 -0
- package/dist/runtime/components/prose/CodeCollapse.vue.d.ts +46 -0
- package/dist/runtime/components/prose/CodeGroup.vue +70 -0
- package/dist/runtime/components/prose/CodeGroup.vue.d.ts +37 -0
- package/dist/runtime/components/prose/CodeIcon.vue +28 -0
- package/dist/runtime/components/prose/CodeIcon.vue.d.ts +24 -0
- package/dist/runtime/components/prose/CodePreview.vue +28 -0
- package/dist/runtime/components/prose/CodePreview.vue.d.ts +19 -0
- package/dist/runtime/components/prose/CodeTree.vue +160 -0
- package/dist/runtime/components/prose/CodeTree.vue.d.ts +30 -0
- package/dist/runtime/components/prose/Collapsible.vue +41 -0
- package/dist/runtime/components/prose/Collapsible.vue.d.ts +38 -0
- package/dist/runtime/components/prose/Em.vue +19 -0
- package/dist/runtime/components/prose/Em.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Field.vue +48 -0
- package/dist/runtime/components/prose/Field.vue.d.ts +39 -0
- package/dist/runtime/components/prose/FieldGroup.vue +23 -0
- package/dist/runtime/components/prose/FieldGroup.vue.d.ts +18 -0
- package/dist/runtime/components/prose/H1.vue +28 -0
- package/dist/runtime/components/prose/H1.vue.d.ts +19 -0
- package/dist/runtime/components/prose/H2.vue +32 -0
- package/dist/runtime/components/prose/H2.vue.d.ts +19 -0
- package/dist/runtime/components/prose/H3.vue +32 -0
- package/dist/runtime/components/prose/H3.vue.d.ts +19 -0
- package/dist/runtime/components/prose/H4.vue +28 -0
- package/dist/runtime/components/prose/H4.vue.d.ts +19 -0
- package/dist/runtime/components/prose/Hr.vue +18 -0
- package/dist/runtime/components/prose/Hr.vue.d.ts +5 -0
- package/dist/runtime/components/prose/Icon.vue +19 -0
- package/dist/runtime/components/prose/Icon.vue.d.ts +6 -0
- package/dist/runtime/components/prose/Img.vue +40 -0
- package/dist/runtime/components/prose/Img.vue.d.ts +9 -0
- package/dist/runtime/components/prose/Kbd.vue +19 -0
- package/dist/runtime/components/prose/Kbd.vue.d.ts +6 -0
- package/dist/runtime/components/prose/Li.vue +21 -0
- package/dist/runtime/components/prose/Li.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Ol.vue +21 -0
- package/dist/runtime/components/prose/Ol.vue.d.ts +13 -0
- package/dist/runtime/components/prose/P.vue +21 -0
- package/dist/runtime/components/prose/P.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Pre.vue +63 -0
- package/dist/runtime/components/prose/Pre.vue.d.ts +25 -0
- package/dist/runtime/components/prose/Script.vue +12 -0
- package/dist/runtime/components/prose/Script.vue.d.ts +12 -0
- package/dist/runtime/components/prose/Steps.vue +22 -0
- package/dist/runtime/components/prose/Steps.vue.d.ts +22 -0
- package/dist/runtime/components/prose/Strong.vue +21 -0
- package/dist/runtime/components/prose/Strong.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Table.vue +24 -0
- package/dist/runtime/components/prose/Table.vue.d.ts +18 -0
- package/dist/runtime/components/prose/Tabs.vue +78 -0
- package/dist/runtime/components/prose/Tabs.vue.d.ts +36 -0
- package/dist/runtime/components/prose/TabsItem.vue +25 -0
- package/dist/runtime/components/prose/TabsItem.vue.d.ts +15 -0
- package/dist/runtime/components/prose/Tbody.vue +21 -0
- package/dist/runtime/components/prose/Tbody.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Td.vue +21 -0
- package/dist/runtime/components/prose/Td.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Th.vue +21 -0
- package/dist/runtime/components/prose/Th.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Thead.vue +21 -0
- package/dist/runtime/components/prose/Thead.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Tr.vue +21 -0
- package/dist/runtime/components/prose/Tr.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Ul.vue +21 -0
- package/dist/runtime/components/prose/Ul.vue.d.ts +13 -0
- package/dist/runtime/components/prose/callout/Caution.vue +11 -0
- package/dist/runtime/components/prose/callout/Caution.vue.d.ts +14 -0
- package/dist/runtime/components/prose/callout/Note.vue +11 -0
- package/dist/runtime/components/prose/callout/Note.vue.d.ts +14 -0
- package/dist/runtime/components/prose/callout/Tip.vue +11 -0
- package/dist/runtime/components/prose/callout/Tip.vue.d.ts +14 -0
- package/dist/runtime/components/prose/callout/Warning.vue +11 -0
- package/dist/runtime/components/prose/callout/Warning.vue.d.ts +14 -0
- package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
- package/dist/runtime/composables/useComponentIcons.d.ts +1 -1
- package/dist/runtime/composables/useFormField.d.ts +2 -2
- package/dist/runtime/composables/usePortal.d.ts +1 -1
- package/dist/runtime/composables/useResizable.d.ts +1 -1
- package/dist/runtime/inertia/components/Link.vue +12 -12
- package/dist/runtime/inertia/components/LinkBase.vue +15 -15
- package/dist/runtime/types/app.config.d.ts +6 -6
- package/dist/runtime/types/content.d.ts +4 -1
- package/dist/runtime/types/content.js +4 -0
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/index.js +1 -0
- package/dist/runtime/types/prose.d.ts +42 -1
- package/dist/runtime/types/prose.js +42 -0
- package/dist/runtime/types/tv.d.ts +2 -2
- package/dist/runtime/utils/index.d.ts +1 -1
- package/dist/runtime/utils/index.js +13 -4
- package/dist/runtime/vue/components/Icon.vue +1 -1
- package/dist/runtime/vue/components/Link.vue +31 -31
- package/dist/runtime/vue/components/color-mode/ColorModeButton.vue +7 -7
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue +7 -7
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +7 -7
- package/dist/shared/{ui.BcVNrqyb.mjs → ui.DQZ75GCP.mjs} +183 -180
- package/dist/unplugin.mjs +9 -9
- package/dist/vite.mjs +1 -1
- package/package.json +8 -9
- package/vue-plugin.d.ts +5 -5
|
@@ -58,73 +58,73 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.modal || {} }
|
|
|
58
58
|
</script>
|
|
59
59
|
|
|
60
60
|
<template>
|
|
61
|
-
<DialogRoot v-slot="{ open, close }" v-bind="rootProps">
|
|
62
|
-
<DialogTrigger v-if="!!slots.default" as-child :class="props.class">
|
|
63
|
-
<slot :open="open" />
|
|
64
|
-
</DialogTrigger>
|
|
65
|
-
|
|
66
|
-
<DialogPortal v-bind="portalProps">
|
|
67
|
-
<DialogOverlay v-if="overlay" :class="ui.overlay({ class: props.ui?.overlay })" />
|
|
68
|
-
|
|
69
|
-
<DialogContent :class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })" v-bind="contentProps" @after-enter="emits('after:enter')" @after-leave="emits('after:leave')" v-on="contentEvents">
|
|
70
|
-
<VisuallyHidden v-if="!!slots.content && (title || !!slots.title || (description || !!slots.description))">
|
|
71
|
-
<DialogTitle v-if="title || !!slots.title">
|
|
72
|
-
<slot name="title">
|
|
73
|
-
{{ title }}
|
|
74
|
-
</slot>
|
|
75
|
-
</DialogTitle>
|
|
76
|
-
|
|
77
|
-
<DialogDescription v-if="description || !!slots.description">
|
|
78
|
-
<slot name="description">
|
|
79
|
-
{{ description }}
|
|
80
|
-
</slot>
|
|
81
|
-
</DialogDescription>
|
|
82
|
-
</VisuallyHidden>
|
|
83
|
-
|
|
84
|
-
<slot name="content" :close="close">
|
|
85
|
-
<div v-if="!!slots.header || (title || !!slots.title) || (description || !!slots.description) || (props.close || !!slots.close)" :class="ui.header({ class: props.ui?.header })">
|
|
86
|
-
<slot name="header" :close="close">
|
|
87
|
-
<div :class="ui.wrapper({ class: props.ui?.wrapper })">
|
|
88
|
-
<DialogTitle v-if="title || !!slots.title" :class="ui.title({ class: props.ui?.title })">
|
|
89
|
-
<slot name="title">
|
|
90
|
-
{{ title }}
|
|
91
|
-
</slot>
|
|
92
|
-
</DialogTitle>
|
|
93
|
-
|
|
94
|
-
<DialogDescription v-if="description || !!slots.description" :class="ui.description({ class: props.ui?.description })">
|
|
95
|
-
<slot name="description">
|
|
96
|
-
{{ description }}
|
|
97
|
-
</slot>
|
|
98
|
-
</DialogDescription>
|
|
99
|
-
</div>
|
|
100
|
-
|
|
101
|
-
<slot name="actions" />
|
|
102
|
-
|
|
103
|
-
<DialogClose v-if="props.close || !!slots.close" as-child>
|
|
104
|
-
<slot name="close" :close="close" :ui="ui">
|
|
105
|
-
<UButton
|
|
106
|
-
v-if="props.close"
|
|
107
|
-
:icon="closeIcon || appConfig.ui.icons.close"
|
|
108
|
-
color="neutral"
|
|
109
|
-
variant="ghost"
|
|
110
|
-
:aria-label="t('modal.close')"
|
|
111
|
-
v-bind="typeof props.close === 'object' ? props.close : {}"
|
|
112
|
-
:class="ui.close({ class: props.ui?.close })"
|
|
113
|
-
/>
|
|
114
|
-
</slot>
|
|
115
|
-
</DialogClose>
|
|
116
|
-
</slot>
|
|
117
|
-
</div>
|
|
118
|
-
|
|
119
|
-
<div v-if="!!slots.body" :class="ui.body({ class: props.ui?.body })">
|
|
120
|
-
<slot name="body" :close="close" />
|
|
121
|
-
</div>
|
|
122
|
-
|
|
123
|
-
<div v-if="!!slots.footer" :class="ui.footer({ class: props.ui?.footer })">
|
|
124
|
-
<slot name="footer" :close="close" />
|
|
125
|
-
</div>
|
|
126
|
-
</slot>
|
|
127
|
-
</DialogContent>
|
|
128
|
-
</DialogPortal>
|
|
129
|
-
</DialogRoot>
|
|
61
|
+
<DialogRoot v-slot="{ open, close }" v-bind="rootProps">
|
|
62
|
+
<DialogTrigger v-if="!!slots.default" as-child :class="props.class">
|
|
63
|
+
<slot :open="open" />
|
|
64
|
+
</DialogTrigger>
|
|
65
|
+
|
|
66
|
+
<DialogPortal v-bind="portalProps">
|
|
67
|
+
<DialogOverlay v-if="overlay" :class="ui.overlay({ class: props.ui?.overlay })" />
|
|
68
|
+
|
|
69
|
+
<DialogContent :class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })" v-bind="contentProps" @after-enter="emits('after:enter')" @after-leave="emits('after:leave')" v-on="contentEvents">
|
|
70
|
+
<VisuallyHidden v-if="!!slots.content && (title || !!slots.title || (description || !!slots.description))">
|
|
71
|
+
<DialogTitle v-if="title || !!slots.title">
|
|
72
|
+
<slot name="title">
|
|
73
|
+
{{ title }}
|
|
74
|
+
</slot>
|
|
75
|
+
</DialogTitle>
|
|
76
|
+
|
|
77
|
+
<DialogDescription v-if="description || !!slots.description">
|
|
78
|
+
<slot name="description">
|
|
79
|
+
{{ description }}
|
|
80
|
+
</slot>
|
|
81
|
+
</DialogDescription>
|
|
82
|
+
</VisuallyHidden>
|
|
83
|
+
|
|
84
|
+
<slot name="content" :close="close">
|
|
85
|
+
<div v-if="!!slots.header || (title || !!slots.title) || (description || !!slots.description) || (props.close || !!slots.close)" :class="ui.header({ class: props.ui?.header })">
|
|
86
|
+
<slot name="header" :close="close">
|
|
87
|
+
<div :class="ui.wrapper({ class: props.ui?.wrapper })">
|
|
88
|
+
<DialogTitle v-if="title || !!slots.title" :class="ui.title({ class: props.ui?.title })">
|
|
89
|
+
<slot name="title">
|
|
90
|
+
{{ title }}
|
|
91
|
+
</slot>
|
|
92
|
+
</DialogTitle>
|
|
93
|
+
|
|
94
|
+
<DialogDescription v-if="description || !!slots.description" :class="ui.description({ class: props.ui?.description })">
|
|
95
|
+
<slot name="description">
|
|
96
|
+
{{ description }}
|
|
97
|
+
</slot>
|
|
98
|
+
</DialogDescription>
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
<slot name="actions" />
|
|
102
|
+
|
|
103
|
+
<DialogClose v-if="props.close || !!slots.close" as-child>
|
|
104
|
+
<slot name="close" :close="close" :ui="ui">
|
|
105
|
+
<UButton
|
|
106
|
+
v-if="props.close"
|
|
107
|
+
:icon="closeIcon || appConfig.ui.icons.close"
|
|
108
|
+
color="neutral"
|
|
109
|
+
variant="ghost"
|
|
110
|
+
:aria-label="t('modal.close')"
|
|
111
|
+
v-bind="typeof props.close === 'object' ? props.close : {}"
|
|
112
|
+
:class="ui.close({ class: props.ui?.close })"
|
|
113
|
+
/>
|
|
114
|
+
</slot>
|
|
115
|
+
</DialogClose>
|
|
116
|
+
</slot>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
<div v-if="!!slots.body" :class="ui.body({ class: props.ui?.body })">
|
|
120
|
+
<slot name="body" :close="close" />
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
<div v-if="!!slots.footer" :class="ui.footer({ class: props.ui?.footer })">
|
|
124
|
+
<slot name="footer" :close="close" />
|
|
125
|
+
</div>
|
|
126
|
+
</slot>
|
|
127
|
+
</DialogContent>
|
|
128
|
+
</DialogPortal>
|
|
129
|
+
</DialogRoot>
|
|
130
130
|
</template>
|
|
@@ -100,176 +100,176 @@ function getAccordionDefaultValue(list, level = 0) {
|
|
|
100
100
|
</script>
|
|
101
101
|
|
|
102
102
|
<template>
|
|
103
|
-
<DefineLinkTemplate v-slot="{ item, active, index }">
|
|
104
|
-
<slot :name="item.slot || 'item'" :item="item" :index="index">
|
|
105
|
-
<slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="active" :index="index">
|
|
106
|
-
<UAvatar v-if="item.avatar" :size="item.ui?.linkLeadingAvatarSize || props.ui?.linkLeadingAvatarSize || ui.linkLeadingAvatarSize()" v-bind="item.avatar" :class="ui.linkLeadingAvatar({ class: [props.ui?.linkLeadingAvatar, item.ui?.linkLeadingAvatar], active, disabled: !!item.disabled })" />
|
|
107
|
-
<UIcon v-else-if="item.icon" :name="item.icon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon], active, disabled: !!item.disabled })" />
|
|
108
|
-
</slot>
|
|
109
|
-
|
|
110
|
-
<span
|
|
111
|
-
v-if="(!collapsed || orientation !== 'vertical') && (get(item, props.labelKey) || !!slots[item.slot ? `${item.slot}-label` : 'item-label'])"
|
|
112
|
-
:class="ui.linkLabel({ class: [props.ui?.linkLabel, item.ui?.linkLabel] })"
|
|
113
|
-
>
|
|
114
|
-
<slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="item" :active="active" :index="index">
|
|
115
|
-
{{ get(item, props.labelKey) }}
|
|
116
|
-
</slot>
|
|
117
|
-
|
|
118
|
-
<UIcon v-if="item.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" :class="ui.linkLabelExternalIcon({ class: [props.ui?.linkLabelExternalIcon, item.ui?.linkLabelExternalIcon], active })" />
|
|
119
|
-
</span>
|
|
120
|
-
|
|
121
|
-
<component :is="orientation === 'vertical' && item.children?.length && !collapsed ? AccordionTrigger : 'span'" v-if="(!collapsed || orientation !== 'vertical') && (item.badge || orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content']) || orientation === 'vertical' && item.children?.length || item.trailingIcon || !!slots[item.slot ? `${item.slot}-trailing` : 'item-trailing'])" as="span" :class="ui.linkTrailing({ class: [props.ui?.linkTrailing, item.ui?.linkTrailing] })" @click.stop.prevent>
|
|
122
|
-
<slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="item" :active="active" :index="index">
|
|
123
|
-
<UBadge
|
|
124
|
-
v-if="item.badge"
|
|
125
|
-
color="neutral"
|
|
126
|
-
variant="outline"
|
|
127
|
-
:size="item.ui?.linkTrailingBadgeSize || props.ui?.linkTrailingBadgeSize || ui.linkTrailingBadgeSize()"
|
|
128
|
-
v-bind="typeof item.badge === 'string' || typeof item.badge === 'number' ? { label: item.badge } : item.badge"
|
|
129
|
-
:class="ui.linkTrailingBadge({ class: [props.ui?.linkTrailingBadge, item.ui?.linkTrailingBadge] })"
|
|
130
|
-
/>
|
|
131
|
-
|
|
132
|
-
<UIcon v-if="orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content']) || orientation === 'vertical' && item.children?.length" :name="item.trailingIcon || trailingIcon || appConfig.ui.icons.chevronDown" :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon], active })" />
|
|
133
|
-
<UIcon v-else-if="item.trailingIcon" :name="item.trailingIcon" :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon], active })" />
|
|
134
|
-
</slot>
|
|
135
|
-
</component>
|
|
136
|
-
</slot>
|
|
137
|
-
</DefineLinkTemplate>
|
|
138
|
-
|
|
139
|
-
<DefineItemTemplate v-slot="{ item, index, level = 0 }">
|
|
140
|
-
<component
|
|
141
|
-
:is="orientation === 'vertical' && !collapsed ? AccordionItem : NavigationMenuItem"
|
|
142
|
-
as="li"
|
|
143
|
-
:value="item.value || (level > 0 ? `item-${level}-${index}` : `item-${index}`)"
|
|
144
|
-
>
|
|
145
|
-
<div v-if="orientation === 'vertical' && item.type === 'label' && !collapsed" :class="ui.label({ class: [props.ui?.label, item.ui?.label, item.class] })">
|
|
146
|
-
<ReuseLinkTemplate :item="item" :index="index" />
|
|
147
|
-
</div>
|
|
148
|
-
<ULink v-else-if="item.type !== 'label'" v-slot="{ active, ...slotProps }" v-bind="orientation === 'vertical' && item.children?.length && !collapsed && item.type === 'trigger' ? {} : pickLinkProps(item)" custom>
|
|
149
|
-
<component
|
|
150
|
-
:is="orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content']) ? NavigationMenuTrigger : orientation === 'vertical' && item.children?.length && !collapsed && !slotProps.href ? AccordionTrigger : NavigationMenuLink"
|
|
151
|
-
as-child
|
|
152
|
-
:active="active || item.active"
|
|
153
|
-
:disabled="item.disabled"
|
|
154
|
-
@select="item.onSelect"
|
|
155
|
-
>
|
|
156
|
-
<UPopover v-if="orientation === 'vertical' && collapsed && item.children?.length && (!!props.popover || !!item.popover)" v-bind="{ ...popoverProps, ...typeof item.popover === 'boolean' ? {} : item.popover || {} }" :ui="{ content: ui.content({ class: [props.ui?.content, item.ui?.content] }) }">
|
|
157
|
-
<ULinkBase v-bind="slotProps" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: active || item.active, disabled: !!item.disabled, level: level > 0 })">
|
|
158
|
-
<ReuseLinkTemplate :item="item" :active="active || item.active" :index="index" />
|
|
159
|
-
</ULinkBase>
|
|
160
|
-
|
|
161
|
-
<template #content>
|
|
162
|
-
<slot :name="item.slot ? `${item.slot}-content` : 'item-content'" :item="item" :active="active || item.active" :index="index">
|
|
163
|
-
<ul :class="ui.childList({ class: [props.ui?.childList, item.ui?.childList] })">
|
|
164
|
-
<li :class="ui.childLabel({ class: [props.ui?.childLabel, item.ui?.childLabel] })">
|
|
165
|
-
{{ get(item, props.labelKey) }}
|
|
166
|
-
</li>
|
|
167
|
-
<li v-for="(childItem, childIndex) in item.children" :key="childIndex" :class="ui.childItem({ class: [props.ui?.childItem, item.ui?.childItem] })">
|
|
168
|
-
<ULink v-slot="{ active: childActive, ...childSlotProps }" v-bind="pickLinkProps(childItem)" custom>
|
|
169
|
-
<NavigationMenuLink as-child :active="childActive" @select="childItem.onSelect">
|
|
170
|
-
<ULinkBase v-bind="childSlotProps" :class="ui.childLink({ class: [props.ui?.childLink, item.ui?.childLink, childItem.class], active: childActive })">
|
|
171
|
-
<UIcon v-if="childItem.icon" :name="childItem.icon" :class="ui.childLinkIcon({ class: [props.ui?.childLinkIcon, item.ui?.childLinkIcon], active: childActive })" />
|
|
172
|
-
|
|
173
|
-
<span :class="ui.childLinkLabel({ class: [props.ui?.childLinkLabel, item.ui?.childLinkLabel], active: childActive })">
|
|
174
|
-
{{ get(childItem, props.labelKey) }}
|
|
175
|
-
|
|
176
|
-
<UIcon v-if="childItem.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" :class="ui.childLinkLabelExternalIcon({ class: [props.ui?.childLinkLabelExternalIcon, item.ui?.childLinkLabelExternalIcon], active: childActive })" />
|
|
177
|
-
</span>
|
|
178
|
-
</ULinkBase>
|
|
179
|
-
</NavigationMenuLink>
|
|
180
|
-
</ULink>
|
|
181
|
-
</li>
|
|
182
|
-
</ul>
|
|
183
|
-
</slot>
|
|
184
|
-
</template>
|
|
185
|
-
</UPopover>
|
|
186
|
-
<UTooltip v-else-if="orientation === 'vertical' && collapsed && (!!props.tooltip || !!item.tooltip)" :text="get(item, props.labelKey)" v-bind="{ ...tooltipProps, ...typeof item.tooltip === 'boolean' ? {} : item.tooltip || {} }">
|
|
187
|
-
<ULinkBase v-bind="slotProps" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: active || item.active, disabled: !!item.disabled, level: level > 0 })">
|
|
188
|
-
<ReuseLinkTemplate :item="item" :active="active || item.active" :index="index" />
|
|
189
|
-
</ULinkBase>
|
|
190
|
-
</UTooltip>
|
|
191
|
-
<ULinkBase v-else v-bind="slotProps" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: active || item.active, disabled: !!item.disabled, level: orientation === 'horizontal' || level > 0 })">
|
|
192
|
-
<ReuseLinkTemplate :item="item" :active="active || item.active" :index="index" />
|
|
193
|
-
</ULinkBase>
|
|
194
|
-
</component>
|
|
195
|
-
|
|
196
|
-
<NavigationMenuContent v-if="orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content'])" v-bind="contentProps" :class="ui.content({ class: [props.ui?.content, item.ui?.content] })">
|
|
197
|
-
<slot :name="item.slot ? `${item.slot}-content` : 'item-content'" :item="item" :active="active || item.active" :index="index">
|
|
198
|
-
<ul :class="ui.childList({ class: [props.ui?.childList, item.ui?.childList] })">
|
|
199
|
-
<li v-for="(childItem, childIndex) in item.children" :key="childIndex" :class="ui.childItem({ class: [props.ui?.childItem, item.ui?.childItem] })">
|
|
200
|
-
<ULink v-slot="{ active: childActive, ...childSlotProps }" v-bind="pickLinkProps(childItem)" custom>
|
|
201
|
-
<NavigationMenuLink as-child :active="childActive" @select="childItem.onSelect">
|
|
202
|
-
<ULinkBase v-bind="childSlotProps" :class="ui.childLink({ class: [props.ui?.childLink, item.ui?.childLink, childItem.class], active: childActive })">
|
|
203
|
-
<UIcon v-if="childItem.icon" :name="childItem.icon" :class="ui.childLinkIcon({ class: [props.ui?.childLinkIcon, item.ui?.childLinkIcon], active: childActive })" />
|
|
204
|
-
|
|
205
|
-
<div :class="ui.childLinkWrapper({ class: [props.ui?.childLinkWrapper, item.ui?.childLinkWrapper] })">
|
|
206
|
-
<p :class="ui.childLinkLabel({ class: [props.ui?.childLinkLabel, item.ui?.childLinkLabel], active: childActive })">
|
|
207
|
-
{{ get(childItem, props.labelKey) }}
|
|
208
|
-
|
|
209
|
-
<UIcon v-if="childItem.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" :class="ui.childLinkLabelExternalIcon({ class: [props.ui?.childLinkLabelExternalIcon, item.ui?.childLinkLabelExternalIcon], active: childActive })" />
|
|
210
|
-
</p>
|
|
211
|
-
<p v-if="childItem.description" :class="ui.childLinkDescription({ class: [props.ui?.childLinkDescription, item.ui?.childLinkDescription], active: childActive })">
|
|
212
|
-
{{ childItem.description }}
|
|
213
|
-
</p>
|
|
214
|
-
</div>
|
|
215
|
-
</ULinkBase>
|
|
216
|
-
</NavigationMenuLink>
|
|
217
|
-
</ULink>
|
|
218
|
-
</li>
|
|
219
|
-
</ul>
|
|
220
|
-
</slot>
|
|
221
|
-
</NavigationMenuContent>
|
|
222
|
-
</ULink>
|
|
223
|
-
|
|
224
|
-
<AccordionContent v-if="orientation === 'vertical' && item.children?.length && !collapsed" :class="ui.content({ class: [props.ui?.content, item.ui?.content] })">
|
|
225
|
-
<AccordionRoot
|
|
103
|
+
<DefineLinkTemplate v-slot="{ item, active, index }">
|
|
104
|
+
<slot :name="item.slot || 'item'" :item="item" :index="index">
|
|
105
|
+
<slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="active" :index="index">
|
|
106
|
+
<UAvatar v-if="item.avatar" :size="item.ui?.linkLeadingAvatarSize || props.ui?.linkLeadingAvatarSize || ui.linkLeadingAvatarSize()" v-bind="item.avatar" :class="ui.linkLeadingAvatar({ class: [props.ui?.linkLeadingAvatar, item.ui?.linkLeadingAvatar], active, disabled: !!item.disabled })" />
|
|
107
|
+
<UIcon v-else-if="item.icon" :name="item.icon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon], active, disabled: !!item.disabled })" />
|
|
108
|
+
</slot>
|
|
109
|
+
|
|
110
|
+
<span
|
|
111
|
+
v-if="(!collapsed || orientation !== 'vertical') && (get(item, props.labelKey) || !!slots[item.slot ? `${item.slot}-label` : 'item-label'])"
|
|
112
|
+
:class="ui.linkLabel({ class: [props.ui?.linkLabel, item.ui?.linkLabel] })"
|
|
113
|
+
>
|
|
114
|
+
<slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="item" :active="active" :index="index">
|
|
115
|
+
{{ get(item, props.labelKey) }}
|
|
116
|
+
</slot>
|
|
117
|
+
|
|
118
|
+
<UIcon v-if="item.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" :class="ui.linkLabelExternalIcon({ class: [props.ui?.linkLabelExternalIcon, item.ui?.linkLabelExternalIcon], active })" />
|
|
119
|
+
</span>
|
|
120
|
+
|
|
121
|
+
<component :is="orientation === 'vertical' && item.children?.length && !collapsed ? AccordionTrigger : 'span'" v-if="(!collapsed || orientation !== 'vertical') && (item.badge || orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content']) || orientation === 'vertical' && item.children?.length || item.trailingIcon || !!slots[item.slot ? `${item.slot}-trailing` : 'item-trailing'])" as="span" :class="ui.linkTrailing({ class: [props.ui?.linkTrailing, item.ui?.linkTrailing] })" @click.stop.prevent>
|
|
122
|
+
<slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="item" :active="active" :index="index">
|
|
123
|
+
<UBadge
|
|
124
|
+
v-if="item.badge"
|
|
125
|
+
color="neutral"
|
|
126
|
+
variant="outline"
|
|
127
|
+
:size="item.ui?.linkTrailingBadgeSize || props.ui?.linkTrailingBadgeSize || ui.linkTrailingBadgeSize()"
|
|
128
|
+
v-bind="typeof item.badge === 'string' || typeof item.badge === 'number' ? { label: item.badge } : item.badge"
|
|
129
|
+
:class="ui.linkTrailingBadge({ class: [props.ui?.linkTrailingBadge, item.ui?.linkTrailingBadge] })"
|
|
130
|
+
/>
|
|
131
|
+
|
|
132
|
+
<UIcon v-if="orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content']) || orientation === 'vertical' && item.children?.length" :name="item.trailingIcon || trailingIcon || appConfig.ui.icons.chevronDown" :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon], active })" />
|
|
133
|
+
<UIcon v-else-if="item.trailingIcon" :name="item.trailingIcon" :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon], active })" />
|
|
134
|
+
</slot>
|
|
135
|
+
</component>
|
|
136
|
+
</slot>
|
|
137
|
+
</DefineLinkTemplate>
|
|
138
|
+
|
|
139
|
+
<DefineItemTemplate v-slot="{ item, index, level = 0 }">
|
|
140
|
+
<component
|
|
141
|
+
:is="orientation === 'vertical' && !collapsed ? AccordionItem : NavigationMenuItem"
|
|
142
|
+
as="li"
|
|
143
|
+
:value="item.value || (level > 0 ? `item-${level}-${index}` : `item-${index}`)"
|
|
144
|
+
>
|
|
145
|
+
<div v-if="orientation === 'vertical' && item.type === 'label' && !collapsed" :class="ui.label({ class: [props.ui?.label, item.ui?.label, item.class] })">
|
|
146
|
+
<ReuseLinkTemplate :item="item" :index="index" />
|
|
147
|
+
</div>
|
|
148
|
+
<ULink v-else-if="item.type !== 'label'" v-slot="{ active, ...slotProps }" v-bind="orientation === 'vertical' && item.children?.length && !collapsed && item.type === 'trigger' ? {} : pickLinkProps(item)" custom>
|
|
149
|
+
<component
|
|
150
|
+
:is="orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content']) ? NavigationMenuTrigger : orientation === 'vertical' && item.children?.length && !collapsed && !slotProps.href ? AccordionTrigger : NavigationMenuLink"
|
|
151
|
+
as-child
|
|
152
|
+
:active="active || item.active"
|
|
153
|
+
:disabled="item.disabled"
|
|
154
|
+
@select="item.onSelect"
|
|
155
|
+
>
|
|
156
|
+
<UPopover v-if="orientation === 'vertical' && collapsed && item.children?.length && (!!props.popover || !!item.popover)" v-bind="{ ...popoverProps, ...typeof item.popover === 'boolean' ? {} : item.popover || {} }" :ui="{ content: ui.content({ class: [props.ui?.content, item.ui?.content] }) }">
|
|
157
|
+
<ULinkBase v-bind="slotProps" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: active || item.active, disabled: !!item.disabled, level: level > 0 })">
|
|
158
|
+
<ReuseLinkTemplate :item="item" :active="active || item.active" :index="index" />
|
|
159
|
+
</ULinkBase>
|
|
160
|
+
|
|
161
|
+
<template #content>
|
|
162
|
+
<slot :name="item.slot ? `${item.slot}-content` : 'item-content'" :item="item" :active="active || item.active" :index="index">
|
|
163
|
+
<ul :class="ui.childList({ class: [props.ui?.childList, item.ui?.childList] })">
|
|
164
|
+
<li :class="ui.childLabel({ class: [props.ui?.childLabel, item.ui?.childLabel] })">
|
|
165
|
+
{{ get(item, props.labelKey) }}
|
|
166
|
+
</li>
|
|
167
|
+
<li v-for="(childItem, childIndex) in item.children" :key="childIndex" :class="ui.childItem({ class: [props.ui?.childItem, item.ui?.childItem] })">
|
|
168
|
+
<ULink v-slot="{ active: childActive, ...childSlotProps }" v-bind="pickLinkProps(childItem)" custom>
|
|
169
|
+
<NavigationMenuLink as-child :active="childActive" @select="childItem.onSelect">
|
|
170
|
+
<ULinkBase v-bind="childSlotProps" :class="ui.childLink({ class: [props.ui?.childLink, item.ui?.childLink, childItem.class], active: childActive })">
|
|
171
|
+
<UIcon v-if="childItem.icon" :name="childItem.icon" :class="ui.childLinkIcon({ class: [props.ui?.childLinkIcon, item.ui?.childLinkIcon], active: childActive })" />
|
|
172
|
+
|
|
173
|
+
<span :class="ui.childLinkLabel({ class: [props.ui?.childLinkLabel, item.ui?.childLinkLabel], active: childActive })">
|
|
174
|
+
{{ get(childItem, props.labelKey) }}
|
|
175
|
+
|
|
176
|
+
<UIcon v-if="childItem.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" :class="ui.childLinkLabelExternalIcon({ class: [props.ui?.childLinkLabelExternalIcon, item.ui?.childLinkLabelExternalIcon], active: childActive })" />
|
|
177
|
+
</span>
|
|
178
|
+
</ULinkBase>
|
|
179
|
+
</NavigationMenuLink>
|
|
180
|
+
</ULink>
|
|
181
|
+
</li>
|
|
182
|
+
</ul>
|
|
183
|
+
</slot>
|
|
184
|
+
</template>
|
|
185
|
+
</UPopover>
|
|
186
|
+
<UTooltip v-else-if="orientation === 'vertical' && collapsed && (!!props.tooltip || !!item.tooltip)" :text="get(item, props.labelKey)" v-bind="{ ...tooltipProps, ...typeof item.tooltip === 'boolean' ? {} : item.tooltip || {} }">
|
|
187
|
+
<ULinkBase v-bind="slotProps" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: active || item.active, disabled: !!item.disabled, level: level > 0 })">
|
|
188
|
+
<ReuseLinkTemplate :item="item" :active="active || item.active" :index="index" />
|
|
189
|
+
</ULinkBase>
|
|
190
|
+
</UTooltip>
|
|
191
|
+
<ULinkBase v-else v-bind="slotProps" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: active || item.active, disabled: !!item.disabled, level: orientation === 'horizontal' || level > 0 })">
|
|
192
|
+
<ReuseLinkTemplate :item="item" :active="active || item.active" :index="index" />
|
|
193
|
+
</ULinkBase>
|
|
194
|
+
</component>
|
|
195
|
+
|
|
196
|
+
<NavigationMenuContent v-if="orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content'])" v-bind="contentProps" :class="ui.content({ class: [props.ui?.content, item.ui?.content] })">
|
|
197
|
+
<slot :name="item.slot ? `${item.slot}-content` : 'item-content'" :item="item" :active="active || item.active" :index="index">
|
|
198
|
+
<ul :class="ui.childList({ class: [props.ui?.childList, item.ui?.childList] })">
|
|
199
|
+
<li v-for="(childItem, childIndex) in item.children" :key="childIndex" :class="ui.childItem({ class: [props.ui?.childItem, item.ui?.childItem] })">
|
|
200
|
+
<ULink v-slot="{ active: childActive, ...childSlotProps }" v-bind="pickLinkProps(childItem)" custom>
|
|
201
|
+
<NavigationMenuLink as-child :active="childActive" @select="childItem.onSelect">
|
|
202
|
+
<ULinkBase v-bind="childSlotProps" :class="ui.childLink({ class: [props.ui?.childLink, item.ui?.childLink, childItem.class], active: childActive })">
|
|
203
|
+
<UIcon v-if="childItem.icon" :name="childItem.icon" :class="ui.childLinkIcon({ class: [props.ui?.childLinkIcon, item.ui?.childLinkIcon], active: childActive })" />
|
|
204
|
+
|
|
205
|
+
<div :class="ui.childLinkWrapper({ class: [props.ui?.childLinkWrapper, item.ui?.childLinkWrapper] })">
|
|
206
|
+
<p :class="ui.childLinkLabel({ class: [props.ui?.childLinkLabel, item.ui?.childLinkLabel], active: childActive })">
|
|
207
|
+
{{ get(childItem, props.labelKey) }}
|
|
208
|
+
|
|
209
|
+
<UIcon v-if="childItem.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" :class="ui.childLinkLabelExternalIcon({ class: [props.ui?.childLinkLabelExternalIcon, item.ui?.childLinkLabelExternalIcon], active: childActive })" />
|
|
210
|
+
</p>
|
|
211
|
+
<p v-if="childItem.description" :class="ui.childLinkDescription({ class: [props.ui?.childLinkDescription, item.ui?.childLinkDescription], active: childActive })">
|
|
212
|
+
{{ childItem.description }}
|
|
213
|
+
</p>
|
|
214
|
+
</div>
|
|
215
|
+
</ULinkBase>
|
|
216
|
+
</NavigationMenuLink>
|
|
217
|
+
</ULink>
|
|
218
|
+
</li>
|
|
219
|
+
</ul>
|
|
220
|
+
</slot>
|
|
221
|
+
</NavigationMenuContent>
|
|
222
|
+
</ULink>
|
|
223
|
+
|
|
224
|
+
<AccordionContent v-if="orientation === 'vertical' && item.children?.length && !collapsed" :class="ui.content({ class: [props.ui?.content, item.ui?.content] })">
|
|
225
|
+
<AccordionRoot
|
|
226
226
|
v-bind="{
|
|
227
227
|
...accordionProps,
|
|
228
228
|
defaultValue: getAccordionDefaultValue(item.children, level + 1)
|
|
229
|
-
}"
|
|
230
|
-
as="ul"
|
|
231
|
-
:class="ui.childList({ class: props.ui?.childList })"
|
|
232
|
-
>
|
|
233
|
-
<ReuseItemTemplate
|
|
234
|
-
v-for="(childItem, childIndex) in item.children"
|
|
235
|
-
:key="childIndex"
|
|
236
|
-
:item="childItem"
|
|
237
|
-
:index="childIndex"
|
|
238
|
-
:level="level + 1"
|
|
239
|
-
:class="ui.childItem({ class: [props.ui?.childItem, childItem.ui?.childItem] })"
|
|
240
|
-
/>
|
|
241
|
-
</AccordionRoot>
|
|
242
|
-
</AccordionContent>
|
|
243
|
-
</component>
|
|
244
|
-
</DefineItemTemplate>
|
|
245
|
-
|
|
246
|
-
<NavigationMenuRoot v-bind="rootProps" :data-collapsed="collapsed" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
247
|
-
<slot name="list-leading" />
|
|
248
|
-
|
|
249
|
-
<template v-for="(list, listIndex) in lists" :key="`list-${listIndex}`">
|
|
250
|
-
<component
|
|
229
|
+
}"
|
|
230
|
+
as="ul"
|
|
231
|
+
:class="ui.childList({ class: props.ui?.childList })"
|
|
232
|
+
>
|
|
233
|
+
<ReuseItemTemplate
|
|
234
|
+
v-for="(childItem, childIndex) in item.children"
|
|
235
|
+
:key="childIndex"
|
|
236
|
+
:item="childItem"
|
|
237
|
+
:index="childIndex"
|
|
238
|
+
:level="level + 1"
|
|
239
|
+
:class="ui.childItem({ class: [props.ui?.childItem, childItem.ui?.childItem] })"
|
|
240
|
+
/>
|
|
241
|
+
</AccordionRoot>
|
|
242
|
+
</AccordionContent>
|
|
243
|
+
</component>
|
|
244
|
+
</DefineItemTemplate>
|
|
245
|
+
|
|
246
|
+
<NavigationMenuRoot v-bind="rootProps" :data-collapsed="collapsed" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
247
|
+
<slot name="list-leading" />
|
|
248
|
+
|
|
249
|
+
<template v-for="(list, listIndex) in lists" :key="`list-${listIndex}`">
|
|
250
|
+
<component
|
|
251
251
|
v-bind="orientation === 'vertical' && !collapsed ? {
|
|
252
252
|
...accordionProps,
|
|
253
253
|
defaultValue: getAccordionDefaultValue(list)
|
|
254
|
-
} : {}"
|
|
255
|
-
:is="orientation === 'vertical' && !collapsed ? AccordionRoot : NavigationMenuList"
|
|
256
|
-
as="ul"
|
|
257
|
-
:class="ui.list({ class: props.ui?.list })"
|
|
258
|
-
>
|
|
259
|
-
<ReuseItemTemplate v-for="(item, index) in list" :key="`list-${listIndex}-${index}`" :item="item" :index="index" :class="ui.item({ class: [props.ui?.item, item.ui?.item] })" />
|
|
260
|
-
</component>
|
|
261
|
-
|
|
262
|
-
<div v-if="orientation === 'vertical' && listIndex < lists.length - 1" :class="ui.separator({ class: props.ui?.separator })" />
|
|
263
|
-
</template>
|
|
264
|
-
|
|
265
|
-
<slot name="list-trailing" />
|
|
266
|
-
|
|
267
|
-
<div v-if="orientation === 'horizontal'" :class="ui.viewportWrapper({ class: props.ui?.viewportWrapper })">
|
|
268
|
-
<NavigationMenuIndicator v-if="arrow" :class="ui.indicator({ class: props.ui?.indicator })">
|
|
269
|
-
<div :class="ui.arrow({ class: props.ui?.arrow })" />
|
|
270
|
-
</NavigationMenuIndicator>
|
|
271
|
-
|
|
272
|
-
<NavigationMenuViewport :class="ui.viewport({ class: props.ui?.viewport })" />
|
|
273
|
-
</div>
|
|
274
|
-
</NavigationMenuRoot>
|
|
254
|
+
} : {}"
|
|
255
|
+
:is="orientation === 'vertical' && !collapsed ? AccordionRoot : NavigationMenuList"
|
|
256
|
+
as="ul"
|
|
257
|
+
:class="ui.list({ class: props.ui?.list })"
|
|
258
|
+
>
|
|
259
|
+
<ReuseItemTemplate v-for="(item, index) in list" :key="`list-${listIndex}-${index}`" :item="item" :index="index" :class="ui.item({ class: [props.ui?.item, item.ui?.item] })" />
|
|
260
|
+
</component>
|
|
261
|
+
|
|
262
|
+
<div v-if="orientation === 'vertical' && listIndex < lists.length - 1" :class="ui.separator({ class: props.ui?.separator })" />
|
|
263
|
+
</template>
|
|
264
|
+
|
|
265
|
+
<slot name="list-trailing" />
|
|
266
|
+
|
|
267
|
+
<div v-if="orientation === 'horizontal'" :class="ui.viewportWrapper({ class: props.ui?.viewportWrapper })">
|
|
268
|
+
<NavigationMenuIndicator v-if="arrow" :class="ui.indicator({ class: props.ui?.indicator })">
|
|
269
|
+
<div :class="ui.arrow({ class: props.ui?.arrow })" />
|
|
270
|
+
</NavigationMenuIndicator>
|
|
271
|
+
|
|
272
|
+
<NavigationMenuViewport :class="ui.viewport({ class: props.ui?.viewport })" />
|
|
273
|
+
</div>
|
|
274
|
+
</NavigationMenuRoot>
|
|
275
275
|
</template>
|
|
@@ -13,13 +13,13 @@ const onClose = (id, value) => {
|
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<template>
|
|
16
|
-
<component
|
|
17
|
-
:is="overlay.component"
|
|
18
|
-
v-for="overlay in mountedOverlays"
|
|
19
|
-
:key="overlay.id"
|
|
20
|
-
v-bind="overlay.props"
|
|
21
|
-
v-model:open="overlay.isOpen"
|
|
22
|
-
@close="(value) => onClose(overlay.id, value)"
|
|
23
|
-
@after:leave="onAfterLeave(overlay.id)"
|
|
24
|
-
/>
|
|
16
|
+
<component
|
|
17
|
+
:is="overlay.component"
|
|
18
|
+
v-for="overlay in mountedOverlays"
|
|
19
|
+
:key="overlay.id"
|
|
20
|
+
v-bind="overlay.props"
|
|
21
|
+
v-model:open="overlay.isOpen"
|
|
22
|
+
@close="(value) => onClose(overlay.id, value)"
|
|
23
|
+
@after:leave="onAfterLeave(overlay.id)"
|
|
24
|
+
/>
|
|
25
25
|
</template>
|