@sps-woodland/cards 8.17.1 → 8.17.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/lib/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@sps-woodland/core"),B=require("react"),r=require("@spscommerce/utils");function S(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:()=>t[i]})}}return n.default=t,Object.freeze(n)}const e=S(B);var q="_1gxcp3j0";function p({children:t,className:n="",...i}){return e.createElement(a.CapContent,{className:a.cl(q,n),...i},t)}a.Metadata.set(p,{name:"CardFooter"});var E="mxozo50";function g({children:t,className:n="",...i}){return e.createElement(a.CapContent,{className:a.cl(E,n),...i},t)}a.Metadata.set(g,{name:"CardHeader"});var N="jyyttb0";function C({children:t,className:n,...i}){const[s,[l],m,u]=a.selectChildren(t,[{type:g},{custom:c=>a.Metadata.isWoodlandComponent(c)&&a.Metadata.get(c).name==="Tabs"},{type:p}]),d=a.useChildTestIdAttrBuilder(i);return e.createElement("div",{className:a.cl(N,n),...i},s,l?a.addProps(l,{context:"container"}):e.createElement(a.Content,{...d("body")},u),m)}a.Metadata.set(C,{name:"Card"});var F="_1f11ubh0";function b({children:t,className:n="",...i}){return e.createElement(a.CapContentTitle,{className:a.cl(F,n),...i},t)}a.Metadata.set(b,{name:"CardTitle"});const T=Object.freeze({general:"status-new",success:"status-ok",error:"status-error",warning:"status-warning",processing:"status-in-process"});function I({children:t,className:n,horizontal:i=!1,icon:s,kind:l="general",title:m,metric:u,partnerCount:d,totalPartners:c,...y}){const{t:h}=e.useContext(a.I18nContext),o=a.useChildTestIdAttrBuilder(y),[k,w,v]=(d?h("design-system:insightTile.partnerCount",{count:d,total:c}):"").split("|");return e.createElement(e.Fragment,null,e.createElement("div",{className:a.cl("sps-insight-tile",`sps-insight-tile--${l}`,i&&"sps-insight-tile--horizontal",t&&"sps-insight-tile--has-detail",n),...y},e.createElement("div",{className:"sps-insight-tile__body",...o("body")},s?e.createElement("i",{className:`sps-icon sps-icon-${s}`,...o("icon")}):e.createElement("i",{className:`sps-icon sps-icon-${T[l]}`,...o("icon")}),u&&e.createElement("div",{className:"sps-insight-tile__metric-count",...o("metric")},u),m&&e.createElement("div",{className:"sps-insight-tile__description",...o("description")},e.createElement("div",{className:"sps-insight-tile__title",style:{"-webkit-box-orient":"vertical"},...o("title")},m),e.createElement("div",{className:"sps-insight-tile__detail",...o("detail")},t))),d&&e.createElement("div",{className:"sps-insight-tile__partner-count",...o("partner-count")},d===c?e.createElement("div",null,h("design-system:insightTile.all")):e.createElement(e.Fragment,null,e.createElement("div",null,k),e.createElement("div",null,w),e.createElement("div",null,v)),e.createElement("div",{className:"sps-insight-tile__partners-text"},h("design-system:insightTile.partners")))))}a.Metadata.set(I,{name:"InsightCard",props:{horizontal:{type:"boolean",default:"false"},icon:"IconName",kind:{type:"InsightCardKind",default:'"general"'},title:"string",metric:"number | string",partnerCount:"number",totalPartners:"number"}});function f({children:t,...n}){return e.createElement("div",{className:"insight-tile-wrapper",...n},t)}a.Metadata.set(f,{name:"InsightCardSet"});var P="_7b9vus0";function x({children:t,className:n,maxHeight:i,style:s,...l}){return e.createElement("div",{className:a.cl(P,n),style:{...s,maxHeight:i},...l},t)}a.Metadata.set(x,{name:"ScrollableContainer",props:{maxHeight:"string"}});const D={description:()=>e.createElement("p",null,"Cards are used to group similar or related content together in a single container. They can be combined with additional elements such as Headers, Footers, or Tabs."),components:[C,p,g,b],examples:{general:{label:"General Usage",description:({Link:t,NavigateTo:n})=>e.createElement(e.Fragment,null,e.createElement("h5",null,"Sizing and Layout"),e.createElement("p",null,"All varieties of Cards should be placed on the Woodland Grid (i.e. the width of a Card should span a specific number of grid columns). They should never be set to a custom width. See the ",e.createElement(t,{to:"/style-and-layout/grid"},"Woodland Grid")," and"," ",e.createElement(t,{to:"/style-and-layout/page-types"},"Page Layouts")," sections for more guidance on appropriate usage."),e.createElement("p",null,"The height of a Card should typically be based on the content inside of it, but in specific cases a fixed height can be set. For these cases, content will scroll vertically inside of the container."),e.createElement("h5",null,"Text Content"),e.createElement("p",null,"The only text content that can exist outside of a Card is the"," ",e.createElement(n,{to:"page-title"},"Page Title")," component."),e.createElement("p",null,"All other content should exist inside of a Card and should adhere to the Woodland Design System ",e.createElement(t,{to:"/style-and-layout/typography"},"Typography")," rules."),e.createElement("h5",null,"Nesting"),e.createElement("p",null,"Avoid nesting Cards inside of other Cards when possible. If nesting is necessary, avoid nesting more than one level deep (i.e. limit nesting to a Card inside of a Card)."))},basic:{label:"Basic card",description:()=>e.createElement("p",null,"Basic Cards can include any type of general content, such as body copy, description lists, or more complex content such as forms."),examples:{basic:{react:r.code`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@sps-woodland/core"),B=require("react"),r=require("@spscommerce/utils");function _(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:()=>t[i]})}}return n.default=t,Object.freeze(n)}const e=_(B);var S="pkg_sps-woodland_cards__version_8_17_2__hash_1gxcp3j0";function p({children:t,className:n="",...i}){return e.createElement(a.CapContent,{className:a.cl(S,n),...i},t)}a.Metadata.set(p,{name:"CardFooter"});var q="pkg_sps-woodland_cards__version_8_17_2__hash_mxozo50";function g({children:t,className:n="",...i}){return e.createElement(a.CapContent,{className:a.cl(q,n),...i},t)}a.Metadata.set(g,{name:"CardHeader"});var E="pkg_sps-woodland_cards__version_8_17_2__hash_jyyttb0";function C({children:t,className:n,...i}){const[s,[l],m,u]=a.selectChildren(t,[{type:g},{custom:c=>a.Metadata.isWoodlandComponent(c)&&a.Metadata.get(c).name==="Tabs"},{type:p}]),d=a.useChildTestIdAttrBuilder(i);return e.createElement("div",{className:a.cl(E,n),...i},s,l?a.addProps(l,{context:"container"}):e.createElement(a.Content,{...d("body")},u),m)}a.Metadata.set(C,{name:"Card"});var N="pkg_sps-woodland_cards__version_8_17_2__hash_1f11ubh0";function b({children:t,className:n="",...i}){return e.createElement(a.CapContentTitle,{className:a.cl(N,n),...i},t)}a.Metadata.set(b,{name:"CardTitle"});const k=Object.freeze({general:"status-new",success:"status-ok",error:"status-error",warning:"status-warning",processing:"status-in-process"});function I({children:t,className:n,horizontal:i=!1,icon:s,kind:l="general",title:m,metric:u,partnerCount:d,totalPartners:c,...y}){const{t:h}=e.useContext(a.I18nContext),o=a.useChildTestIdAttrBuilder(y),[w,T,v]=(d?h("design-system:insightTile.partnerCount",{count:d,total:c}):"").split("|");return e.createElement(e.Fragment,null,e.createElement("div",{className:a.cl("sps-insight-tile",`sps-insight-tile--${l}`,i&&"sps-insight-tile--horizontal",t&&"sps-insight-tile--has-detail",n),...y},e.createElement("div",{className:"sps-insight-tile__body",...o("body")},s?e.createElement("i",{className:`sps-icon sps-icon-${s}`,...o("icon")}):e.createElement("i",{className:`sps-icon sps-icon-${k[l]}`,...o("icon")}),u&&e.createElement("div",{className:"sps-insight-tile__metric-count",...o("metric")},u),m&&e.createElement("div",{className:"sps-insight-tile__description",...o("description")},e.createElement("div",{className:"sps-insight-tile__title",style:{"-webkit-box-orient":"vertical"},...o("title")},m),e.createElement("div",{className:"sps-insight-tile__detail",...o("detail")},t))),d&&e.createElement("div",{className:"sps-insight-tile__partner-count",...o("partner-count")},d===c?e.createElement("div",null,h("design-system:insightTile.all")):e.createElement(e.Fragment,null,e.createElement("div",null,w),e.createElement("div",null,T),e.createElement("div",null,v)),e.createElement("div",{className:"sps-insight-tile__partners-text"},h("design-system:insightTile.partners")))))}a.Metadata.set(I,{name:"InsightCard",props:{horizontal:{type:"boolean",default:"false"},icon:"IconName",kind:{type:"InsightCardKind",default:'"general"'},title:"string",metric:"number | string",partnerCount:"number",totalPartners:"number"}});function f({children:t,...n}){return e.createElement("div",{className:"insight-tile-wrapper",...n},t)}a.Metadata.set(f,{name:"InsightCardSet"});var F="pkg_sps-woodland_cards__version_8_17_2__hash_7b9vus0";function x({children:t,className:n,maxHeight:i,style:s,...l}){return e.createElement("div",{className:a.cl(F,n),style:{...s,maxHeight:i},...l},t)}a.Metadata.set(x,{name:"ScrollableContainer",props:{maxHeight:"string"}});const P={description:()=>e.createElement("p",null,"Cards are used to group similar or related content together in a single container. They can be combined with additional elements such as Headers, Footers, or Tabs."),components:[C,p,g,b],examples:{general:{label:"General Usage",description:({Link:t,NavigateTo:n})=>e.createElement(e.Fragment,null,e.createElement("h5",null,"Sizing and Layout"),e.createElement("p",null,"All varieties of Cards should be placed on the Woodland Grid (i.e. the width of a Card should span a specific number of grid columns). They should never be set to a custom width. See the ",e.createElement(t,{to:"/style-and-layout/grid"},"Woodland Grid")," and"," ",e.createElement(t,{to:"/style-and-layout/page-types"},"Page Layouts")," sections for more guidance on appropriate usage."),e.createElement("p",null,"The height of a Card should typically be based on the content inside of it, but in specific cases a fixed height can be set. For these cases, content will scroll vertically inside of the container."),e.createElement("h5",null,"Text Content"),e.createElement("p",null,"The only text content that can exist outside of a Card is the"," ",e.createElement(n,{to:"page-title"},"Page Title")," component."),e.createElement("p",null,"All other content should exist inside of a Card and should adhere to the Woodland Design System ",e.createElement(t,{to:"/style-and-layout/typography"},"Typography")," rules."),e.createElement("h5",null,"Nesting"),e.createElement("p",null,"Avoid nesting Cards inside of other Cards when possible. If nesting is necessary, avoid nesting more than one level deep (i.e. limit nesting to a Card inside of a Card)."))},basic:{label:"Basic card",description:()=>e.createElement("p",null,"Basic Cards can include any type of general content, such as body copy, description lists, or more complex content such as forms."),examples:{basic:{react:r.code`
2
2
  import { Card } from "@sps-woodland/cards";
3
3
  function Component() {
4
4
  return (
@@ -271,7 +271,7 @@
271
271
  </Card>
272
272
  );
273
273
  }
274
- `}}}}},H={components:[I,f],examples:{basic:{label:"Basic Insight Cards",examples:{basic:{react:r.code`
274
+ `}}}}},D={components:[I,f],examples:{basic:{label:"Basic Insight Cards",examples:{basic:{react:r.code`
275
275
  import { InsightCard, InsightCardSet } from "@sps-woodland/cards";
276
276
  function Component() {
277
277
  return (
@@ -473,7 +473,7 @@
473
473
  </InsightCardSet>
474
474
  );
475
475
  }
476
- `}}}}},_={components:[x],examples:{basic:{label:"Basic",description:"Basic scrollable container",examples:{text:{react:r.code`
476
+ `}}}}},H={components:[x],examples:{basic:{label:"Basic",description:"Basic scrollable container",examples:{text:{react:r.code`
477
477
  import { Card, ScrollableContainer } from "@sps-woodland/cards";
478
478
  function Component() {
479
479
  return (
@@ -537,4 +537,4 @@
537
537
  </Card>
538
538
  );
539
539
  }
540
- `}}}}},M={Cards:D,"Insight Cards":H,"Scrollable Container":_};exports.Card=C;exports.CardFooter=p;exports.CardHeader=g;exports.CardTitle=b;exports.InsightCard=I;exports.InsightCardIcons=T;exports.InsightCardSet=f;exports.MANIFEST=M;exports.ScrollableContainer=x;
540
+ `}}}}},M={Cards:P,"Insight Cards":D,"Scrollable Container":H};exports.Card=C;exports.CardFooter=p;exports.CardHeader=g;exports.CardTitle=b;exports.InsightCard=I;exports.InsightCardIcons=k;exports.InsightCardSet=f;exports.MANIFEST=M;exports.ScrollableContainer=x;
package/lib/index.es.js CHANGED
@@ -1,54 +1,54 @@
1
- import { Metadata as r, CapContent as I, cl as c, selectChildren as E, useChildTestIdAttrBuilder as f, addProps as q, Content as N, CapContentTitle as F, I18nContext as P } from "@sps-woodland/core";
1
+ import { Metadata as s, CapContent as I, cl as c, selectChildren as S, useChildTestIdAttrBuilder as f, addProps as E, Content as q, CapContentTitle as N, I18nContext as F } from "@sps-woodland/core";
2
2
  import * as e from "react";
3
- import { code as i } from "@spscommerce/utils";
4
- var H = "_1gxcp3j0";
3
+ import { code as n } from "@spscommerce/utils";
4
+ var P = "pkg_sps-woodland_cards__version_8_17_2__hash_1gxcp3j0";
5
5
  function g({
6
6
  children: t,
7
7
  className: a = "",
8
- ...n
8
+ ...i
9
9
  }) {
10
- return /* @__PURE__ */ e.createElement(I, { className: c(H, a), ...n }, t);
10
+ return /* @__PURE__ */ e.createElement(I, { className: c(P, a), ...i }, t);
11
11
  }
12
- r.set(g, { name: "CardFooter" });
13
- var D = "mxozo50";
12
+ s.set(g, { name: "CardFooter" });
13
+ var H = "pkg_sps-woodland_cards__version_8_17_2__hash_mxozo50";
14
14
  function C({
15
15
  children: t,
16
16
  className: a = "",
17
- ...n
17
+ ...i
18
18
  }) {
19
- return /* @__PURE__ */ e.createElement(I, { className: c(D, a), ...n }, t);
19
+ return /* @__PURE__ */ e.createElement(I, { className: c(H, a), ...i }, t);
20
20
  }
21
- r.set(C, { name: "CardHeader" });
22
- var _ = "jyyttb0";
21
+ s.set(C, { name: "CardHeader" });
22
+ var D = "pkg_sps-woodland_cards__version_8_17_2__hash_jyyttb0";
23
23
  function x({
24
24
  children: t,
25
25
  className: a,
26
- ...n
26
+ ...i
27
27
  }) {
28
28
  const [
29
29
  l,
30
30
  [o],
31
31
  u,
32
32
  p
33
- ] = E(t, [
33
+ ] = S(t, [
34
34
  { type: C },
35
35
  {
36
- custom: (m) => r.isWoodlandComponent(m) && r.get(m).name === "Tabs"
36
+ custom: (m) => s.isWoodlandComponent(m) && s.get(m).name === "Tabs"
37
37
  },
38
38
  { type: g }
39
- ]), d = f(n);
40
- return /* @__PURE__ */ e.createElement("div", { className: c(_, a), ...n }, l, o ? q(o, { context: "container" }) : /* @__PURE__ */ e.createElement(N, { ...d("body") }, p), u);
39
+ ]), d = f(i);
40
+ return /* @__PURE__ */ e.createElement("div", { className: c(D, a), ...i }, l, o ? E(o, { context: "container" }) : /* @__PURE__ */ e.createElement(q, { ...d("body") }, p), u);
41
41
  }
42
- r.set(x, { name: "Card" });
43
- var z = "_1f11ubh0";
44
- function y({
42
+ s.set(x, { name: "Card" });
43
+ var z = "pkg_sps-woodland_cards__version_8_17_2__hash_1f11ubh0";
44
+ function k({
45
45
  children: t,
46
46
  className: a = "",
47
- ...n
47
+ ...i
48
48
  }) {
49
- return /* @__PURE__ */ e.createElement(F, { className: c(z, a), ...n }, t);
49
+ return /* @__PURE__ */ e.createElement(N, { className: c(z, a), ...i }, t);
50
50
  }
51
- r.set(y, { name: "CardTitle" });
51
+ s.set(k, { name: "CardTitle" });
52
52
  const W = Object.freeze({
53
53
  general: "status-new",
54
54
  success: "status-ok",
@@ -56,10 +56,10 @@ const W = Object.freeze({
56
56
  warning: "status-warning",
57
57
  processing: "status-in-process"
58
58
  });
59
- function T({
59
+ function w({
60
60
  children: t,
61
61
  className: a,
62
- horizontal: n = !1,
62
+ horizontal: i = !1,
63
63
  icon: l,
64
64
  kind: o = "general",
65
65
  title: u,
@@ -68,10 +68,10 @@ function T({
68
68
  totalPartners: m,
69
69
  ...b
70
70
  }) {
71
- const { t: h } = e.useContext(P), s = f(b), [
72
- v,
71
+ const { t: h } = e.useContext(F), r = f(b), [
72
+ T,
73
73
  B,
74
- S
74
+ _
75
75
  ] = (d ? h("design-system:insightTile.partnerCount", {
76
76
  count: d,
77
77
  total: m
@@ -82,25 +82,25 @@ function T({
82
82
  className: c(
83
83
  "sps-insight-tile",
84
84
  `sps-insight-tile--${o}`,
85
- n && "sps-insight-tile--horizontal",
85
+ i && "sps-insight-tile--horizontal",
86
86
  t && "sps-insight-tile--has-detail",
87
87
  a
88
88
  ),
89
89
  ...b
90
90
  },
91
- /* @__PURE__ */ e.createElement("div", { className: "sps-insight-tile__body", ...s("body") }, l ? /* @__PURE__ */ e.createElement("i", { className: `sps-icon sps-icon-${l}`, ...s("icon") }) : /* @__PURE__ */ e.createElement("i", { className: `sps-icon sps-icon-${W[o]}`, ...s("icon") }), p && /* @__PURE__ */ e.createElement("div", { className: "sps-insight-tile__metric-count", ...s("metric") }, p), u && /* @__PURE__ */ e.createElement("div", { className: "sps-insight-tile__description", ...s("description") }, /* @__PURE__ */ e.createElement(
91
+ /* @__PURE__ */ e.createElement("div", { className: "sps-insight-tile__body", ...r("body") }, l ? /* @__PURE__ */ e.createElement("i", { className: `sps-icon sps-icon-${l}`, ...r("icon") }) : /* @__PURE__ */ e.createElement("i", { className: `sps-icon sps-icon-${W[o]}`, ...r("icon") }), p && /* @__PURE__ */ e.createElement("div", { className: "sps-insight-tile__metric-count", ...r("metric") }, p), u && /* @__PURE__ */ e.createElement("div", { className: "sps-insight-tile__description", ...r("description") }, /* @__PURE__ */ e.createElement(
92
92
  "div",
93
93
  {
94
94
  className: "sps-insight-tile__title",
95
95
  style: { "-webkit-box-orient": "vertical" },
96
- ...s("title")
96
+ ...r("title")
97
97
  },
98
98
  u
99
- ), /* @__PURE__ */ e.createElement("div", { className: "sps-insight-tile__detail", ...s("detail") }, t))),
100
- d && /* @__PURE__ */ e.createElement("div", { className: "sps-insight-tile__partner-count", ...s("partner-count") }, d === m ? /* @__PURE__ */ e.createElement("div", null, h("design-system:insightTile.all")) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", null, v), /* @__PURE__ */ e.createElement("div", null, B), /* @__PURE__ */ e.createElement("div", null, S)), /* @__PURE__ */ e.createElement("div", { className: "sps-insight-tile__partners-text" }, h("design-system:insightTile.partners")))
99
+ ), /* @__PURE__ */ e.createElement("div", { className: "sps-insight-tile__detail", ...r("detail") }, t))),
100
+ d && /* @__PURE__ */ e.createElement("div", { className: "sps-insight-tile__partner-count", ...r("partner-count") }, d === m ? /* @__PURE__ */ e.createElement("div", null, h("design-system:insightTile.all")) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", null, T), /* @__PURE__ */ e.createElement("div", null, B), /* @__PURE__ */ e.createElement("div", null, _)), /* @__PURE__ */ e.createElement("div", { className: "sps-insight-tile__partners-text" }, h("design-system:insightTile.partners")))
101
101
  ));
102
102
  }
103
- r.set(T, {
103
+ s.set(w, {
104
104
  name: "InsightCard",
105
105
  props: {
106
106
  horizontal: { type: "boolean", default: "false" },
@@ -112,18 +112,18 @@ r.set(T, {
112
112
  totalPartners: "number"
113
113
  }
114
114
  });
115
- function k({
115
+ function y({
116
116
  children: t,
117
117
  ...a
118
118
  }) {
119
119
  return /* @__PURE__ */ e.createElement("div", { className: "insight-tile-wrapper", ...a }, t);
120
120
  }
121
- r.set(k, { name: "InsightCardSet" });
122
- var A = "_7b9vus0";
123
- function w({
121
+ s.set(y, { name: "InsightCardSet" });
122
+ var A = "pkg_sps-woodland_cards__version_8_17_2__hash_7b9vus0";
123
+ function v({
124
124
  children: t,
125
125
  className: a,
126
- maxHeight: n,
126
+ maxHeight: i,
127
127
  style: l,
128
128
  ...o
129
129
  }) {
@@ -131,13 +131,13 @@ function w({
131
131
  "div",
132
132
  {
133
133
  className: c(A, a),
134
- style: { ...l, maxHeight: n },
134
+ style: { ...l, maxHeight: i },
135
135
  ...o
136
136
  },
137
137
  t
138
138
  );
139
139
  }
140
- r.set(w, {
140
+ s.set(v, {
141
141
  name: "ScrollableContainer",
142
142
  props: {
143
143
  maxHeight: "string"
@@ -149,7 +149,7 @@ const R = {
149
149
  x,
150
150
  g,
151
151
  C,
152
- y
152
+ k
153
153
  ],
154
154
  examples: {
155
155
  general: {
@@ -161,7 +161,7 @@ const R = {
161
161
  description: () => /* @__PURE__ */ e.createElement("p", null, "Basic Cards can include any type of general content, such as body copy, description lists, or more complex content such as forms."),
162
162
  examples: {
163
163
  basic: {
164
- react: i`
164
+ react: n`
165
165
  import { Card } from "@sps-woodland/cards";
166
166
  function Component() {
167
167
  return (
@@ -173,7 +173,7 @@ const R = {
173
173
  `
