@sps-woodland/cards 7.17.9 → 8.0.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/lib/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("@sps-woodland/core"),w=require("react"),s=require("@spscommerce/utils");function B(t){if(t&&t.__esModule)return t;const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:()=>t[i]})}}return n.default=t,Object.freeze(n)}const e=B(w);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[r,[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},r,l?a.addProps(l,{context:"container"}):e.createElement(a.Content,{...d("body")},u),m)}a.Metadata.set(C,{name:"Card"});var _="_1f11ubh0";function b({children:t,className:n="",...i}){return e.createElement(a.CapContentTitle,{className:a.cl(_,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:r,kind:l="general",title:m,metric:u,partnerCount:d,totalPartners:c,...y}){const{t:h}=e.useContext(a.I18nContext),o=a.useChildTestIdAttrBuilder(y),[v,S,k]=(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")},r?e.createElement("i",{className:`sps-icon sps-icon-${r}`,...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,v),e.createElement("div",null,S),e.createElement("div",null,k)),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="_7b9vus0";function x({children:t,className:n,maxHeight:i,style:r,...l}){return e.createElement("div",{className:a.cl(F,n),style:{...r,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:s.code`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("@sps-woodland/core"),B=require("react"),r=require("@spscommerce/utils");function S(t){if(t&&t.__esModule)return 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 _="_1f11ubh0";function b({children:t,className:n="",...i}){return e.createElement(a.CapContentTitle,{className:a.cl(_,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),[v,w,k]=(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,v),e.createElement("div",null,w),e.createElement("div",null,k)),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="_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 (
@@ -7,7 +7,7 @@
7
7
  </Card>
8
8
  );
9
9
  }
10
- `},sections:{react:s.code`
10
+ `},sections:{react:r.code`
11
11
  import { Card } from "@sps-woodland/cards";
12
12
  function Component() {
13
13
  return (
@@ -41,7 +41,7 @@
41
41
  </Card>
42
42
  );
43
43
  }
44
- `},nestedSections:{react:s.code`
44
+ `},nestedSections:{react:r.code`
45
45
  import { Card } from "@sps-woodland/cards";
46
46
  function Component() {
47
47
  return (
@@ -63,8 +63,8 @@
63
63
  </Card>
64
64
  );
65
65
  }
66
- `}}},headers:{label:"Card + Header",description:()=>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."),examples:{title:{react:s.code`
67
- import { SpsButton } from "@spscommerce/ds-react";
66
+ `}}},headers:{label:"Card + Header",description:()=>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."),examples:{title:{react:r.code`
67
+ import { Button } from "@sps-woodland/buttons";
68
68
  import { Card, CardHeader, CardTitle } from "@sps-woodland/cards";
69
69
  import { Icon } from "@sps-woodland/core";
70
70
  import { sprinkles } from "@sps-woodland/tokens";
@@ -77,12 +77,12 @@
77
77
  Jabberwocky
78
78
  </CardTitle>
79
79
  <div>
80
- <SpsButton kind="link" className={sprinkles({ mr: "sm" })}>
80
+ <Button kind="link" className={sprinkles({ mr: "sm" })}>
81
81
  Redefine
82
- </SpsButton>
83
- <SpsButton kind="icon" icon="printer" />
84
- <SpsButton kind="icon" icon="download-cloud" />
85
- <SpsButton className={sprinkles({ ml: "sm" })}>Innovate</SpsButton>
82
+ </Button>
83
+ <Button kind="icon" icon="printer" />
84
+ <Button kind="icon" icon="download-cloud" />
85
+ <Button className={sprinkles({ ml: "sm" })}>Innovate</Button>
86
86
  </div>
87
87
  </CardHeader>
88
88
  <p>
@@ -93,8 +93,8 @@
93
93
  </Card>
94
94
  );
95
95
  }
96
- `}}},footers:{label:"Card + Footer",description:()=>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."),examples:{basicFooter:{react:s.code`
97
- import { SpsButton } from "@spscommerce/ds-react";
96
+ `}}},footers:{label:"Card + Footer",description:()=>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."),examples:{basicFooter:{react:r.code`
97
+ import { Button } from "@sps-woodland/buttons";
98
98
  import { Card, CardFooter } from "@sps-woodland/cards";
99
99
  import { Box } from "@sps-woodland/core";
100
100
  function Component() {
@@ -107,17 +107,17 @@
107
107
  </p>
108
108
  <CardFooter>
109
109
  <Box marginLeft="sm">
110
- <SpsButton kind="link">Manage Settings</SpsButton>
110
+ <Button kind="link">Manage Settings</Button>
111
111
  </Box>
112
112
  <Box marginX="auto">
113
113
  Whales are not fish, but mammals like a cheetah.
114
114
  </Box>
115
- <SpsButton>Buy This</SpsButton>
115
+ <Button>Buy This</Button>
116
116
  </CardFooter>
117
117
  </Card>
118
118
  );
119
119
  }
