vlite3 1.3.9 → 1.3.11

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.
@@ -1,31 +1,31 @@
1
- import { defineComponent as we, inject as Ae, computed as r, onMounted as se, onUnmounted as O, ref as K, watch as ne, openBlock as s, createElementBlock as c, withKeys as oe, withModifiers as J, normalizeClass as m, createElementVNode as f, createVNode as w, mergeProps as z, toDisplayString as B, unref as a, renderSlot as re, createCommentVNode as u, createBlock as p, withCtx as Te, Fragment as Pe, renderList as Re } from "vue";
2
- import { useForm as Ue } from "./composables/useForm.js";
3
- import Q from "./FormFields.vue.js";
4
- import Ve from "./FormField.vue.js";
5
- import ze from "./FormSkeleton.vue.js";
1
+ import { defineComponent as Pe, inject as Re, computed as r, onMounted as ue, onUnmounted as J, ref as E, watch as de, openBlock as n, createElementBlock as c, withKeys as ce, withModifiers as Q, normalizeClass as m, createElementVNode as g, createVNode as F, mergeProps as z, toDisplayString as B, unref as l, renderSlot as me, createCommentVNode as u, createBlock as C, withCtx as Ve, Fragment as ze, renderList as Be } from "vue";
2
+ import { useForm as Ie } from "./composables/useForm.js";
3
+ import W from "./FormFields.vue.js";
4
+ import Le from "./FormField.vue.js";
5
+ import Ne from "./FormSkeleton.vue.js";
6
6
  import S from "../Button.vue.js";
7
- import Be from "../BackButton.vue.js";
8
- import Le from "../Timeline/Timeline.vue.js";
7
+ import De from "../BackButton.vue.js";
8
+ import qe from "../Timeline/Timeline.vue.js";
9
9
  import "@iconify/vue";
