@useinsider/ab-components 0.0.1 → 0.0.2

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.
Files changed (41) hide show
  1. package/dist/{FilledCautionTriangle-DrK0oPPV.cjs → FilledCautionTriangle-0jUaB44V.cjs} +2 -2
  2. package/dist/{FilledCautionTriangle-DrK0oPPV.cjs.map → FilledCautionTriangle-0jUaB44V.cjs.map} +1 -1
  3. package/dist/{FilledCautionTriangle-cwRIOeCA.js → FilledCautionTriangle-ORbgUqfx.js} +2 -2
  4. package/dist/{FilledCautionTriangle-cwRIOeCA.js.map → FilledCautionTriangle-ORbgUqfx.js.map} +1 -1
  5. package/dist/{FilledCheckCircle-GM-5M2-K.cjs → FilledCheckCircle-DQLU1TQX.cjs} +2 -2
  6. package/dist/{FilledCheckCircle-GM-5M2-K.cjs.map → FilledCheckCircle-DQLU1TQX.cjs.map} +1 -1
  7. package/dist/{FilledCheckCircle-C_QbmDt7.js → FilledCheckCircle-DgwFiK4_.js} +2 -2
  8. package/dist/{FilledCheckCircle-C_QbmDt7.js.map → FilledCheckCircle-DgwFiK4_.js.map} +1 -1
  9. package/dist/{FilledErrorBox-BjD-Fb7J.js → FilledErrorBox-Bx6em6H-.js} +2 -2
  10. package/dist/{FilledErrorBox-BjD-Fb7J.js.map → FilledErrorBox-Bx6em6H-.js.map} +1 -1
  11. package/dist/{FilledErrorBox-AeXz9hB8.cjs → FilledErrorBox-CEqyivKn.cjs} +2 -2
  12. package/dist/{FilledErrorBox-AeXz9hB8.cjs.map → FilledErrorBox-CEqyivKn.cjs.map} +1 -1
  13. package/dist/{FilledInfoCircle-zRwS-Nz9.cjs → FilledInfoCircle-BMQIRi8R.cjs} +2 -2
  14. package/dist/{FilledInfoCircle-zRwS-Nz9.cjs.map → FilledInfoCircle-BMQIRi8R.cjs.map} +1 -1
  15. package/dist/{FilledInfoCircle-BIlBGYfB.js → FilledInfoCircle-cjamS6eU.js} +2 -2
  16. package/dist/{FilledInfoCircle-BIlBGYfB.js.map → FilledInfoCircle-cjamS6eU.js.map} +1 -1
  17. package/dist/{LineCheck-BS3C1-Sl.js → LineCheck-SMu9mSFJ.js} +2 -2
  18. package/dist/{LineCheck-BS3C1-Sl.js.map → LineCheck-SMu9mSFJ.js.map} +1 -1
  19. package/dist/{LineCheck-CXDtYarM.cjs → LineCheck-k-NrQe2a.cjs} +2 -2
  20. package/dist/{LineCheck-CXDtYarM.cjs.map → LineCheck-k-NrQe2a.cjs.map} +1 -1
  21. package/dist/{LoadingCircle-B9WqQlA9.cjs → LoadingCircle-B0ZkG3El.cjs} +2 -2
  22. package/dist/{LoadingCircle-B9WqQlA9.cjs.map → LoadingCircle-B0ZkG3El.cjs.map} +1 -1
  23. package/dist/{LoadingCircle-BsQ7G2K0.js → LoadingCircle-CnxCc6n9.js} +2 -2
  24. package/dist/{LoadingCircle-BsQ7G2K0.js.map → LoadingCircle-CnxCc6n9.js.map} +1 -1
  25. package/dist/{SmartIcon-DJGXMv63.js → SmartIcon-C5ZhgY9m.js} +2 -2
  26. package/dist/{SmartIcon-DJGXMv63.js.map → SmartIcon-C5ZhgY9m.js.map} +1 -1
  27. package/dist/{SmartIcon-D7zNmV22.cjs → SmartIcon-CSmtxUQk.cjs} +2 -2
  28. package/dist/{SmartIcon-D7zNmV22.cjs.map → SmartIcon-CSmtxUQk.cjs.map} +1 -1
  29. package/dist/ab-components.cjs.js +1 -1
  30. package/dist/ab-components.css +1 -1
  31. package/dist/ab-components.es.js +6 -5
  32. package/dist/index-BOsD8S57.js +474 -0
  33. package/dist/index-BOsD8S57.js.map +1 -0
  34. package/dist/index-DLeZOhZ7.cjs +2 -0
  35. package/dist/index-DLeZOhZ7.cjs.map +1 -0
  36. package/dist/index.d.ts +127 -1
  37. package/package.json +1 -1
  38. package/dist/index-DP-lI-oU.cjs +0 -2
  39. package/dist/index-DP-lI-oU.cjs.map +0 -1
  40. package/dist/index-DvF0u09d.js +0 -432
  41. package/dist/index-DvF0u09d.js.map +0 -1