120
- `}}},tabbed:{label:"Card + Tabs",description:()=>e.createElement(e.Fragment,null,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."),e.createElement("p",null,e.createElement("code",null,"<Item>")," comes from the ",e.createElement("code",null,"@react-stately/collections"),"package, which is a peer dependency of our React components.")),examples:{tabsOnly:{react:s.code`
120
+ `}}},tabbed:{label:"Card + Tabs",description:()=>e.createElement(e.Fragment,null,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."),e.createElement("p",null,e.createElement("code",null,"<Item>")," comes from the ",e.createElement("code",null,"@react-stately/collections"),"package, which is a peer dependency of our React components.")),examples:{tabsOnly:{react:r.code`
121
121
  import { Card } from "@sps-woodland/cards";
122
122
  import { Box, Icon } from "@sps-woodland/core";
123
123
  import { Tabs } from "@sps-woodland/tabs";
@@ -171,7 +171,7 @@
171
171
  </Card>
172
172
  );
173
173
  }
174
- `},activeTabInput:{react:s.code`
174
+ `},activeTabInput:{react:r.code`
175
175
  import { Card } from "@sps-woodland/cards";
176
176
  import { Tabs } from "@sps-woodland/tabs";
177
177
  import { Item } from "@react-stately/collections";
@@ -192,8 +192,9 @@
192
192
  </Card>
193
193
  );
194
194
  }
195
- `}}},everything:{label:"Card + Header + Footer + Tabs",description:()=>e.createElement("p",null,"Headers, Footers, and Tabs can be attached to Cards in any combination."),examples:{everything:{react:s.code`
196
- import { SpsButton, SpsTag } from "@spscommerce/ds-react";
195
+ `}}},everything:{label:"Card + Header + Footer + Tabs",description:()=>e.createElement("p",null,"Headers, Footers, and Tabs can be attached to Cards in any combination."),examples:{everything:{react:r.code`
196
+ import { SpsTag } from "@spscommerce/ds-react";
197
+ import { Button } from "@sps-woodland/buttons";
197
198
  import { Card, CardHeader, CardTitle, CardFooter } from "@sps-woodland/cards";
198
199
  import { Box, Icon } from "@sps-woodland/core";
199
200
  import { Tabs } from "@sps-woodland/tabs";
@@ -208,12 +209,12 @@
208
209
  <Box ml="xs">Panel With Header</Box>
209
210
  </CardTitle>
210
211
  <div>
211
- <SpsButton className={sp({ mr: "sm" })} kind="link">
212
+ <Button className={sp({ mr: "sm" })} kind="link">
212
213
  Redefine
213
- </SpsButton>
214
- <SpsButton kind="icon" icon="printer" />
215
- <SpsButton kind="icon" icon="download-cloud" />
216
- <SpsButton className={sp({ ml: "sm" })}>Innovate</SpsButton>
214
+ </Button>
215
+ <Button kind="icon" icon="printer" />
216
+ <Button kind="icon" icon="download-cloud" />
217
+ <Button className={sp({ ml: "sm" })}>Innovate</Button>
217
218
  </div>
