@dxc-technology/halstack-react 0.0.0-4254e6c → 0.0.0-4299a60
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 +10 -0
- package/BackgroundColorContext.js +1 -3
- package/ThemeContext.d.ts +15 -0
- package/ThemeContext.js +5 -8
- package/V3Select/V3Select.js +2 -2
- package/V3Textarea/V3Textarea.js +2 -2
- package/accordion/Accordion.d.ts +4 -0
- package/accordion/Accordion.js +14 -45
- package/accordion/types.d.ts +68 -0
- package/accordion/types.js +5 -0
- package/accordion-group/AccordionGroup.d.ts +7 -0
- package/accordion-group/AccordionGroup.js +59 -73
- package/accordion-group/AccordionGroup.stories.tsx +225 -0
- package/accordion-group/types.d.ts +72 -0
- package/accordion-group/types.js +5 -0
- package/alert/Alert.js +2 -2
- package/alert/Alert.stories.tsx +170 -0
- package/alert/types.d.ts +1 -1
- package/badge/Badge.js +1 -1
- package/box/Box.d.ts +4 -0
- package/box/Box.js +6 -32
- package/box/Box.stories.tsx +132 -0
- package/box/types.d.ts +43 -0
- package/box/types.js +5 -0
- package/button/Button.d.ts +1 -1
- package/button/Button.js +9 -12
- package/button/Button.stories.tsx +217 -234
- package/button/types.d.ts +11 -11
- package/card/Card.d.ts +4 -0
- package/card/Card.js +17 -53
- package/card/Card.stories.tsx +201 -0
- package/card/ice-cream.jpg +0 -0
- package/card/types.d.ts +67 -0
- package/card/types.js +5 -0
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Checkbox.stories.tsx +192 -0
- package/checkbox/types.d.ts +3 -4
- package/chip/Chip.d.ts +4 -0
- package/chip/Chip.js +1 -23
- package/chip/Chip.stories.tsx +121 -0
- package/chip/types.d.ts +53 -0
- package/chip/types.js +5 -0
- package/common/variables.js +33 -24
- package/date/Date.js +1 -1
- package/date-input/DateInput.js +1 -1
- package/date-input/DateInput.stories.tsx +138 -0
- package/dialog/Dialog.d.ts +4 -0
- package/dialog/Dialog.js +6 -25
- package/dialog/Dialog.stories.tsx +212 -0
- package/dialog/types.d.ts +43 -0
- package/dialog/types.js +5 -0
- package/dropdown/Dropdown.d.ts +4 -0
- package/dropdown/Dropdown.js +8 -41
- package/dropdown/types.d.ts +89 -0
- package/dropdown/types.js +5 -0
- package/file-input/FileInput.d.ts +4 -0
- package/file-input/FileInput.js +30 -51
- package/file-input/FileItem.d.ts +14 -0
- package/file-input/FileItem.js +10 -19
- package/file-input/types.d.ts +87 -0
- package/file-input/types.js +5 -0
- package/footer/Footer.d.ts +4 -0
- package/footer/Footer.js +6 -37
- package/footer/Footer.stories.jsx +151 -0
- package/footer/types.d.ts +69 -0
- package/footer/types.js +5 -0
- package/header/Header.d.ts +7 -0
- package/header/Header.js +28 -30
- package/header/Header.stories.tsx +162 -0
- package/header/Icons.js +2 -27
- package/header/types.d.ts +47 -0
- package/header/types.js +5 -0
- package/heading/Heading.d.ts +4 -0
- package/heading/Heading.js +7 -24
- package/heading/Heading.stories.tsx +53 -0
- package/heading/types.d.ts +33 -0
- package/heading/types.js +5 -0
- package/input-text/InputText.js +2 -2
- package/layout/ApplicationLayout.d.ts +10 -0
- package/layout/ApplicationLayout.js +8 -18
- package/layout/ApplicationLayout.stories.tsx +171 -0
- package/layout/types.d.ts +57 -0
- package/layout/types.js +5 -0
- package/link/Link.d.ts +3 -0
- package/link/Link.js +4 -26
- package/link/Link.stories.tsx +146 -0
- package/link/types.d.ts +74 -0
- package/link/types.js +5 -0
- package/main.d.ts +2 -2
- package/main.js +2 -2
- package/number-input/NumberInput.d.ts +4 -0
- package/number-input/NumberInput.js +2 -44
- package/number-input/NumberInput.stories.tsx +115 -0
- package/number-input/NumberInputContext.d.ts +4 -0
- package/number-input/NumberInputContext.js +5 -2
- package/number-input/numberInputContextTypes.d.ts +19 -0
- package/number-input/numberInputContextTypes.js +5 -0
- package/number-input/types.d.ts +117 -0
- package/number-input/types.js +5 -0
- package/package.json +1 -1
- package/paginator/Paginator.js +2 -2
- package/paginator/Paginator.stories.tsx +63 -0
- package/password-input/PasswordInput.d.ts +4 -0
- package/password-input/PasswordInput.js +7 -42
- package/password-input/{PasswordInput.stories.jsx → PasswordInput.stories.tsx} +1 -1
- package/password-input/types.d.ts +107 -0
- package/password-input/types.js +5 -0
- package/progress-bar/ProgressBar.d.ts +4 -0
- package/progress-bar/ProgressBar.js +5 -23
- package/progress-bar/ProgressBar.stories.jsx +58 -0
- package/progress-bar/types.d.ts +37 -0
- package/progress-bar/types.js +5 -0
- package/radio/Radio.js +2 -2
- package/radio/Radio.stories.tsx +192 -0
- package/radio/types.d.ts +2 -2
- package/resultsetTable/ResultsetTable.d.ts +4 -0
- package/resultsetTable/ResultsetTable.js +4 -27
- package/resultsetTable/types.d.ts +67 -0
- package/resultsetTable/types.js +5 -0
- package/select/Select.js +2 -2
- package/select/Select.stories.tsx +572 -0
- package/select/index.d.ts +4 -4
- package/sidenav/Sidenav.d.ts +9 -0
- package/sidenav/Sidenav.js +6 -15
- package/sidenav/Sidenav.stories.tsx +165 -0
- package/sidenav/types.d.ts +50 -0
- package/sidenav/types.js +5 -0
- package/slider/Slider.d.ts +4 -0
- package/slider/Slider.js +61 -84
- package/slider/Slider.stories.tsx +177 -0
- package/slider/types.d.ts +78 -0
- package/slider/types.js +5 -0
- package/spinner/Spinner.d.ts +4 -0
- package/spinner/Spinner.js +8 -25
- package/spinner/Spinner.stories.jsx +102 -0
- package/spinner/types.d.ts +32 -0
- package/spinner/types.js +5 -0
- package/switch/Switch.js +4 -4
- package/switch/Switch.stories.tsx +160 -0
- package/table/Table.d.ts +4 -0
- package/table/Table.js +3 -3
- package/table/Table.stories.jsx +276 -0
- package/table/types.d.ts +21 -0
- package/table/types.js +5 -0
- package/tabs/Tabs.d.ts +4 -0
- package/tabs/Tabs.js +9 -55
- package/tabs/Tabs.stories.tsx +121 -0
- package/tabs/types.d.ts +70 -0
- package/tabs/types.js +5 -0
- package/tag/Tag.d.ts +4 -0
- package/tag/Tag.js +21 -36
- package/tag/Tag.stories.tsx +145 -0
- package/tag/types.d.ts +60 -0
- package/tag/types.js +5 -0
- package/text-input/TextInput.d.ts +4 -0
- package/text-input/TextInput.js +28 -65
- package/text-input/TextInput.stories.tsx +456 -0
- package/text-input/types.d.ts +159 -0
- package/text-input/types.js +5 -0
- package/textarea/Textarea.js +15 -16
- package/textarea/Textarea.stories.jsx +135 -0
- package/textarea/index.d.ts +18 -8
- package/toggle/Toggle.js +1 -1
- package/toggle-group/ToggleGroup.d.ts +4 -0
- package/toggle-group/ToggleGroup.js +6 -32
- package/toggle-group/ToggleGroup.stories.tsx +178 -0
- package/toggle-group/types.d.ts +84 -0
- package/toggle-group/types.js +5 -0
- package/upload/buttons-upload/ButtonsUpload.js +2 -2
- package/upload/dragAndDropArea/DragAndDropArea.js +2 -2
- package/upload/file-upload/FileToUpload.js +1 -1
- package/upload/files-upload/FilesToUpload.js +1 -1
- package/upload/transaction/Transaction.js +2 -2
- package/upload/transactions/Transactions.js +1 -1
- package/useTheme.d.ts +2 -0
- package/useTheme.js +1 -1
- package/wizard/Wizard.d.ts +4 -0
- package/wizard/Wizard.js +12 -52
- package/wizard/Wizard.stories.jsx +224 -0
- package/wizard/types.d.ts +64 -0
- package/wizard/types.js +5 -0
- package/accordion/index.d.ts +0 -28
- package/accordion-group/index.d.ts +0 -16
- package/box/index.d.ts +0 -25
- package/card/index.d.ts +0 -22
- package/chip/index.d.ts +0 -22
- package/dialog/index.d.ts +0 -18
- package/dropdown/index.d.ts +0 -26
- package/file-input/index.d.ts +0 -81
- package/footer/index.d.ts +0 -25
- package/header/index.d.ts +0 -25
- package/heading/index.d.ts +0 -17
- package/link/index.d.ts +0 -23
- package/number-input/index.d.ts +0 -113
- package/password-input/index.d.ts +0 -94
- package/progress-bar/index.d.ts +0 -18
- package/resultsetTable/index.d.ts +0 -19
- package/sidenav/index.d.ts +0 -13
- package/slider/index.d.ts +0 -29
- package/spinner/index.d.ts +0 -17
- package/table/index.d.ts +0 -13
- package/tabs/index.d.ts +0 -19
- package/tag/index.d.ts +0 -24
- package/text-input/index.d.ts +0 -135
- package/toggle-group/index.d.ts +0 -21
- package/wizard/index.d.ts +0 -18
package/file-input/FileItem.js
CHANGED
|
@@ -13,11 +13,9 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
13
13
|
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
15
|
|
|
16
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
-
|
|
18
16
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
19
17
|
|
|
20
|
-
var _useTheme = _interopRequireDefault(require("../useTheme
|
|
18
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
21
19
|
|
|
22
20
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
23
21
|
|
|
@@ -59,7 +57,8 @@ var FileItem = function FileItem(_ref) {
|
|
|
59
57
|
preview = _ref.preview,
|
|
60
58
|
type = _ref.type,
|
|
61
59
|
numFiles = _ref.numFiles,
|
|
62
|
-
onDelete = _ref.onDelete
|
|
60
|
+
onDelete = _ref.onDelete,
|
|
61
|
+
tabIndex = _ref.tabIndex;
|
|
63
62
|
var colorsTheme = (0, _useTheme["default"])();
|
|
64
63
|
var isImage = type.includes("image");
|
|
65
64
|
|
|
@@ -104,12 +103,13 @@ var FileItem = function FileItem(_ref) {
|
|
|
104
103
|
onClick: function onClick() {
|
|
105
104
|
return onDelete(name);
|
|
106
105
|
},
|
|
107
|
-
"aria-label": "Remove ".concat(name)
|
|
106
|
+
"aria-label": "Remove ".concat(name),
|
|
107
|
+
tabIndex: tabIndex
|
|
108
108
|
}, deleteIcon)), error && (multiple || numFiles > 1) && /*#__PURE__*/_react["default"].createElement(ErrorMessage, null, error))));
|
|
109
109
|
};
|
|
110
110
|
|
|
111
111
|
var Container = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n padding: ", ";\n background-color: ", ";\n border-radius: ", ";\n width: ", ";\n min-height: ", ";\n border-color: ", ";\n border-width: ", ";\n border-style: ", ";\n display: flex;\n justify-content: center;\n"])), function (props) {
|
|
112
|
-
return props.showPreview ? "8px" : "8px 8px 8px 16px";
|
|
112
|
+
return props.showPreview ? "calc(8px - ".concat(props.theme.fileItemBorderThickness, ") 8px") : "calc(8px - ".concat(props.theme.fileItemBorderThickness, ") 8px calc(8px - ").concat(props.theme.fileItemBorderThickness, ") 16px");
|
|
113
113
|
}, function (props) {
|
|
114
114
|
return props.error && props.theme.errorFileItemBackgroundColor;
|
|
115
115
|
}, function (props) {
|
|
@@ -156,12 +156,14 @@ var FileName = _styledComponents["default"].span(_templateObject7 || (_templateO
|
|
|
156
156
|
|
|
157
157
|
var ErrorIcon = _styledComponents["default"].span(_templateObject8 || (_templateObject8 = (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"])));
|
|
158
158
|
|
|
159
|
-
var DeleteIcon = _styledComponents["default"].button(_templateObject9 || (_templateObject9 = (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:
|
|
159
|
+
var DeleteIcon = _styledComponents["default"].button(_templateObject9 || (_templateObject9 = (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 margin-left: 4px;\n background-color: transparent;\n box-shadow: 0 0 0 2px transparent;\n padding: 3px;\n cursor: pointer;\n svg {\n line-height: 18px;\n }\n &:hover {\n background-color: ", ";\n }\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n }\n &:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n }\n &:active {\n background-color: ", ";\n }\n"])), function (props) {
|
|
160
160
|
return props.theme.fontFamily;
|
|
161
161
|
}, function (props) {
|
|
162
162
|
return props.error ? props.theme.errorHoverDeleteFileItemBackgroundColor : props.theme.hoverDeleteFileItemBackgroundColor;
|
|
163
163
|
}, function (props) {
|
|
164
|
-
return props.
|
|
164
|
+
return props.theme.focusActionBorderColor;
|
|
165
|
+
}, function (props) {
|
|
166
|
+
return props.theme.focusActionBorderColor;
|
|
165
167
|
}, function (props) {
|
|
166
168
|
return props.error ? props.theme.errorActiveDeleteFileItemBackgroundColor : props.theme.activeDeleteFileItemBackgroundColor;
|
|
167
169
|
});
|
|
@@ -178,16 +180,5 @@ var ErrorMessage = _styledComponents["default"].span(_templateObject10 || (_temp
|
|
|
178
180
|
return props.theme.errorMessageLineHeight;
|
|
179
181
|
});
|
|
180
182
|
|
|
181
|
-
FileItem.propTypes = {
|
|
182
|
-
mode: _propTypes["default"].string,
|
|
183
|
-
multiple: _propTypes["default"].bool,
|
|
184
|
-
name: _propTypes["default"].string,
|
|
185
|
-
type: _propTypes["default"].string,
|
|
186
|
-
showPreview: _propTypes["default"]["boolean"],
|
|
187
|
-
numFiles: _propTypes["default"].number,
|
|
188
|
-
preview: _propTypes["default"].string,
|
|
189
|
-
error: _propTypes["default"].string,
|
|
190
|
-
onDelete: _propTypes["default"].func
|
|
191
|
-
};
|
|
192
183
|
var _default = FileItem;
|
|
193
184
|
exports["default"] = _default;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
+
declare type Margin = {
|
|
3
|
+
top?: Space;
|
|
4
|
+
bottom?: Space;
|
|
5
|
+
left?: Space;
|
|
6
|
+
right?: Space;
|
|
7
|
+
};
|
|
8
|
+
declare type FileData = {
|
|
9
|
+
/**
|
|
10
|
+
* Selected file.
|
|
11
|
+
*/
|
|
12
|
+
file: File;
|
|
13
|
+
/**
|
|
14
|
+
* Error of the file. If it is defined, it will be shown and the file item will be mark as invalid.
|
|
15
|
+
*/
|
|
16
|
+
error?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Preview of the file.
|
|
19
|
+
*/
|
|
20
|
+
preview?: string;
|
|
21
|
+
};
|
|
22
|
+
declare type Props = {
|
|
23
|
+
/**
|
|
24
|
+
* Name attribute.
|
|
25
|
+
*/
|
|
26
|
+
name?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Text to be placed above the component.
|
|
29
|
+
*/
|
|
30
|
+
label?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Uses one of the available file input modes:
|
|
33
|
+
* 'file': Files are selected by clicking the button and selecting it through the file explorer.
|
|
34
|
+
* 'filedrop': Files can be selected by clicking the button and selecting it through the file explorer or by dropping them inside the drag and drop area.
|
|
35
|
+
* 'dropzone': Files can be selected by clicking the button and selecting it through the file explorer or by dropping them inside the drag and drop area.
|
|
36
|
+
* The drag and drop area of this mode is bigger than the one of the filedrop mode.
|
|
37
|
+
*/
|
|
38
|
+
mode?: "file" | "filedrop" | "dropzone";
|
|
39
|
+
/**
|
|
40
|
+
* Helper text to be placed above the component.
|
|
41
|
+
*/
|
|
42
|
+
helperText?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The file types that the component accepts. Its value must be one of all the possible values of the HTML file input's accept attribute.
|
|
45
|
+
*/
|
|
46
|
+
accept?: string;
|
|
47
|
+
/**
|
|
48
|
+
* An array of files representing the selected files.
|
|
49
|
+
*/
|
|
50
|
+
value: FileData[];
|
|
51
|
+
/**
|
|
52
|
+
* The minimum file size (in bytes) allowed. If the size of the file does not comply the minSize, the file will have an error.
|
|
53
|
+
*/
|
|
54
|
+
minSize?: number;
|
|
55
|
+
/**
|
|
56
|
+
* The maximum file size (in bytes) allowed. If the size of the file does not comply the maxSize, the file will have an error.
|
|
57
|
+
*/
|
|
58
|
+
maxSize?: number;
|
|
59
|
+
/**
|
|
60
|
+
* If true, if the file is an image, a preview of it will be shown. If not, an icon refering to the file type will be shown.
|
|
61
|
+
*/
|
|
62
|
+
showPreview?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* If true, the component allows multiple file items and will show all of them. If false, only one file will be shown, and if there is already one
|
|
65
|
+
* file selected and a new one is chosen, it will be replaced by the new selected one.
|
|
66
|
+
*/
|
|
67
|
+
multiple?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* If true, the component will be disabled.
|
|
70
|
+
*/
|
|
71
|
+
disabled?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* This function will be called when the user selects or drops a file. The list of files will be sent as a parameter.
|
|
74
|
+
* In this function, the files can be updated or returned as they come. These files must be passed to the value in order to be shown.
|
|
75
|
+
*/
|
|
76
|
+
callbackFile: (files: FileData[]) => void;
|
|
77
|
+
/**
|
|
78
|
+
* Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
79
|
+
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
|
|
80
|
+
*/
|
|
81
|
+
margin?: Space | Margin;
|
|
82
|
+
/**
|
|
83
|
+
* Value of the tabindex attribute.
|
|
84
|
+
*/
|
|
85
|
+
tabIndex?: number;
|
|
86
|
+
};
|
|
87
|
+
export default Props;
|
package/footer/Footer.js
CHANGED
|
@@ -9,8 +9,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports["default"] = void 0;
|
|
11
11
|
|
|
12
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
-
|
|
14
12
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
15
13
|
|
|
16
14
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
@@ -21,13 +19,11 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
21
19
|
|
|
22
20
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
23
21
|
|
|
24
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
25
|
-
|
|
26
22
|
var _variables = require("../common/variables.js");
|
|
27
23
|
|
|
28
|
-
var _useTheme = _interopRequireDefault(require("../useTheme
|
|
24
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
29
25
|
|
|
30
|
-
var _BackgroundColorContext = require("../BackgroundColorContext
|
|
26
|
+
var _BackgroundColorContext = require("../BackgroundColorContext");
|
|
31
27
|
|
|
32
28
|
var _Icons = _interopRequireDefault(require("./Icons"));
|
|
33
29
|
|
|
@@ -38,10 +34,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
38
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; }
|
|
39
35
|
|
|
40
36
|
var DxcFooter = function DxcFooter(_ref) {
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
_ref$bottomLinks = _ref.bottomLinks,
|
|
44
|
-
bottomLinks = _ref$bottomLinks === void 0 ? [] : _ref$bottomLinks,
|
|
37
|
+
var socialLinks = _ref.socialLinks,
|
|
38
|
+
bottomLinks = _ref.bottomLinks,
|
|
45
39
|
_ref$copyright = _ref.copyright,
|
|
46
40
|
copyright = _ref$copyright === void 0 ? "" : _ref$copyright,
|
|
47
41
|
children = _ref.children,
|
|
@@ -110,7 +104,7 @@ var DxcFooter = function DxcFooter(_ref) {
|
|
|
110
104
|
window.removeEventListener("resize", handleEventListener);
|
|
111
105
|
};
|
|
112
106
|
}, []);
|
|
113
|
-
var socialLink = socialLinks.map(function (link, index) {
|
|
107
|
+
var socialLink = socialLinks === null || socialLinks === void 0 ? void 0 : socialLinks.map(function (link, index) {
|
|
114
108
|
return /*#__PURE__*/_react["default"].createElement(SocialAnchor, {
|
|
115
109
|
tabIndex: tabIndex,
|
|
116
110
|
key: "social".concat(index).concat(link.href),
|
|
@@ -120,7 +114,7 @@ var DxcFooter = function DxcFooter(_ref) {
|
|
|
120
114
|
src: link.logoSrc
|
|
121
115
|
}));
|
|
122
116
|
});
|
|
123
|
-
var bottomLink = bottomLinks.map(function (link, index) {
|
|
117
|
+
var bottomLink = bottomLinks === null || bottomLinks === void 0 ? void 0 : bottomLinks.map(function (link, index) {
|
|
124
118
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
125
119
|
key: "bottom".concat(index).concat(link.text)
|
|
126
120
|
}, /*#__PURE__*/_react["default"].createElement(BottomLink, {
|
|
@@ -268,30 +262,5 @@ var BottomLink = _styledComponents["default"].a(_templateObject13 || (_templateO
|
|
|
268
262
|
return props.theme.bottomLinksFontWeight;
|
|
269
263
|
});
|
|
270
264
|
|
|
271
|
-
DxcFooter.propTypes = {
|
|
272
|
-
socialLinks: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
|
273
|
-
logo: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
|
|
274
|
-
logoSrc: _propTypes["default"].string.isRequired,
|
|
275
|
-
href: _propTypes["default"].string
|
|
276
|
-
})),
|
|
277
|
-
bottomLinks: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
|
278
|
-
text: _propTypes["default"].string.isRequired,
|
|
279
|
-
href: _propTypes["default"].string
|
|
280
|
-
})),
|
|
281
|
-
copyright: _propTypes["default"].string,
|
|
282
|
-
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
283
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
284
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
285
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
286
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
287
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
288
|
-
padding: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
289
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
290
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
291
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
292
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
293
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
294
|
-
tabIndex: _propTypes["default"].number
|
|
295
|
-
};
|
|
296
265
|
var _default = DxcFooter;
|
|
297
266
|
exports["default"] = _default;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import DxcFooter from "./Footer";
|
|
3
|
+
import Title from "../../.storybook/components/Title";
|
|
4
|
+
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
5
|
+
|
|
6
|
+
const social = [
|
|
7
|
+
{
|
|
8
|
+
href: "https://www.linkedin.com/company/dxctechnology",
|
|
9
|
+
logo: (
|
|
10
|
+
<svg version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 438.536 438.536" fill="currentColor">
|
|
11
|
+
<g>
|
|
12
|
+
<path
|
|
13
|
+
d="M414.41,24.123C398.333,8.042,378.963,0,356.315,0H82.228C59.58,0,40.21,8.042,24.126,24.123
|
|
14
|
+
C8.045,40.207,0.003,59.576,0.003,82.225v274.084c0,22.647,8.042,42.018,24.123,58.102c16.084,16.084,35.454,24.126,58.102,24.126
|
|
15
|
+
h274.084c22.648,0,42.018-8.042,58.095-24.126c16.084-16.084,24.126-35.454,24.126-58.102V82.225
|
|
16
|
+
C438.532,59.576,430.49,40.204,414.41,24.123z M133.618,367.157H67.666V169.016h65.952V367.157z M127.626,132.332
|
|
17
|
+
c-6.851,6.567-15.893,9.851-27.124,9.851h-0.288c-10.848,0-19.648-3.284-26.407-9.851c-6.76-6.567-10.138-14.703-10.138-24.41
|
|
18
|
+
c0-9.897,3.476-18.083,10.421-24.556c6.95-6.471,15.942-9.708,26.98-9.708c11.039,0,19.89,3.237,26.553,9.708
|
|
19
|
+
c6.661,6.473,10.088,14.659,10.277,24.556C137.899,117.625,134.477,125.761,127.626,132.332z M370.873,367.157h-65.952v-105.92
|
|
20
|
+
c0-29.879-11.036-44.823-33.116-44.823c-8.374,0-15.42,2.331-21.128,6.995c-5.715,4.661-9.996,10.324-12.847,16.991
|
|
21
|
+
c-1.335,3.422-1.999,8.75-1.999,15.981v110.775h-65.952c0.571-119.529,0.571-185.579,0-198.142h65.952v27.974
|
|
22
|
+
c13.867-21.681,33.558-32.544,59.101-32.544c22.84,0,41.21,7.52,55.104,22.554c13.895,15.037,20.841,37.214,20.841,66.519v113.64
|
|
23
|
+
H370.873z"
|
|
24
|
+
/>
|
|
25
|
+
</g>
|
|
26
|
+
</svg>
|
|
27
|
+
),
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
href: "https://twitter.com/dxctechnology",
|
|
31
|
+
logo: (
|
|
32
|
+
<svg version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 438.536 438.536" fill="currentColor">
|
|
33
|
+
<g>
|
|
34
|
+
<path
|
|
35
|
+
d="M414.41,24.123C398.333,8.042,378.963,0,356.315,0H82.228C59.58,0,40.21,8.042,24.126,24.123
|
|
36
|
+
C8.045,40.207,0.003,59.576,0.003,82.225v274.084c0,22.647,8.042,42.018,24.123,58.102c16.084,16.084,35.454,24.126,58.102,24.126
|
|
37
|
+
h274.084c22.648,0,42.018-8.042,58.095-24.126c16.084-16.084,24.126-35.454,24.126-58.102V82.225
|
|
38
|
+
C438.532,59.576,430.49,40.204,414.41,24.123z M335.471,168.735c0.191,1.713,0.288,4.278,0.288,7.71
|
|
39
|
+
c0,15.989-2.334,32.025-6.995,48.104c-4.661,16.087-11.8,31.504-21.416,46.254c-9.606,14.749-21.074,27.791-34.396,39.115
|
|
40
|
+
c-13.325,11.32-29.311,20.365-47.968,27.117c-18.648,6.762-38.637,10.143-59.953,10.143c-33.116,0-63.76-8.952-91.931-26.836
|
|
41
|
+
c4.568,0.568,9.329,0.855,14.275,0.855c27.6,0,52.439-8.565,74.519-25.7c-12.941-0.185-24.506-4.179-34.688-11.991
|
|
42
|
+
c-10.185-7.803-17.273-17.699-21.271-29.691c4.947,0.76,8.658,1.137,11.132,1.137c4.187,0,9.042-0.76,14.56-2.279
|
|
43
|
+
c-13.894-2.669-25.598-9.562-35.115-20.697c-9.519-11.136-14.277-23.84-14.277-38.114v-0.571
|
|
44
|
+
c10.085,4.755,19.602,7.229,28.549,7.422c-17.321-11.613-25.981-28.265-25.981-49.963c0-10.66,2.758-20.747,8.278-30.264
|
|
45
|
+
c15.035,18.464,33.311,33.213,54.816,44.252c21.507,11.038,44.54,17.227,69.092,18.558c-0.95-3.616-1.427-8.186-1.427-13.704
|
|
46
|
+
c0-16.562,5.853-30.692,17.56-42.399c11.703-11.706,25.837-17.561,42.394-17.561c17.515,0,32.079,6.283,43.688,18.846
|
|
47
|
+
c13.134-2.474,25.892-7.33,38.26-14.56c-4.757,14.652-13.613,25.788-26.55,33.402c12.368-1.716,23.88-4.95,34.537-9.708
|
|
48
|
+
C357.458,149.793,347.462,160.166,335.471,168.735z"
|
|
49
|
+
/>
|
|
50
|
+
</g>
|
|
51
|
+
</svg>
|
|
52
|
+
),
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
href: "https://www.facebook.com/DXCTechnology/",
|
|
56
|
+
logo: (
|
|
57
|
+
<svg
|
|
58
|
+
version="1.1"
|
|
59
|
+
id="Capa_1"
|
|
60
|
+
x="0px"
|
|
61
|
+
y="0px"
|
|
62
|
+
viewBox="0 0 438.536 438.536"
|
|
63
|
+
fill="currentColor"
|
|
64
|
+
width="1000px"
|
|
65
|
+
height="500px"
|
|
66
|
+
>
|
|
67
|
+
<g>
|
|
68
|
+
<path
|
|
69
|
+
d="M414.41,24.123C398.333,8.042,378.963,0,356.315,0H82.228C59.58,0,40.21,8.042,24.126,24.123
|
|
70
|
+
C8.045,40.207,0.003,59.576,0.003,82.225v274.084c0,22.647,8.042,42.018,24.123,58.102c16.084,16.084,35.454,24.126,58.102,24.126
|
|
71
|
+
h274.084c22.648,0,42.018-8.042,58.095-24.126c16.084-16.084,24.126-35.454,24.126-58.102V82.225
|
|
72
|
+
C438.532,59.576,430.49,40.204,414.41,24.123z M373.155,225.548h-49.963V406.84h-74.802V225.548H210.99V163.02h37.401v-37.402
|
|
73
|
+
c0-26.838,6.283-47.107,18.843-60.813c12.559-13.706,33.304-20.555,62.242-20.555h49.963v62.526h-31.401
|
|
74
|
+
c-10.663,0-17.467,1.853-20.417,5.568c-2.949,3.711-4.428,10.23-4.428,19.558v31.119h56.534L373.155,225.548z"
|
|
75
|
+
/>
|
|
76
|
+
</g>
|
|
77
|
+
</svg>
|
|
78
|
+
),
|
|
79
|
+
},
|
|
80
|
+
];
|
|
81
|
+
|
|
82
|
+
const bottom = [
|
|
83
|
+
{
|
|
84
|
+
href: "https://www.linkedin.com/company/dxctechnology",
|
|
85
|
+
text: "Linkedin",
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
href: "https://twitter.com/dxctechnology",
|
|
89
|
+
text: "Twitter",
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
href: "https://www.facebook.com/DXCTechnology/",
|
|
93
|
+
text: "Facebook",
|
|
94
|
+
},
|
|
95
|
+
];
|
|
96
|
+
|
|
97
|
+
export default {
|
|
98
|
+
title: "Footer",
|
|
99
|
+
component: DxcFooter,
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export const Chromatic = () => (
|
|
103
|
+
<>
|
|
104
|
+
<ExampleContainer>
|
|
105
|
+
<Title title="Default" theme="light" level={4} />
|
|
106
|
+
<DxcFooter />
|
|
107
|
+
</ExampleContainer>
|
|
108
|
+
<ExampleContainer>
|
|
109
|
+
<Title title="With children, copyright, bottom links and social links" theme="light" level={4} />
|
|
110
|
+
<DxcFooter copyright="Copyright" socialLinks={social} bottomLinks={bottom}>
|
|
111
|
+
<div>
|
|
112
|
+
<a href="https://www.linkedin.com/company/dxctechnology">Linkedin</a>
|
|
113
|
+
</div>
|
|
114
|
+
</DxcFooter>
|
|
115
|
+
</ExampleContainer>
|
|
116
|
+
<Title title="Margins" theme="light" level={2} />
|
|
117
|
+
<ExampleContainer>
|
|
118
|
+
<Title title="Xxsmall margin" theme="light" level={4} />
|
|
119
|
+
<DxcFooter margin="xxsmall"></DxcFooter>
|
|
120
|
+
<Title title="Xsmall margin" theme="light" level={4} />
|
|
121
|
+
<DxcFooter margin="xsmall"></DxcFooter>
|
|
122
|
+
<Title title="Small margin" theme="light" level={4} />
|
|
123
|
+
<DxcFooter margin="small"></DxcFooter>
|
|
124
|
+
<Title title="Medium margin" theme="light" level={4} />
|
|
125
|
+
<DxcFooter margin="medium"></DxcFooter>
|
|
126
|
+
<Title title="Large margin" theme="light" level={4} />
|
|
127
|
+
<DxcFooter margin="large"></DxcFooter>
|
|
128
|
+
<Title title="Xlarge margin" theme="light" level={4} />
|
|
129
|
+
<DxcFooter margin="xlarge"></DxcFooter>
|
|
130
|
+
<Title title="Xxlarge margin" theme="light" level={4} />
|
|
131
|
+
<DxcFooter margin="xxlarge"></DxcFooter>
|
|
132
|
+
</ExampleContainer>
|
|
133
|
+
<Title title="Padding" theme="light" level={2} />
|
|
134
|
+
<ExampleContainer>
|
|
135
|
+
<Title title="Xxsmall padding" theme="light" level={4} />
|
|
136
|
+
<DxcFooter padding="xxsmall"></DxcFooter>
|
|
137
|
+
<Title title="Xsmall padding" theme="light" level={4} />
|
|
138
|
+
<DxcFooter padding="xsmall"></DxcFooter>
|
|
139
|
+
<Title title="Small padding" theme="light" level={4} />
|
|
140
|
+
<DxcFooter padding="small"></DxcFooter>
|
|
141
|
+
<Title title="Medium padding" theme="light" level={4} />
|
|
142
|
+
<DxcFooter padding="medium"></DxcFooter>
|
|
143
|
+
<Title title="Large padding" theme="light" level={4} />
|
|
144
|
+
<DxcFooter padding="large"></DxcFooter>
|
|
145
|
+
<Title title="Xlarge padding" theme="light" level={4} />
|
|
146
|
+
<DxcFooter padding="xlarge"></DxcFooter>
|
|
147
|
+
<Title title="Xxlarge padding" theme="light" level={4} />
|
|
148
|
+
<DxcFooter padding="xxlarge"></DxcFooter>
|
|
149
|
+
</ExampleContainer>
|
|
150
|
+
</>
|
|
151
|
+
);
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
+
declare type Size = {
|
|
4
|
+
top?: Space;
|
|
5
|
+
bottom?: Space;
|
|
6
|
+
left?: Space;
|
|
7
|
+
right?: Space;
|
|
8
|
+
};
|
|
9
|
+
declare type SVG = React.SVGProps<SVGSVGElement> | React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
10
|
+
declare type SocialLink = {
|
|
11
|
+
/**
|
|
12
|
+
* Element used as the icon for the link.
|
|
13
|
+
*/
|
|
14
|
+
logo?: SVG;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated The path of an icon for the link.
|
|
17
|
+
*/
|
|
18
|
+
logoSrc?: string;
|
|
19
|
+
/**
|
|
20
|
+
* URL of the page the link goes to.
|
|
21
|
+
*/
|
|
22
|
+
href?: string;
|
|
23
|
+
};
|
|
24
|
+
declare type BottomLink = {
|
|
25
|
+
/**
|
|
26
|
+
* Text for the link.
|
|
27
|
+
*/
|
|
28
|
+
text?: string;
|
|
29
|
+
/**
|
|
30
|
+
* URL of the page the link goes to.
|
|
31
|
+
*/
|
|
32
|
+
href?: string;
|
|
33
|
+
};
|
|
34
|
+
declare type FooterPropsType = {
|
|
35
|
+
/**
|
|
36
|
+
* An array of objects representing the links that will be rendered as
|
|
37
|
+
* icons at the top-right side of the footer.
|
|
38
|
+
*/
|
|
39
|
+
socialLinks?: SocialLink[];
|
|
40
|
+
/**
|
|
41
|
+
* An array of objects representing the links that will be rendered at
|
|
42
|
+
* the bottom part of the footer.
|
|
43
|
+
*/
|
|
44
|
+
bottomLinks?: BottomLink[];
|
|
45
|
+
/**
|
|
46
|
+
* The center section of the footer. Can be used to render custom
|
|
47
|
+
* content in this area.
|
|
48
|
+
*/
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* The text that will be displayed as copyright disclaimer.
|
|
52
|
+
*/
|
|
53
|
+
copyright?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Value of the tabindex for all interactuable elements, except those
|
|
56
|
+
* inside the custom area.
|
|
57
|
+
*/
|
|
58
|
+
tabIndex?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Size of the top margin to be applied to the footer.
|
|
61
|
+
*/
|
|
62
|
+
margin?: Space | Size;
|
|
63
|
+
/**
|
|
64
|
+
* Size of the padding to be applied to the custom area of the component.
|
|
65
|
+
* You can pass an object with properties in order to specify different padding sizes.
|
|
66
|
+
*/
|
|
67
|
+
padding?: Space | Size;
|
|
68
|
+
};
|
|
69
|
+
export default FooterPropsType;
|
package/footer/types.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import HeaderPropsType from "./types";
|
|
3
|
+
declare const DxcHeader: {
|
|
4
|
+
({ underlined, content, responsiveContent, onClick, margin, padding, tabIndex, }: HeaderPropsType): JSX.Element;
|
|
5
|
+
Dropdown: (props: any) => JSX.Element;
|
|
6
|
+
};
|
|
7
|
+
export default DxcHeader;
|
package/header/Header.js
CHANGED
|
@@ -9,8 +9,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports["default"] = void 0;
|
|
11
11
|
|
|
12
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
-
|
|
14
12
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
15
13
|
|
|
16
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
@@ -23,17 +21,15 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
23
21
|
|
|
24
22
|
var _AppBar = _interopRequireDefault(require("@material-ui/core/AppBar"));
|
|
25
23
|
|
|
26
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
27
|
-
|
|
28
24
|
var _Dropdown = _interopRequireDefault(require("../dropdown/Dropdown"));
|
|
29
25
|
|
|
30
26
|
var _Icons = require("./Icons");
|
|
31
27
|
|
|
32
28
|
var _variables = require("../common/variables.js");
|
|
33
29
|
|
|
34
|
-
var _useTheme = _interopRequireDefault(require("../useTheme
|
|
30
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
35
31
|
|
|
36
|
-
var _BackgroundColorContext = _interopRequireWildcard(require("../BackgroundColorContext
|
|
32
|
+
var _BackgroundColorContext = _interopRequireWildcard(require("../BackgroundColorContext"));
|
|
37
33
|
|
|
38
34
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15;
|
|
39
35
|
|
|
@@ -41,6 +37,27 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
41
37
|
|
|
42
38
|
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; }
|
|
43
39
|
|
|
40
|
+
var closeIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
41
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
42
|
+
height: "24",
|
|
43
|
+
viewBox: "0 0 24 24",
|
|
44
|
+
width: "24"
|
|
45
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
46
|
+
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 12z"
|
|
47
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
48
|
+
d: "M0 0h24v24H0z",
|
|
49
|
+
fill: "none"
|
|
50
|
+
}));
|
|
51
|
+
|
|
52
|
+
var hamburgerIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
53
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
54
|
+
viewBox: "0 0 24 24",
|
|
55
|
+
width: "24",
|
|
56
|
+
height: "24"
|
|
57
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
58
|
+
d: "M3,8H21a1,1,0,0,0,0-2H3A1,1,0,0,0,3,8Zm18,8H3a1,1,0,0,0,0,2H21a1,1,0,0,0,0-2Zm0-5H3a1,1,0,0,0,0,2H21a1,1,0,0,0,0-2Z"
|
|
59
|
+
}));
|
|
60
|
+
|
|
44
61
|
var Dropdown = function Dropdown(props) {
|
|
45
62
|
return /*#__PURE__*/_react["default"].createElement(HeaderDropdown, null, /*#__PURE__*/_react["default"].createElement(_Dropdown["default"], props));
|
|
46
63
|
};
|
|
@@ -65,9 +82,9 @@ var getLogoElement = function getLogoElement(themeInput) {
|
|
|
65
82
|
var DxcHeader = function DxcHeader(_ref) {
|
|
66
83
|
var _ref$underlined = _ref.underlined,
|
|
67
84
|
underlined = _ref$underlined === void 0 ? false : _ref$underlined,
|
|
68
|
-
onClick = _ref.onClick,
|
|
69
85
|
content = _ref.content,
|
|
70
86
|
responsiveContent = _ref.responsiveContent,
|
|
87
|
+
onClick = _ref.onClick,
|
|
71
88
|
margin = _ref.margin,
|
|
72
89
|
padding = _ref.padding,
|
|
73
90
|
_ref$tabIndex = _ref.tabIndex,
|
|
@@ -80,7 +97,7 @@ var DxcHeader = function DxcHeader(_ref) {
|
|
|
80
97
|
refSize = _useState2[0],
|
|
81
98
|
setRefSize = _useState2[1];
|
|
82
99
|
|
|
83
|
-
var _useState3 = (0, _react.useState)(),
|
|
100
|
+
var _useState3 = (0, _react.useState)(false),
|
|
84
101
|
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
85
102
|
isResponsive = _useState4[0],
|
|
86
103
|
setIsResponsive = _useState4[1];
|
|
@@ -158,16 +175,16 @@ var DxcHeader = function DxcHeader(_ref) {
|
|
|
158
175
|
tabIndex: tabIndex,
|
|
159
176
|
underlined: underlined,
|
|
160
177
|
onClick: handleMenu
|
|
161
|
-
},
|
|
178
|
+
}, hamburgerIcon, /*#__PURE__*/_react["default"].createElement(HamburguerTitle, null, "Menu"))), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(ResponsiveMenu, {
|
|
162
179
|
hasVisibility: isMenuVisible,
|
|
163
180
|
refSize: refSize
|
|
164
181
|
}, /*#__PURE__*/_react["default"].createElement(ResponsiveLogoContainer, null, headerResponsiveLogo), /*#__PURE__*/_react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
165
182
|
color: colorsTheme.header.menuBackgroundColor
|
|
166
|
-
}, /*#__PURE__*/_react["default"].createElement(ContentContainerComponent, null
|
|
183
|
+
}, /*#__PURE__*/_react["default"].createElement(ContentContainerComponent, null)), /*#__PURE__*/_react["default"].createElement(CloseContainer, {
|
|
167
184
|
tabIndex: tabIndex,
|
|
168
185
|
onClick: handleMenu,
|
|
169
186
|
className: "closeIcon"
|
|
170
|
-
},
|
|
187
|
+
}, closeIcon)), /*#__PURE__*/_react["default"].createElement(Overlay, {
|
|
171
188
|
onClick: handleMenu,
|
|
172
189
|
hasVisibility: isMenuVisible,
|
|
173
190
|
refSize: refSize
|
|
@@ -303,24 +320,5 @@ var Overlay = _styledComponents["default"].div(_templateObject15 || (_templateOb
|
|
|
303
320
|
return props.theme.overlayZindex;
|
|
304
321
|
});
|
|
305
322
|
|
|
306
|
-
DxcHeader.propTypes = {
|
|
307
|
-
underlined: _propTypes["default"].bool,
|
|
308
|
-
onClick: _propTypes["default"].func,
|
|
309
|
-
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
310
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
311
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
312
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
313
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
314
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
315
|
-
padding: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
316
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
317
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
318
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
319
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
320
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
321
|
-
content: _propTypes["default"].object,
|
|
322
|
-
responsiveContent: _propTypes["default"].func,
|
|
323
|
-
tabIndex: _propTypes["default"].number
|
|
324
|
-
};
|
|
325
323
|
var _default = DxcHeader;
|
|
326
324
|
exports["default"] = _default;
|