@purpurds/modal 3.1.0 → 3.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.
package/dist/modal.es.js CHANGED
@@ -1,7 +1,7 @@
1
- import { jsxs as K, jsx as _, Fragment as Dt } from "react/jsx-runtime";
1
+ import { jsxs as V, jsx as _, Fragment as Dt } from "react/jsx-runtime";
2
2
  import * as g from "react";
3
- import { useCallback as Q, createContext as xe, useMemo as ve, createElement as m, useContext as nt, useLayoutEffect as It, useRef as O, useEffect as A, useState as V, forwardRef as C, Children as R, isValidElement as B, cloneElement as te, Fragment as Ie, useReducer as Rt } from "react";
4
- import Lt, { flushSync as rt } from "react-dom";
3
+ import { useCallback as Q, createContext as xe, useMemo as ve, createElement as m, useContext as nt, useLayoutEffect as It, useRef as O, useEffect as A, useState as K, forwardRef as C, Children as R, isValidElement as B, cloneElement as te, Fragment as Ie, useReducer as Rt } from "react";
4
+ import Mt, { flushSync as rt } from "react-dom";
5
5
  function P() {
6
6
  return P = Object.assign ? Object.assign.bind() : function(e) {
7
7
  for (var n = 1; n < arguments.length; n++) {
@@ -18,12 +18,12 @@ function j(e, n, { checkForDefaultPrevented: t = !0 } = {}) {
18
18
  return n == null ? void 0 : n(a);
19
19
  };
20
20
  }
21
- function Mt(e, n) {
21
+ function Lt(e, n) {
22
22
  typeof e == "function" ? e(n) : e != null && (e.current = n);
23
23
  }
24
24
  function ot(...e) {
25
25
  return (n) => e.forEach(
26
- (t) => Mt(t, n)
26
+ (t) => Lt(t, n)
27
27
  );
28
28
  }
29
29
  function J(...e) {
@@ -162,7 +162,7 @@ function Wt({ prop: e, defaultProp: n, onChange: t = () => {
162
162
  ];
163
163
  }
164
164
  function Ut({ defaultProp: e, onChange: n }) {
165
- const t = V(e), [o] = t, a = O(o), r = z(n);
165
+ const t = K(e), [o] = t, a = O(o), r = z(n);
166
166
  return A(() => {
167
167
  a.current !== o && (r(o), a.current = o);
168
168
  }, [
@@ -187,7 +187,7 @@ Re.displayName = "Slot";
187
187
  const Pe = /* @__PURE__ */ C((e, n) => {
188
188
  const { children: t, ...o } = e;
189
189
  return /* @__PURE__ */ B(t) ? /* @__PURE__ */ te(t, {
190
- ...Kt(o, t.props),
190
+ ...Vt(o, t.props),
191
191
  ref: n ? ot(n, t.ref) : t.ref
192
192
  }) : R.count(t) > 1 ? R.only(null) : null;
193
193
  });
@@ -196,7 +196,7 @@ const Ht = ({ children: e }) => /* @__PURE__ */ m(Ie, null, e);
196
196
  function Gt(e) {
197
197
  return /* @__PURE__ */ B(e) && e.type === Ht;
198
198
  }
199
- function Kt(e, n) {
199
+ function Vt(e, n) {
200
200
  const t = {
201
201
  ...n
202
202
  };
@@ -217,7 +217,7 @@ function Kt(e, n) {
217
217
  ...t
218
218
  };
219
219
  }
220
- const Vt = [
220
+ const Kt = [
221
221
  "a",
222
222
  "button",
223
223
  "div",
@@ -234,7 +234,7 @@ const Vt = [
234
234
  "span",
235
235
  "svg",
236
236
  "ul"
237
- ], W = Vt.reduce((e, n) => {
237
+ ], W = Kt.reduce((e, n) => {
238
238
  const t = /* @__PURE__ */ C((o, a) => {
239
239
  const { asChild: r, ...i } = o, u = r ? Re : n;
240
240
  return A(() => {
@@ -273,24 +273,24 @@ const Zt = /* @__PURE__ */ xe({
273
273
  branches: /* @__PURE__ */ new Set()
274
274
  }), Qt = /* @__PURE__ */ C((e, n) => {
275
275
  var t;
276
- const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: a, onPointerDownOutside: r, onFocusOutside: i, onInteractOutside: u, onDismiss: l, ...d } = e, p = nt(Zt), [s, h] = V(null), f = (t = s == null ? void 0 : s.ownerDocument) !== null && t !== void 0 ? t : globalThis == null ? void 0 : globalThis.document, [, E] = V({}), c = J(
276
+ const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: a, onPointerDownOutside: r, onFocusOutside: i, onInteractOutside: u, onDismiss: l, ...d } = e, p = nt(Zt), [s, h] = K(null), f = (t = s == null ? void 0 : s.ownerDocument) !== null && t !== void 0 ? t : globalThis == null ? void 0 : globalThis.document, [, E] = K({}), c = J(
277
277
  n,
278
278
  (w) => h(w)
279
279
  ), v = Array.from(p.layers), [b] = [
280
280
  ...p.layersWithOutsidePointerEventsDisabled
281
281
  ].slice(-1), x = v.indexOf(b), $ = s ? v.indexOf(s) : -1, y = p.layersWithOutsidePointerEventsDisabled.size > 0, S = $ >= x, U = Jt((w) => {
282
- const L = w.target, ne = [
282
+ const M = w.target, ne = [
283
283
  ...p.branches
284
284
  ].some(
285
- (I) => I.contains(L)
285
+ (I) => I.contains(M)
286
286
  );
287
287
  !S || ne || (r == null || r(w), u == null || u(w), w.defaultPrevented || l == null || l());
288
288
  }, f), T = en((w) => {
289
- const L = w.target;
289
+ const M = w.target;
290
290
  [
291
291
  ...p.branches
292
292
  ].some(
293
- (I) => I.contains(L)
293
+ (I) => I.contains(M)
294
294
  ) || (i == null || i(w), u == null || u(w), w.defaultPrevented || l == null || l());
295
295
  }, f);
296
296
  return Xt((w) => {
@@ -395,7 +395,7 @@ const _e = "focusScope.autoFocusOnMount", be = "focusScope.autoFocusOnUnmount",
395
395
  bubbles: !1,
396
396
  cancelable: !0
397
397
  }, tn = /* @__PURE__ */ C((e, n) => {
398
- const { loop: t = !1, trapped: o = !1, onMountAutoFocus: a, onUnmountAutoFocus: r, ...i } = e, [u, l] = V(null), d = z(a), p = z(r), s = O(null), h = J(
398
+ const { loop: t = !1, trapped: o = !1, onMountAutoFocus: a, onUnmountAutoFocus: r, ...i } = e, [u, l] = K(null), d = z(a), p = z(r), s = O(null), h = J(
399
399
  n,
400
400
  (c) => l(c)
401
401
  ), f = O({
@@ -574,7 +574,7 @@ function cn(e) {
574
574
  const sn = /* @__PURE__ */ C((e, n) => {
575
575
  var t;
576
576
  const { container: o = globalThis == null || (t = globalThis.document) === null || t === void 0 ? void 0 : t.body, ...a } = e;
577
- return o ? /* @__PURE__ */ Lt.createPortal(/* @__PURE__ */ m(W.div, P({}, a, {
577
+ return o ? /* @__PURE__ */ Mt.createPortal(/* @__PURE__ */ m(W.div, P({}, a, {
578
578
  ref: n
579
579
  })), o) : null;
580
580
  });
@@ -594,7 +594,7 @@ const he = (e) => {
594
594
  };
595
595
  he.displayName = "Presence";
596
596
  function dn(e) {
597
- const [n, t] = V(), o = O({}), a = O(e), r = O("none"), i = e ? "mounted" : "unmounted", [u, l] = ln(i, {
597
+ const [n, t] = K(), o = O({}), a = O(e), r = O("none"), i = e ? "mounted" : "unmounted", [u, l] = ln(i, {
598
598
  mounted: {
599
599
  UNMOUNT: "unmounted",
600
600
  ANIMATION_OUT: "unmountSuspended"
@@ -698,7 +698,7 @@ function gn(e, n) {
698
698
  return typeof e == "function" ? e(n) : e && (e.current = n), e;
699
699
  }
700
700
  function mn(e, n) {
701
- var t = V(function() {
701
+ var t = K(function() {
702
702
  return {
703
703
  // value
704
704
  value: e,
@@ -824,9 +824,9 @@ ge.classNames = {
824
824
  fullWidth: fe,
825
825
  zeroRight: pe
826
826
  };
827
- var Ke, wn = function() {
828
- if (Ke)
829
- return Ke;
827
+ var Ve, wn = function() {
828
+ if (Ve)
829
+ return Ve;
830
830
  if (typeof __webpack_nonce__ < "u")
831
831
  return __webpack_nonce__;
832
832
  };
@@ -951,20 +951,20 @@ if (typeof window < "u")
951
951
  } catch {
952
952
  Ae = !1;
953
953
  }
954
- var X = Ae ? { passive: !1 } : !1, Ln = function(e) {
954
+ var X = Ae ? { passive: !1 } : !1, Mn = function(e) {
955
955
  return e.tagName === "TEXTAREA";
956
956
  }, dt = function(e, n) {
957
957
  var t = window.getComputedStyle(e);
958
958
  return (
959
959
  // not-not-scrollable
960
960
  t[n] !== "hidden" && // contains scroll inside self
961
- !(t.overflowY === t.overflowX && !Ln(e) && t[n] === "visible")
961
+ !(t.overflowY === t.overflowX && !Mn(e) && t[n] === "visible")
962
962
  );
963
- }, Mn = function(e) {
963
+ }, Ln = function(e) {
964
964
  return dt(e, "overflowY");
965
965
  }, Fn = function(e) {
966
966
  return dt(e, "overflowX");
967
- }, Ve = function(e, n) {
967
+ }, Ke = function(e, n) {
968
968
  var t = n;
969
969
  do {
970
970
  typeof ShadowRoot < "u" && t instanceof ShadowRoot && (t = t.host);
@@ -992,7 +992,7 @@ var X = Ae ? { passive: !1 } : !1, Ln = function(e) {
992
992
  o
993
993
  ];
994
994
  }, pt = function(e, n) {
995
- return e === "v" ? Mn(n) : Fn(n);
995
+ return e === "v" ? Ln(n) : Fn(n);
996
996
  }, ft = function(e, n) {
997
997
  return e === "v" ? kn(n) : jn(n);
998
998
  }, Bn = function(e, n) {
@@ -1022,7 +1022,7 @@ var X = Ae ? { passive: !1 } : !1, Ln = function(e) {
1022
1022
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
1023
1023
  `);
1024
1024
  }, Gn = 0, Y = [];
1025
- function Kn(e) {
1025
+ function Vn(e) {
1026
1026
  var n = g.useRef([]), t = g.useRef([0, 0]), o = g.useRef(), a = g.useState(Gn++)[0], r = g.useState(function() {
1027
1027
  return lt();
1028
1028
  })[0], i = g.useRef(e);
@@ -1047,15 +1047,15 @@ function Kn(e) {
1047
1047
  var b = ae(c), x = t.current, $ = "deltaX" in c ? c.deltaX : x[0] - b[0], y = "deltaY" in c ? c.deltaY : x[1] - b[1], S, U = c.target, T = Math.abs($) > Math.abs(y) ? "h" : "v";
1048
1048
  if ("touches" in c && T === "h" && U.type === "range")
1049
1049
  return !1;
1050
- var w = Ve(T, U);
1050
+ var w = Ke(T, U);
1051
1051
  if (!w)
1052
1052
  return !0;
1053
- if (w ? S = T : (S = T === "v" ? "h" : "v", w = Ve(T, U)), !w)
1053
+ if (w ? S = T : (S = T === "v" ? "h" : "v", w = Ke(T, U)), !w)
1054
1054
  return !1;
1055
1055
  if (!o.current && "changedTouches" in c && ($ || y) && (o.current = S), !S)
1056
1056
  return !0;
1057
- var L = o.current || S;
1058
- return Wn(L, v, c, L === "h" ? $ : y, !0);
1057
+ var M = o.current || S;
1058
+ return Wn(M, v, c, M === "h" ? $ : y, !0);
1059
1059
  }, []), l = g.useCallback(function(c) {
1060
1060
  var v = c;
1061
1061
  if (!(!Y.length || Y[Y.length - 1] !== r)) {
@@ -1106,9 +1106,9 @@ function Kn(e) {
1106
1106
  f ? g.createElement(Rn, { gapMode: "margin" }) : null
1107
1107
  );
1108
1108
  }
1109
- const Vn = En(st, Kn);
1109
+ const Kn = En(st, Vn);
1110
1110
  var vt = g.forwardRef(function(e, n) {
1111
- return g.createElement(ge, F({}, e, { ref: n, sideCar: Vn }));
1111
+ return g.createElement(ge, F({}, e, { ref: n, sideCar: Kn }));
1112
1112
  });
1113
1113
  vt.classNames = ge.classNames;
1114
1114
  const zn = vt;
@@ -1158,7 +1158,7 @@ var Xn = function(e) {
1158
1158
  return null;
1159
1159
  };
1160
1160
  };
1161
- const gt = "Dialog", [mt, wo] = Ft(gt), [Qn, M] = mt(gt), Jn = (e) => {
1161
+ const gt = "Dialog", [mt, wo] = Ft(gt), [Qn, L] = mt(gt), Jn = (e) => {
1162
1162
  const { __scopeDialog: n, children: t, open: o, defaultOpen: a, onOpenChange: r, modal: i = !0 } = e, u = O(null), l = O(null), [d = !1, p] = Wt({
1163
1163
  prop: o,
1164
1164
  defaultProp: a,
@@ -1184,13 +1184,13 @@ const gt = "Dialog", [mt, wo] = Ft(gt), [Qn, M] = mt(gt), Jn = (e) => {
1184
1184
  modal: i
1185
1185
  }, t);
1186
1186
  }, er = "DialogTrigger", tr = /* @__PURE__ */ C((e, n) => {
1187
- const { __scopeDialog: t, ...o } = e, a = M(er, t), r = J(n, a.triggerRef);
1187
+ const { __scopeDialog: t, ...o } = e, a = L(er, t), r = J(n, a.triggerRef);
1188
1188
  return /* @__PURE__ */ m(W.button, P({
1189
1189
  type: "button",
1190
1190
  "aria-haspopup": "dialog",
1191
1191
  "aria-expanded": a.open,
1192
1192
  "aria-controls": a.contentId,
1193
- "data-state": Le(a.open)
1193
+ "data-state": Me(a.open)
1194
1194
  }, o, {
1195
1195
  ref: r,
1196
1196
  onClick: j(e.onClick, a.onOpenToggle)
@@ -1198,7 +1198,7 @@ const gt = "Dialog", [mt, wo] = Ft(gt), [Qn, M] = mt(gt), Jn = (e) => {
1198
1198
  }), _t = "DialogPortal", [nr, bt] = mt(_t, {
1199
1199
  forceMount: void 0
1200
1200
  }), rr = (e) => {
1201
- const { __scopeDialog: n, forceMount: t, children: o, container: a } = e, r = M(_t, n);
1201
+ const { __scopeDialog: n, forceMount: t, children: o, container: a } = e, r = L(_t, n);
1202
1202
  return /* @__PURE__ */ m(nr, {
1203
1203
  scope: n,
1204
1204
  forceMount: t
@@ -1212,14 +1212,14 @@ const gt = "Dialog", [mt, wo] = Ft(gt), [Qn, M] = mt(gt), Jn = (e) => {
1212
1212
  }, i))
1213
1213
  ));
1214
1214
  }, Te = "DialogOverlay", or = /* @__PURE__ */ C((e, n) => {
1215
- const t = bt(Te, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = M(Te, e.__scopeDialog);
1215
+ const t = bt(Te, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = L(Te, e.__scopeDialog);
1216
1216
  return r.modal ? /* @__PURE__ */ m(he, {
1217
1217
  present: o || r.open
1218
1218
  }, /* @__PURE__ */ m(ar, P({}, a, {
1219
1219
  ref: n
1220
1220
  }))) : null;
1221
1221
  }), ar = /* @__PURE__ */ C((e, n) => {
1222
- const { __scopeDialog: t, ...o } = e, a = M(Te, t);
1222
+ const { __scopeDialog: t, ...o } = e, a = L(Te, t);
1223
1223
  return (
1224
1224
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
1225
1225
  // ie. when `Overlay` and `Content` are siblings
@@ -1230,7 +1230,7 @@ const gt = "Dialog", [mt, wo] = Ft(gt), [Qn, M] = mt(gt), Jn = (e) => {
1230
1230
  a.contentRef
1231
1231
  ]
1232
1232
  }, /* @__PURE__ */ m(W.div, P({
1233
- "data-state": Le(a.open)
1233
+ "data-state": Me(a.open)
1234
1234
  }, o, {
1235
1235
  ref: n,
1236
1236
  style: {
@@ -1240,7 +1240,7 @@ const gt = "Dialog", [mt, wo] = Ft(gt), [Qn, M] = mt(gt), Jn = (e) => {
1240
1240
  })))
1241
1241
  );
1242
1242
  }), ee = "DialogContent", ir = /* @__PURE__ */ C((e, n) => {
1243
- const t = bt(ee, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = M(ee, e.__scopeDialog);
1243
+ const t = bt(ee, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = L(ee, e.__scopeDialog);
1244
1244
  return /* @__PURE__ */ m(he, {
1245
1245
  present: o || r.open
1246
1246
  }, r.modal ? /* @__PURE__ */ m(ur, P({}, a, {
@@ -1249,7 +1249,7 @@ const gt = "Dialog", [mt, wo] = Ft(gt), [Qn, M] = mt(gt), Jn = (e) => {
1249
1249
  ref: n
1250
1250
  })));
1251
1251
  }), ur = /* @__PURE__ */ C((e, n) => {
1252
- const t = M(ee, e.__scopeDialog), o = O(null), a = J(n, t.contentRef, o);
1252
+ const t = L(ee, e.__scopeDialog), o = O(null), a = J(n, t.contentRef, o);
1253
1253
  return A(() => {
1254
1254
  const r = o.current;
1255
1255
  if (r)
@@ -1272,7 +1272,7 @@ const gt = "Dialog", [mt, wo] = Ft(gt), [Qn, M] = mt(gt), Jn = (e) => {
1272
1272
  )
1273
1273
  }));
1274
1274
  }), cr = /* @__PURE__ */ C((e, n) => {
1275
- const t = M(ee, e.__scopeDialog), o = O(!1), a = O(!1);
1275
+ const t = L(ee, e.__scopeDialog), o = O(!1), a = O(!1);
1276
1276
  return /* @__PURE__ */ m($t, P({}, e, {
1277
1277
  ref: n,
1278
1278
  trapFocus: !1,
@@ -1293,7 +1293,7 @@ const gt = "Dialog", [mt, wo] = Ft(gt), [Qn, M] = mt(gt), Jn = (e) => {
1293
1293
  }
1294
1294
  }));
1295
1295
  }), $t = /* @__PURE__ */ C((e, n) => {
1296
- const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: r, ...i } = e, u = M(ee, t), l = O(null), d = J(n, l);
1296
+ const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: r, ...i } = e, u = L(ee, t), l = O(null), d = J(n, l);
1297
1297
  return pn(), /* @__PURE__ */ m(Ie, null, /* @__PURE__ */ m(tn, {
1298
1298
  asChild: !0,
1299
1299
  loop: !0,
@@ -1305,27 +1305,27 @@ const gt = "Dialog", [mt, wo] = Ft(gt), [Qn, M] = mt(gt), Jn = (e) => {
1305
1305
  id: u.contentId,
1306
1306
  "aria-describedby": u.descriptionId,
1307
1307
  "aria-labelledby": u.titleId,
1308
- "data-state": Le(u.open)
1308
+ "data-state": Me(u.open)
1309
1309
  }, i, {
1310
1310
  ref: d,
1311
1311
  onDismiss: () => u.onOpenChange(!1)
1312
1312
  }))), !1);
1313
1313
  }), sr = "DialogTitle", lr = /* @__PURE__ */ C((e, n) => {
1314
- const { __scopeDialog: t, ...o } = e, a = M(sr, t);
1314
+ const { __scopeDialog: t, ...o } = e, a = L(sr, t);
1315
1315
  return /* @__PURE__ */ m(W.h2, P({
1316
1316
  id: a.titleId
1317
1317
  }, o, {
1318
1318
  ref: n
1319
1319
  }));
1320
1320
  }), dr = "DialogDescription", pr = /* @__PURE__ */ C((e, n) => {
1321
- const { __scopeDialog: t, ...o } = e, a = M(dr, t);
1321
+ const { __scopeDialog: t, ...o } = e, a = L(dr, t);
1322
1322
  return /* @__PURE__ */ m(W.p, P({
1323
1323
  id: a.descriptionId
1324
1324
  }, o, {
1325
1325
  ref: n
1326
1326
  }));
1327
1327
  }), fr = "DialogClose", vr = /* @__PURE__ */ C((e, n) => {
1328
- const { __scopeDialog: t, ...o } = e, a = M(fr, t);
1328
+ const { __scopeDialog: t, ...o } = e, a = L(fr, t);
1329
1329
  return /* @__PURE__ */ m(W.button, P({
1330
1330
  type: "button"
1331
1331
  }, o, {
@@ -1336,7 +1336,7 @@ const gt = "Dialog", [mt, wo] = Ft(gt), [Qn, M] = mt(gt), Jn = (e) => {
1336
1336
  )
1337
1337
  }));
1338
1338
  });
1339
- function Le(e) {
1339
+ function Me(e) {
1340
1340
  return e ? "open" : "closed";
1341
1341
  }
1342
1342
  const hr = Jn, gr = tr, mr = rr, _r = or, br = ir, $r = lr, Ye = pr, yr = vr, qe = {
@@ -1526,7 +1526,7 @@ const Tr = /* @__PURE__ */ Nr(Ar), H = {
1526
1526
  ), E = (v) => {
1527
1527
  o || i ? v.preventDefault() : u && u(v);
1528
1528
  }, c = () => d.endsWith("negative") ? "negative-disabled" : "disabled";
1529
- return /* @__PURE__ */ K(
1529
+ return /* @__PURE__ */ V(
1530
1530
  "button",
1531
1531
  {
1532
1532
  className: f,
@@ -1543,8 +1543,8 @@ const Tr = /* @__PURE__ */ Nr(Ar), H = {
1543
1543
  ]
1544
1544
  }
1545
1545
  );
1546
- }, Me = C(Dr);
1547
- Me.displayName = "Button";
1546
+ }, Le = C(Dr);
1547
+ Le.displayName = "Button";
1548
1548
  function Ir(e) {
1549
1549
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1550
1550
  }
@@ -1585,7 +1585,7 @@ var wt = { exports: {} };
1585
1585
  })();
1586
1586
  })(wt);
1587
1587
  var Rr = wt.exports;
1588
- const Lr = /* @__PURE__ */ Ir(Rr), Se = {
1588
+ const Mr = /* @__PURE__ */ Ir(Rr), Se = {
1589
1589
  "purpur-heading": "_purpur-heading_2c2y0_1",
1590
1590
  "purpur-heading--hyphens": "_purpur-heading--hyphens_2c2y0_8",
1591
1591
  "purpur-heading--subsection-100": "_purpur-heading--subsection-100_2c2y0_11",
@@ -1600,7 +1600,7 @@ const Lr = /* @__PURE__ */ Ir(Rr), Se = {
1600
1600
  "purpur-heading--display-50": "_purpur-heading--display-50_2c2y0_65",
1601
1601
  "purpur-heading--display-100": "_purpur-heading--display-100_2c2y0_71",
1602
1602
  "purpur-heading--display-200": "_purpur-heading--display-200_2c2y0_77"
1603
- }, Mr = {
1603
+ }, Lr = {
1604
1604
  TITLE100: "title-100",
1605
1605
  TITLE200: "title-200",
1606
1606
  TITLE300: "title-300",
@@ -1615,10 +1615,10 @@ const Lr = /* @__PURE__ */ Ir(Rr), Se = {
1615
1615
  className: t = "",
1616
1616
  enableHyphenation: o = !1,
1617
1617
  tag: a,
1618
- variant: r = Mr.TITLE100,
1618
+ variant: r = Lr.TITLE100,
1619
1619
  ...i
1620
1620
  }) => {
1621
- const u = a, l = Lr([
1621
+ const u = a, l = Mr([
1622
1622
  t,
1623
1623
  Se[Ce],
1624
1624
  Se[`${Ce}--${r}`],
@@ -1689,14 +1689,14 @@ const Br = /* @__PURE__ */ kr(jr), Wr = {
1689
1689
  }
1690
1690
  );
1691
1691
  Ct.displayName = "IconClose";
1692
- const Hr = Br.bind(Wr), Qe = "purpur-icon", Gr = "md", Kr = (e) => e.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), Vr = ({ content: e = "", title: n } = {}) => {
1692
+ const Hr = Br.bind(Wr), Qe = "purpur-icon", Gr = "md", Vr = (e) => e.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), Kr = ({ content: e = "", title: n } = {}) => {
1693
1693
  const t = [
1694
1694
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
1695
1695
  { name: "fill", value: "currentColor" },
1696
1696
  { name: "viewBox", value: "0 0 24 24" },
1697
1697
  n ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
1698
1698
  ], o = n ? `<title>${n}</title>` : "";
1699
- return `<svg ${Kr(t)}>${o}${e}</svg>`;
1699
+ return `<svg ${Vr(t)}>${o}${e}</svg>`;
1700
1700
  }, zr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Xr = ({
1701
1701
  ["data-testid"]: e,
1702
1702
  svg: n,
@@ -1705,7 +1705,7 @@ const Hr = Br.bind(Wr), Qe = "purpur-icon", Gr = "md", Kr = (e) => e.filter((n)
1705
1705
  size: a = Gr,
1706
1706
  ...r
1707
1707
  }) => {
1708
- const i = Vr({
1708
+ const i = Kr({
1709
1709
  content: zr(n.svg),
1710
1710
  title: t
1711
1711
  }), u = Hr(o, Qe, `${Qe}--${a}`);
@@ -1994,7 +1994,7 @@ const vo = /* @__PURE__ */ po(fo), ho = "_fadeIn_1fnes_1", go = {
1994
1994
  title: p,
1995
1995
  ...s
1996
1996
  }, h) => {
1997
- const { closeButtonAllyLabel: f, showCloseButton: E, ...c } = s, [v, b] = V(!1), x = O(null), $ = O(null), y = O(null), S = O(null), U = D([
1997
+ const { closeButtonAllyLabel: f, showCloseButton: E, ...c } = s, [v, b] = K(!1), x = O(null), $ = O(null), y = O(null), S = O(null), U = D([
1998
1998
  N,
1999
1999
  { [`${N}--with-image`]: !!u },
2000
2000
  { [`${N}--overflow`]: v },
@@ -2002,7 +2002,7 @@ const vo = /* @__PURE__ */ po(fo), ho = "_fadeIn_1fnes_1", go = {
2002
2002
  o
2003
2003
  ]), T = (I) => e ? `${e} ${I}` : void 0, w = (I) => {
2004
2004
  r && I.preventDefault();
2005
- }, L = Q(() => {
2005
+ }, M = Q(() => {
2006
2006
  if (!x.current || !$.current || !y.current || !S.current)
2007
2007
  return;
2008
2008
  const I = window.innerWidth < parseInt(lo), Nt = window.getComputedStyle(
@@ -2013,11 +2013,11 @@ const vo = /* @__PURE__ */ po(fo), ho = "_fadeIn_1fnes_1", go = {
2013
2013
  }, []), ne = (I) => {
2014
2014
  r && !E && I.preventDefault();
2015
2015
  };
2016
- return A(() => (window.addEventListener("resize", L), () => {
2017
- window.removeEventListener("resize", L);
2018
- }), []), /* @__PURE__ */ K(mr, { children: [
2016
+ return A(() => (window.addEventListener("resize", M), () => {
2017
+ window.removeEventListener("resize", M);
2018
+ }), []), /* @__PURE__ */ V(mr, { children: [
2019
2019
  /* @__PURE__ */ _(_r, { className: D(`${N}__overlay`) }),
2020
- /* @__PURE__ */ K(
2020
+ /* @__PURE__ */ V(
2021
2021
  br,
2022
2022
  {
2023
2023
  ...c,
@@ -2026,10 +2026,10 @@ const vo = /* @__PURE__ */ po(fo), ho = "_fadeIn_1fnes_1", go = {
2026
2026
  ref: h,
2027
2027
  ...!a && { "aria-describedby": void 0 },
2028
2028
  onPointerDownOutside: w,
2029
- onOpenAutoFocus: L,
2029
+ onOpenAutoFocus: M,
2030
2030
  onEscapeKeyDown: ne,
2031
2031
  children: [
2032
- /* @__PURE__ */ K("div", { ref: x, className: D(`${N}__wrapper`), children: [
2032
+ /* @__PURE__ */ V("div", { ref: x, className: D(`${N}__wrapper`), children: [
2033
2033
  Je(s) && f && u && /* @__PURE__ */ _(
2034
2034
  et,
2035
2035
  {
@@ -2038,8 +2038,8 @@ const vo = /* @__PURE__ */ po(fo), ho = "_fadeIn_1fnes_1", go = {
2038
2038
  "data-testid": T("close-button")
2039
2039
  }
2040
2040
  ),
2041
- /* @__PURE__ */ K("div", { ref: $, className: D(`${N}__wrapper-inner`), children: [
2042
- /* @__PURE__ */ K("div", { className: D(`${N}__header`), children: [
2041
+ /* @__PURE__ */ V("div", { ref: $, className: D(`${N}__wrapper-inner`), children: [
2042
+ /* @__PURE__ */ V("div", { className: D(`${N}__header`), children: [
2043
2043
  Je(s) && f && !u && /* @__PURE__ */ _(
2044
2044
  et,
2045
2045
  {
@@ -2065,7 +2065,7 @@ const vo = /* @__PURE__ */ po(fo), ho = "_fadeIn_1fnes_1", go = {
2065
2065
  children: u
2066
2066
  }
2067
2067
  ),
2068
- /* @__PURE__ */ _("div", { ref: y, className: D(`${N}__body`), children: /* @__PURE__ */ K("div", { ref: S, className: D(`${N}__body-inner`), children: [
2068
+ /* @__PURE__ */ _("div", { ref: y, className: D(`${N}__body`), children: /* @__PURE__ */ V("div", { ref: S, className: D(`${N}__body-inner`), children: [
2069
2069
  a && /* @__PURE__ */ _(Dt, { children: i ? /* @__PURE__ */ _(so, { asChild: !0, children: /* @__PURE__ */ _(Ye, { "data-testid": T("description"), children: a }) }) : /* @__PURE__ */ _(
2070
2070
  Ye,
2071
2071
  {
@@ -2091,7 +2091,7 @@ const vo = /* @__PURE__ */ po(fo), ho = "_fadeIn_1fnes_1", go = {
2091
2091
  hasImage: n,
2092
2092
  ["data-testid"]: t
2093
2093
  }) => /* @__PURE__ */ _(yr, { asChild: !0, children: /* @__PURE__ */ _(
2094
- Me,
2094
+ Le,
2095
2095
  {
2096
2096
  variant: n ? "primary-negative" : "tertiary-purple",
2097
2097
  size: "sm",
@@ -2107,7 +2107,7 @@ const vo = /* @__PURE__ */ po(fo), ho = "_fadeIn_1fnes_1", go = {
2107
2107
  }) => {
2108
2108
  const t = [n, "secondary", "text"];
2109
2109
  return e && e.length > 0 ? /* @__PURE__ */ _("div", { className: D(`${N}__actions`), "data-testid": "modal actions", children: e.slice(0, _o).map(({ label: o, onClick: a }, r) => /* @__PURE__ */ _(
2110
- Me,
2110
+ Le,
2111
2111
  {
2112
2112
  "data-testid": "modal actions button",
2113
2113
  variant: t[r] || "",