@nuxt/ui 2.12.3 → 2.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/README.md +8 -8
  2. package/dist/module.d.mts +170 -40
  3. package/dist/module.d.ts +170 -40
  4. package/dist/module.json +2 -2
  5. package/dist/module.mjs +136 -146
  6. package/dist/runtime/components/data/Table.vue +16 -4
  7. package/dist/runtime/components/data/Table.vue.d.ts +21 -3
  8. package/dist/runtime/components/elements/Accordion.vue +11 -2
  9. package/dist/runtime/components/elements/Accordion.vue.d.ts +1 -1
  10. package/dist/runtime/components/elements/Alert.vue +2 -2
  11. package/dist/runtime/components/elements/Alert.vue.d.ts +4 -3
  12. package/dist/runtime/components/elements/Avatar.vue.d.ts +1 -1
  13. package/dist/runtime/components/elements/AvatarGroup.d.ts +1 -1
  14. package/dist/runtime/components/elements/Badge.vue.d.ts +2 -2
  15. package/dist/runtime/components/elements/Button.vue.d.ts +63 -37
  16. package/dist/runtime/components/elements/ButtonGroup.d.ts +1 -1
  17. package/dist/runtime/components/elements/Carousel.vue +156 -0
  18. package/dist/runtime/components/elements/Carousel.vue.d.ts +104 -0
  19. package/dist/runtime/components/elements/Chip.vue.d.ts +5 -5
  20. package/dist/runtime/components/elements/Dropdown.vue +5 -3
  21. package/dist/runtime/components/elements/Dropdown.vue.d.ts +7 -7
  22. package/dist/runtime/components/elements/Icon.vue.d.ts +1 -1
  23. package/dist/runtime/components/elements/Kbd.vue.d.ts +1 -1
  24. package/dist/runtime/components/elements/Link.vue +3 -3
  25. package/dist/runtime/components/elements/Link.vue.d.ts +62 -36
  26. package/dist/runtime/components/elements/Meter.vue +4 -0
  27. package/dist/runtime/components/elements/Meter.vue.d.ts +4 -4
  28. package/dist/runtime/components/elements/MeterGroup.d.ts +4 -4
  29. package/dist/runtime/components/elements/Progress.vue +4 -1
  30. package/dist/runtime/components/elements/Progress.vue.d.ts +8 -8
  31. package/dist/runtime/components/forms/Checkbox.vue +1 -6
  32. package/dist/runtime/components/forms/Checkbox.vue.d.ts +6 -15
  33. package/dist/runtime/components/forms/Form.vue +13 -6
  34. package/dist/runtime/components/forms/Form.vue.d.ts +1 -1
  35. package/dist/runtime/components/forms/FormGroup.vue +20 -17
  36. package/dist/runtime/components/forms/FormGroup.vue.d.ts +2 -2
  37. package/dist/runtime/components/forms/Input.vue +1 -0
  38. package/dist/runtime/components/forms/Input.vue.d.ts +6 -6
  39. package/dist/runtime/components/forms/InputMenu.vue +12 -1
  40. package/dist/runtime/components/forms/InputMenu.vue.d.ts +16 -7
  41. package/dist/runtime/components/forms/Radio.vue +5 -11
  42. package/dist/runtime/components/forms/Radio.vue.d.ts +6 -6
  43. package/dist/runtime/components/forms/RadioGroup.vue +1 -0
  44. package/dist/runtime/components/forms/RadioGroup.vue.d.ts +4 -4
  45. package/dist/runtime/components/forms/Range.vue.d.ts +4 -4
  46. package/dist/runtime/components/forms/Select.vue +5 -1
  47. package/dist/runtime/components/forms/Select.vue.d.ts +6 -6
  48. package/dist/runtime/components/forms/SelectMenu.vue +5 -2
  49. package/dist/runtime/components/forms/SelectMenu.vue.d.ts +7 -7
  50. package/dist/runtime/components/forms/Textarea.vue +5 -1
  51. package/dist/runtime/components/forms/Textarea.vue.d.ts +15 -6
  52. package/dist/runtime/components/forms/Toggle.vue +4 -2
  53. package/dist/runtime/components/forms/Toggle.vue.d.ts +6 -6
  54. package/dist/runtime/components/layout/Card.vue +1 -1
  55. package/dist/runtime/components/layout/Card.vue.d.ts +1 -1
  56. package/dist/runtime/components/layout/Container.vue.d.ts +1 -1
  57. package/dist/runtime/components/layout/Divider.vue +8 -1
  58. package/dist/runtime/components/layout/Divider.vue.d.ts +15 -4
  59. package/dist/runtime/components/layout/Skeleton.vue.d.ts +1 -1
  60. package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +1 -1
  61. package/dist/runtime/components/navigation/CommandPalette.vue +3 -1
  62. package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +2 -2
  63. package/dist/runtime/components/navigation/CommandPaletteGroup.vue +3 -1
  64. package/dist/runtime/components/navigation/CommandPaletteGroup.vue.d.ts +1 -1
  65. package/dist/runtime/components/navigation/HorizontalNavigation.vue +102 -0
  66. package/dist/runtime/components/navigation/HorizontalNavigation.vue.d.ts +44 -0
  67. package/dist/runtime/components/navigation/Pagination.vue.d.ts +3 -3
  68. package/dist/runtime/components/navigation/Tabs.vue +8 -8
  69. package/dist/runtime/components/navigation/Tabs.vue.d.ts +10 -1
  70. package/dist/runtime/components/navigation/VerticalNavigation.vue +12 -3
  71. package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +1 -1
  72. package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +3 -3
  73. package/dist/runtime/components/overlays/Modal.vue +9 -3
  74. package/dist/runtime/components/overlays/Modal.vue.d.ts +6 -5
  75. package/dist/runtime/components/overlays/Modals.client.vue +12 -0
  76. package/dist/runtime/components/overlays/Notification.vue +2 -2
  77. package/dist/runtime/components/overlays/Notification.vue.d.ts +4 -3
  78. package/dist/runtime/components/overlays/Notifications.vue.d.ts +1 -1
  79. package/dist/runtime/components/overlays/Popover.vue +5 -3
  80. package/dist/runtime/components/overlays/Popover.vue.d.ts +7 -7
  81. package/dist/runtime/components/overlays/Slideover.vue +9 -3
  82. package/dist/runtime/components/overlays/Slideover.vue.d.ts +6 -5
  83. package/dist/runtime/components/overlays/Tooltip.vue +2 -2
  84. package/dist/runtime/components/overlays/Tooltip.vue.d.ts +6 -6
  85. package/dist/runtime/composables/useCarouselScroll.d.ts +2 -0
  86. package/dist/runtime/composables/useCarouselScroll.mjs +35 -0
  87. package/dist/runtime/composables/useFormGroup.d.ts +1 -1
  88. package/dist/runtime/composables/useFormGroup.mjs +9 -12
  89. package/dist/runtime/composables/useModal.d.ts +12 -0
  90. package/dist/runtime/composables/useModal.mjs +37 -0
  91. package/dist/runtime/composables/usePopper.d.ts +3 -3
  92. package/dist/runtime/plugins/modals.d.ts +2 -0
  93. package/dist/runtime/plugins/modals.mjs +10 -0
  94. package/dist/runtime/types/component.d.ts +14 -0
  95. package/dist/runtime/types/divider.d.ts +3 -0
  96. package/dist/runtime/types/form.d.ts +2 -1
  97. package/dist/runtime/types/horizontal-navigation.d.ts +13 -0
  98. package/dist/runtime/types/index.d.ts +3 -0
  99. package/dist/runtime/types/modal.d.ts +18 -0
  100. package/dist/runtime/types/progress.d.ts +2 -0
  101. package/dist/runtime/types/range.d.ts +2 -0
  102. package/dist/runtime/types/toggle.d.ts +2 -0
  103. package/dist/runtime/types/vertical-navigation.d.ts +2 -1
  104. package/dist/runtime/ui.config/data/table.d.ts +7 -0
  105. package/dist/runtime/ui.config/data/table.mjs +10 -3
  106. package/dist/runtime/ui.config/elements/accordion.d.ts +1 -0
  107. package/dist/runtime/ui.config/elements/accordion.mjs +1 -0
  108. package/dist/runtime/ui.config/elements/carousel.d.ts +27 -0
  109. package/dist/runtime/ui.config/elements/carousel.mjs +26 -0
  110. package/dist/runtime/ui.config/elements/dropdown.d.ts +5 -1
  111. package/dist/runtime/ui.config/elements/dropdown.mjs +8 -4
  112. package/dist/runtime/ui.config/forms/formGroup.d.ts +1 -0
  113. package/dist/runtime/ui.config/forms/formGroup.mjs +1 -0
  114. package/dist/runtime/ui.config/forms/input.d.ts +11 -0
  115. package/dist/runtime/ui.config/forms/input.mjs +11 -0
  116. package/dist/runtime/ui.config/forms/inputMenu.d.ts +1 -1
  117. package/dist/runtime/ui.config/forms/inputMenu.mjs +5 -5
  118. package/dist/runtime/ui.config/forms/select.d.ts +11 -0
  119. package/dist/runtime/ui.config/forms/select.mjs +1 -1
  120. package/dist/runtime/ui.config/forms/selectMenu.d.ts +1 -1
  121. package/dist/runtime/ui.config/forms/textarea.d.ts +11 -0
  122. package/dist/runtime/ui.config/index.d.ts +2 -0
  123. package/dist/runtime/ui.config/index.mjs +2 -0
  124. package/dist/runtime/ui.config/layout/divider.d.ts +19 -2
  125. package/dist/runtime/ui.config/layout/divider.mjs +20 -3
  126. package/dist/runtime/ui.config/navigation/breadcrumb.mjs +4 -4
  127. package/dist/runtime/ui.config/navigation/commandPalette.d.ts +1 -1
  128. package/dist/runtime/ui.config/navigation/commandPalette.mjs +8 -8
  129. package/dist/runtime/ui.config/navigation/horizontalNavigation.d.ts +27 -0
  130. package/dist/runtime/ui.config/navigation/horizontalNavigation.mjs +26 -0
  131. package/dist/runtime/ui.config/navigation/verticalNavigation.d.ts +4 -3
  132. package/dist/runtime/ui.config/navigation/verticalNavigation.mjs +8 -7
  133. package/dist/runtime/ui.config/overlays/popover.d.ts +4 -0
  134. package/dist/runtime/ui.config/overlays/popover.mjs +4 -0
  135. package/dist/runtime/ui.config/overlays/slideover.mjs +2 -2
  136. package/dist/runtime/ui.config/overlays/tooltip.d.ts +4 -0
  137. package/dist/runtime/ui.config/overlays/tooltip.mjs +4 -0
  138. package/dist/runtime/ui.css +1 -1
  139. package/dist/runtime/utils/colors.d.ts +3 -0
  140. package/dist/runtime/utils/colors.mjs +261 -0
  141. package/dist/runtime/utils/index.mjs +9 -0
  142. package/dist/runtime/utils/link.d.ts +24 -11
  143. package/dist/runtime/utils/link.mjs +26 -13
  144. package/dist/types.d.mts +1 -1
  145. package/dist/types.d.ts +1 -1
  146. package/package.json +24 -22
  147. package/dist/runtime/utils/uid.d.ts +0 -1
  148. package/dist/runtime/utils/uid.mjs +0 -5
