vlite3 1.1.2 → 1.1.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.
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +1 -1
- package/components/AttachmentsList/AttachmentsList.vue.js +237 -163
- package/components/Avatar.vue.js +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
- package/components/Button.vue.js +30 -28
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue.d.ts +10 -2
- package/components/CategoryManager/CategoryManager.vue.js +137 -118
- package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
- package/components/CategoryManager/CategoryNode.vue.js +93 -88
- package/components/Chat/ChatBubble.vue.js +22 -22
- package/components/CheckBox.vue.js +29 -28
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
- package/components/ConfirmationModal.vue.js +30 -28
- package/components/CopyButton.vue.d.ts +50 -0
- package/components/CopyButton.vue.js +69 -0
- package/components/CopyButton.vue2.js +4 -0
- package/components/DataTable/DataTable.vue.js +44 -44
- package/components/DatePicker.vue.js +41 -35
- package/components/DateRangePicker.vue.js +18 -17
- package/components/Dropdown/Dropdown.vue.d.ts +3 -0
- package/components/Dropdown/Dropdown.vue.js +117 -115
- package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
- package/components/Dropdown/DropdownItem.vue.js +21 -20
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue2.js +13 -12
- package/components/Dropdown/DropdownTrigger.vue.d.ts +2 -0
- package/components/Dropdown/DropdownTrigger.vue.js +10 -6
- package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
- package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
- package/components/Dropdown/composables/useDropdownSelection.js +46 -31
- package/components/FilePicker/FilePicker.vue.js +93 -90
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +68 -64
- package/components/Form/FormField.vue.js +204 -148
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +28 -27
- package/components/Form/types.d.ts +2 -2
- package/components/Form/utils/form.utils.d.ts +3 -3
- package/components/Form/utils/form.utils.js +37 -37
- package/components/Input.vue.js +64 -62
- package/components/Invoice/Invoice.vue.js +9 -7
- package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
- package/components/Invoice/InvoiceTotals.vue.js +86 -0
- package/components/Invoice/InvoiceTotals.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant1.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant1.vue.js +194 -207
- package/components/Invoice/InvoiceVariant2.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant2.vue.js +109 -118
- package/components/Invoice/InvoiceVariant3.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant3.vue.js +157 -167
- package/components/Invoice/InvoiceVariant4.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant4.vue.js +192 -202
- package/components/Invoice/index.d.ts +1 -0
- package/components/Invoice/types.d.ts +22 -0
- package/components/Masonry/Masonry.vue.d.ts +1 -1
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +60 -54
- package/components/MultiSelect/MultiSelect.vue.js +47 -46
- package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +121 -116
- package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +58 -52
- package/components/Stats/StatItem.vue.js +96 -91
- package/components/Stats/types.d.ts +1 -0
- package/components/Switch.vue.d.ts +6 -1
- package/components/Switch.vue.js +61 -24
- package/components/TagInput/TagInput.vue.d.ts +187 -0
- package/components/TagInput/TagInput.vue.js +113 -0
- package/components/TagInput/TagInput.vue2.js +4 -0
- package/components/TagInput/index.d.ts +1 -0
- package/components/Textarea.vue.js +19 -18
- package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
- package/core/config.d.ts +36 -0
- package/index.d.ts +2 -0
- package/index.js +130 -124
- package/package.json +1 -1
- package/style.css +616 -1
- package/types/button.d.ts +1 -1
- package/types/styles.d.ts +1 -0
- package/utils/functions.js +9 -9
|
@@ -1,9 +1,9 @@
|
|
|
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
|
|
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 T, mergeProps as M, toDisplayString as z, unref as t, renderSlot as ie, createCommentVNode as c, createBlock as C, Fragment as Ce, renderList as Fe } from "vue";
|
|
2
2
|
import { useForm as we } from "./composables/useForm.js";
|
|
3
3
|
import Q from "./FormFields.vue.js";
|
|
4
4
|
import Ae from "./FormField.vue.js";
|
|
5
5
|
import Te from "./FormSkeleton.vue.js";
|
|
6
|
-
import
|
|
6
|
+
import R from "../Button.vue.js";
|
|
7
7
|
import Re from "../BackButton.vue.js";
|
|
8
8
|
import Pe from "../Timeline/Timeline.vue.js";
|
|
9
9
|
import "@iconify/vue";
|
|
@@ -65,11 +65,11 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
65
65
|
setup(e, { emit: se }) {
|
|
66
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
67
|
() => l.showRequiredAsterisk ?? B.value.showRequiredAsterisk ?? !0
|
|
68
|
-
), oe = r(() => l.showCancel || !!v),
|
|
68
|
+
), oe = r(() => l.showCancel || !!v), F = r(() => !!v), P = r(() => l.stickyFooter || F.value);
|
|
69
69
|
te(() => {
|
|
70
|
-
l.footer &&
|
|
70
|
+
l.footer && F.value && v?.registerFormFooter?.(!0);
|
|
71
71
|
}), O(() => {
|
|
72
|
-
|
|
72
|
+
F.value && v?.registerFormFooter?.(!1);
|
|
73
73
|
});
|
|
74
74
|
const re = K(null), j = K(null), W = K(!1);
|
|
75
75
|
let E = null;
|
|
@@ -83,20 +83,20 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
83
83
|
}), O(() => {
|
|
84
84
|
E?.disconnect();
|
|
85
85
|
});
|
|
86
|
-
const
|
|
86
|
+
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), 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
|
-
})) : []),
|
|
92
|
+
})) : []), x = r(() => w.value ? l.schema : [l.schema]), Y = r(() => u.value ? x.value[n.value] || [] : []), g = r(() => u.value ? null : (w.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),
|
|
96
|
+
}) === "thumbnailSelector") ?? null), A = r(() => !!g.value), {
|
|
97
97
|
formValues: b,
|
|
98
|
-
errors:
|
|
99
|
-
isSubmitting:
|
|
98
|
+
errors: k,
|
|
99
|
+
isSubmitting: p,
|
|
100
100
|
fieldLoading: q,
|
|
101
101
|
handleFieldChange: ue,
|
|
102
102
|
validateField: de,
|
|
@@ -118,7 +118,7 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
118
118
|
}
|
|
119
119
|
});
|
|
120
120
|
ae(
|
|
121
|
-
() => l.loading ||
|
|
121
|
+
() => l.loading || p.value,
|
|
122
122
|
(a) => {
|
|
123
123
|
v?.setSubmitting && v.setSubmitting(a);
|
|
124
124
|
},
|
|
@@ -142,21 +142,21 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
142
142
|
await de(o) && (i = !1);
|
|
143
143
|
}
|
|
144
144
|
return i;
|
|
145
|
-
}, ge = r(() => u.value ? n.value <
|
|
145
|
+
}, ge = r(() => u.value ? n.value < x.value.length - 1 : !1), Z = r(() => u.value ? n.value > 0 : !1), I = r(() => u.value ? n.value === x.value.length - 1 : !0), _ = async () => {
|
|
146
146
|
!ge.value || !await fe() || (n.value++, h("onStepChange", n.value));
|
|
147
147
|
}, he = () => {
|
|
148
148
|
Z.value && (n.value--, h("onStepChange", n.value));
|
|
149
149
|
}, be = (a, i) => {
|
|
150
150
|
i <= n.value && (n.value = i, h("onStepChange", n.value));
|
|
151
|
-
},
|
|
151
|
+
}, S = async () => {
|
|
152
152
|
if (u.value) {
|
|
153
153
|
if (!I.value && !l.isUpdate) {
|
|
154
154
|
await _();
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
157
|
if (!await ce()) {
|
|
158
|
-
const i =
|
|
159
|
-
(o) => o.some((y) => !!
|
|
158
|
+
const i = x.value.findIndex(
|
|
159
|
+
(o) => o.some((y) => !!k.value[y.name])
|
|
160
160
|
);
|
|
161
161
|
i !== -1 && i !== n.value && (n.value = i, h("onStepChange", n.value));
|
|
162
162
|
return;
|
|
@@ -169,15 +169,15 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
169
169
|
}, ye = (a) => {
|
|
170
170
|
if (a.key !== "Enter") return;
|
|
171
171
|
const o = a.target.tagName.toLowerCase();
|
|
172
|
-
o !== "textarea" && o !== "button" && (a.preventDefault(),
|
|
172
|
+
o !== "textarea" && o !== "button" && (a.preventDefault(), S());
|
|
173
173
|
}, ee = (a) => {
|
|
174
|
-
(a.metaKey || a.ctrlKey) && a.key === "s" && (a.preventDefault(),
|
|
174
|
+
(a.metaKey || a.ctrlKey) && a.key === "s" && (a.preventDefault(), S());
|
|
175
175
|
}, xe = () => {
|
|
176
176
|
h("onCancel"), v && v?.close?.();
|
|
177
177
|
};
|
|
178
178
|
return (a, i) => (s(), d("form", {
|
|
179
179
|
class: m(["form-container ", l.class, e.isPage && "pb-10"]),
|
|
180
|
-
onSubmit: J(
|
|
180
|
+
onSubmit: J(S, ["prevent"]),
|
|
181
181
|
onKeydown: [
|
|
182
182
|
ye,
|
|
183
183
|
le(J(ee, ["meta", "prevent"]), ["s"]),
|
|
@@ -192,7 +192,7 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
192
192
|
])
|
|
193
193
|
}, [
|
|
194
194
|
f("div", Le, [
|
|
195
|
-
|
|
195
|
+
T(Re, M(e.backButtonProps, {
|
|
196
196
|
fallback: e.backButtonPath,
|
|
197
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"
|
|
198
198
|
}), null, 16, ["fallback"]),
|
|
@@ -203,17 +203,17 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
203
203
|
f("div", Ne, [
|
|
204
204
|
ie(a.$slots, "header-actions", {
|
|
205
205
|
values: t(b),
|
|
206
|
-
isSubmitting: t(
|
|
207
|
-
handleSubmit:
|
|
206
|
+
isSubmitting: t(p),
|
|
207
|
+
handleSubmit: S
|
|
208
208
|
}, void 0, !0),
|
|
209
|
-
|
|
209
|
+
T(R, M({
|
|
210
210
|
type: "button",
|
|
211
211
|
variant: e.isUpdate ? "outline" : "primary",
|
|
212
212
|
text: e.submitText
|
|
213
213
|
}, e.submitProps, {
|
|
214
214
|
disabled: e.schemaLoading,
|
|
215
|
-
loading: e.loading || t(
|
|
216
|
-
onClick:
|
|
215
|
+
loading: e.loading || t(p),
|
|
216
|
+
onClick: S,
|
|
217
217
|
class: "max-sm:hidden"
|
|
218
218
|
}), null, 16, ["variant", "text", "disabled", "loading"])
|
|
219
219
|
])
|
|
@@ -222,7 +222,7 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
222
222
|
key: 1,
|
|
223
223
|
class: m(["form-timeline", e.timelineTextPosition == "right" ? "mb-6.5" : "mb-13"])
|
|
224
224
|
}, [
|
|
225
|
-
|
|
225
|
+
T(t(Pe), {
|
|
226
226
|
steps: X.value,
|
|
227
227
|
activeStep: n.value,
|
|
228
228
|
direction: "horizontal",
|
|
@@ -232,43 +232,47 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
232
232
|
}, null, 8, ["steps", "activeStep", "textPosition"])
|
|
233
233
|
], 2)) : c("", !0),
|
|
234
234
|
f("div", {
|
|
235
|
-
class: m(e.footer &&
|
|
235
|
+
class: m(e.footer && P.value ? "pb-2" : "")
|
|
236
236
|
}, [
|
|
237
|
-
e.schemaLoading ? (s(),
|
|
237
|
+
e.schemaLoading ? (s(), C(Te, {
|
|
238
238
|
key: 0,
|
|
239
|
-
isGrouped:
|
|
239
|
+
isGrouped: w.value
|
|
240
240
|
}, null, 8, ["isGrouped"])) : (s(), d("div", {
|
|
241
241
|
key: 1,
|
|
242
|
-
class: m(
|
|
242
|
+
class: m(A.value ? "flex flex-col lg:flex-row gap-10 lg:gap-16" : "")
|
|
243
243
|
}, [
|
|
244
|
-
|
|
245
|
-
g.value && t(U)(g.value) ? (s(),
|
|
244
|
+
A.value ? (s(), d("div", De, [
|
|
245
|
+
g.value && t(U)(g.value) ? (s(), C(Ae, {
|
|
246
246
|
key: 0,
|
|
247
247
|
field: g.value,
|
|
248
248
|
value: t(b)[g.value.name],
|
|
249
249
|
values: t(b),
|
|
250
|
-
errors: t(
|
|
250
|
+
errors: t(k),
|
|
251
251
|
variant: L.value,
|
|
252
252
|
size: N.value,
|
|
253
253
|
rounded: D.value,
|
|
254
254
|
disabled: t(V)(g.value),
|
|
255
255
|
readonly: t(H)(g.value),
|
|
256
|
-
error: t(
|
|
256
|
+
error: t(k)[g.value.name] || "",
|
|
257
257
|
isUpdate: e.isUpdate,
|
|
258
258
|
loading: t(q)[g.value?.name],
|
|
259
259
|
onChange: i[0] || (i[0] = (o) => $(g.value.name, o))
|
|
260
260
|
}, null, 8, ["field", "value", "values", "errors", "variant", "size", "rounded", "disabled", "readonly", "error", "isUpdate", "loading"])) : c("", !0)
|
|
261
261
|
])) : c("", !0),
|
|
262
262
|
f("div", {
|
|
263
|
-
class: m(
|
|
263
|
+
class: m(A.value ? "flex-1 min-w-0 order-last lg:order-first" : "w-full")
|
|
264
264
|
}, [
|
|
265
|
-
|
|
265
|
+
w.value ? w.value && !u.value ? (s(), d("div", {
|
|
266
266
|
key: 1,
|
|
267
267
|
class: m(["form-groups space-y-6", e.groupContainerClass])
|
|
268
268
|
}, [
|
|
269
|
-
(s(!0), d(Ce, null, Fe(
|
|
269
|
+
(s(!0), d(Ce, null, Fe(x.value, (o, y) => (s(), d("div", {
|
|
270
270
|
key: y,
|
|
271
|
-
class: m([
|
|
271
|
+
class: m([
|
|
272
|
+
"form-group overflow-hidden bg-body",
|
|
273
|
+
e.groupClass,
|
|
274
|
+
x.value?.length > 1 ? "border rounded" : ""
|
|
275
|
+
])
|
|
272
276
|
}, [
|
|
273
277
|
e.groupsHeadings?.[y] ? (s(), d("div", {
|
|
274
278
|
key: 0,
|
|
@@ -278,12 +282,12 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
278
282
|
e.groupHeadingsDescription?.[y] ? (s(), d("p", $e, z(e.groupHeadingsDescription[y]), 1)) : c("", !0)
|
|
279
283
|
], 2)) : c("", !0),
|
|
280
284
|
f("div", {
|
|
281
|
-
class: m(["form-group-body p-4.5"
|
|
285
|
+
class: m(["form-group-body", [e.groupBodyClass, x.value?.length > 1 ? "p-4.5" : ""]])
|
|
282
286
|
}, [
|
|
283
|
-
|
|
287
|
+
T(Q, {
|
|
284
288
|
schema: o,
|
|
285
289
|
values: t(b),
|
|
286
|
-
errors: t(
|
|
290
|
+
errors: t(k),
|
|
287
291
|
fieldLoading: t(q),
|
|
288
292
|
variant: L.value,
|
|
289
293
|
size: N.value,
|
|
@@ -294,7 +298,7 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
294
298
|
isFieldVisible: t(U),
|
|
295
299
|
isFieldDisabled: t(V),
|
|
296
300
|
isFieldReadonly: t(H),
|
|
297
|
-
excludeTypes:
|
|
301
|
+
excludeTypes: A.value ? ["thumbnailSelector"] : [],
|
|
298
302
|
onChange: $,
|
|
299
303
|
onAddonAction: i[2] || (i[2] = (ke) => h("onAddonAction", ke))
|
|
300
304
|
}, null, 8, ["schema", "values", "errors", "fieldLoading", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly", "excludeTypes"])
|
|
@@ -308,10 +312,10 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
308
312
|
f("h2", Ke, z(e.tabs[n.value].title), 1),
|
|
309
313
|
e.tabs[n.value].description ? (s(), d("p", Me, z(e.tabs[n.value].description), 1)) : c("", !0)
|
|
310
314
|
], 2)) : c("", !0),
|
|
311
|
-
|
|
315
|
+
T(Q, {
|
|
312
316
|
schema: Y.value,
|
|
313
317
|
values: t(b),
|
|
314
|
-
errors: t(
|
|
318
|
+
errors: t(k),
|
|
315
319
|
fieldLoading: t(q),
|
|
316
320
|
variant: L.value,
|
|
317
321
|
size: N.value,
|
|
@@ -322,15 +326,15 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
322
326
|
isFieldVisible: t(U),
|
|
323
327
|
isFieldDisabled: t(V),
|
|
324
328
|
isFieldReadonly: t(H),
|
|
325
|
-
excludeTypes:
|
|
329
|
+
excludeTypes: A.value ? ["thumbnailSelector"] : [],
|
|
326
330
|
onChange: $,
|
|
327
331
|
onAddonAction: i[3] || (i[3] = (o) => h("onAddonAction", o))
|
|
328
332
|
}, null, 8, ["schema", "values", "errors", "fieldLoading", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly", "excludeTypes"])
|
|
329
333
|
])) : c("", !0) : (s(), d("div", qe, [
|
|
330
|
-
|
|
334
|
+
T(Q, {
|
|
331
335
|
schema: e.schema,
|
|
332
336
|
values: t(b),
|
|
333
|
-
errors: t(
|
|
337
|
+
errors: t(k),
|
|
334
338
|
fieldLoading: t(q),
|
|
335
339
|
variant: L.value,
|
|
336
340
|
size: N.value,
|
|
@@ -341,16 +345,16 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
341
345
|
isFieldVisible: t(U),
|
|
342
346
|
isFieldDisabled: t(V),
|
|
343
347
|
isFieldReadonly: t(H),
|
|
344
|
-
excludeTypes:
|
|
348
|
+
excludeTypes: A.value ? ["thumbnailSelector"] : [],
|
|
345
349
|
onChange: $,
|
|
346
350
|
onAddonAction: i[1] || (i[1] = (o) => h("onAddonAction", o))
|
|
347
351
|
}, null, 8, ["schema", "values", "errors", "fieldLoading", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly", "excludeTypes"])
|
|
348
352
|
])),
|
|
349
353
|
ie(a.$slots, "default", {
|
|
350
354
|
values: t(b),
|
|
351
|
-
errors: t(
|
|
352
|
-
isSubmitting: t(
|
|
353
|
-
handleSubmit:
|
|
355
|
+
errors: t(k),
|
|
356
|
+
isSubmitting: t(p),
|
|
357
|
+
handleSubmit: S
|
|
354
358
|
}, void 0, !0)
|
|
355
359
|
], 2)
|
|
356
360
|
], 2)),
|
|
@@ -374,39 +378,39 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
374
378
|
// `sticky bottom-0` anchors the footer to the bottom of the nearest scrollable ancestor
|
|
375
379
|
// (the modal's overflow-y-auto body), keeping it visible at all times without leaving
|
|
376
380
|
// the normal document flow (unlike `fixed` which would escape the modal bounds).
|
|
377
|
-
|
|
381
|
+
P.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",
|
|
378
382
|
// Show a subtle top shadow while content is scrolling beneath the sticky footer
|
|
379
|
-
(
|
|
383
|
+
(P.value && W.value, ""),
|
|
380
384
|
// Inside modal: extend footer flush to modal edge padding
|
|
381
|
-
|
|
385
|
+
F.value ? "-mx-4 px-4 pb-3! mt-7.5!" : "",
|
|
382
386
|
// Non-sticky inside modal keeps the original border styling
|
|
383
|
-
!
|
|
384
|
-
!
|
|
387
|
+
!P.value && F.value ? "border-t border-border/75 mt-5" : "",
|
|
388
|
+
!P.value && !F.value ? "mt-6" : ""
|
|
385
389
|
])
|
|
386
390
|
}, [
|
|
387
391
|
f("div", Ge, [
|
|
388
|
-
oe.value ? (s(),
|
|
392
|
+
oe.value ? (s(), C(R, {
|
|
389
393
|
key: 0,
|
|
390
394
|
type: "button",
|
|
391
395
|
variant: "outline",
|
|
392
396
|
text: e.cancelText,
|
|
393
|
-
disabled: e.loading || t(
|
|
397
|
+
disabled: e.loading || t(p),
|
|
394
398
|
onClick: xe
|
|
395
399
|
}, null, 8, ["text", "disabled"])) : c("", !0),
|
|
396
|
-
u.value && e.isUpdate && !I.value ? (s(),
|
|
400
|
+
u.value && e.isUpdate && !I.value ? (s(), C(R, M({
|
|
397
401
|
key: 1,
|
|
398
402
|
type: "button",
|
|
399
403
|
variant: "primary",
|
|
400
404
|
text: e.submitText
|
|
401
405
|
}, e.submitProps, {
|
|
402
|
-
loading: e.loading || t(
|
|
403
|
-
onClick:
|
|
406
|
+
loading: e.loading || t(p),
|
|
407
|
+
onClick: S
|
|
404
408
|
}), null, 16, ["text", "loading"])) : c("", !0)
|
|
405
409
|
]),
|
|
406
410
|
f("div", {
|
|
407
411
|
class: m(["flex gap-3 items-center", u.value && "ml-auto"])
|
|
408
412
|
}, [
|
|
409
|
-
u.value && Z.value ? (s(),
|
|
413
|
+
u.value && Z.value ? (s(), C(R, {
|
|
410
414
|
key: 0,
|
|
411
415
|
type: "button",
|
|
412
416
|
variant: "outline",
|
|
@@ -414,7 +418,7 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
414
418
|
text: "Previous",
|
|
415
419
|
onClick: he
|
|
416
420
|
})) : c("", !0),
|
|
417
|
-
u.value && !I.value ? (s(),
|
|
421
|
+
u.value && !I.value ? (s(), C(R, {
|
|
418
422
|
key: 1,
|
|
419
423
|
type: "button",
|
|
420
424
|
variant: e.isUpdate ? "outline" : "primary",
|
|
@@ -422,13 +426,13 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
422
426
|
iconRight: "lucide:arrow-right",
|
|
423
427
|
onClick: _
|
|
424
428
|
}, null, 8, ["variant"])) : c("", !0),
|
|
425
|
-
!u.value || I.value ? (s(),
|
|
429
|
+
!u.value || I.value ? (s(), C(R, M({
|
|
426
430
|
key: 2,
|
|
427
431
|
type: "submit",
|
|
428
432
|
variant: "primary",
|
|
429
433
|
text: e.submitText
|
|
430
434
|
}, e.submitProps, {
|
|
431
|
-
loading: e.loading || t(
|
|
435
|
+
loading: e.loading || t(p)
|
|
432
436
|
}), null, 16, ["text", "loading"])) : c("", !0)
|
|
433
437
|
], 2)
|
|
434
438
|
], 2)) : c("", !0)
|