@purpurds/card 5.32.0 → 5.34.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/LICENSE.txt +5 -5
- package/dist/card.cjs.js +7 -7
- package/dist/card.cjs.js.map +1 -1
- package/dist/card.es.js +83 -81
- package/dist/card.es.js.map +1 -1
- package/dist/metadata.js +10 -0
- package/dist/styles.css +1 -1
- package/package.json +13 -12
package/dist/card.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as C, jsx as o, Fragment as nr } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as x, Children as
|
|
2
|
+
import { forwardRef as x, Children as b, isValidElement as N, createElement as $, cloneElement as D, useEffect as ur, Fragment as pr } from "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
function ir(a) {
|
|
5
5
|
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
@@ -97,17 +97,17 @@ const dr = /* @__PURE__ */ lr(cr), _r = {
|
|
|
97
97
|
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>',
|
|
98
98
|
keywords: ["alert"],
|
|
99
99
|
category: "status"
|
|
100
|
-
},
|
|
100
|
+
}, mr = {
|
|
101
101
|
name: "check-circle",
|
|
102
102
|
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>',
|
|
103
103
|
keywords: ["check-circle"],
|
|
104
104
|
category: "status"
|
|
105
|
-
},
|
|
105
|
+
}, hr = {
|
|
106
106
|
name: "error",
|
|
107
107
|
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>',
|
|
108
108
|
keywords: ["error"],
|
|
109
109
|
category: "status"
|
|
110
|
-
},
|
|
110
|
+
}, fr = {
|
|
111
111
|
name: "info",
|
|
112
112
|
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>',
|
|
113
113
|
keywords: ["info"],
|
|
@@ -127,7 +127,7 @@ const dr = /* @__PURE__ */ lr(cr), _r = {
|
|
|
127
127
|
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>',
|
|
128
128
|
keywords: ["tag"],
|
|
129
129
|
category: "other"
|
|
130
|
-
},
|
|
130
|
+
}, br = dr.bind(_r), M = "purpur-icon", $r = "md", xr = (a) => a.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), Nr = ({ content: a = "", title: n } = {}) => {
|
|
131
131
|
const e = [
|
|
132
132
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
133
133
|
{ name: "fill", value: "currentColor" },
|
|
@@ -140,13 +140,13 @@ const dr = /* @__PURE__ */ lr(cr), _r = {
|
|
|
140
140
|
svg: n,
|
|
141
141
|
allyTitle: e,
|
|
142
142
|
className: p,
|
|
143
|
-
size: i =
|
|
143
|
+
size: i = $r,
|
|
144
144
|
...r
|
|
145
145
|
}) => {
|
|
146
146
|
const t = Nr({
|
|
147
147
|
content: Cr(n.svg),
|
|
148
148
|
title: e
|
|
149
|
-
}), u =
|
|
149
|
+
}), u = br(p, M, `${M}--${i}`);
|
|
150
150
|
return /* @__PURE__ */ o(
|
|
151
151
|
"span",
|
|
152
152
|
{
|
|
@@ -199,7 +199,7 @@ var G = { exports: {} };
|
|
|
199
199
|
})();
|
|
200
200
|
})(G);
|
|
201
201
|
var kr = G.exports;
|
|
202
|
-
const Sr = /* @__PURE__ */ Ar(kr),
|
|
202
|
+
const Sr = /* @__PURE__ */ Ar(kr), Z = {
|
|
203
203
|
"purpur-badge": "_purpur-badge_19vzu_1",
|
|
204
204
|
"purpur-badge--attention": "_purpur-badge--attention_19vzu_13",
|
|
205
205
|
"purpur-badge--special": "_purpur-badge--special_19vzu_17",
|
|
@@ -209,7 +209,7 @@ const Sr = /* @__PURE__ */ Ar(kr), M = {
|
|
|
209
209
|
"purpur-badge--warning": "_purpur-badge--warning_19vzu_33",
|
|
210
210
|
"purpur-badge--error": "_purpur-badge--error_19vzu_37",
|
|
211
211
|
"purpur-badge--black-friday": "_purpur-badge--black-friday_19vzu_41"
|
|
212
|
-
},
|
|
212
|
+
}, R = "purpur-badge", c = {
|
|
213
213
|
ATTENTION: "attention",
|
|
214
214
|
SPECIAL: "special",
|
|
215
215
|
NEUTRAL: "neutral",
|
|
@@ -224,13 +224,13 @@ const Sr = /* @__PURE__ */ Ar(kr), M = {
|
|
|
224
224
|
case c.SPECIAL:
|
|
225
225
|
return vr;
|
|
226
226
|
case c.INFORMATION:
|
|
227
|
-
return hr;
|
|
228
|
-
case c.SUCCESS:
|
|
229
227
|
return fr;
|
|
228
|
+
case c.SUCCESS:
|
|
229
|
+
return mr;
|
|
230
230
|
case c.WARNING:
|
|
231
231
|
return gr;
|
|
232
232
|
case c.ERROR:
|
|
233
|
-
return
|
|
233
|
+
return hr;
|
|
234
234
|
case c.NEUTRAL:
|
|
235
235
|
return yr;
|
|
236
236
|
case c.BLACK_FRIDAY:
|
|
@@ -247,21 +247,21 @@ const Sr = /* @__PURE__ */ Ar(kr), M = {
|
|
|
247
247
|
className: r = "",
|
|
248
248
|
...t
|
|
249
249
|
}) => {
|
|
250
|
-
const u = Or(e), l = Sr([r,
|
|
250
|
+
const u = Or(e), l = Sr([r, Z[R], Z[`${R}--${e}`]]);
|
|
251
251
|
return /* @__PURE__ */ C("span", { "aria-label": i, className: l, "data-testid": p, ...t, children: [
|
|
252
252
|
n && u && /* @__PURE__ */ o(F, { "data-testid": `${p}-icon`, allyTitle: i, size: "xs", svg: u }),
|
|
253
253
|
a
|
|
254
254
|
] });
|
|
255
|
-
},
|
|
255
|
+
}, Mr = {
|
|
256
256
|
"purpur-card-badge": "_purpur-card-badge_r7moe_1"
|
|
257
|
-
},
|
|
257
|
+
}, Zr = s.bind(Mr), Rr = "purpur-card-badge", zr = ({
|
|
258
258
|
["data-testid"]: a = "purpur-card-badge",
|
|
259
259
|
variant: n,
|
|
260
260
|
text: e
|
|
261
261
|
}) => n && e ? /* @__PURE__ */ o(
|
|
262
262
|
jr,
|
|
263
263
|
{
|
|
264
|
-
className:
|
|
264
|
+
className: Zr(Rr),
|
|
265
265
|
variant: n,
|
|
266
266
|
showIcon: !1,
|
|
267
267
|
"data-testid": a,
|
|
@@ -275,7 +275,7 @@ const Sr = /* @__PURE__ */ Ar(kr), M = {
|
|
|
275
275
|
}) => /* @__PURE__ */ o("div", { className: Pr(Lr), "data-testid": a, children: n }), Ir = {
|
|
276
276
|
"purpur-card-content-container": "_purpur-card-content-container_ueryq_1",
|
|
277
277
|
"purpur-card-content-container--footer": "_purpur-card-content-container--footer_ueryq_12"
|
|
278
|
-
}, Br = s.bind(Ir),
|
|
278
|
+
}, Br = s.bind(Ir), z = "purpur-card-content-container", Hr = ({
|
|
279
279
|
["data-testid"]: a = "purpur-card-content-container",
|
|
280
280
|
children: n,
|
|
281
281
|
isFooter: e = !1
|
|
@@ -283,9 +283,9 @@ const Sr = /* @__PURE__ */ Ar(kr), M = {
|
|
|
283
283
|
"div",
|
|
284
284
|
{
|
|
285
285
|
className: Br([
|
|
286
|
-
|
|
286
|
+
z,
|
|
287
287
|
{
|
|
288
|
-
[`${
|
|
288
|
+
[`${z}--footer`]: e
|
|
289
289
|
}
|
|
290
290
|
]),
|
|
291
291
|
"data-testid": a,
|
|
@@ -332,7 +332,7 @@ var U = { exports: {} };
|
|
|
332
332
|
})();
|
|
333
333
|
})(U);
|
|
334
334
|
var Tr = U.exports;
|
|
335
|
-
const E = /* @__PURE__ */ Dr(Tr), Vr = "_rotate_1xozj_1", Fr = "_dash_1xozj_1",
|
|
335
|
+
const E = /* @__PURE__ */ Dr(Tr), Vr = "_rotate_1xozj_1", Fr = "_dash_1xozj_1", f = {
|
|
336
336
|
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
337
337
|
rotate: Vr,
|
|
338
338
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
@@ -359,15 +359,15 @@ const E = /* @__PURE__ */ Dr(Tr), Vr = "_rotate_1xozj_1", Fr = "_dash_1xozj_1",
|
|
|
359
359
|
}) => /* @__PURE__ */ o(
|
|
360
360
|
"div",
|
|
361
361
|
{
|
|
362
|
-
className: E([
|
|
362
|
+
className: E([f[v], f[`${v}--${p}`]]),
|
|
363
363
|
"data-testid": a,
|
|
364
364
|
...i,
|
|
365
365
|
children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
|
|
366
366
|
"circle",
|
|
367
367
|
{
|
|
368
|
-
className: E(
|
|
369
|
-
[
|
|
370
|
-
[
|
|
368
|
+
className: E(f[`${v}__circle`], {
|
|
369
|
+
[f[`${v}__circle--disabled`]]: n,
|
|
370
|
+
[f[`${v}__circle--negative`]]: e
|
|
371
371
|
}),
|
|
372
372
|
cx: "25",
|
|
373
373
|
cy: "25",
|
|
@@ -376,20 +376,21 @@ const E = /* @__PURE__ */ Dr(Tr), Vr = "_rotate_1xozj_1", Fr = "_dash_1xozj_1",
|
|
|
376
376
|
) })
|
|
377
377
|
}
|
|
378
378
|
), Ur = {
|
|
379
|
-
"purpur-card-cta": "_purpur-card-
|
|
380
|
-
"purpur-card-cta--
|
|
381
|
-
"purpur-card-cta--icon-only": "_purpur-card-cta--icon-
|
|
382
|
-
"purpur-card-cta--
|
|
383
|
-
"purpur-card-cta--
|
|
384
|
-
"purpur-card-cta--
|
|
385
|
-
"purpur-card-cta--
|
|
386
|
-
"purpur-card-cta--
|
|
387
|
-
"purpur-card-cta--
|
|
388
|
-
"purpur-card-cta--
|
|
389
|
-
"purpur-card-cta--secondary
|
|
390
|
-
"purpur-card-cta--
|
|
391
|
-
"purpur-card-cta--expressive
|
|
392
|
-
"purpur-card-cta--
|
|
379
|
+
"purpur-card-cta": "_purpur-card-cta_10ord_1",
|
|
380
|
+
"purpur-card-cta--xs": "_purpur-card-cta--xs_10ord_33",
|
|
381
|
+
"purpur-card-cta--icon-only": "_purpur-card-cta--icon-only_10ord_36",
|
|
382
|
+
"purpur-card-cta--sm": "_purpur-card-cta--sm_10ord_39",
|
|
383
|
+
"purpur-card-cta--md": "_purpur-card-cta--md_10ord_45",
|
|
384
|
+
"purpur-card-cta--lg": "_purpur-card-cta--lg_10ord_51",
|
|
385
|
+
"purpur-card-cta--full-width": "_purpur-card-cta--full-width_10ord_57",
|
|
386
|
+
"purpur-card-cta--primary": "_purpur-card-cta--primary_10ord_60",
|
|
387
|
+
"purpur-card-cta--disabled": "_purpur-card-cta--disabled_10ord_64",
|
|
388
|
+
"purpur-card-cta--primary-negative": "_purpur-card-cta--primary-negative_10ord_70",
|
|
389
|
+
"purpur-card-cta--secondary": "_purpur-card-cta--secondary_10ord_82",
|
|
390
|
+
"purpur-card-cta--secondary-negative": "_purpur-card-cta--secondary-negative_10ord_93",
|
|
391
|
+
"purpur-card-cta--expressive": "_purpur-card-cta--expressive_10ord_104",
|
|
392
|
+
"purpur-card-cta--expressive-negative": "_purpur-card-cta--expressive-negative_10ord_114",
|
|
393
|
+
"purpur-card-cta--text": "_purpur-card-cta--text_10ord_134"
|
|
393
394
|
}, Xr = s.bind(Ur), _ = "purpur-card-cta", Kr = ({
|
|
394
395
|
["data-testid"]: a = "purpur-card-cta",
|
|
395
396
|
className: n,
|
|
@@ -635,20 +636,21 @@ const ca = {
|
|
|
635
636
|
},
|
|
636
637
|
e
|
|
637
638
|
)) }) : null, _a = {
|
|
638
|
-
"purpur-card-link-arrow": "_purpur-card-link-
|
|
639
|
-
"purpur-card-link-arrow--
|
|
640
|
-
"purpur-card-link-arrow--icon-only": "_purpur-card-link-arrow--icon-
|
|
641
|
-
"purpur-card-link-arrow--
|
|
642
|
-
"purpur-card-link-arrow--
|
|
643
|
-
"purpur-card-link-arrow--
|
|
644
|
-
"purpur-card-link-arrow--
|
|
645
|
-
"purpur-card-link-arrow--
|
|
646
|
-
"purpur-card-link-arrow--
|
|
647
|
-
"purpur-card-link-arrow--
|
|
648
|
-
"purpur-card-link-arrow--secondary
|
|
649
|
-
"purpur-card-link-arrow--
|
|
650
|
-
"purpur-card-link-arrow--expressive
|
|
651
|
-
|
|
639
|
+
"purpur-card-link-arrow": "_purpur-card-link-arrow_blsmb_1",
|
|
640
|
+
"purpur-card-link-arrow--xs": "_purpur-card-link-arrow--xs_blsmb_33",
|
|
641
|
+
"purpur-card-link-arrow--icon-only": "_purpur-card-link-arrow--icon-only_blsmb_36",
|
|
642
|
+
"purpur-card-link-arrow--sm": "_purpur-card-link-arrow--sm_blsmb_39",
|
|
643
|
+
"purpur-card-link-arrow--md": "_purpur-card-link-arrow--md_blsmb_45",
|
|
644
|
+
"purpur-card-link-arrow--lg": "_purpur-card-link-arrow--lg_blsmb_51",
|
|
645
|
+
"purpur-card-link-arrow--full-width": "_purpur-card-link-arrow--full-width_blsmb_57",
|
|
646
|
+
"purpur-card-link-arrow--primary": "_purpur-card-link-arrow--primary_blsmb_60",
|
|
647
|
+
"purpur-card-link-arrow--disabled": "_purpur-card-link-arrow--disabled_blsmb_64",
|
|
648
|
+
"purpur-card-link-arrow--primary-negative": "_purpur-card-link-arrow--primary-negative_blsmb_70",
|
|
649
|
+
"purpur-card-link-arrow--secondary": "_purpur-card-link-arrow--secondary_blsmb_82",
|
|
650
|
+
"purpur-card-link-arrow--secondary-negative": "_purpur-card-link-arrow--secondary-negative_blsmb_93",
|
|
651
|
+
"purpur-card-link-arrow--expressive": "_purpur-card-link-arrow--expressive_blsmb_104",
|
|
652
|
+
"purpur-card-link-arrow--expressive-negative": "_purpur-card-link-arrow--expressive-negative_blsmb_114"
|
|
653
|
+
}, ga = s.bind(_a), m = "purpur-card-link-arrow", ma = ({
|
|
652
654
|
["data-testid"]: a = "purpur-card-link-arrow",
|
|
653
655
|
className: n,
|
|
654
656
|
disabled: e = !1,
|
|
@@ -658,60 +660,60 @@ const ca = {
|
|
|
658
660
|
"div",
|
|
659
661
|
{
|
|
660
662
|
className: `${ga([
|
|
661
|
-
|
|
663
|
+
m,
|
|
662
664
|
n,
|
|
663
|
-
`${
|
|
664
|
-
`${
|
|
665
|
-
`${
|
|
665
|
+
`${m}--md`,
|
|
666
|
+
`${m}--icon-only`,
|
|
667
|
+
`${m}--secondary`,
|
|
666
668
|
{
|
|
667
|
-
[`${
|
|
669
|
+
[`${m}--disabled`]: e
|
|
668
670
|
}
|
|
669
|
-
])} ${
|
|
671
|
+
])} ${m}`,
|
|
670
672
|
"data-testid": a,
|
|
671
673
|
...i,
|
|
672
674
|
children: p ? /* @__PURE__ */ o(X, { "data-testid": `${a}-spinner`, size: "xs", disabled: e }) : /* @__PURE__ */ o(W, { "data-testid": `${a}-arrow`, size: "md" })
|
|
673
675
|
}
|
|
674
|
-
),
|
|
676
|
+
), ha = {
|
|
675
677
|
"purpur-card-overline": "_purpur-card-overline_192fe_1"
|
|
676
|
-
},
|
|
678
|
+
}, fa = s.bind(ha), va = "purpur-card-overline", ya = ({
|
|
677
679
|
["data-testid"]: a = "purpur-card-overline",
|
|
678
680
|
overline: n
|
|
679
|
-
}) => n ? /* @__PURE__ */ o(j, { className:
|
|
681
|
+
}) => n ? /* @__PURE__ */ o(j, { className: fa(va), "data-testid": a, children: n }) : null, wa = {
|
|
680
682
|
"purpur-card-root": "_purpur-card-root_bqk1d_1",
|
|
681
683
|
"purpur-card-root--primary": "_purpur-card-root--primary_bqk1d_8",
|
|
682
684
|
"purpur-card-root--secondary": "_purpur-card-root--secondary_bqk1d_11",
|
|
683
685
|
"purpur-card-root--full-height": "_purpur-card-root--full-height_bqk1d_14"
|
|
684
|
-
},
|
|
686
|
+
}, ba = {
|
|
685
687
|
"purpur-card-trigger-item": "_purpur-card-trigger-item_1sp43_1",
|
|
686
688
|
"purpur-card-trigger-item--button": "_purpur-card-trigger-item--button_1sp43_6",
|
|
687
689
|
"purpur-card-trigger-item--disabled": "_purpur-card-trigger-item--disabled_1sp43_11"
|
|
688
690
|
};
|
|
689
|
-
function
|
|
690
|
-
return
|
|
691
|
+
function h() {
|
|
692
|
+
return h = Object.assign ? Object.assign.bind() : function(a) {
|
|
691
693
|
for (var n = 1; n < arguments.length; n++) {
|
|
692
694
|
var e = arguments[n];
|
|
693
695
|
for (var p in e) ({}).hasOwnProperty.call(e, p) && (a[p] = e[p]);
|
|
694
696
|
}
|
|
695
697
|
return a;
|
|
696
|
-
},
|
|
698
|
+
}, h.apply(null, arguments);
|
|
697
699
|
}
|
|
698
|
-
function
|
|
700
|
+
function $a(a, n) {
|
|
699
701
|
typeof a == "function" ? a(n) : a != null && (a.current = n);
|
|
700
702
|
}
|
|
701
703
|
function xa(...a) {
|
|
702
704
|
return (n) => a.forEach(
|
|
703
|
-
(e) =>
|
|
705
|
+
(e) => $a(e, n)
|
|
704
706
|
);
|
|
705
707
|
}
|
|
706
708
|
const Q = /* @__PURE__ */ x((a, n) => {
|
|
707
|
-
const { children: e, ...p } = a, i =
|
|
709
|
+
const { children: e, ...p } = a, i = b.toArray(e), r = i.find(Ca);
|
|
708
710
|
if (r) {
|
|
709
|
-
const t = r.props.children, u = i.map((l) => l === r ?
|
|
710
|
-
return /* @__PURE__ */
|
|
711
|
+
const t = r.props.children, u = i.map((l) => l === r ? b.count(t) > 1 ? b.only(null) : /* @__PURE__ */ N(t) ? t.props.children : null : l);
|
|
712
|
+
return /* @__PURE__ */ $(S, h({}, p, {
|
|
711
713
|
ref: n
|
|
712
714
|
}), /* @__PURE__ */ N(t) ? /* @__PURE__ */ D(t, void 0, u) : null);
|
|
713
715
|
}
|
|
714
|
-
return /* @__PURE__ */
|
|
716
|
+
return /* @__PURE__ */ $(S, h({}, p, {
|
|
715
717
|
ref: n
|
|
716
718
|
}), e);
|
|
717
719
|
});
|
|
@@ -721,10 +723,10 @@ const S = /* @__PURE__ */ x((a, n) => {
|
|
|
721
723
|
return /* @__PURE__ */ N(e) ? /* @__PURE__ */ D(e, {
|
|
722
724
|
...Aa(p, e.props),
|
|
723
725
|
ref: n ? xa(n, e.ref) : e.ref
|
|
724
|
-
}) :
|
|
726
|
+
}) : b.count(e) > 1 ? b.only(null) : null;
|
|
725
727
|
});
|
|
726
728
|
S.displayName = "SlotClone";
|
|
727
|
-
const Na = ({ children: a }) => /* @__PURE__ */
|
|
729
|
+
const Na = ({ children: a }) => /* @__PURE__ */ $(pr, null, a);
|
|
728
730
|
function Ca(a) {
|
|
729
731
|
return /* @__PURE__ */ N(a) && a.type === Na;
|
|
730
732
|
}
|
|
@@ -771,7 +773,7 @@ const ka = [
|
|
|
771
773
|
const { asChild: r, ...t } = p, u = r ? Q : n;
|
|
772
774
|
return ur(() => {
|
|
773
775
|
window[Symbol.for("radix-ui")] = !0;
|
|
774
|
-
}, []), /* @__PURE__ */
|
|
776
|
+
}, []), /* @__PURE__ */ $(u, h({}, t, {
|
|
775
777
|
ref: i
|
|
776
778
|
}));
|
|
777
779
|
});
|
|
@@ -779,7 +781,7 @@ const ka = [
|
|
|
779
781
|
...a,
|
|
780
782
|
[n]: e
|
|
781
783
|
};
|
|
782
|
-
}, {}), Oa = /* @__PURE__ */ x((a, n) => /* @__PURE__ */
|
|
784
|
+
}, {}), Oa = /* @__PURE__ */ x((a, n) => /* @__PURE__ */ $(Sa.span, h({}, a, {
|
|
783
785
|
ref: n,
|
|
784
786
|
style: {
|
|
785
787
|
// See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
|
|
@@ -800,7 +802,7 @@ const ka = [
|
|
|
800
802
|
children: n,
|
|
801
803
|
className: e = "",
|
|
802
804
|
["data-testid"]: p
|
|
803
|
-
}) => /* @__PURE__ */ o(ja, { asChild: a, "data-testid": p, className: e, children: n }), B = s.bind(
|
|
805
|
+
}) => /* @__PURE__ */ o(ja, { asChild: a, "data-testid": p, className: e, children: n }), B = s.bind(ba), g = "purpur-card-trigger-item", Ma = ({
|
|
804
806
|
["data-testid"]: a = "purpur-card-trigger-item",
|
|
805
807
|
disabled: n = !1,
|
|
806
808
|
href: e,
|
|
@@ -845,7 +847,7 @@ const ka = [
|
|
|
845
847
|
children: /* @__PURE__ */ o(I, { children: i })
|
|
846
848
|
}
|
|
847
849
|
);
|
|
848
|
-
},
|
|
850
|
+
}, Za = s.bind(wa), A = "purpur-card-root", rr = x(
|
|
849
851
|
({
|
|
850
852
|
["data-testid"]: a = "purpur-card-root",
|
|
851
853
|
children: n,
|
|
@@ -858,7 +860,7 @@ const ka = [
|
|
|
858
860
|
variant: l,
|
|
859
861
|
...ar
|
|
860
862
|
}, er) => {
|
|
861
|
-
const tr =
|
|
863
|
+
const tr = Za([
|
|
862
864
|
A,
|
|
863
865
|
e,
|
|
864
866
|
{
|
|
@@ -869,7 +871,7 @@ const ka = [
|
|
|
869
871
|
return /* @__PURE__ */ C("div", { className: tr, "data-testid": a, ref: er, ...ar, children: [
|
|
870
872
|
n,
|
|
871
873
|
(t || r) && u && /* @__PURE__ */ o(
|
|
872
|
-
|
|
874
|
+
Ma,
|
|
873
875
|
{
|
|
874
876
|
disabled: p,
|
|
875
877
|
href: r,
|
|
@@ -892,8 +894,8 @@ const H = s.bind(sr), k = "purpur-card", d = ({ children: a, className: n, ...e
|
|
|
892
894
|
]);
|
|
893
895
|
return /* @__PURE__ */ o(rr, { className: H(p), ...e, children: a });
|
|
894
896
|
};
|
|
895
|
-
d.Badge =
|
|
896
|
-
d.LinkArrow =
|
|
897
|
+
d.Badge = zr;
|
|
898
|
+
d.LinkArrow = ma;
|
|
897
899
|
d.Content = qr;
|
|
898
900
|
d.ContentContainer = Hr;
|
|
899
901
|
d.Cta = Kr;
|