@blakesteve/roster 5.11.0 → 5.12.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 (43) hide show
  1. package/README.md +37 -8
  2. package/dist/components/atoms/Chip/chip-variants.cjs +1 -1
  3. package/dist/components/atoms/Chip/chip-variants.js +8 -2
  4. package/dist/components/atoms/Combobox/Combobox.cjs +1 -1
  5. package/dist/components/atoms/Combobox/Combobox.js +20 -18
  6. package/dist/components/atoms/MultiSelect/MultiSelect.cjs +1 -1
  7. package/dist/components/atoms/MultiSelect/MultiSelect.js +22 -20
  8. package/dist/components/atoms/Select/Select.cjs +1 -1
  9. package/dist/components/atoms/Select/Select.js +19 -17
  10. package/dist/components/molecules/Carousel/Carousel.cjs +1 -1
  11. package/dist/components/molecules/Carousel/Carousel.js +31 -29
  12. package/dist/components/molecules/FileUpload/FileUpload.cjs +1 -1
  13. package/dist/components/molecules/FileUpload/FileUpload.js +21 -19
  14. package/dist/components/molecules/LiquidTabs/LiquidTabs.cjs +1 -1
  15. package/dist/components/molecules/LiquidTabs/LiquidTabs.js +22 -20
  16. package/dist/components/molecules/Menu/Menu.cjs +1 -1
  17. package/dist/components/molecules/Menu/Menu.js +104 -102
  18. package/dist/components/molecules/RadioGroup/RadioGroup.cjs +1 -1
  19. package/dist/components/molecules/RadioGroup/RadioGroup.js +23 -21
  20. package/dist/components/molecules/RangeSlider/RangeSlider.cjs +1 -1
  21. package/dist/components/molecules/RangeSlider/RangeSlider.d.ts +8 -3
  22. package/dist/components/molecules/RangeSlider/RangeSlider.js +38 -36
  23. package/dist/components/molecules/Slider/Slider.cjs +1 -1
  24. package/dist/components/molecules/Slider/Slider.d.ts +7 -3
  25. package/dist/components/molecules/Slider/Slider.js +30 -28
  26. package/dist/components/molecules/Slider/track-parts.d.ts +2 -1
  27. package/dist/components/organisms/Dialog/Dialog.cjs +1 -1
  28. package/dist/components/organisms/Dialog/Dialog.js +19 -17
  29. package/dist/components/organisms/ModerationQueue/ModerationQueue.cjs +1 -1
  30. package/dist/components/organisms/ModerationQueue/ModerationQueue.js +45 -43
  31. package/dist/components/organisms/Navbar/Navbar.cjs +1 -1
  32. package/dist/components/organisms/Navbar/Navbar.js +24 -22
  33. package/dist/components/organisms/Sheet/Sheet.cjs +1 -1
  34. package/dist/components/organisms/Sheet/Sheet.js +25 -23
  35. package/dist/internal/key-focus.cjs +1 -0
  36. package/dist/internal/key-focus.d.ts +7 -0
  37. package/dist/internal/key-focus.js +60 -0
  38. package/dist/internal/popup.cjs +1 -1
  39. package/dist/internal/popup.d.ts +15 -1
  40. package/dist/internal/popup.js +17 -12
  41. package/dist/meta.json +3 -3
  42. package/dist/roster.css +1 -1
  43. package/package.json +1 -1
@@ -2,18 +2,19 @@
2
2
  import { jsx as c, jsxs as N, Fragment as j } from "react/jsx-runtime";
3
3
  import * as i from "react";
4
4
  import { Portal as q } from "../../../node_modules/@headlessui/react/dist/components/portal/portal.js";
5
- import { useFloating as ge, offset as he, flip as be, shift as ye, size as ve } from "../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js";
5
+ import { useFloating as he, offset as be, flip as ye, shift as ve, size as we } from "../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js";
6
6
  import { cn as S } from "../../../lib/utils.js";
