@nuxt/ui 3.1.0 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/.nuxt/ui/accordion.ts +2 -23
  2. package/.nuxt/ui/alert.ts +2 -28
  3. package/.nuxt/ui/avatar-group.ts +2 -23
  4. package/.nuxt/ui/avatar.ts +2 -23
  5. package/.nuxt/ui/badge.ts +32 -30
  6. package/.nuxt/ui/breadcrumb.ts +2 -23
  7. package/.nuxt/ui/button-group.ts +2 -36
  8. package/.nuxt/ui/button.ts +4 -30
  9. package/.nuxt/ui/calendar.ts +4 -25
  10. package/.nuxt/ui/card.ts +2 -23
  11. package/.nuxt/ui/carousel.ts +2 -28
  12. package/.nuxt/ui/checkbox-group.ts +146 -24
  13. package/.nuxt/ui/checkbox.ts +2 -23
  14. package/.nuxt/ui/chip.ts +2 -23
  15. package/.nuxt/ui/collapsible.ts +2 -23
  16. package/.nuxt/ui/color-picker.ts +4 -25
  17. package/.nuxt/ui/command-palette.ts +2 -23
  18. package/.nuxt/ui/container.ts +2 -23
  19. package/.nuxt/ui/context-menu.ts +2 -23
  20. package/.nuxt/ui/drawer.ts +2 -23
  21. package/.nuxt/ui/dropdown-menu.ts +2 -23
  22. package/.nuxt/ui/form-field.ts +2 -23
  23. package/.nuxt/ui/form.ts +2 -23
  24. package/.nuxt/ui/input-menu.ts +4 -34
  25. package/.nuxt/ui/input-number.ts +12 -23
  26. package/.nuxt/ui/input.ts +4 -34
  27. package/.nuxt/ui/kbd.ts +2 -23
  28. package/.nuxt/ui/link.ts +14 -28
  29. package/.nuxt/ui/modal.ts +2 -23
  30. package/.nuxt/ui/navigation-menu.ts +3 -24
  31. package/.nuxt/ui/pagination.ts +2 -23
  32. package/.nuxt/ui/pin-input.ts +2 -23
  33. package/.nuxt/ui/popover.ts +2 -23
  34. package/.nuxt/ui/progress.ts +2 -23
  35. package/.nuxt/ui/radio-group.ts +2 -23
  36. package/.nuxt/ui/select-menu.ts +4 -34
  37. package/.nuxt/ui/select.ts +4 -34
  38. package/.nuxt/ui/separator.ts +2 -23
  39. package/.nuxt/ui/skeleton.ts +2 -23
  40. package/.nuxt/ui/slideover.ts +2 -23
  41. package/.nuxt/ui/slider.ts +2 -23
  42. package/.nuxt/ui/stepper.ts +2 -23
  43. package/.nuxt/ui/switch.ts +2 -23
  44. package/.nuxt/ui/table.ts +2 -23
  45. package/.nuxt/ui/tabs.ts +6 -26
  46. package/.nuxt/ui/textarea.ts +4 -34
  47. package/.nuxt/ui/toast.ts +2 -28
  48. package/.nuxt/ui/toaster.ts +2 -23
  49. package/.nuxt/ui/tooltip.ts +2 -23
  50. package/.nuxt/ui/tree.ts +2 -23
  51. package/.nuxt/ui.css +15 -8
  52. package/README.md +4 -0
  53. package/cli/templates.mjs +2 -2
  54. package/dist/module.json +1 -1
  55. package/dist/module.mjs +15 -5
  56. package/dist/runtime/components/Accordion.vue +9 -9
  57. package/dist/runtime/components/Accordion.vue.d.ts +6 -20
  58. package/dist/runtime/components/Alert.vue +1 -1
  59. package/dist/runtime/components/Alert.vue.d.ts +7 -22
  60. package/dist/runtime/components/App.vue.d.ts +2 -2
  61. package/dist/runtime/components/Avatar.vue +2 -2
  62. package/dist/runtime/components/Avatar.vue.d.ts +4 -25
  63. package/dist/runtime/components/AvatarGroup.vue +1 -1
  64. package/dist/runtime/components/AvatarGroup.vue.d.ts +2 -11
  65. package/dist/runtime/components/Badge.vue +5 -3
  66. package/dist/runtime/components/Badge.vue.d.ts +5 -24
  67. package/dist/runtime/components/Breadcrumb.vue +8 -8
  68. package/dist/runtime/components/Breadcrumb.vue.d.ts +4 -20
  69. package/dist/runtime/components/Button.vue +2 -3
  70. package/dist/runtime/components/Button.vue.d.ts +4 -29
  71. package/dist/runtime/components/ButtonGroup.vue.d.ts +3 -24
  72. package/dist/runtime/components/Calendar.vue +2 -1
  73. package/dist/runtime/components/Calendar.vue.d.ts +6 -2
  74. package/dist/runtime/components/Card.vue +1 -1
  75. package/dist/runtime/components/Card.vue.d.ts +2 -11
  76. package/dist/runtime/components/Carousel.vue +5 -2
  77. package/dist/runtime/components/Carousel.vue.d.ts +10 -3
  78. package/dist/runtime/components/Checkbox.vue +2 -2
  79. package/dist/runtime/components/Checkbox.vue.d.ts +10 -13
  80. package/dist/runtime/components/CheckboxGroup.vue +8 -5
  81. package/dist/runtime/components/CheckboxGroup.vue.d.ts +12 -3
  82. package/dist/runtime/components/Chip.vue +1 -1
  83. package/dist/runtime/components/Chip.vue.d.ts +10 -24
  84. package/dist/runtime/components/Collapsible.vue +1 -1
  85. package/dist/runtime/components/Collapsible.vue.d.ts +7 -22
  86. package/dist/runtime/components/ColorPicker.vue +1 -1
  87. package/dist/runtime/components/ColorPicker.vue.d.ts +9 -24
  88. package/dist/runtime/components/CommandPalette.vue +17 -17
  89. package/dist/runtime/components/CommandPalette.vue.d.ts +17 -27
  90. package/dist/runtime/components/Container.vue.d.ts +2 -11
  91. package/dist/runtime/components/ContextMenu.vue.d.ts +6 -24
  92. package/dist/runtime/components/ContextMenuContent.vue +15 -15
  93. package/dist/runtime/components/ContextMenuContent.vue.d.ts +17 -57
  94. package/dist/runtime/components/Drawer.vue.d.ts +17 -27
  95. package/dist/runtime/components/DropdownMenu.vue.d.ts +6 -28
  96. package/dist/runtime/components/DropdownMenuContent.vue +15 -15
  97. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +19 -6
  98. package/dist/runtime/components/Form.vue.d.ts +5 -2
  99. package/dist/runtime/components/FormField.vue +5 -5
  100. package/dist/runtime/components/FormField.vue.d.ts +2 -11
  101. package/dist/runtime/components/Icon.vue.d.ts +1 -10
  102. package/dist/runtime/components/Input.vue +2 -2
  103. package/dist/runtime/components/Input.vue.d.ts +20 -41
  104. package/dist/runtime/components/InputMenu.vue +17 -17
  105. package/dist/runtime/components/InputMenu.vue.d.ts +227 -5
  106. package/dist/runtime/components/InputNumber.vue +13 -7
  107. package/dist/runtime/components/InputNumber.vue.d.ts +90 -23
  108. package/dist/runtime/components/Kbd.vue.d.ts +3 -24
  109. package/dist/runtime/components/Link.vue +5 -14
  110. package/dist/runtime/components/Link.vue.d.ts +3 -34
  111. package/dist/runtime/components/LinkBase.vue.d.ts +4 -27
  112. package/dist/runtime/components/Modal.vue.d.ts +12 -28
  113. package/dist/runtime/components/NavigationMenu.vue +35 -28
  114. package/dist/runtime/components/NavigationMenu.vue.d.ts +24 -26
  115. package/dist/runtime/components/Pagination.vue +1 -1
  116. package/dist/runtime/components/Pagination.vue.d.ts +9 -33
  117. package/dist/runtime/components/PinInput.vue +1 -1
  118. package/dist/runtime/components/PinInput.vue.d.ts +13 -24
  119. package/dist/runtime/components/Popover.vue.d.ts +9 -26
  120. package/dist/runtime/components/Progress.vue +1 -1
  121. package/dist/runtime/components/Progress.vue.d.ts +10 -41
  122. package/dist/runtime/components/RadioGroup.vue +8 -8
  123. package/dist/runtime/components/RadioGroup.vue.d.ts +8 -3
  124. package/dist/runtime/components/Select.vue +12 -12
  125. package/dist/runtime/components/Select.vue.d.ts +11 -3
  126. package/dist/runtime/components/SelectMenu.vue +13 -13
  127. package/dist/runtime/components/SelectMenu.vue.d.ts +19 -5
  128. package/dist/runtime/components/Separator.vue +1 -1
  129. package/dist/runtime/components/Separator.vue.d.ts +3 -24
  130. package/dist/runtime/components/Skeleton.vue.d.ts +3 -12
  131. package/dist/runtime/components/Slideover.vue.d.ts +12 -29
  132. package/dist/runtime/components/Slider.vue +16 -4
  133. package/dist/runtime/components/Slider.vue.d.ts +23 -36
  134. package/dist/runtime/components/Stepper.vue +10 -10
  135. package/dist/runtime/components/Stepper.vue.d.ts +10 -14
  136. package/dist/runtime/components/Switch.vue +1 -1
  137. package/dist/runtime/components/Switch.vue.d.ts +10 -13
  138. package/dist/runtime/components/Table.vue +2 -2
  139. package/dist/runtime/components/Table.vue.d.ts +17 -17
  140. package/dist/runtime/components/Tabs.vue +6 -6
  141. package/dist/runtime/components/Tabs.vue.d.ts +6 -20
  142. package/dist/runtime/components/Textarea.vue +3 -3
  143. package/dist/runtime/components/Textarea.vue.d.ts +20 -44
  144. package/dist/runtime/components/Toast.vue +3 -2
  145. package/dist/runtime/components/Toast.vue.d.ts +92 -24
  146. package/dist/runtime/components/Toaster.vue +4 -4
  147. package/dist/runtime/components/Toaster.vue.d.ts +9 -28
  148. package/dist/runtime/components/Tooltip.vue.d.ts +7 -22
  149. package/dist/runtime/components/Tree.vue +10 -10
  150. package/dist/runtime/components/Tree.vue.d.ts +7 -22
  151. package/dist/runtime/composables/defineShortcuts.js +6 -0
  152. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  153. package/dist/runtime/composables/useButtonGroup.d.ts +1 -1
  154. package/dist/runtime/composables/useFormField.d.ts +2 -2
  155. package/dist/runtime/composables/useFormField.js +2 -1
  156. package/dist/runtime/composables/useKbd.d.ts +1 -0
  157. package/dist/runtime/composables/useKbd.js +4 -3
  158. package/dist/runtime/composables/useOverlay.d.ts +9 -10
  159. package/dist/runtime/composables/useOverlay.js +11 -6
  160. package/dist/runtime/inertia/components/Link.vue +46 -60
  161. package/dist/runtime/inertia/components/Link.vue.d.ts +4 -33
  162. package/dist/runtime/inertia/components/LinkBase.vue +68 -0
  163. package/dist/runtime/inertia/components/LinkBase.vue.d.ts +25 -0
  164. package/dist/runtime/inertia/stubs.d.ts +1 -1
  165. package/dist/runtime/inertia/stubs.js +1 -1
  166. package/dist/runtime/locale/index.d.ts +1 -0
  167. package/dist/runtime/locale/index.js +1 -0
  168. package/dist/runtime/locale/sl.d.ts +3 -0
  169. package/dist/runtime/locale/sl.js +54 -0
  170. package/dist/runtime/types/tv.d.ts +53 -0
  171. package/dist/runtime/types/tv.js +0 -0
  172. package/dist/runtime/types/utils.d.ts +2 -52
  173. package/dist/runtime/types/utils.js +1 -0
  174. package/dist/runtime/utils/link.d.ts +1 -0
  175. package/dist/runtime/utils/link.js +12 -0
  176. package/dist/runtime/vue/components/Icon.vue.d.ts +1 -10
  177. package/dist/runtime/vue/components/Link.vue +27 -40
  178. package/dist/runtime/vue/components/Link.vue.d.ts +3 -34
  179. package/dist/runtime/vue/composables/useAppConfig.js +3 -1
  180. package/dist/runtime/vue/stubs.d.ts +1 -1
  181. package/dist/runtime/vue/stubs.js +1 -1
  182. package/dist/shared/{ui.D7lOOabO.mjs → ui.BvUP-pSb.mjs} +120 -27
  183. package/dist/unplugin.d.mts +2 -2
  184. package/dist/unplugin.mjs +1 -1
  185. package/dist/vite.d.mts +1 -1
  186. package/dist/vite.mjs +2 -2
  187. package/package.json +28 -27
