@useinsider/ab-components 0.0.21 → 0.0.23
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 +366 -375
- 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/dist/icons.svg +2 -2
- 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 z, toDisplayString as I, ref as v, reactive as ve, onMounted as ce, watch as oe, Fragment as pe, createElementVNode as y, withDirectives as we, normalizeStyle as q, withModifiers as Te, vModelText as He, renderList as he, vShow as Ve, createVNode as ye, onBeforeUnmount as Le, renderSlot as D, withCtx as ze, nextTick as ge, resolveDynamicComponent as Oe } from "vue";
|
|
2
|
+
const Ne = "_button__size_default_l1vz8_1", Ee = "_button__size_small_l1vz8_8", We = "_button_l1vz8_1", De = "_button__label_l1vz8_213", Ae = "_button__solid_l1vz8_225", Re = "_fill_l1vz8_1145", Ge = "_spinner_l1vz8_1", Y = {
|
|
3
|
+
button__size_default: Ne,
|
|
4
|
+
button__size_small: Ee,
|
|
5
|
+
button: We,
|
|
6
|
+
button__label: De,
|
|
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: Ae,
|
|
35
|
+
fill: Re,
|
|
36
|
+
spinner: Ge
|
|
37
|
+
}, Ye = ["disabled"], xo = /* @__PURE__ */ T({
|
|
39
38
|
__name: "Button",
|
|
40
39
|
props: {
|
|
41
40
|
variant: {},
|
|
@@ -56,27 +55,27 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
56
55
|
}, _ = C(() => r.loadingStatus ? "loading-circle" : r.successStatus ? "line-check-natural" : r.leftIconName);
|
|
57
56
|
return (d, e) => (p(), m("button", {
|
|
58
57
|
class: s([
|
|
59
|
-
o(
|
|
60
|
-
o(
|
|
61
|
-
o(
|
|
62
|
-
o(
|
|
63
|
-
{ [o(
|
|
58
|
+
o(Y).button,
|
|
59
|
+
o(Y)[`button__${d.variant}`],
|
|
60
|
+
o(Y)[`button__${d.variant}-${d.color}`],
|
|
61
|
+
o(Y)[`button__size_${d.size}`],
|
|
62
|
+
{ [o(Y).fill]: d.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"])) :
|
|
70
|
+
}, null, 8, ["name"])) : z("", !0),
|
|
72
71
|
d.label ? (p(), m("span", {
|
|
73
72
|
key: 1,
|
|
74
|
-
class: s(o(
|
|
75
|
-
}, I(d.label), 3)) :
|
|
76
|
-
d.rightIconName ? (p(),
|
|
73
|
+
class: s(o(Y).button__label)
|
|
74
|
+
}, I(d.label), 3)) : z("", !0),
|
|
75
|
+
d.rightIconName ? (p(), U(o(Q), {
|
|
77
76
|
key: 2,
|
|
78
77
|
name: d.rightIconName
|
|
79
|
-
}, null, 8, ["name"])) :
|
|
78
|
+
}, null, 8, ["name"])) : z("", !0)
|
|
80
79
|
], 10, Ye));
|
|
81
80
|
}
|
|
82
81
|
}), Xe = {
|
|
@@ -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
|
+
}, je = (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
|
+
}, Fe = (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 je(_.toLowerCase(), t);
|
|
106
105
|
}).sort((a, _) => {
|
|
107
106
|
const d = String(a[n]).toLowerCase(), e = String(_[n]).toLowerCase();
|
|
108
107
|
return d === t ? -1 : e === t ? 1 : d.startsWith(t) && !e.startsWith(t) ? -1 : !d.startsWith(t) && e.startsWith(t) ? 1 : d.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
|
+
}, qe = "_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", x = {
|
|
110
|
+
dropdown: qe,
|
|
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"], $o = /* @__PURE__ */ T({
|
|
131
129
|
__name: "DropdownMenu",
|
|
132
130
|
props: {
|
|
133
131
|
id: {},
|
|
@@ -144,39 +142,39 @@ 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 = Xe, t = u, a = n, _ = v(), d = v(), e = v(!1), l = v(null), b = v(""), c = v(null), P = v({ x: 0, y: 0, width: 0, shouldOpenUp: !1, height: t.menuHeight }),
|
|
145
|
+
const r = Xe, t = u, a = n, _ = v(), d = v(), e = v(!1), l = v(null), b = v(""), c = v(null), P = v({ x: 0, y: 0, width: 0, shouldOpenUp: !1, height: t.menuHeight }), H = ve([...t.items]), B = ve([...t.items]), G = () => {
|
|
148
146
|
if (!_.value)
|
|
149
147
|
return;
|
|
150
|
-
const { offsetTop: f, offsetLeft:
|
|
148
|
+
const { offsetTop: f, offsetLeft: w, offsetWidth: $ } = _.value, N = window.innerHeight, X = f + _.value.offsetHeight, ee = X + t.menuHeight > N;
|
|
151
149
|
P.value = {
|
|
152
|
-
x:
|
|
153
|
-
y: ee ? f + window.scrollY :
|
|
154
|
-
width:
|
|
150
|
+
x: w + window.scrollX,
|
|
151
|
+
y: ee ? f + window.scrollY : X + window.scrollY,
|
|
152
|
+
width: $,
|
|
155
153
|
shouldOpenUp: ee,
|
|
156
154
|
height: t.menuHeight
|
|
157
155
|
};
|
|
158
156
|
}, S = () => {
|
|
159
|
-
|
|
160
|
-
},
|
|
161
|
-
c.value = null, b.value = "",
|
|
157
|
+
G(), e.value = !e.value;
|
|
158
|
+
}, O = () => {
|
|
159
|
+
c.value = null, b.value = "", H.splice(0, H.length, ...B);
|
|
162
160
|
}, Z = () => {
|
|
163
|
-
e.value = !1,
|
|
161
|
+
e.value = !1, O();
|
|
164
162
|
}, re = (f) => {
|
|
165
163
|
l.value = f, a("select-item", f), a("update:modelValue", f.value), Z();
|
|
166
|
-
},
|
|
167
|
-
const f = b.value.trim(),
|
|
168
|
-
if (
|
|
169
|
-
c.value =
|
|
164
|
+
}, A = () => {
|
|
165
|
+
const f = b.value.trim(), w = t.validateAddItem(f, B);
|
|
166
|
+
if (w) {
|
|
167
|
+
c.value = w, a("add-error", w);
|
|
170
168
|
return;
|
|
171
169
|
}
|
|
172
|
-
const
|
|
170
|
+
const $ = {
|
|
173
171
|
text: f,
|
|
174
172
|
value: f
|
|
175
173
|
};
|
|
176
|
-
B.push(
|
|
174
|
+
B.push($), O(), a("item-added", $);
|
|
177
175
|
}, ae = () => {
|
|
178
|
-
const f =
|
|
179
|
-
|
|
176
|
+
const f = Fe(B, "text", b.value);
|
|
177
|
+
H.splice(0, H.length, ...f);
|
|
180
178
|
}, J = () => {
|
|
181
179
|
c.value = "";
|
|
182
180
|
}, le = C(() => ({
|
|
@@ -186,61 +184,61 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
186
184
|
height: `${t.menuHeight}px`
|
|
187
185
|
}));
|
|
188
186
|
ce(() => {
|
|
189
|
-
if (
|
|
190
|
-
const f = B.find((
|
|
187
|
+
if (G(), t.modelValue) {
|
|
188
|
+
const f = B.find((w) => w.value === t.modelValue);
|
|
191
189
|
f && (l.value = f);
|
|
192
190
|
}
|
|
193
191
|
});
|
|
194
192
|
const K = C(() => l.value ? l.value.text : "");
|
|
195
193
|
oe(() => t.modelValue, (f) => {
|
|
196
|
-
var
|
|
197
|
-
if (((
|
|
198
|
-
const
|
|
199
|
-
|
|
194
|
+
var w;
|
|
195
|
+
if (((w = l.value) == null ? void 0 : w.value) !== f) {
|
|
196
|
+
const $ = B.find((N) => N.value === f);
|
|
197
|
+
$ && (l.value = $);
|
|
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), H.splice(0, H.length, ...f);
|
|
205
203
|
},
|
|
206
204
|
{ deep: !0 }
|
|
207
205
|
);
|
|
208
206
|
const se = v({ handler: Z, exclude: [_, d] });
|
|
209
|
-
return (f,
|
|
207
|
+
return (f, w) => (p(), m(pe, null, [
|
|
210
208
|
y("div", {
|
|
211
209
|
ref_key: "dropdownRef",
|
|
212
210
|
ref: _,
|
|
213
|
-
class: s(o(
|
|
211
|
+
class: s(o(x).dropdown)
|
|
214
212
|
}, [
|
|
215
213
|
f.label ? (p(), m("label", {
|
|
216
214
|
key: 0,
|
|
217
|
-
class: s(o(
|
|
215
|
+
class: s(o(x).dropdown__label),
|
|
218
216
|
for: f.id
|
|
219
|
-
}, I(f.label), 11,
|
|
217
|
+
}, I(f.label), 11, it)) : z("", !0),
|
|
220
218
|
y("button", {
|
|
221
219
|
class: s([
|
|
222
|
-
o(
|
|
220
|
+
o(x).dropdown__valueContent,
|
|
223
221
|
{
|
|
224
|
-
[o(
|
|
222
|
+
[o(x)["dropdown__valueContent--open"]]: e.value
|
|
225
223
|
}
|
|
226
224
|
]),
|
|
227
225
|
onClick: S
|
|
228
226
|
}, [
|
|
229
227
|
y("span", {
|
|
230
|
-
class: s(o(
|
|
228
|
+
class: s(o(x).dropdown__value)
|
|
231
229
|
}, I(K.value), 3),
|
|
232
230
|
f.placeholder && !K.value ? (p(), m("span", {
|
|
233
231
|
key: 0,
|
|
234
|
-
class: s(o(
|
|
235
|
-
}, I(f.placeholder), 3)) :
|
|
232
|
+
class: s(o(x).dropdown__placeholder)
|
|
233
|
+
}, I(f.placeholder), 3)) : z("", !0),
|
|
236
234
|
(p(), m("svg", {
|
|
237
235
|
fill: "none",
|
|
238
236
|
height: "17",
|
|
239
237
|
viewBox: "0 0 16 17",
|
|
240
238
|
width: "16",
|
|
241
239
|
xmlns: "http://www.w3.org/2000/svg",
|
|
242
|
-
class: s(o(
|
|
243
|
-
},
|
|
240
|
+
class: s(o(x).dropdown__arrowIcon)
|
|
241
|
+
}, w[2] || (w[2] = [
|
|
244
242
|
y("path", {
|
|
245
243
|
d: "M8 11.2021L4.5359 6.70215L11.4641 6.70215L8 11.2021Z",
|
|
246
244
|
fill: "#91949F"
|
|
@@ -248,68 +246,68 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
248
246
|
]), 2))
|
|
249
247
|
], 2)
|
|
250
248
|
], 2),
|
|
251
|
-
|
|
249
|
+
we((p(), m("div", {
|
|
252
250
|
ref_key: "menuRef",
|
|
253
251
|
ref: d,
|
|
254
|
-
class: s(o(
|
|
255
|
-
style:
|
|
256
|
-
onClick:
|
|
252
|
+
class: s(o(x).menu),
|
|
253
|
+
style: q(le.value),
|
|
254
|
+
onClick: w[1] || (w[1] = Te(() => {
|
|
257
255
|
}, ["prevent"]))
|
|
258
256
|
}, [
|
|
259
257
|
t.searchable ? (p(), m("div", {
|
|
260
258
|
key: 0,
|
|
261
|
-
class: s(o(
|
|
259
|
+
class: s(o(x).menu__searchContainer)
|
|
262
260
|
}, [
|
|
263
261
|
y("div", {
|
|
264
|
-
class: s(o(
|
|
262
|
+
class: s(o(x).menu__searchInputWrap)
|
|
265
263
|
}, [
|
|
266
|
-
|
|
264
|
+
we(y("input", {
|
|
267
265
|
type: "text",
|
|
268
266
|
class: s([
|
|
269
|
-
o(
|
|
267
|
+
o(x).menu__searchInput,
|
|
270
268
|
{
|
|
271
|
-
[o(
|
|
269
|
+
[o(x)["menu__searchInput--error"]]: c.value
|
|
272
270
|
}
|
|
273
271
|
]),
|
|
274
272
|
placeholder: f.searchPlaceHolder,
|
|
275
|
-
"onUpdate:modelValue":
|
|
273
|
+
"onUpdate:modelValue": w[0] || (w[0] = ($) => b.value = $),
|
|
276
274
|
onFocus: J,
|
|
277
275
|
onInput: ae
|
|
278
|
-
}, null, 42,
|
|
279
|
-
[
|
|
276
|
+
}, null, 42, ut), [
|
|
277
|
+
[He, b.value]
|
|
280
278
|
]),
|
|
281
279
|
c.value ? (p(), m("p", {
|
|
282
280
|
key: 0,
|
|
283
|
-
class: s(o(
|
|
284
|
-
}, I(c.value), 3)) :
|
|
281
|
+
class: s(o(x).menu__errorMessage)
|
|
282
|
+
}, I(c.value), 3)) : z("", !0)
|
|
285
283
|
], 2),
|
|
286
284
|
t.addable ? (p(), m("button", {
|
|
287
285
|
key: 0,
|
|
288
|
-
class: s(o(
|
|
289
|
-
onClick:
|
|
290
|
-
}, I(f.addButtonText), 3)) :
|
|
291
|
-
], 2)) :
|
|
286
|
+
class: s(o(x).menu__addButton),
|
|
287
|
+
onClick: A
|
|
288
|
+
}, I(f.addButtonText), 3)) : z("", !0)
|
|
289
|
+
], 2)) : z("", !0),
|
|
292
290
|
y("ul", {
|
|
293
|
-
class: s(o(
|
|
291
|
+
class: s(o(x).menu__itemContainer)
|
|
294
292
|
}, [
|
|
295
|
-
(p(!0), m(pe, null, he(
|
|
296
|
-
key: `${
|
|
293
|
+
(p(!0), m(pe, null, he(H, ($, N) => (p(), m("li", {
|
|
294
|
+
key: `${$.value}-${N}`,
|
|
297
295
|
class: s([
|
|
298
|
-
o(
|
|
296
|
+
o(x).menu__item,
|
|
299
297
|
{
|
|
300
|
-
[o(
|
|
298
|
+
[o(x)["menu__item--active"]]: l.value && $.value === l.value.value
|
|
301
299
|
}
|
|
302
300
|
]),
|
|
303
|
-
onClick: (
|
|
304
|
-
}, I(
|
|
301
|
+
onClick: (X) => re($)
|
|
302
|
+
}, I($.text), 11, pt))), 128))
|
|
305
303
|
], 2)
|
|
306
304
|
], 6)), [
|
|
307
|
-
[
|
|
305
|
+
[Ve, e.value],
|
|
308
306
|
[o(r), se.value]
|
|
309
307
|
])
|
|
310
308
|
], 64));
|
|
311
309
|
}
|
|
312
|
-
}),
|
|
310
|
+
}), ct = ["fill", "height", "width"], dt = ["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, dt)
|
|
328
|
+
], 8, ct));
|
|
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", wt = "_container__default_smuz7_209", gt = "_container__warning_smuz7_217", ht = "_container__alert_smuz7_225", yt = "_container__success_smuz7_233", zt = "_spinner_smuz7_1", ue = {
|
|
336
|
+
container: bt,
|
|
337
|
+
container__text: vt,
|
|
338
|
+
container__default: wt,
|
|
339
|
+
container__warning: gt,
|
|
340
|
+
container__alert: ht,
|
|
341
|
+
container__success: yt,
|
|
342
|
+
spinner: zt
|
|
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
|
+
}), xt = "_button__size_default_wlx30_1", $t = "_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", V = {
|
|
378
|
+
button__size_default: xt,
|
|
379
|
+
button__size_small: $t,
|
|
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: {},
|
|
@@ -419,47 +415,46 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
419
415
|
d.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(V).segmentGroup,
|
|
419
|
+
o(V)[`segmentGroup--${e.align}`],
|
|
420
|
+
{ [o(V).fill]: e.fill }
|
|
425
421
|
])
|
|
426
422
|
}, [
|
|
427
423
|
(p(!0), m(pe, null, he(d.value, (b, c) => (p(), m("button", {
|
|
428
424
|
key: `${b.value}-${c}`,
|
|
429
425
|
class: s([
|
|
430
|
-
o(
|
|
431
|
-
o(
|
|
432
|
-
o(
|
|
433
|
-
o(
|
|
426
|
+
o(V).button,
|
|
427
|
+
o(V)[`button--${e.color}`],
|
|
428
|
+
o(V)[`button__size_${e.size}`],
|
|
429
|
+
o(V).fill,
|
|
434
430
|
{
|
|
435
|
-
[o(
|
|
431
|
+
[o(V)["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"])) : z("", !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(V).button__label)
|
|
444
|
+
}, I(b.label), 3)) : z("", !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", Ht = "_wrapper__label_1gjtq_1", Vt = "_wrapper__errorMessage_1gjtq_1", Lt = "_wrapper__counter_1gjtq_1", Ot = "_wrapper_1gjtq_1", Nt = "_wrapper__bottom_1gjtq_241", Et = "_spinner_1gjtq_1", L = {
|
|
449
|
+
wrapper__field: Tt,
|
|
450
|
+
wrapper__label: Ht,
|
|
451
|
+
wrapper__errorMessage: Vt,
|
|
452
|
+
wrapper__counter: Lt,
|
|
453
|
+
wrapper: Ot,
|
|
454
|
+
wrapper__bottom: Nt,
|
|
455
|
+
"wrapper--error": "_wrapper--error_1gjtq_254",
|
|
456
|
+
spinner: Et
|
|
457
|
+
}, Wt = ["for"], Dt = ["id", "maxlength", "name", "placeholder", "value"], At = ["id", "maxlength", "name", "placeholder", "value"], Co = /* @__PURE__ */ T({
|
|
463
458
|
__name: "TextInput",
|
|
464
459
|
props: {
|
|
465
460
|
id: {},
|
|
@@ -491,42 +486,42 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
491
486
|
}), (e, l) => {
|
|
492
487
|
var b;
|
|
493
488
|
return p(), m("div", {
|
|
494
|
-
class: s(o(
|
|
489
|
+
class: s(o(L).wrapper)
|
|
495
490
|
}, [
|
|
496
491
|
e.label ? (p(), m("label", {
|
|
497
492
|
key: 0,
|
|
498
|
-
class: s(o(
|
|
493
|
+
class: s(o(L).wrapper__label),
|
|
499
494
|
for: e.id
|
|
500
|
-
}, I(e.label), 11,
|
|
495
|
+
}, I(e.label), 11, Wt)) : z("", !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(L).wrapper__field,
|
|
508
503
|
{
|
|
509
|
-
[o(
|
|
504
|
+
[o(L)["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: q(e.maxHeight ? { maxHeight: `${e.maxHeight}px` } : void 0),
|
|
516
511
|
value: e.modelValue,
|
|
517
512
|
onBlur: l[0] || (l[0] = (c) => t("blur", c)),
|
|
518
513
|
onChange: l[1] || (l[1] = (c) => e.$emit("change", c)),
|
|
519
514
|
onFocus: l[2] || (l[2] = (c) => t("focus", c)),
|
|
520
515
|
onInput: d,
|
|
521
516
|
onPaste: l[3] || (l[3] = (c) => t("paste", c))
|
|
522
|
-
}, null, 46,
|
|
517
|
+
}, null, 46, Dt)) : (p(), m("input", {
|
|
523
518
|
key: 2,
|
|
524
519
|
id: e.id,
|
|
525
520
|
type: "text",
|
|
526
521
|
class: s([
|
|
527
|
-
o(
|
|
522
|
+
o(L).wrapper__field,
|
|
528
523
|
{
|
|
529
|
-
[o(
|
|
524
|
+
[o(L)["wrapper--error"]]: e.error
|
|
530
525
|
}
|
|
531
526
|
]),
|
|
532
527
|
maxlength: e.maxLength,
|
|
@@ -538,35 +533,34 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
538
533
|
onFocus: l[6] || (l[6] = (c) => t("focus", c)),
|
|
539
534
|
onInput: d,
|
|
540
535
|
onPaste: l[7] || (l[7] = (c) => t("paste", c))
|
|
541
|
-
}, null, 42,
|
|
536
|
+
}, null, 42, At)),
|
|
542
537
|
y("div", {
|
|
543
|
-
class: s(o(
|
|
538
|
+
class: s(o(L).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(L).wrapper__errorMessage)
|
|
543
|
+
}, I(e.error), 3)) : z("", !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(L).wrapper__counter)
|
|
547
|
+
}, I(((b = e.modelValue) == null ? void 0 : b.toString().length) || 0), 3)) : z("", !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
|
+
}), Rt = "_wrapper__label_1wzvv_1", Gt = "_wrapper__errorMessage_1wzvv_1", Yt = "_wrapper__counter_1wzvv_1", Xt = "_wrapper_1wzvv_1", jt = "_wrapper__field_1wzvv_8", Ft = "_wrapper__size_default_1wzvv_205", qt = "_wrapper__size_small_1wzvv_208", Ut = "_wrapper__bottom_1wzvv_245", Qt = "_spinner_1wzvv_1", E = {
|
|
553
|
+
wrapper__label: Rt,
|
|
554
|
+
wrapper__errorMessage: Gt,
|
|
555
|
+
wrapper__counter: Yt,
|
|
556
|
+
wrapper: Xt,
|
|
557
|
+
wrapper__field: jt,
|
|
558
|
+
wrapper__size_default: Ft,
|
|
559
|
+
wrapper__size_small: qt,
|
|
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: {},
|
|
@@ -599,20 +593,20 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
599
593
|
return (e, l) => {
|
|
600
594
|
var b;
|
|
601
595
|
return p(), m("div", {
|
|
602
|
-
class: s([o(
|
|
596
|
+
class: s([o(E).wrapper, o(E)[`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(E).wrapper__label),
|
|
607
601
|
for: e.id
|
|
608
|
-
}, I(e.label), 11,
|
|
602
|
+
}, I(e.label), 11, Zt)) : z("", !0),
|
|
609
603
|
y("input", {
|
|
610
604
|
id: e.id,
|
|
611
605
|
type: "number",
|
|
612
606
|
class: s([
|
|
613
|
-
o(
|
|
607
|
+
o(E).wrapper__field,
|
|
614
608
|
{
|
|
615
|
-
[o(
|
|
609
|
+
[o(E)["wrapper--error"]]: e.error || e.errorStatus
|
|
616
610
|
}
|
|
617
611
|
]),
|
|
618
612
|
max: e.max,
|
|
@@ -626,32 +620,31 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
626
620
|
onFocus: l[1] || (l[1] = (c) => t("focus", c)),
|
|
627
621
|
onInput: _,
|
|
628
622
|
onPaste: l[2] || (l[2] = (c) => t("paste", c))
|
|
629
|
-
}, null, 42,
|
|
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(E).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(E).wrapper__errorMessage)
|
|
631
|
+
}, I(e.error), 3)) : z("", !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(E).wrapper__counter)
|
|
635
|
+
}, I(((b = e.modelValue) == null ? void 0 : b.toString().length) || 0), 3)) : z("", !0)
|
|
636
|
+
], 2)) : z("", !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", F = {
|
|
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: {},
|
|
@@ -681,46 +674,45 @@ const Oe = "_button__size_default_1vdmr_1", Ne = "_button__size_small_1vdmr_8",
|
|
|
681
674
|
disabled: _.disabled,
|
|
682
675
|
name: _.name,
|
|
683
676
|
onClick: a
|
|
684
|
-
}, null, 10,
|
|
677
|
+
}, null, 10, ao),
|
|
685
678
|
y("label", {
|
|
686
679
|
class: s(o(F).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_1wiz4_1", io = "_wrapper_1wiz4_1", uo = "_wrapper__icon_1wiz4_204", po = "_wrapper__text_1wiz4_287", co = "_spinner_1wiz4_1", W = {
|
|
689
|
+
wrapper__box: _o,
|
|
690
|
+
wrapper: io,
|
|
691
|
+
wrapper__icon: uo,
|
|
692
|
+
"wrapper__box_bottom-start": "_wrapper__box_bottom-start_1wiz4_219",
|
|
693
|
+
"wrapper__box_bottom-center": "_wrapper__box_bottom-center_1wiz4_225",
|
|
694
|
+
"wrapper__box_bottom-end": "_wrapper__box_bottom-end_1wiz4_231",
|
|
695
|
+
"wrapper__box_top-start": "_wrapper__box_top-start_1wiz4_237",
|
|
696
|
+
"wrapper__box_top-center": "_wrapper__box_top-center_1wiz4_243",
|
|
697
|
+
"wrapper__box_top-end": "_wrapper__box_top-end_1wiz4_249",
|
|
698
|
+
"wrapper__box_right-start": "_wrapper__box_right-start_1wiz4_255",
|
|
699
|
+
"wrapper__box_right-center": "_wrapper__box_right-center_1wiz4_261",
|
|
700
|
+
"wrapper__box_right-end": "_wrapper__box_right-end_1wiz4_267",
|
|
701
|
+
"wrapper__box_left-start": "_wrapper__box_left-start_1wiz4_272",
|
|
702
|
+
"wrapper__box_left-center": "_wrapper__box_left-center_1wiz4_277",
|
|
703
|
+
"wrapper__box_left-end": "_wrapper__box_left-end_1wiz4_282",
|
|
704
|
+
wrapper__text: po,
|
|
705
|
+
"wrapper__box-content": "_wrapper__box-content_1wiz4_316",
|
|
706
|
+
"bottom-entrance": "_bottom-entrance_1wiz4_329",
|
|
707
|
+
"top-entrance": "_top-entrance_1wiz4_332",
|
|
708
|
+
"left-entrance": "_left-entrance_1wiz4_335",
|
|
709
|
+
"right-entrance": "_right-entrance_1wiz4_338",
|
|
710
|
+
"bottom-leave": "_bottom-leave_1wiz4_341",
|
|
711
|
+
"top-leave": "_top-leave_1wiz4_344",
|
|
712
|
+
"right-leave": "_right-leave_1wiz4_347",
|
|
713
|
+
"left-leave": "_left-leave_1wiz4_350",
|
|
714
|
+
spinner: co
|
|
715
|
+
}, mo = ["id"], fo = ["innerHTML"], Po = /* @__PURE__ */ T({
|
|
724
716
|
__name: "Tooltip",
|
|
725
717
|
props: {
|
|
726
718
|
id: {},
|
|
@@ -739,190 +731,189 @@ 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"), d = v(!1), e = v(""), l = v(!1), b = v(!1), c = v(""), P = v("d-n"),
|
|
734
|
+
const n = u, r = v(null), t = v("center"), a = v("bottom"), _ = v("center"), d = v(!1), e = v(""), l = v(!1), b = v(!1), c = v(""), P = v("d-n"), H = v(null), B = v(null), G = v(null), S = C(() => n.staticPosition.split(" ")[0]), O = C(() => n.staticPosition.split(" ")[1]), Z = C(() => n.iconName ? "mt-1" : "mt-0"), re = C(() => n.preventXss ? so(n.text) : n.text), A = C(() => n.absolutePositionStatus ? n.absoluteTrianglePosition : n.dynamicPosition && d.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 || c.value === "icon" && l.value ? "opa-1" : "opa-0"), J = C(() => n.absolutePositionStatus ? n.absoluteTriangleAlignment : n.dynamicPosition && d.value ? t.value === "center" ? "center" : t.value === "end" ? "end" : t.value === "start" ? "start" : _.value : O.value === "center" ? "center" : O.value === "left" || O.value === "top" ? "start" : O.value === "right" || O.value === "bottom" ? "end" : "center"), le = C(() => n.absolutePositionStatus ? "" : n.dynamicPosition && d.value ? W[`wrapper__box_${a.value}-${t.value}`] : W[`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:
|
|
736
|
+
} : A.value === "top" || A.value === "bottom" ? {
|
|
737
|
+
[`margin-${A.value}`]: `${n.offsetY}px`
|
|
738
|
+
} : { [`margin-${A.value}`]: `${n.offsetX}px` }), se = (i) => {
|
|
739
|
+
const { offsetTop: g, offsetLeft: h, offsetWidth: M, offsetHeight: j } = i, R = g + j, ie = h + M;
|
|
748
740
|
return {
|
|
749
|
-
top:
|
|
741
|
+
top: g,
|
|
750
742
|
left: h,
|
|
751
743
|
width: M,
|
|
752
|
-
bottom:
|
|
744
|
+
bottom: R,
|
|
753
745
|
right: ie
|
|
754
746
|
};
|
|
755
|
-
}, f = (i,
|
|
747
|
+
}, f = (i, g, 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 }, j = B.value.offsetHeight, R = window.innerWidth, ie = window.innerHeight, de = i.offsetHeight, te = i.offsetWidth || 264, k = g && se(g) || 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 < R, Be = me + k.width / 2 - (te + n.offsetX) > 10, Pe = fe + de < ie - n.offsetY, Me = fe - (de + j + n.offsetY) > 0;
|
|
759
751
|
let be = !1;
|
|
760
|
-
return n.iconName && (be =
|
|
752
|
+
return n.iconName && (be = k.right + te / 2 < R && k.left - (te + n.offsetX) / 2 >= 10), {
|
|
761
753
|
left: Be,
|
|
762
754
|
right: Ie,
|
|
763
755
|
bottom: Pe,
|
|
764
756
|
top: Me,
|
|
765
757
|
center: be
|
|
766
758
|
};
|
|
767
|
-
},
|
|
768
|
-
|
|
769
|
-
var
|
|
759
|
+
}, w = () => {
|
|
760
|
+
ge(() => {
|
|
761
|
+
var R;
|
|
770
762
|
d.value = !0;
|
|
771
|
-
const { bottom: i, left:
|
|
772
|
-
|
|
773
|
-
(
|
|
763
|
+
const { bottom: i, left: g, right: h, top: M, center: j } = f(
|
|
764
|
+
G.value,
|
|
765
|
+
(R = G.value) == null ? void 0 : R.parentNode
|
|
774
766
|
);
|
|
775
|
-
if (
|
|
767
|
+
if (j) {
|
|
776
768
|
t.value = "center", a.value = i && !M ? "bottom" : "top";
|
|
777
769
|
return;
|
|
778
770
|
}
|
|
779
|
-
if (i &&
|
|
771
|
+
if (i && g && h && M) {
|
|
780
772
|
t.value = "center", a.value = "top";
|
|
781
773
|
return;
|
|
782
774
|
}
|
|
783
775
|
if (M && !i) {
|
|
784
|
-
if (h &&
|
|
776
|
+
if (h && g) {
|
|
785
777
|
t.value = "center", a.value = "top";
|
|
786
778
|
return;
|
|
787
779
|
}
|
|
788
|
-
if (h && !
|
|
780
|
+
if (h && !g) {
|
|
789
781
|
t.value = "start", a.value = "top";
|
|
790
782
|
return;
|
|
791
783
|
}
|
|
792
|
-
if (!h &&
|
|
784
|
+
if (!h && g) {
|
|
793
785
|
t.value = "end", a.value = "top";
|
|
794
786
|
return;
|
|
795
787
|
}
|
|
796
788
|
}
|
|
797
789
|
if (i && M) {
|
|
798
|
-
if (!h &&
|
|
790
|
+
if (!h && g) {
|
|
799
791
|
t.value = "end", a.value = "top", _.value = "end";
|
|
800
792
|
return;
|
|
801
793
|
}
|
|
802
|
-
if (h && !
|
|
794
|
+
if (h && !g) {
|
|
803
795
|
t.value = "start", a.value = "top", _.value = "start";
|
|
804
796
|
return;
|
|
805
797
|
}
|
|
806
798
|
}
|
|
807
799
|
if (i && !M) {
|
|
808
|
-
if (h &&
|
|
800
|
+
if (h && g) {
|
|
809
801
|
t.value = "center", a.value = "bottom", _.value = "top";
|
|
810
802
|
return;
|
|
811
803
|
}
|
|
812
|
-
if (!h &&
|
|
804
|
+
if (!h && g) {
|
|
813
805
|
t.value = "end", a.value = "bottom", _.value = "top";
|
|
814
806
|
return;
|
|
815
807
|
}
|
|
816
|
-
h && !
|
|
808
|
+
h && !g && (t.value = "start", a.value = "bottom", _.value = "top");
|
|
817
809
|
}
|
|
818
810
|
});
|
|
819
|
-
},
|
|
811
|
+
}, $ = (i) => {
|
|
820
812
|
if (!(i instanceof HTMLElement))
|
|
821
813
|
return !1;
|
|
822
|
-
const
|
|
823
|
-
return
|
|
824
|
-
},
|
|
825
|
-
const
|
|
826
|
-
return !i ||
|
|
827
|
-
},
|
|
814
|
+
const g = i.scrollHeight > i.offsetHeight, h = window.getComputedStyle(i).overflowY, M = ["auto", "scroll"].includes(h);
|
|
815
|
+
return g && M;
|
|
816
|
+
}, N = (i) => {
|
|
817
|
+
const g = (i == null ? void 0 : i.nodeType) === Node.COMMENT_NODE, h = (i == null ? void 0 : i.nodeType) === Node.DOCUMENT_NODE;
|
|
818
|
+
return !i || g || h ? document : $(i) ? i : N(i.parentNode);
|
|
819
|
+
}, X = () => {
|
|
828
820
|
var i;
|
|
829
|
-
(i =
|
|
821
|
+
(i = H.value) == null || i.removeEventListener("scroll", w), window == null || window.removeEventListener("resize", w);
|
|
830
822
|
}, ee = () => {
|
|
831
|
-
|
|
823
|
+
ge(() => {
|
|
832
824
|
var i;
|
|
833
|
-
|
|
825
|
+
H.value = N(B.value), (i = H.value) == null || i.addEventListener("scroll", w), window == null || window.addEventListener("resize", w);
|
|
834
826
|
});
|
|
835
|
-
},
|
|
827
|
+
}, xe = () => {
|
|
836
828
|
c.value = "wrapper", P.value = "d-b", l.value = !0;
|
|
837
829
|
}, _e = () => {
|
|
838
830
|
c.value = "icon", P.value = "d-b", b.value = !0;
|
|
839
|
-
},
|
|
831
|
+
}, $e = () => {
|
|
840
832
|
b.value = !1;
|
|
841
|
-
},
|
|
833
|
+
}, ke = () => {
|
|
842
834
|
c.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 = () => {
|
|
848
|
-
|
|
840
|
+
xe(), w(), 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(() => {
|
|
849
841
|
e.value = "";
|
|
850
842
|
}, 250);
|
|
851
843
|
};
|
|
852
844
|
return ce(() => {
|
|
853
845
|
n.dynamicPosition && ee();
|
|
854
|
-
}),
|
|
855
|
-
|
|
856
|
-
}), (i,
|
|
846
|
+
}), Le(() => {
|
|
847
|
+
X();
|
|
848
|
+
}), (i, g) => (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(W).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(W).wrapper__icon),
|
|
869
861
|
name: i.iconName,
|
|
870
862
|
onMouseenter: _e,
|
|
871
|
-
onMouseleave:
|
|
863
|
+
onMouseleave: $e
|
|
872
864
|
}, null, 8, ["class", "name"])) : (p(), m("div", {
|
|
873
865
|
key: 1,
|
|
874
|
-
class: s(o(
|
|
866
|
+
class: s(o(W).wrapper__icon),
|
|
875
867
|
onMouseenter: _e,
|
|
876
868
|
onMouseleave: _e
|
|
877
869
|
}, [
|
|
878
|
-
|
|
870
|
+
D(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: G,
|
|
876
|
+
class: s([o(W).wrapper__box, le.value, ae.value, P.value]),
|
|
877
|
+
style: q(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": A.value,
|
|
883
|
+
class: s([o(W)["wrapper__box-content"], Z.value, e.value]),
|
|
884
|
+
style: q(K.value)
|
|
893
885
|
}, {
|
|
894
|
-
default:
|
|
886
|
+
default: ze(() => [
|
|
895
887
|
y("div", {
|
|
896
|
-
class: s(o(
|
|
897
|
-
style:
|
|
888
|
+
class: s(o(W).wrapper__text),
|
|
889
|
+
style: q({ 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
|
+
D(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)) : z("", !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", wo = "_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: wo
|
|
916
|
+
}, go = /* @__PURE__ */ T({
|
|
926
917
|
__name: "DefaultBox",
|
|
927
918
|
props: {
|
|
928
919
|
border: {},
|
|
@@ -943,10 +934,10 @@ const bo = "_wrapper__box_49orz_1", vo = "_icon_49orz_129", go = "_spinner_49orz
|
|
|
943
934
|
class: s([o(ne).box, a.value, d.border, d.borderRadius]),
|
|
944
935
|
onClick: _
|
|
945
936
|
}, [
|
|
946
|
-
|
|
937
|
+
D(d.$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
|
+
D(n.$slots, "front")
|
|
963
954
|
], 2),
|
|
964
955
|
y("div", {
|
|
965
956
|
class: s([n.boxSpacing])
|
|
966
957
|
}, [
|
|
967
|
-
|
|
958
|
+
D(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: go,
|
|
975
|
+
flip: ho
|
|
985
976
|
};
|
|
986
|
-
return (r, t) => (p(),
|
|
977
|
+
return (r, t) => (p(), U(Oe(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: ze(() => [
|
|
984
|
+
D(r.$slots, "default"),
|
|
985
|
+
D(r.$slots, "front"),
|
|
986
|
+
D(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
|
+
xo as Button,
|
|
995
|
+
$o 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
|