@@ -0,0 +1,474 @@
1
+ import { defineComponent as x, ref as h, onMounted as W, openBlock as _, createElementBlock as p, normalizeClass as u, unref as n, toDisplayString as b, createCommentVNode as w, normalizeStyle as H, createElementVNode as z, computed as $, Fragment as M, withDirectives as P, withModifiers as Z, vModelText as J, renderList as R, watch as K, createBlock as T, resolveDynamicComponent as ee, createVNode as te } from "vue";
2
+ const ne = "_wrapper_1pges_169", oe = "_wrapper__field_1pges_174", re = "_wrapper__label_1pges_208", ae = "_wrapper__bottom_1pges_216", le = "_wrapper__errorMessage_1pges_220", se = "_wrapper__counter_1pges_225", C = {
3
+ wrapper: ne,
4
+ wrapper__field: oe,
5
+ wrapper__label: re,
6
+ wrapper__bottom: ae,
7
+ wrapper__errorMessage: le,
8
+ wrapper__counter: se,
9
+ "wrapper--error": "_wrapper--error_1pges_231"
10
+ }, ue = ["for"], _e = ["id", "maxlength", "name", "placeholder", "value"], ie = ["id", "maxlength", "name", "placeholder", "value"], Qe = /* @__PURE__ */ x({
11
+ __name: "TextInput",
12
+ props: {
13
+ id: {},
14
+ name: {},
15
+ modelValue: {},
16
+ label: { default: "" },
17
+ placeholder: { default: "" },
18
+ maxLength: { default: void 0 },
19
+ maxHeight: { default: void 0 },
20
+ error: { default: "" },
21
+ multiline: { type: Boolean, default: !1 },
22
+ autoGrow: { type: Boolean, default: !1 },
23
+ counter: { type: Boolean }
24
+ },
25
+ emits: ["input", "change", "paste", "focus", "blur"],
26
+ setup(s, { emit: a }) {
27
+ const l = s, e = a, o = h(null), d = () => {
28
+ if (l.autoGrow && o.value) {
29
+ o.value.style.height = "";
30
+ const t = Math.min(o.value.scrollHeight, l.maxHeight || o.value.scrollHeight);
31
+ o.value.style.height = `${t}px`;
32
+ }
33
+ }, m = (t) => {
34
+ e("input", t), d();
35
+ };
36
+ return W(() => {
37
+ d();
38
+ }), (t, r) => {
39
+ var y;
40
+ return _(), p("div", {
41
+ class: u(n(C).wrapper)
42
+ }, [
43
+ t.label ? (_(), p("label", {
44
+ key: 0,
45
+ class: u(n(C).wrapper__label),
46
+ for: t.id
47
+ }, b(t.label), 11, ue)) : w("", !0),
48
+ t.multiline ? (_(), p("textarea", {
49
+ key: 1,
50
+ id: t.id,
51
+ ref_key: "textareaRef",
52
+ ref: o,
53
+ class: u([
54
+ n(C).wrapper__field,
55
+ {
56
+ [n(C)["wrapper--error"]]: t.error
57
+ }
58
+ ]),
59
+ maxlength: t.maxLength,
60
+ name: t.name,
61
+ placeholder: t.placeholder,
62
+ style: H(t.maxHeight ? { maxHeight: `${t.maxHeight}px` } : void 0),
63
+ value: t.modelValue,
64
+ onBlur: r[0] || (r[0] = (i) => e("blur", i)),
65
+ onChange: r[1] || (r[1] = (i) => t.$emit("change", i)),
66
+ onFocus: r[2] || (r[2] = (i) => e("focus", i)),
67
+ onInput: m,
68
+ onPaste: r[3] || (r[3] = (i) => e("paste", i))
69
+ }, null, 46, _e)) : (_(), p("input", {
70
+ key: 2,
71
+ id: t.id,
72
+ type: "text",
73
+ class: u([
74
+ n(C).wrapper__field,
75
+ {
76
+ [n(C)["wrapper--error"]]: t.error
77
+ }
78
+ ]),
79
+ maxlength: t.maxLength,
80
+ name: t.name,
81
+ placeholder: t.placeholder,
82
+ value: t.modelValue,
83
+ onBlur: r[4] || (r[4] = (i) => e("blur", i)),
84
+ onChange: r[5] || (r[5] = (i) => t.$emit("change", i)),
85
+ onFocus: r[6] || (r[6] = (i) => e("focus", i)),
86
+ onInput: m,
87
+ onPaste: r[7] || (r[7] = (i) => e("paste", i))
88
+ }, null, 42, ie)),
89
+ z("div", {
90
+ class: u(n(C).wrapper__bottom)
91
+ }, [
92
+ t.error ? (_(), p("div", {
93
+ key: 0,
94
+ class: u(n(C).wrapper__errorMessage)
95
+ }, b(t.error), 3)) : w("", !0),
96
+ t.counter ? (_(), p("div", {
97
+ key: 1,
98
+ class: u(n(C).wrapper__counter)
99
+ }, b(((y = t.modelValue) == null ? void 0 : y.toString().length) || 0), 3)) : w("", !0)
100
+ ], 2)
101
+ ], 2);
102
+ };
103
+ }
104
+ }), de = {
105
+ mounted(s, a) {
106
+ s.clickOutsideEvent = (l) => {
107
+ [s, ...a.value.exclude || []].some((o) => o && (o === l.target || o.contains(l.target))) || a.value.handler();
108
+ }, document.addEventListener("click", s.clickOutsideEvent);
109
+ },
110
+ unmounted(s) {
111
+ s.clickOutsideEvent && document.removeEventListener("click", s.clickOutsideEvent);
112
+ }
113
+ }, ce = (s, a) => {
114
+ var e;
115
+ let l = 0;
116
+ for (const o of s)
117
+ if (o.toLowerCase() === ((e = a[l]) == null ? void 0 : e.toLowerCase()) && l++, l === a.length)
118
+ return !0;
119
+ return !1;
120
+ }, pe = (s, a, l) => {
121
+ if (!l.trim())
122
+ return s;
123
+ const e = l.toLowerCase();
124
+ return s.filter((o) => {
125
+ const d = String(o[a]);
126
+ return ce(d.toLowerCase(), e);
127
+ }).sort((o, d) => {
128
+ const m = String(o[a]).toLowerCase(), t = String(d[a]).toLowerCase();
129
+ return m === e ? -1 : t === e ? 1 : m.startsWith(e) && !t.startsWith(e) ? -1 : !m.startsWith(e) && t.startsWith(e) ? 1 : m.length - t.length;
130
+ });
131
+ }, me = "_dropdown_zdj6q_169", ve = "_dropdown__valueContent_zdj6q_178", fe = "_dropdown__label_zdj6q_189", he = "_dropdown__value_zdj6q_178", we = "_dropdown__placeholder_zdj6q_196", ge = "_dropdown__arrowIcon_zdj6q_204", be = "_menu_zdj6q_209", ye = "_menu__searchContainer_zdj6q_222", Ce = "_menu__searchInputWrap_zdj6q_226", ke = "_menu__searchInput_zdj6q_226", ze = "_menu__errorMessage_zdj6q_247", Ie = "_menu__addButton_zdj6q_254", qe = "_menu__itemContainer_zdj6q_262", xe = "_menu__item_zdj6q_262", v = {
132
+ dropdown: me,
133
+ dropdown__valueContent: ve,
134
+ "dropdown__valueContent--open": "_dropdown__valueContent--open_zdj6q_186",
135
+ dropdown__label: fe,
136
+ dropdown__value: he,
137
+ dropdown__placeholder: we,
138
+ dropdown__arrowIcon: ge,
139
+ menu: be,
140
+ menu__searchContainer: ye,
141
+ menu__searchInputWrap: Ce,
142
+ menu__searchInput: ke,
143
+ "menu__searchInput--error": "_menu__searchInput--error_zdj6q_244",
144
+ menu__errorMessage: ze,
145
+ menu__addButton: Ie,
146
+ menu__itemContainer: qe,
147
+ menu__item: xe,
148
+ "menu__item--active": "_menu__item--active_zdj6q_300"
149
+ }, $e = ["for"], je = ["placeholder"], Be = ["onClick"], Xe = /* @__PURE__ */ x({
150
+ __name: "DropdownMenu",
151
+ props: {
152
+ id: {},
153
+ label: {},
154
+ defaultSelected: { default: "" },
155
+ menuHeight: { default: 154 },
156
+ placeholder: {},
157
+ addable: { type: Boolean },
158
+ addButtonText: {},
159
+ searchable: { type: Boolean },
160
+ searchPlaceHolder: {},
161
+ items: {},
162
+ validateAddItem: { type: Function, default: () => null }
163
+ },
164
+ emits: ["add-error", "item-added", "select-item"],
165
+ setup(s, { emit: a }) {
166
+ const l = de, e = s, o = a, d = h(), m = h(), t = h(!0), r = h(null), y = h(""), i = h(null), I = h({ x: 0, y: 0, width: 0, shouldOpenUp: !1, height: e.menuHeight }), j = h([...e.items]), q = h([...e.items]), S = () => {
167
+ if (!d.value)
168
+ return;
169
+ const { offsetTop: c, offsetLeft: f, offsetWidth: g } = d.value, G = window.innerHeight, E = c + d.value.offsetHeight, V = E + e.menuHeight > G;
170
+ I.value = {
171
+ x: f + window.scrollX,
172
+ y: V ? c + window.scrollY : E + window.scrollY,
173
+ width: g,
174
+ shouldOpenUp: V,
175
+ height: e.menuHeight
176
+ };
177
+ }, U = () => {
178
+ S(), t.value = !t.value;
179
+ }, L = () => {
180
+ i.value = null, y.value = "", j.value = [...q.value];
181
+ }, F = () => {
182
+ t.value = !1, L();
183
+ }, N = (c) => {
184
+ r.value = c, y.value = "", F(), o("select-item", c);
185
+ }, A = () => {
186
+ const c = y.value.trim(), f = e.validateAddItem(c, q.value);
187
+ if (f) {
188
+ i.value = f, o("add-error", f);
189
+ return;
190
+ }
191
+ const g = {
192
+ text: c,
193
+ value: c
194
+ };
195
+ q.value.push(g), L(), o("item-added", g);
196
+ }, Y = () => {
197
+ j.value = pe(q.value, "text", y.value);
198
+ }, Q = () => {
199
+ i.value = "";
200
+ }, X = $(() => ({
201
+ top: I.value.shouldOpenUp ? `${I.value.y - 10}px` : `${I.value.y}px`,
202
+ left: `${I.value.x}px`,
203
+ width: `${I.value.width}px`,
204
+ height: `${e.menuHeight}px`
205
+ }));
206
+ W(() => {
207
+ if (S(), e.defaultSelected) {
208
+ const c = q.value.find((f) => f.value === e.defaultSelected);
209
+ c && (r.value = c, o("select-item", c));
210
+ }
211
+ });
212
+ const O = $(() => r.value ? r.value.text : "");
213
+ return (c, f) => (_(), p(M, null, [
214
+ z("div", {
215
+ ref_key: "dropdownRef",
216
+ ref: d,
217
+ class: u(n(v).dropdown)
218
+ }, [
219
+ c.label ? (_(), p("label", {
220
+ key: 0,
221
+ class: u(n(v).dropdown__label),
222
+ for: c.id
223
+ }, b(c.label), 11, $e)) : w("", !0),
224
+ z("button", {
225
+ class: u([
226
+ n(v).dropdown__valueContent,
227
+ {
228
+ [n(v)["dropdown__valueContent--open"]]: t.value
229
+ }
230
+ ]),
231
+ onClick: U
232
+ }, [
233
+ z("span", {
234
+ class: u(n(v).dropdown__value)
235
+ }, b(O.value), 3),
236
+ c.placeholder && !O.value ? (_(), p("span", {
237
+ key: 0,
238
+ class: u(n(v).dropdown__placeholder)
239
+ }, b(c.placeholder), 3)) : w("", !0),
240
+ (_(), p("svg", {
241
+ fill: "none",
242
+ height: "17",
243
+ viewBox: "0 0 16 17",
244
+ width: "16",
245
+ xmlns: "http://www.w3.org/2000/svg",
246
+ class: u(n(v).dropdown__arrowIcon)
247
+ }, f[2] || (f[2] = [
248
+ z("path", {
249
+ d: "M8 11.2021L4.5359 6.70215L11.4641 6.70215L8 11.2021Z",
250
+ fill: "#91949F"
251
+ }, null, -1)
252
+ ]), 2))
253
+ ], 2)
254
+ ], 2),
255
+ t.value ? P((_(), p("div", {
256
+ key: 0,
257
+ ref_key: "menuRef",
258
+ ref: m,
259
+ class: u(n(v).menu),
260
+ style: H(X.value),
261
+ onClick: f[1] || (f[1] = Z(() => {
262
+ }, ["prevent"]))
263
+ }, [
264
+ e.searchable ? (_(), p("div", {
265
+ key: 0,
266
+ class: u(n(v).menu__searchContainer)
267
+ }, [
268
+ z("div", {
269
+ class: u(n(v).menu__searchInputWrap)
270
+ }, [
271
+ P(z("input", {
272
+ type: "text",
273
+ class: u([
274
+ n(v).menu__searchInput,
275
+ {
276
+ [n(v)["menu__searchInput--error"]]: i.value
277
+ }
278
+ ]),
279
+ placeholder: c.searchPlaceHolder,
280
+ "onUpdate:modelValue": f[0] || (f[0] = (g) => y.value = g),
281
+ onFocus: Q,
282
+ onInput: Y
283
+ }, null, 42, je), [
284
+ [J, y.value]
285
+ ]),
286
+ i.value ? (_(), p("p", {
287
+ key: 0,
288
+ class: u(n(v).menu__errorMessage)
289
+ }, b(i.value), 3)) : w("", !0)
290
+ ], 2),
291
+ e.addable ? (_(), p("button", {
292
+ key: 0,
293
+ class: u(n(v).menu__addButton),
294
+ onClick: A
295
+ }, b(c.addButtonText), 3)) : w("", !0)
296
+ ], 2)) : w("", !0),
297
+ z("ul", {
298
+ class: u(n(v).menu__itemContainer)
299
+ }, [
300
+ (_(!0), p(M, null, R(j.value, (g) => (_(), p("li", {
301
+ key: g.value,
302
+ class: u([
303
+ n(v).menu__item,
304
+ {
305
+ [n(v)["menu__item--active"]]: r.value && g.value === r.value.value
306
+ }
307
+ ]),
308
+ onClick: (G) => N(g)
309
+ }, b(g.text), 11, Be))), 128))
310
+ ], 2)
311
+ ], 6)), [
312
+ [n(l), { handler: F, exclude: [d.value, m.value] }]
313
+ ]) : w("", !0)
314
+ ], 64));
315
+ }
316
+ }), Me = (s, a, l) => {
317
+ const e = s[a];
318
+ return e ? typeof e == "function" ? e() : Promise.resolve(e) : new Promise((o, d) => {
319
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
320
+ d.bind(
321
+ null,
322
+ new Error(
323
+ "Unknown variable dynamic import: " + a + (a.split("/").length !== l ? ". Note that variables only represent file names one level deep." : "")
324
+ )
325
+ )
326
+ );
327
+ });
328
+ }, He = /* @__PURE__ */ x({
329
+ __name: "Icon",
330
+ props: {
331
+ name: {},
332
+ size: { default: 16 },
333
+ color: {}
334
+ },
335
+ setup(s) {
336
+ const a = s, l = h(null);
337
+ K(
338
+ () => a.name,
339
+ async (o) => {
340
+ try {
341
+ const d = await Me(/* @__PURE__ */ Object.assign({ "./icons/FilledCautionTriangle.vue": () => import("./FilledCautionTriangle-ORbgUqfx.js"), "./icons/FilledCheckCircle.vue": () => import("./FilledCheckCircle-DgwFiK4_.js"), "./icons/FilledErrorBox.vue": () => import("./FilledErrorBox-Bx6em6H-.js"), "./icons/FilledInfoCircle.vue": () => import("./FilledInfoCircle-cjamS6eU.js"), "./icons/LineCheck.vue": () => import("./LineCheck-SMu9mSFJ.js"), "./icons/LoadingCircle.vue": () => import("./LoadingCircle-CnxCc6n9.js"), "./icons/SmartIcon.vue": () => import("./SmartIcon-C5ZhgY9m.js") }), `./icons/${o}.vue`, 3);
342
+ l.value = d.default;
343
+ } catch (d) {
344
+ console.warn(`Icon "${o}" not found.`, d), l.value = null;
345
+ }
346
+ },
347
+ { immediate: !0 }
348
+ );
349
+ const e = $(() => typeof a.size == "number" ? `${a.size}px` : a.size);
350
+ return (o, d) => l.value ? (_(), T(ee(l.value), {
351
+ key: 0,
352
+ class: "icon",
353
+ style: H({ width: e.value, height: e.value, fill: a.color || "currentColor" })
354
+ }, null, 8, ["style"])) : w("", !0);
355
+ }
356
+ }), Se = (s, a) => {
357
+ const l = s.__vccOpts || s;
358
+ for (const [e, o] of a)
359
+ l[e] = o;
360
+ return l;
361
+ }, D = /* @__PURE__ */ Se(He, [["__scopeId", "data-v-0439f329"]]), Le = "_button__size_default_qxh1r_1", Fe = "_button__size_small_qxh1r_8", Oe = "_button_qxh1r_1", Ge = "_button__label_qxh1r_191", Ee = "_button__solid_qxh1r_328", Ve = "_segmentGroup_qxh1r_335", Pe = "_fill_qxh1r_357", k = {
362
+ button__size_default: Le,
363
+ button__size_small: Fe,
364
+ button: Oe,
365
+ button__label: Ge,
366
+ "button--primary": "_button--primary_qxh1r_206",
367
+ "button--selected": "_button--selected_qxh1r_216",
368
+ "button--secondary": "_button--secondary_qxh1r_229",
369
+ "button--danger": "_button--danger_qxh1r_252",
370
+ "button--warning": "_button--warning_qxh1r_275",
371
+ "button--smart": "_button--smart_qxh1r_298",
372
+ button__solid: Ee,
373
+ segmentGroup: Ve,
374
+ "segmentGroup--vertical": "_segmentGroup--vertical_qxh1r_338",
375
+ "segmentGroup--horizontal": "_segmentGroup--horizontal_qxh1r_347",
376
+ fill: Pe
377
+ }, We = ["disabled", "onClick"], Ze = /* @__PURE__ */ x({
378
+ __name: "SegmentButton",
379
+ props: {
380
+ color: {},
381
+ size: { default: "default" },
382
+ align: { default: "horizontal" },
383
+ disabled: { type: Boolean, default: !1 },
384
+ segments: {},
385
+ fill: { type: Boolean }
386
+ },
387
+ emits: ["click"],
388
+ setup(s, { emit: a }) {
389
+ const l = s, e = a, o = h(""), d = (m) => {
390
+ l.disabled || m.disabled || (o.value = m.value, e("click", m.value));
391
+ };
392
+ return (m, t) => (_(), p("div", {
393
+ class: u([
394
+ n(k).segmentGroup,
395
+ n(k)[`segmentGroup--${m.align}`],
396
+ { [n(k).fill]: m.fill }
397
+ ])
398
+ }, [
399
+ (_(!0), p(M, null, R(m.segments, (r) => (_(), p("button", {
400
+ key: r.value,
401
+ class: u([
402
+ n(k).button,
403
+ n(k)[`button--${m.color}`],
404
+ n(k)[`button__size_${m.size}`],
405
+ n(k).fill,
406
+ {
407
+ [n(k)["button--selected"]]: r.value === o.value
408
+ }
409
+ ]),
410
+ disabled: r.disabled || l.disabled,
411
+ onClick: (y) => d(r)
412
+ }, [
413
+ r.icon ? (_(), T(n(D), {
414
+ key: 0,
415
+ name: r.icon
416
+ }, null, 8, ["name"])) : w("", !0),
417
+ r.label ? (_(), p("span", {
418
+ key: 1,
419
+ class: u(n(k).button__label)
420
+ }, b(r.label), 3)) : w("", !0)
421
+ ], 10, We))), 128))
422
+ ], 2));
423
+ }
424
+ }), Re = "_container_2joy4_1", Te = "_container__text_2joy4_187", De = "_container__default_2joy4_191", Ue = "_container__warning_2joy4_199", Ne = "_container__alert_2joy4_207", Ae = "_container__success_2joy4_215", B = {
425
+ container: Re,
426
+ container__text: Te,
427
+ container__default: De,
428
+ container__warning: Ue,
429
+ container__alert: Ne,
430
+ container__success: Ae
431
+ }, Je = /* @__PURE__ */ x({
432
+ __name: "OnPageMessage",
433
+ props: {
434
+ variant: { default: "default" },
435
+ text: {}
436
+ },
437
+ setup(s) {
438
+ const a = s, l = $(() => {
439
+ switch (a.variant) {
440
+ case "alert":
441
+ return "FilledErrorBox";
442
+ case "warning":
443
+ return "FilledCautionTriangle";
444
+ case "success":
445
+ return "FilledCheckCircle";
446
+ default:
447
+ return "FilledInfoCircle";
448
+ }
449
+ });
450
+ return (e, o) => (_(), p("div", {
451
+ class: u([
452
+ n(B).container,
453
+ n(B)[`container__${e.variant}`]
454
+ ])
455
+ }, [
456
+ te(D, {
457
+ name: l.value,
458
+ size: 24
459
+ }, null, 8, ["name"]),
460
+ z("span", {
461
+ class: u(n(B).container__text)
462
+ }, b(e.text), 3)
463
+ ], 2));
464
+ }
465
+ });
466
+ export {
467
+ D as I,
468
+ Se as _,
469
+ Qe as a,
470
+ Xe as b,
471
+ Ze as c,
472
+ Je as d
473
+ };
474
+ //# sourceMappingURL=index-BOsD8S57.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BOsD8S57.js","sources":["../src/components/TextInput/TextInput.vue","../src/directives/clickOutside.ts","../src/utils/search.ts","../src/components/Dropdown/DropdownMenu.vue","../src/components/Icon/Icon.vue","../src/components/SegmentButton/SegmentButton.vue","../src/components/OnPageMessage/OnPageMessage.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { onMounted, ref } from 'vue';\nimport styles from './TextInput.module.scss';\n\nexport interface Props {\n id: string;\n name: string;\n modelValue: string | number;\n label?: string;\n placeholder?: string;\n maxLength?: number;\n maxHeight?: number;\n error?: string;\n multiline?: boolean;\n autoGrow?: boolean;\n counter?: boolean;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n label: '',\n placeholder: '',\n maxLength: undefined,\n maxHeight: undefined,\n error: '',\n multiline: false,\n autoGrow: false,\n});\n\nconst emit = defineEmits<{\n input: [event: Event];\n change: [event: Event];\n paste: [event: ClipboardEvent];\n focus: [event: FocusEvent];\n blur: [event: FocusEvent];\n}>();\n\nconst textareaRef = ref<HTMLTextAreaElement | null>(null);\n\nconst autoGrow = () => {\n if (props.autoGrow && textareaRef.value) {\n textareaRef.value.style.height = '';\n\n const newHeight = Math.min(textareaRef.value.scrollHeight, props.maxHeight || textareaRef.value.scrollHeight);\n\n textareaRef.value.style.height = `${newHeight}px`;\n }\n};\n\nconst handleInput = (event: Event) => {\n emit('input', event);\n\n autoGrow();\n};\n\nonMounted(() => {\n autoGrow();\n});\n</script>\n\n<template>\n <div :class=\"styles.wrapper\">\n <label\n v-if=\"label\"\n :class=\"styles.wrapper__label\"\n :for=\"id\">\n {{ label }}\n </label>\n <template v-if=\"multiline\">\n <textarea\n :id=\"id\"\n ref=\"textareaRef\"\n :class=\"[\n styles.wrapper__field, {\n [styles['wrapper--error']]: error,\n },\n ]\"\n :maxlength=\"maxLength\"\n :name=\"name\"\n :placeholder=\"placeholder\"\n :style=\"maxHeight ? { maxHeight: `${maxHeight}px` } : undefined\"\n :value=\"modelValue\"\n @blur=\"emit('blur', $event)\"\n @change=\"$emit('change', $event)\"\n @focus=\"emit('focus', $event)\"\n @input=\"handleInput\"\n @paste=\"emit('paste', $event)\" />\n </template>\n <template v-else>\n <input\n :id=\"id\"\n type=\"text\"\n :class=\"[\n styles.wrapper__field, {\n [styles['wrapper--error']]: error,\n },\n ]\"\n :maxlength=\"maxLength\"\n :name=\"name\"\n :placeholder=\"placeholder\"\n :value=\"modelValue\"\n @blur=\"emit('blur', $event)\"\n @change=\"$emit('change', $event)\"\n @focus=\"emit('focus', $event)\"\n @input=\"handleInput\"\n @paste=\"emit('paste', $event)\">\n </template>\n\n <div :class=\"styles.wrapper__bottom\">\n <div\n v-if=\"error\"\n :class=\"styles.wrapper__errorMessage\">\n {{ error }}\n </div>\n <div\n v-if=\"counter\"\n :class=\"styles.wrapper__counter\">\n {{ modelValue?.toString().length || 0 }}\n </div>\n </div>\n </div>\n</template>\n","import type { DirectiveBinding } from 'vue';\n\ninterface ClickOutsideElement extends HTMLElement {\n clickOutsideEvent?: (event: Event) => void;\n}\n\nexport default {\n mounted(el: ClickOutsideElement, binding: DirectiveBinding<{ handler: () => void; exclude?: HTMLElement[] }>) {\n el.clickOutsideEvent = (event: Event) => {\n const isClickInside = [el, ...(binding.value.exclude || [])].some(element => {\n return element && (element === event.target || element.contains(event.target as Node))\n });\n\n if (!isClickInside) {\n binding.value.handler(); // Close handler\n }\n };\n\n document.addEventListener('click', el.clickOutsideEvent);\n },\n unmounted(el: ClickOutsideElement) {\n if (el.clickOutsideEvent) {\n document.removeEventListener('click', el.clickOutsideEvent);\n }\n },\n};","const isFuzzyMatch = (choiceValue: string, searchTerm: string): boolean => {\n let searchIndex = 0;\n for (const char of choiceValue) {\n if (char.toLowerCase() === searchTerm[searchIndex]?.toLowerCase()) {\n searchIndex++;\n }\n if (searchIndex === searchTerm.length) {\n return true;\n }\n }\n return false;\n};\n\n\nexport const fuzzySearch = <T>(\n choices: T[],\n key: keyof T,\n searchTerm: string,\n): T[] => {\n if (!searchTerm.trim()) {\n return choices;\n }\n\n const normalizedSearchTerm = searchTerm.toLowerCase();\n\n return choices\n .filter(choice => {\n const value = String(choice[key]);\n\n return isFuzzyMatch(value.toLowerCase(), normalizedSearchTerm)\n })\n .sort((a, b) => {\n const aValue = String(a[key]).toLowerCase();\n const bValue = String(b[key]).toLowerCase();\n\n if (aValue === normalizedSearchTerm) return -1;\n if (bValue === normalizedSearchTerm) return 1;\n\n if (aValue.startsWith(normalizedSearchTerm) && !bValue.startsWith(normalizedSearchTerm))\n return -1;\n if (!aValue.startsWith(normalizedSearchTerm) && bValue.startsWith(normalizedSearchTerm))\n return 1;\n\n return aValue.length - bValue.length;\n });\n};\n","<script lang=\"ts\" setup>\nimport { ref, computed, type StyleValue, onMounted } from 'vue';\nimport clickOutside from '@/directives/clickOutside';\nimport { fuzzySearch } from '@/utils/search';\nimport styles from './Dropdown.module.scss';\n\nconst vClickOutside = clickOutside;\n\ninterface MenuItem {\n text: string;\n value: string;\n}\n\ninterface DropdownProps {\n id: string;\n label?: string;\n defaultSelected?: string;\n menuHeight?: number;\n placeholder?: string;\n addable?: boolean;\n addButtonText?: string;\n searchable?: boolean;\n searchPlaceHolder?: string;\n items: MenuItem[];\n validateAddItem?: (item: string, items: MenuItem[]) => string | null;\n}\n\ninterface Emits {\n (e: 'add-error', error: string): void;\n (e: 'item-added', item: MenuItem): void;\n (e: 'select-item', item: MenuItem): void;\n}\n\nconst props = withDefaults(defineProps<DropdownProps>(), {\n menuHeight: 154,\n searchBar: false,\n addItem: false,\n defaultSelected: '',\n validateAddItem: () => null,\n});\n\nconst emit = defineEmits<Emits>();\nconst dropdownRef = ref<HTMLDivElement>();\nconst menuRef = ref<HTMLDivElement>();\nconst isOpen = ref(true);\nconst selectedItem = ref<MenuItem | null>(null);\nconst searchQuery = ref('');\nconst errorMessage = ref<string | null>(null);\nconst menuPosition = ref({ x: 0, y: 0, width: 0, shouldOpenUp: false, height: props.menuHeight });\nconst filteredItems = ref([...props.items]);\nconst allItems = ref([...props.items]);\n\nconst calculateMenuPosition = () => {\n if (!dropdownRef.value) {\n return;\n }\n\n const { offsetTop: top, offsetLeft: left, offsetWidth: width } = dropdownRef.value;\n const viewportHeight = window.innerHeight;\n const bottom = top + dropdownRef.value.offsetHeight;\n const shouldOpenUp = bottom + props.menuHeight > viewportHeight;\n\n menuPosition.value = {\n x: left + window.scrollX,\n y: shouldOpenUp ? top + window.scrollY : bottom + window.scrollY,\n width,\n shouldOpenUp,\n height: props.menuHeight,\n };\n};\n\nconst toggleMenu = () => {\n calculateMenuPosition();\n isOpen.value = !isOpen.value;\n};\n\nconst resetSettings = () => {\n errorMessage.value = null;\n searchQuery.value = '';\n filteredItems.value = [...allItems.value];\n};\n\nconst closeMenu = () => {\n isOpen.value = false;\n\n resetSettings();\n};\n\nconst selectItem = (item: MenuItem) => {\n selectedItem.value = item;\n searchQuery.value = '';\n\n closeMenu();\n\n emit('select-item', item);\n};\n\nconst addItem = () => {\n const query = searchQuery.value.trim();\n const error = props.validateAddItem(query, allItems.value);\n\n if (error) {\n errorMessage.value = error;\n\n emit('add-error', error);\n\n return;\n }\n\n const newItem: MenuItem = {\n text: query,\n value: query,\n };\n\n allItems.value.push(newItem);\n resetSettings();\n\n emit('item-added', newItem);\n};\n\nconst onSearch = () => {\n filteredItems.value = fuzzySearch<MenuItem>(allItems.value, 'text', searchQuery.value);\n};\n\nconst onFocusSearch = () => {\n errorMessage.value = '';\n};\n\nconst menuStyle = computed<Partial<StyleValue>>(() => ({\n top: menuPosition.value.shouldOpenUp ? `${menuPosition.value.y - 10}px` : `${menuPosition.value.y}px`,\n left: `${menuPosition.value.x}px`,\n width: `${menuPosition.value.width}px`,\n height: `${props.menuHeight}px`,\n}));\n\nonMounted(() => {\n calculateMenuPosition();\n\n if (props.defaultSelected) {\n const defaultItem = allItems.value.find(item => item.value === props.defaultSelected);\n\n if (defaultItem) {\n selectedItem.value = defaultItem;\n emit('select-item', defaultItem);\n }\n }\n});\n\nconst selectedValue = computed(() => (selectedItem.value ? selectedItem.value.text : ''));\n</script>\n\n<template>\n <div\n ref=\"dropdownRef\"\n :class=\"styles.dropdown\">\n <label\n v-if=\"label\"\n :class=\"styles.dropdown__label\"\n :for=\"id\">\n {{ label }}\n </label>\n <button\n :class=\"[\n styles.dropdown__valueContent, {\n [styles['dropdown__valueContent--open']]: isOpen,\n },\n ]\"\n @click=\"toggleMenu\">\n <span :class=\"styles.dropdown__value\">\n {{ selectedValue }}\n </span>\n <span\n v-if=\"placeholder && !selectedValue\"\n :class=\"styles.dropdown__placeholder\">\n {{ placeholder }}\n </span>\n <svg\n fill=\"none\"\n height=\"17\"\n viewBox=\"0 0 16 17\"\n width=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n :class=\"styles.dropdown__arrowIcon\">\n <path\n d=\"M8 11.2021L4.5359 6.70215L11.4641 6.70215L8 11.2021Z\"\n fill=\"#91949F\" />\n </svg>\n </button>\n </div>\n\n <div\n v-if=\"isOpen\"\n ref=\"menuRef\"\n :class=\"styles.menu\"\n :style=\"menuStyle\"\n v-click-outside=\"{ handler: closeMenu, exclude: [dropdownRef, menuRef] }\"\n @click.prevent>\n <div\n v-if=\"props.searchable\"\n :class=\"styles.menu__searchContainer\">\n <div :class=\"styles.menu__searchInputWrap\">\n <input\n type=\"text\"\n :class=\"[\n styles.menu__searchInput, {\n [styles['menu__searchInput--error']]: errorMessage,\n },\n ]\"\n :placeholder=\"searchPlaceHolder\"\n v-model=\"searchQuery\"\n @focus=\"onFocusSearch\"\n @input=\"onSearch\">\n <p\n v-if=\"errorMessage\"\n :class=\"styles.menu__errorMessage\">\n {{ errorMessage }}\n </p>\n </div>\n <button\n v-if=\"props.addable\"\n :class=\"styles.menu__addButton\"\n @click=\"addItem\">\n {{ addButtonText }}\n </button>\n </div>\n <ul :class=\"styles.menu__itemContainer\">\n <li\n v-for=\"(item) in filteredItems\"\n :key=\"item.value\"\n :class=\"[\n styles.menu__item, {\n [styles['menu__item--active']]: selectedItem && item.value === selectedItem.value,\n },\n ]\"\n @click=\"selectItem(item)\">\n {{ item.text }}\n </li>\n </ul>\n </div>\n</template>\n","<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue';\nimport type { IconNames } from '@/components/Icon/types';\n\ninterface IconProps {\n name: IconNames;\n size?: 16 | 24;\n color?: string;\n}\n\nconst props = withDefaults(defineProps<IconProps>(), {\n size: 16,\n});\n\ntype X = (() => Promise<unknown>);\n\nconst iconComponent = ref<null | X>(null);\n\nwatch(\n () => props.name,\n async newName => {\n try {\n const component = await import(`./icons/${newName}.vue`);\n\n iconComponent.value = component.default;\n } catch (error) {\n // eslint-disable-next-line no-console\n console.warn(`Icon \"${newName}\" not found.`, error);\n iconComponent.value = null;\n }\n },\n { immediate: true }\n);\n\nconst iconSize = computed(() => (typeof props.size === 'number' ? `${props.size}px` : props.size));\n</script>\n\n<template>\n <component\n v-if=\"iconComponent\"\n :is=\"iconComponent\"\n class=\"icon\"\n :style=\"{ width: iconSize, height: iconSize, fill: props.color || 'currentColor' }\" />\n</template>\n\n<style scoped>\n.icon {\n display: inline-block;\n line-height: 0;\n vertical-align: middle;\n}\n</style>\n","<script lang=\"ts\" setup>\nimport { ref } from 'vue';\nimport type { IconNames } from '@/components/Icon/types';\nimport { Icon } from '@/index';\nimport styles from './SegmentButton.module.scss';\n\ninterface SegmentType {\n value: string;\n label: string;\n disabled?: boolean;\n icon?: IconNames;\n}\n\ninterface SegmentButtonProps {\n color: 'primary' | 'secondary' | 'danger' | 'warning' | 'smart';\n size?: 'default' | 'small';\n align?: 'vertical' | 'horizontal';\n disabled?: boolean;\n segments: SegmentType[];\n fill?: boolean;\n}\n\nconst props = withDefaults(defineProps<SegmentButtonProps>(), {\n loadingStatus: false,\n successStatus: false,\n disabled: false,\n size: 'default',\n align: 'horizontal',\n});\n\nconst emit = defineEmits<{\n click: [event: SegmentType['value']];\n}>();\n\nconst selected = ref<string>('');\n\nconst setSelect = (segment: SegmentType) => {\n if (props.disabled || segment.disabled) {\n return;\n }\n\n selected.value = segment.value;\n\n emit('click', segment.value);\n};\n</script>\n\n<template>\n <div\n :class=\"[\n styles.segmentGroup,\n styles[`segmentGroup--${align}`],\n { [styles.fill]: fill },\n ]\">\n <button\n v-for=\"segment in segments\"\n :key=\"segment.value\"\n :class=\"[\n styles.button,\n styles[`button--${color}`],\n styles[`button__size_${size}`],\n styles.fill,\n {\n [styles[`button--selected`]]: segment.value === selected,\n },\n ]\"\n :disabled=\"segment.disabled || props.disabled\"\n @click=\"setSelect(segment)\">\n <Icon\n v-if=\"segment.icon\"\n :name=\"segment.icon\" />\n <span\n v-if=\"segment.label\"\n :class=\"styles.button__label\">\n {{ segment.label }}\n </span>\n </button>\n </div>\n</template>\n","<script lang=\"ts\" setup>\nimport { computed } from 'vue';\nimport Icon from '@/components/Icon/Icon.vue';\nimport type { IconNames } from '@/components/Icon/types';\nimport styles from './OnPageMessage.module.scss';\n\ninterface OnPageMessageProps {\n variant?: 'default' | 'warning' | 'alert' | 'success';\n text: string;\n}\n\nconst props = withDefaults(defineProps<OnPageMessageProps>(), {\n variant: 'default',\n});\n\nconst IconName = computed<IconNames>(() => {\n switch (props.variant) {\n case 'alert': return 'FilledErrorBox';\n case 'warning': return 'FilledCautionTriangle';\n case 'success': return 'FilledCheckCircle';\n\n default: return 'FilledInfoCircle';\n }\n});\n</script>\n\n<template>\n <div\n :class=\"[\n styles.container,\n styles[`container__${variant}`],\n ]\">\n <Icon\n :name=\"IconName\"\n :size=\"24\" />\n <span :class=\"styles.container__text\">{{ text }}</span>\n </div>\n</template>\n"],"names":["props","__props","emit","__emit","textareaRef","ref","autoGrow","newHeight","handleInput","event","onMounted","clickOutside","el","binding","element","isFuzzyMatch","choiceValue","searchTerm","searchIndex","char","_a","fuzzySearch","choices","key","normalizedSearchTerm","choice","value","a","b","aValue","bValue","vClickOutside","dropdownRef","menuRef","isOpen","selectedItem","searchQuery","errorMessage","menuPosition","filteredItems","allItems","calculateMenuPosition","top","left","width","viewportHeight","bottom","shouldOpenUp","toggleMenu","resetSettings","closeMenu","selectItem","item","addItem","query","error","newItem","onSearch","onFocusSearch","menuStyle","computed","defaultItem","selectedValue","iconComponent","watch","newName","component","__variableDynamicImportRuntimeHelper","iconSize","selected","setSelect","segment","IconName"],"mappings":";;;;;;;;;;;;;;;;;;;;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AAgBV,CAAK,GAClDQ,EAAc,QAAQ;AAAA,QAAA;AAAA,MAE9B;AAAA,MACA,EAAE,WAAW,GAAK;AAAA,IACtB;AAEA,UAAMK,IAAWR,EAAS,MAAO,OAAO5D,EAAM,QAAS,WAAW,GAAGA,EAAM,IAAI,OAAOA,EAAM,IAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACZjG,UAAMA,IAAQC,GAQRC,IAAOC,GAIPkE,IAAWhE,EAAY,EAAE,GAEzBiE,IAAY,CAACC,MAAyB;AACpC,MAAAvE,EAAM,YAAYuE,EAAQ,aAI9BF,EAAS,QAAQE,EAAQ,OAEpBrE,EAAA,SAASqE,EAAQ,KAAK;AAAA,IAC/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjCA,UAAMvE,IAAQC,GAIRuE,IAAWZ,EAAoB,MAAM;AACvC,cAAQ5D,EAAM,SAAS;AAAA,QACnB,KAAK;AAAgB,iBAAA;AAAA,QACrB,KAAK;AAAkB,iBAAA;AAAA,QACvB,KAAK;AAAkB,iBAAA;AAAA,QAEvB;AAAgB,iBAAA;AAAA,MAAA;AAAA,IACpB,CACH;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("vue"),L="_wrapper_1pges_169",F="_wrapper__field_1pges_174",D="_wrapper__label_1pges_208",P="_wrapper__bottom_1pges_216",O="_wrapper__errorMessage_1pges_220",G="_wrapper__counter_1pges_225",v={wrapper:L,wrapper__field:F,wrapper__label:D,wrapper__bottom:P,wrapper__errorMessage:O,wrapper__counter:G,"wrapper--error":"_wrapper--error_1pges_231"},W=["for"],R=["id","maxlength","name","placeholder","value"],T=["id","maxlength","name","placeholder","value"],U=e.defineComponent({__name:"TextInput",props:{id:{},name:{},modelValue:{},label:{default:""},placeholder:{default:""},maxLength:{default:void 0},maxHeight:{default:void 0},error:{default:""},multiline:{type:Boolean,default:!1},autoGrow:{type:Boolean,default:!1},counter:{type:Boolean}},emits:["input","change","paste","focus","blur"],setup(s,{emit:l}){const a=s,n=l,o=e.ref(null),i=()=>{if(a.autoGrow&&o.value){o.value.style.height="";const t=Math.min(o.value.scrollHeight,a.maxHeight||o.value.scrollHeight);o.value.style.height=`${t}px`}},_=t=>{n("input",t),i()};return e.onMounted(()=>{i()}),(t,r)=>{var f;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(v).wrapper)},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass(e.unref(v).wrapper__label),for:t.id},e.toDisplayString(t.label),11,W)):e.createCommentVNode("",!0),t.multiline?(e.openBlock(),e.createElementBlock("textarea",{key:1,id:t.id,ref_key:"textareaRef",ref:o,class:e.normalizeClass([e.unref(v).wrapper__field,{[e.unref(v)["wrapper--error"]]:t.error}]),maxlength:t.maxLength,name:t.name,placeholder:t.placeholder,style:e.normalizeStyle(t.maxHeight?{maxHeight:`${t.maxHeight}px`}:void 0),value:t.modelValue,onBlur:r[0]||(r[0]=u=>n("blur",u)),onChange:r[1]||(r[1]=u=>t.$emit("change",u)),onFocus:r[2]||(r[2]=u=>n("focus",u)),onInput:_,onPaste:r[3]||(r[3]=u=>n("paste",u))},null,46,R)):(e.openBlock(),e.createElementBlock("input",{key:2,id:t.id,type:"text",class:e.normalizeClass([e.unref(v).wrapper__field,{[e.unref(v)["wrapper--error"]]:t.error}]),maxlength:t.maxLength,name:t.name,placeholder:t.placeholder,value:t.modelValue,onBlur:r[4]||(r[4]=u=>n("blur",u)),onChange:r[5]||(r[5]=u=>t.$emit("change",u)),onFocus:r[6]||(r[6]=u=>n("focus",u)),onInput:_,onPaste:r[7]||(r[7]=u=>n("paste",u))},null,42,T)),e.createElementVNode("div",{class:e.normalizeClass(e.unref(v).wrapper__bottom)},[t.error?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(v).wrapper__errorMessage)},e.toDisplayString(t.error),3)):e.createCommentVNode("",!0),t.counter?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(v).wrapper__counter)},e.toDisplayString(((f=t.modelValue)==null?void 0:f.toString().length)||0),3)):e.createCommentVNode("",!0)],2)],2)}}}),A={mounted(s,l){s.clickOutsideEvent=a=>{[s,...l.value.exclude||[]].some(o=>o&&(o===a.target||o.contains(a.target)))||l.value.handler()},document.addEventListener("click",s.clickOutsideEvent)},unmounted(s){s.clickOutsideEvent&&document.removeEventListener("click",s.clickOutsideEvent)}},Y=(s,l)=>{var n;let a=0;for(const o of s)if(o.toLowerCase()===((n=l[a])==null?void 0:n.toLowerCase())&&a++,a===l.length)return!0;return!1},Q=(s,l,a)=>{if(!a.trim())return s;const n=a.toLowerCase();return s.filter(o=>{const i=String(o[l]);return Y(i.toLowerCase(),n)}).sort((o,i)=>{const _=String(o[l]).toLowerCase(),t=String(i[l]).toLowerCase();return _===n?-1:t===n?1:_.startsWith(n)&&!t.startsWith(n)?-1:!_.startsWith(n)&&t.startsWith(n)?1:_.length-t.length})},X="_dropdown_zdj6q_169",Z="_dropdown__valueContent_zdj6q_178",J="_dropdown__label_zdj6q_189",K="_dropdown__value_zdj6q_178",ee="_dropdown__placeholder_zdj6q_196",ne="_dropdown__arrowIcon_zdj6q_204",te="_menu_zdj6q_209",oe="_menu__searchContainer_zdj6q_222",re="_menu__searchInputWrap_zdj6q_226",le="_menu__searchInput_zdj6q_226",ae="_menu__errorMessage_zdj6q_247",se="_menu__addButton_zdj6q_254",ue="_menu__itemContainer_zdj6q_262",ie="_menu__item_zdj6q_262",d={dropdown:X,dropdown__valueContent:Z,"dropdown__valueContent--open":"_dropdown__valueContent--open_zdj6q_186",dropdown__label:J,dropdown__value:K,dropdown__placeholder:ee,dropdown__arrowIcon:ne,menu:te,menu__searchContainer:oe,menu__searchInputWrap:re,menu__searchInput:le,"menu__searchInput--error":"_menu__searchInput--error_zdj6q_244",menu__errorMessage:ae,menu__addButton:se,menu__itemContainer:ue,menu__item:ie,"menu__item--active":"_menu__item--active_zdj6q_300"},ce=["for"],_e=["placeholder"],de=["onClick"],pe=e.defineComponent({__name:"DropdownMenu",props:{id:{},label:{},defaultSelected:{default:""},menuHeight:{default:154},placeholder:{},addable:{type:Boolean},addButtonText:{},searchable:{type:Boolean},searchPlaceHolder:{},items:{},validateAddItem:{type:Function,default:()=>null}},emits:["add-error","item-added","select-item"],setup(s,{emit:l}){const a=A,n=s,o=l,i=e.ref(),_=e.ref(),t=e.ref(!0),r=e.ref(null),f=e.ref(""),u=e.ref(null),w=e.ref({x:0,y:0,width:0,shouldOpenUp:!1,height:n.menuHeight}),k=e.ref([...n.items]),g=e.ref([...n.items]),y=()=>{if(!i.value)return;const{offsetTop:c,offsetLeft:p,offsetWidth:m}=i.value,I=window.innerHeight,E=c+i.value.offsetHeight,x=E+n.menuHeight>I;w.value={x:p+window.scrollX,y:x?c+window.scrollY:E+window.scrollY,width:m,shouldOpenUp:x,height:n.menuHeight}},S=()=>{y(),t.value=!t.value},z=()=>{u.value=null,f.value="",k.value=[...g.value]},B=()=>{t.value=!1,z()},V=c=>{r.value=c,f.value="",B(),o("select-item",c)},j=()=>{const c=f.value.trim(),p=n.validateAddItem(c,g.value);if(p){u.value=p,o("add-error",p);return}const m={text:c,value:c};g.value.push(m),z(),o("item-added",m)},M=()=>{k.value=Q(g.value,"text",f.value)},N=()=>{u.value=""},H=e.computed(()=>({top:w.value.shouldOpenUp?`${w.value.y-10}px`:`${w.value.y}px`,left:`${w.value.x}px`,width:`${w.value.width}px`,height:`${n.menuHeight}px`}));e.onMounted(()=>{if(y(),n.defaultSelected){const c=g.value.find(p=>p.value===n.defaultSelected);c&&(r.value=c,o("select-item",c))}});const q=e.computed(()=>r.value?r.value.text:"");return(c,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{ref_key:"dropdownRef",ref:i,class:e.normalizeClass(e.unref(d).dropdown)},[c.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass(e.unref(d).dropdown__label),for:c.id},e.toDisplayString(c.label),11,ce)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:e.normalizeClass([e.unref(d).dropdown__valueContent,{[e.unref(d)["dropdown__valueContent--open"]]:t.value}]),onClick:S},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(d).dropdown__value)},e.toDisplayString(q.value),3),c.placeholder&&!q.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(d).dropdown__placeholder)},e.toDisplayString(c.placeholder),3)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{fill:"none",height:"17",viewBox:"0 0 16 17",width:"16",xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass(e.unref(d).dropdown__arrowIcon)},p[2]||(p[2]=[e.createElementVNode("path",{d:"M8 11.2021L4.5359 6.70215L11.4641 6.70215L8 11.2021Z",fill:"#91949F"},null,-1)]),2))],2)],2),t.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"menuRef",ref:_,class:e.normalizeClass(e.unref(d).menu),style:e.normalizeStyle(H.value),onClick:p[1]||(p[1]=e.withModifiers(()=>{},["prevent"]))},[n.searchable?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(d).menu__searchContainer)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(d).menu__searchInputWrap)},[e.withDirectives(e.createElementVNode("input",{type:"text",class:e.normalizeClass([e.unref(d).menu__searchInput,{[e.unref(d)["menu__searchInput--error"]]:u.value}]),placeholder:c.searchPlaceHolder,"onUpdate:modelValue":p[0]||(p[0]=m=>f.value=m),onFocus:N,onInput:M},null,42,_e),[[e.vModelText,f.value]]),u.value?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(e.unref(d).menu__errorMessage)},e.toDisplayString(u.value),3)):e.createCommentVNode("",!0)],2),n.addable?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(e.unref(d).menu__addButton),onClick:j},e.toDisplayString(c.addButtonText),3)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("ul",{class:e.normalizeClass(e.unref(d).menu__itemContainer)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,m=>(e.openBlock(),e.createElementBlock("li",{key:m.value,class:e.normalizeClass([e.unref(d).menu__item,{[e.unref(d)["menu__item--active"]]:r.value&&m.value===r.value.value}]),onClick:I=>V(m)},e.toDisplayString(m.text),11,de))),128))],2)],6)),[[e.unref(a),{handler:B,exclude:[i.value,_.value]}]]):e.createCommentVNode("",!0)],64))}}),me=(s,l,a)=>{const n=s[l];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((o,i)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(i.bind(null,new Error("Unknown variable dynamic import: "+l+(l.split("/").length!==a?". Note that variables only represent file names one level deep.":""))))})},fe=e.defineComponent({__name:"Icon",props:{name:{},size:{default:16},color:{}},setup(s){const l=s,a=e.ref(null);e.watch(()=>l.name,async o=>{try{const i=await me(Object.assign({"./icons/FilledCautionTriangle.vue":()=>Promise.resolve().then(()=>require("./FilledCautionTriangle-0jUaB44V.cjs")),"./icons/FilledCheckCircle.vue":()=>Promise.resolve().then(()=>require("./FilledCheckCircle-DQLU1TQX.cjs")),"./icons/FilledErrorBox.vue":()=>Promise.resolve().then(()=>require("./FilledErrorBox-CEqyivKn.cjs")),"./icons/FilledInfoCircle.vue":()=>Promise.resolve().then(()=>require("./FilledInfoCircle-BMQIRi8R.cjs")),"./icons/LineCheck.vue":()=>Promise.resolve().then(()=>require("./LineCheck-k-NrQe2a.cjs")),"./icons/LoadingCircle.vue":()=>Promise.resolve().then(()=>require("./LoadingCircle-B0ZkG3El.cjs")),"./icons/SmartIcon.vue":()=>Promise.resolve().then(()=>require("./SmartIcon-CSmtxUQk.cjs"))}),`./icons/${o}.vue`,3);a.value=i.default}catch(i){console.warn(`Icon "${o}" not found.`,i),a.value=null}},{immediate:!0});const n=e.computed(()=>typeof l.size=="number"?`${l.size}px`:l.size);return(o,i)=>a.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),{key:0,class:"icon",style:e.normalizeStyle({width:n.value,height:n.value,fill:l.color||"currentColor"})},null,8,["style"])):e.createCommentVNode("",!0)}}),$=(s,l)=>{const a=s.__vccOpts||s;for(const[n,o]of l)a[n]=o;return a},b=$(fe,[["__scopeId","data-v-0439f329"]]),ve="_button__size_default_qxh1r_1",he="_button__size_small_qxh1r_8",we="_button_qxh1r_1",ge="_button__label_qxh1r_191",ke="_button__solid_qxh1r_328",Ce="_segmentGroup_qxh1r_335",be="_fill_qxh1r_357",h={button__size_default:ve,button__size_small:he,button:we,button__label:ge,"button--primary":"_button--primary_qxh1r_206","button--selected":"_button--selected_qxh1r_216","button--secondary":"_button--secondary_qxh1r_229","button--danger":"_button--danger_qxh1r_252","button--warning":"_button--warning_qxh1r_275","button--smart":"_button--smart_qxh1r_298",button__solid:ke,segmentGroup:Ce,"segmentGroup--vertical":"_segmentGroup--vertical_qxh1r_338","segmentGroup--horizontal":"_segmentGroup--horizontal_qxh1r_347",fill:be},ye=["disabled","onClick"],ze=e.defineComponent({__name:"SegmentButton",props:{color:{},size:{default:"default"},align:{default:"horizontal"},disabled:{type:Boolean,default:!1},segments:{},fill:{type:Boolean}},emits:["click"],setup(s,{emit:l}){const a=s,n=l,o=e.ref(""),i=_=>{a.disabled||_.disabled||(o.value=_.value,n("click",_.value))};return(_,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(h).segmentGroup,e.unref(h)[`segmentGroup--${_.align}`],{[e.unref(h).fill]:_.fill}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.segments,r=>(e.openBlock(),e.createElementBlock("button",{key:r.value,class:e.normalizeClass([e.unref(h).button,e.unref(h)[`button--${_.color}`],e.unref(h)[`button__size_${_.size}`],e.unref(h).fill,{[e.unref(h)["button--selected"]]:r.value===o.value}]),disabled:r.disabled||a.disabled,onClick:f=>i(r)},[r.icon?(e.openBlock(),e.createBlock(e.unref(b),{key:0,name:r.icon},null,8,["name"])):e.createCommentVNode("",!0),r.label?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(h).button__label)},e.toDisplayString(r.label),3)):e.createCommentVNode("",!0)],10,ye))),128))],2))}}),Be="_container_2joy4_1",qe="_container__text_2joy4_187",Ie="_container__default_2joy4_191",Ee="_container__warning_2joy4_199",xe="_container__alert_2joy4_207",$e="_container__success_2joy4_215",C={container:Be,container__text:qe,container__default:Ie,container__warning:Ee,container__alert:xe,container__success:$e},Se=e.defineComponent({__name:"OnPageMessage",props:{variant:{default:"default"},text:{}},setup(s){const l=s,a=e.computed(()=>{switch(l.variant){case"alert":return"FilledErrorBox";case"warning":return"FilledCautionTriangle";case"success":return"FilledCheckCircle";default:return"FilledInfoCircle"}});return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(C).container,e.unref(C)[`container__${n.variant}`]])},[e.createVNode(b,{name:a.value,size:24},null,8,["name"]),e.createElementVNode("span",{class:e.normalizeClass(e.unref(C).container__text)},e.toDisplayString(n.text),3)],2))}});exports.Icon=b;exports._export_sfc=$;exports._sfc_main=U;exports._sfc_main$1=pe;exports._sfc_main$2=ze;exports._sfc_main$3=Se;
2
+ //# sourceMappingURL=index-DLeZOhZ7.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DLeZOhZ7.cjs","sources":["../src/components/TextInput/TextInput.vue","../src/directives/clickOutside.ts","../src/utils/search.ts","../src/components/Dropdown/DropdownMenu.vue","../src/components/Icon/Icon.vue","../src/components/SegmentButton/SegmentButton.vue","../src/components/OnPageMessage/OnPageMessage.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { onMounted, ref } from 'vue';\nimport styles from './TextInput.module.scss';\n\nexport interface Props {\n id: string;\n name: string;\n modelValue: string | number;\n label?: string;\n placeholder?: string;\n maxLength?: number;\n maxHeight?: number;\n error?: string;\n multiline?: boolean;\n autoGrow?: boolean;\n counter?: boolean;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n label: '',\n placeholder: '',\n maxLength: undefined,\n maxHeight: undefined,\n error: '',\n multiline: false,\n autoGrow: false,\n});\n\nconst emit = defineEmits<{\n input: [event: Event];\n change: [event: Event];\n paste: [event: ClipboardEvent];\n focus: [event: FocusEvent];\n blur: [event: FocusEvent];\n}>();\n\nconst textareaRef = ref<HTMLTextAreaElement | null>(null);\n\nconst autoGrow = () => {\n if (props.autoGrow && textareaRef.value) {\n textareaRef.value.style.height = '';\n\n const newHeight = Math.min(textareaRef.value.scrollHeight, props.maxHeight || textareaRef.value.scrollHeight);\n\n textareaRef.value.style.height = `${newHeight}px`;\n }\n};\n\nconst handleInput = (event: Event) => {\n emit('input', event);\n\n autoGrow();\n};\n\nonMounted(() => {\n autoGrow();\n});\n</script>\n\n<template>\n <div :class=\"styles.wrapper\">\n <label\n v-if=\"label\"\n :class=\"styles.wrapper__label\"\n :for=\"id\">\n {{ label }}\n </label>\n <template v-if=\"multiline\">\n <textarea\n :id=\"id\"\n ref=\"textareaRef\"\n :class=\"[\n styles.wrapper__field, {\n [styles['wrapper--error']]: error,\n },\n ]\"\n :maxlength=\"maxLength\"\n :name=\"name\"\n :placeholder=\"placeholder\"\n :style=\"maxHeight ? { maxHeight: `${maxHeight}px` } : undefined\"\n :value=\"modelValue\"\n @blur=\"emit('blur', $event)\"\n @change=\"$emit('change', $event)\"\n @focus=\"emit('focus', $event)\"\n @input=\"handleInput\"\n @paste=\"emit('paste', $event)\" />\n </template>\n <template v-else>\n <input\n :id=\"id\"\n type=\"text\"\n :class=\"[\n styles.wrapper__field, {\n [styles['wrapper--error']]: error,\n },\n ]\"\n :maxlength=\"maxLength\"\n :name=\"name\"\n :placeholder=\"placeholder\"\n :value=\"modelValue\"\n @blur=\"emit('blur', $event)\"\n @change=\"$emit('change', $event)\"\n @focus=\"emit('focus', $event)\"\n @input=\"handleInput\"\n @paste=\"emit('paste', $event)\">\n </template>\n\n <div :class=\"styles.wrapper__bottom\">\n <div\n v-if=\"error\"\n :class=\"styles.wrapper__errorMessage\">\n {{ error }}\n </div>\n <div\n v-if=\"counter\"\n :class=\"styles.wrapper__counter\">\n {{ modelValue?.toString().length || 0 }}\n </div>\n </div>\n </div>\n</template>\n","import type { DirectiveBinding } from 'vue';\n\ninterface ClickOutsideElement extends HTMLElement {\n clickOutsideEvent?: (event: Event) => void;\n}\n\nexport default {\n mounted(el: ClickOutsideElement, binding: DirectiveBinding<{ handler: () => void; exclude?: HTMLElement[] }>) {\n el.clickOutsideEvent = (event: Event) => {\n const isClickInside = [el, ...(binding.value.exclude || [])].some(element => {\n return element && (element === event.target || element.contains(event.target as Node))\n });\n\n if (!isClickInside) {\n binding.value.handler(); // Close handler\n }\n };\n\n document.addEventListener('click', el.clickOutsideEvent);\n },\n unmounted(el: ClickOutsideElement) {\n if (el.clickOutsideEvent) {\n document.removeEventListener('click', el.clickOutsideEvent);\n }\n },\n};","const isFuzzyMatch = (choiceValue: string, searchTerm: string): boolean => {\n let searchIndex = 0;\n for (const char of choiceValue) {\n if (char.toLowerCase() === searchTerm[searchIndex]?.toLowerCase()) {\n searchIndex++;\n }\n if (searchIndex === searchTerm.length) {\n return true;\n }\n }\n return false;\n};\n\n\nexport const fuzzySearch = <T>(\n choices: T[],\n key: keyof T,\n searchTerm: string,\n): T[] => {\n if (!searchTerm.trim()) {\n return choices;\n }\n\n const normalizedSearchTerm = searchTerm.toLowerCase();\n\n return choices\n .filter(choice => {\n const value = String(choice[key]);\n\n return isFuzzyMatch(value.toLowerCase(), normalizedSearchTerm)\n })\n .sort((a, b) => {\n const aValue = String(a[key]).toLowerCase();\n const bValue = String(b[key]).toLowerCase();\n\n if (aValue === normalizedSearchTerm) return -1;\n if (bValue === normalizedSearchTerm) return 1;\n\n if (aValue.startsWith(normalizedSearchTerm) && !bValue.startsWith(normalizedSearchTerm))\n return -1;\n if (!aValue.startsWith(normalizedSearchTerm) && bValue.startsWith(normalizedSearchTerm))\n return 1;\n\n return aValue.length - bValue.length;\n });\n};\n","<script lang=\"ts\" setup>\nimport { ref, computed, type StyleValue, onMounted } from 'vue';\nimport clickOutside from '@/directives/clickOutside';\nimport { fuzzySearch } from '@/utils/search';\nimport styles from './Dropdown.module.scss';\n\nconst vClickOutside = clickOutside;\n\ninterface MenuItem {\n text: string;\n value: string;\n}\n\ninterface DropdownProps {\n id: string;\n label?: string;\n defaultSelected?: string;\n menuHeight?: number;\n placeholder?: string;\n addable?: boolean;\n addButtonText?: string;\n searchable?: boolean;\n searchPlaceHolder?: string;\n items: MenuItem[];\n validateAddItem?: (item: string, items: MenuItem[]) => string | null;\n}\n\ninterface Emits {\n (e: 'add-error', error: string): void;\n (e: 'item-added', item: MenuItem): void;\n (e: 'select-item', item: MenuItem): void;\n}\n\nconst props = withDefaults(defineProps<DropdownProps>(), {\n menuHeight: 154,\n searchBar: false,\n addItem: false,\n defaultSelected: '',\n validateAddItem: () => null,\n});\n\nconst emit = defineEmits<Emits>();\nconst dropdownRef = ref<HTMLDivElement>();\nconst menuRef = ref<HTMLDivElement>();\nconst isOpen = ref(true);\nconst selectedItem = ref<MenuItem | null>(null);\nconst searchQuery = ref('');\nconst errorMessage = ref<string | null>(null);\nconst menuPosition = ref({ x: 0, y: 0, width: 0, shouldOpenUp: false, height: props.menuHeight });\nconst filteredItems = ref([...props.items]);\nconst allItems = ref([...props.items]);\n\nconst calculateMenuPosition = () => {\n if (!dropdownRef.value) {\n return;\n }\n\n const { offsetTop: top, offsetLeft: left, offsetWidth: width } = dropdownRef.value;\n const viewportHeight = window.innerHeight;\n const bottom = top + dropdownRef.value.offsetHeight;\n const shouldOpenUp = bottom + props.menuHeight > viewportHeight;\n\n menuPosition.value = {\n x: left + window.scrollX,\n y: shouldOpenUp ? top + window.scrollY : bottom + window.scrollY,\n width,\n shouldOpenUp,\n height: props.menuHeight,\n };\n};\n\nconst toggleMenu = () => {\n calculateMenuPosition();\n isOpen.value = !isOpen.value;\n};\n\nconst resetSettings = () => {\n errorMessage.value = null;\n searchQuery.value = '';\n filteredItems.value = [...allItems.value];\n};\n\nconst closeMenu = () => {\n isOpen.value = false;\n\n resetSettings();\n};\n\nconst selectItem = (item: MenuItem) => {\n selectedItem.value = item;\n searchQuery.value = '';\n\n closeMenu();\n\n emit('select-item', item);\n};\n\nconst addItem = () => {\n const query = searchQuery.value.trim();\n const error = props.validateAddItem(query, allItems.value);\n\n if (error) {\n errorMessage.value = error;\n\n emit('add-error', error);\n\n return;\n }\n\n const newItem: MenuItem = {\n text: query,\n value: query,\n };\n\n allItems.value.push(newItem);\n resetSettings();\n\n emit('item-added', newItem);\n};\n\nconst onSearch = () => {\n filteredItems.value = fuzzySearch<MenuItem>(allItems.value, 'text', searchQuery.value);\n};\n\nconst onFocusSearch = () => {\n errorMessage.value = '';\n};\n\nconst menuStyle = computed<Partial<StyleValue>>(() => ({\n top: menuPosition.value.shouldOpenUp ? `${menuPosition.value.y - 10}px` : `${menuPosition.value.y}px`,\n left: `${menuPosition.value.x}px`,\n width: `${menuPosition.value.width}px`,\n height: `${props.menuHeight}px`,\n}));\n\nonMounted(() => {\n calculateMenuPosition();\n\n if (props.defaultSelected) {\n const defaultItem = allItems.value.find(item => item.value === props.defaultSelected);\n\n if (defaultItem) {\n selectedItem.value = defaultItem;\n emit('select-item', defaultItem);\n }\n }\n});\n\nconst selectedValue = computed(() => (selectedItem.value ? selectedItem.value.text : ''));\n</script>\n\n<template>\n <div\n ref=\"dropdownRef\"\n :class=\"styles.dropdown\">\n <label\n v-if=\"label\"\n :class=\"styles.dropdown__label\"\n :for=\"id\">\n {{ label }}\n </label>\n <button\n :class=\"[\n styles.dropdown__valueContent, {\n [styles['dropdown__valueContent--open']]: isOpen,\n },\n ]\"\n @click=\"toggleMenu\">\n <span :class=\"styles.dropdown__value\">\n {{ selectedValue }}\n </span>\n <span\n v-if=\"placeholder && !selectedValue\"\n :class=\"styles.dropdown__placeholder\">\n {{ placeholder }}\n </span>\n <svg\n fill=\"none\"\n height=\"17\"\n viewBox=\"0 0 16 17\"\n width=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n :class=\"styles.dropdown__arrowIcon\">\n <path\n d=\"M8 11.2021L4.5359 6.70215L11.4641 6.70215L8 11.2021Z\"\n fill=\"#91949F\" />\n </svg>\n </button>\n </div>\n\n <div\n v-if=\"isOpen\"\n ref=\"menuRef\"\n :class=\"styles.menu\"\n :style=\"menuStyle\"\n v-click-outside=\"{ handler: closeMenu, exclude: [dropdownRef, menuRef] }\"\n @click.prevent>\n <div\n v-if=\"props.searchable\"\n :class=\"styles.menu__searchContainer\">\n <div :class=\"styles.menu__searchInputWrap\">\n <input\n type=\"text\"\n :class=\"[\n styles.menu__searchInput, {\n [styles['menu__searchInput--error']]: errorMessage,\n },\n ]\"\n :placeholder=\"searchPlaceHolder\"\n v-model=\"searchQuery\"\n @focus=\"onFocusSearch\"\n @input=\"onSearch\">\n <p\n v-if=\"errorMessage\"\n :class=\"styles.menu__errorMessage\">\n {{ errorMessage }}\n </p>\n </div>\n <button\n v-if=\"props.addable\"\n :class=\"styles.menu__addButton\"\n @click=\"addItem\">\n {{ addButtonText }}\n </button>\n </div>\n <ul :class=\"styles.menu__itemContainer\">\n <li\n v-for=\"(item) in filteredItems\"\n :key=\"item.value\"\n :class=\"[\n styles.menu__item, {\n [styles['menu__item--active']]: selectedItem && item.value === selectedItem.value,\n },\n ]\"\n @click=\"selectItem(item)\">\n {{ item.text }}\n </li>\n </ul>\n </div>\n</template>\n","<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue';\nimport type { IconNames } from '@/components/Icon/types';\n\ninterface IconProps {\n name: IconNames;\n size?: 16 | 24;\n color?: string;\n}\n\nconst props = withDefaults(defineProps<IconProps>(), {\n size: 16,\n});\n\ntype X = (() => Promise<unknown>);\n\nconst iconComponent = ref<null | X>(null);\n\nwatch(\n () => props.name,\n async newName => {\n try {\n const component = await import(`./icons/${newName}.vue`);\n\n iconComponent.value = component.default;\n } catch (error) {\n // eslint-disable-next-line no-console\n console.warn(`Icon \"${newName}\" not found.`, error);\n iconComponent.value = null;\n }\n },\n { immediate: true }\n);\n\nconst iconSize = computed(() => (typeof props.size === 'number' ? `${props.size}px` : props.size));\n</script>\n\n<template>\n <component\n v-if=\"iconComponent\"\n :is=\"iconComponent\"\n class=\"icon\"\n :style=\"{ width: iconSize, height: iconSize, fill: props.color || 'currentColor' }\" />\n</template>\n\n<style scoped>\n.icon {\n display: inline-block;\n line-height: 0;\n vertical-align: middle;\n}\n</style>\n","<script lang=\"ts\" setup>\nimport { ref } from 'vue';\nimport type { IconNames } from '@/components/Icon/types';\nimport { Icon } from '@/index';\nimport styles from './SegmentButton.module.scss';\n\ninterface SegmentType {\n value: string;\n label: string;\n disabled?: boolean;\n icon?: IconNames;\n}\n\ninterface SegmentButtonProps {\n color: 'primary' | 'secondary' | 'danger' | 'warning' | 'smart';\n size?: 'default' | 'small';\n align?: 'vertical' | 'horizontal';\n disabled?: boolean;\n segments: SegmentType[];\n fill?: boolean;\n}\n\nconst props = withDefaults(defineProps<SegmentButtonProps>(), {\n loadingStatus: false,\n successStatus: false,\n disabled: false,\n size: 'default',\n align: 'horizontal',\n});\n\nconst emit = defineEmits<{\n click: [event: SegmentType['value']];\n}>();\n\nconst selected = ref<string>('');\n\nconst setSelect = (segment: SegmentType) => {\n if (props.disabled || segment.disabled) {\n return;\n }\n\n selected.value = segment.value;\n\n emit('click', segment.value);\n};\n</script>\n\n<template>\n <div\n :class=\"[\n styles.segmentGroup,\n styles[`segmentGroup--${align}`],\n { [styles.fill]: fill },\n ]\">\n <button\n v-for=\"segment in segments\"\n :key=\"segment.value\"\n :class=\"[\n styles.button,\n styles[`button--${color}`],\n styles[`button__size_${size}`],\n styles.fill,\n {\n [styles[`button--selected`]]: segment.value === selected,\n },\n ]\"\n :disabled=\"segment.disabled || props.disabled\"\n @click=\"setSelect(segment)\">\n <Icon\n v-if=\"segment.icon\"\n :name=\"segment.icon\" />\n <span\n v-if=\"segment.label\"\n :class=\"styles.button__label\">\n {{ segment.label }}\n </span>\n </button>\n </div>\n</template>\n","<script lang=\"ts\" setup>\nimport { computed } from 'vue';\nimport Icon from '@/components/Icon/Icon.vue';\nimport type { IconNames } from '@/components/Icon/types';\nimport styles from './OnPageMessage.module.scss';\n\ninterface OnPageMessageProps {\n variant?: 'default' | 'warning' | 'alert' | 'success';\n text: string;\n}\n\nconst props = withDefaults(defineProps<OnPageMessageProps>(), {\n variant: 'default',\n});\n\nconst IconName = computed<IconNames>(() => {\n switch (props.variant) {\n case 'alert': return 'FilledErrorBox';\n case 'warning': return 'FilledCautionTriangle';\n case 'success': return 'FilledCheckCircle';\n\n default: return 'FilledInfoCircle';\n }\n});\n</script>\n\n<template>\n <div\n :class=\"[\n styles.container,\n styles[`container__${variant}`],\n ]\">\n <Icon\n :name=\"IconName\"\n :size=\"24\" />\n <span :class=\"styles.container__text\">{{ text }}</span>\n </div>\n</template>\n"],"names":["props","__props","emit","__emit","textareaRef","ref","autoGrow","newHeight","handleInput","event","onMounted","clickOutside","el","binding","element","isFuzzyMatch","choiceValue","searchTerm","searchIndex","char","_a","fuzzySearch","choices","key","normalizedSearchTerm","choice","value","a","b","aValue","bValue","vClickOutside","dropdownRef","menuRef","isOpen","selectedItem","searchQuery","errorMessage","menuPosition","filteredItems","allItems","calculateMenuPosition","top","left","width","viewportHeight","bottom","shouldOpenUp","toggleMenu","resetSettings","closeMenu","selectItem","item","addItem","query","error","newItem","onSearch","onFocusSearch","menuStyle","computed","defaultItem","selectedValue","iconComponent","watch","newName","component","__variableDynamicImportRuntimeHelper","iconSize","selected","setSelect","segment","IconName"],"mappings":"o0BAkBA,MAAMA,EAAQC,EAURC,EAAOC,EAQPC,EAAcC,MAAgC,IAAI,EAElDC,EAAW,IAAM,CACf,GAAAN,EAAM,UAAYI,EAAY,MAAO,CACzBA,EAAA,MAAM,MAAM,OAAS,GAE3B,MAAAG,EAAY,KAAK,IAAIH,E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