@dxc-technology/halstack-react 0.0.0-de7c6b0 → 0.0.0-dec566a
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 +1 -10
- package/BackgroundColorContext.js +4 -21
- package/HalstackContext.d.ts +52 -139
- package/HalstackContext.js +11 -36
- package/README.md +47 -0
- package/accordion/Accordion.js +31 -84
- package/accordion/Accordion.stories.tsx +5 -50
- package/accordion/Accordion.test.js +18 -33
- package/accordion/types.d.ts +6 -6
- package/accordion-group/AccordionGroup.d.ts +2 -3
- package/accordion-group/AccordionGroup.js +17 -44
- package/accordion-group/AccordionGroup.stories.tsx +1 -1
- package/accordion-group/AccordionGroup.test.js +42 -60
- package/accordion-group/AccordionGroupAccordion.js +11 -23
- package/accordion-group/AccordionGroupContext.d.ts +3 -0
- package/accordion-group/AccordionGroupContext.js +8 -0
- package/accordion-group/types.d.ts +7 -7
- package/action-icon/ActionIcon.d.ts +4 -0
- package/action-icon/ActionIcon.js +48 -0
- package/action-icon/ActionIcon.stories.tsx +41 -0
- package/action-icon/ActionIcon.test.js +64 -0
- package/action-icon/types.d.ts +26 -0
- package/alert/Alert.js +29 -118
- package/alert/Alert.test.js +28 -45
- package/alert/types.d.ts +5 -5
- package/badge/Badge.d.ts +1 -1
- package/badge/Badge.js +141 -43
- package/badge/Badge.stories.tsx +210 -0
- package/badge/Badge.test.js +30 -0
- package/badge/types.d.ts +52 -3
- package/bleed/Bleed.js +13 -21
- package/bleed/types.d.ts +2 -2
- package/box/Box.js +11 -33
- package/box/Box.test.js +1 -6
- package/box/types.d.ts +3 -3
- package/bulleted-list/BulletedList.js +22 -55
- package/bulleted-list/BulletedList.stories.tsx +2 -93
- package/bulleted-list/types.d.ts +5 -5
- package/button/Button.d.ts +1 -1
- package/button/Button.js +68 -100
- package/button/Button.stories.tsx +33 -132
- package/button/Button.test.js +19 -16
- package/button/types.d.ts +9 -5
- package/card/Card.js +21 -44
- package/card/Card.test.js +10 -21
- package/card/types.d.ts +5 -5
- package/checkbox/Checkbox.js +85 -120
- package/checkbox/Checkbox.stories.tsx +16 -54
- package/checkbox/Checkbox.test.js +107 -63
- package/checkbox/types.d.ts +8 -4
- package/chip/Chip.js +12 -31
- package/chip/Chip.stories.tsx +1 -1
- package/chip/Chip.test.js +15 -28
- package/chip/types.d.ts +4 -4
- package/common/coreTokens.d.ts +105 -14
- package/common/coreTokens.js +41 -24
- package/common/utils.js +2 -8
- package/common/variables.d.ts +52 -139
- package/common/variables.js +63 -157
- package/container/Container.d.ts +4 -0
- package/container/Container.js +194 -0
- package/container/Container.stories.tsx +214 -0
- package/container/types.d.ts +74 -0
- package/contextual-menu/ContextualMenu.d.ts +7 -0
- package/contextual-menu/ContextualMenu.js +71 -0
- package/contextual-menu/ContextualMenu.stories.tsx +182 -0
- package/contextual-menu/ContextualMenu.test.js +71 -0
- package/contextual-menu/MenuItemAction.d.ts +4 -0
- package/contextual-menu/MenuItemAction.js +46 -0
- package/contextual-menu/types.d.ts +22 -0
- package/contextual-menu/types.js +5 -0
- package/date-input/Calendar.js +15 -59
- package/date-input/DateInput.js +50 -96
- package/date-input/DateInput.stories.tsx +11 -30
- package/date-input/DateInput.test.js +674 -701
- package/date-input/DatePicker.js +11 -42
- package/date-input/Icons.d.ts +6 -6
- package/date-input/Icons.js +6 -23
- package/date-input/YearPicker.js +8 -34
- package/date-input/types.d.ts +28 -22
- package/dialog/Dialog.js +13 -40
- package/dialog/Dialog.stories.tsx +170 -0
- package/dialog/Dialog.test.js +125 -187
- package/dialog/types.d.ts +18 -13
- package/divider/Divider.d.ts +4 -0
- package/divider/Divider.js +36 -0
- package/divider/Divider.stories.tsx +223 -0
- package/divider/Divider.test.js +38 -0
- package/divider/types.d.ts +21 -0
- package/divider/types.js +5 -0
- package/dropdown/Dropdown.js +59 -128
- package/dropdown/Dropdown.stories.tsx +5 -16
- package/dropdown/Dropdown.test.js +391 -378
- package/dropdown/DropdownMenu.js +8 -19
- package/dropdown/DropdownMenuItem.js +11 -20
- package/dropdown/types.d.ts +20 -24
- package/file-input/FileInput.js +180 -248
- package/file-input/FileInput.stories.tsx +1 -1
- package/file-input/FileInput.test.js +356 -354
- package/file-input/FileItem.js +14 -41
- package/file-input/types.d.ts +10 -10
- package/flex/Flex.js +25 -39
- package/flex/types.d.ts +6 -6
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +70 -102
- package/footer/Footer.stories.tsx +37 -6
- package/footer/Footer.test.js +21 -33
- package/footer/Icons.d.ts +3 -2
- package/footer/Icons.js +66 -7
- package/footer/types.d.ts +25 -21
- package/grid/Grid.d.ts +1 -1
- package/grid/Grid.js +2 -17
- package/grid/Grid.stories.tsx +38 -38
- package/grid/types.d.ts +10 -10
- package/header/Header.d.ts +1 -1
- package/header/Header.js +28 -84
- package/header/Header.test.js +12 -25
- package/header/Icons.d.ts +2 -2
- package/header/Icons.js +2 -7
- package/header/types.d.ts +7 -8
- package/heading/Heading.js +9 -31
- package/heading/Heading.test.js +70 -87
- package/heading/types.d.ts +7 -7
- package/icon/Icon.d.ts +4 -0
- package/icon/Icon.js +33 -0
- package/icon/Icon.stories.tsx +28 -0
- package/icon/types.d.ts +4 -0
- package/icon/types.js +5 -0
- package/image/Image.d.ts +4 -0
- package/image/Image.js +70 -0
- package/image/Image.stories.tsx +129 -0
- package/image/types.d.ts +72 -0
- package/image/types.js +5 -0
- package/inset/Inset.js +13 -21
- package/inset/types.d.ts +2 -2
- package/layout/ApplicationLayout.d.ts +2 -2
- package/layout/ApplicationLayout.js +29 -66
- package/layout/ApplicationLayout.stories.tsx +1 -1
- package/layout/Icons.d.ts +8 -5
- package/layout/Icons.js +51 -59
- package/layout/types.d.ts +3 -3
- package/link/Link.js +21 -42
- package/link/Link.test.js +23 -41
- package/link/types.d.ts +14 -14
- package/main.d.ts +8 -4
- package/main.js +39 -59
- package/nav-tabs/NavTabs.d.ts +1 -2
- package/nav-tabs/NavTabs.js +19 -48
- package/nav-tabs/NavTabs.stories.tsx +7 -5
- package/nav-tabs/NavTabs.test.js +38 -44
- package/nav-tabs/NavTabsContext.d.ts +3 -0
- package/nav-tabs/NavTabsContext.js +8 -0
- package/nav-tabs/Tab.js +24 -52
- package/nav-tabs/types.d.ts +9 -9
- package/number-input/NumberInput.js +46 -36
- package/number-input/NumberInput.stories.tsx +42 -26
- package/number-input/NumberInput.test.js +859 -412
- package/number-input/NumberInputContext.d.ts +3 -4
- package/number-input/NumberInputContext.js +3 -14
- package/number-input/types.d.ts +17 -5
- package/package.json +30 -28
- package/paginator/Icons.d.ts +5 -5
- package/paginator/Icons.js +5 -19
- package/paginator/Paginator.js +15 -43
- package/paginator/Paginator.test.js +224 -207
- package/paginator/types.d.ts +3 -3
- package/paragraph/Paragraph.js +3 -19
- package/paragraph/Paragraph.stories.tsx +0 -17
- package/password-input/Icons.d.ts +6 -0
- package/password-input/Icons.js +35 -0
- package/password-input/PasswordInput.js +57 -126
- package/password-input/PasswordInput.stories.tsx +1 -33
- package/password-input/PasswordInput.test.js +157 -140
- package/password-input/types.d.ts +8 -7
- package/progress-bar/ProgressBar.js +21 -53
- package/progress-bar/{ProgressBar.stories.jsx → ProgressBar.stories.tsx} +1 -1
- package/progress-bar/ProgressBar.test.js +35 -52
- package/progress-bar/types.d.ts +3 -3
- package/quick-nav/QuickNav.js +4 -27
- package/quick-nav/QuickNav.stories.tsx +1 -1
- package/quick-nav/types.d.ts +10 -10
- package/radio-group/Radio.d.ts +1 -1
- package/radio-group/Radio.js +22 -54
- package/radio-group/RadioGroup.js +37 -83
- package/radio-group/RadioGroup.stories.tsx +10 -10
- package/radio-group/RadioGroup.test.js +504 -470
- package/radio-group/types.d.ts +8 -8
- package/resultset-table/Icons.d.ts +7 -0
- package/{resultsetTable → resultset-table}/Icons.js +1 -5
- package/resultset-table/ResultsetTable.d.ts +7 -0
- package/{resultsetTable → resultset-table}/ResultsetTable.js +44 -69
- package/{resultsetTable → resultset-table}/ResultsetTable.stories.tsx +106 -5
- package/{resultsetTable → resultset-table}/ResultsetTable.test.js +148 -92
- package/{resultsetTable → resultset-table}/types.d.ts +44 -11
- package/resultset-table/types.js +5 -0
- package/select/Icons.d.ts +7 -7
- package/select/Icons.js +1 -5
- package/select/Listbox.js +13 -39
- package/select/Option.js +17 -27
- package/select/Select.js +87 -163
- package/select/Select.stories.tsx +3 -3
- package/select/Select.test.js +1946 -1804
- package/select/types.d.ts +14 -15
- package/sidenav/Icons.d.ts +4 -4
- package/sidenav/Icons.js +1 -5
- package/sidenav/Sidenav.js +29 -70
- package/sidenav/Sidenav.test.js +3 -10
- package/{layout → sidenav}/SidenavContext.d.ts +1 -1
- package/{layout → sidenav}/SidenavContext.js +3 -9
- package/sidenav/types.d.ts +18 -18
- package/slider/Slider.js +68 -125
- package/slider/Slider.test.js +107 -103
- package/slider/types.d.ts +4 -4
- package/spinner/Spinner.js +16 -54
- package/spinner/Spinner.test.js +25 -34
- package/spinner/types.d.ts +3 -3
- package/status-light/StatusLight.d.ts +4 -0
- package/status-light/StatusLight.js +51 -0
- package/status-light/StatusLight.stories.tsx +74 -0
- package/status-light/StatusLight.test.js +25 -0
- package/status-light/types.d.ts +17 -0
- package/status-light/types.js +5 -0
- package/switch/Switch.js +49 -97
- package/switch/Switch.stories.tsx +0 -34
- package/switch/Switch.test.js +51 -96
- package/switch/types.d.ts +4 -4
- package/table/DropdownTheme.js +62 -0
- package/table/Table.d.ts +6 -2
- package/table/Table.js +76 -33
- package/table/{Table.stories.jsx → Table.stories.tsx} +297 -2
- package/table/Table.test.js +93 -6
- package/table/types.d.ts +34 -6
- package/tabs/Tab.js +17 -33
- package/tabs/Tabs.js +52 -129
- package/tabs/Tabs.stories.tsx +1 -1
- package/tabs/Tabs.test.js +62 -118
- package/tabs/types.d.ts +19 -19
- package/tag/Tag.js +21 -51
- package/tag/Tag.test.js +19 -30
- package/tag/types.d.ts +7 -7
- package/text-input/Suggestion.js +9 -26
- package/text-input/Suggestions.d.ts +1 -1
- package/text-input/Suggestions.js +19 -67
- package/text-input/TextInput.js +221 -327
- package/text-input/TextInput.stories.tsx +49 -153
- package/text-input/TextInput.test.js +1227 -1194
- package/text-input/types.d.ts +25 -17
- package/textarea/Textarea.js +67 -109
- package/textarea/{Textarea.stories.jsx → Textarea.stories.tsx} +58 -100
- package/textarea/Textarea.test.js +150 -179
- package/textarea/types.d.ts +9 -5
- package/toggle-group/ToggleGroup.js +90 -107
- package/toggle-group/ToggleGroup.stories.tsx +7 -4
- package/toggle-group/ToggleGroup.test.js +68 -87
- package/toggle-group/types.d.ts +26 -17
- package/typography/Typography.js +4 -13
- package/typography/types.d.ts +1 -1
- package/useTheme.d.ts +49 -136
- package/useTheme.js +1 -8
- package/useTranslatedLabels.js +1 -7
- package/utils/BaseTypography.d.ts +2 -2
- package/utils/BaseTypography.js +16 -30
- package/utils/FocusLock.js +25 -39
- package/wizard/Wizard.js +14 -49
- package/wizard/Wizard.test.js +53 -80
- package/wizard/types.d.ts +7 -7
- package/common/OpenSans.css +0 -69
- package/common/fonts/OpenSans-Bold.ttf +0 -0
- package/common/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/common/fonts/OpenSans-ExtraBold.ttf +0 -0
- package/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- package/common/fonts/OpenSans-Italic.ttf +0 -0
- package/common/fonts/OpenSans-Light.ttf +0 -0
- package/common/fonts/OpenSans-LightItalic.ttf +0 -0
- package/common/fonts/OpenSans-Regular.ttf +0 -0
- package/common/fonts/OpenSans-SemiBold.ttf +0 -0
- package/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
- package/number-input/numberInputContextTypes.d.ts +0 -19
- package/resultsetTable/Icons.d.ts +0 -7
- package/resultsetTable/ResultsetTable.d.ts +0 -4
- package/slider/Slider.stories.tsx +0 -240
- package/text-input/Icons.d.ts +0 -8
- package/text-input/Icons.js +0 -60
- /package/{resultsetTable → action-icon}/types.js +0 -0
- /package/{number-input/numberInputContextTypes.js → container/types.js} +0 -0
- /package/spinner/{Spinner.stories.jsx → Spinner.stories.tsx} +0 -0
package/file-input/FileItem.js
CHANGED
|
@@ -1,32 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports["default"] = void 0;
|
|
11
|
-
|
|
12
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
-
|
|
14
10
|
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
|
|
16
11
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
17
|
-
|
|
18
|
-
var _main = require("../main");
|
|
19
|
-
|
|
12
|
+
var _Flex = _interopRequireDefault(require("../flex/Flex"));
|
|
20
13
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
21
|
-
|
|
22
14
|
var _useTranslatedLabels = _interopRequireDefault(require("../useTranslatedLabels"));
|
|
23
|
-
|
|
24
15
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(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; }
|
|
29
|
-
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
30
18
|
var deleteIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
31
19
|
xmlns: "http://www.w3.org/2000/svg",
|
|
32
20
|
width: "24",
|
|
@@ -39,7 +27,6 @@ var deleteIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
|
39
27
|
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
40
28
|
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"
|
|
41
29
|
}));
|
|
42
|
-
|
|
43
30
|
var errorIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
44
31
|
xmlns: "http://www.w3.org/2000/svg",
|
|
45
32
|
height: "24px",
|
|
@@ -49,25 +36,22 @@ var errorIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
|
49
36
|
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
50
37
|
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"
|
|
51
38
|
}));
|
|
52
|
-
|
|
53
39
|
var FileItem = function FileItem(_ref) {
|
|
54
40
|
var _ref$fileName = _ref.fileName,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
41
|
+
fileName = _ref$fileName === void 0 ? "" : _ref$fileName,
|
|
42
|
+
_ref$error = _ref.error,
|
|
43
|
+
error = _ref$error === void 0 ? "" : _ref$error,
|
|
44
|
+
singleFileMode = _ref.singleFileMode,
|
|
45
|
+
showPreview = _ref.showPreview,
|
|
46
|
+
preview = _ref.preview,
|
|
47
|
+
type = _ref.type,
|
|
48
|
+
onDelete = _ref.onDelete,
|
|
49
|
+
tabIndex = _ref.tabIndex;
|
|
64
50
|
var colorsTheme = (0, _useTheme["default"])();
|
|
65
51
|
var translatedLabels = (0, _useTranslatedLabels["default"])();
|
|
66
|
-
|
|
67
52
|
var getIconAriaLabel = function getIconAriaLabel() {
|
|
68
53
|
if (type.includes("video")) return "video";else if (type.includes("audio")) return "audio";else return "file";
|
|
69
54
|
};
|
|
70
|
-
|
|
71
55
|
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
72
56
|
theme: colorsTheme.fileInput
|
|
73
57
|
}, /*#__PURE__*/_react["default"].createElement(MainContainer, {
|
|
@@ -80,7 +64,7 @@ var FileItem = function FileItem(_ref) {
|
|
|
80
64
|
}) : /*#__PURE__*/_react["default"].createElement(IconPreview, {
|
|
81
65
|
error: error,
|
|
82
66
|
"aria-label": getIconAriaLabel()
|
|
83
|
-
}, preview)), /*#__PURE__*/_react["default"].createElement(FileItemContent, null, /*#__PURE__*/_react["default"].createElement(FileName, null, fileName), /*#__PURE__*/_react["default"].createElement(
|
|
67
|
+
}, preview)), /*#__PURE__*/_react["default"].createElement(FileItemContent, null, /*#__PURE__*/_react["default"].createElement(FileName, null, fileName), /*#__PURE__*/_react["default"].createElement(_Flex["default"], {
|
|
84
68
|
gap: "0.25rem"
|
|
85
69
|
}, error && /*#__PURE__*/_react["default"].createElement(ErrorIcon, null, errorIcon), /*#__PURE__*/_react["default"].createElement(DeleteFileAction, {
|
|
86
70
|
onClick: function onClick() {
|
|
@@ -92,7 +76,6 @@ var FileItem = function FileItem(_ref) {
|
|
|
92
76
|
tabIndex: tabIndex
|
|
93
77
|
}, deleteIcon)), error && !singleFileMode && /*#__PURE__*/_react["default"].createElement(ErrorMessage, null, error))));
|
|
94
78
|
};
|
|
95
|
-
|
|
96
79
|
var MainContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n gap: 0.75rem;\n width: ", ";\n padding: ", ";\n ", ";\n border-color: ", ";\n border-width: ", ";\n border-style: ", ";\n border-radius: ", ";\n"])), function (props) {
|
|
97
80
|
return props.singleFileMode ? "230px" : "320px";
|
|
98
81
|
}, function (props) {
|
|
@@ -108,17 +91,13 @@ var MainContainer = _styledComponents["default"].div(_templateObject || (_templa
|
|
|
108
91
|
}, function (props) {
|
|
109
92
|
return props.theme.fileItemBorderRadius;
|
|
110
93
|
});
|
|
111
|
-
|
|
112
94
|
var ImagePreview = _styledComponents["default"].img(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n width: 48px;\n height: 48px;\n border-radius: 2px;\n object-fit: contain;\n"])));
|
|
113
|
-
|
|
114
95
|
var IconPreview = _styledComponents["default"].span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n width: 48px;\n height: 48px;\n padding: 15px;\n border-radius: 2px;\n color: ", ";\n\n svg {\n height: 18px;\n width: 18px;\n }\n"])), function (props) {
|
|
115
96
|
return props.error ? props.theme.errorFilePreviewBackgroundColor : props.theme.filePreviewBackgroundColor;
|
|
116
97
|
}, function (props) {
|
|
117
98
|
return props.error ? props.theme.errorFilePreviewIconColor : props.theme.filePreviewIconColor;
|
|
118
99
|
});
|
|
119
|
-
|
|
120
100
|
var FileItemContent = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n flex-grow: 1;\n display: grid;\n grid-template-columns: auto min-content;\n grid-template-rows: min-content auto;\n column-gap: 0.25rem;\n"])));
|
|
121
|
-
|
|
122
101
|
var FileName = _styledComponents["default"].span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n align-self: center;\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"])), function (props) {
|
|
123
102
|
return props.theme.fileNameFontColor;
|
|
124
103
|
}, function (props) {
|
|
@@ -130,9 +109,7 @@ var FileName = _styledComponents["default"].span(_templateObject5 || (_templateO
|
|
|
130
109
|
}, function (props) {
|
|
131
110
|
return props.theme.fileItemLineHeight;
|
|
132
111
|
});
|
|
133
|
-
|
|
134
112
|
var ErrorIcon = _styledComponents["default"].span(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n padding: 3px;\n height: 18px;\n width: 18px;\n color: #d0011b;\n"])));
|
|
135
|
-
|
|
136
113
|
var DeleteFileAction = _styledComponents["default"].button(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 24px;\n width: 24px;\n font-size: 1rem;\n font-family: ", ";\n border: 1px solid transparent;\n border-radius: 2px;\n background-color: transparent;\n box-shadow: 0 0 0 2px transparent;\n padding: 3px;\n cursor: pointer;\n color: ", ";\n\n svg {\n line-height: 18px;\n }\n &:hover {\n background-color: ", ";\n }\n &:focus,\n &:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n }\n &:active {\n background-color: ", ";\n }\n"])), function (props) {
|
|
137
114
|
return props.theme.fontFamily;
|
|
138
115
|
}, function (props) {
|
|
@@ -144,7 +121,6 @@ var DeleteFileAction = _styledComponents["default"].button(_templateObject7 || (
|
|
|
144
121
|
}, function (props) {
|
|
145
122
|
return props.theme.activeDeleteFileItemBackgroundColor;
|
|
146
123
|
});
|
|
147
|
-
|
|
148
124
|
var ErrorMessage = _styledComponents["default"].span(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n"])), function (props) {
|
|
149
125
|
return props.theme.errorMessageFontColor;
|
|
150
126
|
}, function (props) {
|
|
@@ -156,7 +132,4 @@ var ErrorMessage = _styledComponents["default"].span(_templateObject8 || (_templ
|
|
|
156
132
|
}, function (props) {
|
|
157
133
|
return props.theme.errorMessageLineHeight;
|
|
158
134
|
});
|
|
159
|
-
|
|
160
|
-
var _default = /*#__PURE__*/_react["default"].memo(FileItem);
|
|
161
|
-
|
|
162
|
-
exports["default"] = _default;
|
|
135
|
+
var _default = exports["default"] = /*#__PURE__*/_react["default"].memo(FileItem);
|
package/file-input/types.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
+
type Margin = {
|
|
3
3
|
top?: Space;
|
|
4
4
|
bottom?: Space;
|
|
5
5
|
left?: Space;
|
|
6
6
|
right?: Space;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
export type FileData = {
|
|
9
9
|
/**
|
|
10
10
|
* Selected file.
|
|
11
11
|
*/
|
|
@@ -19,9 +19,9 @@ declare type FileData = {
|
|
|
19
19
|
*/
|
|
20
20
|
preview?: string;
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
type CommonProps = {
|
|
23
23
|
/**
|
|
24
|
-
* Name attribute.
|
|
24
|
+
* @deprecated Name attribute.
|
|
25
25
|
*/
|
|
26
26
|
name?: string;
|
|
27
27
|
/**
|
|
@@ -80,7 +80,7 @@ declare type CommonProps = {
|
|
|
80
80
|
*/
|
|
81
81
|
tabIndex?: number;
|
|
82
82
|
};
|
|
83
|
-
|
|
83
|
+
type DropModeProps = CommonProps & {
|
|
84
84
|
/**
|
|
85
85
|
* Uses one of the available file input modes:
|
|
86
86
|
* 'file': Files are selected by clicking the button and selecting it through the file explorer.
|
|
@@ -94,7 +94,7 @@ declare type DropModeProps = CommonProps & {
|
|
|
94
94
|
*/
|
|
95
95
|
dropAreaLabel?: string;
|
|
96
96
|
};
|
|
97
|
-
|
|
97
|
+
type FileModeProps = CommonProps & {
|
|
98
98
|
/**
|
|
99
99
|
* Uses one of the available file input modes:
|
|
100
100
|
* 'file': Files are selected by clicking the button and selecting it through the file explorer.
|
|
@@ -111,12 +111,12 @@ declare type FileModeProps = CommonProps & {
|
|
|
111
111
|
/**
|
|
112
112
|
* Reference to the component.
|
|
113
113
|
*/
|
|
114
|
-
export
|
|
115
|
-
|
|
114
|
+
export type RefType = HTMLDivElement;
|
|
115
|
+
type Props = DropModeProps | FileModeProps;
|
|
116
116
|
/**
|
|
117
117
|
* Single file item preview.
|
|
118
118
|
*/
|
|
119
|
-
export
|
|
119
|
+
export type FileItemProps = {
|
|
120
120
|
fileName?: string;
|
|
121
121
|
error?: string;
|
|
122
122
|
showPreview: boolean;
|
package/flex/Flex.js
CHANGED
|
@@ -1,46 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
11
|
-
|
|
12
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
-
|
|
14
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
|
-
|
|
16
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
17
|
-
|
|
18
12
|
var _react = _interopRequireDefault(require("react"));
|
|
19
|
-
|
|
20
13
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
21
|
-
|
|
22
14
|
var _templateObject;
|
|
23
|
-
|
|
24
15
|
var _excluded = ["direction", "wrap", "gap", "order", "grow", "shrink", "basis", "children"],
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
_excluded2 = ["justifyContent", "alignItems", "alignContent", "alignSelf"];
|
|
27
17
|
var DxcFlex = function DxcFlex(_ref) {
|
|
28
18
|
var _ref$direction = _ref.direction,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
19
|
+
direction = _ref$direction === void 0 ? "row" : _ref$direction,
|
|
20
|
+
_ref$wrap = _ref.wrap,
|
|
21
|
+
wrap = _ref$wrap === void 0 ? "nowrap" : _ref$wrap,
|
|
22
|
+
_ref$gap = _ref.gap,
|
|
23
|
+
gap = _ref$gap === void 0 ? "0rem" : _ref$gap,
|
|
24
|
+
_ref$order = _ref.order,
|
|
25
|
+
order = _ref$order === void 0 ? 0 : _ref$order,
|
|
26
|
+
_ref$grow = _ref.grow,
|
|
27
|
+
grow = _ref$grow === void 0 ? 0 : _ref$grow,
|
|
28
|
+
_ref$shrink = _ref.shrink,
|
|
29
|
+
shrink = _ref$shrink === void 0 ? 1 : _ref$shrink,
|
|
30
|
+
_ref$basis = _ref.basis,
|
|
31
|
+
basis = _ref$basis === void 0 ? "auto" : _ref$basis,
|
|
32
|
+
children = _ref.children,
|
|
33
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
44
34
|
return /*#__PURE__*/_react["default"].createElement(Flex, (0, _extends2["default"])({
|
|
45
35
|
$direction: direction,
|
|
46
36
|
$wrap: wrap,
|
|
@@ -51,21 +41,17 @@ var DxcFlex = function DxcFlex(_ref) {
|
|
|
51
41
|
$gap: gap
|
|
52
42
|
}, props), children);
|
|
53
43
|
};
|
|
54
|
-
|
|
55
44
|
var Flex = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n ", "\n"])), function (_ref2) {
|
|
56
45
|
var _props$$gap, _props$$gap$rowGap, _props$$gap$columnGap;
|
|
57
|
-
|
|
58
46
|
var _ref2$justifyContent = _ref2.justifyContent,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
47
|
+
justifyContent = _ref2$justifyContent === void 0 ? "flex-start" : _ref2$justifyContent,
|
|
48
|
+
_ref2$alignItems = _ref2.alignItems,
|
|
49
|
+
alignItems = _ref2$alignItems === void 0 ? "stretch" : _ref2$alignItems,
|
|
50
|
+
_ref2$alignContent = _ref2.alignContent,
|
|
51
|
+
alignContent = _ref2$alignContent === void 0 ? "normal" : _ref2$alignContent,
|
|
52
|
+
_ref2$alignSelf = _ref2.alignSelf,
|
|
53
|
+
alignSelf = _ref2$alignSelf === void 0 ? "auto" : _ref2$alignSelf,
|
|
54
|
+
props = (0, _objectWithoutProperties2["default"])(_ref2, _excluded2);
|
|
67
55
|
return "\n flex-direction: ".concat(props.$direction, "; \n flex-wrap: ").concat(props.$wrap, "; \n justify-content: ").concat(justifyContent, "; \n align-items: ").concat(alignItems, ";\n align-content: ").concat(alignContent, ";\n align-self: ").concat(alignSelf, ";\n gap: ").concat(props.$gap != null && typeof props.$gap === "string" ? (_props$$gap = props.$gap) !== null && _props$$gap !== void 0 ? _props$$gap : "" : "", "}\n row-gap: ").concat(props.$gap != null && (0, _typeof2["default"])(props.$gap) === "object" ? (_props$$gap$rowGap = props.$gap.rowGap) !== null && _props$$gap$rowGap !== void 0 ? _props$$gap$rowGap : "" : "", "}\n column-gap: ").concat(props.$gap != null && (0, _typeof2["default"])(props.$gap) === "object" ? (_props$$gap$columnGap = props.$gap.columnGap) !== null && _props$$gap$columnGap !== void 0 ? _props$$gap$columnGap : "" : "", "}\n order: ").concat(props.$order, ";\n flex-grow: ").concat(props.$grow, ";\n flex-shrink: ").concat(props.$shrink, ";\n flex-basis: ").concat(props.$basis, ";\n ");
|
|
68
56
|
});
|
|
69
|
-
|
|
70
|
-
var _default = DxcFlex;
|
|
71
|
-
exports["default"] = _default;
|
|
57
|
+
var _default = exports["default"] = DxcFlex;
|
package/flex/types.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type Spaces = "0rem" | "0.125rem" | "0.25rem" | "0.5rem" | "1rem" | "1.5rem" | "2rem" | "3rem" | "4rem" | "5rem";
|
|
3
|
+
type Gap = {
|
|
4
4
|
rowGap: Spaces;
|
|
5
5
|
columnGap?: Spaces;
|
|
6
6
|
} | {
|
|
7
7
|
rowGap?: Spaces;
|
|
8
|
-
columnGap
|
|
8
|
+
columnGap: Spaces;
|
|
9
9
|
} | Spaces;
|
|
10
|
-
|
|
10
|
+
type CommonProps = {
|
|
11
11
|
/**
|
|
12
12
|
* Sets the justify-content CSS property.
|
|
13
13
|
*
|
|
@@ -33,7 +33,7 @@ declare type CommonProps = {
|
|
|
33
33
|
*/
|
|
34
34
|
alignSelf?: "auto" | "flex-start" | "flex-end" | "center" | "baseline" | "stretch";
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
type Props = CommonProps & {
|
|
37
37
|
/**
|
|
38
38
|
* Sets the flex-direction CSS property.
|
|
39
39
|
*
|
|
@@ -85,7 +85,7 @@ declare type Props = CommonProps & {
|
|
|
85
85
|
*/
|
|
86
86
|
children: React.ReactNode;
|
|
87
87
|
};
|
|
88
|
-
export
|
|
88
|
+
export type StyledProps = CommonProps & {
|
|
89
89
|
$direction?: "row" | "row-reverse" | "column" | "column-reverse";
|
|
90
90
|
$wrap?: "nowrap" | "wrap" | "wrap-reverse";
|
|
91
91
|
$gap?: Spaces | Gap;
|
package/footer/Footer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import FooterPropsType from "./types";
|
|
3
|
-
declare const DxcFooter: ({ socialLinks, bottomLinks, copyright, children, margin, tabIndex, }: FooterPropsType) => JSX.Element;
|
|
3
|
+
declare const DxcFooter: ({ socialLinks, bottomLinks, copyright, children, margin, tabIndex, mode, }: FooterPropsType) => JSX.Element;
|
|
4
4
|
export default DxcFooter;
|
package/footer/Footer.js
CHANGED
|
@@ -1,112 +1,94 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports["default"] = void 0;
|
|
11
|
-
|
|
12
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
|
-
|
|
14
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
15
|
-
|
|
16
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
-
|
|
18
11
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
19
|
-
|
|
20
12
|
var _variables = require("../common/variables");
|
|
21
|
-
|
|
22
13
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
23
|
-
|
|
24
14
|
var _useTranslatedLabels = _interopRequireDefault(require("../useTranslatedLabels"));
|
|
25
|
-
|
|
26
|
-
var _BackgroundColorContext = require("../BackgroundColorContext");
|
|
27
|
-
|
|
28
15
|
var _Icons = require("./Icons");
|
|
29
|
-
|
|
30
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10
|
|
31
|
-
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
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
|
-
|
|
16
|
+
var _Flex = _interopRequireDefault(require("../flex/Flex"));
|
|
17
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
18
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
36
20
|
var DxcFooter = function DxcFooter(_ref) {
|
|
37
21
|
var socialLinks = _ref.socialLinks,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
22
|
+
bottomLinks = _ref.bottomLinks,
|
|
23
|
+
copyright = _ref.copyright,
|
|
24
|
+
children = _ref.children,
|
|
25
|
+
margin = _ref.margin,
|
|
26
|
+
_ref$tabIndex = _ref.tabIndex,
|
|
27
|
+
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex,
|
|
28
|
+
_ref$mode = _ref.mode,
|
|
29
|
+
mode = _ref$mode === void 0 ? "default" : _ref$mode;
|
|
44
30
|
var colorsTheme = (0, _useTheme["default"])();
|
|
45
31
|
var translatedLabels = (0, _useTranslatedLabels["default"])();
|
|
46
32
|
var footerLogo = (0, _react.useMemo)(function () {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
33
|
+
return !colorsTheme.footer.logo ? mode === "default" ? _Icons.dxcLogo : _Icons.dxcSmallLogo : typeof colorsTheme.footer.logo === "string" ? /*#__PURE__*/_react["default"].createElement(LogoImg, {
|
|
34
|
+
mode: mode,
|
|
35
|
+
alt: translatedLabels.formFields.logoAlternativeText,
|
|
36
|
+
src: colorsTheme.footer.logo
|
|
37
|
+
}) : colorsTheme.footer.logo;
|
|
38
|
+
}, [colorsTheme]);
|
|
39
|
+
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
40
|
+
theme: colorsTheme.footer
|
|
41
|
+
}, /*#__PURE__*/_react["default"].createElement(FooterContainer, {
|
|
42
|
+
margin: margin,
|
|
43
|
+
mode: mode
|
|
44
|
+
}, /*#__PURE__*/_react["default"].createElement(_Flex["default"], {
|
|
45
|
+
justifyContent: "space-between",
|
|
46
|
+
alignItems: "center",
|
|
47
|
+
wrap: "wrap",
|
|
48
|
+
gap: "1.5rem"
|
|
49
|
+
}, /*#__PURE__*/_react["default"].createElement(LogoContainer, {
|
|
50
|
+
mode: mode
|
|
51
|
+
}, footerLogo), mode === "default" && /*#__PURE__*/_react["default"].createElement(_Flex["default"], null, socialLinks === null || socialLinks === void 0 ? void 0 : socialLinks.map(function (link, index) {
|
|
61
52
|
return /*#__PURE__*/_react["default"].createElement(SocialAnchor, {
|
|
53
|
+
href: link.href,
|
|
62
54
|
tabIndex: tabIndex,
|
|
55
|
+
title: link.title,
|
|
56
|
+
"aria-label": link.title,
|
|
63
57
|
key: "social".concat(index).concat(link.href),
|
|
64
|
-
index: index
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
58
|
+
index: index
|
|
59
|
+
}, /*#__PURE__*/_react["default"].createElement(SocialIconContainer, null, typeof link.logo === "string" ? /*#__PURE__*/_react["default"].createElement("img", {
|
|
60
|
+
src: link.logo,
|
|
61
|
+
alt: link.title
|
|
68
62
|
}) : link.logo));
|
|
69
|
-
})
|
|
70
|
-
var bottomLink = bottomLinks === null || bottomLinks === void 0 ? void 0 : bottomLinks.map(function (link, index) {
|
|
63
|
+
}))), /*#__PURE__*/_react["default"].createElement(ChildComponents, null, children), mode === "default" && /*#__PURE__*/_react["default"].createElement(BottomContainer, null, /*#__PURE__*/_react["default"].createElement(BottomLinks, null, bottomLinks === null || bottomLinks === void 0 ? void 0 : bottomLinks.map(function (link, index) {
|
|
71
64
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
72
65
|
key: "bottom".concat(index).concat(link.text)
|
|
73
66
|
}, /*#__PURE__*/_react["default"].createElement(BottomLink, {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}, link
|
|
77
|
-
});
|
|
78
|
-
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
79
|
-
theme: colorsTheme.footer
|
|
80
|
-
}, /*#__PURE__*/_react["default"].createElement(FooterContainer, {
|
|
81
|
-
margin: margin
|
|
82
|
-
}, /*#__PURE__*/_react["default"].createElement(FooterHeader, null, /*#__PURE__*/_react["default"].createElement(LogoContainer, null, footerLogo), /*#__PURE__*/_react["default"].createElement(SocialLinkContainer, null, socialLink)), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(ChildComponents, null, /*#__PURE__*/_react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
83
|
-
color: colorsTheme.footer.backgroundColor
|
|
84
|
-
}, children)), /*#__PURE__*/_react["default"].createElement(FooterFooter, {
|
|
85
|
-
className: "footerFooter"
|
|
86
|
-
}, /*#__PURE__*/_react["default"].createElement(BottomLinks, null, bottomLink), /*#__PURE__*/_react["default"].createElement(Copyright, null, copyright || translatedLabels.footer.copyrightText(new Date().getFullYear()))))));
|
|
67
|
+
href: link.href,
|
|
68
|
+
tabIndex: tabIndex
|
|
69
|
+
}, link.text));
|
|
70
|
+
})), /*#__PURE__*/_react["default"].createElement(Copyright, null, copyright || translatedLabels.footer.copyrightText(new Date().getFullYear())))));
|
|
87
71
|
};
|
|
88
|
-
|
|
89
|
-
var FooterContainer = _styledComponents["default"].footer(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n @media (min-width: ", "rem) {\n padding: 24px 36px 24px 36px;\n }\n\n @media (max-width: ", "rem) {\n padding: 20px;\n }\n\n background-color: ", ";\n margin-top: ", ";\n width: 100%;\n box-sizing: border-box;\n min-height: ", ";\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n"])), _variables.responsiveSizes.small, _variables.responsiveSizes.small, function (props) {
|
|
72
|
+
var FooterContainer = _styledComponents["default"].footer(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n box-sizing: border-box;\n display: flex;\n flex-direction: ", ";\n justify-content: space-between;\n margin-top: ", ";\n min-height: ", ";\n width: 100%;\n gap: ", ";\n @media (min-width: ", "rem) {\n padding: ", ";\n }\n @media (max-width: ", "rem) {\n padding: 20px;\n flex-direction: column;\n }\n"])), function (props) {
|
|
90
73
|
return props.theme.backgroundColor;
|
|
91
74
|
}, function (props) {
|
|
92
|
-
return props
|
|
75
|
+
return (props === null || props === void 0 ? void 0 : props.mode) === "default" ? "column" : "row";
|
|
93
76
|
}, function (props) {
|
|
94
|
-
return props.
|
|
95
|
-
})
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
77
|
+
return props.margin ? _variables.spaces[props.margin] : "0px";
|
|
78
|
+
}, function (props) {
|
|
79
|
+
return (props === null || props === void 0 ? void 0 : props.mode) === "default" ? props.theme.height : "40px";
|
|
80
|
+
}, function (props) {
|
|
81
|
+
return (props === null || props === void 0 ? void 0 : props.mode) === "default" ? "0px" : "32px";
|
|
82
|
+
}, _variables.responsiveSizes.small, function (props) {
|
|
83
|
+
return (props === null || props === void 0 ? void 0 : props.mode) === "default" ? "24px 32px" : "12px 32px";
|
|
84
|
+
}, _variables.responsiveSizes.small);
|
|
85
|
+
var BottomContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n\n @media (min-width: ", "rem) {\n flex-direction: row;\n }\n @media (max-width: ", "rem) {\n flex-direction: column;\n align-items: center;\n }\n\n border-top: ", ";\n margin-top: 16px;\n"])), _variables.responsiveSizes.small, _variables.responsiveSizes.small, function (props) {
|
|
100
86
|
return "".concat(props.theme.bottomLinksDividerThickness, " ").concat(props.theme.bottomLinksDividerStyle, " ").concat(props.theme.bottomLinksDividerColor);
|
|
101
87
|
});
|
|
102
|
-
|
|
103
|
-
var
|
|
88
|
+
var ChildComponents = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n min-height: 16px;\n overflow: hidden;\n"])));
|
|
89
|
+
var Copyright = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n padding-top: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n\n @media (min-width: ", "rem) {\n max-width: 40%;\n text-align: right;\n }\n\n @media (max-width: ", "rem) {\n max-width: 100%;\n width: 100%;\n text-align: left;\n }\n"])), function (props) {
|
|
104
90
|
return props.theme.bottomLinksDividerSpacing;
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
var ChildComponents = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n min-height: 16px;\n overflow: hidden;\n"])));
|
|
108
|
-
|
|
109
|
-
var Copyright = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n\n @media (min-width: ", "rem) {\n max-width: 40%;\n text-align: right;\n }\n\n @media (max-width: ", "rem) {\n max-width: 100%;\n width: 100%;\n text-align: left;\n }\n\n padding-top: ", ";\n"])), function (props) {
|
|
91
|
+
}, function (props) {
|
|
110
92
|
return props.theme.copyrightFontFamily;
|
|
111
93
|
}, function (props) {
|
|
112
94
|
return props.theme.copyrightFontSize;
|
|
@@ -116,43 +98,31 @@ var Copyright = _styledComponents["default"].div(_templateObject6 || (_templateO
|
|
|
116
98
|
return props.theme.copyrightFontWeight;
|
|
117
99
|
}, function (props) {
|
|
118
100
|
return props.theme.copyrightFontColor;
|
|
119
|
-
}, _variables.responsiveSizes.small, _variables.responsiveSizes.small
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
var LogoContainer = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n"])), function (props) {
|
|
124
|
-
return props.theme.logoHeight;
|
|
101
|
+
}, _variables.responsiveSizes.small, _variables.responsiveSizes.small);
|
|
102
|
+
var LogoContainer = _styledComponents["default"].span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n"])), function (props) {
|
|
103
|
+
return (props === null || props === void 0 ? void 0 : props.mode) === "default" ? props.theme.logoHeight : "16px";
|
|
125
104
|
}, function (props) {
|
|
126
105
|
return props.theme.logoWidth;
|
|
127
106
|
});
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
return props.theme.logoHeight;
|
|
107
|
+
var LogoImg = _styledComponents["default"].img(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n"])), function (props) {
|
|
108
|
+
return (props === null || props === void 0 ? void 0 : props.mode) === "default" ? props.theme.logoHeight : "16px";
|
|
131
109
|
}, function (props) {
|
|
132
110
|
return props.theme.logoWidth;
|
|
133
111
|
});
|
|
134
|
-
|
|
135
|
-
var SocialLinkContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-self: center;\n"])));
|
|
136
|
-
|
|
137
|
-
var SocialAnchor = _styledComponents["default"].a(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["\n & {\n display: inline-flex;\n margin-left: ", ";\n }\n"])), function (props) {
|
|
112
|
+
var SocialAnchor = _styledComponents["default"].a(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n margin-left: ", ";\n border-radius: 4px;\n\n &:focus {\n outline: 2px solid #0095ff;\n outline-offset: 2px;\n }\n"])), function (props) {
|
|
138
113
|
return props.index === 0 ? "0px" : props.theme.socialLinksGutter;
|
|
139
114
|
});
|
|
140
|
-
|
|
141
|
-
var SocialIconImg = _styledComponents["default"].img(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2["default"])([""])));
|
|
142
|
-
|
|
143
|
-
var SocialIconContainer = _styledComponents["default"].div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])(["\n & {\n display: inline-flex;\n height: ", ";\n width: ", ";\n color: ", ";\n }\n\n overflow: hidden;\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"])), function (props) {
|
|
115
|
+
var SocialIconContainer = _styledComponents["default"].div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n height: ", ";\n width: ", ";\n color: ", ";\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"])), function (props) {
|
|
144
116
|
return props.theme.socialLinksSize;
|
|
145
117
|
}, function (props) {
|
|
146
118
|
return props.theme.socialLinksSize;
|
|
147
119
|
}, function (props) {
|
|
148
120
|
return props.theme.socialLinksColor;
|
|
149
121
|
});
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
})
|
|
154
|
-
|
|
155
|
-
var BottomLink = _styledComponents["default"].a(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2["default"])(["\n text-decoration: ", ";\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n"])), function (props) {
|
|
122
|
+
var BottomLinks = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n flex-wrap: wrap;\n align-self: center;\n padding-top: ", ";\n color: #fff;\n\n @media (min-width: ", "rem) {\n max-width: 60%;\n }\n @media (max-width: ", "rem) {\n max-width: 100%;\n width: 100%;\n }\n\n & > span:not(:first-child):before {\n content: \"\xB7\";\n padding: 0 0.5rem;\n }\n"])), function (props) {
|
|
123
|
+
return props.theme.bottomLinksDividerSpacing;
|
|
124
|
+
}, _variables.responsiveSizes.small, _variables.responsiveSizes.small);
|
|
125
|
+
var BottomLink = _styledComponents["default"].a(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["\n text-decoration: ", ";\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n border-radius: 2px;\n\n &:focus {\n outline: 2px solid #0095ff;\n }\n"])), function (props) {
|
|
156
126
|
return props.theme.bottomLinksTextDecoration;
|
|
157
127
|
}, function (props) {
|
|
158
128
|
return props.theme.bottomLinksFontColor;
|
|
@@ -165,6 +135,4 @@ var BottomLink = _styledComponents["default"].a(_templateObject14 || (_templateO
|
|
|
165
135
|
}, function (props) {
|
|
166
136
|
return props.theme.bottomLinksFontWeight;
|
|
167
137
|
});
|
|
168
|
-
|
|
169
|
-
var _default = DxcFooter;
|
|
170
|
-
exports["default"] = _default;
|
|
138
|
+
var _default = exports["default"] = DxcFooter;
|