@useinsider/ab-components 0.0.15 → 0.0.16

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.
@@ -1,5 +1,5 @@
1
- import { defineComponent as T, computed as S, openBlock as p, createElementBlock as d, normalizeClass as s, unref as o, createBlock as U, createCommentVNode as h, toDisplayString as I, ref as v, reactive as me, onMounted as pe, watch as ie, Fragment as ue, createElementVNode as y, withDirectives as ve, normalizeStyle as F, withModifiers as Te, vModelText as He, renderList as we, createVNode as he, onBeforeUnmount as Le, renderSlot as W, withCtx as ye, nextTick as ge, resolveDynamicComponent as Ve } from "vue";
2
- const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8", Ee = "_button_16zzc_1", We = "_button__label_16zzc_193", De = "_button__solid_16zzc_205", je = "_fill_16zzc_1125", R = {
1
+ import { defineComponent as T, computed as S, openBlock as p, createElementBlock as d, normalizeClass as s, unref as o, createBlock as U, createCommentVNode as z, toDisplayString as I, ref as v, reactive as me, onMounted as pe, watch as oe, Fragment as ue, createElementVNode as $, withDirectives as ve, normalizeStyle as F, withModifiers as Te, vModelText as He, renderList as we, createVNode as he, onBeforeUnmount as Le, renderSlot as W, withCtx as ye, nextTick as ge, resolveDynamicComponent as Ve } from "vue";
2
+ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8", Ee = "_button_16zzc_1", We = "_button__label_16zzc_193", De = "_button__solid_16zzc_205", je = "_fill_16zzc_1125", G = {
3
3
  button__size_default: Oe,
4
4
  button__size_small: Ne,
5
5
  button: Ee,
@@ -54,11 +54,11 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
54
54
  }, c = S(() => a.loadingStatus ? "loading-circle" : a.successStatus ? "line-check-natural" : a.leftIconName);
55
55
  return (r, e) => (p(), d("button", {
56
56
  class: s([
57
- o(R).button,
58
- o(R)[`button__${r.variant}`],
59
- o(R)[`button__${r.variant}-${r.color}`],
60
- o(R)[`button__size_${r.size}`],
61
- { [o(R).fill]: r.fill }
57
+ o(G).button,
58
+ o(G)[`button__${r.variant}`],
59
+ o(G)[`button__${r.variant}-${r.color}`],
60
+ o(G)[`button__size_${r.size}`],
61
+ { [o(G).fill]: r.fill }
62
62
  ]),
63
63
  disabled: a.disabled,
64
64
  onClick: l
@@ -66,15 +66,15 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
66
66
  c.value ? (p(), U(o(Q), {
67
67
  key: 0,
68
68
  name: c.value
69
- }, null, 8, ["name"])) : h("", !0),
69
+ }, null, 8, ["name"])) : z("", !0),
70
70
  r.label ? (p(), d("span", {
71
71
  key: 1,
72
- class: s(o(R).button__label)
73
- }, I(r.label), 3)) : h("", !0),
72
+ class: s(o(G).button__label)
73
+ }, I(r.label), 3)) : z("", !0),
74
74
  r.rightIconName ? (p(), U(o(Q), {
75
75
  key: 2,
76
76
  name: r.rightIconName
77
- }, null, 8, ["name"])) : h("", !0)
77
+ }, null, 8, ["name"])) : z("", !0)
78
78
  ], 10, qe));
79
79
  }
80
80
  }), Ae = {
@@ -104,7 +104,7 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
104
104
  const r = String(l[n]).toLowerCase(), e = String(c[n]).toLowerCase();
105
105
  return r === t ? -1 : e === t ? 1 : r.startsWith(t) && !e.startsWith(t) ? -1 : !r.startsWith(t) && e.startsWith(t) ? 1 : r.length - e.length;
106
106
  });
107
- }, Ye = "_dropdown_c02u6_1", Xe = "_menu_c02u6_1", Fe = "_dropdown__valueContent_c02u6_183", Ue = "_dropdown__label_c02u6_194", Qe = "_dropdown__value_c02u6_183", Ze = "_dropdown__placeholder_c02u6_202", Je = "_dropdown__arrowIcon_c02u6_210", Ke = "_menu__searchContainer_c02u6_225", et = "_menu__searchInputWrap_c02u6_229", tt = "_menu__searchInput_c02u6_229", ot = "_menu__errorMessage_c02u6_251", nt = "_menu__addButton_c02u6_258", rt = "_menu__itemContainer_c02u6_266", at = "_menu__item_c02u6_266", $ = {
107
+ }, Ye = "_dropdown_c02u6_1", Xe = "_menu_c02u6_1", Fe = "_dropdown__valueContent_c02u6_183", Ue = "_dropdown__label_c02u6_194", Qe = "_dropdown__value_c02u6_183", Ze = "_dropdown__placeholder_c02u6_202", Je = "_dropdown__arrowIcon_c02u6_210", Ke = "_menu__searchContainer_c02u6_225", et = "_menu__searchInputWrap_c02u6_229", tt = "_menu__searchInput_c02u6_229", ot = "_menu__errorMessage_c02u6_251", nt = "_menu__addButton_c02u6_258", rt = "_menu__itemContainer_c02u6_266", at = "_menu__item_c02u6_266", k = {
108
108
  dropdown: Ye,
109
109
  menu: Xe,
110
110
  dropdown__valueContent: Fe,
@@ -139,96 +139,102 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
139
139
  },
140
140
  emits: ["update:modelValue", "add-error", "item-added", "select-item"],
