@nuxt/ui 3.0.0-alpha.11 → 3.0.0-alpha.12

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 (112) hide show
  1. package/.nuxt/ui/alert.ts +1 -1
  2. package/.nuxt/ui/avatar.ts +1 -1
  3. package/.nuxt/ui/button.ts +0 -1
  4. package/.nuxt/ui/context-menu.ts +1 -1
  5. package/.nuxt/ui/dropdown-menu.ts +1 -1
  6. package/.nuxt/ui/navigation-menu.ts +79 -11
  7. package/cli/package.json +2 -2
  8. package/cli/templates.mjs +6 -6
  9. package/dist/chunks/component-meta.cjs +2590 -2511
  10. package/dist/chunks/component-meta.mjs +2590 -2511
  11. package/dist/client/devtools/200.html +1 -1
  12. package/dist/client/devtools/404.html +1 -1
  13. package/dist/client/devtools/_nuxt/{CQ-XZFu7.js → CgoQwOTV.js} +26 -23
  14. package/dist/client/devtools/_nuxt/{DNZFyo26.js → DLmPhbaq.js} +1 -1
  15. package/dist/client/devtools/_nuxt/{Dtz-o9GB.js → DYuJNiSW.js} +1 -1
  16. package/dist/client/devtools/_nuxt/builds/latest.json +1 -1
  17. package/dist/client/devtools/_nuxt/builds/meta/3184ffe2-7577-4441-af98-fe6e81c30e3a.json +1 -0
  18. package/dist/client/devtools/_nuxt/entry.ChJczkiN.css +1 -0
  19. package/dist/client/devtools/_nuxt/error-404.DyY3rYaL.css +1 -0
  20. package/dist/client/devtools/_nuxt/error-500.D_1PCaJh.css +1 -0
  21. package/dist/client/devtools/index.html +1 -1
  22. package/dist/module.cjs +1 -1
  23. package/dist/module.json +1 -1
  24. package/dist/module.mjs +1 -1
  25. package/dist/runtime/components/Accordion.vue +2 -2
  26. package/dist/runtime/components/Alert.vue +2 -2
  27. package/dist/runtime/components/Avatar.vue +31 -10
  28. package/dist/runtime/components/AvatarGroup.vue +2 -2
  29. package/dist/runtime/components/Badge.vue +2 -2
  30. package/dist/runtime/components/Breadcrumb.vue +2 -2
  31. package/dist/runtime/components/Button.vue +2 -2
  32. package/dist/runtime/components/ButtonGroup.vue +2 -2
  33. package/dist/runtime/components/Calendar.vue +4 -2
  34. package/dist/runtime/components/Card.vue +2 -2
  35. package/dist/runtime/components/Carousel.vue +2 -2
  36. package/dist/runtime/components/Checkbox.vue +4 -4
  37. package/dist/runtime/components/Chip.vue +2 -2
  38. package/dist/runtime/components/Collapsible.vue +2 -2
  39. package/dist/runtime/components/ColorPicker.vue +46 -15
  40. package/dist/runtime/components/CommandPalette.vue +2 -2
  41. package/dist/runtime/components/Container.vue +2 -2
  42. package/dist/runtime/components/ContextMenu.vue +2 -2
  43. package/dist/runtime/components/ContextMenuContent.vue +1 -1
  44. package/dist/runtime/components/Drawer.vue +2 -2
  45. package/dist/runtime/components/DropdownMenu.vue +2 -2
  46. package/dist/runtime/components/DropdownMenuContent.vue +1 -1
  47. package/dist/runtime/components/Form.vue +46 -17
  48. package/dist/runtime/components/FormField.vue +12 -6
  49. package/dist/runtime/components/Input.vue +5 -4
  50. package/dist/runtime/components/InputMenu.vue +6 -5
  51. package/dist/runtime/components/InputNumber.vue +7 -4
  52. package/dist/runtime/components/Kbd.vue +2 -2
  53. package/dist/runtime/components/Link.vue +2 -2
  54. package/dist/runtime/components/Modal.vue +2 -2
  55. package/dist/runtime/components/NavigationMenu.vue +89 -66
  56. package/dist/runtime/components/Pagination.vue +2 -2
  57. package/dist/runtime/components/PinInput.vue +5 -4
  58. package/dist/runtime/components/Popover.vue +2 -2
  59. package/dist/runtime/components/Progress.vue +2 -2
  60. package/dist/runtime/components/RadioGroup.vue +4 -4
  61. package/dist/runtime/components/Select.vue +9 -7
  62. package/dist/runtime/components/SelectMenu.vue +5 -4
  63. package/dist/runtime/components/Separator.vue +2 -2
  64. package/dist/runtime/components/Skeleton.vue +2 -2
  65. package/dist/runtime/components/Slideover.vue +2 -2
  66. package/dist/runtime/components/Slider.vue +4 -4
  67. package/dist/runtime/components/Stepper.vue +2 -2
  68. package/dist/runtime/components/Switch.vue +4 -4
  69. package/dist/runtime/components/Table.vue +2 -2
  70. package/dist/runtime/components/Tabs.vue +2 -2
  71. package/dist/runtime/components/Textarea.vue +5 -4
  72. package/dist/runtime/components/Toast.vue +2 -2
  73. package/dist/runtime/components/Toaster.vue +2 -2
  74. package/dist/runtime/components/Tooltip.vue +2 -2
  75. package/dist/runtime/composables/useFormField.d.ts +6 -2
  76. package/dist/runtime/composables/useFormField.js +18 -11
  77. package/dist/runtime/composables/useToast.d.ts +1 -1
  78. package/dist/runtime/composables/useToast.js +21 -7
  79. package/dist/runtime/index.css +1 -1
  80. package/dist/runtime/locale/es.js +2 -2
  81. package/dist/runtime/locale/he.js +53 -0
  82. package/dist/runtime/locale/hi.js +54 -0
  83. package/dist/runtime/locale/hu.d.ts +2 -0
  84. package/dist/runtime/locale/hu.js +54 -0
  85. package/dist/runtime/locale/index.d.ts +5 -2
  86. package/dist/runtime/locale/index.js +5 -2
  87. package/dist/runtime/locale/km.d.ts +2 -0
  88. package/dist/runtime/locale/km.js +54 -0
  89. package/dist/runtime/locale/nb_no.d.ts +2 -0
  90. package/dist/runtime/locale/nb_no.js +54 -0
  91. package/dist/runtime/locale/zh_cn.d.ts +2 -0
  92. package/dist/runtime/locale/{zh_hans.js → zh_cn.js} +1 -1
  93. package/dist/runtime/locale/zh_tw.d.ts +2 -0
  94. package/dist/runtime/locale/{zh_hant.js → zh_tw.js} +1 -1
  95. package/dist/runtime/plugins/colors.js +7 -4
  96. package/dist/runtime/types/form.d.ts +21 -12
  97. package/dist/runtime/utils/form.js +3 -5
  98. package/dist/runtime/utils/tv.js +2 -2
  99. package/dist/runtime/vue/components/Link.vue +2 -2
  100. package/dist/shared/{ui.BKsd22-Q.mjs → ui.CENZ17mM.mjs} +72 -16
  101. package/dist/shared/{ui.DCjJwb6l.cjs → ui.ClMXjgLK.cjs} +72 -16
  102. package/dist/unplugin.cjs +1 -1
  103. package/dist/unplugin.mjs +1 -1
  104. package/dist/vite.cjs +1 -1
  105. package/dist/vite.mjs +1 -1
  106. package/package.json +22 -23
  107. package/dist/client/devtools/_nuxt/builds/meta/1f5fbd7b-9d97-480e-9ae4-e02b4ff7018b.json +0 -1
  108. package/dist/client/devtools/_nuxt/entry.qOdop8tq.css +0 -1
  109. package/dist/client/devtools/_nuxt/error-404.D-rS9BDk.css +0 -1
  110. package/dist/client/devtools/_nuxt/error-500.CfcCHs91.css +0 -1
  111. /package/dist/runtime/locale/{zh_hans.d.ts → he.d.ts} +0 -0
  112. /package/dist/runtime/locale/{zh_hant.d.ts → hi.d.ts} +0 -0
