@vue/devtools-ui 8.0.1 → 8.0.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/dist/index.cjs +2 -2
- package/dist/index.js +418 -419
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
// @unocss-include
|
|
2
2
|
|
|
3
|
-
import { Dropdown as
|
|
4
|
-
import { vTooltip as
|
|
3
|
+
import { Dropdown as oe, vClosePopper as q, Tooltip as ne } from "floating-vue";
|
|
4
|
+
import { vTooltip as Vt } from "floating-vue";
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
|
-
import { createElementBlock as
|
|
8
|
-
import { useVModel as T, useScrollLock as
|
|
7
|
+
import { createElementBlock as m, openBlock as s, renderSlot as g, createElementVNode as c, defineComponent as h, useAttrs as re, computed as k, useSlots as J, createBlock as w, resolveDynamicComponent as X, mergeProps as D, withCtx as p, createCommentVNode as $, unref as v, normalizeClass as y, shallowRef as le, nextTick as H, Fragment as E, renderList as R, toDisplayString as V, watchEffect as P, ref as S, onMounted as z, Teleport as G, createVNode as x, Transition as N, normalizeStyle as O, createTextVNode as B, isRef as j, h as ie, render as K, normalizeProps as Q, guardReactiveProps as Z, withModifiers as se, provide as de, createSlots as _, inject as ue, withDirectives as A, vModelDynamic as ce } from "vue";
|
|
8
|
+
import { useVModel as T, useScrollLock as me, onKeyStroke as ee, useColorMode as fe, useElementSize as pe, refDebounced as ge, refWithControl as ve, useToggle as be } from "@vueuse/core";
|
|
9
9
|
import { createHighlighterCore as ye } from "shiki/core";
|
|
10
10
|
import { createJavaScriptRegexEngine as he } from "shiki/engine/javascript";
|
|
11
11
|
import { i as ke } from "./ic-icons-data-B4q1VTSq.js";
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
for (const [
|
|
15
|
-
|
|
16
|
-
return
|
|
12
|
+
const W = (e, o) => {
|
|
13
|
+
const t = e.__vccOpts || e;
|
|
14
|
+
for (const [r, a] of o)
|
|
15
|
+
t[r] = a;
|
|
16
|
+
return t;
|
|
17
17
|
}, we = {}, $e = { class: "mx-0.5 $ui-base inline-block select-none whitespace-nowrap rounded px-1.5 py-0.5 text-xs" };
|
|
18
|
-
function
|
|
19
|
-
return
|
|
20
|
-
|
|
18
|
+
function xe(e, o) {
|
|
19
|
+
return s(), m("span", $e, [
|
|
20
|
+
g(e.$slots, "default")
|
|
21
21
|
]);
|
|
22
22
|
}
|
|
23
|
-
const dt = /* @__PURE__ */
|
|
24
|
-
function
|
|
25
|
-
return
|
|
26
|
-
|
|
23
|
+
const dt = /* @__PURE__ */ W(we, [["render", xe]]), Ce = {}, Ve = { class: "h-3 w-3 $ui-inline-fcc" };
|
|
24
|
+
function Be(e, o) {
|
|
25
|
+
return s(), m("div", Ve, [...o[0] || (o[0] = [
|
|
26
|
+
c("svg", {
|
|
27
27
|
class: "animate-spin",
|
|
28
28
|
xmlns: "http://www.w3.org/2000/svg",
|
|
29
29
|
fill: "none",
|
|
30
30
|
viewBox: "0 0 24 24"
|
|
31
31
|
}, [
|
|
32
|
-
|
|
32
|
+
c("circle", {
|
|
33
33
|
class: "opacity-25",
|
|
34
34
|
cx: "12",
|
|
35
35
|
cy: "12",
|
|
@@ -37,15 +37,15 @@ function _e(n, t) {
|
|
|
37
37
|
stroke: "currentColor",
|
|
38
38
|
"stroke-width": "4"
|
|
39
39
|
}),
|
|
40
|
-
|
|
40
|
+
c("path", {
|
|
41
41
|
class: "opacity-75",
|
|
42
42
|
fill: "currentColor",
|
|
43
43
|
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"
|
|
44
44
|
})
|
|
45
45
|
], -1)
|
|
46
|
-
]));
|
|
46
|
+
])]);
|
|
47
47
|
}
|
|
48
|
-
const te = /* @__PURE__ */
|
|
48
|
+
const te = /* @__PURE__ */ W(Ce, [["render", Be]]), Te = { key: 2 }, M = /* @__PURE__ */ h({
|
|
49
49
|
inheritAttrs: !1,
|
|
50
50
|
__name: "Button",
|
|
51
51
|
props: {
|
|
@@ -58,16 +58,16 @@ const te = /* @__PURE__ */ A(Ve, [["render", _e]]), Te = { key: 2 }, M = /* @__P
|
|
|
58
58
|
outlined: { type: Boolean, default: !1 }
|
|
59
59
|
},
|
|
60
60
|
emits: ["click"],
|
|
61
|
-
setup(
|
|
62
|
-
const
|
|
63
|
-
function
|
|
64
|
-
if (
|
|
65
|
-
|
|
61
|
+
setup(e, { emit: o }) {
|
|
62
|
+
const t = e, r = o, a = re(), n = k(() => a.to ? "router-link" : a.href ? "a" : "button"), d = k(() => t.loading || t.disabled);
|
|
63
|
+
function l(b) {
|
|
64
|
+
if (d.value) {
|
|
65
|
+
b.preventDefault(), b.stopPropagation(), b.stopImmediatePropagation();
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
r("click", b);
|
|
69
69
|
}
|
|
70
|
-
const
|
|
70
|
+
const i = {
|
|
71
71
|
common: {
|
|
72
72
|
default: "active:bg-primary-100-darker dark:active:bg-gray-800-darker",
|
|
73
73
|
primary: "active:bg-primary-500-darker",
|
|
@@ -104,76 +104,76 @@ const te = /* @__PURE__ */ A(Ve, [["render", _e]]), Te = { key: 2 }, M = /* @__P
|
|
|
104
104
|
info: "hover:border-info-500 hover:text-info-500 active:ring-info-500:5 active:bg-info-500:5",
|
|
105
105
|
success: "hover:border-primary-500 hover:text-primary-500 active:ring-primary-500:5 active:bg-primary-500:5"
|
|
106
106
|
}
|
|
107
|
-
},
|
|
108
|
-
return (
|
|
107
|
+
}, f = J(), u = k(() => t.flat ? i.flat[t.type] : t.outlined ? i.outlined[t.type] : i.normal[t.type]);
|
|
108
|
+
return (b, C) => (s(), w(X(n.value), D(b.$attrs, {
|
|
109
109
|
role: "button",
|
|
110
|
-
"aria-disabled":
|
|
110
|
+
"aria-disabled": d.value,
|
|
111
111
|
class: ["$ui-base $ui-inline-fcc inline-flex cursor-pointer select-none gap1.25 py-0 no-underline $ui-transition", [
|
|
112
|
-
[
|
|
112
|
+
[i.common[t.type]],
|
|
113
113
|
{
|
|
114
|
-
"rounded-full":
|
|
115
|
-
"$ui-base-br":
|
|
116
|
-
"opacity-50 cursor-not-allowed":
|
|
117
|
-
"bg-transparent":
|
|
114
|
+
"rounded-full": t.round === "full",
|
|
115
|
+
"$ui-base-br": t.round === "normal",
|
|
116
|
+
"opacity-50 cursor-not-allowed": d.value,
|
|
117
|
+
"bg-transparent": t.flat || t.outlined
|
|
118
118
|
},
|
|
119
119
|
[
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
e.outlined ? "b-1 $ui-border-base active:ring-3 shadow-sm" : "border-none",
|
|
121
|
+
e.size === "mini" ? "px1 text-3 h5.5" : "px3.5 text-3.5 h8",
|
|
122
|
+
u.value
|
|
123
123
|
]
|
|
124
124
|
]],
|
|
125
|
-
onClickCapture:
|
|
125
|
+
onClickCapture: l
|
|
126
126
|
}), {
|
|
127
|
-
default:
|
|
128
|
-
|
|
127
|
+
default: p(() => [
|
|
128
|
+
e.loading ? (s(), w(te, {
|
|
129
129
|
key: 0,
|
|
130
130
|
class: "mt0.5 h-full w3"
|
|
131
|
-
})) :
|
|
131
|
+
})) : g(b.$slots, "icon", {
|
|
132
132
|
key: 1,
|
|
133
133
|
class: "h-full w3 $ui-inline-fcc"
|
|
134
134
|
}),
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
v(f).default ? (s(), m("div", Te, [
|
|
136
|
+
g(b.$slots, "default")
|
|
137
137
|
])) : $("", !0),
|
|
138
|
-
|
|
138
|
+
g(b.$slots, "icon-right")
|
|
139
139
|
]),
|
|
140
140
|
_: 3
|
|
141
141
|
}, 16, ["aria-disabled", "class"]));
|
|
142
142
|
}
|
|
143
143
|
}), De = {}, Me = { class: "$ui-base border $ui-border-base rounded shadow-sm" };
|
|
144
|
-
function Se(
|
|
145
|
-
return
|
|
146
|
-
|
|
144
|
+
function Se(e, o) {
|
|
145
|
+
return s(), m("div", Me, [
|
|
146
|
+
g(e.$slots, "default")
|
|
147
147
|
]);
|
|
148
148
|
}
|
|
149
|
-
const ut = /* @__PURE__ */
|
|
149
|
+
const ut = /* @__PURE__ */ W(De, [["render", Se]]), ct = /* @__PURE__ */ h({
|
|
150
150
|
__name: "Checkbox",
|
|
151
151
|
props: {
|
|
152
152
|
modelValue: { type: Boolean },
|
|
153
153
|
variant: { default: "normal" }
|
|
154
154
|
},
|
|
155
155
|
emits: ["update:modelValue"],
|
|
156
|
-
setup(
|
|
157
|
-
const
|
|
158
|
-
return (
|
|
156
|
+
setup(e, { emit: o }) {
|
|
157
|
+
const a = T(e, "modelValue", o);
|
|
158
|
+
return (n, d) => (s(), m("div", {
|
|
159
159
|
class: y(["relative $ui-base h5 w5 $ui-inline-fcc cursor-pointer border-0.125rem rounded-1.25 transition-colors duration-200 ease-in-out", [
|
|
160
|
-
|
|
160
|
+
v(a) ? e.variant === "normal" ? "bg-primary-500 border-primary-200 dark:border-primary-100" : "bg-accent-500 border-accent-200 dark:border-accent-100" : ""
|
|
161
161
|
]]),
|
|
162
|
-
onClick:
|
|
162
|
+
onClick: d[0] || (d[0] = (l) => a.value = !v(a))
|
|
163
163
|
}, [
|
|
164
|
-
|
|
164
|
+
c("div", {
|
|
165
165
|
class: y([[
|
|
166
|
-
|
|
166
|
+
v(a) ? "opacity-100" : "opacity-0"
|
|
167
167
|
], "h-60% w-35% transform-translate-y--0.25 transform-rotate-45 border-width-[0_0.125rem_0.125rem_0] border-white border-solid transition-opacity duration-200 ease-in-out"])
|
|
168
168
|
}, null, 2)
|
|
169
169
|
], 2));
|
|
170
170
|
}
|
|
171
171
|
}), I = le();
|
|
172
|
-
let
|
|
173
|
-
function Ie(
|
|
174
|
-
if (!
|
|
175
|
-
const
|
|
176
|
-
|
|
172
|
+
let Y = null;
|
|
173
|
+
function Ie(e, o = "text") {
|
|
174
|
+
if (!Y && !I.value) {
|
|
175
|
+
const r = he();
|
|
176
|
+
Y = ye({
|
|
177
177
|
themes: [
|
|
178
178
|
import("shiki/themes/vitesse-dark.mjs"),
|
|
179
179
|
import("shiki/themes/vitesse-light.mjs")
|
|
@@ -190,15 +190,15 @@ function Ie(n, t = "text") {
|
|
|
190
190
|
import("shiki/langs/diff.mjs"),
|
|
191
191
|
import("shiki/langs/shellscript.mjs")
|
|
192
192
|
],
|
|
193
|
-
engine:
|
|
194
|
-
}).then((
|
|
195
|
-
I.value =
|
|
193
|
+
engine: r
|
|
194
|
+
}).then((a) => {
|
|
195
|
+
I.value = a;
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
-
const
|
|
199
|
-
return
|
|
200
|
-
code: I.value.codeToHtml(
|
|
201
|
-
lang:
|
|
198
|
+
const t = I.value?.getLoadedLanguages().includes(o);
|
|
199
|
+
return t ? {
|
|
200
|
+
code: I.value.codeToHtml(e, {
|
|
201
|
+
lang: o,
|
|
202
202
|
themes: {
|
|
203
203
|
dark: "vitesse-dark",
|
|
204
204
|
light: "vitesse-light"
|
|
@@ -206,11 +206,11 @@ function Ie(n, t = "text") {
|
|
|
206
206
|
}),
|
|
207
207
|
supported: !0
|
|
208
208
|
} : {
|
|
209
|
-
code:
|
|
210
|
-
supported:
|
|
209
|
+
code: e,
|
|
210
|
+
supported: t
|
|
211
211
|
};
|
|
212
212
|
}
|
|
213
|
-
const Ee = ["innerHTML"], Pe = { class: "shiki" }, ze = ["textContent"],
|
|
213
|
+
const Ee = ["innerHTML"], Pe = { class: "shiki" }, ze = ["textContent"], mt = /* @__PURE__ */ h({
|
|
214
214
|
__name: "CodeBlock",
|
|
215
215
|
props: {
|
|
216
216
|
code: {},
|
|
@@ -219,52 +219,52 @@ const Ee = ["innerHTML"], Pe = { class: "shiki" }, ze = ["textContent"], pt = /*
|
|
|
219
219
|
transformRendered: {}
|
|
220
220
|
},
|
|
221
221
|
emits: ["loaded"],
|
|
222
|
-
setup(
|
|
223
|
-
const
|
|
224
|
-
const
|
|
225
|
-
return
|
|
222
|
+
setup(e, { emit: o }) {
|
|
223
|
+
const t = e, r = o, a = k(() => {
|
|
224
|
+
const n = t.lang === "text" ? { code: t.code, supported: !1 } : Ie(t.code, t.lang) || { code: t.code, supported: !1 };
|
|
225
|
+
return n.supported && t.transformRendered && (n.code = t.transformRendered(n.code)), n.supported && H(() => r("loaded")), n;
|
|
226
226
|
});
|
|
227
|
-
return (
|
|
227
|
+
return (n, d) => e.lang && a.value.supported ? (s(), m("pre", {
|
|
228
228
|
key: 0,
|
|
229
|
-
class: y(["code-block",
|
|
230
|
-
innerHTML:
|
|
231
|
-
}, null, 10, Ee)) : (
|
|
229
|
+
class: y(["code-block", e.lines ? "code-block-lines" : ""]),
|
|
230
|
+
innerHTML: a.value.code
|
|
231
|
+
}, null, 10, Ee)) : (s(), m("pre", {
|
|
232
232
|
key: 1,
|
|
233
|
-
class: y(["code-block",
|
|
233
|
+
class: y(["code-block", e.lines ? "code-block-lines" : ""])
|
|
234
234
|
}, [
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
(
|
|
238
|
-
`), (
|
|
239
|
-
|
|
235
|
+
c("pre", Pe, [
|
|
236
|
+
c("code", null, [
|
|
237
|
+
(s(!0), m(E, null, R(e.code.split(`
|
|
238
|
+
`), (l, i) => (s(), m(E, { key: i }, [
|
|
239
|
+
c("span", {
|
|
240
240
|
class: "line",
|
|
241
|
-
textContent:
|
|
241
|
+
textContent: V(l)
|
|
242
242
|
}, null, 8, ze),
|
|
243
|
-
|
|
243
|
+
d[0] || (d[0] = c("br", null, null, -1))
|
|
244
244
|
], 64))), 128))
|
|
245
245
|
])
|
|
246
246
|
])
|
|
247
247
|
], 2));
|
|
248
248
|
}
|
|
249
|
-
}),
|
|
249
|
+
}), ae = /* @__PURE__ */ h({
|
|
250
250
|
__name: "Overlay",
|
|
251
251
|
props: {
|
|
252
252
|
dim: { type: Boolean },
|
|
253
253
|
blur: { type: Boolean },
|
|
254
254
|
position: { default: "fixed" }
|
|
255
255
|
},
|
|
256
|
-
setup(
|
|
257
|
-
return (
|
|
256
|
+
setup(e) {
|
|
257
|
+
return (o, t) => (s(), m("div", {
|
|
258
258
|
class: y(["left-0 top-0 $ui-z-max h-full w-full $ui-fcc $ui-bg-base transition-opacity transition-duration-300", [
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
259
|
+
e.dim ? "bg-opacity-50!" : "bg-opacity-0!",
|
|
260
|
+
e.blur ? "backdrop-blur-sm" : "",
|
|
261
|
+
e.position
|
|
262
262
|
]])
|
|
263
263
|
}, [
|
|
264
|
-
|
|
264
|
+
g(o.$slots, "default")
|
|
265
265
|
], 2));
|
|
266
266
|
}
|
|
267
|
-
}), Le = { class: "h7.5 w-full $ui-fbc" }, Re = { class: "text-4.5" }, Fe = { class: "content transition-all transition-duration-300" },
|
|
267
|
+
}), Le = { class: "h7.5 w-full $ui-fbc" }, Re = { class: "text-4.5" }, Fe = { class: "content transition-all transition-duration-300" }, He = { class: "footer h8 w-full transition-all transition-duration-300 delay-250" }, Ne = { class: "$ui-fcc" }, Oe = /* @__PURE__ */ h({
|
|
268
268
|
__name: "Dialog",
|
|
269
269
|
props: {
|
|
270
270
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -279,73 +279,72 @@ const Ee = ["innerHTML"], Pe = { class: "shiki" }, ze = ["textContent"], pt = /*
|
|
|
279
279
|
position: {}
|
|
280
280
|
},
|
|
281
281
|
emits: ["close", "update:modelValue"],
|
|
282
|
-
setup(
|
|
283
|
-
const
|
|
282
|
+
setup(e, { emit: o }) {
|
|
283
|
+
const t = e, a = T(t, "modelValue", o, { passive: !0 }), n = me(() => window.document.documentElement);
|
|
284
284
|
P(() => {
|
|
285
|
-
|
|
285
|
+
a.value ? n.value = !0 : n.value = !1;
|
|
286
286
|
});
|
|
287
|
-
function
|
|
288
|
-
|
|
287
|
+
function d() {
|
|
288
|
+
a.value && t.autoClose && (a.value = !1);
|
|
289
289
|
}
|
|
290
290
|
ee("Escape", () => {
|
|
291
|
-
|
|
291
|
+
d();
|
|
292
292
|
});
|
|
293
|
-
const
|
|
294
|
-
return z(() =>
|
|
293
|
+
const l = S(!1);
|
|
294
|
+
return z(() => l.value = !0), (i, f) => l.value || e.mountTo === "body" ? (s(), w(G, {
|
|
295
295
|
key: 0,
|
|
296
|
-
to:
|
|
296
|
+
to: e.mountTo
|
|
297
297
|
}, [
|
|
298
|
-
|
|
298
|
+
x(N, {
|
|
299
299
|
"enter-from-class": "opacity-0 [&_.modal]:scale-95 [&_.content,&_.footer]:translate-y--2.5 [&_.content,&_.footer]:opacity-0",
|
|
300
300
|
"enter-to-class": "opacity-100 [&_.modal]:scale-100",
|
|
301
301
|
"leave-from-class": "opacity-100 [&_.modal]:scale-100",
|
|
302
302
|
"leave-to-class": "opacity-0 [&_.modal]:scale-95"
|
|
303
303
|
}, {
|
|
304
|
-
default:
|
|
305
|
-
|
|
304
|
+
default: p(() => [
|
|
305
|
+
v(a) ? (s(), w(ae, {
|
|
306
306
|
key: 0,
|
|
307
|
-
dim:
|
|
308
|
-
blur:
|
|
309
|
-
position:
|
|
307
|
+
dim: e.dim,
|
|
308
|
+
blur: e.blur,
|
|
309
|
+
position: e.position
|
|
310
310
|
}, {
|
|
311
|
-
default:
|
|
312
|
-
|
|
311
|
+
default: p(() => [
|
|
312
|
+
c("div", {
|
|
313
313
|
class: "modal relative grid grid-rows-[1.875rem_1fr_2.5rem] $ui-base max-h-[calc(100vh-6.25rem)] max-w-[calc(100vw-6.25rem)] min-h-6.25rem min-w-12.5rem gap-2.5 rounded-md bg-white px6 py4.5 color-gray-800 shadow-2xl transition-transform transition-duration-300 dark:bg-gray-900 dark:color-gray-200",
|
|
314
|
-
style:
|
|
315
|
-
width:
|
|
316
|
-
height:
|
|
314
|
+
style: O({
|
|
315
|
+
width: t.width,
|
|
316
|
+
height: t.height
|
|
317
317
|
})
|
|
318
318
|
}, [
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
319
|
+
c("div", Le, [
|
|
320
|
+
c("div", Re, [
|
|
321
|
+
g(i.$slots, "title", {}, () => [
|
|
322
|
+
B(V(t.title), 1)
|
|
323
323
|
])
|
|
324
324
|
]),
|
|
325
|
-
|
|
325
|
+
e.closable ? (s(), m("div", {
|
|
326
326
|
key: 0,
|
|
327
327
|
class: "h6 w6 $ui-fcc cursor-pointer rounded-full transition-colors hover:bg-primary-100 dark:hover:bg-gray-700",
|
|
328
|
-
onClick:
|
|
329
|
-
},
|
|
330
|
-
|
|
331
|
-
]))) : $("", !0)
|
|
328
|
+
onClick: d
|
|
329
|
+
}, [...f[0] || (f[0] = [
|
|
330
|
+
c("div", { class: "i-carbon-close" }, null, -1)
|
|
331
|
+
])])) : $("", !0)
|
|
332
332
|
]),
|
|
333
|
-
|
|
334
|
-
|
|
333
|
+
c("div", Fe, [
|
|
334
|
+
g(i.$slots, "default")
|
|
335
335
|
]),
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
336
|
+
c("div", He, [
|
|
337
|
+
g(i.$slots, "footer", {}, () => [
|
|
338
|
+
g(i.$slots, "footer", {}, () => [
|
|
339
|
+
c("div", Ne, [
|
|
340
|
+
x(M, {
|
|
341
341
|
type: "primary",
|
|
342
|
-
onClick:
|
|
342
|
+
onClick: d
|
|
343
343
|
}, {
|
|
344
|
-
default:
|
|
345
|
-
|
|
346
|
-
])),
|
|
347
|
-
_: 1
|
|
348
|
-
__: [1]
|
|
344
|
+
default: p(() => [...f[1] || (f[1] = [
|
|
345
|
+
B(" close ", -1)
|
|
346
|
+
])]),
|
|
347
|
+
_: 1
|
|
349
348
|
})
|
|
350
349
|
])
|
|
351
350
|
])
|
|
@@ -360,7 +359,7 @@ const Ee = ["innerHTML"], Pe = { class: "shiki" }, ze = ["textContent"], pt = /*
|
|
|
360
359
|
})
|
|
361
360
|
], 8, ["to"])) : $("", !0);
|
|
362
361
|
}
|
|
363
|
-
}),
|
|
362
|
+
}), je = { class: "$ui-fec gap2.5" }, ft = /* @__PURE__ */ h({
|
|
364
363
|
__name: "Confirm",
|
|
365
364
|
props: {
|
|
366
365
|
modelValue: { type: Boolean },
|
|
@@ -374,57 +373,57 @@ const Ee = ["innerHTML"], Pe = { class: "shiki" }, ze = ["textContent"], pt = /*
|
|
|
374
373
|
autoClose: { type: Boolean, default: !0 }
|
|
375
374
|
},
|
|
376
375
|
emits: ["update:modelValue", "confirm", "cancel", "close"],
|
|
377
|
-
setup(
|
|
378
|
-
const
|
|
376
|
+
setup(e, { emit: o }) {
|
|
377
|
+
const t = e, r = o, a = T(t, "modelValue", r);
|
|
379
378
|
P(() => {
|
|
380
|
-
|
|
379
|
+
a.value || r("close");
|
|
381
380
|
});
|
|
382
|
-
function
|
|
383
|
-
(
|
|
381
|
+
function n(d = !1) {
|
|
382
|
+
(t.autoClose || d) && (a.value = !1);
|
|
384
383
|
}
|
|
385
|
-
return (
|
|
386
|
-
modelValue:
|
|
387
|
-
"onUpdate:modelValue":
|
|
388
|
-
width:
|
|
389
|
-
height:
|
|
390
|
-
title:
|
|
384
|
+
return (d, l) => (s(), w(Oe, {
|
|
385
|
+
modelValue: v(a),
|
|
386
|
+
"onUpdate:modelValue": l[2] || (l[2] = (i) => j(a) ? a.value = i : null),
|
|
387
|
+
width: e.width,
|
|
388
|
+
height: e.height,
|
|
389
|
+
title: e.title,
|
|
391
390
|
closable: !1
|
|
392
391
|
}, {
|
|
393
|
-
footer:
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
onClick:
|
|
397
|
-
|
|
392
|
+
footer: p(() => [
|
|
393
|
+
c("div", je, [
|
|
394
|
+
x(M, {
|
|
395
|
+
onClick: l[0] || (l[0] = () => {
|
|
396
|
+
r("cancel"), n(!0);
|
|
398
397
|
})
|
|
399
398
|
}, {
|
|
400
|
-
default:
|
|
401
|
-
|
|
399
|
+
default: p(() => [
|
|
400
|
+
B(V(e.cancelText), 1)
|
|
402
401
|
]),
|
|
403
402
|
_: 1
|
|
404
403
|
}),
|
|
405
|
-
|
|
406
|
-
loading:
|
|
404
|
+
x(M, {
|
|
405
|
+
loading: e.loading,
|
|
407
406
|
type: "primary",
|
|
408
|
-
onClick:
|
|
409
|
-
|
|
407
|
+
onClick: l[1] || (l[1] = () => {
|
|
408
|
+
r("confirm"), n();
|
|
410
409
|
})
|
|
411
410
|
}, {
|
|
412
|
-
default:
|
|
413
|
-
|
|
411
|
+
default: p(() => [
|
|
412
|
+
B(V(e.confirmText), 1)
|
|
414
413
|
]),
|
|
415
414
|
_: 1
|
|
416
415
|
}, 8, ["loading"])
|
|
417
416
|
])
|
|
418
417
|
]),
|
|
419
|
-
default:
|
|
420
|
-
|
|
421
|
-
|
|
418
|
+
default: p(() => [
|
|
419
|
+
g(d.$slots, "default", { class: "h-auto w-auto" }, () => [
|
|
420
|
+
B(V(e.content), 1)
|
|
422
421
|
])
|
|
423
422
|
]),
|
|
424
423
|
_: 3
|
|
425
424
|
}, 8, ["modelValue", "width", "height", "title"]));
|
|
426
425
|
}
|
|
427
|
-
}),
|
|
426
|
+
}), Ae = /* @__PURE__ */ h({
|
|
428
427
|
__name: "Notification",
|
|
429
428
|
props: {
|
|
430
429
|
message: {},
|
|
@@ -434,50 +433,50 @@ const Ee = ["innerHTML"], Pe = { class: "shiki" }, ze = ["textContent"], pt = /*
|
|
|
434
433
|
placement: { default: "top-center" },
|
|
435
434
|
onClose: {}
|
|
436
435
|
},
|
|
437
|
-
setup(
|
|
438
|
-
const
|
|
436
|
+
setup(e) {
|
|
437
|
+
const o = e, t = {
|
|
439
438
|
success: "i-carbon-checkmark",
|
|
440
439
|
info: "i-material-symbols-light-info",
|
|
441
440
|
warning: "i-carbon-warning",
|
|
442
441
|
error: "i-carbon-close"
|
|
443
|
-
},
|
|
442
|
+
}, r = {
|
|
444
443
|
success: "text-primary-500 border-primary-200 dark:text-primary-200 dark:border-primary-500",
|
|
445
444
|
info: "text-blue-4 border-blue-2 dark:text-blue-2 dark:border-blue-4",
|
|
446
445
|
warning: "text-amber-4 border-amber-2 dark:border-amber-4",
|
|
447
446
|
error: "text-red-4 border-red-2 dark:border-red-4"
|
|
448
|
-
},
|
|
447
|
+
}, a = S(!1);
|
|
449
448
|
z(() => {
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
},
|
|
449
|
+
a.value = !0, setTimeout(() => {
|
|
450
|
+
a.value = !1;
|
|
451
|
+
}, o.duration);
|
|
453
452
|
});
|
|
454
|
-
const
|
|
455
|
-
return (
|
|
453
|
+
const n = k(() => o.placement.startsWith("top") ? "translate-y--300%" : "translate-y-300%");
|
|
454
|
+
return (d, l) => (s(), m("div", {
|
|
456
455
|
class: y(["fixed left-0 right-0 $ui-z-max-override text-center", [
|
|
457
|
-
{ "top-0":
|
|
458
|
-
{ "bottom-0":
|
|
456
|
+
{ "top-0": e.placement.startsWith("top") },
|
|
457
|
+
{ "bottom-0": e.placement.startsWith("bottom") }
|
|
459
458
|
]])
|
|
460
459
|
}, [
|
|
461
|
-
|
|
462
|
-
"enter-from-class":
|
|
463
|
-
"leave-to-class":
|
|
464
|
-
onAfterLeave:
|
|
465
|
-
|
|
460
|
+
x(N, {
|
|
461
|
+
"enter-from-class": n.value,
|
|
462
|
+
"leave-to-class": n.value,
|
|
463
|
+
onAfterLeave: l[0] || (l[0] = () => {
|
|
464
|
+
a.value || e.onClose?.();
|
|
466
465
|
})
|
|
467
466
|
}, {
|
|
468
|
-
default:
|
|
469
|
-
|
|
467
|
+
default: p(() => [
|
|
468
|
+
a.value ? (s(), m("div", {
|
|
470
469
|
key: 0,
|
|
471
470
|
class: "flex transition-all duration-300",
|
|
472
|
-
style:
|
|
471
|
+
style: O({ justifyContent: e.placement.includes("right") ? "right" : e.placement.includes("left") ? "left" : "center" })
|
|
473
472
|
}, [
|
|
474
|
-
|
|
475
|
-
class: y(["m3 flex-inline items-center gap2 b-1 b-1 rounded $ui-bg-base px4 py1 shadow transition-all duration-300", [
|
|
473
|
+
c("div", {
|
|
474
|
+
class: y(["m3 flex-inline items-center gap2 b-1 b-1 rounded $ui-bg-base px4 py1 shadow transition-all duration-300", [e.classes, r[e.type]]])
|
|
476
475
|
}, [
|
|
477
|
-
|
|
478
|
-
class: y(e
|
|
476
|
+
c("div", {
|
|
477
|
+
class: y(t[e.type])
|
|
479
478
|
}, null, 2),
|
|
480
|
-
|
|
479
|
+
c("div", null, V(e.message), 1)
|
|
481
480
|
], 2)
|
|
482
481
|
], 4)) : $("", !0)
|
|
483
482
|
]),
|
|
@@ -486,77 +485,77 @@ const Ee = ["innerHTML"], Pe = { class: "shiki" }, ze = ["textContent"], pt = /*
|
|
|
486
485
|
], 2));
|
|
487
486
|
}
|
|
488
487
|
});
|
|
489
|
-
function
|
|
490
|
-
const
|
|
491
|
-
|
|
492
|
-
const
|
|
493
|
-
function
|
|
494
|
-
|
|
488
|
+
function pt(e) {
|
|
489
|
+
const o = document.createElement("div");
|
|
490
|
+
o.classList.add("$ui-z-max-override", "fixed"), document.body.appendChild(o);
|
|
491
|
+
const t = e.onClose;
|
|
492
|
+
function r() {
|
|
493
|
+
K(null, o);
|
|
495
494
|
}
|
|
496
|
-
|
|
497
|
-
|
|
495
|
+
e.onClose = () => {
|
|
496
|
+
r(), t?.(), document.body.removeChild(o);
|
|
498
497
|
};
|
|
499
|
-
const
|
|
500
|
-
|
|
498
|
+
const a = ie(Ae, e);
|
|
499
|
+
K(a, o);
|
|
501
500
|
}
|
|
502
|
-
const
|
|
503
|
-
function
|
|
504
|
-
const
|
|
505
|
-
...
|
|
506
|
-
storageKey:
|
|
501
|
+
const We = "__vue-devtools-theme__";
|
|
502
|
+
function Ue(e = {}) {
|
|
503
|
+
const o = fe({
|
|
504
|
+
...e,
|
|
505
|
+
storageKey: We
|
|
507
506
|
});
|
|
508
507
|
return {
|
|
509
|
-
colorMode:
|
|
510
|
-
isDark: k(() =>
|
|
508
|
+
colorMode: o,
|
|
509
|
+
isDark: k(() => o.value === "dark")
|
|
511
510
|
};
|
|
512
511
|
}
|
|
513
|
-
const
|
|
512
|
+
const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
514
513
|
__name: "DarkToggle",
|
|
515
514
|
props: {
|
|
516
515
|
isDark: { type: Boolean, default: !1 },
|
|
517
516
|
animation: { type: Boolean, default: !0 },
|
|
518
517
|
animationDuration: { default: 400 }
|
|
519
518
|
},
|
|
520
|
-
setup(
|
|
521
|
-
const
|
|
522
|
-
initialValue:
|
|
523
|
-
onChanged: (
|
|
524
|
-
|
|
519
|
+
setup(e) {
|
|
520
|
+
const o = e, t = T(o, "isDark"), { colorMode: r } = Ue({
|
|
521
|
+
initialValue: t.value ? "dark" : "light",
|
|
522
|
+
onChanged: (l) => {
|
|
523
|
+
t.value = l === "dark";
|
|
525
524
|
}
|
|
526
|
-
}),
|
|
527
|
-
get: () =>
|
|
528
|
-
set: (
|
|
529
|
-
}),
|
|
530
|
-
function
|
|
531
|
-
if (!
|
|
532
|
-
|
|
525
|
+
}), a = k({
|
|
526
|
+
get: () => r.value === "dark",
|
|
527
|
+
set: (l) => r.value = l ? "dark" : "light"
|
|
528
|
+
}), n = !!document.startViewTransition && !window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
529
|
+
function d(l) {
|
|
530
|
+
if (!n || !l || !o.animation) {
|
|
531
|
+
a.value = !a.value;
|
|
533
532
|
return;
|
|
534
533
|
}
|
|
535
|
-
const
|
|
536
|
-
Math.max(
|
|
537
|
-
Math.max(
|
|
534
|
+
const i = l.clientX, f = l.clientY, u = Math.hypot(
|
|
535
|
+
Math.max(i, innerWidth - i),
|
|
536
|
+
Math.max(f, innerHeight - f)
|
|
538
537
|
);
|
|
539
538
|
document.startViewTransition(async () => {
|
|
540
|
-
|
|
539
|
+
a.value = !a.value, await H();
|
|
541
540
|
}).ready.then(() => {
|
|
542
|
-
const
|
|
543
|
-
`circle(0px at ${
|
|
544
|
-
`circle(${
|
|
541
|
+
const C = [
|
|
542
|
+
`circle(0px at ${i}px ${f}px)`,
|
|
543
|
+
`circle(${u}px at ${i}px ${f}px)`
|
|
545
544
|
];
|
|
546
545
|
document.documentElement.animate(
|
|
547
546
|
{
|
|
548
|
-
clipPath:
|
|
547
|
+
clipPath: a.value ? [...C].reverse() : C
|
|
549
548
|
},
|
|
550
549
|
{
|
|
551
|
-
duration:
|
|
550
|
+
duration: o.animationDuration,
|
|
552
551
|
easing: "ease-in",
|
|
553
|
-
pseudoElement:
|
|
552
|
+
pseudoElement: a.value ? "::view-transition-old(root)" : "::view-transition-new(root)"
|
|
554
553
|
}
|
|
555
554
|
);
|
|
556
555
|
});
|
|
557
556
|
}
|
|
558
|
-
return (
|
|
559
|
-
|
|
557
|
+
return (l, i) => (s(), m("span", Ke, [
|
|
558
|
+
g(l.$slots, "default", Q(Z({ mode: v(r), isDark: a.value, toggle: d })))
|
|
560
559
|
]));
|
|
561
560
|
}
|
|
562
561
|
}), vt = /* @__PURE__ */ h({
|
|
@@ -576,8 +575,8 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
576
575
|
position: {}
|
|
577
576
|
},
|
|
578
577
|
emits: ["update:modelValue", "close"],
|
|
579
|
-
setup(
|
|
580
|
-
const
|
|
578
|
+
setup(e, { emit: o }) {
|
|
579
|
+
const t = e, r = o, { height: a } = pe(() => typeof t.top == "string" ? document.querySelector(t.top) : t.top, void 0, { box: "border-box" }), n = T(t, "modelValue", r), d = {
|
|
581
580
|
left: {
|
|
582
581
|
class: "left-0 h-full b-r",
|
|
583
582
|
transition: "[&_.drawer]:translate-x--100%"
|
|
@@ -596,44 +595,44 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
596
595
|
}
|
|
597
596
|
};
|
|
598
597
|
ee("Escape", () => {
|
|
599
|
-
|
|
598
|
+
t.closable && (n.value = !1);
|
|
600
599
|
});
|
|
601
|
-
const
|
|
602
|
-
return z(() =>
|
|
600
|
+
const l = k(() => d[t.placement]), i = S(!1);
|
|
601
|
+
return z(() => i.value = !0), (f, u) => i.value || e.mountTo === "body" ? (s(), w(G, {
|
|
603
602
|
key: 0,
|
|
604
|
-
to:
|
|
603
|
+
to: e.mountTo
|
|
605
604
|
}, [
|
|
606
|
-
|
|
607
|
-
"enter-from-class": `${
|
|
608
|
-
"leave-to-class": `${
|
|
605
|
+
x(N, {
|
|
606
|
+
"enter-from-class": `${l.value.transition}`,
|
|
607
|
+
"leave-to-class": `${l.value.transition}`
|
|
609
608
|
}, {
|
|
610
|
-
default:
|
|
611
|
-
|
|
609
|
+
default: p(() => [
|
|
610
|
+
v(n) ? (s(), w(ae, {
|
|
612
611
|
key: 0,
|
|
613
612
|
class: y({
|
|
614
|
-
"pointer-events-none":
|
|
613
|
+
"pointer-events-none": e.permanent
|
|
615
614
|
}),
|
|
616
|
-
dim:
|
|
617
|
-
blur:
|
|
618
|
-
position:
|
|
619
|
-
onClick:
|
|
615
|
+
dim: e.dim,
|
|
616
|
+
blur: e.blur,
|
|
617
|
+
position: e.position,
|
|
618
|
+
onClick: u[2] || (u[2] = (b) => e.closeOutside && e.closable && (n.value = !1))
|
|
620
619
|
}, {
|
|
621
|
-
default:
|
|
622
|
-
|
|
623
|
-
class: y([[
|
|
624
|
-
style:
|
|
625
|
-
top:
|
|
626
|
-
height: ["top", "bottom"].includes(
|
|
620
|
+
default: p(() => [
|
|
621
|
+
c("div", {
|
|
622
|
+
class: y([[l.value.class, e.contentClass ?? "", e.contentBlur ? "$ui-glass-effect" : "$ui-bg-base"], "drawer pointer-events-auto absolute min-w-25 of-auto $ui-border-base transition-transform transition-duration-300"]),
|
|
623
|
+
style: O({
|
|
624
|
+
top: e.placement === "bottom" ? "auto" : `${v(a)}px`,
|
|
625
|
+
height: ["top", "bottom"].includes(e.placement) ? "auto" : `calc(100% - ${v(a)}px)`
|
|
627
626
|
}),
|
|
628
|
-
onClick:
|
|
627
|
+
onClick: u[1] || (u[1] = se(() => {
|
|
629
628
|
}, ["stop"]))
|
|
630
629
|
}, [
|
|
631
|
-
|
|
630
|
+
e.closable ? (s(), m("div", {
|
|
632
631
|
key: 0,
|
|
633
632
|
class: "i-carbon-close absolute right-1.5 top-1.5 $ui-z-max cursor-pointer p1 text-lg $ui-text",
|
|
634
|
-
onClick:
|
|
633
|
+
onClick: u[0] || (u[0] = (b) => n.value = !1)
|
|
635
634
|
})) : $("", !0),
|
|
636
|
-
|
|
635
|
+
g(f.$slots, "default")
|
|
637
636
|
], 6)
|
|
638
637
|
]),
|
|
639
638
|
_: 3
|
|
@@ -643,7 +642,7 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
643
642
|
}, 8, ["enter-from-class", "leave-to-class"])
|
|
644
643
|
], 8, ["to"])) : $("", !0);
|
|
645
644
|
}
|
|
646
|
-
}),
|
|
645
|
+
}), Ye = { class: "overflow-hidden rounded-lg shadow-lg" }, qe = /* @__PURE__ */ h({
|
|
647
646
|
__name: "Dropdown",
|
|
648
647
|
props: {
|
|
649
648
|
label: {},
|
|
@@ -657,9 +656,9 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
657
656
|
shown: { type: Boolean }
|
|
658
657
|
},
|
|
659
658
|
emits: ["update:visible"],
|
|
660
|
-
setup(
|
|
661
|
-
const
|
|
662
|
-
return de("$ui-dropdown-disabled", k(() =>
|
|
659
|
+
setup(e) {
|
|
660
|
+
const o = e;
|
|
661
|
+
return de("$ui-dropdown-disabled", k(() => o.disabled)), (t, r) => (s(), w(v(oe), {
|
|
663
662
|
disabled: e.disabled,
|
|
664
663
|
class: "inline-block w-auto",
|
|
665
664
|
shown: e.shown,
|
|
@@ -667,36 +666,36 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
667
666
|
distance: e.distance + 6,
|
|
668
667
|
placement: e.placement,
|
|
669
668
|
skidding: e.skidding,
|
|
670
|
-
"onUpdate:shown":
|
|
671
|
-
onClick:
|
|
672
|
-
|
|
669
|
+
"onUpdate:shown": r[0] || (r[0] = (a) => t.$emit("update:visible", a)),
|
|
670
|
+
onClick: r[1] || (r[1] = (a) => {
|
|
671
|
+
a.stopPropagation();
|
|
673
672
|
})
|
|
674
673
|
}, {
|
|
675
|
-
popper:
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
674
|
+
popper: p(({ hide: a }) => [
|
|
675
|
+
c("div", Ye, [
|
|
676
|
+
g(t.$slots, "popper", Q(Z({ hide: a })), () => [
|
|
677
|
+
r[2] || (r[2] = c("div", { class: "p2 opacity-40" }, " Empty... ", -1))
|
|
679
678
|
])
|
|
680
679
|
])
|
|
681
680
|
]),
|
|
682
|
-
default:
|
|
683
|
-
|
|
684
|
-
|
|
681
|
+
default: p(() => [
|
|
682
|
+
g(t.$slots, "default", {}, () => [
|
|
683
|
+
x(M, D({
|
|
685
684
|
...e.buttonProps,
|
|
686
685
|
disabled: e.disabled
|
|
687
|
-
}, { class: e.buttonClass }),
|
|
688
|
-
icon:
|
|
689
|
-
|
|
686
|
+
}, { class: e.buttonClass }), _({
|
|
687
|
+
icon: p(() => [
|
|
688
|
+
g(t.$slots, "button-icon")
|
|
690
689
|
]),
|
|
691
|
-
"icon-right":
|
|
692
|
-
|
|
690
|
+
"icon-right": p(() => [
|
|
691
|
+
g(t.$slots, "button-icon-right")
|
|
693
692
|
]),
|
|
694
693
|
_: 2
|
|
695
694
|
}, [
|
|
696
695
|
e.label ? {
|
|
697
696
|
name: "default",
|
|
698
|
-
fn:
|
|
699
|
-
|
|
697
|
+
fn: p(() => [
|
|
698
|
+
B(V(e.label), 1)
|
|
700
699
|
]),
|
|
701
700
|
key: "0"
|
|
702
701
|
} : void 0
|
|
@@ -718,24 +717,24 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
718
717
|
outlined: { type: Boolean },
|
|
719
718
|
keepOpen: { type: Boolean, default: !1 }
|
|
720
719
|
},
|
|
721
|
-
setup(
|
|
722
|
-
const
|
|
723
|
-
return (
|
|
724
|
-
...
|
|
720
|
+
setup(e) {
|
|
721
|
+
const o = e, t = ue("$ui-dropdown-disabled", void 0);
|
|
722
|
+
return (r, a) => A((s(), w(M, D({
|
|
723
|
+
...o,
|
|
725
724
|
round: !1
|
|
726
725
|
}, {
|
|
727
|
-
disabled:
|
|
726
|
+
disabled: v(t),
|
|
728
727
|
class: "w-full justify-start transition-colors not-action:bg-transparent!"
|
|
729
728
|
}), {
|
|
730
|
-
icon:
|
|
731
|
-
|
|
729
|
+
icon: p(() => [
|
|
730
|
+
g(r.$slots, "icon")
|
|
732
731
|
]),
|
|
733
|
-
default:
|
|
734
|
-
|
|
732
|
+
default: p(() => [
|
|
733
|
+
g(r.$slots, "default")
|
|
735
734
|
]),
|
|
736
735
|
_: 3
|
|
737
736
|
}, 16, ["disabled"])), [
|
|
738
|
-
[
|
|
737
|
+
[v(q)]
|
|
739
738
|
]);
|
|
740
739
|
}
|
|
741
740
|
}), F = /* @__PURE__ */ h({
|
|
@@ -745,15 +744,15 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
745
744
|
inline: { type: Boolean },
|
|
746
745
|
action: { type: Boolean, default: !1 }
|
|
747
746
|
},
|
|
748
|
-
setup(
|
|
749
|
-
return (
|
|
750
|
-
class: y(["$ui-base", [
|
|
747
|
+
setup(e) {
|
|
748
|
+
return (o, t) => (s(), w(X(e.inline ? "span" : "div"), {
|
|
749
|
+
class: y(["$ui-base", [e.icon, e.action ? "cursor-pointer hover:op50" : ""]])
|
|
751
750
|
}, null, 8, ["class"]));
|
|
752
751
|
}
|
|
753
|
-
}),
|
|
752
|
+
}), Je = ["type", "placeholder", "disabled"], Xe = {
|
|
754
753
|
key: 3,
|
|
755
754
|
class: "pointer-events-none absolute bottom--0.25 left-50% right-50% z-9999 h-0.75 bg-primary-500 opacity-0 transition-all duration-240 group-[&.focused]:left-0 group-[&.focused]:right-0 group-[&.focused]:opacity-100 group-[&.accent.focused]:bg-accent-500"
|
|
756
|
-
}, L = "transition-colors $ui-fcc color-gray-500 dark:color-gray-300 group-[&.focused]:color-primary-500; group-[&.accent.focused]:color-accent-500",
|
|
755
|
+
}, L = "transition-colors $ui-fcc color-gray-500 dark:color-gray-300 group-[&.focused]:color-primary-500; group-[&.accent.focused]:color-accent-500", Ge = /* @__PURE__ */ h({
|
|
757
756
|
__name: "Input",
|
|
758
757
|
props: {
|
|
759
758
|
modelValue: {},
|
|
@@ -769,70 +768,70 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
769
768
|
type: { default: "text" }
|
|
770
769
|
},
|
|
771
770
|
emits: ["update:modelValue", "updateFocused", "keyTab"],
|
|
772
|
-
setup(
|
|
773
|
-
const
|
|
774
|
-
onChanged(
|
|
775
|
-
|
|
771
|
+
setup(e, { emit: o }) {
|
|
772
|
+
const t = e, r = o, a = T(t, "modelValue", r), n = ge(k(() => t.loading), t.loadingDebounceTime), d = ve(!1, {
|
|
773
|
+
onChanged(b) {
|
|
774
|
+
r("updateFocused", b);
|
|
776
775
|
}
|
|
777
|
-
}),
|
|
778
|
-
let
|
|
776
|
+
}), l = k(() => t.variant === "flat" || t.variant === "warning" || t.disabled || t.readonly), i = k(() => t.disabled || n.value), f = S();
|
|
777
|
+
let u = !1;
|
|
779
778
|
return P(() => {
|
|
780
|
-
|
|
781
|
-
|
|
779
|
+
n.value && d.value ? u = !0 : !n.value && u && (u = !1, H(() => {
|
|
780
|
+
d.value = !0;
|
|
782
781
|
}));
|
|
783
782
|
}), z(() => {
|
|
784
|
-
|
|
783
|
+
t.autoFocus && (d.value = !0);
|
|
785
784
|
}), P(() => {
|
|
786
|
-
|
|
787
|
-
}), (
|
|
785
|
+
d.value && f.value?.focus();
|
|
786
|
+
}), (b, C) => (s(), m("div", {
|
|
788
787
|
class: y(["group relative w-50 w-auto flex items-center justify-between gap-0.5 overflow-hidden b-1 rounded-1 px3 py-0.75 color-gray-800 dark:color-gray-100", [
|
|
789
788
|
{
|
|
790
|
-
"border-none bg-transparent group":
|
|
791
|
-
"cursor-not-allowed opacity-50":
|
|
792
|
-
accent:
|
|
793
|
-
focused:
|
|
789
|
+
"border-none bg-transparent group": e.variant === "flat",
|
|
790
|
+
"cursor-not-allowed opacity-50": i.value,
|
|
791
|
+
accent: e.variant === "accent",
|
|
792
|
+
focused: v(d)
|
|
794
793
|
},
|
|
795
794
|
[
|
|
796
|
-
|
|
795
|
+
e.variant === "warning" ? "border-warning-500 dark:border-warning-300" : "border-primary-100 dark:border-gray-700"
|
|
797
796
|
]
|
|
798
797
|
]]),
|
|
799
|
-
onClick:
|
|
800
|
-
|
|
798
|
+
onClick: C[2] || (C[2] = () => {
|
|
799
|
+
d.value = !0;
|
|
801
800
|
})
|
|
802
801
|
}, [
|
|
803
|
-
|
|
802
|
+
e.leftIcon ? (s(), m("div", {
|
|
804
803
|
key: 0,
|
|
805
804
|
class: y(L)
|
|
806
805
|
}, [
|
|
807
|
-
|
|
806
|
+
x(F, { icon: e.leftIcon }, null, 8, ["icon"])
|
|
808
807
|
])) : $("", !0),
|
|
809
|
-
|
|
808
|
+
A(c("input", {
|
|
810
809
|
ref_key: "inputRef",
|
|
811
|
-
ref:
|
|
812
|
-
"onUpdate:modelValue":
|
|
810
|
+
ref: f,
|
|
811
|
+
"onUpdate:modelValue": C[0] || (C[0] = (U) => j(a) ? a.value = U : null),
|
|
813
812
|
class: "$ui-base w-full bg-transparent color-inherit outline-none placeholder-color-gray-500 dark:placeholder-gray-300",
|
|
814
|
-
type:
|
|
815
|
-
placeholder:
|
|
816
|
-
disabled:
|
|
817
|
-
onBlur:
|
|
818
|
-
}, null, 40,
|
|
819
|
-
[ce,
|
|
813
|
+
type: e.type,
|
|
814
|
+
placeholder: e.placeholder,
|
|
815
|
+
disabled: i.value || e.readonly,
|
|
816
|
+
onBlur: C[1] || (C[1] = (U) => d.value = !1)
|
|
817
|
+
}, null, 40, Je), [
|
|
818
|
+
[ce, v(a)]
|
|
820
819
|
]),
|
|
821
|
-
|
|
820
|
+
v(n) ? (s(), m("div", {
|
|
822
821
|
key: 1,
|
|
823
822
|
class: y(L)
|
|
824
823
|
}, [
|
|
825
|
-
|
|
826
|
-
])) :
|
|
824
|
+
x(te)
|
|
825
|
+
])) : e.rightIcon ? (s(), m("div", {
|
|
827
826
|
key: 2,
|
|
828
827
|
class: y(L)
|
|
829
828
|
}, [
|
|
830
|
-
|
|
829
|
+
x(F, { icon: e.rightIcon }, null, 8, ["icon"])
|
|
831
830
|
])) : $("", !0),
|
|
832
|
-
|
|
831
|
+
l.value ? $("", !0) : (s(), m("div", Xe))
|
|
833
832
|
], 2));
|
|
834
833
|
}
|
|
835
|
-
}),
|
|
834
|
+
}), Qe = { class: "$ui-base" }, yt = /* @__PURE__ */ h({
|
|
836
835
|
__name: "FormField",
|
|
837
836
|
props: {
|
|
838
837
|
modelValue: {},
|
|
@@ -842,56 +841,56 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
842
841
|
placeholder: {}
|
|
843
842
|
},
|
|
844
843
|
emits: ["update:modelValue"],
|
|
845
|
-
setup(
|
|
846
|
-
const
|
|
844
|
+
setup(e, { emit: o }) {
|
|
845
|
+
const t = e, a = T(t, "modelValue", o), n = S(!1), d = k(() => t.message && t.message.length && t.showMessage), l = {
|
|
847
846
|
normal: "color-gray-600 dark:color-gray-400",
|
|
848
847
|
warning: "color-warning-500 dark:color-warning-200",
|
|
849
848
|
danger: "color-danger-500 dark:color-danger-200",
|
|
850
849
|
success: "color-primary-700 dark:color-primary-500"
|
|
851
|
-
},
|
|
850
|
+
}, i = {
|
|
852
851
|
warning: "i-bx:bxs-error",
|
|
853
852
|
danger: "i-ic-round-error",
|
|
854
853
|
success: "i-ep:success-filled"
|
|
855
854
|
};
|
|
856
|
-
return (
|
|
857
|
-
|
|
858
|
-
modelValue:
|
|
859
|
-
"onUpdate:modelValue":
|
|
860
|
-
placeholder:
|
|
861
|
-
onUpdateFocused:
|
|
855
|
+
return (f, u) => (s(), m("div", Qe, [
|
|
856
|
+
x(Ge, {
|
|
857
|
+
modelValue: v(a),
|
|
858
|
+
"onUpdate:modelValue": u[0] || (u[0] = (b) => j(a) ? a.value = b : null),
|
|
859
|
+
placeholder: e.placeholder,
|
|
860
|
+
onUpdateFocused: u[1] || (u[1] = (b) => n.value = b)
|
|
862
861
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
863
|
-
|
|
862
|
+
c("div", {
|
|
864
863
|
class: y(["mt2 $ui-base text-3.5", [
|
|
865
|
-
|
|
866
|
-
{ "opacity-65": !
|
|
864
|
+
l[e.status],
|
|
865
|
+
{ "opacity-65": !n.value }
|
|
867
866
|
]])
|
|
868
867
|
}, [
|
|
869
|
-
|
|
868
|
+
e.status !== "normal" && d.value ? (s(), w(F, {
|
|
870
869
|
key: 0,
|
|
871
870
|
inline: "",
|
|
872
|
-
icon:
|
|
871
|
+
icon: i[e.status]
|
|
873
872
|
}, null, 8, ["icon"])) : $("", !0),
|
|
874
|
-
|
|
873
|
+
B(" " + V(d.value ? e.message : ""), 1)
|
|
875
874
|
], 2)
|
|
876
875
|
]));
|
|
877
876
|
}
|
|
878
|
-
}),
|
|
877
|
+
}), Ze = ["innerHTML"], ht = /* @__PURE__ */ h({
|
|
879
878
|
__name: "IcIcon",
|
|
880
879
|
props: {
|
|
881
880
|
name: {}
|
|
882
881
|
},
|
|
883
|
-
setup(
|
|
884
|
-
const
|
|
885
|
-
return (
|
|
886
|
-
(
|
|
882
|
+
setup(e) {
|
|
883
|
+
const o = e, t = k(() => ke[o.name] ?? "");
|
|
884
|
+
return (r, a) => (s(), m("div", null, [
|
|
885
|
+
(s(), m("svg", {
|
|
887
886
|
class: "custom-svg h-1em w-1em",
|
|
888
887
|
xmlns: "http://www.w3.org/2000/svg",
|
|
889
888
|
viewBox: "0 0 24 24",
|
|
890
|
-
innerHTML:
|
|
891
|
-
}, null, 8,
|
|
889
|
+
innerHTML: t.value
|
|
890
|
+
}, null, 8, Ze))
|
|
892
891
|
]));
|
|
893
892
|
}
|
|
894
|
-
}),
|
|
893
|
+
}), _e = { class: "m1 min-w-35 w-auto flex flex-col" }, et = ["onClick"], kt = /* @__PURE__ */ h({
|
|
895
894
|
__name: "Select",
|
|
896
895
|
props: {
|
|
897
896
|
modelValue: {},
|
|
@@ -900,64 +899,64 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
900
899
|
placeholder: { default: "Select..." },
|
|
901
900
|
autoClose: { type: Boolean, default: !0 },
|
|
902
901
|
disabled: { type: Boolean, default: !1 },
|
|
903
|
-
labelRenderer: { type: Function, default: (
|
|
902
|
+
labelRenderer: { type: Function, default: (e) => String(e) },
|
|
904
903
|
buttonProps: { default: () => ({}) }
|
|
905
904
|
},
|
|
906
905
|
emits: ["update:modelValue"],
|
|
907
|
-
setup(
|
|
908
|
-
const
|
|
909
|
-
get: () =>
|
|
910
|
-
set: (
|
|
911
|
-
}),
|
|
912
|
-
const
|
|
913
|
-
return
|
|
906
|
+
setup(e, { emit: o }) {
|
|
907
|
+
const t = e, r = o, a = J(), n = k({
|
|
908
|
+
get: () => t.modelValue,
|
|
909
|
+
set: (i) => r("update:modelValue", i)
|
|
910
|
+
}), d = k(() => {
|
|
911
|
+
const i = t.options.find((f) => f.value === n.value);
|
|
912
|
+
return i?.label ? t.labelRenderer(i.label) : t.placeholder;
|
|
914
913
|
});
|
|
915
|
-
function
|
|
916
|
-
|
|
914
|
+
function l(i) {
|
|
915
|
+
t.multiple ? n.value = n.value.includes(i.value) ? n.value.filter((f) => f !== i.value) : [...n.value, i.value] : n.value = i.value;
|
|
917
916
|
}
|
|
918
|
-
return (
|
|
919
|
-
buttonProps:
|
|
920
|
-
disabled:
|
|
921
|
-
}),
|
|
922
|
-
popper:
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
key:
|
|
917
|
+
return (i, f) => (s(), w(qe, D({ label: d.value }, {
|
|
918
|
+
buttonProps: e.buttonProps,
|
|
919
|
+
disabled: e.disabled
|
|
920
|
+
}), _({
|
|
921
|
+
popper: p(() => [
|
|
922
|
+
c("div", _e, [
|
|
923
|
+
v(a).item ? (s(!0), m(E, { key: 0 }, R(e.options, (u) => (s(), m("div", {
|
|
924
|
+
key: u.value,
|
|
926
925
|
class: "cursor-pointer",
|
|
927
|
-
onClick: (
|
|
926
|
+
onClick: (b) => l(u)
|
|
928
927
|
}, [
|
|
929
|
-
|
|
930
|
-
item:
|
|
931
|
-
active:
|
|
932
|
-
disabled:
|
|
928
|
+
g(i.$slots, "item", D({ ref_for: !0 }, {
|
|
929
|
+
item: u,
|
|
930
|
+
active: e.multiple ? n.value.includes(u.value) : u.value === n.value,
|
|
931
|
+
disabled: e.disabled
|
|
933
932
|
}))
|
|
934
|
-
], 8, et))), 128)) : (
|
|
935
|
-
key:
|
|
936
|
-
disabled:
|
|
933
|
+
], 8, et))), 128)) : (s(!0), m(E, { key: 1 }, R(e.options, (u) => A((s(), w(M, {
|
|
934
|
+
key: u.value,
|
|
935
|
+
disabled: e.disabled,
|
|
937
936
|
round: "normal",
|
|
938
937
|
class: y(["flex-[auto_1_1] not-hover:[&:not(.active)]:bg-transparent!", {
|
|
939
|
-
active:
|
|
938
|
+
active: e.multiple ? n.value.includes(u.value) : u.value === n.value
|
|
940
939
|
}]),
|
|
941
|
-
onClick: (
|
|
940
|
+
onClick: (b) => l(u)
|
|
942
941
|
}, {
|
|
943
|
-
default:
|
|
944
|
-
|
|
942
|
+
default: p(() => [
|
|
943
|
+
B(V(u.label), 1)
|
|
945
944
|
]),
|
|
946
945
|
_: 2
|
|
947
946
|
}, 1032, ["disabled", "class", "onClick"])), [
|
|
948
|
-
[
|
|
947
|
+
[v(q), e.autoClose]
|
|
949
948
|
])), 128))
|
|
950
949
|
])
|
|
951
950
|
]),
|
|
952
|
-
"button-icon-right":
|
|
953
|
-
|
|
951
|
+
"button-icon-right": p(() => [
|
|
952
|
+
f[0] || (f[0] = c("div", { class: "i-mdi-chevron-down" }, null, -1))
|
|
954
953
|
]),
|
|
955
954
|
_: 2
|
|
956
955
|
}, [
|
|
957
|
-
|
|
956
|
+
v(a).button ? {
|
|
958
957
|
name: "default",
|
|
959
|
-
fn:
|
|
960
|
-
|
|
958
|
+
fn: p(() => [
|
|
959
|
+
g(i.$slots, "button")
|
|
961
960
|
]),
|
|
962
961
|
key: "0"
|
|
963
962
|
} : void 0
|
|
@@ -970,25 +969,25 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
970
969
|
disabled: { type: Boolean }
|
|
971
970
|
},
|
|
972
971
|
emits: ["update:modelValue"],
|
|
973
|
-
setup(
|
|
974
|
-
const
|
|
975
|
-
return (
|
|
972
|
+
setup(e, { emit: o }) {
|
|
973
|
+
const a = T(e, "modelValue", o), n = be(a);
|
|
974
|
+
return (d, l) => (s(), m("div", {
|
|
976
975
|
class: y([[
|
|
977
|
-
|
|
976
|
+
e.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
978
977
|
], "$ui-base $ui-if-sc cursor-pointer select-none gap1.25 vertical-mid text-3.5"]),
|
|
979
978
|
role: "checkbox",
|
|
980
|
-
onClick:
|
|
979
|
+
onClick: l[0] || (l[0] = (i) => !e.disabled && v(n)())
|
|
981
980
|
}, [
|
|
982
|
-
|
|
983
|
-
|
|
981
|
+
g(d.$slots, "default"),
|
|
982
|
+
c("div", {
|
|
984
983
|
class: y([{
|
|
985
|
-
selected:
|
|
984
|
+
selected: v(a)
|
|
986
985
|
}, "group relative $ui-base h4 w8 rounded-2 bg-primary-100 transition-colors dark:bg-gray-700 [&.selected]:bg-primary-500!"])
|
|
987
986
|
}, [
|
|
988
|
-
|
|
987
|
+
c("div", {
|
|
989
988
|
class: y(["h4 w4 rounded-full bg-primary-800 transition-transform group-[&.selected]:transform-translate-x-4 dark:bg-white", [
|
|
990
|
-
{ "group-hover:opacity-75 group-active:scale-85": !
|
|
991
|
-
{ "opacity-65":
|
|
989
|
+
{ "group-hover:opacity-75 group-active:scale-85": !e.disabled },
|
|
990
|
+
{ "opacity-65": e.disabled }
|
|
992
991
|
]])
|
|
993
992
|
}, null, 2)
|
|
994
993
|
], 2)
|
|
@@ -1004,45 +1003,45 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
1004
1003
|
disabled: { type: Boolean },
|
|
1005
1004
|
shown: { type: Boolean }
|
|
1006
1005
|
},
|
|
1007
|
-
setup(
|
|
1008
|
-
return (
|
|
1009
|
-
disabled:
|
|
1010
|
-
placement:
|
|
1011
|
-
},
|
|
1012
|
-
popper:
|
|
1013
|
-
|
|
1006
|
+
setup(e) {
|
|
1007
|
+
return (o, t) => (s(), w(v(ne), D({
|
|
1008
|
+
disabled: e.disabled,
|
|
1009
|
+
placement: e.placement
|
|
1010
|
+
}, o.$attrs), {
|
|
1011
|
+
popper: p(() => [
|
|
1012
|
+
g(o.$slots, "popper")
|
|
1014
1013
|
]),
|
|
1015
|
-
default:
|
|
1016
|
-
|
|
1014
|
+
default: p(() => [
|
|
1015
|
+
g(o.$slots, "default")
|
|
1017
1016
|
]),
|
|
1018
1017
|
_: 3
|
|
1019
1018
|
}, 16, ["disabled", "placement"]));
|
|
1020
1019
|
}
|
|
1021
1020
|
});
|
|
1022
1021
|
export {
|
|
1023
|
-
|
|
1022
|
+
We as THEME_KEY,
|
|
1024
1023
|
dt as VueBadge,
|
|
1025
1024
|
M as VueButton,
|
|
1026
1025
|
ut as VueCard,
|
|
1027
1026
|
ct as VueCheckbox,
|
|
1028
|
-
|
|
1029
|
-
|
|
1027
|
+
mt as VueCodeBlock,
|
|
1028
|
+
ft as VueConfirm,
|
|
1030
1029
|
gt as VueDarkToggle,
|
|
1031
|
-
|
|
1030
|
+
Oe as VueDialog,
|
|
1032
1031
|
vt as VueDrawer,
|
|
1033
|
-
|
|
1032
|
+
qe as VueDropdown,
|
|
1034
1033
|
bt as VueDropdownButton,
|
|
1035
1034
|
yt as VueFormField,
|
|
1036
1035
|
ht as VueIcIcon,
|
|
1037
1036
|
F as VueIcon,
|
|
1038
|
-
|
|
1037
|
+
Ge as VueInput,
|
|
1039
1038
|
te as VueLoadingIndicator,
|
|
1040
|
-
|
|
1041
|
-
|
|
1039
|
+
Ae as VueNotification,
|
|
1040
|
+
ae as VueOverlay,
|
|
1042
1041
|
kt as VueSelect,
|
|
1043
1042
|
wt as VueSwitch,
|
|
1044
1043
|
$t as VueTooltip,
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1044
|
+
pt as showVueNotification,
|
|
1045
|
+
Ue as useDevToolsColorMode,
|
|
1046
|
+
Vt as vTooltip
|
|
1048
1047
|
};
|