@rescui/select 0.18.1-RUI-297-Add-react-compiler-to-the-packages-build-8aaaed4be.39 → 0.18.1-RUI-297-Add-react-compiler-to-the-packages-build-ccd086200.40
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-a11y.d.ts +2 -2
- package/lib/hooks/use-a11y.js +6 -6
- package/lib/hooks/use-actual-size-from-css.d.ts +3 -4
- package/lib/hooks/use-actual-size-from-css.js +5 -5
- package/lib/hooks/use-primary-contrast-css-var-transfer.d.ts +2 -3
- package/lib/hooks/use-primary-contrast-css-var-transfer.js +6 -6
- package/lib/index.css +193 -193
- package/lib/multiselect.js +200 -218
- package/lib/native-select.js +114 -112
- package/lib/parts/list-box.js +86 -48
- package/lib/parts/multi-trigger.d.ts +2 -2
- package/lib/parts/multi-trigger.js +51 -37
- package/lib/parts/popup-content.d.ts +2 -2
- package/lib/parts/popup-content.js +7 -7
- package/lib/select-basic.js +158 -174
- package/lib/select-searchable.js +138 -145
- package/lib/styles/common.p.module.css.js +29 -29
- package/lib/styles/form-trigger.p.module.css.js +12 -12
- package/lib/styles/list-box.p.module.css.js +13 -13
- package/package.json +9 -9
- package/lib/hooks/use-no-memo-getter.d.ts +0 -5
- package/lib/hooks/use-no-memo-getter.js +0 -15
|
@@ -9,14 +9,14 @@ import { getOptionValue } from '../utils/get-option-value.js';
|
|
|
9
9
|
import Foldable from './foldable.js';
|
|
10
10
|
|
|
11
11
|
function MultiTrigger(t0) {
|
|
12
|
-
const $ = c(
|
|
12
|
+
const $ = c(21);
|
|
13
13
|
const {
|
|
14
14
|
selectedItems,
|
|
15
15
|
valueProps,
|
|
16
16
|
isSingleLine,
|
|
17
17
|
isDisabled,
|
|
18
18
|
placeholder,
|
|
19
|
-
|
|
19
|
+
triggerEl,
|
|
20
20
|
removeSelectedItem
|
|
21
21
|
} = t0;
|
|
22
22
|
const hasValue = selectedItems.length > 0;
|
|
@@ -50,38 +50,52 @@ function MultiTrigger(t0) {
|
|
|
50
50
|
|
|
51
51
|
let t1;
|
|
52
52
|
|
|
53
|
-
if ($[4] !== isDisabled || $[5] !== isSingleLine || $[6] !== removeSelectedItem || $[7] !== selectedItems || $[8] !==
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"data-rs-internal": "select-trigger__removable-tag",
|
|
69
|
-
wrap: !isSingleLine,
|
|
70
|
-
"aria-label": getTextFromNodes(option.label),
|
|
71
|
-
onFocus: e => {
|
|
72
|
-
if (e.target.getAttribute("tabindex") === "-1") {
|
|
73
|
-
triggerRef.current?.focus({
|
|
53
|
+
if ($[4] !== isDisabled || $[5] !== isSingleLine || $[6] !== removeSelectedItem || $[7] !== selectedItems || $[8] !== triggerEl) {
|
|
54
|
+
let t2;
|
|
55
|
+
|
|
56
|
+
if ($[10] !== isDisabled || $[11] !== isSingleLine || $[12] !== removeSelectedItem || $[13] !== triggerEl) {
|
|
57
|
+
t2 = option => {
|
|
58
|
+
const key = getOptionValue(option);
|
|
59
|
+
return /*#__PURE__*/React.createElement(RemovableTag, {
|
|
60
|
+
key: key,
|
|
61
|
+
tabIndex: -1,
|
|
62
|
+
"data-test": `selected-tag-${key}`,
|
|
63
|
+
className: styles.tag,
|
|
64
|
+
disabled: isDisabled,
|
|
65
|
+
onRemoveClick: () => {
|
|
66
|
+
removeSelectedItem(option);
|
|
67
|
+
triggerEl?.focus({
|
|
74
68
|
focusVisible: false
|
|
75
69
|
});
|
|
70
|
+
},
|
|
71
|
+
"data-rs-internal": "select-trigger__removable-tag",
|
|
72
|
+
wrap: !isSingleLine,
|
|
73
|
+
"aria-label": getTextFromNodes(option.label),
|
|
74
|
+
onFocus: e => {
|
|
75
|
+
if (e.target.getAttribute("tabindex") === "-1") {
|
|
76
|
+
triggerEl?.focus({
|
|
77
|
+
focusVisible: false
|
|
78
|
+
});
|
|
79
|
+
}
|
|
76
80
|
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
81
|
+
}, option.label);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
$[10] = isDisabled;
|
|
85
|
+
$[11] = isSingleLine;
|
|
86
|
+
$[12] = removeSelectedItem;
|
|
87
|
+
$[13] = triggerEl;
|
|
88
|
+
$[14] = t2;
|
|
89
|
+
} else {
|
|
90
|
+
t2 = $[14];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
t1 = selectedItems.map(t2);
|
|
80
94
|
$[4] = isDisabled;
|
|
81
95
|
$[5] = isSingleLine;
|
|
82
96
|
$[6] = removeSelectedItem;
|
|
83
97
|
$[7] = selectedItems;
|
|
84
|
-
$[8] =
|
|
98
|
+
$[8] = triggerEl;
|
|
85
99
|
$[9] = t1;
|
|
86
100
|
} else {
|
|
87
101
|
t1 = $[9];
|
|
@@ -90,32 +104,32 @@ function MultiTrigger(t0) {
|
|
|
90
104
|
const tags = t1;
|
|
91
105
|
let t2;
|
|
92
106
|
|
|
93
|
-
if ($[
|
|
107
|
+
if ($[15] !== isSingleLine || $[16] !== tags) {
|
|
94
108
|
t2 = isSingleLine ? /*#__PURE__*/React.createElement(Foldable, {
|
|
95
109
|
className: styles.tagsContainer,
|
|
96
110
|
renderHiddenCounter: _temp
|
|
97
111
|
}, tags) : /*#__PURE__*/React.createElement("div", {
|
|
98
112
|
className: styles.tagsContainer
|
|
99
113
|
}, tags);
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
$[
|
|
114
|
+
$[15] = isSingleLine;
|
|
115
|
+
$[16] = tags;
|
|
116
|
+
$[17] = t2;
|
|
103
117
|
} else {
|
|
104
|
-
t2 = $[
|
|
118
|
+
t2 = $[17];
|
|
105
119
|
}
|
|
106
120
|
|
|
107
121
|
let t3;
|
|
108
122
|
|
|
109
|
-
if ($[
|
|
123
|
+
if ($[18] !== t2 || $[19] !== valueProps) {
|
|
110
124
|
t3 = /*#__PURE__*/React.createElement("div", _extends({}, valueProps, {
|
|
111
125
|
className: styles.multi,
|
|
112
126
|
"data-test": "multiselect__trigger_content"
|
|
113
127
|
}), t2);
|
|
114
|
-
$[
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
128
|
+
$[18] = t2;
|
|
129
|
+
$[19] = valueProps;
|
|
130
|
+
$[20] = t3;
|
|
117
131
|
} else {
|
|
118
|
-
t3 = $[
|
|
132
|
+
t3 = $[20];
|
|
119
133
|
}
|
|
120
134
|
|
|
121
135
|
return t3;
|
|
@@ -5,7 +5,7 @@ import type { SelectMode, SelectSize, ListBoxState, ListBoxItem, Placement } fro
|
|
|
5
5
|
export type PopupContentProps = {
|
|
6
6
|
theme: Theme;
|
|
7
7
|
listBoxState: ListBoxState;
|
|
8
|
-
|
|
8
|
+
triggerEl: HTMLElement | null;
|
|
9
9
|
dropdownRef?: React.RefObject<DropdownImperativeHandle>;
|
|
10
10
|
listBoxItems?: ListBoxItem[];
|
|
11
11
|
placement: Placement;
|
|
@@ -19,4 +19,4 @@ export type PopupContentProps = {
|
|
|
19
19
|
isOpen?: boolean;
|
|
20
20
|
dropdownUpdateDep?: unknown;
|
|
21
21
|
};
|
|
22
|
-
export declare const PopupContent: ({ theme, listBoxState,
|
|
22
|
+
export declare const PopupContent: ({ theme, listBoxState, triggerEl, dropdownRef, listBoxItems, placement, size: sizeFromProps, mode, emptyListMessage, maxVisibleItems, trigger, renderInTrigger, disableFlip, isOpen, dropdownUpdateDep }: PopupContentProps) => React.JSX.Element;
|
|
@@ -12,7 +12,7 @@ const PopupContent = t0 => {
|
|
|
12
12
|
const {
|
|
13
13
|
theme,
|
|
14
14
|
listBoxState,
|
|
15
|
-
|
|
15
|
+
triggerEl,
|
|
16
16
|
dropdownRef,
|
|
17
17
|
listBoxItems,
|
|
18
18
|
placement,
|
|
@@ -28,13 +28,13 @@ const PopupContent = t0 => {
|
|
|
28
28
|
} = t0;
|
|
29
29
|
let t1;
|
|
30
30
|
|
|
31
|
-
if ($[0] !== sizeFromProps || $[1] !==
|
|
31
|
+
if ($[0] !== sizeFromProps || $[1] !== triggerEl) {
|
|
32
32
|
t1 = {
|
|
33
33
|
sizeFromProps,
|
|
34
|
-
|
|
34
|
+
triggerEl
|
|
35
35
|
};
|
|
36
36
|
$[0] = sizeFromProps;
|
|
37
|
-
$[1] =
|
|
37
|
+
$[1] = triggerEl;
|
|
38
38
|
$[2] = t1;
|
|
39
39
|
} else {
|
|
40
40
|
t1 = $[2];
|
|
@@ -46,13 +46,13 @@ const PopupContent = t0 => {
|
|
|
46
46
|
} = useActualSizeFromCss(t1);
|
|
47
47
|
let t2;
|
|
48
48
|
|
|
49
|
-
if ($[3] !== isOpen || $[4] !==
|
|
49
|
+
if ($[3] !== isOpen || $[4] !== triggerEl) {
|
|
50
50
|
t2 = {
|
|
51
51
|
isOpen,
|
|
52
|
-
|
|
52
|
+
triggerEl
|
|
53
53
|
};
|
|
54
54
|
$[3] = isOpen;
|
|
55
|
-
$[4] =
|
|
55
|
+
$[4] = triggerEl;
|
|
56
56
|
$[5] = t2;
|
|
57
57
|
} else {
|
|
58
58
|
t2 = $[5];
|
package/lib/select-basic.js
CHANGED
|
@@ -7,7 +7,6 @@ import scrollIntoView from 'scroll-into-view-if-needed';
|
|
|
7
7
|
import { useLabelFocus } from './hooks/use-label-focus.js';
|
|
8
8
|
import { useOptions } from './hooks/use-options.js';
|
|
9
9
|
import { useA11y } from './hooks/use-a11y.js';
|
|
10
|
-
import { useNoMemoGetter } from './hooks/use-no-memo-getter.js';
|
|
11
10
|
import { Icons } from './parts/icons.js';
|
|
12
11
|
import { HiddenSelect } from './parts/hidden-select.js';
|
|
13
12
|
import { FormTriggerWrapper } from './parts/form-trigger-wrapper.js';
|
|
@@ -20,7 +19,7 @@ import { getRealItemsCnt } from './utils/get-real-items-cnt.js';
|
|
|
20
19
|
import styles from './styles/common.p.module.css.js';
|
|
21
20
|
|
|
22
21
|
function SelectBasic(t0) {
|
|
23
|
-
const $ = c(
|
|
22
|
+
const $ = c(111);
|
|
24
23
|
let boldLabel;
|
|
25
24
|
let disableFlip;
|
|
26
25
|
let error;
|
|
@@ -142,9 +141,9 @@ function SelectBasic(t0) {
|
|
|
142
141
|
theme = $[22];
|
|
143
142
|
}
|
|
144
143
|
|
|
145
|
-
const
|
|
144
|
+
const [triggerEl, setTriggerEl] = React.useState(null);
|
|
146
145
|
const dropdownRef = React.useRef(null);
|
|
147
|
-
const
|
|
146
|
+
const [menuEl, setMenuEl] = React.useState(null);
|
|
148
147
|
const {
|
|
149
148
|
flattenedOptions,
|
|
150
149
|
listBoxItems
|
|
@@ -197,23 +196,24 @@ function SelectBasic(t0) {
|
|
|
197
196
|
} = useA11y(t3);
|
|
198
197
|
let t4;
|
|
199
198
|
|
|
200
|
-
if ($[31]
|
|
199
|
+
if ($[31] !== menuEl) {
|
|
201
200
|
t4 = (listItemEl, listEl) => {
|
|
202
201
|
scrollIntoView(listItemEl, {
|
|
203
202
|
scrollMode: "if-needed",
|
|
204
203
|
block: "nearest",
|
|
205
|
-
boundary: listEl ??
|
|
204
|
+
boundary: listEl ?? menuEl
|
|
206
205
|
});
|
|
207
206
|
};
|
|
208
207
|
|
|
209
|
-
$[31] =
|
|
208
|
+
$[31] = menuEl;
|
|
209
|
+
$[32] = t4;
|
|
210
210
|
} else {
|
|
211
|
-
t4 = $[
|
|
211
|
+
t4 = $[32];
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
let t5;
|
|
215
215
|
|
|
216
|
-
if ($[
|
|
216
|
+
if ($[33] !== onChange) {
|
|
217
217
|
t5 = t6 => {
|
|
218
218
|
const {
|
|
219
219
|
selectedItem: newSelectedItem
|
|
@@ -221,15 +221,15 @@ function SelectBasic(t0) {
|
|
|
221
221
|
onChange?.(newSelectedItem);
|
|
222
222
|
};
|
|
223
223
|
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
224
|
+
$[33] = onChange;
|
|
225
|
+
$[34] = t5;
|
|
226
226
|
} else {
|
|
227
|
-
t5 = $[
|
|
227
|
+
t5 = $[34];
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
let t6;
|
|
231
231
|
|
|
232
|
-
if ($[
|
|
232
|
+
if ($[35] !== baseId || $[36] !== flattenedOptions || $[37] !== selectedItem || $[38] !== t4 || $[39] !== t5) {
|
|
233
233
|
t6 = {
|
|
234
234
|
items: flattenedOptions,
|
|
235
235
|
itemToString,
|
|
@@ -244,13 +244,14 @@ function SelectBasic(t0) {
|
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
};
|
|
247
|
-
$[
|
|
248
|
-
$[
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
247
|
+
$[35] = baseId;
|
|
248
|
+
$[36] = flattenedOptions;
|
|
249
|
+
$[37] = selectedItem;
|
|
250
|
+
$[38] = t4;
|
|
251
|
+
$[39] = t5;
|
|
252
|
+
$[40] = t6;
|
|
252
253
|
} else {
|
|
253
|
-
t6 = $[
|
|
254
|
+
t6 = $[40];
|
|
254
255
|
}
|
|
255
256
|
|
|
256
257
|
const {
|
|
@@ -262,152 +263,133 @@ function SelectBasic(t0) {
|
|
|
262
263
|
getItemProps,
|
|
263
264
|
reset
|
|
264
265
|
} = useSelect(t6);
|
|
266
|
+
let menuProps;
|
|
265
267
|
let t7;
|
|
266
|
-
let t8;
|
|
267
268
|
|
|
268
|
-
if ($[
|
|
269
|
-
|
|
270
|
-
ref:
|
|
271
|
-
}
|
|
272
|
-
t8 = {
|
|
269
|
+
if ($[41] !== getMenuProps || $[42] !== getToggleButtonProps || $[43] !== isClearable || $[44] !== isListBoxEmpty || $[45] !== isOpen || $[46] !== reset) {
|
|
270
|
+
menuProps = getMenuProps({
|
|
271
|
+
ref: setMenuEl
|
|
272
|
+
}, {
|
|
273
273
|
suppressRefError: true
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
$[40] = t8;
|
|
277
|
-
} else {
|
|
278
|
-
t7 = $[39];
|
|
279
|
-
t8 = $[40];
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
const menuProps = useNoMemoGetter(getMenuProps, t7, t8);
|
|
283
|
-
let t9;
|
|
284
|
-
|
|
285
|
-
if ($[41] !== isClearable || $[42] !== isOpen || $[43] !== reset) {
|
|
286
|
-
t9 = event => {
|
|
287
|
-
if (event.ctrlKey || event.metaKey) {
|
|
288
|
-
event.preventDownshiftDefault = true;
|
|
289
|
-
return;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
if (isClearable && !isOpen && (event.key === "Backspace" || event.key === "Delete")) {
|
|
293
|
-
reset();
|
|
294
|
-
}
|
|
295
|
-
};
|
|
296
|
-
|
|
297
|
-
$[41] = isClearable;
|
|
298
|
-
$[42] = isOpen;
|
|
299
|
-
$[43] = reset;
|
|
300
|
-
$[44] = t9;
|
|
301
|
-
} else {
|
|
302
|
-
t9 = $[44];
|
|
303
|
-
}
|
|
274
|
+
});
|
|
275
|
+
let t8;
|
|
304
276
|
|
|
305
|
-
|
|
277
|
+
if ($[49] !== isClearable || $[50] !== isOpen || $[51] !== reset) {
|
|
278
|
+
t8 = event => {
|
|
279
|
+
if (event.ctrlKey || event.metaKey) {
|
|
280
|
+
event.preventDownshiftDefault = true;
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
306
283
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
284
|
+
if (isClearable && !isOpen && (event.key === "Backspace" || event.key === "Delete")) {
|
|
285
|
+
reset();
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
$[49] = isClearable;
|
|
290
|
+
$[50] = isOpen;
|
|
291
|
+
$[51] = reset;
|
|
292
|
+
$[52] = t8;
|
|
293
|
+
} else {
|
|
294
|
+
t8 = $[52];
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
t7 = getToggleButtonProps({
|
|
298
|
+
ref: setTriggerEl,
|
|
299
|
+
onKeyDown: t8,
|
|
300
|
+
...(isOpen && isListBoxEmpty ? {
|
|
301
|
+
"aria-activedescendant": menuProps.id
|
|
302
|
+
} : {})
|
|
303
|
+
});
|
|
304
|
+
$[41] = getMenuProps;
|
|
305
|
+
$[42] = getToggleButtonProps;
|
|
306
|
+
$[43] = isClearable;
|
|
307
|
+
$[44] = isListBoxEmpty;
|
|
308
|
+
$[45] = isOpen;
|
|
309
|
+
$[46] = reset;
|
|
313
310
|
$[47] = menuProps;
|
|
314
|
-
$[48] =
|
|
311
|
+
$[48] = t7;
|
|
315
312
|
} else {
|
|
316
|
-
|
|
313
|
+
menuProps = $[47];
|
|
314
|
+
t7 = $[48];
|
|
317
315
|
}
|
|
318
316
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
if ($[49] !== t10 || $[50] !== t9) {
|
|
322
|
-
t11 = {
|
|
323
|
-
ref: triggerRef,
|
|
324
|
-
onKeyDown: t9,
|
|
325
|
-
...t10
|
|
326
|
-
};
|
|
327
|
-
$[49] = t10;
|
|
328
|
-
$[50] = t9;
|
|
329
|
-
$[51] = t11;
|
|
330
|
-
} else {
|
|
331
|
-
t11 = $[51];
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
const triggerProps = useNoMemoGetter(getToggleButtonProps, t11);
|
|
335
|
-
const downshiftLabelProps = useNoMemoGetter(getLabelProps);
|
|
317
|
+
const triggerProps = t7;
|
|
336
318
|
const {
|
|
337
319
|
isFocusedByLabel,
|
|
338
320
|
labelClickProps,
|
|
339
321
|
triggerFocusProps: labelFocusForTriggerProps
|
|
340
322
|
} = useLabelFocus();
|
|
341
|
-
let
|
|
323
|
+
let t8;
|
|
342
324
|
|
|
343
|
-
if ($[
|
|
344
|
-
|
|
325
|
+
if ($[53] !== isLoading || $[54] !== noOptionsMessage) {
|
|
326
|
+
t8 = getEmptyMessage({
|
|
345
327
|
isLoading,
|
|
346
328
|
isNothingFound: false,
|
|
347
329
|
noOptionsMessage
|
|
348
330
|
});
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
331
|
+
$[53] = isLoading;
|
|
332
|
+
$[54] = noOptionsMessage;
|
|
333
|
+
$[55] = t8;
|
|
352
334
|
} else {
|
|
353
|
-
|
|
335
|
+
t8 = $[55];
|
|
354
336
|
}
|
|
355
337
|
|
|
356
|
-
const emptyListMessage =
|
|
357
|
-
let
|
|
338
|
+
const emptyListMessage = t8;
|
|
339
|
+
let t9;
|
|
358
340
|
|
|
359
|
-
if ($[
|
|
360
|
-
|
|
341
|
+
if ($[56] !== getItemProps || $[57] !== highlightedIndex || $[58] !== menuProps || $[59] !== selectedMap) {
|
|
342
|
+
t9 = {
|
|
361
343
|
selectedMap,
|
|
362
344
|
highlightedIndex,
|
|
363
345
|
getItemProps,
|
|
364
346
|
menuProps
|
|
365
347
|
};
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
$[
|
|
369
|
-
$[
|
|
370
|
-
$[
|
|
348
|
+
$[56] = getItemProps;
|
|
349
|
+
$[57] = highlightedIndex;
|
|
350
|
+
$[58] = menuProps;
|
|
351
|
+
$[59] = selectedMap;
|
|
352
|
+
$[60] = t9;
|
|
371
353
|
} else {
|
|
372
|
-
|
|
354
|
+
t9 = $[60];
|
|
373
355
|
}
|
|
374
356
|
|
|
375
|
-
const listBoxState =
|
|
376
|
-
let
|
|
357
|
+
const listBoxState = t9;
|
|
358
|
+
let t10;
|
|
377
359
|
|
|
378
|
-
if ($[
|
|
379
|
-
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
360
|
+
if ($[61] !== getLabelProps || $[62] !== labelClickProps) {
|
|
361
|
+
t10 = mergeProps(getLabelProps(), labelClickProps);
|
|
362
|
+
$[61] = getLabelProps;
|
|
363
|
+
$[62] = labelClickProps;
|
|
364
|
+
$[63] = t10;
|
|
383
365
|
} else {
|
|
384
|
-
|
|
366
|
+
t10 = $[63];
|
|
385
367
|
}
|
|
386
368
|
|
|
387
|
-
let
|
|
369
|
+
let t11;
|
|
388
370
|
|
|
389
|
-
if ($[
|
|
390
|
-
|
|
371
|
+
if ($[64] !== flattenedOptions || $[65] !== name || $[66] !== selectedItem) {
|
|
372
|
+
t11 = /*#__PURE__*/React.createElement(HiddenSelect, {
|
|
391
373
|
name: name,
|
|
392
374
|
value: selectedItem,
|
|
393
375
|
isMultiple: false,
|
|
394
376
|
options: flattenedOptions
|
|
395
377
|
});
|
|
396
|
-
$[
|
|
397
|
-
$[
|
|
398
|
-
$[
|
|
399
|
-
$[
|
|
378
|
+
$[64] = flattenedOptions;
|
|
379
|
+
$[65] = name;
|
|
380
|
+
$[66] = selectedItem;
|
|
381
|
+
$[67] = t11;
|
|
400
382
|
} else {
|
|
401
|
-
|
|
383
|
+
t11 = $[67];
|
|
402
384
|
}
|
|
403
385
|
|
|
404
|
-
let
|
|
386
|
+
let t12;
|
|
405
387
|
|
|
406
|
-
if ($[
|
|
407
|
-
|
|
388
|
+
if ($[68] !== fieldProps || $[69] !== hasValue || $[70] !== isClearable || $[71] !== isDisabled || $[72] !== isFocusedByLabel || $[73] !== isLoading || $[74] !== isOpen || $[75] !== labelFocusForTriggerProps || $[76] !== placeholder || $[77] !== reset || $[78] !== rest || $[79] !== selectedItem?.label || $[80] !== triggerEl || $[81] !== triggerProps) {
|
|
389
|
+
t12 = t13 => {
|
|
408
390
|
const {
|
|
409
391
|
ref: triggerRefForDropdown
|
|
410
|
-
} =
|
|
392
|
+
} = t13;
|
|
411
393
|
return /*#__PURE__*/React.createElement("div", {
|
|
412
394
|
className: styles.triggerContainer,
|
|
413
395
|
"data-open": isOpen,
|
|
@@ -426,7 +408,7 @@ function SelectBasic(t0) {
|
|
|
426
408
|
canHaveClearIcon: isClearable && !isDisabled && hasValue,
|
|
427
409
|
onClear: () => {
|
|
428
410
|
reset();
|
|
429
|
-
|
|
411
|
+
triggerEl?.focus({
|
|
430
412
|
focusVisible: false
|
|
431
413
|
});
|
|
432
414
|
},
|
|
@@ -434,33 +416,34 @@ function SelectBasic(t0) {
|
|
|
434
416
|
})));
|
|
435
417
|
};
|
|
436
418
|
|
|
437
|
-
$[
|
|
438
|
-
$[
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
442
|
-
$[
|
|
443
|
-
$[
|
|
444
|
-
$[
|
|
445
|
-
$[
|
|
446
|
-
$[
|
|
447
|
-
$[
|
|
448
|
-
$[
|
|
449
|
-
$[
|
|
450
|
-
$[
|
|
419
|
+
$[68] = fieldProps;
|
|
420
|
+
$[69] = hasValue;
|
|
421
|
+
$[70] = isClearable;
|
|
422
|
+
$[71] = isDisabled;
|
|
423
|
+
$[72] = isFocusedByLabel;
|
|
424
|
+
$[73] = isLoading;
|
|
425
|
+
$[74] = isOpen;
|
|
426
|
+
$[75] = labelFocusForTriggerProps;
|
|
427
|
+
$[76] = placeholder;
|
|
428
|
+
$[77] = reset;
|
|
429
|
+
$[78] = rest;
|
|
430
|
+
$[79] = selectedItem?.label;
|
|
431
|
+
$[80] = triggerEl;
|
|
432
|
+
$[81] = triggerProps;
|
|
433
|
+
$[82] = t12;
|
|
451
434
|
} else {
|
|
452
|
-
|
|
435
|
+
t12 = $[82];
|
|
453
436
|
}
|
|
454
437
|
|
|
455
|
-
let
|
|
438
|
+
let t13;
|
|
456
439
|
|
|
457
|
-
if ($[
|
|
458
|
-
|
|
440
|
+
if ($[83] !== disableFlip || $[84] !== emptyListMessage || $[85] !== isOpen || $[86] !== listBoxItems || $[87] !== listBoxState || $[88] !== maxVisibleItems || $[89] !== mode || $[90] !== placement || $[91] !== renderInTrigger || $[92] !== size || $[93] !== t12 || $[94] !== theme || $[95] !== triggerEl) {
|
|
441
|
+
t13 = /*#__PURE__*/React.createElement(PopupContent, {
|
|
459
442
|
theme: theme,
|
|
460
443
|
size: size,
|
|
461
444
|
mode: mode,
|
|
462
445
|
dropdownRef: dropdownRef,
|
|
463
|
-
|
|
446
|
+
triggerEl: triggerEl,
|
|
464
447
|
placement: placement,
|
|
465
448
|
isOpen: isOpen,
|
|
466
449
|
listBoxState: listBoxState,
|
|
@@ -469,60 +452,61 @@ function SelectBasic(t0) {
|
|
|
469
452
|
listBoxItems: listBoxItems,
|
|
470
453
|
renderInTrigger: renderInTrigger,
|
|
471
454
|
disableFlip: disableFlip,
|
|
472
|
-
trigger:
|
|
455
|
+
trigger: t12
|
|
473
456
|
});
|
|
474
|
-
$[
|
|
475
|
-
$[
|
|
476
|
-
$[
|
|
477
|
-
$[
|
|
478
|
-
$[
|
|
479
|
-
$[
|
|
480
|
-
$[
|
|
481
|
-
$[
|
|
482
|
-
$[
|
|
483
|
-
$[
|
|
484
|
-
$[
|
|
485
|
-
$[
|
|
486
|
-
$[
|
|
457
|
+
$[83] = disableFlip;
|
|
458
|
+
$[84] = emptyListMessage;
|
|
459
|
+
$[85] = isOpen;
|
|
460
|
+
$[86] = listBoxItems;
|
|
461
|
+
$[87] = listBoxState;
|
|
462
|
+
$[88] = maxVisibleItems;
|
|
463
|
+
$[89] = mode;
|
|
464
|
+
$[90] = placement;
|
|
465
|
+
$[91] = renderInTrigger;
|
|
466
|
+
$[92] = size;
|
|
467
|
+
$[93] = t12;
|
|
468
|
+
$[94] = theme;
|
|
469
|
+
$[95] = triggerEl;
|
|
470
|
+
$[96] = t13;
|
|
487
471
|
} else {
|
|
488
|
-
|
|
472
|
+
t13 = $[96];
|
|
489
473
|
}
|
|
490
474
|
|
|
491
|
-
let
|
|
475
|
+
let t14;
|
|
492
476
|
|
|
493
|
-
if ($[
|
|
494
|
-
|
|
477
|
+
if ($[97] !== boldLabel || $[98] !== descriptionProps || $[99] !== error || $[100] !== errorMessageProps || $[101] !== isDisabled || $[102] !== label || $[103] !== note || $[104] !== reserveErrorLine || $[105] !== size || $[106] !== t10 || $[107] !== t11 || $[108] !== t13 || $[109] !== theme) {
|
|
478
|
+
t14 = /*#__PURE__*/React.createElement(FormTriggerWrapper, {
|
|
495
479
|
theme: theme,
|
|
496
480
|
size: size,
|
|
497
481
|
disabled: isDisabled,
|
|
498
482
|
label: label,
|
|
499
|
-
labelProps:
|
|
483
|
+
labelProps: t10,
|
|
500
484
|
boldLabel: boldLabel,
|
|
501
485
|
error: error,
|
|
502
486
|
reserveErrorLine: reserveErrorLine,
|
|
503
487
|
errorMessageProps: errorMessageProps,
|
|
504
488
|
note: note,
|
|
505
489
|
descriptionProps: descriptionProps
|
|
506
|
-
},
|
|
507
|
-
$[
|
|
508
|
-
$[
|
|
509
|
-
$[
|
|
510
|
-
$[
|
|
511
|
-
$[
|
|
512
|
-
$[
|
|
513
|
-
$[
|
|
514
|
-
$[
|
|
515
|
-
$[
|
|
516
|
-
$[
|
|
517
|
-
$[
|
|
518
|
-
$[
|
|
519
|
-
$[
|
|
520
|
-
$[
|
|
490
|
+
}, t11, t13);
|
|
491
|
+
$[97] = boldLabel;
|
|
492
|
+
$[98] = descriptionProps;
|
|
493
|
+
$[99] = error;
|
|
494
|
+
$[100] = errorMessageProps;
|
|
495
|
+
$[101] = isDisabled;
|
|
496
|
+
$[102] = label;
|
|
497
|
+
$[103] = note;
|
|
498
|
+
$[104] = reserveErrorLine;
|
|
499
|
+
$[105] = size;
|
|
500
|
+
$[106] = t10;
|
|
501
|
+
$[107] = t11;
|
|
502
|
+
$[108] = t13;
|
|
503
|
+
$[109] = theme;
|
|
504
|
+
$[110] = t14;
|
|
521
505
|
} else {
|
|
522
|
-
|
|
506
|
+
t14 = $[110];
|
|
523
507
|
}
|
|
524
508
|
|
|
525
|
-
return
|
|
509
|
+
return t14;
|
|
526
510
|
}
|
|
527
511
|
|
|
528
512
|
export { SelectBasic };
|