@vue/devtools-ui 8.0.2 → 8.0.4
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 +414 -414
- package/package.json +5 -5
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,7 +37,7 @@ 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"
|
|
@@ -45,7 +45,7 @@ function _e(n, t) {
|
|
|
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,70 +279,70 @@ 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
|
-
|
|
328
|
+
onClick: d
|
|
329
|
+
}, [...f[0] || (f[0] = [
|
|
330
|
+
c("div", { class: "i-carbon-close" }, null, -1)
|
|
331
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
|
-
|
|
344
|
+
default: p(() => [...f[1] || (f[1] = [
|
|
345
|
+
B(" close ", -1)
|
|
346
346
|
])]),
|
|
347
347
|
_: 1
|
|
348
348
|
})
|
|
@@ -359,7 +359,7 @@ const Ee = ["innerHTML"], Pe = { class: "shiki" }, ze = ["textContent"], pt = /*
|
|
|
359
359
|
})
|
|
360
360
|
], 8, ["to"])) : $("", !0);
|
|
361
361
|
}
|
|
362
|
-
}),
|
|
362
|
+
}), je = { class: "$ui-fec gap2.5" }, ft = /* @__PURE__ */ h({
|
|
363
363
|
__name: "Confirm",
|
|
364
364
|
props: {
|
|
365
365
|
modelValue: { type: Boolean },
|
|
@@ -373,57 +373,57 @@ const Ee = ["innerHTML"], Pe = { class: "shiki" }, ze = ["textContent"], pt = /*
|
|
|
373
373
|
autoClose: { type: Boolean, default: !0 }
|
|
374
374
|
},
|
|
375
375
|
emits: ["update:modelValue", "confirm", "cancel", "close"],
|
|
376
|
-
setup(
|
|
377
|
-
const
|
|
376
|
+
setup(e, { emit: o }) {
|
|
377
|
+
const t = e, r = o, a = T(t, "modelValue", r);
|
|
378
378
|
P(() => {
|
|
379
|
-
|
|
379
|
+
a.value || r("close");
|
|
380
380
|
});
|
|
381
|
-
function
|
|
382
|
-
(
|
|
381
|
+
function n(d = !1) {
|
|
382
|
+
(t.autoClose || d) && (a.value = !1);
|
|
383
383
|
}
|
|
384
|
-
return (
|
|
385
|
-
modelValue:
|
|
386
|
-
"onUpdate:modelValue":
|
|
387
|
-
width:
|
|
388
|
-
height:
|
|
389
|
-
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,
|
|
390
390
|
closable: !1
|
|
391
391
|
}, {
|
|
392
|
-
footer:
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
onClick:
|
|
396
|
-
|
|
392
|
+
footer: p(() => [
|
|
393
|
+
c("div", je, [
|
|
394
|
+
x(M, {
|
|
395
|
+
onClick: l[0] || (l[0] = () => {
|
|
396
|
+
r("cancel"), n(!0);
|
|
397
397
|
})
|
|
398
398
|
}, {
|
|
399
|
-
default:
|
|
400
|
-
|
|
399
|
+
default: p(() => [
|
|
400
|
+
B(V(e.cancelText), 1)
|
|
401
401
|
]),
|
|
402
402
|
_: 1
|
|
403
403
|
}),
|
|
404
|
-
|
|
405
|
-
loading:
|
|
404
|
+
x(M, {
|
|
405
|
+
loading: e.loading,
|
|
406
406
|
type: "primary",
|
|
407
|
-
onClick:
|
|
408
|
-
|
|
407
|
+
onClick: l[1] || (l[1] = () => {
|
|
408
|
+
r("confirm"), n();
|
|
409
409
|
})
|
|
410
410
|
}, {
|
|
411
|
-
default:
|
|
412
|
-
|
|
411
|
+
default: p(() => [
|
|
412
|
+
B(V(e.confirmText), 1)
|
|
413
413
|
]),
|
|
414
414
|
_: 1
|
|
415
415
|
}, 8, ["loading"])
|
|
416
416
|
])
|
|
417
417
|
]),
|
|
418
|
-
default:
|
|
419
|
-
|
|
420
|
-
|
|
418
|
+
default: p(() => [
|
|
419
|
+
g(d.$slots, "default", { class: "h-auto w-auto" }, () => [
|
|
420
|
+
B(V(e.content), 1)
|
|
421
421
|
])
|
|
422
422
|
]),
|
|
423
423
|
_: 3
|
|
424
424
|
}, 8, ["modelValue", "width", "height", "title"]));
|
|
425
425
|
}
|
|
426
|
-
}),
|
|
426
|
+
}), Ae = /* @__PURE__ */ h({
|
|
427
427
|
__name: "Notification",
|
|
428
428
|
props: {
|
|
429
429
|
message: {},
|
|
@@ -433,50 +433,50 @@ const Ee = ["innerHTML"], Pe = { class: "shiki" }, ze = ["textContent"], pt = /*
|
|
|
433
433
|
placement: { default: "top-center" },
|
|
434
434
|
onClose: {}
|
|
435
435
|
},
|
|
436
|
-
setup(
|
|
437
|
-
const
|
|
436
|
+
setup(e) {
|
|
437
|
+
const o = e, t = {
|
|
438
438
|
success: "i-carbon-checkmark",
|
|
439
439
|
info: "i-material-symbols-light-info",
|
|
440
440
|
warning: "i-carbon-warning",
|
|
441
441
|
error: "i-carbon-close"
|
|
442
|
-
},
|
|
442
|
+
}, r = {
|
|
443
443
|
success: "text-primary-500 border-primary-200 dark:text-primary-200 dark:border-primary-500",
|
|
444
444
|
info: "text-blue-4 border-blue-2 dark:text-blue-2 dark:border-blue-4",
|
|
445
445
|
warning: "text-amber-4 border-amber-2 dark:border-amber-4",
|
|
446
446
|
error: "text-red-4 border-red-2 dark:border-red-4"
|
|
447
|
-
},
|
|
447
|
+
}, a = S(!1);
|
|
448
448
|
z(() => {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
},
|
|
449
|
+
a.value = !0, setTimeout(() => {
|
|
450
|
+
a.value = !1;
|
|
451
|
+
}, o.duration);
|
|
452
452
|
});
|
|
453
|
-
const
|
|
454
|
-
return (
|
|
453
|
+
const n = k(() => o.placement.startsWith("top") ? "translate-y--300%" : "translate-y-300%");
|
|
454
|
+
return (d, l) => (s(), m("div", {
|
|
455
455
|
class: y(["fixed left-0 right-0 $ui-z-max-override text-center", [
|
|
456
|
-
{ "top-0":
|
|
457
|
-
{ "bottom-0":
|
|
456
|
+
{ "top-0": e.placement.startsWith("top") },
|
|
457
|
+
{ "bottom-0": e.placement.startsWith("bottom") }
|
|
458
458
|
]])
|
|
459
459
|
}, [
|
|
460
|
-
|
|
461
|
-
"enter-from-class":
|
|
462
|
-
"leave-to-class":
|
|
463
|
-
onAfterLeave:
|
|
464
|
-
|
|
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?.();
|
|
465
465
|
})
|
|
466
466
|
}, {
|
|
467
|
-
default:
|
|
468
|
-
|
|
467
|
+
default: p(() => [
|
|
468
|
+
a.value ? (s(), m("div", {
|
|
469
469
|
key: 0,
|
|
470
470
|
class: "flex transition-all duration-300",
|
|
471
|
-
style:
|
|
471
|
+
style: O({ justifyContent: e.placement.includes("right") ? "right" : e.placement.includes("left") ? "left" : "center" })
|
|
472
472
|
}, [
|
|
473
|
-
|
|
474
|
-
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]]])
|
|
475
475
|
}, [
|
|
476
|
-
|
|
477
|
-
class: y(e
|
|
476
|
+
c("div", {
|
|
477
|
+
class: y(t[e.type])
|
|
478
478
|
}, null, 2),
|
|
479
|
-
|
|
479
|
+
c("div", null, V(e.message), 1)
|
|
480
480
|
], 2)
|
|
481
481
|
], 4)) : $("", !0)
|
|
482
482
|
]),
|
|
@@ -485,77 +485,77 @@ const Ee = ["innerHTML"], Pe = { class: "shiki" }, ze = ["textContent"], pt = /*
|
|
|
485
485
|
], 2));
|
|
486
486
|
}
|
|
487
487
|
});
|
|
488
|
-
function
|
|
489
|
-
const
|
|
490
|
-
|
|
491
|
-
const
|
|
492
|
-
function
|
|
493
|
-
|
|
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);
|
|
494
494
|
}
|
|
495
|
-
|
|
496
|
-
|
|
495
|
+
e.onClose = () => {
|
|
496
|
+
r(), t?.(), document.body.removeChild(o);
|
|
497
497
|
};
|
|
498
|
-
const
|
|
499
|
-
|
|
498
|
+
const a = ie(Ae, e);
|
|
499
|
+
K(a, o);
|
|
500
500
|
}
|
|
501
|
-
const
|
|
502
|
-
function
|
|
503
|
-
const
|
|
504
|
-
...
|
|
505
|
-
storageKey:
|
|
501
|
+
const We = "__vue-devtools-theme__";
|
|
502
|
+
function Ue(e = {}) {
|
|
503
|
+
const o = fe({
|
|
504
|
+
...e,
|
|
505
|
+
storageKey: We
|
|
506
506
|
});
|
|
507
507
|
return {
|
|
508
|
-
colorMode:
|
|
509
|
-
isDark: k(() =>
|
|
508
|
+
colorMode: o,
|
|
509
|
+
isDark: k(() => o.value === "dark")
|
|
510
510
|
};
|
|
511
511
|
}
|
|
512
|
-
const
|
|
512
|
+
const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
513
513
|
__name: "DarkToggle",
|
|
514
514
|
props: {
|
|
515
515
|
isDark: { type: Boolean, default: !1 },
|
|
516
516
|
animation: { type: Boolean, default: !0 },
|
|
517
517
|
animationDuration: { default: 400 }
|
|
518
518
|
},
|
|
519
|
-
setup(
|
|
520
|
-
const
|
|
521
|
-
initialValue:
|
|
522
|
-
onChanged: (
|
|
523
|
-
|
|
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";
|
|
524
524
|
}
|
|
525
|
-
}),
|
|
526
|
-
get: () =>
|
|
527
|
-
set: (
|
|
528
|
-
}),
|
|
529
|
-
function
|
|
530
|
-
if (!
|
|
531
|
-
|
|
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;
|
|
532
532
|
return;
|
|
533
533
|
}
|
|
534
|
-
const
|
|
535
|
-
Math.max(
|
|
536
|
-
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)
|
|
537
537
|
);
|
|
538
538
|
document.startViewTransition(async () => {
|
|
539
|
-
|
|
539
|
+
a.value = !a.value, await H();
|
|
540
540
|
}).ready.then(() => {
|
|
541
|
-
const
|
|
542
|
-
`circle(0px at ${
|
|
543
|
-
`circle(${
|
|
541
|
+
const C = [
|
|
542
|
+
`circle(0px at ${i}px ${f}px)`,
|
|
543
|
+
`circle(${u}px at ${i}px ${f}px)`
|
|
544
544
|
];
|
|
545
545
|
document.documentElement.animate(
|
|
546
546
|
{
|
|
547
|
-
clipPath:
|
|
547
|
+
clipPath: a.value ? [...C].reverse() : C
|
|
548
548
|
},
|
|
549
549
|
{
|
|
550
|
-
duration:
|
|
550
|
+
duration: o.animationDuration,
|
|
551
551
|
easing: "ease-in",
|
|
552
|
-
pseudoElement:
|
|
552
|
+
pseudoElement: a.value ? "::view-transition-old(root)" : "::view-transition-new(root)"
|
|
553
553
|
}
|
|
554
554
|
);
|
|
555
555
|
});
|
|
556
556
|
}
|
|
557
|
-
return (
|
|
558
|
-
|
|
557
|
+
return (l, i) => (s(), m("span", Ke, [
|
|
558
|
+
g(l.$slots, "default", Q(Z({ mode: v(r), isDark: a.value, toggle: d })))
|
|
559
559
|
]));
|
|
560
560
|
}
|
|
561
561
|
}), vt = /* @__PURE__ */ h({
|
|
@@ -575,8 +575,8 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
575
575
|
position: {}
|
|
576
576
|
},
|
|
577
577
|
emits: ["update:modelValue", "close"],
|
|
578
|
-
setup(
|
|
579
|
-
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 = {
|
|
580
580
|
left: {
|
|
581
581
|
class: "left-0 h-full b-r",
|
|
582
582
|
transition: "[&_.drawer]:translate-x--100%"
|
|
@@ -595,44 +595,44 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
595
595
|
}
|
|
596
596
|
};
|
|
597
597
|
ee("Escape", () => {
|
|
598
|
-
|
|
598
|
+
t.closable && (n.value = !1);
|
|
599
599
|
});
|
|
600
|
-
const
|
|
601
|
-
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, {
|
|
602
602
|
key: 0,
|
|
603
|
-
to:
|
|
603
|
+
to: e.mountTo
|
|
604
604
|
}, [
|
|
605
|
-
|
|
606
|
-
"enter-from-class": `${
|
|
607
|
-
"leave-to-class": `${
|
|
605
|
+
x(N, {
|
|
606
|
+
"enter-from-class": `${l.value.transition}`,
|
|
607
|
+
"leave-to-class": `${l.value.transition}`
|
|
608
608
|
}, {
|
|
609
|
-
default:
|
|
610
|
-
|
|
609
|
+
default: p(() => [
|
|
610
|
+
v(n) ? (s(), w(ae, {
|
|
611
611
|
key: 0,
|
|
612
612
|
class: y({
|
|
613
|
-
"pointer-events-none":
|
|
613
|
+
"pointer-events-none": e.permanent
|
|
614
614
|
}),
|
|
615
|
-
dim:
|
|
616
|
-
blur:
|
|
617
|
-
position:
|
|
618
|
-
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))
|
|
619
619
|
}, {
|
|
620
|
-
default:
|
|
621
|
-
|
|
622
|
-
class: y([[
|
|
623
|
-
style:
|
|
624
|
-
top:
|
|
625
|
-
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)`
|
|
626
626
|
}),
|
|
627
|
-
onClick:
|
|
627
|
+
onClick: u[1] || (u[1] = se(() => {
|
|
628
628
|
}, ["stop"]))
|
|
629
629
|
}, [
|
|
630
|
-
|
|
630
|
+
e.closable ? (s(), m("div", {
|
|
631
631
|
key: 0,
|
|
632
632
|
class: "i-carbon-close absolute right-1.5 top-1.5 $ui-z-max cursor-pointer p1 text-lg $ui-text",
|
|
633
|
-
onClick:
|
|
633
|
+
onClick: u[0] || (u[0] = (b) => n.value = !1)
|
|
634
634
|
})) : $("", !0),
|
|
635
|
-
|
|
635
|
+
g(f.$slots, "default")
|
|
636
636
|
], 6)
|
|
637
637
|
]),
|
|
638
638
|
_: 3
|
|
@@ -642,7 +642,7 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
642
642
|
}, 8, ["enter-from-class", "leave-to-class"])
|
|
643
643
|
], 8, ["to"])) : $("", !0);
|
|
644
644
|
}
|
|
645
|
-
}),
|
|
645
|
+
}), Ye = { class: "overflow-hidden rounded-lg shadow-lg" }, qe = /* @__PURE__ */ h({
|
|
646
646
|
__name: "Dropdown",
|
|
647
647
|
props: {
|
|
648
648
|
label: {},
|
|
@@ -656,9 +656,9 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
656
656
|
shown: { type: Boolean }
|
|
657
657
|
},
|
|
658
658
|
emits: ["update:visible"],
|
|
659
|
-
setup(
|
|
660
|
-
const
|
|
661
|
-
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), {
|
|
662
662
|
disabled: e.disabled,
|
|
663
663
|
class: "inline-block w-auto",
|
|
664
664
|
shown: e.shown,
|
|
@@ -666,36 +666,36 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
666
666
|
distance: e.distance + 6,
|
|
667
667
|
placement: e.placement,
|
|
668
668
|
skidding: e.skidding,
|
|
669
|
-
"onUpdate:shown":
|
|
670
|
-
onClick:
|
|
671
|
-
|
|
669
|
+
"onUpdate:shown": r[0] || (r[0] = (a) => t.$emit("update:visible", a)),
|
|
670
|
+
onClick: r[1] || (r[1] = (a) => {
|
|
671
|
+
a.stopPropagation();
|
|
672
672
|
})
|
|
673
673
|
}, {
|
|
674
|
-
popper:
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
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))
|
|
678
678
|
])
|
|
679
679
|
])
|
|
680
680
|
]),
|
|
681
|
-
default:
|
|
682
|
-
|
|
683
|
-
|
|
681
|
+
default: p(() => [
|
|
682
|
+
g(t.$slots, "default", {}, () => [
|
|
683
|
+
x(M, D({
|
|
684
684
|
...e.buttonProps,
|
|
685
685
|
disabled: e.disabled
|
|
686
|
-
}, { class: e.buttonClass }),
|
|
687
|
-
icon:
|
|
688
|
-
|
|
686
|
+
}, { class: e.buttonClass }), _({
|
|
687
|
+
icon: p(() => [
|
|
688
|
+
g(t.$slots, "button-icon")
|
|
689
689
|
]),
|
|
690
|
-
"icon-right":
|
|
691
|
-
|
|
690
|
+
"icon-right": p(() => [
|
|
691
|
+
g(t.$slots, "button-icon-right")
|
|
692
692
|
]),
|
|
693
693
|
_: 2
|
|
694
694
|
}, [
|
|
695
695
|
e.label ? {
|
|
696
696
|
name: "default",
|
|
697
|
-
fn:
|
|
698
|
-
|
|
697
|
+
fn: p(() => [
|
|
698
|
+
B(V(e.label), 1)
|
|
699
699
|
]),
|
|
700
700
|
key: "0"
|
|
701
701
|
} : void 0
|
|
@@ -717,24 +717,24 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
717
717
|
outlined: { type: Boolean },
|
|
718
718
|
keepOpen: { type: Boolean, default: !1 }
|
|
719
719
|
},
|
|
720
|
-
setup(
|
|
721
|
-
const
|
|
722
|
-
return (
|
|
723
|
-
...
|
|
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,
|
|
724
724
|
round: !1
|
|
725
725
|
}, {
|
|
726
|
-
disabled:
|
|
726
|
+
disabled: v(t),
|
|
727
727
|
class: "w-full justify-start transition-colors not-action:bg-transparent!"
|
|
728
728
|
}), {
|
|
729
|
-
icon:
|
|
730
|
-
|
|
729
|
+
icon: p(() => [
|
|
730
|
+
g(r.$slots, "icon")
|
|
731
731
|
]),
|
|
732
|
-
default:
|
|
733
|
-
|
|
732
|
+
default: p(() => [
|
|
733
|
+
g(r.$slots, "default")
|
|
734
734
|
]),
|
|
735
735
|
_: 3
|
|
736
736
|
}, 16, ["disabled"])), [
|
|
737
|
-
[
|
|
737
|
+
[v(q)]
|
|
738
738
|
]);
|
|
739
739
|
}
|
|
740
740
|
}), F = /* @__PURE__ */ h({
|
|
@@ -744,15 +744,15 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
744
744
|
inline: { type: Boolean },
|
|
745
745
|
action: { type: Boolean, default: !1 }
|
|
746
746
|
},
|
|
747
|
-
setup(
|
|
748
|
-
return (
|
|
749
|
-
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" : ""]])
|
|
750
750
|
}, null, 8, ["class"]));
|
|
751
751
|
}
|
|
752
|
-
}),
|
|
752
|
+
}), Je = ["type", "placeholder", "disabled"], Xe = {
|
|
753
753
|
key: 3,
|
|
754
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"
|
|
755
|
-
}, 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({
|
|
756
756
|
__name: "Input",
|
|
757
757
|
props: {
|
|
758
758
|
modelValue: {},
|
|
@@ -768,70 +768,70 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
768
768
|
type: { default: "text" }
|
|
769
769
|
},
|
|
770
770
|
emits: ["update:modelValue", "updateFocused", "keyTab"],
|
|
771
|
-
setup(
|
|
772
|
-
const
|
|
773
|
-
onChanged(
|
|
774
|
-
|
|
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);
|
|
775
775
|
}
|
|
776
|
-
}),
|
|
777
|
-
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;
|
|
778
778
|
return P(() => {
|
|
779
|
-
|
|
780
|
-
|
|
779
|
+
n.value && d.value ? u = !0 : !n.value && u && (u = !1, H(() => {
|
|
780
|
+
d.value = !0;
|
|
781
781
|
}));
|
|
782
782
|
}), z(() => {
|
|
783
|
-
|
|
783
|
+
t.autoFocus && (d.value = !0);
|
|
784
784
|
}), P(() => {
|
|
785
|
-
|
|
786
|
-
}), (
|
|
785
|
+
d.value && f.value?.focus();
|
|
786
|
+
}), (b, C) => (s(), m("div", {
|
|
787
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", [
|
|
788
788
|
{
|
|
789
|
-
"border-none bg-transparent group":
|
|
790
|
-
"cursor-not-allowed opacity-50":
|
|
791
|
-
accent:
|
|
792
|
-
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)
|
|
793
793
|
},
|
|
794
794
|
[
|
|
795
|
-
|
|
795
|
+
e.variant === "warning" ? "border-warning-500 dark:border-warning-300" : "border-primary-100 dark:border-gray-700"
|
|
796
796
|
]
|
|
797
797
|
]]),
|
|
798
|
-
onClick:
|
|
799
|
-
|
|
798
|
+
onClick: C[2] || (C[2] = () => {
|
|
799
|
+
d.value = !0;
|
|
800
800
|
})
|
|
801
801
|
}, [
|
|
802
|
-
|
|
802
|
+
e.leftIcon ? (s(), m("div", {
|
|
803
803
|
key: 0,
|
|
804
804
|
class: y(L)
|
|
805
805
|
}, [
|
|
806
|
-
|
|
806
|
+
x(F, { icon: e.leftIcon }, null, 8, ["icon"])
|
|
807
807
|
])) : $("", !0),
|
|
808
|
-
|
|
808
|
+
A(c("input", {
|
|
809
809
|
ref_key: "inputRef",
|
|
810
|
-
ref:
|
|
811
|
-
"onUpdate:modelValue":
|
|
810
|
+
ref: f,
|
|
811
|
+
"onUpdate:modelValue": C[0] || (C[0] = (U) => j(a) ? a.value = U : null),
|
|
812
812
|
class: "$ui-base w-full bg-transparent color-inherit outline-none placeholder-color-gray-500 dark:placeholder-gray-300",
|
|
813
|
-
type:
|
|
814
|
-
placeholder:
|
|
815
|
-
disabled:
|
|
816
|
-
onBlur:
|
|
817
|
-
}, null, 40,
|
|
818
|
-
[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)]
|
|
819
819
|
]),
|
|
820
|
-
|
|
820
|
+
v(n) ? (s(), m("div", {
|
|
821
821
|
key: 1,
|
|
822
822
|
class: y(L)
|
|
823
823
|
}, [
|
|
824
|
-
|
|
825
|
-
])) :
|
|
824
|
+
x(te)
|
|
825
|
+
])) : e.rightIcon ? (s(), m("div", {
|
|
826
826
|
key: 2,
|
|
827
827
|
class: y(L)
|
|
828
828
|
}, [
|
|
829
|
-
|
|
829
|
+
x(F, { icon: e.rightIcon }, null, 8, ["icon"])
|
|
830
830
|
])) : $("", !0),
|
|
831
|
-
|
|
831
|
+
l.value ? $("", !0) : (s(), m("div", Xe))
|
|
832
832
|
], 2));
|
|
833
833
|
}
|
|
834
|
-
}),
|
|
834
|
+
}), Qe = { class: "$ui-base" }, yt = /* @__PURE__ */ h({
|
|
835
835
|
__name: "FormField",
|
|
836
836
|
props: {
|
|
837
837
|
modelValue: {},
|
|
@@ -841,56 +841,56 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
841
841
|
placeholder: {}
|
|
842
842
|
},
|
|
843
843
|
emits: ["update:modelValue"],
|
|
844
|
-
setup(
|
|
845
|
-
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 = {
|
|
846
846
|
normal: "color-gray-600 dark:color-gray-400",
|
|
847
847
|
warning: "color-warning-500 dark:color-warning-200",
|
|
848
848
|
danger: "color-danger-500 dark:color-danger-200",
|
|
849
849
|
success: "color-primary-700 dark:color-primary-500"
|
|
850
|
-
},
|
|
850
|
+
}, i = {
|
|
851
851
|
warning: "i-bx:bxs-error",
|
|
852
852
|
danger: "i-ic-round-error",
|
|
853
853
|
success: "i-ep:success-filled"
|
|
854
854
|
};
|
|
855
|
-
return (
|
|
856
|
-
|
|
857
|
-
modelValue:
|
|
858
|
-
"onUpdate:modelValue":
|
|
859
|
-
placeholder:
|
|
860
|
-
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)
|
|
861
861
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
862
|
-
|
|
862
|
+
c("div", {
|
|
863
863
|
class: y(["mt2 $ui-base text-3.5", [
|
|
864
|
-
|
|
865
|
-
{ "opacity-65": !
|
|
864
|
+
l[e.status],
|
|
865
|
+
{ "opacity-65": !n.value }
|
|
866
866
|
]])
|
|
867
867
|
}, [
|
|
868
|
-
|
|
868
|
+
e.status !== "normal" && d.value ? (s(), w(F, {
|
|
869
869
|
key: 0,
|
|
870
870
|
inline: "",
|
|
871
|
-
icon:
|
|
871
|
+
icon: i[e.status]
|
|
872
872
|
}, null, 8, ["icon"])) : $("", !0),
|
|
873
|
-
|
|
873
|
+
B(" " + V(d.value ? e.message : ""), 1)
|
|
874
874
|
], 2)
|
|
875
875
|
]));
|
|
876
876
|
}
|
|
877
|
-
}),
|
|
877
|
+
}), Ze = ["innerHTML"], ht = /* @__PURE__ */ h({
|
|
878
878
|
__name: "IcIcon",
|
|
879
879
|
props: {
|
|
880
880
|
name: {}
|
|
881
881
|
},
|
|
882
|
-
setup(
|
|
883
|
-
const
|
|
884
|
-
return (
|
|
885
|
-
(
|
|
882
|
+
setup(e) {
|
|
883
|
+
const o = e, t = k(() => ke[o.name] ?? "");
|
|
884
|
+
return (r, a) => (s(), m("div", null, [
|
|
885
|
+
(s(), m("svg", {
|
|
886
886
|
class: "custom-svg h-1em w-1em",
|
|
887
887
|
xmlns: "http://www.w3.org/2000/svg",
|
|
888
888
|
viewBox: "0 0 24 24",
|
|
889
|
-
innerHTML:
|
|
890
|
-
}, null, 8,
|
|
889
|
+
innerHTML: t.value
|
|
890
|
+
}, null, 8, Ze))
|
|
891
891
|
]));
|
|
892
892
|
}
|
|
893
|
-
}),
|
|
893
|
+
}), _e = { class: "m1 min-w-35 w-auto flex flex-col" }, et = ["onClick"], kt = /* @__PURE__ */ h({
|
|
894
894
|
__name: "Select",
|
|
895
895
|
props: {
|
|
896
896
|
modelValue: {},
|
|
@@ -899,64 +899,64 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
899
899
|
placeholder: { default: "Select..." },
|
|
900
900
|
autoClose: { type: Boolean, default: !0 },
|
|
901
901
|
disabled: { type: Boolean, default: !1 },
|
|
902
|
-
labelRenderer: { type: Function, default: (
|
|
902
|
+
labelRenderer: { type: Function, default: (e) => String(e) },
|
|
903
903
|
buttonProps: { default: () => ({}) }
|
|
904
904
|
},
|
|
905
905
|
emits: ["update:modelValue"],
|
|
906
|
-
setup(
|
|
907
|
-
const
|
|
908
|
-
get: () =>
|
|
909
|
-
set: (
|
|
910
|
-
}),
|
|
911
|
-
const
|
|
912
|
-
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;
|
|
913
913
|
});
|
|
914
|
-
function
|
|
915
|
-
|
|
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;
|
|
916
916
|
}
|
|
917
|
-
return (
|
|
918
|
-
buttonProps:
|
|
919
|
-
disabled:
|
|
920
|
-
}),
|
|
921
|
-
popper:
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
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,
|
|
925
925
|
class: "cursor-pointer",
|
|
926
|
-
onClick: (
|
|
926
|
+
onClick: (b) => l(u)
|
|
927
927
|
}, [
|
|
928
|
-
|
|
929
|
-
item:
|
|
930
|
-
active:
|
|
931
|
-
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
|
|
932
932
|
}))
|
|
933
|
-
], 8, et))), 128)) : (
|
|
934
|
-
key:
|
|
935
|
-
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,
|
|
936
936
|
round: "normal",
|
|
937
937
|
class: y(["flex-[auto_1_1] not-hover:[&:not(.active)]:bg-transparent!", {
|
|
938
|
-
active:
|
|
938
|
+
active: e.multiple ? n.value.includes(u.value) : u.value === n.value
|
|
939
939
|
}]),
|
|
940
|
-
onClick: (
|
|
940
|
+
onClick: (b) => l(u)
|
|
941
941
|
}, {
|
|
942
|
-
default:
|
|
943
|
-
|
|
942
|
+
default: p(() => [
|
|
943
|
+
B(V(u.label), 1)
|
|
944
944
|
]),
|
|
945
945
|
_: 2
|
|
946
946
|
}, 1032, ["disabled", "class", "onClick"])), [
|
|
947
|
-
[
|
|
947
|
+
[v(q), e.autoClose]
|
|
948
948
|
])), 128))
|
|
949
949
|
])
|
|
950
950
|
]),
|
|
951
|
-
"button-icon-right":
|
|
952
|
-
|
|
951
|
+
"button-icon-right": p(() => [
|
|
952
|
+
f[0] || (f[0] = c("div", { class: "i-mdi-chevron-down" }, null, -1))
|
|
953
953
|
]),
|
|
954
954
|
_: 2
|
|
955
955
|
}, [
|
|
956
|
-
|
|
956
|
+
v(a).button ? {
|
|
957
957
|
name: "default",
|
|
958
|
-
fn:
|
|
959
|
-
|
|
958
|
+
fn: p(() => [
|
|
959
|
+
g(i.$slots, "button")
|
|
960
960
|
]),
|
|
961
961
|
key: "0"
|
|
962
962
|
} : void 0
|
|
@@ -969,25 +969,25 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
969
969
|
disabled: { type: Boolean }
|
|
970
970
|
},
|
|
971
971
|
emits: ["update:modelValue"],
|
|
972
|
-
setup(
|
|
973
|
-
const
|
|
974
|
-
return (
|
|
972
|
+
setup(e, { emit: o }) {
|
|
973
|
+
const a = T(e, "modelValue", o), n = be(a);
|
|
974
|
+
return (d, l) => (s(), m("div", {
|
|
975
975
|
class: y([[
|
|
976
|
-
|
|
976
|
+
e.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
977
977
|
], "$ui-base $ui-if-sc cursor-pointer select-none gap1.25 vertical-mid text-3.5"]),
|
|
978
978
|
role: "checkbox",
|
|
979
|
-
onClick:
|
|
979
|
+
onClick: l[0] || (l[0] = (i) => !e.disabled && v(n)())
|
|
980
980
|
}, [
|
|
981
|
-
|
|
982
|
-
|
|
981
|
+
g(d.$slots, "default"),
|
|
982
|
+
c("div", {
|
|
983
983
|
class: y([{
|
|
984
|
-
selected:
|
|
984
|
+
selected: v(a)
|
|
985
985
|
}, "group relative $ui-base h4 w8 rounded-2 bg-primary-100 transition-colors dark:bg-gray-700 [&.selected]:bg-primary-500!"])
|
|
986
986
|
}, [
|
|
987
|
-
|
|
987
|
+
c("div", {
|
|
988
988
|
class: y(["h4 w4 rounded-full bg-primary-800 transition-transform group-[&.selected]:transform-translate-x-4 dark:bg-white", [
|
|
989
|
-
{ "group-hover:opacity-75 group-active:scale-85": !
|
|
990
|
-
{ "opacity-65":
|
|
989
|
+
{ "group-hover:opacity-75 group-active:scale-85": !e.disabled },
|
|
990
|
+
{ "opacity-65": e.disabled }
|
|
991
991
|
]])
|
|
992
992
|
}, null, 2)
|
|
993
993
|
], 2)
|
|
@@ -1003,45 +1003,45 @@ const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
1003
1003
|
disabled: { type: Boolean },
|
|
1004
1004
|
shown: { type: Boolean }
|
|
1005
1005
|
},
|
|
1006
|
-
setup(
|
|
1007
|
-
return (
|
|
1008
|
-
disabled:
|
|
1009
|
-
placement:
|
|
1010
|
-
},
|
|
1011
|
-
popper:
|
|
1012
|
-
|
|
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")
|
|
1013
1013
|
]),
|
|
1014
|
-
default:
|
|
1015
|
-
|
|
1014
|
+
default: p(() => [
|
|
1015
|
+
g(o.$slots, "default")
|
|
1016
1016
|
]),
|
|
1017
1017
|
_: 3
|
|
1018
1018
|
}, 16, ["disabled", "placement"]));
|
|
1019
1019
|
}
|
|
1020
1020
|
});
|
|
1021
1021
|
export {
|
|
1022
|
-
|
|
1022
|
+
We as THEME_KEY,
|
|
1023
1023
|
dt as VueBadge,
|
|
1024
1024
|
M as VueButton,
|
|
1025
1025
|
ut as VueCard,
|
|
1026
1026
|
ct as VueCheckbox,
|
|
1027
|
-
|
|
1028
|
-
|
|
1027
|
+
mt as VueCodeBlock,
|
|
1028
|
+
ft as VueConfirm,
|
|
1029
1029
|
gt as VueDarkToggle,
|
|
1030
|
-
|
|
1030
|
+
Oe as VueDialog,
|
|
1031
1031
|
vt as VueDrawer,
|
|
1032
|
-
|
|
1032
|
+
qe as VueDropdown,
|
|
1033
1033
|
bt as VueDropdownButton,
|
|
1034
1034
|
yt as VueFormField,
|
|
1035
1035
|
ht as VueIcIcon,
|
|
1036
1036
|
F as VueIcon,
|
|
1037
|
-
|
|
1037
|
+
Ge as VueInput,
|
|
1038
1038
|
te as VueLoadingIndicator,
|
|
1039
|
-
|
|
1040
|
-
|
|
1039
|
+
Ae as VueNotification,
|
|
1040
|
+
ae as VueOverlay,
|
|
1041
1041
|
kt as VueSelect,
|
|
1042
1042
|
wt as VueSwitch,
|
|
1043
1043
|
$t as VueTooltip,
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1044
|
+
pt as showVueNotification,
|
|
1045
|
+
Ue as useDevToolsColorMode,
|
|
1046
|
+
Vt as vTooltip
|
|
1047
1047
|
};
|