@elliemae/ds-dialog 2.2.0-next.4 → 2.3.0-alpha.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 +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/propTypes.js
CHANGED
|
@@ -1,31 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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 propTypes_exports = {};
|
|
29
|
+
__export(propTypes_exports, {
|
|
30
|
+
propTypes: () => propTypes
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_react_desc = require("react-desc");
|
|
34
|
+
var import_utils = require("./utils");
|
|
35
|
+
const propTypes = {
|
|
36
|
+
isOpen: import_react_desc.PropTypes.bool.description("Wether the Dialog is open or not.").defaultValue(false),
|
|
37
|
+
children: import_react_desc.PropTypes.node.description("Nested components.").isRequired,
|
|
38
|
+
centered: import_react_desc.PropTypes.bool.description("Centers the Dialog.").defaultValue(false),
|
|
39
|
+
size: import_react_desc.PropTypes.oneOf(import_utils.DSDialogSizesArrayValues).description(`Dialog's width size.`).defaultValue(import_utils.DSDialogSizes.DEFAULT),
|
|
40
|
+
removeAutoFocus: import_react_desc.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),
|
|
41
|
+
onClickOutside: import_react_desc.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(() => {
|
|
42
|
+
})
|
|
43
|
+
};
|
|
44
|
+
module.exports = __toCommonJS(propTypes_exports);
|
|
45
|
+
//# sourceMappingURL=propTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/propTypes.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-len */\nimport { PropTypes } from 'react-desc';\nimport { DSDialogSizes, DSDialogSizesArrayValues } from './utils';\n\nexport const propTypes = {\n isOpen: PropTypes.bool.description('Wether the Dialog is open or not.').defaultValue(false),\n children: PropTypes.node.description('Nested components.').isRequired,\n centered: PropTypes.bool.description('Centers the Dialog.').defaultValue(false),\n size: PropTypes.oneOf(DSDialogSizesArrayValues)\n .description(`Dialog's width size.`)\n .defaultValue(DSDialogSizes.DEFAULT),\n removeAutoFocus: PropTypes.bool\n .description(\n '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.',\n )\n .defaultValue(false),\n onClickOutside: PropTypes.func\n .description(\n '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.',\n )\n .defaultValue(() => {}),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,wBAA0B;AAC1B,mBAAwD;AAEjD,MAAM,YAAY;AAAA,EACvB,QAAQ,4BAAU,KAAK,YAAY,qCAAqC,aAAa;AAAA,EACrF,UAAU,4BAAU,KAAK,YAAY,sBAAsB;AAAA,EAC3D,UAAU,4BAAU,KAAK,YAAY,uBAAuB,aAAa;AAAA,EACzE,MAAM,4BAAU,MAAM,uCACnB,YAAY,wBACZ,aAAa,2BAAc;AAAA,EAC9B,iBAAiB,4BAAU,KACxB,YACC,yIAED,aAAa;AAAA,EAChB,gBAAgB,4BAAU,KACvB,YACC,0JAED,aAAa,MAAM;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/cjs/styles.js
CHANGED
|
@@ -1,121 +1,151 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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 styles_exports = {};
|
|
29
|
+
__export(styles_exports, {
|
|
30
|
+
DSDialogAddon: () => DSDialogAddon,
|
|
31
|
+
DSDialogBody: () => DSDialogBody,
|
|
32
|
+
DSDialogDefaultLayout: () => DSDialogDefaultLayout,
|
|
33
|
+
DSDialogFooter: () => DSDialogFooter,
|
|
34
|
+
DSDialogHeader: () => DSDialogHeader,
|
|
35
|
+
DSDialogPrimaryMessage: () => DSDialogPrimaryMessage,
|
|
36
|
+
DSDialogSecondaryMessage: () => DSDialogSecondaryMessage,
|
|
37
|
+
DSDialogSeparator: () => DSDialogSeparator,
|
|
38
|
+
DSDialogTitle: () => DSDialogTitle,
|
|
39
|
+
FixedBody: () => FixedBody,
|
|
40
|
+
StyledDialogBackground: () => StyledDialogBackground,
|
|
41
|
+
StyledDialogContainer: () => StyledDialogContainer
|
|
20
42
|
});
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
43
|
+
var React = __toESM(require("react"));
|
|
44
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
45
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
46
|
+
var import_styled_components2 = require("@xstyled/styled-components");
|
|
47
|
+
var import_utils = require("./utils");
|
|
48
|
+
const FixedBody = import_ds_system.createGlobalStyle`
|
|
49
|
+
body {
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
|
|
52
|
+
${({ bodyInfo }) => bodyInfo.overflow ? `padding-right: calc( ${bodyInfo.padding} + 15px ) !important;` : ``}
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
const StyledDialogBackground = import_styled_components.default.div`
|
|
56
|
+
position: fixed;
|
|
57
|
+
top: 0;
|
|
58
|
+
bottom: 0;
|
|
59
|
+
width: 100%;
|
|
60
|
+
height: 100%;
|
|
61
|
+
background: rgba(37, 41, 47, 50%);
|
|
62
|
+
overflow-y: auto;
|
|
63
|
+
z-index: ${({ zIndex }) => zIndex};
|
|
64
|
+
`;
|
|
65
|
+
const StyledDialogContainer = import_styled_components.default.div`
|
|
66
|
+
height: fit-content;
|
|
67
|
+
position: absolute;
|
|
68
|
+
top: 0;
|
|
69
|
+
bottom: 0;
|
|
70
|
+
left: 0;
|
|
71
|
+
right: 0;
|
|
72
|
+
margin: ${({ centered }) => centered ? "auto" : "20vh auto auto auto"};
|
|
73
|
+
width: ${({ size }) => import_utils.allSizes[size]};
|
|
74
|
+
min-width: 300px;
|
|
75
|
+
box-shadow: 0 10px 20px 0 ${({ theme }) => theme.colors.neutral[500]};
|
|
76
|
+
background: ${({ theme }) => theme.colors.neutral["000"]};
|
|
77
|
+
overflow-y: auto;
|
|
78
|
+
${import_styled_components2.space}
|
|
79
|
+
&:focus {
|
|
80
|
+
outline: none;
|
|
81
|
+
}
|
|
82
|
+
`;
|
|
83
|
+
const DSDialogTitle = import_styled_components.default.h3`
|
|
84
|
+
font-size: ${({ theme }) => theme.fontSizes.title[700]};
|
|
85
|
+
display: -webkit-box;
|
|
86
|
+
-webkit-line-clamp: 2;
|
|
87
|
+
-webkit-box-orient: vertical;
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
margin: 0;
|
|
90
|
+
`;
|
|
91
|
+
const DSDialogAddon = import_styled_components.default.div``;
|
|
92
|
+
const DSDialogHeader = import_styled_components.default.div`
|
|
93
|
+
display: grid;
|
|
94
|
+
align-items: center;
|
|
95
|
+
grid-auto-flow: column;
|
|
96
|
+
min-height: ${({ theme }) => theme.space.m};
|
|
97
|
+
padding: 10px ${({ theme }) => theme.space.xs};
|
|
98
|
+
& ${DSDialogTitle} + ${DSDialogAddon} {
|
|
99
|
+
align-self: flex-start;
|
|
100
|
+
justify-self: flex-end;
|
|
101
|
+
}
|
|
102
|
+
& ${DSDialogAddon}:only-child {
|
|
103
|
+
justify-self: flex-end;
|
|
104
|
+
}
|
|
105
|
+
${import_styled_components2.space}
|
|
106
|
+
`;
|
|
107
|
+
const DSDialogSeparator = import_styled_components.default.hr.attrs(() => ({ "aria-hidden": true }))`
|
|
108
|
+
margin: 0;
|
|
109
|
+
border-top: 1px solid ${({ theme }) => theme.colors.neutral["080"]};
|
|
110
|
+
`;
|
|
111
|
+
const DSDialogBody = import_styled_components.default.div`
|
|
112
|
+
padding: ${({ theme }) => theme.space.xs};
|
|
113
|
+
overflow-y: auto;
|
|
114
|
+
|
|
115
|
+
${import_styled_components2.layout}
|
|
116
|
+
${import_styled_components2.space}
|
|
117
|
+
${import_styled_components2.flexboxes}
|
|
118
|
+
${import_styled_components2.sizing}
|
|
119
|
+
`;
|
|
120
|
+
const DSDialogPrimaryMessage = import_styled_components.default.h3`
|
|
121
|
+
margin: 0;
|
|
122
|
+
`;
|
|
123
|
+
const DSDialogSecondaryMessage = import_styled_components.default.p`
|
|
124
|
+
margin: 0;
|
|
125
|
+
color: ${({ theme }) => theme.colors.neutral[500]};
|
|
126
|
+
`;
|
|
127
|
+
const DSDialogDefaultLayout = import_styled_components.default.div`
|
|
128
|
+
display: grid;
|
|
129
|
+
grid-auto-flow: row;
|
|
130
|
+
justify-items: center;
|
|
131
|
+
align-items: center;
|
|
132
|
+
grid-gap: ${({ theme }) => theme.space.xxs};
|
|
109
133
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
134
|
+
${DSDialogSecondaryMessage} {
|
|
135
|
+
text-align: center;
|
|
136
|
+
}
|
|
137
|
+
`;
|
|
138
|
+
const DSDialogFooter = import_styled_components.default.div`
|
|
139
|
+
display: grid;
|
|
140
|
+
grid-auto-flow: column;
|
|
141
|
+
align-items: center;
|
|
142
|
+
justify-content: flex-end;
|
|
143
|
+
grid-gap: ${({ theme }) => theme.space.xxs};
|
|
144
|
+
min-height: ${({ theme }) => theme.space.m};
|
|
145
|
+
padding: 0 ${({ theme }) => theme.space.xs};
|
|
146
|
+
${import_styled_components2.space}
|
|
147
|
+
${import_styled_components2.flexboxes}
|
|
148
|
+
${import_styled_components2.sizing}
|
|
149
|
+
`;
|
|
150
|
+
module.exports = __toCommonJS(styles_exports);
|
|
151
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/styles.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\nimport styled from 'styled-components';\nimport { createGlobalStyle } from '@elliemae/ds-system';\nimport { space, flexboxes, layout, sizing } from '@xstyled/styled-components';\nimport { allSizes } from './utils';\nimport type {\n StyledDialogContainerPropsT,\n StyledDialogFixedBodyPropsT,\n StyledDialogBackgroundPropsT,\n} from './DSDialogInternalTypes';\n\nexport const FixedBody = createGlobalStyle<StyledDialogFixedBodyPropsT>`\n body {\n overflow: hidden;\n \n ${({ bodyInfo }) => (bodyInfo.overflow ? `padding-right: calc( ${bodyInfo.padding} + 15px ) !important;` : ``)}\n }\n`;\n\nexport const StyledDialogBackground = styled.div<StyledDialogBackgroundPropsT>`\n position: fixed;\n top: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n background: rgba(37, 41, 47, 50%);\n overflow-y: auto;\n z-index: ${({ zIndex }) => zIndex};\n`;\n\nexport const StyledDialogContainer = styled.div<StyledDialogContainerPropsT>`\n height: fit-content;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: ${({ centered }) => (centered ? 'auto' : '20vh auto auto auto')};\n width: ${({ size }) => allSizes[size]};\n min-width: 300px;\n box-shadow: 0 10px 20px 0 ${({ theme }) => theme.colors.neutral[500]};\n background: ${({ theme }) => theme.colors.neutral['000']};\n overflow-y: auto;\n ${space}\n &:focus {\n outline: none;\n }\n`;\n\nexport const DSDialogTitle = styled.h3`\n font-size: ${({ theme }) => theme.fontSizes.title[700]};\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n margin: 0;\n`;\n\nexport const DSDialogAddon = styled.div``;\n\nexport const DSDialogHeader = styled.div`\n display: grid;\n align-items: center;\n grid-auto-flow: column;\n min-height: ${({ theme }) => theme.space.m};\n padding: 10px ${({ theme }) => theme.space.xs};\n & ${DSDialogTitle} + ${DSDialogAddon} {\n align-self: flex-start;\n justify-self: flex-end;\n }\n & ${DSDialogAddon}:only-child {\n justify-self: flex-end;\n }\n ${space}\n`;\n\nexport const DSDialogSeparator = styled.hr.attrs(() => ({ 'aria-hidden': true }))`\n margin: 0;\n border-top: 1px solid ${({ theme }) => theme.colors.neutral['080']};\n`;\n\nexport const DSDialogBody = styled.div`\n padding: ${({ theme }) => theme.space.xs};\n overflow-y: auto;\n\n ${layout}\n ${space}\n ${flexboxes}\n ${sizing}\n`;\n\nexport const DSDialogPrimaryMessage = styled.h3`\n margin: 0;\n`;\n\nexport const DSDialogSecondaryMessage = styled.p`\n margin: 0;\n color: ${({ theme }) => theme.colors.neutral[500]};\n`;\n\nexport const DSDialogDefaultLayout = styled.div`\n display: grid;\n grid-auto-flow: row;\n justify-items: center;\n align-items: center;\n grid-gap: ${({ theme }) => theme.space.xxs};\n\n ${DSDialogSecondaryMessage} {\n text-align: center;\n }\n`;\n\nexport const DSDialogFooter = styled.div`\n display: grid;\n grid-auto-flow: column;\n align-items: center;\n justify-content: flex-end;\n grid-gap: ${({ theme }) => theme.space.xxs};\n min-height: ${({ theme }) => theme.space.m};\n padding: 0 ${({ theme }) => theme.space.xs};\n ${space}\n ${flexboxes}\n ${sizing}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,+BAAmB;AACnB,uBAAkC;AAClC,gCAAiD;AACjD,mBAAyB;AAOlB,MAAM,YAAY;AAAA;AAAA;AAAA;AAAA,MAInB,CAAC,EAAE,eAAgB,SAAS,WAAW,wBAAwB,SAAS,iCAAiC;AAAA;AAAA;AAIxG,MAAM,yBAAyB,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAQhC,CAAC,EAAE,aAAa;AAAA;AAGtB,MAAM,wBAAwB,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAOhC,CAAC,EAAE,eAAgB,WAAW,SAAS;AAAA,WACxC,CAAC,EAAE,WAAW,sBAAS;AAAA;AAAA,8BAEJ,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA,gBAClD,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA,IAEhD;AAAA;AAAA;AAAA;AAAA;AAMG,MAAM,gBAAgB,iCAAO;AAAA,eACrB,CAAC,EAAE,YAAY,MAAM,UAAU,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQ7C,MAAM,gBAAgB,iCAAO;AAE7B,MAAM,iBAAiB,iCAAO;AAAA;AAAA;AAAA;AAAA,gBAIrB,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,kBACzB,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,MACvC,mBAAmB;AAAA;AAAA;AAAA;AAAA,MAInB;AAAA;AAAA;AAAA,IAGF;AAAA;AAGG,MAAM,oBAAoB,iCAAO,GAAG,MAAM,MAAO,GAAE,eAAe;AAAA;AAAA,0BAE/C,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAGvD,MAAM,eAAe,iCAAO;AAAA,aACtB,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA;AAAA;AAAA,IAGpC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGG,MAAM,yBAAyB,iCAAO;AAAA;AAAA;AAItC,MAAM,2BAA2B,iCAAO;AAAA;AAAA,WAEpC,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAGxC,MAAM,wBAAwB,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA,cAK9B,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA;AAAA,IAErC;AAAA;AAAA;AAAA;AAKG,MAAM,iBAAiB,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA,cAKvB,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,gBACzB,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,eAC5B,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,IACtC;AAAA,IACA;AAAA,IACA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/cjs/utils.js
CHANGED
|
@@ -1,35 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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 utils_exports = {};
|
|
29
|
+
__export(utils_exports, {
|
|
30
|
+
DSDialogSizes: () => DSDialogSizes,
|
|
31
|
+
DSDialogSizesArrayValues: () => DSDialogSizesArrayValues,
|
|
32
|
+
allSizes: () => allSizes,
|
|
33
|
+
getSpaceProps: () => getSpaceProps
|
|
34
|
+
});
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
const getSpaceProps = (props) => Object.fromEntries(Object.entries(props).filter(([key]) => /^[pm][xytblr]?$/.exec(key)));
|
|
14
37
|
const DSDialogSizes = {
|
|
15
|
-
DEFAULT:
|
|
16
|
-
SMALL:
|
|
17
|
-
MEDIUM:
|
|
18
|
-
LARGE:
|
|
19
|
-
XLARGE:
|
|
20
|
-
XXLARGE:
|
|
38
|
+
DEFAULT: "default",
|
|
39
|
+
SMALL: "small",
|
|
40
|
+
MEDIUM: "medium",
|
|
41
|
+
LARGE: "large",
|
|
42
|
+
XLARGE: "x-large",
|
|
43
|
+
XXLARGE: "xx-large"
|
|
21
44
|
};
|
|
22
45
|
const DSDialogSizesArrayValues = Object.values(DSDialogSizes);
|
|
23
46
|
const allSizes = {
|
|
24
|
-
default:
|
|
25
|
-
small:
|
|
26
|
-
medium:
|
|
27
|
-
large:
|
|
28
|
-
|
|
29
|
-
|
|
47
|
+
default: "576px",
|
|
48
|
+
small: "320px",
|
|
49
|
+
medium: "656px",
|
|
50
|
+
large: "848px",
|
|
51
|
+
"x-large": "1042px",
|
|
52
|
+
"xx-large": "1440px"
|
|
30
53
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
exports.DSDialogSizesArrayValues = DSDialogSizesArrayValues;
|
|
34
|
-
exports.allSizes = allSizes;
|
|
35
|
-
exports.getSpaceProps = getSpaceProps;
|
|
54
|
+
module.exports = __toCommonJS(utils_exports);
|
|
55
|
+
//# sourceMappingURL=utils.js.map
|
package/cjs/utils.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import type { GetSpaceArgsT } from './DSDialogInternalTypes';\n\nexport const getSpaceProps = (props: GetSpaceArgsT): GetSpaceArgsT =>\n Object.fromEntries(Object.entries(props).filter(([key]) => /^[pm][xytblr]?$/.exec(key)));\n\nexport const DSDialogSizes = {\n DEFAULT: 'default',\n SMALL: 'small',\n MEDIUM: 'medium',\n LARGE: 'large',\n XLARGE: 'x-large',\n XXLARGE: 'xx-large',\n} as const;\n\nexport const DSDialogSizesArrayValues = Object.values(DSDialogSizes);\n\nexport const allSizes = {\n default: '576px',\n small: '320px',\n medium: '656px',\n large: '848px',\n 'x-large': '1042px',\n 'xx-large': '1440px',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEhB,MAAM,gBAAgB,CAAC,UAC5B,OAAO,YAAY,OAAO,QAAQ,OAAO,OAAO,CAAC,CAAC,SAAS,kBAAkB,KAAK;AAE7E,MAAM,gBAAgB;AAAA,EAC3B,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA;AAGJ,MAAM,2BAA2B,OAAO,OAAO;AAE/C,MAAM,WAAW;AAAA,EACtB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|