@purpurds/accordion 5.10.1 → 5.11.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 A, jsxs as X } from "react/jsx-runtime";
2
2
  import * as be from "react";
3
- import u, { createContext as ee, useMemo as V, createElement as y, useContext as $e, useCallback as H, forwardRef as I, Children as S, isValidElement as U, cloneElement as G, Fragment as Le, useRef as C, useEffect as k, useState as re, useLayoutEffect as qe, useReducer as Ve } from "react";
4
- import { flushSync as Ue } from "react-dom";
3
+ import u, { createContext as ee, useMemo as U, createElement as y, useContext as $e, useCallback as H, forwardRef as I, Children as S, isValidElement as V, cloneElement as G, Fragment as Le, useRef as C, useEffect as k, useState as re, useLayoutEffect as qe, useReducer as Ue } from "react";
4
+ import { flushSync as Ve } from "react-dom";
5
5
  function ze(e) {
6
6
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
7
7
  }
@@ -107,7 +107,7 @@ function oe(e, r = []) {
107
107
  a
108
108
  ];
109
109
  function l(p) {
110
- const { scope: _, children: f, ...b } = p, x = (_ == null ? void 0 : _[e][s]) || i, g = V(
110
+ const { scope: _, children: f, ...b } = p, x = (_ == null ? void 0 : _[e][s]) || i, g = U(
111
111
  () => b,
112
112
  Object.values(b)
113
113
  );
@@ -132,7 +132,7 @@ function oe(e, r = []) {
132
132
  const t = n.map((a) => /* @__PURE__ */ ee(a));
133
133
  return function(i) {
134
134
  const s = (i == null ? void 0 : i[e]) || t;
135
- return V(
135
+ return U(
136
136
  () => ({
137
137
  [`__scope${e}`]: {
138
138
  ...i,
@@ -170,7 +170,7 @@ function Fe(...e) {
170
170
  ...p
171
171
  };
172
172
  }, {});
173
- return V(
173
+ return U(
174
174
  () => ({
175
175
  [`__scope${r.scopeName}`]: a
176
176
  }),
@@ -196,10 +196,10 @@ function M(...e) {
196
196
  const z = /* @__PURE__ */ I((e, r) => {
197
197
  const { children: n, ...o } = e, c = S.toArray(n), t = c.find(We);
198
198
  if (t) {
199
- const a = t.props.children, i = c.map((s) => s === t ? S.count(a) > 1 ? S.only(null) : /* @__PURE__ */ U(a) ? a.props.children : null : s);
199
+ const a = t.props.children, i = c.map((s) => s === t ? S.count(a) > 1 ? S.only(null) : /* @__PURE__ */ V(a) ? a.props.children : null : s);
200
200
  return /* @__PURE__ */ y(te, h({}, o, {
201
201
  ref: r
202
- }), /* @__PURE__ */ U(a) ? /* @__PURE__ */ G(a, void 0, i) : null);
202
+ }), /* @__PURE__ */ V(a) ? /* @__PURE__ */ G(a, void 0, i) : null);
203
203
  }
204
204
  return /* @__PURE__ */ y(te, h({}, o, {
205
205
  ref: r
@@ -208,7 +208,7 @@ const z = /* @__PURE__ */ I((e, r) => {
208
208
  z.displayName = "Slot";
209
209
  const te = /* @__PURE__ */ I((e, r) => {
210
210
  const { children: n, ...o } = e;
211
- return /* @__PURE__ */ U(n) ? /* @__PURE__ */ G(n, {
211
+ return /* @__PURE__ */ V(n) ? /* @__PURE__ */ G(n, {
212
212
  ...Ye(o, n.props),
213
213
  ref: r ? he(r, n.ref) : n.ref
214
214
  }) : S.count(n) > 1 ? S.only(null) : null;
@@ -216,7 +216,7 @@ const te = /* @__PURE__ */ I((e, r) => {
216
216
  te.displayName = "SlotClone";
217
217
  const Ze = ({ children: e }) => /* @__PURE__ */ y(Le, null, e);
218
218
  function We(e) {
219
- return /* @__PURE__ */ U(e) && e.type === Ze;
219
+ return /* @__PURE__ */ V(e) && e.type === Ze;
220
220
  }
221
221
  function Ye(e, r) {
222
222
  const n = {
@@ -302,7 +302,7 @@ function ve(e) {
302
302
  const r = C(e);
303
303
  return k(() => {
304
304
  r.current = e;
305
- }), V(
305
+ }), U(
306
306
  () => (...n) => {
307
307
  var o;
308
308
  return (o = r.current) === null || o === void 0 ? void 0 : o.call(r, ...n);
@@ -375,7 +375,7 @@ const Xe = [
375
375
  }, {}), B = globalThis != null && globalThis.document ? qe : () => {
376
376
  };
377
377
  function et(e, r) {
378
- return Ve((n, o) => {
378
+ return Ue((n, o) => {
379
379
  const c = r[n][o];
380
380
  return c ?? n;
381
381
  }, e);
@@ -421,7 +421,7 @@ function tt(e) {
421
421
  if (r) {
422
422
  const l = (p) => {
423
423
  const f = q(o.current).includes(p.animationName);
424
- p.target === r && f && Ue(
424
+ p.target === r && f && Ve(
425
425
  () => s("ANIMATION_END")
426
426
  );
427
427
  }, d = (p) => {
@@ -843,8 +843,8 @@ var Te = { exports: {} };
843
843
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
844
844
  })();
845
845
  })(Te);
846
- var Vt = Te.exports;
847
- const Ut = /* @__PURE__ */ qt(Vt), zt = {
846
+ var Ut = Te.exports;
847
+ const Vt = /* @__PURE__ */ qt(Ut), zt = {
848
848
  "purpur-icon": "_purpur-icon_8u1lq_1",
849
849
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
850
850
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -865,7 +865,7 @@ const Ut = /* @__PURE__ */ qt(Vt), zt = {
865
865
  }
866
866
  );
867
867
  Me.displayName = "IconChevronDown";
868
- const Ht = Ut.bind(zt), de = "purpur-icon", Gt = "md", Ft = (e) => e.filter((r) => Object.keys(r).length >= 1).map((r) => `${r.name}="${r.value}"`).join(" "), Kt = ({ content: e = "", title: r } = {}) => {
868
+ const Ht = Vt.bind(zt), de = "purpur-icon", Gt = "md", Ft = (e) => e.filter((r) => Object.keys(r).length >= 1).map((r) => `${r.name}="${r.value}"`).join(" "), Kt = ({ content: e = "", title: r } = {}) => {
869
869
  const n = [
870
870
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
871
871
  { name: "fill", value: "currentColor" },