@dxc-technology/halstack-react 0.0.0-b39a2d8 → 0.0.0-b3e1a2f

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.
Files changed (162) hide show
  1. package/BackgroundColorContext.d.ts +10 -0
  2. package/BackgroundColorContext.js +1 -4
  3. package/ThemeContext.d.ts +15 -0
  4. package/ThemeContext.js +5 -8
  5. package/V3Select/V3Select.js +2 -2
  6. package/V3Textarea/V3Textarea.js +2 -2
  7. package/accordion/Accordion.js +2 -2
  8. package/accordion/Accordion.stories.tsx +307 -0
  9. package/accordion/types.d.ts +1 -1
  10. package/accordion-group/AccordionGroup.js +2 -2
  11. package/accordion-group/AccordionGroup.stories.tsx +225 -0
  12. package/accordion-group/types.d.ts +1 -1
  13. package/alert/Alert.js +2 -2
  14. package/badge/Badge.js +1 -1
  15. package/bleed/Bleed.d.ts +3 -0
  16. package/bleed/Bleed.js +84 -0
  17. package/bleed/Bleed.stories.tsx +342 -0
  18. package/bleed/types.d.ts +13 -0
  19. package/bleed/types.js +5 -0
  20. package/box/Box.js +2 -2
  21. package/button/Button.d.ts +1 -1
  22. package/button/Button.js +13 -19
  23. package/button/Button.stories.tsx +6 -8
  24. package/button/types.d.ts +5 -9
  25. package/card/Card.js +1 -1
  26. package/card/Card.stories.tsx +1 -1
  27. package/checkbox/Checkbox.js +2 -2
  28. package/checkbox/types.d.ts +1 -1
  29. package/chip/Chip.d.ts +4 -0
  30. package/chip/Chip.js +5 -27
  31. package/chip/types.d.ts +53 -0
  32. package/chip/types.js +5 -0
  33. package/common/variables.js +57 -22
  34. package/date/Date.js +1 -1
  35. package/date-input/DateInput.js +10 -13
  36. package/dialog/Dialog.js +4 -3
  37. package/dropdown/Dropdown.js +1 -1
  38. package/dropdown/Dropdown.stories.tsx +247 -0
  39. package/dropdown/types.d.ts +1 -1
  40. package/file-input/FileInput.d.ts +1 -1
  41. package/file-input/FileInput.js +160 -81
  42. package/file-input/FileInput.stories.tsx +507 -0
  43. package/file-input/FileItem.js +8 -6
  44. package/file-input/types.d.ts +32 -7
  45. package/footer/Footer.d.ts +1 -1
  46. package/footer/Footer.js +12 -18
  47. package/footer/{Footer.stories.jsx → Footer.stories.tsx} +1 -22
  48. package/footer/Icons.d.ts +2 -0
  49. package/footer/Icons.js +3 -3
  50. package/footer/types.d.ts +21 -17
  51. package/header/Header.js +2 -2
  52. package/header/Icons.d.ts +2 -0
  53. package/heading/Heading.js +1 -1
  54. package/heading/Heading.stories.tsx +54 -0
  55. package/input-text/InputText.js +2 -2
  56. package/inset/Inset.d.ts +3 -0
  57. package/inset/Inset.js +84 -0
  58. package/inset/Inset.stories.tsx +229 -0
  59. package/inset/types.d.ts +13 -0
  60. package/inset/types.js +5 -0
  61. package/layout/ApplicationLayout.d.ts +10 -0
  62. package/layout/ApplicationLayout.js +9 -19
  63. package/layout/ApplicationLayout.stories.tsx +171 -0
  64. package/layout/types.d.ts +57 -0
  65. package/layout/types.js +5 -0
  66. package/link/Link.js +1 -1
  67. package/list/List.d.ts +4 -0
  68. package/list/List.js +47 -0
  69. package/list/List.stories.tsx +95 -0
  70. package/list/types.d.ts +7 -0
  71. package/list/types.js +5 -0
  72. package/main.d.ts +7 -3
  73. package/main.js +34 -2
  74. package/number-input/NumberInput.js +3 -6
  75. package/number-input/NumberInputContext.d.ts +4 -0
  76. package/number-input/NumberInputContext.js +5 -2
  77. package/number-input/numberInputContextTypes.d.ts +19 -0
  78. package/number-input/numberInputContextTypes.js +5 -0
  79. package/package.json +4 -2
  80. package/paginator/Paginator.js +2 -8
  81. package/password-input/PasswordInput.js +19 -18
  82. package/password-input/PasswordInput.stories.tsx +3 -3
  83. package/password-input/types.d.ts +17 -10
  84. package/progress-bar/ProgressBar.js +4 -4
  85. package/radio/Radio.js +2 -2
  86. package/radio-group/Radio.d.ts +4 -0
  87. package/radio-group/Radio.js +130 -0
  88. package/radio-group/RadioGroup.d.ts +4 -0
  89. package/radio-group/RadioGroup.js +268 -0
  90. package/radio-group/RadioGroup.stories.tsx +79 -0
  91. package/radio-group/types.d.ts +36 -0
  92. package/radio-group/types.js +5 -0
  93. package/resultsetTable/ResultsetTable.d.ts +4 -0
  94. package/resultsetTable/ResultsetTable.js +5 -28
  95. package/resultsetTable/ResultsetTable.stories.tsx +275 -0
  96. package/resultsetTable/types.d.ts +67 -0
  97. package/resultsetTable/types.js +5 -0
  98. package/row/Row.d.ts +3 -0
  99. package/row/Row.js +127 -0
  100. package/row/Row.stories.tsx +237 -0
  101. package/row/types.d.ts +10 -0
  102. package/row/types.js +5 -0
  103. package/select/Select.d.ts +4 -0
  104. package/select/Select.js +20 -22
  105. package/select/types.d.ts +170 -0
  106. package/select/types.js +5 -0
  107. package/sidenav/Sidenav.js +2 -2
  108. package/sidenav/Sidenav.stories.tsx +182 -0
  109. package/slider/Slider.js +4 -4
  110. package/spinner/Spinner.js +2 -2
  111. package/spinner/Spinner.stories.jsx +1 -0
  112. package/stack/Stack.d.ts +3 -0
  113. package/stack/Stack.js +97 -0
  114. package/stack/Stack.stories.tsx +164 -0
  115. package/stack/types.d.ts +9 -0
  116. package/stack/types.js +5 -0
  117. package/switch/Switch.js +2 -2
  118. package/switch/Switch.stories.tsx +1 -1
  119. package/table/Table.js +3 -3
  120. package/table/Table.stories.jsx +2 -1
  121. package/tabs/Tabs.js +11 -9
  122. package/tabs/Tabs.stories.tsx +120 -0
  123. package/tabs/types.d.ts +23 -15
  124. package/tag/Tag.js +1 -1
  125. package/tag/Tag.stories.tsx +1 -1
  126. package/text/Text.d.ts +7 -0
  127. package/text/Text.js +30 -0
  128. package/text/Text.stories.tsx +19 -0
  129. package/text-input/TextInput.d.ts +4 -0
  130. package/text-input/TextInput.js +54 -85
  131. package/text-input/TextInput.stories.tsx +456 -0
  132. package/text-input/types.d.ts +159 -0
  133. package/text-input/types.js +5 -0
  134. package/textarea/Textarea.d.ts +4 -0
  135. package/textarea/Textarea.js +27 -60
  136. package/textarea/Textarea.stories.jsx +4 -3
  137. package/textarea/types.d.ts +130 -0
  138. package/textarea/types.js +5 -0
  139. package/toggle/Toggle.js +1 -1
  140. package/toggle-group/ToggleGroup.d.ts +4 -0
  141. package/toggle-group/ToggleGroup.js +16 -45
  142. package/toggle-group/ToggleGroup.stories.tsx +23 -28
  143. package/toggle-group/types.d.ts +97 -0
  144. package/toggle-group/types.js +5 -0
  145. package/upload/buttons-upload/ButtonsUpload.js +2 -2
  146. package/upload/dragAndDropArea/DragAndDropArea.js +2 -2
  147. package/upload/file-upload/FileToUpload.js +1 -1
  148. package/upload/files-upload/FilesToUpload.js +1 -1
  149. package/upload/transaction/Transaction.js +2 -2
  150. package/upload/transactions/Transactions.js +1 -1
  151. package/useTheme.d.ts +2 -0
  152. package/useTheme.js +1 -1
  153. package/wizard/Wizard.js +59 -9
  154. package/wizard/{Wizard.stories.jsx → Wizard.stories.tsx} +0 -0
  155. package/wizard/types.d.ts +3 -7
  156. package/chip/index.d.ts +0 -22
  157. package/resultsetTable/index.d.ts +0 -19
  158. package/select/index.d.ts +0 -131
  159. package/text-input/index.d.ts +0 -135
  160. package/textarea/index.d.ts +0 -117
  161. package/toggle-group/index.d.ts +0 -21
  162. package/wizard/Icons.js +0 -65
