@sps-woodland/content-row 7.16.4 → 7.16.5
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 +10 -10
- package/lib/index.es.js +10 -10
- package/package.json +11 -11
package/lib/index.cjs.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const z=require("react"),a=require("@sps-woodland/core"),F=require("@spscommerce/ds-react"),c=require("@spscommerce/utils");function O(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const s=O(z);function H(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function k(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),o.push.apply(o,n)}return o}function v(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?k(Object(o),!0).forEach(function(n){H(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):k(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var A=(e,t,o)=>{for(var n of Object.keys(e)){var r;if(e[n]!==((r=t[n])!==null&&r!==void 0?r:o[n]))return!1}return!0},b=e=>t=>{var o=e.defaultClassName,n=v(v({},e.defaultVariants),t);for(var r in n){var i,d=(i=n[r])!==null&&i!==void 0?i:e.defaultVariants[r];if(d!=null){var l=d;typeof l=="boolean"&&(l=l===!0?"true":"false");var m=e.variantClassNames[r][l];m&&(o+=" "+m)}}for(var[C,w]of e.compoundVariants)A(C,n,e.defaultVariants)&&(o+=" "+w);return o},D=b({defaultClassName:"_1mxrufv0",variantClassNames:{lean:{true:"_1mxrufv1",false:"_1mxrufv2"},borderless:{true:"_1mxrufv3",false:"_1mxrufv4"}},defaultVariants:{lean:!1,borderless:!1},compoundVariants:[]});function p({children:e,className:t,borderless:o,lean:n,widthPx:r,widthRem:i,style:d,...l}){const m=r?r/16:i,C=m?{...d,width:`${m}rem`}:d;return s.createElement("div",{className:a.cl(D({lean:n,borderless:o}),t),...l,style:C},e)}a.Metadata.set(p,{name:"Content Row Col",props:{borderless:{type:"boolean"},lean:{type:"boolean"},widthPx:{type:"number"},widthRem:{type:"number"}}});var T=b({defaultClassName:"_11ztjee1",variantClassNames:{expanded:{true:"_11ztjee2",false:"_11ztjee3"}},defaultVariants:{expanded:!1},compoundVariants:[]}),q=b({defaultClassName:"_11ztjee4",variantClassNames:{expanded:{true:"_11ztjee5",false:"_11ztjee6"},selected:{true:"_11ztjee7",false:"_11ztjee8"},cardSpacing:{true:"_11ztjee9",false:"_11ztjeea"}},defaultVariants:{expanded:!1,selected:!1,cardSpacing:!1},compoundVariants:[[{expanded:!0,cardSpacing:!0},"_11ztjeeb"]]}),G="_11ztjeee",K="_11ztjeec",W="_11ztjeed",N="_11ztjeef";function f({children:e,className:t,...o}){return s.createElement("div",{className:a.cl(G,t),...o},e)}a.Metadata.set(f,{name:"Content Row Expansion"});function x({children:e,className:t,alternateLayout:o=!1,initiallyExpanded:n=!1,cardSpacing:r=!1,expanded:i,onBeforeCollapsed:d,onBeforeExpanded:l,onSelectionChange:m,onCollapsed:C,onExpanded:w,selectable:y=!1,selected:g,...P}){const[M,[R]]=a.selectChildren(e,[{type:p},{type:f}]),{t:I}=s.useContext(a.I18nContext),[V,h]=s.useState(n),u=typeof i=="boolean"?i:V;function _(j){j.stopPropagation(),u&&(!d||d())?(h(!1),C&&C()):!u&&(!l||l())&&(h(!0),w&&w())}const S=()=>s.createElement(F.SpsCheckbox,{checked:g,onChange:m}),E=()=>s.createElement("button",{type:"button",className:a.cl(K),onClick:_,"aria-label":I(`design-system:contentRow.${u?"collapse":"expand"}`)},s.createElement(a.Icon,{className:a.cl(W),icon:u?"minus-circle":"plus-circle"}));return s.createElement("div",{className:a.cl(T({expanded:u}),t),...P},s.createElement("div",{className:a.cl(q({expanded:u,selected:g,cardSpacing:r}))},y&&!o&&s.createElement(p,{widthPx:46},s.createElement(S,null)),R&&!o&&s.createElement(p,{widthPx:44},s.createElement(E,null)),R&&y&&o&&s.createElement(p,{widthPx:46},s.createElement("section",{className:N},s.createElement(S,null)),s.createElement("section",{className:N},s.createElement(E,null))),M),R)}a.Metadata.set(x,{name:"Content Row",props:{alternateLayout:{type:"boolean",default:"false"},initiallyExpanded:{type:"boolean",default:"false"},cardSpacing:{type:"boolean",default:"false"},expanded:{type:"boolean"},onBeforeCollapsed:{type:"() => boolean"},onBeforeExpanded:{type:"() => boolean"},onSelectionChange:{type:"ChangeEventHandler"},onCollapsed:{type:"() => void"},onExpanded:{type:"() => void"},selectable:{type:"boolean",default:"false"},selected:{type:"boolean"}}});const B={components:[x,p,f],examples:{basic:{label:"Content Rows",examples:{basic:{react:c.code`
|
2
|
-
import { ContentRow, ContentRowCol } from "@sps-woodland/content-
|
2
|
+
import { ContentRow, ContentRowCol } from "@sps-woodland/content-row";
|
3
3
|
import { Icon } from "@sps-woodland/core";
|
4
4
|
import { sprinkles } from "@sps-woodland/tokens";
|
5
5
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
)
|
18
18
|
}
|
19
19
|
`},withCheckbox:{react:c.code`
|
20
|
-
import { ContentRow, ContentRowCol } from "@sps-woodland/content-
|
20
|
+
import { ContentRow, ContentRowCol } from "@sps-woodland/content-row";
|
21
21
|
import { Icon } from "@sps-woodland/core";
|
22
22
|
import { sprinkles } from "@sps-woodland/tokens";
|
23
23
|
|
@@ -47,7 +47,7 @@
|
|
47
47
|
)
|
48
48
|
}
|
49
49
|
`},withCheckboxAndFavorite:{react:c.code`
|
50
|
-
import { ContentRow, ContentRowCol } from "@sps-woodland/content-
|
50
|
+
import { ContentRow, ContentRowCol } from "@sps-woodland/content-row";
|
51
51
|
import { Icon } from "@sps-woodland/core";
|
52
52
|
import { sprinkles } from "@sps-woodland/tokens";
|
53
53
|
|
@@ -80,7 +80,7 @@
|
|
80
80
|
)
|
81
81
|
}
|
82
82
|
`}}},expandable:{label:"Expandable Content Rows",examples:{basic:{react:c.code`
|
83
|
-
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-
|
83
|
+
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-row";
|
84
84
|
import { Card } from "@sps-woodland/cards";
|
85
85
|
import { Icon } from "@sps-woodland/core";
|
86
86
|
import { sprinkles } from "@sps-woodland/tokens";
|
@@ -112,7 +112,7 @@
|
|
112
112
|
)
|
113
113
|
}
|
114
114
|
`},expandableWithCheckbox:{react:c.code`
|
115
|
-
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-
|
115
|
+
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-row";
|
116
116
|
import { Card } from "@sps-woodland/cards";
|
117
117
|
import { Icon } from "@sps-woodland/core";
|
118
118
|
import { sprinkles } from "@sps-woodland/tokens";
|
@@ -156,7 +156,7 @@
|
|
156
156
|
)
|
157
157
|
}
|
158
158
|
`},expandableWithCheckboxAlternate:{react:c.code`
|
159
|
-
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-
|
159
|
+
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-row";
|
160
160
|
import { Card } from "@sps-woodland/cards";
|
161
161
|
import { Icon } from "@sps-woodland/core";
|
162
162
|
import { sprinkles } from "@sps-woodland/tokens";
|
@@ -201,7 +201,7 @@
|
|
201
201
|
)
|
202
202
|
}
|
203
203
|
`},expandableWithCheckboxAndFavorite:{react:c.code`
|
204
|
-
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-
|
204
|
+
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-row";
|
205
205
|
import { Card } from "@sps-woodland/cards";
|
206
206
|
import { Icon } from "@sps-woodland/core";
|
207
207
|
import { sprinkles } from "@sps-woodland/tokens";
|
@@ -248,7 +248,7 @@
|
|
248
248
|
)
|
249
249
|
}
|
250
250
|
`},expandableWithCheckboxAndFavoriteAlternate:{react:c.code`
|
251
|
-
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-
|
251
|
+
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-row";
|
252
252
|
import { Card } from "@sps-woodland/cards";
|
253
253
|
import { Icon } from "@sps-woodland/core";
|
254
254
|
import { sprinkles } from "@sps-woodland/tokens";
|
@@ -296,9 +296,9 @@
|
|
296
296
|
)
|
297
297
|
}
|
298
298
|
`}}},sortable:{label:"Sortable Content Rows",examples:{basic:{react:c.code`
|
299
|
-
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-
|
299
|
+
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-row";
|
300
300
|
import { Card } from "@sps-woodland/cards";
|
301
|
-
import { SortingHeader, SortingHeaderCell } from "@sps-woodland/
|
301
|
+
import { SortingHeader, SortingHeaderCell } from "@sps-woodland/sorting-header";
|
302
302
|
import { grid } from "@sps-woodland/tokens";
|
303
303
|
|
304
304
|
function Component() {
|
package/lib/index.es.js
CHANGED
@@ -178,7 +178,7 @@ const q = {
|
|
178
178
|
examples: {
|
179
179
|
basic: {
|
180
180
|
react: l`
|
181
|
-
import { ContentRow, ContentRowCol } from "@sps-woodland/content-
|
181
|
+
import { ContentRow, ContentRowCol } from "@sps-woodland/content-row";
|
182
182
|
import { Icon } from "@sps-woodland/core";
|
183
183
|
import { sprinkles } from "@sps-woodland/tokens";
|
184
184
|
|
@@ -199,7 +199,7 @@ const q = {
|
|
199
199
|
},
|
200
200
|
withCheckbox: {
|
201
201
|
react: l`
|
202
|
-
import { ContentRow, ContentRowCol } from "@sps-woodland/content-
|
202
|
+
import { ContentRow, ContentRowCol } from "@sps-woodland/content-row";
|
203
203
|
import { Icon } from "@sps-woodland/core";
|
204
204
|
import { sprinkles } from "@sps-woodland/tokens";
|
205
205
|
|
@@ -232,7 +232,7 @@ const q = {
|
|
232
232
|
},
|
233
233
|
withCheckboxAndFavorite: {
|
234
234
|
react: l`
|
235
|
-
import { ContentRow, ContentRowCol } from "@sps-woodland/content-
|
235
|
+
import { ContentRow, ContentRowCol } from "@sps-woodland/content-row";
|
236
236
|
import { Icon } from "@sps-woodland/core";
|
237
237
|
import { sprinkles } from "@sps-woodland/tokens";
|
238
238
|
|
@@ -273,7 +273,7 @@ const q = {
|
|
273
273
|
examples: {
|
274
274
|
basic: {
|
275
275
|
react: l`
|
276
|
-
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-
|
276
|
+
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-row";
|
277
277
|
import { Card } from "@sps-woodland/cards";
|
278
278
|
import { Icon } from "@sps-woodland/core";
|
279
279
|
import { sprinkles } from "@sps-woodland/tokens";
|
@@ -308,7 +308,7 @@ const q = {
|
|
308
308
|
},
|
309
309
|
expandableWithCheckbox: {
|
310
310
|
react: l`
|
311
|
-
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-
|
311
|
+
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-row";
|
312
312
|
import { Card } from "@sps-woodland/cards";
|
313
313
|
import { Icon } from "@sps-woodland/core";
|
314
314
|
import { sprinkles } from "@sps-woodland/tokens";
|
@@ -355,7 +355,7 @@ const q = {
|
|
355
355
|
},
|
356
356
|
expandableWithCheckboxAlternate: {
|
357
357
|
react: l`
|
358
|
-
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-
|
358
|
+
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-row";
|
359
359
|
import { Card } from "@sps-woodland/cards";
|
360
360
|
import { Icon } from "@sps-woodland/core";
|
361
361
|
import { sprinkles } from "@sps-woodland/tokens";
|
@@ -403,7 +403,7 @@ const q = {
|
|
403
403
|
},
|
404
404
|
expandableWithCheckboxAndFavorite: {
|
405
405
|
react: l`
|
406
|
-
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-
|
406
|
+
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-row";
|
407
407
|
import { Card } from "@sps-woodland/cards";
|
408
408
|
import { Icon } from "@sps-woodland/core";
|
409
409
|
import { sprinkles } from "@sps-woodland/tokens";
|
@@ -453,7 +453,7 @@ const q = {
|
|
453
453
|
},
|
454
454
|
expandableWithCheckboxAndFavoriteAlternate: {
|
455
455
|
react: l`
|
456
|
-
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-
|
456
|
+
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-row";
|
457
457
|
import { Card } from "@sps-woodland/cards";
|
458
458
|
import { Icon } from "@sps-woodland/core";
|
459
459
|
import { sprinkles } from "@sps-woodland/tokens";
|
@@ -509,9 +509,9 @@ const q = {
|
|
509
509
|
examples: {
|
510
510
|
basic: {
|
511
511
|
react: l`
|
512
|
-
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-
|
512
|
+
import { ContentRow, ContentRowCol, ContentRowExpansion } from "@sps-woodland/content-row";
|
513
513
|
import { Card } from "@sps-woodland/cards";
|
514
|
-
import { SortingHeader, SortingHeaderCell } from "@sps-woodland/
|
514
|
+
import { SortingHeader, SortingHeaderCell } from "@sps-woodland/sorting-header";
|
515
515
|
import { grid } from "@sps-woodland/tokens";
|
516
516
|
|
517
517
|
function Component() {
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sps-woodland/content-row",
|
3
3
|
"description": "SPS Woodland Design System page title component",
|
4
|
-
"version": "7.16.
|
4
|
+
"version": "7.16.5",
|
5
5
|
"author": "SPS Commerce",
|
6
6
|
"license": "UNLICENSED",
|
7
7
|
"repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/page-title",
|
@@ -30,11 +30,11 @@
|
|
30
30
|
"@spscommerce/utils": "^6.12.1",
|
31
31
|
"react": "^16.14.0",
|
32
32
|
"react-dom": "^16.14.0",
|
33
|
-
"@sps-woodland/core": "7.16.
|
34
|
-
"@sps-woodland/tokens": "7.16.
|
35
|
-
"@spscommerce/ds-colors": "7.16.
|
36
|
-
"@spscommerce/ds-
|
37
|
-
"@spscommerce/ds-
|
33
|
+
"@sps-woodland/core": "7.16.5",
|
34
|
+
"@sps-woodland/tokens": "7.16.5",
|
35
|
+
"@spscommerce/ds-colors": "7.16.5",
|
36
|
+
"@spscommerce/ds-shared": "7.16.5",
|
37
|
+
"@spscommerce/ds-react": "7.16.5"
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
40
40
|
"@spscommerce/ds-illustrations": "6.37.3",
|
@@ -43,11 +43,11 @@
|
|
43
43
|
"@vanilla-extract/recipes": "^0.2.5",
|
44
44
|
"react": "^16.14.0",
|
45
45
|
"react-dom": "^16.14.0",
|
46
|
-
"@sps-woodland/core": "7.16.
|
47
|
-
"@sps-woodland/tokens": "7.16.
|
48
|
-
"@spscommerce/ds-colors": "7.16.
|
49
|
-
"@spscommerce/ds-react": "7.16.
|
50
|
-
"@spscommerce/ds-shared": "7.16.
|
46
|
+
"@sps-woodland/core": "7.16.5",
|
47
|
+
"@sps-woodland/tokens": "7.16.5",
|
48
|
+
"@spscommerce/ds-colors": "7.16.5",
|
49
|
+
"@spscommerce/ds-react": "7.16.5",
|
50
|
+
"@spscommerce/ds-shared": "7.16.5"
|
51
51
|
},
|
52
52
|
"scripts": {
|
53
53
|
"build": "pnpm run build:js && pnpm run build:types",
|