7
- import { POPUP_PANEL as we } from "../../../internal/popup.js";
8
- import { Button as xe } from "../../atoms/Button/Button.js";
9
- import { nextByTypeahead as ke } from "./menu-typeahead.js";
10
- import { autoUpdate as Ie } from "../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
11
- function Ee({ href: e, to: r, children: n, ...s }) {
7
+ import { carriesDark as G, POPUP_PANEL as xe } from "../../../internal/popup.js";
8
+ import { Button as ke } from "../../atoms/Button/Button.js";
9
+ import { nextByTypeahead as Ie } from "./menu-typeahead.js";
10
+ import { useKeyFocus as Ee } from "../../../internal/key-focus.js";
11
+ import { autoUpdate as Se } from "../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
12
+ function Pe({ href: e, to: r, children: n, ...s }) {
12
13
  return /* @__PURE__ */ c("a", { href: e, ...s, children: n });
13
14
  }
14
- const G = i.createContext(null), B = i.createContext(null), Y = i.createContext(null);
15
+ const Y = i.createContext(null), B = i.createContext(null), X = i.createContext(null);
15
16
  function C(e) {
16
- const r = i.useContext(G);
17
+ const r = i.useContext(Y);
17
18
  if (!r) throw new Error(`<${e}> must be inside a <Menu>.`);
18
19
  return r;
19
20
  }
@@ -22,9 +23,9 @@ function _(e) {
22
23
  if (!r) throw new Error(`<${e}> must be inside <MenuItems> or a <MenuSubmenu>.`);
23
24
  return r;
24
25
  }
25
- const Se = "[data-menu-item]", X = 100, Pe = 75, Me = 'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"]), [contenteditable]:not([contenteditable="false"])';
26
- function D(e) {
27
- return e ? [...e.querySelectorAll(Se)].filter((r) => r.closest("[data-menu-panel]") === e) : [];
26
+ const Me = "[data-menu-item]", J = 100, Ae = 75, Te = 'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"]), [contenteditable]:not([contenteditable="false"])';
27
+ function R(e) {
28
+ return e ? [...e.querySelectorAll(Me)].filter((r) => r.closest("[data-menu-panel]") === e) : [];
28
29
  }
29
30
  function E(e) {
30
31
  e && (e.setAttribute("data-key-focus", ""), e.addEventListener("blur", () => e.removeAttribute("data-key-focus"), { once: !0 }), e.focus({ preventScroll: !0 }), e.scrollIntoView?.({ block: "nearest" }));
@@ -32,40 +33,40 @@ function E(e) {
32
33
  function z(e) {
33
34
  return !!e && getComputedStyle(e).direction === "rtl";
34
35
  }
35
- function Ae(e, r) {
36
- const n = [...document.querySelectorAll(Me)].filter(
37
- (t) => t === e || t.tabIndex >= 0 && !t.matches(":disabled") && !t.closest("[data-menu-panel], [inert]") && t.getClientRects().length > 0 && getComputedStyle(t).visibility !== "hidden" && !Te(t, r)
36
+ function Ce(e, r) {
37
+ const n = [...document.querySelectorAll(Te)].filter(
38
+ (t) => t === e || t.tabIndex >= 0 && !t.matches(":disabled") && !t.closest("[data-menu-panel], [inert]") && t.getClientRects().length > 0 && getComputedStyle(t).visibility !== "hidden" && !De(t, r)
38
39
  ), s = n.indexOf(e);
39
40
  ((r ? n[s - 1] : n[s + 1]) ?? e).focus();
40
41
  }
41
- function Te(e, r) {
42
+ function De(e, r) {
42
43
  if (!(e instanceof HTMLInputElement) || e.type !== "radio" || !e.name) return !1;
43
44
  const n = [...e.ownerDocument.querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)].filter(
44
45
  (a) => a.form === e.form && !a.disabled
45
46
  );
46
47
  return (n.find((a) => a.checked) ?? (r ? n[n.length - 1] : n[0])) !== e;
47
48
  }
48
- const R = { x: Number.NaN, y: Number.NaN };
49
+ const L = { x: Number.NaN, y: Number.NaN };
49
50
  let U = !1;
50
- function Ce() {
51
+ function Le() {
51
52
  U || typeof window > "u" || (U = !0, window.addEventListener(
52
53
  "pointermove",
53
54
  (e) => {
54
- R.x = e.clientX, R.y = e.clientY;
55
+ L.x = e.clientX, L.y = e.clientY;
55
56
  },
56
57
  { passive: !0 }
57
58
  ));
58
59
  }
59
- function J(e) {
60
- return !Number.isNaN(R.x) && (e.clientX !== R.x || e.clientY !== R.y);
60
+ function Q(e) {
61
+ return !Number.isNaN(L.x) && (e.clientX !== L.x || e.clientY !== L.y);
61
62
  }
62
- const V = (e) => `radial-gradient(farthest-side at 50% ${e === "top" ? "0" : "100%"}, var(--menu-edge), transparent)`, Q = {
63
+ const V = (e) => `radial-gradient(farthest-side at 50% ${e === "top" ? "0" : "100%"}, var(--menu-edge), transparent)`, Z = {
63
64
  backgroundImage: "var(--menu-edge-top, none), var(--menu-edge-bottom, none)",
64
65
  backgroundPosition: "top, bottom",
65
66
  backgroundSize: "100% 0.5rem",
66
67
  backgroundRepeat: "no-repeat"
67
68
  };
68
- function Le(e) {
69
+ function Re(e) {
69
70
  i.useLayoutEffect(() => {
70
71
  if (!e) return;
71
72
  const r = () => {
@@ -79,13 +80,13 @@ function Le(e) {
79
80
  };
80
81
  }, [e]);
81
82
  }
82
- function Z(e, r) {
83
+ function ee(e, r) {
83
84
  const [n, s] = e.split("-"), a = r ? "right" : "left", t = r ? "left" : "right";
84
85
  return n === "top" || n === "bottom" ? `${n === "bottom" ? "top" : "bottom"} ${s === "end" ? t : s === "start" ? a : "center"}` : `${s === "end" ? "bottom" : "top"} ${n === "right" ? "left" : "right"}`;
85
86
  }
86
- const ee = /* @__PURE__ */ S(
87
+ const te = /* @__PURE__ */ S(
87
88
  "rst:font-ui",
88
- we,
89
+ xe,
89
90
  /* Its own width wherever it lands: a fixed panel sized by the room to its
90
91
  right resizes as it's placed, and the placement runs again. */
91
92
  "rst:w-max rst:min-w-48 rst:max-w-[min(20rem,calc(100vw-1rem))] rst:overflow-y-auto rst:overscroll-contain rst:custom-scrollbar",
@@ -97,7 +98,7 @@ const ee = /* @__PURE__ */ S(
97
98
  from the corner of the screen. */
98
99
  "rst:transition-[opacity,scale] rst:duration-100 rst:ease-out rst:data-closed:opacity-0 rst:data-closed:scale-95 rst:data-leaving:duration-75 rst:data-leaving:ease-in rst:data-closed:pointer-events-none rst:motion-reduce:transition-none"
99
100
  );
100
- function te(e) {
101
+ function re(e) {
101
102
  const [r, n] = i.useState(e), [s, a] = i.useState(!0);
102
103
  return i.useLayoutEffect(() => {
103
104
  if (e) {
@@ -106,12 +107,12 @@ function te(e) {
106
107
  return () => cancelAnimationFrame(o);
107
108
  }
108
109
  a(!0);
109
- const t = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, d = window.setTimeout(() => n(!1), t ? 0 : Pe);
110
+ const t = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, d = window.setTimeout(() => n(!1), t ? 0 : Ae);
110
111
  return () => window.clearTimeout(d);
111
112
  }, [e]), { mounted: r, closed: s, leaving: r && !e };
112
113
  }
113
- function re(e, r, n, s, a, t = !1) {
114
- const [d, o] = i.useState(null), u = ge({
114
+ function ne(e, r, n, s, a, t = !1) {
115
+ const [d, o] = i.useState(null), u = he({
115
116
  open: r,
116
117
  strategy: "fixed",
117
118
  /* Placed by top and left, not a transform: the entrance's scale would
@@ -119,12 +120,12 @@ function re(e, r, n, s, a, t = !1) {
119
120
  transform: !1,
120
121
  placement: n,
121
122
  elements: { reference: e },
122
- whileElementsMounted: Ie,
123
+ whileElementsMounted: Se,
123
124
  middleware: [
124
- he(s),
125
- be({ padding: 8 }),
126
- ye({ padding: 8, crossAxis: t }),
127
- ve({
125
+ be(s),
126
+ ye({ padding: 8 }),
127
+ ve({ padding: 8, crossAxis: t }),
128
+ we({
128
129
  padding: 8,
129
130
  apply({ availableHeight: m, elements: l }) {
130
131
  l.floating.style.maxHeight = `min(var(--anchor-max-height, 100vh), ${Math.max(m, 96)}px)`;
@@ -137,14 +138,14 @@ function re(e, r, n, s, a, t = !1) {
137
138
  },
138
139
  [a, p]
139
140
  );
140
- return Le(d), { ...u, setPanel: f, panelEl: d };
141
+ return Re(d), { ...u, setPanel: f, panelEl: d };
141
142
  }
142
- const ne = 500;
143
- function oe() {
144
- const e = i.useRef({ text: "", at: 0 }), r = i.useCallback(() => e.current.text !== "" && performance.now() - e.current.at <= ne, []);
143
+ const oe = 500;
144
+ function se() {
145
+ const e = i.useRef({ text: "", at: 0 }), r = i.useCallback(() => e.current.text !== "" && performance.now() - e.current.at <= oe, []);
145
146
  return { typedRef: e, typingAhead: r };
146
147
  }
147
- function se({
148
+ function ae({
148
149
  panelRef: e,
149
150
  typedRef: r,
150
151
  onEscape: n,
@@ -154,7 +155,7 @@ function se({
154
155
  return (t) => {
155
156
  const d = e.current;
156
157
  if (!d || !d.contains(t.target) || (!t.ctrlKey && !t.metaKey && !t.altKey && t.stopPropagation(), t.defaultPrevented)) return;
157
- const o = D(d), u = o.indexOf(document.activeElement), p = z(d);
158
+ const o = R(d), u = o.indexOf(document.activeElement), p = z(d);
158
159
  switch (t.key) {
159
160
  case "ArrowDown":
160
161
  t.preventDefault(), t.stopPropagation(), E(o[(u + 1) % o.length]);
@@ -176,7 +177,7 @@ function se({
176
177
  case "Tab": {
177
178
  t.preventDefault(), t.stopPropagation();
178
179
  const f = a.triggerRef.current;
179
- a.close(!1), f && Ae(f, t.shiftKey);
180
+ a.close(!1), f && Ce(f, t.shiftKey);
180
181
  return;
181
182
  }
182
183
  case "ArrowLeft":
@@ -185,15 +186,16 @@ function se({
185
186
  return;
186
187
  }
187
188
  if (t.key.length === 1 && !t.ctrlKey && !t.metaKey && !t.altKey) {
188
- const f = performance.now(), m = r.current.text !== "" && f - r.current.at <= ne;
189
+ const f = performance.now(), m = r.current.text !== "" && f - r.current.at <= oe;
189
190
  if (t.key === " " && !m) return;
190
191
  t.preventDefault(), r.current = { text: m ? r.current.text + t.key : t.key, at: f };
191
- const l = o.map((x) => x.dataset.menuText ?? x.textContent ?? ""), b = ke(l, u, r.current.text);
192
+ const l = o.map((x) => x.dataset.menuText ?? x.textContent ?? ""), b = Ie(l, u, r.current.text);
192
193
  b !== -1 && E(o[b]);
193
194
  }
194
195
  };
195
196
  }
196
- function Ue({ children: e, open: r, onOpenChange: n, linkComponent: s = Ee }) {
197
+ function qe({ children: e, open: r, onOpenChange: n, linkComponent: s = Pe }) {
198
+ Ee();
197
199
  const [a, t] = i.useState(!1), d = r ?? a, o = i.useId(), u = i.useRef(null), [p, f] = i.useState(null), m = i.useCallback((g) => {
198
200
  u.current = g, f(g);
199
201
  }, []), l = i.useRef("panel"), b = i.useCallback(
@@ -223,16 +225,16 @@ function Ue({ children: e, open: r, onOpenChange: n, linkComponent: s = Ee }) {
223
225
  );
224
226
  return i.useEffect(() => {
225
227
  if (!d) return;
226
- Ce();
228
+ Le();
227
229
  const g = (I) => {
228
230
  I.target?.closest?.(`[data-menu-tree="${o}"]`) || (b(!1), requestAnimationFrame(() => {
229
231
  (document.activeElement === document.body || !document.activeElement) && u.current?.focus({ preventScroll: !0 });
230
232
  }));
231
233
  };
232
234
  return document.addEventListener("pointerdown", g, !0), () => document.removeEventListener("pointerdown", g, !0);
233
- }, [d, o, b]), /* @__PURE__ */ c(G.Provider, { value: x, children: e });
235
+ }, [d, o, b]), /* @__PURE__ */ c(Y.Provider, { value: x, children: e });
234
236
  }
235
- const Ve = i.forwardRef(function({ plain: r = !1, className: n, onClick: s, onKeyDown: a, children: t, ...d }, o) {
237
+ const Ge = i.forwardRef(function({ plain: r = !1, className: n, onClick: s, onKeyDown: a, children: t, ...d }, o) {
236
238
  const { variant: u, colorScheme: p, size: f, isLoading: m, loadingLabel: l, startIcon: b, endIcon: x, surface: g, ...I } = d, h = C("MenuButton"), { registerTrigger: P } = h, M = i.useCallback(
237
239
  (y) => {
238
240
  P(y), typeof o == "function" ? o(y) : o && (o.current = y);
@@ -254,8 +256,8 @@ const Ve = i.forwardRef(function({ plain: r = !1, className: n, onClick: s, onKe
254
256
  y.preventDefault();
255
257
  const k = h.open ? document.getElementById(h.panelId) : null;
256
258
  if (k) {
257
- const L = D(k);
258
- E(v === "last" ? L[L.length - 1] : L[0]);
259
+ const D = R(k);
260
+ E(v === "last" ? D[D.length - 1] : D[0]);
259
261
  return;
260
262
  }
261
263
  h.openWith(v);
@@ -264,7 +266,7 @@ const Ve = i.forwardRef(function({ plain: r = !1, className: n, onClick: s, onKe
264
266
  return r ? /* @__PURE__ */ c("button", { ref: M, type: "button", className: n, ...I, ...A, children: t }) : (
265
267
  /* min 44 by 44 whatever the size: the target a finger needs. */
266
268
  /* @__PURE__ */ c(
267
- xe,
269
+ ke,
268
270
  {
269
271
  ref: M,
270
272
  className: S("rst:min-h-11 rst:min-w-11", n),
@@ -283,11 +285,11 @@ const Ve = i.forwardRef(function({ plain: r = !1, className: n, onClick: s, onKe
283
285
  )
284
286
  );
285
287
  });
286
- function je({ children: e, align: r = "start", offset: n = 4, className: s, ...a }) {
287
- const t = C("MenuItems"), { mounted: d, closed: o, leaving: u } = te(t.open), p = i.useRef(null), f = z(t.triggerEl), { setPanel: m, panelEl: l, floatingStyles: b, placement: x, isPositioned: g } = re(t.triggerEl, d, `bottom-${r}`, n, p), I = ae(), { typedRef: h, typingAhead: P } = oe(), M = se({ panelRef: p, typedRef: h, onEscape: () => t.close(!0) });
288
+ function Ye({ children: e, align: r = "start", offset: n = 4, className: s, ...a }) {
289
+ const t = C("MenuItems"), { mounted: d, closed: o, leaving: u } = re(t.open), p = i.useRef(null), f = z(t.triggerEl), { setPanel: m, panelEl: l, floatingStyles: b, placement: x, isPositioned: g } = ne(t.triggerEl, d, `bottom-${r}`, n, p), I = ie(), { typedRef: h, typingAhead: P } = se(), M = ae({ panelRef: p, typedRef: h, onEscape: () => t.close(!0) });
288
290
  i.useLayoutEffect(() => {
289
291
  if (!t.open || !l) return;
290
- const v = D(l), k = t.focusOnOpen.current;
292
+ const v = R(l), k = t.focusOnOpen.current;
291
293
  k === "first" && v[0] ? E(v[0]) : k === "last" && v.length ? E(v[v.length - 1]) : l.focus({ preventScroll: !0 });
292
294
  }, [t.open, l, t.focusOnOpen]), i.useLayoutEffect(() => {
293
295
  if (!g || !l) return;
@@ -301,7 +303,7 @@ function je({ children: e, align: r = "start", offset: n = 4, className: s, ...a
301
303
  k && !k.closest(`[data-menu-tree="${t.treeId}"]`) && t.close(!1);
302
304
  };
303
305
  if (!d) return null;
304
- const y = !!t.triggerEl?.closest(".dark");
306
+ const y = G(t.triggerEl);
305
307
  return /* @__PURE__ */ c(q, { children: /* @__PURE__ */ c(B.Provider, { value: { ...I, panelRef: p, typingAhead: P }, children: /* @__PURE__ */ c(
306
308
  "div",
307
309
  {
@@ -318,13 +320,13 @@ function je({ children: e, align: r = "start", offset: n = 4, className: s, ...a
318
320
  "data-leaving": u ? "" : void 0,
319
321
  onKeyDown: M,
320
322
  onBlur: A,
321
- style: { ...b, ...Q, transformOrigin: Z(x, f) },
322
- className: S(y && "dark", ee, s),
323
+ style: { ...b, ...Z, transformOrigin: ee(x, f) },
324
+ className: S(y && "dark", te, s),
323
325
  children: e
324
326
  }
325
327
  ) }) });
326
328
  }
327
- function ae() {
329
+ function ie() {
328
330
  const [e, r] = i.useState(null), n = i.useRef(!1), s = i.useRef(void 0);
329
331
  return i.useEffect(() => () => window.clearTimeout(s.current), []), {
330
332
  openSubmenu: e,
@@ -333,7 +335,7 @@ function ae() {
333
335
  window.clearTimeout(s.current), n.current = t, r(a);
334
336
  },
335
337
  hoverItem: (a) => {
336
- window.clearTimeout(s.current), a === null && (s.current = window.setTimeout(() => r(null), X));
338
+ window.clearTimeout(s.current), a === null && (s.current = window.setTimeout(() => r(null), J));
337
339
  }
338
340
  };
339
341
  }
@@ -351,7 +353,7 @@ const O = /* @__PURE__ */ S(
351
353
  leaves, which only the keyboard's paths set. */
352
354
  "rst:data-key-focus:ring-2 rst:data-key-focus:ring-inset rst:data-key-focus:ring-ring",
353
355
  "rst:aria-disabled:opacity-50 rst:aria-disabled:cursor-not-allowed"
354
- ), H = "rst:text-error-600 rst:dark:text-error-400 rst:focus:bg-error-50 rst:focus:text-error-700 rst:dark:focus:bg-error-900/30 rst:dark:focus:text-error-300", Re = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 16 16", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ c("path", { d: "M3.5 8.5 6.5 11.5 12.5 4.5" }) }), De = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 16 16", width: "16", height: "16", "aria-hidden": "true", children: /* @__PURE__ */ c("circle", { cx: "8", cy: "8", r: "3.5", fill: "currentColor" }) }), Ne = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 16 16", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", className: "rst:rtl:rotate-180", children: /* @__PURE__ */ c("path", { d: "M6 3.5 10.5 8 6 12.5" }) });
356
+ ), F = "rst:text-error-600 rst:dark:text-error-400 rst:focus:bg-error-50 rst:focus:text-error-700 rst:dark:focus:bg-error-900/30 rst:dark:focus:text-error-300", Ne = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 16 16", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ c("path", { d: "M3.5 8.5 6.5 11.5 12.5 4.5" }) }), Oe = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 16 16", width: "16", height: "16", "aria-hidden": "true", children: /* @__PURE__ */ c("circle", { cx: "8", cy: "8", r: "3.5", fill: "currentColor" }) }), Ke = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 16 16", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", className: "rst:rtl:rotate-180", children: /* @__PURE__ */ c("path", { d: "M6 3.5 10.5 8 6 12.5" }) });
355
357
  function T({ icon: e, shortcut: r, description: n, badge: s, children: a }, t, d, o) {
356
358
  const u = t ?? e;
357
359
  return /* @__PURE__ */ N(j, { children: [
@@ -366,7 +368,7 @@ function T({ icon: e, shortcut: r, description: n, badge: s, children: a }, t, d
366
368
  d
367
369
  ] });
368
370
  }
369
- function F({
371
+ function H({
370
372
  disabled: e,
371
373
  closeOnSelect: r,
372
374
  onChoose: n,
@@ -388,12 +390,12 @@ function F({
388
390
  }
389
391
  },
390
392
  onPointerMove: (o) => {
391
- J(o) && (t.hoverItem(null), document.activeElement !== o.currentTarget && o.currentTarget.focus({ preventScroll: !0 }));
393
+ Q(o) && (t.hoverItem(null), document.activeElement !== o.currentTarget && o.currentTarget.focus({ preventScroll: !0 }));
392
394
  }
393
395
  };
394
396
  }
395
- function qe({ onSelect: e, href: r, closeOnSelect: n = !0, disabled: s, destructive: a, keyshortcuts: t, textValue: d, className: o, ...u }) {
396
- const p = C("MenuItem"), f = _("MenuItem"), m = i.useId(), l = F({ disabled: s, closeOnSelect: n, onChoose: (g) => e?.(g) }), b = S(O, a && H, o), x = {
397
+ function Xe({ onSelect: e, href: r, closeOnSelect: n = !0, disabled: s, destructive: a, keyshortcuts: t, textValue: d, className: o, ...u }) {
398
+ const p = C("MenuItem"), f = _("MenuItem"), m = i.useId(), l = H({ disabled: s, closeOnSelect: n, onChoose: (g) => e?.(g) }), b = S(O, a && F, o), x = {
397
399
  role: "menuitem",
398
400
  tabIndex: -1,
399
401
  "aria-disabled": s ? !0 : void 0,
@@ -426,8 +428,8 @@ function qe({ onSelect: e, href: r, closeOnSelect: n = !0, disabled: s, destruct
426
428
  }
427
429
  return /* @__PURE__ */ c("button", { type: "button", className: b, ...x, ...l, children: T(u, void 0, void 0, m) });
428
430
  }
429
- function Ge({ checked: e, onCheckedChange: r, indicator: n, closeOnSelect: s = !0, disabled: a, destructive: t, keyshortcuts: d, textValue: o, className: u, ...p }) {
430
- const f = F({ disabled: a, closeOnSelect: s, spaceKeepsOpen: !0, onChoose: () => r(!e) }), m = i.useId();
431
+ function Je({ checked: e, onCheckedChange: r, indicator: n, closeOnSelect: s = !0, disabled: a, destructive: t, keyshortcuts: d, textValue: o, className: u, ...p }) {
432
+ const f = H({ disabled: a, closeOnSelect: s, spaceKeepsOpen: !0, onChoose: () => r(!e) }), m = i.useId();
431
433
  return /* @__PURE__ */ c(
432
434
  "button",
433
435
  {
@@ -440,19 +442,19 @@ function Ge({ checked: e, onCheckedChange: r, indicator: n, closeOnSelect: s = !
440
442
  "aria-keyshortcuts": d,
441
443
  "data-menu-item": "",
442
444
  "data-menu-text": o,
443
- className: S(O, t && H, u),
445
+ className: S(O, t && F, u),
444
446
  ...f,
445
- children: n === void 0 ? T(p, /* @__PURE__ */ c("span", { className: e ? void 0 : "rst:invisible", "data-menu-check": "", children: /* @__PURE__ */ c(Re, {}) }), void 0, m) : T(p, void 0, /* @__PURE__ */ c("span", { "aria-hidden": "true", className: "rst:ms-auto rst:flex rst:shrink-0 rst:items-center", children: n }), m)
447
+ children: n === void 0 ? T(p, /* @__PURE__ */ c("span", { className: e ? void 0 : "rst:invisible", "data-menu-check": "", children: /* @__PURE__ */ c(Ne, {}) }), void 0, m) : T(p, void 0, /* @__PURE__ */ c("span", { "aria-hidden": "true", className: "rst:ms-auto rst:flex rst:shrink-0 rst:items-center", children: n }), m)
446
448
  }
447
449
  );
448
450
  }
449
- function Ye({ value: e, onValueChange: r, label: n, children: s, className: a }) {
450
- return /* @__PURE__ */ c(Y.Provider, { value: { value: e, onValueChange: r }, children: /* @__PURE__ */ c(Oe, { label: n, className: a, children: s }) });
451
+ function Qe({ value: e, onValueChange: r, label: n, children: s, className: a }) {
452
+ return /* @__PURE__ */ c(X.Provider, { value: { value: e, onValueChange: r }, children: /* @__PURE__ */ c($e, { label: n, className: a, children: s }) });
451
453
  }
452
- function Xe({ value: e, closeOnSelect: r = !0, disabled: n, destructive: s, keyshortcuts: a, textValue: t, className: d, ...o }) {
453
- const u = i.useContext(Y);
454
+ function Ze({ value: e, closeOnSelect: r = !0, disabled: n, destructive: s, keyshortcuts: a, textValue: t, className: d, ...o }) {
455
+ const u = i.useContext(X);
454
456
  if (!u) throw new Error("<MenuRadioItem> must be inside a <MenuRadioGroup>.");
455
- const p = u.value === e, f = F({ disabled: n, closeOnSelect: r, spaceKeepsOpen: !0, onChoose: () => u.onValueChange?.(e) }), m = i.useId();
457
+ const p = u.value === e, f = H({ disabled: n, closeOnSelect: r, spaceKeepsOpen: !0, onChoose: () => u.onValueChange?.(e) }), m = i.useId();
456
458
  return /* @__PURE__ */ c(
457
459
  "button",
458
460
  {
@@ -465,13 +467,13 @@ function Xe({ value: e, closeOnSelect: r = !0, disabled: n, destructive: s, keys
465
467
  "aria-keyshortcuts": a,
466
468
  "data-menu-item": "",
467
469
  "data-menu-text": t,
468
- className: S(O, s && H, d),
470
+ className: S(O, s && F, d),
469
471
  ...f,
470
- children: T(o, /* @__PURE__ */ c("span", { className: p ? void 0 : "rst:invisible", "data-menu-check": "", children: /* @__PURE__ */ c(De, {}) }), void 0, m)
472
+ children: T(o, /* @__PURE__ */ c("span", { className: p ? void 0 : "rst:invisible", "data-menu-check": "", children: /* @__PURE__ */ c(Oe, {}) }), void 0, m)
471
473
  }
472
474
  );
473
475
  }
474
- function Oe({ label: e, children: r, className: n }) {
476
+ function $e({ label: e, children: r, className: n }) {
475
477
  const s = i.useId();
476
478
  return /* @__PURE__ */ N("div", { role: "group", "aria-labelledby": e ? s : void 0, className: n, children: [
477
479
  e && /* @__PURE__ */ c(
@@ -486,36 +488,36 @@ function Oe({ label: e, children: r, className: n }) {
486
488
  r
487
489
  ] });
488
490
  }
489
- function Je({ className: e }) {
491
+ function et({ className: e }) {
490
492
  return /* @__PURE__ */ c("div", { role: "separator", className: S("rst:my-1 rst:h-[var(--roster-border-width,1px)] rst:bg-[var(--roster-popover-border)]", e) });
491
493
  }
492
- function Qe({ label: e, children: r, icon: n, disabled: s, textValue: a, className: t, panelClassName: d }) {
494
+ function tt({ label: e, children: r, icon: n, disabled: s, textValue: a, className: t, panelClassName: d }) {
493
495
  const o = C("MenuSubmenu"), u = _("MenuSubmenu"), p = i.useId(), f = `${p}-item`, m = `${p}-menu`, l = u.openSubmenu === f, b = i.useRef(null), [x, g] = i.useState(null), I = i.useCallback((w) => {
494
496
  b.current = w, g(w);
495
- }, []), h = i.useRef(null), P = i.useRef(void 0), M = i.useRef("mouse"), { mounted: A, closed: y, leaving: v } = te(l), k = z(x), { setPanel: L, panelEl: K, floatingStyles: ie, placement: ue } = re(
497
+ }, []), h = i.useRef(null), P = i.useRef(void 0), M = i.useRef("mouse"), { mounted: A, closed: y, leaving: v } = re(l), k = z(x), { setPanel: D, panelEl: K, floatingStyles: ue, placement: ce } = ne(
496
498
  x,
497
499
  A,
498
500
  k ? "left-start" : "right-start",
499
501
  { mainAxis: 0, alignmentAxis: -4 },
500
502
  h,
501
503
  !0
502
- ), ce = ae();
504
+ ), le = ie();
503
505
  i.useEffect(() => () => window.clearTimeout(P.current), []);
504
506
  const W = () => {
505
507
  u.setOpenSubmenu(null), E(b.current);
506
- }, { typedRef: le, typingAhead: de } = oe(), me = se({ panelRef: h, typedRef: le, onEscape: W, onBack: W });
508
+ }, { typedRef: de, typingAhead: me } = se(), fe = ae({ panelRef: h, typedRef: de, onEscape: W, onBack: W });
507
509
  i.useLayoutEffect(() => {
508
- !l || !K || u.focusFirstInSubmenu.current && E(D(K)[0]);
510
+ !l || !K || u.focusFirstInSubmenu.current && E(R(K)[0]);
509
511
  }, [l, K, u.focusFirstInSubmenu]);
510
512
  const $ = (w) => {
511
513
  if (!s) {
512
514
  if (l && w && h.current) {
513
- E(D(h.current)[0]);
515
+ E(R(h.current)[0]);
514
516
  return;
515
517
  }
516
518
  u.setOpenSubmenu(f, w);
517
519
  }
518
- }, fe = !!o.triggerEl?.closest(".dark");
520
+ }, pe = G(o.triggerEl);
519
521
  return /* @__PURE__ */ N(j, { children: [
520
522
  /* @__PURE__ */ c(
521
523
  "button",
@@ -538,20 +540,20 @@ function Qe({ label: e, children: r, icon: n, disabled: s, textValue: a, classNa
538
540
  },
539
541
  onClick: () => l && M.current !== "mouse" ? u.setOpenSubmenu(null) : $(!1),
540
542
  onKeyDown: (w) => {
541
- const pe = k ? "ArrowLeft" : "ArrowRight";
542
- w.key === " " && u.typingAhead() || (w.key === pe || w.key === "Enter" || w.key === " ") && (w.preventDefault(), $(!0));
543
+ const ge = k ? "ArrowLeft" : "ArrowRight";
544
+ w.key === " " && u.typingAhead() || (w.key === ge || w.key === "Enter" || w.key === " ") && (w.preventDefault(), $(!0));
543
545
  },
544
546
  onPointerMove: (w) => {
545
- J(w) && (u.hoverItem(f), document.activeElement !== w.currentTarget && w.currentTarget.focus({ preventScroll: !0 }), !l && !s && (window.clearTimeout(P.current), P.current = window.setTimeout(() => $(!1), X)));
547
+ Q(w) && (u.hoverItem(f), document.activeElement !== w.currentTarget && w.currentTarget.focus({ preventScroll: !0 }), !l && !s && (window.clearTimeout(P.current), P.current = window.setTimeout(() => $(!1), J)));
546
548
  },
547
549
  onPointerLeave: () => window.clearTimeout(P.current),
548
- children: T({ icon: n, children: e }, void 0, /* @__PURE__ */ c("span", { "aria-hidden": "true", className: "rst:ms-auto rst:flex rst:shrink-0 rst:items-center rst:opacity-70", "data-menu-chevron": "", children: /* @__PURE__ */ c(Ne, {}) }))
550
+ children: T({ icon: n, children: e }, void 0, /* @__PURE__ */ c("span", { "aria-hidden": "true", className: "rst:ms-auto rst:flex rst:shrink-0 rst:items-center rst:opacity-70", "data-menu-chevron": "", children: /* @__PURE__ */ c(Ke, {}) }))
549
551
  }
550
552
  ),
551
- A && /* @__PURE__ */ c(q, { children: /* @__PURE__ */ c(B.Provider, { value: { ...ce, panelRef: h, typingAhead: de }, children: /* @__PURE__ */ c(
553
+ A && /* @__PURE__ */ c(q, { children: /* @__PURE__ */ c(B.Provider, { value: { ...le, panelRef: h, typingAhead: me }, children: /* @__PURE__ */ c(
552
554
  "div",
553
555
  {
554
- ref: L,
556
+ ref: D,
555
557
  id: m,
556
558
  dir: k ? "rtl" : "ltr",
557
559
  role: "menu",
@@ -561,24 +563,24 @@ function Qe({ label: e, children: r, icon: n, disabled: s, textValue: a, classNa
561
563
  "data-menu-tree": o.treeId,
562
564
  "data-closed": y ? "" : void 0,
563
565
  "data-leaving": v ? "" : void 0,
564
- onKeyDown: me,
566
+ onKeyDown: fe,
565
567
  onPointerEnter: () => u.hoverItem(f),
566
- style: { ...ie, ...Q, transformOrigin: Z(ue, k) },
567
- className: S(fe && "dark", ee, d),
568
+ style: { ...ue, ...Z, transformOrigin: ee(ce, k) },
569
+ className: S(pe && "dark", te, d),
568
570
  children: r
569
571
  }
570
572
  ) }) })
571
573
  ] });
572
574
  }
573
575
  export {
574
- Ue as Menu,
575
- Ve as MenuButton,
576
- Ge as MenuCheckboxItem,
577
- Oe as MenuGroup,
578
- qe as MenuItem,
579
- je as MenuItems,
580
- Ye as MenuRadioGroup,
581
- Xe as MenuRadioItem,
582
- Je as MenuSeparator,
583
- Qe as MenuSubmenu
576
+ qe as Menu,
577
+ Ge as MenuButton,
578
+ Je as MenuCheckboxItem,
579
+ $e as MenuGroup,
580
+ Xe as MenuItem,
581
+ Ye as MenuItems,
582
+ Qe as MenuRadioGroup,
583
+ Ze as MenuRadioItem,
584
+ et as MenuSeparator,
585
+ tt as MenuSubmenu
584
586
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime");require("react");const m=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),D=require("../../../node_modules/@headlessui/react/dist/components/field/field.cjs"),p=require("../../../node_modules/@headlessui/react/dist/components/label/label.cjs"),v=require("../../../node_modules/@headlessui/react/dist/components/radio-group/radio-group.cjs"),r=require("../../../lib/utils.cjs"),f=require("../../../internal/field-invalid.cjs"),c=require("./radio-group-variants.cjs"),E={sm:"rst:text-xs",md:"rst:text-sm",lg:"rst:text-base"},O=({options:y,value:j,onChange:b,label:n,helperText:d,errorMessage:l,disabled:e=!1,size:h="md",orientation:i="vertical",colorScheme:N,className:q,optionsClassName:g,optionClassName:G,radioClassName:w,labelClassName:z,optionLabelClassName:R,descriptionClassName:S,messageClassName:V,"aria-invalid":k,...x})=>{const u=!!l,I=f.isFieldInvalid(u,{...x,"aria-invalid":k}),L=f.withoutInvalidProps(x),a=h??"md";return t.jsxs(v.RadioGroup,{value:j,onChange:b,disabled:e,className:r.cn("rst:font-ui rst:flex rst:flex-col rst:gap-1.5 rst:min-w-0",q),...L,"aria-invalid":I||void 0,"aria-orientation":i,children:[n&&t.jsx(p.Label,{className:r.cn("rst:block rst:text-sm rst:font-medium rst:text-[var(--roster-control-text)] rst:text-left",e&&"rst:opacity-50",z),children:n}),t.jsx("div",{className:r.cn(c.radioGroupOptionsVariants({size:a,orientation:i}),g),children:y.map(s=>t.jsxs(D.Field,{disabled:e||s.disabled,className:r.cn(c.radioOptionVariants({orientation:i,size:a}),G),children:[t.jsx(v.Radio,{value:s.value,className:({checked:o})=>r.cn(c.radioVariants({colorScheme:N,size:a,checked:o}),"rst:self-start",e||s.disabled?"rst:opacity-50 rst:cursor-not-allowed":"rst:cursor-pointer",w),children:({checked:o})=>t.jsx("span",{className:r.cn(c.radioDotVariants({size:a}),o?"rst:opacity-100":"rst:opacity-0")})}),t.jsxs("div",{className:r.cn("rst:flex rst:min-w-0 rst:flex-col",i==="vertical"&&"rst:flex-1"),children:[t.jsx(p.Label,{className:r.cn("rst:cursor-pointer rst:select-none","rst:text-[var(--roster-control-text)]","rst:data-disabled:cursor-not-allowed rst:data-disabled:opacity-50",E[a],R),children:s.label}),s.description&&t.jsx(m.Description,{className:r.cn("rst:text-xs rst:text-gray-500 rst:dark:text-gray-400 rst:data-disabled:opacity-50",S),children:s.description})]})]},s.value))}),(d||l)&&t.jsx(m.Description,{as:"p",className:r.cn("rst:text-xs rst:text-left",u?"rst:text-error-600 rst:dark:text-error-400 rst:font-medium":"rst:text-gray-500 rst:dark:text-gray-400",e&&"rst:opacity-50",V),children:l||d})]})};exports.RadioGroup=O;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime");require("react");const m=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),L=require("../../../node_modules/@headlessui/react/dist/components/field/field.cjs"),p=require("../../../node_modules/@headlessui/react/dist/components/label/label.cjs"),v=require("../../../node_modules/@headlessui/react/dist/components/radio-group/radio-group.cjs"),r=require("../../../lib/utils.cjs"),f=require("../../../internal/field-invalid.cjs"),c=require("./radio-group-variants.cjs"),D=require("../../../internal/key-focus.cjs"),E={sm:"rst:text-xs",md:"rst:text-sm",lg:"rst:text-base"},O=({options:y,value:j,onChange:b,label:n,helperText:d,errorMessage:l,disabled:e=!1,size:h="md",orientation:i="vertical",colorScheme:q,className:N,optionsClassName:g,optionClassName:G,radioClassName:k,labelClassName:w,optionLabelClassName:z,descriptionClassName:R,messageClassName:S,"aria-invalid":V,...u})=>{D.useKeyFocus();const x=!!l,F=f.isFieldInvalid(x,{...u,"aria-invalid":V}),I=f.withoutInvalidProps(u),a=h??"md";return t.jsxs(v.RadioGroup,{value:j,onChange:b,disabled:e,className:r.cn("rst:font-ui rst:flex rst:flex-col rst:gap-1.5 rst:min-w-0",N),...I,"aria-invalid":F||void 0,"aria-orientation":i,children:[n&&t.jsx(p.Label,{className:r.cn("rst:block rst:text-sm rst:font-medium rst:text-[var(--roster-control-text)] rst:text-left",e&&"rst:opacity-50",w),children:n}),t.jsx("div",{className:r.cn(c.radioGroupOptionsVariants({size:a,orientation:i}),g),children:y.map(s=>t.jsxs(L.Field,{disabled:e||s.disabled,className:r.cn(c.radioOptionVariants({orientation:i,size:a}),G),children:[t.jsx(v.Radio,{value:s.value,className:({checked:o})=>r.cn(c.radioVariants({colorScheme:q,size:a,checked:o}),"rst:self-start",e||s.disabled?"rst:opacity-50 rst:cursor-not-allowed":"rst:cursor-pointer",k),children:({checked:o})=>t.jsx("span",{className:r.cn(c.radioDotVariants({size:a}),o?"rst:opacity-100":"rst:opacity-0")})}),t.jsxs("div",{className:r.cn("rst:flex rst:min-w-0 rst:flex-col",i==="vertical"&&"rst:flex-1"),children:[t.jsx(p.Label,{className:r.cn("rst:cursor-pointer rst:select-none","rst:text-[var(--roster-control-text)]","rst:data-disabled:cursor-not-allowed rst:data-disabled:opacity-50",E[a],z),children:s.label}),s.description&&t.jsx(m.Description,{className:r.cn("rst:text-xs rst:text-gray-500 rst:dark:text-gray-400 rst:data-disabled:opacity-50",R),children:s.description})]})]},s.value))}),(d||l)&&t.jsx(m.Description,{as:"p",className:r.cn("rst:text-xs rst:text-left",x?"rst:text-error-600 rst:dark:text-error-400 rst:font-medium":"rst:text-gray-500 rst:dark:text-gray-400",e&&"rst:opacity-50",S),children:l||d})]})};exports.RadioGroup=O;
@@ -2,17 +2,18 @@
2
2
  import { jsxs as c, jsx as s } from "react/jsx-runtime";
3
3
  import "react";
4
4
  import { Description as p } from "../../../node_modules/@headlessui/react/dist/components/description/description.js";
5
- import { Field as S } from "../../../node_modules/@headlessui/react/dist/components/field/field.js";
5
+ import { Field as R } from "../../../node_modules/@headlessui/react/dist/components/field/field.js";
6
6
  import { Label as f } from "../../../node_modules/@headlessui/react/dist/components/label/label.js";
7
- import { RadioGroup as j, Radio as D } from "../../../node_modules/@headlessui/react/dist/components/radio-group/radio-group.js";
7
+ import { RadioGroup as S, Radio as j } from "../../../node_modules/@headlessui/react/dist/components/radio-group/radio-group.js";
8
8
  import { cn as t } from "../../../lib/utils.js";
9
- import { isFieldInvalid as F, withoutInvalidProps as O } from "../../../internal/field-invalid.js";
10
- import { radioDotVariants as P, radioVariants as Z, radioOptionVariants as A, radioGroupOptionsVariants as B } from "./radio-group-variants.js";
11
- const K = {
9
+ import { isFieldInvalid as D, withoutInvalidProps as K } from "../../../internal/field-invalid.js";
10
+ import { radioDotVariants as O, radioVariants as P, radioOptionVariants as Z, radioGroupOptionsVariants as A } from "./radio-group-variants.js";
11
+ import { useKeyFocus as B } from "../../../internal/key-focus.js";
12
+ const W = {
12
13
  sm: "rst:text-xs",
13
14
  md: "rst:text-sm",
14
15
  lg: "rst:text-base"
15
- }, Y = ({
16
+ }, M = ({
16
17
  options: u,
17
18
  value: v,
18
19
  onChange: y,
@@ -30,13 +31,14 @@ const K = {
30
31
  labelClassName: k,
31
32
  optionLabelClassName: V,
32
33
  descriptionClassName: E,
33
- messageClassName: G,
34
- "aria-invalid": I,
34
+ messageClassName: F,
35
+ "aria-invalid": G,
35
36
  ...n
36
37
  }) => {
37
- const x = !!o, L = F(x, { ...n, "aria-invalid": I }), R = O(n), e = h ?? "md";
38
+ B();
39
+ const x = !!o, I = D(x, { ...n, "aria-invalid": G }), L = K(n), e = h ?? "md";
38
40
  return /* @__PURE__ */ c(
39
- j,
41
+ S,
40
42
  {
41
43
  value: v,
42
44
  onChange: y,
@@ -45,8 +47,8 @@ const K = {
45
47
  "rst:font-ui rst:flex rst:flex-col rst:gap-1.5 rst:min-w-0",
46
48
  b
47
49
  ),
48
- ...R,
49
- "aria-invalid": L || void 0,
50
+ ...L,
51
+ "aria-invalid": I || void 0,
50
52
  "aria-orientation": i,
51
53
  children: [
52
54
  d && /* @__PURE__ */ s(
@@ -64,24 +66,24 @@ const K = {
64
66
  "div",
65
67
  {
66
68
  className: t(
67
- B({ size: e, orientation: i }),
69
+ A({ size: e, orientation: i }),
68
70
  g
69
71
  ),
70
72
  children: u.map((r) => /* @__PURE__ */ c(
71
- S,
73
+ R,
72
74
  {
73
75
  disabled: a || r.disabled,
74
76
  className: t(
75
- A({ orientation: i, size: e }),
77
+ Z({ orientation: i, size: e }),
76
78
  w
77
79
  ),
78
80
  children: [
79
81
  /* @__PURE__ */ s(
80
- D,
82
+ j,
81
83
  {
82
84
  value: r.value,
83
85
  className: ({ checked: l }) => t(
84
- Z({ colorScheme: N, size: e, checked: l }),
86
+ P({ colorScheme: N, size: e, checked: l }),
85
87
  /* `self-start`, and no nudge. The circle's height equals the
86
88
  label's line-height at every size, so aligning their top
87
89
  edges puts the radio on the first line whether the label
@@ -94,7 +96,7 @@ const K = {
94
96
  "span",
95
97
  {
96
98
  className: t(
97
- P({ size: e }),
99
+ O({ size: e }),
98
100
  l ? "rst:opacity-100" : "rst:opacity-0"
99
101
  )
100
102
  }
@@ -120,7 +122,7 @@ const K = {
120
122
  "rst:cursor-pointer rst:select-none",
121
123
  "rst:text-[var(--roster-control-text)]",
122
124
  "rst:data-disabled:cursor-not-allowed rst:data-disabled:opacity-50",
123
- K[e],
125
+ W[e],
124
126
  V
125
127
  ),
126
128
  children: r.label
@@ -153,7 +155,7 @@ const K = {
153
155
  "rst:text-xs rst:text-left",
154
156
  x ? "rst:text-error-600 rst:dark:text-error-400 rst:font-medium" : "rst:text-gray-500 rst:dark:text-gray-400",
155
157
  a && "rst:opacity-50",
156
- G
158
+ F
157
159
  ),
158
160
  children: o || m
159
161
  }
@@ -163,5 +165,5 @@ const K = {
163
165
  );
164
166
  };
165
167
  export {
166
- Y as RadioGroup
168
+ M as RadioGroup
167
169
  };