@elliemae/ds-dialog 2.2.0-alpha.3 → 3.0.0-next.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/cjs/DSDialog.js +93 -80
- package/cjs/DSDialogDatatestid.js +8 -36
- package/cjs/DSDialogInternalTypes.d.js +2 -27
- package/cjs/DSDialogTypes.js +2 -27
- package/cjs/defaultProps.js +11 -38
- package/cjs/index.js +24 -47
- package/cjs/propTypes.js +16 -43
- package/cjs/styles.js +119 -148
- package/cjs/utils.js +30 -50
- package/esm/DSDialog.js +72 -42
- package/esm/DSDialogDatatestid.js +4 -7
- package/esm/DSDialogInternalTypes.d.js +1 -2
- package/esm/DSDialogTypes.js +1 -2
- package/esm/defaultProps.js +6 -8
- package/esm/index.js +4 -28
- package/esm/propTypes.js +12 -14
- package/esm/styles.js +100 -120
- package/esm/utils.js +23 -21
- package/package.json +3 -3
- package/types/styles.d.ts +11 -11
- package/cjs/DSDialog.js.map +0 -7
- package/cjs/DSDialogDatatestid.js.map +0 -7
- package/cjs/DSDialogInternalTypes.d.js.map +0 -7
- package/cjs/DSDialogTypes.js.map +0 -7
- package/cjs/defaultProps.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/cjs/propTypes.js.map +0 -7
- package/cjs/styles.js.map +0 -7
- package/cjs/utils.js.map +0 -7
- package/esm/DSDialog.js.map +0 -7
- package/esm/DSDialogDatatestid.js.map +0 -7
- package/esm/DSDialogInternalTypes.d.js.map +0 -7
- package/esm/DSDialogTypes.js.map +0 -7
- package/esm/defaultProps.js.map +0 -7
- package/esm/index.js.map +0 -7
- package/esm/propTypes.js.map +0 -7
- package/esm/styles.js.map +0 -7
- package/esm/utils.js.map +0 -7
package/cjs/DSDialog.js
CHANGED
|
@@ -1,94 +1,107 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
7
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
8
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
9
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
10
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
11
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
12
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
13
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
14
|
+
var ReactDOM = require('react-dom');
|
|
15
|
+
var react = require('react');
|
|
16
|
+
var reactDesc = require('react-desc');
|
|
17
|
+
var dsPropsHelpers = require('@elliemae/ds-props-helpers');
|
|
18
|
+
var styles = require('./styles.js');
|
|
19
|
+
var propTypes = require('./propTypes.js');
|
|
20
|
+
var defaultProps = require('./defaultProps.js');
|
|
21
|
+
var utils = require('./utils.js');
|
|
22
|
+
var DSDialogDatatestid = require('./DSDialogDatatestid.js');
|
|
23
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
24
|
+
|
|
25
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
26
|
+
|
|
27
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
28
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
29
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
30
|
+
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
31
|
+
|
|
32
|
+
const _excluded = ["children", "isOpen", "onClickOutside", "centered", "size", "removeAutoFocus", "zIndex"];
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
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; }
|
|
37
|
+
|
|
38
|
+
const DSDialog = props => {
|
|
39
|
+
var _FixedBody;
|
|
40
|
+
|
|
41
|
+
const propsWithDefault = dsPropsHelpers.useMemoMergePropsWithDefault(props, defaultProps.defaultProps);
|
|
42
|
+
const [isBodyOverflow, setIsBodyOverflow] = react.useState(false);
|
|
43
|
+
dsPropsHelpers.useValidateTypescriptPropTypes(propsWithDefault, propTypes.propTypes);
|
|
44
|
+
|
|
45
|
+
const {
|
|
46
|
+
children,
|
|
47
|
+
isOpen,
|
|
48
|
+
onClickOutside,
|
|
49
|
+
centered,
|
|
50
|
+
size,
|
|
51
|
+
removeAutoFocus,
|
|
52
|
+
zIndex
|
|
53
|
+
} = propsWithDefault,
|
|
54
|
+
rest = _objectWithoutProperties__default["default"](propsWithDefault, _excluded);
|
|
55
|
+
|
|
56
|
+
const containerRef = react.useRef(null);
|
|
57
|
+
const handleOutsideClick = react.useCallback(e => {
|
|
58
|
+
if (e.target.dataset.portalbg) onClickOutside();
|
|
52
59
|
}, [onClickOutside]);
|
|
53
|
-
const handleOnKeyDown =
|
|
54
|
-
if (e.key ===
|
|
55
|
-
onClickOutside();
|
|
60
|
+
const handleOnKeyDown = react.useCallback(e => {
|
|
61
|
+
if (e.key === 'Escape') onClickOutside();
|
|
56
62
|
}, [onClickOutside]);
|
|
57
|
-
|
|
58
|
-
const body = document.getElementsByTagName(
|
|
59
|
-
const {
|
|
60
|
-
|
|
61
|
-
|
|
63
|
+
react.useEffect(() => {
|
|
64
|
+
const body = document.getElementsByTagName('body')[0];
|
|
65
|
+
const {
|
|
66
|
+
offsetHeight,
|
|
67
|
+
scrollHeight
|
|
68
|
+
} = body;
|
|
69
|
+
if (!isOpen) return setIsBodyOverflow(false);
|
|
62
70
|
return setIsBodyOverflow(offsetHeight < scrollHeight);
|
|
63
71
|
}, [isOpen]);
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
72
|
+
react.useEffect(() => {
|
|
73
|
+
var _containerRef$current;
|
|
74
|
+
|
|
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();
|
|
67
76
|
}, [isOpen, removeAutoFocus]);
|
|
77
|
+
|
|
68
78
|
if (isOpen) {
|
|
69
|
-
return
|
|
79
|
+
return /*#__PURE__*/ReactDOM__default["default"].createPortal( /*#__PURE__*/_jsx__default["default"](styles.StyledDialogBackground, {
|
|
70
80
|
onClick: handleOutsideClick,
|
|
71
81
|
"data-portalbg": true,
|
|
72
|
-
"data-testid":
|
|
73
|
-
zIndex
|
|
74
|
-
},
|
|
75
|
-
isBodyOverflow
|
|
76
|
-
}),
|
|
82
|
+
"data-testid": DSDialogDatatestid.DSDialogDatatestid.BACKGROUND,
|
|
83
|
+
zIndex: zIndex
|
|
84
|
+
}, void 0, _FixedBody || (_FixedBody = /*#__PURE__*/_jsx__default["default"](styles.FixedBody, {
|
|
85
|
+
isBodyOverflow: isBodyOverflow
|
|
86
|
+
})), /*#__PURE__*/jsxRuntime.jsx(styles.StyledDialogContainer, _objectSpread(_objectSpread({
|
|
77
87
|
role: "dialog",
|
|
78
88
|
"aria-modal": true,
|
|
79
89
|
ref: containerRef,
|
|
80
|
-
tabIndex: !removeAutoFocus ? 0 :
|
|
81
|
-
onKeyDown: handleOnKeyDown
|
|
82
|
-
|
|
83
|
-
size,
|
|
84
|
-
centered,
|
|
85
|
-
"data-testid":
|
|
86
|
-
|
|
90
|
+
tabIndex: !removeAutoFocus ? 0 : undefined,
|
|
91
|
+
onKeyDown: handleOnKeyDown
|
|
92
|
+
}, utils.getSpaceProps(rest)), {}, {
|
|
93
|
+
size: size,
|
|
94
|
+
centered: centered,
|
|
95
|
+
"data-testid": DSDialogDatatestid.DSDialogDatatestid.CONTAINER,
|
|
96
|
+
children: children
|
|
97
|
+
}))), document.getElementsByTagName('body')[0]);
|
|
87
98
|
}
|
|
99
|
+
|
|
88
100
|
return null;
|
|
89
101
|
};
|
|
90
|
-
|
|
91
|
-
const DSDialogWithSchema =
|
|
92
|
-
DSDialogWithSchema.propTypes =
|
|
93
|
-
|
|
94
|
-
|
|
102
|
+
|
|
103
|
+
const DSDialogWithSchema = reactDesc.describe(DSDialog);
|
|
104
|
+
DSDialogWithSchema.propTypes = propTypes.propTypes;
|
|
105
|
+
|
|
106
|
+
exports.DSDialog = DSDialog;
|
|
107
|
+
exports.DSDialogWithSchema = DSDialogWithSchema;
|
|
@@ -1,38 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 DSDialogDatatestid_exports = {};
|
|
29
|
-
__export(DSDialogDatatestid_exports, {
|
|
30
|
-
DSDialogDatatestid: () => DSDialogDatatestid
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
33
5
|
const DSDialogDatatestid = {
|
|
34
|
-
CONTAINER:
|
|
35
|
-
BACKGROUND:
|
|
6
|
+
CONTAINER: 'ds-dialog-container',
|
|
7
|
+
BACKGROUND: 'ds-dialog-background'
|
|
36
8
|
};
|
|
37
|
-
|
|
38
|
-
|
|
9
|
+
|
|
10
|
+
exports.DSDialogDatatestid = DSDialogDatatestid;
|
|
@@ -1,27 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 __reExport = (target, module2, copyDefault, desc) => {
|
|
9
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
10
|
-
for (let key of __getOwnPropNames(module2))
|
|
11
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
12
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
13
|
-
}
|
|
14
|
-
return target;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (module2, isNodeMode) => {
|
|
17
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
20
|
-
return (module2, temp) => {
|
|
21
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
22
|
-
};
|
|
23
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
24
|
-
var DSDialogInternalTypes_d_exports = {};
|
|
25
|
-
var React = __toESM(require("react"));
|
|
26
|
-
module.exports = __toCommonJS(DSDialogInternalTypes_d_exports);
|
|
27
|
-
//# sourceMappingURL=DSDialogInternalTypes.d.js.map
|
|
1
|
+
'use strict';
|
|
2
|
+
|
package/cjs/DSDialogTypes.js
CHANGED
|
@@ -1,27 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 __reExport = (target, module2, copyDefault, desc) => {
|
|
9
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
10
|
-
for (let key of __getOwnPropNames(module2))
|
|
11
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
12
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
13
|
-
}
|
|
14
|
-
return target;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (module2, isNodeMode) => {
|
|
17
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
20
|
-
return (module2, temp) => {
|
|
21
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
22
|
-
};
|
|
23
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
24
|
-
var DSDialogTypes_exports = {};
|
|
25
|
-
var React = __toESM(require("react"));
|
|
26
|
-
module.exports = __toCommonJS(DSDialogTypes_exports);
|
|
27
|
-
//# sourceMappingURL=DSDialogTypes.js.map
|
|
1
|
+
'use strict';
|
|
2
|
+
|
package/cjs/defaultProps.js
CHANGED
|
@@ -1,45 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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 defaultProps_exports = {};
|
|
29
|
-
__export(defaultProps_exports, {
|
|
30
|
-
defaultProps: () => defaultProps
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_utils = __toESM(require("./utils"));
|
|
34
|
-
const noop = () => {
|
|
35
|
-
};
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var utils = require('./utils.js');
|
|
6
|
+
|
|
7
|
+
const noop = () => {};
|
|
8
|
+
|
|
36
9
|
const defaultProps = {
|
|
37
10
|
isOpen: false,
|
|
38
11
|
centered: false,
|
|
39
|
-
size:
|
|
12
|
+
size: utils.DSDialogSizes.DEFAULT,
|
|
40
13
|
removeAutoFocus: false,
|
|
41
14
|
onClickOutside: noop,
|
|
42
15
|
zIndex: 10
|
|
43
16
|
};
|
|
44
|
-
|
|
45
|
-
|
|
17
|
+
|
|
18
|
+
exports.defaultProps = defaultProps;
|
package/cjs/index.js
CHANGED
|
@@ -1,47 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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 src_exports = {};
|
|
29
|
-
__export(src_exports, {
|
|
30
|
-
DSDialogAddon: () => import_styles.DSDialogAddon,
|
|
31
|
-
DSDialogBody: () => import_styles.DSDialogBody,
|
|
32
|
-
DSDialogDefaultLayout: () => import_styles.DSDialogDefaultLayout,
|
|
33
|
-
DSDialogFooter: () => import_styles.DSDialogFooter,
|
|
34
|
-
DSDialogHeader: () => import_styles.DSDialogHeader,
|
|
35
|
-
DSDialogPrimaryMessage: () => import_styles.DSDialogPrimaryMessage,
|
|
36
|
-
DSDialogSecondaryMessage: () => import_styles.DSDialogSecondaryMessage,
|
|
37
|
-
DSDialogSeparator: () => import_styles.DSDialogSeparator,
|
|
38
|
-
DSDialogSizes: () => import_utils.DSDialogSizes,
|
|
39
|
-
DSDialogTitle: () => import_styles.DSDialogTitle
|
|
40
|
-
});
|
|
41
|
-
var React = __toESM(require("react"));
|
|
42
|
-
__reExport(src_exports, __toESM(require("./DSDialog")));
|
|
43
|
-
__reExport(src_exports, __toESM(require("./DSDialogDatatestid")));
|
|
44
|
-
var import_utils = __toESM(require("./utils"));
|
|
45
|
-
var import_styles = __toESM(require("./styles"));
|
|
46
|
-
module.exports = __toCommonJS(src_exports);
|
|
47
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var DSDialog = require('./DSDialog.js');
|
|
6
|
+
var DSDialogDatatestid = require('./DSDialogDatatestid.js');
|
|
7
|
+
var utils = require('./utils.js');
|
|
8
|
+
var styles = require('./styles.js');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.DSDialog = DSDialog.DSDialog;
|
|
13
|
+
exports.DSDialogWithSchema = DSDialog.DSDialogWithSchema;
|
|
14
|
+
exports.DSDialogDatatestid = DSDialogDatatestid.DSDialogDatatestid;
|
|
15
|
+
exports.DSDialogSizes = utils.DSDialogSizes;
|
|
16
|
+
exports.DSDialogAddon = styles.DSDialogAddon;
|
|
17
|
+
exports.DSDialogBody = styles.DSDialogBody;
|
|
18
|
+
exports.DSDialogDefaultLayout = styles.DSDialogDefaultLayout;
|
|
19
|
+
exports.DSDialogFooter = styles.DSDialogFooter;
|
|
20
|
+
exports.DSDialogHeader = styles.DSDialogHeader;
|
|
21
|
+
exports.DSDialogPrimaryMessage = styles.DSDialogPrimaryMessage;
|
|
22
|
+
exports.DSDialogSecondaryMessage = styles.DSDialogSecondaryMessage;
|
|
23
|
+
exports.DSDialogSeparator = styles.DSDialogSeparator;
|
|
24
|
+
exports.DSDialogTitle = styles.DSDialogTitle;
|
package/cjs/propTypes.js
CHANGED
|
@@ -1,45 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
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 propTypes_exports = {};
|
|
29
|
-
__export(propTypes_exports, {
|
|
30
|
-
propTypes: () => propTypes
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_react_desc = __toESM(require("react-desc"));
|
|
34
|
-
var import_utils = __toESM(require("./utils"));
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var reactDesc = require('react-desc');
|
|
6
|
+
var utils = require('./utils.js');
|
|
7
|
+
|
|
8
|
+
/* eslint-disable max-len */
|
|
35
9
|
const propTypes = {
|
|
36
|
-
isOpen:
|
|
37
|
-
children:
|
|
38
|
-
centered:
|
|
39
|
-
size:
|
|
40
|
-
removeAutoFocus:
|
|
41
|
-
onClickOutside:
|
|
42
|
-
})
|
|
10
|
+
isOpen: reactDesc.PropTypes.bool.description('Wether the Dialog is open or not.').defaultValue(false),
|
|
11
|
+
children: reactDesc.PropTypes.node.description('Nested components.').isRequired,
|
|
12
|
+
centered: reactDesc.PropTypes.bool.description('Centers the Dialog.').defaultValue(false),
|
|
13
|
+
size: reactDesc.PropTypes.oneOf(utils.DSDialogSizesArrayValues).description("Dialog's width size.").defaultValue(utils.DSDialogSizes.DEFAULT),
|
|
14
|
+
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
|
+
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(() => {})
|
|
43
16
|
};
|
|
44
|
-
|
|
45
|
-
|
|
17
|
+
|
|
18
|
+
exports.propTypes = propTypes;
|