@rescui/select 0.20.1 → 0.21.1
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/lib/_virtual/index.css.js +12 -12
- package/lib/hooks/use-options.d.ts +2 -1
- package/lib/hooks/use-options.js +94 -32
- package/lib/index.css +190 -190
- package/lib/select-searchable.js +269 -151
- package/lib/styles/common.p.module.css.js +1 -1
- package/lib/styles/form-trigger.p.module.css.js +1 -1
- package/lib/styles/list-box.p.module.css.js +1 -1
- package/package.json +9 -9
package/lib/select-searchable.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
|
-
import React, { useState, useRef } from 'react';
|
|
2
|
+
import React, { useState, useRef, useEffect, useLayoutEffect } from 'react';
|
|
3
3
|
import { useCombobox } from 'downshift';
|
|
4
4
|
import scrollIntoView from 'scroll-into-view-if-needed';
|
|
5
5
|
import { useLabelFocus } from './hooks/use-label-focus.js';
|
|
@@ -16,9 +16,11 @@ import { getOptionValue } from './utils/get-option-value.js';
|
|
|
16
16
|
import { getRealItemsCnt } from './utils/get-real-items-cnt.js';
|
|
17
17
|
import styles from './styles/common.p.module.css.js';
|
|
18
18
|
|
|
19
|
+
const NAVIGATION_KEYS = new Set(['ArrowDown', 'ArrowUp', 'Home', 'End', 'PageDown', 'PageUp']);
|
|
20
|
+
const useIsomorphicLayoutEffect = typeof window === 'undefined' ? useEffect : useLayoutEffect;
|
|
19
21
|
// eslint-disable-next-line complexity
|
|
20
22
|
function SelectSearchable(t0) {
|
|
21
|
-
const $ = c(
|
|
23
|
+
const $ = c(123);
|
|
22
24
|
let boldLabel;
|
|
23
25
|
let disableFlip;
|
|
24
26
|
let error;
|
|
@@ -156,6 +158,10 @@ function SelectSearchable(t0) {
|
|
|
156
158
|
t1 = $[24];
|
|
157
159
|
}
|
|
158
160
|
const isListBoxEmpty = t1 === 0;
|
|
161
|
+
const isHighlightAutomaticRef = useRef(false);
|
|
162
|
+
const isNextHighlightAutomaticRef = useRef(true);
|
|
163
|
+
const lastHandledFilterStringRef = useRef(filterString);
|
|
164
|
+
const lastHandledOptionsRef = useRef(flattenedOptions);
|
|
159
165
|
const hasValue = Boolean(selectedItem);
|
|
160
166
|
let t2;
|
|
161
167
|
if ($[25] !== selectedItem) {
|
|
@@ -190,32 +196,52 @@ function SelectSearchable(t0) {
|
|
|
190
196
|
baseId,
|
|
191
197
|
labelProps
|
|
192
198
|
} = useA11y(t3);
|
|
193
|
-
let
|
|
194
|
-
if ($[32] !==
|
|
195
|
-
|
|
199
|
+
let t4;
|
|
200
|
+
if ($[32] !== inputEl) {
|
|
201
|
+
t4 = expectedValue => {
|
|
202
|
+
const select = () => {
|
|
203
|
+
if (inputEl && inputEl === inputEl.ownerDocument.activeElement && inputEl.value === expectedValue) {
|
|
204
|
+
inputEl.select();
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
if (inputEl?.value === expectedValue) {
|
|
208
|
+
select();
|
|
209
|
+
} else {
|
|
210
|
+
requestAnimationFrame(select);
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
$[32] = inputEl;
|
|
214
|
+
$[33] = t4;
|
|
215
|
+
} else {
|
|
216
|
+
t4 = $[33];
|
|
217
|
+
}
|
|
218
|
+
const selectInputText = t4;
|
|
219
|
+
let t6;
|
|
220
|
+
if ($[34] !== menuEl) {
|
|
221
|
+
t6 = (listItemEl, listEl) => {
|
|
196
222
|
scrollIntoView(listItemEl, {
|
|
197
223
|
scrollMode: "if-needed",
|
|
198
224
|
block: "nearest",
|
|
199
225
|
boundary: listEl ?? menuEl
|
|
200
226
|
});
|
|
201
227
|
};
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
228
|
+
$[34] = menuEl;
|
|
229
|
+
$[35] = t6;
|
|
204
230
|
} else {
|
|
205
|
-
|
|
231
|
+
t6 = $[35];
|
|
206
232
|
}
|
|
207
|
-
let
|
|
208
|
-
if ($[
|
|
209
|
-
|
|
233
|
+
let t7;
|
|
234
|
+
if ($[36] !== onChange) {
|
|
235
|
+
t7 = t8 => {
|
|
210
236
|
const {
|
|
211
237
|
selectedItem: newSelectedItem
|
|
212
|
-
} =
|
|
238
|
+
} = t8;
|
|
213
239
|
onChange?.(newSelectedItem);
|
|
214
240
|
};
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
241
|
+
$[36] = onChange;
|
|
242
|
+
$[37] = t7;
|
|
217
243
|
} else {
|
|
218
|
-
|
|
244
|
+
t7 = $[37];
|
|
219
245
|
}
|
|
220
246
|
const {
|
|
221
247
|
isOpen,
|
|
@@ -225,13 +251,14 @@ function SelectSearchable(t0) {
|
|
|
225
251
|
getInputProps,
|
|
226
252
|
highlightedIndex,
|
|
227
253
|
getItemProps,
|
|
228
|
-
setInputValue:
|
|
254
|
+
setInputValue: t10,
|
|
255
|
+
setHighlightedIndex
|
|
229
256
|
} = useCombobox({
|
|
230
|
-
onInputValueChange(
|
|
257
|
+
onInputValueChange(t5) {
|
|
231
258
|
const {
|
|
232
259
|
inputValue,
|
|
233
260
|
type
|
|
234
|
-
} =
|
|
261
|
+
} = t5;
|
|
235
262
|
if (type === useCombobox.stateChangeTypes.InputChange) {
|
|
236
263
|
setFilterString(inputValue);
|
|
237
264
|
}
|
|
@@ -241,32 +268,43 @@ function SelectSearchable(t0) {
|
|
|
241
268
|
itemToString,
|
|
242
269
|
itemToKey: getOptionValue,
|
|
243
270
|
selectedItem,
|
|
244
|
-
scrollIntoView:
|
|
245
|
-
onSelectedItemChange:
|
|
271
|
+
scrollIntoView: t6,
|
|
272
|
+
onSelectedItemChange: t7,
|
|
246
273
|
isItemDisabled(item) {
|
|
247
274
|
return item && item.disabled;
|
|
248
275
|
},
|
|
249
|
-
|
|
276
|
+
onHighlightedIndexChange(t8) {
|
|
277
|
+
const {
|
|
278
|
+
type: type_0
|
|
279
|
+
} = t8;
|
|
280
|
+
isHighlightAutomaticRef.current = type_0 === useCombobox.stateChangeTypes.FunctionSetHighlightedIndex && isNextHighlightAutomaticRef.current;
|
|
281
|
+
},
|
|
282
|
+
onIsOpenChange(t9) {
|
|
250
283
|
const {
|
|
284
|
+
type: type_1,
|
|
251
285
|
isOpen: newIsOpen,
|
|
252
286
|
selectedItem: newSelectedItem_0,
|
|
253
287
|
inputValue: newInputValue
|
|
254
|
-
} =
|
|
288
|
+
} = t9;
|
|
255
289
|
const inputValueFromSelectedItem = itemToString(newSelectedItem_0);
|
|
256
290
|
if (newIsOpen) {
|
|
257
|
-
|
|
291
|
+
if (type_1 !== useCombobox.stateChangeTypes.InputChange) {
|
|
292
|
+
selectInputText(newInputValue);
|
|
293
|
+
}
|
|
258
294
|
} else {
|
|
295
|
+
setFilterString("");
|
|
259
296
|
if (newInputValue !== inputValueFromSelectedItem) {
|
|
260
297
|
setInputValue(inputValueFromSelectedItem);
|
|
261
298
|
}
|
|
299
|
+
selectInputText(inputValueFromSelectedItem);
|
|
262
300
|
}
|
|
263
301
|
},
|
|
264
302
|
stateReducer(state, actionAndChanges) {
|
|
265
303
|
const {
|
|
266
304
|
changes,
|
|
267
|
-
type:
|
|
305
|
+
type: type_2
|
|
268
306
|
} = actionAndChanges;
|
|
269
|
-
switch (
|
|
307
|
+
switch (type_2) {
|
|
270
308
|
case useCombobox.stateChangeTypes.InputKeyDownEscape:
|
|
271
309
|
{
|
|
272
310
|
if (!state.isOpen) {
|
|
@@ -274,6 +312,17 @@ function SelectSearchable(t0) {
|
|
|
274
312
|
}
|
|
275
313
|
return changes;
|
|
276
314
|
}
|
|
315
|
+
case useCombobox.stateChangeTypes.InputBlur:
|
|
316
|
+
{
|
|
317
|
+
if (isHighlightAutomaticRef.current) {
|
|
318
|
+
return {
|
|
319
|
+
...changes,
|
|
320
|
+
selectedItem: state.selectedItem,
|
|
321
|
+
inputValue: itemToString(state.selectedItem)
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
return changes;
|
|
325
|
+
}
|
|
277
326
|
default:
|
|
278
327
|
{
|
|
279
328
|
return changes;
|
|
@@ -281,127 +330,194 @@ function SelectSearchable(t0) {
|
|
|
281
330
|
}
|
|
282
331
|
}
|
|
283
332
|
});
|
|
284
|
-
const setInputValue =
|
|
285
|
-
let
|
|
286
|
-
if ($[
|
|
287
|
-
|
|
333
|
+
const setInputValue = t10;
|
|
334
|
+
let t11;
|
|
335
|
+
if ($[38] !== setHighlightedIndex) {
|
|
336
|
+
t11 = (index, isAutomatic) => {
|
|
337
|
+
isNextHighlightAutomaticRef.current = isAutomatic;
|
|
338
|
+
setHighlightedIndex(index);
|
|
339
|
+
};
|
|
340
|
+
$[38] = setHighlightedIndex;
|
|
341
|
+
$[39] = t11;
|
|
342
|
+
} else {
|
|
343
|
+
t11 = $[39];
|
|
344
|
+
}
|
|
345
|
+
const setHighlight = t11;
|
|
346
|
+
let t12;
|
|
347
|
+
if ($[40] !== filterString || $[41] !== flattenedOptions || $[42] !== highlightedIndex || $[43] !== isOpen || $[44] !== menuEl || $[45] !== selectedItem || $[46] !== setHighlight) {
|
|
348
|
+
t12 = () => {
|
|
349
|
+
const prevOptions = lastHandledOptionsRef.current;
|
|
350
|
+
const isQueryChanged = filterString !== lastHandledFilterStringRef.current;
|
|
351
|
+
const isOptionsChanged = flattenedOptions !== prevOptions;
|
|
352
|
+
lastHandledFilterStringRef.current = filterString;
|
|
353
|
+
lastHandledOptionsRef.current = flattenedOptions;
|
|
354
|
+
if (!isOpen || !isQueryChanged && !isOptionsChanged) {
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
const highlightedOption = prevOptions[highlightedIndex];
|
|
358
|
+
if (!isQueryChanged && highlightedOption && !isHighlightAutomaticRef.current) {
|
|
359
|
+
const highlightedValue = getOptionValue(highlightedOption);
|
|
360
|
+
setHighlight(flattenedOptions.findIndex(option => getOptionValue(option) === highlightedValue && !option.disabled), false);
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
const selectedValue = selectedItem ? getOptionValue(selectedItem) : null;
|
|
364
|
+
const targetIndex = flattenedOptions.findIndex(option_0 => filterString.length > 0 ? !option_0.disabled : getOptionValue(option_0) === selectedValue);
|
|
365
|
+
if (isQueryChanged && (filterString.length > 0 || targetIndex === -1)) {
|
|
366
|
+
menuEl?.scrollTo({
|
|
367
|
+
top: 0
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
if (targetIndex !== -1 || !isQueryChanged) {
|
|
371
|
+
setHighlight(targetIndex, true);
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
$[40] = filterString;
|
|
375
|
+
$[41] = flattenedOptions;
|
|
376
|
+
$[42] = highlightedIndex;
|
|
377
|
+
$[43] = isOpen;
|
|
378
|
+
$[44] = menuEl;
|
|
379
|
+
$[45] = selectedItem;
|
|
380
|
+
$[46] = setHighlight;
|
|
381
|
+
$[47] = t12;
|
|
382
|
+
} else {
|
|
383
|
+
t12 = $[47];
|
|
384
|
+
}
|
|
385
|
+
useIsomorphicLayoutEffect(t12);
|
|
386
|
+
let t13;
|
|
387
|
+
if ($[48] !== onChange || $[49] !== setInputValue) {
|
|
388
|
+
t13 = () => {
|
|
288
389
|
setInputValue("");
|
|
289
390
|
onChange?.(null);
|
|
290
391
|
};
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
392
|
+
$[48] = onChange;
|
|
393
|
+
$[49] = setInputValue;
|
|
394
|
+
$[50] = t13;
|
|
294
395
|
} else {
|
|
295
|
-
|
|
396
|
+
t13 = $[50];
|
|
296
397
|
}
|
|
297
|
-
const reset =
|
|
298
|
-
let
|
|
299
|
-
if ($[
|
|
300
|
-
|
|
301
|
-
$[
|
|
302
|
-
$[
|
|
398
|
+
const reset = t13;
|
|
399
|
+
let t14;
|
|
400
|
+
if ($[51] !== getToggleButtonProps) {
|
|
401
|
+
t14 = getToggleButtonProps();
|
|
402
|
+
$[51] = getToggleButtonProps;
|
|
403
|
+
$[52] = t14;
|
|
303
404
|
} else {
|
|
304
|
-
|
|
405
|
+
t14 = $[52];
|
|
305
406
|
}
|
|
306
407
|
const {
|
|
307
408
|
ref: toggleRef,
|
|
308
409
|
onClick: onToggleClick
|
|
309
|
-
} =
|
|
410
|
+
} = t14;
|
|
411
|
+
let handleNavigationKeyDown;
|
|
310
412
|
let menuProps;
|
|
311
|
-
let
|
|
312
|
-
if ($[
|
|
413
|
+
let t15;
|
|
414
|
+
if ($[53] !== getInputProps || $[54] !== getMenuProps || $[55] !== isListBoxEmpty || $[56] !== isOpen) {
|
|
313
415
|
menuProps = getMenuProps({
|
|
314
416
|
ref: setMenuEl
|
|
315
417
|
}, {
|
|
316
418
|
suppressRefError: true
|
|
317
419
|
});
|
|
318
|
-
|
|
420
|
+
let t16;
|
|
421
|
+
if ($[60] === Symbol.for("react.memo_cache_sentinel")) {
|
|
422
|
+
t16 = event => {
|
|
423
|
+
if (NAVIGATION_KEYS.has(event.key)) {
|
|
424
|
+
isHighlightAutomaticRef.current = false;
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
$[60] = t16;
|
|
428
|
+
} else {
|
|
429
|
+
t16 = $[60];
|
|
430
|
+
}
|
|
431
|
+
handleNavigationKeyDown = t16;
|
|
432
|
+
t15 = getInputProps({
|
|
319
433
|
ref: setInputEl,
|
|
320
434
|
...(isOpen && isListBoxEmpty ? {
|
|
321
435
|
"aria-activedescendant": menuProps.id
|
|
322
436
|
} : {})
|
|
323
437
|
});
|
|
324
|
-
$[
|
|
325
|
-
$[
|
|
326
|
-
$[
|
|
327
|
-
$[
|
|
328
|
-
$[
|
|
329
|
-
$[
|
|
438
|
+
$[53] = getInputProps;
|
|
439
|
+
$[54] = getMenuProps;
|
|
440
|
+
$[55] = isListBoxEmpty;
|
|
441
|
+
$[56] = isOpen;
|
|
442
|
+
$[57] = handleNavigationKeyDown;
|
|
443
|
+
$[58] = menuProps;
|
|
444
|
+
$[59] = t15;
|
|
330
445
|
} else {
|
|
331
|
-
|
|
332
|
-
|
|
446
|
+
handleNavigationKeyDown = $[57];
|
|
447
|
+
menuProps = $[58];
|
|
448
|
+
t15 = $[59];
|
|
333
449
|
}
|
|
334
|
-
const inputProps =
|
|
450
|
+
const inputProps = t15;
|
|
335
451
|
const {
|
|
336
452
|
isFocusedByLabel,
|
|
337
453
|
labelClickProps,
|
|
338
454
|
triggerFocusProps: labelFocusForTriggerProps
|
|
339
455
|
} = useLabelFocus();
|
|
340
|
-
const
|
|
341
|
-
let
|
|
342
|
-
if ($[
|
|
343
|
-
|
|
456
|
+
const t16 = filterString.length > 0;
|
|
457
|
+
let t17;
|
|
458
|
+
if ($[61] !== isLoading || $[62] !== noOptionsMessage || $[63] !== t16) {
|
|
459
|
+
t17 = getEmptyMessage({
|
|
344
460
|
isLoading,
|
|
345
|
-
isNothingFound:
|
|
461
|
+
isNothingFound: t16,
|
|
346
462
|
noOptionsMessage
|
|
347
463
|
});
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
464
|
+
$[61] = isLoading;
|
|
465
|
+
$[62] = noOptionsMessage;
|
|
466
|
+
$[63] = t16;
|
|
467
|
+
$[64] = t17;
|
|
352
468
|
} else {
|
|
353
|
-
|
|
469
|
+
t17 = $[64];
|
|
354
470
|
}
|
|
355
|
-
const emptyListMessage =
|
|
356
|
-
let
|
|
357
|
-
if ($[
|
|
358
|
-
|
|
471
|
+
const emptyListMessage = t17;
|
|
472
|
+
let t18;
|
|
473
|
+
if ($[65] !== getItemProps || $[66] !== highlightedIndex || $[67] !== menuProps || $[68] !== selectedMap) {
|
|
474
|
+
t18 = {
|
|
359
475
|
selectedMap,
|
|
360
476
|
highlightedIndex,
|
|
361
477
|
getItemProps,
|
|
362
478
|
menuProps,
|
|
363
479
|
isMulti: false
|
|
364
480
|
};
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
$[
|
|
369
|
-
$[
|
|
481
|
+
$[65] = getItemProps;
|
|
482
|
+
$[66] = highlightedIndex;
|
|
483
|
+
$[67] = menuProps;
|
|
484
|
+
$[68] = selectedMap;
|
|
485
|
+
$[69] = t18;
|
|
370
486
|
} else {
|
|
371
|
-
|
|
487
|
+
t18 = $[69];
|
|
372
488
|
}
|
|
373
|
-
const listBoxState =
|
|
374
|
-
let
|
|
375
|
-
if ($[
|
|
376
|
-
|
|
377
|
-
$[
|
|
378
|
-
$[
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
489
|
+
const listBoxState = t18;
|
|
490
|
+
let t19;
|
|
491
|
+
if ($[70] !== getLabelProps || $[71] !== labelClickProps || $[72] !== labelProps) {
|
|
492
|
+
t19 = mergeProps(labelProps, getLabelProps(), labelClickProps);
|
|
493
|
+
$[70] = getLabelProps;
|
|
494
|
+
$[71] = labelClickProps;
|
|
495
|
+
$[72] = labelProps;
|
|
496
|
+
$[73] = t19;
|
|
381
497
|
} else {
|
|
382
|
-
|
|
498
|
+
t19 = $[73];
|
|
383
499
|
}
|
|
384
|
-
let
|
|
385
|
-
if ($[
|
|
386
|
-
|
|
500
|
+
let t20;
|
|
501
|
+
if ($[74] !== flattenedOptions || $[75] !== name || $[76] !== selectedItem) {
|
|
502
|
+
t20 = /*#__PURE__*/React.createElement(HiddenSelect, {
|
|
387
503
|
name: name,
|
|
388
504
|
value: selectedItem,
|
|
389
505
|
isMultiple: false,
|
|
390
506
|
options: flattenedOptions
|
|
391
507
|
});
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
395
|
-
$[
|
|
508
|
+
$[74] = flattenedOptions;
|
|
509
|
+
$[75] = name;
|
|
510
|
+
$[76] = selectedItem;
|
|
511
|
+
$[77] = t20;
|
|
396
512
|
} else {
|
|
397
|
-
|
|
513
|
+
t20 = $[77];
|
|
398
514
|
}
|
|
399
|
-
let
|
|
400
|
-
if ($[
|
|
401
|
-
|
|
515
|
+
let t21;
|
|
516
|
+
if ($[78] !== fieldProps || $[79] !== handleNavigationKeyDown || $[80] !== hasValue || $[81] !== inputEl || $[82] !== inputProps || $[83] !== isClearable || $[84] !== isDisabled || $[85] !== isFocusedByLabel || $[86] !== isLoading || $[87] !== isOpen || $[88] !== labelFocusForTriggerProps || $[89] !== onToggleClick || $[90] !== placeholder || $[91] !== reset || $[92] !== rest || $[93] !== toggleRef) {
|
|
517
|
+
t21 = t22 => {
|
|
402
518
|
const {
|
|
403
519
|
ref: triggerRefForDropdown
|
|
404
|
-
} =
|
|
520
|
+
} = t22;
|
|
405
521
|
return /*#__PURE__*/React.createElement("div", {
|
|
406
522
|
className: styles.triggerContainer,
|
|
407
523
|
"data-open": isOpen,
|
|
@@ -411,6 +527,7 @@ function SelectSearchable(t0) {
|
|
|
411
527
|
"data-test": "select__trigger",
|
|
412
528
|
ref: triggerRefForDropdown
|
|
413
529
|
}, /*#__PURE__*/React.createElement("input", Object.assign({}, rest, mergeProps(fieldProps, inputProps, labelFocusForTriggerProps), {
|
|
530
|
+
onKeyDownCapture: handleNavigationKeyDown,
|
|
414
531
|
disabled: isDisabled ? true : undefined,
|
|
415
532
|
className: styles.searchInput,
|
|
416
533
|
placeholder: placeholder,
|
|
@@ -429,28 +546,29 @@ function SelectSearchable(t0) {
|
|
|
429
546
|
}
|
|
430
547
|
})));
|
|
431
548
|
};
|
|
432
|
-
$[
|
|
433
|
-
$[
|
|
434
|
-
$[
|
|
435
|
-
$[
|
|
436
|
-
$[
|
|
437
|
-
$[
|
|
438
|
-
$[
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
442
|
-
$[
|
|
443
|
-
$[
|
|
444
|
-
$[
|
|
445
|
-
$[
|
|
446
|
-
$[
|
|
447
|
-
$[
|
|
549
|
+
$[78] = fieldProps;
|
|
550
|
+
$[79] = handleNavigationKeyDown;
|
|
551
|
+
$[80] = hasValue;
|
|
552
|
+
$[81] = inputEl;
|
|
553
|
+
$[82] = inputProps;
|
|
554
|
+
$[83] = isClearable;
|
|
555
|
+
$[84] = isDisabled;
|
|
556
|
+
$[85] = isFocusedByLabel;
|
|
557
|
+
$[86] = isLoading;
|
|
558
|
+
$[87] = isOpen;
|
|
559
|
+
$[88] = labelFocusForTriggerProps;
|
|
560
|
+
$[89] = onToggleClick;
|
|
561
|
+
$[90] = placeholder;
|
|
562
|
+
$[91] = reset;
|
|
563
|
+
$[92] = rest;
|
|
564
|
+
$[93] = toggleRef;
|
|
565
|
+
$[94] = t21;
|
|
448
566
|
} else {
|
|
449
|
-
|
|
567
|
+
t21 = $[94];
|
|
450
568
|
}
|
|
451
|
-
let
|
|
452
|
-
if ($[
|
|
453
|
-
|
|
569
|
+
let t22;
|
|
570
|
+
if ($[95] !== disableFlip || $[96] !== emptyListMessage || $[97] !== inputEl || $[98] !== isOpen || $[99] !== listBoxItems || $[100] !== listBoxState || $[101] !== maxVisibleItems || $[102] !== mode || $[103] !== placement || $[104] !== renderInTrigger || $[105] !== size || $[106] !== t21 || $[107] !== theme) {
|
|
571
|
+
t22 = /*#__PURE__*/React.createElement(PopupContent, {
|
|
454
572
|
theme: theme,
|
|
455
573
|
size: size,
|
|
456
574
|
mode: mode,
|
|
@@ -464,58 +582,58 @@ function SelectSearchable(t0) {
|
|
|
464
582
|
maxVisibleItems: maxVisibleItems,
|
|
465
583
|
emptyListMessage: emptyListMessage,
|
|
466
584
|
listBoxItems: listBoxItems,
|
|
467
|
-
trigger:
|
|
585
|
+
trigger: t21
|
|
468
586
|
});
|
|
469
|
-
$[
|
|
470
|
-
$[
|
|
471
|
-
$[
|
|
472
|
-
$[
|
|
473
|
-
$[
|
|
474
|
-
$[
|
|
475
|
-
$[
|
|
476
|
-
$[
|
|
477
|
-
$[
|
|
478
|
-
$[
|
|
479
|
-
$[
|
|
480
|
-
$[
|
|
481
|
-
$[
|
|
482
|
-
$[
|
|
587
|
+
$[95] = disableFlip;
|
|
588
|
+
$[96] = emptyListMessage;
|
|
589
|
+
$[97] = inputEl;
|
|
590
|
+
$[98] = isOpen;
|
|
591
|
+
$[99] = listBoxItems;
|
|
592
|
+
$[100] = listBoxState;
|
|
593
|
+
$[101] = maxVisibleItems;
|
|
594
|
+
$[102] = mode;
|
|
595
|
+
$[103] = placement;
|
|
596
|
+
$[104] = renderInTrigger;
|
|
597
|
+
$[105] = size;
|
|
598
|
+
$[106] = t21;
|
|
599
|
+
$[107] = theme;
|
|
600
|
+
$[108] = t22;
|
|
483
601
|
} else {
|
|
484
|
-
|
|
602
|
+
t22 = $[108];
|
|
485
603
|
}
|
|
486
|
-
let
|
|
487
|
-
if ($[
|
|
488
|
-
|
|
604
|
+
let t23;
|
|
605
|
+
if ($[109] !== boldLabel || $[110] !== descriptionProps || $[111] !== error || $[112] !== errorMessageProps || $[113] !== isDisabled || $[114] !== label || $[115] !== note || $[116] !== reserveErrorLine || $[117] !== size || $[118] !== t19 || $[119] !== t20 || $[120] !== t22 || $[121] !== theme) {
|
|
606
|
+
t23 = /*#__PURE__*/React.createElement(FormTriggerWrapper, {
|
|
489
607
|
theme: theme,
|
|
490
608
|
size: size,
|
|
491
609
|
disabled: isDisabled,
|
|
492
610
|
label: label,
|
|
493
|
-
labelProps:
|
|
611
|
+
labelProps: t19,
|
|
494
612
|
boldLabel: boldLabel,
|
|
495
613
|
error: error,
|
|
496
614
|
reserveErrorLine: reserveErrorLine,
|
|
497
615
|
errorMessageProps: errorMessageProps,
|
|
498
616
|
note: note,
|
|
499
617
|
descriptionProps: descriptionProps
|
|
500
|
-
},
|
|
501
|
-
$[
|
|
502
|
-
$[
|
|
503
|
-
$[
|
|
504
|
-
$[
|
|
505
|
-
$[
|
|
506
|
-
$[
|
|
507
|
-
$[
|
|
508
|
-
$[
|
|
509
|
-
$[
|
|
510
|
-
$[
|
|
511
|
-
$[
|
|
512
|
-
$[
|
|
513
|
-
$[
|
|
514
|
-
$[
|
|
618
|
+
}, t20, t22);
|
|
619
|
+
$[109] = boldLabel;
|
|
620
|
+
$[110] = descriptionProps;
|
|
621
|
+
$[111] = error;
|
|
622
|
+
$[112] = errorMessageProps;
|
|
623
|
+
$[113] = isDisabled;
|
|
624
|
+
$[114] = label;
|
|
625
|
+
$[115] = note;
|
|
626
|
+
$[116] = reserveErrorLine;
|
|
627
|
+
$[117] = size;
|
|
628
|
+
$[118] = t19;
|
|
629
|
+
$[119] = t20;
|
|
630
|
+
$[120] = t22;
|
|
631
|
+
$[121] = theme;
|
|
632
|
+
$[122] = t23;
|
|
515
633
|
} else {
|
|
516
|
-
|
|
634
|
+
t23 = $[122];
|
|
517
635
|
}
|
|
518
|
-
return
|
|
636
|
+
return t23;
|
|
519
637
|
}
|
|
520
638
|
|
|
521
639
|
export { SelectSearchable };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var styles = {"themeLight":"
|
|
1
|
+
var styles = {"themeLight":"_themeLight_1sfggmu_6","themeDark":"_themeDark_1sfggmu_9","sizeS":"_sizeS_1sfggmu_13","sizeM":"_sizeM_1sfggmu_16","sizeL":"_sizeL_1sfggmu_19","classic":"_classic_1sfggmu_23","rock":"_rock_1sfggmu_26","root":"_root_1sfggmu_30","triggerContainer":"_triggerContainer_1sfggmu_36","disabled":"_disabled_1sfggmu_41","trigger":"_trigger_1sfggmu_36","error":"_error_1sfggmu_78","enabled":"_enabled_1sfggmu_83","searchable":"_searchable_1sfggmu_98","canBeMultiline":"_canBeMultiline_1sfggmu_124","triggerText":"_triggerText_1sfggmu_128","searchInput":"_searchInput_1sfggmu_129","labelNotSelected":"_labelNotSelected_1sfggmu_159","multi":"_multi_1sfggmu_211","tagsContainer":"_tagsContainer_1sfggmu_226","tag":"_tag_1sfggmu_226","filledTag":"_filledTag_1sfggmu_248","iconsWrapper":"_iconsWrapper_1sfggmu_256","toggle":"_toggle_1sfggmu_274","icon":"_icon_1sfggmu_256","clearIcon":"_clearIcon_1sfggmu_359","visuallyHidden":"_visuallyHidden_1sfggmu_421","select":"_select_1sfggmu_438","observable":"_observable_1sfggmu_460"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var styles = {"themeLight":"
|
|
1
|
+
var styles = {"themeLight":"_themeLight_1mnpx1j_6","themeDark":"_themeDark_1mnpx1j_9","sizeS":"_sizeS_1mnpx1j_13","sizeM":"_sizeM_1mnpx1j_16","sizeL":"_sizeL_1mnpx1j_19","main":"_main_1mnpx1j_23","label":"_label_1mnpx1j_27","disabled":"_disabled_1mnpx1j_33","footer":"_footer_1mnpx1j_38","errorMessage":"_errorMessage_1mnpx1j_45","error":"_error_1mnpx1j_45","note":"_note_1mnpx1j_54"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var styles = {"sizeS":"
|
|
1
|
+
var styles = {"sizeS":"_sizeS_6yifhx_6","sizeM":"_sizeM_6yifhx_9","sizeL":"_sizeL_6yifhx_12","classic":"_classic_6yifhx_16","rock":"_rock_6yifhx_26","listBox":"_listBox_6yifhx_37","item":"_item_6yifhx_53","selected":"_selected_6yifhx_91","disabled":"_disabled_6yifhx_105","checkIcon":"_checkIcon_6yifhx_112","visible":"_visible_6yifhx_119","divider":"_divider_6yifhx_126","groupHeader":"_groupHeader_6yifhx_140"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|