@elliemae/ds-dialog 3.0.0-next.1 → 3.0.0-next.2
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/DSDialog.js +20 -15
- package/cjs/index.js +52 -6
- package/cjs/propTypes.js +17 -4
- package/esm/DSDialog.js +22 -17
- package/esm/index.js +43 -1
- package/esm/propTypes.js +13 -4
- package/package.json +3 -3
- package/types/DSDialog.d.ts +2166 -3
- package/types/index.d.ts +148 -1
- package/types/propTypes.d.ts +2166 -3
- package/types/styles.d.ts +4 -3
package/cjs/DSDialog.js
CHANGED
|
@@ -74,27 +74,32 @@ const DSDialog = props => {
|
|
|
74
74
|
|
|
75
75
|
if (isOpen && !removeAutoFocus) containerRef === null || containerRef === void 0 ? void 0 : (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.focus();
|
|
76
76
|
}, [isOpen, removeAutoFocus]);
|
|
77
|
+
const globalAttributes = dsPropsHelpers.useGetGlobalAttributes(propsWithDefault, {
|
|
78
|
+
onClick: handleOutsideClick
|
|
79
|
+
});
|
|
77
80
|
|
|
78
81
|
if (isOpen) {
|
|
79
|
-
return /*#__PURE__*/ReactDOM__default["default"].createPortal( /*#__PURE__*/
|
|
82
|
+
return /*#__PURE__*/ReactDOM__default["default"].createPortal( /*#__PURE__*/jsxRuntime.jsxs(styles.StyledDialogBackground, _objectSpread(_objectSpread({
|
|
80
83
|
onClick: handleOutsideClick,
|
|
81
84
|
"data-portalbg": true,
|
|
82
85
|
"data-testid": DSDialogDatatestid.DSDialogDatatestid.BACKGROUND,
|
|
83
86
|
zIndex: zIndex
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
87
|
+
}, globalAttributes), {}, {
|
|
88
|
+
children: [_FixedBody || (_FixedBody = /*#__PURE__*/_jsx__default["default"](styles.FixedBody, {
|
|
89
|
+
isBodyOverflow: isBodyOverflow
|
|
90
|
+
})), /*#__PURE__*/jsxRuntime.jsx(styles.StyledDialogContainer, _objectSpread(_objectSpread({
|
|
91
|
+
role: "dialog",
|
|
92
|
+
"aria-modal": true,
|
|
93
|
+
ref: containerRef,
|
|
94
|
+
tabIndex: !removeAutoFocus ? 0 : undefined,
|
|
95
|
+
onKeyDown: handleOnKeyDown
|
|
96
|
+
}, utils.getSpaceProps(rest)), {}, {
|
|
97
|
+
size: size,
|
|
98
|
+
centered: centered,
|
|
99
|
+
"data-testid": DSDialogDatatestid.DSDialogDatatestid.CONTAINER,
|
|
100
|
+
children: children
|
|
101
|
+
}))]
|
|
102
|
+
})), document.getElementsByTagName('body')[0]);
|
|
98
103
|
}
|
|
99
104
|
|
|
100
105
|
return null;
|
package/cjs/index.js
CHANGED
|
@@ -2,17 +2,50 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var reactDesc = require('react-desc');
|
|
6
|
+
var dsPropsHelpers = require('@elliemae/ds-props-helpers');
|
|
7
|
+
var styles = require('./styles.js');
|
|
5
8
|
var DSDialog = require('./DSDialog.js');
|
|
6
9
|
var DSDialogDatatestid = require('./DSDialogDatatestid.js');
|
|
7
10
|
var utils = require('./utils.js');
|
|
8
|
-
var styles = require('./styles.js');
|
|
9
|
-
|
|
10
11
|
|
|
12
|
+
styles.DSDialogBody.propTypes = dsPropsHelpers.globalAttributesPropTypes;
|
|
13
|
+
styles.DSDialogHeader.propTypes = dsPropsHelpers.globalAttributesPropTypes;
|
|
14
|
+
styles.DSDialogFooter.propTypes = dsPropsHelpers.globalAttributesPropTypes;
|
|
15
|
+
styles.DSDialogSeparator.propTypes = dsPropsHelpers.globalAttributesPropTypes;
|
|
16
|
+
styles.DSDialogTitle.propTypes = dsPropsHelpers.globalAttributesPropTypes;
|
|
17
|
+
styles.DSDialogAddon.propTypes = dsPropsHelpers.globalAttributesPropTypes;
|
|
18
|
+
styles.DSDialogDefaultLayout.propTypes = dsPropsHelpers.globalAttributesPropTypes;
|
|
19
|
+
styles.DSDialogPrimaryMessage.propTypes = dsPropsHelpers.globalAttributesPropTypes;
|
|
20
|
+
styles.DSDialogSecondaryMessage.propTypes = dsPropsHelpers.globalAttributesPropTypes;
|
|
21
|
+
styles.DSDialogBody.displayName = 'DSDialogBody';
|
|
22
|
+
styles.DSDialogHeader.displayName = 'DSDialogHeader';
|
|
23
|
+
styles.DSDialogFooter.displayName = 'DSDialogFooter';
|
|
24
|
+
styles.DSDialogSeparator.displayName = 'DSDialogSeparator';
|
|
25
|
+
styles.DSDialogTitle.displayName = 'DSDialogTitle';
|
|
26
|
+
styles.DSDialogAddon.displayName = 'DSDialogAddon';
|
|
27
|
+
styles.DSDialogDefaultLayout.displayName = 'DSDialogDefaultLayout';
|
|
28
|
+
styles.DSDialogPrimaryMessage.displayName = 'DSDialogPrimaryMessage';
|
|
29
|
+
styles.DSDialogSecondaryMessage.displayName = 'DSDialogSecondaryMessage';
|
|
30
|
+
const DSDialogBodyWithSchema = reactDesc.describe(styles.DSDialogBody);
|
|
31
|
+
const DSDialogHeaderWithSchema = reactDesc.describe(styles.DSDialogHeader);
|
|
32
|
+
const DSDialogFooterWithSchema = reactDesc.describe(styles.DSDialogFooter);
|
|
33
|
+
const DSDialogSeparatorWithSchema = reactDesc.describe(styles.DSDialogSeparator);
|
|
34
|
+
const DSDialogTitleWithSchema = reactDesc.describe(styles.DSDialogTitle);
|
|
35
|
+
const DSDialogAddonWithSchema = reactDesc.describe(styles.DSDialogAddon);
|
|
36
|
+
const DSDialogDefaultLayoutWithSchema = reactDesc.describe(styles.DSDialogDefaultLayout);
|
|
37
|
+
const DSDialogPrimaryMessageWithSchema = reactDesc.describe(styles.DSDialogPrimaryMessage);
|
|
38
|
+
const DSDialogSecondaryMessageWithSchema = reactDesc.describe(styles.DSDialogSecondaryMessage);
|
|
39
|
+
DSDialogBodyWithSchema.propTypes = dsPropsHelpers.globalAttributesPropTypes;
|
|
40
|
+
DSDialogHeaderWithSchema.propTypes = dsPropsHelpers.globalAttributesPropTypes;
|
|
41
|
+
DSDialogFooterWithSchema.propTypes = dsPropsHelpers.globalAttributesPropTypes;
|
|
42
|
+
DSDialogSeparatorWithSchema.propTypes = dsPropsHelpers.globalAttributesPropTypes;
|
|
43
|
+
DSDialogTitleWithSchema.propTypes = dsPropsHelpers.globalAttributesPropTypes;
|
|
44
|
+
DSDialogAddonWithSchema.propTypes = dsPropsHelpers.globalAttributesPropTypes;
|
|
45
|
+
DSDialogDefaultLayoutWithSchema.propTypes = dsPropsHelpers.globalAttributesPropTypes;
|
|
46
|
+
DSDialogPrimaryMessageWithSchema.propTypes = dsPropsHelpers.globalAttributesPropTypes;
|
|
47
|
+
DSDialogSecondaryMessageWithSchema.propTypes = dsPropsHelpers.globalAttributesPropTypes;
|
|
11
48
|
|
|
12
|
-
exports.DSDialog = DSDialog.DSDialog;
|
|
13
|
-
exports.DSDialogWithSchema = DSDialog.DSDialogWithSchema;
|
|
14
|
-
exports.DSDialogDatatestid = DSDialogDatatestid.DSDialogDatatestid;
|
|
15
|
-
exports.DSDialogSizes = utils.DSDialogSizes;
|
|
16
49
|
exports.DSDialogAddon = styles.DSDialogAddon;
|
|
17
50
|
exports.DSDialogBody = styles.DSDialogBody;
|
|
18
51
|
exports.DSDialogDefaultLayout = styles.DSDialogDefaultLayout;
|
|
@@ -22,3 +55,16 @@ exports.DSDialogPrimaryMessage = styles.DSDialogPrimaryMessage;
|
|
|
22
55
|
exports.DSDialogSecondaryMessage = styles.DSDialogSecondaryMessage;
|
|
23
56
|
exports.DSDialogSeparator = styles.DSDialogSeparator;
|
|
24
57
|
exports.DSDialogTitle = styles.DSDialogTitle;
|
|
58
|
+
exports.DSDialog = DSDialog.DSDialog;
|
|
59
|
+
exports.DSDialogWithSchema = DSDialog.DSDialogWithSchema;
|
|
60
|
+
exports.DSDialogDatatestid = DSDialogDatatestid.DSDialogDatatestid;
|
|
61
|
+
exports.DSDialogSizes = utils.DSDialogSizes;
|
|
62
|
+
exports.DSDialogAddonWithSchema = DSDialogAddonWithSchema;
|
|
63
|
+
exports.DSDialogBodyWithSchema = DSDialogBodyWithSchema;
|
|
64
|
+
exports.DSDialogDefaultLayoutWithSchema = DSDialogDefaultLayoutWithSchema;
|
|
65
|
+
exports.DSDialogFooterWithSchema = DSDialogFooterWithSchema;
|
|
66
|
+
exports.DSDialogHeaderWithSchema = DSDialogHeaderWithSchema;
|
|
67
|
+
exports.DSDialogPrimaryMessageWithSchema = DSDialogPrimaryMessageWithSchema;
|
|
68
|
+
exports.DSDialogSecondaryMessageWithSchema = DSDialogSecondaryMessageWithSchema;
|
|
69
|
+
exports.DSDialogSeparatorWithSchema = DSDialogSeparatorWithSchema;
|
|
70
|
+
exports.DSDialogTitleWithSchema = DSDialogTitleWithSchema;
|
package/cjs/propTypes.js
CHANGED
|
@@ -2,17 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
10
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
11
|
var reactDesc = require('react-desc');
|
|
12
|
+
var dsPropsHelpers = require('@elliemae/ds-props-helpers');
|
|
6
13
|
var utils = require('./utils.js');
|
|
7
14
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
15
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
|
+
|
|
17
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
18
|
+
|
|
19
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
20
|
+
|
|
21
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
22
|
+
const propTypes = _objectSpread({
|
|
23
|
+
isOpen: reactDesc.PropTypes.bool.description('Whether the Dialog is open or not.').defaultValue(false),
|
|
11
24
|
children: reactDesc.PropTypes.node.description('Nested components.').isRequired,
|
|
12
25
|
centered: reactDesc.PropTypes.bool.description('Centers the Dialog.').defaultValue(false),
|
|
13
26
|
size: reactDesc.PropTypes.oneOf(utils.DSDialogSizesArrayValues).description("Dialog's width size.").defaultValue(utils.DSDialogSizes.DEFAULT),
|
|
14
27
|
removeAutoFocus: reactDesc.PropTypes.bool.description('Removes focus in the Dialog container when is open. If you want to focus an specific element in the Dialog, it should be set to true.').defaultValue(false),
|
|
15
28
|
onClickOutside: reactDesc.PropTypes.func.description('Callback that should be used to close the modal when the user clicks outside. Cb also triggers when the user press ESC key for accessibility purposes.').defaultValue(() => {})
|
|
16
|
-
};
|
|
29
|
+
}, dsPropsHelpers.globalAttributesPropTypes);
|
|
17
30
|
|
|
18
31
|
exports.propTypes = propTypes;
|
package/esm/DSDialog.js
CHANGED
|
@@ -10,13 +10,13 @@ import 'core-js/modules/web.dom-collections.iterator.js';
|
|
|
10
10
|
import ReactDOM from 'react-dom';
|
|
11
11
|
import { useState, useRef, useCallback, useEffect } from 'react';
|
|
12
12
|
import { describe } from 'react-desc';
|
|
13
|
-
import { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
|
|
13
|
+
import { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes, useGetGlobalAttributes } from '@elliemae/ds-props-helpers';
|
|
14
14
|
import { StyledDialogBackground, FixedBody, StyledDialogContainer } from './styles.js';
|
|
15
15
|
import { propTypes } from './propTypes.js';
|
|
16
16
|
import { defaultProps } from './defaultProps.js';
|
|
17
17
|
import { getSpaceProps } from './utils.js';
|
|
18
18
|
import { DSDialogDatatestid } from './DSDialogDatatestid.js';
|
|
19
|
-
import { jsx } from 'react/jsx-runtime';
|
|
19
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
20
20
|
|
|
21
21
|
const _excluded = ["children", "isOpen", "onClickOutside", "centered", "size", "removeAutoFocus", "zIndex"];
|
|
22
22
|
|
|
@@ -63,27 +63,32 @@ const DSDialog = props => {
|
|
|
63
63
|
|
|
64
64
|
if (isOpen && !removeAutoFocus) containerRef === null || containerRef === void 0 ? void 0 : (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.focus();
|
|
65
65
|
}, [isOpen, removeAutoFocus]);
|
|
66
|
+
const globalAttributes = useGetGlobalAttributes(propsWithDefault, {
|
|
67
|
+
onClick: handleOutsideClick
|
|
68
|
+
});
|
|
66
69
|
|
|
67
70
|
if (isOpen) {
|
|
68
|
-
return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/
|
|
71
|
+
return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/jsxs(StyledDialogBackground, _objectSpread(_objectSpread({
|
|
69
72
|
onClick: handleOutsideClick,
|
|
70
73
|
"data-portalbg": true,
|
|
71
74
|
"data-testid": DSDialogDatatestid.BACKGROUND,
|
|
72
75
|
zIndex: zIndex
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
76
|
+
}, globalAttributes), {}, {
|
|
77
|
+
children: [_FixedBody || (_FixedBody = /*#__PURE__*/_jsx(FixedBody, {
|
|
78
|
+
isBodyOverflow: isBodyOverflow
|
|
79
|
+
})), /*#__PURE__*/jsx(StyledDialogContainer, _objectSpread(_objectSpread({
|
|
80
|
+
role: "dialog",
|
|
81
|
+
"aria-modal": true,
|
|
82
|
+
ref: containerRef,
|
|
83
|
+
tabIndex: !removeAutoFocus ? 0 : undefined,
|
|
84
|
+
onKeyDown: handleOnKeyDown
|
|
85
|
+
}, getSpaceProps(rest)), {}, {
|
|
86
|
+
size: size,
|
|
87
|
+
centered: centered,
|
|
88
|
+
"data-testid": DSDialogDatatestid.CONTAINER,
|
|
89
|
+
children: children
|
|
90
|
+
}))]
|
|
91
|
+
})), document.getElementsByTagName('body')[0]);
|
|
87
92
|
}
|
|
88
93
|
|
|
89
94
|
return null;
|
package/esm/index.js
CHANGED
|
@@ -1,4 +1,46 @@
|
|
|
1
|
+
import { describe } from 'react-desc';
|
|
2
|
+
import { globalAttributesPropTypes } from '@elliemae/ds-props-helpers';
|
|
3
|
+
import { DSDialogBody, DSDialogHeader, DSDialogFooter, DSDialogSeparator, DSDialogTitle, DSDialogAddon, DSDialogDefaultLayout, DSDialogPrimaryMessage, DSDialogSecondaryMessage } from './styles.js';
|
|
4
|
+
export { DSDialogAddon, DSDialogBody, DSDialogDefaultLayout, DSDialogFooter, DSDialogHeader, DSDialogPrimaryMessage, DSDialogSecondaryMessage, DSDialogSeparator, DSDialogTitle } from './styles.js';
|
|
1
5
|
export { DSDialog, DSDialogWithSchema } from './DSDialog.js';
|
|
2
6
|
export { DSDialogDatatestid } from './DSDialogDatatestid.js';
|
|
3
7
|
export { DSDialogSizes } from './utils.js';
|
|
4
|
-
|
|
8
|
+
|
|
9
|
+
DSDialogBody.propTypes = globalAttributesPropTypes;
|
|
10
|
+
DSDialogHeader.propTypes = globalAttributesPropTypes;
|
|
11
|
+
DSDialogFooter.propTypes = globalAttributesPropTypes;
|
|
12
|
+
DSDialogSeparator.propTypes = globalAttributesPropTypes;
|
|
13
|
+
DSDialogTitle.propTypes = globalAttributesPropTypes;
|
|
14
|
+
DSDialogAddon.propTypes = globalAttributesPropTypes;
|
|
15
|
+
DSDialogDefaultLayout.propTypes = globalAttributesPropTypes;
|
|
16
|
+
DSDialogPrimaryMessage.propTypes = globalAttributesPropTypes;
|
|
17
|
+
DSDialogSecondaryMessage.propTypes = globalAttributesPropTypes;
|
|
18
|
+
DSDialogBody.displayName = 'DSDialogBody';
|
|
19
|
+
DSDialogHeader.displayName = 'DSDialogHeader';
|
|
20
|
+
DSDialogFooter.displayName = 'DSDialogFooter';
|
|
21
|
+
DSDialogSeparator.displayName = 'DSDialogSeparator';
|
|
22
|
+
DSDialogTitle.displayName = 'DSDialogTitle';
|
|
23
|
+
DSDialogAddon.displayName = 'DSDialogAddon';
|
|
24
|
+
DSDialogDefaultLayout.displayName = 'DSDialogDefaultLayout';
|
|
25
|
+
DSDialogPrimaryMessage.displayName = 'DSDialogPrimaryMessage';
|
|
26
|
+
DSDialogSecondaryMessage.displayName = 'DSDialogSecondaryMessage';
|
|
27
|
+
const DSDialogBodyWithSchema = describe(DSDialogBody);
|
|
28
|
+
const DSDialogHeaderWithSchema = describe(DSDialogHeader);
|
|
29
|
+
const DSDialogFooterWithSchema = describe(DSDialogFooter);
|
|
30
|
+
const DSDialogSeparatorWithSchema = describe(DSDialogSeparator);
|
|
31
|
+
const DSDialogTitleWithSchema = describe(DSDialogTitle);
|
|
32
|
+
const DSDialogAddonWithSchema = describe(DSDialogAddon);
|
|
33
|
+
const DSDialogDefaultLayoutWithSchema = describe(DSDialogDefaultLayout);
|
|
34
|
+
const DSDialogPrimaryMessageWithSchema = describe(DSDialogPrimaryMessage);
|
|
35
|
+
const DSDialogSecondaryMessageWithSchema = describe(DSDialogSecondaryMessage);
|
|
36
|
+
DSDialogBodyWithSchema.propTypes = globalAttributesPropTypes;
|
|
37
|
+
DSDialogHeaderWithSchema.propTypes = globalAttributesPropTypes;
|
|
38
|
+
DSDialogFooterWithSchema.propTypes = globalAttributesPropTypes;
|
|
39
|
+
DSDialogSeparatorWithSchema.propTypes = globalAttributesPropTypes;
|
|
40
|
+
DSDialogTitleWithSchema.propTypes = globalAttributesPropTypes;
|
|
41
|
+
DSDialogAddonWithSchema.propTypes = globalAttributesPropTypes;
|
|
42
|
+
DSDialogDefaultLayoutWithSchema.propTypes = globalAttributesPropTypes;
|
|
43
|
+
DSDialogPrimaryMessageWithSchema.propTypes = globalAttributesPropTypes;
|
|
44
|
+
DSDialogSecondaryMessageWithSchema.propTypes = globalAttributesPropTypes;
|
|
45
|
+
|
|
46
|
+
export { DSDialogAddonWithSchema, DSDialogBodyWithSchema, DSDialogDefaultLayoutWithSchema, DSDialogFooterWithSchema, DSDialogHeaderWithSchema, DSDialogPrimaryMessageWithSchema, DSDialogSecondaryMessageWithSchema, DSDialogSeparatorWithSchema, DSDialogTitleWithSchema };
|
package/esm/propTypes.js
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
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 _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
1
7
|
import { PropTypes } from 'react-desc';
|
|
8
|
+
import { globalAttributesPropTypes } from '@elliemae/ds-props-helpers';
|
|
2
9
|
import { DSDialogSizesArrayValues, DSDialogSizes } from './utils.js';
|
|
3
10
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
11
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
|
+
|
|
13
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
14
|
+
const propTypes = _objectSpread({
|
|
15
|
+
isOpen: PropTypes.bool.description('Whether the Dialog is open or not.').defaultValue(false),
|
|
7
16
|
children: PropTypes.node.description('Nested components.').isRequired,
|
|
8
17
|
centered: PropTypes.bool.description('Centers the Dialog.').defaultValue(false),
|
|
9
18
|
size: PropTypes.oneOf(DSDialogSizesArrayValues).description("Dialog's width size.").defaultValue(DSDialogSizes.DEFAULT),
|
|
10
19
|
removeAutoFocus: PropTypes.bool.description('Removes focus in the Dialog container when is open. If you want to focus an specific element in the Dialog, it should be set to true.').defaultValue(false),
|
|
11
20
|
onClickOutside: PropTypes.func.description('Callback that should be used to close the modal when the user clicks outside. Cb also triggers when the user press ESC key for accessibility purposes.').defaultValue(() => {})
|
|
12
|
-
};
|
|
21
|
+
}, globalAttributesPropTypes);
|
|
13
22
|
|
|
14
23
|
export { propTypes };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-dialog",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Dialog",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"build": "node ../../scripts/build/build.js"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@elliemae/ds-props-helpers": "3.0.0-next.
|
|
68
|
-
"@elliemae/ds-system": "3.0.0-next.
|
|
67
|
+
"@elliemae/ds-props-helpers": "3.0.0-next.2",
|
|
68
|
+
"@elliemae/ds-system": "3.0.0-next.2",
|
|
69
69
|
"@xstyled/styled-components": "~3.1.1",
|
|
70
70
|
"react-desc": "~4.1.3"
|
|
71
71
|
},
|