@useinsider/ab-components 0.0.4 → 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-B75sSsx4.js → FilledCautionTriangle-9QyBhSi7.js} +2 -2
- package/dist/{FilledCautionTriangle-B75sSsx4.js.map → FilledCautionTriangle-9QyBhSi7.js.map} +1 -1
- package/dist/{FilledCheckCircle-KVwpT9RS.js → FilledCheckCircle-15ZPFqd5.js} +2 -2
- package/dist/{FilledCheckCircle-KVwpT9RS.js.map → FilledCheckCircle-15ZPFqd5.js.map} +1 -1
- package/dist/{FilledErrorBox-Dpe6OZUM.js → FilledErrorBox-DGTE886c.js} +2 -2
- package/dist/{FilledErrorBox-Dpe6OZUM.js.map → FilledErrorBox-DGTE886c.js.map} +1 -1
- package/dist/{FilledInfoCircle-BY63hzfn.js → FilledInfoCircle-_USduuvj.js} +2 -2
- package/dist/{FilledInfoCircle-BY63hzfn.js.map → FilledInfoCircle-_USduuvj.js.map} +1 -1
- package/dist/{LineCheck-BfCAWbdB.js → LineCheck-CVrhEwk5.js} +2 -2
- package/dist/{LineCheck-BfCAWbdB.js.map → LineCheck-CVrhEwk5.js.map} +1 -1
- package/dist/{LoadingCircle-tXgyfHxd.js → LoadingCircle-deLhi_eq.js} +2 -2
- package/dist/{LoadingCircle-tXgyfHxd.js.map → LoadingCircle-deLhi_eq.js.map} +1 -1
- package/dist/{SmartIcon-QK_6bafK.js → SmartIcon-DHAl1wBH.js} +2 -2
- package/dist/{SmartIcon-QK_6bafK.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-cklZdQqm.js → index-B76cJgwE.js} +176 -176
- package/dist/index-B76cJgwE.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
- package/dist/index-cklZdQqm.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(),
|
|
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
|
-
modelValue: {},
|
|
130
|
+
modelValue: { default: "" },
|
|
131
131
|
menuHeight: { default: 154 },
|
|
132
132
|
placeholder: {},
|
|
133
133
|
addable: { type: Boolean },
|
|
@@ -139,11 +139,11 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
139
139
|
},
|
|
140
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
145
|
const { offsetTop: p, offsetLeft: b, offsetWidth: g } = m.value, P = window.innerHeight, j = p + m.value.offsetHeight, R = j + t.menuHeight > P;
|
|
146
|
-
|
|
146
|
+
$.value = {
|
|
147
147
|
x: b + window.scrollX,
|
|
148
148
|
y: R ? p + window.scrollY : j + window.scrollY,
|
|
149
149
|
width: g,
|
|
@@ -153,52 +153,52 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
153
153
|
}, A = () => {
|
|
154
154
|
O(), n.value = !n.value;
|
|
155
155
|
}, E = () => {
|
|
156
|
-
c.value = null, y.value = "",
|
|
156
|
+
c.value = null, y.value = "", V.value = [...M.value];
|
|
157
157
|
}, N = () => {
|
|
158
158
|
n.value = !1, E();
|
|
159
159
|
}, Y = (p) => {
|
|
160
|
-
o.value = p,
|
|
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
183
|
if (O(), t.modelValue) {
|
|
184
|
-
const p =
|
|
184
|
+
const p = M.value.find((b) => b.value === t.modelValue);
|
|
185
185
|
p && (o.value = p);
|
|
186
186
|
}
|
|
187
187
|
});
|
|
188
|
-
const W =
|
|
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:
|
|
209
|
+
I("span", {
|
|
210
|
+
class: a(e(h).dropdown__value)
|
|
211
211
|
}, v(W.value), 3),
|
|
212
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
281
|
[e(h)["menu__item--active"]]: o.value && g.value === o.value.value
|
|
282
282
|
}
|
|
283
283
|
]),
|
|
284
284
|
onClick: (P) => Y(g)
|
|
285
|
-
}, v(g.text), 11,
|
|
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
|
-
},
|
|
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
325
|
container__success: Ee
|
|
326
|
-
},
|
|
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,22 +342,22 @@ 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
|
-
}), 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",
|
|
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
361
|
button__size_default: Ne,
|
|
362
362
|
button__size_small: We,
|
|
363
363
|
button: Pe,
|
|
@@ -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(
|
|
398
|
+
(s(!0), d(F, null, U(l.segments, (o) => (s(), d("button", {
|
|
399
399
|
key: o.value,
|
|
400
|
-
class:
|
|
401
|
-
e(
|
|
402
|
-
e(
|
|
403
|
-
e(
|
|
404
|
-
e(
|
|
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: o.disabled ||
|
|
409
|
+
disabled: o.disabled || r.disabled,
|
|
410
410
|
onClick: (y) => m(o)
|
|
411
411
|
}, [
|
|
412
|
-
o.icon ? (s(),
|
|
412
|
+
o.icon ? (s(), S(e(H), {
|
|
413
413
|
key: 0,
|
|
414
414
|
name: o.icon
|
|
415
415
|
}, null, 8, ["name"])) : f("", !0),
|
|
416
416
|
o.label ? (s(), d("span", {
|
|
417
417
|
key: 1,
|
|
418
|
-
class:
|
|
418
|
+
class: a(e(k).button__label)
|
|
419
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 },
|
|
@@ -445,13 +445,13 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
445
445
|
},
|
|
446
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
|
-
},
|
|
454
|
+
}, l = (n) => {
|
|
455
455
|
const o = n.target;
|
|
456
456
|
t("input", n), t("update:modelValue", o.value), m();
|
|
457
457
|
};
|
|
@@ -460,22 +460,22 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
460
460
|
}), (n, o) => {
|
|
461
461
|
var y;
|
|
462
462
|
return s(), d("div", {
|
|
463
|
-
class:
|
|
463
|
+
class: a(e(C).wrapper)
|
|
464
464
|
}, [
|
|
465
465
|
n.label ? (s(), d("label", {
|
|
466
466
|
key: 0,
|
|
467
|
-
class:
|
|
467
|
+
class: a(e(C).wrapper__label),
|
|
468
468
|
for: n.id
|
|
469
469
|
}, v(n.label), 11, Ke)) : f("", !0),
|
|
470
470
|
n.multiline ? (s(), d("textarea", {
|
|
471
471
|
key: 1,
|
|
472
472
|
id: n.id,
|
|
473
473
|
ref_key: "textareaRef",
|
|
474
|
-
ref:
|
|
475
|
-
class:
|
|
476
|
-
e(
|
|
474
|
+
ref: _,
|
|
475
|
+
class: a([
|
|
476
|
+
e(C).wrapper__field,
|
|
477
477
|
{
|
|
478
|
-
[e(
|
|
478
|
+
[e(C)["wrapper--error"]]: n.error
|
|
479
479
|
}
|
|
480
480
|
]),
|
|
481
481
|
maxlength: n.maxLength,
|
|
@@ -486,16 +486,16 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
486
486
|
onBlur: o[0] || (o[0] = (c) => t("blur", c)),
|
|
487
487
|
onChange: o[1] || (o[1] = (c) => n.$emit("change", c)),
|
|
488
488
|
onFocus: o[2] || (o[2] = (c) => t("focus", c)),
|
|
489
|
-
onInput:
|
|
489
|
+
onInput: l,
|
|
490
490
|
onPaste: o[3] || (o[3] = (c) => t("paste", c))
|
|
491
491
|
}, null, 46, et)) : (s(), d("input", {
|
|
492
492
|
key: 2,
|
|
493
493
|
id: n.id,
|
|
494
494
|
type: "text",
|
|
495
|
-
class:
|
|
496
|
-
e(
|
|
495
|
+
class: a([
|
|
496
|
+
e(C).wrapper__field,
|
|
497
497
|
{
|
|
498
|
-
[e(
|
|
498
|
+
[e(C)["wrapper--error"]]: n.error
|
|
499
499
|
}
|
|
500
500
|
]),
|
|
501
501
|
maxlength: n.maxLength,
|
|
@@ -505,19 +505,19 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
505
505
|
onBlur: o[4] || (o[4] = (c) => t("blur", c)),
|
|
506
506
|
onChange: o[5] || (o[5] = (c) => n.$emit("change", c)),
|
|
507
507
|
onFocus: o[6] || (o[6] = (c) => t("focus", c)),
|
|
508
|
-
onInput:
|
|
508
|
+
onInput: l,
|
|
509
509
|
onPaste: o[7] || (o[7] = (c) => t("paste", c))
|
|
510
510
|
}, null, 42, tt)),
|
|
511
|
-
|
|
512
|
-
class:
|
|
511
|
+
I("div", {
|
|
512
|
+
class: a(e(C).wrapper__bottom)
|
|
513
513
|
}, [
|
|
514
514
|
n.error ? (s(), d("div", {
|
|
515
515
|
key: 0,
|
|
516
|
-
class:
|
|
516
|
+
class: a(e(C).wrapper__errorMessage)
|
|
517
517
|
}, v(n.error), 3)) : f("", !0),
|
|
518
518
|
n.counter ? (s(), d("div", {
|
|
519
519
|
key: 1,
|
|
520
|
-
class:
|
|
520
|
+
class: a(e(C).wrapper__counter)
|
|
521
521
|
}, v(((y = n.modelValue) == null ? void 0 : y.toString().length) || 0), 3)) : f("", !0)
|
|
522
522
|
], 2)
|
|
523
523
|
], 2);
|
|
@@ -525,12 +525,12 @@ const oe = "_button__size_default_hp1t7_1", re = "_button__size_small_hp1t7_8",
|
|
|
525
525
|
}
|
|
526
526
|
});
|
|
527
527
|
export {
|
|
528
|
-
|
|
529
|
-
|
|
528
|
+
H as I,
|
|
529
|
+
He as _,
|
|
530
530
|
ot as a,
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
531
|
+
lt as b,
|
|
532
|
+
rt as c,
|
|
533
|
+
_t as d,
|
|
534
|
+
at as e
|
|
535
535
|
};
|
|
536
|
-
//# sourceMappingURL=index-
|
|
536
|
+
//# sourceMappingURL=index-B76cJgwE.js.map
|