@sproutsocial/seeds-react-menu 1.12.3 → 1.15.10
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/.turbo/turbo-build.log +12 -12
- package/CHANGELOG.md +193 -0
- package/dist/esm/v3/index.js +726 -186
- package/dist/esm/v3/index.js.map +1 -1
- package/dist/index.d.mts +22 -22
- package/dist/index.d.ts +22 -22
- package/dist/v3/index.d.mts +199 -50
- package/dist/v3/index.d.ts +199 -50
- package/dist/v3/index.js +732 -185
- package/dist/v3/index.js.map +1 -1
- package/package.json +14 -14
- package/src/v3/ActionMenu.stories.tsx +260 -0
- package/src/v3/ActionMenu.tsx +345 -0
- package/src/v3/ActionMenuStyles.tsx +154 -0
- package/src/v3/Common/ComboboxStyles.tsx +41 -7
- package/src/v3/Common/SelectStyles.tsx +20 -6
- package/src/v3/Common/useSuppressEscapeClear.ts +20 -0
- package/src/v3/MenuButton.stories.tsx +118 -0
- package/src/v3/MenuButton.tsx +68 -0
- package/src/v3/MenuButtonStyles.tsx +38 -0
- package/src/v3/ModalStories.stories.tsx +159 -0
- package/src/v3/MultiCombobox.stories.tsx +157 -0
- package/src/v3/MultiCombobox.tsx +28 -8
- package/src/v3/MultiSearchableSelect.stories.tsx +42 -0
- package/src/v3/MultiSearchableSelect.tsx +11 -6
- package/src/v3/MultiSelect.stories.tsx +40 -0
- package/src/v3/MultiSelect.tsx +12 -3
- package/src/v3/SingleCombobox.stories.tsx +36 -0
- package/src/v3/SingleCombobox.tsx +17 -7
- package/src/v3/SingleSearchableSelect.stories.tsx +38 -0
- package/src/v3/SingleSearchableSelect.tsx +15 -7
- package/src/v3/SingleSelect.stories.tsx +36 -0
- package/src/v3/SingleSelect.tsx +12 -3
- package/src/v3/__tests__/MenuButton.test.tsx +80 -0
- package/src/v3/index.ts +2 -0
package/dist/v3/index.d.mts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import * as _base_ui_react_combobox from '@base-ui/react/combobox';
|
|
4
4
|
import * as styled_components from 'styled-components';
|
|
5
|
+
import { MenuRootChangeEventDetails } from '@base-ui/react/menu';
|
|
6
|
+
import { TypeButtonProps } from '@sproutsocial/seeds-react-button';
|
|
5
7
|
|
|
6
8
|
interface DataWithId {
|
|
7
9
|
id: string | number;
|
|
@@ -14,22 +16,25 @@ interface SingleSelectBaseProps {
|
|
|
14
16
|
includePlaceholderItem?: boolean;
|
|
15
17
|
disabled?: boolean;
|
|
16
18
|
"aria-describedby"?: string;
|
|
19
|
+
isInvalid?: boolean;
|
|
20
|
+
required?: boolean;
|
|
21
|
+
fullWidth?: boolean;
|
|
17
22
|
}
|
|
18
23
|
interface SingleSelectDataProps<T extends DataWithId> extends SingleSelectBaseProps {
|
|
19
24
|
data: T[];
|
|
20
25
|
itemToString: (item: T | null) => string;
|
|
21
|
-
renderItem?: (item: T) =>
|
|
26
|
+
renderItem?: (item: T) => React.ReactNode;
|
|
22
27
|
inputType?: "icon" | "radio";
|
|
23
28
|
selectedItemId?: T["id"] | null;
|
|
24
29
|
defaultSelectedItemId?: T["id"] | null;
|
|
25
30
|
onSelectedItemIdChange?: (id: T["id"] | null) => void;
|
|
26
|
-
renderSelection?: (item: T) =>
|
|
31
|
+
renderSelection?: (item: T) => React.ReactNode;
|
|
27
32
|
groupBy?: (item: T) => string;
|
|
28
|
-
renderGroupHeading?: (label: string) =>
|
|
33
|
+
renderGroupHeading?: (label: string) => React.ReactNode;
|
|
29
34
|
children?: never;
|
|
30
35
|
}
|
|
31
36
|
interface SingleSelectChildrenProps extends SingleSelectBaseProps {
|
|
32
|
-
children:
|
|
37
|
+
children: React.ReactNode;
|
|
33
38
|
selectedItemId?: string | number | null;
|
|
34
39
|
defaultSelectedItemId?: string | number | null;
|
|
35
40
|
onSelectedItemIdChange?: (id: string | number | null) => void;
|
|
@@ -49,25 +54,28 @@ interface MultiSelectBaseProps {
|
|
|
49
54
|
placeholder?: string;
|
|
50
55
|
disabled?: boolean;
|
|
51
56
|
"aria-describedby"?: string;
|
|
57
|
+
isInvalid?: boolean;
|
|
58
|
+
required?: boolean;
|
|
59
|
+
fullWidth?: boolean;
|
|
52
60
|
}
|
|
53
61
|
interface MultiSelectDataProps<T extends DataWithId> extends MultiSelectBaseProps {
|
|
54
62
|
data: T[];
|
|
55
63
|
itemToString: (item: T) => string;
|
|
56
|
-
renderItem?: (item: T) =>
|
|
64
|
+
renderItem?: (item: T) => React.ReactNode;
|
|
57
65
|
customRenderSelections?: (item: T) => string;
|
|
58
|
-
renderSelection?: (items: T[]) =>
|
|
66
|
+
renderSelection?: (items: T[]) => React.ReactNode;
|
|
59
67
|
inputType?: "icon" | "radio" | "checkbox" | "none";
|
|
60
68
|
maxSelections?: number;
|
|
61
69
|
selectedItemIds?: Array<T["id"]>;
|
|
62
70
|
defaultSelectedItemIds?: Array<T["id"]>;
|
|
63
71
|
onSelectedItemIdsChange?: (ids: Array<T["id"]>) => void;
|
|
64
72
|
groupBy?: (item: T) => string;
|
|
65
|
-
renderGroupHeading?: (label: string) =>
|
|
73
|
+
renderGroupHeading?: (label: string) => React.ReactNode;
|
|
66
74
|
removeSelectedItems?: boolean;
|
|
67
75
|
children?: never;
|
|
68
76
|
}
|
|
69
77
|
interface MultiSelectChildrenProps extends MultiSelectBaseProps {
|
|
70
|
-
children:
|
|
78
|
+
children: React.ReactNode;
|
|
71
79
|
selectedItemIds?: Array<string | number>;
|
|
72
80
|
defaultSelectedItemIds?: Array<string | number>;
|
|
73
81
|
onSelectedItemIdsChange?: (ids: Array<string | number>) => void;
|
|
@@ -92,11 +100,14 @@ interface SingleComboboxBaseProps {
|
|
|
92
100
|
disabled?: boolean;
|
|
93
101
|
filter?: ((item: unknown, query: string) => boolean) | null;
|
|
94
102
|
"aria-describedby"?: string;
|
|
103
|
+
isInvalid?: boolean;
|
|
104
|
+
required?: boolean;
|
|
105
|
+
fullWidth?: boolean;
|
|
95
106
|
}
|
|
96
107
|
interface SingleComboboxDataBaseProps<T extends DataWithId> extends SingleComboboxBaseProps {
|
|
97
108
|
data: T[];
|
|
98
109
|
itemToString: (item: T | null) => string;
|
|
99
|
-
renderItem?: (item: T) =>
|
|
110
|
+
renderItem?: (item: T) => React.ReactNode;
|
|
100
111
|
inputType?: "icon" | "radio" | "checkbox" | "none";
|
|
101
112
|
selectedItemId?: T["id"] | null;
|
|
102
113
|
defaultSelectedItemId?: T["id"] | null;
|
|
@@ -106,7 +117,7 @@ interface SingleComboboxDataBaseProps<T extends DataWithId> extends SingleCombob
|
|
|
106
117
|
interface SingleComboboxDataProps<T extends DataWithId> extends SingleComboboxDataBaseProps<T> {
|
|
107
118
|
isVirtualized?: false;
|
|
108
119
|
groupBy?: (item: T) => string;
|
|
109
|
-
renderGroupHeading?: (label: string) =>
|
|
120
|
+
renderGroupHeading?: (label: string) => React.ReactNode;
|
|
110
121
|
}
|
|
111
122
|
interface SingleComboboxVirtualizedProps<T extends DataWithId> extends SingleComboboxDataBaseProps<T> {
|
|
112
123
|
isVirtualized: true;
|
|
@@ -114,7 +125,7 @@ interface SingleComboboxVirtualizedProps<T extends DataWithId> extends SingleCom
|
|
|
114
125
|
renderGroupHeading?: never;
|
|
115
126
|
}
|
|
116
127
|
interface SingleComboboxChildrenProps extends SingleComboboxBaseProps {
|
|
117
|
-
children:
|
|
128
|
+
children: React.ReactNode;
|
|
118
129
|
selectedItemId?: string | number | null;
|
|
119
130
|
defaultSelectedItemId?: string | number | null;
|
|
120
131
|
onSelectedItemIdChange?: (id: string | number | null) => void;
|
|
@@ -140,19 +151,22 @@ interface MultiComboboxBaseProps {
|
|
|
140
151
|
inputValue?: string;
|
|
141
152
|
onInputValueChange?: (value: string) => void;
|
|
142
153
|
"aria-describedby"?: string;
|
|
154
|
+
isInvalid?: boolean;
|
|
155
|
+
required?: boolean;
|
|
156
|
+
fullWidth?: boolean;
|
|
143
157
|
}
|
|
144
158
|
interface MultiComboboxDataProps<T extends DataWithId> extends MultiComboboxBaseProps {
|
|
145
159
|
data: T[];
|
|
146
160
|
itemToString: (item: T) => string;
|
|
147
|
-
renderItem?: (item: T) =>
|
|
148
|
-
renderToken?: (item: T) =>
|
|
149
|
-
renderSelection?: (items: T[]) =>
|
|
161
|
+
renderItem?: (item: T) => React.ReactNode;
|
|
162
|
+
renderToken?: (item: T) => React.ReactNode;
|
|
163
|
+
renderSelection?: (items: T[]) => React.ReactNode;
|
|
150
164
|
inputType?: "icon" | "checkbox" | "none";
|
|
151
165
|
selectedItemIds?: Array<T["id"]>;
|
|
152
166
|
defaultSelectedItemIds?: Array<T["id"]>;
|
|
153
167
|
onSelectedItemIdsChange?: (ids: Array<T["id"]>) => void;
|
|
154
168
|
groupBy?: (item: T) => string;
|
|
155
|
-
renderGroupHeading?: (label: string) =>
|
|
169
|
+
renderGroupHeading?: (label: string) => React.ReactNode;
|
|
156
170
|
selectHeadings?: boolean;
|
|
157
171
|
selectAll?: boolean | string;
|
|
158
172
|
isVirtualized?: boolean;
|
|
@@ -163,7 +177,7 @@ interface MultiComboboxDataProps<T extends DataWithId> extends MultiComboboxBase
|
|
|
163
177
|
children?: never;
|
|
164
178
|
}
|
|
165
179
|
interface MultiComboboxChildrenProps extends MultiComboboxBaseProps {
|
|
166
|
-
children:
|
|
180
|
+
children: React.ReactNode;
|
|
167
181
|
selectedItemIds?: Array<string | number>;
|
|
168
182
|
defaultSelectedItemIds?: Array<string | number>;
|
|
169
183
|
onSelectedItemIdsChange?: (ids: Array<string | number>) => void;
|
|
@@ -195,12 +209,15 @@ interface SingleSearchableSelectBaseProps {
|
|
|
195
209
|
disabled?: boolean;
|
|
196
210
|
filter?: ((item: unknown, query: string) => boolean) | null;
|
|
197
211
|
"aria-describedby"?: string;
|
|
212
|
+
isInvalid?: boolean;
|
|
213
|
+
required?: boolean;
|
|
214
|
+
fullWidth?: boolean;
|
|
198
215
|
}
|
|
199
216
|
interface SingleSearchableSelectDataBaseProps<T extends DataWithId> extends SingleSearchableSelectBaseProps {
|
|
200
217
|
data: T[];
|
|
201
218
|
itemToString: (item: T | null) => string;
|
|
202
|
-
renderItem?: (item: T) =>
|
|
203
|
-
renderSelection?: (item: T) =>
|
|
219
|
+
renderItem?: (item: T) => React.ReactNode;
|
|
220
|
+
renderSelection?: (item: T) => React.ReactNode;
|
|
204
221
|
inputType?: "icon" | "radio" | "checkbox" | "none";
|
|
205
222
|
selectedItemId?: T["id"] | null;
|
|
206
223
|
defaultSelectedItemId?: T["id"] | null;
|
|
@@ -210,7 +227,7 @@ interface SingleSearchableSelectDataBaseProps<T extends DataWithId> extends Sing
|
|
|
210
227
|
interface SingleSearchableSelectDataProps<T extends DataWithId> extends SingleSearchableSelectDataBaseProps<T> {
|
|
211
228
|
isVirtualized?: false;
|
|
212
229
|
groupBy?: (item: T) => string;
|
|
213
|
-
renderGroupHeading?: (label: string) =>
|
|
230
|
+
renderGroupHeading?: (label: string) => React.ReactNode;
|
|
214
231
|
}
|
|
215
232
|
interface SingleSearchableSelectVirtualizedProps<T extends DataWithId> extends SingleSearchableSelectDataBaseProps<T> {
|
|
216
233
|
isVirtualized: true;
|
|
@@ -218,7 +235,7 @@ interface SingleSearchableSelectVirtualizedProps<T extends DataWithId> extends S
|
|
|
218
235
|
renderGroupHeading?: never;
|
|
219
236
|
}
|
|
220
237
|
interface SingleSearchableSelectChildrenProps extends SingleSearchableSelectBaseProps {
|
|
221
|
-
children:
|
|
238
|
+
children: React.ReactNode;
|
|
222
239
|
selectedItemId?: string | number | null;
|
|
223
240
|
defaultSelectedItemId?: string | number | null;
|
|
224
241
|
onSelectedItemIdChange?: (id: string | number | null) => void;
|
|
@@ -244,20 +261,23 @@ interface MultiSearchableSelectBaseProps {
|
|
|
244
261
|
disabled?: boolean;
|
|
245
262
|
filter?: ((item: unknown, query: string) => boolean) | null;
|
|
246
263
|
"aria-describedby"?: string;
|
|
264
|
+
isInvalid?: boolean;
|
|
265
|
+
required?: boolean;
|
|
266
|
+
fullWidth?: boolean;
|
|
247
267
|
}
|
|
248
268
|
interface MultiSearchableSelectDataProps<T extends DataWithId> extends MultiSearchableSelectBaseProps {
|
|
249
269
|
data: T[];
|
|
250
270
|
itemToString: (item: T) => string;
|
|
251
|
-
renderItem?: (item: T) =>
|
|
271
|
+
renderItem?: (item: T) => React.ReactNode;
|
|
252
272
|
customRenderSelections?: (item: T) => string;
|
|
253
|
-
renderSelection?: (items: T[]) =>
|
|
273
|
+
renderSelection?: (items: T[]) => React.ReactNode;
|
|
254
274
|
inputType?: "icon" | "checkbox" | "none";
|
|
255
275
|
maxSelections?: number;
|
|
256
276
|
selectedItemIds?: Array<T["id"]>;
|
|
257
277
|
defaultSelectedItemIds?: Array<T["id"]>;
|
|
258
278
|
onSelectedItemIdsChange?: (ids: Array<T["id"]>) => void;
|
|
259
279
|
groupBy?: (item: T) => string;
|
|
260
|
-
renderGroupHeading?: (label: string) =>
|
|
280
|
+
renderGroupHeading?: (label: string) => React.ReactNode;
|
|
261
281
|
selectHeadings?: boolean;
|
|
262
282
|
selectAll?: boolean;
|
|
263
283
|
isVirtualized?: boolean;
|
|
@@ -267,7 +287,7 @@ interface MultiSearchableSelectDataProps<T extends DataWithId> extends MultiSear
|
|
|
267
287
|
children?: never;
|
|
268
288
|
}
|
|
269
289
|
interface MultiSearchableSelectChildrenProps extends MultiSearchableSelectBaseProps {
|
|
270
|
-
children:
|
|
290
|
+
children: React.ReactNode;
|
|
271
291
|
selectedItemIds?: Array<string | number>;
|
|
272
292
|
defaultSelectedItemIds?: Array<string | number>;
|
|
273
293
|
onSelectedItemIdsChange?: (ids: Array<string | number>) => void;
|
|
@@ -291,39 +311,168 @@ type MultiSearchableSelectProps<T extends DataWithId> = MultiSearchableSelectDat
|
|
|
291
311
|
declare function MultiSearchableSelect<T extends DataWithId>(props: MultiSearchableSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
292
312
|
|
|
293
313
|
declare const ComboboxLabel: styled_components.StyledComponent<"label", styled_components.DefaultTheme, {}, never>;
|
|
294
|
-
declare const ComboboxInputGroup: styled_components.StyledComponent<
|
|
295
|
-
|
|
296
|
-
|
|
314
|
+
declare const ComboboxInputGroup: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxInputGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {
|
|
315
|
+
$isInvalid?: boolean;
|
|
316
|
+
}, never>;
|
|
317
|
+
declare const ComboboxInput: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>, styled_components.DefaultTheme, {}, never>;
|
|
318
|
+
declare const ComboboxTokenInput: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>, styled_components.DefaultTheme, {}, never>;
|
|
297
319
|
declare const ComboboxActionButtons: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
|
|
298
|
-
declare const ComboboxClear: styled_components.StyledComponent<
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
declare const
|
|
302
|
-
declare const
|
|
303
|
-
declare const
|
|
304
|
-
declare const
|
|
305
|
-
declare const
|
|
306
|
-
declare const
|
|
307
|
-
declare const
|
|
308
|
-
declare const
|
|
320
|
+
declare const ComboboxClear: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxClearProps, "ref"> & React.RefAttributes<HTMLButtonElement>>, styled_components.DefaultTheme, {
|
|
321
|
+
tabIndex: 0;
|
|
322
|
+
}, "tabIndex">;
|
|
323
|
+
declare const ComboboxTrigger: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>, styled_components.DefaultTheme, {}, never>;
|
|
324
|
+
declare const ComboboxPositioner: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxPositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
325
|
+
declare const ComboboxPopup: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
326
|
+
declare const ComboboxList: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxListProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
327
|
+
declare const ComboboxStatus: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxStatusProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
328
|
+
declare const ComboboxEmpty: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxEmptyProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
329
|
+
declare const ComboboxItem: styled_components.StyledComponent<React.NamedExoticComponent<Omit<_base_ui_react_combobox.ComboboxItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
330
|
+
declare const ComboboxItemIndicator: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxItemIndicatorProps, "ref"> & React.RefAttributes<HTMLSpanElement>>, styled_components.DefaultTheme, {}, never>;
|
|
331
|
+
declare const ComboboxGroup: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
332
|
+
declare const ComboboxGroupLabel: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxGroupLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
309
333
|
declare const ComboboxSeparator: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
|
|
310
|
-
declare const ComboboxGroupHeaderItem: styled_components.StyledComponent<
|
|
311
|
-
declare const ComboboxSelectAllItem: styled_components.StyledComponent<
|
|
334
|
+
declare const ComboboxGroupHeaderItem: styled_components.StyledComponent<React.NamedExoticComponent<Omit<_base_ui_react_combobox.ComboboxItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
335
|
+
declare const ComboboxSelectAllItem: styled_components.StyledComponent<React.NamedExoticComponent<Omit<_base_ui_react_combobox.ComboboxItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
312
336
|
declare function ComboboxGroupHeaderCheckbox({ $state, id, }: {
|
|
313
337
|
$state: "none" | "partial" | "all";
|
|
314
338
|
id: string;
|
|
315
339
|
}): react_jsx_runtime.JSX.Element;
|
|
316
|
-
declare const ComboboxToken: styled_components.StyledComponent<
|
|
317
|
-
declare const ComboboxTokenInputGroup: styled_components.StyledComponent<
|
|
340
|
+
declare const ComboboxToken: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxChipsProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
341
|
+
declare const ComboboxTokenInputGroup: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxInputGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {
|
|
342
|
+
$isInvalid?: boolean;
|
|
343
|
+
}, never>;
|
|
318
344
|
declare const Token: styled_components.StyledComponent<"span", styled_components.DefaultTheme, {}, never>;
|
|
319
345
|
declare const TokenRemove: styled_components.StyledComponent<"button", styled_components.DefaultTheme, {}, never>;
|
|
320
|
-
declare const SearchableSelectTrigger: styled_components.StyledComponent<
|
|
321
|
-
|
|
346
|
+
declare const SearchableSelectTrigger: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>, styled_components.DefaultTheme, {
|
|
347
|
+
$isInvalid?: boolean;
|
|
348
|
+
}, never>;
|
|
349
|
+
declare const SearchableSelectTriggerIcon: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>, styled_components.DefaultTheme, {}, never>;
|
|
322
350
|
declare const SearchableSelectPlaceholder: styled_components.StyledComponent<"span", styled_components.DefaultTheme, {}, never>;
|
|
323
|
-
declare const SearchableSelectPopup: styled_components.StyledComponent<
|
|
351
|
+
declare const SearchableSelectPopup: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
324
352
|
declare const SearchableSelectSearchContainer: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
|
|
325
|
-
declare const SearchableSelectInput: styled_components.StyledComponent<
|
|
326
|
-
declare const SearchableSelectList: styled_components.StyledComponent<
|
|
327
|
-
declare const SearchableSelectTokenTrigger: styled_components.StyledComponent<
|
|
353
|
+
declare const SearchableSelectInput: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>, styled_components.DefaultTheme, {}, never>;
|
|
354
|
+
declare const SearchableSelectList: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxListProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
355
|
+
declare const SearchableSelectTokenTrigger: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>, styled_components.DefaultTheme, {
|
|
356
|
+
$isInvalid?: boolean;
|
|
357
|
+
}, never>;
|
|
328
358
|
|
|
329
|
-
|
|
359
|
+
interface ActionMenuProps {
|
|
360
|
+
/** The button element that opens the menu */
|
|
361
|
+
trigger: React.ReactElement;
|
|
362
|
+
/** Menu items and groups */
|
|
363
|
+
children: React.ReactNode;
|
|
364
|
+
/** Controlled open state */
|
|
365
|
+
open?: boolean;
|
|
366
|
+
/** Uncontrolled default open state */
|
|
367
|
+
defaultOpen?: boolean;
|
|
368
|
+
/** Called when open state changes */
|
|
369
|
+
onOpenChange?: (open: boolean, eventDetails: MenuRootChangeEventDetails) => void;
|
|
370
|
+
/** Disable the trigger */
|
|
371
|
+
disabled?: boolean;
|
|
372
|
+
}
|
|
373
|
+
declare function ActionMenu({ trigger, children, open, defaultOpen, onOpenChange, disabled, }: ActionMenuProps): react_jsx_runtime.JSX.Element;
|
|
374
|
+
interface MenuGroupProps {
|
|
375
|
+
children: React.ReactNode;
|
|
376
|
+
/** Optional group label shown above items */
|
|
377
|
+
label?: string;
|
|
378
|
+
/** Render a separator line after this group */
|
|
379
|
+
showSeparator?: boolean;
|
|
380
|
+
}
|
|
381
|
+
declare function MenuGroup({ children, label, showSeparator, }: MenuGroupProps): react_jsx_runtime.JSX.Element;
|
|
382
|
+
interface MenuRadioGroupProps {
|
|
383
|
+
children: React.ReactNode;
|
|
384
|
+
/** Controlled selected value */
|
|
385
|
+
value?: string;
|
|
386
|
+
/** Uncontrolled default value */
|
|
387
|
+
defaultValue?: string;
|
|
388
|
+
/** Called when selected value changes */
|
|
389
|
+
onValueChange?: (value: string) => void;
|
|
390
|
+
}
|
|
391
|
+
declare function MenuRadioGroup({ children, value, defaultValue, onValueChange, }: MenuRadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
392
|
+
interface MenuItemActionProps {
|
|
393
|
+
type?: "action";
|
|
394
|
+
children: React.ReactNode;
|
|
395
|
+
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
396
|
+
disabled?: boolean;
|
|
397
|
+
/** Close the menu when this item is clicked. Defaults to true. */
|
|
398
|
+
closeOnClick?: boolean;
|
|
399
|
+
/** Render as a link */
|
|
400
|
+
href?: string;
|
|
401
|
+
target?: string;
|
|
402
|
+
}
|
|
403
|
+
interface MenuItemCheckboxProps {
|
|
404
|
+
type: "checkbox";
|
|
405
|
+
children: React.ReactNode;
|
|
406
|
+
/** Controlled checked state */
|
|
407
|
+
checked?: boolean;
|
|
408
|
+
/** Uncontrolled default checked state */
|
|
409
|
+
defaultChecked?: boolean;
|
|
410
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
411
|
+
disabled?: boolean;
|
|
412
|
+
/** Close the menu when clicked. Defaults to false for checkbox items. */
|
|
413
|
+
closeOnClick?: boolean;
|
|
414
|
+
id?: string;
|
|
415
|
+
}
|
|
416
|
+
interface MenuItemRadioProps {
|
|
417
|
+
type: "radio";
|
|
418
|
+
/** Value submitted to the parent MenuRadioGroup */
|
|
419
|
+
value: string;
|
|
420
|
+
children: React.ReactNode;
|
|
421
|
+
disabled?: boolean;
|
|
422
|
+
/** Close the menu when clicked. Defaults to false for radio items. */
|
|
423
|
+
closeOnClick?: boolean;
|
|
424
|
+
}
|
|
425
|
+
type MenuItemProps = MenuItemActionProps | MenuItemCheckboxProps | MenuItemRadioProps;
|
|
426
|
+
declare function MenuItem(props: MenuItemProps): react_jsx_runtime.JSX.Element;
|
|
427
|
+
interface MenuSubProps {
|
|
428
|
+
/** The MenuSubTrigger element that opens the submenu */
|
|
429
|
+
trigger: React.ReactNode;
|
|
430
|
+
/** Submenu items */
|
|
431
|
+
children: React.ReactNode;
|
|
432
|
+
/** Controlled open state */
|
|
433
|
+
open?: boolean;
|
|
434
|
+
/** Uncontrolled default open state */
|
|
435
|
+
defaultOpen?: boolean;
|
|
436
|
+
/** Called when open state changes */
|
|
437
|
+
onOpenChange?: (open: boolean, eventDetails: MenuRootChangeEventDetails) => void;
|
|
438
|
+
/**
|
|
439
|
+
* When true, pressing Escape closes the entire menu tree.
|
|
440
|
+
* When false (default), Escape only closes the submenu.
|
|
441
|
+
*/
|
|
442
|
+
closeParentOnEsc?: boolean;
|
|
443
|
+
}
|
|
444
|
+
declare function MenuSub({ trigger, children, open, defaultOpen, onOpenChange, closeParentOnEsc, }: MenuSubProps): react_jsx_runtime.JSX.Element;
|
|
445
|
+
interface MenuSubTriggerProps {
|
|
446
|
+
children: React.ReactNode;
|
|
447
|
+
disabled?: boolean;
|
|
448
|
+
/** Custom label for keyboard text navigation */
|
|
449
|
+
label?: string;
|
|
450
|
+
/**
|
|
451
|
+
* Whether the submenu opens on hover.
|
|
452
|
+
* @default true
|
|
453
|
+
*/
|
|
454
|
+
openOnHover?: boolean;
|
|
455
|
+
}
|
|
456
|
+
declare function MenuSubTrigger({ children, disabled, label, openOnHover, }: MenuSubTriggerProps): react_jsx_runtime.JSX.Element;
|
|
457
|
+
|
|
458
|
+
interface MenuButtonProps extends TypeButtonProps {
|
|
459
|
+
/**
|
|
460
|
+
* Menu item content rendered inside the dropdown half — the children of an
|
|
461
|
+
* ActionMenu (MenuItems / MenuGroups).
|
|
462
|
+
*/
|
|
463
|
+
actionMenu: React.ReactNode;
|
|
464
|
+
/**
|
|
465
|
+
* Accessible label for the chevron-only trigger button. Required so consumers
|
|
466
|
+
* supply a localizable label rather than relying on a hardcoded fallback.
|
|
467
|
+
*/
|
|
468
|
+
menuButtonAriaLabel: string;
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* A "split button": a primary Button rendered immediately next to an ActionMenu
|
|
472
|
+
* whose trigger is an identical Button showing only a chevron-down icon. The
|
|
473
|
+
* two read as one control — the main button's right corners and the trigger's
|
|
474
|
+
* left corners are squared off with a 1px gap between them.
|
|
475
|
+
*/
|
|
476
|
+
declare function MenuButton({ actionMenu, appearance, size, disabled, menuButtonAriaLabel, children, ...rest }: MenuButtonProps): react_jsx_runtime.JSX.Element;
|
|
477
|
+
|
|
478
|
+
export { ActionMenu, type ActionMenuProps, ComboboxActionButtons, ComboboxClear, ComboboxEmpty, ComboboxGroup, ComboboxGroupHeaderCheckbox, ComboboxGroupHeaderItem, ComboboxGroupLabel, ComboboxInput, ComboboxInputGroup, ComboboxItem, ComboboxItemIndicator, ComboboxLabel, ComboboxList, ComboboxPopup, ComboboxPositioner, ComboboxSelectAllItem, ComboboxSeparator, ComboboxStatus, ComboboxToken, ComboboxTokenInput, ComboboxTokenInputGroup, ComboboxTrigger, MenuButton, type MenuButtonProps, MenuGroup, type MenuGroupProps, MenuItem, type MenuItemProps, MenuRadioGroup, type MenuRadioGroupProps, MenuSub, type MenuSubProps, MenuSubTrigger, type MenuSubTriggerProps, MultiCombobox, type MultiComboboxProps, MultiSearchableSelect, type MultiSearchableSelectProps, MultiSelect, type MultiSelectProps, SearchableSelectInput, SearchableSelectList, SearchableSelectPlaceholder, SearchableSelectPopup, SearchableSelectSearchContainer, SearchableSelectTokenTrigger, SearchableSelectTrigger, SearchableSelectTriggerIcon, SingleCombobox, type SingleComboboxProps, SingleSearchableSelect, type SingleSearchableSelectProps, SingleSelect, type SingleSelectProps, Token, TokenRemove };
|