@@ -34,34 +34,34 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.accordion ||
34
34
  </script>
35
35
 
36
36
  <template>
37
- <AccordionRoot v-bind="rootProps" :class="ui.root({ class: [props.class, props.ui?.root] })">
37
+ <AccordionRoot v-bind="rootProps" :class="ui.root({ class: [props.ui?.root, props.class] })">
38
38
  <AccordionItem
39
39
  v-for="(item, index) in props.items"
40
40
  v-slot="{ open }"
41
41
  :key="index"
42
42
  :value="item.value || String(index)"
43
43
  :disabled="item.disabled"
44
- :class="ui.item({ class: props.ui?.item })"
44
+ :class="ui.item({ class: [props.ui?.item, item.ui?.item, item.class] })"
45
45
  >
46
- <AccordionHeader as="div" :class="ui.header({ class: props.ui?.header })">
47
- <AccordionTrigger :class="ui.trigger({ class: props.ui?.trigger, disabled: item.disabled })">
46
+ <AccordionHeader as="div" :class="ui.header({ class: [props.ui?.header, item.ui?.header] })">
47
+ <AccordionTrigger :class="ui.trigger({ class: [props.ui?.trigger, item.ui?.trigger], disabled: item.disabled })">
48
48
  <slot name="leading" :item="item" :index="index" :open="open">
