@peculiar/react-components 0.6.4 → 0.6.5
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/dist/cjs/Drawer/drawer.js +2 -4
- package/dist/cjs/Drawer/drawer.js.map +1 -1
- package/dist/esm/Drawer/drawer.js +2 -4
- package/dist/esm/Drawer/drawer.js.map +1 -1
- package/dist/esnext/Drawer/drawer.js +2 -4
- package/dist/esnext/Drawer/drawer.js.map +1 -1
- package/dist/types/Drawer/drawer.d.ts +3 -6
- package/package.json +2 -2
|
@@ -68,15 +68,13 @@ var DrawerPaper = (0, styled_1.default)('div')(function (props) { return (__assi
|
|
|
68
68
|
*
|
|
69
69
|
*/
|
|
70
70
|
exports.Drawer = React.forwardRef(function (props, ref) {
|
|
71
|
-
var children = props.children, open = props.open, transitionDuration = props.transitionDuration,
|
|
72
|
-
return (React.createElement(Modal_1.Modal, { ref: ref, open: open, transitionDuration: transitionDuration, onClose: onClose, "data-testid": dataTestId,
|
|
71
|
+
var children = props.children, open = props.open, transitionDuration = props.transitionDuration, _a = props.modalProps, modalProps = _a === void 0 ? {} : _a, onClose = props.onClose, dataTestId = props["data-testid"], other = __rest(props, ["children", "open", "transitionDuration", "modalProps", "onClose", 'data-testid']);
|
|
72
|
+
return (React.createElement(Modal_1.Modal, __assign({}, modalProps, { ref: ref, open: open, transitionDuration: transitionDuration, onClose: onClose, "data-testid": dataTestId, keepMounted: true }),
|
|
73
73
|
React.createElement(Slide_1.Slide, { in: open, timeout: transitionDuration },
|
|
74
74
|
React.createElement(DrawerPaper, __assign({ tabIndex: -1 }, other), children))));
|
|
75
75
|
});
|
|
76
76
|
exports.Drawer.displayName = 'Drawer';
|
|
77
77
|
exports.Drawer.defaultProps = {
|
|
78
78
|
transitionDuration: 225,
|
|
79
|
-
disableBackdropClick: false,
|
|
80
|
-
disableEscapeKeyDown: false,
|
|
81
79
|
};
|
|
82
80
|
//# sourceMappingURL=drawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../../src/Drawer/drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+B;AAC/B,2DAAqC;AACrC,
|
|
1
|
+
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../../src/Drawer/drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+B;AAC/B,2DAAqC;AACrC,kCAA6C;AAC7C,kCAAiC;AAkCjC;;GAEG;AAEH;;GAEG;AACH,IAAM,WAAW,GAAG,IAAA,gBAAM,EAAC,KAAK,CAAC,CAC/B,UAAC,KAAK,IAAK,OAAA,YACT,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,OAAO,EACjB,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,CAAC,EACR,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,YAAY,IACpB,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC;IAChC,eAAe,EAAE,wBAAwB;CAC1C,CAAC,CAAC,CAAC;IACF,eAAe,EAAE,uBAAuB;CACzC,CAAC,EACF,EAdS,CAcT,CACH,CAAC;AACF;;GAEG;AAEU,QAAA,MAAM,GAAG,KAAK,CAAC,UAAU,CAA8B,UAAC,KAAK,EAAE,GAAG;IAE3E,IAAA,QAAQ,GAON,KAAK,SAPC,EACR,IAAI,GAMF,KAAK,KANH,EACJ,kBAAkB,GAKhB,KAAK,mBALW,EAClB,KAIE,KAAK,WAJQ,EAAf,UAAU,mBAAG,EAAE,KAAA,EACf,OAAO,GAGL,KAAK,QAHA,EACQ,UAAU,GAEvB,KAAK,eAFkB,EACtB,KAAK,UACN,KAAK,EARH,kFAQL,CADS,CACA;IAEV,OAAO,CACL,oBAAC,aAAK,eACA,UAAU,IACd,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,EACV,kBAAkB,EAAE,kBAAkB,EACtC,OAAO,EAAE,OAAO,iBACH,UAAU,EACvB,WAAW;QAEX,oBAAC,aAAK,IACJ,EAAE,EAAE,IAAI,EACR,OAAO,EAAE,kBAAkB;YAE3B,oBAAC,WAAW,aACV,QAAQ,EAAE,CAAC,CAAC,IACR,KAAK,GAER,QAAQ,CACG,CACR,CACF,CACT,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,cAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;AAE9B,cAAM,CAAC,YAAY,GAAG;IACpB,kBAAkB,EAAE,GAAG;CACxB,CAAC"}
|
|
@@ -39,15 +39,13 @@ var DrawerPaper = styled('div')(function (props) { return (__assign({ width: '27
|
|
|
39
39
|
*
|
|
40
40
|
*/
|
|
41
41
|
export var Drawer = React.forwardRef(function (props, ref) {
|
|
42
|
-
var children = props.children, open = props.open, transitionDuration = props.transitionDuration,
|
|
43
|
-
return (React.createElement(Modal, { ref: ref, open: open, transitionDuration: transitionDuration, onClose: onClose, "data-testid": dataTestId,
|
|
42
|
+
var children = props.children, open = props.open, transitionDuration = props.transitionDuration, _a = props.modalProps, modalProps = _a === void 0 ? {} : _a, onClose = props.onClose, dataTestId = props["data-testid"], other = __rest(props, ["children", "open", "transitionDuration", "modalProps", "onClose", 'data-testid']);
|
|
43
|
+
return (React.createElement(Modal, __assign({}, modalProps, { ref: ref, open: open, transitionDuration: transitionDuration, onClose: onClose, "data-testid": dataTestId, keepMounted: true }),
|
|
44
44
|
React.createElement(Slide, { in: open, timeout: transitionDuration },
|
|
45
45
|
React.createElement(DrawerPaper, __assign({ tabIndex: -1 }, other), children))));
|
|
46
46
|
});
|
|
47
47
|
Drawer.displayName = 'Drawer';
|
|
48
48
|
Drawer.defaultProps = {
|
|
49
49
|
transitionDuration: 225,
|
|
50
|
-
disableBackdropClick: false,
|
|
51
|
-
disableEscapeKeyDown: false,
|
|
52
50
|
};
|
|
53
51
|
//# sourceMappingURL=drawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../../src/Drawer/drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../../src/Drawer/drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,KAAK,EAAc,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAkCjC;;GAEG;AAEH;;GAEG;AACH,IAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAC/B,UAAC,KAAK,IAAK,OAAA,YACT,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,OAAO,EACjB,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,CAAC,EACR,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,YAAY,IACpB,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC;IAChC,eAAe,EAAE,wBAAwB;CAC1C,CAAC,CAAC,CAAC;IACF,eAAe,EAAE,uBAAuB;CACzC,CAAC,EACF,EAdS,CAcT,CACH,CAAC;AACF;;GAEG;AAEH,MAAM,CAAC,IAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAA8B,UAAC,KAAK,EAAE,GAAG;IAE3E,IAAA,QAAQ,GAON,KAAK,SAPC,EACR,IAAI,GAMF,KAAK,KANH,EACJ,kBAAkB,GAKhB,KAAK,mBALW,EAClB,KAIE,KAAK,WAJQ,EAAf,UAAU,mBAAG,EAAE,KAAA,EACf,OAAO,GAGL,KAAK,QAHA,EACQ,UAAU,GAEvB,KAAK,eAFkB,EACtB,KAAK,UACN,KAAK,EARH,kFAQL,CADS,CACA;IAEV,OAAO,CACL,oBAAC,KAAK,eACA,UAAU,IACd,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,EACV,kBAAkB,EAAE,kBAAkB,EACtC,OAAO,EAAE,OAAO,iBACH,UAAU,EACvB,WAAW;QAEX,oBAAC,KAAK,IACJ,EAAE,EAAE,IAAI,EACR,OAAO,EAAE,kBAAkB;YAE3B,oBAAC,WAAW,aACV,QAAQ,EAAE,CAAC,CAAC,IACR,KAAK,GAER,QAAQ,CACG,CACR,CACF,CACT,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;AAE9B,MAAM,CAAC,YAAY,GAAG;IACpB,kBAAkB,EAAE,GAAG;CACxB,CAAC"}
|
|
@@ -27,15 +27,13 @@ const DrawerPaper = styled('div')((props) => ({
|
|
|
27
27
|
*
|
|
28
28
|
*/
|
|
29
29
|
export const Drawer = React.forwardRef((props, ref) => {
|
|
30
|
-
const { children, open, transitionDuration,
|
|
31
|
-
return (React.createElement(Modal, { ref: ref, open: open, transitionDuration: transitionDuration, onClose: onClose, "data-testid": dataTestId,
|
|
30
|
+
const { children, open, transitionDuration, modalProps = {}, onClose, 'data-testid': dataTestId, ...other } = props;
|
|
31
|
+
return (React.createElement(Modal, { ...modalProps, ref: ref, open: open, transitionDuration: transitionDuration, onClose: onClose, "data-testid": dataTestId, keepMounted: true },
|
|
32
32
|
React.createElement(Slide, { in: open, timeout: transitionDuration },
|
|
33
33
|
React.createElement(DrawerPaper, { tabIndex: -1, ...other }, children))));
|
|
34
34
|
});
|
|
35
35
|
Drawer.displayName = 'Drawer';
|
|
36
36
|
Drawer.defaultProps = {
|
|
37
37
|
transitionDuration: 225,
|
|
38
|
-
disableBackdropClick: false,
|
|
39
|
-
disableEscapeKeyDown: false,
|
|
40
38
|
};
|
|
41
39
|
//# sourceMappingURL=drawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../../src/Drawer/drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../../src/Drawer/drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,KAAK,EAAc,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAkCjC;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAC/B,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACV,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,OAAO;IACjB,GAAG,EAAE,CAAC;IACN,KAAK,EAAE,CAAC;IACR,SAAS,EAAE,MAAM;IACjB,OAAO,EAAE,MAAM;IACf,SAAS,EAAE,YAAY;IACvB,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC;QAChC,eAAe,EAAE,wBAAwB;KAC1C,CAAC,CAAC,CAAC;QACF,eAAe,EAAE,uBAAuB;KACzC,CAAC;CACH,CAAC,CACH,CAAC;AACF;;GAEG;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAA8B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACjF,MAAM,EACJ,QAAQ,EACR,IAAI,EACJ,kBAAkB,EAClB,UAAU,GAAG,EAAE,EACf,OAAO,EACP,aAAa,EAAE,UAAU,EACzB,GAAG,KAAK,EACT,GAAG,KAAK,CAAC;IAEV,OAAO,CACL,oBAAC,KAAK,OACA,UAAU,EACd,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,EACV,kBAAkB,EAAE,kBAAkB,EACtC,OAAO,EAAE,OAAO,iBACH,UAAU,EACvB,WAAW;QAEX,oBAAC,KAAK,IACJ,EAAE,EAAE,IAAI,EACR,OAAO,EAAE,kBAAkB;YAE3B,oBAAC,WAAW,IACV,QAAQ,EAAE,CAAC,CAAC,KACR,KAAK,IAER,QAAQ,CACG,CACR,CACF,CACT,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;AAE9B,MAAM,CAAC,YAAY,GAAG;IACpB,kBAAkB,EAAE,GAAG;CACxB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { ModalProps } from '../Modal';
|
|
2
3
|
/**
|
|
3
4
|
* Types.
|
|
4
5
|
*/
|
|
@@ -20,13 +21,9 @@ declare type DrawerOwnProps = {
|
|
|
20
21
|
*/
|
|
21
22
|
transitionDuration?: number;
|
|
22
23
|
/**
|
|
23
|
-
*
|
|
24
|
+
* Props applied to the `Modal` element.
|
|
24
25
|
*/
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* If `true`, hitting escape will not fire the `onClose` callback.
|
|
28
|
-
*/
|
|
29
|
-
disableEscapeKeyDown?: boolean;
|
|
26
|
+
modalProps?: Partial<Omit<ModalProps, 'transitionDuration' | 'open' | 'onClose' | 'keepMounted'>>;
|
|
30
27
|
/**
|
|
31
28
|
* Callback fired when the component requests to be closed.
|
|
32
29
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peculiar/react-components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.5",
|
|
5
5
|
"author": "PeculiarVentures Team",
|
|
6
6
|
"description": "A simple and customizable component library to build faster, beautiful, and more accessible React applications.",
|
|
7
7
|
"keywords": [
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"node": ">=12.x"
|
|
82
82
|
},
|
|
83
83
|
"license": "MIT",
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "7da27511ecd768b770384ea2532c7be108ad67fb"
|
|
85
85
|
}
|