@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
@@ -59,29 +59,29 @@ const groups = computed(
59
59
  <DefineItemTemplate v-slot="{ item, active, index }">
60
60
  <slot :name="item.slot || 'item'" :item="item" :index="index">
61
61
  <slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="active" :index="index">
62
- <UIcon v-if="item.loading" :name="loadingIcon || appConfig.ui.icons.loading" :class="ui.itemLeadingIcon({ class: uiOverride?.itemLeadingIcon, color: item?.color, loading: true })" />
63
- <UIcon v-else-if="item.icon" :name="item.icon" :class="ui.itemLeadingIcon({ class: uiOverride?.itemLeadingIcon, color: item?.color, active })" />
64
- <UAvatar v-else-if="item.avatar" :size="props.uiOverride?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="item.avatar" :class="ui.itemLeadingAvatar({ class: uiOverride?.itemLeadingAvatar, active })" />
62
+ <UIcon v-if="item.loading" :name="loadingIcon || appConfig.ui.icons.loading" :class="ui.itemLeadingIcon({ class: [uiOverride?.itemLeadingIcon, item.ui?.itemLeadingIcon], color: item?.color, loading: true })" />
63
+ <UIcon v-else-if="item.icon" :name="item.icon" :class="ui.itemLeadingIcon({ class: [uiOverride?.itemLeadingIcon, item.ui?.itemLeadingIcon], color: item?.color, active })" />
64
+ <UAvatar v-else-if="item.avatar" :size="item.ui?.itemLeadingAvatarSize || props.uiOverride?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="item.avatar" :class="ui.itemLeadingAvatar({ class: [uiOverride?.itemLeadingAvatar, item.ui?.itemLeadingAvatar], active })" />
65
65
  </slot>
66
66
 
67
- <span v-if="get(item, props.labelKey) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']" :class="ui.itemLabel({ class: uiOverride?.itemLabel, active })">
67
+ <span v-if="get(item, props.labelKey) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']" :class="ui.itemLabel({ class: [uiOverride?.itemLabel, item.ui?.itemLabel], active })">
68
68
  <slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="item" :active="active" :index="index">
69
69
  {{ get(item, props.labelKey) }}
70
70
  </slot>
71
71
 
72
- <UIcon v-if="item.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" :class="ui.itemLabelExternalIcon({ class: uiOverride?.itemLabelExternalIcon, color: item?.color, active })" />
72
+ <UIcon v-if="item.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" :class="ui.itemLabelExternalIcon({ class: [uiOverride?.itemLabelExternalIcon, item.ui?.itemLabelExternalIcon], color: item?.color, active })" />
73
73
  </span>
74
74
 
75
- <span :class="ui.itemTrailing({ class: uiOverride?.itemTrailing })">
75
+ <span :class="ui.itemTrailing({ class: [uiOverride?.itemTrailing, item.ui?.itemTrailing] })">
76
76
  <slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="item" :active="active" :index="index">
77
- <UIcon v-if="item.children?.length" :name="childrenIcon" :class="ui.itemTrailingIcon({ class: uiOverride?.itemTrailingIcon, color: item?.color, active })" />
78
- <span v-else-if="item.kbds?.length" :class="ui.itemTrailingKbds({ class: uiOverride?.itemTrailingKbds })">
79
- <UKbd v-for="(kbd, kbdIndex) in item.kbds" :key="kbdIndex" :size="props.uiOverride?.itemTrailingKbdsSize || ui.itemTrailingKbdsSize()" v-bind="typeof kbd === 'string' ? { value: kbd } : kbd" />
77
+ <UIcon v-if="item.children?.length" :name="childrenIcon" :class="ui.itemTrailingIcon({ class: [uiOverride?.itemTrailingIcon, item.ui?.itemTrailingIcon], color: item?.color, active })" />
78
+ <span v-else-if="item.kbds?.length" :class="ui.itemTrailingKbds({ class: [uiOverride?.itemTrailingKbds, item.ui?.itemTrailingKbds] })">
79
+ <UKbd v-for="(kbd, kbdIndex) in item.kbds" :key="kbdIndex" :size="item.ui?.itemTrailingKbdsSize || props.uiOverride?.itemTrailingKbdsSize || ui.itemTrailingKbdsSize()" v-bind="typeof kbd === 'string' ? { value: kbd } : kbd" />
80
80
  </span>
81
81
  </slot>
82
82
 
83
83
  <ContextMenu.ItemIndicator as-child>
84
- <UIcon :name="checkedIcon || appConfig.ui.icons.check" :class="ui.itemTrailingIcon({ class: uiOverride?.itemTrailingIcon, color: item?.color })" />
84
+ <UIcon :name="checkedIcon || appConfig.ui.icons.check" :class="ui.itemTrailingIcon({ class: [uiOverride?.itemTrailingIcon, item.ui?.itemTrailingIcon], color: item?.color })" />
85
85
  </ContextMenu.ItemIndicator>
86
86
  </span>
87
87
  </slot>
@@ -93,17 +93,17 @@ const groups = computed(
93
93
 
94
94
  <ContextMenu.Group v-for="(group, groupIndex) in groups" :key="`group-${groupIndex}`" :class="ui.group({ class: uiOverride?.group })">
95
95
  <template v-for="(item, index) in group" :key="`group-${groupIndex}-${index}`">
96
- <ContextMenu.Label v-if="item.type === 'label'" :class="ui.label({ class: uiOverride?.label })">
96
+ <ContextMenu.Label v-if="item.type === 'label'" :class="ui.label({ class: [uiOverride?.label, item.ui?.label, item.class] })">
97
97
  <ReuseItemTemplate :item="item" :index="index" />
98
98
  </ContextMenu.Label>
99
- <ContextMenu.Separator v-else-if="item.type === 'separator'" :class="ui.separator({ class: uiOverride?.separator })" />
99
+ <ContextMenu.Separator v-else-if="item.type === 'separator'" :class="ui.separator({ class: [uiOverride?.separator, item.ui?.separator, item.class] })" />
100
100
  <ContextMenu.Sub v-else-if="item?.children?.length" :open="item.open" :default-open="item.defaultOpen">
101
101
  <ContextMenu.SubTrigger
102
102
  as="button"
103
103
  type="button"
104
104
  :disabled="item.disabled"
105
105
  :text-value="get(item, props.labelKey)"
106
- :class="ui.item({ class: uiOverride?.item, color: item?.color })"
106
+ :class="ui.item({ class: [uiOverride?.item, item.ui?.item, item.class], color: item?.color })"
107
107
  >
108
108
  <ReuseItemTemplate :item="item" :index="index" />
109
109
  </ContextMenu.SubTrigger>
@@ -132,7 +132,7 @@ const groups = computed(
132
132
  :model-value="item.checked"
133
133
  :disabled="item.disabled"
134
134
  :text-value="get(item, props.labelKey)"
135
- :class="ui.item({ class: [uiOverride?.item, item.class], color: item?.color })"
135
+ :class="ui.item({ class: [uiOverride?.item, item.ui?.item, item.class], color: item?.color })"
136
136
  @update:model-value="item.onUpdateChecked"
137
137
  @select="item.onSelect"
138
138
  >
@@ -146,7 +146,7 @@ const groups = computed(
146
146
  @select="item.onSelect"
147
147
  >
148
148
  <ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item)" custom>
149
- <ULinkBase v-bind="slotProps" :class="ui.item({ class: [uiOverride?.item, item.class], active, color: item?.color })">
149
+ <ULinkBase v-bind="slotProps" :class="ui.item({ class: [uiOverride?.item, item.ui?.item, item.class], active, color: item?.color })">
150
150
  <ReuseItemTemplate :item="item" :active="active" :index="index" />
151
151
  </ULinkBase>
152
152
  </ULink>
@@ -2,7 +2,7 @@ import { ContextMenu } from 'reka-ui/namespaced';
2
2
  import type { ContextMenuContentProps as RekaContextMenuContentProps } from 'reka-ui';
3
3
  import type { AppConfig } from '@nuxt/schema';
4
4
  import type theme from '#build/ui/context-menu';
5
- import type { ContextMenuItem } from '../types';
5
+ import type { ContextMenuItem, ContextMenuSlots } from '../types';
6
6
  import type { ArrayOrNested, NestedItem, ComponentConfig } from '../types/utils';
7
7
  type ContextMenu = ComponentConfig<typeof theme, AppConfig, 'contextMenu'>;
8
8
  interface ContextMenuContentProps<T extends ArrayOrNested<ContextMenuItem>> extends Omit<RekaContextMenuContentProps, 'as' | 'asChild' | 'forceMount'> {
@@ -29,64 +29,24 @@ interface ContextMenuContentProps<T extends ArrayOrNested<ContextMenuItem>> exte
29
29
  uiOverride?: ContextMenu['slots'];
30
30
  }
31
31
  declare const _default: <T extends ArrayOrNested<ContextMenuItem>>(__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<{
32
- props: __VLS_PrettifyLocal<any & ContextMenuContentProps<T> & Partial<{}>> & (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps);
32
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
33
+ readonly onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
34
+ readonly onPointerDownOutside?: ((event: CustomEvent<{
35
+ originalEvent: PointerEvent;
36
+ }>) => any) | undefined;
37
+ readonly onFocusOutside?: ((event: CustomEvent<{
38
+ originalEvent: FocusEvent;
39
+ }>) => any) | undefined;
40
+ readonly onInteractOutside?: ((event: CustomEvent<{
41
+ originalEvent: PointerEvent;
42
+ }> | CustomEvent<{
43
+ originalEvent: FocusEvent;
44
+ }>) => any) | undefined;
45
+ readonly onCloseAutoFocus?: ((event: Event) => any) | undefined;
46
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onEscapeKeyDown" | "onPointerDownOutside" | "onFocusOutside" | "onInteractOutside" | "onCloseAutoFocus"> & ContextMenuContentProps<T> & Partial<{}>> & import("vue").PublicProps;
33
47
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
34
48
  attrs: any;
35
- slots: Readonly<{
36
- default(props?: {}): any;
37
- item: (props: {
38
- item: NestedItem<T>;
39
- active?: boolean;
40
- index: number;
41
- }) => any;
42
- 'item-leading': (props: {
43
- item: NestedItem<T>;
44
- active?: boolean;
45
- index: number;
46
- }) => any;
47
- 'item-label': (props: {
48
- item: NestedItem<T>;
49
- active?: boolean;
50
- index: number;
51
- }) => any;
52
- 'item-trailing': (props: {
53
- item: NestedItem<T>;
54
- active?: boolean;
55
- index: number;
56
- }) => any;
57
- 'content-top': (props?: {}) => any;
58
- 'content-bottom': (props?: {}) => any;
59
- } & import("../types").DynamicSlots<import("../types").MergeTypes<NestedItem<T>>, "trailing" | "leading" | "label", {
60
- active?: boolean;
61
- index: number;
62
- }>> & {
63
- default(props?: {}): any;
64
- item: (props: {
65
- item: NestedItem<T>;
66
- active?: boolean;
67
- index: number;
68
- }) => any;
69
- 'item-leading': (props: {
70
- item: NestedItem<T>;
71
- active?: boolean;
72
- index: number;
73
- }) => any;
74
- 'item-label': (props: {
75
- item: NestedItem<T>;
76
- active?: boolean;
77
- index: number;
78
- }) => any;
79
- 'item-trailing': (props: {
80
- item: NestedItem<T>;
81
- active?: boolean;
82
- index: number;
83
- }) => any;
84
- 'content-top': (props?: {}) => any;
85
- 'content-bottom': (props?: {}) => any;
86
- } & import("../types").DynamicSlots<import("../types").MergeTypes<NestedItem<T>>, "trailing" | "leading" | "label", {
87
- active?: boolean;
88
- index: number;
89
- }>;
49
+ slots: ContextMenuSlots<T>;
90
50
  emit: ((evt: "escapeKeyDown", event: KeyboardEvent) => void) & ((evt: "pointerDownOutside", event: CustomEvent<{
91
51
  originalEvent: PointerEvent;
92
52
  }>) => void) & ((evt: "focusOutside", event: CustomEvent<{
@@ -48,41 +48,31 @@ export interface DrawerSlots {
48
48
  body(props?: {}): any;
49
49
  footer(props?: {}): any;
50
50
  }
51
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<DrawerProps>, {
52
- direction: string;
53
- portal: boolean;
54
- overlay: boolean;
55
- handle: boolean;
56
- modal: boolean;
57
- dismissible: boolean;
58
- }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
51
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<DrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
52
+ close: () => any;
53
+ drag: (percentageDragged: number) => any;
54
+ "update:open": (open: boolean) => any;
55
+ release: (open: boolean) => any;
56
+ "update:activeSnapPoint": (val: string | number) => any;
57
+ animationEnd: (open: boolean) => any;
58
+ }, string, import("vue").PublicProps, Readonly<DrawerProps> & Readonly<{
59
+ onClose?: (() => any) | undefined;
60
+ onDrag?: ((percentageDragged: number) => any) | undefined;
61
+ "onUpdate:open"?: ((open: boolean) => any) | undefined;
62
+ onRelease?: ((open: boolean) => any) | undefined;
63
+ "onUpdate:activeSnapPoint"?: ((val: string | number) => any) | undefined;
64
+ onAnimationEnd?: ((open: boolean) => any) | undefined;
65
+ }>, {
59
66
  modal: boolean;
60
67
  portal: boolean | string | HTMLElement;
61
68
  overlay: boolean;
62
69
  direction: import("vaul-vue").DrawerDirection;
63
70
  dismissible: boolean;
64
71
  handle: boolean;
65
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<DrawerSlots> & DrawerSlots>;
72
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, DrawerSlots>;
66
73
  export default _default;
67
- type __VLS_WithDefaults<P, D> = {
68
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
69
- default: D[K];
70
- }> : P[K];
71
- };
72
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
73
- type __VLS_TypePropsToOption<T> = {
74
- [K in keyof T]-?: {} extends Pick<T, K> ? {
75
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
76
- } : {
77
- type: import('vue').PropType<T[K]>;
78
- required: true;
79
- };
80
- };
81
- type __VLS_WithTemplateSlots<T, S> = T & {
74
+ type __VLS_WithSlots<T, S> = T & {
82
75
  new (): {
83
76
  $slots: S;
84
77
  };
85
78
  };
86
- type __VLS_PrettifyLocal<T> = {
87
- [K in keyof T]: T[K];
88
- } & {};
@@ -28,6 +28,8 @@ export interface DropdownMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'cust
28
28
  children?: ArrayOrNested<DropdownMenuItem>;
29
29
  onSelect?(e: Event): void;
30
30
  onUpdateChecked?(checked: boolean): void;
31
+ class?: any;
32
+ ui?: Pick<DropdownMenu['slots'], 'item' | 'label' | 'separator' | 'itemLeadingIcon' | 'itemLeadingAvatarSize' | 'itemLeadingAvatar' | 'itemLabel' | 'itemLabelExternalIcon' | 'itemTrailing' | 'itemTrailingIcon' | 'itemTrailingKbds' | 'itemTrailingKbdsSize'>;
31
33
  [key: string]: any;
32
34
  }
33
35
  export interface DropdownMenuProps<T extends ArrayOrNested<DropdownMenuItem> = ArrayOrNested<DropdownMenuItem>> extends Omit<DropdownMenuRootProps, 'dir'> {
@@ -101,36 +103,12 @@ export type DropdownMenuSlots<A extends ArrayOrNested<DropdownMenuItem> = ArrayO
101
103
  index: number;
102
104
  }>;
103
105
  declare const _default: <T extends ArrayOrNested<DropdownMenuItem>>(__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<{
104
- props: __VLS_PrettifyLocal<any & DropdownMenuProps<T> & Partial<{}>> & (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps);
106
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
107
+ readonly "onUpdate:open"?: ((payload: boolean) => any) | undefined;
108
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:open"> & DropdownMenuProps<T> & Partial<{}>> & import("vue").PublicProps;
105
109
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
106
110
  attrs: any;
107
- slots: Readonly<{
108
- default(props: {
109
- open: boolean;
110
- }): any;
111
- item: SlotProps<NestedItem<T>>;
112
- 'item-leading': SlotProps<NestedItem<T>>;
113
- 'item-label': SlotProps<NestedItem<T>>;
114
- 'item-trailing': SlotProps<NestedItem<T>>;
115
- 'content-top': (props?: {}) => any;
116
- 'content-bottom': (props?: {}) => any;
117
- } & DynamicSlots<MergeTypes<NestedItem<T>>, "trailing" | "leading" | "label", {
118
- active?: boolean;
119
- index: number;
120
- }>> & {
121
- default(props: {
122
- open: boolean;
123
- }): any;
124
- item: SlotProps<NestedItem<T>>;
125
- 'item-leading': SlotProps<NestedItem<T>>;
126
- 'item-label': SlotProps<NestedItem<T>>;
127
- 'item-trailing': SlotProps<NestedItem<T>>;
128
- 'content-top': (props?: {}) => any;
129
- 'content-bottom': (props?: {}) => any;
130
- } & DynamicSlots<MergeTypes<NestedItem<T>>, "trailing" | "leading" | "label", {
131
- active?: boolean;
132
- index: number;
133
- }>;
111
+ slots: DropdownMenuSlots<T, NestedItem<T>>;
134
112
  emit: (evt: "update:open", payload: boolean) => void;
135
113
  }>) => import("vue").VNode & {
136
114
  __ctx?: Awaited<typeof __VLS_setup>;
@@ -64,29 +64,29 @@ const groups = computed(
64
64
  <DefineItemTemplate v-slot="{ item, active, index }">
65
65
  <slot :name="item.slot || 'item'" :item="item" :index="index">
66
66
  <slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="active" :index="index">
67
- <UIcon v-if="item.loading" :name="loadingIcon || appConfig.ui.icons.loading" :class="ui.itemLeadingIcon({ class: uiOverride?.itemLeadingIcon, color: item?.color, loading: true })" />
68
- <UIcon v-else-if="item.icon" :name="item.icon" :class="ui.itemLeadingIcon({ class: uiOverride?.itemLeadingIcon, color: item?.color, active })" />
69
- <UAvatar v-else-if="item.avatar" :size="props.uiOverride?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="item.avatar" :class="ui.itemLeadingAvatar({ class: uiOverride?.itemLeadingAvatar, active })" />
67
+ <UIcon v-if="item.loading" :name="loadingIcon || appConfig.ui.icons.loading" :class="ui.itemLeadingIcon({ class: [uiOverride?.itemLeadingIcon, item.ui?.itemLeadingIcon], color: item?.color, loading: true })" />
68
+ <UIcon v-else-if="item.icon" :name="item.icon" :class="ui.itemLeadingIcon({ class: [uiOverride?.itemLeadingIcon, item.ui?.itemLeadingIcon], color: item?.color, active })" />
69
+ <UAvatar v-else-if="item.avatar" :size="item.ui?.itemLeadingAvatarSize || props.uiOverride?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="item.avatar" :class="ui.itemLeadingAvatar({ class: [uiOverride?.itemLeadingAvatar, item.ui?.itemLeadingAvatar], active })" />
70
70
  </slot>
71
71
 
72
- <span v-if="get(item, props.labelKey) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']" :class="ui.itemLabel({ class: uiOverride?.itemLabel, active })">
72
+ <span v-if="get(item, props.labelKey) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']" :class="ui.itemLabel({ class: [uiOverride?.itemLabel, item.ui?.itemLabel], active })">
73
73
  <slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="item" :active="active" :index="index">
74
74
  {{ get(item, props.labelKey) }}
75
75
  </slot>
76
76
 
77
- <UIcon v-if="item.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" :class="ui.itemLabelExternalIcon({ class: uiOverride?.itemLabelExternalIcon, color: item?.color, active })" />
77
+ <UIcon v-if="item.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" :class="ui.itemLabelExternalIcon({ class: [uiOverride?.itemLabelExternalIcon, item.ui?.itemLabelExternalIcon], color: item?.color, active })" />
78
78
  </span>
79
79
 
80
- <span :class="ui.itemTrailing({ class: uiOverride?.itemTrailing })">
80
+ <span :class="ui.itemTrailing({ class: [uiOverride?.itemTrailing, item.ui?.itemTrailing] })">
81
81
  <slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="item" :active="active" :index="index">
82
- <UIcon v-if="item.children?.length" :name="childrenIcon" :class="ui.itemTrailingIcon({ class: uiOverride?.itemTrailingIcon, color: item?.color, active })" />
83
- <span v-else-if="item.kbds?.length" :class="ui.itemTrailingKbds({ class: uiOverride?.itemTrailingKbds })">
84
- <UKbd v-for="(kbd, kbdIndex) in item.kbds" :key="kbdIndex" :size="props.uiOverride?.itemTrailingKbdsSize || ui.itemTrailingKbdsSize()" v-bind="typeof kbd === 'string' ? { value: kbd } : kbd" />
82
+ <UIcon v-if="item.children?.length" :name="childrenIcon" :class="ui.itemTrailingIcon({ class: [uiOverride?.itemTrailingIcon, item.ui?.itemTrailingIcon], color: item?.color, active })" />
83
+ <span v-else-if="item.kbds?.length" :class="ui.itemTrailingKbds({ class: [uiOverride?.itemTrailingKbds, item.ui?.itemTrailingKbds] })">
84
+ <UKbd v-for="(kbd, kbdIndex) in item.kbds" :key="kbdIndex" :size="item.ui?.itemTrailingKbdsSize || props.uiOverride?.itemTrailingKbdsSize || ui.itemTrailingKbdsSize()" v-bind="typeof kbd === 'string' ? { value: kbd } : kbd" />
85
85
  </span>
86
86
  </slot>
87
87
 
88
88
  <DropdownMenu.ItemIndicator as-child>
89
- <UIcon :name="checkedIcon || appConfig.ui.icons.check" :class="ui.itemTrailingIcon({ class: uiOverride?.itemTrailingIcon, color: item?.color })" />
89
+ <UIcon :name="checkedIcon || appConfig.ui.icons.check" :class="ui.itemTrailingIcon({ class: [uiOverride?.itemTrailingIcon, item.ui?.itemTrailingIcon], color: item?.color })" />
90
90
  </DropdownMenu.ItemIndicator>
91
91
  </span>
92
92
  </slot>
@@ -98,17 +98,17 @@ const groups = computed(
98
98
 
99
99
  <DropdownMenu.Group v-for="(group, groupIndex) in groups" :key="`group-${groupIndex}`" :class="ui.group({ class: uiOverride?.group })">
100
100
  <template v-for="(item, index) in group" :key="`group-${groupIndex}-${index}`">
101
- <DropdownMenu.Label v-if="item.type === 'label'" :class="ui.label({ class: uiOverride?.label })">
101
+ <DropdownMenu.Label v-if="item.type === 'label'" :class="ui.label({ class: [uiOverride?.label, item.ui?.label, item.class] })">
102
102
  <ReuseItemTemplate :item="item" :index="index" />
103
103
  </DropdownMenu.Label>
104
- <DropdownMenu.Separator v-else-if="item.type === 'separator'" :class="ui.separator({ class: uiOverride?.separator })" />
104
+ <DropdownMenu.Separator v-else-if="item.type === 'separator'" :class="ui.separator({ class: [uiOverride?.separator, item.ui?.separator, item.class] })" />
105
105
  <DropdownMenu.Sub v-else-if="item?.children?.length" :open="item.open" :default-open="item.defaultOpen">
106
106
  <DropdownMenu.SubTrigger
107
107
  as="button"
108
108
  type="button"
109
109
  :disabled="item.disabled"
110
110
  :text-value="get(item, props.labelKey)"
111
- :class="ui.item({ class: uiOverride?.item, color: item?.color })"
111
+ :class="ui.item({ class: [uiOverride?.item, item.ui?.item, item.class], color: item?.color })"
112
112
  >
113
113
  <ReuseItemTemplate :item="item" :index="index" />
114
114
  </DropdownMenu.SubTrigger>
@@ -139,7 +139,7 @@ const groups = computed(
139
139
  :model-value="item.checked"
140
140
  :disabled="item.disabled"
141
141
  :text-value="get(item, props.labelKey)"
142
- :class="ui.item({ class: [uiOverride?.item, item.class], color: item?.color })"
142
+ :class="ui.item({ class: [uiOverride?.item, item.ui?.item, item.class], color: item?.color })"
143
143
  @update:model-value="item.onUpdateChecked"
144
144
  @select="item.onSelect"
145
145
  >
@@ -153,7 +153,7 @@ const groups = computed(
153
153
  @select="item.onSelect"
154
154
  >
155
155
  <ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item)" custom>
156
- <ULinkBase v-bind="slotProps" :class="ui.item({ class: [uiOverride?.item, item.class], color: item?.color, active })">
156
+ <ULinkBase v-bind="slotProps" :class="ui.item({ class: [uiOverride?.item, item.ui?.item, item.class], color: item?.color, active })">
157
157
  <ReuseItemTemplate :item="item" :active="active" :index="index" />
158
158
  </ULinkBase>
159
159
  </ULink>
@@ -28,15 +28,28 @@ interface DropdownMenuContentProps<T extends ArrayOrNested<DropdownMenuItem>> ex
28
28
  };
29
29
  uiOverride?: DropdownMenu['slots'];
30
30
  }
31
+ type DropdownMenuContentSlots<T extends ArrayOrNested<DropdownMenuItem>> = Omit<DropdownMenuSlots<T>, 'default'> & {
32
+ default(props?: {}): any;
33
+ };
31
34
  declare const _default: <T extends ArrayOrNested<DropdownMenuItem>>(__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<{
32
- props: __VLS_PrettifyLocal<any & DropdownMenuContentProps<T> & Partial<{}>> & (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps);
35
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
36
+ readonly onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
37
+ readonly onPointerDownOutside?: ((event: CustomEvent<{
38
+ originalEvent: PointerEvent;
39
+ }>) => any) | undefined;
40
+ readonly onFocusOutside?: ((event: CustomEvent<{
41
+ originalEvent: FocusEvent;
42
+ }>) => any) | undefined;
43
+ readonly onInteractOutside?: ((event: CustomEvent<{
44
+ originalEvent: PointerEvent;
45
+ }> | CustomEvent<{
46
+ originalEvent: FocusEvent;
47
+ }>) => any) | undefined;
48
+ readonly onCloseAutoFocus?: ((event: Event) => any) | undefined;
49
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onEscapeKeyDown" | "onPointerDownOutside" | "onFocusOutside" | "onInteractOutside" | "onCloseAutoFocus"> & DropdownMenuContentProps<T> & Partial<{}>> & import("vue").PublicProps;
33
50
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
34
51
  attrs: any;
35
- slots: Readonly<Omit<DropdownMenuSlots<T>, "default"> & {
36
- default(props?: {}): any;
37
- }> & Omit<DropdownMenuSlots<T>, "default"> & {
38
- default(props?: {}): any;
39
- };
52
+ slots: DropdownMenuContentSlots<T>;
40
53
  emit: ((evt: "escapeKeyDown", event: KeyboardEvent) => void) & ((evt: "pointerDownOutside", event: CustomEvent<{
41
54
  originalEvent: PointerEvent;
42
55
  }>) => void) & ((evt: "focusOutside", event: CustomEvent<{
@@ -52,10 +52,13 @@ export interface FormSlots {
52
52
  }): any;
53
53
  }
54
54
  declare const _default: <S extends FormSchema>(__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<{
55
- props: __VLS_PrettifyLocal<any & FormProps<S> & Partial<{}>> & (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps);
55
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
56
+ readonly onError?: ((payload: FormErrorEvent) => any) | undefined;
57
+ readonly onSubmit?: ((payload: FormSubmitEvent<InferOutput<S>>) => any) | undefined;
58
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onError" | "onSubmit"> & FormProps<S> & Partial<{}>> & import("vue").PublicProps;
56
59
  expose(exposed: import("vue").ShallowUnwrapRef<Form<InferInput<S>>>): void;
57
60
  attrs: any;
58
- slots: Readonly<FormSlots> & FormSlots;
61
+ slots: FormSlots;
59
62
  emit: FormEmits<S>;
60
63
  }>) => import("vue").VNode & {
61
64
  __ctx?: Awaited<typeof __VLS_setup>;
@@ -50,7 +50,7 @@ provide(formFieldInjectionKey, computed(() => ({
50
50
  </script>
51
51
 
52
52
  <template>
53
- <Primitive :as="as" :class="ui.root({ class: [props.class, props.ui?.root] })">
53
+ <Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
54
54
  <div :class="ui.wrapper({ class: props.ui?.wrapper })">
55
55
  <div v-if="label || !!slots.label" :class="ui.labelWrapper({ class: props.ui?.labelWrapper })">
56
56
  <Label :for="id" :class="ui.label({ class: props.ui?.label })">
@@ -75,16 +75,16 @@ provide(formFieldInjectionKey, computed(() => ({
75
75
  <div :class="[(label || !!slots.label || description || !!slots.description) && ui.container({ class: props.ui?.container })]">
76
76
  <slot :error="error" />
77
77
 
78
- <p v-if="typeof error === 'string' && error || !!slots.error" :id="`${ariaId}-error`" :class="ui.error({ class: props.ui?.error })">
78
+ <div v-if="typeof error === 'string' && error || !!slots.error" :id="`${ariaId}-error`" :class="ui.error({ class: props.ui?.error })">
79
79
  <slot name="error" :error="error">
80
80
  {{ error }}
81
81
  </slot>
82
- </p>
83
- <p v-else-if="help || !!slots.help" :class="ui.help({ class: props.ui?.help })">
82
+ </div>
83
+ <div v-else-if="help || !!slots.help" :class="ui.help({ class: props.ui?.help })">
84
84
  <slot name="help" :help="help">
85
85
  {{ help }}
86
86
  </slot>
87
- </p>
87
+ </div>
88
88
  </div>
89
89
  </Primitive>
90
90
  </template>
@@ -52,18 +52,9 @@ export interface FormFieldSlots {
52
52
  error?: string | boolean;
53
53
  }): any;
54
54
  }
55
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<FormFieldProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<FormFieldProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<FormFieldSlots> & FormFieldSlots>;
55
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<FormFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FormFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, FormFieldSlots>;
56
56
  export default _default;
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 & {
57
+ type __VLS_WithSlots<T, S> = T & {
67
58
  new (): {
68
59
  $slots: S;
69
60
  };
@@ -4,14 +4,5 @@ export interface IconProps {
4
4
  size?: string | number;
5
5
  customize?: (content: string, name?: string, prefix?: string, provider?: string) => string;
6
6
  }
7
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<IconProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<IconProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
7
+ declare const _default: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
8
  export default _default;
9
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
10
- type __VLS_TypePropsToOption<T> = {
11
- [K in keyof T]-?: {} extends Pick<T, K> ? {
12
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
13
- } : {
14
- type: import('vue').PropType<T[K]>;
15
- required: true;
16
- };
17
- };
@@ -42,7 +42,7 @@ const props = defineProps({
42
42
  });
43
43
  const emits = defineEmits(["update:modelValue", "blur", "change"]);
44
44
  const slots = defineSlots();
45
- const [modelValue, modelModifiers] = defineModel({ type: [String, Number, null] });
45
+ const [modelValue, modelModifiers] = defineModel({ type: null });
46
46
  const appConfig = useAppConfig();
47
47
  const { emitFormBlur, emitFormInput, emitFormChange, size: formGroupSize, color, id, name, highlight, disabled, emitFormFocus, ariaAttrs } = useFormField(props, { deferInputValidation: true });
48
48
  const { orientation, size: buttonGroupSize } = useButtonGroup(props);
@@ -109,7 +109,7 @@ defineExpose({
109
109
  </script>
110
110
 
111
111
  <template>
112
- <Primitive :as="as" :class="ui.root({ class: [props.class, props.ui?.root] })">
112
+ <Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
113
113
  <input
114
114
  :id="id"
115
115
  ref="inputRef"
@@ -2,7 +2,7 @@ import type { InputHTMLAttributes } from 'vue';
2
2
  import type { AppConfig } from '@nuxt/schema';
3
3
  import theme from '#build/ui/input';
4
4
  import type { UseComponentIconsProps } from '../composables/useComponentIcons';
5
- import type { ComponentConfig } from '../types/utils';
5
+ import type { AcceptableValue, ComponentConfig } from '../types/utils';
6
6
  type Input = ComponentConfig<typeof theme, AppConfig, 'input'>;
7
7
  export interface InputProps extends UseComponentIconsProps {
8
8
  /**
@@ -37,8 +37,8 @@ export interface InputProps extends UseComponentIconsProps {
37
37
  class?: any;
38
38
  ui?: Input['slots'];
39
39
  }
40
- export interface InputEmits {
41
- (e: 'update:modelValue', payload: string | number): void;
40
+ export interface InputEmits<T extends AcceptableValue = AcceptableValue> {
41
+ (e: 'update:modelValue', payload: T): void;
42
42
  (e: 'blur', event: FocusEvent): void;
43
43
  (e: 'change', event: Event): void;
44
44
  }
@@ -47,45 +47,24 @@ export interface InputSlots {
47
47
  default(props?: {}): any;
48
48
  trailing(props?: {}): any;
49
49
  }
50
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
51
- modelValue?: string | number | null;
52
- } & InputProps>, {
53
- type: string;
54
- autocomplete: string;
55
- autofocusDelay: number;
56
- }>>, {
57
- inputRef: import("vue").Ref<HTMLInputElement | null, HTMLInputElement | null>;
58
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
59
- modelValue?: string | number | null;
60
- } & InputProps>, {
61
- type: string;
62
- autocomplete: string;
63
- autofocusDelay: number;
64
- }>>> & Readonly<{}>, {
65
- type: import("vue").InputTypeHTMLAttribute;
66
- autocomplete: string;
67
- autofocusDelay: number;
68
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<InputSlots> & InputSlots>;
69
- export default _default;
70
- type __VLS_WithDefaults<P, D> = {
71
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
72
- default: D[K];
73
- }> : P[K];
74
- };
75
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
76
- type __VLS_TypePropsToOption<T> = {
77
- [K in keyof T]-?: {} extends Pick<T, K> ? {
78
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
79
- } : {
80
- type: import('vue').PropType<T[K]>;
81
- required: true;
82
- };
83
- };
84
- type __VLS_WithTemplateSlots<T, S> = T & {
85
- new (): {
86
- $slots: S;
87
- };
50
+ declare const _default: <T extends AcceptableValue>(__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<{
51
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
52
+ readonly onBlur?: ((event: FocusEvent) => any) | undefined;
53
+ readonly onChange?: ((event: Event) => any) | undefined;
54
+ readonly "onUpdate:modelValue"?: ((payload: T) => any) | undefined;
55
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onBlur" | "onChange" | "onUpdate:modelValue"> & (InputProps & {
56
+ modelValue?: T;
57
+ }) & Partial<{}>> & import("vue").PublicProps;
58
+ expose(exposed: import("vue").ShallowUnwrapRef<{
59
+ inputRef: import("vue").Ref<HTMLInputElement | null, HTMLInputElement | null>;
60
+ }>): void;
61
+ attrs: any;
62
+ slots: InputSlots;
63
+ emit: InputEmits<T> & ((evt: "update:modelValue", value: T | undefined) => void);
64
+ }>) => import("vue").VNode & {
65
+ __ctx?: Awaited<typeof __VLS_setup>;
88
66
  };
67
+ export default _default;
89
68
  type __VLS_PrettifyLocal<T> = {
90
69
  [K in keyof T]: T[K];
91
70
  } & {};