@sps-woodland/cards 8.34.1 → 8.34.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.js CHANGED
@@ -2,7 +2,7 @@ import { Metadata as s, CapContent as f, cl as m, selectChildren as S, useChildT
2
2
  import * as e from "react";
3
3
  import { useWoodlandLanguage as F } from "@spscommerce/i18n";
4
4
  import { code as i } from "@spscommerce/utils";
5
- var P = "pkg_sps-woodland_cards__version_8_34_1__hash_1gxcp3j0";
5
+ var P = "pkg_sps-woodland_cards__version_8_34_2__hash_1gxcp3j0";
6
6
  function g({
7
7
  children: t,
8
8
  className: a = "",
@@ -11,7 +11,7 @@ function g({
11
11
  return /* @__PURE__ */ e.createElement(f, { className: m(P, a), ...n }, t);
12
12
  }
13
13
  s.set(g, { name: "CardFooter" });
14
- var H = "pkg_sps-woodland_cards__version_8_34_1__hash_mxozo50";
14
+ var H = "pkg_sps-woodland_cards__version_8_34_2__hash_mxozo50";
15
15
  function C({
16
16
  children: t,
17
17
  className: a = "",
@@ -20,7 +20,7 @@ function C({
20
20
  return /* @__PURE__ */ e.createElement(f, { className: m(H, a), ...n }, t);
21
21
  }
22
22
  s.set(C, { name: "CardHeader" });
23
- var D = "pkg_sps-woodland_cards__version_8_34_1__hash_jyyttb0";
23
+ var D = "pkg_sps-woodland_cards__version_8_34_2__hash_jyyttb0";
24
24
  function x({
25
25
  children: t,
26
26
  className: a,
@@ -41,7 +41,7 @@ function x({
41
41
  return /* @__PURE__ */ e.createElement("div", { className: m(D, a), ...n }, d, o ? E(o, { context: "container" }) : /* @__PURE__ */ e.createElement(q, { ...l("body") }, p), u);
42
42
  }
43
43
  s.set(x, { name: "Card" });
44
- var z = "pkg_sps-woodland_cards__version_8_34_1__hash_1f11ubh0";
44
+ var z = "pkg_sps-woodland_cards__version_8_34_2__hash_1f11ubh0";
45
45
  function k({
46
46
  children: t,
47
47
  className: a = "",
@@ -121,7 +121,7 @@ function v({
121
121
  return /* @__PURE__ */ e.createElement("div", { className: "insight-tile-wrapper", ...a }, t);
122
122
  }
123
123
  s.set(v, { name: "InsightCardSet" });
124
- var A = "pkg_sps-woodland_cards__version_8_34_1__hash_7b9vus0";
124
+ var A = "pkg_sps-woodland_cards__version_8_34_2__hash_7b9vus0";
125
125
  function T({
126
126
  children: t,
127
127
  className: a,
package/lib/index.umd.cjs CHANGED
@@ -1,4 +1,4 @@
1
- (function(i,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("@sps-woodland/core"),require("react"),require("@spscommerce/i18n"),require("@spscommerce/utils")):typeof define=="function"&&define.amd?define(["exports","@sps-woodland/core","react","@spscommerce/i18n","@spscommerce/utils"],t):(i=typeof globalThis<"u"?globalThis:i||self,t(i.Cards={},i.core,i.React,i.i18n,i.utils))})(this,function(i,t,x,v,r){"use strict";function B(a){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const s in a)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(a,s);Object.defineProperty(n,s,o.get?o:{enumerable:!0,get:()=>a[s]})}}return n.default=a,Object.freeze(n)}const e=B(x);var _="pkg_sps-woodland_cards__version_8_34_1__hash_1gxcp3j0";function u({children:a,className:n="",...s}){return e.createElement(t.CapContent,{className:t.cl(_,n),...s},a)}t.Metadata.set(u,{name:"CardFooter"});var S="pkg_sps-woodland_cards__version_8_34_1__hash_mxozo50";function p({children:a,className:n="",...s}){return e.createElement(t.CapContent,{className:t.cl(S,n),...s},a)}t.Metadata.set(p,{name:"CardHeader"});var q="pkg_sps-woodland_cards__version_8_34_1__hash_jyyttb0";function C({children:a,className:n,...s}){const[o,[d],h,g]=t.selectChildren(a,[{type:p},{custom:m=>t.Metadata.isWoodlandComponent(m)&&t.Metadata.get(m).name==="Tabs"},{type:u}]),c=t.useChildTestIdAttrBuilder(s);return e.createElement("div",{className:t.cl(q,n),...s},o,d?t.addProps(d,{context:"container"}):e.createElement(t.Content,{...c("body")},g),h)}t.Metadata.set(C,{name:"Card"});var E="pkg_sps-woodland_cards__version_8_34_1__hash_1f11ubh0";function b({children:a,className:n="",...s}){return e.createElement(t.CapContentTitle,{className:t.cl(E,n),...s},a)}t.Metadata.set(b,{name:"CardTitle"});const y=Object.freeze({general:"status-new",success:"status-ok",error:"status-error",warning:"status-warning",processing:"status-in-process"});function f({children:a,className:n,horizontal:s=!1,icon:o,kind:d="general",title:h,metric:g,partnerCount:c,totalPartners:m,...k}){const{t:w}=v.useWoodlandLanguage(),l=t.useChildTestIdAttrBuilder(k),[M,z,A]=(c?w("insightTile.partnerCount",{count:c,total:m,defaultValue:`${c} |of| ${m}`}):"").split("|");return e.createElement(e.Fragment,null,e.createElement("div",{className:t.cl("sps-insight-tile",`sps-insight-tile--${d}`,s&&"sps-insight-tile--horizontal",a&&"sps-insight-tile--has-detail",n),...k},e.createElement("div",{className:"sps-insight-tile__body",...l("body")},o?e.createElement("i",{className:`sps-icon sps-icon-${o}`,...l("icon")}):e.createElement("i",{className:`sps-icon sps-icon-${y[d]}`,...l("icon")}),g&&e.createElement("div",{className:"sps-insight-tile__metric-count",...l("metric")},g),h&&e.createElement("div",{className:"sps-insight-tile__description",...l("description")},e.createElement("div",{className:"sps-insight-tile__title",style:{"-webkit-box-orient":"vertical"},...l("title")},h),e.createElement("div",{className:"sps-insight-tile__detail",...l("detail")},a))),c&&e.createElement("div",{className:"sps-insight-tile__partner-count",...l("partner-count")},c===m?e.createElement("div",null,w("insightTile.all",{defaultValue:"ALL"})):e.createElement(e.Fragment,null,e.createElement("div",null,M),e.createElement("div",null,z),e.createElement("div",null,A)),e.createElement("div",{className:"sps-insight-tile__partners-text"},w("insightTile.partners",{defaultValue:"PARTNERS"})))))}t.Metadata.set(f,{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 I({children:a,...n}){return e.createElement("div",{className:"insight-tile-wrapper",...n},a)}t.Metadata.set(I,{name:"InsightCardSet"});var N="pkg_sps-woodland_cards__version_8_34_1__hash_7b9vus0";function T({children:a,className:n,maxHeight:s,style:o,...d}){return e.createElement("div",{className:t.cl(N,n),style:{...o,maxHeight:s},...d},a)}t.Metadata.set(T,{name:"ScrollableContainer",props:{maxHeight:"string"}});const F={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,u,p,b],examples:{general:{label:"General Usage",description:({Link:a,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(a,{to:"/style-and-layout/grid"},"Woodland Grid")," and"," ",e.createElement(a,{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(a,{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
+ (function(i,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("@sps-woodland/core"),require("react"),require("@spscommerce/i18n"),require("@spscommerce/utils")):typeof define=="function"&&define.amd?define(["exports","@sps-woodland/core","react","@spscommerce/i18n","@spscommerce/utils"],t):(i=typeof globalThis<"u"?globalThis:i||self,t(i.Cards={},i.core,i.React,i.i18n,i.utils))})(this,function(i,t,x,v,r){"use strict";function B(a){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const s in a)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(a,s);Object.defineProperty(n,s,o.get?o:{enumerable:!0,get:()=>a[s]})}}return n.default=a,Object.freeze(n)}const e=B(x);var _="pkg_sps-woodland_cards__version_8_34_2__hash_1gxcp3j0";function u({children:a,className:n="",...s}){return e.createElement(t.CapContent,{className:t.cl(_,n),...s},a)}t.Metadata.set(u,{name:"CardFooter"});var S="pkg_sps-woodland_cards__version_8_34_2__hash_mxozo50";function p({children:a,className:n="",...s}){return e.createElement(t.CapContent,{className:t.cl(S,n),...s},a)}t.Metadata.set(p,{name:"CardHeader"});var q="pkg_sps-woodland_cards__version_8_34_2__hash_jyyttb0";function C({children:a,className:n,...s}){const[o,[d],h,g]=t.selectChildren(a,[{type:p},{custom:m=>t.Metadata.isWoodlandComponent(m)&&t.Metadata.get(m).name==="Tabs"},{type:u}]),c=t.useChildTestIdAttrBuilder(s);return e.createElement("div",{className:t.cl(q,n),...s},o,d?t.addProps(d,{context:"container"}):e.createElement(t.Content,{...c("body")},g),h)}t.Metadata.set(C,{name:"Card"});var E="pkg_sps-woodland_cards__version_8_34_2__hash_1f11ubh0";function b({children:a,className:n="",...s}){return e.createElement(t.CapContentTitle,{className:t.cl(E,n),...s},a)}t.Metadata.set(b,{name:"CardTitle"});const y=Object.freeze({general:"status-new",success:"status-ok",error:"status-error",warning:"status-warning",processing:"status-in-process"});function f({children:a,className:n,horizontal:s=!1,icon:o,kind:d="general",title:h,metric:g,partnerCount:c,totalPartners:m,...k}){const{t:w}=v.useWoodlandLanguage(),l=t.useChildTestIdAttrBuilder(k),[M,z,A]=(c?w("insightTile.partnerCount",{count:c,total:m,defaultValue:`${c} |of| ${m}`}):"").split("|");return e.createElement(e.Fragment,null,e.createElement("div",{className:t.cl("sps-insight-tile",`sps-insight-tile--${d}`,s&&"sps-insight-tile--horizontal",a&&"sps-insight-tile--has-detail",n),...k},e.createElement("div",{className:"sps-insight-tile__body",...l("body")},o?e.createElement("i",{className:`sps-icon sps-icon-${o}`,...l("icon")}):e.createElement("i",{className:`sps-icon sps-icon-${y[d]}`,...l("icon")}),g&&e.createElement("div",{className:"sps-insight-tile__metric-count",...l("metric")},g),h&&e.createElement("div",{className:"sps-insight-tile__description",...l("description")},e.createElement("div",{className:"sps-insight-tile__title",style:{"-webkit-box-orient":"vertical"},...l("title")},h),e.createElement("div",{className:"sps-insight-tile__detail",...l("detail")},a))),c&&e.createElement("div",{className:"sps-insight-tile__partner-count",...l("partner-count")},c===m?e.createElement("div",null,w("insightTile.all",{defaultValue:"ALL"})):e.createElement(e.Fragment,null,e.createElement("div",null,M),e.createElement("div",null,z),e.createElement("div",null,A)),e.createElement("div",{className:"sps-insight-tile__partners-text"},w("insightTile.partners",{defaultValue:"PARTNERS"})))))}t.Metadata.set(f,{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 I({children:a,...n}){return e.createElement("div",{className:"insight-tile-wrapper",...n},a)}t.Metadata.set(I,{name:"InsightCardSet"});var N="pkg_sps-woodland_cards__version_8_34_2__hash_7b9vus0";function T({children:a,className:n,maxHeight:s,style:o,...d}){return e.createElement("div",{className:t.cl(N,n),style:{...o,maxHeight:s},...d},a)}t.Metadata.set(T,{name:"ScrollableContainer",props:{maxHeight:"string"}});const F={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,u,p,b],examples:{general:{label:"General Usage",description:({Link:a,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(a,{to:"/style-and-layout/grid"},"Woodland Grid")," and"," ",e.createElement(a,{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(a,{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 (
package/lib/style.css CHANGED
@@ -1 +1 @@
1
- .pkg_sps-woodland_cards__version_8_34_1__hash_1gxcp3j0{border-top-color:#d2d4d4;border-top-style:solid;border-top-width:.0625rem}.pkg_sps-woodland_cards__version_8_34_1__hash_mxozo50{border-bottom-color:#d2d4d4;border-bottom-style:solid;border-bottom-width:.0625rem}.pkg_sps-woodland_cards__version_8_34_1__hash_mxozo50 svg{margin-bottom:0}.pkg_sps-woodland_cards__version_8_34_1__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_34_1__hash_1f11ubh0{font-weight:600}.pkg_sps-woodland_cards__version_8_34_1__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_34_1__hash_7b9vus0 .sps-clickable-tag{background-color:#acd4e84d}
1
+ .pkg_sps-woodland_cards__version_8_34_2__hash_1gxcp3j0{border-top-color:#d2d4d4;border-top-style:solid;border-top-width:.0625rem}.pkg_sps-woodland_cards__version_8_34_2__hash_mxozo50{border-bottom-color:#d2d4d4;border-bottom-style:solid;border-bottom-width:.0625rem}.pkg_sps-woodland_cards__version_8_34_2__hash_mxozo50 svg{margin-bottom:0}.pkg_sps-woodland_cards__version_8_34_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_34_2__hash_1f11ubh0{font-weight:600}.pkg_sps-woodland_cards__version_8_34_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_34_2__hash_7b9vus0 .sps-clickable-tag{background-color:#acd4e84d}
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.34.1",
4
+ "version": "8.34.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,9 +29,9 @@
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.34.1",
33
- "@sps-woodland/tokens": "8.34.1",
34
- "@spscommerce/i18n": "8.34.1"
32
+ "@sps-woodland/core": "8.34.2",
33
+ "@sps-woodland/tokens": "8.34.2",
34
+ "@spscommerce/i18n": "8.34.2"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@react-stately/collections": "^3.6.0",
@@ -39,10 +39,10 @@
39
39
  "@vanilla-extract/css": "^1.9.3",
40
40
  "react": "^16.14.0",
41
41
  "react-dom": "^16.14.0",
42
- "@sps-woodland/core": "8.34.1",
43
- "@sps-woodland/tabs": "8.34.1",
44
- "@sps-woodland/tokens": "8.34.1",
45
- "@spscommerce/i18n": "8.34.1"
42
+ "@sps-woodland/core": "8.34.2",
43
+ "@sps-woodland/tabs": "8.34.2",
44
+ "@sps-woodland/tokens": "8.34.2",
45
+ "@spscommerce/i18n": "8.34.2"
46
46
  },
47
47
  "scripts": {
48
48
  "build": "pnpm run build:js && pnpm run build:types",