@plexui/ui 0.28.1 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/dist/es/components/Alert/Alert.js +2 -2
  2. package/dist/es/components/Alert/Alert.js.map +1 -1
  3. package/dist/es/components/Avatar/Avatar.js +3 -1
  4. package/dist/es/components/Avatar/Avatar.js.map +1 -1
  5. package/dist/es/components/Badge/index.js +1 -1
  6. package/dist/es/components/Badge/index.js.map +1 -1
  7. package/dist/es/components/Button/Button.js +4 -3
  8. package/dist/es/components/Button/Button.js.map +1 -1
  9. package/dist/es/components/Button/NavigationButton.js +10 -0
  10. package/dist/es/components/Button/NavigationButton.js.map +1 -0
  11. package/dist/es/components/Button/NavigationGlyph.js +19 -0
  12. package/dist/es/components/Button/NavigationGlyph.js.map +1 -0
  13. package/dist/es/components/Button/index.js +1 -0
  14. package/dist/es/components/Button/index.js.map +1 -1
  15. package/dist/es/components/Checkbox/Checkbox.js +2 -1
  16. package/dist/es/components/Checkbox/Checkbox.js.map +1 -1
  17. package/dist/es/components/ColorPicker/ColorPicker.js +227 -0
  18. package/dist/es/components/ColorPicker/ColorPicker.js.map +1 -0
  19. package/dist/es/components/ColorPicker/ColorWell.js +58 -0
  20. package/dist/es/components/ColorPicker/ColorWell.js.map +1 -0
  21. package/dist/es/components/ColorPicker/index.js +3 -0
  22. package/dist/es/components/ColorPicker/index.js.map +1 -0
  23. package/dist/es/components/ColorPicker/shared.js +132 -0
  24. package/dist/es/components/ColorPicker/shared.js.map +1 -0
  25. package/dist/es/components/ContextMenu/ContextMenu.js +164 -0
  26. package/dist/es/components/ContextMenu/ContextMenu.js.map +1 -0
  27. package/dist/es/components/ContextMenu/index.js +2 -0
  28. package/dist/es/components/ContextMenu/index.js.map +1 -0
  29. package/dist/es/components/ContextMenu/shared.js +56 -0
  30. package/dist/es/components/ContextMenu/shared.js.map +1 -0
  31. package/dist/es/components/DateInput/DateInput.js +4 -2
  32. package/dist/es/components/DateInput/DateInput.js.map +1 -1
  33. package/dist/es/components/DatePicker/Calendar.js +89 -55
  34. package/dist/es/components/DatePicker/Calendar.js.map +1 -1
  35. package/dist/es/components/DatePicker/CalendarNavigationIcon.js +13 -0
  36. package/dist/es/components/DatePicker/CalendarNavigationIcon.js.map +1 -0
  37. package/dist/es/components/DatePicker/DatePicker.js +9 -2
  38. package/dist/es/components/DatePicker/DatePicker.js.map +1 -1
  39. package/dist/es/components/DatePicker/useCalendarGutter.js +8 -0
  40. package/dist/es/components/DatePicker/useCalendarGutter.js.map +1 -0
  41. package/dist/es/components/DateRangePicker/Calendar.js +66 -49
  42. package/dist/es/components/DateRangePicker/Calendar.js.map +1 -1
  43. package/dist/es/components/DateRangePicker/DateRangePicker.js +6 -1
  44. package/dist/es/components/DateRangePicker/DateRangePicker.js.map +1 -1
  45. package/dist/es/components/DateRangePicker/Trigger.js +1 -1
  46. package/dist/es/components/DateRangePicker/Trigger.js.map +1 -1
  47. package/dist/es/components/Dialog/Dialog.js +136 -20
  48. package/dist/es/components/Dialog/Dialog.js.map +1 -1
  49. package/dist/es/components/Dialog/index.js.map +1 -1
  50. package/dist/es/components/Dialog/sheetDrag.js +77 -24
  51. package/dist/es/components/Dialog/sheetDrag.js.map +1 -1
  52. package/dist/es/components/Field/Field.js +51 -4
  53. package/dist/es/components/Field/Field.js.map +1 -1
  54. package/dist/es/components/FieldGroup/FieldGroup.js +4 -2
  55. package/dist/es/components/FieldGroup/FieldGroup.js.map +1 -1
  56. package/dist/es/components/FileUpload/FileUpload.js +43 -3
  57. package/dist/es/components/FileUpload/FileUpload.js.map +1 -1
  58. package/dist/es/components/FloatingLabelInput/FloatingLabelInput.js +18 -16
  59. package/dist/es/components/FloatingLabelInput/FloatingLabelInput.js.map +1 -1
  60. package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.js +11 -6
  61. package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.js.map +1 -1
  62. package/dist/es/components/Icon/index.js +2 -0
  63. package/dist/es/components/Icon/index.js.map +1 -1
  64. package/dist/es/components/Icon/svg/Disclosure.js +5 -0
  65. package/dist/es/components/Icon/svg/Disclosure.js.map +1 -0
  66. package/dist/es/components/Icon/svg/Eyedropper.js +6 -0
  67. package/dist/es/components/Icon/svg/Eyedropper.js.map +1 -0
  68. package/dist/es/components/Indicator/LoadingIndicator.js +1 -1
  69. package/dist/es/components/Indicator/LoadingIndicator.js.map +1 -1
  70. package/dist/es/components/Input/Input.js +3 -3
  71. package/dist/es/components/Input/Input.js.map +1 -1
  72. package/dist/es/components/InputGroup/InputGroup.js +3 -1
  73. package/dist/es/components/InputGroup/InputGroup.js.map +1 -1
  74. package/dist/es/components/MarkdownEditor/MarkdownEditor.js +95 -93
  75. package/dist/es/components/MarkdownEditor/MarkdownEditor.js.map +1 -1
  76. package/dist/es/components/Menu/Menu.js +306 -34
  77. package/dist/es/components/Menu/Menu.js.map +1 -1
  78. package/dist/es/components/OTPInput/OTPInput.js +4 -1
  79. package/dist/es/components/OTPInput/OTPInput.js.map +1 -1
  80. package/dist/es/components/Page/Page.js +147 -19
  81. package/dist/es/components/Page/Page.js.map +1 -1
  82. package/dist/es/components/Page/index.js.map +1 -1
  83. package/dist/es/components/PageControl/PageControl.js +146 -0
  84. package/dist/es/components/PageControl/PageControl.js.map +1 -0
  85. package/dist/es/components/PageControl/index.js +2 -0
  86. package/dist/es/components/PageControl/index.js.map +1 -0
  87. package/dist/es/components/Popover/Popover.js +75 -33
  88. package/dist/es/components/Popover/Popover.js.map +1 -1
  89. package/dist/es/components/Popover/deferredOutsidePress.js +90 -0
  90. package/dist/es/components/Popover/deferredOutsidePress.js.map +1 -0
  91. package/dist/es/components/Popover/usePopoverContext.js.map +1 -1
  92. package/dist/es/components/RadioGroup/RadioGroup.js +1 -1
  93. package/dist/es/components/RadioGroup/RadioGroup.js.map +1 -1
  94. package/dist/es/components/Select/Select.js +98 -32
  95. package/dist/es/components/Select/Select.js.map +1 -1
  96. package/dist/es/components/SelectControl/SelectControl.js +48 -29
  97. package/dist/es/components/SelectControl/SelectControl.js.map +1 -1
  98. package/dist/es/components/SelectControl/index.js +1 -1
  99. package/dist/es/components/SelectControl/index.js.map +1 -1
  100. package/dist/es/components/ShimmerText/ShimmerText.js +17 -7
  101. package/dist/es/components/ShimmerText/ShimmerText.js.map +1 -1
  102. package/dist/es/components/Sidebar/Sidebar.js +21 -8
  103. package/dist/es/components/Sidebar/Sidebar.js.map +1 -1
  104. package/dist/es/components/Slider/Slider.js +61 -15
  105. package/dist/es/components/Slider/Slider.js.map +1 -1
  106. package/dist/es/components/Sortable/Sortable.js +16 -6
  107. package/dist/es/components/Sortable/Sortable.js.map +1 -1
  108. package/dist/es/components/Stepper/Stepper.js +114 -0
  109. package/dist/es/components/Stepper/Stepper.js.map +1 -0
  110. package/dist/es/components/Stepper/index.js +2 -0
  111. package/dist/es/components/Stepper/index.js.map +1 -0
  112. package/dist/es/components/Switch/Switch.js +2 -2
  113. package/dist/es/components/Switch/Switch.js.map +1 -1
  114. package/dist/es/components/TabBar/TabBar.js +128 -0
  115. package/dist/es/components/TabBar/TabBar.js.map +1 -0
  116. package/dist/es/components/TabBar/index.js +2 -0
  117. package/dist/es/components/TabBar/index.js.map +1 -0
  118. package/dist/es/components/Tabs/Tabs.js +27 -11
  119. package/dist/es/components/Tabs/Tabs.js.map +1 -1
  120. package/dist/es/components/TagInput/TagInput.js +40 -4
  121. package/dist/es/components/TagInput/TagInput.js.map +1 -1
  122. package/dist/es/components/Textarea/Textarea.js +7 -1
  123. package/dist/es/components/Textarea/Textarea.js.map +1 -1
  124. package/dist/es/components/Toast/ToastRenderer.js +86 -0
  125. package/dist/es/components/Toast/ToastRenderer.js.map +1 -0
  126. package/dist/es/components/Toast/Toaster.js +31 -16
  127. package/dist/es/components/Toast/Toaster.js.map +1 -1
  128. package/dist/es/components/Toast/toastLifecycle.js +283 -0
  129. package/dist/es/components/Toast/toastLifecycle.js.map +1 -0
  130. package/dist/es/components/Toolbar/Toolbar.js +92 -0
  131. package/dist/es/components/Toolbar/Toolbar.js.map +1 -0
  132. package/dist/es/components/Toolbar/index.js +2 -0
  133. package/dist/es/components/Toolbar/index.js.map +1 -0
  134. package/dist/es/components/Tooltip/CopyTooltip.js +37 -11
  135. package/dist/es/components/Tooltip/CopyTooltip.js.map +1 -1
  136. package/dist/es/components/Tooltip/Tooltip.js +61 -9
  137. package/dist/es/components/Tooltip/Tooltip.js.map +1 -1
  138. package/dist/es/hooks/useFloatingBoundary.js +35 -0
  139. package/dist/es/hooks/useFloatingBoundary.js.map +1 -0
  140. package/dist/es/hooks/usePhoneSubmenu.js +22 -0
  141. package/dist/es/hooks/usePhoneSubmenu.js.map +1 -0
  142. package/dist/es/lib/copyToClipboard.js +16 -7
  143. package/dist/es/lib/copyToClipboard.js.map +1 -1
  144. package/dist/es/lib/fieldRow.js +7 -1
  145. package/dist/es/lib/fieldRow.js.map +1 -1
  146. package/dist/es/lib/floatingBoundary.js +90 -0
  147. package/dist/es/lib/floatingBoundary.js.map +1 -0
  148. package/dist/es/lib/focusRestore.js +56 -0
  149. package/dist/es/lib/focusRestore.js.map +1 -0
  150. package/dist/es/lib/helpers.js +0 -18
  151. package/dist/es/lib/helpers.js.map +1 -1
  152. package/dist/es/lib/inputMode.js +9 -0
  153. package/dist/es/lib/inputMode.js.map +1 -0
  154. package/dist/es/lib/menuInitialFocus.js +100 -0
  155. package/dist/es/lib/menuInitialFocus.js.map +1 -0
  156. package/dist/es/lib/menuSubmenuPlacement.js +264 -0
  157. package/dist/es/lib/menuSubmenuPlacement.js.map +1 -0
  158. package/dist/es/lib/menuTriggerCover.js +70 -0
  159. package/dist/es/lib/menuTriggerCover.js.map +1 -0
  160. package/dist/es/lib/observeTextareaWidth.js +49 -0
  161. package/dist/es/lib/observeTextareaWidth.js.map +1 -0
  162. package/dist/es/lib/scrollEdges.js +34 -0
  163. package/dist/es/lib/scrollEdges.js.map +1 -0
  164. package/dist/es/lib/selectPress.js +34 -0
  165. package/dist/es/lib/selectPress.js.map +1 -0
  166. package/dist/es/lib/sortable.js +74 -20
  167. package/dist/es/lib/sortable.js.map +1 -1
  168. package/dist/es/styles/mobile-materials.css +1 -0
  169. package/dist/es/styles/mobile-surfaces.css +1 -0
  170. package/dist/types/components/Button/Button.d.ts +2 -0
  171. package/dist/types/components/Button/NavigationButton.d.ts +8 -0
  172. package/dist/types/components/Button/NavigationGlyph.d.ts +7 -0
  173. package/dist/types/components/Button/index.d.ts +1 -0
  174. package/dist/types/components/ColorPicker/ColorPicker.d.ts +34 -0
  175. package/dist/types/components/ColorPicker/ColorWell.d.ts +32 -0
  176. package/dist/types/components/ColorPicker/index.d.ts +3 -0
  177. package/dist/types/components/ColorPicker/shared.d.ts +69 -0
  178. package/dist/types/components/ContextMenu/ContextMenu.d.ts +78 -0
  179. package/dist/types/components/ContextMenu/index.d.ts +1 -0
  180. package/dist/types/components/ContextMenu/shared.d.ts +50 -0
  181. package/dist/types/components/DatePicker/CalendarNavigationIcon.d.ts +5 -0
  182. package/dist/types/components/DatePicker/DatePicker.d.ts +7 -1
  183. package/dist/types/components/DatePicker/useCalendarGutter.d.ts +1 -0
  184. package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +2 -0
  185. package/dist/types/components/Dialog/Dialog.d.ts +17 -6
  186. package/dist/types/components/Dialog/index.d.ts +1 -1
  187. package/dist/types/components/Field/Field.d.ts +12 -2
  188. package/dist/types/components/FieldGroup/FieldGroup.d.ts +11 -2
  189. package/dist/types/components/Icon/index.d.ts +2 -0
  190. package/dist/types/components/Icon/svg/Disclosure.d.ts +6 -0
  191. package/dist/types/components/Icon/svg/Eyedropper.d.ts +6 -0
  192. package/dist/types/components/Indicator/LoadingIndicator.d.ts +1 -1
  193. package/dist/types/components/Menu/Menu.d.ts +74 -9
  194. package/dist/types/components/Page/Page.d.ts +24 -9
  195. package/dist/types/components/Page/index.d.ts +1 -1
  196. package/dist/types/components/PageControl/PageControl.d.ts +52 -0
  197. package/dist/types/components/PageControl/index.d.ts +1 -0
  198. package/dist/types/components/Popover/Popover.d.ts +11 -6
  199. package/dist/types/components/Popover/deferredOutsidePress.d.ts +14 -0
  200. package/dist/types/components/Popover/usePopoverContext.d.ts +1 -0
  201. package/dist/types/components/Select/Select.d.ts +3 -3
  202. package/dist/types/components/SelectControl/SelectControl.d.ts +2 -2
  203. package/dist/types/components/SelectControl/index.d.ts +1 -1
  204. package/dist/types/components/Sortable/Sortable.d.ts +1 -1
  205. package/dist/types/components/Stepper/Stepper.d.ts +56 -0
  206. package/dist/types/components/Stepper/index.d.ts +1 -0
  207. package/dist/types/components/Switch/Switch.d.ts +3 -1
  208. package/dist/types/components/TabBar/TabBar.d.ts +74 -0
  209. package/dist/types/components/TabBar/index.d.ts +1 -0
  210. package/dist/types/components/Toast/ToastRenderer.d.ts +3 -0
  211. package/dist/types/components/Toast/Toaster.d.ts +4 -2
  212. package/dist/types/components/Toast/toastLifecycle.d.ts +90 -0
  213. package/dist/types/components/Toolbar/Toolbar.d.ts +93 -0
  214. package/dist/types/components/Toolbar/index.d.ts +1 -0
  215. package/dist/types/components/Tooltip/Tooltip.d.ts +2 -2
  216. package/dist/types/hooks/useFloatingBoundary.d.ts +24 -0
  217. package/dist/types/hooks/usePhoneSubmenu.d.ts +3 -0
  218. package/dist/types/lib/fieldRow.d.ts +6 -0
  219. package/dist/types/lib/floatingBoundary.d.ts +9 -0
  220. package/dist/types/lib/focusRestore.d.ts +5 -0
  221. package/dist/types/lib/helpers.d.ts +1 -5
  222. package/dist/types/lib/inputMode.d.ts +7 -0
  223. package/dist/types/lib/menuInitialFocus.d.ts +9 -0
  224. package/dist/types/lib/menuSubmenuPlacement.d.ts +57 -0
  225. package/dist/types/lib/menuTriggerCover.d.ts +23 -0
  226. package/dist/types/lib/observeTextareaWidth.d.ts +2 -0
  227. package/dist/types/lib/scrollEdges.d.ts +16 -0
  228. package/dist/types/lib/selectPress.d.ts +23 -0
  229. package/dist/types/lib/sortable.d.ts +1 -1
  230. package/package.json +6 -2