@@ -0,0 +1,97 @@
1
+ /// <reference types="react" />
2
+ declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
3
+ declare type Margin = {
4
+ top?: Space;
5
+ bottom?: Space;
6
+ left?: Space;
7
+ right?: Space;
8
+ };
9
+ declare type SVG = React.SVGProps<SVGSVGElement>;
10
+ declare type OptionCommons = {
11
+ /**
12
+ * Number with the option inner value.
13
+ */
14
+ value: number;
15
+ };
16
+ declare type OptionIcon = OptionCommons & {
17
+ /**
18
+ * String with the option display value.
19
+ */
20
+ label?: string;
21
+ /**
22
+ * Element used as the icon. Icon and label can't be used at same time.
23
+ */
24
+ icon: string | SVG;
25
+ };
26
+ declare type OptionLabel = OptionCommons & {
27
+ /**
28
+ * String with the option display value.
29
+ */
30
+ label: string;
31
+ /**
32
+ * Element used as the icon. Icon and label can't be used at same time.
33
+ */
34
+ icon?: string | SVG;
35
+ };
36
+ declare type Option = OptionIcon | OptionLabel;
37
+ declare type CommonProps = {
38
+ /**
39
+ * Text to be placed above the component.
40
+ */
41
+ label?: string;
42
+ /**
43
+ * Helper text to be placed above the component.
44
+ */
45
+ helperText?: string;
46
+ /**
47
+ * If true, the component will be disabled.
48
+ */
49
+ disabled?: boolean;
50
+ /**
51
+ * An array of objects representing the selectable options.
52
+ */
53
+ options: Option[];
54
+ /**
55
+ * Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
56
+ * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
57
+ */
58
+ margin?: Space | Margin;
59
+ /**
60
+ * Value of the tabindex.
61
+ */
62
+ tabIndex?: number;
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;
97
+ export default Props;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -21,9 +21,9 @@ var _Button = _interopRequireDefault(require("../../button/Button"));
21
21
 
22
22
  var _Icons = require("./Icons");
23
23
 
24
- var _useTheme = _interopRequireDefault(require("../../useTheme.js"));
24
+ var _useTheme = _interopRequireDefault(require("../../useTheme"));
25
25
 
26
- var _BackgroundColorContext = require("../../BackgroundColorContext.js");
26
+ var _BackgroundColorContext = require("../../BackgroundColorContext");
27
27
 
28
28
  var _templateObject, _templateObject2, _templateObject3;
29
29
 
@@ -23,9 +23,9 @@ var _Icons = require("./Icons");
23
23
 
24
24
  var _Button = _interopRequireDefault(require("../../button/Button"));
25
25
 
26
- var _useTheme = _interopRequireDefault(require("../../useTheme.js"));
26
+ var _useTheme = _interopRequireDefault(require("../../useTheme"));
27
27
 
28
- var _BackgroundColorContext = require("../../BackgroundColorContext.js");
28
+ var _BackgroundColorContext = require("../../BackgroundColorContext");
29
29
 
30
30
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
31
31
 
@@ -19,7 +19,7 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
19
19
 
20
20
  var _Icons = require("./Icons");
21
21
 
22
- var _useTheme = _interopRequireDefault(require("../../useTheme.js"));
22
+ var _useTheme = _interopRequireDefault(require("../../useTheme"));
23
23
 
24
24
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
25
25
 
@@ -21,7 +21,7 @@ var _FileToUpload = _interopRequireDefault(require("../file-upload/FileToUpload"
21
21
 
22
22
  var _ButtonsUpload = _interopRequireDefault(require("../buttons-upload/ButtonsUpload"));
23
23
 
24
- var _useTheme = _interopRequireDefault(require("../../useTheme.js"));
24
+ var _useTheme = _interopRequireDefault(require("../../useTheme"));
25
25
 
26
26
  var _templateObject, _templateObject2;
27
27
 
@@ -23,9 +23,9 @@ var _Icons = require("./Icons");
23
23
 
24
24
  var _Spinner = _interopRequireDefault(require("../../spinner/Spinner"));
25
25
 
26
- var _useTheme = _interopRequireDefault(require("../../useTheme.js"));
26
+ var _useTheme = _interopRequireDefault(require("../../useTheme"));
27
27
 
28
- var _BackgroundColorContext = require("../../BackgroundColorContext.js");
28
+ var _BackgroundColorContext = require("../../BackgroundColorContext");
29
29
 
30
30
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
31
31
 
@@ -19,7 +19,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
19
19
 
20
20
  var _Transaction = _interopRequireDefault(require("../transaction/Transaction"));
21
21
 
22
- var _useTheme = _interopRequireDefault(require("../../useTheme.js"));
22
+ var _useTheme = _interopRequireDefault(require("../../useTheme"));
23
23
 
24
24
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
25
25
 
package/useTheme.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare const useTheme: () => any;
2
+ export default useTheme;
package/useTheme.js CHANGED
@@ -11,7 +11,7 @@ var _react = require("react");
11
11
 
12
12
  var _variables = require("./common/variables.js");
13
13
 
14
- var _ThemeContext = _interopRequireDefault(require("./ThemeContext.js"));
14
+ var _ThemeContext = _interopRequireDefault(require("./ThemeContext"));
15
15
 
16
16
  var useTheme = function useTheme() {
17
17
  var colorsTheme = (0, _react.useContext)(_ThemeContext["default"]);
package/wizard/Wizard.js CHANGED
@@ -21,9 +21,7 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
21
21
 
22
22
  var _variables = require("../common/variables.js");
23
23
 
24
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
25
-
26
- var _Icons = require("./Icons");
24
+ var _useTheme = _interopRequireDefault(require("../useTheme"));
27
25
 
28
26
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
29
27
 
@@ -31,6 +29,58 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
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(StepIconContainer, {
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)) : step.iconSrc ? /*#__PURE__*/_react["default"].createElement(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, _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, {
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) {
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 to be displayed in the step.
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
  */
@@ -50,7 +46,7 @@ declare type Props = {
50
46
  /**
51
47
  * An array of objects representing the steps.
52
48
  */
53
- steps: [Step, ...Step[]];
49
+ steps: Step[];
54
50
  /**
55
51
  * Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
56
52
  * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
package/chip/index.d.ts DELETED
@@ -1,22 +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
-
9
- type Props = {
10
- label?: string;
11
- suffixIcon?: any;
12
- preffixIcon?: any;
13
- suffixIconSrc?: string;
14
- onClickSuffix?: void;
15
- prefixIconSrc?: string;
16
- onClickPrefix?: void;
17
- disabled?: boolean;
18
- margin?: Space | Margin;
19
- tabIndex?: number;
20
- };
21
-
22
- export default function DxcChip(props: Props): JSX.Element;
@@ -1,19 +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
-
9
- type Props = {
10
- columns?: any;
11
- rows?: any;
12
- itemsPerPage?: number;
13
- itemsPerPageOptions?: number[];
14
- itemsPerPageFunction?: void,
15
- margin?: Space | Margin;
16
- tabIndex?: number;
17
- };
18
-
19
- export default function DxcResultsetTable(props: Props): JSX.Element;
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;
@@ -1,135 +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
- type SVG = React.SVGProps<SVGSVGElement> | React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
10
- type Action = {
11
- onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
12
- icon: string | SVG;
13
- };
14
-
15
- type Props = {
16
- /**
17
- * Text to be placed above the input. This label will be used as the aria-label attribute of the list of suggestions.
18
- */
19
- label?: string;
20
- /**
21
- * Name attribute of the input element.
22
- */
23
- name?: string;
24
- /**
25
- * Value of the input. If undefined, the component will be uncontrolled and the value will be managed internally by the component.
26
- */
27
- value?: string;
28
- /**
29
- * Helper text to be placed above the input.
30
- */
31
- helperText?: string;
32
- /**
33
- * Text to be put as placeholder of the input.
34
- */
35
- placeholder?: string;
36
- /**
37
- * Action to be shown in the input. This is an object composed of an onClick function and an icon,
38
- * being the latter either an inline svg or a URL to the image.
39
- */
40
- action?: Action;
41
- /**
42
- * If true, the input will have an action to clear the entered value.
43
- */
44
- clearable?: boolean;
45
- /**
46
- * If true, the component will be disabled.
47
- */
48
- disabled?: boolean;
49
- /**
50
- * If true, the input will be optional, showing '(Optional)'
51
- * next to the label. Otherwise, the field will be considered required and an error will be
52
- * passed as a parameter to the OnBlur and onChange functions when it has
53
- * not been filled.
54
- */
55
- optional?: boolean;
56
- /**
57
- * Prefix to be placed before the input value.
58
- */
59
- prefix?: string;
60
- /**
61
- * Suffix to be placed after the input value.
62
- */
63
- suffix?: string;
64
- /**
65
- * This function will be called when the user types within the input
66
- * element of the component. An object including the current value and
67
- * the error (if the value entered is not valid) will be passed to this
68
- * function. If there is no error, error will be null.
69
- */
70
- onChange?: (val: { value: string; error: string }) => void;
71
- /**
72
- * This function will be called when the input element loses the focus.
73
- * An object including the input value and the error (if the value
74
- * entered is not valid) will be passed to this function. If there is no error,
75
- * error will be null.
76
- */
77
- onBlur?: (obj: { value: string; error: string }) => void;
78
- /**
79
- * If it is defined, the component will change its appearance, showing
80
- * the error below the input component. If it is not defined, the error
81
- * messages will be managed internally, but never displayed on its own.
82
- */
83
- error?: string;
84
- /**
85
- * These are the options to be displayed as suggestions. It can be either an array or a function:
86
- * - Array: Array of options that will be filtered by the component.
87
- * - Function: This function will be called when the user changes the value, we will send as a parameter the new value;
88
- * apart from that this function should return one promise on which we should make 'then' to get the suggestions filtered.
89
- */
90
- suggestions?: string[] | (() => void);
91
- /**
92
- * Regular expression that defines the valid format allowed by the input.
93
- * This will be checked both when the input element loses the focus and
94
- * while typing within it. If the string entered does not match the
95
- * pattern, the onBlur and onChange functions will be called with the
96
- * current value and an internal error informing that this value does not
97
- * match the pattern. If the pattern is met, the error parameter of both
98
- * events will be null.
99
- */
100
- pattern?: string;
101
- /**
102
- * Specifies the minimun and maximum length allowed by the input.
103
- * This will be checked both when the input element loses the
104
- * focus and while typing within it. If the string entered does not
105
- * comply the length, the onBlur and onChange functions will be called
106
- * with the current value and an internal error informing that the value
107
- * length does not comply the specified range. If a valid length is
108
- * reached, the error parameter of both events will be null.
109
- */
110
- length?: { min?: number; max?: number };
111
- /**
112
- * HTML autocomplete attribute. Lets the user specify if any permission the user agent has to provide automated assistance in filling out the input value.
113
- * Its value must be one of all the possible values of the HTML autocomplete attribute: 'on', 'off', 'email', 'username', 'new-password', ...
114
- */
115
- autocomplete?: string;
116
- /**
117
- * Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
118
- * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
119
- */
120
- margin?: Space | Margin;
121
- /**
122
- * Size of the component ('small' | 'medium' | 'large' | 'fillParent').
123
- */
124
- size?: Size;
125
- /**
126
- * Value of the tabindex attribute.
127
- */
128
- tabIndex?: number;
129
- /**
130
- * Reference to the component.
131
- */
132
- ref?: React.RefObject<HTMLDivElement>;
133
- };
134
-
135
- export default function DxcTextInput(props: Props): JSX.Element;