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