@adecore/ui 0.31.12 → 0.32.0
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/dist/AccentSwatches.js +290 -13
- package/dist/Banner.js +90 -9
- package/dist/Button.js +114 -22
- package/dist/ButtonGroup.js +62 -8
- package/dist/Checkbox.js +73 -4
- package/dist/ChoiceCards.js +205 -11
- package/dist/CloseButton.js +87 -7
- package/dist/ColorSwatch.js +132 -15
- package/dist/ColorWheelPicker.js +305 -71
- package/dist/ColumnResizeHandle.js +43 -8
- package/dist/DisabledReason.js +27 -8
- package/dist/DockShell.js +144 -37
- package/dist/EmptyState.js +95 -6
- package/dist/ErrorBoundary.js +254 -31
- package/dist/Field.js +349 -31
- package/dist/FileIcon.js +67 -6
- package/dist/Icon.js +38 -6
- package/dist/IconButton.js +176 -20
- package/dist/IconPicker.js +344 -73
- package/dist/Input.js +233 -14
- package/dist/Kbd.js +150 -10
- package/dist/LazyBoundary.js +14 -5
- package/dist/ListRow.js +75 -15
- package/dist/Meter.js +108 -5
- package/dist/MiddleTruncate.js +126 -45
- package/dist/PanelEmpty.js +64 -5
- package/dist/PanelHeader.js +95 -13
- package/dist/Pill.js +114 -19
- package/dist/ProjectSwitcher.js +225 -12
- package/dist/PromptDialog.js +352 -37
- package/dist/SectionLabel.js +62 -8
- package/dist/SegmentBar.js +197 -36
- package/dist/Segmented.js +130 -23
- package/dist/Select.js +310 -19
- package/dist/SelectSearch.js +344 -29
- package/dist/Separator.js +35 -4
- package/dist/ShortcutHints.js +146 -76
- package/dist/Skeleton.js +31 -4
- package/dist/Slider.js +172 -10
- package/dist/SlidingColumn.js +194 -34
- package/dist/Spinner.js +100 -3
- package/dist/Stepper.js +232 -11
- package/dist/Surface.js +62 -8
- package/dist/Switch.js +60 -6
- package/dist/TextMenu.js +212 -17
- package/dist/Tile.js +149 -5
- package/dist/Toasts.js +391 -33
- package/dist/Tooltip.js +153 -16
- package/dist/UIProvider.js +62 -15
- package/dist/Waveform.js +362 -93
- package/dist/Wipe.js +259 -34
- package/dist/ZoomControls.js +356 -14
- package/dist/class-name.js +1 -1
- package/dist/clipboard.js +15 -17
- package/dist/context-menu/index.parts.js +1 -1
- package/dist/dialog/index.parts.js +1 -1
- package/dist/dialog/parts.js +378 -29
- package/dist/dialog-layer.js +51 -18
- package/dist/error-boundary.js +19 -19
- package/dist/error-message.js +1 -1
- package/dist/field-context.js +7 -5
- package/dist/file-icon.js +23 -21
- package/dist/file-tree/helpers.js +133 -119
- package/dist/file-tree/index.parts.js +3 -3
- package/dist/file-tree/parts.js +418 -127
- package/dist/file-tree/style.js +1 -1
- package/dist/file-tree/use-file-tree-shift.js +43 -30
- package/dist/file-tree/use-file-tree.js +60 -18
- package/dist/file-tree/use-slots.js +220 -192
- package/dist/floating.js +2 -2
- package/dist/format/datetime.js +88 -38
- package/dist/format/duration.js +59 -53
- package/dist/format/index.js +1 -1
- package/dist/format/locale.js +76 -56
- package/dist/format/number.js +77 -61
- package/dist/format/regions.js +4 -2
- package/dist/format/time-zone.js +1 -1
- package/dist/icon-button-size.js +12 -2
- package/dist/icon-picker.js +70 -61
- package/dist/index.js +57 -57
- package/dist/key-value-list/index.parts.js +1 -1
- package/dist/key-value-list/parts.js +256 -22
- package/dist/lazy-landings.js +10 -10
- package/dist/lazy.js +84 -71
- package/dist/locales/en.js +80 -80
- package/dist/locales/nl.js +80 -80
- package/dist/locales.js +10 -7
- package/dist/menu/index.parts.js +1 -1
- package/dist/menu/parts.js +882 -44
- package/dist/merge-refs.js +8 -9
- package/dist/middle-truncate.js +24 -25
- package/dist/modality.js +27 -19
- package/dist/placement.js +11 -20
- package/dist/platform.js +6 -6
- package/dist/popover/index.parts.js +1 -1
- package/dist/popover/parts.js +173 -11
- package/dist/popup-layer.js +38 -17
- package/dist/prefetch.js +78 -79
- package/dist/preview-card/index.parts.js +1 -1
- package/dist/project-switcher-row.js +153 -12
- package/dist/select-row.js +69 -5
- package/dist/select-shared.js +6 -6
- package/dist/selection.js +16 -16
- package/dist/seti-icons.js +413 -413
- package/dist/settings/ConfirmDialog.js +55 -8
- package/dist/settings/DetailHeader.js +72 -4
- package/dist/settings/MasterDetail.js +119 -7
- package/dist/settings/SettingsDialog.js +820 -80
- package/dist/settings/SettingsRow.js +205 -18
- package/dist/settings/SettingsSection.js +96 -6
- package/dist/settings/index.js +7 -7
- package/dist/settings/target.js +7 -2
- package/dist/shortcut-hints.js +73 -55
- package/dist/shortcut.js +140 -104
- package/dist/step-places.js +1 -1
- package/dist/tabs/index.parts.js +1 -1
- package/dist/tabs/overflow.js +18 -18
- package/dist/tabs/parts.js +780 -166
- package/dist/testing/dedupe.js +82 -75
- package/dist/testing/fake-source.js +12 -12
- package/dist/testing/index.js +1 -1
- package/dist/toast-store.js +65 -46
- package/dist/tree/index.parts.js +1 -1
- package/dist/tree/parts.js +721 -94
- package/dist/tree/shift.js +28 -22
- package/dist/tree/style.js +2 -2
- package/dist/tree/use-tree-shift.js +178 -117
- package/dist/useAsyncAction.js +23 -19
- package/dist/useColumnResize.js +36 -34
- package/dist/useContentSize.js +62 -18
- package/dist/useMeasuredWidth.js +14 -3
- package/dist/useNow.js +73 -30
- package/dist/wipe-split.js +14 -14
- package/dist/workspace/DropPreview.js +60 -7
- package/dist/workspace/SplitView.js +1025 -441
- package/dist/workspace/TabStrip.js +810 -191
- package/dist/workspace/Workspace.js +276 -26
- package/dist/workspace/context.js +8 -3
- package/dist/workspace/geometry.js +173 -150
- package/dist/workspace/model.js +313 -250
- package/dist/workspace/preview.js +61 -61
- package/dist/zoom.js +2 -2
- package/package.json +1 -1
- package/src/ErrorBoundary.tsx +1 -1
- package/src/Field.tsx +4 -3
- package/src/IconPicker.tsx +3 -3
- package/src/LazyBoundary.tsx +2 -0
- package/src/MiddleTruncate.tsx +2 -2
- package/src/SegmentBar.tsx +2 -2
- package/src/Toasts.tsx +3 -1
- package/src/Tooltip.tsx +7 -10
- package/src/Waveform.tsx +3 -3
- package/src/file-tree/parts.tsx +6 -9
- package/src/file-tree/use-file-tree-shift.tsx +6 -9
- package/src/lazy.tsx +4 -0
- package/src/locales/en.ts +4 -4
- package/src/locales/nl.ts +5 -5
- package/src/settings/SettingsDialog.tsx +1 -1
- package/src/tree/parts.tsx +5 -8
- package/src/useContentSize.ts +3 -3
- package/src/workspace/SplitView.tsx +2 -2
- package/src/workspace/TabStrip.tsx +2 -3
- package/src/workspace/Workspace.tsx +2 -5
package/dist/Select.js
CHANGED
|
@@ -1,33 +1,324 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { Select as BaseSelect } from '@base-ui/react/select';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { ChevronDown } from 'lucide-react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { Icon } from
|
|
7
|
-
import { MENU_LABEL } from
|
|
6
|
+
import { Icon } from "./Icon.js";
|
|
7
|
+
import { MENU_LABEL } from "./menu/parts.js";
|
|
8
8
|
import { renderPositioner } from './popup-layer.js';
|
|
9
|
-
import { RowContent } from
|
|
9
|
+
import { RowContent } from "./select-row.js";
|
|
10
10
|
import { isGroup, rowClassName, triggerClassName } from './select-shared.js';
|
|
11
|
-
import { SelectSearch } from
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
import { SelectSearch } from "./SelectSearch.js";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
function Row(t0) {
|
|
14
|
+
const $ = _c(14);
|
|
15
|
+
const {
|
|
16
|
+
item,
|
|
17
|
+
picked
|
|
18
|
+
} = t0;
|
|
19
|
+
let t1;
|
|
20
|
+
if ($[0] !== item) {
|
|
21
|
+
t1 = rowClassName(item);
|
|
22
|
+
$[0] = item;
|
|
23
|
+
$[1] = t1;
|
|
24
|
+
} else {
|
|
25
|
+
t1 = $[1];
|
|
26
|
+
}
|
|
27
|
+
let t2;
|
|
28
|
+
if ($[2] !== item.label) {
|
|
29
|
+
t2 = /*#__PURE__*/_jsx(BaseSelect.ItemText, {
|
|
30
|
+
children: item.label
|
|
31
|
+
});
|
|
32
|
+
$[2] = item.label;
|
|
33
|
+
$[3] = t2;
|
|
34
|
+
} else {
|
|
35
|
+
t2 = $[3];
|
|
36
|
+
}
|
|
37
|
+
let t3;
|
|
38
|
+
if ($[4] !== item || $[5] !== picked || $[6] !== t2) {
|
|
39
|
+
t3 = /*#__PURE__*/_jsx(RowContent, {
|
|
40
|
+
item: item,
|
|
41
|
+
picked: picked,
|
|
42
|
+
text: t2
|
|
43
|
+
});
|
|
44
|
+
$[4] = item;
|
|
45
|
+
$[5] = picked;
|
|
46
|
+
$[6] = t2;
|
|
47
|
+
$[7] = t3;
|
|
48
|
+
} else {
|
|
49
|
+
t3 = $[7];
|
|
50
|
+
}
|
|
51
|
+
let t4;
|
|
52
|
+
if ($[8] !== item.disabled || $[9] !== item.label || $[10] !== item.value || $[11] !== t1 || $[12] !== t3) {
|
|
53
|
+
t4 = /*#__PURE__*/_jsx(BaseSelect.Item, {
|
|
54
|
+
className: t1,
|
|
55
|
+
value: item.value,
|
|
56
|
+
label: item.label,
|
|
57
|
+
disabled: item.disabled,
|
|
58
|
+
children: t3
|
|
59
|
+
});
|
|
60
|
+
$[8] = item.disabled;
|
|
61
|
+
$[9] = item.label;
|
|
62
|
+
$[10] = item.value;
|
|
63
|
+
$[11] = t1;
|
|
64
|
+
$[12] = t3;
|
|
65
|
+
$[13] = t4;
|
|
66
|
+
} else {
|
|
67
|
+
t4 = $[13];
|
|
68
|
+
}
|
|
69
|
+
return t4;
|
|
14
70
|
}
|
|
15
71
|
/* The one select. A Base UI `Select` in the popup style the menus use, so a settings field and a
|
|
16
72
|
picker in a toolbar read the same. Base UI brings the keyboard along (arrows,
|
|
17
73
|
Home and End, typeahead, Enter, Escape), which a hand-rolled listbox would have to repeat.
|
|
18
74
|
A long list can ask for a search field, which swaps in a combobox with the same trigger and rows. */
|
|
19
75
|
export function Select(props) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
76
|
+
const $ = _c(5);
|
|
77
|
+
const {
|
|
78
|
+
searchable,
|
|
79
|
+
items
|
|
80
|
+
} = props;
|
|
81
|
+
let t0;
|
|
82
|
+
if ($[0] !== items) {
|
|
83
|
+
t0 = items.length > 0 && isGroup(items[0]) ? items.reduce(_temp, 0) : items.length;
|
|
84
|
+
$[0] = items;
|
|
85
|
+
$[1] = t0;
|
|
86
|
+
} else {
|
|
87
|
+
t0 = $[1];
|
|
88
|
+
}
|
|
89
|
+
const count = t0;
|
|
90
|
+
const search = searchable === true || typeof searchable === "number" && count >= searchable;
|
|
91
|
+
let t1;
|
|
92
|
+
if ($[2] !== props || $[3] !== search) {
|
|
93
|
+
t1 = search ? /*#__PURE__*/_jsx(SelectSearch, {
|
|
94
|
+
...props
|
|
95
|
+
}) : /*#__PURE__*/_jsx(PlainSelect, {
|
|
96
|
+
...props
|
|
97
|
+
});
|
|
98
|
+
$[2] = props;
|
|
99
|
+
$[3] = search;
|
|
100
|
+
$[4] = t1;
|
|
101
|
+
} else {
|
|
102
|
+
t1 = $[4];
|
|
103
|
+
}
|
|
104
|
+
return t1;
|
|
105
|
+
}
|
|
106
|
+
function _temp(sum, group) {
|
|
107
|
+
return sum + group.items.length;
|
|
108
|
+
}
|
|
109
|
+
function PlainSelect(t0) {
|
|
110
|
+
const $ = _c(46);
|
|
111
|
+
const {
|
|
112
|
+
value,
|
|
113
|
+
onValueChange,
|
|
114
|
+
items,
|
|
115
|
+
label,
|
|
116
|
+
placeholder,
|
|
117
|
+
size: t1,
|
|
118
|
+
variant: t2,
|
|
119
|
+
disabled,
|
|
120
|
+
align: t3,
|
|
121
|
+
truncateValue: t4,
|
|
122
|
+
className,
|
|
123
|
+
ref
|
|
124
|
+
} = t0;
|
|
125
|
+
const size = t1 === undefined ? "md" : t1;
|
|
126
|
+
const variant = t2 === undefined ? "outlined" : t2;
|
|
127
|
+
const align = t3 === undefined ? "start" : t3;
|
|
128
|
+
const truncateValue = t4 === undefined ? true : t4;
|
|
129
|
+
const {
|
|
130
|
+
t
|
|
131
|
+
} = useTranslation("ui");
|
|
132
|
+
const groups = items.length > 0 && isGroup(items[0]) ? items : null;
|
|
133
|
+
let t5;
|
|
134
|
+
if ($[0] !== groups || $[1] !== items) {
|
|
135
|
+
t5 = groups ? groups.flatMap(_temp2) : items;
|
|
136
|
+
$[0] = groups;
|
|
137
|
+
$[1] = items;
|
|
138
|
+
$[2] = t5;
|
|
139
|
+
} else {
|
|
140
|
+
t5 = $[2];
|
|
141
|
+
}
|
|
142
|
+
const flat = t5;
|
|
143
|
+
let t6;
|
|
144
|
+
if ($[3] !== flat || $[4] !== value) {
|
|
145
|
+
t6 = flat.find(item => item.value === value) ?? null;
|
|
146
|
+
$[3] = flat;
|
|
147
|
+
$[4] = value;
|
|
148
|
+
$[5] = t6;
|
|
149
|
+
} else {
|
|
150
|
+
t6 = $[5];
|
|
151
|
+
}
|
|
152
|
+
const selected = t6;
|
|
153
|
+
let t7;
|
|
154
|
+
if ($[6] !== flat) {
|
|
155
|
+
t7 = flat.map(_temp3);
|
|
156
|
+
$[6] = flat;
|
|
157
|
+
$[7] = t7;
|
|
158
|
+
} else {
|
|
159
|
+
t7 = $[7];
|
|
160
|
+
}
|
|
161
|
+
let t8;
|
|
162
|
+
if ($[8] !== onValueChange) {
|
|
163
|
+
t8 = next => onValueChange(next);
|
|
164
|
+
$[8] = onValueChange;
|
|
165
|
+
$[9] = t8;
|
|
166
|
+
} else {
|
|
167
|
+
t8 = $[9];
|
|
168
|
+
}
|
|
169
|
+
let t9;
|
|
170
|
+
if ($[10] !== className || $[11] !== size || $[12] !== variant) {
|
|
171
|
+
t9 = triggerClassName(size, variant, className);
|
|
172
|
+
$[10] = className;
|
|
173
|
+
$[11] = size;
|
|
174
|
+
$[12] = variant;
|
|
175
|
+
$[13] = t9;
|
|
176
|
+
} else {
|
|
177
|
+
t9 = $[13];
|
|
178
|
+
}
|
|
179
|
+
const t10 = selected?.icon;
|
|
180
|
+
const t11 = truncateValue && "truncate";
|
|
181
|
+
let t12;
|
|
182
|
+
if ($[14] !== t11) {
|
|
183
|
+
t12 = clsx(t11);
|
|
184
|
+
$[14] = t11;
|
|
185
|
+
$[15] = t12;
|
|
186
|
+
} else {
|
|
187
|
+
t12 = $[15];
|
|
188
|
+
}
|
|
189
|
+
let t13;
|
|
190
|
+
if ($[16] !== placeholder || $[17] !== selected?.label || $[18] !== t) {
|
|
191
|
+
t13 = () => selected?.label ?? placeholder ?? t("action.select");
|
|
192
|
+
$[16] = placeholder;
|
|
193
|
+
$[17] = selected?.label;
|
|
194
|
+
$[18] = t;
|
|
195
|
+
$[19] = t13;
|
|
196
|
+
} else {
|
|
197
|
+
t13 = $[19];
|
|
198
|
+
}
|
|
199
|
+
let t14;
|
|
200
|
+
if ($[20] !== t12 || $[21] !== t13) {
|
|
201
|
+
t14 = /*#__PURE__*/_jsx(BaseSelect.Value, {
|
|
202
|
+
className: t12,
|
|
203
|
+
children: t13
|
|
204
|
+
});
|
|
205
|
+
$[20] = t12;
|
|
206
|
+
$[21] = t13;
|
|
207
|
+
$[22] = t14;
|
|
208
|
+
} else {
|
|
209
|
+
t14 = $[22];
|
|
210
|
+
}
|
|
211
|
+
let t15;
|
|
212
|
+
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
213
|
+
t15 = /*#__PURE__*/_jsx(BaseSelect.Icon, {
|
|
214
|
+
className: "ml-auto flex shrink-0 pl-1",
|
|
215
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
216
|
+
icon: ChevronDown,
|
|
217
|
+
size: 14
|
|
218
|
+
})
|
|
219
|
+
});
|
|
220
|
+
$[23] = t15;
|
|
221
|
+
} else {
|
|
222
|
+
t15 = $[23];
|
|
223
|
+
}
|
|
224
|
+
let t16;
|
|
225
|
+
if ($[24] !== label || $[25] !== ref || $[26] !== t10 || $[27] !== t14 || $[28] !== t9) {
|
|
226
|
+
t16 = /*#__PURE__*/_jsxs(BaseSelect.Trigger, {
|
|
227
|
+
ref: ref,
|
|
228
|
+
"aria-label": label,
|
|
229
|
+
className: t9,
|
|
230
|
+
children: [t10, t14, t15]
|
|
231
|
+
});
|
|
232
|
+
$[24] = label;
|
|
233
|
+
$[25] = ref;
|
|
234
|
+
$[26] = t10;
|
|
235
|
+
$[27] = t14;
|
|
236
|
+
$[28] = t9;
|
|
237
|
+
$[29] = t16;
|
|
238
|
+
} else {
|
|
239
|
+
t16 = $[29];
|
|
240
|
+
}
|
|
241
|
+
let t17;
|
|
242
|
+
if ($[30] !== flat || $[31] !== groups || $[32] !== value) {
|
|
243
|
+
t17 = groups ? groups.map(group_0 => /*#__PURE__*/_jsxs(BaseSelect.Group, {
|
|
244
|
+
children: [/*#__PURE__*/_jsx(BaseSelect.GroupLabel, {
|
|
245
|
+
className: MENU_LABEL,
|
|
246
|
+
children: group_0.label
|
|
247
|
+
}), group_0.items.map(item_1 => /*#__PURE__*/_jsx(Row, {
|
|
248
|
+
item: item_1,
|
|
249
|
+
picked: item_1.value === value
|
|
250
|
+
}, item_1.value))]
|
|
251
|
+
}, group_0.label)) : flat.map(item_2 => /*#__PURE__*/_jsx(Row, {
|
|
252
|
+
item: item_2,
|
|
253
|
+
picked: item_2.value === value
|
|
254
|
+
}, item_2.value));
|
|
255
|
+
$[30] = flat;
|
|
256
|
+
$[31] = groups;
|
|
257
|
+
$[32] = value;
|
|
258
|
+
$[33] = t17;
|
|
259
|
+
} else {
|
|
260
|
+
t17 = $[33];
|
|
261
|
+
}
|
|
262
|
+
let t18;
|
|
263
|
+
if ($[34] !== t17) {
|
|
264
|
+
t18 = /*#__PURE__*/_jsx(BaseSelect.Popup, {
|
|
265
|
+
className: "menu-popup",
|
|
266
|
+
children: /*#__PURE__*/_jsx(BaseSelect.List, {
|
|
267
|
+
className: "max-h-80 overflow-auto",
|
|
268
|
+
children: t17
|
|
269
|
+
})
|
|
270
|
+
});
|
|
271
|
+
$[34] = t17;
|
|
272
|
+
$[35] = t18;
|
|
273
|
+
} else {
|
|
274
|
+
t18 = $[35];
|
|
275
|
+
}
|
|
276
|
+
let t19;
|
|
277
|
+
if ($[36] !== align || $[37] !== t18) {
|
|
278
|
+
t19 = /*#__PURE__*/_jsx(BaseSelect.Portal, {
|
|
279
|
+
children: /*#__PURE__*/_jsx(BaseSelect.Positioner, {
|
|
280
|
+
className: "popup-positioner",
|
|
281
|
+
render: renderPositioner,
|
|
282
|
+
side: "bottom",
|
|
283
|
+
align: align,
|
|
284
|
+
sideOffset: 6,
|
|
285
|
+
alignItemWithTrigger: false,
|
|
286
|
+
children: t18
|
|
287
|
+
})
|
|
288
|
+
});
|
|
289
|
+
$[36] = align;
|
|
290
|
+
$[37] = t18;
|
|
291
|
+
$[38] = t19;
|
|
292
|
+
} else {
|
|
293
|
+
t19 = $[38];
|
|
294
|
+
}
|
|
295
|
+
let t20;
|
|
296
|
+
if ($[39] !== disabled || $[40] !== t16 || $[41] !== t19 || $[42] !== t7 || $[43] !== t8 || $[44] !== value) {
|
|
297
|
+
t20 = /*#__PURE__*/_jsxs(BaseSelect.Root, {
|
|
298
|
+
items: t7,
|
|
299
|
+
value: value,
|
|
300
|
+
disabled: disabled,
|
|
301
|
+
onValueChange: t8,
|
|
302
|
+
children: [t16, t19]
|
|
303
|
+
});
|
|
304
|
+
$[39] = disabled;
|
|
305
|
+
$[40] = t16;
|
|
306
|
+
$[41] = t19;
|
|
307
|
+
$[42] = t7;
|
|
308
|
+
$[43] = t8;
|
|
309
|
+
$[44] = value;
|
|
310
|
+
$[45] = t20;
|
|
311
|
+
} else {
|
|
312
|
+
t20 = $[45];
|
|
313
|
+
}
|
|
314
|
+
return t20;
|
|
24
315
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return (_jsxs(BaseSelect.Root, { items: flat.map((item) => ({ value: item.value, label: item.label })), value: value, disabled: disabled, onValueChange: (next) => onValueChange(next), children: [_jsxs(BaseSelect.Trigger, { ref: ref, "aria-label": label, className: triggerClassName(size, variant, className), children: [selected?.icon, _jsx(BaseSelect.Value, { className: clsx(truncateValue && 'truncate'), children: () => selected?.label ?? placeholder ?? t('action.select') }), _jsx(BaseSelect.Icon, { className: "ml-auto flex shrink-0 pl-1", children: _jsx(Icon, { icon: ChevronDown, size: 14 }) })] }), _jsx(BaseSelect.Portal, { children: _jsx(BaseSelect.Positioner, { className: "popup-positioner", render: renderPositioner, side: "bottom", align: align, sideOffset: 6, alignItemWithTrigger: false, children: _jsx(BaseSelect.Popup, { className: "menu-popup", children: _jsx(BaseSelect.List, { className: "max-h-80 overflow-auto", children: groups
|
|
31
|
-
? groups.map((group) => (_jsxs(BaseSelect.Group, { children: [_jsx(BaseSelect.GroupLabel, { className: MENU_LABEL, children: group.label }), group.items.map((item) => (_jsx(Row, { item: item, picked: item.value === value }, item.value)))] }, group.label)))
|
|
32
|
-
: flat.map((item) => _jsx(Row, { item: item, picked: item.value === value }, item.value)) }) }) }) })] }));
|
|
316
|
+
function _temp3(item_0) {
|
|
317
|
+
return {
|
|
318
|
+
value: item_0.value,
|
|
319
|
+
label: item_0.label
|
|
320
|
+
};
|
|
33
321
|
}
|
|
322
|
+
function _temp2(group) {
|
|
323
|
+
return group.items;
|
|
324
|
+
}
|