@nuxt/ui 4.8.0 → 4.8.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 (50) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +2 -2
  3. package/dist/runtime/components/Calendar.d.vue.ts +2 -2
  4. package/dist/runtime/components/Calendar.vue +2 -1
  5. package/dist/runtime/components/Calendar.vue.d.ts +2 -2
  6. package/dist/runtime/components/DashboardSearch.d.vue.ts +1 -1
  7. package/dist/runtime/components/DashboardSearch.vue +12 -1
  8. package/dist/runtime/components/DashboardSearch.vue.d.ts +1 -1
  9. package/dist/runtime/components/EditorDragHandle.vue +1 -0
  10. package/dist/runtime/components/Form.d.vue.ts +3 -3
  11. package/dist/runtime/components/Form.vue +3 -1
  12. package/dist/runtime/components/Form.vue.d.ts +3 -3
  13. package/dist/runtime/components/Icon.vue +2 -1
  14. package/dist/runtime/components/InputDate.d.vue.ts +2 -2
  15. package/dist/runtime/components/InputDate.vue +1 -0
  16. package/dist/runtime/components/InputDate.vue.d.ts +2 -2
  17. package/dist/runtime/components/InputMenu.vue +12 -1
  18. package/dist/runtime/components/InputNumber.d.vue.ts +1 -1
  19. package/dist/runtime/components/InputNumber.vue +3 -2
  20. package/dist/runtime/components/InputNumber.vue.d.ts +1 -1
  21. package/dist/runtime/components/InputTime.d.vue.ts +2 -2
  22. package/dist/runtime/components/InputTime.vue +1 -0
  23. package/dist/runtime/components/InputTime.vue.d.ts +2 -2
  24. package/dist/runtime/components/Link.d.vue.ts +1 -1
  25. package/dist/runtime/components/Link.vue.d.ts +1 -1
  26. package/dist/runtime/components/LinkBase.d.vue.ts +2 -2
  27. package/dist/runtime/components/LinkBase.vue +1 -1
  28. package/dist/runtime/components/LinkBase.vue.d.ts +2 -2
  29. package/dist/runtime/components/SelectMenu.vue +12 -1
  30. package/dist/runtime/components/Toast.d.vue.ts +8 -1
  31. package/dist/runtime/components/Toast.vue +5 -5
  32. package/dist/runtime/components/Toast.vue.d.ts +8 -1
  33. package/dist/runtime/components/content/ContentSearch.d.vue.ts +1 -1
  34. package/dist/runtime/components/content/ContentSearch.vue +12 -1
  35. package/dist/runtime/components/content/ContentSearch.vue.d.ts +1 -1
  36. package/dist/runtime/locale/th.js +6 -6
  37. package/dist/runtime/types/tv.d.ts +13 -7
  38. package/dist/runtime/types/utils.d.ts +3 -0
  39. package/dist/runtime/vue/overrides/inertia/Link.d.vue.ts +1 -1
  40. package/dist/runtime/vue/overrides/inertia/Link.vue.d.ts +1 -1
  41. package/dist/runtime/vue/overrides/inertia/LinkBase.d.vue.ts +1 -1
  42. package/dist/runtime/vue/overrides/inertia/LinkBase.vue.d.ts +1 -1
  43. package/dist/runtime/vue/overrides/none/Link.d.vue.ts +1 -1
  44. package/dist/runtime/vue/overrides/none/Link.vue.d.ts +1 -1
  45. package/dist/runtime/vue/overrides/vue-router/Link.d.vue.ts +1 -1
  46. package/dist/runtime/vue/overrides/vue-router/Link.vue.d.ts +1 -1
  47. package/dist/shared/{ui.CoJ8bnb0.mjs → ui.C-lVg1QQ.mjs} +9 -4
  48. package/dist/unplugin.mjs +1 -1
  49. package/dist/vite.mjs +1 -1
  50. package/package.json +36 -36
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/ui",
3
- "version": "4.8.0",
3
+ "version": "4.8.2",
4
4
  "docs": "https://ui.nuxt.com/docs/getting-started/installation/nuxt",
5
5
  "configKey": "ui",
6
6
  "compatibility": {
package/dist/module.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defu } from 'defu';
2
2
  import { defineNuxtModule, createResolver, addPlugin, hasNuxtModule, addComponentsDir, addImportsDir, addImports } from '@nuxt/kit';
3
- import { d as defaultOptions, r as resolveColors, g as getDefaultConfig, p as publicComposables, a as addTemplates } from './shared/ui.CoJ8bnb0.mjs';
3
+ import { d as defaultOptions, r as resolveColors, g as getDefaultConfig, p as publicComposables, a as addTemplates } from './shared/ui.C-lVg1QQ.mjs';
4
4
  import '../dist/runtime/utils/index.js';
5
5
  import 'node:url';
6
6
  import 'scule';
@@ -11,7 +11,7 @@ import 'pathe';
11
11
  import 'tinyglobby';
12
12
 
13
13
  const name = "@nuxt/ui";
14
- const version = "4.8.0";
14
+ const version = "4.8.2";
15
15
 
