@dxc-technology/halstack-react 0.0.0-0e90110 → 0.0.0-1021ecf
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.js +0 -1
- package/accordion/Accordion.stories.tsx +307 -0
- package/accordion/types.d.ts +1 -1
- package/accordion-group/types.d.ts +1 -1
- package/card/Card.stories.tsx +1 -1
- package/checkbox/types.d.ts +1 -1
- package/chip/Chip.js +4 -4
- package/chip/types.d.ts +2 -2
- package/common/variables.js +55 -21
- package/date-input/DateInput.js +9 -12
- package/dialog/Dialog.js +2 -1
- package/dropdown/Dropdown.stories.tsx +247 -0
- package/file-input/FileInput.d.ts +1 -1
- package/file-input/FileInput.js +147 -68
- package/file-input/FileInput.stories.tsx +507 -0
- package/file-input/FileItem.js +2 -2
- package/file-input/types.d.ts +32 -7
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +10 -16
- package/footer/{Footer.stories.jsx → Footer.stories.tsx} +1 -22
- package/footer/Icons.d.ts +2 -0
- package/footer/Icons.js +3 -3
- package/footer/types.d.ts +5 -9
- package/header/Icons.d.ts +2 -0
- package/heading/Heading.stories.tsx +3 -2
- package/layout/ApplicationLayout.js +2 -1
- package/layout/ApplicationLayout.stories.tsx +171 -0
- package/list/List.d.ts +8 -0
- package/list/List.js +47 -0
- package/list/List.stories.tsx +95 -0
- package/main.d.ts +5 -1
- package/main.js +32 -0
- package/number-input/NumberInput.js +3 -6
- package/package.json +4 -2
- package/paginator/Paginator.js +0 -6
- package/password-input/PasswordInput.js +12 -13
- package/password-input/PasswordInput.stories.tsx +3 -3
- package/radio-group/Radio.d.ts +4 -0
- package/radio-group/Radio.js +130 -0
- package/radio-group/RadioGroup.d.ts +4 -0
- package/radio-group/RadioGroup.js +268 -0
- package/radio-group/RadioGroup.stories.tsx +79 -0
- package/radio-group/types.d.ts +36 -0
- package/radio-group/types.js +5 -0
- package/resultsetTable/ResultsetTable.js +1 -1
- package/resultsetTable/ResultsetTable.stories.tsx +277 -0
- package/resultsetTable/types.d.ts +1 -1
- package/row/Row.d.ts +11 -0
- package/row/Row.js +127 -0
- package/row/Row.stories.tsx +239 -0
- package/select/Select.d.ts +4 -0
- package/select/Select.js +19 -21
- package/select/types.d.ts +170 -0
- package/select/types.js +5 -0
- package/sidenav/Sidenav.stories.tsx +18 -1
- package/spinner/Spinner.stories.jsx +1 -0
- package/stack/Stack.d.ts +10 -0
- package/stack/Stack.js +97 -0
- package/stack/Stack.stories.tsx +166 -0
- package/switch/Switch.stories.tsx +1 -1
- package/table/Table.stories.jsx +2 -1
- package/tabs/Tabs.stories.tsx +1 -0
- package/tag/Tag.stories.tsx +1 -1
- package/text/Text.d.ts +7 -0
- package/text/Text.js +30 -0
- package/text/Text.stories.tsx +19 -0
- package/text-input/TextInput.js +26 -20
- package/text-input/TextInput.stories.tsx +4 -4
- package/text-input/types.d.ts +1 -1
- package/textarea/Textarea.d.ts +4 -0
- package/textarea/Textarea.js +14 -46
- package/textarea/Textarea.stories.jsx +4 -3
- package/textarea/types.d.ts +130 -0
- package/textarea/types.js +5 -0
- package/toggle-group/ToggleGroup.js +12 -15
- package/toggle-group/ToggleGroup.stories.tsx +23 -28
- package/toggle-group/types.d.ts +38 -25
- package/wizard/Wizard.js +58 -8
- package/wizard/{Wizard.stories.jsx → Wizard.stories.tsx} +0 -0
- package/wizard/types.d.ts +2 -6
- package/select/index.d.ts +0 -131
- package/textarea/index.d.ts +0 -127
- package/wizard/Icons.js +0 -65
|
@@ -9,36 +9,31 @@ export default {
|
|
|
9
9
|
component: DxcToggleGroup,
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
const ethernetSVG = (
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<path d="M0,0h24v24H0V0z" fill="none" />
|
|
25
|
-
</g>
|
|
12
|
+
const ethernetSVG = (
|
|
13
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
|
14
|
+
<path d="M0 0h24v24H0V0z" fill="none" />
|
|
15
|
+
<path d="M7.77 6.76L6.23 5.48.82 12l5.41 6.52 1.54-1.28L3.42 12l4.35-5.24zM7 13h2v-2H7v2zm10-2h-2v2h2v-2zm-6 2h2v-2h-2v2zm6.77-7.52l-1.54 1.28L20.58 12l-4.35 5.24 1.54 1.28L23.18 12l-5.41-6.52z" />
|
|
16
|
+
</svg>
|
|
17
|
+
);
|
|
18
|
+
const gMobileSVG = (
|
|
19
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
|
20
|
+
<g>
|
|
21
|
+
<path d="M0,0h24v24H0V0z" fill="none" />
|
|
22
|
+
</g>
|
|
23
|
+
<g>
|
|
26
24
|
<g>
|
|
27
|
-
<
|
|
28
|
-
<path d="M3,7v2h5v2H4v2h4v2H3v2h5c1.1,0,2-0.9,2-2v-1.5c0-0.83-0.67-1.5-1.5-1.5c0.83,0,1.5-0.67,1.5-1.5V9c0-1.1-0.9-2-2-2H3z M21,11v4c0,1.1-0.9,2-2,2h-5c-1.1,0-2-0.9-2-2V9c0-1.1,0.9-2,2-2h5c1.1,0,2,0.9,2,2h-7v6h5v-2h-2.5v-2H21z" />
|
|
29
|
-
</g>
|
|
25
|
+
<path d="M3,7v2h5v2H4v2h4v2H3v2h5c1.1,0,2-0.9,2-2v-1.5c0-0.83-0.67-1.5-1.5-1.5c0.83,0,1.5-0.67,1.5-1.5V9c0-1.1-0.9-2-2-2H3z M21,11v4c0,1.1-0.9,2-2,2h-5c-1.1,0-2-0.9-2-2V9c0-1.1,0.9-2,2-2h5c1.1,0,2,0.9,2,2h-7v6h5v-2h-2.5v-2H21z" />
|
|
30
26
|
</g>
|
|
31
|
-
</
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const wifiSVG = (
|
|
35
|
-
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
};
|
|
27
|
+
</g>
|
|
28
|
+
</svg>
|
|
29
|
+
);
|
|
30
|
+
const wifiSVG = (
|
|
31
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
|
|
32
|
+
<path d="M0 0h24v24H0V0zm0 0h24v24H0V0z" fill="none" />
|
|
33
|
+
<path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3c-1.65-1.66-4.34-1.66-6 0zm-4-4l2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13z" />
|
|
34
|
+
</svg>
|
|
35
|
+
);
|
|
36
|
+
|
|
42
37
|
const options = [
|
|
43
38
|
{
|
|
44
39
|
value: 1,
|
package/toggle-group/types.d.ts
CHANGED
|
@@ -6,16 +6,12 @@ declare type Margin = {
|
|
|
6
6
|
left?: Space;
|
|
7
7
|
right?: Space;
|
|
8
8
|
};
|
|
9
|
-
declare type SVG = React.SVGProps<SVGSVGElement
|
|
9
|
+
declare type SVG = React.SVGProps<SVGSVGElement>;
|
|
10
10
|
declare type OptionCommons = {
|
|
11
11
|
/**
|
|
12
12
|
* Number with the option inner value.
|
|
13
13
|
*/
|
|
14
|
-
value:
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated URL of the icon that will be placed. IconSrc and label can't be used at same time.
|
|
17
|
-
*/
|
|
18
|
-
iconSrc?: string;
|
|
14
|
+
value: number;
|
|
19
15
|
};
|
|
20
16
|
declare type OptionIcon = OptionCommons & {
|
|
21
17
|
/**
|
|
@@ -25,7 +21,7 @@ declare type OptionIcon = OptionCommons & {
|
|
|
25
21
|
/**
|
|
26
22
|
* Element used as the icon. Icon and label can't be used at same time.
|
|
27
23
|
*/
|
|
28
|
-
icon: SVG;
|
|
24
|
+
icon: string | SVG;
|
|
29
25
|
};
|
|
30
26
|
declare type OptionLabel = OptionCommons & {
|
|
31
27
|
/**
|
|
@@ -35,10 +31,10 @@ declare type OptionLabel = OptionCommons & {
|
|
|
35
31
|
/**
|
|
36
32
|
* Element used as the icon. Icon and label can't be used at same time.
|
|
37
33
|
*/
|
|
38
|
-
icon?: SVG;
|
|
34
|
+
icon?: string | SVG;
|
|
39
35
|
};
|
|
40
36
|
declare type Option = OptionIcon | OptionLabel;
|
|
41
|
-
declare type
|
|
37
|
+
declare type CommonProps = {
|
|
42
38
|
/**
|
|
43
39
|
* Text to be placed above the component.
|
|
44
40
|
*/
|
|
@@ -47,18 +43,6 @@ declare type Props = {
|
|
|
47
43
|
* Helper text to be placed above the component.
|
|
48
44
|
*/
|
|
49
45
|
helperText?: string;
|
|
50
|
-
/**
|
|
51
|
-
* The key(s) of the selected value(s). If the toggle group component doesn't allow multiple selection,
|
|
52
|
-
* it must be one unique value. If the component allows multiple selection, value must be an array.
|
|
53
|
-
* If undefined, the component will be uncontrolled and the value will be managed internally by the component.
|
|
54
|
-
*/
|
|
55
|
-
value?: string | string[];
|
|
56
|
-
/**
|
|
57
|
-
* This function will be called every time the selection changes. The number with the key of the selected
|
|
58
|
-
* value will be passed as a parameter to this function.
|
|
59
|
-
* If multiple selection is allowed, an array of keys will be passed.
|
|
60
|
-
*/
|
|
61
|
-
onChange?: (optionIndex: number | number[]) => void;
|
|
62
46
|
/**
|
|
63
47
|
* If true, the component will be disabled.
|
|
64
48
|
*/
|
|
@@ -67,10 +51,6 @@ declare type Props = {
|
|
|
67
51
|
* An array of objects representing the selectable options.
|
|
68
52
|
*/
|
|
69
53
|
options: Option[];
|
|
70
|
-
/**
|
|
71
|
-
* If true, the toggle group will support multiple selection. In that case, value must be an array of numbers with the keys of the selected values.
|
|
72
|
-
*/
|
|
73
|
-
multiple?: boolean;
|
|
74
54
|
/**
|
|
75
55
|
* Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
76
56
|
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
|
|
@@ -81,4 +61,37 @@ declare type Props = {
|
|
|
81
61
|
*/
|
|
82
62
|
tabIndex?: number;
|
|
83
63
|
};
|
|
64
|
+
declare type SingleSelectionToggle = CommonProps & {
|
|
65
|
+
/**
|
|
66
|
+
* If true, the toggle group will support multiple selection. In that case, value must be an array of numbers with the keys of the selected values.
|
|
67
|
+
*/
|
|
68
|
+
multiple?: false;
|
|
69
|
+
/**
|
|
70
|
+
* The key of the selected value. If the component allows multiple selection, value must be an array.
|
|
71
|
+
* If undefined, the component will be uncontrolled and the value will be managed internally by the component.
|
|
72
|
+
*/
|
|
73
|
+
value?: number;
|
|
74
|
+
/**
|
|
75
|
+
* This function will be called every time the selection changes. The number with the key of the selected
|
|
76
|
+
* value will be passed as a parameter to this function.
|
|
77
|
+
*/
|
|
78
|
+
onChange?: (optionIndex: number) => void;
|
|
79
|
+
};
|
|
80
|
+
declare type MultipleSelectionToggle = CommonProps & {
|
|
81
|
+
/**
|
|
82
|
+
* If true, the toggle group will support multiple selection. In that case, value must be an array of numbers with the keys of the selected values.
|
|
83
|
+
*/
|
|
84
|
+
multiple: true;
|
|
85
|
+
/**
|
|
86
|
+
* An array with the keys of the selected values.
|
|
87
|
+
* If undefined, the component will be uncontrolled and the value will be managed internally by the component.
|
|
88
|
+
*/
|
|
89
|
+
value?: number[];
|
|
90
|
+
/**
|
|
91
|
+
* This function will be called every time the selection changes. An array with the key of
|
|
92
|
+
* the selected values will be passed as a parameter to this function.
|
|
93
|
+
*/
|
|
94
|
+
onChange?: (optionIndex: number[]) => void;
|
|
95
|
+
};
|
|
96
|
+
declare type Props = SingleSelectionToggle | MultipleSelectionToggle;
|
|
84
97
|
export default Props;
|
package/wizard/Wizard.js
CHANGED
|
@@ -23,14 +23,64 @@ var _variables = require("../common/variables.js");
|
|
|
23
23
|
|
|
24
24
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
25
25
|
|
|
26
|
-
var _Icons = require("./Icons");
|
|
27
|
-
|
|
28
26
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
|
|
29
27
|
|
|
30
28
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
29
|
|
|
32
30
|
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; }
|
|
33
31
|
|
|
32
|
+
var icons = {
|
|
33
|
+
validIcon: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
34
|
+
id: "check_circle_black_18dp",
|
|
35
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
36
|
+
width: "18",
|
|
37
|
+
height: "18",
|
|
38
|
+
viewBox: "0 0 18 18"
|
|
39
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
40
|
+
id: "Path_2946",
|
|
41
|
+
"data-name": "Path 2946",
|
|
42
|
+
d: "M0,0H18V18H0Z",
|
|
43
|
+
fill: "none"
|
|
44
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
45
|
+
id: "Path_2947",
|
|
46
|
+
"data-name": "Path 2947",
|
|
47
|
+
d: "M9.986,4a5.986,5.986,0,1,0,5.986,5.986A5.994,5.994,0,0,0,9.986,4Zm-1.5,9.727L5.5,10.734,6.551,9.679l1.938,1.93L13.42,6.679l1.055,1.063Z",
|
|
48
|
+
transform: "translate(-0.986 -0.986)",
|
|
49
|
+
fill: "#eafaef",
|
|
50
|
+
opacity: "0.999"
|
|
51
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
52
|
+
id: "Path_2948",
|
|
53
|
+
"data-name": "Path 2948",
|
|
54
|
+
d: "M9.493,2a7.493,7.493,0,1,0,7.493,7.493A7.5,7.5,0,0,0,9.493,2Zm0,13.487a5.994,5.994,0,1,1,5.994-5.994A6,6,0,0,1,9.493,15.487Zm3.439-9.306L7.994,11.119,6.054,9.186,5,10.242l3,3,5.994-5.994Z",
|
|
55
|
+
transform: "translate(-0.493 -0.493)",
|
|
56
|
+
fill: "#24a148"
|
|
57
|
+
})),
|
|
58
|
+
invalidIcon: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
59
|
+
id: "highlight_off_black_18dp",
|
|
60
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
61
|
+
width: "18",
|
|
62
|
+
height: "18",
|
|
63
|
+
viewBox: "0 0 18 18"
|
|
64
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
65
|
+
id: "Path_2943",
|
|
66
|
+
"data-name": "Path 2943",
|
|
67
|
+
d: "M0,0H18V18H0Z",
|
|
68
|
+
fill: "none"
|
|
69
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
70
|
+
id: "Path_2944",
|
|
71
|
+
"data-name": "Path 2944",
|
|
72
|
+
d: "M10,4a6,6,0,1,0,6,6A6.01,6.01,0,0,0,10,4Zm3,7.945L11.945,13,10,11.06,8.059,13,7,11.945,8.944,10,7,8.059,8.059,7,10,8.944,11.945,7,13,8.059,11.06,10Z",
|
|
73
|
+
transform: "translate(-1.002 -1.002)",
|
|
74
|
+
fill: "#ffe6e9"
|
|
75
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
76
|
+
id: "Path_2945",
|
|
77
|
+
"data-name": "Path 2945",
|
|
78
|
+
d: "M11.444,6.5,9.5,8.443,7.558,6.5,6.5,7.558,8.443,9.5,6.5,11.444,7.558,12.5,9.5,10.558,11.444,12.5,12.5,11.444,10.558,9.5,12.5,7.558ZM9.5,2A7.5,7.5,0,1,0,17,9.5,7.494,7.494,0,0,0,9.5,2Zm0,13.5a6,6,0,1,1,6-6A6.009,6.009,0,0,1,9.5,15.5Z",
|
|
79
|
+
transform: "translate(-0.501 -0.501)",
|
|
80
|
+
fill: "#d0011b"
|
|
81
|
+
}))
|
|
82
|
+
};
|
|
83
|
+
|
|
34
84
|
var DxcWizard = function DxcWizard(_ref) {
|
|
35
85
|
var _ref$mode = _ref.mode,
|
|
36
86
|
mode = _ref$mode === void 0 ? "horizontal" : _ref$mode,
|
|
@@ -82,14 +132,14 @@ var DxcWizard = function DxcWizard(_ref) {
|
|
|
82
132
|
current: i === renderedCurrent,
|
|
83
133
|
visited: i < renderedCurrent,
|
|
84
134
|
disabled: step.disabled
|
|
85
|
-
}, step.icon ? /*#__PURE__*/_react["default"].createElement(
|
|
135
|
+
}, step.icon ? typeof step.icon === "string" ? /*#__PURE__*/_react["default"].createElement(Icon, {
|
|
136
|
+
src: step.icon
|
|
137
|
+
}) : /*#__PURE__*/_react["default"].createElement(StepIconContainer, {
|
|
86
138
|
disabled: step.disabled
|
|
87
|
-
}, (0, _typeof2["default"])(step.icon) === "object" ? step.icon : /*#__PURE__*/_react["default"].createElement(step.icon)) :
|
|
88
|
-
src: step.iconSrc
|
|
89
|
-
}) : /*#__PURE__*/_react["default"].createElement(Number, {
|
|
139
|
+
}, (0, _typeof2["default"])(step.icon) === "object" ? step.icon : /*#__PURE__*/_react["default"].createElement(step.icon)) : /*#__PURE__*/_react["default"].createElement(Number, {
|
|
90
140
|
disabled: step.disabled,
|
|
91
141
|
current: i === renderedCurrent
|
|
92
|
-
}, i + 1)), step.valid !== undefined ? step.valid ? /*#__PURE__*/_react["default"].createElement(ValidityIconContainer, null,
|
|
142
|
+
}, i + 1)), step.valid !== undefined ? step.valid ? /*#__PURE__*/_react["default"].createElement(ValidityIconContainer, null, icons.validIcon) : /*#__PURE__*/_react["default"].createElement(ValidityIconContainer, null, icons.invalidIcon) : ""), step.label || step.description ? /*#__PURE__*/_react["default"].createElement(InfoContainer, null, step.label ? /*#__PURE__*/_react["default"].createElement(Label, {
|
|
93
143
|
disabled: step.disabled,
|
|
94
144
|
visited: i <= innerCurrent
|
|
95
145
|
}, step.label) : "", step.description ? /*#__PURE__*/_react["default"].createElement(Description, {
|
|
@@ -146,7 +196,7 @@ var IconContainer = _styledComponents["default"].div(_templateObject5 || (_templ
|
|
|
146
196
|
}, function (props) {
|
|
147
197
|
return props.disabled ? props.theme.disabledCircleHeight : props.current ? props.theme.selectedCircleHeight : props.theme.circleHeight;
|
|
148
198
|
}, function (props) {
|
|
149
|
-
return "\n ".concat(!props.current && !props.disabled ? "border: ".concat(props.theme.circleBorderThickness, " ").concat(props.theme.circleBorderStyle, " ").concat(props.theme.circleBorderColor, ";") : props.current ? "border: ".concat(props.theme.selectedCircleBorderThickness, " ").concat(props.theme.selectedCircleBorderStyle, " ").concat(props.theme.selectedCircleBorderColor, ";") : props.disabled ? "border: ".concat(props.theme.disabledCircleBorderThickness, " ").concat(props.theme.disabledCircleBorderStyle, " ").concat(props.theme.disabledCircleBorderColor, ";") : "", "\n background: ").concat(props.disabled ? "".concat(props.theme.disabledBackgroundColor) : props.current ? "".concat(props.theme.stepContainerSelectedBackgroundColor) : "".concat(props.theme.stepContainerBackgroundColor), ";\n ");
|
|
199
|
+
return "\n ".concat(!props.current && !props.disabled ? "border: ".concat(props.theme.circleBorderThickness, " ").concat(props.theme.circleBorderStyle, " ").concat(props.theme.circleBorderColor, ";") : props.current && !props.disabled ? "border: ".concat(props.theme.selectedCircleBorderThickness, " ").concat(props.theme.selectedCircleBorderStyle, " ").concat(props.theme.selectedCircleBorderColor, ";") : props.disabled ? "border: ".concat(props.theme.disabledCircleBorderThickness, " ").concat(props.theme.disabledCircleBorderStyle, " ").concat(props.theme.disabledCircleBorderColor, ";") : "", "\n background: ").concat(props.disabled ? "".concat(props.theme.disabledBackgroundColor) : props.current ? "".concat(props.theme.stepContainerSelectedBackgroundColor) : "".concat(props.theme.stepContainerBackgroundColor), ";\n ");
|
|
150
200
|
}, function (props) {
|
|
151
201
|
return props.disabled ? "color: ".concat(props.theme.disabledFontColor, ";") : "color: ".concat(props.current ? props.theme.stepContainerSelectedFontColor : props.theme.stepContainerFontColor, ";");
|
|
152
202
|
}, function (props) {
|
|
File without changes
|
package/wizard/types.d.ts
CHANGED
|
@@ -17,13 +17,9 @@ declare type Step = {
|
|
|
17
17
|
*/
|
|
18
18
|
description?: string;
|
|
19
19
|
/**
|
|
20
|
-
* Element used as the icon
|
|
20
|
+
* Element or path used as the icon displayed in the step.
|
|
21
21
|
*/
|
|
22
|
-
icon?: SVG;
|
|
23
|
-
/**
|
|
24
|
-
* @deprecated URL of the icon to be displayed in the step.
|
|
25
|
-
*/
|
|
26
|
-
iconSrc?: string;
|
|
22
|
+
icon?: string | SVG;
|
|
27
23
|
/**
|
|
28
24
|
* Whether the step is disabled or not.
|
|
29
25
|
*/
|
package/select/index.d.ts
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
-
type Margin = {
|
|
3
|
-
top?: Space;
|
|
4
|
-
bottom?: Space;
|
|
5
|
-
left?: Space;
|
|
6
|
-
right?: Space;
|
|
7
|
-
};
|
|
8
|
-
type SVG = React.SVGProps<SVGSVGElement> | React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
9
|
-
|
|
10
|
-
type OptionGroup = {
|
|
11
|
-
/**
|
|
12
|
-
* Label of the group to be shown in the select's listbox.
|
|
13
|
-
*/
|
|
14
|
-
label: string;
|
|
15
|
-
/**
|
|
16
|
-
* List of the grouped options.
|
|
17
|
-
*/
|
|
18
|
-
options: Option[];
|
|
19
|
-
};
|
|
20
|
-
type Option = {
|
|
21
|
-
/**
|
|
22
|
-
* Element used as the icon that will be placed before the option label.
|
|
23
|
-
* It can be a url of an image or an inline SVG. If the url option
|
|
24
|
-
* is the chosen one, take into account that the component's
|
|
25
|
-
* color styling tokens will not be applied to the image.
|
|
26
|
-
*/
|
|
27
|
-
icon?: string | SVG;
|
|
28
|
-
/**
|
|
29
|
-
* Label of the option to be shown in the select's listbox.
|
|
30
|
-
*/
|
|
31
|
-
label: string;
|
|
32
|
-
/**
|
|
33
|
-
* Value of the option. It should be unique and
|
|
34
|
-
* not an empty string, which is reserved to the empty option added
|
|
35
|
-
* by optional prop.
|
|
36
|
-
*/
|
|
37
|
-
value: string;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
type Props = {
|
|
41
|
-
/**
|
|
42
|
-
* Text to be placed above the select.
|
|
43
|
-
*/
|
|
44
|
-
label?: string;
|
|
45
|
-
/**
|
|
46
|
-
* Name attribute of the input element. This attribute will allow users
|
|
47
|
-
* to find the component's value during the submit event. In this event,
|
|
48
|
-
* the component's value will always be a regular string, for both single
|
|
49
|
-
* and multiple selection modes, been in the first one a single option
|
|
50
|
-
* value and in the multiple variant more than one option value,
|
|
51
|
-
* separated by commas.
|
|
52
|
-
*/
|
|
53
|
-
name?: string;
|
|
54
|
-
/**
|
|
55
|
-
* Value of the select. If undefined, the component will be uncontrolled
|
|
56
|
-
* and the value will be managed internally by the component.
|
|
57
|
-
*/
|
|
58
|
-
value?: string | string[];
|
|
59
|
-
/**
|
|
60
|
-
* An array of objects representing the selectable options.
|
|
61
|
-
*/
|
|
62
|
-
options?: Option[] | OptionGroup[];
|
|
63
|
-
/**
|
|
64
|
-
* Helper text to be placed above the select.
|
|
65
|
-
*/
|
|
66
|
-
helperText?: string;
|
|
67
|
-
/**
|
|
68
|
-
* Text to be put as placeholder of the select.
|
|
69
|
-
*/
|
|
70
|
-
placeholder?: string;
|
|
71
|
-
/**
|
|
72
|
-
* If true, the component will be disabled.
|
|
73
|
-
*/
|
|
74
|
-
disabled?: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* If true, the select will be optional, showing '(Optional)'
|
|
77
|
-
* next to the label and adding a default first option with an empty string as value,
|
|
78
|
-
* been the placeholder (if defined) its label. Otherwise, the field will be
|
|
79
|
-
* considered required and an error will be passed as a parameter to the
|
|
80
|
-
* OnBlur and onChange functions if an option wasn't selected.
|
|
81
|
-
*/
|
|
82
|
-
optional?: boolean;
|
|
83
|
-
/**
|
|
84
|
-
* If true, enables search functionality.
|
|
85
|
-
*/
|
|
86
|
-
searchable?: boolean;
|
|
87
|
-
/**
|
|
88
|
-
* If true, the select component will support multiple selected options.
|
|
89
|
-
* In that case, value will be an array of strings with each selected
|
|
90
|
-
* option value.
|
|
91
|
-
*/
|
|
92
|
-
multiple?: boolean;
|
|
93
|
-
/**
|
|
94
|
-
* This function will be called when the user selects an option.
|
|
95
|
-
* An object including the current value and the error (if the value entered is not valid)
|
|
96
|
-
* will be passed to this function. If there is no error, error will be null.
|
|
97
|
-
*/
|
|
98
|
-
onChange?: (value: string | string[]) => void;
|
|
99
|
-
/**
|
|
100
|
-
* This function will be called when the select loses the focus. An
|
|
101
|
-
* object including the value (or values) and the error (if the value
|
|
102
|
-
* selected is not valid) will be passed to this function. If there is no error,
|
|
103
|
-
* error will be null.
|
|
104
|
-
*/
|
|
105
|
-
onBlur?: (val: { value: string | string[]; error: string }) => void;
|
|
106
|
-
/**
|
|
107
|
-
* If it is defined, the component will change its appearance, showing
|
|
108
|
-
* the error below the select component. If it is not defined, the error
|
|
109
|
-
* messages will be managed internally, but never displayed on its own.
|
|
110
|
-
*/
|
|
111
|
-
error?: string;
|
|
112
|
-
/**
|
|
113
|
-
* Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
114
|
-
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
|
|
115
|
-
*/
|
|
116
|
-
margin?: Space | Margin;
|
|
117
|
-
/**
|
|
118
|
-
* Size of the component ('small' | 'medium' | 'large' | 'fillParent').
|
|
119
|
-
*/
|
|
120
|
-
size?: "small" | "medium" | "large" | "fillParent";
|
|
121
|
-
/**
|
|
122
|
-
* Value of the tabindex attribute.
|
|
123
|
-
*/
|
|
124
|
-
tabIndex?: number;
|
|
125
|
-
/**
|
|
126
|
-
* Reference to the component.
|
|
127
|
-
*/
|
|
128
|
-
ref?: React.RefObject<HTMLDivElement>;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
export default function DxcSelect(props: Props): JSX.Element;
|
package/textarea/index.d.ts
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
type Size = "small" | "medium" | "large" | "fillParent";
|
|
2
|
-
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
-
type Margin = {
|
|
4
|
-
top?: Space;
|
|
5
|
-
bottom?: Space;
|
|
6
|
-
left?: Space;
|
|
7
|
-
right?: Space;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
type Props = {
|
|
11
|
-
/**
|
|
12
|
-
* Text to be placed above the textarea.
|
|
13
|
-
*/
|
|
14
|
-
label?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Name attribute of the textarea element.
|
|
17
|
-
*/
|
|
18
|
-
name?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Value of the textarea. If undefined, the component will be uncontrolled and the value will be managed internally.
|
|
21
|
-
*/
|
|
22
|
-
value?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Helper text to be placed above the textarea.
|
|
25
|
-
*/
|
|
26
|
-
helperText?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Text to be put as placeholder of the textarea.
|
|
29
|
-
*/
|
|
30
|
-
placeholder?: string;
|
|
31
|
-
/**
|
|
32
|
-
* If true, the component will be disabled.
|
|
33
|
-
*/
|
|
34
|
-
disabled?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* If true, the textarea will be optional, showing '(Optional)'
|
|
37
|
-
* next to the label. Otherwise, the field will be considered required
|
|
38
|
-
* and an error will be passed as a parameter to the OnBlur and onChange functions
|
|
39
|
-
* when it has not been filled.
|
|
40
|
-
*/
|
|
41
|
-
optional?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Defines the textarea's ability to resize vertically. It can be:
|
|
44
|
-
* - 'auto': The textarea grows or shrinks automatically in order to fit the content.
|
|
45
|
-
* - 'manual': The height of the textarea is enabled to be manually modified.
|
|
46
|
-
* - 'none': The textarea has a fixed height and can't be modified.
|
|
47
|
-
*/
|
|
48
|
-
verticalGrow?: "auto" | "manual" | "none";
|
|
49
|
-
/**
|
|
50
|
-
* Number of rows of the textarea.
|
|
51
|
-
*/
|
|
52
|
-
rows?: number;
|
|
53
|
-
/**
|
|
54
|
-
* This function will be called when the user types within the textarea.
|
|
55
|
-
* An object including the current value and the error (if the value
|
|
56
|
-
* entered is not valid) will be passed to this function.
|
|
57
|
-
* If there is no error, error will be null.
|
|
58
|
-
*/
|
|
59
|
-
onChange?: (val: { value: string; error: string }) => void;
|
|
60
|
-
/**
|
|
61
|
-
* This function will be called when the textarea loses the focus. An
|
|
62
|
-
* object including the textarea value and the error (if the value entered
|
|
63
|
-
* is not valid) will be passed to this function. If there is no error,
|
|
64
|
-
* error will be null.
|
|
65
|
-
*/
|
|
66
|
-
onBlur?: (val: { value: string; error: string }) => void;
|
|
67
|
-
/**
|
|
68
|
-
* If it is defined, the component will change its appearance, showing
|
|
69
|
-
* the error below the textarea. If it is not defined, the error
|
|
70
|
-
* messages will be managed internally, but never displayed on its own.
|
|
71
|
-
*/
|
|
72
|
-
error?: string;
|
|
73
|
-
/**
|
|
74
|
-
* Regular expression that defines the valid format allowed by the
|
|
75
|
-
* textarea. This will be checked both when the textarea loses the focus
|
|
76
|
-
* and while typing within it. If the string entered does not match the
|
|
77
|
-
* pattern, the onBlur and onChange functions will be called with the
|
|
78
|
-
* current value and an internal error informing that this value does not
|
|
79
|
-
* match the pattern. If the pattern is met, the error parameter of both
|
|
80
|
-
* events will be null.
|
|
81
|
-
*/
|
|
82
|
-
pattern?: string;
|
|
83
|
-
/**
|
|
84
|
-
* Specifies the minimun length allowed by the textarea.
|
|
85
|
-
* This will be checked both when the textarea loses the
|
|
86
|
-
* focus and while typing within it. If the string entered does not
|
|
87
|
-
* comply the minimum length, the onBlur and onChange functions will be called
|
|
88
|
-
* with the current value and an internal error informing that the value
|
|
89
|
-
* length does not comply the specified range. If a valid length is
|
|
90
|
-
* reached, the error parameter of both events will be null.
|
|
91
|
-
*/
|
|
92
|
-
minLength?: number;
|
|
93
|
-
/**
|
|
94
|
-
* Specifies the maximum length allowed by the textarea.
|
|
95
|
-
* This will be checked both when the textarea loses the
|
|
96
|
-
* focus and while typing within it. If the string entered does not
|
|
97
|
-
* comply the maximum length, the onBlur and onChange functions will be called
|
|
98
|
-
* with the current value and an internal error informing that the value
|
|
99
|
-
* length does not comply the specified range. If a valid length is
|
|
100
|
-
* reached, the error parameter of both events will be null.
|
|
101
|
-
*/
|
|
102
|
-
maxLength?: number;
|
|
103
|
-
/**
|
|
104
|
-
* HTML autocomplete attribute. Lets the user specify if any permission the user agent has to provide automated assistance in filling out the textarea value.
|
|
105
|
-
* Its value must be one of all the possible values of the HTML autocomplete attribute: 'on', 'off', 'email', 'username', 'new-password', ...
|
|
106
|
-
*/
|
|
107
|
-
autocomplete?: string;
|
|
108
|
-
/**
|
|
109
|
-
* Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
110
|
-
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
|
|
111
|
-
*/
|
|
112
|
-
margin?: Space | Margin;
|
|
113
|
-
/**
|
|
114
|
-
* Size of the component ('small' | 'medium' | 'large' | 'fillParent').
|
|
115
|
-
*/
|
|
116
|
-
size?: Size;
|
|
117
|
-
/**
|
|
118
|
-
* Value of the tabindex attribute.
|
|
119
|
-
*/
|
|
120
|
-
tabIndex?: number;
|
|
121
|
-
/**
|
|
122
|
-
* Reference to the component.
|
|
123
|
-
*/
|
|
124
|
-
ref?: React.RefObject<HTMLDivElement>;
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
export default function DxcTextarea(props: Props): JSX.Element;
|
package/wizard/Icons.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.validIcon = exports.invalidIcon = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var invalidIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
13
|
-
id: "highlight_off_black_18dp",
|
|
14
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
-
width: "18",
|
|
16
|
-
height: "18",
|
|
17
|
-
viewBox: "0 0 18 18"
|
|
18
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
19
|
-
id: "Path_2943",
|
|
20
|
-
"data-name": "Path 2943",
|
|
21
|
-
d: "M0,0H18V18H0Z",
|
|
22
|
-
fill: "none"
|
|
23
|
-
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
24
|
-
id: "Path_2944",
|
|
25
|
-
"data-name": "Path 2944",
|
|
26
|
-
d: "M10,4a6,6,0,1,0,6,6A6.01,6.01,0,0,0,10,4Zm3,7.945L11.945,13,10,11.06,8.059,13,7,11.945,8.944,10,7,8.059,8.059,7,10,8.944,11.945,7,13,8.059,11.06,10Z",
|
|
27
|
-
transform: "translate(-1.002 -1.002)",
|
|
28
|
-
fill: "#ffe6e9"
|
|
29
|
-
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
30
|
-
id: "Path_2945",
|
|
31
|
-
"data-name": "Path 2945",
|
|
32
|
-
d: "M11.444,6.5,9.5,8.443,7.558,6.5,6.5,7.558,8.443,9.5,6.5,11.444,7.558,12.5,9.5,10.558,11.444,12.5,12.5,11.444,10.558,9.5,12.5,7.558ZM9.5,2A7.5,7.5,0,1,0,17,9.5,7.494,7.494,0,0,0,9.5,2Zm0,13.5a6,6,0,1,1,6-6A6.009,6.009,0,0,1,9.5,15.5Z",
|
|
33
|
-
transform: "translate(-0.501 -0.501)",
|
|
34
|
-
fill: "#d0011b"
|
|
35
|
-
}));
|
|
36
|
-
|
|
37
|
-
exports.invalidIcon = invalidIcon;
|
|
38
|
-
|
|
39
|
-
var validIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
40
|
-
id: "check_circle_black_18dp",
|
|
41
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
42
|
-
width: "18",
|
|
43
|
-
height: "18",
|
|
44
|
-
viewBox: "0 0 18 18"
|
|
45
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
46
|
-
id: "Path_2946",
|
|
47
|
-
"data-name": "Path 2946",
|
|
48
|
-
d: "M0,0H18V18H0Z",
|
|
49
|
-
fill: "none"
|
|
50
|
-
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
51
|
-
id: "Path_2947",
|
|
52
|
-
"data-name": "Path 2947",
|
|
53
|
-
d: "M9.986,4a5.986,5.986,0,1,0,5.986,5.986A5.994,5.994,0,0,0,9.986,4Zm-1.5,9.727L5.5,10.734,6.551,9.679l1.938,1.93L13.42,6.679l1.055,1.063Z",
|
|
54
|
-
transform: "translate(-0.986 -0.986)",
|
|
55
|
-
fill: "#eafaef",
|
|
56
|
-
opacity: "0.999"
|
|
57
|
-
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
58
|
-
id: "Path_2948",
|
|
59
|
-
"data-name": "Path 2948",
|
|
60
|
-
d: "M9.493,2a7.493,7.493,0,1,0,7.493,7.493A7.5,7.5,0,0,0,9.493,2Zm0,13.487a5.994,5.994,0,1,1,5.994-5.994A6,6,0,0,1,9.493,15.487Zm3.439-9.306L7.994,11.119,6.054,9.186,5,10.242l3,3,5.994-5.994Z",
|
|
61
|
-
transform: "translate(-0.493 -0.493)",
|
|
62
|
-
fill: "#24a148"
|
|
63
|
-
}));
|
|
64
|
-
|
|
65
|
-
exports.validIcon = validIcon;
|