vlite3 0.7.15 → 0.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 (57) hide show
  1. package/components/Accordion/Accordion.vue.js +35 -22
  2. package/components/Accordion/AccordionContent.vue.js +2 -2
  3. package/components/Accordion/AccordionContent.vue2.js +1 -1
  4. package/components/Breadcrumb/Breadcrumb.vue.js +2 -2
  5. package/components/Breadcrumb/Breadcrumb.vue2.js +44 -44
  6. package/components/Carousel/Carousel.vue.js +1 -1
  7. package/components/Carousel/Carousel.vue2.js +3 -3
  8. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  9. package/components/ColorPicker/ColorPicker.vue.js +2 -2
  10. package/components/CommandPalette/CommandPaletteContent.vue.js +1 -1
  11. package/components/CommandPalette/CommandPaletteContent.vue2.js +2 -2
  12. package/components/Dropdown/DropdownTrigger.vue.js +1 -1
  13. package/components/FilePicker/FilePicker.vue.js +16 -16
  14. package/components/FileTree/FileTree.vue.js +5 -147
  15. package/components/FileTree/FileTree.vue2.js +164 -2
  16. package/components/FileTree/FileTreeNode.vue.js +89 -84
  17. package/components/Form/CustomFields.vue.js +2 -2
  18. package/components/Form/CustomFields.vue2.js +1 -1
  19. package/components/Form/Form.vue.js +1 -1
  20. package/components/Form/Form.vue2.js +133 -129
  21. package/components/Form/FormField.vue.d.ts +3 -0
  22. package/components/Form/FormField.vue.js +85 -82
  23. package/components/Form/FormFields.vue.d.ts +2 -0
  24. package/components/Form/FormFields.vue.js +2 -2
  25. package/components/Form/FormFields.vue2.js +55 -52
  26. package/components/Form/composables/useForm.d.ts +2 -0
  27. package/components/Form/composables/useForm.js +113 -107
  28. package/components/ImportData/ImportData.vue.js +157 -142
  29. package/components/ImportData/ImportStep1.vue.d.ts +6 -0
  30. package/components/ImportData/ImportStep1.vue.js +69 -61
  31. package/components/ImportData/ImportStep2.vue.js +5 -98
  32. package/components/ImportData/ImportStep2.vue2.js +105 -2
  33. package/components/Kanban/Kanban.vue.js +1 -1
  34. package/components/Kanban/Kanban.vue2.js +1 -1
  35. package/components/Kanban/KanbanBoard.vue.js +1 -1
  36. package/components/Kanban/KanbanBoard.vue2.js +92 -83
  37. package/components/Kanban/useKanbanBoard.d.ts +1 -1
  38. package/components/Kanban/useKanbanBoard.js +17 -17
  39. package/components/List/ListFieldRow.vue.js +4 -6
  40. package/components/MultiSelect/MultiSelect.vue.js +10 -4
  41. package/components/NavbarCommandPalette.vue.js +2 -2
  42. package/components/NumberInput.vue.js +2 -2
  43. package/components/NumberInput.vue2.js +1 -1
  44. package/components/PermissionMatrix/PermissionEditor.vue.d.ts +2 -0
  45. package/components/PermissionMatrix/PermissionEditor.vue.js +25 -23
  46. package/components/PermissionMatrix/PermissionEditorMatrix.vue.d.ts +4 -1
  47. package/components/PermissionMatrix/PermissionEditorMatrix.vue.js +2 -2
  48. package/components/PermissionMatrix/PermissionEditorMatrix.vue2.js +48 -45
  49. package/components/Screen/ScreenFilter.vue.js +1 -1
  50. package/components/Timeline/Timeline.vue.js +62 -57
  51. package/components/ToastNotification.vue.js +2 -2
  52. package/components/ToastNotification.vue2.js +103 -88
  53. package/components/Workbook/Workbook.vue.js +5 -152
  54. package/components/Workbook/Workbook.vue2.js +166 -2
  55. package/package.json +1 -1
  56. package/style.css +3 -3
  57. /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
