vlite3 0.8.2 → 0.8.3

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