@dxc-technology/halstack-react 0.0.0-d3554d7 → 0.0.0-d3ac293
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/BackgroundColorContext.d.ts +2 -2
- package/BackgroundColorContext.js +1 -1
- package/HalstackContext.d.ts +1336 -0
- package/HalstackContext.js +335 -0
- package/accordion/Accordion.d.ts +1 -1
- package/accordion/Accordion.js +118 -126
- package/accordion/Accordion.stories.tsx +115 -27
- package/accordion/Accordion.test.js +26 -12
- package/accordion/types.d.ts +9 -4
- package/accordion-group/AccordionGroup.d.ts +1 -1
- package/accordion-group/AccordionGroup.js +17 -38
- package/accordion-group/AccordionGroup.stories.tsx +28 -2
- package/accordion-group/AccordionGroup.test.js +31 -38
- package/accordion-group/types.d.ts +14 -3
- package/alert/Alert.js +7 -4
- package/alert/Alert.stories.tsx +28 -0
- package/alert/Alert.test.js +1 -1
- package/badge/Badge.d.ts +1 -1
- package/badge/Badge.js +5 -3
- package/badge/types.d.ts +1 -0
- package/bleed/Bleed.js +1 -34
- package/bleed/Bleed.stories.tsx +94 -95
- package/bleed/types.d.ts +25 -1
- package/box/Box.js +25 -37
- package/box/Box.stories.tsx +15 -0
- package/box/Box.test.js +1 -1
- package/box/types.d.ts +1 -0
- package/bulleted-list/BulletedList.d.ts +7 -0
- package/bulleted-list/BulletedList.js +123 -0
- package/bulleted-list/BulletedList.stories.tsx +200 -0
- package/bulleted-list/types.d.ts +11 -0
- package/button/Button.js +52 -69
- package/button/Button.stories.tsx +159 -8
- package/button/Button.test.js +1 -1
- package/button/types.d.ts +7 -7
- package/card/Card.js +25 -28
- package/card/Card.test.js +1 -1
- package/card/types.d.ts +1 -0
- package/checkbox/Checkbox.d.ts +2 -2
- package/checkbox/Checkbox.js +107 -110
- package/checkbox/Checkbox.stories.tsx +198 -130
- package/checkbox/Checkbox.test.js +101 -11
- package/checkbox/types.d.ts +13 -5
- package/chip/Chip.js +18 -24
- package/chip/Chip.stories.tsx +96 -9
- package/chip/Chip.test.js +3 -5
- package/chip/types.d.ts +1 -1
- package/common/utils.d.ts +1 -0
- package/common/utils.js +4 -4
- package/common/variables.d.ts +1625 -0
- package/common/variables.js +483 -352
- package/date-input/Calendar.d.ts +4 -0
- package/date-input/Calendar.js +258 -0
- package/date-input/DateInput.js +169 -258
- package/date-input/DateInput.stories.tsx +199 -33
- package/date-input/DateInput.test.js +521 -155
- package/date-input/DatePicker.d.ts +4 -0
- package/date-input/DatePicker.js +146 -0
- package/date-input/Icons.d.ts +6 -0
- package/date-input/Icons.js +75 -0
- package/date-input/YearPicker.d.ts +4 -0
- package/date-input/YearPicker.js +126 -0
- package/date-input/types.d.ts +67 -9
- package/dialog/Dialog.js +76 -93
- package/dialog/Dialog.stories.tsx +230 -123
- package/dialog/Dialog.test.js +334 -5
- package/dialog/types.d.ts +3 -2
- package/dropdown/Dropdown.d.ts +1 -1
- package/dropdown/Dropdown.js +246 -253
- package/dropdown/Dropdown.stories.tsx +245 -56
- package/dropdown/Dropdown.test.js +507 -110
- package/dropdown/DropdownMenu.d.ts +4 -0
- package/dropdown/DropdownMenu.js +70 -0
- package/dropdown/DropdownMenuItem.d.ts +4 -0
- package/dropdown/DropdownMenuItem.js +81 -0
- package/dropdown/types.d.ts +25 -5
- package/file-input/FileInput.d.ts +2 -2
- package/file-input/FileInput.js +181 -223
- package/file-input/FileInput.stories.tsx +122 -11
- package/file-input/FileInput.test.js +14 -14
- package/file-input/FileItem.d.ts +4 -14
- package/file-input/FileItem.js +44 -66
- package/file-input/types.d.ts +17 -0
- package/flex/Flex.d.ts +4 -0
- package/flex/Flex.js +69 -0
- package/flex/Flex.stories.tsx +103 -0
- package/flex/types.d.ts +32 -0
- package/footer/Footer.js +16 -89
- package/footer/Footer.stories.tsx +99 -1
- package/footer/Footer.test.js +14 -26
- package/footer/Icons.js +1 -1
- package/footer/types.d.ts +2 -1
- package/header/Header.js +108 -129
- package/header/Header.stories.tsx +189 -36
- package/header/Header.test.js +20 -4
- package/header/Icons.js +2 -2
- package/header/types.d.ts +3 -2
- package/heading/Heading.js +1 -1
- package/heading/Heading.test.js +1 -1
- package/inset/Inset.js +1 -34
- package/inset/Inset.stories.tsx +36 -36
- package/inset/types.d.ts +25 -1
- package/layout/ApplicationLayout.d.ts +16 -6
- package/layout/ApplicationLayout.js +72 -132
- package/layout/ApplicationLayout.stories.tsx +84 -93
- package/layout/Icons.d.ts +5 -0
- package/layout/Icons.js +13 -2
- package/layout/SidenavContext.d.ts +5 -0
- package/layout/SidenavContext.js +19 -0
- package/layout/types.d.ts +18 -33
- package/link/Link.d.ts +3 -2
- package/link/Link.js +59 -76
- package/link/Link.stories.tsx +155 -53
- package/link/Link.test.js +9 -19
- package/link/types.d.ts +7 -23
- package/main.d.ts +8 -10
- package/main.js +46 -56
- package/nav-tabs/NavTabs.d.ts +8 -0
- package/nav-tabs/NavTabs.js +125 -0
- package/nav-tabs/NavTabs.stories.tsx +260 -0
- package/nav-tabs/NavTabs.test.js +82 -0
- package/nav-tabs/Tab.d.ts +4 -0
- package/nav-tabs/Tab.js +150 -0
- package/nav-tabs/types.d.ts +53 -0
- package/number-input/NumberInput.js +11 -18
- package/number-input/NumberInput.stories.tsx +5 -5
- package/number-input/NumberInput.test.js +46 -12
- package/number-input/types.d.ts +17 -10
- package/package.json +20 -23
- package/paginator/Icons.d.ts +5 -0
- package/paginator/Icons.js +16 -28
- package/paginator/Paginator.js +19 -46
- package/paginator/Paginator.stories.tsx +24 -0
- package/paginator/Paginator.test.js +78 -39
- package/paragraph/Paragraph.d.ts +6 -0
- package/paragraph/Paragraph.js +38 -0
- package/paragraph/Paragraph.stories.tsx +44 -0
- package/password-input/PasswordInput.js +7 -4
- package/password-input/PasswordInput.test.js +17 -19
- package/password-input/types.d.ts +14 -11
- package/progress-bar/ProgressBar.d.ts +2 -2
- package/progress-bar/ProgressBar.js +61 -55
- package/progress-bar/ProgressBar.stories.jsx +47 -12
- package/progress-bar/ProgressBar.test.js +68 -23
- package/progress-bar/types.d.ts +3 -4
- package/quick-nav/QuickNav.d.ts +4 -0
- package/quick-nav/QuickNav.js +117 -0
- package/quick-nav/QuickNav.stories.tsx +356 -0
- package/quick-nav/types.d.ts +21 -0
- package/radio-group/Radio.d.ts +1 -1
- package/radio-group/Radio.js +43 -28
- package/radio-group/RadioGroup.js +32 -28
- package/radio-group/RadioGroup.stories.tsx +135 -17
- package/radio-group/RadioGroup.test.js +145 -117
- package/radio-group/types.d.ts +79 -2
- package/resultsetTable/Icons.d.ts +7 -0
- package/resultsetTable/Icons.js +51 -0
- package/resultsetTable/ResultsetTable.js +49 -108
- package/resultsetTable/ResultsetTable.stories.tsx +50 -25
- package/resultsetTable/ResultsetTable.test.js +61 -42
- package/resultsetTable/types.d.ts +2 -2
- package/select/Icons.d.ts +10 -0
- package/select/Icons.js +93 -0
- package/select/Listbox.d.ts +4 -0
- package/select/Listbox.js +169 -0
- package/select/Option.d.ts +4 -0
- package/select/Option.js +97 -0
- package/select/Select.js +179 -384
- package/select/Select.stories.tsx +531 -142
- package/select/Select.test.js +652 -324
- package/select/types.d.ts +53 -13
- package/sidenav/Sidenav.d.ts +6 -5
- package/sidenav/Sidenav.js +183 -53
- package/sidenav/Sidenav.stories.tsx +249 -149
- package/sidenav/Sidenav.test.js +25 -37
- package/sidenav/types.d.ts +50 -27
- package/slider/Slider.d.ts +2 -2
- package/slider/Slider.js +124 -98
- package/slider/Slider.stories.tsx +72 -9
- package/slider/Slider.test.js +143 -22
- package/slider/types.d.ts +10 -2
- package/spinner/Spinner.js +4 -4
- package/spinner/Spinner.stories.jsx +27 -1
- package/spinner/Spinner.test.js +1 -1
- package/switch/Switch.d.ts +2 -2
- package/switch/Switch.js +152 -69
- package/switch/Switch.stories.tsx +53 -42
- package/switch/Switch.test.js +156 -4
- package/switch/types.d.ts +12 -4
- package/table/Table.js +3 -3
- package/table/Table.stories.jsx +80 -1
- package/table/Table.test.js +2 -2
- package/tabs/Tab.d.ts +4 -0
- package/tabs/Tab.js +133 -0
- package/tabs/Tabs.d.ts +1 -1
- package/tabs/Tabs.js +363 -109
- package/tabs/Tabs.stories.tsx +119 -13
- package/tabs/Tabs.test.js +241 -14
- package/tabs/types.d.ts +19 -5
- package/tag/Tag.js +17 -22
- package/tag/Tag.stories.tsx +25 -8
- package/tag/Tag.test.js +1 -1
- package/tag/types.d.ts +1 -1
- package/text-input/Icons.d.ts +8 -0
- package/text-input/Icons.js +60 -0
- package/text-input/Suggestion.d.ts +4 -0
- package/text-input/Suggestion.js +84 -0
- package/text-input/Suggestions.d.ts +4 -0
- package/text-input/Suggestions.js +134 -0
- package/text-input/TextInput.js +221 -344
- package/text-input/TextInput.stories.tsx +290 -195
- package/text-input/TextInput.test.js +763 -731
- package/text-input/types.d.ts +50 -12
- package/textarea/Textarea.js +17 -26
- package/textarea/Textarea.stories.jsx +65 -6
- package/textarea/Textarea.test.js +38 -37
- package/textarea/types.d.ts +18 -11
- package/toggle-group/ToggleGroup.d.ts +1 -1
- package/toggle-group/ToggleGroup.js +6 -5
- package/toggle-group/ToggleGroup.stories.tsx +46 -4
- package/toggle-group/ToggleGroup.test.js +36 -5
- package/toggle-group/types.d.ts +9 -1
- package/typography/Typography.d.ts +4 -0
- package/typography/Typography.js +32 -0
- package/typography/Typography.stories.tsx +198 -0
- package/typography/types.d.ts +18 -0
- package/typography/types.js +5 -0
- package/useTheme.d.ts +1234 -1
- package/useTheme.js +3 -3
- package/useTranslatedLabels.d.ts +85 -0
- package/useTranslatedLabels.js +20 -0
- package/utils/BaseTypography.d.ts +21 -0
- package/utils/BaseTypography.js +108 -0
- package/utils/FocusLock.d.ts +13 -0
- package/utils/FocusLock.js +139 -0
- package/wizard/Wizard.d.ts +1 -1
- package/wizard/Wizard.js +59 -55
- package/wizard/Wizard.stories.tsx +48 -19
- package/wizard/Wizard.test.js +37 -24
- package/wizard/types.d.ts +10 -5
- package/ThemeContext.d.ts +0 -10
- package/ThemeContext.js +0 -243
- package/common/RequiredComponent.js +0 -32
- package/list/List.d.ts +0 -4
- package/list/List.js +0 -47
- package/list/List.stories.tsx +0 -95
- package/list/types.d.ts +0 -7
- package/radio/Radio.d.ts +0 -4
- package/radio/Radio.js +0 -174
- package/radio/Radio.stories.tsx +0 -192
- package/radio/Radio.test.js +0 -71
- package/radio/types.d.ts +0 -54
- package/row/Row.d.ts +0 -3
- package/row/Row.js +0 -127
- package/row/Row.stories.tsx +0 -237
- package/row/types.d.ts +0 -10
- package/stack/Stack.d.ts +0 -3
- package/stack/Stack.js +0 -97
- package/stack/Stack.stories.tsx +0 -164
- package/stack/types.d.ts +0 -9
- package/text/Text.d.ts +0 -7
- package/text/Text.js +0 -30
- package/text/Text.stories.tsx +0 -19
- /package/{list → bulleted-list}/types.js +0 -0
- /package/{radio → flex}/types.js +0 -0
- /package/{row → nav-tabs}/types.js +0 -0
- /package/{stack → quick-nav}/types.js +0 -0
package/dialog/Dialog.js
CHANGED
|
@@ -13,26 +13,42 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
|
13
13
|
|
|
14
14
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
15
15
|
|
|
16
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
|
-
|
|
18
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
17
|
|
|
20
18
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
21
19
|
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
var _variables = require("../common/variables.js");
|
|
20
|
+
var _variables = require("../common/variables");
|
|
25
21
|
|
|
26
22
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
27
23
|
|
|
28
24
|
var _BackgroundColorContext = require("../BackgroundColorContext");
|
|
29
25
|
|
|
30
|
-
var
|
|
26
|
+
var _useTranslatedLabels = _interopRequireDefault(require("../useTranslatedLabels"));
|
|
27
|
+
|
|
28
|
+
var _reactDom = require("react-dom");
|
|
29
|
+
|
|
30
|
+
var _FocusLock = _interopRequireDefault(require("../utils/FocusLock"));
|
|
31
|
+
|
|
32
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
31
33
|
|
|
32
34
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
33
35
|
|
|
34
36
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
37
|
|
|
38
|
+
var closeIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
39
|
+
role: "img",
|
|
40
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41
|
+
width: "24",
|
|
42
|
+
height: "24",
|
|
43
|
+
viewBox: "0 0 24 24",
|
|
44
|
+
fill: "currentColor"
|
|
45
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
46
|
+
d: "M0 0h24v24H0V0z",
|
|
47
|
+
fill: "none"
|
|
48
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
49
|
+
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
50
|
+
}));
|
|
51
|
+
|
|
36
52
|
var DxcDialog = function DxcDialog(_ref) {
|
|
37
53
|
var _ref$isCloseVisible = _ref.isCloseVisible,
|
|
38
54
|
isCloseVisible = _ref$isCloseVisible === void 0 ? true : _ref$isCloseVisible,
|
|
@@ -45,121 +61,88 @@ var DxcDialog = function DxcDialog(_ref) {
|
|
|
45
61
|
padding = _ref$padding === void 0 ? "small" : _ref$padding,
|
|
46
62
|
_ref$tabIndex = _ref.tabIndex,
|
|
47
63
|
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
48
|
-
|
|
49
|
-
var _useState = (0, _react.useState)(false),
|
|
50
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
51
|
-
isResponsive = _useState2[0],
|
|
52
|
-
setIsResponsive = _useState2[1];
|
|
53
|
-
|
|
54
64
|
var colorsTheme = (0, _useTheme["default"])();
|
|
55
|
-
|
|
56
|
-
var handleClose = function handleClose() {
|
|
57
|
-
onCloseClick === null || onCloseClick === void 0 ? void 0 : onCloseClick();
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
var handleOverlayClick = function handleOverlayClick() {
|
|
61
|
-
onBackgroundClick === null || onBackgroundClick === void 0 ? void 0 : onBackgroundClick();
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
var handleResize = function handleResize(width) {
|
|
65
|
-
setIsResponsive(width && width <= _variables.responsiveSizes.tablet);
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
var handleEventListener = function handleEventListener() {
|
|
69
|
-
handleResize(window.innerWidth);
|
|
70
|
-
};
|
|
71
|
-
|
|
65
|
+
var translatedLabels = (0, _useTranslatedLabels["default"])();
|
|
72
66
|
(0, _react.useEffect)(function () {
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
var handleKeyDown = function handleKeyDown(event) {
|
|
68
|
+
if (event.key === "Escape") {
|
|
69
|
+
event.preventDefault();
|
|
70
|
+
onCloseClick === null || onCloseClick === void 0 ? void 0 : onCloseClick();
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
75
75
|
return function () {
|
|
76
|
-
|
|
76
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
77
77
|
};
|
|
78
|
-
}, []);
|
|
78
|
+
}, [onCloseClick]);
|
|
79
79
|
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
80
80
|
theme: colorsTheme.dialog
|
|
81
|
-
}, /*#__PURE__*/_react["default"].createElement(DialogContainer, {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
92
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
93
|
-
width: "24",
|
|
94
|
-
height: "24",
|
|
95
|
-
viewBox: "0 0 24 24",
|
|
96
|
-
fill: "currentColor"
|
|
97
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
98
|
-
d: "M0 0h24v24H0V0z",
|
|
99
|
-
fill: "none"
|
|
100
|
-
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
101
|
-
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
102
|
-
}))), /*#__PURE__*/_react["default"].createElement(Children, null, /*#__PURE__*/_react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
81
|
+
}, /*#__PURE__*/_react["default"].createElement(BodyStyle, null), /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/_react["default"].createElement(_FocusLock["default"], null, /*#__PURE__*/_react["default"].createElement(DialogContainer, null, overlay && /*#__PURE__*/_react["default"].createElement(Overlay, {
|
|
82
|
+
onClick: function onClick() {
|
|
83
|
+
onBackgroundClick === null || onBackgroundClick === void 0 ? void 0 : onBackgroundClick();
|
|
84
|
+
}
|
|
85
|
+
}), /*#__PURE__*/_react["default"].createElement(Dialog, {
|
|
86
|
+
role: "dialog",
|
|
87
|
+
"aria-modal": overlay,
|
|
88
|
+
isCloseVisible: isCloseVisible
|
|
89
|
+
}, /*#__PURE__*/_react["default"].createElement(Children, {
|
|
90
|
+
padding: padding
|
|
91
|
+
}, /*#__PURE__*/_react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
103
92
|
color: colorsTheme.dialog.backgroundColor
|
|
104
|
-
}, children))
|
|
93
|
+
}, children)), isCloseVisible && /*#__PURE__*/_react["default"].createElement(CloseIconAction, {
|
|
94
|
+
onClick: function onClick() {
|
|
95
|
+
onCloseClick === null || onCloseClick === void 0 ? void 0 : onCloseClick();
|
|
96
|
+
},
|
|
97
|
+
"aria-label": translatedLabels.dialog.closeIconAriaLabel,
|
|
98
|
+
tabIndex: tabIndex
|
|
99
|
+
}, closeIcon)))), document.body));
|
|
105
100
|
};
|
|
106
101
|
|
|
107
|
-
var
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
return props.
|
|
113
|
-
}
|
|
102
|
+
var BodyStyle = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n body {\n overflow: hidden;\n }\n"])));
|
|
103
|
+
|
|
104
|
+
var DialogContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n position: fixed;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n z-index: 2147483647;\n"])));
|
|
105
|
+
|
|
106
|
+
var Overlay = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n position: fixed;\n inset: 0;\n height: 100%;\n background-color: ", ";\n"])), function (props) {
|
|
107
|
+
return props.theme.overlayColor;
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
var Dialog = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n box-sizing: border-box;\n max-width: 80%;\n min-width: 696px;\n border-radius: 4px;\n background-color: ", ";\n ", "\n box-shadow: ", ";\n z-index: 2147483647;\n\n @media (max-width: ", "rem) {\n max-width: 92%;\n min-width: 92%;\n }\n"])), function (props) {
|
|
114
111
|
return props.theme.backgroundColor;
|
|
115
112
|
}, function (props) {
|
|
116
|
-
return props.
|
|
117
|
-
}, function (props) {
|
|
118
|
-
return props.isResponsive ? "92%" : "800px";
|
|
119
|
-
}, function (props) {
|
|
120
|
-
return props.isCloseVisible ? "72px" : "";
|
|
113
|
+
return props.isCloseVisible && "min-height: 72px;";
|
|
121
114
|
}, function (props) {
|
|
122
115
|
return "".concat(props.theme.boxShadowOffsetX, " ").concat(props.theme.boxShadowOffsetY, " ").concat(props.theme.boxShadowBlur, " ").concat(props.theme.boxShadowColor);
|
|
116
|
+
}, _variables.responsiveSizes.medium);
|
|
117
|
+
|
|
118
|
+
var CloseIconAction = _styledComponents["default"].button(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n all: unset;\n position: absolute;\n top: 24px;\n right: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n box-shadow: 0 0 0 2px transparent;\n color: ", ";\n border-radius: ", ";\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n cursor: pointer;\n z-index: 1;\n\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px #0095ff;\n }\n &:hover {\n background-color: #f2f2f2;\n }\n &:active {\n background-color: #cccccc;\n }\n svg {\n width: ", ";\n height: ", ";\n }\n"])), function (props) {
|
|
119
|
+
return props.theme.closeIconBackgroundColor;
|
|
123
120
|
}, function (props) {
|
|
124
|
-
return props.
|
|
125
|
-
}, function (props) {
|
|
126
|
-
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.top ? _variables.spaces[props.padding.top] : "";
|
|
127
|
-
}, function (props) {
|
|
128
|
-
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.right ? _variables.spaces[props.padding.right] : "";
|
|
121
|
+
return props.theme.closeIconColor;
|
|
129
122
|
}, function (props) {
|
|
130
|
-
return props.
|
|
123
|
+
return props.theme.closeIconBorderRadius;
|
|
131
124
|
}, function (props) {
|
|
132
|
-
return props.
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
var Children = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])([""])));
|
|
136
|
-
|
|
137
|
-
var CloseIconContainer = _styledComponents["default"].button(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: flex-end;\n position: absolute;\n top: ", ";\n right: ", ";\n cursor: pointer;\n padding: 0;\n margin: 0;\n background: none;\n color: ", ";\n width: ", ";\n height: ", ";\n border: none;\n"])), function (props) {
|
|
138
|
-
return props.theme.closeIconTopPosition;
|
|
125
|
+
return props.theme.closeIconBorderThickness;
|
|
139
126
|
}, function (props) {
|
|
140
|
-
return props.theme.
|
|
127
|
+
return props.theme.closeIconBorderStyle;
|
|
141
128
|
}, function (props) {
|
|
142
|
-
return props.theme.
|
|
129
|
+
return props.theme.closeIconBorderColor;
|
|
143
130
|
}, function (props) {
|
|
144
131
|
return props.theme.closeIconWidth;
|
|
145
132
|
}, function (props) {
|
|
146
133
|
return props.theme.closeIconHeight;
|
|
147
134
|
});
|
|
148
135
|
|
|
149
|
-
var
|
|
150
|
-
return props.
|
|
151
|
-
}, function (props) {
|
|
152
|
-
return props.theme.closeIconWidth;
|
|
153
|
-
}, function (props) {
|
|
154
|
-
return props.theme.closeIconHeight;
|
|
136
|
+
var Children = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n"])), function (props) {
|
|
137
|
+
return props.padding && (0, _typeof2["default"])(props.padding) !== "object" ? _variables.spaces[props.padding] : _variables.spaces["small"];
|
|
155
138
|
}, function (props) {
|
|
156
|
-
return props.
|
|
139
|
+
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.top ? _variables.spaces[props.padding.top] : "";
|
|
157
140
|
}, function (props) {
|
|
158
|
-
return props.
|
|
141
|
+
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.right ? _variables.spaces[props.padding.right] : "";
|
|
159
142
|
}, function (props) {
|
|
160
|
-
return props.
|
|
143
|
+
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.bottom ? _variables.spaces[props.padding.bottom] : "";
|
|
161
144
|
}, function (props) {
|
|
162
|
-
return props.
|
|
145
|
+
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.left ? _variables.spaces[props.padding.left] : "";
|
|
163
146
|
});
|
|
164
147
|
|
|
165
148
|
var _default = DxcDialog;
|