218
219
  </CardHeader>
219
220
  <Tabs>
@@ -259,18 +260,18 @@
259
260
  </Tabs>
260
261
  <CardFooter>
261
262
  <Box ml="auto">
262
- <SpsButton className={sp({ mr: "sm" })} kind="link">
263
+ <Button className={sp({ mr: "sm" })} kind="link">
263
264
  Redefine
264
- </SpsButton>
265
- <SpsButton kind="icon" icon="printer" />
266
- <SpsButton kind="icon" icon="download-cloud" />
267
- <SpsButton className={sp({ ml: "sm" })}>Innovate</SpsButton>
265
+ </Button>
266
+ <Button kind="icon" icon="printer" />
267
+ <Button kind="icon" icon="download-cloud" />
268
+ <Button className={sp({ ml: "sm" })}>Innovate</Button>
268
269
  </Box>
269
270
  </CardFooter>
270
271
  </Card>
271
272
  );
272
273
  }
273
- `}}}}},H={components:[I,f],examples:{basic:{label:"Basic Insight Cards",examples:{basic:{react:s.code`
274
+ `}}}}},H={components:[I,f],examples:{basic:{label:"Basic Insight Cards",examples:{basic:{react:r.code`
274
275
  import { InsightCard, InsightCardSet } from "@sps-woodland/cards";
275
276
  function Component() {
276
277
  return (
@@ -303,7 +304,7 @@
303
304
  </InsightCardSet>
304
305
  );
305
306
  }
306
- `}}},details:{label:"With Details",examples:{details:{react:s.code`
307
+ `}}},details:{label:"With Details",examples:{details:{react:r.code`
307
308
  import { InsightCard, InsightCardSet } from "@sps-woodland/cards";
308
309
  import { Box } from "@sps-woodland/core";
309
310
  function Component() {
@@ -337,7 +338,7 @@
337
338
  </InsightCardSet>
338
339
  );
339
340
  }
340
- `}}},partnerCount:{label:"Partner Count",examples:{partnerCount:{react:s.code`
341
+ `}}},partnerCount:{label:"Partner Count",examples:{partnerCount:{react:r.code`
341
342
  import { InsightCard, InsightCardSet } from "@sps-woodland/cards";
342
343
  function Component() {
343
344
  return (
@@ -380,7 +381,7 @@
380
381
  </InsightCardSet>
381
382
  );
382
383
  }
383
- `}}},alternateIcons:{label:"Using alternate icons",examples:{alternateIcons:{react:s.code`
384
+ `}}},alternateIcons:{label:"Using alternate icons",examples:{alternateIcons:{react:r.code`
384
385
  import { InsightCard, InsightCardSet } from "@sps-woodland/cards";
385
386
  function Component() {
386
387
  return (
@@ -418,7 +419,7 @@
418
419
  </InsightCardSet>
419
420
  );
420
421
  }
421
- `}}},horizontal:{label:"Horizontal",examples:{horizontal:{react:s.code`
422
+ `}}},horizontal:{label:"Horizontal",examples:{horizontal:{react:r.code`
422
423
  import { InsightCard, InsightCardSet } from "@sps-woodland/cards";
423
424
  function Component() {
424
425
  return (
@@ -472,7 +473,7 @@
472
473
  </InsightCardSet>
473
474
  );
474
475
  }
475
- `}}}}},D={components:[x],examples:{basic:{label:"Basic",description:"Basic scrollable container",examples:{text:{react:s.code`
476
+ `}}}}},D={components:[x],examples:{basic:{label:"Basic",description:"Basic scrollable container",examples:{text:{react:r.code`
476
477
  import { Card, ScrollableContainer } from "@sps-woodland/cards";
477
478
  function Component() {
478
479
  return (
@@ -515,7 +516,7 @@
515
516
  </Card>
516
517
  );
517
518
  }
518
- `},components:{react:s.code`
519
+ `},components:{react:r.code`
519
520
  import { Card, ScrollableContainer } from "@sps-woodland/cards";
