@spscommerce/ds-react 6.35.5 → 6.36.1
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 +74 -74
- package/lib/index.es.js +5 -1
- package/lib/slide-in-panel/SpsSlideInPanel.d.ts +2 -1
- package/package.json +9 -9
package/lib/index.es.js
CHANGED
|
@@ -29370,12 +29370,14 @@ Object.assign(SpsModal, {
|
|
|
29370
29370
|
const propsDoc$J = {
|
|
29371
29371
|
title: "string",
|
|
29372
29372
|
show: "boolean",
|
|
29373
|
+
closeOnEscapePressed: "boolean",
|
|
29373
29374
|
onClose: "() => void",
|
|
29374
29375
|
focusElementOnOpen: "React.MutableRefObject<HTMLElement>"
|
|
29375
29376
|
};
|
|
29376
29377
|
const propTypes$J = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
29377
29378
|
title: propTypes$1I.exports.string,
|
|
29378
29379
|
show: propTypes$1I.exports.bool,
|
|
29380
|
+
closeOnEscapePressed: propTypes$1I.exports.bool,
|
|
29379
29381
|
onClose: fun(),
|
|
29380
29382
|
focusElementOnOpen: ref()
|
|
29381
29383
|
});
|
|
@@ -29385,6 +29387,7 @@ function SpsSlideInPanel(_O) {
|
|
|
29385
29387
|
className,
|
|
29386
29388
|
id: idProp,
|
|
29387
29389
|
show,
|
|
29390
|
+
closeOnEscapePressed = true,
|
|
29388
29391
|
onClose,
|
|
29389
29392
|
focusElementOnOpen,
|
|
29390
29393
|
title
|
|
@@ -29393,6 +29396,7 @@ function SpsSlideInPanel(_O) {
|
|
|
29393
29396
|
"className",
|
|
29394
29397
|
"id",
|
|
29395
29398
|
"show",
|
|
29399
|
+
"closeOnEscapePressed",
|
|
29396
29400
|
"onClose",
|
|
29397
29401
|
"focusElementOnOpen",
|
|
29398
29402
|
"title"
|
|
@@ -29430,7 +29434,7 @@ function SpsSlideInPanel(_O) {
|
|
|
29430
29434
|
}
|
|
29431
29435
|
}, [focusElementOnOpen, bodyIsReady]);
|
|
29432
29436
|
const handleKeydown = React.useCallback((event) => {
|
|
29433
|
-
if (event && event.key === "Escape" && onClose) {
|
|
29437
|
+
if (closeOnEscapePressed && event && event.key === "Escape" && onClose) {
|
|
29434
29438
|
onClose();
|
|
29435
29439
|
}
|
|
29436
29440
|
if (event && event.key === "Tab") {
|
|
@@ -3,6 +3,7 @@ import * as PropTypes from "../prop-types";
|
|
|
3
3
|
declare const propTypes: {
|
|
4
4
|
title: PropTypes.Requireable<string>;
|
|
5
5
|
show: PropTypes.Requireable<boolean>;
|
|
6
|
+
closeOnEscapePressed: PropTypes.Requireable<boolean>;
|
|
6
7
|
onClose: PropTypes.Requireable<() => void>;
|
|
7
8
|
focusElementOnOpen: PropTypes.Requireable<React.MutableRefObject<HTMLElement>>;
|
|
8
9
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
@@ -11,5 +12,5 @@ declare const propTypes: {
|
|
|
11
12
|
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
12
13
|
};
|
|
13
14
|
export declare type SpsSlideInPanelProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
14
|
-
export declare function SpsSlideInPanel({ children, className, id: idProp, show, onClose, focusElementOnOpen, title, ...rest }: SpsSlideInPanelProps): JSX.Element;
|
|
15
|
+
export declare function SpsSlideInPanel({ children, className, id: idProp, show, closeOnEscapePressed, onClose, focusElementOnOpen, title, ...rest }: SpsSlideInPanelProps): JSX.Element;
|
|
15
16
|
export {};
|
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.36.1",
|
|
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.36.1",
|
|
32
|
+
"@spscommerce/ds-illustrations": "6.36.1",
|
|
33
|
+
"@spscommerce/ds-shared": "6.36.1",
|
|
34
|
+
"@spscommerce/positioning": "6.36.1",
|
|
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.36.1",
|
|
44
|
+
"@spscommerce/ds-illustrations": "6.36.1",
|
|
45
|
+
"@spscommerce/ds-shared": "6.36.1",
|
|
46
|
+
"@spscommerce/positioning": "6.36.1",
|
|
47
47
|
"@spscommerce/utils": "^6.11.3",
|
|
48
48
|
"@testing-library/react": "^10.4.0",
|
|
49
49
|
"@types/prop-types": "^15.7.1",
|