@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.
Files changed (234) hide show
  1. package/.nuxt/ui/calendar.ts +221 -9
  2. package/.nuxt/ui/chat-message.ts +10 -3
  3. package/.nuxt/ui/command-palette.ts +12 -2
  4. package/.nuxt/ui/context-menu.ts +3 -1
  5. package/.nuxt/ui/dropdown-menu.ts +3 -1
  6. package/.nuxt/ui/empty.ts +83 -0
  7. package/.nuxt/ui/index.ts +1 -0
  8. package/.nuxt/ui/input-menu.ts +12 -2
  9. package/.nuxt/ui/input-number.ts +25 -14
  10. package/.nuxt/ui/kbd.ts +1 -1
  11. package/.nuxt/ui/prose/code-tree.ts +1 -1
  12. package/.nuxt/ui/prose/img.ts +2 -1
  13. package/.nuxt/ui/select-menu.ts +12 -2
  14. package/.nuxt/ui/select.ts +4 -2
  15. package/.nuxt/ui/table.ts +8 -2
  16. package/.nuxt/ui/tree.ts +25 -11
  17. package/cli/templates.mjs +14 -2
  18. package/dist/module.d.mts +15 -0
  19. package/dist/module.json +2 -2
  20. package/dist/module.mjs +5 -2
  21. package/dist/runtime/components/Accordion.d.vue.ts +7 -1
  22. package/dist/runtime/components/Accordion.vue +4 -4
  23. package/dist/runtime/components/Accordion.vue.d.ts +7 -1
  24. package/dist/runtime/components/Alert.d.vue.ts +4 -4
  25. package/dist/runtime/components/Alert.vue +1 -1
  26. package/dist/runtime/components/Alert.vue.d.ts +4 -4
  27. package/dist/runtime/components/AuthForm.d.vue.ts +3 -1
  28. package/dist/runtime/components/AuthForm.vue +1 -1
  29. package/dist/runtime/components/AuthForm.vue.d.ts +3 -1
  30. package/dist/runtime/components/Avatar.d.vue.ts +5 -4
  31. package/dist/runtime/components/Avatar.vue +10 -3
  32. package/dist/runtime/components/Avatar.vue.d.ts +5 -4
  33. package/dist/runtime/components/Badge.d.vue.ts +9 -3
  34. package/dist/runtime/components/Badge.vue +3 -3
  35. package/dist/runtime/components/Badge.vue.d.ts +9 -3
  36. package/dist/runtime/components/Banner.d.vue.ts +4 -2
  37. package/dist/runtime/components/Banner.vue +1 -1
  38. package/dist/runtime/components/Banner.vue.d.ts +4 -2
  39. package/dist/runtime/components/BlogPost.d.vue.ts +9 -3
  40. package/dist/runtime/components/BlogPost.vue +2 -2
  41. package/dist/runtime/components/BlogPost.vue.d.ts +9 -3
  42. package/dist/runtime/components/BlogPosts.d.vue.ts +22 -13
  43. package/dist/runtime/components/BlogPosts.vue +8 -2
  44. package/dist/runtime/components/BlogPosts.vue.d.ts +22 -13
  45. package/dist/runtime/components/Breadcrumb.d.vue.ts +19 -4
  46. package/dist/runtime/components/Breadcrumb.vue +8 -8
  47. package/dist/runtime/components/Breadcrumb.vue.d.ts +19 -4
  48. package/dist/runtime/components/Button.d.vue.ts +9 -3
  49. package/dist/runtime/components/Button.vue +3 -3
  50. package/dist/runtime/components/Button.vue.d.ts +9 -3
  51. package/dist/runtime/components/Calendar.d.vue.ts +4 -0
  52. package/dist/runtime/components/Calendar.vue +3 -1
  53. package/dist/runtime/components/Calendar.vue.d.ts +4 -0
  54. package/dist/runtime/components/ChangelogVersion.d.vue.ts +12 -4
  55. package/dist/runtime/components/ChangelogVersion.vue +3 -3
  56. package/dist/runtime/components/ChangelogVersion.vue.d.ts +12 -4
  57. package/dist/runtime/components/ChangelogVersions.d.vue.ts +8 -36
  58. package/dist/runtime/components/ChangelogVersions.vue +2 -2
  59. package/dist/runtime/components/ChangelogVersions.vue.d.ts +8 -36
  60. package/dist/runtime/components/ChatMessage.d.vue.ts +1 -0
  61. package/dist/runtime/components/ChatMessage.vue +1 -1
  62. package/dist/runtime/components/ChatMessage.vue.d.ts +1 -0
  63. package/dist/runtime/components/ChatMessages.d.vue.ts +14 -15
  64. package/dist/runtime/components/ChatMessages.vue +24 -8
  65. package/dist/runtime/components/ChatMessages.vue.d.ts +14 -15
  66. package/dist/runtime/components/CommandPalette.d.vue.ts +43 -12
  67. package/dist/runtime/components/CommandPalette.vue +134 -68
  68. package/dist/runtime/components/CommandPalette.vue.d.ts +43 -12
  69. package/dist/runtime/components/ContextMenu.d.vue.ts +28 -6
  70. package/dist/runtime/components/ContextMenu.vue +2 -0
  71. package/dist/runtime/components/ContextMenu.vue.d.ts +28 -6
  72. package/dist/runtime/components/ContextMenuContent.d.vue.ts +2 -3
  73. package/dist/runtime/components/ContextMenuContent.vue +21 -11
  74. package/dist/runtime/components/ContextMenuContent.vue.d.ts +2 -3
  75. package/dist/runtime/components/DashboardNavbar.d.vue.ts +9 -3
  76. package/dist/runtime/components/DashboardNavbar.vue +3 -3
  77. package/dist/runtime/components/DashboardNavbar.vue.d.ts +9 -3
  78. package/dist/runtime/components/DashboardSearch.d.vue.ts +3 -1
  79. package/dist/runtime/components/DashboardSearch.vue +2 -2
  80. package/dist/runtime/components/DashboardSearch.vue.d.ts +3 -1
  81. package/dist/runtime/components/DashboardSearchButton.vue +2 -2
  82. package/dist/runtime/components/DashboardSidebar.d.vue.ts +5 -1
  83. package/dist/runtime/components/DashboardSidebar.vue +4 -4
  84. package/dist/runtime/components/DashboardSidebar.vue.d.ts +5 -1
  85. package/dist/runtime/components/Drawer.vue +2 -5
  86. package/dist/runtime/components/DropdownMenu.d.vue.ts +28 -6
  87. package/dist/runtime/components/DropdownMenu.vue +2 -0
  88. package/dist/runtime/components/DropdownMenu.vue.d.ts +28 -6
  89. package/dist/runtime/components/DropdownMenuContent.d.vue.ts +8 -5
  90. package/dist/runtime/components/DropdownMenuContent.vue +21 -11
  91. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +8 -5
  92. package/dist/runtime/components/Empty.d.vue.ts +53 -0
  93. package/dist/runtime/components/Empty.vue +68 -0
  94. package/dist/runtime/components/Empty.vue.d.ts +53 -0
  95. package/dist/runtime/components/Error.d.vue.ts +0 -1
  96. package/dist/runtime/components/Error.vue +1 -1
  97. package/dist/runtime/components/Error.vue.d.ts +0 -1
  98. package/dist/runtime/components/FileUpload.d.vue.ts +6 -1
  99. package/dist/runtime/components/FileUpload.vue +8 -7
  100. package/dist/runtime/components/FileUpload.vue.d.ts +6 -1
  101. package/dist/runtime/components/FooterColumns.d.vue.ts +9 -2
  102. package/dist/runtime/components/FooterColumns.vue +2 -2
  103. package/dist/runtime/components/FooterColumns.vue.d.ts +9 -2
  104. package/dist/runtime/components/Header.d.vue.ts +4 -1
  105. package/dist/runtime/components/Header.vue +3 -3
  106. package/dist/runtime/components/Header.vue.d.ts +4 -1
  107. package/dist/runtime/components/Input.d.vue.ts +9 -3
  108. package/dist/runtime/components/Input.vue +3 -3
  109. package/dist/runtime/components/Input.vue.d.ts +9 -3
  110. package/dist/runtime/components/InputMenu.d.vue.ts +40 -10
  111. package/dist/runtime/components/InputMenu.vue +117 -65
  112. package/dist/runtime/components/InputMenu.vue.d.ts +40 -10
  113. package/dist/runtime/components/InputNumber.d.vue.ts +4 -2
  114. package/dist/runtime/components/InputNumber.vue +7 -5
  115. package/dist/runtime/components/InputNumber.vue.d.ts +4 -2
  116. package/dist/runtime/components/InputTags.d.vue.ts +10 -3
  117. package/dist/runtime/components/InputTags.vue +5 -5
  118. package/dist/runtime/components/InputTags.vue.d.ts +10 -3
  119. package/dist/runtime/components/Main.d.vue.ts +2 -4
  120. package/dist/runtime/components/Main.vue +1 -1
  121. package/dist/runtime/components/Main.vue.d.ts +2 -4
  122. package/dist/runtime/components/Modal.d.vue.ts +1 -4
  123. package/dist/runtime/components/Modal.vue +3 -6
  124. package/dist/runtime/components/Modal.vue.d.ts +1 -4
  125. package/dist/runtime/components/NavigationMenu.d.vue.ts +16 -4
  126. package/dist/runtime/components/NavigationMenu.vue +14 -7
  127. package/dist/runtime/components/NavigationMenu.vue.d.ts +16 -4
  128. package/dist/runtime/components/PageAnchors.d.vue.ts +9 -2
  129. package/dist/runtime/components/PageAnchors.vue +2 -2
  130. package/dist/runtime/components/PageAnchors.vue.d.ts +9 -2
  131. package/dist/runtime/components/PageCard.d.vue.ts +3 -1
  132. package/dist/runtime/components/PageCard.vue +1 -1
  133. package/dist/runtime/components/PageCard.vue.d.ts +3 -1
  134. package/dist/runtime/components/PageFeature.d.vue.ts +3 -1
  135. package/dist/runtime/components/PageFeature.vue +1 -1
  136. package/dist/runtime/components/PageFeature.vue.d.ts +3 -1
  137. package/dist/runtime/components/PageLinks.d.vue.ts +9 -2
  138. package/dist/runtime/components/PageLinks.vue +2 -2
  139. package/dist/runtime/components/PageLinks.vue.d.ts +9 -2
  140. package/dist/runtime/components/PageSection.d.vue.ts +3 -1
  141. package/dist/runtime/components/PageSection.vue +1 -1
  142. package/dist/runtime/components/PageSection.vue.d.ts +3 -1
  143. package/dist/runtime/components/Pagination.d.vue.ts +3 -1
  144. package/dist/runtime/components/Pagination.vue +1 -1
  145. package/dist/runtime/components/Pagination.vue.d.ts +3 -1
  146. package/dist/runtime/components/Popover.d.vue.ts +24 -23
  147. package/dist/runtime/components/Popover.vue +4 -4
  148. package/dist/runtime/components/Popover.vue.d.ts +24 -23
  149. package/dist/runtime/components/PricingPlan.d.vue.ts +9 -3
  150. package/dist/runtime/components/PricingPlan.vue +3 -3
  151. package/dist/runtime/components/PricingPlan.vue.d.ts +9 -3
  152. package/dist/runtime/components/PricingPlans.d.vue.ts +20 -13
  153. package/dist/runtime/components/PricingPlans.vue +7 -1
  154. package/dist/runtime/components/PricingPlans.vue.d.ts +20 -13
  155. package/dist/runtime/components/Select.d.vue.ts +20 -9
  156. package/dist/runtime/components/Select.vue +18 -9
  157. package/dist/runtime/components/Select.vue.d.ts +20 -9
  158. package/dist/runtime/components/SelectMenu.d.vue.ts +39 -11
  159. package/dist/runtime/components/SelectMenu.vue +114 -61
  160. package/dist/runtime/components/SelectMenu.vue.d.ts +39 -11
  161. package/dist/runtime/components/Separator.d.vue.ts +3 -1
  162. package/dist/runtime/components/Separator.vue +1 -1
  163. package/dist/runtime/components/Separator.vue.d.ts +3 -1
  164. package/dist/runtime/components/Slideover.d.vue.ts +1 -4
  165. package/dist/runtime/components/Slideover.vue +3 -6
  166. package/dist/runtime/components/Slideover.vue.d.ts +1 -4
  167. package/dist/runtime/components/Stepper.d.vue.ts +4 -1
  168. package/dist/runtime/components/Stepper.vue +1 -1
  169. package/dist/runtime/components/Stepper.vue.d.ts +4 -1
  170. package/dist/runtime/components/Table.d.vue.ts +21 -1
  171. package/dist/runtime/components/Table.vue +126 -60
  172. package/dist/runtime/components/Table.vue.d.ts +21 -1
  173. package/dist/runtime/components/Tabs.d.vue.ts +8 -3
  174. package/dist/runtime/components/Tabs.vue +3 -3
  175. package/dist/runtime/components/Tabs.vue.d.ts +8 -3
  176. package/dist/runtime/components/Textarea.d.vue.ts +9 -3
  177. package/dist/runtime/components/Textarea.vue +3 -3
  178. package/dist/runtime/components/Textarea.vue.d.ts +9 -3
  179. package/dist/runtime/components/Toast.d.vue.ts +4 -4
  180. package/dist/runtime/components/Toast.vue +1 -1
  181. package/dist/runtime/components/Toast.vue.d.ts +4 -4
  182. package/dist/runtime/components/Toaster.d.vue.ts +6 -0
  183. package/dist/runtime/components/Toaster.vue +6 -3
  184. package/dist/runtime/components/Toaster.vue.d.ts +6 -0
  185. package/dist/runtime/components/Tooltip.d.vue.ts +3 -1
  186. package/dist/runtime/components/Tooltip.vue +1 -1
  187. package/dist/runtime/components/Tooltip.vue.d.ts +3 -1
  188. package/dist/runtime/components/Tree.d.vue.ts +43 -5
  189. package/dist/runtime/components/Tree.vue +169 -81
  190. package/dist/runtime/components/Tree.vue.d.ts +43 -5
  191. package/dist/runtime/components/User.d.vue.ts +3 -1
  192. package/dist/runtime/components/User.vue +1 -1
  193. package/dist/runtime/components/User.vue.d.ts +3 -1
  194. package/dist/runtime/components/content/ContentNavigation.d.vue.ts +1 -0
  195. package/dist/runtime/components/content/ContentNavigation.vue +5 -5
  196. package/dist/runtime/components/content/ContentNavigation.vue.d.ts +1 -0
  197. package/dist/runtime/components/content/ContentSearch.d.vue.ts +3 -1
  198. package/dist/runtime/components/content/ContentSearch.vue +4 -2
  199. package/dist/runtime/components/content/ContentSearch.vue.d.ts +3 -1
  200. package/dist/runtime/components/content/ContentSearchButton.vue +2 -2
  201. package/dist/runtime/components/content/ContentSurround.d.vue.ts +1 -0
  202. package/dist/runtime/components/content/ContentSurround.vue +4 -4
  203. package/dist/runtime/components/content/ContentSurround.vue.d.ts +1 -0
  204. package/dist/runtime/components/content/ContentToc.d.vue.ts +2 -0
  205. package/dist/runtime/components/content/ContentToc.vue +2 -2
  206. package/dist/runtime/components/content/ContentToc.vue.d.ts +2 -0
  207. package/dist/runtime/components/prose/Accordion.d.vue.ts +6 -0
  208. package/dist/runtime/components/prose/Accordion.vue +3 -2
  209. package/dist/runtime/components/prose/Accordion.vue.d.ts +6 -0
  210. package/dist/runtime/components/prose/CodeTree.vue +40 -36
  211. package/dist/runtime/components/prose/Collapsible.d.vue.ts +2 -2
  212. package/dist/runtime/components/prose/Collapsible.vue +2 -2
  213. package/dist/runtime/components/prose/Collapsible.vue.d.ts +2 -2
  214. package/dist/runtime/components/prose/Field.d.vue.ts +1 -1
  215. package/dist/runtime/components/prose/Field.vue.d.ts +1 -1
  216. package/dist/runtime/components/prose/Img.vue +14 -3
  217. package/dist/runtime/components/prose/Tabs.d.vue.ts +6 -0
  218. package/dist/runtime/components/prose/Tabs.vue +3 -2
  219. package/dist/runtime/components/prose/Tabs.vue.d.ts +6 -0
  220. package/dist/runtime/composables/useKbd.js +1 -1
  221. package/dist/runtime/composables/useToast.d.ts +3 -1
  222. package/dist/runtime/composables/useToast.js +4 -3
  223. package/dist/runtime/inertia/components/Link.vue +12 -7
  224. package/dist/runtime/locale/hr.d.ts +3 -0
  225. package/dist/runtime/locale/hr.js +129 -0
  226. package/dist/runtime/locale/index.d.ts +1 -0
  227. package/dist/runtime/locale/index.js +1 -0
  228. package/dist/runtime/types/index.d.ts +2 -1
  229. package/dist/runtime/types/index.js +2 -1
  230. package/dist/runtime/types/tv.d.ts +6 -0
  231. package/dist/shared/{ui.D-FDXAUi.mjs → ui.Cmctwxv6.mjs} +381 -48
  232. package/dist/unplugin.mjs +2 -1
  233. package/dist/vite.mjs +3 -2
  234. 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
