@wirecore/wirelayer-vue 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/{Button-DZ_ZGl7X.js → Button-BpMOPs8b.js} +7 -8
  2. package/dist/{ContextMenu-R23YbbaS.js → ContextMenu-C5JKyNlX.js} +132 -111
  3. package/dist/{Field-BdIPugFP.js → Field-B1EsNF84.js} +20 -17
  4. package/dist/{Highlight-DvGcm2QR.js → Highlight-Cg8DvCfq.js} +1 -1
  5. package/dist/{Input-C59NJK4m.js → Input-BhnYMKjE.js} +5 -4
  6. package/dist/{InputStatus-CUyF9-GR.js → InputStatus-D7kBGlew.js} +4 -1
  7. package/dist/{Select-BlEjQWBP.js → Select-DAuYpE1c.js} +3 -1
  8. package/dist/{Tree-B39xwNbU.js → Tree-DWxqSrO6.js} +2 -2
  9. package/dist/chart/Chart.vue.d.ts +10 -4
  10. package/dist/chart/Chart.vue.d.ts.map +1 -1
  11. package/dist/chart/index.d.ts +2 -0
  12. package/dist/chart/index.d.ts.map +1 -1
  13. package/dist/chart.js +29 -23
  14. package/dist/code.js +1 -1
  15. package/dist/components/Badge/Badge.vue.d.ts +2 -0
  16. package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
  17. package/dist/components/Button/Button.vue.d.ts +5 -0
  18. package/dist/components/Button/Button.vue.d.ts.map +1 -1
  19. package/dist/components/ChipGroup/ChipGroup.vue.d.ts +1 -1
  20. package/dist/components/ChipGroup/ChipGroup.vue.d.ts.map +1 -1
  21. package/dist/components/Combobox/Combobox.vue.d.ts +6 -1
  22. package/dist/components/Combobox/Combobox.vue.d.ts.map +1 -1
  23. package/dist/components/DatePicker/DatePicker.vue.d.ts +2 -0
  24. package/dist/components/DatePicker/DatePicker.vue.d.ts.map +1 -1
  25. package/dist/components/DatePicker/DatePickerBase.vue.d.ts +2 -0
  26. package/dist/components/DatePicker/DatePickerBase.vue.d.ts.map +1 -1
  27. package/dist/components/DateRangePicker/DateRangePicker.vue.d.ts +2 -0
  28. package/dist/components/DateRangePicker/DateRangePicker.vue.d.ts.map +1 -1
  29. package/dist/components/Dialog/DialogContent.vue.d.ts +10 -6
  30. package/dist/components/Dialog/DialogContent.vue.d.ts.map +1 -1
  31. package/dist/components/Drawer/DrawerContent.vue.d.ts +5 -5
  32. package/dist/components/Drawer/DrawerContent.vue.d.ts.map +1 -1
  33. package/dist/components/EmptyState/EmptyState.vue.d.ts +5 -5
  34. package/dist/components/EmptyState/EmptyState.vue.d.ts.map +1 -1
  35. package/dist/components/Field/Field.vue.d.ts +12 -2
  36. package/dist/components/Field/Field.vue.d.ts.map +1 -1
  37. package/dist/components/Field/context.d.ts +3 -1
  38. package/dist/components/Field/context.d.ts.map +1 -1
  39. package/dist/components/FileUpload/FileUpload.vue.d.ts +11 -0
  40. package/dist/components/FileUpload/FileUpload.vue.d.ts.map +1 -1
  41. package/dist/components/IconButton/IconButton.vue.d.ts +2 -0
  42. package/dist/components/IconButton/IconButton.vue.d.ts.map +1 -1
  43. package/dist/components/LocaleProvider/LocaleProvider.vue.d.ts +1 -0
  44. package/dist/components/LocaleProvider/LocaleProvider.vue.d.ts.map +1 -1
  45. package/dist/components/MonthPicker/MonthPicker.vue.d.ts +2 -0
  46. package/dist/components/MonthPicker/MonthPicker.vue.d.ts.map +1 -1
  47. package/dist/components/MultiSelect/MultiSelect.vue.d.ts +6 -1
  48. package/dist/components/MultiSelect/MultiSelect.vue.d.ts.map +1 -1
  49. package/dist/components/RadioGroup/RadioGroup.vue.d.ts +1 -1
  50. package/dist/components/RadioGroup/RadioGroup.vue.d.ts.map +1 -1
  51. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts +2 -2
  52. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -1
  53. package/dist/components/Select/Select.vue.d.ts +6 -1
  54. package/dist/components/Select/Select.vue.d.ts.map +1 -1
  55. package/dist/components/Select/types.d.ts +2 -0
  56. package/dist/components/Select/types.d.ts.map +1 -1
  57. package/dist/components/Toast/Toaster.vue.d.ts +12 -2
  58. package/dist/components/Toast/Toaster.vue.d.ts.map +1 -1
  59. package/dist/components/ToggleButton/ToggleButton.vue.d.ts +9 -2
  60. package/dist/components/ToggleButton/ToggleButton.vue.d.ts.map +1 -1
  61. package/dist/components/YearPicker/YearPicker.vue.d.ts +2 -0
  62. package/dist/components/YearPicker/YearPicker.vue.d.ts.map +1 -1
  63. package/dist/data-table/DataTable.vue.d.ts +28 -2
  64. package/dist/data-table/DataTable.vue.d.ts.map +1 -1
  65. package/dist/data-table/FilterMenu.vue.d.ts +10 -0
  66. package/dist/data-table/FilterMenu.vue.d.ts.map +1 -1
  67. package/dist/data-table/ValueInput.vue.d.ts +19 -1
  68. package/dist/data-table/ValueInput.vue.d.ts.map +1 -1
  69. package/dist/data-table/index.d.ts +1 -1
  70. package/dist/data-table/index.d.ts.map +1 -1
  71. package/dist/data-table/types.d.ts +23 -1
  72. package/dist/data-table/types.d.ts.map +1 -1
  73. package/dist/data-table.js +1452 -1331
  74. package/dist/editor.js +1 -1
  75. package/dist/form/FormField.vue.d.ts +10 -5
  76. package/dist/form/FormField.vue.d.ts.map +1 -1
  77. package/dist/form.js +122 -106
  78. package/dist/index.js +4780 -4714
  79. package/dist/pdf.js +4 -4
  80. package/dist/{useTree-Dt7NO7cp.js → useTree-H8XsFHMk.js} +2 -2
  81. package/dist/utils/list.d.ts.map +1 -1
  82. package/dist/virtual.js +2 -2
  83. package/llms-full.txt +511 -370
  84. package/package.json +2 -2
