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