@bazza-ui/react 0.0.0-snapshot-20260205122957
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/command-score-BuKQkUmS.d.cts +36 -0
- package/dist/command-score-C6nHV08C.d.ts +36 -0
- package/dist/data-surface-Dki7544r.d.ts +2136 -0
- package/dist/data-surface-Dyb-d-72.d.cts +2136 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3296 -0
- package/dist/index.d.ts +3296 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/listbox/index.cjs +2 -0
- package/dist/internal/listbox/index.cjs.map +1 -0
- package/dist/internal/listbox/index.d.cts +253 -0
- package/dist/internal/listbox/index.d.ts +253 -0
- package/dist/internal/listbox/index.js +2 -0
- package/dist/internal/listbox/index.js.map +1 -0
- package/dist/internal/popup-menu/index.cjs +2 -0
- package/dist/internal/popup-menu/index.cjs.map +1 -0
- package/dist/internal/popup-menu/index.d.cts +925 -0
- package/dist/internal/popup-menu/index.d.ts +925 -0
- package/dist/internal/popup-menu/index.js +2 -0
- package/dist/internal/popup-menu/index.js.map +1 -0
- package/dist/use-listbox-item-bi01_uzf.d.cts +659 -0
- package/dist/use-listbox-item-bi01_uzf.d.ts +659 -0
- package/package.json +62 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,3296 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import { N as NodeDef, L as LoaderComponentProps, Q as QueryDependentLoaderConfig, S as StaticLoaderConfig, A as AsyncLoaderResult, C as ComponentProps, P as PopupMenuSurface, a as PopupMenuSurfaceProps, b as PopupMenuArrow, c as PopupMenuBackdrop, d as PopupMenuEmpty, e as PopupMenuGroup, f as PopupMenuGroupLabel, g as PopupMenuIcon, h as PopupMenuList, i as PopupMenuPopup, j as PopupMenuPortal, k as PopupMenuScrollDownArrow, l as PopupMenuScrollUpArrow, m as PopupMenuSeparator, G as GetQualifiedRowIdFn, n as PopupMenuCheckboxItem, o as PopupMenuCheckboxItemIndicator, p as PopupMenuInput, q as PopupMenuDataList, r as PopupMenuDataSurface, s as PopupMenuItem, t as PopupMenuPositioner, u as PopupMenuRadioGroup, v as PopupMenuRadioGroupValue, w as PopupMenuRadioItem, x as PopupMenuRadioItemIndicator, y as PopupMenuShortcut, z as PopupMenuSubmenuRoot, B as PopupMenuSubmenuTrigger, D as PopupMenuSubmenuTriggerIndicator, E as PopupMenuPopupState } from './data-surface-Dki7544r.js';
|
|
3
|
+
export { be as AsyncLoaderConfig, bf as AsyncNodesConfig, bg as AsyncRenderState, bh as AsyncState, bi as BreadcrumbNode, aD as CheckboxItemDef, aE as CheckboxItemRenderParams, aF as CheckboxItemRenderProps, F as ComboboxArrowProps, H as ComboboxBackdropProps, I as ComboboxEmptyProps, J as ComboboxEmptyState, K as ComboboxGroupLabelProps, M as ComboboxGroupLabelState, O as ComboboxGroupProps, R as ComboboxGroupState, T as ComboboxIconProps, U as ComboboxIconState, V as ComboboxListChildrenState, a5 as ComboboxListCssVars, W as ComboboxListProps, X as ComboboxListState, Y as ComboboxPopupProps, Z as ComboboxPortalProps, a6 as ComboboxPositionerCssVars, _ as ComboboxScrollArrowProps, $ as ComboboxScrollArrowState, a0 as ComboboxScrollDownArrowProps, a1 as ComboboxScrollUpArrowProps, a2 as ComboboxSeparatorProps, a3 as ComboboxSeparatorState, a4 as ComboboxSurfaceState, F as ContextMenuArrowProps, H as ContextMenuBackdropProps, a7 as ContextMenuCheckboxItemIndicatorProps, a8 as ContextMenuCheckboxItemIndicatorState, a9 as ContextMenuCheckboxItemProps, aa as ContextMenuCheckboxItemState, ab as ContextMenuDataInputProps, aW as ContextMenuDataListProps, aX as ContextMenuDataSurfaceProps, I as ContextMenuEmptyProps, J as ContextMenuEmptyState, K as ContextMenuGroupLabelProps, M as ContextMenuGroupLabelState, O as ContextMenuGroupProps, R as ContextMenuGroupState, T as ContextMenuIconProps, U as ContextMenuIconState, ab as ContextMenuInputProps, ac as ContextMenuInputState, ad as ContextMenuItemProps, ae as ContextMenuItemState, V as ContextMenuListChildrenState, a5 as ContextMenuListCssVars, W as ContextMenuListProps, X as ContextMenuListState, Y as ContextMenuPopupProps, Z as ContextMenuPortalProps, af as ContextMenuPositionerAlign, a6 as ContextMenuPositionerCssVars, ag as ContextMenuPositionerProps, ah as ContextMenuRadioGroupProps, ai as ContextMenuRadioGroupState, aY as ContextMenuRadioGroupValueProps, aj as ContextMenuRadioItemIndicatorProps, ak as ContextMenuRadioItemIndicatorState, al as ContextMenuRadioItemProps, am as ContextMenuRadioItemState, _ as ContextMenuScrollArrowProps, $ as ContextMenuScrollArrowState, a0 as ContextMenuScrollDownArrowProps, a1 as ContextMenuScrollUpArrowProps, a2 as ContextMenuSeparatorProps, a3 as ContextMenuSeparatorState, an as ContextMenuShortcutProps, ao as ContextMenuShortcutState, ap as ContextMenuSubmenuRootProps, aq as ContextMenuSubmenuTriggerIndicatorProps, ar as ContextMenuSubmenuTriggerIndicatorState, as as ContextMenuSubmenuTriggerProps, at as ContextMenuSubmenuTriggerState, a4 as ContextMenuSurfaceState, aG as DataListChildrenState, aH as DataListProps, b7 as DataSurfaceContext, aI as DataSurfaceContextValue, aJ as DataSurfaceProps, aK as DeepSearchConfig, aL as DisplayGroupNode, aM as DisplayNode, aN as DisplayRadioGroupNode, aO as DisplayRowNode, bj as DisplaySeparatorNode, F as DropdownMenuArrowProps, H as DropdownMenuBackdropProps, a7 as DropdownMenuCheckboxItemIndicatorProps, a8 as DropdownMenuCheckboxItemIndicatorState, a9 as DropdownMenuCheckboxItemProps, aa as DropdownMenuCheckboxItemState, ab as DropdownMenuDataInputProps, aW as DropdownMenuDataListProps, aX as DropdownMenuDataSurfaceProps, I as DropdownMenuEmptyProps, J as DropdownMenuEmptyState, K as DropdownMenuGroupLabelProps, M as DropdownMenuGroupLabelState, O as DropdownMenuGroupProps, R as DropdownMenuGroupState, T as DropdownMenuIconProps, U as DropdownMenuIconState, ab as DropdownMenuInputProps, ac as DropdownMenuInputState, ad as DropdownMenuItemProps, ae as DropdownMenuItemState, V as DropdownMenuListChildrenState, a5 as DropdownMenuListCssVars, W as DropdownMenuListProps, X as DropdownMenuListState, Y as DropdownMenuPopupProps, Z as DropdownMenuPortalProps, af as DropdownMenuPositionerAlign, a6 as DropdownMenuPositionerCssVars, ag as DropdownMenuPositionerProps, ah as DropdownMenuRadioGroupProps, ai as DropdownMenuRadioGroupState, aY as DropdownMenuRadioGroupValueProps, aj as DropdownMenuRadioItemIndicatorProps, ak as DropdownMenuRadioItemIndicatorState, al as DropdownMenuRadioItemProps, am as DropdownMenuRadioItemState, _ as DropdownMenuScrollArrowProps, $ as DropdownMenuScrollArrowState, a0 as DropdownMenuScrollDownArrowProps, a1 as DropdownMenuScrollUpArrowProps, a2 as DropdownMenuSeparatorProps, a3 as DropdownMenuSeparatorState, an as DropdownMenuShortcutProps, ao as DropdownMenuShortcutState, ap as DropdownMenuSubmenuRootProps, aq as DropdownMenuSubmenuTriggerIndicatorProps, ar as DropdownMenuSubmenuTriggerIndicatorState, as as DropdownMenuSubmenuTriggerProps, at as DropdownMenuSubmenuTriggerState, a4 as DropdownMenuSurfaceState, aP as GroupBehavior, aQ as GroupDef, aR as GroupRenderContext, aS as GroupRenderParams, aT as ItemDef, aU as ItemRenderParams, aV as ItemRenderProps, bk as QueryAsyncNodesConfig, bl as RadioGroupBehavior, aZ as RadioGroupDef, a_ as RadioGroupRenderParams, a$ as RadioGroupRenderProps, bm as RadioItemDef, bn as RadioItemRenderParams, bo as RadioItemRenderProps, b0 as RenderNodeFn, au as RootContextValue, b1 as RowRenderContext, b2 as ScoredNode, F as SelectArrowProps, H as SelectBackdropProps, I as SelectEmptyProps, J as SelectEmptyState, K as SelectGroupLabelProps, M as SelectGroupLabelState, O as SelectGroupProps, R as SelectGroupState, T as SelectIconProps, U as SelectIconState, ab as SelectInputProps, ac as SelectInputState, V as SelectListChildrenState, a5 as SelectListCssVars, W as SelectListProps, X as SelectListState, Z as SelectPortalProps, a6 as SelectPositionerCssVars, _ as SelectScrollArrowProps, $ as SelectScrollArrowState, a0 as SelectScrollDownArrowProps, a1 as SelectScrollUpArrowProps, a2 as SelectSeparatorProps, a3 as SelectSeparatorState, a4 as SelectSurfaceState, b3 as SeparatorDef, bp as SeparatorRenderParams, bq as StaticAsyncNodesConfig, av as SubmenuContextValue, b4 as SubmenuDef, b5 as SubmenuRenderParams, b6 as SubmenuRenderProps, aA as UseItemParams, aB as UseItemReturn, b8 as defineRadioGroup, b9 as isDisplayGroupNode, ba as isDisplayRadioGroupNode, bb as isDisplayRowNode, br as isDisplaySeparatorNode, bc as useDataSurfaceContext, aC as useItem, bd as useMaybeDataSurfaceContext, aw as useMaybeRootContext, ax as useMaybeSubmenuContext, ay as useRootContext, az as useSubmenuContext } from './data-surface-Dki7544r.js';
|
|
4
|
+
import { C as ChangeEventDetails, t as triggerPress, e as escapeKey, o as outsidePress, f as focusOut, i as itemPress, a as inputChange, b as inputClear, l as listNavigation, c as imperativeAction, n as none, G as GenericEventDetails, p as pointer, k as keyboard, V as VirtualItem, d as triggerContextMenu, g as closePress, s as submenuTrigger, h as siblingOpen, j as triggerHover, m as triggerFocus } from './use-listbox-item-bi01_uzf.js';
|
|
5
|
+
export { F as ComboboxFilterFn, I as ComboboxItemRegistration, r as ComboboxStore, L as ComboboxStoreContext, q as ComboboxStoreState, F as ContextMenuFilterFn, I as ContextMenuItemRegistration, r as ContextMenuStore, L as ContextMenuStoreContext, q as ContextMenuStoreState, F as DropdownMenuFilterFn, I as DropdownMenuItemRegistration, r as DropdownMenuStore, L as DropdownMenuStoreContext, q as DropdownMenuStoreState, u as ItemContextValue, F as SelectFilterFn, I as SelectItemRegistration, r as SelectStore, L as SelectStoreContext, q as SelectStoreState, v as useItemContext, w as useMaybeItemContext } from './use-listbox-item-bi01_uzf.js';
|
|
6
|
+
import { PopoverPositionerProps, Popover, PopoverRootProps } from '@base-ui/react/popover';
|
|
7
|
+
export { S as SurfaceContextValue, c as commandScore, d as defaultFilter, u as useMaybeSurfaceContext, a as useSurfaceContext } from './command-score-C6nHV08C.js';
|
|
8
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
|
+
import '@base-ui/utils/store';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* TanStack Query result shape (subset of UseQueryResult).
|
|
13
|
+
* This allows the adapter to work without requiring @tanstack/react-query as a dependency.
|
|
14
|
+
*/
|
|
15
|
+
interface TanStackQueryResult<TData, TError = Error> {
|
|
16
|
+
data: TData | undefined;
|
|
17
|
+
error: TError | null;
|
|
18
|
+
isLoading: boolean;
|
|
19
|
+
isError: boolean;
|
|
20
|
+
isFetching?: boolean;
|
|
21
|
+
refetch: () => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Converts a TanStack Query result to an AsyncLoaderResult.
|
|
25
|
+
* Use this to wrap your useQuery hook result.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* function MyLoader({ query, children }) {
|
|
30
|
+
* const result = useQuery({
|
|
31
|
+
* queryKey: ['items', query],
|
|
32
|
+
* queryFn: () => fetchItems(query),
|
|
33
|
+
* })
|
|
34
|
+
* return children(toAsyncLoaderResult(result))
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare function toAsyncLoaderResult<T>(result: TanStackQueryResult<T>): AsyncLoaderResult<T>;
|
|
39
|
+
/**
|
|
40
|
+
* Props for creating a static loader component.
|
|
41
|
+
*/
|
|
42
|
+
interface CreateStaticLoaderProps {
|
|
43
|
+
/**
|
|
44
|
+
* Hook that returns a TanStack Query result.
|
|
45
|
+
* This hook will be called inside the loader component.
|
|
46
|
+
*/
|
|
47
|
+
useQuery: () => TanStackQueryResult<NodeDef[]>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Creates a static loader configuration for use with async menus.
|
|
51
|
+
* The hook is called inside a component, so it follows React's rules of hooks.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```tsx
|
|
55
|
+
* const recentFilesLoader = createStaticLoader({
|
|
56
|
+
* useQuery: () => useQuery({
|
|
57
|
+
* queryKey: ['recent-files'],
|
|
58
|
+
* queryFn: fetchRecentFiles,
|
|
59
|
+
* staleTime: 5 * 60 * 1000,
|
|
60
|
+
* }),
|
|
61
|
+
* })
|
|
62
|
+
*
|
|
63
|
+
* // Use in submenu
|
|
64
|
+
* {
|
|
65
|
+
* kind: 'submenu',
|
|
66
|
+
* value: 'Recent Files',
|
|
67
|
+
* asyncNodes: {
|
|
68
|
+
* ...recentFilesLoader,
|
|
69
|
+
* loadStrategy: 'eager',
|
|
70
|
+
* },
|
|
71
|
+
* render: ...
|
|
72
|
+
* }
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
declare function createStaticLoader(props: CreateStaticLoaderProps): StaticLoaderConfig;
|
|
76
|
+
/**
|
|
77
|
+
* Props for creating a query-dependent loader component.
|
|
78
|
+
*/
|
|
79
|
+
interface CreateQueryLoaderProps {
|
|
80
|
+
/**
|
|
81
|
+
* Hook that returns a TanStack Query result based on the search query.
|
|
82
|
+
* This hook will be called inside the loader component with the current query.
|
|
83
|
+
*/
|
|
84
|
+
useQuery: (query: string) => TanStackQueryResult<NodeDef[]>;
|
|
85
|
+
/**
|
|
86
|
+
* Minimum query length before fetching.
|
|
87
|
+
* @default 1
|
|
88
|
+
*/
|
|
89
|
+
minQueryLength?: number;
|
|
90
|
+
/**
|
|
91
|
+
* Initial query to use when the loader becomes active.
|
|
92
|
+
* Set to '' to fetch all items immediately when the submenu opens.
|
|
93
|
+
* If undefined, waits for user to type before fetching.
|
|
94
|
+
*/
|
|
95
|
+
initialQuery?: string;
|
|
96
|
+
/**
|
|
97
|
+
* When to trigger the loader:
|
|
98
|
+
* - 'eager': Load when root menu opens (good for deep search)
|
|
99
|
+
* - 'lazy': Load when submenu opens (default)
|
|
100
|
+
* @default 'lazy'
|
|
101
|
+
*/
|
|
102
|
+
loadStrategy?: 'eager' | 'lazy';
|
|
103
|
+
/**
|
|
104
|
+
* What to show when query is below minQueryLength.
|
|
105
|
+
* @default 'empty'
|
|
106
|
+
*/
|
|
107
|
+
belowMinBehavior?: 'empty' | 'placeholder';
|
|
108
|
+
/**
|
|
109
|
+
* Placeholder nodes shown when query is below minQueryLength.
|
|
110
|
+
*/
|
|
111
|
+
placeholderNodes?: NodeDef[];
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Creates a query-dependent loader configuration for use with async menus.
|
|
115
|
+
* The loader will re-fetch when the search query changes.
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```tsx
|
|
119
|
+
* const searchLoader = createQueryLoader({
|
|
120
|
+
* useQuery: (query) => useQuery({
|
|
121
|
+
* queryKey: ['search', query],
|
|
122
|
+
* queryFn: () => searchItems(query),
|
|
123
|
+
* enabled: query.length >= 2,
|
|
124
|
+
* }),
|
|
125
|
+
* minQueryLength: 2,
|
|
126
|
+
* })
|
|
127
|
+
*
|
|
128
|
+
* // Use in submenu
|
|
129
|
+
* {
|
|
130
|
+
* kind: 'submenu',
|
|
131
|
+
* value: 'Search',
|
|
132
|
+
* asyncNodes: {
|
|
133
|
+
* ...searchLoader,
|
|
134
|
+
* includeInDeepSearch: true,
|
|
135
|
+
* },
|
|
136
|
+
* render: ...
|
|
137
|
+
* }
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
declare function createQueryLoader(props: CreateQueryLoaderProps): QueryDependentLoaderConfig;
|
|
141
|
+
/**
|
|
142
|
+
* Creates a loader component that wraps a TanStack Query hook.
|
|
143
|
+
* This is a lower-level utility for custom loader implementations.
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```tsx
|
|
147
|
+
* const MyLoader = createLoaderComponent((query) =>
|
|
148
|
+
* useQuery({
|
|
149
|
+
* queryKey: ['items', query],
|
|
150
|
+
* queryFn: () => fetchItems(query),
|
|
151
|
+
* })
|
|
152
|
+
* )
|
|
153
|
+
* ```
|
|
154
|
+
*/
|
|
155
|
+
declare function createLoaderComponent(useQueryFn: (query: string) => TanStackQueryResult<NodeDef[]>): React$1.FC<LoaderComponentProps>;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Props for creating a static loader with vanilla fetch.
|
|
159
|
+
*/
|
|
160
|
+
interface CreateVanillaStaticLoaderProps {
|
|
161
|
+
/**
|
|
162
|
+
* Async function that fetches the menu items.
|
|
163
|
+
*/
|
|
164
|
+
fetcher: () => Promise<NodeDef[]>;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Creates a static loader configuration using plain fetch/promises.
|
|
168
|
+
* No external data library required.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```tsx
|
|
172
|
+
* const recentFilesLoader = createVanillaStaticLoader({
|
|
173
|
+
* fetcher: async () => {
|
|
174
|
+
* const res = await fetch('/api/recent-files')
|
|
175
|
+
* const data = await res.json()
|
|
176
|
+
* return data.map(file => ({
|
|
177
|
+
* kind: 'item',
|
|
178
|
+
* value: file.name,
|
|
179
|
+
* render: ...
|
|
180
|
+
* }))
|
|
181
|
+
* },
|
|
182
|
+
* })
|
|
183
|
+
* ```
|
|
184
|
+
*/
|
|
185
|
+
declare function createVanillaStaticLoader(props: CreateVanillaStaticLoaderProps): StaticLoaderConfig;
|
|
186
|
+
/**
|
|
187
|
+
* Props for creating a query-dependent loader with vanilla fetch.
|
|
188
|
+
*/
|
|
189
|
+
interface CreateVanillaQueryLoaderProps {
|
|
190
|
+
/**
|
|
191
|
+
* Async function that fetches menu items based on the search query.
|
|
192
|
+
*/
|
|
193
|
+
fetcher: (query: string) => Promise<NodeDef[]>;
|
|
194
|
+
/**
|
|
195
|
+
* Minimum query length before fetching.
|
|
196
|
+
* @default 1
|
|
197
|
+
*/
|
|
198
|
+
minQueryLength?: number;
|
|
199
|
+
/**
|
|
200
|
+
* Initial query to pre-fetch on menu open.
|
|
201
|
+
*/
|
|
202
|
+
initialQuery?: string;
|
|
203
|
+
/**
|
|
204
|
+
* What to show when query is below minQueryLength.
|
|
205
|
+
* @default 'empty'
|
|
206
|
+
*/
|
|
207
|
+
belowMinBehavior?: 'empty' | 'placeholder';
|
|
208
|
+
/**
|
|
209
|
+
* Placeholder nodes shown when query is below minQueryLength.
|
|
210
|
+
*/
|
|
211
|
+
placeholderNodes?: NodeDef[];
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Creates a query-dependent loader configuration using plain fetch/promises.
|
|
215
|
+
* No external data library required.
|
|
216
|
+
*
|
|
217
|
+
* @example
|
|
218
|
+
* ```tsx
|
|
219
|
+
* const searchLoader = createVanillaQueryLoader({
|
|
220
|
+
* fetcher: async (query) => {
|
|
221
|
+
* const res = await fetch(`/api/search?q=${encodeURIComponent(query)}`)
|
|
222
|
+
* const data = await res.json()
|
|
223
|
+
* return data.map(item => ({
|
|
224
|
+
* kind: 'item',
|
|
225
|
+
* value: item.name,
|
|
226
|
+
* render: ...
|
|
227
|
+
* }))
|
|
228
|
+
* },
|
|
229
|
+
* minQueryLength: 2,
|
|
230
|
+
* })
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
declare function createVanillaQueryLoader(props: CreateVanillaQueryLoaderProps): QueryDependentLoaderConfig;
|
|
234
|
+
|
|
235
|
+
interface ComboboxClearState extends Record<string, unknown> {
|
|
236
|
+
/**
|
|
237
|
+
* Whether the combobox has a value (clear button is actionable).
|
|
238
|
+
*/
|
|
239
|
+
hasValue: boolean;
|
|
240
|
+
/**
|
|
241
|
+
* Whether the combobox is disabled.
|
|
242
|
+
*/
|
|
243
|
+
disabled: boolean;
|
|
244
|
+
}
|
|
245
|
+
interface ComboboxClearProps extends ComponentProps<'button', ComboboxClear.State> {
|
|
246
|
+
/**
|
|
247
|
+
* Whether to render the button even when there's no value to clear.
|
|
248
|
+
* @default false
|
|
249
|
+
*/
|
|
250
|
+
keepMounted?: boolean;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* A button that clears the selected value(s) when clicked.
|
|
254
|
+
* Renders a `<button>` element.
|
|
255
|
+
*/
|
|
256
|
+
declare const ComboboxClear: React$1.ForwardRefExoticComponent<Omit<ComboboxClear.Props, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
257
|
+
declare namespace ComboboxClear {
|
|
258
|
+
type State = ComboboxClearState;
|
|
259
|
+
interface Props extends ComboboxClearProps {
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
type Side$1 = 'top' | 'bottom' | 'left' | 'right';
|
|
264
|
+
type Align$1 = 'start' | 'center' | 'end';
|
|
265
|
+
/**
|
|
266
|
+
* Layout mode for the combobox popup.
|
|
267
|
+
* - `'floating'` - Standard dropdown positioning below/above the input
|
|
268
|
+
* - `'input-embedded'` - Popup wraps around the input (macOS-style)
|
|
269
|
+
*/
|
|
270
|
+
type ComboboxLayout = 'floating' | 'input-embedded';
|
|
271
|
+
/**
|
|
272
|
+
* Context value for Combobox Positioner.
|
|
273
|
+
* Provides alignment state for coordinating positioning behavior.
|
|
274
|
+
*/
|
|
275
|
+
interface ComboboxPositionerContextValue {
|
|
276
|
+
/**
|
|
277
|
+
* The layout mode being used.
|
|
278
|
+
* - `'floating'` - Standard dropdown positioning
|
|
279
|
+
* - `'input-embedded'` - Popup wraps around the input
|
|
280
|
+
*/
|
|
281
|
+
layout: ComboboxLayout;
|
|
282
|
+
/**
|
|
283
|
+
* The side of the popup relative to the input.
|
|
284
|
+
*/
|
|
285
|
+
side: Side$1;
|
|
286
|
+
/**
|
|
287
|
+
* The alignment of the popup.
|
|
288
|
+
*/
|
|
289
|
+
align: Align$1;
|
|
290
|
+
/**
|
|
291
|
+
* Height of the input element in pixels.
|
|
292
|
+
* Use this to add appropriate padding to the popup.
|
|
293
|
+
*/
|
|
294
|
+
inputHeight: number;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Hook to access the Combobox Positioner context.
|
|
298
|
+
* Returns null if used outside a ComboboxPositioner.
|
|
299
|
+
*/
|
|
300
|
+
declare function useComboboxPositionerContext(): ComboboxPositionerContextValue | null;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Data attributes for ComboboxInput component.
|
|
304
|
+
*/
|
|
305
|
+
declare const ComboboxInputDataAttributes: {
|
|
306
|
+
/**
|
|
307
|
+
* Identifies the component part.
|
|
308
|
+
* @type {'bazzaui-combobox-input'}
|
|
309
|
+
*/
|
|
310
|
+
readonly slot: "bazzaui-combobox-input";
|
|
311
|
+
/** Present when the combobox popup is open. */
|
|
312
|
+
readonly open: "data-open";
|
|
313
|
+
/** Present when the combobox popup is closed. */
|
|
314
|
+
readonly closed: "data-closed";
|
|
315
|
+
/** Present when the input is disabled. */
|
|
316
|
+
readonly disabled: "data-disabled";
|
|
317
|
+
/** Present when no value is selected (showing placeholder). */
|
|
318
|
+
readonly placeholder: "data-placeholder";
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
interface ComboboxInputState extends Record<string, unknown> {
|
|
322
|
+
/**
|
|
323
|
+
* Whether the combobox popup is open.
|
|
324
|
+
*/
|
|
325
|
+
open: boolean;
|
|
326
|
+
/**
|
|
327
|
+
* Whether the input is disabled.
|
|
328
|
+
*/
|
|
329
|
+
disabled: boolean;
|
|
330
|
+
/**
|
|
331
|
+
* Whether the input currently shows placeholder (no value selected).
|
|
332
|
+
*/
|
|
333
|
+
placeholder: boolean;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Cursor behavior when the combobox popup opens.
|
|
337
|
+
* - `'none'` - Don't move the cursor (cursor appears where clicked)
|
|
338
|
+
* - `'end'` - Move cursor to the end of the input
|
|
339
|
+
* - `'select-all'` - Move cursor to the end and select all text
|
|
340
|
+
*/
|
|
341
|
+
type ComboboxInputCursorBehavior = 'none' | 'end' | 'select-all';
|
|
342
|
+
interface ComboboxInputProps extends Omit<ComponentProps<'input', ComboboxInput.State>, 'value' | 'onChange' | 'type'> {
|
|
343
|
+
/**
|
|
344
|
+
* Placeholder text shown when no value is selected and input is empty.
|
|
345
|
+
* Overrides the placeholder set on Combobox.Root.
|
|
346
|
+
*/
|
|
347
|
+
placeholder?: string;
|
|
348
|
+
/**
|
|
349
|
+
* Cursor behavior when the combobox popup opens.
|
|
350
|
+
* - `'none'` - Don't move the cursor (cursor appears where clicked)
|
|
351
|
+
* - `'end'` - Move cursor to the end of the input
|
|
352
|
+
* - `'select-all'` - Move cursor to the end and select all text
|
|
353
|
+
*
|
|
354
|
+
* @default 'none'
|
|
355
|
+
*/
|
|
356
|
+
cursorBehavior?: ComboboxInputCursorBehavior;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* An input that acts as both the trigger and search field for the combobox.
|
|
360
|
+
* Renders an `<input>` element with combobox ARIA semantics.
|
|
361
|
+
*/
|
|
362
|
+
declare const ComboboxInput: React$1.ForwardRefExoticComponent<Omit<ComboboxInput.Props, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
363
|
+
declare namespace ComboboxInput {
|
|
364
|
+
interface Props extends ComboboxInputProps {
|
|
365
|
+
}
|
|
366
|
+
type State = ComboboxInputState;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Data attributes for ComboboxInputWrapper component.
|
|
371
|
+
*/
|
|
372
|
+
declare const ComboboxInputWrapperDataAttributes: {
|
|
373
|
+
/**
|
|
374
|
+
* Identifies the component part.
|
|
375
|
+
* @type {'bazzaui-combobox-input-wrapper'}
|
|
376
|
+
*/
|
|
377
|
+
readonly slot: "bazzaui-combobox-input-wrapper";
|
|
378
|
+
/** Present when the combobox popup is open. */
|
|
379
|
+
readonly open: "data-open";
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
interface ComboboxInputWrapperState extends Record<string, unknown> {
|
|
383
|
+
/**
|
|
384
|
+
* Whether the combobox popup is open.
|
|
385
|
+
*/
|
|
386
|
+
open: boolean;
|
|
387
|
+
}
|
|
388
|
+
interface ComboboxInputWrapperProps extends ComponentProps<'div', ComboboxInputWrapper.State> {
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* A wrapper component for the Combobox.Input and Combobox.Icon.
|
|
392
|
+
* Provides relative positioning context and manages z-index for input-embedded layouts.
|
|
393
|
+
* Use this to position icons or other elements inside/over the input.
|
|
394
|
+
*
|
|
395
|
+
* Renders a `<div>` element with `position: relative`.
|
|
396
|
+
*/
|
|
397
|
+
declare const ComboboxInputWrapper: React$1.ForwardRefExoticComponent<Omit<ComboboxInputWrapper.Props, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
398
|
+
declare namespace ComboboxInputWrapper {
|
|
399
|
+
type State = ComboboxInputWrapperState;
|
|
400
|
+
interface Props extends ComboboxInputWrapperProps {
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Data attributes applied to Combobox.Item for styling.
|
|
406
|
+
*
|
|
407
|
+
* @example
|
|
408
|
+
* ```css
|
|
409
|
+
* [data-bazzaui-combobox-item][data-highlighted] {
|
|
410
|
+
* background: var(--highlight-bg);
|
|
411
|
+
* }
|
|
412
|
+
* [data-bazzaui-combobox-item][data-selected] {
|
|
413
|
+
* font-weight: bold;
|
|
414
|
+
* }
|
|
415
|
+
* [data-bazzaui-combobox-item][data-disabled] {
|
|
416
|
+
* opacity: 0.5;
|
|
417
|
+
* pointer-events: none;
|
|
418
|
+
* }
|
|
419
|
+
* ```
|
|
420
|
+
*/
|
|
421
|
+
declare const ComboboxItemDataAttributes: {
|
|
422
|
+
/**
|
|
423
|
+
* Identifies the component part.
|
|
424
|
+
* @type {'bazzaui-combobox-item'}
|
|
425
|
+
*/
|
|
426
|
+
readonly slot: "bazzaui-combobox-item";
|
|
427
|
+
/** Present when the item is highlighted (via keyboard or pointer). */
|
|
428
|
+
readonly highlighted: "data-highlighted";
|
|
429
|
+
/** Present when the item is disabled. */
|
|
430
|
+
readonly disabled: "data-disabled";
|
|
431
|
+
/** Present when the item is currently selected. */
|
|
432
|
+
readonly selected: "data-selected";
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
interface ComboboxItemState extends Record<string, unknown> {
|
|
436
|
+
/**
|
|
437
|
+
* Whether the item is highlighted (via keyboard or pointer).
|
|
438
|
+
*/
|
|
439
|
+
highlighted: boolean;
|
|
440
|
+
/**
|
|
441
|
+
* Whether the item is disabled.
|
|
442
|
+
*/
|
|
443
|
+
disabled: boolean;
|
|
444
|
+
/**
|
|
445
|
+
* Whether the item is currently selected.
|
|
446
|
+
*/
|
|
447
|
+
selected: boolean;
|
|
448
|
+
}
|
|
449
|
+
interface ComboboxItemProps<Value = unknown> extends ComponentProps<'div', ComboboxItem.State> {
|
|
450
|
+
/**
|
|
451
|
+
* The value of this item. Required and must be unique within the Combobox.
|
|
452
|
+
* Can be a primitive or an object.
|
|
453
|
+
*/
|
|
454
|
+
value: Value;
|
|
455
|
+
/**
|
|
456
|
+
* Text value to use for display in the input when this item is selected.
|
|
457
|
+
* If not provided, the text content of the item will be used.
|
|
458
|
+
* For object values, this can be auto-detected from `{ label }` shape.
|
|
459
|
+
*/
|
|
460
|
+
textValue?: string;
|
|
461
|
+
/**
|
|
462
|
+
* Additional keywords to match against when filtering.
|
|
463
|
+
* Useful for aliases or synonyms.
|
|
464
|
+
*/
|
|
465
|
+
keywords?: string[];
|
|
466
|
+
/**
|
|
467
|
+
* Whether this item is disabled.
|
|
468
|
+
* Disabled items are not selectable and are skipped during keyboard navigation.
|
|
469
|
+
*/
|
|
470
|
+
disabled?: boolean;
|
|
471
|
+
/**
|
|
472
|
+
* Callback when this item is selected.
|
|
473
|
+
*/
|
|
474
|
+
onSelect?: () => void;
|
|
475
|
+
/**
|
|
476
|
+
* Whether to force render this item regardless of filter results.
|
|
477
|
+
* @default false
|
|
478
|
+
*/
|
|
479
|
+
forceMount?: boolean;
|
|
480
|
+
}
|
|
481
|
+
declare const ComboboxItem: <Value = unknown>(props: ComboboxItemProps<Value> & React$1.RefAttributes<HTMLDivElement>) => React$1.ReactElement | null;
|
|
482
|
+
declare namespace ComboboxItem {
|
|
483
|
+
type State = ComboboxItemState;
|
|
484
|
+
interface Props<Value = unknown> extends ComboboxItemProps<Value> {
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Data attributes for ComboboxItemIndicator component.
|
|
490
|
+
*/
|
|
491
|
+
declare const ComboboxItemIndicatorDataAttributes: {
|
|
492
|
+
/**
|
|
493
|
+
* Identifies the component part.
|
|
494
|
+
* @type {'bazzaui-combobox-item-indicator'}
|
|
495
|
+
*/
|
|
496
|
+
readonly slot: "bazzaui-combobox-item-indicator";
|
|
497
|
+
/** Present when the item is selected. */
|
|
498
|
+
readonly selected: "data-selected";
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
interface ComboboxItemIndicatorState extends Record<string, unknown> {
|
|
502
|
+
/**
|
|
503
|
+
* Whether the parent item is selected.
|
|
504
|
+
*/
|
|
505
|
+
selected: boolean;
|
|
506
|
+
}
|
|
507
|
+
interface ComboboxItemIndicatorProps extends ComponentProps<'span', ComboboxItemIndicator.State> {
|
|
508
|
+
/**
|
|
509
|
+
* Whether to always render the indicator regardless of selection state.
|
|
510
|
+
* When false (default), only renders when the item is selected.
|
|
511
|
+
* @default false
|
|
512
|
+
*/
|
|
513
|
+
keepMounted?: boolean;
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Visual indicator for the selected state of a combobox item.
|
|
517
|
+
* Only renders when the parent item is selected (unless keepMounted is true).
|
|
518
|
+
* Renders a `<span>` element.
|
|
519
|
+
*/
|
|
520
|
+
declare const ComboboxItemIndicator: React$1.ForwardRefExoticComponent<Omit<ComboboxItemIndicator.Props, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
521
|
+
declare namespace ComboboxItemIndicator {
|
|
522
|
+
type State = ComboboxItemIndicatorState;
|
|
523
|
+
interface Props extends ComboboxItemIndicatorProps {
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
interface ComboboxItemLabelState extends Record<string, unknown> {
|
|
528
|
+
/**
|
|
529
|
+
* The serialized string key for the parent item's value.
|
|
530
|
+
* For object values, this is the result of `itemToStringValue` or the auto-detected `.value` property.
|
|
531
|
+
*/
|
|
532
|
+
value: string;
|
|
533
|
+
/**
|
|
534
|
+
* Whether the parent item is selected.
|
|
535
|
+
*/
|
|
536
|
+
selected: boolean;
|
|
537
|
+
/**
|
|
538
|
+
* Whether the parent item is highlighted.
|
|
539
|
+
*/
|
|
540
|
+
highlighted: boolean;
|
|
541
|
+
/**
|
|
542
|
+
* Whether the parent item is disabled.
|
|
543
|
+
*/
|
|
544
|
+
disabled: boolean;
|
|
545
|
+
}
|
|
546
|
+
interface ComboboxItemLabelProps extends ComponentProps<'span', ComboboxItemLabel.State> {
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Renders the text label for a combobox item.
|
|
550
|
+
*
|
|
551
|
+
* When no children are provided, automatically renders the label from:
|
|
552
|
+
* 1. The `items` prop passed to `Combobox.Root`
|
|
553
|
+
* 2. The `textValue` prop on `Combobox.Item`
|
|
554
|
+
* 3. Falls back to the item's value
|
|
555
|
+
*
|
|
556
|
+
* Also registers the text content for use in the input display.
|
|
557
|
+
* Renders a `<span>` element.
|
|
558
|
+
*/
|
|
559
|
+
declare const ComboboxItemLabel: React$1.ForwardRefExoticComponent<Omit<ComboboxItemLabel.Props, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
560
|
+
declare namespace ComboboxItemLabel {
|
|
561
|
+
interface Props extends ComboboxItemLabelProps {
|
|
562
|
+
}
|
|
563
|
+
type State = ComboboxItemLabelState;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Data attributes for ComboboxPositioner component.
|
|
568
|
+
*/
|
|
569
|
+
declare const ComboboxPositionerDataAttributes: {
|
|
570
|
+
/**
|
|
571
|
+
* Identifies the component part.
|
|
572
|
+
* @type {'bazzaui-combobox-positioner'}
|
|
573
|
+
*/
|
|
574
|
+
readonly slot: "bazzaui-combobox-positioner";
|
|
575
|
+
};
|
|
576
|
+
|
|
577
|
+
interface ComboboxPositionerProps extends PopoverPositionerProps {
|
|
578
|
+
/**
|
|
579
|
+
* Override the layout mode for the popup.
|
|
580
|
+
* If not provided, uses the `layout` from `Combobox.Root`.
|
|
581
|
+
*
|
|
582
|
+
* - `'floating'` - Standard dropdown positioning below/above the input
|
|
583
|
+
* - `'input-embedded'` - Popup wraps around the input (macOS Spotlight-style).
|
|
584
|
+
* The input appears to be inside the popup at the top.
|
|
585
|
+
*
|
|
586
|
+
* When `'input-embedded'`:
|
|
587
|
+
* - Popup is positioned flush with the input (sideOffset=0)
|
|
588
|
+
* - Alignment is centered on the input
|
|
589
|
+
* - Positioning styles are automatically applied to the Popup child
|
|
590
|
+
* - Use `popupPadding` to control the padding around the input
|
|
591
|
+
* - `data-input-embedded` attribute is added to Input, Positioner, Popup, and List
|
|
592
|
+
*/
|
|
593
|
+
layout?: ComboboxLayout;
|
|
594
|
+
/**
|
|
595
|
+
* Padding around the popup content when `layout="input-embedded"`.
|
|
596
|
+
* Creates the "encapsulated" look where the input appears inside the popup
|
|
597
|
+
* with padding on all sides.
|
|
598
|
+
*
|
|
599
|
+
* Only applies when `layout="input-embedded"`.
|
|
600
|
+
*
|
|
601
|
+
* @default 8
|
|
602
|
+
*/
|
|
603
|
+
popupPadding?: number;
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* Positions the combobox popup against the input.
|
|
607
|
+
* Uses the input element as the anchor for positioning.
|
|
608
|
+
*
|
|
609
|
+
* Supports `alignInputWithPopup` mode where the popup visually wraps around
|
|
610
|
+
* the input, making the input appear to be inside the popup (macOS-style).
|
|
611
|
+
*
|
|
612
|
+
* Renders a `<div>` element.
|
|
613
|
+
*/
|
|
614
|
+
declare const ComboboxPositioner: React$1.ForwardRefExoticComponent<ComboboxPositionerProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
615
|
+
declare namespace ComboboxPositioner {
|
|
616
|
+
type Props = ComboboxPositionerProps;
|
|
617
|
+
type State = Popover.Positioner.State;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* Type for custom item equality comparison functions.
|
|
622
|
+
* Used to compare object values in Select and Combobox components.
|
|
623
|
+
*/
|
|
624
|
+
type ItemEqualityComparer<Value = unknown> = (itemValue: Value, value: Value) => boolean;
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* Reasons why the combobox's open state changed.
|
|
628
|
+
*/
|
|
629
|
+
type ComboboxOpenChangeReason = typeof triggerPress | typeof escapeKey | typeof outsidePress | typeof focusOut | typeof itemPress | typeof inputChange | typeof inputClear | typeof listNavigation | typeof imperativeAction | typeof none;
|
|
630
|
+
/**
|
|
631
|
+
* Event details passed to the `onOpenChange` callback.
|
|
632
|
+
*/
|
|
633
|
+
type ComboboxOpenChangeEventDetails = ChangeEventDetails<ComboboxOpenChangeReason>;
|
|
634
|
+
/**
|
|
635
|
+
* Reasons why highlight changed.
|
|
636
|
+
*/
|
|
637
|
+
type ComboboxHighlightChangeReason = typeof pointer | typeof keyboard | typeof none;
|
|
638
|
+
/**
|
|
639
|
+
* Event details passed to the `onHighlightChange` callback.
|
|
640
|
+
*/
|
|
641
|
+
type ComboboxHighlightChangeEventDetails = GenericEventDetails<ComboboxHighlightChangeReason, {
|
|
642
|
+
index: number;
|
|
643
|
+
}>;
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Helper type to determine the value type based on the multiple flag.
|
|
647
|
+
*/
|
|
648
|
+
type ComboboxValueType<Value, Multiple extends boolean | undefined> = Multiple extends true ? Value[] : Value | null;
|
|
649
|
+
interface ComboboxRootProps<Value = unknown, Multiple extends boolean | undefined = false> extends Omit<PopoverRootProps, 'open' | 'onOpenChange' | 'defaultOpen'> {
|
|
650
|
+
/**
|
|
651
|
+
* Whether the combobox is open.
|
|
652
|
+
* Use for controlled mode.
|
|
653
|
+
*/
|
|
654
|
+
open?: boolean;
|
|
655
|
+
/**
|
|
656
|
+
* Callback when the open state changes.
|
|
657
|
+
* The second parameter contains event details including the reason for the change.
|
|
658
|
+
*/
|
|
659
|
+
onOpenChange?: (open: boolean, eventDetails: ComboboxOpenChangeEventDetails) => void;
|
|
660
|
+
/**
|
|
661
|
+
* Whether the combobox is initially open.
|
|
662
|
+
* Use for uncontrolled mode.
|
|
663
|
+
* @default false
|
|
664
|
+
*/
|
|
665
|
+
defaultOpen?: boolean;
|
|
666
|
+
/**
|
|
667
|
+
* Current selected value (single-select mode).
|
|
668
|
+
* Use for controlled mode.
|
|
669
|
+
* Can be a primitive or an object.
|
|
670
|
+
*/
|
|
671
|
+
value?: ComboboxValueType<Value, Multiple>;
|
|
672
|
+
/**
|
|
673
|
+
* Default selected value (single-select mode).
|
|
674
|
+
* Use for uncontrolled mode.
|
|
675
|
+
*/
|
|
676
|
+
defaultValue?: ComboboxValueType<Value, Multiple>;
|
|
677
|
+
/**
|
|
678
|
+
* Callback when the selected value changes (single-select mode).
|
|
679
|
+
*/
|
|
680
|
+
onValueChange?: (value: Value) => void;
|
|
681
|
+
/**
|
|
682
|
+
* Whether multi-select mode is enabled.
|
|
683
|
+
* @default false
|
|
684
|
+
*/
|
|
685
|
+
multiple?: Multiple;
|
|
686
|
+
/**
|
|
687
|
+
* Current selected values (multi-select mode).
|
|
688
|
+
* Use for controlled mode.
|
|
689
|
+
*/
|
|
690
|
+
values?: Value[];
|
|
691
|
+
/**
|
|
692
|
+
* Default selected values (multi-select mode).
|
|
693
|
+
* Use for uncontrolled mode.
|
|
694
|
+
*/
|
|
695
|
+
defaultValues?: Value[];
|
|
696
|
+
/**
|
|
697
|
+
* Callback when the selected values change (multi-select mode).
|
|
698
|
+
*/
|
|
699
|
+
onValuesChange?: (values: Value[]) => void;
|
|
700
|
+
/**
|
|
701
|
+
* Custom comparison logic used to determine if a combobox item value
|
|
702
|
+
* matches the current selected value.
|
|
703
|
+
* Useful when item values are objects without matching referentially.
|
|
704
|
+
* Defaults to Object.is comparison.
|
|
705
|
+
*/
|
|
706
|
+
isItemEqualToValue?: ItemEqualityComparer<Value>;
|
|
707
|
+
/**
|
|
708
|
+
* When the item values are objects (`<Combobox.Item value={object}>`),
|
|
709
|
+
* this function converts the object value to a string representation
|
|
710
|
+
* for display in the input.
|
|
711
|
+
* If the shape of the object is `{ value, label }`, the label will be
|
|
712
|
+
* used automatically without needing to specify this prop.
|
|
713
|
+
*/
|
|
714
|
+
itemToStringLabel?: (itemValue: Value) => string;
|
|
715
|
+
/**
|
|
716
|
+
* When the item values are objects (`<Combobox.Item value={object}>`),
|
|
717
|
+
* this function converts the object value to a string representation
|
|
718
|
+
* for form submission.
|
|
719
|
+
* If the shape of the object is `{ value, label }`, the value will be
|
|
720
|
+
* used automatically without needing to specify this prop.
|
|
721
|
+
*/
|
|
722
|
+
itemToStringValue?: (itemValue: Value) => string;
|
|
723
|
+
/**
|
|
724
|
+
* Current input value.
|
|
725
|
+
* Use for controlled mode.
|
|
726
|
+
*/
|
|
727
|
+
inputValue?: string;
|
|
728
|
+
/**
|
|
729
|
+
* Default input value.
|
|
730
|
+
* Use for uncontrolled mode.
|
|
731
|
+
*/
|
|
732
|
+
defaultInputValue?: string;
|
|
733
|
+
/**
|
|
734
|
+
* Callback when the input value changes.
|
|
735
|
+
*/
|
|
736
|
+
onInputValueChange?: (value: string) => void;
|
|
737
|
+
/**
|
|
738
|
+
* Form field name for submission.
|
|
739
|
+
* When set, hidden input(s) will be rendered for form submission.
|
|
740
|
+
*/
|
|
741
|
+
name?: string;
|
|
742
|
+
/**
|
|
743
|
+
* Associate with a form by ID.
|
|
744
|
+
*/
|
|
745
|
+
form?: string;
|
|
746
|
+
/**
|
|
747
|
+
* Whether this field is required.
|
|
748
|
+
*/
|
|
749
|
+
required?: boolean;
|
|
750
|
+
/**
|
|
751
|
+
* Whether the combobox is disabled.
|
|
752
|
+
* @default false
|
|
753
|
+
*/
|
|
754
|
+
disabled?: boolean;
|
|
755
|
+
/**
|
|
756
|
+
* Placeholder text for the input.
|
|
757
|
+
* @default "Search..."
|
|
758
|
+
*/
|
|
759
|
+
placeholder?: string;
|
|
760
|
+
/**
|
|
761
|
+
* Data structure of the items rendered in the combobox popup.
|
|
762
|
+
* When specified, the input shows the label of the selected item
|
|
763
|
+
* instead of the raw value.
|
|
764
|
+
*
|
|
765
|
+
* Can be a record mapping values to labels, or an array of { value, label } objects.
|
|
766
|
+
* @example
|
|
767
|
+
* ```tsx
|
|
768
|
+
* // Record format
|
|
769
|
+
* <Combobox.Root items={{ us: 'United States', uk: 'United Kingdom' }}>
|
|
770
|
+
*
|
|
771
|
+
* // Array format
|
|
772
|
+
* <Combobox.Root items={[
|
|
773
|
+
* { value: 'us', label: 'United States' },
|
|
774
|
+
* { value: 'uk', label: 'United Kingdom' },
|
|
775
|
+
* ]}>
|
|
776
|
+
* ```
|
|
777
|
+
*/
|
|
778
|
+
items?: Record<string, React$1.ReactNode> | Array<{
|
|
779
|
+
value: string;
|
|
780
|
+
label: React$1.ReactNode;
|
|
781
|
+
}>;
|
|
782
|
+
/**
|
|
783
|
+
* Determines if the combobox enters a modal state when open.
|
|
784
|
+
*
|
|
785
|
+
* - `true`: user interaction is limited to the combobox: document page scroll
|
|
786
|
+
* is locked, and pointer interactions on outside elements are disabled.
|
|
787
|
+
* - `false`: user interaction with the rest of the document is allowed.
|
|
788
|
+
* - `'trap-focus'`: focus is trapped inside the combobox, but document page
|
|
789
|
+
* scroll is not locked and pointer interactions outside of it remain enabled.
|
|
790
|
+
*
|
|
791
|
+
* @default false
|
|
792
|
+
*/
|
|
793
|
+
modal?: boolean | 'trap-focus';
|
|
794
|
+
/**
|
|
795
|
+
* Whether to close the popup after selecting an item.
|
|
796
|
+
* @default true for single-select, false for multi-select
|
|
797
|
+
*/
|
|
798
|
+
closeOnSelect?: boolean;
|
|
799
|
+
/**
|
|
800
|
+
* Whether to open the popup when the input is focused.
|
|
801
|
+
* @default true
|
|
802
|
+
*/
|
|
803
|
+
openOnFocus?: boolean;
|
|
804
|
+
/**
|
|
805
|
+
* Whether virtualization mode is enabled.
|
|
806
|
+
* When true, items should provide an explicit `index` prop and
|
|
807
|
+
* the `virtualItems` prop should be provided for navigation to work correctly.
|
|
808
|
+
* @default false
|
|
809
|
+
*/
|
|
810
|
+
virtualized?: boolean;
|
|
811
|
+
/**
|
|
812
|
+
* Pre-registered items for virtualization.
|
|
813
|
+
* When provided with `virtualized={true}`, this allows navigation to work
|
|
814
|
+
* for items that aren't currently mounted in the DOM.
|
|
815
|
+
*/
|
|
816
|
+
virtualItems?: VirtualItem[];
|
|
817
|
+
/**
|
|
818
|
+
* Callback when the highlighted item changes.
|
|
819
|
+
* Useful for synchronizing with a virtualizer (e.g., scrollToIndex).
|
|
820
|
+
* Only called when `virtualized={true}`.
|
|
821
|
+
* The third parameter contains event details including the reason for the change.
|
|
822
|
+
*/
|
|
823
|
+
onHighlightChange?: (id: string | null, index: number, eventDetails: ComboboxHighlightChangeEventDetails) => void;
|
|
824
|
+
/**
|
|
825
|
+
* The layout mode for the combobox popup.
|
|
826
|
+
*
|
|
827
|
+
* - `'floating'` (default) - Standard dropdown positioning below/above the input
|
|
828
|
+
* - `'input-embedded'` - Popup wraps around the input (macOS Spotlight-style).
|
|
829
|
+
* The input appears to be inside the popup at the top.
|
|
830
|
+
*
|
|
831
|
+
* When `'input-embedded'`:
|
|
832
|
+
* - `data-input-embedded` attribute is added to Input, Positioner, Popup, and List
|
|
833
|
+
* - Use CSS selectors like `[data-input-embedded]` to style components
|
|
834
|
+
*
|
|
835
|
+
* @default 'floating'
|
|
836
|
+
*/
|
|
837
|
+
layout?: ComboboxLayout;
|
|
838
|
+
/**
|
|
839
|
+
* Event handler called after any open/close animations have completed.
|
|
840
|
+
* When `clearSearchOnClose="after-exit"` is set on Surface, the search
|
|
841
|
+
* will be cleared before this callback is invoked.
|
|
842
|
+
*/
|
|
843
|
+
onOpenChangeComplete?: (open: boolean) => void;
|
|
844
|
+
children: React$1.ReactNode;
|
|
845
|
+
}
|
|
846
|
+
/**
|
|
847
|
+
* Groups all parts of the combobox.
|
|
848
|
+
* Manages open state, selection state, input state, and provides context to children.
|
|
849
|
+
* Doesn't render its own HTML element.
|
|
850
|
+
*
|
|
851
|
+
* @template Value - The type of the combobox value (can be a primitive or object)
|
|
852
|
+
* @template Multiple - Whether multiple selection is enabled
|
|
853
|
+
*/
|
|
854
|
+
declare function ComboboxRoot<Value = unknown, Multiple extends boolean | undefined = false>(props: ComboboxRootProps<Value, Multiple>): React$1.JSX.Element;
|
|
855
|
+
declare namespace ComboboxRoot {
|
|
856
|
+
interface Props<Value = unknown, Multiple extends boolean | undefined = false> extends ComboboxRootProps<Value, Multiple> {
|
|
857
|
+
}
|
|
858
|
+
type OpenChangeEventDetails = ComboboxOpenChangeEventDetails;
|
|
859
|
+
type HighlightChangeEventDetails = ComboboxHighlightChangeEventDetails;
|
|
860
|
+
type Actions = Popover.Root.Actions;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
interface ComboboxSurfaceProps extends Omit<PopupMenuSurfaceProps, 'autoHighlightFirst'> {
|
|
864
|
+
/**
|
|
865
|
+
* Controls auto-highlighting behavior when the combobox opens.
|
|
866
|
+
* - `true`: highlight the first item (default)
|
|
867
|
+
* - `false`: don't auto-highlight any item
|
|
868
|
+
* - `'selected'`: highlight the currently selected item, or first item if none selected
|
|
869
|
+
* - `string`: highlight the item with this specific value
|
|
870
|
+
* @default true
|
|
871
|
+
*/
|
|
872
|
+
autoHighlightFirst?: boolean | 'selected' | string;
|
|
873
|
+
}
|
|
874
|
+
/**
|
|
875
|
+
* Provides search context and manages item registration for Combobox.
|
|
876
|
+
* Automatically syncs the search state with the combobox's input value.
|
|
877
|
+
*
|
|
878
|
+
* Place inside Combobox.Popup to enable search functionality.
|
|
879
|
+
* Renders a `<div>` element.
|
|
880
|
+
*/
|
|
881
|
+
declare const ComboboxSurface: React$1.ForwardRefExoticComponent<Omit<ComboboxSurface.Props, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
882
|
+
declare namespace ComboboxSurface {
|
|
883
|
+
type State = PopupMenuSurface.State;
|
|
884
|
+
interface Props extends ComboboxSurfaceProps {
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
declare const index_parts$3_VirtualItem: typeof VirtualItem;
|
|
889
|
+
declare const index_parts$3_useComboboxPositionerContext: typeof useComboboxPositionerContext;
|
|
890
|
+
declare namespace index_parts$3 {
|
|
891
|
+
export { PopupMenuArrow as Arrow, PopupMenuBackdrop as Backdrop, ComboboxClear as Clear, PopupMenuEmpty as Empty, PopupMenuGroup as Group, PopupMenuGroupLabel as GroupLabel, PopupMenuIcon as Icon, ComboboxInput as Input, ComboboxInputWrapper as InputWrapper, ComboboxItem as Item, ComboboxItemIndicator as ItemIndicator, ComboboxItemLabel as ItemLabel, PopupMenuList as List, PopupMenuPopup as Popup, PopupMenuPortal as Portal, ComboboxPositioner as Positioner, ComboboxRoot as Root, PopupMenuScrollDownArrow as ScrollDownArrow, PopupMenuScrollUpArrow as ScrollUpArrow, PopupMenuSeparator as Separator, ComboboxSurface as Surface, index_parts$3_VirtualItem as VirtualItem, index_parts$3_useComboboxPositionerContext as useComboboxPositionerContext };
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
declare enum ComboboxArrowDataAttributes {
|
|
895
|
+
/**
|
|
896
|
+
* Identifies the component part.
|
|
897
|
+
* @type {'bazzaui-combobox-arrow'}
|
|
898
|
+
*/
|
|
899
|
+
slot = "bazzaui-combobox-arrow",
|
|
900
|
+
/**
|
|
901
|
+
* Present when the popup menu is open.
|
|
902
|
+
*/
|
|
903
|
+
open = "data-open",
|
|
904
|
+
/**
|
|
905
|
+
* Present when the popup menu is closed.
|
|
906
|
+
*/
|
|
907
|
+
closed = "data-closed",
|
|
908
|
+
/**
|
|
909
|
+
* Indicates which side the popup is positioned relative to the trigger.
|
|
910
|
+
* @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}
|
|
911
|
+
*/
|
|
912
|
+
side = "data-side",
|
|
913
|
+
/**
|
|
914
|
+
* Indicates how the popup is aligned relative to specified side.
|
|
915
|
+
* @type {'start' | 'center' | 'end'}
|
|
916
|
+
*/
|
|
917
|
+
align = "data-align",
|
|
918
|
+
/**
|
|
919
|
+
* Present when the arrow is not centered due to collision avoidance.
|
|
920
|
+
*/
|
|
921
|
+
uncentered = "data-uncentered"
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
declare enum ComboboxBackdropDataAttributes {
|
|
925
|
+
/**
|
|
926
|
+
* Identifies the component part.
|
|
927
|
+
* @type {'bazzaui-combobox-backdrop'}
|
|
928
|
+
*/
|
|
929
|
+
slot = "bazzaui-combobox-backdrop",
|
|
930
|
+
/**
|
|
931
|
+
* Present when the popup menu is open.
|
|
932
|
+
*/
|
|
933
|
+
open = "data-open",
|
|
934
|
+
/**
|
|
935
|
+
* Present when the popup menu is closed.
|
|
936
|
+
*/
|
|
937
|
+
closed = "data-closed",
|
|
938
|
+
/**
|
|
939
|
+
* Present when the popup menu is animating in.
|
|
940
|
+
*/
|
|
941
|
+
startingStyle = "data-starting-style",
|
|
942
|
+
/**
|
|
943
|
+
* Present when the popup menu is animating out.
|
|
944
|
+
*/
|
|
945
|
+
endingStyle = "data-ending-style"
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
declare enum ComboboxEmptyDataAttributes {
|
|
949
|
+
/**
|
|
950
|
+
* Identifies the component part.
|
|
951
|
+
* @type {'bazzaui-combobox-empty'}
|
|
952
|
+
*/
|
|
953
|
+
slot = "bazzaui-combobox-empty"
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
declare enum ComboboxGroupDataAttributes {
|
|
957
|
+
/**
|
|
958
|
+
* Identifies the component part.
|
|
959
|
+
* @type {'bazzaui-combobox-group'}
|
|
960
|
+
*/
|
|
961
|
+
slot = "bazzaui-combobox-group"
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
declare enum ComboboxGroupLabelDataAttributes {
|
|
965
|
+
/**
|
|
966
|
+
* Identifies the component part.
|
|
967
|
+
* @type {'bazzaui-combobox-group-label'}
|
|
968
|
+
*/
|
|
969
|
+
slot = "bazzaui-combobox-group-label"
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
declare const ComboboxIconDataAttributes: {
|
|
973
|
+
/**
|
|
974
|
+
* Identifies the component part.
|
|
975
|
+
* @type {'bazzaui-combobox-icon'}
|
|
976
|
+
*/
|
|
977
|
+
readonly slot: "bazzaui-combobox-icon";
|
|
978
|
+
/** Present when the popup is open. */
|
|
979
|
+
readonly open: "data-popup-open";
|
|
980
|
+
};
|
|
981
|
+
|
|
982
|
+
declare enum ComboboxListDataAttributes {
|
|
983
|
+
/**
|
|
984
|
+
* Identifies the component part.
|
|
985
|
+
* @type {'bazzaui-combobox-list'}
|
|
986
|
+
*/
|
|
987
|
+
slot = "bazzaui-combobox-list",
|
|
988
|
+
/**
|
|
989
|
+
* Always present on the list element.
|
|
990
|
+
* Used for styling and by useStickyRowWidth to find the list container.
|
|
991
|
+
*/
|
|
992
|
+
list = "data-popup-menu-list"
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
declare enum ComboboxPopupDataAttributes {
|
|
996
|
+
/**
|
|
997
|
+
* Identifies the component part.
|
|
998
|
+
* @type {'bazzaui-combobox-popup'}
|
|
999
|
+
*/
|
|
1000
|
+
slot = "bazzaui-combobox-popup",
|
|
1001
|
+
/**
|
|
1002
|
+
* Present when the popup menu is open.
|
|
1003
|
+
*/
|
|
1004
|
+
open = "data-open",
|
|
1005
|
+
/**
|
|
1006
|
+
* Present when the popup menu is closed.
|
|
1007
|
+
*/
|
|
1008
|
+
closed = "data-closed",
|
|
1009
|
+
/**
|
|
1010
|
+
* Indicates which side the popup is positioned relative to the trigger.
|
|
1011
|
+
* @type {'top' | 'bottom' | 'left' | 'right'}
|
|
1012
|
+
*/
|
|
1013
|
+
side = "data-side",
|
|
1014
|
+
/**
|
|
1015
|
+
* Indicates how the popup is aligned relative to specified side.
|
|
1016
|
+
* @type {'start' | 'center' | 'end'}
|
|
1017
|
+
*/
|
|
1018
|
+
align = "data-align",
|
|
1019
|
+
/**
|
|
1020
|
+
* Present when the popup is animating in.
|
|
1021
|
+
*/
|
|
1022
|
+
startingStyle = "data-starting-style",
|
|
1023
|
+
/**
|
|
1024
|
+
* Present when the popup is animating out.
|
|
1025
|
+
*/
|
|
1026
|
+
endingStyle = "data-ending-style",
|
|
1027
|
+
/**
|
|
1028
|
+
* Present if animations should be instant.
|
|
1029
|
+
* @type {'click' | 'dismiss'}
|
|
1030
|
+
*/
|
|
1031
|
+
instant = "data-instant",
|
|
1032
|
+
/**
|
|
1033
|
+
* Present when this popup's surface is the focus owner.
|
|
1034
|
+
* Useful for styling the currently focused menu in a submenu chain.
|
|
1035
|
+
*/
|
|
1036
|
+
focused = "data-focused",
|
|
1037
|
+
/**
|
|
1038
|
+
* Present when this popup has an open submenu below it in the menu tree.
|
|
1039
|
+
* Useful for styling all parent menus in an open submenu chain.
|
|
1040
|
+
*/
|
|
1041
|
+
hasOpenSubmenu = "data-has-open-submenu",
|
|
1042
|
+
/**
|
|
1043
|
+
* Present when this popup is a submenu (not the root menu).
|
|
1044
|
+
* Useful for applying different styles to submenus vs root menus.
|
|
1045
|
+
*/
|
|
1046
|
+
submenu = "data-submenu"
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
declare const ComboboxScrollArrowDataAttributes: {
|
|
1050
|
+
/**
|
|
1051
|
+
* Identifies the component part for scroll up arrow.
|
|
1052
|
+
* @type {'bazzaui-combobox-scroll-up-arrow'}
|
|
1053
|
+
*/
|
|
1054
|
+
readonly slotUp: "bazzaui-combobox-scroll-up-arrow";
|
|
1055
|
+
/**
|
|
1056
|
+
* Identifies the component part for scroll down arrow.
|
|
1057
|
+
* @type {'bazzaui-combobox-scroll-down-arrow'}
|
|
1058
|
+
*/
|
|
1059
|
+
readonly slotDown: "bazzaui-combobox-scroll-down-arrow";
|
|
1060
|
+
/**
|
|
1061
|
+
* Direction of the scroll arrow.
|
|
1062
|
+
* @type {'up' | 'down'}
|
|
1063
|
+
*/
|
|
1064
|
+
readonly direction: "data-direction";
|
|
1065
|
+
/**
|
|
1066
|
+
* Side of the popup.
|
|
1067
|
+
* @type {'top' | 'bottom' | 'left' | 'right'}
|
|
1068
|
+
*/
|
|
1069
|
+
readonly side: "data-side";
|
|
1070
|
+
};
|
|
1071
|
+
|
|
1072
|
+
declare enum ComboboxSeparatorDataAttributes {
|
|
1073
|
+
/**
|
|
1074
|
+
* Identifies the component part.
|
|
1075
|
+
* @type {'bazzaui-combobox-separator'}
|
|
1076
|
+
*/
|
|
1077
|
+
slot = "bazzaui-combobox-separator"
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
/**
|
|
1081
|
+
* Filter mode for the combobox.
|
|
1082
|
+
* Controls how the search/filter value is determined.
|
|
1083
|
+
*
|
|
1084
|
+
* State transitions:
|
|
1085
|
+
* - Closed → open (no value) → { type: 'active' }
|
|
1086
|
+
* - Closed → open (with value) → { type: 'showAll' }
|
|
1087
|
+
* - Open + user types → { type: 'active' }
|
|
1088
|
+
* - Open → close → { type: 'frozen', search: <current> }
|
|
1089
|
+
*/
|
|
1090
|
+
type ComboboxFilterMode = {
|
|
1091
|
+
type: 'active';
|
|
1092
|
+
} | {
|
|
1093
|
+
type: 'showAll';
|
|
1094
|
+
} | {
|
|
1095
|
+
type: 'frozen';
|
|
1096
|
+
search: string;
|
|
1097
|
+
};
|
|
1098
|
+
/**
|
|
1099
|
+
* Item text registry for displaying selected values.
|
|
1100
|
+
* Maps serialized item value to its text content.
|
|
1101
|
+
*/
|
|
1102
|
+
type ItemTextRegistry$1 = Map<string, string>;
|
|
1103
|
+
/**
|
|
1104
|
+
* Context value for Combobox components.
|
|
1105
|
+
* Provides value state, input state, callbacks, and form integration.
|
|
1106
|
+
*
|
|
1107
|
+
* @template Value - The type of the combobox value (can be a primitive or object)
|
|
1108
|
+
*/
|
|
1109
|
+
interface ComboboxContextValue<Value = unknown> {
|
|
1110
|
+
/** Whether multi-select mode is enabled */
|
|
1111
|
+
multiple: boolean;
|
|
1112
|
+
/** Current selected value (single-select mode) */
|
|
1113
|
+
value: Value | null;
|
|
1114
|
+
/** Current selected values (multi-select mode) */
|
|
1115
|
+
values: Value[];
|
|
1116
|
+
/** Callback when value changes (single-select mode) */
|
|
1117
|
+
onValueChange: (value: Value) => void;
|
|
1118
|
+
/** Callback when values change (multi-select mode) */
|
|
1119
|
+
onValuesChange: (values: Value[]) => void;
|
|
1120
|
+
/**
|
|
1121
|
+
* Custom comparison logic used to determine if a combobox item value
|
|
1122
|
+
* matches the current selected value.
|
|
1123
|
+
* Useful when item values are objects without matching referentially.
|
|
1124
|
+
* Defaults to Object.is comparison.
|
|
1125
|
+
*/
|
|
1126
|
+
isItemEqualToValue: ItemEqualityComparer<Value>;
|
|
1127
|
+
/**
|
|
1128
|
+
* When the item values are objects, this function converts the object
|
|
1129
|
+
* value to a string representation for display in the input.
|
|
1130
|
+
* If the shape of the object is { value, label }, the label will be
|
|
1131
|
+
* used automatically without needing to specify this prop.
|
|
1132
|
+
*/
|
|
1133
|
+
itemToStringLabel?: (itemValue: Value) => string;
|
|
1134
|
+
/**
|
|
1135
|
+
* When the item values are objects, this function converts the object
|
|
1136
|
+
* value to a string representation for form submission.
|
|
1137
|
+
* If the shape of the object is { value, label }, the value will be
|
|
1138
|
+
* used automatically without needing to specify this prop.
|
|
1139
|
+
*/
|
|
1140
|
+
itemToStringValue?: (itemValue: Value) => string;
|
|
1141
|
+
/** Current input value */
|
|
1142
|
+
inputValue: string;
|
|
1143
|
+
/** Callback when input value changes */
|
|
1144
|
+
onInputValueChange: (value: string) => void;
|
|
1145
|
+
/** Form field name for submission */
|
|
1146
|
+
name?: string;
|
|
1147
|
+
/** Associate with a form by ID */
|
|
1148
|
+
form?: string;
|
|
1149
|
+
/** Whether this field is required */
|
|
1150
|
+
required?: boolean;
|
|
1151
|
+
/** Whether the combobox is disabled */
|
|
1152
|
+
disabled: boolean;
|
|
1153
|
+
/** Placeholder text for the input */
|
|
1154
|
+
placeholder: string;
|
|
1155
|
+
/** Registry of item values to their text content */
|
|
1156
|
+
itemTextRegistry: ItemTextRegistry$1;
|
|
1157
|
+
/** Register an item's text content */
|
|
1158
|
+
registerItemText: (value: string, text: string) => () => void;
|
|
1159
|
+
/**
|
|
1160
|
+
* Data structure of the items for label resolution.
|
|
1161
|
+
* Used to display labels before items mount (e.g., on initial render with defaultValue).
|
|
1162
|
+
* Can be a record mapping values to labels, or an array of { value, label } objects.
|
|
1163
|
+
*/
|
|
1164
|
+
items?: Record<string, React$1.ReactNode> | Array<{
|
|
1165
|
+
value: string;
|
|
1166
|
+
label: React$1.ReactNode;
|
|
1167
|
+
}>;
|
|
1168
|
+
/** ID for the listbox element */
|
|
1169
|
+
listId: string;
|
|
1170
|
+
/** Ref to the input element (also serves as anchor) */
|
|
1171
|
+
inputRef: React$1.RefObject<HTMLInputElement | null>;
|
|
1172
|
+
/** Callback to set the input element */
|
|
1173
|
+
setInputElement: (element: HTMLInputElement | null) => void;
|
|
1174
|
+
/** Ref to the input wrapper element (used as anchor when present) */
|
|
1175
|
+
inputWrapperRef: React$1.RefObject<HTMLElement | null>;
|
|
1176
|
+
/** Callback to set the input wrapper element */
|
|
1177
|
+
setInputWrapperElement: (element: HTMLElement | null) => void;
|
|
1178
|
+
/** Whether to close on selection (default: true for single, false for multiple) */
|
|
1179
|
+
closeOnSelect: boolean;
|
|
1180
|
+
/** Whether to open on focus */
|
|
1181
|
+
openOnFocus: boolean;
|
|
1182
|
+
/** Open the combobox */
|
|
1183
|
+
openCombobox: () => void;
|
|
1184
|
+
/** Close the combobox with an optional reason and event */
|
|
1185
|
+
closeCombobox: (reason?: ComboboxOpenChangeReason, event?: Event) => void;
|
|
1186
|
+
/**
|
|
1187
|
+
* Current filter mode for the combobox.
|
|
1188
|
+
* Controls how the search/filter value is determined.
|
|
1189
|
+
*/
|
|
1190
|
+
filterMode: ComboboxFilterMode;
|
|
1191
|
+
/** Set the filter mode to 'active' (normal filtering using inputValue) */
|
|
1192
|
+
setFilterActive: () => void;
|
|
1193
|
+
/**
|
|
1194
|
+
* Height of the input element in pixels.
|
|
1195
|
+
* Used by the positioner for input-embedded layout calculations.
|
|
1196
|
+
*/
|
|
1197
|
+
inputHeight: number;
|
|
1198
|
+
/**
|
|
1199
|
+
* Width of the input element in pixels.
|
|
1200
|
+
* Used by the positioner for input-embedded layout calculations.
|
|
1201
|
+
*/
|
|
1202
|
+
inputWidth: number;
|
|
1203
|
+
/**
|
|
1204
|
+
* The layout mode for the combobox popup.
|
|
1205
|
+
* - `'floating'` - Standard dropdown positioning
|
|
1206
|
+
* - `'input-embedded'` - Popup wraps around the input (macOS-style)
|
|
1207
|
+
*/
|
|
1208
|
+
layout: ComboboxLayout;
|
|
1209
|
+
}
|
|
1210
|
+
/**
|
|
1211
|
+
* Hook to access the Combobox context.
|
|
1212
|
+
* Throws if used outside a Combobox.Root.
|
|
1213
|
+
*/
|
|
1214
|
+
declare function useComboboxContext<Value = unknown>(): ComboboxContextValue<Value>;
|
|
1215
|
+
/**
|
|
1216
|
+
* Hook to optionally access the Combobox context.
|
|
1217
|
+
* Returns null if used outside a Combobox.Root.
|
|
1218
|
+
*/
|
|
1219
|
+
declare function useMaybeComboboxContext<Value = unknown>(): ComboboxContextValue<Value> | null;
|
|
1220
|
+
|
|
1221
|
+
/**
|
|
1222
|
+
* Context value for ComboboxItem.
|
|
1223
|
+
* Provides item state to child components like ItemIndicator.
|
|
1224
|
+
*
|
|
1225
|
+
* @template Value - The type of the item value (can be a primitive or object)
|
|
1226
|
+
*/
|
|
1227
|
+
interface ComboboxItemContextValue<Value = unknown> {
|
|
1228
|
+
/** Unique ID for the item element */
|
|
1229
|
+
id: string;
|
|
1230
|
+
/** The item's value */
|
|
1231
|
+
value: Value;
|
|
1232
|
+
/** The text value/label for this item */
|
|
1233
|
+
textValue: string | undefined;
|
|
1234
|
+
/** Whether the item is highlighted (via keyboard or pointer) */
|
|
1235
|
+
highlighted: boolean;
|
|
1236
|
+
/** Whether the item is disabled */
|
|
1237
|
+
disabled: boolean;
|
|
1238
|
+
/** Whether the item is selected */
|
|
1239
|
+
selected: boolean;
|
|
1240
|
+
}
|
|
1241
|
+
/**
|
|
1242
|
+
* Hook to access the ComboboxItem context.
|
|
1243
|
+
* Throws if used outside a ComboboxItem.
|
|
1244
|
+
*/
|
|
1245
|
+
declare function useComboboxItemContext<Value = unknown>(): ComboboxItemContextValue<Value>;
|
|
1246
|
+
/**
|
|
1247
|
+
* Hook to optionally access the ComboboxItem context.
|
|
1248
|
+
* Returns null if used outside a ComboboxItem.
|
|
1249
|
+
*/
|
|
1250
|
+
declare function useMaybeComboboxItemContext<Value = unknown>(): ComboboxItemContextValue<Value> | null;
|
|
1251
|
+
|
|
1252
|
+
/**
|
|
1253
|
+
* Reasons why the context menu's open state changed.
|
|
1254
|
+
*/
|
|
1255
|
+
type ContextMenuOpenChangeReason = typeof triggerContextMenu | typeof escapeKey | typeof outsidePress | typeof focusOut | typeof itemPress | typeof closePress | typeof listNavigation | typeof submenuTrigger | typeof siblingOpen | typeof imperativeAction | typeof none;
|
|
1256
|
+
/**
|
|
1257
|
+
* Event details passed to the `onOpenChange` callback.
|
|
1258
|
+
*/
|
|
1259
|
+
type ContextMenuOpenChangeEventDetails = ChangeEventDetails<ContextMenuOpenChangeReason>;
|
|
1260
|
+
/**
|
|
1261
|
+
* Reasons why highlight changed.
|
|
1262
|
+
*/
|
|
1263
|
+
type ContextMenuHighlightChangeReason = typeof pointer | typeof keyboard | typeof none;
|
|
1264
|
+
/**
|
|
1265
|
+
* Event details passed to the `onHighlightChange` callback.
|
|
1266
|
+
*/
|
|
1267
|
+
type ContextMenuHighlightChangeEventDetails = GenericEventDetails<ContextMenuHighlightChangeReason, {
|
|
1268
|
+
index: number;
|
|
1269
|
+
}>;
|
|
1270
|
+
|
|
1271
|
+
interface ContextMenuRootProps {
|
|
1272
|
+
/**
|
|
1273
|
+
* Whether the context menu is open.
|
|
1274
|
+
* Use for controlled mode.
|
|
1275
|
+
*/
|
|
1276
|
+
open?: boolean;
|
|
1277
|
+
/**
|
|
1278
|
+
* Callback when the open state changes.
|
|
1279
|
+
* The second parameter contains event details including the reason for the change.
|
|
1280
|
+
*/
|
|
1281
|
+
onOpenChange?: (open: boolean, eventDetails: ContextMenuOpenChangeEventDetails) => void;
|
|
1282
|
+
/**
|
|
1283
|
+
* Whether the context menu is initially open.
|
|
1284
|
+
* Use for uncontrolled mode.
|
|
1285
|
+
* @default false
|
|
1286
|
+
*/
|
|
1287
|
+
defaultOpen?: boolean;
|
|
1288
|
+
/**
|
|
1289
|
+
* Whether virtualization mode is enabled.
|
|
1290
|
+
* When true, items should provide an explicit `index` prop and
|
|
1291
|
+
* the `items` prop should be provided for navigation to work correctly.
|
|
1292
|
+
* @default false
|
|
1293
|
+
*/
|
|
1294
|
+
virtualized?: boolean;
|
|
1295
|
+
/**
|
|
1296
|
+
* Pre-registered items for virtualization.
|
|
1297
|
+
* When provided with `virtualized={true}`, this allows navigation to work
|
|
1298
|
+
* for items that aren't currently mounted in the DOM.
|
|
1299
|
+
*/
|
|
1300
|
+
items?: VirtualItem[];
|
|
1301
|
+
/**
|
|
1302
|
+
* Callback when the highlighted item changes.
|
|
1303
|
+
* Useful for synchronizing with a virtualizer (e.g., scrollToIndex).
|
|
1304
|
+
* Only called when `virtualized={true}`.
|
|
1305
|
+
* The third parameter contains event details including the reason for the change.
|
|
1306
|
+
*/
|
|
1307
|
+
onHighlightChange?: (id: string | null, index: number, eventDetails: ContextMenuHighlightChangeEventDetails) => void;
|
|
1308
|
+
/**
|
|
1309
|
+
* Whether the component should ignore user interaction.
|
|
1310
|
+
* @default false
|
|
1311
|
+
*/
|
|
1312
|
+
disabled?: boolean;
|
|
1313
|
+
/**
|
|
1314
|
+
* Determines if the context menu enters a modal state when open.
|
|
1315
|
+
*
|
|
1316
|
+
* - `true`: user interaction is limited to the menu: document page scroll
|
|
1317
|
+
* is locked, and pointer interactions on outside elements are disabled.
|
|
1318
|
+
* - `false`: user interaction with the rest of the document is allowed.
|
|
1319
|
+
*
|
|
1320
|
+
* @default true
|
|
1321
|
+
*/
|
|
1322
|
+
modal?: boolean;
|
|
1323
|
+
/**
|
|
1324
|
+
* When to close the menu on outside interactions.
|
|
1325
|
+
* - `'pointerdown'`: Close immediately when pointer is pressed outside (default)
|
|
1326
|
+
* - `'click'`: Close when a full click (pointerdown + pointerup) occurs outside
|
|
1327
|
+
* @default 'pointerdown'
|
|
1328
|
+
*/
|
|
1329
|
+
closeOnOutsidePress?: 'click' | 'pointerdown';
|
|
1330
|
+
/**
|
|
1331
|
+
* Event handler called after any open/close animations have completed.
|
|
1332
|
+
* When `clearSearchOnClose="after-exit"` is set on Surface, the search
|
|
1333
|
+
* will be cleared before this callback is invoked.
|
|
1334
|
+
*/
|
|
1335
|
+
onOpenChangeComplete?: (open: boolean) => void;
|
|
1336
|
+
/**
|
|
1337
|
+
* Function to generate qualified unique IDs for rows.
|
|
1338
|
+
* Defined once at the root level and applied to all surfaces (root and submenus).
|
|
1339
|
+
*
|
|
1340
|
+
* Default behavior:
|
|
1341
|
+
* - If node.id is provided, use it as-is (treat as globally unique)
|
|
1342
|
+
* - Otherwise, qualify with breadcrumbs + slugified value when deep searching
|
|
1343
|
+
*/
|
|
1344
|
+
getQualifiedRowId?: GetQualifiedRowIdFn;
|
|
1345
|
+
children: React$1.ReactNode;
|
|
1346
|
+
}
|
|
1347
|
+
/**
|
|
1348
|
+
* Groups all parts of the context menu.
|
|
1349
|
+
* Manages open state and provides context to children.
|
|
1350
|
+
* Doesn't render its own HTML element.
|
|
1351
|
+
*/
|
|
1352
|
+
declare function ContextMenuRoot(props: ContextMenuRoot.Props): react_jsx_runtime.JSX.Element;
|
|
1353
|
+
declare namespace ContextMenuRoot {
|
|
1354
|
+
interface Props extends ContextMenuRootProps {
|
|
1355
|
+
}
|
|
1356
|
+
type OpenChangeEventDetails = ContextMenuOpenChangeEventDetails;
|
|
1357
|
+
type HighlightChangeEventDetails = ContextMenuHighlightChangeEventDetails;
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
interface ContextMenuTriggerState extends Record<string, unknown> {
|
|
1361
|
+
/**
|
|
1362
|
+
* Whether the context menu is currently open.
|
|
1363
|
+
*/
|
|
1364
|
+
open: boolean;
|
|
1365
|
+
/**
|
|
1366
|
+
* Whether the trigger is currently being pressed (long-press in progress).
|
|
1367
|
+
*/
|
|
1368
|
+
pressed: boolean;
|
|
1369
|
+
/**
|
|
1370
|
+
* Whether the trigger is disabled.
|
|
1371
|
+
*/
|
|
1372
|
+
disabled: boolean;
|
|
1373
|
+
}
|
|
1374
|
+
interface ContextMenuTriggerProps extends ComponentProps<'div', ContextMenuTrigger.State> {
|
|
1375
|
+
/**
|
|
1376
|
+
* Whether the trigger is disabled.
|
|
1377
|
+
* When disabled, right-click and long-press will not open the menu.
|
|
1378
|
+
* @default false
|
|
1379
|
+
*/
|
|
1380
|
+
disabled?: boolean;
|
|
1381
|
+
}
|
|
1382
|
+
/**
|
|
1383
|
+
* An area that opens the context menu on right-click or long-press.
|
|
1384
|
+
* Renders a `<div>` element.
|
|
1385
|
+
*/
|
|
1386
|
+
declare const ContextMenuTrigger: React$1.ForwardRefExoticComponent<Omit<ContextMenuTrigger.Props, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1387
|
+
declare namespace ContextMenuTrigger {
|
|
1388
|
+
type State = ContextMenuTriggerState;
|
|
1389
|
+
interface Props extends ContextMenuTriggerProps {
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
declare const index_parts$2_VirtualItem: typeof VirtualItem;
|
|
1394
|
+
declare namespace index_parts$2 {
|
|
1395
|
+
export { PopupMenuArrow as Arrow, PopupMenuBackdrop as Backdrop, PopupMenuCheckboxItem as CheckboxItem, PopupMenuCheckboxItemIndicator as CheckboxItemIndicator, PopupMenuInput as DataInput, PopupMenuDataList as DataList, PopupMenuDataSurface as DataSurface, PopupMenuEmpty as Empty, PopupMenuGroup as Group, PopupMenuGroupLabel as GroupLabel, PopupMenuIcon as Icon, PopupMenuInput as Input, PopupMenuItem as Item, PopupMenuList as List, PopupMenuPopup as Popup, PopupMenuPortal as Portal, PopupMenuPositioner as Positioner, PopupMenuRadioGroup as RadioGroup, PopupMenuRadioGroupValue as RadioGroupValue, PopupMenuRadioItem as RadioItem, PopupMenuRadioItemIndicator as RadioItemIndicator, ContextMenuRoot as Root, PopupMenuScrollDownArrow as ScrollDownArrow, PopupMenuScrollUpArrow as ScrollUpArrow, PopupMenuSeparator as Separator, PopupMenuShortcut as Shortcut, PopupMenuSubmenuRoot as Submenu, PopupMenuSubmenuTrigger as SubmenuTrigger, PopupMenuSubmenuTriggerIndicator as SubmenuTriggerIndicator, PopupMenuSurface as Surface, ContextMenuTrigger as Trigger, index_parts$2_VirtualItem as VirtualItem };
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
declare enum ContextMenuTriggerDataAttributes {
|
|
1399
|
+
/**
|
|
1400
|
+
* Identifies the component part.
|
|
1401
|
+
* @type {'bazzaui-context-menu-trigger'}
|
|
1402
|
+
*/
|
|
1403
|
+
slot = "bazzaui-context-menu-trigger",
|
|
1404
|
+
/** Present when the corresponding context menu is open. */
|
|
1405
|
+
popupOpen = "data-popup-open",
|
|
1406
|
+
/** Present when the trigger is being pressed (long-press). */
|
|
1407
|
+
pressed = "data-pressed",
|
|
1408
|
+
/** Present when the trigger is disabled. */
|
|
1409
|
+
disabled = "data-disabled"
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
declare enum ContextMenuArrowDataAttributes {
|
|
1413
|
+
/**
|
|
1414
|
+
* Identifies the component part.
|
|
1415
|
+
* @type {'bazzaui-context-menu-arrow'}
|
|
1416
|
+
*/
|
|
1417
|
+
slot = "bazzaui-context-menu-arrow",
|
|
1418
|
+
/**
|
|
1419
|
+
* Present when the popup menu is open.
|
|
1420
|
+
*/
|
|
1421
|
+
open = "data-open",
|
|
1422
|
+
/**
|
|
1423
|
+
* Present when the popup menu is closed.
|
|
1424
|
+
*/
|
|
1425
|
+
closed = "data-closed",
|
|
1426
|
+
/**
|
|
1427
|
+
* Indicates which side the popup is positioned relative to the trigger.
|
|
1428
|
+
* @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}
|
|
1429
|
+
*/
|
|
1430
|
+
side = "data-side",
|
|
1431
|
+
/**
|
|
1432
|
+
* Indicates how the popup is aligned relative to specified side.
|
|
1433
|
+
* @type {'start' | 'center' | 'end'}
|
|
1434
|
+
*/
|
|
1435
|
+
align = "data-align",
|
|
1436
|
+
/**
|
|
1437
|
+
* Present when the arrow is not centered due to collision avoidance.
|
|
1438
|
+
*/
|
|
1439
|
+
uncentered = "data-uncentered"
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
declare enum ContextMenuBackdropDataAttributes {
|
|
1443
|
+
/**
|
|
1444
|
+
* Identifies the component part.
|
|
1445
|
+
* @type {'bazzaui-context-menu-backdrop'}
|
|
1446
|
+
*/
|
|
1447
|
+
slot = "bazzaui-context-menu-backdrop",
|
|
1448
|
+
/**
|
|
1449
|
+
* Present when the popup menu is open.
|
|
1450
|
+
*/
|
|
1451
|
+
open = "data-open",
|
|
1452
|
+
/**
|
|
1453
|
+
* Present when the popup menu is closed.
|
|
1454
|
+
*/
|
|
1455
|
+
closed = "data-closed",
|
|
1456
|
+
/**
|
|
1457
|
+
* Present when the popup menu is animating in.
|
|
1458
|
+
*/
|
|
1459
|
+
startingStyle = "data-starting-style",
|
|
1460
|
+
/**
|
|
1461
|
+
* Present when the popup menu is animating out.
|
|
1462
|
+
*/
|
|
1463
|
+
endingStyle = "data-ending-style"
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
declare enum ContextMenuCheckboxItemDataAttributes {
|
|
1467
|
+
/**
|
|
1468
|
+
* Identifies the component part.
|
|
1469
|
+
* @type {'bazzaui-context-menu-checkbox-item'}
|
|
1470
|
+
*/
|
|
1471
|
+
slot = "bazzaui-context-menu-checkbox-item",
|
|
1472
|
+
/**
|
|
1473
|
+
* Present when the checkbox item is checked.
|
|
1474
|
+
*/
|
|
1475
|
+
checked = "data-checked",
|
|
1476
|
+
/**
|
|
1477
|
+
* Present when the checkbox item is unchecked.
|
|
1478
|
+
*/
|
|
1479
|
+
unchecked = "data-unchecked",
|
|
1480
|
+
/**
|
|
1481
|
+
* Present when the item is highlighted (via keyboard or pointer).
|
|
1482
|
+
*/
|
|
1483
|
+
highlighted = "data-highlighted",
|
|
1484
|
+
/**
|
|
1485
|
+
* Present when the item is disabled.
|
|
1486
|
+
*/
|
|
1487
|
+
disabled = "data-disabled"
|
|
1488
|
+
}
|
|
1489
|
+
declare enum ContextMenuCheckboxItemIndicatorDataAttributes {
|
|
1490
|
+
/**
|
|
1491
|
+
* Identifies the component part.
|
|
1492
|
+
* @type {'bazzaui-context-menu-checkbox-item-indicator'}
|
|
1493
|
+
*/
|
|
1494
|
+
slot = "bazzaui-context-menu-checkbox-item-indicator",
|
|
1495
|
+
/**
|
|
1496
|
+
* Present when the checkbox item is checked.
|
|
1497
|
+
*/
|
|
1498
|
+
checked = "data-checked",
|
|
1499
|
+
/**
|
|
1500
|
+
* Present when the checkbox item is unchecked.
|
|
1501
|
+
*/
|
|
1502
|
+
unchecked = "data-unchecked"
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
declare enum ContextMenuEmptyDataAttributes {
|
|
1506
|
+
/**
|
|
1507
|
+
* Identifies the component part.
|
|
1508
|
+
* @type {'bazzaui-context-menu-empty'}
|
|
1509
|
+
*/
|
|
1510
|
+
slot = "bazzaui-context-menu-empty"
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
declare enum ContextMenuGroupDataAttributes {
|
|
1514
|
+
/**
|
|
1515
|
+
* Identifies the component part.
|
|
1516
|
+
* @type {'bazzaui-context-menu-group'}
|
|
1517
|
+
*/
|
|
1518
|
+
slot = "bazzaui-context-menu-group"
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
declare enum ContextMenuGroupLabelDataAttributes {
|
|
1522
|
+
/**
|
|
1523
|
+
* Identifies the component part.
|
|
1524
|
+
* @type {'bazzaui-context-menu-group-label'}
|
|
1525
|
+
*/
|
|
1526
|
+
slot = "bazzaui-context-menu-group-label"
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
declare const ContextMenuIconDataAttributes: {
|
|
1530
|
+
/**
|
|
1531
|
+
* Identifies the component part.
|
|
1532
|
+
* @type {'bazzaui-context-menu-icon'}
|
|
1533
|
+
*/
|
|
1534
|
+
readonly slot: "bazzaui-context-menu-icon";
|
|
1535
|
+
/** Present when the popup is open. */
|
|
1536
|
+
readonly open: "data-popup-open";
|
|
1537
|
+
};
|
|
1538
|
+
|
|
1539
|
+
declare enum ContextMenuInputDataAttributes {
|
|
1540
|
+
/**
|
|
1541
|
+
* Identifies the component part.
|
|
1542
|
+
* @type {'bazzaui-context-menu-input'}
|
|
1543
|
+
*/
|
|
1544
|
+
slot = "bazzaui-context-menu-input",
|
|
1545
|
+
/**
|
|
1546
|
+
* Present when the popup menu is open.
|
|
1547
|
+
*/
|
|
1548
|
+
open = "data-open",
|
|
1549
|
+
/**
|
|
1550
|
+
* Present when the popup menu is closed.
|
|
1551
|
+
*/
|
|
1552
|
+
closed = "data-closed"
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
declare enum ContextMenuItemDataAttributes {
|
|
1556
|
+
/**
|
|
1557
|
+
* Identifies the component part.
|
|
1558
|
+
* @type {'bazzaui-context-menu-item'}
|
|
1559
|
+
*/
|
|
1560
|
+
slot = "bazzaui-context-menu-item",
|
|
1561
|
+
/**
|
|
1562
|
+
* Present when the item is highlighted (via keyboard or pointer).
|
|
1563
|
+
*/
|
|
1564
|
+
highlighted = "data-highlighted",
|
|
1565
|
+
/**
|
|
1566
|
+
* Present when the item is disabled.
|
|
1567
|
+
*/
|
|
1568
|
+
disabled = "data-disabled"
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
declare enum ContextMenuListDataAttributes {
|
|
1572
|
+
/**
|
|
1573
|
+
* Identifies the component part.
|
|
1574
|
+
* @type {'bazzaui-context-menu-list'}
|
|
1575
|
+
*/
|
|
1576
|
+
slot = "bazzaui-context-menu-list",
|
|
1577
|
+
/**
|
|
1578
|
+
* Always present on the list element.
|
|
1579
|
+
* Used for styling and by useStickyRowWidth to find the list container.
|
|
1580
|
+
*/
|
|
1581
|
+
list = "data-popup-menu-list"
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
declare enum ContextMenuPopupDataAttributes {
|
|
1585
|
+
/**
|
|
1586
|
+
* Identifies the component part.
|
|
1587
|
+
* @type {'bazzaui-context-menu-popup'}
|
|
1588
|
+
*/
|
|
1589
|
+
slot = "bazzaui-context-menu-popup",
|
|
1590
|
+
/**
|
|
1591
|
+
* Present when the popup menu is open.
|
|
1592
|
+
*/
|
|
1593
|
+
open = "data-open",
|
|
1594
|
+
/**
|
|
1595
|
+
* Present when the popup menu is closed.
|
|
1596
|
+
*/
|
|
1597
|
+
closed = "data-closed",
|
|
1598
|
+
/**
|
|
1599
|
+
* Indicates which side the popup is positioned relative to the trigger.
|
|
1600
|
+
* @type {'top' | 'bottom' | 'left' | 'right'}
|
|
1601
|
+
*/
|
|
1602
|
+
side = "data-side",
|
|
1603
|
+
/**
|
|
1604
|
+
* Indicates how the popup is aligned relative to specified side.
|
|
1605
|
+
* @type {'start' | 'center' | 'end'}
|
|
1606
|
+
*/
|
|
1607
|
+
align = "data-align",
|
|
1608
|
+
/**
|
|
1609
|
+
* Present when the popup is animating in.
|
|
1610
|
+
*/
|
|
1611
|
+
startingStyle = "data-starting-style",
|
|
1612
|
+
/**
|
|
1613
|
+
* Present when the popup is animating out.
|
|
1614
|
+
*/
|
|
1615
|
+
endingStyle = "data-ending-style",
|
|
1616
|
+
/**
|
|
1617
|
+
* Present if animations should be instant.
|
|
1618
|
+
* @type {'click' | 'dismiss'}
|
|
1619
|
+
*/
|
|
1620
|
+
instant = "data-instant",
|
|
1621
|
+
/**
|
|
1622
|
+
* Present when this popup's surface is the focus owner.
|
|
1623
|
+
* Useful for styling the currently focused menu in a submenu chain.
|
|
1624
|
+
*/
|
|
1625
|
+
focused = "data-focused",
|
|
1626
|
+
/**
|
|
1627
|
+
* Present when this popup has an open submenu below it in the menu tree.
|
|
1628
|
+
* Useful for styling all parent menus in an open submenu chain.
|
|
1629
|
+
*/
|
|
1630
|
+
hasOpenSubmenu = "data-has-open-submenu",
|
|
1631
|
+
/**
|
|
1632
|
+
* Present when this popup is a submenu (not the root menu).
|
|
1633
|
+
* Useful for applying different styles to submenus vs root menus.
|
|
1634
|
+
*/
|
|
1635
|
+
submenu = "data-submenu"
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
declare enum ContextMenuPositionerDataAttributes {
|
|
1639
|
+
/**
|
|
1640
|
+
* Identifies the component part.
|
|
1641
|
+
* @type {'bazzaui-context-menu-positioner'}
|
|
1642
|
+
*/
|
|
1643
|
+
slot = "bazzaui-context-menu-positioner",
|
|
1644
|
+
/**
|
|
1645
|
+
* Present when the popup menu is open.
|
|
1646
|
+
*/
|
|
1647
|
+
open = "data-open",
|
|
1648
|
+
/**
|
|
1649
|
+
* Present when the popup menu is closed.
|
|
1650
|
+
*/
|
|
1651
|
+
closed = "data-closed",
|
|
1652
|
+
/**
|
|
1653
|
+
* Present when the anchor is hidden.
|
|
1654
|
+
*/
|
|
1655
|
+
anchorHidden = "data-anchor-hidden",
|
|
1656
|
+
/**
|
|
1657
|
+
* Indicates which side the popup is positioned relative to the trigger.
|
|
1658
|
+
* @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}
|
|
1659
|
+
*/
|
|
1660
|
+
side = "data-side",
|
|
1661
|
+
/**
|
|
1662
|
+
* Indicates how the popup is aligned relative to specified side.
|
|
1663
|
+
* @type {'start' | 'center' | 'end' | 'list-start'}
|
|
1664
|
+
*/
|
|
1665
|
+
align = "data-align"
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
declare enum ContextMenuRadioGroupDataAttributes {
|
|
1669
|
+
/**
|
|
1670
|
+
* Identifies the component part.
|
|
1671
|
+
* @type {'bazzaui-context-menu-radio-group'}
|
|
1672
|
+
*/
|
|
1673
|
+
slot = "bazzaui-context-menu-radio-group",
|
|
1674
|
+
/**
|
|
1675
|
+
* Present when the radio group is disabled.
|
|
1676
|
+
*/
|
|
1677
|
+
disabled = "data-disabled"
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
declare enum ContextMenuRadioItemDataAttributes {
|
|
1681
|
+
/**
|
|
1682
|
+
* Identifies the component part.
|
|
1683
|
+
* @type {'bazzaui-context-menu-radio-item'}
|
|
1684
|
+
*/
|
|
1685
|
+
slot = "bazzaui-context-menu-radio-item",
|
|
1686
|
+
/**
|
|
1687
|
+
* Present when the radio item is checked/selected.
|
|
1688
|
+
*/
|
|
1689
|
+
checked = "data-checked",
|
|
1690
|
+
/**
|
|
1691
|
+
* Present when the radio item is unchecked.
|
|
1692
|
+
*/
|
|
1693
|
+
unchecked = "data-unchecked",
|
|
1694
|
+
/**
|
|
1695
|
+
* Present when the item is highlighted (via keyboard or pointer).
|
|
1696
|
+
*/
|
|
1697
|
+
highlighted = "data-highlighted",
|
|
1698
|
+
/**
|
|
1699
|
+
* Present when the item is disabled.
|
|
1700
|
+
*/
|
|
1701
|
+
disabled = "data-disabled"
|
|
1702
|
+
}
|
|
1703
|
+
declare enum ContextMenuRadioItemIndicatorDataAttributes {
|
|
1704
|
+
/**
|
|
1705
|
+
* Identifies the component part.
|
|
1706
|
+
* @type {'bazzaui-context-menu-radio-item-indicator'}
|
|
1707
|
+
*/
|
|
1708
|
+
slot = "bazzaui-context-menu-radio-item-indicator",
|
|
1709
|
+
/**
|
|
1710
|
+
* Present when the radio item is checked/selected.
|
|
1711
|
+
*/
|
|
1712
|
+
checked = "data-checked",
|
|
1713
|
+
/**
|
|
1714
|
+
* Present when the radio item is unchecked.
|
|
1715
|
+
*/
|
|
1716
|
+
unchecked = "data-unchecked"
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
declare const ContextMenuScrollArrowDataAttributes: {
|
|
1720
|
+
/**
|
|
1721
|
+
* Identifies the component part for scroll up arrow.
|
|
1722
|
+
* @type {'bazzaui-context-menu-scroll-up-arrow'}
|
|
1723
|
+
*/
|
|
1724
|
+
readonly slotUp: "bazzaui-context-menu-scroll-up-arrow";
|
|
1725
|
+
/**
|
|
1726
|
+
* Identifies the component part for scroll down arrow.
|
|
1727
|
+
* @type {'bazzaui-context-menu-scroll-down-arrow'}
|
|
1728
|
+
*/
|
|
1729
|
+
readonly slotDown: "bazzaui-context-menu-scroll-down-arrow";
|
|
1730
|
+
/**
|
|
1731
|
+
* Direction of the scroll arrow.
|
|
1732
|
+
* @type {'up' | 'down'}
|
|
1733
|
+
*/
|
|
1734
|
+
readonly direction: "data-direction";
|
|
1735
|
+
/**
|
|
1736
|
+
* Side of the popup.
|
|
1737
|
+
* @type {'top' | 'bottom' | 'left' | 'right'}
|
|
1738
|
+
*/
|
|
1739
|
+
readonly side: "data-side";
|
|
1740
|
+
};
|
|
1741
|
+
|
|
1742
|
+
declare enum ContextMenuSeparatorDataAttributes {
|
|
1743
|
+
/**
|
|
1744
|
+
* Identifies the component part.
|
|
1745
|
+
* @type {'bazzaui-context-menu-separator'}
|
|
1746
|
+
*/
|
|
1747
|
+
slot = "bazzaui-context-menu-separator"
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
declare enum ContextMenuShortcutDataAttributes {
|
|
1751
|
+
/**
|
|
1752
|
+
* Identifies the component part.
|
|
1753
|
+
* @type {'bazzaui-context-menu-shortcut'}
|
|
1754
|
+
*/
|
|
1755
|
+
slot = "bazzaui-context-menu-shortcut",
|
|
1756
|
+
/**
|
|
1757
|
+
* Present when the parent item is highlighted.
|
|
1758
|
+
*/
|
|
1759
|
+
highlighted = "data-highlighted"
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
declare enum ContextMenuSubmenuTriggerDataAttributes {
|
|
1763
|
+
/**
|
|
1764
|
+
* Identifies the component part.
|
|
1765
|
+
* @type {'bazzaui-context-menu-submenu-trigger'}
|
|
1766
|
+
*/
|
|
1767
|
+
slot = "bazzaui-context-menu-submenu-trigger",
|
|
1768
|
+
/**
|
|
1769
|
+
* Present on submenu trigger elements.
|
|
1770
|
+
*/
|
|
1771
|
+
submenuTrigger = "data-submenu-trigger",
|
|
1772
|
+
/**
|
|
1773
|
+
* Present when the submenu popup is open.
|
|
1774
|
+
*/
|
|
1775
|
+
popupOpen = "data-popup-open",
|
|
1776
|
+
/**
|
|
1777
|
+
* Present when the submenu owns keyboard focus.
|
|
1778
|
+
*/
|
|
1779
|
+
popupFocused = "data-popup-focused",
|
|
1780
|
+
/**
|
|
1781
|
+
* Present when the item is highlighted.
|
|
1782
|
+
*/
|
|
1783
|
+
highlighted = "data-highlighted",
|
|
1784
|
+
/**
|
|
1785
|
+
* Present when the item is disabled.
|
|
1786
|
+
*/
|
|
1787
|
+
disabled = "data-disabled"
|
|
1788
|
+
}
|
|
1789
|
+
declare enum ContextMenuSubmenuTriggerIndicatorDataAttributes {
|
|
1790
|
+
/**
|
|
1791
|
+
* Identifies the component part.
|
|
1792
|
+
* @type {'bazzaui-context-menu-submenu-trigger-indicator'}
|
|
1793
|
+
*/
|
|
1794
|
+
slot = "bazzaui-context-menu-submenu-trigger-indicator",
|
|
1795
|
+
/**
|
|
1796
|
+
* Present when the submenu popup is open.
|
|
1797
|
+
*/
|
|
1798
|
+
popupOpen = "data-popup-open"
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
declare enum ContextMenuSurfaceDataAttributes {
|
|
1802
|
+
/**
|
|
1803
|
+
* Identifies the component part.
|
|
1804
|
+
* @type {'bazzaui-context-menu-surface'}
|
|
1805
|
+
*/
|
|
1806
|
+
slot = "bazzaui-context-menu-surface"
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
/**
|
|
1810
|
+
* Reasons why the dropdown menu's open state changed.
|
|
1811
|
+
*/
|
|
1812
|
+
type DropdownMenuOpenChangeReason = typeof triggerPress | typeof triggerHover | typeof triggerFocus | typeof escapeKey | typeof outsidePress | typeof focusOut | typeof itemPress | typeof closePress | typeof listNavigation | typeof submenuTrigger | typeof siblingOpen | typeof imperativeAction | typeof none;
|
|
1813
|
+
/**
|
|
1814
|
+
* Event details passed to the `onOpenChange` callback.
|
|
1815
|
+
*/
|
|
1816
|
+
type DropdownMenuOpenChangeEventDetails = ChangeEventDetails<DropdownMenuOpenChangeReason>;
|
|
1817
|
+
/**
|
|
1818
|
+
* Reasons why highlight changed.
|
|
1819
|
+
*/
|
|
1820
|
+
type DropdownMenuHighlightChangeReason = typeof pointer | typeof keyboard | typeof none;
|
|
1821
|
+
/**
|
|
1822
|
+
* Event details passed to the `onHighlightChange` callback.
|
|
1823
|
+
*/
|
|
1824
|
+
type DropdownMenuHighlightChangeEventDetails = GenericEventDetails<DropdownMenuHighlightChangeReason, {
|
|
1825
|
+
index: number;
|
|
1826
|
+
}>;
|
|
1827
|
+
|
|
1828
|
+
interface DropdownMenuRootProps extends Omit<PopoverRootProps, 'open' | 'onOpenChange' | 'defaultOpen'> {
|
|
1829
|
+
/**
|
|
1830
|
+
* Whether the dropdown menu is open.
|
|
1831
|
+
* Use for controlled mode.
|
|
1832
|
+
*/
|
|
1833
|
+
open?: boolean;
|
|
1834
|
+
/**
|
|
1835
|
+
* Callback when the open state changes.
|
|
1836
|
+
* The second parameter contains event details including the reason for the change.
|
|
1837
|
+
*/
|
|
1838
|
+
onOpenChange?: (open: boolean, eventDetails: DropdownMenuOpenChangeEventDetails) => void;
|
|
1839
|
+
/**
|
|
1840
|
+
* Whether the dropdown menu is initially open.
|
|
1841
|
+
* Use for uncontrolled mode.
|
|
1842
|
+
* @default false
|
|
1843
|
+
*/
|
|
1844
|
+
defaultOpen?: boolean;
|
|
1845
|
+
/**
|
|
1846
|
+
* Determines if the dropdown menu enters a modal state when open.
|
|
1847
|
+
*
|
|
1848
|
+
* - `true`: user interaction is limited to the dropdown menu: document page scroll
|
|
1849
|
+
* is locked, and pointer interactions on outside elements are disabled.
|
|
1850
|
+
* - `false`: user interaction with the rest of the document is allowed.
|
|
1851
|
+
* - `'trap-focus'`: focus is trapped inside the dropdown menu, but document page
|
|
1852
|
+
* scroll is not locked and pointer interactions outside of it remain enabled.
|
|
1853
|
+
*
|
|
1854
|
+
* @default true
|
|
1855
|
+
*/
|
|
1856
|
+
modal?: boolean | 'trap-focus';
|
|
1857
|
+
/**
|
|
1858
|
+
* Whether virtualization mode is enabled.
|
|
1859
|
+
* When true, items should provide an explicit `index` prop and
|
|
1860
|
+
* the `items` prop should be provided for navigation to work correctly.
|
|
1861
|
+
* @default false
|
|
1862
|
+
*/
|
|
1863
|
+
virtualized?: boolean;
|
|
1864
|
+
/**
|
|
1865
|
+
* Pre-registered items for virtualization.
|
|
1866
|
+
* When provided with `virtualized={true}`, this allows navigation to work
|
|
1867
|
+
* for items that aren't currently mounted in the DOM.
|
|
1868
|
+
*/
|
|
1869
|
+
items?: VirtualItem[];
|
|
1870
|
+
/**
|
|
1871
|
+
* Callback when the highlighted item changes.
|
|
1872
|
+
* Useful for synchronizing with a virtualizer (e.g., scrollToIndex).
|
|
1873
|
+
* Only called when `virtualized={true}`.
|
|
1874
|
+
* The third parameter contains event details including the reason for the change.
|
|
1875
|
+
*/
|
|
1876
|
+
onHighlightChange?: (id: string | null, index: number, eventDetails: DropdownMenuHighlightChangeEventDetails) => void;
|
|
1877
|
+
/**
|
|
1878
|
+
* When to close the menu on outside interactions (clicking outside or clicking the trigger when open).
|
|
1879
|
+
* - `'pointerdown'`: Close immediately when pointer is pressed outside (default)
|
|
1880
|
+
* - `'click'`: Close when a full click (pointerdown + pointerup) occurs outside
|
|
1881
|
+
* @default 'pointerdown'
|
|
1882
|
+
*/
|
|
1883
|
+
closeOnOutsidePress?: 'click' | 'pointerdown';
|
|
1884
|
+
/**
|
|
1885
|
+
* Event handler called after any open/close animations have completed.
|
|
1886
|
+
* When `clearSearchOnClose="after-exit"` is set on Surface, the search
|
|
1887
|
+
* will be cleared before this callback is invoked.
|
|
1888
|
+
*/
|
|
1889
|
+
onOpenChangeComplete?: (open: boolean) => void;
|
|
1890
|
+
/**
|
|
1891
|
+
* Function to generate qualified unique IDs for rows.
|
|
1892
|
+
* Defined once at the root level and applied to all surfaces (root and submenus).
|
|
1893
|
+
*
|
|
1894
|
+
* Default behavior:
|
|
1895
|
+
* - If node.id is provided, use it as-is (treat as globally unique)
|
|
1896
|
+
* - Otherwise, compute from breadcrumbs + value when deep searching
|
|
1897
|
+
*
|
|
1898
|
+
* @example
|
|
1899
|
+
* ```tsx
|
|
1900
|
+
* <DropdownMenu.Root
|
|
1901
|
+
* getQualifiedRowId={(ctx) => {
|
|
1902
|
+
* if (ctx.id) return ctx.id
|
|
1903
|
+
* const path = ctx.breadcrumbs.map(b => b.id ?? slugify(b.value))
|
|
1904
|
+
* return [...path, slugify(ctx.value)].join('.')
|
|
1905
|
+
* }}
|
|
1906
|
+
* >
|
|
1907
|
+
* ```
|
|
1908
|
+
*/
|
|
1909
|
+
getQualifiedRowId?: GetQualifiedRowIdFn;
|
|
1910
|
+
children: React.ReactNode;
|
|
1911
|
+
}
|
|
1912
|
+
/**
|
|
1913
|
+
* Groups all parts of the dropdown menu.
|
|
1914
|
+
* Manages open state and provides context to children.
|
|
1915
|
+
* Doesn't render its own HTML element.
|
|
1916
|
+
*/
|
|
1917
|
+
declare function DropdownMenuRoot(props: DropdownMenuRoot.Props): react_jsx_runtime.JSX.Element;
|
|
1918
|
+
declare namespace DropdownMenuRoot {
|
|
1919
|
+
interface Props extends DropdownMenuRootProps {
|
|
1920
|
+
}
|
|
1921
|
+
type OpenChangeEventDetails = DropdownMenuOpenChangeEventDetails;
|
|
1922
|
+
type HighlightChangeEventDetails = DropdownMenuHighlightChangeEventDetails;
|
|
1923
|
+
type Actions = Popover.Root.Actions;
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
declare enum DropdownMenuTriggerDataAttributes {
|
|
1927
|
+
/**
|
|
1928
|
+
* Identifies the component part.
|
|
1929
|
+
* @type {'bazzaui-dropdown-menu-trigger'}
|
|
1930
|
+
*/
|
|
1931
|
+
slot = "bazzaui-dropdown-menu-trigger",
|
|
1932
|
+
/**
|
|
1933
|
+
* Present when the corresponding dropdown menu is open.
|
|
1934
|
+
*/
|
|
1935
|
+
popupOpen = "data-popup-open",
|
|
1936
|
+
/**
|
|
1937
|
+
* Present when the trigger is pressed.
|
|
1938
|
+
*/
|
|
1939
|
+
pressed = "data-pressed"
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
interface DropdownMenuTriggerState extends Record<string, unknown> {
|
|
1943
|
+
/**
|
|
1944
|
+
* Whether the dropdown menu is open.
|
|
1945
|
+
*/
|
|
1946
|
+
open: boolean;
|
|
1947
|
+
/**
|
|
1948
|
+
* Whether the trigger is disabled.
|
|
1949
|
+
*/
|
|
1950
|
+
disabled: boolean;
|
|
1951
|
+
}
|
|
1952
|
+
interface DropdownMenuTriggerProps extends ComponentProps<'button', DropdownMenuTrigger.State> {
|
|
1953
|
+
/**
|
|
1954
|
+
* Whether the trigger is disabled.
|
|
1955
|
+
*/
|
|
1956
|
+
disabled?: boolean;
|
|
1957
|
+
/**
|
|
1958
|
+
* Whether the menu opens when hovering the trigger.
|
|
1959
|
+
* @default false
|
|
1960
|
+
*/
|
|
1961
|
+
openOnHover?: boolean;
|
|
1962
|
+
/**
|
|
1963
|
+
* Delay before opening on hover (in milliseconds).
|
|
1964
|
+
* Only applies when `openOnHover` is true.
|
|
1965
|
+
* @default 100
|
|
1966
|
+
*/
|
|
1967
|
+
delay?: number;
|
|
1968
|
+
/**
|
|
1969
|
+
* Delay before closing when pointer leaves (in milliseconds).
|
|
1970
|
+
* Only applies when `openOnHover` is true.
|
|
1971
|
+
* @default 0
|
|
1972
|
+
*/
|
|
1973
|
+
closeDelay?: number;
|
|
1974
|
+
}
|
|
1975
|
+
/**
|
|
1976
|
+
* A button that opens the dropdown menu.
|
|
1977
|
+
* Renders a `<button>` element.
|
|
1978
|
+
*
|
|
1979
|
+
* Supports `openOnHover` to open the menu when hovering the trigger,
|
|
1980
|
+
* with configurable `delay` and `closeDelay`.
|
|
1981
|
+
*
|
|
1982
|
+
* When `closeOnOutsidePress` is set to `'pointerdown'` on the Root,
|
|
1983
|
+
* the trigger will close the menu immediately on pointerdown when open.
|
|
1984
|
+
*/
|
|
1985
|
+
declare const DropdownMenuTrigger: React$1.ForwardRefExoticComponent<Omit<DropdownMenuTrigger.Props, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1986
|
+
declare namespace DropdownMenuTrigger {
|
|
1987
|
+
interface Props extends DropdownMenuTriggerProps {
|
|
1988
|
+
}
|
|
1989
|
+
type State = DropdownMenuTriggerState;
|
|
1990
|
+
}
|
|
1991
|
+
|
|
1992
|
+
declare const index_parts$1_VirtualItem: typeof VirtualItem;
|
|
1993
|
+
declare namespace index_parts$1 {
|
|
1994
|
+
export { PopupMenuArrow as Arrow, PopupMenuBackdrop as Backdrop, PopupMenuCheckboxItem as CheckboxItem, PopupMenuCheckboxItemIndicator as CheckboxItemIndicator, PopupMenuInput as DataInput, PopupMenuDataList as DataList, PopupMenuDataSurface as DataSurface, PopupMenuEmpty as Empty, PopupMenuGroup as Group, PopupMenuGroupLabel as GroupLabel, PopupMenuIcon as Icon, PopupMenuInput as Input, PopupMenuItem as Item, PopupMenuList as List, PopupMenuPopup as Popup, PopupMenuPortal as Portal, PopupMenuPositioner as Positioner, PopupMenuRadioGroup as RadioGroup, PopupMenuRadioGroupValue as RadioGroupValue, PopupMenuRadioItem as RadioItem, PopupMenuRadioItemIndicator as RadioItemIndicator, DropdownMenuRoot as Root, PopupMenuScrollDownArrow as ScrollDownArrow, PopupMenuScrollUpArrow as ScrollUpArrow, PopupMenuSeparator as Separator, PopupMenuShortcut as Shortcut, PopupMenuSubmenuRoot as Submenu, PopupMenuSubmenuTrigger as SubmenuTrigger, PopupMenuSubmenuTriggerIndicator as SubmenuTriggerIndicator, PopupMenuSurface as Surface, DropdownMenuTrigger as Trigger, index_parts$1_VirtualItem as VirtualItem };
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1997
|
+
declare enum DropdownMenuArrowDataAttributes {
|
|
1998
|
+
/**
|
|
1999
|
+
* Identifies the component part.
|
|
2000
|
+
* @type {'bazzaui-dropdown-menu-arrow'}
|
|
2001
|
+
*/
|
|
2002
|
+
slot = "bazzaui-dropdown-menu-arrow",
|
|
2003
|
+
/**
|
|
2004
|
+
* Present when the popup menu is open.
|
|
2005
|
+
*/
|
|
2006
|
+
open = "data-open",
|
|
2007
|
+
/**
|
|
2008
|
+
* Present when the popup menu is closed.
|
|
2009
|
+
*/
|
|
2010
|
+
closed = "data-closed",
|
|
2011
|
+
/**
|
|
2012
|
+
* Indicates which side the popup is positioned relative to the trigger.
|
|
2013
|
+
* @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}
|
|
2014
|
+
*/
|
|
2015
|
+
side = "data-side",
|
|
2016
|
+
/**
|
|
2017
|
+
* Indicates how the popup is aligned relative to specified side.
|
|
2018
|
+
* @type {'start' | 'center' | 'end'}
|
|
2019
|
+
*/
|
|
2020
|
+
align = "data-align",
|
|
2021
|
+
/**
|
|
2022
|
+
* Present when the arrow is not centered due to collision avoidance.
|
|
2023
|
+
*/
|
|
2024
|
+
uncentered = "data-uncentered"
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
declare enum DropdownMenuBackdropDataAttributes {
|
|
2028
|
+
/**
|
|
2029
|
+
* Identifies the component part.
|
|
2030
|
+
* @type {'bazzaui-dropdown-menu-backdrop'}
|
|
2031
|
+
*/
|
|
2032
|
+
slot = "bazzaui-dropdown-menu-backdrop",
|
|
2033
|
+
/**
|
|
2034
|
+
* Present when the popup menu is open.
|
|
2035
|
+
*/
|
|
2036
|
+
open = "data-open",
|
|
2037
|
+
/**
|
|
2038
|
+
* Present when the popup menu is closed.
|
|
2039
|
+
*/
|
|
2040
|
+
closed = "data-closed",
|
|
2041
|
+
/**
|
|
2042
|
+
* Present when the popup menu is animating in.
|
|
2043
|
+
*/
|
|
2044
|
+
startingStyle = "data-starting-style",
|
|
2045
|
+
/**
|
|
2046
|
+
* Present when the popup menu is animating out.
|
|
2047
|
+
*/
|
|
2048
|
+
endingStyle = "data-ending-style"
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2051
|
+
declare enum DropdownMenuCheckboxItemDataAttributes {
|
|
2052
|
+
/**
|
|
2053
|
+
* Identifies the component part.
|
|
2054
|
+
* @type {'bazzaui-dropdown-menu-checkbox-item'}
|
|
2055
|
+
*/
|
|
2056
|
+
slot = "bazzaui-dropdown-menu-checkbox-item",
|
|
2057
|
+
/**
|
|
2058
|
+
* Present when the checkbox item is checked.
|
|
2059
|
+
*/
|
|
2060
|
+
checked = "data-checked",
|
|
2061
|
+
/**
|
|
2062
|
+
* Present when the checkbox item is unchecked.
|
|
2063
|
+
*/
|
|
2064
|
+
unchecked = "data-unchecked",
|
|
2065
|
+
/**
|
|
2066
|
+
* Present when the item is highlighted (via keyboard or pointer).
|
|
2067
|
+
*/
|
|
2068
|
+
highlighted = "data-highlighted",
|
|
2069
|
+
/**
|
|
2070
|
+
* Present when the item is disabled.
|
|
2071
|
+
*/
|
|
2072
|
+
disabled = "data-disabled"
|
|
2073
|
+
}
|
|
2074
|
+
declare enum DropdownMenuCheckboxItemIndicatorDataAttributes {
|
|
2075
|
+
/**
|
|
2076
|
+
* Identifies the component part.
|
|
2077
|
+
* @type {'bazzaui-dropdown-menu-checkbox-item-indicator'}
|
|
2078
|
+
*/
|
|
2079
|
+
slot = "bazzaui-dropdown-menu-checkbox-item-indicator",
|
|
2080
|
+
/**
|
|
2081
|
+
* Present when the checkbox item is checked.
|
|
2082
|
+
*/
|
|
2083
|
+
checked = "data-checked",
|
|
2084
|
+
/**
|
|
2085
|
+
* Present when the checkbox item is unchecked.
|
|
2086
|
+
*/
|
|
2087
|
+
unchecked = "data-unchecked"
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
declare enum DropdownMenuEmptyDataAttributes {
|
|
2091
|
+
/**
|
|
2092
|
+
* Identifies the component part.
|
|
2093
|
+
* @type {'bazzaui-dropdown-menu-empty'}
|
|
2094
|
+
*/
|
|
2095
|
+
slot = "bazzaui-dropdown-menu-empty"
|
|
2096
|
+
}
|
|
2097
|
+
|
|
2098
|
+
declare enum DropdownMenuGroupDataAttributes {
|
|
2099
|
+
/**
|
|
2100
|
+
* Identifies the component part.
|
|
2101
|
+
* @type {'bazzaui-dropdown-menu-group'}
|
|
2102
|
+
*/
|
|
2103
|
+
slot = "bazzaui-dropdown-menu-group"
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
declare enum DropdownMenuGroupLabelDataAttributes {
|
|
2107
|
+
/**
|
|
2108
|
+
* Identifies the component part.
|
|
2109
|
+
* @type {'bazzaui-dropdown-menu-group-label'}
|
|
2110
|
+
*/
|
|
2111
|
+
slot = "bazzaui-dropdown-menu-group-label"
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2114
|
+
declare const DropdownMenuIconDataAttributes: {
|
|
2115
|
+
/**
|
|
2116
|
+
* Identifies the component part.
|
|
2117
|
+
* @type {'bazzaui-dropdown-menu-icon'}
|
|
2118
|
+
*/
|
|
2119
|
+
readonly slot: "bazzaui-dropdown-menu-icon";
|
|
2120
|
+
/** Present when the popup is open. */
|
|
2121
|
+
readonly open: "data-popup-open";
|
|
2122
|
+
};
|
|
2123
|
+
|
|
2124
|
+
declare enum DropdownMenuInputDataAttributes {
|
|
2125
|
+
/**
|
|
2126
|
+
* Identifies the component part.
|
|
2127
|
+
* @type {'bazzaui-dropdown-menu-input'}
|
|
2128
|
+
*/
|
|
2129
|
+
slot = "bazzaui-dropdown-menu-input",
|
|
2130
|
+
/**
|
|
2131
|
+
* Present when the popup menu is open.
|
|
2132
|
+
*/
|
|
2133
|
+
open = "data-open",
|
|
2134
|
+
/**
|
|
2135
|
+
* Present when the popup menu is closed.
|
|
2136
|
+
*/
|
|
2137
|
+
closed = "data-closed"
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
declare enum DropdownMenuItemDataAttributes {
|
|
2141
|
+
/**
|
|
2142
|
+
* Identifies the component part.
|
|
2143
|
+
* @type {'bazzaui-dropdown-menu-item'}
|
|
2144
|
+
*/
|
|
2145
|
+
slot = "bazzaui-dropdown-menu-item",
|
|
2146
|
+
/**
|
|
2147
|
+
* Present when the item is highlighted (via keyboard or pointer).
|
|
2148
|
+
*/
|
|
2149
|
+
highlighted = "data-highlighted",
|
|
2150
|
+
/**
|
|
2151
|
+
* Present when the item is disabled.
|
|
2152
|
+
*/
|
|
2153
|
+
disabled = "data-disabled"
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
declare enum DropdownMenuListDataAttributes {
|
|
2157
|
+
/**
|
|
2158
|
+
* Identifies the component part.
|
|
2159
|
+
* @type {'bazzaui-dropdown-menu-list'}
|
|
2160
|
+
*/
|
|
2161
|
+
slot = "bazzaui-dropdown-menu-list",
|
|
2162
|
+
/**
|
|
2163
|
+
* Always present on the list element.
|
|
2164
|
+
* Used for styling and by useStickyRowWidth to find the list container.
|
|
2165
|
+
*/
|
|
2166
|
+
list = "data-popup-menu-list"
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
declare enum DropdownMenuPopupDataAttributes {
|
|
2170
|
+
/**
|
|
2171
|
+
* Identifies the component part.
|
|
2172
|
+
* @type {'bazzaui-dropdown-menu-popup'}
|
|
2173
|
+
*/
|
|
2174
|
+
slot = "bazzaui-dropdown-menu-popup",
|
|
2175
|
+
/**
|
|
2176
|
+
* Present when the popup menu is open.
|
|
2177
|
+
*/
|
|
2178
|
+
open = "data-open",
|
|
2179
|
+
/**
|
|
2180
|
+
* Present when the popup menu is closed.
|
|
2181
|
+
*/
|
|
2182
|
+
closed = "data-closed",
|
|
2183
|
+
/**
|
|
2184
|
+
* Indicates which side the popup is positioned relative to the trigger.
|
|
2185
|
+
* @type {'top' | 'bottom' | 'left' | 'right'}
|
|
2186
|
+
*/
|
|
2187
|
+
side = "data-side",
|
|
2188
|
+
/**
|
|
2189
|
+
* Indicates how the popup is aligned relative to specified side.
|
|
2190
|
+
* @type {'start' | 'center' | 'end'}
|
|
2191
|
+
*/
|
|
2192
|
+
align = "data-align",
|
|
2193
|
+
/**
|
|
2194
|
+
* Present when the popup is animating in.
|
|
2195
|
+
*/
|
|
2196
|
+
startingStyle = "data-starting-style",
|
|
2197
|
+
/**
|
|
2198
|
+
* Present when the popup is animating out.
|
|
2199
|
+
*/
|
|
2200
|
+
endingStyle = "data-ending-style",
|
|
2201
|
+
/**
|
|
2202
|
+
* Present if animations should be instant.
|
|
2203
|
+
* @type {'click' | 'dismiss'}
|
|
2204
|
+
*/
|
|
2205
|
+
instant = "data-instant",
|
|
2206
|
+
/**
|
|
2207
|
+
* Present when this popup's surface is the focus owner.
|
|
2208
|
+
* Useful for styling the currently focused menu in a submenu chain.
|
|
2209
|
+
*/
|
|
2210
|
+
focused = "data-focused",
|
|
2211
|
+
/**
|
|
2212
|
+
* Present when this popup has an open submenu below it in the menu tree.
|
|
2213
|
+
* Useful for styling all parent menus in an open submenu chain.
|
|
2214
|
+
*/
|
|
2215
|
+
hasOpenSubmenu = "data-has-open-submenu",
|
|
2216
|
+
/**
|
|
2217
|
+
* Present when this popup is a submenu (not the root menu).
|
|
2218
|
+
* Useful for applying different styles to submenus vs root menus.
|
|
2219
|
+
*/
|
|
2220
|
+
submenu = "data-submenu"
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
declare enum DropdownMenuPositionerDataAttributes {
|
|
2224
|
+
/**
|
|
2225
|
+
* Identifies the component part.
|
|
2226
|
+
* @type {'bazzaui-dropdown-menu-positioner'}
|
|
2227
|
+
*/
|
|
2228
|
+
slot = "bazzaui-dropdown-menu-positioner",
|
|
2229
|
+
/**
|
|
2230
|
+
* Present when the popup menu is open.
|
|
2231
|
+
*/
|
|
2232
|
+
open = "data-open",
|
|
2233
|
+
/**
|
|
2234
|
+
* Present when the popup menu is closed.
|
|
2235
|
+
*/
|
|
2236
|
+
closed = "data-closed",
|
|
2237
|
+
/**
|
|
2238
|
+
* Present when the anchor is hidden.
|
|
2239
|
+
*/
|
|
2240
|
+
anchorHidden = "data-anchor-hidden",
|
|
2241
|
+
/**
|
|
2242
|
+
* Indicates which side the popup is positioned relative to the trigger.
|
|
2243
|
+
* @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}
|
|
2244
|
+
*/
|
|
2245
|
+
side = "data-side",
|
|
2246
|
+
/**
|
|
2247
|
+
* Indicates how the popup is aligned relative to specified side.
|
|
2248
|
+
* @type {'start' | 'center' | 'end' | 'list-start'}
|
|
2249
|
+
*/
|
|
2250
|
+
align = "data-align"
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2253
|
+
declare enum DropdownMenuRadioGroupDataAttributes {
|
|
2254
|
+
/**
|
|
2255
|
+
* Identifies the component part.
|
|
2256
|
+
* @type {'bazzaui-dropdown-menu-radio-group'}
|
|
2257
|
+
*/
|
|
2258
|
+
slot = "bazzaui-dropdown-menu-radio-group",
|
|
2259
|
+
/**
|
|
2260
|
+
* Present when the radio group is disabled.
|
|
2261
|
+
*/
|
|
2262
|
+
disabled = "data-disabled"
|
|
2263
|
+
}
|
|
2264
|
+
|
|
2265
|
+
declare enum DropdownMenuRadioItemDataAttributes {
|
|
2266
|
+
/**
|
|
2267
|
+
* Identifies the component part.
|
|
2268
|
+
* @type {'bazzaui-dropdown-menu-radio-item'}
|
|
2269
|
+
*/
|
|
2270
|
+
slot = "bazzaui-dropdown-menu-radio-item",
|
|
2271
|
+
/**
|
|
2272
|
+
* Present when the radio item is checked/selected.
|
|
2273
|
+
*/
|
|
2274
|
+
checked = "data-checked",
|
|
2275
|
+
/**
|
|
2276
|
+
* Present when the radio item is unchecked.
|
|
2277
|
+
*/
|
|
2278
|
+
unchecked = "data-unchecked",
|
|
2279
|
+
/**
|
|
2280
|
+
* Present when the item is highlighted (via keyboard or pointer).
|
|
2281
|
+
*/
|
|
2282
|
+
highlighted = "data-highlighted",
|
|
2283
|
+
/**
|
|
2284
|
+
* Present when the item is disabled.
|
|
2285
|
+
*/
|
|
2286
|
+
disabled = "data-disabled"
|
|
2287
|
+
}
|
|
2288
|
+
declare enum DropdownMenuRadioItemIndicatorDataAttributes {
|
|
2289
|
+
/**
|
|
2290
|
+
* Identifies the component part.
|
|
2291
|
+
* @type {'bazzaui-dropdown-menu-radio-item-indicator'}
|
|
2292
|
+
*/
|
|
2293
|
+
slot = "bazzaui-dropdown-menu-radio-item-indicator",
|
|
2294
|
+
/**
|
|
2295
|
+
* Present when the radio item is checked/selected.
|
|
2296
|
+
*/
|
|
2297
|
+
checked = "data-checked",
|
|
2298
|
+
/**
|
|
2299
|
+
* Present when the radio item is unchecked.
|
|
2300
|
+
*/
|
|
2301
|
+
unchecked = "data-unchecked"
|
|
2302
|
+
}
|
|
2303
|
+
|
|
2304
|
+
declare const DropdownMenuScrollArrowDataAttributes: {
|
|
2305
|
+
/**
|
|
2306
|
+
* Identifies the component part for scroll up arrow.
|
|
2307
|
+
* @type {'bazzaui-dropdown-menu-scroll-up-arrow'}
|
|
2308
|
+
*/
|
|
2309
|
+
readonly slotUp: "bazzaui-dropdown-menu-scroll-up-arrow";
|
|
2310
|
+
/**
|
|
2311
|
+
* Identifies the component part for scroll down arrow.
|
|
2312
|
+
* @type {'bazzaui-dropdown-menu-scroll-down-arrow'}
|
|
2313
|
+
*/
|
|
2314
|
+
readonly slotDown: "bazzaui-dropdown-menu-scroll-down-arrow";
|
|
2315
|
+
/**
|
|
2316
|
+
* Direction of the scroll arrow.
|
|
2317
|
+
* @type {'up' | 'down'}
|
|
2318
|
+
*/
|
|
2319
|
+
readonly direction: "data-direction";
|
|
2320
|
+
/**
|
|
2321
|
+
* Side of the popup.
|
|
2322
|
+
* @type {'top' | 'bottom' | 'left' | 'right'}
|
|
2323
|
+
*/
|
|
2324
|
+
readonly side: "data-side";
|
|
2325
|
+
};
|
|
2326
|
+
|
|
2327
|
+
declare enum DropdownMenuSeparatorDataAttributes {
|
|
2328
|
+
/**
|
|
2329
|
+
* Identifies the component part.
|
|
2330
|
+
* @type {'bazzaui-dropdown-menu-separator'}
|
|
2331
|
+
*/
|
|
2332
|
+
slot = "bazzaui-dropdown-menu-separator"
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
declare enum DropdownMenuShortcutDataAttributes {
|
|
2336
|
+
/**
|
|
2337
|
+
* Identifies the component part.
|
|
2338
|
+
* @type {'bazzaui-dropdown-menu-shortcut'}
|
|
2339
|
+
*/
|
|
2340
|
+
slot = "bazzaui-dropdown-menu-shortcut",
|
|
2341
|
+
/**
|
|
2342
|
+
* Present when the parent item is highlighted.
|
|
2343
|
+
*/
|
|
2344
|
+
highlighted = "data-highlighted"
|
|
2345
|
+
}
|
|
2346
|
+
|
|
2347
|
+
declare enum DropdownMenuSubmenuTriggerDataAttributes {
|
|
2348
|
+
/**
|
|
2349
|
+
* Identifies the component part.
|
|
2350
|
+
* @type {'bazzaui-dropdown-menu-submenu-trigger'}
|
|
2351
|
+
*/
|
|
2352
|
+
slot = "bazzaui-dropdown-menu-submenu-trigger",
|
|
2353
|
+
/**
|
|
2354
|
+
* Present on submenu trigger elements.
|
|
2355
|
+
*/
|
|
2356
|
+
submenuTrigger = "data-submenu-trigger",
|
|
2357
|
+
/**
|
|
2358
|
+
* Present when the submenu popup is open.
|
|
2359
|
+
*/
|
|
2360
|
+
popupOpen = "data-popup-open",
|
|
2361
|
+
/**
|
|
2362
|
+
* Present when the submenu owns keyboard focus.
|
|
2363
|
+
*/
|
|
2364
|
+
popupFocused = "data-popup-focused",
|
|
2365
|
+
/**
|
|
2366
|
+
* Present when the item is highlighted.
|
|
2367
|
+
*/
|
|
2368
|
+
highlighted = "data-highlighted",
|
|
2369
|
+
/**
|
|
2370
|
+
* Present when the item is disabled.
|
|
2371
|
+
*/
|
|
2372
|
+
disabled = "data-disabled"
|
|
2373
|
+
}
|
|
2374
|
+
declare enum DropdownMenuSubmenuTriggerIndicatorDataAttributes {
|
|
2375
|
+
/**
|
|
2376
|
+
* Identifies the component part.
|
|
2377
|
+
* @type {'bazzaui-dropdown-menu-submenu-trigger-indicator'}
|
|
2378
|
+
*/
|
|
2379
|
+
slot = "bazzaui-dropdown-menu-submenu-trigger-indicator",
|
|
2380
|
+
/**
|
|
2381
|
+
* Present when the submenu popup is open.
|
|
2382
|
+
*/
|
|
2383
|
+
popupOpen = "data-popup-open"
|
|
2384
|
+
}
|
|
2385
|
+
|
|
2386
|
+
declare enum DropdownMenuSurfaceDataAttributes {
|
|
2387
|
+
/**
|
|
2388
|
+
* Identifies the component part.
|
|
2389
|
+
* @type {'bazzaui-dropdown-menu-surface'}
|
|
2390
|
+
*/
|
|
2391
|
+
slot = "bazzaui-dropdown-menu-surface"
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
declare const SelectItemDataAttributes: {
|
|
2395
|
+
/**
|
|
2396
|
+
* Identifies the component part.
|
|
2397
|
+
* @type {'bazzaui-select-item'}
|
|
2398
|
+
*/
|
|
2399
|
+
readonly slot: "bazzaui-select-item";
|
|
2400
|
+
/**
|
|
2401
|
+
* Present when the item is highlighted via keyboard or pointer.
|
|
2402
|
+
*/
|
|
2403
|
+
readonly highlighted: "data-highlighted";
|
|
2404
|
+
/**
|
|
2405
|
+
* Present when the item is disabled.
|
|
2406
|
+
*/
|
|
2407
|
+
readonly disabled: "data-disabled";
|
|
2408
|
+
/**
|
|
2409
|
+
* Present when the item is currently selected.
|
|
2410
|
+
*/
|
|
2411
|
+
readonly selected: "data-selected";
|
|
2412
|
+
};
|
|
2413
|
+
|
|
2414
|
+
interface SelectItemState extends Record<string, unknown> {
|
|
2415
|
+
/**
|
|
2416
|
+
* Whether the item is highlighted (via keyboard or pointer).
|
|
2417
|
+
*/
|
|
2418
|
+
highlighted: boolean;
|
|
2419
|
+
/**
|
|
2420
|
+
* Whether the item is disabled.
|
|
2421
|
+
*/
|
|
2422
|
+
disabled: boolean;
|
|
2423
|
+
/**
|
|
2424
|
+
* Whether the item is currently selected.
|
|
2425
|
+
*/
|
|
2426
|
+
selected: boolean;
|
|
2427
|
+
}
|
|
2428
|
+
interface SelectItemProps<Value = unknown> extends ComponentProps<'div', SelectItem.State> {
|
|
2429
|
+
/**
|
|
2430
|
+
* The value of this item. Required and must be unique within the Select.
|
|
2431
|
+
* Can be a primitive or an object.
|
|
2432
|
+
*/
|
|
2433
|
+
value: Value;
|
|
2434
|
+
/**
|
|
2435
|
+
* Text value to use for display in Select.Value when this item is selected.
|
|
2436
|
+
* If not provided, the text content of the item will be used.
|
|
2437
|
+
* For object values, this can be auto-detected from `{ label }` shape.
|
|
2438
|
+
*/
|
|
2439
|
+
textValue?: string;
|
|
2440
|
+
/**
|
|
2441
|
+
* Additional keywords to match against when filtering.
|
|
2442
|
+
* Useful for aliases or synonyms.
|
|
2443
|
+
*/
|
|
2444
|
+
keywords?: string[];
|
|
2445
|
+
/**
|
|
2446
|
+
* Whether this item is disabled.
|
|
2447
|
+
* Disabled items are not selectable and are skipped during keyboard navigation.
|
|
2448
|
+
*/
|
|
2449
|
+
disabled?: boolean;
|
|
2450
|
+
/**
|
|
2451
|
+
* Callback when this item is selected.
|
|
2452
|
+
*/
|
|
2453
|
+
onSelect?: () => void;
|
|
2454
|
+
/**
|
|
2455
|
+
* Whether to force render this item regardless of filter results.
|
|
2456
|
+
* @default false
|
|
2457
|
+
*/
|
|
2458
|
+
forceMount?: boolean;
|
|
2459
|
+
}
|
|
2460
|
+
declare const SelectItem: <Value = unknown>(props: SelectItemProps<Value> & React$1.RefAttributes<HTMLDivElement>) => React$1.ReactElement | null;
|
|
2461
|
+
declare namespace SelectItem {
|
|
2462
|
+
type State = SelectItemState;
|
|
2463
|
+
interface Props<Value = unknown> extends SelectItemProps<Value> {
|
|
2464
|
+
}
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2467
|
+
declare const SelectItemIndicatorDataAttributes: {
|
|
2468
|
+
/**
|
|
2469
|
+
* Identifies the component part.
|
|
2470
|
+
* @type {'bazzaui-select-item-indicator'}
|
|
2471
|
+
*/
|
|
2472
|
+
readonly slot: "bazzaui-select-item-indicator";
|
|
2473
|
+
/**
|
|
2474
|
+
* Present when the parent item is selected.
|
|
2475
|
+
*/
|
|
2476
|
+
readonly selected: "data-selected";
|
|
2477
|
+
};
|
|
2478
|
+
|
|
2479
|
+
interface SelectItemIndicatorState extends Record<string, unknown> {
|
|
2480
|
+
/**
|
|
2481
|
+
* Whether the item is selected.
|
|
2482
|
+
*/
|
|
2483
|
+
selected: boolean;
|
|
2484
|
+
}
|
|
2485
|
+
interface SelectItemIndicatorProps extends Omit<ComponentProps<'span', SelectItemIndicator.State>, 'children'> {
|
|
2486
|
+
/**
|
|
2487
|
+
* Whether to force render even when the item is not selected.
|
|
2488
|
+
* @default false
|
|
2489
|
+
*/
|
|
2490
|
+
forceMount?: boolean;
|
|
2491
|
+
/**
|
|
2492
|
+
* Whether to keep the element mounted even when not selected.
|
|
2493
|
+
* Unlike forceMount, this still conditionally renders children.
|
|
2494
|
+
* Useful for checkbox-style indicators where the container is always visible.
|
|
2495
|
+
* @default false
|
|
2496
|
+
*/
|
|
2497
|
+
keepMounted?: boolean;
|
|
2498
|
+
/**
|
|
2499
|
+
* Content to render. Can be a ReactNode or a function that receives state.
|
|
2500
|
+
*/
|
|
2501
|
+
children?: React$1.ReactNode | ((state: SelectItemIndicator.State) => React$1.ReactNode);
|
|
2502
|
+
}
|
|
2503
|
+
/**
|
|
2504
|
+
* Indicator that shows when the item is selected.
|
|
2505
|
+
* Typically renders a checkmark icon.
|
|
2506
|
+
* Only renders when the item is selected (unless forceMount or keepMounted is true).
|
|
2507
|
+
* Renders a `<span>` element.
|
|
2508
|
+
*/
|
|
2509
|
+
declare const SelectItemIndicator: React$1.ForwardRefExoticComponent<Omit<SelectItemIndicator.Props, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
2510
|
+
declare namespace SelectItemIndicator {
|
|
2511
|
+
interface Props extends SelectItemIndicatorProps {
|
|
2512
|
+
}
|
|
2513
|
+
type State = SelectItemIndicatorState;
|
|
2514
|
+
}
|
|
2515
|
+
|
|
2516
|
+
interface SelectItemLabelState extends Record<string, unknown> {
|
|
2517
|
+
/**
|
|
2518
|
+
* The serialized string key for the parent item's value.
|
|
2519
|
+
* For object values, this is the result of `itemToStringValue` or the auto-detected `.value` property.
|
|
2520
|
+
*/
|
|
2521
|
+
value: string;
|
|
2522
|
+
/**
|
|
2523
|
+
* Whether the parent item is selected.
|
|
2524
|
+
*/
|
|
2525
|
+
selected: boolean;
|
|
2526
|
+
/**
|
|
2527
|
+
* Whether the parent item is highlighted.
|
|
2528
|
+
*/
|
|
2529
|
+
highlighted: boolean;
|
|
2530
|
+
/**
|
|
2531
|
+
* Whether the parent item is disabled.
|
|
2532
|
+
*/
|
|
2533
|
+
disabled: boolean;
|
|
2534
|
+
}
|
|
2535
|
+
interface SelectItemLabelProps extends ComponentProps<'span', SelectItemLabel.State> {
|
|
2536
|
+
}
|
|
2537
|
+
/**
|
|
2538
|
+
* The label/text content of a Select.Item.
|
|
2539
|
+
*
|
|
2540
|
+
* When no children are provided, automatically renders the label from the
|
|
2541
|
+
* `items` prop passed to `Select.Root`. If children are provided, they
|
|
2542
|
+
* override the automatic label.
|
|
2543
|
+
*
|
|
2544
|
+
* Also captures the text for display in `Select.Value` when the item is selected,
|
|
2545
|
+
* and provides the text element reference for `alignItemWithTrigger` positioning.
|
|
2546
|
+
*
|
|
2547
|
+
* Renders a `<span>` element.
|
|
2548
|
+
*/
|
|
2549
|
+
declare const SelectItemLabel: React$1.ForwardRefExoticComponent<Omit<SelectItemLabel.Props, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
2550
|
+
declare namespace SelectItemLabel {
|
|
2551
|
+
interface Props extends SelectItemLabelProps {
|
|
2552
|
+
}
|
|
2553
|
+
type State = SelectItemLabelState;
|
|
2554
|
+
}
|
|
2555
|
+
|
|
2556
|
+
interface SelectPopupState extends PopupMenuPopupState {
|
|
2557
|
+
/**
|
|
2558
|
+
* Whether the popup is currently using align-item-with-trigger positioning.
|
|
2559
|
+
* This reflects the actual state, not just the prop value - it will be false
|
|
2560
|
+
* if alignment couldn't be applied (e.g., not enough space, no selected item).
|
|
2561
|
+
*/
|
|
2562
|
+
alignItemWithTriggerActive: boolean;
|
|
2563
|
+
}
|
|
2564
|
+
interface SelectPopupProps extends Omit<PopupMenuPopup.Props, 'className'> {
|
|
2565
|
+
/**
|
|
2566
|
+
* CSS class applied to the element, or a function that
|
|
2567
|
+
* returns a class based on the component's state.
|
|
2568
|
+
*/
|
|
2569
|
+
className?: string | ((state: SelectPopupState) => string);
|
|
2570
|
+
}
|
|
2571
|
+
/**
|
|
2572
|
+
* A container for the select popup contents.
|
|
2573
|
+
* Extends PopupMenuPopup with Select-specific state including alignItemWithTriggerActive.
|
|
2574
|
+
*
|
|
2575
|
+
* Renders a `<div>` element.
|
|
2576
|
+
*/
|
|
2577
|
+
declare const SelectPopup: React$1.ForwardRefExoticComponent<SelectPopupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2578
|
+
declare namespace SelectPopup {
|
|
2579
|
+
type Props = SelectPopupProps;
|
|
2580
|
+
type State = SelectPopupState;
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2583
|
+
declare const SelectPositionerDataAttributes: {
|
|
2584
|
+
/**
|
|
2585
|
+
* Identifies the component part.
|
|
2586
|
+
* @type {'bazzaui-select-positioner'}
|
|
2587
|
+
*/
|
|
2588
|
+
readonly slot: "bazzaui-select-positioner";
|
|
2589
|
+
};
|
|
2590
|
+
|
|
2591
|
+
interface SelectPositionerProps extends PopoverPositionerProps {
|
|
2592
|
+
/**
|
|
2593
|
+
* Whether the positioner overlaps the trigger so the selected item's text
|
|
2594
|
+
* is aligned with the trigger's value text.
|
|
2595
|
+
*
|
|
2596
|
+
* This is automatically disabled if:
|
|
2597
|
+
* - There is not enough space in the viewport
|
|
2598
|
+
* - The trigger is too close to the viewport edges
|
|
2599
|
+
* - Touch input is detected (better UX to show full list)
|
|
2600
|
+
*
|
|
2601
|
+
* @default true
|
|
2602
|
+
*/
|
|
2603
|
+
alignItemWithTrigger?: boolean;
|
|
2604
|
+
}
|
|
2605
|
+
/**
|
|
2606
|
+
* Positions the select popup against its trigger.
|
|
2607
|
+
* Supports aligning the selected item with the trigger for a native select feel.
|
|
2608
|
+
*
|
|
2609
|
+
* Renders a `<div>` element.
|
|
2610
|
+
*/
|
|
2611
|
+
declare const SelectPositioner: React$1.ForwardRefExoticComponent<SelectPositionerProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2612
|
+
declare namespace SelectPositioner {
|
|
2613
|
+
type Props = SelectPositionerProps;
|
|
2614
|
+
type State = Popover.Positioner.State;
|
|
2615
|
+
}
|
|
2616
|
+
|
|
2617
|
+
/**
|
|
2618
|
+
* Reasons why the select's open state changed.
|
|
2619
|
+
*/
|
|
2620
|
+
type SelectOpenChangeReason = typeof triggerPress | typeof escapeKey | typeof outsidePress | typeof focusOut | typeof itemPress | typeof listNavigation | typeof imperativeAction | typeof none;
|
|
2621
|
+
/**
|
|
2622
|
+
* Event details passed to the `onOpenChange` callback.
|
|
2623
|
+
*/
|
|
2624
|
+
type SelectOpenChangeEventDetails = ChangeEventDetails<SelectOpenChangeReason>;
|
|
2625
|
+
/**
|
|
2626
|
+
* Reasons why highlight changed.
|
|
2627
|
+
*/
|
|
2628
|
+
type SelectHighlightChangeReason = typeof pointer | typeof keyboard | typeof none;
|
|
2629
|
+
/**
|
|
2630
|
+
* Event details passed to the `onHighlightChange` callback.
|
|
2631
|
+
*/
|
|
2632
|
+
type SelectHighlightChangeEventDetails = GenericEventDetails<SelectHighlightChangeReason, {
|
|
2633
|
+
index: number;
|
|
2634
|
+
}>;
|
|
2635
|
+
|
|
2636
|
+
/**
|
|
2637
|
+
* Helper type to determine the value type based on the multiple flag.
|
|
2638
|
+
*/
|
|
2639
|
+
type SelectValue$1<Value, Multiple extends boolean | undefined> = Multiple extends true ? Value[] : Value | null;
|
|
2640
|
+
interface SelectRootProps<Value = unknown, Multiple extends boolean | undefined = false> extends Omit<PopoverRootProps, 'open' | 'onOpenChange' | 'defaultOpen'> {
|
|
2641
|
+
/**
|
|
2642
|
+
* Whether the select is open.
|
|
2643
|
+
* Use for controlled mode.
|
|
2644
|
+
*/
|
|
2645
|
+
open?: boolean;
|
|
2646
|
+
/**
|
|
2647
|
+
* Callback when the open state changes.
|
|
2648
|
+
* The second parameter contains event details including the reason for the change.
|
|
2649
|
+
*/
|
|
2650
|
+
onOpenChange?: (open: boolean, eventDetails: SelectOpenChangeEventDetails) => void;
|
|
2651
|
+
/**
|
|
2652
|
+
* Callback called after any animations complete when the select opens or closes.
|
|
2653
|
+
* Useful for resetting state after exit animations finish.
|
|
2654
|
+
*/
|
|
2655
|
+
onOpenChangeComplete?: (open: boolean) => void;
|
|
2656
|
+
/**
|
|
2657
|
+
* Whether the select is initially open.
|
|
2658
|
+
* Use for uncontrolled mode.
|
|
2659
|
+
* @default false
|
|
2660
|
+
*/
|
|
2661
|
+
defaultOpen?: boolean;
|
|
2662
|
+
/**
|
|
2663
|
+
* Current selected value (single-select mode).
|
|
2664
|
+
* Use for controlled mode.
|
|
2665
|
+
* Can be a primitive or an object.
|
|
2666
|
+
*/
|
|
2667
|
+
value?: SelectValue$1<Value, Multiple>;
|
|
2668
|
+
/**
|
|
2669
|
+
* Default selected value (single-select mode).
|
|
2670
|
+
* Use for uncontrolled mode.
|
|
2671
|
+
*/
|
|
2672
|
+
defaultValue?: SelectValue$1<Value, Multiple>;
|
|
2673
|
+
/**
|
|
2674
|
+
* Callback when the selected value changes (single-select mode).
|
|
2675
|
+
*/
|
|
2676
|
+
onValueChange?: (value: Value) => void;
|
|
2677
|
+
/**
|
|
2678
|
+
* Whether multi-select mode is enabled.
|
|
2679
|
+
* @default false
|
|
2680
|
+
*/
|
|
2681
|
+
multiple?: Multiple;
|
|
2682
|
+
/**
|
|
2683
|
+
* Current selected values (multi-select mode).
|
|
2684
|
+
* Use for controlled mode.
|
|
2685
|
+
*/
|
|
2686
|
+
values?: Value[];
|
|
2687
|
+
/**
|
|
2688
|
+
* Default selected values (multi-select mode).
|
|
2689
|
+
* Use for uncontrolled mode.
|
|
2690
|
+
*/
|
|
2691
|
+
defaultValues?: Value[];
|
|
2692
|
+
/**
|
|
2693
|
+
* Callback when the selected values change (multi-select mode).
|
|
2694
|
+
*/
|
|
2695
|
+
onValuesChange?: (values: Value[]) => void;
|
|
2696
|
+
/**
|
|
2697
|
+
* Custom comparison logic used to determine if a select item value
|
|
2698
|
+
* matches the current selected value.
|
|
2699
|
+
* Useful when item values are objects without matching referentially.
|
|
2700
|
+
* Defaults to Object.is comparison.
|
|
2701
|
+
*/
|
|
2702
|
+
isItemEqualToValue?: ItemEqualityComparer<Value>;
|
|
2703
|
+
/**
|
|
2704
|
+
* When the item values are objects (`<Select.Item value={object}>`),
|
|
2705
|
+
* this function converts the object value to a string representation
|
|
2706
|
+
* for display in the trigger.
|
|
2707
|
+
* If the shape of the object is `{ value, label }`, the label will be
|
|
2708
|
+
* used automatically without needing to specify this prop.
|
|
2709
|
+
*/
|
|
2710
|
+
itemToStringLabel?: (itemValue: Value) => string;
|
|
2711
|
+
/**
|
|
2712
|
+
* When the item values are objects (`<Select.Item value={object}>`),
|
|
2713
|
+
* this function converts the object value to a string representation
|
|
2714
|
+
* for form submission.
|
|
2715
|
+
* If the shape of the object is `{ value, label }`, the value will be
|
|
2716
|
+
* used automatically without needing to specify this prop.
|
|
2717
|
+
*/
|
|
2718
|
+
itemToStringValue?: (itemValue: Value) => string;
|
|
2719
|
+
/**
|
|
2720
|
+
* Form field name for submission.
|
|
2721
|
+
* When set, hidden input(s) will be rendered for form submission.
|
|
2722
|
+
*/
|
|
2723
|
+
name?: string;
|
|
2724
|
+
/**
|
|
2725
|
+
* Associate with a form by ID.
|
|
2726
|
+
*/
|
|
2727
|
+
form?: string;
|
|
2728
|
+
/**
|
|
2729
|
+
* Whether this field is required.
|
|
2730
|
+
*/
|
|
2731
|
+
required?: boolean;
|
|
2732
|
+
/**
|
|
2733
|
+
* Whether the select is disabled.
|
|
2734
|
+
* @default false
|
|
2735
|
+
*/
|
|
2736
|
+
disabled?: boolean;
|
|
2737
|
+
/**
|
|
2738
|
+
* Placeholder text when no value is selected.
|
|
2739
|
+
* @default "Select..."
|
|
2740
|
+
*/
|
|
2741
|
+
placeholder?: string;
|
|
2742
|
+
/**
|
|
2743
|
+
* Data structure of the items rendered in the select popup.
|
|
2744
|
+
* When specified, `<Select.Value>` renders the label of the selected item
|
|
2745
|
+
* instead of the raw value.
|
|
2746
|
+
*
|
|
2747
|
+
* Can be a record mapping values to labels, or an array of { value, label } objects.
|
|
2748
|
+
* @example
|
|
2749
|
+
* ```tsx
|
|
2750
|
+
* // Record format
|
|
2751
|
+
* <Select.Root items={{ us: 'United States', uk: 'United Kingdom' }}>
|
|
2752
|
+
*
|
|
2753
|
+
* // Array format
|
|
2754
|
+
* <Select.Root items={[
|
|
2755
|
+
* { value: 'us', label: 'United States' },
|
|
2756
|
+
* { value: 'uk', label: 'United Kingdom' },
|
|
2757
|
+
* ]}>
|
|
2758
|
+
* ```
|
|
2759
|
+
*/
|
|
2760
|
+
items?: Record<string, React$1.ReactNode> | Array<{
|
|
2761
|
+
value: string;
|
|
2762
|
+
label: React$1.ReactNode;
|
|
2763
|
+
}>;
|
|
2764
|
+
/**
|
|
2765
|
+
* Determines if the select enters a modal state when open.
|
|
2766
|
+
*
|
|
2767
|
+
* - `true`: user interaction is limited to the select: document page scroll
|
|
2768
|
+
* is locked, and pointer interactions on outside elements are disabled.
|
|
2769
|
+
* - `false`: user interaction with the rest of the document is allowed.
|
|
2770
|
+
* - `'trap-focus'`: focus is trapped inside the select, but document page
|
|
2771
|
+
* scroll is not locked and pointer interactions outside of it remain enabled.
|
|
2772
|
+
*
|
|
2773
|
+
* @default true
|
|
2774
|
+
*/
|
|
2775
|
+
modal?: boolean | 'trap-focus';
|
|
2776
|
+
/**
|
|
2777
|
+
* Whether virtualization mode is enabled.
|
|
2778
|
+
* When true, items should provide an explicit `index` prop and
|
|
2779
|
+
* the `virtualItems` prop should be provided for navigation to work correctly.
|
|
2780
|
+
* @default false
|
|
2781
|
+
*/
|
|
2782
|
+
virtualized?: boolean;
|
|
2783
|
+
/**
|
|
2784
|
+
* Pre-registered items for virtualization.
|
|
2785
|
+
* When provided with `virtualized={true}`, this allows navigation to work
|
|
2786
|
+
* for items that aren't currently mounted in the DOM.
|
|
2787
|
+
*/
|
|
2788
|
+
virtualItems?: VirtualItem[];
|
|
2789
|
+
/**
|
|
2790
|
+
* Callback when the highlighted item changes.
|
|
2791
|
+
* Useful for synchronizing with a virtualizer (e.g., scrollToIndex).
|
|
2792
|
+
* Only called when `virtualized={true}`.
|
|
2793
|
+
* The third parameter contains event details including the reason for the change.
|
|
2794
|
+
*/
|
|
2795
|
+
onHighlightChange?: (id: string | null, index: number, eventDetails: SelectHighlightChangeEventDetails) => void;
|
|
2796
|
+
children: React$1.ReactNode;
|
|
2797
|
+
}
|
|
2798
|
+
/**
|
|
2799
|
+
* Groups all parts of the select.
|
|
2800
|
+
* Manages open state, selection state, and provides context to children.
|
|
2801
|
+
* Doesn't render its own HTML element.
|
|
2802
|
+
*
|
|
2803
|
+
* @template Value - The type of the select value (can be a primitive or object)
|
|
2804
|
+
* @template Multiple - Whether multiple selection is enabled
|
|
2805
|
+
*/
|
|
2806
|
+
declare function SelectRoot<Value = unknown, Multiple extends boolean | undefined = false>(props: SelectRootProps<Value, Multiple>): React$1.JSX.Element;
|
|
2807
|
+
declare namespace SelectRoot {
|
|
2808
|
+
interface Props<Value = unknown, Multiple extends boolean | undefined = false> extends SelectRootProps<Value, Multiple> {
|
|
2809
|
+
}
|
|
2810
|
+
type OpenChangeEventDetails = SelectOpenChangeEventDetails;
|
|
2811
|
+
type HighlightChangeEventDetails = SelectHighlightChangeEventDetails;
|
|
2812
|
+
type Actions = Popover.Root.Actions;
|
|
2813
|
+
}
|
|
2814
|
+
|
|
2815
|
+
interface SelectSurfaceProps extends Omit<PopupMenuSurfaceProps, 'autoHighlightFirst'> {
|
|
2816
|
+
/**
|
|
2817
|
+
* Controls auto-highlighting behavior when the select opens.
|
|
2818
|
+
* - `true`: highlight the first item (default when alignItemWithTrigger is inactive)
|
|
2819
|
+
* - `false`: don't auto-highlight any item
|
|
2820
|
+
* - `'selected'`: highlight the currently selected item, or first item if none selected
|
|
2821
|
+
* - `string`: highlight the item with this specific value
|
|
2822
|
+
*
|
|
2823
|
+
* Note: When the Positioner's `alignItemWithTrigger` is active and this prop
|
|
2824
|
+
* is not explicitly set, the selected item is automatically highlighted.
|
|
2825
|
+
*
|
|
2826
|
+
* @default true (or selected value when alignItemWithTrigger is active)
|
|
2827
|
+
*/
|
|
2828
|
+
autoHighlightFirst?: boolean | 'selected' | string;
|
|
2829
|
+
}
|
|
2830
|
+
/**
|
|
2831
|
+
* Provides search context and manages item registration for Select.
|
|
2832
|
+
* Automatically configures `autoHighlightFirst` based on the Positioner's
|
|
2833
|
+
* `alignItemWithTrigger` prop - when active, highlights the selected item
|
|
2834
|
+
* instead of the first item.
|
|
2835
|
+
*
|
|
2836
|
+
* Place inside Select.Popup to enable search functionality.
|
|
2837
|
+
* Renders a `<div>` element.
|
|
2838
|
+
*/
|
|
2839
|
+
declare const SelectSurface: React$1.ForwardRefExoticComponent<Omit<SelectSurface.Props, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2840
|
+
declare namespace SelectSurface {
|
|
2841
|
+
type State = PopupMenuSurface.State;
|
|
2842
|
+
interface Props extends SelectSurfaceProps {
|
|
2843
|
+
}
|
|
2844
|
+
}
|
|
2845
|
+
|
|
2846
|
+
declare const SelectTriggerDataAttributes: {
|
|
2847
|
+
/**
|
|
2848
|
+
* Identifies the component part.
|
|
2849
|
+
* @type {'bazzaui-select-trigger'}
|
|
2850
|
+
*/
|
|
2851
|
+
readonly slot: "bazzaui-select-trigger";
|
|
2852
|
+
/**
|
|
2853
|
+
* Present when the select dropdown is open.
|
|
2854
|
+
*/
|
|
2855
|
+
readonly open: "data-open";
|
|
2856
|
+
/**
|
|
2857
|
+
* Present when the select dropdown is closed.
|
|
2858
|
+
*/
|
|
2859
|
+
readonly closed: "data-closed";
|
|
2860
|
+
/**
|
|
2861
|
+
* Present when the trigger is disabled.
|
|
2862
|
+
*/
|
|
2863
|
+
readonly disabled: "data-disabled";
|
|
2864
|
+
/**
|
|
2865
|
+
* Present when no value is selected (showing placeholder).
|
|
2866
|
+
*/
|
|
2867
|
+
readonly placeholder: "data-placeholder";
|
|
2868
|
+
};
|
|
2869
|
+
|
|
2870
|
+
interface SelectTriggerState extends Record<string, unknown> {
|
|
2871
|
+
/**
|
|
2872
|
+
* Whether the select is open.
|
|
2873
|
+
*/
|
|
2874
|
+
open: boolean;
|
|
2875
|
+
/**
|
|
2876
|
+
* Whether the select is disabled.
|
|
2877
|
+
*/
|
|
2878
|
+
disabled: boolean;
|
|
2879
|
+
/**
|
|
2880
|
+
* Whether the select currently shows placeholder (no value selected).
|
|
2881
|
+
*/
|
|
2882
|
+
placeholder: boolean;
|
|
2883
|
+
}
|
|
2884
|
+
interface SelectTriggerProps extends ComponentProps<'button', SelectTrigger.State> {
|
|
2885
|
+
/**
|
|
2886
|
+
* Whether the trigger is disabled.
|
|
2887
|
+
*/
|
|
2888
|
+
disabled?: boolean;
|
|
2889
|
+
}
|
|
2890
|
+
/**
|
|
2891
|
+
* A button that opens the select dropdown.
|
|
2892
|
+
* Renders a `<button>` element with combobox ARIA semantics.
|
|
2893
|
+
*/
|
|
2894
|
+
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectTrigger.Props, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2895
|
+
declare namespace SelectTrigger {
|
|
2896
|
+
interface Props extends SelectTriggerProps {
|
|
2897
|
+
}
|
|
2898
|
+
type State = SelectTriggerState;
|
|
2899
|
+
}
|
|
2900
|
+
|
|
2901
|
+
interface SelectValueState<Value = unknown> extends Record<string, unknown> {
|
|
2902
|
+
/**
|
|
2903
|
+
* The currently selected value (single-select mode).
|
|
2904
|
+
*/
|
|
2905
|
+
value: Value | null;
|
|
2906
|
+
/**
|
|
2907
|
+
* The currently selected values (multi-select mode).
|
|
2908
|
+
*/
|
|
2909
|
+
values: Value[];
|
|
2910
|
+
/**
|
|
2911
|
+
* Whether the select is in multi-select mode.
|
|
2912
|
+
*/
|
|
2913
|
+
multiple: boolean;
|
|
2914
|
+
/**
|
|
2915
|
+
* Whether a value is currently selected.
|
|
2916
|
+
*/
|
|
2917
|
+
hasValue: boolean;
|
|
2918
|
+
/**
|
|
2919
|
+
* The placeholder text.
|
|
2920
|
+
*/
|
|
2921
|
+
placeholder: string;
|
|
2922
|
+
/**
|
|
2923
|
+
* Get the display content for a value.
|
|
2924
|
+
* First checks the item text registry (populated when items mount),
|
|
2925
|
+
* then falls back to the `items` prop passed to SelectRoot,
|
|
2926
|
+
* then falls back to `itemToStringLabel` for object values.
|
|
2927
|
+
*/
|
|
2928
|
+
getValueText: (value: Value) => React$1.ReactNode | undefined;
|
|
2929
|
+
}
|
|
2930
|
+
interface SelectValueProps<Value = unknown> extends Omit<ComponentProps<'span', SelectValueState<Value>>, 'children'> {
|
|
2931
|
+
/**
|
|
2932
|
+
* Placeholder text when no value is selected.
|
|
2933
|
+
* Overrides the placeholder set on Select.Root.
|
|
2934
|
+
*/
|
|
2935
|
+
placeholder?: string;
|
|
2936
|
+
/**
|
|
2937
|
+
* Custom render function for the selected value content.
|
|
2938
|
+
* Receives the current state and should return the content to render.
|
|
2939
|
+
* This is different from the `render` prop which replaces the element.
|
|
2940
|
+
*/
|
|
2941
|
+
children?: React$1.ReactNode | ((state: SelectValueState<Value>) => React$1.ReactNode);
|
|
2942
|
+
}
|
|
2943
|
+
declare const SelectValue: <Value = unknown>(props: SelectValueProps<Value> & React$1.RefAttributes<HTMLSpanElement>) => React$1.ReactElement;
|
|
2944
|
+
declare namespace SelectValue {
|
|
2945
|
+
interface Props extends SelectValueProps<unknown> {
|
|
2946
|
+
}
|
|
2947
|
+
type State = SelectValueState<unknown>;
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2950
|
+
type index_parts_SelectPopupProps = SelectPopupProps;
|
|
2951
|
+
type index_parts_SelectPopupState = SelectPopupState;
|
|
2952
|
+
declare const index_parts_VirtualItem: typeof VirtualItem;
|
|
2953
|
+
declare namespace index_parts {
|
|
2954
|
+
export { PopupMenuArrow as Arrow, PopupMenuBackdrop as Backdrop, PopupMenuEmpty as Empty, PopupMenuGroup as Group, PopupMenuGroupLabel as GroupLabel, PopupMenuIcon as Icon, PopupMenuInput as Input, SelectItem as Item, SelectItemIndicator as ItemIndicator, SelectItemLabel as ItemLabel, PopupMenuList as List, SelectPopup as Popup, PopupMenuPortal as Portal, SelectPositioner as Positioner, SelectRoot as Root, PopupMenuScrollDownArrow as ScrollDownArrow, PopupMenuScrollUpArrow as ScrollUpArrow, type index_parts_SelectPopupProps as SelectPopupProps, type index_parts_SelectPopupState as SelectPopupState, PopupMenuSeparator as Separator, SelectSurface as Surface, SelectTrigger as Trigger, SelectValue as Value, index_parts_VirtualItem as VirtualItem };
|
|
2955
|
+
}
|
|
2956
|
+
|
|
2957
|
+
declare enum SelectArrowDataAttributes {
|
|
2958
|
+
/**
|
|
2959
|
+
* Identifies the component part.
|
|
2960
|
+
* @type {'bazzaui-select-arrow'}
|
|
2961
|
+
*/
|
|
2962
|
+
slot = "bazzaui-select-arrow",
|
|
2963
|
+
/**
|
|
2964
|
+
* Present when the popup menu is open.
|
|
2965
|
+
*/
|
|
2966
|
+
open = "data-open",
|
|
2967
|
+
/**
|
|
2968
|
+
* Present when the popup menu is closed.
|
|
2969
|
+
*/
|
|
2970
|
+
closed = "data-closed",
|
|
2971
|
+
/**
|
|
2972
|
+
* Indicates which side the popup is positioned relative to the trigger.
|
|
2973
|
+
* @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}
|
|
2974
|
+
*/
|
|
2975
|
+
side = "data-side",
|
|
2976
|
+
/**
|
|
2977
|
+
* Indicates how the popup is aligned relative to specified side.
|
|
2978
|
+
* @type {'start' | 'center' | 'end'}
|
|
2979
|
+
*/
|
|
2980
|
+
align = "data-align",
|
|
2981
|
+
/**
|
|
2982
|
+
* Present when the arrow is not centered due to collision avoidance.
|
|
2983
|
+
*/
|
|
2984
|
+
uncentered = "data-uncentered"
|
|
2985
|
+
}
|
|
2986
|
+
|
|
2987
|
+
declare enum SelectBackdropDataAttributes {
|
|
2988
|
+
/**
|
|
2989
|
+
* Identifies the component part.
|
|
2990
|
+
* @type {'bazzaui-select-backdrop'}
|
|
2991
|
+
*/
|
|
2992
|
+
slot = "bazzaui-select-backdrop",
|
|
2993
|
+
/**
|
|
2994
|
+
* Present when the popup menu is open.
|
|
2995
|
+
*/
|
|
2996
|
+
open = "data-open",
|
|
2997
|
+
/**
|
|
2998
|
+
* Present when the popup menu is closed.
|
|
2999
|
+
*/
|
|
3000
|
+
closed = "data-closed",
|
|
3001
|
+
/**
|
|
3002
|
+
* Present when the popup menu is animating in.
|
|
3003
|
+
*/
|
|
3004
|
+
startingStyle = "data-starting-style",
|
|
3005
|
+
/**
|
|
3006
|
+
* Present when the popup menu is animating out.
|
|
3007
|
+
*/
|
|
3008
|
+
endingStyle = "data-ending-style"
|
|
3009
|
+
}
|
|
3010
|
+
|
|
3011
|
+
/**
|
|
3012
|
+
* Data attributes applied to Select.Empty for styling.
|
|
3013
|
+
* Displayed when no items match the current search filter.
|
|
3014
|
+
*
|
|
3015
|
+
* @example
|
|
3016
|
+
* ```css
|
|
3017
|
+
* [data-bazzaui-select-empty] {
|
|
3018
|
+
* padding: 8px 16px;
|
|
3019
|
+
* color: var(--muted);
|
|
3020
|
+
* text-align: center;
|
|
3021
|
+
* }
|
|
3022
|
+
* ```
|
|
3023
|
+
*/
|
|
3024
|
+
declare enum SelectEmptyDataAttributes {
|
|
3025
|
+
/**
|
|
3026
|
+
* Identifies the component part.
|
|
3027
|
+
* @type {'bazzaui-select-empty'}
|
|
3028
|
+
*/
|
|
3029
|
+
slot = "bazzaui-select-empty"
|
|
3030
|
+
}
|
|
3031
|
+
|
|
3032
|
+
declare enum SelectGroupDataAttributes {
|
|
3033
|
+
/**
|
|
3034
|
+
* Identifies the component part.
|
|
3035
|
+
* @type {'bazzaui-select-group'}
|
|
3036
|
+
*/
|
|
3037
|
+
slot = "bazzaui-select-group"
|
|
3038
|
+
}
|
|
3039
|
+
|
|
3040
|
+
declare enum SelectGroupLabelDataAttributes {
|
|
3041
|
+
/**
|
|
3042
|
+
* Identifies the component part.
|
|
3043
|
+
* @type {'bazzaui-select-group-label'}
|
|
3044
|
+
*/
|
|
3045
|
+
slot = "bazzaui-select-group-label"
|
|
3046
|
+
}
|
|
3047
|
+
|
|
3048
|
+
declare const SelectIconDataAttributes: {
|
|
3049
|
+
/**
|
|
3050
|
+
* Identifies the component part.
|
|
3051
|
+
* @type {'bazzaui-select-icon'}
|
|
3052
|
+
*/
|
|
3053
|
+
readonly slot: "bazzaui-select-icon";
|
|
3054
|
+
/** Present when the popup is open. */
|
|
3055
|
+
readonly open: "data-popup-open";
|
|
3056
|
+
};
|
|
3057
|
+
|
|
3058
|
+
declare enum SelectInputDataAttributes {
|
|
3059
|
+
/**
|
|
3060
|
+
* Identifies the component part.
|
|
3061
|
+
* @type {'bazzaui-select-input'}
|
|
3062
|
+
*/
|
|
3063
|
+
slot = "bazzaui-select-input",
|
|
3064
|
+
/**
|
|
3065
|
+
* Present when the popup menu is open.
|
|
3066
|
+
*/
|
|
3067
|
+
open = "data-open",
|
|
3068
|
+
/**
|
|
3069
|
+
* Present when the popup menu is closed.
|
|
3070
|
+
*/
|
|
3071
|
+
closed = "data-closed"
|
|
3072
|
+
}
|
|
3073
|
+
|
|
3074
|
+
/**
|
|
3075
|
+
* Data attributes applied to Select.List for styling.
|
|
3076
|
+
* Container for select items with role="listbox".
|
|
3077
|
+
*
|
|
3078
|
+
* @example
|
|
3079
|
+
* ```css
|
|
3080
|
+
* [data-bazzaui-select-list] {
|
|
3081
|
+
* max-height: 300px;
|
|
3082
|
+
* overflow-y: auto;
|
|
3083
|
+
* }
|
|
3084
|
+
* ```
|
|
3085
|
+
*/
|
|
3086
|
+
declare enum SelectListDataAttributes {
|
|
3087
|
+
/**
|
|
3088
|
+
* Identifies the component part.
|
|
3089
|
+
* @type {'bazzaui-select-list'}
|
|
3090
|
+
*/
|
|
3091
|
+
slot = "bazzaui-select-list",
|
|
3092
|
+
/**
|
|
3093
|
+
* Always present on the list element.
|
|
3094
|
+
* Used for styling and by useStickyRowWidth to find the list container.
|
|
3095
|
+
*/
|
|
3096
|
+
list = "data-popup-menu-list"
|
|
3097
|
+
}
|
|
3098
|
+
|
|
3099
|
+
/**
|
|
3100
|
+
* Select-specific popup data attributes (in addition to PopupMenuPopupDataAttributes).
|
|
3101
|
+
*/
|
|
3102
|
+
declare enum SelectPopupDataAttributes {
|
|
3103
|
+
/**
|
|
3104
|
+
* Present when the popup is using align-item-with-trigger positioning.
|
|
3105
|
+
* This reflects the actual state, not just the prop value.
|
|
3106
|
+
*/
|
|
3107
|
+
alignItemWithTrigger = "data-align-item-with-trigger"
|
|
3108
|
+
}
|
|
3109
|
+
|
|
3110
|
+
declare const SelectScrollArrowDataAttributes: {
|
|
3111
|
+
/**
|
|
3112
|
+
* Identifies the component part for scroll up arrow.
|
|
3113
|
+
* @type {'bazzaui-select-scroll-up-arrow'}
|
|
3114
|
+
*/
|
|
3115
|
+
readonly slotUp: "bazzaui-select-scroll-up-arrow";
|
|
3116
|
+
/**
|
|
3117
|
+
* Identifies the component part for scroll down arrow.
|
|
3118
|
+
* @type {'bazzaui-select-scroll-down-arrow'}
|
|
3119
|
+
*/
|
|
3120
|
+
readonly slotDown: "bazzaui-select-scroll-down-arrow";
|
|
3121
|
+
/**
|
|
3122
|
+
* Direction of the scroll arrow.
|
|
3123
|
+
* @type {'up' | 'down'}
|
|
3124
|
+
*/
|
|
3125
|
+
readonly direction: "data-direction";
|
|
3126
|
+
/**
|
|
3127
|
+
* Side of the popup.
|
|
3128
|
+
* @type {'top' | 'bottom' | 'left' | 'right'}
|
|
3129
|
+
*/
|
|
3130
|
+
readonly side: "data-side";
|
|
3131
|
+
};
|
|
3132
|
+
|
|
3133
|
+
declare enum SelectSeparatorDataAttributes {
|
|
3134
|
+
/**
|
|
3135
|
+
* Identifies the component part.
|
|
3136
|
+
* @type {'bazzaui-select-separator'}
|
|
3137
|
+
*/
|
|
3138
|
+
slot = "bazzaui-select-separator"
|
|
3139
|
+
}
|
|
3140
|
+
|
|
3141
|
+
/**
|
|
3142
|
+
* Item text registry for displaying selected values.
|
|
3143
|
+
* Maps serialized item value to its text content.
|
|
3144
|
+
*/
|
|
3145
|
+
type ItemTextRegistry = Map<string, string>;
|
|
3146
|
+
/**
|
|
3147
|
+
* Context value for Select components.
|
|
3148
|
+
* Provides value state, callbacks, and form integration.
|
|
3149
|
+
*
|
|
3150
|
+
* @template Value - The type of the select value (can be a primitive or object)
|
|
3151
|
+
*/
|
|
3152
|
+
interface SelectContextValue<Value = unknown> {
|
|
3153
|
+
/** Whether multi-select mode is enabled */
|
|
3154
|
+
multiple: boolean;
|
|
3155
|
+
/** Current selected value (single-select mode) */
|
|
3156
|
+
value: Value | null;
|
|
3157
|
+
/** Current selected values (multi-select mode) */
|
|
3158
|
+
values: Value[];
|
|
3159
|
+
/** Callback when value changes (single-select mode) */
|
|
3160
|
+
onValueChange: (value: Value) => void;
|
|
3161
|
+
/** Callback when values change (multi-select mode) */
|
|
3162
|
+
onValuesChange: (values: Value[]) => void;
|
|
3163
|
+
/**
|
|
3164
|
+
* Custom comparison logic used to determine if a select item value
|
|
3165
|
+
* matches the current selected value.
|
|
3166
|
+
* Useful when item values are objects without matching referentially.
|
|
3167
|
+
* Defaults to Object.is comparison.
|
|
3168
|
+
*/
|
|
3169
|
+
isItemEqualToValue: ItemEqualityComparer<Value>;
|
|
3170
|
+
/**
|
|
3171
|
+
* When the item values are objects, this function converts the object
|
|
3172
|
+
* value to a string representation for display in the trigger.
|
|
3173
|
+
* If the shape of the object is { value, label }, the label will be
|
|
3174
|
+
* used automatically without needing to specify this prop.
|
|
3175
|
+
*/
|
|
3176
|
+
itemToStringLabel?: (itemValue: Value) => string;
|
|
3177
|
+
/**
|
|
3178
|
+
* When the item values are objects, this function converts the object
|
|
3179
|
+
* value to a string representation for form submission.
|
|
3180
|
+
* If the shape of the object is { value, label }, the value will be
|
|
3181
|
+
* used automatically without needing to specify this prop.
|
|
3182
|
+
*/
|
|
3183
|
+
itemToStringValue?: (itemValue: Value) => string;
|
|
3184
|
+
/** Form field name for submission */
|
|
3185
|
+
name?: string;
|
|
3186
|
+
/** Associate with a form by ID */
|
|
3187
|
+
form?: string;
|
|
3188
|
+
/** Whether this field is required */
|
|
3189
|
+
required?: boolean;
|
|
3190
|
+
/** Whether the select is disabled */
|
|
3191
|
+
disabled: boolean;
|
|
3192
|
+
/** Placeholder text when no value selected */
|
|
3193
|
+
placeholder: string;
|
|
3194
|
+
/** Registry of item values to their text content */
|
|
3195
|
+
itemTextRegistry: ItemTextRegistry;
|
|
3196
|
+
/** Register an item's text content */
|
|
3197
|
+
registerItemText: (value: string, text: string) => () => void;
|
|
3198
|
+
/**
|
|
3199
|
+
* Data structure of the items for label resolution.
|
|
3200
|
+
* Used to display labels before items mount (e.g., on initial render with defaultValue).
|
|
3201
|
+
* Can be a record mapping values to labels, or an array of { value, label } objects.
|
|
3202
|
+
*/
|
|
3203
|
+
items?: Record<string, React$1.ReactNode> | Array<{
|
|
3204
|
+
value: string;
|
|
3205
|
+
label: React$1.ReactNode;
|
|
3206
|
+
}>;
|
|
3207
|
+
/** ID for the listbox element */
|
|
3208
|
+
listId: string;
|
|
3209
|
+
/** Ref to the trigger element */
|
|
3210
|
+
triggerRef: React$1.RefObject<HTMLElement | null>;
|
|
3211
|
+
/** Ref to the value display element (text in trigger) */
|
|
3212
|
+
valueRef: React$1.RefObject<HTMLElement | null>;
|
|
3213
|
+
/** Ref to the selected item's text element */
|
|
3214
|
+
selectedItemTextRef: React$1.MutableRefObject<HTMLElement | null>;
|
|
3215
|
+
/** Ref to the first item's text element (used when no selection for alignItemWithTrigger) */
|
|
3216
|
+
firstItemTextRef: React$1.MutableRefObject<HTMLElement | null>;
|
|
3217
|
+
/** Callback to set the trigger element */
|
|
3218
|
+
setTriggerElement: (element: HTMLElement | null) => void;
|
|
3219
|
+
/** Callback to set the value element */
|
|
3220
|
+
setValueElement: (element: HTMLElement | null) => void;
|
|
3221
|
+
/** Register a callback to reset positioning state after close animation */
|
|
3222
|
+
registerResetPositioningCallback: (callback: (() => void) | null) => () => void;
|
|
3223
|
+
}
|
|
3224
|
+
/**
|
|
3225
|
+
* Hook to access the Select context.
|
|
3226
|
+
* Throws if used outside a Select.Root.
|
|
3227
|
+
*/
|
|
3228
|
+
declare function useSelectContext<Value = unknown>(): SelectContextValue<Value>;
|
|
3229
|
+
/**
|
|
3230
|
+
* Hook to optionally access the Select context.
|
|
3231
|
+
* Returns null if used outside a Select.Root.
|
|
3232
|
+
*/
|
|
3233
|
+
declare function useMaybeSelectContext<Value = unknown>(): SelectContextValue<Value> | null;
|
|
3234
|
+
|
|
3235
|
+
type Side = 'top' | 'bottom' | 'left' | 'right';
|
|
3236
|
+
type Align = 'start' | 'center' | 'end';
|
|
3237
|
+
/**
|
|
3238
|
+
* Context value for Select Positioner.
|
|
3239
|
+
* Provides alignment state for coordinating positioning behavior.
|
|
3240
|
+
*/
|
|
3241
|
+
interface SelectPositionerContextValue {
|
|
3242
|
+
/**
|
|
3243
|
+
* Whether alignItemWithTrigger is actively being used.
|
|
3244
|
+
* This may be false even if the prop is true (e.g., fallback scenarios).
|
|
3245
|
+
*/
|
|
3246
|
+
alignItemWithTriggerActive: boolean;
|
|
3247
|
+
/**
|
|
3248
|
+
* The rendered side of the popup (or 'none' when using align-item-with-trigger).
|
|
3249
|
+
*/
|
|
3250
|
+
side: Side | 'none';
|
|
3251
|
+
/**
|
|
3252
|
+
* The rendered alignment of the popup.
|
|
3253
|
+
*/
|
|
3254
|
+
align: Align;
|
|
3255
|
+
/**
|
|
3256
|
+
* Ref for the scroll up arrow element.
|
|
3257
|
+
*/
|
|
3258
|
+
scrollUpArrowRef: React$1.RefObject<HTMLDivElement | null>;
|
|
3259
|
+
/**
|
|
3260
|
+
* Ref for the scroll down arrow element.
|
|
3261
|
+
*/
|
|
3262
|
+
scrollDownArrowRef: React$1.RefObject<HTMLDivElement | null>;
|
|
3263
|
+
/**
|
|
3264
|
+
* Callback to disable alignItemWithTrigger (fallback to normal positioning).
|
|
3265
|
+
*/
|
|
3266
|
+
setAlignItemWithTriggerActive: (active: boolean) => void;
|
|
3267
|
+
/**
|
|
3268
|
+
* Callback to reset positioning state after close animation completes.
|
|
3269
|
+
* This preserves positioning during exit animations.
|
|
3270
|
+
*/
|
|
3271
|
+
resetPositioningState: () => void;
|
|
3272
|
+
}
|
|
3273
|
+
/**
|
|
3274
|
+
* Hook to access the Select Positioner context.
|
|
3275
|
+
* Returns null if used outside a SelectPositioner.
|
|
3276
|
+
*/
|
|
3277
|
+
declare function useSelectPositionerContext(): SelectPositionerContextValue | null;
|
|
3278
|
+
|
|
3279
|
+
interface SelectItemContextValue<Value = unknown> {
|
|
3280
|
+
/** Unique ID for this item (for DOM id attribute) */
|
|
3281
|
+
id: string;
|
|
3282
|
+
/** The value of this item */
|
|
3283
|
+
value: Value;
|
|
3284
|
+
/** The text value/label for this item */
|
|
3285
|
+
textValue: string | undefined;
|
|
3286
|
+
/** Whether the item is highlighted */
|
|
3287
|
+
highlighted: boolean;
|
|
3288
|
+
/** Whether the item is disabled */
|
|
3289
|
+
disabled: boolean;
|
|
3290
|
+
/** Whether the item is selected */
|
|
3291
|
+
selected: boolean;
|
|
3292
|
+
}
|
|
3293
|
+
declare function useSelectItemContext<Value = unknown>(): SelectItemContextValue<Value>;
|
|
3294
|
+
declare function useMaybeSelectItemContext<Value = unknown>(): SelectItemContextValue<Value> | null;
|
|
3295
|
+
|
|
3296
|
+
export { AsyncLoaderResult, index_parts$3 as Combobox, PopupMenuArrow as ComboboxArrow, ComboboxArrowDataAttributes, PopupMenuBackdrop as ComboboxBackdrop, ComboboxBackdropDataAttributes, ComboboxClear, type ComboboxClearProps, type ComboboxClearState, type ComboboxContextValue, PopupMenuEmpty as ComboboxEmpty, ComboboxEmptyDataAttributes, PopupMenuGroup as ComboboxGroup, ComboboxGroupDataAttributes, PopupMenuGroupLabel as ComboboxGroupLabel, ComboboxGroupLabelDataAttributes, ComboboxIconDataAttributes, ComboboxInput, type ComboboxInputCursorBehavior, ComboboxInputDataAttributes, type ComboboxInputProps, type ComboboxInputState, ComboboxInputWrapper, ComboboxInputWrapperDataAttributes, type ComboboxInputWrapperProps, type ComboboxInputWrapperState, ComboboxItem, type ComboboxItemContextValue, ComboboxItemDataAttributes, ComboboxItemIndicator, ComboboxItemIndicatorDataAttributes, type ComboboxItemIndicatorProps, type ComboboxItemIndicatorState, ComboboxItemLabel, type ComboboxItemLabelProps, type ComboboxItemProps, type ComboboxItemState, type ComboboxLayout, PopupMenuList as ComboboxList, ComboboxListDataAttributes, PopupMenuPopup as ComboboxPopup, ComboboxPopupDataAttributes, PopupMenuPortal as ComboboxPortal, ComboboxPositioner, type ComboboxPositionerContextValue, ComboboxPositionerDataAttributes, type ComboboxPositionerProps, ComboboxRoot, type ComboboxRootProps, ComboboxScrollArrowDataAttributes, PopupMenuSeparator as ComboboxSeparator, ComboboxSeparatorDataAttributes, ComboboxSurface, type ComboboxSurfaceProps, VirtualItem as ComboboxVirtualItem, index_parts$2 as ContextMenu, PopupMenuArrow as ContextMenuArrow, ContextMenuArrowDataAttributes, PopupMenuBackdrop as ContextMenuBackdrop, ContextMenuBackdropDataAttributes, PopupMenuCheckboxItem as ContextMenuCheckboxItem, ContextMenuCheckboxItemDataAttributes, PopupMenuCheckboxItemIndicator as ContextMenuCheckboxItemIndicator, ContextMenuCheckboxItemIndicatorDataAttributes, PopupMenuInput as ContextMenuDataInput, PopupMenuDataList as ContextMenuDataList, PopupMenuDataSurface as ContextMenuDataSurface, PopupMenuEmpty as ContextMenuEmpty, ContextMenuEmptyDataAttributes, PopupMenuGroup as ContextMenuGroup, ContextMenuGroupDataAttributes, PopupMenuGroupLabel as ContextMenuGroupLabel, ContextMenuGroupLabelDataAttributes, PopupMenuIcon as ContextMenuIcon, ContextMenuIconDataAttributes, PopupMenuInput as ContextMenuInput, ContextMenuInputDataAttributes, PopupMenuItem as ContextMenuItem, ContextMenuItemDataAttributes, PopupMenuList as ContextMenuList, ContextMenuListDataAttributes, PopupMenuPopup as ContextMenuPopup, ContextMenuPopupDataAttributes, PopupMenuPortal as ContextMenuPortal, PopupMenuPositioner as ContextMenuPositioner, ContextMenuPositionerDataAttributes, PopupMenuRadioGroup as ContextMenuRadioGroup, ContextMenuRadioGroupDataAttributes, PopupMenuRadioGroupValue as ContextMenuRadioGroupValue, PopupMenuRadioItem as ContextMenuRadioItem, ContextMenuRadioItemDataAttributes, PopupMenuRadioItemIndicator as ContextMenuRadioItemIndicator, ContextMenuRadioItemIndicatorDataAttributes, ContextMenuRoot, type ContextMenuRootProps, ContextMenuScrollArrowDataAttributes, PopupMenuSeparator as ContextMenuSeparator, ContextMenuSeparatorDataAttributes, PopupMenuShortcut as ContextMenuShortcut, ContextMenuShortcutDataAttributes, PopupMenuSubmenuRoot as ContextMenuSubmenuRoot, PopupMenuSubmenuTrigger as ContextMenuSubmenuTrigger, ContextMenuSubmenuTriggerDataAttributes, PopupMenuSubmenuTriggerIndicator as ContextMenuSubmenuTriggerIndicator, ContextMenuSubmenuTriggerIndicatorDataAttributes, PopupMenuSurface as ContextMenuSurface, ContextMenuSurfaceDataAttributes, PopupMenuSurfaceProps as ContextMenuSurfaceProps, ContextMenuTrigger, ContextMenuTriggerDataAttributes, type ContextMenuTriggerProps, type ContextMenuTriggerState, VirtualItem as ContextMenuVirtualItem, type CreateQueryLoaderProps, type CreateStaticLoaderProps, type CreateVanillaQueryLoaderProps, type CreateVanillaStaticLoaderProps, index_parts$1 as DropdownMenu, PopupMenuArrow as DropdownMenuArrow, DropdownMenuArrowDataAttributes, PopupMenuBackdrop as DropdownMenuBackdrop, DropdownMenuBackdropDataAttributes, PopupMenuCheckboxItem as DropdownMenuCheckboxItem, DropdownMenuCheckboxItemDataAttributes, PopupMenuCheckboxItemIndicator as DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemIndicatorDataAttributes, PopupMenuInput as DropdownMenuDataInput, PopupMenuDataList as DropdownMenuDataList, PopupMenuDataSurface as DropdownMenuDataSurface, PopupMenuEmpty as DropdownMenuEmpty, DropdownMenuEmptyDataAttributes, PopupMenuGroup as DropdownMenuGroup, DropdownMenuGroupDataAttributes, PopupMenuGroupLabel as DropdownMenuGroupLabel, DropdownMenuGroupLabelDataAttributes, PopupMenuIcon as DropdownMenuIcon, DropdownMenuIconDataAttributes, PopupMenuInput as DropdownMenuInput, DropdownMenuInputDataAttributes, PopupMenuItem as DropdownMenuItem, DropdownMenuItemDataAttributes, PopupMenuList as DropdownMenuList, DropdownMenuListDataAttributes, PopupMenuPopup as DropdownMenuPopup, DropdownMenuPopupDataAttributes, PopupMenuPortal as DropdownMenuPortal, PopupMenuPositioner as DropdownMenuPositioner, DropdownMenuPositionerDataAttributes, PopupMenuRadioGroup as DropdownMenuRadioGroup, DropdownMenuRadioGroupDataAttributes, PopupMenuRadioGroupValue as DropdownMenuRadioGroupValue, PopupMenuRadioItem as DropdownMenuRadioItem, DropdownMenuRadioItemDataAttributes, PopupMenuRadioItemIndicator as DropdownMenuRadioItemIndicator, DropdownMenuRadioItemIndicatorDataAttributes, DropdownMenuRoot, type DropdownMenuRootProps, DropdownMenuScrollArrowDataAttributes, PopupMenuSeparator as DropdownMenuSeparator, DropdownMenuSeparatorDataAttributes, PopupMenuShortcut as DropdownMenuShortcut, DropdownMenuShortcutDataAttributes, PopupMenuSubmenuRoot as DropdownMenuSubmenuRoot, PopupMenuSubmenuTrigger as DropdownMenuSubmenuTrigger, DropdownMenuSubmenuTriggerDataAttributes, PopupMenuSubmenuTriggerIndicator as DropdownMenuSubmenuTriggerIndicator, DropdownMenuSubmenuTriggerIndicatorDataAttributes, PopupMenuSurface as DropdownMenuSurface, DropdownMenuSurfaceDataAttributes, PopupMenuSurfaceProps as DropdownMenuSurfaceProps, DropdownMenuTrigger, DropdownMenuTriggerDataAttributes, type DropdownMenuTriggerProps, VirtualItem as DropdownMenuVirtualItem, LoaderComponentProps, NodeDef, QueryDependentLoaderConfig, index_parts as Select, PopupMenuArrow as SelectArrow, SelectArrowDataAttributes, PopupMenuBackdrop as SelectBackdrop, SelectBackdropDataAttributes, type SelectContextValue, PopupMenuEmpty as SelectEmpty, SelectEmptyDataAttributes, PopupMenuGroup as SelectGroup, SelectGroupDataAttributes, PopupMenuGroupLabel as SelectGroupLabel, SelectGroupLabelDataAttributes, SelectIconDataAttributes, PopupMenuInput as SelectInput, SelectInputDataAttributes, SelectItem, type SelectItemContextValue, SelectItemDataAttributes, SelectItemIndicator, SelectItemIndicatorDataAttributes, type SelectItemIndicatorProps, type SelectItemIndicatorState, SelectItemLabel, type SelectItemLabelProps, type SelectItemProps, type SelectItemState, PopupMenuList as SelectList, SelectListDataAttributes, SelectPopup, SelectPopupDataAttributes, type SelectPopupProps, type SelectPopupState, PopupMenuPortal as SelectPortal, SelectPositioner, type Align as SelectPositionerAlign, type SelectPositionerContextValue, SelectPositionerDataAttributes, type SelectPositionerProps, type Side as SelectPositionerSide, SelectRoot, type SelectRootProps, SelectScrollArrowDataAttributes, PopupMenuSeparator as SelectSeparator, SelectSeparatorDataAttributes, SelectSurface, type SelectSurfaceProps, SelectTrigger, SelectTriggerDataAttributes, type SelectTriggerProps, type SelectTriggerState, SelectValue, type SelectValueProps, type SelectValueState, VirtualItem as SelectVirtualItem, StaticLoaderConfig, type TanStackQueryResult, createLoaderComponent, createQueryLoader, createStaticLoader, createVanillaQueryLoader, createVanillaStaticLoader, toAsyncLoaderResult, useComboboxContext, useComboboxItemContext, useComboboxPositionerContext, useMaybeComboboxContext, useMaybeComboboxItemContext, useMaybeSelectContext, useMaybeSelectItemContext, useSelectContext, useSelectItemContext, useSelectPositionerContext };
|