141
141
  setup(u, { emit: n }) {
142
- const a = Ae, t = u, l = n, c = v(), r = v(), e = v(!1), i = v(null), f = v(""), b = v(null), B = v({ x: 0, y: 0, width: 0, shouldOpenUp: !1, height: t.menuHeight }), H = me([...t.items]), P = me([...t.items]), q = () => {
142
+ const a = Ae, t = u, l = n, c = v(), r = v(), e = v(!1), _ = v(null), f = v(""), m = v(null), P = v({ x: 0, y: 0, width: 0, shouldOpenUp: !1, height: t.menuHeight }), H = me([...t.items]), B = me([...t.items]), A = () => {
143
143
  if (!c.value)
144
144
  return;
145
- const { offsetTop: m, offsetLeft: k, offsetWidth: z } = c.value, G = window.innerHeight, A = m + c.value.offsetHeight, ee = A + t.menuHeight > G;
146
- B.value = {
147
- x: k + window.scrollX,
148
- y: ee ? m + window.scrollY : A + window.scrollY,
149
- width: z,
145
+ const { offsetTop: b, offsetLeft: h, offsetWidth: g } = c.value, j = window.innerHeight, R = b + c.value.offsetHeight, ee = R + t.menuHeight > j;
146
+ P.value = {
147
+ x: h + window.scrollX,
148
+ y: ee ? b + window.scrollY : R + window.scrollY,
149
+ width: g,
150
150
  shouldOpenUp: ee,
151
151
  height: t.menuHeight
152
152
  };
153
153
  }, C = () => {
154
- q(), e.value = !e.value;
154
+ A(), e.value = !e.value;
155
155
  }, O = () => {
156
- b.value = null, f.value = "", H.splice(0, H.length, ...P);
156
+ m.value = null, f.value = "", H.splice(0, H.length, ...B);
157
157
  }, Z = () => {
158
158
  e.value = !1, O();
159
- }, ne = (m) => {
160
- i.value = m, l("select-item", m), l("update:modelValue", m.value), Z();
159
+ }, re = (b) => {
160
+ _.value = b, l("select-item", b), l("update:modelValue", b.value), Z();
161
161
  }, D = () => {
162
- const m = f.value.trim(), k = t.validateAddItem(m, P);
163
- if (k) {
164
- b.value = k, l("add-error", k);
162
+ const b = f.value.trim(), h = t.validateAddItem(b, B);
163
+ if (h) {
164
+ m.value = h, l("add-error", h);
165
165
  return;
166
166
  }
167
- const z = {
168
- text: m,
169
- value: m
167
+ const g = {
168
+ text: b,
169
+ value: b
170
170
  };
171
- P.push(z), O(), l("item-added", z);
172
- }, re = () => {
173
- const m = Ge(P, "text", f.value);
174
- H.splice(0, H.length, ...m);
171
+ B.push(g), O(), l("item-added", g);
172
+ }, ae = () => {
173
+ const b = Ge(B, "text", f.value);
174
+ H.splice(0, H.length, ...b);
175
175
  }, J = () => {
176
- b.value = "";
177
- }, ae = S(() => ({
178
- top: B.value.shouldOpenUp ? `${B.value.y - 10}px` : `${B.value.y}px`,
179
- left: `${B.value.x}px`,
180
- width: `${B.value.width}px`,
176
+ m.value = "";
177
+ }, le = S(() => ({
178
+ top: P.value.shouldOpenUp ? `${P.value.y - 10}px` : `${P.value.y}px`,
179
+ left: `${P.value.x}px`,
180
+ width: `${P.value.width}px`,
181
181
  height: `${t.menuHeight}px`
182
182
  }));
183
183
  pe(() => {
184
- if (q(), t.modelValue) {
185
- const m = P.find((k) => k.value === t.modelValue);
186
- m && (i.value = m);
184
+ if (A(), t.modelValue) {
185
+ const b = B.find((h) => h.value === t.modelValue);
186
+ b && (_.value = b);
187
187
  }
188
188
  });
189
- const K = S(() => i.value ? i.value.text : "");
190
- return ie(
189
+ const K = S(() => _.value ? _.value.text : "");
190
+ return oe(() => t.modelValue, (b) => {
191
+ var h;
192
+ if (((h = _.value) == null ? void 0 : h.value) !== b) {
193
+ const g = B.find((j) => j.value === b);
194
+ g && (_.value = g);
195
+ }
196
+ }), oe(
191
197
  () => t.items,
192
- (m) => {
193
- P.splice(0, P.length, ...m), H.splice(0, H.length, ...m);
198
+ (b) => {
199
+ B.splice(0, B.length, ...b), H.splice(0, H.length, ...b);
194
200
  },
195
201
  { deep: !0 }
196
- ), (m, k) => (p(), d(ue, null, [
197
- y("div", {
202
+ ), (b, h) => (p(), d(ue, null, [
203
+ $("div", {
198
204
  ref_key: "dropdownRef",
199
205
  ref: c,
200
- class: s(o($).dropdown)
206
+ class: s(o(k).dropdown)
201
207
  }, [
202
- m.label ? (p(), d("label", {
208
+ b.label ? (p(), d("label", {
203
209
  key: 0,
204
- class: s(o($).dropdown__label),
205
- for: m.id
206
- }, I(m.label), 11, lt)) : h("", !0),
207
- y("button", {
210
+ class: s(o(k).dropdown__label),
211
+ for: b.id
212
+ }, I(b.label), 11, lt)) : z("", !0),
213
+ $("button", {
208
214
  class: s([
209
- o($).dropdown__valueContent,
215
+ o(k).dropdown__valueContent,
210
216
  {
211
- [o($)["dropdown__valueContent--open"]]: e.value
217
+ [o(k)["dropdown__valueContent--open"]]: e.value
212
218
  }
213
219
  ]),
214
220
  onClick: C
215
221
  }, [
216
- y("span", {
217
- class: s(o($).dropdown__value)
222
+ $("span", {
223
+ class: s(o(k).dropdown__value)
218
224
  }, I(K.value), 3),
219
- m.placeholder && !K.value ? (p(), d("span", {
225
+ b.placeholder && !K.value ? (p(), d("span", {
220
226
  key: 0,
221
- class: s(o($).dropdown__placeholder)
222
- }, I(m.placeholder), 3)) : h("", !0),
227
+ class: s(o(k).dropdown__placeholder)
228
+ }, I(b.placeholder), 3)) : z("", !0),
223
229
  (p(), d("svg", {
224
230
  fill: "none",
225
231
  height: "17",
226
232
  viewBox: "0 0 16 17",
227
233
  width: "16",
228
234
  xmlns: "http://www.w3.org/2000/svg",
229
- class: s(o($).dropdown__arrowIcon)
230
- }, k[2] || (k[2] = [
231
- y("path", {
235
+ class: s(o(k).dropdown__arrowIcon)
236
+ }, h[2] || (h[2] = [
237
+ $("path", {
232
238
  d: "M8 11.2021L4.5359 6.70215L11.4641 6.70215L8 11.2021Z",
233
239
  fill: "#91949F"
234
240
  }, null, -1)
@@ -239,61 +245,61 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
239
245
  key: 0,
240
246
  ref_key: "menuRef",
241
247
  ref: r,
242
- class: s(o($).menu),
243
- style: F(ae.value),
244
- onClick: k[1] || (k[1] = Te(() => {
248
+ class: s(o(k).menu),
249
+ style: F(le.value),
250
+ onClick: h[1] || (h[1] = Te(() => {
245
251
  }, ["prevent"]))
246
252
  }, [
247
253
  t.searchable ? (p(), d("div", {
248
254
  key: 0,
249
- class: s(o($).menu__searchContainer)
255
+ class: s(o(k).menu__searchContainer)
250
256
  }, [
251
- y("div", {
252
- class: s(o($).menu__searchInputWrap)
257
+ $("div", {
258
+ class: s(o(k).menu__searchInputWrap)
253
259
  }, [
254
- ve(y("input", {
260
+ ve($("input", {
255
261
  type: "text",
256
262
  class: s([
257
- o($).menu__searchInput,
263
+ o(k).menu__searchInput,
258
264
  {
259
- [o($)["menu__searchInput--error"]]: b.value
265
+ [o(k)["menu__searchInput--error"]]: m.value
260
266
  }
261
267
  ]),
262
- placeholder: m.searchPlaceHolder,
263
- "onUpdate:modelValue": k[0] || (k[0] = (z) => f.value = z),
268
+ placeholder: b.searchPlaceHolder,
269
+ "onUpdate:modelValue": h[0] || (h[0] = (g) => f.value = g),
264
270
  onFocus: J,
265
- onInput: re
271
+ onInput: ae
266
272
  }, null, 42, st), [
267
273
  [He, f.value]
268
274
  ]),
269
- b.value ? (p(), d("p", {
275
+ m.value ? (p(), d("p", {
270
276
  key: 0,
271
- class: s(o($).menu__errorMessage)
272
- }, I(b.value), 3)) : h("", !0)
277
+ class: s(o(k).menu__errorMessage)
278
+ }, I(m.value), 3)) : z("", !0)
273
279
  ], 2),
274
280
  t.addable ? (p(), d("button", {
275
281
  key: 0,
276
- class: s(o($).menu__addButton),
282
+ class: s(o(k).menu__addButton),
277
283
  onClick: D
278
- }, I(m.addButtonText), 3)) : h("", !0)
279
- ], 2)) : h("", !0),
280
- y("ul", {
281
- class: s(o($).menu__itemContainer)
284
+ }, I(b.addButtonText), 3)) : z("", !0)
285
+ ], 2)) : z("", !0),
286
+ $("ul", {
287
+ class: s(o(k).menu__itemContainer)
282
288
  }, [
283
- (p(!0), d(ue, null, we(H, (z, G) => (p(), d("li", {
284
- key: `${z.value}-${G}`,
289
+ (p(!0), d(ue, null, we(H, (g, j) => (p(), d("li", {
290
+ key: `${g.value}-${j}`,
285
291
  class: s([
286
- o($).menu__item,
292
+ o(k).menu__item,
287
293
  {
288
- [o($)["menu__item--active"]]: i.value && z.value === i.value.value
294
+ [o(k)["menu__item--active"]]: _.value && g.value === _.value.value
289
295
  }
290
296
  ]),
291
- onClick: (A) => ne(z)
292
- }, I(z.text), 11, _t))), 128))
297
+ onClick: (R) => re(g)
298
+ }, I(g.text), 11, _t))), 128))
293
299
  ], 2)
294
300
  ], 6)), [
295
301
  [o(a), { handler: Z, exclude: [c.value, r.value] }]
296
- ]) : h("", !0)
302
+ ]) : z("", !0)
297
303
  ], 64));
298
304
  }
299
305
  }), it = ["fill", "height", "width"], ut = ["xlink:href"], pt = /* @__PURE__ */ T({
@@ -311,7 +317,7 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
311
317
  height: a.value,
312
318
  width: a.value
313
319
  }, [
314
- y("use", {
320
+ $("use", {
315
321
  "xlink:href": `#${t.name}`
316
322
  }, null, 8, ut)
317
323
  ], 8, it));
@@ -321,7 +327,7 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
321
327
  for (const [t, l] of n)
322
328
  a[t] = l;
323
329
  return a;
324
- }, Q = /* @__PURE__ */ ct(pt, [["__scopeId", "data-v-f04c8857"]]), dt = "_container_pab2j_1", ft = "_container__text_pab2j_185", bt = "_container__default_pab2j_189", mt = "_container__warning_pab2j_197", vt = "_container__alert_pab2j_205", gt = "_container__success_pab2j_213", _e = {
330
+ }, Q = /* @__PURE__ */ ct(pt, [["__scopeId", "data-v-f04c8857"]]), dt = "_container_pab2j_1", ft = "_container__text_pab2j_185", bt = "_container__default_pab2j_189", mt = "_container__warning_pab2j_197", vt = "_container__alert_pab2j_205", gt = "_container__success_pab2j_213", ie = {
325
331
  container: dt,
326
332
  container__text: ft,
327
333
  container__default: bt,
@@ -349,16 +355,16 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
349
355
  });
350
356
  return (t, l) => (p(), d("div", {
351
357
  class: s([
352
- o(_e).container,
353
- o(_e)[`container__${t.variant}`]
358
+ o(ie).container,
359
+ o(ie)[`container__${t.variant}`]
354
360
  ])
355
361
  }, [
356
362
  he(Q, {
357
363
  name: a.value,
358
364
  size: 24
359
365
  }, null, 8, ["name"]),
360
- y("span", {
361
- class: s(o(_e).container__text)
366
+ $("span", {
367
+ class: s(o(ie).container__text)
362
368
  }, I(t.text), 3)
363
369
  ], 2));
364
370
  }
@@ -394,21 +400,21 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
394
400
  const a = u, t = n, l = v(a.modelValue || ""), c = (e) => {
395
401
  a.disabled || e.disabled || (l.value = e.value, t("update:modelValue", e.value), t("click", e.value));
396
402
  };
397
- ie(() => a.modelValue, (e) => {
403
+ oe(() => a.modelValue, (e) => {
398
404
  l.value !== e && (l.value = e || "");
399
405
  });
400
406
  const r = v([...a.segments]);
401
- return ie(() => a.segments, (e) => {
402
- r.value = [...e], e.some((i) => i.value === l.value) || (l.value = "", t("update:modelValue", ""));
403
- }, { deep: !0 }), (e, i) => (p(), d("div", {
407
+ return oe(() => a.segments, (e) => {
408
+ r.value = [...e], e.some((_) => _.value === l.value) || (l.value = "", t("update:modelValue", ""));
409
+ }, { deep: !0 }), (e, _) => (p(), d("div", {
404
410
  class: s([
405
411
  o(L).segmentGroup,
406
412
  o(L)[`segmentGroup--${e.align}`],
407
413
  { [o(L).fill]: e.fill }
408
414
  ])
409
415
  }, [
410
- (p(!0), d(ue, null, we(r.value, (f, b) => (p(), d("button", {
411
- key: `${f.value}-${b}`,
416
+ (p(!0), d(ue, null, we(r.value, (f, m) => (p(), d("button", {
417
+ key: `${f.value}-${m}`,
412
418
  class: s([
413
419
  o(L).button,
414
420
  o(L)[`button--${e.color}`],
@@ -419,16 +425,16 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
419
425
  }
420
426
  ]),
421
427
  disabled: f.disabled || a.disabled,
422
- onClick: (B) => c(f)
428
+ onClick: (P) => c(f)
423
429
  }, [
424
430
  f.icon ? (p(), U(o(Q), {
425
431
  key: 0,
426
432
  name: f.icon
427
- }, null, 8, ["name"])) : h("", !0),
433
+ }, null, 8, ["name"])) : z("", !0),
428
434
  f.label ? (p(), d("span", {
429
435
  key: 1,
430
436
  class: s(o(L).button__label)
431
- }, I(f.label), 3)) : h("", !0)
437
+ }, I(f.label), 3)) : z("", !0)
432
438
  ], 10, Ct))), 128))
433
439
  ], 2));
434
440
  }
@@ -464,12 +470,12 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
464
470
  l.value.style.height = `${e}px`;
465
471
  }
466
472
  }, r = (e) => {
467
- const i = e.target;
468
- t("input", e), t("update:modelValue", i.value), c();
473
+ const _ = e.target;
474
+ t("input", e), t("update:modelValue", _.value), c();
469
475
  };
470
476
  return pe(() => {
471
477
  c();
472
- }), (e, i) => {
478
+ }), (e, _) => {
473
479
  var f;
474
480
  return p(), d("div", {
475
481
  class: s(o(V).wrapper)
@@ -478,7 +484,7 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
478
484
  key: 0,
479
485
  class: s(o(V).wrapper__label),
480
486
  for: e.id
481
- }, I(e.label), 11, Ht)) : h("", !0),
487
+ }, I(e.label), 11, Ht)) : z("", !0),
482
488
  e.multiline ? (p(), d("textarea", {
483
489
  key: 1,
484
490
  id: e.id,
@@ -495,11 +501,11 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
495
501
  placeholder: e.placeholder,
496
502
  style: F(e.maxHeight ? { maxHeight: `${e.maxHeight}px` } : void 0),
497
503
  value: e.modelValue,
498
- onBlur: i[0] || (i[0] = (b) => t("blur", b)),
499
- onChange: i[1] || (i[1] = (b) => e.$emit("change", b)),
500
- onFocus: i[2] || (i[2] = (b) => t("focus", b)),
504
+ onBlur: _[0] || (_[0] = (m) => t("blur", m)),
505
+ onChange: _[1] || (_[1] = (m) => e.$emit("change", m)),
506
+ onFocus: _[2] || (_[2] = (m) => t("focus", m)),
501
507
  onInput: r,
502
- onPaste: i[3] || (i[3] = (b) => t("paste", b))
508
+ onPaste: _[3] || (_[3] = (m) => t("paste", m))
503
509
  }, null, 46, Lt)) : (p(), d("input", {
504
510
  key: 2,
505
511
  id: e.id,
@@ -514,23 +520,23 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
514
520
  name: e.name,
515
521
  placeholder: e.placeholder,
516
522
  value: e.modelValue,
517
- onBlur: i[4] || (i[4] = (b) => t("blur", b)),
518
- onChange: i[5] || (i[5] = (b) => e.$emit("change", b)),
519
- onFocus: i[6] || (i[6] = (b) => t("focus", b)),
523
+ onBlur: _[4] || (_[4] = (m) => t("blur", m)),
524
+ onChange: _[5] || (_[5] = (m) => e.$emit("change", m)),
525
+ onFocus: _[6] || (_[6] = (m) => t("focus", m)),
520
526
  onInput: r,
521
- onPaste: i[7] || (i[7] = (b) => t("paste", b))
527
+ onPaste: _[7] || (_[7] = (m) => t("paste", m))
522
528
  }, null, 42, Vt)),
523
- y("div", {
529
+ $("div", {
524
530
  class: s(o(V).wrapper__bottom)
525
531
  }, [
526
532
  e.error ? (p(), d("div", {
527
533
  key: 0,
528
534
  class: s(o(V).wrapper__errorMessage)
529
- }, I(e.error), 3)) : h("", !0),
535
+ }, I(e.error), 3)) : z("", !0),
530
536
  e.counter ? (p(), d("div", {
531
537
  key: 1,
532
538
  class: s(o(V).wrapper__counter)
533
- }, I(((f = e.modelValue) == null ? void 0 : f.toString().length) || 0), 3)) : h("", !0)
539
+ }, I(((f = e.modelValue) == null ? void 0 : f.toString().length) || 0), 3)) : z("", !0)
534
540
  ], 2)
535
541
  ], 2);
536
542
  };
@@ -564,17 +570,17 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
564
570
  emits: ["update:modelValue", "input", "change", "paste", "focus", "blur"],
565
571
  setup(u, { emit: n }) {
566
572
  const a = u, t = n, l = (r) => {
567
- var i, f;
573
+ var _, f;
568
574
  if (r === "")
569
575
  return r;
570
576
  const e = Number(r);
571
- return typeof a.min == "number" && e < a.min ? (i = a.min) == null ? void 0 : i.toString() : typeof a.max == "number" && e > a.max ? (f = a.max) == null ? void 0 : f.toString() : e.toString();
577
+ return typeof a.min == "number" && e < a.min ? (_ = a.min) == null ? void 0 : _.toString() : typeof a.max == "number" && e > a.max ? (f = a.max) == null ? void 0 : f.toString() : e.toString();
572
578
  }, c = (r) => {
573
- const e = r.target, i = l(e.value);
574
- e.value = i, t("input", r), t("update:modelValue", Number(i));
579
+ const e = r.target, _ = l(e.value);
580
+ e.value = _, t("input", r), t("update:modelValue", Number(_));
575
581
  };
576
582
  return (r, e) => {
577
- var i;
583
+ var _;
578
584
  return p(), d("div", {
579
585
  class: s([o(N).wrapper, o(N)[`wrapper__size_${r.size}`]])
580
586
  }, [
@@ -582,8 +588,8 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
582
588
  key: 0,
583
589
  class: s(o(N).wrapper__label),
584
590
  for: r.id
585
- }, I(r.label), 11, Rt)) : h("", !0),
586
- y("input", {
591
+ }, I(r.label), 11, Rt)) : z("", !0),
592
+ $("input", {
587
593
  id: r.id,
588
594
  type: "number",
589
595
  class: s([
@@ -611,12 +617,12 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
611
617
  r.error ? (p(), d("div", {
612
618
  key: 0,
613
619
  class: s(o(N).wrapper__errorMessage)
614
- }, I(r.error), 3)) : h("", !0),
620
+ }, I(r.error), 3)) : z("", !0),
615
621
  r.counter ? (p(), d("div", {
616
622
  key: 1,
617
623
  class: s(o(N).wrapper__counter)
618
- }, I(((i = r.modelValue) == null ? void 0 : i.toString().length) || 0), 3)) : h("", !0)
619
- ], 2)) : h("", !0)
624
+ }, I(((_ = r.modelValue) == null ? void 0 : _.toString().length) || 0), 3)) : z("", !0)
625
+ ], 2)) : z("", !0)
620
626
  ], 2);
621
627
  };
622
628
  }
@@ -648,7 +654,7 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
648
654
  }
649
655
  ])
