@purpurds/content-block 5.24.2 → 5.25.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/content-block.cjs.js +6 -6
- package/dist/content-block.cjs.js.map +1 -1
- package/dist/content-block.es.js +75 -74
- package/dist/content-block.es.js.map +1 -1
- package/package.json +8 -8
- package/src/content-block-group.module.scss +1 -1
- package/src/content-block.module.scss +1 -1
package/dist/content-block.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as w, jsx as l, Fragment as K } from "react/jsx-runtime";
|
|
2
2
|
import S, { forwardRef as X, Children as Q } from "react";
|
|
3
3
|
function rr(t) {
|
|
4
4
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
@@ -165,7 +165,7 @@ const fr = /* @__PURE__ */ vr(mr), M = {
|
|
|
165
165
|
"purpur-badge--warning": "_purpur-badge--warning_1r1mu_33",
|
|
166
166
|
"purpur-badge--error": "_purpur-badge--error_1r1mu_37",
|
|
167
167
|
"purpur-badge--black-friday": "_purpur-badge--black-friday_1r1mu_41"
|
|
168
|
-
}, Z = "purpur-badge",
|
|
168
|
+
}, Z = "purpur-badge", g = {
|
|
169
169
|
ATTENTION: "attention",
|
|
170
170
|
SPECIAL: "special",
|
|
171
171
|
NEUTRAL: "neutral",
|
|
@@ -176,20 +176,20 @@ const fr = /* @__PURE__ */ vr(mr), M = {
|
|
|
176
176
|
BLACK_FRIDAY: "black-friday"
|
|
177
177
|
}, yr = (t) => {
|
|
178
178
|
switch (t) {
|
|
179
|
-
case
|
|
180
|
-
case
|
|
179
|
+
case g.ATTENTION:
|
|
180
|
+
case g.SPECIAL:
|
|
181
181
|
return lr;
|
|
182
|
-
case
|
|
182
|
+
case g.INFORMATION:
|
|
183
183
|
return ir;
|
|
184
|
-
case
|
|
184
|
+
case g.SUCCESS:
|
|
185
185
|
return ur;
|
|
186
|
-
case
|
|
186
|
+
case g.WARNING:
|
|
187
187
|
return nr;
|
|
188
|
-
case
|
|
188
|
+
case g.ERROR:
|
|
189
189
|
return pr;
|
|
190
|
-
case
|
|
190
|
+
case g.NEUTRAL:
|
|
191
191
|
return or;
|
|
192
|
-
case
|
|
192
|
+
case g.BLACK_FRIDAY:
|
|
193
193
|
return sr;
|
|
194
194
|
default:
|
|
195
195
|
return;
|
|
@@ -204,7 +204,7 @@ const fr = /* @__PURE__ */ vr(mr), M = {
|
|
|
204
204
|
...e
|
|
205
205
|
}) => {
|
|
206
206
|
const a = yr(n), o = fr([r, M[Z], M[`${Z}--${n}`]]);
|
|
207
|
-
return /* @__PURE__ */
|
|
207
|
+
return /* @__PURE__ */ w("span", { "aria-label": p, className: o, "data-testid": i, ...e, children: [
|
|
208
208
|
u && a && /* @__PURE__ */ l(E, { "data-testid": `${i}-icon`, allyTitle: p, size: "xs", svg: a }),
|
|
209
209
|
t
|
|
210
210
|
] });
|
|
@@ -363,7 +363,7 @@ const Lr = /* @__PURE__ */ jr(Er), Pr = {
|
|
|
363
363
|
"purpur-cta-link--secondary-negative": "_purpur-cta-link--secondary-negative_1mhg7_87",
|
|
364
364
|
"purpur-cta-link--expressive": "_purpur-cta-link--expressive_1mhg7_98",
|
|
365
365
|
"purpur-cta-link--expressive-negative": "_purpur-cta-link--expressive-negative_1mhg7_108"
|
|
366
|
-
}, Rr = Lr.bind(Pr),
|
|
366
|
+
}, Rr = Lr.bind(Pr), v = "purpur-cta-link", Cr = {
|
|
367
367
|
forward: Ar,
|
|
368
368
|
external: Sr,
|
|
369
369
|
back: Nr,
|
|
@@ -375,34 +375,35 @@ const Lr = /* @__PURE__ */ jr(Er), Pr = {
|
|
|
375
375
|
["data-testid"]: n,
|
|
376
376
|
fullWidth: i = !1,
|
|
377
377
|
iconOnly: p = !1,
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
378
|
+
showIcon: r = !0,
|
|
379
|
+
negative: e = !1,
|
|
380
|
+
size: a = "md",
|
|
381
|
+
variant: o,
|
|
382
|
+
icon: _ = "forward",
|
|
383
|
+
...m
|
|
384
|
+
}, h) => {
|
|
385
|
+
const N = Rr(
|
|
385
386
|
[
|
|
386
387
|
u,
|
|
387
|
-
|
|
388
|
-
`${
|
|
389
|
-
`${
|
|
388
|
+
v,
|
|
389
|
+
`${v}--${e ? `${o}-negative` : o}`,
|
|
390
|
+
`${v}--${a}`
|
|
390
391
|
],
|
|
391
392
|
{
|
|
392
|
-
[`${
|
|
393
|
-
[`${
|
|
394
|
-
[`${
|
|
393
|
+
[`${v}--icon-only`]: p,
|
|
394
|
+
[`${v}--negative`]: e,
|
|
395
|
+
[`${v}--full-width`]: i
|
|
395
396
|
}
|
|
396
|
-
), b = Cr[
|
|
397
|
-
(
|
|
398
|
-
!p && t,
|
|
399
|
-
(
|
|
400
|
-
] }),
|
|
401
|
-
...
|
|
402
|
-
className:
|
|
397
|
+
), b = Cr[_], x = /* @__PURE__ */ w(K, { children: [
|
|
398
|
+
r && (_ === "back" || _ === "phone") && /* @__PURE__ */ l(A, { svg: b, size: a === "lg" ? "sm" : "xs" }),
|
|
399
|
+
(!p || p && !r) && t,
|
|
400
|
+
r && (_ === "forward" || _ === "external") && /* @__PURE__ */ l(A, { svg: b, size: a === "lg" ? "sm" : "xs" })
|
|
401
|
+
] }), s = {
|
|
402
|
+
...m,
|
|
403
|
+
className: N,
|
|
403
404
|
"data-testid": n
|
|
404
405
|
};
|
|
405
|
-
return "href" in
|
|
406
|
+
return "href" in m && m.href ? /* @__PURE__ */ l("a", { ...s, ref: h, children: x }) : /* @__PURE__ */ l("span", { ...s, ref: h, children: x });
|
|
406
407
|
}
|
|
407
408
|
);
|
|
408
409
|
function Hr(t) {
|
|
@@ -445,7 +446,7 @@ var C = { exports: {} };
|
|
|
445
446
|
})();
|
|
446
447
|
})(C);
|
|
447
448
|
var Vr = C.exports;
|
|
448
|
-
const Dr = /* @__PURE__ */ Hr(Vr),
|
|
449
|
+
const Dr = /* @__PURE__ */ Hr(Vr), k = {
|
|
449
450
|
"purpur-heading": "_purpur-heading_k9fhq_1",
|
|
450
451
|
"purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
|
|
451
452
|
"purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
|
|
@@ -470,7 +471,7 @@ const Dr = /* @__PURE__ */ Hr(Vr), $ = {
|
|
|
470
471
|
TITLE600: "title-600",
|
|
471
472
|
TITLE700: "title-700",
|
|
472
473
|
SUBSECTION100: "subsection-100"
|
|
473
|
-
},
|
|
474
|
+
}, $ = "purpur-heading", B = ({
|
|
474
475
|
["data-testid"]: t,
|
|
475
476
|
children: u,
|
|
476
477
|
className: n = "",
|
|
@@ -480,16 +481,16 @@ const Dr = /* @__PURE__ */ Hr(Vr), $ = {
|
|
|
480
481
|
variant: e = Gr.TITLE100,
|
|
481
482
|
...a
|
|
482
483
|
}) => {
|
|
483
|
-
const o = r,
|
|
484
|
+
const o = r, _ = Dr([
|
|
484
485
|
n,
|
|
485
|
-
$
|
|
486
|
-
|
|
486
|
+
k[$],
|
|
487
|
+
k[`${$}--${e}`],
|
|
487
488
|
{
|
|
488
|
-
[
|
|
489
|
-
[
|
|
489
|
+
[k[`${$}--hyphens`]]: i,
|
|
490
|
+
[k[`${$}--negative`]]: p
|
|
490
491
|
}
|
|
491
492
|
]);
|
|
492
|
-
return /* @__PURE__ */ l(o, { ...a, className:
|
|
493
|
+
return /* @__PURE__ */ l(o, { ...a, className: _, "data-testid": t, children: u });
|
|
493
494
|
};
|
|
494
495
|
B.displayName = "Heading";
|
|
495
496
|
function zr(t) {
|
|
@@ -625,7 +626,7 @@ var G = { exports: {} };
|
|
|
625
626
|
})();
|
|
626
627
|
})(G);
|
|
627
628
|
var te = G.exports;
|
|
628
|
-
const ae = /* @__PURE__ */ ee(te),
|
|
629
|
+
const ae = /* @__PURE__ */ ee(te), f = {
|
|
629
630
|
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
630
631
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
631
632
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
@@ -651,7 +652,7 @@ const ae = /* @__PURE__ */ ee(te), m = {
|
|
|
651
652
|
ADDITIONAL100MEDIUM: "additional-100-medium",
|
|
652
653
|
OVERLINE100: "overline-100",
|
|
653
654
|
OVERLINE200: "overline-200"
|
|
654
|
-
},
|
|
655
|
+
}, y = "purpur-paragraph", z = ({
|
|
655
656
|
["data-testid"]: t,
|
|
656
657
|
children: u,
|
|
657
658
|
className: n,
|
|
@@ -663,12 +664,12 @@ const ae = /* @__PURE__ */ ee(te), m = {
|
|
|
663
664
|
}) => {
|
|
664
665
|
const o = ae([
|
|
665
666
|
n,
|
|
666
|
-
|
|
667
|
-
|
|
667
|
+
f[y],
|
|
668
|
+
f[`${y}--${e}`],
|
|
668
669
|
{
|
|
669
|
-
[
|
|
670
|
-
[
|
|
671
|
-
[
|
|
670
|
+
[f[`${y}--hyphens`]]: p,
|
|
671
|
+
[f[`${y}--disabled`]]: i,
|
|
672
|
+
[f[`${y}--negative`]]: r
|
|
672
673
|
}
|
|
673
674
|
]);
|
|
674
675
|
return /* @__PURE__ */ l("p", { ...a, className: o, "data-testid": t, children: u });
|
|
@@ -747,7 +748,7 @@ const U = /* @__PURE__ */ ue(pe), ie = {
|
|
|
747
748
|
return /* @__PURE__ */ l("div", { className: r, "data-testid": i, ...p, children: Q.map(t, (a) => S.isValidElement(a) ? S.cloneElement(a, { negative: n }) : a) });
|
|
748
749
|
};
|
|
749
750
|
W.displayName = "ContentBlockGroup";
|
|
750
|
-
const
|
|
751
|
+
const d = U.bind(ie), c = "purpur-content-block", Y = ({
|
|
751
752
|
["data-testid"]: t,
|
|
752
753
|
className: u,
|
|
753
754
|
negative: n,
|
|
@@ -757,48 +758,48 @@ const c = U.bind(ie), s = "purpur-content-block", Y = ({
|
|
|
757
758
|
title: e,
|
|
758
759
|
ctas: a,
|
|
759
760
|
usp: o,
|
|
760
|
-
headingTag:
|
|
761
|
-
headingVariant:
|
|
762
|
-
onCtaClick:
|
|
763
|
-
children:
|
|
764
|
-
...
|
|
761
|
+
headingTag: _ = "h2",
|
|
762
|
+
headingVariant: m = "title-300",
|
|
763
|
+
onCtaClick: h,
|
|
764
|
+
children: N,
|
|
765
|
+
...b
|
|
765
766
|
}) => {
|
|
766
|
-
const
|
|
767
|
+
const x = d([
|
|
767
768
|
u,
|
|
768
|
-
|
|
769
|
+
c,
|
|
769
770
|
{
|
|
770
|
-
[`${
|
|
771
|
+
[`${c}--negative`]: n
|
|
771
772
|
}
|
|
772
773
|
]);
|
|
773
|
-
return /* @__PURE__ */
|
|
774
|
-
/* @__PURE__ */ l("div", { className:
|
|
775
|
-
/* @__PURE__ */ l("div", { className:
|
|
776
|
-
r ? /* @__PURE__ */ l(wr, { variant: "special", className:
|
|
777
|
-
e && e.trim() && /* @__PURE__ */ l(B, { variant:
|
|
778
|
-
/* @__PURE__ */ l("div", { className:
|
|
779
|
-
o != null && o.length ? /* @__PURE__ */ l("ul", { className:
|
|
780
|
-
(
|
|
774
|
+
return /* @__PURE__ */ w("div", { "data-testid": t, className: x, ...b, children: [
|
|
775
|
+
/* @__PURE__ */ l("div", { className: d(`${c}__section`), children: p ? /* @__PURE__ */ l("div", { className: d(`${c}__video-wrapper`), children: p }) : /* @__PURE__ */ l("div", { className: d(`${c}__image-wrapper`), children: i }) }),
|
|
776
|
+
/* @__PURE__ */ l("div", { className: d(`${c}__section`), children: /* @__PURE__ */ w("div", { className: d(`${c}__content-wrapper`), children: [
|
|
777
|
+
r ? /* @__PURE__ */ l(wr, { variant: "special", className: d(`${c}__badge`), children: r }) : null,
|
|
778
|
+
e && e.trim() && /* @__PURE__ */ l(B, { variant: m, tag: _, negative: n, children: e }),
|
|
779
|
+
/* @__PURE__ */ l("div", { className: d(`${c}__content`), children: N }),
|
|
780
|
+
o != null && o.length ? /* @__PURE__ */ l("ul", { className: d(`${c}__usp-list`), children: o.map(
|
|
781
|
+
(s) => s && /* @__PURE__ */ w("li", { className: d(`${c}__usp-list-item`), children: [
|
|
781
782
|
/* @__PURE__ */ l(
|
|
782
783
|
V,
|
|
783
784
|
{
|
|
784
785
|
size: "xs",
|
|
785
|
-
className:
|
|
786
|
+
className: d(`${c}__usp-list-item-icon`)
|
|
786
787
|
}
|
|
787
788
|
),
|
|
788
|
-
/* @__PURE__ */ l(z, { negative: n, children:
|
|
789
|
-
] },
|
|
789
|
+
/* @__PURE__ */ l(z, { negative: n, children: s })
|
|
790
|
+
] }, s)
|
|
790
791
|
) }) : null,
|
|
791
|
-
a && a.length > 0 && /* @__PURE__ */ l("div", { className:
|
|
792
|
-
(
|
|
792
|
+
a && a.length > 0 && /* @__PURE__ */ l("div", { className: d(`${c}__links`), children: a.map(
|
|
793
|
+
(s, J) => s.href && /* @__PURE__ */ l(
|
|
793
794
|
Br,
|
|
794
795
|
{
|
|
795
|
-
href:
|
|
796
|
+
href: s.href,
|
|
796
797
|
variant: J === 0 ? "primary" : "secondary",
|
|
797
798
|
negative: n,
|
|
798
|
-
onClick: () =>
|
|
799
|
-
children:
|
|
799
|
+
onClick: () => h == null ? void 0 : h(s),
|
|
800
|
+
children: s.text
|
|
800
801
|
},
|
|
801
|
-
|
|
802
|
+
s.text + s.href
|
|
802
803
|
)
|
|
803
804
|
) })
|
|
804
805
|
] }) })
|