package/dist/editor.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as e, n as t } from "./recipes-BlM9aKyt.js";
2
- import { t as n } from "./Button-DZ_ZGl7X.js";
2
+ import { t as n } from "./Button-BpMOPs8b.js";
3
3
  import { t as r } from "./Checkbox-D9f77jtl.js";
4
4
  import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, nextTick as ee, normalizeClass as p, normalizeStyle as te, onBeforeUnmount as ne, openBlock as m, ref as h, renderList as g, resolveDynamicComponent as re, toDisplayString as _, unref as v, useAttrs as ie, useId as ae, useTemplateRef as y, vModelText as b, watch as oe, withCtx as x, withDirectives as S, withKeys as se, withModifiers as C } from "vue";
5
5
  import { Baseline as ce, Bold as le, Code as ue, CodeXml as de, Heading2 as fe, Heading3 as pe, Highlighter as me, Image as he, Italic as ge, Link as _e, List as ve, ListChecks as ye, ListCollapse as be, ListOrdered as xe, Minus as Se, Pilcrow as Ce, Redo2 as we, SquareCode as Te, Strikethrough as Ee, Subscript as De, Superscript as Oe, Table as ke, TextAlignCenter as Ae, TextAlignEnd as je, TextAlignJustify as Me, TextAlignStart as Ne, TextQuote as Pe, Underline as Fe, Undo2 as Ie } from "@lucide/vue";
@@ -11,11 +11,16 @@ export interface FormFieldProps {
11
11
  optional?: boolean;
12
12
  disabled?: boolean;
13
13
  }