49
- <UIcon v-if="item.icon" :name="item.icon" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
49
+ <UIcon v-if="item.icon" :name="item.icon" :class="ui.leadingIcon({ class: [props.ui?.leadingIcon, item?.ui?.leadingIcon] })" />
50
50
  </slot>
51
51
 
52
- <span v-if="get(item, props.labelKey) || !!slots.default" :class="ui.label({ class: props.ui?.label })">
52
+ <span v-if="get(item, props.labelKey) || !!slots.default" :class="ui.label({ class: [props.ui?.label, item.ui?.label] })">
53
53
  <slot :item="item" :index="index" :open="open">{{ get(item, props.labelKey) }}</slot>
54
54
  </span>
55
55
 
56
56
  <slot name="trailing" :item="item" :index="index" :open="open">
57
- <UIcon :name="item.trailingIcon || trailingIcon || appConfig.ui.icons.chevronDown" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
57
+ <UIcon :name="item.trailingIcon || trailingIcon || appConfig.ui.icons.chevronDown" :class="ui.trailingIcon({ class: [props.ui?.trailingIcon, item.ui?.trailingIcon] })" />
58
58
  </slot>
59
59
  </AccordionTrigger>
60
60
  </AccordionHeader>
61
61
 
62
- <AccordionContent v-if="item.content || !!slots.content || item.slot && !!slots[item.slot] || !!slots.body || item.slot && !!slots[`${item.slot}-body`]" :class="ui.content({ class: props.ui?.content })">
62
+ <AccordionContent v-if="item.content || !!slots.content || item.slot && !!slots[item.slot] || !!slots.body || item.slot && !!slots[`${item.slot}-body`]" :class="ui.content({ class: [props.ui?.content, item.ui?.content] })">
63
63
  <slot :name="item.slot || 'content'" :item="item" :index="index" :open="open">
64
- <div :class="ui.body({ class: props.ui?.body })">
64
+ <div :class="ui.body({ class: [props.ui?.body, item.ui?.body] })">
65
65
  <slot :name="item.slot ? `${item.slot}-body` : 'body'" :item="item" :index="index" :open="open">
