@useinsider/ab-components 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{FilledCautionTriangle-Dxi1xHHx.js → FilledCautionTriangle-9QyBhSi7.js} +2 -2
- package/dist/{FilledCautionTriangle-Dxi1xHHx.js.map → FilledCautionTriangle-9QyBhSi7.js.map} +1 -1
- package/dist/{FilledCheckCircle-BZblXEJF.js → FilledCheckCircle-15ZPFqd5.js} +2 -2
- package/dist/{FilledCheckCircle-BZblXEJF.js.map → FilledCheckCircle-15ZPFqd5.js.map} +1 -1
- package/dist/{FilledErrorBox-Czq7e64W.js → FilledErrorBox-DGTE886c.js} +2 -2
- package/dist/{FilledErrorBox-Czq7e64W.js.map → FilledErrorBox-DGTE886c.js.map} +1 -1
- package/dist/{FilledInfoCircle-BC2xa2R2.js → FilledInfoCircle-_USduuvj.js} +2 -2
- package/dist/{FilledInfoCircle-BC2xa2R2.js.map → FilledInfoCircle-_USduuvj.js.map} +1 -1
- package/dist/{LineCheck-dIF58UgU.js → LineCheck-CVrhEwk5.js} +2 -2
- package/dist/{LineCheck-dIF58UgU.js.map → LineCheck-CVrhEwk5.js.map} +1 -1
- package/dist/{LoadingCircle-CoRfnES9.js → LoadingCircle-deLhi_eq.js} +2 -2
- package/dist/{LoadingCircle-CoRfnES9.js.map → LoadingCircle-deLhi_eq.js.map} +1 -1
- package/dist/{SmartIcon-m_MkAWvM.js → SmartIcon-DHAl1wBH.js} +2 -2
- package/dist/{SmartIcon-m_MkAWvM.js.map → SmartIcon-DHAl1wBH.js.map} +1 -1
- 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 +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/{index-BfxawNec.js → index-B76cJgwE.js} +209 -208
- package/dist/index-B76cJgwE.js.map +1 -0
- package/dist/index.d.ts +7 -2
- package/package.json +1 -1
- package/dist/index-BfxawNec.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const oe = "_button__size_default_hp1t7_1",
|
|
1
|
+
import { defineComponent as B, computed as L, openBlock as s, createElementBlock as d, normalizeClass as a, unref as e, createBlock as S, createCommentVNode as f, toDisplayString as v, ref as w, onMounted as D, Fragment as F, createElementVNode as I, withDirectives as T, normalizeStyle as G, withModifiers as K, vModelText as ee, renderList as U, defineAsyncComponent as x, resolveDynamicComponent as te, createVNode as ne } from "vue";
|
|
2
|
+
const oe = "_button__size_default_hp1t7_1", le = "_button__size_small_hp1t7_8", re = "_button_hp1t7_1", _e = "_button__label_hp1t7_192", ae = "_button__solid_hp1t7_204", se = "_fill_hp1t7_1124", z = {
|
|
3
3
|
button__size_default: oe,
|
|
4
|
-
button__size_small:
|
|
5
|
-
button:
|
|
6
|
-
button__label:
|
|
4
|
+
button__size_small: le,
|
|
5
|
+
button: re,
|
|
6
|
+
button__label: _e,
|
|
7
7
|
"button__solid-primary": "_button__solid-primary_hp1t7_204",
|
|
8
8
|
"no-hover-effect": "_no-hover-effect_hp1t7_211",
|
|
9
9
|
"button--selected": "_button--selected_hp1t7_233",
|
|
@@ -31,9 +31,9 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
31
31
|
"button__outline-danger": "_button__outline-danger_hp1t7_999",
|
|
32
32
|
"button__outline-warning": "_button__outline-warning_hp1t7_1036",
|
|
33
33
|
"button__outline-smart": "_button__outline-smart_hp1t7_1073",
|
|
34
|
-
button__solid:
|
|
34
|
+
button__solid: ae,
|
|
35
35
|
fill: se
|
|
36
|
-
}, ue = ["disabled"], ot = /* @__PURE__ */
|
|
36
|
+
}, ue = ["disabled"], ot = /* @__PURE__ */ B({
|
|
37
37
|
__name: "Button",
|
|
38
38
|
props: {
|
|
39
39
|
variant: {},
|
|
@@ -49,38 +49,38 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
49
49
|
},
|
|
50
50
|
emits: ["click"],
|
|
51
51
|
setup(u, { emit: i }) {
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
}, m =
|
|
55
|
-
return (
|
|
56
|
-
class:
|
|
57
|
-
e(
|
|
58
|
-
e(
|
|
59
|
-
e(
|
|
60
|
-
e(
|
|
61
|
-
{ [e(
|
|
52
|
+
const r = u, t = i, _ = (l) => {
|
|
53
|
+
r.disabled || t("click", l);
|
|
54
|
+
}, m = L(() => r.loadingStatus ? "LoadingCircle" : r.successStatus ? "LineCheck" : r.leftIconName);
|
|
55
|
+
return (l, n) => (s(), d("button", {
|
|
56
|
+
class: a([
|
|
57
|
+
e(z).button,
|
|
58
|
+
e(z)[`button__${l.variant}`],
|
|
59
|
+
e(z)[`button__${l.variant}-${l.color}`],
|
|
60
|
+
e(z)[`button__size_${l.size}`],
|
|
61
|
+
{ [e(z).fill]: l.fill }
|
|
62
62
|
]),
|
|
63
|
-
disabled:
|
|
64
|
-
onClick:
|
|
63
|
+
disabled: r.disabled,
|
|
64
|
+
onClick: _
|
|
65
65
|
}, [
|
|
66
|
-
m.value ? (s(), S(e(
|
|
66
|
+
m.value ? (s(), S(e(H), {
|
|
67
67
|
key: 0,
|
|
68
68
|
name: m.value
|
|
69
69
|
}, null, 8, ["name"])) : f("", !0),
|
|
70
|
-
|
|
70
|
+
l.label ? (s(), d("span", {
|
|
71
71
|
key: 1,
|
|
72
|
-
class:
|
|
73
|
-
}, v(
|
|
74
|
-
|
|
72
|
+
class: a(e(z).button__label)
|
|
73
|
+
}, v(l.label), 3)) : f("", !0),
|
|
74
|
+
l.rightIconName ? (s(), S(e(H), {
|
|
75
75
|
key: 2,
|
|
76
|
-
name:
|
|
76
|
+
name: l.rightIconName
|
|
77
77
|
}, null, 8, ["name"])) : f("", !0)
|
|
78
78
|
], 10, ue));
|
|
79
79
|
}
|
|
80
80
|
}), ie = {
|
|
81
81
|
mounted(u, i) {
|
|
82
|
-
u.clickOutsideEvent = (
|
|
83
|
-
[u, ...i.value.exclude || []].some((
|
|
82
|
+
u.clickOutsideEvent = (r) => {
|
|
83
|
+
[u, ...i.value.exclude || []].some((_) => _ && (_ === r.target || _.contains(r.target))) || i.value.handler();
|
|
84
84
|
}, document.addEventListener("click", u.clickOutsideEvent);
|
|
85
85
|
},
|
|
86
86
|
unmounted(u) {
|
|
@@ -88,46 +88,46 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
88
88
|
}
|
|
89
89
|
}, de = (u, i) => {
|
|
90
90
|
var t;
|
|
91
|
-
let
|
|
92
|
-
for (const
|
|
93
|
-
if (
|
|
91
|
+
let r = 0;
|
|
92
|
+
for (const _ of u)
|
|
93
|
+
if (_.toLowerCase() === ((t = i[r]) == null ? void 0 : t.toLowerCase()) && r++, r === i.length)
|
|
94
94
|
return !0;
|
|
95
95
|
return !1;
|
|
96
|
-
}, ce = (u, i,
|
|
97
|
-
if (!
|
|
96
|
+
}, ce = (u, i, r) => {
|
|
97
|
+
if (!r.trim())
|
|
98
98
|
return u;
|
|
99
|
-
const t =
|
|
100
|
-
return u.filter((
|
|
101
|
-
const m = String(
|
|
99
|
+
const t = r.toLowerCase();
|
|
100
|
+
return u.filter((_) => {
|
|
101
|
+
const m = String(_[i]);
|
|
102
102
|
return de(m.toLowerCase(), t);
|
|
103
|
-
}).sort((
|
|
104
|
-
const
|
|
105
|
-
return
|
|
103
|
+
}).sort((_, m) => {
|
|
104
|
+
const l = String(_[i]).toLowerCase(), n = String(m[i]).toLowerCase();
|
|
105
|
+
return l === t ? -1 : n === t ? 1 : l.startsWith(t) && !n.startsWith(t) ? -1 : !l.startsWith(t) && n.startsWith(t) ? 1 : l.length - n.length;
|
|
106
106
|
});
|
|
107
|
-
}, pe = "
|
|
107
|
+
}, pe = "_dropdown_olekc_1", me = "_menu_olekc_1", he = "_dropdown__valueContent_olekc_182", be = "_dropdown__label_olekc_193", fe = "_dropdown__value_olekc_182", ve = "_dropdown__placeholder_olekc_200", ge = "_dropdown__arrowIcon_olekc_208", we = "_menu__searchContainer_olekc_223", ye = "_menu__searchInputWrap_olekc_227", ke = "_menu__searchInput_olekc_227", Ce = "_menu__errorMessage_olekc_249", Ie = "_menu__addButton_olekc_256", xe = "_menu__itemContainer_olekc_264", $e = "_menu__item_olekc_264", h = {
|
|
108
108
|
dropdown: pe,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
109
|
+
menu: me,
|
|
110
|
+
dropdown__valueContent: he,
|
|
111
|
+
"dropdown__valueContent--open": "_dropdown__valueContent--open_olekc_190",
|
|
112
|
+
dropdown__label: be,
|
|
113
|
+
dropdown__value: fe,
|
|
114
|
+
dropdown__placeholder: ve,
|
|
115
|
+
dropdown__arrowIcon: ge,
|
|
116
116
|
menu__searchContainer: we,
|
|
117
117
|
menu__searchInputWrap: ye,
|
|
118
|
-
menu__searchInput:
|
|
119
|
-
"menu__searchInput--error": "_menu__searchInput--
|
|
120
|
-
menu__errorMessage:
|
|
121
|
-
menu__addButton:
|
|
122
|
-
menu__itemContainer:
|
|
123
|
-
menu__item:
|
|
124
|
-
"menu__item--active": "_menu__item--
|
|
125
|
-
},
|
|
118
|
+
menu__searchInput: ke,
|
|
119
|
+
"menu__searchInput--error": "_menu__searchInput--error_olekc_246",
|
|
120
|
+
menu__errorMessage: Ce,
|
|
121
|
+
menu__addButton: Ie,
|
|
122
|
+
menu__itemContainer: xe,
|
|
123
|
+
menu__item: $e,
|
|
124
|
+
"menu__item--active": "_menu__item--active_olekc_302"
|
|
125
|
+
}, ze = ["for"], Be = ["placeholder"], Me = ["onClick"], lt = /* @__PURE__ */ B({
|
|
126
126
|
__name: "DropdownMenu",
|
|
127
127
|
props: {
|
|
128
128
|
id: {},
|
|
129
129
|
label: {},
|
|
130
|
-
|
|
130
|
+
modelValue: { default: "" },
|
|
131
131
|
menuHeight: { default: 154 },
|
|
132
132
|
placeholder: {},
|
|
133
133
|
addable: { type: Boolean },
|
|
@@ -137,68 +137,68 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
137
137
|
items: {},
|
|
138
138
|
validateAddItem: { type: Function, default: () => null }
|
|
139
139
|
},
|
|
140
|
-
emits: ["add-error", "item-added", "select-item"],
|
|
140
|
+
emits: ["update:modelValue", "add-error", "item-added", "select-item"],
|
|
141
141
|
setup(u, { emit: i }) {
|
|
142
|
-
const
|
|
142
|
+
const r = ie, t = u, _ = i, m = w(), l = w(), n = w(!1), o = w(null), y = w(""), c = w(null), $ = w({ x: 0, y: 0, width: 0, shouldOpenUp: !1, height: t.menuHeight }), V = w([...t.items]), M = w([...t.items]), O = () => {
|
|
143
143
|
if (!m.value)
|
|
144
144
|
return;
|
|
145
|
-
const { offsetTop: p, offsetLeft: b, offsetWidth: g } = m.value,
|
|
146
|
-
|
|
145
|
+
const { offsetTop: p, offsetLeft: b, offsetWidth: g } = m.value, P = window.innerHeight, j = p + m.value.offsetHeight, R = j + t.menuHeight > P;
|
|
146
|
+
$.value = {
|
|
147
147
|
x: b + window.scrollX,
|
|
148
|
-
y: R ? p + window.scrollY :
|
|
148
|
+
y: R ? p + window.scrollY : j + window.scrollY,
|
|
149
149
|
width: g,
|
|
150
150
|
shouldOpenUp: R,
|
|
151
151
|
height: t.menuHeight
|
|
152
152
|
};
|
|
153
153
|
}, A = () => {
|
|
154
154
|
O(), n.value = !n.value;
|
|
155
|
-
}, V = () => {
|
|
156
|
-
c.value = null, y.value = "", L.value = [...B.value];
|
|
157
155
|
}, E = () => {
|
|
158
|
-
|
|
156
|
+
c.value = null, y.value = "", V.value = [...M.value];
|
|
157
|
+
}, N = () => {
|
|
158
|
+
n.value = !1, E();
|
|
159
159
|
}, Y = (p) => {
|
|
160
|
-
|
|
160
|
+
o.value = p, _("select-item", p), _("update:modelValue", p.value), N();
|
|
161
161
|
}, Q = () => {
|
|
162
|
-
const p = y.value.trim(), b = t.validateAddItem(p,
|
|
162
|
+
const p = y.value.trim(), b = t.validateAddItem(p, M.value);
|
|
163
163
|
if (b) {
|
|
164
|
-
c.value = b,
|
|
164
|
+
c.value = b, _("add-error", b);
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
167
|
const g = {
|
|
168
168
|
text: p,
|
|
169
169
|
value: p
|
|
170
170
|
};
|
|
171
|
-
|
|
171
|
+
M.value.push(g), E(), _("item-added", g);
|
|
172
172
|
}, X = () => {
|
|
173
|
-
|
|
173
|
+
V.value = ce(M.value, "text", y.value);
|
|
174
174
|
}, Z = () => {
|
|
175
175
|
c.value = "";
|
|
176
|
-
}, J =
|
|
177
|
-
top:
|
|
178
|
-
left: `${
|
|
179
|
-
width: `${
|
|
176
|
+
}, J = L(() => ({
|
|
177
|
+
top: $.value.shouldOpenUp ? `${$.value.y - 10}px` : `${$.value.y}px`,
|
|
178
|
+
left: `${$.value.x}px`,
|
|
179
|
+
width: `${$.value.width}px`,
|
|
180
180
|
height: `${t.menuHeight}px`
|
|
181
181
|
}));
|
|
182
182
|
D(() => {
|
|
183
|
-
if (O(), t.
|
|
184
|
-
const p =
|
|
185
|
-
p && (
|
|
183
|
+
if (O(), t.modelValue) {
|
|
184
|
+
const p = M.value.find((b) => b.value === t.modelValue);
|
|
185
|
+
p && (o.value = p);
|
|
186
186
|
}
|
|
187
187
|
});
|
|
188
|
-
const
|
|
188
|
+
const W = L(() => o.value ? o.value.text : "");
|
|
189
189
|
return (p, b) => (s(), d(F, null, [
|
|
190
|
-
|
|
190
|
+
I("div", {
|
|
191
191
|
ref_key: "dropdownRef",
|
|
192
192
|
ref: m,
|
|
193
|
-
class:
|
|
193
|
+
class: a(e(h).dropdown)
|
|
194
194
|
}, [
|
|
195
195
|
p.label ? (s(), d("label", {
|
|
196
196
|
key: 0,
|
|
197
|
-
class:
|
|
197
|
+
class: a(e(h).dropdown__label),
|
|
198
198
|
for: p.id
|
|
199
|
-
}, v(p.label), 11,
|
|
200
|
-
|
|
201
|
-
class:
|
|
199
|
+
}, v(p.label), 11, ze)) : f("", !0),
|
|
200
|
+
I("button", {
|
|
201
|
+
class: a([
|
|
202
202
|
e(h).dropdown__valueContent,
|
|
203
203
|
{
|
|
204
204
|
[e(h)["dropdown__valueContent--open"]]: n.value
|
|
@@ -206,12 +206,12 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
206
206
|
]),
|
|
207
207
|
onClick: A
|
|
208
208
|
}, [
|
|
209
|
-
|
|
210
|
-
class:
|
|
211
|
-
}, v(
|
|
212
|
-
p.placeholder && !
|
|
209
|
+
I("span", {
|
|
210
|
+
class: a(e(h).dropdown__value)
|
|
211
|
+
}, v(W.value), 3),
|
|
212
|
+
p.placeholder && !W.value ? (s(), d("span", {
|
|
213
213
|
key: 0,
|
|
214
|
-
class:
|
|
214
|
+
class: a(e(h).dropdown__placeholder)
|
|
215
215
|
}, v(p.placeholder), 3)) : f("", !0),
|
|
216
216
|
(s(), d("svg", {
|
|
217
217
|
fill: "none",
|
|
@@ -219,9 +219,9 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
219
219
|
viewBox: "0 0 16 17",
|
|
220
220
|
width: "16",
|
|
221
221
|
xmlns: "http://www.w3.org/2000/svg",
|
|
222
|
-
class:
|
|
222
|
+
class: a(e(h).dropdown__arrowIcon)
|
|
223
223
|
}, b[2] || (b[2] = [
|
|
224
|
-
|
|
224
|
+
I("path", {
|
|
225
225
|
d: "M8 11.2021L4.5359 6.70215L11.4641 6.70215L8 11.2021Z",
|
|
226
226
|
fill: "#91949F"
|
|
227
227
|
}, null, -1)
|
|
@@ -231,22 +231,22 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
231
231
|
n.value ? T((s(), d("div", {
|
|
232
232
|
key: 0,
|
|
233
233
|
ref_key: "menuRef",
|
|
234
|
-
ref:
|
|
235
|
-
class:
|
|
234
|
+
ref: l,
|
|
235
|
+
class: a(e(h).menu),
|
|
236
236
|
style: G(J.value),
|
|
237
237
|
onClick: b[1] || (b[1] = K(() => {
|
|
238
238
|
}, ["prevent"]))
|
|
239
239
|
}, [
|
|
240
240
|
t.searchable ? (s(), d("div", {
|
|
241
241
|
key: 0,
|
|
242
|
-
class:
|
|
242
|
+
class: a(e(h).menu__searchContainer)
|
|
243
243
|
}, [
|
|
244
|
-
|
|
245
|
-
class:
|
|
244
|
+
I("div", {
|
|
245
|
+
class: a(e(h).menu__searchInputWrap)
|
|
246
246
|
}, [
|
|
247
|
-
T(
|
|
247
|
+
T(I("input", {
|
|
248
248
|
type: "text",
|
|
249
|
-
class:
|
|
249
|
+
class: a([
|
|
250
250
|
e(h).menu__searchInput,
|
|
251
251
|
{
|
|
252
252
|
[e(h)["menu__searchInput--error"]]: c.value
|
|
@@ -256,48 +256,48 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
256
256
|
"onUpdate:modelValue": b[0] || (b[0] = (g) => y.value = g),
|
|
257
257
|
onFocus: Z,
|
|
258
258
|
onInput: X
|
|
259
|
-
}, null, 42,
|
|
259
|
+
}, null, 42, Be), [
|
|
260
260
|
[ee, y.value]
|
|
261
261
|
]),
|
|
262
262
|
c.value ? (s(), d("p", {
|
|
263
263
|
key: 0,
|
|
264
|
-
class:
|
|
264
|
+
class: a(e(h).menu__errorMessage)
|
|
265
265
|
}, v(c.value), 3)) : f("", !0)
|
|
266
266
|
], 2),
|
|
267
267
|
t.addable ? (s(), d("button", {
|
|
268
268
|
key: 0,
|
|
269
|
-
class:
|
|
269
|
+
class: a(e(h).menu__addButton),
|
|
270
270
|
onClick: Q
|
|
271
271
|
}, v(p.addButtonText), 3)) : f("", !0)
|
|
272
272
|
], 2)) : f("", !0),
|
|
273
|
-
|
|
274
|
-
class:
|
|
273
|
+
I("ul", {
|
|
274
|
+
class: a(e(h).menu__itemContainer)
|
|
275
275
|
}, [
|
|
276
|
-
(s(!0), d(F, null, U(
|
|
276
|
+
(s(!0), d(F, null, U(V.value, (g) => (s(), d("li", {
|
|
277
277
|
key: g.value,
|
|
278
|
-
class:
|
|
278
|
+
class: a([
|
|
279
279
|
e(h).menu__item,
|
|
280
280
|
{
|
|
281
|
-
[e(h)["menu__item--active"]]:
|
|
281
|
+
[e(h)["menu__item--active"]]: o.value && g.value === o.value.value
|
|
282
282
|
}
|
|
283
283
|
]),
|
|
284
|
-
onClick: (
|
|
285
|
-
}, v(g.text), 11,
|
|
284
|
+
onClick: (P) => Y(g)
|
|
285
|
+
}, v(g.text), 11, Me))), 128))
|
|
286
286
|
], 2)
|
|
287
287
|
], 6)), [
|
|
288
|
-
[e(
|
|
288
|
+
[e(r), { handler: N, exclude: [m.value, l.value] }]
|
|
289
289
|
]) : f("", !0)
|
|
290
290
|
], 64));
|
|
291
291
|
}
|
|
292
|
-
}),
|
|
293
|
-
FilledErrorBox:
|
|
294
|
-
LineCheck:
|
|
295
|
-
FilledCheckCircle:
|
|
296
|
-
LoadingCircle:
|
|
297
|
-
FilledInfoCircle:
|
|
298
|
-
SmartIcon:
|
|
299
|
-
FilledCautionTriangle:
|
|
300
|
-
}, Se = /* @__PURE__ */
|
|
292
|
+
}), Le = {
|
|
293
|
+
FilledErrorBox: x(() => import("./FilledErrorBox-DGTE886c.js")),
|
|
294
|
+
LineCheck: x(() => import("./LineCheck-CVrhEwk5.js")),
|
|
295
|
+
FilledCheckCircle: x(() => import("./FilledCheckCircle-15ZPFqd5.js")),
|
|
296
|
+
LoadingCircle: x(() => import("./LoadingCircle-deLhi_eq.js")),
|
|
297
|
+
FilledInfoCircle: x(() => import("./FilledInfoCircle-_USduuvj.js")),
|
|
298
|
+
SmartIcon: x(() => import("./SmartIcon-DHAl1wBH.js")),
|
|
299
|
+
FilledCautionTriangle: x(() => import("./FilledCautionTriangle-9QyBhSi7.js"))
|
|
300
|
+
}, Se = /* @__PURE__ */ B({
|
|
301
301
|
__name: "Icon",
|
|
302
302
|
props: {
|
|
303
303
|
name: {},
|
|
@@ -305,32 +305,32 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
305
305
|
color: {}
|
|
306
306
|
},
|
|
307
307
|
setup(u) {
|
|
308
|
-
const i = u,
|
|
309
|
-
return (t,
|
|
308
|
+
const i = u, r = L(() => typeof i.size == "number" ? `${i.size}px` : i.size);
|
|
309
|
+
return (t, _) => (s(), S(te(e(Le)[t.name]), {
|
|
310
310
|
class: "icon",
|
|
311
|
-
style: G({ width:
|
|
311
|
+
style: G({ width: r.value, height: r.value, fill: i.color || "currentColor" })
|
|
312
312
|
}, null, 8, ["style"]));
|
|
313
313
|
}
|
|
314
|
-
}),
|
|
315
|
-
const
|
|
316
|
-
for (const [t,
|
|
317
|
-
|
|
318
|
-
return
|
|
319
|
-
},
|
|
320
|
-
container:
|
|
321
|
-
container__text:
|
|
314
|
+
}), He = (u, i) => {
|
|
315
|
+
const r = u.__vccOpts || u;
|
|
316
|
+
for (const [t, _] of i)
|
|
317
|
+
r[t] = _;
|
|
318
|
+
return r;
|
|
319
|
+
}, H = /* @__PURE__ */ He(Se, [["__scopeId", "data-v-3e9c3b20"]]), Ve = "_container_2joy4_1", qe = "_container__text_2joy4_187", Fe = "_container__default_2joy4_191", Ge = "_container__warning_2joy4_199", Oe = "_container__alert_2joy4_207", Ee = "_container__success_2joy4_215", q = {
|
|
320
|
+
container: Ve,
|
|
321
|
+
container__text: qe,
|
|
322
322
|
container__default: Fe,
|
|
323
323
|
container__warning: Ge,
|
|
324
324
|
container__alert: Oe,
|
|
325
|
-
container__success:
|
|
326
|
-
},
|
|
325
|
+
container__success: Ee
|
|
326
|
+
}, rt = /* @__PURE__ */ B({
|
|
327
327
|
__name: "OnPageMessage",
|
|
328
328
|
props: {
|
|
329
329
|
variant: { default: "default" },
|
|
330
330
|
text: {}
|
|
331
331
|
},
|
|
332
332
|
setup(u) {
|
|
333
|
-
const i = u,
|
|
333
|
+
const i = u, r = L(() => {
|
|
334
334
|
switch (i.variant) {
|
|
335
335
|
case "alert":
|
|
336
336
|
return "FilledErrorBox";
|
|
@@ -342,26 +342,26 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
342
342
|
return "FilledInfoCircle";
|
|
343
343
|
}
|
|
344
344
|
});
|
|
345
|
-
return (t,
|
|
346
|
-
class:
|
|
347
|
-
e(
|
|
348
|
-
e(
|
|
345
|
+
return (t, _) => (s(), d("div", {
|
|
346
|
+
class: a([
|
|
347
|
+
e(q).container,
|
|
348
|
+
e(q)[`container__${t.variant}`]
|
|
349
349
|
])
|
|
350
350
|
}, [
|
|
351
|
-
ne(
|
|
352
|
-
name:
|
|
351
|
+
ne(H, {
|
|
352
|
+
name: r.value,
|
|
353
353
|
size: 24
|
|
354
354
|
}, null, 8, ["name"]),
|
|
355
|
-
|
|
356
|
-
class:
|
|
355
|
+
I("span", {
|
|
356
|
+
class: a(e(q).container__text)
|
|
357
357
|
}, v(t.text), 3)
|
|
358
358
|
], 2));
|
|
359
359
|
}
|
|
360
|
-
}),
|
|
361
|
-
button__size_default:
|
|
362
|
-
button__size_small:
|
|
363
|
-
button:
|
|
364
|
-
button__label:
|
|
360
|
+
}), Ne = "_button__size_default_qxh1r_1", We = "_button__size_small_qxh1r_8", Pe = "_button_qxh1r_1", je = "_button__label_qxh1r_191", Re = "_button__solid_qxh1r_328", Te = "_segmentGroup_qxh1r_335", De = "_fill_qxh1r_357", k = {
|
|
361
|
+
button__size_default: Ne,
|
|
362
|
+
button__size_small: We,
|
|
363
|
+
button: Pe,
|
|
364
|
+
button__label: je,
|
|
365
365
|
"button--primary": "_button--primary_qxh1r_206",
|
|
366
366
|
"button--selected": "_button--selected_qxh1r_216",
|
|
367
367
|
"button--secondary": "_button--secondary_qxh1r_229",
|
|
@@ -373,7 +373,7 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
373
373
|
"segmentGroup--vertical": "_segmentGroup--vertical_qxh1r_338",
|
|
374
374
|
"segmentGroup--horizontal": "_segmentGroup--horizontal_qxh1r_347",
|
|
375
375
|
fill: De
|
|
376
|
-
}, Ue = ["disabled", "onClick"],
|
|
376
|
+
}, Ue = ["disabled", "onClick"], _t = /* @__PURE__ */ B({
|
|
377
377
|
__name: "SegmentButton",
|
|
378
378
|
props: {
|
|
379
379
|
color: {},
|
|
@@ -385,42 +385,42 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
385
385
|
},
|
|
386
386
|
emits: ["click"],
|
|
387
387
|
setup(u, { emit: i }) {
|
|
388
|
-
const
|
|
389
|
-
|
|
388
|
+
const r = u, t = i, _ = w(""), m = (l) => {
|
|
389
|
+
r.disabled || l.disabled || (_.value = l.value, t("click", l.value));
|
|
390
390
|
};
|
|
391
|
-
return (
|
|
392
|
-
class:
|
|
393
|
-
e(
|
|
394
|
-
e(
|
|
395
|
-
{ [e(
|
|
391
|
+
return (l, n) => (s(), d("div", {
|
|
392
|
+
class: a([
|
|
393
|
+
e(k).segmentGroup,
|
|
394
|
+
e(k)[`segmentGroup--${l.align}`],
|
|
395
|
+
{ [e(k).fill]: l.fill }
|
|
396
396
|
])
|
|
397
397
|
}, [
|
|
398
|
-
(s(!0), d(F, null, U(
|
|
399
|
-
key:
|
|
400
|
-
class:
|
|
401
|
-
e(
|
|
402
|
-
e(
|
|
403
|
-
e(
|
|
404
|
-
e(
|
|
398
|
+
(s(!0), d(F, null, U(l.segments, (o) => (s(), d("button", {
|
|
399
|
+
key: o.value,
|
|
400
|
+
class: a([
|
|
401
|
+
e(k).button,
|
|
402
|
+
e(k)[`button--${l.color}`],
|
|
403
|
+
e(k)[`button__size_${l.size}`],
|
|
404
|
+
e(k).fill,
|
|
405
405
|
{
|
|
406
|
-
[e(
|
|
406
|
+
[e(k)["button--selected"]]: o.value === _.value
|
|
407
407
|
}
|
|
408
408
|
]),
|
|
409
|
-
disabled:
|
|
410
|
-
onClick: (y) => m(
|
|
409
|
+
disabled: o.disabled || r.disabled,
|
|
410
|
+
onClick: (y) => m(o)
|
|
411
411
|
}, [
|
|
412
|
-
|
|
412
|
+
o.icon ? (s(), S(e(H), {
|
|
413
413
|
key: 0,
|
|
414
|
-
name:
|
|
414
|
+
name: o.icon
|
|
415
415
|
}, null, 8, ["name"])) : f("", !0),
|
|
416
|
-
|
|
416
|
+
o.label ? (s(), d("span", {
|
|
417
417
|
key: 1,
|
|
418
|
-
class:
|
|
419
|
-
}, v(
|
|
418
|
+
class: a(e(k).button__label)
|
|
419
|
+
}, v(o.label), 3)) : f("", !0)
|
|
420
420
|
], 10, Ue))), 128))
|
|
421
421
|
], 2));
|
|
422
422
|
}
|
|
423
|
-
}), Ae = "_wrapper_1pges_169", Ye = "_wrapper__field_1pges_174", Qe = "_wrapper__label_1pges_208", Xe = "_wrapper__bottom_1pges_216", Ze = "_wrapper__errorMessage_1pges_220", Je = "_wrapper__counter_1pges_225",
|
|
423
|
+
}), Ae = "_wrapper_1pges_169", Ye = "_wrapper__field_1pges_174", Qe = "_wrapper__label_1pges_208", Xe = "_wrapper__bottom_1pges_216", Ze = "_wrapper__errorMessage_1pges_220", Je = "_wrapper__counter_1pges_225", C = {
|
|
424
424
|
wrapper: Ae,
|
|
425
425
|
wrapper__field: Ye,
|
|
426
426
|
wrapper__label: Qe,
|
|
@@ -428,12 +428,12 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
428
428
|
wrapper__errorMessage: Ze,
|
|
429
429
|
wrapper__counter: Je,
|
|
430
430
|
"wrapper--error": "_wrapper--error_1pges_231"
|
|
431
|
-
}, Ke = ["for"], et = ["id", "maxlength", "name", "placeholder", "value"], tt = ["id", "maxlength", "name", "placeholder", "value"],
|
|
431
|
+
}, Ke = ["for"], et = ["id", "maxlength", "name", "placeholder", "value"], tt = ["id", "maxlength", "name", "placeholder", "value"], at = /* @__PURE__ */ B({
|
|
432
432
|
__name: "TextInput",
|
|
433
433
|
props: {
|
|
434
434
|
id: {},
|
|
435
435
|
name: {},
|
|
436
|
-
modelValue: {},
|
|
436
|
+
modelValue: { default: "" },
|
|
437
437
|
label: { default: "" },
|
|
438
438
|
placeholder: { default: "" },
|
|
439
439
|
maxLength: { default: void 0 },
|
|
@@ -443,38 +443,39 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
443
443
|
autoGrow: { type: Boolean, default: !1 },
|
|
444
444
|
counter: { type: Boolean }
|
|
445
445
|
},
|
|
446
|
-
emits: ["input", "change", "paste", "focus", "blur"],
|
|
446
|
+
emits: ["update:modelValue", "input", "change", "paste", "focus", "blur"],
|
|
447
447
|
setup(u, { emit: i }) {
|
|
448
|
-
const
|
|
449
|
-
if (
|
|
450
|
-
|
|
451
|
-
const n = Math.min(
|
|
452
|
-
|
|
448
|
+
const r = u, t = i, _ = w(null), m = () => {
|
|
449
|
+
if (r.autoGrow && _.value) {
|
|
450
|
+
_.value.style.height = "";
|
|
451
|
+
const n = Math.min(_.value.scrollHeight, r.maxHeight || _.value.scrollHeight);
|
|
452
|
+
_.value.style.height = `${n}px`;
|
|
453
453
|
}
|
|
454
|
-
},
|
|
455
|
-
|
|
454
|
+
}, l = (n) => {
|
|
455
|
+
const o = n.target;
|
|
456
|
+
t("input", n), t("update:modelValue", o.value), m();
|
|
456
457
|
};
|
|
457
458
|
return D(() => {
|
|
458
459
|
m();
|
|
459
|
-
}), (n,
|
|
460
|
+
}), (n, o) => {
|
|
460
461
|
var y;
|
|
461
462
|
return s(), d("div", {
|
|
462
|
-
class:
|
|
463
|
+
class: a(e(C).wrapper)
|
|
463
464
|
}, [
|
|
464
465
|
n.label ? (s(), d("label", {
|
|
465
466
|
key: 0,
|
|
466
|
-
class:
|
|
467
|
+
class: a(e(C).wrapper__label),
|
|
467
468
|
for: n.id
|
|
468
469
|
}, v(n.label), 11, Ke)) : f("", !0),
|
|
469
470
|
n.multiline ? (s(), d("textarea", {
|
|
470
471
|
key: 1,
|
|
471
472
|
id: n.id,
|
|
472
473
|
ref_key: "textareaRef",
|
|
473
|
-
ref:
|
|
474
|
-
class:
|
|
475
|
-
e(
|
|
474
|
+
ref: _,
|
|
475
|
+
class: a([
|
|
476
|
+
e(C).wrapper__field,
|
|
476
477
|
{
|
|
477
|
-
[e(
|
|
478
|
+
[e(C)["wrapper--error"]]: n.error
|
|
478
479
|
}
|
|
479
480
|
]),
|
|
480
481
|
maxlength: n.maxLength,
|
|
@@ -482,41 +483,41 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
482
483
|
placeholder: n.placeholder,
|
|
483
484
|
style: G(n.maxHeight ? { maxHeight: `${n.maxHeight}px` } : void 0),
|
|
484
485
|
value: n.modelValue,
|
|
485
|
-
onBlur:
|
|
486
|
-
onChange:
|
|
487
|
-
onFocus:
|
|
488
|
-
onInput:
|
|
489
|
-
onPaste:
|
|
486
|
+
onBlur: o[0] || (o[0] = (c) => t("blur", c)),
|
|
487
|
+
onChange: o[1] || (o[1] = (c) => n.$emit("change", c)),
|
|
488
|
+
onFocus: o[2] || (o[2] = (c) => t("focus", c)),
|
|
489
|
+
onInput: l,
|
|
490
|
+
onPaste: o[3] || (o[3] = (c) => t("paste", c))
|
|
490
491
|
}, null, 46, et)) : (s(), d("input", {
|
|
491
492
|
key: 2,
|
|
492
493
|
id: n.id,
|
|
493
494
|
type: "text",
|
|
494
|
-
class:
|
|
495
|
-
e(
|
|
495
|
+
class: a([
|
|
496
|
+
e(C).wrapper__field,
|
|
496
497
|
{
|
|
497
|
-
[e(
|
|
498
|
+
[e(C)["wrapper--error"]]: n.error
|
|
498
499
|
}
|
|
499
500
|
]),
|
|
500
501
|
maxlength: n.maxLength,
|
|
501
502
|
name: n.name,
|
|
502
503
|
placeholder: n.placeholder,
|
|
503
504
|
value: n.modelValue,
|
|
504
|
-
onBlur:
|
|
505
|
-
onChange:
|
|
506
|
-
onFocus:
|
|
507
|
-
onInput:
|
|
508
|
-
onPaste:
|
|
505
|
+
onBlur: o[4] || (o[4] = (c) => t("blur", c)),
|
|
506
|
+
onChange: o[5] || (o[5] = (c) => n.$emit("change", c)),
|
|
507
|
+
onFocus: o[6] || (o[6] = (c) => t("focus", c)),
|
|
508
|
+
onInput: l,
|
|
509
|
+
onPaste: o[7] || (o[7] = (c) => t("paste", c))
|
|
509
510
|
}, null, 42, tt)),
|
|
510
|
-
|
|
511
|
-
class:
|
|
511
|
+
I("div", {
|
|
512
|
+
class: a(e(C).wrapper__bottom)
|
|
512
513
|
}, [
|
|
513
514
|
n.error ? (s(), d("div", {
|
|
514
515
|
key: 0,
|
|
515
|
-
class:
|
|
516
|
+
class: a(e(C).wrapper__errorMessage)
|
|
516
517
|
}, v(n.error), 3)) : f("", !0),
|
|
517
518
|
n.counter ? (s(), d("div", {
|
|
518
519
|
key: 1,
|
|
519
|
-
class:
|
|
520
|
+
class: a(e(C).wrapper__counter)
|
|
520
521
|
}, v(((y = n.modelValue) == null ? void 0 : y.toString().length) || 0), 3)) : f("", !0)
|
|
521
522
|
], 2)
|
|
522
523
|
], 2);
|
|
@@ -524,12 +525,12 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
524
525
|
}
|
|
525
526
|
});
|
|
526
527
|
export {
|
|
527
|
-
|
|
528
|
-
|
|
528
|
+
H as I,
|
|
529
|
+
He as _,
|
|
529
530
|
ot as a,
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
531
|
+
lt as b,
|
|
532
|
+
rt as c,
|
|
533
|
+
_t as d,
|
|
534
|
+
at as e
|
|
534
535
|
};
|
|
535
|
-
//# sourceMappingURL=index-
|
|
536
|
+
//# sourceMappingURL=index-B76cJgwE.js.map
|