@elliemae/ds-dialog 2.3.0-next.0 → 3.0.0-alpha.0
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/DSDialog.js +99 -0
- package/dist/cjs/DSDialog.js.map +7 -0
- package/dist/cjs/DSDialogDatatestid.js +38 -0
- package/dist/cjs/DSDialogDatatestid.js.map +7 -0
- package/dist/cjs/DSDialogInternalTypes.js +27 -0
- package/dist/cjs/DSDialogInternalTypes.js.map +7 -0
- package/dist/cjs/DSDialogTypes.js +27 -0
- package/dist/cjs/DSDialogTypes.js.map +7 -0
- package/dist/cjs/defaultProps.js +45 -0
- package/dist/cjs/defaultProps.js.map +7 -0
- package/dist/cjs/index.js +94 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/propTypes.js +46 -0
- package/dist/cjs/propTypes.js.map +7 -0
- package/dist/cjs/styles.js +151 -0
- package/dist/cjs/styles.js.map +7 -0
- package/dist/cjs/utils.js +55 -0
- package/dist/cjs/utils.js.map +7 -0
- package/dist/esm/DSDialog.js +75 -0
- package/dist/esm/DSDialog.js.map +7 -0
- package/dist/esm/DSDialogDatatestid.js +9 -0
- package/dist/esm/DSDialogDatatestid.js.map +7 -0
- package/dist/esm/DSDialogInternalTypes.js +2 -0
- package/dist/esm/DSDialogInternalTypes.js.map +7 -0
- package/dist/esm/DSDialogTypes.js +2 -0
- package/dist/esm/DSDialogTypes.js.map +7 -0
- package/dist/esm/defaultProps.js +16 -0
- package/dist/esm/defaultProps.js.map +7 -0
- package/{esm → dist/esm}/index.js +48 -19
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/propTypes.js +17 -0
- package/dist/esm/propTypes.js.map +7 -0
- package/dist/esm/styles.js +122 -0
- package/dist/esm/styles.js.map +7 -0
- package/dist/esm/utils.js +26 -0
- package/dist/esm/utils.js.map +7 -0
- package/dist/types/DSDialog.d.ts +5 -0
- package/{types → dist/types}/DSDialogDatatestid.d.ts +0 -0
- package/dist/types/DSDialogInternalTypes.d.ts +25 -0
- package/dist/types/DSDialogTypes.d.ts +11 -0
- package/dist/types/defaultProps.d.ts +2 -0
- package/{types → dist/types}/index.d.ts +0 -0
- package/dist/types/propTypes.d.ts +2 -0
- package/{types → dist/types}/styles.d.ts +2 -14
- package/{types → dist/types}/utils.d.ts +1 -2
- package/package.json +46 -34
- package/cjs/DSDialog.js +0 -124
- package/cjs/DSDialogDatatestid.js +0 -10
- package/cjs/defaultProps.js +0 -19
- package/cjs/index.js +0 -70
- package/cjs/propTypes.js +0 -32
- package/cjs/sharedTypes.js +0 -7
- package/cjs/styles.js +0 -145
- package/cjs/utils.js +0 -35
- package/esm/DSDialog.js +0 -112
- package/esm/DSDialogDatatestid.js +0 -6
- package/esm/defaultProps.js +0 -15
- package/esm/propTypes.js +0 -24
- package/esm/sharedTypes.js +0 -5
- package/esm/styles.js +0 -125
- package/esm/utils.js +0 -28
- package/types/DSDialog.d.ts +0 -376
- package/types/defaultProps.d.ts +0 -2
- package/types/propTypes.d.ts +0 -387
- package/types/sharedTypes.d.ts +0 -6
package/esm/DSDialog.js
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
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';
|
|
7
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
8
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
9
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
10
|
-
import ReactDOM from 'react-dom';
|
|
11
|
-
import { useState, useRef, useCallback, useEffect } from 'react';
|
|
12
|
-
import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes, useGetGlobalAttributes } from '@elliemae/ds-props-helpers';
|
|
13
|
-
import { StyledDialogBackground, FixedBody, StyledDialogContainer } from './styles.js';
|
|
14
|
-
import { propTypes } from './propTypes.js';
|
|
15
|
-
import { defaultProps } from './defaultProps.js';
|
|
16
|
-
import { getSpaceProps } from './utils.js';
|
|
17
|
-
import { DSDialogDatatestid } from './DSDialogDatatestid.js';
|
|
18
|
-
import { jsx } from 'react/jsx-runtime';
|
|
19
|
-
|
|
20
|
-
const _excluded = ["children", "isOpen", "onClickOutside", "onClose", "centered", "size", "removeAutoFocus", "zIndex"];
|
|
21
|
-
|
|
22
|
-
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; }
|
|
23
|
-
|
|
24
|
-
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; }
|
|
25
|
-
|
|
26
|
-
const DSDialog = props => {
|
|
27
|
-
var _FixedBody;
|
|
28
|
-
|
|
29
|
-
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
30
|
-
const [bodyInfo, setBodyInfo] = useState({
|
|
31
|
-
overflow: false,
|
|
32
|
-
padding: '0px'
|
|
33
|
-
});
|
|
34
|
-
useValidateTypescriptPropTypes(propsWithDefault, propTypes);
|
|
35
|
-
|
|
36
|
-
const {
|
|
37
|
-
children,
|
|
38
|
-
isOpen,
|
|
39
|
-
onClickOutside,
|
|
40
|
-
onClose,
|
|
41
|
-
centered,
|
|
42
|
-
size,
|
|
43
|
-
removeAutoFocus,
|
|
44
|
-
zIndex
|
|
45
|
-
} = propsWithDefault,
|
|
46
|
-
rest = _objectWithoutProperties(propsWithDefault, _excluded);
|
|
47
|
-
|
|
48
|
-
const containerRef = useRef(null);
|
|
49
|
-
const handleOutsideClick = useCallback(e => {
|
|
50
|
-
if (e.target.dataset.portalbg) onClickOutside();
|
|
51
|
-
}, [onClickOutside]);
|
|
52
|
-
const globalAttributes = useGetGlobalAttributes(propsWithDefault, {
|
|
53
|
-
onClick: handleOutsideClick
|
|
54
|
-
});
|
|
55
|
-
const handleOnKeyDown = useCallback(e => {
|
|
56
|
-
if (e.key === 'Escape') onClose();
|
|
57
|
-
if (globalAttributes.onKeyDown) globalAttributes.onKeyDown(e);
|
|
58
|
-
}, [globalAttributes, onClose]);
|
|
59
|
-
useEffect(() => {
|
|
60
|
-
var _window$getComputedSt;
|
|
61
|
-
|
|
62
|
-
const body = document.getElementsByTagName('body')[0];
|
|
63
|
-
const {
|
|
64
|
-
offsetHeight,
|
|
65
|
-
scrollHeight
|
|
66
|
-
} = body;
|
|
67
|
-
const padding = (_window$getComputedSt = window.getComputedStyle(body, null)) === null || _window$getComputedSt === void 0 ? void 0 : _window$getComputedSt.getPropertyValue('padding-right');
|
|
68
|
-
if (!isOpen) return setBodyInfo({
|
|
69
|
-
overflow: false,
|
|
70
|
-
padding: '0px'
|
|
71
|
-
});
|
|
72
|
-
return setBodyInfo({
|
|
73
|
-
overflow: offsetHeight < scrollHeight,
|
|
74
|
-
padding
|
|
75
|
-
});
|
|
76
|
-
}, [isOpen]);
|
|
77
|
-
useEffect(() => {
|
|
78
|
-
var _containerRef$current;
|
|
79
|
-
|
|
80
|
-
if (isOpen && !removeAutoFocus) containerRef === null || containerRef === void 0 ? void 0 : (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.focus();
|
|
81
|
-
}, [isOpen, removeAutoFocus]);
|
|
82
|
-
|
|
83
|
-
if (isOpen) {
|
|
84
|
-
return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/_jsx(StyledDialogBackground, {
|
|
85
|
-
onClick: handleOutsideClick,
|
|
86
|
-
"data-portalbg": true,
|
|
87
|
-
"data-testid": DSDialogDatatestid.BACKGROUND,
|
|
88
|
-
zIndex: zIndex
|
|
89
|
-
}, void 0, _FixedBody || (_FixedBody = /*#__PURE__*/_jsx(FixedBody, {
|
|
90
|
-
bodyInfo: bodyInfo
|
|
91
|
-
})), /*#__PURE__*/jsx(StyledDialogContainer, _objectSpread(_objectSpread(_objectSpread({
|
|
92
|
-
role: "dialog",
|
|
93
|
-
"aria-modal": true,
|
|
94
|
-
ref: containerRef,
|
|
95
|
-
tabIndex: !removeAutoFocus ? 0 : undefined
|
|
96
|
-
}, getSpaceProps(rest)), {}, {
|
|
97
|
-
size: size,
|
|
98
|
-
centered: centered,
|
|
99
|
-
"data-testid": DSDialogDatatestid.CONTAINER
|
|
100
|
-
}, globalAttributes), {}, {
|
|
101
|
-
onKeyDown: handleOnKeyDown,
|
|
102
|
-
children: children
|
|
103
|
-
}))), document.getElementsByTagName('body')[0]);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return null;
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
const DSDialogWithSchema = describe(DSDialog);
|
|
110
|
-
DSDialogWithSchema.propTypes = propTypes;
|
|
111
|
-
|
|
112
|
-
export { DSDialog, DSDialogWithSchema };
|
package/esm/defaultProps.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { DSDialogSizes } from './utils.js';
|
|
2
|
-
|
|
3
|
-
const noop = () => {};
|
|
4
|
-
|
|
5
|
-
const defaultProps = {
|
|
6
|
-
isOpen: false,
|
|
7
|
-
centered: false,
|
|
8
|
-
size: DSDialogSizes.DEFAULT,
|
|
9
|
-
removeAutoFocus: false,
|
|
10
|
-
onClickOutside: noop,
|
|
11
|
-
onClose: noop,
|
|
12
|
-
zIndex: 10
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export { defaultProps };
|
package/esm/propTypes.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
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';
|
|
7
|
-
import { PropTypes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';
|
|
8
|
-
import { DSDialogSizesArrayValues, DSDialogSizes } from './utils.js';
|
|
9
|
-
|
|
10
|
-
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; }
|
|
11
|
-
|
|
12
|
-
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; }
|
|
13
|
-
const propTypes = _objectSpread(_objectSpread({
|
|
14
|
-
isOpen: PropTypes.bool.description('Whether the Dialog is open or not.').defaultValue(false),
|
|
15
|
-
children: PropTypes.node.description('Nested components.').isRequired,
|
|
16
|
-
centered: PropTypes.bool.description('Centers the Dialog.').defaultValue(false),
|
|
17
|
-
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),
|
|
18
|
-
onClickOutside: PropTypes.func.description('Callback that should be used to close the modal when the user clicks outside.').defaultValue(() => {}),
|
|
19
|
-
onClose: PropTypes.func.description('Callback triggered with ESC key.').defaultValue(() => {})
|
|
20
|
-
}, globalAttributesPropTypes), {}, {
|
|
21
|
-
size: PropTypes.oneOf(DSDialogSizesArrayValues).description("Dialog's width size.").defaultValue(DSDialogSizes.DEFAULT)
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
export { propTypes };
|
package/esm/sharedTypes.js
DELETED
package/esm/styles.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import { createGlobalStyle } from '@elliemae/ds-system';
|
|
4
|
-
import { space, sizing, layout, flexboxes } from '@xstyled/styled-components';
|
|
5
|
-
import { allSizes } from './utils.js';
|
|
6
|
-
|
|
7
|
-
var _templateObject;
|
|
8
|
-
const FixedBody = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n body {\n overflow: hidden;\n \n ", "\n }\n"])), _ref => {
|
|
9
|
-
let {
|
|
10
|
-
bodyInfo
|
|
11
|
-
} = _ref;
|
|
12
|
-
return bodyInfo.overflow ? "padding-right: calc( ".concat(bodyInfo.padding, " + 15px ) !important;") : "";
|
|
13
|
-
});
|
|
14
|
-
const StyledDialogBackground = /*#__PURE__*/styled.div.withConfig({
|
|
15
|
-
componentId: "sc-106vqwv-0"
|
|
16
|
-
})(["position:fixed;top:0;bottom:0;width:100%;height:100%;background:rgba(37,41,47,50%);overflow-y:auto;z-index:", ";"], _ref2 => {
|
|
17
|
-
let {
|
|
18
|
-
zIndex
|
|
19
|
-
} = _ref2;
|
|
20
|
-
return zIndex;
|
|
21
|
-
});
|
|
22
|
-
const StyledDialogContainer = /*#__PURE__*/styled.div.withConfig({
|
|
23
|
-
componentId: "sc-106vqwv-1"
|
|
24
|
-
})(["height:fit-content;position:absolute;top:0;bottom:0;left:0;right:0;margin:", ";width:", ";min-width:300px;box-shadow:0 10px 20px 0 ", ";background:", ";overflow-y:auto;", " &:focus{outline:none;}"], _ref3 => {
|
|
25
|
-
let {
|
|
26
|
-
centered
|
|
27
|
-
} = _ref3;
|
|
28
|
-
return centered ? 'auto' : '20vh auto auto auto';
|
|
29
|
-
}, _ref4 => {
|
|
30
|
-
let {
|
|
31
|
-
size
|
|
32
|
-
} = _ref4;
|
|
33
|
-
return allSizes[size];
|
|
34
|
-
}, _ref5 => {
|
|
35
|
-
let {
|
|
36
|
-
theme
|
|
37
|
-
} = _ref5;
|
|
38
|
-
return theme.colors.neutral[500];
|
|
39
|
-
}, _ref6 => {
|
|
40
|
-
let {
|
|
41
|
-
theme
|
|
42
|
-
} = _ref6;
|
|
43
|
-
return theme.colors.neutral['000'];
|
|
44
|
-
}, space);
|
|
45
|
-
const DSDialogTitle = /*#__PURE__*/styled.h3.withConfig({
|
|
46
|
-
componentId: "sc-106vqwv-2"
|
|
47
|
-
})(["font-size:", ";display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:28px;margin:0;"], _ref7 => {
|
|
48
|
-
let {
|
|
49
|
-
theme
|
|
50
|
-
} = _ref7;
|
|
51
|
-
return theme.fontSizes.title[700];
|
|
52
|
-
});
|
|
53
|
-
const DSDialogAddon = /*#__PURE__*/styled.div.withConfig({
|
|
54
|
-
componentId: "sc-106vqwv-3"
|
|
55
|
-
})([""]);
|
|
56
|
-
const DSDialogHeader = /*#__PURE__*/styled.div.withConfig({
|
|
57
|
-
componentId: "sc-106vqwv-4"
|
|
58
|
-
})(["display:grid;align-items:center;grid-auto-flow:column;min-height:", ";padding:10px ", ";& ", " + ", "{align-self:flex-start;justify-self:flex-end;}& ", ":only-child{justify-self:flex-end;}", " ", ""], _ref8 => {
|
|
59
|
-
let {
|
|
60
|
-
theme
|
|
61
|
-
} = _ref8;
|
|
62
|
-
return theme.space.m;
|
|
63
|
-
}, _ref9 => {
|
|
64
|
-
let {
|
|
65
|
-
theme
|
|
66
|
-
} = _ref9;
|
|
67
|
-
return theme.space.xs;
|
|
68
|
-
}, DSDialogTitle, DSDialogAddon, DSDialogAddon, space, sizing);
|
|
69
|
-
const DSDialogSeparator = /*#__PURE__*/styled.hr.attrs(() => ({
|
|
70
|
-
'aria-hidden': true
|
|
71
|
-
})).withConfig({
|
|
72
|
-
componentId: "sc-106vqwv-5"
|
|
73
|
-
})(["margin:0;border-top:1px solid ", ";"], _ref10 => {
|
|
74
|
-
let {
|
|
75
|
-
theme
|
|
76
|
-
} = _ref10;
|
|
77
|
-
return theme.colors.neutral['080'];
|
|
78
|
-
});
|
|
79
|
-
const DSDialogBody = /*#__PURE__*/styled.div.withConfig({
|
|
80
|
-
componentId: "sc-106vqwv-6"
|
|
81
|
-
})(["padding:", ";overflow-y:auto;", " ", " ", " ", ""], _ref11 => {
|
|
82
|
-
let {
|
|
83
|
-
theme
|
|
84
|
-
} = _ref11;
|
|
85
|
-
return theme.space.xs;
|
|
86
|
-
}, layout, space, flexboxes, sizing);
|
|
87
|
-
const DSDialogPrimaryMessage = /*#__PURE__*/styled.h3.withConfig({
|
|
88
|
-
componentId: "sc-106vqwv-7"
|
|
89
|
-
})(["margin:0;"]);
|
|
90
|
-
const DSDialogSecondaryMessage = /*#__PURE__*/styled.p.withConfig({
|
|
91
|
-
componentId: "sc-106vqwv-8"
|
|
92
|
-
})(["margin:0;color:", ";"], _ref12 => {
|
|
93
|
-
let {
|
|
94
|
-
theme
|
|
95
|
-
} = _ref12;
|
|
96
|
-
return theme.colors.neutral[500];
|
|
97
|
-
});
|
|
98
|
-
const DSDialogDefaultLayout = /*#__PURE__*/styled.div.withConfig({
|
|
99
|
-
componentId: "sc-106vqwv-9"
|
|
100
|
-
})(["display:grid;grid-auto-flow:row;justify-items:center;align-items:center;grid-gap:", ";", "{text-align:center;}"], _ref13 => {
|
|
101
|
-
let {
|
|
102
|
-
theme
|
|
103
|
-
} = _ref13;
|
|
104
|
-
return theme.space.xxs;
|
|
105
|
-
}, DSDialogSecondaryMessage);
|
|
106
|
-
const DSDialogFooter = /*#__PURE__*/styled.div.withConfig({
|
|
107
|
-
componentId: "sc-106vqwv-10"
|
|
108
|
-
})(["display:grid;grid-auto-flow:column;align-items:center;justify-content:flex-end;grid-gap:", ";min-height:", ";padding:0 ", ";", " ", " ", ""], _ref14 => {
|
|
109
|
-
let {
|
|
110
|
-
theme
|
|
111
|
-
} = _ref14;
|
|
112
|
-
return theme.space.xxs;
|
|
113
|
-
}, _ref15 => {
|
|
114
|
-
let {
|
|
115
|
-
theme
|
|
116
|
-
} = _ref15;
|
|
117
|
-
return theme.space.m;
|
|
118
|
-
}, _ref16 => {
|
|
119
|
-
let {
|
|
120
|
-
theme
|
|
121
|
-
} = _ref16;
|
|
122
|
-
return theme.space.xs;
|
|
123
|
-
}, space, flexboxes, sizing);
|
|
124
|
-
|
|
125
|
-
export { DSDialogAddon, DSDialogBody, DSDialogDefaultLayout, DSDialogFooter, DSDialogHeader, DSDialogPrimaryMessage, DSDialogSecondaryMessage, DSDialogSeparator, DSDialogTitle, FixedBody, StyledDialogBackground, StyledDialogContainer };
|
package/esm/utils.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
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/web.dom-collections.iterator.js';
|
|
5
|
-
|
|
6
|
-
const getSpaceProps = props => Object.fromEntries(Object.entries(props).filter(_ref => {
|
|
7
|
-
let [key] = _ref;
|
|
8
|
-
return /^[pm][xytblr]?$/.exec(key);
|
|
9
|
-
}));
|
|
10
|
-
const DSDialogSizes = {
|
|
11
|
-
DEFAULT: 'default',
|
|
12
|
-
SMALL: 'small',
|
|
13
|
-
MEDIUM: 'medium',
|
|
14
|
-
LARGE: 'large',
|
|
15
|
-
XLARGE: 'x-large',
|
|
16
|
-
XXLARGE: 'xx-large'
|
|
17
|
-
};
|
|
18
|
-
const DSDialogSizesArrayValues = Object.values(DSDialogSizes);
|
|
19
|
-
const allSizes = {
|
|
20
|
-
default: '576px',
|
|
21
|
-
small: '320px',
|
|
22
|
-
medium: '656px',
|
|
23
|
-
large: '848px',
|
|
24
|
-
'x-large': '1042px',
|
|
25
|
-
'xx-large': '1440px'
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export { DSDialogSizes, DSDialogSizesArrayValues, allSizes, getSpaceProps };
|
package/types/DSDialog.d.ts
DELETED
|
@@ -1,376 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { DSDialogT } from './propTypes';
|
|
3
|
-
declare const DSDialog: {
|
|
4
|
-
(props: DSDialogT.Props): React.ReactPortal | null;
|
|
5
|
-
propTypes: {
|
|
6
|
-
size: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
7
|
-
'aria-*': any;
|
|
8
|
-
'on-*': any;
|
|
9
|
-
'data-*': any;
|
|
10
|
-
'all HTML attributes': any;
|
|
11
|
-
about: any;
|
|
12
|
-
accept: any;
|
|
13
|
-
acceptCharset: any;
|
|
14
|
-
accessKey: any;
|
|
15
|
-
action: any;
|
|
16
|
-
allowFullScreen: any;
|
|
17
|
-
allowTransparency: any;
|
|
18
|
-
alt: any;
|
|
19
|
-
'aria-activedescendant': any;
|
|
20
|
-
'aria-atomic': any;
|
|
21
|
-
'aria-autocomplete': any;
|
|
22
|
-
'aria-busy': any;
|
|
23
|
-
'aria-checked': any;
|
|
24
|
-
'aria-colcount': any;
|
|
25
|
-
'aria-colindex': any;
|
|
26
|
-
'aria-colspan': any;
|
|
27
|
-
'aria-controls': any;
|
|
28
|
-
'aria-current': any;
|
|
29
|
-
'aria-describedby': any;
|
|
30
|
-
'aria-details': any;
|
|
31
|
-
'aria-disabled': any;
|
|
32
|
-
'aria-dropeffect': any;
|
|
33
|
-
'aria-errormessage': any;
|
|
34
|
-
'aria-expanded': any;
|
|
35
|
-
'aria-flowto': any;
|
|
36
|
-
'aria-grabbed': any;
|
|
37
|
-
'aria-haspopup': any;
|
|
38
|
-
'aria-hidden': any;
|
|
39
|
-
'aria-invalid': any;
|
|
40
|
-
'aria-keyshortcuts': any;
|
|
41
|
-
'aria-label': any;
|
|
42
|
-
'aria-labelledby': any;
|
|
43
|
-
'aria-level': any;
|
|
44
|
-
'aria-live': any;
|
|
45
|
-
'aria-modal': any;
|
|
46
|
-
'aria-multiline': any;
|
|
47
|
-
'aria-multiselectable': any;
|
|
48
|
-
'aria-orientation': any;
|
|
49
|
-
'aria-owns': any;
|
|
50
|
-
'aria-placeholder': any;
|
|
51
|
-
'aria-posinset': any;
|
|
52
|
-
'aria-pressed': any;
|
|
53
|
-
'aria-readonly': any;
|
|
54
|
-
'aria-relevant': any;
|
|
55
|
-
'aria-required': any;
|
|
56
|
-
'aria-roledescription': any;
|
|
57
|
-
'aria-rowcount': any;
|
|
58
|
-
'aria-rowindex': any;
|
|
59
|
-
'aria-rowspan': any;
|
|
60
|
-
'aria-selected': any;
|
|
61
|
-
'aria-setsize': any;
|
|
62
|
-
'aria-sort': any;
|
|
63
|
-
'aria-valuemax': any;
|
|
64
|
-
'aria-valuemin': any;
|
|
65
|
-
'aria-valuenow': any;
|
|
66
|
-
'aria-valuetext': any;
|
|
67
|
-
as: any;
|
|
68
|
-
async: any;
|
|
69
|
-
autoCapitalize: any;
|
|
70
|
-
autoComplete: any;
|
|
71
|
-
autoCorrect: any;
|
|
72
|
-
autoFocus: any;
|
|
73
|
-
autoPlay: any;
|
|
74
|
-
autoSave: any;
|
|
75
|
-
capture: any;
|
|
76
|
-
cellPadding: any;
|
|
77
|
-
cellSpacing: any;
|
|
78
|
-
challenge: any;
|
|
79
|
-
charSet: any;
|
|
80
|
-
checked: any;
|
|
81
|
-
cite: any;
|
|
82
|
-
classID: any;
|
|
83
|
-
className: any;
|
|
84
|
-
color: any;
|
|
85
|
-
cols: any;
|
|
86
|
-
colSpan: any;
|
|
87
|
-
content: any;
|
|
88
|
-
contentEditable: any;
|
|
89
|
-
contextMenu: any;
|
|
90
|
-
controls: any;
|
|
91
|
-
coords: any;
|
|
92
|
-
crossOrigin: any;
|
|
93
|
-
data: any;
|
|
94
|
-
datatype: any;
|
|
95
|
-
dateTime: any;
|
|
96
|
-
default: any;
|
|
97
|
-
defaultChecked: any;
|
|
98
|
-
defaultValue: any;
|
|
99
|
-
defer: any;
|
|
100
|
-
dir: any;
|
|
101
|
-
disabled: any;
|
|
102
|
-
download: any;
|
|
103
|
-
draggable: any;
|
|
104
|
-
encType: any;
|
|
105
|
-
form: any;
|
|
106
|
-
formAction: any;
|
|
107
|
-
formEncType: any;
|
|
108
|
-
formMethod: any;
|
|
109
|
-
formNoValidate: any;
|
|
110
|
-
formTarget: any;
|
|
111
|
-
frameBorder: any;
|
|
112
|
-
headers: any;
|
|
113
|
-
height: any;
|
|
114
|
-
hidden: any;
|
|
115
|
-
high: any;
|
|
116
|
-
href: any;
|
|
117
|
-
hrefLang: any;
|
|
118
|
-
htmlFor: any;
|
|
119
|
-
httpEquiv: any;
|
|
120
|
-
id: any;
|
|
121
|
-
inlist: any;
|
|
122
|
-
inputMode: any;
|
|
123
|
-
integrity: any;
|
|
124
|
-
is: any;
|
|
125
|
-
itemID: any;
|
|
126
|
-
itemProp: any;
|
|
127
|
-
itemRef: any;
|
|
128
|
-
itemScope: any;
|
|
129
|
-
itemType: any;
|
|
130
|
-
keyParams: any;
|
|
131
|
-
keyType: any;
|
|
132
|
-
kind: any;
|
|
133
|
-
label: any;
|
|
134
|
-
lang: any;
|
|
135
|
-
list: any;
|
|
136
|
-
loop: any;
|
|
137
|
-
low: any;
|
|
138
|
-
manifest: any;
|
|
139
|
-
marginHeight: any;
|
|
140
|
-
marginWidth: any;
|
|
141
|
-
max: any;
|
|
142
|
-
maxLength: any;
|
|
143
|
-
media: any;
|
|
144
|
-
mediaGroup: any;
|
|
145
|
-
method: any;
|
|
146
|
-
min: any;
|
|
147
|
-
minLength: any;
|
|
148
|
-
multiple: any;
|
|
149
|
-
muted: any;
|
|
150
|
-
name: any;
|
|
151
|
-
nonce: any;
|
|
152
|
-
noValidate: any;
|
|
153
|
-
onAbort: any;
|
|
154
|
-
onAbortCapture: any;
|
|
155
|
-
onAnimationEnd: any;
|
|
156
|
-
onAnimationEndCapture: any;
|
|
157
|
-
onAnimationIteration: any;
|
|
158
|
-
onAnimationIterationCapture: any;
|
|
159
|
-
onAnimationStart: any;
|
|
160
|
-
onAnimationStartCapture: any;
|
|
161
|
-
onAuxClick: any;
|
|
162
|
-
onAuxClickCapture: any;
|
|
163
|
-
onBeforeInput: any;
|
|
164
|
-
onBeforeInputCapture: any;
|
|
165
|
-
onBlur: any;
|
|
166
|
-
onBlurCapture: any;
|
|
167
|
-
onCanPlay: any;
|
|
168
|
-
onCanPlayCapture: any;
|
|
169
|
-
onCanPlayThrough: any;
|
|
170
|
-
onCanPlayThroughCapture: any;
|
|
171
|
-
onChange: any;
|
|
172
|
-
onChangeCapture: any;
|
|
173
|
-
onClick: any;
|
|
174
|
-
onClickCapture: any;
|
|
175
|
-
onCompositionEnd: any;
|
|
176
|
-
onCompositionEndCapture: any;
|
|
177
|
-
onCompositionStart: any;
|
|
178
|
-
onCompositionStartCapture: any;
|
|
179
|
-
onCompositionUpdate: any;
|
|
180
|
-
onCompositionUpdateCapture: any;
|
|
181
|
-
onContextMenu: any;
|
|
182
|
-
onContextMenuCapture: any;
|
|
183
|
-
onCopy: any;
|
|
184
|
-
onCopyCapture: any;
|
|
185
|
-
onCut: any;
|
|
186
|
-
onCutCapture: any;
|
|
187
|
-
onDoubleClick: any;
|
|
188
|
-
onDoubleClickCapture: any;
|
|
189
|
-
onDrag: any;
|
|
190
|
-
onDragCapture: any;
|
|
191
|
-
onDragEnd: any;
|
|
192
|
-
onDragEndCapture: any;
|
|
193
|
-
onDragEnter: any;
|
|
194
|
-
onDragEnterCapture: any;
|
|
195
|
-
onDragExit: any;
|
|
196
|
-
onDragExitCapture: any;
|
|
197
|
-
onDragLeave: any;
|
|
198
|
-
onDragLeaveCapture: any;
|
|
199
|
-
onDragOver: any;
|
|
200
|
-
onDragOverCapture: any;
|
|
201
|
-
onDragStart: any;
|
|
202
|
-
onDragStartCapture: any;
|
|
203
|
-
onDrop: any;
|
|
204
|
-
onDropCapture: any;
|
|
205
|
-
onDurationChange: any;
|
|
206
|
-
onDurationChangeCapture: any;
|
|
207
|
-
onEmptied: any;
|
|
208
|
-
onEmptiedCapture: any;
|
|
209
|
-
onEncrypted: any;
|
|
210
|
-
onEncryptedCapture: any;
|
|
211
|
-
onEnded: any;
|
|
212
|
-
onEndedCapture: any;
|
|
213
|
-
onError: any;
|
|
214
|
-
onErrorCapture: any;
|
|
215
|
-
onFocus: any;
|
|
216
|
-
onFocusCapture: any;
|
|
217
|
-
onGotPointerCapture: any;
|
|
218
|
-
onGotPointerCaptureCapture: any;
|
|
219
|
-
onInput: any;
|
|
220
|
-
onInputCapture: any;
|
|
221
|
-
onInvalid: any;
|
|
222
|
-
onInvalidCapture: any;
|
|
223
|
-
onKeyDown: any;
|
|
224
|
-
onKeyDownCapture: any;
|
|
225
|
-
onKeyPress: any;
|
|
226
|
-
onKeyPressCapture: any;
|
|
227
|
-
onKeyUp: any;
|
|
228
|
-
onKeyUpCapture: any;
|
|
229
|
-
onLoad: any;
|
|
230
|
-
onLoadCapture: any;
|
|
231
|
-
onLoadedData: any;
|
|
232
|
-
onLoadedDataCapture: any;
|
|
233
|
-
onLoadedMetadata: any;
|
|
234
|
-
onLoadedMetadataCapture: any;
|
|
235
|
-
onLoadStart: any;
|
|
236
|
-
onLoadStartCapture: any;
|
|
237
|
-
onLostPointerCapture: any;
|
|
238
|
-
onLostPointerCaptureCapture: any;
|
|
239
|
-
onMouseDown: any;
|
|
240
|
-
onMouseDownCapture: any;
|
|
241
|
-
onMouseEnter: any;
|
|
242
|
-
onMouseLeave: any;
|
|
243
|
-
onMouseMove: any;
|
|
244
|
-
onMouseMoveCapture: any;
|
|
245
|
-
onMouseOut: any;
|
|
246
|
-
onMouseOutCapture: any;
|
|
247
|
-
onMouseOver: any;
|
|
248
|
-
onMouseOverCapture: any;
|
|
249
|
-
onMouseUp: any;
|
|
250
|
-
onMouseUpCapture: any;
|
|
251
|
-
onPaste: any;
|
|
252
|
-
onPasteCapture: any;
|
|
253
|
-
onPause: any;
|
|
254
|
-
onPauseCapture: any;
|
|
255
|
-
onPlay: any;
|
|
256
|
-
onPlayCapture: any;
|
|
257
|
-
onPlaying: any;
|
|
258
|
-
onPlayingCapture: any;
|
|
259
|
-
onPointerCancel: any;
|
|
260
|
-
onPointerCancelCapture: any;
|
|
261
|
-
onPointerDown: any;
|
|
262
|
-
onPointerDownCapture: any;
|
|
263
|
-
onPointerEnter: any;
|
|
264
|
-
onPointerEnterCapture: any;
|
|
265
|
-
onPointerLeave: any;
|
|
266
|
-
onPointerLeaveCapture: any;
|
|
267
|
-
onPointerMove: any;
|
|
268
|
-
onPointerMoveCapture: any;
|
|
269
|
-
onPointerOut: any;
|
|
270
|
-
onPointerOutCapture: any;
|
|
271
|
-
onPointerOver: any;
|
|
272
|
-
onPointerOverCapture: any;
|
|
273
|
-
onPointerUp: any;
|
|
274
|
-
onPointerUpCapture: any;
|
|
275
|
-
onProgress: any;
|
|
276
|
-
onProgressCapture: any;
|
|
277
|
-
onRateChange: any;
|
|
278
|
-
onRateChangeCapture: any;
|
|
279
|
-
onReset: any;
|
|
280
|
-
onResetCapture: any;
|
|
281
|
-
onScroll: any;
|
|
282
|
-
onScrollCapture: any;
|
|
283
|
-
onSeeked: any;
|
|
284
|
-
onSeekedCapture: any;
|
|
285
|
-
onSeeking: any;
|
|
286
|
-
onSeekingCapture: any;
|
|
287
|
-
onSelect: any;
|
|
288
|
-
onSelectCapture: any;
|
|
289
|
-
onStalled: any;
|
|
290
|
-
onStalledCapture: any;
|
|
291
|
-
onSubmit: any;
|
|
292
|
-
onSubmitCapture: any;
|
|
293
|
-
onSuspend: any;
|
|
294
|
-
onSuspendCapture: any;
|
|
295
|
-
onTimeUpdate: any;
|
|
296
|
-
onTimeUpdateCapture: any;
|
|
297
|
-
onTouchCancel: any;
|
|
298
|
-
onTouchCancelCapture: any;
|
|
299
|
-
onTouchEnd: any;
|
|
300
|
-
onTouchEndCapture: any;
|
|
301
|
-
onTouchMove: any;
|
|
302
|
-
onTouchMoveCapture: any;
|
|
303
|
-
onTouchStart: any;
|
|
304
|
-
onTouchStartCapture: any;
|
|
305
|
-
onTransitionEnd: any;
|
|
306
|
-
onTransitionEndCapture: any;
|
|
307
|
-
onVolumeChange: any;
|
|
308
|
-
onVolumeChangeCapture: any;
|
|
309
|
-
onWaiting: any;
|
|
310
|
-
onWaitingCapture: any;
|
|
311
|
-
onWheel: any;
|
|
312
|
-
onWheelCapture: any;
|
|
313
|
-
open: any;
|
|
314
|
-
optimum: any;
|
|
315
|
-
pattern: any;
|
|
316
|
-
placeholder: any;
|
|
317
|
-
playsInline: any;
|
|
318
|
-
poster: any;
|
|
319
|
-
prefix: any;
|
|
320
|
-
preload: any;
|
|
321
|
-
property: any;
|
|
322
|
-
radioGroup: any;
|
|
323
|
-
readOnly: any;
|
|
324
|
-
rel: any;
|
|
325
|
-
required: any;
|
|
326
|
-
resource: any;
|
|
327
|
-
results: any;
|
|
328
|
-
reversed: any;
|
|
329
|
-
role: any;
|
|
330
|
-
rows: any;
|
|
331
|
-
rowSpan: any;
|
|
332
|
-
sandbox: any;
|
|
333
|
-
scope: any;
|
|
334
|
-
scoped: any;
|
|
335
|
-
scrolling: any;
|
|
336
|
-
seamless: any;
|
|
337
|
-
security: any;
|
|
338
|
-
selected: any;
|
|
339
|
-
shape: any;
|
|
340
|
-
sizes: any;
|
|
341
|
-
slot: any;
|
|
342
|
-
span: any;
|
|
343
|
-
spellCheck: any;
|
|
344
|
-
src: any;
|
|
345
|
-
srcDoc: any;
|
|
346
|
-
srcLang: any;
|
|
347
|
-
srcSet: any;
|
|
348
|
-
start: any;
|
|
349
|
-
step: any;
|
|
350
|
-
style: any;
|
|
351
|
-
summary: any;
|
|
352
|
-
suppressContentEditableWarning: any;
|
|
353
|
-
suppressHydrationWarning: any;
|
|
354
|
-
tabIndex: any;
|
|
355
|
-
target: any;
|
|
356
|
-
title: any;
|
|
357
|
-
translate: any;
|
|
358
|
-
type: any;
|
|
359
|
-
typeof: any;
|
|
360
|
-
unselectable: any;
|
|
361
|
-
useMap: any;
|
|
362
|
-
value: any;
|
|
363
|
-
vocab: any;
|
|
364
|
-
width: any;
|
|
365
|
-
wmode: any;
|
|
366
|
-
wrap: any;
|
|
367
|
-
isOpen: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
368
|
-
children: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
369
|
-
centered: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
370
|
-
removeAutoFocus: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
371
|
-
onClickOutside: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
372
|
-
onClose: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
373
|
-
};
|
|
374
|
-
};
|
|
375
|
-
declare const DSDialogWithSchema: import("@elliemae/ds-props-helpers/types/propTypes/types").DocumentedReactComponent<DSDialogT.Props>;
|
|
376
|
-
export { DSDialog, DSDialogWithSchema };
|