10
- import { $t as Ne } from "../../utils/i18n.js";
11
- import { useVLiteConfig as De } from "../../core/config.js";
12
- import { resolveFieldType as qe } from "./utils/form.utils.js";
13
- const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { class: "flex items-center gap-2 shrink-0" }, Ee = {
10
+ import { $t as Ge } from "../../utils/i18n.js";
11
+ import { useVLiteConfig as He } from "../../core/config.js";
12
+ import { resolveFieldType as $e } from "./utils/form.utils.js";
13
+ const Ee = ["onKeydown"], Ke = { class: "flex items-center gap-3" }, Me = { class: "flex items-center gap-2 shrink-0" }, je = {
14
14
  key: 0,
15
15
  class: "w-full order-first lg:order-last lg:min-w-100 lg:max-w-[380px] shrink-0"
16
- }, Ke = { key: 0 }, Me = {
16
+ }, Oe = { key: 0 }, Je = {
17
17
  key: 0,
18
18
  class: "flex gap-3 items-end ml-auto"
19
- }, Ge = { class: "text-base font-semibold text-foreground" }, je = {
19
+ }, Qe = { class: "text-base font-semibold text-foreground" }, We = {
20
20
  key: 0,
21
21
  class: "text-sm text-muted-foreground mt-1"
22
- }, Oe = {
22
+ }, Xe = {
23
23
  key: 2,
24
24
  class: "form-step"
25
- }, Je = { class: "text-lg font-semibold text-foreground" }, Qe = {
25
+ }, Ye = { class: "text-lg font-semibold text-foreground" }, Ze = {
26
26
  key: 0,
27
27
  class: "text-sm text-muted-foreground mt-1"
28
- }, We = { class: "flex gap-3 items-center" }, rt = /* @__PURE__ */ we({
28
+ }, _e = { class: "flex gap-3 items-center" }, mt = /* @__PURE__ */ Pe({
29
29
  __name: "Form",
30
30
  props: {
31
31
  schema: {},
@@ -36,8 +36,8 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
36
36
  loading: { type: Boolean, default: !1 },
37
37
  schemaLoading: { type: Boolean, default: !1 },
38
38
  footer: { type: Boolean, default: !0 },
39
- groupsHeadings: { default: () => [] },
40
- groupHeadingsDescription: { default: () => [] },
39
+ groupsHeadings: { type: [Array, Function], default: () => [] },
40
+ groupHeadingsDescription: { type: [Array, Function], default: () => [] },
41
41
  tabs: {},
42
42
  submitText: { default: "Submit" },
43
43
  submitProps: {},
@@ -66,352 +66,376 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
66
66
  layout: { default: "vertical" }
67
67
  },
68
68
  emits: ["onSubmit", "onCancel", "onStepChange", "onAddonAction", "onBack"],
69
- setup(e, { expose: ue, emit: de }) {
70
- const t = e, y = de, v = Ae("modal-context", null), ce = De(), L = r(() => ce?.components?.form || {}), N = r(() => t.variant ?? L.value.variant ?? "outline"), D = r(() => t.size ?? L.value.size ?? "md"), q = r(() => t.rounded ?? L.value.rounded ?? "md"), M = r(
71
- () => t.showRequiredAsterisk ?? L.value.showRequiredAsterisk ?? !0
72
- ), W = r(() => t.showCancel || !!v), A = r(() => !!v), R = r(
73
- () => t.layout !== "inline" && (t.stickyFooter || A.value)
69
+ setup(e, { expose: ve, emit: fe }) {
70
+ const t = e, y = fe, f = Re("modal-context", null), ge = He(), I = r(() => ge?.components?.form || {}), L = r(() => t.variant ?? I.value.variant ?? "outline"), N = r(() => t.size ?? I.value.size ?? "md"), D = r(() => t.rounded ?? I.value.rounded ?? "md"), K = r(
71
+ () => t.showRequiredAsterisk ?? I.value.showRequiredAsterisk ?? !0
72
+ ), X = r(() => t.showCancel || !!f), w = r(() => !!f), P = r(
73
+ () => t.layout !== "inline" && (t.stickyFooter || w.value)
74
74
  );
75
- se(() => {
76
- t.footer && A.value && v?.registerFormFooter?.(!0);
77
- }), O(() => {
78
- A.value && v?.registerFormFooter?.(!1);
75
+ ue(() => {
76
+ t.footer && w.value && f?.registerFormFooter?.(!0);
77
+ }), J(() => {
78
+ w.value && f?.registerFormFooter?.(!1);
79
79
  });
80
- const me = K(null), G = K(null), X = K(!1);
80
+ const he = E(null), M = E(null), Y = E(!1);
81
81
  let j = null;
82
- se(() => {
83
- G.value && (j = new IntersectionObserver(
84
- ([l]) => {
85
- X.value = !l.isIntersecting;
82
+ ue(() => {
83
+ M.value && (j = new IntersectionObserver(
84
+ ([a]) => {
85
+ Y.value = !a.isIntersecting;
86
86
  },
87
87
  { threshold: 0 }
88
- ), j.observe(G.value));
89
- }), O(() => {
88
+ ), j.observe(M.value));
89
+ }), J(() => {
90
90
  j?.disconnect();
91
91
  });
92
- const T = r(() => !t.schema || t.schema.length === 0 ? !1 : Array.isArray(t.schema[0])), d = r(() => t.tabs && t.tabs.length > 0 && T.value), n = K(0), Y = r(() => t.tabs ? t.tabs.map((l, i) => ({
93
- id: l.id?.toString() || i.toString(),
94
- title: l.title,
95
- icon: l.icon,
96
- description: l.description,
97
- status: i < n.value ? "completed" : i === n.value ? "current" : "upcoming"
98
- })) : []), F = r(() => T.value ? t.schema : [t.schema]), Z = r(() => d.value ? F.value[n.value] || [] : []), g = r(() => d.value ? null : (T.value ? t.schema.flat() : t.schema).find((i) => qe(i, {
99
- values: h.value,
100
- globalValues: h.value,
92
+ const A = r(() => !t.schema || t.schema.length === 0 ? !1 : Array.isArray(t.schema[0])), d = r(() => t.tabs && t.tabs.length > 0 && A.value), o = E(0), Z = r(() => t.tabs ? t.tabs.map((a, i) => ({
93
+ id: a.id?.toString() || i.toString(),
94
+ title: a.title,
95
+ icon: a.icon,
96
+ description: a.description,
97
+ status: i < o.value ? "completed" : i === o.value ? "current" : "upcoming"
98
+ })) : []), R = r(() => A.value ? t.schema : [t.schema]), _ = r(() => d.value ? R.value[o.value] || [] : []), ee = (a) => {
99
+ if (!a) return [];
100
+ if (Array.isArray(a)) return a;
101
+ try {
102
+ const i = a({
103
+ values: v.value,
104
+ globalValues: v.value,
105
+ isUpdate: t.isUpdate
106
+ });
107
+ return Array.isArray(i) ? i : [];
108
+ } catch (i) {
109
+ return console.error("[Form] Error evaluating dynamic group headings:", i), [];
110
+ }
111
+ }, te = r(
112
+ () => ee(t.groupsHeadings)
113
+ ), ae = r(
114
+ () => ee(t.groupHeadingsDescription)
115
+ ), O = r(() => {
116
+ const a = R.value, i = [];
117
+ for (let s = 0; s < a.length; s++) {
118
+ const x = a[s];
119
+ !Array.isArray(x) || x.length === 0 || x.some((Ue) => U(Ue)) && i.push({ schema: x, originalIndex: s });
120
+ }
121
+ return i;
122
+ }), h = r(() => d.value ? null : (A.value ? t.schema.flat() : t.schema).find((i) => $e(i, {
123
+ values: v.value,
124
+ globalValues: v.value,
101
125
  isUpdate: t.isUpdate
102
- }) === "thumbnailSelector") ?? null), P = r(() => !!g.value), {
103
- formValues: h,
104
- errors: x,
126
+ }) === "thumbnailSelector") ?? null), T = r(() => !!h.value), {
127
+ formValues: v,
128
+ errors: p,
105
129
  isSubmitting: b,
106
- fieldLoading: H,
107
- handleFieldChange: _,
108
- validateField: ve,
109
- validateAll: ee,
130
+ fieldLoading: q,
131
+ handleFieldChange: le,
132
+ validateField: be,
133
+ validateAll: ie,
110
134
  isFieldVisible: U,
111
135
  isFieldDisabled: V,
112
- isFieldReadonly: $,
113
- handleSubmit: fe,
114
- reinitialize: ge,
115
- resetForm: he,
116
- setFieldError: be,
117
- clearErrors: ye
118
- } = Ue({
136
+ isFieldReadonly: G,
137
+ handleSubmit: ye,
138
+ reinitialize: xe,
139
+ resetForm: pe,
140
+ setFieldError: ke,
141
+ clearErrors: Ce
142
+ } = Ie({
119
143
  schema: t.schema,
120
144
  values: t.values,
121
145
  isUpdate: t.isUpdate,
122
146
  folderId: t.folderId,
123
147
  emitFields: t.emitFields,
124
- onSubmit: (l) => {
125
- y("onSubmit", l, v?.close || (() => {
148
+ onSubmit: (a) => {
149
+ y("onSubmit", a, f?.close || (() => {
126
150
  }));
127
151
  }
128
152
  });
129
- ne(
153
+ de(
130
154
  () => t.loading || b.value,
131
- (l) => {
132
- v?.setSubmitting && v.setSubmitting(l);
155
+ (a) => {
156
+ f?.setSubmitting && f.setSubmitting(a);
133
157
  },
134
158
  { immediate: !0 }
135
- ), O(() => {
136
- v?.setSubmitting && v.setSubmitting(!1);
137
- }), ne(
159
+ ), J(() => {
160
+ f?.setSubmitting && f.setSubmitting(!1);
161
+ }), de(
138
162
  [() => t.schema, () => t.values, () => t.schemaLoading],
139
- ([l, i, o]) => {
140
- o || ge(l, i);
163
+ ([a, i, s]) => {
164
+ s || xe(a, i);
141
165
  }
142
166
  );
143
- const I = (l, i) => {
144
- _(l, i.value, i.data);
145
- }, xe = async () => {
167
+ const H = (a, i) => {
168
+ le(a, i.value, i.data);
169
+ }, Se = async () => {
146
170
  if (!d.value) return !0;
147
- const l = Z.value;
171
+ const a = _.value;
148
172
  let i = !0;
149
- for (const o of l) {
150
- if (!U(o) || V(o)) continue;
151
- await ve(o) && (i = !1);
173
+ for (const s of a) {
174
+ if (!U(s) || V(s)) continue;
175
+ await be(s) && (i = !1);
152
176
  }
153
177
  return i;
154
- }, ke = r(() => d.value ? n.value < F.value.length - 1 : !1), te = r(() => d.value ? n.value > 0 : !1), E = r(() => d.value ? n.value === F.value.length - 1 : !0), ae = async () => {
155
- !ke.value || !await xe() || (n.value++, y("onStepChange", n.value));
156
- }, Ce = () => {
157
- te.value && (n.value--, y("onStepChange", n.value));
158
- }, pe = (l, i) => {
159
- i <= n.value && (n.value = i, y("onStepChange", n.value));
178
+ }, Fe = r(() => d.value ? o.value < R.value.length - 1 : !1), se = r(() => d.value ? o.value > 0 : !1), $ = r(() => d.value ? o.value === R.value.length - 1 : !0), ne = async () => {
179
+ !Fe.value || !await Se() || (o.value++, y("onStepChange", o.value));
180
+ }, we = () => {
181
+ se.value && (o.value--, y("onStepChange", o.value));
182
+ }, Ae = (a, i) => {
183
+ i <= o.value && (o.value = i, y("onStepChange", o.value));
160
184
  }, k = async () => {
161
185
  if (d.value) {
162
- if (!E.value && !t.isUpdate) {
163
- await ae();
186
+ if (!$.value && !t.isUpdate) {
187
+ await ne();
164
188
  return;
165
189
  }
166
- if (!await ee()) {
167
- const i = F.value.findIndex(
168
- (o) => o.some((C) => !!x.value[C.name])
190
+ if (!await ie()) {
191
+ const i = R.value.findIndex(
192
+ (s) => s.some((x) => !!p.value[x.name])
169
193
  );
170
- i !== -1 && i !== n.value && (n.value = i, y("onStepChange", n.value));
194
+ i !== -1 && i !== o.value && (o.value = i, y("onStepChange", o.value));
171
195
  return;
172
196
  }
173
197
  }
174
198
  try {
175
- await fe();
199
+ await ye();
176
200
  } catch {
177
201
  }
178
- }, Se = (l) => {
179
- if (l.key !== "Enter") return;
180
- const o = l.target.tagName.toLowerCase();
181
- o !== "textarea" && o !== "button" && (l.preventDefault(), k());
182
- }, le = (l) => {
183
- (l.metaKey || l.ctrlKey) && l.key === "s" && (l.preventDefault(), k());
202
+ }, Te = (a) => {
203
+ if (a.key !== "Enter") return;
204
+ const s = a.target.tagName.toLowerCase();
205
+ s !== "textarea" && s !== "button" && (a.preventDefault(), k());
206
+ }, oe = (a) => {
207
+ (a.metaKey || a.ctrlKey) && a.key === "s" && (a.preventDefault(), k());
184
208
  };
185
- ue({
186
- formValues: h,
187
- errors: x,
209
+ ve({
210
+ formValues: v,
211
+ errors: p,
188
212
  isSubmitting: b,
189
213
  handleSubmit: k,
190
- validateAll: ee,
191
- resetForm: he,
192
- setFieldError: be,
193
- clearErrors: ye,
194
- setFieldValue: _
214
+ validateAll: ie,
215
+ resetForm: pe,
216
+ setFieldError: ke,
217
+ clearErrors: Ce,
218
+ setFieldValue: le
195
219
  });
196
- const ie = () => {
197
- y("onCancel"), v && v?.close?.();
220
+ const re = () => {
221
+ y("onCancel"), f && f?.close?.();
198
222
  };
199
- return (l, i) => (s(), c("form", {
223
+ return (a, i) => (n(), c("form", {
200
224
  class: m(["form-container", t.class, e.isPage && "pb-10"]),
201
- onSubmit: J(k, ["prevent"]),
225
+ onSubmit: Q(k, ["prevent"]),
202
226
  onKeydown: [
203
- Se,
204
- oe(J(le, ["meta", "prevent"]), ["s"]),
205
- oe(J(le, ["ctrl", "prevent"]), ["s"])
227
+ Te,
228
+ ce(Q(oe, ["meta", "prevent"]), ["s"]),
229
+ ce(Q(oe, ["ctrl", "prevent"]), ["s"])
206
230
  ]
207
231
  }, [
208
- e.isPage ? (s(), c("div", {
232
+ e.isPage ? (n(), c("div", {
209
233
  key: 0,
210
234
  class: m([
211
235
  "form-page-header sticky top-0 z-30 bg-background flex items-center justify-between pb-3.5 pt-4 -mt-3.5 mb-4.5",
212
236
  e.pageHeaderClass
213
237
  ])
214
238
  }, [
215
- f("div", $e, [
216
- w(Be, z(e.backButtonProps, {
239
+ g("div", Ke, [
240
+ F(De, z(e.backButtonProps, {
217
241
  fallback: e.backButtonPath,
218
242
  class: "max-sm:w-8 max-sm:h-8 max-sm:min-w-8 max-sm:min-h-8 max-sm:px-0 shrink-0"
219
243
  }), null, 16, ["fallback"]),
220
- f("h1", {
244
+ g("h1", {
221
245
  class: m(["text-foreground max-sm:text-lg text-fs-5 truncate", e.pageTitleClass])
222
- }, B(e.pageTitleI18n ? a(Ne)(e.pageTitleI18n) : e.pageTitle), 3)
246
+ }, B(e.pageTitleI18n ? l(Ge)(e.pageTitleI18n) : e.pageTitle), 3)
223
247
  ]),
224
- f("div", Ie, [
225
- re(l.$slots, "header-actions", {
226
- values: a(h),
227
- isSubmitting: a(b),
248
+ g("div", Me, [
249
+ me(a.$slots, "header-actions", {
250
+ values: l(v),
251
+ isSubmitting: l(b),
228
252
  handleSubmit: k
229
253
  }, void 0, !0),
230
- w(S, z({
254
+ F(S, z({
231
255
  type: "button",
232
256
  variant: e.isUpdate ? "outline" : "primary",
233
257
  text: e.submitText
234
258
  }, e.submitProps, {
235
259
  disabled: e.schemaLoading,
236
- loading: e.loading || a(b),
260
+ loading: e.loading || l(b),
237
261
  onClick: k,
238
262
  class: "max-sm:hidden"
239
263
  }), null, 16, ["variant", "text", "disabled", "loading"])
240
264
  ])
241
265
  ], 2)) : u("", !0),
242
- !e.schemaLoading && d.value && Y.value.length > 0 ? (s(), c("div", {
266
+ !e.schemaLoading && d.value && Z.value.length > 0 ? (n(), c("div", {
243
267
  key: 1,
244
268
  class: m(["form-timeline", e.timelineTextPosition == "right" ? "mb-2" : "mb-8"])
245
269
  }, [
246
- w(a(Le), {
247
- steps: Y.value,
248
- activeStep: n.value,
270
+ F(l(qe), {
271
+ steps: Z.value,
272
+ activeStep: o.value,
249
273
  direction: "horizontal",
250
274
  textPosition: e.timelineTextPosition,
251
275
  clickable: !0,
252
- onStepClick: pe
276
+ onStepClick: Ae
253
277
  }, null, 8, ["steps", "activeStep", "textPosition"])
254
278
  ], 2)) : u("", !0),
255
- f("div", {
256
- class: m(e.footer && R.value ? "pb-2" : "")
279
+ g("div", {
280
+ class: m(e.footer && P.value ? "pb-2" : "")
257
281
  }, [
258
- e.schemaLoading ? (s(), p(ze, {
282
+ e.schemaLoading ? (n(), C(Ne, {
259
283
  key: 0,
260
- isGrouped: T.value
261
- }, null, 8, ["isGrouped"])) : (s(), c("div", {
284
+ isGrouped: A.value
285
+ }, null, 8, ["isGrouped"])) : (n(), c("div", {
262
286
  key: 1,
263
- class: m(P.value ? "flex flex-col lg:flex-row gap-10 lg:gap-16" : "")
287
+ class: m(T.value ? "flex flex-col lg:flex-row gap-10 lg:gap-16" : "")
264
288
  }, [
265
- P.value ? (s(), c("div", Ee, [
266
- g.value && a(U)(g.value) ? (s(), p(Ve, {
289
+ T.value ? (n(), c("div", je, [
290
+ h.value && l(U)(h.value) ? (n(), C(Le, {
267
291
  key: 0,
268
- field: g.value,
269
- value: a(h)[g.value.name],
270
- values: a(h),
271
- errors: a(x),
272
- variant: N.value,
273
- size: D.value,
274
- rounded: q.value,
275
- disabled: a(V)(g.value),
276
- readonly: a($)(g.value),
277
- error: a(x)[g.value.name] || "",
292
+ field: h.value,
293
+ value: l(v)[h.value.name],
294
+ values: l(v),
295
+ errors: l(p),
296
+ variant: L.value,
297
+ size: N.value,
298
+ rounded: D.value,
299
+ disabled: l(V)(h.value),
300
+ readonly: l(G)(h.value),
301
+ error: l(p)[h.value.name] || "",
278
302
  isUpdate: e.isUpdate,
279
- loading: a(H)[g.value?.name],
280
- onChange: i[0] || (i[0] = (o) => I(g.value.name, o))
303
+ loading: l(q)[h.value?.name],
304
+ onChange: i[0] || (i[0] = (s) => H(h.value.name, s))
281
305
  }, null, 8, ["field", "value", "values", "errors", "variant", "size", "rounded", "disabled", "readonly", "error", "isUpdate", "loading"])) : u("", !0)
282
306
  ])) : u("", !0),
283
- f("div", {
284
- class: m(P.value ? "flex-1 min-w-0 order-last lg:order-first" : "w-full")
307
+ g("div", {
308
+ class: m(T.value ? "flex-1 min-w-0 order-last lg:order-first" : "w-full")
285
309
  }, [
286
- T.value ? T.value && !d.value ? (s(), c("div", {
310
+ A.value ? A.value && !d.value ? (n(), c("div", {
287
311
  key: 1,
288
312
  class: m(["form-groups space-y-6", e.groupContainerClass])
289
313
  }, [
290
- (s(!0), c(Pe, null, Re(F.value, (o, C) => (s(), c("div", {
291
- key: C,
314
+ (n(!0), c(ze, null, Be(O.value, (s) => (n(), c("div", {
315
+ key: s.originalIndex,
292
316
  class: m([
293
317
  "form-group overflow-hidden bg-body",
294
318
  e.groupClass,
295
- F.value?.length > 1 ? "border rounded" : ""
319
+ O.value.length > 1 ? "border rounded" : ""
296
320
  ])
297
321
  }, [
298
- e.groupsHeadings?.[C] ? (s(), c("div", {
322
+ te.value?.[s.originalIndex] ? (n(), c("div", {
299
323
  key: 0,
300
324
  class: m(["form-group-header bg-muted/50 px-4 py-2.5 border-b", e.headerClass])
301
325
  }, [
302
- f("h3", Ge, B(e.groupsHeadings[C]), 1),
303
- e.groupHeadingsDescription?.[C] ? (s(), c("p", je, B(e.groupHeadingsDescription[C]), 1)) : u("", !0)
326
+ g("h3", Qe, B(te.value[s.originalIndex]), 1),
327
+ ae.value?.[s.originalIndex] ? (n(), c("p", We, B(ae.value[s.originalIndex]), 1)) : u("", !0)
304
328
  ], 2)) : u("", !0),
305
- f("div", {
306
- class: m(["form-group-body", [e.groupBodyClass, F.value?.length > 1 ? "p-4.5" : ""]])
329
+ g("div", {
330
+ class: m(["form-group-body", [e.groupBodyClass, O.value.length > 1 ? "p-4.5" : ""]])
307
331
  }, [
308
- w(Q, {
309
- schema: o,
310
- values: a(h),
311
- errors: a(x),
312
- fieldLoading: a(H),
313
- variant: N.value,
314
- size: D.value,
315
- rounded: q.value,
332
+ F(W, {
333
+ schema: s.schema,
334
+ values: l(v),
335
+ errors: l(p),
336
+ fieldLoading: l(q),
337
+ variant: L.value,
338
+ size: N.value,
339
+ rounded: D.value,
316
340
  className: e.className,
317
341
  isUpdate: e.isUpdate,
318
- showRequiredAsterisk: M.value,
319
- isFieldVisible: a(U),
320
- isFieldDisabled: a(V),
321
- isFieldReadonly: a($),
322
- excludeTypes: P.value ? ["thumbnailSelector"] : [],
323
- onChange: I,
324
- onAddonAction: i[2] || (i[2] = (Fe) => y("onAddonAction", Fe))
342
+ showRequiredAsterisk: K.value,
343
+ isFieldVisible: l(U),
344
+ isFieldDisabled: l(V),
345
+ isFieldReadonly: l(G),
346
+ excludeTypes: T.value ? ["thumbnailSelector"] : [],
347
+ onChange: H,
348
+ onAddonAction: i[2] || (i[2] = (x) => y("onAddonAction", x))
325
349
  }, null, 8, ["schema", "values", "errors", "fieldLoading", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly", "excludeTypes"])
326
350
  ], 2)
327
351
  ], 2))), 128))
328
- ], 2)) : d.value ? (s(), c("div", Oe, [
329
- e.tabs?.[n.value] ? (s(), c("div", {
352
+ ], 2)) : d.value ? (n(), c("div", Xe, [
353
+ e.tabs?.[o.value] ? (n(), c("div", {
330
354
  key: 0,
331
355
  class: m(["form-step-header mb-6", e.headerClass])
332
356
  }, [
333
- f("h2", Je, B(e.tabs[n.value].title), 1),
334
- e.tabs[n.value].description ? (s(), c("p", Qe, B(e.tabs[n.value].description), 1)) : u("", !0)
357
+ g("h2", Ye, B(e.tabs[o.value].title), 1),
358
+ e.tabs[o.value].description ? (n(), c("p", Ze, B(e.tabs[o.value].description), 1)) : u("", !0)
335
359
  ], 2)) : u("", !0),
336
- w(Q, {
337
- schema: Z.value,
338
- values: a(h),
339
- errors: a(x),
340
- fieldLoading: a(H),
341
- variant: N.value,
342
- size: D.value,
343
- rounded: q.value,
360
+ F(W, {
361
+ schema: _.value,
362
+ values: l(v),
363
+ errors: l(p),
364
+ fieldLoading: l(q),
365
+ variant: L.value,
366
+ size: N.value,
367
+ rounded: D.value,
344
368
  className: e.className,
345
369
  isUpdate: e.isUpdate,
346
- showRequiredAsterisk: M.value,
347
- isFieldVisible: a(U),
348
- isFieldDisabled: a(V),
349
- isFieldReadonly: a($),
350
- excludeTypes: P.value ? ["thumbnailSelector"] : [],
351
- onChange: I,
352
- onAddonAction: i[3] || (i[3] = (o) => y("onAddonAction", o))
370
+ showRequiredAsterisk: K.value,
371
+ isFieldVisible: l(U),
372
+ isFieldDisabled: l(V),
373
+ isFieldReadonly: l(G),
374
+ excludeTypes: T.value ? ["thumbnailSelector"] : [],
375
+ onChange: H,
376
+ onAddonAction: i[3] || (i[3] = (s) => y("onAddonAction", s))
353
377
  }, null, 8, ["schema", "values", "errors", "fieldLoading", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly", "excludeTypes"])
354
- ])) : u("", !0) : (s(), c("div", Ke, [
355
- w(Q, {
378
+ ])) : u("", !0) : (n(), c("div", Oe, [
379
+ F(W, {
356
380
  schema: e.schema,
357
- values: a(h),
358
- errors: a(x),
359
- fieldLoading: a(H),
360
- variant: N.value,
361
- size: D.value,
362
- rounded: q.value,
381
+ values: l(v),
382
+ errors: l(p),
383
+ fieldLoading: l(q),
384
+ variant: L.value,
385
+ size: N.value,
386
+ rounded: D.value,
363
387
  className: e.className,
364
388
  isUpdate: e.isUpdate,
365
- showRequiredAsterisk: M.value,
366
- isFieldVisible: a(U),
367
- isFieldDisabled: a(V),
368
- isFieldReadonly: a($),
369
- excludeTypes: P.value ? ["thumbnailSelector"] : [],
389
+ showRequiredAsterisk: K.value,
390
+ isFieldVisible: l(U),
391
+ isFieldDisabled: l(V),
392
+ isFieldReadonly: l(G),
393
+ excludeTypes: T.value ? ["thumbnailSelector"] : [],
370
394
  layout: t.layout,
371
- onChange: I,
372
- onAddonAction: i[1] || (i[1] = (o) => y("onAddonAction", o))
395
+ onChange: H,
396
+ onAddonAction: i[1] || (i[1] = (s) => y("onAddonAction", s))
373
397
  }, {
374
- default: Te(() => [
375
- t.layout === "inline" && e.footer ? (s(), c("div", Me, [
376
- W.value ? (s(), p(S, {
398
+ default: Ve(() => [
399
+ t.layout === "inline" && e.footer ? (n(), c("div", Je, [
400
+ X.value ? (n(), C(S, {
377
401
  key: 0,
378
402
  type: "button",
379
403
  variant: "outline",
380
404
  text: e.cancelText,
381
- disabled: e.loading || a(b),
382
- onClick: ie
405
+ disabled: e.loading || l(b),
406
+ onClick: re
383
407
  }, null, 8, ["text", "disabled"])) : u("", !0),
384
- w(S, z({
408
+ F(S, z({
385
409
  type: "submit",
386
410
  variant: "primary",
387
411
  text: e.submitText
388
412
  }, e.submitProps, {
389
- loading: e.loading || a(b)
413
+ loading: e.loading || l(b)
390
414
  }), null, 16, ["text", "loading"])
391
415
  ])) : u("", !0)
392
416
  ]),
393
417
  _: 1
394
418
  }, 8, ["schema", "values", "errors", "fieldLoading", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly", "excludeTypes", "layout"])
395
419
  ])),
396
- re(l.$slots, "default", {
397
- values: a(h),
398
- errors: a(x),
399
- isSubmitting: a(b),
420
+ me(a.$slots, "default", {
421
+ values: l(v),
422
+ errors: l(p),
423
+ isSubmitting: l(b),
400
424
  handleSubmit: k
401
425
  }, void 0, !0)
402
426
  ], 2)
403
427
  ], 2)),
404
- f("div", {
428
+ g("div", {
405
429
  ref_key: "sentinelRef",
406
- ref: G,
430
+ ref: M,
407
431
  class: "form-scroll-sentinel h-px w-full",
408
432
  "aria-hidden": "true"
409
433
  }, null, 512)
410
434
  ], 2),
411
- e.footer && !e.schemaLoading && t.layout !== "inline" ? (s(), c("div", {
435
+ e.footer && !e.schemaLoading && t.layout !== "inline" ? (n(), c("div", {
412
436
  key: 2,
413
437
  ref_key: "footerRef",
414
- ref: me,
438
+ ref: he,
415
439
  class: m([
416
440
  "form-footer items-center gap-3 z-20 rounded-b-md!",
417
441
  e.isPage ? "flex sm:hidden" : "flex",
@@ -421,68 +445,68 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
421
445
  // `sticky bottom-0` anchors the footer to the bottom of the nearest scrollable ancestor
422
446
  // (the modal's overflow-y-auto body), keeping it visible at all times without leaving
423
447
  // the normal document flow (unlike `fixed` which would escape the modal bounds).
424
- R.value ? "sticky bottom-0 bg-body pt-3 pb-3 -mx-0.5 px-0.5 mt-6 border-t border-border/75" : t.layout !== "inline" ? "mt-6" : "",
448
+ P.value ? "sticky bottom-0 bg-body pt-3 pb-3 -mx-0.5 px-0.5 mt-6 border-t border-border/75" : t.layout !== "inline" ? "mt-6" : "",
425
449
  // Show a subtle top shadow while content is scrolling beneath the sticky footer
426
- (R.value && X.value, ""),
450
+ (P.value && Y.value, ""),
427
451
  // Inside modal: extend footer flush to modal edge padding
428
- A.value && t.layout !== "inline" ? "-mx-4 px-4 pb-3! mt-7.5!" : "",
452
+ w.value && t.layout !== "inline" ? "-mx-4 px-4 pb-3! mt-7.5!" : "",
429
453
  // Non-sticky inside modal keeps the original border styling
430
- !R.value && A.value && t.layout !== "inline" ? "border-t border-border/75 mt-5" : "",
431
- !R.value && !A.value && t.layout !== "inline" ? "mt-6" : "",
454
+ !P.value && w.value && t.layout !== "inline" ? "border-t border-border/75 mt-5" : "",
455
+ !P.value && !w.value && t.layout !== "inline" ? "mt-6" : "",
432
456
  t.layout === "inline" ? "mt-0 shrink-0" : ""
433
457
  ])
434
458
  }, [
435
- f("div", We, [
436
- W.value ? (s(), p(S, {
459
+ g("div", _e, [
460
+ X.value ? (n(), C(S, {
437
461
  key: 0,
438
462
  type: "button",
439
463
  variant: "outline",
440
464
  text: e.cancelText,
441
- disabled: e.loading || a(b),
442
- onClick: ie
465
+ disabled: e.loading || l(b),
466
+ onClick: re
443
467
  }, null, 8, ["text", "disabled"])) : u("", !0),
444
- d.value && e.isUpdate && !E.value ? (s(), p(S, z({
468
+ d.value && e.isUpdate && !$.value ? (n(), C(S, z({
445
469
  key: 1,
446
470
  type: "button",
447
471
  variant: "primary",
448
472
  text: e.submitText
449
473
  }, e.submitProps, {
450
- loading: e.loading || a(b),
474
+ loading: e.loading || l(b),
451
475
  onClick: k
452
476
  }), null, 16, ["text", "loading"])) : u("", !0)
453
477
  ]),
454
- f("div", {
478
+ g("div", {
455
479
  class: m(["flex gap-3 items-center", d.value && "ml-auto"])
456
480
  }, [
457
- d.value && te.value ? (s(), p(S, {
481
+ d.value && se.value ? (n(), C(S, {
458
482
  key: 0,
459
483
  type: "button",
460
484
  variant: "outline",
461
485
  icon: "lucide:arrow-left",
462
486
  text: "Previous",
463
- onClick: Ce
487
+ onClick: we
464
488
  })) : u("", !0),
465
- d.value && !E.value ? (s(), p(S, {
489
+ d.value && !$.value ? (n(), C(S, {
466
490
  key: 1,
467
491
  type: "button",
468
492
  variant: e.isUpdate ? "outline" : "primary",
469
493
  text: "Next",
470
494
  iconRight: "lucide:arrow-right",
471
- onClick: ae
495
+ onClick: ne
472
496
  }, null, 8, ["variant"])) : u("", !0),
473
- !d.value || E.value ? (s(), p(S, z({
497
+ !d.value || $.value ? (n(), C(S, z({
474
498
  key: 2,
475
499
  type: "submit",
476
500
  variant: "primary",
477
501
  text: e.submitText
478
502
  }, e.submitProps, {
479
- loading: e.loading || a(b)
503
+ loading: e.loading || l(b)
480
504
  }), null, 16, ["text", "loading"])) : u("", !0)
481
505
  ], 2)
482
506
  ], 2)) : u("", !0)
483
- ], 42, He));
507
+ ], 42, Ee));
484
508
  }
485
509
  });
486
510
  export {
487
- rt as default
511
+ mt as default
488
512
  };