vlite3 0.8.2 → 0.8.4

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 (69) hide show
  1. package/components/BackButton.vue.js +10 -11
  2. package/components/Breadcrumb/Breadcrumb.vue.js +2 -2
  3. package/components/Chip/Chip.vue.d.ts +2 -2
  4. package/components/ChoiceBox/ChoiceBox.vue.d.ts +1 -1
  5. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  6. package/components/ColorPicker/ColorPicker.vue.js +2 -2
  7. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  8. package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
  9. package/components/DataTable/DataTable.vue.d.ts +2 -2
  10. package/components/Empty/Empty.vue.d.ts +2 -0
  11. package/components/Empty/Empty.vue.js +50 -33
  12. package/components/Empty/index.d.ts +1 -0
  13. package/components/Empty/variants/Variant1.vue.d.ts +22 -0
  14. package/components/Empty/variants/Variant1.vue.js +4 -0
  15. package/components/Empty/variants/Variant1.vue2.js +33 -0
  16. package/components/Empty/variants/Variant10.vue.d.ts +22 -0
  17. package/components/Empty/variants/Variant10.vue.js +4 -0
  18. package/components/Empty/variants/Variant10.vue2.js +37 -0
  19. package/components/Empty/variants/Variant11.vue.d.ts +22 -0
  20. package/components/Empty/variants/Variant11.vue.js +4 -0
  21. package/components/Empty/variants/Variant11.vue2.js +29 -0
  22. package/components/Empty/variants/Variant2.vue.d.ts +22 -0
  23. package/components/Empty/variants/Variant2.vue.js +4 -0
  24. package/components/Empty/variants/Variant2.vue2.js +33 -0
  25. package/components/Empty/variants/Variant3.vue.d.ts +22 -0
  26. package/components/Empty/variants/Variant3.vue.js +4 -0
  27. package/components/Empty/variants/Variant3.vue2.js +22 -0
  28. package/components/Empty/variants/Variant4.vue.d.ts +22 -0
  29. package/components/Empty/variants/Variant4.vue.js +4 -0
  30. package/components/Empty/variants/Variant4.vue2.js +33 -0
  31. package/components/Empty/variants/Variant5.vue.d.ts +22 -0
  32. package/components/Empty/variants/Variant5.vue.js +4 -0
  33. package/components/Empty/variants/Variant5.vue2.js +30 -0
  34. package/components/Empty/variants/Variant6.vue.d.ts +22 -0
  35. package/components/Empty/variants/Variant6.vue.js +4 -0
  36. package/components/Empty/variants/Variant6.vue2.js +33 -0
  37. package/components/Empty/variants/Variant7.vue.d.ts +22 -0
  38. package/components/Empty/variants/Variant7.vue.js +4 -0
  39. package/components/Empty/variants/Variant7.vue2.js +35 -0
  40. package/components/Empty/variants/Variant8.vue.d.ts +22 -0
  41. package/components/Empty/variants/Variant8.vue.js +4 -0
  42. package/components/Empty/variants/Variant8.vue2.js +33 -0
  43. package/components/Empty/variants/Variant9.vue.d.ts +22 -0
  44. package/components/Empty/variants/Variant9.vue.js +4 -0
  45. package/components/Empty/variants/Variant9.vue2.js +33 -0
  46. package/components/Form/Form.vue.d.ts +18 -0
  47. package/components/Form/Form.vue.js +1 -1
  48. package/components/Form/Form.vue2.js +219 -170
  49. package/components/Form/types.d.ts +13 -1
  50. package/components/Form/utils/form.utils.d.ts +11 -0
  51. package/components/Form/utils/form.utils.js +115 -104
  52. package/components/Modal.vue.js +2 -2
  53. package/components/Modal.vue2.js +45 -43
  54. package/components/Navbar/Navbar.vue.d.ts +2 -2
  55. package/components/NavbarCommandPalette.vue.js +1 -1
  56. package/components/ProgressBar/ProgressBar.vue.d.ts +1 -1
  57. package/components/Screen/Screen.vue.js +249 -241
  58. package/components/Screen/ScreenFilter.vue.js +1 -1
  59. package/components/SidebarMenu/SidebarMenuItem.vue.js +5 -7
  60. package/components/Workbook/Workbook.vue.d.ts +2 -2
  61. package/core/config.d.ts +6 -0
  62. package/core/config.js +14 -8
  63. package/core/index.js +12 -7
  64. package/index.d.ts +1 -0
  65. package/index.js +120 -117
  66. package/package.json +1 -1
  67. package/style.css +1 -1
  68. package/types/config.type.d.ts +9 -0
  69. /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
