@dxc-technology/halstack-react 0.0.0-7d46b9f → 0.0.0-80ae676
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/BackgroundColorContext.js +50 -0
- package/ThemeContext.js +246 -0
- package/{dist/select/Select.js → V3Select/V3Select.js} +38 -132
- package/V3Select/index.d.ts +27 -0
- package/{dist/textarea/Textarea.js → V3Textarea/V3Textarea.js} +14 -18
- package/V3Textarea/index.d.ts +27 -0
- package/accordion/Accordion.d.ts +4 -0
- package/{dist/accordion → accordion}/Accordion.js +35 -130
- package/accordion/types.d.ts +68 -0
- package/accordion/types.js +5 -0
- package/accordion-group/AccordionGroup.d.ts +7 -0
- package/accordion-group/AccordionGroup.js +170 -0
- package/accordion-group/types.d.ts +72 -0
- package/accordion-group/types.js +5 -0
- package/alert/Alert.d.ts +4 -0
- package/{dist/alert → alert}/Alert.js +41 -154
- package/alert/types.d.ts +49 -0
- package/alert/types.js +5 -0
- package/badge/Badge.js +59 -0
- package/box/Box.d.ts +4 -0
- package/{dist/box → box}/Box.js +18 -45
- package/box/Box.stories.tsx +132 -0
- package/box/types.d.ts +47 -0
- package/box/types.js +5 -0
- package/button/Button.d.ts +4 -0
- package/{dist/button → button}/Button.js +23 -84
- package/button/Button.stories.tsx +293 -0
- package/button/types.d.ts +57 -0
- package/button/types.js +5 -0
- package/card/Card.d.ts +4 -0
- package/{dist/card → card}/Card.js +32 -121
- package/card/types.d.ts +69 -0
- package/card/types.js +5 -0
- package/checkbox/Checkbox.d.ts +4 -0
- package/{dist/checkbox → checkbox}/Checkbox.js +16 -63
- package/checkbox/Checkbox.stories.tsx +192 -0
- package/checkbox/types.d.ts +60 -0
- package/checkbox/types.js +5 -0
- package/{dist/chip → chip}/Chip.js +17 -61
- package/chip/index.d.ts +22 -0
- package/{dist/common → common}/OpenSans.css +0 -0
- package/{dist/common → common}/RequiredComponent.js +3 -11
- 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 +240 -107
- package/{dist/date → date}/Date.js +16 -22
- package/date/index.d.ts +27 -0
- package/date-input/DateInput.d.ts +4 -0
- package/{dist/new-date/NewDate.js → date-input/DateInput.js} +55 -94
- package/date-input/DateInput.stories.tsx +138 -0
- package/date-input/types.d.ts +100 -0
- package/date-input/types.js +5 -0
- package/dialog/Dialog.d.ts +4 -0
- package/{dist/dialog → dialog}/Dialog.js +20 -73
- package/dialog/types.d.ts +43 -0
- package/dialog/types.js +5 -0
- package/dropdown/Dropdown.d.ts +4 -0
- package/{dist/dropdown → dropdown}/Dropdown.js +44 -171
- package/dropdown/types.d.ts +89 -0
- package/dropdown/types.js +5 -0
- package/{dist/file-input → file-input}/FileInput.js +49 -161
- package/{dist/file-input → file-input}/FileItem.js +36 -123
- package/{dist/file-input → file-input}/index.d.ts +1 -1
- package/footer/Footer.d.ts +4 -0
- package/footer/Footer.js +266 -0
- package/footer/Footer.stories.jsx +151 -0
- package/footer/Icons.js +77 -0
- package/footer/types.d.ts +61 -0
- package/footer/types.js +5 -0
- package/header/Header.d.ts +7 -0
- package/header/Header.js +324 -0
- package/header/Icons.js +34 -0
- package/header/types.d.ts +45 -0
- package/header/types.js +5 -0
- package/{dist/heading → heading}/Heading.js +30 -72
- package/heading/index.d.ts +17 -0
- package/input-text/Icons.js +22 -0
- package/{dist/input-text → input-text}/InputText.js +37 -133
- package/input-text/index.d.ts +36 -0
- package/{dist/layout → layout}/ApplicationLayout.js +35 -131
- package/layout/Icons.js +55 -0
- package/link/Link.d.ts +3 -0
- package/{dist/link → link}/Link.js +18 -94
- package/link/Link.stories.tsx +70 -0
- package/link/types.d.ts +74 -0
- package/link/types.js +5 -0
- package/main.d.ts +44 -0
- package/{dist/main.js → main.js} +100 -96
- package/{dist/number/Number.js → number-input/NumberInput.js} +9 -17
- package/number-input/NumberInput.stories.jsx +115 -0
- package/{dist/number/NumberContext.js → number-input/NumberInputContext.js} +2 -2
- package/{dist/number → number-input}/index.d.ts +3 -3
- package/package.json +32 -25
- package/paginator/Icons.js +66 -0
- package/paginator/Paginator.d.ts +4 -0
- package/paginator/Paginator.js +198 -0
- package/paginator/Paginator.stories.tsx +63 -0
- package/paginator/types.d.ts +38 -0
- package/paginator/types.js +5 -0
- package/password-input/PasswordInput.d.ts +4 -0
- package/{dist/password/Password.js → password-input/PasswordInput.js} +26 -64
- package/password-input/PasswordInput.stories.tsx +131 -0
- package/password-input/types.d.ts +100 -0
- package/password-input/types.js +5 -0
- package/progress-bar/ProgressBar.d.ts +4 -0
- package/{dist/progress-bar → progress-bar}/ProgressBar.js +20 -92
- package/progress-bar/ProgressBar.stories.jsx +58 -0
- package/progress-bar/types.d.ts +37 -0
- package/progress-bar/types.js +5 -0
- package/radio/Radio.d.ts +4 -0
- package/{dist/radio → radio}/Radio.js +15 -50
- package/radio/Radio.stories.tsx +192 -0
- package/radio/types.d.ts +54 -0
- package/radio/types.js +5 -0
- package/{dist/resultsetTable → resultsetTable}/ResultsetTable.js +35 -119
- package/resultsetTable/index.d.ts +19 -0
- package/select/Select.js +865 -0
- package/select/index.d.ts +131 -0
- package/{dist/sidenav → sidenav}/Sidenav.js +15 -49
- package/sidenav/index.d.ts +13 -0
- package/slider/Slider.d.ts +4 -0
- package/slider/Slider.js +317 -0
- package/slider/Slider.stories.tsx +172 -0
- package/slider/types.d.ts +78 -0
- package/slider/types.js +5 -0
- package/spinner/Spinner.d.ts +4 -0
- package/spinner/Spinner.js +250 -0
- package/spinner/Spinner.stories.jsx +102 -0
- package/spinner/types.d.ts +32 -0
- package/spinner/types.js +5 -0
- package/switch/Switch.d.ts +4 -0
- package/{dist/switch → switch}/Switch.js +26 -69
- package/switch/Switch.stories.tsx +160 -0
- package/switch/types.d.ts +58 -0
- package/switch/types.js +5 -0
- package/table/Table.d.ts +4 -0
- package/{dist/table → table}/Table.js +10 -24
- package/table/Table.stories.jsx +276 -0
- package/table/types.d.ts +21 -0
- package/table/types.js +5 -0
- package/tabs/Tabs.d.ts +4 -0
- package/tabs/Tabs.js +211 -0
- package/tabs/types.d.ts +71 -0
- package/tabs/types.js +5 -0
- package/tag/Tag.d.ts +4 -0
- package/tag/Tag.js +193 -0
- package/tag/Tag.stories.tsx +145 -0
- package/tag/types.d.ts +60 -0
- package/tag/types.js +5 -0
- package/{dist/new-input-text/NewInputText.js → text-input/TextInput.js} +270 -412
- package/{dist/new-input-text → text-input}/index.d.ts +3 -3
- package/{dist/new-textarea/NewTextarea.js → textarea/Textarea.js} +27 -75
- package/textarea/Textarea.stories.jsx +135 -0
- package/{dist/new-textarea → textarea}/index.d.ts +1 -1
- package/{dist/toggle → toggle}/Toggle.js +15 -49
- package/toggle/index.d.ts +21 -0
- package/toggle-group/ToggleGroup.js +243 -0
- package/toggle-group/index.d.ts +21 -0
- package/{dist/upload → upload}/Upload.js +11 -15
- package/upload/buttons-upload/ButtonsUpload.js +111 -0
- package/upload/buttons-upload/Icons.js +40 -0
- package/upload/dragAndDropArea/DragAndDropArea.js +225 -0
- package/upload/dragAndDropArea/Icons.js +39 -0
- package/upload/file-upload/FileToUpload.js +115 -0
- package/upload/file-upload/Icons.js +66 -0
- package/{dist/upload → upload}/files-upload/FilesToUpload.js +12 -26
- package/upload/index.d.ts +15 -0
- package/upload/transaction/Icons.js +160 -0
- package/upload/transaction/Transaction.js +104 -0
- package/upload/transactions/Transactions.js +94 -0
- package/{dist/useTheme.js → useTheme.js} +0 -0
- package/wizard/Icons.js +65 -0
- package/{dist/wizard → wizard}/Wizard.js +32 -172
- package/wizard/index.d.ts +18 -0
- package/README.md +0 -66
- package/babel.config.js +0 -8
- package/dist/BackgroundColorContext.js +0 -46
- package/dist/ThemeContext.js +0 -248
- package/dist/accordion-group/AccordionGroup.js +0 -186
- package/dist/alert/index.d.ts +0 -51
- package/dist/badge/Badge.js +0 -63
- package/dist/checkbox/Checkbox.stories.js +0 -144
- package/dist/checkbox/readme.md +0 -116
- package/dist/date/Date.stories.js +0 -205
- package/dist/date/readme.md +0 -73
- package/dist/footer/Footer.js +0 -395
- package/dist/footer/Footer.stories.js +0 -94
- package/dist/footer/dxc_logo.svg +0 -15
- package/dist/footer/readme.md +0 -41
- package/dist/header/Header.js +0 -403
- package/dist/header/Header.stories.js +0 -176
- package/dist/header/close_icon.svg +0 -1
- package/dist/header/dxc_logo_black.svg +0 -8
- package/dist/header/hamb_menu_black.svg +0 -1
- package/dist/header/hamb_menu_white.svg +0 -1
- package/dist/header/readme.md +0 -33
- package/dist/input-text/InputText.stories.js +0 -209
- package/dist/input-text/error.svg +0 -1
- package/dist/input-text/readme.md +0 -91
- package/dist/layout/facebook.svg +0 -45
- package/dist/layout/linkedin.svg +0 -50
- package/dist/layout/twitter.svg +0 -53
- package/dist/link/readme.md +0 -51
- package/dist/main.d.ts +0 -7
- package/dist/new-date/index.d.ts +0 -95
- package/dist/paginator/Paginator.js +0 -289
- package/dist/paginator/images/next.svg +0 -3
- package/dist/paginator/images/nextPage.svg +0 -3
- package/dist/paginator/images/previous.svg +0 -3
- package/dist/paginator/images/previousPage.svg +0 -3
- package/dist/paginator/readme.md +0 -50
- package/dist/password/index.d.ts +0 -94
- package/dist/password/styles.css +0 -3
- package/dist/progress-bar/ProgressBar.stories.js +0 -280
- package/dist/progress-bar/readme.md +0 -63
- package/dist/radio/Radio.stories.js +0 -166
- package/dist/radio/readme.md +0 -70
- package/dist/resultsetTable/arrow_downward-24px_wht.svg +0 -1
- package/dist/resultsetTable/arrow_upward-24px_wht.svg +0 -1
- package/dist/resultsetTable/unfold_more-24px_wht.svg +0 -1
- package/dist/slider/Slider.js +0 -319
- package/dist/slider/Slider.stories.js +0 -241
- package/dist/slider/readme.md +0 -64
- package/dist/spinner/Spinner.js +0 -381
- package/dist/spinner/Spinner.stories.js +0 -183
- package/dist/spinner/readme.md +0 -65
- package/dist/switch/Switch.stories.js +0 -134
- package/dist/switch/readme.md +0 -133
- package/dist/tabs/Tabs.js +0 -343
- package/dist/tabs/Tabs.stories.js +0 -130
- package/dist/tabs/readme.md +0 -78
- package/dist/tabs-for-sections/TabsForSections.js +0 -92
- package/dist/tabs-for-sections/readme.md +0 -78
- package/dist/tag/Tag.js +0 -282
- package/dist/toggle/Toggle.stories.js +0 -297
- package/dist/toggle/readme.md +0 -80
- package/dist/toggle-group/ToggleGroup.js +0 -223
- package/dist/upload/Upload.stories.js +0 -72
- package/dist/upload/buttons-upload/ButtonsUpload.js +0 -139
- package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
- package/dist/upload/buttons-upload/upload-button.svg +0 -1
- package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -329
- package/dist/upload/dragAndDropArea/upload_drop.svg +0 -4
- package/dist/upload/dragAndDropArea/upload_file.svg +0 -4
- package/dist/upload/file-upload/FileToUpload.js +0 -184
- package/dist/upload/file-upload/audio-icon.svg +0 -4
- package/dist/upload/file-upload/close.svg +0 -4
- package/dist/upload/file-upload/file-icon.svg +0 -4
- package/dist/upload/file-upload/video-icon.svg +0 -4
- package/dist/upload/readme.md +0 -37
- package/dist/upload/transaction/Transaction.js +0 -175
- package/dist/upload/transaction/audio-icon-err.svg +0 -4
- package/dist/upload/transaction/audio-icon.svg +0 -4
- package/dist/upload/transaction/error-icon.svg +0 -4
- package/dist/upload/transaction/file-icon-err.svg +0 -4
- package/dist/upload/transaction/file-icon.svg +0 -4
- package/dist/upload/transaction/image-icon-err.svg +0 -4
- package/dist/upload/transaction/image-icon.svg +0 -4
- package/dist/upload/transaction/success-icon.svg +0 -4
- package/dist/upload/transaction/video-icon-err.svg +0 -4
- package/dist/upload/transaction/video-icon.svg +0 -4
- package/dist/upload/transactions/Transactions.js +0 -138
- package/dist/wizard/invalid_icon.svg +0 -5
- package/dist/wizard/valid_icon.svg +0 -5
- package/dist/wizard/validation-wrong.svg +0 -6
- 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 -393
- 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 -99
- package/test/Header.test.js +0 -39
- package/test/Heading.test.js +0 -35
- package/test/InputText.test.js +0 -240
- package/test/Link.test.js +0 -43
- package/test/NewDate.test.js +0 -232
- package/test/NewInputText.test.js +0 -734
- package/test/NewTextarea.test.js +0 -195
- package/test/Number.test.js +0 -257
- package/test/Paginator.test.js +0 -177
- package/test/Password.test.js +0 -83
- package/test/ProgressBar.test.js +0 -35
- package/test/Radio.test.js +0 -37
- package/test/ResultsetTable.test.js +0 -329
- package/test/Select.test.js +0 -212
- package/test/Sidenav.test.js +0 -45
- package/test/Slider.test.js +0 -82
- 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/TabsForSections.test.js +0 -34
- package/test/Tag.test.js +0 -32
- package/test/TextArea.test.js +0 -52
- package/test/ToggleGroup.test.js +0 -81
- package/test/Upload.test.js +0 -60
- package/test/Wizard.test.js +0 -130
- package/test/mocks/pngMock.js +0 -1
- package/test/mocks/svgMock.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
4
|
|
|
5
|
+
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
@@ -33,177 +33,61 @@ var _uuid = require("uuid");
|
|
|
33
33
|
|
|
34
34
|
var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext.js"));
|
|
35
35
|
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
function _templateObject17() {
|
|
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"]);
|
|
40
|
-
|
|
41
|
-
_templateObject17 = function _templateObject17() {
|
|
42
|
-
return data;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
return data;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function _templateObject16() {
|
|
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\n svg {\n line-height: 1.75em;\n font-size: 0.875rem;\n }\n"]);
|
|
50
|
-
|
|
51
|
-
_templateObject16 = function _templateObject16() {
|
|
52
|
-
return data;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
return data;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function _templateObject15() {
|
|
59
|
-
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"]);
|
|
60
|
-
|
|
61
|
-
_templateObject15 = function _templateObject15() {
|
|
62
|
-
return data;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
return data;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function _templateObject14() {
|
|
69
|
-
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"]);
|
|
70
|
-
|
|
71
|
-
_templateObject14 = function _templateObject14() {
|
|
72
|
-
return data;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
return data;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function _templateObject13() {
|
|
79
|
-
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"]);
|
|
80
|
-
|
|
81
|
-
_templateObject13 = function _templateObject13() {
|
|
82
|
-
return data;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
return data;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function _templateObject12() {
|
|
89
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n min-height: 1.5em;\n color: ", ";\n font-family: ", ";\n font-size: 0.75rem;\n font-weight: 400;\n line-height: 1.5em;\n"]);
|
|
90
|
-
|
|
91
|
-
_templateObject12 = function _templateObject12() {
|
|
92
|
-
return data;
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
return data;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function _templateObject11() {
|
|
99
|
-
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 color: ", ";\n\n svg {\n line-height: 18px;\n font-size: 1.25rem;\n }\n"]);
|
|
100
|
-
|
|
101
|
-
_templateObject11 = function _templateObject11() {
|
|
102
|
-
return data;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
return data;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function _templateObject10() {
|
|
109
|
-
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"]);
|
|
110
|
-
|
|
111
|
-
_templateObject10 = function _templateObject10() {
|
|
112
|
-
return data;
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
return data;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function _templateObject9() {
|
|
119
|
-
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"]);
|
|
120
|
-
|
|
121
|
-
_templateObject9 = function _templateObject9() {
|
|
122
|
-
return data;
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
return data;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function _templateObject8() {
|
|
129
|
-
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 box-shadow: 0 0 0 2px transparent;\n background-color: ", ";\n\n color: ", ";\n\n ", "\n\n svg {\n line-height: 18px;\n }\n"]);
|
|
130
|
-
|
|
131
|
-
_templateObject8 = function _templateObject8() {
|
|
132
|
-
return data;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
return data;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
function _templateObject7() {
|
|
139
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: 16px;\n height: 16px;\n"]);
|
|
140
|
-
|
|
141
|
-
_templateObject7 = function _templateObject7() {
|
|
142
|
-
return data;
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
return data;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function _templateObject6() {
|
|
149
|
-
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"]);
|
|
150
|
-
|
|
151
|
-
_templateObject6 = function _templateObject6() {
|
|
152
|
-
return data;
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
return data;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function _templateObject5() {
|
|
159
|
-
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"]);
|
|
160
|
-
|
|
161
|
-
_templateObject5 = function _templateObject5() {
|
|
162
|
-
return data;
|
|
163
|
-
};
|
|
36
|
+
var _NumberInputContext = _interopRequireDefault(require("../number-input/NumberInputContext.js"));
|
|
164
37
|
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
function _templateObject4() {
|
|
169
|
-
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"]);
|
|
170
|
-
|
|
171
|
-
_templateObject4 = function _templateObject4() {
|
|
172
|
-
return data;
|
|
173
|
-
};
|
|
38
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
|
|
174
39
|
|
|
175
|
-
|
|
176
|
-
}
|
|
40
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
177
41
|
|
|
178
|
-
function
|
|
179
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-weight: ", ";\n"]);
|
|
180
|
-
|
|
181
|
-
_templateObject3 = function _templateObject3() {
|
|
182
|
-
return data;
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
return data;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
function _templateObject2() {
|
|
189
|
-
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"]);
|
|
190
|
-
|
|
191
|
-
_templateObject2 = function _templateObject2() {
|
|
192
|
-
return data;
|
|
193
|
-
};
|
|
42
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
194
43
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
44
|
+
var textInputIcons = {
|
|
45
|
+
error: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
46
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
47
|
+
height: "24px",
|
|
48
|
+
viewBox: "0 0 24 24",
|
|
49
|
+
width: "24px",
|
|
50
|
+
fill: "currentColor"
|
|
51
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
52
|
+
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"
|
|
53
|
+
})),
|
|
54
|
+
clear: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
55
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
56
|
+
width: "24",
|
|
57
|
+
height: "24",
|
|
58
|
+
viewBox: "0 0 24 24",
|
|
59
|
+
fill: "currentColor"
|
|
60
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
61
|
+
d: "M0 0h24v24H0V0z",
|
|
62
|
+
fill: "none"
|
|
63
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
64
|
+
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"
|
|
65
|
+
})),
|
|
66
|
+
increment: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
67
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
68
|
+
height: "24px",
|
|
69
|
+
viewBox: "0 0 24 24",
|
|
70
|
+
width: "24px",
|
|
71
|
+
fill: "currentColor"
|
|
72
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
73
|
+
d: "M0 0h24v24H0z",
|
|
74
|
+
fill: "none"
|
|
75
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
76
|
+
d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
|
|
77
|
+
})),
|
|
78
|
+
decrement: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
79
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
80
|
+
height: "24px",
|
|
81
|
+
viewBox: "0 0 24 24",
|
|
82
|
+
width: "24px",
|
|
83
|
+
fill: "currentColor"
|
|
84
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
85
|
+
d: "M0 0h24v24H0z",
|
|
86
|
+
fill: "none"
|
|
87
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
88
|
+
d: "M19 13H5v-2h14v2z"
|
|
89
|
+
}))
|
|
90
|
+
};
|
|
207
91
|
|
|
208
92
|
var makeCancelable = function makeCancelable(promise) {
|
|
209
93
|
var hasCanceled_ = false;
|
|
@@ -242,7 +126,22 @@ var patternMatch = function patternMatch(pattern, value) {
|
|
|
242
126
|
return new RegExp(pattern).test(value);
|
|
243
127
|
};
|
|
244
128
|
|
|
245
|
-
var
|
|
129
|
+
var getLastOptionIndex = function getLastOptionIndex(filteredSuggestions) {
|
|
130
|
+
var last = 0;
|
|
131
|
+
|
|
132
|
+
var reducer = function reducer(acc, current) {
|
|
133
|
+
var _current$options;
|
|
134
|
+
|
|
135
|
+
return acc + ((_current$options = current.options) === null || _current$options === void 0 ? void 0 : _current$options.length);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
if (filteredSuggestions.length > 0) filteredSuggestions[0].options ? last = filteredSuggestions.reduce(reducer, 0) - 1 : last = filteredSuggestions.length - 1;
|
|
139
|
+
return last;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
var DxcTextInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
|
|
143
|
+
var _action$title;
|
|
144
|
+
|
|
246
145
|
var _ref$label = _ref.label,
|
|
247
146
|
label = _ref$label === void 0 ? "" : _ref$label,
|
|
248
147
|
_ref$name = _ref.name,
|
|
@@ -278,49 +177,39 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
278
177
|
_ref$tabIndex = _ref.tabIndex,
|
|
279
178
|
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
280
179
|
|
|
281
|
-
var _useState = (0, _react.useState)(""),
|
|
282
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState,
|
|
283
|
-
|
|
284
|
-
setInnerValue = _useState2[1];
|
|
180
|
+
var _useState = (0, _react.useState)("input-".concat((0, _uuid.v4)())),
|
|
181
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 1),
|
|
182
|
+
inputId = _useState2[0];
|
|
285
183
|
|
|
286
|
-
var _useState3 = (0, _react.useState)(
|
|
184
|
+
var _useState3 = (0, _react.useState)(""),
|
|
287
185
|
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
288
|
-
|
|
289
|
-
|
|
186
|
+
innerValue = _useState4[0],
|
|
187
|
+
setInnerValue = _useState4[1];
|
|
290
188
|
|
|
291
189
|
var _useState5 = (0, _react.useState)(false),
|
|
292
190
|
_useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
|
|
293
|
-
|
|
294
|
-
|
|
191
|
+
isOpen = _useState6[0],
|
|
192
|
+
changeIsOpen = _useState6[1];
|
|
295
193
|
|
|
296
194
|
var _useState7 = (0, _react.useState)(false),
|
|
297
195
|
_useState8 = (0, _slicedToArray2["default"])(_useState7, 2),
|
|
298
|
-
|
|
299
|
-
|
|
196
|
+
isSearching = _useState8[0],
|
|
197
|
+
changeIsSearching = _useState8[1];
|
|
300
198
|
|
|
301
199
|
var _useState9 = (0, _react.useState)(false),
|
|
302
200
|
_useState10 = (0, _slicedToArray2["default"])(_useState9, 2),
|
|
303
|
-
|
|
304
|
-
|
|
201
|
+
isAutosuggestError = _useState10[0],
|
|
202
|
+
changeIsAutosuggestError = _useState10[1];
|
|
305
203
|
|
|
306
|
-
var _useState11 = (0, _react.useState)(
|
|
204
|
+
var _useState11 = (0, _react.useState)([]),
|
|
307
205
|
_useState12 = (0, _slicedToArray2["default"])(_useState11, 2),
|
|
308
|
-
|
|
309
|
-
|
|
206
|
+
filteredSuggestions = _useState12[0],
|
|
207
|
+
changeFilteredSuggestions = _useState12[1];
|
|
310
208
|
|
|
311
|
-
var _useState13 = (0, _react.useState)(
|
|
209
|
+
var _useState13 = (0, _react.useState)(-1),
|
|
312
210
|
_useState14 = (0, _slicedToArray2["default"])(_useState13, 2),
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
var _useState15 = (0, _react.useState)(-1),
|
|
317
|
-
_useState16 = (0, _slicedToArray2["default"])(_useState15, 2),
|
|
318
|
-
visualFocusedSuggIndex = _useState16[0],
|
|
319
|
-
changeVisualFocusedSuggIndex = _useState16[1];
|
|
320
|
-
|
|
321
|
-
var _useState17 = (0, _react.useState)("input-".concat((0, _uuid.v4)())),
|
|
322
|
-
_useState18 = (0, _slicedToArray2["default"])(_useState17, 1),
|
|
323
|
-
inputId = _useState18[0];
|
|
211
|
+
visualFocusedSuggIndex = _useState14[0],
|
|
212
|
+
changeVisualFocusedSuggIndex = _useState14[1];
|
|
324
213
|
|
|
325
214
|
var suggestionsRef = (0, _react.useRef)(null);
|
|
326
215
|
var inputRef = (0, _react.useRef)(null);
|
|
@@ -329,18 +218,21 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
329
218
|
var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
|
|
330
219
|
var autosuggestId = "".concat(inputId, "-listBox");
|
|
331
220
|
var errorId = "error-message-".concat(inputId);
|
|
332
|
-
var
|
|
221
|
+
var numberInputContext = (0, _react.useContext)(_NumberInputContext["default"]);
|
|
222
|
+
var lastOptionIndex = (0, _react.useMemo)(function () {
|
|
223
|
+
return getLastOptionIndex(filteredSuggestions);
|
|
224
|
+
}, [filteredSuggestions]);
|
|
333
225
|
|
|
334
226
|
var isNotOptional = function isNotOptional(value) {
|
|
335
227
|
return value === "" && !optional;
|
|
336
228
|
};
|
|
337
229
|
|
|
338
230
|
var isLengthIncorrect = function isLengthIncorrect(value) {
|
|
339
|
-
return value
|
|
231
|
+
return value && (length === null || length === void 0 ? void 0 : length.min) && (length === null || length === void 0 ? void 0 : length.max) && (value.length < length.min || value.length > length.max);
|
|
340
232
|
};
|
|
341
233
|
|
|
342
234
|
var isNumberIncorrect = function isNumberIncorrect(value) {
|
|
343
|
-
return (
|
|
235
|
+
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);
|
|
344
236
|
};
|
|
345
237
|
|
|
346
238
|
var isTextInputType = function isTextInputType() {
|
|
@@ -350,15 +242,15 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
350
242
|
};
|
|
351
243
|
|
|
352
244
|
var getNumberErrorMessage = function getNumberErrorMessage(value) {
|
|
353
|
-
if (
|
|
245
|
+
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, ".");
|
|
354
246
|
};
|
|
355
247
|
|
|
356
|
-
var
|
|
357
|
-
return typeof suggestions === "function" || suggestions
|
|
248
|
+
var hasSuggestions = function hasSuggestions() {
|
|
249
|
+
return typeof suggestions === "function" || (suggestions === null || suggestions === void 0 ? void 0 : suggestions.length) > 0;
|
|
358
250
|
};
|
|
359
251
|
|
|
360
252
|
var openSuggestions = function openSuggestions() {
|
|
361
|
-
|
|
253
|
+
hasSuggestions() && changeIsOpen(true);
|
|
362
254
|
};
|
|
363
255
|
|
|
364
256
|
var closeSuggestions = function closeSuggestions() {
|
|
@@ -391,13 +283,14 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
391
283
|
document.activeElement !== actionRef.current && inputRef.current.focus();
|
|
392
284
|
};
|
|
393
285
|
|
|
394
|
-
var
|
|
395
|
-
|
|
396
|
-
|
|
286
|
+
var handleInputContainerOnMouseDown = function handleInputContainerOnMouseDown(event) {
|
|
287
|
+
// Avoid input to lose the focus when the container is pressed
|
|
288
|
+
document.activeElement === inputRef.current && event.preventDefault();
|
|
397
289
|
};
|
|
398
290
|
|
|
399
|
-
var
|
|
291
|
+
var handleIOnChange = function handleIOnChange(event) {
|
|
400
292
|
openSuggestions();
|
|
293
|
+
changeValue(event.target.value);
|
|
401
294
|
};
|
|
402
295
|
|
|
403
296
|
var handleIOnBlur = function handleIOnBlur(event) {
|
|
@@ -420,15 +313,11 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
420
313
|
});
|
|
421
314
|
};
|
|
422
315
|
|
|
423
|
-
var handleIOnFocus = function handleIOnFocus() {
|
|
424
|
-
openSuggestions();
|
|
425
|
-
};
|
|
426
|
-
|
|
427
316
|
var handleIOnKeyDown = function handleIOnKeyDown(event) {
|
|
428
317
|
switch (event.keyCode) {
|
|
429
318
|
case 40:
|
|
430
319
|
// Arrow Down
|
|
431
|
-
if (
|
|
320
|
+
if (numberInputContext) {
|
|
432
321
|
decrementNumber();
|
|
433
322
|
event.preventDefault();
|
|
434
323
|
} else {
|
|
@@ -439,8 +328,6 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
439
328
|
changeVisualFocusedSuggIndex(function (visualFocusedSuggIndex) {
|
|
440
329
|
if (visualFocusedSuggIndex < filteredSuggestions.length - 1) return visualFocusedSuggIndex + 1;else if (visualFocusedSuggIndex === filteredSuggestions.length - 1) return 0;
|
|
441
330
|
});
|
|
442
|
-
changeIsScrollable(true);
|
|
443
|
-
changeIsActiveSuggestion(false);
|
|
444
331
|
}
|
|
445
332
|
}
|
|
446
333
|
|
|
@@ -448,7 +335,7 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
448
335
|
|
|
449
336
|
case 38:
|
|
450
337
|
// Arrow Up
|
|
451
|
-
if (
|
|
338
|
+
if (numberInputContext) {
|
|
452
339
|
incrementNumber();
|
|
453
340
|
event.preventDefault();
|
|
454
341
|
} else {
|
|
@@ -459,8 +346,6 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
459
346
|
changeVisualFocusedSuggIndex(function (visualFocusedSuggIndex) {
|
|
460
347
|
if (visualFocusedSuggIndex === 0 || visualFocusedSuggIndex === -1) return filteredSuggestions.length > 0 ? filteredSuggestions.length - 1 : suggestions.length - 1;else return visualFocusedSuggIndex - 1;
|
|
461
348
|
});
|
|
462
|
-
changeIsScrollable(true);
|
|
463
|
-
changeIsActiveSuggestion(false);
|
|
464
349
|
}
|
|
465
350
|
}
|
|
466
351
|
|
|
@@ -470,7 +355,7 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
470
355
|
// Esc
|
|
471
356
|
event.preventDefault();
|
|
472
357
|
|
|
473
|
-
if (
|
|
358
|
+
if (hasSuggestions()) {
|
|
474
359
|
changeValue("");
|
|
475
360
|
isOpen && closeSuggestions();
|
|
476
361
|
}
|
|
@@ -479,7 +364,7 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
479
364
|
|
|
480
365
|
case 13:
|
|
481
366
|
// Enter
|
|
482
|
-
if (
|
|
367
|
+
if (hasSuggestions() && !isSearching) {
|
|
483
368
|
var validFocusedSuggestion = filteredSuggestions.length > 0 && visualFocusedSuggIndex >= 0 && visualFocusedSuggIndex < filteredSuggestions.length;
|
|
484
369
|
validFocusedSuggestion && changeValue(filteredSuggestions[visualFocusedSuggIndex]);
|
|
485
370
|
isOpen && closeSuggestions();
|
|
@@ -489,6 +374,22 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
489
374
|
}
|
|
490
375
|
};
|
|
491
376
|
|
|
377
|
+
var handleClearActionOnClick = function handleClearActionOnClick() {
|
|
378
|
+
changeValue("");
|
|
379
|
+
inputRef.current.focus();
|
|
380
|
+
suggestions && closeSuggestions();
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
var handleDecrementActionOnClick = function handleDecrementActionOnClick() {
|
|
384
|
+
decrementNumber();
|
|
385
|
+
inputRef.current.focus();
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
var handleIncrementActionOnClick = function handleIncrementActionOnClick() {
|
|
389
|
+
incrementNumber();
|
|
390
|
+
inputRef.current.focus();
|
|
391
|
+
};
|
|
392
|
+
|
|
492
393
|
var setNumberProps = function setNumberProps(type, min, max, step) {
|
|
493
394
|
var _inputRef$current3, _inputRef$current4, _inputRef$current5, _inputRef$current6;
|
|
494
395
|
|
|
@@ -498,14 +399,55 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
498
399
|
step && (inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current6 = inputRef.current) === null || _inputRef$current6 === void 0 ? void 0 : _inputRef$current6.setAttribute("step", step));
|
|
499
400
|
};
|
|
500
401
|
|
|
402
|
+
var decrementNumber = function decrementNumber() {
|
|
403
|
+
var numberValue = value !== null && value !== void 0 ? value : innerValue;
|
|
404
|
+
|
|
405
|
+
if (numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.minNumber && parseInt(numberValue) < (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.minNumber)) {
|
|
406
|
+
changeValue(parseInt(numberValue));
|
|
407
|
+
} else if (numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.maxNumber && parseInt(numberValue) > (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.maxNumber)) {
|
|
408
|
+
changeValue(numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.maxNumber);
|
|
409
|
+
} 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))) {
|
|
410
|
+
changeValue(numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.minNumber);
|
|
411
|
+
} 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 !== "") {
|
|
412
|
+
changeValue(parseInt(numberValue) - (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.stepNumber));
|
|
413
|
+
} else if (numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.stepNumber && numberValue == "") {
|
|
414
|
+
changeValue(-(numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.stepNumber));
|
|
415
|
+
} else if (numberValue === "") {
|
|
416
|
+
changeValue(-1);
|
|
417
|
+
} else {
|
|
418
|
+
changeValue(parseInt(numberValue) - 1);
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
var incrementNumber = function incrementNumber() {
|
|
423
|
+
var numberValue = value !== null && value !== void 0 ? value : innerValue;
|
|
424
|
+
|
|
425
|
+
if (numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.maxNumber && parseInt(numberValue) > (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.maxNumber)) {
|
|
426
|
+
changeValue(parseInt(numberValue));
|
|
427
|
+
} else if (numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.minNumber && (parseInt(numberValue) < (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.minNumber) || numberValue === "")) {
|
|
428
|
+
changeValue(numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.minNumber);
|
|
429
|
+
} 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))) {
|
|
430
|
+
changeValue(numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.maxNumber);
|
|
431
|
+
} 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 !== "") {
|
|
432
|
+
changeValue(parseInt(numberValue) + (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.stepNumber));
|
|
433
|
+
} else if (numberInputContext !== null && numberInputContext !== void 0 && numberInputContext.stepNumber && numberValue == "") {
|
|
434
|
+
changeValue(numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.stepNumber);
|
|
435
|
+
} else if (numberValue === "") {
|
|
436
|
+
changeValue(1);
|
|
437
|
+
} else {
|
|
438
|
+
changeValue(parseInt(numberValue) + 1);
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
|
|
501
442
|
(0, _react.useLayoutEffect)(function () {
|
|
502
|
-
var _suggestionsRef$curre;
|
|
443
|
+
var _suggestionsRef$curre, _visualFocusedOptionE;
|
|
503
444
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
445
|
+
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];
|
|
446
|
+
visualFocusedOptionEl === null || visualFocusedOptionEl === void 0 ? void 0 : (_visualFocusedOptionE = visualFocusedOptionEl.scrollIntoView) === null || _visualFocusedOptionE === void 0 ? void 0 : _visualFocusedOptionE.call(visualFocusedOptionEl, {
|
|
447
|
+
block: "nearest",
|
|
448
|
+
inline: "start"
|
|
449
|
+
});
|
|
450
|
+
}, [visualFocusedSuggIndex]);
|
|
509
451
|
(0, _react.useEffect)(function () {
|
|
510
452
|
if (typeof suggestions === "function") {
|
|
511
453
|
changeIsSearching(true);
|
|
@@ -525,121 +467,15 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
525
467
|
return function () {
|
|
526
468
|
cancelablePromise.cancel();
|
|
527
469
|
};
|
|
528
|
-
} else if (suggestions
|
|
470
|
+
} else if ((suggestions === null || suggestions === void 0 ? void 0 : suggestions.length) > 0) {
|
|
529
471
|
changeFilteredSuggestions(suggestions.filter(function (suggestion) {
|
|
530
472
|
return suggestion.toUpperCase().startsWith((value !== null && value !== void 0 ? value : innerValue).toUpperCase());
|
|
531
473
|
}));
|
|
532
474
|
changeVisualFocusedSuggIndex(-1);
|
|
533
475
|
}
|
|
534
476
|
|
|
535
|
-
|
|
536
|
-
}, [value, innerValue, suggestions]);
|
|
537
|
-
var defaultClearAction = {
|
|
538
|
-
onClick: function onClick() {
|
|
539
|
-
changeValue("");
|
|
540
|
-
inputRef.current.focus();
|
|
541
|
-
suggestions && closeSuggestions();
|
|
542
|
-
},
|
|
543
|
-
icon: _react["default"].createElement("svg", {
|
|
544
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
545
|
-
width: "24",
|
|
546
|
-
height: "24",
|
|
547
|
-
viewBox: "0 0 24 24",
|
|
548
|
-
fill: "currentColor"
|
|
549
|
-
}, _react["default"].createElement("path", {
|
|
550
|
-
d: "M0 0h24v24H0V0z",
|
|
551
|
-
fill: "none"
|
|
552
|
-
}), _react["default"].createElement("path", {
|
|
553
|
-
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"
|
|
554
|
-
}))
|
|
555
|
-
};
|
|
556
|
-
|
|
557
|
-
var errorIcon = _react["default"].createElement("svg", {
|
|
558
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
559
|
-
height: "24px",
|
|
560
|
-
viewBox: "0 0 24 24",
|
|
561
|
-
width: "24px",
|
|
562
|
-
fill: "currentColor"
|
|
563
|
-
}, _react["default"].createElement("path", {
|
|
564
|
-
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"
|
|
565
|
-
}));
|
|
566
|
-
|
|
567
|
-
var decrementNumber = function decrementNumber() {
|
|
568
|
-
var numberValue = value !== null && value !== void 0 ? value : innerValue;
|
|
569
|
-
|
|
570
|
-
if (numberContext !== null && numberContext !== void 0 && numberContext.minNumber && parseInt(numberValue) < (numberContext === null || numberContext === void 0 ? void 0 : numberContext.minNumber)) {
|
|
571
|
-
changeValue(parseInt(numberValue));
|
|
572
|
-
} else if (numberContext !== null && numberContext !== void 0 && numberContext.maxNumber && parseInt(numberValue) > (numberContext === null || numberContext === void 0 ? void 0 : numberContext.maxNumber)) {
|
|
573
|
-
changeValue(numberContext === null || numberContext === void 0 ? void 0 : numberContext.maxNumber);
|
|
574
|
-
} else if (numberContext !== null && numberContext !== void 0 && numberContext.minNumber && (parseInt(numberValue) === (numberContext === null || numberContext === void 0 ? void 0 : numberContext.minNumber) || numberValue === "" || numberContext !== null && numberContext !== void 0 && numberContext.stepNumber && parseInt(numberValue) - (numberContext === null || numberContext === void 0 ? void 0 : numberContext.stepNumber) < (numberContext === null || numberContext === void 0 ? void 0 : numberContext.minNumber))) {
|
|
575
|
-
changeValue(numberContext === null || numberContext === void 0 ? void 0 : numberContext.minNumber);
|
|
576
|
-
} else if (numberContext !== null && numberContext !== void 0 && numberContext.stepNumber && numberContext !== null && numberContext !== void 0 && numberContext.minNumber && parseInt(numberValue) - (numberContext === null || numberContext === void 0 ? void 0 : numberContext.stepNumber) >= (numberContext === null || numberContext === void 0 ? void 0 : numberContext.minNumber) || numberContext !== null && numberContext !== void 0 && numberContext.stepNumber && numberValue !== "") {
|
|
577
|
-
changeValue(parseInt(numberValue) - (numberContext === null || numberContext === void 0 ? void 0 : numberContext.stepNumber));
|
|
578
|
-
} else if (numberContext !== null && numberContext !== void 0 && numberContext.stepNumber && numberValue == "") {
|
|
579
|
-
changeValue(-(numberContext === null || numberContext === void 0 ? void 0 : numberContext.stepNumber));
|
|
580
|
-
} else if (numberValue === "") {
|
|
581
|
-
changeValue(-1);
|
|
582
|
-
} else {
|
|
583
|
-
changeValue(parseInt(numberValue) - 1);
|
|
584
|
-
}
|
|
585
|
-
};
|
|
586
|
-
|
|
587
|
-
var incrementNumber = function incrementNumber() {
|
|
588
|
-
var numberValue = value !== null && value !== void 0 ? value : innerValue;
|
|
589
|
-
|
|
590
|
-
if (numberContext !== null && numberContext !== void 0 && numberContext.maxNumber && parseInt(numberValue) > (numberContext === null || numberContext === void 0 ? void 0 : numberContext.maxNumber)) {
|
|
591
|
-
changeValue(parseInt(numberValue));
|
|
592
|
-
} else if (numberContext !== null && numberContext !== void 0 && numberContext.minNumber && (parseInt(numberValue) < (numberContext === null || numberContext === void 0 ? void 0 : numberContext.minNumber) || numberValue === "")) {
|
|
593
|
-
changeValue(numberContext === null || numberContext === void 0 ? void 0 : numberContext.minNumber);
|
|
594
|
-
} else if (numberContext !== null && numberContext !== void 0 && numberContext.maxNumber && (parseInt(numberValue) === (numberContext === null || numberContext === void 0 ? void 0 : numberContext.maxNumber) || numberContext !== null && numberContext !== void 0 && numberContext.stepNumber && parseInt(numberValue) + (numberContext === null || numberContext === void 0 ? void 0 : numberContext.stepNumber) > (numberContext === null || numberContext === void 0 ? void 0 : numberContext.maxNumber))) {
|
|
595
|
-
changeValue(numberContext === null || numberContext === void 0 ? void 0 : numberContext.maxNumber);
|
|
596
|
-
} else if (numberContext !== null && numberContext !== void 0 && numberContext.stepNumber && numberContext !== null && numberContext !== void 0 && numberContext.maxNumber && parseInt(numberValue) + (numberContext === null || numberContext === void 0 ? void 0 : numberContext.stepNumber) <= (numberContext === null || numberContext === void 0 ? void 0 : numberContext.maxNumber) || numberContext !== null && numberContext !== void 0 && numberContext.stepNumber && numberValue !== "") {
|
|
597
|
-
changeValue(parseInt(numberValue) + (numberContext === null || numberContext === void 0 ? void 0 : numberContext.stepNumber));
|
|
598
|
-
} else if (numberContext !== null && numberContext !== void 0 && numberContext.stepNumber && numberValue == "") {
|
|
599
|
-
changeValue(numberContext === null || numberContext === void 0 ? void 0 : numberContext.stepNumber);
|
|
600
|
-
} else if (numberValue === "") {
|
|
601
|
-
changeValue(1);
|
|
602
|
-
} else {
|
|
603
|
-
changeValue(parseInt(numberValue) + 1);
|
|
604
|
-
}
|
|
605
|
-
};
|
|
606
|
-
|
|
607
|
-
var decrementAction = {
|
|
608
|
-
onClick: function onClick() {
|
|
609
|
-
decrementNumber();
|
|
610
|
-
inputRef.current.focus();
|
|
611
|
-
},
|
|
612
|
-
icon: _react["default"].createElement("svg", {
|
|
613
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
614
|
-
height: "24px",
|
|
615
|
-
viewBox: "0 0 24 24",
|
|
616
|
-
width: "24px",
|
|
617
|
-
fill: "currentColor"
|
|
618
|
-
}, _react["default"].createElement("path", {
|
|
619
|
-
d: "M0 0h24v24H0z",
|
|
620
|
-
fill: "none"
|
|
621
|
-
}), _react["default"].createElement("path", {
|
|
622
|
-
d: "M19 13H5v-2h14v2z"
|
|
623
|
-
}))
|
|
624
|
-
};
|
|
625
|
-
var incrementAction = {
|
|
626
|
-
onClick: function onClick() {
|
|
627
|
-
incrementNumber();
|
|
628
|
-
inputRef.current.focus();
|
|
629
|
-
},
|
|
630
|
-
icon: _react["default"].createElement("svg", {
|
|
631
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
632
|
-
height: "24px",
|
|
633
|
-
viewBox: "0 0 24 24",
|
|
634
|
-
width: "24px",
|
|
635
|
-
fill: "currentColor"
|
|
636
|
-
}, _react["default"].createElement("path", {
|
|
637
|
-
d: "M0 0h24v24H0z",
|
|
638
|
-
fill: "none"
|
|
639
|
-
}), _react["default"].createElement("path", {
|
|
640
|
-
d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
|
|
641
|
-
}))
|
|
642
|
-
};
|
|
477
|
+
numberInputContext && setNumberProps(numberInputContext.typeNumber, numberInputContext.minNumber, numberInputContext.maxNumber, numberInputContext.stepNumber);
|
|
478
|
+
}, [value, innerValue, suggestions, numberInputContext]);
|
|
643
479
|
|
|
644
480
|
var HighlightedSuggestion = function HighlightedSuggestion(_ref2) {
|
|
645
481
|
var suggestion = _ref2.suggestion,
|
|
@@ -647,62 +483,58 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
647
483
|
var regEx = new RegExp(value !== null && value !== void 0 ? value : innerValue, "i");
|
|
648
484
|
var matchedWords = suggestion.match(regEx);
|
|
649
485
|
var noMatchedWords = suggestion.replace(regEx, "");
|
|
650
|
-
|
|
486
|
+
var isLastOption = index === lastOptionIndex;
|
|
487
|
+
return /*#__PURE__*/_react["default"].createElement(Suggestion, {
|
|
651
488
|
id: "suggestion-".concat(index),
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
onMouseUp: function onMouseUp() {
|
|
656
|
-
if (isActiveSuggestion) {
|
|
657
|
-
changeValue(suggestion);
|
|
658
|
-
changeIsActiveSuggestion(false);
|
|
659
|
-
closeSuggestions();
|
|
660
|
-
}
|
|
661
|
-
},
|
|
662
|
-
onMouseEnter: function onMouseEnter() {
|
|
663
|
-
changeVisualFocusedSuggIndex(index);
|
|
664
|
-
},
|
|
665
|
-
onMouseLeave: function onMouseLeave() {
|
|
666
|
-
changeIsActiveSuggestion(false);
|
|
489
|
+
onClick: function onClick() {
|
|
490
|
+
changeValue(suggestion);
|
|
491
|
+
closeSuggestions();
|
|
667
492
|
},
|
|
668
493
|
visualFocused: visualFocusedSuggIndex === index,
|
|
669
|
-
active: visualFocusedSuggIndex === index && isActiveSuggestion,
|
|
670
494
|
role: "option",
|
|
671
495
|
"aria-selected": visualFocusedSuggIndex === index && "true"
|
|
672
|
-
},
|
|
496
|
+
}, /*#__PURE__*/_react["default"].createElement(StyledSuggestion, {
|
|
497
|
+
last: isLastOption,
|
|
498
|
+
visualFocused: visualFocusedSuggIndex === index
|
|
499
|
+
}, typeof suggestions === "function" ? suggestion : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("strong", null, matchedWords), noMatchedWords)));
|
|
673
500
|
};
|
|
674
501
|
|
|
675
|
-
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
676
|
-
theme: colorsTheme.
|
|
677
|
-
}, _react["default"].createElement(DxcInput, {
|
|
502
|
+
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
503
|
+
theme: colorsTheme.textInput
|
|
504
|
+
}, /*#__PURE__*/_react["default"].createElement(DxcInput, {
|
|
678
505
|
margin: margin,
|
|
679
506
|
ref: ref,
|
|
680
507
|
size: size
|
|
681
|
-
}, _react["default"].createElement(Label, {
|
|
508
|
+
}, /*#__PURE__*/_react["default"].createElement(Label, {
|
|
682
509
|
htmlFor: inputId,
|
|
683
510
|
disabled: disabled,
|
|
684
511
|
backgroundType: backgroundType
|
|
685
|
-
}, label, " ", optional && _react["default"].createElement(OptionalLabel, null, "(Optional)")), _react["default"].createElement(HelperText, {
|
|
512
|
+
}, label, " ", optional && /*#__PURE__*/_react["default"].createElement(OptionalLabel, null, "(Optional)")), /*#__PURE__*/_react["default"].createElement(HelperText, {
|
|
686
513
|
disabled: disabled,
|
|
687
514
|
backgroundType: backgroundType
|
|
688
|
-
}, helperText), _react["default"].createElement(InputContainer, {
|
|
515
|
+
}, helperText), /*#__PURE__*/_react["default"].createElement(InputContainer, {
|
|
689
516
|
error: error,
|
|
690
517
|
disabled: disabled,
|
|
691
518
|
backgroundType: backgroundType,
|
|
692
|
-
onClick: handleInputContainerOnClick
|
|
693
|
-
|
|
519
|
+
onClick: handleInputContainerOnClick,
|
|
520
|
+
onMouseDown: handleInputContainerOnMouseDown
|
|
521
|
+
}, prefix && /*#__PURE__*/_react["default"].createElement(Prefix, {
|
|
694
522
|
disabled: disabled,
|
|
695
523
|
backgroundType: backgroundType
|
|
696
|
-
}, prefix), _react["default"].createElement(Input, {
|
|
524
|
+
}, prefix), /*#__PURE__*/_react["default"].createElement(Input, {
|
|
697
525
|
id: inputId,
|
|
698
526
|
name: name,
|
|
699
527
|
value: value !== null && value !== void 0 ? value : innerValue,
|
|
700
528
|
placeholder: placeholder,
|
|
701
|
-
onChange: handleIOnChange,
|
|
702
|
-
onClick: handleIOnClick,
|
|
703
529
|
onBlur: handleIOnBlur,
|
|
704
|
-
|
|
530
|
+
onChange: handleIOnChange,
|
|
531
|
+
onFocus: function onFocus() {
|
|
532
|
+
openSuggestions();
|
|
533
|
+
},
|
|
705
534
|
onKeyDown: handleIOnKeyDown,
|
|
535
|
+
onMouseDown: function onMouseDown(event) {
|
|
536
|
+
event.stopPropagation();
|
|
537
|
+
},
|
|
706
538
|
disabled: disabled,
|
|
707
539
|
ref: inputRef,
|
|
708
540
|
backgroundType: backgroundType,
|
|
@@ -711,68 +543,78 @@ var DxcNewInputText = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
711
543
|
maxLength: length === null || length === void 0 ? void 0 : length.max,
|
|
712
544
|
autoComplete: autocomplete,
|
|
713
545
|
tabIndex: tabIndex,
|
|
714
|
-
role: isTextInputType() &&
|
|
715
|
-
"aria-autocomplete": isTextInputType() &&
|
|
716
|
-
"aria-controls": isTextInputType() &&
|
|
717
|
-
"aria-expanded": isTextInputType() &&
|
|
718
|
-
"aria-activedescendant": isTextInputType() &&
|
|
546
|
+
role: isTextInputType() && hasSuggestions() ? "combobox" : "textbox",
|
|
547
|
+
"aria-autocomplete": isTextInputType() && hasSuggestions() ? "list" : undefined,
|
|
548
|
+
"aria-controls": isTextInputType() && hasSuggestions() ? autosuggestId : undefined,
|
|
549
|
+
"aria-expanded": isTextInputType() && hasSuggestions() ? isOpen ? "true" : "false" : undefined,
|
|
550
|
+
"aria-activedescendant": isTextInputType() && hasSuggestions() && isOpen && visualFocusedSuggIndex !== -1 ? "suggestion-".concat(visualFocusedSuggIndex) : undefined,
|
|
719
551
|
"aria-invalid": error ? "true" : "false",
|
|
720
552
|
"aria-describedby": error ? errorId : undefined,
|
|
721
553
|
"aria-required": optional ? "false" : "true"
|
|
722
|
-
}), !disabled && error && _react["default"].createElement(ErrorIcon, {
|
|
554
|
+
}), !disabled && error && /*#__PURE__*/_react["default"].createElement(ErrorIcon, {
|
|
723
555
|
backgroundType: backgroundType,
|
|
724
556
|
"aria-label": "Error"
|
|
725
|
-
},
|
|
726
|
-
onClick:
|
|
557
|
+
}, textInputIcons.error), !disabled && clearable && (value !== null && value !== void 0 ? value : innerValue).length > 0 && /*#__PURE__*/_react["default"].createElement(Action, {
|
|
558
|
+
onClick: handleClearActionOnClick,
|
|
559
|
+
onMouseDown: function onMouseDown(event) {
|
|
560
|
+
event.stopPropagation();
|
|
561
|
+
},
|
|
727
562
|
backgroundType: backgroundType,
|
|
728
563
|
tabIndex: tabIndex,
|
|
729
564
|
"aria-label": "Clear"
|
|
730
|
-
},
|
|
565
|
+
}, textInputIcons.clear), (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.typeNumber) === "number" ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(Action, {
|
|
731
566
|
ref: actionRef,
|
|
732
567
|
disabled: disabled,
|
|
733
|
-
onClick:
|
|
568
|
+
onClick: handleDecrementActionOnClick,
|
|
569
|
+
onMouseDown: function onMouseDown(event) {
|
|
570
|
+
event.stopPropagation();
|
|
571
|
+
},
|
|
734
572
|
backgroundType: backgroundType,
|
|
735
573
|
tabIndex: tabIndex,
|
|
736
574
|
"aria-label": "Decrement"
|
|
737
|
-
},
|
|
575
|
+
}, textInputIcons.decrement), /*#__PURE__*/_react["default"].createElement(Action, {
|
|
738
576
|
ref: actionRef,
|
|
739
577
|
disabled: disabled,
|
|
740
|
-
onClick:
|
|
578
|
+
onClick: handleIncrementActionOnClick,
|
|
579
|
+
onMouseDown: function onMouseDown(event) {
|
|
580
|
+
event.stopPropagation();
|
|
581
|
+
},
|
|
741
582
|
backgroundType: backgroundType,
|
|
742
583
|
tabIndex: tabIndex,
|
|
743
584
|
"aria-label": "Increment"
|
|
744
|
-
},
|
|
585
|
+
}, textInputIcons.increment)) : action && /*#__PURE__*/_react["default"].createElement(Action, {
|
|
745
586
|
ref: actionRef,
|
|
746
587
|
disabled: disabled,
|
|
747
588
|
onClick: action.onClick,
|
|
589
|
+
onMouseDown: function onMouseDown(event) {
|
|
590
|
+
event.stopPropagation();
|
|
591
|
+
},
|
|
592
|
+
title: (_action$title = action.title) !== null && _action$title !== void 0 ? _action$title : action.title,
|
|
748
593
|
backgroundType: backgroundType,
|
|
749
594
|
tabIndex: tabIndex
|
|
750
|
-
}, typeof action.icon === "string" ? _react["default"].createElement(ActionIcon, {
|
|
595
|
+
}, typeof action.icon === "string" ? /*#__PURE__*/_react["default"].createElement(ActionIcon, {
|
|
751
596
|
src: action.icon
|
|
752
|
-
}) : action.icon), suffix && _react["default"].createElement(Suffix, {
|
|
597
|
+
}) : action.icon), suffix && /*#__PURE__*/_react["default"].createElement(Suffix, {
|
|
753
598
|
disabled: disabled,
|
|
754
599
|
backgroundType: backgroundType
|
|
755
|
-
}, suffix), isOpen && _react["default"].createElement(Suggestions, {
|
|
600
|
+
}, suffix), isOpen && (filteredSuggestions.length > 0 || isSearching || isAutosuggestError) && /*#__PURE__*/_react["default"].createElement(Suggestions, {
|
|
756
601
|
id: autosuggestId,
|
|
757
602
|
isError: isAutosuggestError,
|
|
758
603
|
onMouseDown: function onMouseDown(event) {
|
|
759
604
|
event.preventDefault();
|
|
760
605
|
},
|
|
761
|
-
onMouseLeave: function onMouseLeave() {
|
|
762
|
-
changeVisualFocusedSuggIndex(-1);
|
|
763
|
-
},
|
|
764
606
|
ref: suggestionsRef,
|
|
765
607
|
role: "listbox",
|
|
766
608
|
"aria-label": label
|
|
767
|
-
}, !isSearching && !isAutosuggestError && filteredSuggestions.length
|
|
768
|
-
return _react["default"].createElement(HighlightedSuggestion, {
|
|
609
|
+
}, !isSearching && !isAutosuggestError && filteredSuggestions.length > 0 && filteredSuggestions.map(function (suggestion, index) {
|
|
610
|
+
return /*#__PURE__*/_react["default"].createElement(HighlightedSuggestion, {
|
|
769
611
|
key: "suggestion-".concat((0, _uuid.v4)()),
|
|
770
612
|
suggestion: suggestion,
|
|
771
613
|
index: index
|
|
772
614
|
});
|
|
773
|
-
}), isSearching && _react["default"].createElement(SuggestionsSystemMessage, null, "Searching..."), isAutosuggestError && _react["default"].createElement(SuggestionsError, null, _react["default"].createElement(SuggestionsErrorIcon, {
|
|
615
|
+
}), isSearching && /*#__PURE__*/_react["default"].createElement(SuggestionsSystemMessage, null, "Searching..."), isAutosuggestError && /*#__PURE__*/_react["default"].createElement(SuggestionsError, null, /*#__PURE__*/_react["default"].createElement(SuggestionsErrorIcon, {
|
|
774
616
|
backgroundType: backgroundType
|
|
775
|
-
},
|
|
617
|
+
}, textInputIcons.error), "Error fetching data"))), !disabled && /*#__PURE__*/_react["default"].createElement(Error, {
|
|
776
618
|
id: errorId,
|
|
777
619
|
backgroundType: backgroundType
|
|
778
620
|
}, error)));
|
|
@@ -789,7 +631,7 @@ var calculateWidth = function calculateWidth(margin, size) {
|
|
|
789
631
|
return size === "fillParent" ? "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")") : sizes[size];
|
|
790
632
|
};
|
|
791
633
|
|
|
792
|
-
var DxcInput = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
634
|
+
var DxcInput = _styledComponents["default"].div(_templateObject || (_templateObject = (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"])), function (props) {
|
|
793
635
|
return calculateWidth(props.margin, props.size);
|
|
794
636
|
}, function (props) {
|
|
795
637
|
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
@@ -803,7 +645,7 @@ var DxcInput = _styledComponents["default"].div(_templateObject(), function (pro
|
|
|
803
645
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
804
646
|
});
|
|
805
647
|
|
|
806
|
-
var Label = _styledComponents["default"].label(_templateObject2(), function (props) {
|
|
648
|
+
var Label = _styledComponents["default"].label(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n"])), function (props) {
|
|
807
649
|
return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledLabelFontColorOnDark : props.theme.disabledLabelFontColor : props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
808
650
|
}, function (props) {
|
|
809
651
|
return props.theme.fontFamily;
|
|
@@ -813,13 +655,15 @@ var Label = _styledComponents["default"].label(_templateObject2(), function (pro
|
|
|
813
655
|
return props.theme.labelFontStyle;
|
|
814
656
|
}, function (props) {
|
|
815
657
|
return props.theme.labelFontWeight;
|
|
658
|
+
}, function (props) {
|
|
659
|
+
return props.theme.labelLineHeight;
|
|
816
660
|
});
|
|
817
661
|
|
|
818
|
-
var OptionalLabel = _styledComponents["default"].span(_templateObject3(), function (props) {
|
|
662
|
+
var OptionalLabel = _styledComponents["default"].span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n font-weight: ", ";\n"])), function (props) {
|
|
819
663
|
return props.theme.optionalLabelFontWeight;
|
|
820
664
|
});
|
|
821
665
|
|
|
822
|
-
var HelperText = _styledComponents["default"].span(_templateObject4(), function (props) {
|
|
666
|
+
var HelperText = _styledComponents["default"].span(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n"])), function (props) {
|
|
823
667
|
return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledHelperTextFontColorOnDark : props.theme.disabledHelperTextFontColor : props.backgroundType === "dark" ? props.theme.helperTextFontColorOnDark : props.theme.helperTextFontColor;
|
|
824
668
|
}, function (props) {
|
|
825
669
|
return props.theme.fontFamily;
|
|
@@ -829,9 +673,13 @@ var HelperText = _styledComponents["default"].span(_templateObject4(), function
|
|
|
829
673
|
return props.theme.helperTextFontStyle;
|
|
830
674
|
}, function (props) {
|
|
831
675
|
return props.theme.helperTextFontWeight;
|
|
676
|
+
}, function (props) {
|
|
677
|
+
return props.theme.helperTextLineHeight;
|
|
832
678
|
});
|
|
833
679
|
|
|
834
|
-
var InputContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
|
|
680
|
+
var InputContainer = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (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"])), function (props) {
|
|
681
|
+
return "".concat(props.theme.inputMarginTop, " 0 ").concat(props.theme.inputMarginBottom, " 0");
|
|
682
|
+
}, function (props) {
|
|
835
683
|
if (props.disabled) return props.backgroundType === "dark" ? "background-color: ".concat(props.theme.disabledContainerFillColorOnDark, ";") : "background-color: ".concat(props.theme.disabledContainerFillColor, ";");
|
|
836
684
|
}, function (props) {
|
|
837
685
|
if (props.disabled) return props.backgroundType === "dark" ? props.theme.disabledBorderColorOnDark : props.theme.disabledBorderColor;else return props.backgroundType === "dark" ? props.theme.enabledBorderColorOnDark : props.theme.enabledBorderColor;
|
|
@@ -843,7 +691,7 @@ var InputContainer = _styledComponents["default"].div(_templateObject5(), functi
|
|
|
843
691
|
return !props.disabled && "\n &:hover {\n border-color: ".concat(props.error ? "transparent" : props.backgroundType === "dark" ? props.theme.hoverBorderColorOnDark : props.theme.hoverBorderColor, ";\n ").concat(props.error && "box-shadow: 0 0 0 2px ".concat(props.backgroundType === "dark" ? props.theme.hoverErrorBorderColorOnDark : props.theme.hoverErrorBorderColor, ";"), "\n }\n &:focus-within {\n border-color: transparent;\n box-shadow: 0 0 0 2px ").concat(props.backgroundType === "dark" ? props.theme.focusBorderColorOnDark : props.theme.focusBorderColor, ";\n }\n ");
|
|
844
692
|
});
|
|
845
693
|
|
|
846
|
-
var Input = _styledComponents["default"].input(_templateObject6(), function (props) {
|
|
694
|
+
var Input = _styledComponents["default"].input(_templateObject6 || (_templateObject6 = (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"])), function (props) {
|
|
847
695
|
return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledValueFontColorOnDark : props.theme.disabledValueFontColor : props.backgroundType === "dark" ? props.theme.valueFontColorOnDark : props.theme.valueFontColor;
|
|
848
696
|
}, function (props) {
|
|
849
697
|
return props.theme.fontFamily;
|
|
@@ -859,9 +707,9 @@ var Input = _styledComponents["default"].input(_templateObject6(), function (pro
|
|
|
859
707
|
return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledPlaceholderFontColorOnDark : props.theme.disabledPlaceholderFontColor : props.backgroundType === "dark" ? props.theme.placeholderFontColorOnDark : props.theme.placeholderFontColor;
|
|
860
708
|
});
|
|
861
709
|
|
|
862
|
-
var ActionIcon = _styledComponents["default"].img(_templateObject7());
|
|
710
|
+
var ActionIcon = _styledComponents["default"].img(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n width: 16px;\n height: 16px;\n"])));
|
|
863
711
|
|
|
864
|
-
var Action = _styledComponents["default"].button(_templateObject8(), function (props) {
|
|
712
|
+
var Action = _styledComponents["default"].button(_templateObject8 || (_templateObject8 = (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"])), function (props) {
|
|
865
713
|
return props.theme.fontFamily;
|
|
866
714
|
}, function (props) {
|
|
867
715
|
return props.disabled ? "cursor: not-allowed;" : "cursor: pointer;";
|
|
@@ -870,37 +718,37 @@ var Action = _styledComponents["default"].button(_templateObject8(), function (p
|
|
|
870
718
|
}, function (props) {
|
|
871
719
|
return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledActionIconColorOnDark : props.theme.disabledActionIconColor : props.backgroundType === "dark" ? props.theme.actionIconColorOnDark : props.theme.actionIconColor;
|
|
872
720
|
}, function (props) {
|
|
873
|
-
return !props.disabled && "\n &:
|
|
721
|
+
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 ");
|
|
874
722
|
});
|
|
875
723
|
|
|
876
|
-
var Prefix = _styledComponents["default"].span(_templateObject9(), function (props) {
|
|
724
|
+
var Prefix = _styledComponents["default"].span(_templateObject9 || (_templateObject9 = (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"])), function (props) {
|
|
877
725
|
var color = props.disabled ? props.backgroundType === "dark" ? props.theme.disabledPrefixColorOnDark : props.theme.disabledPrefixColor : props.backgroundType === "dark" ? props.theme.prefixColorOnDark : props.theme.prefixColor;
|
|
878
726
|
return "color: ".concat(color, "; border-right: 1px solid ").concat(color, ";");
|
|
879
727
|
}, function (props) {
|
|
880
728
|
return props.theme.fontFamily;
|
|
881
729
|
});
|
|
882
730
|
|
|
883
|
-
var Suffix = _styledComponents["default"].span(_templateObject10(), function (props) {
|
|
731
|
+
var Suffix = _styledComponents["default"].span(_templateObject10 || (_templateObject10 = (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"])), function (props) {
|
|
884
732
|
var color = props.disabled ? props.backgroundType === "dark" ? props.theme.disabledSuffixColorOnDark : props.theme.disabledSuffixColor : props.backgroundType === "dark" ? props.theme.suffixColorOnDark : props.theme.suffixColor;
|
|
885
733
|
return "color: ".concat(color, "; border-left: 1px solid ").concat(color, ";");
|
|
886
734
|
}, function (props) {
|
|
887
735
|
return props.theme.fontFamily;
|
|
888
736
|
});
|
|
889
737
|
|
|
890
|
-
var ErrorIcon = _styledComponents["default"].span(_templateObject11(), function (props) {
|
|
738
|
+
var ErrorIcon = _styledComponents["default"].span(_templateObject11 || (_templateObject11 = (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"])), function (props) {
|
|
891
739
|
return props.backgroundType === "dark" ? props.theme.errorIconColorOnDark : props.theme.errorIconColor;
|
|
892
740
|
});
|
|
893
741
|
|
|
894
|
-
var Error = _styledComponents["default"].span(_templateObject12(), function (props) {
|
|
742
|
+
var Error = _styledComponents["default"].span(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])(["\n min-height: 1.5em;\n color: ", ";\n font-family: ", ";\n font-size: 0.75rem;\n font-weight: 400;\n line-height: 1.5em;\n"])), function (props) {
|
|
895
743
|
return props.backgroundType === "dark" ? props.theme.errorMessageColorOnDark : props.theme.errorMessageColor;
|
|
896
744
|
}, function (props) {
|
|
897
745
|
return props.theme.fontFamily;
|
|
898
746
|
});
|
|
899
747
|
|
|
900
|
-
var Suggestions = _styledComponents["default"].ul(_templateObject13(), function (props) {
|
|
901
|
-
return props.isError ? props.theme.
|
|
748
|
+
var Suggestions = _styledComponents["default"].ul(_templateObject13 || (_templateObject13 = (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"])), function (props) {
|
|
749
|
+
return props.isError ? props.theme.errorListDialogBackgroundColor : props.theme.listDialogBackgroundColor;
|
|
902
750
|
}, function (props) {
|
|
903
|
-
return props.isError ? props.theme.
|
|
751
|
+
return props.isError ? props.theme.errorListDialogBorderColor : props.theme.listDialogBorderColor;
|
|
904
752
|
}, function (props) {
|
|
905
753
|
return props.theme.listOptionFontColor;
|
|
906
754
|
}, function (props) {
|
|
@@ -913,21 +761,31 @@ var Suggestions = _styledComponents["default"].ul(_templateObject13(), function
|
|
|
913
761
|
return props.theme.listOptionFontWeight;
|
|
914
762
|
});
|
|
915
763
|
|
|
916
|
-
var Suggestion = _styledComponents["default"].li(_templateObject14(), function (props) {
|
|
917
|
-
return props.
|
|
764
|
+
var Suggestion = _styledComponents["default"].li(_templateObject14 || (_templateObject14 = (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"])), function (props) {
|
|
765
|
+
return props.visualFocused ? props.theme.focusListOptionBorderColor : "transparent";
|
|
766
|
+
}, function (props) {
|
|
767
|
+
return props.theme.hoverListOptionBackgroundColor;
|
|
768
|
+
}, function (props) {
|
|
769
|
+
return props.theme.activeListOptionBackgroundColor;
|
|
770
|
+
});
|
|
771
|
+
|
|
772
|
+
var StyledSuggestion = _styledComponents["default"].span(_templateObject15 || (_templateObject15 = (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"])), function (props) {
|
|
773
|
+
return props.last || props.visualFocused ? "border-bottom: 1px solid transparent" : "border-bottom: 1px solid ".concat(props.theme.listOptionDividerColor);
|
|
918
774
|
});
|
|
919
775
|
|
|
920
|
-
var SuggestionsSystemMessage = _styledComponents["default"].span(
|
|
776
|
+
var SuggestionsSystemMessage = _styledComponents["default"].span(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n padding: 0.25rem 1rem;\n color: ", ";\n line-height: 1.715em;\n"])), function (props) {
|
|
921
777
|
return props.theme.systemMessageFontColor;
|
|
922
778
|
});
|
|
923
779
|
|
|
924
|
-
var SuggestionsErrorIcon = _styledComponents["default"].span(
|
|
780
|
+
var SuggestionsErrorIcon = _styledComponents["default"].span(_templateObject17 || (_templateObject17 = (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"])), function (props) {
|
|
925
781
|
return props.backgroundType === "dark" ? props.theme.errorIconColorOnDark : props.theme.errorIconColor;
|
|
926
782
|
});
|
|
927
783
|
|
|
928
|
-
var SuggestionsError = _styledComponents["default"].span(
|
|
784
|
+
var SuggestionsError = _styledComponents["default"].span(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n padding: 0.25rem 1rem;\n align-items: center;\n line-height: 1.715em;\n color: ", ";\n"])), function (props) {
|
|
785
|
+
return props.theme.errorListDialogFontColor;
|
|
786
|
+
});
|
|
929
787
|
|
|
930
|
-
|
|
788
|
+
DxcTextInput.propTypes = {
|
|
931
789
|
label: _propTypes["default"].string,
|
|
932
790
|
name: _propTypes["default"].string,
|
|
933
791
|
value: _propTypes["default"].string,
|
|
@@ -963,5 +821,5 @@ DxcNewInputText.propTypes = {
|
|
|
963
821
|
}),
|
|
964
822
|
tabIndex: _propTypes["default"].number
|
|
965
823
|
};
|
|
966
|
-
var _default =
|
|
824
|
+
var _default = DxcTextInput;
|
|
967
825
|
exports["default"] = _default;
|