@dxc-technology/halstack-react 0.0.0-b821bfb → 0.0.0-ba408d4
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.js +23 -87
- package/accordion-group/AccordionGroup.js +13 -15
- package/alert/Alert.js +38 -132
- package/badge/Badge.js +9 -13
- package/box/Box.js +9 -13
- package/button/Button.d.ts +4 -0
- package/button/Button.js +15 -71
- package/button/Button.stories.tsx +306 -0
- package/button/types.d.ts +57 -0
- package/button/types.js +5 -0
- package/card/Card.js +19 -73
- package/checkbox/Checkbox.js +13 -37
- package/chip/Chip.js +17 -61
- package/common/RequiredComponent.js +3 -11
- package/common/variables.js +3 -1
- package/date/Date.js +16 -22
- package/date-input/DateInput.js +18 -22
- package/dialog/Dialog.js +16 -50
- package/dropdown/Dropdown.js +37 -131
- package/file-input/FileInput.js +48 -160
- package/file-input/FileItem.js +29 -123
- package/footer/Footer.js +34 -158
- package/footer/Icons.js +13 -13
- package/header/Header.js +35 -179
- package/header/Icons.js +11 -11
- package/heading/Heading.js +18 -72
- package/input-text/Icons.js +2 -2
- package/input-text/InputText.js +36 -130
- package/input-text/index.d.ts +1 -1
- package/layout/ApplicationLayout.js +31 -123
- package/layout/Icons.js +7 -7
- package/link/Link.js +18 -72
- package/main.d.ts +44 -40
- package/main.js +91 -87
- package/number-input/NumberInput.js +5 -13
- package/number-input/NumberInputContext.js +1 -1
- package/package.json +14 -11
- package/paginator/Icons.js +9 -9
- package/paginator/Paginator.d.ts +4 -0
- package/paginator/Paginator.js +24 -131
- package/paginator/types.d.ts +38 -0
- package/paginator/types.js +5 -0
- package/password-input/PasswordInput.js +15 -19
- package/progress-bar/ProgressBar.js +18 -72
- package/radio/Radio.js +12 -26
- package/resultsetTable/ResultsetTable.js +35 -119
- package/select/Select.js +161 -434
- package/sidenav/Sidenav.js +15 -49
- package/slider/Slider.js +19 -83
- package/spinner/Spinner.js +38 -152
- package/switch/Switch.js +12 -26
- package/table/Table.js +10 -24
- package/tabs/Tabs.js +26 -110
- package/tag/Tag.js +22 -96
- package/text-input/TextInput.js +104 -271
- package/textarea/Textarea.js +20 -72
- package/toggle/Toggle.js +15 -49
- package/toggle-group/ToggleGroup.js +23 -107
- 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.js +31 -165
- package/button/Button.stories.js +0 -27
- package/button/index.d.ts +0 -24
- package/paginator/index.d.ts +0 -20
package/select/Select.js
CHANGED
|
@@ -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
|
});
|
|
@@ -31,363 +31,89 @@ var _utils = require("../common/utils.js");
|
|
|
31
31
|
|
|
32
32
|
var _Checkbox = _interopRequireDefault(require("../checkbox/Checkbox"));
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n height: 16px;\n width: 16px;\n margin-left: 4px;\n color: ", ";\n"]);
|
|
36
|
-
|
|
37
|
-
_templateObject28 = function _templateObject28() {
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
return data;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function _templateObject27() {
|
|
45
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"]);
|
|
46
|
-
|
|
47
|
-
_templateObject27 = function _templateObject27() {
|
|
48
|
-
return data;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
return data;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function _templateObject26() {
|
|
55
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: 16px;\n height: 16px;\n"]);
|
|
56
|
-
|
|
57
|
-
_templateObject26 = function _templateObject26() {
|
|
58
|
-
return data;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
return data;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function _templateObject25() {
|
|
65
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 24px;\n width: 24px;\n ", "\n color: ", ";\n"]);
|
|
66
|
-
|
|
67
|
-
_templateObject25 = function _templateObject25() {
|
|
68
|
-
return data;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
return data;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function _templateObject24() {
|
|
75
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n overflow: hidden;\n ", "\n"]);
|
|
76
|
-
|
|
77
|
-
_templateObject24 = function _templateObject24() {
|
|
78
|
-
return data;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
return data;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function _templateObject23() {
|
|
85
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n padding: 0.25rem 0.5rem 0.188rem 0;\n min-height: 24px;\n ", "\n ", ";\n"]);
|
|
86
|
-
|
|
87
|
-
_templateObject23 = function _templateObject23() {
|
|
88
|
-
return data;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
return data;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function _templateObject22() {
|
|
95
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n padding: 0 0.5rem;\n box-shadow: inset 0 0 0 2px transparent;\n ", "\n ", ";\n line-height: 1.715em;\n cursor: pointer;\n\n &:hover {\n ", ";\n }\n &:active {\n ", ";\n }\n"]);
|
|
96
|
-
|
|
97
|
-
_templateObject22 = function _templateObject22() {
|
|
98
|
-
return data;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
return data;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function _templateObject21() {
|
|
105
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n padding: 4px 16px;\n font-weight: ", ";\n line-height: 1.715em;\n"]);
|
|
106
|
-
|
|
107
|
-
_templateObject21 = function _templateObject21() {
|
|
108
|
-
return data;
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
return data;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
function _templateObject20() {
|
|
115
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n padding: 0;\n"]);
|
|
116
|
-
|
|
117
|
-
_templateObject20 = function _templateObject20() {
|
|
118
|
-
return data;
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
return data;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
function _templateObject19() {
|
|
125
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 16px;\n width: 16px;\n padding: 4px;\n margin-right: 0.25rem;\n"]);
|
|
126
|
-
|
|
127
|
-
_templateObject19 = function _templateObject19() {
|
|
128
|
-
return data;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
return data;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
function _templateObject18() {
|
|
135
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n padding: 4px 16px;\n color: ", ";\n font-size: 0.875rem;\n line-height: 1.715em;\n"]);
|
|
136
|
-
|
|
137
|
-
_templateObject18 = function _templateObject18() {
|
|
138
|
-
return data;
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
return data;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
function _templateObject17() {
|
|
145
|
-
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 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"]);
|
|
146
|
-
|
|
147
|
-
_templateObject17 = function _templateObject17() {
|
|
148
|
-
return data;
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
return data;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
function _templateObject16() {
|
|
155
|
-
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 background-color: ", ";\n color: ", ";\n\n cursor: pointer;\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n &:active {\n background-color: ", ";\n color: ", ";\n }\n svg {\n line-height: 18px;\n }\n"]);
|
|
156
|
-
|
|
157
|
-
_templateObject16 = function _templateObject16() {
|
|
158
|
-
return data;
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
return data;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
function _templateObject15() {
|
|
165
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 16px;\n width: 16px;\n padding: 4px;\n margin-left: 0.25rem;\n color: ", ";\n"]);
|
|
166
|
-
|
|
167
|
-
_templateObject15 = function _templateObject15() {
|
|
168
|
-
return data;
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
return data;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
function _templateObject14() {
|
|
175
|
-
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"]);
|
|
176
|
-
|
|
177
|
-
_templateObject14 = function _templateObject14() {
|
|
178
|
-
return data;
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
return data;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
function _templateObject13() {
|
|
185
|
-
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 pointer-events: none;\n color: ", ";\n\n svg {\n line-height: 18px;\n font-size: 1.25rem;\n }\n"]);
|
|
186
|
-
|
|
187
|
-
_templateObject13 = function _templateObject13() {
|
|
188
|
-
return data;
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
return data;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
function _templateObject12() {
|
|
195
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n grid-area: 1 / 1 / 1 / 1;\n height: calc(2.5rem - 2px);\n background: none;\n border: none;\n outline: none;\n padding: 0 0.5rem;\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: 1.5em;\n"]);
|
|
196
|
-
|
|
197
|
-
_templateObject12 = function _templateObject12() {
|
|
198
|
-
return data;
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
return data;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
function _templateObject11() {
|
|
205
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: none;\n"]);
|
|
206
|
-
|
|
207
|
-
_templateObject11 = function _templateObject11() {
|
|
208
|
-
return data;
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
return data;
|
|
212
|
-
}
|
|
34
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28;
|
|
213
35
|
|
|
214
|
-
function
|
|
215
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n grid-area: 1 / 1 / 1 / 1;\n display: inline-flex;\n align-items: center;\n height: calc(2.5rem - 2px);\n padding: 0 0.5rem;\n user-select: none;\n overflow: hidden;\n\n color: ", ";\n\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n"]);
|
|
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); }
|
|
216
37
|
|
|
217
|
-
|
|
218
|
-
return data;
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
return data;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
function _templateObject9() {
|
|
225
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: grid;\n width: 100%;\n"]);
|
|
226
|
-
|
|
227
|
-
_templateObject9 = function _templateObject9() {
|
|
228
|
-
return data;
|
|
229
|
-
};
|
|
230
|
-
|
|
231
|
-
return data;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
function _templateObject8() {
|
|
235
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n width: 23px;\n height: 22px;\n font-size: 1rem;\n font-family: ", ";\n border: none;\n padding: 0.25rem;\n ", "\n background-color: ", ";\n color: ", ";\n\n :focus-visible {\n outline: none;\n }\n ", "\n\n svg {\n line-height: 18px;\n }\n"]);
|
|
236
|
-
|
|
237
|
-
_templateObject8 = function _templateObject8() {
|
|
238
|
-
return data;
|
|
239
|
-
};
|
|
240
|
-
|
|
241
|
-
return data;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
function _templateObject7() {
|
|
245
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n user-select: none;\n background-color: ", ";\n border-right: 1px solid ", ";\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n ", "\n"]);
|
|
246
|
-
|
|
247
|
-
_templateObject7 = function _templateObject7() {
|
|
248
|
-
return data;
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
return data;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
function _templateObject6() {
|
|
255
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n border: 1px solid ", ";\n border-radius: 2px;\n max-height: 22px;\n width: 46px;\n"]);
|
|
256
|
-
|
|
257
|
-
_templateObject6 = function _templateObject6() {
|
|
258
|
-
return data;
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
return data;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
function _templateObject5() {
|
|
265
|
-
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 outline: none;\n ", ";\n box-shadow: 0 0 0 2px transparent;\n border-radius: 4px;\n border: 1px solid\n ", ";\n ", "\n ", ";\n\n ", ";\n"]);
|
|
266
|
-
|
|
267
|
-
_templateObject5 = function _templateObject5() {
|
|
268
|
-
return data;
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
return data;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
function _templateObject4() {
|
|
275
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n"]);
|
|
276
|
-
|
|
277
|
-
_templateObject4 = function _templateObject4() {
|
|
278
|
-
return data;
|
|
279
|
-
};
|
|
280
|
-
|
|
281
|
-
return data;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
function _templateObject3() {
|
|
285
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-weight: ", ";\n"]);
|
|
286
|
-
|
|
287
|
-
_templateObject3 = function _templateObject3() {
|
|
288
|
-
return data;
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
return data;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
function _templateObject2() {
|
|
295
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n cursor: default;\n"]);
|
|
296
|
-
|
|
297
|
-
_templateObject2 = function _templateObject2() {
|
|
298
|
-
return data;
|
|
299
|
-
};
|
|
300
|
-
|
|
301
|
-
return data;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
function _templateObject() {
|
|
305
|
-
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"]);
|
|
306
|
-
|
|
307
|
-
_templateObject = function _templateObject() {
|
|
308
|
-
return data;
|
|
309
|
-
};
|
|
310
|
-
|
|
311
|
-
return data;
|
|
312
|
-
}
|
|
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; }
|
|
313
39
|
|
|
314
40
|
var selectIcons = {
|
|
315
|
-
error: _react["default"].createElement("svg", {
|
|
41
|
+
error: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
316
42
|
role: "img",
|
|
317
43
|
xmlns: "http://www.w3.org/2000/svg",
|
|
318
44
|
height: "24px",
|
|
319
45
|
viewBox: "0 0 24 24",
|
|
320
46
|
width: "24px",
|
|
321
47
|
fill: "currentColor"
|
|
322
|
-
}, _react["default"].createElement("path", {
|
|
48
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
323
49
|
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"
|
|
324
50
|
})),
|
|
325
|
-
arrowUp: _react["default"].createElement("svg", {
|
|
51
|
+
arrowUp: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
326
52
|
role: "img",
|
|
327
53
|
xmlns: "http://www.w3.org/2000/svg",
|
|
328
54
|
height: "24px",
|
|
329
55
|
viewBox: "0 0 24 24",
|
|
330
56
|
width: "24px",
|
|
331
57
|
fill: "currentColor"
|
|
332
|
-
}, _react["default"].createElement("path", {
|
|
58
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
333
59
|
d: "M0 0h24v24H0V0z",
|
|
334
60
|
fill: "none"
|
|
335
|
-
}), _react["default"].createElement("path", {
|
|
61
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
336
62
|
d: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6 1.41 1.41z"
|
|
337
63
|
})),
|
|
338
|
-
arrowDown: _react["default"].createElement("svg", {
|
|
64
|
+
arrowDown: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
339
65
|
role: "img",
|
|
340
66
|
xmlns: "http://www.w3.org/2000/svg",
|
|
341
67
|
height: "24px",
|
|
342
68
|
viewBox: "0 0 24 24",
|
|
343
69
|
width: "24px",
|
|
344
70
|
fill: "currentColor"
|
|
345
|
-
}, _react["default"].createElement("path", {
|
|
71
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
346
72
|
d: "M0 0h24v24H0V0z",
|
|
347
73
|
fill: "none"
|
|
348
|
-
}), _react["default"].createElement("path", {
|
|
74
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
349
75
|
d: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"
|
|
350
76
|
})),
|
|
351
|
-
clear: _react["default"].createElement("svg", {
|
|
77
|
+
clear: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
352
78
|
role: "img",
|
|
353
79
|
xmlns: "http://www.w3.org/2000/svg",
|
|
354
80
|
width: "24",
|
|
355
81
|
height: "24",
|
|
356
82
|
viewBox: "0 0 24 24",
|
|
357
83
|
fill: "currentColor"
|
|
358
|
-
}, _react["default"].createElement("path", {
|
|
84
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
359
85
|
d: "M0 0h24v24H0V0z",
|
|
360
86
|
fill: "none"
|
|
361
|
-
}), _react["default"].createElement("path", {
|
|
87
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
362
88
|
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"
|
|
363
89
|
})),
|
|
364
|
-
selected: _react["default"].createElement("svg", {
|
|
90
|
+
selected: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
365
91
|
role: "img",
|
|
366
92
|
xmlns: "http://www.w3.org/2000/svg",
|
|
367
93
|
height: "24px",
|
|
368
94
|
viewBox: "0 0 24 24",
|
|
369
95
|
width: "24px",
|
|
370
96
|
fill: "currentColor"
|
|
371
|
-
}, _react["default"].createElement("path", {
|
|
97
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
372
98
|
d: "M0 0h24v24H0z",
|
|
373
99
|
fill: "none"
|
|
374
|
-
}), _react["default"].createElement("path", {
|
|
100
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
375
101
|
d: "M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"
|
|
376
102
|
})),
|
|
377
|
-
searchOff: _react["default"].createElement("svg", {
|
|
103
|
+
searchOff: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
378
104
|
role: "img",
|
|
379
105
|
xmlns: "http://www.w3.org/2000/svg",
|
|
380
106
|
height: "24px",
|
|
381
107
|
viewBox: "0 0 24 24",
|
|
382
108
|
width: "24px",
|
|
383
109
|
fill: "currentColor"
|
|
384
|
-
}, _react["default"].createElement("g", null, _react["default"].createElement("rect", {
|
|
110
|
+
}, /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("rect", {
|
|
385
111
|
fill: "none",
|
|
386
112
|
height: "24",
|
|
387
113
|
width: "24"
|
|
388
|
-
})), _react["default"].createElement("g", null, _react["default"].createElement("g", null, _react["default"].createElement("path", {
|
|
114
|
+
})), /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("path", {
|
|
389
115
|
d: "M15.5,14h-0.79l-0.28-0.27C15.41,12.59,16,11.11,16,9.5C16,5.91,13.09,3,9.5,3C6.08,3,3.28,5.64,3.03,9h2.02 C5.3,6.75,7.18,5,9.5,5C11.99,5,14,7.01,14,9.5S11.99,14,9.5,14c-0.17,0-0.33-0.03-0.5-0.05v2.02C9.17,15.99,9.33,16,9.5,16 c1.61,0,3.09-0.59,4.23-1.57L14,14.71v0.79l5,4.99L20.49,19L15.5,14z"
|
|
390
|
-
}), _react["default"].createElement("polygon", {
|
|
116
|
+
}), /*#__PURE__*/_react["default"].createElement("polygon", {
|
|
391
117
|
points: "6.47,10.82 4,13.29 1.53,10.82 0.82,11.53 3.29,14 0.82,16.47 1.53,17.18 4,14.71 6.47,17.18 7.18,16.47 4.71,14 7.18,11.53"
|
|
392
118
|
}))))
|
|
393
119
|
};
|
|
@@ -412,8 +138,68 @@ var filterOptionsBySearchValue = function filterOptionsBySearchValue(options, se
|
|
|
412
138
|
}
|
|
413
139
|
};
|
|
414
140
|
|
|
415
|
-
var
|
|
416
|
-
var
|
|
141
|
+
var getLastOptionIndex = function getLastOptionIndex(options, filteredOptions, searchable, optional, multiple) {
|
|
142
|
+
var last = 0;
|
|
143
|
+
|
|
144
|
+
var reducer = function reducer(acc, current) {
|
|
145
|
+
var _current$options;
|
|
146
|
+
|
|
147
|
+
return acc + ((_current$options = current.options) === null || _current$options === void 0 ? void 0 : _current$options.length);
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
if (searchable && filteredOptions.length > 0) filteredOptions[0].options ? last = filteredOptions.reduce(reducer, 0) - 1 : last = filteredOptions.length - 1;else if ((options === null || options === void 0 ? void 0 : options.length) > 0) options[0].options ? last = options.reduce(reducer, 0) - 1 : last = options.length - 1;
|
|
151
|
+
return optional && !multiple ? last + 1 : last;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
var getSelectedOption = function getSelectedOption(options, multiple, optional, optionalEmptyOption, value, innerValue) {
|
|
155
|
+
var val = value !== null && value !== void 0 ? value : innerValue;
|
|
156
|
+
var selectedOption = multiple ? [] : "";
|
|
157
|
+
var singleSelectionIndex;
|
|
158
|
+
|
|
159
|
+
if (multiple) {
|
|
160
|
+
if ((options === null || options === void 0 ? void 0 : options.length) > 0) {
|
|
161
|
+
options.forEach(function (option) {
|
|
162
|
+
if (option.options) {
|
|
163
|
+
option.options.forEach(function (singleOption) {
|
|
164
|
+
if (val.includes(singleOption.value)) selectedOption.push(singleOption);
|
|
165
|
+
});
|
|
166
|
+
} else if (val.includes(option.value)) selectedOption.push(option);
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
} else {
|
|
170
|
+
if (optional && val === "") {
|
|
171
|
+
selectedOption = optionalEmptyOption;
|
|
172
|
+
singleSelectionIndex = 0;
|
|
173
|
+
} else if ((options === null || options === void 0 ? void 0 : options.length) > 0) {
|
|
174
|
+
var group_index = 0;
|
|
175
|
+
options.some(function (option, index) {
|
|
176
|
+
if (option.options) {
|
|
177
|
+
option.options.some(function (singleOption) {
|
|
178
|
+
if (singleOption.value === val) {
|
|
179
|
+
selectedOption = singleOption;
|
|
180
|
+
singleSelectionIndex = optional ? group_index + 1 : group_index;
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
group_index++;
|
|
185
|
+
});
|
|
186
|
+
} else if (option.value === val) {
|
|
187
|
+
selectedOption = option;
|
|
188
|
+
singleSelectionIndex = optional ? index + 1 : index;
|
|
189
|
+
return true;
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
return {
|
|
196
|
+
selectedOption: selectedOption,
|
|
197
|
+
singleSelectionIndex: singleSelectionIndex
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
var DxcSelect = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
|
|
202
|
+
var _selectedOption$label;
|
|
417
203
|
|
|
418
204
|
var _ref$label = _ref.label,
|
|
419
205
|
label = _ref$label === void 0 ? "" : _ref$label,
|
|
@@ -481,74 +267,13 @@ var DxcSelect = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
481
267
|
var filteredOptions = (0, _react.useMemo)(function () {
|
|
482
268
|
return filterOptionsBySearchValue(options, searchValue);
|
|
483
269
|
}, [options, searchValue]);
|
|
484
|
-
|
|
485
|
-
var getLastOptionIndex = function getLastOptionIndex() {
|
|
486
|
-
var last = 0;
|
|
487
|
-
|
|
488
|
-
var reducer = function reducer(acc, current) {
|
|
489
|
-
var _current$options;
|
|
490
|
-
|
|
491
|
-
return acc + ((_current$options = current.options) === null || _current$options === void 0 ? void 0 : _current$options.length);
|
|
492
|
-
};
|
|
493
|
-
|
|
494
|
-
if (searchable && filteredOptions.length > 0) filteredOptions[0].options ? last = filteredOptions.reduce(reducer, 0) - 1 : last = filteredOptions.length - 1;else if ((options === null || options === void 0 ? void 0 : options.length) > 0) options[0].options ? last = options.reduce(reducer, 0) - 1 : last = options.length - 1;
|
|
495
|
-
return optional && !multiple ? last + 1 : last;
|
|
496
|
-
};
|
|
497
|
-
|
|
498
270
|
var lastOptionIndex = (0, _react.useMemo)(function () {
|
|
499
|
-
return getLastOptionIndex();
|
|
271
|
+
return getLastOptionIndex(options, filteredOptions, searchable, optional, multiple);
|
|
500
272
|
}, [searchable, optional, multiple, filteredOptions, options]);
|
|
501
273
|
|
|
502
|
-
var getSelectedOption = function getSelectedOption() {
|
|
503
|
-
var val = value !== null && value !== void 0 ? value : innerValue;
|
|
504
|
-
var selectedOption = multiple ? [] : "";
|
|
505
|
-
var singleSelectionIndex;
|
|
506
|
-
|
|
507
|
-
if (multiple) {
|
|
508
|
-
if ((options === null || options === void 0 ? void 0 : options.length) > 0) {
|
|
509
|
-
options.forEach(function (option) {
|
|
510
|
-
if (option.options) {
|
|
511
|
-
option.options.forEach(function (singleOption) {
|
|
512
|
-
if (val.includes(singleOption.value)) selectedOption.push(singleOption);
|
|
513
|
-
});
|
|
514
|
-
} else if (val.includes(option.value)) selectedOption.push(option);
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
} else {
|
|
518
|
-
if (optional && val === "") {
|
|
519
|
-
selectedOption = optionalEmptyOption;
|
|
520
|
-
singleSelectionIndex = 0;
|
|
521
|
-
} else if ((options === null || options === void 0 ? void 0 : options.length) > 0) {
|
|
522
|
-
var group_index = 0;
|
|
523
|
-
options.some(function (option, index) {
|
|
524
|
-
if (option.options) {
|
|
525
|
-
option.options.some(function (singleOption) {
|
|
526
|
-
if (singleOption.value === val) {
|
|
527
|
-
selectedOption = singleOption;
|
|
528
|
-
singleSelectionIndex = optional ? group_index + 1 : group_index;
|
|
529
|
-
return true;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
group_index++;
|
|
533
|
-
});
|
|
534
|
-
} else if (option.value === val) {
|
|
535
|
-
selectedOption = option;
|
|
536
|
-
singleSelectionIndex = optional ? index + 1 : index;
|
|
537
|
-
return true;
|
|
538
|
-
}
|
|
539
|
-
});
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
return {
|
|
544
|
-
selectedOption: selectedOption,
|
|
545
|
-
singleSelectionIndex: singleSelectionIndex
|
|
546
|
-
};
|
|
547
|
-
};
|
|
548
|
-
|
|
549
274
|
var _useMemo = (0, _react.useMemo)(function () {
|
|
550
|
-
return getSelectedOption();
|
|
551
|
-
}, [options, multiple, value, innerValue]),
|
|
275
|
+
return getSelectedOption(options, multiple, optional, optionalEmptyOption, value, innerValue);
|
|
276
|
+
}, [options, multiple, optional, value, innerValue]),
|
|
552
277
|
selectedOption = _useMemo.selectedOption,
|
|
553
278
|
singleSelectionIndex = _useMemo.singleSelectionIndex;
|
|
554
279
|
|
|
@@ -756,7 +481,7 @@ var DxcSelect = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
756
481
|
isGroupedOption = _ref2$isGroupedOption === void 0 ? false : _ref2$isGroupedOption;
|
|
757
482
|
var isSelected = multiple ? (value !== null && value !== void 0 ? value : innerValue).includes(option.value) : (value !== null && value !== void 0 ? value : innerValue) === option.value;
|
|
758
483
|
var isLastOption = index === lastOptionIndex;
|
|
759
|
-
return _react["default"].createElement(OptionItem, {
|
|
484
|
+
return /*#__PURE__*/_react["default"].createElement(OptionItem, {
|
|
760
485
|
id: "option-".concat(index),
|
|
761
486
|
onClick: function onClick() {
|
|
762
487
|
handleSelectChangeValue(option);
|
|
@@ -766,70 +491,73 @@ var DxcSelect = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
766
491
|
visualFocused: visualFocusIndex === index,
|
|
767
492
|
selected: isSelected,
|
|
768
493
|
role: "option",
|
|
769
|
-
"aria-selected": isSelected
|
|
770
|
-
}, _react["default"].createElement(StyledOption, {
|
|
494
|
+
"aria-selected": isSelected
|
|
495
|
+
}, /*#__PURE__*/_react["default"].createElement(StyledOption, {
|
|
771
496
|
visualFocused: visualFocusIndex === index,
|
|
772
497
|
selected: isSelected,
|
|
773
498
|
last: isLastOption,
|
|
774
499
|
grouped: isGroupedOption,
|
|
775
500
|
multiple: multiple
|
|
776
|
-
}, multiple && _react["default"].createElement(_Checkbox["default"], {
|
|
501
|
+
}, multiple && /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
|
|
777
502
|
tabIndex: -1,
|
|
778
503
|
checked: isSelected
|
|
779
|
-
}), option.icon && _react["default"].createElement(OptionIcon, {
|
|
504
|
+
}), option.icon && /*#__PURE__*/_react["default"].createElement(OptionIcon, {
|
|
780
505
|
grouped: isGroupedOption,
|
|
781
506
|
multiple: multiple,
|
|
782
507
|
role: !(typeof option.icon === "string") && "img"
|
|
783
|
-
}, typeof option.icon === "string" ? _react["default"].createElement(OptionIconImg, {
|
|
508
|
+
}, typeof option.icon === "string" ? /*#__PURE__*/_react["default"].createElement(OptionIconImg, {
|
|
784
509
|
src: option.icon
|
|
785
|
-
}) : option.icon), _react["default"].createElement(OptionContent, {
|
|
510
|
+
}) : option.icon), /*#__PURE__*/_react["default"].createElement(OptionContent, {
|
|
786
511
|
grouped: isGroupedOption,
|
|
787
512
|
hasIcon: option.icon,
|
|
788
513
|
multiple: multiple
|
|
789
|
-
}, _react["default"].createElement(OptionLabel, null, option.label), !multiple && isSelected && _react["default"].createElement(OptionSelectedIndicator, null, selectIcons.selected))));
|
|
514
|
+
}, /*#__PURE__*/_react["default"].createElement(OptionLabel, null, option.label), !multiple && isSelected && /*#__PURE__*/_react["default"].createElement(OptionSelectedIndicator, null, selectIcons.selected))));
|
|
790
515
|
};
|
|
791
516
|
|
|
792
|
-
var
|
|
517
|
+
var globalIndex = optional && !multiple ? 0 : -1; // index for options, starting from 0 to options.length -1
|
|
793
518
|
|
|
794
|
-
var mapOptionFunc = function mapOptionFunc(option) {
|
|
519
|
+
var mapOptionFunc = function mapOptionFunc(option, mapIndex) {
|
|
795
520
|
if (option.options) {
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
521
|
+
var groupId = "group-".concat(mapIndex);
|
|
522
|
+
return option.options.length > 0 && /*#__PURE__*/_react["default"].createElement("li", null, /*#__PURE__*/_react["default"].createElement(GroupList, {
|
|
523
|
+
role: "group",
|
|
524
|
+
"aria-labelledby": groupId
|
|
525
|
+
}, /*#__PURE__*/_react["default"].createElement(GroupLabel, {
|
|
526
|
+
role: "presentation",
|
|
527
|
+
id: groupId
|
|
800
528
|
}, option.label), option.options.map(function (singleOption) {
|
|
801
|
-
|
|
802
|
-
return _react["default"].createElement(Option, {
|
|
529
|
+
globalIndex++;
|
|
530
|
+
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
803
531
|
option: singleOption,
|
|
804
|
-
index:
|
|
532
|
+
index: globalIndex,
|
|
805
533
|
isGroupedOption: true
|
|
806
534
|
});
|
|
807
535
|
})));
|
|
808
536
|
} else {
|
|
809
|
-
|
|
810
|
-
return _react["default"].createElement(Option, {
|
|
537
|
+
globalIndex++;
|
|
538
|
+
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
811
539
|
key: "option-".concat(option.value),
|
|
812
540
|
option: option,
|
|
813
|
-
index:
|
|
541
|
+
index: globalIndex
|
|
814
542
|
});
|
|
815
543
|
}
|
|
816
544
|
};
|
|
817
545
|
|
|
818
|
-
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
546
|
+
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
819
547
|
theme: colorsTheme.select
|
|
820
|
-
}, _react["default"].createElement(SelectContainer, {
|
|
548
|
+
}, /*#__PURE__*/_react["default"].createElement(SelectContainer, {
|
|
821
549
|
margin: margin,
|
|
822
550
|
size: size,
|
|
823
551
|
ref: ref
|
|
824
|
-
}, _react["default"].createElement(Label, {
|
|
552
|
+
}, /*#__PURE__*/_react["default"].createElement(Label, {
|
|
825
553
|
id: selectLabelId,
|
|
826
554
|
disabled: disabled,
|
|
827
555
|
onClick: function onClick() {
|
|
828
556
|
selectContainerRef.current.focus();
|
|
829
557
|
}
|
|
830
|
-
}, label, " ", optional && _react["default"].createElement(OptionalLabel, null, "(Optional)")), _react["default"].createElement(HelperText, {
|
|
558
|
+
}, label, " ", optional && /*#__PURE__*/_react["default"].createElement(OptionalLabel, null, "(Optional)")), /*#__PURE__*/_react["default"].createElement(HelperText, {
|
|
831
559
|
disabled: disabled
|
|
832
|
-
}, helperText), _react["default"].createElement(Select, {
|
|
560
|
+
}, helperText), /*#__PURE__*/_react["default"].createElement(Select, {
|
|
833
561
|
id: selectId,
|
|
834
562
|
disabled: disabled,
|
|
835
563
|
error: error,
|
|
@@ -841,15 +569,15 @@ var DxcSelect = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
841
569
|
tabIndex: tabIndex,
|
|
842
570
|
role: "combobox",
|
|
843
571
|
"aria-controls": optionsListId,
|
|
844
|
-
"aria-expanded": isOpen
|
|
572
|
+
"aria-expanded": isOpen,
|
|
845
573
|
"aria-haspopup": "listbox",
|
|
846
574
|
"aria-labelledby": selectLabelId,
|
|
847
575
|
"aria-activedescendant": visualFocusIndex >= 0 ? "option-".concat(visualFocusIndex) : undefined,
|
|
848
576
|
"aria-invalid": error ? "true" : "false",
|
|
849
|
-
"aria-required": optional
|
|
850
|
-
}, multiple && selectedOption.length > 0 && _react["default"].createElement(SelectionIndicator, null, _react["default"].createElement(SelectionNumber, {
|
|
577
|
+
"aria-required": !optional
|
|
578
|
+
}, multiple && selectedOption.length > 0 && /*#__PURE__*/_react["default"].createElement(SelectionIndicator, null, /*#__PURE__*/_react["default"].createElement(SelectionNumber, {
|
|
851
579
|
disabled: disabled
|
|
852
|
-
}, selectedOption.length), _react["default"].createElement(ClearOptionsAction, {
|
|
580
|
+
}, selectedOption.length), /*#__PURE__*/_react["default"].createElement(ClearOptionsAction, {
|
|
853
581
|
disabled: disabled,
|
|
854
582
|
onMouseDown: function onMouseDown(event) {
|
|
855
583
|
// Avoid input to lose focus when pressed
|
|
@@ -859,12 +587,12 @@ var DxcSelect = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
859
587
|
tabIndex: -1,
|
|
860
588
|
title: "Clear selected options",
|
|
861
589
|
"aria-label": "Clear selected options"
|
|
862
|
-
}, selectIcons.clear)), _react["default"].createElement(SearchableValueContainer, null, _react["default"].createElement(ValueInput, {
|
|
590
|
+
}, selectIcons.clear)), /*#__PURE__*/_react["default"].createElement(SearchableValueContainer, null, /*#__PURE__*/_react["default"].createElement(ValueInput, {
|
|
863
591
|
name: name,
|
|
864
592
|
value: multiple ? (value !== null && value !== void 0 ? value : innerValue).join(", ") : value !== null && value !== void 0 ? value : innerValue,
|
|
865
593
|
readOnly: true,
|
|
866
594
|
"aria-hidden": "true"
|
|
867
|
-
}), searchable && _react["default"].createElement(SearchInput, {
|
|
595
|
+
}), searchable && /*#__PURE__*/_react["default"].createElement(SearchInput, {
|
|
868
596
|
value: searchValue,
|
|
869
597
|
disabled: disabled,
|
|
870
598
|
onChange: handleSearchIOnChange,
|
|
@@ -872,15 +600,15 @@ var DxcSelect = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
872
600
|
autoComplete: "off",
|
|
873
601
|
autoCorrect: "off",
|
|
874
602
|
size: "1"
|
|
875
|
-
}), (!searchable || searchValue === "") && (multiple ? _react["default"].createElement(SelectedOption, {
|
|
603
|
+
}), (!searchable || searchValue === "") && (multiple ? /*#__PURE__*/_react["default"].createElement(SelectedOption, {
|
|
876
604
|
disabled: disabled,
|
|
877
605
|
atBackground: (value !== null && value !== void 0 ? value : innerValue).length === 0 || searchable && isOpen
|
|
878
|
-
}, _react["default"].createElement(OptionLabel, null, selectedOption.map(function (option) {
|
|
606
|
+
}, /*#__PURE__*/_react["default"].createElement(OptionLabel, null, selectedOption.map(function (option) {
|
|
879
607
|
return option.label;
|
|
880
|
-
}).join(", ")), selectedOption.length === 0 && placeholder) : _react["default"].createElement(SelectedOption, {
|
|
608
|
+
}).join(", ")), selectedOption.length === 0 && placeholder) : /*#__PURE__*/_react["default"].createElement(SelectedOption, {
|
|
881
609
|
disabled: disabled,
|
|
882
610
|
atBackground: !(value !== null && value !== void 0 ? value : innerValue) || searchable && isOpen
|
|
883
|
-
}, _react["default"].createElement(OptionLabel, null, (
|
|
611
|
+
}, /*#__PURE__*/_react["default"].createElement(OptionLabel, null, (_selectedOption$label = selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.label) !== null && _selectedOption$label !== void 0 ? _selectedOption$label : placeholder)))), !disabled && error && /*#__PURE__*/_react["default"].createElement(ErrorIcon, null, selectIcons.error), searchable && searchValue.length > 0 && /*#__PURE__*/_react["default"].createElement(ClearSearchAction, {
|
|
884
612
|
onMouseDown: function onMouseDown(event) {
|
|
885
613
|
// Avoid input to lose focus
|
|
886
614
|
event.preventDefault();
|
|
@@ -889,9 +617,9 @@ var DxcSelect = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
889
617
|
tabIndex: -1,
|
|
890
618
|
title: "Clear search text",
|
|
891
619
|
"aria-label": "Clear search text"
|
|
892
|
-
}, selectIcons.clear), _react["default"].createElement(CollapseIndicator, {
|
|
620
|
+
}, selectIcons.clear), /*#__PURE__*/_react["default"].createElement(CollapseIndicator, {
|
|
893
621
|
disabled: disabled
|
|
894
|
-
}, isOpen ? selectIcons.arrowUp : selectIcons.arrowDown), isOpen && _react["default"].createElement(OptionsList, {
|
|
622
|
+
}, isOpen ? selectIcons.arrowUp : selectIcons.arrowDown), isOpen && /*#__PURE__*/_react["default"].createElement(OptionsList, {
|
|
895
623
|
id: optionsListId,
|
|
896
624
|
onClick: function onClick(event) {
|
|
897
625
|
event.stopPropagation();
|
|
@@ -901,12 +629,11 @@ var DxcSelect = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
901
629
|
},
|
|
902
630
|
ref: selectOptionsListRef,
|
|
903
631
|
role: "listbox",
|
|
904
|
-
"aria-
|
|
905
|
-
|
|
906
|
-
}, searchable && (filteredOptions.length === 0 || !filteredGroupsHaveOptions()) ? _react["default"].createElement(OptionsSystemMessage, null, _react["default"].createElement(NoMatchesFoundIcon, null, selectIcons.searchOff), "No matches found") : optional && !multiple && _react["default"].createElement(Option, {
|
|
632
|
+
"aria-multiselectable": multiple
|
|
633
|
+
}, searchable && (filteredOptions.length === 0 || !filteredGroupsHaveOptions()) ? /*#__PURE__*/_react["default"].createElement(OptionsSystemMessage, null, /*#__PURE__*/_react["default"].createElement(NoMatchesFoundIcon, null, selectIcons.searchOff), "No matches found") : optional && !multiple && /*#__PURE__*/_react["default"].createElement(Option, {
|
|
907
634
|
option: optionalEmptyOption,
|
|
908
635
|
index: 0
|
|
909
|
-
}), searchable ? filteredOptions.map(mapOptionFunc) : options.map(mapOptionFunc))), !disabled && _react["default"].createElement(Error, null, error)));
|
|
636
|
+
}), searchable ? filteredOptions.map(mapOptionFunc) : options.map(mapOptionFunc))), !disabled && /*#__PURE__*/_react["default"].createElement(Error, null, error)));
|
|
910
637
|
});
|
|
911
638
|
|
|
912
639
|
var sizes = {
|
|
@@ -920,7 +647,7 @@ var calculateWidth = function calculateWidth(margin, size) {
|
|
|
920
647
|
return size === "fillParent" ? "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")") : sizes[size];
|
|
921
648
|
};
|
|
922
649
|
|
|
923
|
-
var SelectContainer = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
650
|
+
var SelectContainer = _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) {
|
|
924
651
|
return calculateWidth(props.margin, props.size);
|
|
925
652
|
}, function (props) {
|
|
926
653
|
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
@@ -934,7 +661,7 @@ var SelectContainer = _styledComponents["default"].div(_templateObject(), functi
|
|
|
934
661
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
935
662
|
});
|
|
936
663
|
|
|
937
|
-
var Label = _styledComponents["default"].span(_templateObject2(), function (props) {
|
|
664
|
+
var Label = _styledComponents["default"].span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n cursor: default;\n"])), function (props) {
|
|
938
665
|
return props.disabled ? props.theme.disabledColor : props.theme.labelFontColor;
|
|
939
666
|
}, function (props) {
|
|
940
667
|
return props.theme.fontFamily;
|
|
@@ -948,11 +675,11 @@ var Label = _styledComponents["default"].span(_templateObject2(), function (prop
|
|
|
948
675
|
return props.theme.labelLineHeight;
|
|
949
676
|
});
|
|
950
677
|
|
|
951
|
-
var OptionalLabel = _styledComponents["default"].span(_templateObject3(), function (props) {
|
|
678
|
+
var OptionalLabel = _styledComponents["default"].span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n font-weight: ", ";\n"])), function (props) {
|
|
952
679
|
return props.theme.optionalLabelFontWeight;
|
|
953
680
|
});
|
|
954
681
|
|
|
955
|
-
var HelperText = _styledComponents["default"].span(_templateObject4(), function (props) {
|
|
682
|
+
var HelperText = _styledComponents["default"].span(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n"])), function (props) {
|
|
956
683
|
return props.disabled ? props.theme.disabledColor : props.theme.helperTextFontColor;
|
|
957
684
|
}, function (props) {
|
|
958
685
|
return props.theme.fontFamily;
|
|
@@ -966,7 +693,7 @@ var HelperText = _styledComponents["default"].span(_templateObject4(), function
|
|
|
966
693
|
return props.theme.helperTextLineHeight;
|
|
967
694
|
});
|
|
968
695
|
|
|
969
|
-
var Select = _styledComponents["default"].div(_templateObject5(), function (props) {
|
|
696
|
+
var Select = _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 outline: none;\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) {
|
|
970
697
|
return "".concat(props.theme.inputMarginTop, " 0 ").concat(props.theme.inputMarginBottom, " 0");
|
|
971
698
|
}, function (props) {
|
|
972
699
|
return props.disabled && "background-color: ".concat(props.theme.disabledInputBackgroundColor);
|
|
@@ -980,12 +707,12 @@ var Select = _styledComponents["default"].div(_templateObject5(), function (prop
|
|
|
980
707
|
return !props.disabled && "\n &:hover {\n border-color: ".concat(props.error ? "transparent" : props.theme.hoverInputBorderColor, ";\n ").concat(props.error && "box-shadow: 0 0 0 2px ".concat(props.theme.hoverInputErrorBorderColor, ";"), "\n }\n &:focus-within {\n border-color: transparent;\n box-shadow: 0 0 0 2px ").concat(props.theme.focusInputBorderColor, ";\n }\n ");
|
|
981
708
|
});
|
|
982
709
|
|
|
983
|
-
var SelectionIndicator = _styledComponents["default"].span(_templateObject6(), function (props) {
|
|
710
|
+
var SelectionIndicator = _styledComponents["default"].span(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n border: 1px solid ", ";\n border-radius: 2px;\n max-height: 22px;\n width: 46px;\n"])), function (props) {
|
|
984
711
|
return props.theme.selectionIndicatorBorderColor;
|
|
985
712
|
});
|
|
986
713
|
|
|
987
|
-
var SelectionNumber = _styledComponents["default"].span(_templateObject7(), function (props) {
|
|
988
|
-
return props.theme.selectionIndicatorBackgroundColor;
|
|
714
|
+
var SelectionNumber = _styledComponents["default"].span(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n user-select: none;\n ", ";\n border-right: 1px solid ", ";\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n ", "\n"])), function (props) {
|
|
715
|
+
return !props.disabled && "background-color: ".concat(props.theme.selectionIndicatorBackgroundColor);
|
|
989
716
|
}, function (props) {
|
|
990
717
|
return props.theme.selectionIndicatorBorderColor;
|
|
991
718
|
}, function (props) {
|
|
@@ -1002,21 +729,21 @@ var SelectionNumber = _styledComponents["default"].span(_templateObject7(), func
|
|
|
1002
729
|
return props.disabled ? "cursor: not-allowed;" : "cursor: default;";
|
|
1003
730
|
});
|
|
1004
731
|
|
|
1005
|
-
var ClearOptionsAction = _styledComponents["default"].button(_templateObject8(), function (props) {
|
|
732
|
+
var ClearOptionsAction = _styledComponents["default"].button(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n width: 23px;\n height: 22px;\n font-size: 1rem;\n font-family: ", ";\n border: none;\n padding: 0.25rem;\n ", "\n background-color: ", ";\n color: ", ";\n\n :focus-visible {\n outline: none;\n }\n ", "\n\n svg {\n line-height: 18px;\n }\n"])), function (props) {
|
|
1006
733
|
return props.theme.fontFamily;
|
|
1007
734
|
}, function (props) {
|
|
1008
735
|
return props.disabled ? "cursor: not-allowed;" : "cursor: pointer;";
|
|
1009
736
|
}, function (props) {
|
|
1010
|
-
return props.theme.enabledSelectionIndicatorActionBackgroundColor;
|
|
737
|
+
return props.disabled ? "transparent" : props.theme.enabledSelectionIndicatorActionBackgroundColor;
|
|
1011
738
|
}, function (props) {
|
|
1012
739
|
return props.disabled ? props.theme.disabledColor : props.theme.enabledSelectionIndicatorActionIconColor;
|
|
1013
740
|
}, function (props) {
|
|
1014
741
|
return !props.disabled && "\n &:hover {\n background-color: ".concat(props.theme.hoverSelectionIndicatorActionBackgroundColor, ";\n color: ").concat(props.theme.hoverSelectionIndicatorActionIconColor, ";\n }\n &:active {\n background-color: ").concat(props.theme.activeSelectionIndicatorActionBackgroundColor, ";\n color: ").concat(props.theme.activeSelectionIndicatorActionIconColor, ";\n }\n ");
|
|
1015
742
|
});
|
|
1016
743
|
|
|
1017
|
-
var SearchableValueContainer = _styledComponents["default"].div(_templateObject9());
|
|
744
|
+
var SearchableValueContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n display: grid;\n width: 100%;\n"])));
|
|
1018
745
|
|
|
1019
|
-
var SelectedOption = _styledComponents["default"].span(_templateObject10(), function (props) {
|
|
746
|
+
var SelectedOption = _styledComponents["default"].span(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["\n grid-area: 1 / 1 / 1 / 1;\n display: inline-flex;\n align-items: center;\n height: calc(2.5rem - 2px);\n padding: 0 0.5rem;\n user-select: none;\n overflow: hidden;\n\n color: ", ";\n\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n"])), function (props) {
|
|
1020
747
|
if (props.disabled) return props.theme.disabledColor;else if (props.atBackground) return props.theme.placeholderFontColor;else return props.theme.valueFontColor;
|
|
1021
748
|
}, function (props) {
|
|
1022
749
|
return props.theme.fontFamily;
|
|
@@ -1028,9 +755,9 @@ var SelectedOption = _styledComponents["default"].span(_templateObject10(), func
|
|
|
1028
755
|
return props.theme.valueFontWeight;
|
|
1029
756
|
});
|
|
1030
757
|
|
|
1031
|
-
var ValueInput = _styledComponents["default"].input(_templateObject11());
|
|
758
|
+
var ValueInput = _styledComponents["default"].input(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2["default"])(["\n display: none;\n"])));
|
|
1032
759
|
|
|
1033
|
-
var SearchInput = _styledComponents["default"].input(_templateObject12(), function (props) {
|
|
760
|
+
var SearchInput = _styledComponents["default"].input(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])(["\n grid-area: 1 / 1 / 1 / 1;\n height: calc(2.5rem - 2px);\n background: none;\n border: none;\n outline: none;\n padding: 0 0.5rem;\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: 1.5em;\n"])), function (props) {
|
|
1034
761
|
return props.disabled ? props.theme.disabledColor : props.theme.valueFontColor;
|
|
1035
762
|
}, function (props) {
|
|
1036
763
|
return props.theme.fontFamily;
|
|
@@ -1042,21 +769,21 @@ var SearchInput = _styledComponents["default"].input(_templateObject12(), functi
|
|
|
1042
769
|
return props.theme.valueFontWeight;
|
|
1043
770
|
});
|
|
1044
771
|
|
|
1045
|
-
var ErrorIcon = _styledComponents["default"].span(_templateObject13(), function (props) {
|
|
772
|
+
var ErrorIcon = _styledComponents["default"].span(_templateObject13 || (_templateObject13 = (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 pointer-events: none;\n color: ", ";\n\n svg {\n line-height: 18px;\n font-size: 1.25rem;\n }\n"])), function (props) {
|
|
1046
773
|
return props.theme.errorIconColor;
|
|
1047
774
|
});
|
|
1048
775
|
|
|
1049
|
-
var Error = _styledComponents["default"].span(_templateObject14(), function (props) {
|
|
776
|
+
var Error = _styledComponents["default"].span(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2["default"])(["\n min-height: 1.5em;\n color: ", ";\n font-family: ", ";\n font-size: 0.75rem;\n font-weight: 400;\n"])), function (props) {
|
|
1050
777
|
return props.theme.errorMessageColor;
|
|
1051
778
|
}, function (props) {
|
|
1052
779
|
return props.theme.fontFamily;
|
|
1053
780
|
});
|
|
1054
781
|
|
|
1055
|
-
var CollapseIndicator = _styledComponents["default"].span(_templateObject15(), function (props) {
|
|
782
|
+
var CollapseIndicator = _styledComponents["default"].span(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 16px;\n width: 16px;\n padding: 4px;\n margin-left: 0.25rem;\n color: ", ";\n"])), function (props) {
|
|
1056
783
|
return props.disabled ? props.theme.disabledColor : props.theme.collapseIndicatorColor;
|
|
1057
784
|
});
|
|
1058
785
|
|
|
1059
|
-
var ClearSearchAction = _styledComponents["default"].button(_templateObject16(), function (props) {
|
|
786
|
+
var ClearSearchAction = _styledComponents["default"].button(_templateObject16 || (_templateObject16 = (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 background-color: ", ";\n color: ", ";\n\n cursor: pointer;\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n &:active {\n background-color: ", ";\n color: ", ";\n }\n svg {\n line-height: 18px;\n }\n"])), function (props) {
|
|
1060
787
|
return props.theme.fontFamily;
|
|
1061
788
|
}, function (props) {
|
|
1062
789
|
return props.theme.actionBackgroundColor;
|
|
@@ -1072,7 +799,7 @@ var ClearSearchAction = _styledComponents["default"].button(_templateObject16(),
|
|
|
1072
799
|
return props.theme.activeActionIconColor;
|
|
1073
800
|
});
|
|
1074
801
|
|
|
1075
|
-
var OptionsList = _styledComponents["default"].ul(_templateObject17(), function (props) {
|
|
802
|
+
var OptionsList = _styledComponents["default"].ul(_templateObject17 || (_templateObject17 = (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 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) {
|
|
1076
803
|
return props.theme.listDialogBackgroundColor;
|
|
1077
804
|
}, function (props) {
|
|
1078
805
|
return props.theme.listDialogBorderColor;
|
|
@@ -1088,19 +815,19 @@ var OptionsList = _styledComponents["default"].ul(_templateObject17(), function
|
|
|
1088
815
|
return props.theme.listOptionFontWeight;
|
|
1089
816
|
});
|
|
1090
817
|
|
|
1091
|
-
var OptionsSystemMessage = _styledComponents["default"].span(_templateObject18(), function (props) {
|
|
818
|
+
var OptionsSystemMessage = _styledComponents["default"].span(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n padding: 4px 16px;\n color: ", ";\n font-size: 0.875rem;\n line-height: 1.715em;\n"])), function (props) {
|
|
1092
819
|
return props.theme.systemMessageFontColor;
|
|
1093
820
|
});
|
|
1094
821
|
|
|
1095
|
-
var NoMatchesFoundIcon = _styledComponents["default"].span(_templateObject19());
|
|
822
|
+
var NoMatchesFoundIcon = _styledComponents["default"].span(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 16px;\n width: 16px;\n padding: 4px;\n margin-right: 0.25rem;\n"])));
|
|
1096
823
|
|
|
1097
|
-
var GroupList = _styledComponents["default"].ul(_templateObject20());
|
|
824
|
+
var GroupList = _styledComponents["default"].ul(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteral2["default"])(["\n padding: 0;\n"])));
|
|
1098
825
|
|
|
1099
|
-
var GroupLabel = _styledComponents["default"].li(_templateObject21(), function (props) {
|
|
826
|
+
var GroupLabel = _styledComponents["default"].li(_templateObject21 || (_templateObject21 = (0, _taggedTemplateLiteral2["default"])(["\n padding: 4px 16px;\n font-weight: ", ";\n line-height: 1.715em;\n"])), function (props) {
|
|
1100
827
|
return props.theme.listGroupLabelFontWeight;
|
|
1101
828
|
});
|
|
1102
829
|
|
|
1103
|
-
var OptionItem = _styledComponents["default"].li(_templateObject22(), function (props) {
|
|
830
|
+
var OptionItem = _styledComponents["default"].li(_templateObject22 || (_templateObject22 = (0, _taggedTemplateLiteral2["default"])(["\n padding: 0 0.5rem;\n box-shadow: inset 0 0 0 2px transparent;\n ", "\n ", ";\n line-height: 1.715em;\n cursor: pointer;\n\n &:hover {\n ", ";\n }\n &:active {\n ", ";\n }\n"])), function (props) {
|
|
1104
831
|
return props.visualFocused && "box-shadow: inset 0 0 0 2px ".concat(props.theme.focusListOptionBorderColor, ";");
|
|
1105
832
|
}, function (props) {
|
|
1106
833
|
return props.selected && "background-color: ".concat(props.theme.selectedListOptionBackgroundColor);
|
|
@@ -1110,27 +837,27 @@ var OptionItem = _styledComponents["default"].li(_templateObject22(), function (
|
|
|
1110
837
|
return props.selected ? "background-color: ".concat(props.theme.selectedActiveListOptionBackgroundColor, ";") : "background-color: ".concat(props.theme.unselectedActiveListOptionBackgroundColor, ";");
|
|
1111
838
|
});
|
|
1112
839
|
|
|
1113
|
-
var StyledOption = _styledComponents["default"].span(_templateObject23(), function (props) {
|
|
840
|
+
var StyledOption = _styledComponents["default"].span(_templateObject23 || (_templateObject23 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n padding: 0.25rem 0.5rem 0.188rem 0;\n min-height: 24px;\n ", "\n ", ";\n"])), function (props) {
|
|
1114
841
|
return props.grouped && props.multiple && "padding-left: 16px;";
|
|
1115
842
|
}, function (props) {
|
|
1116
843
|
return props.last || props.visualFocused || props.selected ? "border-bottom: 1px solid transparent" : "border-bottom: 1px solid ".concat(props.theme.listOptionDividerColor);
|
|
1117
844
|
});
|
|
1118
845
|
|
|
1119
|
-
var OptionContent = _styledComponents["default"].span(_templateObject24(), function (props) {
|
|
846
|
+
var OptionContent = _styledComponents["default"].span(_templateObject24 || (_templateObject24 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n overflow: hidden;\n ", "\n"])), function (props) {
|
|
1120
847
|
return props.grouped && !props.multiple && !props.hasIcon ? "padding-left: 16px;" : "padding-left: 8px;";
|
|
1121
848
|
});
|
|
1122
849
|
|
|
1123
|
-
var OptionIcon = _styledComponents["default"].span(_templateObject25(), function (props) {
|
|
850
|
+
var OptionIcon = _styledComponents["default"].span(_templateObject25 || (_templateObject25 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 24px;\n width: 24px;\n ", "\n color: ", ";\n"])), function (props) {
|
|
1124
851
|
return props.grouped && !props.multiple ? "padding-left: 16px;" : "padding-left: 8px;";
|
|
1125
852
|
}, function (props) {
|
|
1126
853
|
return props.theme.listOptionIconColor;
|
|
1127
854
|
});
|
|
1128
855
|
|
|
1129
|
-
var OptionIconImg = _styledComponents["default"].img(_templateObject26());
|
|
856
|
+
var OptionIconImg = _styledComponents["default"].img(_templateObject26 || (_templateObject26 = (0, _taggedTemplateLiteral2["default"])(["\n width: 16px;\n height: 16px;\n"])));
|
|
1130
857
|
|
|
1131
|
-
var OptionLabel = _styledComponents["default"].span(_templateObject27());
|
|
858
|
+
var OptionLabel = _styledComponents["default"].span(_templateObject27 || (_templateObject27 = (0, _taggedTemplateLiteral2["default"])(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])));
|
|
1132
859
|
|
|
1133
|
-
var OptionSelectedIndicator = _styledComponents["default"].span(_templateObject28(), function (props) {
|
|
860
|
+
var OptionSelectedIndicator = _styledComponents["default"].span(_templateObject28 || (_templateObject28 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n height: 16px;\n width: 16px;\n margin-left: 4px;\n color: ", ";\n"])), function (props) {
|
|
1134
861
|
return props.theme.selectedListOptionIconColor;
|
|
1135
862
|
});
|
|
1136
863
|
|