@elliemae/ds-dialog 2.2.0-next.6 → 2.3.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/DSDialog.js +88 -102
- package/cjs/DSDialog.js.map +7 -0
- package/cjs/DSDialogDatatestid.js +36 -8
- package/cjs/DSDialogDatatestid.js.map +7 -0
- package/cjs/DSDialogInternalTypes.js +27 -0
- package/cjs/DSDialogInternalTypes.js.map +7 -0
- package/cjs/DSDialogTypes.js +27 -2
- package/cjs/DSDialogTypes.js.map +7 -0
- package/cjs/defaultProps.js +38 -11
- package/cjs/defaultProps.js.map +7 -0
- package/cjs/index.js +47 -70
- package/cjs/index.js.map +7 -0
- package/cjs/propTypes.js +45 -31
- package/cjs/propTypes.js.map +7 -0
- package/cjs/styles.js +149 -119
- package/cjs/styles.js.map +7 -0
- package/cjs/utils.js +50 -30
- package/cjs/utils.js.map +7 -0
- package/esm/DSDialog.js +51 -82
- package/esm/DSDialog.js.map +7 -0
- package/esm/DSDialogDatatestid.js +7 -4
- package/esm/DSDialogDatatestid.js.map +7 -0
- package/esm/DSDialogInternalTypes.js +2 -0
- package/esm/DSDialogInternalTypes.js.map +7 -0
- package/esm/DSDialogTypes.js +2 -1
- package/esm/DSDialogTypes.js.map +7 -0
- package/esm/defaultProps.js +8 -6
- package/esm/defaultProps.js.map +7 -0
- package/esm/index.js +28 -46
- package/esm/index.js.map +7 -0
- package/esm/propTypes.js +16 -23
- package/esm/propTypes.js.map +7 -0
- package/esm/styles.js +120 -99
- package/esm/styles.js.map +7 -0
- package/esm/utils.js +21 -23
- package/esm/utils.js.map +7 -0
- package/package.json +6 -6
- package/types/DSDialog.d.ts +4 -2167
- package/types/DSDialogInternalTypes.d.ts +25 -0
- package/types/DSDialogTypes.d.ts +1 -0
- package/types/index.d.ts +1 -148
- package/types/propTypes.d.ts +3 -2166
- package/types/styles.d.ts +13 -13
- package/cjs/DSDialogInternalTypes.d.js +0 -2
- package/esm/DSDialogInternalTypes.d.js +0 -1
package/cjs/DSDialog.js
CHANGED
|
@@ -1,112 +1,98 @@
|
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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();
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var DSDialog_exports = {};
|
|
29
|
+
__export(DSDialog_exports, {
|
|
30
|
+
DSDialog: () => DSDialog,
|
|
31
|
+
DSDialogWithSchema: () => DSDialogWithSchema
|
|
32
|
+
});
|
|
33
|
+
var React = __toESM(require("react"));
|
|
34
|
+
var import_react_dom = __toESM(require("react-dom"));
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_react_desc = require("react-desc");
|
|
37
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
|
+
var import_styles = require("./styles");
|
|
39
|
+
var import_propTypes = require("./propTypes");
|
|
40
|
+
var import_defaultProps = require("./defaultProps");
|
|
41
|
+
var import_utils = require("./utils");
|
|
42
|
+
var import_DSDialogDatatestid = require("./DSDialogDatatestid");
|
|
43
|
+
const DSDialog = (props) => {
|
|
44
|
+
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_defaultProps.defaultProps);
|
|
45
|
+
const [bodyInfo, setBodyInfo] = (0, import_react.useState)({ overflow: false, padding: "0px" });
|
|
46
|
+
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_propTypes.propTypes);
|
|
47
|
+
const { children, isOpen, onClickOutside, centered, size, removeAutoFocus, zIndex, ...rest } = propsWithDefault;
|
|
48
|
+
const containerRef = (0, import_react.useRef)(null);
|
|
49
|
+
const handleOutsideClick = (0, import_react.useCallback)((e) => {
|
|
50
|
+
if (e.target.dataset.portalbg)
|
|
51
|
+
onClickOutside();
|
|
59
52
|
}, [onClickOutside]);
|
|
60
|
-
const handleOnKeyDown =
|
|
61
|
-
if (e.key ===
|
|
53
|
+
const handleOnKeyDown = (0, import_react.useCallback)((e) => {
|
|
54
|
+
if (e.key === "Escape")
|
|
55
|
+
onClickOutside();
|
|
62
56
|
}, [onClickOutside]);
|
|
63
|
-
|
|
64
|
-
const body = document.getElementsByTagName(
|
|
65
|
-
const {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
57
|
+
(0, import_react.useEffect)(() => {
|
|
58
|
+
const body = document.getElementsByTagName("body")[0];
|
|
59
|
+
const { offsetHeight, scrollHeight } = body;
|
|
60
|
+
const padding = window.getComputedStyle(body, null)?.getPropertyValue("padding-right");
|
|
61
|
+
if (!isOpen)
|
|
62
|
+
return setBodyInfo({ overflow: false, padding: "0px" });
|
|
63
|
+
return setBodyInfo({
|
|
64
|
+
overflow: offsetHeight < scrollHeight,
|
|
65
|
+
padding
|
|
66
|
+
});
|
|
71
67
|
}, [isOpen]);
|
|
72
|
-
|
|
73
|
-
|
|
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();
|
|
68
|
+
(0, import_react.useEffect)(() => {
|
|
69
|
+
if (isOpen && !removeAutoFocus)
|
|
70
|
+
containerRef?.current?.focus();
|
|
76
71
|
}, [isOpen, removeAutoFocus]);
|
|
77
|
-
const globalAttributes = dsPropsHelpers.useGetGlobalAttributes(propsWithDefault, {
|
|
78
|
-
onClick: handleOutsideClick
|
|
79
|
-
});
|
|
80
|
-
|
|
81
72
|
if (isOpen) {
|
|
82
|
-
return
|
|
73
|
+
return import_react_dom.default.createPortal(/* @__PURE__ */ import_react.default.createElement(import_styles.StyledDialogBackground, {
|
|
83
74
|
onClick: handleOutsideClick,
|
|
84
75
|
"data-portalbg": true,
|
|
85
|
-
"data-testid":
|
|
86
|
-
zIndex
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
children: children
|
|
101
|
-
}))]
|
|
102
|
-
})), document.getElementsByTagName('body')[0]);
|
|
76
|
+
"data-testid": import_DSDialogDatatestid.DSDialogDatatestid.BACKGROUND,
|
|
77
|
+
zIndex
|
|
78
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_styles.FixedBody, {
|
|
79
|
+
bodyInfo
|
|
80
|
+
}), /* @__PURE__ */ import_react.default.createElement(import_styles.StyledDialogContainer, {
|
|
81
|
+
role: "dialog",
|
|
82
|
+
"aria-modal": true,
|
|
83
|
+
ref: containerRef,
|
|
84
|
+
tabIndex: !removeAutoFocus ? 0 : void 0,
|
|
85
|
+
onKeyDown: handleOnKeyDown,
|
|
86
|
+
...(0, import_utils.getSpaceProps)(rest),
|
|
87
|
+
size,
|
|
88
|
+
centered,
|
|
89
|
+
"data-testid": import_DSDialogDatatestid.DSDialogDatatestid.CONTAINER
|
|
90
|
+
}, children)), document.getElementsByTagName("body")[0]);
|
|
103
91
|
}
|
|
104
|
-
|
|
105
92
|
return null;
|
|
106
93
|
};
|
|
107
|
-
|
|
108
|
-
const DSDialogWithSchema =
|
|
109
|
-
DSDialogWithSchema.propTypes =
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
exports.DSDialogWithSchema = DSDialogWithSchema;
|
|
94
|
+
DSDialog.propTypes = import_propTypes.propTypes;
|
|
95
|
+
const DSDialogWithSchema = (0, import_react_desc.describe)(DSDialog);
|
|
96
|
+
DSDialogWithSchema.propTypes = import_propTypes.propTypes;
|
|
97
|
+
module.exports = __toCommonJS(DSDialog_exports);
|
|
98
|
+
//# sourceMappingURL=DSDialog.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/DSDialog.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import ReactDOM from 'react-dom';\nimport React, { useCallback, useRef, useEffect, useState } from 'react';\nimport { describe } from 'react-desc';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { FixedBody, StyledDialogBackground, StyledDialogContainer } from './styles';\nimport { propTypes } from './propTypes';\nimport { defaultProps } from './defaultProps';\nimport { getSpaceProps } from './utils';\nimport { DSDialogDatatestid } from './DSDialogDatatestid';\nimport type { BodyInfoT, DSDialogPropsWithDefaultT } from './DSDialogInternalTypes';\nimport type { DSDialogPropsT } from './DSDialogTypes';\n\nconst DSDialog = (props: DSDialogPropsT): React.ReactNode => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps) as DSDialogPropsWithDefaultT;\n const [bodyInfo, setBodyInfo] = useState<BodyInfoT>({ overflow: false, padding: '0px' });\n\n useValidateTypescriptPropTypes(propsWithDefault, propTypes);\n\n const { children, isOpen, onClickOutside, centered, size, removeAutoFocus, zIndex, ...rest } = propsWithDefault;\n\n const containerRef = useRef<HTMLDivElement | null>(null);\n\n const handleOutsideClick = useCallback(\n (e: React.MouseEvent) => {\n if ((e.target as HTMLDivElement).dataset.portalbg) onClickOutside();\n },\n [onClickOutside],\n );\n\n const handleOnKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') onClickOutside();\n },\n [onClickOutside],\n );\n\n useEffect(() => {\n const body = document.getElementsByTagName('body')[0];\n const { offsetHeight, scrollHeight } = body;\n const padding = window.getComputedStyle(body, null)?.getPropertyValue('padding-right');\n\n if (!isOpen) return setBodyInfo({ overflow: false, padding: '0px' });\n\n return setBodyInfo({\n overflow: offsetHeight < scrollHeight,\n padding,\n });\n }, [isOpen]);\n\n useEffect(() => {\n if (isOpen && !removeAutoFocus) containerRef?.current?.focus();\n }, [isOpen, removeAutoFocus]);\n\n if (isOpen) {\n return ReactDOM.createPortal(\n <StyledDialogBackground\n onClick={handleOutsideClick}\n data-portalbg\n data-testid={DSDialogDatatestid.BACKGROUND}\n zIndex={zIndex}\n >\n <FixedBody bodyInfo={bodyInfo} />\n <StyledDialogContainer\n role=\"dialog\"\n aria-modal\n ref={containerRef}\n tabIndex={!removeAutoFocus ? 0 : undefined}\n onKeyDown={handleOnKeyDown}\n {...getSpaceProps(rest)}\n size={size}\n centered={centered}\n data-testid={DSDialogDatatestid.CONTAINER}\n >\n {children}\n </StyledDialogContainer>\n </StyledDialogBackground>,\n document.getElementsByTagName('body')[0],\n );\n }\n\n return null;\n};\n\nDSDialog.propTypes = propTypes;\n\nconst DSDialogWithSchema = describe(DSDialog);\nDSDialogWithSchema.propTypes = propTypes;\n\nexport { DSDialog, DSDialogWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAqB;AACrB,mBAAgE;AAChE,wBAAyB;AACzB,8BAA6E;AAC7E,oBAAyE;AACzE,uBAA0B;AAC1B,0BAA6B;AAC7B,mBAA8B;AAC9B,gCAAmC;AAInC,MAAM,WAAW,CAAC,UAA2C;AAC3D,QAAM,mBAAmB,0DAA6B,OAAO;AAC7D,QAAM,CAAC,UAAU,eAAe,2BAAoB,EAAE,UAAU,OAAO,SAAS;AAEhF,8DAA+B,kBAAkB;AAEjD,QAAM,EAAE,UAAU,QAAQ,gBAAgB,UAAU,MAAM,iBAAiB,WAAW,SAAS;AAE/F,QAAM,eAAe,yBAA8B;AAEnD,QAAM,qBAAqB,8BACzB,CAAC,MAAwB;AACvB,QAAK,EAAE,OAA0B,QAAQ;AAAU;AAAA,KAErD,CAAC;AAGH,QAAM,kBAAkB,8BACtB,CAAC,MAA2B;AAC1B,QAAI,EAAE,QAAQ;AAAU;AAAA,KAE1B,CAAC;AAGH,8BAAU,MAAM;AACd,UAAM,OAAO,SAAS,qBAAqB,QAAQ;AACnD,UAAM,EAAE,cAAc,iBAAiB;AACvC,UAAM,UAAU,OAAO,iBAAiB,MAAM,OAAO,iBAAiB;AAEtE,QAAI,CAAC;AAAQ,aAAO,YAAY,EAAE,UAAU,OAAO,SAAS;AAE5D,WAAO,YAAY;AAAA,MACjB,UAAU,eAAe;AAAA,MACzB;AAAA;AAAA,KAED,CAAC;AAEJ,8BAAU,MAAM;AACd,QAAI,UAAU,CAAC;AAAiB,oBAAc,SAAS;AAAA,KACtD,CAAC,QAAQ;AAEZ,MAAI,QAAQ;AACV,WAAO,yBAAS,aACd,mDAAC,sCAAD;AAAA,MACE,SAAS;AAAA,MACT,iBAAa;AAAA,MACb,eAAa,6CAAmB;AAAA,MAChC;AAAA,OAEA,mDAAC,yBAAD;AAAA,MAAW;AAAA,QACX,mDAAC,qCAAD;AAAA,MACE,MAAK;AAAA,MACL,cAAU;AAAA,MACV,KAAK;AAAA,MACL,UAAU,CAAC,kBAAkB,IAAI;AAAA,MACjC,WAAW;AAAA,SACP,gCAAc;AAAA,MAClB;AAAA,MACA;AAAA,MACA,eAAa,6CAAmB;AAAA,OAE/B,YAGL,SAAS,qBAAqB,QAAQ;AAAA;AAI1C,SAAO;AAAA;AAGT,SAAS,YAAY;AAErB,MAAM,qBAAqB,gCAAS;AACpC,mBAAmB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,10 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var DSDialogDatatestid_exports = {};
|
|
29
|
+
__export(DSDialogDatatestid_exports, {
|
|
30
|
+
DSDialogDatatestid: () => DSDialogDatatestid
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
5
33
|
const DSDialogDatatestid = {
|
|
6
|
-
CONTAINER:
|
|
7
|
-
BACKGROUND:
|
|
34
|
+
CONTAINER: "ds-dialog-container",
|
|
35
|
+
BACKGROUND: "ds-dialog-background"
|
|
8
36
|
};
|
|
9
|
-
|
|
10
|
-
|
|
37
|
+
module.exports = __toCommonJS(DSDialogDatatestid_exports);
|
|
38
|
+
//# sourceMappingURL=DSDialogDatatestid.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/DSDialogDatatestid.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export const DSDialogDatatestid = {\n CONTAINER: 'ds-dialog-container',\n BACKGROUND: 'ds-dialog-background',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,qBAAqB;AAAA,EAChC,WAAW;AAAA,EACX,YAAY;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __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_exports = {};
|
|
25
|
+
var React = __toESM(require("react"));
|
|
26
|
+
module.exports = __toCommonJS(DSDialogInternalTypes_exports);
|
|
27
|
+
//# sourceMappingURL=DSDialogInternalTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/DSDialogInternalTypes.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import type { DSDialogPropsT, Sizes } from './DSDialogTypes';\n\nexport interface BodyInfoT {\n overflow: boolean;\n padding: string;\n}\n\nexport interface DSDialogDefaultPropsT {\n isOpen: boolean;\n centered: boolean;\n size: Sizes;\n removeAutoFocus: boolean;\n onClickOutside: () => void;\n zIndex: number;\n}\n\nexport interface StyledDialogContainerPropsT {\n size: Sizes;\n centered: boolean;\n}\n\nexport interface StyledDialogFixedBodyPropsT {\n bodyInfo: BodyInfoT;\n}\n\nexport interface StyledDialogBackgroundPropsT {\n zIndex: number;\n}\n\nexport type DSDialogPropsWithDefaultT = Required<DSDialogPropsT>;\n\nexport type GetSpaceArgsT = Partial<Record<string, string | number>>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/cjs/DSDialogTypes.js
CHANGED
|
@@ -1,2 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __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
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/DSDialogTypes.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export type Sizes = 'default' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large';\n\nexport interface DSDialogPropsT {\n isOpen?: boolean;\n children: React.ReactNode;\n onClickOutside?: () => void;\n size?: Sizes;\n centered?: boolean;\n removeAutoFocus?: boolean;\n zIndex?: number;\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/cjs/defaultProps.js
CHANGED
|
@@ -1,18 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var defaultProps_exports = {};
|
|
29
|
+
__export(defaultProps_exports, {
|
|
30
|
+
defaultProps: () => defaultProps
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_utils = require("./utils");
|
|
34
|
+
const noop = () => {
|
|
35
|
+
};
|
|
9
36
|
const defaultProps = {
|
|
10
37
|
isOpen: false,
|
|
11
38
|
centered: false,
|
|
12
|
-
size:
|
|
39
|
+
size: import_utils.DSDialogSizes.DEFAULT,
|
|
13
40
|
removeAutoFocus: false,
|
|
14
41
|
onClickOutside: noop,
|
|
15
42
|
zIndex: 10
|
|
16
43
|
};
|
|
17
|
-
|
|
18
|
-
|
|
44
|
+
module.exports = __toCommonJS(defaultProps_exports);
|
|
45
|
+
//# sourceMappingURL=defaultProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/defaultProps.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { DSDialogSizes } from './utils';\nimport type { DSDialogDefaultPropsT } from './DSDialogInternalTypes';\n\nconst noop = () => {};\n\nexport const defaultProps: DSDialogDefaultPropsT = {\n isOpen: false,\n centered: false,\n size: DSDialogSizes.DEFAULT,\n removeAutoFocus: false,\n onClickOutside: noop,\n zIndex: 10,\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA8B;AAG9B,MAAM,OAAO,MAAM;AAAA;AAEZ,MAAM,eAAsC;AAAA,EACjD,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM,2BAAc;AAAA,EACpB,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,QAAQ;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/cjs/index.js
CHANGED
|
@@ -1,70 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
exports.DSDialogAddon = styles.DSDialogAddon;
|
|
50
|
-
exports.DSDialogBody = styles.DSDialogBody;
|
|
51
|
-
exports.DSDialogDefaultLayout = styles.DSDialogDefaultLayout;
|
|
52
|
-
exports.DSDialogFooter = styles.DSDialogFooter;
|
|
53
|
-
exports.DSDialogHeader = styles.DSDialogHeader;
|
|
54
|
-
exports.DSDialogPrimaryMessage = styles.DSDialogPrimaryMessage;
|
|
55
|
-
exports.DSDialogSecondaryMessage = styles.DSDialogSecondaryMessage;
|
|
56
|
-
exports.DSDialogSeparator = styles.DSDialogSeparator;
|
|
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;
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var 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, require("./DSDialog"));
|
|
43
|
+
__reExport(src_exports, require("./DSDialogDatatestid"));
|
|
44
|
+
var import_utils = require("./utils");
|
|
45
|
+
var import_styles = require("./styles");
|
|
46
|
+
module.exports = __toCommonJS(src_exports);
|
|
47
|
+
//# sourceMappingURL=index.js.map
|
package/cjs/index.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export * from './DSDialog';\nexport * from './DSDialogDatatestid';\nexport { DSDialogSizes } from './utils';\n\nexport {\n DSDialogBody,\n DSDialogHeader,\n DSDialogFooter,\n DSDialogSeparator,\n DSDialogTitle,\n DSDialogAddon,\n DSDialogDefaultLayout,\n DSDialogPrimaryMessage,\n DSDialogSecondaryMessage,\n} from './styles';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc;AACd,wBAAc;AACd,mBAA8B;AAE9B,oBAUO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|