@@ -0,0 +1,69 @@
1
+ /** A color as the picker holds it: channels 0 to 255 and an alpha from 0 to 1. */
2
+ export type Rgba = {
3
+ r: number;
4
+ g: number;
5
+ b: number;
6
+ a: number;
7
+ };
8
+ /** The three ways to choose a color, as the segments of the system picker. */
9
+ export type ColorPickerMode = "grid" | "spectrum" | "sliders";
10
+ export declare const COLOR_PICKER_MODES: readonly {
11
+ value: ColorPickerMode;
12
+ label: string;
13
+ }[];
14
+ /** The kit's Color Grid (515:48178): a row of grays, then nine rows from dark to light, twelve hues across. */
15
+ export declare const COLOR_PICKER_GRID: readonly (readonly string[])[];
16
+ export declare const COLOR_PICKER_GRID_COLUMNS = 12;
17
+ /** Saved colors fill pages of two rows of five, with the Add button after the last one (kit Swatches 515:52724). */
18
+ export declare const COLOR_PICKER_SWATCHES_PER_PAGE = 10;
19
+ export declare const COLOR_PICKER_SWATCHES_PER_ROW = 5;
20
+ /** Reads `#rgb`, `#rgba`, `#rrggbb` or `#rrggbbaa`, in either case; anything else is `null`. */
21
+ export declare function parseColor(input: string | null | undefined): Rgba | null;
22
+ /** `#rrggbb`, or `#rrggbbaa` when the color is not opaque. */
23
+ export declare function formatColor({ r, g, b, a }: Rgba): string;
24
+ /** The six digits the Hex field shows, as the system picker does: upper case, no `#`. */
25
+ export declare const hexDigits: ({ r, g, b }: Rgba) => string;
26
+ /** A CSS color for a fill. */
27
+ export declare const cssColor: ({ r, g, b, a }: Rgba, alpha?: number) => string;
28
+ export declare const sameRgb: (one: Rgba, other: Rgba) => boolean;
29
+ /** Whole percent of opacity, as the Opacity field shows it. */
30
+ export declare const alphaPercent: (a: number) => number;
31
+ /** The grid cell of a color, or -1 when the grid has no such color. */
32
+ export declare const gridIndex: (color: Rgba) => number;
33
+ export declare const gridColor: (index: number) => string;
34
+ /** The cell an arrow key, Home or End moves to from `index`, or `index` itself at an edge. */
35
+ export declare function gridMove(index: number, key: string): number;
36
+ /** The item a key moves to in a list of `count` items (saved colors), or `index` itself. */
37
+ export declare function listMove(index: number, count: number, key: string): number;
38
+ /** Pages of saved colors: the colors and the Add button after them, ten to a page. */
39
+ export declare const swatchPageCount: (count: number) => number;
40
+ /**
41
+ * A point of the spectrum: hue from top to bottom, and from white at the leading edge through the full hue at the
42
+ * middle to black at the trailing edge, as the system picker draws it (UIColorPickerViewController overview image).
43
+ */
44
+ export type SpectrumPoint = {
45
+ x: number;
46
+ y: number;
47
+ };
48
+ export declare function spectrumColor({ x, y }: SpectrumPoint, alpha: number): Rgba;
49
+ /** Where a color sits on the spectrum; a gray keeps the hue of `previous`, as it has none. */
50
+ export declare function spectrumPoint(color: Rgba, previous?: SpectrumPoint): SpectrumPoint;
51
+ /** The track of the Opacity slider: the color from clear to opaque over the kit's 12% to 88% (515:47434). */
52
+ export declare const opacityTrack: (color: Rgba) => string;
53
+ export type ColorChannel = "r" | "g" | "b";
54
+ export declare const COLOR_PICKER_CHANNELS: readonly {
55
+ channel: ColorChannel;
56
+ label: string;
57
+ }[];
58
+ /** The track of a channel slider: the color with that channel from 0 to 255. */
59
+ export declare const channelTrack: (color: Rgba, channel: ColorChannel) => string;
60
+ /** A number typed in a field, kept within `min` and `max`; text with no number is `null`. */
61
+ export declare function parseNumber(text: string, min: number, max: number): number | null;
62
+ /** The EyeDropper API (Chromium), when the browser has it. */
63
+ type EyeDropperConstructor = new () => {
64
+ open: () => Promise<{
65
+ sRGBHex: string;
66
+ }>;
67
+ };
68
+ export declare function eyeDropper(): EyeDropperConstructor | null;
69
+ export {};
@@ -0,0 +1,78 @@
1
+ import { type ReactElement, type ReactNode } from "react";
2
+ import { type MenuContentProps } from "../Menu/Menu.js";
3
+ export type ContextMenuProps = {
4
+ /** `ContextMenu.Trigger` and `ContextMenu.Content`. */
5
+ children: ReactNode;
6
+ /** Called when the menu opens. */
7
+ onOpen?: () => void;
8
+ /** Called when the menu closes. */
9
+ onClose?: () => void;
10
+ };
11
+ /**
12
+ * A menu of actions for an element, after the iOS 26 kit Context Menu (507:25994): a secondary click opens it at
13
+ * the pointer, a touch and hold opens it beside the element, which stays clear above a dimmed, blurred page, as
14
+ * iOS lifts the preview. The items are the ones of `Menu`.
15
+ */
16
+ declare function ContextMenuRoot({ children, onOpen, onClose }: ContextMenuProps): import("react/jsx-runtime").JSX.Element;
17
+ declare namespace ContextMenuRoot {
18
+ var displayName: string;
19
+ }
20
+ export type ContextMenuTriggerProps = {
21
+ /** The element the menu is for; it receives the handlers, so it keeps its own role and focus. */
22
+ children: ReactElement;
23
+ /** When `true`, the element keeps the browser's own context menu. */
24
+ disabled?: boolean;
25
+ };
26
+ declare function ContextMenuTrigger({ children, disabled }: ContextMenuTriggerProps): import("react/jsx-runtime").JSX.Element;
27
+ declare namespace ContextMenuTrigger {
28
+ var displayName: string;
29
+ }
30
+ /** The props of `Menu.Content` but its placement, which follows how the menu opened. */
31
+ export type ContextMenuContentProps = Omit<MenuContentProps, "side" | "sideOffset" | "align" | "alignOffset" | "onCloseAutoFocus" | "layout" | "size">;
32
+ declare function ContextMenuContent(props: ContextMenuContentProps): import("react/jsx-runtime").JSX.Element;
33
+ declare namespace ContextMenuContent {
34
+ var displayName: string;
35
+ }
36
+ export declare const ContextMenu: typeof ContextMenuRoot & {
37
+ Trigger: typeof ContextMenuTrigger;
38
+ Content: typeof ContextMenuContent;
39
+ Item: ({ className, children, description, disabled, danger, onSelect, onClick }: import("../Menu/Menu.js").MenuItemProps) => import("react/jsx-runtime").JSX.Element;
40
+ Link: <T extends import("react").ComponentType<any> | "a" = "a">(props: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href"> & (Omit<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, "children" | "href"> & {
41
+ children: React.ReactNode;
42
+ disabled?: boolean;
43
+ danger?: boolean;
44
+ }) & {
45
+ as?: T;
46
+ } & import("react").ComponentProps<T>) => ReactNode;
47
+ Separator: ({ className }: {
48
+ className?: string;
49
+ }) => import("react/jsx-runtime").JSX.Element;
50
+ Label: ({ className, children }: {
51
+ className?: string;
52
+ children: ReactNode;
53
+ }) => import("react/jsx-runtime").JSX.Element;
54
+ Group: ({ className, children, }: {
55
+ className?: string;
56
+ children: ReactNode;
57
+ }) => import("react/jsx-runtime").JSX.Element;
58
+ Sub: ({ children, forceOpen, onOpen, onClose }: import("../Menu/Menu.js").SubmenuProps) => import("react/jsx-runtime").JSX.Element;
59
+ SubTrigger: ({ className, children, description, disabled, }: {
60
+ className?: string;
61
+ children: ReactNode;
62
+ description?: ReactNode;
63
+ disabled?: boolean;
64
+ }) => import("react/jsx-runtime").JSX.Element;
65
+ SubContent: ({ children, sideOffset, alignOffset, width, minWidth, maxHeight, pill, }: {
66
+ children: ReactNode;
67
+ sideOffset?: import("@radix-ui/react-dropdown-menu").DropdownMenuSubContentProps["sideOffset"];
68
+ alignOffset?: import("@radix-ui/react-dropdown-menu").DropdownMenuSubContentProps["alignOffset"];
69
+ width?: number | "auto";
70
+ minWidth?: number | "auto";
71
+ maxHeight?: number;
72
+ pill?: boolean;
73
+ }) => import("react/jsx-runtime").JSX.Element;
74
+ CheckboxItem: ({ className, children, indicatorPosition, indicatorVariant, ...props }: import("../Menu/Menu.js").MenuCheckboxItemProps) => import("react/jsx-runtime").JSX.Element;
75
+ RadioGroup: <T extends string>({ children, value, onChange, indicatorPosition, layout, ...props }: import("../Menu/Menu.js").MenuRadioGroupProps<T>) => import("react/jsx-runtime").JSX.Element;
76
+ RadioItem: <T extends string>({ className, children, description, ...props }: import("../Menu/Menu.js").MenuRadioItemProps<T>) => import("react/jsx-runtime").JSX.Element;
77
+ };
78
+ export {};
@@ -0,0 +1 @@
1
+ export { ContextMenu, type ContextMenuContentProps, type ContextMenuProps, type ContextMenuTriggerProps } from "./ContextMenu.js";
@@ -0,0 +1,50 @@
1
+ /** A touch held this long opens the menu, as a UIKit long press (0.5 s). */
2
+ export declare const CONTEXT_MENU_LONG_PRESS = 500;
3
+ /** A touch that moves farther than this before then scrolls or drags instead. */
4
+ export declare const CONTEXT_MENU_LONG_PRESS_SLOP = 10;
5
+ /** The kit's gap between the preview and the menu (Context Menu, Alignment=Vertical: 160 + 18 = 178). */
6
+ export declare const CONTEXT_MENU_PREVIEW_GAP = 18;
7
+ type Rect = {
8
+ x: number;
9
+ y: number;
10
+ width: number;
11
+ height: number;
12
+ };
13
+ /** Where the menu opens: at the pointer, under the element for the keyboard, or beside a touch-and-hold preview. */
14
+ export type ContextMenuPresentation = {
15
+ kind: "pointer";
16
+ rect: Rect;
17
+ } | {
18
+ kind: "keyboard";
19
+ rect: Rect;
20
+ } | {
21
+ kind: "preview";
22
+ rect: Rect;
23
+ radius: number;
24
+ align: "start" | "end";
25
+ };
26
+ /**
27
+ * The preview of a touch and hold: the element's box and corner (its own, or `--context-menu-preview-radius`), and
28
+ * the edge the menu keeps to, the one on the side of the touch, as the kit's Side=Leading and Side=Trailing.
29
+ */
30
+ export declare function contextMenuPreview(element: HTMLElement, touchX: number): ContextMenuPresentation;
31
+ /** The menu's side, alignment and offsets for a presentation. */
32
+ export declare function contextMenuPlacement(presentation: ContextMenuPresentation | null): {
33
+ side: "bottom";
34
+ align: "start" | "end";
35
+ sideOffset: number;
36
+ alignOffset: number;
37
+ };
38
+ /**
39
+ * The dimming covers the page but the element: an SVG mask with the element's rounded box cut out, written to
40
+ * `--context-menu-hole`, so the element stays clear above the dimmed, blurred page.
41
+ */
42
+ export declare function contextMenuHoleMask(preview: Extract<ContextMenuPresentation, {
43
+ kind: "preview";
44
+ }>, viewport?: {
45
+ width: number;
46
+ height: number;
47
+ }): {
48
+ "--context-menu-hole": string;
49
+ };
50
+ export {};
@@ -0,0 +1,5 @@
1
+ type CalendarNavigationIconProps = {
2
+ direction: "previous" | "next";
3
+ };
4
+ export declare const CalendarNavigationIcon: ({ direction }: CalendarNavigationIconProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -24,6 +24,7 @@ export type DatePickerProps = Pick<SelectControlProps, "aria-label" | "aria-labe
24
24
  max?: DateTime;
25
25
  /**
26
26
  * The preferred side of the trigger to render against when open. Will be reversed when collisions occur.
27
+ * On phones, left and right prefer bottom so all seven 44px day targets fit.
27
28
  * @default bottom
28
29
  */
29
30
  side?: PopoverContentProps["side"];
@@ -87,9 +88,14 @@ export type DatePickerProps = Pick<SelectControlProps, "aria-label" | "aria-labe
87
88
  triggerShowIcon?: boolean;
88
89
  /**
89
90
  * Format of dates displayed in the trigger
90
- * @default "MM/dd/yy", or "MM/dd/yy HH:mm" with showTime
91
+ * @default "MM/dd/yy", or "MM/dd/yy HH:mm" with showTime and no triggerTimeFormat
91
92
  */
92
93
  triggerDateFormat?: string;
94
+ /**
95
+ * With `showTime`, the format of the time shown after the date in the trigger. The date and the time are
96
+ * then two parts: in a row of a `FieldGroup` on a phone, the two capsules of iOS's compact date and time.
97
+ */
98
+ triggerTimeFormat?: string;
93
99
  /**
94
100
  * Display a clear action that allows the select to be unset.
95
101
  * @default false
@@ -0,0 +1 @@
1
+ export declare const useCalendarGutter: () => number;
@@ -31,10 +31,12 @@ export type DateRangePickerProps = {
31
31
  weekStartsOn?: WeekStart;
32
32
  /**
33
33
  * List of date range shortcuts displayed for quick selection, shown to the left of the calendar.
34
+ * Not shown below the md breakpoint: on a phone, offer them in a row of their own (see the docs).
34
35
  */
35
36
  shortcuts?: DateRangeShortcut[];
36
37
  /**
37
38
  * The preferred side of the trigger to render against when open. Will be reversed when collisions occur.
39
+ * On phones, left and right prefer bottom so all seven 44px day targets fit.
38
40
  * @default bottom
39
41
  */
40
42
  side?: PopoverContentProps["side"];
@@ -1,4 +1,5 @@
1
1
  import { type ReactNode } from "react";
2
+ import { type BarBackground } from "../Toolbar/Toolbar.js";
2
3
  export type DialogProps = {
3
4
  open?: boolean;
4
5
  onOpenChange?: (open: boolean) => void;
@@ -9,11 +10,11 @@ export declare const Dialog: {
9
10
  Trigger: ({ children }: {
10
11
  children: ReactNode;
11
12
  }) => import("react/jsx-runtime").JSX.Element;
12
- Content: ({ children, width, showClose, pill, className, placement, mobilePlacement: requestedMobilePlacement, mobileVariant, onOpenAutoFocus, onCloseAutoFocus, }: DialogContentProps) => import("react/jsx-runtime").JSX.Element;
13
- Header: ({ children, className }: DialogSlotProps) => import("react/jsx-runtime").JSX.Element;
13
+ Content: ({ children, width, showClose, pill, className, placement, mobilePlacement: requestedMobilePlacement, mobileVariant, surface, onOpenAutoFocus, onCloseAutoFocus, }: DialogContentProps) => import("react/jsx-runtime").JSX.Element;
14
+ Header: ({ children, className, background }: DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
14
15
  HeaderAction: ({ children, className }: DialogSlotProps) => import("react/jsx-runtime").JSX.Element;
15
16
  Body: ({ children, className }: DialogSlotProps) => import("react/jsx-runtime").JSX.Element;
16
- Footer: ({ children, className, mobileLayout }: DialogFooterProps) => import("react/jsx-runtime").JSX.Element;
17
+ Footer: ({ children, className, mobileLayout, background }: DialogFooterProps) => import("react/jsx-runtime").JSX.Element;
17
18
  Title: ({ children, className }: DialogSlotProps) => import("react/jsx-runtime").JSX.Element;
18
19
  Description: ({ children, className }: DialogSlotProps) => import("react/jsx-runtime").JSX.Element;
19
20
  Close: ({ children }: {
@@ -38,10 +39,12 @@ export type DialogContentProps = {
38
39
  * @default center
39
40
  */
40
41
  placement?: DialogPlacement;
41
- /** Placement at 640px and below, such as a bottom sheet on phones. @default placement */
42
+ /** Placement at 767px and below, such as a bottom sheet on phones. @default placement */
42
43
  mobilePlacement?: Extract<DialogPlacement, "center" | "bottom" | "fullscreen">;
43
- /** Mobile presentation at 640px and below. Sheets default to bottom placement. */
44
+ /** Mobile presentation at 767px and below. Sheets default to bottom placement. */
44
45
  mobileVariant?: "alert" | "sheet";
46
+ /** Mobile panel palette; dark mode uses elevated surfaces. @default "plain" */
47
+ surface?: "plain" | "grouped";
45
48
  /**
46
49
  * Called when focus moves into the dialog on open. Call
47
50
  * `event.preventDefault()` to focus something else yourself.
@@ -54,7 +57,15 @@ type DialogSlotProps = {
54
57
  children: ReactNode;
55
58
  className?: string;
56
59
  };
57
- type DialogFooterProps = DialogSlotProps & {
60
+ /** How a Sheet's bar meets the content scrolled under it; see `BarBackground`. */
61
+ export type DialogBarBackground = BarBackground;
62
+ export type DialogHeaderProps = DialogSlotProps & {
63
+ /** How the bar meets the content scrolled under it in a phone Sheet. @default "soft" */
64
+ background?: DialogBarBackground;
65
+ };
66
+ export type DialogFooterProps = DialogSlotProps & {
67
+ /** How the bar meets the content scrolled under it in a phone Sheet. @default "soft" */
68
+ background?: DialogBarBackground;
58
69
  /** Override the mobile action layout. Alerts default to inline; sheets to stacked. */
59
70
  mobileLayout?: "inline" | "stacked";
60
71
  };
@@ -1 +1 @@
1
- export { Dialog, type DialogContentProps, type DialogPlacement, type DialogProps } from "./Dialog.js";
1
+ export { Dialog, type DialogBarBackground, type DialogHeaderProps, type DialogFooterProps, type DialogContentProps, type DialogPlacement, type DialogProps } from "./Dialog.js";
@@ -17,6 +17,15 @@ export type FieldProps = {
17
17
  * Automatically linked via aria-describedby.
18
18
  */
19
19
  description?: React.ReactNode;
20
+ /**
21
+ * Hides the label from view; it still names the control for assistive technology.
22
+ * On a `row` the value or placeholder then starts at the row's edge, as an iOS cell that
23
+ * shows only its placeholder or value (Notes, a title, a server's address), so the row is
24
+ * vertical unless `orientation` says otherwise. Words that explain the field go in the
25
+ * FieldGroup's `footer`.
26
+ * @default false
27
+ */
28
+ hideLabel?: boolean;
20
29
  /**
21
30
  * Error message displayed below the control.
22
31
  * When provided, the child control receives aria-invalid="true".
@@ -50,13 +59,14 @@ export type FieldProps = {
50
59
  * Layout direction of label and control.
51
60
  * - "vertical": label stacked above control (default)
52
61
  * - "horizontal": label beside control
53
- * @default "horizontal" on a `row`, else "vertical"
62
+ * @default "horizontal" on a `row` with a visible label, else "vertical"
54
63
  */
55
64
  orientation?: "vertical" | "horizontal";
56
65
  /**
57
66
  * One line of a FieldGroup: label at the start, control at the end, an error
58
67
  * under both. Other div props reach the root only on a row, so it can carry
59
68
  * a click or data attributes.
69
+ * Clicking a non-interactive part of the row focuses its text editor or activates its choice control or popup trigger.
60
70
  * A control at the end of the row is a pill unless its own `pill` says otherwise.
61
71
  * @default false
62
72
  */
@@ -94,4 +104,4 @@ export type FieldProps = {
94
104
  */
95
105
  children: React.ReactElement | ((fieldProps: FieldChildProps) => React.ReactNode);
96
106
  } & Omit<React.ComponentProps<"div">, "children" | "id" | "className">;
97
- export declare function Field({ label, description, errorMessage, labelAction, action, size: sizeProp, required, orientation: orientationProp, row, fill, opticallyAlign, id: idProp, className, children, ...rest }: FieldProps): import("react/jsx-runtime").JSX.Element;
107
+ export declare function Field({ label, hideLabel, description, errorMessage, labelAction, action, size: sizeProp, required, orientation: orientationProp, row, fill, opticallyAlign, id: idProp, className, children, ...rest }: FieldProps): import("react/jsx-runtime").JSX.Element;
@@ -3,12 +3,21 @@ export type FieldGroupProps = {
3
3
  * Heading over the block. It names the group.
4
4
  */
5
5
  title?: React.ReactNode;
6
+ /**
7
+ * How much the title stands out. "standard" is a quiet heading over the rows (on a
8
+ * phone the kit's Nested list header: 17 Semibold, secondary). "increased" leads its
9
+ * content, as a section of a page does (the kit's Prominent header: 20 Semibold,
10
+ * primary).
11
+ * @default "standard"
12
+ */
13
+ headerProminence?: "standard" | "increased";
6
14
  /**
7
15
  * Line under the title.
8
16
  */
9
17
  description?: React.ReactNode;
10
18
  /**
11
- * Content at the end of the header, such as a button.
19
+ * Content at the end of the header, such as a button. On a phone a ghost text button
20
+ * reads as the list header's action: tinted text on the title's last line.
12
21
  */
13
22
  action?: React.ReactNode;
14
23
  /**
@@ -31,4 +40,4 @@ export type FieldGroupProps = {
31
40
  children?: React.ReactNode;
32
41
  } & Omit<React.ComponentProps<"section">, "title" | "children">;
33
42
  /** A titled block of rows: `Field row` lines with hairlines between them. */
34
- export declare function FieldGroup({ title, description, action, footer, columns, bodyClassName, className, children, ...rest }: FieldGroupProps): import("react/jsx-runtime").JSX.Element;
43
+ export declare function FieldGroup({ title, headerProminence, description, action, footer, columns, bodyClassName, className, children, ...rest }: FieldGroupProps): import("react/jsx-runtime").JSX.Element;
@@ -182,6 +182,7 @@ export { default as Desktop } from "./svg/Desktop.js";
182
182
  export { default as DiceRandomize } from "./svg/DiceRandomize.js";
183
183
  export { default as DiningEvents } from "./svg/DiningEvents.js";
184
184
  export { default as DisabledCursor } from "./svg/DisabledCursor.js";
185
+ export { default as Disclosure } from "./svg/Disclosure.js";
185
186
  export { default as Dock } from "./svg/Dock.js";
186
187
  export { default as DollarCircle } from "./svg/DollarCircle.js";
187
188
  export { default as Dot } from "./svg/Dot.js";
@@ -218,6 +219,7 @@ export { default as ExpandMd } from "./svg/ExpandMd.js";
218
219
  export { default as ExpandSm } from "./svg/ExpandSm.js";
219
220
  export { default as ExternalLink } from "./svg/ExternalLink.js";
220
221
  export { default as Eye } from "./svg/Eye.js";
222
+ export { default as Eyedropper } from "./svg/Eyedropper.js";
221
223
  export { default as EyeOff } from "./svg/EyeOff.js";
222
224
  export { default as FeaturedWreath } from "./svg/FeaturedWreath.js";
223
225
  export { default as File3D } from "./svg/File3D.js";
@@ -0,0 +1,6 @@
1
+ import type { SVGProps } from "react";
2
+ declare const Disclosure: {
3
+ (props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
6
+ export default Disclosure;
@@ -0,0 +1,6 @@
1
+ import type { SVGProps } from "react";
2
+ declare const Eyedropper: {
3
+ (props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
6
+ export default Eyedropper;
@@ -2,7 +2,7 @@ import type { ComponentProps } from "react";
2
2
  export type LoadingIndicatorProps = {
3
3
  /** Classname applied to the indicator */
4
4
  className?: string;
5
- /** Size of the indicator, in pixels
5
+ /** Size of the indicator, in pixels. The optional touch stylesheet defaults to 20px.
6
6
  * @default 1em
7
7
  */
8
8
  size?: number | string;
@@ -1,5 +1,18 @@
1
1
  import { DropdownMenu } from "radix-ui";
2
2
  import React, { type ComponentProps, type ComponentType, type MouseEvent, type ReactNode } from "react";
3
+ type MenuContextValue = {
4
+ open: boolean;
5
+ setOpen: (next: boolean) => void;
6
+ prepareFocusRestore: (trigger: HTMLElement) => void;
7
+ isUsingKeyboard: React.RefObject<boolean>;
8
+ /** The element of `Menu.Trigger`, which a phone menu covers */
9
+ triggerElement: HTMLElement | null;
10
+ setTriggerElement: (element: HTMLElement | null) => void;
11
+ /** Whether the menu is modal, which decides whether an outside interaction skips the focus return */
12
+ modal: boolean;
13
+ };
14
+ /** @internal The open state of the enclosing Menu, for ContextMenu. Not exported from the package. */
15
+ export declare const useMenuContext: () => MenuContextValue;
3
16
  export type MenuProps = {
4
17
  children: React.ReactNode;
5
18
  /** Force the menu to remain open or closed */
@@ -16,7 +29,7 @@ export type MenuProps = {
16
29
  };
17
30
  export declare const Menu: {
18
31
  ({ children, forceOpen, onOpen, onClose, modal }: MenuProps): import("react/jsx-runtime").JSX.Element;
19
- Content: ({ children, side, sideOffset, align, alignOffset, width, minWidth, maxHeight, pill, layout, size, onCloseAutoFocus, }: MenuContentProps) => import("react/jsx-runtime").JSX.Element;
32
+ Content: ({ children, side, sideOffset, align, alignOffset, width, minWidth, maxHeight, pill, layout, size, onCloseAutoFocus, onOpenAutoFocus, }: MenuContentProps) => import("react/jsx-runtime").JSX.Element;
20
33
  Item: ({ className, children, description, disabled, danger, onSelect, onClick }: MenuItemProps) => import("react/jsx-runtime").JSX.Element;
21
34
  ItemActions: ({ className, children }: {
22
35
  className?: string;
@@ -32,19 +45,24 @@ export declare const Menu: {
32
45
  Separator: ({ className }: {
33
46
  className?: string;
34
47
  }) => import("react/jsx-runtime").JSX.Element;
35
- Trigger: ({ children, disabled, ...restProps }: DropdownMenu.DropdownMenuTriggerProps & {
48
+ Trigger: ({ children, disabled, onPointerDown, onPointerCancel, onClick, onKeyDown, ...restProps }: DropdownMenu.DropdownMenuTriggerProps & {
36
49
  ref?: React.Ref<HTMLButtonElement>;
37
50
  }) => import("react/jsx-runtime").JSX.Element;
38
51
  Sub: ({ children, forceOpen, onOpen, onClose }: SubmenuProps) => import("react/jsx-runtime").JSX.Element;
39
- SubTrigger: ({ className, children, disabled, }: {
52
+ SubTrigger: ({ className, children, description, disabled, }: {
40
53
  className?: string;
41
54
  children: ReactNode;
55
+ /**
56
+ * Second line under the label: what the submenu has chosen, as Reminders shows "Manual" under Sort By. It stacks
57
+ * as an Item's description does; icons before the label stay beside both lines.
58
+ */
59
+ description?: ReactNode;
42
60
  disabled?: boolean;
43
61
  }) => import("react/jsx-runtime").JSX.Element;
44
62
  SubContent: ({ children, sideOffset, alignOffset, width, minWidth, maxHeight, pill, }: SubContentProps) => import("react/jsx-runtime").JSX.Element;
45
63
  CheckboxItem: ({ className, children, indicatorPosition, indicatorVariant, ...props }: MenuCheckboxItemProps) => import("react/jsx-runtime").JSX.Element;
46
- RadioGroup: <T extends string>({ children, value, onChange, indicatorPosition, ...props }: MenuRadioGroupProps<T>) => import("react/jsx-runtime").JSX.Element;
47
- RadioItem: <T extends string>({ className, children, ...props }: MenuRadioItemProps<T>) => import("react/jsx-runtime").JSX.Element;
64
+ RadioGroup: <T extends string>({ children, value, onChange, indicatorPosition, layout, ...props }: MenuRadioGroupProps<T>) => import("react/jsx-runtime").JSX.Element;
65
+ RadioItem: <T extends string>({ className, children, description, ...props }: MenuRadioItemProps<T>) => import("react/jsx-runtime").JSX.Element;
48
66
  Label: ({ className, children }: {
49
67
  className?: string;
50
68
  children: ReactNode;
@@ -53,6 +71,8 @@ export declare const Menu: {
53
71
  className?: string;
54
72
  children: ReactNode;
55
73
  }) => import("react/jsx-runtime").JSX.Element;
74
+ Header: ({ className, children, description, media, action }: MenuHeaderProps) => import("react/jsx-runtime").JSX.Element;
75
+ HeaderAction: ({ children, "aria-label": ariaLabel, onSelect, disabled }: MenuHeaderActionProps) => import("react/jsx-runtime").JSX.Element;
56
76
  };
57
77
  export type MenuItemProps = {
58
78
  className?: string;
@@ -93,12 +113,14 @@ type MenuLink = <T extends ComponentType<any> | "a" = PlexUI.LinkComponent>(prop
93
113
  export type MenuContentProps = {
94
114
  children: React.ReactNode;
95
115
  /**
96
- * The preferred side of the trigger to render against when open. Will be reversed when collisions occur.
116
+ * The preferred side of the trigger to render against when open. Will be reversed when collisions occur. Without it
117
+ * a menu on a phone opens toward the larger part of the screen: upward from a trigger in the lower half.
97
118
  * @default bottom
98
119
  */
99
120
  side?: DropdownMenu.DropdownMenuContentProps["side"];
100
121
  /**
101
- * The distance in pixels from the trigger.
122
+ * The distance in pixels from the trigger. Without it a menu on a phone covers its trigger, as iOS menus grow out
123
+ * of the control that opens them.
102
124
  * @default 5
103
125
  */
104
126
  sideOffset?: DropdownMenu.DropdownMenuContentProps["sideOffset"];
@@ -108,8 +130,9 @@ export type MenuContentProps = {
108
130
  */
109
131
  align?: DropdownMenu.DropdownMenuContentProps["align"];
110
132
  /**
111
- * An offset in pixels from the "start" or "end" alignment options.
112
- * @default 0
133
+ * An offset in pixels from the "start" or "end" alignment options. Without it a menu on a phone that covers its
134
+ * trigger keeps the trigger's edge.
135
+ * @default -5 with "start" or "end", 0 with "center"
113
136
  */
114
137
  alignOffset?: DropdownMenu.DropdownMenuContentProps["alignOffset"];
115
138
  /**
@@ -149,6 +172,12 @@ export type MenuContentProps = {
149
172
  * trigger from regaining focus (and its focus-visible ring).
150
173
  */
151
174
  onCloseAutoFocus?: DropdownMenu.DropdownMenuContentProps["onCloseAutoFocus"];
175
+ /**
176
+ * Event handler called when focus moves into the menu as it opens. Call
177
+ * `event.preventDefault()` to leave focus where it is, as for a menu that
178
+ * stands open when its screen appears.
179
+ */
180
+ onOpenAutoFocus?: (event: Event) => void;
152
181
  };
153
182
  export type SubmenuProps = {
154
183
  children: React.ReactNode;
@@ -179,12 +208,24 @@ export type MenuRadioGroupProps<T extends string> = {
179
208
  * @default end
180
209
  */
181
210
  indicatorPosition?: "start" | "end";
211
+ /**
212
+ * `horizontal` sets the options side by side, each an icon over its label and the chosen one on a fill: a mode at the
213
+ * top of an iOS menu, above its list, as Photos orders by Added or by Captured. No radio indicator is drawn; choosing
214
+ * one closes the menu, as any item does.
215
+ * @default "vertical"
216
+ */
217
+ layout?: "vertical" | "horizontal";
182
218
  };
183
219
  export type MenuRadioItemProps<T extends string> = {
184
220
  value: T;
185
221
  /** Class applied to the radio item */
186
222
  className?: string;
187
223
  children: ReactNode;
224
+ /**
225
+ * Second line under the label, as iOS shows the order of the chosen sort (Files: "Newest to Oldest" under Date). It
226
+ * stacks as an Item's description does.
227
+ */
228
+ description?: ReactNode;
188
229
  /** Callback triggered when the radio item is pressed */
189
230
  onSelect?: DropdownMenu.DropdownMenuItemProps["onSelect"];
190
231
  /** Disables the radio item */
@@ -213,4 +254,28 @@ export type MenuCheckboxItemProps = {
213
254
  */
214
255
  indicatorVariant?: "solid" | "ghost";
215
256
  };
257
+ export type MenuHeaderProps = {
258
+ className?: string;
259
+ /** The title: the name of what the menu acts on, such as a file or a board */
260
+ children: ReactNode;
261
+ /** A line under the title: what it is, such as its kind and size ("Folder · 382 KB") */
262
+ description?: ReactNode;
263
+ /**
264
+ * A picture before the title: a thumbnail image, an icon or an Avatar, in a square of 32px (40px on a phone). An
265
+ * image or icon fills the square; an image gets small rounded corners.
266
+ */
267
+ media?: ReactNode;
268
+ /** A round action at the end of the header: a `Menu.HeaderAction` */
269
+ action?: ReactNode;
270
+ };
271
+ export type MenuHeaderActionProps = {
272
+ /** The action's icon */
273
+ children: ReactNode;
274
+ /** Accessible name; the action is an icon-only button */
275
+ "aria-label": string;
276
+ /** Called when the action is pressed; the menu then closes. Call `event.preventDefault()` to keep it open. */
277
+ onSelect?: (event: Event) => void;
278
+ /** Disables the action */
279
+ disabled?: boolean;
280
+ };
216
281
  export {};