@dxc-technology/halstack-react 0.0.0-ba36a4a → 0.0.0-beebecd

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 (51) hide show
  1. package/dist/ThemeContext.js +69 -61
  2. package/dist/alert/Alert.js +5 -5
  3. package/dist/alert/index.d.ts +51 -0
  4. package/dist/common/variables.js +298 -90
  5. package/dist/date/Date.js +4 -6
  6. package/dist/{new-date/NewDate.js → date-input/DateInput.js} +69 -72
  7. package/dist/date-input/index.d.ts +95 -0
  8. package/dist/file-input/FileInput.js +644 -0
  9. package/dist/file-input/FileItem.js +280 -0
  10. package/dist/file-input/index.d.ts +81 -0
  11. package/dist/input-text/InputText.js +3 -3
  12. package/dist/layout/ApplicationLayout.js +1 -1
  13. package/dist/link/Link.js +4 -8
  14. package/dist/main.d.ts +8 -0
  15. package/dist/main.js +29 -13
  16. package/dist/new-select/NewSelect.js +836 -0
  17. package/dist/new-select/index.d.ts +53 -0
  18. package/dist/new-textarea/NewTextarea.js +62 -39
  19. package/dist/new-textarea/index.d.ts +117 -0
  20. package/dist/{number/Number.js → number-input/NumberInput.js} +9 -11
  21. package/dist/{number/NumberContext.js → number-input/NumberInputContext.js} +2 -2
  22. package/dist/number-input/index.d.ts +113 -0
  23. package/dist/{password/Password.js → password-input/PasswordInput.js} +11 -13
  24. package/dist/password-input/index.d.ts +94 -0
  25. package/dist/progress-bar/ProgressBar.js +1 -1
  26. package/dist/select/Select.js +122 -158
  27. package/dist/sidenav/Sidenav.js +6 -4
  28. package/dist/slider/Slider.js +89 -14
  29. package/dist/tag/Tag.js +26 -32
  30. package/dist/{new-input-text/NewInputText.js → text-input/TextInput.js} +180 -170
  31. package/dist/text-input/index.d.ts +135 -0
  32. package/dist/toggle-group/ToggleGroup.js +132 -28
  33. package/package.json +2 -1
  34. package/test/{NewDate.test.js → DateInput.test.js} +66 -27
  35. package/test/FileInput.test.js +201 -0
  36. package/test/InputText.test.js +24 -16
  37. package/test/NewTextarea.test.js +95 -101
  38. package/test/{Number.test.js → NumberInput.test.js} +84 -66
  39. package/test/Paginator.test.js +1 -1
  40. package/test/PasswordInput.test.js +83 -0
  41. package/test/ResultsetTable.test.js +1 -2
  42. package/test/Select.test.js +40 -17
  43. package/test/{NewInputText.test.js → TextInput.test.js} +146 -231
  44. package/test/ToggleGroup.test.js +5 -1
  45. package/dist/footer/Footer.stories.js +0 -94
  46. package/dist/input-text/InputText.stories.js +0 -209
  47. package/dist/password/styles.css +0 -3
  48. package/dist/select/Select.stories.js +0 -235
  49. package/dist/select/readme.md +0 -72
  50. package/dist/slider/Slider.stories.js +0 -241
  51. package/test/Password.test.js +0 -76
