@purpurds/card 6.0.1 → 6.0.2

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/card.es.js CHANGED
@@ -1,10 +1,11 @@
1
- import { jsxs as h, jsx as s, Fragment as ir } from "react/jsx-runtime";
2
- import { forwardRef as x, Children as $, isValidElement as S, createElement as w, cloneElement as F, useEffect as sr, Fragment as or } from "react";
1
+ import { jsxs as f, jsx as s, Fragment as B } from "react/jsx-runtime";
2
+ import * as o from "react";
3
+ import { forwardRef as ur } from "react";
3
4
  import "react-dom";
4
- function cr(t) {
5
+ function pr(t) {
5
6
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
6
7
  }
7
- var G = { exports: {} };
8
+ var V = { exports: {} };
8
9
  /*!
9
10
  Copyright (c) 2018 Jed Watson.
10
11
  Licensed under the MIT License (MIT), see
@@ -39,15 +40,15 @@ var G = { exports: {} };
39
40
  }
40
41
  t.exports ? (a.default = a, t.exports = a) : window.classNames = a;
41
42
  })();
42
- })(G);
43
- var lr = G.exports;
44
- const c = /* @__PURE__ */ cr(lr), dr = {
43
+ })(V);
44
+ var ir = V.exports;
45
+ const l = /* @__PURE__ */ pr(ir), sr = {
45
46
  "purpur-card": "_purpur-card_1ruml_1"
46
47
  };
