vlite3 0.6.1 → 0.6.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.
- package/components/CheckBox.vue.js +13 -12
- package/components/CommandPaletteContent.vue.js +1 -1
- package/components/CommandPaletteContent.vue2.js +2 -2
- package/components/Form/Form.vue.d.ts +0 -23
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +146 -141
- package/components/Form/FormField.vue.js +6 -5
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +8 -8
- package/components/Input.vue.js +13 -13
- package/components/Navbar/NavbarTabs.vue.js +3 -3
- package/components/Pagination/Pagination.vue.d.ts +2 -0
- package/components/Pagination/Pagination.vue.js +163 -118
- package/components/Pagination/index.d.ts +6 -0
- package/components/SidebarMenu/SidebarMenu.vue.js +89 -87
- package/components/SidebarMenu/SidebarMenuItem.vue.js +161 -139
- package/components/Switch.vue.js +2 -2
- package/components/Textarea.vue.js +4 -2
- package/package.json +1 -1
- package/style.css +8 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as v, computed as s, openBlock as l, createElementBlock as f, createElementVNode as g, normalizeClass as
|
|
1
|
+
import { defineComponent as v, computed as s, openBlock as l, createElementBlock as f, createElementVNode as g, normalizeClass as i, createVNode as w, Transition as C, withCtx as h, createBlock as o, createCommentVNode as r, createTextVNode as V, toDisplayString as z } from "vue";
|
|
2
2
|
import p from "./Icon.vue.js";
|
|
3
3
|
import B from "./Label.vue.js";
|
|
4
4
|
import { $t as N } from "../utils/i18n.js";
|
|
@@ -23,8 +23,8 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
|
|
|
23
23
|
setup(t, { emit: b }) {
|
|
24
24
|
const e = t, c = b, u = s(() => e.labelI18n ? N(e.labelI18n) : e.label), m = () => {
|
|
25
25
|
if (e.disabled) return;
|
|
26
|
-
const
|
|
27
|
-
c("update:modelValue",
|
|
26
|
+
const d = !(e.modelValue || e.checked);
|
|
27
|
+
c("update:modelValue", d), c("update:checked", d);
|
|
28
28
|
}, k = {
|
|
29
29
|
xs: "h-3.5 w-3.5",
|
|
30
30
|
sm: "h-4 w-4",
|
|
@@ -37,7 +37,7 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
|
|
|
37
37
|
md: "h-3.5 w-3.5",
|
|
38
38
|
lg: "h-4 w-4",
|
|
39
39
|
xl: "h-5 w-5"
|
|
40
|
-
},
|
|
40
|
+
}, y = {
|
|
41
41
|
none: "rounded-none",
|
|
42
42
|
xs: "rounded-[3px]",
|
|
43
43
|
sm: "rounded-[4px]",
|
|
@@ -46,29 +46,30 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
|
|
|
46
46
|
xl: "rounded-lg",
|
|
47
47
|
"2xl": "rounded-xl",
|
|
48
48
|
full: "rounded-full"
|
|
49
|
-
},
|
|
50
|
-
"peer shrink-0 border
|
|
49
|
+
}, a = s(() => e.indeterminate ? "indeterminate" : e.modelValue || e.checked ? "checked" : "unchecked"), x = s(() => [
|
|
50
|
+
"peer shrink-0 border transition-all duration-200 ease-in-out",
|
|
51
51
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
|
|
52
52
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
53
53
|
"data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
54
54
|
"data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground",
|
|
55
55
|
"cursor-pointer bg-transparent",
|
|
56
56
|
k[e.size],
|
|
57
|
-
|
|
57
|
+
y[e.rounded || e.size],
|
|
58
|
+
a.value === "checked" ? "border-primary!" : "border-gray-400!",
|
|
58
59
|
e.class
|
|
59
|
-
].join(" "))
|
|
60
|
+
].join(" "));
|
|
60
61
|
return s(() => [
|
|
61
62
|
"transition-transform duration-200",
|
|
62
63
|
a.value === "checked" || a.value === "indeterminate" ? "scale-100" : "scale-0",
|
|
63
64
|
n[e.size]
|
|
64
|
-
].join(" ")), (
|
|
65
|
+
].join(" ")), (d, $) => (l(), f("div", _, [
|
|
65
66
|
g("button", {
|
|
66
67
|
type: "button",
|
|
67
68
|
role: "checkbox",
|
|
68
69
|
"aria-checked": t.indeterminate ? "mixed" : t.modelValue,
|
|
69
70
|
"data-state": a.value,
|
|
70
71
|
disabled: t.disabled,
|
|
71
|
-
class:
|
|
72
|
+
class: i(x.value),
|
|
72
73
|
id: t.id,
|
|
73
74
|
onClick: m
|
|
74
75
|
}, [
|
|
@@ -85,11 +86,11 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
|
|
|
85
86
|
a.value === "checked" ? (l(), o(p, {
|
|
86
87
|
key: 0,
|
|
87
88
|
icon: "lucide:check",
|
|
88
|
-
class:
|
|
89
|
+
class: i(n[t.size])
|
|
89
90
|
}, null, 8, ["class"])) : a.value === "indeterminate" ? (l(), o(p, {
|
|
90
91
|
key: 1,
|
|
91
92
|
icon: "lucide:minus",
|
|
92
|
-
class:
|
|
93
|
+
class: i(n[t.size])
|
|
93
94
|
}, null, 8, ["class"])) : r("", !0)
|
|
94
95
|
]),
|
|
95
96
|
_: 1
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./CommandPaletteContent.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
4
|
+
const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-e919f56b"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|
|
@@ -255,7 +255,7 @@ const se = { class: "command-palette-content flex flex-col w-full h-full max-h-[
|
|
|
255
255
|
"aria-disabled": e.disabled || void 0,
|
|
256
256
|
"data-active": x(r, l) === a.value,
|
|
257
257
|
class: T(["command-palette-item w-full flex items-center gap-3 px-3! py-2.5 mx-1 rounded-lg text-sm transition-colors duration-100 text-left cursor-pointer select-none focus-visible:outline-none", [
|
|
258
|
-
x(r, l) === a.value ? "bg-gray-200 text-foreground" : "text-muted-foreground hover:bg-muted/70 hover:text-foreground",
|
|
258
|
+
x(r, l) === a.value ? "bg-gray-200/80 text-foreground" : "text-muted-foreground hover:bg-muted/70 hover:text-foreground",
|
|
259
259
|
e.disabled ? "opacity-40 cursor-not-allowed" : ""
|
|
260
260
|
]]),
|
|
261
261
|
style: { width: "calc(100% - 8px)" },
|
|
@@ -265,7 +265,7 @@ const se = { class: "command-palette-content flex flex-col w-full h-full max-h-[
|
|
|
265
265
|
s("span", {
|
|
266
266
|
class: T([
|
|
267
267
|
"shrink-0 flex items-center justify-center w-7 h-7 rounded-md",
|
|
268
|
-
x(r, l) === a.value ? "bg-gray-300 text-
|
|
268
|
+
x(r, l) === a.value ? "bg-gray-300/80 text-gray-900" : "bg-muted/80 text-muted-foreground"
|
|
269
269
|
])
|
|
270
270
|
}, [
|
|
271
271
|
w(h, {
|
|
@@ -1,52 +1,29 @@
|
|
|
1
1
|
import { IForm, IFormStep, IFormSubmitPayload } from './types';
|
|
2
2
|
import { InputVariant, InputSize, InputRounded, TimelineTextPosition, ButtonProps } from '../../types';
|
|
3
3
|
interface Props {
|
|
4
|
-
/** Schema - single array or grouped arrays */
|
|
5
4
|
schema: IForm[] | IForm[][];
|
|
6
|
-
/** Initial/bound values */
|
|
7
5
|
values?: Record<string, any>;
|
|
8
|
-
/** Input variant applied to all fields */
|
|
9
6
|
variant?: InputVariant;
|
|
10
|
-
/** Input size applied to all fields */
|
|
11
7
|
size?: InputSize;
|
|
12
|
-
/** Input rounded applied to all fields */
|
|
13
8
|
rounded?: InputRounded;
|
|
14
|
-
/** Loading state during submit */
|
|
15
9
|
loading?: boolean;
|
|
16
|
-
/** Show/hide default footer with submit button */
|
|
17
10
|
footer?: boolean;
|
|
18
|
-
/** Headings for grouped schemas */
|
|
19
11
|
groupsHeadings?: string[];
|
|
20
|
-
/** Descriptions for grouped schemas */
|
|
21
12
|
groupHeadingsDescription?: string[];
|
|
22
|
-
/** Timeline steps for multi-step form mode */
|
|
23
13
|
tabs?: IFormStep[];
|
|
24
|
-
/** Submit button text */
|
|
25
14
|
submitText?: string;
|
|
26
15
|
submitProps?: ButtonProps;
|
|
27
|
-
/** Cancel button text */
|
|
28
16
|
cancelText?: string;
|
|
29
|
-
/** Show cancel button */
|
|
30
17
|
showCancel?: boolean;
|
|
31
|
-
/** Whether this is an update operation */
|
|
32
18
|
isUpdate?: boolean;
|
|
33
|
-
/** Folder ID for file uploads */
|
|
34
19
|
folderId?: string;
|
|
35
|
-
/** Custom class for form element */
|
|
36
20
|
class?: string;
|
|
37
|
-
/** Custom class for the grid layout (overrides columns) */
|
|
38
21
|
className?: string;
|
|
39
|
-
/** Custom class for group containers */
|
|
40
22
|
groupClass?: string;
|
|
41
|
-
/** Custom class for group/step headers */
|
|
42
23
|
headerClass?: string;
|
|
43
|
-
/** Custom class for the footer area */
|
|
44
24
|
footerClass?: string;
|
|
45
|
-
/** Timeline text position */
|
|
46
25
|
timelineTextPosition?: TimelineTextPosition;
|
|
47
|
-
/** Fields to explicitly include in the submit payload */
|
|
48
26
|
emitFields?: string[];
|
|
49
|
-
/** Show asterisk for required fields */
|
|
50
27
|
showRequiredAsterisk?: boolean;
|
|
51
28
|
}
|
|
52
29
|
declare function __VLS_template(): {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Form.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-78f87e2c"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useForm as
|
|
1
|
+
import { defineComponent as le, inject as oe, computed as n, ref as ne, watch as $, onUnmounted as re, openBlock as o, createElementBlock as d, withModifiers as ue, normalizeClass as g, createVNode as N, unref as s, createCommentVNode as c, Fragment as de, renderList as ce, createElementVNode as p, toDisplayString as U, renderSlot as me, createBlock as S, mergeProps as j } from "vue";
|
|
2
|
+
import { useForm as ve } from "./composables/useForm.js";
|
|
3
3
|
import H from "./FormFields.vue.js";
|
|
4
4
|
import C from "../Button.vue.js";
|
|
5
|
-
import
|
|
5
|
+
import fe from "../Timeline/Timeline.vue.js";
|
|
6
6
|
import "@iconify/vue";
|
|
7
|
-
import { useVLiteConfig as
|
|
8
|
-
const
|
|
7
|
+
import { useVLiteConfig as ge } from "../../core/config.js";
|
|
8
|
+
const he = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "form-fields-single"
|
|
11
|
-
},
|
|
11
|
+
}, be = {
|
|
12
12
|
key: 2,
|
|
13
13
|
class: "form-groups space-y-6"
|
|
14
|
-
},
|
|
14
|
+
}, ye = { class: "text-base font-semibold text-foreground" }, pe = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "text-sm text-muted-foreground mt-1"
|
|
17
|
-
},
|
|
17
|
+
}, Se = { class: "form-group-body p-4.5" }, Ce = {
|
|
18
18
|
key: 3,
|
|
19
19
|
class: "form-step"
|
|
20
|
-
},
|
|
20
|
+
}, ke = { class: "text-lg font-semibold text-foreground" }, xe = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "text-sm text-muted-foreground mt-1"
|
|
23
|
-
}, Fe = { class: "flex items-center gap-3" },
|
|
23
|
+
}, Fe = { class: "flex items-center gap-3" }, Ae = { class: "flex items-center gap-3 ml-auto" }, Te = /* @__PURE__ */ le({
|
|
24
24
|
__name: "Form",
|
|
25
25
|
props: {
|
|
26
26
|
schema: {},
|
|
@@ -50,19 +50,19 @@ const ge = {
|
|
|
50
50
|
},
|
|
51
51
|
emits: ["onSubmit", "onCancel", "onStepChange", "onAddonAction"],
|
|
52
52
|
setup(e, { emit: I }) {
|
|
53
|
-
const
|
|
53
|
+
const i = e, m = I, v = oe(
|
|
54
54
|
"modal-context",
|
|
55
55
|
null
|
|
56
|
-
),
|
|
57
|
-
() =>
|
|
58
|
-
),
|
|
59
|
-
id:
|
|
60
|
-
title:
|
|
61
|
-
icon:
|
|
62
|
-
description:
|
|
63
|
-
status:
|
|
64
|
-
})) : []), h = n(() =>
|
|
65
|
-
formValues:
|
|
56
|
+
), K = ge(), k = n(() => K?.components?.form || {}), z = n(() => i.variant ?? k.value.variant ?? "outline"), D = n(() => i.size ?? k.value.size ?? "md"), P = n(() => i.rounded ?? k.value.rounded ?? "md"), q = n(
|
|
57
|
+
() => i.showRequiredAsterisk ?? k.value.showRequiredAsterisk ?? !0
|
|
58
|
+
), J = n(() => i.showCancel || !!v), O = n(() => !!v), x = n(() => !i.schema || i.schema.length === 0 ? !1 : Array.isArray(i.schema[0])), u = n(() => i.tabs && i.tabs.length > 0 && x.value), l = ne(0), M = n(() => i.tabs ? i.tabs.map((a, t) => ({
|
|
59
|
+
id: a.id?.toString() || t.toString(),
|
|
60
|
+
title: a.title,
|
|
61
|
+
icon: a.icon,
|
|
62
|
+
description: a.description,
|
|
63
|
+
status: t < l.value ? "completed" : t === l.value ? "current" : "upcoming"
|
|
64
|
+
})) : []), h = n(() => x.value ? i.schema : [i.schema]), E = n(() => u.value ? h.value[l.value] || [] : []), {
|
|
65
|
+
formValues: F,
|
|
66
66
|
errors: b,
|
|
67
67
|
isSubmitting: y,
|
|
68
68
|
handleFieldChange: Q,
|
|
@@ -70,63 +70,63 @@ const ge = {
|
|
|
70
70
|
validateAll: X,
|
|
71
71
|
isFieldVisible: A,
|
|
72
72
|
isFieldDisabled: w,
|
|
73
|
-
isFieldReadonly:
|
|
74
|
-
getFieldValue:
|
|
73
|
+
isFieldReadonly: T,
|
|
74
|
+
getFieldValue: we,
|
|
75
75
|
handleSubmit: Y,
|
|
76
|
-
flatSchema:
|
|
77
|
-
} =
|
|
78
|
-
schema:
|
|
79
|
-
values:
|
|
80
|
-
isUpdate:
|
|
81
|
-
folderId:
|
|
82
|
-
emitFields:
|
|
83
|
-
onSubmit: (
|
|
84
|
-
m("onSubmit",
|
|
76
|
+
flatSchema: Re
|
|
77
|
+
} = ve({
|
|
78
|
+
schema: i.schema,
|
|
79
|
+
values: i.values,
|
|
80
|
+
isUpdate: i.isUpdate,
|
|
81
|
+
folderId: i.folderId,
|
|
82
|
+
emitFields: i.emitFields,
|
|
83
|
+
onSubmit: (a) => {
|
|
84
|
+
m("onSubmit", a, v?.close || (() => {
|
|
85
85
|
}));
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
88
|
$(
|
|
89
|
-
() =>
|
|
90
|
-
(
|
|
91
|
-
v?.setSubmitting && v.setSubmitting(
|
|
89
|
+
() => i.loading || y.value,
|
|
90
|
+
(a) => {
|
|
91
|
+
v?.setSubmitting && v.setSubmitting(a);
|
|
92
92
|
},
|
|
93
93
|
{ immediate: !0 }
|
|
94
|
-
),
|
|
94
|
+
), re(() => {
|
|
95
95
|
v?.setSubmitting && v.setSubmitting(!1);
|
|
96
96
|
}), $(
|
|
97
|
-
() =>
|
|
98
|
-
(
|
|
97
|
+
() => i.values,
|
|
98
|
+
(a) => {
|
|
99
99
|
},
|
|
100
100
|
{ deep: !0 }
|
|
101
101
|
);
|
|
102
|
-
const
|
|
103
|
-
Q(
|
|
102
|
+
const B = (a, t) => {
|
|
103
|
+
Q(a, t.value, t.data);
|
|
104
104
|
}, Z = () => {
|
|
105
|
-
if (!
|
|
106
|
-
const
|
|
107
|
-
let
|
|
108
|
-
for (const
|
|
109
|
-
if (!A(
|
|
110
|
-
W(
|
|
105
|
+
if (!u.value) return !0;
|
|
106
|
+
const a = E.value;
|
|
107
|
+
let t = !0;
|
|
108
|
+
for (const r of a) {
|
|
109
|
+
if (!A(r) || w(r)) continue;
|
|
110
|
+
W(r) && (t = !1);
|
|
111
111
|
}
|
|
112
|
-
return
|
|
113
|
-
}, _ = n(() =>
|
|
114
|
-
_.value && Z() && (
|
|
112
|
+
return t;
|
|
113
|
+
}, _ = n(() => u.value ? l.value < h.value.length - 1 : !1), L = n(() => u.value ? l.value > 0 : !1), R = n(() => u.value ? l.value === h.value.length - 1 : !0), G = () => {
|
|
114
|
+
_.value && Z() && (l.value++, m("onStepChange", l.value));
|
|
115
115
|
}, ee = () => {
|
|
116
|
-
|
|
117
|
-
}, te = (
|
|
118
|
-
|
|
119
|
-
},
|
|
120
|
-
if (
|
|
121
|
-
if (!R.value && !
|
|
122
|
-
|
|
116
|
+
L.value && (l.value--, m("onStepChange", l.value));
|
|
117
|
+
}, te = (a, t) => {
|
|
118
|
+
t <= l.value && (l.value = t, m("onStepChange", l.value));
|
|
119
|
+
}, V = async () => {
|
|
120
|
+
if (u.value) {
|
|
121
|
+
if (!R.value && !i.isUpdate) {
|
|
122
|
+
G();
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
125
|
if (!X()) {
|
|
126
|
-
const
|
|
127
|
-
(
|
|
126
|
+
const t = h.value.findIndex(
|
|
127
|
+
(r) => r.some((f) => !!b.value[f.name])
|
|
128
128
|
);
|
|
129
|
-
|
|
129
|
+
t !== -1 && t !== l.value && (l.value = t, m("onStepChange", l.value));
|
|
130
130
|
return;
|
|
131
131
|
}
|
|
132
132
|
}
|
|
@@ -134,106 +134,111 @@ const ge = {
|
|
|
134
134
|
await Y();
|
|
135
135
|
} catch {
|
|
136
136
|
}
|
|
137
|
-
}, ie = () => {
|
|
137
|
+
}, ie = (a) => {
|
|
138
|
+
if (a.key !== "Enter") return;
|
|
139
|
+
const r = a.target.tagName.toLowerCase();
|
|
140
|
+
r !== "textarea" && r !== "button" && (a.preventDefault(), V());
|
|
141
|
+
}, ae = () => {
|
|
138
142
|
m("onCancel"), v && v?.close?.();
|
|
139
143
|
};
|
|
140
|
-
return (
|
|
141
|
-
class: g(["form-container",
|
|
142
|
-
onSubmit:
|
|
144
|
+
return (a, t) => (o(), d("form", {
|
|
145
|
+
class: g(["form-container", i.class]),
|
|
146
|
+
onSubmit: ue(V, ["prevent"]),
|
|
147
|
+
onKeydown: ie
|
|
143
148
|
}, [
|
|
144
|
-
|
|
149
|
+
u.value && M.value.length > 0 ? (o(), d("div", {
|
|
145
150
|
key: 0,
|
|
146
151
|
class: g(["form-timeline", e.timelineTextPosition == "right" ? "mb-6.5" : "mb-13"])
|
|
147
152
|
}, [
|
|
148
|
-
|
|
153
|
+
N(s(fe), {
|
|
149
154
|
steps: M.value,
|
|
150
|
-
activeStep:
|
|
155
|
+
activeStep: l.value,
|
|
151
156
|
direction: "horizontal",
|
|
152
157
|
textPosition: e.timelineTextPosition,
|
|
153
158
|
clickable: !0,
|
|
154
159
|
onStepClick: te
|
|
155
160
|
}, null, 8, ["steps", "activeStep", "textPosition"])
|
|
156
|
-
], 2)) :
|
|
157
|
-
|
|
158
|
-
(o(!0),
|
|
161
|
+
], 2)) : c("", !0),
|
|
162
|
+
x.value ? x.value && !u.value ? (o(), d("div", be, [
|
|
163
|
+
(o(!0), d(de, null, ce(h.value, (r, f) => (o(), d("div", {
|
|
159
164
|
key: f,
|
|
160
|
-
class: g(["form-group border rounded
|
|
165
|
+
class: g(["form-group border rounded overflow-hidden", e.groupClass])
|
|
161
166
|
}, [
|
|
162
|
-
e.groupsHeadings?.[f] ? (o(),
|
|
167
|
+
e.groupsHeadings?.[f] ? (o(), d("div", {
|
|
163
168
|
key: 0,
|
|
164
|
-
class: g(["form-group-header bg-muted/50 px-
|
|
169
|
+
class: g(["form-group-header bg-muted/50 px-4 py-2.5 border-b", e.headerClass])
|
|
165
170
|
}, [
|
|
166
|
-
p("h3",
|
|
167
|
-
e.groupHeadingsDescription?.[f] ? (o(),
|
|
168
|
-
], 2)) :
|
|
169
|
-
p("div",
|
|
170
|
-
|
|
171
|
-
schema:
|
|
172
|
-
values:
|
|
173
|
-
errors:
|
|
174
|
-
variant:
|
|
175
|
-
size:
|
|
171
|
+
p("h3", ye, U(e.groupsHeadings[f]), 1),
|
|
172
|
+
e.groupHeadingsDescription?.[f] ? (o(), d("p", pe, U(e.groupHeadingsDescription[f]), 1)) : c("", !0)
|
|
173
|
+
], 2)) : c("", !0),
|
|
174
|
+
p("div", Se, [
|
|
175
|
+
N(H, {
|
|
176
|
+
schema: r,
|
|
177
|
+
values: s(F),
|
|
178
|
+
errors: s(b),
|
|
179
|
+
variant: z.value,
|
|
180
|
+
size: D.value,
|
|
176
181
|
rounded: P.value,
|
|
177
182
|
className: e.className,
|
|
178
183
|
isUpdate: e.isUpdate,
|
|
179
|
-
showRequiredAsterisk:
|
|
180
|
-
isFieldVisible:
|
|
181
|
-
isFieldDisabled:
|
|
182
|
-
isFieldReadonly:
|
|
183
|
-
onChange:
|
|
184
|
-
onAddonAction:
|
|
184
|
+
showRequiredAsterisk: q.value,
|
|
185
|
+
isFieldVisible: s(A),
|
|
186
|
+
isFieldDisabled: s(w),
|
|
187
|
+
isFieldReadonly: s(T),
|
|
188
|
+
onChange: B,
|
|
189
|
+
onAddonAction: t[1] || (t[1] = (se) => m("onAddonAction", se))
|
|
185
190
|
}, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
|
|
186
191
|
])
|
|
187
192
|
], 2))), 128))
|
|
188
|
-
])) :
|
|
189
|
-
e.tabs?.[
|
|
193
|
+
])) : u.value ? (o(), d("div", Ce, [
|
|
194
|
+
e.tabs?.[l.value] ? (o(), d("div", {
|
|
190
195
|
key: 0,
|
|
191
196
|
class: g(["form-step-header mb-6", e.headerClass])
|
|
192
197
|
}, [
|
|
193
|
-
p("h2",
|
|
194
|
-
e.tabs[
|
|
195
|
-
], 2)) :
|
|
196
|
-
|
|
198
|
+
p("h2", ke, U(e.tabs[l.value].title), 1),
|
|
199
|
+
e.tabs[l.value].description ? (o(), d("p", xe, U(e.tabs[l.value].description), 1)) : c("", !0)
|
|
200
|
+
], 2)) : c("", !0),
|
|
201
|
+
N(H, {
|
|
197
202
|
schema: E.value,
|
|
198
|
-
values:
|
|
199
|
-
errors:
|
|
200
|
-
variant:
|
|
201
|
-
size:
|
|
203
|
+
values: s(F),
|
|
204
|
+
errors: s(b),
|
|
205
|
+
variant: z.value,
|
|
206
|
+
size: D.value,
|
|
202
207
|
rounded: P.value,
|
|
203
208
|
className: e.className,
|
|
204
209
|
isUpdate: e.isUpdate,
|
|
205
|
-
showRequiredAsterisk:
|
|
206
|
-
isFieldVisible:
|
|
207
|
-
isFieldDisabled:
|
|
208
|
-
isFieldReadonly:
|
|
209
|
-
onChange:
|
|
210
|
-
onAddonAction:
|
|
210
|
+
showRequiredAsterisk: q.value,
|
|
211
|
+
isFieldVisible: s(A),
|
|
212
|
+
isFieldDisabled: s(w),
|
|
213
|
+
isFieldReadonly: s(T),
|
|
214
|
+
onChange: B,
|
|
215
|
+
onAddonAction: t[2] || (t[2] = (r) => m("onAddonAction", r))
|
|
211
216
|
}, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
|
|
212
|
-
])) :
|
|
213
|
-
|
|
217
|
+
])) : c("", !0) : (o(), d("div", he, [
|
|
218
|
+
N(H, {
|
|
214
219
|
schema: e.schema,
|
|
215
|
-
values:
|
|
216
|
-
errors:
|
|
217
|
-
variant:
|
|
218
|
-
size:
|
|
220
|
+
values: s(F),
|
|
221
|
+
errors: s(b),
|
|
222
|
+
variant: z.value,
|
|
223
|
+
size: D.value,
|
|
219
224
|
rounded: P.value,
|
|
220
225
|
className: e.className,
|
|
221
226
|
isUpdate: e.isUpdate,
|
|
222
|
-
showRequiredAsterisk:
|
|
223
|
-
isFieldVisible:
|
|
224
|
-
isFieldDisabled:
|
|
225
|
-
isFieldReadonly:
|
|
226
|
-
onChange:
|
|
227
|
-
onAddonAction:
|
|
227
|
+
showRequiredAsterisk: q.value,
|
|
228
|
+
isFieldVisible: s(A),
|
|
229
|
+
isFieldDisabled: s(w),
|
|
230
|
+
isFieldReadonly: s(T),
|
|
231
|
+
onChange: B,
|
|
232
|
+
onAddonAction: t[0] || (t[0] = (r) => m("onAddonAction", r))
|
|
228
233
|
}, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
|
|
229
234
|
])),
|
|
230
|
-
|
|
231
|
-
values:
|
|
232
|
-
errors:
|
|
233
|
-
isSubmitting:
|
|
234
|
-
handleSubmit:
|
|
235
|
+
me(a.$slots, "default", {
|
|
236
|
+
values: s(F),
|
|
237
|
+
errors: s(b),
|
|
238
|
+
isSubmitting: s(y),
|
|
239
|
+
handleSubmit: V
|
|
235
240
|
}, void 0, !0),
|
|
236
|
-
e.footer ? (o(),
|
|
241
|
+
e.footer ? (o(), d("div", {
|
|
237
242
|
key: 4,
|
|
238
243
|
class: g([
|
|
239
244
|
"form-footer flex items-center justify-between gap-3",
|
|
@@ -242,54 +247,54 @@ const ge = {
|
|
|
242
247
|
])
|
|
243
248
|
}, [
|
|
244
249
|
p("div", Fe, [
|
|
245
|
-
|
|
250
|
+
J.value ? (o(), S(C, {
|
|
246
251
|
key: 0,
|
|
247
252
|
type: "button",
|
|
248
253
|
variant: "outline",
|
|
249
254
|
text: e.cancelText,
|
|
250
|
-
disabled: e.loading ||
|
|
251
|
-
onClick:
|
|
252
|
-
}, null, 8, ["text", "disabled"])) :
|
|
253
|
-
|
|
255
|
+
disabled: e.loading || s(y),
|
|
256
|
+
onClick: ae
|
|
257
|
+
}, null, 8, ["text", "disabled"])) : c("", !0),
|
|
258
|
+
u.value && e.isUpdate && !R.value ? (o(), S(C, j({
|
|
254
259
|
key: 1,
|
|
255
260
|
type: "button",
|
|
256
261
|
variant: "primary",
|
|
257
262
|
text: e.submitText
|
|
258
263
|
}, e.submitProps, {
|
|
259
|
-
loading: e.loading ||
|
|
260
|
-
onClick:
|
|
261
|
-
}), null, 16, ["text", "loading"])) :
|
|
264
|
+
loading: e.loading || s(y),
|
|
265
|
+
onClick: V
|
|
266
|
+
}), null, 16, ["text", "loading"])) : c("", !0)
|
|
262
267
|
]),
|
|
263
|
-
p("div",
|
|
264
|
-
|
|
268
|
+
p("div", Ae, [
|
|
269
|
+
u.value && L.value ? (o(), S(C, {
|
|
265
270
|
key: 0,
|
|
266
271
|
type: "button",
|
|
267
272
|
variant: "outline",
|
|
268
273
|
icon: "lucide:arrow-left",
|
|
269
274
|
text: "Previous",
|
|
270
275
|
onClick: ee
|
|
271
|
-
})) :
|
|
272
|
-
|
|
276
|
+
})) : c("", !0),
|
|
277
|
+
u.value && !R.value ? (o(), S(C, {
|
|
273
278
|
key: 1,
|
|
274
279
|
type: "button",
|
|
275
280
|
variant: e.isUpdate ? "outline" : "primary",
|
|
276
281
|
text: "Next",
|
|
277
282
|
iconRight: "lucide:arrow-right",
|
|
278
|
-
onClick:
|
|
279
|
-
}, null, 8, ["variant"])) :
|
|
280
|
-
!
|
|
283
|
+
onClick: G
|
|
284
|
+
}, null, 8, ["variant"])) : c("", !0),
|
|
285
|
+
!u.value || R.value ? (o(), S(C, j({
|
|
281
286
|
key: 2,
|
|
282
287
|
type: "submit",
|
|
283
288
|
variant: "primary",
|
|
284
289
|
text: e.submitText
|
|
285
290
|
}, e.submitProps, {
|
|
286
|
-
loading: e.loading ||
|
|
287
|
-
}), null, 16, ["text", "loading"])) :
|
|
291
|
+
loading: e.loading || s(y)
|
|
292
|
+
}), null, 16, ["text", "loading"])) : c("", !0)
|
|
288
293
|
])
|
|
289
|
-
], 2)) :
|
|
294
|
+
], 2)) : c("", !0)
|
|
290
295
|
], 34));
|
|
291
296
|
}
|
|
292
297
|
});
|
|
293
298
|
export {
|
|
294
|
-
|
|
299
|
+
Te as default
|
|
295
300
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as U, computed as o, markRaw as I, openBlock as r, createBlock as f, mergeProps as s, toHandlers as S, createSlots as N, unref as
|
|
1
|
+
import { defineComponent as U, computed as o, markRaw as I, openBlock as r, createBlock as f, mergeProps as s, toHandlers as S, createSlots as N, unref as z, withCtx as n, createVNode as R, createTextVNode as c, toDisplayString as m, createCommentVNode as L, resolveDynamicComponent as B } from "vue";
|
|
2
2
|
import { isComponent as h, isAddonObject as p } from "./utils/form.utils.js";
|
|
3
3
|
import O from "../NumberInput.vue.js";
|
|
4
4
|
import v from "../Button.vue.js";
|
|
@@ -119,6 +119,7 @@ const ue = /* @__PURE__ */ U({
|
|
|
119
119
|
} : t === "switch" ? {
|
|
120
120
|
...a,
|
|
121
121
|
modelValue: !!e.value,
|
|
122
|
+
size: "sm",
|
|
122
123
|
label: ""
|
|
123
124
|
// Label handled externally
|
|
124
125
|
} : t === "check" ? {
|
|
@@ -240,7 +241,7 @@ const ue = /* @__PURE__ */ U({
|
|
|
240
241
|
...b.value,
|
|
241
242
|
...l.field?.props || {}
|
|
242
243
|
}, S(x.value)), N({ _: 2 }, [
|
|
243
|
-
|
|
244
|
+
z(p)(l.field.addonLeft) ? {
|
|
244
245
|
name: "addon-left",
|
|
245
246
|
fn: n(() => [
|
|
246
247
|
l.field.addonLeft.type === "select" ? (r(), f(y, s({
|
|
@@ -251,7 +252,7 @@ const ue = /* @__PURE__ */ U({
|
|
|
251
252
|
onOnSelect: a[0] || (a[0] = (i) => V(l.field.addonLeft, i))
|
|
252
253
|
}), {
|
|
253
254
|
trigger: n(({ selectedLabel: i }) => [
|
|
254
|
-
|
|
255
|
+
R(v, { variant: "outline" }, {
|
|
255
256
|
default: n(() => [
|
|
256
257
|
c(m(i), 1)
|
|
257
258
|
]),
|
|
@@ -273,7 +274,7 @@ const ue = /* @__PURE__ */ U({
|
|
|
273
274
|
]),
|
|
274
275
|
key: "0"
|
|
275
276
|
} : void 0,
|
|
276
|
-
|
|
277
|
+
z(p)(l.field.addonRight) ? {
|
|
277
278
|
name: "addon-right",
|
|
278
279
|
fn: n(() => [
|
|
279
280
|
l.field.addonRight.type === "select" ? (r(), f(y, s({
|
|
@@ -284,7 +285,7 @@ const ue = /* @__PURE__ */ U({
|
|
|
284
285
|
onOnSelect: a[2] || (a[2] = (i) => V(l.field.addonRight, i))
|
|
285
286
|
}), {
|
|
286
287
|
trigger: n(({ selectedLabel: i }) => [
|
|
287
|
-
|
|
288
|
+
R(v, { variant: "outline" }, {
|
|
288
289
|
default: n(() => [
|
|
289
290
|
c(m(i), 1)
|
|
290
291
|
]),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./FormFields.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0fe8a23f"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|