174
174
  },
175
175
  sections: {
176
- react: i`
176
+ react: n`
177
177
  import { Card } from "@sps-woodland/cards";
178
178
  function Component() {
179
179
  return (
@@ -210,7 +210,7 @@ const R = {
210
210
  `
211
211
  },
212
212
  nestedSections: {
213
- react: i`
213
+ react: n`
214
214
  import { Card } from "@sps-woodland/cards";
215
215
  function Component() {
216
216
  return (
@@ -241,7 +241,7 @@ const R = {
241
241
  description: () => /* @__PURE__ */ e.createElement("p", null, "Headers can be attached to a Card to display a title (that describes the content inside the card) or add actions (buttons or links) that relate directly to the content inside of the card. Content is restricted to the left side (for titles) and right side (for actions) of the Header."),
242
242
  examples: {
243
243
  title: {
244
- react: i`
244
+ react: n`
245
245
  import { Button } from "@sps-woodland/buttons";
246
246
  import { Card, CardHeader, CardTitle } from "@sps-woodland/cards";
247
247
  import { Icon } from "@sps-woodland/core";
@@ -280,7 +280,7 @@ const R = {
280
280
  description: () => /* @__PURE__ */ e.createElement("p", null, "Footers can be attached to a Card to add secondary actions (buttons or links) that relate directly to the content inside of it, or other types of general content that may be applicable. Content can be placed in the middle or either side of the Footer."),
281
281
  examples: {
282
282
  basicFooter: {
283
- react: i`
283
+ react: n`
284
284
  import { Button } from "@sps-woodland/buttons";
285
285
  import { Card, CardFooter } from "@sps-woodland/cards";
286
286
  import { Box } from "@sps-woodland/core";
@@ -313,7 +313,7 @@ const R = {
313
313
  description: () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("p", null, "Use Tabs to combine multiple cards with unique but related content. Tabs can include optional details such as icons or tags."), /* @__PURE__ */ e.createElement("p", null, /* @__PURE__ */ e.createElement("code", null, "<Item>"), " comes from the ", /* @__PURE__ */ e.createElement("code", null, "@react-stately/collections"), "package, which is a peer dependency of our React components.")),
314
314
  examples: {
315
315
  tabsOnly: {
316
- react: i`
316
+ react: n`
317
317
  import { Card } from "@sps-woodland/cards";
318
318
  import { Box, Icon } from "@sps-woodland/core";
319
319
  import { Tabs } from "@sps-woodland/tabs";
@@ -370,7 +370,7 @@ const R = {
370
370
  `
371
371
  },
372
372
  activeTabInput: {
373
- react: i`
373
+ react: n`
374
374
  import { Card } from "@sps-woodland/cards";
375
375
  import { Tabs } from "@sps-woodland/tabs";
376
376
  import { Item } from "@react-stately/collections";
@@ -400,7 +400,7 @@ const R = {
400
400
  description: () => /* @__PURE__ */ e.createElement("p", null, "Headers, Footers, and Tabs can be attached to Cards in any combination."),
401
401
  examples: {
402
402
  everything: {
403
- react: i`
403
+ react: n`
404
404
  import { SpsTag } from "@spscommerce/ds-react";
405
405
  import { Button } from "@sps-woodland/buttons";
406
406
  import { Card, CardHeader, CardTitle, CardFooter } from "@sps-woodland/cards";
@@ -485,13 +485,13 @@ const R = {
485
485
  }
486
486
  }
487
487
  }, U = {
488
- components: [T, k],
488
+ components: [w, y],
489
489
  examples: {
490
490
  basic: {
491
491
  label: "Basic Insight Cards",
492
492
  examples: {
493
493
  basic: {
494
- react: i`
494
+ react: n`
495
495
  import { InsightCard, InsightCardSet } from "@sps-woodland/cards";
496
496
  function Component() {
497
497
  return (
@@ -532,7 +532,7 @@ const R = {
532
532
  label: "With Details",
533
533
  examples: {
534
534
  details: {
535
- react: i`
535
+ react: n`
536
536
  import { InsightCard, InsightCardSet } from "@sps-woodland/cards";
537
537
  import { Box } from "@sps-woodland/core";
538
538
  function Component() {
@@ -574,7 +574,7 @@ const R = {
574
574
  label: "Partner Count",
575
575
  examples: {
576
576
  partnerCount: {
577
- react: i`
577
+ react: n`
578
578
  import { InsightCard, InsightCardSet } from "@sps-woodland/cards";
579
579
  function Component() {
580
580
  return (
@@ -625,7 +625,7 @@ const R = {
625
625
  label: "Using alternate icons",
626
626
  examples: {
627
627
  alternateIcons: {
628
- react: i`
628
+ react: n`
629
629
  import { InsightCard, InsightCardSet } from "@sps-woodland/cards";
630
630
  function Component() {
631
631
  return (
@@ -671,7 +671,7 @@ const R = {
671
671
  label: "Horizontal",
672
672
  examples: {
673
673
  horizontal: {
674
- react: i`
674
+ react: n`
675
675
  import { InsightCard, InsightCardSet } from "@sps-woodland/cards";
676
676
  function Component() {
677
677
  return (
@@ -731,14 +731,14 @@ const R = {
731
731
  }
732
732
  }
733
733
  }, M = {
734
- components: [w],
734
+ components: [v],
735
735
  examples: {
736
736
  basic: {
737
737
  label: "Basic",
738
738
  description: "Basic scrollable container",
739
739
  examples: {
740
740
  text: {
741
- react: i`
741
+ react: n`
742
742
  import { Card, ScrollableContainer } from "@sps-woodland/cards";
743
743
  function Component() {
744
744
  return (
@@ -784,7 +784,7 @@ const R = {
784
784
  `
785
785
  },
786
786
  components: {
787
- react: i`
787
+ react: n`
788
788
  import { Card, ScrollableContainer } from "@sps-woodland/cards";
789
789
  import { SpsClickableTag } from "@spscommerce/ds-react";
790
790
  function Component() {
@@ -819,10 +819,10 @@ export {
819
819
  x as Card,
820
820
  g as CardFooter,
821
821
  C as CardHeader,
822
- y as CardTitle,
823
- T as InsightCard,
822
+ k as CardTitle,
823
+ w as InsightCard,
824
824
  W as InsightCardIcons,
825
- k as InsightCardSet,
825
+ y as InsightCardSet,
826
826
  j as MANIFEST,
827
- w as ScrollableContainer
827
+ v as ScrollableContainer
828
828
  };
package/lib/style.css CHANGED
@@ -1 +1 @@
1
- ._1gxcp3j0{border-top-color:#d2d4d4;border-top-style:solid;border-top-width:.0625rem}.mxozo50{border-bottom-color:#d2d4d4;border-bottom-style:solid;border-bottom-width:.0625rem}.jyyttb0{background-clip:border-box;background-color:#fff;border-color:#d2d4d4;border-radius:.25rem;border-style:solid;border-width:.0625rem;display:flex;flex-direction:column;min-width:0;word-wrap:break-word}._1f11ubh0{font-weight:600}._7b9vus0{overflow:scroll;background-attachment:local,local,scroll,scroll;background-color:#fff;background-image:linear-gradient(0deg,#fff,#fff0),linear-gradient(180deg,#fff,#fff0),linear-gradient(0deg,#00000026,#fff0),linear-gradient(180deg,#00000026,#fff0);background-position:100% 100%,0 0,100% 100%,0 0;background-repeat:no-repeat;background-size:100% 3.125rem,100% 3.125rem,100% .625rem,100% .625rem;display:block;overflow-x:hidden;overflow-y:auto}._7b9vus0 .sps-clickable-tag{background-color:#0000004d}
1
+ .pkg_sps-woodland_cards__version_8_17_2__hash_1gxcp3j0{border-top-color:#d2d4d4;border-top-style:solid;border-top-width:.0625rem}.pkg_sps-woodland_cards__version_8_17_2__hash_mxozo50{border-bottom-color:#d2d4d4;border-bottom-style:solid;border-bottom-width:.0625rem}.pkg_sps-woodland_cards__version_8_17_2__hash_jyyttb0{background-clip:border-box;background-color:#fff;border-color:#d2d4d4;border-radius:.25rem;border-style:solid;border-width:.0625rem;display:flex;flex-direction:column;min-width:0;word-wrap:break-word}.pkg_sps-woodland_cards__version_8_17_2__hash_1f11ubh0{font-weight:600}.pkg_sps-woodland_cards__version_8_17_2__hash_7b9vus0{overflow:scroll;background-attachment:local,local,scroll,scroll;background-color:#fff;background-image:linear-gradient(0deg,#fff,#fff0),linear-gradient(180deg,#fff,#fff0),linear-gradient(0deg,#00000026,#fff0),linear-gradient(180deg,#00000026,#fff0);background-position:100% 100%,0 0,100% 100%,0 0;background-repeat:no-repeat;background-size:100% 3.125rem,100% 3.125rem,100% .625rem,100% .625rem;display:block;overflow-x:hidden;overflow-y:auto}.pkg_sps-woodland_cards__version_8_17_2__hash_7b9vus0 .sps-clickable-tag{background-color:#0000004d}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sps-woodland/cards",
3
3
  "description": "SPS Woodland Design System card, insight card, and scrollable container components",
4
- "version": "8.17.1",
4
+ "version": "8.17.2",
5
5
  "author": "SPS Commerce",
6
6
  "license": "UNLICENSED",
7
7
  "repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/cards",
@@ -29,8 +29,8 @@
29
29
  "@spscommerce/utils": "^7.0.0",
30
30
  "react": "^16.14.0",
31
31
  "react-dom": "^16.14.0",
32
- "@sps-woodland/core": "8.17.1",
33
- "@sps-woodland/tokens": "8.17.1"
32
+ "@sps-woodland/core": "8.17.2",
33
+ "@sps-woodland/tokens": "8.17.2"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@react-stately/collections": "^3.6.0",
@@ -38,9 +38,9 @@
38
38
  "@vanilla-extract/css": "^1.9.3",
39
39
  "react": "^16.14.0",
40
40
  "react-dom": "^16.14.0",
41
- "@sps-woodland/core": "8.17.1",
42
- "@sps-woodland/tabs": "8.17.1",
43
- "@sps-woodland/tokens": "8.17.1"
41
+ "@sps-woodland/core": "8.17.2",
42
+ "@sps-woodland/tabs": "8.17.2",
43
+ "@sps-woodland/tokens": "8.17.2"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "pnpm run build:js && pnpm run build:types",
package/vite.config.mjs CHANGED
@@ -1,11 +1,20 @@
1
1
  import path from "path";
2
2
  import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
3
3
  import { defineConfig } from "vite";
4
-
4
+ import { getVanillaExtractPluginProps } from "../../../scripts/vanilla-extract-plugin-props.mjs";
5
5
  import pkg from "./package.json";
6
6
 
7
+ const packageVersion = process.env.PREDICTED_VERSION || pkg.version;
8
+
7
9
  export default defineConfig({
8
- plugins: [vanillaExtractPlugin()],
10
+ plugins: [
11
+ vanillaExtractPlugin(
12
+ getVanillaExtractPluginProps({
13
+ packageName: pkg.name,
14
+ packageVersion,
15
+ })
16
+ ),
17
+ ],
9
18
  build: {
10
19
  lib: {
11
20
  entry: path.resolve(__dirname, "src/index.ts"),