@purpurds/card 7.2.0 → 7.3.1

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,9 +1,9 @@
1
- import { jsxs as $, jsx as s, Fragment as cr } from "react/jsx-runtime";
1
+ import { jsxs as b, jsx as s, Fragment as cr } from "react/jsx-runtime";
2
2
  import { forwardRef as or } from "react";
3
3
  function lr(t) {
4
4
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
5
5
  }
6
- var C = { exports: {} };
6
+ var S = { exports: {} };
7
7
  /*!
8
8
  Copyright (c) 2018 Jed Watson.
9
9
  Licensed under the MIT License (MIT), see
@@ -40,7 +40,7 @@ function dr() {
40
40
  }
41
41
  t.exports ? (e.default = e, t.exports = e) : window.classNames = e;
42
42
  })();
43
- }(C)), C.exports;
43
+ }(S)), S.exports;
44
44
  }
45
45
  var _r = dr();
46
46
  const o = /* @__PURE__ */ lr(_r), gr = {
@@ -99,7 +99,7 @@ const vr = /* @__PURE__ */ hr(mr), yr = {
99
99
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
100
100
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
101
101
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
102
- }, $r = vr.bind(yr), E = "purpur-icon", br = "md", wr = (t) => t.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), xr = ({ content: t = "", title: u } = {}) => {
102
+ }, br = vr.bind(yr), E = "purpur-icon", $r = "md", wr = (t) => t.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), xr = ({ content: t = "", title: u } = {}) => {
103
103
  const e = [
104
104
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
105
105
  { name: "fill", value: "currentColor" },
@@ -112,13 +112,13 @@ const vr = /* @__PURE__ */ hr(mr), yr = {
112
112
  svg: u,
113
113
  allyTitle: e,
114
114
  className: p,
115
- size: i = br,
115
+ size: i = $r,
116
116
  ...r
117
117
  }) => {
118
118
  const a = xr({
119
119
  content: Nr(u.svg),
120
120
  title: e
121
- }), n = $r(p, E, `${E}--${i}`);
121
+ }), n = br(p, E, `${E}--${i}`);
122
122
  return /* @__PURE__ */ s(
123
123
  "span",
124
124
  {
@@ -214,7 +214,7 @@ function qr() {
214
214
  }(L)), L.exports;
215
215
  }
216
216
  var Rr = qr();
