@dxc-technology/halstack-react 0.0.0-254aa9f → 0.0.0-2787eec

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 (139) hide show
  1. package/README.md +66 -0
  2. package/babel.config.js +6 -2
  3. package/dist/BackgroundColorContext.js +46 -0
  4. package/dist/ThemeContext.js +235 -2
  5. package/dist/accordion/Accordion.js +170 -81
  6. package/dist/accordion-group/AccordionGroup.js +186 -0
  7. package/dist/alert/Alert.js +184 -83
  8. package/dist/alert/index.d.ts +51 -0
  9. package/dist/badge/Badge.js +63 -0
  10. package/dist/box/Box.js +39 -19
  11. package/dist/button/Button.js +91 -40
  12. package/dist/card/Card.js +64 -56
  13. package/dist/checkbox/Checkbox.js +118 -39
  14. package/dist/checkbox/readme.md +2 -2
  15. package/dist/chip/Chip.js +265 -0
  16. package/dist/common/RequiredComponent.js +5 -15
  17. package/dist/common/variables.js +1502 -10
  18. package/dist/date/Date.js +110 -76
  19. package/dist/date-input/DateInput.js +400 -0
  20. package/dist/date-input/index.d.ts +95 -0
  21. package/dist/dialog/Dialog.js +87 -33
  22. package/dist/dropdown/Dropdown.js +226 -94
  23. package/dist/file-input/FileInput.js +644 -0
  24. package/dist/file-input/FileItem.js +280 -0
  25. package/dist/file-input/index.d.ts +81 -0
  26. package/dist/footer/Footer.js +90 -36
  27. package/dist/footer/dxc_logo.svg +15 -0
  28. package/dist/footer/readme.md +1 -1
  29. package/dist/header/Header.js +136 -73
  30. package/dist/header/dxc_logo_black.svg +8 -0
  31. package/dist/header/readme.md +1 -1
  32. package/dist/heading/Heading.js +81 -22
  33. package/dist/input-text/InputText.js +299 -101
  34. package/dist/layout/ApplicationLayout.js +331 -0
  35. package/dist/layout/facebook.svg +45 -0
  36. package/dist/layout/linkedin.svg +50 -0
  37. package/dist/layout/twitter.svg +53 -0
  38. package/dist/link/Link.js +142 -34
  39. package/dist/main.d.ts +8 -0
  40. package/dist/main.js +113 -9
  41. package/dist/new-select/NewSelect.js +836 -0
  42. package/dist/new-select/index.d.ts +53 -0
  43. package/dist/new-textarea/NewTextarea.js +369 -0
  44. package/dist/new-textarea/index.d.ts +117 -0
  45. package/dist/number-input/NumberInput.js +136 -0
  46. package/dist/number-input/NumberInputContext.js +16 -0
  47. package/dist/number-input/index.d.ts +113 -0
  48. package/dist/paginator/Paginator.js +163 -52
  49. package/dist/password-input/PasswordInput.js +198 -0
  50. package/dist/password-input/index.d.ts +94 -0
  51. package/dist/progress-bar/ProgressBar.js +97 -44
  52. package/dist/progress-bar/readme.md +2 -2
  53. package/dist/radio/Radio.js +39 -34
  54. package/dist/radio/readme.md +1 -1
  55. package/dist/resultsetTable/ResultsetTable.js +99 -71
  56. package/dist/select/Select.js +254 -130
  57. package/dist/sidenav/Sidenav.js +87 -125
  58. package/dist/slider/Slider.js +206 -80
  59. package/dist/slider/readme.md +1 -1
  60. package/dist/spinner/Spinner.js +249 -64
  61. package/dist/spinner/readme.md +2 -2
  62. package/dist/switch/Switch.js +54 -51
  63. package/dist/switch/readme.md +2 -2
  64. package/dist/table/Table.js +63 -15
  65. package/dist/tabs/Tabs.js +210 -50
  66. package/dist/tabs-for-sections/TabsForSections.js +1 -16
  67. package/dist/tag/Tag.js +100 -35
  68. package/dist/text-input/TextInput.js +971 -0
  69. package/dist/text-input/index.d.ts +135 -0
  70. package/dist/textarea/Textarea.js +81 -43
  71. package/dist/toggle/Toggle.js +16 -19
  72. package/dist/toggle/readme.md +2 -2
  73. package/dist/toggle-group/ToggleGroup.js +327 -0
  74. package/dist/upload/Upload.js +13 -8
  75. package/dist/upload/buttons-upload/ButtonsUpload.js +34 -20
  76. package/dist/upload/dragAndDropArea/DragAndDropArea.js +78 -31
  77. package/dist/upload/file-upload/FileToUpload.js +50 -24
  78. package/dist/upload/files-upload/FilesToUpload.js +16 -16
  79. package/dist/upload/readme.md +2 -2
  80. package/dist/upload/transaction/Transaction.js +44 -24
  81. package/dist/upload/transactions/Transactions.js +38 -20
  82. package/dist/useTheme.js +22 -0
  83. package/dist/wizard/Wizard.js +156 -55
  84. package/dist/wizard/invalid_icon.svg +4 -5
  85. package/dist/wizard/valid_icon.svg +4 -5
  86. package/package.json +20 -9
  87. package/test/AccordionGroup.test.js +125 -0
  88. package/test/Chip.test.js +25 -0
  89. package/test/Date.test.js +13 -13
  90. package/test/DateInput.test.js +242 -0
  91. package/test/Dropdown.test.js +19 -4
  92. package/test/FileInput.test.js +201 -0
  93. package/test/Header.test.js +2 -10
  94. package/test/InputText.test.js +30 -26
  95. package/test/Link.test.js +25 -7
  96. package/test/NewTextarea.test.js +195 -0
  97. package/test/NumberInput.test.js +259 -0
  98. package/test/Paginator.test.js +72 -60
  99. package/test/PasswordInput.test.js +83 -0
  100. package/test/ResultsetTable.test.js +66 -19
  101. package/test/Select.test.js +55 -34
  102. package/test/Sidenav.test.js +22 -64
  103. package/test/Slider.test.js +17 -0
  104. package/test/Spinner.test.js +5 -0
  105. package/test/Tabs.test.js +21 -0
  106. package/test/TextInput.test.js +732 -0
  107. package/test/ToggleGroup.test.js +85 -0
  108. package/dist/accordion/Accordion.stories.js +0 -207
  109. package/dist/accordion/readme.md +0 -96
  110. package/dist/alert/Alert.stories.js +0 -158
  111. package/dist/alert/close.svg +0 -4
  112. package/dist/alert/error.svg +0 -4
  113. package/dist/alert/info.svg +0 -4
  114. package/dist/alert/readme.md +0 -43
  115. package/dist/alert/success.svg +0 -4
  116. package/dist/alert/warning.svg +0 -4
  117. package/dist/button/Button.stories.js +0 -224
  118. package/dist/button/readme.md +0 -93
  119. package/dist/common/services/example-service.js +0 -10
  120. package/dist/common/services/example-service.test.js +0 -12
  121. package/dist/date/calendar.svg +0 -1
  122. package/dist/date/calendar_dark.svg +0 -1
  123. package/dist/dialog/Dialog.stories.js +0 -217
  124. package/dist/dialog/readme.md +0 -32
  125. package/dist/dropdown/Dropdown.stories.js +0 -249
  126. package/dist/dropdown/baseline-arrow_drop_down.svg +0 -1
  127. package/dist/dropdown/baseline-arrow_drop_down_wh.svg +0 -4
  128. package/dist/dropdown/baseline-arrow_drop_up.svg +0 -1
  129. package/dist/dropdown/baseline-arrow_drop_up_wh.svg +0 -4
  130. package/dist/dropdown/readme.md +0 -69
  131. package/dist/footer/Footer.stories.js +0 -94
  132. package/dist/footer/dxc_logo_wht.png +0 -0
  133. package/dist/header/dxc_logo_black.png +0 -0
  134. package/dist/header/dxc_logo_white.png +0 -0
  135. package/dist/input-text/InputText.stories.js +0 -209
  136. package/dist/select/Select.stories.js +0 -235
  137. package/dist/select/readme.md +0 -72
  138. package/dist/sidenav/arrow_icon.svg +0 -3
  139. package/test/Toggle.test.js +0 -43
