sander-ui 0.1.6 → 0.1.7

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 (77) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index10.js +1 -1
  3. package/dist/index12.js +3 -3
  4. package/dist/index13.js +98 -100
  5. package/dist/index14.js +2 -2
  6. package/dist/index15.js +1 -1
  7. package/dist/index16.js +1 -1
  8. package/dist/index17.js +3 -3
  9. package/dist/index18.js +3 -3
  10. package/dist/index19.js +1 -1
  11. package/dist/index20.js +1 -1
  12. package/dist/index21.js +254 -21
  13. package/dist/index22.js +1 -1
  14. package/dist/index23.js +1 -1
  15. package/dist/index24.js +1 -1
  16. package/dist/index25.js +1 -1
  17. package/dist/index26.js +1 -1
  18. package/dist/index27.js +1 -1
  19. package/dist/index28.js +7 -7
  20. package/dist/index29.js +1 -1
  21. package/dist/index3.js +1 -1
  22. package/dist/index30.js +1 -1
  23. package/dist/index31.js +2 -2
  24. package/dist/index32.js +27 -17
  25. package/dist/index33.js +26 -27
  26. package/dist/index34.js +16 -25
  27. package/dist/index35.js +8 -27
  28. package/dist/index36.js +4 -23
  29. package/dist/index37.js +17 -8
  30. package/dist/index38.js +23 -14
  31. package/dist/index39.js +7 -7
  32. package/dist/index4.js +6 -6
  33. package/dist/index40.js +13 -6
  34. package/dist/index41.js +8 -7
  35. package/dist/index42.js +7 -15
  36. package/dist/index43.js +5 -2
  37. package/dist/index44.js +26 -4
  38. package/dist/index45.js +16 -10
  39. package/dist/index47.js +12 -41
  40. package/dist/index48.js +23 -4
  41. package/dist/index49.js +11 -19
  42. package/dist/index5.js +2 -2
  43. package/dist/index50.js +25 -12
  44. package/dist/index51.js +12 -16
  45. package/dist/index52.js +16 -16
  46. package/dist/index53.js +27 -11
  47. package/dist/index54.js +22 -25
  48. package/dist/index55.js +10 -16
  49. package/dist/index56.js +42 -30
  50. package/dist/index57.js +4 -15
  51. package/dist/index58.js +4 -13
  52. package/dist/index59.js +14 -20
  53. package/dist/index6.js +2 -2
  54. package/dist/index60.js +4 -26
  55. package/dist/index61.js +12 -22
  56. package/dist/index62.js +20 -16
  57. package/dist/index63.js +42 -8
  58. package/dist/index64.js +4 -40
  59. package/dist/index65.js +14 -22
  60. package/dist/index66.js +39 -12
  61. package/dist/index67.js +14 -12
  62. package/dist/index68.js +31 -35
  63. package/dist/index69.js +17 -2
  64. package/dist/index7.js +3 -3
  65. package/dist/index70.js +34 -3
  66. package/dist/index71.js +2 -21
  67. package/dist/index72.js +4 -2
  68. package/dist/index73.js +21 -2
  69. package/dist/index74.js +2 -6
  70. package/dist/index75.js +2 -34
  71. package/dist/index76.js +5 -11
  72. package/dist/index77.js +34 -7
  73. package/dist/index78.js +12 -5
  74. package/dist/index79.js +9 -0
  75. package/dist/index8.js +1 -1
  76. package/dist/index80.js +7 -0
  77. package/package.json +1 -1
