@dxc-technology/halstack-react 0.0.0-a105522 → 0.0.0-a3f5d07

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 (232) hide show
  1. package/{dist/BackgroundColorContext.js → BackgroundColorContext.js} +0 -0
  2. package/{dist/ThemeContext.js → ThemeContext.js} +74 -64
  3. package/{dist/select/Select.js → V3Select/V3Select.js} +5 -5
  4. package/V3Select/index.d.ts +27 -0
  5. package/{dist/textarea/Textarea.js → V3Textarea/V3Textarea.js} +4 -4
  6. package/V3Textarea/index.d.ts +27 -0
  7. package/{dist/accordion → accordion}/Accordion.js +0 -0
  8. package/accordion/index.d.ts +28 -0
  9. package/{dist/accordion-group → accordion-group}/AccordionGroup.js +0 -0
  10. package/accordion-group/index.d.ts +16 -0
  11. package/{dist/alert → alert}/Alert.js +5 -5
  12. package/alert/index.d.ts +51 -0
  13. package/{dist/badge → badge}/Badge.js +0 -0
  14. package/{dist/box → box}/Box.js +0 -0
  15. package/box/index.d.ts +25 -0
  16. package/{dist/button → button}/Button.js +3 -3
  17. package/button/Button.stories.js +27 -0
  18. package/{dist/alert → button}/index.d.ts +9 -11
  19. package/{dist/card → card}/Card.js +0 -0
  20. package/card/index.d.ts +22 -0
  21. package/{dist/checkbox → checkbox}/Checkbox.js +4 -5
  22. package/checkbox/index.d.ts +24 -0
  23. package/{dist/chip → chip}/Chip.js +0 -0
  24. package/chip/index.d.ts +22 -0
  25. package/{dist/common → common}/OpenSans.css +0 -0
  26. package/{dist/common → common}/RequiredComponent.js +0 -0
  27. package/{dist/common → common}/fonts/OpenSans-Bold.ttf +0 -0
  28. package/{dist/common → common}/fonts/OpenSans-BoldItalic.ttf +0 -0
  29. package/{dist/common → common}/fonts/OpenSans-ExtraBold.ttf +0 -0
  30. package/{dist/common → common}/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  31. package/{dist/common → common}/fonts/OpenSans-Italic.ttf +0 -0
  32. package/{dist/common → common}/fonts/OpenSans-Light.ttf +0 -0
  33. package/{dist/common → common}/fonts/OpenSans-LightItalic.ttf +0 -0
  34. package/{dist/common → common}/fonts/OpenSans-Regular.ttf +0 -0
  35. package/{dist/common → common}/fonts/OpenSans-SemiBold.ttf +0 -0
  36. package/{dist/common → common}/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  37. package/{dist/common → common}/utils.js +0 -0
  38. package/{dist/common → common}/variables.js +286 -89
  39. package/{dist/date → date}/Date.js +4 -6
  40. package/date/index.d.ts +27 -0
  41. package/{dist/new-date/NewDate.js → date-input/DateInput.js} +69 -72
  42. package/date-input/index.d.ts +95 -0
  43. package/{dist/dialog → dialog}/Dialog.js +0 -0
  44. package/dialog/index.d.ts +18 -0
  45. package/{dist/dropdown → dropdown}/Dropdown.js +0 -0
  46. package/dropdown/index.d.ts +26 -0
  47. package/file-input/FileInput.js +644 -0
  48. package/file-input/FileItem.js +287 -0
  49. package/file-input/index.d.ts +81 -0
  50. package/{dist/footer → footer}/Footer.js +44 -18
  51. package/footer/Icons.js +77 -0
  52. package/footer/index.d.ts +25 -0
  53. package/{dist/header → header}/Header.js +122 -55
  54. package/header/Icons.js +59 -0
  55. package/header/index.d.ts +25 -0
  56. package/{dist/heading → heading}/Heading.js +12 -0
  57. package/heading/index.d.ts +17 -0
  58. package/input-text/Icons.js +22 -0
  59. package/{dist/input-text → input-text}/InputText.js +7 -9
  60. package/input-text/index.d.ts +36 -0
  61. package/{dist/layout → layout}/ApplicationLayout.js +4 -8
  62. package/layout/Icons.js +55 -0
  63. package/{dist/link → link}/Link.js +0 -0
  64. package/link/index.d.ts +23 -0
  65. package/main.d.ts +40 -0
  66. package/{dist/main.js → main.js} +37 -29
  67. package/{dist/number/Number.js → number-input/NumberInput.js} +9 -11
  68. package/{dist/number/NumberContext.js → number-input/NumberInputContext.js} +2 -2
  69. package/number-input/index.d.ts +113 -0
  70. package/package.json +21 -17
  71. package/paginator/Icons.js +66 -0
  72. package/{dist/paginator → paginator}/Paginator.js +53 -37
  73. package/paginator/index.d.ts +20 -0
  74. package/{dist/password/Password.js → password-input/PasswordInput.js} +17 -14
  75. package/password-input/index.d.ts +94 -0
  76. package/{dist/progress-bar → progress-bar}/ProgressBar.js +0 -0
  77. package/progress-bar/index.d.ts +18 -0
  78. package/{dist/radio → radio}/Radio.js +0 -0
  79. package/radio/index.d.ts +23 -0
  80. package/{dist/resultsetTable → resultsetTable}/ResultsetTable.js +1 -1
  81. package/resultsetTable/index.d.ts +19 -0
  82. package/select/Select.js +1138 -0
  83. package/select/index.d.ts +131 -0
  84. package/{dist/sidenav → sidenav}/Sidenav.js +0 -0
  85. package/sidenav/index.d.ts +13 -0
  86. package/{dist/slider → slider}/Slider.js +104 -19
  87. package/slider/index.d.ts +29 -0
  88. package/{dist/spinner → spinner}/Spinner.js +0 -0
  89. package/spinner/index.d.ts +17 -0
  90. package/{dist/switch → switch}/Switch.js +0 -0
  91. package/switch/index.d.ts +24 -0
  92. package/{dist/table → table}/Table.js +0 -0
  93. package/table/index.d.ts +13 -0
  94. package/{dist/tabs → tabs}/Tabs.js +0 -0
  95. package/tabs/index.d.ts +19 -0
  96. package/{dist/tag → tag}/Tag.js +0 -0
  97. package/tag/index.d.ts +24 -0
  98. package/{dist/new-input-text/NewInputText.js → text-input/TextInput.js} +308 -293
  99. package/text-input/index.d.ts +135 -0
  100. package/{dist/new-textarea/NewTextarea.js → textarea/Textarea.js} +58 -54
  101. package/textarea/index.d.ts +117 -0
  102. package/{dist/toggle → toggle}/Toggle.js +0 -0
  103. package/toggle/index.d.ts +21 -0
  104. package/{dist/toggle-group → toggle-group}/ToggleGroup.js +132 -28
  105. package/toggle-group/index.d.ts +21 -0
  106. package/{dist/upload → upload}/Upload.js +0 -0
  107. package/{dist/upload → upload}/buttons-upload/ButtonsUpload.js +7 -11
  108. package/upload/buttons-upload/Icons.js +40 -0
  109. package/{dist/upload → upload}/dragAndDropArea/DragAndDropArea.js +14 -14
  110. package/upload/dragAndDropArea/Icons.js +39 -0
  111. package/{dist/upload → upload}/file-upload/FileToUpload.js +26 -21
  112. package/upload/file-upload/Icons.js +66 -0
  113. package/{dist/upload → upload}/files-upload/FilesToUpload.js +0 -0
  114. package/upload/index.d.ts +15 -0
  115. package/upload/transaction/Icons.js +160 -0
  116. package/{dist/upload → upload}/transaction/Transaction.js +11 -38
  117. package/{dist/upload → upload}/transactions/Transactions.js +0 -0
  118. package/{dist/useTheme.js → useTheme.js} +0 -0
  119. package/wizard/Icons.js +65 -0
  120. package/{dist/wizard → wizard}/Wizard.js +3 -9
  121. package/wizard/index.d.ts +18 -0
  122. package/README.md +0 -66
  123. package/babel.config.js +0 -8
  124. package/dist/checkbox/Checkbox.stories.js +0 -144
  125. package/dist/checkbox/readme.md +0 -116
  126. package/dist/date/Date.stories.js +0 -205
  127. package/dist/date/readme.md +0 -73
  128. package/dist/footer/Footer.stories.js +0 -94
  129. package/dist/footer/dxc_logo.svg +0 -15
  130. package/dist/footer/readme.md +0 -41
  131. package/dist/header/Header.stories.js +0 -176
  132. package/dist/header/close_icon.svg +0 -1
  133. package/dist/header/dxc_logo_black.svg +0 -8
  134. package/dist/header/hamb_menu_black.svg +0 -1
  135. package/dist/header/hamb_menu_white.svg +0 -1
  136. package/dist/header/readme.md +0 -33
  137. package/dist/input-text/InputText.stories.js +0 -209
  138. package/dist/input-text/error.svg +0 -1
  139. package/dist/input-text/readme.md +0 -91
  140. package/dist/layout/facebook.svg +0 -45
  141. package/dist/layout/linkedin.svg +0 -50
  142. package/dist/layout/twitter.svg +0 -53
  143. package/dist/link/readme.md +0 -51
  144. package/dist/main.d.ts +0 -2
  145. package/dist/paginator/images/next.svg +0 -3
  146. package/dist/paginator/images/nextPage.svg +0 -3
  147. package/dist/paginator/images/previous.svg +0 -3
  148. package/dist/paginator/images/previousPage.svg +0 -3
  149. package/dist/paginator/readme.md +0 -50
  150. package/dist/password/styles.css +0 -3
  151. package/dist/progress-bar/ProgressBar.stories.js +0 -280
  152. package/dist/progress-bar/readme.md +0 -63
  153. package/dist/radio/Radio.stories.js +0 -166
  154. package/dist/radio/readme.md +0 -70
  155. package/dist/resultsetTable/arrow_downward-24px_wht.svg +0 -1
  156. package/dist/resultsetTable/arrow_upward-24px_wht.svg +0 -1
  157. package/dist/resultsetTable/unfold_more-24px_wht.svg +0 -1
  158. package/dist/slider/Slider.stories.js +0 -241
  159. package/dist/slider/readme.md +0 -64
  160. package/dist/spinner/Spinner.stories.js +0 -183
  161. package/dist/spinner/readme.md +0 -65
  162. package/dist/switch/Switch.stories.js +0 -134
  163. package/dist/switch/readme.md +0 -133
  164. package/dist/tabs/Tabs.stories.js +0 -130
  165. package/dist/tabs/readme.md +0 -78
  166. package/dist/tabs-for-sections/TabsForSections.js +0 -92
  167. package/dist/tabs-for-sections/readme.md +0 -78
  168. package/dist/toggle/Toggle.stories.js +0 -297
  169. package/dist/toggle/readme.md +0 -80
  170. package/dist/upload/Upload.stories.js +0 -72
  171. package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
  172. package/dist/upload/buttons-upload/upload-button.svg +0 -1
  173. package/dist/upload/dragAndDropArea/upload_drop.svg +0 -4
  174. package/dist/upload/dragAndDropArea/upload_file.svg +0 -4
  175. package/dist/upload/file-upload/audio-icon.svg +0 -4
  176. package/dist/upload/file-upload/close.svg +0 -4
  177. package/dist/upload/file-upload/file-icon.svg +0 -4
  178. package/dist/upload/file-upload/video-icon.svg +0 -4
  179. package/dist/upload/readme.md +0 -37
  180. package/dist/upload/transaction/audio-icon-err.svg +0 -4
  181. package/dist/upload/transaction/audio-icon.svg +0 -4
  182. package/dist/upload/transaction/error-icon.svg +0 -4
  183. package/dist/upload/transaction/file-icon-err.svg +0 -4
  184. package/dist/upload/transaction/file-icon.svg +0 -4
  185. package/dist/upload/transaction/image-icon-err.svg +0 -4
  186. package/dist/upload/transaction/image-icon.svg +0 -4
  187. package/dist/upload/transaction/success-icon.svg +0 -4
  188. package/dist/upload/transaction/video-icon-err.svg +0 -4
  189. package/dist/upload/transaction/video-icon.svg +0 -4
  190. package/dist/wizard/invalid_icon.svg +0 -5
  191. package/dist/wizard/valid_icon.svg +0 -5
  192. package/dist/wizard/validation-wrong.svg +0 -6
  193. package/test/Accordion.test.js +0 -33
  194. package/test/AccordionGroup.test.js +0 -125
  195. package/test/Alert.test.js +0 -53
  196. package/test/Box.test.js +0 -10
  197. package/test/Button.test.js +0 -18
  198. package/test/Card.test.js +0 -30
  199. package/test/Checkbox.test.js +0 -45
  200. package/test/Chip.test.js +0 -25
  201. package/test/Date.test.js +0 -393
  202. package/test/Dialog.test.js +0 -23
  203. package/test/Dropdown.test.js +0 -145
  204. package/test/Footer.test.js +0 -99
  205. package/test/Header.test.js +0 -39
  206. package/test/Heading.test.js +0 -35
  207. package/test/InputText.test.js +0 -240
  208. package/test/Link.test.js +0 -43
  209. package/test/NewDate.test.js +0 -203
  210. package/test/NewInputText.test.js +0 -866
  211. package/test/NewTextarea.test.js +0 -252
  212. package/test/Number.test.js +0 -241
  213. package/test/Paginator.test.js +0 -177
  214. package/test/Password.test.js +0 -76
  215. package/test/ProgressBar.test.js +0 -35
  216. package/test/Radio.test.js +0 -37
  217. package/test/ResultsetTable.test.js +0 -329
  218. package/test/Select.test.js +0 -212
  219. package/test/Sidenav.test.js +0 -45
  220. package/test/Slider.test.js +0 -82
  221. package/test/Spinner.test.js +0 -32
  222. package/test/Switch.test.js +0 -45
  223. package/test/Table.test.js +0 -36
  224. package/test/Tabs.test.js +0 -109
  225. package/test/TabsForSections.test.js +0 -34
  226. package/test/Tag.test.js +0 -32
  227. package/test/TextArea.test.js +0 -52
  228. package/test/ToggleGroup.test.js +0 -81
  229. package/test/Upload.test.js +0 -60
  230. package/test/Wizard.test.js +0 -130
  231. package/test/mocks/pngMock.js +0 -1
  232. package/test/mocks/svgMock.js +0 -1
