@yahoo/uds 3.5.0-beta.2 → 3.5.0-beta.4

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 (61) hide show
  1. package/cli/FullWidthClassToProp.mock.tsx +17 -0
  2. package/cli/bin/uds-darwin-arm64-baseline +0 -0
  3. package/cli/bin/uds-linux-arm64 +0 -0
  4. package/cli/bin/uds-linux-x64-baseline +0 -0
  5. package/dist/Input-D6N7TCc9.d.ts +42 -0
  6. package/dist/Input-Tv8gAhPN.d.cts +42 -0
  7. package/dist/Pressable-DSWYYU6N.d.ts +44 -0
  8. package/dist/Pressable-cW57Ibe2.d.cts +44 -0
  9. package/dist/{VStack-CmraVolm.d.ts → VStack-Ca-CbKTr.d.ts} +2 -40
  10. package/dist/{VStack-dT3EJCu4.d.cts → VStack-Ck33D8i-.d.cts} +2 -40
  11. package/dist/chunk-2W4ER46N.js +1 -0
  12. package/dist/chunk-3WLIHKQU.js +3 -0
  13. package/dist/chunk-4AS6QR6M.cjs +3 -0
  14. package/dist/chunk-FGRUT3UC.cjs +2 -0
  15. package/dist/chunk-L72D6DDM.cjs +1 -0
  16. package/dist/chunk-MO2VPSXU.js +1 -0
  17. package/dist/chunk-PNR3372L.js +3 -0
  18. package/dist/chunk-UFBH4CCM.cjs +1 -0
  19. package/dist/client/Menu.cjs +2 -0
  20. package/dist/client/Menu.d.cts +626 -0
  21. package/dist/client/Menu.d.ts +626 -0
  22. package/dist/client/Menu.js +3 -0
  23. package/dist/client/index.cjs +1 -2
  24. package/dist/client/index.d.cts +10 -664
  25. package/dist/client/index.d.ts +10 -664
  26. package/dist/client/index.js +1 -3
  27. package/dist/{index-D1poGuo1.d.cts → index-CDx_NWe2.d.cts} +1 -1
  28. package/dist/{index-BOfq14yW.d.ts → index-xaTWnEHm.d.ts} +1 -1
  29. package/dist/index.cjs +1 -1
  30. package/dist/index.d.cts +6 -5
  31. package/dist/index.d.ts +6 -5
  32. package/dist/index.js +1 -1
  33. package/dist/metafile-cjs.json +1 -1
  34. package/dist/metafile-esm.json +1 -1
  35. package/dist/tailwind/plugin.cjs +1 -1
  36. package/dist/tailwind/plugin.d.cts +1 -1
  37. package/dist/tailwind/plugin.d.ts +1 -1
  38. package/dist/tailwind/plugin.js +2 -2
  39. package/dist/tailwind/utils.cjs +1 -1
  40. package/dist/tailwind/utils.d.cts +1 -1
  41. package/dist/tailwind/utils.d.ts +1 -1
  42. package/dist/tailwind/utils.js +1 -1
  43. package/dist/tokens/automation/configs.cjs +1 -1
  44. package/dist/tokens/automation/configs.d.cts +2 -2
  45. package/dist/tokens/automation/configs.d.ts +2 -2
  46. package/dist/tokens/automation/configs.js +1 -1
  47. package/dist/tokens/automation/properties.cjs +1 -1
  48. package/dist/tokens/automation/properties.d.cts +2 -2
  49. package/dist/tokens/automation/properties.d.ts +2 -2
  50. package/dist/tokens/automation/properties.js +1 -1
  51. package/dist/tokens/index.cjs +1 -1
  52. package/dist/tokens/index.d.cts +4 -4
  53. package/dist/tokens/index.d.ts +4 -4
  54. package/dist/tokens/index.js +1 -1
  55. package/dist/tokens/parseTokens.d.cts +1 -1
  56. package/dist/tokens/parseTokens.d.ts +1 -1
  57. package/dist/{types-B_jakWRK.d.cts → types-BdV70-Tw.d.cts} +1 -1
  58. package/dist/{types-B_jakWRK.d.ts → types-BdV70-Tw.d.ts} +1 -1
  59. package/package.json +11 -1
  60. package/dist/chunk-IQ4HRDIM.cjs +0 -3
  61. package/dist/chunk-KSHOOD3K.js +0 -3