66
66
  {{ item.content }}
67
67
  </slot>
@@ -18,6 +18,8 @@ export interface AccordionItem {
18
18
  /** A unique value for the accordion item. Defaults to the index. */
19
19
  value?: string;
20
20
  disabled?: boolean;
21
+ class?: any;
22
+ ui?: Pick<Accordion['slots'], 'item' | 'header' | 'trigger' | 'leadingIcon' | 'label' | 'trailingIcon' | 'content' | 'body'>;
21
23
  [key: string]: any;
22
24
  }
23
25
  export interface AccordionProps<T extends AccordionItem = AccordionItem> extends Pick<AccordionRootProps, 'collapsible' | 'defaultValue' | 'modelValue' | 'type' | 'disabled' | 'unmountOnHide'> {
@@ -59,28 +61,12 @@ export type AccordionSlots<T extends AccordionItem = AccordionItem> = {
59
61
  open: boolean;
60
62
  }>;
61
63
  declare const _default: <T extends AccordionItem>(__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<{
62
- props: __VLS_PrettifyLocal<any & AccordionProps<T> & Partial<{}>> & (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps);
64
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
65
+ readonly "onUpdate:modelValue"?: ((value: string | string[] | undefined) => any) | undefined;
66
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & AccordionProps<T> & Partial<{}>> & import("vue").PublicProps;
63
67
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
64
68
  attrs: any;
65
- slots: Readonly<{
66
- leading: SlotProps<T>;
67
- default: SlotProps<T>;
68
- trailing: SlotProps<T>;
69
- content: SlotProps<T>;
70
- body: SlotProps<T>;
71
- } & DynamicSlots<T, "body", {
72
- index: number;
73
- open: boolean;
74
- }>> & {
75
- leading: SlotProps<T>;
76
- default: SlotProps<T>;
77
- trailing: SlotProps<T>;
78
- content: SlotProps<T>;
79
- body: SlotProps<T>;
80
- } & DynamicSlots<T, "body", {
81
- index: number;
82
- open: boolean;
83
- }>;
69
+ slots: AccordionSlots<T>;
84
70
  emit: (evt: "update:modelValue", value: string | string[] | undefined) => void;
85
71
  }>) => import("vue").VNode & {
86
72
  __ctx?: Awaited<typeof __VLS_setup>;
@@ -39,7 +39,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.alert || {} }
39
39
  </script>
40
40
 
41
41
  <template>
42
- <Primitive :as="as" :data-orientation="orientation" :class="ui.root({ class: [props.class, props.ui?.root] })">
42
+ <Primitive :as="as" :data-orientation="orientation" :class="ui.root({ class: [props.ui?.root, props.class] })">
43
43
  <slot name="leading">
44
44
  <UAvatar v-if="avatar" :size="props.ui?.avatarSize || ui.avatarSize()" v-bind="avatar" :class="ui.avatar({ class: props.ui?.avatar })" />
45
45
  <UIcon v-else-if="icon" :name="icon" :class="ui.icon({ class: props.ui?.icon })" />
@@ -66,31 +66,16 @@ export interface AlertSlots {
66
66
  };
67
67
  }): any;
68
68
  }
