@dxc-technology/halstack-react 0.0.0-7c194f8 → 0.0.0-7c2b794
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/HalstackContext.d.ts +29 -15
- package/HalstackContext.js +1 -1
- package/accordion/Accordion.js +1 -1
- package/accordion-group/AccordionGroup.d.ts +2 -3
- package/accordion-group/AccordionGroup.js +3 -3
- package/accordion-group/AccordionGroupAccordion.js +2 -2
- package/accordion-group/AccordionGroupContext.d.ts +3 -0
- package/accordion-group/AccordionGroupContext.js +8 -0
- package/action-icon/ActionIcon.d.ts +4 -0
- package/action-icon/ActionIcon.js +47 -0
- package/action-icon/ActionIcon.stories.tsx +41 -0
- package/action-icon/ActionIcon.test.js +64 -0
- package/action-icon/types.d.ts +26 -0
- package/action-icon/types.js +5 -0
- package/badge/Badge.d.ts +1 -1
- package/badge/Badge.js +140 -29
- package/badge/Badge.stories.tsx +210 -0
- package/badge/Badge.test.js +30 -0
- package/badge/types.d.ts +52 -3
- package/button/Button.js +3 -2
- package/button/Button.stories.tsx +32 -50
- package/button/Button.test.js +3 -1
- package/button/types.d.ts +1 -1
- package/common/coreTokens.js +2 -2
- package/common/variables.d.ts +29 -15
- package/common/variables.js +36 -22
- package/container/Container.js +1 -1
- package/contextual-menu/ContextualMenu.d.ts +7 -0
- package/contextual-menu/ContextualMenu.js +71 -0
- package/contextual-menu/ContextualMenu.stories.tsx +182 -0
- package/contextual-menu/ContextualMenu.test.js +71 -0
- package/contextual-menu/MenuItemAction.d.ts +4 -0
- package/contextual-menu/MenuItemAction.js +46 -0
- package/contextual-menu/types.d.ts +22 -0
- package/contextual-menu/types.js +5 -0
- package/date-input/types.d.ts +2 -2
- package/divider/Divider.d.ts +4 -0
- package/divider/Divider.js +36 -0
- package/divider/Divider.stories.tsx +223 -0
- package/divider/Divider.test.js +38 -0
- package/divider/types.d.ts +19 -0
- package/divider/types.js +5 -0
- package/dropdown/Dropdown.js +9 -7
- package/dropdown/types.d.ts +1 -1
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +25 -12
- package/footer/Footer.stories.tsx +19 -0
- package/footer/Icons.d.ts +1 -0
- package/footer/Icons.js +65 -1
- package/footer/types.d.ts +6 -0
- package/header/types.d.ts +2 -2
- package/icon/Icon.d.ts +4 -0
- package/icon/Icon.js +33 -0
- package/icon/Icon.stories.tsx +26 -0
- package/icon/types.d.ts +4 -0
- package/icon/types.js +5 -0
- package/image/Image.stories.tsx +3 -1
- package/layout/ApplicationLayout.d.ts +1 -1
- package/layout/ApplicationLayout.js +1 -1
- package/main.d.ts +5 -2
- package/main.js +22 -1
- package/nav-tabs/NavTabs.d.ts +1 -2
- package/nav-tabs/NavTabs.js +9 -6
- package/nav-tabs/NavTabs.stories.tsx +6 -4
- package/nav-tabs/NavTabs.test.js +3 -2
- package/nav-tabs/NavTabsContext.d.ts +3 -0
- package/nav-tabs/NavTabsContext.js +8 -0
- package/nav-tabs/Tab.js +8 -7
- package/number-input/NumberInput.d.ts +0 -7
- package/number-input/NumberInput.js +24 -5
- package/number-input/NumberInput.test.js +165 -6
- package/number-input/NumberInputContext.d.ts +3 -0
- package/number-input/NumberInputContext.js +8 -0
- package/number-input/types.d.ts +6 -0
- package/package.json +2 -2
- package/radio-group/RadioGroup.js +1 -1
- package/resultset-table/ResultsetTable.d.ts +4 -1
- package/resultset-table/ResultsetTable.js +13 -6
- package/resultset-table/ResultsetTable.stories.tsx +102 -5
- package/resultset-table/ResultsetTable.test.js +66 -0
- package/resultset-table/types.d.ts +6 -0
- package/select/Option.js +8 -1
- package/select/Select.js +33 -23
- package/select/types.d.ts +2 -2
- package/sidenav/Sidenav.js +3 -2
- package/slider/Slider.js +5 -6
- package/status-light/StatusLight.d.ts +4 -0
- package/status-light/StatusLight.js +51 -0
- package/status-light/StatusLight.stories.tsx +74 -0
- package/status-light/StatusLight.test.js +25 -0
- package/status-light/types.d.ts +17 -0
- package/status-light/types.js +5 -0
- package/table/DropdownTheme.js +62 -0
- package/table/Table.d.ts +6 -2
- package/table/Table.js +82 -8
- package/table/Table.stories.tsx +304 -2
- package/table/Table.test.js +92 -0
- package/table/types.d.ts +42 -0
- package/tabs/Tab.js +7 -4
- package/tabs/Tabs.js +4 -5
- package/tabs/Tabs.stories.tsx +1 -1
- package/text-input/TextInput.js +58 -71
- package/text-input/TextInput.test.js +96 -79
- package/useTheme.d.ts +29 -15
- package/utils/FocusLock.js +3 -0
- package/wizard/types.d.ts +1 -1
- package/common/OpenSans.css +0 -69
- package/common/fonts/OpenSans-Bold.ttf +0 -0
- package/common/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/common/fonts/OpenSans-ExtraBold.ttf +0 -0
- package/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- package/common/fonts/OpenSans-Italic.ttf +0 -0
- package/common/fonts/OpenSans-Light.ttf +0 -0
- package/common/fonts/OpenSans-LightItalic.ttf +0 -0
- package/common/fonts/OpenSans-Regular.ttf +0 -0
- package/common/fonts/OpenSans-SemiBold.ttf +0 -0
- package/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
- /package/{layout → sidenav}/SidenavContext.d.ts +0 -0
- /package/{layout → sidenav}/SidenavContext.js +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
+
var _coreTokens = _interopRequireDefault(require("../common/coreTokens"));
|
|
12
|
+
var _templateObject;
|
|
13
|
+
var DxcDivider = function DxcDivider(_ref) {
|
|
14
|
+
var _ref$orientation = _ref.orientation,
|
|
15
|
+
orientation = _ref$orientation === void 0 ? "horizontal" : _ref$orientation,
|
|
16
|
+
_ref$weight = _ref.weight,
|
|
17
|
+
weight = _ref$weight === void 0 ? "regular" : _ref$weight,
|
|
18
|
+
_ref$color = _ref.color,
|
|
19
|
+
color = _ref$color === void 0 ? "mediumGrey" : _ref$color,
|
|
20
|
+
_ref$decorative = _ref.decorative,
|
|
21
|
+
decorative = _ref$decorative === void 0 ? true : _ref$decorative;
|
|
22
|
+
return /*#__PURE__*/_react["default"].createElement(StyledDivider, {
|
|
23
|
+
orientation: orientation,
|
|
24
|
+
weight: weight,
|
|
25
|
+
color: color,
|
|
26
|
+
"aria-orientation": orientation,
|
|
27
|
+
"aria-hidden": decorative
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
var StyledDivider = _styledComponents["default"].hr(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"])), function (_ref2) {
|
|
31
|
+
var orientation = _ref2.orientation,
|
|
32
|
+
weight = _ref2.weight,
|
|
33
|
+
color = _ref2.color;
|
|
34
|
+
return "\n border-color: ".concat(color === "lightGrey" ? _coreTokens["default"].color_grey_200 : color === "mediumGrey" ? _coreTokens["default"].color_grey_400 : _coreTokens["default"].color_grey_700, ";\n ").concat(orientation === "horizontal" ? "width" : "min-height", ": 100%;\n ").concat(orientation === "horizontal" ? "height" : "width", ": 0px;\n ").concat(orientation === "horizontal" ? "border-width: " + (weight === "regular" ? "1px 0 0 0" : "2px 0 0 0") : "border-width: " + (weight === "regular" ? "0 0 0 1px" : "0 0 0 2px"), ";\n margin: 0px;\n ");
|
|
35
|
+
});
|
|
36
|
+
var _default = exports["default"] = DxcDivider;
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Title from "../../.storybook/components/Title";
|
|
3
|
+
import DxcDivider from "./Divider";
|
|
4
|
+
import { DxcFlex, DxcParagraph } from "../main";
|
|
5
|
+
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: "Divider",
|
|
9
|
+
component: DxcDivider,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const Chromatic = () => (
|
|
13
|
+
<>
|
|
14
|
+
<Title title="Default" level={4} />
|
|
15
|
+
<ExampleContainer>
|
|
16
|
+
<DxcFlex gap="1rem" direction="column">
|
|
17
|
+
<DxcParagraph>
|
|
18
|
+
Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis volutpat urna. Hendrerit aliquet et
|
|
19
|
+
arcu purus. Sodales elementum sollicitudin consequat elementum tortor. Lectus eget cursus ut ac pharetra
|
|
20
|
+
lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus vitae vitae aenean arcu. Nibh
|
|
21
|
+
tristique porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh est sed. Netus venenatis congue
|
|
22
|
+
diam in dui morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu nec fringilla enim purus ut justo
|
|
23
|
+
nisi. Vel mus ut ornare faucibus blandit diam sit vestibulum massa. Semper nullam sit sagittis hendrerit
|
|
24
|
+
augue. In fermentum metus proin arcu faucibus proin nibh sit. Vel integer sed enim in sed vel nec ut vitae.
|
|
25
|
+
Commodo sagittis volutpat id lorem.
|
|
26
|
+
</DxcParagraph>
|
|
27
|
+
<DxcDivider />
|
|
28
|
+
<DxcParagraph>
|
|
29
|
+
Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis volutpat urna. Hendrerit aliquet et
|
|
30
|
+
arcu purus. Sodales elementum sollicitudin consequat elementum tortor. Lectus eget cursus ut ac pharetra
|
|
31
|
+
lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus vitae vitae aenean arcu. Nibh
|
|
32
|
+
tristique porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh est sed. Netus venenatis congue
|
|
33
|
+
diam in dui morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu nec fringilla enim purus ut justo
|
|
34
|
+
nisi. Vel mus ut ornare faucibus blandit diam sit vestibulum massa. Semper nullam sit sagittis hendrerit
|
|
35
|
+
augue. In fermentum metus proin arcu faucibus proin nibh sit. Vel integer sed enim in sed vel nec ut vitae.
|
|
36
|
+
Commodo sagittis volutpat id lorem.
|
|
37
|
+
</DxcParagraph>
|
|
38
|
+
</DxcFlex>
|
|
39
|
+
</ExampleContainer>
|
|
40
|
+
<Title title="Default strong" level={4} />
|
|
41
|
+
<ExampleContainer>
|
|
42
|
+
<DxcFlex gap="1rem" direction="column">
|
|
43
|
+
<DxcParagraph>
|
|
44
|
+
Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis volutpat urna. Hendrerit aliquet et
|
|
45
|
+
arcu purus. Sodales elementum sollicitudin consequat elementum tortor. Lectus eget cursus ut ac pharetra
|
|
46
|
+
lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus vitae vitae aenean arcu. Nibh
|
|
47
|
+
tristique porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh est sed. Netus venenatis congue
|
|
48
|
+
diam in dui morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu nec fringilla enim purus ut justo
|
|
49
|
+
nisi. Vel mus ut ornare faucibus blandit diam sit vestibulum massa. Semper nullam sit sagittis hendrerit
|
|
50
|
+
augue. In fermentum metus proin arcu faucibus proin nibh sit. Vel integer sed enim in sed vel nec ut vitae.
|
|
51
|
+
Commodo sagittis volutpat id lorem.
|
|
52
|
+
</DxcParagraph>
|
|
53
|
+
<DxcDivider weight="strong" />
|
|
54
|
+
<DxcParagraph>
|
|
55
|
+
Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis volutpat urna. Hendrerit aliquet et
|
|
56
|
+
arcu purus. Sodales elementum sollicitudin consequat elementum tortor. Lectus eget cursus ut ac pharetra
|
|
57
|
+
lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus vitae vitae aenean arcu. Nibh
|
|
58
|
+
tristique porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh est sed. Netus venenatis congue
|
|
59
|
+
diam in dui morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu nec fringilla enim purus ut justo
|
|
60
|
+
nisi. Vel mus ut ornare faucibus blandit diam sit vestibulum massa. Semper nullam sit sagittis hendrerit
|
|
61
|
+
augue. In fermentum metus proin arcu faucibus proin nibh sit. Vel integer sed enim in sed vel nec ut vitae.
|
|
62
|
+
Commodo sagittis volutpat id lorem.
|
|
63
|
+
</DxcParagraph>
|
|
64
|
+
</DxcFlex>
|
|
65
|
+
</ExampleContainer>
|
|
66
|
+
<Title title="Default light grey" level={4} />
|
|
67
|
+
<ExampleContainer>
|
|
68
|
+
<DxcFlex gap="1rem" direction="column">
|
|
69
|
+
<DxcParagraph>
|
|
70
|
+
Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis volutpat urna. Hendrerit aliquet et
|
|
71
|
+
arcu purus. Sodales elementum sollicitudin consequat elementum tortor. Lectus eget cursus ut ac pharetra
|
|
72
|
+
lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus vitae vitae aenean arcu. Nibh
|
|
73
|
+
tristique porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh est sed. Netus venenatis congue
|
|
74
|
+
diam in dui morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu nec fringilla enim purus ut justo
|
|
75
|
+
nisi. Vel mus ut ornare faucibus blandit diam sit vestibulum massa. Semper nullam sit sagittis hendrerit
|
|
76
|
+
augue. In fermentum metus proin arcu faucibus proin nibh sit. Vel integer sed enim in sed vel nec ut vitae.
|
|
77
|
+
Commodo sagittis volutpat id lorem.
|
|
78
|
+
</DxcParagraph>
|
|
79
|
+
<DxcDivider color="lightGrey" />
|
|
80
|
+
<DxcParagraph>
|
|
81
|
+
Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis volutpat urna. Hendrerit aliquet et
|
|
82
|
+
arcu purus. Sodales elementum sollicitudin consequat elementum tortor. Lectus eget cursus ut ac pharetra
|
|
83
|
+
lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus vitae vitae aenean arcu. Nibh
|
|
84
|
+
tristique porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh est sed. Netus venenatis congue
|
|
85
|
+
diam in dui morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu nec fringilla enim purus ut justo
|
|
86
|
+
nisi. Vel mus ut ornare faucibus blandit diam sit vestibulum massa. Semper nullam sit sagittis hendrerit
|
|
87
|
+
augue. In fermentum metus proin arcu faucibus proin nibh sit. Vel integer sed enim in sed vel nec ut vitae.
|
|
88
|
+
Commodo sagittis volutpat id lorem.
|
|
89
|
+
</DxcParagraph>
|
|
90
|
+
</DxcFlex>
|
|
91
|
+
</ExampleContainer>
|
|
92
|
+
<Title title="Default dark grey" level={4} />
|
|
93
|
+
<ExampleContainer>
|
|
94
|
+
<DxcFlex gap="1rem" direction="column">
|
|
95
|
+
<DxcParagraph>
|
|
96
|
+
Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis volutpat urna. Hendrerit aliquet et
|
|
97
|
+
arcu purus. Sodales elementum sollicitudin consequat elementum tortor. Lectus eget cursus ut ac pharetra
|
|
98
|
+
lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus vitae vitae aenean arcu. Nibh
|
|
99
|
+
tristique porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh est sed. Netus venenatis congue
|
|
100
|
+
diam in dui morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu nec fringilla enim purus ut justo
|
|
101
|
+
nisi. Vel mus ut ornare faucibus blandit diam sit vestibulum massa. Semper nullam sit sagittis hendrerit
|
|
102
|
+
augue. In fermentum metus proin arcu faucibus proin nibh sit. Vel integer sed enim in sed vel nec ut vitae.
|
|
103
|
+
Commodo sagittis volutpat id lorem.
|
|
104
|
+
</DxcParagraph>
|
|
105
|
+
<DxcDivider color="darkGrey" />
|
|
106
|
+
<DxcParagraph>
|
|
107
|
+
Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis volutpat urna. Hendrerit aliquet et
|
|
108
|
+
arcu purus. Sodales elementum sollicitudin consequat elementum tortor. Lectus eget cursus ut ac pharetra
|
|
109
|
+
lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus vitae vitae aenean arcu. Nibh
|
|
110
|
+
tristique porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh est sed. Netus venenatis congue
|
|
111
|
+
diam in dui morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu nec fringilla enim purus ut justo
|
|
112
|
+
nisi. Vel mus ut ornare faucibus blandit diam sit vestibulum massa. Semper nullam sit sagittis hendrerit
|
|
113
|
+
augue. In fermentum metus proin arcu faucibus proin nibh sit. Vel integer sed enim in sed vel nec ut vitae.
|
|
114
|
+
Commodo sagittis volutpat id lorem.
|
|
115
|
+
</DxcParagraph>
|
|
116
|
+
</DxcFlex>
|
|
117
|
+
</ExampleContainer>
|
|
118
|
+
<Title title="Vertical" level={4} />
|
|
119
|
+
<ExampleContainer>
|
|
120
|
+
<DxcFlex gap="1rem" direction="row">
|
|
121
|
+
<DxcParagraph>
|
|
122
|
+
Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis volutpat urna. Hendrerit aliquet et
|
|
123
|
+
arcu purus. Sodales elementum sollicitudin consequat elementum tortor. Lectus eget cursus ut ac pharetra
|
|
124
|
+
lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus vitae vitae aenean arcu. Nibh
|
|
125
|
+
tristique porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh est sed. Netus venenatis congue
|
|
126
|
+
diam in dui morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu nec fringilla enim purus ut justo
|
|
127
|
+
nisi. Vel mus ut ornare faucibus blandit diam sit vestibulum massa. Semper nullam sit sagittis hendrerit
|
|
128
|
+
augue. In fermentum metus proin arcu faucibus proin nibh sit. Vel integer sed enim in sed vel nec ut vitae.
|
|
129
|
+
Commodo sagittis volutpat id lorem.
|
|
130
|
+
</DxcParagraph>
|
|
131
|
+
<DxcDivider orientation="vertical" />
|
|
132
|
+
<DxcParagraph>
|
|
133
|
+
Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis volutpat urna. Hendrerit aliquet et
|
|
134
|
+
arcu purus. Sodales elementum sollicitudin consequat elementum tortor. Lectus eget cursus ut ac pharetra
|
|
135
|
+
lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus vitae vitae aenean arcu. Nibh
|
|
136
|
+
tristique porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh est sed. Netus venenatis congue
|
|
137
|
+
diam in dui morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu nec fringilla enim purus ut justo
|
|
138
|
+
nisi. Vel mus ut ornare faucibus blandit diam sit vestibulum massa. Semper nullam sit sagittis hendrerit
|
|
139
|
+
augue. In fermentum metus proin arcu faucibus proin nibh sit. Vel integer sed enim in sed vel nec ut vitae.
|
|
140
|
+
Commodo sagittis volutpat id lorem.
|
|
141
|
+
</DxcParagraph>
|
|
142
|
+
</DxcFlex>
|
|
143
|
+
</ExampleContainer>
|
|
144
|
+
<Title title="Vertical strong" level={4} />
|
|
145
|
+
<ExampleContainer>
|
|
146
|
+
<DxcFlex gap="1rem" direction="row">
|
|
147
|
+
<DxcParagraph>
|
|
148
|
+
Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis volutpat urna. Hendrerit aliquet et
|
|
149
|
+
arcu purus. Sodales elementum sollicitudin consequat elementum tortor. Lectus eget cursus ut ac pharetra
|
|
150
|
+
lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus vitae vitae aenean arcu. Nibh
|
|
151
|
+
tristique porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh est sed. Netus venenatis congue
|
|
152
|
+
diam in dui morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu nec fringilla enim purus ut justo
|
|
153
|
+
nisi. Vel mus ut ornare faucibus blandit diam sit vestibulum massa. Semper nullam sit sagittis hendrerit
|
|
154
|
+
augue. In fermentum metus proin arcu faucibus proin nibh sit. Vel integer sed enim in sed vel nec ut vitae.
|
|
155
|
+
Commodo sagittis volutpat id lorem.
|
|
156
|
+
</DxcParagraph>
|
|
157
|
+
<DxcDivider orientation="vertical" weight="strong" />
|
|
158
|
+
<DxcParagraph>
|
|
159
|
+
Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis volutpat urna. Hendrerit aliquet et
|
|
160
|
+
arcu purus. Sodales elementum sollicitudin consequat elementum tortor. Lectus eget cursus ut ac pharetra
|
|
161
|
+
lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus vitae vitae aenean arcu. Nibh
|
|
162
|
+
tristique porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh est sed. Netus venenatis congue
|
|
163
|
+
diam in dui morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu nec fringilla enim purus ut justo
|
|
164
|
+
nisi. Vel mus ut ornare faucibus blandit diam sit vestibulum massa. Semper nullam sit sagittis hendrerit
|
|
165
|
+
augue. In fermentum metus proin arcu faucibus proin nibh sit. Vel integer sed enim in sed vel nec ut vitae.
|
|
166
|
+
Commodo sagittis volutpat id lorem.
|
|
167
|
+
</DxcParagraph>
|
|
168
|
+
</DxcFlex>
|
|
169
|
+
</ExampleContainer>
|
|
170
|
+
<Title title="Vertical light grey" level={4} />
|
|
171
|
+
<ExampleContainer>
|
|
172
|
+
<DxcFlex gap="1rem" direction="row">
|
|
173
|
+
<DxcParagraph>
|
|
174
|
+
Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis volutpat urna. Hendrerit aliquet et
|
|
175
|
+
arcu purus. Sodales elementum sollicitudin consequat elementum tortor. Lectus eget cursus ut ac pharetra
|
|
176
|
+
lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus vitae vitae aenean arcu. Nibh
|
|
177
|
+
tristique porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh est sed. Netus venenatis congue
|
|
178
|
+
diam in dui morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu nec fringilla enim purus ut justo
|
|
179
|
+
nisi. Vel mus ut ornare faucibus blandit diam sit vestibulum massa. Semper nullam sit sagittis hendrerit
|
|
180
|
+
augue. In fermentum metus proin arcu faucibus proin nibh sit. Vel integer sed enim in sed vel nec ut vitae.
|
|
181
|
+
Commodo sagittis volutpat id lorem.
|
|
182
|
+
</DxcParagraph>
|
|
183
|
+
<DxcDivider orientation="vertical" color="lightGrey" />
|
|
184
|
+
<DxcParagraph>
|
|
185
|
+
Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis volutpat urna. Hendrerit aliquet et
|
|
186
|
+
arcu purus. Sodales elementum sollicitudin consequat elementum tortor. Lectus eget cursus ut ac pharetra
|
|
187
|
+
lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus vitae vitae aenean arcu. Nibh
|
|
188
|
+
tristique porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh est sed. Netus venenatis congue
|
|
189
|
+
diam in dui morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu nec fringilla enim purus ut justo
|
|
190
|
+
nisi. Vel mus ut ornare faucibus blandit diam sit vestibulum massa. Semper nullam sit sagittis hendrerit
|
|
191
|
+
augue. In fermentum metus proin arcu faucibus proin nibh sit. Vel integer sed enim in sed vel nec ut vitae.
|
|
192
|
+
Commodo sagittis volutpat id lorem.
|
|
193
|
+
</DxcParagraph>
|
|
194
|
+
</DxcFlex>
|
|
195
|
+
</ExampleContainer>
|
|
196
|
+
<Title title="Vertical dark grey" level={4} />
|
|
197
|
+
<ExampleContainer>
|
|
198
|
+
<DxcFlex gap="1rem" direction="row">
|
|
199
|
+
<DxcParagraph>
|
|
200
|
+
Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis volutpat urna. Hendrerit aliquet et
|
|
201
|
+
arcu purus. Sodales elementum sollicitudin consequat elementum tortor. Lectus eget cursus ut ac pharetra
|
|
202
|
+
lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus vitae vitae aenean arcu. Nibh
|
|
203
|
+
tristique porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh est sed. Netus venenatis congue
|
|
204
|
+
diam in dui morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu nec fringilla enim purus ut justo
|
|
205
|
+
nisi. Vel mus ut ornare faucibus blandit diam sit vestibulum massa. Semper nullam sit sagittis hendrerit
|
|
206
|
+
augue. In fermentum metus proin arcu faucibus proin nibh sit. Vel integer sed enim in sed vel nec ut vitae.
|
|
207
|
+
Commodo sagittis volutpat id lorem.
|
|
208
|
+
</DxcParagraph>
|
|
209
|
+
<DxcDivider orientation="vertical" color="darkGrey" />
|
|
210
|
+
<DxcParagraph>
|
|
211
|
+
Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis volutpat urna. Hendrerit aliquet et
|
|
212
|
+
arcu purus. Sodales elementum sollicitudin consequat elementum tortor. Lectus eget cursus ut ac pharetra
|
|
213
|
+
lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus vitae vitae aenean arcu. Nibh
|
|
214
|
+
tristique porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh est sed. Netus venenatis congue
|
|
215
|
+
diam in dui morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu nec fringilla enim purus ut justo
|
|
216
|
+
nisi. Vel mus ut ornare faucibus blandit diam sit vestibulum massa. Semper nullam sit sagittis hendrerit
|
|
217
|
+
augue. In fermentum metus proin arcu faucibus proin nibh sit. Vel integer sed enim in sed vel nec ut vitae.
|
|
218
|
+
Commodo sagittis volutpat id lorem.
|
|
219
|
+
</DxcParagraph>
|
|
220
|
+
</DxcFlex>
|
|
221
|
+
</ExampleContainer>
|
|
222
|
+
</>
|
|
223
|
+
);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _react = _interopRequireDefault(require("react"));
|
|
5
|
+
var _react2 = require("@testing-library/react");
|
|
6
|
+
var _Divider = _interopRequireDefault(require("./Divider"));
|
|
7
|
+
describe("Divider Component", function () {
|
|
8
|
+
test("Default renders horizontal divider correctly", function () {
|
|
9
|
+
var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Divider["default"], null)),
|
|
10
|
+
container = _render.container;
|
|
11
|
+
var divider = container.querySelector("hr");
|
|
12
|
+
expect(divider.getAttribute("aria-orientation")).toBe("horizontal");
|
|
13
|
+
});
|
|
14
|
+
test("Renders vertical divider correctly", function () {
|
|
15
|
+
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Divider["default"], {
|
|
16
|
+
orientation: "vertical"
|
|
17
|
+
})),
|
|
18
|
+
container = _render2.container;
|
|
19
|
+
var divider = container.querySelector("hr");
|
|
20
|
+
expect(divider.getAttribute("aria-orientation")).toBe("vertical");
|
|
21
|
+
});
|
|
22
|
+
test("Renders divider as a decorative resource by default", function () {
|
|
23
|
+
var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Divider["default"], null)),
|
|
24
|
+
container = _render3.container;
|
|
25
|
+
var divider = container.querySelector("hr");
|
|
26
|
+
expect(divider).toBeTruthy();
|
|
27
|
+
expect(divider.getAttribute("aria-hidden")).toBe("true");
|
|
28
|
+
});
|
|
29
|
+
test("Renders divider as a separator if it is not decorative", function () {
|
|
30
|
+
var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Divider["default"], {
|
|
31
|
+
decorative: false
|
|
32
|
+
})),
|
|
33
|
+
getByRole = _render4.getByRole;
|
|
34
|
+
var divider = getByRole("separator");
|
|
35
|
+
expect(divider).toBeTruthy();
|
|
36
|
+
expect(divider.getAttribute("aria-hidden")).toBe("false");
|
|
37
|
+
});
|
|
38
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
/**
|
|
3
|
+
* The divider can be shown in horizontal or vertical.
|
|
4
|
+
*/
|
|
5
|
+
orientation?: "horizontal" | "vertical";
|
|
6
|
+
/**
|
|
7
|
+
* Modifies the thickness of the divider.
|
|
8
|
+
*/
|
|
9
|
+
weight?: "regular" | "strong";
|
|
10
|
+
/**
|
|
11
|
+
* Modifies the color of the divider.
|
|
12
|
+
*/
|
|
13
|
+
color?: "lightGrey" | "mediumGrey" | "darkGrey";
|
|
14
|
+
/**
|
|
15
|
+
* Indicates whether the divider is just a decorative resource or it works as a semantic separator of content.
|
|
16
|
+
*/
|
|
17
|
+
decorative?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export default Props;
|
package/divider/types.js
ADDED
package/dropdown/Dropdown.js
CHANGED
|
@@ -263,7 +263,7 @@ var sizes = {
|
|
|
263
263
|
var calculateWidth = function calculateWidth(margin, size) {
|
|
264
264
|
return size === "fillParent" ? "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")") : sizes[size];
|
|
265
265
|
};
|
|
266
|
-
var DropdownContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
266
|
+
var DropdownContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"])), function (props) {
|
|
267
267
|
return calculateWidth(props.margin, props.size);
|
|
268
268
|
}, function (props) {
|
|
269
269
|
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
@@ -276,18 +276,20 @@ var DropdownContainer = _styledComponents["default"].div(_templateObject || (_te
|
|
|
276
276
|
}, function (props) {
|
|
277
277
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
278
278
|
});
|
|
279
|
-
var DropdownTrigger = _styledComponents["default"].button(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: ", ";\n width: 100%;\n
|
|
279
|
+
var DropdownTrigger = _styledComponents["default"].button(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: ", ";\n width: 100%;\n height: ", ";\n min-width: ", ";\n border-radius: ", ";\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n background-color: ", ";\n color: ", ";\n cursor: ", ";\n\n ", ";\n"])), function (props) {
|
|
280
280
|
return props.theme.caretIconSpacing;
|
|
281
|
+
}, function (props) {
|
|
282
|
+
return props.theme.buttonHeight;
|
|
281
283
|
}, function (props) {
|
|
282
284
|
return props.label === "" ? "0px" : calculateWidth(props.margin, props.size);
|
|
283
285
|
}, function (props) {
|
|
284
|
-
return props.theme.
|
|
286
|
+
return props.theme.buttonBorderRadius;
|
|
285
287
|
}, function (props) {
|
|
286
|
-
return props.theme.
|
|
288
|
+
return props.theme.buttonBorderThickness;
|
|
287
289
|
}, function (props) {
|
|
288
|
-
return props.theme.
|
|
290
|
+
return props.theme.buttonBorderStyle;
|
|
289
291
|
}, function (props) {
|
|
290
|
-
return props.disabled ? props.theme.
|
|
292
|
+
return props.disabled ? props.theme.disabledButtonBorderColor : props.theme.buttonBorderColor;
|
|
291
293
|
}, function (props) {
|
|
292
294
|
return props.theme.buttonPaddingTop;
|
|
293
295
|
}, function (props) {
|
|
@@ -303,7 +305,7 @@ var DropdownTrigger = _styledComponents["default"].button(_templateObject2 || (_
|
|
|
303
305
|
}, function (props) {
|
|
304
306
|
return props.disabled ? "not-allowed" : "pointer";
|
|
305
307
|
}, function (props) {
|
|
306
|
-
return !props.disabled && "\n &:focus {\n outline: ".concat(props.theme.focusColor, "
|
|
308
|
+
return !props.disabled && "\n &:focus {\n outline: 2px solid ".concat(props.theme.focusColor, ";\n }\n &:hover {\n background-color: ").concat(props.theme.hoverButtonBackgroundColor, ";\n }\n &:active {\n background-color: ").concat(props.theme.activeButtonBackgroundColor, ";\n }\n ");
|
|
307
309
|
});
|
|
308
310
|
var DropdownTriggerContent = _styledComponents["default"].span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n gap: ", ";\n margin-left: 0px;\n margin-right: 0px;\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n"])), function (props) {
|
|
309
311
|
return props.theme.buttonIconSpacing;
|
package/dropdown/types.d.ts
CHANGED
package/footer/Footer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import FooterPropsType from "./types";
|
|
3
|
-
declare const DxcFooter: ({ socialLinks, bottomLinks, copyright, children, margin, tabIndex, }: FooterPropsType) => JSX.Element;
|
|
3
|
+
declare const DxcFooter: ({ socialLinks, bottomLinks, copyright, children, margin, tabIndex, mode, }: FooterPropsType) => JSX.Element;
|
|
4
4
|
export default DxcFooter;
|
package/footer/Footer.js
CHANGED
|
@@ -24,11 +24,14 @@ var DxcFooter = function DxcFooter(_ref) {
|
|
|
24
24
|
children = _ref.children,
|
|
25
25
|
margin = _ref.margin,
|
|
26
26
|
_ref$tabIndex = _ref.tabIndex,
|
|
27
|
-
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex
|
|
27
|
+
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex,
|
|
28
|
+
_ref$mode = _ref.mode,
|
|
29
|
+
mode = _ref$mode === void 0 ? "default" : _ref$mode;
|
|
28
30
|
var colorsTheme = (0, _useTheme["default"])();
|
|
29
31
|
var translatedLabels = (0, _useTranslatedLabels["default"])();
|
|
30
32
|
var footerLogo = (0, _react.useMemo)(function () {
|
|
31
|
-
return !colorsTheme.footer.logo ? _Icons.dxcLogo : typeof colorsTheme.footer.logo === "string" ? /*#__PURE__*/_react["default"].createElement(LogoImg, {
|
|
33
|
+
return !colorsTheme.footer.logo ? mode === "default" ? _Icons.dxcLogo : _Icons.dxcSmallLogo : typeof colorsTheme.footer.logo === "string" ? /*#__PURE__*/_react["default"].createElement(LogoImg, {
|
|
34
|
+
mode: mode,
|
|
32
35
|
alt: translatedLabels.formFields.logoAlternativeText,
|
|
33
36
|
src: colorsTheme.footer.logo
|
|
34
37
|
}) : colorsTheme.footer.logo;
|
|
@@ -36,13 +39,16 @@ var DxcFooter = function DxcFooter(_ref) {
|
|
|
36
39
|
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
37
40
|
theme: colorsTheme.footer
|
|
38
41
|
}, /*#__PURE__*/_react["default"].createElement(FooterContainer, {
|
|
39
|
-
margin: margin
|
|
42
|
+
margin: margin,
|
|
43
|
+
mode: mode
|
|
40
44
|
}, /*#__PURE__*/_react["default"].createElement(_Flex["default"], {
|
|
41
45
|
justifyContent: "space-between",
|
|
42
46
|
alignItems: "center",
|
|
43
47
|
wrap: "wrap",
|
|
44
48
|
gap: "1.5rem"
|
|
45
|
-
}, /*#__PURE__*/_react["default"].createElement(LogoContainer,
|
|
49
|
+
}, /*#__PURE__*/_react["default"].createElement(LogoContainer, {
|
|
50
|
+
mode: mode
|
|
51
|
+
}, footerLogo), mode === "default" && /*#__PURE__*/_react["default"].createElement(_Flex["default"], null, socialLinks === null || socialLinks === void 0 ? void 0 : socialLinks.map(function (link, index) {
|
|
46
52
|
return /*#__PURE__*/_react["default"].createElement(SocialAnchor, {
|
|
47
53
|
href: link.href,
|
|
48
54
|
tabIndex: tabIndex,
|
|
@@ -51,9 +57,10 @@ var DxcFooter = function DxcFooter(_ref) {
|
|
|
51
57
|
key: "social".concat(index).concat(link.href),
|
|
52
58
|
index: index
|
|
53
59
|
}, /*#__PURE__*/_react["default"].createElement(SocialIconContainer, null, typeof link.logo === "string" ? /*#__PURE__*/_react["default"].createElement("img", {
|
|
54
|
-
src: link.logo
|
|
60
|
+
src: link.logo,
|
|
61
|
+
alt: link.title
|
|
55
62
|
}) : link.logo));
|
|
56
|
-
}))), /*#__PURE__*/_react["default"].createElement(ChildComponents, null, children), /*#__PURE__*/_react["default"].createElement(BottomContainer, null, /*#__PURE__*/_react["default"].createElement(BottomLinks, null, bottomLinks === null || bottomLinks === void 0 ? void 0 : bottomLinks.map(function (link, index) {
|
|
63
|
+
}))), /*#__PURE__*/_react["default"].createElement(ChildComponents, null, children), mode === "default" && /*#__PURE__*/_react["default"].createElement(BottomContainer, null, /*#__PURE__*/_react["default"].createElement(BottomLinks, null, bottomLinks === null || bottomLinks === void 0 ? void 0 : bottomLinks.map(function (link, index) {
|
|
57
64
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
58
65
|
key: "bottom".concat(index).concat(link.text)
|
|
59
66
|
}, /*#__PURE__*/_react["default"].createElement(BottomLink, {
|
|
@@ -62,13 +69,19 @@ var DxcFooter = function DxcFooter(_ref) {
|
|
|
62
69
|
}, link.text));
|
|
63
70
|
})), /*#__PURE__*/_react["default"].createElement(Copyright, null, copyright || translatedLabels.footer.copyrightText(new Date().getFullYear())))));
|
|
64
71
|
};
|
|
65
|
-
var FooterContainer = _styledComponents["default"].footer(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n box-sizing: border-box;\n display: flex;\n flex-direction:
|
|
66
|
-
return props.theme.
|
|
72
|
+
var FooterContainer = _styledComponents["default"].footer(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n box-sizing: border-box;\n display: flex;\n flex-direction: ", ";\n justify-content: space-between;\n margin-top: ", ";\n min-height: ", ";\n width: 100%;\n gap: ", ";\n @media (min-width: ", "rem) {\n padding: ", ";\n }\n @media (max-width: ", "rem) {\n padding: 20px;\n flex-direction: column;\n }\n"])), function (props) {
|
|
73
|
+
return props.theme.backgroundColor;
|
|
74
|
+
}, function (props) {
|
|
75
|
+
return (props === null || props === void 0 ? void 0 : props.mode) === "default" ? "column" : "row";
|
|
67
76
|
}, function (props) {
|
|
68
77
|
return props.margin ? _variables.spaces[props.margin] : "0px";
|
|
69
78
|
}, function (props) {
|
|
70
|
-
return props.theme.
|
|
71
|
-
},
|
|
79
|
+
return (props === null || props === void 0 ? void 0 : props.mode) === "default" ? props.theme.height : "40px";
|
|
80
|
+
}, function (props) {
|
|
81
|
+
return (props === null || props === void 0 ? void 0 : props.mode) === "default" ? "0px" : "32px";
|
|
82
|
+
}, _variables.responsiveSizes.small, function (props) {
|
|
83
|
+
return (props === null || props === void 0 ? void 0 : props.mode) === "default" ? "24px 32px" : "12px 32px";
|
|
84
|
+
}, _variables.responsiveSizes.small);
|
|
72
85
|
var BottomContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n\n @media (min-width: ", "rem) {\n flex-direction: row;\n }\n @media (max-width: ", "rem) {\n flex-direction: column;\n align-items: center;\n }\n\n border-top: ", ";\n margin-top: 16px;\n"])), _variables.responsiveSizes.small, _variables.responsiveSizes.small, function (props) {
|
|
73
86
|
return "".concat(props.theme.bottomLinksDividerThickness, " ").concat(props.theme.bottomLinksDividerStyle, " ").concat(props.theme.bottomLinksDividerColor);
|
|
74
87
|
});
|
|
@@ -87,12 +100,12 @@ var Copyright = _styledComponents["default"].div(_templateObject4 || (_templateO
|
|
|
87
100
|
return props.theme.copyrightFontColor;
|
|
88
101
|
}, _variables.responsiveSizes.small, _variables.responsiveSizes.small);
|
|
89
102
|
var LogoContainer = _styledComponents["default"].span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n"])), function (props) {
|
|
90
|
-
return props.theme.logoHeight;
|
|
103
|
+
return (props === null || props === void 0 ? void 0 : props.mode) === "default" ? props.theme.logoHeight : "16px";
|
|
91
104
|
}, function (props) {
|
|
92
105
|
return props.theme.logoWidth;
|
|
93
106
|
});
|
|
94
107
|
var LogoImg = _styledComponents["default"].img(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n"])), function (props) {
|
|
95
|
-
return props.theme.logoHeight;
|
|
108
|
+
return (props === null || props === void 0 ? void 0 : props.mode) === "default" ? props.theme.logoHeight : "16px";
|
|
96
109
|
}, function (props) {
|
|
97
110
|
return props.theme.logoWidth;
|
|
98
111
|
});
|
|
@@ -3,6 +3,8 @@ import DxcFooter from "./Footer";
|
|
|
3
3
|
import Title from "../../.storybook/components/Title";
|
|
4
4
|
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
5
5
|
import { HalstackProvider } from "../HalstackContext";
|
|
6
|
+
import DxcFlex from "../flex/Flex";
|
|
7
|
+
import DxcTypography from "../typography/Typography";
|
|
6
8
|
|
|
7
9
|
const social = [
|
|
8
10
|
{
|
|
@@ -99,6 +101,11 @@ const opinionatedTheme = {
|
|
|
99
101
|
},
|
|
100
102
|
};
|
|
101
103
|
|
|
104
|
+
const info = [
|
|
105
|
+
{ label: "Example Label", text: "Example" },
|
|
106
|
+
{ label: "Example Label", text: "Example" },
|
|
107
|
+
];
|
|
108
|
+
|
|
102
109
|
export const Chromatic = () => (
|
|
103
110
|
<>
|
|
104
111
|
<ExampleContainer>
|
|
@@ -121,6 +128,18 @@ export const Chromatic = () => (
|
|
|
121
128
|
</div>
|
|
122
129
|
</DxcFooter>
|
|
123
130
|
</ExampleContainer>
|
|
131
|
+
<ExampleContainer>
|
|
132
|
+
<Title title="Reduced" theme="light" level={4} />
|
|
133
|
+
<DxcFooter mode="reduced">
|
|
134
|
+
<DxcFlex justifyContent="center" alignItems="center" gap={"1rem"}>
|
|
135
|
+
{info.map((tag, index) => (
|
|
136
|
+
<DxcTypography color="white" key={`tag${index}${tag.label}${tag.text}`} >
|
|
137
|
+
{tag.label}: {tag.text}
|
|
138
|
+
</DxcTypography>
|
|
139
|
+
))}
|
|
140
|
+
</DxcFlex>
|
|
141
|
+
</DxcFooter>
|
|
142
|
+
</ExampleContainer>
|
|
124
143
|
<Title title="Margins" theme="light" level={2} />
|
|
125
144
|
<ExampleContainer>
|
|
126
145
|
<Title title="Xxsmall margin" theme="light" level={4} />
|
package/footer/Icons.d.ts
CHANGED
package/footer/Icons.js
CHANGED
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.dxcLogo = void 0;
|
|
7
|
+
exports.dxcSmallLogo = exports.dxcLogo = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var dxcLogo = exports.dxcLogo = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
10
10
|
id: "g10",
|
|
@@ -69,4 +69,68 @@ var dxcLogo = exports.dxcLogo = /*#__PURE__*/_react["default"].createElement("sv
|
|
|
69
69
|
d: "M84.218-55.737a10.063,10.063,0,0,1,2.589-4.4,9.792,9.792,0,0,1,6.985-2.77h11.328V-69.3H93.792a17.041,17.041,0,0,0-11.8,4.759,16.344,16.344,0,0,0-3.547,5.115,13.247,13.247,0,0,0-1.122,3.688Zm0,4.877a10.065,10.065,0,0,0,2.589,4.4,9.793,9.793,0,0,0,6.985,2.77h11.328V-37.3H93.792a17.042,17.042,0,0,1-11.8-4.759,16.339,16.339,0,0,1-3.547-5.114,13.251,13.251,0,0,1-1.122-3.688ZM63.1-47.98,54.45-37.3H45.873l12.957-16-12.957-16H54.45L63.1-58.619l8.65-10.68h8.578l-12.957,16,12.957,16H71.749ZM48.875-55.737a13.212,13.212,0,0,0-1.122-3.688,16.359,16.359,0,0,0-3.546-5.115,17.043,17.043,0,0,0-11.8-4.759H21.08v6.393H32.408a9.79,9.79,0,0,1,6.985,2.77,10.072,10.072,0,0,1,2.59,4.4Zm0,4.877a13.215,13.215,0,0,1-1.122,3.688,16.353,16.353,0,0,1-3.546,5.114,17.044,17.044,0,0,1-11.8,4.759H21.08v-6.393H32.408a9.791,9.791,0,0,0,6.985-2.77,10.074,10.074,0,0,0,2.59-4.4h6.892",
|
|
70
70
|
transform: "translate(-21.08 69.298)",
|
|
71
71
|
fill: "#fff"
|
|
72
|
+
})));
|
|
73
|
+
var dxcSmallLogo = exports.dxcSmallLogo = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
74
|
+
id: "g10",
|
|
75
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
76
|
+
width: "100%",
|
|
77
|
+
height: "16",
|
|
78
|
+
viewBox: "0 0 280.781 32"
|
|
79
|
+
}, /*#__PURE__*/_react["default"].createElement("title", null, "DXC Logo"), /*#__PURE__*/_react["default"].createElement("g", {
|
|
80
|
+
id: "g12"
|
|
81
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
82
|
+
id: "path14",
|
|
83
|
+
d: "M171.5-54.124v12.539h-3.6V-54.124h-4.973v-3.191h13.54v3.191H171.5",
|
|
84
|
+
transform: "translate(-68.528 65.45)",
|
|
85
|
+
fill: "#fff"
|
|
86
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
87
|
+
id: "path16",
|
|
88
|
+
d: "M189.96-41.585V-57.315h12.326v3.079h-8.753v3.191h7.7v3.078h-7.7v3.3h8.87v3.078H189.96",
|
|
89
|
+
transform: "translate(-77.56 65.45)",
|
|
90
|
+
fill: "#fff"
|
|
91
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
92
|
+
id: "path18",
|
|
93
|
+
d: "M223.558-41.438a8.1,8.1,0,0,1-8.382-8.1v-.045a8.161,8.161,0,0,1,8.522-8.146,8.6,8.6,0,0,1,6.444,2.431l-2.289,2.543a6.133,6.133,0,0,0-4.178-1.778,4.743,4.743,0,0,0-4.738,4.905v.045a4.752,4.752,0,0,0,4.738,4.95,6,6,0,0,0,4.295-1.845l2.288,2.228a8.491,8.491,0,0,1-6.7,2.813",
|
|
94
|
+
transform: "translate(-86.019 65.583)",
|
|
95
|
+
fill: "#fff"
|
|
96
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
97
|
+
id: "path20",
|
|
98
|
+
d: "M254.988-41.585V-47.9h-6.63v6.315h-3.6V-57.315h3.6v6.225h6.63v-6.225h3.594v15.731h-3.594",
|
|
99
|
+
transform: "translate(-95.903 65.45)",
|
|
100
|
+
fill: "#fff"
|
|
101
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
102
|
+
id: "path22",
|
|
103
|
+
d: "M285.991-41.585l-7.914-10v10h-3.549V-57.315h3.316l7.657,9.685v-9.685h3.549v15.731h-3.058",
|
|
104
|
+
transform: "translate(-105.869 65.45)",
|
|
105
|
+
fill: "#fff"
|
|
106
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
107
|
+
id: "path24",
|
|
108
|
+
d: "M317.2-49.583a4.869,4.869,0,0,0-4.949-4.95,4.793,4.793,0,0,0-4.9,4.905v.045a4.869,4.869,0,0,0,4.949,4.95,4.793,4.793,0,0,0,4.9-4.905Zm-4.949,8.145c-5.043,0-8.661-3.623-8.661-8.1v-.045c0-4.478,3.666-8.146,8.708-8.146s8.66,3.623,8.66,8.1v.045c0,4.477-3.664,8.145-8.708,8.145",
|
|
109
|
+
transform: "translate(-115.631 65.583)",
|
|
110
|
+
fill: "#fff"
|
|
111
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
112
|
+
id: "path26",
|
|
113
|
+
d: "M336.786-41.585V-57.315h3.6v12.584h8.148v3.146H336.786",
|
|
114
|
+
transform: "translate(-126.654 65.45)",
|
|
115
|
+
fill: "#fff"
|
|
116
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
117
|
+
id: "path28",
|
|
118
|
+
d: "M372.78-49.583a4.87,4.87,0,0,0-4.949-4.95,4.794,4.794,0,0,0-4.9,4.905v.045a4.869,4.869,0,0,0,4.949,4.95,4.794,4.794,0,0,0,4.9-4.905Zm-4.949,8.145c-5.043,0-8.662-3.623-8.662-8.1v-.045c0-4.478,3.666-8.146,8.708-8.146s8.661,3.623,8.661,8.1v.045c0,4.477-3.666,8.145-8.708,8.145",
|
|
119
|
+
transform: "translate(-135.016 65.583)",
|
|
120
|
+
fill: "#fff"
|
|
121
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
122
|
+
id: "path30",
|
|
123
|
+
d: "M399.735-41.438c-5.09,0-8.592-3.443-8.592-8.1v-.045a8.243,8.243,0,0,1,8.568-8.146,9.18,9.18,0,0,1,6.42,2.16l-2.265,2.634a6.141,6.141,0,0,0-4.272-1.6,4.807,4.807,0,0,0-4.692,4.905v.045a4.8,4.8,0,0,0,4.949,4.995,5.89,5.89,0,0,0,3.384-.945v-2.25h-3.618v-2.992h7.1v6.841a10.837,10.837,0,0,1-6.98,2.5",
|
|
124
|
+
transform: "translate(-145.284 65.583)",
|
|
125
|
+
fill: "#fff"
|
|
126
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
127
|
+
id: "path32",
|
|
128
|
+
d: "M428.664-47.855v6.27h-3.6v-6.2l-6.28-9.528h4.2L426.89-51l3.968-6.315h4.085l-6.28,9.46",
|
|
129
|
+
transform: "translate(-154.162 65.45)",
|
|
130
|
+
fill: "#fff"
|
|
131
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
132
|
+
id: "path34",
|
|
133
|
+
d: "M84.218-55.737a10.063,10.063,0,0,1,2.589-4.4,9.792,9.792,0,0,1,6.985-2.77h11.328V-69.3H93.792a17.041,17.041,0,0,0-11.8,4.759,16.344,16.344,0,0,0-3.547,5.115,13.247,13.247,0,0,0-1.122,3.688Zm0,4.877a10.065,10.065,0,0,0,2.589,4.4,9.793,9.793,0,0,0,6.985,2.77h11.328V-37.3H93.792a17.042,17.042,0,0,1-11.8-4.759,16.339,16.339,0,0,1-3.547-5.114,13.251,13.251,0,0,1-1.122-3.688ZM63.1-47.98,54.45-37.3H45.873l12.957-16-12.957-16H54.45L63.1-58.619l8.65-10.68h8.578l-12.957,16,12.957,16H71.749ZM48.875-55.737a13.212,13.212,0,0,0-1.122-3.688,16.359,16.359,0,0,0-3.546-5.115,17.043,17.043,0,0,0-11.8-4.759H21.08v6.393H32.408a9.79,9.79,0,0,1,6.985,2.77,10.072,10.072,0,0,1,2.59,4.4Zm0,4.877a13.215,13.215,0,0,1-1.122,3.688,16.353,16.353,0,0,1-3.546,5.114,17.044,17.044,0,0,1-11.8,4.759H21.08v-6.393H32.408a9.791,9.791,0,0,0,6.985-2.77,10.074,10.074,0,0,0,2.59-4.4h6.892",
|
|
134
|
+
transform: "translate(-21.08 69.298)",
|
|
135
|
+
fill: "#fff"
|
|
72
136
|
})));
|
package/footer/types.d.ts
CHANGED
|
@@ -54,5 +54,11 @@ type FooterPropsType = {
|
|
|
54
54
|
* inside the custom area.
|
|
55
55
|
*/
|
|
56
56
|
tabIndex?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Determines the visual style and layout
|
|
59
|
+
* - "default": The default mode with full content and styling.
|
|
60
|
+
* - "reduced": A reduced mode with minimal content and styling.
|
|
61
|
+
*/
|
|
62
|
+
mode?: "default" | "reduced";
|
|
57
63
|
};
|
|
58
64
|
export default FooterPropsType;
|