@purpurds/radio-card-group 8.2.1 → 8.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import { jsx as f, Fragment as le, jsxs as N } from "react/jsx-runtime";
1
+ import { jsx as l, jsxs as A, Fragment as ze } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
- import A, { useState as je, forwardRef as fe, isValidElement as Ve, Children as ne, cloneElement as Ke } from "react";
3
+ import O, { useState as Ue, forwardRef as le, isValidElement as je, Children as ne, cloneElement as Ve } from "react";
4
4
  import "react-dom";
5
- function Be(e) {
5
+ function Ke(e) {
6
6
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
7
7
  }
8
8
  var oe = { exports: {} };
@@ -12,18 +12,18 @@ var oe = { exports: {} };
12
12
  http://jedwatson.github.io/classnames
13
13
  */
14
14
  var ae;
15
- function We() {
16
- return ae || (ae = 1, function(e) {
15
+ function Be() {
16
+ return ae || (ae = 1, (function(e) {
17
17
  (function() {
18
18
  var t = {}.hasOwnProperty;
19
19
  function n() {
20
20
  for (var r = "", i = 0; i < arguments.length; i++) {
21
21
  var u = arguments[i];
22
- u && (r = a(r, o(u)));
22
+ u && (r = o(r, a(u)));
23
23
  }
24
24
  return r;
25
25
  }
26
- function o(r) {
26
+ function a(r) {
27
27
  if (typeof r == "string" || typeof r == "number")
28
28
  return r;
29
29
  if (typeof r != "object")
@@ -34,18 +34,18 @@ function We() {
34
34
  return r.toString();
35
35
  var i = "";
36
36
  for (var u in r)
37
- t.call(r, u) && r[u] && (i = a(i, u));
37
+ t.call(r, u) && r[u] && (i = o(i, u));
38
38
  return i;
39
39
  }
40
- function a(r, i) {
40
+ function o(r, i) {
41
41
  return i ? r ? r + " " + i : r + i : r;
42
42
  }
43
43
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
44
44
  })();
45
- }(oe)), oe.exports;
45
+ })(oe)), oe.exports;
46
46
  }
47
- var qe = We();
48
- const He = /* @__PURE__ */ Be(qe), M = {
47
+ var We = Be();
48
+ const qe = /* @__PURE__ */ Ke(We), k = {
49
49
  "purpur-heading": "_purpur-heading_vo751_1",
50
50
  "purpur-heading--hyphens": "_purpur-heading--hyphens_vo751_8",
51
51
  "purpur-heading--negative": "_purpur-heading--negative_vo751_11",
@@ -65,33 +65,33 @@ const He = /* @__PURE__ */ Be(qe), M = {
65
65
  "purpur-heading--display-50": "_purpur-heading--display-50_vo751_92",
66
66
  "purpur-heading--display-100": "_purpur-heading--display-100_vo751_98",
67
67
  "purpur-heading--display-200": "_purpur-heading--display-200_vo751_104"
68
- }, Ye = {
68
+ }, He = {
69
69
  TITLE100: "title-100"
70
- }, F = "purpur-heading", _e = ({
70
+ }, D = "purpur-heading", fe = ({
71
71
  children: e,
72
72
  className: t = "",
73
73
  enableHyphenation: n = !1,
74
- negative: o = !1,
75
- tag: a,
76
- variant: r = Ye.TITLE100,
74
+ negative: a = !1,
75
+ tag: o,
76
+ variant: r = He.TITLE100,
77
77
  ...i
78
78
  }) => {
79
- const u = a, c = He([
79
+ const u = o, p = qe([
80
80
  t,
81
- M[F],
82
- M[`${F}--${r}`],
81
+ k[D],
82
+ k[`${D}--${r}`],
83
83
  {
84
- [M[`${F}--hyphens`]]: n,
85
- [M[`${F}--negative`]]: o
84
+ [k[`${D}--hyphens`]]: n,
85
+ [k[`${D}--negative`]]: a
86
86
  }
87
87
  ]);
88
- return /* @__PURE__ */ f(u, { className: c, ...i, children: e });
88
+ return /* @__PURE__ */ l(u, { className: p, ...i, children: e });
89
89
  };
90
- _e.displayName = "Heading";
91
- function I(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
92
- return function(a) {
93
- if (e == null || e(a), n === !1 || !a.defaultPrevented)
94
- return t == null ? void 0 : t(a);
90
+ fe.displayName = "Heading";
91
+ function w(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
92
+ return function(o) {
93
+ if (e == null || e(o), n === !1 || !o.defaultPrevented)
94
+ return t == null ? void 0 : t(o);
95
95
  };
96
96
  }
97
97
  function ie(e, t) {
@@ -99,111 +99,117 @@ function ie(e, t) {
99
99
  return e(t);
100
100
  e != null && (e.current = t);
101
101
  }
102
- function me(...e) {
102
+ function _e(...e) {
103
103
  return (t) => {
104
104
  let n = !1;
105
- const o = e.map((a) => {
106
- const r = ie(a, t);
105
+ const a = e.map((o) => {
106
+ const r = ie(o, t);
107
107
  return !n && typeof r == "function" && (n = !0), r;
108
108
  });
109
109
  if (n)
110
110
  return () => {
111
- for (let a = 0; a < o.length; a++) {
112
- const r = o[a];
113
- typeof r == "function" ? r() : ie(e[a], null);
111
+ for (let o = 0; o < a.length; o++) {
112
+ const r = a[o];
113
+ typeof r == "function" ? r() : ie(e[o], null);
114
114
  }
115
115
  };
116
116
  };
117
117
  }
118
- function P(...e) {
119
- return s.useCallback(me(...e), e);
118
+ function T(...e) {
119
+ return s.useCallback(_e(...e), e);
120
120
  }
121
- function U(e, t = []) {
121
+ function j(e, t = []) {
122
122
  let n = [];
123
- function o(r, i) {
124
- const u = s.createContext(i), c = n.length;
123
+ function a(r, i) {
124
+ const u = s.createContext(i), p = n.length;
125
125
  n = [...n, i];
126
- const p = (_) => {
126
+ const c = (f) => {
127
127
  var y;
128
- const { scope: g, children: d, ...l } = _, h = ((y = g == null ? void 0 : g[e]) == null ? void 0 : y[c]) || u, v = s.useMemo(() => l, Object.values(l));
129
- return /* @__PURE__ */ f(h.Provider, { value: v, children: d });
128
+ const { scope: g, children: d, ...m } = f, h = ((y = g == null ? void 0 : g[e]) == null ? void 0 : y[p]) || u, v = s.useMemo(() => m, Object.values(m));
129
+ return /* @__PURE__ */ l(h.Provider, { value: v, children: d });
130
130
  };
131
- p.displayName = r + "Provider";
132
- function m(_, g) {
131
+ c.displayName = r + "Provider";
132
+ function _(f, g) {
133
133
  var h;
134
- const d = ((h = g == null ? void 0 : g[e]) == null ? void 0 : h[c]) || u, l = s.useContext(d);
135
- if (l) return l;
134
+ const d = ((h = g == null ? void 0 : g[e]) == null ? void 0 : h[p]) || u, m = s.useContext(d);
135
+ if (m) return m;
136
136
  if (i !== void 0) return i;
137
- throw new Error(`\`${_}\` must be used within \`${r}\``);
137
+ throw new Error(`\`${f}\` must be used within \`${r}\``);
138
138
  }
139
- return [p, m];
139
+ return [c, _];
140
140
  }
141
- const a = () => {
141
+ const o = () => {
142
142
  const r = n.map((i) => s.createContext(i));
143
143
  return function(u) {
144
- const c = (u == null ? void 0 : u[e]) || r;
144
+ const p = (u == null ? void 0 : u[e]) || r;
145
145
  return s.useMemo(
146
- () => ({ [`__scope${e}`]: { ...u, [e]: c } }),
147
- [u, c]
146
+ () => ({ [`__scope${e}`]: { ...u, [e]: p } }),
147
+ [u, p]
148
148
  );
149
149
  };
150
150
  };
151
- return a.scopeName = e, [o, Xe(a, ...t)];
151
+ return o.scopeName = e, [a, Ye(o, ...t)];
152
152
  }
153
- function Xe(...e) {
153
+ function Ye(...e) {
154
154
  const t = e[0];
155
155
  if (e.length === 1) return t;
156
156
  const n = () => {
157
- const o = e.map((a) => ({
158
- useScope: a(),
159
- scopeName: a.scopeName
157
+ const a = e.map((o) => ({
158
+ useScope: o(),
159
+ scopeName: o.scopeName
160
160
  }));
161
161
  return function(r) {
162
- const i = o.reduce((u, { useScope: c, scopeName: p }) => {
163
- const _ = c(r)[`__scope${p}`];
164
- return { ...u, ..._ };
162
+ const i = a.reduce((u, { useScope: p, scopeName: c }) => {
163
+ const f = p(r)[`__scope${c}`];
164
+ return { ...u, ...f };
165
165
  }, {});
166
166
  return s.useMemo(() => ({ [`__scope${t.scopeName}`]: i }), [i]);
167
167
  };
168
168
  };
169
169
  return n.scopeName = t.scopeName, n;
170
170
  }
171
- var L = s.forwardRef((e, t) => {
172
- const { children: n, ...o } = e, a = s.Children.toArray(n), r = a.find(Je);
173
- if (r) {
174
- const i = r.props.children, u = a.map((c) => c === r ? s.Children.count(i) > 1 ? s.Children.only(null) : s.isValidElement(i) ? i.props.children : null : c);
175
- return /* @__PURE__ */ f(H, { ...o, ref: t, children: s.isValidElement(i) ? s.cloneElement(i, void 0, u) : null });
176
- }
177
- return /* @__PURE__ */ f(H, { ...o, ref: t, children: n });
178
- });
179
- L.displayName = "Slot";
180
- var H = s.forwardRef((e, t) => {
181
- const { children: n, ...o } = e;
182
- if (s.isValidElement(n)) {
183
- const a = er(n), r = Qe(o, n.props);
184
- return n.type !== s.Fragment && (r.ref = t ? me(t, a) : a), s.cloneElement(n, r);
185
- }
186
- return s.Children.count(n) > 1 ? s.Children.only(null) : null;
187
- });
188
- H.displayName = "SlotClone";
189
- var Ze = ({ children: e }) => /* @__PURE__ */ f(le, { children: e });
171
+ // @__NO_SIDE_EFFECTS__
172
+ function Y(e) {
173
+ const t = /* @__PURE__ */ Xe(e), n = s.forwardRef((a, o) => {
174
+ const { children: r, ...i } = a, u = s.Children.toArray(r), p = u.find(Je);
175
+ if (p) {
176
+ const c = p.props.children, _ = u.map((f) => f === p ? s.Children.count(c) > 1 ? s.Children.only(null) : s.isValidElement(c) ? c.props.children : null : f);
177
+ return /* @__PURE__ */ l(t, { ...i, ref: o, children: s.isValidElement(c) ? s.cloneElement(c, void 0, _) : null });
178
+ }
179
+ return /* @__PURE__ */ l(t, { ...i, ref: o, children: r });
180
+ });
181
+ return n.displayName = `${e}.Slot`, n;
182
+ }
183
+ // @__NO_SIDE_EFFECTS__
184
+ function Xe(e) {
185
+ const t = s.forwardRef((n, a) => {
186
+ const { children: o, ...r } = n;
187
+ if (s.isValidElement(o)) {
188
+ const i = er(o), u = Qe(r, o.props);
189
+ return o.type !== s.Fragment && (u.ref = a ? _e(a, i) : i), s.cloneElement(o, u);
190
+ }
191
+ return s.Children.count(o) > 1 ? s.Children.only(null) : null;
192
+ });
193
+ return t.displayName = `${e}.SlotClone`, t;
194
+ }
195
+ var Ze = Symbol("radix.slottable");
190
196
  function Je(e) {
191
- return s.isValidElement(e) && e.type === Ze;
197
+ return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Ze;
192
198
  }
193
199
  function Qe(e, t) {
194
200
  const n = { ...t };
195
- for (const o in t) {
196
- const a = e[o], r = t[o];
197
- /^on[A-Z]/.test(o) ? a && r ? n[o] = (...u) => {
198
- r(...u), a(...u);
199
- } : a && (n[o] = a) : o === "style" ? n[o] = { ...a, ...r } : o === "className" && (n[o] = [a, r].filter(Boolean).join(" "));
201
+ for (const a in t) {
202
+ const o = e[a], r = t[a];
203
+ /^on[A-Z]/.test(a) ? o && r ? n[a] = (...u) => {
204
+ r(...u), o(...u);
205
+ } : o && (n[a] = o) : a === "style" ? n[a] = { ...o, ...r } : a === "className" && (n[a] = [o, r].filter(Boolean).join(" "));
200
206
  }
201
207
  return { ...e, ...n };
202
208
  }
203
209
  function er(e) {
204
- var o, a;
205
- let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
206
- return n ? e.ref : (t = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
210
+ var a, o;
211
+ let t = (a = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : a.get, n = t && "isReactWarning" in t && t.isReactWarning;
212
+ return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
207
213
  }
208
214
  var rr = [
209
215
  "a",
@@ -222,138 +228,138 @@ var rr = [
222
228
  "span",
223
229
  "svg",
224
230
  "ul"
225
- ], $ = rr.reduce((e, t) => {
226
- const n = s.forwardRef((o, a) => {
227
- const { asChild: r, ...i } = o, u = r ? L : t;
228
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(u, { ...i, ref: a });
231
+ ], M = rr.reduce((e, t) => {
232
+ const n = /* @__PURE__ */ Y(`Primitive.${t}`), a = s.forwardRef((o, r) => {
233
+ const { asChild: i, ...u } = o, p = i ? n : t;
234
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(p, { ...u, ref: r });
229
235
  });
230
- return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
236
+ return a.displayName = `Primitive.${t}`, { ...e, [t]: a };
231
237
  }, {});
232
238
  function tr(e) {
233
- const t = e + "CollectionProvider", [n, o] = U(t), [a, r] = n(
239
+ const t = e + "CollectionProvider", [n, a] = j(t), [o, r] = n(
234
240
  t,
235
241
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
236
- ), i = (d) => {
237
- const { scope: l, children: h } = d, v = A.useRef(null), y = A.useRef(/* @__PURE__ */ new Map()).current;
238
- return /* @__PURE__ */ f(a, { scope: l, itemMap: y, collectionRef: v, children: h });
242
+ ), i = (h) => {
243
+ const { scope: v, children: y } = h, b = O.useRef(null), C = O.useRef(/* @__PURE__ */ new Map()).current;
244
+ return /* @__PURE__ */ l(o, { scope: v, itemMap: C, collectionRef: b, children: y });
239
245
  };
240
246
  i.displayName = t;
241
- const u = e + "CollectionSlot", c = A.forwardRef(
242
- (d, l) => {
243
- const { scope: h, children: v } = d, y = r(u, h), b = P(l, y.collectionRef);
244
- return /* @__PURE__ */ f(L, { ref: b, children: v });
247
+ const u = e + "CollectionSlot", p = /* @__PURE__ */ Y(u), c = O.forwardRef(
248
+ (h, v) => {
249
+ const { scope: y, children: b } = h, C = r(u, y), N = T(v, C.collectionRef);
250
+ return /* @__PURE__ */ l(p, { ref: N, children: b });
245
251
  }
246
252
  );
247
253
  c.displayName = u;
248
- const p = e + "CollectionItemSlot", m = "data-radix-collection-item", _ = A.forwardRef(
249
- (d, l) => {
250
- const { scope: h, children: v, ...y } = d, b = A.useRef(null), E = P(l, b), O = r(p, h);
251
- return A.useEffect(() => (O.itemMap.set(b, { ref: b, ...y }), () => void O.itemMap.delete(b))), /* @__PURE__ */ f(L, { [m]: "", ref: E, children: v });
254
+ const _ = e + "CollectionItemSlot", f = "data-radix-collection-item", g = /* @__PURE__ */ Y(_), d = O.forwardRef(
255
+ (h, v) => {
256
+ const { scope: y, children: b, ...C } = h, N = O.useRef(null), P = T(v, N), x = r(_, y);
257
+ return O.useEffect(() => (x.itemMap.set(N, { ref: N, ...C }), () => void x.itemMap.delete(N))), /* @__PURE__ */ l(g, { [f]: "", ref: P, children: b });
252
258
  }
253
259
  );
254
- _.displayName = p;
255
- function g(d) {
256
- const l = r(e + "CollectionConsumer", d);
257
- return A.useCallback(() => {
258
- const v = l.collectionRef.current;
259
- if (!v) return [];
260
- const y = Array.from(v.querySelectorAll(`[${m}]`));
261
- return Array.from(l.itemMap.values()).sort(
262
- (O, x) => y.indexOf(O.ref.current) - y.indexOf(x.ref.current)
260
+ d.displayName = _;
261
+ function m(h) {
262
+ const v = r(e + "CollectionConsumer", h);
263
+ return O.useCallback(() => {
264
+ const b = v.collectionRef.current;
265
+ if (!b) return [];
266
+ const C = Array.from(b.querySelectorAll(`[${f}]`));
267
+ return Array.from(v.itemMap.values()).sort(
268
+ (x, F) => C.indexOf(x.ref.current) - C.indexOf(F.ref.current)
263
269
  );
264
- }, [l.collectionRef, l.itemMap]);
270
+ }, [v.collectionRef, v.itemMap]);
265
271
  }
266
272
  return [
267
- { Provider: i, Slot: c, ItemSlot: _ },
268
- g,
269
- o
273
+ { Provider: i, Slot: c, ItemSlot: d },
274
+ m,
275
+ a
270
276
  ];
271
277
  }
272
- var z = globalThis != null && globalThis.document ? s.useLayoutEffect : () => {
273
- }, nr = s.useId || (() => {
278
+ var U = globalThis != null && globalThis.document ? s.useLayoutEffect : () => {
279
+ }, nr = s[" useId ".trim().toString()] || (() => {
274
280
  }), or = 0;
275
281
  function ar(e) {
276
282
  const [t, n] = s.useState(nr());
277
- return z(() => {
278
- n((o) => o ?? String(or++));
283
+ return U(() => {
284
+ n((a) => a ?? String(or++));
279
285
  }, [e]), t ? `radix-${t}` : "";
280
286
  }
281
- function Z(e) {
287
+ function J(e) {
282
288
  const t = s.useRef(e);
283
289
  return s.useEffect(() => {
284
290
  t.current = e;
285
291
  }), s.useMemo(() => (...n) => {
286
- var o;
287
- return (o = t.current) == null ? void 0 : o.call(t, ...n);
292
+ var a;
293
+ return (a = t.current) == null ? void 0 : a.call(t, ...n);
288
294
  }, []);
289
295
  }
290
- function ge({
296
+ function me({
291
297
  prop: e,
292
298
  defaultProp: t,
293
299
  onChange: n = () => {
294
300
  }
295
301
  }) {
296
- const [o, a] = ir({ defaultProp: t, onChange: n }), r = e !== void 0, i = r ? e : o, u = Z(n), c = s.useCallback(
297
- (p) => {
302
+ const [a, o] = ir({ defaultProp: t, onChange: n }), r = e !== void 0, i = r ? e : a, u = J(n), p = s.useCallback(
303
+ (c) => {
298
304
  if (r) {
299
- const _ = typeof p == "function" ? p(e) : p;
300
- _ !== e && u(_);
305
+ const f = typeof c == "function" ? c(e) : c;
306
+ f !== e && u(f);
301
307
  } else
302
- a(p);
308
+ o(c);
303
309
  },
304
- [r, e, a, u]
310
+ [r, e, o, u]
305
311
  );
306
- return [i, c];
312
+ return [i, p];
307
313
  }
308
314
  function ir({
309
315
  defaultProp: e,
310
316
  onChange: t
311
317
  }) {
312
- const n = s.useState(e), [o] = n, a = s.useRef(o), r = Z(t);
318
+ const n = s.useState(e), [a] = n, o = s.useRef(a), r = J(t);
313
319
  return s.useEffect(() => {
314
- a.current !== o && (r(o), a.current = o);
315
- }, [o, a, r]), n;
320
+ o.current !== a && (r(a), o.current = a);
321
+ }, [a, o, r]), n;
316
322
  }
317
323
  var ur = s.createContext(void 0);
318
- function he(e) {
324
+ function ge(e) {
319
325
  const t = s.useContext(ur);
320
326
  return e || t || "ltr";
321
327
  }
322
- var K = "rovingFocusGroup.onEntryFocus", sr = { bubbles: !1, cancelable: !0 }, j = "RovingFocusGroup", [Y, ve, cr] = tr(j), [pr, ye] = U(
323
- j,
328
+ var B = "rovingFocusGroup.onEntryFocus", sr = { bubbles: !1, cancelable: !0 }, V = "RovingFocusGroup", [X, he, cr] = tr(V), [pr, ve] = j(
329
+ V,
324
330
  [cr]
325
- ), [dr, lr] = pr(j), be = s.forwardRef(
326
- (e, t) => /* @__PURE__ */ f(Y.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ f(Y.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ f(fr, { ...e, ref: t }) }) })
331
+ ), [dr, lr] = pr(V), ye = s.forwardRef(
332
+ (e, t) => /* @__PURE__ */ l(X.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(X.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(fr, { ...e, ref: t }) }) })
327
333
  );
328
- be.displayName = j;
334
+ ye.displayName = V;
329
335
  var fr = s.forwardRef((e, t) => {
330
336
  const {
331
337
  __scopeRovingFocusGroup: n,
332
- orientation: o,
333
- loop: a = !1,
338
+ orientation: a,
339
+ loop: o = !1,
334
340
  dir: r,
335
341
  currentTabStopId: i,
336
342
  defaultCurrentTabStopId: u,
337
- onCurrentTabStopIdChange: c,
338
- onEntryFocus: p,
339
- preventScrollOnEntryFocus: m = !1,
340
- ..._
341
- } = e, g = s.useRef(null), d = P(t, g), l = he(r), [h = null, v] = ge({
343
+ onCurrentTabStopIdChange: p,
344
+ onEntryFocus: c,
345
+ preventScrollOnEntryFocus: _ = !1,
346
+ ...f
347
+ } = e, g = s.useRef(null), d = T(t, g), m = ge(r), [h = null, v] = me({
342
348
  prop: i,
343
349
  defaultProp: u,
344
- onChange: c
345
- }), [y, b] = s.useState(!1), E = Z(p), O = ve(n), x = s.useRef(!1), [De, re] = s.useState(0);
350
+ onChange: p
351
+ }), [y, b] = s.useState(!1), C = J(c), N = he(n), P = s.useRef(!1), [x, F] = s.useState(0);
346
352
  return s.useEffect(() => {
347
353
  const R = g.current;
348
354
  if (R)
349
- return R.addEventListener(K, E), () => R.removeEventListener(K, E);
350
- }, [E]), /* @__PURE__ */ f(
355
+ return R.addEventListener(B, C), () => R.removeEventListener(B, C);
356
+ }, [C]), /* @__PURE__ */ l(
351
357
  dr,
352
358
  {
353
359
  scope: n,
354
- orientation: o,
355
- dir: l,
356
- loop: a,
360
+ orientation: a,
361
+ dir: m,
362
+ loop: o,
357
363
  currentTabStopId: h,
358
364
  onItemFocus: s.useCallback(
359
365
  (R) => v(R),
@@ -361,88 +367,88 @@ var fr = s.forwardRef((e, t) => {
361
367
  ),
362
368
  onItemShiftTab: s.useCallback(() => b(!0), []),
363
369
  onFocusableItemAdd: s.useCallback(
364
- () => re((R) => R + 1),
370
+ () => F((R) => R + 1),
365
371
  []
366
372
  ),
367
373
  onFocusableItemRemove: s.useCallback(
368
- () => re((R) => R - 1),
374
+ () => F((R) => R - 1),
369
375
  []
370
376
  ),
371
- children: /* @__PURE__ */ f(
372
- $.div,
377
+ children: /* @__PURE__ */ l(
378
+ M.div,
373
379
  {
374
- tabIndex: y || De === 0 ? -1 : 0,
375
- "data-orientation": o,
376
- ..._,
380
+ tabIndex: y || x === 0 ? -1 : 0,
381
+ "data-orientation": a,
382
+ ...f,
377
383
  ref: d,
378
384
  style: { outline: "none", ...e.style },
379
- onMouseDown: I(e.onMouseDown, () => {
380
- x.current = !0;
385
+ onMouseDown: w(e.onMouseDown, () => {
386
+ P.current = !0;
381
387
  }),
382
- onFocus: I(e.onFocus, (R) => {
383
- const Ge = !x.current;
384
- if (R.target === R.currentTarget && Ge && !y) {
385
- const te = new CustomEvent(K, sr);
388
+ onFocus: w(e.onFocus, (R) => {
389
+ const ke = !P.current;
390
+ if (R.target === R.currentTarget && ke && !y) {
391
+ const te = new CustomEvent(B, sr);
386
392
  if (R.currentTarget.dispatchEvent(te), !te.defaultPrevented) {
387
- const V = O().filter((w) => w.focusable), Le = V.find((w) => w.active), ze = V.find((w) => w.id === h), Ue = [Le, ze, ...V].filter(
393
+ const K = N().filter((E) => E.focusable), De = K.find((E) => E.active), Ge = K.find((E) => E.id === h), Le = [De, Ge, ...K].filter(
388
394
  Boolean
389
- ).map((w) => w.ref.current);
390
- Se(Ue, m);
395
+ ).map((E) => E.ref.current);
396
+ Se(Le, _);
391
397
  }
392
398
  }
393
- x.current = !1;
399
+ P.current = !1;
394
400
  }),
395
- onBlur: I(e.onBlur, () => b(!1))
401
+ onBlur: w(e.onBlur, () => b(!1))
396
402
  }
397
403
  )
398
404
  }
399
405
  );
400
- }), Re = "RovingFocusGroupItem", Ce = s.forwardRef(
406
+ }), be = "RovingFocusGroupItem", Re = s.forwardRef(
401
407
  (e, t) => {
402
408
  const {
403
409
  __scopeRovingFocusGroup: n,
404
- focusable: o = !0,
405
- active: a = !1,
410
+ focusable: a = !0,
411
+ active: o = !1,
406
412
  tabStopId: r,
407
413
  ...i
408
- } = e, u = ar(), c = r || u, p = lr(Re, n), m = p.currentTabStopId === c, _ = ve(n), { onFocusableItemAdd: g, onFocusableItemRemove: d } = p;
414
+ } = e, u = ar(), p = r || u, c = lr(be, n), _ = c.currentTabStopId === p, f = he(n), { onFocusableItemAdd: g, onFocusableItemRemove: d } = c;
409
415
  return s.useEffect(() => {
410
- if (o)
416
+ if (a)
411
417
  return g(), () => d();
412
- }, [o, g, d]), /* @__PURE__ */ f(
413
- Y.ItemSlot,
418
+ }, [a, g, d]), /* @__PURE__ */ l(
419
+ X.ItemSlot,
414
420
  {
415
421
  scope: n,
416
- id: c,
417
- focusable: o,
418
- active: a,
419
- children: /* @__PURE__ */ f(
420
- $.span,
422
+ id: p,
423
+ focusable: a,
424
+ active: o,
425
+ children: /* @__PURE__ */ l(
426
+ M.span,
421
427
  {
422
- tabIndex: m ? 0 : -1,
423
- "data-orientation": p.orientation,
428
+ tabIndex: _ ? 0 : -1,
429
+ "data-orientation": c.orientation,
424
430
  ...i,
425
431
  ref: t,
426
- onMouseDown: I(e.onMouseDown, (l) => {
427
- o ? p.onItemFocus(c) : l.preventDefault();
432
+ onMouseDown: w(e.onMouseDown, (m) => {
433
+ a ? c.onItemFocus(p) : m.preventDefault();
428
434
  }),
429
- onFocus: I(e.onFocus, () => p.onItemFocus(c)),
430
- onKeyDown: I(e.onKeyDown, (l) => {
431
- if (l.key === "Tab" && l.shiftKey) {
432
- p.onItemShiftTab();
435
+ onFocus: w(e.onFocus, () => c.onItemFocus(p)),
436
+ onKeyDown: w(e.onKeyDown, (m) => {
437
+ if (m.key === "Tab" && m.shiftKey) {
438
+ c.onItemShiftTab();
433
439
  return;
434
440
  }
435
- if (l.target !== l.currentTarget) return;
436
- const h = gr(l, p.orientation, p.dir);
441
+ if (m.target !== m.currentTarget) return;
442
+ const h = gr(m, c.orientation, c.dir);
437
443
  if (h !== void 0) {
438
- if (l.metaKey || l.ctrlKey || l.altKey || l.shiftKey) return;
439
- l.preventDefault();
440
- let y = _().filter((b) => b.focusable).map((b) => b.ref.current);
444
+ if (m.metaKey || m.ctrlKey || m.altKey || m.shiftKey) return;
445
+ m.preventDefault();
446
+ let y = f().filter((b) => b.focusable).map((b) => b.ref.current);
441
447
  if (h === "last") y.reverse();
442
448
  else if (h === "prev" || h === "next") {
443
449
  h === "prev" && y.reverse();
444
- const b = y.indexOf(l.currentTarget);
445
- y = p.loop ? hr(y, b + 1) : y.slice(b + 1);
450
+ const b = y.indexOf(m.currentTarget);
451
+ y = c.loop ? hr(y, b + 1) : y.slice(b + 1);
446
452
  }
447
453
  setTimeout(() => Se(y));
448
454
  }
@@ -453,7 +459,7 @@ var fr = s.forwardRef((e, t) => {
453
459
  );
454
460
  }
455
461
  );
456
- Ce.displayName = Re;
462
+ Re.displayName = be;
457
463
  var _r = {
458
464
  ArrowLeft: "prev",
459
465
  ArrowUp: "prev",
@@ -468,37 +474,37 @@ function mr(e, t) {
468
474
  return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
469
475
  }
470
476
  function gr(e, t, n) {
471
- const o = mr(e.key, n);
472
- if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
473
- return _r[o];
477
+ const a = mr(e.key, n);
478
+ if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(a)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(a)))
479
+ return _r[a];
474
480
  }
475
481
  function Se(e, t = !1) {
476
482
  const n = document.activeElement;
477
- for (const o of e)
478
- if (o === n || (o.focus({ preventScroll: t }), document.activeElement !== n)) return;
483
+ for (const a of e)
484
+ if (a === n || (a.focus({ preventScroll: t }), document.activeElement !== n)) return;
479
485
  }
480
486
  function hr(e, t) {
481
- return e.map((n, o) => e[(t + o) % e.length]);
487
+ return e.map((n, a) => e[(t + a) % e.length]);
482
488
  }
483
- var vr = be, yr = Ce;
489
+ var vr = ye, yr = Re;
484
490
  function br(e) {
485
491
  const [t, n] = s.useState(void 0);
486
- return z(() => {
492
+ return U(() => {
487
493
  if (e) {
488
494
  n({ width: e.offsetWidth, height: e.offsetHeight });
489
- const o = new ResizeObserver((a) => {
490
- if (!Array.isArray(a) || !a.length)
495
+ const a = new ResizeObserver((o) => {
496
+ if (!Array.isArray(o) || !o.length)
491
497
  return;
492
- const r = a[0];
498
+ const r = o[0];
493
499
  let i, u;
494
500
  if ("borderBoxSize" in r) {
495
- const c = r.borderBoxSize, p = Array.isArray(c) ? c[0] : c;
496
- i = p.inlineSize, u = p.blockSize;
501
+ const p = r.borderBoxSize, c = Array.isArray(p) ? p[0] : p;
502
+ i = c.inlineSize, u = c.blockSize;
497
503
  } else
498
504
  i = e.offsetWidth, u = e.offsetHeight;
499
505
  n({ width: i, height: u });
500
506
  });
501
- return o.observe(e, { box: "border-box" }), () => o.unobserve(e);
507
+ return a.observe(e, { box: "border-box" }), () => a.unobserve(e);
502
508
  } else
503
509
  n(void 0);
504
510
  }, [e]), t;
@@ -507,16 +513,16 @@ function Rr(e) {
507
513
  const t = s.useRef({ value: e, previous: e });
508
514
  return s.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
509
515
  }
510
- function Cr(e, t) {
511
- return s.useReducer((n, o) => t[n][o] ?? n, e);
516
+ function Sr(e, t) {
517
+ return s.useReducer((n, a) => t[n][a] ?? n, e);
512
518
  }
513
- var Ne = (e) => {
514
- const { present: t, children: n } = e, o = Sr(t), a = typeof n == "function" ? n({ present: o.isPresent }) : s.Children.only(n), r = P(o.ref, Nr(a));
515
- return typeof n == "function" || o.isPresent ? s.cloneElement(a, { ref: r }) : null;
519
+ var Ce = (e) => {
520
+ const { present: t, children: n } = e, a = Cr(t), o = typeof n == "function" ? n({ present: a.isPresent }) : s.Children.only(n), r = T(a.ref, Nr(o));
521
+ return typeof n == "function" || a.isPresent ? s.cloneElement(o, { ref: r }) : null;
516
522
  };
517
- Ne.displayName = "Presence";
518
- function Sr(e) {
519
- const [t, n] = s.useState(), o = s.useRef({}), a = s.useRef(e), r = s.useRef("none"), i = e ? "mounted" : "unmounted", [u, c] = Cr(i, {
523
+ Ce.displayName = "Presence";
524
+ function Cr(e) {
525
+ const [t, n] = s.useState(), a = s.useRef({}), o = s.useRef(e), r = s.useRef("none"), i = e ? "mounted" : "unmounted", [u, p] = Sr(i, {
520
526
  mounted: {
521
527
  UNMOUNT: "unmounted",
522
528
  ANIMATION_OUT: "unmountSuspended"
@@ -530,127 +536,127 @@ function Sr(e) {
530
536
  }
531
537
  });
532
538
  return s.useEffect(() => {
533
- const p = k(o.current);
534
- r.current = u === "mounted" ? p : "none";
535
- }, [u]), z(() => {
536
- const p = o.current, m = a.current;
537
- if (m !== e) {
538
- const g = r.current, d = k(p);
539
- e ? c("MOUNT") : d === "none" || (p == null ? void 0 : p.display) === "none" ? c("UNMOUNT") : c(m && g !== d ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
539
+ const c = G(a.current);
540
+ r.current = u === "mounted" ? c : "none";
541
+ }, [u]), U(() => {
542
+ const c = a.current, _ = o.current;
543
+ if (_ !== e) {
544
+ const g = r.current, d = G(c);
545
+ e ? p("MOUNT") : d === "none" || (c == null ? void 0 : c.display) === "none" ? p("UNMOUNT") : p(_ && g !== d ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
540
546
  }
541
- }, [e, c]), z(() => {
547
+ }, [e, p]), U(() => {
542
548
  if (t) {
543
- let p;
544
- const m = t.ownerDocument.defaultView ?? window, _ = (d) => {
545
- const h = k(o.current).includes(d.animationName);
546
- if (d.target === t && h && (c("ANIMATION_END"), !a.current)) {
549
+ let c;
550
+ const _ = t.ownerDocument.defaultView ?? window, f = (d) => {
551
+ const h = G(a.current).includes(d.animationName);
552
+ if (d.target === t && h && (p("ANIMATION_END"), !o.current)) {
547
553
  const v = t.style.animationFillMode;
548
- t.style.animationFillMode = "forwards", p = m.setTimeout(() => {
554
+ t.style.animationFillMode = "forwards", c = _.setTimeout(() => {
549
555
  t.style.animationFillMode === "forwards" && (t.style.animationFillMode = v);
550
556
  });
551
557
  }
552
558
  }, g = (d) => {
553
- d.target === t && (r.current = k(o.current));
559
+ d.target === t && (r.current = G(a.current));
554
560
  };
555
- return t.addEventListener("animationstart", g), t.addEventListener("animationcancel", _), t.addEventListener("animationend", _), () => {
556
- m.clearTimeout(p), t.removeEventListener("animationstart", g), t.removeEventListener("animationcancel", _), t.removeEventListener("animationend", _);
561
+ return t.addEventListener("animationstart", g), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
562
+ _.clearTimeout(c), t.removeEventListener("animationstart", g), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
557
563
  };
558
564
  } else
559
- c("ANIMATION_END");
560
- }, [t, c]), {
565
+ p("ANIMATION_END");
566
+ }, [t, p]), {
561
567
  isPresent: ["mounted", "unmountSuspended"].includes(u),
562
- ref: s.useCallback((p) => {
563
- p && (o.current = getComputedStyle(p)), n(p);
568
+ ref: s.useCallback((c) => {
569
+ c && (a.current = getComputedStyle(c)), n(c);
564
570
  }, [])
565
571
  };
566
572
  }
567
- function k(e) {
573
+ function G(e) {
568
574
  return (e == null ? void 0 : e.animationName) || "none";
569
575
  }
570
576
  function Nr(e) {
571
- var o, a;
572
- let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
573
- return n ? e.ref : (t = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
577
+ var a, o;
578
+ let t = (a = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : a.get, n = t && "isReactWarning" in t && t.isReactWarning;
579
+ return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
574
580
  }
575
- var J = "Radio", [Ir, Ie] = U(J), [wr, Ar] = Ir(J), we = s.forwardRef(
581
+ var Q = "Radio", [Ir, Ne] = j(Q), [Ar, wr] = Ir(Q), Ie = s.forwardRef(
576
582
  (e, t) => {
577
583
  const {
578
584
  __scopeRadio: n,
579
- name: o,
580
- checked: a = !1,
585
+ name: a,
586
+ checked: o = !1,
581
587
  required: r,
582
588
  disabled: i,
583
589
  value: u = "on",
584
- onCheck: c,
585
- form: p,
586
- ...m
587
- } = e, [_, g] = s.useState(null), d = P(t, (v) => g(v)), l = s.useRef(!1), h = _ ? p || !!_.closest("form") : !0;
588
- return /* @__PURE__ */ N(wr, { scope: n, checked: a, disabled: i, children: [
589
- /* @__PURE__ */ f(
590
- $.button,
590
+ onCheck: p,
591
+ form: c,
592
+ ..._
593
+ } = e, [f, g] = s.useState(null), d = T(t, (v) => g(v)), m = s.useRef(!1), h = f ? c || !!f.closest("form") : !0;
594
+ return /* @__PURE__ */ A(Ar, { scope: n, checked: o, disabled: i, children: [
595
+ /* @__PURE__ */ l(
596
+ M.button,
591
597
  {
592
598
  type: "button",
593
599
  role: "radio",
594
- "aria-checked": a,
595
- "data-state": Oe(a),
600
+ "aria-checked": o,
601
+ "data-state": Ee(o),
596
602
  "data-disabled": i ? "" : void 0,
597
603
  disabled: i,
598
604
  value: u,
599
- ...m,
605
+ ..._,
600
606
  ref: d,
601
- onClick: I(e.onClick, (v) => {
602
- a || c == null || c(), h && (l.current = v.isPropagationStopped(), l.current || v.stopPropagation());
607
+ onClick: w(e.onClick, (v) => {
608
+ o || p == null || p(), h && (m.current = v.isPropagationStopped(), m.current || v.stopPropagation());
603
609
  })
604
610
  }
605
611
  ),
606
- h && /* @__PURE__ */ f(
612
+ h && /* @__PURE__ */ l(
607
613
  Er,
608
614
  {
609
- control: _,
610
- bubbles: !l.current,
611
- name: o,
615
+ control: f,
616
+ bubbles: !m.current,
617
+ name: a,
612
618
  value: u,
613
- checked: a,
619
+ checked: o,
614
620
  required: r,
615
621
  disabled: i,
616
- form: p,
622
+ form: c,
617
623
  style: { transform: "translateX(-100%)" }
618
624
  }
619
625
  )
620
626
  ] });
621
627
  }
622
628
  );
623
- we.displayName = J;
624
- var Ae = "RadioIndicator", Ee = s.forwardRef(
629
+ Ie.displayName = Q;
630
+ var Ae = "RadioIndicator", we = s.forwardRef(
625
631
  (e, t) => {
626
- const { __scopeRadio: n, forceMount: o, ...a } = e, r = Ar(Ae, n);
627
- return /* @__PURE__ */ f(Ne, { present: o || r.checked, children: /* @__PURE__ */ f(
628
- $.span,
632
+ const { __scopeRadio: n, forceMount: a, ...o } = e, r = wr(Ae, n);
633
+ return /* @__PURE__ */ l(Ce, { present: a || r.checked, children: /* @__PURE__ */ l(
634
+ M.span,
629
635
  {
630
- "data-state": Oe(r.checked),
636
+ "data-state": Ee(r.checked),
631
637
  "data-disabled": r.disabled ? "" : void 0,
632
- ...a,
638
+ ...o,
633
639
  ref: t
634
640
  }
635
641
  ) });
636
642
  }
637
643
  );
638
- Ee.displayName = Ae;
644
+ we.displayName = Ae;
639
645
  var Er = (e) => {
640
- const { control: t, checked: n, bubbles: o = !0, ...a } = e, r = s.useRef(null), i = Rr(n), u = br(t);
646
+ const { control: t, checked: n, bubbles: a = !0, ...o } = e, r = s.useRef(null), i = Rr(n), u = br(t);
641
647
  return s.useEffect(() => {
642
- const c = r.current, p = window.HTMLInputElement.prototype, _ = Object.getOwnPropertyDescriptor(p, "checked").set;
643
- if (i !== n && _) {
644
- const g = new Event("click", { bubbles: o });
645
- _.call(c, n), c.dispatchEvent(g);
648
+ const p = r.current, c = window.HTMLInputElement.prototype, f = Object.getOwnPropertyDescriptor(c, "checked").set;
649
+ if (i !== n && f) {
650
+ const g = new Event("click", { bubbles: a });
651
+ f.call(p, n), p.dispatchEvent(g);
646
652
  }
647
- }, [i, n, o]), /* @__PURE__ */ f(
653
+ }, [i, n, a]), /* @__PURE__ */ l(
648
654
  "input",
649
655
  {
650
656
  type: "radio",
651
657
  "aria-hidden": !0,
652
658
  defaultChecked: n,
653
- ...a,
659
+ ...o,
654
660
  tabIndex: -1,
655
661
  ref: r,
656
662
  style: {
@@ -664,56 +670,56 @@ var Er = (e) => {
664
670
  }
665
671
  );
666
672
  };
667
- function Oe(e) {
673
+ function Ee(e) {
668
674
  return e ? "checked" : "unchecked";
669
675
  }
670
- var Or = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Q = "RadioGroup", [Pr, pt] = U(Q, [
671
- ye,
672
- Ie
673
- ]), Pe = ye(), xe = Ie(), [xr, Tr] = Pr(Q), Te = s.forwardRef(
676
+ var Or = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], ee = "RadioGroup", [Pr] = j(ee, [
677
+ ve,
678
+ Ne
679
+ ]), Oe = ve(), Pe = Ne(), [xr, Tr] = Pr(ee), xe = s.forwardRef(
674
680
  (e, t) => {
675
681
  const {
676
682
  __scopeRadioGroup: n,
677
- name: o,
678
- defaultValue: a,
683
+ name: a,
684
+ defaultValue: o,
679
685
  value: r,
680
686
  required: i = !1,
681
687
  disabled: u = !1,
682
- orientation: c,
683
- dir: p,
684
- loop: m = !0,
685
- onValueChange: _,
688
+ orientation: p,
689
+ dir: c,
690
+ loop: _ = !0,
691
+ onValueChange: f,
686
692
  ...g
687
- } = e, d = Pe(n), l = he(p), [h, v] = ge({
693
+ } = e, d = Oe(n), m = ge(c), [h, v] = me({
688
694
  prop: r,
689
- defaultProp: a,
690
- onChange: _
695
+ defaultProp: o,
696
+ onChange: f
691
697
  });
692
- return /* @__PURE__ */ f(
698
+ return /* @__PURE__ */ l(
693
699
  xr,
694
700
  {
695
701
  scope: n,
696
- name: o,
702
+ name: a,
697
703
  required: i,
698
704
  disabled: u,
699
705
  value: h,
700
706
  onValueChange: v,
701
- children: /* @__PURE__ */ f(
707
+ children: /* @__PURE__ */ l(
702
708
  vr,
703
709
  {
704
710
  asChild: !0,
705
711
  ...d,
706
- orientation: c,
707
- dir: l,
708
- loop: m,
709
- children: /* @__PURE__ */ f(
710
- $.div,
712
+ orientation: p,
713
+ dir: m,
714
+ loop: _,
715
+ children: /* @__PURE__ */ l(
716
+ M.div,
711
717
  {
712
718
  role: "radiogroup",
713
719
  "aria-required": i,
714
- "aria-orientation": c,
720
+ "aria-orientation": p,
715
721
  "data-disabled": u ? "" : void 0,
716
- dir: l,
722
+ dir: m,
717
723
  ...g,
718
724
  ref: t
719
725
  }
@@ -724,41 +730,41 @@ var Or = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Q = "RadioGroup",
724
730
  );
725
731
  }
726
732
  );
727
- Te.displayName = Q;
728
- var $e = "RadioGroupItem", Me = s.forwardRef(
733
+ xe.displayName = ee;
734
+ var Te = "RadioGroupItem", $e = s.forwardRef(
729
735
  (e, t) => {
730
- const { __scopeRadioGroup: n, disabled: o, ...a } = e, r = Tr($e, n), i = r.disabled || o, u = Pe(n), c = xe(n), p = s.useRef(null), m = P(t, p), _ = r.value === a.value, g = s.useRef(!1);
736
+ const { __scopeRadioGroup: n, disabled: a, ...o } = e, r = Tr(Te, n), i = r.disabled || a, u = Oe(n), p = Pe(n), c = s.useRef(null), _ = T(t, c), f = r.value === o.value, g = s.useRef(!1);
731
737
  return s.useEffect(() => {
732
738
  const d = (h) => {
733
739
  Or.includes(h.key) && (g.current = !0);
734
- }, l = () => g.current = !1;
735
- return document.addEventListener("keydown", d), document.addEventListener("keyup", l), () => {
736
- document.removeEventListener("keydown", d), document.removeEventListener("keyup", l);
740
+ }, m = () => g.current = !1;
741
+ return document.addEventListener("keydown", d), document.addEventListener("keyup", m), () => {
742
+ document.removeEventListener("keydown", d), document.removeEventListener("keyup", m);
737
743
  };
738
- }, []), /* @__PURE__ */ f(
744
+ }, []), /* @__PURE__ */ l(
739
745
  yr,
740
746
  {
741
747
  asChild: !0,
742
748
  ...u,
743
749
  focusable: !i,
744
- active: _,
745
- children: /* @__PURE__ */ f(
746
- we,
750
+ active: f,
751
+ children: /* @__PURE__ */ l(
752
+ Ie,
747
753
  {
748
754
  disabled: i,
749
755
  required: r.required,
750
- checked: _,
751
- ...c,
752
- ...a,
756
+ checked: f,
757
+ ...p,
758
+ ...o,
753
759
  name: r.name,
754
- ref: m,
755
- onCheck: () => r.onValueChange(a.value),
756
- onKeyDown: I((d) => {
760
+ ref: _,
761
+ onCheck: () => r.onValueChange(o.value),
762
+ onKeyDown: w((d) => {
757
763
  d.key === "Enter" && d.preventDefault();
758
764
  }),
759
- onFocus: I(a.onFocus, () => {
765
+ onFocus: w(o.onFocus, () => {
760
766
  var d;
761
- g.current && ((d = p.current) == null || d.click());
767
+ g.current && ((d = c.current) == null || d.click());
762
768
  })
763
769
  }
764
770
  )
@@ -766,19 +772,19 @@ var $e = "RadioGroupItem", Me = s.forwardRef(
766
772
  );
767
773
  }
768
774
  );
769
- Me.displayName = $e;
770
- var $r = "RadioGroupIndicator", Fe = s.forwardRef(
775
+ $e.displayName = Te;
776
+ var $r = "RadioGroupIndicator", Me = s.forwardRef(
771
777
  (e, t) => {
772
- const { __scopeRadioGroup: n, ...o } = e, a = xe(n);
773
- return /* @__PURE__ */ f(Ee, { ...a, ...o, ref: t });
778
+ const { __scopeRadioGroup: n, ...a } = e, o = Pe(n);
779
+ return /* @__PURE__ */ l(we, { ...o, ...a, ref: t });
774
780
  }
775
781
  );
776
- Fe.displayName = $r;
777
- var Mr = Te, Fr = Me, kr = Fe;
782
+ Me.displayName = $r;
783
+ var Mr = xe, Fr = $e, kr = Me;
778
784
  function Dr(e) {
779
785
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
780
786
  }
781
- var B = { exports: {} };
787
+ var W = { exports: {} };
782
788
  /*!
783
789
  Copyright (c) 2018 Jed Watson.
784
790
  Licensed under the MIT License (MIT), see
@@ -786,17 +792,17 @@ var B = { exports: {} };
786
792
  */
787
793
  var ue;
788
794
  function Gr() {
789
- return ue || (ue = 1, function(e) {
795
+ return ue || (ue = 1, (function(e) {
790
796
  (function() {
791
797
  var t = {}.hasOwnProperty;
792
798
  function n() {
793
799
  for (var r = "", i = 0; i < arguments.length; i++) {
794
800
  var u = arguments[i];
795
- u && (r = a(r, o.call(this, u)));
801
+ u && (r = o(r, a.call(this, u)));
796
802
  }
797
803
  return r;
798
804
  }
799
- function o(r) {
805
+ function a(r) {
800
806
  if (typeof r == "string" || typeof r == "number")
801
807
  return this && this[r] || r;
802
808
  if (typeof r != "object")
@@ -807,15 +813,15 @@ function Gr() {
807
813
  return r.toString();
808
814
  var i = "";
809
815
  for (var u in r)
810
- t.call(r, u) && r[u] && (i = a(i, this && this[u] || u));
816
+ t.call(r, u) && r[u] && (i = o(i, this && this[u] || u));
811
817
  return i;
812
818
  }
813
- function a(r, i) {
819
+ function o(r, i) {
814
820
  return i ? r ? r + " " + i : r + i : r;
815
821
  }
816
822
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
817
823
  })();
818
- }(B)), B.exports;
824
+ })(W)), W.exports;
819
825
  }
820
826
  var Lr = Gr();
821
827
  const zr = /* @__PURE__ */ Dr(Lr), Ur = {
@@ -838,7 +844,7 @@ const zr = /* @__PURE__ */ Dr(Lr), Ur = {
838
844
  "purpur-radio-card-group__item-image-placeholder": "_purpur-radio-card-group__item-image-placeholder_19msf_167",
839
845
  "purpur-radio-card-group__item-image-placeholder--loaded": "_purpur-radio-card-group__item-image-placeholder--loaded_19msf_172",
840
846
  "purpur-radio-card-group__item-children": "_purpur-radio-card-group__item-children_19msf_175"
841
- }, C = zr.bind(Ur);
847
+ }, S = zr.bind(Ur);
842
848
  function jr(e) {
843
849
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
844
850
  }
@@ -850,17 +856,17 @@ var se = { exports: {} };
850
856
  */
851
857
  var ce;
852
858
  function Vr() {
853
- return ce || (ce = 1, function(e) {
859
+ return ce || (ce = 1, (function(e) {
854
860
  (function() {
855
861
  var t = {}.hasOwnProperty;
856
862
  function n() {
857
863
  for (var r = "", i = 0; i < arguments.length; i++) {
858
864
  var u = arguments[i];
859
- u && (r = a(r, o.call(this, u)));
865
+ u && (r = o(r, a.call(this, u)));
860
866
  }
861
867
  return r;
862
868
  }
863
- function o(r) {
869
+ function a(r) {
864
870
  if (typeof r == "string" || typeof r == "number")
865
871
  return this && this[r] || r;
866
872
  if (typeof r != "object")
@@ -871,15 +877,15 @@ function Vr() {
871
877
  return r.toString();
872
878
  var i = "";
873
879
  for (var u in r)
874
- t.call(r, u) && r[u] && (i = a(i, this && this[u] || u));
880
+ t.call(r, u) && r[u] && (i = o(i, this && this[u] || u));
875
881
  return i;
876
882
  }
877
- function a(r, i) {
883
+ function o(r, i) {
878
884
  return i ? r ? r + " " + i : r + i : r;
879
885
  }
880
886
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
881
887
  })();
882
- }(se)), se.exports;
888
+ })(se)), se.exports;
883
889
  }
884
890
  var Kr = Vr();
885
891
  const Br = /* @__PURE__ */ jr(Kr), Wr = {
@@ -899,23 +905,23 @@ const Br = /* @__PURE__ */ jr(Kr), Wr = {
899
905
  "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
900
906
  }, qr = Br.bind(Wr), Hr = {
901
907
  PARAGRAPH100: "paragraph-100"
902
- }, T = "purpur-paragraph", X = ({
908
+ }, $ = "purpur-paragraph", Z = ({
903
909
  children: e,
904
910
  className: t,
905
911
  disabled: n,
906
- enableHyphenation: o = !1,
907
- negative: a = !1,
912
+ enableHyphenation: a = !1,
913
+ negative: o = !1,
908
914
  variant: r = Hr.PARAGRAPH100,
909
915
  ...i
910
916
  }) => {
911
- const u = qr(t, T, `${T}--${r}`, {
912
- [`${T}--hyphens`]: o,
913
- [`${T}--disabled`]: n,
914
- [`${T}--negative`]: a
917
+ const u = qr(t, $, `${$}--${r}`, {
918
+ [`${$}--hyphens`]: a,
919
+ [`${$}--disabled`]: n,
920
+ [`${$}--negative`]: o
915
921
  });
916
- return /* @__PURE__ */ f("p", { ...i, className: u, children: e });
922
+ return /* @__PURE__ */ l("p", { ...i, className: u, children: e });
917
923
  };
918
- X.displayName = "Paragraph";
924
+ Z.displayName = "Paragraph";
919
925
  function Yr(e) {
920
926
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
921
927
  }
@@ -927,17 +933,17 @@ var pe = { exports: {} };
927
933
  */
928
934
  var de;
929
935
  function Xr() {
930
- return de || (de = 1, function(e) {
936
+ return de || (de = 1, (function(e) {
931
937
  (function() {
932
938
  var t = {}.hasOwnProperty;
933
939
  function n() {
934
940
  for (var r = "", i = 0; i < arguments.length; i++) {
935
941
  var u = arguments[i];
936
- u && (r = a(r, o.call(this, u)));
942
+ u && (r = o(r, a.call(this, u)));
937
943
  }
938
944
  return r;
939
945
  }
940
- function o(r) {
946
+ function a(r) {
941
947
  if (typeof r == "string" || typeof r == "number")
942
948
  return this && this[r] || r;
943
949
  if (typeof r != "object")
@@ -948,15 +954,15 @@ function Xr() {
948
954
  return r.toString();
949
955
  var i = "";
950
956
  for (var u in r)
951
- t.call(r, u) && r[u] && (i = a(i, this && this[u] || u));
957
+ t.call(r, u) && r[u] && (i = o(i, this && this[u] || u));
952
958
  return i;
953
959
  }
954
- function a(r, i) {
960
+ function o(r, i) {
955
961
  return i ? r ? r + " " + i : r + i : r;
956
962
  }
957
963
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
958
964
  })();
959
- }(pe)), pe.exports;
965
+ })(pe)), pe.exports;
960
966
  }
961
967
  var Zr = Xr();
962
968
  const Jr = /* @__PURE__ */ Yr(Zr), Qr = "_loading_rzc29_1", et = {
@@ -969,84 +975,84 @@ const Jr = /* @__PURE__ */ Yr(Zr), Qr = "_loading_rzc29_1", et = {
969
975
  "purpur-skeleton--md": "_purpur-skeleton--md_rzc29_42",
970
976
  "purpur-skeleton--lg": "_purpur-skeleton--lg_rzc29_45",
971
977
  "purpur-skeleton--full": "_purpur-skeleton--full_rzc29_48"
972
- }, rt = Jr.bind(et), W = "purpur-skeleton", ke = ({
978
+ }, rt = Jr.bind(et), q = "purpur-skeleton", Fe = ({
973
979
  className: e,
974
980
  radius: t = "xs",
975
981
  negative: n = !1,
976
- ...o
982
+ ...a
977
983
  }) => {
978
- const a = rt(
984
+ const o = rt(
979
985
  e,
980
- W,
981
- `${W}--${n ? "negative" : "default"}`,
982
- `${W}--${t}`
986
+ q,
987
+ `${q}--${n ? "negative" : "default"}`,
988
+ `${q}--${t}`
983
989
  );
984
- return /* @__PURE__ */ f("div", { className: a, ...o });
990
+ return /* @__PURE__ */ l("div", { className: o, ...a });
985
991
  };
986
- ke.displayName = "Skeleton";
987
- const D = "purpur-radio-card-group__item-image", tt = (e) => !!(e != null && e.src) && !!e.altText, nt = ({
992
+ Fe.displayName = "Skeleton";
993
+ const L = "purpur-radio-card-group__item-image", tt = (e) => !!(e != null && e.src) && !!e.altText, nt = ({
988
994
  src: e,
989
995
  altText: t,
990
996
  noPlaceholder: n,
991
- loading: o = "lazy",
992
- ["data-testid"]: a
997
+ loading: a = "lazy",
998
+ ["data-testid"]: o
993
999
  }) => {
994
- const [r, i] = je(!1), u = () => i(!0), c = C(D, {
995
- [`${D}--loaded`]: r
996
- }), p = C(`${D}-placeholder`, {
997
- [`${D}-placeholder--loaded`]: r
1000
+ const [r, i] = Ue(!1), u = () => i(!0), p = S(L, {
1001
+ [`${L}--loaded`]: r
1002
+ }), c = S(`${L}-placeholder`, {
1003
+ [`${L}-placeholder--loaded`]: r
998
1004
  });
999
- return /* @__PURE__ */ N(le, { children: [
1000
- /* @__PURE__ */ f(
1005
+ return /* @__PURE__ */ A(ze, { children: [
1006
+ /* @__PURE__ */ l(
1001
1007
  "img",
1002
1008
  {
1003
- "data-testid": a,
1004
- className: c,
1009
+ "data-testid": o,
1010
+ className: p,
1005
1011
  src: e,
1006
1012
  alt: t,
1007
- loading: o,
1013
+ loading: a,
1008
1014
  onLoad: u
1009
1015
  }
1010
1016
  ),
1011
- !n && /* @__PURE__ */ f(ke, { className: p })
1017
+ !n && /* @__PURE__ */ l(Fe, { className: c })
1012
1018
  ] });
1013
- }, S = "purpur-radio-card-group__item", q = (e, { disabled: t }) => typeof e == "function" ? e({ disabled: t }) : e, ee = fe(
1019
+ }, I = "purpur-radio-card-group__item", H = (e, { disabled: t }) => typeof e == "function" ? e({ disabled: t }) : e, re = le(
1014
1020
  ({ title: e, ...t }, n) => {
1015
- const { ["data-testid"]: o, body: a, children: r, disabled: i, id: u, image: c, value: p } = t, m = { ...t };
1016
- return /* @__PURE__ */ N("div", { className: C(`${S}-container`), ref: n, children: [
1017
- /* @__PURE__ */ N(
1021
+ const { ["data-testid"]: a, body: o, children: r, disabled: i, id: u, image: p, value: c } = t, _ = { ...t };
1022
+ return /* @__PURE__ */ A("div", { className: S(`${I}-container`), ref: n, children: [
1023
+ /* @__PURE__ */ A(
1018
1024
  Fr,
1019
1025
  {
1020
- className: C(S),
1021
- "data-testid": o,
1026
+ className: S(I),
1027
+ "data-testid": a,
1022
1028
  disabled: i,
1023
1029
  id: u,
1024
- value: p,
1030
+ value: c,
1025
1031
  children: [
1026
- c && /* @__PURE__ */ f("span", { className: C(`${S}-image-container`), children: tt(c) ? /* @__PURE__ */ f(nt, { ...c, "data-testid": o && `${o}-image` }) : q(c, m) }),
1027
- /* @__PURE__ */ N("span", { className: C(`${S}-content`), children: [
1028
- /* @__PURE__ */ N("span", { className: C(`${S}-top-container`), children: [
1029
- typeof e == "string" ? /* @__PURE__ */ f(
1030
- X,
1032
+ p && /* @__PURE__ */ l("span", { className: S(`${I}-image-container`), children: tt(p) ? /* @__PURE__ */ l(nt, { ...p, "data-testid": a && `${a}-image` }) : H(p, _) }),
1033
+ /* @__PURE__ */ A("span", { className: S(`${I}-content`), children: [
1034
+ /* @__PURE__ */ A("span", { className: S(`${I}-top-container`), children: [
1035
+ typeof e == "string" ? /* @__PURE__ */ l(
1036
+ Z,
1031
1037
  {
1032
- className: C(`${S}-title`),
1033
- "data-testid": o && `${o}-title`,
1038
+ className: S(`${I}-title`),
1039
+ "data-testid": a && `${a}-title`,
1034
1040
  variant: "paragraph-100",
1035
1041
  disabled: i,
1036
1042
  children: e
1037
1043
  }
1038
- ) : q(e, m),
1039
- /* @__PURE__ */ f("span", { className: C(`${S}-radio`), children: /* @__PURE__ */ f(kr, { className: C(`${S}-indicator`) }) })
1044
+ ) : H(e, _),
1045
+ /* @__PURE__ */ l("span", { className: S(`${I}-radio`), children: /* @__PURE__ */ l(kr, { className: S(`${I}-indicator`) }) })
1040
1046
  ] }),
1041
- a && /* @__PURE__ */ f("span", { className: C(`${S}-bottom-container`), children: typeof a == "string" ? /* @__PURE__ */ f(
1042
- X,
1047
+ o && /* @__PURE__ */ l("span", { className: S(`${I}-bottom-container`), children: typeof o == "string" ? /* @__PURE__ */ l(
1048
+ Z,
1043
1049
  {
1044
- "data-testid": o && `${o}-body`,
1050
+ "data-testid": a && `${a}-body`,
1045
1051
  variant: "paragraph-100",
1046
1052
  disabled: i,
1047
- children: a
1053
+ children: o
1048
1054
  }
1049
- ) : q(a, m) })
1055
+ ) : H(o, _) })
1050
1056
  ] })
1051
1057
  ]
1052
1058
  }
@@ -1055,61 +1061,61 @@ const D = "purpur-radio-card-group__item-image", tt = (e) => !!(e != null && e.s
1055
1061
  ] });
1056
1062
  }
1057
1063
  );
1058
- ee.displayName = "RadioCardItem";
1059
- const ot = (e) => Ve(e) && (e == null ? void 0 : e.type) === ee, dt = ["horizontal", "vertical"], lt = ["right", "left"], G = "purpur-radio-card-group", at = fe(
1064
+ re.displayName = "RadioCardItem";
1065
+ const ot = (e) => je(e) && (e == null ? void 0 : e.type) === re, pt = ["horizontal", "vertical"], dt = ["right", "left"], z = "purpur-radio-card-group", at = le(
1060
1066
  ({
1061
1067
  "data-testid": e,
1062
1068
  "aria-labelledby": t,
1063
1069
  children: n,
1064
- className: o,
1065
- items: a,
1070
+ className: a,
1071
+ items: o,
1066
1072
  heading: r,
1067
1073
  headingTag: i = "h2",
1068
1074
  loop: u = !0,
1069
- orientation: c = "vertical",
1070
- radioPosition: p = "right",
1071
- ...m
1072
- }, _) => {
1075
+ orientation: p = "vertical",
1076
+ radioPosition: c = "right",
1077
+ ..._
1078
+ }, f) => {
1073
1079
  const g = ne.toArray(n).filter(ot);
1074
- return /* @__PURE__ */ N("div", { className: C(o, `${G}__container`), ref: _, children: [
1075
- r && /* @__PURE__ */ N(
1076
- _e,
1080
+ return /* @__PURE__ */ A("div", { className: S(a, `${z}__container`), ref: f, children: [
1081
+ r && /* @__PURE__ */ A(
1082
+ fe,
1077
1083
  {
1078
1084
  "data-testid": e ? `${e}-heading` : void 0,
1079
- id: `${m.id}-heading`,
1085
+ id: `${_.id}-heading`,
1080
1086
  tag: i,
1081
1087
  variant: "subsection-100",
1082
1088
  children: [
1083
- m.required && /* @__PURE__ */ f("span", { "aria-hidden": !0, children: "* " }),
1089
+ _.required && /* @__PURE__ */ l("span", { "aria-hidden": !0, children: "* " }),
1084
1090
  r
1085
1091
  ]
1086
1092
  }
1087
1093
  ),
1088
- (!!(a != null && a.length) || g.length) && /* @__PURE__ */ N(
1094
+ (!!(o != null && o.length) || g.length) && /* @__PURE__ */ A(
1089
1095
  Mr,
1090
1096
  {
1091
- ...m,
1092
- "aria-labelledby": t || (r ? `${m.id}-heading` : void 0),
1093
- className: C(
1094
- G,
1095
- `${G}--${c}`,
1096
- `${G}--radio-${p}`
1097
+ ..._,
1098
+ "aria-labelledby": t || (r ? `${_.id}-heading` : void 0),
1099
+ className: S(
1100
+ z,
1101
+ `${z}--${p}`,
1102
+ `${z}--radio-${c}`
1097
1103
  ),
1098
1104
  "data-testid": e,
1099
1105
  loop: u,
1100
1106
  children: [
1101
- a == null ? void 0 : a.map((d) => /* @__PURE__ */ f(
1102
- ee,
1107
+ o == null ? void 0 : o.map((d) => /* @__PURE__ */ l(
1108
+ re,
1103
1109
  {
1104
1110
  ...d,
1105
- disabled: d.disabled || m.disabled,
1111
+ disabled: d.disabled || _.disabled,
1106
1112
  "data-testid": e ? `${e}-item` : void 0
1107
1113
  },
1108
1114
  d.id
1109
1115
  )),
1110
1116
  ne.map(
1111
1117
  g,
1112
- (d) => Ke(d, { disabled: d.props.disabled || m.disabled })
1118
+ (d) => Ve(d, { disabled: d.props.disabled || _.disabled })
1113
1119
  )
1114
1120
  ]
1115
1121
  }
@@ -1119,9 +1125,9 @@ const ot = (e) => Ve(e) && (e == null ? void 0 : e.type) === ee, dt = ["horizont
1119
1125
  );
1120
1126
  at.displayName = "RadioCardGroup";
1121
1127
  export {
1122
- dt as RADIO_CARD_GROUP_ORIENTATION,
1123
- lt as RADIO_POSITION,
1128
+ pt as RADIO_CARD_GROUP_ORIENTATION,
1129
+ dt as RADIO_POSITION,
1124
1130
  at as RadioCardGroup,
1125
- ee as RadioCardItem
1131
+ re as RadioCardItem
1126
1132
  };
1127
1133
  //# sourceMappingURL=radio-card-group.es.js.map