@elliemae/ds-dialog 2.0.0-rc.12 → 2.0.0-rc.16
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 +19 -6
- package/cjs/styles.js +36 -31
- package/esm/DSDialog.js +17 -4
- package/esm/styles.js +36 -31
- package/package.json +3 -3
package/cjs/DSDialog.js
CHANGED
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
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');
|
|
5
9
|
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
10
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
11
|
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
12
|
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
13
|
require('core-js/modules/esnext.iterator.for-each.js');
|
|
10
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
11
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
12
|
-
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
13
14
|
var ReactDOM = require('react-dom');
|
|
14
15
|
var react = require('react');
|
|
15
16
|
var reactDesc = require('react-desc');
|
|
@@ -28,8 +29,6 @@ var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
|
28
29
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
29
30
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
30
31
|
|
|
31
|
-
var _FixedBody;
|
|
32
|
-
|
|
33
32
|
const _excluded = ["children", "isOpen", "onClickOutside", "centered", "size", "removeAutoFocus", "zIndex"];
|
|
34
33
|
|
|
35
34
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -37,7 +36,10 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
37
36
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
38
37
|
|
|
39
38
|
const DSDialog = props => {
|
|
39
|
+
var _FixedBody;
|
|
40
|
+
|
|
40
41
|
const propsWithDefault = dsPropsHelpers.useMemoMergePropsWithDefault(props, defaultProps.defaultProps);
|
|
42
|
+
const [isBodyOverflow, setIsBodyOverflow] = react.useState(false);
|
|
41
43
|
dsPropsHelpers.useValidateTypescriptPropTypes(propsWithDefault, propTypes.propTypes);
|
|
42
44
|
|
|
43
45
|
const {
|
|
@@ -58,6 +60,15 @@ const DSDialog = props => {
|
|
|
58
60
|
const handleOnKeyDown = react.useCallback(e => {
|
|
59
61
|
if (e.key === 'Escape') onClickOutside();
|
|
60
62
|
}, [onClickOutside]);
|
|
63
|
+
react.useEffect(() => {
|
|
64
|
+
const body = document.getElementsByTagName('body')[0];
|
|
65
|
+
const {
|
|
66
|
+
offsetHeight,
|
|
67
|
+
scrollHeight
|
|
68
|
+
} = body;
|
|
69
|
+
if (!isOpen) return setIsBodyOverflow(false);
|
|
70
|
+
return setIsBodyOverflow(offsetHeight < scrollHeight);
|
|
71
|
+
}, [isOpen]);
|
|
61
72
|
react.useEffect(() => {
|
|
62
73
|
var _containerRef$current;
|
|
63
74
|
|
|
@@ -70,7 +81,9 @@ const DSDialog = props => {
|
|
|
70
81
|
"data-portalbg": true,
|
|
71
82
|
"data-testid": DSDialogDatatestid.DSDialogDatatestid.BACKGROUND,
|
|
72
83
|
zIndex: zIndex
|
|
73
|
-
}, void 0, _FixedBody || (_FixedBody = /*#__PURE__*/_jsx__default["default"](styles.FixedBody, {
|
|
84
|
+
}, void 0, _FixedBody || (_FixedBody = /*#__PURE__*/_jsx__default["default"](styles.FixedBody, {
|
|
85
|
+
isBodyOverflow: isBodyOverflow
|
|
86
|
+
})), /*#__PURE__*/jsxRuntime.jsx(styles.StyledDialogContainer, _objectSpread(_objectSpread({
|
|
74
87
|
role: "dialog",
|
|
75
88
|
"aria-modal": true,
|
|
76
89
|
ref: containerRef,
|
package/cjs/styles.js
CHANGED
|
@@ -14,44 +14,49 @@ var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_tagged
|
|
|
14
14
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
15
15
|
|
|
16
16
|
var _templateObject;
|
|
17
|
-
const FixedBody = dsSystem.createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n body {\n overflow: hidden;\n }\n"]))
|
|
17
|
+
const FixedBody = dsSystem.createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n body {\n overflow: hidden;\n \n ", "\n }\n"])), _ref => {
|
|
18
|
+
let {
|
|
19
|
+
isBodyOverflow
|
|
20
|
+
} = _ref;
|
|
21
|
+
return isBodyOverflow ? "padding-right: 15px !important;" : "";
|
|
22
|
+
});
|
|
18
23
|
const StyledDialogBackground = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
19
24
|
componentId: "sc-106vqwv-0"
|
|
20
|
-
})(["position:fixed;top:0;bottom:0;width:100%;height:100%;background:rgba(37,41,47,50%);overflow-y:auto;z-index:", ";"],
|
|
25
|
+
})(["position:fixed;top:0;bottom:0;width:100%;height:100%;background:rgba(37,41,47,50%);overflow-y:auto;z-index:", ";"], _ref2 => {
|
|
21
26
|
let {
|
|
22
27
|
zIndex
|
|
23
|
-
} =
|
|
28
|
+
} = _ref2;
|
|
24
29
|
return zIndex;
|
|
25
30
|
});
|
|
26
31
|
const StyledDialogContainer = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
27
32
|
componentId: "sc-106vqwv-1"
|
|
28
|
-
})(["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;}"],
|
|
33
|
+
})(["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 => {
|
|
29
34
|
let {
|
|
30
35
|
centered
|
|
31
|
-
} =
|
|
36
|
+
} = _ref3;
|
|
32
37
|
return centered ? 'auto' : '20vh auto auto auto';
|
|
33
|
-
},
|
|
38
|
+
}, _ref4 => {
|
|
34
39
|
let {
|
|
35
40
|
size
|
|
36
|
-
} =
|
|
41
|
+
} = _ref4;
|
|
37
42
|
return utils.allSizes[size];
|
|
38
|
-
},
|
|
43
|
+
}, _ref5 => {
|
|
39
44
|
let {
|
|
40
45
|
theme
|
|
41
|
-
} =
|
|
46
|
+
} = _ref5;
|
|
42
47
|
return theme.colors.neutral[500];
|
|
43
|
-
},
|
|
48
|
+
}, _ref6 => {
|
|
44
49
|
let {
|
|
45
50
|
theme
|
|
46
|
-
} =
|
|
51
|
+
} = _ref6;
|
|
47
52
|
return theme.colors.neutral['000'];
|
|
48
53
|
}, styledSystem.space);
|
|
49
54
|
const DSDialogTitle = /*#__PURE__*/styled__default["default"].h3.withConfig({
|
|
50
55
|
componentId: "sc-106vqwv-2"
|
|
51
|
-
})(["font-size:", ";display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0;"],
|
|
56
|
+
})(["font-size:", ";display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0;"], _ref7 => {
|
|
52
57
|
let {
|
|
53
58
|
theme
|
|
54
|
-
} =
|
|
59
|
+
} = _ref7;
|
|
55
60
|
return theme.fontSizes.title[700];
|
|
56
61
|
});
|
|
57
62
|
const DSDialogAddon = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
@@ -59,33 +64,33 @@ const DSDialogAddon = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
|
59
64
|
})([""]);
|
|
60
65
|
const DSDialogHeader = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
61
66
|
componentId: "sc-106vqwv-4"
|
|
62
|
-
})(["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;}", ""],
|
|
67
|
+
})(["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 => {
|
|
63
68
|
let {
|
|
64
69
|
theme
|
|
65
|
-
} =
|
|
70
|
+
} = _ref8;
|
|
66
71
|
return theme.space.m;
|
|
67
|
-
},
|
|
72
|
+
}, _ref9 => {
|
|
68
73
|
let {
|
|
69
74
|
theme
|
|
70
|
-
} =
|
|
75
|
+
} = _ref9;
|
|
71
76
|
return theme.space.xs;
|
|
72
77
|
}, DSDialogTitle, DSDialogAddon, DSDialogAddon, styledSystem.space);
|
|
73
78
|
const DSDialogSeparator = /*#__PURE__*/styled__default["default"].hr.attrs(() => ({
|
|
74
79
|
'aria-hidden': true
|
|
75
80
|
})).withConfig({
|
|
76
81
|
componentId: "sc-106vqwv-5"
|
|
77
|
-
})(["margin:0;border-top:1px solid ", ";"],
|
|
82
|
+
})(["margin:0;border-top:1px solid ", ";"], _ref10 => {
|
|
78
83
|
let {
|
|
79
84
|
theme
|
|
80
|
-
} =
|
|
85
|
+
} = _ref10;
|
|
81
86
|
return theme.colors.neutral['080'];
|
|
82
87
|
});
|
|
83
88
|
const DSDialogBody = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
84
89
|
componentId: "sc-106vqwv-6"
|
|
85
|
-
})(["padding:", ";overflow-y:auto;", " ", " ", ""],
|
|
90
|
+
})(["padding:", ";overflow-y:auto;", " ", " ", ""], _ref11 => {
|
|
86
91
|
let {
|
|
87
92
|
theme
|
|
88
|
-
} =
|
|
93
|
+
} = _ref11;
|
|
89
94
|
return theme.space.xs;
|
|
90
95
|
}, styledSystem.layout, styledSystem.space, styledSystem.flexbox);
|
|
91
96
|
const DSDialogPrimaryMessage = /*#__PURE__*/styled__default["default"].h3.withConfig({
|
|
@@ -93,36 +98,36 @@ const DSDialogPrimaryMessage = /*#__PURE__*/styled__default["default"].h3.withCo
|
|
|
93
98
|
})(["margin:0;"]);
|
|
94
99
|
const DSDialogSecondaryMessage = /*#__PURE__*/styled__default["default"].p.withConfig({
|
|
95
100
|
componentId: "sc-106vqwv-8"
|
|
96
|
-
})(["margin:0;color:", ";"],
|
|
101
|
+
})(["margin:0;color:", ";"], _ref12 => {
|
|
97
102
|
let {
|
|
98
103
|
theme
|
|
99
|
-
} =
|
|
104
|
+
} = _ref12;
|
|
100
105
|
return theme.colors.neutral[500];
|
|
101
106
|
});
|
|
102
107
|
const DSDialogDefaultLayout = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
103
108
|
componentId: "sc-106vqwv-9"
|
|
104
|
-
})(["display:grid;grid-auto-flow:row;justify-items:center;align-items:center;grid-gap:", ";", "{text-align:center;}"],
|
|
109
|
+
})(["display:grid;grid-auto-flow:row;justify-items:center;align-items:center;grid-gap:", ";", "{text-align:center;}"], _ref13 => {
|
|
105
110
|
let {
|
|
106
111
|
theme
|
|
107
|
-
} =
|
|
112
|
+
} = _ref13;
|
|
108
113
|
return theme.space.xxs;
|
|
109
114
|
}, DSDialogSecondaryMessage);
|
|
110
115
|
const DSDialogFooter = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
111
116
|
componentId: "sc-106vqwv-10"
|
|
112
|
-
})(["display:grid;grid-auto-flow:column;align-items:center;justify-content:flex-end;grid-gap:", ";min-height:", ";padding:0 ", ";", " ", ""],
|
|
117
|
+
})(["display:grid;grid-auto-flow:column;align-items:center;justify-content:flex-end;grid-gap:", ";min-height:", ";padding:0 ", ";", " ", ""], _ref14 => {
|
|
113
118
|
let {
|
|
114
119
|
theme
|
|
115
|
-
} =
|
|
120
|
+
} = _ref14;
|
|
116
121
|
return theme.space.xxs;
|
|
117
|
-
},
|
|
122
|
+
}, _ref15 => {
|
|
118
123
|
let {
|
|
119
124
|
theme
|
|
120
|
-
} =
|
|
125
|
+
} = _ref15;
|
|
121
126
|
return theme.space.m;
|
|
122
|
-
},
|
|
127
|
+
}, _ref16 => {
|
|
123
128
|
let {
|
|
124
129
|
theme
|
|
125
|
-
} =
|
|
130
|
+
} = _ref16;
|
|
126
131
|
return theme.space.xs;
|
|
127
132
|
}, styledSystem.space, styledSystem.flexbox);
|
|
128
133
|
|
package/esm/DSDialog.js
CHANGED
|
@@ -6,8 +6,9 @@ import 'core-js/modules/esnext.iterator.for-each.js';
|
|
|
6
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
7
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
8
8
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
9
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
9
10
|
import ReactDOM from 'react-dom';
|
|
10
|
-
import { useRef, useCallback, useEffect } from 'react';
|
|
11
|
+
import { useState, useRef, useCallback, useEffect } from 'react';
|
|
11
12
|
import { describe } from 'react-desc';
|
|
12
13
|
import { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
|
|
13
14
|
import { StyledDialogBackground, FixedBody, StyledDialogContainer } from './styles.js';
|
|
@@ -17,8 +18,6 @@ import { getSpaceProps } from './utils.js';
|
|
|
17
18
|
import { DSDialogDatatestid } from './DSDialogDatatestid.js';
|
|
18
19
|
import { jsx } from 'react/jsx-runtime';
|
|
19
20
|
|
|
20
|
-
var _FixedBody;
|
|
21
|
-
|
|
22
21
|
const _excluded = ["children", "isOpen", "onClickOutside", "centered", "size", "removeAutoFocus", "zIndex"];
|
|
23
22
|
|
|
24
23
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -26,7 +25,10 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
26
25
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
27
26
|
|
|
28
27
|
const DSDialog = props => {
|
|
28
|
+
var _FixedBody;
|
|
29
|
+
|
|
29
30
|
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
31
|
+
const [isBodyOverflow, setIsBodyOverflow] = useState(false);
|
|
30
32
|
useValidateTypescriptPropTypes(propsWithDefault, propTypes);
|
|
31
33
|
|
|
32
34
|
const {
|
|
@@ -47,6 +49,15 @@ const DSDialog = props => {
|
|
|
47
49
|
const handleOnKeyDown = useCallback(e => {
|
|
48
50
|
if (e.key === 'Escape') onClickOutside();
|
|
49
51
|
}, [onClickOutside]);
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
const body = document.getElementsByTagName('body')[0];
|
|
54
|
+
const {
|
|
55
|
+
offsetHeight,
|
|
56
|
+
scrollHeight
|
|
57
|
+
} = body;
|
|
58
|
+
if (!isOpen) return setIsBodyOverflow(false);
|
|
59
|
+
return setIsBodyOverflow(offsetHeight < scrollHeight);
|
|
60
|
+
}, [isOpen]);
|
|
50
61
|
useEffect(() => {
|
|
51
62
|
var _containerRef$current;
|
|
52
63
|
|
|
@@ -59,7 +70,9 @@ const DSDialog = props => {
|
|
|
59
70
|
"data-portalbg": true,
|
|
60
71
|
"data-testid": DSDialogDatatestid.BACKGROUND,
|
|
61
72
|
zIndex: zIndex
|
|
62
|
-
}, void 0, _FixedBody || (_FixedBody = /*#__PURE__*/_jsx(FixedBody, {
|
|
73
|
+
}, void 0, _FixedBody || (_FixedBody = /*#__PURE__*/_jsx(FixedBody, {
|
|
74
|
+
isBodyOverflow: isBodyOverflow
|
|
75
|
+
})), /*#__PURE__*/jsx(StyledDialogContainer, _objectSpread(_objectSpread({
|
|
63
76
|
role: "dialog",
|
|
64
77
|
"aria-modal": true,
|
|
65
78
|
ref: containerRef,
|
package/esm/styles.js
CHANGED
|
@@ -5,44 +5,49 @@ import { space, layout, flexbox } from 'styled-system';
|
|
|
5
5
|
import { allSizes } from './utils.js';
|
|
6
6
|
|
|
7
7
|
var _templateObject;
|
|
8
|
-
const FixedBody = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n body {\n overflow: hidden;\n }\n"]))
|
|
8
|
+
const FixedBody = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n body {\n overflow: hidden;\n \n ", "\n }\n"])), _ref => {
|
|
9
|
+
let {
|
|
10
|
+
isBodyOverflow
|
|
11
|
+
} = _ref;
|
|
12
|
+
return isBodyOverflow ? "padding-right: 15px !important;" : "";
|
|
13
|
+
});
|
|
9
14
|
const StyledDialogBackground = /*#__PURE__*/styled.div.withConfig({
|
|
10
15
|
componentId: "sc-106vqwv-0"
|
|
11
|
-
})(["position:fixed;top:0;bottom:0;width:100%;height:100%;background:rgba(37,41,47,50%);overflow-y:auto;z-index:", ";"],
|
|
16
|
+
})(["position:fixed;top:0;bottom:0;width:100%;height:100%;background:rgba(37,41,47,50%);overflow-y:auto;z-index:", ";"], _ref2 => {
|
|
12
17
|
let {
|
|
13
18
|
zIndex
|
|
14
|
-
} =
|
|
19
|
+
} = _ref2;
|
|
15
20
|
return zIndex;
|
|
16
21
|
});
|
|
17
22
|
const StyledDialogContainer = /*#__PURE__*/styled.div.withConfig({
|
|
18
23
|
componentId: "sc-106vqwv-1"
|
|
19
|
-
})(["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;}"],
|
|
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 => {
|
|
20
25
|
let {
|
|
21
26
|
centered
|
|
22
|
-
} =
|
|
27
|
+
} = _ref3;
|
|
23
28
|
return centered ? 'auto' : '20vh auto auto auto';
|
|
24
|
-
},
|
|
29
|
+
}, _ref4 => {
|
|
25
30
|
let {
|
|
26
31
|
size
|
|
27
|
-
} =
|
|
32
|
+
} = _ref4;
|
|
28
33
|
return allSizes[size];
|
|
29
|
-
},
|
|
34
|
+
}, _ref5 => {
|
|
30
35
|
let {
|
|
31
36
|
theme
|
|
32
|
-
} =
|
|
37
|
+
} = _ref5;
|
|
33
38
|
return theme.colors.neutral[500];
|
|
34
|
-
},
|
|
39
|
+
}, _ref6 => {
|
|
35
40
|
let {
|
|
36
41
|
theme
|
|
37
|
-
} =
|
|
42
|
+
} = _ref6;
|
|
38
43
|
return theme.colors.neutral['000'];
|
|
39
44
|
}, space);
|
|
40
45
|
const DSDialogTitle = /*#__PURE__*/styled.h3.withConfig({
|
|
41
46
|
componentId: "sc-106vqwv-2"
|
|
42
|
-
})(["font-size:", ";display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0;"],
|
|
47
|
+
})(["font-size:", ";display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0;"], _ref7 => {
|
|
43
48
|
let {
|
|
44
49
|
theme
|
|
45
|
-
} =
|
|
50
|
+
} = _ref7;
|
|
46
51
|
return theme.fontSizes.title[700];
|
|
47
52
|
});
|
|
48
53
|
const DSDialogAddon = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -50,33 +55,33 @@ const DSDialogAddon = /*#__PURE__*/styled.div.withConfig({
|
|
|
50
55
|
})([""]);
|
|
51
56
|
const DSDialogHeader = /*#__PURE__*/styled.div.withConfig({
|
|
52
57
|
componentId: "sc-106vqwv-4"
|
|
53
|
-
})(["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;}", ""],
|
|
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 => {
|
|
54
59
|
let {
|
|
55
60
|
theme
|
|
56
|
-
} =
|
|
61
|
+
} = _ref8;
|
|
57
62
|
return theme.space.m;
|
|
58
|
-
},
|
|
63
|
+
}, _ref9 => {
|
|
59
64
|
let {
|
|
60
65
|
theme
|
|
61
|
-
} =
|
|
66
|
+
} = _ref9;
|
|
62
67
|
return theme.space.xs;
|
|
63
68
|
}, DSDialogTitle, DSDialogAddon, DSDialogAddon, space);
|
|
64
69
|
const DSDialogSeparator = /*#__PURE__*/styled.hr.attrs(() => ({
|
|
65
70
|
'aria-hidden': true
|
|
66
71
|
})).withConfig({
|
|
67
72
|
componentId: "sc-106vqwv-5"
|
|
68
|
-
})(["margin:0;border-top:1px solid ", ";"],
|
|
73
|
+
})(["margin:0;border-top:1px solid ", ";"], _ref10 => {
|
|
69
74
|
let {
|
|
70
75
|
theme
|
|
71
|
-
} =
|
|
76
|
+
} = _ref10;
|
|
72
77
|
return theme.colors.neutral['080'];
|
|
73
78
|
});
|
|
74
79
|
const DSDialogBody = /*#__PURE__*/styled.div.withConfig({
|
|
75
80
|
componentId: "sc-106vqwv-6"
|
|
76
|
-
})(["padding:", ";overflow-y:auto;", " ", " ", ""],
|
|
81
|
+
})(["padding:", ";overflow-y:auto;", " ", " ", ""], _ref11 => {
|
|
77
82
|
let {
|
|
78
83
|
theme
|
|
79
|
-
} =
|
|
84
|
+
} = _ref11;
|
|
80
85
|
return theme.space.xs;
|
|
81
86
|
}, layout, space, flexbox);
|
|
82
87
|
const DSDialogPrimaryMessage = /*#__PURE__*/styled.h3.withConfig({
|
|
@@ -84,36 +89,36 @@ const DSDialogPrimaryMessage = /*#__PURE__*/styled.h3.withConfig({
|
|
|
84
89
|
})(["margin:0;"]);
|
|
85
90
|
const DSDialogSecondaryMessage = /*#__PURE__*/styled.p.withConfig({
|
|
86
91
|
componentId: "sc-106vqwv-8"
|
|
87
|
-
})(["margin:0;color:", ";"],
|
|
92
|
+
})(["margin:0;color:", ";"], _ref12 => {
|
|
88
93
|
let {
|
|
89
94
|
theme
|
|
90
|
-
} =
|
|
95
|
+
} = _ref12;
|
|
91
96
|
return theme.colors.neutral[500];
|
|
92
97
|
});
|
|
93
98
|
const DSDialogDefaultLayout = /*#__PURE__*/styled.div.withConfig({
|
|
94
99
|
componentId: "sc-106vqwv-9"
|
|
95
|
-
})(["display:grid;grid-auto-flow:row;justify-items:center;align-items:center;grid-gap:", ";", "{text-align:center;}"],
|
|
100
|
+
})(["display:grid;grid-auto-flow:row;justify-items:center;align-items:center;grid-gap:", ";", "{text-align:center;}"], _ref13 => {
|
|
96
101
|
let {
|
|
97
102
|
theme
|
|
98
|
-
} =
|
|
103
|
+
} = _ref13;
|
|
99
104
|
return theme.space.xxs;
|
|
100
105
|
}, DSDialogSecondaryMessage);
|
|
101
106
|
const DSDialogFooter = /*#__PURE__*/styled.div.withConfig({
|
|
102
107
|
componentId: "sc-106vqwv-10"
|
|
103
|
-
})(["display:grid;grid-auto-flow:column;align-items:center;justify-content:flex-end;grid-gap:", ";min-height:", ";padding:0 ", ";", " ", ""],
|
|
108
|
+
})(["display:grid;grid-auto-flow:column;align-items:center;justify-content:flex-end;grid-gap:", ";min-height:", ";padding:0 ", ";", " ", ""], _ref14 => {
|
|
104
109
|
let {
|
|
105
110
|
theme
|
|
106
|
-
} =
|
|
111
|
+
} = _ref14;
|
|
107
112
|
return theme.space.xxs;
|
|
108
|
-
},
|
|
113
|
+
}, _ref15 => {
|
|
109
114
|
let {
|
|
110
115
|
theme
|
|
111
|
-
} =
|
|
116
|
+
} = _ref15;
|
|
112
117
|
return theme.space.m;
|
|
113
|
-
},
|
|
118
|
+
}, _ref16 => {
|
|
114
119
|
let {
|
|
115
120
|
theme
|
|
116
|
-
} =
|
|
121
|
+
} = _ref16;
|
|
117
122
|
return theme.space.xs;
|
|
118
123
|
}, space, flexbox);
|
|
119
124
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-dialog",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.16",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Dialog",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"build": "node ../../scripts/build/build.js"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@elliemae/ds-props-helpers": "2.0.0-rc.
|
|
68
|
-
"@elliemae/ds-system": "2.0.0-rc.
|
|
67
|
+
"@elliemae/ds-props-helpers": "2.0.0-rc.16",
|
|
68
|
+
"@elliemae/ds-system": "2.0.0-rc.16",
|
|
69
69
|
"react-desc": "~4.1.3",
|
|
70
70
|
"styled-system": "~5.1.5"
|
|
71
71
|
},
|