@@ -5,6 +5,7 @@
5
5
  :name="name"
6
6
  :model-value="modelValue"
7
7
  :disabled="disabled"
8
+ :nullable="nullable"
8
9
  as="div"
9
10
  :class="ui.wrapper"
10
11
  @update:model-value="onUpdate"
@@ -96,7 +97,8 @@ import {
96
97
  ComboboxButton as HComboboxButton,
97
98
  ComboboxOptions as HComboboxOptions,
98
99
  ComboboxOption as HComboboxOption,
99
- ComboboxInput as HComboboxInput
100
+ ComboboxInput as HComboboxInput,
101
+ provideUseId
100
102
  } from "@headlessui/vue";
101
103
  import { computedAsync, useDebounceFn } from "@vueuse/core";
102
104
  import { defu } from "defu";
@@ -110,6 +112,7 @@ import { get, mergeConfig } from "../../utils";
110
112
  import { useInjectButtonGroup } from "../../composables/useButtonGroup";
111
113
  import appConfig from "#build/app.config";
112
114
  import { input, inputMenu } from "#ui/ui.config";
115
+ import { useId } from "#imports";
113
116
  const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.input, input);
114
117
  const configMenu = mergeConfig(appConfig.ui.strategy, appConfig.ui.inputMenu, inputMenu);
