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