@@ -0,0 +1,94 @@
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 password.
13
+ */
14
+ label?: string;
15
+ /**
16
+ * Name attribute of the input element.
17
+ */
18
+ name?: string;
19
+ /**
20
+ * Value of the input element. If undefined, the component will be uncontrolled and the value will be managed internally by the component.
21
+ */
22
+ value?: string;
23
+ /**
24
+ * Helper text to be placed above the password.
25
+ */
26
+ helperText?: string;
27
+ /**
28
+ * If true, the password input will have an action to clear the entered value.
29
+ */
30
+ clearable?: boolean;
31
+ /**
32
+ * This function will be called when the user types within the input
33
+ * element of the component. An object including the current value and
34
+ * the error (if the value entered is not valid) will be passed to this
35
+ * function. If there is no error, error will be null.
36
+ * */
37
+ onChange?: (val: { value: string; error: string }) => void;
38
+ /**
39
+ * This function will be called when the input element loses the focus.
40
+ * An object including the input value and the error (if the value entered is
41
+ * not valid) will be passed to this function. If there is no error, error will be null.
42
+ */
43
+ onBlur?: (val: { value: string; error: string }) => void;
44
+ /**
45
+ * If it is defined, the component will change its appearance, showing
46
+ * the error below the password input component. If it is not defined, the
47
+ * error messages will be managed internally, but never displayed on its own.
48
+ */
49
+ error?: string;
50
+ /**
51
+ * Regular expression that defines the valid format allowed by the
52
+ * password input. This will be checked both when the input element loses the
53
+ * focus and while typing within it. If the string entered does not match
54
+ * the pattern, the onBlur and onChange functions will be called with the
55
+ * current value and an internal error informing that this value does not
56
+ * match the pattern. If the pattern is met, the error parameter of both
57
+ * events will be null.
58
+ */
59
+ pattern?: string;
60
+ /**
61
+ * Specifies the minimun and maximum length allowed by the password input.
62
+ * This will be checked both when the input element loses the
63
+ * focus and while typing within it. If the string entered does not
64
+ * comply the length, the onBlur and onChange functions will be called
65
+ * with the current value and an internal error informing that the value
66
+ * length does not comply the specified range. If a valid length is
67
+ * reached, the error parameter of both events will be null.
68
+ */
69
+ length?: { min?: number; max?: number };
70
+ /**
71
+ * HTML autocomplete attribute. Lets the user specify if any permission the user agent has to provide automated assistance in filling out the input value.
72
+ * Its value must be one of all the possible values of the HTML autocomplete attribute: 'on', 'off', 'email', 'username', 'new-password', ...
73
+ */
74
+ autocomplete?: string;
75
+ /**
76
+ * Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
77
+ * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
78
+ */
79
+ margin?: Space | Margin;
80
+ /**
81
+ * Size of the component ('small' | 'medium' | 'large' | 'fillParent').
82
+ */
83
+ size?: Size;
84
+ /**
85
+ * Value of the tabindex attribute.
86
+ */
87
+ tabIndex?: number;
88
+ /**
89
+ * Reference to the component.
90
+ */
91
+ ref?: React.RefObject<HTMLDivElement>;
92
+ };
93
+
94
+ export default function DxcPasswordInput(props: Props): JSX.Element;
@@ -80,7 +80,7 @@ function _templateObject2() {
80
80
  }
81
81
 