217
- const B = /* @__PURE__ */ kr(Rr), S = {
217
+ const B = /* @__PURE__ */ kr(Rr), j = {
218
218
  "purpur-badge": "_purpur-badge_1mlzj_1",
219
219
  "purpur-badge__icon": "_purpur-badge__icon_1mlzj_13",
220
220
  "purpur-badge--attention": "_purpur-badge--attention_1mlzj_17",
@@ -226,7 +226,7 @@ const B = /* @__PURE__ */ kr(Rr), S = {
226
226
  "purpur-badge--warning": "_purpur-badge--warning_1mlzj_41",
227
227
  "purpur-badge--error": "_purpur-badge--error_1mlzj_45",
228
228
  "purpur-badge--black-friday": "_purpur-badge--black-friday_1mlzj_49"
229
- }, j = "purpur-badge", d = {
229
+ }, z = "purpur-badge", d = {
230
230
  ATTENTION: "attention",
231
231
  BLACK_FRIDAY: "black-friday",
232
232
  ERROR: "error",
@@ -267,8 +267,8 @@ const B = /* @__PURE__ */ kr(Rr), S = {
267
267
  className: r = "",
268
268
  ...a
269
269
  }) => {
270
- const n = Hr(p), c = B([r, S[j], S[`${j}--${p}`]]);
271
- return /* @__PURE__ */ $("span", { className: c, "data-testid": i, ...a, children: [
270
+ const n = Hr(p), c = B([r, j[z], j[`${z}--${p}`]]);
271
+ return /* @__PURE__ */ b("span", { className: c, "data-testid": i, ...a, children: [
272
272
  u && n && /* @__PURE__ */ s(
273
273
  rr,
274
274
  {
@@ -276,7 +276,7 @@ const B = /* @__PURE__ */ kr(Rr), S = {
276
276
  allyTitle: e,
277
277
  size: "xs",
278
278
  svg: n,
279
- className: B(S[`${j}__icon`])
279
+ className: B(j[`${z}__icon`])
280
280
  }
281
281
  ),
282
282
  t
@@ -300,33 +300,38 @@ const B = /* @__PURE__ */ kr(Rr), S = {
300
300
  "purpur-card-content": "_purpur-card-content_2uc00_1"
301
301
  }, Vr = o.bind(Ir), Fr = "purpur-card-content", Gr = ({
302
302
  ["data-testid"]: t = "purpur-card-content",
303
- children: u
304
- }) => /* @__PURE__ */ s("div", { className: Vr(Fr), "data-testid": t, children: u }), Dr = {
305
- "purpur-card-content-container": "_purpur-card-content-container_pn6an_1",
306
- "purpur-card-content-container--footer": "_purpur-card-content-container--footer_pn6an_11",
307
- "purpur-card-content-container--gap-size--sm": "_purpur-card-content-container--gap-size--sm_pn6an_19",
308
- "purpur-card-content-container--gap-size--md": "_purpur-card-content-container--gap-size--md_pn6an_22",
309
- "purpur-card-content-container--gap-size--lg": "_purpur-card-content-container--gap-size--lg_pn6an_25"
310
- }, Ur = o.bind(Dr), z = "purpur-card-content-container", Kr = ({
303
+ children: u,
304
+ className: e,
305
+ ...p
306
+ }) => /* @__PURE__ */ s("div", { className: Vr(Fr, e), "data-testid": t, ...p, children: u }), Dr = {
307
+ "purpur-card-content-container": "_purpur-card-content-container_5c1mb_1",
308
+ "purpur-card-content-container--full-height": "_purpur-card-content-container--full-height_5c1mb_6",
309
+ "purpur-card-content-container--footer": "_purpur-card-content-container--footer_5c1mb_14",
310
+ "purpur-card-content-container--gap-size--sm": "_purpur-card-content-container--gap-size--sm_5c1mb_22",
311
+ "purpur-card-content-container--gap-size--md": "_purpur-card-content-container--gap-size--md_5c1mb_25",
312
+ "purpur-card-content-container--gap-size--lg": "_purpur-card-content-container--gap-size--lg_5c1mb_28"
313
+ }, Ur = o.bind(Dr), w = "purpur-card-content-container", Kr = ({
311
314
  ["data-testid"]: t = "purpur-card-content-container",
312
315
  children: u,
313
316
  className: e,
314
317
  isFooter: p = !1,
315
- gapSize: i = "md",
316
- ...r
318
+ fullHeight: i = !1,
319
+ gapSize: r = "md",
320
+ ...a
317
321
  }) => /* @__PURE__ */ s(
318
322
  "div",
319
323
  {
320
324
  className: Ur([
321
- z,
325
+ w,
322
326
  e,
323
- `${z}--gap-size--${i}`,
327
+ `${w}--gap-size--${r}`,
324
328
  {
325
- [`${z}--footer`]: p
329
+ [`${w}--full-height`]: i,
330
+ [`${w}--footer`]: p
326
331
  }
327
332
  ]),
328
333
  "data-testid": t,
329
- ...r,
334
+ ...a,
330
335
  children: u
331
336
  }
332
337
  );
@@ -459,7 +464,7 @@ const F = /* @__PURE__ */ Wr(Jr), Qr = "_rotate_12t9p_1", Xr = "_dash_12t9p_1",
459
464
  ])} ${_}`,
460
465
  "data-testid": t,
461
466
  ...c,
462
- children: r ? /* @__PURE__ */ s(tt, { "data-testid": `${t}-spinner`, size: "xs", disabled: p }) : /* @__PURE__ */ $(cr, { children: [
467
+ children: r ? /* @__PURE__ */ s(tt, { "data-testid": `${t}-spinner`, size: "xs", disabled: p }) : /* @__PURE__ */ b(cr, { children: [
463
468
  i === "left" && e,
464
469
  a,
465
470
  i === "right" && e
@@ -613,7 +618,7 @@ const yt = /* @__PURE__ */ ft(vt), v = {
613
618
  "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
614
619
  "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
615
620
  "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
616
- }, $t = {
621
+ }, bt = {
617
622
  PARAGRAPH100: "paragraph-100"
618
623
  }, y = "purpur-paragraph", q = ({
619
624
  ["data-testid"]: t,
@@ -622,7 +627,7 @@ const yt = /* @__PURE__ */ ft(vt), v = {
622
627
  disabled: p,
623
628
  enableHyphenation: i = !1,
624
629
  negative: r = !1,
625
- variant: a = $t.PARAGRAPH100,
630
+ variant: a = bt.PARAGRAPH100,
626
631
  ...n
627
632
  }) => {
628
633
  const c = yt([
@@ -638,14 +643,14 @@ const yt = /* @__PURE__ */ ft(vt), v = {
638
643
  return /* @__PURE__ */ s("p", { ...n, className: c, "data-testid": t, children: u });
639
644
  };
640
645
  q.displayName = "Paragraph";
641
- const bt = {
646
+ const $t = {
642
647
  "purpur-card-feature-list": "_purpur-card-feature-list_1hnss_1",
643
648
  "purpur-card-feature-list__list-item": "_purpur-card-feature-list__list-item_1hnss_7",
644
649
  "purpur-card-feature-list__icon": "_purpur-card-feature-list__icon_1hnss_12"
645
- }, A = o.bind(bt), O = "purpur-card-feature-list", wt = ({
650
+ }, A = o.bind($t), O = "purpur-card-feature-list", wt = ({
646
651
  ["data-testid"]: t = "purpur-card-feature-list",
647
652
  listItems: u
648
- }) => u && u.length > 0 ? /* @__PURE__ */ s("ul", { className: A(O), "data-testid": t, children: u.map((e) => /* @__PURE__ */ $(
653
+ }) => u && u.length > 0 ? /* @__PURE__ */ s("ul", { className: A(O), "data-testid": t, children: u.map((e) => /* @__PURE__ */ b(
649
654
  "li",
650
655
  {
651
656
  className: A(`${O}__list-item`),
@@ -700,7 +705,7 @@ function Nt() {
700
705
  }(Y)), Y.exports;
701
706
  }
702
707
  var Ct = Nt();
703
- const St = /* @__PURE__ */ xt(Ct), w = {
708
+ const St = /* @__PURE__ */ xt(Ct), x = {
704
709
  "purpur-heading": "_purpur-heading_k9fhq_1",
705
710
  "purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
706
711
  "purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
@@ -718,7 +723,7 @@ const St = /* @__PURE__ */ xt(Ct), w = {
718
723
  "purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
719
724
  }, jt = {
720
725
  TITLE100: "title-100"
721
- }, x = "purpur-heading", er = ({
726
+ }, N = "purpur-heading", er = ({
722
727
  children: t,
723
728
  className: u = "",
724
729
  enableHyphenation: e = !1,
@@ -729,11 +734,11 @@ const St = /* @__PURE__ */ xt(Ct), w = {
729
734
  }) => {
730
735
  const n = i, c = St([
731
736
  u,
732
- w[x],
733
- w[`${x}--${r}`],
737
+ x[N],
738
+ x[`${N}--${r}`],
734
739
  {
735
- [w[`${x}--hyphens`]]: e,
736
- [w[`${x}--negative`]]: p
740
+ [x[`${N}--hyphens`]]: e,
741
+ [x[`${N}--negative`]]: p
737
742
  }
738
743
  ]);
739
744
  return /* @__PURE__ */ s(n, { className: c, ...a, children: t });
@@ -758,8 +763,8 @@ const zt = {
758
763
  children: r,
759
764
  linkElement: a = "a"
760
765
  }) => {
761
- const n = (b) => {
762
- e ? b.preventDefault() : i && i();
766
+ const n = ($) => {
767
+ e ? $.preventDefault() : i && i();
763
768
  }, c = `${g} ${e ? `${g}--disabled` : ""}`;
764
769
  return p ? /* @__PURE__ */ s(
765
770
  a,
@@ -797,7 +802,7 @@ const zt = {
797
802
  children: r
798
803
  }
799
804
  );
800
- }, N = o.bind(zt), h = "purpur-card-heading", Zt = ({
805
+ }, C = o.bind(zt), h = "purpur-card-heading", Zt = ({
801
806
  ["data-testid"]: t = "purpur-card-heading",
802
807
  ["aria-label"]: u,
803
808
  title: e,
@@ -807,23 +812,23 @@ const zt = {
807
812
  enableHyphenation: a,
808
813
  onClick: n = void 0,
809
814
  href: c = void 0,
810
- disabled: b = !1,
815
+ disabled: $ = !1,
811
816
  linkElement: ur = "a",
812
817
  variant: pr = "title-100",
813
818
  ...ir
814
819
  }) => {
815
- const sr = N(h, {
820
+ const sr = C(h, {
816
821
  [`${h}--is-interactive`]: n || c,
817
- [`${h}--disabled`]: b
822
+ [`${h}--disabled`]: $
818
823
  });
819
- return /* @__PURE__ */ $("div", { className: sr, "data-testid": t, children: [
820
- /* @__PURE__ */ $("div", { className: N(`${h}__header`), children: [
821
- p && /* @__PURE__ */ s("div", { className: N(`${h}__icon`), children: p }),
824
+ return /* @__PURE__ */ b("div", { className: sr, "data-testid": t, children: [
825
+ /* @__PURE__ */ b("div", { className: C(`${h}__header`), children: [
826
+ p && /* @__PURE__ */ s("div", { className: C(`${h}__icon`), children: p }),
822
827
  /* @__PURE__ */ s(
823
828
  er,
824
829
  {
825
830
  tag: r,
826
- className: N(`${h}__heading`),
831
+ className: C(`${h}__heading`),
827
832
  variant: pr,
828
833
  enableHyphenation: a,
829
834
  ...ir,
@@ -831,7 +836,7 @@ const zt = {
831
836
  Ot,
832
837
  {
833
838
  "aria-label": u,
834
- disabled: b,
839
+ disabled: $,
835
840
  href: c,
836
841
  onClick: n,
837
842
  linkElement: ur,