520
521
  import { SpsClickableTag } from "@spscommerce/ds-react";
521
522
  function Component() {
package/lib/index.es.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { Metadata as s, CapContent as I, cl as c, selectChildren as E, useChildTestIdAttrBuilder as f, addProps as q, Content as N, CapContentTitle as _, I18nContext as F } from "@sps-woodland/core";
2
2
  import * as e from "react";
3
- import { code as i } from "@spscommerce/utils";
3
+ import { code as n } from "@spscommerce/utils";
4
4
  var P = "_1gxcp3j0";
5
5
  function g({
6
6
  children: t,
7
7
  className: a = "",
8
- ...n
8
+ ...i
9
9
  }) {
10
10
  return /* @__PURE__ */ e.createElement(I, {
11
11
  className: c(P, a),
12
- ...n
12
+ ...i
13
13
  }, t);
14
14
  }
15
15
  s.set(g, { name: "CardFooter" });
@@ -17,11 +17,11 @@ var H = "mxozo50";
17
17
  function C({
18
18
  children: t,
19
19
  className: a = "",
20
- ...n
20
+ ...i
21
21
  }) {
22
22
  return /* @__PURE__ */ e.createElement(I, {
23
23
  className: c(H, a),
24
- ...n
24
+ ...i
25
25
  }, t);
26
26
  }
27
27
  s.set(C, { name: "CardHeader" });
@@ -29,7 +29,7 @@ var D = "jyyttb0";
29
29
  function x({
30
30
  children: t,
31
31
  className: a,
32
- ...n
32
+ ...i
33
33
  }) {
34
34
  const [
35
35
  l,
@@ -42,10 +42,10 @@ function x({
42
42
  custom: (m) => s.isWoodlandComponent(m) && s.get(m).name === "Tabs"
43
43
  },
44
44
  { type: g }
45
- ]), d = f(n);
45
+ ]), d = f(i);
46
46
  return /* @__PURE__ */ e.createElement("div", {
47
47
  className: c(D, a),
48
- ...n
48
+ ...i
49
49
  }, l, o ? q(o, { context: "container" }) : /* @__PURE__ */ e.createElement(N, {
50
50
  ...d("body")
51
51
  }, p), u);
@@ -55,11 +55,11 @@ var z = "_1f11ubh0";
55
55
  function y({
56
56
  children: t,
57
57
  className: a = "",
58
- ...n
58
+ ...i
59
59
  }) {
60
60
  return /* @__PURE__ */ e.createElement(_, {
61
61
  className: c(z, a),
62
- ...n
62
+ ...i
63
63
  }, t);
64
64
  }
65
65
  s.set(y, { name: "CardTitle" });