@@ -1,26 +1,28 @@
1
- import { defineComponent as he, inject as be, computed as n, ref as U, onMounted as ye, onUnmounted as Y, watch as Z, openBlock as o, createElementBlock as d, withKeys as _, withModifiers as j, normalizeClass as g, createVNode as z, unref as i, createCommentVNode as c, createElementVNode as h, Fragment as pe, renderList as ke, toDisplayString as D, renderSlot as Se, createBlock as C, mergeProps as ee } from "vue";
2
- import { useForm as Ce } from "./composables/useForm.js";
3
- import G from "./FormFields.vue.js";
4
- import x from "../Button.vue.js";
5
- import xe from "../Timeline/Timeline.vue.js";
1
+ import { defineComponent as ye, inject as xe, computed as n, onMounted as _, onUnmounted as E, ref as z, watch as ee, openBlock as o, createElementBlock as d, withKeys as te, withModifiers as G, normalizeClass as f, createElementVNode as v, createVNode as k, mergeProps as B, toDisplayString as A, unref as a, renderSlot as ae, createCommentVNode as c, Fragment as ke, renderList as pe, createBlock as R } from "vue";
2
+ import { useForm as Se } from "./composables/useForm.js";
3
+ import O from "./FormFields.vue.js";
4
+ import p from "../Button.vue.js";
5
+ import Ce from "../BackButton.vue.js";
6
+ import Fe from "../Timeline/Timeline.vue.js";
6
7
  import "@iconify/vue";
