@dxc-technology/halstack-react 0.0.0-4d89cae → 0.0.0-500190a
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 +8 -4
- package/ThemeContext.js +84 -88
- package/V3Select/V3Select.js +33 -127
- package/V3Textarea/V3Textarea.js +10 -14
- package/accordion/Accordion.d.ts +4 -0
- package/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 +65 -81
- package/accordion-group/types.d.ts +72 -0
- package/accordion-group/types.js +5 -0
- package/alert/Alert.d.ts +4 -0
- package/alert/Alert.js +38 -151
- package/alert/Alert.stories.tsx +170 -0
- package/alert/types.d.ts +49 -0
- package/alert/types.js +5 -0
- package/badge/Badge.js +9 -13
- package/box/Box.d.ts +4 -0
- package/box/Box.js +13 -43
- package/box/Box.stories.tsx +132 -0
- package/box/types.d.ts +43 -0
- package/box/types.js +5 -0
- package/button/Button.d.ts +4 -0
- package/button/Button.js +22 -81
- package/button/Button.stories.tsx +276 -0
- package/button/types.d.ts +57 -0
- package/button/types.js +5 -0
- package/card/Card.d.ts +4 -0
- package/card/Card.js +33 -123
- package/card/Card.stories.tsx +201 -0
- package/card/ice-cream.jpg +0 -0
- package/card/types.d.ts +67 -0
- package/card/types.js +5 -0
- package/checkbox/Checkbox.d.ts +4 -0
- package/checkbox/Checkbox.js +13 -59
- package/checkbox/Checkbox.stories.tsx +192 -0
- package/checkbox/types.d.ts +60 -0
- package/checkbox/types.js +5 -0
- package/chip/Chip.js +17 -61
- package/chip/Chip.stories.tsx +121 -0
- package/common/RequiredComponent.js +3 -11
- package/common/variables.js +36 -25
- package/date/Date.js +16 -22
- package/date-input/DateInput.d.ts +4 -0
- package/date-input/DateInput.js +22 -61
- 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/dialog/Dialog.js +20 -73
- package/dialog/Dialog.stories.tsx +212 -0
- package/dialog/types.d.ts +43 -0
- package/dialog/types.js +5 -0
- package/dropdown/Dropdown.d.ts +4 -0
- package/dropdown/Dropdown.js +44 -171
- package/dropdown/types.d.ts +89 -0
- package/dropdown/types.js +5 -0
- package/file-input/FileInput.d.ts +4 -0
- package/file-input/FileInput.js +68 -201
- package/file-input/FileItem.d.ts +14 -0
- package/file-input/FileItem.js +37 -140
- package/file-input/types.d.ts +87 -0
- package/file-input/types.js +5 -0
- package/footer/Footer.d.ts +4 -0
- package/footer/Footer.js +38 -193
- package/footer/Footer.stories.jsx +151 -0
- package/footer/Icons.js +13 -13
- package/footer/types.d.ts +61 -0
- package/footer/types.js +5 -0
- package/header/Header.d.ts +7 -0
- package/header/Header.js +60 -206
- package/header/Header.stories.tsx +162 -0
- package/header/Icons.js +7 -32
- package/header/types.d.ts +47 -0
- package/header/types.js +5 -0
- package/heading/Heading.d.ts +4 -0
- package/heading/Heading.js +24 -95
- package/heading/Heading.stories.tsx +53 -0
- package/heading/types.d.ts +33 -0
- package/heading/types.js +5 -0
- package/input-text/Icons.js +2 -2
- package/input-text/InputText.js +33 -127
- package/layout/ApplicationLayout.js +31 -123
- package/layout/Icons.js +7 -7
- package/link/Link.d.ts +3 -0
- package/link/Link.js +18 -94
- package/link/Link.stories.tsx +146 -0
- package/link/types.d.ts +74 -0
- package/link/types.js +5 -0
- package/main.d.ts +44 -40
- package/main.js +91 -87
- package/number-input/NumberInput.d.ts +4 -0
- package/number-input/NumberInput.js +7 -57
- package/number-input/NumberInput.stories.tsx +115 -0
- package/number-input/NumberInputContext.d.ts +4 -0
- package/number-input/NumberInputContext.js +5 -2
- package/number-input/numberInputContextTypes.d.ts +19 -0
- package/number-input/numberInputContextTypes.js +5 -0
- package/number-input/types.d.ts +117 -0
- package/number-input/types.js +5 -0
- package/package.json +15 -12
- package/paginator/Icons.js +9 -9
- package/paginator/Paginator.d.ts +4 -0
- package/paginator/Paginator.js +24 -131
- 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/password-input/PasswordInput.js +22 -61
- package/password-input/PasswordInput.stories.tsx +131 -0
- package/password-input/types.d.ts +107 -0
- package/password-input/types.js +5 -0
- package/progress-bar/ProgressBar.d.ts +4 -0
- package/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/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/resultsetTable/ResultsetTable.d.ts +4 -0
- package/resultsetTable/ResultsetTable.js +38 -145
- package/resultsetTable/types.d.ts +67 -0
- package/resultsetTable/types.js +5 -0
- package/select/Select.js +161 -434
- package/select/Select.stories.tsx +572 -0
- package/select/index.d.ts +4 -4
- package/sidenav/Sidenav.d.ts +9 -0
- package/sidenav/Sidenav.js +19 -62
- package/sidenav/Sidenav.stories.tsx +165 -0
- package/sidenav/types.d.ts +50 -0
- package/sidenav/types.js +5 -0
- package/slider/Slider.d.ts +4 -0
- package/slider/Slider.js +72 -159
- package/slider/Slider.stories.tsx +177 -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 +43 -174
- 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/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/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 +31 -161
- package/tabs/Tabs.stories.tsx +121 -0
- package/tabs/types.d.ts +70 -0
- package/tabs/types.js +5 -0
- package/tag/Tag.d.ts +4 -0
- package/tag/Tag.js +37 -126
- package/tag/Tag.stories.tsx +145 -0
- package/tag/types.d.ts +60 -0
- package/tag/types.js +5 -0
- package/text-input/TextInput.d.ts +4 -0
- package/text-input/TextInput.js +118 -324
- package/text-input/types.d.ts +159 -0
- package/text-input/types.js +5 -0
- package/textarea/Textarea.js +33 -86
- package/textarea/Textarea.stories.jsx +135 -0
- package/textarea/index.d.ts +18 -8
- package/toggle/Toggle.js +15 -49
- package/toggle-group/ToggleGroup.d.ts +4 -0
- package/toggle-group/ToggleGroup.js +28 -138
- package/toggle-group/ToggleGroup.stories.tsx +178 -0
- package/toggle-group/types.d.ts +84 -0
- package/toggle-group/types.js +5 -0
- package/upload/Upload.js +11 -15
- package/upload/buttons-upload/ButtonsUpload.js +13 -37
- package/upload/buttons-upload/Icons.js +7 -7
- package/upload/dragAndDropArea/DragAndDropArea.js +24 -128
- package/upload/dragAndDropArea/Icons.js +6 -6
- package/upload/file-upload/FileToUpload.js +16 -90
- package/upload/file-upload/Icons.js +13 -13
- package/upload/files-upload/FilesToUpload.js +12 -26
- package/upload/transaction/Icons.js +31 -31
- package/upload/transaction/Transaction.js +17 -61
- package/upload/transactions/Transactions.js +13 -57
- package/wizard/Icons.js +8 -8
- package/wizard/Wizard.d.ts +4 -0
- package/wizard/Wizard.js +32 -206
- package/wizard/Wizard.stories.jsx +224 -0
- package/wizard/types.d.ts +64 -0
- package/wizard/types.js +5 -0
- package/accordion/index.d.ts +0 -28
- package/accordion-group/index.d.ts +0 -16
- package/alert/index.d.ts +0 -51
- package/box/index.d.ts +0 -25
- package/button/Button.stories.js +0 -27
- package/button/index.d.ts +0 -24
- package/card/index.d.ts +0 -22
- package/checkbox/index.d.ts +0 -24
- package/date-input/index.d.ts +0 -95
- package/dialog/index.d.ts +0 -18
- package/dropdown/index.d.ts +0 -26
- package/file-input/index.d.ts +0 -81
- package/footer/index.d.ts +0 -25
- package/header/index.d.ts +0 -25
- package/heading/index.d.ts +0 -17
- package/link/index.d.ts +0 -23
- package/number-input/index.d.ts +0 -113
- package/paginator/index.d.ts +0 -20
- package/password-input/index.d.ts +0 -94
- package/progress-bar/index.d.ts +0 -18
- package/radio/index.d.ts +0 -23
- package/resultsetTable/index.d.ts +0 -19
- package/sidenav/index.d.ts +0 -13
- package/slider/index.d.ts +0 -29
- package/spinner/index.d.ts +0 -17
- package/switch/index.d.ts +0 -24
- package/table/index.d.ts +0 -13
- package/tabs/index.d.ts +0 -19
- package/tag/index.d.ts +0 -24
- package/text-input/index.d.ts +0 -135
- package/toggle-group/index.d.ts +0 -21
- package/wizard/index.d.ts +0 -18
package/text-input/TextInput.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
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
|
});
|
|
10
10
|
exports["default"] = void 0;
|
|
11
11
|
|
|
12
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
-
|
|
14
12
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
15
13
|
|
|
16
14
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
@@ -23,8 +21,6 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
23
21
|
|
|
24
22
|
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
25
23
|
|
|
26
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
27
|
-
|
|
28
24
|
var _variables = require("../common/variables.js");
|
|
29
25
|
|
|
30
26
|
var _utils = require("../common/utils.js");
|
|
@@ -33,232 +29,58 @@ var _uuid = require("uuid");
|
|
|
33
29
|
|
|
34
30
|
var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext.js"));
|
|
35
31
|
|
|
36
|
-
var _NumberInputContext = _interopRequireDefault(require("../number-input/NumberInputContext
|
|
37
|
-
|
|
38
|
-
function _templateObject18() {
|
|
39
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n padding: 0.25rem 1rem;\n align-items: center;\n line-height: 1.715em;\n color: ", ";\n"]);
|
|
40
|
-
|
|
41
|
-
_templateObject18 = function _templateObject18() {
|
|
42
|
-
return data;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
return data;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function _templateObject17() {
|
|
49
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n margin-right: 0.5rem;\n height: 18px;\n width: 18px;\n color: ", ";\n"]);
|
|
50
|
-
|
|
51
|
-
_templateObject17 = function _templateObject17() {
|
|
52
|
-
return data;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
return data;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function _templateObject16() {
|
|
59
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n padding: 0.25rem 1rem;\n color: ", ";\n line-height: 1.715em;\n"]);
|
|
60
|
-
|
|
61
|
-
_templateObject16 = function _templateObject16() {
|
|
62
|
-
return data;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
return data;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function _templateObject15() {
|
|
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"]);
|
|
70
|
-
|
|
71
|
-
_templateObject15 = function _templateObject15() {
|
|
72
|
-
return data;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
return data;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function _templateObject14() {
|
|
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"]);
|
|
80
|
-
|
|
81
|
-
_templateObject14 = function _templateObject14() {
|
|
82
|
-
return data;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
return data;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function _templateObject13() {
|
|
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"]);
|
|
90
|
-
|
|
91
|
-
_templateObject13 = function _templateObject13() {
|
|
92
|
-
return data;
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
return data;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function _templateObject12() {
|
|
99
|
-
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"]);
|
|
100
|
-
|
|
101
|
-
_templateObject12 = function _templateObject12() {
|
|
102
|
-
return data;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
return data;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function _templateObject11() {
|
|
109
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n padding: 3px;\n height: 18px;\n width: 18px;\n margin-left: 0.25rem;\n color: ", ";\n\n svg {\n line-height: 18px;\n font-size: 1.25rem;\n }\n"]);
|
|
110
|
-
|
|
111
|
-
_templateObject11 = function _templateObject11() {
|
|
112
|
-
return data;
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
return data;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function _templateObject10() {
|
|
119
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n height: 1.5rem;\n line-height: 1.5rem;\n margin: 0 0.25rem;\n padding: 0 0 0 0.5rem;\n ", ";\n font-family: ", ";\n font-size: 1rem;\n pointer-events: none;\n"]);
|
|
120
|
-
|
|
121
|
-
_templateObject10 = function _templateObject10() {
|
|
122
|
-
return data;
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
return data;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function _templateObject9() {
|
|
129
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n height: 1.5rem;\n line-height: 1.5rem;\n margin-left: 0.25rem;\n padding: 0 0.5rem 0 0;\n ", ";\n font-family: ", ";\n font-size: 1rem;\n pointer-events: none;\n"]);
|
|
130
|
-
|
|
131
|
-
_templateObject9 = function _templateObject9() {
|
|
132
|
-
return data;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
return data;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
function _templateObject8() {
|
|
139
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 24px;\n width: 24px;\n font-size: 1rem;\n font-family: ", ";\n border: 1px solid transparent;\n border-radius: 2px;\n padding: 3px;\n margin-left: 0.25rem;\n ", "\n\n box-shadow: 0 0 0 2px transparent;\n background-color: ", ";\n\n color: ", ";\n\n ", "\n\n svg {\n line-height: 18px;\n }\n"]);
|
|
140
|
-
|
|
141
|
-
_templateObject8 = function _templateObject8() {
|
|
142
|
-
return data;
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
return data;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function _templateObject7() {
|
|
149
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: 16px;\n height: 16px;\n"]);
|
|
150
|
-
|
|
151
|
-
_templateObject7 = function _templateObject7() {
|
|
152
|
-
return data;
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
return data;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function _templateObject6() {
|
|
159
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n height: calc(2.5rem - 2px);\n width: 100%;\n background: none;\n border: none;\n outline: none;\n padding: 0 0.5rem;\n\n color: ", ";\n\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: 1.5em;\n ", "\n\n ::placeholder {\n color: ", ";\n }\n"]);
|
|
160
|
-
|
|
161
|
-
_templateObject6 = function _templateObject6() {
|
|
162
|
-
return data;
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
return data;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
function _templateObject5() {
|
|
169
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n position: relative;\n align-items: center;\n height: calc(2.5rem - 2px);\n margin: ", ";\n padding: 0 0.5rem;\n\n ", "\n box-shadow: 0 0 0 2px transparent;\n border-radius: 4px;\n border: 1px solid\n ", ";\n ", "\n ", ";\n\n ", ";\n"]);
|
|
170
|
-
|
|
171
|
-
_templateObject5 = function _templateObject5() {
|
|
172
|
-
return data;
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
return data;
|
|
176
|
-
}
|
|
32
|
+
var _NumberInputContext = _interopRequireDefault(require("../number-input/NumberInputContext"));
|
|
177
33
|
|
|
178
|
-
|
|
179
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n"]);
|
|
34
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
|
|
180
35
|
|
|
181
|
-
|
|
182
|
-
return data;
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
return data;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
function _templateObject3() {
|
|
189
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-weight: ", ";\n"]);
|
|
190
|
-
|
|
191
|
-
_templateObject3 = function _templateObject3() {
|
|
192
|
-
return data;
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
return data;
|
|
196
|
-
}
|
|
36
|
+
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); }
|
|
197
37
|
|
|
198
|
-
function
|
|
199
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n"]);
|
|
200
|
-
|
|
201
|
-
_templateObject2 = function _templateObject2() {
|
|
202
|
-
return data;
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
return data;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
function _templateObject() {
|
|
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"]);
|
|
210
|
-
|
|
211
|
-
_templateObject = function _templateObject() {
|
|
212
|
-
return data;
|
|
213
|
-
};
|
|
214
|
-
|
|
215
|
-
return data;
|
|
216
|
-
}
|
|
38
|
+
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; }
|
|
217
39
|
|
|
218
40
|
var textInputIcons = {
|
|
219
|
-
error: _react["default"].createElement("svg", {
|
|
41
|
+
error: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
220
42
|
xmlns: "http://www.w3.org/2000/svg",
|
|
221
43
|
height: "24px",
|
|
222
44
|
viewBox: "0 0 24 24",
|
|
223
45
|
width: "24px",
|
|
224
46
|
fill: "currentColor"
|
|
225
|
-
}, _react["default"].createElement("path", {
|
|
47
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
226
48
|
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
49
|
})),
|
|
228
|
-
clear: _react["default"].createElement("svg", {
|
|
50
|
+
clear: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
229
51
|
xmlns: "http://www.w3.org/2000/svg",
|
|
230
52
|
width: "24",
|
|
231
53
|
height: "24",
|
|
232
54
|
viewBox: "0 0 24 24",
|
|
233
55
|
fill: "currentColor"
|
|
234
|
-
}, _react["default"].createElement("path", {
|
|
56
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
235
57
|
d: "M0 0h24v24H0V0z",
|
|
236
58
|
fill: "none"
|
|
237
|
-
}), _react["default"].createElement("path", {
|
|
59
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
238
60
|
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
61
|
})),
|
|
240
|
-
increment: _react["default"].createElement("svg", {
|
|
62
|
+
increment: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
241
63
|
xmlns: "http://www.w3.org/2000/svg",
|
|
242
64
|
height: "24px",
|
|
243
65
|
viewBox: "0 0 24 24",
|
|
244
66
|
width: "24px",
|
|
245
67
|
fill: "currentColor"
|
|
246
|
-
}, _react["default"].createElement("path", {
|
|
68
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
247
69
|
d: "M0 0h24v24H0z",
|
|
248
70
|
fill: "none"
|
|
249
|
-
}), _react["default"].createElement("path", {
|
|
71
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
250
72
|
d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
|
|
251
73
|
})),
|
|
252
|
-
decrement: _react["default"].createElement("svg", {
|
|
74
|
+
decrement: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
253
75
|
xmlns: "http://www.w3.org/2000/svg",
|
|
254
76
|
height: "24px",
|
|
255
77
|
viewBox: "0 0 24 24",
|
|
256
78
|
width: "24px",
|
|
257
79
|
fill: "currentColor"
|
|
258
|
-
}, _react["default"].createElement("path", {
|
|
80
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
259
81
|
d: "M0 0h24v24H0z",
|
|
260
82
|
fill: "none"
|
|
261
|
-
}), _react["default"].createElement("path", {
|
|
83
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
262
84
|
d: "M19 13H5v-2h14v2z"
|
|
263
85
|
}))
|
|
264
86
|
};
|
|
@@ -288,10 +110,6 @@ var getNotOptionalErrorMessage = function getNotOptionalErrorMessage() {
|
|
|
288
110
|
return "This field is required. Please, enter a value.";
|
|
289
111
|
};
|
|
290
112
|
|
|
291
|
-
var getLengthErrorMessage = function getLengthErrorMessage(length) {
|
|
292
|
-
return "Min length ".concat(length.min, ", max length ").concat(length.max, ".");
|
|
293
|
-
};
|
|
294
|
-
|
|
295
113
|
var getPatternErrorMessage = function getPatternErrorMessage() {
|
|
296
114
|
return "Please match the format requested.";
|
|
297
115
|
};
|
|
@@ -300,7 +118,20 @@ var patternMatch = function patternMatch(pattern, value) {
|
|
|
300
118
|
return new RegExp(pattern).test(value);
|
|
301
119
|
};
|
|
302
120
|
|
|
303
|
-
var
|
|
121
|
+
var getLastOptionIndex = function getLastOptionIndex(filteredSuggestions) {
|
|
122
|
+
var last = 0;
|
|
123
|
+
|
|
124
|
+
var reducer = function reducer(acc, current) {
|
|
125
|
+
var _current$options;
|
|
126
|
+
|
|
127
|
+
return acc + ((_current$options = current.options) === null || _current$options === void 0 ? void 0 : _current$options.length);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
if (filteredSuggestions.length > 0) filteredSuggestions[0].options ? last = filteredSuggestions.reduce(reducer, 0) - 1 : last = filteredSuggestions.length - 1;
|
|
131
|
+
return last;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
var DxcTextInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
|
|
304
135
|
var _action$title;
|
|
305
136
|
|
|
306
137
|
var _ref$label = _ref.label,
|
|
@@ -329,7 +160,8 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
329
160
|
error = _ref$error === void 0 ? "" : _ref$error,
|
|
330
161
|
suggestions = _ref.suggestions,
|
|
331
162
|
pattern = _ref.pattern,
|
|
332
|
-
|
|
163
|
+
minLength = _ref.minLength,
|
|
164
|
+
maxLength = _ref.maxLength,
|
|
333
165
|
_ref$autocomplete = _ref.autocomplete,
|
|
334
166
|
autocomplete = _ref$autocomplete === void 0 ? "off" : _ref$autocomplete,
|
|
335
167
|
margin = _ref.margin,
|
|
@@ -380,13 +212,20 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
380
212
|
var autosuggestId = "".concat(inputId, "-listBox");
|
|
381
213
|
var errorId = "error-message-".concat(inputId);
|
|
382
214
|
var numberInputContext = (0, _react.useContext)(_NumberInputContext["default"]);
|
|
215
|
+
var lastOptionIndex = (0, _react.useMemo)(function () {
|
|
216
|
+
return getLastOptionIndex(filteredSuggestions);
|
|
217
|
+
}, [filteredSuggestions]);
|
|
383
218
|
|
|
384
219
|
var isNotOptional = function isNotOptional(value) {
|
|
385
220
|
return value === "" && !optional;
|
|
386
221
|
};
|
|
387
222
|
|
|
388
223
|
var isLengthIncorrect = function isLengthIncorrect(value) {
|
|
389
|
-
return value
|
|
224
|
+
return value && minLength && maxLength && (value.length < minLength || value.length > maxLength);
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
var getLengthErrorMessage = function getLengthErrorMessage() {
|
|
228
|
+
return "Min length ".concat(minLength, ", max length ").concat(maxLength, ".");
|
|
390
229
|
};
|
|
391
230
|
|
|
392
231
|
var isNumberIncorrect = function isNumberIncorrect(value) {
|
|
@@ -404,11 +243,11 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
404
243
|
};
|
|
405
244
|
|
|
406
245
|
var hasSuggestions = function hasSuggestions() {
|
|
407
|
-
return typeof suggestions === "function" || suggestions
|
|
246
|
+
return typeof suggestions === "function" || (suggestions === null || suggestions === void 0 ? void 0 : suggestions.length) > 0;
|
|
408
247
|
};
|
|
409
248
|
|
|
410
249
|
var openSuggestions = function openSuggestions() {
|
|
411
|
-
|
|
250
|
+
hasSuggestions() && changeIsOpen(true);
|
|
412
251
|
};
|
|
413
252
|
|
|
414
253
|
var closeSuggestions = function closeSuggestions() {
|
|
@@ -424,7 +263,7 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
424
263
|
error: getNotOptionalErrorMessage()
|
|
425
264
|
});else if (isLengthIncorrect(newValue)) onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
426
265
|
value: changedValue,
|
|
427
|
-
error: getLengthErrorMessage(
|
|
266
|
+
error: getLengthErrorMessage()
|
|
428
267
|
});else if (newValue && pattern && !patternMatch(pattern, newValue)) onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
429
268
|
value: changedValue,
|
|
430
269
|
error: getPatternErrorMessage()
|
|
@@ -441,13 +280,14 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
441
280
|
document.activeElement !== actionRef.current && inputRef.current.focus();
|
|
442
281
|
};
|
|
443
282
|
|
|
444
|
-
var
|
|
445
|
-
|
|
446
|
-
|
|
283
|
+
var handleInputContainerOnMouseDown = function handleInputContainerOnMouseDown(event) {
|
|
284
|
+
// Avoid input to lose the focus when the container is pressed
|
|
285
|
+
document.activeElement === inputRef.current && event.preventDefault();
|
|
447
286
|
};
|
|
448
287
|
|
|
449
|
-
var
|
|
288
|
+
var handleIOnChange = function handleIOnChange(event) {
|
|
450
289
|
openSuggestions();
|
|
290
|
+
changeValue(event.target.value);
|
|
451
291
|
};
|
|
452
292
|
|
|
453
293
|
var handleIOnBlur = function handleIOnBlur(event) {
|
|
@@ -457,7 +297,7 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
457
297
|
error: getNotOptionalErrorMessage()
|
|
458
298
|
});else if (isLengthIncorrect(event.target.value)) onBlur === null || onBlur === void 0 ? void 0 : onBlur({
|
|
459
299
|
value: event.target.value,
|
|
460
|
-
error: getLengthErrorMessage(
|
|
300
|
+
error: getLengthErrorMessage()
|
|
461
301
|
});else if (event.target.value && pattern && !patternMatch(pattern, event.target.value)) onBlur === null || onBlur === void 0 ? void 0 : onBlur({
|
|
462
302
|
value: event.target.value,
|
|
463
303
|
error: getPatternErrorMessage()
|
|
@@ -470,15 +310,11 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
470
310
|
});
|
|
471
311
|
};
|
|
472
312
|
|
|
473
|
-
var handleIOnFocus = function handleIOnFocus() {
|
|
474
|
-
openSuggestions();
|
|
475
|
-
};
|
|
476
|
-
|
|
477
313
|
var handleIOnKeyDown = function handleIOnKeyDown(event) {
|
|
478
314
|
switch (event.keyCode) {
|
|
479
315
|
case 40:
|
|
480
316
|
// Arrow Down
|
|
481
|
-
if (numberInputContext) {
|
|
317
|
+
if ((numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.typeNumber) === "number") {
|
|
482
318
|
decrementNumber();
|
|
483
319
|
event.preventDefault();
|
|
484
320
|
} else {
|
|
@@ -496,7 +332,7 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
496
332
|
|
|
497
333
|
case 38:
|
|
498
334
|
// Arrow Up
|
|
499
|
-
if (numberInputContext) {
|
|
335
|
+
if ((numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.typeNumber) === "number") {
|
|
500
336
|
incrementNumber();
|
|
501
337
|
event.preventDefault();
|
|
502
338
|
} else {
|
|
@@ -635,28 +471,8 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
635
471
|
changeVisualFocusedSuggIndex(-1);
|
|
636
472
|
}
|
|
637
473
|
|
|
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;
|
|
655
|
-
};
|
|
656
|
-
|
|
657
|
-
var lastOptionIndex = (0, _react.useMemo)(function () {
|
|
658
|
-
return getLastOptionIndex();
|
|
659
|
-
}, [filteredSuggestions]);
|
|
474
|
+
(numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.typeNumber) === "number" && setNumberProps(numberInputContext.typeNumber, numberInputContext.minNumber, numberInputContext.maxNumber, numberInputContext.stepNumber);
|
|
475
|
+
}, [value, innerValue, suggestions, numberInputContext]);
|
|
660
476
|
|
|
661
477
|
var HighlightedSuggestion = function HighlightedSuggestion(_ref2) {
|
|
662
478
|
var suggestion = _ref2.suggestion,
|
|
@@ -665,58 +481,63 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
665
481
|
var matchedWords = suggestion.match(regEx);
|
|
666
482
|
var noMatchedWords = suggestion.replace(regEx, "");
|
|
667
483
|
var isLastOption = index === lastOptionIndex;
|
|
668
|
-
return _react["default"].createElement(Suggestion, {
|
|
484
|
+
return /*#__PURE__*/_react["default"].createElement(Suggestion, {
|
|
669
485
|
id: "suggestion-".concat(index),
|
|
670
486
|
onClick: function onClick() {
|
|
671
487
|
changeValue(suggestion);
|
|
672
488
|
closeSuggestions();
|
|
673
489
|
},
|
|
490
|
+
visualFocused: visualFocusedSuggIndex === index,
|
|
674
491
|
role: "option",
|
|
675
|
-
"aria-selected": visualFocusedSuggIndex === index && "true"
|
|
676
|
-
|
|
677
|
-
}, _react["default"].createElement(StyledSuggestion, {
|
|
492
|
+
"aria-selected": visualFocusedSuggIndex === index && "true"
|
|
493
|
+
}, /*#__PURE__*/_react["default"].createElement(StyledSuggestion, {
|
|
678
494
|
last: isLastOption,
|
|
679
495
|
visualFocused: visualFocusedSuggIndex === index
|
|
680
|
-
}, typeof suggestions === "function" ? suggestion : _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement("strong", null, matchedWords), noMatchedWords)));
|
|
496
|
+
}, typeof suggestions === "function" ? suggestion : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("strong", null, matchedWords), noMatchedWords)));
|
|
681
497
|
};
|
|
682
498
|
|
|
683
|
-
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
499
|
+
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
684
500
|
theme: colorsTheme.textInput
|
|
685
|
-
}, _react["default"].createElement(DxcInput, {
|
|
501
|
+
}, /*#__PURE__*/_react["default"].createElement(DxcInput, {
|
|
686
502
|
margin: margin,
|
|
687
503
|
ref: ref,
|
|
688
504
|
size: size
|
|
689
|
-
}, _react["default"].createElement(Label, {
|
|
505
|
+
}, /*#__PURE__*/_react["default"].createElement(Label, {
|
|
690
506
|
htmlFor: inputId,
|
|
691
507
|
disabled: disabled,
|
|
692
508
|
backgroundType: backgroundType
|
|
693
|
-
}, label, " ", optional && _react["default"].createElement(OptionalLabel, null, "(Optional)")), _react["default"].createElement(HelperText, {
|
|
509
|
+
}, label, " ", optional && /*#__PURE__*/_react["default"].createElement(OptionalLabel, null, "(Optional)")), /*#__PURE__*/_react["default"].createElement(HelperText, {
|
|
694
510
|
disabled: disabled,
|
|
695
511
|
backgroundType: backgroundType
|
|
696
|
-
}, helperText), _react["default"].createElement(InputContainer, {
|
|
512
|
+
}, helperText), /*#__PURE__*/_react["default"].createElement(InputContainer, {
|
|
697
513
|
error: error,
|
|
698
514
|
disabled: disabled,
|
|
699
515
|
backgroundType: backgroundType,
|
|
700
|
-
onClick: handleInputContainerOnClick
|
|
701
|
-
|
|
516
|
+
onClick: handleInputContainerOnClick,
|
|
517
|
+
onMouseDown: handleInputContainerOnMouseDown
|
|
518
|
+
}, prefix && /*#__PURE__*/_react["default"].createElement(Prefix, {
|
|
702
519
|
disabled: disabled,
|
|
703
520
|
backgroundType: backgroundType
|
|
704
|
-
}, prefix), _react["default"].createElement(Input, {
|
|
521
|
+
}, prefix), /*#__PURE__*/_react["default"].createElement(Input, {
|
|
705
522
|
id: inputId,
|
|
706
523
|
name: name,
|
|
707
524
|
value: value !== null && value !== void 0 ? value : innerValue,
|
|
708
525
|
placeholder: placeholder,
|
|
709
|
-
onChange: handleIOnChange,
|
|
710
|
-
onClick: handleIOnClick,
|
|
711
526
|
onBlur: handleIOnBlur,
|
|
712
|
-
|
|
527
|
+
onChange: handleIOnChange,
|
|
528
|
+
onFocus: function onFocus() {
|
|
529
|
+
openSuggestions();
|
|
530
|
+
},
|
|
713
531
|
onKeyDown: handleIOnKeyDown,
|
|
532
|
+
onMouseDown: function onMouseDown(event) {
|
|
533
|
+
event.stopPropagation();
|
|
534
|
+
},
|
|
714
535
|
disabled: disabled,
|
|
715
536
|
ref: inputRef,
|
|
716
537
|
backgroundType: backgroundType,
|
|
717
538
|
pattern: pattern,
|
|
718
|
-
minLength:
|
|
719
|
-
maxLength:
|
|
539
|
+
minLength: minLength,
|
|
540
|
+
maxLength: maxLength,
|
|
720
541
|
autoComplete: autocomplete,
|
|
721
542
|
tabIndex: tabIndex,
|
|
722
543
|
role: isTextInputType() && hasSuggestions() ? "combobox" : "textbox",
|
|
@@ -727,61 +548,70 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
727
548
|
"aria-invalid": error ? "true" : "false",
|
|
728
549
|
"aria-describedby": error ? errorId : undefined,
|
|
729
550
|
"aria-required": optional ? "false" : "true"
|
|
730
|
-
}), !disabled && error && _react["default"].createElement(ErrorIcon, {
|
|
551
|
+
}), !disabled && error && /*#__PURE__*/_react["default"].createElement(ErrorIcon, {
|
|
731
552
|
backgroundType: backgroundType,
|
|
732
553
|
"aria-label": "Error"
|
|
733
|
-
}, textInputIcons.error), !disabled && clearable && (value !== null && value !== void 0 ? value : innerValue).length > 0 && _react["default"].createElement(Action, {
|
|
554
|
+
}, textInputIcons.error), !disabled && clearable && (value !== null && value !== void 0 ? value : innerValue).length > 0 && /*#__PURE__*/_react["default"].createElement(Action, {
|
|
734
555
|
onClick: handleClearActionOnClick,
|
|
556
|
+
onMouseDown: function onMouseDown(event) {
|
|
557
|
+
event.stopPropagation();
|
|
558
|
+
},
|
|
735
559
|
backgroundType: backgroundType,
|
|
736
560
|
tabIndex: tabIndex,
|
|
737
561
|
"aria-label": "Clear"
|
|
738
|
-
}, textInputIcons.clear), (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.typeNumber) === "number" ? _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(Action, {
|
|
562
|
+
}, 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, {
|
|
739
563
|
ref: actionRef,
|
|
740
564
|
disabled: disabled,
|
|
741
565
|
onClick: handleDecrementActionOnClick,
|
|
566
|
+
onMouseDown: function onMouseDown(event) {
|
|
567
|
+
event.stopPropagation();
|
|
568
|
+
},
|
|
742
569
|
backgroundType: backgroundType,
|
|
743
570
|
tabIndex: tabIndex,
|
|
744
571
|
"aria-label": "Decrement"
|
|
745
|
-
}, textInputIcons.decrement), _react["default"].createElement(Action, {
|
|
572
|
+
}, textInputIcons.decrement), /*#__PURE__*/_react["default"].createElement(Action, {
|
|
746
573
|
ref: actionRef,
|
|
747
574
|
disabled: disabled,
|
|
748
575
|
onClick: handleIncrementActionOnClick,
|
|
576
|
+
onMouseDown: function onMouseDown(event) {
|
|
577
|
+
event.stopPropagation();
|
|
578
|
+
},
|
|
749
579
|
backgroundType: backgroundType,
|
|
750
580
|
tabIndex: tabIndex,
|
|
751
581
|
"aria-label": "Increment"
|
|
752
|
-
}, textInputIcons.increment)) : action && _react["default"].createElement(Action, {
|
|
582
|
+
}, textInputIcons.increment)) : action && /*#__PURE__*/_react["default"].createElement(Action, {
|
|
753
583
|
ref: actionRef,
|
|
754
584
|
disabled: disabled,
|
|
755
585
|
onClick: action.onClick,
|
|
586
|
+
onMouseDown: function onMouseDown(event) {
|
|
587
|
+
event.stopPropagation();
|
|
588
|
+
},
|
|
756
589
|
title: (_action$title = action.title) !== null && _action$title !== void 0 ? _action$title : action.title,
|
|
757
590
|
backgroundType: backgroundType,
|
|
758
591
|
tabIndex: tabIndex
|
|
759
|
-
}, typeof action.icon === "string" ? _react["default"].createElement(ActionIcon, {
|
|
592
|
+
}, typeof action.icon === "string" ? /*#__PURE__*/_react["default"].createElement(ActionIcon, {
|
|
760
593
|
src: action.icon
|
|
761
|
-
}) : action.icon), suffix && _react["default"].createElement(Suffix, {
|
|
594
|
+
}) : action.icon), suffix && /*#__PURE__*/_react["default"].createElement(Suffix, {
|
|
762
595
|
disabled: disabled,
|
|
763
596
|
backgroundType: backgroundType
|
|
764
|
-
}, suffix), isOpen && _react["default"].createElement(Suggestions, {
|
|
597
|
+
}, suffix), isOpen && (filteredSuggestions.length > 0 || isSearching || isAutosuggestError) && /*#__PURE__*/_react["default"].createElement(Suggestions, {
|
|
765
598
|
id: autosuggestId,
|
|
766
599
|
isError: isAutosuggestError,
|
|
767
600
|
onMouseDown: function onMouseDown(event) {
|
|
768
601
|
event.preventDefault();
|
|
769
602
|
},
|
|
770
|
-
onMouseLeave: function onMouseLeave() {
|
|
771
|
-
changeVisualFocusedSuggIndex(-1);
|
|
772
|
-
},
|
|
773
603
|
ref: suggestionsRef,
|
|
774
604
|
role: "listbox",
|
|
775
605
|
"aria-label": label
|
|
776
606
|
}, !isSearching && !isAutosuggestError && filteredSuggestions.length > 0 && filteredSuggestions.map(function (suggestion, index) {
|
|
777
|
-
return _react["default"].createElement(HighlightedSuggestion, {
|
|
607
|
+
return /*#__PURE__*/_react["default"].createElement(HighlightedSuggestion, {
|
|
778
608
|
key: "suggestion-".concat((0, _uuid.v4)()),
|
|
779
609
|
suggestion: suggestion,
|
|
780
610
|
index: index
|
|
781
611
|
});
|
|
782
|
-
}), isSearching && _react["default"].createElement(SuggestionsSystemMessage, null, "Searching..."), isAutosuggestError && _react["default"].createElement(SuggestionsError, null, _react["default"].createElement(SuggestionsErrorIcon, {
|
|
612
|
+
}), isSearching && /*#__PURE__*/_react["default"].createElement(SuggestionsSystemMessage, null, "Searching..."), isAutosuggestError && /*#__PURE__*/_react["default"].createElement(SuggestionsError, null, /*#__PURE__*/_react["default"].createElement(SuggestionsErrorIcon, {
|
|
783
613
|
backgroundType: backgroundType
|
|
784
|
-
}, textInputIcons.error), "Error fetching data"))), !disabled && _react["default"].createElement(Error, {
|
|
614
|
+
}, textInputIcons.error), "Error fetching data"))), !disabled && /*#__PURE__*/_react["default"].createElement(Error, {
|
|
785
615
|
id: errorId,
|
|
786
616
|
backgroundType: backgroundType
|
|
787
617
|
}, error)));
|
|
@@ -798,7 +628,7 @@ var calculateWidth = function calculateWidth(margin, size) {
|
|
|
798
628
|
return size === "fillParent" ? "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")") : sizes[size];
|
|
799
629
|
};
|
|
800
630
|
|
|
801
|
-
var DxcInput = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
631
|
+
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) {
|
|
802
632
|
return calculateWidth(props.margin, props.size);
|
|
803
633
|
}, function (props) {
|
|
804
634
|
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
@@ -812,7 +642,7 @@ var DxcInput = _styledComponents["default"].div(_templateObject(), function (pro
|
|
|
812
642
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
813
643
|
});
|
|
814
644
|
|
|
815
|
-
var Label = _styledComponents["default"].label(_templateObject2(), function (props) {
|
|
645
|
+
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) {
|
|
816
646
|
return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledLabelFontColorOnDark : props.theme.disabledLabelFontColor : props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
817
647
|
}, function (props) {
|
|
818
648
|
return props.theme.fontFamily;
|
|
@@ -826,11 +656,11 @@ var Label = _styledComponents["default"].label(_templateObject2(), function (pro
|
|
|
826
656
|
return props.theme.labelLineHeight;
|
|
827
657
|
});
|
|
828
658
|
|
|
829
|
-
var OptionalLabel = _styledComponents["default"].span(_templateObject3(), function (props) {
|
|
659
|
+
var OptionalLabel = _styledComponents["default"].span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n font-weight: ", ";\n"])), function (props) {
|
|
830
660
|
return props.theme.optionalLabelFontWeight;
|
|
831
661
|
});
|
|
832
662
|
|
|
833
|
-
var HelperText = _styledComponents["default"].span(_templateObject4(), function (props) {
|
|
663
|
+
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) {
|
|
834
664
|
return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledHelperTextFontColorOnDark : props.theme.disabledHelperTextFontColor : props.backgroundType === "dark" ? props.theme.helperTextFontColorOnDark : props.theme.helperTextFontColor;
|
|
835
665
|
}, function (props) {
|
|
836
666
|
return props.theme.fontFamily;
|
|
@@ -844,7 +674,7 @@ var HelperText = _styledComponents["default"].span(_templateObject4(), function
|
|
|
844
674
|
return props.theme.helperTextLineHeight;
|
|
845
675
|
});
|
|
846
676
|
|
|
847
|
-
var InputContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
|
|
677
|
+
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) {
|
|
848
678
|
return "".concat(props.theme.inputMarginTop, " 0 ").concat(props.theme.inputMarginBottom, " 0");
|
|
849
679
|
}, function (props) {
|
|
850
680
|
if (props.disabled) return props.backgroundType === "dark" ? "background-color: ".concat(props.theme.disabledContainerFillColorOnDark, ";") : "background-color: ".concat(props.theme.disabledContainerFillColor, ";");
|
|
@@ -858,7 +688,7 @@ var InputContainer = _styledComponents["default"].div(_templateObject5(), functi
|
|
|
858
688
|
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 ");
|
|
859
689
|
});
|
|
860
690
|
|
|
861
|
-
var Input = _styledComponents["default"].input(_templateObject6(), function (props) {
|
|
691
|
+
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) {
|
|
862
692
|
return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledValueFontColorOnDark : props.theme.disabledValueFontColor : props.backgroundType === "dark" ? props.theme.valueFontColorOnDark : props.theme.valueFontColor;
|
|
863
693
|
}, function (props) {
|
|
864
694
|
return props.theme.fontFamily;
|
|
@@ -874,9 +704,9 @@ var Input = _styledComponents["default"].input(_templateObject6(), function (pro
|
|
|
874
704
|
return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledPlaceholderFontColorOnDark : props.theme.disabledPlaceholderFontColor : props.backgroundType === "dark" ? props.theme.placeholderFontColorOnDark : props.theme.placeholderFontColor;
|
|
875
705
|
});
|
|
876
706
|
|
|
877
|
-
var ActionIcon = _styledComponents["default"].img(_templateObject7());
|
|
707
|
+
var ActionIcon = _styledComponents["default"].img(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n width: 16px;\n height: 16px;\n"])));
|
|
878
708
|
|
|
879
|
-
var Action = _styledComponents["default"].button(_templateObject8(), function (props) {
|
|
709
|
+
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) {
|
|
880
710
|
return props.theme.fontFamily;
|
|
881
711
|
}, function (props) {
|
|
882
712
|
return props.disabled ? "cursor: not-allowed;" : "cursor: pointer;";
|
|
@@ -888,31 +718,31 @@ var Action = _styledComponents["default"].button(_templateObject8(), function (p
|
|
|
888
718
|
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 ");
|
|
889
719
|
});
|
|
890
720
|
|
|
891
|
-
var Prefix = _styledComponents["default"].span(_templateObject9(), function (props) {
|
|
721
|
+
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) {
|
|
892
722
|
var color = props.disabled ? props.backgroundType === "dark" ? props.theme.disabledPrefixColorOnDark : props.theme.disabledPrefixColor : props.backgroundType === "dark" ? props.theme.prefixColorOnDark : props.theme.prefixColor;
|
|
893
723
|
return "color: ".concat(color, "; border-right: 1px solid ").concat(color, ";");
|
|
894
724
|
}, function (props) {
|
|
895
725
|
return props.theme.fontFamily;
|
|
896
726
|
});
|
|
897
727
|
|
|
898
|
-
var Suffix = _styledComponents["default"].span(_templateObject10(), function (props) {
|
|
728
|
+
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) {
|
|
899
729
|
var color = props.disabled ? props.backgroundType === "dark" ? props.theme.disabledSuffixColorOnDark : props.theme.disabledSuffixColor : props.backgroundType === "dark" ? props.theme.suffixColorOnDark : props.theme.suffixColor;
|
|
900
730
|
return "color: ".concat(color, "; border-left: 1px solid ").concat(color, ";");
|
|
901
731
|
}, function (props) {
|
|
902
732
|
return props.theme.fontFamily;
|
|
903
733
|
});
|
|
904
734
|
|
|
905
|
-
var ErrorIcon = _styledComponents["default"].span(_templateObject11(), function (props) {
|
|
735
|
+
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) {
|
|
906
736
|
return props.backgroundType === "dark" ? props.theme.errorIconColorOnDark : props.theme.errorIconColor;
|
|
907
737
|
});
|
|
908
738
|
|
|
909
|
-
var Error = _styledComponents["default"].span(_templateObject12(), function (props) {
|
|
739
|
+
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) {
|
|
910
740
|
return props.backgroundType === "dark" ? props.theme.errorMessageColorOnDark : props.theme.errorMessageColor;
|
|
911
741
|
}, function (props) {
|
|
912
742
|
return props.theme.fontFamily;
|
|
913
743
|
});
|
|
914
744
|
|
|
915
|
-
var Suggestions = _styledComponents["default"].ul(_templateObject13(), function (props) {
|
|
745
|
+
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) {
|
|
916
746
|
return props.isError ? props.theme.errorListDialogBackgroundColor : props.theme.listDialogBackgroundColor;
|
|
917
747
|
}, function (props) {
|
|
918
748
|
return props.isError ? props.theme.errorListDialogBorderColor : props.theme.listDialogBorderColor;
|
|
@@ -928,7 +758,7 @@ var Suggestions = _styledComponents["default"].ul(_templateObject13(), function
|
|
|
928
758
|
return props.theme.listOptionFontWeight;
|
|
929
759
|
});
|
|
930
760
|
|
|
931
|
-
var Suggestion = _styledComponents["default"].li(_templateObject14(), function (props) {
|
|
761
|
+
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) {
|
|
932
762
|
return props.visualFocused ? props.theme.focusListOptionBorderColor : "transparent";
|
|
933
763
|
}, function (props) {
|
|
934
764
|
return props.theme.hoverListOptionBackgroundColor;
|
|
@@ -936,57 +766,21 @@ var Suggestion = _styledComponents["default"].li(_templateObject14(), function (
|
|
|
936
766
|
return props.theme.activeListOptionBackgroundColor;
|
|
937
767
|
});
|
|
938
768
|
|
|
939
|
-
var StyledSuggestion = _styledComponents["default"].span(_templateObject15(), function (props) {
|
|
769
|
+
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) {
|
|
940
770
|
return props.last || props.visualFocused ? "border-bottom: 1px solid transparent" : "border-bottom: 1px solid ".concat(props.theme.listOptionDividerColor);
|
|
941
771
|
});
|
|
942
772
|
|
|
943
|
-
var SuggestionsSystemMessage = _styledComponents["default"].span(_templateObject16(), function (props) {
|
|
773
|
+
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) {
|
|
944
774
|
return props.theme.systemMessageFontColor;
|
|
945
775
|
});
|
|
946
776
|
|
|
947
|
-
var SuggestionsErrorIcon = _styledComponents["default"].span(_templateObject17(), function (props) {
|
|
777
|
+
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) {
|
|
948
778
|
return props.backgroundType === "dark" ? props.theme.errorIconColorOnDark : props.theme.errorIconColor;
|
|
949
779
|
});
|
|
950
780
|
|
|
951
|
-
var SuggestionsError = _styledComponents["default"].span(_templateObject18(), function (props) {
|
|
781
|
+
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) {
|
|
952
782
|
return props.theme.errorListDialogFontColor;
|
|
953
783
|
});
|
|
954
784
|
|
|
955
|
-
DxcTextInput.propTypes = {
|
|
956
|
-
label: _propTypes["default"].string,
|
|
957
|
-
name: _propTypes["default"].string,
|
|
958
|
-
value: _propTypes["default"].string,
|
|
959
|
-
helperText: _propTypes["default"].string,
|
|
960
|
-
placeholder: _propTypes["default"].string,
|
|
961
|
-
action: _propTypes["default"].shape({
|
|
962
|
-
onClick: _propTypes["default"].func.isRequired,
|
|
963
|
-
icon: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
964
|
-
type: _propTypes["default"].oneOf(["svg"])
|
|
965
|
-
}), _propTypes["default"].string]).isRequired
|
|
966
|
-
}),
|
|
967
|
-
clearable: _propTypes["default"].bool,
|
|
968
|
-
disabled: _propTypes["default"].bool,
|
|
969
|
-
optional: _propTypes["default"].bool,
|
|
970
|
-
prefix: _propTypes["default"].string,
|
|
971
|
-
suffix: _propTypes["default"].string,
|
|
972
|
-
onChange: _propTypes["default"].func,
|
|
973
|
-
onBlur: _propTypes["default"].func,
|
|
974
|
-
error: _propTypes["default"].string,
|
|
975
|
-
autocomplete: _propTypes["default"].string,
|
|
976
|
-
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
977
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
978
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
979
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
980
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
981
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
982
|
-
size: _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(sizes))),
|
|
983
|
-
suggestions: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].array]),
|
|
984
|
-
pattern: _propTypes["default"].string,
|
|
985
|
-
length: _propTypes["default"].shape({
|
|
986
|
-
min: _propTypes["default"].number,
|
|
987
|
-
max: _propTypes["default"].number
|
|
988
|
-
}),
|
|
989
|
-
tabIndex: _propTypes["default"].number
|
|
990
|
-
};
|
|
991
785
|
var _default = DxcTextInput;
|
|
992
786
|
exports["default"] = _default;
|