@dxc-technology/halstack-react 10.0.0 → 11.0.0
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 +5 -17
- package/HalstackContext.d.ts +26 -6
- package/HalstackContext.js +9 -34
- package/README.md +47 -0
- package/accordion/Accordion.js +21 -58
- package/accordion/Accordion.stories.tsx +1 -15
- package/accordion/Accordion.test.js +18 -33
- package/accordion/types.d.ts +5 -5
- package/accordion-group/AccordionGroup.js +15 -42
- package/accordion-group/AccordionGroup.stories.tsx +1 -1
- package/accordion-group/AccordionGroup.test.js +42 -60
- package/accordion-group/AccordionGroupAccordion.js +9 -21
- package/accordion-group/types.d.ts +6 -6
- package/alert/Alert.js +14 -46
- package/alert/Alert.test.js +28 -45
- package/alert/types.d.ts +5 -5
- package/badge/Badge.js +4 -17
- package/badge/types.d.ts +1 -1
- package/bleed/Bleed.js +13 -21
- package/bleed/types.d.ts +2 -2
- package/box/Box.js +10 -29
- package/box/Box.test.js +1 -6
- package/box/types.d.ts +3 -3
- package/bulleted-list/BulletedList.js +7 -33
- package/bulleted-list/BulletedList.stories.tsx +1 -91
- package/bulleted-list/types.d.ts +5 -5
- package/button/Button.js +23 -46
- package/button/Button.stories.tsx +5 -86
- package/button/Button.test.js +11 -21
- package/button/types.d.ts +4 -4
- package/card/Card.js +21 -44
- package/card/Card.test.js +10 -21
- package/card/types.d.ts +5 -5
- package/checkbox/Checkbox.js +81 -111
- 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.test.js +15 -28
- package/chip/types.d.ts +4 -4
- package/common/coreTokens.js +1 -2
- package/common/utils.js +2 -8
- package/common/variables.d.ts +23 -6
- package/common/variables.js +25 -15
- package/date-input/Calendar.js +13 -57
- 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 +27 -21
- package/dialog/Dialog.js +11 -35
- package/dialog/Dialog.test.js +125 -187
- package/dialog/types.d.ts +18 -13
- package/dropdown/Dropdown.js +39 -93
- package/dropdown/Dropdown.test.js +391 -378
- package/dropdown/DropdownMenu.js +8 -19
- package/dropdown/DropdownMenuItem.js +5 -17
- package/dropdown/types.d.ts +17 -19
- package/file-input/FileInput.js +131 -220
- package/file-input/FileInput.stories.tsx +1 -1
- package/file-input/FileInput.test.js +293 -342
- package/file-input/FileItem.js +12 -39
- package/file-input/types.d.ts +9 -9
- package/flex/Flex.js +25 -39
- package/flex/types.d.ts +6 -6
- package/footer/Footer.js +9 -39
- package/footer/Footer.stories.tsx +8 -7
- package/footer/Footer.test.js +18 -32
- package/footer/Icons.d.ts +2 -2
- package/footer/Icons.js +2 -7
- package/footer/types.d.ts +13 -13
- package/grid/Grid.js +1 -16
- package/grid/types.d.ts +10 -10
- package/header/Header.d.ts +1 -1
- package/header/Header.js +19 -64
- 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 +5 -7
- package/heading/Heading.js +9 -31
- package/heading/Heading.test.js +70 -87
- package/heading/types.d.ts +7 -7
- package/image/Image.d.ts +4 -0
- package/image/Image.js +70 -0
- package/image/Image.stories.tsx +127 -0
- package/image/types.d.ts +72 -0
- package/inset/Inset.js +13 -21
- package/inset/types.d.ts +2 -2
- package/layout/ApplicationLayout.d.ts +1 -1
- package/layout/ApplicationLayout.js +25 -65
- package/layout/ApplicationLayout.stories.tsx +1 -1
- package/layout/Icons.d.ts +8 -5
- package/layout/Icons.js +51 -59
- package/layout/SidenavContext.d.ts +1 -1
- package/layout/SidenavContext.js +3 -9
- 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 +3 -2
- package/main.js +10 -51
- package/nav-tabs/NavTabs.js +11 -43
- package/nav-tabs/NavTabs.stories.tsx +1 -1
- package/nav-tabs/NavTabs.test.js +36 -43
- package/nav-tabs/Tab.js +16 -45
- package/nav-tabs/types.d.ts +9 -9
- package/number-input/NumberInput.d.ts +7 -0
- package/number-input/NumberInput.js +26 -35
- package/number-input/NumberInput.stories.tsx +42 -26
- package/number-input/NumberInput.test.js +700 -412
- package/number-input/types.d.ts +11 -5
- package/package.json +28 -26
- package/paginator/Icons.d.ts +5 -5
- package/paginator/Icons.js +5 -19
- package/paginator/Paginator.js +14 -39
- package/paginator/Paginator.test.js +224 -207
- package/paginator/types.d.ts +3 -3
- package/paragraph/Paragraph.js +3 -14
- 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 -32
- package/password-input/PasswordInput.test.js +157 -140
- package/password-input/types.d.ts +8 -7
- package/progress-bar/ProgressBar.js +16 -42
- 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/{resultsetTable → resultset-table}/ResultsetTable.js +22 -58
- package/{resultsetTable → resultset-table}/ResultsetTable.test.js +72 -92
- package/{resultsetTable → resultset-table}/types.d.ts +7 -7
- package/select/Icons.d.ts +7 -7
- package/select/Icons.js +1 -5
- package/select/Listbox.js +13 -39
- package/select/Option.js +9 -26
- package/select/Select.js +54 -138
- package/select/Select.stories.tsx +3 -3
- package/select/Select.test.js +1906 -1800
- package/select/types.d.ts +14 -15
- package/sidenav/Icons.d.ts +4 -4
- package/sidenav/Icons.js +1 -5
- package/sidenav/Sidenav.js +24 -63
- package/sidenav/Sidenav.test.js +3 -10
- package/sidenav/types.d.ts +18 -18
- package/slider/Slider.js +38 -86
- package/slider/Slider.test.js +107 -103
- package/slider/types.d.ts +4 -4
- package/spinner/Spinner.js +10 -40
- package/spinner/Spinner.test.js +25 -34
- package/spinner/types.d.ts +3 -3
- package/switch/Switch.js +26 -69
- package/switch/Switch.stories.tsx +0 -34
- package/switch/Switch.test.js +51 -96
- package/switch/types.d.ts +4 -4
- package/table/Table.js +4 -23
- package/table/Table.test.js +1 -6
- package/table/types.d.ts +8 -8
- package/tabs/Tab.js +10 -29
- package/tabs/Tabs.js +48 -124
- 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/Icons.d.ts +5 -5
- package/text-input/Icons.js +1 -5
- package/text-input/Suggestion.js +9 -26
- package/text-input/Suggestions.d.ts +1 -1
- package/text-input/Suggestions.js +12 -57
- package/text-input/TextInput.js +182 -263
- package/text-input/TextInput.stories.tsx +48 -152
- package/text-input/TextInput.test.js +1210 -1194
- package/text-input/types.d.ts +25 -17
- package/textarea/Textarea.js +60 -96
- package/textarea/{Textarea.stories.jsx → Textarea.stories.tsx} +58 -99
- package/textarea/Textarea.test.js +150 -179
- package/textarea/types.d.ts +9 -5
- package/toggle-group/ToggleGroup.js +91 -105
- 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 +20 -3
- 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 +12 -36
- package/wizard/Wizard.js +14 -49
- package/wizard/Wizard.test.js +53 -80
- package/wizard/types.d.ts +6 -6
- package/number-input/NumberInputContext.d.ts +0 -4
- package/number-input/NumberInputContext.js +0 -19
- package/number-input/numberInputContextTypes.d.ts +0 -19
- package/resultsetTable/Icons.d.ts +0 -7
- package/slider/Slider.stories.tsx +0 -240
- /package/{resultsetTable → image}/types.js +0 -0
- /package/{resultsetTable → resultset-table}/ResultsetTable.d.ts +0 -0
- /package/{resultsetTable → resultset-table}/ResultsetTable.stories.tsx +0 -0
- /package/{number-input/numberInputContextTypes.js → resultset-table/types.js} +0 -0
- /package/spinner/{Spinner.stories.jsx → Spinner.stories.tsx} +0 -0
- /package/table/{Table.stories.jsx → Table.stories.tsx} +0 -0
package/footer/types.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
+
type Size = {
|
|
4
4
|
top?: Space;
|
|
5
5
|
bottom?: Space;
|
|
6
6
|
left?: Space;
|
|
7
7
|
right?: Space;
|
|
8
8
|
};
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
type SVG = React.ReactNode & React.SVGProps<SVGSVGElement>;
|
|
10
|
+
type SocialLink = {
|
|
11
11
|
/**
|
|
12
12
|
* URL of the page the link goes to.
|
|
13
13
|
*/
|
|
@@ -21,7 +21,7 @@ declare type SocialLink = {
|
|
|
21
21
|
*/
|
|
22
22
|
title: string;
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
type BottomLink = {
|
|
25
25
|
/**
|
|
26
26
|
* URL of the page the link goes to.
|
|
27
27
|
*/
|
|
@@ -31,7 +31,7 @@ declare type BottomLink = {
|
|
|
31
31
|
*/
|
|
32
32
|
text: string;
|
|
33
33
|
};
|
|
34
|
-
|
|
34
|
+
type FooterPropsType = {
|
|
35
35
|
/**
|
|
36
36
|
* An array of objects representing the links that will be rendered as
|
|
37
37
|
* icons at the top-right side of the footer.
|
|
@@ -42,23 +42,23 @@ declare type FooterPropsType = {
|
|
|
42
42
|
* the bottom part of the footer.
|
|
43
43
|
*/
|
|
44
44
|
bottomLinks?: BottomLink[];
|
|
45
|
+
/**
|
|
46
|
+
* The text that will be displayed as copyright disclaimer.
|
|
47
|
+
*/
|
|
48
|
+
copyright?: string;
|
|
45
49
|
/**
|
|
46
50
|
* The center section of the footer. Can be used to render custom
|
|
47
51
|
* content in this area.
|
|
48
52
|
*/
|
|
49
53
|
children?: React.ReactNode;
|
|
50
54
|
/**
|
|
51
|
-
*
|
|
55
|
+
* Size of the top margin to be applied to the footer.
|
|
52
56
|
*/
|
|
53
|
-
|
|
57
|
+
margin?: Space | Size;
|
|
54
58
|
/**
|
|
55
|
-
* Value of the tabindex for all
|
|
59
|
+
* Value of the tabindex for all interactive elements, except those
|
|
56
60
|
* inside the custom area.
|
|
57
61
|
*/
|
|
58
62
|
tabIndex?: number;
|
|
59
|
-
/**
|
|
60
|
-
* Size of the top margin to be applied to the footer.
|
|
61
|
-
*/
|
|
62
|
-
margin?: Space | Size;
|
|
63
63
|
};
|
|
64
64
|
export default FooterPropsType;
|
package/grid/Grid.js
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
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 _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
15
|
-
|
|
16
11
|
var _templateObject, _templateObject2;
|
|
17
|
-
|
|
18
12
|
var DxcGrid = function DxcGrid(props) {
|
|
19
13
|
return /*#__PURE__*/_react["default"].createElement(Grid, props);
|
|
20
14
|
};
|
|
21
|
-
|
|
22
15
|
var Grid = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: grid;\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n ", "\n ", "\n ", "\n ", "\n"])), function (_ref) {
|
|
23
16
|
var templateColumns = _ref.templateColumns;
|
|
24
17
|
return templateColumns && "grid-template-columns: ".concat(templateColumns.join(" "), ";");
|
|
@@ -41,17 +34,14 @@ var Grid = _styledComponents["default"].div(_templateObject || (_templateObject
|
|
|
41
34
|
return autoFlow && "grid-auto-flow: ".concat(autoFlow, ";");
|
|
42
35
|
}, function (_ref7) {
|
|
43
36
|
var _gap$rowGap, _gap$columnGap;
|
|
44
|
-
|
|
45
37
|
var gap = _ref7.gap;
|
|
46
38
|
return gap != null && (typeof gap === "string" ? "gap: ".concat(gap, ";") : "row-gap: ".concat((_gap$rowGap = gap.rowGap) !== null && _gap$rowGap !== void 0 ? _gap$rowGap : "", "; column-gap: ").concat((_gap$columnGap = gap.columnGap) !== null && _gap$columnGap !== void 0 ? _gap$columnGap : "", ";"));
|
|
47
39
|
}, function (_ref8) {
|
|
48
40
|
var _placeItems$alignItem, _placeItems$justifyIt;
|
|
49
|
-
|
|
50
41
|
var placeItems = _ref8.placeItems;
|
|
51
42
|
return placeItems && (typeof placeItems === "string" ? "place-items: ".concat(placeItems) : "align-items: ".concat((_placeItems$alignItem = placeItems.alignItems) !== null && _placeItems$alignItem !== void 0 ? _placeItems$alignItem : "", "; justify-items: ").concat((_placeItems$justifyIt = placeItems.justifyItems) !== null && _placeItems$justifyIt !== void 0 ? _placeItems$justifyIt : "", ";"));
|
|
52
43
|
}, function (_ref9) {
|
|
53
44
|
var _placeContent$alignCo, _placeContent$justify;
|
|
54
|
-
|
|
55
45
|
var placeContent = _ref9.placeContent;
|
|
56
46
|
return placeContent && (typeof placeContent === "string" ? "place-content: ".concat(placeContent) : "align-content: ".concat((_placeContent$alignCo = placeContent.alignContent) !== null && _placeContent$alignCo !== void 0 ? _placeContent$alignCo : "", "; justify-content: ").concat((_placeContent$justify = placeContent.justifyContent) !== null && _placeContent$justify !== void 0 ? _placeContent$justify : "", ";"));
|
|
57
47
|
}, function (_ref10) {
|
|
@@ -65,11 +55,9 @@ var Grid = _styledComponents["default"].div(_templateObject || (_templateObject
|
|
|
65
55
|
return row && "grid-row: ".concat(typeof row === "string" || typeof row === "number" ? row : "".concat(row.start, " / ").concat(row.end, ";"), ";");
|
|
66
56
|
}, function (_ref13) {
|
|
67
57
|
var _placeSelf$alignSelf, _placeSelf$justifySel;
|
|
68
|
-
|
|
69
58
|
var placeSelf = _ref13.placeSelf;
|
|
70
59
|
return placeSelf && (typeof placeSelf === "string" ? "place-self: ".concat(placeSelf) : "align-self: ".concat((_placeSelf$alignSelf = placeSelf.alignSelf) !== null && _placeSelf$alignSelf !== void 0 ? _placeSelf$alignSelf : "", "; justify-self: ").concat((_placeSelf$justifySel = placeSelf.justifySelf) !== null && _placeSelf$justifySel !== void 0 ? _placeSelf$justifySel : "", ";"));
|
|
71
60
|
});
|
|
72
|
-
|
|
73
61
|
var GridItem = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n ", "\n ", "\n ", "\n"])), function (_ref14) {
|
|
74
62
|
var areaName = _ref14.areaName;
|
|
75
63
|
return areaName && "grid-area: ".concat(areaName, ";");
|
|
@@ -81,11 +69,8 @@ var GridItem = _styledComponents["default"].div(_templateObject2 || (_templateOb
|
|
|
81
69
|
return row && "grid-row: ".concat(typeof row === "string" || typeof row === "number" ? row : "".concat(row.start, " / ").concat(row.end, ";"), ";");
|
|
82
70
|
}, function (_ref17) {
|
|
83
71
|
var _placeSelf$alignSelf2, _placeSelf$justifySel2;
|
|
84
|
-
|
|
85
72
|
var placeSelf = _ref17.placeSelf;
|
|
86
73
|
return placeSelf && (typeof placeSelf === "string" ? "place-self: ".concat(placeSelf) : "align-self: ".concat((_placeSelf$alignSelf2 = placeSelf.alignSelf) !== null && _placeSelf$alignSelf2 !== void 0 ? _placeSelf$alignSelf2 : "", "; justify-self: ").concat((_placeSelf$justifySel2 = placeSelf.justifySelf) !== null && _placeSelf$justifySel2 !== void 0 ? _placeSelf$justifySel2 : "", ";"));
|
|
87
74
|
});
|
|
88
|
-
|
|
89
75
|
DxcGrid.Item = GridItem;
|
|
90
|
-
var _default = DxcGrid;
|
|
91
|
-
exports["default"] = _default;
|
|
76
|
+
var _default = exports["default"] = DxcGrid;
|
package/grid/types.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
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
8
|
columnGap: Spaces;
|
|
9
9
|
} | Spaces;
|
|
10
|
-
|
|
10
|
+
type GridCell = {
|
|
11
11
|
start: number | string;
|
|
12
12
|
end: number | string;
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
type PlaceSelfValues = "auto" | "start" | "end" | "center" | "stretch" | "baseline";
|
|
15
|
+
type PlaceContentValues = "normal" | "start" | "end" | "center" | "stretch" | "space-between" | "space-around" | "space-evenly" | "baseline";
|
|
16
|
+
type PlaceItemsValues = "normal" | "start" | "end" | "center" | "stretch" | "baseline";
|
|
17
|
+
type PlaceObject<Type, Suffix extends string> = {
|
|
18
18
|
[Property in keyof Type as `${string & Property}${Capitalize<string & Suffix>}`]: Type[Property];
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
type PlaceGeneric<PlaceValues, Element extends string> = PlaceObject<{
|
|
21
21
|
justify?: PlaceValues;
|
|
22
22
|
align: PlaceValues;
|
|
23
23
|
}, Element> | PlaceObject<{
|
|
24
24
|
justify: PlaceValues;
|
|
25
25
|
align?: PlaceValues;
|
|
26
26
|
}, Element> | PlaceValues;
|
|
27
|
-
export
|
|
27
|
+
export type GridItemProps = {
|
|
28
28
|
/**
|
|
29
29
|
* Sets the name of an item so that it can be referenced by a template created with the grid-template-areas property.
|
|
30
30
|
*/
|
|
@@ -56,7 +56,7 @@ export declare type GridItemProps = {
|
|
|
56
56
|
*/
|
|
57
57
|
children: React.ReactNode;
|
|
58
58
|
};
|
|
59
|
-
|
|
59
|
+
type Props = GridItemProps & {
|
|
60
60
|
/**
|
|
61
61
|
* Sets the grid-auto-columns CSS property.
|
|
62
62
|
*
|
package/header/Header.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ import DxcDropdown from "../dropdown/Dropdown";
|
|
|
3
3
|
import HeaderPropsType from "./types";
|
|
4
4
|
declare const DxcHeader: {
|
|
5
5
|
({ underlined, content, responsiveContent, onClick, margin, tabIndex, }: HeaderPropsType): JSX.Element;
|
|
6
|
-
Dropdown: (props: React.ComponentProps<typeof DxcDropdown>) => JSX.Element;
|
|
6
|
+
Dropdown: (props: React.ComponentProps<typeof DxcDropdown>) => React.JSX.Element;
|
|
7
7
|
};
|
|
8
8
|
export default DxcHeader;
|
package/header/Header.js
CHANGED
|
@@ -1,42 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof3 = 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 _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
|
-
|
|
14
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
-
|
|
16
11
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
17
|
-
|
|
18
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
-
|
|
20
13
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
21
|
-
|
|
22
14
|
var _Dropdown = _interopRequireDefault(require("../dropdown/Dropdown"));
|
|
23
|
-
|
|
24
15
|
var _Icons = require("./Icons");
|
|
25
|
-
|
|
26
16
|
var _variables = require("../common/variables");
|
|
27
|
-
|
|
28
17
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
29
|
-
|
|
30
18
|
var _useTranslatedLabels = _interopRequireDefault(require("../useTranslatedLabels"));
|
|
31
|
-
|
|
32
19
|
var _BackgroundColorContext = _interopRequireWildcard(require("../BackgroundColorContext"));
|
|
33
|
-
|
|
34
20
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15;
|
|
35
|
-
|
|
36
|
-
function
|
|
37
|
-
|
|
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; }
|
|
39
|
-
|
|
21
|
+
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); }
|
|
22
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(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; }
|
|
40
23
|
var closeIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
41
24
|
xmlns: "http://www.w3.org/2000/svg",
|
|
42
25
|
viewBox: "0 0 24 24",
|
|
@@ -45,7 +28,6 @@ var closeIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
|
45
28
|
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
46
29
|
d: "M6.4 19 5 17.6l5.6-5.6L5 6.4 6.4 5l5.6 5.6L17.6 5 19 6.4 13.4 12l5.6 5.6-1.4 1.4-5.6-5.6Z"
|
|
47
30
|
}));
|
|
48
|
-
|
|
49
31
|
var hamburgerIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
50
32
|
xmlns: "http://www.w3.org/2000/svg",
|
|
51
33
|
viewBox: "0 0 24 24",
|
|
@@ -54,25 +36,21 @@ var hamburgerIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
|
54
36
|
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
55
37
|
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"
|
|
56
38
|
}));
|
|
57
|
-
|
|
58
39
|
var Dropdown = function Dropdown(props) {
|
|
59
40
|
return /*#__PURE__*/_react["default"].createElement(HeaderDropdown, null, /*#__PURE__*/_react["default"].createElement(_Dropdown["default"], props));
|
|
60
41
|
};
|
|
61
|
-
|
|
62
42
|
var HeaderDropdown = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n button {\n background-color: transparent;\n :hover {\n background-color: transparent;\n }\n }\n"])));
|
|
63
|
-
|
|
64
43
|
var getLogoElement = function getLogoElement(themeInput, logoLabel) {
|
|
65
44
|
if (!themeInput) return _Icons.dxcLogo;else if (typeof themeInput === "string") return /*#__PURE__*/_react["default"].createElement(LogoImg, {
|
|
66
45
|
alt: logoLabel,
|
|
67
46
|
src: themeInput
|
|
68
47
|
});else return themeInput;
|
|
69
48
|
};
|
|
70
|
-
|
|
71
49
|
var Content = function Content(_ref) {
|
|
72
50
|
var isResponsive = _ref.isResponsive,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
51
|
+
responsiveContent = _ref.responsiveContent,
|
|
52
|
+
handleMenu = _ref.handleMenu,
|
|
53
|
+
content = _ref.content;
|
|
76
54
|
var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
|
|
77
55
|
return isResponsive ? /*#__PURE__*/_react["default"].createElement(MenuContent, {
|
|
78
56
|
backgroundType: backgroundType
|
|
@@ -80,34 +58,29 @@ var Content = function Content(_ref) {
|
|
|
80
58
|
backgroundType: backgroundType
|
|
81
59
|
}, content);
|
|
82
60
|
};
|
|
83
|
-
|
|
84
61
|
var DxcHeader = function DxcHeader(_ref2) {
|
|
85
62
|
var _ref2$underlined = _ref2.underlined,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
63
|
+
underlined = _ref2$underlined === void 0 ? false : _ref2$underlined,
|
|
64
|
+
content = _ref2.content,
|
|
65
|
+
responsiveContent = _ref2.responsiveContent,
|
|
66
|
+
onClick = _ref2.onClick,
|
|
67
|
+
margin = _ref2.margin,
|
|
68
|
+
_ref2$tabIndex = _ref2.tabIndex,
|
|
69
|
+
tabIndex = _ref2$tabIndex === void 0 ? 0 : _ref2$tabIndex;
|
|
93
70
|
var colorsTheme = (0, _useTheme["default"])();
|
|
94
71
|
var translatedLabels = (0, _useTranslatedLabels["default"])();
|
|
95
72
|
var ref = (0, _react.useRef)(null);
|
|
96
|
-
|
|
97
73
|
var _useState = (0, _react.useState)(false),
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
74
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
75
|
+
isResponsive = _useState2[0],
|
|
76
|
+
setIsResponsive = _useState2[1];
|
|
102
77
|
var _useState3 = (0, _react.useState)(false),
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
78
|
+
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
79
|
+
isMenuVisible = _useState4[0],
|
|
80
|
+
setIsMenuVisible = _useState4[1];
|
|
107
81
|
var handleResize = (0, _react.useCallback)(function () {
|
|
108
82
|
setIsResponsive(window.matchMedia("(max-width: ".concat(_variables.responsiveSizes.medium, "rem)")).matches);
|
|
109
83
|
}, []);
|
|
110
|
-
|
|
111
84
|
var handleMenu = function handleMenu() {
|
|
112
85
|
if (isResponsive && !isMenuVisible) {
|
|
113
86
|
setIsMenuVisible(!isMenuVisible);
|
|
@@ -115,7 +88,6 @@ var DxcHeader = function DxcHeader(_ref2) {
|
|
|
115
88
|
setIsMenuVisible(!isMenuVisible);
|
|
116
89
|
}
|
|
117
90
|
};
|
|
118
|
-
|
|
119
91
|
var headerLogo = (0, _react.useMemo)(function () {
|
|
120
92
|
return getLogoElement(colorsTheme.header.logo, translatedLabels.formFields.logoAlternativeText);
|
|
121
93
|
}, [colorsTheme.header.logo]);
|
|
@@ -171,9 +143,7 @@ var DxcHeader = function DxcHeader(_ref2) {
|
|
|
171
143
|
content: content
|
|
172
144
|
}))));
|
|
173
145
|
};
|
|
174
|
-
|
|
175
146
|
DxcHeader.Dropdown = Dropdown;
|
|
176
|
-
|
|
177
147
|
var HeaderContainer = _styledComponents["default"].header(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n min-height: ", ";\n margin-bottom: ", ";\n padding: ", ";\n background-color: ", ";\n border-bottom: ", ";\n"])), function (props) {
|
|
178
148
|
return props.theme.minHeight;
|
|
179
149
|
}, function (props) {
|
|
@@ -185,29 +155,23 @@ var HeaderContainer = _styledComponents["default"].header(_templateObject2 || (_
|
|
|
185
155
|
}, function (props) {
|
|
186
156
|
return props.underlined && "".concat(props.theme.underlinedThickness, " ").concat(props.theme.underlinedStyle, " ").concat(props.theme.underlinedColor);
|
|
187
157
|
});
|
|
188
|
-
|
|
189
158
|
var LogoAnchor = _styledComponents["default"].a(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n ", ";\n"])), function (props) {
|
|
190
159
|
return props.interactuable ? "cursor: pointer" : "cursor: default; outline:none;";
|
|
191
160
|
});
|
|
192
|
-
|
|
193
161
|
var LogoImg = _styledComponents["default"].img(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n"])), function (props) {
|
|
194
162
|
return props.theme.logoHeight;
|
|
195
163
|
}, function (props) {
|
|
196
164
|
return props.theme.logoWidth;
|
|
197
165
|
});
|
|
198
|
-
|
|
199
166
|
var LogoContainer = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n vertical-align: middle;\n"])), function (props) {
|
|
200
167
|
return props.theme.logoHeight;
|
|
201
168
|
}, function (props) {
|
|
202
169
|
return props.theme.logoWidth;
|
|
203
170
|
});
|
|
204
|
-
|
|
205
171
|
var ChildContainer = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-grow: 1;\n width: calc(100% - 186px);\n"])));
|
|
206
|
-
|
|
207
172
|
var ContentContainer = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n flex-grow: 1;\n justify-content: flex-end;\n width: calc(100% - 186px);\n color: ", ";\n"])), function (props) {
|
|
208
173
|
return props.backgroundType === "dark" ? props.theme.contentColorOnDark : props.theme.contentColor;
|
|
209
174
|
});
|
|
210
|
-
|
|
211
175
|
var HamburguerTrigger = _styledComponents["default"].button(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 54px;\n cursor: pointer;\n border: 1px solid transparent;\n border-radius: 2px;\n background-color: transparent;\n :hover {\n background-color: ", ";\n }\n &:focus {\n outline: ", " auto 1px;\n }\n & > svg {\n fill: ", ";\n }\n font-family: ", ";\n font-style: ", ";\n font-size: ", ";\n text-transform: ", ";\n font-weight: ", ";\n color: ", ";\n"])), function (props) {
|
|
212
176
|
return props.theme.hamburguerHoverColor;
|
|
213
177
|
}, function (props) {
|
|
@@ -227,9 +191,7 @@ var HamburguerTrigger = _styledComponents["default"].button(_templateObject8 ||
|
|
|
227
191
|
}, function (props) {
|
|
228
192
|
return props.theme.hamburguerFontColor;
|
|
229
193
|
});
|
|
230
|
-
|
|
231
194
|
var MainContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-grow: 1;\n"])));
|
|
232
|
-
|
|
233
195
|
var ResponsiveMenu = _styledComponents["default"].div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n background-color: ", ";\n position: fixed;\n top: 0;\n right: 0;\n z-index: ", ";\n\n @media (max-width: ", "rem) and (min-width: ", "rem) {\n width: ", ";\n }\n\n @media (not((max-width: ", "rem) and (min-width: ", "rem))) {\n width: ", ";\n }\n\n height: 100vh;\n padding: 20px;\n transform: ", ";\n opacity: ", ";\n transition-property: transform, opacity;\n transition-duration: 0.6s;\n transition-timing-function: ease-in-out;\n box-sizing: border-box;\n"])), function (props) {
|
|
234
196
|
return props.theme.menuBackgroundColor;
|
|
235
197
|
}, function (props) {
|
|
@@ -243,23 +205,18 @@ var ResponsiveMenu = _styledComponents["default"].div(_templateObject10 || (_tem
|
|
|
243
205
|
}, function (props) {
|
|
244
206
|
return props.hasVisibility ? "1" : "0.96";
|
|
245
207
|
});
|
|
246
|
-
|
|
247
208
|
var ResponsiveLogoContainer = _styledComponents["default"].div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n display: flex;\n"])), function (props) {
|
|
248
209
|
return props.theme.logoHeight;
|
|
249
210
|
}, function (props) {
|
|
250
211
|
return props.theme.logoWidth;
|
|
251
212
|
});
|
|
252
|
-
|
|
253
213
|
var ResponsiveIconsContainer = _styledComponents["default"].div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
|
|
254
|
-
|
|
255
214
|
var CloseAction = _styledComponents["default"].button(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: center;\n align-content: center;\n padding: 6px;\n border: unset;\n border-radius: 2px;\n background-color: transparent;\n cursor: pointer;\n\n :focus,\n :focus-visible {\n outline: ", " auto 1px;\n }\n\n svg {\n height: 24px;\n width: 24px;\n }\n"])), function (props) {
|
|
256
215
|
return props.theme.hamburguerFocusColor;
|
|
257
216
|
});
|
|
258
|
-
|
|
259
217
|
var MenuContent = _styledComponents["default"].div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n height: 100%;\n color: ", ";\n"])), function (props) {
|
|
260
218
|
return props.backgroundType === "dark" ? props.theme.contentColorOnDark : props.theme.contentColor;
|
|
261
219
|
});
|
|
262
|
-
|
|
263
220
|
var Overlay = _styledComponents["default"].div(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2["default"])(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: ", ";\n opacity: ", " !important;\n visibility: ", ";\n opacity: ", ";\n\n @media (max-width: ", "rem) {\n display: none;\n }\n\n transition: opacity 0.2s 0.2s ease-in-out;\n z-index: ", ";\n"])), function (props) {
|
|
264
221
|
return props.theme.overlayColor;
|
|
265
222
|
}, function (props) {
|
|
@@ -271,6 +228,4 @@ var Overlay = _styledComponents["default"].div(_templateObject15 || (_templateOb
|
|
|
271
228
|
}, _variables.responsiveSizes.small, function (props) {
|
|
272
229
|
return props.theme.overlayZindex;
|
|
273
230
|
});
|
|
274
|
-
|
|
275
|
-
var _default = DxcHeader;
|
|
276
|
-
exports["default"] = _default;
|
|
231
|
+
var _default = exports["default"] = DxcHeader;
|
package/header/Header.test.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _react = _interopRequireDefault(require("react"));
|
|
6
|
-
|
|
7
5
|
var _react2 = require("@testing-library/react");
|
|
8
|
-
|
|
9
6
|
var _Header = _interopRequireDefault(require("./Header.tsx"));
|
|
10
|
-
|
|
11
7
|
describe("Header component tests", function () {
|
|
12
8
|
beforeAll(function () {
|
|
13
9
|
Object.defineProperty(window, "matchMedia", {
|
|
@@ -21,22 +17,17 @@ describe("Header component tests", function () {
|
|
|
21
17
|
});
|
|
22
18
|
test("Header renders with default logo", function () {
|
|
23
19
|
var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Header["default"], null)),
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
getByTitle = _render.getByTitle;
|
|
26
21
|
expect(getByTitle("DXC Logo")).toBeTruthy();
|
|
27
22
|
});
|
|
28
23
|
test("Call correct function on logo click", function () {
|
|
29
24
|
var onClick = jest.fn();
|
|
30
|
-
|
|
31
25
|
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Header["default"], {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
onClick: onClick
|
|
27
|
+
})),
|
|
28
|
+
getByTitle = _render2.getByTitle;
|
|
36
29
|
var logo = getByTitle("DXC Logo");
|
|
37
|
-
|
|
38
30
|
_react2.fireEvent.click(logo);
|
|
39
|
-
|
|
40
31
|
expect(onClick).toHaveBeenCalled();
|
|
41
32
|
});
|
|
42
33
|
test("Header renders with correct children", function () {
|
|
@@ -45,12 +36,10 @@ describe("Header component tests", function () {
|
|
|
45
36
|
configurable: true,
|
|
46
37
|
value: 1024
|
|
47
38
|
});
|
|
48
|
-
|
|
49
39
|
var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Header["default"], {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
40
|
+
content: /*#__PURE__*/_react["default"].createElement("p", null, "header-child-text")
|
|
41
|
+
})),
|
|
42
|
+
getByText = _render3.getByText;
|
|
54
43
|
expect(getByText("header-child-text")).toBeTruthy();
|
|
55
44
|
});
|
|
56
45
|
test("Header renders menu button in mobile", function () {
|
|
@@ -66,14 +55,12 @@ describe("Header component tests", function () {
|
|
|
66
55
|
};
|
|
67
56
|
})
|
|
68
57
|
});
|
|
69
|
-
|
|
70
58
|
var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Header["default"], {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
59
|
+
responsiveContent: function responsiveContent() {
|
|
60
|
+
return /*#__PURE__*/_react["default"].createElement("p", null, "header-child-text");
|
|
61
|
+
}
|
|
62
|
+
})),
|
|
63
|
+
getByText = _render4.getByText;
|
|
77
64
|
expect(getByText("Menu")).toBeTruthy();
|
|
78
65
|
});
|
|
79
66
|
});
|
package/header/Icons.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const dxcLogo: JSX.Element;
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const dxcLogo: React.JSX.Element;
|
package/header/Icons.js
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
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.dxcLogo = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var dxcLogo = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
9
|
+
var dxcLogo = exports.dxcLogo = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
13
10
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
11
|
width: "73",
|
|
15
12
|
height: "40",
|
|
@@ -29,6 +26,4 @@ var dxcLogo = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
|
29
26
|
d: "M75.836-76.712a8.975,8.975,0,0,1,2.246-3.9,8.393,8.393,0,0,1,6.058-2.457h9.824v-5.67H84.139a14.611,14.611,0,0,0-10.232,4.221,14.509,14.509,0,0,0-3.076,4.536,11.913,11.913,0,0,0-.973,3.271Zm0,4.325a8.978,8.978,0,0,0,2.246,3.9,8.394,8.394,0,0,0,6.058,2.457h9.824v5.67H84.139A14.611,14.611,0,0,1,73.907-64.58a14.506,14.506,0,0,1-3.076-4.536,11.91,11.91,0,0,1-.973-3.271ZM57.522-69.832l-7.5,9.473H42.581L53.818-74.55,42.581-88.739H50.02l7.5,9.472,7.5-9.472h7.439L61.225-74.55l11.237,14.19H65.023Zm-12.336-6.88a11.935,11.935,0,0,0-.973-3.271,14.515,14.515,0,0,0-3.076-4.536A14.612,14.612,0,0,0,30.9-88.739H21.081v5.67H30.9a8.394,8.394,0,0,1,6.058,2.457,8.978,8.978,0,0,1,2.246,3.9Zm0,4.325a11.932,11.932,0,0,1-.973,3.271,14.511,14.511,0,0,1-3.076,4.536A14.611,14.611,0,0,1,30.9-60.359H21.081v-5.67H30.9a8.4,8.4,0,0,0,6.058-2.457,8.981,8.981,0,0,0,2.246-3.9h5.978",
|
|
30
27
|
transform: "translate(-21.049 88.739)",
|
|
31
28
|
fill: "#603494"
|
|
32
|
-
}))));
|
|
33
|
-
|
|
34
|
-
exports.dxcLogo = dxcLogo;
|
|
29
|
+
}))));
|
package/header/types.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
declare type Props = {
|
|
2
|
+
type Props = {
|
|
4
3
|
/**
|
|
5
|
-
*
|
|
4
|
+
* Whether a contrast line should appear at the bottom of the header.
|
|
6
5
|
*/
|
|
7
6
|
underlined?: boolean;
|
|
8
7
|
/**
|
|
@@ -21,12 +20,11 @@ declare type Props = {
|
|
|
21
20
|
*/
|
|
22
21
|
onClick?: () => void;
|
|
23
22
|
/**
|
|
24
|
-
* Size of the bottom margin to be applied to the header
|
|
25
|
-
* ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
23
|
+
* Size of the bottom margin to be applied to the header.
|
|
26
24
|
*/
|
|
27
|
-
margin?:
|
|
25
|
+
margin?: "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
28
26
|
/**
|
|
29
|
-
* Value of the tabindex for all
|
|
27
|
+
* Value of the tabindex for all interactive elements, except those inside the
|
|
30
28
|
* custom area.
|
|
31
29
|
*/
|
|
32
30
|
tabIndex?: number;
|