@useinsider/ab-components 0.0.21 → 0.0.22
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.css +1 -1
- package/dist/ab-components.es.js +370 -379
- 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,41 +1,40 @@
|
|
|
1
|
-
import { defineComponent as T, computed as C, openBlock as p, createElementBlock as m, normalizeClass as s, unref as o, createBlock as
|
|
2
|
-
const
|
|
3
|
-
button__size_default:
|
|
4
|
-
button__size_small:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"button__solid-
|
|
13
|
-
"button__solid-
|
|
14
|
-
"button__solid-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"button__ghost-
|
|
18
|
-
"button__ghost-
|
|
19
|
-
"button__ghost-
|
|
20
|
-
"button__ghost-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"button__text-primary": "_button__text-
|
|
24
|
-
"button__text-
|
|
25
|
-
"button__text-
|
|
26
|
-
"button__text-
|
|
27
|
-
"button__text-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"button__outline-
|
|
31
|
-
"button__outline-
|
|
32
|
-
"button__outline-
|
|
33
|
-
"button__outline-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}, Ye = ["disabled"], To = /* @__PURE__ */ T({
|
|
1
|
+
import { defineComponent as T, computed as C, openBlock as p, createElementBlock as m, normalizeClass as s, unref as o, createBlock as U, createCommentVNode as x, toDisplayString as I, ref as v, reactive as ve, onMounted as de, watch as oe, Fragment as pe, createElementVNode as y, withDirectives as ge, normalizeStyle as F, withModifiers as Te, vModelText as je, renderList as he, vShow as qe, createVNode as ye, onBeforeUnmount as He, renderSlot as E, withCtx as xe, nextTick as we, resolveDynamicComponent as Ve } from "vue";
|
|
2
|
+
const Le = "_button__size_default_l1vz8_1", Oe = "_button__size_small_l1vz8_8", Ne = "_button_l1vz8_1", Ee = "_button__label_l1vz8_213", We = "_button__solid_l1vz8_225", De = "_fill_l1vz8_1145", Ae = "_spinner_l1vz8_1", R = {
|
|
3
|
+
button__size_default: Le,
|
|
4
|
+
button__size_small: Oe,
|
|
5
|
+
button: Ne,
|
|
6
|
+
button__label: Ee,
|
|
7
|
+
"button__solid-primary": "_button__solid-primary_l1vz8_225",
|
|
8
|
+
"no-hover-effect": "_no-hover-effect_l1vz8_232",
|
|
9
|
+
"button--selected": "_button--selected_l1vz8_254",
|
|
10
|
+
"button__solid-subtle-primary": "_button__solid-subtle-primary_l1vz8_261",
|
|
11
|
+
"button__solid-secondary": "_button__solid-secondary_l1vz8_297",
|
|
12
|
+
"button__solid-danger": "_button__solid-danger_l1vz8_333",
|
|
13
|
+
"button__solid-warning": "_button__solid-warning_l1vz8_369",
|
|
14
|
+
"button__solid-smart": "_button__solid-smart_l1vz8_405",
|
|
15
|
+
"button__ghost-primary": "_button__ghost-primary_l1vz8_441",
|
|
16
|
+
"button__ghost-subtle-primary": "_button__ghost-subtle-primary_l1vz8_477",
|
|
17
|
+
"button__ghost-secondary": "_button__ghost-secondary_l1vz8_513",
|
|
18
|
+
"button__ghost-danger": "_button__ghost-danger_l1vz8_549",
|
|
19
|
+
"button__ghost-warning": "_button__ghost-warning_l1vz8_585",
|
|
20
|
+
"button__ghost-smart": "_button__ghost-smart_l1vz8_621",
|
|
21
|
+
"button__text-primary": "_button__text-primary_l1vz8_657",
|
|
22
|
+
"button__text-text": "_button__text-text_l1vz8_693",
|
|
23
|
+
"button__text-subtle-primary": "_button__text-subtle-primary_l1vz8_729",
|
|
24
|
+
"button__text-secondary": "_button__text-secondary_l1vz8_765",
|
|
25
|
+
"button__text-danger": "_button__text-danger_l1vz8_801",
|
|
26
|
+
"button__text-warning": "_button__text-warning_l1vz8_837",
|
|
27
|
+
"button__text-smart": "_button__text-smart_l1vz8_873",
|
|
28
|
+
"button__outline-primary": "_button__outline-primary_l1vz8_909",
|
|
29
|
+
"button__outline-subtle-primary": "_button__outline-subtle-primary_l1vz8_946",
|
|
30
|
+
"button__outline-secondary": "_button__outline-secondary_l1vz8_983",
|
|
31
|
+
"button__outline-danger": "_button__outline-danger_l1vz8_1020",
|
|
32
|
+
"button__outline-warning": "_button__outline-warning_l1vz8_1057",
|
|
33
|
+
"button__outline-smart": "_button__outline-smart_l1vz8_1094",
|
|
34
|
+
button__solid: We,
|
|
35
|
+
fill: De,
|
|
36
|
+
spinner: Ae
|
|
37
|
+
}, Re = ["disabled"], $o = /* @__PURE__ */ T({
|
|
39
38
|
__name: "Button",
|
|
40
39
|
props: {
|
|
41
40
|
variant: {},
|
|
@@ -51,35 +50,35 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
51
50
|
},
|
|
52
51
|
emits: ["click"],
|
|
53
52
|
setup(u, { emit: n }) {
|
|
54
|
-
const r = u, t = n, a = (
|
|
55
|
-
r.disabled || t("click",
|
|
53
|
+
const r = u, t = n, a = (c) => {
|
|
54
|
+
r.disabled || t("click", c);
|
|
56
55
|
}, _ = C(() => r.loadingStatus ? "loading-circle" : r.successStatus ? "line-check-natural" : r.leftIconName);
|
|
57
|
-
return (
|
|
56
|
+
return (c, e) => (p(), m("button", {
|
|
58
57
|
class: s([
|
|
59
|
-
o(
|
|
60
|
-
o(
|
|
61
|
-
o(
|
|
62
|
-
o(
|
|
63
|
-
{ [o(
|
|
58
|
+
o(R).button,
|
|
59
|
+
o(R)[`button__${c.variant}`],
|
|
60
|
+
o(R)[`button__${c.variant}-${c.color}`],
|
|
61
|
+
o(R)[`button__size_${c.size}`],
|
|
62
|
+
{ [o(R).fill]: c.fill }
|
|
64
63
|
]),
|
|
65
64
|
disabled: r.disabled,
|
|
66
65
|
onClick: a
|
|
67
66
|
}, [
|
|
68
|
-
_.value ? (p(),
|
|
67
|
+
_.value ? (p(), U(o(Q), {
|
|
69
68
|
key: 0,
|
|
70
69
|
name: _.value
|
|
71
|
-
}, null, 8, ["name"])) :
|
|
72
|
-
|
|
70
|
+
}, null, 8, ["name"])) : x("", !0),
|
|
71
|
+
c.label ? (p(), m("span", {
|
|
73
72
|
key: 1,
|
|
74
|
-
class: s(o(
|
|
75
|
-
}, I(
|
|
76
|
-
|
|
73
|
+
class: s(o(R).button__label)
|
|
74
|
+
}, I(c.label), 3)) : x("", !0),
|
|
75
|
+
c.rightIconName ? (p(), U(o(Q), {
|
|
77
76
|
key: 2,
|
|
78
|
-
name:
|
|
79
|
-
}, null, 8, ["name"])) :
|
|
80
|
-
], 10,
|
|
77
|
+
name: c.rightIconName
|
|
78
|
+
}, null, 8, ["name"])) : x("", !0)
|
|
79
|
+
], 10, Re));
|
|
81
80
|
}
|
|
82
|
-
}),
|
|
81
|
+
}), Ge = {
|
|
83
82
|
mounted(u, n) {
|
|
84
83
|
u.clickOutsideEvent = (r) => {
|
|
85
84
|
const t = (n.value.exclude || []).filter((_) => _.value).map((_) => _.value);
|
|
@@ -89,45 +88,44 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
89
88
|
unmounted(u) {
|
|
90
89
|
u.clickOutsideEvent && document.removeEventListener("click", u.clickOutsideEvent);
|
|
91
90
|
}
|
|
92
|
-
},
|
|
91
|
+
}, Ye = (u, n) => {
|
|
93
92
|
var t;
|
|
94
93
|
let r = 0;
|
|
95
94
|
for (const a of u)
|
|
96
95
|
if (a.toLowerCase() === ((t = n[r]) == null ? void 0 : t.toLowerCase()) && r++, r === n.length)
|
|
97
96
|
return !0;
|
|
98
97
|
return !1;
|
|
99
|
-
},
|
|
98
|
+
}, Xe = (u, n, r) => {
|
|
100
99
|
if (!r.trim())
|
|
101
100
|
return u;
|
|
102
101
|
const t = r.toLowerCase();
|
|
103
102
|
return u.filter((a) => {
|
|
104
103
|
const _ = String(a[n]);
|
|
105
|
-
return
|
|
104
|
+
return Ye(_.toLowerCase(), t);
|
|
106
105
|
}).sort((a, _) => {
|
|
107
|
-
const
|
|
108
|
-
return
|
|
106
|
+
const c = String(a[n]).toLowerCase(), e = String(_[n]).toLowerCase();
|
|
107
|
+
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;
|
|
109
108
|
});
|
|
110
|
-
},
|
|
111
|
-
dropdown:
|
|
112
|
-
menu:
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}, pt = ["for"], ct = ["placeholder"], dt = ["onClick"], qo = /* @__PURE__ */ T({
|
|
109
|
+
}, Fe = "_dropdown_17m9p_1", Ue = "_menu_17m9p_1", Qe = "_dropdown__valueContent_17m9p_203", Ze = "_dropdown__label_17m9p_214", Je = "_dropdown__value_17m9p_203", Ke = "_dropdown__placeholder_17m9p_222", et = "_dropdown__arrowIcon_17m9p_230", tt = "_menu__searchContainer_17m9p_245", ot = "_menu__searchInputWrap_17m9p_249", nt = "_menu__searchInput_17m9p_249", rt = "_menu__errorMessage_17m9p_271", at = "_menu__addButton_17m9p_278", lt = "_menu__itemContainer_17m9p_286", st = "_menu__item_17m9p_286", _t = "_spinner_17m9p_1", $ = {
|
|
110
|
+
dropdown: Fe,
|
|
111
|
+
menu: Ue,
|
|
112
|
+
dropdown__valueContent: Qe,
|
|
113
|
+
"dropdown__valueContent--open": "_dropdown__valueContent--open_17m9p_211",
|
|
114
|
+
dropdown__label: Ze,
|
|
115
|
+
dropdown__value: Je,
|
|
116
|
+
dropdown__placeholder: Ke,
|
|
117
|
+
dropdown__arrowIcon: et,
|
|
118
|
+
menu__searchContainer: tt,
|
|
119
|
+
menu__searchInputWrap: ot,
|
|
120
|
+
menu__searchInput: nt,
|
|
121
|
+
"menu__searchInput--error": "_menu__searchInput--error_17m9p_268",
|
|
122
|
+
menu__errorMessage: rt,
|
|
123
|
+
menu__addButton: at,
|
|
124
|
+
menu__itemContainer: lt,
|
|
125
|
+
menu__item: st,
|
|
126
|
+
"menu__item--active": "_menu__item--active_17m9p_324",
|
|
127
|
+
spinner: _t
|
|
128
|
+
}, it = ["for"], ut = ["placeholder"], pt = ["onClick"], zo = /* @__PURE__ */ T({
|
|
131
129
|
__name: "DropdownMenu",
|
|
132
130
|
props: {
|
|
133
131
|
id: {},
|
|
@@ -144,49 +142,49 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
144
142
|
},
|
|
145
143
|
emits: ["update:modelValue", "add-error", "item-added", "select-item"],
|
|
146
144
|
setup(u, { emit: n }) {
|
|
147
|
-
const r =
|
|
145
|
+
const r = Ge, t = u, a = n, _ = v(), c = v(), e = v(!1), l = v(null), b = v(""), d = v(null), P = v({ x: 0, y: 0, width: 0, shouldOpenUp: !1, height: t.menuHeight }), j = ve([...t.items]), B = ve([...t.items]), A = () => {
|
|
148
146
|
if (!_.value)
|
|
149
147
|
return;
|
|
150
|
-
const { offsetTop: f, offsetLeft: g, offsetWidth:
|
|
148
|
+
const { offsetTop: f, offsetLeft: g, offsetWidth: z } = _.value, L = window.innerHeight, G = f + _.value.offsetHeight, ee = G + t.menuHeight > L;
|
|
151
149
|
P.value = {
|
|
152
150
|
x: g + window.scrollX,
|
|
153
|
-
y: ee ? f + window.scrollY :
|
|
154
|
-
width:
|
|
151
|
+
y: ee ? f + window.scrollY : G + window.scrollY,
|
|
152
|
+
width: z,
|
|
155
153
|
shouldOpenUp: ee,
|
|
156
154
|
height: t.menuHeight
|
|
157
155
|
};
|
|
158
156
|
}, S = () => {
|
|
159
|
-
|
|
160
|
-
},
|
|
161
|
-
|
|
157
|
+
A(), e.value = !e.value;
|
|
158
|
+
}, V = () => {
|
|
159
|
+
d.value = null, b.value = "", j.splice(0, j.length, ...B);
|
|
162
160
|
}, Z = () => {
|
|
163
|
-
e.value = !1,
|
|
161
|
+
e.value = !1, V();
|
|
164
162
|
}, re = (f) => {
|
|
165
163
|
l.value = f, a("select-item", f), a("update:modelValue", f.value), Z();
|
|
166
|
-
},
|
|
164
|
+
}, W = () => {
|
|
167
165
|
const f = b.value.trim(), g = t.validateAddItem(f, B);
|
|
168
166
|
if (g) {
|
|
169
|
-
|
|
167
|
+
d.value = g, a("add-error", g);
|
|
170
168
|
return;
|
|
171
169
|
}
|
|
172
|
-
const
|
|
170
|
+
const z = {
|
|
173
171
|
text: f,
|
|
174
172
|
value: f
|
|
175
173
|
};
|
|
176
|
-
B.push(
|
|
174
|
+
B.push(z), V(), a("item-added", z);
|
|
177
175
|
}, ae = () => {
|
|
178
|
-
const f =
|
|
179
|
-
|
|
176
|
+
const f = Xe(B, "text", b.value);
|
|
177
|
+
j.splice(0, j.length, ...f);
|
|
180
178
|
}, J = () => {
|
|
181
|
-
|
|
179
|
+
d.value = "";
|
|
182
180
|
}, le = C(() => ({
|
|
183
181
|
top: P.value.shouldOpenUp ? `${P.value.y - 10}px` : `${P.value.y}px`,
|
|
184
182
|
left: `${P.value.x}px`,
|
|
185
183
|
width: `${P.value.width}px`,
|
|
186
184
|
height: `${t.menuHeight}px`
|
|
187
185
|
}));
|
|
188
|
-
|
|
189
|
-
if (
|
|
186
|
+
de(() => {
|
|
187
|
+
if (A(), t.modelValue) {
|
|
190
188
|
const f = B.find((g) => g.value === t.modelValue);
|
|
191
189
|
f && (l.value = f);
|
|
192
190
|
}
|
|
@@ -195,17 +193,17 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
195
193
|
oe(() => t.modelValue, (f) => {
|
|
196
194
|
var g;
|
|
197
195
|
if (((g = l.value) == null ? void 0 : g.value) !== f) {
|
|
198
|
-
const
|
|
199
|
-
|
|
196
|
+
const z = B.find((L) => L.value === f);
|
|
197
|
+
z && (l.value = z);
|
|
200
198
|
}
|
|
201
199
|
}), oe(
|
|
202
200
|
() => t.items,
|
|
203
201
|
(f) => {
|
|
204
|
-
B.splice(0, B.length, ...f),
|
|
202
|
+
B.splice(0, B.length, ...f), j.splice(0, j.length, ...f);
|
|
205
203
|
},
|
|
206
204
|
{ deep: !0 }
|
|
207
205
|
);
|
|
208
|
-
const se = v({ handler: Z, exclude: [_,
|
|
206
|
+
const se = v({ handler: Z, exclude: [_, c] });
|
|
209
207
|
return (f, g) => (p(), m(pe, null, [
|
|
210
208
|
y("div", {
|
|
211
209
|
ref_key: "dropdownRef",
|
|
@@ -216,7 +214,7 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
216
214
|
key: 0,
|
|
217
215
|
class: s(o($).dropdown__label),
|
|
218
216
|
for: f.id
|
|
219
|
-
}, I(f.label), 11,
|
|
217
|
+
}, I(f.label), 11, it)) : x("", !0),
|
|
220
218
|
y("button", {
|
|
221
219
|
class: s([
|
|
222
220
|
o($).dropdown__valueContent,
|
|
@@ -232,7 +230,7 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
232
230
|
f.placeholder && !K.value ? (p(), m("span", {
|
|
233
231
|
key: 0,
|
|
234
232
|
class: s(o($).dropdown__placeholder)
|
|
235
|
-
}, I(f.placeholder), 3)) :
|
|
233
|
+
}, I(f.placeholder), 3)) : x("", !0),
|
|
236
234
|
(p(), m("svg", {
|
|
237
235
|
fill: "none",
|
|
238
236
|
height: "17",
|
|
@@ -250,9 +248,9 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
250
248
|
], 2),
|
|
251
249
|
ge((p(), m("div", {
|
|
252
250
|
ref_key: "menuRef",
|
|
253
|
-
ref:
|
|
251
|
+
ref: c,
|
|
254
252
|
class: s(o($).menu),
|
|
255
|
-
style:
|
|
253
|
+
style: F(le.value),
|
|
256
254
|
onClick: g[1] || (g[1] = Te(() => {
|
|
257
255
|
}, ["prevent"]))
|
|
258
256
|
}, [
|
|
@@ -268,48 +266,48 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
268
266
|
class: s([
|
|
269
267
|
o($).menu__searchInput,
|
|
270
268
|
{
|
|
271
|
-
[o($)["menu__searchInput--error"]]:
|
|
269
|
+
[o($)["menu__searchInput--error"]]: d.value
|
|
272
270
|
}
|
|
273
271
|
]),
|
|
274
272
|
placeholder: f.searchPlaceHolder,
|
|
275
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
273
|
+
"onUpdate:modelValue": g[0] || (g[0] = (z) => b.value = z),
|
|
276
274
|
onFocus: J,
|
|
277
275
|
onInput: ae
|
|
278
|
-
}, null, 42,
|
|
279
|
-
[
|
|
276
|
+
}, null, 42, ut), [
|
|
277
|
+
[je, b.value]
|
|
280
278
|
]),
|
|
281
|
-
|
|
279
|
+
d.value ? (p(), m("p", {
|
|
282
280
|
key: 0,
|
|
283
281
|
class: s(o($).menu__errorMessage)
|
|
284
|
-
}, I(
|
|
282
|
+
}, I(d.value), 3)) : x("", !0)
|
|
285
283
|
], 2),
|
|
286
284
|
t.addable ? (p(), m("button", {
|
|
287
285
|
key: 0,
|
|
288
286
|
class: s(o($).menu__addButton),
|
|
289
|
-
onClick:
|
|
290
|
-
}, I(f.addButtonText), 3)) :
|
|
291
|
-
], 2)) :
|
|
287
|
+
onClick: W
|
|
288
|
+
}, I(f.addButtonText), 3)) : x("", !0)
|
|
289
|
+
], 2)) : x("", !0),
|
|
292
290
|
y("ul", {
|
|
293
291
|
class: s(o($).menu__itemContainer)
|
|
294
292
|
}, [
|
|
295
|
-
(p(!0), m(pe, null, he(
|
|
296
|
-
key: `${
|
|
293
|
+
(p(!0), m(pe, null, he(j, (z, L) => (p(), m("li", {
|
|
294
|
+
key: `${z.value}-${L}`,
|
|
297
295
|
class: s([
|
|
298
296
|
o($).menu__item,
|
|
299
297
|
{
|
|
300
|
-
[o($)["menu__item--active"]]: l.value &&
|
|
298
|
+
[o($)["menu__item--active"]]: l.value && z.value === l.value.value
|
|
301
299
|
}
|
|
302
300
|
]),
|
|
303
|
-
onClick: (
|
|
304
|
-
}, I(
|
|
301
|
+
onClick: (G) => re(z)
|
|
302
|
+
}, I(z.text), 11, pt))), 128))
|
|
305
303
|
], 2)
|
|
306
304
|
], 6)), [
|
|
307
|
-
[
|
|
305
|
+
[qe, e.value],
|
|
308
306
|
[o(r), se.value]
|
|
309
307
|
])
|
|
310
308
|
], 64));
|
|
311
309
|
}
|
|
312
|
-
}),
|
|
310
|
+
}), dt = ["fill", "height", "width"], ct = ["xlink:href"], mt = /* @__PURE__ */ T({
|
|
313
311
|
__name: "Icon",
|
|
314
312
|
props: {
|
|
315
313
|
name: {},
|
|
@@ -326,24 +324,23 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
326
324
|
}, [
|
|
327
325
|
y("use", {
|
|
328
326
|
"xlink:href": `#${t.name}`
|
|
329
|
-
}, null, 8,
|
|
330
|
-
], 8,
|
|
327
|
+
}, null, 8, ct)
|
|
328
|
+
], 8, dt));
|
|
331
329
|
}
|
|
332
|
-
}),
|
|
330
|
+
}), ft = (u, n) => {
|
|
333
331
|
const r = u.__vccOpts || u;
|
|
334
332
|
for (const [t, a] of n)
|
|
335
333
|
r[t] = a;
|
|
336
334
|
return r;
|
|
337
|
-
}, Q = /* @__PURE__ */
|
|
338
|
-
container:
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
}, Ho = /* @__PURE__ */ T({
|
|
335
|
+
}, Q = /* @__PURE__ */ ft(mt, [["__scopeId", "data-v-f04c8857"]]), bt = "_container_smuz7_1", vt = "_container__text_smuz7_205", gt = "_container__default_smuz7_209", wt = "_container__warning_smuz7_217", ht = "_container__alert_smuz7_225", yt = "_container__success_smuz7_233", xt = "_spinner_smuz7_1", ue = {
|
|
336
|
+
container: bt,
|
|
337
|
+
container__text: vt,
|
|
338
|
+
container__default: gt,
|
|
339
|
+
container__warning: wt,
|
|
340
|
+
container__alert: ht,
|
|
341
|
+
container__success: yt,
|
|
342
|
+
spinner: xt
|
|
343
|
+
}, ko = /* @__PURE__ */ T({
|
|
347
344
|
__name: "OnPageMessage",
|
|
348
345
|
props: {
|
|
349
346
|
variant: { default: "default" },
|
|
@@ -377,25 +374,24 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
377
374
|
}, I(t.text), 3)
|
|
378
375
|
], 2));
|
|
379
376
|
}
|
|
380
|
-
}),
|
|
381
|
-
button__size_default:
|
|
382
|
-
button__size_small:
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
button:
|
|
386
|
-
|
|
387
|
-
"button--
|
|
388
|
-
"button--
|
|
389
|
-
"button--
|
|
390
|
-
"button--
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
segmentGroup:
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
}, Vt = ["disabled", "onClick"], Vo = /* @__PURE__ */ T({
|
|
377
|
+
}), $t = "_button__size_default_wlx30_1", zt = "_button__size_small_wlx30_8", kt = "_button_wlx30_1", St = "_button__label_wlx30_211", Ct = "_button__solid_wlx30_350", It = "_segmentGroup_wlx30_357", Bt = "_fill_wlx30_379", Pt = "_spinner_wlx30_1", q = {
|
|
378
|
+
button__size_default: $t,
|
|
379
|
+
button__size_small: zt,
|
|
380
|
+
button: kt,
|
|
381
|
+
button__label: St,
|
|
382
|
+
"button--primary": "_button--primary_wlx30_228",
|
|
383
|
+
"button--selected": "_button--selected_wlx30_238",
|
|
384
|
+
"button--secondary": "_button--secondary_wlx30_251",
|
|
385
|
+
"button--danger": "_button--danger_wlx30_274",
|
|
386
|
+
"button--warning": "_button--warning_wlx30_297",
|
|
387
|
+
"button--smart": "_button--smart_wlx30_320",
|
|
388
|
+
button__solid: Ct,
|
|
389
|
+
segmentGroup: It,
|
|
390
|
+
"segmentGroup--vertical": "_segmentGroup--vertical_wlx30_360",
|
|
391
|
+
"segmentGroup--horizontal": "_segmentGroup--horizontal_wlx30_369",
|
|
392
|
+
fill: Bt,
|
|
393
|
+
spinner: Pt
|
|
394
|
+
}, Mt = ["disabled", "onClick"], So = /* @__PURE__ */ T({
|
|
399
395
|
__name: "SegmentButton",
|
|
400
396
|
props: {
|
|
401
397
|
color: {},
|
|
@@ -414,52 +410,51 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
414
410
|
oe(() => r.modelValue, (e) => {
|
|
415
411
|
a.value !== e && (a.value = e || "");
|
|
416
412
|
});
|
|
417
|
-
const
|
|
413
|
+
const c = v([...r.segments]);
|
|
418
414
|
return oe(() => r.segments, (e) => {
|
|
419
|
-
|
|
415
|
+
c.value = [...e], e.some((l) => l.value === a.value) || (a.value = "", t("update:modelValue", ""));
|
|
420
416
|
}, { deep: !0 }), (e, l) => (p(), m("div", {
|
|
421
417
|
class: s([
|
|
422
|
-
o(
|
|
423
|
-
o(
|
|
424
|
-
{ [o(
|
|
418
|
+
o(q).segmentGroup,
|
|
419
|
+
o(q)[`segmentGroup--${e.align}`],
|
|
420
|
+
{ [o(q).fill]: e.fill }
|
|
425
421
|
])
|
|
426
422
|
}, [
|
|
427
|
-
(p(!0), m(pe, null, he(
|
|
428
|
-
key: `${b.value}-${
|
|
423
|
+
(p(!0), m(pe, null, he(c.value, (b, d) => (p(), m("button", {
|
|
424
|
+
key: `${b.value}-${d}`,
|
|
429
425
|
class: s([
|
|
430
|
-
o(
|
|
431
|
-
o(
|
|
432
|
-
o(
|
|
433
|
-
o(
|
|
426
|
+
o(q).button,
|
|
427
|
+
o(q)[`button--${e.color}`],
|
|
428
|
+
o(q)[`button__size_${e.size}`],
|
|
429
|
+
o(q).fill,
|
|
434
430
|
{
|
|
435
|
-
[o(
|
|
431
|
+
[o(q)["button--selected"]]: b.value === a.value
|
|
436
432
|
}
|
|
437
433
|
]),
|
|
438
434
|
disabled: b.disabled || r.disabled,
|
|
439
435
|
onClick: (P) => _(b)
|
|
440
436
|
}, [
|
|
441
|
-
b.icon ? (p(),
|
|
437
|
+
b.icon ? (p(), U(o(Q), {
|
|
442
438
|
key: 0,
|
|
443
439
|
name: b.icon
|
|
444
|
-
}, null, 8, ["name"])) :
|
|
440
|
+
}, null, 8, ["name"])) : x("", !0),
|
|
445
441
|
b.label ? (p(), m("span", {
|
|
446
442
|
key: 1,
|
|
447
|
-
class: s(o(
|
|
448
|
-
}, I(b.label), 3)) :
|
|
449
|
-
], 10,
|
|
443
|
+
class: s(o(q).button__label)
|
|
444
|
+
}, I(b.label), 3)) : x("", !0)
|
|
445
|
+
], 10, Mt))), 128))
|
|
450
446
|
], 2));
|
|
451
447
|
}
|
|
452
|
-
}),
|
|
453
|
-
wrapper__field:
|
|
454
|
-
wrapper__label:
|
|
455
|
-
wrapper__errorMessage:
|
|
456
|
-
wrapper__counter:
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
wrapper:
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
}, Gt = ["for"], Yt = ["id", "maxlength", "name", "placeholder", "value"], Xt = ["id", "maxlength", "name", "placeholder", "value"], Lo = /* @__PURE__ */ T({
|
|
448
|
+
}), Tt = "_wrapper__field_1gjtq_1", jt = "_wrapper__label_1gjtq_1", qt = "_wrapper__errorMessage_1gjtq_1", Ht = "_wrapper__counter_1gjtq_1", Vt = "_wrapper_1gjtq_1", Lt = "_wrapper__bottom_1gjtq_241", Ot = "_spinner_1gjtq_1", H = {
|
|
449
|
+
wrapper__field: Tt,
|
|
450
|
+
wrapper__label: jt,
|
|
451
|
+
wrapper__errorMessage: qt,
|
|
452
|
+
wrapper__counter: Ht,
|
|
453
|
+
wrapper: Vt,
|
|
454
|
+
wrapper__bottom: Lt,
|
|
455
|
+
"wrapper--error": "_wrapper--error_1gjtq_254",
|
|
456
|
+
spinner: Ot
|
|
457
|
+
}, Nt = ["for"], Et = ["id", "maxlength", "name", "placeholder", "value"], Wt = ["id", "maxlength", "name", "placeholder", "value"], Co = /* @__PURE__ */ T({
|
|
463
458
|
__name: "TextInput",
|
|
464
459
|
props: {
|
|
465
460
|
id: {},
|
|
@@ -482,91 +477,90 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
482
477
|
const e = Math.min(a.value.scrollHeight, r.maxHeight || a.value.scrollHeight);
|
|
483
478
|
a.value.style.height = `${e}px`;
|
|
484
479
|
}
|
|
485
|
-
},
|
|
480
|
+
}, c = (e) => {
|
|
486
481
|
const l = e.target;
|
|
487
482
|
t("input", e), t("update:modelValue", l.value), _();
|
|
488
483
|
};
|
|
489
|
-
return
|
|
484
|
+
return de(() => {
|
|
490
485
|
_();
|
|
491
486
|
}), (e, l) => {
|
|
492
487
|
var b;
|
|
493
488
|
return p(), m("div", {
|
|
494
|
-
class: s(o(
|
|
489
|
+
class: s(o(H).wrapper)
|
|
495
490
|
}, [
|
|
496
491
|
e.label ? (p(), m("label", {
|
|
497
492
|
key: 0,
|
|
498
|
-
class: s(o(
|
|
493
|
+
class: s(o(H).wrapper__label),
|
|
499
494
|
for: e.id
|
|
500
|
-
}, I(e.label), 11,
|
|
495
|
+
}, I(e.label), 11, Nt)) : x("", !0),
|
|
501
496
|
e.multiline ? (p(), m("textarea", {
|
|
502
497
|
key: 1,
|
|
503
498
|
id: e.id,
|
|
504
499
|
ref_key: "textareaRef",
|
|
505
500
|
ref: a,
|
|
506
501
|
class: s([
|
|
507
|
-
o(
|
|
502
|
+
o(H).wrapper__field,
|
|
508
503
|
{
|
|
509
|
-
[o(
|
|
504
|
+
[o(H)["wrapper--error"]]: e.error
|
|
510
505
|
}
|
|
511
506
|
]),
|
|
512
507
|
maxlength: e.maxLength,
|
|
513
508
|
name: e.name,
|
|
514
509
|
placeholder: e.placeholder,
|
|
515
|
-
style:
|
|
510
|
+
style: F(e.maxHeight ? { maxHeight: `${e.maxHeight}px` } : void 0),
|
|
516
511
|
value: e.modelValue,
|
|
517
|
-
onBlur: l[0] || (l[0] = (
|
|
518
|
-
onChange: l[1] || (l[1] = (
|
|
519
|
-
onFocus: l[2] || (l[2] = (
|
|
520
|
-
onInput:
|
|
521
|
-
onPaste: l[3] || (l[3] = (
|
|
522
|
-
}, null, 46,
|
|
512
|
+
onBlur: l[0] || (l[0] = (d) => t("blur", d)),
|
|
513
|
+
onChange: l[1] || (l[1] = (d) => e.$emit("change", d)),
|
|
514
|
+
onFocus: l[2] || (l[2] = (d) => t("focus", d)),
|
|
515
|
+
onInput: c,
|
|
516
|
+
onPaste: l[3] || (l[3] = (d) => t("paste", d))
|
|
517
|
+
}, null, 46, Et)) : (p(), m("input", {
|
|
523
518
|
key: 2,
|
|
524
519
|
id: e.id,
|
|
525
520
|
type: "text",
|
|
526
521
|
class: s([
|
|
527
|
-
o(
|
|
522
|
+
o(H).wrapper__field,
|
|
528
523
|
{
|
|
529
|
-
[o(
|
|
524
|
+
[o(H)["wrapper--error"]]: e.error
|
|
530
525
|
}
|
|
531
526
|
]),
|
|
532
527
|
maxlength: e.maxLength,
|
|
533
528
|
name: e.name,
|
|
534
529
|
placeholder: e.placeholder,
|
|
535
530
|
value: e.modelValue,
|
|
536
|
-
onBlur: l[4] || (l[4] = (
|
|
537
|
-
onChange: l[5] || (l[5] = (
|
|
538
|
-
onFocus: l[6] || (l[6] = (
|
|
539
|
-
onInput:
|
|
540
|
-
onPaste: l[7] || (l[7] = (
|
|
541
|
-
}, null, 42,
|
|
531
|
+
onBlur: l[4] || (l[4] = (d) => t("blur", d)),
|
|
532
|
+
onChange: l[5] || (l[5] = (d) => e.$emit("change", d)),
|
|
533
|
+
onFocus: l[6] || (l[6] = (d) => t("focus", d)),
|
|
534
|
+
onInput: c,
|
|
535
|
+
onPaste: l[7] || (l[7] = (d) => t("paste", d))
|
|
536
|
+
}, null, 42, Wt)),
|
|
542
537
|
y("div", {
|
|
543
|
-
class: s(o(
|
|
538
|
+
class: s(o(H).wrapper__bottom)
|
|
544
539
|
}, [
|
|
545
540
|
e.error ? (p(), m("div", {
|
|
546
541
|
key: 0,
|
|
547
|
-
class: s(o(
|
|
548
|
-
}, I(e.error), 3)) :
|
|
542
|
+
class: s(o(H).wrapper__errorMessage)
|
|
543
|
+
}, I(e.error), 3)) : x("", !0),
|
|
549
544
|
e.counter ? (p(), m("div", {
|
|
550
545
|
key: 1,
|
|
551
|
-
class: s(o(
|
|
552
|
-
}, I(((b = e.modelValue) == null ? void 0 : b.toString().length) || 0), 3)) :
|
|
546
|
+
class: s(o(H).wrapper__counter)
|
|
547
|
+
}, I(((b = e.modelValue) == null ? void 0 : b.toString().length) || 0), 3)) : x("", !0)
|
|
553
548
|
], 2)
|
|
554
549
|
], 2);
|
|
555
550
|
};
|
|
556
551
|
}
|
|
557
|
-
}),
|
|
558
|
-
wrapper__label:
|
|
559
|
-
wrapper__errorMessage:
|
|
560
|
-
wrapper__counter:
|
|
561
|
-
wrapper:
|
|
562
|
-
wrapper__field:
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
}, no = ["for"], ro = ["id", "max", "maxlength", "min", "name", "placeholder", "value"], Oo = /* @__PURE__ */ T({
|
|
552
|
+
}), Dt = "_wrapper__label_1wzvv_1", At = "_wrapper__errorMessage_1wzvv_1", Rt = "_wrapper__counter_1wzvv_1", Gt = "_wrapper_1wzvv_1", Yt = "_wrapper__field_1wzvv_8", Xt = "_wrapper__size_default_1wzvv_205", Ft = "_wrapper__size_small_1wzvv_208", Ut = "_wrapper__bottom_1wzvv_245", Qt = "_spinner_1wzvv_1", O = {
|
|
553
|
+
wrapper__label: Dt,
|
|
554
|
+
wrapper__errorMessage: At,
|
|
555
|
+
wrapper__counter: Rt,
|
|
556
|
+
wrapper: Gt,
|
|
557
|
+
wrapper__field: Yt,
|
|
558
|
+
wrapper__size_default: Xt,
|
|
559
|
+
wrapper__size_small: Ft,
|
|
560
|
+
wrapper__bottom: Ut,
|
|
561
|
+
"wrapper--error": "_wrapper--error_1wzvv_258",
|
|
562
|
+
spinner: Qt
|
|
563
|
+
}, Zt = ["for"], Jt = ["id", "max", "maxlength", "min", "name", "placeholder", "value"], Io = /* @__PURE__ */ T({
|
|
570
564
|
__name: "NumberInput",
|
|
571
565
|
props: {
|
|
572
566
|
id: {},
|
|
@@ -592,27 +586,27 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
592
586
|
}, _ = (e) => {
|
|
593
587
|
const l = e.target, b = a(l.value);
|
|
594
588
|
l.value = b, t("input", e), t("update:modelValue", Number(b));
|
|
595
|
-
},
|
|
596
|
-
const l = e.target, b = l.value,
|
|
597
|
-
l.value =
|
|
589
|
+
}, c = (e) => {
|
|
590
|
+
const l = e.target, b = l.value, d = a(l.value === "" ? String(r.min || 0) : l.value);
|
|
591
|
+
l.value = d, t("blur", e), b !== d && t("update:modelValue", Number(d));
|
|
598
592
|
};
|
|
599
593
|
return (e, l) => {
|
|
600
594
|
var b;
|
|
601
595
|
return p(), m("div", {
|
|
602
|
-
class: s([o(
|
|
596
|
+
class: s([o(O).wrapper, o(O)[`wrapper__size_${e.size}`]])
|
|
603
597
|
}, [
|
|
604
598
|
e.label ? (p(), m("label", {
|
|
605
599
|
key: 0,
|
|
606
|
-
class: s(o(
|
|
600
|
+
class: s(o(O).wrapper__label),
|
|
607
601
|
for: e.id
|
|
608
|
-
}, I(e.label), 11,
|
|
602
|
+
}, I(e.label), 11, Zt)) : x("", !0),
|
|
609
603
|
y("input", {
|
|
610
604
|
id: e.id,
|
|
611
605
|
type: "number",
|
|
612
606
|
class: s([
|
|
613
|
-
o(
|
|
607
|
+
o(O).wrapper__field,
|
|
614
608
|
{
|
|
615
|
-
[o(
|
|
609
|
+
[o(O)["wrapper--error"]]: e.error || e.errorStatus
|
|
616
610
|
}
|
|
617
611
|
]),
|
|
618
612
|
max: e.max,
|
|
@@ -621,37 +615,36 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
621
615
|
name: e.name,
|
|
622
616
|
placeholder: e.placeholder,
|
|
623
617
|
value: e.modelValue,
|
|
624
|
-
onBlur:
|
|
625
|
-
onChange: l[0] || (l[0] = (
|
|
626
|
-
onFocus: l[1] || (l[1] = (
|
|
618
|
+
onBlur: c,
|
|
619
|
+
onChange: l[0] || (l[0] = (d) => e.$emit("change", d)),
|
|
620
|
+
onFocus: l[1] || (l[1] = (d) => t("focus", d)),
|
|
627
621
|
onInput: _,
|
|
628
|
-
onPaste: l[2] || (l[2] = (
|
|
629
|
-
}, null, 42,
|
|
622
|
+
onPaste: l[2] || (l[2] = (d) => t("paste", d))
|
|
623
|
+
}, null, 42, Jt),
|
|
630
624
|
e.counter || e.error ? (p(), m("div", {
|
|
631
625
|
key: 1,
|
|
632
|
-
class: s(o(
|
|
626
|
+
class: s(o(O).wrapper__bottom)
|
|
633
627
|
}, [
|
|
634
628
|
e.error ? (p(), m("div", {
|
|
635
629
|
key: 0,
|
|
636
|
-
class: s(o(
|
|
637
|
-
}, I(e.error), 3)) :
|
|
630
|
+
class: s(o(O).wrapper__errorMessage)
|
|
631
|
+
}, I(e.error), 3)) : x("", !0),
|
|
638
632
|
e.counter ? (p(), m("div", {
|
|
639
633
|
key: 1,
|
|
640
|
-
class: s(o(
|
|
641
|
-
}, I(((b = e.modelValue) == null ? void 0 : b.toString().length) || 0), 3)) :
|
|
642
|
-
], 2)) :
|
|
634
|
+
class: s(o(O).wrapper__counter)
|
|
635
|
+
}, I(((b = e.modelValue) == null ? void 0 : b.toString().length) || 0), 3)) : x("", !0)
|
|
636
|
+
], 2)) : x("", !0)
|
|
643
637
|
], 2);
|
|
644
638
|
};
|
|
645
639
|
}
|
|
646
|
-
}),
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
}, co = ["id", "checked", "disabled", "name"], mo = ["for"], No = /* @__PURE__ */ T({
|
|
640
|
+
}), Kt = "_wrapper_192md_189", eo = "_wrapper__label_192md_196", to = "_wrapper__input_192md_220", oo = "_wrapper_checked_192md_230", no = "_wrapper_disabled_192md_237", ro = "_spinner_192md_1", X = {
|
|
641
|
+
wrapper: Kt,
|
|
642
|
+
wrapper__label: eo,
|
|
643
|
+
wrapper__input: to,
|
|
644
|
+
wrapper_checked: oo,
|
|
645
|
+
wrapper_disabled: no,
|
|
646
|
+
spinner: ro
|
|
647
|
+
}, ao = ["id", "checked", "disabled", "name"], lo = ["for"], Bo = /* @__PURE__ */ T({
|
|
655
648
|
__name: "Toggle",
|
|
656
649
|
props: {
|
|
657
650
|
id: {},
|
|
@@ -664,12 +657,12 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
664
657
|
const r = u, t = n, a = () => {
|
|
665
658
|
t("click", !r.checked);
|
|
666
659
|
};
|
|
667
|
-
return (_,
|
|
660
|
+
return (_, c) => (p(), m("fieldset", {
|
|
668
661
|
class: s([
|
|
669
|
-
o(
|
|
662
|
+
o(X).wrapper,
|
|
670
663
|
{
|
|
671
|
-
[o(
|
|
672
|
-
[o(
|
|
664
|
+
[o(X).wrapper_checked]: _.checked,
|
|
665
|
+
[o(X).wrapper_disabled]: _.disabled
|
|
673
666
|
}
|
|
674
667
|
])
|
|
675
668
|
}, [
|
|
@@ -677,50 +670,49 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
677
670
|
id: _.id,
|
|
678
671
|
type: "checkbox",
|
|
679
672
|
checked: _.checked,
|
|
680
|
-
class: s(o(
|
|
673
|
+
class: s(o(X).wrapper__input),
|
|
681
674
|
disabled: _.disabled,
|
|
682
675
|
name: _.name,
|
|
683
676
|
onClick: a
|
|
684
|
-
}, null, 10,
|
|
677
|
+
}, null, 10, ao),
|
|
685
678
|
y("label", {
|
|
686
|
-
class: s(o(
|
|
679
|
+
class: s(o(X).wrapper__label),
|
|
687
680
|
for: _.id
|
|
688
|
-
}, null, 10,
|
|
681
|
+
}, null, 10, lo)
|
|
689
682
|
], 2));
|
|
690
683
|
}
|
|
691
684
|
});
|
|
692
|
-
function
|
|
685
|
+
function so(u = "") {
|
|
693
686
|
return typeof u == "string" ? u.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, "") : u;
|
|
694
687
|
}
|
|
695
|
-
const
|
|
696
|
-
wrapper__box:
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
"wrapper__box_bottom-
|
|
702
|
-
"
|
|
703
|
-
"
|
|
704
|
-
"wrapper__box_top-
|
|
705
|
-
"
|
|
706
|
-
"
|
|
707
|
-
"wrapper__box_right-
|
|
708
|
-
"
|
|
709
|
-
"
|
|
710
|
-
"wrapper__box_left-
|
|
711
|
-
|
|
712
|
-
"
|
|
713
|
-
|
|
714
|
-
"
|
|
715
|
-
"
|
|
716
|
-
"
|
|
717
|
-
"
|
|
718
|
-
"
|
|
719
|
-
"
|
|
720
|
-
"
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
}, ko = ["id"], $o = ["innerHTML"], Eo = /* @__PURE__ */ T({
|
|
688
|
+
const _o = "_wrapper__box_1djqh_1", io = "_wrapper_1djqh_1", uo = "_wrapper__icon_1djqh_204", po = "_wrapper__text_1djqh_287", co = "_spinner_1djqh_1", N = {
|
|
689
|
+
wrapper__box: _o,
|
|
690
|
+
wrapper: io,
|
|
691
|
+
wrapper__icon: uo,
|
|
692
|
+
"wrapper__box_bottom-start": "_wrapper__box_bottom-start_1djqh_219",
|
|
693
|
+
"wrapper__box_bottom-center": "_wrapper__box_bottom-center_1djqh_225",
|
|
694
|
+
"wrapper__box_bottom-end": "_wrapper__box_bottom-end_1djqh_231",
|
|
695
|
+
"wrapper__box_top-start": "_wrapper__box_top-start_1djqh_237",
|
|
696
|
+
"wrapper__box_top-center": "_wrapper__box_top-center_1djqh_243",
|
|
697
|
+
"wrapper__box_top-end": "_wrapper__box_top-end_1djqh_249",
|
|
698
|
+
"wrapper__box_right-start": "_wrapper__box_right-start_1djqh_255",
|
|
699
|
+
"wrapper__box_right-center": "_wrapper__box_right-center_1djqh_261",
|
|
700
|
+
"wrapper__box_right-end": "_wrapper__box_right-end_1djqh_267",
|
|
701
|
+
"wrapper__box_left-start": "_wrapper__box_left-start_1djqh_272",
|
|
702
|
+
"wrapper__box_left-center": "_wrapper__box_left-center_1djqh_277",
|
|
703
|
+
"wrapper__box_left-end": "_wrapper__box_left-end_1djqh_282",
|
|
704
|
+
wrapper__text: po,
|
|
705
|
+
"wrapper__box-content": "_wrapper__box-content_1djqh_316",
|
|
706
|
+
"bottom-entrance": "_bottom-entrance_1djqh_329",
|
|
707
|
+
"top-entrance": "_top-entrance_1djqh_332",
|
|
708
|
+
"left-entrance": "_left-entrance_1djqh_335",
|
|
709
|
+
"right-entrance": "_right-entrance_1djqh_338",
|
|
710
|
+
"bottom-leave": "_bottom-leave_1djqh_341",
|
|
711
|
+
"top-leave": "_top-leave_1djqh_344",
|
|
712
|
+
"right-leave": "_right-leave_1djqh_347",
|
|
713
|
+
"left-leave": "_left-leave_1djqh_350",
|
|
714
|
+
spinner: co
|
|
715
|
+
}, mo = ["id"], fo = ["innerHTML"], Po = /* @__PURE__ */ T({
|
|
724
716
|
__name: "Tooltip",
|
|
725
717
|
props: {
|
|
726
718
|
id: {},
|
|
@@ -739,25 +731,25 @@ const bo = "_wrapper__box_49orz_1", vo = "_icon_49orz_129", go = "_spinner_49orz
|
|
|
739
731
|
absolutePosition: { type: [Boolean, null, String, Object, Array] }
|
|
740
732
|
},
|
|
741
733
|
setup(u) {
|
|
742
|
-
const n = u, r = v(null), t = v("center"), a = v("bottom"), _ = v("center"),
|
|
734
|
+
const n = u, r = v(null), t = v("center"), a = v("bottom"), _ = v("center"), c = v(!1), e = v(""), l = v(!1), b = v(!1), d = v(""), P = v("d-n"), j = v(null), B = v(null), A = v(null), S = C(() => n.staticPosition.split(" ")[0]), V = C(() => n.staticPosition.split(" ")[1]), Z = C(() => n.iconName ? "mt-1" : "mt-0"), re = C(() => n.preventXss ? so(n.text) : n.text), W = 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 && b.value || d.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" : _.value : V.value === "center" ? "center" : V.value === "left" || V.value === "top" ? "start" : V.value === "right" || V.value === "bottom" ? "end" : "center"), le = C(() => n.absolutePositionStatus ? "" : n.dynamicPosition && c.value ? N[`wrapper__box_${a.value}-${t.value}`] : N[`wrapper__box_${S.value}-${J.value}`]), K = C(() => n.offsetX === 0 && n.offsetY === 0 ? {} : n.dynamicPosition ? {
|
|
743
735
|
[`margin-${a.value === "bottom" ? "top" : "bottom"}`]: `${n.offsetY}px`
|
|
744
|
-
} :
|
|
745
|
-
[`margin-${
|
|
746
|
-
} : { [`margin-${
|
|
747
|
-
const { offsetTop: w, offsetLeft: h, offsetWidth: M, offsetHeight:
|
|
736
|
+
} : W.value === "top" || W.value === "bottom" ? {
|
|
737
|
+
[`margin-${W.value}`]: `${n.offsetY}px`
|
|
738
|
+
} : { [`margin-${W.value}`]: `${n.offsetX}px` }), se = (i) => {
|
|
739
|
+
const { offsetTop: w, offsetLeft: h, offsetWidth: M, offsetHeight: Y } = i, D = w + Y, ie = h + M;
|
|
748
740
|
return {
|
|
749
741
|
top: w,
|
|
750
742
|
left: h,
|
|
751
743
|
width: M,
|
|
752
|
-
bottom:
|
|
744
|
+
bottom: D,
|
|
753
745
|
right: ie
|
|
754
746
|
};
|
|
755
747
|
}, f = (i, w, h = !1) => {
|
|
756
748
|
if (!i || !B.value)
|
|
757
749
|
return { left: !1, right: !1, top: !1, bottom: !1, center: !1 };
|
|
758
|
-
const M = { left: 0, right: 0, top: 0, bottom: 0, width: 0, height: 0 },
|
|
750
|
+
const M = { left: 0, right: 0, top: 0, bottom: 0, width: 0, height: 0 }, Y = B.value.offsetHeight, D = window.innerWidth, ie = window.innerHeight, ce = i.offsetHeight, te = i.offsetWidth || 264, k = w && se(w) || M, me = h ? k == null ? void 0 : k.right : k == null ? void 0 : k.left, fe = h ? k == null ? void 0 : k.top : k == null ? void 0 : k.bottom, Ie = me + k.width + te + n.offsetX < D, Be = me + k.width / 2 - (te + n.offsetX) > 10, Pe = fe + ce < ie - n.offsetY, Me = fe - (ce + Y + n.offsetY) > 0;
|
|
759
751
|
let be = !1;
|
|
760
|
-
return n.iconName && (be =
|
|
752
|
+
return n.iconName && (be = k.right + te / 2 < D && k.left - (te + n.offsetX) / 2 >= 10), {
|
|
761
753
|
left: Be,
|
|
762
754
|
right: Ie,
|
|
763
755
|
bottom: Pe,
|
|
@@ -766,13 +758,13 @@ const bo = "_wrapper__box_49orz_1", vo = "_icon_49orz_129", go = "_spinner_49orz
|
|
|
766
758
|
};
|
|
767
759
|
}, g = () => {
|
|
768
760
|
we(() => {
|
|
769
|
-
var
|
|
770
|
-
|
|
771
|
-
const { bottom: i, left: w, right: h, top: M, center:
|
|
772
|
-
|
|
773
|
-
(
|
|
761
|
+
var D;
|
|
762
|
+
c.value = !0;
|
|
763
|
+
const { bottom: i, left: w, right: h, top: M, center: Y } = f(
|
|
764
|
+
A.value,
|
|
765
|
+
(D = A.value) == null ? void 0 : D.parentNode
|
|
774
766
|
);
|
|
775
|
-
if (
|
|
767
|
+
if (Y) {
|
|
776
768
|
t.value = "center", a.value = i && !M ? "bottom" : "top";
|
|
777
769
|
return;
|
|
778
770
|
}
|
|
@@ -816,32 +808,32 @@ const bo = "_wrapper__box_49orz_1", vo = "_icon_49orz_129", go = "_spinner_49orz
|
|
|
816
808
|
h && !w && (t.value = "start", a.value = "bottom", _.value = "top");
|
|
817
809
|
}
|
|
818
810
|
});
|
|
819
|
-
},
|
|
811
|
+
}, z = (i) => {
|
|
820
812
|
if (!(i instanceof HTMLElement))
|
|
821
813
|
return !1;
|
|
822
814
|
const w = i.scrollHeight > i.offsetHeight, h = window.getComputedStyle(i).overflowY, M = ["auto", "scroll"].includes(h);
|
|
823
815
|
return w && M;
|
|
824
|
-
},
|
|
816
|
+
}, L = (i) => {
|
|
825
817
|
const w = (i == null ? void 0 : i.nodeType) === Node.COMMENT_NODE, h = (i == null ? void 0 : i.nodeType) === Node.DOCUMENT_NODE;
|
|
826
|
-
return !i || w || h ? document :
|
|
827
|
-
},
|
|
818
|
+
return !i || w || h ? document : z(i) ? i : L(i.parentNode);
|
|
819
|
+
}, G = () => {
|
|
828
820
|
var i;
|
|
829
|
-
(i =
|
|
821
|
+
(i = j.value) == null || i.removeEventListener("scroll", g), window == null || window.removeEventListener("resize", g);
|
|
830
822
|
}, ee = () => {
|
|
831
823
|
we(() => {
|
|
832
824
|
var i;
|
|
833
|
-
|
|
825
|
+
j.value = L(B.value), (i = j.value) == null || i.addEventListener("scroll", g), window == null || window.addEventListener("resize", g);
|
|
834
826
|
});
|
|
835
827
|
}, $e = () => {
|
|
836
|
-
|
|
828
|
+
d.value = "wrapper", P.value = "d-b", l.value = !0;
|
|
837
829
|
}, _e = () => {
|
|
838
|
-
|
|
839
|
-
}, xe = () => {
|
|
840
|
-
b.value = !1;
|
|
830
|
+
d.value = "icon", P.value = "d-b", b.value = !0;
|
|
841
831
|
}, ze = () => {
|
|
842
|
-
|
|
832
|
+
b.value = !1;
|
|
833
|
+
}, ke = () => {
|
|
834
|
+
d.value = "", l.value = !1, b.value = !1;
|
|
843
835
|
}, Se = () => {
|
|
844
|
-
|
|
836
|
+
ke(), 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(() => {
|
|
845
837
|
e.value = "", P.value = "d-n";
|
|
846
838
|
}, n.absolutePositionStatus ? 0 : 250);
|
|
847
839
|
}, Ce = () => {
|
|
@@ -849,80 +841,79 @@ const bo = "_wrapper__box_49orz_1", vo = "_icon_49orz_129", go = "_spinner_49orz
|
|
|
849
841
|
e.value = "";
|
|
850
842
|
}, 250);
|
|
851
843
|
};
|
|
852
|
-
return
|
|
844
|
+
return de(() => {
|
|
853
845
|
n.dynamicPosition && ee();
|
|
854
|
-
}),
|
|
855
|
-
|
|
846
|
+
}), He(() => {
|
|
847
|
+
G();
|
|
856
848
|
}), (i, w) => (p(), m("div", {
|
|
857
849
|
id: i.id,
|
|
858
850
|
ref_key: "tooltipRootRef",
|
|
859
851
|
ref: B,
|
|
860
|
-
class: s(o(
|
|
852
|
+
class: s(o(N).wrapper),
|
|
861
853
|
onMouseenter: Ce,
|
|
862
854
|
onMouseleave: Se
|
|
863
855
|
}, [
|
|
864
|
-
i.iconName ? (p(),
|
|
856
|
+
i.iconName ? (p(), U(o(Q), {
|
|
865
857
|
key: 0,
|
|
866
858
|
ref_key: "tooltipIconRef",
|
|
867
859
|
ref: r,
|
|
868
|
-
class: s(o(
|
|
860
|
+
class: s(o(N).wrapper__icon),
|
|
869
861
|
name: i.iconName,
|
|
870
862
|
onMouseenter: _e,
|
|
871
|
-
onMouseleave:
|
|
863
|
+
onMouseleave: ze
|
|
872
864
|
}, null, 8, ["class", "name"])) : (p(), m("div", {
|
|
873
865
|
key: 1,
|
|
874
|
-
class: s(o(
|
|
866
|
+
class: s(o(N).wrapper__icon),
|
|
875
867
|
onMouseenter: _e,
|
|
876
868
|
onMouseleave: _e
|
|
877
869
|
}, [
|
|
878
|
-
|
|
870
|
+
E(i.$slots, "triggerElement")
|
|
879
871
|
], 34)),
|
|
880
872
|
i.status ? (p(), m("div", {
|
|
881
873
|
key: 2,
|
|
882
874
|
ref_key: "tooltipPopupRef",
|
|
883
|
-
ref:
|
|
884
|
-
class: s([o(
|
|
885
|
-
style:
|
|
875
|
+
ref: A,
|
|
876
|
+
class: s([o(N).wrapper__box, le.value, ae.value, P.value]),
|
|
877
|
+
style: F(i.absolutePosition)
|
|
886
878
|
}, [
|
|
887
|
-
ye(o(
|
|
879
|
+
ye(o(yo), {
|
|
888
880
|
"border-triangle": "",
|
|
889
881
|
"border-triangle-align": J.value,
|
|
890
|
-
"border-triangle-position":
|
|
891
|
-
class: s([o(
|
|
892
|
-
style:
|
|
882
|
+
"border-triangle-position": W.value,
|
|
883
|
+
class: s([o(N)["wrapper__box-content"], Z.value, e.value]),
|
|
884
|
+
style: F(K.value)
|
|
893
885
|
}, {
|
|
894
|
-
default:
|
|
886
|
+
default: xe(() => [
|
|
895
887
|
y("div", {
|
|
896
|
-
class: s(o(
|
|
897
|
-
style:
|
|
888
|
+
class: s(o(N).wrapper__text),
|
|
889
|
+
style: F({ maxHeight: `${i.maxHeight}px`, overflowY: "auto" })
|
|
898
890
|
}, [
|
|
899
|
-
y("div", { innerHTML: re.value }, null, 8,
|
|
900
|
-
|
|
891
|
+
y("div", { innerHTML: re.value }, null, 8, fo),
|
|
892
|
+
E(i.$slots, "contentSlot")
|
|
901
893
|
], 6)
|
|
902
894
|
]),
|
|
903
895
|
_: 3
|
|
904
896
|
}, 8, ["border-triangle-align", "border-triangle-position", "class", "style"])
|
|
905
|
-
], 6)) :
|
|
906
|
-
], 42,
|
|
897
|
+
], 6)) : x("", !0)
|
|
898
|
+
], 42, mo));
|
|
907
899
|
}
|
|
908
|
-
}),
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
"box_top-
|
|
913
|
-
"
|
|
914
|
-
"
|
|
915
|
-
"box_right-
|
|
916
|
-
"
|
|
917
|
-
"
|
|
918
|
-
"box_bottom-
|
|
919
|
-
"
|
|
920
|
-
"
|
|
921
|
-
"box_left-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
}, Io = /* @__PURE__ */ T({
|
|
900
|
+
}), bo = "_box_1ebla_189", vo = "_flipBox_1ebla_277", go = "_spinner_1ebla_1", ne = {
|
|
901
|
+
box: bo,
|
|
902
|
+
"box_top-start": "_box_top-start_1ebla_193",
|
|
903
|
+
"box_top-center": "_box_top-center_1ebla_193",
|
|
904
|
+
"box_top-end": "_box_top-end_1ebla_193",
|
|
905
|
+
"box_right-start": "_box_right-start_1ebla_193",
|
|
906
|
+
"box_right-center": "_box_right-center_1ebla_193",
|
|
907
|
+
"box_right-end": "_box_right-end_1ebla_193",
|
|
908
|
+
"box_bottom-start": "_box_bottom-start_1ebla_193",
|
|
909
|
+
"box_bottom-center": "_box_bottom-center_1ebla_193",
|
|
910
|
+
"box_bottom-end": "_box_bottom-end_1ebla_193",
|
|
911
|
+
"box_left-start": "_box_left-start_1ebla_193",
|
|
912
|
+
"box_left-center": "_box_left-center_1ebla_193",
|
|
913
|
+
"box_left-end": "_box_left-end_1ebla_193",
|
|
914
|
+
flipBox: vo,
|
|
915
|
+
spinner: go
|
|
916
|
+
}, wo = /* @__PURE__ */ T({
|
|
926
917
|
__name: "DefaultBox",
|
|
927
918
|
props: {
|
|
928
919
|
border: {},
|
|
@@ -939,14 +930,14 @@ const bo = "_wrapper__box_49orz_1", vo = "_icon_49orz_129", go = "_spinner_49orz
|
|
|
939
930
|
function _() {
|
|
940
931
|
t("click");
|
|
941
932
|
}
|
|
942
|
-
return (
|
|
943
|
-
class: s([o(ne).box, a.value,
|
|
933
|
+
return (c, e) => (p(), m("div", {
|
|
934
|
+
class: s([o(ne).box, a.value, c.border, c.borderRadius]),
|
|
944
935
|
onClick: _
|
|
945
936
|
}, [
|
|
946
|
-
|
|
937
|
+
E(c.$slots, "default")
|
|
947
938
|
], 2));
|
|
948
939
|
}
|
|
949
|
-
}),
|
|
940
|
+
}), ho = /* @__PURE__ */ T({
|
|
950
941
|
__name: "FlipBox",
|
|
951
942
|
props: {
|
|
952
943
|
boxSpacing: { default: "" }
|
|
@@ -959,17 +950,17 @@ const bo = "_wrapper__box_49orz_1", vo = "_icon_49orz_129", go = "_spinner_49orz
|
|
|
959
950
|
y("div", {
|
|
960
951
|
class: s([o(ne).box, n.boxSpacing])
|
|
961
952
|
}, [
|
|
962
|
-
|
|
953
|
+
E(n.$slots, "front")
|
|
963
954
|
], 2),
|
|
964
955
|
y("div", {
|
|
965
956
|
class: s([n.boxSpacing])
|
|
966
957
|
}, [
|
|
967
|
-
|
|
958
|
+
E(n.$slots, "reverse")
|
|
968
959
|
], 2)
|
|
969
960
|
])
|
|
970
961
|
], 2));
|
|
971
962
|
}
|
|
972
|
-
}),
|
|
963
|
+
}), yo = /* @__PURE__ */ T({
|
|
973
964
|
__name: "Box",
|
|
974
965
|
props: {
|
|
975
966
|
type: { default: "default" },
|
|
@@ -980,34 +971,34 @@ const bo = "_wrapper__box_49orz_1", vo = "_icon_49orz_129", go = "_spinner_49orz
|
|
|
980
971
|
},
|
|
981
972
|
setup(u) {
|
|
982
973
|
const n = {
|
|
983
|
-
default:
|
|
984
|
-
flip:
|
|
974
|
+
default: wo,
|
|
975
|
+
flip: ho
|
|
985
976
|
};
|
|
986
|
-
return (r, t) => (p(),
|
|
977
|
+
return (r, t) => (p(), U(Ve(n[r.type]), {
|
|
987
978
|
"border-triangle": r.borderTriangle,
|
|
988
979
|
"border-triangle-align": r.borderTriangleAlign,
|
|
989
980
|
"border-triangle-position": r.borderTrianglePosition,
|
|
990
981
|
"box-spacing": r.boxSpacing
|
|
991
982
|
}, {
|
|
992
|
-
default:
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
983
|
+
default: xe(() => [
|
|
984
|
+
E(r.$slots, "default"),
|
|
985
|
+
E(r.$slots, "front"),
|
|
986
|
+
E(r.$slots, "reverse")
|
|
996
987
|
]),
|
|
997
988
|
_: 3
|
|
998
989
|
}, 8, ["border-triangle", "border-triangle-align", "border-triangle-position", "box-spacing"]));
|
|
999
990
|
}
|
|
1000
991
|
});
|
|
1001
992
|
export {
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
993
|
+
yo as Box,
|
|
994
|
+
$o as Button,
|
|
995
|
+
zo as DropdownMenu,
|
|
1005
996
|
Q as Icon,
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
997
|
+
Io as NumberInput,
|
|
998
|
+
ko as OnPageMessage,
|
|
999
|
+
So as SegmentButton,
|
|
1000
|
+
Co as TextInput,
|
|
1001
|
+
Bo as Toggle,
|
|
1002
|
+
Po as Tooltip
|
|
1012
1003
|
};
|
|
1013
1004
|
//# sourceMappingURL=ab-components.es.js.map
|