@sproutsocial/seeds-react-menu 1.12.2 → 1.13.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/.turbo/turbo-build.log +13 -13
- package/CHANGELOG.md +16 -0
- package/dist/esm/v3/index.js +517 -58
- 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 +160 -50
- package/dist/v3/index.d.ts +160 -50
- package/dist/v3/index.js +522 -57
- package/dist/v3/index.js.map +1 -1
- package/package.json +1 -1
- package/src/v3/ActionMenu.stories.tsx +260 -0
- package/src/v3/ActionMenu.tsx +345 -0
- package/src/v3/ActionMenuStyles.tsx +153 -0
- package/src/v3/Common/SelectStyles.tsx +4 -3
- package/src/v3/ModalStories.stories.tsx +159 -0
- package/src/v3/MultiCombobox.stories.tsx +17 -0
- package/src/v3/MultiCombobox.tsx +24 -13
- package/src/v3/MultiSearchableSelect.stories.tsx +18 -0
- package/src/v3/MultiSearchableSelect.tsx +214 -55
- package/src/v3/MultiSelect.stories.tsx +17 -0
- package/src/v3/MultiSelect.tsx +3 -2
- package/src/v3/SingleCombobox.stories.tsx +17 -0
- package/src/v3/SingleCombobox.tsx +3 -1
- package/src/v3/SingleSearchableSelect.stories.tsx +18 -0
- package/src/v3/SingleSearchableSelect.tsx +3 -1
- package/src/v3/SingleSelect.stories.tsx +17 -0
- package/src/v3/SingleSelect.tsx +3 -2
- package/src/v3/index.ts +1 -0
package/dist/v3/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
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';
|
|
5
6
|
|
|
6
7
|
interface DataWithId {
|
|
7
8
|
id: string | number;
|
|
@@ -14,22 +15,23 @@ interface SingleSelectBaseProps {
|
|
|
14
15
|
includePlaceholderItem?: boolean;
|
|
15
16
|
disabled?: boolean;
|
|
16
17
|
"aria-describedby"?: string;
|
|
18
|
+
fullWidth?: boolean;
|
|
17
19
|
}
|
|
18
20
|
interface SingleSelectDataProps<T extends DataWithId> extends SingleSelectBaseProps {
|
|
19
21
|
data: T[];
|
|
20
22
|
itemToString: (item: T | null) => string;
|
|
21
|
-
renderItem?: (item: T) =>
|
|
23
|
+
renderItem?: (item: T) => React.ReactNode;
|
|
22
24
|
inputType?: "icon" | "radio";
|
|
23
25
|
selectedItemId?: T["id"] | null;
|
|
24
26
|
defaultSelectedItemId?: T["id"] | null;
|
|
25
27
|
onSelectedItemIdChange?: (id: T["id"] | null) => void;
|
|
26
|
-
renderSelection?: (item: T) =>
|
|
28
|
+
renderSelection?: (item: T) => React.ReactNode;
|
|
27
29
|
groupBy?: (item: T) => string;
|
|
28
|
-
renderGroupHeading?: (label: string) =>
|
|
30
|
+
renderGroupHeading?: (label: string) => React.ReactNode;
|
|
29
31
|
children?: never;
|
|
30
32
|
}
|
|
31
33
|
interface SingleSelectChildrenProps extends SingleSelectBaseProps {
|
|
32
|
-
children:
|
|
34
|
+
children: React.ReactNode;
|
|
33
35
|
selectedItemId?: string | number | null;
|
|
34
36
|
defaultSelectedItemId?: string | number | null;
|
|
35
37
|
onSelectedItemIdChange?: (id: string | number | null) => void;
|
|
@@ -49,25 +51,26 @@ interface MultiSelectBaseProps {
|
|
|
49
51
|
placeholder?: string;
|
|
50
52
|
disabled?: boolean;
|
|
51
53
|
"aria-describedby"?: string;
|
|
54
|
+
fullWidth?: boolean;
|
|
52
55
|
}
|
|
53
56
|
interface MultiSelectDataProps<T extends DataWithId> extends MultiSelectBaseProps {
|
|
54
57
|
data: T[];
|
|
55
58
|
itemToString: (item: T) => string;
|
|
56
|
-
renderItem?: (item: T) =>
|
|
59
|
+
renderItem?: (item: T) => React.ReactNode;
|
|
57
60
|
customRenderSelections?: (item: T) => string;
|
|
58
|
-
renderSelection?: (items: T[]) =>
|
|
61
|
+
renderSelection?: (items: T[]) => React.ReactNode;
|
|
59
62
|
inputType?: "icon" | "radio" | "checkbox" | "none";
|
|
60
63
|
maxSelections?: number;
|
|
61
64
|
selectedItemIds?: Array<T["id"]>;
|
|
62
65
|
defaultSelectedItemIds?: Array<T["id"]>;
|
|
63
66
|
onSelectedItemIdsChange?: (ids: Array<T["id"]>) => void;
|
|
64
67
|
groupBy?: (item: T) => string;
|
|
65
|
-
renderGroupHeading?: (label: string) =>
|
|
68
|
+
renderGroupHeading?: (label: string) => React.ReactNode;
|
|
66
69
|
removeSelectedItems?: boolean;
|
|
67
70
|
children?: never;
|
|
68
71
|
}
|
|
69
72
|
interface MultiSelectChildrenProps extends MultiSelectBaseProps {
|
|
70
|
-
children:
|
|
73
|
+
children: React.ReactNode;
|
|
71
74
|
selectedItemIds?: Array<string | number>;
|
|
72
75
|
defaultSelectedItemIds?: Array<string | number>;
|
|
73
76
|
onSelectedItemIdsChange?: (ids: Array<string | number>) => void;
|
|
@@ -92,11 +95,12 @@ interface SingleComboboxBaseProps {
|
|
|
92
95
|
disabled?: boolean;
|
|
93
96
|
filter?: ((item: unknown, query: string) => boolean) | null;
|
|
94
97
|
"aria-describedby"?: string;
|
|
98
|
+
fullWidth?: boolean;
|
|
95
99
|
}
|
|
96
100
|
interface SingleComboboxDataBaseProps<T extends DataWithId> extends SingleComboboxBaseProps {
|
|
97
101
|
data: T[];
|
|
98
102
|
itemToString: (item: T | null) => string;
|
|
99
|
-
renderItem?: (item: T) =>
|
|
103
|
+
renderItem?: (item: T) => React.ReactNode;
|
|
100
104
|
inputType?: "icon" | "radio" | "checkbox" | "none";
|
|
101
105
|
selectedItemId?: T["id"] | null;
|
|
102
106
|
defaultSelectedItemId?: T["id"] | null;
|
|
@@ -106,7 +110,7 @@ interface SingleComboboxDataBaseProps<T extends DataWithId> extends SingleCombob
|
|
|
106
110
|
interface SingleComboboxDataProps<T extends DataWithId> extends SingleComboboxDataBaseProps<T> {
|
|
107
111
|
isVirtualized?: false;
|
|
108
112
|
groupBy?: (item: T) => string;
|
|
109
|
-
renderGroupHeading?: (label: string) =>
|
|
113
|
+
renderGroupHeading?: (label: string) => React.ReactNode;
|
|
110
114
|
}
|
|
111
115
|
interface SingleComboboxVirtualizedProps<T extends DataWithId> extends SingleComboboxDataBaseProps<T> {
|
|
112
116
|
isVirtualized: true;
|
|
@@ -114,7 +118,7 @@ interface SingleComboboxVirtualizedProps<T extends DataWithId> extends SingleCom
|
|
|
114
118
|
renderGroupHeading?: never;
|
|
115
119
|
}
|
|
116
120
|
interface SingleComboboxChildrenProps extends SingleComboboxBaseProps {
|
|
117
|
-
children:
|
|
121
|
+
children: React.ReactNode;
|
|
118
122
|
selectedItemId?: string | number | null;
|
|
119
123
|
defaultSelectedItemId?: string | number | null;
|
|
120
124
|
onSelectedItemIdChange?: (id: string | number | null) => void;
|
|
@@ -140,19 +144,20 @@ interface MultiComboboxBaseProps {
|
|
|
140
144
|
inputValue?: string;
|
|
141
145
|
onInputValueChange?: (value: string) => void;
|
|
142
146
|
"aria-describedby"?: string;
|
|
147
|
+
fullWidth?: boolean;
|
|
143
148
|
}
|
|
144
149
|
interface MultiComboboxDataProps<T extends DataWithId> extends MultiComboboxBaseProps {
|
|
145
150
|
data: T[];
|
|
146
151
|
itemToString: (item: T) => string;
|
|
147
|
-
renderItem?: (item: T) =>
|
|
148
|
-
renderToken?: (item: T) =>
|
|
149
|
-
renderSelection?: (items: T[]) =>
|
|
152
|
+
renderItem?: (item: T) => React.ReactNode;
|
|
153
|
+
renderToken?: (item: T) => React.ReactNode;
|
|
154
|
+
renderSelection?: (items: T[]) => React.ReactNode;
|
|
150
155
|
inputType?: "icon" | "checkbox" | "none";
|
|
151
156
|
selectedItemIds?: Array<T["id"]>;
|
|
152
157
|
defaultSelectedItemIds?: Array<T["id"]>;
|
|
153
158
|
onSelectedItemIdsChange?: (ids: Array<T["id"]>) => void;
|
|
154
159
|
groupBy?: (item: T) => string;
|
|
155
|
-
renderGroupHeading?: (label: string) =>
|
|
160
|
+
renderGroupHeading?: (label: string) => React.ReactNode;
|
|
156
161
|
selectHeadings?: boolean;
|
|
157
162
|
selectAll?: boolean | string;
|
|
158
163
|
isVirtualized?: boolean;
|
|
@@ -163,7 +168,7 @@ interface MultiComboboxDataProps<T extends DataWithId> extends MultiComboboxBase
|
|
|
163
168
|
children?: never;
|
|
164
169
|
}
|
|
165
170
|
interface MultiComboboxChildrenProps extends MultiComboboxBaseProps {
|
|
166
|
-
children:
|
|
171
|
+
children: React.ReactNode;
|
|
167
172
|
selectedItemIds?: Array<string | number>;
|
|
168
173
|
defaultSelectedItemIds?: Array<string | number>;
|
|
169
174
|
onSelectedItemIdsChange?: (ids: Array<string | number>) => void;
|
|
@@ -195,12 +200,13 @@ interface SingleSearchableSelectBaseProps {
|
|
|
195
200
|
disabled?: boolean;
|
|
196
201
|
filter?: ((item: unknown, query: string) => boolean) | null;
|
|
197
202
|
"aria-describedby"?: string;
|
|
203
|
+
fullWidth?: boolean;
|
|
198
204
|
}
|
|
199
205
|
interface SingleSearchableSelectDataBaseProps<T extends DataWithId> extends SingleSearchableSelectBaseProps {
|
|
200
206
|
data: T[];
|
|
201
207
|
itemToString: (item: T | null) => string;
|
|
202
|
-
renderItem?: (item: T) =>
|
|
203
|
-
renderSelection?: (item: T) =>
|
|
208
|
+
renderItem?: (item: T) => React.ReactNode;
|
|
209
|
+
renderSelection?: (item: T) => React.ReactNode;
|
|
204
210
|
inputType?: "icon" | "radio" | "checkbox" | "none";
|
|
205
211
|
selectedItemId?: T["id"] | null;
|
|
206
212
|
defaultSelectedItemId?: T["id"] | null;
|
|
@@ -210,7 +216,7 @@ interface SingleSearchableSelectDataBaseProps<T extends DataWithId> extends Sing
|
|
|
210
216
|
interface SingleSearchableSelectDataProps<T extends DataWithId> extends SingleSearchableSelectDataBaseProps<T> {
|
|
211
217
|
isVirtualized?: false;
|
|
212
218
|
groupBy?: (item: T) => string;
|
|
213
|
-
renderGroupHeading?: (label: string) =>
|
|
219
|
+
renderGroupHeading?: (label: string) => React.ReactNode;
|
|
214
220
|
}
|
|
215
221
|
interface SingleSearchableSelectVirtualizedProps<T extends DataWithId> extends SingleSearchableSelectDataBaseProps<T> {
|
|
216
222
|
isVirtualized: true;
|
|
@@ -218,7 +224,7 @@ interface SingleSearchableSelectVirtualizedProps<T extends DataWithId> extends S
|
|
|
218
224
|
renderGroupHeading?: never;
|
|
219
225
|
}
|
|
220
226
|
interface SingleSearchableSelectChildrenProps extends SingleSearchableSelectBaseProps {
|
|
221
|
-
children:
|
|
227
|
+
children: React.ReactNode;
|
|
222
228
|
selectedItemId?: string | number | null;
|
|
223
229
|
defaultSelectedItemId?: string | number | null;
|
|
224
230
|
onSelectedItemIdChange?: (id: string | number | null) => void;
|
|
@@ -244,28 +250,31 @@ interface MultiSearchableSelectBaseProps {
|
|
|
244
250
|
disabled?: boolean;
|
|
245
251
|
filter?: ((item: unknown, query: string) => boolean) | null;
|
|
246
252
|
"aria-describedby"?: string;
|
|
253
|
+
fullWidth?: boolean;
|
|
247
254
|
}
|
|
248
255
|
interface MultiSearchableSelectDataProps<T extends DataWithId> extends MultiSearchableSelectBaseProps {
|
|
249
256
|
data: T[];
|
|
250
257
|
itemToString: (item: T) => string;
|
|
251
|
-
renderItem?: (item: T) =>
|
|
258
|
+
renderItem?: (item: T) => React.ReactNode;
|
|
252
259
|
customRenderSelections?: (item: T) => string;
|
|
253
|
-
renderSelection?: (items: T[]) =>
|
|
260
|
+
renderSelection?: (items: T[]) => React.ReactNode;
|
|
254
261
|
inputType?: "icon" | "checkbox" | "none";
|
|
255
262
|
maxSelections?: number;
|
|
256
263
|
selectedItemIds?: Array<T["id"]>;
|
|
257
264
|
defaultSelectedItemIds?: Array<T["id"]>;
|
|
258
265
|
onSelectedItemIdsChange?: (ids: Array<T["id"]>) => void;
|
|
259
266
|
groupBy?: (item: T) => string;
|
|
260
|
-
renderGroupHeading?: (label: string) =>
|
|
267
|
+
renderGroupHeading?: (label: string) => React.ReactNode;
|
|
261
268
|
selectHeadings?: boolean;
|
|
262
269
|
selectAll?: boolean;
|
|
263
270
|
isVirtualized?: boolean;
|
|
264
271
|
removeSelectedItems?: boolean;
|
|
272
|
+
creatable?: boolean;
|
|
273
|
+
onCreate?: (value: string) => T;
|
|
265
274
|
children?: never;
|
|
266
275
|
}
|
|
267
276
|
interface MultiSearchableSelectChildrenProps extends MultiSearchableSelectBaseProps {
|
|
268
|
-
children:
|
|
277
|
+
children: React.ReactNode;
|
|
269
278
|
selectedItemIds?: Array<string | number>;
|
|
270
279
|
defaultSelectedItemIds?: Array<string | number>;
|
|
271
280
|
onSelectedItemIdsChange?: (ids: Array<string | number>) => void;
|
|
@@ -282,44 +291,145 @@ interface MultiSearchableSelectChildrenProps extends MultiSearchableSelectBasePr
|
|
|
282
291
|
selectAll?: never;
|
|
283
292
|
isVirtualized?: never;
|
|
284
293
|
removeSelectedItems?: never;
|
|
294
|
+
creatable?: never;
|
|
295
|
+
onCreate?: never;
|
|
285
296
|
}
|
|
286
297
|
type MultiSearchableSelectProps<T extends DataWithId> = MultiSearchableSelectDataProps<T> | MultiSearchableSelectChildrenProps;
|
|
287
298
|
declare function MultiSearchableSelect<T extends DataWithId>(props: MultiSearchableSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
288
299
|
|
|
289
300
|
declare const ComboboxLabel: styled_components.StyledComponent<"label", styled_components.DefaultTheme, {}, never>;
|
|
290
|
-
declare const ComboboxInputGroup: styled_components.StyledComponent<
|
|
291
|
-
declare const ComboboxInput: styled_components.StyledComponent<
|
|
292
|
-
declare const ComboboxTokenInput: styled_components.StyledComponent<
|
|
301
|
+
declare const ComboboxInputGroup: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxInputGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
302
|
+
declare const ComboboxInput: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>, styled_components.DefaultTheme, {}, never>;
|
|
303
|
+
declare const ComboboxTokenInput: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>, styled_components.DefaultTheme, {}, never>;
|
|
293
304
|
declare const ComboboxActionButtons: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
|
|
294
|
-
declare const ComboboxClear: styled_components.StyledComponent<
|
|
295
|
-
declare const ComboboxTrigger: styled_components.StyledComponent<
|
|
296
|
-
declare const ComboboxPositioner: styled_components.StyledComponent<
|
|
297
|
-
declare const ComboboxPopup: styled_components.StyledComponent<
|
|
298
|
-
declare const ComboboxList: styled_components.StyledComponent<
|
|
299
|
-
declare const ComboboxStatus: styled_components.StyledComponent<
|
|
300
|
-
declare const ComboboxEmpty: styled_components.StyledComponent<
|
|
301
|
-
declare const ComboboxItem: styled_components.StyledComponent<
|
|
302
|
-
declare const ComboboxItemIndicator: styled_components.StyledComponent<
|
|
303
|
-
declare const ComboboxGroup: styled_components.StyledComponent<
|
|
304
|
-
declare const ComboboxGroupLabel: styled_components.StyledComponent<
|
|
305
|
+
declare const ComboboxClear: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxClearProps, "ref"> & React.RefAttributes<HTMLButtonElement>>, styled_components.DefaultTheme, {}, never>;
|
|
306
|
+
declare const ComboboxTrigger: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>, styled_components.DefaultTheme, {}, never>;
|
|
307
|
+
declare const ComboboxPositioner: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxPositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
308
|
+
declare const ComboboxPopup: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
309
|
+
declare const ComboboxList: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxListProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
310
|
+
declare const ComboboxStatus: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxStatusProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
311
|
+
declare const ComboboxEmpty: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxEmptyProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
312
|
+
declare const ComboboxItem: styled_components.StyledComponent<React.NamedExoticComponent<Omit<_base_ui_react_combobox.ComboboxItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
313
|
+
declare const ComboboxItemIndicator: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxItemIndicatorProps, "ref"> & React.RefAttributes<HTMLSpanElement>>, styled_components.DefaultTheme, {}, never>;
|
|
314
|
+
declare const ComboboxGroup: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
315
|
+
declare const ComboboxGroupLabel: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxGroupLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
305
316
|
declare const ComboboxSeparator: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
|
|
306
|
-
declare const ComboboxGroupHeaderItem: styled_components.StyledComponent<
|
|
307
|
-
declare const ComboboxSelectAllItem: styled_components.StyledComponent<
|
|
317
|
+
declare const ComboboxGroupHeaderItem: styled_components.StyledComponent<React.NamedExoticComponent<Omit<_base_ui_react_combobox.ComboboxItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
318
|
+
declare const ComboboxSelectAllItem: styled_components.StyledComponent<React.NamedExoticComponent<Omit<_base_ui_react_combobox.ComboboxItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
308
319
|
declare function ComboboxGroupHeaderCheckbox({ $state, id, }: {
|
|
309
320
|
$state: "none" | "partial" | "all";
|
|
310
321
|
id: string;
|
|
311
322
|
}): react_jsx_runtime.JSX.Element;
|
|
312
|
-
declare const ComboboxToken: styled_components.StyledComponent<
|
|
313
|
-
declare const ComboboxTokenInputGroup: styled_components.StyledComponent<
|
|
323
|
+
declare const ComboboxToken: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxChipsProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
324
|
+
declare const ComboboxTokenInputGroup: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxInputGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
314
325
|
declare const Token: styled_components.StyledComponent<"span", styled_components.DefaultTheme, {}, never>;
|
|
315
326
|
declare const TokenRemove: styled_components.StyledComponent<"button", styled_components.DefaultTheme, {}, never>;
|
|
316
|
-
declare const SearchableSelectTrigger: styled_components.StyledComponent<
|
|
317
|
-
declare const SearchableSelectTriggerIcon: styled_components.StyledComponent<
|
|
327
|
+
declare const SearchableSelectTrigger: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>, styled_components.DefaultTheme, {}, never>;
|
|
328
|
+
declare const SearchableSelectTriggerIcon: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>, styled_components.DefaultTheme, {}, never>;
|
|
318
329
|
declare const SearchableSelectPlaceholder: styled_components.StyledComponent<"span", styled_components.DefaultTheme, {}, never>;
|
|
319
|
-
declare const SearchableSelectPopup: styled_components.StyledComponent<
|
|
330
|
+
declare const SearchableSelectPopup: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
320
331
|
declare const SearchableSelectSearchContainer: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
|
|
321
|
-
declare const SearchableSelectInput: styled_components.StyledComponent<
|
|
322
|
-
declare const SearchableSelectList: styled_components.StyledComponent<
|
|
323
|
-
declare const SearchableSelectTokenTrigger: styled_components.StyledComponent<
|
|
332
|
+
declare const SearchableSelectInput: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>, styled_components.DefaultTheme, {}, never>;
|
|
333
|
+
declare const SearchableSelectList: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxListProps, "ref"> & React.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {}, never>;
|
|
334
|
+
declare const SearchableSelectTokenTrigger: styled_components.StyledComponent<React.ForwardRefExoticComponent<Omit<_base_ui_react_combobox.ComboboxTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>, styled_components.DefaultTheme, {}, never>;
|
|
335
|
+
|
|
336
|
+
interface ActionMenuProps {
|
|
337
|
+
/** The button element that opens the menu */
|
|
338
|
+
trigger: React.ReactElement;
|
|
339
|
+
/** Menu items and groups */
|
|
340
|
+
children: React.ReactNode;
|
|
341
|
+
/** Controlled open state */
|
|
342
|
+
open?: boolean;
|
|
343
|
+
/** Uncontrolled default open state */
|
|
344
|
+
defaultOpen?: boolean;
|
|
345
|
+
/** Called when open state changes */
|
|
346
|
+
onOpenChange?: (open: boolean, eventDetails: MenuRootChangeEventDetails) => void;
|
|
347
|
+
/** Disable the trigger */
|
|
348
|
+
disabled?: boolean;
|
|
349
|
+
}
|
|
350
|
+
declare function ActionMenu({ trigger, children, open, defaultOpen, onOpenChange, disabled, }: ActionMenuProps): react_jsx_runtime.JSX.Element;
|
|
351
|
+
interface MenuGroupProps {
|
|
352
|
+
children: React.ReactNode;
|
|
353
|
+
/** Optional group label shown above items */
|
|
354
|
+
label?: string;
|
|
355
|
+
/** Render a separator line after this group */
|
|
356
|
+
showSeparator?: boolean;
|
|
357
|
+
}
|
|
358
|
+
declare function MenuGroup({ children, label, showSeparator, }: MenuGroupProps): react_jsx_runtime.JSX.Element;
|
|
359
|
+
interface MenuRadioGroupProps {
|
|
360
|
+
children: React.ReactNode;
|
|
361
|
+
/** Controlled selected value */
|
|
362
|
+
value?: string;
|
|
363
|
+
/** Uncontrolled default value */
|
|
364
|
+
defaultValue?: string;
|
|
365
|
+
/** Called when selected value changes */
|
|
366
|
+
onValueChange?: (value: string) => void;
|
|
367
|
+
}
|
|
368
|
+
declare function MenuRadioGroup({ children, value, defaultValue, onValueChange, }: MenuRadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
369
|
+
interface MenuItemActionProps {
|
|
370
|
+
type?: "action";
|
|
371
|
+
children: React.ReactNode;
|
|
372
|
+
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
373
|
+
disabled?: boolean;
|
|
374
|
+
/** Close the menu when this item is clicked. Defaults to true. */
|
|
375
|
+
closeOnClick?: boolean;
|
|
376
|
+
/** Render as a link */
|
|
377
|
+
href?: string;
|
|
378
|
+
target?: string;
|
|
379
|
+
}
|
|
380
|
+
interface MenuItemCheckboxProps {
|
|
381
|
+
type: "checkbox";
|
|
382
|
+
children: React.ReactNode;
|
|
383
|
+
/** Controlled checked state */
|
|
384
|
+
checked?: boolean;
|
|
385
|
+
/** Uncontrolled default checked state */
|
|
386
|
+
defaultChecked?: boolean;
|
|
387
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
388
|
+
disabled?: boolean;
|
|
389
|
+
/** Close the menu when clicked. Defaults to false for checkbox items. */
|
|
390
|
+
closeOnClick?: boolean;
|
|
391
|
+
id?: string;
|
|
392
|
+
}
|
|
393
|
+
interface MenuItemRadioProps {
|
|
394
|
+
type: "radio";
|
|
395
|
+
/** Value submitted to the parent MenuRadioGroup */
|
|
396
|
+
value: string;
|
|
397
|
+
children: React.ReactNode;
|
|
398
|
+
disabled?: boolean;
|
|
399
|
+
/** Close the menu when clicked. Defaults to false for radio items. */
|
|
400
|
+
closeOnClick?: boolean;
|
|
401
|
+
}
|
|
402
|
+
type MenuItemProps = MenuItemActionProps | MenuItemCheckboxProps | MenuItemRadioProps;
|
|
403
|
+
declare function MenuItem(props: MenuItemProps): react_jsx_runtime.JSX.Element;
|
|
404
|
+
interface MenuSubProps {
|
|
405
|
+
/** The MenuSubTrigger element that opens the submenu */
|
|
406
|
+
trigger: React.ReactNode;
|
|
407
|
+
/** Submenu items */
|
|
408
|
+
children: React.ReactNode;
|
|
409
|
+
/** Controlled open state */
|
|
410
|
+
open?: boolean;
|
|
411
|
+
/** Uncontrolled default open state */
|
|
412
|
+
defaultOpen?: boolean;
|
|
413
|
+
/** Called when open state changes */
|
|
414
|
+
onOpenChange?: (open: boolean, eventDetails: MenuRootChangeEventDetails) => void;
|
|
415
|
+
/**
|
|
416
|
+
* When true, pressing Escape closes the entire menu tree.
|
|
417
|
+
* When false (default), Escape only closes the submenu.
|
|
418
|
+
*/
|
|
419
|
+
closeParentOnEsc?: boolean;
|
|
420
|
+
}
|
|
421
|
+
declare function MenuSub({ trigger, children, open, defaultOpen, onOpenChange, closeParentOnEsc, }: MenuSubProps): react_jsx_runtime.JSX.Element;
|
|
422
|
+
interface MenuSubTriggerProps {
|
|
423
|
+
children: React.ReactNode;
|
|
424
|
+
disabled?: boolean;
|
|
425
|
+
/** Custom label for keyboard text navigation */
|
|
426
|
+
label?: string;
|
|
427
|
+
/**
|
|
428
|
+
* Whether the submenu opens on hover.
|
|
429
|
+
* @default true
|
|
430
|
+
*/
|
|
431
|
+
openOnHover?: boolean;
|
|
432
|
+
}
|
|
433
|
+
declare function MenuSubTrigger({ children, disabled, label, openOnHover, }: MenuSubTriggerProps): react_jsx_runtime.JSX.Element;
|
|
324
434
|
|
|
325
|
-
export { ComboboxActionButtons, ComboboxClear, ComboboxEmpty, ComboboxGroup, ComboboxGroupHeaderCheckbox, ComboboxGroupHeaderItem, ComboboxGroupLabel, ComboboxInput, ComboboxInputGroup, ComboboxItem, ComboboxItemIndicator, ComboboxLabel, ComboboxList, ComboboxPopup, ComboboxPositioner, ComboboxSelectAllItem, ComboboxSeparator, ComboboxStatus, ComboboxToken, ComboboxTokenInput, ComboboxTokenInputGroup, ComboboxTrigger, 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 };
|
|
435
|
+
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, 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 };
|