@@ -73,7 +73,7 @@ const W = Object.freeze({
73
73
  function v({
74
74
  children: t,
75
75
  className: a,
76
- horizontal: n = !1,
76
+ horizontal: i = !1,
77
77
  icon: l,
78
78
  kind: o = "general",
79
79
  title: u,
@@ -84,8 +84,8 @@ function v({
84
84
  }) {
85
85
  const { t: h } = e.useContext(F), r = f(b), [
86
86
  w,
87
- S,
88
- B
87
+ B,
88
+ S
89
89
  ] = (d ? h("design-system:insightTile.partnerCount", {
90
90
  count: d,
91
91
  total: m
@@ -94,7 +94,7 @@ function v({
94
94
  className: c(
95
95
  "sps-insight-tile",
96
96
  `sps-insight-tile--${o}`,
97
- n && "sps-insight-tile--horizontal",
97
+ i && "sps-insight-tile--horizontal",
98
98
  t && "sps-insight-tile--has-detail",
99
99
  a
100
100
  ),
@@ -124,7 +124,7 @@ function v({
124
124
  }, t))), d && /* @__PURE__ */ e.createElement("div", {
125
125
  className: "sps-insight-tile__partner-count",
126
126
  ...r("partner-count")
127
- }, d === m ? /* @__PURE__ */ e.createElement("div", null, h("design-system:insightTile.all")) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", null, w), /* @__PURE__ */ e.createElement("div", null, S), /* @__PURE__ */ e.createElement("div", null, B)), /* @__PURE__ */ e.createElement("div", {
127
+ }, d === m ? /* @__PURE__ */ e.createElement("div", null, h("design-system:insightTile.all")) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", null, w), /* @__PURE__ */ e.createElement("div", null, B), /* @__PURE__ */ e.createElement("div", null, S)), /* @__PURE__ */ e.createElement("div", {
128
128
  className: "sps-insight-tile__partners-text"
129
129
  }, h("design-system:insightTile.partners")))));
130
130
  }
@@ -154,13 +154,13 @@ var A = "_7b9vus0";
154
154
  function k({
155
155
  children: t,
156
156
  className: a,
157
- maxHeight: n,
157
+ maxHeight: i,
158
158
  style: l,
159
159
  ...o
160
160
  }) {
161
161
  return /* @__PURE__ */ e.createElement("div", {
162
162
  className: c(A, a),
163
- style: { ...l, maxHeight: n },
163
+ style: { ...l, maxHeight: i },
164
164
  ...o
165
165
  }, t);
166
166
  }
@@ -196,7 +196,7 @@ const R = {
196
196
  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."),
197
197
  examples: {
198
198
  basic: {
199
- react: i`
199
+ react: n`
200
200
  import { Card } from "@sps-woodland/cards";
201
201
  function Component() {
202
202
  return (
@@ -208,7 +208,7 @@ const R = {
208
208
  `
209
209
  },
210
210
  sections: {
211
- react: i`
211
+ react: n`
212
212
  import { Card } from "@sps-woodland/cards";
213
213
  function Component() {
214
214
  return (
@@ -245,7 +245,7 @@ const R = {
245
245
  `
246
246
  },
247
247
  nestedSections: {
248
- react: i`
248
+ react: n`
249
249
  import { Card } from "@sps-woodland/cards";
250
250
  function Component() {
251
251
  return (
@@ -276,8 +276,8 @@ const R = {
276
276
  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."),
277
277
  examples: {
278
278
  title: {
279
- react: i`
280
- import { SpsButton } from "@spscommerce/ds-react";
279
+ react: n`
280
+ import { Button } from "@sps-woodland/buttons";
281
281
  import { Card, CardHeader, CardTitle } from "@sps-woodland/cards";
282
282
  import { Icon } from "@sps-woodland/core";
283
283
  import { sprinkles } from "@sps-woodland/tokens";
@@ -290,12 +290,12 @@ const R = {
290
290
  Jabberwocky
291
291
  </CardTitle>
292
292
  <div>
293
- <SpsButton kind="link" className={sprinkles({ mr: "sm" })}>
293
+ <Button kind="link" className={sprinkles({ mr: "sm" })}>
294
294
  Redefine
295
- </SpsButton>
296
- <SpsButton kind="icon" icon="printer" />
297
- <SpsButton kind="icon" icon="download-cloud" />
298
- <SpsButton className={sprinkles({ ml: "sm" })}>Innovate</SpsButton>
295
+ </Button>
296
+ <Button kind="icon" icon="printer" />
297
+ <Button kind="icon" icon="download-cloud" />
298
+ <Button className={sprinkles({ ml: "sm" })}>Innovate</Button>
299
299
  </div>
300
300
  </CardHeader>
301
301
  <p>
@@ -315,8 +315,8 @@ const R = {
315
315
  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."),
316
316
  examples: {
317
317
  basicFooter: {
318
- react: i`
319
- import { SpsButton } from "@spscommerce/ds-react";
318
+ react: n`
319
+ import { Button } from "@sps-woodland/buttons";
320
320
  import { Card, CardFooter } from "@sps-woodland/cards";
321
321
  import { Box } from "@sps-woodland/core";
322
322
  function Component() {
@@ -329,12 +329,12 @@ const R = {
329
329
  </p>
330
330
  <CardFooter>
331
331
  <Box marginLeft="sm">
332
- <SpsButton kind="link">Manage Settings</SpsButton>
332
+ <Button kind="link">Manage Settings</Button>
333
333
  </Box>
334
334
  <Box marginX="auto">
335
335
  Whales are not fish, but mammals like a cheetah.
336
336
  </Box>
337
- <SpsButton>Buy This</SpsButton>
337
+ <Button>Buy This</Button>
338
338
  </CardFooter>
339
339
  </Card>
340
340
  );
@@ -348,7 +348,7 @@ const R = {
348
348
  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.")),
349
349
  examples: {
350
350
  tabsOnly: {
351
- react: i`
351
+ react: n`
352
352
  import { Card } from "@sps-woodland/cards";
353
353
  import { Box, Icon } from "@sps-woodland/core";
354
354
  import { Tabs } from "@sps-woodland/tabs";
@@ -405,7 +405,7 @@ const R = {
405
405
  `
406
406
  },
407
407
  activeTabInput: {
408
- react: i`
408
+ react: n`
409
409
  import { Card } from "@sps-woodland/cards";
410
410
  import { Tabs } from "@sps-woodland/tabs";
411
411
  import { Item } from "@react-stately/collections";
@@ -435,8 +435,9 @@ const R = {
435
435
  description: () => /* @__PURE__ */ e.createElement("p", null, "Headers, Footers, and Tabs can be attached to Cards in any combination."),
436
436
  examples: {
437
437
  everything: {
438
- react: i`
439
- import { SpsButton, SpsTag } from "@spscommerce/ds-react";
438
+ react: n`
439
+ import { SpsTag } from "@spscommerce/ds-react";
440
+ import { Button } from "@sps-woodland/buttons";
440
441
  import { Card, CardHeader, CardTitle, CardFooter } from "@sps-woodland/cards";
441
442
  import { Box, Icon } from "@sps-woodland/core";
442
443
  import { Tabs } from "@sps-woodland/tabs";
@@ -451,12 +452,12 @@ const R = {
451
452
  <Box ml="xs">Panel With Header</Box>
452
453
  </CardTitle>
453
454
  <div>
454
- <SpsButton className={sp({ mr: "sm" })} kind="link">
455
+ <Button className={sp({ mr: "sm" })} kind="link">
455
456
  Redefine
456
- </SpsButton>
457
- <SpsButton kind="icon" icon="printer" />
458
- <SpsButton kind="icon" icon="download-cloud" />
459
- <SpsButton className={sp({ ml: "sm" })}>Innovate</SpsButton>
457
+ </Button>
458
+ <Button kind="icon" icon="printer" />
459
+ <Button kind="icon" icon="download-cloud" />
460
+ <Button className={sp({ ml: "sm" })}>Innovate</Button>
460
461
  </div>
461
462
  </CardHeader>
462
463
  <Tabs>
@@ -502,12 +503,12 @@ const R = {
502
503
  </Tabs>
503
504
  <CardFooter>
504
505
  <Box ml="auto">
505
- <SpsButton className={sp({ mr: "sm" })} kind="link">
506
+ <Button className={sp({ mr: "sm" })} kind="link">
506
507
  Redefine
507
- </SpsButton>
508
- <SpsButton kind="icon" icon="printer" />
509
- <SpsButton kind="icon" icon="download-cloud" />
510
- <SpsButton className={sp({ ml: "sm" })}>Innovate</SpsButton>
508
+ </Button>
509
+ <Button kind="icon" icon="printer" />
510
+ <Button kind="icon" icon="download-cloud" />
511
+ <Button className={sp({ ml: "sm" })}>Innovate</Button>
511
512
  </Box>
512
513
  </CardFooter>
513
514
  </Card>
@@ -525,7 +526,7 @@ const R = {
525
526
  label: "Basic Insight Cards",
526
527
  examples: {
527
528
  basic: {
528
- react: i`
529
+ react: n`
529
530
  import { InsightCard, InsightCardSet } from "@sps-woodland/cards";
530
531
  function Component() {
531
532
  return (
@@ -566,7 +567,7 @@ const R = {
566
567
  label: "With Details",
567
568
  examples: {
568
569
  details: {
569
- react: i`
570
+ react: n`
570
571
  import { InsightCard, InsightCardSet } from "@sps-woodland/cards";
571
572
  import { Box } from "@sps-woodland/core";
572
573
  function Component() {
@@ -608,7 +609,7 @@ const R = {
608
609
  label: "Partner Count",
609
610
  examples: {
610
611
  partnerCount: {
611
- react: i`
612
+ react: n`
612
613
  import { InsightCard, InsightCardSet } from "@sps-woodland/cards";
613
614
  function Component() {
614
615
  return (
@@ -659,7 +660,7 @@ const R = {
659
660
  label: "Using alternate icons",
660
661
  examples: {
661
662
  alternateIcons: {
662
- react: i`
663
+ react: n`
663
664
  import { InsightCard, InsightCardSet } from "@sps-woodland/cards";
664
665
  function Component() {
665
666
  return (
@@ -705,7 +706,7 @@ const R = {
705
706
  label: "Horizontal",
706
707
  examples: {
707
708
  horizontal: {
708
- react: i`
709
+ react: n`
709
710
  import { InsightCard, InsightCardSet } from "@sps-woodland/cards";
710
711
  function Component() {
711
712
  return (
@@ -772,7 +773,7 @@ const R = {
772
773
  description: "Basic scrollable container",
773
774
  examples: {
774
775
  text: {
775
- react: i`
776
+ react: n`
776
777
  import { Card, ScrollableContainer } from "@sps-woodland/cards";
777
778
  function Component() {
778
779
  return (
@@ -818,7 +819,7 @@ const R = {
818
819
  `
819
820
  },
820
821
  components: {
821
- react: i`
822
+ react: n`
822
823
  import { Card, ScrollableContainer } from "@sps-woodland/cards";
823
824
  import { SpsClickableTag } from "@spscommerce/ds-react";
824
825
  function Component() {
@@ -1,7 +1,7 @@
1
1
  import type { ComponentProps } from "@sps-woodland/core";
2
2
  import type { IconName } from "@sps-woodland/tokens";
3
3
  import * as React from "react";
4
- export type InsightCardKind = "general" | "success" | "error" | "warning" | "processing";
4
+ export declare type InsightCardKind = "general" | "success" | "error" | "warning" | "processing";
5
5
  export declare const InsightCardIcons: Record<InsightCardKind, IconName>;
6
6
  export declare function InsightCard({ children, className, horizontal, icon, kind, title, metric, partnerCount, totalPartners, ...rest }: ComponentProps<{
7
7
  horizontal?: boolean;
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": "7.17.9",
4
+ "version": "8.0.0",
5
5
  "author": "SPS Commerce",
6
6
  "license": "UNLICENSED",
7
7
  "repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/cards",
@@ -14,8 +14,8 @@
14
14
  "@spscommerce/utils": "^6.12.1",
15
15
  "react": "^16.14.0",
16
16
  "react-dom": "^16.14.0",
17
- "@sps-woodland/core": "7.17.9",
18
- "@sps-woodland/tokens": "7.17.9"
17
+ "@sps-woodland/core": "8.0.0",
18
+ "@sps-woodland/tokens": "8.0.0"
19
19
  },
20
20
  "type": "module",
21
21
  "main": "./lib/index.cjs.js",
@@ -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": "7.17.9",
42
- "@sps-woodland/tabs": "7.17.9",
43
- "@sps-woodland/tokens": "7.17.9"
41
+ "@sps-woodland/core": "8.0.0",
42
+ "@sps-woodland/tabs": "8.0.0",
43
+ "@sps-woodland/tokens": "8.0.0"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "pnpm run build:js && pnpm run build:types",