@spscommerce/ds-react 5.20.6 → 5.21.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 +20 -1
- package/lib/index.es.js +24 -1
- package/package.json +11 -11
package/lib/index.cjs.js
CHANGED
|
@@ -5395,7 +5395,7 @@ var a=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
5395
5395
|
)}
|
|
5396
5396
|
</>;
|
|
5397
5397
|
}
|
|
5398
|
-
`}}},sizing:{label:"Sizing",description:()=>s.createElement("p",null,"There are
|
|
5398
|
+
`}}},sizing:{label:"Sizing",description:()=>s.createElement("p",null,"There are 4 sizes of Modal: Small (4 columns), Medium (6 columns), and Large (8 columns), XLarge (12 columns). Use the size that best fits the content that needs to be in the Modal, erring towards the smallest size whenever possible.")},default:{label:"Default",description:()=>s.createElement("p",null,"Use Default Modals to inform the user of something with a neutral meaning. Use these as the default option for Modals."),examples:{small:{description:"Small",react:x.code`
|
|
5399
5399
|
function Component() {
|
|
5400
5400
|
const [showModal, setShowModal] = React.useState(false);
|
|
5401
5401
|
|
|
@@ -5452,6 +5452,25 @@ var a=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
5452
5452
|
)}
|
|
5453
5453
|
</>;
|
|
5454
5454
|
}
|
|
5455
|
+
`},xlarge:{description:"XLarge",react:x.code`
|
|
5456
|
+
function Component() {
|
|
5457
|
+
const [showModal, setShowModal] = React.useState(false);
|
|
5458
|
+
|
|
5459
|
+
return <>
|
|
5460
|
+
<SpsButton kind={ButtonKind.LINK} onClick={() => setShowModal(true)}>
|
|
5461
|
+
Show XLarge Default Modal
|
|
5462
|
+
</SpsButton>
|
|
5463
|
+
{showModal && (
|
|
5464
|
+
<SpsModalV2
|
|
5465
|
+
size={ModalSize.X_LARGE}
|
|
5466
|
+
onClose={() => setShowModal(false)}
|
|
5467
|
+
>
|
|
5468
|
+
<div className="sps-text-semibold mb-1">Optional Headline</div>
|
|
5469
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
|
|
5470
|
+
</SpsModalV2>
|
|
5471
|
+
)}
|
|
5472
|
+
</>;
|
|
5473
|
+
}
|
|
5455
5474
|
`}}},delete:{label:"Delete",description:()=>s.createElement("p",null,"Use Delete Modals to have the user confirm they want to continue with a destructive action. Be clear on what will happen if they continue."),examples:{small:{description:"Small",react:x.code`
|
|
5456
5475
|
function Component() {
|
|
5457
5476
|
const [showModal, setShowModal] = React.useState(false);
|
package/lib/index.es.js
CHANGED
|
@@ -29560,7 +29560,7 @@ const SpsModalExamples = {
|
|
|
29560
29560
|
},
|
|
29561
29561
|
sizing: {
|
|
29562
29562
|
label: "Sizing",
|
|
29563
|
-
description: () => /* @__PURE__ */ React.createElement("p", null, "There are
|
|
29563
|
+
description: () => /* @__PURE__ */ React.createElement("p", null, "There are 4 sizes of Modal: Small (4 columns), Medium (6 columns), and Large (8 columns), XLarge (12 columns). Use the size that best fits the content that needs to be in the Modal, erring towards the smallest size whenever possible.")
|
|
29564
29564
|
},
|
|
29565
29565
|
default: {
|
|
29566
29566
|
label: "Default",
|
|
@@ -29634,6 +29634,29 @@ const SpsModalExamples = {
|
|
|
29634
29634
|
</>;
|
|
29635
29635
|
}
|
|
29636
29636
|
`
|
|
29637
|
+
},
|
|
29638
|
+
xlarge: {
|
|
29639
|
+
description: "XLarge",
|
|
29640
|
+
react: code`
|
|
29641
|
+
function Component() {
|
|
29642
|
+
const [showModal, setShowModal] = React.useState(false);
|
|
29643
|
+
|
|
29644
|
+
return <>
|
|
29645
|
+
<SpsButton kind={ButtonKind.LINK} onClick={() => setShowModal(true)}>
|
|
29646
|
+
Show XLarge Default Modal
|
|
29647
|
+
</SpsButton>
|
|
29648
|
+
{showModal && (
|
|
29649
|
+
<SpsModalV2
|
|
29650
|
+
size={ModalSize.X_LARGE}
|
|
29651
|
+
onClose={() => setShowModal(false)}
|
|
29652
|
+
>
|
|
29653
|
+
<div className="sps-text-semibold mb-1">Optional Headline</div>
|
|
29654
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
|
|
29655
|
+
</SpsModalV2>
|
|
29656
|
+
)}
|
|
29657
|
+
</>;
|
|
29658
|
+
}
|
|
29659
|
+
`
|
|
29637
29660
|
}
|
|
29638
29661
|
}
|
|
29639
29662
|
},
|
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": "5.
|
|
4
|
+
"version": "5.21.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,11 +28,11 @@
|
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@react-stately/collections": "^3.3.3",
|
|
31
|
-
"@spscommerce/ds-colors": "5.
|
|
32
|
-
"@spscommerce/ds-illustrations": "5.
|
|
33
|
-
"@spscommerce/ds-shared": "5.
|
|
34
|
-
"@spscommerce/positioning": "5.
|
|
35
|
-
"@spscommerce/utils": "5.
|
|
31
|
+
"@spscommerce/ds-colors": "5.21.0",
|
|
32
|
+
"@spscommerce/ds-illustrations": "5.21.0",
|
|
33
|
+
"@spscommerce/ds-shared": "5.21.0",
|
|
34
|
+
"@spscommerce/positioning": "5.21.0",
|
|
35
|
+
"@spscommerce/utils": "5.21.0",
|
|
36
36
|
"moment": "^2.25.3",
|
|
37
37
|
"moment-timezone": "^0.5.28",
|
|
38
38
|
"react": "^16.9.0",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@react-stately/collections": "^3.3.3",
|
|
43
|
-
"@spscommerce/ds-colors": "5.
|
|
44
|
-
"@spscommerce/ds-illustrations": "5.
|
|
45
|
-
"@spscommerce/ds-shared": "5.
|
|
46
|
-
"@spscommerce/positioning": "5.
|
|
47
|
-
"@spscommerce/utils": "5.
|
|
43
|
+
"@spscommerce/ds-colors": "5.21.0",
|
|
44
|
+
"@spscommerce/ds-illustrations": "5.21.0",
|
|
45
|
+
"@spscommerce/ds-shared": "5.21.0",
|
|
46
|
+
"@spscommerce/positioning": "5.21.0",
|
|
47
|
+
"@spscommerce/utils": "5.21.0",
|
|
48
48
|
"@testing-library/react": "^9.3.2",
|
|
49
49
|
"@types/prop-types": "^15.7.1",
|
|
50
50
|
"@types/react": "^16.9.0",
|