- close: () => void;
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?(e: Event): void;
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': SlotProps<T>;
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>, 'leading' | 'label' | 'trailing' | 'content', {
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 :name="item.slot ? `${item.slot}-content` : 'item-content'" :item="item" :active="active || item.active" :index="index">
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?(e: Event): void;
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': SlotProps<T>;
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>, 'leading' | 'label' | 'trailing' | 'content', {
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': SlotProps<T>;
33
- 'link-trailing': SlotProps<T>;
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': SlotProps<T>;
33
- 'link-trailing': SlotProps<T>;
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?: {}): any;
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?: {}): any;
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?: {}): any;
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?: {}): any;
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': SlotProps<T>;
35
- 'link-trailing': SlotProps<T>;
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': SlotProps<T>;
35
- 'link-trailing': SlotProps<T>;
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?: {}): any;
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?: {}): any;
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?: {}): any;
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?: {}): any;
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
- export interface PopoverProps extends PopoverRootProps, Pick<HoverCardRootProps, 'openDelay' | 'closeDelay'> {
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?: 'click' | 'hover';
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
- export interface PopoverSlots {
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?: {}): any;
51
- anchor(props?: {}): any;
54
+ content(props: SlotProps<M>): any;
55
+ anchor(props: SlotProps<M>): any;
52
56
  }