@@ -0,0 +1,626 @@
1
+ import * as react from 'react';
2
+ import { AriaRole, HTMLAttributes, PropsWithChildren } from 'react';
3
+ import { MenuProps, MenuItemProps as MenuItemProps$1, MenuItemCheckboxProps as MenuItemCheckboxProps$1, MenuProviderProps as MenuProviderProps$1, MenuButtonProps, useMenuContext, useMenuStore } from '@ariakit/react/menu';
4
+ import { j as SpacingAlias, k as UniversalMenuItemProps } from '../types-BdV70-Tw.cjs';
5
+ import { V as VStackProps, D as DividerProps, B as BoxProps } from '../VStack-Ck33D8i-.cjs';
6
+ import { P as PressableProps } from '../Pressable-cW57Ibe2.cjs';
7
+ import * as react_jsx_runtime from 'react/jsx-runtime';
8
+ import { useStoreState } from '@ariakit/react';
9
+ import '@yahoo/uds-icons/types';
10
+ import 'motion/react';
11
+ import 'type-fest';
12
+
13
+ interface MenuContentProps extends Omit<VStackProps, 'asChild'> {
14
+ gutter?: SpacingAlias;
15
+ /** UDS handles nested border radius for the first and last item for you to prevent clipping and visual jank.
16
+ * If you need to disable this, set this prop to true.
17
+ *
18
+ * @link https://github.com/yahoo-uds/uds/blob/main/packages/uds/src/hooks/useNestedBorderRadius.ts
19
+ **/
20
+ disableAutoBorderRadius?: boolean;
21
+ /**
22
+ * `portalRef` is similar to `ref` but is scoped to the portal node. It's
23
+ * useful when you need to be informed when the portal element is appended to
24
+ * the DOM or removed from the DOM.
25
+ *
26
+ * Live examples:
27
+ * - [Form with Select](https://ariakit.org/examples/form-select)
28
+ * @example
29
+ * ```jsx
30
+ * const [portalElement, setPortalElement] = useState(null);
31
+ *
32
+ * <Portal portalRef={setPortalElement} />
33
+ * ```
34
+ */
35
+ portalRef?: MenuProps['portalRef'];
36
+ /**
37
+ * Determines whether the element should be rendered as a React Portal.
38
+ *
39
+ * Live examples:
40
+ * - [Combobox with integrated
41
+ * filter](https://ariakit.org/examples/combobox-filtering-integrated)
42
+ * - [Dialog with Menu](https://ariakit.org/examples/dialog-menu)
43
+ * - [Hovercard with keyboard
44
+ * support](https://ariakit.org/examples/hovercard-disclosure)
45
+ * - [Menubar](https://ariakit.org/components/menubar)
46
+ * - [Standalone Popover](https://ariakit.org/examples/popover-standalone)
47
+ * - [Animated Select](https://ariakit.org/examples/select-animated)
48
+ * @default true
49
+ */
50
+ portal?: boolean;
51
+ /**
52
+ * An HTML element or a memoized callback function that returns an HTML
53
+ * element to be used as the portal element. By default, the portal element
54
+ * will be a `div` element appended to the `document.body`.
55
+ *
56
+ * Live examples:
57
+ * - [Navigation Menubar](https://ariakit.org/examples/menubar-navigation)
58
+ * @example
59
+ * ```jsx
60
+ * const [portal, setPortal] = useState(null);
61
+ *
62
+ * <Portal portalElement={portal} />
63
+ * <div ref={setPortal} />
64
+ * ```
65
+ * @example
66
+ * ```jsx
67
+ * const getPortalElement = useCallback(() => {
68
+ * const div = document.createElement("div");
69
+ * const portalRoot = document.getElementById("portal-root");
70
+ * portalRoot.appendChild(div);
71
+ * return div;
72
+ * }, []);
73
+ *
74
+ * <Portal portalElement={getPortalElement} />
75
+ * ```
76
+ */
77
+ portalElement?: MenuProps['portalElement'];
78
+ /**
79
+ * Determines whether the popover should hide when the mouse leaves the
80
+ * popover or the anchor element and there's no _hover intent_, meaning, the
81
+ * mouse isn't moving toward the popover.
82
+ *
83
+ * This can be either a boolean or a callback receiving the mouse move event
84
+ * that initiated the behavior. The callback should return a boolean.
85
+ *
86
+ * **Note**: This behavior won't be triggered when the popover or any of its
87
+ * descendants are in focus.
88
+ * @default true
89
+ */
90
+ hideOnHoverOutside?: MenuProps['hideOnHoverOutside'];
91
+ /**
92
+ * Determines if the dialog will hide when the user presses the Escape key.
93
+ *
94
+ * This prop can be either a boolean or a function that accepts an event as an
95
+ * argument and returns a boolean. The event object represents the keydown
96
+ * event that initiated the hide action, which could be either a native
97
+ * keyboard event or a React synthetic event.
98
+ *
99
+ * **Note**: When placing Ariakit dialogs inside third-party dialogs, using
100
+ * `event.stopPropagation()` within this function will stop the event from
101
+ * reaching the third-party dialog, closing only the Ariakit dialog.
102
+ * @default true
103
+ */
104
+ hideOnEscape?: MenuProps['hideOnEscape'];
105
+ /**
106
+ * Determines if the dialog should hide when the user clicks or focuses on an
107
+ * element outside the dialog.
108
+ *
109
+ * This prop can be either a boolean or a function that takes an event as an
110
+ * argument and returns a boolean. The event object represents the event that
111
+ * triggered the action, which could be a native event or a React synthetic
112
+ * event of various types.
113
+ *
114
+ * Live examples:
115
+ * - [Selection Popover](https://ariakit.org/examples/popover-selection)
116
+ * @default true
117
+ */
118
+ hideOnInteractOutside?: MenuProps['hideOnInteractOutside'];
119
+ /**
120
+ * Determines if the pointer events outside of the popover and its anchor
121
+ * element should be disabled during _hover intent_, that is, when the mouse
122
+ * is moving toward the popover.
123
+ *
124
+ * This is required as these external events may trigger focus on other
125
+ * elements and close the popover while the user is attempting to hover over
126
+ * it.
127
+ *
128
+ * This can be either a boolean or a callback receiving the mouse event
129
+ * happening during hover intent. The callback should return a boolean.
130
+ * @default true
131
+ */
132
+ disablePointerEventsOnApproach?: MenuProps['disablePointerEventsOnApproach'];
133
+ /**
134
+ * Object returned by the [`useMenuStore`](https://ariakit.org/reference/use-menu-store) hook.
135
+ * If not provided, the closest [`Menu.Content`](https://uds.build/docs/components/menu#menu-content) or
136
+ * [`Menu.Provider`](https://uds.build/docs/components/menu#menu-provider) context will be used.
137
+ */
138
+ store?: MenuProps['store'];
139
+ /**
140
+ * Whether the popover should have the same width as the anchor element. This
141
+ * will be exposed to CSS as
142
+ * [`--popover-anchor-width`](https://ariakit.org/guide/styling#--popover-anchor-width).
143
+ * @default false
144
+ */
145
+ sameWidth?: MenuProps['sameWidth'];
146
+ /**
147
+ * @see https://ariakit.org/reference/focusable
148
+ * @default true
149
+ */
150
+ focusable?: MenuProps['focusable'];
151
+ /**
152
+ * This is an event handler prop triggered when the dialog's `close` event is
153
+ * dispatched. The `close` event is similar to the native dialog
154
+ * [`close`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/close_event)
155
+ * event. The only difference is that this event can be canceled with
156
+ * `event.preventDefault()`, which will prevent the dialog from hiding.
157
+ *
158
+ * It's important to note that this event only fires when the dialog store's
159
+ * [`open`](https://ariakit.org/reference/use-dialog-store#open) state is set
160
+ * to `false`. If the controlled
161
+ * [`open`](https://ariakit.org/reference/dialog#open) prop value changes, or
162
+ * if the dialog's visibility is altered in any other way (such as unmounting
163
+ * the dialog without adjusting the open state), this event won't be
164
+ * triggered.
165
+ *
166
+ * Live examples:
167
+ * - [Dialog with scrollable
168
+ * backdrop](https://ariakit.org/examples/dialog-backdrop-scrollable)
169
+ * - [Dialog with details &
170
+ * summary](https://ariakit.org/examples/dialog-details)
171
+ * - [Warning on Dialog
172
+ * hide](https://ariakit.org/examples/dialog-hide-warning)
173
+ * - [Dialog with Menu](https://ariakit.org/examples/dialog-menu)
174
+ */
175
+ onClose?: MenuProps['onClose'];
176
+ }
177
+ /**
178
+ * **📦 A Menu Content component**
179
+ *
180
+ * @componentType Client component
181
+ *
182
+ * @description
183
+ * A content component for the menu, which is used to provide the menu context to the menu items.
184
+ *
185
+ * @see The {@link https://uds.build/docs/components/menu-content Menu.Content Docs} for more info
186
+ *
187
+ * @example
188
+ * ```tsx
189
+ * 'use client'; // Next.js client component
190
+ *
191
+ * import { Menu, Button } from "@yahoo/uds";
192
+ * import { Calendar, Clipboard } from "@yahoo/uds-icons";
193
+ *
194
+ * export function MenuProviderExample() {
195
+ * return (
196
+ * <Menu.Provider>
197
+ * <Menu.Trigger asChild>
198
+ * <Button>Menu Options</Button>
199
+ * </Menu.Trigger>
200
+ * <Menu.Content>
201
+ * <Menu.Item startIcon={Calendar}>Calendar</Menu.Item>
202
+ * <Menu.Item startIcon={Clipboard} endIcon={DiagonalRightUp}>
203
+ * Clipboard
204
+ * </Menu.Item>
205
+ * <Menu.Item active>Active Item</Menu.Item>
206
+ * </Menu.Content>
207
+ * </Menu.Provider>
208
+ * )
209
+ * }
210
+ * ```
211
+ *
212
+ * @usage
213
+ * Using Menu.Content is required to use Menu.Item and Menu.ItemCheckbox. It acts as the actual menu container.
214
+ *
215
+ * @related [Menu](https://uds.build/docs/components/menu), [Menu.ItemCheckbox](https://uds.build/docs/components/menu-item-checkbox)
216
+ **/
217
+ declare const MenuContent: react.ForwardRefExoticComponent<MenuContentProps & react.RefAttributes<HTMLDivElement>>;
218
+
219
+ interface MenuDividerProps extends Omit<DividerProps, 'variant'> {
220
+ /**
221
+ * The role of the divider.
222
+ * @default 'separator'
223
+ */
224
+ role?: AriaRole;
225
+ }
226
+ /**
227
+ * **〰️ A Menu Divider component**
228
+ *
229
+ * @componentType Client component
230
+ *
231
+ * @description
232
+ * A divider component for the menu.
233
+ *
234
+ * @see The {@link https://uds.build/docs/components/menu-divider Menu.Divider Docs} for more info
235
+ *
236
+ * @example
237
+ * ```tsx
238
+ * 'use client'; // Next.js client component
239
+ *
240
+ * import { Menu, Button } from "@yahoo/uds";
241
+ *
242
+ * export function DividerExample() {
243
+ * return (
244
+ * <Menu>
245
+ * <Menu.Trigger asChild>
246
+ * <Button>Menu Options</Button>
247
+ * </Menu.Trigger>
248
+ * <Menu.Content>
249
+ * <Menu.Item>Calendar</Menu.Item>
250
+ * <Menu.Divider>Other actions</Menu.Divider>
251
+ * <Menu.Item>Clipboard</Menu.Item>
252
+ * <Menu.Item active>Active Item</Menu.Item>
253
+ * </Menu.Content>
254
+ * </Menu>
255
+ * )
256
+ * }
257
+ * ```
258
+ *
259
+ * @usage
260
+ * Use MenuDivider to separate groups of menu items.
261
+ *
262
+ * @related [Menu](https://uds.build/docs/components/menu), [Menu.Item](https://uds.build/docs/components/menu-item), [Divider](https://uds.build/docs/components/divider)
263
+ **/
264
+ declare const MenuDivider: react.ForwardRefExoticComponent<MenuDividerProps & react.RefAttributes<HTMLDivElement>>;
265
+
266
+ interface MenuItemProps extends PressableProps, Omit<UniversalMenuItemProps, 'name'> {
267
+ /**
268
+ * Object returned by the [`useMenuStore`](https://ariakit.org/reference/use-menu-store) hook.
269
+ * If not provided, the closest [`Menu.Content`](https://uds.build/docs/components/menu#menu-content) or
270
+ * [`Menu.Provider`](https://uds.build/docs/components/menu#menu-provider) context will be used.
271
+ */
272
+ store?: MenuItemProps$1['store'];
273
+ /**
274
+ * Determines if the menu should hide when this item is clicked.
275
+ *
276
+ * **Note**: This behavior isn't triggered if this menu item is rendered as a
277
+ * link and modifier keys are used to either open the link in a new tab or
278
+ * download it.
279
+ *
280
+ * @default true
281
+ */
282
+ hideOnClick?: MenuItemProps$1['hideOnClick'];
283
+ /**
284
+ * The role of the menu item.
285
+ *
286
+ * @default 'menuitem'
287
+ */
288
+ role?: AriaRole;
289
+ /** Internal overrides for downstream components. */
290
+ layerClassNames?: {
291
+ root?: string;
292
+ startIcon?: string;
293
+ endIcon?: string;
294
+ };
295
+ }
296
+ /**
297
+ * **📋 A Menu Item component for navigation and actions**
298
+ *
299
+ * @componentType Client component
300
+ *
301
+ * @description
302
+ * A standard menu item that can be used for navigation, actions, or displaying options in a menu.
303
+ * Menu items can be styled with active states, icons, and can trigger callbacks when clicked.
304
+ * They support both visual and functional customization.
305
+ *
306
+ * @see The {@link https://uds.build/docs/components/menu-item Menu.Item Docs} for more info
307
+ *
308
+ * @example
309
+ * ```tsx
310
+ * 'use client'; // Next.js client component
311
+ *
312
+ * import { Menu, Button } from "@yahoo/uds";
313
+ * import { Calendar, Clipboard } from "@yahoo/uds-icons";
314
+ *
315
+ * export function MenuItemExample() {
316
+ * return (
317
+ * <Menu.Provider>
318
+ * <Menu.Trigger asChild>
319
+ * <Button>Menu Options</Button>
320
+ * </Menu.Trigger>
321
+ * <Menu.Content>
322
+ * <Menu.Item startIcon={Calendar}>Calendar</Menu.Item>
323
+ * <Menu.Item startIcon={Clipboard} endIcon={DiagonalRightUp}>
324
+ * Clipboard
325
+ * </Menu.Item>
326
+ * <Menu.Item active>Active Item</Menu.Item>
327
+ * </Menu.Content>
328
+ * </Menu>
329
+ * )
330
+ * }
331
+ * ```
332
+ *
333
+ * @usage
334
+ * Use MenuItem for standard menu options that trigger actions or navigate to other parts of the application.
335
+ * The active prop can be used to highlight the currently selected item.
336
+ *
337
+ * @related [Menu](https://uds.build/docs/components/menu), [Menu.ItemCheckbox](https://uds.build/docs/components/menu-item-checkbox)
338
+ **/
339
+ declare const MenuItem: react.ForwardRefExoticComponent<MenuItemProps & react.RefAttributes<HTMLButtonElement>>;
340
+
341
+ type HtmlButtonProps = HTMLAttributes<HTMLButtonElement>;
342
+ interface MenuItemCheckboxProps extends PressableProps, HtmlButtonProps, UniversalMenuItemProps {
343
+ /**
344
+ * The name of the field in the
345
+ * [`values`](https://ariakit.org/reference/menu-provider#values) state.
346
+ *
347
+ * Live examples at [MenuItemCheckbox](https://ariakit.org/examples/menu-item-checkbox)
348
+ */
349
+ name: string;
350
+ /**
351
+ * The controlled checked state of the element. It will set the menu
352
+ * [`values`](https://ariakit.org/reference/menu-provider#values) state if
353
+ * provided.
354
+ */
355
+ checked?: boolean;
356
+ /**
357
+ * The default checked state of the element. It will set the default value in
358
+ * the menu [`values`](https://ariakit.org/reference/menu-provider#values)
359
+ * state if provided.
360
+ */
361
+ defaultChecked?: boolean;
362
+ /**
363
+ * Object returned by the [`useMenuStore`](https://ariakit.org/reference/use-menu-store) hook.
364
+ * If not provided, the closest [`Menu.Content`](https://uds.build/docs/components/menu#menu-content) or
365
+ * [`Menu.Provider`](https://uds.build/docs/components/menu#menu-provider) context will be used.
366
+ */
367
+ store?: MenuItemCheckboxProps$1['store'];
368
+ /**
369
+ * Determines if the menu should hide when this item is clicked.
370
+ *
371
+ * **Note**: This behavior isn't triggered if this menu item is rendered as a
372
+ * link and modifier keys are used to either open the link in a new tab or
373
+ * download it.
374
+ *
375
+ * @default undefined
376
+ */
377
+ hideOnClick?: MenuItemCheckboxProps$1['hideOnClick'];
378
+ }
379
+ /**
380
+ * **✅ A Menu Item Checkbox component**
381
+ *
382
+ * @componentType Client component
383
+ *
384
+ * @description
385
+ * A checkable menu item that toggles between selected and unselected states. Menu item checkboxes
386
+ * allow users to select multiple options from a menu, displaying a checkmark when active. They maintain
387
+ * their state even when the menu is closed and reopened.
388
+ *
389
+ * @see The {@link https://uds.build/docs/components/menu-item-checkbox Menu.ItemCheckbox Docs} for more info
390
+ *
391
+ * @example
392
+ * ```tsx
393
+ * 'use client'; // Next.js client component
394
+ *
395
+ * import { Menu, Button } from "@yahoo/uds";
396
+ *
397
+ * export function MenuItemCheckboxExample() {
398
+ * return (
399
+ * <Menu.Provider>
400
+ * <Menu.Trigger asChild>
401
+ * <Button>Filter Options</Button>
402
+ * </Menu.Trigger>
403
+ * <Menu.Content>
404
+ * <Menu.ItemCheckbox name="showArchived" defaultChecked={false}>
405
+ * Show Archived
406
+ * </Menu.ItemCheckbox>
407
+ * <Menu.ItemCheckbox name="includeComments" defaultChecked={true}>
408
+ * Include Comments
409
+ * </Menu.ItemCheckbox>
410
+ * </Menu.Content>
411
+ * </Menu.Provider>
412
+ * )
413
+ * }
414
+ * ```
415
+ *
416
+ * @usage
417
+ * Use MenuItemCheckbox when you need to provide users with multiple selectable options within a menu.
418
+ * Unlike radio options, checkboxes allow for multiple simultaneous selections.
419
+ *
420
+ * @related [Menu](https://uds.build/docs/components/menu), [Menu.Item](https://uds.build/docs/components/menu-item)
421
+ **/
422
+ declare const MenuItemCheckbox: react.ForwardRefExoticComponent<Omit<MenuItemCheckboxProps, "active" | "as" | "hideEndIcon" | "rootProps"> & react.RefAttributes<HTMLButtonElement>>;
423
+
424
+ /** Valid vertical placement values for the menu */
425
+ type VerticalPlacement = 'top' | 'bottom';
426
+ /** Valid horizontal placement values for the menu */
427
+ type HorizontalPlacement = 'start' | 'end';
428
+ /** Combined placement values for menu positioning */
429
+ type MenuPlacement = VerticalPlacement | HorizontalPlacement | `${VerticalPlacement}-${HorizontalPlacement}` | `${HorizontalPlacement}-${VerticalPlacement}`;
430
+ type MenuProviderProps = PropsWithChildren<{
431
+ /**
432
+ * A callback that gets called when the
433
+ * [`values`](https://ariakit.org/reference/menu-provider#values) state
434
+ * changes.
435
+ *
436
+ * Live examples:
437
+ * - [`MenuItemCheckbox`](https://uds.build/docs/components/menu-item-checkbox).
438
+ */
439
+ setValues?: (values: Record<string, boolean>) => void | MenuProviderProps$1['setValues'];
440
+ /**
441
+ * A map of names and values that will be used by the
442
+ * [`MenuItemCheckbox`](https://uds.build/docs/components/menu-item-checkbox).
443
+ *
444
+ * Live examples:
445
+ * - [MenuItemCheckbox](https://uds.build/docs/components/menu-item-checkbox)
446
+ */
447
+ values?: MenuProviderProps$1['values'];
448
+ /**
449
+ * The placement of the Menu.Content.
450
+ *
451
+ * @default 'bottom'
452
+ */
453
+ placement?: MenuPlacement;
454
+ /**
455
+ * Object returned by the [`useMenuStore`](https://ariakit.org/reference/use-menu-store) hook.
456
+ * If not provided, the closest [`Menu.Content`](https://uds.build/docs/components/menu#menu-content) or
457
+ * [`Menu.Provider`](https://uds.build/docs/components/menu#menu-provider) context will be used.
458
+ */
459
+ store?: MenuProviderProps$1['store'];
460
+ /**
461
+ * Whether the menu should be rendered in RTL direction.
462
+ *
463
+ * This only affects the some component behavior behavior. You still need to set
464
+ * `dir="rtl"` on HTML/CSS.
465
+ * @default false
466
+ */
467
+ rtl?: MenuProviderProps$1['rtl'];
468
+ /**
469
+ * Whether the content is visible.
470
+ * @default false
471
+ */
472
+ open?: MenuProviderProps$1['open'];
473
+ /**
474
+ * A callback that gets called when the
475
+ * [`open`](https://ariakit.org/reference/disclosure-provider#open) state
476
+ * changes.
477
+ * @example
478
+ * const [open, setOpen] = useState(false);
479
+ * const disclosure = useDisclosureStore({ open, setOpen });
480
+ */
481
+ setOpen?: MenuProviderProps$1['setOpen'];
482
+ /**
483
+ * Whether the content should be visible by default.
484
+ * @default false
485
+ */
486
+ defaultOpen?: MenuProviderProps$1['defaultOpen'];
487
+ /**
488
+ * Determines how the focus behaves when the user reaches the end of the
489
+ * composite widget.
490
+ *
491
+ * Live examples:
492
+ * - [Command Menu](https://uds.build/docs/components/menu)
493
+ * @default false
494
+ */
495
+ focusLoop?: MenuProviderProps$1['focusLoop'];
496
+ /**
497
+ * If enabled, moving to the next item from the last one in a row or column
498
+ * will focus on the first item in the next row or column and vice-versa.
499
+ * `true` wraps between rows and columns, `horizontal` wraps only between rows, and `vertical` wraps only between columns.
500
+ *
501
+ * @default false
502
+ */
503
+ focusWrap?: MenuProviderProps$1['focusWrap'];
504
+ }>;
505
+ /**
506
+ * **🏗️ A Menu Provider component**
507
+ *
508
+ * @componentType Server component
509
+ *
510
+ * @description
511
+ * A provider component for the menu, which is used to provide the menu context to the menu items.
512
+ *
513
+ * @see The {@link https://uds.build/docs/components/menu-provider Menu.Provider Docs} for more info
514
+ *
515
+ * @example
516
+ * ```tsx
517
+ * 'use client'; // Next.js client component
518
+ *
519
+ * import { Menu, Button } from "@yahoo/uds";
520
+ * import { Calendar, Clipboard } from "@yahoo/uds-icons";
521
+ *
522
+ * export function MenuProviderExample() {
523
+ * return (
524
+ * <Menu.Provider>
525
+ * <Menu.Trigger asChild>
526
+ * <Button>Menu Options</Button>
527
+ * </Menu.Trigger>
528
+ * <Menu.Content>
529
+ * <Menu.Item startIcon={Calendar}>Calendar</Menu.Item>
530
+ * <Menu.Item startIcon={Clipboard} endIcon={DiagonalRightUp}>
531
+ * Clipboard
532
+ * </Menu.Item>
533
+ * <Menu.Item active>Active Item</Menu.Item>
534
+ * </Menu.Content>
535
+ * </Menu.Provider>
536
+ * )
537
+ * }
538
+ * ```
539
+ *
540
+ * @usage
541
+ * Use MenuItem for standard menu options that trigger actions or navigate to other parts of the application.
542
+ * The active prop can be used to highlight the currently selected item.
543
+ *
544
+ * @related [Menu](https://uds.build/docs/components/menu), [Menu.ItemCheckbox](https://uds.build/docs/components/menu-item-checkbox)
545
+ **/
546
+ declare const MenuProvider: ({ placement, rtl: explicitRtl, ...props }: MenuProviderProps) => react_jsx_runtime.JSX.Element;
547
+
548
+ interface MenuTriggerProps extends PressableProps {
549
+ /**
550
+ * When asChild is set to true, the component's child will be cloned and passed
551
+ * the props and behavior required to make it functional.
552
+ */
553
+ asChild?: BoxProps['asChild'];
554
+ /**
555
+ * Object returned by the [`useMenuStore`](https://ariakit.org/reference/use-menu-store) hook.
556
+ * If not provided, the closest [`Menu.Content`](https://uds.build/docs/components/menu#menu-content) or
557
+ * [`Menu.Provider`](https://uds.build/docs/components/menu#menu-provider) context will be used.
558
+ */
559
+ store?: MenuButtonProps['store'];
560
+ /**
561
+ * Determines if [Focusable](https://ariakit.org/components/focusable)
562
+ * features should be active on non-native focusable elements.
563
+ *
564
+ * **Note**: This prop only turns off the additional features provided by the
565
+ * [`Focusable`](https://ariakit.org/reference/focusable) component.
566
+ * Non-native focusable elements will lose their focusability entirely.
567
+ * However, native focusable elements will retain their inherent focusability,
568
+ * but without added features such as improved
569
+ * [`autoFocus`](https://ariakit.org/reference/focusable#autofocus),
570
+ * [`accessibleWhenDisabled`](https://ariakit.org/reference/focusable#accessiblewhendisabled),
571
+ * [`onFocusVisible`](https://ariakit.org/reference/focusable#onfocusvisible),
572
+ * etc.
573
+ * @default true
574
+ */
575
+ focusable?: MenuButtonProps['focusable'];
576
+ }
577
+ /**
578
+ * **⚡ A Menu Trigger component**
579
+ *
580
+ * @componentType Server component
581
+ *
582
+ * @description
583
+ * A trigger component for the menu, which is used to toggle the menus open state.
584
+ *
585
+ * @see The {@link https://uds.build/docs/components/menu-trigger Menu.Trigger Docs} for more info
586
+ *
587
+ * @example
588
+ * ```tsx
589
+ * 'use client'; // Next.js client component
590
+ *
591
+ * import { Menu, Button } from "@yahoo/uds";
592
+ * import { Calendar, Clipboard } from "@yahoo/uds-icons";
593
+ *
594
+ * export function MenuProviderExample() {
595
+ * return (
596
+ * <Menu.Provider>
597
+ * <Menu.Trigger asChild>
598
+ * <Button>Menu Options</Button>
599
+ * </Menu.Trigger>
600
+ * <Menu.Content>
601
+ * <Menu.Item startIcon={Calendar}>Calendar</Menu.Item>
602
+ * <Menu.Item startIcon={Clipboard} endIcon={DiagonalRightUp}>
603
+ * Clipboard
604
+ * </Menu.Item>
605
+ * <Menu.Item active>Active Item</Menu.Item>
606
+ * </Menu.Content>
607
+ * </Menu.Provider>
608
+ * )
609
+ * }
610
+ * ```
611
+ *
612
+ * @usage
613
+ * Use MenuTrigger to toggle the open state of a menu.
614
+ *
615
+ * @related [Menu](https://uds.build/docs/components/menu), [Menu.ItemCheckbox](https://uds.build/docs/components/menu-item-checkbox)
616
+ **/
617
+ declare const MenuTrigger: react.ForwardRefExoticComponent<MenuTriggerProps & react.RefAttributes<HTMLButtonElement>>;
618
+
619
+ declare const Menu_index_useMenuContext: typeof useMenuContext;
620
+ declare const Menu_index_useMenuStore: typeof useMenuStore;
621
+ declare const Menu_index_useStoreState: typeof useStoreState;
622
+ declare namespace Menu_index {
623
+ export { MenuContent as Content, MenuDivider as Divider, MenuItem as Item, MenuItemCheckbox as ItemCheckbox, MenuProvider as Provider, MenuTrigger as Trigger, Menu_index_useMenuContext as useMenuContext, Menu_index_useMenuStore as useMenuStore, Menu_index_useStoreState as useStoreState };
624
+ }
625
+
626
+ export { Menu_index as Menu, type MenuContentProps, type MenuDividerProps, type MenuItemCheckboxProps, type MenuItemProps, type MenuPlacement, type MenuProviderProps, type MenuTriggerProps };