@nuxt/ui 4.0.1 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nuxt/ui/calendar.ts +221 -9
- package/.nuxt/ui/chat-message.ts +10 -3
- package/.nuxt/ui/command-palette.ts +12 -2
- package/.nuxt/ui/context-menu.ts +3 -1
- package/.nuxt/ui/dropdown-menu.ts +3 -1
- package/.nuxt/ui/empty.ts +83 -0
- package/.nuxt/ui/index.ts +1 -0
- package/.nuxt/ui/input-menu.ts +12 -2
- package/.nuxt/ui/input-number.ts +25 -14
- package/.nuxt/ui/kbd.ts +1 -1
- package/.nuxt/ui/prose/code-tree.ts +1 -1
- package/.nuxt/ui/prose/img.ts +2 -1
- package/.nuxt/ui/select-menu.ts +12 -2
- package/.nuxt/ui/select.ts +4 -2
- package/.nuxt/ui/table.ts +8 -2
- package/.nuxt/ui/tree.ts +25 -11
- package/cli/templates.mjs +14 -2
- package/dist/module.d.mts +15 -0
- package/dist/module.json +2 -2
- package/dist/module.mjs +5 -2
- package/dist/runtime/components/Accordion.d.vue.ts +7 -1
- package/dist/runtime/components/Accordion.vue +4 -4
- package/dist/runtime/components/Accordion.vue.d.ts +7 -1
- package/dist/runtime/components/Alert.d.vue.ts +4 -4
- package/dist/runtime/components/Alert.vue +1 -1
- package/dist/runtime/components/Alert.vue.d.ts +4 -4
- package/dist/runtime/components/AuthForm.d.vue.ts +3 -1
- package/dist/runtime/components/AuthForm.vue +1 -1
- package/dist/runtime/components/AuthForm.vue.d.ts +3 -1
- package/dist/runtime/components/Avatar.d.vue.ts +5 -4
- package/dist/runtime/components/Avatar.vue +10 -3
- package/dist/runtime/components/Avatar.vue.d.ts +5 -4
- package/dist/runtime/components/Badge.d.vue.ts +9 -3
- package/dist/runtime/components/Badge.vue +3 -3
- package/dist/runtime/components/Badge.vue.d.ts +9 -3
- package/dist/runtime/components/Banner.d.vue.ts +4 -2
- package/dist/runtime/components/Banner.vue +1 -1
- package/dist/runtime/components/Banner.vue.d.ts +4 -2
- package/dist/runtime/components/BlogPost.d.vue.ts +9 -3
- package/dist/runtime/components/BlogPost.vue +2 -2
- package/dist/runtime/components/BlogPost.vue.d.ts +9 -3
- package/dist/runtime/components/BlogPosts.d.vue.ts +22 -13
- package/dist/runtime/components/BlogPosts.vue +8 -2
- package/dist/runtime/components/BlogPosts.vue.d.ts +22 -13
- package/dist/runtime/components/Breadcrumb.d.vue.ts +19 -4
- package/dist/runtime/components/Breadcrumb.vue +8 -8
- package/dist/runtime/components/Breadcrumb.vue.d.ts +19 -4
- package/dist/runtime/components/Button.d.vue.ts +9 -3
- package/dist/runtime/components/Button.vue +3 -3
- package/dist/runtime/components/Button.vue.d.ts +9 -3
- package/dist/runtime/components/Calendar.d.vue.ts +4 -0
- package/dist/runtime/components/Calendar.vue +3 -1
- package/dist/runtime/components/Calendar.vue.d.ts +4 -0
- package/dist/runtime/components/ChangelogVersion.d.vue.ts +12 -4
- package/dist/runtime/components/ChangelogVersion.vue +3 -3
- package/dist/runtime/components/ChangelogVersion.vue.d.ts +12 -4
- package/dist/runtime/components/ChangelogVersions.d.vue.ts +8 -36
- package/dist/runtime/components/ChangelogVersions.vue +2 -2
- package/dist/runtime/components/ChangelogVersions.vue.d.ts +8 -36
- package/dist/runtime/components/ChatMessage.d.vue.ts +1 -0
- package/dist/runtime/components/ChatMessage.vue +1 -1
- package/dist/runtime/components/ChatMessage.vue.d.ts +1 -0
- package/dist/runtime/components/ChatMessages.d.vue.ts +14 -15
- package/dist/runtime/components/ChatMessages.vue +24 -8
- package/dist/runtime/components/ChatMessages.vue.d.ts +14 -15
- package/dist/runtime/components/CommandPalette.d.vue.ts +43 -12
- package/dist/runtime/components/CommandPalette.vue +134 -68
- package/dist/runtime/components/CommandPalette.vue.d.ts +43 -12
- package/dist/runtime/components/ContextMenu.d.vue.ts +28 -6
- package/dist/runtime/components/ContextMenu.vue +2 -0
- package/dist/runtime/components/ContextMenu.vue.d.ts +28 -6
- package/dist/runtime/components/ContextMenuContent.d.vue.ts +2 -3
- package/dist/runtime/components/ContextMenuContent.vue +21 -11
- package/dist/runtime/components/ContextMenuContent.vue.d.ts +2 -3
- package/dist/runtime/components/DashboardNavbar.d.vue.ts +9 -3
- package/dist/runtime/components/DashboardNavbar.vue +3 -3
- package/dist/runtime/components/DashboardNavbar.vue.d.ts +9 -3
- package/dist/runtime/components/DashboardSearch.d.vue.ts +3 -1
- package/dist/runtime/components/DashboardSearch.vue +2 -2
- package/dist/runtime/components/DashboardSearch.vue.d.ts +3 -1
- package/dist/runtime/components/DashboardSearchButton.vue +2 -2
- package/dist/runtime/components/DashboardSidebar.d.vue.ts +5 -1
- package/dist/runtime/components/DashboardSidebar.vue +4 -4
- package/dist/runtime/components/DashboardSidebar.vue.d.ts +5 -1
- package/dist/runtime/components/Drawer.vue +2 -5
- package/dist/runtime/components/DropdownMenu.d.vue.ts +28 -6
- package/dist/runtime/components/DropdownMenu.vue +2 -0
- package/dist/runtime/components/DropdownMenu.vue.d.ts +28 -6
- package/dist/runtime/components/DropdownMenuContent.d.vue.ts +8 -5
- package/dist/runtime/components/DropdownMenuContent.vue +21 -11
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +8 -5
- package/dist/runtime/components/Empty.d.vue.ts +53 -0
- package/dist/runtime/components/Empty.vue +68 -0
- package/dist/runtime/components/Empty.vue.d.ts +53 -0
- package/dist/runtime/components/Error.d.vue.ts +0 -1
- package/dist/runtime/components/Error.vue +1 -1
- package/dist/runtime/components/Error.vue.d.ts +0 -1
- package/dist/runtime/components/FileUpload.d.vue.ts +6 -1
- package/dist/runtime/components/FileUpload.vue +8 -7
- package/dist/runtime/components/FileUpload.vue.d.ts +6 -1
- package/dist/runtime/components/FooterColumns.d.vue.ts +9 -2
- package/dist/runtime/components/FooterColumns.vue +2 -2
- package/dist/runtime/components/FooterColumns.vue.d.ts +9 -2
- package/dist/runtime/components/Header.d.vue.ts +4 -1
- package/dist/runtime/components/Header.vue +3 -3
- package/dist/runtime/components/Header.vue.d.ts +4 -1
- package/dist/runtime/components/Input.d.vue.ts +9 -3
- package/dist/runtime/components/Input.vue +3 -3
- package/dist/runtime/components/Input.vue.d.ts +9 -3
- package/dist/runtime/components/InputMenu.d.vue.ts +40 -10
- package/dist/runtime/components/InputMenu.vue +117 -65
- package/dist/runtime/components/InputMenu.vue.d.ts +40 -10
- package/dist/runtime/components/InputNumber.d.vue.ts +4 -2
- package/dist/runtime/components/InputNumber.vue +7 -5
- package/dist/runtime/components/InputNumber.vue.d.ts +4 -2
- package/dist/runtime/components/InputTags.d.vue.ts +10 -3
- package/dist/runtime/components/InputTags.vue +5 -5
- package/dist/runtime/components/InputTags.vue.d.ts +10 -3
- package/dist/runtime/components/Main.d.vue.ts +2 -4
- package/dist/runtime/components/Main.vue +1 -1
- package/dist/runtime/components/Main.vue.d.ts +2 -4
- package/dist/runtime/components/Modal.d.vue.ts +1 -4
- package/dist/runtime/components/Modal.vue +3 -6
- package/dist/runtime/components/Modal.vue.d.ts +1 -4
- package/dist/runtime/components/NavigationMenu.d.vue.ts +16 -4
- package/dist/runtime/components/NavigationMenu.vue +14 -7
- package/dist/runtime/components/NavigationMenu.vue.d.ts +16 -4
- package/dist/runtime/components/PageAnchors.d.vue.ts +9 -2
- package/dist/runtime/components/PageAnchors.vue +2 -2
- package/dist/runtime/components/PageAnchors.vue.d.ts +9 -2
- package/dist/runtime/components/PageCard.d.vue.ts +3 -1
- package/dist/runtime/components/PageCard.vue +1 -1
- package/dist/runtime/components/PageCard.vue.d.ts +3 -1
- package/dist/runtime/components/PageFeature.d.vue.ts +3 -1
- package/dist/runtime/components/PageFeature.vue +1 -1
- package/dist/runtime/components/PageFeature.vue.d.ts +3 -1
- package/dist/runtime/components/PageLinks.d.vue.ts +9 -2
- package/dist/runtime/components/PageLinks.vue +2 -2
- package/dist/runtime/components/PageLinks.vue.d.ts +9 -2
- package/dist/runtime/components/PageSection.d.vue.ts +3 -1
- package/dist/runtime/components/PageSection.vue +1 -1
- package/dist/runtime/components/PageSection.vue.d.ts +3 -1
- package/dist/runtime/components/Pagination.d.vue.ts +3 -1
- package/dist/runtime/components/Pagination.vue +1 -1
- package/dist/runtime/components/Pagination.vue.d.ts +3 -1
- package/dist/runtime/components/Popover.d.vue.ts +24 -23
- package/dist/runtime/components/Popover.vue +4 -4
- package/dist/runtime/components/Popover.vue.d.ts +24 -23
- package/dist/runtime/components/PricingPlan.d.vue.ts +9 -3
- package/dist/runtime/components/PricingPlan.vue +3 -3
- package/dist/runtime/components/PricingPlan.vue.d.ts +9 -3
- package/dist/runtime/components/PricingPlans.d.vue.ts +20 -13
- package/dist/runtime/components/PricingPlans.vue +7 -1
- package/dist/runtime/components/PricingPlans.vue.d.ts +20 -13
- package/dist/runtime/components/Select.d.vue.ts +20 -9
- package/dist/runtime/components/Select.vue +18 -9
- package/dist/runtime/components/Select.vue.d.ts +20 -9
- package/dist/runtime/components/SelectMenu.d.vue.ts +39 -11
- package/dist/runtime/components/SelectMenu.vue +114 -61
- package/dist/runtime/components/SelectMenu.vue.d.ts +39 -11
- package/dist/runtime/components/Separator.d.vue.ts +3 -1
- package/dist/runtime/components/Separator.vue +1 -1
- package/dist/runtime/components/Separator.vue.d.ts +3 -1
- package/dist/runtime/components/Slideover.d.vue.ts +1 -4
- package/dist/runtime/components/Slideover.vue +3 -6
- package/dist/runtime/components/Slideover.vue.d.ts +1 -4
- package/dist/runtime/components/Stepper.d.vue.ts +4 -1
- package/dist/runtime/components/Stepper.vue +1 -1
- package/dist/runtime/components/Stepper.vue.d.ts +4 -1
- package/dist/runtime/components/Table.d.vue.ts +21 -1
- package/dist/runtime/components/Table.vue +126 -60
- package/dist/runtime/components/Table.vue.d.ts +21 -1
- package/dist/runtime/components/Tabs.d.vue.ts +8 -3
- package/dist/runtime/components/Tabs.vue +3 -3
- package/dist/runtime/components/Tabs.vue.d.ts +8 -3
- package/dist/runtime/components/Textarea.d.vue.ts +9 -3
- package/dist/runtime/components/Textarea.vue +3 -3
- package/dist/runtime/components/Textarea.vue.d.ts +9 -3
- package/dist/runtime/components/Toast.d.vue.ts +4 -4
- package/dist/runtime/components/Toast.vue +1 -1
- package/dist/runtime/components/Toast.vue.d.ts +4 -4
- package/dist/runtime/components/Toaster.d.vue.ts +6 -0
- package/dist/runtime/components/Toaster.vue +6 -3
- package/dist/runtime/components/Toaster.vue.d.ts +6 -0
- package/dist/runtime/components/Tooltip.d.vue.ts +3 -1
- package/dist/runtime/components/Tooltip.vue +1 -1
- package/dist/runtime/components/Tooltip.vue.d.ts +3 -1
- package/dist/runtime/components/Tree.d.vue.ts +43 -5
- package/dist/runtime/components/Tree.vue +169 -81
- package/dist/runtime/components/Tree.vue.d.ts +43 -5
- package/dist/runtime/components/User.d.vue.ts +3 -1
- package/dist/runtime/components/User.vue +1 -1
- package/dist/runtime/components/User.vue.d.ts +3 -1
- package/dist/runtime/components/content/ContentNavigation.d.vue.ts +1 -0
- package/dist/runtime/components/content/ContentNavigation.vue +5 -5
- package/dist/runtime/components/content/ContentNavigation.vue.d.ts +1 -0
- package/dist/runtime/components/content/ContentSearch.d.vue.ts +3 -1
- package/dist/runtime/components/content/ContentSearch.vue +4 -2
- package/dist/runtime/components/content/ContentSearch.vue.d.ts +3 -1
- package/dist/runtime/components/content/ContentSearchButton.vue +2 -2
- package/dist/runtime/components/content/ContentSurround.d.vue.ts +1 -0
- package/dist/runtime/components/content/ContentSurround.vue +4 -4
- package/dist/runtime/components/content/ContentSurround.vue.d.ts +1 -0
- package/dist/runtime/components/content/ContentToc.d.vue.ts +2 -0
- package/dist/runtime/components/content/ContentToc.vue +2 -2
- package/dist/runtime/components/content/ContentToc.vue.d.ts +2 -0
- package/dist/runtime/components/prose/Accordion.d.vue.ts +6 -0
- package/dist/runtime/components/prose/Accordion.vue +3 -2
- package/dist/runtime/components/prose/Accordion.vue.d.ts +6 -0
- package/dist/runtime/components/prose/CodeTree.vue +40 -36
- package/dist/runtime/components/prose/Collapsible.d.vue.ts +2 -2
- package/dist/runtime/components/prose/Collapsible.vue +2 -2
- package/dist/runtime/components/prose/Collapsible.vue.d.ts +2 -2
- package/dist/runtime/components/prose/Field.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Field.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Img.vue +14 -3
- package/dist/runtime/components/prose/Tabs.d.vue.ts +6 -0
- package/dist/runtime/components/prose/Tabs.vue +3 -2
- package/dist/runtime/components/prose/Tabs.vue.d.ts +6 -0
- package/dist/runtime/composables/useKbd.js +1 -1
- package/dist/runtime/composables/useToast.d.ts +3 -1
- package/dist/runtime/composables/useToast.js +4 -3
- package/dist/runtime/inertia/components/Link.vue +12 -7
- package/dist/runtime/locale/hr.d.ts +3 -0
- package/dist/runtime/locale/hr.js +129 -0
- package/dist/runtime/locale/index.d.ts +1 -0
- package/dist/runtime/locale/index.js +1 -0
- package/dist/runtime/types/index.d.ts +2 -1
- package/dist/runtime/types/index.js +2 -1
- package/dist/runtime/types/tv.d.ts +6 -0
- package/dist/shared/{ui.D-FDXAUi.mjs → ui.Cmctwxv6.mjs} +381 -48
- package/dist/unplugin.mjs +2 -1
- package/dist/vite.mjs +3 -2
- package/package.json +18 -17
|
@@ -69,10 +69,7 @@ export interface ModalSlots {
|
|
|
69
69
|
description(props?: {}): any;
|
|
70
70
|
actions(props?: {}): any;
|
|
71
71
|
close(props: {
|
|
72
|
-
|
|
73
|
-
ui: {
|
|
74
|
-
[K in keyof Required<Modal['slots']>]: (props?: Record<string, any>) => string;
|
|
75
|
-
};
|
|
72
|
+
ui: Modal['ui'];
|
|
76
73
|
}): any;
|
|
77
74
|
body(props: {
|
|
78
75
|
close: () => void;
|
|
@@ -52,7 +52,7 @@ export interface NavigationMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'cu
|
|
|
52
52
|
children?: NavigationMenuChildItem[];
|
|
53
53
|
defaultOpen?: boolean;
|
|
54
54
|
open?: boolean;
|
|
55
|
-
onSelect
|
|
55
|
+
onSelect?: (e: Event) => void;
|
|
56
56
|
class?: any;
|
|
57
57
|
ui?: Pick<NavigationMenu['slots'], 'item' | 'linkLeadingAvatarSize' | 'linkLeadingAvatar' | 'linkLeadingIcon' | 'linkLabel' | 'linkLabelExternalIcon' | 'linkTrailing' | 'linkTrailingBadgeSize' | 'linkTrailingBadge' | 'linkTrailingIcon' | 'label' | 'link' | 'content' | 'childList' | 'childLabel' | 'childItem' | 'childLink' | 'childLinkIcon' | 'childLinkWrapper' | 'childLinkLabel' | 'childLinkLabelExternalIcon' | 'childLinkDescription'>;
|
|
58
58
|
[key: string]: any;
|
|
@@ -141,18 +141,30 @@ type SlotProps<T extends NavigationMenuItem> = (props: {
|
|
|
141
141
|
item: T;
|
|
142
142
|
index: number;
|
|
143
143
|
active?: boolean;
|
|
144
|
+
ui: NavigationMenu['ui'];
|
|
144
145
|
}) => any;
|
|
145
146
|
export type NavigationMenuSlots<A extends ArrayOrNested<NavigationMenuItem> = ArrayOrNested<NavigationMenuItem>, T extends NestedItem<A> = NestedItem<A>> = {
|
|
146
147
|
'item': SlotProps<T>;
|
|
147
148
|
'item-leading': SlotProps<T>;
|
|
148
|
-
'item-label':
|
|
149
|
+
'item-label': (props: {
|
|
150
|
+
item: T;
|
|
151
|
+
index: number;
|
|
152
|
+
active?: boolean;
|
|
153
|
+
}) => any;
|
|
149
154
|
'item-trailing': SlotProps<T>;
|
|
150
|
-
'item-content': SlotProps<T
|
|
155
|
+
'item-content': SlotProps<T> & {
|
|
156
|
+
close?: () => void;
|
|
157
|
+
};
|
|
151
158
|
'list-leading': (props?: {}) => any;
|
|
152
159
|
'list-trailing': (props?: {}) => any;
|
|
153
|
-
} & DynamicSlots<MergeTypes<T>, '
|
|
160
|
+
} & DynamicSlots<MergeTypes<T>, 'label', {
|
|
154
161
|
index: number;
|
|
155
162
|
active?: boolean;
|
|
163
|
+
ui: NavigationMenu['ui'];
|
|
164
|
+
}> & DynamicSlots<MergeTypes<T>, 'leading' | 'trailing' | 'content', {
|
|
165
|
+
index: number;
|
|
166
|
+
active?: boolean;
|
|
167
|
+
ui: NavigationMenu['ui'];
|
|
156
168
|
}>;
|
|
157
169
|
declare const __VLS_export: <T extends ArrayOrNested<NavigationMenuItem>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
158
170
|
props: __VLS_PrettifyLocal<NavigationMenuProps<T> & {
|
|
@@ -102,8 +102,8 @@ function getAccordionDefaultValue(list, level = 0) {
|
|
|
102
102
|
|
|
103
103
|
<template>
|
|
104
104
|
<DefineLinkTemplate v-slot="{ item, active, index }">
|
|
105
|
-
<slot :name="item.slot || 'item'" :item="item" :index="index">
|
|
106
|
-
<slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="active" :index="index">
|
|
105
|
+
<slot :name="item.slot || 'item'" :item="item" :index="index" :active="active" :ui="ui">
|
|
106
|
+
<slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="active" :index="index" :ui="ui">
|
|
107
107
|
<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 })" />
|
|
108
108
|
<UIcon v-else-if="item.icon" :name="item.icon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon], active, disabled: !!item.disabled })" />
|
|
109
109
|
</slot>
|
|
@@ -119,8 +119,8 @@ function getAccordionDefaultValue(list, level = 0) {
|
|
|
119
119
|
<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 })" />
|
|
120
120
|
</span>
|
|
121
121
|
|
|
122
|
-
<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>
|
|
123
|
-
<slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="item" :active="active" :index="index">
|
|
122
|
+
<component :is="orientation === 'vertical' && item.children?.length && !collapsed ? AccordionTrigger : 'span'" v-if="(!collapsed || orientation !== 'vertical') && (item.badge !== void 0 || 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>
|
|
123
|
+
<slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="item" :active="active" :index="index" :ui="ui">
|
|
124
124
|
<UBadge
|
|
125
125
|
v-if="item.badge !== void 0"
|
|
126
126
|
color="neutral"
|
|
@@ -159,8 +159,15 @@ function getAccordionDefaultValue(list, level = 0) {
|
|
|
159
159
|
<ReuseLinkTemplate :item="item" :active="active || item.active" :index="index" />
|
|
160
160
|
</ULinkBase>
|
|
161
161
|
|
|
162
|
-
<template #content>
|
|
163
|
-
<slot
|
|
162
|
+
<template #content="{ close }">
|
|
163
|
+
<slot
|
|
164
|
+
:name="item.slot ? `${item.slot}-content` : 'item-content'"
|
|
165
|
+
:item="item"
|
|
166
|
+
:active="active || item.active"
|
|
167
|
+
:index="index"
|
|
168
|
+
:ui="ui"
|
|
169
|
+
:close="close"
|
|
170
|
+
>
|
|
164
171
|
<ul :class="ui.childList({ class: [props.ui?.childList, item.ui?.childList] })">
|
|
165
172
|
<li :class="ui.childLabel({ class: [props.ui?.childLabel, item.ui?.childLabel] })">
|
|
166
173
|
{{ get(item, props.labelKey) }}
|
|
@@ -195,7 +202,7 @@ function getAccordionDefaultValue(list, level = 0) {
|
|
|
195
202
|
</component>
|
|
196
203
|
|
|
197
204
|
<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] })">
|
|
198
|
-
<slot :name="item.slot ? `${item.slot}-content` : 'item-content'" :item="item" :active="active || item.active" :index="index">
|
|
205
|
+
<slot :name="item.slot ? `${item.slot}-content` : 'item-content'" :item="item" :active="active || item.active" :index="index" :ui="ui">
|
|
199
206
|
<ul :class="ui.childList({ class: [props.ui?.childList, item.ui?.childList] })">
|
|
200
207
|
<li v-for="(childItem, childIndex) in item.children" :key="childIndex" :class="ui.childItem({ class: [props.ui?.childItem, item.ui?.childItem] })">
|
|
201
208
|
<ULink v-slot="{ active: childActive, ...childSlotProps }" v-bind="pickLinkProps(childItem)" custom>
|
|
@@ -52,7 +52,7 @@ export interface NavigationMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'cu
|
|
|
52
52
|
children?: NavigationMenuChildItem[];
|
|
53
53
|
defaultOpen?: boolean;
|
|
54
54
|
open?: boolean;
|
|
55
|
-
onSelect
|
|
55
|
+
onSelect?: (e: Event) => void;
|
|
56
56
|
class?: any;
|
|
57
57
|
ui?: Pick<NavigationMenu['slots'], 'item' | 'linkLeadingAvatarSize' | 'linkLeadingAvatar' | 'linkLeadingIcon' | 'linkLabel' | 'linkLabelExternalIcon' | 'linkTrailing' | 'linkTrailingBadgeSize' | 'linkTrailingBadge' | 'linkTrailingIcon' | 'label' | 'link' | 'content' | 'childList' | 'childLabel' | 'childItem' | 'childLink' | 'childLinkIcon' | 'childLinkWrapper' | 'childLinkLabel' | 'childLinkLabelExternalIcon' | 'childLinkDescription'>;
|
|
58
58
|
[key: string]: any;
|
|
@@ -141,18 +141,30 @@ type SlotProps<T extends NavigationMenuItem> = (props: {
|
|
|
141
141
|
item: T;
|
|
142
142
|
index: number;
|
|
143
143
|
active?: boolean;
|
|
144
|
+
ui: NavigationMenu['ui'];
|
|
144
145
|
}) => any;
|
|
145
146
|
export type NavigationMenuSlots<A extends ArrayOrNested<NavigationMenuItem> = ArrayOrNested<NavigationMenuItem>, T extends NestedItem<A> = NestedItem<A>> = {
|
|
146
147
|
'item': SlotProps<T>;
|
|
147
148
|
'item-leading': SlotProps<T>;
|
|
148
|
-
'item-label':
|
|
149
|
+
'item-label': (props: {
|
|
150
|
+
item: T;
|
|
151
|
+
index: number;
|
|
152
|
+
active?: boolean;
|
|
153
|
+
}) => any;
|
|
149
154
|
'item-trailing': SlotProps<T>;
|
|
150
|
-
'item-content': SlotProps<T
|
|
155
|
+
'item-content': SlotProps<T> & {
|
|
156
|
+
close?: () => void;
|
|
157
|
+
};
|
|
151
158
|
'list-leading': (props?: {}) => any;
|
|
152
159
|
'list-trailing': (props?: {}) => any;
|
|
153
|
-
} & DynamicSlots<MergeTypes<T>, '
|
|
160
|
+
} & DynamicSlots<MergeTypes<T>, 'label', {
|
|
154
161
|
index: number;
|
|
155
162
|
active?: boolean;
|
|
163
|
+
ui: NavigationMenu['ui'];
|
|
164
|
+
}> & DynamicSlots<MergeTypes<T>, 'leading' | 'trailing' | 'content', {
|
|
165
|
+
index: number;
|
|
166
|
+
active?: boolean;
|
|
167
|
+
ui: NavigationMenu['ui'];
|
|
156
168
|
}>;
|
|
157
169
|
declare const __VLS_export: <T extends ArrayOrNested<NavigationMenuItem>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
158
170
|
props: __VLS_PrettifyLocal<NavigationMenuProps<T> & {
|
|
@@ -25,12 +25,19 @@ export interface PageAnchorsProps<T extends PageAnchor = PageAnchor> {
|
|
|
25
25
|
type SlotProps<T> = (props: {
|
|
26
26
|
link: T;
|
|
27
27
|
active: boolean;
|
|
28
|
+
ui: PageAnchors['ui'];
|
|
28
29
|
}) => any;
|
|
29
30
|
export interface PageAnchorsSlots<T extends PageAnchor = PageAnchor> {
|
|
30
31
|
'link': SlotProps<T>;
|
|
31
32
|
'link-leading': SlotProps<T>;
|
|
32
|
-
'link-label':
|
|
33
|
-
|
|
33
|
+
'link-label'(props: {
|
|
34
|
+
link: T;
|
|
35
|
+
active: boolean;
|
|
36
|
+
}): any;
|
|
37
|
+
'link-trailing'(props: {
|
|
38
|
+
link: T;
|
|
39
|
+
active: boolean;
|
|
40
|
+
}): any;
|
|
34
41
|
}
|
|
35
42
|
declare const __VLS_export: <T extends PageAnchor>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
36
43
|
props: __VLS_PrettifyLocal<PageAnchorsProps<T>> & import("vue").PublicProps;
|
|
@@ -28,9 +28,9 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.pageAnchors |
|
|
|
28
28
|
<li v-for="(link, index) in links" :key="index" :class="ui.item({ class: [props.ui?.item, link.ui?.item] })">
|
|
29
29
|
<ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(link)" custom>
|
|
30
30
|
<ULinkBase v-bind="slotProps" :class="ui.link({ class: [props.ui?.link, link.ui?.link, link.class], active })">
|
|
31
|
-
<slot name="link" :link="link" :active="active">
|
|
31
|
+
<slot name="link" :link="link" :active="active" :ui="ui">
|
|
32
32
|
<div v-if="link.icon || !!slots['link-leading']" :class="ui.linkLeading({ class: [props.ui?.linkLeading, link.ui?.linkLeading], active })">
|
|
33
|
-
<slot name="link-leading" :link="link" :active="active">
|
|
33
|
+
<slot name="link-leading" :link="link" :active="active" :ui="ui">
|
|
34
34
|
<UIcon v-if="link.icon" :name="link.icon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, link.ui?.linkLeadingIcon], active })" />
|
|
35
35
|
</slot>
|
|
36
36
|
</div>
|
|
@@ -25,12 +25,19 @@ export interface PageAnchorsProps<T extends PageAnchor = PageAnchor> {
|
|
|
25
25
|
type SlotProps<T> = (props: {
|
|
26
26
|
link: T;
|
|
27
27
|
active: boolean;
|
|
28
|
+
ui: PageAnchors['ui'];
|
|
28
29
|
}) => any;
|
|
29
30
|
export interface PageAnchorsSlots<T extends PageAnchor = PageAnchor> {
|
|
30
31
|
'link': SlotProps<T>;
|
|
31
32
|
'link-leading': SlotProps<T>;
|
|
32
|
-
'link-label':
|
|
33
|
-
|
|
33
|
+
'link-label'(props: {
|
|
34
|
+
link: T;
|
|
35
|
+
active: boolean;
|
|
36
|
+
}): any;
|
|
37
|
+
'link-trailing'(props: {
|
|
38
|
+
link: T;
|
|
39
|
+
active: boolean;
|
|
40
|
+
}): any;
|
|
34
41
|
}
|
|
35
42
|
declare const __VLS_export: <T extends PageAnchor>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
36
43
|
props: __VLS_PrettifyLocal<PageAnchorsProps<T>> & import("vue").PublicProps;
|
|
@@ -55,7 +55,9 @@ export interface PageCardProps {
|
|
|
55
55
|
export interface PageCardSlots {
|
|
56
56
|
header(props?: {}): any;
|
|
57
57
|
body(props?: {}): any;
|
|
58
|
-
leading(props
|
|
58
|
+
leading(props: {
|
|
59
|
+
ui: PageCard['ui'];
|
|
60
|
+
}): any;
|
|
59
61
|
title(props?: {}): any;
|
|
60
62
|
description(props?: {}): any;
|
|
61
63
|
footer(props?: {}): any;
|
|
@@ -80,7 +80,7 @@ const ariaLabel = computed(() => {
|
|
|
80
80
|
</div>
|
|
81
81
|
|
|
82
82
|
<div v-if="icon || !!slots.leading" :class="ui.leading({ class: props.ui?.leading })">
|
|
83
|
-
<slot name="leading">
|
|
83
|
+
<slot name="leading" :ui="ui">
|
|
84
84
|
<UIcon v-if="icon" :name="icon" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
85
85
|
</slot>
|
|
86
86
|
</div>
|
|
@@ -55,7 +55,9 @@ export interface PageCardProps {
|
|
|
55
55
|
export interface PageCardSlots {
|
|
56
56
|
header(props?: {}): any;
|
|
57
57
|
body(props?: {}): any;
|
|
58
|
-
leading(props
|
|
58
|
+
leading(props: {
|
|
59
|
+
ui: PageCard['ui'];
|
|
60
|
+
}): any;
|
|
59
61
|
title(props?: {}): any;
|
|
60
62
|
description(props?: {}): any;
|
|
61
63
|
footer(props?: {}): any;
|
|
@@ -28,7 +28,9 @@ export interface PageFeatureProps {
|
|
|
28
28
|
ui?: PageFeature['slots'];
|
|
29
29
|
}
|
|
30
30
|
export interface PageFeatureSlots {
|
|
31
|
-
leading(props
|
|
31
|
+
leading(props: {
|
|
32
|
+
ui: PageFeature['ui'];
|
|
33
|
+
}): any;
|
|
32
34
|
title(props?: {}): any;
|
|
33
35
|
description(props?: {}): any;
|
|
34
36
|
default(props?: {}): any;
|
|
@@ -38,7 +38,7 @@ const ariaLabel = computed(() => {
|
|
|
38
38
|
<template>
|
|
39
39
|
<Primitive :as="as" :data-orientation="orientation" :class="ui.root({ class: [props.ui?.root, props.class] })" @click="onClick">
|
|
40
40
|
<div v-if="icon || !!slots.leading" :class="ui.leading({ class: props.ui?.leading })">
|
|
41
|
-
<slot name="leading">
|
|
41
|
+
<slot name="leading" :ui="ui">
|
|
42
42
|
<UIcon v-if="icon" :name="icon" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
43
43
|
</slot>
|
|
44
44
|
</div>
|
|
@@ -28,7 +28,9 @@ export interface PageFeatureProps {
|
|
|
28
28
|
ui?: PageFeature['slots'];
|
|
29
29
|
}
|
|
30
30
|
export interface PageFeatureSlots {
|
|
31
|
-
leading(props
|
|
31
|
+
leading(props: {
|
|
32
|
+
ui: PageFeature['ui'];
|
|
33
|
+
}): any;
|
|
32
34
|
title(props?: {}): any;
|
|
33
35
|
description(props?: {}): any;
|
|
34
36
|
default(props?: {}): any;
|
|
@@ -26,13 +26,20 @@ export interface PageLinksProps<T extends PageLink = PageLink> {
|
|
|
26
26
|
type SlotProps<T> = (props: {
|
|
27
27
|
link: T;
|
|
28
28
|
active: boolean;
|
|
29
|
+
ui: PageLinks['ui'];
|
|
29
30
|
}) => any;
|
|
30
31
|
export interface PageLinksSlots<T extends PageLink = PageLink> {
|
|
31
32
|
'title'(props?: {}): any;
|
|
32
33
|
'link': SlotProps<T>;
|
|
33
34
|
'link-leading': SlotProps<T>;
|
|
34
|
-
'link-label':
|
|
35
|
-
|
|
35
|
+
'link-label'(props: {
|
|
36
|
+
link: T;
|
|
37
|
+
active: boolean;
|
|
38
|
+
}): any;
|
|
39
|
+
'link-trailing'(props: {
|
|
40
|
+
link: T;
|
|
41
|
+
active: boolean;
|
|
42
|
+
}): any;
|
|
36
43
|
}
|
|
37
44
|
declare const __VLS_export: <T extends PageLink>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
38
45
|
props: __VLS_PrettifyLocal<PageLinksProps<T>> & import("vue").PublicProps;
|
|
@@ -35,8 +35,8 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.pageLinks ||
|
|
|
35
35
|
<li v-for="(link, index) in links" :key="index" :class="ui.item({ class: [props.ui?.item, link.ui?.item] })">
|
|
36
36
|
<ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(link)" custom>
|
|
37
37
|
<ULinkBase v-bind="slotProps" :class="ui.link({ class: [props.ui?.link, link.ui?.link, link.class], active })">
|
|
38
|
-
<slot name="link" :link="link" :active="active">
|
|
39
|
-
<slot name="link-leading" :link="link" :active="active">
|
|
38
|
+
<slot name="link" :link="link" :active="active" :ui="ui">
|
|
39
|
+
<slot name="link-leading" :link="link" :active="active" :ui="ui">
|
|
40
40
|
<UIcon v-if="link.icon" :name="link.icon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, link.ui?.linkLeadingIcon], active })" />
|
|
41
41
|
</slot>
|
|
42
42
|
|
|
@@ -26,13 +26,20 @@ export interface PageLinksProps<T extends PageLink = PageLink> {
|
|
|
26
26
|
type SlotProps<T> = (props: {
|
|
27
27
|
link: T;
|
|
28
28
|
active: boolean;
|
|
29
|
+
ui: PageLinks['ui'];
|
|
29
30
|
}) => any;
|
|
30
31
|
export interface PageLinksSlots<T extends PageLink = PageLink> {
|
|
31
32
|
'title'(props?: {}): any;
|
|
32
33
|
'link': SlotProps<T>;
|
|
33
34
|
'link-leading': SlotProps<T>;
|
|
34
|
-
'link-label':
|
|
35
|
-
|
|
35
|
+
'link-label'(props: {
|
|
36
|
+
link: T;
|
|
37
|
+
active: boolean;
|
|
38
|
+
}): any;
|
|
39
|
+
'link-trailing'(props: {
|
|
40
|
+
link: T;
|
|
41
|
+
active: boolean;
|
|
42
|
+
}): any;
|
|
36
43
|
}
|
|
37
44
|
declare const __VLS_export: <T extends PageLink>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
38
45
|
props: __VLS_PrettifyLocal<PageLinksProps<T>> & import("vue").PublicProps;
|
|
@@ -45,7 +45,9 @@ export interface PageSectionProps {
|
|
|
45
45
|
export interface PageSectionSlots {
|
|
46
46
|
top(props?: {}): any;
|
|
47
47
|
header(props?: {}): any;
|
|
48
|
-
leading(props
|
|
48
|
+
leading(props: {
|
|
49
|
+
ui: PageSection['ui'];
|
|
50
|
+
}): any;
|
|
49
51
|
headline(props?: {}): any;
|
|
50
52
|
title(props?: {}): any;
|
|
51
53
|
description(props?: {}): any;
|
|
@@ -44,7 +44,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.pageSection |
|
|
|
44
44
|
<div v-if="!!slots.header || (icon || !!slots.leading) || (headline || !!slots.headline) || (title || !!slots.title) || (description || !!slots.description)" :class="ui.header({ class: props.ui?.header })">
|
|
45
45
|
<slot name="header">
|
|
46
46
|
<div v-if="icon || !!slots.leading" :class="ui.leading({ class: props.ui?.leading })">
|
|
47
|
-
<slot name="leading">
|
|
47
|
+
<slot name="leading" :ui="ui">
|
|
48
48
|
<UIcon v-if="icon" :name="icon" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
49
49
|
</slot>
|
|
50
50
|
</div>
|
|
@@ -45,7 +45,9 @@ export interface PageSectionProps {
|
|
|
45
45
|
export interface PageSectionSlots {
|
|
46
46
|
top(props?: {}): any;
|
|
47
47
|
header(props?: {}): any;
|
|
48
|
-
leading(props
|
|
48
|
+
leading(props: {
|
|
49
|
+
ui: PageSection['ui'];
|
|
50
|
+
}): any;
|
|
49
51
|
headline(props?: {}): any;
|
|
50
52
|
title(props?: {}): any;
|
|
51
53
|
description(props?: {}): any;
|
|
@@ -82,7 +82,9 @@ export interface PaginationSlots {
|
|
|
82
82
|
prev(props?: {}): any;
|
|
83
83
|
next(props?: {}): any;
|
|
84
84
|
last(props?: {}): any;
|
|
85
|
-
ellipsis(props
|
|
85
|
+
ellipsis(props: {
|
|
86
|
+
ui: Pagination['ui'];
|
|
87
|
+
}): any;
|
|
86
88
|
item(props: {
|
|
87
89
|
page: number;
|
|
88
90
|
pageCount: number;
|
|
@@ -76,7 +76,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.pagination ||
|
|
|
76
76
|
</PaginationListItem>
|
|
77
77
|
|
|
78
78
|
<PaginationEllipsis v-else as-child :class="ui.ellipsis({ class: props.ui?.ellipsis })">
|
|
79
|
-
<slot name="ellipsis">
|
|
79
|
+
<slot name="ellipsis" :ui="ui">
|
|
80
80
|
<UButton as="div" :color="color" :variant="variant" :size="size" :icon="ellipsisIcon || appConfig.ui.icons.ellipsis" />
|
|
81
81
|
</slot>
|
|
82
82
|
</PaginationEllipsis>
|
|
@@ -82,7 +82,9 @@ export interface PaginationSlots {
|
|
|
82
82
|
prev(props?: {}): any;
|
|
83
83
|
next(props?: {}): any;
|
|
84
84
|
last(props?: {}): any;
|
|
85
|
-
ellipsis(props
|
|
85
|
+
ellipsis(props: {
|
|
86
|
+
ui: Pagination['ui'];
|
|
87
|
+
}): any;
|
|
86
88
|
item(props: {
|
|
87
89
|
page: number;
|
|
88
90
|
pageCount: number;
|
|
@@ -5,12 +5,13 @@ import theme from '#build/ui/popover';
|
|
|
5
5
|
import type { EmitsToProps } from '../types/utils';
|
|
6
6
|
import type { ComponentConfig } from '../types/tv';
|
|
7
7
|
type Popover = ComponentConfig<typeof theme, AppConfig, 'popover'>;
|
|
8
|
-
|
|
8
|
+
type PopoverMode = 'click' | 'hover';
|
|
9
|
+
export interface PopoverProps<M extends PopoverMode = PopoverMode> extends PopoverRootProps, Pick<HoverCardRootProps, 'openDelay' | 'closeDelay'> {
|
|
9
10
|
/**
|
|
10
11
|
* The display mode of the popover.
|
|
11
12
|
* @defaultValue 'click'
|
|
12
13
|
*/
|
|
13
|
-
mode?:
|
|
14
|
+
mode?: M;
|
|
14
15
|
/**
|
|
15
16
|
* The content of the popover.
|
|
16
17
|
* @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 }
|
|
@@ -43,30 +44,30 @@ export interface PopoverProps extends PopoverRootProps, Pick<HoverCardRootProps,
|
|
|
43
44
|
export interface PopoverEmits extends PopoverRootEmits {
|
|
44
45
|
'close:prevent': [];
|
|
45
46
|
}
|
|
46
|
-
|
|
47
|
+
type SlotProps<M extends PopoverMode = PopoverMode> = [M] extends ['hover'] ? {} : {
|
|
48
|
+
close: () => void;
|
|
49
|
+
};
|
|
50
|
+
export interface PopoverSlots<M extends PopoverMode = PopoverMode> {
|
|
47
51
|
default(props: {
|
|
48
52
|
open: boolean;
|
|
49
53
|
}): any;
|
|
50
|
-
content(props
|
|
51
|
-
anchor(props
|
|
54
|
+
content(props: SlotProps<M>): any;
|
|
55
|
+
anchor(props: SlotProps<M>): any;
|
|
52
56
|
}
|
|
53
|
-
declare const __VLS_export:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PopoverSlots>;
|
|
57
|
+
declare const __VLS_export: <M extends PopoverMode>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
58
|
+
props: __VLS_PrettifyLocal<PopoverProps<M> & {
|
|
59
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
60
|
+
"onClose:prevent"?: (() => any) | undefined;
|
|
61
|
+
}> & import("vue").PublicProps;
|
|
62
|
+
expose: (exposed: {}) => void;
|
|
63
|
+
attrs: any;
|
|
64
|
+
slots: PopoverSlots<M>;
|
|
65
|
+
emit: ((evt: "update:open", value: boolean) => void) & ((evt: "close:prevent") => void);
|
|
66
|
+
}>) => import("vue").VNode & {
|
|
67
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
68
|
+
};
|
|
66
69
|
declare const _default: typeof __VLS_export;
|
|
67
70
|
export default _default;
|
|
68
|
-
type
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
};
|
|
72
|
-
};
|
|
71
|
+
type __VLS_PrettifyLocal<T> = {
|
|
72
|
+
[K in keyof T as K]: T[K];
|
|
73
|
+
} & {};
|
|
@@ -12,7 +12,7 @@ import { useAppConfig } from "#imports";
|
|
|
12
12
|
import { usePortal } from "../composables/usePortal";
|
|
13
13
|
import { tv } from "../utils/tv";
|
|
14
14
|
const props = defineProps({
|
|
15
|
-
mode: { type:
|
|
15
|
+
mode: { type: null, required: false, default: "click" },
|
|
16
16
|
content: { type: Object, required: false },
|
|
17
17
|
arrow: { type: [Boolean, Object], required: false },
|
|
18
18
|
portal: { type: [Boolean, String], required: false, skipCheck: true, default: true },
|
|
@@ -54,18 +54,18 @@ const Component = computed(() => props.mode === "hover" ? HoverCard : Popover);
|
|
|
54
54
|
</script>
|
|
55
55
|
|
|
56
56
|
<template>
|
|
57
|
-
<Component.Root v-slot="{ open }" v-bind="rootProps">
|
|
57
|
+
<Component.Root v-slot="{ open, close }" v-bind="rootProps">
|
|
58
58
|
<Component.Trigger v-if="!!slots.default || !!reference" as-child :reference="reference" :class="props.class">
|
|
59
59
|
<slot :open="open" />
|
|
60
60
|
</Component.Trigger>
|
|
61
61
|
|
|
62
62
|
<Component.Anchor v-if="'Anchor' in Component && !!slots.anchor" as-child>
|
|
63
|
-
<slot name="anchor" />
|
|
63
|
+
<slot name="anchor" v-bind="close ? { close } : {}" />
|
|
64
64
|
</Component.Anchor>
|
|
65
65
|
|
|
66
66
|
<Component.Portal v-bind="portalProps">
|
|
67
67
|
<Component.Content v-bind="contentProps" :class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })" v-on="contentEvents">
|
|
68
|
-
<slot name="content" />
|
|
68
|
+
<slot name="content" v-bind="close ? { close } : {}" />
|
|
69
69
|
|
|
70
70
|
<Component.Arrow v-if="!!arrow" v-bind="arrowProps" :class="ui.arrow({ class: props.ui?.arrow })" />
|
|
71
71
|
</Component.Content>
|
|
@@ -5,12 +5,13 @@ import theme from '#build/ui/popover';
|
|
|
5
5
|
import type { EmitsToProps } from '../types/utils';
|
|
6
6
|
import type { ComponentConfig } from '../types/tv';
|
|
7
7
|
type Popover = ComponentConfig<typeof theme, AppConfig, 'popover'>;
|
|
8
|
-
|
|
8
|
+
type PopoverMode = 'click' | 'hover';
|
|
9
|
+
export interface PopoverProps<M extends PopoverMode = PopoverMode> extends PopoverRootProps, Pick<HoverCardRootProps, 'openDelay' | 'closeDelay'> {
|
|
9
10
|
/**
|
|
10
11
|
* The display mode of the popover.
|
|
11
12
|
* @defaultValue 'click'
|
|
12
13
|
*/
|
|
13
|
-
mode?:
|
|
14
|
+
mode?: M;
|
|
14
15
|
/**
|
|
15
16
|
* The content of the popover.
|
|
16
17
|
* @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 }
|
|
@@ -43,30 +44,30 @@ export interface PopoverProps extends PopoverRootProps, Pick<HoverCardRootProps,
|
|
|
43
44
|
export interface PopoverEmits extends PopoverRootEmits {
|
|
44
45
|
'close:prevent': [];
|
|
45
46
|
}
|
|
46
|
-
|
|
47
|
+
type SlotProps<M extends PopoverMode = PopoverMode> = [M] extends ['hover'] ? {} : {
|
|
48
|
+
close: () => void;
|
|
49
|
+
};
|
|
50
|
+
export interface PopoverSlots<M extends PopoverMode = PopoverMode> {
|
|
47
51
|
default(props: {
|
|
48
52
|
open: boolean;
|
|
49
53
|
}): any;
|
|
50
|
-
content(props
|
|
51
|
-
anchor(props
|
|
54
|
+
content(props: SlotProps<M>): any;
|
|
55
|
+
anchor(props: SlotProps<M>): any;
|
|
52
56
|
}
|
|
53
|
-
declare const __VLS_export:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PopoverSlots>;
|
|
57
|
+
declare const __VLS_export: <M extends PopoverMode>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
58
|
+
props: __VLS_PrettifyLocal<PopoverProps<M> & {
|
|
59
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
60
|
+
"onClose:prevent"?: (() => any) | undefined;
|
|
61
|
+
}> & import("vue").PublicProps;
|
|
62
|
+
expose: (exposed: {}) => void;
|
|
63
|
+
attrs: any;
|
|
64
|
+
slots: PopoverSlots<M>;
|
|
65
|
+
emit: ((evt: "update:open", value: boolean) => void) & ((evt: "close:prevent") => void);
|
|
66
|
+
}>) => import("vue").VNode & {
|
|
67
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
68
|
+
};
|
|
66
69
|
declare const _default: typeof __VLS_export;
|
|
67
70
|
export default _default;
|
|
68
|
-
type
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
};
|
|
72
|
-
};
|
|
71
|
+
type __VLS_PrettifyLocal<T> = {
|
|
72
|
+
[K in keyof T as K]: T[K];
|
|
73
|
+
} & {};
|
|
@@ -87,14 +87,20 @@ export interface PricingPlanProps {
|
|
|
87
87
|
ui?: PricingPlan['slots'];
|
|
88
88
|
}
|
|
89
89
|
export interface PricingPlanSlots {
|
|
90
|
-
badge(props
|
|
90
|
+
badge(props: {
|
|
91
|
+
ui: PricingPlan['ui'];
|
|
92
|
+
}): any;
|
|
91
93
|
title(props?: {}): any;
|
|
92
94
|
description(props?: {}): any;
|
|
93
95
|
price(props?: {}): any;
|
|
94
96
|
discount(props?: {}): any;
|
|
95
|
-
billing(props
|
|
97
|
+
billing(props: {
|
|
98
|
+
ui: PricingPlan['ui'];
|
|
99
|
+
}): any;
|
|
96
100
|
features(props?: {}): any;
|
|
97
|
-
button(props
|
|
101
|
+
button(props: {
|
|
102
|
+
ui: PricingPlan['ui'];
|
|
103
|
+
}): any;
|
|
98
104
|
header(props?: {}): any;
|
|
99
105
|
body(props?: {}): any;
|
|
100
106
|
footer(props?: {}): any;
|