vuesp-components 2.3.0 → 2.3.2

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.
@@ -0,0 +1,718 @@
1
+ import { openBlock as l, createElementBlock as d, createStaticVNode as Z, createElementVNode as i, defineComponent as O, computed as w, createBlock as S, resolveDynamicComponent as N, mergeProps as T, withCtx as k, normalizeClass as p, renderSlot as v, createCommentVNode as y, markRaw as W, shallowRef as A, Teleport as j, createVNode as V, Transition as D, unref as c, withModifiers as B, normalizeStyle as L, ref as F, withDirectives as ee, Fragment as R, renderList as q, createTextVNode as I, toDisplayString as _, withKeys as te, createPropsRestProxy as ae, normalizeProps as le, guardReactiveProps as oe } from "vue";
2
+ import { u as H, a as se, b as K, c as G } from "./useDialog-ALG4kFE7.js";
3
+ const P = (e, t) => {
4
+ const n = e.__vccOpts || e;
5
+ for (const [h, u] of t)
6
+ n[h] = u;
7
+ return n;
8
+ }, ne = {}, re = {
9
+ viewBox: "0 0 179 40",
10
+ fill: "currentColor"
11
+ };
12
+ function ie(e, t) {
13
+ return l(), d("svg", re, [...t[0] || (t[0] = [
14
+ Z('<g transform="matrix(0.13287749,0,0,0.13643171,26.823508,13.407673)"><path d="m -19.25933,-16.057909 c 0,39.1906 -14.287,86.055995 -38.669,116.999999 -7.898,10.024 -30.4718,32.819 -43.7731,17.695 -9.4823,-10.781 -3.53183,-36.917714 -0.86893,-48.907714 9.1618,-41.251693 19.72123,-78.8733849 30.31103,-119.787285 -27.50968,14.537655 -68.26323,-24.154322 -70.36602,-2.214449 -12.32038,69.23655 -28.82323,204.245118 16.36602,215.925448 81.802,10.63 120.333,-82.698004 129.4249996,-148.710999 2.182,-15.84009991 4.123,-31.9832 2.401,-48 -2.342,-21.78506 -24.7959996,-32.68227 -43.7859996,-21.58643 -11.424,6.67523 -12.148,29.93713 -1.935,38.01393 5.462,4.3199 14.927,3.091 20.895,0.5725 z"></path><path d="m 104.76548,-63.374174 0.008,91.15236 -26.35225,25.003926 26.35676,25.415735 4.8e-4,91.161403 4.03033,0.0237 c 0,0 0.0729,-90.913243 -0.0476,-91.163063 l 26.24012,-24.776315 -26.23835,-25.66073 0.007,-91.147024 z"></path><path d="m 803.85444,82.816565 c -5.5092,-1.69169 -15.7197,-2.12913 -19.9329,1.03114 -5.56,4.548 -0.63,22.670005 -0.76,28.973005 0.3943,19.76599 20.7146,30.35978 36.02,33 0,0 45.06,4.77 68,-5.439 35.89996,-15.975 40.75996,-63.180005 13.91,-89.457 -15.2385,-18.333755 -72.7584,-32.66908 -78.91,-50.10399958 -6.54,-7.52040002 -2.52,-22.38120042 5.1,-27.89120042 10.47,-7.5605 25.91,-7.3647 37.9,-5.017 13.11,2.5659 14.15,13.6285 18,24.9082004 1.48,4.3522 2.88,12.3564 8.1,13.6674 2.25,0.5623 4.67,-0.1094 6.9,-0.3827 16.42996,-2.011 11.28456,-11.418391 12.09456,-24.2037914 0.38,-6.0219 2.2254,-16.238609 -1.1246,-21.752209 -5.98996,-9.87979 -17.48276,-9.960049 -30.96996,-15.3287 -11.9944,-2.919504 -32.57,-5.50288 -50,-1.25772 -13.92,3.39017 -28.5,10.49772 -37.24,22.25772 -16.31,21.9622 -9.6,57.1861 10.26,74.6998 22.17,19.5582 58.4,21.7732 76.41,46.304195 16.9,23.013005 -18.71,37.732005 -37.1,36.158005 -39.9169,-0.34531 -23.6297,-30.723925 -36.6571,-40.166145 z"></path><path d="m 321.18154,-32.17929 21,9 -46,120.999995 c -13.02939,-49.349215 -25.65589,-93.5184936 -37,-121.999995 5.741,-1.2008 17.946,-4.1139 20.397,-10.1049 2.328,-5.6934 -1.142,-13.0456 -1.397,-18.8951 -9.12189,0.745226 -79.43846,-2.275099 -82.411,2.3179 -1.02172,5.2378 -3.84926,12.95938 -1.985,17.2878 4.036,8.5605 18.82154,3.517306 23.75154,13.866906 25.90475,54.255645 38.51776,106.713979 60.87446,156.527394 37.33703,54.02331 63.06896,-92.52485 72.275,-119 4.089,-11.8192996 7.212,-30.0265 15.194,-39.7724 15.1599,-17.433642 28.97616,-5.381825 21.868,-28.07945 -5.23694,-5.944366 -63.1086,-2.739072 -64.389,-1.54476 -3.452,4.31661 -7.5289,7.804293 -2.178,19.39661 z"></path><path d="m 401.18154,-53.17929 c -0.998,4.83681 -4.908,16.1206 -1.357,20.3511 4.914,5.8555 20.341,3.7676 21.463,12.689 3.596,28.5694004 -0.4,58.2962 0.855,86.9599 0.882,20.149995 3.491,41.865 17.134,57.961 36.351,42.885 114.137,25.661 128.322,-27.961005 9.142,-34.561995 3.01191,-80.803507 3.08491,-116.292007 0.033,-15.7886 15.53509,-3.553988 22.46909,-13.356888 3.337,-4.7169 -1.212,-15.187 -1.971,-20.3511 -20.45735,-0.261837 -40.85188,-0.262234 -61.258,1.02779 l -3.742,11.97221 c 0.84877,13.898543 11.37685,10.038234 23.90801,11.758642 0.32053,9.189207 0.091,48.923358 0.092,71.241358 10e-4,19.4 0.471,40.338995 -8.89,58 -15.56,29.358 -61.659,29.409 -74.878,-2.000005 -10.636,-25.273 -6.147,-56.234995 -6.233,-82.999995 -0.035,-10.9870996 -2.501,-25.3419996 0.319,-35.9568 2.549,-9.5978 16.626,-6.4297 22.064,-12.6921 3.287,-3.7858 -0.52,-15.71299 -1.382,-20.3511 z"></path><path d="m 760.05964,143.05268 c -5.1123,-31.58627 4.9497,-52.437285 -1.4781,-59.628975 -3.17,-3.163 -17.48,-3.877 -20.39,-0.285 -7.636,9.412 -6.012,27.571005 -14.737,36.079005 -3.136,3.058 -10.272,1.461 -14.273,1.689 -13.102,0.746 -25.895,-0.086 -39,-0.086 l -1,-68 c 7.223,0.913 21.685,-1.996 27.722,1.269 6.665,3.604 3.577,17.035995 10.556,20.532995 5.15472,-0.0642 13.05488,0.47604 17.494,-1.405 5.21328,-7.758815 3.74312,-60.612259 -0.015,-62.640795 -5.5141,-0.237113 -13.29293,-2.8563906 -17.543,-1.1527996 -6.595,2.8734996 -5.002,15.2292996 -10.608,19.7931996 -5.233,4.2609 -21.417,2.0768 -27.606,0.6034 l 0.018,-19.9999996 0.982,-42.0000004 h 36 c 4.195,0 11.017,-1.271 14.725,1.0278 9.479,5.8759 5.235,25.2669004 13.705,30.94060042 4.66,3.12049998 14.21,-2.03520002 19.57,-1.96840002 -1.7258,-10.0332024 5.1749,-44.7657364 -0.6,-49.9722104 -8.573,-0.17431 -123.95249,0.09746 -142.26,0.5756 -2.813,3.26479 -4.226,15.59871 -1.533,19.00621 4.834,6.1168 16.163,4.3646 20.481,9.9544 4.51586,28.5714044 7.89004,96.377815 0.594,132.328 -2.185,7.787 -16.181,5.969 -20.654,11.832 -1.59611,5.22999 -0.7409,13.33851 1.536,18.048 5.16025,7.51372 110.02916,3.17366 148.3141,3.45997 z"></path><path d="m 964.1815,-23.17929 c 0,43.4127 3.83,88.767 -0.06,131.985 -0.8,8.923 -14.88,7.544 -20.62,12.09 -4.2,3.326 -1.95,14.442 -0.17,18.777 15.7137,4.67091 86.3037,9.27518 89.39,-4.852 0.57,-3.057 2.36,-9.582 0.42,-12.297 -5.77,-8.041 -28.93,-2.391 -30.81,-13.747 -0.063,-55.41713 -0.3488,-55.25935 -0.15,-140.956 16.19,0 34.24,-2.9842 46.98,9.0934 18.26,17.2977004 11.94,53.4098 -8.98,65.6236 -7.67,4.477 -18.44,3.283 -27,3.283 v 23 c 23.19,0 50.85,-0.216 69,-17.093 28.42,-26.4403 19.73,-83.9314 -16,-99.7334 -4.6952,-8.320027 -96.8662,-17.196078 -120.68,-4.43208 -2.7,1.3721 -3.6701,5.98455 -3.17,8.34798 -3.3313,17.201533 8.54,18.6194 21.85,20.9105 z"></path></g>', 1)
15
+ ])]);
16
+ }
17
+ const Xe = /* @__PURE__ */ P(ne, [["render", ie]]), ce = {}, de = {
18
+ width: "40",
19
+ height: "40",
20
+ viewBox: "0 0 40 40",
21
+ fill: "currentColor"
22
+ };
23
+ function ue(e, t) {
24
+ return l(), d("svg", de, [...t[0] || (t[0] = [
25
+ i("g", { transform: "matrix(0.13287749,0,0,0.13643171,26.823508,13.407673)" }, [
26
+ i("path", { d: "m -19.25933,-16.057909 c 0,39.1906 -14.287,86.055995 -38.669,116.999999 -7.898,10.024 -30.4718,32.819 -43.7731,17.695 -9.4823,-10.781 -3.53183,-36.917714 -0.86893,-48.907714 9.1618,-41.251693 19.72123,-78.8733849 30.31103,-119.787285 -27.50968,14.537655 -68.26323,-24.154322 -70.36602,-2.214449 -12.32038,69.23655 -28.82323,204.245118 16.36602,215.925448 81.802,10.63 120.333,-82.698004 129.4249996,-148.710999 2.182,-15.84009991 4.123,-31.9832 2.401,-48 -2.342,-21.78506 -24.7959996,-32.68227 -43.7859996,-21.58643 -11.424,6.67523 -12.148,29.93713 -1.935,38.01393 5.462,4.3199 14.927,3.091 20.895,0.5725 z" })
27
+ ], -1)
28
+ ])]);
29
+ }
30
+ const Ye = /* @__PURE__ */ P(ce, [["render", ue]]), fe = {}, be = {
31
+ class: "animate-spin h-6 w-6",
32
+ fill: "none",
33
+ viewBox: "0 0 24 24"
34
+ };
35
+ function he(e, t) {
36
+ return l(), d("svg", be, [...t[0] || (t[0] = [
37
+ i("circle", {
38
+ class: "opacity-25",
39
+ cx: "12",
40
+ cy: "12",
41
+ r: "10",
42
+ stroke: "currentColor",
43
+ "stroke-width": "2"
44
+ }, null, -1),
45
+ i("path", {
46
+ class: "opacity-75",
47
+ fill: "currentColor",
48
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
49
+ }, null, -1)
50
+ ])]);
51
+ }
52
+ const me = /* @__PURE__ */ P(fe, [["render", he]]), ve = "relative inline-flex justify-center items-center gap-2 transition not-disabled:cursor-pointer not-disabled:hover:opacity-90 disabled:pointer-events-none disabled:opacity-40 rounded-md font-medium", J = /* @__PURE__ */ O({
53
+ __name: "VButton",
54
+ props: {
55
+ outline: { type: Boolean, default: !1 },
56
+ color: { default: "transparent" },
57
+ variant: {},
58
+ size: { default: "md" },
59
+ type: { default: "button" },
60
+ block: { type: Boolean, default: !1 },
61
+ disabled: { type: Boolean, default: !1 },
62
+ href: { default: "" },
63
+ to: { default: "" },
64
+ loading: { type: Boolean, default: !1 }
65
+ },
66
+ emits: ["click"],
67
+ setup(e, { emit: t }) {
68
+ const n = t, h = (o) => {
69
+ e.disabled || n("click", o);
70
+ }, u = w(() => e.to ? "router-link" : e.href ? "a" : "button"), a = w(() => e.type === "submit" || e.type === "reset" ? e.type : "button"), r = w(() => e.type === "icon"), x = {
71
+ green: "border border-green-500/20 bg-green-500/10 text-green-600 dark:text-green-400",
72
+ red: "border border-red-500/20 bg-red-500/10 text-red-600 dark:text-red-400",
73
+ gray: "border border-gray-200/70 bg-white/50 text-gray-700 dark:border-white/10 dark:bg-white/[0.05] dark:text-white/70",
74
+ blue: "bg-[var(--accent-blue)] text-white shadow-[0_8px_24px_-12px_rgba(37,99,235,0.9)] hover:brightness-110",
75
+ indigo: "bg-[var(--accent-indigo)] text-white shadow-[0_8px_24px_-12px_rgba(99,102,241,0.9)] hover:brightness-110",
76
+ violet: "bg-[var(--accent-violet)] text-white shadow-[0_8px_24px_-12px_rgba(139,92,246,0.9)] hover:brightness-110",
77
+ emerald: "bg-[var(--accent-emerald)] text-white shadow-[0_8px_24px_-12px_rgba(16,185,129,0.9)] hover:brightness-110",
78
+ amber: "bg-[var(--accent-amber)] text-[#231400] shadow-[0_8px_24px_-12px_rgba(245,158,11,0.9)] hover:brightness-110",
79
+ rose: "bg-[var(--accent-rose)] text-white shadow-[0_8px_24px_-12px_rgba(244,63,94,0.9)] hover:brightness-110",
80
+ slate: "bg-[var(--accent-slate)] text-white shadow-[0_8px_24px_-12px_rgba(71,85,105,0.9)] hover:brightness-110",
81
+ transparent: ""
82
+ }, m = {
83
+ green: "border border-green-500/30 text-green-600 dark:text-green-400",
84
+ red: "border border-red-500/30 text-red-600 dark:text-red-400",
85
+ gray: "border border-gray-300/70 text-gray-700 dark:border-white/15 dark:text-white/70",
86
+ blue: "border border-[var(--accent-blue)] text-[var(--accent-blue)]",
87
+ indigo: "border border-[var(--accent-indigo)] text-[var(--accent-indigo)]",
88
+ violet: "border border-[var(--accent-violet)] text-[var(--accent-violet)]",
89
+ emerald: "border border-[var(--accent-emerald)] text-[var(--accent-emerald)]",
90
+ amber: "border border-[var(--accent-amber)] text-[var(--accent-amber)]",
91
+ rose: "border border-[var(--accent-rose)] text-[var(--accent-rose)]",
92
+ slate: "border border-[var(--accent-slate)] text-[var(--accent-slate)]",
93
+ transparent: ""
94
+ }, b = {
95
+ primary: "bg-vision-primary text-white shadow-[0_12px_32px_-14px_var(--app-accent-shadow,rgba(37,99,235,0.9))] hover:brightness-110",
96
+ cyan: "bg-[#28b7f0] text-[#03111f] shadow-[0_12px_32px_-14px_rgba(40,183,240,0.9)] hover:bg-[#66d3f1]",
97
+ outline: "border border-white/15 bg-transparent text-white hover:border-white/25 hover:bg-white/5",
98
+ ghost: "bg-transparent text-vision-muted hover:bg-white/5 hover:text-white",
99
+ dark: "border border-white/10 bg-vision-card-2 text-white hover:bg-white/5",
100
+ danger: "border border-vision-danger/25 bg-vision-danger/10 text-vision-danger hover:bg-vision-danger/15",
101
+ success: "border border-vision-success/25 bg-vision-success/10 text-vision-success hover:bg-vision-success/15",
102
+ white: "bg-white text-[#060b28] hover:bg-white/90"
103
+ }, g = {
104
+ sm: "h-8 px-3 text-xs",
105
+ md: "h-10 px-3 text-sm",
106
+ lg: "h-12 px-4 text-sm",
107
+ xl: "h-14 px-5 text-sm"
108
+ }, E = {
109
+ sm: "h-9 px-3 text-xs",
110
+ md: "h-11 px-4 text-sm",
111
+ lg: "h-12 px-6 text-sm",
112
+ xl: "h-14 px-6 text-sm"
113
+ }, $ = {
114
+ sm: "size-8",
115
+ md: "size-10",
116
+ lg: "size-12",
117
+ xl: "size-14"
118
+ }, f = w(() => {
119
+ const o = [ve];
120
+ return r.value ? o.push("border border-gray-200/70 dark:border-white/10", $[e.size]) : e.variant ? o.push(b[e.variant], E[e.size]) : o.push(e.outline ? m[e.color] : x[e.color], g[e.size]), e.block.value && o.push("w-full"), e.disabled.value && o.push("pointer-events-none opacity-40"), o;
121
+ });
122
+ return (o, z) => (l(), S(N(u.value), T(o.$attrs, {
123
+ href: e.href || void 0,
124
+ to: e.to || void 0,
125
+ type: a.value,
126
+ disabled: u.value === "button" ? e.disabled : void 0,
127
+ "aria-disabled": e.disabled || void 0,
128
+ class: f.value,
129
+ onClick: h
130
+ }), {
131
+ default: k(() => [
132
+ i("span", {
133
+ class: p(e.loading ? "opacity-0" : "")
134
+ }, [
135
+ v(o.$slots, "default")
136
+ ], 2),
137
+ e.loading ? (l(), S(me, {
138
+ key: 0,
139
+ class: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"
140
+ })) : y("", !0)
141
+ ]),
142
+ _: 3
143
+ }, 16, ["href", "to", "type", "disabled", "aria-disabled", "class"]));
144
+ }
145
+ }), ge = {
146
+ viewBox: "0 0 24 24",
147
+ width: "1.2em",
148
+ height: "1.2em"
149
+ };
150
+ function xe(e, t) {
151
+ return l(), d("svg", ge, [...t[0] || (t[0] = [
152
+ i("path", {
153
+ fill: "currentColor",
154
+ d: "m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z"
155
+ }, null, -1)
156
+ ])]);
157
+ }
158
+ const Q = W({ name: "ri-close-line", render: xe }), pe = { class: "flex items-center absolute right-3 top-5 z-10" }, U = /* @__PURE__ */ O({
159
+ __name: "VPopup",
160
+ props: {
161
+ hiddenCloser: { type: Boolean },
162
+ size: { default: "auto" }
163
+ },
164
+ emits: ["close", "click", "open"],
165
+ setup(e, { emit: t }) {
166
+ const n = t, { show: h, overlay: u, onClose: a, onOpen: r } = H(n), x = A(null), m = A(null), { opacity: b, transform: g } = se(x, m, a), f = { click: (C) => {
167
+ n("click", C);
168
+ }, open: r, set: (C) => {
169
+ C ? r() : a(new Event("hide"));
170
+ } }, o = w(() => ({
171
+ auto: "max-h-[calc(100dvh-50px)]",
172
+ full: "h-[calc(100dvh-24px)] md:h-[calc(100dvh-100px)]",
173
+ screen: "h-dvh"
174
+ })), z = w(() => ({
175
+ auto: "max-h-[calc(100dvh-50px-16px)]",
176
+ full: "h-[calc(100dvh-24px-16px)] md:h-[calc(100dvh-100px-16px)]",
177
+ screen: "h-[calc(100dvh-16px)]"
178
+ }));
179
+ return (C, s) => {
180
+ const M = Q, X = J;
181
+ return l(), S(j, { to: "body" }, [
182
+ V(D, {
183
+ "enter-active-class": "duration-300 ease-out",
184
+ "enter-from-class": "transform opacity-0 translate-y-full xl:-translate-y-2",
185
+ "enter-to-class": "opacity-100 translate-y-0",
186
+ "leave-active-class": "duration-200 ease-in",
187
+ "leave-from-class": "opacity-100 translate-y-0",
188
+ "leave-to-class": "transform opacity-0 translate-y-full xl:-translate-y-2"
189
+ }, {
190
+ default: k(() => [
191
+ c(h) ? (l(), d("div", {
192
+ key: 0,
193
+ ref_key: "container",
194
+ ref: m,
195
+ class: "fixed bottom-0 left-0 w-full z-15"
196
+ }, [
197
+ c(u) ? (l(), d("div", {
198
+ key: 0,
199
+ class: "fixed h-full w-full top-0 left-0 bg-black/40 bg-blur xl:hidden animate-opacity overscroll-contain",
200
+ style: L({ opacity: c(b) }),
201
+ onClick: s[0] || (s[0] = //@ts-ignore
202
+ (...Y) => c(a) && c(a)(...Y)),
203
+ onWheel: s[1] || (s[1] = B(() => {
204
+ }, ["prevent"])),
205
+ onTouchmove: s[2] || (s[2] = B(() => {
206
+ }, ["prevent"]))
207
+ }, null, 36)) : y("", !0),
208
+ i("div", {
209
+ class: p(["glass-popover relative w-full rounded-t-lg border-t shadow-nav", o.value[e.size]]),
210
+ style: L({ transform: c(g) })
211
+ }, [
212
+ i("div", {
213
+ ref_key: "target",
214
+ ref: x,
215
+ class: "flex justify-center py-3 md:pb-6",
216
+ onWheel: s[3] || (s[3] = B(() => {
217
+ }, ["prevent"])),
218
+ onTouchmove: s[4] || (s[4] = B(() => {
219
+ }, ["prevent"]))
220
+ }, [...s[5] || (s[5] = [
221
+ i("div", { class: "self-end h-1 w-12 bg-gray-400" }, null, -1)
222
+ ])], 544),
223
+ i("div", pe, [
224
+ v(C.$slots, "button", { close: c(a) }),
225
+ V(X, {
226
+ class: "size-5 md:size-6",
227
+ color: "transparent",
228
+ size: "none",
229
+ icon: "",
230
+ "aria-label": "Close",
231
+ onClick: c(a)
232
+ }, {
233
+ default: k(() => [
234
+ V(M, { class: "size-5" })
235
+ ]),
236
+ _: 1
237
+ }, 8, ["onClick"])
238
+ ]),
239
+ i("div", {
240
+ class: p(["overflow-y-auto max-h-[calc(100dvh-24px-16px)] overscroll-contain scrollbar", z.value[e.size]])
241
+ }, [
242
+ v(C.$slots, "default", {
243
+ close: c(a),
244
+ on: f
245
+ })
246
+ ], 2)
247
+ ], 6)
248
+ ], 512)) : y("", !0)
249
+ ]),
250
+ _: 3
251
+ })
252
+ ]);
253
+ };
254
+ }
255
+ }), ye = {
256
+ mounted(e, t) {
257
+ e.clickOutsideEvent = function(n) {
258
+ e === n.target || e.contains(n.target) || t.value(n, e);
259
+ }, document.addEventListener("click", e.clickOutsideEvent);
260
+ },
261
+ unmounted(e) {
262
+ document.removeEventListener("click", e.clickOutsideEvent), delete e.clickOutsideEvent;
263
+ }
264
+ }, we = { class: "relative" }, ke = { class: "flex items-center cursor-pointer" }, $e = /* @__PURE__ */ O({
265
+ __name: "VDropdown",
266
+ props: {
267
+ title: { default: "" },
268
+ top: { default: "calc(100% + 8px)" },
269
+ left: { default: "" },
270
+ right: { default: "0" },
271
+ bottom: { default: "" },
272
+ height: { default: "200px" },
273
+ hideOnClick: { type: Boolean, default: !0 },
274
+ disabled: { type: Boolean, default: !1 },
275
+ isPopup: { type: Boolean }
276
+ },
277
+ emits: ["click", "show", "close"],
278
+ setup(e, { emit: t }) {
279
+ const n = t, u = K(G).greaterOrEqual("lg"), a = F(!1), r = w(() => ({ top: e.top, left: e.left, right: e.right, bottom: e.bottom, "max-height": e.height })), x = (o) => {
280
+ u.value && a.value && g(o);
281
+ }, m = (o) => {
282
+ n("click", a.value), !e.disabled && (a.value ? e.hideOnClick && g(o) : b(o));
283
+ }, b = (o) => {
284
+ a.value = !0, n("show", o);
285
+ }, g = (o) => {
286
+ a.value = !1, n("close", o);
287
+ }, E = (o) => {
288
+ o ? b(new Event("show")) : g(new Event("hide"));
289
+ }, $ = () => {
290
+ g(new Event("hide"));
291
+ }, f = { click: m, open: b, set: E };
292
+ return (o, z) => ee((l(), d("div", we, [
293
+ i("div", ke, [
294
+ v(o.$slots, "activator", {
295
+ on: f,
296
+ isShow: a.value
297
+ })
298
+ ]),
299
+ c(u) ? (l(), S(D, {
300
+ key: 0,
301
+ "enter-active-class": "duration-300 ease-out",
302
+ "enter-from-class": "transform opacity-0 -translate-y-2",
303
+ "enter-to-class": "opacity-100 translate-y-0",
304
+ "leave-active-class": "duration-200 ease-in",
305
+ "leave-from-class": "opacity-100 translate-y-0",
306
+ "leave-to-class": "transform opacity-0 -translate-y-2"
307
+ }, {
308
+ default: k(() => [
309
+ a.value ? (l(), d("div", {
310
+ key: 0,
311
+ class: "z-30 min-w-full absolute",
312
+ style: L(r.value)
313
+ }, [
314
+ v(o.$slots, "default", {
315
+ on: f,
316
+ show: b,
317
+ hide: g,
318
+ isShow: a.value
319
+ })
320
+ ], 4)) : y("", !0)
321
+ ]),
322
+ _: 3
323
+ })) : y("", !0),
324
+ !c(u) && a.value ? (l(), S(U, {
325
+ key: 1,
326
+ title: e.title,
327
+ onClose: $
328
+ }, {
329
+ default: k(({ on: C }) => [
330
+ v(o.$slots, "default", {
331
+ on: C,
332
+ show: b,
333
+ hide: g,
334
+ isShow: a.value
335
+ })
336
+ ]),
337
+ _: 3
338
+ }, 8, ["title"])) : y("", !0)
339
+ ])), [
340
+ [c(ye), x]
341
+ ]);
342
+ }
343
+ }), ze = { class: "glass-popover rounded-md" }, Ce = ["onClick"], Be = /* @__PURE__ */ O({
344
+ __name: "VList",
345
+ props: {
346
+ items: {}
347
+ },
348
+ emits: ["click"],
349
+ setup(e, { emit: t }) {
350
+ const n = t, h = (u, a) => n("click", u, a);
351
+ return (u, a) => (l(), d("ul", ze, [
352
+ (l(!0), d(R, null, q(e.items, (r) => (l(), d("li", {
353
+ key: r.name,
354
+ class: "flex min-h-[40px] w-full cursor-pointer items-center whitespace-nowrap border-b border-gray-100 px-4 last:border-b-0 hover:bg-primary/10 dark:border-white/5 dark:hover:bg-white/[0.06]",
355
+ onClick: (x) => h(r, x)
356
+ }, [
357
+ v(u.$slots, "default", { item: r }, () => [
358
+ I(_(r.name), 1)
359
+ ])
360
+ ], 8, Ce))), 128))
361
+ ]));
362
+ }
363
+ }), Ve = { class: "relative flex items-end gap-0.5 w-10" }, Se = ["title"], _e = { class: "absolute -top-1 -left-1 text-xs text-gray-600 dark:text-gray-300" }, Ze = /* @__PURE__ */ O({
364
+ __name: "VWifiIcon",
365
+ props: {
366
+ rssi: { default: 0 },
367
+ channel: { default: 0 }
368
+ },
369
+ setup(e) {
370
+ const t = 2 * (e.rssi + 100), n = (h) => h < t;
371
+ return (h, u) => (l(), d("div", Ve, [
372
+ (l(), d(R, null, q([10, 15, 25, 40, 70], (a, r) => i("div", {
373
+ key: a,
374
+ class: p(["w-1 h-5 rounded-lg", [n(a) ? "bg-gray-900 dark:bg-gray-100" : "bg-gray-300 dark:bg-gray-700"]]),
375
+ style: L(`height: ${(r + 1) * 5}px`),
376
+ title: `rssi: ${e.rssi} channel: ${e.channel}`
377
+ }, null, 14, Se)), 64)),
378
+ i("div", _e, _(e.channel), 1)
379
+ ]));
380
+ }
381
+ }), Oe = {
382
+ viewBox: "0 0 24 24",
383
+ width: "1.2em",
384
+ height: "1.2em"
385
+ };
386
+ function Ee(e, t) {
387
+ return l(), d("svg", Oe, [...t[0] || (t[0] = [
388
+ i("path", {
389
+ fill: "currentColor",
390
+ d: "m12 13.171l4.95-4.95l1.414 1.415L12 16L5.636 9.636L7.05 8.222z"
391
+ }, null, -1)
392
+ ])]);
393
+ }
394
+ const Le = W({ name: "ri-arrow-down-s-line", render: Ee }), Te = { class: "w-full relative" }, De = ["disabled"], Ie = {
395
+ key: 0,
396
+ class: "text-red-400 h-[24px] px-2 text-xs"
397
+ }, Pe = "after:absolute after:h-1 after:w-full after:left-0 after:translate-y-[6px] after:-z-10 after:bg-white dark:after:bg-[#0b1538] after:transition-all", Me = /* @__PURE__ */ O({
398
+ __name: "VTextField",
399
+ props: {
400
+ modelValue: { default: null },
401
+ label: { default: "" },
402
+ component: { default: "input" },
403
+ type: { default: "text" },
404
+ message: { default: "" },
405
+ readonly: { type: Boolean },
406
+ disabled: { type: [Boolean, Number], default: !1 },
407
+ active: { type: Boolean, default: !1 },
408
+ hideMessage: { type: Boolean, default: !1 }
409
+ },
410
+ emits: ["update:modelValue", "click", "on-icon", "enter", "blur", "focus"],
411
+ setup(e, { emit: t }) {
412
+ const n = t, h = {
413
+ input: "w-full h-full px-4 outline-none overflow-ellipsis flex-auto overflow-hidden w-[calc(100% - 20px)] bg-transparent placeholder:text-gray-400 dark:placeholder:text-gray-500",
414
+ textarea: "h-full w-full px-4 py-2 outline-none flex-auto bg-transparent"
415
+ }, u = F(!1), a = w(() => [
416
+ e.component === "input" ? "h-[40px]" : "min-h-[40px]",
417
+ e.message ? "!border-red-400/70 ring-1 ring-red-400/25 hover:!border-red-400" : "",
418
+ e.disabled ? "border-gray-300 opacity-40 dark:border-gray-700" : "border-gray-300/80 hover:border-gray-400/80 dark:border-white/10 dark:hover:border-white/20"
419
+ ]), r = w(() => h[e.component]), x = (s) => s || s === 0, m = w(() => u.value || x(e.modelValue) || e.active), b = w(() => [
420
+ m.value ? Pe : "",
421
+ m.value ? "top-0 left-3 bg-white/80 px-1 text-xs text-gray-500 dark:bg-[#0b1538]/80 dark:text-gray-400" : "top-1/2 bg-transparent px-0 text-gray-400 dark:text-gray-500"
422
+ ]), g = w(() => e.component === "input"), E = (s) => {
423
+ u.value = !1, n("blur", s);
424
+ }, $ = (s) => {
425
+ u.value = !0, n("focus", s);
426
+ }, f = ({ target: s }) => n("update:modelValue", s.value), o = (s) => n("enter", s), z = (s) => n("click", s), C = (s) => {
427
+ e.disabled || n("on-icon", s);
428
+ };
429
+ return (s, M) => (l(), d("div", Te, [
430
+ i("label", {
431
+ class: p(["glass-inset relative flex w-full items-center rounded-md transition focus-within:border-primary/60 focus-within:ring-1 focus-within:ring-primary/20", a.value])
432
+ }, [
433
+ i("span", {
434
+ class: p(["absolute left-3.5 -translate-y-1/2 rounded transition-all", b.value])
435
+ }, _(e.label), 3),
436
+ (l(), S(N(e.component), T(s.$attrs, {
437
+ value: e.modelValue,
438
+ disabled: !!e.disabled,
439
+ type: e.type,
440
+ readonly: e.readonly,
441
+ rows: g.value ? null : "2",
442
+ wrap: g.value ? null : "soft",
443
+ class: r.value,
444
+ onFocus: $,
445
+ onBlur: E,
446
+ onInput: f,
447
+ onClick: z,
448
+ onKeypress: te(o, ["enter"])
449
+ }), null, 16, ["value", "disabled", "type", "readonly", "rows", "wrap", "class"])),
450
+ s.$slots.icon ? (l(), d("button", {
451
+ key: 0,
452
+ disabled: !!e.disabled,
453
+ class: p([{ "cursor-pointer": !e.disabled }, "flex h-full flex-[0_0_50px] items-center justify-center border-l border-gray-200/70 text-gray-400 dark:border-white/10"]),
454
+ onClick: C
455
+ }, [
456
+ v(s.$slots, "icon")
457
+ ], 10, De)) : y("", !0)
458
+ ], 2),
459
+ e.hideMessage ? y("", !0) : (l(), d("div", Ie, [
460
+ v(s.$slots, "message", {}, () => [
461
+ I(_(e.message), 1)
462
+ ])
463
+ ]))
464
+ ]));
465
+ }
466
+ }), Ae = { class: "glass-popover min-w-50 w-full rounded-md pb-6 transition-all duration-300 lg:pb-0" }, Ne = {
467
+ key: 0,
468
+ class: "lg:hidden text-title-md font-bold mb-4 uppercase px-4 sticky top-0"
469
+ }, We = { class: "h-full h-hull lg:max-h-44 lg:overflow-auto scrollbar lg:overscroll-contain" }, et = /* @__PURE__ */ O({
470
+ inheritAttrs: !1,
471
+ __name: "VSelect",
472
+ props: {
473
+ modelValue: {},
474
+ label: {},
475
+ disabled: { type: Boolean },
476
+ items: {},
477
+ title: {},
478
+ top: {},
479
+ left: {},
480
+ right: {},
481
+ bottom: {},
482
+ height: {},
483
+ hideOnClick: { type: Boolean },
484
+ isPopup: { type: Boolean }
485
+ },
486
+ emits: ["change"],
487
+ setup(e, { emit: t }) {
488
+ const n = ae(e, ["modelValue", "label", "items", "disabled"]), h = t;
489
+ function u(a, r) {
490
+ h("change", a), r == null || r.set(!1);
491
+ }
492
+ return (a, r) => {
493
+ const x = Le;
494
+ return l(), S($e, T(n, {
495
+ "hide-on-click": !1,
496
+ class: "relative"
497
+ }), {
498
+ activator: k(({ on: m, isShow: b }) => [
499
+ v(a.$slots, "activator", le(oe({ on: m, isShow: b })), () => [
500
+ V(Me, {
501
+ "model-value": e.modelValue,
502
+ disabled: e.disabled,
503
+ label: e.label,
504
+ readonly: "",
505
+ hideMessage: "",
506
+ active: "",
507
+ onClick: m.click,
508
+ onOnIcon: m.click
509
+ }, {
510
+ icon: k(() => [
511
+ V(x, {
512
+ class: p(["transition duration-300", b ? "rotate-180" : ""])
513
+ }, null, 8, ["class"])
514
+ ]),
515
+ _: 2
516
+ }, 1032, ["model-value", "disabled", "label", "onClick", "onOnIcon"])
517
+ ])
518
+ ]),
519
+ default: k(({ on: m }) => [
520
+ i("div", Ae, [
521
+ e.label ? (l(), d("h4", Ne, _(e.label), 1)) : y("", !0),
522
+ i("div", We, [
523
+ V(Be, {
524
+ items: e.items,
525
+ onClick: (b) => u(b, m)
526
+ }, {
527
+ default: k(({ item: b }) => [
528
+ v(a.$slots, "item", { item: b }, () => [
529
+ I(_(b.name), 1)
530
+ ])
531
+ ]),
532
+ _: 3
533
+ }, 8, ["items", "onClick"])
534
+ ])
535
+ ])
536
+ ]),
537
+ _: 3
538
+ }, 16);
539
+ };
540
+ }
541
+ }), je = {
542
+ key: 0,
543
+ class: "loader-line w-full absolute top-0 left-0 h-[3px] bg-gray-100 dark:bg-white/5 before:bg-primary before:h-1 rounded-xl z-20 before:absolute before:w-[40%] before:-left-1/2 before:content-[''] before:animate-[lineAnim_1s_linear_infinite]"
544
+ }, Fe = {
545
+ key: 1,
546
+ class: "absolute top-0 left-0 w-full h-full bg-gray-50 dark:bg-[#060b28]/75 z-10 opacity-50"
547
+ }, Re = {
548
+ key: 2,
549
+ class: "mb-4 flex items-center justify-between"
550
+ }, qe = { class: "text-lg font-semibold text-gray-800 dark:text-white" }, He = ["inert", "aria-disabled"], tt = /* @__PURE__ */ O({
551
+ __name: "CardMain",
552
+ props: {
553
+ title: {},
554
+ loading: { type: Boolean },
555
+ disabled: { type: Boolean }
556
+ },
557
+ setup(e) {
558
+ return (t, n) => (l(), d("div", {
559
+ class: p(["glass-panel relative p-5 transition-all duration-300 hover:border-primary/25 hover:shadow-[inset_0_1px_0_rgba(255,255,255,0.18),0_0_60px_-18px_rgba(40,183,240,0.25)] sm:p-6", { "overflow-hidden": e.loading }])
560
+ }, [
561
+ e.loading ? (l(), d("div", je)) : y("", !0),
562
+ e.loading ? (l(), d("div", Fe)) : y("", !0),
563
+ e.title ? (l(), d("div", Re, [
564
+ i("h3", qe, _(e.title), 1),
565
+ i("div", null, [
566
+ v(t.$slots, "header")
567
+ ])
568
+ ])) : y("", !0),
569
+ i("div", {
570
+ class: "max-w-full",
571
+ inert: e.disabled,
572
+ "aria-disabled": e.disabled || void 0
573
+ }, [
574
+ v(t.$slots, "default")
575
+ ], 8, He)
576
+ ], 2));
577
+ }
578
+ }), Ke = { class: "text-title-md uppercase font-bold flex-auto" }, Ge = { class: "px-4 pb-4 md:px-6" }, Je = {
579
+ key: 0,
580
+ class: "text-title-md uppercase font-bold"
581
+ }, at = /* @__PURE__ */ O({
582
+ __name: "VDialog",
583
+ props: {
584
+ title: {},
585
+ size: { default: "md" },
586
+ popupSize: { default: "auto" },
587
+ color: { default: "white" },
588
+ type: {},
589
+ hiddenCloser: { type: Boolean },
590
+ isOnlyDialog: { type: Boolean },
591
+ timeout: {}
592
+ },
593
+ emits: ["close", "click", "open"],
594
+ setup(e, { expose: t, emit: n }) {
595
+ const h = n, u = K(G), { show: a, onClose: r, onOpen: x } = H(h, e.timeout), m = {
596
+ sm: "max-w-full md:max-w-[330px] max-md:h-full",
597
+ md: "max-w-full md:max-w-[672px] max-md:h-full",
598
+ lg: "max-w-full md:max-w-[960px] max-md:h-full",
599
+ full: "relative max-w-full w-full h-3/4 "
600
+ }, b = {
601
+ none: "",
602
+ white: "glass-panel",
603
+ gray: ""
604
+ }, g = w(() => [m[e.size], b[e.color]]), E = u.greaterOrEqual("lg");
605
+ return t({
606
+ show: a,
607
+ onClose: r
608
+ }), ($, f) => {
609
+ const o = Q;
610
+ return e.isOnlyDialog || c(E) ? (l(), S(j, {
611
+ key: 0,
612
+ to: "body"
613
+ }, [
614
+ V(D, {
615
+ "enter-active-class": "duration-300 ease-out",
616
+ "enter-from-class": "transform opacity-0 -translate-y-2",
617
+ "enter-to-class": "opacity-100 translate-y-0",
618
+ "leave-active-class": "duration-200 ease-in",
619
+ "leave-from-class": "opacity-100 translate-y-0",
620
+ "leave-to-class": "transform opacity-0 -translate-y-2",
621
+ onAfterEnter: c(x)
622
+ }, {
623
+ default: k(() => [
624
+ c(a) ? (l(), d("div", {
625
+ key: 0,
626
+ class: "z-20 fixed top-0 h-dvh w-full left-0 flex flex-col",
627
+ onWheel: f[4] || (f[4] = B(() => {
628
+ }, ["stop"]))
629
+ }, [
630
+ i("div", {
631
+ class: "absolute h-full w-full top-0 left-0 bg-black/40 bg-blur",
632
+ onClick: f[0] || (f[0] = //@ts-ignore
633
+ (...z) => c(r) && c(r)(...z))
634
+ }),
635
+ i("div", {
636
+ class: p(["flex-auto flex align-center overflow-y-auto overscroll-contain", (e.size === "full", "")])
637
+ }, [
638
+ i("div", {
639
+ class: p(["m-auto z-20 flex w-full flex-col overflow-auto overscroll-contain scrollbar bg-transparent shadow-lg", g.value])
640
+ }, [
641
+ i("div", {
642
+ class: p(["flex items-center min-h-14 border-b border-gray-200/70 bg-white/35 px-6 dark:border-white/10 dark:bg-white/[0.03]", e.size === "full" ? "absolute top-0 right-4 border-0 bg-transparent px-0" : ""]),
643
+ onWheel: f[1] || (f[1] = B(() => {
644
+ }, ["prevent"])),
645
+ onTouchmove: f[2] || (f[2] = B(() => {
646
+ }, ["prevent"]))
647
+ }, [
648
+ i("h4", Ke, _(e.title), 1),
649
+ v($.$slots, "header-btn", { close: c(r) }),
650
+ V(J, {
651
+ color: "transparent",
652
+ type: "icon",
653
+ size: "sm",
654
+ onClick: c(r)
655
+ }, {
656
+ default: k(() => [
657
+ V(o)
658
+ ]),
659
+ _: 1
660
+ }, 8, ["onClick"])
661
+ ], 34),
662
+ i("div", {
663
+ class: p(["relative overflow-auto max-h-dvh scrollbar overflow-y-auto overscroll-contain min-h-0 max-md:flex-auto", e.size === "full" ? "flex-auto" : "md:max-h-147.5 px-6 pb-6 pt-5"]),
664
+ onClose: f[3] || (f[3] = //@ts-ignore
665
+ (...z) => c(r) && c(r)(...z))
666
+ }, [
667
+ v($.$slots, "default", { close: c(r) })
668
+ ], 34)
669
+ ], 2)
670
+ ], 2)
671
+ ], 32)) : y("", !0)
672
+ ]),
673
+ _: 3
674
+ }, 8, ["onAfterEnter"])
675
+ ])) : (l(), S(U, {
676
+ key: 1,
677
+ size: e.popupSize,
678
+ onClose: c(r)
679
+ }, {
680
+ button: k(() => [
681
+ v($.$slots, "header-btn", { close: c(r) })
682
+ ]),
683
+ default: k(({ close: z }) => [
684
+ i("div", Ge, [
685
+ i("div", {
686
+ class: p(["flex items-center mb-4", e.size === "full" ? "absolute top-0 right-4" : ""]),
687
+ onWheel: f[5] || (f[5] = B(() => {
688
+ }, ["prevent"])),
689
+ onTouchmove: f[6] || (f[6] = B(() => {
690
+ }, ["prevent"]))
691
+ }, [
692
+ e.title ? (l(), d("h4", Je, _(e.title), 1)) : y("", !0)
693
+ ], 34),
694
+ v($.$slots, "default", { close: z })
695
+ ])
696
+ ]),
697
+ _: 3
698
+ }, 8, ["size", "onClose"]));
699
+ };
700
+ }
701
+ });
702
+ export {
703
+ Xe as V,
704
+ at as _,
705
+ Ye as a,
706
+ tt as b,
707
+ ye as c,
708
+ Ze as d,
709
+ et as e,
710
+ Me as f,
711
+ Be as g,
712
+ $e as h,
713
+ me as i,
714
+ J as j,
715
+ Q as k,
716
+ P as l,
717
+ U as m
718
+ };