@brycks/core-front 0.3.6 → 0.5.0

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/components/data/Table/Table.cjs +1 -1
  2. package/dist/components/data/Table/Table.cjs.map +1 -1
  3. package/dist/components/data/Table/Table.js +145 -132
  4. package/dist/components/data/Table/Table.js.map +1 -1
  5. package/dist/components/data.cjs +1 -1
  6. package/dist/components/data.js +23 -21
  7. package/dist/components/feedback/Banner/Banner.cjs +2 -0
  8. package/dist/components/feedback/Banner/Banner.cjs.map +1 -0
  9. package/dist/components/feedback/Banner/Banner.js +77 -0
  10. package/dist/components/feedback/Banner/Banner.js.map +1 -0
  11. package/dist/components/feedback/ConfirmDialog/ConfirmDialog.cjs +2 -0
  12. package/dist/components/feedback/ConfirmDialog/ConfirmDialog.cjs.map +1 -0
  13. package/dist/components/feedback/ConfirmDialog/ConfirmDialog.js +68 -0
  14. package/dist/components/feedback/ConfirmDialog/ConfirmDialog.js.map +1 -0
  15. package/dist/components/feedback/Modal/Modal.cjs +1 -1
  16. package/dist/components/feedback/Modal/Modal.cjs.map +1 -1
  17. package/dist/components/feedback/Modal/Modal.js +91 -83
  18. package/dist/components/feedback/Modal/Modal.js.map +1 -1
  19. package/dist/components/feedback/Popover/Popover.cjs +2 -2
  20. package/dist/components/feedback/Popover/Popover.cjs.map +1 -1
  21. package/dist/components/feedback/Popover/Popover.js +43 -44
  22. package/dist/components/feedback/Popover/Popover.js.map +1 -1
  23. package/dist/components/feedback.cjs +1 -1
  24. package/dist/components/feedback.js +17 -13
  25. package/dist/components/feedback.js.map +1 -1
  26. package/dist/components/form/Combobox/Combobox.cjs +2 -2
  27. package/dist/components/form/Combobox/Combobox.cjs.map +1 -1
  28. package/dist/components/form/Combobox/Combobox.js +166 -146
  29. package/dist/components/form/Combobox/Combobox.js.map +1 -1
  30. package/dist/components/form/SearchInput/SearchInput.cjs +2 -0
  31. package/dist/components/form/SearchInput/SearchInput.cjs.map +1 -0
  32. package/dist/components/form/SearchInput/SearchInput.js +68 -0
  33. package/dist/components/form/SearchInput/SearchInput.js.map +1 -0
  34. package/dist/components/form.cjs +1 -1
  35. package/dist/components/form.js +15 -13
  36. package/dist/components/form.js.map +1 -1
  37. package/dist/components/layout/Card/Card.cjs +1 -1
  38. package/dist/components/layout/Card/Card.cjs.map +1 -1
  39. package/dist/components/layout/Card/Card.js +7 -5
  40. package/dist/components/layout/Card/Card.js.map +1 -1
  41. package/dist/components/navigation/SegmentedControl/SegmentedControl.cjs +2 -0
  42. package/dist/components/navigation/SegmentedControl/SegmentedControl.cjs.map +1 -0
  43. package/dist/components/navigation/SegmentedControl/SegmentedControl.js +90 -0
  44. package/dist/components/navigation/SegmentedControl/SegmentedControl.js.map +1 -0
  45. package/dist/components/navigation.cjs +1 -1
  46. package/dist/components/navigation.js +25 -23
  47. package/dist/components/navigation.js.map +1 -1
  48. package/dist/components/utility/Avatar/Avatar.cjs +1 -1
  49. package/dist/components/utility/Avatar/Avatar.cjs.map +1 -1
  50. package/dist/components/utility/Avatar/Avatar.js +18 -18
  51. package/dist/components/utility/Avatar/Avatar.js.map +1 -1
  52. package/dist/components/utility/Badge/Badge.cjs +1 -1
  53. package/dist/components/utility/Badge/Badge.cjs.map +1 -1
  54. package/dist/components/utility/Badge/Badge.js +31 -23
  55. package/dist/components/utility/Badge/Badge.js.map +1 -1
  56. package/dist/components/utility/Kbd/Kbd.cjs +2 -0
  57. package/dist/components/utility/Kbd/Kbd.cjs.map +1 -0
  58. package/dist/components/utility/Kbd/Kbd.js +20 -0
  59. package/dist/components/utility/Kbd/Kbd.js.map +1 -0
  60. package/dist/components/utility/Logo/Logo.cjs +1 -1
  61. package/dist/components/utility/Logo/Logo.cjs.map +1 -1
  62. package/dist/components/utility/Logo/Logo.js +19 -19
  63. package/dist/components/utility/Logo/Logo.js.map +1 -1
  64. package/dist/components/utility.cjs +1 -1
  65. package/dist/components/utility.js +9 -7
  66. package/dist/components/utility.js.map +1 -1
  67. package/dist/data.d.ts +34 -1
  68. package/dist/feedback.d.ts +67 -2
  69. package/dist/form.d.ts +31 -0
  70. package/dist/index.cjs +1 -1
  71. package/dist/index.d.ts +184 -3
  72. package/dist/index.js +177 -165
  73. package/dist/index.js.map +1 -1
  74. package/dist/navigation.d.ts +39 -0
  75. package/dist/styles.css +1 -1
  76. package/dist/utility.d.ts +19 -0
  77. package/package.json +1 -1
