@spscommerce/ds-react 8.56.19 → 8.56.21
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 +11 -11
- package/lib/index.umd.cjs +2 -2
- package/package.json +12 -12
package/lib/index.js
CHANGED
|
@@ -9377,10 +9377,10 @@ function Mp(t) {
|
|
|
9377
9377
|
function S(e) {
|
|
9378
9378
|
e.stopPropagation(), x && (!o || o()) ? (b(!1), l && l()) : !x && (!s || s()) && (b(!0), u && u());
|
|
9379
9379
|
}
|
|
9380
|
-
let C =
|
|
9380
|
+
let C = /* @__PURE__ */ e.createElement(zn, {
|
|
9381
9381
|
checked: m,
|
|
9382
9382
|
onChange: c
|
|
9383
|
-
}), w =
|
|
9383
|
+
}), w = /* @__PURE__ */ e.createElement("button", {
|
|
9384
9384
|
type: "button",
|
|
9385
9385
|
className: "sps-content-row__expand-btn",
|
|
9386
9386
|
onClick: S,
|
|
@@ -9393,7 +9393,7 @@ function Mp(t) {
|
|
|
9393
9393
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
9394
9394
|
className: "sps-content-row__col-group",
|
|
9395
9395
|
"data-testid": `${h}__children`
|
|
9396
|
-
}, p && !n && /* @__PURE__ */ e.createElement(Op, { widthPx: 46 },
|
|
9396
|
+
}, p && !n && /* @__PURE__ */ e.createElement(Op, { widthPx: 46 }, C), D && !n && /* @__PURE__ */ e.createElement(Op, { widthPx: 44 }, w), D && p && n && /* @__PURE__ */ e.createElement(Op, { widthPx: 46 }, /* @__PURE__ */ e.createElement("section", null, C), /* @__PURE__ */ e.createElement("section", null, w)), E), D);
|
|
9397
9397
|
}
|
|
9398
9398
|
Object.assign(Mp, {
|
|
9399
9399
|
props: jp,
|
|
@@ -23575,20 +23575,20 @@ function M_({ children: t, className: n, title: r, expanded: i, heightPx: a, hei
|
|
|
23575
23575
|
let [u, d] = e.useState(i), f = i === void 0 ? u : i, p = a ? a / 16 : o, m = p ? {
|
|
23576
23576
|
overflowY: "scroll",
|
|
23577
23577
|
height: `${p}rem`
|
|
23578
|
-
} : {}
|
|
23578
|
+
} : {};
|
|
23579
|
+
return e.useEffect(() => {
|
|
23580
|
+
d(i);
|
|
23581
|
+
}, [i]), /* @__PURE__ */ e.createElement("div", {
|
|
23582
|
+
className: K("sps-filter-panel__section", n),
|
|
23583
|
+
...l
|
|
23584
|
+
}, /* @__PURE__ */ e.createElement("div", { className: "sps-filter-panel__section__title-wrapper" }, /* @__PURE__ */ e.createElement("button", {
|
|
23579
23585
|
type: "button",
|
|
23580
23586
|
className: "sps-filter-panel__section__expand-btn",
|
|
23581
23587
|
onMouseDown: (e) => e.preventDefault(),
|
|
23582
23588
|
onClick: () => {
|
|
23583
23589
|
d(!f), !f && s ? s() : f && c && c();
|
|
23584
23590
|
}
|
|
23585
|
-
}, /* @__PURE__ */ e.createElement(Ep, { icon: f ? H.MINUS_CIRCLE : H.PLUS_CIRCLE }))
|
|
23586
|
-
return e.useEffect(() => {
|
|
23587
|
-
d(i);
|
|
23588
|
-
}, [i]), /* @__PURE__ */ e.createElement("div", {
|
|
23589
|
-
className: K("sps-filter-panel__section", n),
|
|
23590
|
-
...l
|
|
23591
|
-
}, /* @__PURE__ */ e.createElement("div", { className: "sps-filter-panel__section__title-wrapper" }, /* @__PURE__ */ e.createElement(h, null), r && (typeof r == "string" ? /* @__PURE__ */ e.createElement("p", null, r) : r)), f && /* @__PURE__ */ e.createElement("div", {
|
|
23591
|
+
}, /* @__PURE__ */ e.createElement(Ep, { icon: f ? H.MINUS_CIRCLE : H.PLUS_CIRCLE })), r && (typeof r == "string" ? /* @__PURE__ */ e.createElement("p", null, r) : r)), f && /* @__PURE__ */ e.createElement("div", {
|
|
23592
23592
|
className: "sps-filter-panel__section__content-wrapper",
|
|
23593
23593
|
style: m
|
|
23594
23594
|
}, /* @__PURE__ */ e.createElement("div", { className: "sps-filter-panel__section__content" }, t)));
|
package/lib/index.umd.cjs
CHANGED
|
@@ -685,7 +685,7 @@ Valid keys: `+JSON.stringify(Object.keys(e),null,` `));var p=f(l,d,o,s,c+`.`+d,
|
|
|
685
685
|
/>
|
|
686
686
|
);
|
|
687
687
|
}
|
|
688
|
-
`}}}},bf={icon:{type:`SpsIcon`,required:!0},size:`SpsIconSize`};function xf(e){let{className:t,"data-testid":n,icon:r,size:a=i.SpsIconSize.MEDIUM,unsafelyReplaceClassName:o,...s}=e,c=x(o||`sps-icon`,`sps-icon-${r}`,`sps-icon--${a}`,e.onClick&&`interactive-icon`,t);return y.createElement(`i`,{className:c,"aria-hidden":`true`,"data-testid":n,...s})}Object.assign(xf,{props:bf,displayName:`SpsI`});var Sf={borderless:`boolean`,lean:`boolean`,leaner:{type:`boolean`,deprecated:!0},widthPx:`number`,widthRem:`number`};function Cf(e){let{borderless:t,children:n,className:r,lean:i,leaner:a,style:o,unsafelyReplaceClassName:s,widthPx:c,widthRem:l,...u}=e;y.useEffect(()=>{a&&console.log([`The 'leaner' prop on SpsContentRowCol is deprecated. The padding for Content`,`Rows has been updated so the old 'lean' padding is the default, and the`,`'leaner' padding is enabled with 'lean'. This column will be displayed as`,`a new 'lean' column, but you should change the prop you're passing as well.`].join(` `))},[a]);let d=x(s||`sps-content-row__col`,t&&`sps-content-row__col--borderless`,(i||a)&&`sps-content-row__col--lean`,r),f=c?c/16:l,p=f?{...o,width:`${f}rem`}:o;return y.createElement(`div`,{...u,className:d,style:p},n)}Object.assign(Cf,{props:Sf,displayName:`SpsContentRowCol`});var wf={};function Tf(e){let{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:i,...a}=e,o=x(i||`sps-content-row__expansion`,n);return y.createElement(`div`,{className:o,...a,"data-testid":`${r}__expansion`},t)}Object.assign(Tf,{props:wf,displayName:`SpsContentRowExpansion`});var Ef={alternateLayout:`boolean`,initiallyExpanded:`boolean`,cardSpacing:`boolean`,expanded:`boolean`,onBeforeCollapsed:`() => boolean`,onBeforeExpanded:`() => boolean`,onSelectionChange:`ChangeEventHandler`,onCollapsed:`() => void`,onExpanded:`() => void`,selectable:`boolean`,selected:`boolean`};function Df(e){let{alternateLayout:t=!1,children:n,className:r,expanded:o,onBeforeCollapsed:s,onBeforeExpanded:c,onSelectionChange:l,onCollapsed:u,onExpanded:d,initiallyExpanded:f=!1,cardSpacing:p=!1,selectable:m=!1,selected:h,"data-testid":g,unsafelyReplaceClassName:_,...v}=e,{t:b}=(0,a.useWoodlandLanguage)(),[S,C]=y.useState(f),w=typeof o==`boolean`?o:S;function T(e){e.stopPropagation(),w&&(!s||s())?(C(!1),u&&u()):!w&&(!c||c())&&(C(!0),d&&d())}let E=
|
|
688
|
+
`}}}},bf={icon:{type:`SpsIcon`,required:!0},size:`SpsIconSize`};function xf(e){let{className:t,"data-testid":n,icon:r,size:a=i.SpsIconSize.MEDIUM,unsafelyReplaceClassName:o,...s}=e,c=x(o||`sps-icon`,`sps-icon-${r}`,`sps-icon--${a}`,e.onClick&&`interactive-icon`,t);return y.createElement(`i`,{className:c,"aria-hidden":`true`,"data-testid":n,...s})}Object.assign(xf,{props:bf,displayName:`SpsI`});var Sf={borderless:`boolean`,lean:`boolean`,leaner:{type:`boolean`,deprecated:!0},widthPx:`number`,widthRem:`number`};function Cf(e){let{borderless:t,children:n,className:r,lean:i,leaner:a,style:o,unsafelyReplaceClassName:s,widthPx:c,widthRem:l,...u}=e;y.useEffect(()=>{a&&console.log([`The 'leaner' prop on SpsContentRowCol is deprecated. The padding for Content`,`Rows has been updated so the old 'lean' padding is the default, and the`,`'leaner' padding is enabled with 'lean'. This column will be displayed as`,`a new 'lean' column, but you should change the prop you're passing as well.`].join(` `))},[a]);let d=x(s||`sps-content-row__col`,t&&`sps-content-row__col--borderless`,(i||a)&&`sps-content-row__col--lean`,r),f=c?c/16:l,p=f?{...o,width:`${f}rem`}:o;return y.createElement(`div`,{...u,className:d,style:p},n)}Object.assign(Cf,{props:Sf,displayName:`SpsContentRowCol`});var wf={};function Tf(e){let{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:i,...a}=e,o=x(i||`sps-content-row__expansion`,n);return y.createElement(`div`,{className:o,...a,"data-testid":`${r}__expansion`},t)}Object.assign(Tf,{props:wf,displayName:`SpsContentRowExpansion`});var Ef={alternateLayout:`boolean`,initiallyExpanded:`boolean`,cardSpacing:`boolean`,expanded:`boolean`,onBeforeCollapsed:`() => boolean`,onBeforeExpanded:`() => boolean`,onSelectionChange:`ChangeEventHandler`,onCollapsed:`() => void`,onExpanded:`() => void`,selectable:`boolean`,selected:`boolean`};function Df(e){let{alternateLayout:t=!1,children:n,className:r,expanded:o,onBeforeCollapsed:s,onBeforeExpanded:c,onSelectionChange:l,onCollapsed:u,onExpanded:d,initiallyExpanded:f=!1,cardSpacing:p=!1,selectable:m=!1,selected:h,"data-testid":g,unsafelyReplaceClassName:_,...v}=e,{t:b}=(0,a.useWoodlandLanguage)(),[S,C]=y.useState(f),w=typeof o==`boolean`?o:S;function T(e){e.stopPropagation(),w&&(!s||s())?(C(!1),u&&u()):!w&&(!c||c())&&(C(!0),d&&d())}let E=y.createElement(Nt,{checked:h,onChange:l}),D=y.createElement(`button`,{type:`button`,className:`sps-content-row__expand-btn`,onClick:T,"aria-label":b(`contentRow.${w?`collapse`:`expand`}`,{defaultValue:`${w?`Collapse`:`Expand`}`})},y.createElement(xf,{icon:w?i.SpsIcon.MINUS_CIRCLE:i.SpsIcon.PLUS_CIRCLE})),O=x(_||`sps-content-row`,w&&`sps-content-row--expanded`,p&&`sps-content-row--card-spaced`,h&&`sps-content-row--selected`,t&&`sps-content-row--alternate-layout`,r),[k,[A]]=vt(n,[{type:Cf},{type:Tf}]);return y.createElement(`div`,{className:O,"data-testid":g,...v},y.createElement(`div`,{className:`sps-content-row__col-group`,"data-testid":`${g}__children`},m&&!t&&y.createElement(Cf,{widthPx:46},E),A&&!t&&y.createElement(Cf,{widthPx:44},D),A&&m&&t&&y.createElement(Cf,{widthPx:46},y.createElement(`section`,null,E),y.createElement(`section`,null,D)),k),A)}Object.assign(Df,{props:Ef,displayName:`SpsContentRow`});var Of={basic:{label:`Content rows`,examples:{basic:{react:n.code`
|
|
689
689
|
import {
|
|
690
690
|
SpsContentRow,
|
|
691
691
|
SpsContentRowCol,
|
|
@@ -9011,7 +9011,7 @@ Valid keys: `+JSON.stringify(Object.keys(e),null,` `));var p=f(l,d,o,s,c+`.`+d,
|
|
|
9011
9011
|
kind={FeedbackBlockKind.WARNING}
|
|
9012
9012
|
message="This order is missing a shipment date."
|
|
9013
9013
|
/>
|
|
9014
|
-
`}}}};function Sg(){return y.createElement(bg,{kind:i.FeedbackBlockKind.WARNING},`The Workflow component is being deprecated. As of November 6, 2024, please use the`,` `,y.createElement(`a`,{href:`#/components/wizard`},`Wizard`),` `,`component instead.`)}var Cg={};function wg({children:e,className:t,...n}){return y.createElement(`div`,{className:x(`sps-filter-panel`,t),...n},e)}Object.assign(wg,{props:Cg,displayName:`SpsFilterPanel`});var Tg={title:`string | ReactNode`,expanded:`boolean`,heightPx:`number`,heightRem:`number`,onExpand:`() => void`,onCollapse:`() => void`};function Eg({children:e,className:t,title:n,expanded:r,heightPx:a,heightRem:o,onExpand:s,onCollapse:c,...l}){let[u,d]=y.useState(r),f=r===void 0?u:r,p=a?a/16:o,m=p?{overflowY:`scroll`,height:`${p}rem`}:{}
|
|
9014
|
+
`}}}};function Sg(){return y.createElement(bg,{kind:i.FeedbackBlockKind.WARNING},`The Workflow component is being deprecated. As of November 6, 2024, please use the`,` `,y.createElement(`a`,{href:`#/components/wizard`},`Wizard`),` `,`component instead.`)}var Cg={};function wg({children:e,className:t,...n}){return y.createElement(`div`,{className:x(`sps-filter-panel`,t),...n},e)}Object.assign(wg,{props:Cg,displayName:`SpsFilterPanel`});var Tg={title:`string | ReactNode`,expanded:`boolean`,heightPx:`number`,heightRem:`number`,onExpand:`() => void`,onCollapse:`() => void`};function Eg({children:e,className:t,title:n,expanded:r,heightPx:a,heightRem:o,onExpand:s,onCollapse:c,...l}){let[u,d]=y.useState(r),f=r===void 0?u:r,p=a?a/16:o,m=p?{overflowY:`scroll`,height:`${p}rem`}:{};return y.useEffect(()=>{d(r)},[r]),y.createElement(`div`,{className:x(`sps-filter-panel__section`,t),...l},y.createElement(`div`,{className:`sps-filter-panel__section__title-wrapper`},y.createElement(`button`,{type:`button`,className:`sps-filter-panel__section__expand-btn`,onMouseDown:e=>e.preventDefault(),onClick:()=>{d(!f),!f&&s?s():f&&c&&c()}},y.createElement(xf,{icon:f?i.SpsIcon.MINUS_CIRCLE:i.SpsIcon.PLUS_CIRCLE})),n&&(typeof n==`string`?y.createElement(`p`,null,n):n)),f&&y.createElement(`div`,{className:`sps-filter-panel__section__content-wrapper`,style:m},y.createElement(`div`,{className:`sps-filter-panel__section__content`},e)))}Object.assign(Eg,{props:Tg,displayName:`SpsFilterPanelSection`});var Dg={onClear:`() => void`};function Og({children:e,className:t,onClear:n,...r}){let{t:o}=(0,a.useWoodlandLanguage)();return y.createElement(`div`,{className:x(`sps-filter-panel__cap`,t),...r},y.createElement(`div`,{className:`sps-filter-panel__cap__title-wrapper`},y.createElement(xf,{icon:i.SpsIcon.FILTER,size:i.SpsIconSize.SMALL}),y.createElement(`p`,null,o(`filterPanel.title`,{defaultValue:`Filters`}))),y.createElement(Jd,{kind:i.ButtonKind.LINK,onClick:n},o(`filterPanel.clear`,{defaultValue:`Clear Filters`})),e)}Object.assign(Og,{props:Dg,displayName:`SpsFilterPanelCap`});var kg={generalUsage:{label:`General Usage`,examples:{general:{react:n.code`
|
|
9015
9015
|
import {
|
|
9016
9016
|
useSpsForm,
|
|
9017
9017
|
SpsForm,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spscommerce/ds-react",
|
|
3
3
|
"description": "SPS Design System React components",
|
|
4
|
-
"version": "8.56.
|
|
4
|
+
"version": "8.56.21",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/spscommerce/woodland/tree/main/packages/@spscommerce/ds-react",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"moment-timezone": "^0.6.0",
|
|
47
47
|
"react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
48
48
|
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
49
|
-
"@
|
|
50
|
-
"@spscommerce/ds-
|
|
51
|
-
"@spscommerce/
|
|
52
|
-
"@spscommerce/
|
|
53
|
-
"@
|
|
49
|
+
"@spscommerce/ds-colors": "8.56.21",
|
|
50
|
+
"@spscommerce/ds-shared": "8.56.21",
|
|
51
|
+
"@spscommerce/i18n": "8.56.21",
|
|
52
|
+
"@spscommerce/positioning": "8.56.21",
|
|
53
|
+
"@sps-woodland/illustrations": "8.56.21"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@react-stately/collections": "3.13.1",
|
|
@@ -70,12 +70,12 @@
|
|
|
70
70
|
"raf-stub": "3.0.0",
|
|
71
71
|
"react": "16.14.0",
|
|
72
72
|
"react-dom": "16.14.0",
|
|
73
|
-
"@sps-woodland/illustrations": "8.56.
|
|
74
|
-
"@spscommerce/ds-
|
|
75
|
-
"@spscommerce/
|
|
76
|
-
"@spscommerce/
|
|
77
|
-
"@spscommerce/
|
|
78
|
-
"test": "8.56.
|
|
73
|
+
"@sps-woodland/illustrations": "8.56.21",
|
|
74
|
+
"@spscommerce/ds-colors": "8.56.21",
|
|
75
|
+
"@spscommerce/ds-shared": "8.56.21",
|
|
76
|
+
"@spscommerce/i18n": "8.56.21",
|
|
77
|
+
"@spscommerce/positioning": "8.56.21",
|
|
78
|
+
"test": "8.56.21"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
|
81
81
|
"build": "pnpm run build:js && pnpm run build:types",
|