47
- function _r(t) {
48
+ function or(t) {
48
49
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
49
50
  }
50
- var U = { exports: {} };
51
+ var D = { exports: {} };
51
52
  /*!
52
53
  Copyright (c) 2018 Jed Watson.
53
54
  Licensed under the MIT License (MIT), see
@@ -82,9 +83,9 @@ var U = { exports: {} };
82
83
  }
83
84
  t.exports ? (a.default = a, t.exports = a) : window.classNames = a;
84
85
  })();
85
- })(U);
86
- var gr = U.exports;
87
- const hr = /* @__PURE__ */ _r(gr), fr = {
86
+ })(D);
87
+ var cr = D.exports;
88
+ const lr = /* @__PURE__ */ or(cr), dr = {
88
89
  "purpur-icon": "_purpur-icon_8u1lq_1",
89
90
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
90
91
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -92,26 +93,26 @@ const hr = /* @__PURE__ */ _r(gr), fr = {
92
93
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
93
94
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
94
95
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
95
- }, mr = hr.bind(fr), Z = "purpur-icon", vr = "md", yr = (t) => t.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), br = ({ content: t = "", title: n } = {}) => {
96
+ }, _r = lr.bind(dr), M = "purpur-icon", gr = "md", hr = (t) => t.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), fr = ({ content: t = "", title: n } = {}) => {
96
97
  const a = [
97
98
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
98
99
  { name: "fill", value: "currentColor" },
99
100
  { name: "viewBox", value: "0 0 24 24" },
100
101
  n ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
101
102
  ], p = n ? `<title>${n}</title>` : "";
102
- return `<svg ${yr(a)}>${p}${t}</svg>`;
103
- }, $r = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), W = ({
103
+ return `<svg ${hr(a)}>${p}${t}</svg>`;
104
+ }, mr = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), F = ({
104
105
  ["data-testid"]: t,
105
106
  svg: n,
106
107
  allyTitle: a,
107
108
  className: p,
108
- size: i = vr,
109
+ size: i = gr,
109
110
  ...r
110
111
  }) => {
111
- const e = br({
112
- content: $r(n.svg),
112
+ const e = fr({
113
+ content: mr(n.svg),
113
114
  title: a
114
- }), u = mr(p, Z, `${Z}--${i}`);
115
+ }), u = _r(p, M, `${M}--${i}`);
115
116
  return /* @__PURE__ */ s(
116
117
  "span",
117
118
  {
@@ -123,47 +124,47 @@ const hr = /* @__PURE__ */ _r(gr), fr = {
123
124
  }
124
125
  );
125
126
  };
126
- W.displayName = "Icon";
127
- const wr = {
127
+ F.displayName = "Icon";
128
+ const vr = {
128
129
  name: "alert",
129
130
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="m13.038 7.067-.247 6.876h-1.566l-.247-6.876a1.03 1.03 0 1 1 2.06 0Zm.212 8.917c0 .649-.586 1.234-1.25 1.234-.649 0-1.25-.585-1.25-1.234 0-.633.601-1.234 1.25-1.234.664 0 1.25.601 1.25 1.234Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',
130
131
  keywords: ["alert"],
131
132
  category: "status"
132
- }, xr = {
133
+ }, yr = {
133
134
  name: "check-circle",
134
135
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M16.487 9.514a.872.872 0 1 0-1.42-1.014l-4.248 5.948-2.18-2.18a.872.872 0 0 0-1.233 1.234l2.908 2.908a.872.872 0 0 0 1.326-.11l4.847-6.786Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',
135
136
  keywords: ["check-circle"],
136
137
  category: "status"
137
- }, Nr = {
138
+ }, br = {
138
139
  name: "error",
139
140
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M10.354 3.05c.732-1.267 2.56-1.267 3.291 0l8.66 15c.732 1.267-.182 2.85-1.645 2.85H3.34c-1.463 0-2.377-1.583-1.646-2.85l8.66-15Zm1.595.862a.092.092 0 0 0-.036.038l-8.66 15a.092.092 0 0 0-.015.05c0 .014.005.032.015.05a.11.11 0 0 0 .036.038.09.09 0 0 0 .05.012H20.66a.088.088 0 0 0 .05-.012.106.106 0 0 0 .037-.038.105.105 0 0 0 .015-.05.092.092 0 0 0-.015-.05l-8.66-15a.092.092 0 0 0-.036-.038A.106.106 0 0 0 12 3.9a.105.105 0 0 0-.05.012Z" clip-rule="evenodd"/><path d="m12.523 14.922.412-6.25a.936.936 0 1 0-1.868 0l.421 6.25h1.035ZM12 17.52c.44 0 .826-.387.826-.815 0-.418-.387-.816-.826-.816-.428 0-.825.398-.825.816 0 .428.397.815.825.815Z"/><path fill-rule="evenodd" d="M12.691 15.096h-1.37l-.431-6.53a1 1 0 0 1 .997-1.066h.227a1 1 0 0 1 .998 1.064l-.42 6.532Zm.244-6.425a.936.936 0 1 0-1.868.002l.421 6.249h1.035l.412-6.25ZM13 16.706c0 .526-.466.99-1 .99-.522 0-1-.463-1-.99 0-.264.125-.51.304-.689.18-.178.429-.301.696-.301.536 0 1 .475 1 .99Zm-.174 0c0 .428-.387.815-.826.815-.428 0-.825-.387-.825-.815 0-.418.397-.816.825-.816.44 0 .826.398.826.816Z" clip-rule="evenodd"/></svg>',
140
141
  keywords: ["error"],
141
142
  category: "status"
142
- }, Cr = {
143
+ }, $r = {
143
144
  name: "info",
144
145
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M11 8.18c0 .537.469.979 1.007.979.524 0 .993-.442.993-.98s-.469-.979-.993-.979c-.538 0-1.007.441-1.007.98Zm.152 1.958v6.897h1.696v-6.897h-1.696Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',
145
146
  keywords: ["info"],
146
147
  category: "status"
147
- }, Sr = {
148
+ }, wr = {
148
149
  name: "offering",
149
150
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M7.118 4.6H7a1.9 1.9 0 0 0-1.9 1.9V8a1.9 1.9 0 0 0 1.5 1.858v.642a.9.9 0 1 0 1.8 0v-.6h3.2v.6a.9.9 0 0 0 1.8 0v-.6h3.7V11a.9.9 0 0 0 1.8 0V9.858A1.9 1.9 0 0 0 20.4 8V6.5a1.9 1.9 0 0 0-1.9-1.9h-.618c-.063-.708-.3-1.394-.756-1.943-.56-.674-1.384-1.057-2.376-1.057-.92 0-1.696.33-2.25.915-.554-.585-1.33-.915-2.25-.915-.992 0-1.816.383-2.376 1.057-.457.549-.693 1.235-.756 1.943Zm1.812 0h2.64c-.053-.34-.174-.607-.328-.792-.192-.232-.493-.408-.992-.408s-.8.176-.992.408c-.154.185-.275.452-.328.792Zm4.5 0h2.64c-.053-.34-.174-.607-.328-.792-.192-.232-.493-.408-.992-.408s-.8.176-.992.408c-.154.185-.275.452-.328.792Zm-.03 3.5h5.1a.1.1 0 0 0 .1-.1V6.5a.1.1 0 0 0-.1-.1h-5.1v1.7Zm-1.8-1.7H7a.1.1 0 0 0-.1.1V8a.1.1 0 0 0 .1.1h4.6V6.4Zm8.335 5.147c.743-.107 1.52.135 2.201.817.474.473.695 1.011.708 1.548.012.508-.163.927-.318 1.2-.185.326-.47.607-.634.77l-.049.047-4.414 4.414a1.9 1.9 0 0 1-1.343.557H7.914a.1.1 0 0 0-.07.03l-.5.5a1.9 1.9 0 0 1-2.687 0L2.57 19.342a1.9 1.9 0 0 1 0-2.686l4-4a1.9 1.9 0 0 1 1.343-.557H14.5v.9-.9h.041l.065.004a2.73 2.73 0 0 1 .79.185 2.665 2.665 0 0 1 1.46 1.417c.188-.162.375-.324.551-.479.46-.401.815-.722.957-.863.338-.34.882-.719 1.571-.817ZM15.088 15.1a1.06 1.06 0 0 0 .08-.145c.1-.207.113-.38.027-.553a.867.867 0 0 0-.668-.497.628.628 0 0 0-.042-.005h-6.57a.1.1 0 0 0-.071.03l-4 4a.1.1 0 0 0 0 .14l2.085 2.087a.1.1 0 0 0 .142 0l.5-.5a1.9 1.9 0 0 1 1.343-.557h8.172a.1.1 0 0 0 .07-.03l4.415-4.414c.225-.225.334-.335.39-.434a.539.539 0 0 0 .083-.266.283.283 0 0 0-.026-.11.712.712 0 0 0-.154-.21c-.319-.318-.542-.326-.674-.307-.186.026-.392.146-.554.307-.191.192-.595.553-1.043.946-.904.79-2.143 1.838-2.561 2.144l-.238.174H10.5a.9.9 0 0 1 0-1.8h4.588Z" clip-rule="evenodd"/></svg>',
150
151
  keywords: ["offering"],
151
152
  category: "other"
152
- }, Ar = {
153
+ }, xr = {
153
154
  name: "question",
154
155
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M13.672 12.056c-.635.547-1.242 1.07-1.164 2.062h-1.385c-.309-1.553.504-2.214 1.23-2.805.514-.419.986-.802.986-1.442 0-.593-.489-1.068-1.267-1.068-.764 0-1.345.422-1.872 1.187L9 9.067C9.712 7.92 10.807 7.3 12.086 7.3 13.906 7.3 15 8.42 15 9.78c0 1.133-.678 1.717-1.328 2.277Zm-.822 3.763c0 .54-.487 1.028-1.041 1.028-.554 0-1.042-.488-1.042-1.028 0-.528.488-1.029 1.042-1.029s1.042.501 1.042 1.029Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',
155
156
  keywords: ["question"],
156
157
  category: "status"
157
- }, zr = {
158
+ }, Nr = {
158
159
  name: "tag",
159
160
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M3.1 4a.9.9 0 0 1 .9-.9h6.5a.9.9 0 0 1 .636.264l10 10a.9.9 0 0 1 0 1.272l-4.5 4.5a.9.9 0 1 1-1.272-1.272L19.227 14l-9.1-9.1H4.9v5.227l9.736 9.737a.9.9 0 1 1-1.272 1.272l-10-10A.9.9 0 0 1 3.1 10.5V4ZM8 7.4a.6.6 0 1 0 0 1.2.6.6 0 0 0 0-1.2ZM5.6 8a2.4 2.4 0 1 1 4.8 0 2.4 2.4 0 0 1-4.8 0Z" clip-rule="evenodd"/></svg>',
160
161
  keywords: ["tag"],
161
162
  category: "other"
162
163
  };
163
- function Or(t) {
164
+ function Cr(t) {
164
165
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
165
166
  }
166
- var X = { exports: {} };
167
+ var G = { exports: {} };
167
168
  /*!
168
169
  Copyright (c) 2018 Jed Watson.
169
170
  Licensed under the MIT License (MIT), see
@@ -198,9 +199,9 @@ var X = { exports: {} };
198
199
  }
199
200
  t.exports ? (a.default = a, t.exports = a) : window.classNames = a;
200
201
  })();
201
- })(X);
202
- var jr = X.exports;
203
- const Mr = /* @__PURE__ */ Or(jr), I = {
202
+ })(G);
203
+ var Sr = G.exports;
204
+ const Ar = /* @__PURE__ */ Cr(Sr), E = {
204
205
  "purpur-badge": "_purpur-badge_19vzu_1",
205
206
  "purpur-badge--attention": "_purpur-badge--attention_19vzu_13",
206
207
  "purpur-badge--special": "_purpur-badge--special_19vzu_17",
@@ -210,7 +211,7 @@ const Mr = /* @__PURE__ */ Or(jr), I = {
210
211
  "purpur-badge--warning": "_purpur-badge--warning_19vzu_33",
211
212
  "purpur-badge--error": "_purpur-badge--error_19vzu_37",
212
213
  "purpur-badge--black-friday": "_purpur-badge--black-friday_19vzu_41"
213
- }, L = "purpur-badge", _ = {
214
+ }, R = "purpur-badge", g = {
214
215
  ATTENTION: "attention",
215
216
  SPECIAL: "special",
216
217
  NEUTRAL: "neutral",
@@ -219,27 +220,27 @@ const Mr = /* @__PURE__ */ Or(jr), I = {
219
220
  WARNING: "warning",
220
221
  ERROR: "error",
221
222
  BLACK_FRIDAY: "black-friday"
222
- }, qr = (t) => {
223
+ }, zr = (t) => {
223
224
  switch (t) {
224
- case _.ATTENTION:
225
- case _.SPECIAL:
226
- return Sr;
227
- case _.INFORMATION:
228
- return Cr;
229
- case _.SUCCESS:
230
- return xr;
231
- case _.WARNING:
225
+ case g.ATTENTION:
226
+ case g.SPECIAL:
232
227
  return wr;
233
- case _.ERROR:
228
+ case g.INFORMATION:
229
+ return $r;
230
+ case g.SUCCESS:
231
+ return yr;
232
+ case g.WARNING:
233
+ return vr;
234
+ case g.ERROR:
235
+ return br;
236
+ case g.NEUTRAL:
237
+ return xr;
238
+ case g.BLACK_FRIDAY:
234
239
  return Nr;
235
- case _.NEUTRAL:
236
- return Ar;
237
- case _.BLACK_FRIDAY:
238
- return zr;
239
240
  default:
240
241
  return;
241
242
  }
242
- }, Er = ({
243
+ }, Or = ({
243
244
  children: t,
244
245
  showIcon: n = !0,
245
246
  variant: a,
@@ -248,38 +249,38 @@ const Mr = /* @__PURE__ */ Or(jr), I = {
248
249
  className: r = "",
249
250
  ...e
250
251
  }) => {
251
- const u = qr(a), o = Mr([r, I[L], I[`${L}--${a}`]]);
252
- return /* @__PURE__ */ h("span", { "aria-label": i, className: o, "data-testid": p, ...e, children: [
253
- n && u && /* @__PURE__ */ s(W, { "data-testid": `${p}-icon`, allyTitle: i, size: "xs", svg: u }),
252
+ const u = zr(a), c = Ar([r, E[R], E[`${R}--${a}`]]);
253
+ return /* @__PURE__ */ f("span", { "aria-label": i, className: c, "data-testid": p, ...e, children: [
254
+ n && u && /* @__PURE__ */ s(F, { "data-testid": `${p}-icon`, allyTitle: i, size: "xs", svg: u }),
254
255
  t
255
256
  ] });
256
- }, kr = {
257
+ }, jr = {
257
258
  "purpur-card-badge": "_purpur-card-badge_r7moe_1"
258
- }, Zr = c.bind(kr), Ir = "purpur-card-badge", Lr = ({
259
+ }, Mr = l.bind(jr), Er = "purpur-card-badge", Rr = ({
259
260
  ["data-testid"]: t = "purpur-card-badge",
260
261
  variant: n,
261
262
  text: a
262
263
  }) => n && a ? /* @__PURE__ */ s(
263
- Er,
264
+ Or,
264
265
  {
265
- className: Zr(Ir),
266
+ className: Mr(Er),
266
267
  variant: n,
267
268
  showIcon: !1,
268
269
  "data-testid": t,
269
270
  children: a
270
271
  }
271
- ) : null, Tr = {
272
+ ) : null, qr = {
272
273
  "purpur-card-content": "_purpur-card-content_2uc00_1"
273
- }, Pr = c.bind(Tr), Rr = "purpur-card-content", Hr = ({
274
+ }, kr = l.bind(qr), Zr = "purpur-card-content", Ir = ({
274
275
  ["data-testid"]: t = "purpur-card-content",
275
276
  children: n
276
- }) => /* @__PURE__ */ s("div", { className: Pr(Rr), "data-testid": t, children: n }), Br = {
277
+ }) => /* @__PURE__ */ s("div", { className: kr(Zr), "data-testid": t, children: n }), Lr = {
277
278
  "purpur-card-content-container": "_purpur-card-content-container_putaw_1",
278
279
  "purpur-card-content-container--footer": "_purpur-card-content-container--footer_putaw_12",
279
280
  "purpur-card-content-container--gap-size--sm": "_purpur-card-content-container--gap-size--sm_putaw_20",
280
281
  "purpur-card-content-container--gap-size--md": "_purpur-card-content-container--gap-size--md_putaw_23",
281
282
  "purpur-card-content-container--gap-size--lg": "_purpur-card-content-container--gap-size--lg_putaw_26"
282
- }, Dr = c.bind(Br), z = "purpur-card-content-container", Vr = ({
283
+ }, Pr = l.bind(Lr), N = "purpur-card-content-container", Tr = ({
283
284
  ["data-testid"]: t = "purpur-card-content-container",
284
285
  children: n,
285
286
  isFooter: a = !1,
@@ -287,21 +288,21 @@ const Mr = /* @__PURE__ */ Or(jr), I = {
287
288
  }) => /* @__PURE__ */ s(
288
289
  "div",
289
290
  {
290
- className: Dr([
291
- z,
292
- `${z}--gap-size--${p}`,
291
+ className: Pr([
292
+ N,
293
+ `${N}--gap-size--${p}`,
293
294
  {
294
- [`${z}--footer`]: a
295
+ [`${N}--footer`]: a
295
296
  }
296
297
  ]),
297
298
  "data-testid": t,
298
299
  children: n
299
300
  }
300
301
  );
301
- function Fr(t) {
302
+ function Hr(t) {
302
303
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
303
304
  }
304
- var K = { exports: {} };
305
+ var U = { exports: {} };
305
306
  /*!
306
307
  Copyright (c) 2018 Jed Watson.
307
308
  Licensed under the MIT License (MIT), see
@@ -336,42 +337,42 @@ var K = { exports: {} };
336
337
  }
337
338
  t.exports ? (a.default = a, t.exports = a) : window.classNames = a;
338
339
  })();
339
- })(K);
340
- var Gr = K.exports;
341
- const T = /* @__PURE__ */ Fr(Gr), Ur = "_rotate_1xozj_1", Wr = "_dash_1xozj_1", m = {
340
+ })(U);
341
+ var Br = U.exports;
342
+ const q = /* @__PURE__ */ Hr(Br), Vr = "_rotate_1xozj_1", Dr = "_dash_1xozj_1", m = {
342
343
  "purpur-spinner": "_purpur-spinner_1xozj_1",
343
- rotate: Ur,
344
+ rotate: Vr,
344
345
  "purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
345
346
  "purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
346
347
  "purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
347
348
  "purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
348
349
  "purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
349
350
  "purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
350
- dash: Wr,
351
+ dash: Dr,
351
352
  "purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
352
353
  "purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
353
- }, v = "purpur-spinner", Xr = {
354
+ }, v = "purpur-spinner", Fr = {
354
355
  XXS: "xxs",
355
356
  XS: "xs",
356
357
  SM: "sm",
357
358
  MD: "md",
358
359
  LG: "lg"
359
- }, Kr = ({
360
+ }, Gr = ({
360
361
  ["data-testid"]: t,
361
362
  disabled: n = !1,
362
363
  negative: a = !1,
363
- size: p = Xr.SM,
364
+ size: p = Fr.SM,
364
365
  ...i
365
366
  }) => /* @__PURE__ */ s(
366
367
  "div",
367
368
  {
368
- className: T([m[v], m[`${v}--${p}`]]),
369
+ className: q([m[v], m[`${v}--${p}`]]),
369
370
  "data-testid": t,
370
371
  ...i,
371
372
  children: /* @__PURE__ */ s("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ s(
372
373
  "circle",
373
374
  {
374
- className: T(m[`${v}__circle`], {
375
+ className: q(m[`${v}__circle`], {
375
376
  [m[`${v}__circle--disabled`]]: n,
376
377
  [m[`${v}__circle--negative`]]: a
377
378
  }),
@@ -381,7 +382,7 @@ const T = /* @__PURE__ */ Fr(Gr), Ur = "_rotate_1xozj_1", Wr = "_dash_1xozj_1",
381
382
  }
382
383
  ) })
383
384
  }
384
- ), Yr = {
385
+ ), Ur = {
385
386
  "purpur-card-cta--button-styling": "_purpur-card-cta--button-styling_1wc0z_1",
386
387
  "purpur-card-cta--button-styling--xs": "_purpur-card-cta--button-styling--xs_1wc0z_33",
387
388
  "purpur-card-cta--button-styling--icon-only": "_purpur-card-cta--button-styling--icon-only_1wc0z_36",
@@ -400,7 +401,7 @@ const T = /* @__PURE__ */ Fr(Gr), Ur = "_rotate_1xozj_1", Wr = "_dash_1xozj_1",
400
401
  "purpur-card-cta--secondary": "_purpur-card-cta--secondary_1wc0z_131",
401
402
  "purpur-card-cta--disabled": "_purpur-card-cta--disabled_1wc0z_131",
402
403
  "purpur-card-cta--text": "_purpur-card-cta--text_1wc0z_139"
403
- }, Jr = c.bind(Yr), d = "purpur-card-cta", Qr = ({
404
+ }, Wr = l.bind(Ur), _ = "purpur-card-cta", Xr = ({
404
405
  ["data-testid"]: t = "purpur-card-cta",
405
406
  className: n,
406
407
  children: a,
@@ -409,36 +410,36 @@ const T = /* @__PURE__ */ Fr(Gr), Ur = "_rotate_1xozj_1", Wr = "_dash_1xozj_1",
409
410
  loading: r = !1,
410
411
  text: e,
411
412
  linkStyling: u = !1,
412
- ...o
413
+ ...c
413
414
  }) => /* @__PURE__ */ s(
414
415
  "div",
415
416
  {
416
- className: `${Jr([
417
- d,
417
+ className: `${Wr([
418
+ _,
418
419
  n,
419
420
  {
420
- [`${d}--disabled`]: p,
421
- [`${d}--text`]: !!e,
422
- [`${d}--cta-styling`]: u,
423
- [`${d}--button-styling`]: !u,
424
- [`${d}--button-styling--md`]: !u,
425
- [`${d}--button-styling--secondary`]: !u,
426
- [`${d}--button-styling--icon-only`]: !u && !e
421
+ [`${_}--disabled`]: p,
422
+ [`${_}--text`]: !!e,
423
+ [`${_}--cta-styling`]: u,
424
+ [`${_}--button-styling`]: !u,
425
+ [`${_}--button-styling--md`]: !u,
426
+ [`${_}--button-styling--secondary`]: !u,
427
+ [`${_}--button-styling--icon-only`]: !u && !e
427
428
  }
428
- ])} ${d}`,
429
+ ])} ${_}`,
429
430
  "data-testid": t,
430
- ...o,
431
- children: r ? /* @__PURE__ */ s(Kr, { "data-testid": `${t}-spinner`, size: "xs", disabled: p }) : /* @__PURE__ */ h(ir, { children: [
431
+ ...c,
432
+ children: r ? /* @__PURE__ */ s(Gr, { "data-testid": `${t}-spinner`, size: "xs", disabled: p }) : /* @__PURE__ */ f(B, { children: [
432
433
  i === "left" && a,
433
434
  e,
434
435
  i === "right" && a
435
436
  ] })
436
437
  }
437
438
  );
438
- function rt(t) {
439
+ function Kr(t) {
439
440
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
440
441
  }
441
- var Y = { exports: {} };
442
+ var W = { exports: {} };
442
443
  /*!
443
444
  Copyright (c) 2018 Jed Watson.
444
445
  Licensed under the MIT License (MIT), see
@@ -473,9 +474,9 @@ var Y = { exports: {} };
473
474
  }
474
475
  t.exports ? (a.default = a, t.exports = a) : window.classNames = a;
475
476
  })();
476
- })(Y);
477
- var tt = Y.exports;
478
- const at = /* @__PURE__ */ rt(tt), et = {
477
+ })(W);
478
+ var Yr = W.exports;
479
+ const Jr = /* @__PURE__ */ Kr(Yr), Qr = {
479
480
  "purpur-icon": "_purpur-icon_8u1lq_1",
480
481
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
481
482
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -483,26 +484,26 @@ const at = /* @__PURE__ */ rt(tt), et = {
483
484
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
484
485
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
485
486
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
486
- }, nt = at.bind(et), P = "purpur-icon", ut = "md", pt = (t) => t.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), it = ({ content: t = "", title: n } = {}) => {
487
+ }, rt = Jr.bind(Qr), k = "purpur-icon", tt = "md", at = (t) => t.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), et = ({ content: t = "", title: n } = {}) => {
487
488
  const a = [
488
489
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
489
490
  { name: "fill", value: "currentColor" },
490
491
  { name: "viewBox", value: "0 0 24 24" },
491
492
  n ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
492
493
  ], p = n ? `<title>${n}</title>` : "";
493
- return `<svg ${pt(a)}>${p}${t}</svg>`;
494
- }, st = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), J = ({
494
+ return `<svg ${at(a)}>${p}${t}</svg>`;
495
+ }, nt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), X = ({
495
496
  ["data-testid"]: t,
496
497
  svg: n,
497
498
  allyTitle: a,
498
499
  className: p,
499
- size: i = ut,
500
+ size: i = tt,
500
501
  ...r
501
502
  }) => {
502
- const e = it({
503
- content: st(n.svg),
503
+ const e = et({
504
+ content: nt(n.svg),
504
505
  title: a
505
- }), u = nt(p, P, `${P}--${i}`);
506
+ }), u = rt(p, k, `${k}--${i}`);
506
507
  return /* @__PURE__ */ s(
507
508
  "span",
508
509
  {
@@ -514,18 +515,18 @@ const at = /* @__PURE__ */ rt(tt), et = {
514
515
  }
515
516
  );
516
517
  };
517
- J.displayName = "Icon";
518
- const ot = {
518
+ X.displayName = "Icon";
519
+ const ut = {
519
520
  name: "checkmark",
520
521
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M21.06 3.795a.9.9 0 0 1 .145 1.264l-11.5 14.5a.9.9 0 0 1-1.341.077l-6-6a.9.9 0 0 1 1.272-1.272l5.286 5.286L19.795 3.94a.9.9 0 0 1 1.264-.145Z" clip-rule="evenodd"/></svg>',
521
522
  keywords: ["checkmark"],
522
523
  category: "utility"
523
- }, Q = (t) => /* @__PURE__ */ s(J, { ...t, svg: ot });
524
- Q.displayName = "IconCheckmark";
525
- function ct(t) {
524
+ }, K = (t) => /* @__PURE__ */ s(X, { ...t, svg: ut });
525
+ K.displayName = "IconCheckmark";
526
+ function pt(t) {
526
527
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
527
528
  }
528
- var rr = { exports: {} };
529
+ var Y = { exports: {} };
529
530
  /*!
530
531
  Copyright (c) 2018 Jed Watson.
531
532
  Licensed under the MIT License (MIT), see
@@ -560,9 +561,9 @@ var rr = { exports: {} };
560
561
  }
561
562
  t.exports ? (a.default = a, t.exports = a) : window.classNames = a;
562
563
  })();
563
- })(rr);
564
- var lt = rr.exports;
565
- const dt = /* @__PURE__ */ ct(lt), y = {
564
+ })(Y);
565
+ var it = Y.exports;
566
+ const st = /* @__PURE__ */ pt(it), y = {
566
567
  "purpur-paragraph": "_purpur-paragraph_1rh57_1",
567
568
  "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
568
569
  "purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
@@ -577,7 +578,7 @@ const dt = /* @__PURE__ */ ct(lt), y = {
577
578
  "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
578
579
  "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
579
580
  "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
580
- }, _t = {
581
+ }, ot = {
581
582
  PARAGRAPH100: "paragraph-100",
582
583
  PARAGRAPH100MEDIUM: "paragraph-100-medium",
583
584
  PARAGRAPH100BOLD: "paragraph-100-bold",
@@ -588,17 +589,17 @@ const dt = /* @__PURE__ */ ct(lt), y = {
588
589
  ADDITIONAL100MEDIUM: "additional-100-medium",
589
590
  OVERLINE100: "overline-100",
590
591
  OVERLINE200: "overline-200"
591
- }, b = "purpur-paragraph", k = ({
592
+ }, b = "purpur-paragraph", j = ({
592
593
  ["data-testid"]: t,
593
594
  children: n,
594
595
  className: a,
595
596
  disabled: p,
596
597
  enableHyphenation: i = !1,
597
598
  negative: r = !1,
598
- variant: e = _t.PARAGRAPH100,
599
+ variant: e = ot.PARAGRAPH100,
599
600
  ...u
600
601
  }) => {
601
- const o = dt([
602
+ const c = st([
602
603
  a,
603
604
  y[b],
604
605
  y[`${b}--${e}`],
@@ -608,31 +609,31 @@ const dt = /* @__PURE__ */ ct(lt), y = {
608
609
  [y[`${b}--negative`]]: r
609
610
  }
610
611
  ]);
611
- return /* @__PURE__ */ s("p", { ...u, className: o, "data-testid": t, children: n });
612
+ return /* @__PURE__ */ s("p", { ...u, className: c, "data-testid": t, children: n });
612
613
  };
613
- k.displayName = "Paragraph";
614
- const gt = {
614
+ j.displayName = "Paragraph";
615
+ const ct = {
615
616
  "purpur-card-feature-list": "_purpur-card-feature-list_ej4qm_1",
616
617
  "purpur-card-feature-list__list-item": "_purpur-card-feature-list__list-item_ej4qm_6"
617
- }, R = c.bind(gt), H = "purpur-card-feature-list", ht = ({
618
+ }, Z = l.bind(ct), I = "purpur-card-feature-list", lt = ({
618
619
  ["data-testid"]: t = "purpur-card-feature-list",
619
620
  listItems: n
620
- }) => n && n.length > 0 ? /* @__PURE__ */ s("ul", { className: R(H), "data-testid": t, children: n.map((a) => /* @__PURE__ */ h(
621
+ }) => n && n.length > 0 ? /* @__PURE__ */ s("ul", { className: Z(I), "data-testid": t, children: n.map((a) => /* @__PURE__ */ f(
621
622
  "li",
622
623
  {
623
- className: R(`${H}__list-item`),
624
+ className: Z(`${I}__list-item`),
624
625
  "data-testid": `${t}-item`,
625
626
  children: [
626
- /* @__PURE__ */ s(Q, { size: "xs" }),
627
- /* @__PURE__ */ s(k, { children: a })
627
+ /* @__PURE__ */ s(K, { size: "xs" }),
628
+ /* @__PURE__ */ s(j, { children: a })
628
629
  ]
629
630
  },
630
631
  a
631
632
  )) }) : null;
632
- function ft(t) {
633
+ function dt(t) {
633
634
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
634
635
  }
635
- var tr = { exports: {} };
636
+ var J = { exports: {} };
636
637
  /*!
637
638
  Copyright (c) 2018 Jed Watson.
638
639
  Licensed under the MIT License (MIT), see
@@ -667,9 +668,9 @@ var tr = { exports: {} };
667
668
  }
668
669
  t.exports ? (a.default = a, t.exports = a) : window.classNames = a;
669
670
  })();
670
- })(tr);
671
- var mt = tr.exports;
672
- const vt = /* @__PURE__ */ ft(mt), N = {
671
+ })(J);
672
+ var _t = J.exports;
673
+ const gt = /* @__PURE__ */ dt(_t), $ = {
673
674
  "purpur-heading": "_purpur-heading_k9fhq_1",
674
675
  "purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
675
676
  "purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
@@ -685,7 +686,7 @@ const vt = /* @__PURE__ */ ft(mt), N = {
685
686
  "purpur-heading--display-50": "_purpur-heading--display-50_k9fhq_68",
686
687
  "purpur-heading--display-100": "_purpur-heading--display-100_k9fhq_74",
687
688
  "purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
688
- }, yt = {
689
+ }, ht = {
689
690
  TITLE100: "title-100",
690
691
  TITLE200: "title-200",
691
692
  TITLE300: "title-300",
@@ -694,135 +695,130 @@ const vt = /* @__PURE__ */ ft(mt), N = {
694
695
  TITLE600: "title-600",
695
696
  TITLE700: "title-700",
696
697
  SUBSECTION100: "subsection-100"
697
- }, C = "purpur-heading", ar = ({
698
+ }, w = "purpur-heading", Q = ({
698
699
  ["data-testid"]: t,
699
700
  children: n,
700
701
  className: a = "",
701
702
  enableHyphenation: p = !1,
702
703
  negative: i = !1,
703
704
  tag: r,
704
- variant: e = yt.TITLE100,
705
+ variant: e = ht.TITLE100,
705
706
  ...u
706
707
  }) => {
707
- const o = r, A = vt([
708
+ const c = r, x = gt([
708
709
  a,
709
- N[C],
710
- N[`${C}--${e}`],
710
+ $[w],
711
+ $[`${w}--${e}`],
711
712
  {
712
- [N[`${C}--hyphens`]]: p,
713
- [N[`${C}--negative`]]: i
713
+ [$[`${w}--hyphens`]]: p,
714
+ [$[`${w}--negative`]]: i
714
715
  }
715
716
  ]);
716
- return /* @__PURE__ */ s(o, { ...u, className: A, "data-testid": t, children: n });
717
+ return /* @__PURE__ */ s(c, { ...u, className: x, "data-testid": t, children: n });
717
718
  };
718
- ar.displayName = "Heading";
719
- const bt = {
719
+ Q.displayName = "Heading";
720
+ const ft = {
720
721
  "purpur-card-heading": "_purpur-card-heading_8heg4_1",
721
722
  "purpur-card-heading__heading": "_purpur-card-heading__heading_8heg4_6",
722
723
  "purpur-card-heading__icon": "_purpur-card-heading__icon_8heg4_11"
723
- }, O = c.bind(bt), j = "purpur-card-heading", $t = ({
724
+ }, C = l.bind(ft), S = "purpur-card-heading", mt = ({
724
725
  ["data-testid"]: t = "purpur-card-heading",
725
726
  title: n,
726
727
  icon: a,
727
728
  children: p,
728
729
  titleTag: i = "h2"
729
- }) => /* @__PURE__ */ h("div", { className: O(j), "data-testid": t, children: [
730
- /* @__PURE__ */ h("div", { className: O(`${j}__heading`), children: [
731
- a && /* @__PURE__ */ s("div", { className: O(`${j}__icon`), children: a }),
732
- /* @__PURE__ */ s(ar, { tag: i, variant: "title-100", children: n })
730
+ }) => /* @__PURE__ */ f("div", { className: C(S), "data-testid": t, children: [
731
+ /* @__PURE__ */ f("div", { className: C(`${S}__heading`), children: [
732
+ a && /* @__PURE__ */ s("div", { className: C(`${S}__icon`), children: a }),
733
+ /* @__PURE__ */ s(Q, { tag: i, variant: "title-100", children: n })
733
734
  ] }),
734
735
  p
735
- ] }), wt = {
736
+ ] }), vt = {
736
737
  "purpur-card-media": "_purpur-card-media_udc1o_1"
737
- }, xt = c.bind(wt), Nt = "purpur-card-media", Ct = ({
738
+ }, yt = l.bind(vt), bt = "purpur-card-media", $t = ({
738
739
  ["data-testid"]: t = "purpur-card-media",
739
740
  className: n,
740
741
  children: a
741
- }) => /* @__PURE__ */ s("div", { className: xt([Nt, n]), "data-testid": t, children: a }), St = {
742
+ }) => /* @__PURE__ */ s("div", { className: yt([bt, n]), "data-testid": t, children: a }), wt = {
742
743
  "purpur-card-media-layout": "_purpur-card-media-layout_1yfvb_1"
743
- }, At = c.bind(St), zt = "purpur-card-media-layout", Ot = ({
744
+ }, xt = l.bind(wt), Nt = "purpur-card-media-layout", Ct = ({
744
745
  ["data-testid"]: t = "purpur-card-media-layout",
745
746
  className: n,
746
747
  children: a
747
- }) => /* @__PURE__ */ s("div", { className: At([zt, n]), "data-testid": t, children: a }), jt = {
748
+ }) => /* @__PURE__ */ s("div", { className: xt([Nt, n]), "data-testid": t, children: a }), St = {
748
749
  "purpur-card-overline": "_purpur-card-overline_192fe_1"
749
- }, Mt = c.bind(jt), qt = "purpur-card-overline", Et = ({
750
+ }, At = l.bind(St), zt = "purpur-card-overline", Ot = ({
750
751
  ["data-testid"]: t = "purpur-card-overline",
751
752
  overline: n
752
- }) => n ? /* @__PURE__ */ s(k, { className: Mt(qt), "data-testid": t, children: n }) : null, kt = {
753
+ }) => n ? /* @__PURE__ */ s(j, { className: At(zt), "data-testid": t, children: n }) : null, jt = {
753
754
  "purpur-card-root": "_purpur-card-root_bqk1d_1",
754
755
  "purpur-card-root--primary": "_purpur-card-root--primary_bqk1d_8",
755
756
  "purpur-card-root--secondary": "_purpur-card-root--secondary_bqk1d_11",
756
757
  "purpur-card-root--full-height": "_purpur-card-root--full-height_bqk1d_14"
757
- }, Zt = {
758
+ }, Mt = {
758
759
  "purpur-card-trigger-item": "_purpur-card-trigger-item_1sp43_1",
759
760
  "purpur-card-trigger-item--button": "_purpur-card-trigger-item--button_1sp43_6",
760
761
  "purpur-card-trigger-item--disabled": "_purpur-card-trigger-item--disabled_1sp43_11"
761
762
  };
762
- function f() {
763
- return f = Object.assign ? Object.assign.bind() : function(t) {
764
- for (var n = 1; n < arguments.length; n++) {
765
- var a = arguments[n];
766
- for (var p in a) ({}).hasOwnProperty.call(a, p) && (t[p] = a[p]);
767
- }
768
- return t;
769
- }, f.apply(null, arguments);
763
+ function L(t, n) {
764
+ if (typeof t == "function")
765
+ return t(n);
766
+ t != null && (t.current = n);
770
767
  }
771
- function It(t, n) {
772
- typeof t == "function" ? t(n) : t != null && (t.current = n);
773
- }
774
- function Lt(...t) {
775
- return (n) => t.forEach(
776
- (a) => It(a, n)
777
- );
768
+ function Et(...t) {
769
+ return (n) => {
770
+ let a = !1;
771
+ const p = t.map((i) => {
772
+ const r = L(i, n);
773
+ return !a && typeof r == "function" && (a = !0), r;
774
+ });
775
+ if (a)
776
+ return () => {
777
+ for (let i = 0; i < p.length; i++) {
778
+ const r = p[i];
779
+ typeof r == "function" ? r() : L(t[i], null);
780
+ }
781
+ };
782
+ };
778
783
  }
779
- const er = /* @__PURE__ */ x((t, n) => {
780
- const { children: a, ...p } = t, i = $.toArray(a), r = i.find(Pt);
784
+ var rr = o.forwardRef((t, n) => {
785
+ const { children: a, ...p } = t, i = o.Children.toArray(a), r = i.find(qt);
781
786
  if (r) {
782
- const e = r.props.children, u = i.map((o) => o === r ? $.count(e) > 1 ? $.only(null) : /* @__PURE__ */ S(e) ? e.props.children : null : o);
783
- return /* @__PURE__ */ w(E, f({}, p, {
784
- ref: n
785
- }), /* @__PURE__ */ S(e) ? /* @__PURE__ */ F(e, void 0, u) : null);
787
+ const e = r.props.children, u = i.map((c) => c === r ? o.Children.count(e) > 1 ? o.Children.only(null) : o.isValidElement(e) ? e.props.children : null : c);
788
+ return /* @__PURE__ */ s(O, { ...p, ref: n, children: o.isValidElement(e) ? o.cloneElement(e, void 0, u) : null });
786
789
  }
787
- return /* @__PURE__ */ w(E, f({}, p, {
788
- ref: n
789
- }), a);
790
+ return /* @__PURE__ */ s(O, { ...p, ref: n, children: a });
790
791
  });
791
- er.displayName = "Slot";
792
- const E = /* @__PURE__ */ x((t, n) => {
792
+ rr.displayName = "Slot";
793
+ var O = o.forwardRef((t, n) => {
793
794
  const { children: a, ...p } = t;
794
- return /* @__PURE__ */ S(a) ? /* @__PURE__ */ F(a, {
795
- ...Rt(p, a.props),
796
- ref: n ? Lt(n, a.ref) : a.ref
797
- }) : $.count(a) > 1 ? $.only(null) : null;
795
+ if (o.isValidElement(a)) {
796
+ const i = Zt(a), r = kt(p, a.props);
797
+ return a.type !== o.Fragment && (r.ref = n ? Et(n, i) : i), o.cloneElement(a, r);
798
+ }
799
+ return o.Children.count(a) > 1 ? o.Children.only(null) : null;
798
800
  });
799
- E.displayName = "SlotClone";
800
- const Tt = ({ children: t }) => /* @__PURE__ */ w(or, null, t);
801
- function Pt(t) {
802
- return /* @__PURE__ */ S(t) && t.type === Tt;
801
+ O.displayName = "SlotClone";
802
+ var Rt = ({ children: t }) => /* @__PURE__ */ s(B, { children: t });
803
+ function qt(t) {
804
+ return o.isValidElement(t) && t.type === Rt;
803
805
  }
804
- function Rt(t, n) {
805
- const a = {
806
- ...n
807
- };
806
+ function kt(t, n) {
807
+ const a = { ...n };
808
808
  for (const p in n) {
809
809
  const i = t[p], r = n[p];
810
810
  /^on[A-Z]/.test(p) ? i && r ? a[p] = (...e) => {
811
811
  r(...e), i(...e);
812
- } : i && (a[p] = i) : p === "style" ? a[p] = {
813
- ...i,
814
- ...r
815
- } : p === "className" && (a[p] = [
816
- i,
817
- r
818
- ].filter(Boolean).join(" "));
812
+ } : i && (a[p] = i) : p === "style" ? a[p] = { ...i, ...r } : p === "className" && (a[p] = [i, r].filter(Boolean).join(" "));
819
813
  }
820
- return {
821
- ...t,
822
- ...a
823
- };
814
+ return { ...t, ...a };
815
+ }
816
+ function Zt(t) {
817
+ var n, a;
818
+ let p = (n = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : n.get, i = p && "isReactWarning" in p && p.isReactWarning;
819
+ return i ? t.ref : (p = (a = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : a.get, i = p && "isReactWarning" in p && p.isReactWarning, i ? t.props.ref : t.props.ref || t.ref);
824
820
  }
825
- const Ht = [
821
+ var It = [
826
822
  "a",
827
823
  "button",
828
824
  "div",
@@ -839,41 +835,43 @@ const Ht = [
839
835
  "span",
840
836
  "svg",
841
837
  "ul"
842
- ], Bt = Ht.reduce((t, n) => {
843
- const a = /* @__PURE__ */ x((p, i) => {
844
- const { asChild: r, ...e } = p, u = r ? er : n;
845
- return sr(() => {
846
- window[Symbol.for("radix-ui")] = !0;
847
- }, []), /* @__PURE__ */ w(u, f({}, e, {
848
- ref: i
849
- }));
838
+ ], Lt = It.reduce((t, n) => {
839
+ const a = o.forwardRef((p, i) => {
840
+ const { asChild: r, ...e } = p, u = r ? rr : n;
841
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ s(u, { ...e, ref: i });
850
842
  });
851
- return a.displayName = `Primitive.${n}`, {
852
- ...t,
853
- [n]: a
854
- };
855
- }, {}), Dt = /* @__PURE__ */ x((t, n) => /* @__PURE__ */ w(Bt.span, f({}, t, {
856
- ref: n,
857
- style: {
858
- // See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
859
- position: "absolute",
860
- border: 0,
861
- width: 1,
862
- height: 1,
863
- padding: 0,
864
- margin: -1,
865
- overflow: "hidden",
866
- clip: "rect(0, 0, 0, 0)",
867
- whiteSpace: "nowrap",
868
- wordWrap: "normal",
869
- ...t.style
870
- }
871
- }))), Vt = Dt, B = ({
843
+ return a.displayName = `Primitive.${n}`, { ...t, [n]: a };
844
+ }, {}), Pt = "VisuallyHidden", tr = o.forwardRef(
845
+ (t, n) => /* @__PURE__ */ s(
846
+ Lt.span,
847
+ {
848
+ ...t,
849
+ ref: n,
850
+ style: {
851
+ // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
852
+ position: "absolute",
853
+ border: 0,
854
+ width: 1,
855
+ height: 1,
856
+ padding: 0,
857
+ margin: -1,
858
+ overflow: "hidden",
859
+ clip: "rect(0, 0, 0, 0)",
860
+ whiteSpace: "nowrap",
861
+ wordWrap: "normal",
862
+ ...t.style
863
+ }
864
+ }
865
+ )
866
+ );
867
+ tr.displayName = Pt;
868
+ var Tt = tr;
869
+ const P = ({
872
870
  asChild: t,
873
871
  children: n,
874
872
  className: a = "",
875
873
  ["data-testid"]: p
876
- }) => /* @__PURE__ */ s(Vt, { asChild: t, "data-testid": p, className: a, children: n }), D = c.bind(Zt), g = "purpur-card-trigger-item", Ft = ({
874
+ }) => /* @__PURE__ */ s(Tt, { asChild: t, "data-testid": p, className: a, children: n }), T = l.bind(Mt), h = "purpur-card-trigger-item", Ht = ({
877
875
  ["data-testid"]: t = "purpur-card-trigger-item",
878
876
  disabled: n = !1,
879
877
  href: a,
@@ -882,44 +880,44 @@ const Ht = [
882
880
  }) => {
883
881
  const r = (u) => {
884
882
  n ? u.preventDefault() : p && p();
885
- }, e = `${g} ${n ? `${g}--disabled` : ""}`;
883
+ }, e = `${h} ${n ? `${h}--disabled` : ""}`;
886
884
  return a ? (
887
885
  // eslint-disable-next-line jsx-a11y/anchor-is-valid
888
886
  /* @__PURE__ */ s(
889
887
  "a",
890
888
  {
891
889
  "aria-disabled": n,
892
- className: `${D([
893
- g,
890
+ className: `${T([
891
+ h,
894
892
  {
895
- [`${g}--disabled`]: n
893
+ [`${h}--disabled`]: n
896
894
  }
897
895
  ])} ${e}`,
898
896
  "data-testid": t,
899
897
  href: n ? void 0 : a,
900
898
  tabIndex: n ? 0 : void 0,
901
899
  onClick: r,
902
- children: /* @__PURE__ */ s(B, { children: i })
900
+ children: /* @__PURE__ */ s(P, { children: i })
903
901
  }
904
902
  )
905
903
  ) : /* @__PURE__ */ s(
906
904
  "button",
907
905
  {
908
906
  "aria-disabled": n,
909
- className: `${D([
910
- g,
911
- `${g}--button`,
907
+ className: `${T([
908
+ h,
909
+ `${h}--button`,
912
910
  {
913
- [`${g}--disabled`]: n
911
+ [`${h}--disabled`]: n
914
912
  }
915
913
  ])} ${e}`,
916
914
  "data-testid": t,
917
915
  type: "button",
918
916
  onClick: r,
919
- children: /* @__PURE__ */ s(B, { children: i })
917
+ children: /* @__PURE__ */ s(P, { children: i })
920
918
  }
921
919
  );
922
- }, Gt = c.bind(kt), M = "purpur-card-root", nr = x(
920
+ }, Bt = l.bind(jt), A = "purpur-card-root", ar = ur(
923
921
  ({
924
922
  ["data-testid"]: t = "purpur-card-root",
925
923
  children: n,
@@ -929,21 +927,21 @@ const Ht = [
929
927
  href: r,
930
928
  onClick: e,
931
929
  screenReaderText: u,
932
- variant: o,
933
- ...A
934
- }, ur) => {
935
- const pr = Gt([
936
- M,
930
+ variant: c,
931
+ ...x
932
+ }, er) => {
933
+ const nr = Bt([
934
+ A,
937
935
  a,
938
936
  {
939
- [`${M}--${o}`]: o,
940
- [`${M}--full-height`]: i
937
+ [`${A}--${c}`]: c,
938
+ [`${A}--full-height`]: i
941
939
  }
942
940
  ]);
943
- return /* @__PURE__ */ h("div", { className: pr, "data-testid": t, ref: ur, ...A, children: [
941
+ return /* @__PURE__ */ f("div", { className: nr, "data-testid": t, ref: er, ...x, children: [
944
942
  n,
945
943
  (e || r) && u && /* @__PURE__ */ s(
946
- Ft,
944
+ Ht,
947
945
  {
948
946
  disabled: p,
949
947
  href: r,
@@ -954,29 +952,29 @@ const Ht = [
954
952
  ] });
955
953
  }
956
954
  );
957
- nr.displayName = "CardRoot";
958
- const V = c.bind(dr), q = "purpur-card", l = ({ children: t, className: n, ...a }) => {
959
- const p = V([
960
- q,
955
+ ar.displayName = "CardRoot";
956
+ const H = l.bind(sr), z = "purpur-card", d = ({ children: t, className: n, ...a }) => {
957
+ const p = H([
958
+ z,
961
959
  n,
962
960
  {
963
- [`${q}--is-interactive`]: a.onClick || a.href,
964
- [`${q}--disabled`]: a.disabled
961
+ [`${z}--is-interactive`]: a.onClick || a.href,
962
+ [`${z}--disabled`]: a.disabled
965
963
  }
966
964
  ]);
967
- return /* @__PURE__ */ s(nr, { className: V(p), ...a, children: t });
965
+ return /* @__PURE__ */ s(ar, { className: H(p), ...a, children: t });
968
966
  };
969
- l.Badge = Lr;
970
- l.Content = Hr;
971
- l.ContentContainer = Vr;
972
- l.Cta = Qr;
973
- l.FeatureList = ht;
974
- l.Overline = Et;
975
- l.Heading = $t;
976
- l.Media = Ct;
977
- l.MediaLayout = Ot;
978
- l.displayName = "Card";
967
+ d.Badge = Rr;
968
+ d.Content = Ir;
969
+ d.ContentContainer = Tr;
970
+ d.Cta = Xr;
971
+ d.FeatureList = lt;
972
+ d.Overline = Ot;
973
+ d.Heading = mt;
974
+ d.Media = $t;
975
+ d.MediaLayout = Ct;
976
+ d.displayName = "Card";
979
977
  export {
980
- l as Card
978
+ d as Card
981
979
  };
982
980
  //# sourceMappingURL=card.es.js.map