115
118
  export default defineComponent({
@@ -188,6 +191,10 @@ export default defineComponent({
188
191
  type: Boolean,
189
192
  default: false
190
193
  },
194
+ nullable: {
195
+ type: Boolean,
196
+ default: false
197
+ },
191
198
  placeholder: {
192
199
  type: String,
193
200
  default: null
@@ -281,6 +288,9 @@ export default defineComponent({
281
288
  }
282
289
  });
283
290
  const label = computed(() => {
291
+ if (!props.modelValue) {
292
+ return;
293
+ }
284
294
  if (props.valueAttribute) {
285
295
  const option = props.options.find((option2) => option2[props.valueAttribute] === props.modelValue);
286
296
  return option ? option[props.optionAttribute] : null;
@@ -384,6 +394,7 @@ export default defineComponent({
384
394
  function onChange(event) {
385
395
  query.value = event.target.value;
386
396
  }
397
+ provideUseId(() => useId());
387
398
  return {
388
399
  // eslint-disable-next-line vue/no-dupe-keys
389
400
  ui,
@@ -68,6 +68,10 @@ declare const _default: import("vue").DefineComponent<{
68
68
  type: BooleanConstructor;
69
69
  default: boolean;
70
70
  };
71
+ nullable: {
72
+ type: BooleanConstructor;
73
+ default: boolean;
74
+ };
71
75
  placeholder: {
72
76
  type: StringConstructor;
73
77
  default: null;
@@ -138,7 +142,7 @@ declare const _default: import("vue").DefineComponent<{
138
142
  [x: string]: unknown;
139
143
  }, string>>;
140
144
  name: import("vue").ComputedRef<string | undefined>;
141
- inputId: import("vue").Ref<string | undefined>;
145
+ inputId: import("vue").ComputedRef<string | undefined>;
142
146
  popper: import("vue").ComputedRef<PopperOptions>;
143
147
  trigger: import("vue").Ref<import("@vueuse/core").MaybeElement>;
144
148
  container: import("vue").Ref<import("@vueuse/core").MaybeElement>;
@@ -156,7 +160,7 @@ declare const _default: import("vue").DefineComponent<{
156
160
  query: import("vue").WritableComputedRef<string>;
157
161
  onUpdate: (event: any) => void;
158
162
  onChange: (event: any) => void;
159
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "close" | "update:modelValue" | "open" | "update:query")[], "change" | "close" | "update:modelValue" | "open" | "update:query", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
163
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "close" | "update:modelValue" | "open" | "update:query")[], "change" | "close" | "update:modelValue" | "open" | "update:query", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
160
164
  modelValue: {
161
165
  type: (ObjectConstructor | NumberConstructor | StringConstructor | ArrayConstructor)[];
162
166
  default: string;
@@ -224,6 +228,10 @@ declare const _default: import("vue").DefineComponent<{
224
228
  type: BooleanConstructor;
225
229
  default: boolean;
226
230
  };
231
+ nullable: {
232
+ type: BooleanConstructor;
233
+ default: boolean;
234
+ };
227
235
  placeholder: {
228
236
  type: StringConstructor;
229
237
  default: null;
@@ -288,9 +296,9 @@ declare const _default: import("vue").DefineComponent<{
288
296
  default: () => {};
289
297
  };
290
298
  }>> & {
299
+ onClose?: ((...args: any[]) => any) | undefined;
291
300
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
292
301
  onChange?: ((...args: any[]) => any) | undefined;
293
- onClose?: ((...args: any[]) => any) | undefined;
294
302
  onOpen?: ((...args: any[]) => any) | undefined;
295
303
  "onUpdate:query"?: ((...args: any[]) => any) | undefined;
296
304
  }, {
@@ -299,6 +307,7 @@ declare const _default: import("vue").DefineComponent<{
299
307
  id: string;
300
308
  icon: string;
301
309
  color: any;
310
+ class: any;
302
311
  options: string[] | {
303
312
  [key: string]: any;
304
313
  disabled?: boolean | undefined;
@@ -307,20 +316,20 @@ declare const _default: import("vue").DefineComponent<{
307
316
  name: string;
308
317
  leading: boolean;
309
318
  search: (query: string) => Promise<any[]> | any[];
310
- class: any;
319
+ variant: InputVariant;
320
+ disabled: boolean;
311
321
  modelValue: string | number | unknown[] | Record<string, any>;
312
322
  by: string;
313
323
  loading: boolean;
314
- disabled: boolean;
315
- variant: InputVariant;
316
- required: boolean;
317
324
  placeholder: string;
318
325
  padded: boolean;
319
326
  loadingIcon: string;
320
327
  leadingIcon: string;
321
328
  trailingIcon: string;
322
329
  trailing: boolean;
330
+ required: boolean;
323
331
  inputClass: string;
332
+ nullable: boolean;
324
333
  query: string;
325
334
  selectedIcon: string;
326
335
  optionAttribute: string;
@@ -26,21 +26,20 @@
26
26
  </template>
27
27
 
28
28
  <script>
29
- import { computed, defineComponent, inject, toRef, onMounted, ref } from "vue";
29
+ import { computed, defineComponent, inject, toRef } from "vue";
30
30
  import { twMerge, twJoin } from "tailwind-merge";
31
31
  import { useUI } from "../../composables/useUI";
32
+ import { useFormGroup } from "../../composables/useFormGroup";
32
33
  import { mergeConfig } from "../../utils";
33
34
  import appConfig from "#build/app.config";
34
35
  import { radio } from "#ui/ui.config";
35
- import { uid } from "../../utils/uid";
36
- import { useFormGroup } from "../../composables/useFormGroup";
36
+ import { useId } from "#imports";
37
37
  const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.radio, radio);
38
38
  export default defineComponent({
39
- inheritAttrs: false,
40
39
  props: {
41
40
  id: {
42
41
  type: String,
43
- default: () => null
42
+ default: null
44
43
  },
45
44
  value: {
46
45
  type: [String, Number, Boolean],
@@ -93,14 +92,9 @@ export default defineComponent({
93
92
  emits: ["update:modelValue", "change"],
94
93
  setup(props, { emit }) {
95
94
  const { ui, attrs } = useUI("radio", toRef(props, "ui"), config, toRef(props, "class"));
95
+ const inputId = props.id ?? useId();
96
96
  const radioGroup = inject("radio-group", null);
97
97
  const { emitFormChange, color, name } = radioGroup ?? useFormGroup(props, config);
98
- const inputId = ref(props.id);
99
- onMounted(() => {
100
- if (!inputId.value) {
101
- inputId.value = uid();
102
- }
103
- });
104
98
  const pick = computed({
105
99
  get() {
106
100
  return props.modelValue;
@@ -2,7 +2,7 @@ import type { PropType } from 'vue';
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  id: {
4
4
  type: StringConstructor;
5
- default: () => null;
5
+ default: null;
6
6
  };
7
7
  value: {
8
8
  type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
@@ -50,7 +50,7 @@ declare const _default: import("vue").DefineComponent<{
50
50
  default: () => {};
51
51
  };
52
52
  }, {
53
- inputId: import("vue").Ref<string>;
53
+ inputId: string;
54
54
  ui: import("vue").ComputedRef<any>;
55
55
  attrs: import("vue").ComputedRef<Pick<{
56
56
  [x: string]: unknown;
@@ -58,10 +58,10 @@ declare const _default: import("vue").DefineComponent<{
58
58
  pick: import("vue").WritableComputedRef<string | number | boolean | Record<string, any>>;
59
59
  name: import("vue").ComputedRef<string | undefined>;
60
60
  inputClass: import("vue").ComputedRef<string>;
61
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
61
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
62
62
  id: {
63
63
  type: StringConstructor;
64
- default: () => null;
64
+ default: null;
65
65
  };
66
66
  value: {
67
67
  type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
@@ -116,11 +116,11 @@ declare const _default: import("vue").DefineComponent<{
116
116
  value: string | number | boolean;
117
117
  id: string;
118
118
  color: any;
119
- name: string;
120
119
  class: any;
120
+ name: string;
121
121
  label: string;
122
- modelValue: string | number | boolean | Record<string, any>;
123
122
  disabled: boolean;
123
+ modelValue: string | number | boolean | Record<string, any>;
124
124
  required: boolean;
125
125
  help: string;
126
126
  inputClass: string;
@@ -12,6 +12,7 @@
12
12
  :label="option.label"
13
13
  :model-value="modelValue"
14
14
  :value="option.value"
15
+ :help="option.help"
15
16
  :disabled="option.disabled || disabled"
16
17
  :ui="uiRadio"
17
18
  @change="onUpdate(option.value)"
@@ -53,7 +53,7 @@ declare const _default: import("vue").DefineComponent<{
53
53
  }, string>>;
54
54
  normalizedOptions: import("vue").ComputedRef<any[]>;
55
55
  onUpdate: (value: any) => void;
56
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
56
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
57
57
  modelValue: {
58
58
  type: (ObjectConstructor | NumberConstructor | StringConstructor)[];
59
59
  default: string;
@@ -105,12 +105,12 @@ declare const _default: import("vue").DefineComponent<{
105
105
  }, {
106
106
  ui: any;
107
107
  color: any;
108
- legend: string;
108
+ class: any;
109
109
  options: unknown[];
110
110
  name: string;
111
- class: any;
112
- modelValue: string | number | Record<string, any>;
111
+ legend: string;
113
112
  disabled: boolean;
113
+ modelValue: string | number | Record<string, any>;
114
114
  optionAttribute: string;
115
115
  valueAttribute: string;
116
116
  uiRadio: any;
@@ -57,7 +57,7 @@ declare const _default: import("vue").DefineComponent<{
57
57
  [x: string]: unknown;
58
58
  }, string>>;
59
59
  name: import("vue").ComputedRef<string | undefined>;
60
- inputId: import("vue").Ref<string | undefined>;
60
+ inputId: import("vue").ComputedRef<string | undefined>;
61
61
  value: import("vue").WritableComputedRef<number>;
62
62
  wrapperClass: import("vue").ComputedRef<string>;
63
63
  inputClass: import("vue").ComputedRef<string>;
@@ -68,7 +68,7 @@ declare const _default: import("vue").DefineComponent<{
68
68
  width: string;
69
69
  }>;
70
70
  onChange: (event: Event) => void;
71
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
71
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
72
72
  modelValue: {
73
73
  type: NumberConstructor;
74
74
  default: number;
@@ -127,10 +127,10 @@ declare const _default: import("vue").DefineComponent<{
127
127
  ui: any;
128
128
  id: string;
129
129
  color: any;
130
- name: string;
131
130
  class: any;
132
- modelValue: number;
131
+ name: string;
133
132
  disabled: boolean;
133
+ modelValue: number;
134
134
  max: number;
135
135
  min: number;
136
136
  inputClass: string;
@@ -241,7 +241,7 @@ export default defineComponent({
241
241
  variant?.replaceAll("{color}", color.value),
242
242
  (isLeading.value || slots.leading) && ui.value.leading.padding[size.value],
243
243
  (isTrailing.value || slots.trailing) && ui.value.trailing.padding[size.value]
244
- ), props.selectClass);
244
+ ), props.placeholder && !props.modelValue && ui.value.placeholder, props.selectClass);
245
245
  });
246
246
  const isLeading = computed(() => {
247
247
  return props.icon && props.leading || props.icon && !props.trailing || props.loading && !props.trailing || props.leadingIcon;
@@ -316,3 +316,7 @@ export default defineComponent({
316
316
  }
317
317
  });
318
318
  </script>
319
+
320
+ <style scoped>
321
+ .form-select{background-image:none}
322
+ </style>
@@ -102,7 +102,7 @@ declare const _default: import("vue").DefineComponent<{
102
102
  [x: string]: unknown;
103
103
  }, string>>;
104
104
  name: ComputedRef<string | undefined>;
105
- inputId: import("vue").Ref<string | undefined>;
105
+ inputId: ComputedRef<string | undefined>;
106
106
  normalizedOptionsWithPlaceholder: ComputedRef<{
107
107
  disabled?: boolean | undefined;
108
108
  children: {
@@ -121,7 +121,7 @@ declare const _default: import("vue").DefineComponent<{
121
121
  trailingWrapperIconClass: ComputedRef<string>;
122
122
  onInput: (event: Event) => void;
123
123
  onChange: (event: Event) => void;
124
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
124
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
125
125
  modelValue: {
126
126
  type: (ObjectConstructor | NumberConstructor | StringConstructor)[];
127
127
  default: string;
@@ -226,21 +226,21 @@ declare const _default: import("vue").DefineComponent<{
226
226
  id: string;
227
227
  icon: string;
228
228
  color: any;
229
+ class: any;
229
230
  options: unknown[];
230
231
  name: string;
231
232
  leading: boolean;
232
- class: any;
233
+ variant: SelectVariant;
234
+ disabled: boolean;
233
235
  modelValue: string | number | Record<string, any>;
234
236
  loading: boolean;
235
- disabled: boolean;
236
- variant: SelectVariant;
237
- required: boolean;
238
237
  placeholder: string;
239
238
  padded: boolean;
240
239
  loadingIcon: string;
241
240
  leadingIcon: string;
242
241
  trailingIcon: string;
243
242
  trailing: boolean;
243
+ required: boolean;
244
244
  optionAttribute: string;
245
245
  valueAttribute: string;
246
246
  selectClass: string;
@@ -133,7 +133,8 @@ import {
133
133
  Listbox as HListbox,
134
134
  ListboxButton as HListboxButton,
135
135
  ListboxOptions as HListboxOptions,
136
- ListboxOption as HListboxOption
136
+ ListboxOption as HListboxOption,
137
+ provideUseId
137
138
  } from "@headlessui/vue";
138
139
  import { computedAsync, useDebounceFn } from "@vueuse/core";
139
140
  import { defu } from "defu";
@@ -147,6 +148,7 @@ import { get, mergeConfig } from "../../utils";
147
148
  import { useInjectButtonGroup } from "../../composables/useButtonGroup";
148
149
  import appConfig from "#build/app.config";
149
150
  import { select, selectMenu } from "#ui/ui.config";
151
+ import { useId } from "#imports";
150
152
  const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.select, select);
151
153
  const configMenu = mergeConfig(appConfig.ui.strategy, appConfig.ui.selectMenu, selectMenu);
152
154
  export default defineComponent({
@@ -369,7 +371,7 @@ export default defineComponent({
369
371
  variant?.replaceAll("{color}", color.value),
370
372
  (isLeading.value || slots.leading) && ui.value.leading.padding[size.value],
371
373
  (isTrailing.value || slots.trailing) && ui.value.trailing.padding[size.value]
372
- ), props.selectClass);
374
+ ), props.placeholder && !props.modelValue && ui.value.placeholder, props.selectClass);
373
375
  });
374
376
  const isLeading = computed(() => {
375
377
  return props.icon && props.leading || props.icon && !props.trailing || props.loading && !props.trailing || props.leadingIcon;
@@ -474,6 +476,7 @@ export default defineComponent({
474
476
  function onChange(event) {
475
477
  query.value = event.target.value;
476
478
  }
479
+ provideUseId(() => useId());
477
480
  return {
478
481
  // eslint-disable-next-line vue/no-dupe-keys
479
482
  ui,
@@ -158,7 +158,7 @@ declare const _default: import("vue").DefineComponent<{
158
158
  [x: string]: unknown;
159
159
  }, string>>;
160
160
  name: import("vue").ComputedRef<string | undefined>;
161
- inputId: import("vue").Ref<string | undefined>;
161
+ inputId: import("vue").ComputedRef<string | undefined>;
162
162
  popper: import("vue").ComputedRef<PopperOptions>;
163
163
  trigger: import("vue").Ref<import("@vueuse/core").MaybeElement>;
164
164
  container: import("vue").Ref<import("@vueuse/core").MaybeElement>;
@@ -179,7 +179,7 @@ declare const _default: import("vue").DefineComponent<{
179
179
  query: import("vue").WritableComputedRef<string>;
180
180
  onUpdate: (event: any) => void;
181
181
  onChange: (event: any) => void;
182
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "close" | "update:modelValue" | "open" | "update:query")[], "change" | "close" | "update:modelValue" | "open" | "update:query", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
182
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "close" | "update:modelValue" | "open" | "update:query")[], "change" | "close" | "update:modelValue" | "open" | "update:query", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
183
183
  modelValue: {
184
184
  type: (ObjectConstructor | NumberConstructor | StringConstructor | ArrayConstructor)[];
185
185
  default: string;
@@ -331,9 +331,9 @@ declare const _default: import("vue").DefineComponent<{
331
331
  default: () => {};
332
332
  };
333
333
  }>> & {
334
+ onClose?: ((...args: any[]) => any) | undefined;
334
335
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
335
336
  onChange?: ((...args: any[]) => any) | undefined;
336
- onClose?: ((...args: any[]) => any) | undefined;
337
337
  onOpen?: ((...args: any[]) => any) | undefined;
338
338
  "onUpdate:query"?: ((...args: any[]) => any) | undefined;
339
339
  }, {
@@ -342,6 +342,7 @@ declare const _default: import("vue").DefineComponent<{
342
342
  id: string;
343
343
  icon: string;
344
344
  color: any;
345
+ class: any;
345
346
  options: string[] | {
346
347
  [key: string]: any;
347
348
  disabled?: boolean | undefined;
@@ -349,20 +350,19 @@ declare const _default: import("vue").DefineComponent<{
349
350
  popper: PopperOptions;
350
351
  name: string;
351
352
  leading: boolean;
352
- class: any;
353
+ variant: SelectVariant;
354
+ disabled: boolean;
353
355
  modelValue: string | number | unknown[] | Record<string, any>;
354
356
  by: string;
355
357
  loading: boolean;
356
- disabled: boolean;
357
358
  multiple: boolean;
358
- variant: SelectVariant;
359
- required: boolean;
360
359
  placeholder: string;
361
360
  padded: boolean;
362
361
  loadingIcon: string;
363
362
  leadingIcon: string;
364
363
  trailingIcon: string;
365
364
  trailing: boolean;
365
+ required: boolean;
366
366
  query: string;
367
367
  selectedIcon: string;
368
368
  optionAttribute: string;
@@ -61,6 +61,10 @@ export default defineComponent({
61
61
  type: Number,
62
62
  default: 3
63
63
  },
64
+ maxrows: {
65
+ type: Number,
66
+ default: 0
67
+ },
64
68
  autoresize: {
65
69
  type: Boolean,
66
70
  default: false
@@ -147,7 +151,7 @@ export default defineComponent({
147
151
  const { scrollHeight } = textarea2.value;
148
152
  const newRows = (scrollHeight - padding) / lineHeight;
149
153
  if (newRows > props.rows) {
150
- textarea2.value.rows = newRows;
154
+ textarea2.value.rows = props.maxrows ? Math.min(newRows, props.maxrows) : newRows;
151
155
  }
152
156
  }
153
157
  };
@@ -29,6 +29,10 @@ declare const _default: import("vue").DefineComponent<{
29
29
  type: NumberConstructor;
30
30
  default: number;
31
31
  };
32
+ maxrows: {
33
+ type: NumberConstructor;
34
+ default: number;
35
+ };
32
36
  autoresize: {
33
37
  type: BooleanConstructor;
34
38
  default: boolean;
@@ -90,13 +94,13 @@ declare const _default: import("vue").DefineComponent<{
90
94
  [x: string]: unknown;
91
95
  }, string>>;
92
96
  name: import("vue").ComputedRef<string | undefined>;
93
- inputId: import("vue").Ref<string | undefined>;
97
+ inputId: import("vue").ComputedRef<string | undefined>;
94
98
  textarea: import("vue").Ref<HTMLTextAreaElement | null>;
95
99
  textareaClass: import("vue").ComputedRef<string>;
96
100
  onInput: (event: Event) => void;
97
101
  onChange: (event: Event) => void;
98
102
  onBlur: (event: FocusEvent) => void;
99
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "update:modelValue")[], "blur" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
103
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "update:modelValue")[], "blur" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
100
104
  modelValue: {
101
105
  type: (NumberConstructor | StringConstructor)[];
102
106
  default: string;
@@ -125,6 +129,10 @@ declare const _default: import("vue").DefineComponent<{
125
129
  type: NumberConstructor;
126
130
  default: number;
127
131
  };
132
+ maxrows: {
133
+ type: NumberConstructor;
134
+ default: number;
135
+ };
128
136
  autoresize: {
129
137
  type: BooleanConstructor;
130
138
  default: boolean;
@@ -189,15 +197,15 @@ declare const _default: import("vue").DefineComponent<{
189
197
  ui: any;
190
198
  id: string;
191
199
  color: any;
192
- name: string;
193
200
  class: any;
201
+ name: string;
202
+ variant: TextareaVariant;
203
+ disabled: boolean;
194
204
  modelValue: string | number;
195
205
  rows: number;
196
- disabled: boolean;
197
- variant: TextareaVariant;
198
- required: boolean;
199
206
  placeholder: string;
200
207
  padded: boolean;
208
+ required: boolean;
201
209
  autofocus: boolean;
202
210
  autofocusDelay: number;
203
211
  modelModifiers: {
@@ -205,6 +213,7 @@ declare const _default: import("vue").DefineComponent<{
205
213
  lazy?: boolean | undefined;
206
214
  number?: boolean | undefined;
207
215
  };
216
+ maxrows: number;
208
217
  autoresize: boolean;
209
218
  textareaClass: string;
210
219
  }, {}>;
@@ -20,7 +20,7 @@
20
20
 
21
21
  <script>
22
22
  import { computed, toRef, defineComponent } from "vue";
23
- import { Switch as HSwitch } from "@headlessui/vue";
23
+ import { Switch as HSwitch, provideUseId } from "@headlessui/vue";
24
24
  import { twMerge, twJoin } from "tailwind-merge";
25
25
  import UIcon from "../elements/Icon.vue";
26
26
  import { useUI } from "../../composables/useUI";
@@ -28,6 +28,7 @@ import { useFormGroup } from "../../composables/useFormGroup";
28
28
  import { mergeConfig } from "../../utils";
29
29
  import appConfig from "#build/app.config";
30
30
  import { toggle } from "#ui/ui.config";
31
+ import { useId } from "#imports";
31
32
  const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.toggle, toggle);
32
33
  export default defineComponent({
33
34
  components: {
@@ -69,7 +70,7 @@ export default defineComponent({
69
70
  },
70
71
  size: {
71
72
  type: String,
72
- default: config.default.size,
73
+ default: () => config.default.size,
73
74
  validator(value) {
74
75
  return Object.keys(config.size).includes(value);
75
76
  }
@@ -124,6 +125,7 @@ export default defineComponent({
124
125
  color.value && ui.value.icon.off.replaceAll("{color}", color.value)
125
126
  );
126
127
  });
128
+ provideUseId(() => useId());
127
129
  return {
128
130
  // eslint-disable-next-line vue/no-dupe-keys
129
131
  ui,
@@ -32,7 +32,7 @@ declare const _default: import("vue").DefineComponent<{
32
32
  };
33
33
  size: {
34
34
  type: PropType<ToggleSize>;
35
- default: any;
35
+ default: () => any;
36
36
  validator(value: string): boolean;
37
37
  };
38
38
  class: {
@@ -49,13 +49,13 @@ declare const _default: import("vue").DefineComponent<{
49
49
  [x: string]: unknown;
50
50
  }, string>>;
51
51
  name: import("vue").ComputedRef<string | undefined>;
52
- inputId: import("vue").Ref<string | undefined>;
52
+ inputId: import("vue").ComputedRef<string | undefined>;
53
53
  active: import("vue").WritableComputedRef<boolean>;
54
54
  switchClass: import("vue").ComputedRef<string>;
55
55
  containerClass: import("vue").ComputedRef<string>;
56
56
  onIconClass: import("vue").ComputedRef<string>;
57
57
  offIconClass: import("vue").ComputedRef<string>;
58
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
58
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
59
59
  id: {
60
60
  type: StringConstructor;
61
61
  default: null;
@@ -87,7 +87,7 @@ declare const _default: import("vue").DefineComponent<{
87
87
  };
88
88
  size: {
89
89
  type: PropType<ToggleSize>;
90
- default: any;
90
+ default: () => any;
91
91
  validator(value: string): boolean;
92
92
  };
93
93
  class: {
@@ -106,10 +106,10 @@ declare const _default: import("vue").DefineComponent<{
106
106
  ui: any;
107
107
  id: string;
108
108
  color: any;
109
- name: string;
110
109
  class: any;
111
- modelValue: boolean;
110
+ name: string;
112
111
  disabled: boolean;
112
+ modelValue: boolean;
113
113
  onIcon: string;
114
114
  offIcon: string;
115
115
  }, {}>;
@@ -7,7 +7,7 @@
7
7
  <div v-if="$slots.header" :class="[ui.header.base, ui.header.padding, ui.header.background]">
8
8
  <slot name="header" />
9
9
  </div>
10
- <div :class="[ui.body.base, ui.body.padding, ui.body.background]">
10
+ <div v-if="$slots.default" :class="[ui.body.base, ui.body.padding, ui.body.background]">
11
11
  <slot />
12
12
  </div>
13
13
  <div v-if="$slots.footer" :class="[ui.footer.base, ui.footer.padding, ui.footer.background]">
@@ -18,7 +18,7 @@ declare const _default: import("vue").DefineComponent<{
18
18
  [x: string]: unknown;
19
19
  }, string>>;
20
20
  cardClass: import("vue").ComputedRef<string>;
21
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
21
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
22
22
  as: {
23
23
  type: StringConstructor;
24
24
  default: string;
@@ -18,7 +18,7 @@ declare const _default: import("vue").DefineComponent<{
18
18
  [x: string]: unknown;
19
19
  }, string>>;
20
20
  containerClass: import("vue").ComputedRef<string>;
21
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
21
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
22
22
  as: {
23
23
  type: StringConstructor;
24
24
  default: string;