@@ -8,9 +8,9 @@ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
8
8
  import { tv } from '../utils/tv'
9
9
  import type { AvatarProps, ButtonProps } from '../types'
10
10
 
11
- const appConfig = _appConfig as AppConfig & { ui: { toast: Partial<typeof theme> } }
11
+ const appConfigToast = _appConfig as AppConfig & { ui: { toast: Partial<typeof theme> } }
12
12
 
13
- const toast = tv({ extend: tv(theme), ...(appConfig.ui?.toast || {}) })
13
+ const toast = tv({ extend: tv(theme), ...(appConfigToast.ui?.toast || {}) })
14
14
 
15
15
  type ToastVariants = VariantProps<typeof toast>
16
16
 
@@ -7,9 +7,9 @@ import theme from '#build/ui/toaster'
7
7
  import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
8
8
  import { tv } from '../utils/tv'
9
9
 
10
- const appConfig = _appConfig as AppConfig & { ui: { toaster: Partial<typeof theme> } }
10
+ const appConfigToaster = _appConfig as AppConfig & { ui: { toaster: Partial<typeof theme> } }
11
11
 
12
- const toaster = tv({ extend: tv(theme), ...(appConfig.ui?.toaster || {}) })
12
+ const toaster = tv({ extend: tv(theme), ...(appConfigToaster.ui?.toaster || {}) })
13
13
 
14
14
  type ToasterVariants = VariantProps<typeof toaster>
15
15
 
@@ -7,9 +7,9 @@ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
7
7
  import { tv } from '../utils/tv'
8
8
  import type { KbdProps } from '../types'
9
9
 
10
- const appConfig = _appConfig as AppConfig & { ui: { tooltip: Partial<typeof theme> } }
10
+ const appConfigTooltip = _appConfig as AppConfig & { ui: { tooltip: Partial<typeof theme> } }
11
11
 
12
- const tooltip = tv({ extend: tv(theme), ...(appConfig.ui?.tooltip || {}) })
12
+ const tooltip = tv({ extend: tv(theme), ...(appConfigTooltip.ui?.tooltip || {}) })
13
13
 