package/dist/index13.js CHANGED
@@ -1,172 +1,170 @@
1
- import { jsx as w } from "react/jsx-runtime";
2
- import b from "./index31.js";
3
- import { useState as h, useRef as v, useId as R, useEffect as k, cloneElement as E, createContext as I, useContext as y } from "react";
4
- import m from "./index49.js";
5
- const C = I(null);
6
- function x() {
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import g from "./index31.js";
3
+ import { useState as x, useRef as v, useId as E, useEffect as k, cloneElement as I, createContext as R, useContext as y } from "react";
4
+ import D from "./index67.js";
5
+ const C = R(null);
6
+ function b() {
7
7
  const t = y(C);
8
8
  if (!t)
9
9
  throw new Error("Dropdown components must be used within <Dropdown>");
10
10
  return t;
11
11
  }
12
- const L = ({ children: t }) => {
13
- const [i, r] = h(!1), [c, a] = h(!1), u = v(null), f = v(null), g = v([]), e = v(0), l = v(null), n = R(), D = (s) => {
14
- l.current = s, r(!0), a(!1);
15
- }, o = (s = !0) => {
16
- a(!0), s && u.current?.focus();
17
- }, d = v(o);
18
- return d.current = o, k(() => {
19
- if (!i || c) return;
20
- function s(p) {
21
- f.current && !f.current.contains(p.target) && d.current(!1);
12
+ const P = ({ children: t }) => {
13
+ const [o, e] = x(!1), [l, a] = x(!1), c = v(null), f = v(null), n = v([]), w = v(0), r = v(null), u = E(), i = (s) => {
14
+ r.current = s, e(!0), a(!1);
15
+ }, d = (s = !0) => {
16
+ a(!0), s && c.current?.focus();
17
+ }, m = v(d);
18
+ return m.current = d, k(() => {
19
+ if (!o || l) return;
20
+ function s(h) {
21
+ f.current && !f.current.contains(h.target) && m.current(!1);
22
22
  }
23
23
  return document.addEventListener("mousedown", s), () => document.removeEventListener("mousedown", s);
24
- }, [i, c]), /* @__PURE__ */ w(
24
+ }, [o, l]), /* @__PURE__ */ p(
25
25
  C.Provider,
26
26
  {
27
27
  value: {
28
- visible: i,
29
- closing: c,
30
- menuId: n,
31
- triggerRef: u,
32
- openMenu: D,
33
- closeMenu: o,
34
- setVisible: r,
28
+ visible: o,
29
+ closing: l,
30
+ menuId: u,
31
+ triggerRef: c,
32
+ openMenu: i,
33
+ closeMenu: d,
34
+ setVisible: e,
35
35
  setClosing: a,
36
- itemRefs: g,
37
- itemCount: e,
38
- pendingFocusIndex: l
36
+ itemRefs: n,
37
+ itemCount: w,
38
+ pendingFocusIndex: r
39
39
  },
40
- children: /* @__PURE__ */ w("div", { ref: f, className: m.wrapper, children: t })
40
+ children: /* @__PURE__ */ p("div", { ref: f, className: D.wrapper, children: t })
41
41
  }
42
42
  );
43
- }, P = ({
43
+ }, B = ({
44
44
  asChild: t,
45
- children: i
45
+ children: o
46
46
  }) => {
47
- const { visible: r, menuId: c, triggerRef: a, openMenu: u, closeMenu: f } = x(), l = {
48
- ref: (n) => {
49
- a.current = n;
47
+ const { visible: e, menuId: l, triggerRef: a, openMenu: c, closeMenu: f } = b(), r = {
48
+ ref: (u) => {
49
+ a.current = u;
50
50
  },
51
51
  "aria-haspopup": "menu",
52
- "aria-expanded": r,
53
- "aria-controls": r ? c : void 0,
54
- onClick: () => r ? f() : u(0),
55
- onKeyDown: (n) => {
56
- switch (n.key) {
52
+ "aria-expanded": e,
53
+ "aria-controls": e ? l : void 0,
54
+ onClick: () => e ? f() : c(0),
55
+ onKeyDown: (u) => {
56
+ switch (u.key) {
57
57
  case "ArrowDown":
58
58
  case "Enter":
59
59
  case " ":
60
- n.preventDefault(), u(0);
60
+ u.preventDefault(), c(0);
61
61
  break;
62
62
  case "ArrowUp":
63
- n.preventDefault(), u(-1);
63
+ u.preventDefault(), c(-1);
64
64
  break;
65
65
  }
66
66
  }
67
67
  };
68
- return t ? E(i, l) : /* @__PURE__ */ w("button", { ...l, className: m.trigger, children: i });
69
- }, B = ({
70
- align: t = "right",
71
- children: i
68
+ return t ? I(o, r) : /* @__PURE__ */ p("button", { ...r, className: D.trigger, children: o });
69
+ }, F = ({
70
+ children: t
72
71
  }) => {
73
72
  const {
74
- visible: r,
75
- closing: c,
76
- menuId: a,
77
- closeMenu: u,
78
- setVisible: f,
79
- setClosing: g,
80
- itemRefs: e,
81
- itemCount: l,
82
- pendingFocusIndex: n
83
- } = x();
84
- l.current = 0, e.current = [], k(() => {
85
- if (!r || c || n.current === null) return;
86
- const o = n.current;
87
- n.current = null;
88
- const d = e.current.filter(Boolean), s = o < 0 ? d.length + o : o;
89
- d[s]?.focus();
90
- }, [r, c, e, n]);
91
- const D = (o) => {
92
- const d = e.current.findIndex(
93
- (p) => p === document.activeElement
94
- ), s = e.current.filter(Boolean).length;
95
- switch (o.key) {
73
+ visible: o,
74
+ closing: e,
75
+ menuId: l,
76
+ closeMenu: a,
77
+ setVisible: c,
78
+ setClosing: f,
79
+ itemRefs: n,
80
+ itemCount: w,
81
+ pendingFocusIndex: r
82
+ } = b();
83
+ w.current = 0, n.current = [], k(() => {
84
+ if (!o || e || r.current === null) return;
85
+ const i = r.current;
86
+ r.current = null;
87
+ const d = n.current.filter(Boolean), m = i < 0 ? d.length + i : i;
88
+ d[m]?.focus();
89
+ }, [o, e, n, r]);
90
+ const u = (i) => {
91
+ const d = n.current.findIndex(
92
+ (s) => s === document.activeElement
93
+ ), m = n.current.filter(Boolean).length;
94
+ switch (i.key) {
96
95
  case "ArrowDown": {
97
- o.preventDefault();
98
- const p = (d + 1) % s;
99
- e.current[p]?.focus();
96
+ i.preventDefault();
97
+ const s = (d + 1) % m;
98
+ n.current[s]?.focus();
100
99
  break;
101
100
  }
102
101
  case "ArrowUp": {
103
- o.preventDefault();
104
- const p = (d - 1 + s) % s;
105
- e.current[p]?.focus();
102
+ i.preventDefault();
103
+ const s = (d - 1 + m) % m;
104
+ n.current[s]?.focus();
106
105
  break;
107
106
  }
108
107
  case "Home":
109
- o.preventDefault(), e.current[0]?.focus();
108
+ i.preventDefault(), n.current[0]?.focus();
110
109
  break;
111
110
  case "End":
112
- o.preventDefault(), e.current[s - 1]?.focus();
111
+ i.preventDefault(), n.current[m - 1]?.focus();
113
112
  break;
114
113
  case "Escape":
115
114
  case "Tab":
116
- u();
115
+ a();
117
116
  break;
118
117
  }
119
118
  };
120
- return r ? /* @__PURE__ */ w(
119
+ return o ? /* @__PURE__ */ p(
121
120
  "div",
122
121
  {
123
- id: a,
122
+ id: l,
124
123
  role: "menu",
125
- onKeyDown: D,
124
+ onKeyDown: u,
126
125
  onAnimationEnd: () => {
127
- c && (f(!1), g(!1));
126
+ e && (c(!1), f(!1));
128
127
  },
129
- className: b(
130
- m.menu,
131
- t === "right" ? m.alignRight : m.alignLeft,
132
- c && m.closing
128
+ className: g(
129
+ D.menu,
130
+ e && D.closing
133
131
  ),
134
- children: i
132
+ children: t
135
133
  }
136
134
  ) : null;
137
- }, F = ({
135
+ }, L = ({
138
136
  children: t,
139
- onClick: i,
140
- href: r,
141
- className: c,
137
+ onClick: o,
138
+ href: e,
139
+ className: l,
142
140
  ...a
143
141
  }) => {
144
- const { closeMenu: u, itemRefs: f, itemCount: g } = x(), e = g.current++, l = {
145
- ref: (n) => {
146
- f.current[e] = n;
142
+ const { closeMenu: c, itemRefs: f, itemCount: n } = b(), w = n.current++, r = {
143
+ ref: (u) => {
144
+ f.current[w] = u;
147
145
  },
148
146
  role: "menuitem",
149
147
  tabIndex: -1,
150
- className: b(m.item, c)
148
+ className: g(D.item, l)
151
149
  };
152
- return r ? /* @__PURE__ */ w("a", { ...l, ...a, href: r, onClick: () => u(!1), children: t }) : /* @__PURE__ */ w(
150
+ return e ? /* @__PURE__ */ p("a", { ...r, ...a, href: e, onClick: () => c(!1), children: t }) : /* @__PURE__ */ p(
153
151
  "button",
154
152
  {
155
- ...l,
153
+ ...r,
156
154
  ...a,
157
155
  onClick: () => {
158
- u(!1), i?.();
156
+ c(!1), o?.();
159
157
  },
160
158
  children: t
161
159
  }
162
160
  );
163
161
  }, S = ({
164
162
  className: t
165
- }) => /* @__PURE__ */ w("div", { role: "separator", className: b(m.divider, t) });
163
+ }) => /* @__PURE__ */ p("div", { role: "separator", className: g(D.divider, t) });
166
164
  export {
167
- L as Dropdown,
168
- B as DropdownContent,
169
- F as DropdownItem,
165
+ P as Dropdown,
166
+ F as DropdownContent,
167
+ L as DropdownItem,
170
168
  S as DropdownSeparator,
171
- P as DropdownTrigger
169
+ B as DropdownTrigger
172
170
  };
package/dist/index14.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsxs as l, jsx as n } from "react/jsx-runtime";
2
2
  import r from "./index31.js";
3
- import t from "./index35.js";
4
- import s from "./index45.js";
3
+ import t from "./index53.js";
4
+ import s from "./index55.js";
5
5
  import { Spinner as b } from "./index23.js";
6
6
  const N = ({
7
7
  icon: e,
package/dist/index15.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsxs as m, jsx as i } from "react/jsx-runtime";
2
2
  import p from "./index31.js";
3
3
  import { forwardRef as n } from "react";
4
- import a from "./index58.js";
4
+ import a from "./index61.js";
5
5
  const c = n(
6
6
  ({ label: s, error: r, id: e, className: t, ...l }, o) => /* @__PURE__ */ m("div", { className: a.wrapper, children: [
7
7
  s && /* @__PURE__ */ i("label", { htmlFor: e, className: a.label, children: s }),
package/dist/index16.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import a from "./index31.js";
3
- import t from "./index35.js";
3
+ import t from "./index53.js";
4
4
  const f = ({
5
5
  variant: o = "primary",
6
6
  size: r = "md",
package/dist/index17.js CHANGED
@@ -2,9 +2,9 @@ import { jsx as l, jsxs as b } from "react/jsx-runtime";
2
2
  import c from "./index31.js";
3
3
  import { useRef as h, useState as u, useEffect as p } from "react";
4
4
  import { createPortal as v } from "react-dom";
5
- import { useScrollLock as M } from "./index53.js";
6
- import t from "./index54.js";
7
- import y from "./index41.js";
5
+ import { useScrollLock as M } from "./index49.js";
6
+ import t from "./index50.js";
7
+ import y from "./index43.js";
8
8
  const R = ({
9
9
  open: s,
10
10
  onClose: o,
package/dist/index18.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { jsxs as f, jsx as e } from "react/jsx-runtime";
2
2
  import u from "./index31.js";
3
- import n from "./index42.js";
4
- import h from "./index43.js";
5
- import d from "./index44.js";
3
+ import n from "./index59.js";
4
+ import h from "./index60.js";
5
+ import d from "./index36.js";
6
6
  function b(i, r, a) {
7
7
  const s = [], c = Math.max(2, i - a), t = Math.min(r - 1, i + a);
8
8
  s.push(1), c > 2 && s.push("ellipsis");
package/dist/index19.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
2
  import o from "./index31.js";
3
- import r from "./index61.js";
3
+ import r from "./index48.js";
4
4
  const N = ({
5
5
  value: e,
6
6
  max: d = 100,
package/dist/index20.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsxs as d, jsx as l } from "react/jsx-runtime";
2
2
  import c from "./index31.js";
3
3
  import { forwardRef as h } from "react";
4
- import a from "./index65.js";
4
+ import a from "./index54.js";
5
5
  const v = h(
6
6
  ({ label: i, error: s, options: m, value: n, onChange: o, name: r, className: p, ...t }, u) => /* @__PURE__ */ d("fieldset", { className: c(a.fieldset, p), children: [
7
7
  i && /* @__PURE__ */ l("legend", { className: a.legend, children: i }),
package/dist/index21.js CHANGED
@@ -1,29 +1,262 @@
1
- import { jsxs as t, jsx as a } from "react/jsx-runtime";
2
- import p from "./index31.js";
3
- import { forwardRef as v } from "react";
4
- import l from "./index66.js";
5
- const u = v(
6
- ({ label: i, error: e, id: r, options: m, placeholder: c, className: o, ...d }, n) => /* @__PURE__ */ t("div", { className: l.wrapper, children: [
7
- i && /* @__PURE__ */ a("label", { htmlFor: r, className: l.label, children: i }),
8
- /* @__PURE__ */ t(
1
+ import { jsx as l, jsxs as g } from "react/jsx-runtime";
2
+ import y from "./index31.js";
3
+ import { createPortal as de } from "react-dom";
4
+ import { useId as ue, useState as h, useRef as k, useCallback as C, useLayoutEffect as pe, useEffect as W } from "react";
5
+ import r from "./index56.js";
6
+ import fe from "./index57.js";
7
+ import be from "./index58.js";
8
+ function X(v) {
9
+ return "options" in v;
10
+ }
11
+ function he(v) {
12
+ const b = [];
13
+ for (const c of v)
14
+ X(c) ? b.push(...c.options) : b.push(c);
15
+ return b;
16
+ }
17
+ const ve = ({
18
+ id: v,
19
+ name: b,
20
+ label: c,
21
+ error: m,
22
+ options: z,
23
+ placeholder: q,
24
+ value: K,
25
+ defaultValue: J,
26
+ onChange: P,
27
+ disabled: D = !1,
28
+ required: V = !1,
29
+ className: Q
30
+ }) => {
31
+ const Z = ue(), d = v ?? Z, F = `${d}-listbox`, j = `${d}-error`, $ = `${d}-label`, u = he(z), o = u.map((e, t) => ({ ...e, index: t })).filter((e) => !e.disabled), A = K !== void 0, [_, ee] = h(J ?? ""), p = A ? K : _, [s, I] = h(!1), [a, i] = h(-1), [te, B] = h(""), O = k(null), [ne, re] = h(!1), [T, oe] = h({ top: 0, left: 0, width: 0 }), E = k(null), w = k(null), R = k(null), M = k([]), S = u.find((e) => e.value === p), U = C(
32
+ (e) => {
33
+ A || ee(e), P?.(e);
34
+ },
35
+ [A, P]
36
+ ), H = C(
37
+ (e) => {
38
+ if (D) return;
39
+ const t = e ?? (p ? u.findIndex((n) => n.value === p) : o[0]?.index ?? 0);
40
+ i(t), I(!0);
41
+ },
42
+ [D, p, u, o]
43
+ ), L = C(() => {
44
+ I(!1), i(-1), E.current?.focus();
45
+ }, []);
46
+ pe(() => {
47
+ if (!s || !E.current) return;
48
+ const e = () => {
49
+ const t = E.current.getBoundingClientRect(), n = window.innerHeight - t.bottom, f = t.top, x = w.current?.offsetHeight ?? 240, G = n < x && f > n;
50
+ re(G), oe({
51
+ top: G ? t.top + window.scrollY - (w.current?.offsetHeight ?? 0) - 4 : t.bottom + window.scrollY + 4,
52
+ left: t.left + window.scrollX,
53
+ width: t.width
54
+ });
55
+ };
56
+ return e(), window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
57
+ window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
58
+ };
59
+ }, [s]), W(() => {
60
+ !s || a < 0 || M.current[a]?.scrollIntoView({ block: "nearest" });
61
+ }, [a, s]), W(() => {
62
+ if (!s) return;
63
+ function e(t) {
64
+ const n = t.target;
65
+ R.current && !R.current.contains(n) && w.current && !w.current.contains(n) && (I(!1), i(-1));
66
+ }
67
+ return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
68
+ }, [s]);
69
+ const N = C(
70
+ (e, t) => {
71
+ if (o.length === 0) return -1;
72
+ const n = o.findIndex((f) => f.index === t);
73
+ switch (e) {
74
+ case "next":
75
+ return n < 0 || n >= o.length - 1 ? o[0].index : o[n + 1].index;
76
+ case "prev":
77
+ return n <= 0 ? o[o.length - 1].index : o[n - 1].index;
78
+ case "first":
79
+ return o[0].index;
80
+ case "last":
81
+ return o[o.length - 1].index;
82
+ }
83
+ },
84
+ [o]
85
+ ), se = (e) => {
86
+ O.current && clearTimeout(O.current);
87
+ const t = te + e.toLowerCase();
88
+ B(t), O.current = setTimeout(() => B(""), 500);
89
+ const n = o.find(
90
+ (f) => f.label.toLowerCase().startsWith(t)
91
+ );
92
+ n && i(n.index);
93
+ }, ae = (e) => {
94
+ if (!s) {
95
+ switch (e.key) {
96
+ case "ArrowDown":
97
+ case "Enter":
98
+ case " ":
99
+ e.preventDefault(), H();
100
+ break;
101
+ case "ArrowUp":
102
+ e.preventDefault(), H(o[o.length - 1]?.index);
103
+ break;
104
+ }
105
+ return;
106
+ }
107
+ switch (e.key) {
108
+ case "ArrowDown":
109
+ e.preventDefault(), i((t) => N("next", t));
110
+ break;
111
+ case "ArrowUp":
112
+ e.preventDefault(), i((t) => N("prev", t));
113
+ break;
114
+ case "Home":
115
+ e.preventDefault(), i(N("first", a));
116
+ break;
117
+ case "End":
118
+ e.preventDefault(), i(N("last", a));
119
+ break;
120
+ case "Enter":
121
+ case " ":
122
+ e.preventDefault(), a >= 0 && !u[a]?.disabled && (U(u[a].value), L());
123
+ break;
124
+ case "Escape":
125
+ e.preventDefault(), L();
126
+ break;
127
+ case "Tab":
128
+ I(!1), i(-1);
129
+ break;
130
+ default:
131
+ e.key.length === 1 && !e.ctrlKey && !e.metaKey && (e.preventDefault(), se(e.key));
132
+ }
133
+ }, le = s && a >= 0 ? `${d}-option-${a}` : void 0;
134
+ let ie = 0;
135
+ const Y = (e) => {
136
+ const t = ie++, n = e.value === p, f = t === a;
137
+ return /* @__PURE__ */ g(
138
+ "li",
139
+ {
140
+ ref: (x) => {
141
+ M.current[t] = x;
142
+ },
143
+ id: `${d}-option-${t}`,
144
+ role: "option",
145
+ "aria-selected": n,
146
+ "aria-disabled": e.disabled || void 0,
147
+ className: y(
148
+ r.option,
149
+ f && r.optionActive,
150
+ n && r.optionSelected,
151
+ e.disabled && r.optionDisabled
152
+ ),
153
+ onMouseEnter: () => {
154
+ e.disabled || i(t);
155
+ },
156
+ onMouseDown: (x) => x.preventDefault(),
157
+ onClick: () => {
158
+ e.disabled || (U(e.value), L());
159
+ },
160
+ children: [
161
+ /* @__PURE__ */ l("span", { className: r.optionLabel, children: e.label }),
162
+ n && /* @__PURE__ */ l(be, { size: 16, className: r.checkIcon, "aria-hidden": !0 })
163
+ ]
164
+ },
165
+ e.value
166
+ );
167
+ }, ce = s ? de(
168
+ /* @__PURE__ */ l(
169
+ "ul",
170
+ {
171
+ ref: w,
172
+ id: F,
173
+ role: "listbox",
174
+ "aria-labelledby": c ? $ : d,
175
+ className: y(r.listbox, ne && r.flipped),
176
+ style: {
177
+ top: T.top,
178
+ left: T.left,
179
+ width: T.width
180
+ },
181
+ children: z.map((e) => {
182
+ if (X(e)) {
183
+ const t = `${d}-group-${e.label.replace(/\s+/g, "-").toLowerCase()}`;
184
+ return /* @__PURE__ */ g("li", { role: "presentation", children: [
185
+ /* @__PURE__ */ l(
186
+ "div",
187
+ {
188
+ id: t,
189
+ role: "presentation",
190
+ className: r.groupLabel,
191
+ children: e.label
192
+ }
193
+ ),
194
+ /* @__PURE__ */ l("ul", { role: "group", "aria-labelledby": t, className: r.group, children: e.options.map(Y) })
195
+ ] }, e.label);
196
+ }
197
+ return Y(e);
198
+ })
199
+ }
200
+ ),
201
+ document.body
202
+ ) : null;
203
+ return /* @__PURE__ */ g("div", { ref: R, className: r.wrapper, children: [
204
+ c && /* @__PURE__ */ l("label", { id: $, className: r.label, children: c }),
205
+ /* @__PURE__ */ g(
206
+ "button",
207
+ {
208
+ ref: E,
209
+ type: "button",
210
+ id: d,
211
+ role: "combobox",
212
+ "aria-haspopup": "listbox",
213
+ "aria-expanded": s,
214
+ "aria-controls": s ? F : void 0,
215
+ "aria-labelledby": c ? $ : void 0,
216
+ "aria-activedescendant": le,
217
+ "aria-invalid": m ? !0 : void 0,
218
+ "aria-describedby": m ? j : void 0,
219
+ "aria-required": V,
220
+ disabled: D,
221
+ className: y(r.trigger, m && r.triggerError, Q),
222
+ onClick: () => s ? L() : H(),
223
+ onKeyDown: ae,
224
+ children: [
225
+ /* @__PURE__ */ l("span", { className: y(r.triggerText, !S && r.placeholder), children: S ? S.label : q ?? " " }),
226
+ /* @__PURE__ */ l(
227
+ fe,
228
+ {
229
+ size: 16,
230
+ className: y(r.chevron, s && r.chevronOpen),
231
+ "aria-hidden": !0
232
+ }
233
+ )
234
+ ]
235
+ }
236
+ ),
237
+ b && /* @__PURE__ */ g(
9
238
  "select",
10
239
  {
11
- id: r,
12
- ref: n,
13
- "aria-invalid": e ? !0 : void 0,
14
- "aria-describedby": e ? `${r}-error` : void 0,
15
- className: p(l.select, e && l.selectError, o),
16
- ...d,
240
+ name: b,
241
+ value: p,
242
+ required: V,
243
+ disabled: D,
244
+ tabIndex: -1,
245
+ "aria-hidden": !0,
246
+ className: r.hiddenSelect,
247
+ onChange: () => {
248
+ },
17
249
  children: [
18
- c && /* @__PURE__ */ a("option", { value: "", disabled: !0, children: c }),
19
- m.map((s) => /* @__PURE__ */ a("option", { value: s.value, children: s.label }, s.value))
250
+ !p && /* @__PURE__ */ l("option", { value: "" }),
251
+ u.map((e) => /* @__PURE__ */ l("option", { value: e.value, children: e.label }, e.value))
20
252
  ]
21
253
  }
22
254
  ),
23
- e && /* @__PURE__ */ a("p", { id: `${r}-error`, role: "alert", className: l.error, children: e })
24
- ] })
25
- );
26
- u.displayName = "Select";
255
+ ce,
256
+ m && /* @__PURE__ */ l("p", { id: j, role: "alert", className: r.error, children: m })
257
+ ] });
258
+ };
259
+ ve.displayName = "Select";
27
260
  export {
28
- u as Select
261
+ ve as Select
29
262
  };
package/dist/index22.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import n from "./index31.js";
3
- import t from "./index50.js";
3
+ import t from "./index51.js";
4
4
  const c = ({
5
5
  width: e,
6
6
  height: r,
package/dist/index23.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
2
  import i from "./index31.js";
3
- import r from "./index52.js";
3
+ import r from "./index45.js";
4
4
  const m = ({
5
5
  size: s = "md",
6
6
  className: n,
package/dist/index24.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
2
  import l from "./index31.js";
3
- import r from "./index59.js";
3
+ import r from "./index62.js";
4
4
  const u = ({
5
5
  id: t,
6
6
  checked: s,
package/dist/index25.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as b, jsxs as D } from "react/jsx-runtime";
2
2
  import f from "./index31.js";
3
3
  import { useRef as w, useState as I, useCallback as E, useEffect as g } from "react";
4
- import a from "./index57.js";
4
+ import a from "./index65.js";
5
5
  const j = ({
6
6
  tabs: l,
7
7
  value: i,