650
656
  }, [
651
- y("input", {
657
+ $("input", {
652
658
  id: c.id,
653
659
  type: "checkbox",
654
660
  checked: c.checked,
@@ -657,7 +663,7 @@ const Oe = "_button__size_default_16zzc_1", Ne = "_button__size_small_16zzc_8",
657
663
  name: c.name,
658
664
  onClick: l
659
665
  }, null, 10, Zt),
660
- y("label", {
666
+ $("label", {
661
667
  class: s(o(X).wrapper__label),
662
668
  for: c.id
663
669
  }, null, 10, Jt)
@@ -712,113 +718,113 @@ const eo = "_wrapper__box_1avga_1", to = "_wrapper_1avga_1", oo = "_wrapper__ico
712
718
  absolutePosition: { type: [Boolean, null, String, Object, Array] }
713
719
  },
714
720
  setup(u) {
715
- const n = u, a = v(null), t = v("center"), l = v("bottom"), c = v("center"), r = v(!1), e = v(""), i = v(!1), f = v(!1), b = v(""), B = v("d-n"), H = v(null), P = v(null), q = v(null), C = S(() => n.staticPosition.split(" ")[0]), O = S(() => n.staticPosition.split(" ")[1]), Z = S(() => n.iconName ? "mt-1" : "mt-0"), ne = S(() => n.preventXss ? Kt(n.text) : n.text), D = S(() => n.absolutePositionStatus ? n.absoluteTrianglePosition : n.dynamicPosition && r.value ? l.value === "bottom" ? "top" : "bottom" : C.value === "top" ? "bottom" : C.value === "bottom" ? "top" : C.value === "left" ? "right" : C.value === "right" ? "left" : "bottom"), re = S(() => n.absolutePositionStatus ? "" : i.value && f.value || b.value === "icon" && i.value ? "opa-1" : "opa-0"), J = S(() => n.absolutePositionStatus ? n.absoluteTriangleAlignment : n.dynamicPosition && r.value ? t.value === "center" ? "center" : t.value === "end" ? "end" : t.value === "start" ? "start" : c.value : O.value === "center" ? "center" : O.value === "left" || O.value === "top" ? "start" : O.value === "right" || O.value === "bottom" ? "end" : "center"), ae = S(() => n.absolutePositionStatus ? "" : n.dynamicPosition && r.value ? E[`wrapper__box_${l.value}-${t.value}`] : E[`wrapper__box_${C.value}-${J.value}`]), K = S(() => n.offsetX === 0 && n.offsetY === 0 ? {} : n.dynamicPosition ? {
721
+ const n = u, a = v(null), t = v("center"), l = v("bottom"), c = v("center"), r = v(!1), e = v(""), _ = v(!1), f = v(!1), m = v(""), P = v("d-n"), H = v(null), B = v(null), A = v(null), C = S(() => n.staticPosition.split(" ")[0]), O = S(() => n.staticPosition.split(" ")[1]), Z = S(() => n.iconName ? "mt-1" : "mt-0"), re = S(() => n.preventXss ? Kt(n.text) : n.text), D = S(() => n.absolutePositionStatus ? n.absoluteTrianglePosition : n.dynamicPosition && r.value ? l.value === "bottom" ? "top" : "bottom" : C.value === "top" ? "bottom" : C.value === "bottom" ? "top" : C.value === "left" ? "right" : C.value === "right" ? "left" : "bottom"), ae = S(() => n.absolutePositionStatus ? "" : _.value && f.value || m.value === "icon" && _.value ? "opa-1" : "opa-0"), J = S(() => n.absolutePositionStatus ? n.absoluteTriangleAlignment : n.dynamicPosition && r.value ? t.value === "center" ? "center" : t.value === "end" ? "end" : t.value === "start" ? "start" : c.value : O.value === "center" ? "center" : O.value === "left" || O.value === "top" ? "start" : O.value === "right" || O.value === "bottom" ? "end" : "center"), le = S(() => n.absolutePositionStatus ? "" : n.dynamicPosition && r.value ? E[`wrapper__box_${l.value}-${t.value}`] : E[`wrapper__box_${C.value}-${J.value}`]), K = S(() => n.offsetX === 0 && n.offsetY === 0 ? {} : n.dynamicPosition ? {
716
722
  [`margin-${l.value === "bottom" ? "top" : "bottom"}`]: `${n.offsetY}px`
717
723
  } : D.value === "top" || D.value === "bottom" ? {
718
724
  [`margin-${D.value}`]: `${n.offsetY}px`
719
- } : { [`margin-${D.value}`]: `${n.offsetX}px` }), m = (_) => {
720
- const { offsetTop: g, offsetLeft: w, offsetWidth: M, offsetHeight: Y } = _, j = g + Y, se = w + M;
725
+ } : { [`margin-${D.value}`]: `${n.offsetX}px` }), b = (i) => {
726
+ const { offsetTop: w, offsetLeft: y, offsetWidth: M, offsetHeight: Y } = i, q = w + Y, _e = y + M;
721
727
  return {
722
- top: g,
723
- left: w,
728
+ top: w,
729
+ left: y,
724
730
  width: M,
725
- bottom: j,
726
- right: se
731
+ bottom: q,
732
+ right: _e
727
733
  };
728
- }, k = (_, g, w = !1) => {
729
- if (!_ || !P.value)
734
+ }, h = (i, w, y = !1) => {
735
+ if (!i || !B.value)
730
736
  return { left: !1, right: !1, top: !1, bottom: !1, center: !1 };
731
- const M = { left: 0, right: 0, top: 0, bottom: 0, width: 0, height: 0 }, Y = P.value.offsetHeight, j = window.innerWidth, se = window.innerHeight, ce = _.offsetHeight, te = _.offsetWidth || 264, x = g && m(g) || M, de = w ? x == null ? void 0 : x.right : x == null ? void 0 : x.left, fe = w ? x == null ? void 0 : x.top : x == null ? void 0 : x.bottom, Ie = de + x.width + te + n.offsetX < j, Be = de + x.width / 2 - (te + n.offsetX) > 10, Pe = fe + ce < se - n.offsetY, Me = fe - (ce + Y + n.offsetY) > 0;
737
+ const M = { left: 0, right: 0, top: 0, bottom: 0, width: 0, height: 0 }, Y = B.value.offsetHeight, q = window.innerWidth, _e = window.innerHeight, ce = i.offsetHeight, te = i.offsetWidth || 264, x = w && b(w) || M, de = y ? x == null ? void 0 : x.right : x == null ? void 0 : x.left, fe = y ? x == null ? void 0 : x.top : x == null ? void 0 : x.bottom, Ie = de + x.width + te + n.offsetX < q, Be = de + x.width / 2 - (te + n.offsetX) > 10, Pe = fe + ce < _e - n.offsetY, Me = fe - (ce + Y + n.offsetY) > 0;
732
738
  let be = !1;
733
- return n.iconName && (be = x.right + te / 2 < j && x.left - (te + n.offsetX) / 2 >= 10), {
739
+ return n.iconName && (be = x.right + te / 2 < q && x.left - (te + n.offsetX) / 2 >= 10), {
734
740
  left: Be,
735
741
  right: Ie,
736
742
  bottom: Pe,
737
743
  top: Me,
738
744
  center: be
739
745
  };
740
- }, z = () => {
746
+ }, g = () => {
741
747
  ge(() => {
742
- var j;
748
+ var q;
743
749
  r.value = !0;
744
- const { bottom: _, left: g, right: w, top: M, center: Y } = k(
745
- q.value,
746
- (j = q.value) == null ? void 0 : j.parentNode
750
+ const { bottom: i, left: w, right: y, top: M, center: Y } = h(
751
+ A.value,
752
+ (q = A.value) == null ? void 0 : q.parentNode
747
753
  );
748
754
  if (Y) {
749
- t.value = "center", l.value = _ && !M ? "bottom" : "top";
755
+ t.value = "center", l.value = i && !M ? "bottom" : "top";
750
756
  return;
751
757
  }
752
- if (_ && g && w && M) {
758
+ if (i && w && y && M) {
753
759
  t.value = "center", l.value = "top";
754
760
  return;
755
761
  }
756
- if (M && !_) {
757
- if (w && g) {
762
+ if (M && !i) {
763
+ if (y && w) {
758
764
  t.value = "center", l.value = "top";
759
765
  return;
760
766
  }
761
- if (w && !g) {
767
+ if (y && !w) {
762
768
  t.value = "start", l.value = "top";
763
769
  return;
764
770
  }
765
- if (!w && g) {
771
+ if (!y && w) {
766
772
  t.value = "end", l.value = "top";
767
773
  return;
768
774
  }
769
775
  }
770
- if (_ && M) {
771
- if (!w && g) {
776
+ if (i && M) {
777
+ if (!y && w) {
772
778
  t.value = "end", l.value = "top", c.value = "end";
773
779
  return;
774
780
  }
775
- if (w && !g) {
781
+ if (y && !w) {
776
782
  t.value = "start", l.value = "top", c.value = "start";
777
783
  return;
778
784
  }
779
785
  }
780
- if (_ && !M) {
781
- if (w && g) {
786
+ if (i && !M) {
787
+ if (y && w) {
782
788
  t.value = "center", l.value = "bottom", c.value = "top";
783
789
  return;
784
790
  }
785
- if (!w && g) {
791
+ if (!y && w) {
786
792
  t.value = "end", l.value = "bottom", c.value = "top";
787
793
  return;
788
794
  }
789
- w && !g && (t.value = "start", l.value = "bottom", c.value = "top");
795
+ y && !w && (t.value = "start", l.value = "bottom", c.value = "top");
790
796
  }
791
797
  });
792
- }, G = (_) => {
793
- if (!(_ instanceof HTMLElement))
798
+ }, j = (i) => {
799
+ if (!(i instanceof HTMLElement))
794
800
  return !1;
795
- const g = _.scrollHeight > _.offsetHeight, w = window.getComputedStyle(_).overflowY, M = ["auto", "scroll"].includes(w);
796
- return g && M;
797
- }, A = (_) => {
798
- const g = (_ == null ? void 0 : _.nodeType) === Node.COMMENT_NODE, w = (_ == null ? void 0 : _.nodeType) === Node.DOCUMENT_NODE;
799
- return !_ || g || w ? document : G(_) ? _ : A(_.parentNode);
801
+ const w = i.scrollHeight > i.offsetHeight, y = window.getComputedStyle(i).overflowY, M = ["auto", "scroll"].includes(y);
802
+ return w && M;
803
+ }, R = (i) => {
804
+ const w = (i == null ? void 0 : i.nodeType) === Node.COMMENT_NODE, y = (i == null ? void 0 : i.nodeType) === Node.DOCUMENT_NODE;
805
+ return !i || w || y ? document : j(i) ? i : R(i.parentNode);
800
806
  }, ee = () => {
801
- var _;
802
- (_ = H.value) == null || _.removeEventListener("scroll", z), window == null || window.removeEventListener("resize", z);
807
+ var i;
808
+ (i = H.value) == null || i.removeEventListener("scroll", g), window == null || window.removeEventListener("resize", g);
803
809
  }, ze = () => {
804
810
  ge(() => {
805
- var _;
806
- H.value = A(P.value), (_ = H.value) == null || _.addEventListener("scroll", z), window == null || window.addEventListener("resize", z);
811
+ var i;
812
+ H.value = R(B.value), (i = H.value) == null || i.addEventListener("scroll", g), window == null || window.addEventListener("resize", g);
807
813
  });
808
814
  }, $e = () => {
809
- b.value = "wrapper", B.value = "d-b", i.value = !0;
810
- }, le = () => {
811
- b.value = "icon", B.value = "d-b", f.value = !0;
815
+ m.value = "wrapper", P.value = "d-b", _.value = !0;
816
+ }, se = () => {
817
+ m.value = "icon", P.value = "d-b", f.value = !0;
812
818
  }, ke = () => {
813
819
  f.value = !1;
814
820
  }, xe = () => {
815
- b.value = "", i.value = !1, f.value = !1;
821
+ m.value = "", _.value = !1, f.value = !1;
816
822
  }, Ce = () => {
817
823
  xe(), n.dynamicPosition ? l.value === "bottom" ? e.value = "bottom-leave" : l.value === "top" && (e.value = "top-leave") : C.value === "top" ? e.value = "top-leave" : C.value === "bottom" ? e.value = "bottom-leave" : C.value === "left" ? e.value = "left-leave" : C.value === "right" && (e.value = "right-leave"), setTimeout(() => {
818
- e.value = "", B.value = "d-n";
824
+ e.value = "", P.value = "d-n";
819
825
  }, n.absolutePositionStatus ? 0 : 250);
820
826
  }, Se = () => {
821
- $e(), z(), n.dynamicPosition ? l.value === "bottom" ? e.value = "top-entrance" : l.value === "top" && (e.value = "bottom-entrance") : C.value === "top" ? e.value = "bottom-entrance" : C.value === "bottom" ? e.value = "top-entrance" : C.value === "left" ? e.value = "right-entrance" : C.value === "right" && (e.value = "left-entrance"), setTimeout(() => {
827
+ $e(), g(), n.dynamicPosition ? l.value === "bottom" ? e.value = "top-entrance" : l.value === "top" && (e.value = "bottom-entrance") : C.value === "top" ? e.value = "bottom-entrance" : C.value === "bottom" ? e.value = "top-entrance" : C.value === "left" ? e.value = "right-entrance" : C.value === "right" && (e.value = "left-entrance"), setTimeout(() => {
822
828
  e.value = "";
823
829
  }, 250);
824
830
  };
@@ -826,36 +832,36 @@ const eo = "_wrapper__box_1avga_1", to = "_wrapper_1avga_1", oo = "_wrapper__ico
826
832
  n.dynamicPosition && ze();
827
833
  }), Le(() => {
828
834
  ee();
829
- }), (_, g) => (p(), d("div", {
830
- id: _.id,
835
+ }), (i, w) => (p(), d("div", {
836
+ id: i.id,
831
837
  ref_key: "tooltipRootRef",
832
- ref: P,
838
+ ref: B,
833
839
  class: s(o(E).wrapper),
834
840
  onMouseenter: Se,
835
841
  onMouseleave: Ce
836
842
  }, [
837
- _.iconName ? (p(), U(o(Q), {
843
+ i.iconName ? (p(), U(o(Q), {
838
844
  key: 0,
839
845
  ref_key: "tooltipIconRef",
840
846
  ref: a,
841
847
  class: s(o(E).wrapper__icon),
842
- name: _.iconName,
843
- onMouseenter: le,
848
+ name: i.iconName,
849
+ onMouseenter: se,
844
850
  onMouseleave: ke
845
851
  }, null, 8, ["class", "name"])) : (p(), d("div", {
846
852
  key: 1,
847
853
  class: s(o(E).wrapper__icon),
848
- onMouseenter: le,
849
- onMouseleave: le
854
+ onMouseenter: se,
855
+ onMouseleave: se
850
856
  }, [
851
- W(_.$slots, "triggerElement")
857
+ W(i.$slots, "triggerElement")
852
858
  ], 34)),
853
- _.status ? (p(), d("div", {
859
+ i.status ? (p(), d("div", {
854
860
  key: 2,
855
861
  ref_key: "tooltipPopupRef",
856
- ref: q,
857
- class: s([o(E).wrapper__box, ae.value, re.value, B.value]),
858
- style: F(_.absolutePosition)
862
+ ref: A,
863
+ class: s([o(E).wrapper__box, le.value, ae.value, P.value]),
864
+ style: F(i.absolutePosition)
859
865
  }, [
860
866
  he(o(uo), {
861
867
  "border-triangle": "",
@@ -865,20 +871,20 @@ const eo = "_wrapper__box_1avga_1", to = "_wrapper_1avga_1", oo = "_wrapper__ico
865
871
  style: F(K.value)
866
872
  }, {
867
873
  default: ye(() => [
868
- y("div", {
874
+ $("div", {
869
875
  class: s(o(E).wrapper__text),
870
- style: F({ maxHeight: `${_.maxHeight}px`, overflowY: "auto" })
876
+ style: F({ maxHeight: `${i.maxHeight}px`, overflowY: "auto" })
871
877
  }, [
872
- y("div", { innerHTML: ne.value }, null, 8, ao),
873
- W(_.$slots, "contentSlot")
878
+ $("div", { innerHTML: re.value }, null, 8, ao),
879
+ W(i.$slots, "contentSlot")
874
880
  ], 6)
875
881
  ]),
876
882
  _: 3
877
883
  }, 8, ["border-triangle-align", "border-triangle-position", "class", "style"])
878
- ], 6)) : h("", !0)
884
+ ], 6)) : z("", !0)
879
885
  ], 42, ro));
880
886
  }
881
- }), lo = "_box_14qkh_169", so = "_flipBox_14qkh_257", oe = {
887
+ }), lo = "_box_14qkh_169", so = "_flipBox_14qkh_257", ne = {
882
888
  box: lo,
883
889
  "box_top-start": "_box_top-start_14qkh_173",
884
890
  "box_top-center": "_box_top-center_14qkh_173",
@@ -905,13 +911,13 @@ const eo = "_wrapper__box_1avga_1", to = "_wrapper_1avga_1", oo = "_wrapper__ico
905
911
  emits: ["click"],
906
912
  setup(u, { emit: n }) {
907
913
  const a = u, t = n, l = S(
908
- () => a.borderTriangle ? oe[`box_${a.borderTrianglePosition}-${a.borderTriangleAlign}`] : ""
914
+ () => a.borderTriangle ? ne[`box_${a.borderTrianglePosition}-${a.borderTriangleAlign}`] : ""
909
915
  );
910
916
  function c() {
911
917
  t("click");
912
918
  }
913
919
  return (r, e) => (p(), d("div", {
914
- class: s([o(oe).box, l.value, r.border, r.borderRadius]),
920
+ class: s([o(ne).box, l.value, r.border, r.borderRadius]),
915
921
  onClick: c
916
922
  }, [
917
923
  W(r.$slots, "default")
@@ -924,15 +930,15 @@ const eo = "_wrapper__box_1avga_1", to = "_wrapper_1avga_1", oo = "_wrapper__ico
924
930
  },
925
931
  setup(u) {
926
932
  return (n, a) => (p(), d("div", {
927
- class: s([o(oe).flipBox, n.boxSpacing])
933
+ class: s([o(ne).flipBox, n.boxSpacing])
928
934
  }, [
929
- y("div", null, [
930
- y("div", {
931
- class: s([o(oe).box, n.boxSpacing])
935
+ $("div", null, [
936
+ $("div", {
937
+ class: s([o(ne).box, n.boxSpacing])
932
938
  }, [
933
939
  W(n.$slots, "front")
934
940
  ], 2),
935
- y("div", {
941
+ $("div", {
936
942
  class: s([n.boxSpacing])
937
943
  }, [
938
944
  W(n.$slots, "reverse")