@dxc-technology/halstack-react 0.0.0-3a698b0 → 0.0.0-3ac400c
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 +25 -129
- package/HalstackContext.js +10 -35
- package/README.md +47 -0
- package/accordion/Accordion.d.ts +1 -1
- package/accordion/Accordion.js +24 -76
- package/accordion/Accordion.stories.tsx +1 -113
- package/accordion/Accordion.test.js +18 -33
- package/accordion/types.d.ts +5 -17
- package/accordion-group/AccordionGroup.d.ts +4 -3
- package/accordion-group/AccordionGroup.js +27 -75
- package/accordion-group/AccordionGroup.stories.tsx +78 -77
- package/accordion-group/AccordionGroup.test.js +43 -71
- package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
- package/accordion-group/AccordionGroupAccordion.js +31 -0
- package/accordion-group/types.d.ts +6 -18
- package/alert/Alert.js +16 -53
- 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.d.ts +1 -1
- package/box/Box.js +16 -55
- package/box/Box.stories.tsx +25 -53
- package/box/Box.test.js +1 -6
- package/box/types.d.ts +3 -15
- package/bulleted-list/BulletedList.js +19 -53
- package/bulleted-list/BulletedList.stories.tsx +8 -93
- package/bulleted-list/types.d.ts +32 -5
- package/button/Button.d.ts +1 -1
- package/button/Button.js +66 -99
- package/button/Button.stories.tsx +8 -89
- package/button/Button.test.js +17 -16
- package/button/types.d.ts +8 -4
- package/card/Card.d.ts +1 -1
- package/card/Card.js +39 -79
- package/card/Card.stories.tsx +0 -29
- package/card/Card.test.js +10 -21
- package/card/types.d.ts +6 -12
- 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 +34 -66
- package/chip/Chip.stories.tsx +25 -17
- package/chip/Chip.test.js +15 -28
- package/chip/types.d.ts +4 -4
- package/common/OpenSans.css +68 -80
- package/common/coreTokens.d.ts +237 -0
- package/common/coreTokens.js +184 -0
- package/common/utils.js +2 -8
- package/common/variables.d.ts +24 -268
- package/common/variables.js +860 -1111
- 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/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 +27 -21
- package/dialog/Dialog.d.ts +1 -1
- package/dialog/Dialog.js +15 -60
- package/dialog/Dialog.stories.tsx +215 -169
- package/dialog/Dialog.test.js +125 -187
- package/dialog/types.d.ts +18 -26
- package/dropdown/Dropdown.js +39 -93
- package/dropdown/Dropdown.test.js +391 -378
- package/dropdown/DropdownMenu.js +13 -20
- package/dropdown/DropdownMenuItem.js +5 -17
- package/dropdown/types.d.ts +17 -19
- 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 +27 -39
- package/flex/Flex.stories.tsx +24 -10
- package/flex/types.d.ts +74 -9
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +54 -112
- package/footer/Footer.stories.tsx +19 -95
- package/footer/Footer.test.js +21 -33
- package/footer/Icons.d.ts +2 -2
- package/footer/Icons.js +2 -7
- package/footer/types.d.ts +21 -29
- 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 +2 -2
- package/header/Header.js +31 -114
- package/header/Header.stories.tsx +7 -71
- 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 -20
- 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/Inset.stories.tsx +1 -1
- package/inset/types.d.ts +2 -2
- package/layout/ApplicationLayout.d.ts +5 -5
- package/layout/ApplicationLayout.js +28 -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 +5 -6
- package/link/Link.js +22 -43
- package/link/Link.test.js +23 -41
- package/link/types.d.ts +14 -14
- package/main.d.ts +4 -3
- package/main.js +17 -58
- package/nav-tabs/NavTabs.d.ts +2 -2
- package/nav-tabs/NavTabs.js +16 -51
- package/nav-tabs/NavTabs.stories.tsx +15 -1
- package/nav-tabs/NavTabs.test.js +36 -43
- package/nav-tabs/Tab.js +36 -69
- package/nav-tabs/types.d.ts +14 -15
- 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 +30 -28
- package/paginator/Icons.d.ts +5 -5
- package/paginator/Icons.js +5 -19
- package/paginator/Paginator.js +16 -44
- package/paginator/Paginator.test.js +229 -199
- 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 +31 -63
- package/radio-group/RadioGroup.js +45 -93
- 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 +23 -59
- package/{resultsetTable → resultset-table}/ResultsetTable.test.js +72 -92
- package/{resultsetTable → resultset-table}/types.d.ts +7 -7
- 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 +9 -26
- package/select/Select.js +70 -155
- 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 +7 -0
- package/sidenav/Icons.js +47 -0
- package/sidenav/Sidenav.d.ts +2 -2
- package/sidenav/Sidenav.js +80 -150
- package/sidenav/Sidenav.stories.tsx +60 -60
- package/sidenav/Sidenav.test.js +3 -10
- package/sidenav/types.d.ts +31 -28
- 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/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/Table.js +5 -27
- package/table/Table.test.js +1 -6
- package/table/types.d.ts +8 -8
- package/tabs/Tab.js +10 -29
- package/tabs/Tabs.js +52 -129
- 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 +15 -65
- package/text-input/TextInput.js +189 -284
- 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 +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.d.ts +2 -2
- 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 +21 -122
- 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 +24 -42
- package/wizard/Wizard.js +14 -49
- package/wizard/Wizard.test.js +53 -80
- package/wizard/types.d.ts +6 -6
- package/card/ice-cream.jpg +0 -0
- 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 → container}/types.js +0 -0
- /package/{number-input/numberInputContextTypes.js → image/types.js} +0 -0
- /package/{resultsetTable → resultset-table}/ResultsetTable.d.ts +0 -0
- /package/{resultsetTable → resultset-table}/ResultsetTable.stories.tsx +0 -0
- /package/spinner/{Spinner.stories.jsx → Spinner.stories.tsx} +0 -0
- /package/table/{Table.stories.jsx → Table.stories.tsx} +0 -0
package/grid/Grid.d.ts
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
import GridPropsType, { GridItemProps } from "./types";
|
|
3
3
|
declare const DxcGrid: {
|
|
4
4
|
(props: GridPropsType): JSX.Element;
|
|
5
|
-
|
|
5
|
+
Item: import("styled-components").StyledComponent<"div", any, GridItemProps, never>;
|
|
6
6
|
};
|
|
7
7
|
export default DxcGrid;
|
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
|
-
|
|
90
|
-
var _default = DxcGrid;
|
|
91
|
-
exports["default"] = _default;
|
|
75
|
+
DxcGrid.Item = GridItem;
|
|
76
|
+
var _default = exports["default"] = DxcGrid;
|
package/grid/Grid.stories.tsx
CHANGED
|
@@ -56,16 +56,16 @@ export const Chromatic = () => (
|
|
|
56
56
|
<Title title="Place self" level={4} />
|
|
57
57
|
<ExampleContainer>
|
|
58
58
|
<DxcGrid templateRows={["repeat(3, 100px)"]}>
|
|
59
|
-
<DxcGrid.
|
|
59
|
+
<DxcGrid.Item placeSelf="center">
|
|
60
60
|
<ColoredContainer height="50px" width="50px" />
|
|
61
|
-
</DxcGrid.
|
|
62
|
-
<DxcGrid.
|
|
61
|
+
</DxcGrid.Item>
|
|
62
|
+
<DxcGrid.Item placeSelf={{ alignSelf: "end" }}>
|
|
63
63
|
<ColoredContainer height="40px" width="40px" />
|
|
64
64
|
<ColoredContainer height="30px" width="30px" />
|
|
65
|
-
</DxcGrid.
|
|
66
|
-
<DxcGrid.
|
|
65
|
+
</DxcGrid.Item>
|
|
66
|
+
<DxcGrid.Item placeSelf={{ alignSelf: "center", justifySelf: "end" }}>
|
|
67
67
|
<ColoredContainer height="50px" width="50px" />
|
|
68
|
-
</DxcGrid.
|
|
68
|
+
</DxcGrid.Item>
|
|
69
69
|
</DxcGrid>
|
|
70
70
|
</ExampleContainer>
|
|
71
71
|
<Title title="Halstack layout using template areas" level={4} />
|
|
@@ -76,33 +76,33 @@ export const Chromatic = () => (
|
|
|
76
76
|
templateAreas={["header header header header", "sidenav main main main", "sidenav footer footer footer"]}
|
|
77
77
|
gap={{ rowGap: "0.5rem", columnGap: "1rem" }}
|
|
78
78
|
>
|
|
79
|
-
<DxcGrid.
|
|
79
|
+
<DxcGrid.Item areaName="header" as="header">
|
|
80
80
|
<ColoredContainer height="100%" />
|
|
81
|
-
</DxcGrid.
|
|
82
|
-
<DxcGrid.
|
|
81
|
+
</DxcGrid.Item>
|
|
82
|
+
<DxcGrid.Item areaName="main" as="main">
|
|
83
83
|
<ColoredContainer height="100%" />
|
|
84
|
-
</DxcGrid.
|
|
85
|
-
<DxcGrid.
|
|
84
|
+
</DxcGrid.Item>
|
|
85
|
+
<DxcGrid.Item areaName="sidenav" as="nav">
|
|
86
86
|
<ColoredContainer height="100%" />
|
|
87
|
-
</DxcGrid.
|
|
88
|
-
<DxcGrid.
|
|
87
|
+
</DxcGrid.Item>
|
|
88
|
+
<DxcGrid.Item areaName="footer" as="footer">
|
|
89
89
|
<ColoredContainer height="100%" />
|
|
90
|
-
</DxcGrid.
|
|
90
|
+
</DxcGrid.Item>
|
|
91
91
|
</DxcGrid>
|
|
92
92
|
</ExampleContainer>
|
|
93
93
|
<Title title="Template rows and columns with flexible sizes" level={4} />
|
|
94
94
|
<ExampleContainer>
|
|
95
95
|
<DxcGrid templateColumns={["1fr", "1fr", "1fr"]} templateRows={["1fr", "3fr", "1fr"]} gap="0.5rem">
|
|
96
|
-
<DxcGrid.
|
|
96
|
+
<DxcGrid.Item column={{ start: 1, end: -1 }}>
|
|
97
97
|
<ColoredContainer color="yellow" height="100%">
|
|
98
98
|
Header
|
|
99
99
|
</ColoredContainer>
|
|
100
|
-
</DxcGrid.
|
|
101
|
-
<DxcGrid.
|
|
100
|
+
</DxcGrid.Item>
|
|
101
|
+
<DxcGrid.Item column={1}>
|
|
102
102
|
<ColoredContainer color="lightcyan" height="100%">
|
|
103
103
|
Sidenav
|
|
104
104
|
</ColoredContainer>
|
|
105
|
-
</DxcGrid.
|
|
105
|
+
</DxcGrid.Item>
|
|
106
106
|
<DxcGrid
|
|
107
107
|
column={{ start: 2, end: -1 }}
|
|
108
108
|
templateRows={["repeat(4, 1fr)"]}
|
|
@@ -118,11 +118,11 @@ export const Chromatic = () => (
|
|
|
118
118
|
<ColoredContainer />
|
|
119
119
|
<ColoredContainer />
|
|
120
120
|
</DxcGrid>
|
|
121
|
-
<DxcGrid.
|
|
121
|
+
<DxcGrid.Item column={{ start: 1, end: -1 }}>
|
|
122
122
|
<ColoredContainer color="black" height="100%">
|
|
123
123
|
Footer
|
|
124
124
|
</ColoredContainer>
|
|
125
|
-
</DxcGrid.
|
|
125
|
+
</DxcGrid.Item>
|
|
126
126
|
</DxcGrid>
|
|
127
127
|
</ExampleContainer>
|
|
128
128
|
<Title title="Overlapping" level={4} />
|
|
@@ -141,53 +141,53 @@ export const Chromatic = () => (
|
|
|
141
141
|
<Title title="Implicit rows and columns" level={4} />
|
|
142
142
|
<ExampleContainer>
|
|
143
143
|
<DxcGrid templateColumns={["50px"]} templateRows={["50px", "50px"]} autoRows="50px" autoColumns="50px">
|
|
144
|
-
<DxcGrid.
|
|
144
|
+
<DxcGrid.Item>
|
|
145
145
|
<ColoredContainer height="50px">1</ColoredContainer>
|
|
146
|
-
</DxcGrid.
|
|
147
|
-
<DxcGrid.
|
|
146
|
+
</DxcGrid.Item>
|
|
147
|
+
<DxcGrid.Item row={2}>
|
|
148
148
|
<ColoredContainer height="50px">3</ColoredContainer>
|
|
149
|
-
</DxcGrid.
|
|
150
|
-
<DxcGrid.
|
|
149
|
+
</DxcGrid.Item>
|
|
150
|
+
<DxcGrid.Item row={6} column={1}>
|
|
151
151
|
<ColoredContainer height="50px">5</ColoredContainer>
|
|
152
|
-
</DxcGrid.
|
|
153
|
-
<DxcGrid.
|
|
152
|
+
</DxcGrid.Item>
|
|
153
|
+
<DxcGrid.Item row={3}>
|
|
154
154
|
<ColoredContainer height="50px">4</ColoredContainer>
|
|
155
|
-
</DxcGrid.
|
|
156
|
-
<DxcGrid.
|
|
155
|
+
</DxcGrid.Item>
|
|
156
|
+
<DxcGrid.Item row={{ start: 1, end: 2 }} column={{ start: 5, end: "span 2" }}>
|
|
157
157
|
<ColoredContainer height="50px">2</ColoredContainer>
|
|
158
|
-
</DxcGrid.
|
|
158
|
+
</DxcGrid.Item>
|
|
159
159
|
</DxcGrid>
|
|
160
160
|
</ExampleContainer>
|
|
161
161
|
<Title title="Autoflow 'row' (default)" level={4} />
|
|
162
162
|
<ExampleContainer>
|
|
163
163
|
<DxcGrid templateColumns={["repeat(5, 1fr)"]} templateRows={["1fr", "1fr"]} autoFlow="row" autoColumns="1fr">
|
|
164
|
-
<DxcGrid.
|
|
164
|
+
<DxcGrid.Item row={{ start: 1, end: "span 2" }} column={1}>
|
|
165
165
|
<ColoredContainer height="100%">1</ColoredContainer>
|
|
166
|
-
</DxcGrid.
|
|
166
|
+
</DxcGrid.Item>
|
|
167
167
|
<ColoredContainer color="lightyellow">2</ColoredContainer>
|
|
168
168
|
<ColoredContainer color="lightcyan">3</ColoredContainer>
|
|
169
169
|
<ColoredContainer color="lightgreen">4</ColoredContainer>
|
|
170
|
-
<DxcGrid.
|
|
170
|
+
<DxcGrid.Item row={{ start: 1, end: -1 }} column={-2}>
|
|
171
171
|
<ColoredContainer color="lightpink" height="100%">
|
|
172
172
|
5
|
|
173
173
|
</ColoredContainer>
|
|
174
|
-
</DxcGrid.
|
|
174
|
+
</DxcGrid.Item>
|
|
175
175
|
</DxcGrid>
|
|
176
176
|
</ExampleContainer>
|
|
177
177
|
<Title title="Autoflow 'column'" level={4} />
|
|
178
178
|
<ExampleContainer>
|
|
179
179
|
<DxcGrid templateColumns={["repeat(5, 1fr)"]} templateRows={["1fr", "1fr"]} autoFlow="column" autoColumns="1fr">
|
|
180
|
-
<DxcGrid.
|
|
180
|
+
<DxcGrid.Item row={{ start: 1, end: -1 }} column={1}>
|
|
181
181
|
<ColoredContainer height="100%">1</ColoredContainer>
|
|
182
|
-
</DxcGrid.
|
|
182
|
+
</DxcGrid.Item>
|
|
183
183
|
<ColoredContainer color="lightyellow">2</ColoredContainer>
|
|
184
184
|
<ColoredContainer color="lightcyan">3</ColoredContainer>
|
|
185
185
|
<ColoredContainer color="lightgreen">4</ColoredContainer>
|
|
186
|
-
<DxcGrid.
|
|
186
|
+
<DxcGrid.Item row={{ start: 1, end: -1 }} column={-2}>
|
|
187
187
|
<ColoredContainer color="lightpink" height="100%">
|
|
188
188
|
5
|
|
189
189
|
</ColoredContainer>
|
|
190
|
-
</DxcGrid.
|
|
190
|
+
</DxcGrid.Item>
|
|
191
191
|
</DxcGrid>
|
|
192
192
|
</ExampleContainer>
|
|
193
193
|
</>
|
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
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import DxcDropdown from "../dropdown/Dropdown";
|
|
3
3
|
import HeaderPropsType from "./types";
|
|
4
4
|
declare const DxcHeader: {
|
|
5
|
-
({ underlined, content, responsiveContent, onClick, margin,
|
|
6
|
-
Dropdown: (props: React.ComponentProps<typeof DxcDropdown>) => JSX.Element;
|
|
5
|
+
({ underlined, content, responsiveContent, onClick, margin, tabIndex, }: HeaderPropsType): 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,23 @@
|
|
|
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 _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
-
|
|
16
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
17
|
-
|
|
18
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
-
|
|
20
12
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
21
|
-
|
|
22
13
|
var _Dropdown = _interopRequireDefault(require("../dropdown/Dropdown"));
|
|
23
|
-
|
|
24
14
|
var _Icons = require("./Icons");
|
|
25
|
-
|
|
26
15
|
var _variables = require("../common/variables");
|
|
27
|
-
|
|
28
16
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
29
|
-
|
|
30
17
|
var _useTranslatedLabels = _interopRequireDefault(require("../useTranslatedLabels"));
|
|
31
|
-
|
|
32
|
-
var _BackgroundColorContext = _interopRequireWildcard(require("../BackgroundColorContext"));
|
|
33
|
-
|
|
34
18
|
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
|
-
|
|
19
|
+
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); }
|
|
20
|
+
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; }
|
|
40
21
|
var closeIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
41
22
|
xmlns: "http://www.w3.org/2000/svg",
|
|
42
23
|
viewBox: "0 0 24 24",
|
|
@@ -45,7 +26,6 @@ var closeIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
|
45
26
|
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
46
27
|
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
28
|
}));
|
|
48
|
-
|
|
49
29
|
var hamburgerIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
50
30
|
xmlns: "http://www.w3.org/2000/svg",
|
|
51
31
|
viewBox: "0 0 24 24",
|
|
@@ -54,63 +34,46 @@ var hamburgerIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
|
54
34
|
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
55
35
|
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
36
|
}));
|
|
57
|
-
|
|
58
37
|
var Dropdown = function Dropdown(props) {
|
|
59
38
|
return /*#__PURE__*/_react["default"].createElement(HeaderDropdown, null, /*#__PURE__*/_react["default"].createElement(_Dropdown["default"], props));
|
|
60
39
|
};
|
|
61
|
-
|
|
62
40
|
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
41
|
var getLogoElement = function getLogoElement(themeInput, logoLabel) {
|
|
65
42
|
if (!themeInput) return _Icons.dxcLogo;else if (typeof themeInput === "string") return /*#__PURE__*/_react["default"].createElement(LogoImg, {
|
|
66
43
|
alt: logoLabel,
|
|
67
44
|
src: themeInput
|
|
68
45
|
});else return themeInput;
|
|
69
46
|
};
|
|
70
|
-
|
|
71
47
|
var Content = function Content(_ref) {
|
|
72
48
|
var isResponsive = _ref.isResponsive,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
|
|
78
|
-
return isResponsive ? /*#__PURE__*/_react["default"].createElement(MenuContent, {
|
|
79
|
-
backgroundType: backgroundType
|
|
80
|
-
}, responsiveContent(handleMenu)) : /*#__PURE__*/_react["default"].createElement(ContentContainer, {
|
|
81
|
-
padding: padding,
|
|
82
|
-
backgroundType: backgroundType
|
|
83
|
-
}, content);
|
|
49
|
+
responsiveContent = _ref.responsiveContent,
|
|
50
|
+
handleMenu = _ref.handleMenu,
|
|
51
|
+
content = _ref.content;
|
|
52
|
+
return isResponsive ? /*#__PURE__*/_react["default"].createElement(MenuContent, null, responsiveContent(handleMenu)) : /*#__PURE__*/_react["default"].createElement(ContentContainer, null, content);
|
|
84
53
|
};
|
|
85
|
-
|
|
86
54
|
var DxcHeader = function DxcHeader(_ref2) {
|
|
87
55
|
var _ref2$underlined = _ref2.underlined,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
tabIndex = _ref2$tabIndex === void 0 ? 0 : _ref2$tabIndex;
|
|
56
|
+
underlined = _ref2$underlined === void 0 ? false : _ref2$underlined,
|
|
57
|
+
content = _ref2.content,
|
|
58
|
+
responsiveContent = _ref2.responsiveContent,
|
|
59
|
+
onClick = _ref2.onClick,
|
|
60
|
+
margin = _ref2.margin,
|
|
61
|
+
_ref2$tabIndex = _ref2.tabIndex,
|
|
62
|
+
tabIndex = _ref2$tabIndex === void 0 ? 0 : _ref2$tabIndex;
|
|
96
63
|
var colorsTheme = (0, _useTheme["default"])();
|
|
97
64
|
var translatedLabels = (0, _useTranslatedLabels["default"])();
|
|
98
65
|
var ref = (0, _react.useRef)(null);
|
|
99
|
-
|
|
100
66
|
var _useState = (0, _react.useState)(false),
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
67
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
68
|
+
isResponsive = _useState2[0],
|
|
69
|
+
setIsResponsive = _useState2[1];
|
|
105
70
|
var _useState3 = (0, _react.useState)(false),
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
71
|
+
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
72
|
+
isMenuVisible = _useState4[0],
|
|
73
|
+
setIsMenuVisible = _useState4[1];
|
|
110
74
|
var handleResize = (0, _react.useCallback)(function () {
|
|
111
75
|
setIsResponsive(window.matchMedia("(max-width: ".concat(_variables.responsiveSizes.medium, "rem)")).matches);
|
|
112
76
|
}, []);
|
|
113
|
-
|
|
114
77
|
var handleMenu = function handleMenu() {
|
|
115
78
|
if (isResponsive && !isMenuVisible) {
|
|
116
79
|
setIsMenuVisible(!isMenuVisible);
|
|
@@ -118,7 +81,6 @@ var DxcHeader = function DxcHeader(_ref2) {
|
|
|
118
81
|
setIsMenuVisible(!isMenuVisible);
|
|
119
82
|
}
|
|
120
83
|
};
|
|
121
|
-
|
|
122
84
|
var headerLogo = (0, _react.useMemo)(function () {
|
|
123
85
|
return getLogoElement(colorsTheme.header.logo, translatedLabels.formFields.logoAlternativeText);
|
|
124
86
|
}, [colorsTheme.header.logo]);
|
|
@@ -145,9 +107,7 @@ var DxcHeader = function DxcHeader(_ref2) {
|
|
|
145
107
|
tabIndex: onClick ? tabIndex : -1,
|
|
146
108
|
interactuable: onClick ? true : false,
|
|
147
109
|
onClick: onClick
|
|
148
|
-
}, /*#__PURE__*/_react["default"].createElement(LogoContainer, null, headerLogo)), isResponsive && responsiveContent && /*#__PURE__*/_react["default"].createElement(MainContainer, null, /*#__PURE__*/_react["default"].createElement(ChildContainer, {
|
|
149
|
-
padding: padding
|
|
150
|
-
}, /*#__PURE__*/_react["default"].createElement(HamburguerTrigger, {
|
|
110
|
+
}, /*#__PURE__*/_react["default"].createElement(LogoContainer, null, headerLogo)), isResponsive && responsiveContent && /*#__PURE__*/_react["default"].createElement(MainContainer, null, /*#__PURE__*/_react["default"].createElement(ChildContainer, null, /*#__PURE__*/_react["default"].createElement(HamburguerTrigger, {
|
|
151
111
|
tabIndex: tabIndex,
|
|
152
112
|
onClick: handleMenu
|
|
153
113
|
}, hamburgerIcon, translatedLabels.header.hamburguerTitle)), /*#__PURE__*/_react["default"].createElement(ResponsiveMenu, {
|
|
@@ -157,34 +117,26 @@ var DxcHeader = function DxcHeader(_ref2) {
|
|
|
157
117
|
onClick: handleMenu,
|
|
158
118
|
"aria-label": translatedLabels.header.closeIcon,
|
|
159
119
|
title: translatedLabels.header.closeIcon
|
|
160
|
-
}, closeIcon)), /*#__PURE__*/_react["default"].createElement(
|
|
161
|
-
color: colorsTheme.header.menuBackgroundColor
|
|
162
|
-
}, /*#__PURE__*/_react["default"].createElement(Content, {
|
|
120
|
+
}, closeIcon)), /*#__PURE__*/_react["default"].createElement(Content, {
|
|
163
121
|
isResponsive: isResponsive,
|
|
164
122
|
responsiveContent: responsiveContent,
|
|
165
123
|
handleMenu: handleMenu,
|
|
166
|
-
padding: padding,
|
|
167
124
|
content: content
|
|
168
|
-
}))
|
|
125
|
+
})), /*#__PURE__*/_react["default"].createElement(Overlay, {
|
|
169
126
|
onClick: handleMenu,
|
|
170
127
|
hasVisibility: isMenuVisible
|
|
171
|
-
})), !isResponsive && /*#__PURE__*/_react["default"].createElement(
|
|
172
|
-
color: colorsTheme.header.backgroundColor
|
|
173
|
-
}, /*#__PURE__*/_react["default"].createElement(Content, {
|
|
128
|
+
})), !isResponsive && /*#__PURE__*/_react["default"].createElement(Content, {
|
|
174
129
|
isResponsive: isResponsive,
|
|
175
130
|
responsiveContent: responsiveContent,
|
|
176
131
|
handleMenu: handleMenu,
|
|
177
|
-
padding: padding,
|
|
178
132
|
content: content
|
|
179
|
-
})))
|
|
133
|
+
})));
|
|
180
134
|
};
|
|
181
|
-
|
|
182
135
|
DxcHeader.Dropdown = Dropdown;
|
|
183
|
-
|
|
184
136
|
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) {
|
|
185
137
|
return props.theme.minHeight;
|
|
186
138
|
}, function (props) {
|
|
187
|
-
return props.margin
|
|
139
|
+
return props.margin ? _variables.spaces[props.margin] : "0px";
|
|
188
140
|
}, function (props) {
|
|
189
141
|
return "".concat(props.theme.paddingTop, " ").concat(props.theme.paddingRight, " ").concat(props.theme.paddingBottom, " ").concat(props.theme.paddingLeft);
|
|
190
142
|
}, function (props) {
|
|
@@ -192,49 +144,23 @@ var HeaderContainer = _styledComponents["default"].header(_templateObject2 || (_
|
|
|
192
144
|
}, function (props) {
|
|
193
145
|
return props.underlined && "".concat(props.theme.underlinedThickness, " ").concat(props.theme.underlinedStyle, " ").concat(props.theme.underlinedColor);
|
|
194
146
|
});
|
|
195
|
-
|
|
196
147
|
var LogoAnchor = _styledComponents["default"].a(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n ", ";\n"])), function (props) {
|
|
197
148
|
return props.interactuable ? "cursor: pointer" : "cursor: default; outline:none;";
|
|
198
149
|
});
|
|
199
|
-
|
|
200
150
|
var LogoImg = _styledComponents["default"].img(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n"])), function (props) {
|
|
201
151
|
return props.theme.logoHeight;
|
|
202
152
|
}, function (props) {
|
|
203
153
|
return props.theme.logoWidth;
|
|
204
154
|
});
|
|
205
|
-
|
|
206
155
|
var LogoContainer = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n vertical-align: middle;\n"])), function (props) {
|
|
207
156
|
return props.theme.logoHeight;
|
|
208
157
|
}, function (props) {
|
|
209
158
|
return props.theme.logoWidth;
|
|
210
159
|
});
|
|
211
|
-
|
|
212
|
-
var
|
|
213
|
-
return props.
|
|
214
|
-
}, function (props) {
|
|
215
|
-
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.top ? _variables.spaces[props.padding.top] : "";
|
|
216
|
-
}, function (props) {
|
|
217
|
-
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.right ? _variables.spaces[props.padding.right] : "";
|
|
218
|
-
}, function (props) {
|
|
219
|
-
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.bottom ? _variables.spaces[props.padding.bottom] : "";
|
|
220
|
-
}, function (props) {
|
|
221
|
-
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.left ? _variables.spaces[props.padding.left] : "";
|
|
160
|
+
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"])));
|
|
161
|
+
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) {
|
|
162
|
+
return props.theme.contentColor;
|
|
222
163
|
});
|
|
223
|
-
|
|
224
|
-
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 padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n color: ", ";\n"])), function (props) {
|
|
225
|
-
return props.padding && (0, _typeof2["default"])(props.padding) !== "object" ? _variables.spaces[props.padding] : "0px";
|
|
226
|
-
}, function (props) {
|
|
227
|
-
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.top ? _variables.spaces[props.padding.top] : "";
|
|
228
|
-
}, function (props) {
|
|
229
|
-
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.right ? _variables.spaces[props.padding.right] : "";
|
|
230
|
-
}, function (props) {
|
|
231
|
-
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.bottom ? _variables.spaces[props.padding.bottom] : "";
|
|
232
|
-
}, function (props) {
|
|
233
|
-
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.left ? _variables.spaces[props.padding.left] : "";
|
|
234
|
-
}, function (props) {
|
|
235
|
-
return props.backgroundType === "dark" ? props.theme.contentColorOnDark : props.theme.contentColor;
|
|
236
|
-
});
|
|
237
|
-
|
|
238
164
|
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) {
|
|
239
165
|
return props.theme.hamburguerHoverColor;
|
|
240
166
|
}, function (props) {
|
|
@@ -254,9 +180,7 @@ var HamburguerTrigger = _styledComponents["default"].button(_templateObject8 ||
|
|
|
254
180
|
}, function (props) {
|
|
255
181
|
return props.theme.hamburguerFontColor;
|
|
256
182
|
});
|
|
257
|
-
|
|
258
183
|
var MainContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-grow: 1;\n"])));
|
|
259
|
-
|
|
260
184
|
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) {
|
|
261
185
|
return props.theme.menuBackgroundColor;
|
|
262
186
|
}, function (props) {
|
|
@@ -270,23 +194,18 @@ var ResponsiveMenu = _styledComponents["default"].div(_templateObject10 || (_tem
|
|
|
270
194
|
}, function (props) {
|
|
271
195
|
return props.hasVisibility ? "1" : "0.96";
|
|
272
196
|
});
|
|
273
|
-
|
|
274
197
|
var ResponsiveLogoContainer = _styledComponents["default"].div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n display: flex;\n"])), function (props) {
|
|
275
198
|
return props.theme.logoHeight;
|
|
276
199
|
}, function (props) {
|
|
277
200
|
return props.theme.logoWidth;
|
|
278
201
|
});
|
|
279
|
-
|
|
280
202
|
var ResponsiveIconsContainer = _styledComponents["default"].div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
|
|
281
|
-
|
|
282
203
|
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) {
|
|
283
204
|
return props.theme.hamburguerFocusColor;
|
|
284
205
|
});
|
|
285
|
-
|
|
286
206
|
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) {
|
|
287
|
-
return props.
|
|
207
|
+
return props.theme.contentColor;
|
|
288
208
|
});
|
|
289
|
-
|
|
290
209
|
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) {
|
|
291
210
|
return props.theme.overlayColor;
|
|
292
211
|
}, function (props) {
|
|
@@ -298,6 +217,4 @@ var Overlay = _styledComponents["default"].div(_templateObject15 || (_templateOb
|
|
|
298
217
|
}, _variables.responsiveSizes.small, function (props) {
|
|
299
218
|
return props.theme.overlayZindex;
|
|
300
219
|
});
|
|
301
|
-
|
|
302
|
-
var _default = DxcHeader;
|
|
303
|
-
exports["default"] = _default;
|
|
220
|
+
var _default = exports["default"] = DxcHeader;
|