@heito/hxui 1.0.11 → 1.0.13
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.es.js +499 -325
- package/dist/index.umd.js +17 -12
- package/dist/nuxt.js +29 -0
- package/dist/style.css +1 -1
- package/dist/types/components/index.d.ts +11 -1
- package/package.json +10 -5
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as $, createElementBlock as c, openBlock as r, normalizeClass as I, renderSlot as g, mergeModels as R, useSlots as Q, useModel as Y, withDirectives as O, createElementVNode as u, vModelDynamic as we, ref as B, computed as L, onUnmounted as te, Fragment as M, createBlock as E, Teleport as oe, createVNode as b, Transition as G, withCtx as P, normalizeStyle as A, vShow as U, nextTick as ke, createCommentVNode as T, toDisplayString as k, h as J, renderList as K, mergeProps as Ce, withModifiers as j, unref as x, createTextVNode as de, watch as Be, onMounted as me, vModelCheckbox as Pe, vModelRadio as Ie } from "vue";
|
|
2
|
+
const Me = ["disabled"], Se = /* @__PURE__ */ $({
|
|
3
3
|
__name: "Button",
|
|
4
4
|
props: {
|
|
5
5
|
variant: { default: "default" },
|
|
@@ -10,24 +10,30 @@ const Be = ["disabled"], Pe = /* @__PURE__ */ C({
|
|
|
10
10
|
return o;
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
|
-
setup(o, { emit:
|
|
14
|
-
const s =
|
|
15
|
-
return (
|
|
16
|
-
class:
|
|
17
|
-
disabled:
|
|
18
|
-
onClick: e[0] || (e[0] = (
|
|
13
|
+
setup(o, { emit: t }) {
|
|
14
|
+
const s = t;
|
|
15
|
+
return (n, e) => (r(), c("button", {
|
|
16
|
+
class: I(["ui-button", n.variant]),
|
|
17
|
+
disabled: n.disabled,
|
|
18
|
+
onClick: e[0] || (e[0] = (i) => s("click", i))
|
|
19
19
|
}, [
|
|
20
|
-
|
|
21
|
-
], 10,
|
|
20
|
+
g(n.$slots, "default", {}, void 0, !0)
|
|
21
|
+
], 10, Me));
|
|
22
22
|
}
|
|
23
|
-
}),
|
|
23
|
+
}), y = (o, t) => {
|
|
24
24
|
const s = o.__vccOpts || o;
|
|
25
|
-
for (const [
|
|
26
|
-
s[
|
|
25
|
+
for (const [n, e] of t)
|
|
26
|
+
s[n] = e;
|
|
27
27
|
return s;
|
|
28
|
-
},
|
|
28
|
+
}, he = /* @__PURE__ */ y(Se, [["__scopeId", "data-v-7bc0dcbf"]]), Oe = {}, Ee = { class: "ui-button-group" };
|
|
29
|
+
function Le(o, t) {
|
|
30
|
+
return r(), c("div", Ee, [
|
|
31
|
+
g(o.$slots, "default", {}, void 0, !0)
|
|
32
|
+
]);
|
|
33
|
+
}
|
|
34
|
+
const Te = /* @__PURE__ */ y(Oe, [["render", Le], ["__scopeId", "data-v-1da6d370"]]), Ve = ["type", "placeholder", "min", "max", "maxlength"], Ne = /* @__PURE__ */ $({
|
|
29
35
|
__name: "Input",
|
|
30
|
-
props: /* @__PURE__ */
|
|
36
|
+
props: /* @__PURE__ */ R({
|
|
31
37
|
type: { default: "text" },
|
|
32
38
|
disabled: { type: Boolean },
|
|
33
39
|
placeholder: {},
|
|
@@ -37,7 +43,7 @@ const Be = ["disabled"], Pe = /* @__PURE__ */ C({
|
|
|
37
43
|
value: {},
|
|
38
44
|
valueModifiers: {}
|
|
39
45
|
}),
|
|
40
|
-
emits: /* @__PURE__ */
|
|
46
|
+
emits: /* @__PURE__ */ R({
|
|
41
47
|
input(o) {
|
|
42
48
|
return o;
|
|
43
49
|
},
|
|
@@ -51,33 +57,33 @@ const Be = ["disabled"], Pe = /* @__PURE__ */ C({
|
|
|
51
57
|
return o;
|
|
52
58
|
}
|
|
53
59
|
}, ["update:value"]),
|
|
54
|
-
setup(o, { emit:
|
|
55
|
-
|
|
56
|
-
const s =
|
|
60
|
+
setup(o, { emit: t }) {
|
|
61
|
+
Q();
|
|
62
|
+
const s = Y(o, "value", {
|
|
57
63
|
set(e) {
|
|
58
64
|
return e;
|
|
59
65
|
}
|
|
60
|
-
}),
|
|
61
|
-
return (e,
|
|
62
|
-
class:
|
|
66
|
+
}), n = t;
|
|
67
|
+
return (e, i) => (r(), c("label", {
|
|
68
|
+
class: I(["ui-input", e.type])
|
|
63
69
|
}, [
|
|
64
|
-
|
|
70
|
+
O(u("input", {
|
|
65
71
|
type: e.type,
|
|
66
|
-
"onUpdate:modelValue":
|
|
72
|
+
"onUpdate:modelValue": i[0] || (i[0] = (l) => s.value = l),
|
|
67
73
|
placeholder: e.placeholder,
|
|
68
74
|
min: e.min,
|
|
69
75
|
max: e.max,
|
|
70
76
|
maxlength: e.max,
|
|
71
|
-
onInput:
|
|
72
|
-
onChange:
|
|
73
|
-
onFocus:
|
|
74
|
-
onBlur:
|
|
75
|
-
}, null, 40,
|
|
76
|
-
[
|
|
77
|
+
onInput: i[1] || (i[1] = (l) => n("input", l)),
|
|
78
|
+
onChange: i[2] || (i[2] = (l) => n("change", l)),
|
|
79
|
+
onFocus: i[3] || (i[3] = (l) => n("focus", l)),
|
|
80
|
+
onBlur: i[4] || (i[4] = (l) => n("blur", l))
|
|
81
|
+
}, null, 40, Ve), [
|
|
82
|
+
[we, s.value]
|
|
77
83
|
])
|
|
78
84
|
], 2));
|
|
79
85
|
}
|
|
80
|
-
}),
|
|
86
|
+
}), He = /* @__PURE__ */ y(Ne, [["__scopeId", "data-v-55829ca6"]]), Ae = /* @__PURE__ */ $({
|
|
81
87
|
__name: "Popover",
|
|
82
88
|
props: {
|
|
83
89
|
side: { default: () => "bottom" },
|
|
@@ -88,69 +94,69 @@ const Be = ["disabled"], Pe = /* @__PURE__ */ C({
|
|
|
88
94
|
style: { default: "" }
|
|
89
95
|
},
|
|
90
96
|
emits: ["show", "hide"],
|
|
91
|
-
setup(o, { emit:
|
|
92
|
-
|
|
93
|
-
const s =
|
|
94
|
-
const
|
|
95
|
-
return
|
|
97
|
+
setup(o, { emit: t }) {
|
|
98
|
+
Q();
|
|
99
|
+
const s = t, n = o, e = B(!1), i = B(null), l = L(() => {
|
|
100
|
+
const m = typeof n.side == "string" ? [n.side, "center"] : n.side;
|
|
101
|
+
return i.value !== null && (m[0] = i.value), m;
|
|
96
102
|
});
|
|
97
|
-
let
|
|
98
|
-
function
|
|
99
|
-
e.value = !0,
|
|
103
|
+
let d = null, v = null, _ = null;
|
|
104
|
+
function C(m) {
|
|
105
|
+
e.value = !0, d = m, s("show");
|
|
100
106
|
}
|
|
101
107
|
function p() {
|
|
102
|
-
e.value = !1,
|
|
108
|
+
e.value = !1, d = null, s("hide");
|
|
103
109
|
}
|
|
104
|
-
function
|
|
105
|
-
e.value ? p() :
|
|
110
|
+
function f(m) {
|
|
111
|
+
e.value ? p() : C(m);
|
|
106
112
|
}
|
|
107
|
-
function a(
|
|
108
|
-
if (!
|
|
109
|
-
const { width: N, height:
|
|
110
|
-
|
|
113
|
+
function a(m, w) {
|
|
114
|
+
if (!m || !w) return;
|
|
115
|
+
const { width: N, height: z, x: ee, y: F, top: W, left: H, right: q, bottom: Z } = m?.getBoundingClientRect(), { width: le, height: ae } = w?.getBoundingClientRect(), [X] = l.value, [re, ue] = typeof n.collisionPadding == "number" ? [n.collisionPadding, n.collisionPadding] : n.collisionPadding;
|
|
116
|
+
i.value = null, X === "top" && W - ae - ue < 0 ? i.value = "bottom" : X === "left" && H - le - re < 0 ? i.value = "right" : X === "bottom" && ae + Z > window.innerHeight ? i.value = "top" : X === "right" && le + q > window.innerWidth && (i.value = "left"), w.style.setProperty("--gap-h", `${re}px`), w.style.setProperty("--gap-v", `${ue}px`), w.style.setProperty("--target-width", `${N}px`), w.style.setProperty("--target-height", `${z}px`), w.style.setProperty("--target-x", `${ee}px`), w.style.setProperty("--target-y", `${F}px`);
|
|
111
117
|
}
|
|
112
118
|
function h() {
|
|
113
|
-
|
|
119
|
+
v && document.removeEventListener("scroll", v), _ && document.removeEventListener("click", _), v = null, _ = null;
|
|
114
120
|
}
|
|
115
|
-
function
|
|
116
|
-
if (!
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
!e.value || !
|
|
120
|
-
},
|
|
121
|
-
!
|
|
122
|
-
}, document.addEventListener("scroll",
|
|
123
|
-
a(
|
|
121
|
+
function S(m) {
|
|
122
|
+
if (!d) return;
|
|
123
|
+
const w = d?.currentTarget;
|
|
124
|
+
v = () => {
|
|
125
|
+
!e.value || !w || a(w, m);
|
|
126
|
+
}, _ = (N) => {
|
|
127
|
+
!n?.closeOnClickOutside || (N.composedPath?.() || N.path)?.includes(m) || p();
|
|
128
|
+
}, document.addEventListener("scroll", v, { capture: !0, passive: !0 }), ke(() => {
|
|
129
|
+
a(w, m), setTimeout(() => _ && document.addEventListener("click", _), 10);
|
|
124
130
|
});
|
|
125
131
|
}
|
|
126
|
-
function
|
|
127
|
-
h(),
|
|
132
|
+
function V() {
|
|
133
|
+
h(), d = null, i.value = null;
|
|
128
134
|
}
|
|
129
|
-
return
|
|
130
|
-
|
|
131
|
-
}), (
|
|
132
|
-
|
|
133
|
-
show:
|
|
135
|
+
return te(() => {
|
|
136
|
+
V();
|
|
137
|
+
}), (m, w) => (r(), c(M, null, [
|
|
138
|
+
g(m.$slots, "default", {
|
|
139
|
+
show: C,
|
|
134
140
|
hide: p,
|
|
135
|
-
toggle:
|
|
141
|
+
toggle: f,
|
|
136
142
|
isOpened: e.value
|
|
137
143
|
}, void 0, !0),
|
|
138
|
-
(
|
|
139
|
-
|
|
140
|
-
name: typeof
|
|
141
|
-
onBeforeEnter:
|
|
142
|
-
onAfterLeave:
|
|
144
|
+
(r(), E(oe, { to: "body" }, [
|
|
145
|
+
b(G, {
|
|
146
|
+
name: typeof m.transition == "string" ? m.transition : m.transition?.name,
|
|
147
|
+
onBeforeEnter: S,
|
|
148
|
+
onAfterLeave: V
|
|
143
149
|
}, {
|
|
144
150
|
default: P(() => [
|
|
145
|
-
|
|
146
|
-
class:
|
|
151
|
+
O(u("div", {
|
|
152
|
+
class: I(["ui-popover", ...l.value, { fixed: m.fixed }]),
|
|
147
153
|
role: "dialog",
|
|
148
154
|
"aria-modal": "true",
|
|
149
|
-
style:
|
|
155
|
+
style: A(m.style)
|
|
150
156
|
}, [
|
|
151
|
-
|
|
157
|
+
g(m.$slots, "content", {}, void 0, !0)
|
|
152
158
|
], 6), [
|
|
153
|
-
[
|
|
159
|
+
[U, e.value]
|
|
154
160
|
])
|
|
155
161
|
]),
|
|
156
162
|
_: 3
|
|
@@ -158,41 +164,41 @@ const Be = ["disabled"], Pe = /* @__PURE__ */ C({
|
|
|
158
164
|
]))
|
|
159
165
|
], 64));
|
|
160
166
|
}
|
|
161
|
-
}), ge = /* @__PURE__ */
|
|
167
|
+
}), ge = /* @__PURE__ */ y(Ae, [["__scopeId", "data-v-c4802e87"]]), De = { key: 0 }, Re = { key: 1 }, Ue = /* @__PURE__ */ $({
|
|
162
168
|
__name: "SelectOption",
|
|
163
169
|
props: {
|
|
164
170
|
option: {}
|
|
165
171
|
},
|
|
166
172
|
emits: {
|
|
167
|
-
click(o,
|
|
168
|
-
return { event: o, option:
|
|
173
|
+
click(o, t) {
|
|
174
|
+
return { event: o, option: t };
|
|
169
175
|
}
|
|
170
176
|
},
|
|
171
|
-
setup(o, { emit:
|
|
172
|
-
const s =
|
|
173
|
-
function e(
|
|
174
|
-
|
|
177
|
+
setup(o, { emit: t }) {
|
|
178
|
+
const s = t, n = o;
|
|
179
|
+
function e(i) {
|
|
180
|
+
n?.option?.type !== "option" || n?.option?.disabled === !0 || s("click", i, n.option);
|
|
175
181
|
}
|
|
176
|
-
return (
|
|
177
|
-
class:
|
|
182
|
+
return (i, l) => (r(), c("div", {
|
|
183
|
+
class: I(["option", !i.option?.type || i.option?.type === "option" ? "default" : i.option?.type, { disabled: i.option?.type === "option" && i.option?.disabled }]),
|
|
178
184
|
onClick: e
|
|
179
185
|
}, [
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
])) :
|
|
186
|
+
i.option?.type === "option" ? (r(), c("div", De, [
|
|
187
|
+
u("div", null, k(i.option?.label || i.option?.value), 1),
|
|
188
|
+
u("div", null, k(i.option?.text), 1)
|
|
189
|
+
])) : i.option?.type === "label" ? (r(), c("span", Re, k(i.option?.value), 1)) : i.option?.type === "separator" ? (r(), c(M, { key: 2 }, [], 64)) : T("", !0)
|
|
184
190
|
], 2));
|
|
185
191
|
}
|
|
186
|
-
}),
|
|
192
|
+
}), ce = /* @__PURE__ */ y(Ue, [["__scopeId", "data-v-1fea3155"]]);
|
|
187
193
|
/**
|
|
188
194
|
* @license lucide-vue-next v0.577.0 - ISC
|
|
189
195
|
*
|
|
190
196
|
* This source code is licensed under the ISC license.
|
|
191
197
|
* See the LICENSE file in the root directory of this source tree.
|
|
192
198
|
*/
|
|
193
|
-
const
|
|
194
|
-
for (const
|
|
195
|
-
if (
|
|
199
|
+
const je = (o) => {
|
|
200
|
+
for (const t in o)
|
|
201
|
+
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
196
202
|
return !0;
|
|
197
203
|
return !1;
|
|
198
204
|
};
|
|
@@ -202,30 +208,30 @@ const Ne = (o) => {
|
|
|
202
208
|
* This source code is licensed under the ISC license.
|
|
203
209
|
* See the LICENSE file in the root directory of this source tree.
|
|
204
210
|
*/
|
|
205
|
-
const
|
|
211
|
+
const pe = (o) => o === "";
|
|
206
212
|
/**
|
|
207
213
|
* @license lucide-vue-next v0.577.0 - ISC
|
|
208
214
|
*
|
|
209
215
|
* This source code is licensed under the ISC license.
|
|
210
216
|
* See the LICENSE file in the root directory of this source tree.
|
|
211
217
|
*/
|
|
212
|
-
const
|
|
218
|
+
const Ge = (...o) => o.filter((t, s, n) => !!t && t.trim() !== "" && n.indexOf(t) === s).join(" ").trim();
|
|
213
219
|
/**
|
|
214
220
|
* @license lucide-vue-next v0.577.0 - ISC
|
|
215
221
|
*
|
|
216
222
|
* This source code is licensed under the ISC license.
|
|
217
223
|
* See the LICENSE file in the root directory of this source tree.
|
|
218
224
|
*/
|
|
219
|
-
const
|
|
225
|
+
const fe = (o) => o.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
220
226
|
/**
|
|
221
227
|
* @license lucide-vue-next v0.577.0 - ISC
|
|
222
228
|
*
|
|
223
229
|
* This source code is licensed under the ISC license.
|
|
224
230
|
* See the LICENSE file in the root directory of this source tree.
|
|
225
231
|
*/
|
|
226
|
-
const
|
|
232
|
+
const ze = (o) => o.replace(
|
|
227
233
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
228
|
-
(
|
|
234
|
+
(t, s, n) => n ? n.toUpperCase() : s.toLowerCase()
|
|
229
235
|
);
|
|
230
236
|
/**
|
|
231
237
|
* @license lucide-vue-next v0.577.0 - ISC
|
|
@@ -233,9 +239,9 @@ const Ae = (o) => o.replace(
|
|
|
233
239
|
* This source code is licensed under the ISC license.
|
|
234
240
|
* See the LICENSE file in the root directory of this source tree.
|
|
235
241
|
*/
|
|
236
|
-
const
|
|
237
|
-
const
|
|
238
|
-
return
|
|
242
|
+
const Fe = (o) => {
|
|
243
|
+
const t = ze(o);
|
|
244
|
+
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
239
245
|
};
|
|
240
246
|
/**
|
|
241
247
|
* @license lucide-vue-next v0.577.0 - ISC
|
|
@@ -243,7 +249,7 @@ const De = (o) => {
|
|
|
243
249
|
* This source code is licensed under the ISC license.
|
|
244
250
|
* See the LICENSE file in the root directory of this source tree.
|
|
245
251
|
*/
|
|
246
|
-
var
|
|
252
|
+
var D = {
|
|
247
253
|
xmlns: "http://www.w3.org/2000/svg",
|
|
248
254
|
width: 24,
|
|
249
255
|
height: 24,
|
|
@@ -260,33 +266,33 @@ var V = {
|
|
|
260
266
|
* This source code is licensed under the ISC license.
|
|
261
267
|
* See the LICENSE file in the root directory of this source tree.
|
|
262
268
|
*/
|
|
263
|
-
const
|
|
269
|
+
const We = ({
|
|
264
270
|
name: o,
|
|
265
|
-
iconNode:
|
|
271
|
+
iconNode: t,
|
|
266
272
|
absoluteStrokeWidth: s,
|
|
267
|
-
"absolute-stroke-width":
|
|
273
|
+
"absolute-stroke-width": n,
|
|
268
274
|
strokeWidth: e,
|
|
269
|
-
"stroke-width":
|
|
270
|
-
size: l =
|
|
271
|
-
color:
|
|
272
|
-
...
|
|
273
|
-
}, { slots:
|
|
275
|
+
"stroke-width": i,
|
|
276
|
+
size: l = D.width,
|
|
277
|
+
color: d = D.stroke,
|
|
278
|
+
...v
|
|
279
|
+
}, { slots: _ }) => J(
|
|
274
280
|
"svg",
|
|
275
281
|
{
|
|
276
|
-
...
|
|
277
|
-
...
|
|
282
|
+
...D,
|
|
283
|
+
...v,
|
|
278
284
|
width: l,
|
|
279
285
|
height: l,
|
|
280
|
-
stroke:
|
|
281
|
-
"stroke-width":
|
|
282
|
-
class:
|
|
286
|
+
stroke: d,
|
|
287
|
+
"stroke-width": pe(s) || pe(n) || s === !0 || n === !0 ? Number(e || i || D["stroke-width"]) * 24 / Number(l) : e || i || D["stroke-width"],
|
|
288
|
+
class: Ge(
|
|
283
289
|
"lucide",
|
|
284
|
-
|
|
285
|
-
...o ? [`lucide-${
|
|
290
|
+
v.class,
|
|
291
|
+
...o ? [`lucide-${fe(Fe(o))}-icon`, `lucide-${fe(o)}`] : ["lucide-icon"]
|
|
286
292
|
),
|
|
287
|
-
...!
|
|
293
|
+
...!_.default && !je(v) && { "aria-hidden": "true" }
|
|
288
294
|
},
|
|
289
|
-
[...
|
|
295
|
+
[...t.map((C) => J(...C)), ..._.default ? [_.default()] : []]
|
|
290
296
|
);
|
|
291
297
|
/**
|
|
292
298
|
* @license lucide-vue-next v0.577.0 - ISC
|
|
@@ -294,15 +300,15 @@ const Ve = ({
|
|
|
294
300
|
* This source code is licensed under the ISC license.
|
|
295
301
|
* See the LICENSE file in the root directory of this source tree.
|
|
296
302
|
*/
|
|
297
|
-
const
|
|
298
|
-
|
|
303
|
+
const ne = (o, t) => (s, { slots: n, attrs: e }) => J(
|
|
304
|
+
We,
|
|
299
305
|
{
|
|
300
306
|
...e,
|
|
301
307
|
...s,
|
|
302
|
-
iconNode:
|
|
308
|
+
iconNode: t,
|
|
303
309
|
name: o
|
|
304
310
|
},
|
|
305
|
-
|
|
311
|
+
n
|
|
306
312
|
);
|
|
307
313
|
/**
|
|
308
314
|
* @license lucide-vue-next v0.577.0 - ISC
|
|
@@ -310,7 +316,16 @@ const he = (o, i) => (s, { slots: t, attrs: e }) => q(
|
|
|
310
316
|
* This source code is licensed under the ISC license.
|
|
311
317
|
* See the LICENSE file in the root directory of this source tree.
|
|
312
318
|
*/
|
|
313
|
-
const
|
|
319
|
+
const qe = ne("chevron-right", [
|
|
320
|
+
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
321
|
+
]);
|
|
322
|
+
/**
|
|
323
|
+
* @license lucide-vue-next v0.577.0 - ISC
|
|
324
|
+
*
|
|
325
|
+
* This source code is licensed under the ISC license.
|
|
326
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
327
|
+
*/
|
|
328
|
+
const Ze = ne("chevrons-up-down", [
|
|
314
329
|
["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
|
|
315
330
|
["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
|
|
316
331
|
]);
|
|
@@ -320,10 +335,10 @@ const je = he("chevrons-up-down", [
|
|
|
320
335
|
* This source code is licensed under the ISC license.
|
|
321
336
|
* See the LICENSE file in the root directory of this source tree.
|
|
322
337
|
*/
|
|
323
|
-
const
|
|
338
|
+
const ye = ne("x", [
|
|
324
339
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
325
340
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
326
|
-
]),
|
|
341
|
+
]), Xe = { class: "options" }, Je = /* @__PURE__ */ $({
|
|
327
342
|
__name: "Select",
|
|
328
343
|
props: {
|
|
329
344
|
value: { type: [String, Number, Boolean] },
|
|
@@ -337,57 +352,57 @@ const me = he("x", [
|
|
|
337
352
|
return o;
|
|
338
353
|
}
|
|
339
354
|
},
|
|
340
|
-
setup(o, { emit:
|
|
341
|
-
const s =
|
|
342
|
-
() =>
|
|
355
|
+
setup(o, { emit: t }) {
|
|
356
|
+
const s = t, n = o, e = B(169), i = B(n?.value), l = L(
|
|
357
|
+
() => n.options?.map(({ type: p, ...f }) => ({
|
|
343
358
|
type: p ?? "option",
|
|
344
|
-
...
|
|
359
|
+
...f
|
|
345
360
|
})) ?? []
|
|
346
|
-
),
|
|
347
|
-
() => l.value.find((p) => p.type === "option" && p.value ===
|
|
361
|
+
), d = L(
|
|
362
|
+
() => l.value.find((p) => p.type === "option" && p.value === i.value) ?? null
|
|
348
363
|
);
|
|
349
|
-
let
|
|
350
|
-
function
|
|
351
|
-
p.type === "option" && (
|
|
364
|
+
let v;
|
|
365
|
+
function _(p) {
|
|
366
|
+
p.type === "option" && (i.value = p?.value, s("select", p), v && v());
|
|
352
367
|
}
|
|
353
|
-
function
|
|
368
|
+
function C(p, f) {
|
|
354
369
|
const a = p?.currentTarget;
|
|
355
|
-
a && (
|
|
370
|
+
a && (f(p), v = () => f(p), e.value = Math.min(Math.max(a?.clientWidth, 169), window.innerWidth > 512 ? 512 : window.innerWidth - 24));
|
|
356
371
|
}
|
|
357
|
-
return (p,
|
|
358
|
-
class:
|
|
372
|
+
return (p, f) => (r(), c("div", {
|
|
373
|
+
class: I(["ui-select", { selected: !!d.value }])
|
|
359
374
|
}, [
|
|
360
|
-
|
|
375
|
+
b(ge, {
|
|
361
376
|
side: p.side,
|
|
362
|
-
style:
|
|
377
|
+
style: A({ width: `${e.value}px` })
|
|
363
378
|
}, {
|
|
364
379
|
default: P(({ toggle: a }) => [
|
|
365
|
-
|
|
380
|
+
b(he, {
|
|
366
381
|
variant: "outline",
|
|
367
382
|
disabled: p.disabled,
|
|
368
|
-
onClick:
|
|
383
|
+
onClick: j((h) => C(h, a), ["prevent", "stop"])
|
|
369
384
|
}, {
|
|
370
385
|
default: P(() => [
|
|
371
|
-
|
|
372
|
-
|
|
386
|
+
u("span", null, k(d.value ? d.value?.label || d.value?.value : p.placeholder), 1),
|
|
387
|
+
b(x(Ze), { style: { opacity: ".5" } })
|
|
373
388
|
]),
|
|
374
389
|
_: 2
|
|
375
390
|
}, 1032, ["disabled", "onClick"])
|
|
376
391
|
]),
|
|
377
392
|
content: P(() => [
|
|
378
|
-
|
|
379
|
-
(
|
|
380
|
-
a?.type === "label" || a?.type === "separator" || a.type === "option" && a?.useDefaultStyle === !0 ? (
|
|
393
|
+
u("div", Xe, [
|
|
394
|
+
(r(!0), c(M, null, K(l.value, (a, h) => (r(), c(M, { key: h }, [
|
|
395
|
+
a?.type === "label" || a?.type === "separator" || a.type === "option" && a?.useDefaultStyle === !0 ? (r(), E(ce, {
|
|
381
396
|
key: 0,
|
|
382
397
|
option: a,
|
|
383
|
-
onClick: (
|
|
384
|
-
}, null, 8, ["option", "onClick"])) :
|
|
398
|
+
onClick: (S) => _(a)
|
|
399
|
+
}, null, 8, ["option", "onClick"])) : g(p.$slots, "option", Ce({
|
|
385
400
|
key: 1,
|
|
386
401
|
ref_for: !0
|
|
387
|
-
}, { option: a, index: h, select: () =>
|
|
388
|
-
|
|
402
|
+
}, { option: a, index: h, select: () => _(a) }), () => [
|
|
403
|
+
b(ce, {
|
|
389
404
|
option: a,
|
|
390
|
-
onClick: (
|
|
405
|
+
onClick: (S) => _(a)
|
|
391
406
|
}, null, 8, ["option", "onClick"])
|
|
392
407
|
], !0)
|
|
393
408
|
], 64))), 128))
|
|
@@ -397,10 +412,10 @@ const me = he("x", [
|
|
|
397
412
|
}, 8, ["side", "style"])
|
|
398
413
|
], 2));
|
|
399
414
|
}
|
|
400
|
-
}),
|
|
415
|
+
}), Qe = /* @__PURE__ */ y(Je, [["__scopeId", "data-v-6b3cdfba"]]), Ye = {
|
|
401
416
|
key: 0,
|
|
402
417
|
class: "header"
|
|
403
|
-
},
|
|
418
|
+
}, Ke = { class: "buttons" }, xe = ["onClick"], et = /* @__PURE__ */ $({
|
|
404
419
|
__name: "Dialog",
|
|
405
420
|
props: {
|
|
406
421
|
title: {},
|
|
@@ -413,74 +428,74 @@ const me = he("x", [
|
|
|
413
428
|
style: { type: [Boolean, null, String, Object, Array] }
|
|
414
429
|
},
|
|
415
430
|
emits: ["update:open", "show", "hide"],
|
|
416
|
-
setup(o, { emit:
|
|
417
|
-
const s =
|
|
418
|
-
function
|
|
419
|
-
|
|
431
|
+
setup(o, { emit: t }) {
|
|
432
|
+
const s = Q(), n = t, e = o, i = B(!1), l = L(() => typeof e.side == "string" ? [e.side, "center"] : e.side), d = L(() => typeof e.collisionPadding == "number" ? [e.collisionPadding, e.collisionPadding] : e.collisionPadding), v = L(() => !!e.title || !!e.description || !!s.title || !!s.description);
|
|
433
|
+
function _(a) {
|
|
434
|
+
i.value = a, n("update:open", a);
|
|
420
435
|
}
|
|
421
|
-
function
|
|
422
|
-
|
|
436
|
+
function C(a) {
|
|
437
|
+
_(!0), n("show");
|
|
423
438
|
}
|
|
424
439
|
function p() {
|
|
425
|
-
|
|
440
|
+
_(!1), n("hide");
|
|
426
441
|
}
|
|
427
|
-
function
|
|
428
|
-
|
|
442
|
+
function f(a) {
|
|
443
|
+
i.value ? p() : C();
|
|
429
444
|
}
|
|
430
|
-
return (a, h) => (
|
|
431
|
-
|
|
432
|
-
show:
|
|
445
|
+
return (a, h) => (r(), c(M, null, [
|
|
446
|
+
g(a.$slots, "default", {
|
|
447
|
+
show: C,
|
|
433
448
|
hide: p,
|
|
434
|
-
toggle:
|
|
435
|
-
isOpened:
|
|
449
|
+
toggle: f,
|
|
450
|
+
isOpened: i.value
|
|
436
451
|
}, void 0, !0),
|
|
437
|
-
(
|
|
438
|
-
|
|
452
|
+
(r(), E(oe, { to: "body" }, [
|
|
453
|
+
b(G, {
|
|
439
454
|
name: typeof a.transition == "string" ? a.transition : a.transition?.name
|
|
440
455
|
}, {
|
|
441
456
|
default: P(() => [
|
|
442
|
-
|
|
443
|
-
class:
|
|
444
|
-
style:
|
|
457
|
+
O(u("div", {
|
|
458
|
+
class: I(["dialog", ...l.value]),
|
|
459
|
+
style: A({ "--gap-v": d.value[0] + "px", "--gap-h": d.value[1] + "px" })
|
|
445
460
|
}, [
|
|
446
|
-
|
|
461
|
+
u("div", {
|
|
447
462
|
class: "background",
|
|
448
|
-
onClick: h[0] || (h[0] =
|
|
463
|
+
onClick: h[0] || (h[0] = j((S) => a.closeOnClickOutside && p(), ["prevent", "stop"]))
|
|
449
464
|
}),
|
|
450
|
-
|
|
465
|
+
u("div", {
|
|
451
466
|
class: "content",
|
|
452
|
-
style:
|
|
467
|
+
style: A(a.style)
|
|
453
468
|
}, [
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
469
|
+
v.value ? (r(), c("div", Ye, [
|
|
470
|
+
u("h2", null, [
|
|
471
|
+
g(a.$slots, "title", {}, () => [
|
|
472
|
+
de(k(a.title), 1)
|
|
458
473
|
], !0)
|
|
459
474
|
]),
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
475
|
+
u("p", null, [
|
|
476
|
+
g(a.$slots, "description", {}, () => [
|
|
477
|
+
de(k(a.description), 1)
|
|
463
478
|
], !0)
|
|
464
479
|
])
|
|
465
480
|
])) : T("", !0),
|
|
466
|
-
|
|
467
|
-
show:
|
|
481
|
+
g(a.$slots, "content", {
|
|
482
|
+
show: C,
|
|
468
483
|
hide: p,
|
|
469
|
-
toggle:
|
|
470
|
-
isOpened:
|
|
484
|
+
toggle: f,
|
|
485
|
+
isOpened: i.value
|
|
471
486
|
}, void 0, !0),
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
487
|
+
u("div", Ke, [
|
|
488
|
+
u("div", { onClick: p }, [
|
|
489
|
+
b(x(ye), { size: 16 })
|
|
475
490
|
]),
|
|
476
|
-
(
|
|
477
|
-
key:
|
|
478
|
-
onClick:
|
|
479
|
-
}, null, 8,
|
|
491
|
+
(r(!0), c(M, null, K(a.buttons, (S, V) => (r(), c("div", {
|
|
492
|
+
key: V,
|
|
493
|
+
onClick: j((m) => S?.click?.(m), ["prevent", "stop"])
|
|
494
|
+
}, null, 8, xe))), 128))
|
|
480
495
|
])
|
|
481
496
|
], 4)
|
|
482
497
|
], 6), [
|
|
483
|
-
[
|
|
498
|
+
[U, i.value]
|
|
484
499
|
])
|
|
485
500
|
]),
|
|
486
501
|
_: 3
|
|
@@ -488,9 +503,9 @@ const me = he("x", [
|
|
|
488
503
|
]))
|
|
489
504
|
], 64));
|
|
490
505
|
}
|
|
491
|
-
}),
|
|
506
|
+
}), tt = /* @__PURE__ */ y(et, [["__scopeId", "data-v-ad7af199"]]), ot = /* @__PURE__ */ $({
|
|
492
507
|
__name: "Tooltip",
|
|
493
|
-
props: /* @__PURE__ */
|
|
508
|
+
props: /* @__PURE__ */ R({
|
|
494
509
|
side: { default: () => "top" },
|
|
495
510
|
collisionPadding: { default: () => 8 },
|
|
496
511
|
delay: { default: 100 }
|
|
@@ -500,58 +515,58 @@ const me = he("x", [
|
|
|
500
515
|
}),
|
|
501
516
|
emits: ["update:open"],
|
|
502
517
|
setup(o) {
|
|
503
|
-
const
|
|
518
|
+
const t = Q(), s = Y(o, "open");
|
|
504
519
|
B();
|
|
505
|
-
const
|
|
506
|
-
const
|
|
507
|
-
return e.value !== null && (
|
|
520
|
+
const n = o, e = B(null), i = L(() => {
|
|
521
|
+
const f = typeof n.side == "string" ? [n.side, "center"] : n.side;
|
|
522
|
+
return e.value !== null && (f[0] = e.value), f;
|
|
508
523
|
});
|
|
509
|
-
let l = null,
|
|
510
|
-
function f
|
|
511
|
-
if (!
|
|
512
|
-
const a =
|
|
513
|
-
H === "top" &&
|
|
524
|
+
let l = null, d = null;
|
|
525
|
+
function v(f) {
|
|
526
|
+
if (!f || !d) return;
|
|
527
|
+
const a = d.target, { width: h, height: S, x: V, y: m, top: w, left: N, right: z, bottom: ee } = a?.getBoundingClientRect(), { width: F, height: W } = f?.getBoundingClientRect(), [H] = i.value, [q, Z] = typeof n.collisionPadding == "number" ? [n.collisionPadding, n.collisionPadding] : n.collisionPadding;
|
|
528
|
+
H === "top" && w - W - Z < 0 ? e.value = "bottom" : H === "left" && N - F - q < 0 ? e.value = "right" : H === "bottom" && W + ee > window.innerHeight ? e.value = "top" : H === "right" && F + z > window.innerWidth && (e.value = "left"), f.style.setProperty("--gap-h", `${q}px`), f.style.setProperty("--gap-v", `${Z}px`), f.style.setProperty("--target-width", `${h}px`), f.style.setProperty("--target-height", `${S}px`), f.style.setProperty("--target-x", `${V}px`), f.style.setProperty("--target-y", `${m}px`);
|
|
514
529
|
}
|
|
515
|
-
function
|
|
516
|
-
l && clearTimeout(l),
|
|
530
|
+
function _(f) {
|
|
531
|
+
l && clearTimeout(l), d = f, l = setTimeout(() => {
|
|
517
532
|
s.value = !0;
|
|
518
|
-
},
|
|
533
|
+
}, n.delay);
|
|
519
534
|
}
|
|
520
|
-
const
|
|
521
|
-
l && (clearTimeout(l), l = null),
|
|
535
|
+
const C = () => {
|
|
536
|
+
l && (clearTimeout(l), l = null), d = null, s.value = !1;
|
|
522
537
|
};
|
|
523
538
|
function p() {
|
|
524
|
-
return (
|
|
539
|
+
return (t.trigger?.() || []).map((a) => J(a.type, {
|
|
525
540
|
...a.props,
|
|
526
541
|
onMouseenter(h) {
|
|
527
|
-
|
|
542
|
+
_(h), a.props?.onMouseenter?.(h);
|
|
528
543
|
},
|
|
529
544
|
onMouseleave(h) {
|
|
530
|
-
|
|
545
|
+
C(), a.props?.onMouseleave?.(h);
|
|
531
546
|
},
|
|
532
547
|
onFocus(h) {
|
|
533
|
-
|
|
548
|
+
_(h), a.props?.onFocus?.(h);
|
|
534
549
|
},
|
|
535
550
|
onBlur(h) {
|
|
536
|
-
|
|
551
|
+
C(), a.props?.onBlur?.(h);
|
|
537
552
|
}
|
|
538
553
|
}, a.children));
|
|
539
554
|
}
|
|
540
|
-
return
|
|
555
|
+
return te(() => {
|
|
541
556
|
l && clearTimeout(l);
|
|
542
|
-
}), (
|
|
543
|
-
|
|
544
|
-
(
|
|
545
|
-
|
|
557
|
+
}), (f, a) => (r(), c(M, null, [
|
|
558
|
+
b(p),
|
|
559
|
+
(r(), E(oe, { to: "body" }, [
|
|
560
|
+
b(G, {
|
|
546
561
|
name: "show",
|
|
547
|
-
onBeforeEnter: a[0] || (a[0] = (h) =>
|
|
562
|
+
onBeforeEnter: a[0] || (a[0] = (h) => v(h))
|
|
548
563
|
}, {
|
|
549
564
|
default: P(() => [
|
|
550
|
-
s.value ? (
|
|
565
|
+
s.value ? (r(), c("div", {
|
|
551
566
|
key: 0,
|
|
552
|
-
class:
|
|
567
|
+
class: I(["tooltip", ...i.value])
|
|
553
568
|
}, [
|
|
554
|
-
|
|
569
|
+
g(f.$slots, "default", {}, void 0, !0)
|
|
555
570
|
], 2)) : T("", !0)
|
|
556
571
|
]),
|
|
557
572
|
_: 3
|
|
@@ -559,7 +574,7 @@ const me = he("x", [
|
|
|
559
574
|
]))
|
|
560
575
|
], 64));
|
|
561
576
|
}
|
|
562
|
-
}),
|
|
577
|
+
}), nt = /* @__PURE__ */ y(ot, [["__scopeId", "data-v-bccd013d"]]), st = /* @__PURE__ */ $({
|
|
563
578
|
__name: "Skeleton",
|
|
564
579
|
props: {
|
|
565
580
|
ready: { type: Boolean, default: !1 },
|
|
@@ -567,54 +582,92 @@ const me = he("x", [
|
|
|
567
582
|
h: { default: "16px" }
|
|
568
583
|
},
|
|
569
584
|
setup(o) {
|
|
570
|
-
return (
|
|
585
|
+
return (t, s) => t.ready ? g(t.$slots, "default", { key: 0 }, void 0, !0) : (r(), c("div", {
|
|
571
586
|
key: 1,
|
|
572
587
|
class: "ui-skeleton",
|
|
573
|
-
style:
|
|
588
|
+
style: A({ "--w": t.w, "--h": t.h })
|
|
574
589
|
}, [
|
|
575
|
-
s[0] || (s[0] =
|
|
576
|
-
|
|
590
|
+
s[0] || (s[0] = u("div", null, null, -1)),
|
|
591
|
+
g(t.$slots, "content", {}, void 0, !0)
|
|
577
592
|
], 4));
|
|
578
593
|
}
|
|
579
|
-
}),
|
|
594
|
+
}), _e = /* @__PURE__ */ y(st, [["__scopeId", "data-v-3b7cd939"]]), it = ["src", "alt"], lt = /* @__PURE__ */ $({
|
|
580
595
|
__name: "Image",
|
|
581
596
|
props: {
|
|
582
597
|
src: {},
|
|
583
598
|
alt: {}
|
|
584
599
|
},
|
|
585
600
|
setup(o) {
|
|
586
|
-
const
|
|
587
|
-
|
|
588
|
-
function
|
|
601
|
+
const t = o, s = B("loading");
|
|
602
|
+
Be(() => t.src, () => n());
|
|
603
|
+
function n() {
|
|
589
604
|
const e = new Image();
|
|
590
605
|
s.value = "loading", e.onload = () => {
|
|
591
606
|
s.value = "ready";
|
|
592
607
|
}, e.onerror = () => {
|
|
593
608
|
s.value = "error";
|
|
594
|
-
}, e.src =
|
|
609
|
+
}, e.src = t.src;
|
|
595
610
|
}
|
|
596
|
-
return
|
|
597
|
-
|
|
611
|
+
return me(() => n()), (e, i) => (r(), c(M, null, [
|
|
612
|
+
b(G, { name: "fade" }, {
|
|
598
613
|
default: P(() => [
|
|
599
|
-
|
|
614
|
+
O(u("img", {
|
|
600
615
|
class: "ui-image",
|
|
601
616
|
src: e.src,
|
|
602
617
|
alt: e.alt
|
|
603
|
-
}, null, 8,
|
|
604
|
-
[
|
|
618
|
+
}, null, 8, it), [
|
|
619
|
+
[U, s.value === "ready"]
|
|
605
620
|
])
|
|
606
621
|
]),
|
|
607
622
|
_: 1
|
|
608
623
|
}),
|
|
609
|
-
|
|
624
|
+
O(b(_e, {
|
|
610
625
|
class: "ui-image",
|
|
611
626
|
ready: !1
|
|
612
627
|
}, null, 512), [
|
|
613
|
-
[
|
|
628
|
+
[U, s.value !== "ready"]
|
|
614
629
|
])
|
|
615
630
|
], 64));
|
|
616
631
|
}
|
|
617
|
-
}),
|
|
632
|
+
}), se = /* @__PURE__ */ y(lt, [["__scopeId", "data-v-9ea0741f"]]), at = {}, rt = { class: "ui-label" };
|
|
633
|
+
function ut(o, t) {
|
|
634
|
+
return r(), c("p", rt, [
|
|
635
|
+
g(o.$slots, "default", {}, void 0, !0)
|
|
636
|
+
]);
|
|
637
|
+
}
|
|
638
|
+
const dt = /* @__PURE__ */ y(at, [["render", ut], ["__scopeId", "data-v-867cfe79"]]), ct = { class: "ui-checkbox" }, pt = ["name", "value"], ft = { class: "content" }, vt = /* @__PURE__ */ $({
|
|
639
|
+
__name: "Checkbox",
|
|
640
|
+
props: /* @__PURE__ */ R({
|
|
641
|
+
label: {},
|
|
642
|
+
name: {},
|
|
643
|
+
value: { type: [String, Number, Boolean], default: !1 }
|
|
644
|
+
}, {
|
|
645
|
+
modelValue: {},
|
|
646
|
+
modelModifiers: {}
|
|
647
|
+
}),
|
|
648
|
+
emits: ["update:modelValue"],
|
|
649
|
+
setup(o) {
|
|
650
|
+
const t = Y(o, "modelValue");
|
|
651
|
+
return (s, n) => (r(), c("label", ct, [
|
|
652
|
+
O(u("input", {
|
|
653
|
+
type: "checkbox",
|
|
654
|
+
name: s.name,
|
|
655
|
+
value: s.value,
|
|
656
|
+
"onUpdate:modelValue": n[0] || (n[0] = (e) => t.value = e)
|
|
657
|
+
}, null, 8, pt), [
|
|
658
|
+
[Pe, t.value]
|
|
659
|
+
]),
|
|
660
|
+
n[1] || (n[1] = u("div", null, [
|
|
661
|
+
u("div")
|
|
662
|
+
], -1)),
|
|
663
|
+
u("div", ft, [
|
|
664
|
+
g(s.$slots, "default", {}, () => [
|
|
665
|
+
u("span", null, k(s.label), 1)
|
|
666
|
+
], !0)
|
|
667
|
+
])
|
|
668
|
+
]));
|
|
669
|
+
}
|
|
670
|
+
}), mt = /* @__PURE__ */ y(vt, [["__scopeId", "data-v-8c903541"]]), ht = /* @__PURE__ */ $({
|
|
618
671
|
__name: "Height",
|
|
619
672
|
props: {
|
|
620
673
|
showed: { type: Boolean },
|
|
@@ -622,42 +675,42 @@ const me = he("x", [
|
|
|
622
675
|
duration: { type: Number, default: 0.3 }
|
|
623
676
|
},
|
|
624
677
|
setup(o) {
|
|
625
|
-
const
|
|
626
|
-
"--opacity":
|
|
627
|
-
"--duration": (
|
|
678
|
+
const t = o, s = B({
|
|
679
|
+
"--opacity": t.opacity ? 0 : 1,
|
|
680
|
+
"--duration": (t.duration || 0.3) + "s"
|
|
628
681
|
});
|
|
629
|
-
function
|
|
682
|
+
function n(l) {
|
|
630
683
|
l.style.height = "auto";
|
|
631
|
-
const { height:
|
|
632
|
-
l.style.height = "0px", l.offsetHeight, l.style.height =
|
|
684
|
+
const { height: d } = window.getComputedStyle(l);
|
|
685
|
+
l.style.height = "0px", l.offsetHeight, l.style.height = d;
|
|
633
686
|
}
|
|
634
687
|
function e(l) {
|
|
635
688
|
l.style.removeProperty("height");
|
|
636
689
|
}
|
|
637
|
-
function
|
|
638
|
-
const { height:
|
|
639
|
-
l.style.height =
|
|
690
|
+
function i(l) {
|
|
691
|
+
const { height: d } = window.getComputedStyle(l);
|
|
692
|
+
l.style.height = d, l.offsetHeight, l.style.height = "0px";
|
|
640
693
|
}
|
|
641
|
-
return (l,
|
|
694
|
+
return (l, d) => (r(), E(G, {
|
|
642
695
|
name: "height",
|
|
643
|
-
onEnter:
|
|
644
|
-
onAfterEnter:
|
|
645
|
-
onLeave:
|
|
646
|
-
onAfterLeave:
|
|
696
|
+
onEnter: d[0] || (d[0] = (v) => n(v)),
|
|
697
|
+
onAfterEnter: d[1] || (d[1] = (v) => e(v)),
|
|
698
|
+
onLeave: d[2] || (d[2] = (v) => i(v)),
|
|
699
|
+
onAfterLeave: d[3] || (d[3] = (v) => e(v))
|
|
647
700
|
}, {
|
|
648
701
|
default: P(() => [
|
|
649
|
-
o.showed ? (
|
|
702
|
+
o.showed ? (r(), c("div", {
|
|
650
703
|
key: 0,
|
|
651
704
|
class: "height-content",
|
|
652
|
-
style:
|
|
705
|
+
style: A(s.value)
|
|
653
706
|
}, [
|
|
654
|
-
|
|
707
|
+
g(l.$slots, "default", {}, void 0, !0)
|
|
655
708
|
], 4)) : T("", !0)
|
|
656
709
|
]),
|
|
657
710
|
_: 3
|
|
658
711
|
}));
|
|
659
712
|
}
|
|
660
|
-
}),
|
|
713
|
+
}), ie = /* @__PURE__ */ y(ht, [["__scopeId", "data-v-925752b4"]]), gt = { class: "content" }, yt = { class: "buttons" }, _t = ["onClick"], $t = { class: "options" }, bt = /* @__PURE__ */ $({
|
|
661
714
|
__name: "Notification",
|
|
662
715
|
props: {
|
|
663
716
|
notification: {},
|
|
@@ -668,87 +721,87 @@ const me = he("x", [
|
|
|
668
721
|
hide() {
|
|
669
722
|
}
|
|
670
723
|
},
|
|
671
|
-
setup(o, { emit:
|
|
672
|
-
const s =
|
|
673
|
-
return (e,
|
|
674
|
-
class:
|
|
724
|
+
setup(o, { emit: t }) {
|
|
725
|
+
const s = t, n = B(!1);
|
|
726
|
+
return (e, i) => (r(), c("div", {
|
|
727
|
+
class: I(["notification", { hide: n.value }])
|
|
675
728
|
}, [
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
e.notification?.icon || e.notification?.image ? (
|
|
729
|
+
g(e.$slots, "before", {}, void 0, !0),
|
|
730
|
+
u("header", null, [
|
|
731
|
+
e.notification?.icon || e.notification?.image ? (r(), c("div", {
|
|
679
732
|
key: 0,
|
|
680
|
-
class:
|
|
733
|
+
class: I(["i", {
|
|
681
734
|
image: e.notification?.image,
|
|
682
735
|
icon: e.notification?.icon
|
|
683
736
|
}])
|
|
684
737
|
}, [
|
|
685
|
-
e.notification?.image ? (
|
|
738
|
+
e.notification?.image ? (r(), E(se, {
|
|
686
739
|
key: 0,
|
|
687
740
|
src: e.notification?.image
|
|
688
741
|
}, null, 8, ["src"])) : T("", !0)
|
|
689
742
|
], 2)) : T("", !0),
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
743
|
+
u("div", gt, [
|
|
744
|
+
u("div", null, k(e.notification?.title), 1),
|
|
745
|
+
u("div", null, k(e.notification?.text), 1)
|
|
693
746
|
])
|
|
694
747
|
]),
|
|
695
|
-
|
|
748
|
+
b(ie, {
|
|
696
749
|
showed: e.showButtons && e.notification?.buttons?.length > 0
|
|
697
750
|
}, {
|
|
698
751
|
default: P(() => [
|
|
699
|
-
|
|
700
|
-
(
|
|
752
|
+
u("ul", yt, [
|
|
753
|
+
(r(!0), c(M, null, K(e.notification?.buttons, (l) => (r(), c("li", {
|
|
701
754
|
key: l?.label,
|
|
702
|
-
onClick:
|
|
755
|
+
onClick: j((d) => l?.click ? l?.click(d) : null, ["stop", "prevent"])
|
|
703
756
|
}, [
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
757
|
+
u("div", null, [
|
|
758
|
+
u("div", null, k(l?.label), 1),
|
|
759
|
+
u("div", null, k(l?.text), 1)
|
|
707
760
|
])
|
|
708
|
-
], 8,
|
|
761
|
+
], 8, _t))), 128))
|
|
709
762
|
])
|
|
710
763
|
]),
|
|
711
764
|
_: 1
|
|
712
765
|
}, 8, ["showed"]),
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
onClick:
|
|
766
|
+
O(u("ul", $t, [
|
|
767
|
+
u("li", {
|
|
768
|
+
onClick: i[0] || (i[0] = j((l) => s("hide"), ["stop", "prevent"]))
|
|
716
769
|
}, [
|
|
717
|
-
|
|
770
|
+
b(x(ye))
|
|
718
771
|
])
|
|
719
772
|
], 512), [
|
|
720
|
-
[
|
|
773
|
+
[U, e.showOptions && e.notification?.mode === "fixed"]
|
|
721
774
|
]),
|
|
722
|
-
|
|
775
|
+
g(e.$slots, "default", {}, void 0, !0)
|
|
723
776
|
], 2));
|
|
724
777
|
}
|
|
725
|
-
}),
|
|
778
|
+
}), $e = /* @__PURE__ */ y(bt, [["__scopeId", "data-v-1e6c986c"]]), wt = { class: "content" }, kt = /* @__PURE__ */ $({
|
|
726
779
|
__name: "Group",
|
|
727
780
|
props: {
|
|
728
781
|
name: {},
|
|
729
782
|
group: {}
|
|
730
783
|
},
|
|
731
784
|
setup(o) {
|
|
732
|
-
const
|
|
733
|
-
return (s,
|
|
734
|
-
class:
|
|
785
|
+
const t = B(!1);
|
|
786
|
+
return (s, n) => (r(), c("div", {
|
|
787
|
+
class: I(["group", { active: t.value }])
|
|
735
788
|
}, [
|
|
736
|
-
|
|
737
|
-
onClick:
|
|
789
|
+
u("header", {
|
|
790
|
+
onClick: n[0] || (n[0] = (e) => t.value = !t.value)
|
|
738
791
|
}, [
|
|
739
|
-
s.group?.image ? (
|
|
792
|
+
s.group?.image ? (r(), E(se, {
|
|
740
793
|
key: 0,
|
|
741
794
|
src: s.group?.image
|
|
742
795
|
}, null, 8, ["src"])) : T("", !0),
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
796
|
+
u("div", wt, [
|
|
797
|
+
u("div", null, k(s.group?.title || s.name), 1),
|
|
798
|
+
u("div", null, k(s.group?.text), 1)
|
|
746
799
|
])
|
|
747
800
|
]),
|
|
748
|
-
|
|
801
|
+
b(ie, { showed: t.value }, {
|
|
749
802
|
default: P(() => [
|
|
750
|
-
|
|
751
|
-
(
|
|
803
|
+
u("ul", null, [
|
|
804
|
+
(r(!0), c(M, null, K(s.group.list, (e) => (r(), E($e, {
|
|
752
805
|
key: e.id,
|
|
753
806
|
notification: e,
|
|
754
807
|
"show-buttons": !0
|
|
@@ -759,36 +812,157 @@ const me = he("x", [
|
|
|
759
812
|
}, 8, ["showed"])
|
|
760
813
|
], 2));
|
|
761
814
|
}
|
|
762
|
-
}),
|
|
815
|
+
}), Ct = /* @__PURE__ */ y(kt, [["__scopeId", "data-v-36c3285a"]]), Bt = { class: "ui-menu" }, Pt = /* @__PURE__ */ $({
|
|
816
|
+
__name: "Menu",
|
|
817
|
+
props: {
|
|
818
|
+
options: {}
|
|
819
|
+
},
|
|
820
|
+
setup(o) {
|
|
821
|
+
return (t, s) => (r(), c("div", Bt, [
|
|
822
|
+
g(t.$slots, "default", {}, void 0, !0)
|
|
823
|
+
]));
|
|
824
|
+
}
|
|
825
|
+
}), It = /* @__PURE__ */ y(Pt, [["__scopeId", "data-v-d2b5a4ab"]]), Mt = ["disabled"], St = /* @__PURE__ */ $({
|
|
826
|
+
__name: "MenuButton",
|
|
827
|
+
props: {
|
|
828
|
+
disabled: { type: Boolean }
|
|
829
|
+
},
|
|
830
|
+
setup(o) {
|
|
831
|
+
return (t, s) => (r(), c("button", {
|
|
832
|
+
class: "ui-menu-button",
|
|
833
|
+
disabled: t.disabled
|
|
834
|
+
}, [
|
|
835
|
+
g(t.$slots, "default", {}, void 0, !0)
|
|
836
|
+
], 8, Mt));
|
|
837
|
+
}
|
|
838
|
+
}), be = /* @__PURE__ */ y(St, [["__scopeId", "data-v-a57e93de"]]), Ot = {}, Et = { class: "ui-menu-label" };
|
|
839
|
+
function Lt(o, t) {
|
|
840
|
+
return r(), c("div", Et, [
|
|
841
|
+
g(o.$slots, "default", {}, void 0, !0)
|
|
842
|
+
]);
|
|
843
|
+
}
|
|
844
|
+
const Tt = /* @__PURE__ */ y(Ot, [["render", Lt], ["__scopeId", "data-v-0943ad46"]]), Vt = { class: "children-menu" }, Nt = /* @__PURE__ */ $({
|
|
845
|
+
__name: "MenuChildren",
|
|
846
|
+
props: {
|
|
847
|
+
disabled: { type: Boolean },
|
|
848
|
+
options: {}
|
|
849
|
+
},
|
|
850
|
+
setup(o) {
|
|
851
|
+
const t = B();
|
|
852
|
+
let s = null, n = null;
|
|
853
|
+
return me(() => {
|
|
854
|
+
t?.value && (s = t.value.querySelector(".children-menu"), n = new IntersectionObserver((e) => {
|
|
855
|
+
e.forEach((i) => {
|
|
856
|
+
i.isIntersecting && window.getComputedStyle(i.target).display !== "none" ? console.log("🎉 Элемент появился!", (/* @__PURE__ */ new Date()).toLocaleTimeString()) : i.isIntersecting || console.log("👋 Элемент скрылся!", (/* @__PURE__ */ new Date()).toLocaleTimeString());
|
|
857
|
+
});
|
|
858
|
+
}, {
|
|
859
|
+
threshold: 0.01
|
|
860
|
+
}), n.observe(s));
|
|
861
|
+
}), te(() => {
|
|
862
|
+
s && n?.unobserve(s);
|
|
863
|
+
}), (e, i) => (r(), c("div", {
|
|
864
|
+
class: "ui-menu-children",
|
|
865
|
+
ref_key: "el",
|
|
866
|
+
ref: t
|
|
867
|
+
}, [
|
|
868
|
+
b(be, { disabled: e.disabled }, {
|
|
869
|
+
default: P(() => [
|
|
870
|
+
g(e.$slots, "default", {}, void 0, !0),
|
|
871
|
+
b(x(qe))
|
|
872
|
+
]),
|
|
873
|
+
_: 3
|
|
874
|
+
}, 8, ["disabled"]),
|
|
875
|
+
u("div", Vt, [
|
|
876
|
+
g(e.$slots, "content", {}, void 0, !0)
|
|
877
|
+
])
|
|
878
|
+
], 512));
|
|
879
|
+
}
|
|
880
|
+
}), Ht = /* @__PURE__ */ y(Nt, [["__scopeId", "data-v-4cbc307c"]]), At = {}, Dt = { class: "ui-menu-group" };
|
|
881
|
+
function Rt(o, t) {
|
|
882
|
+
return r(), c("div", Dt);
|
|
883
|
+
}
|
|
884
|
+
const Ut = /* @__PURE__ */ y(At, [["render", Rt]]), jt = { class: "ui-menu-radio" }, Gt = ["name", "value"], zt = /* @__PURE__ */ $({
|
|
885
|
+
__name: "MenuRadio",
|
|
886
|
+
props: /* @__PURE__ */ R({
|
|
887
|
+
name: {},
|
|
888
|
+
label: {},
|
|
889
|
+
value: { type: [String, Number, Boolean] }
|
|
890
|
+
}, {
|
|
891
|
+
modelValue: {},
|
|
892
|
+
modelModifiers: {}
|
|
893
|
+
}),
|
|
894
|
+
emits: ["update:modelValue"],
|
|
895
|
+
setup(o) {
|
|
896
|
+
const t = Y(o, "modelValue");
|
|
897
|
+
return (s, n) => (r(), c("label", jt, [
|
|
898
|
+
O(u("input", {
|
|
899
|
+
type: "radio",
|
|
900
|
+
name: s.name,
|
|
901
|
+
value: s.value,
|
|
902
|
+
"onUpdate:modelValue": n[0] || (n[0] = (e) => t.value = e)
|
|
903
|
+
}, null, 8, Gt), [
|
|
904
|
+
[Ie, t.value]
|
|
905
|
+
]),
|
|
906
|
+
n[1] || (n[1] = u("div", null, null, -1)),
|
|
907
|
+
g(s.$slots, "default", {}, () => [
|
|
908
|
+
u("span", null, k(s.label), 1)
|
|
909
|
+
], !0)
|
|
910
|
+
]));
|
|
911
|
+
}
|
|
912
|
+
}), Ft = /* @__PURE__ */ y(zt, [["__scopeId", "data-v-9b285e77"]]), Wt = {}, qt = { class: "ui-menu-separator" };
|
|
913
|
+
function Zt(o, t) {
|
|
914
|
+
return r(), c("div", qt);
|
|
915
|
+
}
|
|
916
|
+
const Xt = /* @__PURE__ */ y(Wt, [["render", Zt], ["__scopeId", "data-v-54378c73"]]), ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
763
917
|
__proto__: null,
|
|
764
|
-
AnimationHeight:
|
|
765
|
-
Button:
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
918
|
+
AnimationHeight: ie,
|
|
919
|
+
Button: he,
|
|
920
|
+
ButtonGroup: Te,
|
|
921
|
+
Checkbox: mt,
|
|
922
|
+
Dialog: tt,
|
|
923
|
+
Image: se,
|
|
924
|
+
Input: He,
|
|
925
|
+
Label: dt,
|
|
926
|
+
Menu: It,
|
|
927
|
+
MenuButton: be,
|
|
928
|
+
MenuChildren: Ht,
|
|
929
|
+
MenuGroup: Ut,
|
|
930
|
+
MenuLabel: Tt,
|
|
931
|
+
MenuRadio: Ft,
|
|
932
|
+
MenuSeparator: Xt,
|
|
933
|
+
NotificationCard: $e,
|
|
934
|
+
NotificationGroup: Ct,
|
|
771
935
|
Popover: ge,
|
|
772
|
-
Select:
|
|
773
|
-
Skeleton:
|
|
774
|
-
Tooltip:
|
|
775
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
936
|
+
Select: Qe,
|
|
937
|
+
Skeleton: _e,
|
|
938
|
+
Tooltip: nt
|
|
939
|
+
}, Symbol.toStringTag, { value: "Module" })), Qt = {
|
|
776
940
|
install(o) {
|
|
777
|
-
for (const
|
|
778
|
-
o.component(
|
|
941
|
+
for (const t in ve)
|
|
942
|
+
o.component(t, ve[t]);
|
|
779
943
|
}
|
|
780
944
|
};
|
|
781
945
|
export {
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
946
|
+
ie as AnimationHeight,
|
|
947
|
+
he as Button,
|
|
948
|
+
Te as ButtonGroup,
|
|
949
|
+
mt as Checkbox,
|
|
950
|
+
tt as Dialog,
|
|
951
|
+
se as Image,
|
|
952
|
+
He as Input,
|
|
953
|
+
dt as Label,
|
|
954
|
+
It as Menu,
|
|
955
|
+
be as MenuButton,
|
|
956
|
+
Ht as MenuChildren,
|
|
957
|
+
Ut as MenuGroup,
|
|
958
|
+
Tt as MenuLabel,
|
|
959
|
+
Ft as MenuRadio,
|
|
960
|
+
Xt as MenuSeparator,
|
|
961
|
+
$e as NotificationCard,
|
|
962
|
+
Ct as NotificationGroup,
|
|
789
963
|
ge as Popover,
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
964
|
+
Qe as Select,
|
|
965
|
+
_e as Skeleton,
|
|
966
|
+
nt as Tooltip,
|
|
967
|
+
Qt as default
|
|
794
968
|
};
|