14
- declare var __VLS_7: {
15
- field: AnyFieldApi;
16
- };
17
- type __VLS_Slots = {} & {
18
- default?: (props: typeof __VLS_7) => any;
14
+ type __VLS_Slots = {
15
+ default?(props: {
16
+ field: AnyFieldApi;
17
+ }): unknown;
18
+ /** Own content of the label (instead of `label`) */
19
+ label?(): unknown;
20
+ /** Own helper text, e.g. with a link – part of the control's description (instead of `helperText`) */
21
+ 'helper-text'?(): unknown;
22
+ /** Own confirmation (instead of `success`) */
23
+ success?(): unknown;
19
24
  };
20
25
  declare const __VLS_base: import("vue").DefineComponent<FormFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FormFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
26
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1 +1 @@
1
- {"version":3,"file":"FormField.vue.d.ts","sourceRoot":"","sources":["../../src/form/FormField.vue"],"names":[],"mappings":"AA2CA,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKhE,MAAM,WAAW,cAAc;IAC3B,uEAAuE;IACvE,KAAK,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AA6CD,QAAA,IAAI,OAAO;;CAAW,CAAC;AACvB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAG/C,QAAA,MAAM,UAAU,wSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"FormField.vue.d.ts","sourceRoot":"","sources":["../../src/form/FormField.vue"],"names":[],"mappings":"AAuDA,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKhE,MAAM,WAAW,cAAc;IAC3B,uEAAuE;IACvE,KAAK,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAKD,KAAK,WAAW,GAAG;IACf,OAAO,CAAC,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC;IACjD,oDAAoD;IACpD,KAAK,CAAC,IAAI,OAAO,CAAC;IAClB,sGAAsG;IACtG,aAAa,CAAC,IAAI,OAAO,CAAC;IAC1B,8CAA8C;IAC9C,OAAO,CAAC,IAAI,OAAO,CAAC;CACvB,CAAC;AAyEF,QAAA,MAAM,UAAU,wSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
package/dist/form.js CHANGED
@@ -1,23 +1,23 @@
1
1
  import { a as e, i as t, n } from "./recipes-BlM9aKyt.js";
2
- import { t as r } from "./Button-DZ_ZGl7X.js";
3
- import { t as i } from "./Field-BdIPugFP.js";
4
- import { n as a, t as o } from "./Input-C59NJK4m.js";
5
- import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, guardReactiveProps as g, mergeProps as _, nextTick as v, normalizeClass as y, normalizeProps as b, openBlock as x, ref as S, renderList as C, renderSlot as w, toDisplayString as T, unref as E, useAttrs as D, useId as O, useTemplateRef as k, withCtx as A } from "vue";
6
- import { ArrowDown as j, ArrowUp as M, Plus as N, Trash2 as P } from "@lucide/vue";
7
- import { combineValidators as F, createValidator as I, createValidators as L, formList as ee, hasLength as R, isEmail as z, isIban as B, isInRange as V, isInteger as H, isPhone as U, isRequired as W, isUrl as G, keyValueEditor as K, matchesField as q, matchesPattern as J, visuallyHidden as Y } from "@wirecore/wirelayer-recipes";
8
- import { useStore as X } from "@tanstack/vue-form";
2
+ import { t as r } from "./Button-BpMOPs8b.js";
3
+ import { t as i } from "./Field-B1EsNF84.js";
4
+ import { n as a, t as o } from "./Input-BhnYMKjE.js";
5
+ import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createSlots as p, createTextVNode as m, createVNode as h, defineComponent as g, guardReactiveProps as _, mergeProps as v, nextTick as y, normalizeClass as b, normalizeProps as ee, openBlock as x, ref as S, renderList as C, renderSlot as w, toDisplayString as T, unref as E, useAttrs as D, useId as O, useTemplateRef as k, withCtx as A } from "vue";
6
+ import { ArrowDown as j, ArrowUp as te, Plus as ne, Trash2 as re } from "@lucide/vue";
7
+ import { combineValidators as M, createValidator as N, createValidators as P, formList as F, hasLength as I, isEmail as L, isIban as R, isInRange as z, isInteger as B, isPhone as V, isRequired as H, isUrl as U, keyValueEditor as W, matchesField as G, matchesPattern as K, visuallyHidden as q } from "@wirecore/wirelayer-recipes";
8
+ import { useStore as J } from "@tanstack/vue-form";
9
9
  //#region src/form/bind.ts
