@spscommerce/ds-react 6.16.0 → 6.17.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 +1 -1
- package/lib/index.es.js +1 -1
- package/package.json +9 -9
package/lib/index.cjs.js
CHANGED
|
@@ -9036,7 +9036,7 @@ function Component() {
|
|
|
9036
9036
|
</SpsCard>
|
|
9037
9037
|
</div>
|
|
9038
9038
|
</div>
|
|
9039
|
-
`}}}},RN={},ON=N({},Y);function il(a){var o=a,{children:e,className:t}=o,n=z(o,["children","className"]);return s.createElement("div",N({className:F("sps-filter-panel",t)},n),e)}Object.assign(il,{props:RN,propTypes:ON,displayName:"SpsFilterPanel"});const LN={title:"string",expanded:"boolean",heightPx:"number",heightRem:"number",onExpand:"() => void",onCollapse:"() => void"},BN=$(N({},Y),{title:y.exports.string,expanded:y.exports.bool,heightPx:y.exports.number,heightRem:y.exports.number,onExpand:ne(),onCollapse:ne()});function ll(m){var f=m,{children:e,className:t,title:n,expanded:a,heightPx:o,heightRem:i,onExpand:c,onCollapse:l}=f,p=z(f,["children","className","title","expanded","heightPx","heightRem","onExpand","onCollapse"]);const[u,g]=s.useState(a),S=typeof a!="undefined"?a:u,T=o?o/16:i,x=T?{overflowY:"scroll",height:`${T}rem`}:{},E=()=>s.createElement("button",{type:"button",className:"sps-filter-panel__section__expand-btn",onClick:()=>{g(!S),!S&&c?c():S&&l&&l()}},s.createElement(_t,{icon:S?M.SpsIcon.MINUS_CIRCLE:M.SpsIcon.PLUS_CIRCLE}));return s.useEffect(()=>{g(a)},[a]),s.createElement("div",N({className:F("sps-filter-panel__section",t)},p),s.createElement("div",{className:"sps-filter-panel__section__title-wrapper"},s.createElement(E,null),s.createElement("p",null,n)),S&&s.createElement("div",{className:"sps-filter-panel__section__content-wrapper",style:x},s.createElement("div",{className:"sps-filter-panel__section__content"},e)))}Object.assign(ll,{props:LN,propTypes:BN,displayName:"SpsFilterPanelSection"});const AN={onClear:"() => void"},PN=$(N({},Y),{onClear:ne()});function cl(o){var i=o,{children:e,className:t,onClear:n}=i,a=z(i,["children","className","onClear"]);const{t:c}=s.useContext(Pe);return s.createElement("div",N({className:F("sps-filter-panel__cap",t)},a),s.createElement("div",{className:"sps-filter-panel__cap__title-wrapper"},s.createElement(_t,{icon:M.SpsIcon.FILTER,size:M.SpsIconSize.SMALL}),s.createElement("p",null,c("design-system:filterPanel.title"))),s.createElement(Ve,{kind:M.ButtonKind.LINK,onClick:n},c("design-system:filterPanel.clear")))}Object.assign(cl,{props:AN,propTypes:PN,displayName:"SpsFilterPanelCap"});const df={generalUsage:{label:"General Usage",examples:{general:{react:w.code`
|
|
9039
|
+
`}}}},RN={},ON=N({},Y);function il(a){var o=a,{children:e,className:t}=o,n=z(o,["children","className"]);return s.createElement("div",N({className:F("sps-filter-panel",t)},n),e)}Object.assign(il,{props:RN,propTypes:ON,displayName:"SpsFilterPanel"});const LN={title:"string",expanded:"boolean",heightPx:"number",heightRem:"number",onExpand:"() => void",onCollapse:"() => void"},BN=$(N({},Y),{title:y.exports.string,expanded:y.exports.bool,heightPx:y.exports.number,heightRem:y.exports.number,onExpand:ne(),onCollapse:ne()});function ll(m){var f=m,{children:e,className:t,title:n,expanded:a,heightPx:o,heightRem:i,onExpand:c,onCollapse:l}=f,p=z(f,["children","className","title","expanded","heightPx","heightRem","onExpand","onCollapse"]);const[u,g]=s.useState(a),S=typeof a!="undefined"?a:u,T=o?o/16:i,x=T?{overflowY:"scroll",height:`${T}rem`}:{},E=()=>s.createElement("button",{type:"button",className:"sps-filter-panel__section__expand-btn",onClick:()=>{g(!S),!S&&c?c():S&&l&&l()}},s.createElement(_t,{icon:S?M.SpsIcon.MINUS_CIRCLE:M.SpsIcon.PLUS_CIRCLE}));return s.useEffect(()=>{g(a)},[a]),s.createElement("div",N({className:F("sps-filter-panel__section",t)},p),s.createElement("div",{className:"sps-filter-panel__section__title-wrapper"},s.createElement(E,null),s.createElement("p",null,n)),S&&s.createElement("div",{className:"sps-filter-panel__section__content-wrapper",style:x},s.createElement("div",{className:"sps-filter-panel__section__content"},e)))}Object.assign(ll,{props:LN,propTypes:BN,displayName:"SpsFilterPanelSection"});const AN={onClear:"() => void"},PN=$(N({},Y),{onClear:ne()});function cl(o){var i=o,{children:e,className:t,onClear:n}=i,a=z(i,["children","className","onClear"]);const{t:c}=s.useContext(Pe);return s.createElement("div",N({className:F("sps-filter-panel__cap",t)},a),s.createElement("div",{className:"sps-filter-panel__cap__title-wrapper"},s.createElement(_t,{icon:M.SpsIcon.FILTER,size:M.SpsIconSize.SMALL}),s.createElement("p",null,c("design-system:filterPanel.title"))),s.createElement(Ve,{kind:M.ButtonKind.LINK,onClick:n},c("design-system:filterPanel.clear")),e)}Object.assign(cl,{props:AN,propTypes:PN,displayName:"SpsFilterPanelCap"});const df={generalUsage:{label:"General Usage",examples:{general:{react:w.code`
|
|
9040
9040
|
function Component() {
|
|
9041
9041
|
const initialValues = {
|
|
9042
9042
|
colors: {
|
package/lib/index.es.js
CHANGED
|
@@ -37213,7 +37213,7 @@ function SpsFilterPanelCap(_ea) {
|
|
|
37213
37213
|
}), /* @__PURE__ */ React.createElement("p", null, t2("design-system:filterPanel.title"))), /* @__PURE__ */ React.createElement(SpsButton, {
|
|
37214
37214
|
kind: ButtonKind.LINK,
|
|
37215
37215
|
onClick: onClear
|
|
37216
|
-
}, t2("design-system:filterPanel.clear")));
|
|
37216
|
+
}, t2("design-system:filterPanel.clear")), children);
|
|
37217
37217
|
}
|
|
37218
37218
|
Object.assign(SpsFilterPanelCap, {
|
|
37219
37219
|
props: propsDoc$6,
|
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": "6.
|
|
4
|
+
"version": "6.17.0",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/ds-react",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@react-stately/collections": "^3.3.3",
|
|
31
|
-
"@spscommerce/ds-colors": "6.
|
|
32
|
-
"@spscommerce/ds-illustrations": "6.
|
|
33
|
-
"@spscommerce/ds-shared": "6.
|
|
34
|
-
"@spscommerce/positioning": "6.
|
|
31
|
+
"@spscommerce/ds-colors": "6.17.0",
|
|
32
|
+
"@spscommerce/ds-illustrations": "6.17.0",
|
|
33
|
+
"@spscommerce/ds-shared": "6.17.0",
|
|
34
|
+
"@spscommerce/positioning": "6.17.0",
|
|
35
35
|
"@spscommerce/utils": "^6.11.3",
|
|
36
36
|
"moment": "^2.25.3",
|
|
37
37
|
"moment-timezone": "^0.5.28",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@react-stately/collections": "^3.3.3",
|
|
43
|
-
"@spscommerce/ds-colors": "6.
|
|
44
|
-
"@spscommerce/ds-illustrations": "6.
|
|
45
|
-
"@spscommerce/ds-shared": "6.
|
|
46
|
-
"@spscommerce/positioning": "6.
|
|
43
|
+
"@spscommerce/ds-colors": "6.17.0",
|
|
44
|
+
"@spscommerce/ds-illustrations": "6.17.0",
|
|
45
|
+
"@spscommerce/ds-shared": "6.17.0",
|
|
46
|
+
"@spscommerce/positioning": "6.17.0",
|
|
47
47
|
"@spscommerce/utils": "^6.11.3",
|
|
48
48
|
"@testing-library/react": "^9.3.2",
|
|
49
49
|
"@types/prop-types": "^15.7.1",
|