vlite3 0.1.2 → 0.1.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/DatePicker.vue.d.ts +2 -2
- package/components/DatePicker.vue.js +13 -13
- package/components/Form/Form.vue.d.ts +5 -2
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +125 -120
- package/components/Form/composables/useForm.d.ts +1 -0
- package/components/Form/composables/useForm.js +11 -11
- package/components/Form/types.d.ts +2 -0
- package/components/Modal.vue.js +50 -47
- package/components/SidePanel.vue.js +1 -1
- package/components/SidePanel.vue2.js +42 -41
- package/components/Slider.vue.js +64 -56
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -26,11 +26,11 @@ declare function __VLS_template(): {
|
|
|
26
26
|
};
|
|
27
27
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
28
28
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
29
|
-
onChange: (...args: any[]) => void;
|
|
30
29
|
"update:modelValue": (...args: any[]) => void;
|
|
30
|
+
change: (...args: any[]) => void;
|
|
31
31
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
32
|
-
onOnChange?: (...args: any[]) => any;
|
|
33
32
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
33
|
+
onChange?: (...args: any[]) => any;
|
|
34
34
|
}>, {
|
|
35
35
|
teleport: boolean;
|
|
36
36
|
minuteInterval: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as v, computed as r, openBlock as h, createBlock as g, unref as u, withCtx as m, createElementVNode as p, createVNode as c, renderSlot as V, mergeProps as w } from "vue";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import y from "./Button.vue.js";
|
|
3
|
+
import D from "./Dropdown/Dropdown.vue.js";
|
|
4
4
|
import "@iconify/vue";
|
|
5
|
-
import
|
|
5
|
+
import x from "v-datepicker-lite";
|
|
6
6
|
import "v-datepicker-lite/style.css";
|
|
7
7
|
const P = { class: "min-w-[300px] overflow-hidden" }, N = /* @__PURE__ */ v({
|
|
8
8
|
__name: "DatePicker",
|
|
@@ -19,19 +19,19 @@ const P = { class: "min-w-[300px] overflow-hidden" }, N = /* @__PURE__ */ v({
|
|
|
19
19
|
teleport: { type: Boolean, default: !0 },
|
|
20
20
|
minuteInterval: { default: 5 }
|
|
21
21
|
},
|
|
22
|
-
emits: ["update:modelValue", "
|
|
23
|
-
setup(t, { emit:
|
|
24
|
-
const n = t, i =
|
|
22
|
+
emits: ["update:modelValue", "change"],
|
|
23
|
+
setup(t, { emit: s }) {
|
|
24
|
+
const n = t, i = s, a = r({
|
|
25
25
|
get: () => n.modelValue ?? n.value,
|
|
26
26
|
set: (e) => {
|
|
27
|
-
i("update:modelValue", e), i("
|
|
27
|
+
i("update:modelValue", e), i("change", e);
|
|
28
28
|
}
|
|
29
|
-
}),
|
|
29
|
+
}), d = (e) => e instanceof Date ? e.getHours() !== 0 || e.getMinutes() !== 0 : typeof e == "string" ? e.includes("T") || /\d{2}:\d{2}/.test(e) : !1, l = r(() => {
|
|
30
30
|
if (!a.value) return "";
|
|
31
31
|
try {
|
|
32
32
|
const e = new Date(a.value);
|
|
33
33
|
if (isNaN(e.getTime())) return String(a.value);
|
|
34
|
-
const o = n.mode === "dateTime" &&
|
|
34
|
+
const o = n.mode === "dateTime" && d(a.value);
|
|
35
35
|
return e.toLocaleDateString("en-US", {
|
|
36
36
|
month: "short",
|
|
37
37
|
day: "numeric",
|
|
@@ -44,7 +44,7 @@ const P = { class: "min-w-[300px] overflow-hidden" }, N = /* @__PURE__ */ v({
|
|
|
44
44
|
}), f = (e) => {
|
|
45
45
|
a.value = e;
|
|
46
46
|
};
|
|
47
|
-
return (e, o) => (h(), g(u(
|
|
47
|
+
return (e, o) => (h(), g(u(D), {
|
|
48
48
|
position: "bottom-start",
|
|
49
49
|
class: "w-full",
|
|
50
50
|
teleport: t.teleport
|
|
@@ -54,17 +54,17 @@ const P = { class: "min-w-[300px] overflow-hidden" }, N = /* @__PURE__ */ v({
|
|
|
54
54
|
value: a.value,
|
|
55
55
|
displayValue: l.value
|
|
56
56
|
}, () => [
|
|
57
|
-
c(
|
|
57
|
+
c(y, w({
|
|
58
58
|
text: l.value || t.placeholder || "Select date",
|
|
59
59
|
variant: t.variant || "outline",
|
|
60
60
|
size: t.size || "md",
|
|
61
61
|
icon: t.icon || "lucide:calendar"
|
|
62
|
-
}, t.btnProps, { class: "w-full" }), null, 16, ["text", "variant", "size", "icon"])
|
|
62
|
+
}, t.btnProps, { class: "w-full justify-start text-left font-normal" }), null, 16, ["text", "variant", "size", "icon"])
|
|
63
63
|
])
|
|
64
64
|
]),
|
|
65
65
|
default: m(() => [
|
|
66
66
|
p("div", P, [
|
|
67
|
-
c(u(
|
|
67
|
+
c(u(x), {
|
|
68
68
|
value: a.value,
|
|
69
69
|
mode: t.mode,
|
|
70
70
|
"min-date": t.minDate,
|
|
@@ -30,6 +30,8 @@ interface Props {
|
|
|
30
30
|
showCancel?: boolean;
|
|
31
31
|
/** Whether this is an update operation */
|
|
32
32
|
isUpdate?: boolean;
|
|
33
|
+
/** Folder ID for file uploads */
|
|
34
|
+
folderId?: string;
|
|
33
35
|
/** Custom class for form element */
|
|
34
36
|
class?: string;
|
|
35
37
|
/** Custom class for the grid layout (overrides columns) */
|
|
@@ -58,11 +60,11 @@ declare function __VLS_template(): {
|
|
|
58
60
|
};
|
|
59
61
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
60
62
|
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
61
|
-
onSubmit: (payload: IFormSubmitPayload) => any;
|
|
63
|
+
onSubmit: (payload: IFormSubmitPayload, close: () => void) => any;
|
|
62
64
|
onCancel: () => any;
|
|
63
65
|
onStepChange: (step: number) => any;
|
|
64
66
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
65
|
-
onOnSubmit?: (payload: IFormSubmitPayload) => any;
|
|
67
|
+
onOnSubmit?: (payload: IFormSubmitPayload, close: () => void) => any;
|
|
66
68
|
onOnCancel?: () => any;
|
|
67
69
|
onOnStepChange?: (step: number) => any;
|
|
68
70
|
}>, {
|
|
@@ -78,6 +80,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
78
80
|
footerClass: string;
|
|
79
81
|
cancelText: string;
|
|
80
82
|
isUpdate: boolean;
|
|
83
|
+
folderId: string;
|
|
81
84
|
groupsHeadings: string[];
|
|
82
85
|
groupHeadingsDescription: string[];
|
|
83
86
|
submitText: string;
|
|
@@ -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
|
|
4
|
+
const _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-d3940de2"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_ as default
|
|
7
7
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useForm as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as Q, inject as W, computed as u, ref as X, watch as Y, openBlock as l, createElementBlock as o, withModifiers as Z, normalizeClass as f, createVNode as x, createCommentVNode as d, unref as t, Fragment as I, renderList as _, createElementVNode as D, toDisplayString as k, renderSlot as ee, createBlock as p, mergeProps as te } from "vue";
|
|
2
|
+
import { useForm as ae } from "./composables/useForm.js";
|
|
3
|
+
import w from "./FormFields.vue.js";
|
|
4
|
+
import N from "../Button.vue.js";
|
|
5
|
+
import ie from "../Timeline.vue.js";
|
|
6
|
+
const le = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "form-timeline mb-18"
|
|
9
|
-
},
|
|
9
|
+
}, se = {
|
|
10
10
|
key: 1,
|
|
11
11
|
class: "form-fields-single"
|
|
12
|
-
},
|
|
12
|
+
}, ne = {
|
|
13
13
|
key: 2,
|
|
14
14
|
class: "form-groups space-y-6"
|
|
15
|
-
},
|
|
15
|
+
}, oe = { class: "text-base font-semibold text-foreground" }, re = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "text-sm text-muted-foreground mt-1"
|
|
18
|
-
},
|
|
18
|
+
}, ue = { class: "form-group-body p-6" }, de = {
|
|
19
19
|
key: 3,
|
|
20
20
|
class: "form-step"
|
|
21
|
-
},
|
|
21
|
+
}, ce = { class: "text-lg font-semibold text-foreground" }, me = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "text-sm text-muted-foreground mt-1"
|
|
24
|
-
},
|
|
24
|
+
}, Fe = /* @__PURE__ */ Q({
|
|
25
25
|
__name: "Form",
|
|
26
26
|
props: {
|
|
27
27
|
schema: {},
|
|
@@ -39,6 +39,7 @@ const te = {
|
|
|
39
39
|
cancelText: { default: "Cancel" },
|
|
40
40
|
showCancel: { type: Boolean, default: !1 },
|
|
41
41
|
isUpdate: { type: Boolean, default: !1 },
|
|
42
|
+
folderId: { default: void 0 },
|
|
42
43
|
class: { default: "" },
|
|
43
44
|
className: { default: "" },
|
|
44
45
|
groupClass: { default: "" },
|
|
@@ -47,192 +48,196 @@ const te = {
|
|
|
47
48
|
timelineTextPosition: { default: "bottom" }
|
|
48
49
|
},
|
|
49
50
|
emits: ["onSubmit", "onCancel", "onStepChange"],
|
|
50
|
-
setup(e, { emit:
|
|
51
|
-
const
|
|
52
|
-
id:
|
|
53
|
-
title:
|
|
54
|
-
icon:
|
|
55
|
-
description:
|
|
51
|
+
setup(e, { emit: A }) {
|
|
52
|
+
const i = e, m = A, h = W("modal-context", null), G = u(() => i.showCancel || !!h), g = u(() => !i.schema || i.schema.length === 0 ? !1 : Array.isArray(i.schema[0])), r = u(() => i.tabs && i.tabs.length > 0 && g.value), a = X(0), P = u(() => i.tabs ? i.tabs.map((s, n) => ({
|
|
53
|
+
id: s.id?.toString() || n.toString(),
|
|
54
|
+
title: s.title,
|
|
55
|
+
icon: s.icon,
|
|
56
|
+
description: s.description,
|
|
56
57
|
status: n < a.value ? "completed" : n === a.value ? "current" : "upcoming"
|
|
57
|
-
})) : []),
|
|
58
|
-
formValues:
|
|
59
|
-
errors:
|
|
60
|
-
isSubmitting:
|
|
61
|
-
handleFieldChange:
|
|
62
|
-
validateField:
|
|
63
|
-
validateAll:
|
|
64
|
-
isFieldVisible:
|
|
65
|
-
isFieldDisabled:
|
|
66
|
-
isFieldReadonly:
|
|
67
|
-
getFieldValue:
|
|
68
|
-
handleSubmit:
|
|
69
|
-
flatSchema:
|
|
70
|
-
} =
|
|
71
|
-
schema:
|
|
72
|
-
values:
|
|
73
|
-
isUpdate:
|
|
74
|
-
|
|
75
|
-
|
|
58
|
+
})) : []), b = u(() => g.value ? i.schema : [i.schema]), R = u(() => r.value ? b.value[a.value] || [] : []), {
|
|
59
|
+
formValues: y,
|
|
60
|
+
errors: S,
|
|
61
|
+
isSubmitting: V,
|
|
62
|
+
handleFieldChange: $,
|
|
63
|
+
validateField: j,
|
|
64
|
+
validateAll: ve,
|
|
65
|
+
isFieldVisible: C,
|
|
66
|
+
isFieldDisabled: F,
|
|
67
|
+
isFieldReadonly: z,
|
|
68
|
+
getFieldValue: fe,
|
|
69
|
+
handleSubmit: E,
|
|
70
|
+
flatSchema: he
|
|
71
|
+
} = ae({
|
|
72
|
+
schema: i.schema,
|
|
73
|
+
values: i.values,
|
|
74
|
+
isUpdate: i.isUpdate,
|
|
75
|
+
folderId: i.folderId,
|
|
76
|
+
onSubmit: (s) => {
|
|
77
|
+
m("onSubmit", s, h?.close);
|
|
76
78
|
}
|
|
77
79
|
});
|
|
78
|
-
|
|
79
|
-
() =>
|
|
80
|
-
(
|
|
80
|
+
Y(
|
|
81
|
+
() => i.values,
|
|
82
|
+
(s) => {
|
|
81
83
|
},
|
|
82
84
|
{ deep: !0 }
|
|
83
85
|
);
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
},
|
|
87
|
-
if (!
|
|
88
|
-
const
|
|
86
|
+
const U = (s, n) => {
|
|
87
|
+
$(s, n.value, n.data);
|
|
88
|
+
}, L = () => {
|
|
89
|
+
if (!r.value) return !0;
|
|
90
|
+
const s = R.value;
|
|
89
91
|
let n = !0;
|
|
90
|
-
for (const v of
|
|
91
|
-
if (!
|
|
92
|
-
|
|
92
|
+
for (const v of s) {
|
|
93
|
+
if (!C(v) || F(v)) continue;
|
|
94
|
+
j(v) && (n = !1);
|
|
93
95
|
}
|
|
94
96
|
return n;
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
},
|
|
97
|
+
}, q = u(() => r.value ? a.value < b.value.length - 1 : !1), B = u(() => r.value ? a.value > 0 : !1), T = u(() => r.value ? a.value === b.value.length - 1 : !0), H = () => {
|
|
98
|
+
q.value && L() && (a.value++, m("onStepChange", a.value));
|
|
99
|
+
}, J = () => {
|
|
100
|
+
B.value && (a.value--, m("onStepChange", a.value));
|
|
101
|
+
}, K = (s, n) => {
|
|
100
102
|
n <= a.value && (a.value = n, m("onStepChange", a.value));
|
|
101
|
-
},
|
|
102
|
-
if (
|
|
103
|
-
|
|
103
|
+
}, M = async () => {
|
|
104
|
+
if (r.value && !T.value) {
|
|
105
|
+
H();
|
|
104
106
|
return;
|
|
105
107
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
try {
|
|
109
|
+
await E();
|
|
110
|
+
} catch {
|
|
111
|
+
}
|
|
112
|
+
}, O = () => {
|
|
113
|
+
m("onCancel"), h && h?.close?.();
|
|
109
114
|
};
|
|
110
|
-
return (
|
|
111
|
-
class: f(["form-container",
|
|
112
|
-
onSubmit:
|
|
115
|
+
return (s, n) => (l(), o("form", {
|
|
116
|
+
class: f(["form-container", i.class]),
|
|
117
|
+
onSubmit: Z(M, ["prevent"])
|
|
113
118
|
}, [
|
|
114
|
-
|
|
115
|
-
|
|
119
|
+
r.value && P.value.length > 0 ? (l(), o("div", le, [
|
|
120
|
+
x(ie, {
|
|
116
121
|
steps: P.value,
|
|
117
122
|
activeStep: a.value,
|
|
118
123
|
direction: "horizontal",
|
|
119
124
|
textPosition: e.timelineTextPosition,
|
|
120
125
|
clickable: !0,
|
|
121
|
-
onStepClick:
|
|
126
|
+
onStepClick: K
|
|
122
127
|
}, null, 8, ["steps", "activeStep", "textPosition"])
|
|
123
|
-
])) :
|
|
124
|
-
|
|
125
|
-
(
|
|
128
|
+
])) : d("", !0),
|
|
129
|
+
g.value ? g.value && !r.value ? (l(), o("div", ne, [
|
|
130
|
+
(l(!0), o(I, null, _(b.value, (v, c) => (l(), o("div", {
|
|
126
131
|
key: c,
|
|
127
132
|
class: f(["form-group border rounded-lg overflow-hidden", e.groupClass])
|
|
128
133
|
}, [
|
|
129
|
-
e.groupsHeadings?.[c] ? (
|
|
134
|
+
e.groupsHeadings?.[c] ? (l(), o("div", {
|
|
130
135
|
key: 0,
|
|
131
136
|
class: f(["form-group-header bg-muted/50 px-6 py-4 border-b", e.headerClass])
|
|
132
137
|
}, [
|
|
133
|
-
|
|
134
|
-
e.groupHeadingsDescription?.[c] ? (
|
|
135
|
-
], 2)) :
|
|
136
|
-
|
|
137
|
-
|
|
138
|
+
D("h3", oe, k(e.groupsHeadings[c]), 1),
|
|
139
|
+
e.groupHeadingsDescription?.[c] ? (l(), o("p", re, k(e.groupHeadingsDescription[c]), 1)) : d("", !0)
|
|
140
|
+
], 2)) : d("", !0),
|
|
141
|
+
D("div", ue, [
|
|
142
|
+
x(w, {
|
|
138
143
|
schema: v,
|
|
139
|
-
values: t(
|
|
140
|
-
errors: t(
|
|
144
|
+
values: t(y),
|
|
145
|
+
errors: t(S),
|
|
141
146
|
variant: e.variant,
|
|
142
147
|
size: e.size,
|
|
143
148
|
rounded: e.rounded,
|
|
144
149
|
className: e.className,
|
|
145
150
|
isUpdate: e.isUpdate,
|
|
146
|
-
isFieldVisible: t(
|
|
147
|
-
isFieldDisabled: t(
|
|
148
|
-
isFieldReadonly: t(
|
|
149
|
-
onChange:
|
|
151
|
+
isFieldVisible: t(C),
|
|
152
|
+
isFieldDisabled: t(F),
|
|
153
|
+
isFieldReadonly: t(z),
|
|
154
|
+
onChange: U
|
|
150
155
|
}, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
|
|
151
156
|
])
|
|
152
157
|
], 2))), 128))
|
|
153
|
-
])) :
|
|
154
|
-
e.tabs?.[a.value] ? (
|
|
158
|
+
])) : r.value ? (l(), o("div", de, [
|
|
159
|
+
e.tabs?.[a.value] ? (l(), o("div", {
|
|
155
160
|
key: 0,
|
|
156
161
|
class: f(["form-step-header mb-6", e.headerClass])
|
|
157
162
|
}, [
|
|
158
|
-
|
|
159
|
-
e.tabs[a.value].description ? (
|
|
160
|
-
], 2)) :
|
|
161
|
-
|
|
162
|
-
schema:
|
|
163
|
-
values: t(
|
|
164
|
-
errors: t(
|
|
163
|
+
D("h2", ce, k(e.tabs[a.value].title), 1),
|
|
164
|
+
e.tabs[a.value].description ? (l(), o("p", me, k(e.tabs[a.value].description), 1)) : d("", !0)
|
|
165
|
+
], 2)) : d("", !0),
|
|
166
|
+
x(w, {
|
|
167
|
+
schema: R.value,
|
|
168
|
+
values: t(y),
|
|
169
|
+
errors: t(S),
|
|
165
170
|
variant: e.variant,
|
|
166
171
|
size: e.size,
|
|
167
172
|
rounded: e.rounded,
|
|
168
173
|
className: e.className,
|
|
169
174
|
isUpdate: e.isUpdate,
|
|
170
|
-
isFieldVisible: t(
|
|
171
|
-
isFieldDisabled: t(
|
|
172
|
-
isFieldReadonly: t(
|
|
173
|
-
onChange:
|
|
175
|
+
isFieldVisible: t(C),
|
|
176
|
+
isFieldDisabled: t(F),
|
|
177
|
+
isFieldReadonly: t(z),
|
|
178
|
+
onChange: U
|
|
174
179
|
}, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
|
|
175
|
-
])) :
|
|
176
|
-
|
|
180
|
+
])) : d("", !0) : (l(), o("div", se, [
|
|
181
|
+
x(w, {
|
|
177
182
|
schema: e.schema,
|
|
178
|
-
values: t(
|
|
179
|
-
errors: t(
|
|
183
|
+
values: t(y),
|
|
184
|
+
errors: t(S),
|
|
180
185
|
variant: e.variant,
|
|
181
186
|
size: e.size,
|
|
182
187
|
rounded: e.rounded,
|
|
183
188
|
className: e.className,
|
|
184
189
|
isUpdate: e.isUpdate,
|
|
185
|
-
isFieldVisible: t(
|
|
186
|
-
isFieldDisabled: t(
|
|
187
|
-
isFieldReadonly: t(
|
|
188
|
-
onChange:
|
|
190
|
+
isFieldVisible: t(C),
|
|
191
|
+
isFieldDisabled: t(F),
|
|
192
|
+
isFieldReadonly: t(z),
|
|
193
|
+
onChange: U
|
|
189
194
|
}, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
|
|
190
195
|
])),
|
|
191
|
-
|
|
192
|
-
values: t(
|
|
193
|
-
errors: t(
|
|
194
|
-
isSubmitting: t(
|
|
195
|
-
handleSubmit:
|
|
196
|
+
ee(s.$slots, "default", {
|
|
197
|
+
values: t(y),
|
|
198
|
+
errors: t(S),
|
|
199
|
+
isSubmitting: t(V),
|
|
200
|
+
handleSubmit: M
|
|
196
201
|
}, void 0, !0),
|
|
197
|
-
e.footer ? (
|
|
202
|
+
e.footer ? (l(), o("div", {
|
|
198
203
|
key: 4,
|
|
199
204
|
class: f(["form-footer mt-6 flex items-center justify-end gap-3", e.footerClass])
|
|
200
205
|
}, [
|
|
201
|
-
|
|
206
|
+
G.value ? (l(), p(N, {
|
|
202
207
|
key: 0,
|
|
203
208
|
type: "button",
|
|
204
209
|
variant: "outline",
|
|
205
210
|
text: e.cancelText,
|
|
206
|
-
disabled: e.loading || t(
|
|
207
|
-
onClick:
|
|
208
|
-
}, null, 8, ["text", "disabled"])) :
|
|
209
|
-
|
|
211
|
+
disabled: e.loading || t(V),
|
|
212
|
+
onClick: O
|
|
213
|
+
}, null, 8, ["text", "disabled"])) : d("", !0),
|
|
214
|
+
r.value && B.value ? (l(), p(N, {
|
|
210
215
|
key: 1,
|
|
211
216
|
type: "button",
|
|
212
217
|
variant: "outline",
|
|
213
218
|
icon: "lucide:arrow-left",
|
|
214
219
|
text: "Previous",
|
|
215
|
-
onClick:
|
|
216
|
-
})) :
|
|
217
|
-
|
|
220
|
+
onClick: J
|
|
221
|
+
})) : d("", !0),
|
|
222
|
+
r.value && !T.value ? (l(), p(N, {
|
|
218
223
|
key: 2,
|
|
219
224
|
type: "button",
|
|
220
225
|
variant: "primary",
|
|
221
226
|
text: "Next",
|
|
222
227
|
iconRight: "lucide:arrow-right",
|
|
223
|
-
onClick:
|
|
224
|
-
})) : (
|
|
228
|
+
onClick: H
|
|
229
|
+
})) : (l(), p(N, te({
|
|
225
230
|
key: 3,
|
|
226
231
|
type: "submit",
|
|
227
232
|
variant: "primary",
|
|
228
233
|
text: e.submitText
|
|
229
234
|
}, e.submitProps, {
|
|
230
|
-
loading: e.loading || t(
|
|
235
|
+
loading: e.loading || t(V)
|
|
231
236
|
}), null, 16, ["text", "loading"]))
|
|
232
|
-
], 2)) :
|
|
237
|
+
], 2)) : d("", !0)
|
|
233
238
|
], 34));
|
|
234
239
|
}
|
|
235
240
|
});
|
|
236
241
|
export {
|
|
237
|
-
|
|
242
|
+
Fe as default
|
|
238
243
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ref as u, computed as $, watch as k } from "vue";
|
|
2
2
|
import { initializeFormValues as j, deepClone as c, getNestedValue as N, evaluateConditional as y, setNestedValue as h, collectFileFields as B, filterNullCustomFields as G } from "../utils/form.utils.js";
|
|
3
3
|
import { useFileUpload as H } from "./useFileUpload.js";
|
|
4
|
-
function
|
|
5
|
-
const { schema: i, values: V, isUpdate: d = !1, onSubmit: b } = q, { handleUploadFile:
|
|
4
|
+
function Y(q) {
|
|
5
|
+
const { schema: i, values: V, isUpdate: d = !1, folderId: x, onSubmit: b } = q, { handleUploadFile: D, loading: J } = H(), t = u(j(i, V)), r = u({}), v = u(!1), n = u(!1), m = u(c(t.value)), f = $(() => i ? Array.isArray(i[0]) ? i.flat() : i : []);
|
|
6
6
|
k(
|
|
7
7
|
() => V,
|
|
8
8
|
(e) => {
|
|
@@ -13,11 +13,11 @@ function X(q) {
|
|
|
13
13
|
const p = () => ({
|
|
14
14
|
values: t.value,
|
|
15
15
|
isUpdate: d
|
|
16
|
-
}), g = (e) => N(t.value, e),
|
|
16
|
+
}), g = (e) => N(t.value, e), O = (e) => r.value[e] || "", A = (e, l) => {
|
|
17
17
|
l ? r.value[e] = l : delete r.value[e];
|
|
18
18
|
}, F = () => {
|
|
19
19
|
r.value = {};
|
|
20
|
-
}, S = (e) => e.when ? y(e.when, p()) : !0, w = (e) => y(e.disabled, p()),
|
|
20
|
+
}, S = (e) => e.when ? y(e.when, p()) : !0, w = (e) => y(e.disabled, p()), z = (e) => y(e.readonly, p()), C = (e) => {
|
|
21
21
|
const l = g(e.name);
|
|
22
22
|
let a = "";
|
|
23
23
|
return e.required && (l == null || l === "" || Array.isArray(l) && l.length === 0) && (a = `${e.label || e.name} is required`), !a && e.validation && (a = e.validation({
|
|
@@ -33,7 +33,7 @@ function X(q) {
|
|
|
33
33
|
C(l) && (e = !1);
|
|
34
34
|
}
|
|
35
35
|
return e;
|
|
36
|
-
},
|
|
36
|
+
}, I = (e, l, a) => {
|
|
37
37
|
t.value = h(t.value, e, l), n.value = !0, delete r.value[e];
|
|
38
38
|
const o = f.value.find((s) => s.name === e);
|
|
39
39
|
if (o?.updateValues) {
|
|
@@ -48,9 +48,9 @@ function X(q) {
|
|
|
48
48
|
}, L = async () => {
|
|
49
49
|
const e = c(t.value), l = B(i, e);
|
|
50
50
|
for (const a of l) {
|
|
51
|
-
const { name: o, value: s, type:
|
|
51
|
+
const { name: o, value: s, type: P } = a;
|
|
52
52
|
if (s instanceof File || s && typeof s == "object" && s.file instanceof File) {
|
|
53
|
-
const U = await
|
|
53
|
+
const U = await D(s, x);
|
|
54
54
|
U && Object.assign(e, h(e, o, U));
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -72,14 +72,14 @@ function X(q) {
|
|
|
72
72
|
errors: r,
|
|
73
73
|
isSubmitting: v,
|
|
74
74
|
isDirty: n,
|
|
75
|
-
handleFieldChange:
|
|
75
|
+
handleFieldChange: I,
|
|
76
76
|
validateField: C,
|
|
77
77
|
validateAll: E,
|
|
78
78
|
isFieldVisible: S,
|
|
79
79
|
isFieldDisabled: w,
|
|
80
|
-
isFieldReadonly:
|
|
80
|
+
isFieldReadonly: z,
|
|
81
81
|
getFieldValue: g,
|
|
82
|
-
getFieldError:
|
|
82
|
+
getFieldError: O,
|
|
83
83
|
setFieldError: A,
|
|
84
84
|
clearErrors: F,
|
|
85
85
|
resetForm: () => {
|
|
@@ -105,5 +105,5 @@ function X(q) {
|
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
export {
|
|
108
|
-
|
|
108
|
+
Y as useForm
|
|
109
109
|
};
|
|
@@ -140,6 +140,8 @@ export interface IFormProps {
|
|
|
140
140
|
showCancel?: boolean;
|
|
141
141
|
/** Whether this is an update operation */
|
|
142
142
|
isUpdate?: boolean;
|
|
143
|
+
/** Folder ID for file uploads */
|
|
144
|
+
folderId?: string;
|
|
143
145
|
/** Custom class for form element */
|
|
144
146
|
class?: string;
|
|
145
147
|
/** Custom class for the grid layout (overrides columns) */
|
package/components/Modal.vue.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useKeyStroke as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as w, ref as $, watch as m, provide as B, onUnmounted as O, openBlock as s, createElementBlock as a, Fragment as S, createElementVNode as n, mergeProps as y, withModifiers as b, renderSlot as i, createCommentVNode as r, createBlock as h, Teleport as z, createVNode as v, Transition as E, withCtx as N, normalizeClass as d, toDisplayString as g, resolveDynamicComponent as P } from "vue";
|
|
2
|
+
import V from "./Button.vue.js";
|
|
3
|
+
import { useKeyStroke as j } from "../composables/useKeyStroke.js";
|
|
4
|
+
const D = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "flex-none flex flex-col space-y-1.5 pb-0 border-b"
|
|
7
|
-
},
|
|
7
|
+
}, K = { class: "text-lg font-semibold leading-none tracking-tight" }, M = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "text-sm text-muted-foreground mb-2"
|
|
10
|
-
}, F = /* @__PURE__ */
|
|
10
|
+
}, F = /* @__PURE__ */ w({
|
|
11
|
+
inheritAttrs: !1,
|
|
11
12
|
__name: "Modal",
|
|
12
13
|
props: {
|
|
13
14
|
show: { type: Boolean, default: !1 },
|
|
@@ -24,36 +25,38 @@ const j = {
|
|
|
24
25
|
bodyProps: {}
|
|
25
26
|
},
|
|
26
27
|
emits: ["close", "update:show", "onOpen"],
|
|
27
|
-
setup(e, { emit:
|
|
28
|
-
const c = e, u =
|
|
28
|
+
setup(e, { emit: p }) {
|
|
29
|
+
const c = e, u = p, l = $(c.show);
|
|
29
30
|
m(
|
|
30
31
|
() => c.show,
|
|
31
32
|
(t) => {
|
|
32
|
-
|
|
33
|
+
l.value = t, t && u("onOpen");
|
|
33
34
|
}
|
|
34
35
|
);
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
const x = () => {
|
|
37
|
+
l.value = !0;
|
|
38
|
+
}, o = () => {
|
|
39
|
+
l.value = !1, u("update:show", !1), u("close");
|
|
40
|
+
};
|
|
41
|
+
B("modal-context", { close: o });
|
|
42
|
+
const k = () => {
|
|
43
|
+
c.closeOutside && o();
|
|
44
|
+
}, { onKeyStroke: C } = j();
|
|
45
|
+
return C("Escape", o), m(l, (t) => {
|
|
43
46
|
t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "";
|
|
44
|
-
}),
|
|
47
|
+
}), O(() => {
|
|
45
48
|
document.body.style.overflow = "";
|
|
46
|
-
}), (t, f) => (
|
|
47
|
-
|
|
48
|
-
onClick:
|
|
49
|
-
class:
|
|
50
|
-
}, [
|
|
49
|
+
}), (t, f) => (s(), a(S, null, [
|
|
50
|
+
n("span", y({
|
|
51
|
+
onClick: b(x, ["stop"]),
|
|
52
|
+
class: `${e.triggerClass}`
|
|
53
|
+
}, t.$attrs), [
|
|
51
54
|
i(t.$slots, "trigger", {}, () => [
|
|
52
55
|
e.body ? i(t.$slots, "default", { key: 0 }) : r("", !0)
|
|
53
56
|
])
|
|
54
|
-
],
|
|
55
|
-
(
|
|
56
|
-
|
|
57
|
+
], 16),
|
|
58
|
+
(s(), h(z, { to: "body" }, [
|
|
59
|
+
v(E, {
|
|
57
60
|
"enter-active-class": "transition duration-200 ease-out",
|
|
58
61
|
"enter-from-class": "opacity-0",
|
|
59
62
|
"enter-to-class": "opacity-100",
|
|
@@ -61,46 +64,46 @@ const j = {
|
|
|
61
64
|
"leave-from-class": "opacity-100",
|
|
62
65
|
"leave-to-class": "opacity-0"
|
|
63
66
|
}, {
|
|
64
|
-
default:
|
|
65
|
-
|
|
67
|
+
default: N(() => [
|
|
68
|
+
l.value ? (s(), a("div", {
|
|
66
69
|
key: 0,
|
|
67
|
-
class:
|
|
68
|
-
onClick:
|
|
70
|
+
class: d(["fixed inset-0 z-50 flex items-center justify-center bg-[#00000051] p-4", e.backdrop && "backdrop-blur-[2px]"]),
|
|
71
|
+
onClick: k
|
|
69
72
|
}, [
|
|
70
|
-
|
|
71
|
-
class:
|
|
72
|
-
onClick: f[0] || (f[0] =
|
|
73
|
+
n("div", {
|
|
74
|
+
class: d(["modal-body relative w-full rounded border border-border bg-body text-foreground shadow-lg flex flex-col max-h-[85vh] sm:max-h-[90vh]", [e.maxWidth]]),
|
|
75
|
+
onClick: f[0] || (f[0] = b(() => {
|
|
73
76
|
}, ["stop"]))
|
|
74
77
|
}, [
|
|
75
|
-
e.title ? (
|
|
76
|
-
|
|
77
|
-
class:
|
|
78
|
+
e.title ? (s(), a("div", D, [
|
|
79
|
+
n("div", {
|
|
80
|
+
class: d(["flex items-center justify-between bg-muted-light py-1 px-4 rounded-t-md", e.headerClass])
|
|
78
81
|
}, [
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
n("h3", K, g(e.title), 1),
|
|
83
|
+
v(V, {
|
|
81
84
|
rounded: "full",
|
|
82
85
|
size: "sm",
|
|
83
86
|
icon: "lucide:x",
|
|
84
87
|
variant: "ghost",
|
|
85
88
|
class: "hover:bg-gray-250/25!",
|
|
86
|
-
onClick:
|
|
89
|
+
onClick: o
|
|
87
90
|
})
|
|
88
91
|
], 2)
|
|
89
92
|
])) : r("", !0),
|
|
90
|
-
|
|
91
|
-
class:
|
|
93
|
+
n("div", {
|
|
94
|
+
class: d(["flex-1 overflow-y-auto px-4 py-4 min-h-0 shadow-xl", e.bodyClass])
|
|
92
95
|
}, [
|
|
93
|
-
e.description ? (
|
|
94
|
-
e.body ? (
|
|
96
|
+
e.description ? (s(), a("p", M, g(e.description), 1)) : r("", !0),
|
|
97
|
+
e.body ? (s(), h(P(e.body), y({ key: 1 }, { ...e.bodyProps, ...t.$attrs }, { close: o }), null, 16)) : i(t.$slots, "default", {
|
|
95
98
|
key: 2,
|
|
96
|
-
close:
|
|
99
|
+
close: o
|
|
97
100
|
})
|
|
98
101
|
], 2),
|
|
99
|
-
t.$slots.footer ? (
|
|
102
|
+
t.$slots.footer ? (s(), a("div", {
|
|
100
103
|
key: 1,
|
|
101
|
-
class:
|
|
104
|
+
class: d([e.footerClass, "flex-none flex items-center px-4 py-2.5 border-t rounded-b-xl"])
|
|
102
105
|
}, [
|
|
103
|
-
i(t.$slots, "footer", { close:
|
|
106
|
+
i(t.$slots, "footer", { close: o })
|
|
104
107
|
], 2)) : r("", !0)
|
|
105
108
|
], 2)
|
|
106
109
|
], 2)) : r("", !0)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SidePanel.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-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0276644a"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as S, ref as E, watch as m, onUnmounted as N, computed as y, openBlock as o, createElementBlock as r, Fragment as P, createElementVNode as u, mergeProps as p, withModifiers as V, renderSlot as i, createCommentVNode as s, createBlock as c, Teleport as D, createVNode as v, Transition as b, withCtx as h, normalizeClass as g, toDisplayString as k, resolveDynamicComponent as K } from "vue";
|
|
2
2
|
import T from "./Button.vue.js";
|
|
3
3
|
import { useKeyStroke as j } from "../composables/useKeyStroke.js";
|
|
4
4
|
const F = {
|
|
@@ -10,7 +10,8 @@ const F = {
|
|
|
10
10
|
}, U = { class: "flex-1 overflow-y-auto px-6 py-4" }, q = {
|
|
11
11
|
key: 1,
|
|
12
12
|
class: "flex-none px-6 py-4 border-t border-border bg-muted-light"
|
|
13
|
-
}, J = /* @__PURE__ */
|
|
13
|
+
}, J = /* @__PURE__ */ S({
|
|
14
|
+
inheritAttrs: !1,
|
|
14
15
|
__name: "SidePanel",
|
|
15
16
|
props: {
|
|
16
17
|
show: { type: Boolean, default: !1 },
|
|
@@ -28,43 +29,43 @@ const F = {
|
|
|
28
29
|
bodyProps: {}
|
|
29
30
|
},
|
|
30
31
|
emits: ["close", "update:show", "onOpen", "onAfterOpen", "onAfterClose"],
|
|
31
|
-
setup(
|
|
32
|
-
const l =
|
|
33
|
-
|
|
32
|
+
setup(t, { emit: w }) {
|
|
33
|
+
const l = t, f = w, n = E(l.show);
|
|
34
|
+
m(
|
|
34
35
|
() => l.show,
|
|
35
|
-
(
|
|
36
|
-
n.value =
|
|
36
|
+
(e) => {
|
|
37
|
+
n.value = e, e && f("onOpen");
|
|
37
38
|
}
|
|
38
39
|
);
|
|
39
|
-
const
|
|
40
|
+
const C = () => {
|
|
40
41
|
n.value = !0;
|
|
41
42
|
}, a = () => {
|
|
42
|
-
n.value = !1,
|
|
43
|
-
},
|
|
43
|
+
n.value = !1, f("update:show", !1), f("close");
|
|
44
|
+
}, x = () => {
|
|
44
45
|
l.closeOutside && a();
|
|
45
|
-
}, { onKeyStroke:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}),
|
|
46
|
+
}, { onKeyStroke: $ } = j();
|
|
47
|
+
$("Escape", a), m(n, (e) => {
|
|
48
|
+
e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "";
|
|
49
|
+
}), N(() => {
|
|
49
50
|
document.body.style.overflow = "";
|
|
50
51
|
});
|
|
51
|
-
const
|
|
52
|
+
const B = {
|
|
52
53
|
sm: "max-w-sm",
|
|
53
54
|
md: "max-w-md",
|
|
54
55
|
lg: "max-w-lg",
|
|
55
56
|
xl: "max-w-xl",
|
|
56
57
|
full: "max-w-full"
|
|
57
|
-
},
|
|
58
|
-
return (
|
|
59
|
-
u("span", {
|
|
60
|
-
onClick:
|
|
61
|
-
class:
|
|
62
|
-
}, [
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
}, z = y(() => l.position === "left" ? "left-0" : "right-0"), A = y(() => l.position === "left" ? "slide-left" : "slide-right");
|
|
59
|
+
return (e, d) => (o(), r(P, null, [
|
|
60
|
+
u("span", p({
|
|
61
|
+
onClick: V(C, ["stop"]),
|
|
62
|
+
class: `${t.triggerClass}`
|
|
63
|
+
}, e.$attrs), [
|
|
64
|
+
i(e.$slots, "trigger", {}, () => [
|
|
65
|
+
t.body ? i(e.$slots, "default", { key: 0 }, void 0, !0) : s("", !0)
|
|
65
66
|
], !0)
|
|
66
|
-
],
|
|
67
|
-
(o(),
|
|
67
|
+
], 16),
|
|
68
|
+
(o(), c(D, { to: "body" }, [
|
|
68
69
|
v(b, {
|
|
69
70
|
"enter-active-class": "transition-opacity duration-300 ease-out",
|
|
70
71
|
"enter-from-class": "opacity-0",
|
|
@@ -74,32 +75,32 @@ const F = {
|
|
|
74
75
|
"leave-to-class": "opacity-0"
|
|
75
76
|
}, {
|
|
76
77
|
default: h(() => [
|
|
77
|
-
n.value ? (o(),
|
|
78
|
+
n.value ? (o(), r("div", {
|
|
78
79
|
key: 0,
|
|
79
|
-
class:
|
|
80
|
-
onClick:
|
|
80
|
+
class: g(["fixed inset-0 z-50 bg-[#00000033]", [t.overlayClass, { "backdrop-blur-[2px]": t.backdrop }]]),
|
|
81
|
+
onClick: x
|
|
81
82
|
}, null, 2)) : s("", !0)
|
|
82
83
|
]),
|
|
83
84
|
_: 1
|
|
84
85
|
}),
|
|
85
86
|
v(b, {
|
|
86
|
-
name:
|
|
87
|
-
onAfterEnter: d[0] || (d[0] = (O) =>
|
|
88
|
-
onAfterLeave: d[1] || (d[1] = (O) =>
|
|
87
|
+
name: A.value,
|
|
88
|
+
onAfterEnter: d[0] || (d[0] = (O) => e.$emit("onAfterOpen")),
|
|
89
|
+
onAfterLeave: d[1] || (d[1] = (O) => e.$emit("onAfterClose"))
|
|
89
90
|
}, {
|
|
90
91
|
default: h(() => [
|
|
91
|
-
n.value ? (o(),
|
|
92
|
+
n.value ? (o(), r("div", {
|
|
92
93
|
key: 0,
|
|
93
|
-
class:
|
|
94
|
+
class: g(["sidepanel-body fixed inset-y-0 z-50 flex flex-col bg-body shadow-sm border transition-transform duration-300 ease-in-out w-full", [B[t.size], z.value, l.class]])
|
|
94
95
|
}, [
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
t.title || e.$slots.header ? (o(), r("div", F, [
|
|
97
|
+
i(e.$slots, "header", {}, () => [
|
|
97
98
|
u("div", null, [
|
|
98
|
-
u("h3", L,
|
|
99
|
-
|
|
99
|
+
u("h3", L, k(t.title), 1),
|
|
100
|
+
t.description ? (o(), r("p", M, k(t.description), 1)) : s("", !0)
|
|
100
101
|
])
|
|
101
102
|
], !0),
|
|
102
|
-
|
|
103
|
+
t.hideCloseButton ? s("", !0) : (o(), c(T, {
|
|
103
104
|
key: 0,
|
|
104
105
|
rounded: "full",
|
|
105
106
|
size: "sm",
|
|
@@ -110,13 +111,13 @@ const F = {
|
|
|
110
111
|
}))
|
|
111
112
|
])) : s("", !0),
|
|
112
113
|
u("div", U, [
|
|
113
|
-
|
|
114
|
+
t.body ? (o(), c(K(t.body), p({ key: 0 }, { ...t.bodyProps, ...e.$attrs }, { close: a }), null, 16)) : i(e.$slots, "default", {
|
|
114
115
|
key: 1,
|
|
115
116
|
close: a
|
|
116
117
|
}, void 0, !0)
|
|
117
118
|
]),
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
e.$slots.footer ? (o(), r("div", q, [
|
|
120
|
+
i(e.$slots, "footer", { close: a }, void 0, !0)
|
|
120
121
|
])) : s("", !0)
|
|
121
122
|
], 2)) : s("", !0)
|
|
122
123
|
]),
|
package/components/Slider.vue.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as E, ref as k, watch as I, computed as r, openBlock as i, createElementBlock as v, normalizeClass as s, createBlock as N, createCommentVNode as f, toDisplayString as V, createElementVNode as b, normalizeStyle as y, withDirectives as R, vModelText as F } from "vue";
|
|
2
2
|
import H from "./Icon.vue.js";
|
|
3
|
-
const
|
|
3
|
+
const U = {
|
|
4
4
|
key: 1,
|
|
5
5
|
class: "text-sm font-medium whitespace-nowrap cursor-pointer"
|
|
6
|
-
},
|
|
6
|
+
}, j = ["min", "max", "step", "disabled"], G = /* @__PURE__ */ E({
|
|
7
7
|
__name: "Slider",
|
|
8
8
|
props: {
|
|
9
9
|
min: { default: 0 },
|
|
@@ -20,39 +20,39 @@ const R = {
|
|
|
20
20
|
},
|
|
21
21
|
emits: ["update:modelValue", "change", "iconClick"],
|
|
22
22
|
setup(t, { emit: C }) {
|
|
23
|
-
const l = t, d = C,
|
|
24
|
-
|
|
23
|
+
const l = t, d = C, u = k(!1), g = k(!1), o = k(l.modelValue);
|
|
24
|
+
I(
|
|
25
25
|
() => l.modelValue,
|
|
26
|
-
(
|
|
27
|
-
|
|
26
|
+
(n) => {
|
|
27
|
+
o.value = n;
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
|
-
const
|
|
31
|
-
if (
|
|
32
|
-
const
|
|
30
|
+
const p = r(() => l.centerOrigin !== void 0 ? l.centerOrigin : l.min < 0 && l.max > 0), x = r(() => l.max - l.min), h = r(() => (o.value - l.min) / x.value * 100), w = r(() => (0 - l.min) / x.value * 100), c = (n) => `calc(${n}% + (8px - ${n * 0.16}px))`, $ = r(() => {
|
|
31
|
+
if (p.value) {
|
|
32
|
+
const n = Math.min(h.value, w.value), e = Math.max(h.value, w.value), a = c(n), T = c(e);
|
|
33
33
|
return {
|
|
34
|
-
left:
|
|
35
|
-
width: `calc(${
|
|
34
|
+
left: a,
|
|
35
|
+
width: `calc(${T} - ${a})`
|
|
36
36
|
};
|
|
37
37
|
} else
|
|
38
38
|
return {
|
|
39
39
|
left: "0%",
|
|
40
|
-
width: c(
|
|
40
|
+
width: c(h.value)
|
|
41
41
|
};
|
|
42
|
-
}), z = o(() => ({
|
|
43
|
-
left: c(
|
|
44
|
-
})),
|
|
45
|
-
d("update:modelValue",
|
|
46
|
-
},
|
|
47
|
-
d("change",
|
|
48
|
-
},
|
|
42
|
+
}), z = r(() => p.value ? o.value < 0 ? "rounded-r-none" : o.value > 0 ? "rounded-l-none" : "" : ""), M = r(() => ({
|
|
43
|
+
left: c(h.value)
|
|
44
|
+
})), B = () => {
|
|
45
|
+
d("update:modelValue", o.value);
|
|
46
|
+
}, S = () => {
|
|
47
|
+
d("change", o.value), u.value = !1;
|
|
48
|
+
}, D = r(() => Math.abs(l.modelValue) > 1e-3), P = () => {
|
|
49
49
|
if (l.disabled) return;
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
const
|
|
54
|
-
return
|
|
55
|
-
}), m =
|
|
50
|
+
const n = p.value ? 0 : l.min;
|
|
51
|
+
o.value = n, d("update:modelValue", n), d("change", n);
|
|
52
|
+
}, O = r(() => {
|
|
53
|
+
const n = l.step.toString().split(".")[1]?.length || 0;
|
|
54
|
+
return o.value.toFixed(n);
|
|
55
|
+
}), m = r(() => ({
|
|
56
56
|
xs: {
|
|
57
57
|
track: "h-0.5",
|
|
58
58
|
thumb: "w-2.5 h-2.5",
|
|
@@ -78,67 +78,75 @@ const R = {
|
|
|
78
78
|
tick: "h-4"
|
|
79
79
|
}
|
|
80
80
|
})[l.size]);
|
|
81
|
-
return (
|
|
82
|
-
class:
|
|
83
|
-
onMouseenter: e[6] || (e[6] = (
|
|
84
|
-
onMouseleave: e[7] || (e[7] = (
|
|
81
|
+
return (n, e) => (i(), v("div", {
|
|
82
|
+
class: s(["slider-wrapper flex items-center gap-3 w-full select-none touch-none", { "opacity-50 pointer-events-none": t.disabled }]),
|
|
83
|
+
onMouseenter: e[6] || (e[6] = (a) => g.value = !0),
|
|
84
|
+
onMouseleave: e[7] || (e[7] = (a) => g.value = !1)
|
|
85
85
|
}, [
|
|
86
86
|
t.label || t.icon ? (i(), v("div", {
|
|
87
87
|
key: 0,
|
|
88
|
-
class:
|
|
89
|
-
onClick: e[0] || (e[0] = (
|
|
88
|
+
class: s(["flex items-center gap-2 min-w-fit cursor-pointer transition-colors", [{ "text-primary": u.value || g.value }, t.labelClass || "text-muted-foreground"]]),
|
|
89
|
+
onClick: e[0] || (e[0] = (a) => d("iconClick")),
|
|
90
90
|
title: "Double-click to reset"
|
|
91
91
|
}, [
|
|
92
|
-
t.icon ? (i(),
|
|
92
|
+
t.icon ? (i(), N(H, {
|
|
93
93
|
key: 0,
|
|
94
94
|
icon: t.icon,
|
|
95
95
|
class: "h-4 w-4"
|
|
96
96
|
}, null, 8, ["icon"])) : f("", !0),
|
|
97
|
-
t.label ? (i(), v("label",
|
|
97
|
+
t.label ? (i(), v("label", U, V(t.label), 1)) : f("", !0)
|
|
98
98
|
], 2)) : f("", !0),
|
|
99
99
|
b("div", {
|
|
100
|
-
class:
|
|
100
|
+
class: s(["relative flex-1 flex items-center group", m.value.wrapper])
|
|
101
101
|
}, [
|
|
102
102
|
b("div", {
|
|
103
|
-
class:
|
|
103
|
+
class: s(["absolute w-full bg-secondary rounded-full overflow-hidden", m.value.track])
|
|
104
104
|
}, null, 2),
|
|
105
|
-
|
|
105
|
+
p.value ? (i(), v("div", {
|
|
106
106
|
key: 0,
|
|
107
|
-
class:
|
|
107
|
+
class: s(["absolute top-1/2 w-0.5 bg-muted-foreground/30 rounded transform -translate-y-1/2 z-0", m.value.tick]),
|
|
108
108
|
style: y({ left: c(w.value) })
|
|
109
109
|
}, null, 6)) : f("", !0),
|
|
110
110
|
b("div", {
|
|
111
|
-
class:
|
|
111
|
+
class: s(["absolute bg-primary rounded-full will-change-transform", [
|
|
112
|
+
{
|
|
113
|
+
"bg-muted-foreground": t.disabled,
|
|
114
|
+
"transition-all duration-75 ease-out": !u.value,
|
|
115
|
+
"duration-0": u.value
|
|
116
|
+
},
|
|
117
|
+
m.value.track,
|
|
118
|
+
z.value
|
|
119
|
+
]]),
|
|
112
120
|
style: y($.value)
|
|
113
121
|
}, null, 6),
|
|
114
122
|
b("div", {
|
|
115
|
-
class:
|
|
123
|
+
class: s(["absolute top-1/2 bg-background border border-border shadow-sm rounded-full transform -translate-y-1/2 -translate-x-1/2 pointer-events-none transition-transform duration-100 ease-out z-10", [
|
|
116
124
|
{
|
|
117
|
-
"border-primary shadow-md scale-110":
|
|
118
|
-
"border-primary":
|
|
125
|
+
"border-primary shadow-md scale-110": u.value,
|
|
126
|
+
"border-primary": D.value
|
|
119
127
|
},
|
|
120
128
|
m.value.thumb
|
|
121
129
|
]]),
|
|
122
|
-
style: y(
|
|
130
|
+
style: y(M.value)
|
|
123
131
|
}, null, 6),
|
|
124
|
-
|
|
132
|
+
R(b("input", {
|
|
125
133
|
type: "range",
|
|
126
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
134
|
+
"onUpdate:modelValue": e[1] || (e[1] = (a) => o.value = a),
|
|
127
135
|
min: t.min,
|
|
128
136
|
max: t.max,
|
|
129
137
|
step: t.step,
|
|
130
138
|
disabled: t.disabled,
|
|
131
|
-
onInput:
|
|
132
|
-
onChange:
|
|
133
|
-
onMousedown: e[2] || (e[2] = (
|
|
134
|
-
onTouchstart: e[3] || (e[3] = (
|
|
135
|
-
onMouseup: e[4] || (e[4] = (
|
|
136
|
-
onTouchend: e[5] || (e[5] = (
|
|
139
|
+
onInput: B,
|
|
140
|
+
onChange: S,
|
|
141
|
+
onMousedown: e[2] || (e[2] = (a) => u.value = !0),
|
|
142
|
+
onTouchstart: e[3] || (e[3] = (a) => u.value = !0),
|
|
143
|
+
onMouseup: e[4] || (e[4] = (a) => u.value = !1),
|
|
144
|
+
onTouchend: e[5] || (e[5] = (a) => u.value = !1),
|
|
137
145
|
class: "slider-input absolute inset-0 w-full h-full opacity-0 cursor-pointer z-20 m-0 p-0"
|
|
138
|
-
}, null, 40,
|
|
146
|
+
}, null, 40, j), [
|
|
139
147
|
[
|
|
140
148
|
F,
|
|
141
|
-
|
|
149
|
+
o.value,
|
|
142
150
|
void 0,
|
|
143
151
|
{ number: !0 }
|
|
144
152
|
]
|
|
@@ -146,12 +154,12 @@ const R = {
|
|
|
146
154
|
], 2),
|
|
147
155
|
t.showValue ? (i(), v("span", {
|
|
148
156
|
key: 1,
|
|
149
|
-
onDblclick:
|
|
157
|
+
onDblclick: P,
|
|
150
158
|
class: "font-mono tabular-nums text-muted-foreground text-right min-w-6 text-sm"
|
|
151
|
-
}, V(
|
|
159
|
+
}, V(O.value), 33)) : f("", !0)
|
|
152
160
|
], 34));
|
|
153
161
|
}
|
|
154
162
|
});
|
|
155
163
|
export {
|
|
156
|
-
|
|
164
|
+
G as default
|
|
157
165
|
};
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -586,5 +586,5 @@ textarea::-webkit-scrollbar-thumb {
|
|
|
586
586
|
}
|
|
587
587
|
|
|
588
588
|
/* --- Vite Generated CSS --- */
|
|
589
|
-
.accordion-enter-active[data-v-aa189e08],.accordion-leave-active[data-v-aa189e08]{transition:height .3s ease-in-out}.attached-group[data-v-8c9add3e]:not(.vertical-group) button{border-radius:0}.attached-group[data-v-8c9add3e] button{position:relative;--radius: .375rem}.attached-group[data-v-8c9add3e] button:focus-visible,.attached-group[data-v-8c9add3e] button:hover{z-index:10}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:not(:first-child){margin-left:-1px}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:first-child{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius);border-top-right-radius:0;border-bottom-right-radius:0}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:not(:first-child):not(:last-child){border-radius:0}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:last-child{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius);border-top-left-radius:0;border-bottom-left-radius:0}.vertical-group[data-v-8c9add3e] button:not(:first-child){margin-top:-1px}.vertical-group[data-v-8c9add3e] button:first-child{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.vertical-group[data-v-8c9add3e] button:not(:first-child):not(:last-child){border-radius:0}.vertical-group[data-v-8c9add3e] button:last-child{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius);border-top-left-radius:0;border-top-right-radius:0}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:not(:first-child):not(.border):before{content:"";position:absolute;left:0;top:0;bottom:0;width:1px;background-color:currentColor;opacity:.15;z-index:5;pointer-events:none}.vertical-group[data-v-8c9add3e] button:not(:first-child):not(.border):before{content:"";position:absolute;top:0;left:0;right:0;height:1px;background-color:currentColor;opacity:.15;z-index:5;pointer-events:none;width:auto}.vertical-group[data-v-8c9add3e] button:not(:first-child):not(.border):before{width:100%}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:not(:first-child):not(.border):before{height:100%}.carousel-wrapper[data-v-655a78c8]{width:100%;position:relative}.IroBox{border-radius:8px!important}table[data-v-45a246be]{table-layout:fixed}table col[data-v-45a246be]:first-child{width:48px!important}table th[data-v-45a246be]:first-child,table td[data-v-45a246be]:first-child{width:48px!important;max-width:48px!important;min-width:48px!important}.form-field-item[data-v-5c98aa0e]{display:flex;flex-direction:column}.form-field-item[data-v-5c98aa0e]:has([role=switch]),.form-field-item[data-v-5c98aa0e]:has([role=checkbox]){flex-direction:row;align-items:center}.form-container[data-v-
|
|
589
|
+
.accordion-enter-active[data-v-aa189e08],.accordion-leave-active[data-v-aa189e08]{transition:height .3s ease-in-out}.attached-group[data-v-8c9add3e]:not(.vertical-group) button{border-radius:0}.attached-group[data-v-8c9add3e] button{position:relative;--radius: .375rem}.attached-group[data-v-8c9add3e] button:focus-visible,.attached-group[data-v-8c9add3e] button:hover{z-index:10}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:not(:first-child){margin-left:-1px}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:first-child{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius);border-top-right-radius:0;border-bottom-right-radius:0}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:not(:first-child):not(:last-child){border-radius:0}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:last-child{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius);border-top-left-radius:0;border-bottom-left-radius:0}.vertical-group[data-v-8c9add3e] button:not(:first-child){margin-top:-1px}.vertical-group[data-v-8c9add3e] button:first-child{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.vertical-group[data-v-8c9add3e] button:not(:first-child):not(:last-child){border-radius:0}.vertical-group[data-v-8c9add3e] button:last-child{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius);border-top-left-radius:0;border-top-right-radius:0}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:not(:first-child):not(.border):before{content:"";position:absolute;left:0;top:0;bottom:0;width:1px;background-color:currentColor;opacity:.15;z-index:5;pointer-events:none}.vertical-group[data-v-8c9add3e] button:not(:first-child):not(.border):before{content:"";position:absolute;top:0;left:0;right:0;height:1px;background-color:currentColor;opacity:.15;z-index:5;pointer-events:none;width:auto}.vertical-group[data-v-8c9add3e] button:not(:first-child):not(.border):before{width:100%}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:not(:first-child):not(.border):before{height:100%}.carousel-wrapper[data-v-655a78c8]{width:100%;position:relative}.IroBox{border-radius:8px!important}table[data-v-45a246be]{table-layout:fixed}table col[data-v-45a246be]:first-child{width:48px!important}table th[data-v-45a246be]:first-child,table td[data-v-45a246be]:first-child{width:48px!important;max-width:48px!important;min-width:48px!important}.form-field-item[data-v-5c98aa0e]{display:flex;flex-direction:column}.form-field-item[data-v-5c98aa0e]:has([role=switch]),.form-field-item[data-v-5c98aa0e]:has([role=checkbox]){flex-direction:row;align-items:center}.form-container[data-v-d3940de2]{width:100%}.custom-fields-table[data-v-79b7dd60] .form-field-item{margin-bottom:0!important;height:100%}.custom-fields-table[data-v-79b7dd60] input,.custom-fields-table[data-v-79b7dd60] textarea{padding-left:1em;padding-right:.5em}.custom-fields-table[data-v-79b7dd60] input,.custom-fields-table[data-v-79b7dd60] textarea,.custom-fields-table[data-v-79b7dd60] select,.custom-fields-table[data-v-79b7dd60] .input-wrapper,.custom-fields-table[data-v-79b7dd60] .tooltip-trigger button{border:none!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;height:100%!important;min-height:40px}.custom-fields-table[data-v-79b7dd60] .tooltip-trigger button{justify-content:space-between!important}.custom-fields-table[data-v-79b7dd60] input:focus,.custom-fields-table[data-v-79b7dd60] textarea:focus,.custom-fields-table[data-v-79b7dd60] select:focus,.custom-fields-table[data-v-79b7dd60] .input-wrapper:focus-within{background-color:hsla(var(--primary) / .03)!important;box-shadow:inset 0 0 0 2px hsla(var(--primary) / .1)!important}.custom-fields-table[data-v-79b7dd60] .w-full{width:100%;height:100%}.list-move[data-v-79b7dd60],.list-enter-active[data-v-79b7dd60],.list-leave-active[data-v-79b7dd60]{transition:all .3s cubic-bezier(.16,1,.3,1)}.list-enter-from[data-v-79b7dd60],.list-leave-to[data-v-79b7dd60]{opacity:0;transform:translateY(-10px)}.list-leave-active[data-v-79b7dd60]{position:absolute;width:100%;z-index:0}.heatmap-container[data-v-00476f00]{width:100%;height:100%;display:flex;flex-direction:column;min-height:0}.heatmap-wrapper[data-v-00476f00]{width:100%;height:100%;overflow:auto;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box;position:relative}.heatmap-grid[data-v-00476f00]{width:fit-content;height:fit-content;transition:all .2s ease-in-out}.heatmap-cell[data-v-00476f00]{aspect-ratio:1 / 1;border-radius:2px;transition:all .15s ease-in-out;border:1px solid transparent;box-sizing:border-box}.heatmap-cell-interactive[data-v-00476f00]{cursor:pointer}.heatmap-cell-interactive[data-v-00476f00]:hover{transform:scale(1.1);border-color:var(--border);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;z-index:10;position:relative}.heatmap-cell-empty[data-v-00476f00]{opacity:.6}.heatmap-cell-hovered[data-v-00476f00]{outline:2px solid var(--primary);outline-offset:1px}.heatmap-cell-label[data-v-00476f00]{font-size:8px;font-weight:500;color:var(--foreground);opacity:.8;display:flex;align-items:center;justify-content:center;height:100%;width:100%;pointer-events:none}.heatmap-legend[data-v-00476f00]{display:flex;align-items:center;gap:.5rem;margin-top:1rem;font-size:.75rem;color:var(--muted-foreground);flex-shrink:0}.heatmap-legend-label[data-v-00476f00]{font-weight:500}.heatmap-legend-colors[data-v-00476f00]{display:flex;gap:.125rem}.heatmap-legend-item[data-v-00476f00]{width:.75rem;height:.75rem;border-radius:.375rem;border:1px solid var(--border)}@media(max-width:640px){.heatmap-wrapper[data-v-00476f00]{padding:12px}.heatmap-cell[data-v-00476f00]{border-radius:2px}.heatmap-cell-label[data-v-00476f00]{font-size:7px}}@media(min-width:641px)and (max-width:1023px){.heatmap-wrapper[data-v-00476f00]{padding:14px}.heatmap-cell[data-v-00476f00]{border-radius:2px}}@media(min-width:1024px){.heatmap-wrapper[data-v-00476f00]{padding:16px}.heatmap-cell[data-v-00476f00]{border-radius:3px}}.masonry-item[data-v-c29d0159]{content-visibility:auto;contain-intrinsic-size:1px 200px}.slide-right-enter-active[data-v-0276644a],.slide-right-leave-active[data-v-0276644a],.slide-left-enter-active[data-v-0276644a],.slide-left-leave-active[data-v-0276644a]{transition:transform .3s ease-in-out}.slide-right-enter-from[data-v-0276644a],.slide-right-leave-to[data-v-0276644a]{transform:translate(100%)}.slide-left-enter-from[data-v-0276644a],.slide-left-leave-to[data-v-0276644a]{transform:translate(-100%)}.sidebar-manu-item .tooltip-trigger{width:100%!important}.sidebar-menu-tooltip{margin-left:4px!important}[dir=rtl] .sidebar-menu-tooltip{margin-right:4px!important}.first-toast-enter-active[data-v-7a1ec14c]{animation:first-toast-in-7a1ec14c .45s cubic-bezier(.23,1,.32,1) forwards}.first-toast-leave-active[data-v-7a1ec14c]{transition:all .25s ease-in}.first-toast-leave-to[data-v-7a1ec14c]{opacity:0;transform:scale(.98)}@keyframes first-toast-in-7a1ec14c{0%{opacity:var(--entrance-opacity, .6);transform:translateY(var(--entrance-offset, 25px)) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.stack-toast-enter-active[data-v-7a1ec14c],.stack-toast-leave-active[data-v-7a1ec14c]{transition:all .3s cubic-bezier(.16,1,.3,1)}.stack-toast-enter-from[data-v-7a1ec14c]{opacity:0;transform:scale(.95) translateY(10px)}.stack-toast-leave-to[data-v-7a1ec14c]{opacity:0;transform:scale(.95)}.stack-toast-move[data-v-7a1ec14c]{transition:transform .4s cubic-bezier(.16,1,.3,1)}
|
|
590
590
|
|