@@ -33,10 +33,30 @@ var _uuid = require("uuid");
33
33
 
34
34
  var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext.js"));
35
35
 
36
- var _NumberContext = _interopRequireDefault(require("../number/NumberContext.js"));
36
+ var _NumberInputContext = _interopRequireDefault(require("../number-input/NumberInputContext.js"));
37
+
38
+ function _templateObject18() {
39
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n padding: 0.25rem 1rem;\n align-items: center;\n line-height: 1.715em;\n color: ", ";\n"]);
40
+
41
+ _templateObject18 = function _templateObject18() {
42
+ return data;
43
+ };
44
+
45
+ return data;
46
+ }
47
+
48
+ function _templateObject17() {
49
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n margin-right: 0.5rem;\n height: 18px;\n width: 18px;\n color: ", ";\n"]);
50
+
51
+ _templateObject17 = function _templateObject17() {
52
+ return data;
53
+ };
54
+
55
+ return data;
56
+ }
37
57
 
38
58
  function _templateObject16() {
39
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n padding: calc((39px - 1.75em) / 2) 0 calc((39px - 1.75em) / 2) 1em;\n align-items: center;\n font-size: 0.875rem;\n line-height: 1.75em;\n"]);
59
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n padding: 0.25rem 1rem;\n color: ", ";\n line-height: 1.715em;\n"]);
40
60
 
41
61
  _templateObject16 = function _templateObject16() {
42
62
  return data;
@@ -46,7 +66,7 @@ function _templateObject16() {
46
66
  }
47
67
 
48
68
  function _templateObject15() {
49
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n padding: calc((39px - 1.75em) / 2) 0 calc((39px - 1.75em) / 2) 1em;\n color: ", ";\n font-size: 0.875rem;\n line-height: 1.75em;\n"]);
69
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding: 0.25rem 0.5rem 0.188rem 0.5rem;\n ", ";\n"]);
50
70
 
51
71
  _templateObject15 = function _templateObject15() {
52
72
  return data;
@@ -56,7 +76,7 @@ function _templateObject15() {
56
76
  }
57
77
 
58
78
  function _templateObject14() {
59
- var data = (0, _taggedTemplateLiteral2["default"])(["\n padding: calc((39px - 1.75em) / 2) 0 calc((39px - 1.75em) / 2) 1em;\n line-height: 1.75em;\n list-style-type: none;\n cursor: pointer;\n\n ", "\n"]);
79
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n padding: 0 0.5rem;\n line-height: 1.715em;\n cursor: pointer;\n\n box-shadow: inset 0 0 0 2px\n ", ";\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n"]);
60
80
 
61
81
  _templateObject14 = function _templateObject14() {
62
82
  return data;
@@ -66,7 +86,7 @@ function _templateObject14() {
66
86
  }
67
87
 
68
88
  function _templateObject13() {
69
- var data = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n position: absolute;\n z-index: 1;\n max-height: 160px;\n overflow: auto;\n top: calc(100% + 4px);\n left: 0;\n margin: 0;\n padding: 0;\n width: 100%;\n box-sizing: border-box;\n cursor: default;\n border-radius: 4px;\n border: 1px solid ", ";\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n"]);
89
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n z-index: 1;\n max-height: 304px;\n overflow-y: auto;\n top: calc(100% + 4px);\n left: 0;\n margin: 0;\n padding: 0.25rem 0;\n width: 100%;\n background-color: ", ";\n border: 1px solid\n ", ";\n border-radius: 0.25rem;\n box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);\n cursor: default;\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n"]);
70
90
 
71
91
  _templateObject13 = function _templateObject13() {
72
92
  return data;
@@ -86,7 +106,7 @@ function _templateObject12() {
86
106
  }
87
107
 
88
108
  function _templateObject11() {
89
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n padding: 3px;\n height: 18px;\n width: 18px;\n margin-left: calc(1rem * 0.25);\n pointer-events: none;\n color: ", ";\n\n svg {\n line-height: 18px;\n font-size: 1.25rem;\n }\n"]);
109
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n padding: 3px;\n height: 18px;\n width: 18px;\n margin-left: 0.25rem;\n color: ", ";\n\n svg {\n line-height: 18px;\n font-size: 1.25rem;\n }\n"]);
90
110
 
91
111
  _templateObject11 = function _templateObject11() {
92
112
  return data;
@@ -96,7 +116,7 @@ function _templateObject11() {
96
116
  }
97
117
 
98
118
  function _templateObject10() {
99
- var data = (0, _taggedTemplateLiteral2["default"])(["\n height: calc(1rem * 1.5);\n line-height: calc(1rem * 1.5);\n margin: 0 calc(1rem * 0.25);\n padding: 0 0 0 calc(1rem * 0.5);\n ", ";\n font-family: ", ";\n font-size: 1rem;\n pointer-events: none;\n"]);
119
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n height: 1.5rem;\n line-height: 1.5rem;\n margin: 0 0.25rem;\n padding: 0 0 0 0.5rem;\n ", ";\n font-family: ", ";\n font-size: 1rem;\n pointer-events: none;\n"]);
100
120
 
101
121
  _templateObject10 = function _templateObject10() {
102
122
  return data;
@@ -106,7 +126,7 @@ function _templateObject10() {
106
126
  }
107
127
 
108
128
  function _templateObject9() {
109
- var data = (0, _taggedTemplateLiteral2["default"])(["\n height: calc(1rem * 1.5);\n line-height: calc(1rem * 1.5);\n margin-left: calc(1rem * 0.25);\n padding: 0 calc(1rem * 0.5) 0 0;\n ", ";\n font-family: ", ";\n font-size: 1rem;\n pointer-events: none;\n"]);
129
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n height: 1.5rem;\n line-height: 1.5rem;\n margin-left: 0.25rem;\n padding: 0 0.5rem 0 0;\n ", ";\n font-family: ", ";\n font-size: 1rem;\n pointer-events: none;\n"]);
110
130
 
111
131
  _templateObject9 = function _templateObject9() {
112
132
  return data;
@@ -116,7 +136,7 @@ function _templateObject9() {
116
136
  }
117
137
 
118
138
  function _templateObject8() {
119
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 24px;\n width: 24px;\n font-size: 1rem;\n font-family: ", ";\n border: 1px solid transparent;\n border-radius: 4px;\n padding: 3px;\n margin-left: calc(1rem * 0.25);\n ", "\n\n background-color: ", ";\n\n color: ", ";\n\n ", "\n\n svg {\n line-height: 18px;\n }\n"]);
139
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 24px;\n width: 24px;\n font-size: 1rem;\n font-family: ", ";\n border: 1px solid transparent;\n border-radius: 2px;\n padding: 3px;\n margin-left: 0.25rem;\n ", "\n\n box-shadow: 0 0 0 2px transparent;\n background-color: ", ";\n\n color: ", ";\n\n ", "\n\n svg {\n line-height: 18px;\n }\n"]);
120
140
 
121
141
  _templateObject8 = function _templateObject8() {
122
142
  return data;
@@ -136,7 +156,7 @@ function _templateObject7() {
136
156
  }
137
157
 
138
158
  function _templateObject6() {
139
- var data = (0, _taggedTemplateLiteral2["default"])(["\n height: calc(calc(1rem * 2.5) - calc(1px * 2));\n width: 100%;\n background: none;\n border: none;\n outline: none;\n padding: 0 calc(1rem * 0.5);\n\n color: ", ";\n\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: 1.5em;\n ", "\n\n ::placeholder {\n color: ", ";\n }\n"]);
159
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n height: calc(2.5rem - 2px);\n width: 100%;\n background: none;\n border: none;\n outline: none;\n padding: 0 0.5rem;\n\n color: ", ";\n\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: 1.5em;\n ", "\n\n ::placeholder {\n color: ", ";\n }\n"]);
140
160
 
141
161
  _templateObject6 = function _templateObject6() {
142
162
  return data;
@@ -146,7 +166,7 @@ function _templateObject6() {
146
166
  }
147
167
 
148
168
  function _templateObject5() {
149
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n position: relative;\n align-items: center;\n height: calc(calc(1rem * 2.5) - calc(1px * 2));\n margin: calc(1rem * 0.25) 0;\n padding: 0 calc(1rem * 0.5);\n\n ", "\n box-shadow: 0 0 0 2px transparent;\n border-radius: 4px;\n border: 1px solid\n ", ";\n ", "\n ", ";\n\n ", ";\n"]);
169
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n position: relative;\n align-items: center;\n height: calc(2.5rem - 2px);\n margin: ", ";\n padding: 0 0.5rem;\n\n ", "\n box-shadow: 0 0 0 2px transparent;\n border-radius: 4px;\n border: 1px solid\n ", ";\n ", "\n ", ";\n\n ", ";\n"]);
150
170
 
151
171
  _templateObject5 = function _templateObject5() {
152
172
  return data;
@@ -156,7 +176,7 @@ function _templateObject5() {
156
176
  }
157
177
 
158
178
  function _templateObject4() {
159
- var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: 1.5em;\n"]);
179
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n"]);
160
180
 
161
181
  _templateObject4 = function _templateObject4() {
162
182
  return data;
@@ -176,7 +196,7 @@ function _templateObject3() {
176
196
  }
177
197
 
178
198
  function _templateObject2() {
179
- var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: 1.75em;\n"]);
199
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n"]);
180
200
 
181
201
  _templateObject2 = function _templateObject2() {
182
202
  return data;
@@ -186,7 +206,7 @@ function _templateObject2() {
186
206
  }
187
207
 
188
208
  function _templateObject() {
189
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n\n width: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
209
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n\n width: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
190
210
 
191
211
  _templateObject = function _templateObject() {
192
212
  return data;
@@ -195,6 +215,54 @@ function _templateObject() {
195
215
  return data;
196
216
  }
197
217
 
218
+ var textInputIcons = {
219
+ error: _react["default"].createElement("svg", {
220
+ xmlns: "http://www.w3.org/2000/svg",
221
+ height: "24px",
222
+ viewBox: "0 0 24 24",
223
+ width: "24px",
224
+ fill: "currentColor"
225
+ }, _react["default"].createElement("path", {
226
+ d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"
227
+ })),
228
+ clear: _react["default"].createElement("svg", {
229
+ xmlns: "http://www.w3.org/2000/svg",
230
+ width: "24",
231
+ height: "24",
232
+ viewBox: "0 0 24 24",
233
+ fill: "currentColor"
234
+ }, _react["default"].createElement("path", {
235
+ d: "M0 0h24v24H0V0z",
236
+ fill: "none"
237
+ }), _react["default"].createElement("path", {
238
+ d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
239
+ })),
240
+ increment: _react["default"].createElement("svg", {
241
+ xmlns: "http://www.w3.org/2000/svg",
242
+ height: "24px",
243
+ viewBox: "0 0 24 24",
244
+ width: "24px",
245
+ fill: "currentColor"
246
+ }, _react["default"].createElement("path", {
247
+ d: "M0 0h24v24H0z",
248
+ fill: "none"
249
+ }), _react["default"].createElement("path", {
250
+ d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
251
+ })),
252
+ decrement: _react["default"].createElement("svg", {
253
+ xmlns: "http://www.w3.org/2000/svg",
254
+ height: "24px",
255
+ viewBox: "0 0 24 24",
256
+ width: "24px",
257
+ fill: "currentColor"
258
+ }, _react["default"].createElement("path", {
259
+ d: "M0 0h24v24H0z",
260
+ fill: "none"
261
+ }), _react["default"].createElement("path", {
262
+ d: "M19 13H5v-2h14v2z"
263
+ }))
264
+ };
265
+
198
266
  var makeCancelable = function makeCancelable(promise) {
199
267
  var hasCanceled_ = false;
200
268
  var wrappedPromise = new Promise(function (resolve, reject) {
@@ -224,15 +292,17 @@ var getLengthErrorMessage = function getLengthErrorMessage(length) {
224
292
  return "Min length ".concat(length.min, ", max length ").concat(length.max, ".");
225
293
  };
226
294
 
295
+ var getPatternErrorMessage = function getPatternErrorMessage() {
296
+ return "Please match the format requested.";
297
+ };
298
+
227
299
  var patternMatch = function patternMatch(pattern, value) {
228
300
  return new RegExp(pattern).test(value);
229
301
  };
230
302
 
231
- var getPatternErrorMessage = function getPatternErrorMessage() {
232
- return "Please match the format requested.";
233
- };
303
+ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
304
+ var _action$title;
234
305
 
235
- var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
236
306
  var _ref$label = _ref.label,
237
307
  label = _ref$label === void 0 ? "" : _ref$label,
238
308
  _ref$name = _ref.name,
@@ -257,94 +327,61 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
257
327
  onBlur = _ref.onBlur,
258
328
  _ref$error = _ref.error,
259
329
  error = _ref$error === void 0 ? "" : _ref$error,
260
- margin = _ref.margin,
261
- _ref$size = _ref.size,
262
- size = _ref$size === void 0 ? "medium" : _ref$size,
263
330
  suggestions = _ref.suggestions,
264
331
  pattern = _ref.pattern,
265
332
  length = _ref.length,
266
333
  _ref$autocomplete = _ref.autocomplete,
267
334
  autocomplete = _ref$autocomplete === void 0 ? "off" : _ref$autocomplete,
335
+ margin = _ref.margin,
336
+ _ref$size = _ref.size,
337
+ size = _ref$size === void 0 ? "medium" : _ref$size,
268
338
  _ref$tabIndex = _ref.tabIndex,
269
339
  tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
270
340
 
271
- var _useState = (0, _react.useState)(""),
272
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
273
- innerValue = _useState2[0],
274
- setInnerValue = _useState2[1];
341
+ var _useState = (0, _react.useState)("input-".concat((0, _uuid.v4)())),
342
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 1),
343
+ inputId = _useState2[0];
275
344
 
276
- var _useState3 = (0, _react.useState)(false),
345
+ var _useState3 = (0, _react.useState)(""),
277
346
  _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
278
- isOpen = _useState4[0],
279
- changeIsOpen = _useState4[1];
347
+ innerValue = _useState4[0],
348
+ setInnerValue = _useState4[1];
280
349
 
281
350
  var _useState5 = (0, _react.useState)(false),
282
351
  _useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
283
- isSearching = _useState6[0],
284
- changeIsSearching = _useState6[1];
352
+ isOpen = _useState6[0],
353
+ changeIsOpen = _useState6[1];
285
354
 
286
355
  var _useState7 = (0, _react.useState)(false),
287
356
  _useState8 = (0, _slicedToArray2["default"])(_useState7, 2),
288
- isScrollable = _useState8[0],
289
- changeIsScrollable = _useState8[1];
357
+ isSearching = _useState8[0],
358
+ changeIsSearching = _useState8[1];
290
359
 
291
360
  var _useState9 = (0, _react.useState)(false),
292
361
  _useState10 = (0, _slicedToArray2["default"])(_useState9, 2),
293
- isActiveSuggestion = _useState10[0],
294
- changeIsActiveSuggestion = _useState10[1];
362
+ isAutosuggestError = _useState10[0],
363
+ changeIsAutosuggestError = _useState10[1];
295
364
 
296
- var _useState11 = (0, _react.useState)(false),
365
+ var _useState11 = (0, _react.useState)([]),
297
366
  _useState12 = (0, _slicedToArray2["default"])(_useState11, 2),
298
- isAutosuggestError = _useState12[0],
299
- changeIsAutosuggestError = _useState12[1];
367
+ filteredSuggestions = _useState12[0],
368
+ changeFilteredSuggestions = _useState12[1];
300
369
 
301
- var _useState13 = (0, _react.useState)(""),
370
+ var _useState13 = (0, _react.useState)(-1),
302
371
  _useState14 = (0, _slicedToArray2["default"])(_useState13, 2),
303
- validationError = _useState14[0],
304
- changeValidationError = _useState14[1];
305
-
306
- var _useState15 = (0, _react.useState)([]),
307
- _useState16 = (0, _slicedToArray2["default"])(_useState15, 2),
308
- filteredSuggestions = _useState16[0],
309
- changeFilteredSuggestions = _useState16[1];
310
-
311
- var _useState17 = (0, _react.useState)(-1),
312
- _useState18 = (0, _slicedToArray2["default"])(_useState17, 2),
313
- visualFocusedSuggIndex = _useState18[0],
314
- changeVisualFocusedSuggIndex = _useState18[1];
315
-
316
- var _useState19 = (0, _react.useState)(null),
317
- _useState20 = (0, _slicedToArray2["default"])(_useState19, 2),
318
- minNumber = _useState20[0],
319
- setMinNumber = _useState20[1];
320
-
321
- var _useState21 = (0, _react.useState)(null),
322
- _useState22 = (0, _slicedToArray2["default"])(_useState21, 2),
323
- maxNumber = _useState22[0],
324
- setMaxNumber = _useState22[1];
325
-
326
- var _useState23 = (0, _react.useState)(null),
327
- _useState24 = (0, _slicedToArray2["default"])(_useState23, 2),
328
- stepNumber = _useState24[0],
329
- setStepNumber = _useState24[1];
372
+ visualFocusedSuggIndex = _useState14[0],
373
+ changeVisualFocusedSuggIndex = _useState14[1];
330
374
 
331
375
  var suggestionsRef = (0, _react.useRef)(null);
332
376
  var inputRef = (0, _react.useRef)(null);
333
377
  var actionRef = (0, _react.useRef)(null);
334
378
  var colorsTheme = (0, _useTheme["default"])();
335
379
  var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
336
- var inputId = "input-".concat((0, _uuid.v4)());
337
380
  var autosuggestId = "".concat(inputId, "-listBox");
338
381
  var errorId = "error-message-".concat(inputId);
339
- var numberContext = (0, _react.useContext)(_NumberContext["default"]);
340
-
341
- var changeValue = function changeValue(newValue) {
342
- var changedValue = typeof newValue === "number" ? newValue.toString() : newValue;
343
- value !== null && value !== void 0 ? value : setInnerValue(newValue);
344
- typeof onChange === "function" && onChange(changedValue);
345
- };
382
+ var numberInputContext = (0, _react.useContext)(_NumberInputContext["default"]);
346
383
 
347
- var notOptionalCheck = function notOptionalCheck(value) {
384
+ var isNotOptional = function isNotOptional(value) {
348
385
  return value === "" && !optional;
349
386
  };
350
387
 
@@ -353,19 +390,25 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
353
390
  };
354
391
 
355
392
  var isNumberIncorrect = function isNumberIncorrect(value) {
356
- return minNumber && parseInt(value) < minNumber || maxNumber && parseInt(value) > maxNumber;
393
+ return (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.minNumber) && parseInt(value) < (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.minNumber) || (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.maxNumber) && parseInt(value) > (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.maxNumber);
394
+ };
395
+
396
+ var isTextInputType = function isTextInputType() {
397
+ var _inputRef$current, _inputRef$current2;
398
+
399
+ return !(inputRef !== null && inputRef !== void 0 && (_inputRef$current = inputRef.current) !== null && _inputRef$current !== void 0 && _inputRef$current.getAttribute("type")) || (inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.getAttribute("type")) === "text";
357
400
  };
358
401
 
359
402
  var getNumberErrorMessage = function getNumberErrorMessage(value) {
360
- if (minNumber && parseInt(value) < minNumber) return "Value must be greater than or equal to ".concat(minNumber, ".");else if (maxNumber && parseInt(value) > maxNumber) return "Value must be less than or equal to ".concat(maxNumber, ".");
403
+ if (numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.minNumber && parseInt(value) < (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.minNumber)) return "Value must be greater than or equal to ".concat(numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.minNumber, ".");else if (numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.maxNumber && parseInt(value) > (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.maxNumber)) return "Value must be less than or equal to ".concat(numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.maxNumber, ".");
361
404
  };
362
405
 
363
- var hasInputSuggestions = function hasInputSuggestions() {
406
+ var hasSuggestions = function hasSuggestions() {
364
407
  return typeof suggestions === "function" || suggestions && suggestions.length > 0;
365
408
  };
366
409
 
367
410
  var openSuggestions = function openSuggestions() {
368
- hasInputSuggestions() && changeIsOpen(true);
411
+ if (hasSuggestions() && (filteredSuggestions.length > 0 || isSearching || isAutosuggestError)) changeIsOpen(true);
369
412
  };
370
413
 
371
414
  var closeSuggestions = function closeSuggestions() {
@@ -373,6 +416,27 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
373
416
  changeVisualFocusedSuggIndex(-1);
374
417
  };
375
418
 
419
+ var changeValue = function changeValue(newValue) {
420
+ value !== null && value !== void 0 ? value : setInnerValue(newValue);
421
+ var changedValue = typeof newValue === "number" ? newValue.toString() : newValue;
422
+ if (isNotOptional(newValue)) onChange === null || onChange === void 0 ? void 0 : onChange({
423
+ value: changedValue,
424
+ error: getNotOptionalErrorMessage()
425
+ });else if (isLengthIncorrect(newValue)) onChange === null || onChange === void 0 ? void 0 : onChange({
426
+ value: changedValue,
427
+ error: getLengthErrorMessage(length)
428
+ });else if (newValue && pattern && !patternMatch(pattern, newValue)) onChange === null || onChange === void 0 ? void 0 : onChange({
429
+ value: changedValue,
430
+ error: getPatternErrorMessage()
431
+ });else if (newValue && isNumberIncorrect(newValue)) onChange === null || onChange === void 0 ? void 0 : onChange({
432
+ value: changedValue,
433
+ error: getNumberErrorMessage(newValue)
434
+ });else onChange === null || onChange === void 0 ? void 0 : onChange({
435
+ value: changedValue,
436
+ error: null
437
+ });
438
+ };
439
+
376
440
  var handleInputContainerOnClick = function handleInputContainerOnClick() {
377
441
  document.activeElement !== actionRef.current && inputRef.current.focus();
378
442
  };
@@ -388,38 +452,22 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
388
452
 
389
453
  var handleIOnBlur = function handleIOnBlur(event) {
390
454
  suggestions && closeSuggestions();
391
-
392
- if (notOptionalCheck(event.target.value)) {
393
- changeValidationError(getNotOptionalErrorMessage());
394
- onBlur === null || onBlur === void 0 ? void 0 : onBlur({
395
- value: event.target.value,
396
- error: getNotOptionalErrorMessage()
397
- });
398
- } else if (isLengthIncorrect(event.target.value)) {
399
- changeValidationError(getLengthErrorMessage(length, event));
400
- onBlur === null || onBlur === void 0 ? void 0 : onBlur({
401
- value: event.target.value,
402
- error: getLengthErrorMessage(length)
403
- });
404
- } else if (event.target.value && pattern && !patternMatch(pattern, event.target.value)) {
405
- changeValidationError(getPatternErrorMessage());
406
- onBlur === null || onBlur === void 0 ? void 0 : onBlur({
407
- value: event.target.value,
408
- error: getPatternErrorMessage()
409
- });
410
- } else if (event.target.value && isNumberIncorrect(event.target.value)) {
411
- changeValidationError(getNumberErrorMessage(event.target.value));
412
- onBlur === null || onBlur === void 0 ? void 0 : onBlur({
413
- value: event.target.value,
414
- error: getNumberErrorMessage(event.target.value)
415
- });
416
- } else {
417
- changeValidationError("");
418
- onBlur === null || onBlur === void 0 ? void 0 : onBlur({
419
- value: event.target.value,
420
- error: null
421
- });
422
- }
455
+ if (isNotOptional(event.target.value)) onBlur === null || onBlur === void 0 ? void 0 : onBlur({
456
+ value: event.target.value,
457
+ error: getNotOptionalErrorMessage()
458
+ });else if (isLengthIncorrect(event.target.value)) onBlur === null || onBlur === void 0 ? void 0 : onBlur({
459
+ value: event.target.value,
460
+ error: getLengthErrorMessage(length)
461
+ });else if (event.target.value && pattern && !patternMatch(pattern, event.target.value)) onBlur === null || onBlur === void 0 ? void 0 : onBlur({
462
+ value: event.target.value,
463
+ error: getPatternErrorMessage()
464
+ });else if (event.target.value && isNumberIncorrect(event.target.value)) onBlur === null || onBlur === void 0 ? void 0 : onBlur({
465
+ value: event.target.value,
466
+ error: getNumberErrorMessage(event.target.value)
467
+ });else onBlur === null || onBlur === void 0 ? void 0 : onBlur({
468
+ value: event.target.value,
469
+ error: null
470
+ });
423
471
  };
424
472
 
425
473
  var handleIOnFocus = function handleIOnFocus() {
@@ -430,7 +478,7 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
430
478
  switch (event.keyCode) {
431
479
  case 40:
432
480
  // Arrow Down
433
- if (numberContext) {
481
+ if (numberInputContext) {
434
482
  decrementNumber();
435
483
  event.preventDefault();
436
484
  } else {
@@ -441,8 +489,6 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
441
489
  changeVisualFocusedSuggIndex(function (visualFocusedSuggIndex) {
442
490
  if (visualFocusedSuggIndex < filteredSuggestions.length - 1) return visualFocusedSuggIndex + 1;else if (visualFocusedSuggIndex === filteredSuggestions.length - 1) return 0;
443
491
  });
444
- changeIsScrollable(true);
445
- changeIsActiveSuggestion(false);
446
492
  }
447
493
  }
448
494
 
@@ -450,7 +496,7 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
450
496
 
451
497
  case 38:
452
498
  // Arrow Up
453
- if (numberContext) {
499
+ if (numberInputContext) {
454
500
  incrementNumber();
455
501
  event.preventDefault();
456
502
  } else {
@@ -461,8 +507,6 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
461
507
  changeVisualFocusedSuggIndex(function (visualFocusedSuggIndex) {
462
508
  if (visualFocusedSuggIndex === 0 || visualFocusedSuggIndex === -1) return filteredSuggestions.length > 0 ? filteredSuggestions.length - 1 : suggestions.length - 1;else return visualFocusedSuggIndex - 1;
463
509
  });
464
- changeIsScrollable(true);
465
- changeIsActiveSuggestion(false);
466
510
  }
467
511
  }
468
512
 
@@ -472,7 +516,7 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
472
516
  // Esc
473
517
  event.preventDefault();
474
518
 
475
- if (hasInputSuggestions()) {
519
+ if (hasSuggestions()) {
476
520
  changeValue("");
477
521
  isOpen && closeSuggestions();
478
522
  }
@@ -481,7 +525,7 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
481
525
 
482
526
  case 13:
483
527
  // Enter
484
- if (hasInputSuggestions() && !isSearching) {
528
+ if (hasSuggestions() && !isSearching) {
485
529
  var validFocusedSuggestion = filteredSuggestions.length > 0 && visualFocusedSuggIndex >= 0 && visualFocusedSuggIndex < filteredSuggestions.length;
486
530
  validFocusedSuggestion && changeValue(filteredSuggestions[visualFocusedSuggIndex]);
487
531
  isOpen && closeSuggestions();
@@ -491,29 +535,81 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
491
535
  }
492
536
  };
493
537
 
538
+ var handleClearActionOnClick = function handleClearActionOnClick() {
539
+ changeValue("");
540
+ inputRef.current.focus();
541
+ suggestions && closeSuggestions();
542
+ };
543
+
544
+ var handleDecrementActionOnClick = function handleDecrementActionOnClick() {
545
+ decrementNumber();
546
+ inputRef.current.focus();
547
+ };
548
+
549
+ var handleIncrementActionOnClick = function handleIncrementActionOnClick() {
550
+ incrementNumber();
551
+ inputRef.current.focus();
552
+ };
553
+
494
554
  var setNumberProps = function setNumberProps(type, min, max, step) {
495
- var _inputRef$current, _inputRef$current2, _inputRef$current3, _inputRef$current4;
555
+ var _inputRef$current3, _inputRef$current4, _inputRef$current5, _inputRef$current6;
556
+
557
+ type && (inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.setAttribute("type", type));
558
+ min && (inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current4 = inputRef.current) === null || _inputRef$current4 === void 0 ? void 0 : _inputRef$current4.setAttribute("min", min));
559
+ max && (inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current5 = inputRef.current) === null || _inputRef$current5 === void 0 ? void 0 : _inputRef$current5.setAttribute("max", max));
560
+ step && (inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current6 = inputRef.current) === null || _inputRef$current6 === void 0 ? void 0 : _inputRef$current6.setAttribute("step", step));
561
+ };
562
+
563
+ var decrementNumber = function decrementNumber() {
564
+ var numberValue = value !== null && value !== void 0 ? value : innerValue;
565
+
566
+ if (numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.minNumber && parseInt(numberValue) < (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.minNumber)) {
567
+ changeValue(parseInt(numberValue));
568
+ } else if (numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.maxNumber && parseInt(numberValue) > (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.maxNumber)) {
569
+ changeValue(numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.maxNumber);
570
+ } else if (numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.minNumber && (parseInt(numberValue) === (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.minNumber) || numberValue === "" || numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.stepNumber && parseInt(numberValue) - (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.stepNumber) < (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.minNumber))) {
571
+ changeValue(numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.minNumber);
572
+ } else if (numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.stepNumber && numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.minNumber && parseInt(numberValue) - (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.stepNumber) >= (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.minNumber) || numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.stepNumber && numberValue !== "") {
573
+ changeValue(parseInt(numberValue) - (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.stepNumber));
574
+ } else if (numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.stepNumber && numberValue == "") {
575
+ changeValue(-(numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.stepNumber));
576
+ } else if (numberValue === "") {
577
+ changeValue(-1);
578
+ } else {
579
+ changeValue(parseInt(numberValue) - 1);
580
+ }
581
+ };
496
582
 
497
- type && (inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.setAttribute("type", type));
498
- min && (inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.setAttribute("min", min));
499
- max && (inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.setAttribute("max", max));
500
- step && (inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current4 = inputRef.current) === null || _inputRef$current4 === void 0 ? void 0 : _inputRef$current4.setAttribute("step", step));
501
- setMinNumber(min);
502
- setMaxNumber(max);
503
- setStepNumber(step);
583
+ var incrementNumber = function incrementNumber() {
584
+ var numberValue = value !== null && value !== void 0 ? value : innerValue;
585
+
586
+ if (numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.maxNumber && parseInt(numberValue) > (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.maxNumber)) {
587
+ changeValue(parseInt(numberValue));
588
+ } else if (numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.minNumber && (parseInt(numberValue) < (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.minNumber) || numberValue === "")) {
589
+ changeValue(numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.minNumber);
590
+ } else if (numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.maxNumber && (parseInt(numberValue) === (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.maxNumber) || numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.stepNumber && parseInt(numberValue) + (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.stepNumber) > (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.maxNumber))) {
591
+ changeValue(numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.maxNumber);
592
+ } else if (numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.stepNumber && numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.maxNumber && parseInt(numberValue) + (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.stepNumber) <= (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.maxNumber) || numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.stepNumber && numberValue !== "") {
593
+ changeValue(parseInt(numberValue) + (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.stepNumber));
594
+ } else if (numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.stepNumber && numberValue == "") {
595
+ changeValue(numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.stepNumber);
596
+ } else if (numberValue === "") {
597
+ changeValue(1);
598
+ } else {
599
+ changeValue(parseInt(numberValue) + 1);
600
+ }
504
601
  };
505
602
 
506
603
  (0, _react.useLayoutEffect)(function () {
507
- var _suggestionsRef$curre;
604
+ var _suggestionsRef$curre, _visualFocusedOptionE;
508
605
 
509
- isScrollable && (suggestionsRef === null || suggestionsRef === void 0 ? void 0 : (_suggestionsRef$curre = suggestionsRef.current) === null || _suggestionsRef$curre === void 0 ? void 0 : _suggestionsRef$curre.scrollTo({
510
- top: visualFocusedSuggIndex * 39
511
- }));
512
- return changeIsScrollable(false);
513
- }, [isScrollable, visualFocusedSuggIndex]);
606
+ var visualFocusedOptionEl = suggestionsRef === null || suggestionsRef === void 0 ? void 0 : (_suggestionsRef$curre = suggestionsRef.current) === null || _suggestionsRef$curre === void 0 ? void 0 : _suggestionsRef$curre.querySelectorAll("[role='option']")[visualFocusedSuggIndex];
607
+ visualFocusedOptionEl === null || visualFocusedOptionEl === void 0 ? void 0 : (_visualFocusedOptionE = visualFocusedOptionEl.scrollIntoView) === null || _visualFocusedOptionE === void 0 ? void 0 : _visualFocusedOptionE.call(visualFocusedOptionEl, {
608
+ block: "nearest",
609
+ inline: "start"
610
+ });
611
+ }, [visualFocusedSuggIndex]);
514
612
  (0, _react.useEffect)(function () {
515
- var _inputRef$current5;
516
-
517
613
  if (typeof suggestions === "function") {
518
614
  changeIsSearching(true);
519
615
  changeIsAutosuggestError(false);
@@ -532,130 +628,35 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
532
628
  return function () {
533
629
  cancelablePromise.cancel();
534
630
  };
535
- } else if (suggestions && suggestions.length) {
631
+ } else if ((suggestions === null || suggestions === void 0 ? void 0 : suggestions.length) > 0) {
536
632
  changeFilteredSuggestions(suggestions.filter(function (suggestion) {
537
633
  return suggestion.toUpperCase().startsWith((value !== null && value !== void 0 ? value : innerValue).toUpperCase());
538
634
  }));
539
635
  changeVisualFocusedSuggIndex(-1);
540
636
  }
541
637
 
542
- numberContext && setNumberProps(numberContext.typeNumber, numberContext.minNumber, numberContext.maxNumber, numberContext.stepNumber);
543
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current5 = inputRef.current) === null || _inputRef$current5 === void 0 ? void 0 : _inputRef$current5.addEventListener("wheel", function (event) {
544
- return event.preventDefault();
545
- });
638
+ numberInputContext && setNumberProps(numberInputContext.typeNumber, numberInputContext.minNumber, numberInputContext.maxNumber, numberInputContext.stepNumber);
546
639
  }, [value, innerValue, suggestions]);
547
- var defaultClearAction = {
548
- onClick: function onClick() {
549
- changeValue("");
550
- inputRef.current.focus();
551
- suggestions && closeSuggestions();
552
- },
553
- icon: _react["default"].createElement("svg", {
554
- xmlns: "http://www.w3.org/2000/svg",
555
- width: "24",
556
- height: "24",
557
- viewBox: "0 0 24 24",
558
- fill: "currentColor"
559
- }, _react["default"].createElement("path", {
560
- d: "M0 0h24v24H0V0z",
561
- fill: "none"
562
- }), _react["default"].createElement("path", {
563
- d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
564
- }))
565
- };
566
-
567
- var errorIcon = _react["default"].createElement("svg", {
568
- xmlns: "http://www.w3.org/2000/svg",
569
- height: "24px",
570
- viewBox: "0 0 24 24",
571
- width: "24px",
572
- fill: "currentColor"
573
- }, _react["default"].createElement("path", {
574
- d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"
575
- }));
640
+ (0, _react.useLayoutEffect)(function () {
641
+ if (filteredSuggestions.length === 0 && !isSearching && !isAutosuggestError) closeSuggestions();
642
+ }, [filteredSuggestions]);
576
643
 
577
- var decrementNumber = function decrementNumber() {
578
- var numberValue = value || innerValue;
644
+ var getLastOptionIndex = function getLastOptionIndex() {
645
+ var last = 0;
579
646
 
580
- if (minNumber && parseInt(numberValue) < minNumber) {
581
- changeValue(parseInt(numberValue));
582
- } else if (maxNumber && parseInt(numberValue) > maxNumber) {
583
- changeValue(maxNumber);
584
- } else if (minNumber && (parseInt(numberValue) === minNumber || numberValue === "" || stepNumber && parseInt(numberValue) - stepNumber < minNumber)) {
585
- changeValue(minNumber);
586
- } else if (stepNumber && minNumber && parseInt(numberValue) - stepNumber >= minNumber || stepNumber && numberValue !== "") {
587
- changeValue(parseInt(numberValue) - stepNumber);
588
- } else if (stepNumber && numberValue == "") {
589
- changeValue(-stepNumber);
590
- } else if (numberValue === "") {
591
- changeValue(-1);
592
- } else {
593
- changeValue(parseInt(numberValue) - 1);
594
- }
595
- };
647
+ var reducer = function reducer(acc, current) {
648
+ var _current$options;
596
649
 
597
- var incrementNumber = function incrementNumber() {
598
- var numberValue = value || innerValue;
650
+ return acc + ((_current$options = current.options) === null || _current$options === void 0 ? void 0 : _current$options.length);
651
+ };
599
652
 
600
- if (maxNumber && parseInt(numberValue) > maxNumber) {
601
- changeValue(parseInt(numberValue));
602
- } else if (minNumber && (parseInt(numberValue) < minNumber || numberValue === "")) {
603
- changeValue(minNumber);
604
- } else if (maxNumber && (parseInt(numberValue) === maxNumber || stepNumber && parseInt(numberValue) + stepNumber > maxNumber)) {
605
- changeValue(maxNumber);
606
- } else if (stepNumber && maxNumber && parseInt(numberValue) + stepNumber <= maxNumber || stepNumber && numberValue !== "") {
607
- changeValue(parseInt(numberValue) + stepNumber);
608
- } else if (stepNumber && numberValue == "") {
609
- changeValue(stepNumber);
610
- } else if (numberValue === "") {
611
- changeValue(1);
612
- } else {
613
- changeValue(parseInt(numberValue) + 1);
614
- }
615
- };
616
-
617
- var decrementAction = {
618
- onClick: function onClick() {
619
- decrementNumber();
620
- inputRef.current.focus();
621
- },
622
- icon: _react["default"].createElement("svg", {
623
- xmlns: "http://www.w3.org/2000/svg",
624
- height: "24px",
625
- viewBox: "0 0 24 24",
626
- width: "24px",
627
- fill: "currentColor"
628
- }, _react["default"].createElement("path", {
629
- d: "M0 0h24v24H0z",
630
- fill: "none"
631
- }), _react["default"].createElement("path", {
632
- d: "M19 13H5v-2h14v2z"
633
- }))
634
- };
635
- var incrementAction = {
636
- onClick: function onClick() {
637
- incrementNumber();
638
- inputRef.current.focus();
639
- },
640
- icon: _react["default"].createElement("svg", {
641
- xmlns: "http://www.w3.org/2000/svg",
642
- height: "24px",
643
- viewBox: "0 0 24 24",
644
- width: "24px",
645
- fill: "currentColor"
646
- }, _react["default"].createElement("path", {
647
- d: "M0 0h24v24H0z",
648
- fill: "none"
649
- }), _react["default"].createElement("path", {
650
- d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
651
- }))
653
+ if (filteredSuggestions.length > 0) filteredSuggestions[0].options ? last = filteredSuggestions.reduce(reducer, 0) - 1 : last = filteredSuggestions.length - 1;
654
+ return last;
652
655
  };
653
656
 
654
- var isTextInputType = function isTextInputType() {
655
- var _inputRef$current6, _inputRef$current7;
656
-
657
- return !(inputRef !== null && inputRef !== void 0 && (_inputRef$current6 = inputRef.current) !== null && _inputRef$current6 !== void 0 && _inputRef$current6.getAttribute("type")) || (inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current7 = inputRef.current) === null || _inputRef$current7 === void 0 ? void 0 : _inputRef$current7.getAttribute("type")) === "text";
658
- };
657
+ var lastOptionIndex = (0, _react.useMemo)(function () {
658
+ return getLastOptionIndex();
659
+ }, [filteredSuggestions]);
659
660
 
660
661
  var HighlightedSuggestion = function HighlightedSuggestion(_ref2) {
661
662
  var suggestion = _ref2.suggestion,
@@ -663,33 +664,24 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
663
664
  var regEx = new RegExp(value !== null && value !== void 0 ? value : innerValue, "i");
664
665
  var matchedWords = suggestion.match(regEx);
665
666
  var noMatchedWords = suggestion.replace(regEx, "");
667
+ var isLastOption = index === lastOptionIndex;
666
668
  return _react["default"].createElement(Suggestion, {
667
669
  id: "suggestion-".concat(index),
668
- onMouseDown: function onMouseDown() {
669
- changeIsActiveSuggestion(true);
670
- },
671
- onMouseUp: function onMouseUp() {
672
- if (isActiveSuggestion) {
673
- changeValue(suggestion);
674
- changeIsActiveSuggestion(false);
675
- closeSuggestions();
676
- }
677
- },
678
- onMouseEnter: function onMouseEnter() {
679
- changeVisualFocusedSuggIndex(index);
680
- },
681
- onMouseLeave: function onMouseLeave() {
682
- changeIsActiveSuggestion(false);
670
+ onClick: function onClick() {
671
+ changeValue(suggestion);
672
+ closeSuggestions();
683
673
  },
684
- visualFocused: visualFocusedSuggIndex === index,
685
- active: visualFocusedSuggIndex === index && isActiveSuggestion,
686
674
  role: "option",
687
- "aria-selected": visualFocusedSuggIndex === index && "true"
688
- }, typeof suggestions === "function" ? suggestion : _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement("strong", null, matchedWords), noMatchedWords));
675
+ "aria-selected": visualFocusedSuggIndex === index && "true",
676
+ visualFocused: visualFocusedSuggIndex === index
677
+ }, _react["default"].createElement(StyledSuggestion, {
678
+ last: isLastOption,
679
+ visualFocused: visualFocusedSuggIndex === index
680
+ }, typeof suggestions === "function" ? suggestion : _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement("strong", null, matchedWords), noMatchedWords)));
689
681
  };
690
682
 
691
683
  return _react["default"].createElement(_styledComponents.ThemeProvider, {
692
- theme: colorsTheme.newInputText
684
+ theme: colorsTheme.textInput
693
685
  }, _react["default"].createElement(DxcInput, {
694
686
  margin: margin,
695
687
  ref: ref,
@@ -702,7 +694,7 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
702
694
  disabled: disabled,
703
695
  backgroundType: backgroundType
704
696
  }, helperText), _react["default"].createElement(InputContainer, {
705
- error: error || validationError,
697
+ error: error,
706
698
  disabled: disabled,
707
699
  backgroundType: backgroundType,
708
700
  onClick: handleInputContainerOnClick
@@ -723,42 +715,45 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
723
715
  ref: inputRef,
724
716
  backgroundType: backgroundType,
725
717
  pattern: pattern,
718
+ minLength: length === null || length === void 0 ? void 0 : length.min,
719
+ maxLength: length === null || length === void 0 ? void 0 : length.max,
726
720
  autoComplete: autocomplete,
727
721
  tabIndex: tabIndex,
728
- role: isTextInputType() && hasInputSuggestions() ? "combobox" : "textbox",
729
- "aria-autocomplete": isTextInputType() && hasInputSuggestions() ? "list" : undefined,
730
- "aria-controls": isTextInputType() && hasInputSuggestions() ? inputId : undefined,
731
- "aria-expanded": isTextInputType() && hasInputSuggestions() ? isOpen ? "true" : "false" : undefined,
732
- "aria-activedescendant": isTextInputType() && hasInputSuggestions() && isOpen && visualFocusedSuggIndex !== -1 ? "suggestion-".concat(visualFocusedSuggIndex) : undefined,
733
- "aria-invalid": error || validationError ? "true" : "false",
734
- "aria-describedby": error || validationError ? errorId : undefined,
722
+ role: isTextInputType() && hasSuggestions() ? "combobox" : "textbox",
723
+ "aria-autocomplete": isTextInputType() && hasSuggestions() ? "list" : undefined,
724
+ "aria-controls": isTextInputType() && hasSuggestions() ? autosuggestId : undefined,
725
+ "aria-expanded": isTextInputType() && hasSuggestions() ? isOpen ? "true" : "false" : undefined,
726
+ "aria-activedescendant": isTextInputType() && hasSuggestions() && isOpen && visualFocusedSuggIndex !== -1 ? "suggestion-".concat(visualFocusedSuggIndex) : undefined,
727
+ "aria-invalid": error ? "true" : "false",
728
+ "aria-describedby": error ? errorId : undefined,
735
729
  "aria-required": optional ? "false" : "true"
736
- }), !disabled && (error || validationError) && _react["default"].createElement(ErrorIcon, {
730
+ }), !disabled && error && _react["default"].createElement(ErrorIcon, {
737
731
  backgroundType: backgroundType,
738
732
  "aria-label": "Error"
739
- }, errorIcon), !disabled && clearable && (value !== null && value !== void 0 ? value : innerValue).length > 0 && _react["default"].createElement(Action, {
740
- onClick: defaultClearAction.onClick,
733
+ }, textInputIcons.error), !disabled && clearable && (value !== null && value !== void 0 ? value : innerValue).length > 0 && _react["default"].createElement(Action, {
734
+ onClick: handleClearActionOnClick,
741
735
  backgroundType: backgroundType,
742
736
  tabIndex: tabIndex,
743
737
  "aria-label": "Clear"
744
- }, defaultClearAction.icon), (numberContext === null || numberContext === void 0 ? void 0 : numberContext.typeNumber) === "number" ? _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(Action, {
738
+ }, textInputIcons.clear), (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.typeNumber) === "number" ? _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(Action, {
745
739
  ref: actionRef,
746
740
  disabled: disabled,
747
- onClick: decrementAction.onClick,
741
+ onClick: handleDecrementActionOnClick,
748
742
  backgroundType: backgroundType,
749
743
  tabIndex: tabIndex,
750
744
  "aria-label": "Decrement"
751
- }, decrementAction.icon), _react["default"].createElement(Action, {
745
+ }, textInputIcons.decrement), _react["default"].createElement(Action, {
752
746
  ref: actionRef,
753
747
  disabled: disabled,
754
- onClick: incrementAction.onClick,
748
+ onClick: handleIncrementActionOnClick,
755
749
  backgroundType: backgroundType,
756
750
  tabIndex: tabIndex,
757
751
  "aria-label": "Increment"
758
- }, incrementAction.icon)) : action && _react["default"].createElement(Action, {
752
+ }, textInputIcons.increment)) : action && _react["default"].createElement(Action, {
759
753
  ref: actionRef,
760
754
  disabled: disabled,
761
755
  onClick: action.onClick,
756
+ title: (_action$title = action.title) !== null && _action$title !== void 0 ? _action$title : action.title,
762
757
  backgroundType: backgroundType,
763
758
  tabIndex: tabIndex
764
759
  }, typeof action.icon === "string" ? _react["default"].createElement(ActionIcon, {
@@ -778,18 +773,18 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
778
773
  ref: suggestionsRef,
779
774
  role: "listbox",
780
775
  "aria-label": label
781
- }, !isSearching && !isAutosuggestError && filteredSuggestions.length === 0 && _react["default"].createElement(SuggestionsSystemMessage, null, "No results found"), !isSearching && !isAutosuggestError && filteredSuggestions.length > 0 && filteredSuggestions.map(function (suggestion, index) {
776
+ }, !isSearching && !isAutosuggestError && filteredSuggestions.length > 0 && filteredSuggestions.map(function (suggestion, index) {
782
777
  return _react["default"].createElement(HighlightedSuggestion, {
783
778
  key: "suggestion-".concat((0, _uuid.v4)()),
784
779
  suggestion: suggestion,
785
780
  index: index
786
781
  });
787
- }), isSearching && _react["default"].createElement(SuggestionsSystemMessage, null, "Searching..."), isAutosuggestError && _react["default"].createElement(SuggestionsError, null, _react["default"].createElement(ErrorIcon, {
782
+ }), isSearching && _react["default"].createElement(SuggestionsSystemMessage, null, "Searching..."), isAutosuggestError && _react["default"].createElement(SuggestionsError, null, _react["default"].createElement(SuggestionsErrorIcon, {
788
783
  backgroundType: backgroundType
789
- }, errorIcon), "Error fetching data"))), !disabled && _react["default"].createElement(Error, {
784
+ }, textInputIcons.error), "Error fetching data"))), !disabled && _react["default"].createElement(Error, {
790
785
  id: errorId,
791
786
  backgroundType: backgroundType
792
- }, error || validationError)));
787
+ }, error)));
793
788
  });
794
789
 
795
790
  var sizes = {
@@ -827,6 +822,8 @@ var Label = _styledComponents["default"].label(_templateObject2(), function (pro
827
822
  return props.theme.labelFontStyle;
828
823
  }, function (props) {
829
824
  return props.theme.labelFontWeight;
825
+ }, function (props) {
826
+ return props.theme.labelLineHeight;
830
827
  });
831
828
 
832
829
  var OptionalLabel = _styledComponents["default"].span(_templateObject3(), function (props) {
@@ -843,9 +840,13 @@ var HelperText = _styledComponents["default"].span(_templateObject4(), function
843
840
  return props.theme.helperTextFontStyle;
844
841
  }, function (props) {
845
842
  return props.theme.helperTextFontWeight;
843
+ }, function (props) {
844
+ return props.theme.helperTextLineHeight;
846
845
  });
847
846
 
848
847
  var InputContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
848
+ return "".concat(props.theme.inputMarginTop, " 0 ").concat(props.theme.inputMarginBottom, " 0");
849
+ }, function (props) {
849
850
  if (props.disabled) return props.backgroundType === "dark" ? "background-color: ".concat(props.theme.disabledContainerFillColorOnDark, ";") : "background-color: ".concat(props.theme.disabledContainerFillColor, ";");
850
851
  }, function (props) {
851
852
  if (props.disabled) return props.backgroundType === "dark" ? props.theme.disabledBorderColorOnDark : props.theme.disabledBorderColor;else return props.backgroundType === "dark" ? props.theme.enabledBorderColorOnDark : props.theme.enabledBorderColor;
@@ -884,7 +885,7 @@ var Action = _styledComponents["default"].button(_templateObject8(), function (p
884
885
  }, function (props) {
885
886
  return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledActionIconColorOnDark : props.theme.disabledActionIconColor : props.backgroundType === "dark" ? props.theme.actionIconColorOnDark : props.theme.actionIconColor;
886
887
  }, function (props) {
887
- return !props.disabled && "\n &:hover {\n background-color: ".concat(props.backgroundType === "dark" ? props.theme.hoverActionBackgroundColorOnDark : props.theme.hoverActionBackgroundColor, ";\n color: ").concat(props.backgroundType === "dark" ? props.theme.hoverActionIconColorOnDark : props.theme.hoverActionIconColor, ";\n }\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px ").concat(props.backgroundType === "dark" ? props.theme.focusActionBorderColorOnDark : props.theme.focusActionBorderColor, ";\n color: ").concat(props.backgroundType === "dark" ? props.theme.focusActionIconColorOnDark : props.theme.focusActionIconColor, ";\n }\n &:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px ").concat(props.backgroundType === "dark" ? props.theme.focusActionBorderColorOnDark : props.theme.focusActionBorderColor, ";\n color: ").concat(props.backgroundType === "dark" ? props.theme.focusActionIconColorOnDark : props.theme.focusActionIconColor, ";\n }\n &:active {\n background-color: ").concat(props.backgroundType === "dark" ? props.theme.activeActionBackgroundColorOnDark : props.theme.activeActionBackgroundColor, ";\n color: ").concat(props.backgroundType === "dark" ? props.theme.activeActionIconColorOnDark : props.theme.activeActionIconColor, ";\n }\n ");
888
+ return !props.disabled && "\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px ".concat(props.backgroundType === "dark" ? props.theme.focusActionBorderColorOnDark : props.theme.focusActionBorderColor, ";\n color: ").concat(props.backgroundType === "dark" ? props.theme.focusActionIconColorOnDark : props.theme.focusActionIconColor, ";\n }\n &:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px ").concat(props.backgroundType === "dark" ? props.theme.focusActionBorderColorOnDark : props.theme.focusActionBorderColor, ";\n color: ").concat(props.backgroundType === "dark" ? props.theme.focusActionIconColorOnDark : props.theme.focusActionIconColor, ";\n }\n &:hover {\n background-color: ").concat(props.backgroundType === "dark" ? props.theme.hoverActionBackgroundColorOnDark : props.theme.hoverActionBackgroundColor, ";\n color: ").concat(props.backgroundType === "dark" ? props.theme.hoverActionIconColorOnDark : props.theme.hoverActionIconColor, ";\n }\n &:active {\n background-color: ").concat(props.backgroundType === "dark" ? props.theme.activeActionBackgroundColorOnDark : props.theme.activeActionBackgroundColor, ";\n color: ").concat(props.backgroundType === "dark" ? props.theme.activeActionIconColorOnDark : props.theme.activeActionIconColor, ";\n }\n ");
888
889
  });
889
890
 
890
891
  var Prefix = _styledComponents["default"].span(_templateObject9(), function (props) {
@@ -912,9 +913,9 @@ var Error = _styledComponents["default"].span(_templateObject12(), function (pro
912
913
  });
913
914
 
914
915
  var Suggestions = _styledComponents["default"].ul(_templateObject13(), function (props) {
915
- return props.isError ? props.theme.errorMessageBackgroundColor : "#ffffff";
916
+ return props.isError ? props.theme.errorListDialogBackgroundColor : props.theme.listDialogBackgroundColor;
916
917
  }, function (props) {
917
- return props.isError ? props.theme.errorMessageBorderColor : props.theme.enabledBorderColor;
918
+ return props.isError ? props.theme.errorListDialogBorderColor : props.theme.listDialogBorderColor;
918
919
  }, function (props) {
919
920
  return props.theme.listOptionFontColor;
920
921
  }, function (props) {
@@ -928,16 +929,30 @@ var Suggestions = _styledComponents["default"].ul(_templateObject13(), function
928
929
  });
929
930
 
930
931
  var Suggestion = _styledComponents["default"].li(_templateObject14(), function (props) {
931
- return props.active ? "background-color: ".concat(props.theme.activeListOptionBackgroundColor, ";") : props.visualFocused && "background-color: ".concat(props.theme.hoverListOptionBackgroundColor, ";");
932
+ return props.visualFocused ? props.theme.focusListOptionBorderColor : "transparent";
933
+ }, function (props) {
934
+ return props.theme.hoverListOptionBackgroundColor;
935
+ }, function (props) {
936
+ return props.theme.activeListOptionBackgroundColor;
937
+ });
938
+
939
+ var StyledSuggestion = _styledComponents["default"].span(_templateObject15(), function (props) {
940
+ return props.last || props.visualFocused ? "border-bottom: 1px solid transparent" : "border-bottom: 1px solid ".concat(props.theme.listOptionDividerColor);
932
941
  });
933
942
 
934
- var SuggestionsSystemMessage = _styledComponents["default"].span(_templateObject15(), function (props) {
943
+ var SuggestionsSystemMessage = _styledComponents["default"].span(_templateObject16(), function (props) {
935
944
  return props.theme.systemMessageFontColor;
936
945
  });
937
946
 
938
- var SuggestionsError = _styledComponents["default"].span(_templateObject16());
947
+ var SuggestionsErrorIcon = _styledComponents["default"].span(_templateObject17(), function (props) {
948
+ return props.backgroundType === "dark" ? props.theme.errorIconColorOnDark : props.theme.errorIconColor;
949
+ });
950
+
951
+ var SuggestionsError = _styledComponents["default"].span(_templateObject18(), function (props) {
952
+ return props.theme.errorListDialogFontColor;
953
+ });
939
954
 
940
- DxcNewInputText.propTypes = {
955
+ DxcTextInput.propTypes = {
941
956
  label: _propTypes["default"].string,
942
957
  name: _propTypes["default"].string,
943
958
  value: _propTypes["default"].string,
@@ -973,5 +988,5 @@ DxcNewInputText.propTypes = {
973
988
  }),
974
989
  tabIndex: _propTypes["default"].number
975
990
  };
976
- var _default = DxcNewInputText;
991
+ var _default = DxcTextInput;
977
992
  exports["default"] = _default;