@@ -1,173 +1,175 @@
1
- import { jsxs as v, jsx as o, Fragment as ke } from "react/jsx-runtime";
2
- import { forwardRef as we, useState as g, useRef as j, useMemo as X, useEffect as I, useCallback as L } from "react";
3
- import { createPortal as xe } from "react-dom";
4
- import { cx as Se } from "../../../utils/styles.js";
5
- import { useId as Ce } from "../../../hooks/useId.js";
1
+ import { jsxs as f, jsx as t, Fragment as xe } from "react/jsx-runtime";
2
+ import { forwardRef as Ce, useState as g, useRef as W, useMemo as U, useEffect as I, useCallback as L } from "react";
3
+ import { createPortal as Se } from "react-dom";
4
+ import { cx as $e } from "../../../utils/styles.js";
5
+ import { useId as ze } from "../../../hooks/useId.js";
6
6
  import { durations as w, easings as x } from "../../../design-system/tokens/motion.js";
7
- import { iconSizes as B, componentPaddingX as E, componentHeights as P, componentGap as $e } from "../../../design-system/primitives/sizing.js";
8
- import { fontSizes as R } from "../../../design-system/tokens/typography.js";
9
- import { spacing as d } from "../../../design-system/tokens/spacing.js";
10
- const ze = {
11
- sm: { height: P.sm, fontSize: R.base - 1, padding: E.sm, iconSize: B.sm },
12
- md: { height: P.md, fontSize: R.base, padding: E.md, iconSize: B.md },
13
- lg: { height: P.lg, fontSize: R.md, padding: E.lg, iconSize: B.lg }
14
- }, Ie = (S, f) => {
15
- const c = f.toLowerCase();
16
- return S.label.toLowerCase().includes(c) || S.value.toLowerCase().includes(c) || (S.description?.toLowerCase().includes(c) ?? !1);
7
+ import { iconSizes as j, componentPaddingX as E, componentHeights as B, componentGap as Ie } from "../../../design-system/primitives/sizing.js";
8
+ import { fontSizes as M } from "../../../design-system/tokens/typography.js";
9
+ import { spacing as a } from "../../../design-system/tokens/spacing.js";
10
+ const Le = {
11
+ sm: { height: B.sm, fontSize: M.base - 1, padding: E.sm, iconSize: j.sm },
12
+ md: { height: B.md, fontSize: M.base, padding: E.md, iconSize: j.md },
13
+ lg: { height: B.lg, fontSize: M.md, padding: E.lg, iconSize: j.lg }
14
+ }, Ee = (C, p) => {
15
+ const c = p.toLowerCase();
16
+ return C.label.toLowerCase().includes(c) || C.value.toLowerCase().includes(c) || (C.description?.toLowerCase().includes(c) ?? !1);
17
17
  };
18
- function Le() {
19
- return /* @__PURE__ */ o("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ o("path", { d: "M4 6l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
18
+ function Me() {
19
+ return /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ t("path", { d: "M4 6l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
20
20
  }
21
- function Ee() {
22
- return /* @__PURE__ */ o("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ o("path", { d: "M4 4l6 6M10 4l-6 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) });
21
+ function Re() {
22
+ return /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ t("path", { d: "M4 4l6 6M10 4l-6 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) });
23
23
  }
24
- const Re = we(function({
25
- options: f,
24
+ const Oe = Ce(function({
25
+ options: p,
26
26
  value: c,
27
- defaultValue: G = null,
28
- onChange: W,
27
+ defaultValue: J = null,
28
+ onChange: P,
29
29
  onInputChange: F,
30
- placeholder: U = "Select or search...",
30
+ placeholder: Q = "Select or search...",
31
31
  size: T = "md",
32
32
  disabled: b = !1,
33
33
  isInvalid: A = !1,
34
- required: J = !1,
35
- clearable: Q = !0,
36
- "aria-label": Y,
37
- "aria-labelledby": Z,
38
- filterFn: N = Ie,
39
- emptyText: _ = "No options found",
40
- creatable: M = !1,
34
+ required: Z = !1,
35
+ clearable: _ = !0,
36
+ "aria-label": N,
37
+ "aria-labelledby": ee,
38
+ filterFn: Y = Ee,
39
+ emptyText: re = "No options found",
40
+ isLoading: q = !1,
41
+ loadingText: te = "Loading…",
42
+ creatable: R = !1,
41
43
  onCreate: O,
42
- createLabel: ee = (m) => `Create "${m}"`,
43
- clearLabel: re = "Clear selection",
44
- listboxLabel: te = "Options",
45
- className: oe,
46
- testId: ne
47
- }, C) {
48
- const m = Ce("combobox-listbox"), [ae, se] = g(G), [a, y] = g(""), [r, p] = g(!1), [n, s] = g(-1), [q, H] = g(!1), $ = j(null), z = j(null), K = j(null), i = c !== void 0 ? c : ae, h = ze[T], l = X(
49
- () => f.find((e) => e.value === i),
50
- [f, i]
51
- ), u = X(() => a ? f.filter((e) => N(e, a)) : f, [f, a, N]);
44
+ createLabel: oe = (h) => `Create "${h}"`,
45
+ clearLabel: ne = "Clear selection",
46
+ listboxLabel: ie = "Options",
47
+ className: ae,
48
+ testId: se
49
+ }, S) {
50
+ const h = ze("combobox-listbox"), [le, de] = g(J), [i, y] = g(""), [r, m] = g(!1), [n, s] = g(-1), [H, K] = g(!1), $ = W(null), z = W(null), V = W(null), l = c !== void 0 ? c : le, v = Le[T], d = U(
51
+ () => p.find((e) => e.value === l),
52
+ [p, l]
53
+ ), u = U(() => i ? p.filter((e) => Y(e, i)) : p, [p, i, Y]);
52
54
  I(() => {
53
- !r && l ? y(l.label) : !r && !i && y("");
54
- }, [r, l, i]);
55
+ !r && d ? y(d.label) : !r && !l && y("");
56
+ }, [r, d, l]);
55
57
  const k = L(
56
58
  (e) => {
57
- c === void 0 && se(e), W?.(e), p(!1), s(-1), z.current?.focus();
59
+ c === void 0 && de(e), P?.(e), m(!1), s(-1), z.current?.focus();
58
60
  },
59
- [c, W]
60
- ), ie = L(
61
+ [c, P]
62
+ ), ce = L(
61
63
  (e) => {
62
- const t = e.target.value;
63
- y(t), F?.(t), r || p(!0), s(0);
64
+ const o = e.target.value;
65
+ y(o), F?.(o), r || m(!0), s(0);
64
66
  },
65
67
  [r, F]
66
- ), le = L(
68
+ ), ue = L(
67
69
  (e) => {
68
70
  e.stopPropagation(), k(null), y(""), z.current?.focus();
69
71
  },
70
72
  [k]
71
- ), de = L(
73
+ ), fe = L(
72
74
  (e) => {
73
75
  switch (e.key) {
74
76
  case "ArrowDown":
75
- e.preventDefault(), r ? s((t) => Math.min(t + 1, u.length - 1)) : (p(!0), s(0));
77
+ e.preventDefault(), r ? s((o) => Math.min(o + 1, u.length - 1)) : (m(!0), s(0));
76
78
  break;
77
79
  case "ArrowUp":
78
- e.preventDefault(), r && s((t) => Math.max(t - 1, 0));
80
+ e.preventDefault(), r && s((o) => Math.max(o - 1, 0));
79
81
  break;
80
82
  case "Enter":
81
- e.preventDefault(), r && n >= 0 && u[n] ? u[n].disabled || k(u[n].value) : M && a && u.length === 0 && O?.(a);
83
+ e.preventDefault(), r && n >= 0 && u[n] ? u[n].disabled || k(u[n].value) : R && i && u.length === 0 && O?.(i);
82
84
  break;
83
85
  case "Escape":
84
- e.preventDefault(), p(!1), s(-1), l && y(l.label);
86
+ e.preventDefault(), m(!1), s(-1), d && y(d.label);
85
87
  break;
86
88
  case "Tab":
87
- r && (p(!1), s(-1));
89
+ r && (m(!1), s(-1));
88
90
  break;
89
91
  }
90
92
  },
91
- [r, n, u, k, M, a, O, l]
93
+ [r, n, u, k, R, i, O, d]
92
94
  );
93
95
  I(() => {
94
96
  if (!r) return;
95
- const e = (t) => {
96
- $.current?.contains(t.target) || (p(!1), s(-1), l && y(l.label));
97
+ const e = (o) => {
98
+ $.current?.contains(o.target) || (m(!1), s(-1), d && y(d.label));
97
99
  };
98
100
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
99
- }, [r, l]), I(() => {
101
+ }, [r, d]), I(() => {
100
102
  if (!r || n < 0) return;
101
- K.current?.children[n]?.scrollIntoView({ block: "nearest" });
103
+ V.current?.children[n]?.scrollIntoView({ block: "nearest" });
102
104
  }, [r, n]);
103
- const [D, ce] = g({ top: 0, left: 0, width: 0 });
105
+ const [D, pe] = g({ top: 0, left: 0, width: 0 });
104
106
  I(() => {
105
107
  if (!r || !$.current) return;
106
108
  const e = () => {
107
- const t = $.current.getBoundingClientRect();
108
- ce({
109
- top: t.bottom + window.scrollY + d[1],
110
- left: t.left + window.scrollX,
111
- width: t.width
109
+ const o = $.current.getBoundingClientRect();
110
+ pe({
111
+ top: o.bottom + window.scrollY + a[1],
112
+ left: o.left + window.scrollX,
113
+ width: o.width
112
114
  });
113
115
  };
114
116
  return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
115
117
  window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
116
118
  };
117
119
  }, [r]);
118
- const ue = {
120
+ const be = {
119
121
  position: "relative",
120
122
  display: "inline-flex",
121
123
  width: "100%"
122
- }, fe = {
124
+ }, me = {
123
125
  position: "relative",
124
126
  display: "flex",
125
127
  alignItems: "center",
126
128
  width: "100%",
127
- height: h.height,
129
+ height: v.height,
128
130
  backgroundColor: b ? "var(--brycks-background-muted)" : "var(--brycks-background-default)",
129
- border: `1px solid ${A ? "var(--brycks-error-default)" : q ? "var(--brycks-primary-default)" : "var(--brycks-border-default)"}`,
131
+ border: `1px solid ${A ? "var(--brycks-error-default)" : H ? "var(--brycks-primary-default)" : "var(--brycks-border-default)"}`,
130
132
  borderRadius: "var(--brycks-radius-md)",
131
133
  transition: `all ${w.fast}ms ${x.easeOut}`,
132
134
  cursor: b ? "not-allowed" : "text",
133
- boxShadow: q ? "var(--brycks-focus-ring)" : void 0
134
- }, be = {
135
+ boxShadow: H ? "var(--brycks-focus-ring)" : void 0
136
+ }, he = {
135
137
  flex: 1,
136
138
  height: "100%",
137
- padding: `0 ${h.padding}px`,
138
- paddingRight: d[10],
139
- fontSize: h.fontSize,
139
+ padding: `0 ${v.padding}px`,
140
+ paddingRight: a[10],
141
+ fontSize: v.fontSize,
140
142
  color: b ? "var(--brycks-foreground-disabled)" : "var(--brycks-foreground-default)",
141
143
  backgroundColor: "transparent",
142
144
  border: "none",
143
145
  outline: "none",
144
146
  cursor: b ? "not-allowed" : "text"
145
- }, pe = {
147
+ }, ye = {
146
148
  position: "absolute",
147
- right: h.padding,
149
+ right: v.padding,
148
150
  display: "flex",
149
151
  alignItems: "center",
150
- gap: d[1],
152
+ gap: a[1],
151
153
  pointerEvents: "none"
152
- }, me = {
154
+ }, ve = {
153
155
  display: "flex",
154
156
  alignItems: "center",
155
157
  justifyContent: "center",
156
- width: d[5],
157
- height: d[5],
158
+ width: a[5],
159
+ height: a[5],
158
160
  color: "var(--brycks-foreground-muted)",
159
161
  cursor: "pointer",
160
162
  borderRadius: "var(--brycks-radius-sm)",
161
163
  transition: `all ${w.fast}ms ${x.easeOut}`,
162
164
  pointerEvents: "auto"
163
- }, ye = {
165
+ }, ge = {
164
166
  display: "flex",
165
167
  alignItems: "center",
166
168
  justifyContent: "center",
167
169
  color: "var(--brycks-foreground-muted)",
168
170
  transform: r ? "rotate(180deg)" : "rotate(0)",
169
171
  transition: `transform ${w.fast}ms ${x.easeOut}`
170
- }, he = {
172
+ }, ke = {
171
173
  position: "absolute",
172
174
  top: D.top,
173
175
  left: D.left,
@@ -179,123 +181,141 @@ const Re = we(function({
179
181
  borderRadius: "var(--brycks-radius-lg)",
180
182
  boxShadow: "var(--brycks-shadow-lg)",
181
183
  zIndex: "var(--brycks-z-dropdown)",
182
- padding: d[1],
184
+ padding: a[1],
183
185
  animation: `brycks-dropdown-in ${w.quick}ms ${x.easeOut}`
184
- }, V = (e, t, ge) => ({
186
+ }, X = (e, o, we) => ({
185
187
  display: "flex",
186
188
  alignItems: "center",
187
- gap: $e.md,
188
- padding: `${d[2]}px ${E.sm}px`,
189
- fontSize: h.fontSize,
190
- color: t ? "var(--brycks-foreground-disabled)" : "var(--brycks-foreground-default)",
191
- backgroundColor: e ? "var(--brycks-background-muted)" : ge ? "var(--brycks-primary-muted)" : "transparent",
189
+ gap: Ie.md,
190
+ padding: `${a[2]}px ${E.sm}px`,
191
+ fontSize: v.fontSize,
192
+ color: o ? "var(--brycks-foreground-disabled)" : "var(--brycks-foreground-default)",
193
+ backgroundColor: e ? "var(--brycks-background-muted)" : we ? "var(--brycks-primary-muted)" : "transparent",
192
194
  borderRadius: "var(--brycks-radius-md)",
193
- cursor: t ? "not-allowed" : "pointer",
195
+ cursor: o ? "not-allowed" : "pointer",
194
196
  transition: `background-color ${w.fast}ms ${x.easeOut}`
195
- }), ve = {
196
- padding: `${d[4]}px ${d[3]}px`,
197
- fontSize: h.fontSize,
197
+ }), G = {
198
+ padding: `${a[4]}px ${a[3]}px`,
199
+ fontSize: v.fontSize,
198
200
  color: "var(--brycks-foreground-muted)",
199
201
  textAlign: "center"
200
202
  };
201
- return /* @__PURE__ */ v(
203
+ return /* @__PURE__ */ f(
202
204
  "div",
203
205
  {
204
206
  ref: $,
205
- className: Se("brycks-combobox", `brycks-combobox--${T}`, oe),
206
- style: ue,
207
- "data-testid": ne,
207
+ className: $e("brycks-combobox", `brycks-combobox--${T}`, ae),
208
+ style: be,
209
+ "data-testid": se,
208
210
  children: [
209
- /* @__PURE__ */ v(
211
+ /* @__PURE__ */ f(
210
212
  "div",
211
213
  {
212
- style: fe,
214
+ style: me,
213
215
  onClick: () => !b && z.current?.focus(),
214
216
  children: [
215
- /* @__PURE__ */ o(
217
+ /* @__PURE__ */ t(
216
218
  "input",
217
219
  {
218
220
  ref: (e) => {
219
- z.current = e, typeof C == "function" ? C(e) : C && (C.current = e);
221
+ z.current = e, typeof S == "function" ? S(e) : S && (S.current = e);
220
222
  },
221
223
  type: "text",
222
224
  role: "combobox",
223
225
  "aria-expanded": r,
224
226
  "aria-haspopup": "listbox",
225
227
  "aria-autocomplete": "list",
226
- "aria-controls": r ? m : void 0,
227
- "aria-activedescendant": r && n >= 0 ? `${m}-option-${n}` : void 0,
228
+ "aria-controls": r ? h : void 0,
229
+ "aria-activedescendant": r && n >= 0 ? `${h}-option-${n}` : void 0,
228
230
  "aria-invalid": A,
229
- "aria-required": J,
230
- "aria-label": Y,
231
- "aria-labelledby": Z,
232
- value: a,
233
- placeholder: U,
231
+ "aria-required": Z,
232
+ "aria-label": N,
233
+ "aria-labelledby": ee,
234
+ value: i,
235
+ placeholder: Q,
234
236
  disabled: b,
235
- style: be,
236
- onChange: ie,
237
- onKeyDown: de,
237
+ style: he,
238
+ onChange: ce,
239
+ onKeyDown: fe,
238
240
  onFocus: () => {
239
- H(!0), p(!0);
241
+ K(!0), m(!0);
240
242
  },
241
- onBlur: () => H(!1)
243
+ onBlur: () => K(!1)
242
244
  }
243
245
  ),
244
- /* @__PURE__ */ v("div", { style: pe, children: [
245
- Q && i && !b && /* @__PURE__ */ o(
246
+ /* @__PURE__ */ f("div", { style: ye, children: [
247
+ _ && l && !b && /* @__PURE__ */ t(
246
248
  "button",
247
249
  {
248
250
  type: "button",
249
- "aria-label": re,
250
- style: me,
251
- onClick: le,
251
+ "aria-label": ne,
252
+ style: ve,
253
+ onClick: ue,
252
254
  onMouseEnter: (e) => {
253
255
  e.currentTarget.style.backgroundColor = "var(--brycks-background-muted)", e.currentTarget.style.color = "var(--brycks-foreground-default)";
254
256
  },
255
257
  onMouseLeave: (e) => {
256
258
  e.currentTarget.style.backgroundColor = "transparent", e.currentTarget.style.color = "var(--brycks-foreground-muted)";
257
259
  },
258
- children: /* @__PURE__ */ o(Ee, {})
260
+ children: /* @__PURE__ */ t(Re, {})
259
261
  }
260
262
  ),
261
- /* @__PURE__ */ o("span", { style: ye, children: /* @__PURE__ */ o(Le, {}) })
263
+ /* @__PURE__ */ t("span", { style: ge, children: /* @__PURE__ */ t(Me, {}) })
262
264
  ] })
263
265
  ]
264
266
  }
265
267
  ),
266
- r && xe(
267
- /* @__PURE__ */ v(ke, { children: [
268
- /* @__PURE__ */ o("style", { children: `
268
+ r && Se(
269
+ /* @__PURE__ */ f(xe, { children: [
270
+ /* @__PURE__ */ t("style", { children: `
269
271
  @keyframes brycks-dropdown-in {
270
272
  from { opacity: 0; transform: translateY(-4px); }
271
273
  to { opacity: 1; transform: translateY(0); }
272
274
  }
273
275
  ` }),
274
- /* @__PURE__ */ o(
276
+ /* @__PURE__ */ t(
275
277
  "ul",
276
278
  {
277
- ref: K,
278
- id: m,
279
+ ref: V,
280
+ id: h,
279
281
  role: "listbox",
280
- "aria-label": Y || te,
281
- style: he,
282
- children: u.length > 0 ? u.map((e, t) => /* @__PURE__ */ v(
282
+ "aria-label": N || ie,
283
+ "aria-busy": q || void 0,
284
+ style: ke,
285
+ children: q ? /* @__PURE__ */ t("li", { style: G, role: "status", "aria-live": "polite", children: /* @__PURE__ */ f("span", { style: { display: "inline-flex", alignItems: "center", justifyContent: "center", gap: a[2] }, children: [
286
+ /* @__PURE__ */ f(
287
+ "svg",
288
+ {
289
+ width: "16",
290
+ height: "16",
291
+ viewBox: "0 0 24 24",
292
+ fill: "none",
293
+ className: "brycks-animate-spin",
294
+ "aria-hidden": "true",
295
+ children: [
296
+ /* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", opacity: "0.2" }),
297
+ /* @__PURE__ */ t("path", { d: "M12 2C6.47715 2 2 6.47715 2 12", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round" })
298
+ ]
299
+ }
300
+ ),
301
+ te
302
+ ] }) }) : u.length > 0 ? u.map((e, o) => /* @__PURE__ */ f(
283
303
  "li",
284
304
  {
285
- id: `${m}-option-${t}`,
305
+ id: `${h}-option-${o}`,
286
306
  role: "option",
287
- "aria-selected": e.value === i,
307
+ "aria-selected": e.value === l,
288
308
  "aria-disabled": e.disabled,
289
- style: V(t === n, !!e.disabled, e.value === i),
309
+ style: X(o === n, !!e.disabled, e.value === l),
290
310
  onClick: () => !e.disabled && k(e.value),
291
- onMouseEnter: () => s(t),
311
+ onMouseEnter: () => s(o),
292
312
  children: [
293
- e.icon && /* @__PURE__ */ o("span", { style: { flexShrink: 0 }, children: e.icon }),
294
- /* @__PURE__ */ v("div", { style: { flex: 1, minWidth: 0 }, children: [
295
- /* @__PURE__ */ o("div", { style: { fontWeight: e.value === i ? 500 : 400 }, children: e.label }),
296
- e.description && /* @__PURE__ */ o("div", { style: { fontSize: R.sm, color: "var(--brycks-foreground-muted)" }, children: e.description })
313
+ e.icon && /* @__PURE__ */ t("span", { style: { flexShrink: 0 }, children: e.icon }),
314
+ /* @__PURE__ */ f("div", { style: { flex: 1, minWidth: 0 }, children: [
315
+ /* @__PURE__ */ t("div", { style: { fontWeight: e.value === l ? 500 : 400 }, children: e.label }),
316
+ e.description && /* @__PURE__ */ t("div", { style: { fontSize: M.sm, color: "var(--brycks-foreground-muted)" }, children: e.description })
297
317
  ] }),
298
- e.value === i && /* @__PURE__ */ o("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", style: { flexShrink: 0 }, children: /* @__PURE__ */ o(
318
+ e.value === l && /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", style: { flexShrink: 0 }, children: /* @__PURE__ */ t(
299
319
  "path",
300
320
  {
301
321
  d: "M3 8l3 3 7-7",
@@ -308,20 +328,20 @@ const Re = we(function({
308
328
  ]
309
329
  },
310
330
  e.value
311
- )) : /* @__PURE__ */ o("li", { style: ve, children: M && a ? /* @__PURE__ */ o(
331
+ )) : /* @__PURE__ */ t("li", { style: G, children: R && i ? /* @__PURE__ */ t(
312
332
  "button",
313
333
  {
314
334
  type: "button",
315
335
  style: {
316
- ...V(!0, !1, !1),
336
+ ...X(!0, !1, !1),
317
337
  width: "100%",
318
338
  border: "none",
319
339
  cursor: "pointer"
320
340
  },
321
- onClick: () => O?.(a),
322
- children: ee(a)
341
+ onClick: () => O?.(i),
342
+ children: oe(i)
323
343
  }
324
- ) : _ })
344
+ ) : re })
325
345
  }
326
346
  )
327
347
  ] }),
@@ -331,8 +351,8 @@ const Re = we(function({
331
351
  }
332
352
  );
333
353
  });
334
- Re.displayName = "Combobox";
354
+ Oe.displayName = "Combobox";
335
355
  export {
336
- Re as Combobox
356
+ Oe as Combobox
337
357
  };
338
358
  //# sourceMappingURL=Combobox.js.map