@eslamdevui/ui 3.2.0-beta.2 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nuxt/ui/auth-form.ts +20 -0
- package/.nuxt/ui/banner.ts +105 -0
- package/.nuxt/ui/blog-post.ts +140 -0
- package/.nuxt/ui/blog-posts.ts +14 -0
- package/.nuxt/ui/changelog-version.ts +41 -0
- package/.nuxt/ui/changelog-versions.ts +8 -0
- package/.nuxt/ui/chat-palette.ts +8 -0
- package/.nuxt/ui/content/content-navigation.ts +6 -4
- package/.nuxt/ui/content-navigation.ts +6 -4
- package/.nuxt/ui/footer-columns.ts +28 -0
- package/.nuxt/ui/footer.ts +11 -0
- package/.nuxt/ui/header.ts +30 -0
- package/.nuxt/ui/index.ts +32 -1
- package/.nuxt/ui/main.ts +3 -0
- package/.nuxt/ui/page-accordion.ts +7 -0
- package/.nuxt/ui/page-anchors.ts +30 -0
- package/.nuxt/ui/page-aside.ts +10 -0
- package/.nuxt/ui/page-body.ts +3 -0
- package/.nuxt/ui/page-card.ts +276 -0
- package/.nuxt/ui/page-columns.ts +3 -0
- package/.nuxt/ui/page-cta.ts +72 -0
- package/.nuxt/ui/page-feature.ts +31 -0
- package/.nuxt/ui/page-grid.ts +3 -0
- package/.nuxt/ui/page-header.ts +18 -0
- package/.nuxt/ui/page-hero.ts +46 -0
- package/.nuxt/ui/page-links.ts +25 -0
- package/.nuxt/ui/page-list.ts +8 -0
- package/.nuxt/ui/page-logos.ts +15 -0
- package/.nuxt/ui/page-marquee.ts +66 -0
- package/.nuxt/ui/page-section.ts +88 -0
- package/.nuxt/ui/page.ts +32 -0
- package/.nuxt/ui/pricing-plan.ts +101 -0
- package/.nuxt/ui/pricing-plans.ts +27 -0
- package/.nuxt/ui/pricing-table.ts +51 -0
- package/.nuxt/ui/user.ts +106 -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 -236
- package/cli/utils.mjs +31 -31
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -2
- 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/AuthForm.vue +195 -0
- package/dist/runtime/components/AuthForm.vue.d.ts +85 -0
- 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/Banner.vue +113 -0
- package/dist/runtime/components/Banner.vue.d.ts +68 -0
- package/dist/runtime/components/BlogPost.vue +141 -0
- package/dist/runtime/components/BlogPost.vue.d.ts +59 -0
- package/dist/runtime/components/BlogPosts.vue +33 -0
- package/dist/runtime/components/BlogPosts.vue.d.ts +30 -0
- 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/ChangelogVersion.vue +165 -0
- package/dist/runtime/components/ChangelogVersion.vue.d.ts +58 -0
- package/dist/runtime/components/ChangelogVersions.vue +54 -0
- package/dist/runtime/components/ChangelogVersions.vue.d.ts +74 -0
- package/dist/runtime/components/ChatMessage.vue +35 -35
- package/dist/runtime/components/ChatMessages.vue +55 -55
- package/dist/runtime/components/ChatPalette.vue +32 -0
- package/dist/runtime/components/ChatPalette.vue.d.ts +24 -0
- package/dist/runtime/components/ChatPrompt.vue +26 -26
- package/dist/runtime/components/ChatPrompt.vue.d.ts +1 -1
- 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/CommandPalette.vue.d.ts +3 -3
- 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 +40 -40
- package/dist/runtime/components/DashboardPanel.vue +27 -27
- package/dist/runtime/components/DashboardResizeHandle.vue +7 -7
- package/dist/runtime/components/DashboardSearch.vue +20 -20
- package/dist/runtime/components/DashboardSearchButton.vue +43 -43
- package/dist/runtime/components/DashboardSidebar.vue +74 -74
- package/dist/runtime/components/DashboardSidebarCollapse.vue +7 -7
- package/dist/runtime/components/DashboardSidebarToggle.vue +7 -7
- package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +1 -1
- 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 +22 -22
- package/dist/runtime/components/Error.vue.d.ts +1 -1
- package/dist/runtime/components/Footer.vue +44 -0
- package/dist/runtime/components/Footer.vue.d.ts +29 -0
- package/dist/runtime/components/FooterColumns.vue +68 -0
- package/dist/runtime/components/FooterColumns.vue.d.ts +52 -0
- package/dist/runtime/components/Form.vue +8 -8
- package/dist/runtime/components/FormField.vue +37 -37
- package/dist/runtime/components/Header.vue +137 -0
- package/dist/runtime/components/Header.vue.d.ts +72 -0
- 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/InputMenu.vue.d.ts +3 -3
- 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/Main.vue +23 -0
- package/dist/runtime/components/Main.vue.d.ts +20 -0
- 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/Page.vue +37 -0
- package/dist/runtime/components/Page.vue.d.ts +25 -0
- package/dist/runtime/components/PageAccordion.vue +26 -0
- package/dist/runtime/components/PageAccordion.vue.d.ts +21 -0
- package/dist/runtime/components/PageAnchors.vue +50 -0
- package/dist/runtime/components/PageAnchors.vue.d.ts +42 -0
- package/dist/runtime/components/PageAside.vue +36 -0
- package/dist/runtime/components/PageAside.vue.d.ts +27 -0
- package/dist/runtime/components/PageBody.vue +23 -0
- package/dist/runtime/components/PageBody.vue.d.ts +18 -0
- package/dist/runtime/components/PageCTA.vue +58 -0
- package/dist/runtime/components/PageCTA.vue.d.ts +49 -0
- package/dist/runtime/components/PageCard.vue +121 -0
- package/dist/runtime/components/PageCard.vue.d.ts +71 -0
- package/dist/runtime/components/PageColumns.vue +23 -0
- package/dist/runtime/components/PageColumns.vue.d.ts +18 -0
- package/dist/runtime/components/PageFeature.vue +71 -0
- package/dist/runtime/components/PageFeature.vue.d.ts +43 -0
- package/dist/runtime/components/PageGrid.vue +23 -0
- package/dist/runtime/components/PageGrid.vue.d.ts +18 -0
- package/dist/runtime/components/PageHeader.vue +58 -0
- package/dist/runtime/components/PageHeader.vue.d.ts +35 -0
- package/dist/runtime/components/PageHero.vue +67 -0
- package/dist/runtime/components/PageHero.vue.d.ts +49 -0
- package/dist/runtime/components/PageLinks.vue +55 -0
- package/dist/runtime/components/PageLinks.vue.d.ts +44 -0
- package/dist/runtime/components/PageList.vue +24 -0
- package/dist/runtime/components/PageList.vue.d.ts +21 -0
- package/dist/runtime/components/PageLogos.vue +64 -0
- package/dist/runtime/components/PageLogos.vue.d.ts +32 -0
- package/dist/runtime/components/PageMarquee.vue +40 -0
- package/dist/runtime/components/PageMarquee.vue.d.ts +30 -0
- package/dist/runtime/components/PageSection.vue +88 -0
- package/dist/runtime/components/PageSection.vue.d.ts +64 -0
- 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/PricingPlan.vue +129 -0
- package/dist/runtime/components/PricingPlan.vue.d.ts +109 -0
- package/dist/runtime/components/PricingPlans.vue +45 -0
- package/dist/runtime/components/PricingPlans.vue.d.ts +41 -0
- package/dist/runtime/components/PricingTable.vue +235 -0
- package/dist/runtime/components/PricingTable.vue.d.ts +98 -0
- 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/SelectMenu.vue.d.ts +3 -3
- 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 +38 -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/User.vue +69 -0
- package/dist/runtime/components/User.vue.d.ts +46 -0
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue +2 -2
- package/dist/runtime/components/color-mode/ColorModeButton.vue +16 -16
- 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/ColorModeSwitch.vue +19 -19
- package/dist/runtime/components/content/ContentNavigation.vue +109 -109
- package/dist/runtime/components/content/ContentSearch.vue +25 -25
- package/dist/runtime/components/content/ContentSearchButton.vue +38 -38
- package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +58 -12
- package/dist/runtime/components/content/ContentSurround.vue +31 -31
- package/dist/runtime/components/content/ContentSurround.vue.d.ts +52 -59
- package/dist/runtime/components/content/ContentToc.vue +88 -76
- package/dist/runtime/components/content/ContentToc.vue.d.ts +86 -88
- package/dist/runtime/components/locale/LocaleSelect.vue +20 -20
- package/dist/runtime/components/prose/A.vue +3 -3
- package/dist/runtime/components/prose/Accordion.vue +5 -5
- package/dist/runtime/components/prose/AccordionItem.vue +5 -5
- package/dist/runtime/components/prose/Badge.vue +3 -3
- package/dist/runtime/components/prose/Blockquote.vue +3 -3
- package/dist/runtime/components/prose/Callout.vue +27 -27
- package/dist/runtime/components/prose/Card.vue +43 -43
- package/dist/runtime/components/prose/CardGroup.vue +3 -3
- package/dist/runtime/components/prose/Code.vue +3 -3
- package/dist/runtime/components/prose/CodeCollapse.vue +16 -16
- package/dist/runtime/components/prose/CodeGroup.vue +15 -15
- package/dist/runtime/components/prose/CodeIcon.vue +1 -1
- package/dist/runtime/components/prose/CodePreview.vue +9 -9
- package/dist/runtime/components/prose/CodeTree.vue +61 -61
- package/dist/runtime/components/prose/Collapsible.vue +15 -15
- package/dist/runtime/components/prose/Em.vue +1 -1
- package/dist/runtime/components/prose/Field.vue +23 -23
- package/dist/runtime/components/prose/FieldGroup.vue +3 -3
- package/dist/runtime/components/prose/H1.vue +6 -6
- package/dist/runtime/components/prose/H2.vue +10 -10
- package/dist/runtime/components/prose/H3.vue +10 -10
- package/dist/runtime/components/prose/H4.vue +6 -6
- package/dist/runtime/components/prose/Hr.vue +1 -1
- package/dist/runtime/components/prose/Icon.vue +1 -1
- package/dist/runtime/components/prose/Img.vue +8 -8
- package/dist/runtime/components/prose/Kbd.vue +1 -1
- package/dist/runtime/components/prose/Li.vue +3 -3
- package/dist/runtime/components/prose/Ol.vue +3 -3
- package/dist/runtime/components/prose/P.vue +3 -3
- package/dist/runtime/components/prose/Pre.vue +20 -20
- package/dist/runtime/components/prose/Script.vue +3 -3
- package/dist/runtime/components/prose/Steps.vue +3 -3
- package/dist/runtime/components/prose/Strong.vue +3 -3
- package/dist/runtime/components/prose/Table.vue +5 -5
- package/dist/runtime/components/prose/Tabs.vue +14 -14
- package/dist/runtime/components/prose/TabsItem.vue +5 -5
- package/dist/runtime/components/prose/Tbody.vue +3 -3
- package/dist/runtime/components/prose/Td.vue +3 -3
- package/dist/runtime/components/prose/Th.vue +3 -3
- package/dist/runtime/components/prose/Thead.vue +3 -3
- package/dist/runtime/components/prose/Tr.vue +3 -3
- package/dist/runtime/components/prose/Ul.vue +3 -3
- package/dist/runtime/components/prose/callout/Caution.vue +3 -3
- package/dist/runtime/components/prose/callout/Note.vue +3 -3
- package/dist/runtime/components/prose/callout/Tip.vue +3 -3
- package/dist/runtime/components/prose/callout/Warning.vue +3 -3
- 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/index.d.ts +33 -0
- package/dist/runtime/types/index.js +33 -0
- 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.DQZ75GCP.mjs → ui.DErCA3YU.mjs} +1247 -50
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +1 -1
- package/vue-plugin.d.ts +5 -5
- package/.nuxt/ui/prose.ts +0 -321
|
@@ -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>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/page";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { Primitive, Slot } from "reka-ui";
|
|
8
|
+
import { useAppConfig } from "#imports";
|
|
9
|
+
import { tv } from "../utils/tv";
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
as: { type: null, required: false },
|
|
12
|
+
class: { type: null, required: false },
|
|
13
|
+
ui: { type: null, required: false }
|
|
14
|
+
});
|
|
15
|
+
const slots = defineSlots();
|
|
16
|
+
const appConfig = useAppConfig();
|
|
17
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.page || {} })({
|
|
18
|
+
left: !!slots.left,
|
|
19
|
+
right: !!slots.right
|
|
20
|
+
}));
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
25
|
+
<Slot v-if="!!slots.left" :class="ui.left({ class: props.ui?.left })">
|
|
26
|
+
<slot name="left" />
|
|
27
|
+
</Slot>
|
|
28
|
+
|
|
29
|
+
<div :class="ui.center({ class: props.ui?.center })">
|
|
30
|
+
<slot />
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<Slot v-if="!!slots.right" :class="ui.right({ class: props.ui?.right })">
|
|
34
|
+
<slot name="right" />
|
|
35
|
+
</Slot>
|
|
36
|
+
</Primitive>
|
|
37
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import theme from '#build/ui/page';
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
+
import type { ComponentConfig } from '../types';
|
|
4
|
+
type Page = ComponentConfig<typeof theme, AppConfig, 'page'>;
|
|
5
|
+
export interface PageProps {
|
|
6
|
+
/**
|
|
7
|
+
* The element or component this component should render as.
|
|
8
|
+
* @defaultValue 'div'
|
|
9
|
+
*/
|
|
10
|
+
as?: any;
|
|
11
|
+
class?: any;
|
|
12
|
+
ui?: Page['slots'];
|
|
13
|
+
}
|
|
14
|
+
export interface PageSlots {
|
|
15
|
+
left(props?: {}): any;
|
|
16
|
+
default(props?: {}): any;
|
|
17
|
+
right(props?: {}): any;
|
|
18
|
+
}
|
|
19
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<PageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PageSlots>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/page-accordion";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { omit, transformUI } from "../utils";
|
|
8
|
+
import { useAppConfig } from "#imports";
|
|
9
|
+
import { tv } from "../utils/tv";
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
type: { type: null, required: false, default: "multiple" },
|
|
12
|
+
class: { type: null, required: false },
|
|
13
|
+
ui: { type: void 0, required: false }
|
|
14
|
+
});
|
|
15
|
+
const slots = defineSlots();
|
|
16
|
+
const appConfig = useAppConfig();
|
|
17
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.pageAccordion || {} })());
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<UAccordion :type="type" :unmount-on-hide="false" :class="ui.base({ class: [props.ui?.base, props.class] })" :ui="transformUI(omit(ui, ['base']), props.ui)">
|
|
22
|
+
<template v-for="(_, name) in slots" #[name]="slotData">
|
|
23
|
+
<slot :name="name" v-bind="slotData" />
|
|
24
|
+
</template>
|
|
25
|
+
</UAccordion>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import theme from '#build/ui/page-accordion';
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
+
import type { AccordionProps, AccordionSlots, AccordionItem, ComponentConfig } from '../types';
|
|
4
|
+
type PageAccordion = ComponentConfig<typeof theme, AppConfig, 'pageAccordion'>;
|
|
5
|
+
export interface PageAccordionProps<T extends AccordionItem = AccordionItem> extends /** @vue-ignore */ Omit<AccordionProps<T>, 'type'> {
|
|
6
|
+
type?: AccordionProps<T>['type'];
|
|
7
|
+
class?: any;
|
|
8
|
+
ui?: PageAccordion['slots'] & AccordionProps['ui'];
|
|
9
|
+
}
|
|
10
|
+
export type PageAccordionSlots<T extends AccordionItem = AccordionItem> = AccordionSlots<T & {
|
|
11
|
+
slot?: string;
|
|
12
|
+
}>;
|
|
13
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<PageAccordionProps<AccordionItem>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageAccordionProps<AccordionItem>> & Readonly<{}>, {
|
|
14
|
+
type: "multiple" | "single";
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PageAccordionSlots<AccordionItem>>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/page-anchors";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { Primitive } from "reka-ui";
|
|
8
|
+
import { pickLinkProps } from "../utils/link";
|
|
9
|
+
import { useAppConfig } from "#imports";
|
|
10
|
+
import { tv } from "../utils/tv";
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
as: { type: null, required: false, default: "nav" },
|
|
13
|
+
links: { type: Array, required: false },
|
|
14
|
+
class: { type: null, required: false },
|
|
15
|
+
ui: { type: null, required: false }
|
|
16
|
+
});
|
|
17
|
+
const slots = defineSlots();
|
|
18
|
+
const appConfig = useAppConfig();
|
|
19
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.pageAnchors || {} })());
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
24
|
+
<ul :class="ui.list({ class: props.ui?.list })">
|
|
25
|
+
<li v-for="(link, index) in links" :key="index" :class="ui.item({ class: [props.ui?.item, link.ui?.item] })">
|
|
26
|
+
<ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(link)" custom>
|
|
27
|
+
<ULinkBase v-bind="slotProps" :class="ui.link({ class: [props.ui?.link, link.ui?.link, link.class], active })">
|
|
28
|
+
<slot name="link" :link="link" :active="active">
|
|
29
|
+
<div v-if="link.icon || !!slots['link-leading']" :class="ui.linkLeading({ class: [props.ui?.linkLeading, link.ui?.linkLeading], active })">
|
|
30
|
+
<slot name="link-leading" :link="link" :active="active">
|
|
31
|
+
<UIcon v-if="link.icon" :name="link.icon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, link.ui?.linkLeadingIcon], active })" />
|
|
32
|
+
</slot>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<span v-if="link.label || !!slots['link-label']" :class="ui.linkLabel({ class: [props.ui?.linkLabel, link.ui?.linkLabel], active })">
|
|
36
|
+
<slot name="link-label" :link="link" :active="active">
|
|
37
|
+
{{ link.label }}
|
|
38
|
+
</slot>
|
|
39
|
+
|
|
40
|
+
<UIcon v-if="link.target === '_blank'" :name="appConfig.ui.icons.external" :class="ui.linkLabelExternalIcon({ class: [props.ui?.linkLabelExternalIcon, link.ui?.linkLabelExternalIcon], active })" />
|
|
41
|
+
</span>
|
|
42
|
+
|
|
43
|
+
<slot name="link-trailing" :link="link" :active="active" />
|
|
44
|
+
</slot>
|
|
45
|
+
</ULinkBase>
|
|
46
|
+
</ULink>
|
|
47
|
+
</li>
|
|
48
|
+
</ul>
|
|
49
|
+
</Primitive>
|
|
50
|
+
</template>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import theme from '#build/ui/page-anchors';
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
+
import type { LinkProps, ComponentConfig } from '../types';
|
|
4
|
+
type PageAnchors = ComponentConfig<typeof theme, AppConfig, 'pageAnchors'>;
|
|
5
|
+
export interface PageAnchor extends Omit<LinkProps, 'custom'> {
|
|
6
|
+
label: string;
|
|
7
|
+
/**
|
|
8
|
+
* @IconifyIcon
|
|
9
|
+
*/
|
|
10
|
+
icon?: string;
|
|
11
|
+
class?: any;
|
|
12
|
+
ui?: Pick<PageAnchors['slots'], 'item' | 'link' | 'linkLabel' | 'linkLabelExternalIcon' | 'linkLeading' | 'linkLeadingIcon'>;
|
|
13
|
+
}
|
|
14
|
+
export interface PageAnchorsProps<T extends PageAnchor = PageAnchor> {
|
|
15
|
+
/**
|
|
16
|
+
* The element or component this component should render as.
|
|
17
|
+
* @defaultValue 'nav'
|
|
18
|
+
*/
|
|
19
|
+
as?: any;
|
|
20
|
+
links?: T[];
|
|
21
|
+
class?: any;
|
|
22
|
+
ui?: PageAnchors['slots'];
|
|
23
|
+
}
|
|
24
|
+
type SlotProps<T> = (props: {
|
|
25
|
+
link: T;
|
|
26
|
+
active: boolean;
|
|
27
|
+
}) => any;
|
|
28
|
+
export interface PageAnchorsSlots<T extends PageAnchor = PageAnchor> {
|
|
29
|
+
'link': SlotProps<T>;
|
|
30
|
+
'link-leading': SlotProps<T>;
|
|
31
|
+
'link-label': SlotProps<T>;
|
|
32
|
+
'link-trailing': SlotProps<T>;
|
|
33
|
+
}
|
|
34
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<PageAnchorsProps<PageAnchor>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageAnchorsProps<PageAnchor>> & Readonly<{}>, {
|
|
35
|
+
as: any;
|
|
36
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PageAnchorsSlots<PageAnchor>>;
|
|
37
|
+
export default _default;
|
|
38
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
39
|
+
new (): {
|
|
40
|
+
$slots: S;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/page-aside";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { Primitive } from "reka-ui";
|
|
8
|
+
import { useAppConfig } from "#imports";
|
|
9
|
+
import { tv } from "../utils/tv";
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
as: { type: null, required: false, default: "aside" },
|
|
12
|
+
class: { type: null, required: false },
|
|
13
|
+
ui: { type: null, required: false }
|
|
14
|
+
});
|
|
15
|
+
const slots = defineSlots();
|
|
16
|
+
const appConfig = useAppConfig();
|
|
17
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.pageAside || {} })());
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
22
|
+
<div :class="ui.container({ class: props.ui?.container })">
|
|
23
|
+
<div v-if="!!slots.top" :class="ui.top({ class: props.ui?.top })">
|
|
24
|
+
<div :class="ui.topHeader({ class: props.ui?.topHeader })" />
|
|
25
|
+
<div :class="ui.topBody({ class: props.ui?.topBody })">
|
|
26
|
+
<slot name="top" />
|
|
27
|
+
</div>
|
|
28
|
+
<div :class="ui.topFooter({ class: props.ui?.topFooter })" />
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<slot />
|
|
32
|
+
|
|
33
|
+
<slot name="bottom" />
|
|
34
|
+
</div>
|
|
35
|
+
</Primitive>
|
|
36
|
+
</template>
|