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