@dxc-technology/halstack-react 0.0.0-f77ec3a → 0.0.0-f7f591a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist/BackgroundColorContext.js → BackgroundColorContext.js} +0 -0
- package/{dist/ThemeContext.js → ThemeContext.js} +0 -0
- package/{dist/V3Select → V3Select}/V3Select.js +0 -0
- package/{dist/V3Select → V3Select}/index.d.ts +0 -0
- package/{dist/V3Textarea → V3Textarea}/V3Textarea.js +0 -0
- package/{dist/V3Textarea → V3Textarea}/index.d.ts +0 -0
- package/{dist/accordion → accordion}/Accordion.js +0 -0
- package/{dist/accordion → accordion}/index.d.ts +0 -0
- package/{dist/accordion-group → accordion-group}/AccordionGroup.js +0 -0
- package/{dist/accordion-group → accordion-group}/index.d.ts +0 -0
- package/{dist/alert → alert}/Alert.js +0 -0
- package/{dist/alert → alert}/index.d.ts +0 -0
- package/{dist/badge → badge}/Badge.js +0 -0
- package/{dist/box → box}/Box.js +0 -0
- package/{dist/box → box}/index.d.ts +0 -0
- package/{dist/button → button}/Button.js +0 -0
- package/button/Button.stories.js +27 -0
- package/{dist/button → button}/index.d.ts +0 -0
- package/{dist/card → card}/Card.js +0 -0
- package/{dist/card → card}/index.d.ts +0 -0
- package/{dist/checkbox → checkbox}/Checkbox.js +0 -0
- package/{dist/checkbox → checkbox}/index.d.ts +0 -0
- package/{dist/chip → chip}/Chip.js +0 -0
- package/{dist/chip → chip}/index.d.ts +0 -0
- package/{dist/common → common}/OpenSans.css +0 -0
- package/{dist/common → common}/RequiredComponent.js +0 -0
- package/{dist/common → common}/fonts/OpenSans-Bold.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-ExtraBold.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-Italic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-Light.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-LightItalic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-Regular.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-SemiBold.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
- package/{dist/common → common}/utils.js +0 -0
- package/{dist/common → common}/variables.js +14 -22
- package/{dist/date → date}/Date.js +0 -0
- package/{dist/date → date}/index.d.ts +0 -0
- package/{dist/date-input → date-input}/DateInput.js +0 -0
- package/{dist/date-input → date-input}/index.d.ts +0 -0
- package/{dist/dialog → dialog}/Dialog.js +0 -0
- package/{dist/dialog → dialog}/index.d.ts +0 -0
- package/{dist/dropdown → dropdown}/Dropdown.js +0 -0
- package/{dist/dropdown → dropdown}/index.d.ts +0 -0
- package/{dist/file-input → file-input}/FileInput.js +1 -1
- package/{dist/file-input → file-input}/FileItem.js +0 -0
- package/{dist/file-input → file-input}/index.d.ts +0 -0
- package/{dist/footer → footer}/Footer.js +0 -0
- package/{dist/footer → footer}/Icons.js +0 -0
- package/{dist/footer → footer}/index.d.ts +0 -0
- package/{dist/header → header}/Header.js +0 -0
- package/{dist/header → header}/Icons.js +0 -0
- package/{dist/header → header}/index.d.ts +0 -0
- package/{dist/heading → heading}/Heading.js +0 -0
- package/{dist/heading → heading}/index.d.ts +0 -0
- package/{dist/input-text → input-text}/Icons.js +0 -0
- package/{dist/input-text → input-text}/InputText.js +0 -0
- package/{dist/input-text → input-text}/index.d.ts +0 -0
- package/{dist/layout → layout}/ApplicationLayout.js +0 -0
- package/{dist/layout → layout}/Icons.js +0 -0
- package/{dist/link → link}/Link.js +0 -0
- package/{dist/link → link}/index.d.ts +0 -0
- package/{dist/main.d.ts → main.d.ts} +0 -0
- package/{dist/main.js → main.js} +0 -0
- package/{dist/number-input → number-input}/NumberInput.js +0 -0
- package/{dist/number-input → number-input}/NumberInputContext.js +0 -0
- package/{dist/number-input → number-input}/index.d.ts +0 -0
- package/package.json +9 -9
- package/{dist/paginator → paginator}/Icons.js +0 -0
- package/{dist/paginator → paginator}/Paginator.js +0 -0
- package/{dist/paginator → paginator}/index.d.ts +0 -0
- package/{dist/password-input → password-input}/PasswordInput.js +0 -0
- package/{dist/password-input → password-input}/index.d.ts +0 -0
- package/{dist/progress-bar → progress-bar}/ProgressBar.js +0 -0
- package/{dist/progress-bar → progress-bar}/index.d.ts +0 -0
- package/{dist/radio → radio}/Radio.js +0 -0
- package/{dist/radio → radio}/index.d.ts +0 -0
- package/{dist/resultsetTable → resultsetTable}/ResultsetTable.js +1 -1
- package/{dist/resultsetTable → resultsetTable}/index.d.ts +0 -0
- package/{dist/select → select}/Select.js +128 -88
- package/select/index.d.ts +131 -0
- package/{dist/sidenav → sidenav}/Sidenav.js +0 -0
- package/{dist/sidenav → sidenav}/index.d.ts +0 -0
- package/{dist/slider → slider}/Slider.js +0 -0
- package/{dist/slider → slider}/index.d.ts +0 -0
- package/{dist/spinner → spinner}/Spinner.js +0 -0
- package/{dist/spinner → spinner}/index.d.ts +0 -0
- package/{dist/switch → switch}/Switch.js +0 -0
- package/{dist/switch → switch}/index.d.ts +0 -0
- package/{dist/table → table}/Table.js +0 -0
- package/{dist/table → table}/index.d.ts +0 -0
- package/{dist/tabs → tabs}/Tabs.js +0 -0
- package/{dist/tabs → tabs}/index.d.ts +0 -0
- package/{dist/tag → tag}/Tag.js +0 -0
- package/{dist/tag → tag}/index.d.ts +0 -0
- package/{dist/text-input → text-input}/TextInput.js +199 -183
- package/{dist/text-input → text-input}/index.d.ts +0 -0
- package/{dist/textarea → textarea}/Textarea.js +0 -0
- package/{dist/textarea → textarea}/index.d.ts +0 -0
- package/{dist/toggle → toggle}/Toggle.js +0 -0
- package/{dist/toggle → toggle}/index.d.ts +0 -0
- package/{dist/toggle-group → toggle-group}/ToggleGroup.js +0 -0
- package/{dist/toggle-group → toggle-group}/index.d.ts +0 -0
- package/{dist/upload → upload}/Upload.js +0 -0
- package/{dist/upload → upload}/buttons-upload/ButtonsUpload.js +0 -0
- package/{dist/upload → upload}/buttons-upload/Icons.js +0 -0
- package/{dist/upload → upload}/dragAndDropArea/DragAndDropArea.js +0 -0
- package/{dist/upload → upload}/dragAndDropArea/Icons.js +0 -0
- package/{dist/upload → upload}/file-upload/FileToUpload.js +0 -0
- package/{dist/upload → upload}/file-upload/Icons.js +0 -0
- package/{dist/upload → upload}/files-upload/FilesToUpload.js +0 -0
- package/{dist/upload → upload}/index.d.ts +0 -0
- package/{dist/upload → upload}/transaction/Icons.js +0 -0
- package/{dist/upload → upload}/transaction/Transaction.js +0 -0
- package/{dist/upload → upload}/transactions/Transactions.js +0 -0
- package/{dist/useTheme.js → useTheme.js} +0 -0
- package/{dist/wizard → wizard}/Icons.js +0 -0
- package/{dist/wizard → wizard}/Wizard.js +0 -0
- package/{dist/wizard → wizard}/index.d.ts +0 -0
- package/README.md +0 -66
- package/babel.config.js +0 -7
- package/dist/select/index.d.ts +0 -53
- package/dist/stories/Button.js +0 -71
- package/dist/stories/Button.stories.js +0 -55
- package/dist/stories/Header.js +0 -67
- package/dist/stories/Header.stories.js +0 -31
- package/dist/stories/Introduction.stories.mdx +0 -211
- package/dist/stories/Page.js +0 -68
- package/dist/stories/Page.stories.js +0 -39
- package/dist/stories/assets/code-brackets.svg +0 -1
- package/dist/stories/assets/colors.svg +0 -1
- package/dist/stories/assets/comments.svg +0 -1
- package/dist/stories/assets/direction.svg +0 -1
- package/dist/stories/assets/flow.svg +0 -1
- package/dist/stories/assets/plugin.svg +0 -1
- package/dist/stories/assets/repo.svg +0 -1
- package/dist/stories/assets/stackalt.svg +0 -1
- package/dist/stories/button.css +0 -30
- package/dist/stories/header.css +0 -26
- package/dist/stories/page.css +0 -69
- package/test/Accordion.test.js +0 -33
- package/test/AccordionGroup.test.js +0 -125
- package/test/Alert.test.js +0 -53
- package/test/Box.test.js +0 -10
- package/test/Button.test.js +0 -18
- package/test/Card.test.js +0 -30
- package/test/Checkbox.test.js +0 -45
- package/test/Chip.test.js +0 -25
- package/test/Date.test.js +0 -395
- package/test/DateInput.test.js +0 -242
- package/test/Dialog.test.js +0 -23
- package/test/Dropdown.test.js +0 -145
- package/test/FileInput.test.js +0 -201
- package/test/Footer.test.js +0 -94
- package/test/Header.test.js +0 -34
- package/test/Heading.test.js +0 -83
- package/test/InputText.test.js +0 -239
- package/test/Link.test.js +0 -43
- package/test/NumberInput.test.js +0 -259
- package/test/Paginator.test.js +0 -181
- package/test/PasswordInput.test.js +0 -83
- package/test/ProgressBar.test.js +0 -35
- package/test/Radio.test.js +0 -37
- package/test/ResultsetTable.test.js +0 -330
- package/test/Select.test.js +0 -415
- package/test/Sidenav.test.js +0 -45
- package/test/Slider.test.js +0 -74
- package/test/Spinner.test.js +0 -32
- package/test/Switch.test.js +0 -45
- package/test/Table.test.js +0 -36
- package/test/Tabs.test.js +0 -109
- package/test/Tag.test.js +0 -32
- package/test/TextInput.test.js +0 -732
- package/test/Textarea.test.js +0 -193
- package/test/ToggleGroup.test.js +0 -85
- package/test/Upload.test.js +0 -60
- package/test/V3Select.test.js +0 -212
- package/test/V3TextArea.test.js +0 -51
- package/test/Wizard.test.js +0 -130
- package/test/mocks/pngMock.js +0 -1
- package/test/mocks/svgMock.js +0 -1
|
@@ -35,8 +35,18 @@ var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColor
|
|
|
35
35
|
|
|
36
36
|
var _NumberInputContext = _interopRequireDefault(require("../number-input/NumberInputContext.js"));
|
|
37
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
|
+
|
|
38
48
|
function _templateObject17() {
|
|
39
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n
|
|
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"]);
|
|
40
50
|
|
|
41
51
|
_templateObject17 = function _templateObject17() {
|
|
42
52
|
return data;
|
|
@@ -46,7 +56,7 @@ function _templateObject17() {
|
|
|
46
56
|
}
|
|
47
57
|
|
|
48
58
|
function _templateObject16() {
|
|
49
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n
|
|
59
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n padding: 0.25rem 1rem;\n color: ", ";\n line-height: 1.715em;\n"]);
|
|
50
60
|
|
|
51
61
|
_templateObject16 = function _templateObject16() {
|
|
52
62
|
return data;
|
|
@@ -56,7 +66,7 @@ function _templateObject16() {
|
|
|
56
66
|
}
|
|
57
67
|
|
|
58
68
|
function _templateObject15() {
|
|
59
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\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"]);
|
|
60
70
|
|
|
61
71
|
_templateObject15 = function _templateObject15() {
|
|
62
72
|
return data;
|
|
@@ -66,7 +76,7 @@ function _templateObject15() {
|
|
|
66
76
|
}
|
|
67
77
|
|
|
68
78
|
function _templateObject14() {
|
|
69
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n padding:
|
|
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"]);
|
|
70
80
|
|
|
71
81
|
_templateObject14 = function _templateObject14() {
|
|
72
82
|
return data;
|
|
@@ -76,7 +86,7 @@ function _templateObject14() {
|
|
|
76
86
|
}
|
|
77
87
|
|
|
78
88
|
function _templateObject13() {
|
|
79
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\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"]);
|
|
80
90
|
|
|
81
91
|
_templateObject13 = function _templateObject13() {
|
|
82
92
|
return data;
|
|
@@ -196,7 +206,7 @@ function _templateObject2() {
|
|
|
196
206
|
}
|
|
197
207
|
|
|
198
208
|
function _templateObject() {
|
|
199
|
-
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"]);
|
|
200
210
|
|
|
201
211
|
_templateObject = function _templateObject() {
|
|
202
212
|
return data;
|
|
@@ -205,6 +215,54 @@ function _templateObject() {
|
|
|
205
215
|
return data;
|
|
206
216
|
}
|
|
207
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
|
+
|
|
208
266
|
var makeCancelable = function makeCancelable(promise) {
|
|
209
267
|
var hasCanceled_ = false;
|
|
210
268
|
var wrappedPromise = new Promise(function (resolve, reject) {
|
|
@@ -280,49 +338,39 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
280
338
|
_ref$tabIndex = _ref.tabIndex,
|
|
281
339
|
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
282
340
|
|
|
283
|
-
var _useState = (0, _react.useState)(""),
|
|
284
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState,
|
|
285
|
-
|
|
286
|
-
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];
|
|
287
344
|
|
|
288
|
-
var _useState3 = (0, _react.useState)(
|
|
345
|
+
var _useState3 = (0, _react.useState)(""),
|
|
289
346
|
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
290
|
-
|
|
291
|
-
|
|
347
|
+
innerValue = _useState4[0],
|
|
348
|
+
setInnerValue = _useState4[1];
|
|
292
349
|
|
|
293
350
|
var _useState5 = (0, _react.useState)(false),
|
|
294
351
|
_useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
|
|
295
|
-
|
|
296
|
-
|
|
352
|
+
isOpen = _useState6[0],
|
|
353
|
+
changeIsOpen = _useState6[1];
|
|
297
354
|
|
|
298
355
|
var _useState7 = (0, _react.useState)(false),
|
|
299
356
|
_useState8 = (0, _slicedToArray2["default"])(_useState7, 2),
|
|
300
|
-
|
|
301
|
-
|
|
357
|
+
isSearching = _useState8[0],
|
|
358
|
+
changeIsSearching = _useState8[1];
|
|
302
359
|
|
|
303
360
|
var _useState9 = (0, _react.useState)(false),
|
|
304
361
|
_useState10 = (0, _slicedToArray2["default"])(_useState9, 2),
|
|
305
|
-
|
|
306
|
-
|
|
362
|
+
isAutosuggestError = _useState10[0],
|
|
363
|
+
changeIsAutosuggestError = _useState10[1];
|
|
307
364
|
|
|
308
|
-
var _useState11 = (0, _react.useState)(
|
|
365
|
+
var _useState11 = (0, _react.useState)([]),
|
|
309
366
|
_useState12 = (0, _slicedToArray2["default"])(_useState11, 2),
|
|
310
|
-
|
|
311
|
-
|
|
367
|
+
filteredSuggestions = _useState12[0],
|
|
368
|
+
changeFilteredSuggestions = _useState12[1];
|
|
312
369
|
|
|
313
|
-
var _useState13 = (0, _react.useState)(
|
|
370
|
+
var _useState13 = (0, _react.useState)(-1),
|
|
314
371
|
_useState14 = (0, _slicedToArray2["default"])(_useState13, 2),
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
var _useState15 = (0, _react.useState)(-1),
|
|
319
|
-
_useState16 = (0, _slicedToArray2["default"])(_useState15, 2),
|
|
320
|
-
visualFocusedSuggIndex = _useState16[0],
|
|
321
|
-
changeVisualFocusedSuggIndex = _useState16[1];
|
|
322
|
-
|
|
323
|
-
var _useState17 = (0, _react.useState)("input-".concat((0, _uuid.v4)())),
|
|
324
|
-
_useState18 = (0, _slicedToArray2["default"])(_useState17, 1),
|
|
325
|
-
inputId = _useState18[0];
|
|
372
|
+
visualFocusedSuggIndex = _useState14[0],
|
|
373
|
+
changeVisualFocusedSuggIndex = _useState14[1];
|
|
326
374
|
|
|
327
375
|
var suggestionsRef = (0, _react.useRef)(null);
|
|
328
376
|
var inputRef = (0, _react.useRef)(null);
|
|
@@ -355,12 +403,12 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
355
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, ".");
|
|
356
404
|
};
|
|
357
405
|
|
|
358
|
-
var
|
|
406
|
+
var hasSuggestions = function hasSuggestions() {
|
|
359
407
|
return typeof suggestions === "function" || suggestions && suggestions.length > 0;
|
|
360
408
|
};
|
|
361
409
|
|
|
362
410
|
var openSuggestions = function openSuggestions() {
|
|
363
|
-
|
|
411
|
+
if (hasSuggestions() && (filteredSuggestions.length > 0 || isSearching || isAutosuggestError)) changeIsOpen(true);
|
|
364
412
|
};
|
|
365
413
|
|
|
366
414
|
var closeSuggestions = function closeSuggestions() {
|
|
@@ -441,8 +489,6 @@ var DxcTextInput = _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
|
|
|
@@ -461,8 +507,6 @@ var DxcTextInput = _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 DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
472
516
|
// Esc
|
|
473
517
|
event.preventDefault();
|
|
474
518
|
|
|
475
|
-
if (
|
|
519
|
+
if (hasSuggestions()) {
|
|
476
520
|
changeValue("");
|
|
477
521
|
isOpen && closeSuggestions();
|
|
478
522
|
}
|
|
@@ -481,7 +525,7 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
481
525
|
|
|
482
526
|
case 13:
|
|
483
527
|
// Enter
|
|
484
|
-
if (
|
|
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,6 +535,22 @@ var DxcTextInput = _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
555
|
var _inputRef$current3, _inputRef$current4, _inputRef$current5, _inputRef$current6;
|
|
496
556
|
|
|
@@ -500,72 +560,6 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
500
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));
|
|
501
561
|
};
|
|
502
562
|
|
|
503
|
-
(0, _react.useLayoutEffect)(function () {
|
|
504
|
-
var _suggestionsRef$curre;
|
|
505
|
-
|
|
506
|
-
isScrollable && (suggestionsRef === null || suggestionsRef === void 0 ? void 0 : (_suggestionsRef$curre = suggestionsRef.current) === null || _suggestionsRef$curre === void 0 ? void 0 : _suggestionsRef$curre.scrollTo({
|
|
507
|
-
top: visualFocusedSuggIndex * 39
|
|
508
|
-
}));
|
|
509
|
-
return changeIsScrollable(false);
|
|
510
|
-
}, [isScrollable, visualFocusedSuggIndex]);
|
|
511
|
-
(0, _react.useEffect)(function () {
|
|
512
|
-
if (typeof suggestions === "function") {
|
|
513
|
-
changeIsSearching(true);
|
|
514
|
-
changeIsAutosuggestError(false);
|
|
515
|
-
changeFilteredSuggestions([]);
|
|
516
|
-
var cancelablePromise = makeCancelable(suggestions(value !== null && value !== void 0 ? value : innerValue));
|
|
517
|
-
cancelablePromise.promise.then(function (promiseResponse) {
|
|
518
|
-
changeIsSearching(false);
|
|
519
|
-
changeIsAutosuggestError(false);
|
|
520
|
-
changeFilteredSuggestions(promiseResponse);
|
|
521
|
-
})["catch"](function (err) {
|
|
522
|
-
if (!err.isCanceled) {
|
|
523
|
-
changeIsSearching(false);
|
|
524
|
-
changeIsAutosuggestError(true);
|
|
525
|
-
}
|
|
526
|
-
});
|
|
527
|
-
return function () {
|
|
528
|
-
cancelablePromise.cancel();
|
|
529
|
-
};
|
|
530
|
-
} else if (suggestions && suggestions.length) {
|
|
531
|
-
changeFilteredSuggestions(suggestions.filter(function (suggestion) {
|
|
532
|
-
return suggestion.toUpperCase().startsWith((value !== null && value !== void 0 ? value : innerValue).toUpperCase());
|
|
533
|
-
}));
|
|
534
|
-
changeVisualFocusedSuggIndex(-1);
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
numberInputContext && setNumberProps(numberInputContext.typeNumber, numberInputContext.minNumber, numberInputContext.maxNumber, numberInputContext.stepNumber);
|
|
538
|
-
}, [value, innerValue, suggestions]);
|
|
539
|
-
var defaultClearAction = {
|
|
540
|
-
onClick: function onClick() {
|
|
541
|
-
changeValue("");
|
|
542
|
-
inputRef.current.focus();
|
|
543
|
-
suggestions && closeSuggestions();
|
|
544
|
-
},
|
|
545
|
-
icon: _react["default"].createElement("svg", {
|
|
546
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
547
|
-
width: "24",
|
|
548
|
-
height: "24",
|
|
549
|
-
viewBox: "0 0 24 24",
|
|
550
|
-
fill: "currentColor"
|
|
551
|
-
}, _react["default"].createElement("path", {
|
|
552
|
-
d: "M0 0h24v24H0V0z",
|
|
553
|
-
fill: "none"
|
|
554
|
-
}), _react["default"].createElement("path", {
|
|
555
|
-
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"
|
|
556
|
-
}))
|
|
557
|
-
};
|
|
558
|
-
|
|
559
|
-
var errorIcon = _react["default"].createElement("svg", {
|
|
560
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
561
|
-
height: "24px",
|
|
562
|
-
viewBox: "0 0 24 24",
|
|
563
|
-
width: "24px",
|
|
564
|
-
fill: "currentColor"
|
|
565
|
-
}, _react["default"].createElement("path", {
|
|
566
|
-
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"
|
|
567
|
-
}));
|
|
568
|
-
|
|
569
563
|
var decrementNumber = function decrementNumber() {
|
|
570
564
|
var numberValue = value !== null && value !== void 0 ? value : innerValue;
|
|
571
565
|
|
|
@@ -606,72 +600,84 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
606
600
|
}
|
|
607
601
|
};
|
|
608
602
|
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
603
|
+
(0, _react.useLayoutEffect)(function () {
|
|
604
|
+
var _suggestionsRef$curre, _visualFocusedOptionE;
|
|
605
|
+
|
|
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]);
|
|
612
|
+
(0, _react.useEffect)(function () {
|
|
613
|
+
if (typeof suggestions === "function") {
|
|
614
|
+
changeIsSearching(true);
|
|
615
|
+
changeIsAutosuggestError(false);
|
|
616
|
+
changeFilteredSuggestions([]);
|
|
617
|
+
var cancelablePromise = makeCancelable(suggestions(value !== null && value !== void 0 ? value : innerValue));
|
|
618
|
+
cancelablePromise.promise.then(function (promiseResponse) {
|
|
619
|
+
changeIsSearching(false);
|
|
620
|
+
changeIsAutosuggestError(false);
|
|
621
|
+
changeFilteredSuggestions(promiseResponse);
|
|
622
|
+
})["catch"](function (err) {
|
|
623
|
+
if (!err.isCanceled) {
|
|
624
|
+
changeIsSearching(false);
|
|
625
|
+
changeIsAutosuggestError(true);
|
|
626
|
+
}
|
|
627
|
+
});
|
|
628
|
+
return function () {
|
|
629
|
+
cancelablePromise.cancel();
|
|
630
|
+
};
|
|
631
|
+
} else if ((suggestions === null || suggestions === void 0 ? void 0 : suggestions.length) > 0) {
|
|
632
|
+
changeFilteredSuggestions(suggestions.filter(function (suggestion) {
|
|
633
|
+
return suggestion.toUpperCase().startsWith((value !== null && value !== void 0 ? value : innerValue).toUpperCase());
|
|
634
|
+
}));
|
|
635
|
+
changeVisualFocusedSuggIndex(-1);
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
numberInputContext && setNumberProps(numberInputContext.typeNumber, numberInputContext.minNumber, numberInputContext.maxNumber, numberInputContext.stepNumber);
|
|
639
|
+
}, [value, innerValue, suggestions]);
|
|
640
|
+
(0, _react.useLayoutEffect)(function () {
|
|
641
|
+
if (filteredSuggestions.length === 0 && !isSearching && !isAutosuggestError) closeSuggestions();
|
|
642
|
+
}, [filteredSuggestions]);
|
|
643
|
+
|
|
644
|
+
var getLastOptionIndex = function getLastOptionIndex() {
|
|
645
|
+
var last = 0;
|
|
646
|
+
|
|
647
|
+
var reducer = function reducer(acc, current) {
|
|
648
|
+
var _current$options;
|
|
649
|
+
|
|
650
|
+
return acc + ((_current$options = current.options) === null || _current$options === void 0 ? void 0 : _current$options.length);
|
|
651
|
+
};
|
|
652
|
+
|
|
653
|
+
if (filteredSuggestions.length > 0) filteredSuggestions[0].options ? last = filteredSuggestions.reduce(reducer, 0) - 1 : last = filteredSuggestions.length - 1;
|
|
654
|
+
return last;
|
|
644
655
|
};
|
|
645
656
|
|
|
657
|
+
var lastOptionIndex = (0, _react.useMemo)(function () {
|
|
658
|
+
return getLastOptionIndex();
|
|
659
|
+
}, [filteredSuggestions]);
|
|
660
|
+
|
|
646
661
|
var HighlightedSuggestion = function HighlightedSuggestion(_ref2) {
|
|
647
662
|
var suggestion = _ref2.suggestion,
|
|
648
663
|
index = _ref2.index;
|
|
649
664
|
var regEx = new RegExp(value !== null && value !== void 0 ? value : innerValue, "i");
|
|
650
665
|
var matchedWords = suggestion.match(regEx);
|
|
651
666
|
var noMatchedWords = suggestion.replace(regEx, "");
|
|
667
|
+
var isLastOption = index === lastOptionIndex;
|
|
652
668
|
return _react["default"].createElement(Suggestion, {
|
|
653
669
|
id: "suggestion-".concat(index),
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
onMouseUp: function onMouseUp(event) {
|
|
658
|
-
if (event.button === 0 && isActiveSuggestion) {
|
|
659
|
-
changeValue(suggestion);
|
|
660
|
-
changeIsActiveSuggestion(false);
|
|
661
|
-
closeSuggestions();
|
|
662
|
-
}
|
|
670
|
+
onClick: function onClick() {
|
|
671
|
+
changeValue(suggestion);
|
|
672
|
+
closeSuggestions();
|
|
663
673
|
},
|
|
664
|
-
onMouseEnter: function onMouseEnter() {
|
|
665
|
-
changeVisualFocusedSuggIndex(index);
|
|
666
|
-
},
|
|
667
|
-
onMouseLeave: function onMouseLeave() {
|
|
668
|
-
changeIsActiveSuggestion(false);
|
|
669
|
-
},
|
|
670
|
-
visualFocused: visualFocusedSuggIndex === index,
|
|
671
|
-
active: visualFocusedSuggIndex === index && isActiveSuggestion,
|
|
672
674
|
role: "option",
|
|
673
|
-
"aria-selected": visualFocusedSuggIndex === index && "true"
|
|
674
|
-
|
|
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)));
|
|
675
681
|
};
|
|
676
682
|
|
|
677
683
|
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
@@ -713,37 +719,37 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
713
719
|
maxLength: length === null || length === void 0 ? void 0 : length.max,
|
|
714
720
|
autoComplete: autocomplete,
|
|
715
721
|
tabIndex: tabIndex,
|
|
716
|
-
role: isTextInputType() &&
|
|
717
|
-
"aria-autocomplete": isTextInputType() &&
|
|
718
|
-
"aria-controls": isTextInputType() &&
|
|
719
|
-
"aria-expanded": isTextInputType() &&
|
|
720
|
-
"aria-activedescendant": isTextInputType() &&
|
|
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,
|
|
721
727
|
"aria-invalid": error ? "true" : "false",
|
|
722
728
|
"aria-describedby": error ? errorId : undefined,
|
|
723
729
|
"aria-required": optional ? "false" : "true"
|
|
724
730
|
}), !disabled && error && _react["default"].createElement(ErrorIcon, {
|
|
725
731
|
backgroundType: backgroundType,
|
|
726
732
|
"aria-label": "Error"
|
|
727
|
-
},
|
|
728
|
-
onClick:
|
|
733
|
+
}, textInputIcons.error), !disabled && clearable && (value !== null && value !== void 0 ? value : innerValue).length > 0 && _react["default"].createElement(Action, {
|
|
734
|
+
onClick: handleClearActionOnClick,
|
|
729
735
|
backgroundType: backgroundType,
|
|
730
736
|
tabIndex: tabIndex,
|
|
731
737
|
"aria-label": "Clear"
|
|
732
|
-
},
|
|
738
|
+
}, textInputIcons.clear), (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.typeNumber) === "number" ? _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(Action, {
|
|
733
739
|
ref: actionRef,
|
|
734
740
|
disabled: disabled,
|
|
735
|
-
onClick:
|
|
741
|
+
onClick: handleDecrementActionOnClick,
|
|
736
742
|
backgroundType: backgroundType,
|
|
737
743
|
tabIndex: tabIndex,
|
|
738
744
|
"aria-label": "Decrement"
|
|
739
|
-
},
|
|
745
|
+
}, textInputIcons.decrement), _react["default"].createElement(Action, {
|
|
740
746
|
ref: actionRef,
|
|
741
747
|
disabled: disabled,
|
|
742
|
-
onClick:
|
|
748
|
+
onClick: handleIncrementActionOnClick,
|
|
743
749
|
backgroundType: backgroundType,
|
|
744
750
|
tabIndex: tabIndex,
|
|
745
751
|
"aria-label": "Increment"
|
|
746
|
-
},
|
|
752
|
+
}, textInputIcons.increment)) : action && _react["default"].createElement(Action, {
|
|
747
753
|
ref: actionRef,
|
|
748
754
|
disabled: disabled,
|
|
749
755
|
onClick: action.onClick,
|
|
@@ -767,7 +773,7 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
767
773
|
ref: suggestionsRef,
|
|
768
774
|
role: "listbox",
|
|
769
775
|
"aria-label": label
|
|
770
|
-
}, !isSearching && !isAutosuggestError && filteredSuggestions.length
|
|
776
|
+
}, !isSearching && !isAutosuggestError && filteredSuggestions.length > 0 && filteredSuggestions.map(function (suggestion, index) {
|
|
771
777
|
return _react["default"].createElement(HighlightedSuggestion, {
|
|
772
778
|
key: "suggestion-".concat((0, _uuid.v4)()),
|
|
773
779
|
suggestion: suggestion,
|
|
@@ -775,7 +781,7 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
775
781
|
});
|
|
776
782
|
}), isSearching && _react["default"].createElement(SuggestionsSystemMessage, null, "Searching..."), isAutosuggestError && _react["default"].createElement(SuggestionsError, null, _react["default"].createElement(SuggestionsErrorIcon, {
|
|
777
783
|
backgroundType: backgroundType
|
|
778
|
-
},
|
|
784
|
+
}, textInputIcons.error), "Error fetching data"))), !disabled && _react["default"].createElement(Error, {
|
|
779
785
|
id: errorId,
|
|
780
786
|
backgroundType: backgroundType
|
|
781
787
|
}, error)));
|
|
@@ -877,7 +883,7 @@ var Action = _styledComponents["default"].button(_templateObject8(), function (p
|
|
|
877
883
|
}, function (props) {
|
|
878
884
|
return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledActionIconColorOnDark : props.theme.disabledActionIconColor : props.backgroundType === "dark" ? props.theme.actionIconColorOnDark : props.theme.actionIconColor;
|
|
879
885
|
}, function (props) {
|
|
880
|
-
return !props.disabled && "\n &:
|
|
886
|
+
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 ");
|
|
881
887
|
});
|
|
882
888
|
|
|
883
889
|
var Prefix = _styledComponents["default"].span(_templateObject9(), function (props) {
|
|
@@ -905,9 +911,9 @@ var Error = _styledComponents["default"].span(_templateObject12(), function (pro
|
|
|
905
911
|
});
|
|
906
912
|
|
|
907
913
|
var Suggestions = _styledComponents["default"].ul(_templateObject13(), function (props) {
|
|
908
|
-
return props.isError ? props.theme.
|
|
914
|
+
return props.isError ? props.theme.errorListDialogBackgroundColor : props.theme.listDialogBackgroundColor;
|
|
909
915
|
}, function (props) {
|
|
910
|
-
return props.isError ? props.theme.
|
|
916
|
+
return props.isError ? props.theme.errorListDialogBorderColor : props.theme.listDialogBorderColor;
|
|
911
917
|
}, function (props) {
|
|
912
918
|
return props.theme.listOptionFontColor;
|
|
913
919
|
}, function (props) {
|
|
@@ -921,18 +927,28 @@ var Suggestions = _styledComponents["default"].ul(_templateObject13(), function
|
|
|
921
927
|
});
|
|
922
928
|
|
|
923
929
|
var Suggestion = _styledComponents["default"].li(_templateObject14(), function (props) {
|
|
924
|
-
return props.
|
|
930
|
+
return props.visualFocused ? props.theme.focusListOptionBorderColor : "transparent";
|
|
931
|
+
}, function (props) {
|
|
932
|
+
return props.theme.hoverListOptionBackgroundColor;
|
|
933
|
+
}, function (props) {
|
|
934
|
+
return props.theme.activeListOptionBackgroundColor;
|
|
925
935
|
});
|
|
926
936
|
|
|
927
|
-
var
|
|
937
|
+
var StyledSuggestion = _styledComponents["default"].span(_templateObject15(), function (props) {
|
|
938
|
+
return props.last || props.visualFocused ? "border-bottom: 1px solid transparent" : "border-bottom: 1px solid ".concat(props.theme.listOptionDividerColor);
|
|
939
|
+
});
|
|
940
|
+
|
|
941
|
+
var SuggestionsSystemMessage = _styledComponents["default"].span(_templateObject16(), function (props) {
|
|
928
942
|
return props.theme.systemMessageFontColor;
|
|
929
943
|
});
|
|
930
944
|
|
|
931
|
-
var SuggestionsErrorIcon = _styledComponents["default"].span(
|
|
945
|
+
var SuggestionsErrorIcon = _styledComponents["default"].span(_templateObject17(), function (props) {
|
|
932
946
|
return props.backgroundType === "dark" ? props.theme.errorIconColorOnDark : props.theme.errorIconColor;
|
|
933
947
|
});
|
|
934
948
|
|
|
935
|
-
var SuggestionsError = _styledComponents["default"].span(
|
|
949
|
+
var SuggestionsError = _styledComponents["default"].span(_templateObject18(), function (props) {
|
|
950
|
+
return props.theme.errorListDialogFontColor;
|
|
951
|
+
});
|
|
936
952
|
|
|
937
953
|
DxcTextInput.propTypes = {
|
|
938
954
|
label: _propTypes["default"].string,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|