16
16
  const module$1 = defineNuxtModule({
17
17
  meta: {
@@ -8,8 +8,8 @@ import type { ComponentConfig } from '../types/tv';
8
8
  type Calendar = ComponentConfig<typeof theme, AppConfig, 'calendar'>;
9
9
  type CalendarDefaultValue<R extends boolean = false, M extends boolean = false> = R extends true ? DateRange : M extends true ? DateValue[] : DateValue;
10
10
  type CalendarModelValue<R extends boolean = false, M extends boolean = false> = R extends true ? (DateRange | null) : M extends true ? (DateValue[] | undefined) : (DateValue | undefined);
11
- type _CalendarRootProps = Omit<CalendarRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'locale' | 'calendarLabel' | 'multiple'>;
12
- type _RangeCalendarRootProps = Omit<RangeCalendarRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'locale' | 'calendarLabel' | 'multiple'>;
11
+ type _CalendarRootProps = Omit<CalendarRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'calendarLabel' | 'multiple'>;
12
+ type _RangeCalendarRootProps = Omit<RangeCalendarRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'calendarLabel' | 'multiple'>;
13
13
  export interface CalendarProps<R extends boolean = false, M extends boolean = false> extends _RangeCalendarRootProps, _CalendarRootProps {
14
14
  /**
15
15
  * The element or component this component should render as.
@@ -47,6 +47,7 @@ const _props = defineProps({
47
47
  fixedWeeks: { type: Boolean, required: false, default: true },
48
48
  maxValue: { type: Object, required: false },
49
49
  minValue: { type: Object, required: false },
50
+ locale: { type: String, required: false },
50
51
  numberOfMonths: { type: Number, required: false },
51
52
  disabled: { type: Boolean, required: false },
52
53
  readonly: { type: Boolean, required: false },
@@ -146,7 +147,7 @@ const Calendar = computed(() => props.range ? RangeCalendar : SingleCalendar);
146
147
  data-slot="cellWeek"
147
148
  :class="ui.cellWeek({ class: props.ui?.cellWeek })"
148
149
  >
149
- {{ getWeekNumber(weekDates[0], locale.code) }}
150
+ {{ getWeekNumber(weekDates[0], props.locale ?? locale.code) }}
150
151
  </td>
151
152
  <Calendar.Cell
152
153
  v-for="weekDate in weekDates"
@@ -8,8 +8,8 @@ import type { ComponentConfig } from '../types/tv';
8
8
  type Calendar = ComponentConfig<typeof theme, AppConfig, 'calendar'>;
9
9
  type CalendarDefaultValue<R extends boolean = false, M extends boolean = false> = R extends true ? DateRange : M extends true ? DateValue[] : DateValue;
10
10
  type CalendarModelValue<R extends boolean = false, M extends boolean = false> = R extends true ? (DateRange | null) : M extends true ? (DateValue[] | undefined) : (DateValue | undefined);
11
- type _CalendarRootProps = Omit<CalendarRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'locale' | 'calendarLabel' | 'multiple'>;
12
- type _RangeCalendarRootProps = Omit<RangeCalendarRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'locale' | 'calendarLabel' | 'multiple'>;
11
+ type _CalendarRootProps = Omit<CalendarRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'calendarLabel' | 'multiple'>;
12
+ type _RangeCalendarRootProps = Omit<RangeCalendarRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'calendarLabel' | 'multiple'>;
13
13
  export interface CalendarProps<R extends boolean = false, M extends boolean = false> extends _RangeCalendarRootProps, _CalendarRootProps {
14
14
  /**
15
15
  * The element or component this component should render as.
@@ -5,7 +5,7 @@ import type { UseFuseOptions } from '@vueuse/integrations/useFuse';
5
5
  import type { ButtonProps, ModalProps, CommandPaletteProps, CommandPaletteSlots, CommandPaletteGroup, CommandPaletteItem, LinkPropsKeys } from '../types';
6
6
  import type { ComponentConfig } from '../types/tv';
7
7
  type DashboardSearch = ComponentConfig<typeof theme, AppConfig, 'dashboardSearch'>;
8
- export interface DashboardSearchProps<T extends CommandPaletteItem = CommandPaletteItem> extends Pick<ModalProps, 'title' | 'description' | 'overlay' | 'transition' | 'content' | 'dismissible' | 'fullscreen' | 'modal' | 'portal'>, Pick<CommandPaletteProps<CommandPaletteGroup<T>, T>, 'icon' | 'placeholder' | 'autofocus' | 'loading' | 'loadingIcon' | 'closeIcon' | 'groups'> {
8
+ export interface DashboardSearchProps<T extends CommandPaletteItem = CommandPaletteItem> extends Pick<ModalProps, 'title' | 'description' | 'overlay' | 'transition' | 'content' | 'dismissible' | 'fullscreen' | 'modal' | 'portal'>, Pick<CommandPaletteProps<CommandPaletteGroup<T>, T>, 'icon' | 'trailingIcon' | 'selectedIcon' | 'childrenIcon' | 'placeholder' | 'autofocus' | 'loading' | 'loadingIcon' | 'closeIcon' | 'back' | 'backIcon' | 'disabled' | 'highlightOnHover' | 'labelKey' | 'descriptionKey' | 'preserveGroupOrder' | 'virtualize' | 'groups'> {
9
9
  /**
10
10
  * @defaultValue 'md'
11
11
  */
@@ -33,11 +33,22 @@ const _props = defineProps({
33
33
  modal: { type: Boolean, required: false },
34
34
  portal: { type: [Boolean, String], required: false, skipCheck: true },
35
35
  icon: { type: null, required: false },
36
+ trailingIcon: { type: null, required: false },
37
+ selectedIcon: { type: null, required: false },
38
+ childrenIcon: { type: null, required: false },
36
39
  placeholder: { type: String, required: false },
37
40
  autofocus: { type: Boolean, required: false },
38
41
  loading: { type: Boolean, required: false },
39
42
  loadingIcon: { type: null, required: false },
40
43
  closeIcon: { type: null, required: false },
44
+ back: { type: [Boolean, Object], required: false },
45
+ backIcon: { type: null, required: false },
46
+ disabled: { type: Boolean, required: false },
47
+ highlightOnHover: { type: Boolean, required: false },
48
+ labelKey: { type: null, required: false },
49
+ descriptionKey: { type: null, required: false },
50
+ preserveGroupOrder: { type: Boolean, required: false },
51
+ virtualize: { type: [Boolean, Object], required: false },
41
52
  groups: { type: Array, required: false }
42
53
  });
43
54
  const slots = defineSlots();
@@ -50,7 +61,7 @@ useRuntimeHook("dashboard:search:toggle", () => {
50
61
  const { t } = useLocale();
51
62
  const colorMode = useColorMode();
52
63
  const appConfig = useAppConfig();
53
- const commandPaletteProps = useForwardProps(reactivePick(props, "size", "icon", "placeholder", "autofocus", "loading", "loadingIcon", "close", "closeIcon", "searchDelay"));
64
+ const commandPaletteProps = useForwardProps(reactivePick(props, "size", "icon", "trailingIcon", "selectedIcon", "childrenIcon", "placeholder", "autofocus", "loading", "loadingIcon", "close", "closeIcon", "back", "backIcon", "disabled", "highlightOnHover", "labelKey", "descriptionKey", "preserveGroupOrder", "virtualize", "searchDelay"));
54
65
  const modalProps = useForwardProps(reactivePick(props, "overlay", "transition", "content", "dismissible", "fullscreen", "modal", "portal"));
55
66
  const getProxySlots = () => omit(slots, ["content"]);
56
67
  const fuse = computed(() => defu({}, props.fuse, {
@@ -5,7 +5,7 @@ import type { UseFuseOptions } from '@vueuse/integrations/useFuse';
5
5
  import type { ButtonProps, ModalProps, CommandPaletteProps, CommandPaletteSlots, CommandPaletteGroup, CommandPaletteItem, LinkPropsKeys } from '../types';
6
6
  import type { ComponentConfig } from '../types/tv';
7
7
  type DashboardSearch = ComponentConfig<typeof theme, AppConfig, 'dashboardSearch'>;
8
- export interface DashboardSearchProps<T extends CommandPaletteItem = CommandPaletteItem> extends Pick<ModalProps, 'title' | 'description' | 'overlay' | 'transition' | 'content' | 'dismissible' | 'fullscreen' | 'modal' | 'portal'>, Pick<CommandPaletteProps<CommandPaletteGroup<T>, T>, 'icon' | 'placeholder' | 'autofocus' | 'loading' | 'loadingIcon' | 'closeIcon' | 'groups'> {
8
+ export interface DashboardSearchProps<T extends CommandPaletteItem = CommandPaletteItem> extends Pick<ModalProps, 'title' | 'description' | 'overlay' | 'transition' | 'content' | 'dismissible' | 'fullscreen' | 'modal' | 'portal'>, Pick<CommandPaletteProps<CommandPaletteGroup<T>, T>, 'icon' | 'trailingIcon' | 'selectedIcon' | 'childrenIcon' | 'placeholder' | 'autofocus' | 'loading' | 'loadingIcon' | 'closeIcon' | 'back' | 'backIcon' | 'disabled' | 'highlightOnHover' | 'labelKey' | 'descriptionKey' | 'preserveGroupOrder' | 'virtualize' | 'groups'> {
9
9
  /**
10
10
  * @defaultValue 'md'
11
11
  */
@@ -27,6 +27,7 @@ const _props = defineProps({
27
27
  onElementDragStart: { type: Function, required: false },
28
28
  onElementDragEnd: { type: Function, required: false },
29
29
  getReferencedVirtualElement: { type: Function, required: false },
30
+ dragImageProperties: { type: Array, required: false },
30
31
  nested: { type: [Boolean, Object], required: false },
31
32
  label: { type: String, required: false },
32
33
  activeColor: { type: null, required: false },
@@ -22,10 +22,10 @@ export type FormProps<S extends FormSchema, T extends boolean = true, N extends
22
22
  /** Disable all inputs inside the form. */
23
23
  disabled?: boolean;
24
24
  /**
25
- * Path of the form's state within it's parent form.
26
- * Used for nesting forms. Only available if `nested` is true.
25
+ * The `name` attribute of the form element.
26
+ * For nested forms (`nested` is true), this is also used as the path of the form's state within its parent form.
27
27
  */
28
- name?: N extends true ? string : never;
28
+ name?: string;
29
29
  /**
30
30
  * Delay in milliseconds before validating the form on input events.
31
31
  * @defaultValue `300`
@@ -20,7 +20,7 @@ const _props = defineProps({
20
20
  return ["input", "blur", "change"];
21
21
  } },
22
22
  disabled: { type: Boolean, required: false },
23
- name: { type: null, required: false },
23
+ name: { type: String, required: false },
24
24
  validateOnInputDelay: { type: Number, required: false, default: 300 },
25
25
  transform: { type: null, required: false, default: () => true },
26
26
  nested: { type: Boolean, required: false },
@@ -293,6 +293,8 @@ defineExpose(api);
293
293
  :is="parentBus ? 'div' : 'form'"
294
294
  :id="formId"
295
295
  ref="formRef"
296
+ :name="parentBus ? void 0 : props.name"
297
+ method="post"
296
298
  :class="ui({ class: [props.ui?.base, props.class] })"
297
299
  @submit.prevent="onSubmitWrapper"
298
300
  >
@@ -22,10 +22,10 @@ export type FormProps<S extends FormSchema, T extends boolean = true, N extends
22
22
  /** Disable all inputs inside the form. */
23
23
  disabled?: boolean;
24
24
  /**
25
- * Path of the form's state within it's parent form.
26
- * Used for nesting forms. Only available if `nested` is true.
25
+ * The `name` attribute of the form element.
26
+ * For nested forms (`nested` is true), this is also used as the path of the form's state within its parent form.
27
27
  */
28
- name?: N extends true ? string : never;
28
+ name?: string;
29
29
  /**
30
30
  * Delay in milliseconds before validating the form on input events.
31
31
  * @defaultValue `300`
@@ -5,6 +5,7 @@
5
5
  <script setup>
6
6
  import { useForwardProps } from "reka-ui";
7
7
  import { reactivePick } from "@vueuse/core";
8
+ import NuxtIcon from "@nuxt/icon/runtime/components/index.js";
8
9
  const props = defineProps({
9
10
  name: { type: null, required: true },
10
11
  mode: { type: String, required: false },
@@ -15,6 +16,6 @@ const iconProps = useForwardProps(reactivePick(props, "mode", "size", "customize
15
16
  </script>
16
17
 
17
18
  <template>
18
- <Icon v-if="typeof name === 'string'" :name="name" v-bind="iconProps" />
19
+ <NuxtIcon v-if="typeof name === 'string'" :name="name" v-bind="iconProps" />
19
20
  <component :is="name" v-else />
20
21
  </template>
@@ -6,8 +6,8 @@ import type { IconProps } from '../types';
6
6
  import type { ComponentConfig } from '../types/tv';
7
7
  import theme from '#build/ui/input-date';
8
8
  type InputDate = ComponentConfig<typeof theme, AppConfig, 'inputDate'>;
9
- type _DateFieldRootProps = Omit<DateFieldRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'locale'>;
10
- type _RangeDateFieldRootProps = Omit<DateRangeFieldRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'locale'>;
9
+ type _DateFieldRootProps = Omit<DateFieldRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir'>;
10
+ type _RangeDateFieldRootProps = Omit<DateRangeFieldRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir'>;
11
11
  type InputDateDefaultValue<R extends boolean = false> = R extends true ? DateRangeFieldRootProps['defaultValue'] : DateFieldRootProps['defaultValue'];
12
12
  type InputDateModelValue<R extends boolean = false> = (R extends true ? DateRangeFieldRootProps['modelValue'] : DateFieldRootProps['modelValue']) | undefined;
13
13
  export interface InputDateProps<R extends boolean = false> extends UseComponentIconsProps, _DateFieldRootProps, _RangeDateFieldRootProps {
@@ -48,6 +48,7 @@ const _props = defineProps({
48
48
  hideTimeZone: { type: Boolean, required: false },
49
49
  maxValue: { type: Object, required: false },
50
50
  minValue: { type: Object, required: false },
51
+ locale: { type: String, required: false },
51
52
  disabled: { type: Boolean, required: false },
52
53
  readonly: { type: Boolean, required: false },
53
54
  isDateUnavailable: { type: Function, required: false },
@@ -6,8 +6,8 @@ import type { IconProps } from '../types';
6
6
  import type { ComponentConfig } from '../types/tv';
7
7
  import theme from '#build/ui/input-date';
8
8
  type InputDate = ComponentConfig<typeof theme, AppConfig, 'inputDate'>;
9
- type _DateFieldRootProps = Omit<DateFieldRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'locale'>;
10
- type _RangeDateFieldRootProps = Omit<DateRangeFieldRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'locale'>;
9
+ type _DateFieldRootProps = Omit<DateFieldRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir'>;
10
+ type _RangeDateFieldRootProps = Omit<DateRangeFieldRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir'>;
11
11
  type InputDateDefaultValue<R extends boolean = false> = R extends true ? DateRangeFieldRootProps['defaultValue'] : DateFieldRootProps['defaultValue'];
12
12
  type InputDateModelValue<R extends boolean = false> = (R extends true ? DateRangeFieldRootProps['modelValue'] : DateFieldRootProps['modelValue']) | undefined;
13
13
  export interface InputDateProps<R extends boolean = false> extends UseComponentIconsProps, _DateFieldRootProps, _RangeDateFieldRootProps {
@@ -3,7 +3,7 @@ import theme from "#build/ui/input-menu";
3
3
  </script>
4
4
 
5
5
  <script setup>
6
- import { computed, useTemplateRef, toRef, onMounted, toRaw, nextTick, watch } from "vue";
6
+ import { computed, ref, useTemplateRef, toRef, onMounted, toRaw, nextTick, watch } from "vue";
7
7
  import { TagsInputRoot, TagsInputItem, TagsInputItemText, TagsInputItemDelete, TagsInputInput } from "reka-ui";
8
8
  import { useForwardProps } from "../composables/useForwardProps";
9
9
  import { Combobox, Autocomplete } from "reka-ui/namespaced";
@@ -228,7 +228,9 @@ function onFocus(event) {
228
228
  emits("focus", event);
229
229
  emitFormFocus();
230
230
  }
231
+ const isOpen = ref(false);
231
232
  function onUpdateOpen(value) {
233
+ isOpen.value = value;
232
234
  let timeoutId;
233
235
  if (!value) {
234
236
  const event = new FocusEvent("blur");
@@ -283,6 +285,14 @@ function onClear() {
283
285
  emits("clear");
284
286
  }
285
287
  const viewportRef = useTemplateRef("viewportRef");
288
+ const comboboxRootRef = useTemplateRef("comboboxRootRef");
289
+ watch(() => props.items, async () => {
290
+ if (!isOpen.value) {
291
+ return;
292
+ }
293
+ await nextTick();
294
+ comboboxRootRef.value?.highlightFirstItem?.();
295
+ }, { flush: "post" });
286
296
  defineExpose({
287
297
  inputRef: toRef(() => inputRef.value?.$el),
288
298
  viewportRef: toRef(() => viewportRef.value)
@@ -361,6 +371,7 @@ defineExpose({
361
371
  </DefineItemTemplate>
362
372
 
363
373
  <Component.Root
374
+ ref="comboboxRootRef"
364
375
  v-slot="{ modelValue, open }"
365
376
  v-bind="rootProps"
366
377
  :name="name"
@@ -11,7 +11,7 @@ type InputNumberValue = number | null;
11
11
  type ApplyModifiers<T extends InputNumberValue, Mod extends Pick<ModelModifiers, 'optional'>> = T | (Mod extends {
12
12
  optional: true;
13
13
  } ? undefined : never);
14
- export interface InputNumberProps<T extends InputNumberValue = InputNumberValue, Mod extends Pick<ModelModifiers, 'optional'> = Pick<ModelModifiers, 'optional'>> extends Pick<NumberFieldRootProps, 'min' | 'max' | 'step' | 'stepSnapping' | 'disabled' | 'required' | 'id' | 'name' | 'formatOptions' | 'disableWheelChange' | 'invertWheelChange' | 'readonly' | 'focusOnChange'>, /** @vue-ignore */ Omit<InputHTMLAttributes, 'disabled' | 'min' | 'max' | 'readonly' | 'required' | 'step' | 'name' | 'placeholder' | 'type' | 'autofocus' | 'maxlength' | 'minlength' | 'pattern' | 'size'> {
14
+ export interface InputNumberProps<T extends InputNumberValue = InputNumberValue, Mod extends Pick<ModelModifiers, 'optional'> = Pick<ModelModifiers, 'optional'>> extends Pick<NumberFieldRootProps, 'min' | 'max' | 'step' | 'stepSnapping' | 'disabled' | 'required' | 'id' | 'name' | 'formatOptions' | 'disableWheelChange' | 'invertWheelChange' | 'readonly' | 'focusOnChange' | 'locale'>, /** @vue-ignore */ Omit<InputHTMLAttributes, 'disabled' | 'min' | 'max' | 'readonly' | 'required' | 'step' | 'name' | 'placeholder' | 'type' | 'autofocus' | 'maxlength' | 'minlength' | 'pattern' | 'size'> {
15
15
  /**
16
16
  * The element or component this component should render as.
17
17
  * @defaultValue 'div'
@@ -49,7 +49,8 @@ const _props = defineProps({
49
49
  disableWheelChange: { type: Boolean, required: false },
50
50
  invertWheelChange: { type: Boolean, required: false },
51
51
  readonly: { type: Boolean, required: false },
52
- focusOnChange: { type: Boolean, required: false }
52
+ focusOnChange: { type: Boolean, required: false },
53
+ locale: { type: String, required: false }
53
54
  });
54
55
  const emits = defineEmits(["update:modelValue", "blur", "change"]);
55
56
  defineSlots();
@@ -57,7 +58,7 @@ const props = useComponentProps("inputNumber", _props);
57
58
  const modelValue = useVModel(props, "modelValue", emits, { defaultValue: props.defaultValue });
58
59
  const { t } = useLocale();
59
60
  const appConfig = useAppConfig();
60
- const rootProps = useForwardProps(reactivePick(props, "as", "stepSnapping", "formatOptions", "disableWheelChange", "invertWheelChange", "required", "readonly", "focusOnChange"), emits);
61
+ const rootProps = useForwardProps(reactivePick(props, "as", "stepSnapping", "formatOptions", "disableWheelChange", "invertWheelChange", "required", "readonly", "focusOnChange", "locale"), emits);
61
62
  const { emitFormBlur, emitFormFocus, emitFormChange, emitFormInput, id, color, size: formFieldSize, name, highlight, disabled, ariaAttrs } = useFormField(_props);
62
63
  const { orientation, size: fieldGroupSize } = useFieldGroup(_props);
63
64
  const inputSize = computed(() => fieldGroupSize.value || formFieldSize.value);
@@ -11,7 +11,7 @@ type InputNumberValue = number | null;
11
11
  type ApplyModifiers<T extends InputNumberValue, Mod extends Pick<ModelModifiers, 'optional'>> = T | (Mod extends {
12
12
  optional: true;
13
13
  } ? undefined : never);
14
- export interface InputNumberProps<T extends InputNumberValue = InputNumberValue, Mod extends Pick<ModelModifiers, 'optional'> = Pick<ModelModifiers, 'optional'>> extends Pick<NumberFieldRootProps, 'min' | 'max' | 'step' | 'stepSnapping' | 'disabled' | 'required' | 'id' | 'name' | 'formatOptions' | 'disableWheelChange' | 'invertWheelChange' | 'readonly' | 'focusOnChange'>, /** @vue-ignore */ Omit<InputHTMLAttributes, 'disabled' | 'min' | 'max' | 'readonly' | 'required' | 'step' | 'name' | 'placeholder' | 'type' | 'autofocus' | 'maxlength' | 'minlength' | 'pattern' | 'size'> {
14
+ export interface InputNumberProps<T extends InputNumberValue = InputNumberValue, Mod extends Pick<ModelModifiers, 'optional'> = Pick<ModelModifiers, 'optional'>> extends Pick<NumberFieldRootProps, 'min' | 'max' | 'step' | 'stepSnapping' | 'disabled' | 'required' | 'id' | 'name' | 'formatOptions' | 'disableWheelChange' | 'invertWheelChange' | 'readonly' | 'focusOnChange' | 'locale'>, /** @vue-ignore */ Omit<InputHTMLAttributes, 'disabled' | 'min' | 'max' | 'readonly' | 'required' | 'step' | 'name' | 'placeholder' | 'type' | 'autofocus' | 'maxlength' | 'minlength' | 'pattern' | 'size'> {
15
15
  /**
16
16
  * The element or component this component should render as.
17
17
  * @defaultValue 'div'
@@ -8,8 +8,8 @@ import type { ComponentConfig } from '../types/tv';
8
8
  type InputTime = ComponentConfig<typeof theme, AppConfig, 'inputTime'>;
9
9
  type InputTimeDefaultValue<R extends boolean = false> = R extends true ? TimeRangeFieldRootProps['defaultValue'] : TimeFieldRootProps['defaultValue'];
10
10
  type InputTimeModelValue<R extends boolean = false> = (R extends true ? TimeRangeFieldRootProps['modelValue'] : TimeFieldRootProps['modelValue']) | undefined;
11
- type _TimeFieldRootProps = Omit<TimeFieldRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'locale'>;
12
- type _TimeRangeFieldRootProps = Omit<TimeRangeFieldRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'locale'>;
11
+ type _TimeFieldRootProps = Omit<TimeFieldRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir'>;
12
+ type _TimeRangeFieldRootProps = Omit<TimeRangeFieldRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir'>;
13
13
  export interface InputTimeProps<R extends boolean = false> extends UseComponentIconsProps, _TimeFieldRootProps, _TimeRangeFieldRootProps {
14
14
  /**
15
15
  * The element or component this component should render as.
@@ -49,6 +49,7 @@ const _props = defineProps({
49
49
  hideTimeZone: { type: Boolean, required: false },
50
50
  maxValue: { type: Object, required: false },
51
51
  minValue: { type: Object, required: false },
52
+ locale: { type: String, required: false },
52
53
  disabled: { type: Boolean, required: false },
53
54
  readonly: { type: Boolean, required: false },
54
55
  id: { type: String, required: false },
@@ -8,8 +8,8 @@ import type { ComponentConfig } from '../types/tv';
8
8
  type InputTime = ComponentConfig<typeof theme, AppConfig, 'inputTime'>;
9
9
  type InputTimeDefaultValue<R extends boolean = false> = R extends true ? TimeRangeFieldRootProps['defaultValue'] : TimeFieldRootProps['defaultValue'];
10
10
  type InputTimeModelValue<R extends boolean = false> = (R extends true ? TimeRangeFieldRootProps['modelValue'] : TimeFieldRootProps['modelValue']) | undefined;
11
- type _TimeFieldRootProps = Omit<TimeFieldRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'locale'>;
12
- type _TimeRangeFieldRootProps = Omit<TimeRangeFieldRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'locale'>;
11
+ type _TimeFieldRootProps = Omit<TimeFieldRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir'>;
12
+ type _TimeRangeFieldRootProps = Omit<TimeRangeFieldRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir'>;
13
13
  export interface InputTimeProps<R extends boolean = false> extends UseComponentIconsProps, _TimeFieldRootProps, _TimeRangeFieldRootProps {
14
14
  /**
15
15
  * The element or component this component should render as.
@@ -100,8 +100,8 @@ export interface LinkSlots {
100
100
  declare const _default: typeof __VLS_export;
101
101
  export default _default;
102
102
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
103
- as: any;
104
103
  type: "reset" | "submit" | "button";
104
+ as: any;
105
105
  active: boolean;
106
106
  ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
107
107
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
@@ -100,8 +100,8 @@ export interface LinkSlots {
100
100
  declare const _default: typeof __VLS_export;
101
101
  export default _default;
102
102
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
103
- as: any;
104
103
  type: "reset" | "submit" | "button";
104
+ as: any;
105
105
  active: boolean;
106
106
  ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
107
107
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
@@ -4,7 +4,7 @@ export interface LinkBaseProps {
4
4
  type?: string;
5
5
  disabled?: boolean;
6
6
  onClick?: ((e: MouseEvent) => void | Promise<void>) | Array<((e: MouseEvent) => void | Promise<void>)>;
7
- href?: string;
7
+ href?: string | null;
8
8
  navigate?: (e: MouseEvent) => void;
9
9
  target?: LinkProps['target'];
10
10
  rel?: LinkProps['rel'];
@@ -14,8 +14,8 @@ export interface LinkBaseProps {
14
14
  declare const _default: typeof __VLS_export;
15
15
  export default _default;
16
16
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkBaseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkBaseProps> & Readonly<{}>, {
17
- as: string;
18
17
  type: string;
18
+ as: string;
19
19
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
20
20
  default?: (props: {}) => any;
21
21
  }>;
@@ -9,7 +9,7 @@ const props = defineProps({
9
9
  type: { type: String, required: false, default: "button" },
10
10
  disabled: { type: Boolean, required: false },
11
11
  onClick: { type: [Function, Array], required: false },
12
- href: { type: String, required: false },
12
+ href: { type: [String, null], required: false },
13
13
  navigate: { type: Function, required: false },
14
14
  target: { type: [String, Object, null], required: false },
15
15
  rel: { type: [String, Object, null], required: false },
@@ -4,7 +4,7 @@ export interface LinkBaseProps {
4
4
  type?: string;
5
5
  disabled?: boolean;
6
6
  onClick?: ((e: MouseEvent) => void | Promise<void>) | Array<((e: MouseEvent) => void | Promise<void>)>;
7
- href?: string;
7
+ href?: string | null;
8
8
  navigate?: (e: MouseEvent) => void;
9
9
  target?: LinkProps['target'];
10
10
  rel?: LinkProps['rel'];
@@ -14,8 +14,8 @@ export interface LinkBaseProps {
14
14
  declare const _default: typeof __VLS_export;
15
15
  export default _default;
16
16
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkBaseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkBaseProps> & Readonly<{}>, {
17
- as: string;
18
17
  type: string;
18
+ as: string;
19
19
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
20
20
  default?: (props: {}) => any;
21
21
  }>;
@@ -3,7 +3,7 @@ import theme from "#build/ui/select-menu";
3
3
  </script>
4
4
 
5
5
  <script setup>
6
- import { useTemplateRef, computed, onMounted, toRef, toRaw } from "vue";
6
+ import { useTemplateRef, computed, ref, onMounted, toRef, toRaw, watch, nextTick } from "vue";
7
7
  import { ComboboxRoot, ComboboxArrow, ComboboxAnchor, ComboboxInput, ComboboxTrigger, ComboboxCancel, ComboboxPortal, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxVirtualizer, ComboboxLabel, ComboboxSeparator, ComboboxItem, ComboboxItemIndicator, FocusScope } from "reka-ui";
8
8
  import { useForwardProps } from "../composables/useForwardProps";
9
9
  import { defu } from "defu";
@@ -199,7 +199,9 @@ function onUpdate(value) {
199
199
  searchTerm.value = "";
200
200
  }
201
201
  }
202
+ const isOpen = ref(false);
202
203
  function onUpdateOpen(value) {
204
+ isOpen.value = value;
203
205
  let timeoutId;
204
206
  if (!value) {
205
207
  const event = new FocusEvent("blur");
@@ -246,6 +248,14 @@ function onClear() {
246
248
  emits("clear");
247
249
  }
248
250
  const viewportRef = useTemplateRef("viewportRef");
251
+ const comboboxRootRef = useTemplateRef("comboboxRootRef");
252
+ watch(() => props.items, async () => {
253
+ if (!isOpen.value) {
254
+ return;
255
+ }
256
+ await nextTick();
257
+ comboboxRootRef.value?.highlightFirstItem?.();
258
+ }, { flush: "post" });
249
259
  defineExpose({
250
260
  triggerRef: toRef(() => triggerRef.value?.$el),
251
261
  viewportRef: toRef(() => viewportRef.value)
@@ -325,6 +335,7 @@ defineExpose({
325
335
 
326
336
  <ComboboxRoot
327
337
  :id="id"
338
+ ref="comboboxRootRef"
328
339
  v-slot="{ modelValue, open }"
329
340
  v-bind="{ ...rootProps, ...$attrs, ...ariaAttrs }"
330
341
  ignore-filter
@@ -6,7 +6,7 @@ import type { AvatarProps, ButtonProps, IconProps, ProgressProps, LinkPropsKeys
6
6
  import type { StringOrVNode } from '../types/utils';
7
7
  import type { ComponentConfig } from '../types/tv';
8
8
  type Toast = ComponentConfig<typeof theme, AppConfig, 'toast'>;
9
- export interface ToastProps extends Pick<ToastRootProps, 'defaultOpen' | 'open' | 'type' | 'duration'> {
9
+ export interface ToastProps extends Pick<ToastRootProps, 'defaultOpen' | 'open' | 'type'> {
10
10
  /**
11
11
  * The element or component this component should render as.
12
12
  * @defaultValue 'li'
@@ -47,6 +47,13 @@ export interface ToastProps extends Pick<ToastRootProps, 'defaultOpen' | 'open'
47
47
  * `{ size: 'xs' }`{lang="ts-type"}
48
48
  */
49
49
  actions?: ButtonProps[];
50
+ /**
51
+ * The time in milliseconds before the toast automatically closes. Overrides the global `toaster.duration`.
52
+ *
53
+ * Set to `0` to keep the toast open until it's manually closed.
54
+ * @defaultValue 5000
55
+ */
56
+ duration?: number;
50
57
  /**
51
58
  * Display a progress bar showing the toast's remaining duration.
52
59
  * `{ size: 'sm' }`{lang="ts-type"}
@@ -26,13 +26,13 @@ const _props = defineProps({
26
26
  close: { type: [Boolean, Object], required: false, default: true },
27
27
  closeIcon: { type: null, required: false },
28
28
  actions: { type: Array, required: false },
29
+ duration: { type: Number, required: false },
29
30
  progress: { type: [Boolean, Object], required: false, default: true },
30
31
  class: { type: null, required: false },
31
32
  ui: { type: Object, required: false },
32
33
  defaultOpen: { type: Boolean, required: false },
33
34
  open: { type: Boolean, required: false },
34
- type: { type: String, required: false },
35
- duration: { type: Number, required: false }
35
+ type: { type: String, required: false }
36
36
  });
37
37
  const emits = defineEmits(["escapeKeyDown", "pause", "resume", "swipeStart", "swipeMove", "swipeCancel", "swipeEnd", "update:open"]);
38
38
  const slots = defineSlots();
@@ -61,7 +61,7 @@ defineExpose({
61
61
  <template>
62
62
  <ToastRoot
63
63
  ref="rootRef"
64
- v-slot="{ remaining, duration, open }"
64
+ v-slot="{ remaining, duration: totalDuration, open }"
65
65
  v-bind="rootProps"
66
66
  :data-orientation="props.orientation"
67
67
  data-slot="root"
@@ -129,8 +129,8 @@ defineExpose({
129
129
  </div>
130
130
 
131
131
  <UProgress
132
- v-if="props.progress && open && remaining > 0 && duration"
133
- :model-value="remaining / duration * 100"
132
+ v-if="props.progress && open && remaining > 0 && totalDuration"
133
+ :model-value="remaining / totalDuration * 100"
134
134
  :color="props.color"
135
135
  v-bind="typeof props.progress === 'object' ? props.progress : {}"
136
136
  size="sm"
@@ -6,7 +6,7 @@ import type { AvatarProps, ButtonProps, IconProps, ProgressProps, LinkPropsKeys
6
6
  import type { StringOrVNode } from '../types/utils';
7
7
  import type { ComponentConfig } from '../types/tv';
8
8
  type Toast = ComponentConfig<typeof theme, AppConfig, 'toast'>;
9
- export interface ToastProps extends Pick<ToastRootProps, 'defaultOpen' | 'open' | 'type' | 'duration'> {
9
+ export interface ToastProps extends Pick<ToastRootProps, 'defaultOpen' | 'open' | 'type'> {
10
10
  /**
11
11
  * The element or component this component should render as.
12
12
  * @defaultValue 'li'
@@ -47,6 +47,13 @@ export interface ToastProps extends Pick<ToastRootProps, 'defaultOpen' | 'open'
47
47
  * `{ size: 'xs' }`{lang="ts-type"}
48
48
  */
49
49
  actions?: ButtonProps[];
50
+ /**
51
+ * The time in milliseconds before the toast automatically closes. Overrides the global `toaster.duration`.
52
+ *
53
+ * Set to `0` to keep the toast open until it's manually closed.
54
+ * @defaultValue 5000
55
+ */
56
+ duration?: number;
50
57
  /**
51
58
  * Display a progress bar showing the toast's remaining duration.
52
59
  * `{ size: 'sm' }`{lang="ts-type"}
@@ -44,7 +44,7 @@ export interface ContentSearchItem extends Omit<LinkProps, 'custom'>, CommandPal
44
44
  */
45
45
  icon?: IconProps['name'];
46
46
  }
47
- export interface ContentSearchProps<T extends ContentSearchLink = ContentSearchLink> extends Pick<ModalProps, 'title' | 'description' | 'overlay' | 'transition' | 'content' | 'dismissible' | 'fullscreen' | 'modal' | 'portal'>, Pick<CommandPaletteProps<CommandPaletteGroup<ContentSearchItem>, ContentSearchItem>, 'icon' | 'placeholder' | 'autofocus' | 'loading' | 'loadingIcon' | 'closeIcon' | 'groups'> {
47
+ export interface ContentSearchProps<T extends ContentSearchLink = ContentSearchLink> extends Pick<ModalProps, 'title' | 'description' | 'overlay' | 'transition' | 'content' | 'dismissible' | 'fullscreen' | 'modal' | 'portal'>, Pick<CommandPaletteProps<CommandPaletteGroup<ContentSearchItem>, ContentSearchItem>, 'icon' | 'trailingIcon' | 'selectedIcon' | 'childrenIcon' | 'placeholder' | 'autofocus' | 'loading' | 'loadingIcon' | 'closeIcon' | 'back' | 'backIcon' | 'disabled' | 'highlightOnHover' | 'labelKey' | 'descriptionKey' | 'preserveGroupOrder' | 'virtualize' | 'groups'> {
48
48
  /**
49
49
  * @defaultValue 'md'
50
50
  */
@@ -39,11 +39,22 @@ const _props = defineProps({
39
39
  modal: { type: Boolean, required: false },
40
40
  portal: { type: [Boolean, String], required: false, skipCheck: true },
41
41
  icon: { type: null, required: false },
42
+ trailingIcon: { type: null, required: false },
43
+ selectedIcon: { type: null, required: false },
44
+ childrenIcon: { type: null, required: false },
42
45
  placeholder: { type: String, required: false },
43
46
  autofocus: { type: Boolean, required: false },
44
47
  loading: { type: Boolean, required: false },
45
48
  loadingIcon: { type: null, required: false },
46
49
  closeIcon: { type: null, required: false },
50
+ back: { type: [Boolean, Object], required: false },
51
+ backIcon: { type: null, required: false },
52
+ disabled: { type: Boolean, required: false },
53
+ highlightOnHover: { type: Boolean, required: false },
54
+ labelKey: { type: null, required: false },
55
+ descriptionKey: { type: null, required: false },
56
+ preserveGroupOrder: { type: Boolean, required: false },
57
+ virtualize: { type: [Boolean, Object], required: false },
47
58
  groups: { type: Array, required: false }
48
59
  });
49
60
  const slots = defineSlots();
@@ -53,7 +64,7 @@ const { t } = useLocale();
53
64
  const { open, mapNavigationItems, mapLinks, mapSearchResults, postFilter } = useContentSearch();
54
65
  const colorMode = useColorMode();
55
66
  const appConfig = useAppConfig();
56
- const commandPaletteProps = useForwardProps(reactivePick(props, "size", "icon", "placeholder", "autofocus", "loading", "loadingIcon", "close", "closeIcon", "searchDelay"));
67
+ const commandPaletteProps = useForwardProps(reactivePick(props, "size", "icon", "trailingIcon", "selectedIcon", "childrenIcon", "placeholder", "autofocus", "loading", "loadingIcon", "close", "closeIcon", "back", "backIcon", "disabled", "highlightOnHover", "labelKey", "descriptionKey", "preserveGroupOrder", "virtualize", "searchDelay"));
57
68
  const modalProps = useForwardProps(reactivePick(props, "overlay", "transition", "content", "dismissible", "fullscreen", "modal", "portal"));
58
69
  const getProxySlots = () => omit(slots, ["content"]);
59
70
  const fuse = computed(() => defu({}, props.fuse, {
@@ -44,7 +44,7 @@ export interface ContentSearchItem extends Omit<LinkProps, 'custom'>, CommandPal
44
44
  */
45
45
  icon?: IconProps['name'];
46
46
  }
47
- export interface ContentSearchProps<T extends ContentSearchLink = ContentSearchLink> extends Pick<ModalProps, 'title' | 'description' | 'overlay' | 'transition' | 'content' | 'dismissible' | 'fullscreen' | 'modal' | 'portal'>, Pick<CommandPaletteProps<CommandPaletteGroup<ContentSearchItem>, ContentSearchItem>, 'icon' | 'placeholder' | 'autofocus' | 'loading' | 'loadingIcon' | 'closeIcon' | 'groups'> {
47
+ export interface ContentSearchProps<T extends ContentSearchLink = ContentSearchLink> extends Pick<ModalProps, 'title' | 'description' | 'overlay' | 'transition' | 'content' | 'dismissible' | 'fullscreen' | 'modal' | 'portal'>, Pick<CommandPaletteProps<CommandPaletteGroup<ContentSearchItem>, ContentSearchItem>, 'icon' | 'trailingIcon' | 'selectedIcon' | 'childrenIcon' | 'placeholder' | 'autofocus' | 'loading' | 'loadingIcon' | 'closeIcon' | 'back' | 'backIcon' | 'disabled' | 'highlightOnHover' | 'labelKey' | 'descriptionKey' | 'preserveGroupOrder' | 'virtualize' | 'groups'> {
48
48
  /**
49
49
  * @defaultValue 'md'
50
50
  */
@@ -32,11 +32,6 @@ export default defineLocale({
32
32
  chatPromptSubmit: {
33
33
  label: "\u0E2A\u0E48\u0E07"
34
34
  },
35
- chatReasoning: {
36
- thinking: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E04\u0E34\u0E14\u2026",
37
- thought: "\u0E04\u0E34\u0E14\u0E41\u0E25\u0E49\u0E27",
38
- thoughtFor: "\u0E04\u0E34\u0E14\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E27\u0E25\u0E32 {duration}"
39
- },
40
35
  colorMode: {
41
36
  dark: "\u0E21\u0E37\u0E14",
42
37
  light: "\u0E2A\u0E27\u0E48\u0E32\u0E07",
@@ -108,7 +103,7 @@ export default defineLocale({
108
103
  close: "\u0E1B\u0E34\u0E14"
109
104
  },
110
105
  pricingTable: {
111
- caption: "\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E23\u0E35\u0E22\u0E1A\u0E40\u0E17\u0E35\u0E22\u0E1A\u0E23\u0E32\u0E04\u0E32\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32"
106
+ caption: "\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E23\u0E35\u0E22\u0E1A\u0E40\u0E17\u0E35\u0E22\u0E1A\u0E23\u0E32\u0E04\u0E32"
112
107
  },
113
108
  prose: {
114
109
  codeCollapse: {
@@ -129,6 +124,11 @@ export default defineLocale({
129
124
  openIn: "\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E19 {name}"
130
125
  }
131
126
  },
127
+ chatReasoning: {
128
+ thinking: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E04\u0E34\u0E14\u2026",
129
+ thought: "\u0E04\u0E34\u0E14\u0E41\u0E25\u0E49\u0E27",
130
+ thoughtFor: "\u0E04\u0E34\u0E14\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E27\u0E25\u0E32 {duration}"
131
+ },
132
132
  sidebar: {
133
133
  close: "\u0E1B\u0E34\u0E14",
134
134
  toggle: "\u0E2A\u0E25\u0E31\u0E1A"
@@ -39,17 +39,23 @@ type ComponentUI<T extends {
39
39
  [K in keyof Required<T['slots']>]: (props?: Record<string, any>) => string;
40
40
  }>;
41
41
  type GetComponentAppConfig<A, U extends string, K extends string> = A extends Record<U, Record<K, any>> ? A[U][K] : {};
42
- type ComponentAppConfig<T, A extends Record<string, any>, K extends string, U extends string = 'ui' | 'ui.prose'> = A & (U extends 'ui.prose' ? {
43
- ui?: {
44
- prose?: {
42
+ type ComponentAppConfig<T, A extends Record<string, any>, K extends string, U extends string = 'ui' | 'ui.prose'> = Omit<A, 'ui'> & {
43
+ ui: U extends 'ui.prose' ? (A extends {
44
+ ui: infer UI;
45
+ } ? Omit<UI, 'prose'> : Record<string, never>) & {
46
+ prose?: (A extends {
47
+ ui: {
48
+ prose?: infer P;
49
+ };
50
+ } ? Omit<NonNullable<P>, K> : Record<string, never>) & {
45
51
  [k in K]?: Partial<T>;
46
52
  };
47
- };
48
- } : {
49
- [key in Exclude<U, 'ui.prose'>]?: {
53
+ } : (A extends {
54
+ ui: infer UI;
55
+ } ? Omit<UI, K> : Record<string, never>) & {
50
56
  [k in K]?: Partial<T>;
51
57
  };
52
- });
58
+ };
53
59
  /**
54
60
  * Defines the configuration shape expected for a component.
55
61
  * @template T The component's theme imported from `#build/ui/*`.
@@ -3,6 +3,9 @@ import type { AcceptableValue as _AcceptableValue } from 'reka-ui';
3
3
  export type DeepPartial<T> = {
4
4
  [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P] | undefined;
5
5
  };
6
+ export type DeepRequired<T> = {
7
+ [P in keyof T]-?: NonNullable<T[P]> extends object ? DeepRequired<NonNullable<T[P]>> : NonNullable<T[P]>;
8
+ };
6
9
  export type DynamicSlotsKeys<Name extends string | undefined, Suffix extends string | undefined = undefined> = (Name extends string ? Suffix extends string ? Name | `${Name}-${Suffix}` : Name : never);
7
10
  export type DynamicSlots<T extends {
8
11
  slot?: string;
@@ -63,8 +63,8 @@ export interface LinkSlots {
63
63
  declare const _default: typeof __VLS_export;
64
64
  export default _default;
65
65
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
66
- as: any;
67
66
  type: "reset" | "submit" | "button";
67
+ as: any;
68
68
  active: boolean;
69
69
  ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
70
70
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
@@ -63,8 +63,8 @@ export interface LinkSlots {
63
63
  declare const _default: typeof __VLS_export;
64
64
  export default _default;
65
65
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
66
- as: any;
67
66
  type: "reset" | "submit" | "button";
67
+ as: any;
68
68
  active: boolean;
69
69
  ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
70
70
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
@@ -13,8 +13,8 @@ export interface LinkBaseProps {
13
13
  declare const _default: typeof __VLS_export;
14
14
  export default _default;
15
15
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkBaseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkBaseProps> & Readonly<{}>, {
16
- as: string;
17
16
  type: string;
17
+ as: string;
18
18
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
19
19
  default?: (props: {}) => any;
20
20
  } & {
@@ -13,8 +13,8 @@ export interface LinkBaseProps {
13
13
  declare const _default: typeof __VLS_export;
14
14
  export default _default;
15
15
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkBaseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkBaseProps> & Readonly<{}>, {
16
- as: string;
17
16
  type: string;
17
+ as: string;
18
18
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
19
19
  default?: (props: {}) => any;
20
20
  } & {
@@ -64,8 +64,8 @@ export interface LinkSlots {
64
64
  declare const _default: typeof __VLS_export;
65
65
  export default _default;
66
66
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
67
- as: any;
68
67
  type: "reset" | "submit" | "button";
68
+ as: any;
69
69
  active: boolean;
70
70
  ariaCurrentValue: string;
71
71
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
@@ -64,8 +64,8 @@ export interface LinkSlots {
64
64
  declare const _default: typeof __VLS_export;
65
65
  export default _default;
66
66
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
67
- as: any;
68
67
  type: "reset" | "submit" | "button";
68
+ as: any;
69
69
  active: boolean;
70
70
  ariaCurrentValue: string;
71
71
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
@@ -56,8 +56,8 @@ export interface LinkSlots {
56
56
  declare const _default: typeof __VLS_export;
57
57
  export default _default;
58
58
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
59
- as: any;
60
59
  type: "reset" | "submit" | "button";
60
+ as: any;
61
61
  active: boolean;
62
62
  ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
63
63
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
@@ -56,8 +56,8 @@ export interface LinkSlots {
56
56
  declare const _default: typeof __VLS_export;
57
57
  export default _default;
58
58
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
59
- as: any;
60
59
  type: "reset" | "submit" | "button";
60
+ as: any;
61
61
  active: boolean;
62
62
  ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
63
63
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
@@ -3340,7 +3340,7 @@ const inputMenu = (options) => {
3340
3340
  trailing: "group absolute inset-y-0 end-0 flex items-center disabled:cursor-not-allowed disabled:opacity-75 focus:outline-none",
3341
3341
  trailingClear: "p-0",
3342
3342
  arrow: "fill-bg stroke-default",
3343
- content: "max-h-[min(15rem,var(--reka-combobox-content-available-height))] w-(--reka-combobox-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-combobox-content-transform-origin) pointer-events-auto flex flex-col",
3343
+ content: "max-h-[min(15rem,var(--reka-combobox-content-available-height,15rem))] w-(--reka-combobox-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-combobox-content-transform-origin) pointer-events-auto flex flex-col",
3344
3344
  viewport: "relative scroll-py-1 overflow-y-auto flex-1",
3345
3345
  group: "p-1 isolate",
3346
3346
  empty: "text-center text-muted",
@@ -5525,7 +5525,7 @@ const select = (options) => {
5525
5525
  value: "truncate pointer-events-none",
5526
5526
  placeholder: "truncate text-dimmed",
5527
5527
  arrow: "fill-bg stroke-default",
5528
- content: "max-h-[min(15rem,var(--reka-select-content-available-height))] w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden origin-(--reka-select-content-transform-origin) pointer-events-auto flex flex-col",
5528
+ content: "max-h-[min(15rem,var(--reka-select-content-available-height,15rem))] w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden origin-(--reka-select-content-transform-origin) pointer-events-auto flex flex-col",
5529
5529
  viewport: "relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",
5530
5530
  group: "p-1 isolate",
5531
5531
  empty: "text-center text-muted",
@@ -5635,7 +5635,7 @@ const selectMenu = (options) => {
5635
5635
  input: "border-b border-default",
5636
5636
  focusScope: "flex flex-col min-h-0",
5637
5637
  viewport: "relative scroll-py-1 overflow-y-auto flex-1",
5638
- content: (content) => [content, "max-h-[min(15rem,var(--reka-combobox-content-available-height))] origin-(--reka-combobox-content-transform-origin) w-(--reka-combobox-trigger-width)"],
5638
+ content: (content) => [content, "max-h-[min(15rem,var(--reka-combobox-content-available-height,15rem))] origin-(--reka-combobox-content-transform-origin) w-(--reka-combobox-trigger-width)"],
5639
5639
  trailingClear: "p-0"
5640
5640
  },
5641
5641
  variants: {
@@ -8307,7 +8307,7 @@ ${themeBlocks}`;
8307
8307
  const iconKeys = Object.keys(uiConfig?.icons || {});
8308
8308
  const iconUnion = iconKeys.length ? iconKeys.map((i) => JSON.stringify(i)).join(" | ") : "string";
8309
8309
  return `import * as ui from '#build/ui'
8310
- import type { TVConfig } from '@nuxt/ui'
8310
+ import type { TVConfig, DeepRequired } from '@nuxt/ui'
8311
8311
  import type { defaultConfig } from 'tailwind-variants'
8312
8312
  import colors from 'tailwindcss/colors'
8313
8313
 
@@ -8326,6 +8326,8 @@ type AppConfigUI = {
8326
8326
  tv?: typeof defaultConfig
8327
8327
  } & TVConfig<typeof ui>
8328
8328
 
8329
+ type AppConfigRuntimeUI = DeepRequired<Pick<AppConfigUI, 'colors' | 'icons' | 'tv'>> & typeof ui
8330
+
8329
8331
  declare module '@nuxt/schema' {
8330
8332
  interface AppConfigInput {
8331
8333
  /**
@@ -8334,6 +8336,9 @@ declare module '@nuxt/schema' {
8334
8336
  */
8335
8337
  ui?: AppConfigUI
8336
8338
  }
8339
+ interface CustomAppConfig {
8340
+ ui: AppConfigRuntimeUI
8341
+ }
8337
8342
  }
8338
8343
 
8339
8344
  export {}
package/dist/unplugin.mjs CHANGED
@@ -3,7 +3,7 @@ import { join, normalize } from 'pathe';
3
3
  import { createUnplugin } from 'unplugin';
4
4
  import { defu } from 'defu';
5
5
  import tailwind from '@tailwindcss/vite';
6
- import { b as getTemplates, p as publicComposables, d as defaultOptions, r as resolveColors, g as getDefaultConfig } from './shared/ui.CoJ8bnb0.mjs';
6
+ import { b as getTemplates, p as publicComposables, d as defaultOptions, r as resolveColors, g as getDefaultConfig } from './shared/ui.C-lVg1QQ.mjs';
7
7
  import fs from 'node:fs';
8
8
  import path from 'node:path';
9
9
  import MagicString from 'magic-string';
package/dist/vite.mjs CHANGED
@@ -4,7 +4,7 @@ import 'pathe';
4
4
  import 'unplugin';
5
5
  import 'defu';
6
6
  import '@tailwindcss/vite';
7
- import './shared/ui.CoJ8bnb0.mjs';
7
+ import './shared/ui.C-lVg1QQ.mjs';
8
8
  import '../dist/runtime/utils/index.js';
9
9
  import 'scule';
10
10
  import 'knitwork';
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@nuxt/ui",
3
3
  "description": "A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.",
4
- "version": "4.8.0",
5
- "packageManager": "pnpm@11.1.3",
4
+ "version": "4.8.2",
5
+ "packageManager": "pnpm@11.5.0",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/nuxt/ui.git"
@@ -129,35 +129,35 @@
129
129
  "dependencies": {
130
130
  "@floating-ui/dom": "^1.7.6",
131
131
  "@iconify/vue": "^5.0.1",
132
- "@internationalized/date": "^3.12.1",
133
- "@internationalized/number": "^3.6.6",
132
+ "@internationalized/date": "^3.12.2",
133
+ "@internationalized/number": "^3.6.7",
134
134
  "@nuxt/fonts": "^0.14.0",
135
135
  "@nuxt/icon": "^2.2.2",
136
- "@nuxt/kit": "^4.4.6",
137
- "@nuxt/schema": "^4.4.6",
136
+ "@nuxt/kit": "^4.4.7",
137
+ "@nuxt/schema": "^4.4.7",
138
138
  "@nuxtjs/color-mode": "^3.5.2",
139
139
  "@standard-schema/spec": "^1.1.0",
140
140
  "@tailwindcss/postcss": "^4.3.0",
141
141
  "@tailwindcss/vite": "^4.3.0",
142
142
  "@tanstack/vue-table": "^8.21.3",
143
- "@tanstack/vue-virtual": "^3.13.24",
144
- "@tiptap/core": "^3.22.4",
145
- "@tiptap/extension-bubble-menu": "^3.22.4",
146
- "@tiptap/extension-code": "^3.22.4",
147
- "@tiptap/extension-collaboration": "^3.22.4",
148
- "@tiptap/extension-drag-handle": "^3.22.4",
149
- "@tiptap/extension-drag-handle-vue-3": "^3.22.4",
150
- "@tiptap/extension-floating-menu": "^3.22.4",
151
- "@tiptap/extension-horizontal-rule": "^3.22.4",
152
- "@tiptap/extension-image": "^3.22.4",
153
- "@tiptap/extension-mention": "^3.22.4",
154
- "@tiptap/extension-node-range": "^3.22.4",
155
- "@tiptap/extension-placeholder": "^3.22.4",
156
- "@tiptap/markdown": "^3.22.4",
157
- "@tiptap/pm": "^3.22.4",
158
- "@tiptap/starter-kit": "^3.22.4",
159
- "@tiptap/suggestion": "^3.22.4",
160
- "@tiptap/vue-3": "^3.22.4",
143
+ "@tanstack/vue-virtual": "^3.13.26",
144
+ "@tiptap/core": "^3.24.0",
145
+ "@tiptap/extension-bubble-menu": "^3.24.0",
146
+ "@tiptap/extension-code": "^3.24.0",
147
+ "@tiptap/extension-collaboration": "^3.24.0",
148
+ "@tiptap/extension-drag-handle": "^3.24.0",
149
+ "@tiptap/extension-drag-handle-vue-3": "^3.24.0",
150
+ "@tiptap/extension-floating-menu": "^3.24.0",
151
+ "@tiptap/extension-horizontal-rule": "^3.24.0",
152
+ "@tiptap/extension-image": "^3.24.0",
153
+ "@tiptap/extension-mention": "^3.24.0",
154
+ "@tiptap/extension-node-range": "^3.24.0",
155
+ "@tiptap/extension-placeholder": "^3.24.0",
156
+ "@tiptap/markdown": "^3.24.0",
157
+ "@tiptap/pm": "^3.24.0",
158
+ "@tiptap/starter-kit": "^3.24.0",
159
+ "@tiptap/suggestion": "^3.24.0",
160
+ "@tiptap/vue-3": "^3.24.0",
161
161
  "@unhead/vue": "^2.1.15",
162
162
  "@vueuse/core": "^14.3.0",
163
163
  "@vueuse/integrations": "^14.3.0",
@@ -172,7 +172,7 @@
172
172
  "embla-carousel-fade": "^8.6.0",
173
173
  "embla-carousel-vue": "^8.6.0",
174
174
  "embla-carousel-wheel-gestures": "^8.1.0",
175
- "fuse.js": "^7.3.0",
175
+ "fuse.js": "^7.4.0",
176
176
  "hookable": "^6.1.1",
177
177
  "knitwork": "^1.3.0",
178
178
  "magic-string": "^0.30.21",
@@ -180,18 +180,18 @@
180
180
  "motion-v": "^2.2.1",
181
181
  "ohash": "^2.0.11",
182
182
  "pathe": "^2.0.3",
183
- "reka-ui": "2.9.7",
183
+ "reka-ui": "2.9.9",
184
184
  "scule": "^1.3.0",
185
185
  "tailwind-merge": "^3.6.0",
186
186
  "tailwind-variants": "^3.2.2",
187
187
  "tailwindcss": "^4.3.0",
188
- "tinyglobby": "^0.2.16",
188
+ "tinyglobby": "^0.2.17",
189
189
  "ufo": "^1.6.4",
190
190
  "unplugin": "^3.0.0",
191
191
  "unplugin-auto-import": "^21.0.0",
192
- "unplugin-vue-components": "^32.0.0",
192
+ "unplugin-vue-components": "^32.1.0",
193
193
  "vaul-vue": "0.4.1",
194
- "vue-component-type-helpers": "^3.3.0"
194
+ "vue-component-type-helpers": "^3.3.3"
195
195
  },
196
196
  "devDependencies": {
197
197
  "@nuxt/eslint-config": "^1.15.2",
@@ -201,18 +201,18 @@
201
201
  "@tanstack/table-core": "^8.21.3",
202
202
  "@vitejs/plugin-vue": "^6.0.7",
203
203
  "@vue/test-utils": "^2.4.10",
204
- "ai": "^6.0.185",
204
+ "ai": "^6.0.193",
205
205
  "embla-carousel": "^8.6.0",
206
- "eslint": "^10.4.0",
206
+ "eslint": "^10.4.1",
207
207
  "happy-dom": "^20.9.0",
208
- "nuxt": "^4.4.6",
208
+ "nuxt": "^4.4.7",
209
209
  "release-it": "^19.2.4",
210
210
  "unbuild": "^3.6.1",
211
- "vitest": "^4.1.6",
211
+ "vitest": "^4.1.7",
212
212
  "vitest-axe": "^0.1.0",
213
- "vitest-environment-nuxt": "^1.0.1",
214
- "vue": "^3.5.34",
215
- "vue-tsc": "^3.3.0"
213
+ "vitest-environment-nuxt": "^2.0.0",
214
+ "vue": "^3.5.35",
215
+ "vue-tsc": "^3.3.3"
216
216
  },
217
217
  "peerDependencies": {
218
218
  "@inertiajs/vue3": "^2.0.7 || ^3.0.0",