@bazza-ui/react 0.0.0 → 0.1.0-canary.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/ListboxStore-BYBpGrOz.d.ts +453 -0
  2. package/dist/ListboxStore-nmorsoqX.d.cts +453 -0
  3. package/dist/chunk-4C666HHU.js +2 -0
  4. package/dist/chunk-4C666HHU.js.map +1 -0
  5. package/dist/chunk-5T5B5SPR.cjs +2 -0
  6. package/dist/chunk-5T5B5SPR.cjs.map +1 -0
  7. package/dist/chunk-A4Z5BY7H.js +2 -0
  8. package/dist/chunk-A4Z5BY7H.js.map +1 -0
  9. package/dist/chunk-BFOY762U.js +2 -0
  10. package/dist/chunk-BFOY762U.js.map +1 -0
  11. package/dist/chunk-IT372NHF.js +2 -0
  12. package/dist/chunk-IT372NHF.js.map +1 -0
  13. package/dist/chunk-JFEVUUPC.cjs +2 -0
  14. package/dist/chunk-JFEVUUPC.cjs.map +1 -0
  15. package/dist/chunk-KO3DXT3Y.js +2 -0
  16. package/dist/chunk-KO3DXT3Y.js.map +1 -0
  17. package/dist/chunk-LXXK4S4Q.js +2 -0
  18. package/dist/chunk-LXXK4S4Q.js.map +1 -0
  19. package/dist/chunk-M4G6J7DP.cjs +2 -0
  20. package/dist/chunk-M4G6J7DP.cjs.map +1 -0
  21. package/dist/chunk-SCDHQZFI.cjs +2 -0
  22. package/dist/chunk-SCDHQZFI.cjs.map +1 -0
  23. package/dist/chunk-W4ACKMIZ.cjs +2 -0
  24. package/dist/chunk-W4ACKMIZ.cjs.map +1 -0
  25. package/dist/chunk-XMZZ62VJ.cjs +2 -0
  26. package/dist/chunk-XMZZ62VJ.cjs.map +1 -0
  27. package/dist/combobox/index.cjs +2 -0
  28. package/dist/combobox/index.cjs.map +1 -0
  29. package/dist/combobox/index.d.cts +1066 -0
  30. package/dist/combobox/index.d.ts +1066 -0
  31. package/dist/combobox/index.js +2 -0
  32. package/dist/combobox/index.js.map +1 -0
  33. package/dist/command-menu/index.cjs +2 -0
  34. package/dist/command-menu/index.cjs.map +1 -0
  35. package/dist/command-menu/index.d.cts +154 -0
  36. package/dist/command-menu/index.d.ts +154 -0
  37. package/dist/command-menu/index.js +2 -0
  38. package/dist/command-menu/index.js.map +1 -0
  39. package/dist/command-score-CTJ9NV6n.d.cts +23 -0
  40. package/dist/command-score-CTJ9NV6n.d.ts +23 -0
  41. package/dist/context-menu/index.cjs +2 -0
  42. package/dist/context-menu/index.cjs.map +1 -0
  43. package/dist/context-menu/index.d.cts +672 -0
  44. package/dist/context-menu/index.d.ts +672 -0
  45. package/dist/context-menu/index.js +2 -0
  46. package/dist/context-menu/index.js.map +1 -0
  47. package/dist/dropdown-menu/index.cjs +2 -0
  48. package/dist/dropdown-menu/index.cjs.map +1 -0
  49. package/dist/dropdown-menu/index.d.cts +699 -0
  50. package/dist/dropdown-menu/index.d.ts +699 -0
  51. package/dist/dropdown-menu/index.js +2 -0
  52. package/dist/dropdown-menu/index.js.map +1 -0
  53. package/dist/events-DOGItflK.d.ts +1776 -0
  54. package/dist/events-DPsuhBln.d.cts +1776 -0
  55. package/dist/input-C95v6jB0.d.cts +46 -0
  56. package/dist/input-CYweYB_i.d.ts +46 -0
  57. package/dist/internal/listbox/index.cjs +2 -0
  58. package/dist/internal/listbox/index.cjs.map +1 -0
  59. package/dist/internal/listbox/index.d.cts +272 -0
  60. package/dist/internal/listbox/index.d.ts +272 -0
  61. package/dist/internal/listbox/index.js +2 -0
  62. package/dist/internal/listbox/index.js.map +1 -0
  63. package/dist/internal/popup-menu/index.cjs +2 -0
  64. package/dist/internal/popup-menu/index.cjs.map +1 -0
  65. package/dist/internal/popup-menu/index.d.cts +238 -0
  66. package/dist/internal/popup-menu/index.d.ts +238 -0
  67. package/dist/internal/popup-menu/index.js +2 -0
  68. package/dist/internal/popup-menu/index.js.map +1 -0
  69. package/dist/items-B6HeFO_8.d.cts +37 -0
  70. package/dist/items-B6HeFO_8.d.ts +37 -0
  71. package/dist/kbd/index.cjs +2 -0
  72. package/dist/kbd/index.cjs.map +1 -0
  73. package/dist/kbd/index.d.cts +61 -0
  74. package/dist/kbd/index.d.ts +61 -0
  75. package/dist/kbd/index.js +2 -0
  76. package/dist/kbd/index.js.map +1 -0
  77. package/dist/loaders/index.cjs +2 -0
  78. package/dist/loaders/index.cjs.map +1 -0
  79. package/dist/loaders/index.d.cts +363 -0
  80. package/dist/loaders/index.d.ts +363 -0
  81. package/dist/loaders/index.js +2 -0
  82. package/dist/loaders/index.js.map +1 -0
  83. package/dist/loading-C6WZGUc3.d.cts +29 -0
  84. package/dist/loading-CC4n55sR.d.ts +29 -0
  85. package/dist/resolve-BYm41YfG.d.ts +406 -0
  86. package/dist/resolve-Dk_fAKb2.d.cts +406 -0
  87. package/dist/scroll-arrow-B81wZTZ2.d.cts +544 -0
  88. package/dist/scroll-arrow-CNd0tgME.d.ts +544 -0
  89. package/dist/select/index.cjs +2 -0
  90. package/dist/select/index.cjs.map +1 -0
  91. package/dist/select/index.d.cts +985 -0
  92. package/dist/select/index.d.ts +985 -0
  93. package/dist/select/index.js +2 -0
  94. package/dist/select/index.js.map +1 -0
  95. package/dist/separator-BiySI623.d.cts +275 -0
  96. package/dist/separator-De8l8DKO.d.ts +275 -0
  97. package/dist/surface-context-ClmxshBW.d.ts +14 -0
  98. package/dist/surface-context-DF-L-30G.d.cts +14 -0
  99. package/dist/type-guards-BC2B6bVi.d.cts +350 -0
  100. package/dist/type-guards-ybcHBB3C.d.ts +350 -0
  101. package/dist/types-DT4FOOa2.d.cts +51 -0
  102. package/dist/types-DT4FOOa2.d.ts +51 -0
  103. package/dist/use-listbox-item-NzZuY34-.d.cts +212 -0
  104. package/dist/use-listbox-item-NzZuY34-.d.ts +212 -0
  105. package/dist/video-player/index.cjs +3 -0
  106. package/dist/video-player/index.cjs.map +1 -0
  107. package/dist/video-player/index.d.cts +1391 -0
  108. package/dist/video-player/index.d.ts +1391 -0
  109. package/dist/video-player/index.js +3 -0
  110. package/dist/video-player/index.js.map +1 -0
  111. package/package.json +66 -12
  112. package/dist/index.d.ts +0 -2
  113. package/dist/index.js +0 -2
