@elliemae/ds-modal-slide 1.60.0 → 2.0.0-alpha.12
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/DSModalSlide.js +49 -73
- package/cjs/components/Footer.js +50 -42
- package/cjs/components/Header.js +24 -31
- package/cjs/components/blocks.js +22 -31
- package/cjs/index.js +7 -22
- package/esm/DSModalSlide.js +43 -66
- package/esm/components/Footer.js +46 -38
- package/esm/components/Header.js +21 -28
- package/esm/components/blocks.js +22 -31
- package/esm/index.js +0 -15
- package/package.json +49 -13
- package/types/DSModalSlide.d.ts +105 -0
- package/types/components/Footer.d.ts +90 -0
- package/types/components/Header.d.ts +43 -0
- package/types/components/blocks.d.ts +11 -0
- package/types/index.d.ts +4 -0
- package/types/tests/DSModalSlide.test.d.ts +1 -0
- package/DSModalSlide/package.json +0 -10
- package/cjs/DSModalSlide.js.map +0 -1
- package/cjs/components/Footer.js.map +0 -1
- package/cjs/components/Header.js.map +0 -1
- package/cjs/components/blocks.js.map +0 -1
- package/cjs/index.js.map +0 -1
- package/components/Footer/package.json +0 -10
- package/components/Header/package.json +0 -10
- package/components/blocks/package.json +0 -10
- package/esm/DSModalSlide.js.map +0 -1
- package/esm/components/Footer.js.map +0 -1
- package/esm/components/Header.js.map +0 -1
- package/esm/components/blocks.js.map +0 -1
- package/esm/index.js.map +0 -1
package/esm/DSModalSlide.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
3
|
import React, { useState, useCallback, useEffect } from 'react';
|
|
4
4
|
import { PropTypes, describe } from 'react-desc';
|
|
5
5
|
import ReactDOM from 'react-dom';
|
|
@@ -9,50 +9,28 @@ import DSSeparator from '@elliemae/ds-separator';
|
|
|
9
9
|
import { Wrapper, Overlay, Content, ActualContent } from './components/blocks.js';
|
|
10
10
|
export { default as ModalHeader } from './components/Header.js';
|
|
11
11
|
export { default as ModalFooter } from './components/Footer.js';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
fadeIn = _ref$fadeIn === void 0 ? 1500 : _ref$fadeIn,
|
|
35
|
-
_ref$overrideHeight = _ref.overrideHeight,
|
|
36
|
-
overrideHeight = _ref$overrideHeight === void 0 ? false : _ref$overrideHeight;
|
|
37
|
-
|
|
38
|
-
var _useState = useState(false),
|
|
39
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
40
|
-
isMoving = _useState2[0],
|
|
41
|
-
setMoving = _useState2[1];
|
|
42
|
-
|
|
43
|
-
var _useState3 = useState(isOpen),
|
|
44
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
45
|
-
show = _useState4[0],
|
|
46
|
-
setShow = _useState4[1];
|
|
47
|
-
|
|
48
|
-
var _useState5 = useState(50),
|
|
49
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
50
|
-
width = _useState6[0],
|
|
51
|
-
setWidth = _useState6[1];
|
|
52
|
-
|
|
53
|
-
var theme = useTheme();
|
|
54
|
-
var contentRows = [].concat(_toConsumableArray(header ? [theme.space.m] : []), ['0px', 'auto', '0px'], _toConsumableArray(footer ? [theme.space.m] : []));
|
|
55
|
-
var updateShow = useCallback(function () {
|
|
12
|
+
|
|
13
|
+
var _DSSeparator, _DSSeparator2;
|
|
14
|
+
|
|
15
|
+
const DSModalSlide = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
isOpen = false,
|
|
18
|
+
children,
|
|
19
|
+
getContainer,
|
|
20
|
+
centered = false,
|
|
21
|
+
fullWidth = false,
|
|
22
|
+
header = null,
|
|
23
|
+
footer = null,
|
|
24
|
+
fadeOut = 1500,
|
|
25
|
+
fadeIn = 1500,
|
|
26
|
+
overrideHeight = false
|
|
27
|
+
} = _ref;
|
|
28
|
+
const [isMoving, setMoving] = useState(false);
|
|
29
|
+
const [show, setShow] = useState(isOpen);
|
|
30
|
+
const [width, setWidth] = useState(50);
|
|
31
|
+
const theme = useTheme();
|
|
32
|
+
const contentRows = [...(header ? [theme.space.m] : []), '0px', 'auto', '0px', ...(footer ? [theme.space.m] : [])];
|
|
33
|
+
const updateShow = useCallback(() => {
|
|
56
34
|
if (fullWidth) setWidth(100);else setWidth(50);
|
|
57
35
|
|
|
58
36
|
if (isOpen !== show) {
|
|
@@ -65,16 +43,17 @@ var DSModalSlide = function DSModalSlide(_ref) {
|
|
|
65
43
|
}, [isOpen, fullWidth, isMoving]);
|
|
66
44
|
useEffect(updateShow, [isOpen, fullWidth]);
|
|
67
45
|
if (!show) return null;
|
|
68
|
-
|
|
46
|
+
const container = getContainer();
|
|
69
47
|
if (!container) return null;
|
|
70
48
|
|
|
71
|
-
|
|
49
|
+
const handleAnimationEnd = () => {
|
|
72
50
|
setMoving(false);
|
|
73
51
|
if (!isOpen) setShow(isOpen);
|
|
74
52
|
};
|
|
75
53
|
|
|
76
|
-
|
|
77
|
-
|
|
54
|
+
let {
|
|
55
|
+
height
|
|
56
|
+
} = container.getBoundingClientRect();
|
|
78
57
|
|
|
79
58
|
if (overrideHeight && container.scrollHeight > height) {
|
|
80
59
|
height = container.scrollHeight;
|
|
@@ -84,10 +63,10 @@ var DSModalSlide = function DSModalSlide(_ref) {
|
|
|
84
63
|
container.style.position = 'relative';
|
|
85
64
|
}
|
|
86
65
|
|
|
87
|
-
return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/
|
|
66
|
+
return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/_jsx(Wrapper, {
|
|
88
67
|
classProps: {
|
|
89
68
|
show: isOpen,
|
|
90
|
-
centered
|
|
69
|
+
centered
|
|
91
70
|
},
|
|
92
71
|
style: {
|
|
93
72
|
'--height': height,
|
|
@@ -95,16 +74,16 @@ var DSModalSlide = function DSModalSlide(_ref) {
|
|
|
95
74
|
'--fade-out': fadeOut,
|
|
96
75
|
'--width': width
|
|
97
76
|
}
|
|
98
|
-
}, /*#__PURE__*/
|
|
77
|
+
}, void 0, /*#__PURE__*/_jsx(Overlay, {
|
|
99
78
|
classProps: {
|
|
100
79
|
show: isOpen
|
|
101
80
|
}
|
|
102
|
-
}, /*#__PURE__*/
|
|
81
|
+
}, void 0, /*#__PURE__*/_jsx(Content, {
|
|
103
82
|
onAnimationEnd: handleAnimationEnd,
|
|
104
83
|
classProps: {
|
|
105
84
|
show: isOpen
|
|
106
85
|
}
|
|
107
|
-
}, /*#__PURE__*/
|
|
86
|
+
}, void 0, /*#__PURE__*/_jsx(Grid, {
|
|
108
87
|
style: {
|
|
109
88
|
height: '100%',
|
|
110
89
|
width: '100%',
|
|
@@ -116,26 +95,26 @@ var DSModalSlide = function DSModalSlide(_ref) {
|
|
|
116
95
|
},
|
|
117
96
|
rows: contentRows,
|
|
118
97
|
"data-testid": "ds-modal-slide"
|
|
119
|
-
}, header && /*#__PURE__*/React.cloneElement(header, {
|
|
120
|
-
fullWidth
|
|
121
|
-
}), header && /*#__PURE__*/
|
|
98
|
+
}, void 0, header && /*#__PURE__*/React.cloneElement(header, {
|
|
99
|
+
fullWidth
|
|
100
|
+
}), header && (_DSSeparator || (_DSSeparator = /*#__PURE__*/_jsx(DSSeparator, {
|
|
122
101
|
position: "initial",
|
|
123
102
|
type: "non-form"
|
|
124
|
-
}), /*#__PURE__*/
|
|
103
|
+
}))), /*#__PURE__*/_jsx(Grid, {
|
|
125
104
|
style: {
|
|
126
105
|
overflow: 'hidden'
|
|
127
106
|
}
|
|
128
|
-
}, /*#__PURE__*/
|
|
107
|
+
}, void 0, /*#__PURE__*/_jsx(Grid, {
|
|
129
108
|
style: {
|
|
130
109
|
overflow: 'auto'
|
|
131
110
|
}
|
|
132
|
-
}, /*#__PURE__*/
|
|
111
|
+
}, void 0, /*#__PURE__*/_jsx(ActualContent, {}, void 0, children))), footer && (_DSSeparator2 || (_DSSeparator2 = /*#__PURE__*/_jsx(DSSeparator, {
|
|
133
112
|
position: "initial",
|
|
134
113
|
type: "non-form"
|
|
135
|
-
}), footer)))), container);
|
|
114
|
+
}))), footer)))), container);
|
|
136
115
|
};
|
|
137
116
|
|
|
138
|
-
|
|
117
|
+
const props = {
|
|
139
118
|
/**
|
|
140
119
|
* If the modal slide is centered or not
|
|
141
120
|
*/
|
|
@@ -176,9 +155,7 @@ var props = {
|
|
|
176
155
|
*/
|
|
177
156
|
overrideHeight: PropTypes.bool.description('Override the panel height to scroll height of the container')
|
|
178
157
|
};
|
|
179
|
-
|
|
180
|
-
var DSModalSlideWithSchema = describe(DSModalSlide);
|
|
158
|
+
const DSModalSlideWithSchema = describe(DSModalSlide);
|
|
181
159
|
DSModalSlideWithSchema.propTypes = props;
|
|
182
160
|
|
|
183
161
|
export { DSModalSlide, DSModalSlideWithSchema, DSModalSlide as default };
|
|
184
|
-
//# sourceMappingURL=DSModalSlide.js.map
|
package/esm/components/Footer.js
CHANGED
|
@@ -1,45 +1,55 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
+
import 'react';
|
|
3
9
|
import { PropTypes, describe } from 'react-desc';
|
|
4
10
|
import DSButton from '@elliemae/ds-button';
|
|
5
11
|
import { FooterWrapper } from './blocks.js';
|
|
6
|
-
import '
|
|
12
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
7
13
|
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
rejectProps = _ref$rejectProps === void 0 ? {
|
|
21
|
-
disabled: false
|
|
22
|
-
} : _ref$rejectProps;
|
|
23
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FooterWrapper, null, !!onReject && /*#__PURE__*/React.createElement(DSButton, _extends({
|
|
24
|
-
buttonType: "secondary",
|
|
25
|
-
className: "action-reject",
|
|
26
|
-
containerProps: {
|
|
27
|
-
'data-testid': 'modal-footer-reject-btn'
|
|
28
|
-
},
|
|
29
|
-
labelText: rejectLabel,
|
|
30
|
-
onClick: onReject
|
|
31
|
-
}, rejectProps)), !!onConfirm && /*#__PURE__*/React.createElement(DSButton, _extends({
|
|
32
|
-
buttonType: "primary",
|
|
33
|
-
className: "action-confirm",
|
|
34
|
-
containerProps: {
|
|
35
|
-
'data-testid': 'modal-footer-confirm-btn'
|
|
14
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
15
|
+
|
|
16
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
17
|
+
|
|
18
|
+
const ModalFooter = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
confirmLabel = 'Confirm',
|
|
21
|
+
rejectLabel = 'Cancel',
|
|
22
|
+
onConfirm,
|
|
23
|
+
onReject,
|
|
24
|
+
confirmProps = {
|
|
25
|
+
disabled: false
|
|
36
26
|
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
27
|
+
rejectProps = {
|
|
28
|
+
disabled: false
|
|
29
|
+
}
|
|
30
|
+
} = _ref;
|
|
31
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
32
|
+
children: /*#__PURE__*/_jsx(FooterWrapper, {}, void 0, !!onReject && /*#__PURE__*/jsx(DSButton, _objectSpread({
|
|
33
|
+
buttonType: "secondary",
|
|
34
|
+
className: "action-reject",
|
|
35
|
+
containerProps: {
|
|
36
|
+
'data-testid': 'modal-footer-reject-btn'
|
|
37
|
+
},
|
|
38
|
+
labelText: rejectLabel,
|
|
39
|
+
onClick: onReject
|
|
40
|
+
}, rejectProps)), !!onConfirm && /*#__PURE__*/jsx(DSButton, _objectSpread({
|
|
41
|
+
buttonType: "primary",
|
|
42
|
+
className: "action-confirm",
|
|
43
|
+
containerProps: {
|
|
44
|
+
'data-testid': 'modal-footer-confirm-btn'
|
|
45
|
+
},
|
|
46
|
+
labelText: confirmLabel,
|
|
47
|
+
onClick: onConfirm
|
|
48
|
+
}, confirmProps)))
|
|
49
|
+
});
|
|
40
50
|
};
|
|
41
51
|
|
|
42
|
-
|
|
52
|
+
const props = {
|
|
43
53
|
/**
|
|
44
54
|
* Confirm Label
|
|
45
55
|
*/
|
|
@@ -74,9 +84,7 @@ var props = {
|
|
|
74
84
|
disabled: PropTypes.bool
|
|
75
85
|
}).description('Extra DSButton props for reject btn.')
|
|
76
86
|
};
|
|
77
|
-
|
|
78
|
-
var DSModalSlideFooterWithSchema = describe(ModalFooter);
|
|
87
|
+
const DSModalSlideFooterWithSchema = describe(ModalFooter);
|
|
79
88
|
DSModalSlideFooterWithSchema.propTypes = props;
|
|
80
89
|
|
|
81
90
|
export { DSModalSlideFooterWithSchema, ModalFooter as default };
|
|
82
|
-
//# sourceMappingURL=Footer.js.map
|
package/esm/components/Header.js
CHANGED
|
@@ -1,52 +1,47 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
2
3
|
import { PropTypes, describe } from 'react-desc';
|
|
3
4
|
import styled from 'styled-components';
|
|
4
5
|
import DSSeparator from '@elliemae/ds-separator';
|
|
5
6
|
import { Close } from '@elliemae/ds-icons';
|
|
6
7
|
import DSButton from '@elliemae/ds-button';
|
|
7
8
|
import { HeaderLeftSide, Header, Title } from './blocks.js';
|
|
8
|
-
import '@elliemae/ds-classnames';
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return /*#__PURE__*/React.createElement(HeaderWrapper, null, /*#__PURE__*/React.createElement(HeaderLeftSide, null, /*#__PURE__*/React.createElement(Header, null, /*#__PURE__*/React.createElement(Title, null, headerTitle))), toolbar, toolbar && /*#__PURE__*/React.createElement(StyledSeparator, {
|
|
10
|
+
var _StyledSeparator, _Close;
|
|
11
|
+
|
|
12
|
+
const ModalHeader = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
title: headerTitle = '',
|
|
15
|
+
onClose = () => null,
|
|
16
|
+
toolbar = null
|
|
17
|
+
} = _ref;
|
|
18
|
+
return /*#__PURE__*/_jsx(HeaderWrapper, {}, void 0, /*#__PURE__*/_jsx(HeaderLeftSide, {}, void 0, /*#__PURE__*/_jsx(Header, {}, void 0, /*#__PURE__*/_jsx(Title, {}, void 0, headerTitle))), toolbar, toolbar && (_StyledSeparator || (_StyledSeparator = /*#__PURE__*/_jsx(StyledSeparator, {
|
|
20
19
|
position: "initial",
|
|
21
20
|
margin: "none",
|
|
22
21
|
orientation: "vertical",
|
|
23
22
|
type: "non-form"
|
|
24
|
-
}), /*#__PURE__*/
|
|
23
|
+
}))), /*#__PURE__*/_jsx(StyledCloseButton, {
|
|
25
24
|
"data-testid": "modal-slider-header-close",
|
|
26
25
|
"aria-label": "Close modal slide",
|
|
27
26
|
buttonType: "text",
|
|
28
|
-
icon: /*#__PURE__*/
|
|
27
|
+
icon: _Close || (_Close = /*#__PURE__*/_jsx(Close, {
|
|
29
28
|
"aria-label": "Close modal slide",
|
|
30
29
|
size: "s"
|
|
31
|
-
}),
|
|
30
|
+
})),
|
|
32
31
|
onClick: onClose
|
|
33
32
|
}));
|
|
34
33
|
};
|
|
35
34
|
|
|
36
|
-
|
|
35
|
+
const HeaderWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
37
36
|
componentId: "sc-oxqqo8-0"
|
|
38
37
|
})(["display:flex;justify-content:space-between;width:100%;align-items:center;"]);
|
|
39
|
-
|
|
38
|
+
const StyledSeparator = /*#__PURE__*/styled(DSSeparator).withConfig({
|
|
40
39
|
componentId: "sc-oxqqo8-1"
|
|
41
|
-
})(["padding:", " 0;"],
|
|
42
|
-
|
|
43
|
-
});
|
|
44
|
-
var StyledCloseButton = /*#__PURE__*/styled(DSButton).withConfig({
|
|
40
|
+
})(["padding:", " 0;"], props => props.theme.space.xs);
|
|
41
|
+
const StyledCloseButton = /*#__PURE__*/styled(DSButton).withConfig({
|
|
45
42
|
componentId: "sc-oxqqo8-2"
|
|
46
|
-
})(["margin:", ";"],
|
|
47
|
-
|
|
48
|
-
});
|
|
49
|
-
var props = {
|
|
43
|
+
})(["margin:", ";"], props => props.theme.space.xs);
|
|
44
|
+
const props = {
|
|
50
45
|
/** on modal close callback */
|
|
51
46
|
onClose: PropTypes.func.description('on modal close callback'),
|
|
52
47
|
|
|
@@ -56,9 +51,7 @@ var props = {
|
|
|
56
51
|
/** modal title */
|
|
57
52
|
title: PropTypes.string.description('modal title')
|
|
58
53
|
};
|
|
59
|
-
|
|
60
|
-
var DSModalSlideHeaderWithSchema = describe(ModalHeader);
|
|
54
|
+
const DSModalSlideHeaderWithSchema = describe(ModalHeader);
|
|
61
55
|
DSModalSlideHeaderWithSchema.propTypes = props;
|
|
62
56
|
|
|
63
57
|
export { DSModalSlideHeaderWithSchema, ModalHeader as default };
|
|
64
|
-
//# sourceMappingURL=Header.js.map
|
package/esm/components/blocks.js
CHANGED
|
@@ -1,50 +1,41 @@
|
|
|
1
1
|
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
const blockName = 'modal-slide';
|
|
4
|
+
const Wrapper = aggregatedClasses('div')(blockName, 'wrapper', _ref => {
|
|
5
|
+
let {
|
|
6
|
+
show,
|
|
7
|
+
centered
|
|
8
|
+
} = _ref;
|
|
7
9
|
return {
|
|
8
10
|
showing: show,
|
|
9
11
|
disappearing: !show,
|
|
10
|
-
centered
|
|
12
|
+
centered
|
|
11
13
|
};
|
|
12
14
|
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
const Overlay = aggregatedClasses('div')(blockName, 'overlay', _ref2 => {
|
|
16
|
+
let {
|
|
17
|
+
show
|
|
18
|
+
} = _ref2;
|
|
15
19
|
return {
|
|
16
20
|
showing: show,
|
|
17
21
|
disappearing: !show
|
|
18
22
|
};
|
|
19
23
|
});
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
const Content = aggregatedClasses('div')(blockName, 'content', _ref3 => {
|
|
25
|
+
let {
|
|
26
|
+
show
|
|
27
|
+
} = _ref3;
|
|
22
28
|
return {
|
|
23
29
|
showing: show,
|
|
24
30
|
disappearing: !show
|
|
25
31
|
};
|
|
26
32
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
return {};
|
|
35
|
-
});
|
|
36
|
-
var ActualContent = aggregatedClasses('div')(blockName, 'actual-content', function () {
|
|
37
|
-
return {};
|
|
38
|
-
});
|
|
39
|
-
var Header = aggregatedClasses('div')(blockName, 'header', function () {
|
|
40
|
-
return {};
|
|
41
|
-
});
|
|
42
|
-
var Footer = aggregatedClasses('div')(blockName, 'footer', function () {
|
|
43
|
-
return {};
|
|
44
|
-
});
|
|
45
|
-
var FooterWrapper = aggregatedClasses('div')(blockName, 'footer-wrapper', function () {
|
|
46
|
-
return {};
|
|
47
|
-
});
|
|
33
|
+
const Title = aggregatedClasses('div')(blockName, 'title', () => ({}));
|
|
34
|
+
const BreadcrumTitle = aggregatedClasses('div')(blockName, 'breadcrum-title', () => ({}));
|
|
35
|
+
const HeaderLeftSide = aggregatedClasses('div')(blockName, 'header-left-side', () => ({}));
|
|
36
|
+
const ActualContent = aggregatedClasses('div')(blockName, 'actual-content', () => ({}));
|
|
37
|
+
const Header = aggregatedClasses('div')(blockName, 'header', () => ({}));
|
|
38
|
+
const Footer = aggregatedClasses('div')(blockName, 'footer', () => ({}));
|
|
39
|
+
const FooterWrapper = aggregatedClasses('div')(blockName, 'footer-wrapper', () => ({}));
|
|
48
40
|
|
|
49
41
|
export { ActualContent, BreadcrumTitle, Content, Footer, FooterWrapper, Header, HeaderLeftSide, Overlay, Title, Wrapper };
|
|
50
|
-
//# sourceMappingURL=blocks.js.map
|
package/esm/index.js
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
1
1
|
export { DSModalSlide, DSModalSlideWithSchema, DSModalSlide as default } from './DSModalSlide.js';
|
|
2
2
|
export { DSModalSlideHeaderWithSchema, default as ModalHeader } from './components/Header.js';
|
|
3
3
|
export { DSModalSlideFooterWithSchema, default as ModalFooter } from './components/Footer.js';
|
|
4
|
-
import '@babel/runtime/helpers/esm/toConsumableArray';
|
|
5
|
-
import '@babel/runtime/helpers/esm/slicedToArray';
|
|
6
|
-
import 'react';
|
|
7
|
-
import 'react-desc';
|
|
8
|
-
import 'react-dom';
|
|
9
|
-
import '@elliemae/ds-system';
|
|
10
|
-
import '@elliemae/ds-grid';
|
|
11
|
-
import '@elliemae/ds-separator';
|
|
12
|
-
import './components/blocks.js';
|
|
13
|
-
import '@elliemae/ds-classnames';
|
|
14
|
-
import 'styled-components';
|
|
15
|
-
import '@elliemae/ds-icons';
|
|
16
|
-
import '@elliemae/ds-button';
|
|
17
|
-
import '@babel/runtime/helpers/esm/extends';
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,14 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-modal-slide",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.12",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"description": "
|
|
6
|
-
"
|
|
7
|
-
"
|
|
5
|
+
"description": "ICE MT - Dimsum - Modal Slide",
|
|
6
|
+
"module": "./esm/index.js",
|
|
7
|
+
"main": "./cjs/index.js",
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./esm/index.js",
|
|
12
|
+
"require": "./cjs/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./DSModalSlide": {
|
|
15
|
+
"import": "./esm/DSModalSlide.js",
|
|
16
|
+
"require": "./cjs/DSModalSlide.js"
|
|
17
|
+
},
|
|
18
|
+
"./components/Header": {
|
|
19
|
+
"import": "./esm/components/Header.js",
|
|
20
|
+
"require": "./cjs/components/Header.js"
|
|
21
|
+
},
|
|
22
|
+
"./components/Footer": {
|
|
23
|
+
"import": "./esm/components/Footer.js",
|
|
24
|
+
"require": "./cjs/components/Footer.js"
|
|
25
|
+
},
|
|
26
|
+
"./components/blocks": {
|
|
27
|
+
"import": "./esm/components/blocks.js",
|
|
28
|
+
"require": "./cjs/components/blocks.js"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
8
31
|
"sideEffects": [
|
|
9
32
|
"*.css",
|
|
10
33
|
"*.scss"
|
|
11
34
|
],
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"npm": ">=7",
|
|
41
|
+
"node": ">=14"
|
|
42
|
+
},
|
|
43
|
+
"author": "ICE MT",
|
|
12
44
|
"scripts": {
|
|
13
45
|
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
|
|
14
46
|
"prebuild": "exit 0",
|
|
@@ -16,24 +48,28 @@
|
|
|
16
48
|
"build": "node ../../scripts/build/build.js"
|
|
17
49
|
},
|
|
18
50
|
"dependencies": {
|
|
19
|
-
"@elliemae/ds-
|
|
20
|
-
"@elliemae/ds-classnames": "
|
|
21
|
-
"@elliemae/ds-
|
|
22
|
-
"@elliemae/ds-
|
|
51
|
+
"@elliemae/ds-button": "2.0.0-alpha.12",
|
|
52
|
+
"@elliemae/ds-classnames": "2.0.0-alpha.12",
|
|
53
|
+
"@elliemae/ds-grid": "2.0.0-alpha.12",
|
|
54
|
+
"@elliemae/ds-icons": "2.0.0-alpha.12",
|
|
55
|
+
"@elliemae/ds-separator": "2.0.0-alpha.12",
|
|
56
|
+
"@elliemae/ds-system": "2.0.0-alpha.12",
|
|
23
57
|
"prop-types": "~15.7.2",
|
|
24
|
-
"react-desc": "
|
|
58
|
+
"react-desc": "~4.1.3"
|
|
25
59
|
},
|
|
26
60
|
"devDependencies": {
|
|
27
|
-
"
|
|
61
|
+
"@testing-library/react": "~12.1.2",
|
|
62
|
+
"styled-components": "~5.3.3"
|
|
28
63
|
},
|
|
29
64
|
"peerDependencies": {
|
|
30
|
-
"lodash": "~4.17.
|
|
65
|
+
"lodash": "~4.17.21",
|
|
31
66
|
"react": "~16.14.0",
|
|
32
67
|
"react-dom": "~16.14.0",
|
|
33
|
-
"styled-components": "^5.3.
|
|
68
|
+
"styled-components": "^5.3.3"
|
|
34
69
|
},
|
|
35
70
|
"publishConfig": {
|
|
36
71
|
"access": "public",
|
|
37
|
-
"directory": "dist"
|
|
72
|
+
"directory": "dist",
|
|
73
|
+
"generateSubmodules": true
|
|
38
74
|
}
|
|
39
75
|
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import ModalHeader from './components/Header';
|
|
4
|
+
import ModalFooter from './components/Footer';
|
|
5
|
+
declare const DSModalSlide: {
|
|
6
|
+
({ isOpen, children, getContainer, centered, fullWidth, header, footer, fadeOut, fadeIn, overrideHeight, }: {
|
|
7
|
+
isOpen?: boolean | undefined;
|
|
8
|
+
children: any;
|
|
9
|
+
getContainer: any;
|
|
10
|
+
centered?: boolean | undefined;
|
|
11
|
+
fullWidth?: boolean | undefined;
|
|
12
|
+
header?: null | undefined;
|
|
13
|
+
footer?: null | undefined;
|
|
14
|
+
fadeOut?: number | undefined;
|
|
15
|
+
fadeIn?: number | undefined;
|
|
16
|
+
overrideHeight?: boolean | undefined;
|
|
17
|
+
}): React.ReactPortal | null;
|
|
18
|
+
propTypes: {
|
|
19
|
+
/**
|
|
20
|
+
* If the modal slide is centered or not
|
|
21
|
+
*/
|
|
22
|
+
centered: {
|
|
23
|
+
defaultValue<T = unknown>(arg: T): {
|
|
24
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
25
|
+
};
|
|
26
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* If the modal slide is visible or not
|
|
30
|
+
*/
|
|
31
|
+
isOpen: {
|
|
32
|
+
defaultValue<T = unknown>(arg: T): {
|
|
33
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
34
|
+
};
|
|
35
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Main content of the modal
|
|
39
|
+
*/
|
|
40
|
+
children: any;
|
|
41
|
+
/**
|
|
42
|
+
* If the modal slide takes the full width or not
|
|
43
|
+
*/
|
|
44
|
+
fullWidth: {
|
|
45
|
+
defaultValue<T = unknown>(arg: T): {
|
|
46
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
47
|
+
};
|
|
48
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* If the modal slide has a header, only available for full width option
|
|
52
|
+
*/
|
|
53
|
+
header: {
|
|
54
|
+
defaultValue<T = unknown>(arg: T): {
|
|
55
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
56
|
+
};
|
|
57
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Ratio of fade out
|
|
61
|
+
*/
|
|
62
|
+
fadeOut: {
|
|
63
|
+
defaultValue<T = unknown>(arg: T): {
|
|
64
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
65
|
+
};
|
|
66
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Ratio of fade in
|
|
70
|
+
*/
|
|
71
|
+
fadeIn: {
|
|
72
|
+
defaultValue<T = unknown>(arg: T): {
|
|
73
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
74
|
+
};
|
|
75
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Override the panel height to scroll height of the container
|
|
79
|
+
*/
|
|
80
|
+
overrideHeight: {
|
|
81
|
+
defaultValue<T = unknown>(arg: T): {
|
|
82
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
83
|
+
};
|
|
84
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
declare const DSModalSlideWithSchema: {
|
|
89
|
+
(props?: {
|
|
90
|
+
isOpen?: boolean | undefined;
|
|
91
|
+
children: any;
|
|
92
|
+
getContainer: any;
|
|
93
|
+
centered?: boolean | undefined;
|
|
94
|
+
fullWidth?: boolean | undefined;
|
|
95
|
+
header?: null | undefined;
|
|
96
|
+
footer?: null | undefined;
|
|
97
|
+
fadeOut?: number | undefined;
|
|
98
|
+
fadeIn?: number | undefined;
|
|
99
|
+
overrideHeight?: boolean | undefined;
|
|
100
|
+
} | undefined): JSX.Element;
|
|
101
|
+
propTypes: unknown;
|
|
102
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
103
|
+
};
|
|
104
|
+
export { ModalHeader, ModalFooter, DSModalSlide, DSModalSlideWithSchema };
|
|
105
|
+
export default DSModalSlide;
|