impact-nova 2.2.1 → 2.2.3
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/components/data/ag-grid-react/ag-grid-header-dom.d.ts +8 -0
- package/dist/components/data/ag-grid-react/ag-grid-header-dom.js +11 -0
- package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.d.ts +4 -1
- package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.js +14 -3
- package/dist/components/data/ag-grid-react/headers/column-menu/column-header-settings-menu.d.ts +19 -0
- package/dist/components/data/ag-grid-react/headers/column-menu/column-header-settings-menu.js +74 -0
- package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.d.ts +4 -5
- package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.js +110 -144
- package/dist/components/data/ag-grid-react/headers/components/header-info.d.ts +2 -1
- package/dist/components/data/ag-grid-react/headers/components/header-info.js +73 -70
- package/dist/components/data/ag-grid-react/headers/context/grid-header-context.d.ts +0 -8
- package/dist/components/data/ag-grid-react/headers/custom-header.js +112 -118
- package/dist/components/data/ag-grid-react/headers/custom-inner-header-group.js +27 -23
- package/dist/components/data/ag-grid-react/headers/resolve-header-info-params.d.ts +10 -0
- package/dist/components/data/ag-grid-react/headers/resolve-header-info-params.js +19 -0
- package/dist/components/data/ag-grid-react/index.js +169 -210
- package/dist/components/data/ag-grid-react/info-system-story-columns.d.ts +12 -0
- package/dist/components/data/ag-grid-react/merge-column-group-defs.d.ts +3 -0
- package/dist/components/data/ag-grid-react/merge-column-group-defs.js +27 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.d.ts +2 -1
- package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.js +7 -7
- package/dist/components/data/data-table/data-table-view-menu.d.ts +1 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +6 -7
- package/dist/components/data-display/calendar/calendar-day-picker-view.d.ts +3 -2
- package/dist/components/data-display/calendar/calendar-day-picker-view.js +70 -68
- package/dist/components/data-display/calendar/calendar-week-number-cell.js +29 -29
- package/dist/components/data-display/calendar/calendar.js +96 -94
- package/dist/components/data-display/calendar/calendar.types.d.ts +2 -0
- package/dist/components/feedback/dialog/dialog.js +107 -61
- package/dist/components/feedback/dropdown-menu/dropdown-menu.d.ts +1 -0
- package/dist/components/feedback/dropdown-menu/dropdown-menu.js +83 -76
- package/dist/components/feedback/popover/popover.d.ts +5 -2
- package/dist/components/feedback/popover/popover.js +43 -40
- package/dist/components/feedback/sheet/sheet.js +149 -102
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +2 -3
- package/dist/components/flows/filter-panel/filter-panel.js +79 -76
- package/dist/components/forms/date-picker/date-input-behavior.d.ts +10 -4
- package/dist/components/forms/date-picker/date-input-behavior.js +86 -67
- package/dist/components/forms/date-picker/date-picker.js +59 -52
- package/dist/components/forms/date-picker/date-range-picker.js +26 -25
- package/dist/components/forms/date-picker/month-picker.js +76 -69
- package/dist/components/forms/date-picker/month-range-picker.js +41 -40
- package/dist/components/forms/date-picker/multi-date-picker.js +31 -31
- package/dist/components/forms/date-picker/multi-month-picker.js +27 -27
- package/dist/components/forms/date-picker/multi-week-picker.js +37 -37
- package/dist/components/forms/date-picker/week-picker.js +85 -78
- package/dist/components/forms/date-picker/week-range-picker.js +67 -66
- package/dist/components/forms/select/components/SelectMenuPanel.js +19 -15
- package/dist/components/forms/select/components/SelectOptionRow.js +110 -90
- package/dist/components/forms/select/components/Submenu.js +39 -34
- package/dist/components/forms/select/hooks/useSelectOpenEffects.js +65 -70
- package/dist/components/forms/select/select.js +228 -223
- package/dist/components/forms/select/select.types.d.ts +8 -0
- package/dist/impact-nova-components.css +59 -15
- package/dist/impact-nova.css +1 -1
- package/dist/lib/overlay/merge-element-refs.d.ts +2 -0
- package/dist/lib/overlay/merge-element-refs.js +17 -0
- package/dist/lib/overlay/overlay-host.constants.d.ts +4 -0
- package/dist/lib/overlay/overlay-host.constants.js +5 -0
- package/dist/lib/overlay/overlay-portal-context.d.ts +26 -0
- package/dist/lib/overlay/overlay-portal-context.js +65 -0
- package/dist/lib/overlay/use-overlay-portal-container-state.d.ts +5 -0
- package/dist/lib/overlay/use-overlay-portal-container-state.js +13 -0
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +23 -8
- package/dist/components/forms/select/components/LabelWithSequence.d.ts +0 -13
- package/dist/components/forms/select/components/LabelWithSequence.js +0 -18
|
@@ -1,129 +1,134 @@
|
|
|
1
|
-
import { jsx as u, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import * as
|
|
1
|
+
import { jsx as u, jsxs as te } from "react/jsx-runtime";
|
|
2
|
+
import mt, { useState as A, useRef as S } from "react";
|
|
3
|
+
import * as le from "@radix-ui/react-popover";
|
|
4
4
|
import { useVirtualizer as dt } from "@tanstack/react-virtual";
|
|
5
|
-
import { SelectMenuFooter as
|
|
6
|
-
import { SelectMenuHeader as
|
|
7
|
-
import { SelectMenuListBody as
|
|
8
|
-
import { SelectMenuPanel as
|
|
9
|
-
import { SelectTrigger as
|
|
10
|
-
import { cn as
|
|
11
|
-
import { useFieldChrome as
|
|
12
|
-
import { isOptionArray as
|
|
13
|
-
import { useImpactNovaI18n as
|
|
14
|
-
import { useFlattenOptions as
|
|
5
|
+
import { SelectMenuFooter as ft } from "./components/SelectMenuFooter.js";
|
|
6
|
+
import { SelectMenuHeader as pt } from "./components/SelectMenuHeader.js";
|
|
7
|
+
import { SelectMenuListBody as St } from "./components/SelectMenuListBody.js";
|
|
8
|
+
import { SelectMenuPanel as ht } from "./components/SelectMenuPanel.js";
|
|
9
|
+
import { SelectTrigger as gt } from "./components/SelectTrigger.js";
|
|
10
|
+
import { cn as oe } from "../../../lib/utils.js";
|
|
11
|
+
import { useFieldChrome as bt } from "../../../lib/primitives/use-field-chrome.js";
|
|
12
|
+
import { isOptionArray as Ot, getSequence as Mt } from "./utils/select.js";
|
|
13
|
+
import { useImpactNovaI18n as Ct } from "../../../i18n/use-impact-nova-i18n.js";
|
|
14
|
+
import { useFlattenOptions as yt } from "./hooks/useFlattenOptions.js";
|
|
15
15
|
import { useSelectKeyboardHandlers as It } from "./hooks/useSelectKeyboardHandlers.js";
|
|
16
|
-
import { useSelectValueState as
|
|
17
|
-
import { useSelectMenuHeight as
|
|
18
|
-
import { useSelectMenuScroll as
|
|
16
|
+
import { useSelectValueState as vt } from "./hooks/useSelectValueState.js";
|
|
17
|
+
import { useSelectMenuHeight as Lt } from "./hooks/useSelectMenuHeight.js";
|
|
18
|
+
import { useSelectMenuScroll as Vt } from "./hooks/useSelectMenuScroll.js";
|
|
19
19
|
import { useSelectOpenEffects as xt } from "./hooks/useSelectOpenEffects.js";
|
|
20
|
-
import { useSelectOutsideScrollLock as
|
|
21
|
-
import { useSelectSearchFocus as
|
|
22
|
-
import { useSelectSelectionHandlers as
|
|
20
|
+
import { useSelectOutsideScrollLock as At } from "./hooks/useSelectOutsideScrollLock.js";
|
|
21
|
+
import { useSelectSearchFocus as Rt } from "./hooks/useSelectSearchFocus.js";
|
|
22
|
+
import { useSelectSelectionHandlers as wt } from "./hooks/useSelectSelectionHandlers.js";
|
|
23
23
|
import { useSelectionModel as Pt } from "./hooks/useSelectionModel.js";
|
|
24
|
-
import { useVisibleStats as
|
|
24
|
+
import { useVisibleStats as Dt } from "./hooks/useVisibleStats.js";
|
|
25
|
+
import { useOverlayNestedLayerDismiss as Nt } from "../../../lib/overlay/overlay-portal-context.js";
|
|
25
26
|
import { SELECT_ALL_INDEX as qt } from "./select.constants.js";
|
|
26
|
-
import { getSelectableOptionIndices as
|
|
27
|
-
function
|
|
27
|
+
import { getSelectableOptionIndices as Et } from "./utils/getSelectableOptionIndices.js";
|
|
28
|
+
function ne(R) {
|
|
28
29
|
const {
|
|
29
30
|
options: C,
|
|
30
|
-
value:
|
|
31
|
-
defaultValue:
|
|
32
|
-
onChange:
|
|
33
|
-
isMulti:
|
|
34
|
-
multiple:
|
|
35
|
-
isDisabled:
|
|
36
|
-
disabled:
|
|
37
|
-
isLoading:
|
|
38
|
-
isClearable:
|
|
31
|
+
value: se,
|
|
32
|
+
defaultValue: re,
|
|
33
|
+
onChange: T,
|
|
34
|
+
isMulti: ie,
|
|
35
|
+
multiple: ae,
|
|
36
|
+
isDisabled: ce,
|
|
37
|
+
disabled: ue,
|
|
38
|
+
isLoading: i,
|
|
39
|
+
isClearable: me = !0,
|
|
39
40
|
isSearchable: h = !0,
|
|
40
41
|
placeholder: de,
|
|
41
42
|
// menuPortalTarget is kept for API compatibility but no longer used (Radix handles portalling)
|
|
42
|
-
menuPortalTarget:
|
|
43
|
-
autoFocus:
|
|
44
|
-
closeMenuOnSelect:
|
|
45
|
-
defaultMenuIsOpen:
|
|
46
|
-
scrollToSelectedOnOpen:
|
|
43
|
+
menuPortalTarget: Tt,
|
|
44
|
+
autoFocus: fe,
|
|
45
|
+
closeMenuOnSelect: pe,
|
|
46
|
+
defaultMenuIsOpen: Se = !1,
|
|
47
|
+
scrollToSelectedOnOpen: he = !1,
|
|
47
48
|
maxSelectableOptions: g,
|
|
48
|
-
showSequence:
|
|
49
|
-
selectionOrder:
|
|
50
|
-
label:
|
|
51
|
-
required:
|
|
52
|
-
isRequired:
|
|
53
|
-
error:
|
|
54
|
-
helperText:
|
|
55
|
-
helperTextPosition:
|
|
56
|
-
id:
|
|
49
|
+
showSequence: H,
|
|
50
|
+
selectionOrder: ge,
|
|
51
|
+
label: m,
|
|
52
|
+
required: be,
|
|
53
|
+
isRequired: Oe,
|
|
54
|
+
error: Me,
|
|
55
|
+
helperText: Ce,
|
|
56
|
+
helperTextPosition: ye = "absolute",
|
|
57
|
+
id: d,
|
|
57
58
|
className: Ie,
|
|
58
|
-
parentClassName:
|
|
59
|
-
onMenuScrollToBottom:
|
|
60
|
-
|
|
59
|
+
parentClassName: ve,
|
|
60
|
+
onMenuScrollToBottom: Le,
|
|
61
|
+
estimateRowSize: y,
|
|
62
|
+
totalCount: Ve,
|
|
61
63
|
name: xe,
|
|
62
|
-
isSelectAllEnabled:
|
|
64
|
+
isSelectAllEnabled: w = !0,
|
|
63
65
|
isReadOnly: n = !1,
|
|
64
66
|
searchPosition: b = "menu",
|
|
65
|
-
footerContent:
|
|
66
|
-
onInputChange:
|
|
67
|
+
footerContent: z,
|
|
68
|
+
onInputChange: Ae,
|
|
67
69
|
getOptionLabel: B,
|
|
68
|
-
renderOption:
|
|
69
|
-
onMenuOpen:
|
|
70
|
+
renderOption: Re,
|
|
71
|
+
onMenuOpen: we,
|
|
70
72
|
onMenuClose: K,
|
|
71
|
-
labelOrientation:
|
|
73
|
+
labelOrientation: $ = "top",
|
|
72
74
|
size: Pe = "default",
|
|
73
|
-
leftContent:
|
|
74
|
-
ignoreCase:
|
|
75
|
-
ignoreAccents:
|
|
75
|
+
leftContent: De,
|
|
76
|
+
ignoreCase: Ne,
|
|
77
|
+
ignoreAccents: qe,
|
|
76
78
|
matchFrom: Ee,
|
|
77
79
|
stringify: Fe,
|
|
78
|
-
trim:
|
|
79
|
-
filterOption:
|
|
80
|
+
trim: Te,
|
|
81
|
+
filterOption: He,
|
|
80
82
|
enableSubMenus: I = !1,
|
|
81
|
-
enableGroups:
|
|
82
|
-
enableInvertedSelection:
|
|
83
|
-
fetchError:
|
|
83
|
+
enableGroups: P = !1,
|
|
84
|
+
enableInvertedSelection: ze,
|
|
85
|
+
fetchError: v,
|
|
84
86
|
onRefetch: Be,
|
|
85
87
|
menuWidth: Ke,
|
|
86
|
-
onClearAll:
|
|
87
|
-
onFocus:
|
|
88
|
-
onBlur:
|
|
89
|
-
} =
|
|
90
|
-
usesMenuSession:
|
|
91
|
-
currentValue:
|
|
92
|
-
setCurrentValue:
|
|
93
|
-
beginMenuSession:
|
|
94
|
-
endMenuSession:
|
|
95
|
-
} =
|
|
96
|
-
value:
|
|
97
|
-
defaultValue:
|
|
88
|
+
onClearAll: $e,
|
|
89
|
+
onFocus: _e,
|
|
90
|
+
onBlur: je
|
|
91
|
+
} = R, t = ae ?? ie ?? !1, s = ue ?? ce ?? !1, ke = be ?? Oe ?? !1, Ge = pe ?? !t, { t: O } = Ct(), D = de ?? O("select.placeholder"), [l, _] = A(Se), [f, L] = A(""), {
|
|
92
|
+
usesMenuSession: We,
|
|
93
|
+
currentValue: r,
|
|
94
|
+
setCurrentValue: Xe,
|
|
95
|
+
beginMenuSession: Je,
|
|
96
|
+
endMenuSession: Qe
|
|
97
|
+
} = vt({
|
|
98
|
+
value: se,
|
|
99
|
+
defaultValue: re,
|
|
98
100
|
isMulti: !!t,
|
|
99
|
-
onChange:
|
|
100
|
-
}), [
|
|
101
|
-
|
|
102
|
-
const { flatOptions: o, isProcessing: c, totalOptionsCount:
|
|
103
|
-
ignoreCase:
|
|
104
|
-
ignoreAccents:
|
|
101
|
+
onChange: T
|
|
102
|
+
}), [Ue, j] = A(null), [a, k] = A(-1), G = S(!1), Ye = mt.useId(), p = d ?? Ye, W = `${p}-listbox`, Ze = l && a >= 0 ? a === qt ? `${p}-option-select-all` : `${p}-option-${a}` : void 0, X = S(null), N = S(null), et = S(null), q = S(null), E = S(null);
|
|
103
|
+
Rt(l, h, b, E);
|
|
104
|
+
const { flatOptions: o, isProcessing: c, totalOptionsCount: J, workerSelectAll: tt } = yt(C, f, {
|
|
105
|
+
ignoreCase: Ne,
|
|
106
|
+
ignoreAccents: qe,
|
|
105
107
|
matchFrom: Ee,
|
|
106
108
|
stringify: Fe,
|
|
107
|
-
trim:
|
|
108
|
-
filterOption:
|
|
109
|
+
trim: Te,
|
|
110
|
+
filterOption: He,
|
|
109
111
|
enableSubMenus: I,
|
|
110
|
-
enableGroups:
|
|
111
|
-
}),
|
|
112
|
+
enableGroups: P
|
|
113
|
+
}), lt = Lt(
|
|
112
114
|
l,
|
|
113
|
-
!!
|
|
115
|
+
!!i,
|
|
114
116
|
c,
|
|
115
|
-
|
|
116
|
-
), M = Pt(
|
|
117
|
+
N
|
|
118
|
+
), M = Pt(r, t ?? !1), { stats: Q, getGroupStats: ot } = Dt(
|
|
117
119
|
o,
|
|
118
|
-
|
|
120
|
+
J,
|
|
119
121
|
f,
|
|
120
122
|
M,
|
|
121
|
-
|
|
123
|
+
r,
|
|
122
124
|
t ?? !1
|
|
123
|
-
),
|
|
125
|
+
), V = dt({
|
|
124
126
|
count: o.length,
|
|
125
127
|
getScrollElement: () => q.current,
|
|
126
|
-
|
|
128
|
+
// Estimates only seed unmeasured rows — mounted rows self-measure via
|
|
129
|
+
// `measureElement` refs. Consumers rendering taller custom `renderOption`
|
|
130
|
+
// rows should pass `estimateRowSize` to keep scroll offsets sane.
|
|
131
|
+
estimateSize: (e) => typeof y == "function" ? y(e) : typeof y == "number" ? y : 34,
|
|
127
132
|
overscan: 5
|
|
128
133
|
});
|
|
129
134
|
xt({
|
|
@@ -131,237 +136,237 @@ function oe(y) {
|
|
|
131
136
|
isSearchable: h,
|
|
132
137
|
searchPosition: b,
|
|
133
138
|
isReadOnly: n,
|
|
134
|
-
isLoading:
|
|
139
|
+
isLoading: i,
|
|
135
140
|
isProcessing: c,
|
|
136
|
-
fetchError:
|
|
141
|
+
fetchError: v,
|
|
137
142
|
isMulti: t,
|
|
138
|
-
isSelectAllEnabled:
|
|
143
|
+
isSelectAllEnabled: w,
|
|
139
144
|
flatOptions: o,
|
|
140
145
|
searchValue: f,
|
|
141
146
|
highlightedIndex: a,
|
|
142
|
-
setHighlightedIndex:
|
|
143
|
-
openedViaKeyboardRef:
|
|
144
|
-
scrollToSelectedOnOpen:
|
|
147
|
+
setHighlightedIndex: k,
|
|
148
|
+
openedViaKeyboardRef: G,
|
|
149
|
+
scrollToSelectedOnOpen: he,
|
|
145
150
|
selectionModel: M,
|
|
146
|
-
internalValue:
|
|
147
|
-
rowVirtualizer:
|
|
148
|
-
}),
|
|
151
|
+
internalValue: r,
|
|
152
|
+
rowVirtualizer: V
|
|
153
|
+
}), Vt({
|
|
149
154
|
isOpen: l,
|
|
150
|
-
isLoading:
|
|
155
|
+
isLoading: i,
|
|
151
156
|
isProcessing: c,
|
|
152
157
|
flatOptions: o,
|
|
153
158
|
listRef: q,
|
|
154
|
-
rowVirtualizer:
|
|
155
|
-
onMenuScrollToBottom:
|
|
159
|
+
rowVirtualizer: V,
|
|
160
|
+
onMenuScrollToBottom: Le
|
|
156
161
|
});
|
|
157
|
-
const
|
|
158
|
-
if (!(
|
|
159
|
-
if (
|
|
160
|
-
|
|
162
|
+
const x = (e) => {
|
|
163
|
+
if (!(s && e))
|
|
164
|
+
if (_(e), e)
|
|
165
|
+
Je(), we?.();
|
|
161
166
|
else {
|
|
162
|
-
const F =
|
|
163
|
-
K?.(F,
|
|
167
|
+
const F = We ? Qe() : r, ct = t && Ot(F) ? F.map((ut) => ut.value) : void 0;
|
|
168
|
+
K?.(F, ct), L(""), j(null);
|
|
164
169
|
}
|
|
165
170
|
};
|
|
166
|
-
|
|
167
|
-
const
|
|
171
|
+
Nt(l && !s, x), At(l, N);
|
|
172
|
+
const U = (e) => B ? B(e) : e.label, { handleSelect: Y, handleSelectAll: Z, clearValue: nt } = wt({
|
|
168
173
|
isMulti: t,
|
|
169
|
-
isDisabled:
|
|
174
|
+
isDisabled: s,
|
|
170
175
|
isReadOnly: n,
|
|
171
|
-
internalValue:
|
|
172
|
-
setInternalValue:
|
|
173
|
-
onChange:
|
|
176
|
+
internalValue: r,
|
|
177
|
+
setInternalValue: Xe,
|
|
178
|
+
onChange: T,
|
|
174
179
|
onMenuClose: K,
|
|
175
|
-
onClearAll:
|
|
180
|
+
onClearAll: $e,
|
|
176
181
|
enableSubMenus: I,
|
|
177
|
-
enableGroups:
|
|
178
|
-
enableInvertedSelection:
|
|
182
|
+
enableGroups: P,
|
|
183
|
+
enableInvertedSelection: ze,
|
|
179
184
|
maxSelectableOptions: g,
|
|
180
|
-
closeMenuOnSelect:
|
|
185
|
+
closeMenuOnSelect: Ge,
|
|
181
186
|
options: C,
|
|
182
187
|
flatOptions: o,
|
|
183
188
|
searchValue: f,
|
|
184
189
|
selectionModel: M,
|
|
185
|
-
visibleStats:
|
|
186
|
-
workerSelectAll:
|
|
187
|
-
setIsOpen:
|
|
188
|
-
setSearchValue:
|
|
189
|
-
}),
|
|
190
|
+
visibleStats: Q,
|
|
191
|
+
workerSelectAll: tt,
|
|
192
|
+
setIsOpen: _,
|
|
193
|
+
setSearchValue: L
|
|
194
|
+
}), st = (e) => Mt(
|
|
190
195
|
e,
|
|
191
|
-
|
|
196
|
+
H ?? !1,
|
|
192
197
|
t ?? !1,
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
),
|
|
196
|
-
isLoading: !!
|
|
198
|
+
ge,
|
|
199
|
+
r
|
|
200
|
+
), rt = () => Et({
|
|
201
|
+
isLoading: !!i,
|
|
197
202
|
isProcessing: c,
|
|
198
|
-
fetchError:
|
|
203
|
+
fetchError: v,
|
|
199
204
|
isMulti: t,
|
|
200
|
-
isSelectAllEnabled:
|
|
205
|
+
isSelectAllEnabled: w,
|
|
201
206
|
isReadOnly: n,
|
|
202
207
|
flatOptions: o,
|
|
203
208
|
enableSubMenus: I
|
|
204
|
-
}), { handleTriggerKeyDown:
|
|
205
|
-
isDisabled:
|
|
209
|
+
}), { handleTriggerKeyDown: it, handleSearchKeyDown: at } = It({
|
|
210
|
+
isDisabled: s,
|
|
206
211
|
isReadOnly: n,
|
|
207
212
|
isOpen: l,
|
|
208
213
|
isSearchable: h,
|
|
209
214
|
searchPosition: b,
|
|
210
|
-
getSelectableIndices:
|
|
215
|
+
getSelectableIndices: rt,
|
|
211
216
|
highlightedIndex: a,
|
|
212
|
-
setHighlightedIndex:
|
|
217
|
+
setHighlightedIndex: k,
|
|
213
218
|
flatOptions: o,
|
|
214
|
-
rowVirtualizer:
|
|
215
|
-
handleOpenChange:
|
|
216
|
-
handleSelect:
|
|
217
|
-
handleSelectAll:
|
|
218
|
-
openedViaKeyboardRef:
|
|
219
|
-
searchInputRef:
|
|
220
|
-
triggerRef:
|
|
221
|
-
}),
|
|
222
|
-
label:
|
|
223
|
-
helperText:
|
|
224
|
-
helperTextPosition:
|
|
225
|
-
labelOrientation:
|
|
226
|
-
error:
|
|
227
|
-
required:
|
|
228
|
-
disabled:
|
|
229
|
-
className:
|
|
230
|
-
rootClassName:
|
|
219
|
+
rowVirtualizer: V,
|
|
220
|
+
handleOpenChange: x,
|
|
221
|
+
handleSelect: Y,
|
|
222
|
+
handleSelectAll: Z,
|
|
223
|
+
openedViaKeyboardRef: G,
|
|
224
|
+
searchInputRef: E,
|
|
225
|
+
triggerRef: X
|
|
226
|
+
}), ee = bt({
|
|
227
|
+
label: m,
|
|
228
|
+
helperText: Ce,
|
|
229
|
+
helperTextPosition: ye,
|
|
230
|
+
labelOrientation: $,
|
|
231
|
+
error: Me,
|
|
232
|
+
required: ke,
|
|
233
|
+
disabled: s,
|
|
234
|
+
className: oe($ === "left" && "w-fit items-center"),
|
|
235
|
+
rootClassName: ve
|
|
231
236
|
});
|
|
232
237
|
return /* @__PURE__ */ u(
|
|
233
238
|
"div",
|
|
234
239
|
{
|
|
235
|
-
"data-testid": `select-${
|
|
240
|
+
"data-testid": `select-${d || "default"}`,
|
|
236
241
|
"data-component": "select",
|
|
237
|
-
children:
|
|
238
|
-
/* @__PURE__ */
|
|
239
|
-
/* @__PURE__ */ u(
|
|
240
|
-
|
|
242
|
+
children: ee.wrapControl(
|
|
243
|
+
/* @__PURE__ */ te(le.Root, { open: l && !s, onOpenChange: x, modal: !1, children: [
|
|
244
|
+
/* @__PURE__ */ u(le.Anchor, { asChild: !0, children: /* @__PURE__ */ u(
|
|
245
|
+
gt,
|
|
241
246
|
{
|
|
242
|
-
triggerRef:
|
|
243
|
-
inputRef:
|
|
247
|
+
triggerRef: X,
|
|
248
|
+
inputRef: et,
|
|
244
249
|
selectFieldId: p,
|
|
245
|
-
listboxId:
|
|
246
|
-
id:
|
|
250
|
+
listboxId: W,
|
|
251
|
+
id: d,
|
|
247
252
|
className: Ie,
|
|
248
253
|
size: Pe,
|
|
249
|
-
error:
|
|
250
|
-
isDisabled:
|
|
254
|
+
error: ee.hasError,
|
|
255
|
+
isDisabled: s,
|
|
251
256
|
isReadOnly: n,
|
|
252
257
|
isOpen: l,
|
|
253
|
-
isLoading:
|
|
258
|
+
isLoading: i,
|
|
254
259
|
isProcessing: c,
|
|
255
|
-
isClearable:
|
|
260
|
+
isClearable: me,
|
|
256
261
|
isSearchable: h,
|
|
257
262
|
searchPosition: b,
|
|
258
263
|
searchValue: f,
|
|
259
|
-
setSearchValue:
|
|
260
|
-
autoFocus:
|
|
264
|
+
setSearchValue: L,
|
|
265
|
+
autoFocus: fe,
|
|
261
266
|
name: xe,
|
|
262
|
-
label:
|
|
263
|
-
placeholder:
|
|
264
|
-
leftContent:
|
|
265
|
-
activeDescendantId:
|
|
266
|
-
internalValue:
|
|
267
|
-
totalCount:
|
|
268
|
-
totalOptionsCount:
|
|
267
|
+
label: m,
|
|
268
|
+
placeholder: D,
|
|
269
|
+
leftContent: De,
|
|
270
|
+
activeDescendantId: Ze,
|
|
271
|
+
internalValue: r,
|
|
272
|
+
totalCount: Ve,
|
|
273
|
+
totalOptionsCount: J,
|
|
269
274
|
formatSelectedCount: (e) => O("select.selectedCount", { count: e }),
|
|
270
|
-
resolveOptionLabel:
|
|
275
|
+
resolveOptionLabel: U,
|
|
271
276
|
isMulti: t,
|
|
272
|
-
onFocus:
|
|
273
|
-
onBlur:
|
|
274
|
-
onKeyDown:
|
|
275
|
-
onToggle: () =>
|
|
276
|
-
onClear:
|
|
277
|
+
onFocus: _e,
|
|
278
|
+
onBlur: je,
|
|
279
|
+
onKeyDown: it,
|
|
280
|
+
onToggle: () => x(!l),
|
|
281
|
+
onClear: nt
|
|
277
282
|
}
|
|
278
283
|
) }),
|
|
279
|
-
/* @__PURE__ */
|
|
280
|
-
|
|
284
|
+
/* @__PURE__ */ te(
|
|
285
|
+
ht,
|
|
281
286
|
{
|
|
282
|
-
menuRef:
|
|
283
|
-
menuMinHeight:
|
|
287
|
+
menuRef: N,
|
|
288
|
+
menuMinHeight: lt,
|
|
284
289
|
menuWidth: Ke,
|
|
285
290
|
isReadOnly: n,
|
|
286
|
-
id:
|
|
287
|
-
menuLabel: String(
|
|
291
|
+
id: d,
|
|
292
|
+
menuLabel: String(m || D),
|
|
288
293
|
children: [
|
|
289
294
|
/* @__PURE__ */ u(
|
|
290
|
-
|
|
295
|
+
pt,
|
|
291
296
|
{
|
|
292
|
-
id:
|
|
297
|
+
id: d,
|
|
293
298
|
selectFieldId: p,
|
|
294
299
|
isReadOnly: n,
|
|
295
|
-
isDisabled:
|
|
300
|
+
isDisabled: s,
|
|
296
301
|
isMulti: t,
|
|
297
302
|
isSearchable: h,
|
|
298
303
|
searchPosition: b,
|
|
299
|
-
fetchError:
|
|
300
|
-
isLoading:
|
|
304
|
+
fetchError: v,
|
|
305
|
+
isLoading: i,
|
|
301
306
|
isProcessing: c,
|
|
302
|
-
isSelectAllEnabled:
|
|
307
|
+
isSelectAllEnabled: w ?? !1,
|
|
303
308
|
flatOptionsLength: o.length,
|
|
304
|
-
searchInputRef:
|
|
309
|
+
searchInputRef: E,
|
|
305
310
|
searchValue: f,
|
|
306
311
|
searchPlaceholder: O("select.searchHere"),
|
|
307
312
|
highlightedIndex: a,
|
|
308
313
|
maxSelectableOptions: g,
|
|
309
|
-
visibleStats:
|
|
314
|
+
visibleStats: Q,
|
|
310
315
|
selectAllLabel: O("select.selectAll"),
|
|
311
316
|
unselectAllLabel: O("select.unselectAll"),
|
|
312
317
|
onSearchChange: (e) => {
|
|
313
|
-
|
|
318
|
+
L(e), Ae?.(e);
|
|
314
319
|
},
|
|
315
|
-
onSearchKeyDown:
|
|
316
|
-
onSelectAll:
|
|
320
|
+
onSearchKeyDown: at,
|
|
321
|
+
onSelectAll: Z
|
|
317
322
|
}
|
|
318
323
|
),
|
|
319
324
|
/* @__PURE__ */ u(
|
|
320
325
|
"div",
|
|
321
326
|
{
|
|
322
|
-
className:
|
|
327
|
+
className: oe(
|
|
323
328
|
"flex min-h-0 flex-1 flex-col overflow-hidden",
|
|
324
|
-
!(
|
|
329
|
+
!(z || g || C.length > 5e3) && "rounded-b-[12px]"
|
|
325
330
|
),
|
|
326
331
|
children: /* @__PURE__ */ u(
|
|
327
|
-
|
|
332
|
+
St,
|
|
328
333
|
{
|
|
329
|
-
fetchError:
|
|
334
|
+
fetchError: v,
|
|
330
335
|
onRefetch: Be,
|
|
331
336
|
flatOptions: o,
|
|
332
|
-
isLoading:
|
|
337
|
+
isLoading: i,
|
|
333
338
|
isProcessing: c,
|
|
334
339
|
isMulti: t,
|
|
335
340
|
isReadOnly: n,
|
|
336
|
-
enableGroups:
|
|
341
|
+
enableGroups: P,
|
|
337
342
|
enableSubMenus: I,
|
|
338
|
-
showSequence:
|
|
343
|
+
showSequence: H,
|
|
339
344
|
maxSelectableOptions: g,
|
|
340
345
|
listRef: q,
|
|
341
|
-
listboxId:
|
|
342
|
-
listboxLabel:
|
|
343
|
-
rowVirtualizer:
|
|
346
|
+
listboxId: W,
|
|
347
|
+
listboxLabel: m ? String(m) : D,
|
|
348
|
+
rowVirtualizer: V,
|
|
344
349
|
selectFieldId: p,
|
|
345
|
-
id:
|
|
350
|
+
id: d,
|
|
346
351
|
highlightedIndex: a,
|
|
347
|
-
activeSubmenu:
|
|
348
|
-
setActiveSubmenu:
|
|
349
|
-
internalValue:
|
|
352
|
+
activeSubmenu: Ue,
|
|
353
|
+
setActiveSubmenu: j,
|
|
354
|
+
internalValue: r,
|
|
350
355
|
selectionMode: M.mode,
|
|
351
356
|
selectionSet: M.set,
|
|
352
|
-
resolveOptionLabel:
|
|
353
|
-
getSequenceForOption:
|
|
354
|
-
renderOption:
|
|
355
|
-
onSelect:
|
|
356
|
-
getGroupStats:
|
|
357
|
+
resolveOptionLabel: U,
|
|
358
|
+
getSequenceForOption: st,
|
|
359
|
+
renderOption: Re,
|
|
360
|
+
onSelect: Y,
|
|
361
|
+
getGroupStats: ot
|
|
357
362
|
}
|
|
358
363
|
)
|
|
359
364
|
}
|
|
360
365
|
),
|
|
361
366
|
/* @__PURE__ */ u(
|
|
362
|
-
|
|
367
|
+
ft,
|
|
363
368
|
{
|
|
364
|
-
footerContent:
|
|
369
|
+
footerContent: z,
|
|
365
370
|
maxSelectableOptions: g,
|
|
366
371
|
optionCount: C.length
|
|
367
372
|
}
|
|
@@ -374,11 +379,11 @@ function oe(y) {
|
|
|
374
379
|
}
|
|
375
380
|
);
|
|
376
381
|
}
|
|
377
|
-
|
|
378
|
-
function
|
|
379
|
-
return
|
|
382
|
+
ne.displayName = "Select";
|
|
383
|
+
function Ft(R) {
|
|
384
|
+
return ne(R);
|
|
380
385
|
}
|
|
381
|
-
|
|
386
|
+
Ft.displayName = "Select";
|
|
382
387
|
export {
|
|
383
|
-
|
|
388
|
+
Ft as Select
|
|
384
389
|
};
|
|
@@ -155,6 +155,14 @@ export interface SelectProps<OptionType extends Option = Option, IsMulti extends
|
|
|
155
155
|
isRequired?: boolean;
|
|
156
156
|
/** Infinite scroll / async pagination callback. */
|
|
157
157
|
onMenuScrollToBottom?: () => void;
|
|
158
|
+
/**
|
|
159
|
+
* Estimated option row height (px) for virtualization, used until rows are
|
|
160
|
+
* measured. Pass a number, or a per-index function when row heights vary.
|
|
161
|
+
* Strongly recommended whenever `renderOption` renders rows taller than the
|
|
162
|
+
* default single-line height.
|
|
163
|
+
* @default 34
|
|
164
|
+
*/
|
|
165
|
+
estimateRowSize?: number | ((index: number) => number);
|
|
158
166
|
/**
|
|
159
167
|
* Total options in the remote dataset (async pagination).
|
|
160
168
|
* Used for "Selected (N)" when `enableInvertedSelection` is on.
|