@@ -29,19 +29,20 @@ const me = /* @__PURE__ */ B({
29
29
  error: { default: "" },
30
30
  isUpdate: { type: Boolean, default: !1 },
31
31
  label: {},
32
- floatingActive: { type: Boolean, default: !0 }
32
+ floatingActive: { type: Boolean, default: !0 },
33
+ loading: { type: Boolean, default: !1 }
33
34
  },
34
35
  emits: ["change", "addonChange", "addonAction"],
35
36
  setup(l, { emit: A }) {
36
- const e = l, c = A, d = (t, a) => {
37
- c("change", { value: t, data: a });
38
- }, C = (t) => {
39
- c("change", { value: t });
37
+ const e = l, c = A, d = (a, t) => {
38
+ c("change", { value: a, data: t });
39
+ }, C = (a) => {
40
+ c("change", { value: a });
40
41
  }, F = o(() => {
41
- const t = e.field.type;
42
- if (y(t))
43
- return N(t);
44
- switch (t) {
42
+ const a = e.field.type;
43
+ if (y(a))
44
+ return N(a);
45
+ switch (a) {
45
46
  case "text":
46
47
  case "email":
47
48
  case "password":
@@ -78,17 +79,17 @@ const me = /* @__PURE__ */ B({
78
79
  return x;
79
80
  }
80
81
  }), z = o(() => {
81
- const t = e.field.type, a = {
82
+ const a = e.field.type, t = {
82
83
  disabled: e.disabled || e.field.disabled === !0,
83
84
  ...e?.field || {},
84
85
  ...e.field.props || {},
85
86
  label: "",
86
87
  labelI18n: ""
87
88
  }, i = e.field.placeholderI18n ? D(e.field.placeholderI18n) : e.field.placeholder, g = e.variant === "floating" && e.label && !e.floatingActive, u = g ? "" : i;
88
- return t === "text" || t === "email" || t === "password" || t === "tel" || t === "url" || t === "search" || t === "textarea" || !t ? {
89
- ...a,
89
+ return a === "text" || a === "email" || a === "password" || a === "tel" || a === "url" || a === "search" || a === "textarea" || !a ? {
90
+ ...t,
90
91
  modelValue: e.value ?? "",
91
- type: t || "text",
92
+ type: a || "text",
92
93
  placeholder: u,
93
94
  label: e.label,
94
95
  icon: e.field.icon,
@@ -103,10 +104,10 @@ const me = /* @__PURE__ */ B({
103
104
  min: e.field.min,
104
105
  // kept for validation attributes if needed
105
106
  max: e.field.max,
106
- rows: t === "textarea" ? e.field.props?.rows || 3 : void 0,
107
+ rows: a === "textarea" ? e.field.props?.rows || 3 : void 0,
107
108
  class: `${e.field.className}`
108
- } : t === "number" ? {
109
- ...a,
109
+ } : a === "number" ? {
110
+ ...t,
110
111
  modelValue: e.value ?? void 0,
111
112
  min: e.field.min,
112
113
  max: e.field.max,
@@ -117,19 +118,19 @@ const me = /* @__PURE__ */ B({
117
118
  rounded: e.rounded,
118
119
  placeholder: u,
119
120
  class: e.field.className
120
- } : t === "switch" ? {
121
- ...a,
121
+ } : a === "switch" ? {
122
+ ...t,
122
123
  modelValue: !!e.value,
123
124
  size: "sm",
124
125
  label: ""
125
126
  // Label handled externally
126
- } : t === "check" ? {
127
- ...a,
127
+ } : a === "check" ? {
128
+ ...t,
128
129
  modelValue: !!e.value,
129
130
  label: ""
130
131
  // Label handled externally
131
- } : t === "select" ? {
132
- ...a,
132
+ } : a === "select" ? {
133
+ ...t,
133
134
  modelValue: e.value,
134
135
  options: e.field.options || [],
135
136
  placeholder: u,
@@ -140,18 +141,18 @@ const me = /* @__PURE__ */ B({
140
141
  size: e.size,
141
142
  ...g ? { text: "​" } : {}
142
143
  }
143
- } : t === "multiSelect" ? {
144
- ...a,
144
+ } : a === "multiSelect" ? {
145
+ ...t,
145
146
  modelValue: Array.isArray(e.value) ? e.value : [],
146
147
  options: e.field.options || [],
147
148
  placeholder: i,
148
149
  variant: e.variant,
149
150
  size: e.size,
150
151
  rounded: e.rounded
151
- } : t === "date" || t === "time" ? {
152
- ...a,
152
+ } : a === "date" || a === "time" ? {
153
+ ...t,
153
154
  modelValue: e.value,
154
- mode: t === "time" ? "time" : "date",
155
+ mode: a === "time" ? "time" : "date",
155
156
  placeholder: u,
156
157
  btnProps: {
157
158
  variant: e.variant === "floating" ? "outline-floating" : e.variant || "outline",
@@ -159,32 +160,34 @@ const me = /* @__PURE__ */ B({
159
160
  class: "px-3!",
160
161
  ...g ? { text: "​" } : {}
161
162
  }
162
- } : t === "fileUploader" || t === "file" ? {
163
- ...a,
163
+ } : a === "fileUploader" || a === "file" ? {
164
+ ...t,
164
165
  modelValue: e.value,
165
166
  multiSelect: e.field.props?.multiple || !1,
166
167
  maxFiles: e.field.maxFiles || e.field.props?.maxFiles,
167
168
  fileTypes: e.field.props?.accept ? e.field.props.accept.split(",") : [],
168
169
  returnFormat: "base64",
169
- variant: t === "file" ? "input" : "dropzone",
170
+ variant: a === "file" ? "input" : "dropzone",
170
171
  placeholder: u,
171
172
  size: e.size,
172
173
  rounded: e.rounded,
173
- maxSize: e.field.maxFileSize ? e.field.maxFileSize * 1024 * 1024 : void 0
174
- } : t === "avatarUpload" ? {
174
+ maxSize: e.field.maxFileSize ? e.field.maxFileSize * 1024 * 1024 : void 0,
175
+ loading: e.loading
176
+ } : a === "avatarUpload" ? {
175
177
  size: "2xl",
176
- ...a,
178
+ ...t,
177
179
  modelValue: e.value,
178
180
  editable: !e.readonly,
179
- maxSize: e.field.maxFileSize ? e.field.maxFileSize * 1024 * 1024 : void 0
180
- } : t === "color" ? {
181
- ...a,
181
+ maxSize: e.field.maxFileSize ? e.field.maxFileSize * 1024 * 1024 : void 0,
182
+ loading: e.loading
183
+ } : a === "color" ? {
184
+ ...t,
182
185
  modelValue: e.value || "#000000"
183
- } : t === "iconPicker" ? {
184
- ...a,
186
+ } : a === "iconPicker" ? {
187
+ ...t,
185
188
  value: e.value || "lucide:smile"
186
- } : t === "customFields" ? {
187
- ...a,
189
+ } : a === "customFields" ? {
190
+ ...t,
188
191
  label: e?.field?.label,
189
192
  labelI18n: e?.field?.labelI18n,
190
193
  modelValue: Array.isArray(e.value) ? e.value : [],
@@ -195,57 +198,57 @@ const me = /* @__PURE__ */ B({
195
198
  size: e.size,
196
199
  rounded: e.rounded,
197
200
  isUpdate: e.isUpdate
198
- } : y(t) ? {
199
- ...a,
201
+ } : y(a) ? {
202
+ ...t,
200
203
  value: e.value,
201
204
  values: e.values
202
- } : a;
205
+ } : t;
203
206
  }), k = o(() => {
204
- const t = e.field.type;
205
- return t === "text" || t === "email" || t === "password" || t === "tel" || t === "url" || t === "search" || t === "textarea" || t === "switch" || t === "check" || t === "number" || !t ? {
207
+ const a = e.field.type;
208
+ return a === "text" || a === "email" || a === "password" || a === "tel" || a === "url" || a === "search" || a === "textarea" || a === "switch" || a === "check" || a === "number" || !a ? {
206
209
  "update:modelValue": C
207
- } : t === "select" ? {
208
- onSelect: (a) => {
209
- d(a.value, a.data);
210
+ } : a === "select" ? {
211
+ onSelect: (t) => {
212
+ d(t.value, t.data);
210
213
  }
211
- } : t === "multiSelect" ? {
212
- change: (a) => d(a)
213
- } : t === "date" || t === "time" ? {
214
- change: (a) => d(a)
215
- } : t === "fileUploader" || t === "file" ? {
216
- change: (a) => {
217
- d(a);
214
+ } : a === "multiSelect" ? {
215
+ change: (t) => d(t)
216
+ } : a === "date" || a === "time" ? {
217
+ change: (t) => d(t)
218
+ } : a === "fileUploader" || a === "file" ? {
219
+ change: (t) => {
220
+ d(t);
218
221
  },
219
- "update:modelValue": (a) => {
220
- d(a);
222
+ "update:modelValue": (t) => {
223
+ d(t);
221
224
  }
222
- } : t === "avatarUpload" ? {
223
- change: (a) => {
224
- d(a);
225
+ } : a === "avatarUpload" ? {
226
+ change: (t) => {
227
+ d(t);
225
228
  },
226
- "update:modelValue": (a) => {
227
- d(a);
229
+ "update:modelValue": (t) => {
230
+ d(t);
228
231
  }
229
- } : t === "color" ? {
230
- change: (a) => d(a)
231
- } : t === "iconPicker" ? {
232
- onSelect: (a) => d(a)
233
- } : t === "customFields" ? {
234
- change: (a) => d(a)
235
- } : y(t) ? {
236
- onChange: (a) => {
237
- d(a.value, a.data);
232
+ } : a === "color" ? {
233
+ change: (t) => d(t)
234
+ } : a === "iconPicker" ? {
235
+ onSelect: (t) => d(t)
236
+ } : a === "customFields" ? {
237
+ change: (t) => d(t)
238
+ } : y(a) ? {
239
+ onChange: (t) => {
240
+ d(t.value, t.data);
238
241
  }
239
242
  } : {};
240
243
  }), P = o(() => v(e.field.addonLeft) || v(e.field.addonRight)), U = o(() => {
241
- const t = e.field.type;
242
- return t === "text" || t === "email" || t === "password" || t === "tel" || t === "url" || t === "search" || !t;
243
- }), I = o(() => P.value && U.value), V = (t, a) => {
244
- c("addonChange", t.name, { value: a.value });
245
- }, S = (t) => {
246
- t.action && c("addonAction", t.action);
244
+ const a = e.field.type;
245
+ return a === "text" || a === "email" || a === "password" || a === "tel" || a === "url" || a === "search" || !a;
246
+ }), I = o(() => P.value && U.value), V = (a, t) => {
247
+ c("addonChange", a.name, { value: t.value });
248
+ }, S = (a) => {
249
+ a.action && c("addonAction", a.action);
247
250
  };
248
- return (t, a) => I.value ? (r(), s(x, f({ key: 0 }, {
251
+ return (a, t) => I.value ? (r(), s(x, f({ key: 0 }, {
249
252
  ...z.value,
250
253
  ...l.field?.props || {}
251
254
  }, R(k.value)), O({ _: 2 }, [
@@ -257,7 +260,7 @@ const me = /* @__PURE__ */ B({
257
260
  modelValue: l.field.addonLeft.name ? l.values[l.field.addonLeft.name] : void 0,
258
261
  options: l.field.addonLeft.options || []
259
262
  }, l.field.addonLeft.props || {}, {
260
- onOnSelect: a[0] || (a[0] = (i) => V(l.field.addonLeft, i))
263
+ onOnSelect: t[0] || (t[0] = (i) => V(l.field.addonLeft, i))
261
264
  }), {
262
265
  trigger: n(({ selectedLabel: i }) => [
263
266
  $(h, { variant: "outline" }, {
@@ -272,7 +275,7 @@ const me = /* @__PURE__ */ B({
272
275
  key: 1,
273
276
  variant: "outline"
274
277
  }, l.field.addonLeft.props || {}, {
275
- onClick: a[1] || (a[1] = (i) => S(l.field.addonLeft))
278
+ onClick: t[1] || (t[1] = (i) => S(l.field.addonLeft))
276
279
  }), {
277
280
  default: n(() => [
278
281
  m(p(l.field.addonLeft.text), 1)
@@ -290,7 +293,7 @@ const me = /* @__PURE__ */ B({
290
293
  modelValue: l.field.addonRight.name ? l.values[l.field.addonRight.name] : void 0,
291
294
  options: l.field.addonRight.options || []
292
295
  }, l.field.addonRight.props || {}, {
293
- onOnSelect: a[2] || (a[2] = (i) => V(l.field.addonRight, i))
296
+ onOnSelect: t[2] || (t[2] = (i) => V(l.field.addonRight, i))
294
297
  }), {
295
298
  trigger: n(({ selectedLabel: i }) => [
296
299
  $(h, { variant: "outline" }, {
@@ -305,7 +308,7 @@ const me = /* @__PURE__ */ B({
305
308
  key: 1,
306
309
  variant: "outline"
307
310
  }, l.field.addonRight.props || {}, {
308
- onClick: a[3] || (a[3] = (i) => S(l.field.addonRight))
311
+ onClick: t[3] || (t[3] = (i) => S(l.field.addonRight))
309
312
  }), {
310
313
  default: n(() => [
311
314
  m(p(l.field.addonRight.text), 1)
@@ -4,6 +4,7 @@ interface Props {
4
4
  schema: IForm[];
5
5
  values: Record<string, any>;
6
6
  errors: Record<string, string>;
7
+ fieldLoading?: Record<string, boolean>;
7
8
  variant?: InputVariant;
8
9
  size?: InputSize;
9
10
  rounded?: InputRounded;
@@ -29,5 +30,6 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
29
30
  rounded: InputRounded;
30
31
  showRequiredAsterisk: boolean;
31
32
  isUpdate: boolean;
33
+ fieldLoading: Record<string, boolean>;
32
34
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
33
35
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import o from "./FormFields.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-d23644f2"]]);
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-df08a3e5"]]);
5
5
  export {
6
- p as default
6
+ e as default
7
7
  };
@@ -1,12 +1,12 @@
1
- import { defineComponent as M, computed as O, ref as _, openBlock as a, createElementBlock as o, normalizeClass as d, Fragment as p, renderList as j, withMemo as G, createBlock as y, withCtx as R, unref as z, resolveDynamicComponent as L, createTextVNode as k, toDisplayString as h, createCommentVNode as c, createElementVNode as J, createVNode as K, markRaw as P } from "vue";
2
- import { isComponent as v, getNestedValue as Q } from "./utils/form.utils.js";
1
+ import { defineComponent as M, computed as O, ref as j, openBlock as s, createElementBlock as r, normalizeClass as d, Fragment as y, renderList as G, withMemo as J, createBlock as h, withCtx as L, unref as R, resolveDynamicComponent as z, createTextVNode as k, toDisplayString as p, createCommentVNode as c, createElementVNode as K, createVNode as P, markRaw as Q } from "vue";
2
+ import { isComponent as v, getNestedValue as W } from "./utils/form.utils.js";
3
3
  import U from "../Label.vue.js";
4
- import W from "./FormField.vue.js";
5
- import { $t as X } from "../../utils/i18n.js";
6
- const Y = {
4
+ import X from "./FormField.vue.js";
5
+ import { $t as Y } from "../../utils/i18n.js";
6
+ const Z = {
7
7
  key: 0,
8
8
  class: "text-destructive ml-0.5"
9
- }, Z = ["onFocusin", "onFocusout"], ee = ["for"], te = {
9
+ }, _ = ["onFocusin", "onFocusout"], ee = ["for"], te = {
10
10
  key: 0,
11
11
  class: "text-destructive ml-0.5"
12
12
  }, ne = {
@@ -21,6 +21,7 @@ const Y = {
21
21
  schema: {},
22
22
  values: {},
23
23
  errors: {},
24
+ fieldLoading: { default: () => ({}) },
24
25
  variant: { default: "outline" },
25
26
  size: { default: "md" },
26
27
  rounded: { default: "md" },
@@ -32,19 +33,19 @@ const Y = {
32
33
  isFieldReadonly: {}
33
34
  },
34
35
  emits: ["change", "addonAction"],
35
- setup(s, { emit: q }) {
36
- const r = s, g = q, D = O(() => {
37
- if (r.className) return r.className;
38
- }), F = (t) => Q(r.values, t.name), l = (t) => r.errors[t.name] || "", $ = (t) => r.isFieldVisible ? r.isFieldVisible(t) : !0, x = (t) => r.isFieldDisabled ? r.isFieldDisabled(t) : t.disabled === !0, A = (t) => r.isFieldReadonly ? r.isFieldReadonly(t) : t.readonly === !0, u = (t) => t.labelI18n ? X(t.labelI18n) : t.label, w = (t) => {
36
+ setup(a, { emit: q }) {
37
+ const o = a, g = q, D = O(() => {
38
+ if (o.className) return o.className;
39
+ }), F = (t) => W(o.values, t.name), l = (t) => o.errors[t.name] || "", $ = (t) => o.isFieldVisible ? o.isFieldVisible(t) : !0, x = (t) => o.isFieldDisabled ? o.isFieldDisabled(t) : t.disabled === !0, A = (t) => o.isFieldReadonly ? o.isFieldReadonly(t) : t.readonly === !0, u = (t) => t.labelI18n ? Y(t.labelI18n) : t.label, w = (t) => {
39
40
  if (t)
40
- return v(t) ? P(t) : t;
41
+ return v(t) ? Q(t) : t;
41
42
  }, B = (t, n) => {
42
43
  g("change", t.name, n);
43
- }, I = (t) => t.itemClass || "", E = (t, n) => {
44
+ }, I = (t) => t.itemClass || "", f = (t, n) => {
44
45
  g("change", t, n);
45
- }, T = (t) => {
46
+ }, E = (t) => {
46
47
  g("addonAction", t);
47
- }, m = _({}), f = (t) => {
48
+ }, m = j({}), T = (t) => {
48
49
  m.value[t] = !0;
49
50
  }, S = (t) => {
50
51
  m.value[t] = !1;
@@ -55,7 +56,7 @@ const Y = {
55
56
  const n = t.type || "text";
56
57
  return ["text", "email", "password", "tel", "url", "search", "textarea"].includes(n);
57
58
  }, H = (t) => t.type === "number" ? (t.props?.variant ?? "split") === "split" ? "left-4" : "left-3" : t.type === "date" || t.type === "time" || t.type === "color" ? "left-10" : "left-3", b = (t) => {
58
- if (r.variant !== "floating") return !1;
59
+ if (o.variant !== "floating") return !1;
59
60
  const n = t.type || "text";
60
61
  return ![
61
62
  "switch",
@@ -70,47 +71,48 @@ const Y = {
70
71
  if (!(!n || v(n)))
71
72
  return n;
72
73
  };
73
- return (t, n) => (a(), o("div", {
74
- class: d(["grid", s.variant === "floating" ? "gap-5 mt-1" : "gap-4", D.value])
74
+ return (t, n) => (s(), r("div", {
75
+ class: d(["grid", a.variant === "floating" ? "gap-5 mt-1" : "gap-4", D.value])
75
76
  }, [
76
- (a(!0), o(p, null, j(s.schema, (e) => (a(), o(p, {
77
+ (s(!0), r(y, null, G(a.schema, (e) => (s(), r(y, {
77
78
  key: e.name
78
79
  }, [
79
- $(e) ? G([
80
+ $(e) ? J([
80
81
  e,
81
82
  F(e),
82
83
  l(e),
83
84
  x(e),
84
85
  A(e),
85
86
  m.value[e.name],
86
- s.variant,
87
- s.size,
88
- s.rounded,
89
- s.isUpdate,
90
- s.showRequiredAsterisk
91
- ], () => (a(), o("div", {
87
+ a.variant,
88
+ a.size,
89
+ a.rounded,
90
+ a.isUpdate,
91
+ a.showRequiredAsterisk,
92
+ a.fieldLoading[e.name]
93
+ ], () => (s(), r("div", {
92
94
  key: 0,
93
95
  class: d(["max-md:col-span-full! form-field-item", I(e)])
94
96
  }, [
95
- u(e) && e.type !== "switch" && e.type !== "check" && e.type !== "customFields" && !b(e) ? (a(), y(U, {
97
+ u(e) && e.type !== "switch" && e.type !== "check" && e.type !== "customFields" && !b(e) ? (s(), h(U, {
96
98
  key: 0,
97
99
  for: e.name,
98
100
  class: "mb-2 block text-sm font-medium"
99
101
  }, {
100
- default: R(() => [
101
- z(v)(u(e)) ? (a(), y(L(w(u(e))), { key: 0 })) : (a(), o(p, { key: 1 }, [
102
- k(h(u(e)) + " ", 1),
103
- e.required && s.showRequiredAsterisk ? (a(), o("span", Y, "*")) : c("", !0)
102
+ default: L(() => [
103
+ R(v)(u(e)) ? (s(), h(z(w(u(e))), { key: 0 })) : (s(), r(y, { key: 1 }, [
104
+ k(p(u(e)) + " ", 1),
105
+ e.required && a.showRequiredAsterisk ? (s(), r("span", Z, "*")) : c("", !0)
104
106
  ], 64))
105
107
  ]),
106
108
  _: 2
107
109
  }, 1032, ["for"])) : c("", !0),
108
- J("div", {
110
+ K("div", {
109
111
  class: d(["relative", ["switch", "check"].includes(e.type) ? "w-auto" : "w-full"]),
110
- onFocusin: (i) => f(e.name),
112
+ onFocusin: (i) => T(e.name),
111
113
  onFocusout: (i) => S(e.name)
112
114
  }, [
113
- b(e) && N(e) && !V(e) ? (a(), o("label", {
115
+ b(e) && N(e) && !V(e) ? (s(), r("label", {
114
116
  key: 0,
115
117
  for: e.name,
116
118
  class: d([
@@ -118,13 +120,13 @@ const Y = {
118
120
  C(e) ? "-top-2.5 left-3 text-xs bg-background px-1 text-black shadow-[0_4px_4px_-4px_bg-background]" : `top-1/2 -translate-y-1/2 text-sm text-muted-foreground/70 ${H(e)}`
119
121
  ])
120
122
  }, [
121
- z(v)(u(e)) ? (a(), y(L(w(u(e))), { key: 0 })) : (a(), o(p, { key: 1 }, [
122
- k(h(u(e)) + " ", 1),
123
- e.required ? (a(), o("span", te, "*")) : c("", !0)
123
+ R(v)(u(e)) ? (s(), h(z(w(u(e))), { key: 0 })) : (s(), r(y, { key: 1 }, [
124
+ k(p(u(e)) + " ", 1),
125
+ e.required ? (s(), r("span", te, "*")) : c("", !0)
124
126
  ], 64))
125
127
  ], 10, ee)) : c("", !0),
126
- K(W, {
127
- field: r.variant === "floating" ? {
128
+ P(X, {
129
+ field: o.variant === "floating" ? {
128
130
  ...e,
129
131
  placeholder: void 0,
130
132
  placeholderI18n: void 0,
@@ -133,31 +135,32 @@ const Y = {
133
135
  value: F(e),
134
136
  floatingActive: C(e),
135
137
  label: e.type === "customFields" ? void 0 : b(e) ? N(e) : void 0,
136
- values: s.values,
137
- variant: s.variant,
138
- size: s.size,
139
- rounded: s.rounded,
138
+ values: a.values,
139
+ variant: a.variant,
140
+ size: a.size,
141
+ rounded: a.rounded,
140
142
  disabled: x(e),
141
143
  readonly: A(e),
142
144
  error: l(e),
143
- isUpdate: s.isUpdate,
145
+ isUpdate: a.isUpdate,
146
+ loading: a.fieldLoading[e.name],
144
147
  onChange: (i) => B(e, i),
145
- onAddonChange: E,
146
- onAddonAction: T
147
- }, null, 8, ["field", "value", "floatingActive", "label", "values", "variant", "size", "rounded", "disabled", "readonly", "error", "isUpdate", "onChange"])
148
- ], 42, Z),
149
- u(e) && (e.type === "switch" || e.type === "check") ? (a(), y(U, {
148
+ onAddonChange: f,
149
+ onAddonAction: E
150
+ }, null, 8, ["field", "value", "floatingActive", "label", "values", "variant", "size", "rounded", "disabled", "readonly", "error", "isUpdate", "loading", "onChange"])
151
+ ], 42, _),
152
+ u(e) && (e.type === "switch" || e.type === "check") ? (s(), h(U, {
150
153
  key: 1,
151
154
  for: e.name,
152
155
  class: "ml-2 text-sm font-medium cursor-pointer"
153
156
  }, {
154
- default: R(() => [
155
- k(h(u(e)) + " ", 1),
156
- e.required ? (a(), o("span", ne, "*")) : c("", !0)
157
+ default: L(() => [
158
+ k(p(u(e)) + " ", 1),
159
+ e.required ? (s(), r("span", ne, "*")) : c("", !0)
157
160
  ]),
158
161
  _: 2
159
162
  }, 1032, ["for"])) : c("", !0),
160
- l(e) ? (a(), o("p", ae, h(l(e)), 1)) : c("", !0)
163
+ l(e) ? (s(), r("p", ae, p(l(e)), 1)) : c("", !0)
161
164
  ], 2)), n, 0) : c("", !0)
162
165
  ], 64))), 128))
163
166
  ], 2));
@@ -17,6 +17,8 @@ export interface UseFormReturn {
17
17
  isSubmitting: Ref<boolean>;
18
18
  /** Whether form has been modified */
19
19
  isDirty: Ref<boolean>;
20
+ /** Loading state of individual fields (e.g. file uploads) */
21
+ fieldLoading: Ref<Record<string, boolean>>;
20
22
  /** Handle field value change */
21
23
  handleFieldChange: (name: string, value: any, data?: any) => void;
22
24
  /** Validate a single field */