14
14
  export interface TooltipProps extends TooltipRootProps {
15
15
  /** The text content of the tooltip. */
@@ -8,12 +8,11 @@ type Props<T> = {
8
8
  name?: string;
9
9
  size?: GetObjectField<T, 'size'>;
10
10
  color?: GetObjectField<T, 'color'>;
11
- legend?: string;
12
11
  highlight?: boolean;
13
12
  disabled?: boolean;
14
13
  };
15
14
  export declare const formOptionsInjectionKey: InjectionKey<ComputedRef<FormInjectedOptions>>;
16
- export declare const formBusInjectionKey: InjectionKey<UseEventBusReturn<FormEvent, string>>;
15
+ export declare const formBusInjectionKey: InjectionKey<UseEventBusReturn<FormEvent<any>, string>>;
17
16
  export declare const formFieldInjectionKey: InjectionKey<ComputedRef<FormFieldInjectedOptions<FormFieldProps>>>;
18
17
  export declare const inputIdInjectionKey: InjectionKey<Ref<string | undefined>>;
19
18
  export declare const formInputsInjectionKey: InjectionKey<Ref<Record<string, {
@@ -34,5 +33,10 @@ export declare function useFormField<T>(props?: Props<T>, opts?: {
34
33
  emitFormBlur: () => void;
35
34
  emitFormInput: import("@vueuse/core").PromisifyFn<() => void>;
36
35
  emitFormChange: () => void;
36
+ emitFormFocus: () => void;
37
+ ariaAttrs: ComputedRef<{
38
+ 'aria-describedby': string;
39
+ 'aria-invalid': boolean;
40
+ } | undefined>;
37
41
  };
38
42
  export {};
@@ -1,4 +1,4 @@
1
- import { inject, ref, computed } from "vue";
1
+ import { inject, computed } from "vue";
2
2
  import { useDebounceFn } from "@vueuse/core";
3
3
  export const formOptionsInjectionKey = Symbol("nuxt-ui.form-options");
4
4
  export const formBusInjectionKey = Symbol("nuxt-ui.form-events");
@@ -13,7 +13,7 @@ export function useFormField(props, opts) {
13
13
  const formInputs = inject(formInputsInjectionKey, void 0);
14
14
  const inputId = inject(inputIdInjectionKey, void 0);
15
15
  if (formField && inputId) {
16
- if (opts?.bind === false || props?.legend) {
16
+ if (opts?.bind === false) {
17
17
  inputId.value = void 0;
18
18
  } else if (props?.id) {
19
19
  inputId.value = props?.id;
@@ -22,25 +22,23 @@ export function useFormField(props, opts) {
22
22
  formInputs.value[formField.value.name] = { id: inputId.value, pattern: formField.value.errorPattern };
23
23
  }
24
24
  }
25
- const touched = ref(false);
26
- function emitFormEvent(type, name) {
25
+ function emitFormEvent(type, name, eager) {
27
26
  if (formBus && formField && name) {
28
- formBus.emit({ type, name });
27
+ formBus.emit({ type, name, eager });
29
28
  }
30
29
  }
31
30
  function emitFormBlur() {
32
- touched.value = true;
33
31
  emitFormEvent("blur", formField?.value.name);
34
32
  }
33
+ function emitFormFocus() {
34
+ emitFormEvent("focus", formField?.value.name);
35
+ }
35
36
  function emitFormChange() {
36
- touched.value = true;
37
37
  emitFormEvent("change", formField?.value.name);
38
38
  }
39
39
  const emitFormInput = useDebounceFn(
40
40
  () => {
41
- if (!opts?.deferInputValidation || touched.value || formField?.value.eagerValidation) {
42
- emitFormEvent("input", formField?.value.name);
43
- }
41
+ emitFormEvent("input", formField?.value.name, !opts?.deferInputValidation || formField?.value.eagerValidation);
44
42
  },
45
43
  formField?.value.validateOnInputDelay ?? formOptions?.value.validateOnInputDelay ?? 0
46
44
  );
@@ -53,6 +51,15 @@ export function useFormField(props, opts) {
53
51
  disabled: computed(() => formOptions?.value.disabled || props?.disabled),
54
52
  emitFormBlur,
55
53
  emitFormInput,
56
- emitFormChange
54
+ emitFormChange,
55
+ emitFormFocus,
56
+ ariaAttrs: computed(() => {
57
+ if (!formField?.value) return;
58
+ const descriptiveAttrs = ["error", "hint", "description"].filter((type) => formField?.value?.[type]).map((type) => `${formField?.value.ariaId}-${type}`) || [];
59
+ return {
60
+ "aria-describedby": descriptiveAttrs.join(" "),
61
+ "aria-invalid": !!formField?.value.error
62
+ };
63
+ })
57
64
  };
58
65
  }
@@ -5,7 +5,7 @@ export interface Toast extends Omit<ToastProps, 'defaultOpen'> {
5
5
  }
6
6
  export declare function useToast(): {
7
7
  toasts: import("vue").Ref<Toast[], Toast[]>;
8
- add: (toast: Partial<Toast>) => Toast;
8
+ add: (toast: Partial<Toast>) => Promise<Toast>;
9
9
  update: (id: string | number, toast: Omit<Partial<Toast>, "id">) => void;
10
10
  remove: (id: string | number) => void;
11
11
  clear: () => void;
@@ -1,17 +1,31 @@
1
+ import { ref, nextTick } from "vue";
1
2
  import { useState } from "#imports";
2
3
  export function useToast() {
3
4
  const toasts = useState("toasts", () => []);
4
- function add(toast) {
5
+ const maxToasts = 5;
6
+ const running = ref(false);
7
+ const queue = [];
8
+ const generateId = () => `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
9
+ async function processQueue() {
10
+ if (running.value || queue.length === 0) {
11
+ return;
12
+ }
13
+ running.value = true;
14
+ while (queue.length > 0) {
15
+ const toast = queue.shift();
16
+ await nextTick();
17
+ toasts.value = [...toasts.value, toast].slice(-maxToasts);
18
+ }
19
+ running.value = false;
20
+ }
21
+ async function add(toast) {
5
22
  const body = {
6
- id: (/* @__PURE__ */ new Date()).getTime().toString(),
23
+ id: generateId(),
7
24
  open: true,
8
25
  ...toast
9
26
  };
10
- const index = toasts.value.findIndex((t) => t.id === body.id);
11
- if (index === -1) {
12
- toasts.value.push(body);
13
- }
14
- toasts.value = toasts.value.slice(-5);
27
+ queue.push(body);
28
+ await processQueue();
15
29
  return body;
16
30
  }
17
31
  function update(id, toast) {
@@ -1 +1 @@
1
- @import "./keyframes.css";@variant dark (&:where(.dark, .dark *));@layer base{body{@apply antialiased text-[var(--ui-text)] bg-[var(--ui-bg)] scheme-light dark:scheme-dark}:root{--ui-text-dimmed:var(--ui-color-neutral-400);--ui-text-muted:var(--ui-color-neutral-500);--ui-text-toned:var(--ui-color-neutral-600);--ui-text:var(--ui-color-neutral-700);--ui-text-highlighted:var(--ui-color-neutral-900);--ui-bg:var(--color-white);--ui-bg-muted:var(--ui-color-neutral-50);--ui-bg-elevated:var(--ui-color-neutral-100);--ui-bg-accented:var(--ui-color-neutral-200);--ui-bg-inverted:var(--ui-color-neutral-900);--ui-border:var(--ui-color-neutral-200);--ui-border-muted:var(--ui-color-neutral-200);--ui-border-accented:var(--ui-color-neutral-300);--ui-border-inverted:var(--ui-color-neutral-900);--ui-radius:var(--radius-sm);--ui-container:var(--container-7xl)}.dark{--ui-text-dimmed:var(--ui-color-neutral-500);--ui-text-muted:var(--ui-color-neutral-400);--ui-text-toned:var(--ui-color-neutral-300);--ui-text:var(--ui-color-neutral-200);--ui-text-highlighted:var(--color-white);--ui-bg:var(--ui-color-neutral-900);--ui-bg-muted:var(--ui-color-neutral-800);--ui-bg-elevated:var(--ui-color-neutral-800);--ui-bg-accented:var(--ui-color-neutral-700);--ui-bg-inverted:var(--color-white);--ui-border:var(--ui-color-neutral-800);--ui-border-muted:var(--ui-color-neutral-700);--ui-border-accented:var(--ui-color-neutral-700);--ui-border-inverted:var(--color-white)}}
1
+ @import "./keyframes.css";@variant light (&:where(.light, .light *));@variant dark (&:where(.dark, .dark *));@layer base{body{@apply antialiased text-[var(--ui-text)] bg-[var(--ui-bg)] scheme-light dark:scheme-dark}.light,:root{--ui-text-dimmed:var(--ui-color-neutral-400);--ui-text-muted:var(--ui-color-neutral-500);--ui-text-toned:var(--ui-color-neutral-600);--ui-text:var(--ui-color-neutral-700);--ui-text-highlighted:var(--ui-color-neutral-900);--ui-bg:var(--color-white);--ui-bg-muted:var(--ui-color-neutral-50);--ui-bg-elevated:var(--ui-color-neutral-100);--ui-bg-accented:var(--ui-color-neutral-200);--ui-bg-inverted:var(--ui-color-neutral-900);--ui-border:var(--ui-color-neutral-200);--ui-border-muted:var(--ui-color-neutral-200);--ui-border-accented:var(--ui-color-neutral-300);--ui-border-inverted:var(--ui-color-neutral-900);--ui-radius:var(--radius-sm);--ui-container:var(--container-7xl)}.dark{--ui-text-dimmed:var(--ui-color-neutral-500);--ui-text-muted:var(--ui-color-neutral-400);--ui-text-toned:var(--ui-color-neutral-300);--ui-text:var(--ui-color-neutral-200);--ui-text-highlighted:var(--color-white);--ui-bg:var(--ui-color-neutral-900);--ui-bg-muted:var(--ui-color-neutral-800);--ui-bg-elevated:var(--ui-color-neutral-800);--ui-bg-accented:var(--ui-color-neutral-700);--ui-bg-inverted:var(--color-white);--ui-border:var(--ui-color-neutral-800);--ui-border-muted:var(--ui-color-neutral-700);--ui-border-accented:var(--ui-color-neutral-700);--ui-border-inverted:var(--color-white)}}
@@ -9,8 +9,8 @@ export default defineLocale({
9
9
  create: 'Crear "{label}"'
10
10
  },
11
11
  calendar: {
12
- prevYear: "A o anterior",
13
- nextYear: "A o siguiente",
12
+ prevYear: "A\xF1o anterior",
13
+ nextYear: "A\xF1o siguiente",
14
14
  prevMonth: "Mes anterior",
15
15
  nextMonth: "Mes siguiente"
16
16
  },
@@ -0,0 +1,53 @@
1
+ import { defineLocale } from "../composables/defineLocale.js";
2
+ export default defineLocale({
3
+ name: "Hebrew",
4
+ code: "he",
5
+ dir: "rtl",
6
+ messages: {
7
+ inputMenu: {
8
+ noMatch: "\u05D0\u05D9\u05DF \u05D4\u05EA\u05D0\u05DE\u05D4",
9
+ noData: "\u05D0\u05D9\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD",
10
+ create: '\u05E6\u05D5\u05E8 "{label}"'
11
+ },
12
+ calendar: {
13
+ prevYear: "\u05E9\u05E0\u05D4 \u05E7\u05D5\u05D3\u05DE\u05EA",
14
+ nextYear: "\u05E9\u05E0\u05D4 \u05D4\u05D1\u05D0\u05D4",
15
+ prevMonth: "\u05D7\u05D5\u05D3\u05E9 \u05E7\u05D5\u05D3\u05DD",
16
+ nextMonth: "\u05D7\u05D5\u05D3\u05E9 \u05D4\u05D1\u05D0"
17
+ },
18
+ inputNumber: {
19
+ increment: "\u05D4\u05D5\u05E1\u05E3",
20
+ decrement: "\u05D4\u05E4\u05D7\u05EA"
21
+ },
22
+ commandPalette: {
23
+ placeholder: "\u05D4\u05E7\u05DC\u05D3 \u05E4\u05E7\u05D5\u05D3\u05D4...",
24
+ noMatch: "\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D4 \u05D4\u05EA\u05D0\u05DE\u05D4",
25
+ noData: "\u05D0\u05D9\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05D6\u05DE\u05D9\u05E0\u05D9\u05DD",
26
+ close: "\u05E1\u05D2\u05D5\u05E8"
27
+ },
28
+ selectMenu: {
29
+ noMatch: "\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D4 \u05D4\u05EA\u05D0\u05DE\u05D4",
30
+ noData: "\u05D0\u05D9\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD",
31
+ create: '\u05E6\u05D5\u05E8 "{label}"',
32
+ search: "\u05D7\u05E4\u05E9..."
33
+ },
34
+ toast: { close: "\u05E1\u05D2\u05D5\u05E8" },
35
+ carousel: {
36
+ prev: "\u05D4\u05E7\u05D5\u05D3\u05DD",
37
+ next: "\u05D4\u05D1\u05D0",
38
+ goto: "\u05DE\u05E2\u05D1\u05E8 \u05DC {slide}"
39
+ },
40
+ modal: {
41
+ close: "\u05E1\u05D2\u05D5\u05E8"
42
+ },
43
+ slideover: {
44
+ close: "\u05E1\u05D2\u05D5\u05E8"
45
+ },
46
+ alert: {
47
+ close: "\u05E1\u05D2\u05D5\u05E8"
48
+ },
49
+ table: {
50
+ noData: "\u05D0\u05D9\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05DC\u05D4\u05E6\u05D2\u05D4"
51
+ }
52
+ }
53
+ });
@@ -0,0 +1,54 @@
1
+ import { defineLocale } from "../composables/defineLocale.js";
2
+ export default defineLocale({
3
+ name: "Hindi",
4
+ code: "hi",
5
+ messages: {
6
+ inputMenu: {
7
+ noMatch: "\u0915\u094B\u0908 \u092E\u0947\u0932 \u0916\u093E\u0924\u093E \u0921\u0947\u091F\u093E \u0928\u0939\u0940\u0902",
8
+ noData: "\u0915\u094B\u0908 \u0921\u0947\u091F\u093E \u0928\u0939\u0940\u0902",
9
+ create: '"{label}" \u092C\u0928\u093E\u090F\u0901'
10
+ },
11
+ calendar: {
12
+ prevYear: "\u092A\u093F\u091B\u0932\u093E \u0935\u0930\u094D\u0937",
13
+ nextYear: "\u0905\u0917\u0932\u093E \u0935\u0930\u094D\u0937",
14
+ prevMonth: "\u092A\u093F\u091B\u0932\u093E \u092E\u0939\u0940\u0928\u093E",
15
+ nextMonth: "\u0905\u0917\u0932\u093E \u092E\u0939\u0940\u0928\u093E"
16
+ },
17
+ inputNumber: {
18
+ increment: "\u092C\u0922\u093C\u093E\u0928\u093E",
19
+ decrement: "\u0918\u091F\u093E\u0928\u093E"
20
+ },
21
+ commandPalette: {
22
+ placeholder: "\u090F\u0915 \u0906\u0926\u0947\u0936 \u092F\u093E \u0916\u094B\u091C \u091F\u093E\u0907\u092A \u0915\u0930\u0947\u0902...",
23
+ noMatch: "\u0915\u094B\u0908 \u092E\u0947\u0932 \u0916\u093E\u0924\u093E \u0921\u0947\u091F\u093E \u0928\u0939\u0940\u0902",
24
+ noData: "\u0915\u094B\u0908 \u0921\u0947\u091F\u093E \u0928\u0939\u0940\u0902",
25
+ close: "\u092C\u0902\u0926 \u0915\u0930\u0947\u0902"
26
+ },
27
+ selectMenu: {
28
+ noMatch: "\u0915\u094B\u0908 \u092E\u0947\u0932 \u0916\u093E\u0924\u093E \u0921\u0947\u091F\u093E \u0928\u0939\u0940\u0902",
29
+ noData: "\u0915\u094B\u0908 \u0921\u0947\u091F\u093E \u0928\u0939\u0940\u0902",
30
+ create: '"{label}" \u092C\u0928\u093E\u090F\u0901',
31
+ search: "\u0916\u094B\u091C\u0947\u0902..."
32
+ },
33
+ toast: {
34
+ close: "\u092C\u0902\u0926 \u0915\u0930\u0947\u0902"
35
+ },
36
+ carousel: {
37
+ prev: "\u092A\u093F\u091B\u0932\u093E",
38
+ next: "\u0905\u0917\u0932\u093E",
39
+ goto: "\u0938\u094D\u0932\u093E\u0907\u0921 {slide} \u092A\u0930 \u091C\u093E\u090F\u0901"
40
+ },
41
+ modal: {
42
+ close: "\u092C\u0902\u0926 \u0915\u0930\u0947\u0902"
43
+ },
44
+ slideover: {
45
+ close: "\u092C\u0902\u0926 \u0915\u0930\u0947\u0902"
46
+ },
47
+ alert: {
48
+ close: "\u092C\u0902\u0926 \u0915\u0930\u0947\u0902"
49
+ },
50
+ table: {
51
+ noData: "\u0915\u094B\u0908 \u0921\u0947\u091F\u093E \u0928\u0939\u0940\u0902"
52
+ }
53
+ }
54
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: import("../types").Locale;
2
+ export default _default;
@@ -0,0 +1,54 @@
1
+ import { defineLocale } from "../composables/defineLocale.js";
2
+ export default defineLocale({
3
+ name: "Magyar",
4
+ code: "hu",
5
+ messages: {
6
+ inputMenu: {
7
+ noMatch: "Nincs tal\xE1lat",
8
+ noData: "Nincs adat",
9
+ create: '"{label}" l\xE9trehoz\xE1sa'
10
+ },
11
+ calendar: {
12
+ prevYear: "El\u0151z\u0151 \xE9v",
13
+ nextYear: "K\xF6vetkez\u0151 \xE9v",
14
+ prevMonth: "El\u0151z\u0151 h\xF3nap",
15
+ nextMonth: "K\xF6vetkez\u0151 h\xF3nap"
16
+ },
17
+ inputNumber: {
18
+ increment: "N\xF6vel",
19
+ decrement: "Cs\xF6kkent"
20
+ },
21
+ commandPalette: {
22
+ placeholder: "\xCDrjon be egy parancsot vagy keressen...",
23
+ noMatch: "Nincs tal\xE1lat",
24
+ noData: "Nincs adat",
25
+ close: "Bez\xE1r\xE1s"
26
+ },
27
+ selectMenu: {
28
+ noMatch: "Nincs tal\xE1lat",
29
+ noData: "Nincs adat",
30
+ create: '"{label}" l\xE9trehoz\xE1sa',
31
+ search: "Keres\xE9s..."
32
+ },
33
+ toast: {
34
+ close: "Bez\xE1r\xE1s"
35
+ },
36
+ carousel: {
37
+ prev: "El\u0151z\u0151",
38
+ next: "K\xF6vetkez\u0151",
39
+ goto: "Ugr\xE1s ide {slide}"
40
+ },
41
+ modal: {
42
+ close: "Bez\xE1r\xE1s"
43
+ },
44
+ slideover: {
45
+ close: "Bez\xE1r\xE1s"
46
+ },
47
+ alert: {
48
+ close: "Bez\xE1r\xE1s"
49
+ },
50
+ table: {
51
+ noData: "Nincs adat"
52
+ }
53
+ }
54
+ });
@@ -9,10 +9,12 @@ export { default as es } from './es';
9
9
  export { default as fa_ir } from './fa_ir';
10
10
  export { default as fi } from './fi';
11
11
  export { default as fr } from './fr';
12
+ export { default as hi } from './hi';
12
13
  export { default as id } from './id';
13
14
  export { default as it } from './it';
14
15
  export { default as ja } from './ja';
15
16
  export { default as ko } from './ko';
17
+ export { default as nb_no } from './nb_no';
16
18
  export { default as nl } from './nl';
17
19
  export { default as pl } from './pl';
18
20
  export { default as pt } from './pt';
@@ -24,5 +26,6 @@ export { default as th } from './th';
24
26
  export { default as tr } from './tr';
25
27
  export { default as uk } from './uk';
26
28
  export { default as vi } from './vi';
27
- export { default as zh_hans } from './zh_hans';
28
- export { default as zh_hant } from './zh_hant';
29
+ export { default as zh_cn } from './zh_cn';
30
+ export { default as zh_tw } from './zh_tw';
31
+ export { default as he } from './he';
@@ -9,10 +9,12 @@ export { default as es } from "./es.js";
9
9
  export { default as fa_ir } from "./fa_ir.js";
10
10
  export { default as fi } from "./fi.js";
11
11
  export { default as fr } from "./fr.js";
12
+ export { default as hi } from "./hi.js";
12
13
  export { default as id } from "./id.js";
13
14
  export { default as it } from "./it.js";
14
15
  export { default as ja } from "./ja.js";
15
16
  export { default as ko } from "./ko.js";
17
+ export { default as nb_no } from "./nb_no.js";
16
18
  export { default as nl } from "./nl.js";
17
19
  export { default as pl } from "./pl.js";
18
20
  export { default as pt } from "./pt.js";
@@ -24,5 +26,6 @@ export { default as th } from "./th.js";
24
26
  export { default as tr } from "./tr.js";
25
27
  export { default as uk } from "./uk.js";
26
28
  export { default as vi } from "./vi.js";
27
- export { default as zh_hans } from "./zh_hans.js";
28
- export { default as zh_hant } from "./zh_hant.js";
29
+ export { default as zh_cn } from "./zh_cn.js";
30
+ export { default as zh_tw } from "./zh_tw.js";
31
+ export { default as he } from "./he.js";
@@ -0,0 +1,2 @@
1
+ declare const _default: import("../types").Locale;
2
+ export default _default;
@@ -0,0 +1,54 @@
1
+ import { defineLocale } from "../composables/defineLocale.js";
2
+ export default defineLocale({
3
+ name: "\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A",
4
+ code: "km",
5
+ messages: {
6
+ inputMenu: {
7
+ noMatch: "\u1798\u17B7\u1793\u1798\u17B6\u1793\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u178A\u17C2\u179B\u178F\u17D2\u179A\u17BC\u179C\u1782\u17D2\u1793\u17B6\u1791\u17C1",
8
+ noData: "\u1798\u17B7\u1793\u1798\u17B6\u1793\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799",
9
+ create: '\u1794\u1784\u17D2\u1780\u17BE\u178F "{label}"'
10
+ },
11
+ calendar: {
12
+ prevYear: "\u1786\u17D2\u1793\u17B6\u17C6\u1798\u17BB\u1793",
13
+ nextYear: "\u1786\u17D2\u1793\u17B6\u17C6\u1794\u1793\u17D2\u1791\u17B6\u1794\u17CB",
14
+ prevMonth: "\u1781\u17C2\u1798\u17BB\u1793",
15
+ nextMonth: "\u1781\u17C2\u1794\u1793\u17D2\u1791\u17B6\u1794\u17CB"
16
+ },
17
+ inputNumber: {
18
+ increment: "\u1794\u1784\u17D2\u1780\u17BE\u1793",
19
+ decrement: "\u1794\u1793\u17D2\u1790\u1799"
20
+ },
21
+ commandPalette: {
22
+ placeholder: "\u179C\u17B6\u1799\u1796\u17B6\u1780\u17D2\u1799\u1794\u1789\u17D2\u1787\u17B6 \u17AC\u179F\u17D2\u179C\u17C2\u1784\u179A\u1780...",
23
+ noMatch: "\u1798\u17B7\u1793\u1798\u17B6\u1793\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u178A\u17C2\u179B\u178F\u17D2\u179A\u17BC\u179C\u1782\u17D2\u1793\u17B6\u1791\u17C1",
24
+ noData: "\u1798\u17B7\u1793\u1798\u17B6\u1793\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799",
25
+ close: "\u1794\u17B7\u1791"
26
+ },
27
+ selectMenu: {
28
+ noMatch: "\u1798\u17B7\u1793\u1798\u17B6\u1793\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u178A\u17C2\u179B\u178F\u17D2\u179A\u17BC\u179C\u1782\u17D2\u1793\u17B6\u1791\u17C1",
29
+ noData: "\u1798\u17B7\u1793\u1798\u17B6\u1793\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799",
30
+ create: '\u1794\u1784\u17D2\u1780\u17BE\u178F "{label}"',
31
+ search: "\u179F\u17D2\u179C\u17C2\u1784\u179A\u1780..."
32
+ },
33
+ toast: {
34
+ close: "\u1794\u17B7\u1791"
35
+ },
36
+ carousel: {
37
+ prev: "\u1798\u17BB\u1793",
38
+ next: "\u1794\u1793\u17D2\u1791\u17B6\u1794\u17CB",
39
+ goto: "\u179B\u17C4\u178F\u1791\u17C5\u1780\u17B6\u1793\u17CB\u179F\u17D2\u179B\u17B6\u1799 {slide}"
40
+ },
41
+ modal: {
42
+ close: "\u1794\u17B7\u1791"
43
+ },
44
+ slideover: {
45
+ close: "\u1794\u17B7\u1791"
46
+ },
47
+ alert: {
48
+ close: "\u1794\u17B7\u1791"
49
+ },
50
+ table: {
51
+ noData: "\u1798\u17B7\u1793\u1798\u17B6\u1793\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799"
52
+ }
53
+ }
54
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: import("../types").Locale;
2
+ export default _default;
@@ -0,0 +1,54 @@
1
+ import { defineLocale } from "../composables/defineLocale.js";
2
+ export default defineLocale({
3
+ name: "Norsk Bokm\xE5l",
4
+ code: "nb-NO",
5
+ messages: {
6
+ inputMenu: {
7
+ noMatch: "Ingen samsvarende data",
8
+ noData: "Ingen data",
9
+ create: 'Opprett "{label}"'
10
+ },
11
+ calendar: {
12
+ prevYear: "Forrige \xE5r",
13
+ nextYear: "Neste \xE5r",
14
+ prevMonth: "Forrige m\xE5ned",
15
+ nextMonth: "Neste m\xE5ned"
16
+ },
17
+ inputNumber: {
18
+ increment: "\xD8k",
19
+ decrement: "Reduser"
20
+ },
21
+ commandPalette: {
22
+ placeholder: "Skriv inn en kommando eller s\xF8k...",
23
+ noMatch: "Ingen samsvarende data",
24
+ noData: "Ingen data",
25
+ close: "Lukk"
26
+ },
27
+ selectMenu: {
28
+ noMatch: "Ingen samsvarende data",
29
+ noData: "Ingen data",
30
+ create: 'Opprett "{label}"',
31
+ search: "S\xF8k..."
32
+ },
33
+ toast: {
34
+ close: "Lukk"
35
+ },
36
+ carousel: {
37
+ prev: "Forrige",
38
+ next: "Neste",
39
+ goto: "G\xE5 til lysbilde {slide}"
40
+ },
41
+ modal: {
42
+ close: "Lukk"
43
+ },
44
+ slideover: {
45
+ close: "Lukk"
46
+ },
47
+ alert: {
48
+ close: "Lukk"
49
+ },
50
+ table: {
51
+ noData: "Ingen data"
52
+ }
53
+ }
54
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: import("../types").Locale;
2
+ export default _default;
@@ -1,7 +1,7 @@
1
1
  import { defineLocale } from "../composables/defineLocale.js";
2
2
  export default defineLocale({
3
3
  name: "\u7B80\u4F53\u4E2D\u6587",
4
- code: "zh-Hans",
4
+ code: "zh-CN",
5
5
  messages: {
6
6
  inputMenu: {
7
7
  noMatch: "\u6CA1\u6709\u5339\u914D\u7684\u6570\u636E",
@@ -0,0 +1,2 @@
1
+ declare const _default: import("../types").Locale;
2
+ export default _default;
@@ -1,7 +1,7 @@
1
1
  import { defineLocale } from "../composables/defineLocale.js";
2
2
  export default defineLocale({
3
3
  name: "\u7E41\u9AD4\u4E2D\u6587",
4
- code: "zh-Hant",
4
+ code: "zh-TW",
5
5
  messages: {
6
6
  inputMenu: {
7
7
  noMatch: "\u6C92\u6709\u76F8\u7B26\u7684\u8CC7\u6599",
@@ -12,13 +12,16 @@ export default defineNuxtPlugin(() => {
12
12
  }
13
13
  const root = computed(() => {
14
14
  const { neutral, ...colors } = appConfig.ui.colors;
15
- return `:root {
15
+ return `@layer base {
16
+ :root {
16
17
  ${Object.entries(appConfig.ui.colors).map(([key, value]) => generateShades(key, value)).join("\n ")}
17
-
18
+ }
19
+ :root, .light {
18
20
  ${Object.keys(colors).map((key) => generateColor(key, 500)).join("\n ")}
19
- }
20
- .dark {
21
+ }
22
+ .dark {
21
23
  ${Object.keys(colors).map((key) => generateColor(key, 400)).join("\n ")}
24
+ }
22
25
  }`;
23
26
  });
24
27
  const headData = {
@@ -1,26 +1,31 @@
1
1
  import type { StandardSchemaV1 } from '@standard-schema/spec';
2
- import type { ComputedRef, Ref } from 'vue';
2
+ import type { ComputedRef, DeepReadonly, Ref } from 'vue';
3
3
  import type { ZodSchema } from 'zod';
4
4
  import type { Schema as JoiSchema } from 'joi';
5
5
  import type { ObjectSchema as YupObjectSchema } from 'yup';
6
6
  import type { GenericSchema as ValibotSchema, GenericSchemaAsync as ValibotSchemaAsync, SafeParser as ValibotSafeParser, SafeParserAsync as ValibotSafeParserAsync } from 'valibot';
7
7
  import type { GetObjectField } from './utils';
8
8
  import type { Struct as SuperstructSchema } from 'superstruct';
9
- export interface Form<T> {
9
+ export interface Form<T extends object> {
10
10
  validate(opts?: {
11
- name: string | string[];
12
- silent?: false;
11
+ name?: keyof T | (keyof T)[];
12
+ silent?: boolean;
13
13
  nested?: boolean;
14
+ transform?: boolean;
14
15
  }): Promise<T | false>;
15
16
  clear(path?: string): void;
16
17
  errors: Ref<FormError[]>;
17
- setErrors(errs: FormError[], path?: string): void;
18
- getErrors(path?: string): FormError[];
18
+ setErrors(errs: FormError[], name?: keyof T): void;
19
+ getErrors(name?: keyof T): FormError[];
19
20
  submit(): Promise<void>;
20
21
  disabled: ComputedRef<boolean>;
22
+ dirty: ComputedRef<boolean>;
23
+ dirtyFields: DeepReadonly<Set<keyof T>>;
24
+ touchedFields: DeepReadonly<Set<keyof T>>;
25
+ blurredFields: DeepReadonly<Set<keyof T>>;
21
26
  }
22
- export type FormSchema<T extends Record<string, any>> = ZodSchema | YupObjectSchema<T> | ValibotSchema | ValibotSchemaAsync | ValibotSafeParser<any, any> | ValibotSafeParserAsync<any, any> | JoiSchema<T> | SuperstructSchema<any, any> | StandardSchemaV1;
23
- export type FormInputEvents = 'input' | 'blur' | 'change';
27
+ export type FormSchema<T extends object> = ZodSchema | YupObjectSchema<T> | ValibotSchema | ValibotSchemaAsync | ValibotSafeParser<any, any> | ValibotSafeParserAsync<any, any> | JoiSchema<T> | SuperstructSchema<any, any> | StandardSchemaV1;
28
+ export type FormInputEvents = 'input' | 'blur' | 'change' | 'focus';
24
29
  export interface FormError<P extends string = string> {
25
30
  name: P;
26
31
  message: string;
@@ -46,11 +51,12 @@ export type FormChildDetachEvent = {
46
51
  type: 'detach';
47
52
  formId: string | number;
48
53
  };
49
- export type FormInputEvent = {
54
+ export type FormInputEvent<T extends object> = {
50
55
  type: FormEventType;
51
- name?: string;
56
+ name: keyof T;
57
+ eager?: boolean;
52
58
  };
53
- export type FormEvent = FormInputEvent | FormChildAttachEvent | FormChildDetachEvent;
59
+ export type FormEvent<T extends object> = FormInputEvent<T> | FormChildAttachEvent | FormChildDetachEvent;
54
60
  export interface FormInjectedOptions {
55
61
  disabled?: boolean;
56
62
  validateOnInputDelay?: number;
@@ -62,6 +68,9 @@ export interface FormFieldInjectedOptions<T> {
62
68
  eagerValidation?: boolean;
63
69
  validateOnInputDelay?: number;
64
70
  errorPattern?: RegExp;
71
+ hint?: string;
72
+ description?: string;
73
+ ariaId: string;
65
74
  }
66
75
  export interface ValidateReturnSchema<T> {
67
76
  result: T;
@@ -71,5 +80,5 @@ export declare class FormValidationException extends Error {
71
80
  formId: string | number;
72
81
  errors: FormErrorWithId[];
73
82
  children?: FormValidationException[];
74
- constructor(formId: string | number, errors: FormErrorWithId[], childErrors: FormValidationException[]);
83
+ constructor(formId: string | number, errors: FormErrorWithId[], childErrors?: FormValidationException[]);
75
84
  }