veloce-vue 0.12.0 → 0.14.0
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/README.md +40 -7
- package/components/button/Index.vue.d.ts +5 -5
- package/components/button/props.d.ts +2 -2
- package/components/markdown-block/Index.vue.d.ts +12 -0
- package/components/select/Index.vue.d.ts +14 -5
- package/components/select/props.d.ts +6 -2
- package/components/separator/Index.vue.d.ts +2 -2
- package/components/separator/props.d.ts +1 -1
- package/components/toggle/Index.vue.d.ts +36 -0
- package/components/toggle/props.d.ts +11 -0
- package/components/toggle/stories.d.ts +11 -0
- package/index.cjs +1 -1
- package/index.cjs.map +1 -1
- package/index.js +473 -326
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/pages/Home/stories.d.ts +1 -30
- package/pages/config/stories.d.ts +5 -1
- package/veloce-vue.css +1 -1
package/index.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as x, ref as _, resolveComponent as G, createElementBlock as i, openBlock as r, Fragment as E, renderList as F, createElementVNode as a, createCommentVNode as y, createVNode as S, toDisplayString as $, normalizeClass as h, renderSlot as C, createTextVNode as K, computed as M, createBlock as j, resolveDynamicComponent as ee, mergeModels as R, useModel as W, withDirectives as Q, vModelDynamic as te, watch as P, onMounted as oe, onUnmounted as se, normalizeStyle as V, getCurrentScope as le, onScopeDispose as ne, toValue as L, unref as re, useTemplateRef as ae, vModelText as ie } from "vue";
|
|
2
|
+
const ue = { class: "w-full divide-y divide-gray-200 overflow-hidden rounded-xl border border-slate-200 bg-white shadow" }, de = ["onClick"], ce = { class: "title" }, pe = {
|
|
3
3
|
key: 0,
|
|
4
|
-
class: "p-3
|
|
5
|
-
},
|
|
4
|
+
class: "text-text p-3"
|
|
5
|
+
}, fe = {
|
|
6
6
|
key: 1,
|
|
7
7
|
class: "px-3 py-6 text-center text-gray-500"
|
|
8
|
-
},
|
|
8
|
+
}, wt = /* @__PURE__ */ x({
|
|
9
9
|
__name: "Index",
|
|
10
10
|
props: {
|
|
11
11
|
items: { type: Array, required: !0 }
|
|
12
12
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const e =
|
|
15
|
-
return (t,
|
|
16
|
-
const
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class:
|
|
21
|
-
onClick: (
|
|
13
|
+
setup(o) {
|
|
14
|
+
const e = _(null);
|
|
15
|
+
return (t, l) => {
|
|
16
|
+
const n = G("Icon");
|
|
17
|
+
return r(), i("div", ue, [
|
|
18
|
+
o.items.length ? (r(!0), i(E, { key: 0 }, F(o.items, (s, u) => (r(), i("div", { key: u }, [
|
|
19
|
+
a("div", {
|
|
20
|
+
class: "text-text relative flex cursor-pointer justify-between gap-4 p-3 font-medium duration-100 hover:bg-gray-100",
|
|
21
|
+
onClick: (d) => e.value = e.value === u ? null : u
|
|
22
22
|
}, [
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
a("span", ce, $(s.title), 1),
|
|
24
|
+
S(n, {
|
|
25
25
|
icon: "chevron-down",
|
|
26
|
-
class:
|
|
26
|
+
class: h([{ "rotate-180 ": e.value === u }, "icon text-[1.4rem] duration-200"])
|
|
27
27
|
}, null, 8, ["class"])
|
|
28
|
-
],
|
|
29
|
-
e.value ===
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
], 8, de),
|
|
29
|
+
e.value === u ? (r(), i("div", pe, [
|
|
30
|
+
s.slot ? C(t.$slots, s.slot, { key: 0 }) : (r(), i(E, { key: 1 }, [
|
|
31
|
+
K($(s.content), 1)
|
|
32
32
|
], 64))
|
|
33
|
-
])) :
|
|
34
|
-
]))), 128)) : (
|
|
33
|
+
])) : y("", !0)
|
|
34
|
+
]))), 128)) : (r(), i("div", fe, "No items to show"))
|
|
35
35
|
]);
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
}),
|
|
38
|
+
}), me = {
|
|
39
39
|
label: { type: String, default: "" },
|
|
40
40
|
loading: { type: Boolean, default: !1 },
|
|
41
41
|
disabled: { type: Boolean, default: !1 },
|
|
42
42
|
variant: {
|
|
43
43
|
type: String,
|
|
44
44
|
default: "solid",
|
|
45
|
-
options: ["outlined", "text", "ghost", "solid"]
|
|
45
|
+
options: ["outlined", "text", "ghost", "solid", "gray"]
|
|
46
46
|
},
|
|
47
47
|
icon: { type: String, default: "" },
|
|
48
48
|
iconClass: { type: String, default: "" },
|
|
@@ -52,11 +52,11 @@ const R = { class: "w-full divide-y divide-gray-200 rounded border border-slate-
|
|
|
52
52
|
options: ["left", "right"]
|
|
53
53
|
},
|
|
54
54
|
rounded: { type: Boolean, default: !1 }
|
|
55
|
-
},
|
|
55
|
+
}, ve = ["disabled"], O = /* @__PURE__ */ x({
|
|
56
56
|
__name: "Index",
|
|
57
|
-
props:
|
|
58
|
-
setup(
|
|
59
|
-
const e =
|
|
57
|
+
props: me,
|
|
58
|
+
setup(o) {
|
|
59
|
+
const e = o, t = M(() => {
|
|
60
60
|
switch (e.variant) {
|
|
61
61
|
case "outlined":
|
|
62
62
|
return "!border-primary text-primary bg-transparent hover:bg-primary disabled:hover:bg-transparent disabled:hover:text-primary hover:text-white";
|
|
@@ -64,96 +64,99 @@ const R = { class: "w-full divide-y divide-gray-200 rounded border border-slate-
|
|
|
64
64
|
return "bg-transparent text-primary hover:bg-gray-200 disabled:hover:bg-transparent disabled:hover:text-primary";
|
|
65
65
|
case "ghost":
|
|
66
66
|
return "text-primary bg-gray-100 hover:bg-gray-200 disabled:hover:bg-transparent disabled:hover:text-primary";
|
|
67
|
+
case "gray":
|
|
68
|
+
return "bg-gray-100 text-gray-700 hover:bg-gray-200 disabled:hover:bg-gray-100 disabled:hover:text-gray-900";
|
|
67
69
|
default:
|
|
68
70
|
return "bg-primary text-white hover:bg-primary/75 disabled:hover:bg-primary disabled:hover:text-white";
|
|
69
71
|
}
|
|
70
72
|
});
|
|
71
|
-
return (
|
|
72
|
-
const
|
|
73
|
-
return
|
|
73
|
+
return (l, n) => {
|
|
74
|
+
const s = G("Icon");
|
|
75
|
+
return r(), i("button", {
|
|
74
76
|
type: "button",
|
|
75
77
|
disabled: e.disabled || e.loading,
|
|
76
|
-
class:
|
|
78
|
+
class: h([
|
|
77
79
|
t.value,
|
|
78
80
|
{ "rounded-full": e.rounded },
|
|
79
81
|
"flex cursor-pointer items-center justify-center gap-2 rounded border border-transparent px-3 py-2 transition duration-200 disabled:cursor-not-allowed disabled:opacity-75 "
|
|
80
82
|
])
|
|
81
83
|
}, [
|
|
82
|
-
|
|
83
|
-
class:
|
|
84
|
+
a("div", {
|
|
85
|
+
class: h([{ "justify-center": !e.icon }, "flex w-full items-center justify-between gap-2"])
|
|
84
86
|
}, [
|
|
85
|
-
e.label ? (
|
|
87
|
+
e.label ? (r(), i("span", {
|
|
86
88
|
key: 0,
|
|
87
|
-
class:
|
|
88
|
-
},
|
|
89
|
-
e.icon && !e.loading ? (
|
|
89
|
+
class: h({ "order-2": e.iconPosition === "left" })
|
|
90
|
+
}, $(e.label), 3)) : y("", !0),
|
|
91
|
+
e.icon && !e.loading ? (r(), j(s, {
|
|
90
92
|
key: 1,
|
|
91
93
|
icon: e.icon,
|
|
92
|
-
class:
|
|
93
|
-
}, null, 8, ["icon", "class"])) :
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
class: h([e.iconClass, "duration-200 size-5 text-current"])
|
|
95
|
+
}, null, 8, ["icon", "class"])) : y("", !0),
|
|
96
|
+
e.loading ? (r(), j(s, {
|
|
97
|
+
key: 2,
|
|
98
|
+
icon: "loading",
|
|
99
|
+
class: "duration-200 size-5 text-current"
|
|
100
|
+
})) : y("", !0)
|
|
101
|
+
], 2)
|
|
102
|
+
], 10, ve);
|
|
100
103
|
};
|
|
101
104
|
}
|
|
102
|
-
}),
|
|
105
|
+
}), he = {
|
|
103
106
|
label: { type: String, default: "" },
|
|
104
107
|
labelClass: { type: String, default: "" },
|
|
105
108
|
checkboxClass: { type: String, default: "" }
|
|
106
|
-
},
|
|
107
|
-
const t =
|
|
108
|
-
for (const [
|
|
109
|
-
t[
|
|
109
|
+
}, T = (o, e) => {
|
|
110
|
+
const t = o.__vccOpts || o;
|
|
111
|
+
for (const [l, n] of e)
|
|
112
|
+
t[l] = n;
|
|
110
113
|
return t;
|
|
111
|
-
},
|
|
114
|
+
}, ye = {}, ge = {
|
|
112
115
|
xmlns: "http://www.w3.org/2000/svg",
|
|
113
116
|
width: "24",
|
|
114
117
|
height: "24",
|
|
115
118
|
viewBox: "0 0 24 24"
|
|
116
119
|
};
|
|
117
|
-
function
|
|
118
|
-
return
|
|
119
|
-
|
|
120
|
+
function be(o, e) {
|
|
121
|
+
return r(), i("svg", ge, [...e[0] || (e[0] = [
|
|
122
|
+
a("path", {
|
|
120
123
|
fill: "currentColor",
|
|
121
124
|
d: "m9.55 15.15l8.475-8.475q.3-.3.7-.3t.7.3t.3.713t-.3.712l-9.175 9.2q-.3.3-.7.3t-.7-.3L4.55 13q-.3-.3-.288-.712t.313-.713t.713-.3t.712.3z"
|
|
122
125
|
}, null, -1)
|
|
123
126
|
])]);
|
|
124
127
|
}
|
|
125
|
-
const
|
|
128
|
+
const we = /* @__PURE__ */ T(ye, [["render", be]]), xe = {}, ke = {
|
|
126
129
|
xmlns: "http://www.w3.org/2000/svg",
|
|
127
130
|
width: "24",
|
|
128
131
|
height: "24",
|
|
129
132
|
viewBox: "0 0 24 24"
|
|
130
133
|
};
|
|
131
|
-
function
|
|
132
|
-
return
|
|
133
|
-
|
|
134
|
+
function $e(o, e) {
|
|
135
|
+
return r(), i("svg", ke, [...e[0] || (e[0] = [
|
|
136
|
+
a("path", {
|
|
134
137
|
fill: "currentColor",
|
|
135
138
|
d: "m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z"
|
|
136
139
|
}, null, -1)
|
|
137
140
|
])]);
|
|
138
141
|
}
|
|
139
|
-
const
|
|
142
|
+
const _e = /* @__PURE__ */ T(xe, [["render", $e]]), Ce = {}, Se = {
|
|
140
143
|
xmlns: "http://www.w3.org/2000/svg",
|
|
141
144
|
width: "24",
|
|
142
145
|
height: "24",
|
|
143
146
|
viewBox: "0 0 24 24"
|
|
144
147
|
};
|
|
145
|
-
function
|
|
146
|
-
return
|
|
147
|
-
|
|
148
|
+
function Le(o, e) {
|
|
149
|
+
return r(), i("svg", Se, [...e[0] || (e[0] = [
|
|
150
|
+
a("path", {
|
|
148
151
|
fill: "currentColor",
|
|
149
152
|
d: "M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z",
|
|
150
153
|
opacity: "0.25"
|
|
151
154
|
}, null, -1),
|
|
152
|
-
|
|
155
|
+
a("path", {
|
|
153
156
|
fill: "currentColor",
|
|
154
157
|
d: "M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z"
|
|
155
158
|
}, [
|
|
156
|
-
|
|
159
|
+
a("animateTransform", {
|
|
157
160
|
type: "rotate",
|
|
158
161
|
attributeName: "transform",
|
|
159
162
|
dur: "0.75s",
|
|
@@ -163,35 +166,35 @@ function ue(r, e) {
|
|
|
163
166
|
], -1)
|
|
164
167
|
])]);
|
|
165
168
|
}
|
|
166
|
-
const
|
|
169
|
+
const Ee = /* @__PURE__ */ T(Ce, [["render", Le]]), Me = {}, Ie = {
|
|
167
170
|
xmlns: "http://www.w3.org/2000/svg",
|
|
168
171
|
width: "24",
|
|
169
172
|
height: "24",
|
|
170
173
|
viewBox: "-5 -8 24 24"
|
|
171
174
|
};
|
|
172
|
-
function
|
|
173
|
-
return
|
|
174
|
-
|
|
175
|
+
function ze(o, e) {
|
|
176
|
+
return r(), i("svg", Ie, [...e[0] || (e[0] = [
|
|
177
|
+
a("path", {
|
|
175
178
|
fill: "currentColor",
|
|
176
179
|
d: "m7.071 5.314l4.95-4.95a1 1 0 1 1 1.414 1.414L7.778 7.435a1 1 0 0 1-1.414 0L.707 1.778A1 1 0 1 1 2.121.364z"
|
|
177
180
|
}, null, -1)
|
|
178
181
|
])]);
|
|
179
182
|
}
|
|
180
|
-
const
|
|
183
|
+
const Ve = /* @__PURE__ */ T(Me, [["render", ze]]), Ae = {}, Be = {
|
|
181
184
|
xmlns: "http://www.w3.org/2000/svg",
|
|
182
185
|
width: "24",
|
|
183
186
|
height: "24",
|
|
184
187
|
viewBox: "0 0 24 24"
|
|
185
188
|
};
|
|
186
|
-
function
|
|
187
|
-
return
|
|
188
|
-
|
|
189
|
-
|
|
189
|
+
function Oe(o, e) {
|
|
190
|
+
return r(), i("svg", Be, [...e[0] || (e[0] = [
|
|
191
|
+
a("g", { fill: "none" }, [
|
|
192
|
+
a("path", {
|
|
190
193
|
fill: "currentColor",
|
|
191
194
|
"fill-opacity": "0.16",
|
|
192
195
|
d: "M10.575 5.217L3.517 17a1.667 1.667 0 0 0 1.425 2.5h14.116a1.666 1.666 0 0 0 1.425-2.5L13.426 5.217a1.666 1.666 0 0 0-2.85 0"
|
|
193
196
|
}),
|
|
194
|
-
|
|
197
|
+
a("path", {
|
|
195
198
|
stroke: "currentColor",
|
|
196
199
|
"stroke-linecap": "round",
|
|
197
200
|
"stroke-linejoin": "round",
|
|
@@ -202,13 +205,13 @@ function be(r, e) {
|
|
|
202
205
|
], -1)
|
|
203
206
|
])]);
|
|
204
207
|
}
|
|
205
|
-
const
|
|
206
|
-
check:
|
|
207
|
-
close:
|
|
208
|
-
loading:
|
|
209
|
-
"chevron-down":
|
|
210
|
-
alert:
|
|
211
|
-
},
|
|
208
|
+
const Te = /* @__PURE__ */ T(Ae, [["render", Oe]]), U = {
|
|
209
|
+
check: we,
|
|
210
|
+
close: _e,
|
|
211
|
+
loading: Ee,
|
|
212
|
+
"chevron-down": Ve,
|
|
213
|
+
alert: Te
|
|
214
|
+
}, H = /* @__PURE__ */ x({
|
|
212
215
|
__name: "index",
|
|
213
216
|
props: {
|
|
214
217
|
icon: {},
|
|
@@ -216,414 +219,558 @@ const ge = /* @__PURE__ */ S(he, [["render", be]]), T = {
|
|
|
216
219
|
class: {},
|
|
217
220
|
size: {}
|
|
218
221
|
},
|
|
219
|
-
setup(
|
|
220
|
-
const e =
|
|
221
|
-
const
|
|
222
|
-
return
|
|
222
|
+
setup(o) {
|
|
223
|
+
const e = o, t = M(() => e.size ?? 24), l = M(() => {
|
|
224
|
+
const n = e.icon, s = e.fallbackIcon ? e.fallbackIcon : "alert";
|
|
225
|
+
return U[n] ?? U[s];
|
|
223
226
|
});
|
|
224
|
-
return (
|
|
225
|
-
class:
|
|
227
|
+
return (n, s) => (r(), j(ee(l.value), {
|
|
228
|
+
class: h(["shrink-0", e.class]),
|
|
226
229
|
width: t.value,
|
|
227
230
|
height: t.value
|
|
228
231
|
}, null, 8, ["class", "width", "height"]));
|
|
229
232
|
}
|
|
230
|
-
}),
|
|
233
|
+
}), xt = /* @__PURE__ */ x({
|
|
231
234
|
__name: "Index",
|
|
232
|
-
props: /* @__PURE__ */
|
|
235
|
+
props: /* @__PURE__ */ R(he, {
|
|
233
236
|
modelValue: {},
|
|
234
237
|
modelModifiers: {}
|
|
235
238
|
}),
|
|
236
239
|
emits: ["update:modelValue"],
|
|
237
|
-
setup(
|
|
238
|
-
const e =
|
|
239
|
-
return (t,
|
|
240
|
+
setup(o) {
|
|
241
|
+
const e = W(o, "modelValue");
|
|
242
|
+
return (t, l) => (r(), i("div", {
|
|
240
243
|
class: "flex w-fit cursor-pointer gap-2 select-none",
|
|
241
|
-
onClick:
|
|
244
|
+
onClick: l[0] || (l[0] = (n) => e.value = !e.value)
|
|
242
245
|
}, [
|
|
243
|
-
|
|
244
|
-
class:
|
|
246
|
+
a("div", {
|
|
247
|
+
class: h([[{ "bg-primary": e.value }, t.checkboxClass], "border-primary m-0 size-6 rounded-sm border-2 duration-200"])
|
|
245
248
|
}, [
|
|
246
|
-
e.value ? (
|
|
249
|
+
e.value ? (r(), j(H, {
|
|
247
250
|
key: 0,
|
|
248
251
|
icon: "check",
|
|
249
|
-
class:
|
|
250
|
-
}, null, 8, ["class"])) :
|
|
252
|
+
class: h([{ "text-white": e.value }, "size-5"])
|
|
253
|
+
}, null, 8, ["class"])) : y("", !0)
|
|
251
254
|
], 2),
|
|
252
|
-
|
|
253
|
-
class:
|
|
254
|
-
},
|
|
255
|
+
a("div", {
|
|
256
|
+
class: h(t.labelClass)
|
|
257
|
+
}, $(t.label), 3)
|
|
255
258
|
]));
|
|
256
259
|
}
|
|
257
|
-
}),
|
|
260
|
+
}), je = {
|
|
258
261
|
direction: { type: String, default: "bottom", options: ["left", "bottom", "right"] },
|
|
259
262
|
title: { type: String, default: "" },
|
|
260
263
|
description: { type: String, default: "" },
|
|
261
264
|
showFooter: { type: Boolean, default: !1 },
|
|
262
265
|
show: { type: Boolean, default: !1 }
|
|
263
|
-
},
|
|
266
|
+
}, Pe = { class: "flex justify-between border-b border-gray-200 p-2" }, qe = { class: "font-semibold" }, De = { class: "text-sm text-gray-500" }, Ne = { class: "ml-auto" }, Fe = { class: "size-full overflow-auto p-2" }, Re = {
|
|
264
267
|
key: 0,
|
|
265
268
|
class: "border-t border-gray-200 p-2"
|
|
266
|
-
},
|
|
269
|
+
}, kt = /* @__PURE__ */ x({
|
|
267
270
|
__name: "Index",
|
|
268
|
-
props: /* @__PURE__ */
|
|
271
|
+
props: /* @__PURE__ */ R(je, {
|
|
269
272
|
modelValue: {},
|
|
270
273
|
modelModifiers: {}
|
|
271
274
|
}),
|
|
272
275
|
emits: ["update:modelValue"],
|
|
273
|
-
setup(
|
|
274
|
-
const e =
|
|
275
|
-
let
|
|
276
|
+
setup(o) {
|
|
277
|
+
const e = o, t = W(o, "modelValue"), l = M(() => {
|
|
278
|
+
let s = "";
|
|
276
279
|
switch (e.direction) {
|
|
277
280
|
case "left":
|
|
278
|
-
|
|
281
|
+
s = t.value ? "fixed top-0 left-0 bottom-0" : "fixed top-0 -left-full bottom-0";
|
|
279
282
|
break;
|
|
280
283
|
case "bottom":
|
|
281
|
-
|
|
284
|
+
s = t.value ? "fixed left-0 bottom-0 right-0" : "fixed left-0 right-0 -bottom-full";
|
|
282
285
|
break;
|
|
283
286
|
case "right":
|
|
284
|
-
|
|
287
|
+
s = t.value ? "fixed top-0 right-0 bottom-0" : "fixed top-0 -right-full bottom-0";
|
|
285
288
|
break;
|
|
286
289
|
default:
|
|
287
290
|
alert("Invalid direction");
|
|
288
291
|
}
|
|
289
|
-
return
|
|
290
|
-
}),
|
|
291
|
-
let
|
|
292
|
+
return s;
|
|
293
|
+
}), n = M(() => {
|
|
294
|
+
let s = "";
|
|
292
295
|
switch (e.direction) {
|
|
293
296
|
case "left":
|
|
294
|
-
|
|
297
|
+
s = "w-full max-w-[360px]";
|
|
295
298
|
break;
|
|
296
299
|
case "bottom":
|
|
297
|
-
|
|
300
|
+
s = "w-full h-full max-h-[90dvh]";
|
|
298
301
|
break;
|
|
299
302
|
case "right":
|
|
300
|
-
|
|
303
|
+
s = "w-full max-w-[360px]";
|
|
301
304
|
break;
|
|
302
305
|
}
|
|
303
|
-
return
|
|
306
|
+
return s;
|
|
304
307
|
});
|
|
305
|
-
return
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
l("div", {
|
|
309
|
-
onClick: i[0] || (i[0] = (c) => t.value = !t.value)
|
|
308
|
+
return (s, u) => (r(), i(E, null, [
|
|
309
|
+
a("div", {
|
|
310
|
+
onClick: u[0] || (u[0] = (d) => t.value = !t.value)
|
|
310
311
|
}, [
|
|
311
|
-
|
|
312
|
+
C(s.$slots, "default")
|
|
312
313
|
]),
|
|
313
|
-
|
|
314
|
-
class:
|
|
314
|
+
a("div", {
|
|
315
|
+
class: h([[l.value, n.value], "z-50 flex flex-col justify-between bg-white duration-300"])
|
|
315
316
|
}, [
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
317
|
+
a("div", Pe, [
|
|
318
|
+
a("div", null, [
|
|
319
|
+
a("h4", qe, $(s.title), 1),
|
|
320
|
+
a("p", De, $(s.description), 1)
|
|
320
321
|
]),
|
|
321
|
-
|
|
322
|
-
|
|
322
|
+
a("div", Ne, [
|
|
323
|
+
S(O, {
|
|
323
324
|
icon: "close",
|
|
324
325
|
class: "!p-1",
|
|
325
326
|
circle: "",
|
|
326
327
|
variant: "text",
|
|
327
|
-
onClick:
|
|
328
|
+
onClick: u[1] || (u[1] = (d) => t.value = !1)
|
|
328
329
|
})
|
|
329
330
|
])
|
|
330
331
|
]),
|
|
331
|
-
|
|
332
|
-
|
|
332
|
+
a("div", Fe, [
|
|
333
|
+
C(s.$slots, "content")
|
|
333
334
|
]),
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
])) :
|
|
335
|
+
s.showFooter ? (r(), i("div", Re, [
|
|
336
|
+
C(s.$slots, "footer")
|
|
337
|
+
])) : y("", !0)
|
|
337
338
|
], 2),
|
|
338
|
-
|
|
339
|
-
class:
|
|
340
|
-
onClick:
|
|
339
|
+
a("div", {
|
|
340
|
+
class: h([t.value ? "opacity-100" : "pointer-events-none", "fixed inset-0 z-[49] bg-black/40 opacity-0 duration-200"]),
|
|
341
|
+
onClick: u[2] || (u[2] = (d) => t.value = !1)
|
|
341
342
|
}, null, 2)
|
|
342
343
|
], 64));
|
|
343
344
|
}
|
|
344
|
-
}),
|
|
345
|
+
}), We = {
|
|
345
346
|
icon: { type: String, default: "" },
|
|
346
347
|
placeholder: { type: String, default: "" },
|
|
347
348
|
helpText: { type: String, default: "" },
|
|
348
349
|
type: { type: String, default: "text", options: ["text", "password"] }
|
|
349
|
-
},
|
|
350
|
+
}, Xe = ["type"], Ue = {
|
|
350
351
|
key: 0,
|
|
351
352
|
class: "ml-1 pt-1 text-xs text-gray-400"
|
|
352
|
-
},
|
|
353
|
+
}, $t = /* @__PURE__ */ x({
|
|
353
354
|
__name: "Index",
|
|
354
|
-
props: /* @__PURE__ */
|
|
355
|
+
props: /* @__PURE__ */ R(We, {
|
|
355
356
|
modelValue: {},
|
|
356
357
|
modelModifiers: {}
|
|
357
358
|
}),
|
|
358
359
|
emits: ["update:modelValue"],
|
|
359
|
-
setup(
|
|
360
|
-
const e =
|
|
361
|
-
return (t,
|
|
362
|
-
class:
|
|
360
|
+
setup(o) {
|
|
361
|
+
const e = W(o, "modelValue");
|
|
362
|
+
return (t, l) => (r(), i("div", {
|
|
363
|
+
class: h([{ "mb-6": t.helpText }, "relative h-[38px]"])
|
|
363
364
|
}, [
|
|
364
|
-
|
|
365
|
+
Q(a("input", {
|
|
365
366
|
type: t.type,
|
|
366
|
-
"onUpdate:modelValue":
|
|
367
|
+
"onUpdate:modelValue": l[0] || (l[0] = (n) => e.value = n),
|
|
367
368
|
class: "hover:border-primary/60 peer outline-primary h-full w-full rounded-md border border-gray-200 px-3 duration-200",
|
|
368
369
|
placeholder: " "
|
|
369
|
-
}, null, 8,
|
|
370
|
-
[
|
|
370
|
+
}, null, 8, Xe), [
|
|
371
|
+
[te, e.value]
|
|
371
372
|
]),
|
|
372
|
-
|
|
373
|
-
class:
|
|
374
|
-
},
|
|
375
|
-
t.helpText ? (
|
|
373
|
+
a("div", {
|
|
374
|
+
class: h([e.value ? "-top-2.5 text-sm text-black" : "top-[6px]", "absolute left-3 bg-white px-[2px] text-black duration-100 peer-placeholder-shown:text-gray-400 peer-focus:-top-2.5 peer-focus:text-sm peer-focus:text-black"])
|
|
375
|
+
}, $(t.placeholder), 3),
|
|
376
|
+
t.helpText ? (r(), i("div", Ue, $(t.helpText), 1)) : y("", !0)
|
|
376
377
|
], 2));
|
|
377
378
|
}
|
|
378
|
-
}),
|
|
379
|
+
}), Ze = {
|
|
379
380
|
show: { type: Boolean, default: !1 }
|
|
380
|
-
},
|
|
381
|
+
}, Ge = {
|
|
381
382
|
key: 0,
|
|
382
383
|
class: "fixed top-0 left-0 z-20 flex h-screen w-screen items-center justify-center backdrop-blur-[2px]"
|
|
383
|
-
},
|
|
384
|
+
}, Ke = {
|
|
384
385
|
class: "flex max-w-[600px] flex-col overflow-hidden rounded border border-gray-200 bg-white text-slate-500 shadow-xl shadow-slate-700/10 sm:max-h-[95dvh] sm:w-[90%]",
|
|
385
386
|
role: "document"
|
|
386
|
-
},
|
|
387
|
+
}, Qe = { class: "flex items-center gap-4 border-b border-gray-200 px-4 py-2" }, He = { class: "max-h-[calc(100dvh-100px)] flex-1 overflow-auto px-4 py-2 sm:max-h-[75vh]" }, Je = { class: "flex items-center justify-end gap-4 border-t border-gray-200 px-4 py-2" }, _t = /* @__PURE__ */ x({
|
|
387
388
|
__name: "Index",
|
|
388
|
-
props:
|
|
389
|
+
props: Ze,
|
|
389
390
|
emits: ["update:show"],
|
|
390
|
-
setup(
|
|
391
|
-
const t =
|
|
392
|
-
return
|
|
391
|
+
setup(o, { emit: e }) {
|
|
392
|
+
const t = o, l = e, n = _(t.show ?? !1);
|
|
393
|
+
return P(
|
|
393
394
|
() => t.show,
|
|
394
|
-
(
|
|
395
|
-
|
|
395
|
+
(s) => {
|
|
396
|
+
s !== n.value && (n.value = s);
|
|
396
397
|
}
|
|
397
|
-
),
|
|
398
|
-
|
|
399
|
-
}), (
|
|
400
|
-
|
|
398
|
+
), P(n, (s) => {
|
|
399
|
+
l("update:show", s), document.body.classList.toggle("overflow-hidden", s);
|
|
400
|
+
}), (s, u) => (r(), i(E, null, [
|
|
401
|
+
a("div", {
|
|
401
402
|
class: "w-full",
|
|
402
|
-
onClick:
|
|
403
|
+
onClick: u[0] || (u[0] = (d) => n.value = !0)
|
|
403
404
|
}, [
|
|
404
|
-
|
|
405
|
+
C(s.$slots, "default")
|
|
405
406
|
]),
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
407
|
+
n.value ? (r(), i("div", Ge, [
|
|
408
|
+
a("div", Ke, [
|
|
409
|
+
a("div", Qe, [
|
|
410
|
+
u[4] || (u[4] = a("h3", { class: "text-primary flex-1 text-xl font-medium" }, "Modal title", -1)),
|
|
411
|
+
S(O, {
|
|
411
412
|
icon: "close",
|
|
412
413
|
class: "!p-1",
|
|
413
414
|
variant: "ghost",
|
|
414
415
|
circle: "",
|
|
415
|
-
onClick:
|
|
416
|
+
onClick: u[1] || (u[1] = (d) => n.value = !1)
|
|
416
417
|
})
|
|
417
418
|
]),
|
|
418
|
-
|
|
419
|
-
(
|
|
419
|
+
a("div", He, [
|
|
420
|
+
(r(), i(E, null, F(15, (d) => a("p", null, "Lorem ipsum dolor sit amet consectetur adipisicing elit. Nemo autem consequatur aspernatur animi voluptate quasi non, maxime iste, harum ipsa reiciendis laborum ad unde a sequi molestias? Dolore, obcaecati sed?")), 64))
|
|
420
421
|
]),
|
|
421
|
-
|
|
422
|
-
|
|
422
|
+
a("div", Je, [
|
|
423
|
+
S(O, {
|
|
423
424
|
class: "!px-3 !py-1",
|
|
424
425
|
variant: "ghost",
|
|
425
426
|
label: "Close",
|
|
426
|
-
onClick:
|
|
427
|
+
onClick: u[2] || (u[2] = (d) => n.value = !1)
|
|
427
428
|
}),
|
|
428
|
-
|
|
429
|
+
S(O, {
|
|
429
430
|
class: "!px-3 !py-1",
|
|
430
431
|
label: "Save",
|
|
431
|
-
onClick:
|
|
432
|
+
onClick: u[3] || (u[3] = (d) => n.value = !1)
|
|
432
433
|
})
|
|
433
434
|
])
|
|
434
435
|
])
|
|
435
|
-
])) :
|
|
436
|
+
])) : y("", !0)
|
|
436
437
|
], 64));
|
|
437
438
|
}
|
|
438
|
-
}),
|
|
439
|
+
}), Ye = {
|
|
439
440
|
position: { type: String, default: "bottom", options: ["top", "bottom"] },
|
|
440
441
|
bodyClass: { type: String, default: "" },
|
|
441
442
|
contentClass: { type: String, default: "" }
|
|
442
|
-
},
|
|
443
|
+
}, Ct = /* @__PURE__ */ x({
|
|
443
444
|
__name: "Index",
|
|
444
|
-
props:
|
|
445
|
-
setup(
|
|
446
|
-
const e =
|
|
447
|
-
return (t,
|
|
445
|
+
props: Ye,
|
|
446
|
+
setup(o) {
|
|
447
|
+
const e = _(!0);
|
|
448
|
+
return (t, l) => (r(), i("div", {
|
|
448
449
|
class: "relative inline-block",
|
|
449
|
-
onMouseleave:
|
|
450
|
+
onMouseleave: l[1] || (l[1] = (n) => e.value = !1)
|
|
450
451
|
}, [
|
|
451
|
-
|
|
452
|
+
a("div", {
|
|
452
453
|
class: "relative",
|
|
453
|
-
onMouseover:
|
|
454
|
+
onMouseover: l[0] || (l[0] = (n) => e.value = !0)
|
|
454
455
|
}, [
|
|
455
|
-
e.value ? (
|
|
456
|
+
e.value ? (r(), i("svg", {
|
|
456
457
|
key: 0,
|
|
457
|
-
class:
|
|
458
|
+
class: h([{ "top-full": t.position === "bottom", "bottom-full rotate-180": t.position === "top" }, "absolute left-1/2 w-4 -translate-x-1/2 text-gray-200"]),
|
|
458
459
|
xmlns: "http://www.w3.org/2000/svg",
|
|
459
460
|
viewBox: "0 0 24 24"
|
|
460
|
-
}, [...
|
|
461
|
-
|
|
461
|
+
}, [...l[2] || (l[2] = [
|
|
462
|
+
a("path", {
|
|
462
463
|
fill: "currentColor",
|
|
463
464
|
d: "M3 19h18a1.002 1.002 0 0 0 .823-1.569l-9-13c-.373-.539-1.271-.539-1.645 0l-9 13A.999.999 0 0 0 3 19"
|
|
464
465
|
}, null, -1)
|
|
465
|
-
])], 2)) :
|
|
466
|
-
|
|
466
|
+
])], 2)) : y("", !0),
|
|
467
|
+
C(t.$slots, "default")
|
|
467
468
|
], 32),
|
|
468
|
-
e.value ? (
|
|
469
|
+
e.value ? (r(), i("div", {
|
|
469
470
|
key: 0,
|
|
470
|
-
class:
|
|
471
|
+
class: h([[t.bodyClass, { "bottom-full mb-3": t.position === "top" }, { "top-full mt-3": t.position === "bottom" }], "absolute left-1/2 z-10 w-fit -translate-x-1/2"])
|
|
471
472
|
}, [
|
|
472
|
-
|
|
473
|
-
class:
|
|
473
|
+
a("div", {
|
|
474
|
+
class: h([t.contentClass, "w-[200px] rounded-md border border-gray-200 bg-white p-3"])
|
|
474
475
|
}, [
|
|
475
|
-
|
|
476
|
+
C(t.$slots, "body")
|
|
476
477
|
], 2)
|
|
477
|
-
], 2)) :
|
|
478
|
+
], 2)) : y("", !0)
|
|
478
479
|
], 32));
|
|
479
480
|
}
|
|
480
|
-
}),
|
|
481
|
+
}), et = {
|
|
481
482
|
showTooltip: { type: Boolean, default: !1 },
|
|
482
483
|
value: { type: Number, default: 0 }
|
|
483
|
-
},
|
|
484
|
+
}, tt = { class: "progress-container relative min-w-full py-4" }, ot = { class: "relative h-2 rounded-full bg-gray-200" }, St = /* @__PURE__ */ x({
|
|
484
485
|
__name: "Index",
|
|
485
|
-
props:
|
|
486
|
+
props: et,
|
|
486
487
|
emits: ["update:value"],
|
|
487
|
-
setup(
|
|
488
|
-
const t =
|
|
489
|
-
if (!
|
|
490
|
-
const
|
|
491
|
-
if (!
|
|
492
|
-
const
|
|
493
|
-
let
|
|
494
|
-
|
|
495
|
-
const
|
|
496
|
-
|
|
497
|
-
},
|
|
498
|
-
|
|
499
|
-
},
|
|
500
|
-
|
|
488
|
+
setup(o, { emit: e }) {
|
|
489
|
+
const t = o, l = e, n = _(t.value), s = _(!1), u = _(!1), d = (f) => {
|
|
490
|
+
if (!s.value) return;
|
|
491
|
+
const g = document.querySelector(".progress-container");
|
|
492
|
+
if (!g) return;
|
|
493
|
+
const b = g.getBoundingClientRect();
|
|
494
|
+
let k;
|
|
495
|
+
f instanceof TouchEvent ? k = f.touches[0]?.clientX ?? 0 : k = f.clientX;
|
|
496
|
+
const I = k - b.left, A = Math.max(0, Math.min(100, I / b.width * 100));
|
|
497
|
+
n.value = A, l("update:value", A);
|
|
498
|
+
}, p = (f) => {
|
|
499
|
+
s.value = !0, u.value = !0, d(f);
|
|
500
|
+
}, m = () => {
|
|
501
|
+
s.value = !1, u.value = !1;
|
|
501
502
|
};
|
|
502
|
-
return
|
|
503
|
-
window.addEventListener("mousemove",
|
|
504
|
-
}),
|
|
505
|
-
window.removeEventListener("mousemove",
|
|
506
|
-
}), (
|
|
507
|
-
|
|
508
|
-
|
|
503
|
+
return oe(() => {
|
|
504
|
+
window.addEventListener("mousemove", d), window.addEventListener("mouseup", m), window.addEventListener("mouseleave", m), window.addEventListener("touchmove", d, { passive: !1 }), window.addEventListener("touchend", m), window.addEventListener("touchcancel", m);
|
|
505
|
+
}), se(() => {
|
|
506
|
+
window.removeEventListener("mousemove", d), window.removeEventListener("mouseup", m), window.removeEventListener("mouseleave", m), window.removeEventListener("touchmove", d), window.removeEventListener("touchend", m), window.removeEventListener("touchcancel", m);
|
|
507
|
+
}), (f, g) => (r(), i("div", tt, [
|
|
508
|
+
a("div", ot, [
|
|
509
|
+
a("div", {
|
|
509
510
|
class: "bg-primary absolute h-2 rounded-full",
|
|
510
|
-
style:
|
|
511
|
+
style: V({ width: n.value + "%" })
|
|
511
512
|
}, null, 4),
|
|
512
|
-
|
|
513
|
+
a("div", {
|
|
513
514
|
class: "absolute top-1/2 -ml-2 flex h-4 w-4 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full border border-gray-300 bg-white shadow",
|
|
514
|
-
style:
|
|
515
|
+
style: V({ left: n.value + "%" }),
|
|
515
516
|
unselectable: "on",
|
|
516
517
|
onselectstart: "return false;",
|
|
517
|
-
onMousedown:
|
|
518
|
-
onTouchstart:
|
|
518
|
+
onMousedown: p,
|
|
519
|
+
onTouchstart: p
|
|
519
520
|
}, null, 36),
|
|
520
|
-
|
|
521
|
+
u.value && f.showTooltip ? (r(), i("div", {
|
|
521
522
|
key: 0,
|
|
522
523
|
class: "absolute -top-9 mx-auto w-10 -translate-x-1/2 rounded bg-gray-800 px-2 py-1 text-xs text-white",
|
|
523
|
-
style:
|
|
524
|
+
style: V({ left: n.value + "%" })
|
|
524
525
|
}, [
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
], 4)) :
|
|
526
|
+
K($(Math.round(n.value)) + "% ", 1),
|
|
527
|
+
g[0] || (g[0] = a("span", { class: "absolute -bottom-1 left-1/2 -ml-1 h-2 w-2 rotate-45 bg-gray-800" }, null, -1))
|
|
528
|
+
], 4)) : y("", !0)
|
|
528
529
|
])
|
|
529
530
|
]));
|
|
530
531
|
}
|
|
531
|
-
}),
|
|
532
|
+
}), st = {
|
|
532
533
|
modelValue: { type: String, default: "" },
|
|
533
534
|
options: { type: Array, required: !0 },
|
|
534
|
-
variant: { type: String, default: "solid", options: ["outlined", "text", "ghost", "solid"] },
|
|
535
|
+
variant: { type: String, default: "solid", options: ["outlined", "text", "ghost", "solid", "gray"] },
|
|
535
536
|
showFilter: { type: Boolean, default: !1 },
|
|
536
|
-
isOpen: { type: Boolean, default: !1 }
|
|
537
|
-
|
|
537
|
+
isOpen: { type: Boolean, default: !1 },
|
|
538
|
+
closeOnClickOutside: { type: Boolean, default: !0 }
|
|
539
|
+
};
|
|
540
|
+
function lt(o) {
|
|
541
|
+
return le() ? (ne(o), !0) : !1;
|
|
542
|
+
}
|
|
543
|
+
const J = typeof window < "u" && typeof document < "u";
|
|
544
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
545
|
+
const nt = Object.prototype.toString, rt = (o) => nt.call(o) === "[object Object]", z = () => {
|
|
546
|
+
}, at = /* @__PURE__ */ it();
|
|
547
|
+
function it() {
|
|
548
|
+
var o, e;
|
|
549
|
+
return J && ((o = window?.navigator) == null ? void 0 : o.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((e = window?.navigator) == null ? void 0 : e.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
|
|
550
|
+
}
|
|
551
|
+
function D(o) {
|
|
552
|
+
return Array.isArray(o) ? o : [o];
|
|
553
|
+
}
|
|
554
|
+
function ut(o, e, t) {
|
|
555
|
+
return P(
|
|
556
|
+
o,
|
|
557
|
+
e,
|
|
558
|
+
{
|
|
559
|
+
...t,
|
|
560
|
+
immediate: !0
|
|
561
|
+
}
|
|
562
|
+
);
|
|
563
|
+
}
|
|
564
|
+
const Y = J ? window : void 0;
|
|
565
|
+
function B(o) {
|
|
566
|
+
var e;
|
|
567
|
+
const t = L(o);
|
|
568
|
+
return (e = t?.$el) != null ? e : t;
|
|
569
|
+
}
|
|
570
|
+
function N(...o) {
|
|
571
|
+
const e = [], t = () => {
|
|
572
|
+
e.forEach((d) => d()), e.length = 0;
|
|
573
|
+
}, l = (d, p, m, f) => (d.addEventListener(p, m, f), () => d.removeEventListener(p, m, f)), n = M(() => {
|
|
574
|
+
const d = D(L(o[0])).filter((p) => p != null);
|
|
575
|
+
return d.every((p) => typeof p != "string") ? d : void 0;
|
|
576
|
+
}), s = ut(
|
|
577
|
+
() => {
|
|
578
|
+
var d, p;
|
|
579
|
+
return [
|
|
580
|
+
(p = (d = n.value) == null ? void 0 : d.map((m) => B(m))) != null ? p : [Y].filter((m) => m != null),
|
|
581
|
+
D(L(n.value ? o[1] : o[0])),
|
|
582
|
+
D(re(n.value ? o[2] : o[1])),
|
|
583
|
+
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
584
|
+
L(n.value ? o[3] : o[2])
|
|
585
|
+
];
|
|
586
|
+
},
|
|
587
|
+
([d, p, m, f]) => {
|
|
588
|
+
if (t(), !d?.length || !p?.length || !m?.length)
|
|
589
|
+
return;
|
|
590
|
+
const g = rt(f) ? { ...f } : f;
|
|
591
|
+
e.push(
|
|
592
|
+
...d.flatMap(
|
|
593
|
+
(b) => p.flatMap(
|
|
594
|
+
(k) => m.map((I) => l(b, k, I, g))
|
|
595
|
+
)
|
|
596
|
+
)
|
|
597
|
+
);
|
|
598
|
+
},
|
|
599
|
+
{ flush: "post" }
|
|
600
|
+
), u = () => {
|
|
601
|
+
s(), t();
|
|
602
|
+
};
|
|
603
|
+
return lt(t), u;
|
|
604
|
+
}
|
|
605
|
+
let Z = !1;
|
|
606
|
+
function dt(o, e, t = {}) {
|
|
607
|
+
const { window: l = Y, ignore: n = [], capture: s = !0, detectIframe: u = !1, controls: d = !1 } = t;
|
|
608
|
+
if (!l)
|
|
609
|
+
return d ? { stop: z, cancel: z, trigger: z } : z;
|
|
610
|
+
if (at && !Z) {
|
|
611
|
+
Z = !0;
|
|
612
|
+
const c = { passive: !0 };
|
|
613
|
+
Array.from(l.document.body.children).forEach((v) => v.addEventListener("click", z, c)), l.document.documentElement.addEventListener("click", z, c);
|
|
614
|
+
}
|
|
615
|
+
let p = !0;
|
|
616
|
+
const m = (c) => L(n).some((v) => {
|
|
617
|
+
if (typeof v == "string")
|
|
618
|
+
return Array.from(l.document.querySelectorAll(v)).some((w) => w === c.target || c.composedPath().includes(w));
|
|
619
|
+
{
|
|
620
|
+
const w = B(v);
|
|
621
|
+
return w && (c.target === w || c.composedPath().includes(w));
|
|
622
|
+
}
|
|
623
|
+
});
|
|
624
|
+
function f(c) {
|
|
625
|
+
const v = L(c);
|
|
626
|
+
return v && v.$.subTree.shapeFlag === 16;
|
|
627
|
+
}
|
|
628
|
+
function g(c, v) {
|
|
629
|
+
const w = L(c), q = w.$.subTree && w.$.subTree.children;
|
|
630
|
+
return q == null || !Array.isArray(q) ? !1 : q.some((X) => X.el === v.target || v.composedPath().includes(X.el));
|
|
631
|
+
}
|
|
632
|
+
const b = (c) => {
|
|
633
|
+
const v = B(o);
|
|
634
|
+
if (c.target != null && !(!(v instanceof Element) && f(o) && g(o, c)) && !(!v || v === c.target || c.composedPath().includes(v))) {
|
|
635
|
+
if ("detail" in c && c.detail === 0 && (p = !m(c)), !p) {
|
|
636
|
+
p = !0;
|
|
637
|
+
return;
|
|
638
|
+
}
|
|
639
|
+
e(c);
|
|
640
|
+
}
|
|
641
|
+
};
|
|
642
|
+
let k = !1;
|
|
643
|
+
const I = [
|
|
644
|
+
N(l, "click", (c) => {
|
|
645
|
+
k || (k = !0, setTimeout(() => {
|
|
646
|
+
k = !1;
|
|
647
|
+
}, 0), b(c));
|
|
648
|
+
}, { passive: !0, capture: s }),
|
|
649
|
+
N(l, "pointerdown", (c) => {
|
|
650
|
+
const v = B(o);
|
|
651
|
+
p = !m(c) && !!(v && !c.composedPath().includes(v));
|
|
652
|
+
}, { passive: !0 }),
|
|
653
|
+
u && N(l, "blur", (c) => {
|
|
654
|
+
setTimeout(() => {
|
|
655
|
+
var v;
|
|
656
|
+
const w = B(o);
|
|
657
|
+
((v = l.document.activeElement) == null ? void 0 : v.tagName) === "IFRAME" && !w?.contains(l.document.activeElement) && e(c);
|
|
658
|
+
}, 0);
|
|
659
|
+
}, { passive: !0 })
|
|
660
|
+
].filter(Boolean), A = () => I.forEach((c) => c());
|
|
661
|
+
return d ? {
|
|
662
|
+
stop: A,
|
|
663
|
+
cancel: () => {
|
|
664
|
+
p = !1;
|
|
665
|
+
},
|
|
666
|
+
trigger: (c) => {
|
|
667
|
+
p = !0, b(c), p = !1;
|
|
668
|
+
}
|
|
669
|
+
} : A;
|
|
670
|
+
}
|
|
671
|
+
const ct = {
|
|
538
672
|
key: 0,
|
|
539
673
|
class: "absolute top-full z-10 mt-1 flex w-full list-none flex-col rounded border border-gray-200 bg-white shadow-md shadow-slate-500/10"
|
|
540
|
-
},
|
|
674
|
+
}, pt = {
|
|
541
675
|
key: 0,
|
|
542
676
|
class: "border-b border-gray-200 p-2"
|
|
543
|
-
},
|
|
677
|
+
}, ft = ["onClick"], Lt = /* @__PURE__ */ x({
|
|
544
678
|
__name: "Index",
|
|
545
|
-
props:
|
|
679
|
+
props: st,
|
|
546
680
|
emits: ["update:modelValue", "update:isOpen"],
|
|
547
|
-
setup(
|
|
548
|
-
const t =
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
681
|
+
setup(o, { emit: e }) {
|
|
682
|
+
const t = o, l = e, n = _(t.modelValue), s = _(t.isOpen ?? !1), u = ae("target");
|
|
683
|
+
dt(u, () => t.closeOnClickOutside && (s.value = !1)), P(
|
|
684
|
+
() => t.isOpen,
|
|
685
|
+
(f) => {
|
|
686
|
+
f !== s.value && (s.value = f);
|
|
687
|
+
}
|
|
688
|
+
);
|
|
689
|
+
const d = (f) => {
|
|
690
|
+
n.value = f, l("update:modelValue", f), s.value = !1;
|
|
691
|
+
}, p = _(""), m = M(() => p.value ? t.options.filter((f) => f.toLowerCase().includes(p.value.toLowerCase())) : t.options);
|
|
692
|
+
return (f, g) => (r(), i("div", {
|
|
693
|
+
class: "relative",
|
|
694
|
+
ref_key: "target",
|
|
695
|
+
ref: u
|
|
696
|
+
}, [
|
|
697
|
+
S(O, {
|
|
698
|
+
"icon-class": s.value ? "rotate-180" : "",
|
|
554
699
|
icon: "chevron-down",
|
|
555
|
-
class: "w-full",
|
|
700
|
+
class: "w-full capitalize",
|
|
556
701
|
variant: f.variant,
|
|
557
|
-
label:
|
|
558
|
-
onClick:
|
|
702
|
+
label: n.value || "Select",
|
|
703
|
+
onClick: g[0] || (g[0] = (b) => s.value = !s.value)
|
|
559
704
|
}, null, 8, ["icon-class", "variant", "label"]),
|
|
560
|
-
|
|
561
|
-
f.showFilter ? (
|
|
562
|
-
|
|
705
|
+
s.value ? (r(), i("ul", ct, [
|
|
706
|
+
f.showFilter ? (r(), i("li", pt, [
|
|
707
|
+
Q(a("input", {
|
|
563
708
|
type: "text",
|
|
564
|
-
"onUpdate:modelValue":
|
|
709
|
+
"onUpdate:modelValue": g[1] || (g[1] = (b) => p.value = b),
|
|
565
710
|
class: "focus:border-primary w-full rounded-sm border border-gray-200 px-2 py-1 focus:outline-none",
|
|
566
711
|
placeholder: "Search"
|
|
567
712
|
}, null, 512), [
|
|
568
|
-
[
|
|
713
|
+
[ie, p.value]
|
|
569
714
|
])
|
|
570
|
-
])) :
|
|
571
|
-
(
|
|
572
|
-
key:
|
|
573
|
-
class:
|
|
574
|
-
onClick: (
|
|
575
|
-
},
|
|
576
|
-
])) :
|
|
577
|
-
]));
|
|
715
|
+
])) : y("", !0),
|
|
716
|
+
(r(!0), i(E, null, F(m.value, (b, k) => (r(), i("li", {
|
|
717
|
+
key: k,
|
|
718
|
+
class: h([b === n.value && "bg-primary/10", "hover:bg-primary/5 cursor-pointer px-4 py-2 text-left"]),
|
|
719
|
+
onClick: (I) => d(b)
|
|
720
|
+
}, $(b), 11, ft))), 128))
|
|
721
|
+
])) : y("", !0)
|
|
722
|
+
], 512));
|
|
578
723
|
}
|
|
579
|
-
}),
|
|
724
|
+
}), mt = {
|
|
580
725
|
direction: { type: String, default: "horizontal", options: ["horizontal", "vertical"] },
|
|
581
|
-
color: { type: String, default: "
|
|
726
|
+
color: { type: String, default: "" },
|
|
582
727
|
label: { type: String, default: "" },
|
|
583
728
|
icon: { type: String, default: "" }
|
|
584
|
-
},
|
|
729
|
+
}, vt = {
|
|
585
730
|
key: 1,
|
|
586
731
|
class: "absolute inset-0 m-auto flex h-fit w-fit shrink-0 items-center justify-center bg-white p-1"
|
|
587
|
-
},
|
|
732
|
+
}, Et = /* @__PURE__ */ x({
|
|
588
733
|
__name: "Index",
|
|
589
|
-
props:
|
|
590
|
-
setup(
|
|
591
|
-
return (e, t) => (
|
|
592
|
-
class:
|
|
593
|
-
style:
|
|
734
|
+
props: mt,
|
|
735
|
+
setup(o) {
|
|
736
|
+
return (e, t) => (r(), i("div", {
|
|
737
|
+
class: h([e.direction === "horizontal" ? "h-[1px] w-full" : e.direction === "vertical" ? "h-full w-[1px]" : "", "relative bg-gray-200"]),
|
|
738
|
+
style: V({ backgroundColor: e.color || "var(--color-primary)" })
|
|
594
739
|
}, [
|
|
595
|
-
e.direction === "horizontal"
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
740
|
+
e.direction === "horizontal" ? (r(), i(E, { key: 0 }, [
|
|
741
|
+
e.label && !e.icon ? (r(), i("span", {
|
|
742
|
+
key: 0,
|
|
743
|
+
class: "absolute inset-0 m-auto flex w-fit items-center justify-center rounded-sm border border-gray-100 bg-white px-1 py-2 text-sm",
|
|
744
|
+
style: V({ color: e.color, borderColor: e.color })
|
|
745
|
+
}, "Test label", 4)) : y("", !0),
|
|
746
|
+
e.icon && !e.label ? (r(), i("span", vt, [
|
|
747
|
+
S(H, {
|
|
748
|
+
icon: e.icon,
|
|
749
|
+
class: "size-6",
|
|
750
|
+
style: V({ color: e.color || "var(--color-primary)" })
|
|
751
|
+
}, null, 8, ["icon", "style"])
|
|
752
|
+
])) : y("", !0)
|
|
753
|
+
], 64)) : y("", !0)
|
|
607
754
|
], 6));
|
|
608
755
|
}
|
|
609
|
-
}),
|
|
756
|
+
}), ht = {
|
|
610
757
|
content: { type: String, default: "" },
|
|
611
758
|
position: { type: String, default: "bottom", options: ["top", "bottom", "left", "right"] },
|
|
612
759
|
bodyClass: { type: String, default: "" }
|
|
613
|
-
},
|
|
760
|
+
}, yt = { key: 0 }, Mt = /* @__PURE__ */ x({
|
|
614
761
|
__name: "Index",
|
|
615
|
-
props:
|
|
616
|
-
setup(
|
|
617
|
-
const e =
|
|
618
|
-
return (t,
|
|
762
|
+
props: ht,
|
|
763
|
+
setup(o) {
|
|
764
|
+
const e = _(!1);
|
|
765
|
+
return (t, l) => (r(), i("div", {
|
|
619
766
|
class: "relative inline-block",
|
|
620
|
-
onMouseenter:
|
|
621
|
-
onMouseleave:
|
|
767
|
+
onMouseenter: l[0] || (l[0] = (n) => e.value = !0),
|
|
768
|
+
onMouseleave: l[1] || (l[1] = (n) => e.value = !1)
|
|
622
769
|
}, [
|
|
623
|
-
|
|
624
|
-
e.value ? (
|
|
770
|
+
C(t.$slots, "default"),
|
|
771
|
+
e.value ? (r(), i("div", {
|
|
625
772
|
key: 0,
|
|
626
|
-
class:
|
|
773
|
+
class: h([
|
|
627
774
|
"absolute z-10 w-max rounded-md bg-white px-3 py-2 text-sm text-primary border shadow-xl transition-opacity duration-200",
|
|
628
775
|
t.position === "top" && "bottom-full left-1/2 mb-2 -translate-x-1/2",
|
|
629
776
|
t.position === "bottom" && "top-full left-1/2 mt-2 -translate-x-1/2",
|
|
@@ -632,35 +779,35 @@ const ge = /* @__PURE__ */ S(he, [["render", be]]), T = {
|
|
|
632
779
|
t.bodyClass
|
|
633
780
|
])
|
|
634
781
|
}, [
|
|
635
|
-
t.content ?
|
|
636
|
-
], 2)) :
|
|
782
|
+
t.content ? C(t.$slots, "body", { key: 1 }) : (r(), i("span", yt, $(t.content), 1))
|
|
783
|
+
], 2)) : y("", !0)
|
|
637
784
|
], 32));
|
|
638
785
|
}
|
|
639
|
-
}),
|
|
786
|
+
}), It = (o) => ({
|
|
640
787
|
install() {
|
|
641
|
-
if (!
|
|
788
|
+
if (!o || !o.colors) {
|
|
642
789
|
console.warn("No config provided for the theme settings");
|
|
643
790
|
return;
|
|
644
791
|
}
|
|
645
|
-
|
|
792
|
+
gt(o.colors);
|
|
646
793
|
}
|
|
647
|
-
}),
|
|
794
|
+
}), gt = (o) => {
|
|
648
795
|
const e = document.documentElement;
|
|
649
|
-
for (const t in
|
|
650
|
-
|
|
796
|
+
for (const t in o)
|
|
797
|
+
o[t] && e.style.setProperty(`--ui-color-${t}`, o[t]);
|
|
651
798
|
};
|
|
652
799
|
export {
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
800
|
+
wt as Accordion,
|
|
801
|
+
O as Button,
|
|
802
|
+
xt as Checkbox,
|
|
803
|
+
kt as Drawer,
|
|
804
|
+
$t as Input,
|
|
805
|
+
_t as Modal,
|
|
806
|
+
Ct as Popover,
|
|
807
|
+
St as RangeSlider,
|
|
808
|
+
Lt as Select,
|
|
809
|
+
Et as Separator,
|
|
810
|
+
Mt as Tooltip,
|
|
811
|
+
It as config
|
|
665
812
|
};
|
|
666
813
|
//# sourceMappingURL=index.js.map
|