82
82
  function _templateObject() {
83
- var data = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n opacity: ", ";\n width: ", ";\n display: flex;\n flex-wrap: wrap;\n justify-content: ", ";\n height: ", ";\n align-items: ", ";\n min-width: 100px;\n max-width: ", ";\n position: ", ";\n top: ", ";\n bottom: ", ";\n left: ", ";\n right: ", ";\n z-index: ", ";\n"]);
83
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n opacity: ", ";\n width: ", ";\n display: flex;\n flex-wrap: wrap;\n justify-content: ", ";\n height: ", ";\n align-items: ", ";\n min-width: 100px;\n max-width: ", ";\n position: ", ";\n top: ", ";\n bottom: ", ";\n left: ", ";\n right: ", ";\n z-index: ", ";\n width: 100%;\n"]);
84
84
 
85
85
  _templateObject = function _templateObject() {
86
86
  return data;
@@ -15,8 +15,6 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
15
15
 
16
16
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
17
17
 
18
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
19
-
20
18
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
21
19
 
22
20
  var _react = _interopRequireWildcard(require("react"));
@@ -33,8 +31,6 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
33
31
 
34
32
  var _MenuItem = _interopRequireDefault(require("@material-ui/core/MenuItem"));
35
33
 
36
- var _styles = require("@material-ui/core/styles");
37
-
38
34
  var _propTypes = _interopRequireDefault(require("prop-types"));
39
35
 
40
36
  var _Checkbox = _interopRequireDefault(require("../checkbox/Checkbox"));
@@ -49,8 +45,28 @@ var _RequiredComponent = _interopRequireDefault(require("../common/RequiredCompo
49
45
 
50
46
  var _BackgroundColorContext = _interopRequireWildcard(require("../BackgroundColorContext.js"));
51
47
 
48
+ function _templateObject10() {
49
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n display: inline-block;\n\n .MuiFormControl-root {\n width: 100%;\n }\n\n .MuiFormHelperText-root {\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n margin-top: 6px;\n\n &.Mui-disabled {\n color: ", ";\n cursor: not-allowed;\n }\n }\n\n .MuiFormLabel-root {\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n margin-top: -3px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n height: 22px;\n display: flex;\n align-items: center;\n\n &.Mui-disabled {\n color: ", ";\n }\n &.Mui-focused {\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n }\n }\n\n .MuiSelect-select.MuiSelect-select {\n padding-right: unset;\n }\n\n .MuiSelect-select {\n width: 100%;\n height: 20px;\n display: flex;\n padding-right: 10px;\n align-items: center;\n\n :focus {\n background-color: transparent;\n outline: ", "\n auto 2px;\n }\n & > *:last-child::after {\n content: unset;\n }\n & > *:last-child::before {\n content: unset;\n }\n &.Mui-disabled {\n color: ", ";\n cursor: not-allowed;\n &:focus {\n outline: none;\n }\n }\n }\n .MuiInputBase-input {\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n }\n .MuiInput-underline {\n &.Mui-focused {\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n }\n &.Mui-disabled:before {\n border-bottom-style: solid;\n }\n }\n .MuiInput-underline:hover:not(.Mui-disabled):before {\n border-bottom: ", " solid;\n border-bottom-color: ", ";\n }\n .MuiInput-underline:after {\n border-bottom: ", " solid;\n border-bottom-color: ", ";\n }\n .MuiInput-underline:before {\n border-bottom: ", " solid;\n border-bottom-color: ", ";\n }\n .MuiSelect-icon {\n color: ", " !important;\n }\n & label {\n text-overflow: ellipsis;\n overflow: hidden;\n width: calc(100% - 24px);\n }\n\n .MuiMenu-paper {\n background-color: ", ";\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.3);\n min-width: auto;\n width: auto;\n max-height: 250px;\n border-color: ", ";\n border-width: ", ";\n border-style: ", ";\n\n &::-webkit-scrollbar {\n width: 3px;\n margin: 5px;\n }\n &::-webkit-scrollbar-track {\n border-radius: 3px;\n background-color: ", ";\n }\n &::-webkit-scrollbar-thumb {\n border-radius: 3px;\n background-color: ", ";\n }\n }\n .MuiList-root {\n width: auto !important;\n padding-right: 0 !important;\n }\n .MuiList-padding {\n padding-bottom: 0px;\n padding-top: 0px;\n }\n .MuiMenuItem-root {\n padding-bottom: ", ";\n padding-top: ", ";\n\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n &:focus {\n outline: ", "\n auto 2px;\n outline-offset: -1px;\n }\n &.MuiListItem-root.Mui-selected {\n background-color: ", ";\n }\n & span.MuiButtonBase-root {\n // multiple checkbox\n padding: 0px;\n margin: 5px 0px;\n }\n }\n"]);
50
+
51
+ _templateObject10 = function _templateObject10() {
52
+ return data;
53
+ };
54
+
55
+ return data;
56
+ }
57
+
58
+ function _templateObject9() {
59
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n width: ", ";\n height: ", ";\n margin-left: ", ";\n margin-right: ", ";\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
60
+
61
+ _templateObject9 = function _templateObject9() {
62
+ return data;
63
+ };
64
+
65
+ return data;
66
+ }
67
+
52
68
  function _templateObject8() {
53
- var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n display: inline-block;\n\n .MuiFormControl-root {\n width: 100%;\n }\n\n .MuiFormHelperText-root {\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n margin-top: 6px;\n\n &.Mui-disabled {\n color: ", ";\n cursor: not-allowed;\n }\n }\n\n .MuiFormLabel-root {\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n margin-top: -3px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n height: 22px;\n display: flex;\n align-items: center;\n\n &.Mui-disabled {\n color: ", ";\n }\n &.Mui-focused {\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n }\n }\n\n .MuiSelect-select.MuiSelect-select {\n padding-right: unset;\n }\n\n .MuiSelect-select {\n width: 100%;\n height: 20px;\n display: flex;\n padding-right: 10px;\n align-items: center;\n :focus {\n background-color: transparent;\n outline: ", "\n auto 1px;\n }\n & > *:last-child::after {\n content: unset;\n }\n & > *:last-child::before {\n content: unset;\n }\n &.Mui-disabled {\n color: ", ";\n cursor: not-allowed;\n &:focus {\n outline: none;\n }\n }\n }\n .MuiInputBase-input {\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n\n svg {\n color: ", ";\n }\n }\n .MuiInput-underline {\n &.Mui-focused {\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n }\n &.Mui-disabled:before {\n border-bottom-style: solid;\n }\n }\n .MuiInput-underline:hover:not(.Mui-disabled):before {\n border-bottom: ", " solid;\n border-bottom-color: ", ";\n }\n .MuiInput-underline:after {\n border-bottom: ", " solid;\n border-bottom-color: ", ";\n }\n .MuiInput-underline:before {\n border-bottom: ", " solid;\n border-bottom-color: ", ";\n }\n .MuiSelect-icon {\n color: ", " !important;\n }\n & label {\n text-overflow: ellipsis;\n overflow: hidden;\n width: calc(100% - 24px);\n }\n"]);
69
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n margin-left: ", ";\n margin-right: ", ";\n"]);
54
70
 
55
71
  _templateObject8 = function _templateObject8() {
56
72
  return data;
@@ -60,7 +76,7 @@ function _templateObject8() {
60
76
  }
61
77
 
62
78
  function _templateObject7() {
63
- var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n width: ", ";\n height: ", ";\n margin-left: ", ";\n margin-right: ", ";\n overflow: hidden;\n opacity: ", ";\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
79
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n"]);
64
80
 
65
81
  _templateObject7 = function _templateObject7() {
66
82
  return data;
@@ -70,7 +86,7 @@ function _templateObject7() {
70
86
  }
71
87
 
72
88
  function _templateObject6() {
73
- var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n margin-left: ", ";\n margin-right: ", ";\n"]);
89
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: ", ";\n justify-content: ", ";\n margin-right: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n width: ", ";\n\n &::before {\n margin: 0 4px;\n ", ";\n }\n &::after {\n margin: 0 4px;\n ", ";\n }\n"]);
74
90
 
75
91
  _templateObject6 = function _templateObject6() {
76
92
  return data;
@@ -80,7 +96,7 @@ function _templateObject6() {
80
96
  }
81
97
 
82
98
  function _templateObject5() {
83
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n display: flex;\n align-items: center;\n flex-direction: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n ", "\n"]);
99
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n"]);
84
100
 
85
101
  _templateObject5 = function _templateObject5() {
86
102
  return data;
@@ -90,7 +106,7 @@ function _templateObject5() {
90
106
  }
91
107
 
92
108
  function _templateObject4() {
93
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n margin-left: ", ";\n margin-right: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n"]);
109
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n margin-left: ", ";\n margin-right: ", ";\n"]);
94
110
 
95
111
  _templateObject4 = function _templateObject4() {
96
112
  return data;
@@ -100,7 +116,7 @@ function _templateObject4() {
100
116
  }
101
117
 
102
118
  function _templateObject3() {
103
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: ", ";\n justify-content: ", ";\n margin-right: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n width: ", ";\n\n &::before {\n margin: 0 4px;\n ", ";\n }\n &::after {\n margin: 0 4px;\n ", ";\n }\n"]);
119
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n width: ", ";\n height: ", ";\n margin-left: ", ";\n margin-right: ", ";\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
104
120
 
105
121
  _templateObject3 = function _templateObject3() {
106
122
  return data;
@@ -110,7 +126,7 @@ function _templateObject3() {
110
126
  }
111
127
 
112
128
  function _templateObject2() {
113
- var data = (0, _taggedTemplateLiteral2["default"])(["\n overflow: hidden;\n text-overflow: ellipsis;\n color: ", ";\n"]);
129
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n display: flex;\n align-items: center;\n flex-direction: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n ", "\n"]);
114
130
 
115
131
  _templateObject2 = function _templateObject2() {
116
132
  return data;
@@ -129,93 +145,6 @@ function _templateObject() {
129
145
  return data;
130
146
  }
131
147
 
132
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
133
-
134
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
135
-
136
- var useStyles = (0, _styles.makeStyles)(function () {
137
- return {
138
- root: function root(props) {
139
- return {
140
- minWidth: props.width
141
- };
142
- },
143
- dropdownStyle: function dropdownStyle(props) {
144
- return {
145
- backgroundColor: props.optionBackgroundColor,
146
- boxShadow: "0px 2px 10px 0px rgba(0, 0, 0, 0.3)",
147
- minWidth: props.width,
148
- width: props.width,
149
- maxHeight: "250px",
150
- borderColor: props.optionBorderColor,
151
- borderWidth: props.optionBorderThickness,
152
- borderStyle: props.optionBorderStyle,
153
- "&::-webkit-scrollbar": {
154
- width: "3px",
155
- margin: "5px"
156
- },
157
- "&::-webkit-scrollbar-track": {
158
- borderRadius: "3px",
159
- backgroundColor: props.scrollBarTrackColor
160
- },
161
- "&::-webkit-scrollbar-thumb": {
162
- borderRadius: "3px",
163
- backgroundColor: props.scrollBarThumbColor
164
- },
165
- "& .MuiList-root": {
166
- width: "auto !important",
167
- paddingRight: "0 !important"
168
- }
169
- };
170
- },
171
- itemList: function itemList(props) {
172
- return {
173
- "&.MuiList-padding": {
174
- paddingBottom: "0px",
175
- paddingTop: "0px"
176
- },
177
- "& li": {
178
- fontSize: props.optionFontSize,
179
- fontStyle: props.optionFontStyle,
180
- fontWeight: props.optionFontWeight,
181
- paddingBottom: props.optionPaddingBottom,
182
- paddingTop: props.optionPaddingTop,
183
- "&:hover": {
184
- backgroundColor: "".concat(props.backgroundType === "dark" ? props.hoverOptionBackgroundColorOnDark : props.hoverOptionBackgroundColor, " !important"),
185
- color: "".concat(props.optionFontColor)
186
- },
187
- "&:active": {
188
- backgroundColor: "".concat(props.backgroundType === "dark" ? props.activeOptionBackgroundColorOnDark : props.activeOptionBackgroundColor, " !important")
189
- },
190
- "&:focus": {
191
- outline: "".concat(props.backgroundType === "dark" ? props.focusColorOnDark : props.focusColor, " auto 2px")
192
- },
193
- "&.MuiListItem-root.Mui-selected": {
194
- backgroundColor: "".concat(props.backgroundType === "dark" ? props.selectedOptionBackgroundColorOnDark : props.selectedOptionBackgroundColor, " !important")
195
- },
196
- "&.MuiListItem-root.Mui-focusVisible": {
197
- backgroundColor: "unset"
198
- },
199
- "& span.MuiButtonBase-root": {
200
- padding: "0px",
201
- margin: "5px 0px",
202
- "& span.MuiIconButton-label > svg": {
203
- width: "26px",
204
- height: "26px"
205
- },
206
- "&:hover": {
207
- color: "".concat(props.backgroundType === "dark" ? props.borderColorOnDark : props.borderColor)
208
- },
209
- "&.Mui-checked:hover": {
210
- color: "".concat(props.backgroundType === "dark" ? props.backgroundColorCheckedOnDark : props.backgroundColorChecked)
211
- }
212
- }
213
- }
214
- };
215
- }
216
- };
217
- });
218
-
219
148
  var DxcSelect = function DxcSelect(_ref) {
220
149
  var value = _ref.value,
221
150
  name = _ref.name,
@@ -247,14 +176,6 @@ var DxcSelect = function DxcSelect(_ref) {
247
176
  selectedValue = _useState2[0],
248
177
  setSelectedValue = _useState2[1];
249
178
 
250
- var selectValues = _objectSpread({
251
- width: "auto"
252
- }, colorsTheme.select, {}, colorsTheme.checkbox, {
253
- backgroundType: backgroundType
254
- });
255
-
256
- var classes = useStyles(selectValues);
257
-
258
179
  var handleSelectChange = function handleSelectChange(selectedOption) {
259
180
  if (multiple) {
260
181
  setSelectedValue(selectedOption.target.value);
@@ -275,16 +196,21 @@ var DxcSelect = function DxcSelect(_ref) {
275
196
  var selectedItem = options.filter(function (option) {
276
197
  return option.value === selected;
277
198
  })[0];
278
- return _react["default"].createElement(SelectedIconContainer, {
199
+ return _react["default"].createElement(SelectedOptionContainer, {
279
200
  iconPosition: iconPosition,
280
201
  multiple: multiple,
281
202
  label: selectedItem && selectedItem.label,
282
203
  key: selectedItem && selectedItem.label
283
- }, selectedItem && selectedItem.icon ? _react["default"].createElement(ListIconContainer, {
284
- disabled: disabled
285
- }, (0, _typeof2["default"])(selectedItem.icon) === "object" ? selectedItem.icon : _react["default"].createElement(selectedItem.icon)) : selectedItem && selectedItem.iconSrc && _react["default"].createElement(ListIcon, {
286
- src: selectedItem && selectedItem.iconSrc
287
- }), selectedItem && selectedItem.label && _react["default"].createElement(SelectedLabelContainer, {
204
+ }, selectedItem && selectedItem.icon ? _react["default"].createElement(SelectedOptionIconContainer, {
205
+ backgroundType: backgroundType,
206
+ disabled: disabled,
207
+ label: selectedItem.label,
208
+ iconPosition: iconPosition
209
+ }, (0, _typeof2["default"])(selectedItem.icon) === "object" ? selectedItem.icon : _react["default"].createElement(selectedItem.icon)) : selectedItem && selectedItem.iconSrc && _react["default"].createElement(SelectedOptionIcon, {
210
+ src: selectedItem && selectedItem.iconSrc,
211
+ label: selectedItem.label,
212
+ iconPosition: iconPosition
213
+ }), selectedItem && selectedItem.label && _react["default"].createElement(SelectedOptionLabelContainer, {
288
214
  iconSrc: selectedItem && selectedItem.iconSrc && selectedItem.icon,
289
215
  iconPosition: iconPosition,
290
216
  disabled: disabled
@@ -300,7 +226,7 @@ var DxcSelect = function DxcSelect(_ref) {
300
226
  };
301
227
 
302
228
  var getSelectedValuesWithIcons = function getSelectedValuesWithIcons(optionsList, selected) {
303
- return options.filter(function (x) {
229
+ return optionsList.filter(function (x) {
304
230
  return selected.includes(x.value);
305
231
  }).map(function (optionToRender) {
306
232
  return getLabelForSingleSelect(optionToRender.value);
@@ -339,18 +265,19 @@ var DxcSelect = function DxcSelect(_ref) {
339
265
  return _react["default"].createElement(_react["default"].Fragment, null, multiple && _react["default"].createElement(_Checkbox["default"], {
340
266
  size: "fitContent",
341
267
  checked: isChecked(selectedValue, value, option)
342
- }), _react["default"].createElement(OptionContainer, {
268
+ }), _react["default"].createElement(OptionListContainer, {
343
269
  iconPosition: iconPosition,
344
270
  multiple: multiple
345
- }, option.icon ? _react["default"].createElement(ListIconContainer, {
271
+ }, option.icon ? _react["default"].createElement(OptionListIconContainer, {
346
272
  backgroundType: backgroundType,
273
+ disabled: disabled,
347
274
  label: option.label,
348
275
  iconPosition: iconPosition
349
- }, (0, _typeof2["default"])(option.icon) === "object" ? option.icon : _react["default"].createElement(option.icon)) : option.iconSrc && _react["default"].createElement(ListIcon, {
276
+ }, (0, _typeof2["default"])(option.icon) === "object" ? option.icon : _react["default"].createElement(option.icon)) : option.iconSrc && _react["default"].createElement(OptionListIcon, {
350
277
  src: option.iconSrc,
351
278
  label: option.label,
352
279
  iconPosition: iconPosition
353
- }), " ", _react["default"].createElement(LabelContainer, {
280
+ }), " ", _react["default"].createElement(OptionListLabelContainer, {
354
281
  backgroundType: backgroundType
355
282
  }, option.label)));
356
283
  };
@@ -373,15 +300,12 @@ var DxcSelect = function DxcSelect(_ref) {
373
300
  value: value !== undefined ? value : selectedValue,
374
301
  disabled: disabled,
375
302
  MenuProps: {
376
- classes: {
377
- paper: classes.dropdownStyle,
378
- list: classes.itemList
379
- },
380
303
  getContentAnchorEl: null,
381
304
  anchorOrigin: {
382
305
  vertical: "bottom",
383
306
  horizontal: "left"
384
- }
307
+ },
308
+ disablePortal: true
385
309
  },
386
310
  inputProps: {
387
311
  tabIndex: disabled ? -1 : tabIndex
@@ -410,20 +334,52 @@ var sizes = {
410
334
  };
411
335
 
412
336
  var calculateWidth = function calculateWidth(margin, size) {
413
- if (size === "fillParent") {
414
- return "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")");
415
- }
416
-
417
- return sizes[size];
337
+ return size === "fillParent" ? "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")") : sizes[size];
418
338
  };
419
339
 
420
340
  var MultipleLabelSelected = _styledComponents["default"].div(_templateObject());
421
341
 
422
- var LabelContainer = _styledComponents["default"].span(_templateObject2(), function (props) {
342
+ var OptionListContainer = _styledComponents["default"].div(_templateObject2(), function (props) {
343
+ return props.theme.fontFamily;
344
+ }, function (props) {
345
+ return props.iconPosition === "before" && "row" || "row-reverse";
346
+ }, function (props) {
347
+ return props.multiple && "margin-left: ".concat(props.theme.optionCheckboxSpacing, ";");
348
+ });
349
+
350
+ var OptionListIconContainer = _styledComponents["default"].div(_templateObject3(), function (props) {
351
+ return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor : props.backgroundType === "dark" ? props.theme.optionIconColorOnDark : props.theme.optionIconColor;
352
+ }, function (props) {
353
+ return props.theme.optionIconSize;
354
+ }, function (props) {
355
+ return props.theme.optionIconSize;
356
+ }, function (props) {
357
+ return props.iconPosition === "after" && props.label && props.theme.optionIconSpacing || "0px";
358
+ }, function (props) {
359
+ return props.iconPosition === "before" && props.label && props.theme.optionIconSpacing || "0px";
360
+ });
361
+
362
+ var OptionListIcon = _styledComponents["default"].img(_templateObject4(), function (props) {
363
+ return props.theme.optionIconSize;
364
+ }, function (props) {
365
+ return props.theme.optionIconSize;
366
+ }, function (props) {
367
+ return props.iconPosition === "after" && props.label !== "" && props.theme.optionIconSpacing || "0px";
368
+ }, function (props) {
369
+ return props.iconPosition === "before" && props.label !== "" && props.theme.optionIconSpacing || "0px";
370
+ });
371
+
372
+ var OptionListLabelContainer = _styledComponents["default"].span(_templateObject5(), function (props) {
373
+ return props.theme.optionFontSize;
374
+ }, function (props) {
375
+ return props.theme.optionFontStyle;
376
+ }, function (props) {
377
+ return props.theme.optionFontWeight;
378
+ }, function (props) {
423
379
  return props.backgroundType === "dark" ? props.theme.optionFontColorOnDark : props.theme.optionFontColor;
424
380
  });
425
381
 
426
- var SelectedIconContainer = _styledComponents["default"].div(_templateObject3(), function (props) {
382
+ var SelectedOptionContainer = _styledComponents["default"].div(_templateObject6(), function (props) {
427
383
  return props.iconPosition === "before" && "row" || "row-reverse";
428
384
  }, function (props) {
429
385
  return props.iconPosition === "before" && "flex-start" || "flex-end";
@@ -437,47 +393,33 @@ var SelectedIconContainer = _styledComponents["default"].div(_templateObject3(),
437
393
  return props.iconPosition === "before" && (props.label !== "" || props.label === undefined) && "content:','";
438
394
  });
439
395
 
440
- var SelectedLabelContainer = _styledComponents["default"].span(_templateObject4(), function (props) {
441
- return props.theme.fontFamily;
442
- }, function (props) {
443
- return (props.iconPosition === "after" || !props.iconSrc) && "0px" || "10px";
444
- }, function (props) {
445
- return (props.iconPosition === "before" || !props.iconSrc) && "0px" || "10px";
446
- });
447
-
448
- var OptionContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
396
+ var SelectedOptionLabelContainer = _styledComponents["default"].span(_templateObject7(), function (props) {
449
397
  return props.theme.fontFamily;
450
- }, function (props) {
451
- return props.iconPosition === "before" && "row" || "row-reverse";
452
- }, function (props) {
453
- return props.multiple && "margin-left: ".concat(props.theme.optionCheckboxSpacing, ";");
454
398
  });
455
399
 
456
- var ListIcon = _styledComponents["default"].img(_templateObject6(), function (props) {
457
- return props.theme.iconSize;
400
+ var SelectedOptionIcon = _styledComponents["default"].img(_templateObject8(), function (props) {
401
+ return props.theme.valueIconSize;
458
402
  }, function (props) {
459
- return props.theme.iconSize;
403
+ return props.theme.valueIconSize;
460
404
  }, function (props) {
461
- return props.iconPosition === "after" && props.label !== "" && props.theme.optionIconSpacing || "0px";
405
+ return props.iconPosition === "after" && props.label !== "" && props.theme.valueIconSpacing || "0px";
462
406
  }, function (props) {
463
- return props.iconPosition === "before" && props.label !== "" && props.theme.optionIconSpacing || "0px";
407
+ return props.iconPosition === "before" && props.label !== "" && props.theme.valueIconSpacing || "0px";
464
408
  });
465
409
 
466
- var ListIconContainer = _styledComponents["default"].div(_templateObject7(), function (props) {
467
- return props.backgroundType === "dark" ? props.theme.optionIconColorOnDark : props.theme.optionIconColor;
410
+ var SelectedOptionIconContainer = _styledComponents["default"].div(_templateObject9(), function (props) {
411
+ return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor : props.backgroundType === "dark" ? props.theme.valueIconColorOnDark : props.theme.valueIconColor;
468
412
  }, function (props) {
469
- return props.theme.optionIconSize;
413
+ return props.theme.valueIconSize;
470
414
  }, function (props) {
471
- return props.theme.optionIconSize;
472
- }, function (props) {
473
- return props.iconPosition === "after" && props.label !== "" && props.theme.optionIconSpacing || "0px";
415
+ return props.theme.valueIconSize;
474
416
  }, function (props) {
475
- return props.iconPosition === "before" && props.label !== "" && props.theme.optionIconSpacing || "0px";
417
+ return props.iconPosition === "after" && props.label !== "" && props.theme.valueIconSpacing || "0px";
476
418
  }, function (props) {
477
- return props.disabled && "0.34";
419
+ return props.iconPosition === "before" && props.label !== "" && props.theme.valueIconSpacing || "0px";
478
420
  });
479
421
 
480
- var SelectContainer = _styledComponents["default"].div(_templateObject8(), function (props) {
422
+ var SelectContainer = _styledComponents["default"].div(_templateObject10(), function (props) {
481
423
  return calculateWidth(props.margin, props.size);
482
424
  }, function (props) {
483
425
  return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
@@ -533,8 +475,6 @@ var SelectContainer = _styledComponents["default"].div(_templateObject8(), funct
533
475
  return props.theme.valueFontWeight;
534
476
  }, function (props) {
535
477
  return props.backgroundType === "dark" ? props.theme.valueFontColorOnDark : props.theme.valueFontColor;
536
- }, function (props) {
537
- return props.backgroundType === "dark" ? props.theme.optionIconColorOnDark : props.theme.optionIconColor;
538
478
  }, function (props) {
539
479
  return props.theme.underlineThickness;
540
480
  }, function (props) {
@@ -553,6 +493,30 @@ var SelectContainer = _styledComponents["default"].div(_templateObject8(), funct
553
493
  return props.backgroundType === "dark" ? props.invalid === true && props.theme.errorColorOnDark || props.disabled && props.theme.disabledColorOnDark || props.theme.underlineColorOnDark : props.invalid === true && props.theme.errorColor || props.disabled && props.theme.disabledColor || props.theme.underlineColor;
554
494
  }, function (props) {
555
495
  return props.backgroundType === "dark" ? props.disabled && props.theme.disabledColorOnDark || props.theme.arrowColorOnDark : props.disabled && props.theme.disabledColor || props.theme.arrowColor;
496
+ }, function (props) {
497
+ return props.theme.optionBackgroundColor;
498
+ }, function (props) {
499
+ return props.theme.optionBorderColor;
500
+ }, function (props) {
501
+ return props.theme.optionBorderThickness;
502
+ }, function (props) {
503
+ return props.theme.optionBorderStyle;
504
+ }, function (props) {
505
+ return props.theme.scrollBarTrackColor;
506
+ }, function (props) {
507
+ return props.theme.scrollBarThumbColor;
508
+ }, function (props) {
509
+ return props.theme.optionPaddingBottom;
510
+ }, function (props) {
511
+ return props.theme.optionPaddingTop;
512
+ }, function (props) {
513
+ return props.backgroundType === "dark" ? props.theme.hoverOptionBackgroundColorOnDark : props.theme.hoverOptionBackgroundColor;
514
+ }, function (props) {
515
+ return props.backgroundType === "dark" ? props.theme.activeOptionBackgroundColorOnDark : props.theme.activeOptionBackgroundColor;
516
+ }, function (props) {
517
+ return props.backgroundType === "dark" ? props.theme.focusColorOnDark : props.theme.focusColor;
518
+ }, function (props) {
519
+ return props.backgroundType === "dark" ? props.theme.selectedOptionBackgroundColorOnDark : props.theme.selectedOptionBackgroundColor;
556
520
  });
557
521
 
558
522
  DxcSelect.propTypes = {
@@ -26,7 +26,7 @@ var _useTheme = _interopRequireDefault(require("../useTheme.js"));
26
26
  var _BackgroundColorContext = require("../BackgroundColorContext.js");
27
27
 
28
28
  function _templateObject4() {
29
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n letter-spacing: ", ";\n text-transform: ", ";\n text-decoration: ", ";\n margin: ", ";\n cursor: pointer;\n"]);
29
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n letter-spacing: ", ";\n text-transform: ", ";\n text-decoration: ", ";\n margin: ", ";\n cursor: pointer;\n\n :focus-visible {\n outline: 2px solid ", ";\n outline-offset: 1px;\n }\n"]);
30
30
 
31
31
  _templateObject4 = function _templateObject4() {
32
32
  return data;
@@ -36,7 +36,7 @@ function _templateObject4() {
36
36
  }
37
37
 
38
38
  function _templateObject3() {
39
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n letter-spacing: ", ";\n text-transform: ", ";\n margin-top: 15px;\n"]);
39
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n letter-spacing: ", ";\n text-transform: ", ";\n margin-bottom: 4px;\n"]);
40
40
 
41
41
  _templateObject3 = function _templateObject3() {
42
42
  return data;
@@ -46,7 +46,7 @@ function _templateObject3() {
46
46
  }
47
47
 
48
48
  function _templateObject2() {
49
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n letter-spacing: ", ";\n text-transform: ", ";\n margin: 15px 0;\n"]);
49
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n letter-spacing: ", ";\n text-transform: ", ";\n margin-bottom: 16px;\n"]);
50
50
 
51
51
  _templateObject2 = function _templateObject2() {
52
52
  return data;
@@ -56,7 +56,7 @@ function _templateObject2() {
56
56
  }
57
57
 
58
58
  function _templateObject() {
59
- var data = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n max-width: 300px;\n width: ", ";\n padding: ", ";\n\n overflow-y: auto;\n overflow-x: hidden;\n ::-webkit-scrollbar {\n width: 2px;\n }\n ::-webkit-scrollbar-track {\n background-color: ", ";\n border-radius: 3px;\n }\n ::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 3px;\n }\n display: flex;\n flex-direction: column;\n"]);
59
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n background-color: ", ";\n max-width: 300px;\n width: ", ";\n padding: ", ";\n\n overflow-y: auto;\n overflow-x: hidden;\n ::-webkit-scrollbar {\n width: 2px;\n }\n ::-webkit-scrollbar-track {\n background-color: ", ";\n border-radius: 3px;\n }\n ::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 3px;\n }\n"]);
60
60
 
61
61
  _templateObject = function _templateObject() {
62
62
  return data;
@@ -160,6 +160,8 @@ var SideNavMenuLink = _styledComponents["default"].a(_templateObject4(), functio
160
160
  return props.theme.linkTextDecoration;
161
161
  }, function (props) {
162
162
  return "".concat(props.theme.linkMarginTop, " ").concat(props.theme.linkMarginRight, " ").concat(props.theme.linkMarginBottom, " ").concat(props.theme.linkMarginLeft);
163
+ }, function (props) {
164
+ return props.theme.linkFocusColor;
163
165
  });
164
166
 
165
167
  DxcSidenav.propTypes = {