69
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<AlertProps>, {
70
- orientation: string;
71
- }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
69
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AlertProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
70
+ "update:open": (value: boolean) => any;
71
+ }, string, import("vue").PublicProps, Readonly<AlertProps> & Readonly<{
72
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
73
+ }>, {
72
74
  orientation: Alert["variants"]["orientation"];
73
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<AlertSlots> & AlertSlots>;
75
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, AlertSlots>;
74
76
  export default _default;
75
- type __VLS_WithDefaults<P, D> = {
76
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
77
- default: D[K];
78
- }> : P[K];
79
- };
80
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
81
- type __VLS_TypePropsToOption<T> = {
82
- [K in keyof T]-?: {} extends Pick<T, K> ? {
83
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
84
- } : {
85
- type: import('vue').PropType<T[K]>;
86
- required: true;
87
- };
88
- };
89
- type __VLS_WithTemplateSlots<T, S> = T & {
77
+ type __VLS_WithSlots<T, S> = T & {
90
78
  new (): {
91
79
  $slots: S;
92
80
  };
93
81
  };
94
- type __VLS_PrettifyLocal<T> = {
95
- [K in keyof T]: T[K];
96
- } & {};
@@ -10,10 +10,10 @@ export interface AppSlots {
10
10
  default(props?: {}): any;
11
11
  }
12
12
  declare const _default: <T extends Messages>(__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<{
13
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & AppProps<T> & Partial<{}>> & (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps);
13
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & AppProps<T> & Partial<{}>> & import("vue").PublicProps;
14
14
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
15
15
  attrs: any;
16
- slots: Readonly<AppSlots> & AppSlots;
16
+ slots: AppSlots;
17
17
  emit: {};
18
18
  }>) => import("vue").VNode & {
19
19
  __ctx?: Awaited<typeof __VLS_setup>;
@@ -51,7 +51,7 @@ function onError() {
51
51
  </script>
52
52
 
53
53
  <template>
54
- <Primitive :as="as" :class="ui.root({ class: [props.class, props.ui?.root] })" :style="props.style">
54
+ <Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })" :style="props.style">
55
55
  <component
56
56
  :is="ImageComponent"
57
57
  v-if="src && !error"
@@ -68,7 +68,7 @@ function onError() {
68
68
  <Slot v-else v-bind="$attrs">
69
69
  <slot>
70
70
  <UIcon v-if="icon" :name="icon" :class="ui.icon({ class: props.ui?.icon })" />
71
- <span v-else :class="ui.fallback({ class: props.ui?.fallback })">{{ fallback || '\xA0' }}</span>
71
+ <span v-else :class="ui.fallback({ class: props.ui?.fallback })">{{ fallback || "\xA0" }}</span>
72
72
  </slot>
73
73
  </Slot>
74
74
  </Primitive>
@@ -26,35 +26,14 @@ export interface AvatarProps {
26
26
  export interface AvatarSlots {
27
27
  default(props?: {}): any;
28
28
  }
29
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<AvatarProps>, {
30
- as: string;
31
- }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<AvatarProps>, {
32
- as: string;
33
- }>>> & Readonly<{}>, {
29
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarProps> & Readonly<{}>, {
34
30
  as: any;
35
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
36
- default?(_: {}): any;
31
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
32
+ default?: (props: {}) => any;
37
33
  }>;
38
34
  export default _default;
39
- type __VLS_WithDefaults<P, D> = {
40
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
41
- default: D[K];
42
- }> : P[K];
43
- };
44
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
45
- type __VLS_TypePropsToOption<T> = {
46
- [K in keyof T]-?: {} extends Pick<T, K> ? {
47
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
48
- } : {
49
- type: import('vue').PropType<T[K]>;
50
- required: true;
51
- };
52
- };
53
- type __VLS_WithTemplateSlots<T, S> = T & {
35
+ type __VLS_WithSlots<T, S> = T & {
54
36
  new (): {
55
37
  $slots: S;
56
38
  };
57
39
  };
58
- type __VLS_PrettifyLocal<T> = {
59
- [K in keyof T]: T[K];
60
- } & {};
@@ -58,7 +58,7 @@ provide(avatarGroupInjectionKey, computed(() => ({
58
58
  </script>
59
59
 
60
60
  <template>
61
- <Primitive :as="as" :class="ui.root({ class: [props.class, props.ui?.root] })">
61
+ <Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
62
62
  <UAvatar v-if="hiddenCount > 0" :text="`+${hiddenCount}`" :class="ui.base({ class: props.ui?.base })" />
63
63
  <component :is="avatar" v-for="(avatar, count) in visibleAvatars" :key="count" :class="ui.base({ class: props.ui?.base })" />
64
64
  </Primitive>
@@ -22,18 +22,9 @@ export interface AvatarGroupProps {
22
22
  export interface AvatarGroupSlots {
23
23
  default(props?: {}): any;
24
24
  }
25
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<AvatarGroupProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<AvatarGroupProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<AvatarGroupSlots> & AvatarGroupSlots>;
25
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, AvatarGroupSlots>;
26
26
  export default _default;
27
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
28
- type __VLS_TypePropsToOption<T> = {
29
- [K in keyof T]-?: {} extends Pick<T, K> ? {
30
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
31
- } : {
32
- type: import('vue').PropType<T[K]>;
33
- required: true;
34
- };
35
- };
36
- type __VLS_WithTemplateSlots<T, S> = T & {
27
+ type __VLS_WithSlots<T, S> = T & {
37
28
  new (): {
38
29
  $slots: S;
39
30
  };
@@ -17,6 +17,7 @@ const props = defineProps({
17
17
  color: { type: null, required: false },
18
18
  variant: { type: null, required: false },
19
19
  size: { type: null, required: false },
20
+ square: { type: Boolean, required: false },
20
21
  class: { type: null, required: false },
21
22
  ui: { type: null, required: false },
22
23
  icon: { type: String, required: false },
@@ -26,7 +27,7 @@ const props = defineProps({
26
27
  trailing: { type: Boolean, required: false },
27
28
  trailingIcon: { type: String, required: false }
28
29
  });
29
- defineSlots();
30
+ const slots = defineSlots();
30
31
  const appConfig = useAppConfig();
31
32
  const { orientation, size: buttonGroupSize } = useButtonGroup(props);
32
33
  const { isLeading, isTrailing, leadingIconName, trailingIconName } = useComponentIcons(props);
@@ -34,19 +35,20 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.badge || {} }
34
35
  color: props.color,
35
36
  variant: props.variant,
36
37
  size: buttonGroupSize.value || props.size,
38
+ square: props.square || !slots.default && !props.label,
37
39
  buttonGroup: orientation.value
38
40
  }));
39
41
  </script>
40
42
 
41
43
  <template>
42
- <Primitive :as="as" :class="ui.base({ class: [props.class, props.ui?.base] })">
44
+ <Primitive :as="as" :class="ui.base({ class: [props.ui?.base, props.class] })">
43
45
  <slot name="leading">
44
46
  <UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
45
47
  <UAvatar v-else-if="!!avatar" :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="avatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })" />
46
48
  </slot>
47
49
 
48
50
  <slot>
49
- <span v-if="label" :class="ui.label({ class: props.ui?.label })">
51
+ <span v-if="label !== void 0 && label !== null" :class="ui.label({ class: props.ui?.label })">
50
52
  {{ label }}
51
53
  </span>
52
54
  </slot>
@@ -22,6 +22,8 @@ export interface BadgeProps extends Omit<UseComponentIconsProps, 'loading' | 'lo
22
22
  * @defaultValue 'md'
23
23
  */
24
24
  size?: Badge['variants']['size'];
25
+ /** Render the badge with equal padding on all sides. */
26
+ square?: boolean;
25
27
  class?: any;
26
28
  ui?: Badge['slots'];
27
29
  }
@@ -30,33 +32,12 @@ export interface BadgeSlots {
30
32
  default(props?: {}): any;
31
33
  trailing(props?: {}): any;
32
34
  }
33
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<BadgeProps>, {
34
- as: string;
35
- }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<BadgeProps>, {
36
- as: string;
37
- }>>> & Readonly<{}>, {
35
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<BadgeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
38
36
  as: any;
39
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<BadgeSlots> & BadgeSlots>;
37
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, BadgeSlots>;
40
38
  export default _default;
41
- type __VLS_WithDefaults<P, D> = {
42
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
43
- default: D[K];
44
- }> : P[K];
45
- };
46
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
47
- type __VLS_TypePropsToOption<T> = {
48
- [K in keyof T]-?: {} extends Pick<T, K> ? {
49
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
50
- } : {
51
- type: import('vue').PropType<T[K]>;
52
- required: true;
53
- };
54
- };
55
- type __VLS_WithTemplateSlots<T, S> = T & {
39
+ type __VLS_WithSlots<T, S> = T & {
56
40
  new (): {
57
41
  $slots: S;
58
42
  };
59
43
  };
60
- type __VLS_PrettifyLocal<T> = {
61
- [K in keyof T]: T[K];
62
- } & {};
@@ -30,19 +30,19 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.breadcrumb ||
30
30
  </script>
31
31
 
32
32
  <template>
33
- <Primitive :as="as" aria-label="breadcrumb" :class="ui.root({ class: [props.class, props.ui?.root] })">
33
+ <Primitive :as="as" aria-label="breadcrumb" :class="ui.root({ class: [props.ui?.root, props.class] })">
34
34
  <ol :class="ui.list({ class: props.ui?.list })">
35
35
  <template v-for="(item, index) in items" :key="index">
36
- <li :class="ui.item({ class: props.ui?.item })">
36
+ <li :class="ui.item({ class: [props.ui?.item, item.ui?.item] })">
37
37
  <ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item)" custom>
38
- <ULinkBase v-bind="slotProps" as="span" :aria-current="active && index === items.length - 1 ? 'page' : void 0" :class="ui.link({ class: [props.ui?.link, item.class], active: index === items.length - 1, disabled: !!item.disabled, to: !!item.to })">
38
+ <ULinkBase v-bind="slotProps" as="span" :aria-current="active && index === items.length - 1 ? 'page' : void 0" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: index === items.length - 1, disabled: !!item.disabled, to: !!item.to })">
39
39
  <slot :name="item.slot || 'item'" :item="item" :index="index">
40
40
  <slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="index === items.length - 1" :index="index">
41
- <UIcon v-if="item.icon" :name="item.icon" :class="ui.linkLeadingIcon({ class: props.ui?.linkLeadingIcon, active: index === items.length - 1 })" />
42
- <UAvatar v-else-if="item.avatar" :size="props.ui?.linkLeadingAvatarSize || ui.linkLeadingAvatarSize()" v-bind="item.avatar" :class="ui.linkLeadingAvatar({ class: props.ui?.linkLeadingAvatar, active: index === items.length - 1 })" />
41
+ <UIcon v-if="item.icon" :name="item.icon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon], active: index === items.length - 1 })" />
42
+ <UAvatar v-else-if="item.avatar" :size="props.ui?.linkLeadingAvatarSize || ui.linkLeadingAvatarSize()" v-bind="item.avatar" :class="ui.linkLeadingAvatar({ class: [props.ui?.linkLeadingAvatar, item.ui?.linkLeadingAvatar], active: index === items.length - 1 })" />
43
43
  </slot>
44
44
 
45
- <span v-if="get(item, props.labelKey) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']" :class="ui.linkLabel({ class: props.ui?.linkLabel })">
45
+ <span v-if="get(item, props.labelKey) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']" :class="ui.linkLabel({ class: [props.ui?.linkLabel, item.ui?.linkLabel] })">
46
46
  <slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="item" :active="index === items.length - 1" :index="index">
47
47
  {{ get(item, props.labelKey) }}
48
48
  </slot>
@@ -54,9 +54,9 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.breadcrumb ||
54
54
  </ULink>
55
55
  </li>
56
56
 
57
- <li v-if="index < items.length - 1" role="presentation" aria-hidden="true" :class="ui.separator({ class: props.ui?.separator })">
57
+ <li v-if="index < items.length - 1" role="presentation" aria-hidden="true" :class="ui.separator({ class: [props.ui?.separator, item.ui?.separator] })">
58
58
  <slot name="separator">
59
- <UIcon :name="separatorIcon" :class="ui.separatorIcon({ class: props.ui?.separatorIcon })" />
59
+ <UIcon :name="separatorIcon" :class="ui.separatorIcon({ class: [props.ui?.separatorIcon, item.ui?.separatorIcon] })" />
60
60
  </slot>
61
61
  </li>
62
62
  </template>
@@ -11,6 +11,8 @@ export interface BreadcrumbItem extends Omit<LinkProps, 'raw' | 'custom'> {
11
11
  icon?: string;
12
12
  avatar?: AvatarProps;
13
13
  slot?: string;
14
+ class?: any;
15
+ ui?: Pick<Breadcrumb['slots'], 'item' | 'link' | 'linkLeadingIcon' | 'linkLeadingAvatar' | 'linkLabel' | 'separator' | 'separatorIcon'>;
14
16
  [key: string]: any;
15
17
  }
16
18
  export interface BreadcrumbProps<T extends BreadcrumbItem = BreadcrumbItem> {
@@ -50,28 +52,10 @@ export type BreadcrumbSlots<T extends BreadcrumbItem = BreadcrumbItem> = {
50
52
  active?: boolean;
51
53
  }>;
52
54
  declare const _default: <T extends BreadcrumbItem>(__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<{
53
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & BreadcrumbProps<T> & Partial<{}>> & (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps);
55
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & BreadcrumbProps<T> & Partial<{}>> & import("vue").PublicProps;
54
56
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
55
57
  attrs: any;
56
- slots: Readonly<{
57
- item: SlotProps<T>;
58
- 'item-leading': SlotProps<T>;
59
- 'item-label': SlotProps<T>;
60
- 'item-trailing': SlotProps<T>;
61
- separator: any;
62
- } & DynamicSlots<T, "trailing" | "leading" | "label", {
63
- index: number;
64
- active?: boolean;
65
- }>> & {
66
- item: SlotProps<T>;
67
- 'item-leading': SlotProps<T>;
68
- 'item-label': SlotProps<T>;
69
- 'item-trailing': SlotProps<T>;
70
- separator: any;
71
- } & DynamicSlots<T, "trailing" | "leading" | "label", {
72
- index: number;
73
- active?: boolean;
74
- }>;
58
+ slots: BreadcrumbSlots<T>;
75
59
  emit: {};
76
60
  }>) => import("vue").VNode & {
77
61
  __ctx?: Awaited<typeof __VLS_setup>;
@@ -115,14 +115,13 @@ const ui = computed(() => tv({
115
115
  v-slot="{ active, ...slotProps }"
116
116
  :type="type"
117
117
  :disabled="disabled || isLoading"
118
- :class="ui.base({ class: [props.class, props.ui?.base] })"
119
118
  v-bind="omit(linkProps, ['type', 'disabled', 'onClick'])"
120
119
  custom
121
120
  >
122
121
  <ULinkBase
123
122
  v-bind="slotProps"
124
123
  :class="ui.base({
125
- class: [props.class, props.ui?.base],
124
+ class: [props.ui?.base, props.class],
126
125
  active,
127
126
  ...active && activeVariant ? { variant: activeVariant } : {},
128
127
  ...active && activeColor ? { color: activeColor } : {}
@@ -135,7 +134,7 @@ const ui = computed(() => tv({
135
134
  </slot>
136
135
 
137
136
  <slot>
138
- <span v-if="label" :class="ui.label({ class: props.ui?.label, active })">
137
+ <span v-if="label !== void 0 && label !== null" :class="ui.label({ class: props.ui?.label, active })">
139
138
  {{ label }}
140
139
  </span>
141
140
  </slot>
@@ -1,7 +1,7 @@
1
1
  import type { AppConfig } from '@nuxt/schema';
2
2
  import theme from '#build/ui/button';
3
- import type { LinkProps } from './Link.vue';
4
3
  import type { UseComponentIconsProps } from '../composables/useComponentIcons';
4
+ import type { LinkProps } from '../types';
5
5
  import type { ComponentConfig } from '../types/utils';
6
6
  type Button = ComponentConfig<typeof theme, AppConfig, 'button'>;
7
7
  export interface ButtonProps extends UseComponentIconsProps, Omit<LinkProps, 'raw' | 'custom'> {
@@ -35,39 +35,14 @@ export interface ButtonSlots {
35
35
  default(props?: {}): any;
36
36
  trailing(props?: {}): any;
37
37
  }
38
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ButtonProps>, {
39
- active: undefined;
40
- activeClass: string;
41
- inactiveClass: string;
42
- }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ButtonProps>, {
43
- active: undefined;
44
- activeClass: string;
45
- inactiveClass: string;
46
- }>>> & Readonly<{}>, {
38
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
47
39
  activeClass: string;
48
40
  active: boolean;
49
41
  inactiveClass: string;
50
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<ButtonSlots> & ButtonSlots>;
42
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonSlots>;
51
43
  export default _default;
52
- type __VLS_WithDefaults<P, D> = {
53
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
54
- default: D[K];
55
- }> : P[K];
56
- };
57
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
58
- type __VLS_TypePropsToOption<T> = {
59
- [K in keyof T]-?: {} extends Pick<T, K> ? {
60
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
61
- } : {
62
- type: import('vue').PropType<T[K]>;
63
- required: true;
64
- };
65
- };
66
- type __VLS_WithTemplateSlots<T, S> = T & {
44
+ type __VLS_WithSlots<T, S> = T & {
67
45
  new (): {
68
46
  $slots: S;
69
47
  };
70
48
  };
71
- type __VLS_PrettifyLocal<T> = {
72
- [K in keyof T]: T[K];
73
- } & {};
@@ -23,33 +23,12 @@ export interface ButtonGroupProps {
23
23
  export interface ButtonGroupSlots {
24
24
  default(props?: {}): any;
25
25
  }
26
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ButtonGroupProps>, {
27
- orientation: string;
28
- }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ButtonGroupProps>, {
29
- orientation: string;
30
- }>>> & Readonly<{}>, {
26
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {
31
27
  orientation: ButtonGroup["variants"]["orientation"];
32
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<ButtonGroupSlots> & ButtonGroupSlots>;
28
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonGroupSlots>;
33
29
  export default _default;
34
- type __VLS_WithDefaults<P, D> = {
35
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
36
- default: D[K];
37
- }> : P[K];
38
- };
39
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
40
- type __VLS_TypePropsToOption<T> = {
41
- [K in keyof T]-?: {} extends Pick<T, K> ? {
42
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
43
- } : {
44
- type: import('vue').PropType<T[K]>;
45
- required: true;
46
- };
47
- };
48
- type __VLS_WithTemplateSlots<T, S> = T & {
30
+ type __VLS_WithSlots<T, S> = T & {
49
31
  new (): {
50
32
  $slots: S;
51
33
  };
52
34
  };
53
- type __VLS_PrettifyLocal<T> = {
54
- [K in keyof T]: T[K];
55
- } & {};
@@ -47,6 +47,7 @@ const props = defineProps({
47
47
  initialFocus: { type: Boolean, required: false },
48
48
  isDateDisabled: { type: Function, required: false },
49
49
  isDateUnavailable: { type: Function, required: false },
50
+ isDateHighlightable: { type: Function, required: false },
50
51
  nextPage: { type: Function, required: false },
51
52
  prevPage: { type: Function, required: false }
52
53
  });
@@ -80,7 +81,7 @@ const Calendar = computed(() => props.range ? RangeCalendar : SingleCalendar);
80
81
  :default-value="defaultValue"
81
82
  :locale="locale"
82
83
  :dir="dir"
83
- :class="ui.root({ class: [props.class, props.ui?.root] })"
84
+ :class="ui.root({ class: [props.ui?.root, props.class] })"
84
85
  >
85
86
  <Calendar.Header :class="ui.header({ class: props.ui?.header })">
86
87
  <Calendar.Prev v-if="props.yearControls" :prev-page="(date) => paginateYear(date, -1)" :aria-label="t('calendar.prevYear')" as-child>
@@ -93,10 +93,14 @@ export interface CalendarSlots {
93
93
  }) => any;
94
94
  }
95
95
  declare const _default: <R extends boolean, M extends boolean>(__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<{
96
- props: __VLS_PrettifyLocal<any & CalendarProps<R, M> & Partial<{}>> & (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps);
96
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
97
+ readonly "onUpdate:modelValue"?: ((date: CalendarModelValue<R, M>) => any) | undefined;
98
+ readonly "onUpdate:placeholder"?: ((...args: unknown[]) => any) | undefined;
99
+ readonly "onUpdate:startValue"?: ((date: DateValue | undefined) => any) | undefined;
100
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onUpdate:placeholder" | "onUpdate:startValue"> & CalendarProps<R, M> & Partial<{}>> & import("vue").PublicProps;
97
101
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
98
102
  attrs: any;
99
- slots: Readonly<CalendarSlots> & CalendarSlots;
103
+ slots: CalendarSlots;
100
104
  emit: ((evt: "update:modelValue", date: CalendarModelValue<R, M>) => void) & ((evt: "update:placeholder", ...args: [date: DateValue] & [date: DateValue]) => void) & ((evt: "update:startValue", date: DateValue | undefined) => void);
101
105
  }>) => import("vue").VNode & {
102
106
  __ctx?: Awaited<typeof __VLS_setup>;
@@ -21,7 +21,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.card || {} })
21
21
  </script>
22
22
 
23
23
  <template>
24
- <Primitive :as="as" :class="ui.root({ class: [props.class, props.ui?.root] })">
24
+ <Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
25
25
  <div v-if="!!slots.header" :class="ui.header({ class: props.ui?.header })">
26
26
  <slot name="header" />
27
27
  </div>
@@ -20,18 +20,9 @@ export interface CardSlots {
20
20
  default(props?: {}): any;
21
21
  footer(props?: {}): any;
22
22
  }
23
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<CardProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<CardProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<CardSlots> & CardSlots>;
23
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<CardProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, CardSlots>;
24
24
  export default _default;
25
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
26
- type __VLS_TypePropsToOption<T> = {
27
- [K in keyof T]-?: {} extends Pick<T, K> ? {
28
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
29
- } : {
30
- type: import('vue').PropType<T[K]>;
31
- required: true;
32
- };
33
- };
34
- type __VLS_WithTemplateSlots<T, S> = T & {
25
+ type __VLS_WithSlots<T, S> = T & {
35
26
  new (): {
36
27
  $slots: S;
37
28
  };
@@ -129,6 +129,9 @@ function onSelect(api) {
129
129
  selectedIndex.value = api?.selectedScrollSnap() || 0;
130
130
  emits("select", selectedIndex.value);
131
131
  }
132
+ function isCarouselItem(item) {
133
+ return typeof item === "object" && item !== null;
134
+ }
132
135
  onMounted(() => {
133
136
  if (!emblaApi.value) {
134
137
  return;
@@ -151,7 +154,7 @@ defineExpose({
151
154
  role="region"
152
155
  aria-roledescription="carousel"
153
156
  tabindex="0"
154
- :class="ui.root({ class: [props.class, props.ui?.root] })"
157
+ :class="ui.root({ class: [props.ui?.root, props.class] })"
155
158
  @keydown="onKeyDown"
156
159
  >
157
160
  <div ref="emblaRef" :class="ui.viewport({ class: props.ui?.viewport })">
@@ -161,7 +164,7 @@ defineExpose({
161
164
  :key="index"
162
165
  role="group"
163
166
  aria-roledescription="slide"
164
- :class="ui.item({ class: props.ui?.item })"
167
+ :class="ui.item({ class: [props.ui?.item, isCarouselItem(item) && item.ui?.item, isCarouselItem(item) && item.class] })"
165
168
  >
166
169
  <slot :item="item" :index="index" />
167
170
  </div>