7
- import { useVLiteConfig as Fe } from "../../core/config.js";
8
- const we = ["onKeydown"], Ae = {
8
+ import { $t as we } from "../../utils/i18n.js";
9
+ import { useVLiteConfig as Ae } from "../../core/config.js";
10
+ const Re = ["onKeydown"], Pe = { class: "flex items-center gap-3" }, Ne = { class: "flex items-center gap-2 flex-shrink-0" }, Te = {
9
11
  key: 0,
10
12
  class: "form-fields-single"
11
- }, Re = {
13
+ }, Ue = {
12
14
  key: 1,
13
15
  class: "form-groups space-y-6"
14
- }, Ne = { class: "text-base font-semibold text-foreground" }, Ve = {
16
+ }, Ve = { class: "text-base font-semibold text-foreground" }, ze = {
15
17
  key: 0,
16
18
  class: "text-sm text-muted-foreground mt-1"
17
- }, Ue = { class: "form-group-body p-4.5" }, ze = {
19
+ }, Be = { class: "form-group-body p-4.5" }, De = {
18
20
  key: 2,
19
21
  class: "form-step"
20
- }, De = { class: "text-lg font-semibold text-foreground" }, Pe = {
22
+ }, Le = { class: "text-lg font-semibold text-foreground" }, qe = {
21
23
  key: 0,
22
24
  class: "text-sm text-muted-foreground mt-1"
23
- }, Le = { class: "flex items-center gap-3" }, Ie = /* @__PURE__ */ he({
25
+ }, He = { class: "flex items-center gap-3" }, Qe = /* @__PURE__ */ ye({
24
26
  __name: "Form",
25
27
  props: {
26
28
  schema: {},
@@ -47,129 +49,172 @@ const we = ["onKeydown"], Ae = {
47
49
  timelineTextPosition: { default: "right" },
48
50
  emitFields: { default: () => ["__typename"] },
49
51
  showRequiredAsterisk: { type: Boolean },
50
- stickyFooter: { type: Boolean, default: !1 }
52
+ stickyFooter: { type: Boolean, default: !1 },
53
+ isPage: { type: Boolean, default: !1 },
54
+ pageTitle: {},
55
+ pageTitleI18n: {},
56
+ pageTitleClass: { default: "text-2xl font-bold" },
57
+ pageHeaderClass: { default: "" },
58
+ backButtonProps: { default: () => ({ size: "sm", variant: "ghost", icon: "heroicons-solid:arrow-left" }) },
59
+ backButtonPath: {}
51
60
  },
52
- emits: ["onSubmit", "onCancel", "onStepChange", "onAddonAction"],
53
- setup(e, { emit: te }) {
54
- const a = e, v = te, m = be(
55
- "modal-context",
56
- null
57
- ), ie = Fe(), F = n(() => ie?.components?.form || {}), P = n(() => a.variant ?? F.value.variant ?? "outline"), L = n(() => a.size ?? F.value.size ?? "md"), q = n(() => a.rounded ?? F.value.rounded ?? "md"), B = n(
58
- () => a.showRequiredAsterisk ?? F.value.showRequiredAsterisk ?? !0
59
- ), ae = n(() => a.showCancel || !!m), T = n(() => !!m), b = n(() => a.stickyFooter), se = U(null), H = U(null), $ = U(!1);
61
+ emits: ["onSubmit", "onCancel", "onStepChange", "onAddonAction", "onBack"],
62
+ setup(e, { emit: ie }) {
63
+ const i = e, g = ie, m = xe("modal-context", null), se = Ae(), P = n(() => se?.components?.form || {}), D = n(() => i.variant ?? P.value.variant ?? "outline"), L = n(() => i.size ?? P.value.size ?? "md"), q = n(() => i.rounded ?? P.value.rounded ?? "md"), H = n(
64
+ () => i.showRequiredAsterisk ?? P.value.showRequiredAsterisk ?? !0
65
+ ), le = n(() => i.showCancel || !!m), x = n(() => !!m), S = n(() => i.stickyFooter || x.value);
66
+ _(() => {
67
+ i.footer && x.value && m?.registerFormFooter?.(!0);
68
+ }), E(() => {
69
+ x.value && m?.registerFormFooter?.(!1);
70
+ });
71
+ const oe = z(null), I = z(null), J = z(!1);
60
72
  let K = null;
61
- ye(() => {
62
- H.value && (K = new IntersectionObserver(
73
+ _(() => {
74
+ I.value && (K = new IntersectionObserver(
63
75
  ([t]) => {
64
- $.value = !t.isIntersecting;
76
+ J.value = !t.isIntersecting;
65
77
  },
66
78
  { threshold: 0 }
67
- ), K.observe(H.value));
68
- }), Y(() => {
79
+ ), K.observe(I.value));
80
+ }), E(() => {
69
81
  K?.disconnect();
70
82
  });
71
- const w = n(() => !a.schema || a.schema.length === 0 ? !1 : Array.isArray(a.schema[0])), r = n(() => a.tabs && a.tabs.length > 0 && w.value), l = U(0), O = n(() => a.tabs ? a.tabs.map((t, s) => ({
83
+ const N = n(() => !i.schema || i.schema.length === 0 ? !1 : Array.isArray(i.schema[0])), r = n(() => i.tabs && i.tabs.length > 0 && N.value), l = z(0), Q = n(() => i.tabs ? i.tabs.map((t, s) => ({
72
84
  id: t.id?.toString() || s.toString(),
73
85
  title: t.title,
74
86
  icon: t.icon,
75
87
  description: t.description,
76
88
  status: s < l.value ? "completed" : s === l.value ? "current" : "upcoming"
77
- })) : []), y = n(() => w.value ? a.schema : [a.schema]), J = n(() => r.value ? y.value[l.value] || [] : []), {
78
- formValues: A,
79
- errors: p,
80
- isSubmitting: k,
89
+ })) : []), C = n(() => N.value ? i.schema : [i.schema]), W = n(() => r.value ? C.value[l.value] || [] : []), {
90
+ formValues: F,
91
+ errors: w,
92
+ isSubmitting: h,
81
93
  fieldLoading: M,
82
- handleFieldChange: le,
83
- validateField: oe,
84
- validateAll: ne,
85
- isFieldVisible: R,
86
- isFieldDisabled: N,
87
- isFieldReadonly: E,
88
- handleSubmit: re
89
- } = Ce({
90
- schema: a.schema,
91
- values: a.values,
92
- isUpdate: a.isUpdate,
93
- folderId: a.folderId,
94
- emitFields: a.emitFields,
94
+ handleFieldChange: ne,
95
+ validateField: re,
96
+ validateAll: ue,
97
+ isFieldVisible: T,
98
+ isFieldDisabled: U,
99
+ isFieldReadonly: $,
100
+ handleSubmit: de
101
+ } = Se({
102
+ schema: i.schema,
103
+ values: i.values,
104
+ isUpdate: i.isUpdate,
105
+ folderId: i.folderId,
106
+ emitFields: i.emitFields,
95
107
  onSubmit: (t) => {
96
- v("onSubmit", t, m?.close || (() => {
108
+ g("onSubmit", t, m?.close || (() => {
97
109
  }));
98
110
  }
99
111
  });
100
- Z(
101
- () => a.loading || k.value,
112
+ ee(
113
+ () => i.loading || h.value,
102
114
  (t) => {
103
115
  m?.setSubmitting && m.setSubmitting(t);
104
116
  },
105
117
  { immediate: !0 }
106
- ), Y(() => {
118
+ ), E(() => {
107
119
  m?.setSubmitting && m.setSubmitting(!1);
108
- }), Z(
109
- () => a.values,
120
+ }), ee(
121
+ () => i.values,
110
122
  (t) => {
111
123
  },
112
124
  { deep: !0 }
113
125
  );
114
- const I = (t, s) => {
115
- le(t, s.value, s.data);
116
- }, ue = () => {
126
+ const j = (t, s) => {
127
+ ne(t, s.value, s.data);
128
+ }, ce = () => {
117
129
  if (!r.value) return !0;
118
- const t = J.value;
130
+ const t = W.value;
119
131
  let s = !0;
120
132
  for (const u of t) {
121
- if (!R(u) || N(u)) continue;
122
- oe(u) && (s = !1);
133
+ if (!T(u) || U(u)) continue;
134
+ re(u) && (s = !1);
123
135
  }
124
136
  return s;
125
- }, de = n(() => r.value ? l.value < y.value.length - 1 : !1), Q = n(() => r.value ? l.value > 0 : !1), V = n(() => r.value ? l.value === y.value.length - 1 : !0), W = () => {
126
- de.value && ue() && (l.value++, v("onStepChange", l.value));
127
- }, ce = () => {
128
- Q.value && (l.value--, v("onStepChange", l.value));
137
+ }, me = n(() => r.value ? l.value < C.value.length - 1 : !1), X = n(() => r.value ? l.value > 0 : !1), V = n(() => r.value ? l.value === C.value.length - 1 : !0), Y = () => {
138
+ me.value && ce() && (l.value++, g("onStepChange", l.value));
139
+ }, fe = () => {
140
+ X.value && (l.value--, g("onStepChange", l.value));
129
141
  }, ve = (t, s) => {
130
- s <= l.value && (l.value = s, v("onStepChange", l.value));
131
- }, S = async () => {
142
+ s <= l.value && (l.value = s, g("onStepChange", l.value));
143
+ }, y = async () => {
132
144
  if (r.value) {
133
- if (!V.value && !a.isUpdate) {
134
- W();
145
+ if (!V.value && !i.isUpdate) {
146
+ Y();
135
147
  return;
136
148
  }
137
- if (!ne()) {
138
- const s = y.value.findIndex(
139
- (u) => u.some((f) => !!p.value[f.name])
149
+ if (!ue()) {
150
+ const s = C.value.findIndex(
151
+ (u) => u.some((b) => !!w.value[b.name])
140
152
  );
141
- s !== -1 && s !== l.value && (l.value = s, v("onStepChange", l.value));
153
+ s !== -1 && s !== l.value && (l.value = s, g("onStepChange", l.value));
142
154
  return;
143
155
  }
144
156
  }
145
157
  try {
146
- await re();
158
+ await de();
147
159
  } catch {
148
160
  }
149
- }, me = (t) => {
161
+ }, ge = (t) => {
150
162
  if (t.key !== "Enter") return;
151
163
  const u = t.target.tagName.toLowerCase();
152
- u !== "textarea" && u !== "button" && (t.preventDefault(), S());
153
- }, X = (t) => {
154
- (t.metaKey || t.ctrlKey) && t.key === "s" && (t.preventDefault(), S());
155
- }, fe = () => {
156
- v("onCancel"), m && m?.close?.();
164
+ u !== "textarea" && u !== "button" && (t.preventDefault(), y());
165
+ }, Z = (t) => {
166
+ (t.metaKey || t.ctrlKey) && t.key === "s" && (t.preventDefault(), y());
167
+ }, be = () => {
168
+ g("onCancel"), m && m?.close?.();
157
169
  };
158
170
  return (t, s) => (o(), d("form", {
159
- class: g(["form-container ", a.class]),
160
- onSubmit: j(S, ["prevent"]),
171
+ class: f(["form-container ", i.class]),
172
+ onSubmit: G(y, ["prevent"]),
161
173
  onKeydown: [
162
- me,
163
- _(j(X, ["meta", "prevent"]), ["s"]),
164
- _(j(X, ["ctrl", "prevent"]), ["s"])
174
+ ge,
175
+ te(G(Z, ["meta", "prevent"]), ["s"]),
176
+ te(G(Z, ["ctrl", "prevent"]), ["s"])
165
177
  ]
166
178
  }, [
167
- r.value && O.value.length > 0 ? (o(), d("div", {
179
+ e.isPage ? (o(), d("div", {
168
180
  key: 0,
169
- class: g(["form-timeline", e.timelineTextPosition == "right" ? "mb-6.5" : "mb-13"])
181
+ class: f([
182
+ "form-page-header sticky top-0 z-30 bg-background flex items-center justify-between pb-2 pt-4 -mt-4 mb-6.5",
183
+ e.pageHeaderClass
184
+ ])
185
+ }, [
186
+ v("div", Pe, [
187
+ k(Ce, B(e.backButtonProps, {
188
+ fallback: e.backButtonPath,
189
+ class: "max-sm:w-8 max-sm:h-8 max-sm:min-w-8 max-sm:min-h-8 max-sm:px-0 flex-shrink-0"
190
+ }), null, 16, ["fallback"]),
191
+ v("h1", {
192
+ class: f(["text-foreground max-sm:text-lg text-fs-5 truncate", e.pageTitleClass])
193
+ }, A(e.pageTitleI18n ? a(we)(e.pageTitleI18n) : e.pageTitle), 3)
194
+ ]),
195
+ v("div", Ne, [
196
+ ae(t.$slots, "header-actions", {
197
+ values: a(F),
198
+ isSubmitting: a(h),
199
+ handleSubmit: y
200
+ }, void 0, !0),
201
+ k(p, B({
202
+ type: "button",
203
+ variant: e.isUpdate ? "outline" : "primary",
204
+ text: e.submitText
205
+ }, e.submitProps, {
206
+ loading: e.loading || a(h),
207
+ onClick: y,
208
+ class: "max-sm:hidden"
209
+ }), null, 16, ["variant", "text", "loading"])
210
+ ])
211
+ ], 2)) : c("", !0),
212
+ r.value && Q.value.length > 0 ? (o(), d("div", {
213
+ key: 1,
214
+ class: f(["form-timeline", e.timelineTextPosition == "right" ? "mb-6.5" : "mb-13"])
170
215
  }, [
171
- z(i(xe), {
172
- steps: O.value,
216
+ k(a(Fe), {
217
+ steps: Q.value,
173
218
  activeStep: l.value,
174
219
  direction: "horizontal",
175
220
  textPosition: e.timelineTextPosition,
@@ -177,168 +222,172 @@ const we = ["onKeydown"], Ae = {
177
222
  onStepClick: ve
178
223
  }, null, 8, ["steps", "activeStep", "textPosition"])
179
224
  ], 2)) : c("", !0),
180
- h("div", {
181
- class: g(e.footer && b.value ? "pb-2" : "")
225
+ v("div", {
226
+ class: f(e.footer && S.value ? "pb-2" : "")
182
227
  }, [
183
- w.value ? w.value && !r.value ? (o(), d("div", Re, [
184
- (o(!0), d(pe, null, ke(y.value, (u, f) => (o(), d("div", {
185
- key: f,
186
- class: g(["form-group border rounded overflow-hidden bg-body", e.groupClass])
228
+ N.value ? N.value && !r.value ? (o(), d("div", Ue, [
229
+ (o(!0), d(ke, null, pe(C.value, (u, b) => (o(), d("div", {
230
+ key: b,
231
+ class: f(["form-group border rounded overflow-hidden bg-body", e.groupClass])
187
232
  }, [
188
- e.groupsHeadings?.[f] ? (o(), d("div", {
233
+ e.groupsHeadings?.[b] ? (o(), d("div", {
189
234
  key: 0,
190
- class: g(["form-group-header bg-muted/50 px-4 py-2.5 border-b", e.headerClass])
235
+ class: f(["form-group-header bg-muted/50 px-4 py-2.5 border-b", e.headerClass])
191
236
  }, [
192
- h("h3", Ne, D(e.groupsHeadings[f]), 1),
193
- e.groupHeadingsDescription?.[f] ? (o(), d("p", Ve, D(e.groupHeadingsDescription[f]), 1)) : c("", !0)
237
+ v("h3", Ve, A(e.groupsHeadings[b]), 1),
238
+ e.groupHeadingsDescription?.[b] ? (o(), d("p", ze, A(e.groupHeadingsDescription[b]), 1)) : c("", !0)
194
239
  ], 2)) : c("", !0),
195
- h("div", Ue, [
196
- z(G, {
240
+ v("div", Be, [
241
+ k(O, {
197
242
  schema: u,
198
- values: i(A),
199
- errors: i(p),
200
- fieldLoading: i(M),
201
- variant: P.value,
243
+ values: a(F),
244
+ errors: a(w),
245
+ fieldLoading: a(M),
246
+ variant: D.value,
202
247
  size: L.value,
203
248
  rounded: q.value,
204
249
  className: e.className,
205
250
  isUpdate: e.isUpdate,
206
- showRequiredAsterisk: B.value,
207
- isFieldVisible: i(R),
208
- isFieldDisabled: i(N),
209
- isFieldReadonly: i(E),
210
- onChange: I,
211
- onAddonAction: s[1] || (s[1] = (ge) => v("onAddonAction", ge))
251
+ showRequiredAsterisk: H.value,
252
+ isFieldVisible: a(T),
253
+ isFieldDisabled: a(U),
254
+ isFieldReadonly: a($),
255
+ onChange: j,
256
+ onAddonAction: s[1] || (s[1] = (he) => g("onAddonAction", he))
212
257
  }, null, 8, ["schema", "values", "errors", "fieldLoading", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
213
258
  ])
214
259
  ], 2))), 128))
215
- ])) : r.value ? (o(), d("div", ze, [
260
+ ])) : r.value ? (o(), d("div", De, [
216
261
  e.tabs?.[l.value] ? (o(), d("div", {
217
262
  key: 0,
218
- class: g(["form-step-header mb-6", e.headerClass])
263
+ class: f(["form-step-header mb-6", e.headerClass])
219
264
  }, [
220
- h("h2", De, D(e.tabs[l.value].title), 1),
221
- e.tabs[l.value].description ? (o(), d("p", Pe, D(e.tabs[l.value].description), 1)) : c("", !0)
265
+ v("h2", Le, A(e.tabs[l.value].title), 1),
266
+ e.tabs[l.value].description ? (o(), d("p", qe, A(e.tabs[l.value].description), 1)) : c("", !0)
222
267
  ], 2)) : c("", !0),
223
- z(G, {
224
- schema: J.value,
225
- values: i(A),
226
- errors: i(p),
227
- fieldLoading: i(M),
228
- variant: P.value,
268
+ k(O, {
269
+ schema: W.value,
270
+ values: a(F),
271
+ errors: a(w),
272
+ fieldLoading: a(M),
273
+ variant: D.value,
229
274
  size: L.value,
230
275
  rounded: q.value,
231
276
  className: e.className,
232
277
  isUpdate: e.isUpdate,
233
- showRequiredAsterisk: B.value,
234
- isFieldVisible: i(R),
235
- isFieldDisabled: i(N),
236
- isFieldReadonly: i(E),
237
- onChange: I,
238
- onAddonAction: s[2] || (s[2] = (u) => v("onAddonAction", u))
278
+ showRequiredAsterisk: H.value,
279
+ isFieldVisible: a(T),
280
+ isFieldDisabled: a(U),
281
+ isFieldReadonly: a($),
282
+ onChange: j,
283
+ onAddonAction: s[2] || (s[2] = (u) => g("onAddonAction", u))
239
284
  }, null, 8, ["schema", "values", "errors", "fieldLoading", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
240
- ])) : c("", !0) : (o(), d("div", Ae, [
241
- z(G, {
285
+ ])) : c("", !0) : (o(), d("div", Te, [
286
+ k(O, {
242
287
  schema: e.schema,
243
- values: i(A),
244
- errors: i(p),
245
- fieldLoading: i(M),
246
- variant: P.value,
288
+ values: a(F),
289
+ errors: a(w),
290
+ fieldLoading: a(M),
291
+ variant: D.value,
247
292
  size: L.value,
248
293
  rounded: q.value,
249
294
  className: e.className,
250
295
  isUpdate: e.isUpdate,
251
- showRequiredAsterisk: B.value,
252
- isFieldVisible: i(R),
253
- isFieldDisabled: i(N),
254
- isFieldReadonly: i(E),
255
- onChange: I,
256
- onAddonAction: s[0] || (s[0] = (u) => v("onAddonAction", u))
296
+ showRequiredAsterisk: H.value,
297
+ isFieldVisible: a(T),
298
+ isFieldDisabled: a(U),
299
+ isFieldReadonly: a($),
300
+ onChange: j,
301
+ onAddonAction: s[0] || (s[0] = (u) => g("onAddonAction", u))
257
302
  }, null, 8, ["schema", "values", "errors", "fieldLoading", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
258
303
  ])),
259
- Se(t.$slots, "default", {
260
- values: i(A),
261
- errors: i(p),
262
- isSubmitting: i(k),
263
- handleSubmit: S
304
+ ae(t.$slots, "default", {
305
+ values: a(F),
306
+ errors: a(w),
307
+ isSubmitting: a(h),
308
+ handleSubmit: y
264
309
  }, void 0, !0),
265
- h("div", {
310
+ v("div", {
266
311
  ref_key: "sentinelRef",
267
- ref: H,
312
+ ref: I,
268
313
  class: "form-scroll-sentinel h-px w-full",
269
314
  "aria-hidden": "true"
270
315
  }, null, 512)
271
316
  ], 2),
272
317
  e.footer ? (o(), d("div", {
273
- key: 1,
318
+ key: 2,
274
319
  ref_key: "footerRef",
275
- ref: se,
276
- class: g([
277
- "form-footer flex items-center gap-3 z-20",
320
+ ref: oe,
321
+ class: f([
322
+ "form-footer items-center gap-3 z-20",
323
+ e.isPage ? "flex sm:hidden" : "flex",
278
324
  e.footerClass,
279
325
  r.value ? "justify-between" : "justify-end",
280
- // Sticky positioning
281
- b.value ? "sticky bottom-0 bg-background/95 pt-3 pb-2 -mx-0.5 px-0.5" : "mt-6",
282
- // Inside modal: extend to modal edges and add top border always
283
- T.value ? "-mx-4 px-4 pb-0! pt-3!" : "",
284
- // Shadow only while actually stuck (sentinel has scrolled out of view)
285
- b.value && $.value ? "" : b.value ? "border-t border-transparent" : "",
326
+ // Sticky footer: always applied when inside a modal or when stickyFooter prop is set.
327
+ // `sticky bottom-0` anchors the footer to the bottom of the nearest scrollable ancestor
328
+ // (the modal's overflow-y-auto body), keeping it visible at all times without leaving
329
+ // the normal document flow (unlike `fixed` which would escape the modal bounds).
330
+ S.value ? "sticky bottom-0 bg-body pt-3 pb-3 -mx-0.5 px-0.5 border-t border-border/75" : "mt-6",
331
+ // Show a subtle top shadow while content is scrolling beneath the sticky footer
332
+ (S.value && J.value, ""),
333
+ // Inside modal: extend footer flush to modal edge padding
334
+ x.value ? "-mx-4 px-4 pb-3!" : "",
286
335
  // Non-sticky inside modal keeps the original border styling
287
- !b.value && T.value ? "border-t border-border/75 mt-5" : "",
288
- !b.value && !T.value ? "mt-6" : ""
336
+ !S.value && x.value ? "border-t border-border/75 mt-5" : "",
337
+ !S.value && !x.value ? "mt-6" : ""
289
338
  ])
290
339
  }, [
291
- h("div", Le, [
292
- ae.value ? (o(), C(x, {
340
+ v("div", He, [
341
+ le.value ? (o(), R(p, {
293
342
  key: 0,
294
343
  type: "button",
295
344
  variant: "outline",
296
345
  text: e.cancelText,
297
- disabled: e.loading || i(k),
298
- onClick: fe
346
+ disabled: e.loading || a(h),
347
+ onClick: be
299
348
  }, null, 8, ["text", "disabled"])) : c("", !0),
300
- r.value && e.isUpdate && !V.value ? (o(), C(x, ee({
349
+ r.value && e.isUpdate && !V.value ? (o(), R(p, B({
301
350
  key: 1,
302
351
  type: "button",
303
352
  variant: "primary",
304
353
  text: e.submitText
305
354
  }, e.submitProps, {
306
- loading: e.loading || i(k),
307
- onClick: S
355
+ loading: e.loading || a(h),
356
+ onClick: y
308
357
  }), null, 16, ["text", "loading"])) : c("", !0)
309
358
  ]),
310
- h("div", {
311
- class: g(["flex items-center gap-3", r.value && "ml-auto"])
359
+ v("div", {
360
+ class: f(["flex items-center gap-3", r.value && "ml-auto"])
312
361
  }, [
313
- r.value && Q.value ? (o(), C(x, {
362
+ r.value && X.value ? (o(), R(p, {
314
363
  key: 0,
315
364
  type: "button",
316
365
  variant: "outline",
317
366
  icon: "lucide:arrow-left",
318
367
  text: "Previous",
319
- onClick: ce
368
+ onClick: fe
320
369
  })) : c("", !0),
321
- r.value && !V.value ? (o(), C(x, {
370
+ r.value && !V.value ? (o(), R(p, {
322
371
  key: 1,
323
372
  type: "button",
324
373
  variant: e.isUpdate ? "outline" : "primary",
325
374
  text: "Next",
326
375
  iconRight: "lucide:arrow-right",
327
- onClick: W
376
+ onClick: Y
328
377
  }, null, 8, ["variant"])) : c("", !0),
329
- !r.value || V.value ? (o(), C(x, ee({
378
+ !r.value || V.value ? (o(), R(p, B({
330
379
  key: 2,
331
380
  type: "submit",
332
381
  variant: "primary",
333
382
  text: e.submitText
334
383
  }, e.submitProps, {
335
- loading: e.loading || i(k)
384
+ loading: e.loading || a(h)
336
385
  }), null, 16, ["text", "loading"])) : c("", !0)
337
386
  ], 2)
338
387
  ], 2)) : c("", !0)
339
- ], 42, we));
388
+ ], 42, Re));
340
389
  }
341
390
  });
342
391
  export {
343
- Ie as default
392
+ Qe as default
344
393
  };
@@ -1,5 +1,5 @@
1
1
  import { Component } from 'vue';
2
- import { IDropdownOptions, InputVariant, InputSize, InputRounded } from '../../types';
2
+ import { IDropdownOptions, InputVariant, InputSize, InputRounded, ButtonProps } from '../../types';
3
3
  /**
4
4
  * Addon configuration for input field addons (left/right)
5
5
  * Allows rendering dropdowns or buttons inside input addons from schema
@@ -193,6 +193,18 @@ export interface IFormProps {
193
193
  footerClass?: string;
194
194
  /** Fields to explicitly include in the submit payload (e.g., ['__typename', 'id']) */
195
195
  emitFields?: string[];
196
+ /** Enable full-page layout mode */
197
+ isPage?: boolean;
198
+ /** Title for the page mode header */
199
+ pageTitle?: string;
200
+ /** I18n key for the page title */
201
+ pageTitleI18n?: string;
202
+ /** Custom CSS class for the page title */
203
+ pageTitleClass?: string;
204
+ /** Custom CSS class for the page header container */
205
+ pageHeaderClass?: string;
206
+ /** Props to pass to the back button in page mode */
207
+ backButtonProps?: ButtonProps;
196
208
  }
197
209
  /**
198
210
  * Form submit payload
@@ -51,5 +51,16 @@ export declare function isComponent(value: any): boolean;
51
51
  * Cleans the submit payload by extracting only schema fields,
52
52
  * injecting specified emitFields, and removing ignoreFields recursively.
53
53
  * Also processes mapped output and transformation functions.
54
+ *
55
+ * KEY BEHAVIOUR (fix for Prisma / Postgres sync on updates):
56
+ * A field is included in the payload only when:
57
+ * 1. It has a non-empty value — always included (create & update).
58
+ * 2. It is empty AND the field key already existed in the original `values`
59
+ * object — meaning the user explicitly cleared a pre-existing value during
60
+ * an update. In this case the canonical empty value (`[]` for multiSelect,
61
+ * `null` for everything else) is sent so the backend overwrites the old data.
62
+ *
63
+ * Fields that were never filled in (key absent from `values`) are silently
64
+ * omitted to keep create payloads lean.
54
65
  */
55
66
  export declare function cleanSubmitValues(values: Record<string, any>, schema: IForm[] | IForm[][], emitFields?: string[], ignoreFields?: string[]): Record<string, any>;