@purpurds/accordion 5.2.0 → 5.3.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.
@@ -20,6 +20,7 @@ export type AccordionProps = {
20
20
  };
21
21
  export declare const Accordion: {
22
22
  ({ ["data-testid"]: dataTestId, children, className, negative, title, titleVariant, }: AccordionProps): React.JSX.Element;
23
+ Item: ({ children, className, title, negative, ...props }: import('./accordion-item').AccordionItemProps) => React.JSX.Element;
23
24
  displayName: string;
24
25
  };
25
26
  //# sourceMappingURL=accordion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../src/accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA0B,SAAS,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAW,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAW9D,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;SAEK;IACL,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;SAEK;IACL,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;SAEK;IACL,YAAY,CAAC,EAAE,gBAAgB,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,SAAS;2FAOnB,cAAc;;CA2BhB,CAAC"}
1
+ {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../src/accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA0B,SAAS,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAW,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAW9D,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;SAEK;IACL,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;SAEK;IACL,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;SAEK;IACL,YAAY,CAAC,EAAE,gBAAgB,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,SAAS;2FAOnB,cAAc;;;CA2BhB,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { jsx as A, jsxs as X } from "react/jsx-runtime";
2
2
  import * as be from "react";
3
- import u, { createContext as ee, useMemo as U, createElement as y, useContext as $e, useCallback as G, forwardRef as S, Children as w, isValidElement as M, cloneElement as F, Fragment as Le, useRef as C, useEffect as D, useState as re, useLayoutEffect as je, useReducer as qe } from "react";
4
- import { flushSync as Ve } from "react-dom";
5
- function Ue(e) {
3
+ import u, { createContext as ee, useMemo as U, createElement as y, useContext as $e, useCallback as G, forwardRef as S, Children as w, isValidElement as M, cloneElement as F, Fragment as qe, useRef as C, useEffect as D, useState as re, useLayoutEffect as Ve, useReducer as Ue } from "react";
4
+ import { flushSync as Be } from "react-dom";
5
+ function He(e) {
6
6
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
7
7
  }
8
8
  var _e = { exports: {} };
@@ -41,8 +41,8 @@ var _e = { exports: {} };
41
41
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
42
42
  })();
43
43
  })(_e);