53
- declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<PopoverProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
54
- "update:open": (value: boolean) => any;
55
- "close:prevent": () => any;
56
- }, string, import("vue").PublicProps, Readonly<PopoverProps> & Readonly<{
57
- "onUpdate:open"?: ((value: boolean) => any) | undefined;
58
- "onClose:prevent"?: (() => any) | undefined;
59
- }>, {
60
- mode: "click" | "hover";
61
- portal: boolean | string | HTMLElement;
62
- dismissible: boolean;
63
- openDelay: number;
64
- closeDelay: number;
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 __VLS_WithSlots<T, S> = T & {
69
- new (): {
70
- $slots: S;
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: String, required: false, default: "click" },
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
- export interface PopoverProps extends PopoverRootProps, Pick<HoverCardRootProps, 'openDelay' | 'closeDelay'> {
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?: 'click' | 'hover';
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
- export interface PopoverSlots {
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?: {}): any;
51
- anchor(props?: {}): any;
54
+ content(props: SlotProps<M>): any;
55
+ anchor(props: SlotProps<M>): any;
52
56
  }
53
- declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<PopoverProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
54
- "update:open": (value: boolean) => any;
55
- "close:prevent": () => any;
56
- }, string, import("vue").PublicProps, Readonly<PopoverProps> & Readonly<{
57
- "onUpdate:open"?: ((value: boolean) => any) | undefined;
58
- "onClose:prevent"?: (() => any) | undefined;
59
- }>, {
60
- mode: "click" | "hover";
61
- portal: boolean | string | HTMLElement;
62
- dismissible: boolean;
63
- openDelay: number;
64
- closeDelay: number;
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 __VLS_WithSlots<T, S> = T & {
69
- new (): {
70
- $slots: S;
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?: {}): any;
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?: {}): any;
97
+ billing(props: {
98
+ ui: PricingPlan['ui'];
99
+ }): any;
96
100
  features(props?: {}): any;
97
- button(props?: {}): any;
101
+ button(props: {
102
+ ui: PricingPlan['ui'];
103
+ }): any;
98
104
  header(props?: {}): any;
99
105
  body(props?: {}): any;
100
106
  footer(props?: {}): any;