@useinsider/ab-components 0.0.16 → 0.0.17
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/ab-components.cjs.js +1 -1
- package/dist/ab-components.cjs.js.map +1 -1
- package/dist/ab-components.es.js +298 -296
- package/dist/ab-components.es.js.map +1 -1
- package/dist/ab-components.iife.js +1 -1
- package/dist/ab-components.iife.js.map +1 -1
- package/dist/ab-components.umd.js +1 -1
- package/dist/ab-components.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/ab-components.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as T, computed as
|
|
2
|
-
const
|
|
3
|
-
button__size_default:
|
|
4
|
-
button__size_small:
|
|
1
|
+
import { defineComponent as T, computed as C, openBlock as u, createElementBlock as f, normalizeClass as s, unref as o, createBlock as U, createCommentVNode as z, toDisplayString as I, ref as v, reactive as me, onMounted as pe, watch as oe, Fragment as ue, createElementVNode as $, withDirectives as ve, normalizeStyle as F, withModifiers as Te, vModelText as He, renderList as we, createVNode as he, onBeforeUnmount as Ve, renderSlot as W, withCtx as ye, nextTick as ge, resolveDynamicComponent as Le } from "vue";
|
|
2
|
+
const Ne = "_button__size_default_16zzc_1", Oe = "_button__size_small_16zzc_8", Ee = "_button_16zzc_1", We = "_button__label_16zzc_193", De = "_button__solid_16zzc_205", je = "_fill_16zzc_1125", G = {
|
|
3
|
+
button__size_default: Ne,
|
|
4
|
+
button__size_small: Oe,
|
|
5
5
|
button: Ee,
|
|
6
6
|
button__label: We,
|
|
7
7
|
"button__solid-primary": "_button__solid-primary_16zzc_205",
|
|
@@ -48,61 +48,61 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
|
|
|
48
48
|
fill: { type: Boolean, default: !1 }
|
|
49
49
|
},
|
|
50
50
|
emits: ["click"],
|
|
51
|
-
setup(
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
return (
|
|
51
|
+
setup(i, { emit: n }) {
|
|
52
|
+
const r = i, t = n, a = (c) => {
|
|
53
|
+
r.disabled || t("click", c);
|
|
54
|
+
}, d = C(() => r.loadingStatus ? "loading-circle" : r.successStatus ? "line-check-natural" : r.leftIconName);
|
|
55
|
+
return (c, e) => (u(), f("button", {
|
|
56
56
|
class: s([
|
|
57
57
|
o(G).button,
|
|
58
|
-
o(G)[`button__${
|
|
59
|
-
o(G)[`button__${
|
|
60
|
-
o(G)[`button__size_${
|
|
61
|
-
{ [o(G).fill]:
|
|
58
|
+
o(G)[`button__${c.variant}`],
|
|
59
|
+
o(G)[`button__${c.variant}-${c.color}`],
|
|
60
|
+
o(G)[`button__size_${c.size}`],
|
|
61
|
+
{ [o(G).fill]: c.fill }
|
|
62
62
|
]),
|
|
63
|
-
disabled:
|
|
64
|
-
onClick:
|
|
63
|
+
disabled: r.disabled,
|
|
64
|
+
onClick: a
|
|
65
65
|
}, [
|
|
66
|
-
|
|
66
|
+
d.value ? (u(), U(o(Q), {
|
|
67
67
|
key: 0,
|
|
68
|
-
name:
|
|
68
|
+
name: d.value
|
|
69
69
|
}, null, 8, ["name"])) : z("", !0),
|
|
70
|
-
|
|
70
|
+
c.label ? (u(), f("span", {
|
|
71
71
|
key: 1,
|
|
72
72
|
class: s(o(G).button__label)
|
|
73
|
-
}, I(
|
|
74
|
-
|
|
73
|
+
}, I(c.label), 3)) : z("", !0),
|
|
74
|
+
c.rightIconName ? (u(), U(o(Q), {
|
|
75
75
|
key: 2,
|
|
76
|
-
name:
|
|
76
|
+
name: c.rightIconName
|
|
77
77
|
}, null, 8, ["name"])) : z("", !0)
|
|
78
78
|
], 10, qe));
|
|
79
79
|
}
|
|
80
80
|
}), Ae = {
|
|
81
|
-
mounted(
|
|
82
|
-
|
|
83
|
-
[
|
|
84
|
-
}, document.addEventListener("click",
|
|
81
|
+
mounted(i, n) {
|
|
82
|
+
i.clickOutsideEvent = (r) => {
|
|
83
|
+
[i, ...n.value.exclude || []].some((a) => a && (a === r.target || a.contains(r.target))) || n.value.handler();
|
|
84
|
+
}, document.addEventListener("click", i.clickOutsideEvent);
|
|
85
85
|
},
|
|
86
|
-
unmounted(
|
|
87
|
-
|
|
86
|
+
unmounted(i) {
|
|
87
|
+
i.clickOutsideEvent && document.removeEventListener("click", i.clickOutsideEvent);
|
|
88
88
|
}
|
|
89
|
-
}, Re = (
|
|
89
|
+
}, Re = (i, n) => {
|
|
90
90
|
var t;
|
|
91
|
-
let
|
|
92
|
-
for (const
|
|
93
|
-
if (
|
|
91
|
+
let r = 0;
|
|
92
|
+
for (const a of i)
|
|
93
|
+
if (a.toLowerCase() === ((t = n[r]) == null ? void 0 : t.toLowerCase()) && r++, r === n.length)
|
|
94
94
|
return !0;
|
|
95
95
|
return !1;
|
|
96
|
-
}, Ge = (
|
|
97
|
-
if (!
|
|
98
|
-
return
|
|
99
|
-
const t =
|
|
100
|
-
return
|
|
101
|
-
const
|
|
102
|
-
return Re(
|
|
103
|
-
}).sort((
|
|
104
|
-
const
|
|
105
|
-
return
|
|
96
|
+
}, Ge = (i, n, r) => {
|
|
97
|
+
if (!r.trim())
|
|
98
|
+
return i;
|
|
99
|
+
const t = r.toLowerCase();
|
|
100
|
+
return i.filter((a) => {
|
|
101
|
+
const d = String(a[n]);
|
|
102
|
+
return Re(d.toLowerCase(), t);
|
|
103
|
+
}).sort((a, d) => {
|
|
104
|
+
const c = String(a[n]).toLowerCase(), e = String(d[n]).toLowerCase();
|
|
105
|
+
return c === t ? -1 : e === t ? 1 : c.startsWith(t) && !e.startsWith(t) ? -1 : !c.startsWith(t) && e.startsWith(t) ? 1 : c.length - e.length;
|
|
106
106
|
});
|
|
107
107
|
}, Ye = "_dropdown_c02u6_1", Xe = "_menu_c02u6_1", Fe = "_dropdown__valueContent_c02u6_183", Ue = "_dropdown__label_c02u6_194", Qe = "_dropdown__value_c02u6_183", Ze = "_dropdown__placeholder_c02u6_202", Je = "_dropdown__arrowIcon_c02u6_210", Ke = "_menu__searchContainer_c02u6_225", et = "_menu__searchInputWrap_c02u6_229", tt = "_menu__searchInput_c02u6_229", ot = "_menu__errorMessage_c02u6_251", nt = "_menu__addButton_c02u6_258", rt = "_menu__itemContainer_c02u6_266", at = "_menu__item_c02u6_266", k = {
|
|
108
108
|
dropdown: Ye,
|
|
@@ -138,11 +138,11 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
|
|
|
138
138
|
validateAddItem: { type: Function, default: () => null }
|
|
139
139
|
},
|
|
140
140
|
emits: ["update:modelValue", "add-error", "item-added", "select-item"],
|
|
141
|
-
setup(
|
|
142
|
-
const
|
|
143
|
-
if (!
|
|
141
|
+
setup(i, { emit: n }) {
|
|
142
|
+
const r = Ae, t = i, a = n, d = v(), c = v(), e = v(!1), l = v(null), m = v(""), p = v(null), P = v({ x: 0, y: 0, width: 0, shouldOpenUp: !1, height: t.menuHeight }), H = me([...t.items]), B = me([...t.items]), A = () => {
|
|
143
|
+
if (!d.value)
|
|
144
144
|
return;
|
|
145
|
-
const { offsetTop: b, offsetLeft: h, offsetWidth: g } =
|
|
145
|
+
const { offsetTop: b, offsetLeft: h, offsetWidth: g } = d.value, j = window.innerHeight, R = b + d.value.offsetHeight, ee = R + t.menuHeight > j;
|
|
146
146
|
P.value = {
|
|
147
147
|
x: h + window.scrollX,
|
|
148
148
|
y: ee ? b + window.scrollY : R + window.scrollY,
|
|
@@ -150,31 +150,31 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
|
|
|
150
150
|
shouldOpenUp: ee,
|
|
151
151
|
height: t.menuHeight
|
|
152
152
|
};
|
|
153
|
-
},
|
|
153
|
+
}, S = () => {
|
|
154
154
|
A(), e.value = !e.value;
|
|
155
|
-
},
|
|
156
|
-
|
|
155
|
+
}, N = () => {
|
|
156
|
+
p.value = null, m.value = "", H.splice(0, H.length, ...B);
|
|
157
157
|
}, Z = () => {
|
|
158
|
-
e.value = !1,
|
|
158
|
+
e.value = !1, N();
|
|
159
159
|
}, re = (b) => {
|
|
160
|
-
|
|
160
|
+
l.value = b, a("select-item", b), a("update:modelValue", b.value), Z();
|
|
161
161
|
}, D = () => {
|
|
162
|
-
const b =
|
|
162
|
+
const b = m.value.trim(), h = t.validateAddItem(b, B);
|
|
163
163
|
if (h) {
|
|
164
|
-
|
|
164
|
+
p.value = h, a("add-error", h);
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
167
|
const g = {
|
|
168
168
|
text: b,
|
|
169
169
|
value: b
|
|
170
170
|
};
|
|
171
|
-
B.push(g),
|
|
171
|
+
B.push(g), N(), a("item-added", g);
|
|
172
172
|
}, ae = () => {
|
|
173
|
-
const b = Ge(B, "text",
|
|
173
|
+
const b = Ge(B, "text", m.value);
|
|
174
174
|
H.splice(0, H.length, ...b);
|
|
175
175
|
}, J = () => {
|
|
176
|
-
|
|
177
|
-
}, le =
|
|
176
|
+
p.value = "";
|
|
177
|
+
}, le = C(() => ({
|
|
178
178
|
top: P.value.shouldOpenUp ? `${P.value.y - 10}px` : `${P.value.y}px`,
|
|
179
179
|
left: `${P.value.x}px`,
|
|
180
180
|
width: `${P.value.width}px`,
|
|
@@ -183,15 +183,15 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
|
|
|
183
183
|
pe(() => {
|
|
184
184
|
if (A(), t.modelValue) {
|
|
185
185
|
const b = B.find((h) => h.value === t.modelValue);
|
|
186
|
-
b && (
|
|
186
|
+
b && (l.value = b);
|
|
187
187
|
}
|
|
188
188
|
});
|
|
189
|
-
const K =
|
|
189
|
+
const K = C(() => l.value ? l.value.text : "");
|
|
190
190
|
return oe(() => t.modelValue, (b) => {
|
|
191
191
|
var h;
|
|
192
|
-
if (((h =
|
|
192
|
+
if (((h = l.value) == null ? void 0 : h.value) !== b) {
|
|
193
193
|
const g = B.find((j) => j.value === b);
|
|
194
|
-
g && (
|
|
194
|
+
g && (l.value = g);
|
|
195
195
|
}
|
|
196
196
|
}), oe(
|
|
197
197
|
() => t.items,
|
|
@@ -199,13 +199,13 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
|
|
|
199
199
|
B.splice(0, B.length, ...b), H.splice(0, H.length, ...b);
|
|
200
200
|
},
|
|
201
201
|
{ deep: !0 }
|
|
202
|
-
), (b, h) => (
|
|
202
|
+
), (b, h) => (u(), f(ue, null, [
|
|
203
203
|
$("div", {
|
|
204
204
|
ref_key: "dropdownRef",
|
|
205
|
-
ref:
|
|
205
|
+
ref: d,
|
|
206
206
|
class: s(o(k).dropdown)
|
|
207
207
|
}, [
|
|
208
|
-
b.label ? (
|
|
208
|
+
b.label ? (u(), f("label", {
|
|
209
209
|
key: 0,
|
|
210
210
|
class: s(o(k).dropdown__label),
|
|
211
211
|
for: b.id
|
|
@@ -217,16 +217,16 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
|
|
|
217
217
|
[o(k)["dropdown__valueContent--open"]]: e.value
|
|
218
218
|
}
|
|
219
219
|
]),
|
|
220
|
-
onClick:
|
|
220
|
+
onClick: S
|
|
221
221
|
}, [
|
|
222
222
|
$("span", {
|
|
223
223
|
class: s(o(k).dropdown__value)
|
|
224
224
|
}, I(K.value), 3),
|
|
225
|
-
b.placeholder && !K.value ? (
|
|
225
|
+
b.placeholder && !K.value ? (u(), f("span", {
|
|
226
226
|
key: 0,
|
|
227
227
|
class: s(o(k).dropdown__placeholder)
|
|
228
228
|
}, I(b.placeholder), 3)) : z("", !0),
|
|
229
|
-
(
|
|
229
|
+
(u(), f("svg", {
|
|
230
230
|
fill: "none",
|
|
231
231
|
height: "17",
|
|
232
232
|
viewBox: "0 0 16 17",
|
|
@@ -241,16 +241,16 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
|
|
|
241
241
|
]), 2))
|
|
242
242
|
], 2)
|
|
243
243
|
], 2),
|
|
244
|
-
e.value ? ve((
|
|
244
|
+
e.value ? ve((u(), f("div", {
|
|
245
245
|
key: 0,
|
|
246
246
|
ref_key: "menuRef",
|
|
247
|
-
ref:
|
|
247
|
+
ref: c,
|
|
248
248
|
class: s(o(k).menu),
|
|
249
249
|
style: F(le.value),
|
|
250
250
|
onClick: h[1] || (h[1] = Te(() => {
|
|
251
251
|
}, ["prevent"]))
|
|
252
252
|
}, [
|
|
253
|
-
t.searchable ? (
|
|
253
|
+
t.searchable ? (u(), f("div", {
|
|
254
254
|
key: 0,
|
|
255
255
|
class: s(o(k).menu__searchContainer)
|
|
256
256
|
}, [
|
|
@@ -262,22 +262,22 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
|
|
|
262
262
|
class: s([
|
|
263
263
|
o(k).menu__searchInput,
|
|
264
264
|
{
|
|
265
|
-
[o(k)["menu__searchInput--error"]]:
|
|
265
|
+
[o(k)["menu__searchInput--error"]]: p.value
|
|
266
266
|
}
|
|
267
267
|
]),
|
|
268
268
|
placeholder: b.searchPlaceHolder,
|
|
269
|
-
"onUpdate:modelValue": h[0] || (h[0] = (g) =>
|
|
269
|
+
"onUpdate:modelValue": h[0] || (h[0] = (g) => m.value = g),
|
|
270
270
|
onFocus: J,
|
|
271
271
|
onInput: ae
|
|
272
272
|
}, null, 42, st), [
|
|
273
|
-
[He,
|
|
273
|
+
[He, m.value]
|
|
274
274
|
]),
|
|
275
|
-
|
|
275
|
+
p.value ? (u(), f("p", {
|
|
276
276
|
key: 0,
|
|
277
277
|
class: s(o(k).menu__errorMessage)
|
|
278
|
-
}, I(
|
|
278
|
+
}, I(p.value), 3)) : z("", !0)
|
|
279
279
|
], 2),
|
|
280
|
-
t.addable ? (
|
|
280
|
+
t.addable ? (u(), f("button", {
|
|
281
281
|
key: 0,
|
|
282
282
|
class: s(o(k).menu__addButton),
|
|
283
283
|
onClick: D
|
|
@@ -286,19 +286,19 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
|
|
|
286
286
|
$("ul", {
|
|
287
287
|
class: s(o(k).menu__itemContainer)
|
|
288
288
|
}, [
|
|
289
|
-
(
|
|
289
|
+
(u(!0), f(ue, null, we(H, (g, j) => (u(), f("li", {
|
|
290
290
|
key: `${g.value}-${j}`,
|
|
291
291
|
class: s([
|
|
292
292
|
o(k).menu__item,
|
|
293
293
|
{
|
|
294
|
-
[o(k)["menu__item--active"]]:
|
|
294
|
+
[o(k)["menu__item--active"]]: l.value && g.value === l.value.value
|
|
295
295
|
}
|
|
296
296
|
]),
|
|
297
297
|
onClick: (R) => re(g)
|
|
298
298
|
}, I(g.text), 11, _t))), 128))
|
|
299
299
|
], 2)
|
|
300
300
|
], 6)), [
|
|
301
|
-
[o(
|
|
301
|
+
[o(r), { handler: Z, exclude: [d.value, c.value] }]
|
|
302
302
|
]) : z("", !0)
|
|
303
303
|
], 64));
|
|
304
304
|
}
|
|
@@ -309,24 +309,24 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
|
|
|
309
309
|
size: { default: 16 },
|
|
310
310
|
color: {}
|
|
311
311
|
},
|
|
312
|
-
setup(
|
|
313
|
-
const n =
|
|
314
|
-
return (t,
|
|
312
|
+
setup(i) {
|
|
313
|
+
const n = i, r = C(() => typeof n.size == "number" ? `${n.size}px` : n.size);
|
|
314
|
+
return (t, a) => (u(), f("svg", {
|
|
315
315
|
class: "icon",
|
|
316
316
|
fill: t.color || "currentColor",
|
|
317
|
-
height:
|
|
318
|
-
width:
|
|
317
|
+
height: r.value,
|
|
318
|
+
width: r.value
|
|
319
319
|
}, [
|
|
320
320
|
$("use", {
|
|
321
321
|
"xlink:href": `#${t.name}`
|
|
322
322
|
}, null, 8, ut)
|
|
323
323
|
], 8, it));
|
|
324
324
|
}
|
|
325
|
-
}), ct = (
|
|
326
|
-
const
|
|
327
|
-
for (const [t,
|
|
328
|
-
|
|
329
|
-
return
|
|
325
|
+
}), ct = (i, n) => {
|
|
326
|
+
const r = i.__vccOpts || i;
|
|
327
|
+
for (const [t, a] of n)
|
|
328
|
+
r[t] = a;
|
|
329
|
+
return r;
|
|
330
330
|
}, Q = /* @__PURE__ */ ct(pt, [["__scopeId", "data-v-f04c8857"]]), dt = "_container_pab2j_1", ft = "_container__text_pab2j_185", bt = "_container__default_pab2j_189", mt = "_container__warning_pab2j_197", vt = "_container__alert_pab2j_205", gt = "_container__success_pab2j_213", ie = {
|
|
331
331
|
container: dt,
|
|
332
332
|
container__text: ft,
|
|
@@ -340,8 +340,8 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
|
|
|
340
340
|
variant: { default: "default" },
|
|
341
341
|
text: {}
|
|
342
342
|
},
|
|
343
|
-
setup(
|
|
344
|
-
const n =
|
|
343
|
+
setup(i) {
|
|
344
|
+
const n = i, r = C(() => {
|
|
345
345
|
switch (n.variant) {
|
|
346
346
|
case "alert":
|
|
347
347
|
return "icon-info-box-error";
|
|
@@ -353,14 +353,14 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
|
|
|
353
353
|
return "filled-info-circle";
|
|
354
354
|
}
|
|
355
355
|
});
|
|
356
|
-
return (t,
|
|
356
|
+
return (t, a) => (u(), f("div", {
|
|
357
357
|
class: s([
|
|
358
358
|
o(ie).container,
|
|
359
359
|
o(ie)[`container__${t.variant}`]
|
|
360
360
|
])
|
|
361
361
|
}, [
|
|
362
362
|
he(Q, {
|
|
363
|
-
name:
|
|
363
|
+
name: r.value,
|
|
364
364
|
size: 24
|
|
365
365
|
}, null, 8, ["name"]),
|
|
366
366
|
$("span", {
|
|
@@ -368,7 +368,7 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
|
|
|
368
368
|
}, I(t.text), 3)
|
|
369
369
|
], 2));
|
|
370
370
|
}
|
|
371
|
-
}), wt = "_button__size_default_4wo1i_1", ht = "_button__size_small_4wo1i_8", yt = "_button_4wo1i_1", zt = "_button__label_4wo1i_191", $t = "_button__solid_4wo1i_330", kt = "_segmentGroup_4wo1i_337", xt = "_fill_4wo1i_359",
|
|
371
|
+
}), wt = "_button__size_default_4wo1i_1", ht = "_button__size_small_4wo1i_8", yt = "_button_4wo1i_1", zt = "_button__label_4wo1i_191", $t = "_button__solid_4wo1i_330", kt = "_segmentGroup_4wo1i_337", xt = "_fill_4wo1i_359", V = {
|
|
372
372
|
button__size_default: wt,
|
|
373
373
|
button__size_small: ht,
|
|
374
374
|
button: yt,
|
|
@@ -384,7 +384,7 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
|
|
|
384
384
|
"segmentGroup--vertical": "_segmentGroup--vertical_4wo1i_340",
|
|
385
385
|
"segmentGroup--horizontal": "_segmentGroup--horizontal_4wo1i_349",
|
|
386
386
|
fill: xt
|
|
387
|
-
},
|
|
387
|
+
}, St = ["disabled", "onClick"], mo = /* @__PURE__ */ T({
|
|
388
388
|
__name: "SegmentButton",
|
|
389
389
|
props: {
|
|
390
390
|
color: {},
|
|
@@ -396,57 +396,57 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
|
|
|
396
396
|
modelValue: {}
|
|
397
397
|
},
|
|
398
398
|
emits: ["update:modelValue", "click"],
|
|
399
|
-
setup(
|
|
400
|
-
const
|
|
401
|
-
|
|
399
|
+
setup(i, { emit: n }) {
|
|
400
|
+
const r = i, t = n, a = v(r.modelValue || ""), d = (e) => {
|
|
401
|
+
r.disabled || e.disabled || (a.value = e.value, t("update:modelValue", e.value), t("click", e.value));
|
|
402
402
|
};
|
|
403
|
-
oe(() =>
|
|
404
|
-
|
|
403
|
+
oe(() => r.modelValue, (e) => {
|
|
404
|
+
a.value !== e && (a.value = e || "");
|
|
405
405
|
});
|
|
406
|
-
const
|
|
407
|
-
return oe(() =>
|
|
408
|
-
|
|
409
|
-
}, { deep: !0 }), (e,
|
|
406
|
+
const c = v([...r.segments]);
|
|
407
|
+
return oe(() => r.segments, (e) => {
|
|
408
|
+
c.value = [...e], e.some((l) => l.value === a.value) || (a.value = "", t("update:modelValue", ""));
|
|
409
|
+
}, { deep: !0 }), (e, l) => (u(), f("div", {
|
|
410
410
|
class: s([
|
|
411
|
-
o(
|
|
412
|
-
o(
|
|
413
|
-
{ [o(
|
|
411
|
+
o(V).segmentGroup,
|
|
412
|
+
o(V)[`segmentGroup--${e.align}`],
|
|
413
|
+
{ [o(V).fill]: e.fill }
|
|
414
414
|
])
|
|
415
415
|
}, [
|
|
416
|
-
(
|
|
417
|
-
key: `${
|
|
416
|
+
(u(!0), f(ue, null, we(c.value, (m, p) => (u(), f("button", {
|
|
417
|
+
key: `${m.value}-${p}`,
|
|
418
418
|
class: s([
|
|
419
|
-
o(
|
|
420
|
-
o(
|
|
421
|
-
o(
|
|
422
|
-
o(
|
|
419
|
+
o(V).button,
|
|
420
|
+
o(V)[`button--${e.color}`],
|
|
421
|
+
o(V)[`button__size_${e.size}`],
|
|
422
|
+
o(V).fill,
|
|
423
423
|
{
|
|
424
|
-
[o(
|
|
424
|
+
[o(V)["button--selected"]]: m.value === a.value
|
|
425
425
|
}
|
|
426
426
|
]),
|
|
427
|
-
disabled:
|
|
428
|
-
onClick: (P) =>
|
|
427
|
+
disabled: m.disabled || r.disabled,
|
|
428
|
+
onClick: (P) => d(m)
|
|
429
429
|
}, [
|
|
430
|
-
|
|
430
|
+
m.icon ? (u(), U(o(Q), {
|
|
431
431
|
key: 0,
|
|
432
|
-
name:
|
|
432
|
+
name: m.icon
|
|
433
433
|
}, null, 8, ["name"])) : z("", !0),
|
|
434
|
-
|
|
434
|
+
m.label ? (u(), f("span", {
|
|
435
435
|
key: 1,
|
|
436
|
-
class: s(o(
|
|
437
|
-
}, I(
|
|
438
|
-
], 10,
|
|
436
|
+
class: s(o(V).button__label)
|
|
437
|
+
}, I(m.label), 3)) : z("", !0)
|
|
438
|
+
], 10, St))), 128))
|
|
439
439
|
], 2));
|
|
440
440
|
}
|
|
441
|
-
}),
|
|
442
|
-
wrapper__field:
|
|
441
|
+
}), Ct = "_wrapper__field_1fjsl_1", It = "_wrapper__label_1fjsl_1", Bt = "_wrapper__errorMessage_1fjsl_1", Pt = "_wrapper__counter_1fjsl_1", Mt = "_wrapper_1fjsl_1", Tt = "_wrapper__bottom_1fjsl_221", L = {
|
|
442
|
+
wrapper__field: Ct,
|
|
443
443
|
wrapper__label: It,
|
|
444
444
|
wrapper__errorMessage: Bt,
|
|
445
445
|
wrapper__counter: Pt,
|
|
446
446
|
wrapper: Mt,
|
|
447
447
|
wrapper__bottom: Tt,
|
|
448
448
|
"wrapper--error": "_wrapper--error_1fjsl_234"
|
|
449
|
-
}, Ht = ["for"],
|
|
449
|
+
}, Ht = ["for"], Vt = ["id", "maxlength", "name", "placeholder", "value"], Lt = ["id", "maxlength", "name", "placeholder", "value"], vo = /* @__PURE__ */ T({
|
|
450
450
|
__name: "TextInput",
|
|
451
451
|
props: {
|
|
452
452
|
id: {},
|
|
@@ -462,38 +462,38 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
|
|
|
462
462
|
counter: { type: Boolean }
|
|
463
463
|
},
|
|
464
464
|
emits: ["update:modelValue", "input", "change", "paste", "focus", "blur"],
|
|
465
|
-
setup(
|
|
466
|
-
const
|
|
467
|
-
if (
|
|
468
|
-
|
|
469
|
-
const e = Math.min(
|
|
470
|
-
|
|
465
|
+
setup(i, { emit: n }) {
|
|
466
|
+
const r = i, t = n, a = v(null), d = () => {
|
|
467
|
+
if (r.autoGrow && a.value) {
|
|
468
|
+
a.value.style.height = "";
|
|
469
|
+
const e = Math.min(a.value.scrollHeight, r.maxHeight || a.value.scrollHeight);
|
|
470
|
+
a.value.style.height = `${e}px`;
|
|
471
471
|
}
|
|
472
|
-
},
|
|
473
|
-
const
|
|
474
|
-
t("input", e), t("update:modelValue",
|
|
472
|
+
}, c = (e) => {
|
|
473
|
+
const l = e.target;
|
|
474
|
+
t("input", e), t("update:modelValue", l.value), d();
|
|
475
475
|
};
|
|
476
476
|
return pe(() => {
|
|
477
|
-
|
|
478
|
-
}), (e,
|
|
479
|
-
var
|
|
480
|
-
return
|
|
481
|
-
class: s(o(
|
|
477
|
+
d();
|
|
478
|
+
}), (e, l) => {
|
|
479
|
+
var m;
|
|
480
|
+
return u(), f("div", {
|
|
481
|
+
class: s(o(L).wrapper)
|
|
482
482
|
}, [
|
|
483
|
-
e.label ? (
|
|
483
|
+
e.label ? (u(), f("label", {
|
|
484
484
|
key: 0,
|
|
485
|
-
class: s(o(
|
|
485
|
+
class: s(o(L).wrapper__label),
|
|
486
486
|
for: e.id
|
|
487
487
|
}, I(e.label), 11, Ht)) : z("", !0),
|
|
488
|
-
e.multiline ? (
|
|
488
|
+
e.multiline ? (u(), f("textarea", {
|
|
489
489
|
key: 1,
|
|
490
490
|
id: e.id,
|
|
491
491
|
ref_key: "textareaRef",
|
|
492
|
-
ref:
|
|
492
|
+
ref: a,
|
|
493
493
|
class: s([
|
|
494
|
-
o(
|
|
494
|
+
o(L).wrapper__field,
|
|
495
495
|
{
|
|
496
|
-
[o(
|
|
496
|
+
[o(L)["wrapper--error"]]: e.error
|
|
497
497
|
}
|
|
498
498
|
]),
|
|
499
499
|
maxlength: e.maxLength,
|
|
@@ -501,49 +501,49 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
|
|
|
501
501
|
placeholder: e.placeholder,
|
|
502
502
|
style: F(e.maxHeight ? { maxHeight: `${e.maxHeight}px` } : void 0),
|
|
503
503
|
value: e.modelValue,
|
|
504
|
-
onBlur:
|
|
505
|
-
onChange:
|
|
506
|
-
onFocus:
|
|
507
|
-
onInput:
|
|
508
|
-
onPaste:
|
|
509
|
-
}, null, 46,
|
|
504
|
+
onBlur: l[0] || (l[0] = (p) => t("blur", p)),
|
|
505
|
+
onChange: l[1] || (l[1] = (p) => e.$emit("change", p)),
|
|
506
|
+
onFocus: l[2] || (l[2] = (p) => t("focus", p)),
|
|
507
|
+
onInput: c,
|
|
508
|
+
onPaste: l[3] || (l[3] = (p) => t("paste", p))
|
|
509
|
+
}, null, 46, Vt)) : (u(), f("input", {
|
|
510
510
|
key: 2,
|
|
511
511
|
id: e.id,
|
|
512
512
|
type: "text",
|
|
513
513
|
class: s([
|
|
514
|
-
o(
|
|
514
|
+
o(L).wrapper__field,
|
|
515
515
|
{
|
|
516
|
-
[o(
|
|
516
|
+
[o(L)["wrapper--error"]]: e.error
|
|
517
517
|
}
|
|
518
518
|
]),
|
|
519
519
|
maxlength: e.maxLength,
|
|
520
520
|
name: e.name,
|
|
521
521
|
placeholder: e.placeholder,
|
|
522
522
|
value: e.modelValue,
|
|
523
|
-
onBlur:
|
|
524
|
-
onChange:
|
|
525
|
-
onFocus:
|
|
526
|
-
onInput:
|
|
527
|
-
onPaste:
|
|
528
|
-
}, null, 42,
|
|
523
|
+
onBlur: l[4] || (l[4] = (p) => t("blur", p)),
|
|
524
|
+
onChange: l[5] || (l[5] = (p) => e.$emit("change", p)),
|
|
525
|
+
onFocus: l[6] || (l[6] = (p) => t("focus", p)),
|
|
526
|
+
onInput: c,
|
|
527
|
+
onPaste: l[7] || (l[7] = (p) => t("paste", p))
|
|
528
|
+
}, null, 42, Lt)),
|
|
529
529
|
$("div", {
|
|
530
|
-
class: s(o(
|
|
530
|
+
class: s(o(L).wrapper__bottom)
|
|
531
531
|
}, [
|
|
532
|
-
e.error ? (
|
|
532
|
+
e.error ? (u(), f("div", {
|
|
533
533
|
key: 0,
|
|
534
|
-
class: s(o(
|
|
534
|
+
class: s(o(L).wrapper__errorMessage)
|
|
535
535
|
}, I(e.error), 3)) : z("", !0),
|
|
536
|
-
e.counter ? (
|
|
536
|
+
e.counter ? (u(), f("div", {
|
|
537
537
|
key: 1,
|
|
538
|
-
class: s(o(
|
|
539
|
-
}, I(((
|
|
538
|
+
class: s(o(L).wrapper__counter)
|
|
539
|
+
}, I(((m = e.modelValue) == null ? void 0 : m.toString().length) || 0), 3)) : z("", !0)
|
|
540
540
|
], 2)
|
|
541
541
|
], 2);
|
|
542
542
|
};
|
|
543
543
|
}
|
|
544
|
-
}),
|
|
545
|
-
wrapper__label:
|
|
546
|
-
wrapper__errorMessage:
|
|
544
|
+
}), Nt = "_wrapper__label_3sncs_1", Ot = "_wrapper__errorMessage_3sncs_1", Et = "_wrapper__counter_3sncs_1", Wt = "_wrapper_3sncs_1", Dt = "_wrapper__field_3sncs_8", jt = "_wrapper__size_default_3sncs_185", qt = "_wrapper__size_small_3sncs_188", At = "_wrapper__bottom_3sncs_225", O = {
|
|
545
|
+
wrapper__label: Nt,
|
|
546
|
+
wrapper__errorMessage: Ot,
|
|
547
547
|
wrapper__counter: Et,
|
|
548
548
|
wrapper: Wt,
|
|
549
549
|
wrapper__field: Dt,
|
|
@@ -568,60 +568,62 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
|
|
|
568
568
|
size: { default: "default" }
|
|
569
569
|
},
|
|
570
570
|
emits: ["update:modelValue", "input", "change", "paste", "focus", "blur"],
|
|
571
|
-
setup(
|
|
572
|
-
const
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
571
|
+
setup(i, { emit: n }) {
|
|
572
|
+
const r = i, t = n, a = (e) => {
|
|
573
|
+
if (e === "")
|
|
574
|
+
return e;
|
|
575
|
+
const l = Number(e);
|
|
576
|
+
return typeof r.min == "number" && l < r.min ? r.min.toString() : typeof r.max == "number" && l > r.max ? r.max.toString() : l.toString();
|
|
577
|
+
}, d = (e) => {
|
|
578
|
+
const l = e.target, m = a(l.value);
|
|
579
|
+
l.value = m, t("input", e), t("update:modelValue", Number(m));
|
|
580
|
+
}, c = (e) => {
|
|
581
|
+
const l = e.target, m = l.value, p = a(l.value === "" ? String(r.min || 0) : l.value);
|
|
582
|
+
l.value = p, t("blur", e), m !== p && t("update:modelValue", Number(p));
|
|
581
583
|
};
|
|
582
|
-
return (
|
|
583
|
-
var
|
|
584
|
-
return
|
|
585
|
-
class: s([o(
|
|
584
|
+
return (e, l) => {
|
|
585
|
+
var m;
|
|
586
|
+
return u(), f("div", {
|
|
587
|
+
class: s([o(O).wrapper, o(O)[`wrapper__size_${e.size}`]])
|
|
586
588
|
}, [
|
|
587
|
-
|
|
589
|
+
e.label ? (u(), f("label", {
|
|
588
590
|
key: 0,
|
|
589
|
-
class: s(o(
|
|
590
|
-
for:
|
|
591
|
-
}, I(
|
|
591
|
+
class: s(o(O).wrapper__label),
|
|
592
|
+
for: e.id
|
|
593
|
+
}, I(e.label), 11, Rt)) : z("", !0),
|
|
592
594
|
$("input", {
|
|
593
|
-
id:
|
|
595
|
+
id: e.id,
|
|
594
596
|
type: "number",
|
|
595
597
|
class: s([
|
|
596
|
-
o(
|
|
598
|
+
o(O).wrapper__field,
|
|
597
599
|
{
|
|
598
|
-
[o(
|
|
600
|
+
[o(O)["wrapper--error"]]: e.error || e.errorStatus
|
|
599
601
|
}
|
|
600
602
|
]),
|
|
601
|
-
max:
|
|
602
|
-
maxlength:
|
|
603
|
-
min:
|
|
604
|
-
name:
|
|
605
|
-
placeholder:
|
|
606
|
-
value:
|
|
607
|
-
onBlur:
|
|
608
|
-
onChange:
|
|
609
|
-
onFocus:
|
|
610
|
-
onInput:
|
|
611
|
-
onPaste:
|
|
603
|
+
max: e.max,
|
|
604
|
+
maxlength: e.maxLength,
|
|
605
|
+
min: e.min,
|
|
606
|
+
name: e.name,
|
|
607
|
+
placeholder: e.placeholder,
|
|
608
|
+
value: e.modelValue,
|
|
609
|
+
onBlur: c,
|
|
610
|
+
onChange: l[0] || (l[0] = (p) => e.$emit("change", p)),
|
|
611
|
+
onFocus: l[1] || (l[1] = (p) => t("focus", p)),
|
|
612
|
+
onInput: d,
|
|
613
|
+
onPaste: l[2] || (l[2] = (p) => t("paste", p))
|
|
612
614
|
}, null, 42, Gt),
|
|
613
|
-
|
|
615
|
+
e.counter || e.error ? (u(), f("div", {
|
|
614
616
|
key: 1,
|
|
615
|
-
class: s(o(
|
|
617
|
+
class: s(o(O).wrapper__bottom)
|
|
616
618
|
}, [
|
|
617
|
-
|
|
619
|
+
e.error ? (u(), f("div", {
|
|
618
620
|
key: 0,
|
|
619
|
-
class: s(o(
|
|
620
|
-
}, I(
|
|
621
|
-
|
|
621
|
+
class: s(o(O).wrapper__errorMessage)
|
|
622
|
+
}, I(e.error), 3)) : z("", !0),
|
|
623
|
+
e.counter ? (u(), f("div", {
|
|
622
624
|
key: 1,
|
|
623
|
-
class: s(o(
|
|
624
|
-
}, I(((
|
|
625
|
+
class: s(o(O).wrapper__counter)
|
|
626
|
+
}, I(((m = e.modelValue) == null ? void 0 : m.toString().length) || 0), 3)) : z("", !0)
|
|
625
627
|
], 2)) : z("", !0)
|
|
626
628
|
], 2);
|
|
627
629
|
};
|
|
@@ -641,37 +643,37 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
|
|
|
641
643
|
disabled: { type: Boolean, default: !1 }
|
|
642
644
|
},
|
|
643
645
|
emits: ["click"],
|
|
644
|
-
setup(
|
|
645
|
-
const
|
|
646
|
-
t("click", !
|
|
646
|
+
setup(i, { emit: n }) {
|
|
647
|
+
const r = i, t = n, a = () => {
|
|
648
|
+
t("click", !r.checked);
|
|
647
649
|
};
|
|
648
|
-
return (
|
|
650
|
+
return (d, c) => (u(), f("fieldset", {
|
|
649
651
|
class: s([
|
|
650
652
|
o(X).wrapper,
|
|
651
653
|
{
|
|
652
|
-
[o(X).wrapper_checked]:
|
|
653
|
-
[o(X).wrapper_disabled]:
|
|
654
|
+
[o(X).wrapper_checked]: d.checked,
|
|
655
|
+
[o(X).wrapper_disabled]: d.disabled
|
|
654
656
|
}
|
|
655
657
|
])
|
|
656
658
|
}, [
|
|
657
659
|
$("input", {
|
|
658
|
-
id:
|
|
660
|
+
id: d.id,
|
|
659
661
|
type: "checkbox",
|
|
660
|
-
checked:
|
|
662
|
+
checked: d.checked,
|
|
661
663
|
class: s(o(X).wrapper__input),
|
|
662
|
-
disabled:
|
|
663
|
-
name:
|
|
664
|
-
onClick:
|
|
664
|
+
disabled: d.disabled,
|
|
665
|
+
name: d.name,
|
|
666
|
+
onClick: a
|
|
665
667
|
}, null, 10, Zt),
|
|
666
668
|
$("label", {
|
|
667
669
|
class: s(o(X).wrapper__label),
|
|
668
|
-
for:
|
|
670
|
+
for: d.id
|
|
669
671
|
}, null, 10, Jt)
|
|
670
672
|
], 2));
|
|
671
673
|
}
|
|
672
674
|
});
|
|
673
|
-
function Kt(
|
|
674
|
-
return typeof
|
|
675
|
+
function Kt(i = "") {
|
|
676
|
+
return typeof i == "string" ? i.replace(/<\/style>/gi, "").replace(/<(.*?) on(.*?)=['"](.*?)>/gi, "").replace(/(<meta |<style|<\/*script)(.*?)>/gi, "").replace(/(<([^>]+)>)/ig, "").replace(/<(.*?) (href|src)="j(.*)a(.*)v(.*)a(.*)s(.*)c(.*)r(.*)i(.*)p(.*)t(.*):(.*?)>/gi, "") : i;
|
|
675
677
|
}
|
|
676
678
|
const eo = "_wrapper__box_1avga_1", to = "_wrapper_1avga_1", oo = "_wrapper__icon_1avga_184", no = "_wrapper__text_1avga_267", E = {
|
|
677
679
|
wrapper__box: eo,
|
|
@@ -717,13 +719,13 @@ const eo = "_wrapper__box_1avga_1", to = "_wrapper_1avga_1", oo = "_wrapper__ico
|
|
|
717
719
|
absoluteTrianglePosition: { default: "top" },
|
|
718
720
|
absolutePosition: { type: [Boolean, null, String, Object, Array] }
|
|
719
721
|
},
|
|
720
|
-
setup(
|
|
721
|
-
const n =
|
|
722
|
-
[`margin-${
|
|
722
|
+
setup(i) {
|
|
723
|
+
const n = i, r = v(null), t = v("center"), a = v("bottom"), d = v("center"), c = v(!1), e = v(""), l = v(!1), m = v(!1), p = v(""), P = v("d-n"), H = v(null), B = v(null), A = v(null), S = C(() => n.staticPosition.split(" ")[0]), N = C(() => n.staticPosition.split(" ")[1]), Z = C(() => n.iconName ? "mt-1" : "mt-0"), re = C(() => n.preventXss ? Kt(n.text) : n.text), D = C(() => n.absolutePositionStatus ? n.absoluteTrianglePosition : n.dynamicPosition && c.value ? a.value === "bottom" ? "top" : "bottom" : S.value === "top" ? "bottom" : S.value === "bottom" ? "top" : S.value === "left" ? "right" : S.value === "right" ? "left" : "bottom"), ae = C(() => n.absolutePositionStatus ? "" : l.value && m.value || p.value === "icon" && l.value ? "opa-1" : "opa-0"), J = C(() => n.absolutePositionStatus ? n.absoluteTriangleAlignment : n.dynamicPosition && c.value ? t.value === "center" ? "center" : t.value === "end" ? "end" : t.value === "start" ? "start" : d.value : N.value === "center" ? "center" : N.value === "left" || N.value === "top" ? "start" : N.value === "right" || N.value === "bottom" ? "end" : "center"), le = C(() => n.absolutePositionStatus ? "" : n.dynamicPosition && c.value ? E[`wrapper__box_${a.value}-${t.value}`] : E[`wrapper__box_${S.value}-${J.value}`]), K = C(() => n.offsetX === 0 && n.offsetY === 0 ? {} : n.dynamicPosition ? {
|
|
724
|
+
[`margin-${a.value === "bottom" ? "top" : "bottom"}`]: `${n.offsetY}px`
|
|
723
725
|
} : D.value === "top" || D.value === "bottom" ? {
|
|
724
726
|
[`margin-${D.value}`]: `${n.offsetY}px`
|
|
725
|
-
} : { [`margin-${D.value}`]: `${n.offsetX}px` }), b = (
|
|
726
|
-
const { offsetTop: w, offsetLeft: y, offsetWidth: M, offsetHeight: Y } =
|
|
727
|
+
} : { [`margin-${D.value}`]: `${n.offsetX}px` }), b = (_) => {
|
|
728
|
+
const { offsetTop: w, offsetLeft: y, offsetWidth: M, offsetHeight: Y } = _, q = w + Y, _e = y + M;
|
|
727
729
|
return {
|
|
728
730
|
top: w,
|
|
729
731
|
left: y,
|
|
@@ -731,10 +733,10 @@ const eo = "_wrapper__box_1avga_1", to = "_wrapper_1avga_1", oo = "_wrapper__ico
|
|
|
731
733
|
bottom: q,
|
|
732
734
|
right: _e
|
|
733
735
|
};
|
|
734
|
-
}, h = (
|
|
735
|
-
if (!
|
|
736
|
+
}, h = (_, w, y = !1) => {
|
|
737
|
+
if (!_ || !B.value)
|
|
736
738
|
return { left: !1, right: !1, top: !1, bottom: !1, center: !1 };
|
|
737
|
-
const M = { left: 0, right: 0, top: 0, bottom: 0, width: 0, height: 0 }, Y = B.value.offsetHeight, q = window.innerWidth, _e = window.innerHeight, ce =
|
|
739
|
+
const M = { left: 0, right: 0, top: 0, bottom: 0, width: 0, height: 0 }, Y = B.value.offsetHeight, q = window.innerWidth, _e = window.innerHeight, ce = _.offsetHeight, te = _.offsetWidth || 264, x = w && b(w) || M, de = y ? x == null ? void 0 : x.right : x == null ? void 0 : x.left, fe = y ? x == null ? void 0 : x.top : x == null ? void 0 : x.bottom, Ie = de + x.width + te + n.offsetX < q, Be = de + x.width / 2 - (te + n.offsetX) > 10, Pe = fe + ce < _e - n.offsetY, Me = fe - (ce + Y + n.offsetY) > 0;
|
|
738
740
|
let be = !1;
|
|
739
741
|
return n.iconName && (be = x.right + te / 2 < q && x.left - (te + n.offsetX) / 2 >= 10), {
|
|
740
742
|
left: Be,
|
|
@@ -746,122 +748,122 @@ const eo = "_wrapper__box_1avga_1", to = "_wrapper_1avga_1", oo = "_wrapper__ico
|
|
|
746
748
|
}, g = () => {
|
|
747
749
|
ge(() => {
|
|
748
750
|
var q;
|
|
749
|
-
|
|
750
|
-
const { bottom:
|
|
751
|
+
c.value = !0;
|
|
752
|
+
const { bottom: _, left: w, right: y, top: M, center: Y } = h(
|
|
751
753
|
A.value,
|
|
752
754
|
(q = A.value) == null ? void 0 : q.parentNode
|
|
753
755
|
);
|
|
754
756
|
if (Y) {
|
|
755
|
-
t.value = "center",
|
|
757
|
+
t.value = "center", a.value = _ && !M ? "bottom" : "top";
|
|
756
758
|
return;
|
|
757
759
|
}
|
|
758
|
-
if (
|
|
759
|
-
t.value = "center",
|
|
760
|
+
if (_ && w && y && M) {
|
|
761
|
+
t.value = "center", a.value = "top";
|
|
760
762
|
return;
|
|
761
763
|
}
|
|
762
|
-
if (M && !
|
|
764
|
+
if (M && !_) {
|
|
763
765
|
if (y && w) {
|
|
764
|
-
t.value = "center",
|
|
766
|
+
t.value = "center", a.value = "top";
|
|
765
767
|
return;
|
|
766
768
|
}
|
|
767
769
|
if (y && !w) {
|
|
768
|
-
t.value = "start",
|
|
770
|
+
t.value = "start", a.value = "top";
|
|
769
771
|
return;
|
|
770
772
|
}
|
|
771
773
|
if (!y && w) {
|
|
772
|
-
t.value = "end",
|
|
774
|
+
t.value = "end", a.value = "top";
|
|
773
775
|
return;
|
|
774
776
|
}
|
|
775
777
|
}
|
|
776
|
-
if (
|
|
778
|
+
if (_ && M) {
|
|
777
779
|
if (!y && w) {
|
|
778
|
-
t.value = "end",
|
|
780
|
+
t.value = "end", a.value = "top", d.value = "end";
|
|
779
781
|
return;
|
|
780
782
|
}
|
|
781
783
|
if (y && !w) {
|
|
782
|
-
t.value = "start",
|
|
784
|
+
t.value = "start", a.value = "top", d.value = "start";
|
|
783
785
|
return;
|
|
784
786
|
}
|
|
785
787
|
}
|
|
786
|
-
if (
|
|
788
|
+
if (_ && !M) {
|
|
787
789
|
if (y && w) {
|
|
788
|
-
t.value = "center",
|
|
790
|
+
t.value = "center", a.value = "bottom", d.value = "top";
|
|
789
791
|
return;
|
|
790
792
|
}
|
|
791
793
|
if (!y && w) {
|
|
792
|
-
t.value = "end",
|
|
794
|
+
t.value = "end", a.value = "bottom", d.value = "top";
|
|
793
795
|
return;
|
|
794
796
|
}
|
|
795
|
-
y && !w && (t.value = "start",
|
|
797
|
+
y && !w && (t.value = "start", a.value = "bottom", d.value = "top");
|
|
796
798
|
}
|
|
797
799
|
});
|
|
798
|
-
}, j = (
|
|
799
|
-
if (!(
|
|
800
|
+
}, j = (_) => {
|
|
801
|
+
if (!(_ instanceof HTMLElement))
|
|
800
802
|
return !1;
|
|
801
|
-
const w =
|
|
803
|
+
const w = _.scrollHeight > _.offsetHeight, y = window.getComputedStyle(_).overflowY, M = ["auto", "scroll"].includes(y);
|
|
802
804
|
return w && M;
|
|
803
|
-
}, R = (
|
|
804
|
-
const w = (
|
|
805
|
-
return !
|
|
805
|
+
}, R = (_) => {
|
|
806
|
+
const w = (_ == null ? void 0 : _.nodeType) === Node.COMMENT_NODE, y = (_ == null ? void 0 : _.nodeType) === Node.DOCUMENT_NODE;
|
|
807
|
+
return !_ || w || y ? document : j(_) ? _ : R(_.parentNode);
|
|
806
808
|
}, ee = () => {
|
|
807
|
-
var
|
|
808
|
-
(
|
|
809
|
+
var _;
|
|
810
|
+
(_ = H.value) == null || _.removeEventListener("scroll", g), window == null || window.removeEventListener("resize", g);
|
|
809
811
|
}, ze = () => {
|
|
810
812
|
ge(() => {
|
|
811
|
-
var
|
|
812
|
-
H.value = R(B.value), (
|
|
813
|
+
var _;
|
|
814
|
+
H.value = R(B.value), (_ = H.value) == null || _.addEventListener("scroll", g), window == null || window.addEventListener("resize", g);
|
|
813
815
|
});
|
|
814
816
|
}, $e = () => {
|
|
815
|
-
|
|
817
|
+
p.value = "wrapper", P.value = "d-b", l.value = !0;
|
|
816
818
|
}, se = () => {
|
|
817
|
-
|
|
819
|
+
p.value = "icon", P.value = "d-b", m.value = !0;
|
|
818
820
|
}, ke = () => {
|
|
819
|
-
|
|
821
|
+
m.value = !1;
|
|
820
822
|
}, xe = () => {
|
|
821
|
-
|
|
822
|
-
},
|
|
823
|
-
xe(), n.dynamicPosition ?
|
|
823
|
+
p.value = "", l.value = !1, m.value = !1;
|
|
824
|
+
}, Se = () => {
|
|
825
|
+
xe(), n.dynamicPosition ? a.value === "bottom" ? e.value = "bottom-leave" : a.value === "top" && (e.value = "top-leave") : S.value === "top" ? e.value = "top-leave" : S.value === "bottom" ? e.value = "bottom-leave" : S.value === "left" ? e.value = "left-leave" : S.value === "right" && (e.value = "right-leave"), setTimeout(() => {
|
|
824
826
|
e.value = "", P.value = "d-n";
|
|
825
827
|
}, n.absolutePositionStatus ? 0 : 250);
|
|
826
|
-
},
|
|
827
|
-
$e(), g(), n.dynamicPosition ?
|
|
828
|
+
}, Ce = () => {
|
|
829
|
+
$e(), g(), n.dynamicPosition ? a.value === "bottom" ? e.value = "top-entrance" : a.value === "top" && (e.value = "bottom-entrance") : S.value === "top" ? e.value = "bottom-entrance" : S.value === "bottom" ? e.value = "top-entrance" : S.value === "left" ? e.value = "right-entrance" : S.value === "right" && (e.value = "left-entrance"), setTimeout(() => {
|
|
828
830
|
e.value = "";
|
|
829
831
|
}, 250);
|
|
830
832
|
};
|
|
831
833
|
return pe(() => {
|
|
832
834
|
n.dynamicPosition && ze();
|
|
833
|
-
}),
|
|
835
|
+
}), Ve(() => {
|
|
834
836
|
ee();
|
|
835
|
-
}), (
|
|
836
|
-
id:
|
|
837
|
+
}), (_, w) => (u(), f("div", {
|
|
838
|
+
id: _.id,
|
|
837
839
|
ref_key: "tooltipRootRef",
|
|
838
840
|
ref: B,
|
|
839
841
|
class: s(o(E).wrapper),
|
|
840
|
-
onMouseenter:
|
|
841
|
-
onMouseleave:
|
|
842
|
+
onMouseenter: Ce,
|
|
843
|
+
onMouseleave: Se
|
|
842
844
|
}, [
|
|
843
|
-
|
|
845
|
+
_.iconName ? (u(), U(o(Q), {
|
|
844
846
|
key: 0,
|
|
845
847
|
ref_key: "tooltipIconRef",
|
|
846
|
-
ref:
|
|
848
|
+
ref: r,
|
|
847
849
|
class: s(o(E).wrapper__icon),
|
|
848
|
-
name:
|
|
850
|
+
name: _.iconName,
|
|
849
851
|
onMouseenter: se,
|
|
850
852
|
onMouseleave: ke
|
|
851
|
-
}, null, 8, ["class", "name"])) : (
|
|
853
|
+
}, null, 8, ["class", "name"])) : (u(), f("div", {
|
|
852
854
|
key: 1,
|
|
853
855
|
class: s(o(E).wrapper__icon),
|
|
854
856
|
onMouseenter: se,
|
|
855
857
|
onMouseleave: se
|
|
856
858
|
}, [
|
|
857
|
-
W(
|
|
859
|
+
W(_.$slots, "triggerElement")
|
|
858
860
|
], 34)),
|
|
859
|
-
|
|
861
|
+
_.status ? (u(), f("div", {
|
|
860
862
|
key: 2,
|
|
861
863
|
ref_key: "tooltipPopupRef",
|
|
862
864
|
ref: A,
|
|
863
865
|
class: s([o(E).wrapper__box, le.value, ae.value, P.value]),
|
|
864
|
-
style: F(
|
|
866
|
+
style: F(_.absolutePosition)
|
|
865
867
|
}, [
|
|
866
868
|
he(o(uo), {
|
|
867
869
|
"border-triangle": "",
|
|
@@ -873,10 +875,10 @@ const eo = "_wrapper__box_1avga_1", to = "_wrapper_1avga_1", oo = "_wrapper__ico
|
|
|
873
875
|
default: ye(() => [
|
|
874
876
|
$("div", {
|
|
875
877
|
class: s(o(E).wrapper__text),
|
|
876
|
-
style: F({ maxHeight: `${
|
|
878
|
+
style: F({ maxHeight: `${_.maxHeight}px`, overflowY: "auto" })
|
|
877
879
|
}, [
|
|
878
880
|
$("div", { innerHTML: re.value }, null, 8, ao),
|
|
879
|
-
W(
|
|
881
|
+
W(_.$slots, "contentSlot")
|
|
880
882
|
], 6)
|
|
881
883
|
]),
|
|
882
884
|
_: 3
|
|
@@ -909,18 +911,18 @@ const eo = "_wrapper__box_1avga_1", to = "_wrapper_1avga_1", oo = "_wrapper__ico
|
|
|
909
911
|
borderTrianglePosition: { default: "top" }
|
|
910
912
|
},
|
|
911
913
|
emits: ["click"],
|
|
912
|
-
setup(
|
|
913
|
-
const
|
|
914
|
-
() =>
|
|
914
|
+
setup(i, { emit: n }) {
|
|
915
|
+
const r = i, t = n, a = C(
|
|
916
|
+
() => r.borderTriangle ? ne[`box_${r.borderTrianglePosition}-${r.borderTriangleAlign}`] : ""
|
|
915
917
|
);
|
|
916
|
-
function
|
|
918
|
+
function d() {
|
|
917
919
|
t("click");
|
|
918
920
|
}
|
|
919
|
-
return (
|
|
920
|
-
class: s([o(ne).box,
|
|
921
|
-
onClick:
|
|
921
|
+
return (c, e) => (u(), f("div", {
|
|
922
|
+
class: s([o(ne).box, a.value, c.border, c.borderRadius]),
|
|
923
|
+
onClick: d
|
|
922
924
|
}, [
|
|
923
|
-
W(
|
|
925
|
+
W(c.$slots, "default")
|
|
924
926
|
], 2));
|
|
925
927
|
}
|
|
926
928
|
}), io = /* @__PURE__ */ T({
|
|
@@ -928,8 +930,8 @@ const eo = "_wrapper__box_1avga_1", to = "_wrapper_1avga_1", oo = "_wrapper__ico
|
|
|
928
930
|
props: {
|
|
929
931
|
boxSpacing: { default: "" }
|
|
930
932
|
},
|
|
931
|
-
setup(
|
|
932
|
-
return (n,
|
|
933
|
+
setup(i) {
|
|
934
|
+
return (n, r) => (u(), f("div", {
|
|
933
935
|
class: s([o(ne).flipBox, n.boxSpacing])
|
|
934
936
|
}, [
|
|
935
937
|
$("div", null, [
|
|
@@ -955,21 +957,21 @@ const eo = "_wrapper__box_1avga_1", to = "_wrapper_1avga_1", oo = "_wrapper__ico
|
|
|
955
957
|
borderTrianglePosition: {},
|
|
956
958
|
boxSpacing: { default: "" }
|
|
957
959
|
},
|
|
958
|
-
setup(
|
|
960
|
+
setup(i) {
|
|
959
961
|
const n = {
|
|
960
962
|
default: _o,
|
|
961
963
|
flip: io
|
|
962
964
|
};
|
|
963
|
-
return (
|
|
964
|
-
"border-triangle":
|
|
965
|
-
"border-triangle-align":
|
|
966
|
-
"border-triangle-position":
|
|
967
|
-
"box-spacing":
|
|
965
|
+
return (r, t) => (u(), U(Le(n[r.type]), {
|
|
966
|
+
"border-triangle": r.borderTriangle,
|
|
967
|
+
"border-triangle-align": r.borderTriangleAlign,
|
|
968
|
+
"border-triangle-position": r.borderTrianglePosition,
|
|
969
|
+
"box-spacing": r.boxSpacing
|
|
968
970
|
}, {
|
|
969
971
|
default: ye(() => [
|
|
970
|
-
W(
|
|
971
|
-
W(
|
|
972
|
-
W(
|
|
972
|
+
W(r.$slots, "default"),
|
|
973
|
+
W(r.$slots, "front"),
|
|
974
|
+
W(r.$slots, "reverse")
|
|
973
975
|
]),
|
|
974
976
|
_: 3
|
|
975
977
|
}, 8, ["border-triangle", "border-triangle-align", "border-triangle-position", "box-spacing"]));
|