10
- var te = (e) => ({
10
+ var Y = (e) => ({
11
11
  name: e.name,
12
12
  modelValue: e.state.value ?? "",
13
13
  "onUpdate:modelValue": (t) => e.handleChange(t ?? ""),
14
14
  onBlur: e.handleBlur
15
- }), ne = (e) => ({
15
+ }), ie = (e) => ({
16
16
  name: e.name,
17
17
  checked: e.state.value,
18
18
  "onUpdate:checked": (t) => e.handleChange(t === !0),
19
19
  onBlur: e.handleBlur
20
- }), re = (e) => ({
20
+ }), ae = (e) => ({
21
21
  name: e.name,
22
22
  modelValue: e.state.value,
23
23
  "onUpdate:modelValue": (t) => e.handleChange(t),
@@ -25,7 +25,7 @@ var te = (e) => ({
25
25
  });
26
26
  //#endregion
27
27
  //#region src/form/errors.ts
28
- function Z(e) {
28
+ function X(e) {
29
29
  for (let t of e) {
30
30
  if (typeof t == "string" && t) return t;
31
31
  if (t && typeof t == "object" && "message" in t && typeof t.message == "string") return t.message;
@@ -33,19 +33,19 @@ function Z(e) {
33
33
  }
34
34
  //#endregion
35
35
  //#region src/form/errors-summary.ts
36
- function ie(e, t = {}) {
37
- let n = X(e.store, (e) => e.fieldMeta), r = X(e.store, (e) => e.submissionAttempts), i = (e) => typeof t.ids == "function" ? t.ids(e) : t.ids?.[e] ?? e;
36
+ function oe(e, t = {}) {
37
+ let n = J(e.store, (e) => e.fieldMeta), r = J(e.store, (e) => e.submissionAttempts), i = (e) => typeof t.ids == "function" ? t.ids(e) : t.ids?.[e] ?? e;
38
38
  return {
39
39
  errors: c(() => Object.entries(n.value).map(([e, t]) => ({
40
40
  id: i(e),
41
- message: t?.isTouched && Z(t.errors ?? []) || ""
41
+ message: t?.isTouched && X(t.errors ?? []) || ""
42
42
  })).filter((e) => !!e.message)),
43
43
  attempts: c(() => r.value)
44
44
  };
45
45
  }
46
46
  //#endregion
47
47
  //#region src/form/FormField.vue
48
- var ae = /* @__PURE__ */ h({
48
+ var se = /* @__PURE__ */ g({
49
49
  __name: "FormField",
50
50
  props: {
51
51
  field: {},
@@ -57,7 +57,7 @@ var ae = /* @__PURE__ */ h({
57
57
  disabled: { type: Boolean }
58
58
  },
59
59
  setup(e) {
60
- let t = X(e.field.store, (e) => e.meta), n = c(() => t.value.isTouched ? Z(t.value.errors) : void 0);
60
+ let t = J(e.field.store, (e) => e.meta), n = c(() => t.value.isTouched ? X(t.value.errors) : void 0);
61
61
  return (t, r) => (x(), l(i, {
62
62
  label: e.label,
63
63
  "helper-text": e.helperText,
@@ -66,10 +66,26 @@ var ae = /* @__PURE__ */ h({
66
66
  required: e.required,
67
67
  optional: e.optional,
68
68
  disabled: e.disabled
69
- }, {
69
+ }, p({
70
70
  default: A(() => [w(t.$slots, "default", { field: e.field })]),
71
- _: 3
72
- }, 8, [
71
+ _: 2
72
+ }, [
73
+ t.$slots.label ? {
74
+ name: "label",
75
+ fn: A(() => [w(t.$slots, "label")]),
76
+ key: "0"
77
+ } : void 0,
78
+ t.$slots["helper-text"] ? {
79
+ name: "helper-text",
80
+ fn: A(() => [w(t.$slots, "helper-text")]),
81
+ key: "1"
82
+ } : void 0,
83
+ t.$slots.success ? {
84
+ name: "success",
85
+ fn: A(() => [w(t.$slots, "success")]),
86
+ key: "2"
87
+ } : void 0
88
+ ]), 1032, [
73
89
  "label",
74
90
  "helper-text",
75
91
  "success",
@@ -79,7 +95,7 @@ var ae = /* @__PURE__ */ h({
79
95
  "disabled"
80
96
  ]));
81
97
  }
82
- }), oe = ["aria-label", "onKeydown"], se = "input, select, textarea, button:not(:disabled), [tabindex]", Q = "input, select, textarea, button, [tabindex]", $ = /* @__PURE__ */ h({
98
+ }), ce = ["aria-label", "onKeydown"], le = "input, select, textarea, button:not(:disabled), [tabindex]", Z = "input, select, textarea, button, [tabindex]", Q = /* @__PURE__ */ g({
83
99
  inheritAttrs: !1,
84
100
  __name: "FormList",
85
101
  props: {
@@ -97,126 +113,126 @@ var ae = /* @__PURE__ */ h({
97
113
  classes: {}
98
114
  },
99
115
  setup(t) {
100
- let i = t, o = n("formList", ee, () => i.classes), l = D(), h = e().formList, _ = o(), O = k("list"), F = X(i.field.store, (e) => e.value), I = c(() => F.value?.length ?? 0), L = c(() => i.max !== void 0 && I.value >= i.max), R = c(() => I.value <= i.min), z = S(""), B = (e) => (i.itemLabel ?? h.item)(e + 1), V = Y(), H = () => [...O.value?.querySelectorAll(":scope > li") ?? []];
101
- async function U(e, t) {
102
- await v();
103
- let n = H()[e];
104
- n && (t?.(n) ?? n.querySelector(se))?.focus();
116
+ let i = t, o = n("formList", F, () => i.classes), l = D(), p = e().formList, g = o(), v = k("list"), O = J(i.field.store, (e) => e.value), M = c(() => O.value?.length ?? 0), N = c(() => i.max !== void 0 && M.value >= i.max), P = c(() => M.value <= i.min), I = S(""), L = (e) => (i.itemLabel ?? p.item)(e + 1), R = q(), z = () => [...v.value?.querySelectorAll(":scope > li") ?? []];
117
+ async function B(e, t) {
118
+ await y();
119
+ let n = z()[e];
120
+ n && (t?.(n) ?? n.querySelector(le))?.focus();
105
121
  }
106
- let W = (e) => e.querySelector("[data-action=up]:not(:disabled)") ?? e.querySelector("[data-action=down]:not(:disabled)");
107
- function G() {
108
- if (L.value) return;
109
- let e = I.value;
110
- i.field.pushValue(i.newItem()), z.value = h.added(B(e)), U(e);
122
+ let V = (e) => e.querySelector("[data-action=up]:not(:disabled)") ?? e.querySelector("[data-action=down]:not(:disabled)");
123
+ function H() {
124
+ if (N.value) return;
125
+ let e = M.value;
126
+ i.field.pushValue(i.newItem()), I.value = p.added(L(e)), B(e);
111
127
  }
112
- async function K(e) {
113
- if (R.value) return;
114
- let t = B(e);
115
- i.field.removeValue(e), z.value = h.removed(t), await v();
116
- let n = H();
117
- (n[Math.min(e, n.length - 1)]?.querySelector("[data-action=\"remove\"]:not(:disabled)") ?? O.value?.parentElement?.querySelector("[data-action=\"add\"]"))?.focus();
128
+ async function U(e) {
129
+ if (P.value) return;
130
+ let t = L(e);
131
+ i.field.removeValue(e), I.value = p.removed(t), await y();
132
+ let n = z();
133
+ (n[Math.min(e, n.length - 1)]?.querySelector("[data-action=\"remove\"]:not(:disabled)") ?? v.value?.parentElement?.querySelector("[data-action=\"add\"]"))?.focus();
118
134
  }
119
- function q(e, t, n = W) {
135
+ function W(e, t, n = V) {
120
136
  let r = e + t;
121
- r < 0 || r >= I.value || (i.field.moveValue(e, r), z.value = h.moved(B(e), r + 1), U(r, n));
137
+ r < 0 || r >= M.value || (i.field.moveValue(e, r), I.value = p.moved(L(e), r + 1), B(r, n));
122
138
  }
123
- function J(e, t) {
139
+ function G(e, t) {
124
140
  if (!i.reorderable || !t.altKey || t.key !== "ArrowUp" && t.key !== "ArrowDown") return;
125
141
  t.preventDefault();
126
- let n = [...t.currentTarget.querySelectorAll(Q)].indexOf(t.target);
127
- q(e, t.key === "ArrowUp" ? -1 : 1, (e) => {
128
- let t = e.querySelectorAll(Q)[n];
129
- return t && !t.matches(":disabled") ? t : W(e);
142
+ let n = [...t.currentTarget.querySelectorAll(Z)].indexOf(t.target);
143
+ W(e, t.key === "ArrowUp" ? -1 : 1, (e) => {
144
+ let t = e.querySelectorAll(Z)[n];
145
+ return t && !t.matches(":disabled") ? t : V(e);
130
146
  });
131
147
  }
132
- return (e, n) => (x(), d("fieldset", b(g({
148
+ return (e, n) => (x(), d("fieldset", ee(_({
133
149
  ...E(l),
134
- class: E(_).base({ class: y(E(l).class) })
150
+ class: E(g).base({ class: b(E(l).class) })
135
151
  })), [
136
- f("legend", { class: y(E(_).legend()) }, T(t.label), 3),
152
+ f("legend", { class: b(E(g).legend()) }, T(t.label), 3),
137
153
  f("ol", {
138
154
  ref_key: "list",
139
- ref: O,
140
- class: y(E(_).list())
141
- }, [(x(!0), d(s, null, C(E(F) ?? [], (n, r) => (x(), d("li", {
155
+ ref: v,
156
+ class: b(E(g).list())
157
+ }, [(x(!0), d(s, null, C(E(O) ?? [], (n, r) => (x(), d("li", {
142
158
  key: r,
143
- class: y(E(_).item()),
144
- "aria-label": B(r),
145
- onKeydown: (e) => J(r, e)
159
+ class: b(E(g).item()),
160
+ "aria-label": L(r),
161
+ onKeydown: (e) => G(r, e)
146
162
  }, [
147
163
  f("span", {
148
- class: y(E(_).index()),
164
+ class: b(E(g).index()),
149
165
  "aria-hidden": "true"
150
166
  }, T(r + 1), 3),
151
- f("div", { class: y(E(_).body()) }, [w(e.$slots, "item", {
167
+ f("div", { class: b(E(g).body()) }, [w(e.$slots, "item", {
152
168
  index: r,
153
- itemLabel: B(r),
154
- remove: () => K(r),
155
- moveUp: () => q(r, -1),
156
- moveDown: () => q(r, 1)
169
+ itemLabel: L(r),
170
+ remove: () => U(r),
171
+ moveUp: () => W(r, -1),
172
+ moveDown: () => W(r, 1)
157
173
  })], 2),
158
- f("div", { class: y(E(_).actions()) }, [t.reorderable ? (x(), d(s, { key: 0 }, [m(a, {
159
- icon: E(M),
160
- label: E(h).moveUp(B(r)),
174
+ f("div", { class: b(E(g).actions()) }, [t.reorderable ? (x(), d(s, { key: 0 }, [h(a, {
175
+ icon: E(te),
176
+ label: E(p).moveUp(L(r)),
161
177
  variant: "text",
162
178
  size: "sm",
163
179
  "data-action": "up",
164
180
  disabled: r === 0,
165
- onClick: (e) => q(r, -1)
181
+ onClick: (e) => W(r, -1)
166
182
  }, null, 8, [
167
183
  "icon",
168
184
  "label",
169
185
  "disabled",
170
186
  "onClick"
171
- ]), m(a, {
187
+ ]), h(a, {
172
188
  icon: E(j),
173
- label: E(h).moveDown(B(r)),
189
+ label: E(p).moveDown(L(r)),
174
190
  variant: "text",
175
191
  size: "sm",
176
192
  "data-action": "down",
177
- disabled: r === I.value - 1,
178
- onClick: (e) => q(r, 1)
193
+ disabled: r === M.value - 1,
194
+ onClick: (e) => W(r, 1)
179
195
  }, null, 8, [
180
196
  "icon",
181
197
  "label",
182
198
  "disabled",
183
199
  "onClick"
184
- ])], 64)) : u("", !0), m(a, {
185
- icon: E(P),
186
- label: E(h).remove(B(r)),
200
+ ])], 64)) : u("", !0), h(a, {
201
+ icon: E(re),
202
+ label: E(p).remove(L(r)),
187
203
  variant: "text",
188
204
  size: "sm",
189
205
  "data-action": "remove",
190
- disabled: R.value,
191
- onClick: (e) => K(r)
206
+ disabled: P.value,
207
+ onClick: (e) => U(r)
192
208
  }, null, 8, [
193
209
  "icon",
194
210
  "label",
195
211
  "disabled",
196
212
  "onClick"
197
213
  ])], 2)
198
- ], 42, oe))), 128))], 2),
199
- f("div", { class: y(E(_).footer()) }, [m(r, {
214
+ ], 42, ce))), 128))], 2),
215
+ f("div", { class: b(E(g).footer()) }, [h(r, {
200
216
  variant: "outline",
201
217
  size: "sm",
202
- "leading-icon": E(N),
218
+ "leading-icon": E(ne),
203
219
  "data-action": "add",
204
- disabled: L.value,
205
- onClick: G
220
+ disabled: N.value,
221
+ onClick: H
206
222
  }, {
207
- default: A(() => [p(T(t.addLabel ?? E(h).add), 1)]),
223
+ default: A(() => [m(T(t.addLabel ?? E(p).add), 1)]),
208
224
  _: 1
209
225
  }, 8, ["leading-icon", "disabled"]), t.max !== void 0 || t.min > 0 ? (x(), d("span", {
210
226
  key: 0,
211
- class: y(E(_).hint())
212
- }, T([t.min > 0 ? E(h).min(t.min) : "", t.max === void 0 ? "" : E(h).max(t.max)].filter(Boolean).join(" · ")), 3)) : u("", !0)], 2),
227
+ class: b(E(g).hint())
228
+ }, T([t.min > 0 ? E(p).min(t.min) : "", t.max === void 0 ? "" : E(p).max(t.max)].filter(Boolean).join(" · ")), 3)) : u("", !0)], 2),
213
229
  f("span", {
214
230
  role: "status",
215
- class: y(E(V))
216
- }, T(z.value), 3)
231
+ class: b(E(R))
232
+ }, T(I.value), 3)
217
233
  ], 16));
218
234
  }
219
- }), ce = ["id"], le = /* @__PURE__ */ h({
235
+ }), $ = ["id"], ue = /* @__PURE__ */ g({
220
236
  inheritAttrs: !1,
221
237
  __name: "KeyValueEditor",
222
238
  props: {
@@ -235,20 +251,20 @@ var ae = /* @__PURE__ */ h({
235
251
  classes: {}
236
252
  },
237
253
  setup(t) {
238
- let r = t, i = n("keyValueEditor", K, () => r.classes), a = D(), s = e().keyValueEditor, f = i(), p = O(), h = X(r.field.store, (e) => e.value ?? []), g = c(() => {
254
+ let r = t, i = n("keyValueEditor", W, () => r.classes), a = D(), s = e().keyValueEditor, f = i(), p = O(), m = J(r.field.store, (e) => e.value ?? []), g = c(() => {
239
255
  let e = /* @__PURE__ */ new Map();
240
- for (let t of h.value) t.key.trim() && e.set(t.key.trim(), (e.get(t.key.trim()) ?? 0) + 1);
256
+ for (let t of m.value) t.key.trim() && e.set(t.key.trim(), (e.get(t.key.trim()) ?? 0) + 1);
241
257
  return new Set([...e].filter(([, e]) => e > 1).map(([e]) => e));
242
- }), v = (e) => r.uniqueKeys && g.value.has(h.value[e]?.key.trim() ?? "");
243
- function b(e, t, n) {
258
+ }), _ = (e) => r.uniqueKeys && g.value.has(m.value[e]?.key.trim() ?? "");
259
+ function y(e, t, n) {
244
260
  r.field.replaceValue(e, {
245
- ...h.value[e],
261
+ ...m.value[e],
246
262
  [t]: n
247
263
  });
248
264
  }
249
- return (e, n) => (x(), l($, _({
265
+ return (e, n) => (x(), l(Q, v({
250
266
  ...E(a),
251
- class: E(f).base({ class: y(E(a).class) })
267
+ class: E(f).base({ class: b(E(a).class) })
252
268
  }, {
253
269
  field: t.field,
254
270
  label: t.label,
@@ -262,14 +278,14 @@ var ae = /* @__PURE__ */ h({
262
278
  max: t.max
263
279
  }), {
264
280
  item: A(({ index: e, itemLabel: n }) => [
265
- m(o, {
266
- "model-value": E(h)[e]?.key ?? "",
281
+ h(o, {
282
+ "model-value": E(m)[e]?.key ?? "",
267
283
  "aria-label": `${t.keyLabel ?? E(s).key}, ${n}`,
268
284
  placeholder: t.keyPlaceholder,
269
- invalid: v(e),
270
- "aria-describedby": v(e) ? `${E(p)}-${e}` : void 0,
271
- class: y(E(f).cell()),
272
- "onUpdate:modelValue": (t) => b(e, "key", t ?? "")
285
+ invalid: _(e),
286
+ "aria-describedby": _(e) ? `${E(p)}-${e}` : void 0,
287
+ class: b(E(f).cell()),
288
+ "onUpdate:modelValue": (t) => y(e, "key", t ?? "")
273
289
  }, null, 8, [
274
290
  "model-value",
275
291
  "aria-label",
@@ -279,12 +295,12 @@ var ae = /* @__PURE__ */ h({
279
295
  "class",
280
296
  "onUpdate:modelValue"
281
297
  ]),
282
- m(o, {
283
- "model-value": E(h)[e]?.value ?? "",
298
+ h(o, {
299
+ "model-value": E(m)[e]?.value ?? "",
284
300
  "aria-label": `${t.valueLabel ?? E(s).value}, ${n}`,
285
301
  placeholder: t.valuePlaceholder,
286
- class: y(E(f).cell()),
287
- "onUpdate:modelValue": (t) => b(e, "value", t ?? "")
302
+ class: b(E(f).cell()),
303
+ "onUpdate:modelValue": (t) => y(e, "value", t ?? "")
288
304
  }, null, 8, [
289
305
  "model-value",
290
306
  "aria-label",
@@ -292,11 +308,11 @@ var ae = /* @__PURE__ */ h({
292
308
  "class",
293
309
  "onUpdate:modelValue"
294
310
  ]),
295
- v(e) ? (x(), d("p", {
311
+ _(e) ? (x(), d("p", {
296
312
  key: 0,
297
313
  id: `${E(p)}-${e}`,
298
- class: y(E(f).error())
299
- }, T(E(s).duplicate), 11, ce)) : u("", !0)
314
+ class: b(E(f).error())
315
+ }, T(E(s).duplicate), 11, $)) : u("", !0)
300
316
  ]),
301
317
  _: 1
302
318
  }, 16, [
@@ -311,11 +327,11 @@ var ae = /* @__PURE__ */ h({
311
327
  });
312
328
  //#endregion
313
329
  //#region src/form/validators.ts
314
- function ue() {
330
+ function de() {
315
331
  let e = t();
316
- return L(e.value.translations.validation, e.value.locale);
332
+ return P(e.value.translations.validation, e.value.locale);
317
333
  }
318
- async function de(e, t) {
334
+ async function fe(e, t) {
319
335
  await Promise.all(t.map((t) => e.validateField(t, "change")));
320
336
  for (let n of t) e.setFieldMeta(n, ((e) => ({
321
337
  ...e,
@@ -324,4 +340,4 @@ async function de(e, t) {
324
340
  return t.every((t) => !e.getFieldMeta(t)?.errors?.some(Boolean));
325
341
  }
326
342
  //#endregion
327
- export { $ as FieldArray, $ as FormList, ae as FormField, le as KeyValueEditor, ne as bindCheckbox, te as bindInput, re as bindValue, F as combineValidators, I as createValidator, Z as firstError, R as hasLength, z as isEmail, B as isIban, V as isInRange, H as isInteger, U as isPhone, W as isRequired, G as isUrl, q as matchesField, J as matchesPattern, ie as useFormErrors, ue as useValidators, de as validateFields };
343
+ export { Q as FieldArray, Q as FormList, se as FormField, ue as KeyValueEditor, ie as bindCheckbox, Y as bindInput, ae as bindValue, M as combineValidators, N as createValidator, X as firstError, I as hasLength, L as isEmail, R as isIban, z as isInRange, B as isInteger, V as isPhone, H as isRequired, U as isUrl, G as matchesField, K as matchesPattern, oe as useFormErrors, de as useValidators, fe as validateFields };