welcome-ui 0.0.0-dev.1763740954427 → 0.0.0-dev.1763744022817

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.
@@ -16,8 +16,8 @@ import { C as mr, u as fr } from "./KPUWHTQJ-Dv3cAqjP.js";
16
16
  import { u as pr } from "./SQZLCNLX-Dg4KKdNJ.js";
17
17
  import { c as vr, u as hr } from "./B7UTNDHN-BghjolIs.js";
18
18
  import { Checkbox as br } from "./Checkbox.js";
19
- import { Radio as wr } from "./Radio.js";
20
- import { Toggle as gr } from "./Toggle.js";
19
+ import { Radio as gr } from "./Radio.js";
20
+ import { Toggle as wr } from "./Toggle.js";
21
21
  import { Icon as Qe } from "./Icon.js";
22
22
  import { InputText as Cr } from "./InputText.js";
23
23
  var kr = "hr", Xe = _(
@@ -100,16 +100,16 @@ var Pe = _(function(t) {
100
100
  if (u == null || u(l), l.defaultPrevented || !o || !e) return;
101
101
  if (!Sr(l))
102
102
  return pe();
103
- const { renderedItems: b, items: p, activeId: i, id: C } = e.getState();
103
+ const { renderedItems: h, items: p, activeId: i, id: C } = e.getState();
104
104
  let v = Ir(
105
- p.length > b.length ? p : b
105
+ p.length > h.length ? p : h
106
106
  );
107
- const h = Ue(l.currentTarget), M = `[data-offscreen-id="${C}"]`, w = h.querySelectorAll(M);
108
- for (const S of w) {
107
+ const b = Ue(l.currentTarget), M = `[data-offscreen-id="${C}"]`, g = b.querySelectorAll(M);
108
+ for (const S of g) {
109
109
  const H = S.ariaDisabled === "true" || "disabled" in S && !!S.disabled;
110
110
  v.push({ id: S.id, element: S, disabled: H });
111
111
  }
112
- if (w.length && (v = Ft(v, (S) => S.element)), !Pr(l, v)) return pe();
112
+ if (g.length && (v = Ft(v, (S) => S.element)), !Pr(l, v)) return pe();
113
113
  l.preventDefault(), window.clearTimeout(m.current), m.current = window.setTimeout(() => {
114
114
  R = "";
115
115
  }, 500);
@@ -183,12 +183,12 @@ function Lr(n) {
183
183
  const t = st(n);
184
184
  return t ? Kt(n.currentTarget, t) : !1;
185
185
  }
186
- var we = Symbol("composite-hover");
186
+ var ge = Symbol("composite-hover");
187
187
  function Hr(n) {
188
188
  let t = st(n);
189
189
  if (!t) return !1;
190
190
  do {
191
- if (jt(t, we) && t[we]) return !0;
191
+ if (jt(t, ge) && t[ge]) return !0;
192
192
  t = t.parentElement;
193
193
  } while (t);
194
194
  return !1;
@@ -209,23 +209,23 @@ var ut = _(
209
209
  e,
210
210
  process.env.NODE_ENV !== "production" && "CompositeHover must be wrapped in a Composite component."
211
211
  );
212
- const m = zt(), c = s.onMouseMove, l = be(o), b = z((h) => {
213
- if (c == null || c(h), !h.defaultPrevented && m() && l(h)) {
214
- if (!X(h.currentTarget)) {
212
+ const m = zt(), c = s.onMouseMove, l = be(o), h = z((b) => {
213
+ if (c == null || c(b), !b.defaultPrevented && m() && l(b)) {
214
+ if (!X(b.currentTarget)) {
215
215
  const M = e == null ? void 0 : e.getState().baseElement;
216
216
  M && !Bt(M) && M.focus();
217
217
  }
218
- e == null || e.setActiveId(h.currentTarget.id);
218
+ e == null || e.setActiveId(b.currentTarget.id);
219
219
  }
220
- }), p = s.onMouseLeave, i = be(a), C = z((h) => {
220
+ }), p = s.onMouseLeave, i = be(a), C = z((b) => {
221
221
  var M;
222
- p == null || p(h), !h.defaultPrevented && m() && (Lr(h) || Hr(h) || l(h) && i(h) && (e == null || e.setActiveId(null), (M = e == null ? void 0 : e.getState().baseElement) == null || M.focus()));
223
- }), v = tr((h) => {
224
- h && (h[we] = !0);
222
+ p == null || p(b), !b.defaultPrevented && m() && (Lr(b) || Hr(b) || l(b) && i(b) && (e == null || e.setActiveId(null), (M = e == null ? void 0 : e.getState().baseElement) == null || M.focus()));
223
+ }), v = tr((b) => {
224
+ b && (b[ge] = !0);
225
225
  }, []);
226
226
  return s = I(f({}, s), {
227
227
  ref: le(v, s.ref),
228
- onMouseMove: b,
228
+ onMouseMove: h,
229
229
  onMouseLeave: C
230
230
  }), re(s);
231
231
  }
@@ -323,11 +323,11 @@ var dt = _(
323
323
  e,
324
324
  process.env.NODE_ENV !== "production" && "MenuList must receive a `store` prop or be wrapped in a MenuProvider component."
325
325
  );
326
- const m = e.parent, c = e.menubar, l = !!m, b = Me(s.id), p = s.onKeyDown, i = e.useState(
326
+ const m = e.parent, c = e.menubar, l = !!m, h = Me(s.id), p = s.onKeyDown, i = e.useState(
327
327
  (k) => k.placement.split("-")[0]
328
328
  ), C = e.useState(
329
329
  (k) => k.orientation === "both" ? void 0 : k.orientation
330
- ), v = C !== "vertical", h = L(
330
+ ), v = C !== "vertical", b = L(
331
331
  c,
332
332
  (k) => !!k && k.orientation !== "vertical"
333
333
  ), M = z((k) => {
@@ -345,19 +345,19 @@ var dt = _(
345
345
  if (c) {
346
346
  const D = {
347
347
  ArrowRight: () => {
348
- if (h)
348
+ if (b)
349
349
  return c.next();
350
350
  },
351
351
  ArrowLeft: () => {
352
- if (h)
352
+ if (b)
353
353
  return c.previous();
354
354
  },
355
355
  ArrowDown: () => {
356
- if (!h)
356
+ if (!b)
357
357
  return c.next();
358
358
  },
359
359
  ArrowUp: () => {
360
- if (!h)
360
+ if (!b)
361
361
  return c.previous();
362
362
  }
363
363
  }[k.key], V = D == null ? void 0 : D();
@@ -370,13 +370,13 @@ var dt = _(
370
370
  (k) => /* @__PURE__ */ d(Br, { value: e, children: k }),
371
371
  [e]
372
372
  );
373
- const w = jr(f({ store: e }, s)), A = e.useState("mounted"), O = ar(A, s.hidden, o), S = O ? I(f({}, s.style), { display: "none" }) : s.style;
373
+ const g = jr(f({ store: e }, s)), A = e.useState("mounted"), O = ar(A, s.hidden, o), S = O ? I(f({}, s.style), { display: "none" }) : s.style;
374
374
  s = I(f({
375
- id: b,
376
- "aria-labelledby": w,
375
+ id: h,
376
+ "aria-labelledby": g,
377
377
  hidden: O
378
378
  }, s), {
379
- ref: le(b ? e.setContentElement : null, s.ref),
379
+ ref: le(h ? e.setContentElement : null, s.ref),
380
380
  style: S,
381
381
  onKeyDown: M
382
382
  });
@@ -409,19 +409,19 @@ var Wr = "div", Ur = _(function(t) {
409
409
  "hideOnHoverOutside",
410
410
  "alwaysVisible"
411
411
  ]);
412
- const b = fe();
413
- e = e || b, G(
412
+ const h = fe();
413
+ e = e || h, G(
414
414
  e,
415
415
  process.env.NODE_ENV !== "production" && "Menu must receive a `store` prop or be wrapped in a MenuProvider component."
416
416
  );
417
- const p = xe(null), i = e.parent, C = e.menubar, v = !!i, h = !!C && !v;
417
+ const p = xe(null), i = e.parent, C = e.menubar, v = !!i, b = !!C && !v;
418
418
  l = I(f({}, l), {
419
419
  ref: le(p, l.ref)
420
420
  });
421
421
  const M = dt(f({
422
422
  store: e,
423
423
  alwaysVisible: c
424
- }, l)), { "aria-labelledby": w } = M;
424
+ }, l)), { "aria-labelledby": g } = M;
425
425
  l = P(M, ["aria-labelledby"]);
426
426
  const [O, S] = ye(), H = e.useState("autoFocusOnShow"), k = e.useState("initialFocus"), Z = e.useState("baseElement"), D = e.useState("renderedItems");
427
427
  Y(() => {
@@ -447,7 +447,7 @@ var Wr = "div", Ur = _(function(t) {
447
447
  F = !0;
448
448
  };
449
449
  }, [e, H, k, D, Z]);
450
- const V = v ? !1 : o, g = !!u, T = !!O || !!l.initialFocus || !!V, J = L(
450
+ const V = v ? !1 : o, w = !!u, T = !!O || !!l.initialFocus || !!V, J = L(
451
451
  e.combobox || e,
452
452
  "contentElement"
453
453
  ), B = L(
@@ -465,14 +465,14 @@ var Wr = "div", Ur = _(function(t) {
465
465
  store: e,
466
466
  alwaysVisible: c,
467
467
  initialFocus: O,
468
- autoFocusOnShow: g ? T && u : H || !!V
468
+ autoFocusOnShow: w ? T && u : H || !!V
469
469
  }, l), {
470
470
  hideOnEscape(F) {
471
471
  return Ut(s, F) ? !1 : (e == null || e.hideAll(), !0);
472
472
  },
473
473
  hideOnHoverOutside(F) {
474
474
  const E = e == null ? void 0 : e.getState().disclosureElement;
475
- return (typeof m == "function" ? m(F) : m ?? (v ? !0 : h ? E ? !X(E) : !0 : !1)) ? F.defaultPrevented || !v || !E || (Wt(E, "mouseout", F), !X(E)) ? !0 : (requestAnimationFrame(() => {
475
+ return (typeof m == "function" ? m(F) : m ?? (v ? !0 : b ? E ? !X(E) : !0 : !1)) ? F.defaultPrevented || !v || !E || (Wt(E, "mouseout", F), !X(E)) ? !0 : (requestAnimationFrame(() => {
476
476
  X(E) || e == null || e.hide();
477
477
  }), !1) : !1;
478
478
  },
@@ -480,7 +480,7 @@ var Wr = "div", Ur = _(function(t) {
480
480
  portal: a,
481
481
  backdrop: v ? !1 : l.backdrop
482
482
  })), l = f({
483
- "aria-labelledby": w
483
+ "aria-labelledby": g
484
484
  }, l), l;
485
485
  }), qr = ir(
486
486
  x(function(t) {
@@ -527,28 +527,28 @@ var en = _(
527
527
  e,
528
528
  process.env.NODE_ENV !== "production" && "MenuButton must receive a `store` prop or be wrapped in a MenuProvider component."
529
529
  );
530
- const c = xe(null), l = e.parent, b = e.menubar, p = !!l, i = !!b && !p, C = qt(u), v = () => {
531
- const g = c.current;
532
- g && (e == null || e.setDisclosureElement(g), e == null || e.setAnchorElement(g), e == null || e.show());
533
- }, h = u.onFocus, M = z((g) => {
534
- if (h == null || h(g), C || g.defaultPrevented || (e == null || e.setAutoFocusOnShow(!1), e == null || e.setActiveId(null), !b) || !i) return;
535
- const { items: T } = b.getState();
536
- $e(T, g.currentTarget) && v();
537
- }), w = L(
530
+ const c = xe(null), l = e.parent, h = e.menubar, p = !!l, i = !!h && !p, C = qt(u), v = () => {
531
+ const w = c.current;
532
+ w && (e == null || e.setDisclosureElement(w), e == null || e.setAnchorElement(w), e == null || e.show());
533
+ }, b = u.onFocus, M = z((w) => {
534
+ if (b == null || b(w), C || w.defaultPrevented || (e == null || e.setAutoFocusOnShow(!1), e == null || e.setActiveId(null), !h) || !i) return;
535
+ const { items: T } = h.getState();
536
+ $e(T, w.currentTarget) && v();
537
+ }), g = L(
538
538
  e,
539
- (g) => g.placement.split("-")[0]
540
- ), A = u.onKeyDown, O = z((g) => {
541
- if (A == null || A(g), C || g.defaultPrevented) return;
542
- const T = Yr(g, w);
543
- T && (g.preventDefault(), v(), e == null || e.setAutoFocusOnShow(!0), e == null || e.setInitialFocus(T));
544
- }), S = u.onClick, H = z((g) => {
545
- if (S == null || S(g), g.defaultPrevented || !e) return;
546
- const T = !g.detail, { open: J } = e.getState();
539
+ (w) => w.placement.split("-")[0]
540
+ ), A = u.onKeyDown, O = z((w) => {
541
+ if (A == null || A(w), C || w.defaultPrevented) return;
542
+ const T = Yr(w, g);
543
+ T && (w.preventDefault(), v(), e == null || e.setAutoFocusOnShow(!0), e == null || e.setInitialFocus(T));
544
+ }), S = u.onClick, H = z((w) => {
545
+ if (S == null || S(w), w.defaultPrevented || !e) return;
546
+ const T = !w.detail, { open: J } = e.getState();
547
547
  (!J || T) && ((!p || T) && e.setAutoFocusOnShow(!0), e.setInitialFocus(T ? "first" : "container")), p && v();
548
548
  });
549
549
  u = ce(
550
550
  u,
551
- (g) => /* @__PURE__ */ d(ct, { value: e, children: g }),
551
+ (w) => /* @__PURE__ */ d(ct, { value: e, children: w }),
552
552
  [e]
553
553
  ), p && (u = I(f({}, u), {
554
554
  render: /* @__PURE__ */ d(cr.div, { render: u.render })
@@ -571,17 +571,17 @@ var en = _(
571
571
  focusable: o,
572
572
  accessibleWhenDisabled: a
573
573
  }, u), {
574
- showOnHover: (g) => {
574
+ showOnHover: (w) => {
575
575
  if (!(() => {
576
- if (typeof s == "function") return s(g);
576
+ if (typeof s == "function") return s(w);
577
577
  if (s != null) return s;
578
578
  if (p) return !0;
579
- if (!b) return !1;
580
- const { items: oe } = b.getState();
579
+ if (!h) return !1;
580
+ const { items: oe } = h.getState();
581
581
  return i && $e(oe);
582
582
  })()) return !1;
583
- const B = i ? b : l;
584
- return B && B.setActiveId(g.currentTarget.id), !0;
583
+ const B = i ? h : l;
584
+ return B && B.setActiveId(w.currentTarget.id), !0;
585
585
  }
586
586
  })), u = dr(f({
587
587
  store: e,
@@ -643,12 +643,12 @@ var Ee = _(
643
643
  e,
644
644
  process.env.NODE_ENV !== "production" && "MenuItem must be wrapped in a MenuList, Menu or Menubar component"
645
645
  );
646
- const b = m.onClick, p = be(o), i = "hideAll" in e ? e.hideAll : void 0, C = !!i, v = z((w) => {
647
- b == null || b(w), !(w.defaultPrevented || Jt(w) || Qt(w) || !i || w.currentTarget.getAttribute("aria-haspopup") === "menu") && p(w) && i();
648
- }), h = L(
646
+ const h = m.onClick, p = be(o), i = "hideAll" in e ? e.hideAll : void 0, C = !!i, v = z((g) => {
647
+ h == null || h(g), !(g.defaultPrevented || Jt(g) || Qt(g) || !i || g.currentTarget.getAttribute("aria-haspopup") === "menu") && p(g) && i();
648
+ }), b = L(
649
649
  e,
650
- (w) => "contentElement" in w ? w.contentElement : null
651
- ), M = Ze(h, "menuitem");
650
+ (g) => "contentElement" in g ? g.contentElement : null
651
+ ), M = Ze(b, "menuitem");
652
652
  return m = I(f({
653
653
  role: M
654
654
  }, m), {
@@ -659,14 +659,14 @@ var Ee = _(
659
659
  }, m)), m = ut(I(f({
660
660
  store: e
661
661
  }, m), {
662
- focusOnHover(w) {
663
- const A = () => typeof s == "function" ? s(w) : s ?? !0;
662
+ focusOnHover(g) {
663
+ const A = () => typeof s == "function" ? s(g) : s ?? !0;
664
664
  if (!e || !A()) return !1;
665
665
  const { baseElement: O, items: S } = e.getState();
666
- return C ? (w.currentTarget.hasAttribute("aria-expanded") && w.currentTarget.focus(), !0) : cn(O, S, w.currentTarget) ? (w.currentTarget.focus(), !0) : !1;
666
+ return C ? (g.currentTarget.hasAttribute("aria-expanded") && g.currentTarget.focus(), !0) : cn(O, S, g.currentTarget) ? (g.currentTarget.focus(), !0) : !1;
667
667
  },
668
- blurOnHoverEnd(w) {
669
- return typeof u == "function" ? u(w) : u ?? C;
668
+ blurOnHoverEnd(g) {
669
+ return typeof u == "function" ? u(g) : u ?? C;
670
670
  }
671
671
  })), m;
672
672
  }
@@ -716,10 +716,10 @@ var vn = _(
716
716
  e,
717
717
  process.env.NODE_ENV !== "production" && "MenuItemCheckbox must be wrapped in a MenuList or Menu component"
718
718
  );
719
- const b = Je(u);
719
+ const h = Je(u);
720
720
  Y(() => {
721
- e == null || e.setValue(o, (i = []) => b ? ve(i, a, !0) : i);
722
- }, [e, o, a, b]), Y(() => {
721
+ e == null || e.setValue(o, (i = []) => h ? ve(i, a, !0) : i);
722
+ }, [e, o, a, h]), Y(() => {
723
723
  s !== void 0 && (e == null || e.setValue(o, (i) => ve(i, a, s)));
724
724
  }, [e, o, a, s]);
725
725
  const p = zr({
@@ -750,7 +750,7 @@ var vn = _(
750
750
  function he(n, t, r) {
751
751
  return r === void 0 ? n : r ? t : n;
752
752
  }
753
- var wn = _(
753
+ var gn = _(
754
754
  function(t) {
755
755
  var r = t, {
756
756
  store: e,
@@ -772,10 +772,10 @@ var wn = _(
772
772
  e,
773
773
  process.env.NODE_ENV !== "production" && "MenuItemRadio must be wrapped in a MenuList or Menu component"
774
774
  );
775
- const b = Je(c.defaultChecked);
775
+ const h = Je(c.defaultChecked);
776
776
  Y(() => {
777
- e == null || e.setValue(o, (i = !1) => he(i, a, b));
778
- }, [e, o, a, b]), Y(() => {
777
+ e == null || e.setValue(o, (i = !1) => he(i, a, h));
778
+ }, [e, o, a, h]), Y(() => {
779
779
  s !== void 0 && (e == null || e.setValue(o, (i) => he(i, a, s)));
780
780
  }, [e, o, a, s]);
781
781
  const p = e.useState((i) => i.values[o] === a);
@@ -796,9 +796,9 @@ var wn = _(
796
796
  }
797
797
  }, c)), c = Ee(f({ store: e, hideOnClick: m }, c)), c;
798
798
  }
799
- ), gn = de(
799
+ ), wn = de(
800
800
  x(function(t) {
801
- const r = wn(t);
801
+ const r = gn(t);
802
802
  return y(bn, r);
803
803
  })
804
804
  );
@@ -844,7 +844,7 @@ function Cn(n = {}) {
844
844
  s ? 0 : 150
845
845
  ),
846
846
  hideTimeout: K(a.hideTimeout, m.hideTimeout, 0)
847
- })), b = Q($($({}, c.getState()), l.getState()), {
847
+ })), h = Q($($({}, c.getState()), l.getState()), {
848
848
  initialFocus: K(m.initialFocus, "container"),
849
849
  values: K(
850
850
  a.values,
@@ -852,7 +852,7 @@ function Cn(n = {}) {
852
852
  a.defaultValues,
853
853
  {}
854
854
  )
855
- }), p = Ve(b, c, l, u);
855
+ }), p = Ve(h, c, l, u);
856
856
  return He(
857
857
  p,
858
858
  () => Fe(p, ["mounted"], (i) => {
@@ -877,8 +877,8 @@ function Cn(n = {}) {
877
877
  setValues: (i) => p.setState("values", i),
878
878
  setValue: (i, C) => {
879
879
  i !== "__proto__" && i !== "constructor" && (Array.isArray(i) || p.setState("values", (v) => {
880
- const h = v[i], M = er(C, h);
881
- return M === h ? v : Q($({}, v), {
880
+ const b = v[i], M = er(C, b);
881
+ return M === b ? v : Q($({}, v), {
882
882
  [i]: M !== void 0 && M
883
883
  });
884
884
  }));
@@ -1003,15 +1003,15 @@ const q = W(U), Ae = ee(
1003
1003
  {
1004
1004
  hideOnClick: !s || s === "radio" || s === "radio-mark",
1005
1005
  ...u,
1006
- onClick: (b) => {
1007
- b.preventDefault(), o == null || o(b);
1006
+ onClick: (h) => {
1007
+ h.preventDefault(), h.stopPropagation(), o == null || o(h);
1008
1008
  },
1009
1009
  ref: m,
1010
1010
  render: /* @__PURE__ */ d(n, { className: q("item", r), children: (() => {
1011
1011
  switch (s) {
1012
1012
  case "checkbox":
1013
1013
  return /* @__PURE__ */ j(ie, { name: e, value: a, children: [
1014
- /* @__PURE__ */ d(gt, { name: e, value: a }),
1014
+ /* @__PURE__ */ d(wt, { name: e, value: a }),
1015
1015
  t
1016
1016
  ] });
1017
1017
  case "checkbox-mark":
@@ -1020,12 +1020,12 @@ const q = W(U), Ae = ee(
1020
1020
  /* @__PURE__ */ d(Ce, {})
1021
1021
  ] });
1022
1022
  case "radio":
1023
- return /* @__PURE__ */ j(ge, { name: e, value: a, children: [
1023
+ return /* @__PURE__ */ j(we, { name: e, value: a, children: [
1024
1024
  /* @__PURE__ */ d(Ct, { name: e, value: a }),
1025
1025
  t
1026
1026
  ] });
1027
1027
  case "radio-mark":
1028
- return /* @__PURE__ */ j(ge, { name: e, value: a, children: [
1028
+ return /* @__PURE__ */ j(we, { name: e, value: a, children: [
1029
1029
  t,
1030
1030
  /* @__PURE__ */ d(Ce, {})
1031
1031
  ] });
@@ -1046,21 +1046,21 @@ const bt = N(
1046
1046
  ({ className: n, ...t }, r) => /* @__PURE__ */ d("div", { ...t, className: q("item-content", n), ref: r })
1047
1047
  );
1048
1048
  bt.displayName = "DropdownMenu.ItemContent";
1049
- const wt = N(
1049
+ const gt = N(
1050
1050
  ({ className: n, ...t }, r) => /* @__PURE__ */ d("div", { ...t, className: q("item-description", n), ref: r })
1051
1051
  );
1052
- wt.displayName = "DropdownMenu.ItemDescription";
1052
+ gt.displayName = "DropdownMenu.ItemDescription";
1053
1053
  const ie = N(
1054
1054
  ({ className: n, ...t }, r) => /* @__PURE__ */ d(hn, { ...t, className: q("item-checkbox", n), ref: r })
1055
1055
  );
1056
1056
  ie.displayName = "DropdownMenu.ItemCheckbox";
1057
- const ge = N(({ className: n, ...t }, r) => /* @__PURE__ */ d(gn, { ...t, className: q("item-radio", n), ref: r }));
1058
- ge.displayName = "DropdownMenu.ItemRadio";
1057
+ const we = N(({ className: n, ...t }, r) => /* @__PURE__ */ d(wn, { ...t, className: q("item-radio", n), ref: r }));
1058
+ we.displayName = "DropdownMenu.ItemRadio";
1059
1059
  const Ce = N(
1060
1060
  ({ className: n, ...t }, r) => /* @__PURE__ */ d(mn, { ...t, className: q("item-default-check", n), ref: r, children: /* @__PURE__ */ d(Qe, { name: "check", size: "md" }) })
1061
1061
  );
1062
1062
  Ce.displayName = "DropdownMenu.ItemDefaultCheck";
1063
- const gt = N(
1063
+ const wt = N(
1064
1064
  ({ name: n, value: t = !0, ...r }, e) => {
1065
1065
  const o = De(n, t);
1066
1066
  return /* @__PURE__ */ or(
@@ -1075,11 +1075,11 @@ const gt = N(
1075
1075
  );
1076
1076
  }
1077
1077
  );
1078
- gt.displayName = "DropdownMenu.ItemCheckboxCheck";
1078
+ wt.displayName = "DropdownMenu.ItemCheckboxCheck";
1079
1079
  const Ct = N(
1080
1080
  ({ name: n, value: t, ...r }, e) => {
1081
1081
  const o = De(n, t);
1082
- return /* @__PURE__ */ d(wr, { "aria-hidden": "true", ...r, checked: o, ref: e });
1082
+ return /* @__PURE__ */ d(gr, { "aria-hidden": "true", ...r, checked: o, ref: e });
1083
1083
  }
1084
1084
  );
1085
1085
  Ct.displayName = "DropdownMenu.ItemRadioCheck";
@@ -1087,7 +1087,7 @@ const kt = N(
1087
1087
  ({ className: n, name: t, value: r = !0, ...e }, o) => {
1088
1088
  const a = De(t, r);
1089
1089
  return /* @__PURE__ */ d(
1090
- gr,
1090
+ wr,
1091
1091
  {
1092
1092
  "aria-hidden": "true",
1093
1093
  ...e,
@@ -1124,7 +1124,7 @@ const xt = ee(
1124
1124
  mt,
1125
1125
  {
1126
1126
  onClick: (s) => {
1127
- s.preventDefault(), t == null || t(s), r.toggle();
1127
+ s.preventDefault(), s.stopPropagation(), t == null || t(s), r.toggle();
1128
1128
  },
1129
1129
  ref: o,
1130
1130
  render: n ? (s) => /* @__PURE__ */ d(n, { ...s }) : void 0,
@@ -1165,7 +1165,7 @@ const Fn = W(U), $n = 8, Rn = N(
1165
1165
  Action: ft,
1166
1166
  Arrow: pt,
1167
1167
  Content: bt,
1168
- Description: wt,
1168
+ Description: gt,
1169
1169
  Group: vt,
1170
1170
  GroupLabel: ht,
1171
1171
  Item: Ae,
@@ -1 +1 @@
1
- @layer components{._input-text-wrapper_b8muv_2{position:relative;width:100%;width:var(--inputTextWrapperWidth, 100%)}._root_b8muv_8{border-radius:var(--components-dimensions-input-border-radius);border-style:solid;border-width:var(--components-dimensions-input-border-width-default);font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-md);outline:none;width:100%;transition:var(--duration-medium);-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--inputTextBackgroundColor, var(--components-colors-input-color-background-default));color:var(--inputTextColor, var(--components-colors-input-color-text-default));border-color:var(--inputTextBorderColor, var(--components-colors-input-color-border-default));box-shadow:var(--inputTextBoxShadow, var(--inset-10)) inset;height:var(--inputTextHeight);padding-inline:var(--inputTextPaddingInline);padding-block:var(--inputTextPaddingBlock)}._root_b8muv_8:disabled,._root_b8muv_8[aria-disabled]{--inputTextBackgroundColor: var( --inputTextBackgroundColorDisabled, var(--components-colors-input-color-background-disabled) );--inputTextColor: var(--components-colors-input-color-text-disabled);cursor:not-allowed}._root_b8muv_8:hover:not(:disabled):not([aria-disabled]){--borderColor: var(--borderColorHover, var(--color-border-neutral-subtlest));--inputTextBoxShadow: var(--inset-20)}._root_b8muv_8:active,._root_b8muv_8:focus{--inputTextBorderColor: var(--components-colors-input-color-border-focused)}._root_b8muv_8::placeholder{color:var(--color-icon-neutral-subtle)}._variant-danger_b8muv_46{--inputTextBorderColor: var(--components-colors-input-color-border-error)}._variant-warning_b8muv_49{--inputTextBorderColor: var(--components-colors-input-color-border-warning)}._variant-success_b8muv_52{--inputTextBorderColor: var(--components-colors-input-color-border-success)}._placement-left_b8muv_56._size-sm_b8muv_56{padding-left:1.75rem}._placement-left_b8muv_56._size-md_b8muv_59,._placement-left_b8muv_56._size-lg_b8muv_59{padding-left:2.75rem}._placement-right_b8muv_62._size-sm_b8muv_56{padding-right:1.75rem}._placement-right_b8muv_62._size-md_b8muv_59,._placement-right_b8muv_62._size-lg_b8muv_59{padding-right:2.75rem}._transparent_b8muv_68{--borderColor: transparent;--inputTextBackgroundColor: var(--components-colors-input-color-background-transparent);--borderColorHover: var(--components-colors-input-color-border-hover-transparent)}._size-sm_b8muv_56{--inputTextHeight: var(--components-dimensions-input-max-height-sm);--inputTextPaddingBlock: var(--components-dimensions-input-padding-block-sm);--inputTextPaddingInline: var(--components-dimensions-input-padding-inline-sm)}._size-md_b8muv_59{--inputTextHeight: var(--components-dimensions-input-max-height-md);--inputTextPaddingBlock: var(--components-dimensions-input-padding-block-md);--inputTextPaddingInline: var(--components-dimensions-input-padding-inline-md)}._size-lg_b8muv_59{--inputTextHeight: var(--components-dimensions-input-max-height-lg);--inputTextPaddingBlock: var(--components-dimensions-input-padding-block-lg);--inputTextPaddingInline: var(--components-dimensions-input-padding-inline-lg)}._clearable_b8muv_88{padding-right:var(--border-radius-2xl)}._icon-wrapper_b8muv_91{position:absolute;top:0;bottom:0;left:var(--inputTextIconLeft);right:var(--inputTextIconRight);display:flex;justify-content:center;align-items:center;pointer-events:none;transition:var(--duration-medium);transition-timing-function:var(--timing-primary);color:var(--inputTextIconColor, var(--components-colors-input-color-icon-placeholder));gap:var(--components-dimensions-input-padding-block-sm);--inputTextIconLeft: auto;--inputTextIconRight: auto}._icon-wrapper_b8muv_91>button{pointer-events:auto}._icon-wrapper_b8muv_91._disabled_b8muv_112{--inputTextIconColor: var(--components-colors-input-color-icon-disabled)}._icon-placement-left-sm_b8muv_115{--inputTextIconLeft: var(--components-dimensions-input-padding-inline-sm)}._icon-placement-left-md_b8muv_118{--inputTextIconLeft: var(--components-dimensions-input-padding-inline-md)}._icon-placement-right-sm_b8muv_121{--inputTextIconRight: var(--components-dimensions-input-padding-inline-sm)}._icon-placement-right-md_b8muv_124{--inputTextIconRight: var(--components-dimensions-input-padding-inline-md)}}
1
+ @layer components{._input-text-wrapper_13hsf_2{position:relative;width:100%;width:var(--inputTextWrapperWidth, 100%)}._root_13hsf_8{border-radius:var(--components-dimensions-input-border-radius);border-style:solid;border-width:var(--components-dimensions-input-border-width-default);font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-md);outline:none;width:100%;transition:var(--duration-medium);-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--inputTextBackgroundColor, var(--components-colors-input-color-background-default));color:var(--inputTextColor, var(--components-colors-input-color-text-default));border-color:var(--inputTextBorderColor, var(--components-colors-input-color-border-default));box-shadow:var(--inputTextBoxShadow, var(--inset-10)) inset;height:var(--inputTextHeight);padding-inline:var(--inputTextPaddingInline);padding-block:var(--inputTextPaddingBlock)}._root_13hsf_8:disabled,._root_13hsf_8[aria-disabled]{--inputTextBackgroundColor: var( --inputTextBackgroundColorDisabled, var(--components-colors-input-color-background-disabled) );--inputTextColor: var(--components-colors-input-color-text-disabled);cursor:not-allowed}._root_13hsf_8:hover:not(:disabled):not([aria-disabled]){--borderColor: var(--borderColorHover, var(--color-border-neutral-subtlest));--inputTextBoxShadow: var(--inset-20)}._root_13hsf_8:active,._root_13hsf_8:focus{--inputTextBorderColor: var(--components-colors-input-color-border-focused)}._root_13hsf_8::placeholder{color:var(--components-colors-input-color-text-placeholder)}._variant-danger_13hsf_46{--inputTextBorderColor: var(--components-colors-input-color-border-error)}._variant-warning_13hsf_49{--inputTextBorderColor: var(--components-colors-input-color-border-warning)}._variant-success_13hsf_52{--inputTextBorderColor: var(--components-colors-input-color-border-success)}._placement-left_13hsf_56._size-sm_13hsf_56{padding-left:1.75rem}._placement-left_13hsf_56._size-md_13hsf_59,._placement-left_13hsf_56._size-lg_13hsf_59{padding-left:2.75rem}._placement-right_13hsf_62._size-sm_13hsf_56{padding-right:1.75rem}._placement-right_13hsf_62._size-md_13hsf_59,._placement-right_13hsf_62._size-lg_13hsf_59{padding-right:2.75rem}._transparent_13hsf_68{--borderColor: transparent;--inputTextBackgroundColor: var(--components-colors-input-color-background-transparent);--borderColorHover: var(--components-colors-input-color-border-hover-transparent)}._size-sm_13hsf_56{--inputTextHeight: var(--components-dimensions-input-max-height-sm);--inputTextPaddingBlock: var(--components-dimensions-input-padding-block-sm);--inputTextPaddingInline: var(--components-dimensions-input-padding-inline-sm)}._size-md_13hsf_59{--inputTextHeight: var(--components-dimensions-input-max-height-md);--inputTextPaddingBlock: var(--components-dimensions-input-padding-block-md);--inputTextPaddingInline: var(--components-dimensions-input-padding-inline-md)}._size-lg_13hsf_59{--inputTextHeight: var(--components-dimensions-input-max-height-lg);--inputTextPaddingBlock: var(--components-dimensions-input-padding-block-lg);--inputTextPaddingInline: var(--components-dimensions-input-padding-inline-lg)}._clearable_13hsf_88{padding-right:var(--border-radius-2xl)}._icon-wrapper_13hsf_91{position:absolute;top:0;bottom:0;left:var(--inputTextIconLeft);right:var(--inputTextIconRight);display:flex;justify-content:center;align-items:center;pointer-events:none;transition:var(--duration-medium);transition-timing-function:var(--timing-primary);color:var(--inputTextIconColor, var(--components-colors-input-color-icon-placeholder));gap:var(--components-dimensions-input-padding-block-sm);--inputTextIconLeft: auto;--inputTextIconRight: auto}._icon-wrapper_13hsf_91>button{pointer-events:auto}._icon-wrapper_13hsf_91._disabled_13hsf_112{--inputTextIconColor: var(--components-colors-input-color-icon-disabled)}._icon-placement-left-sm_13hsf_115{--inputTextIconLeft: var(--components-dimensions-input-padding-inline-sm)}._icon-placement-left-md_13hsf_118{--inputTextIconLeft: var(--components-dimensions-input-padding-inline-md)}._icon-placement-right-sm_13hsf_121{--inputTextIconRight: var(--components-dimensions-input-padding-inline-sm)}._icon-placement-right-md_13hsf_124{--inputTextIconRight: var(--components-dimensions-input-padding-inline-md)}}
package/dist/InputText.js CHANGED
@@ -1,95 +1,95 @@
1
1
  "use client";
2
2
  import './InputText.css';
3
- import { jsxs as b, jsx as e } from "react/jsx-runtime";
3
+ import { jsxs as u, jsx as e } from "react/jsx-runtime";
4
4
  import { forwardRef as T } from "react";
5
5
  import { CloseButton as j } from "./CloseButton.js";
6
6
  import { useField as y } from "./Field.js";
7
- import { Icon as f } from "./Icon.js";
7
+ import { Icon as g } from "./Icon.js";
8
8
  import { c as B } from "./index-PAaZGbyz.js";
9
- const D = "_root_b8muv_8", F = "_transparent_b8muv_68", L = "_clearable_b8muv_88", k = "_disabled_b8muv_112", C = {
10
- "input-text-wrapper": "_input-text-wrapper_b8muv_2",
9
+ const D = "_root_13hsf_8", F = "_transparent_13hsf_68", L = "_clearable_13hsf_88", k = "_disabled_13hsf_112", C = {
10
+ "input-text-wrapper": "_input-text-wrapper_13hsf_2",
11
11
  root: D,
12
- "variant-danger": "_variant-danger_b8muv_46",
13
- "variant-warning": "_variant-warning_b8muv_49",
14
- "variant-success": "_variant-success_b8muv_52",
15
- "placement-left": "_placement-left_b8muv_56",
16
- "size-sm": "_size-sm_b8muv_56",
17
- "size-md": "_size-md_b8muv_59",
18
- "size-lg": "_size-lg_b8muv_59",
19
- "placement-right": "_placement-right_b8muv_62",
12
+ "variant-danger": "_variant-danger_13hsf_46",
13
+ "variant-warning": "_variant-warning_13hsf_49",
14
+ "variant-success": "_variant-success_13hsf_52",
15
+ "placement-left": "_placement-left_13hsf_56",
16
+ "size-sm": "_size-sm_13hsf_56",
17
+ "size-md": "_size-md_13hsf_59",
18
+ "size-lg": "_size-lg_13hsf_59",
19
+ "placement-right": "_placement-right_13hsf_62",
20
20
  transparent: F,
21
21
  clearable: L,
22
- "icon-wrapper": "_icon-wrapper_b8muv_91",
22
+ "icon-wrapper": "_icon-wrapper_13hsf_91",
23
23
  disabled: k,
24
- "icon-placement-left-sm": "_icon-placement-left-sm_b8muv_115",
25
- "icon-placement-left-md": "_icon-placement-left-md_b8muv_118",
26
- "icon-placement-right-sm": "_icon-placement-right-sm_b8muv_121",
27
- "icon-placement-right-md": "_icon-placement-right-md_b8muv_124"
28
- }, s = B(C), O = { lg: "md", md: "md", sm: "sm" }, V = T(
24
+ "icon-placement-left-sm": "_icon-placement-left-sm_13hsf_115",
25
+ "icon-placement-left-md": "_icon-placement-left-md_13hsf_118",
26
+ "icon-placement-right-sm": "_icon-placement-right-sm_13hsf_121",
27
+ "icon-placement-right-md": "_icon-placement-right-md_13hsf_124"
28
+ }, a = B(C), O = { lg: "md", md: "md", sm: "sm" }, V = T(
29
29
  ({
30
- children: o,
31
- className: g,
30
+ children: c,
31
+ className: v,
32
32
  icon: t,
33
- iconPlacement: n = "left",
34
- isClearable: c,
35
- name: p,
33
+ iconPlacement: s = "left",
34
+ isClearable: p,
35
+ name: _,
36
36
  onChange: r,
37
- size: _ = "lg",
38
- transparent: h,
39
- type: w = "text",
40
- value: u,
41
- variant: x,
42
- ...z
43
- }, I) => {
44
- const { getInputProps: N, variant: $ } = y(), d = $ || x, i = t && n, v = i && n === "right", R = i && n === "left", a = O[_], m = N(z), l = !!o, S = c || v || l, E = () => {
37
+ size: m = "lg",
38
+ transparent: w,
39
+ type: x = "text",
40
+ value: f,
41
+ variant: z,
42
+ ...I
43
+ }, b) => {
44
+ const { getInputProps: N, variant: $ } = y(), d = $ || z, i = t && s, h = i && s === "right", R = i && s === "left", n = O[m], l = N(I), o = !!c, S = p || h || o, E = () => {
45
45
  r && r({
46
46
  preventDefault: () => null,
47
- target: { name: p, value: "" }
47
+ target: { name: _, value: "" }
48
48
  });
49
49
  };
50
- return /* @__PURE__ */ b("div", { className: s("input-text-wrapper"), children: [
50
+ return /* @__PURE__ */ u("div", { className: a("input-text-wrapper"), children: [
51
51
  /* @__PURE__ */ e(
52
52
  "input",
53
53
  {
54
- ...m,
55
- className: s(
54
+ ...l,
55
+ className: a(
56
56
  "root",
57
- `size-${_}`,
57
+ `size-${m}`,
58
58
  d && `variant-${d}`,
59
- h && "transparent",
60
- i && `placement-${n}`,
61
- g
59
+ w && "transparent",
60
+ i && `placement-${s}`,
61
+ v
62
62
  ),
63
- name: p,
63
+ name: _,
64
64
  onChange: r,
65
- ref: I,
66
- type: w,
67
- value: u
65
+ ref: b,
66
+ type: x,
67
+ value: f
68
68
  }
69
69
  ),
70
70
  R ? /* @__PURE__ */ e(
71
71
  "div",
72
72
  {
73
- className: s(
73
+ className: a(
74
74
  "icon-wrapper",
75
- `icon-placement-left-${a}`,
76
- m.disabled && "disabled"
75
+ `icon-placement-left-${n}`,
76
+ l.disabled && "disabled"
77
77
  ),
78
- children: /* @__PURE__ */ e(f, { ...t.props, name: t.props.name, size: a })
78
+ children: /* @__PURE__ */ e(g, { ...t.props, name: t.props.name, size: n })
79
79
  }
80
80
  ) : null,
81
- S ? /* @__PURE__ */ b(
81
+ S ? /* @__PURE__ */ u(
82
82
  "div",
83
83
  {
84
- className: s(
84
+ className: a(
85
85
  "icon-wrapper",
86
- `icon-placement-right-${a}`,
87
- m.disabled && "disabled"
86
+ `icon-placement-right-${n}`,
87
+ l.disabled && "disabled"
88
88
  ),
89
89
  children: [
90
- c && u ? /* @__PURE__ */ e(j, { onClick: E, size: "sm" }) : null,
91
- v && !l ? /* @__PURE__ */ e(f, { ...t.props, name: t.props.name, size: a }) : null,
92
- l ? o : null
90
+ p && f ? /* @__PURE__ */ e(j, { onClick: E, size: "sm" }) : null,
91
+ h && !o ? /* @__PURE__ */ e(g, { ...t.props, name: t.props.name, size: n }) : null,
92
+ o ? c : null
93
93
  ]
94
94
  }
95
95
  ) : null