@elliemae/ds-side-panel 2.3.0-alpha.7 → 2.3.0-next.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/cjs/SidePanel.js +97 -0
- package/cjs/SidePanelHeader.js +100 -0
- package/cjs/TemplateBasicPageWithSidePanel.js +122 -0
- package/cjs/defaultProps.js +14 -0
- package/cjs/index.js +17 -0
- package/cjs/props.js +44 -0
- package/esm/SidePanel.js +86 -0
- package/esm/SidePanelHeader.js +89 -0
- package/esm/TemplateBasicPageWithSidePanel.js +113 -0
- package/esm/defaultProps.js +10 -0
- package/esm/index.js +3 -0
- package/esm/props.js +40 -0
- package/package.json +30 -32
- package/types/SidePanel.d.ts +95 -0
- package/types/SidePanelHeader.d.ts +46 -0
- package/types/TemplateBasicPageWithSidePanel.d.ts +109 -0
- package/types/defaultProps.d.ts +8 -0
- package/types/index.d.ts +4 -0
- package/types/props.d.ts +82 -0
- package/dist/cjs/SidePanel.js +0 -111
- package/dist/cjs/SidePanel.js.map +0 -7
- package/dist/cjs/SidePanelHeader.js +0 -109
- package/dist/cjs/SidePanelHeader.js.map +0 -7
- package/dist/cjs/TemplateBasicPageWithSidePanel.js +0 -91
- package/dist/cjs/TemplateBasicPageWithSidePanel.js.map +0 -7
- package/dist/cjs/defaultProps.js +0 -42
- package/dist/cjs/defaultProps.js.map +0 -7
- package/dist/cjs/index.js +0 -38
- package/dist/cjs/index.js.map +0 -7
- package/dist/cjs/props.js +0 -48
- package/dist/cjs/props.js.map +0 -7
- package/dist/esm/SidePanel.js +0 -82
- package/dist/esm/SidePanel.js.map +0 -7
- package/dist/esm/SidePanelHeader.js +0 -80
- package/dist/esm/SidePanelHeader.js.map +0 -7
- package/dist/esm/TemplateBasicPageWithSidePanel.js +0 -62
- package/dist/esm/TemplateBasicPageWithSidePanel.js.map +0 -7
- package/dist/esm/defaultProps.js +0 -13
- package/dist/esm/defaultProps.js.map +0 -7
- package/dist/esm/index.js +0 -9
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/props.js +0 -19
- package/dist/esm/props.js.map +0 -7
package/esm/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { DSSidePanelWithSchema, SidePanel, SidePanel as default } from './SidePanel.js';
|
|
2
|
+
export { DSSidePanelHeaderWithSchema, SidePanelHeader } from './SidePanelHeader.js';
|
|
3
|
+
export { DSTemplateBasicPageWithSidePanel, TemplateBasicPageWithSidePanel } from './TemplateBasicPageWithSidePanel.js';
|
package/esm/props.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { PropTypes } from 'react-desc';
|
|
2
|
+
|
|
3
|
+
const props = {
|
|
4
|
+
/**
|
|
5
|
+
* Main content
|
|
6
|
+
*/
|
|
7
|
+
children: PropTypes.element.isRequired.description('Main content'),
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Should show the slide panel or not
|
|
11
|
+
*/
|
|
12
|
+
isOpen: PropTypes.bool.description('Should show the slide panel or not'),
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Footer for Slide Panel
|
|
16
|
+
*/
|
|
17
|
+
footer: PropTypes.element.description('Footer for Slide Panel'),
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Header for Slide Panel instance of SlidePanelHeader
|
|
21
|
+
*/
|
|
22
|
+
header: PropTypes.element.description('Header for Slide Panel instance of SlidePanelHeader'),
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Content for Slide Panel
|
|
26
|
+
*/
|
|
27
|
+
panelContent: PropTypes.element.description('Content for Slide Panel'),
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Width of the panel open. eg: 300
|
|
31
|
+
*/
|
|
32
|
+
panelWidth: PropTypes.number.description('Width of the panel open. eg: 300'),
|
|
33
|
+
widthWhenIsClosed: PropTypes.number.description('Width of the panel closed. eg: 0'),
|
|
34
|
+
panelContentOverflow: PropTypes.oneOf(['auto', 'hidden']).description('Overflow on SidePanel content'),
|
|
35
|
+
withBorder: PropTypes.bool.description('Whether the sidepanel has border or not'),
|
|
36
|
+
withBoxShadow: PropTypes.bool.description('Whether the sidepanel has box shadow or not'),
|
|
37
|
+
noGridInfluencer: PropTypes.bool.description('Whether the sidepanel is grid-influencer or not')
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { props };
|
package/package.json
CHANGED
|
@@ -1,38 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-side-panel",
|
|
3
|
-
"version": "2.3.0-
|
|
3
|
+
"version": "2.3.0-next.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Side Panel",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"module": "./dist/esm/index.js",
|
|
10
|
-
"main": "./dist/cjs/index.js",
|
|
11
|
-
"types": "./dist/types/index.d.ts",
|
|
6
|
+
"module": "./esm/index.js",
|
|
7
|
+
"main": "./cjs/index.js",
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
12
9
|
"exports": {
|
|
13
10
|
".": {
|
|
14
|
-
"import": "./
|
|
15
|
-
"require": "./
|
|
11
|
+
"import": "./esm/index.js",
|
|
12
|
+
"require": "./cjs/index.js"
|
|
16
13
|
},
|
|
17
14
|
"./TemplateBasicPageWithSidePanel": {
|
|
18
|
-
"import": "./
|
|
19
|
-
"require": "./
|
|
15
|
+
"import": "./esm/TemplateBasicPageWithSidePanel.js",
|
|
16
|
+
"require": "./cjs/TemplateBasicPageWithSidePanel.js"
|
|
20
17
|
},
|
|
21
18
|
"./SidePanelHeader": {
|
|
22
|
-
"import": "./
|
|
23
|
-
"require": "./
|
|
19
|
+
"import": "./esm/SidePanelHeader.js",
|
|
20
|
+
"require": "./cjs/SidePanelHeader.js"
|
|
24
21
|
},
|
|
25
22
|
"./SidePanel": {
|
|
26
|
-
"import": "./
|
|
27
|
-
"require": "./
|
|
23
|
+
"import": "./esm/SidePanel.js",
|
|
24
|
+
"require": "./cjs/SidePanel.js"
|
|
28
25
|
},
|
|
29
26
|
"./props": {
|
|
30
|
-
"import": "./
|
|
31
|
-
"require": "./
|
|
27
|
+
"import": "./esm/props.js",
|
|
28
|
+
"require": "./cjs/props.js"
|
|
32
29
|
},
|
|
33
30
|
"./defaultProps": {
|
|
34
|
-
"import": "./
|
|
35
|
-
"require": "./
|
|
31
|
+
"import": "./esm/defaultProps.js",
|
|
32
|
+
"require": "./cjs/defaultProps.js"
|
|
36
33
|
}
|
|
37
34
|
},
|
|
38
35
|
"sideEffects": [
|
|
@@ -44,15 +41,21 @@
|
|
|
44
41
|
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
45
42
|
},
|
|
46
43
|
"engines": {
|
|
47
|
-
"
|
|
48
|
-
"node": ">=
|
|
44
|
+
"npm": ">=7",
|
|
45
|
+
"node": ">=14"
|
|
49
46
|
},
|
|
50
47
|
"author": "ICE MT",
|
|
48
|
+
"scripts": {
|
|
49
|
+
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
|
|
50
|
+
"prebuild": "exit 0",
|
|
51
|
+
"predev": "exit 0",
|
|
52
|
+
"build": "node ../../scripts/build/build.js"
|
|
53
|
+
},
|
|
51
54
|
"dependencies": {
|
|
52
|
-
"@elliemae/ds-button": "2.3.0-
|
|
53
|
-
"@elliemae/ds-grid": "2.3.0-
|
|
54
|
-
"@elliemae/ds-icons": "2.3.0-
|
|
55
|
-
"@elliemae/ds-system": "2.3.0-
|
|
55
|
+
"@elliemae/ds-button": "2.3.0-next.1",
|
|
56
|
+
"@elliemae/ds-grid": "2.3.0-next.1",
|
|
57
|
+
"@elliemae/ds-icons": "2.3.0-next.1",
|
|
58
|
+
"@elliemae/ds-system": "2.3.0-next.1",
|
|
56
59
|
"react-desc": "~4.1.3"
|
|
57
60
|
},
|
|
58
61
|
"devDependencies": {
|
|
@@ -66,12 +69,7 @@
|
|
|
66
69
|
},
|
|
67
70
|
"publishConfig": {
|
|
68
71
|
"access": "public",
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
"scripts": {
|
|
72
|
-
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
|
|
73
|
-
"prebuild": "exit 0",
|
|
74
|
-
"predev": "exit 0",
|
|
75
|
-
"build": "node ../../scripts/build/build.js"
|
|
72
|
+
"directory": "dist",
|
|
73
|
+
"generateSubmodules": true
|
|
76
74
|
}
|
|
77
75
|
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const SidePanel: {
|
|
4
|
+
({ children, isOpen, footer, header, panelContent, panelWidth, panelContentOverflow, widthWhenIsClosed, noGridInfluencer, withBorder, withBoxShadow, }: {
|
|
5
|
+
children: any;
|
|
6
|
+
isOpen: any;
|
|
7
|
+
footer: any;
|
|
8
|
+
header: any;
|
|
9
|
+
panelContent: any;
|
|
10
|
+
panelWidth: any;
|
|
11
|
+
panelContentOverflow: any;
|
|
12
|
+
widthWhenIsClosed: any;
|
|
13
|
+
noGridInfluencer: any;
|
|
14
|
+
withBorder?: boolean | undefined;
|
|
15
|
+
withBoxShadow?: boolean | undefined;
|
|
16
|
+
}): React.ReactElement;
|
|
17
|
+
propTypes: {
|
|
18
|
+
children: any;
|
|
19
|
+
isOpen: {
|
|
20
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
21
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
22
|
+
};
|
|
23
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
24
|
+
};
|
|
25
|
+
footer: {
|
|
26
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
27
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
28
|
+
};
|
|
29
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
30
|
+
};
|
|
31
|
+
header: {
|
|
32
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
33
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
34
|
+
};
|
|
35
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
36
|
+
};
|
|
37
|
+
panelContent: {
|
|
38
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
39
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
40
|
+
};
|
|
41
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
42
|
+
};
|
|
43
|
+
panelWidth: {
|
|
44
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
45
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
46
|
+
};
|
|
47
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
48
|
+
};
|
|
49
|
+
widthWhenIsClosed: {
|
|
50
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
51
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
52
|
+
};
|
|
53
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
54
|
+
};
|
|
55
|
+
panelContentOverflow: {
|
|
56
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
57
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
58
|
+
};
|
|
59
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
60
|
+
};
|
|
61
|
+
withBorder: {
|
|
62
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
63
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
64
|
+
};
|
|
65
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
66
|
+
};
|
|
67
|
+
withBoxShadow: {
|
|
68
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
69
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
70
|
+
};
|
|
71
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
72
|
+
};
|
|
73
|
+
noGridInfluencer: {
|
|
74
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
75
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
76
|
+
};
|
|
77
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
defaultProps: {
|
|
81
|
+
isOpen: boolean;
|
|
82
|
+
panelWidth: number;
|
|
83
|
+
widthWhenIsClosed: number;
|
|
84
|
+
panelContentOverflow: string;
|
|
85
|
+
withBorder: boolean;
|
|
86
|
+
withBoxShadow: boolean;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
declare const DSSidePanelWithSchema: {
|
|
90
|
+
(props?: unknown): JSX.Element;
|
|
91
|
+
propTypes: unknown;
|
|
92
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
93
|
+
};
|
|
94
|
+
export { SidePanel, DSSidePanelWithSchema };
|
|
95
|
+
export default SidePanel;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
declare const SidePanelHeader: {
|
|
4
|
+
({ title, additionalAction, onClose, showClose }: {
|
|
5
|
+
title?: null | undefined;
|
|
6
|
+
additionalAction?: null | undefined;
|
|
7
|
+
onClose?: ((...args: any[]) => void) | undefined;
|
|
8
|
+
showClose?: boolean | undefined;
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
propTypes: {
|
|
11
|
+
/** Page title */
|
|
12
|
+
title: {
|
|
13
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
14
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
15
|
+
};
|
|
16
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
17
|
+
};
|
|
18
|
+
/** Action button */
|
|
19
|
+
additionalAction: {
|
|
20
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
21
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
22
|
+
};
|
|
23
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
24
|
+
};
|
|
25
|
+
/** Called when the slide collapse */
|
|
26
|
+
onClose: {
|
|
27
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
28
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
29
|
+
};
|
|
30
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
31
|
+
};
|
|
32
|
+
/** Show/Hide close button */
|
|
33
|
+
showClose: {
|
|
34
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
35
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
36
|
+
};
|
|
37
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
declare const DSSidePanelHeaderWithSchema: {
|
|
42
|
+
(props?: unknown): JSX.Element;
|
|
43
|
+
propTypes: unknown;
|
|
44
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
45
|
+
};
|
|
46
|
+
export { SidePanelHeader, DSSidePanelHeaderWithSchema };
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
declare const TemplateBasicPageWithSidePanel: {
|
|
4
|
+
({ globalHeader, mainHeader, mainContent, mainFooter, isOpen, onClose, panelFooter, panelHeader, panelContent, panelWidth, }: {
|
|
5
|
+
globalHeader?: null | undefined;
|
|
6
|
+
mainHeader?: null | undefined;
|
|
7
|
+
mainContent: any;
|
|
8
|
+
mainFooter: any;
|
|
9
|
+
isOpen?: boolean | undefined;
|
|
10
|
+
onClose: any;
|
|
11
|
+
panelFooter: any;
|
|
12
|
+
panelHeader: any;
|
|
13
|
+
panelContent: any;
|
|
14
|
+
panelWidth: any;
|
|
15
|
+
}): JSX.Element;
|
|
16
|
+
propTypes: {
|
|
17
|
+
/**
|
|
18
|
+
* Global Header
|
|
19
|
+
*/
|
|
20
|
+
globalHeader: {
|
|
21
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
22
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
23
|
+
};
|
|
24
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Main Header
|
|
28
|
+
*/
|
|
29
|
+
mainHeader: {
|
|
30
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
31
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
32
|
+
};
|
|
33
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Main content
|
|
37
|
+
*/
|
|
38
|
+
mainContent: any;
|
|
39
|
+
/**
|
|
40
|
+
* Main Footer
|
|
41
|
+
*/
|
|
42
|
+
mainFooter: {
|
|
43
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
44
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
45
|
+
};
|
|
46
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Should show the slide panel or not
|
|
50
|
+
*/
|
|
51
|
+
isOpen: {
|
|
52
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
53
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
54
|
+
};
|
|
55
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Footer for Slide Panel
|
|
59
|
+
*/
|
|
60
|
+
panelFooter: {
|
|
61
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
62
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
63
|
+
};
|
|
64
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Header for Slide Panel instance of SlidePanelHeader
|
|
68
|
+
*/
|
|
69
|
+
panelHeader: {
|
|
70
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
71
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
72
|
+
};
|
|
73
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Content for Slide Panel
|
|
77
|
+
*/
|
|
78
|
+
panelContent: {
|
|
79
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
80
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
81
|
+
};
|
|
82
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Width of the panel open. eg: 300
|
|
86
|
+
*/
|
|
87
|
+
panelWidth: {
|
|
88
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
89
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
90
|
+
};
|
|
91
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Callback
|
|
95
|
+
*/
|
|
96
|
+
onClose: {
|
|
97
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
98
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
99
|
+
};
|
|
100
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
declare const DSTemplateBasicPageWithSidePanel: {
|
|
105
|
+
(props?: unknown): JSX.Element;
|
|
106
|
+
propTypes: unknown;
|
|
107
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
108
|
+
};
|
|
109
|
+
export { TemplateBasicPageWithSidePanel, DSTemplateBasicPageWithSidePanel };
|
package/types/index.d.ts
ADDED
package/types/props.d.ts
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
export declare const props: {
|
|
3
|
+
/**
|
|
4
|
+
* Main content
|
|
5
|
+
*/
|
|
6
|
+
children: any;
|
|
7
|
+
/**
|
|
8
|
+
* Should show the slide panel or not
|
|
9
|
+
*/
|
|
10
|
+
isOpen: {
|
|
11
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
12
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
13
|
+
};
|
|
14
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Footer for Slide Panel
|
|
18
|
+
*/
|
|
19
|
+
footer: {
|
|
20
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
21
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
22
|
+
};
|
|
23
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Header for Slide Panel instance of SlidePanelHeader
|
|
27
|
+
*/
|
|
28
|
+
header: {
|
|
29
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
30
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
31
|
+
};
|
|
32
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Content for Slide Panel
|
|
36
|
+
*/
|
|
37
|
+
panelContent: {
|
|
38
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
39
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
40
|
+
};
|
|
41
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Width of the panel open. eg: 300
|
|
45
|
+
*/
|
|
46
|
+
panelWidth: {
|
|
47
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
48
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
49
|
+
};
|
|
50
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
51
|
+
};
|
|
52
|
+
widthWhenIsClosed: {
|
|
53
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
54
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
55
|
+
};
|
|
56
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
57
|
+
};
|
|
58
|
+
panelContentOverflow: {
|
|
59
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
60
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
61
|
+
};
|
|
62
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
63
|
+
};
|
|
64
|
+
withBorder: {
|
|
65
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
66
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
67
|
+
};
|
|
68
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
69
|
+
};
|
|
70
|
+
withBoxShadow: {
|
|
71
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
72
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
73
|
+
};
|
|
74
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
75
|
+
};
|
|
76
|
+
noGridInfluencer: {
|
|
77
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
78
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
79
|
+
};
|
|
80
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
81
|
+
};
|
|
82
|
+
};
|
package/dist/cjs/SidePanel.js
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var SidePanel_exports = {};
|
|
29
|
-
__export(SidePanel_exports, {
|
|
30
|
-
DSSidePanelWithSchema: () => DSSidePanelWithSchema,
|
|
31
|
-
SidePanel: () => SidePanel,
|
|
32
|
-
default: () => SidePanel_default
|
|
33
|
-
});
|
|
34
|
-
var React = __toESM(require("react"));
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_react_desc = require("react-desc");
|
|
37
|
-
var import_styled_components = __toESM(require("styled-components"));
|
|
38
|
-
var import_ds_system = require("@elliemae/ds-system");
|
|
39
|
-
var import_ds_grid = require("@elliemae/ds-grid");
|
|
40
|
-
var import_props = require("./props");
|
|
41
|
-
var import_defaultProps = require("./defaultProps");
|
|
42
|
-
const Container = import_styled_components.default.div`
|
|
43
|
-
display: flex;
|
|
44
|
-
height: 100%;
|
|
45
|
-
flex-direction: row;
|
|
46
|
-
max-height: 100%;
|
|
47
|
-
overflow: hidden;
|
|
48
|
-
${({ noGridInfluencer }) => noGridInfluencer ? "position: relative;" : ""}
|
|
49
|
-
`;
|
|
50
|
-
const TransGrid = (0, import_styled_components.default)(import_ds_grid.Grid)`
|
|
51
|
-
box-shadow: ${(props) => props.withBoxShadow ? "0 2px 5px 0 rgba(53, 60, 70, 0.5)" : "none"};
|
|
52
|
-
transition: 300ms;
|
|
53
|
-
border-left: ${(props) => props.withBorder ? (0, import_ds_system.border)(props.theme.colors.neutral["300"], "1px") : "none"};
|
|
54
|
-
${({ noGridInfluencer }) => noGridInfluencer ? `
|
|
55
|
-
position: absolute;
|
|
56
|
-
top:0;
|
|
57
|
-
right:0;
|
|
58
|
-
height: 100%;
|
|
59
|
-
` : ""}
|
|
60
|
-
background: ${(props) => props.theme.colors.neutral["000"]};
|
|
61
|
-
`;
|
|
62
|
-
const FooterContainer = (0, import_styled_components.default)(import_ds_grid.Grid)`
|
|
63
|
-
border-top: ${(props) => (0, import_ds_system.border)(props.theme.colors.neutral["300"])};
|
|
64
|
-
`;
|
|
65
|
-
const SidePanel = ({
|
|
66
|
-
children,
|
|
67
|
-
isOpen,
|
|
68
|
-
footer,
|
|
69
|
-
header,
|
|
70
|
-
panelContent,
|
|
71
|
-
panelWidth,
|
|
72
|
-
panelContentOverflow,
|
|
73
|
-
widthWhenIsClosed,
|
|
74
|
-
noGridInfluencer,
|
|
75
|
-
withBorder = true,
|
|
76
|
-
withBoxShadow = false
|
|
77
|
-
}) => /* @__PURE__ */ import_react.default.createElement(Container, {
|
|
78
|
-
noGridInfluencer
|
|
79
|
-
}, /* @__PURE__ */ import_react.default.createElement(TransGrid, {
|
|
80
|
-
height: "100%",
|
|
81
|
-
flex: "1",
|
|
82
|
-
mr: noGridInfluencer ? `${widthWhenIsClosed}px` : 0
|
|
83
|
-
}, children), /* @__PURE__ */ import_react.default.createElement(TransGrid, {
|
|
84
|
-
style: { overflow: "hidden" },
|
|
85
|
-
height: "100%",
|
|
86
|
-
maxHeight: "100%",
|
|
87
|
-
width: isOpen ? `${panelWidth}px` : `${widthWhenIsClosed}px`,
|
|
88
|
-
withBorder,
|
|
89
|
-
withBoxShadow,
|
|
90
|
-
isOpen,
|
|
91
|
-
cols: [1],
|
|
92
|
-
noGridInfluencer
|
|
93
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_ds_grid.Grid, {
|
|
94
|
-
rows: footer ? [header ? "48px" : "0px", "minmax(0px, 1fr)", "48px"] : [header ? "48px" : "0px", "minmax(0px, 1fr)"],
|
|
95
|
-
style: { overflow: "hidden" }
|
|
96
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_ds_grid.Grid, null, header), /* @__PURE__ */ import_react.default.createElement(import_ds_grid.Grid, {
|
|
97
|
-
style: { overflow: "hidden" }
|
|
98
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_ds_grid.Grid, {
|
|
99
|
-
style: { overflow: panelContentOverflow }
|
|
100
|
-
}, panelContent)), footer ? /* @__PURE__ */ import_react.default.createElement(FooterContainer, {
|
|
101
|
-
alignItems: "center",
|
|
102
|
-
pl: "xs",
|
|
103
|
-
pr: "xs"
|
|
104
|
-
}, footer) : null)));
|
|
105
|
-
SidePanel.propTypes = import_props.props;
|
|
106
|
-
SidePanel.defaultProps = import_defaultProps.defaultProps;
|
|
107
|
-
const DSSidePanelWithSchema = (0, import_react_desc.describe)(SidePanel);
|
|
108
|
-
DSSidePanelWithSchema.propTypes = import_props.props;
|
|
109
|
-
var SidePanel_default = SidePanel;
|
|
110
|
-
module.exports = __toCommonJS(SidePanel_exports);
|
|
111
|
-
//# sourceMappingURL=SidePanel.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/SidePanel.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { describe } from 'react-desc';\nimport styled from 'styled-components';\nimport { border } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { props as spprops } from './props';\nimport { defaultProps } from './defaultProps';\n\nconst Container = styled.div<{ noGridInfluencer: boolean }>`\n display: flex;\n height: 100%;\n flex-direction: row;\n max-height: 100%;\n overflow: hidden;\n ${({ noGridInfluencer }) => (noGridInfluencer ? 'position: relative;' : '')}\n`;\n\nconst TransGrid = styled(Grid)`\n box-shadow: ${(props) => (props.withBoxShadow ? '0 2px 5px 0 rgba(53, 60, 70, 0.5)' : 'none')};\n transition: 300ms;\n border-left: ${(props) => (props.withBorder ? border(props.theme.colors.neutral['300'], '1px') : 'none')};\n ${({ noGridInfluencer }) =>\n noGridInfluencer\n ? `\n position: absolute;\n top:0;\n right:0;\n height: 100%;\n `\n : ''}\n background: ${(props) => props.theme.colors.neutral['000']};\n`;\n\nconst FooterContainer = styled(Grid)`\n border-top: ${(props) => border(props.theme.colors.neutral['300'])};\n`;\n\nconst SidePanel = ({\n children,\n isOpen,\n footer,\n header,\n panelContent,\n panelWidth,\n panelContentOverflow,\n widthWhenIsClosed,\n noGridInfluencer,\n withBorder = true,\n withBoxShadow = false,\n}): React.ReactElement => (\n <Container noGridInfluencer={noGridInfluencer}>\n <TransGrid height=\"100%\" flex=\"1\" mr={noGridInfluencer ? `${widthWhenIsClosed}px` : 0}>\n {children}\n </TransGrid>\n <TransGrid\n style={{ overflow: 'hidden' }}\n height=\"100%\"\n maxHeight=\"100%\"\n width={isOpen ? `${panelWidth}px` : `${widthWhenIsClosed}px`}\n withBorder={withBorder}\n withBoxShadow={withBoxShadow}\n isOpen={isOpen}\n cols={[1]}\n noGridInfluencer={noGridInfluencer}\n >\n <Grid\n rows={\n footer ? [header ? '48px' : '0px', 'minmax(0px, 1fr)', '48px'] : [header ? '48px' : '0px', 'minmax(0px, 1fr)']\n }\n style={{ overflow: 'hidden' }}\n >\n <Grid>{header}</Grid>\n <Grid style={{ overflow: 'hidden' }}>\n <Grid style={{ overflow: panelContentOverflow }}>{panelContent}</Grid>\n </Grid>\n {footer ? (\n <FooterContainer alignItems=\"center\" pl=\"xs\" pr=\"xs\">\n {footer}\n </FooterContainer>\n ) : null}\n </Grid>\n </TransGrid>\n </Container>\n);\n\nSidePanel.propTypes = spprops;\nSidePanel.defaultProps = defaultProps;\n\nconst DSSidePanelWithSchema = describe(SidePanel);\nDSSidePanelWithSchema.propTypes = spprops;\n\nexport { SidePanel, DSSidePanelWithSchema };\nexport default SidePanel;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAyB;AACzB,+BAAmB;AACnB,uBAAuB;AACvB,qBAAqB;AACrB,mBAAiC;AACjC,0BAA6B;AAE7B,MAAM,YAAY,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMrB,CAAC,EAAE,uBAAwB,mBAAmB,wBAAwB;AAAA;AAG1E,MAAM,YAAY,sCAAO;AAAA,gBACT,CAAC,UAAW,MAAM,gBAAgB,sCAAsC;AAAA;AAAA,iBAEvE,CAAC,UAAW,MAAM,aAAa,6BAAO,MAAM,MAAM,OAAO,QAAQ,QAAQ,SAAS;AAAA,IAC/F,CAAC,EAAE,uBACH,mBACI;AAAA;AAAA;AAAA;AAAA;AAAA,OAMA;AAAA,gBACQ,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAGtD,MAAM,kBAAkB,sCAAO;AAAA,gBACf,CAAC,UAAU,6BAAO,MAAM,MAAM,OAAO,QAAQ;AAAA;AAG7D,MAAM,YAAY,CAAC;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,gBAAgB;AAAA,MAEhB,mDAAC,WAAD;AAAA,EAAW;AAAA,GACT,mDAAC,WAAD;AAAA,EAAW,QAAO;AAAA,EAAO,MAAK;AAAA,EAAI,IAAI,mBAAmB,GAAG,wBAAwB;AAAA,GACjF,WAEH,mDAAC,WAAD;AAAA,EACE,OAAO,EAAE,UAAU;AAAA,EACnB,QAAO;AAAA,EACP,WAAU;AAAA,EACV,OAAO,SAAS,GAAG,iBAAiB,GAAG;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA,MAAM,CAAC;AAAA,EACP;AAAA,GAEA,mDAAC,qBAAD;AAAA,EACE,MACE,SAAS,CAAC,SAAS,SAAS,OAAO,oBAAoB,UAAU,CAAC,SAAS,SAAS,OAAO;AAAA,EAE7F,OAAO,EAAE,UAAU;AAAA,GAEnB,mDAAC,qBAAD,MAAO,SACP,mDAAC,qBAAD;AAAA,EAAM,OAAO,EAAE,UAAU;AAAA,GACvB,mDAAC,qBAAD;AAAA,EAAM,OAAO,EAAE,UAAU;AAAA,GAAyB,gBAEnD,SACC,mDAAC,iBAAD;AAAA,EAAiB,YAAW;AAAA,EAAS,IAAG;AAAA,EAAK,IAAG;AAAA,GAC7C,UAED;AAMZ,UAAU,YAAY;AACtB,UAAU,eAAe;AAEzB,MAAM,wBAAwB,gCAAS;AACvC,sBAAsB,YAAY;AAGlC,IAAO,oBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|