44
- var Be = _e.exports;
45
- const He = /* @__PURE__ */ Ue(Be), j = {
44
+ var Ge = _e.exports;
45
+ const Fe = /* @__PURE__ */ He(Ge), j = {
46
46
  "purpur-heading": "_purpur-heading_k9fhq_1",
47
47
  "purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
48
48
  "purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
@@ -58,7 +58,7 @@ const He = /* @__PURE__ */ Ue(Be), j = {
58
58
  "purpur-heading--display-50": "_purpur-heading--display-50_k9fhq_68",
59
59
  "purpur-heading--display-100": "_purpur-heading--display-100_k9fhq_74",
60
60
  "purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
61
- }, Ge = {
61
+ }, ze = {
62
62
  TITLE100: "title-100",
63
63
  TITLE200: "title-200",
64
64
  TITLE300: "title-300",
@@ -74,10 +74,10 @@ const He = /* @__PURE__ */ Ue(Be), j = {
74
74
  enableHyphenation: o = !1,
75
75
  negative: c = !1,
76
76
  tag: t,
77
- variant: a = Ge.TITLE100,
77
+ variant: a = ze.TITLE100,
78
78
  ...i
79
79
  }) => {
80
- const s = t, l = He([
80
+ const s = t, l = Fe([
81
81
  n,
82
82
  j[q],
83
83
  j[`${q}--${a}`],
@@ -148,10 +148,10 @@ function oe(e, r = []) {
148
148
  };
149
149
  return c.scopeName = e, [
150
150
  o,
151
- Fe(c, ...r)
151
+ Ke(c, ...r)
152
152
  ];
153
153
  }
154
- function Fe(...e) {
154
+ function Ke(...e) {
155
155
  const r = e[0];
156
156
  if (e.length === 1)
157
157
  return r;
@@ -182,19 +182,19 @@ function Fe(...e) {
182
182
  };
183
183
  return n.scopeName = r.scopeName, n;
184
184
  }
185
- function ze(e, r) {
185
+ function Ze(e, r) {
186
186
  typeof e == "function" ? e(r) : e != null && (e.current = r);
187
187
  }
188
188
  function he(...e) {
189
189
  return (r) => e.forEach(
190
- (n) => ze(n, r)
190
+ (n) => Ze(n, r)
191
191
  );
192
192
  }
193
193
  function k(...e) {
194
194
  return G(he(...e), e);
195
195
  }
196
196
  const B = /* @__PURE__ */ S((e, r) => {
197
- const { children: n, ...o } = e, c = w.toArray(n), t = c.find(Ze);
197
+ const { children: n, ...o } = e, c = w.toArray(n), t = c.find(Je);
198
198
  if (t) {
199
199
  const a = t.props.children, i = c.map((s) => s === t ? w.count(a) > 1 ? w.only(null) : /* @__PURE__ */ M(a) ? a.props.children : null : s);
200
200
  return /* @__PURE__ */ y(te, h({}, o, {
@@ -209,16 +209,16 @@ B.displayName = "Slot";
209
209
  const te = /* @__PURE__ */ S((e, r) => {
210
210
  const { children: n, ...o } = e;
211
211
  return /* @__PURE__ */ M(n) ? /* @__PURE__ */ F(n, {
212
- ...Ye(o, n.props),
212
+ ...Qe(o, n.props),
213
213
  ref: r ? he(r, n.ref) : n.ref
214
214
  }) : w.count(n) > 1 ? w.only(null) : null;
215
215
  });
216
216
  te.displayName = "SlotClone";
217
- const Ke = ({ children: e }) => /* @__PURE__ */ y(Le, null, e);
218
- function Ze(e) {
219
- return /* @__PURE__ */ M(e) && e.type === Ke;
217
+ const Ye = ({ children: e }) => /* @__PURE__ */ y(qe, null, e);
218
+ function Je(e) {
219
+ return /* @__PURE__ */ M(e) && e.type === Ye;
220
220
  }
221
- function Ye(e, r) {
221
+ function Qe(e, r) {
222
222
  const n = {
223
223
  ...r
224
224
  };
@@ -239,7 +239,7 @@ function Ye(e, r) {
239
239
  ...n
240
240
  };
241
241
  }
242
- function Je(e) {
242
+ function We(e) {
243
243
  const r = e + "CollectionProvider", [n, o] = oe(r), [c, t] = n(r, {
244
244
  collectionRef: {
245
245
  current: null
@@ -312,7 +312,7 @@ function ve(e) {
312
312
  }
313
313
  function ae({ prop: e, defaultProp: r, onChange: n = () => {
314
314
  } }) {
315
- const [o, c] = Qe({
315
+ const [o, c] = Xe({
316
316
  defaultProp: r,
317
317
  onChange: n
318
318
  }), t = e !== void 0, a = t ? e : o, i = ve(n), s = G((l) => {
@@ -332,7 +332,7 @@ function ae({ prop: e, defaultProp: r, onChange: n = () => {
332
332
  s
333
333
  ];
334
334
  }
335
- function Qe({ defaultProp: e, onChange: r }) {
335
+ function Xe({ defaultProp: e, onChange: r }) {
336
336
  const n = re(e), [o] = n, c = C(o), t = ve(r);
337
337
  return D(() => {
338
338
  c.current !== o && (t(o), c.current = o);
@@ -342,7 +342,7 @@ function Qe({ defaultProp: e, onChange: r }) {
342
342
  t
343
343
  ]), n;
344
344
  }
345
- const We = [
345
+ const et = [
346
346
  "a",
347
347
  "button",
348
348
  "div",
@@ -359,7 +359,7 @@ const We = [
359
359
  "span",
360
360
  "svg",
361
361
  "ul"
362
- ], L = We.reduce((e, r) => {
362
+ ], L = et.reduce((e, r) => {
363
363
  const n = /* @__PURE__ */ S((o, c) => {
364
364
  const { asChild: t, ...a } = o, i = t ? B : r;
365
365
  return D(() => {
@@ -372,16 +372,16 @@ const We = [
372
372
  ...e,
373
373
  [r]: n
374
374
  };
375
- }, {}), H = globalThis != null && globalThis.document ? je : () => {
375
+ }, {}), H = globalThis != null && globalThis.document ? Ve : () => {
376
376
  };
377
- function Xe(e, r) {
378
- return qe((n, o) => {
377
+ function tt(e, r) {
378
+ return Ue((n, o) => {
379
379
  const c = r[n][o];
380
380
  return c ?? n;
381
381
  }, e);
382
382
  }
383
383
  const xe = (e) => {
384
- const { present: r, children: n } = e, o = et(r), c = typeof n == "function" ? n({
384
+ const { present: r, children: n } = e, o = nt(r), c = typeof n == "function" ? n({
385
385
  present: o.isPresent
386
386
  }) : w.only(n), t = k(o.ref, c.ref);
387
387
  return typeof n == "function" || o.isPresent ? /* @__PURE__ */ F(c, {
@@ -389,8 +389,8 @@ const xe = (e) => {
389
389
  }) : null;
390
390
  };
391
391
  xe.displayName = "Presence";
392
- function et(e) {
393
- const [r, n] = re(), o = C({}), c = C(e), t = C("none"), a = e ? "mounted" : "unmounted", [i, s] = Xe(a, {
392
+ function nt(e) {
393
+ const [r, n] = re(), o = C({}), c = C(e), t = C("none"), a = e ? "mounted" : "unmounted", [i, s] = tt(a, {
394
394
  mounted: {
395
395
  UNMOUNT: "unmounted",
396
396
  ANIMATION_OUT: "unmountSuspended"
@@ -421,7 +421,7 @@ function et(e) {
421
421
  if (r) {
422
422
  const l = (p) => {
423
423
  const f = V(o.current).includes(p.animationName);
424
- p.target === r && f && Ve(
424
+ p.target === r && f && Be(
425
425
  () => s("ANIMATION_END")
426
426
  );
427
427
  }, d = (p) => {
@@ -448,26 +448,26 @@ function et(e) {
448
448
  function V(e) {
449
449
  return (e == null ? void 0 : e.animationName) || "none";
450
450
  }
451
- const tt = be.useId || (() => {
451
+ const rt = be.useId || (() => {
452
452
  });
453
- let nt = 0;
453
+ let ot = 0;
454
454
  function Ae(e) {
455
- const [r, n] = be.useState(tt());
455
+ const [r, n] = be.useState(rt());
456
456
  return H(() => {
457
457
  n(
458
- (o) => o ?? String(nt++)
458
+ (o) => o ?? String(ot++)
459
459
  );
460
460
  }, [
461
461
  e
462
462
  ]), r ? `radix-${r}` : "";
463
463
  }
464
- const ye = "Collapsible", [rt, Ce] = oe(ye), [ot, ce] = rt(ye), at = /* @__PURE__ */ S((e, r) => {
464
+ const ye = "Collapsible", [at, Ce] = oe(ye), [ct, ce] = at(ye), it = /* @__PURE__ */ S((e, r) => {
465
465
  const { __scopeCollapsible: n, open: o, defaultOpen: c, disabled: t, onOpenChange: a, ...i } = e, [s = !1, l] = ae({
466
466
  prop: o,
467
467
  defaultProp: c,
468
468
  onChange: a
469
469
  });
470
- return /* @__PURE__ */ y(ot, {
470
+ return /* @__PURE__ */ y(ct, {
471
471
  scope: n,
472
472
  disabled: t,
473
473
  contentId: Ae(),
@@ -486,8 +486,8 @@ const ye = "Collapsible", [rt, Ce] = oe(ye), [ot, ce] = rt(ye), at = /* @__PURE_
486
486
  }, i, {
487
487
  ref: r
488
488
  })));
489
- }), ct = "CollapsibleTrigger", it = /* @__PURE__ */ S((e, r) => {
490
- const { __scopeCollapsible: n, ...o } = e, c = ce(ct, n);
489
+ }), st = "CollapsibleTrigger", lt = /* @__PURE__ */ S((e, r) => {
490
+ const { __scopeCollapsible: n, ...o } = e, c = ce(st, n);
491
491
  return /* @__PURE__ */ y(L.button, h({
492
492
  type: "button",
493
493
  "aria-controls": c.contentId,
@@ -499,19 +499,19 @@ const ye = "Collapsible", [rt, Ce] = oe(ye), [ot, ce] = rt(ye), at = /* @__PURE_
499
499
  ref: r,
500
500
  onClick: ge(e.onClick, c.onOpenToggle)
501
501
  }));
502
- }), Ne = "CollapsibleContent", st = /* @__PURE__ */ S((e, r) => {
502
+ }), Ne = "CollapsibleContent", ut = /* @__PURE__ */ S((e, r) => {
503
503
  const { forceMount: n, ...o } = e, c = ce(Ne, e.__scopeCollapsible);
504
504
  return /* @__PURE__ */ y(
505
505
  xe,
506
506
  {
507
507
  present: n || c.open
508
508
  },
509
- ({ present: t }) => /* @__PURE__ */ y(lt, h({}, o, {
509
+ ({ present: t }) => /* @__PURE__ */ y(pt, h({}, o, {
510
510
  ref: r,
511
511
  present: t
512
512
  }))
513
513
  );
514
- }), lt = /* @__PURE__ */ S((e, r) => {
514
+ }), pt = /* @__PURE__ */ S((e, r) => {
515
515
  const { __scopeCollapsible: n, present: o, children: c, ...t } = e, a = ce(Ne, n), [i, s] = re(o), l = C(null), d = k(r, l), p = C(0), _ = p.current, f = C(0), b = f.current, x = a.open || i, g = C(x), m = C();
516
516
  return D(() => {
517
517
  const $ = requestAnimationFrame(
@@ -548,28 +548,28 @@ const ye = "Collapsible", [rt, Ce] = oe(ye), [ot, ce] = rt(ye), at = /* @__PURE_
548
548
  function ie(e) {
549
549
  return e ? "open" : "closed";
550
550
  }
551
- const ut = at, pt = it, dt = st, ft = /* @__PURE__ */ ee(void 0);
552
- function bt(e) {
553
- const r = $e(ft);
551
+ const dt = it, ft = lt, bt = ut, $t = /* @__PURE__ */ ee(void 0);
552
+ function _t(e) {
553
+ const r = $e($t);
554
554
  return e || r || "ltr";
555
555
  }
556
- const I = "Accordion", $t = [
556
+ const I = "Accordion", mt = [
557
557
  "Home",
558
558
  "End",
559
559
  "ArrowDown",
560
560
  "ArrowUp",
561
561
  "ArrowLeft",
562
562
  "ArrowRight"
563
- ], [se, _t, mt] = Je(I), [z, un] = oe(I, [
564
- mt,
563
+ ], [se, ht, gt] = We(I), [z, un] = oe(I, [
564
+ gt,
565
565
  Ce
566
566
  ]), le = Ce(), Ee = /* @__PURE__ */ u.forwardRef((e, r) => {
567
567
  const { type: n, ...o } = e, c = o, t = o;
568
568
  return /* @__PURE__ */ u.createElement(se.Provider, {
569
569
  scope: e.__scopeAccordion
570
- }, n === "multiple" ? /* @__PURE__ */ u.createElement(xt, h({}, t, {
570
+ }, n === "multiple" ? /* @__PURE__ */ u.createElement(yt, h({}, t, {
571
571
  ref: r
572
- })) : /* @__PURE__ */ u.createElement(vt, h({}, c, {
572
+ })) : /* @__PURE__ */ u.createElement(At, h({}, c, {
573
573
  ref: r
574
574
  })));
575
575
  });
@@ -582,9 +582,9 @@ Ee.propTypes = {
582
582
  ].includes(e.type) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`.") : e.type === "multiple" && typeof r == "string" ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`.") : e.type === "single" && Array.isArray(r) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`.") : null;
583
583
  }
584
584
  };
585
- const [Ie, ht] = z(I), [Pe, gt] = z(I, {
585
+ const [Ie, vt] = z(I), [Pe, xt] = z(I, {
586
586
  collapsible: !1
587
- }), vt = /* @__PURE__ */ u.forwardRef((e, r) => {
587
+ }), At = /* @__PURE__ */ u.forwardRef((e, r) => {
588
588
  const { value: n, defaultValue: o, onValueChange: c = () => {
589
589
  }, collapsible: t = !1, ...a } = e, [i, s] = ae({
590
590
  prop: n,
@@ -610,7 +610,7 @@ const [Ie, ht] = z(I), [Pe, gt] = z(I, {
610
610
  }, /* @__PURE__ */ u.createElement(we, h({}, a, {
611
611
  ref: r
612
612
  }))));
613
- }), xt = /* @__PURE__ */ u.forwardRef((e, r) => {
613
+ }), yt = /* @__PURE__ */ u.forwardRef((e, r) => {
614
614
  const { value: n, defaultValue: o, onValueChange: c = () => {
615
615
  }, ...t } = e, [a = [], i] = ae({
616
616
  prop: n,
@@ -647,10 +647,10 @@ const [Ie, ht] = z(I), [Pe, gt] = z(I, {
647
647
  }, /* @__PURE__ */ u.createElement(we, h({}, t, {
648
648
  ref: r
649
649
  }))));
650
- }), [At, K] = z(I), we = /* @__PURE__ */ u.forwardRef((e, r) => {
651
- const { __scopeAccordion: n, disabled: o, dir: c, orientation: t = "vertical", ...a } = e, i = u.useRef(null), s = k(i, r), l = _t(n), p = bt(c) === "ltr", _ = ge(e.onKeyDown, (f) => {
650
+ }), [Ct, K] = z(I), we = /* @__PURE__ */ u.forwardRef((e, r) => {
651
+ const { __scopeAccordion: n, disabled: o, dir: c, orientation: t = "vertical", ...a } = e, i = u.useRef(null), s = k(i, r), l = ht(n), p = _t(c) === "ltr", _ = ge(e.onKeyDown, (f) => {
652
652
  var b;
653
- if (!$t.includes(f.key))
653
+ if (!mt.includes(f.key))
654
654
  return;
655
655
  const x = f.target, g = l().filter((J) => {
656
656
  var Q;
@@ -687,10 +687,10 @@ const [Ie, ht] = z(I), [Pe, gt] = z(I, {
687
687
  t === "vertical" && Y();
688
688
  break;
689
689
  }
690
- const De = v % $;
691
- (b = g[De].ref.current) === null || b === void 0 || b.focus();
690
+ const je = v % $;
691
+ (b = g[je].ref.current) === null || b === void 0 || b.focus();
692
692
  });
693
- return /* @__PURE__ */ u.createElement(At, {
693
+ return /* @__PURE__ */ u.createElement(Ct, {
694
694
  scope: n,
695
695
  disabled: o,
696
696
  direction: c,
@@ -702,14 +702,14 @@ const [Ie, ht] = z(I), [Pe, gt] = z(I, {
702
702
  ref: s,
703
703
  onKeyDown: o ? void 0 : _
704
704
  }))));
705
- }), ne = "AccordionItem", [yt, ue] = z(ne), Ct = /* @__PURE__ */ u.forwardRef((e, r) => {
706
- const { __scopeAccordion: n, value: o, ...c } = e, t = K(ne, n), a = ht(ne, n), i = le(n), s = Ae(), l = o && a.value.includes(o) || !1, d = t.disabled || e.disabled;
707
- return /* @__PURE__ */ u.createElement(yt, {
705
+ }), ne = "AccordionItem", [Nt, ue] = z(ne), Et = /* @__PURE__ */ u.forwardRef((e, r) => {
706
+ const { __scopeAccordion: n, value: o, ...c } = e, t = K(ne, n), a = vt(ne, n), i = le(n), s = Ae(), l = o && a.value.includes(o) || !1, d = t.disabled || e.disabled;
707
+ return /* @__PURE__ */ u.createElement(Nt, {
708
708
  scope: n,
709
709
  open: l,
710
710
  disabled: d,
711
711
  triggerId: s
712
- }, /* @__PURE__ */ u.createElement(ut, h({
712
+ }, /* @__PURE__ */ u.createElement(dt, h({
713
713
  "data-orientation": t.orientation,
714
714
  "data-state": Se(l)
715
715
  }, i, c, {
@@ -720,8 +720,8 @@ const [Ie, ht] = z(I), [Pe, gt] = z(I, {
720
720
  p ? a.onItemOpen(o) : a.onItemClose(o);
721
721
  }
722
722
  })));
723
- }), Nt = "AccordionHeader", Et = /* @__PURE__ */ u.forwardRef((e, r) => {
724
- const { __scopeAccordion: n, ...o } = e, c = K(I, n), t = ue(Nt, n);
723
+ }), It = "AccordionHeader", Pt = /* @__PURE__ */ u.forwardRef((e, r) => {
724
+ const { __scopeAccordion: n, ...o } = e, c = K(I, n), t = ue(It, n);
725
725
  return /* @__PURE__ */ u.createElement(L.h3, h({
726
726
  "data-orientation": c.orientation,
727
727
  "data-state": Se(t.open),
@@ -729,20 +729,20 @@ const [Ie, ht] = z(I), [Pe, gt] = z(I, {
729
729
  }, o, {
730
730
  ref: r
731
731
  }));
732
- }), pe = "AccordionTrigger", It = /* @__PURE__ */ u.forwardRef((e, r) => {
733
- const { __scopeAccordion: n, ...o } = e, c = K(I, n), t = ue(pe, n), a = gt(pe, n), i = le(n);
732
+ }), pe = "AccordionTrigger", wt = /* @__PURE__ */ u.forwardRef((e, r) => {
733
+ const { __scopeAccordion: n, ...o } = e, c = K(I, n), t = ue(pe, n), a = xt(pe, n), i = le(n);
734
734
  return /* @__PURE__ */ u.createElement(se.ItemSlot, {
735
735
  scope: n
736
- }, /* @__PURE__ */ u.createElement(pt, h({
736
+ }, /* @__PURE__ */ u.createElement(ft, h({
737
737
  "aria-disabled": t.open && !a.collapsible || void 0,
738
738
  "data-orientation": c.orientation,
739
739
  id: t.triggerId
740
740
  }, i, o, {
741
741
  ref: r
742
742
  })));
743
- }), Pt = "AccordionContent", wt = /* @__PURE__ */ u.forwardRef((e, r) => {
744
- const { __scopeAccordion: n, ...o } = e, c = K(I, n), t = ue(Pt, n), a = le(n);
745
- return /* @__PURE__ */ u.createElement(dt, h({
743
+ }), St = "AccordionContent", Ot = /* @__PURE__ */ u.forwardRef((e, r) => {
744
+ const { __scopeAccordion: n, ...o } = e, c = K(I, n), t = ue(St, n), a = le(n);
745
+ return /* @__PURE__ */ u.createElement(bt, h({
746
746
  role: "region",
747
747
  "aria-labelledby": t.triggerId,
748
748
  "data-orientation": c.orientation
@@ -758,8 +758,8 @@ const [Ie, ht] = z(I), [Pe, gt] = z(I, {
758
758
  function Se(e) {
759
759
  return e ? "open" : "closed";
760
760
  }
761
- const St = Ee, Ot = Ct, Rt = Et, Tt = It, Mt = wt;
762
- function kt(e) {
761
+ const Rt = Ee, Tt = Et, Mt = Pt, kt = wt, Dt = Ot;
762
+ function Lt(e) {
763
763
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
764
764
  }
765
765
  var Oe = { exports: {} };
@@ -798,12 +798,12 @@ var Oe = { exports: {} };
798
798
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
799
799
  })();
800
800
  })(Oe);
801
- var Dt = Oe.exports;
802
- const Re = /* @__PURE__ */ kt(Dt), Lt = {
801
+ var jt = Oe.exports;
802
+ const Re = /* @__PURE__ */ Lt(jt), qt = {
803
803
  "purpur-accordion__title": "_purpur-accordion__title_1ower_1",
804
804
  "purpur-accordion--negative": "_purpur-accordion--negative_1ower_10"
805
805
  };
806
- function jt(e) {
806
+ function Vt(e) {
807
807
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
808
808
  }
809
809
  var Te = { exports: {} };
@@ -842,8 +842,8 @@ var Te = { exports: {} };
842
842
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
843
843
  })();
844
844
  })(Te);
845
- var qt = Te.exports;
846
- const Vt = /* @__PURE__ */ jt(qt), Ut = {
845
+ var Ut = Te.exports;
846
+ const Bt = /* @__PURE__ */ Vt(Ut), Ht = {
847
847
  "purpur-icon": "_purpur-icon_8u1lq_1",
848
848
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
849
849
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -851,39 +851,39 @@ const Vt = /* @__PURE__ */ jt(qt), Ut = {
851
851
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
852
852
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
853
853
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
854
- }, Bt = {
854
+ }, Gt = {
855
855
  name: "chevron-down",
856
856
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M20.136 7.864a.9.9 0 0 0-1.272 0L12 14.727 5.136 7.864a.9.9 0 0 0-1.272 1.272l7.5 7.5a.9.9 0 0 0 1.272 0l7.5-7.5a.9.9 0 0 0 0-1.272Z" clip-rule="evenodd"/></svg>',
857
857
  keywords: ["chevron-down"],
858
858
  category: "utility"
859
859
  }, Me = (e) => /* @__PURE__ */ A(
860
- Zt,
860
+ Jt,
861
861
  {
862
862
  ...e,
863
- svg: Bt
863
+ svg: Gt
864
864
  }
865
865
  );
866
866
  Me.displayName = "IconChevronDown";
867
- const Ht = Vt.bind(Ut), de = "purpur-icon", Gt = "md", Ft = (e) => e.filter((r) => Object.keys(r).length >= 1).map((r) => `${r.name}="${r.value}"`).join(" "), zt = ({ content: e = "", title: r } = {}) => {
867
+ const Ft = Bt.bind(Ht), de = "purpur-icon", zt = "md", Kt = (e) => e.filter((r) => Object.keys(r).length >= 1).map((r) => `${r.name}="${r.value}"`).join(" "), Zt = ({ content: e = "", title: r } = {}) => {
868
868
  const n = [
869
869
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
870
870
  { name: "fill", value: "currentColor" },
871
871
  { name: "viewBox", value: "0 0 24 24" },
872
872
  r ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
873
873
  ], o = r ? `<title>${r}</title>` : "";
874
- return `<svg ${Ft(n)}>${o}${e}</svg>`;
875
- }, Kt = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Zt = ({
874
+ return `<svg ${Kt(n)}>${o}${e}</svg>`;
875
+ }, Yt = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Jt = ({
876
876
  ["data-testid"]: e,
877
877
  svg: r,
878
878
  allyTitle: n,
879
879
  className: o = "",
880
- size: c = Gt,
880
+ size: c = zt,
881
881
  ...t
882
882
  }) => {
883
- const a = zt({
884
- content: Kt(r.svg),
883
+ const a = Zt({
884
+ content: Yt(r.svg),
885
885
  title: n
886
- }), i = Ht(o, de, `${de}--${c}`);
886
+ }), i = Ft(o, de, `${de}--${c}`);
887
887
  return /* @__PURE__ */ A(
888
888
  "span",
889
889
  {
@@ -895,7 +895,7 @@ const Ht = Vt.bind(Ut), de = "purpur-icon", Gt = "md", Ft = (e) => e.filter((r)
895
895
  }
896
896
  );
897
897
  };
898
- function Yt(e) {
898
+ function Qt(e) {
899
899
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
900
900
  }
901
901
  var ke = { exports: {} };
@@ -934,8 +934,8 @@ var ke = { exports: {} };
934
934
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
935
935
  })();
936
936
  })(ke);
937
- var Jt = ke.exports;
938
- const Qt = /* @__PURE__ */ Yt(Jt), R = {
937
+ var Wt = ke.exports;
938
+ const Xt = /* @__PURE__ */ Qt(Wt), R = {
939
939
  "purpur-paragraph": "_purpur-paragraph_1rh57_1",
940
940
  "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
941
941
  "purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
@@ -950,7 +950,7 @@ const Qt = /* @__PURE__ */ Yt(Jt), R = {
950
950
  "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
951
951
  "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
952
952
  "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
953
- }, Wt = {
953
+ }, en = {
954
954
  PARAGRAPH100: "paragraph-100",
955
955
  PARAGRAPH100MEDIUM: "paragraph-100-medium",
956
956
  PARAGRAPH100BOLD: "paragraph-100-bold",
@@ -961,17 +961,17 @@ const Qt = /* @__PURE__ */ Yt(Jt), R = {
961
961
  ADDITIONAL100MEDIUM: "additional-100-medium",
962
962
  OVERLINE100: "overline-100",
963
963
  OVERLINE200: "overline-200"
964
- }, T = "purpur-paragraph", Xt = ({
964
+ }, T = "purpur-paragraph", tn = ({
965
965
  ["data-testid"]: e,
966
966
  children: r,
967
967
  className: n = "",
968
968
  disabled: o,
969
969
  enableHyphenation: c = !1,
970
970
  negative: t = !1,
971
- variant: a = Wt.PARAGRAPH100,
971
+ variant: a = en.PARAGRAPH100,
972
972
  ...i
973
973
  }) => {
974
- const s = Qt([
974
+ const s = Xt([
975
975
  n,
976
976
  R[T],
977
977
  R[`${T}--${a}`],
@@ -982,18 +982,18 @@ const Qt = /* @__PURE__ */ Yt(Jt), R = {
982
982
  }
983
983
  ]);
984
984
  return /* @__PURE__ */ A("p", { ...i, className: s, "data-testid": e, children: r });
985
- }, en = "_slideDown_8k8nf_1", tn = "_slideUp_8k8nf_1", nn = {
985
+ }, nn = "_slideDown_8k8nf_1", rn = "_slideUp_8k8nf_1", on = {
986
986
  "purpur-accordion-item": "_purpur-accordion-item_8k8nf_1",
987
987
  "purpur-accordion-item__header": "_purpur-accordion-item__header_8k8nf_8",
988
988
  "purpur-accordion-item__trigger": "_purpur-accordion-item__trigger_8k8nf_11",
989
989
  "purpur-accordion-item__content": "_purpur-accordion-item__content_8k8nf_35",
990
- slideDown: en,
991
- slideUp: tn,
990
+ slideDown: nn,
991
+ slideUp: rn,
992
992
  "purpur-accordion-item__contentText": "_purpur-accordion-item__contentText_8k8nf_44",
993
993
  "purpur-accordion-item__icon": "_purpur-accordion-item__icon_8k8nf_48",
994
994
  "purpur-accordion-item__title": "_purpur-accordion-item__title_8k8nf_60",
995
995
  "purpur-accordion-item--negative": "_purpur-accordion-item--negative_8k8nf_78"
996
- }, P = Re.bind(nn), E = "purpur-accordion-item", rn = ({
996
+ }, P = Re.bind(on), E = "purpur-accordion-item", De = ({
997
997
  children: e,
998
998
  className: r,
999
999
  title: n,
@@ -1007,14 +1007,14 @@ const Qt = /* @__PURE__ */ Yt(Jt), R = {
1007
1007
  [`${E}--negative`]: o
1008
1008
  }
1009
1009
  ]);
1010
- return /* @__PURE__ */ X(Ot, { className: t, value: n, ...c, children: [
1011
- /* @__PURE__ */ A(Rt, { className: P(`${E}__header`), asChild: !0, children: /* @__PURE__ */ X(Tt, { className: P(`${E}__trigger`, r), children: [
1010
+ return /* @__PURE__ */ X(Tt, { className: t, value: n, ...c, children: [
1011
+ /* @__PURE__ */ A(Mt, { className: P(`${E}__header`), asChild: !0, children: /* @__PURE__ */ X(kt, { className: P(`${E}__trigger`, r), children: [
1012
1012
  /* @__PURE__ */ A(me, { tag: "h3", variant: "title-100", className: P(`${E}__title`), children: n }),
1013
1013
  /* @__PURE__ */ A(Me, { size: "md", className: P(`${E}__icon`), "aria-hidden": !0 })
1014
1014
  ] }) }),
1015
- /* @__PURE__ */ A(Mt, { className: P(`${E}__content`, r), children: /* @__PURE__ */ A("div", { className: P(`${E}__contentText`), children: typeof e == "string" ? /* @__PURE__ */ A(Xt, { variant: "paragraph-200", children: e }) : e }) })
1015
+ /* @__PURE__ */ A(Dt, { className: P(`${E}__content`, r), children: /* @__PURE__ */ A("div", { className: P(`${E}__contentText`), children: typeof e == "string" ? /* @__PURE__ */ A(tn, { variant: "paragraph-200", children: e }) : e }) })
1016
1016
  ] });
1017
- }, on = (e) => M(e) && (e == null ? void 0 : e.type) === rn, fe = Re.bind(Lt), W = "purpur-accordion", an = ({
1017
+ }, an = (e) => M(e) && (e == null ? void 0 : e.type) === De, fe = Re.bind(qt), W = "purpur-accordion", Le = ({
1018
1018
  ["data-testid"]: e,
1019
1019
  children: r,
1020
1020
  className: n,
@@ -1028,14 +1028,15 @@ const Qt = /* @__PURE__ */ Yt(Jt), R = {
1028
1028
  {
1029
1029
  [`${W}--negative`]: o
1030
1030
  }
1031
- ]), i = () => w.map(r, (s) => on(s) ? F(s, { negative: o }) : null);
1032
- return /* @__PURE__ */ X(St, { className: a, type: "multiple", "data-testid": e, children: [
1031
+ ]), i = () => w.map(r, (s) => an(s) ? F(s, { negative: o }) : null);
1032
+ return /* @__PURE__ */ X(Rt, { className: a, type: "multiple", "data-testid": e, children: [
1033
1033
  c ? /* @__PURE__ */ A(me, { tag: "h2", variant: t, className: fe(`${W}__title`), children: c }) : null,
1034
1034
  i()
1035
1035
  ] });
1036
1036
  };
1037
- an.displayName = "Accordion";
1037
+ Le.Item = De;
1038
+ Le.displayName = "Accordion";
1038
1039
  export {
1039
- an as Accordion
1040
+ Le as Accordion
1040
1041
  };
1041
1042
  //# sourceMappingURL=accordion.es.js.map