@purpurds/promotion-card 8.3.0 → 8.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { jsxs as _, jsx as l, Fragment as Tr } from "react/jsx-runtime";
2
- import { forwardRef as Gr, useId as qr } from "react";
2
+ import { forwardRef as Mr, useId as qr } from "react";
3
3
  import { useTheme as Vr, useApplyTheme as zr } from "@purpurds/theme";
4
4
  function Wr(e) {
5
5
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
@@ -60,14 +60,14 @@ const Qr = /* @__PURE__ */ Wr(Yr), Jr = {
60
60
  o ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
61
61
  ], n = o ? `<title>${o}</title>` : "";
62
62
  return `<svg ${ee(a)}>${n}${e}</svg>`;
63
- }, ae = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Nr = ({ svg: e, allyTitle: o, className: a, size: n = re, ...p }) => {
63
+ }, ae = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Gr = ({ svg: e, allyTitle: o, className: a, size: n = re, ...p }) => {
64
64
  const r = te({
65
65
  content: ae(e.svg),
66
66
  title: o
67
67
  }), t = Xr(a, tr, `${tr}--${n}`);
68
68
  return /* @__PURE__ */ l("span", { className: t, dangerouslySetInnerHTML: { __html: r }, ...p });
69
69
  };
70
- Nr.displayName = "Icon";
70
+ Gr.displayName = "Icon";
71
71
  const ie = {
72
72
  name: "alert",
73
73
  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>',
@@ -208,7 +208,7 @@ const or = /* @__PURE__ */ ce(fe), L = {
208
208
  const i = he(n), s = or([r, L[P], L[`${P}--${n}`]]);
209
209
  return /* @__PURE__ */ _("span", { className: s, "data-testid": p, ...t, children: [
210
210
  o && i && /* @__PURE__ */ l(
211
- Nr,
211
+ Gr,
212
212
  {
213
213
  "data-testid": `${p}-icon`,
214
214
  allyTitle: a,
@@ -328,25 +328,25 @@ const Se = /* @__PURE__ */ we(Ce), $e = {
328
328
  o ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
329
329
  ], n = o ? `<title>${o}</title>` : "";
330
330
  return `<svg ${Ae(a)}>${n}${e}</svg>`;
331
- }, Me = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), kr = ({ svg: e, allyTitle: o, className: a, size: n = Be, ...p }) => {
331
+ }, ke = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Nr = ({ svg: e, allyTitle: o, className: a, size: n = Be, ...p }) => {
332
332
  const r = Oe({
333
- content: Me(e.svg),
333
+ content: ke(e.svg),
334
334
  title: o
335
335
  }), t = Fe(a, sr, `${sr}--${n}`);
336
336
  return /* @__PURE__ */ l("span", { className: t, dangerouslySetInnerHTML: { __html: r }, ...p });
337
337
  };
338
- kr.displayName = "Icon";
339
- const Ge = {
338
+ Nr.displayName = "Icon";
339
+ const Me = {
340
340
  name: "alert",
341
341
  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>',
342
342
  keywords: ["alert"],
343
343
  category: "status"
344
- }, Ne = {
344
+ }, Ge = {
345
345
  name: "check-circle",
346
346
  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>',
347
347
  keywords: ["check-circle"],
348
348
  category: "status"
349
- }, ke = {
349
+ }, Ne = {
350
350
  name: "devices",
351
351
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M10 3.4a.1.1 0 0 0-.1.1V4a.9.9 0 0 1-1.8 0v-.5c0-1.05.85-1.9 1.9-1.9h10c1.05 0 1.9.85 1.9 1.9v15a1.9 1.9 0 0 1-1.9 1.9h-6a.9.9 0 1 1 0-1.8h6a.1.1 0 0 0 .1-.1v-15a.1.1 0 0 0-.1-.1H10ZM2.1 8c0-1.05.85-1.9 1.9-1.9h6c1.05 0 1.9.85 1.9 1.9v12a1.9 1.9 0 0 1-1.9 1.9H4A1.9 1.9 0 0 1 2.1 20V8ZM4 7.9a.1.1 0 0 0-.1.1v12a.1.1 0 0 0 .1.1h6a.1.1 0 0 0 .1-.1V8a.1.1 0 0 0-.1-.1H4ZM14.6 17a.9.9 0 0 1 .9-.9h.5a.9.9 0 1 1 0 1.8h-.5a.9.9 0 0 1-.9-.9Zm-8.5 1.5a.9.9 0 0 1 .9-.9h.5a.9.9 0 1 1 0 1.8H7a.9.9 0 0 1-.9-.9Z" clip-rule="evenodd"/></svg>',
352
352
  keywords: ["devices"],
@@ -450,11 +450,11 @@ const _r = /* @__PURE__ */ De(Le), H = {
450
450
  case m.INFORMATION:
451
451
  return Ee;
452
452
  case m.GENERAL:
453
- return ke;
454
- case m.SUCCESS:
455
453
  return Ne;
456
- case m.WARNING:
454
+ case m.SUCCESS:
457
455
  return Ge;
456
+ case m.WARNING:
457
+ return Me;
458
458
  case m.ERROR:
459
459
  return Ze;
460
460
  case m.NEUTRAL:
@@ -476,7 +476,7 @@ const _r = /* @__PURE__ */ De(Le), H = {
476
476
  const i = Pe(n), s = _r([r, H[T], H[`${T}--${n}`]]);
477
477
  return /* @__PURE__ */ _("span", { className: s, "data-testid": p, ...t, children: [
478
478
  o && i && /* @__PURE__ */ l(
479
- kr,
479
+ Nr,
480
480
  {
481
481
  "data-testid": `${p}-icon`,
482
482
  allyTitle: a,
@@ -616,24 +616,24 @@ const it = /* @__PURE__ */ et(at), ot = "_rotate_12t9p_1", nt = "_dash_12t9p_1",
616
616
  r: "20"
617
617
  }
618
618
  ) }) }), st = {
619
- "purpur-card-cta--button-styling": "_purpur-card-cta--button-styling_1xiey_1",
620
- "purpur-card-cta--button-styling--xs": "_purpur-card-cta--button-styling--xs_1xiey_33",
621
- "purpur-card-cta--button-styling--icon-only": "_purpur-card-cta--button-styling--icon-only_1xiey_36",
622
- "purpur-card-cta--button-styling--sm": "_purpur-card-cta--button-styling--sm_1xiey_39",
623
- "purpur-card-cta--button-styling--md": "_purpur-card-cta--button-styling--md_1xiey_45",
624
- "purpur-card-cta--button-styling--lg": "_purpur-card-cta--button-styling--lg_1xiey_51",
625
- "purpur-card-cta--button-styling--full-width": "_purpur-card-cta--button-styling--full-width_1xiey_57",
626
- "purpur-card-cta--button-styling--primary": "_purpur-card-cta--button-styling--primary_1xiey_60",
627
- "purpur-card-cta--button-styling--disabled": "_purpur-card-cta--button-styling--disabled_1xiey_64",
628
- "purpur-card-cta--button-styling--primary-negative": "_purpur-card-cta--button-styling--primary-negative_1xiey_70",
629
- "purpur-card-cta--button-styling--secondary": "_purpur-card-cta--button-styling--secondary_1xiey_82",
630
- "purpur-card-cta--button-styling--secondary-negative": "_purpur-card-cta--button-styling--secondary-negative_1xiey_93",
631
- "purpur-card-cta--button-styling--expressive": "_purpur-card-cta--button-styling--expressive_1xiey_104",
632
- "purpur-card-cta--button-styling--expressive-negative": "_purpur-card-cta--button-styling--expressive-negative_1xiey_114",
633
- "purpur-card-cta--cta-styling": "_purpur-card-cta--cta-styling_1xiey_126",
634
- "purpur-card-cta--secondary": "_purpur-card-cta--secondary_1xiey_131",
635
- "purpur-card-cta--disabled": "_purpur-card-cta--disabled_1xiey_131",
636
- "purpur-card-cta--text": "_purpur-card-cta--text_1xiey_139"
619
+ "purpur-card-cta--button-styling": "_purpur-card-cta--button-styling_1stkr_1",
620
+ "purpur-card-cta--button-styling--xs": "_purpur-card-cta--button-styling--xs_1stkr_22",
621
+ "purpur-card-cta--button-styling--icon-only": "_purpur-card-cta--button-styling--icon-only_1stkr_25",
622
+ "purpur-card-cta--button-styling--sm": "_purpur-card-cta--button-styling--sm_1stkr_28",
623
+ "purpur-card-cta--button-styling--md": "_purpur-card-cta--button-styling--md_1stkr_34",
624
+ "purpur-card-cta--button-styling--lg": "_purpur-card-cta--button-styling--lg_1stkr_40",
625
+ "purpur-card-cta--button-styling--full-width": "_purpur-card-cta--button-styling--full-width_1stkr_46",
626
+ "purpur-card-cta--button-styling--primary": "_purpur-card-cta--button-styling--primary_1stkr_64",
627
+ "purpur-card-cta--button-styling--disabled": "_purpur-card-cta--button-styling--disabled_1stkr_68",
628
+ "purpur-card-cta--button-styling--primary-negative": "_purpur-card-cta--button-styling--primary-negative_1stkr_74",
629
+ "purpur-card-cta--button-styling--secondary": "_purpur-card-cta--button-styling--secondary_1stkr_86",
630
+ "purpur-card-cta--button-styling--secondary-negative": "_purpur-card-cta--button-styling--secondary-negative_1stkr_97",
631
+ "purpur-card-cta--button-styling--expressive": "_purpur-card-cta--button-styling--expressive_1stkr_108",
632
+ "purpur-card-cta--button-styling--expressive-negative": "_purpur-card-cta--button-styling--expressive-negative_1stkr_118",
633
+ "purpur-card-cta--cta-styling": "_purpur-card-cta--cta-styling_1stkr_130",
634
+ "purpur-card-cta--secondary": "_purpur-card-cta--secondary_1stkr_135",
635
+ "purpur-card-cta--disabled": "_purpur-card-cta--disabled_1stkr_135",
636
+ "purpur-card-cta--text": "_purpur-card-cta--text_1stkr_143"
637
637
  }, dt = d.bind(st), v = "purpur-card-cta", ct = ({
638
638
  ["data-testid"]: e = "purpur-card-cta",
639
639
  className: o,
@@ -801,7 +801,7 @@ const Bt = /* @__PURE__ */ St(Ft), At = {
801
801
  "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
802
802
  "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
803
803
  "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
804
- }, Ot = Bt.bind(At), Mt = {
804
+ }, Ot = Bt.bind(At), kt = {
805
805
  PARAGRAPH100: "paragraph-100"
806
806
  }, $ = "purpur-paragraph", Q = ({
807
807
  children: e,
@@ -809,7 +809,7 @@ const Bt = /* @__PURE__ */ St(Ft), At = {
809
809
  disabled: a,
810
810
  enableHyphenation: n = !1,
811
811
  negative: p = !1,
812
- variant: r = Mt.PARAGRAPH100,
812
+ variant: r = kt.PARAGRAPH100,
813
813
  ...t
814
814
  }) => {
815
815
  const i = Ot(o, $, `${$}--${r}`, {
@@ -820,11 +820,11 @@ const Bt = /* @__PURE__ */ St(Ft), At = {
820
820
  return /* @__PURE__ */ l("p", { ...t, className: i, children: e });
821
821
  };
822
822
  Q.displayName = "Paragraph";
823
- const Gt = {
823
+ const Mt = {
824
824
  "purpur-card-feature-list": "_purpur-card-feature-list_1hnss_1",
825
825
  "purpur-card-feature-list__list-item": "_purpur-card-feature-list__list-item_1hnss_7",
826
826
  "purpur-card-feature-list__icon": "_purpur-card-feature-list__icon_1hnss_12"
827
- }, q = d.bind(Gt), V = "purpur-card-feature-list", Nt = ({
827
+ }, q = d.bind(Mt), V = "purpur-card-feature-list", Gt = ({
828
828
  ["data-testid"]: e = "purpur-card-feature-list",
829
829
  listItems: o
830
830
  }) => o && o.length > 0 ? /* @__PURE__ */ l("ul", { className: q(V), "data-testid": e, children: o.map((a) => /* @__PURE__ */ _(
@@ -839,7 +839,7 @@ const Gt = {
839
839
  },
840
840
  a
841
841
  )) }) : null;
842
- function kt(e) {
842
+ function Nt(e) {
843
843
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
844
844
  }
845
845
  var br = { exports: {} };
@@ -882,7 +882,7 @@ function Zt() {
882
882
  })(br)), br.exports;
883
883
  }
884
884
  var Et = Zt();
885
- const Ut = /* @__PURE__ */ kt(Et), M = {
885
+ const Ut = /* @__PURE__ */ Nt(Et), k = {
886
886
  "purpur-heading": "_purpur-heading_vo751_1",
887
887
  "purpur-heading--hyphens": "_purpur-heading--hyphens_vo751_8",
888
888
  "purpur-heading--negative": "_purpur-heading--negative_vo751_11",
@@ -904,7 +904,7 @@ const Ut = /* @__PURE__ */ kt(Et), M = {
904
904
  "purpur-heading--display-200": "_purpur-heading--display-200_vo751_104"
905
905
  }, It = {
906
906
  TITLE100: "title-100"
907
- }, G = "purpur-heading", Ur = ({
907
+ }, M = "purpur-heading", Ur = ({
908
908
  children: e,
909
909
  className: o = "",
910
910
  enableHyphenation: a = !1,
@@ -915,11 +915,11 @@ const Ut = /* @__PURE__ */ kt(Et), M = {
915
915
  }) => {
916
916
  const i = p, s = Ut([
917
917
  o,
918
- M[G],
919
- M[`${G}--${r}`],
918
+ k[M],
919
+ k[`${M}--${r}`],
920
920
  {
921
- [M[`${G}--hyphens`]]: a,
922
- [M[`${G}--negative`]]: n
921
+ [k[`${M}--hyphens`]]: a,
922
+ [k[`${M}--negative`]]: n
923
923
  }
924
924
  ]);
925
925
  return /* @__PURE__ */ l(i, { className: s, ...t, children: e });
@@ -983,7 +983,7 @@ const jt = {
983
983
  children: r
984
984
  }
985
985
  );
986
- }, N = d.bind(jt), C = "purpur-card-heading", Lt = ({
986
+ }, G = d.bind(jt), C = "purpur-card-heading", Lt = ({
987
987
  ["data-testid"]: e = "purpur-card-heading",
988
988
  ["aria-label"]: o,
989
989
  title: a,
@@ -998,18 +998,18 @@ const jt = {
998
998
  variant: U = "title-100",
999
999
  ...I
1000
1000
  }) => {
1001
- const A = N(C, {
1001
+ const A = G(C, {
1002
1002
  [`${C}--is-interactive`]: i || s,
1003
1003
  [`${C}--disabled`]: x
1004
1004
  });
1005
1005
  return /* @__PURE__ */ _("div", { className: A, "data-testid": e, children: [
1006
- /* @__PURE__ */ _("div", { className: N(`${C}__header`), children: [
1007
- n && /* @__PURE__ */ l("div", { className: N(`${C}__icon`), children: n }),
1006
+ /* @__PURE__ */ _("div", { className: G(`${C}__header`), children: [
1007
+ n && /* @__PURE__ */ l("div", { className: G(`${C}__icon`), children: n }),
1008
1008
  /* @__PURE__ */ l(
1009
1009
  Ur,
1010
1010
  {
1011
1011
  tag: r,
1012
- className: N(`${C}__heading`),
1012
+ className: G(`${C}__heading`),
1013
1013
  variant: U,
1014
1014
  enableHyphenation: t,
1015
1015
  ...I,
@@ -1063,7 +1063,7 @@ const jt = {
1063
1063
  "purpur-card-root--primary": "_purpur-card-root--primary_eupww_7",
1064
1064
  "purpur-card-root--secondary": "_purpur-card-root--secondary_eupww_10",
1065
1065
  "purpur-card-root--full-height": "_purpur-card-root--full-height_eupww_13"
1066
- }, r0 = d.bind(Xt), z = "purpur-card-root", Ir = Gr(
1066
+ }, r0 = d.bind(Xt), z = "purpur-card-root", Ir = Mr(
1067
1067
  ({
1068
1068
  ["data-testid"]: e = "purpur-card-root",
1069
1069
  children: o,
@@ -1102,7 +1102,7 @@ f.Badge = ze;
1102
1102
  f.Content = Qe;
1103
1103
  f.ContentContainer = rt;
1104
1104
  f.Cta = ct;
1105
- f.FeatureList = Nt;
1105
+ f.FeatureList = Gt;
1106
1106
  f.Overline = Jt;
1107
1107
  f.Heading = Lt;
1108
1108
  f.Media = qt;
@@ -1151,7 +1151,7 @@ function t0() {
1151
1151
  })(Fr)), Fr.exports;
1152
1152
  }
1153
1153
  var a0 = t0();
1154
- const i0 = /* @__PURE__ */ e0(a0), k = {
1154
+ const i0 = /* @__PURE__ */ e0(a0), N = {
1155
1155
  "purpur-heading": "_purpur-heading_vo751_1",
1156
1156
  "purpur-heading--hyphens": "_purpur-heading--hyphens_vo751_8",
1157
1157
  "purpur-heading--negative": "_purpur-heading--negative_vo751_11",
@@ -1184,11 +1184,11 @@ const i0 = /* @__PURE__ */ e0(a0), k = {
1184
1184
  }) => {
1185
1185
  const i = p, s = i0([
1186
1186
  o,
1187
- k[Z],
1188
- k[`${Z}--${r}`],
1187
+ N[Z],
1188
+ N[`${Z}--${r}`],
1189
1189
  {
1190
- [k[`${Z}--hyphens`]]: a,
1191
- [k[`${Z}--negative`]]: n
1190
+ [N[`${Z}--hyphens`]]: a,
1191
+ [N[`${Z}--negative`]]: n
1192
1192
  }
1193
1193
  ]);
1194
1194
  return /* @__PURE__ */ l(i, { className: s, ...t, children: e });
@@ -1280,9 +1280,9 @@ var K = { exports: {} };
1280
1280
  Licensed under the MIT License (MIT), see
1281
1281
  http://jedwatson.github.io/classnames
1282
1282
  */
1283
- var Mr;
1283
+ var kr;
1284
1284
  function f0() {
1285
- return Mr || (Mr = 1, (function(e) {
1285
+ return kr || (kr = 1, (function(e) {
1286
1286
  (function() {
1287
1287
  var o = {}.hasOwnProperty;
1288
1288
  function a() {
@@ -1350,7 +1350,7 @@ const g0 = /* @__PURE__ */ _0(h0), m0 = {
1350
1350
  primary: "var(--purpur-color-text-tone-on-tone-primary)",
1351
1351
  secondary: "var(--purpur-color-text-tone-on-tone-secondary)",
1352
1352
  quaternary: "var(--purpur-color-text-tone-on-tone-tertiary)"
1353
- }, c = g0.bind(m0), u = "purpur-promotion-card", w0 = Gr(
1353
+ }, c = g0.bind(m0), u = "purpur-promotion-card", w0 = Mr(
1354
1354
  ({
1355
1355
  ["data-testid"]: e,
1356
1356
  variant: o = "primary",