@@ -11,10 +11,10 @@ exports["default"] = void 0;
11
11
 
12
12
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
13
13
 
14
- var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
15
-
16
14
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
17
15
 
16
+ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
17
+
18
18
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
19
19
 
20
20
  var _react = _interopRequireWildcard(require("react"));
@@ -31,20 +31,62 @@ var _MenuItem = _interopRequireDefault(require("@material-ui/core/MenuItem"));
31
31
 
32
32
  var _propTypes = _interopRequireDefault(require("prop-types"));
33
33
 
34
- require("../common/OpenSans.css");
35
-
36
34
  var _Popper = _interopRequireDefault(require("@material-ui/core/Popper"));
37
35
 
36
+ var _RequiredComponent = _interopRequireDefault(require("../common/RequiredComponent"));
37
+
38
38
  var _variables = require("../common/variables.js");
39
39
 
40
40
  var _utils = require("../common/utils.js");
41
41
 
42
- var _ThemeContext = _interopRequireDefault(require("../ThemeContext.js"));
42
+ var _useTheme = _interopRequireDefault(require("../useTheme.js"));
43
43
 
44
44
  var _error = _interopRequireDefault(require("./error.svg"));
45
45
 
46
+ var _BackgroundColorContext = _interopRequireWildcard(require("../BackgroundColorContext.js"));
47
+
48
+ function _templateObject10() {
49
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n display: inline-block;\n position: relative;\n height: auto;\n width: ", ";\n\n .MuiTextField-root {\n width: 100%;\n font-family: ", ";\n\n .MuiFormHelperText-root {\n font-weight: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n color: ", " !important;\n margin-top: 6px;\n }\n\n .MuiFormLabel-root {\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n padding-left: ", ";\n\n &.Mui-disabled {\n color: ", " !important;\n cursor: not-allowed;\n }\n\n &.Mui-focused {\n color: ", ";\n &.MuiInputLabel-shrink {\n transform: ", ";\n }\n }\n\n &.MuiInputLabel-shrink {\n font-family: ", ";\n\n transform: ", ";\n }\n\n &.Mui-error {\n color: ", ";\n }\n\n &:not(.MuiInputLabel-shrink) {\n font-family: ", ";\n color: ", ";\n\n & + div,\n & + div + p {\n color: ", ";\n }\n }\n\n &.MuiInputLabel-shrink {\n & + div::before {\n border-color: ", ";\n }\n & + div + p {\n color: ", ";\n }\n }\n }\n\n .MuiInputBase-root.MuiInput-root.MuiInput-underline {\n font-family: ", ";\n\n &::before {\n border-bottom: ", ";\n }\n\n &:not(.Mui-error)::before,\n &:not(&.Mui-focused)::before {\n border-bottom: ", ";\n }\n\n &::after {\n border-bottom: ", ";\n }\n\n &.Mui-error {\n &::before {\n border-width: ", ";\n border-color: ", ";\n }\n &::after {\n transform: scaleX(0);\n }\n }\n\n &.Mui-focused {\n &::after {\n border-width: calc(", " + 1px);\n border-color: ", ";\n }\n &.Mui-error::after {\n border-color: ", ";\n }\n }\n\n &.Mui-disabled {\n cursor: not-allowed;\n\n &::before {\n border-bottom: ", ";\n border-bottom-style: solid;\n }\n }\n\n .MuiInputBase-input {\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n padding-left: ", ";\n text-overflow: ellipsis;\n\n &.Mui-disabled {\n color: ", " !important;\n cursor: not-allowed;\n }\n }\n\n .MuiInputAdornment-root {\n height: 20px;\n\n &.MuiInputAdornment-positionEnd {\n & > p {\n font-family: ", ";\n margin-right: 8px;\n margin-bottom: 1px;\n }\n }\n &.Mui-disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n }\n\n &:hover:not(.Mui-disabled):before &:hover:not(.Mui-error):before {\n border-bottom-color: ", ";\n }\n }\n\n & > p {\n &.Mui-error {\n color: ", " !important;\n }\n &.Mui-disabled {\n color: ", " !important;\n cursor: not-allowed;\n }\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 ", ";\n font-weight: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n color: ", ";\n"]);
60
+
61
+ _templateObject9 = function _templateObject9() {
62
+ return data;
63
+ };
64
+
65
+ return data;
66
+ }
67
+
68
+ function _templateObject8() {
69
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n top: 23px;\n left: 0;\n max-height: 20px;\n max-width: 20px;\n color: ", ";\n margin-right: 8px;\n width: 20px;\n opacity: ", ";\n ", ";\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
70
+
71
+ _templateObject8 = function _templateObject8() {
72
+ return data;
73
+ };
74
+
75
+ return data;
76
+ }
77
+
78
+ function _templateObject7() {
79
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n top: 23px;\n left: 0;\n max-height: 20px;\n max-width: 20px;\n margin-right: 8px;\n width: 20px;\n opacity: ", ";\n ", ";\n"]);
80
+
81
+ _templateObject7 = function _templateObject7() {
82
+ return data;
83
+ };
84
+
85
+ return data;
86
+ }
87
+
46
88
  function _templateObject6() {
47
- var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n \n display: inline-block;\n position: relative;\n height: auto;\n width: ", ";\n .MuiTextField-root {\n width: 100%;\n font-family: \"Open Sans\", sans-serif;\n .MuiFormHelperText-root {\n font-family: \"Open Sans\", sans-serif;\n margin-top: 6px;\n }\n .MuiFormLabel-root {\n font-size: 16px;\n color: ", ";\n &::before {\n content:'", "';\n color: ", ";\n font-size: 16px; \n }\n &.Mui-disabled{\n opacity:0.5;\n }\n padding-left: ", ";\n &.Mui-focused {\n color: ", ";\n &.MuiInputLabel-shrink {\n transform: ", ";\n }\n }\n &.Mui-disabled {\n color: ", ";\n cursor: not-allowed;\n }\n &.MuiInputLabel-shrink {\n font-family: \"Open Sans\", sans-serif;\n transform: ", ";\n }\n &.Mui-error {\n color: ", ";\n }\n\n &:not(.MuiInputLabel-shrink) {\n font-family: \"Open Sans\", sans-serif;\n color: ", ";\n & + div, & + div + p {\n color: ", ";\n }\n }\n\n &.MuiInputLabel-shrink {\n & + div::before {\n border-color: ", ";\n }\n & + div + p {\n color: ", ";\n }\n \n }\n }\n .MuiInputBase-root.MuiInput-root.MuiInput-underline {\n font-family: \"Open Sans\", sans-serif;\n &::before{\n border-bottom: ", ";\n }\n &:not(.Mui-error)::before, &:not(&.Mui-focused)::before {\n border-bottom: ", ";\n }\n &::after{\n border-bottom: ", ";\n }\n\n &.Mui-error {\n &::before {\n border-width: 1px;\n border-color: ", ";\n }\n &::after {\n transform: scaleX(0);\n }\n }\n\n &.Mui-focused {\n &::after {\n border-width: 2px;\n border-color: ", ";\n transform: scaleX(1);\n }\n \n &.Mui-error::after {\n border-color: ", ";\n }\n }\n\n &.Mui-disabled {\n color: ", ";\n opacity:0.5;\n cursor: not-allowed;\n \n &::before {\n border-bottom: ", ";\n border-bottom-style: solid;\n }\n }\n .MuiInputBase-input {\n padding-left: ", ";\n color: ", ";\n text-overflow: ellipsis;\n &.Mui-disabled {\n cursor: not-allowed;\n };\n }\n .MuiInputAdornment-root {\n height: 20px;\n color: ", ";\n &.MuiInputAdornment-positionEnd{\n & > p {\n font-family: \"Open Sans\", sans-serif;\n color:", ";\n margin-right: 8px;\n margin-bottom: 1px;\n cursor: ", ";\n }\n }\n &.Mui-disabled {\n cursor: not-allowed;\n opacity:0.5;\n }\n }\n\n &:hover:not(.Mui-disabled):before &:hover:not(.Mui-error):before{\n border-bottom: ", ";\n }\n \n }\n\n & > p {\n &.Mui-error {\n color: ", ";\n }\n &.Mui-disabled{\n opacity:0.5;\n cursor:not-allowed;\n }\n }\n \n }\n"]);
89
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 20px;\n left: 0px;\n font-weight: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n color: ", ";\n max-height: 20px;\n max-width: 20px;\n opacity: ", ";\n z-index: 1;\n ", ";\n"]);
48
90
 
49
91
  _templateObject6 = function _templateObject6() {
50
92
  return data;
@@ -54,7 +96,7 @@ function _templateObject6() {
54
96
  }
55
97
 
56
98
  function _templateObject5() {
57
- var data = (0, _taggedTemplateLiteral2["default"])(["\n top: 23px;\n left: 0;\n max-height: 20px;\n max-width: 20px;\n margin-right: 8px;\n width: 20px;\n opacity: ", ";\n cursor: ", ";\n"]);
99
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 20px;\n left: 0px;\n width: 20px;\n max-height: 20px;\n max-width: 20px;\n color: ", ";\n z-index: 1;\n opacity: ", ";\n ", ";\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
58
100
 
59
101
  _templateObject5 = function _templateObject5() {
60
102
  return data;
@@ -64,7 +106,7 @@ function _templateObject5() {
64
106
  }
65
107
 
66
108
  function _templateObject4() {
67
- var data = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 20px;\n left: 0px;\n font-family: \"Open Sans\", sans-serif;\n color: ", ";\n max-height: 20px;\n max-width: 20px;\n opacity: ", ";\n z-index: 1;\n cursor: ", ";\n"]);
109
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 20px;\n left: 0px;\n max-height: 20px;\n max-width: 20px;\n z-index: 1;\n opacity: ", ";\n ", ";\n"]);
68
110
 
69
111
  _templateObject4 = function _templateObject4() {
70
112
  return data;
@@ -74,7 +116,7 @@ function _templateObject4() {
74
116
  }
75
117
 
76
118
  function _templateObject3() {
77
- var data = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 20px;\n left: 0px;\n width: 20px;\n max-height: 20px;\n max-width: 20px;\n z-index: 1;\n opacity: ", ";\n cursor: ", ";\n"]);
119
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n .MuiPaper-root {\n max-height: 250px;\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n border-color: ", ";\n border-width: ", ";\n border-style: ", ";\n overflow: auto;\n\n ::-webkit-scrollbar {\n width: 3px;\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\n li {\n padding-bottom: ", ";\n padding-top: ", ";\n\n &:hover {\n color: ", ";\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n }\n }\n"]);
78
120
 
79
121
  _templateObject3 = function _templateObject3() {
80
122
  return data;
@@ -84,7 +126,7 @@ function _templateObject3() {
84
126
  }
85
127
 
86
128
  function _templateObject2() {
87
- var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n .MuiPaper-root {\n max-height: 250px;\n overflow: auto;\n ::-webkit-scrollbar {\n width: 3px;\n }\n ::-webkit-scrollbar-track {\n background-color: ", ";\n border-radius: 3px;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 3px;\n }\n }\n"]);
129
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n z-index: 1301;\n"]);
88
130
 
89
131
  _templateObject2 = function _templateObject2() {
90
132
  return data;
@@ -130,8 +172,6 @@ var DxcInputText = function DxcInputText(_ref) {
130
172
  _ref$name = _ref.name,
131
173
  name = _ref$name === void 0 ? "" : _ref$name,
132
174
  value = _ref.value,
133
- _ref$theme = _ref.theme,
134
- theme = _ref$theme === void 0 ? "light" : _ref$theme,
135
175
  _ref$assistiveText = _ref.assistiveText,
136
176
  assistiveText = _ref$assistiveText === void 0 ? "" : _ref$assistiveText,
137
177
  _ref$disabled = _ref.disabled,
@@ -140,6 +180,8 @@ var DxcInputText = function DxcInputText(_ref) {
140
180
  prefix = _ref$prefix === void 0 ? "" : _ref$prefix,
141
181
  _ref$suffix = _ref.suffix,
142
182
  suffix = _ref$suffix === void 0 ? "" : _ref$suffix,
183
+ prefixIcon = _ref.prefixIcon,
184
+ suffixIcon = _ref.suffixIcon,
143
185
  _ref$prefixIconSrc = _ref.prefixIconSrc,
144
186
  prefixIconSrc = _ref$prefixIconSrc === void 0 ? "" : _ref$prefixIconSrc,
145
187
  _ref$suffixIconSrc = _ref.suffixIconSrc,
@@ -161,15 +203,15 @@ var DxcInputText = function DxcInputText(_ref) {
161
203
  margin = _ref.margin,
162
204
  _ref$size = _ref.size,
163
205
  size = _ref$size === void 0 ? "medium" : _ref$size,
164
- autocompleteOptions = _ref.autocompleteOptions;
206
+ autocompleteOptions = _ref.autocompleteOptions,
207
+ _ref$tabIndex = _ref.tabIndex,
208
+ tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
165
209
 
166
210
  var _useState = (0, _react.useState)(""),
167
211
  _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
168
212
  innerValue = _useState2[0],
169
213
  setInnerValue = _useState2[1];
170
214
 
171
- var colorsTheme = (0, _react.useContext)(_ThemeContext["default"]) || _variables.colors;
172
-
173
215
  var _useState3 = (0, _react.useState)(false),
174
216
  _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
175
217
  isOpen = _useState4[0],
@@ -195,6 +237,9 @@ var DxcInputText = function DxcInputText(_ref) {
195
237
  isError = _useState12[0],
196
238
  changeIsError = _useState12[1];
197
239
 
240
+ var colorsTheme = (0, _useTheme["default"])();
241
+ var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
242
+
198
243
  var changeValue = function changeValue(newValue) {
199
244
  if (value === null || value === undefined) {
200
245
  if (typeof onChange === "function") {
@@ -244,6 +289,7 @@ var DxcInputText = function DxcInputText(_ref) {
244
289
  if (autocompleteOptions) {
245
290
  changeIsError(false);
246
291
  setAnchorEl(event.currentTarget);
292
+ changeIsOpen(true);
247
293
  }
248
294
 
249
295
  changeValue(event.target.value);
@@ -271,30 +317,82 @@ var DxcInputText = function DxcInputText(_ref) {
271
317
  }
272
318
  };
273
319
 
320
+ var handleSuffixKeyPress = function handleSuffixKeyPress(event) {
321
+ event.preventDefault();
322
+
323
+ if (!disabled && (event.nativeEvent.code === "Enter" || event.nativeEvent.code === "Space")) {
324
+ onClickSuffix(event);
325
+ }
326
+ };
327
+
328
+ var handlePrefixKeyPress = function handlePrefixKeyPress(event) {
329
+ event.preventDefault();
330
+
331
+ if (!disabled && (event.nativeEvent.code === "Enter" || event.nativeEvent.code === "Space")) {
332
+ onClickPrefix(event);
333
+ }
334
+ };
335
+
336
+ var ThemedSuggestions = function ThemedSuggestions() {
337
+ var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
338
+ return _react["default"].createElement(SuggestionsContainer, {
339
+ margin: margin,
340
+ size: size,
341
+ backgroundType: backgroundType
342
+ }, _react["default"].createElement(_Paper["default"], null, isOpen && !isSearching && !isError && filteredOptions.length === 0 && _react["default"].createElement(_MenuItem["default"], null, "No matches found."), isOpen && !isSearching && filteredOptions.length > 0 && filteredOptions.map(function (suggestion) {
343
+ return _react["default"].createElement(_MenuItem["default"], {
344
+ key: suggestion,
345
+ disableRipple: true,
346
+ onMouseDown: function onMouseDown(event) {
347
+ return event.preventDefault();
348
+ },
349
+ onClick: function onClick() {
350
+ return handlerSuggestionClicked(suggestion);
351
+ }
352
+ }, suggestion);
353
+ }), isSearching && _react["default"].createElement(_MenuItem["default"], null, "Searching..."), isError && _react["default"].createElement(_MenuItem["default"], null, "Error fetching data", _react["default"].createElement(ErrorIcon, {
354
+ src: _error["default"]
355
+ }))));
356
+ };
357
+
274
358
  return _react["default"].createElement(_styledComponents.ThemeProvider, {
275
- theme: colorsTheme
359
+ theme: colorsTheme.inputText
276
360
  }, _react["default"].createElement(TextContainer, {
361
+ prefixIcon: prefixIcon,
277
362
  prefixIconSrc: prefixIconSrc,
278
363
  prefix: prefix,
279
364
  required: required,
280
- brightness: theme,
281
365
  assistiveText: assistiveText,
282
366
  margin: margin,
283
- size: size
284
- }, prefixIconSrc && _react["default"].createElement(PrefixIcon, {
367
+ size: size,
368
+ backgroundType: backgroundType
369
+ }, prefixIcon ? _react["default"].createElement(PrefixIconContainer, {
370
+ tabIndex: typeof onClickPrefix === "function" && !disabled ? tabIndex : -1,
371
+ disabled: disabled,
372
+ onClick: !disabled ? onClickPrefix : null,
373
+ interactuable: typeof onClickPrefix === "function" && !disabled,
374
+ backgroundType: backgroundType,
375
+ onKeyPress: handlePrefixKeyPress
376
+ }, (0, _typeof2["default"])(prefixIcon) === "object" ? prefixIcon : _react["default"].createElement(prefixIcon)) : prefixIconSrc && _react["default"].createElement(PrefixIcon, {
377
+ tabIndex: typeof onClickPrefix === "function" && !disabled ? tabIndex : -1,
285
378
  src: prefixIconSrc,
286
379
  disabled: disabled,
287
- onClick: onClickPrefix
288
- }), prefix && _react["default"].createElement(PrefixLabel, {
289
- brightness: theme,
380
+ onClick: !disabled ? onClickPrefix : null,
381
+ interactuable: typeof onClickPrefix === "function" && !disabled,
382
+ onKeyPress: handlePrefixKeyPress
383
+ }) || prefix && _react["default"].createElement(PrefixLabel, {
384
+ tabIndex: typeof onClickPrefix === "function" && !disabled ? tabIndex : -1,
290
385
  disabled: disabled,
291
- onClick: onClickPrefix
386
+ onClick: !disabled ? onClickPrefix : null,
387
+ interactuable: typeof onClickPrefix === "function" && !disabled,
388
+ backgroundType: backgroundType,
389
+ onKeyPress: handlePrefixKeyPress
292
390
  }, prefix), _react["default"].createElement(_TextField["default"], {
293
391
  error: invalid,
294
392
  value: value != null ? value : innerValue,
295
393
  name: name,
296
394
  disabled: disabled,
297
- label: label,
395
+ label: required ? _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(_RequiredComponent["default"], null), label) : label,
298
396
  helperText: assistiveText,
299
397
  onChange: function onChange(event) {
300
398
  return handlerInputChange(event);
@@ -306,16 +404,35 @@ var DxcInputText = function DxcInputText(_ref) {
306
404
  placeholder: placeholder,
307
405
  type: isMasked ? "password" : "text",
308
406
  InputProps: {
309
- endAdornment: (suffix || suffixIconSrc) && _react["default"].createElement(_InputAdornment["default"], {
310
- position: "end",
311
- onClick: onClickSuffix
312
- }, suffixIconSrc && _react["default"].createElement(SuffixIcon, {
407
+ endAdornment: (suffix || suffixIconSrc || suffixIcon) && _react["default"].createElement(_InputAdornment["default"], {
408
+ position: "end"
409
+ }, suffixIcon ? _react["default"].createElement(SuffixIconContainer, {
410
+ tabIndex: typeof onClickSuffix === "function" && !disabled ? tabIndex : -1,
411
+ disabled: disabled,
412
+ onClick: onClickSuffix,
413
+ interactuable: typeof onClickSuffix === "function" && !disabled,
414
+ backgroundType: backgroundType,
415
+ onKeyPress: handleSuffixKeyPress
416
+ }, (0, _typeof2["default"])(suffixIcon) === "object" ? suffixIcon : _react["default"].createElement(suffixIcon)) : suffixIconSrc && _react["default"].createElement(SuffixIcon, {
417
+ tabIndex: typeof onClickSuffix === "function" && !disabled ? tabIndex : -1,
313
418
  disabled: disabled,
314
419
  src: suffixIconSrc,
315
- onClick: onClickSuffix
316
- }) || suffix)
420
+ onClick: onClickSuffix,
421
+ interactuable: typeof onClickSuffix === "function" && !disabled,
422
+ onKeyPress: handleSuffixKeyPress
423
+ }) || _react["default"].createElement(SuffixLabel, {
424
+ tabIndex: typeof onClickSuffix === "function" && !disabled ? tabIndex : -1,
425
+ onClick: onClickSuffix,
426
+ disabled: disabled,
427
+ interactuable: typeof onClickSuffix === "function" && !disabled,
428
+ backgroundType: backgroundType,
429
+ onKeyPress: handleSuffixKeyPress
430
+ }, suffix))
431
+ },
432
+ inputProps: {
433
+ tabIndex: tabIndex
317
434
  }
318
- })), _react["default"].createElement(_Popper["default"], {
435
+ })), _react["default"].createElement(DxcSuggestions, {
319
436
  open: isOpen,
320
437
  anchorEl: anchorEl,
321
438
  anchororigin: {
@@ -327,22 +444,9 @@ var DxcInputText = function DxcInputText(_ref) {
327
444
  marginTop: "0px"
328
445
  }
329
446
  }
330
- }, _react["default"].createElement(SuggestionsContainer, {
331
- margin: margin,
332
- size: size
333
- }, _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(_Paper["default"], null, isOpen && !isSearching && !isError && !filteredOptions.length && _react["default"].createElement(_MenuItem["default"], null, "No matches found."), isOpen && !isSearching && filteredOptions.length > 0 && filteredOptions.map(function (suggestion) {
334
- return _react["default"].createElement(_MenuItem["default"], {
335
- key: suggestion,
336
- onMouseDown: function onMouseDown(event) {
337
- return event.preventDefault();
338
- },
339
- onClick: function onClick() {
340
- return handlerSuggestionClicked(suggestion);
341
- }
342
- }, suggestion);
343
- }), isSearching && _react["default"].createElement(_MenuItem["default"], null, "Searching..."), isError && _react["default"].createElement(_MenuItem["default"], null, "Error fetching data", _react["default"].createElement(ErrorIcon, {
344
- src: _error["default"]
345
- })))))));
447
+ }, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
448
+ color: colorsTheme.inputText.optionBackgroundColor
449
+ }, _react["default"].createElement(ThemedSuggestions, null))));
346
450
  };
347
451
 
348
452
  var sizes = {
@@ -362,47 +466,115 @@ var calculateWidth = function calculateWidth(margin, size) {
362
466
  return sizes[size];
363
467
  };
364
468
 
365
- var SuggestionsContainer = _styledComponents["default"].div(_templateObject2(), function (props) {
469
+ var getCursor = function getCursor(interactuable, disabled) {
470
+ if (disabled) {
471
+ return "cursor:not-allowed;";
472
+ }
473
+
474
+ if (interactuable) {
475
+ return "cursor:pointer;";
476
+ }
477
+
478
+ return "cursor:default; outline:none;";
479
+ };
480
+
481
+ var DxcSuggestions = (0, _styledComponents["default"])(_Popper["default"])(_templateObject2());
482
+
483
+ var SuggestionsContainer = _styledComponents["default"].div(_templateObject3(), function (props) {
366
484
  return calculateWidth(props.margin, props.size);
367
485
  }, function (props) {
368
- return props.theme.lightGrey;
486
+ return props.theme.optionBackgroundColor;
487
+ }, function (props) {
488
+ return props.theme.fontFamily;
489
+ }, function (props) {
490
+ return props.theme.optionFontSize;
491
+ }, function (props) {
492
+ return props.theme.optionFontStyle;
493
+ }, function (props) {
494
+ return props.theme.optionFontWeight;
495
+ }, function (props) {
496
+ return props.backgroundType === "dark" ? props.theme.optionFontColorOnDark : props.theme.optionFontColor;
497
+ }, function (props) {
498
+ return props.theme.optionBorderColor;
499
+ }, function (props) {
500
+ return props.theme.optionBorderThickness;
501
+ }, function (props) {
502
+ return props.theme.optionBorderStyle;
503
+ }, function (props) {
504
+ return props.theme.scrollBarTrackColor;
369
505
  }, function (props) {
370
- return props.theme.darkGrey;
506
+ return props.theme.scrollBarThumbColor;
507
+ }, function (props) {
508
+ return props.theme.optionPaddingBottom;
509
+ }, function (props) {
510
+ return props.theme.optionPaddingTop;
511
+ }, function (props) {
512
+ return props.theme.hoverOptionColor;
513
+ }, function (props) {
514
+ return props.backgroundType === "dark" ? props.theme.hoverOptionBackgroundColorOnDark : props.theme.hoverOptionBackgroundColor;
515
+ }, function (props) {
516
+ return props.backgroundType === "dark" ? props.theme.selectedOptionBackgroundColorOnDark : props.theme.selectedOptionBackgroundColor;
371
517
  });
372
518
 
373
- var PrefixIcon = _styledComponents["default"].img(_templateObject3(), function (props) {
519
+ var PrefixIcon = _styledComponents["default"].img(_templateObject4(), function (props) {
374
520
  return props.disabled && 0.5 || 1;
375
521
  }, function (props) {
376
- if (props.onClickPrefix !== "" && !props.disabled) {
377
- return "pointer";
378
- }
522
+ return getCursor(props.interactuable, props.disabled);
523
+ });
379
524
 
380
- return "default";
525
+ var PrefixIconContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
526
+ return props.backgroundType === "dark" ? props.theme.prefixIconColorOnDark : props.theme.prefixIconColor;
527
+ }, function (props) {
528
+ return props.disabled && 0.5 || 1;
529
+ }, function (props) {
530
+ return getCursor(props.interactuable, props.disabled);
381
531
  });
382
532
 
383
- var PrefixLabel = _styledComponents["default"].span(_templateObject4(), function (props) {
384
- return props.brightness === "light" ? props.theme.darkGrey : props.theme.yellow;
533
+ var PrefixLabel = _styledComponents["default"].span(_templateObject6(), function (props) {
534
+ return props.theme.prefixLabelFontWeight;
535
+ }, function (props) {
536
+ return props.theme.fontFamily;
537
+ }, function (props) {
538
+ return props.theme.prefixLabelFontSize;
539
+ }, function (props) {
540
+ return props.theme.prefixLabelFontStyle;
541
+ }, function (props) {
542
+ return props.backgroundType === "dark" ? props.theme.prefixLabelFontColorOnDark : props.theme.prefixLabelFontColor;
385
543
  }, function (props) {
386
544
  return props.disabled && 0.5 || 1;
387
545
  }, function (props) {
388
- if (props.onClickPrefix !== "" && !props.disabled) {
389
- return "pointer";
390
- }
546
+ return getCursor(props.interactuable, props.disabled);
547
+ });
391
548
 
392
- return "default";
549
+ var SuffixIcon = _styledComponents["default"].img(_templateObject7(), function (props) {
550
+ return props.disabled && 0.5 || 1;
551
+ }, function (props) {
552
+ return getCursor(props.interactuable, props.disabled);
393
553
  });
394
554
 
395
- var SuffixIcon = _styledComponents["default"].img(_templateObject5(), function (props) {
555
+ var SuffixIconContainer = _styledComponents["default"].div(_templateObject8(), function (props) {
556
+ return props.backgroundType === "dark" ? props.theme.suffixIconColorOnDark : props.theme.suffixIconColor;
557
+ }, function (props) {
396
558
  return props.disabled && 0.5 || 1;
397
559
  }, function (props) {
398
- if (props.onClickSuffix !== "" && !props.disabled) {
399
- return "pointer";
400
- }
560
+ return getCursor(props.interactuable, props.disabled);
561
+ });
401
562
 
402
- return "default";
563
+ var SuffixLabel = _styledComponents["default"].span(_templateObject9(), function (props) {
564
+ return getCursor(props.interactuable, props.disabled);
565
+ }, function (props) {
566
+ return props.theme.suffixLabelFontWeight;
567
+ }, function (props) {
568
+ return props.theme.fontFamily;
569
+ }, function (props) {
570
+ return props.theme.suffixLabelFontSize;
571
+ }, function (props) {
572
+ return props.theme.suffixLabelFontStyle;
573
+ }, function (props) {
574
+ return props.backgroundType === "dark" ? props.theme.suffixLabelFontColorOnDark : props.theme.suffixLabelFontColor;
403
575
  });
404
576
 
405
- var TextContainer = _styledComponents["default"].div(_templateObject6(), function (props) {
577
+ var TextContainer = _styledComponents["default"].div(_templateObject10(), function (props) {
406
578
  return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
407
579
  }, function (props) {
408
580
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
@@ -415,76 +587,101 @@ var TextContainer = _styledComponents["default"].div(_templateObject6(), functio
415
587
  }, function (props) {
416
588
  return calculateWidth(props.margin, props.size);
417
589
  }, function (props) {
418
- return props.brightness === "light" ? props.theme.black : props.theme.lightGrey;
590
+ return props.theme.fontFamily;
419
591
  }, function (props) {
420
- return props.required && "*" || "";
592
+ return props.theme.assistiveTextFontWeight;
421
593
  }, function (props) {
422
- return props.brightness === "light" ? props.theme.darkRed : props.theme.lightRed;
594
+ return props.theme.fontFamily;
423
595
  }, function (props) {
424
- return (props.prefixIconSrc || props.prefix) && "32px" || "inherit";
596
+ return props.theme.assistiveTextFontSize;
425
597
  }, function (props) {
426
- return props.brightness === "light" ? props.theme.black : props.theme.white;
598
+ return props.theme.assistiveTextFontStyle;
427
599
  }, function (props) {
428
- return props.prefixIconSrc || (props.prefix || props.suffix) && "translate(8px, 1.5px) scale(0.75);" || "translate(0, 1.5px) scale(0.75);";
600
+ return props.backgroundType === "dark" ? props.theme.assistiveTextFontColorOnDark : props.theme.assistiveTextFontColor;
429
601
  }, function (props) {
430
- return props.brightness === "light" ? props.theme.lightGrey : props.theme.darkGrey;
602
+ return props.theme.labelFontSize;
431
603
  }, function (props) {
432
- return props.prefixIconSrc && "translate(8px, 1.5px) scale(0.75);" || props.prefix && "translate(8px, 1.5px) scale(0.75);" || "translate(0, 1.5px) scale(0.75);";
604
+ return props.theme.labelFontStyle;
433
605
  }, function (props) {
434
- return props.brightness === "light" ? props.theme.darkRed : props.theme.lightRed;
606
+ return props.theme.labelFontWeight;
435
607
  }, function (props) {
436
- return props.brightness === "light" ? props.theme.darkGrey : props.theme.lightGrey;
608
+ return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
437
609
  }, function (props) {
438
- return props.brightness === "light" ? props.theme.darkGrey : props.theme.lightGrey;
610
+ return (props.prefixIconSrc || props.prefix || props.prefixIcon) && "32px" || "inherit";
439
611
  }, function (props) {
440
- return props.brightness === "light" ? props.theme.black : props.theme.lightGrey;
612
+ return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
441
613
  }, function (props) {
442
- return props.brightness === "light" ? props.theme.darkGrey : props.theme.lightGrey;
614
+ return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
443
615
  }, function (props) {
444
- return props.brightness === "light" ? "1px solid ".concat(props.theme.black) : "1px solid ".concat(props.theme.lightGrey);
616
+ return props.prefixIconSrc || props.prefixIcon || (props.prefix || props.suffix) && "translate(8px, 1.5px) scale(0.75);" || "translate(0, 1.5px) scale(0.75);";
445
617
  }, function (props) {
446
- return props.brightness === "light" ? "1px solid ".concat(props.theme.black) : "1px solid ".concat(props.theme.lightGrey);
618
+ return props.theme.fontFamily;
447
619
  }, function (props) {
448
- return props.brightness === "light" ? "2px solid #000" : "2px solid #d9d9d9";
620
+ return props.prefixIcon && "translate(8px, 1.5px) scale(0.75);" || props.prefixIconSrc && "translate(8px, 1.5px) scale(0.75);" || props.prefix && "translate(8px, 1.5px) scale(0.75);" || "translate(0, 1.5px) scale(0.75);";
449
621
  }, function (props) {
450
- return props.brightness === "light" ? props.theme.darkRed : props.theme.lightRed;
622
+ return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
451
623
  }, function (props) {
452
- return props.brightness === "light" ? props.theme.black : props.theme.white;
624
+ return props.theme.fontFamily;
453
625
  }, function (props) {
454
- return props.brightness === "light" ? props.theme.darkRed : props.theme.lightRed;
626
+ return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
455
627
  }, function (props) {
456
- return props.brightness === "light" ? props.theme.lightGrey : props.theme.darkGrey;
628
+ return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
457
629
  }, function (props) {
458
- return props.brightness === "light" ? "1px solid ".concat(props.theme.lightGrey) : "1px solid ".concat(props.theme.darkGrey);
630
+ return props.backgroundType === "dark" ? props.theme.underlineColorOnDark : props.theme.underlineColor;
459
631
  }, function (props) {
460
- return (props.prefixIconSrc || props.prefix) && "32px" || "inherit";
632
+ return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
461
633
  }, function (props) {
462
- return props.brightness === "light" ? props.theme.black : props.theme.white;
634
+ return props.theme.fontFamily;
463
635
  }, function (props) {
464
- return props.brightness === "light" ? props.theme.lightGrey : props.theme.darkGrey;
636
+ return "".concat(props.theme.underlineThickness, " solid ").concat(props.backgroundType === "dark" ? props.theme.underlineColorOnDark : props.theme.underlineColor);
465
637
  }, function (props) {
466
- return props.brightness === "light" ? props.theme.darkGrey : props.theme.yellow;
638
+ return "".concat(props.theme.underlineThickness, " solid ").concat(props.backgroundType === "dark" ? props.theme.underlineColorOnDark : props.theme.underlineColor);
467
639
  }, function (props) {
468
- if (props.onClickSuffix !== "" && !props.disabled) {
469
- return "pointer";
470
- }
471
-
472
- return "default";
640
+ return "calc(".concat(props.theme.underlineThickness, " + 1px) solid ").concat(props.backgroundType === "dark" ? props.theme.underlineFocusColorOnDark : props.theme.underlineFocusColor);
641
+ }, function (props) {
642
+ return props.theme.underlineThickness;
643
+ }, function (props) {
644
+ return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
645
+ }, function (props) {
646
+ return props.theme.underlineThickness;
647
+ }, function (props) {
648
+ return props.backgroundType === "dark" ? props.theme.underlineFocusColorOnDark : props.theme.underlineFocusColor;
649
+ }, function (props) {
650
+ return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
651
+ }, function (props) {
652
+ return "".concat(props.theme.underlineThickness, " solid ").concat(props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor, " !important");
653
+ }, function (props) {
654
+ return props.theme.valueFontSize;
655
+ }, function (props) {
656
+ return props.theme.valueFontStyle;
657
+ }, function (props) {
658
+ return props.theme.valueFontWeight;
659
+ }, function (props) {
660
+ return props.backgroundType === "dark" ? props.theme.valueFontColorOnDark : props.theme.valueFontColor;
661
+ }, function (props) {
662
+ return (props.prefixIconSrc || props.prefix || props.prefixIcon) && "32px" || "inherit";
663
+ }, function (props) {
664
+ return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
665
+ }, function (props) {
666
+ return props.theme.fontFamily;
667
+ }, function (props) {
668
+ return props.backgroundType === "dark" ? props.theme.underlineFocusColorOnDark : props.theme.underlineFocusColor;
473
669
  }, function (props) {
474
- return props.brightness === "light" ? "1px solid ".concat(props.theme.black) : "1px solid ".concat(props.theme.white);
670
+ return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
475
671
  }, function (props) {
476
- return props.brightness === "light" ? props.theme.darkRed + " !important" : props.theme.lightRed + " !important";
672
+ return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
477
673
  });
478
674
 
479
675
  DxcInputText.propTypes = {
480
676
  label: _propTypes["default"].string,
481
677
  name: _propTypes["default"].string,
482
678
  value: _propTypes["default"].string,
483
- theme: _propTypes["default"].oneOf(["light", "dark", ""]),
484
679
  assistiveText: _propTypes["default"].string,
485
680
  disabled: _propTypes["default"].bool,
486
681
  prefix: _propTypes["default"].string,
487
682
  suffix: _propTypes["default"].string,
683
+ prefixIcon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
684
+ suffixIcon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
488
685
  prefixIconSrc: _propTypes["default"].string,
489
686
  suffixIconSrc: _propTypes["default"].string,
490
687
  required: _propTypes["default"].bool,
@@ -503,7 +700,8 @@ DxcInputText.propTypes = {
503
700
  left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
504
701
  right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
505
702
  }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
506
- autocompleteOptions: _propTypes["default"].any
703
+ autocompleteOptions: _propTypes["default"].any,
704
+ tabIndex: _propTypes["default"].number
507
705
  };
508
706
  var _default = DxcInputText;
509
707
  exports["default"] = _default;