@dxc-technology/halstack-react 0.0.0-39dd536 → 0.0.0-3a65d35
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/accordion/Accordion.js +122 -103
- package/accordion/Accordion.stories.tsx +1 -2
- package/accordion/Accordion.test.js +9 -10
- package/accordion/types.d.ts +4 -3
- package/accordion-group/AccordionGroup.js +1 -21
- package/accordion-group/AccordionGroup.stories.tsx +27 -1
- package/accordion-group/AccordionGroup.test.js +20 -45
- package/accordion-group/types.d.ts +9 -2
- package/alert/Alert.js +1 -1
- package/box/Box.js +1 -1
- package/box/types.d.ts +1 -0
- package/card/types.d.ts +1 -0
- package/checkbox/Checkbox.js +87 -95
- package/checkbox/Checkbox.test.js +93 -16
- package/checkbox/types.d.ts +2 -2
- package/common/variables.js +20 -12
- package/dialog/Dialog.js +4 -4
- package/dialog/Dialog.stories.tsx +56 -0
- package/dialog/types.d.ts +1 -0
- package/dropdown/Dropdown.d.ts +1 -1
- package/dropdown/Dropdown.js +244 -247
- package/dropdown/Dropdown.stories.tsx +126 -63
- package/dropdown/Dropdown.test.js +509 -108
- package/dropdown/DropdownMenu.d.ts +4 -0
- package/dropdown/DropdownMenu.js +80 -0
- package/dropdown/DropdownMenuItem.d.ts +4 -0
- package/dropdown/DropdownMenuItem.js +92 -0
- package/dropdown/types.d.ts +24 -4
- package/flex/Flex.d.ts +1 -1
- package/flex/Flex.js +31 -19
- package/flex/types.d.ts +14 -3
- package/footer/Footer.stories.tsx +8 -1
- package/footer/types.d.ts +1 -0
- package/header/Header.js +74 -72
- package/header/Header.stories.tsx +4 -4
- package/header/Icons.js +2 -2
- package/header/types.d.ts +3 -2
- package/layout/ApplicationLayout.stories.tsx +1 -0
- package/number-input/NumberInput.test.js +38 -1
- package/package.json +8 -8
- package/paginator/Paginator.js +2 -2
- package/paginator/Paginator.test.js +1 -1
- package/password-input/PasswordInput.test.js +13 -12
- package/quick-nav/QuickNav.js +11 -12
- package/quick-nav/QuickNav.stories.tsx +97 -19
- package/radio-group/Radio.d.ts +1 -1
- package/radio-group/Radio.js +43 -28
- package/radio-group/RadioGroup.js +15 -13
- package/radio-group/RadioGroup.stories.tsx +1 -0
- package/radio-group/RadioGroup.test.js +123 -96
- package/radio-group/types.d.ts +2 -2
- package/resultsetTable/ResultsetTable.js +1 -3
- package/select/Listbox.js +0 -1
- package/select/Select.js +3 -1
- package/select/Select.test.js +267 -209
- package/slider/Slider.js +116 -92
- package/slider/Slider.stories.tsx +7 -1
- package/slider/Slider.test.js +121 -21
- package/slider/types.d.ts +2 -2
- package/switch/Switch.d.ts +1 -1
- package/switch/Switch.js +132 -66
- package/switch/Switch.stories.tsx +8 -30
- package/switch/Switch.test.js +144 -17
- package/switch/types.d.ts +3 -4
- package/table/Table.js +1 -1
- package/tabs/Tab.d.ts +4 -0
- package/tabs/Tab.js +135 -0
- package/tabs/Tabs.js +360 -104
- package/tabs/Tabs.stories.tsx +74 -0
- package/tabs/Tabs.test.js +217 -6
- package/tabs/types.d.ts +14 -4
- package/tabs-nav/Tab.js +1 -1
- package/tag/Tag.js +1 -1
- package/text-input/Icons.d.ts +8 -0
- package/text-input/Icons.js +60 -0
- package/text-input/Suggestion.js +7 -5
- package/text-input/Suggestions.d.ts +4 -0
- package/text-input/Suggestions.js +134 -0
- package/text-input/TextInput.js +179 -263
- package/text-input/TextInput.stories.tsx +189 -181
- package/text-input/TextInput.test.js +222 -163
- package/text-input/types.d.ts +21 -2
|
@@ -131,7 +131,7 @@ ResponsiveHeader.parameters = {
|
|
|
131
131
|
viewport: {
|
|
132
132
|
defaultViewport: "iphonex",
|
|
133
133
|
},
|
|
134
|
-
chromatic: { viewports: [
|
|
134
|
+
chromatic: { viewports: [375] },
|
|
135
135
|
};
|
|
136
136
|
|
|
137
137
|
export const ResponsiveHeaderFocus = RespHeaderFocus.bind({});
|
|
@@ -139,7 +139,7 @@ ResponsiveHeaderFocus.parameters = {
|
|
|
139
139
|
viewport: {
|
|
140
140
|
defaultViewport: "iphonex",
|
|
141
141
|
},
|
|
142
|
-
chromatic: { viewports: [
|
|
142
|
+
chromatic: { viewports: [375] },
|
|
143
143
|
};
|
|
144
144
|
ResponsiveHeaderFocus.play = async ({ canvasElement }) => {
|
|
145
145
|
const canvas = within(canvasElement);
|
|
@@ -151,7 +151,7 @@ ResponsiveHeaderHover.parameters = {
|
|
|
151
151
|
viewport: {
|
|
152
152
|
defaultViewport: "iphonex",
|
|
153
153
|
},
|
|
154
|
-
chromatic: { viewports: [
|
|
154
|
+
chromatic: { viewports: [375] },
|
|
155
155
|
};
|
|
156
156
|
ResponsiveHeaderHover.play = async ({ canvasElement }) => {
|
|
157
157
|
const canvas = within(canvasElement);
|
|
@@ -163,7 +163,7 @@ ResponsiveHeaderMenu.parameters = {
|
|
|
163
163
|
viewport: {
|
|
164
164
|
defaultViewport: "iphonex",
|
|
165
165
|
},
|
|
166
|
-
chromatic: { viewports: [
|
|
166
|
+
chromatic: { viewports: [375] },
|
|
167
167
|
};
|
|
168
168
|
ResponsiveHeaderMenu.play = async ({ canvasElement }) => {
|
|
169
169
|
const canvas = within(canvasElement);
|
package/header/Icons.js
CHANGED
|
@@ -23,12 +23,12 @@ var dxcLogo = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
|
23
23
|
id: "path14",
|
|
24
24
|
d: "M91.613-28.177v2.514H90.231V-28.15l-2.415-3.82h1.616l1.5,2.532,1.526-2.532h1.571ZM83.9-25.555A3.15,3.15,0,0,1,80.6-28.8v-.018a3.231,3.231,0,0,1,3.294-3.262,3.442,3.442,0,0,1,2.469.865l-.87,1.054a2.311,2.311,0,0,0-1.643-.64,1.891,1.891,0,0,0-1.8,1.964v.018a1.886,1.886,0,0,0,1.9,2,2.2,2.2,0,0,0,1.3-.378v-.9H83.858v-1.2h2.729v2.738A4.071,4.071,0,0,1,83.9-25.555Zm-6.416-3.261a1.913,1.913,0,0,0-1.9-1.982A1.883,1.883,0,0,0,73.7-28.835v.018a1.913,1.913,0,0,0,1.9,1.982A1.883,1.883,0,0,0,77.486-28.8Zm-1.9,3.261a3.225,3.225,0,0,1-3.33-3.243v-.018A3.255,3.255,0,0,1,75.6-32.078a3.225,3.225,0,0,1,3.331,3.243v.018A3.255,3.255,0,0,1,75.583-25.555Zm-9.173-.108V-31.97h1.382v5.045h3.133v1.261Zm-3.433-3.153a1.913,1.913,0,0,0-1.9-1.982,1.883,1.883,0,0,0-1.886,1.964v.018a1.913,1.913,0,0,0,1.9,1.982A1.883,1.883,0,0,0,62.978-28.8Zm-1.9,3.261a3.225,3.225,0,0,1-3.33-3.243v-.018a3.255,3.255,0,0,1,3.348-3.262,3.225,3.225,0,0,1,3.331,3.243v.018A3.255,3.255,0,0,1,61.075-25.555Zm-6.508-.108-3.043-4.009v4.009H50.159V-31.97h1.275l2.944,3.883V-31.97h1.364v6.306Zm-8.246,0v-2.531h-2.55v2.531H42.389V-31.97h1.382v2.5h2.55v-2.5H47.7v6.306Zm-8.432.108A3.178,3.178,0,0,1,34.666-28.8v-.018a3.2,3.2,0,0,1,3.276-3.262,3.237,3.237,0,0,1,2.478.973l-.88,1.018a2.315,2.315,0,0,0-1.606-.712,1.866,1.866,0,0,0-1.822,1.964v.018a1.87,1.87,0,0,0,1.822,1.982,2.265,2.265,0,0,0,1.651-.739l.88.891A3.206,3.206,0,0,1,37.889-25.555Zm-9.805-.108V-31.97h4.739v1.235H29.458v1.279h2.962v1.234H29.458V-26.9h3.411v1.234ZM24.322-30.69v5.027H22.939V-30.69H21.028v-1.28h5.206v1.28H24.322",
|
|
25
25
|
transform: "translate(-21.028 65.555)",
|
|
26
|
-
fill: "#
|
|
26
|
+
fill: "#010101"
|
|
27
27
|
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
28
28
|
id: "path16",
|
|
29
29
|
d: "M75.836-76.712a8.975,8.975,0,0,1,2.246-3.9,8.393,8.393,0,0,1,6.058-2.457h9.824v-5.67H84.139a14.611,14.611,0,0,0-10.232,4.221,14.509,14.509,0,0,0-3.076,4.536,11.913,11.913,0,0,0-.973,3.271Zm0,4.325a8.978,8.978,0,0,0,2.246,3.9,8.394,8.394,0,0,0,6.058,2.457h9.824v5.67H84.139A14.611,14.611,0,0,1,73.907-64.58a14.506,14.506,0,0,1-3.076-4.536,11.91,11.91,0,0,1-.973-3.271ZM57.522-69.832l-7.5,9.473H42.581L53.818-74.55,42.581-88.739H50.02l7.5,9.472,7.5-9.472h7.439L61.225-74.55l11.237,14.19H65.023Zm-12.336-6.88a11.935,11.935,0,0,0-.973-3.271,14.515,14.515,0,0,0-3.076-4.536A14.612,14.612,0,0,0,30.9-88.739H21.081v5.67H30.9a8.394,8.394,0,0,1,6.058,2.457,8.978,8.978,0,0,1,2.246,3.9Zm0,4.325a11.932,11.932,0,0,1-.973,3.271,14.511,14.511,0,0,1-3.076,4.536A14.611,14.611,0,0,1,30.9-60.359H21.081v-5.67H30.9a8.4,8.4,0,0,0,6.058-2.457,8.981,8.981,0,0,0,2.246-3.9h5.978",
|
|
30
30
|
transform: "translate(-21.049 88.739)",
|
|
31
|
-
fill: "#
|
|
31
|
+
fill: "#603494"
|
|
32
32
|
}))));
|
|
33
33
|
|
|
34
34
|
exports.dxcLogo = dxcLogo;
|
package/header/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
-
declare type Padding = {
|
|
2
|
+
export declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
+
export declare type Padding = {
|
|
4
4
|
top?: Space;
|
|
5
5
|
bottom?: Space;
|
|
6
6
|
left?: Space;
|
|
@@ -32,6 +32,7 @@ declare type Props = {
|
|
|
32
32
|
*/
|
|
33
33
|
margin?: Space;
|
|
34
34
|
/**
|
|
35
|
+
* @deprecated This prop will be removed shortly, consider using the Inset component for this purpose.
|
|
35
36
|
* Size of the padding to be applied to the custom area of the component
|
|
36
37
|
* ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
37
38
|
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in
|
|
@@ -83,7 +83,7 @@ describe("Number input component tests", function () {
|
|
|
83
83
|
})),
|
|
84
84
|
getByRole = _render8.getByRole;
|
|
85
85
|
|
|
86
|
-
var input = getByRole("
|
|
86
|
+
var input = getByRole("spinbutton");
|
|
87
87
|
|
|
88
88
|
_userEvent["default"].type(input, "1");
|
|
89
89
|
|
|
@@ -503,4 +503,41 @@ describe("Number input component tests", function () {
|
|
|
503
503
|
var increment = getAllByRole("button")[1];
|
|
504
504
|
expect(increment.getAttribute("aria-label")).toBe("Increment value");
|
|
505
505
|
});
|
|
506
|
+
test("Number input submits correct values in a form", function () {
|
|
507
|
+
var handlerOnSubmit = jest.fn(function (e) {
|
|
508
|
+
e.preventDefault();
|
|
509
|
+
var formData = new FormData(e.target);
|
|
510
|
+
var formProps = Object.fromEntries(formData);
|
|
511
|
+
expect(formProps).toStrictEqual({
|
|
512
|
+
data: "0"
|
|
513
|
+
});
|
|
514
|
+
});
|
|
515
|
+
|
|
516
|
+
var _render23 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement("form", {
|
|
517
|
+
onSubmit: handlerOnSubmit
|
|
518
|
+
}, /*#__PURE__*/_react["default"].createElement(_NumberInput["default"], {
|
|
519
|
+
label: "Number input label",
|
|
520
|
+
name: "data"
|
|
521
|
+
}), /*#__PURE__*/_react["default"].createElement("button", {
|
|
522
|
+
type: "submit"
|
|
523
|
+
}, "Submit"))),
|
|
524
|
+
getByText = _render23.getByText,
|
|
525
|
+
getAllByRole = _render23.getAllByRole;
|
|
526
|
+
|
|
527
|
+
var less = getAllByRole("button")[0];
|
|
528
|
+
var more = getAllByRole("button")[1];
|
|
529
|
+
var submit = getByText("Submit");
|
|
530
|
+
|
|
531
|
+
_userEvent["default"].click(more);
|
|
532
|
+
|
|
533
|
+
expect(handlerOnSubmit).not.toHaveBeenCalled();
|
|
534
|
+
|
|
535
|
+
_userEvent["default"].click(less);
|
|
536
|
+
|
|
537
|
+
expect(handlerOnSubmit).not.toHaveBeenCalled();
|
|
538
|
+
|
|
539
|
+
_userEvent["default"].click(submit);
|
|
540
|
+
|
|
541
|
+
expect(handlerOnSubmit).toHaveBeenCalled();
|
|
542
|
+
});
|
|
506
543
|
});
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxc-technology/halstack-react",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-3a65d35",
|
|
4
4
|
"description": "DXC Halstack React components library",
|
|
5
5
|
"repository": "dxc-technology/halstack-react",
|
|
6
|
-
"homepage": "
|
|
6
|
+
"homepage": "https://developer.dxc.com/halstack",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"author": {
|
|
9
9
|
"name": "DXC Technology",
|
|
10
10
|
"email": "DigitalInsurance@dxc.com",
|
|
11
|
-
"url": "https://dxc.com"
|
|
11
|
+
"url": "https://developer.dxc.com"
|
|
12
12
|
},
|
|
13
13
|
"main": "./main.js",
|
|
14
14
|
"types": "./main.d.ts",
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"react": "^18.
|
|
17
|
-
"react-dom": "^18.
|
|
16
|
+
"react": "^18.x",
|
|
17
|
+
"react-dom": "^18.x",
|
|
18
18
|
"styled-components": "^5.0.1"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@material-ui/lab": "4.0.0-alpha.17",
|
|
25
25
|
"@material-ui/pickers": "3.2.2",
|
|
26
26
|
"@material-ui/styles": "4.0.2",
|
|
27
|
-
"@radix-ui/react-popover": "
|
|
27
|
+
"@radix-ui/react-popover": "0.1.6",
|
|
28
28
|
"@types/styled-components": "^5.1.24",
|
|
29
29
|
"@types/uuid": "^8.3.4",
|
|
30
30
|
"color": "^3.1.3",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"eslint-plugin-storybook": "^0.5.5",
|
|
74
74
|
"identity-obj-proxy": "^3.0.0",
|
|
75
75
|
"jest": "^25.5.4",
|
|
76
|
-
"react": "^18.
|
|
77
|
-
"react-dom": "^18.
|
|
76
|
+
"react": "^18.x",
|
|
77
|
+
"react-dom": "^18.x",
|
|
78
78
|
"react-test-renderer": "^16.8.6",
|
|
79
79
|
"storybook-addon-pseudo-states": "^1.0.0",
|
|
80
80
|
"styled-components": "^5.0.1",
|
package/paginator/Paginator.js
CHANGED
|
@@ -153,7 +153,7 @@ var ItemsPageContainer = _styledComponents["default"].span(_templateObject3 || (
|
|
|
153
153
|
|
|
154
154
|
var ItemsLabel = _styledComponents["default"].span(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n margin-right: 0.5rem;\n"])));
|
|
155
155
|
|
|
156
|
-
var GoToLabel = _styledComponents["default"].span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n margin-right: 0.5rem;\n margin-left:
|
|
156
|
+
var GoToLabel = _styledComponents["default"].span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n margin-right: 0.5rem;\n margin-left: 0.5rem;\n"])));
|
|
157
157
|
|
|
158
158
|
var TotalItemsContainer = _styledComponents["default"].span(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n margin-right: ", ";\n margin-left: ", ";\n"])), function (props) {
|
|
159
159
|
return props.theme.totalItemsContainerMarginRight;
|
|
@@ -163,7 +163,7 @@ var TotalItemsContainer = _styledComponents["default"].span(_templateObject6 ||
|
|
|
163
163
|
|
|
164
164
|
var LabelsContainer = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n gap: 0.5rem;\n width: 100%;\n justify-content: flex-end;\n align-items: center;\n"])));
|
|
165
165
|
|
|
166
|
-
var PageToSelectContainer = _styledComponents["default"].span(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n\n label {\n height: 0px;\n }\n label + .MuiInput-formControl {\n margin-top: 0px;\n }\n"])));
|
|
166
|
+
var PageToSelectContainer = _styledComponents["default"].span(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n margin-right: 0.5rem;\n\n label {\n height: 0px;\n }\n label + .MuiInput-formControl {\n margin-top: 0px;\n }\n"])));
|
|
167
167
|
|
|
168
168
|
var TextContainer = _styledComponents["default"].span(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])([""])));
|
|
169
169
|
|
|
@@ -77,7 +77,7 @@ describe("Paginator component tests", function () {
|
|
|
77
77
|
})),
|
|
78
78
|
getByText = _render3.getByText;
|
|
79
79
|
|
|
80
|
-
expect(getByText("Items per page")).toBeTruthy();
|
|
80
|
+
expect(getByText("Items per page:")).toBeTruthy();
|
|
81
81
|
});
|
|
82
82
|
test("Paginator renders with itemsPerPageOptions", function () {
|
|
83
83
|
var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Paginator["default"], {
|
|
@@ -46,9 +46,9 @@ describe("Password input component tests", function () {
|
|
|
46
46
|
label: "Password input",
|
|
47
47
|
onChange: onChange
|
|
48
48
|
})),
|
|
49
|
-
|
|
49
|
+
getByLabelText = _render4.getByLabelText;
|
|
50
50
|
|
|
51
|
-
var passwordInput =
|
|
51
|
+
var passwordInput = getByLabelText("Password input");
|
|
52
52
|
|
|
53
53
|
_userEvent["default"].type(passwordInput, "Pa$$w0rd");
|
|
54
54
|
|
|
@@ -64,9 +64,9 @@ describe("Password input component tests", function () {
|
|
|
64
64
|
label: "Password input",
|
|
65
65
|
onBlur: onBlur
|
|
66
66
|
})),
|
|
67
|
-
|
|
67
|
+
getByLabelText = _render5.getByLabelText;
|
|
68
68
|
|
|
69
|
-
var passwordInput =
|
|
69
|
+
var passwordInput = getByLabelText("Password input");
|
|
70
70
|
|
|
71
71
|
_userEvent["default"].type(passwordInput, "Pa$$w0rd");
|
|
72
72
|
|
|
@@ -83,9 +83,9 @@ describe("Password input component tests", function () {
|
|
|
83
83
|
clearable: true
|
|
84
84
|
})),
|
|
85
85
|
getAllByRole = _render6.getAllByRole,
|
|
86
|
-
|
|
86
|
+
getByLabelText = _render6.getByLabelText;
|
|
87
87
|
|
|
88
|
-
var passwordInput =
|
|
88
|
+
var passwordInput = getByLabelText("Password input");
|
|
89
89
|
|
|
90
90
|
_userEvent["default"].type(passwordInput, "Pa$$w0rd");
|
|
91
91
|
|
|
@@ -101,9 +101,9 @@ describe("Password input component tests", function () {
|
|
|
101
101
|
label: "Password input"
|
|
102
102
|
})),
|
|
103
103
|
getAllByRole = _render7.getAllByRole,
|
|
104
|
-
|
|
104
|
+
getByLabelText = _render7.getByLabelText;
|
|
105
105
|
|
|
106
|
-
var passwordInput =
|
|
106
|
+
var passwordInput = getByLabelText("Password input");
|
|
107
107
|
|
|
108
108
|
_userEvent["default"].type(passwordInput, "Pa$$w0rd");
|
|
109
109
|
|
|
@@ -117,9 +117,9 @@ describe("Password input component tests", function () {
|
|
|
117
117
|
clearable: true
|
|
118
118
|
})),
|
|
119
119
|
getAllByRole = _render8.getAllByRole,
|
|
120
|
-
|
|
120
|
+
getByLabelText = _render8.getByLabelText;
|
|
121
121
|
|
|
122
|
-
var passwordInput =
|
|
122
|
+
var passwordInput = getByLabelText("Password input");
|
|
123
123
|
|
|
124
124
|
_userEvent["default"].type(passwordInput, "Pa$$w0rd");
|
|
125
125
|
|
|
@@ -164,9 +164,10 @@ describe("Password input component tests", function () {
|
|
|
164
164
|
var _render10 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_PasswordInput["default"], {
|
|
165
165
|
label: "Password input"
|
|
166
166
|
})),
|
|
167
|
-
getByRole = _render10.getByRole
|
|
167
|
+
getByRole = _render10.getByRole,
|
|
168
|
+
getByLabelText = _render10.getByLabelText;
|
|
168
169
|
|
|
169
|
-
var passwordInput =
|
|
170
|
+
var passwordInput = getByLabelText("Password input");
|
|
170
171
|
expect(passwordInput.getAttribute("aria-autocomplete")).toBeNull();
|
|
171
172
|
expect(passwordInput.getAttribute("aria-controls")).toBeNull();
|
|
172
173
|
expect(passwordInput.getAttribute("aria-expanded")).toBeNull();
|
package/quick-nav/QuickNav.js
CHANGED
|
@@ -48,13 +48,10 @@ var DxcQuickNav = function DxcQuickNav(_ref) {
|
|
|
48
48
|
}, /*#__PURE__*/_react["default"].createElement(_Heading["default"], {
|
|
49
49
|
level: 4,
|
|
50
50
|
text: title || translatedLabels.quickNav.contentTitle
|
|
51
|
-
}), /*#__PURE__*/_react["default"].createElement(ListColumn, null,
|
|
52
|
-
direction: "column",
|
|
53
|
-
gap: "0.5rem"
|
|
54
|
-
}, links.map(function (link) {
|
|
51
|
+
}), /*#__PURE__*/_react["default"].createElement(ListColumn, null, links.map(function (link) {
|
|
55
52
|
var _link$links;
|
|
56
53
|
|
|
57
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
54
|
+
return /*#__PURE__*/_react["default"].createElement("li", {
|
|
58
55
|
key: link.label
|
|
59
56
|
}, /*#__PURE__*/_react["default"].createElement(_Inset["default"], {
|
|
60
57
|
space: "0.25rem"
|
|
@@ -62,18 +59,20 @@ var DxcQuickNav = function DxcQuickNav(_ref) {
|
|
|
62
59
|
href: "#".concat((0, _slugify["default"])(link === null || link === void 0 ? void 0 : link.label, {
|
|
63
60
|
lower: true
|
|
64
61
|
}))
|
|
65
|
-
}, link === null || link === void 0 ? void 0 : link.label), (_link$links = link.links) === null || _link$links === void 0 ? void 0 : _link$links.map(function (sublink) {
|
|
66
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
62
|
+
}, link === null || link === void 0 ? void 0 : link.label), /*#__PURE__*/_react["default"].createElement(ListSecondColumn, null, (_link$links = link.links) === null || _link$links === void 0 ? void 0 : _link$links.map(function (sublink) {
|
|
63
|
+
return /*#__PURE__*/_react["default"].createElement("li", {
|
|
67
64
|
key: sublink.label
|
|
68
65
|
}, /*#__PURE__*/_react["default"].createElement(_Inset["default"], {
|
|
69
66
|
horizontal: "0.5rem"
|
|
70
67
|
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], null, /*#__PURE__*/_react["default"].createElement(Link, {
|
|
71
|
-
href: "#".concat((0, _slugify["default"])(
|
|
68
|
+
href: "#".concat((0, _slugify["default"])(link === null || link === void 0 ? void 0 : link.label, {
|
|
69
|
+
lower: true
|
|
70
|
+
}), "-").concat((0, _slugify["default"])(sublink === null || sublink === void 0 ? void 0 : sublink.label, {
|
|
72
71
|
lower: true
|
|
73
72
|
}))
|
|
74
73
|
}, sublink === null || sublink === void 0 ? void 0 : sublink.label))));
|
|
75
|
-
}))));
|
|
76
|
-
})))))
|
|
74
|
+
})))));
|
|
75
|
+
})))));
|
|
77
76
|
};
|
|
78
77
|
|
|
79
78
|
var QuickNavContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n border-left: 2px solid ", ";\n"])), function (props) {
|
|
@@ -88,9 +87,9 @@ var QuickNavContainer = _styledComponents["default"].div(_templateObject || (_te
|
|
|
88
87
|
return props.theme.dividerBorderColor;
|
|
89
88
|
});
|
|
90
89
|
|
|
91
|
-
var ListColumn = _styledComponents["default"].ul(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
90
|
+
var ListColumn = _styledComponents["default"].ul(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n margin: 0;\n padding: 0;\n list-style-type: none;\n"])));
|
|
92
91
|
|
|
93
|
-
var
|
|
92
|
+
var ListSecondColumn = _styledComponents["default"].ul(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n list-style-type: none;\n"])));
|
|
94
93
|
|
|
95
94
|
var Link = _styledComponents["default"].a(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n text-decoration: none;\n font-size: ", ";\n font-family: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n display: block;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n width: fit-content;\n max-width: 100%;\n\n &:hover {\n color: ", ";\n }\n &:focus {\n outline-color: ", ";\n outline-style: ", ";\n outline-width: ", ";\n border-radius: ", ";\n }\n"])), function (props) {
|
|
96
95
|
return props.theme.fontSize;
|
|
@@ -11,33 +11,60 @@ export default {
|
|
|
11
11
|
component: DxcQuickNav,
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
+
const defaultLinks = [
|
|
15
|
+
{
|
|
16
|
+
label: "Overview",
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: "Principles",
|
|
20
|
+
links: [{ label: "Color" }, { label: "Spacing" }, { label: "Typography" }],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: "Components",
|
|
24
|
+
links: [
|
|
25
|
+
{
|
|
26
|
+
label: "Accordion",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: "Button",
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
|
|
14
35
|
const links = [
|
|
15
36
|
{
|
|
16
37
|
label: "Overview",
|
|
17
|
-
id: "overview",
|
|
18
38
|
links: [
|
|
19
39
|
{
|
|
20
40
|
label: "Introduction",
|
|
21
|
-
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
label: "Components",
|
|
46
|
+
links: [
|
|
47
|
+
{
|
|
48
|
+
label: "Introduction",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
label: "Accordion",
|
|
22
52
|
},
|
|
23
53
|
],
|
|
24
54
|
},
|
|
25
55
|
{
|
|
26
56
|
label: "Principles very very very very very very very very long",
|
|
27
|
-
id: "principles",
|
|
28
57
|
links: [
|
|
29
|
-
{ label: "Color very very very very very very very very long"
|
|
30
|
-
{ label: "Spacingveryveryveryveryveryveryveryverylong"
|
|
31
|
-
{ label: "Typography"
|
|
58
|
+
{ label: "Color very very very very very very very very long" },
|
|
59
|
+
{ label: "Spacingveryveryveryveryveryveryveryverylong" },
|
|
60
|
+
{ label: "Typography" },
|
|
32
61
|
],
|
|
33
62
|
},
|
|
34
63
|
{
|
|
35
64
|
label: "Componentsveryveryveryveryveryveryveryverylong",
|
|
36
|
-
id: "components",
|
|
37
65
|
links: [
|
|
38
66
|
{
|
|
39
67
|
label: "Accordion",
|
|
40
|
-
id: "accordion",
|
|
41
68
|
},
|
|
42
69
|
],
|
|
43
70
|
},
|
|
@@ -48,19 +75,25 @@ export const Chromatic = () => (
|
|
|
48
75
|
<ExampleContainer>
|
|
49
76
|
<Title title="Default" level={4} />
|
|
50
77
|
<QuickNavContainer>
|
|
51
|
-
<DxcQuickNav links={
|
|
78
|
+
<DxcQuickNav links={defaultLinks} />
|
|
79
|
+
</QuickNavContainer>
|
|
80
|
+
</ExampleContainer>
|
|
81
|
+
<ExampleContainer>
|
|
82
|
+
<Title title="Text overflow" level={4} />
|
|
83
|
+
<QuickNavContainer>
|
|
84
|
+
<DxcQuickNav links={links} />
|
|
52
85
|
</QuickNavContainer>
|
|
53
86
|
</ExampleContainer>
|
|
54
87
|
<ExampleContainer pseudoState="pseudo-hover">
|
|
55
88
|
<Title title="Link hovered" level={4} />
|
|
56
89
|
<QuickNavContainer>
|
|
57
|
-
<DxcQuickNav links={links}
|
|
90
|
+
<DxcQuickNav links={links} />
|
|
58
91
|
</QuickNavContainer>
|
|
59
92
|
</ExampleContainer>
|
|
60
93
|
<ExampleContainer pseudoState="pseudo-focus">
|
|
61
94
|
<Title title="Link focus" level={4} />
|
|
62
95
|
<QuickNavContainer>
|
|
63
|
-
<DxcQuickNav links={links}
|
|
96
|
+
<DxcQuickNav links={links} />
|
|
64
97
|
</QuickNavContainer>
|
|
65
98
|
</ExampleContainer>
|
|
66
99
|
<ExampleContainer>
|
|
@@ -87,7 +120,44 @@ export const Chromatic = () => (
|
|
|
87
120
|
open source design system for insurance products and digital experiences. Our system provides all the
|
|
88
121
|
tools and resources needed to create superior, beautiful but above all, functional user experiences.
|
|
89
122
|
</DxcParagraph>
|
|
90
|
-
<Content id="introduction">
|
|
123
|
+
<Content id="overview-introduction">
|
|
124
|
+
<DxcHeading level={2} text="Introduction" margin={{ top: "xsmall", bottom: "xsmall" }} />
|
|
125
|
+
<DxcParagraph>
|
|
126
|
+
Design principles Halstack design principles are the fundamental part of DXC Technology's approach to
|
|
127
|
+
provide guidance for development teams in order to deliver delightful and consistent user experiences to
|
|
128
|
+
our customers: Balance Consistency Visual hierarchy All our components, design tokens, accessibility
|
|
129
|
+
guidelines, responsive design techniques, and layout proposals have been carefully curated by DXC design
|
|
130
|
+
and engineering teams with the objective of creating a unique visual language and ecosystem for our
|
|
131
|
+
applications. This is the DXC way of creating User Experiences. Open Source Halstack is an open source
|
|
132
|
+
design system, this means that we work towards DXC Technology bussines needs, but it is open for anyone
|
|
133
|
+
to use and contribute back to. We are charmed to receive external contributions to help us find bugs,
|
|
134
|
+
design new features, or help us improve the project documentation. If you're interested, definitely
|
|
135
|
+
check out our contribution guidelines.Design principles Halstack design principles are the fundamental
|
|
136
|
+
part of DXC Technology's approach to provide guidance for development teams in order to deliver
|
|
137
|
+
delightful and consistent user experiences to our customers: Balance Consistency Visual hierarchy All
|
|
138
|
+
our components, design tokens, accessibility guidelines, responsive design techniques, and layout
|
|
139
|
+
proposals have been carefully curated by DXC design and engineering teams with the objective of creating
|
|
140
|
+
a unique visual language and ecosystem for our applications. This is the DXC way of creating User
|
|
141
|
+
Experiences. Open Source Halstack is an open source design system, this means that we work towards DXC
|
|
142
|
+
Technology bussines needs, but it is open for anyone to use and contribute back to. We are charmed to
|
|
143
|
+
receive external contributions to help us find bugs, design new features, or help us improve the project
|
|
144
|
+
documentation. If you're interested, definitely check out our contribution guidelines.Design principles
|
|
145
|
+
Halstack design principles are the fundamental part of DXC Technology's approach to provide guidance for
|
|
146
|
+
development teams in order to deliver delightful and consistent user experiences to our customers:
|
|
147
|
+
Balance Consistency Visual hierarchy All our components, design tokens, accessibility guidelines,
|
|
148
|
+
responsive design techniques, and layout proposals have been carefully curated by DXC design and
|
|
149
|
+
engineering teams with the objective of creating a unique visual language and ecosystem for our
|
|
150
|
+
applications. This is the DXC way of creating User Experiences. Open Source Halstack is an open source
|
|
151
|
+
design system, this means that we work towards DXC Technology bussines needs, but it is open for anyone
|
|
152
|
+
to use and contribute back to. We are charmed to receive external contributions to help us find bugs,
|
|
153
|
+
design new features, or help us improve the project documentation. If you're interested, definitely
|
|
154
|
+
check out our contribution guidelines.
|
|
155
|
+
</DxcParagraph>
|
|
156
|
+
</Content>
|
|
157
|
+
</Content>
|
|
158
|
+
<Content id="components">
|
|
159
|
+
<DxcHeading level={1} text="Components" margin={{ top: "small", bottom: "xsmall" }} />
|
|
160
|
+
<Content id="components-introduction">
|
|
91
161
|
<DxcHeading level={2} text="Introduction" margin={{ top: "xsmall", bottom: "xsmall" }} />
|
|
92
162
|
<DxcParagraph>
|
|
93
163
|
Design principles Halstack design principles are the fundamental part of DXC Technology's approach to
|
|
@@ -121,10 +191,18 @@ export const Chromatic = () => (
|
|
|
121
191
|
check out our contribution guidelines.
|
|
122
192
|
</DxcParagraph>
|
|
123
193
|
</Content>
|
|
194
|
+
<Content id="components-accordion">
|
|
195
|
+
<DxcHeading level={2} text="Accordion" margin={{ top: "xsmall", bottom: "xsmall" }} />
|
|
196
|
+
<DxcParagraph>
|
|
197
|
+
Accordions are used to group similar content and hide or show it depending on user needs or preferences.
|
|
198
|
+
Accordions give users more granular control over the interface and help digest content in stages, rather
|
|
199
|
+
than all at once.
|
|
200
|
+
</DxcParagraph>
|
|
201
|
+
</Content>
|
|
124
202
|
</Content>
|
|
125
|
-
<Content id="principles">
|
|
203
|
+
<Content id="principles-very-very-very-very-very-very-very-very-long">
|
|
126
204
|
<DxcHeading level={1} text="Principles" margin={{ top: "small", bottom: "xsmall" }} />
|
|
127
|
-
<Content id="color">
|
|
205
|
+
<Content id="principles-very-very-very-very-very-very-very-very-long-color-very-very-very-very-very-very-very-very-long">
|
|
128
206
|
<DxcHeading level={2} text="Color" margin={{ top: "xsmall", bottom: "xsmall" }} />
|
|
129
207
|
<DxcParagraph>
|
|
130
208
|
The color palette is an essential asset as a communication resource of our design system. Halstack color
|
|
@@ -161,7 +239,7 @@ export const Chromatic = () => (
|
|
|
161
239
|
role-based color palettes and must not be used outside this context.
|
|
162
240
|
</DxcParagraph>
|
|
163
241
|
</Content>
|
|
164
|
-
<Content id="
|
|
242
|
+
<Content id="principles-very-very-very-very-very-very-very-very-long-spacingveryveryveryveryveryveryveryverylong">
|
|
165
243
|
<DxcHeading level={2} text="Spacing" margin={{ top: "xsmall", bottom: "xsmall" }} />
|
|
166
244
|
<DxcParagraph>
|
|
167
245
|
In the search of consistent alignment between the elements we provide a spacing scale based on a root
|
|
@@ -183,7 +261,7 @@ export const Chromatic = () => (
|
|
|
183
261
|
easily multiplied, they provide flexible and consistent, yet distinct enough, steps between them.
|
|
184
262
|
</DxcParagraph>
|
|
185
263
|
</Content>
|
|
186
|
-
<Content id="typography">
|
|
264
|
+
<Content id="principles-very-very-very-very-very-very-very-very-long-typography">
|
|
187
265
|
<DxcHeading level={2} text="Typography" margin={{ top: "xsmall", bottom: "xsmall" }} />
|
|
188
266
|
<DxcParagraph>
|
|
189
267
|
Our selected typography helps in structuring our user's experience based on the visual impact that it
|
|
@@ -220,9 +298,9 @@ export const Chromatic = () => (
|
|
|
220
298
|
</DxcParagraph>
|
|
221
299
|
</Content>
|
|
222
300
|
</Content>
|
|
223
|
-
<Content id="
|
|
301
|
+
<Content id="componentsveryveryveryveryveryveryveryverylong">
|
|
224
302
|
<DxcHeading level={1} text="Components" margin={{ top: "small", bottom: "xsmall" }} />
|
|
225
|
-
<Content id="accordion">
|
|
303
|
+
<Content id="componentsveryveryveryveryveryveryveryverylong-accordion">
|
|
226
304
|
<DxcHeading level={2} text="Accordion" margin={{ top: "xsmall", bottom: "xsmall" }} />
|
|
227
305
|
<DxcParagraph>
|
|
228
306
|
Accordions are used to group similar content and hide or show it depending on user needs or preferences.
|
|
@@ -233,7 +311,7 @@ export const Chromatic = () => (
|
|
|
233
311
|
</Content>
|
|
234
312
|
</ContentContainer>
|
|
235
313
|
<QuickNavContainer>
|
|
236
|
-
<DxcQuickNav title="Sections" links={links}
|
|
314
|
+
<DxcQuickNav title="Sections" links={links} />
|
|
237
315
|
</QuickNavContainer>
|
|
238
316
|
</Container>
|
|
239
317
|
</ExampleContainer>
|
package/radio-group/Radio.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { RadioProps } from "./types";
|
|
3
|
-
declare const _default: React.MemoExoticComponent<({
|
|
3
|
+
declare const _default: React.MemoExoticComponent<({ label, checked, onClick, error, disabled, focused, readonly, tabIndex, }: RadioProps) => JSX.Element>;
|
|
4
4
|
export default _default;
|