@@ -0,0 +1,275 @@
1
+ import * as React from 'react';
2
+ import { C as ComponentProps } from './types-DT4FOOa2.cjs';
3
+ import { aV as DataSurfaceProps } from './events-DPsuhBln.cjs';
4
+ import { F as FilterFn, S as SearchNormalizer } from './ListboxStore-nmorsoqX.cjs';
5
+
6
+ interface PopupMenuIconState extends Record<string, unknown> {
7
+ /**
8
+ * Whether the popup is currently open.
9
+ */
10
+ open: boolean;
11
+ }
12
+ interface PopupMenuIconProps extends ComponentProps<'span', PopupMenuIcon.State> {
13
+ }
14
+ /**
15
+ * An icon that indicates the trigger opens a popup.
16
+ * Typically used inside the trigger to show a chevron or dropdown arrow.
17
+ * Renders a `<span>` element.
18
+ */
19
+ declare const PopupMenuIcon: React.ForwardRefExoticComponent<Omit<PopupMenuIcon.Props, "ref"> & React.RefAttributes<HTMLSpanElement>>;
20
+ declare namespace PopupMenuIcon {
21
+ type State = PopupMenuIconState;
22
+ interface Props extends PopupMenuIconProps {
23
+ }
24
+ }
25
+
26
+ interface PopupMenuEmptyState extends Record<string, unknown> {
27
+ first: boolean;
28
+ last: boolean;
29
+ }
30
+ interface PopupMenuEmptyProps extends ComponentProps<'div', PopupMenuEmpty.State> {
31
+ children: React.ReactNode;
32
+ }
33
+ /**
34
+ * Renders when no items match the current search query.
35
+ * Only visible when there's an active search with zero results.
36
+ * Renders a `<div>` element.
37
+ */
38
+ declare const PopupMenuEmpty: React.ForwardRefExoticComponent<Omit<PopupMenuEmpty.Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
39
+ declare namespace PopupMenuEmpty {
40
+ type State = PopupMenuEmptyState;
41
+ interface Props extends PopupMenuEmptyProps {
42
+ }
43
+ }
44
+
45
+ /**
46
+ * State passed to children render function.
47
+ */
48
+ interface PopupMenuListChildrenState {
49
+ /** Current search query */
50
+ search: string;
51
+ /** Number of items matching the current filter */
52
+ filteredCount: number;
53
+ }
54
+ interface PopupMenuListState extends Record<string, unknown> {
55
+ }
56
+ interface PopupMenuListProps extends Omit<ComponentProps<'div', PopupMenuList.State>, 'children' | 'content'> {
57
+ /**
58
+ * Content to render inside the list.
59
+ * Can be a render function that receives the current search state.
60
+ */
61
+ children: React.ReactNode | ((state: PopupMenuListChildrenState) => React.ReactNode);
62
+ /**
63
+ * Accessible label for the listbox.
64
+ * @default 'Suggestions'
65
+ */
66
+ label?: string;
67
+ /**
68
+ * When true, measures row widths and applies `--row-width` CSS variable.
69
+ * Keeps the list at the maximum width seen while scrolling.
70
+ * Useful for virtualized lists where content width varies.
71
+ * @default true
72
+ */
73
+ measureRowWidth?: boolean;
74
+ /**
75
+ * Maximum width cap for row measurement (in pixels).
76
+ * Only used when `measureRowWidth` is true.
77
+ */
78
+ maxRowWidth?: number;
79
+ /**
80
+ * Ref to the element that owns the list's scroll position.
81
+ * Use when the semantic list is rendered inside another scroll container.
82
+ */
83
+ scrollContainerRef?: React.RefObject<HTMLElement | null>;
84
+ /**
85
+ * When any value in this array changes, previously-measured row IDs are
86
+ * cleared so rows re-measure (the sticky max width is kept — it only ever
87
+ * grows until the menu closes). Use for state that changes row content for
88
+ * the same IDs, e.g. tree rows that re-render as breadcrumb rows when deep
89
+ * search toggles. Values are compared with `Object.is`, so pass stable
90
+ * primitives — an inline object recreated each render would re-trigger
91
+ * every render.
92
+ */
93
+ remeasureDependencies?: React.DependencyList;
94
+ }
95
+ declare const PopupMenuList: React.ForwardRefExoticComponent<Omit<PopupMenuList.Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
96
+ declare namespace PopupMenuList {
97
+ type State = PopupMenuListState;
98
+ type ChildrenState = PopupMenuListChildrenState;
99
+ interface Props extends PopupMenuListProps {
100
+ }
101
+ }
102
+
103
+ interface PopupMenuSurfaceState extends Record<string, unknown> {
104
+ }
105
+ interface PopupMenuSurfaceProps extends Omit<ComponentProps<'div', PopupMenuSurface.State>, 'content'>, DataSurfaceProps {
106
+ /**
107
+ * Filter function for matching items against search query.
108
+ * Returns a score between 0 and 1 (0 = no match, > 0 = match).
109
+ * Pass `false` to disable filtering entirely.
110
+ * @default commandScore (fuzzy matching)
111
+ */
112
+ filter?: FilterFn | false;
113
+ /**
114
+ * Transforms search input before filtering and visibility logic.
115
+ * @default trim whitespace (`search.trim()`)
116
+ */
117
+ normalizeSearch?: SearchNormalizer;
118
+ /**
119
+ * Controlled search value.
120
+ */
121
+ search?: string;
122
+ /**
123
+ * Callback when search value changes.
124
+ */
125
+ onSearchChange?: (search: string) => void;
126
+ /**
127
+ * Default search value for uncontrolled usage.
128
+ * @default ''
129
+ */
130
+ defaultSearch?: string;
131
+ /**
132
+ * Whether navigation should loop from last to first item and vice versa.
133
+ * @default true
134
+ */
135
+ loop?: boolean;
136
+ /**
137
+ * Controls auto-highlighting behavior when the menu opens.
138
+ * - `true`: highlight the first item (default)
139
+ * - `false`: don't auto-highlight any item
140
+ * - `string`: highlight the item with this specific value
141
+ * @default true
142
+ */
143
+ autoHighlightFirst?: boolean | string;
144
+ /**
145
+ * Whether to clear the search query when the menu closes.
146
+ * - `'after-exit'`: clear after exit animation completes (default)
147
+ * - `true`: clear immediately when menu closes
148
+ * - `false`: preserve search when menu closes
149
+ * @default 'after-exit'
150
+ */
151
+ clearSearchOnClose?: boolean | 'after-exit';
152
+ /**
153
+ * Whether to reset the list scroll position when the search query changes.
154
+ * @default true
155
+ */
156
+ resetScrollOnSearch?: boolean;
157
+ /**
158
+ * Whether to skip auto-focusing the input/list when this surface becomes the focus owner.
159
+ * Useful for Combobox where the input is outside the popup and should retain focus.
160
+ * @default false
161
+ */
162
+ skipAutoFocus?: boolean;
163
+ /**
164
+ * Ordered list of item values when using `filter={false}`.
165
+ * This tells the store the intended display order for navigation/highlighting.
166
+ * Required when `filter={false}` - must always be provided with the current visible items.
167
+ */
168
+ orderedItems?: string[];
169
+ children: React.ReactNode;
170
+ }
171
+ /**
172
+ * Provides search context and manages item registration for popup menu.
173
+ * Place inside PopupMenu.Popup to enable search functionality.
174
+ * Renders a `<div>` element.
175
+ */
176
+ declare const PopupMenuSurface: React.ForwardRefExoticComponent<Omit<PopupMenuSurface.Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
177
+ declare namespace PopupMenuSurface {
178
+ type State = PopupMenuSurfaceState;
179
+ interface Props extends PopupMenuSurfaceProps {
180
+ }
181
+ }
182
+
183
+ interface PopupMenuGroupState extends Record<string, unknown> {
184
+ /**
185
+ * Whether the group is hidden due to no matching items.
186
+ */
187
+ hidden: boolean;
188
+ /**
189
+ * Present when this is the first visible group in the list.
190
+ */
191
+ firstGroup: boolean;
192
+ /**
193
+ * Present when this is the last visible group in the list.
194
+ */
195
+ lastGroup: boolean;
196
+ first: boolean;
197
+ last: boolean;
198
+ }
199
+ interface PopupMenuGroupProps extends ComponentProps<'div', PopupMenuGroup.State> {
200
+ /**
201
+ * Whether to force render this group regardless of filter results.
202
+ * @default false
203
+ */
204
+ forceMount?: boolean;
205
+ children: React.ReactNode;
206
+ }
207
+ /**
208
+ * Groups related popup menu items together.
209
+ * Hidden when no child items match the current filter.
210
+ * Renders a `<div>` element with role="group".
211
+ */
212
+ declare const PopupMenuGroup: React.ForwardRefExoticComponent<Omit<PopupMenuGroup.Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
213
+ declare namespace PopupMenuGroup {
214
+ type State = PopupMenuGroupState;
215
+ interface Props extends PopupMenuGroupProps {
216
+ }
217
+ }
218
+
219
+ interface PopupMenuGroupLabelState extends Record<string, unknown> {
220
+ /**
221
+ * Present when this label is the first row in the list.
222
+ */
223
+ first: boolean;
224
+ /**
225
+ * Present when this label is the last row in the list.
226
+ */
227
+ last: boolean;
228
+ /**
229
+ * Present when this label's parent group is the first visible group in the list.
230
+ */
231
+ firstGroup: boolean;
232
+ /**
233
+ * Present when this label's parent group is the last visible group in the list.
234
+ */
235
+ lastGroup: boolean;
236
+ }
237
+ interface PopupMenuGroupLabelProps extends ComponentProps<'div', PopupMenuGroupLabel.State> {
238
+ children: React.ReactNode;
239
+ }
240
+ /**
241
+ * A label/heading for a group of popup menu items.
242
+ * Renders a `<div>` element with role="presentation".
243
+ */
244
+ declare const PopupMenuGroupLabel: React.ForwardRefExoticComponent<Omit<PopupMenuGroupLabel.Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
245
+ declare namespace PopupMenuGroupLabel {
246
+ type State = PopupMenuGroupLabelState;
247
+ interface Props extends PopupMenuGroupLabelProps {
248
+ }
249
+ }
250
+
251
+ interface PopupMenuSeparatorState extends Record<string, unknown> {
252
+ first: boolean;
253
+ last: boolean;
254
+ }
255
+ interface PopupMenuSeparatorProps extends ComponentProps<'div', PopupMenuSeparator.State> {
256
+ /**
257
+ * Whether to always render the separator, even during search.
258
+ * By default, separators are hidden when there's an active search query.
259
+ * @default false
260
+ */
261
+ alwaysRender?: boolean;
262
+ }
263
+ /**
264
+ * A visual separator between popup menu items.
265
+ * Hidden during active search unless `alwaysRender` is true.
266
+ * Renders a `<div>` element with role="separator".
267
+ */
268
+ declare const PopupMenuSeparator: React.ForwardRefExoticComponent<Omit<PopupMenuSeparator.Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
269
+ declare namespace PopupMenuSeparator {
270
+ type State = PopupMenuSeparatorState;
271
+ interface Props extends PopupMenuSeparatorProps {
272
+ }
273
+ }
274
+
275
+ export { PopupMenuEmpty as P, PopupMenuGroup as a, PopupMenuGroupLabel as b, PopupMenuIcon as c, PopupMenuList as d, PopupMenuSeparator as e, PopupMenuSurface as f, type PopupMenuEmptyProps as g, type PopupMenuEmptyState as h, type PopupMenuGroupLabelProps as i, type PopupMenuGroupLabelState as j, type PopupMenuGroupProps as k, type PopupMenuGroupState as l, type PopupMenuIconProps as m, type PopupMenuIconState as n, type PopupMenuListChildrenState as o, type PopupMenuListProps as p, type PopupMenuListState as q, type PopupMenuSeparatorProps as r, type PopupMenuSeparatorState as s, type PopupMenuSurfaceProps as t, type PopupMenuSurfaceState as u };
@@ -0,0 +1,275 @@
1
+ import * as React from 'react';
2
+ import { C as ComponentProps } from './types-DT4FOOa2.js';
3
+ import { aV as DataSurfaceProps } from './events-DOGItflK.js';
4
+ import { F as FilterFn, S as SearchNormalizer } from './ListboxStore-BYBpGrOz.js';
5
+
6
+ interface PopupMenuIconState extends Record<string, unknown> {
7
+ /**
8
+ * Whether the popup is currently open.
9
+ */
10
+ open: boolean;
11
+ }
12
+ interface PopupMenuIconProps extends ComponentProps<'span', PopupMenuIcon.State> {
13
+ }
14
+ /**
15
+ * An icon that indicates the trigger opens a popup.
16
+ * Typically used inside the trigger to show a chevron or dropdown arrow.
17
+ * Renders a `<span>` element.
18
+ */
19
+ declare const PopupMenuIcon: React.ForwardRefExoticComponent<Omit<PopupMenuIcon.Props, "ref"> & React.RefAttributes<HTMLSpanElement>>;
20
+ declare namespace PopupMenuIcon {
21
+ type State = PopupMenuIconState;
22
+ interface Props extends PopupMenuIconProps {
23
+ }
24
+ }
25
+
26
+ interface PopupMenuEmptyState extends Record<string, unknown> {
27
+ first: boolean;
28
+ last: boolean;
29
+ }
30
+ interface PopupMenuEmptyProps extends ComponentProps<'div', PopupMenuEmpty.State> {
31
+ children: React.ReactNode;
32
+ }
33
+ /**
34
+ * Renders when no items match the current search query.
35
+ * Only visible when there's an active search with zero results.
36
+ * Renders a `<div>` element.
37
+ */
38
+ declare const PopupMenuEmpty: React.ForwardRefExoticComponent<Omit<PopupMenuEmpty.Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
39
+ declare namespace PopupMenuEmpty {
40
+ type State = PopupMenuEmptyState;
41
+ interface Props extends PopupMenuEmptyProps {
42
+ }
43
+ }
44
+
45
+ /**
46
+ * State passed to children render function.
47
+ */
48
+ interface PopupMenuListChildrenState {
49
+ /** Current search query */
50
+ search: string;
51
+ /** Number of items matching the current filter */
52
+ filteredCount: number;
53
+ }
54
+ interface PopupMenuListState extends Record<string, unknown> {
55
+ }
56
+ interface PopupMenuListProps extends Omit<ComponentProps<'div', PopupMenuList.State>, 'children' | 'content'> {
57
+ /**
58
+ * Content to render inside the list.
59
+ * Can be a render function that receives the current search state.
60
+ */
61
+ children: React.ReactNode | ((state: PopupMenuListChildrenState) => React.ReactNode);
62
+ /**
63
+ * Accessible label for the listbox.
64
+ * @default 'Suggestions'
65
+ */
66
+ label?: string;
67
+ /**
68
+ * When true, measures row widths and applies `--row-width` CSS variable.
69
+ * Keeps the list at the maximum width seen while scrolling.
70
+ * Useful for virtualized lists where content width varies.
71
+ * @default true
72
+ */
73
+ measureRowWidth?: boolean;
74
+ /**
75
+ * Maximum width cap for row measurement (in pixels).
76
+ * Only used when `measureRowWidth` is true.
77
+ */
78
+ maxRowWidth?: number;
79
+ /**
80
+ * Ref to the element that owns the list's scroll position.
81
+ * Use when the semantic list is rendered inside another scroll container.
82
+ */
83
+ scrollContainerRef?: React.RefObject<HTMLElement | null>;
84
+ /**
85
+ * When any value in this array changes, previously-measured row IDs are
86
+ * cleared so rows re-measure (the sticky max width is kept — it only ever
87
+ * grows until the menu closes). Use for state that changes row content for
88
+ * the same IDs, e.g. tree rows that re-render as breadcrumb rows when deep
89
+ * search toggles. Values are compared with `Object.is`, so pass stable
90
+ * primitives — an inline object recreated each render would re-trigger
91
+ * every render.
92
+ */
93
+ remeasureDependencies?: React.DependencyList;
94
+ }
95
+ declare const PopupMenuList: React.ForwardRefExoticComponent<Omit<PopupMenuList.Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
96
+ declare namespace PopupMenuList {
97
+ type State = PopupMenuListState;
98
+ type ChildrenState = PopupMenuListChildrenState;
99
+ interface Props extends PopupMenuListProps {
100
+ }
101
+ }
102
+
103
+ interface PopupMenuSurfaceState extends Record<string, unknown> {
104
+ }
105
+ interface PopupMenuSurfaceProps extends Omit<ComponentProps<'div', PopupMenuSurface.State>, 'content'>, DataSurfaceProps {
106
+ /**
107
+ * Filter function for matching items against search query.
108
+ * Returns a score between 0 and 1 (0 = no match, > 0 = match).
109
+ * Pass `false` to disable filtering entirely.
110
+ * @default commandScore (fuzzy matching)
111
+ */
112
+ filter?: FilterFn | false;
113
+ /**
114
+ * Transforms search input before filtering and visibility logic.
115
+ * @default trim whitespace (`search.trim()`)
116
+ */
117
+ normalizeSearch?: SearchNormalizer;
118
+ /**
119
+ * Controlled search value.
120
+ */
121
+ search?: string;
122
+ /**
123
+ * Callback when search value changes.
124
+ */
125
+ onSearchChange?: (search: string) => void;
126
+ /**
127
+ * Default search value for uncontrolled usage.
128
+ * @default ''
129
+ */
130
+ defaultSearch?: string;
131
+ /**
132
+ * Whether navigation should loop from last to first item and vice versa.
133
+ * @default true
134
+ */
135
+ loop?: boolean;
136
+ /**
137
+ * Controls auto-highlighting behavior when the menu opens.
138
+ * - `true`: highlight the first item (default)
139
+ * - `false`: don't auto-highlight any item
140
+ * - `string`: highlight the item with this specific value
141
+ * @default true
142
+ */
143
+ autoHighlightFirst?: boolean | string;
144
+ /**
145
+ * Whether to clear the search query when the menu closes.
146
+ * - `'after-exit'`: clear after exit animation completes (default)
147
+ * - `true`: clear immediately when menu closes
148
+ * - `false`: preserve search when menu closes
149
+ * @default 'after-exit'
150
+ */
151
+ clearSearchOnClose?: boolean | 'after-exit';
152
+ /**
153
+ * Whether to reset the list scroll position when the search query changes.
154
+ * @default true
155
+ */
156
+ resetScrollOnSearch?: boolean;
157
+ /**
158
+ * Whether to skip auto-focusing the input/list when this surface becomes the focus owner.
159
+ * Useful for Combobox where the input is outside the popup and should retain focus.
160
+ * @default false
161
+ */
162
+ skipAutoFocus?: boolean;
163
+ /**
164
+ * Ordered list of item values when using `filter={false}`.
165
+ * This tells the store the intended display order for navigation/highlighting.
166
+ * Required when `filter={false}` - must always be provided with the current visible items.
167
+ */
168
+ orderedItems?: string[];
169
+ children: React.ReactNode;
170
+ }
171
+ /**
172
+ * Provides search context and manages item registration for popup menu.
173
+ * Place inside PopupMenu.Popup to enable search functionality.
174
+ * Renders a `<div>` element.
175
+ */
176
+ declare const PopupMenuSurface: React.ForwardRefExoticComponent<Omit<PopupMenuSurface.Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
177
+ declare namespace PopupMenuSurface {
178
+ type State = PopupMenuSurfaceState;
179
+ interface Props extends PopupMenuSurfaceProps {
180
+ }
181
+ }
182
+
183
+ interface PopupMenuGroupState extends Record<string, unknown> {
184
+ /**
185
+ * Whether the group is hidden due to no matching items.
186
+ */
187
+ hidden: boolean;
188
+ /**
189
+ * Present when this is the first visible group in the list.
190
+ */
191
+ firstGroup: boolean;
192
+ /**
193
+ * Present when this is the last visible group in the list.
194
+ */
195
+ lastGroup: boolean;
196
+ first: boolean;
197
+ last: boolean;
198
+ }
199
+ interface PopupMenuGroupProps extends ComponentProps<'div', PopupMenuGroup.State> {
200
+ /**
201
+ * Whether to force render this group regardless of filter results.
202
+ * @default false
203
+ */
204
+ forceMount?: boolean;
205
+ children: React.ReactNode;
206
+ }
207
+ /**
208
+ * Groups related popup menu items together.
209
+ * Hidden when no child items match the current filter.
210
+ * Renders a `<div>` element with role="group".
211
+ */
212
+ declare const PopupMenuGroup: React.ForwardRefExoticComponent<Omit<PopupMenuGroup.Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
213
+ declare namespace PopupMenuGroup {
214
+ type State = PopupMenuGroupState;
215
+ interface Props extends PopupMenuGroupProps {
216
+ }
217
+ }
218
+
219
+ interface PopupMenuGroupLabelState extends Record<string, unknown> {
220
+ /**
221
+ * Present when this label is the first row in the list.
222
+ */
223
+ first: boolean;
224
+ /**
225
+ * Present when this label is the last row in the list.
226
+ */
227
+ last: boolean;
228
+ /**
229
+ * Present when this label's parent group is the first visible group in the list.
230
+ */
231
+ firstGroup: boolean;
232
+ /**
233
+ * Present when this label's parent group is the last visible group in the list.
234
+ */
235
+ lastGroup: boolean;
236
+ }
237
+ interface PopupMenuGroupLabelProps extends ComponentProps<'div', PopupMenuGroupLabel.State> {
238
+ children: React.ReactNode;
239
+ }
240
+ /**
241
+ * A label/heading for a group of popup menu items.
242
+ * Renders a `<div>` element with role="presentation".
243
+ */
244
+ declare const PopupMenuGroupLabel: React.ForwardRefExoticComponent<Omit<PopupMenuGroupLabel.Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
245
+ declare namespace PopupMenuGroupLabel {
246
+ type State = PopupMenuGroupLabelState;
247
+ interface Props extends PopupMenuGroupLabelProps {
248
+ }
249
+ }
250
+
251
+ interface PopupMenuSeparatorState extends Record<string, unknown> {
252
+ first: boolean;
253
+ last: boolean;
254
+ }
255
+ interface PopupMenuSeparatorProps extends ComponentProps<'div', PopupMenuSeparator.State> {
256
+ /**
257
+ * Whether to always render the separator, even during search.
258
+ * By default, separators are hidden when there's an active search query.
259
+ * @default false
260
+ */
261
+ alwaysRender?: boolean;
262
+ }
263
+ /**
264
+ * A visual separator between popup menu items.
265
+ * Hidden during active search unless `alwaysRender` is true.
266
+ * Renders a `<div>` element with role="separator".
267
+ */
268
+ declare const PopupMenuSeparator: React.ForwardRefExoticComponent<Omit<PopupMenuSeparator.Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
269
+ declare namespace PopupMenuSeparator {
270
+ type State = PopupMenuSeparatorState;
271
+ interface Props extends PopupMenuSeparatorProps {
272
+ }
273
+ }
274
+
275
+ export { PopupMenuEmpty as P, PopupMenuGroup as a, PopupMenuGroupLabel as b, PopupMenuIcon as c, PopupMenuList as d, PopupMenuSeparator as e, PopupMenuSurface as f, type PopupMenuEmptyProps as g, type PopupMenuEmptyState as h, type PopupMenuGroupLabelProps as i, type PopupMenuGroupLabelState as j, type PopupMenuGroupProps as k, type PopupMenuGroupState as l, type PopupMenuIconProps as m, type PopupMenuIconState as n, type PopupMenuListChildrenState as o, type PopupMenuListProps as p, type PopupMenuListState as q, type PopupMenuSeparatorProps as r, type PopupMenuSeparatorState as s, type PopupMenuSurfaceProps as t, type PopupMenuSurfaceState as u };
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import { b as ListboxStore } from './ListboxStore-BYBpGrOz.js';
3
+
4
+ interface SurfaceContextValue {
5
+ /** The Listbox store instance */
6
+ store: ListboxStore;
7
+ /** Unique identifier for this surface */
8
+ surfaceId: string;
9
+ }
10
+ declare const SurfaceContext: React.Context<SurfaceContextValue | null>;
11
+ declare function useSurfaceContext(): SurfaceContextValue;
12
+ declare function useMaybeSurfaceContext(): SurfaceContextValue | null;
13
+
14
+ export { type SurfaceContextValue as S, useSurfaceContext as a, SurfaceContext as b, useMaybeSurfaceContext as u };
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import { b as ListboxStore } from './ListboxStore-nmorsoqX.cjs';
3
+
4
+ interface SurfaceContextValue {
5
+ /** The Listbox store instance */
6
+ store: ListboxStore;
7
+ /** Unique identifier for this surface */
8
+ surfaceId: string;
9
+ }
10
+ declare const SurfaceContext: React.Context<SurfaceContextValue | null>;
11
+ declare function useSurfaceContext(): SurfaceContextValue;
12
+ declare function useMaybeSurfaceContext(): SurfaceContextValue | null;
13
+
14
+ export { type SurfaceContextValue as S, useSurfaceContext as a, SurfaceContext as b, useMaybeSurfaceContext as u };