@spscommerce/ds-react 4.31.0 → 4.32.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
|
@@ -3041,7 +3041,7 @@ var a=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
3041
3041
|
</React.Fragment>
|
|
3042
3042
|
);
|
|
3043
3043
|
}
|
|
3044
|
-
`}}}};function Gm(e){const{children:t}=e;return s.createElement("div",{className:"insight-tile-wrapper"},t)}const UN={horizontal:"boolean",icon:"SpsIcon",kind:"SpsInsightTileKind",title:"string",metric:"number",partnerCount:"number",totalPartners:"number"},zN=W(I({},q),{horizontal:E.exports.bool,icon:ge(O.SpsIcon),kind:ge(O.SpsInsightTileKind),title:E.exports.string,metric:E.exports.number,partnerCount:E.exports.number,totalPartners:E.exports.number});function ji(e){const w=e,{children:t,className:n,horizontal:a=!1,icon:o,kind:i="general",title:l,metric:c,partnerCount:u,totalPartners:p,unsafelyReplaceClassName:f}=w,m=J(w,["children","className","horizontal","icon","kind","title","metric","partnerCount","totalPartners","unsafelyReplaceClassName"]),b=B(f||"sps-insight-tile",`sps-insight-tile--${i}`,n,a&&"sps-insight-tile--horizontal",t&&"sps-insight-tile--has-detail"),{t:v}=s.useContext(He),[T,k,g]=(u?v("design-system:insightTile.partnerCount",{count:u,total:p}):"").split("|");return s.createElement(s.Fragment,null,s.createElement("div",I({className:b},m),s.createElement("div",{className:"sps-insight-tile__body"},o?s.createElement("i",{className:`sps-icon sps-icon-${o}`}):s.createElement("i",{className:`sps-icon sps-icon-${O.SpsInsightTileIcons[i]}`}),c&&s.createElement("div",{className:"sps-insight-tile__metric-count"},c),l&&s.createElement("div",{className:"sps-insight-tile__description"},s.createElement("div",{className:"sps-insight-tile__title",style:{"-webkit-box-orient":"vertical"}},l),s.createElement("div",{className:"sps-insight-tile__detail"},t))),u&&s.createElement("div",{className:"sps-insight-tile__partner-count"},u===p?s.createElement("div",null,v("design-system:insightTile.all")):s.createElement(s.Fragment,null,s.createElement("div",null,T),s.createElement("div",null,k),s.createElement("div",null,g)),s.createElement("div",{className:"sps-insight-tile__partners-text"},v("design-system:insightTile.partners")))))}Object.assign(ji,{props:UN,propTypes:zN,displayName:"SpsInsightTile"});const qN={basic:{label:"Basic Insight Tiles",examples:{basic:{jsx:D.code`
|
|
3044
|
+
`}}}};function Gm(e){const{children:t}=e;return s.createElement("div",{className:"insight-tile-wrapper"},t)}const UN={horizontal:"boolean",icon:"SpsIcon",kind:"SpsInsightTileKind",title:"string",metric:"number | string",partnerCount:"number",totalPartners:"number"},zN=W(I({},q),{horizontal:E.exports.bool,icon:ge(O.SpsIcon),kind:ge(O.SpsInsightTileKind),title:E.exports.string,metric:E.exports.number||E.exports.string,partnerCount:E.exports.number,totalPartners:E.exports.number});function ji(e){const w=e,{children:t,className:n,horizontal:a=!1,icon:o,kind:i="general",title:l,metric:c,partnerCount:u,totalPartners:p,unsafelyReplaceClassName:f}=w,m=J(w,["children","className","horizontal","icon","kind","title","metric","partnerCount","totalPartners","unsafelyReplaceClassName"]),b=B(f||"sps-insight-tile",`sps-insight-tile--${i}`,n,a&&"sps-insight-tile--horizontal",t&&"sps-insight-tile--has-detail"),{t:v}=s.useContext(He),[T,k,g]=(u?v("design-system:insightTile.partnerCount",{count:u,total:p}):"").split("|");return s.createElement(s.Fragment,null,s.createElement("div",I({className:b},m),s.createElement("div",{className:"sps-insight-tile__body"},o?s.createElement("i",{className:`sps-icon sps-icon-${o}`}):s.createElement("i",{className:`sps-icon sps-icon-${O.SpsInsightTileIcons[i]}`}),c&&s.createElement("div",{className:"sps-insight-tile__metric-count"},c),l&&s.createElement("div",{className:"sps-insight-tile__description"},s.createElement("div",{className:"sps-insight-tile__title",style:{"-webkit-box-orient":"vertical"}},l),s.createElement("div",{className:"sps-insight-tile__detail"},t))),u&&s.createElement("div",{className:"sps-insight-tile__partner-count"},u===p?s.createElement("div",null,v("design-system:insightTile.all")):s.createElement(s.Fragment,null,s.createElement("div",null,T),s.createElement("div",null,k),s.createElement("div",null,g)),s.createElement("div",{className:"sps-insight-tile__partners-text"},v("design-system:insightTile.partners")))))}Object.assign(ji,{props:UN,propTypes:zN,displayName:"SpsInsightTile"});const qN={basic:{label:"Basic Insight Tiles",examples:{basic:{jsx:D.code`
|
|
3045
3045
|
<SpsInsights>
|
|
3046
3046
|
<SpsInsightTile
|
|
3047
3047
|
kind={SpsInsightCardKind.GENERAL}
|
package/lib/index.es.js
CHANGED
|
@@ -24691,7 +24691,7 @@ const propsDoc$14 = {
|
|
|
24691
24691
|
icon: "SpsIcon",
|
|
24692
24692
|
kind: "SpsInsightTileKind",
|
|
24693
24693
|
title: "string",
|
|
24694
|
-
metric: "number",
|
|
24694
|
+
metric: "number | string",
|
|
24695
24695
|
partnerCount: "number",
|
|
24696
24696
|
totalPartners: "number"
|
|
24697
24697
|
};
|
|
@@ -24700,7 +24700,7 @@ const propTypes$17 = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
|
24700
24700
|
icon: enumValue(SpsIcon$1),
|
|
24701
24701
|
kind: enumValue(SpsInsightTileKind),
|
|
24702
24702
|
title: propTypes$1K.exports.string,
|
|
24703
|
-
metric: propTypes$1K.exports.number,
|
|
24703
|
+
metric: propTypes$1K.exports.number || propTypes$1K.exports.string,
|
|
24704
24704
|
partnerCount: propTypes$1K.exports.number,
|
|
24705
24705
|
totalPartners: propTypes$1K.exports.number
|
|
24706
24706
|
});
|
|
@@ -5,7 +5,7 @@ declare const propTypes: {
|
|
|
5
5
|
icon: PropTypes.Requireable<SpsIcon>;
|
|
6
6
|
kind: PropTypes.Requireable<SpsInsightTileKind>;
|
|
7
7
|
title: PropTypes.Requireable<string>;
|
|
8
|
-
metric: PropTypes.Requireable<number>;
|
|
8
|
+
metric: PropTypes.Requireable<string> | PropTypes.Requireable<number>;
|
|
9
9
|
partnerCount: PropTypes.Requireable<number>;
|
|
10
10
|
totalPartners: PropTypes.Requireable<number>;
|
|
11
11
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
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": "4.
|
|
4
|
+
"version": "4.32.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": "4.
|
|
32
|
-
"@spscommerce/ds-shared": "4.
|
|
33
|
-
"@spscommerce/positioning": "4.
|
|
34
|
-
"@spscommerce/utils": "4.
|
|
31
|
+
"@spscommerce/ds-colors": "4.32.0",
|
|
32
|
+
"@spscommerce/ds-shared": "4.32.0",
|
|
33
|
+
"@spscommerce/positioning": "4.32.0",
|
|
34
|
+
"@spscommerce/utils": "4.32.0",
|
|
35
35
|
"moment": "^2.25.3",
|
|
36
36
|
"moment-timezone": "^0.5.28",
|
|
37
37
|
"react": "^16.9.0",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@react-stately/collections": "^3.3.3",
|
|
42
|
-
"@spscommerce/ds-colors": "4.
|
|
43
|
-
"@spscommerce/ds-shared": "4.
|
|
44
|
-
"@spscommerce/positioning": "4.
|
|
45
|
-
"@spscommerce/utils": "4.
|
|
42
|
+
"@spscommerce/ds-colors": "4.32.0",
|
|
43
|
+
"@spscommerce/ds-shared": "4.32.0",
|
|
44
|
+
"@spscommerce/positioning": "4.32.0",
|
|
45
|
+
"@spscommerce/utils": "4.32.0",
|
|
46
46
|
"@testing-library/jest-dom": "^4.2.4",
|
|
47
47
|
"@testing-library/react": "^9.3.2",
|
|
48
48
|
"@types/prop-types": "^15.7.1",
|