@matekit/react 0.0.0-stage → 0.1.1

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 (268) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/LICENSE +202 -0
  3. package/NOTICE +56 -0
  4. package/README.md +115 -2
  5. package/dist/atoms/Divider/Divider.d.ts +49 -0
  6. package/dist/atoms/Divider/Divider.js +29 -0
  7. package/dist/atoms/FocusRing/FocusRing.d.ts +16 -0
  8. package/dist/atoms/FocusRing/FocusRing.js +16 -0
  9. package/dist/atoms/Group/Group.d.ts +38 -0
  10. package/dist/atoms/Group/Group.js +34 -0
  11. package/dist/atoms/Icon/Icon.d.ts +23 -0
  12. package/dist/atoms/Icon/Icon.js +19 -0
  13. package/dist/atoms/Interactive/Interactive.d.ts +98 -0
  14. package/dist/atoms/Interactive/Interactive.js +87 -0
  15. package/dist/atoms/Ripple/Ripple.d.ts +14 -0
  16. package/dist/atoms/Ripple/Ripple.js +63 -0
  17. package/dist/atoms/Shape/Shape.d.ts +24 -0
  18. package/dist/atoms/Shape/Shape.js +19 -0
  19. package/dist/atoms/Shape/shapes.d.ts +8 -0
  20. package/dist/atoms/Shape/shapes.js +40 -0
  21. package/dist/atoms/Stack/Stack.d.ts +58 -0
  22. package/dist/atoms/Stack/Stack.js +33 -0
  23. package/dist/atoms/StateLayer/StateLayer.d.ts +17 -0
  24. package/dist/atoms/StateLayer/StateLayer.js +17 -0
  25. package/dist/atoms/index.d.ts +10 -0
  26. package/dist/atoms/index.js +10 -0
  27. package/dist/fonts/roboto-flex/OFL.txt +93 -0
  28. package/dist/fonts/roboto-flex/roboto-flex-cyrillic-ext.woff2 +0 -0
  29. package/dist/fonts/roboto-flex/roboto-flex-cyrillic.woff2 +0 -0
  30. package/dist/fonts/roboto-flex/roboto-flex-greek.woff2 +0 -0
  31. package/dist/fonts/roboto-flex/roboto-flex-latin-ext.woff2 +0 -0
  32. package/dist/fonts/roboto-flex/roboto-flex-latin.woff2 +0 -0
  33. package/dist/fonts/roboto-flex/roboto-flex-vietnamese.woff2 +0 -0
  34. package/dist/icons/icons.d.ts +89 -0
  35. package/dist/icons/icons.js +186 -0
  36. package/dist/icons/index.d.ts +1 -0
  37. package/dist/icons/index.js +3 -0
  38. package/dist/index.d.ts +8 -0
  39. package/dist/index.js +12 -0
  40. package/dist/internal/accessible-name.d.ts +17 -0
  41. package/dist/internal/accessible-name.js +33 -0
  42. package/dist/internal/anchor-position.d.ts +99 -0
  43. package/dist/internal/anchor-position.js +159 -0
  44. package/dist/internal/anchored-drag.d.ts +25 -0
  45. package/dist/internal/anchored-drag.js +106 -0
  46. package/dist/internal/dev.d.ts +2 -0
  47. package/dist/internal/dev.js +18 -0
  48. package/dist/internal/diagnostics.d.ts +46 -0
  49. package/dist/internal/diagnostics.js +125 -0
  50. package/dist/internal/group-label.d.ts +22 -0
  51. package/dist/internal/group-label.js +50 -0
  52. package/dist/internal/interactive.d.ts +28 -0
  53. package/dist/internal/interactive.js +18 -0
  54. package/dist/internal/layout-element.d.ts +21 -0
  55. package/dist/internal/layout-element.js +33 -0
  56. package/dist/internal/merge-refs.d.ts +13 -0
  57. package/dist/internal/merge-refs.js +35 -0
  58. package/dist/internal/modal-dialog.d.ts +63 -0
  59. package/dist/internal/modal-dialog.js +267 -0
  60. package/dist/internal/navigation-count.d.ts +38 -0
  61. package/dist/internal/navigation-count.js +60 -0
  62. package/dist/internal/navigation-item.d.ts +14 -0
  63. package/dist/internal/navigation-item.js +17 -0
  64. package/dist/internal/nearest-scroller.d.ts +4 -0
  65. package/dist/internal/nearest-scroller.js +17 -0
  66. package/dist/internal/open-state.d.ts +15 -0
  67. package/dist/internal/open-state.js +42 -0
  68. package/dist/internal/roving-focus.d.ts +41 -0
  69. package/dist/internal/roving-focus.js +126 -0
  70. package/dist/internal/settle-animations.d.ts +33 -0
  71. package/dist/internal/settle-animations.js +48 -0
  72. package/dist/internal/time-period.d.ts +10 -0
  73. package/dist/internal/time-period.js +26 -0
  74. package/dist/internal/time.d.ts +23 -0
  75. package/dist/internal/time.js +69 -0
  76. package/dist/internal/typeahead.d.ts +17 -0
  77. package/dist/internal/typeahead.js +35 -0
  78. package/dist/molecules/Badge/Badge.d.ts +25 -0
  79. package/dist/molecules/Badge/Badge.js +16 -0
  80. package/dist/molecules/Button/Button.d.ts +48 -0
  81. package/dist/molecules/Button/Button.js +34 -0
  82. package/dist/molecules/Card/Card.d.ts +159 -0
  83. package/dist/molecules/Card/Card.js +119 -0
  84. package/dist/molecules/Checkbox/Checkbox.d.ts +26 -0
  85. package/dist/molecules/Checkbox/Checkbox.js +40 -0
  86. package/dist/molecules/Chip/AssistChip.d.ts +23 -0
  87. package/dist/molecules/Chip/AssistChip.js +22 -0
  88. package/dist/molecules/Chip/ChipGroup.d.ts +85 -0
  89. package/dist/molecules/Chip/ChipGroup.js +92 -0
  90. package/dist/molecules/Chip/FilterChip.d.ts +33 -0
  91. package/dist/molecules/Chip/FilterChip.js +30 -0
  92. package/dist/molecules/Chip/InputChip.d.ts +60 -0
  93. package/dist/molecules/Chip/InputChip.js +107 -0
  94. package/dist/molecules/Chip/SuggestionChip.d.ts +24 -0
  95. package/dist/molecules/Chip/SuggestionChip.js +17 -0
  96. package/dist/molecules/Chip/chip-content.d.ts +39 -0
  97. package/dist/molecules/Chip/chip-content.js +95 -0
  98. package/dist/molecules/Chip/chip-element.d.ts +14 -0
  99. package/dist/molecules/Chip/chip-element.js +14 -0
  100. package/dist/molecules/Chip/strings.d.ts +8 -0
  101. package/dist/molecules/Chip/strings.js +5 -0
  102. package/dist/molecules/Fab/Fab.d.ts +78 -0
  103. package/dist/molecules/Fab/Fab.js +52 -0
  104. package/dist/molecules/IconButton/IconButton.d.ts +59 -0
  105. package/dist/molecules/IconButton/IconButton.js +36 -0
  106. package/dist/molecules/LoadingIndicator/LoadingIndicator.d.ts +38 -0
  107. package/dist/molecules/LoadingIndicator/LoadingIndicator.js +25 -0
  108. package/dist/molecules/LoadingIndicator/determinate.d.ts +3 -0
  109. package/dist/molecules/LoadingIndicator/determinate.js +47 -0
  110. package/dist/molecules/LoadingIndicator/loading-indicator-data.d.ts +21 -0
  111. package/dist/molecules/LoadingIndicator/loading-indicator-data.js +72 -0
  112. package/dist/molecules/ProgressIndicator/CircularProgressIndicator.d.ts +35 -0
  113. package/dist/molecules/ProgressIndicator/CircularProgressIndicator.js +30 -0
  114. package/dist/molecules/ProgressIndicator/LinearProgressIndicator.d.ts +43 -0
  115. package/dist/molecules/ProgressIndicator/LinearProgressIndicator.js +28 -0
  116. package/dist/molecules/ProgressIndicator/circular-wavy-data.d.ts +5 -0
  117. package/dist/molecules/ProgressIndicator/circular-wavy-data.js +19 -0
  118. package/dist/molecules/ProgressIndicator/progress.d.ts +24 -0
  119. package/dist/molecules/ProgressIndicator/progress.js +60 -0
  120. package/dist/molecules/RadioButton/RadioButton.d.ts +27 -0
  121. package/dist/molecules/RadioButton/RadioButton.js +70 -0
  122. package/dist/molecules/RadioButton/RadioGroup.d.ts +73 -0
  123. package/dist/molecules/RadioButton/RadioGroup.js +82 -0
  124. package/dist/molecules/ScrollField/ScrollField.d.ts +61 -0
  125. package/dist/molecules/ScrollField/ScrollField.js +352 -0
  126. package/dist/molecules/Slider/RangeSlider.d.ts +60 -0
  127. package/dist/molecules/Slider/RangeSlider.js +169 -0
  128. package/dist/molecules/Slider/Slider.d.ts +54 -0
  129. package/dist/molecules/Slider/Slider.js +71 -0
  130. package/dist/molecules/Slider/slider-shared.d.ts +26 -0
  131. package/dist/molecules/Slider/slider-shared.js +98 -0
  132. package/dist/molecules/Switch/Switch.d.ts +22 -0
  133. package/dist/molecules/Switch/Switch.js +20 -0
  134. package/dist/molecules/TextField/TextField.d.ts +83 -0
  135. package/dist/molecules/TextField/TextField.js +146 -0
  136. package/dist/molecules/TextField/TextFieldSlots.d.ts +22 -0
  137. package/dist/molecules/TextField/TextFieldSlots.js +24 -0
  138. package/dist/molecules/TimeInput/TimeInput.d.ts +108 -0
  139. package/dist/molecules/TimeInput/TimeInput.js +347 -0
  140. package/dist/molecules/TimeInput/strings.d.ts +13 -0
  141. package/dist/molecules/TimeInput/strings.js +10 -0
  142. package/dist/molecules/TimeScroll/TimeScroll.d.ts +106 -0
  143. package/dist/molecules/TimeScroll/TimeScroll.js +213 -0
  144. package/dist/molecules/TimeScroll/strings.d.ts +13 -0
  145. package/dist/molecules/TimeScroll/strings.js +12 -0
  146. package/dist/molecules/index.d.ts +27 -0
  147. package/dist/molecules/index.js +25 -0
  148. package/dist/organisms/BottomSheet/BottomSheet.d.ts +128 -0
  149. package/dist/organisms/BottomSheet/BottomSheet.js +432 -0
  150. package/dist/organisms/BottomSheet/BottomSheetSlots.d.ts +17 -0
  151. package/dist/organisms/BottomSheet/BottomSheetSlots.js +16 -0
  152. package/dist/organisms/BottomSheet/StandardBottomSheet.d.ts +37 -0
  153. package/dist/organisms/BottomSheet/StandardBottomSheet.js +206 -0
  154. package/dist/organisms/BottomSheet/bottom-sheet-context.d.ts +31 -0
  155. package/dist/organisms/BottomSheet/bottom-sheet-context.js +12 -0
  156. package/dist/organisms/BottomSheet/sheet-drag.d.ts +1 -0
  157. package/dist/organisms/BottomSheet/sheet-drag.js +4 -0
  158. package/dist/organisms/BottomSheet/strings.d.ts +9 -0
  159. package/dist/organisms/BottomSheet/strings.js +8 -0
  160. package/dist/organisms/ButtonGroup/ButtonGroup.d.ts +97 -0
  161. package/dist/organisms/ButtonGroup/ButtonGroup.js +242 -0
  162. package/dist/organisms/ButtonGroup/ButtonGroupItem.d.ts +36 -0
  163. package/dist/organisms/ButtonGroup/ButtonGroupItem.js +47 -0
  164. package/dist/organisms/Dialog/Dialog.d.ts +186 -0
  165. package/dist/organisms/Dialog/Dialog.js +193 -0
  166. package/dist/organisms/Dialog/DialogSlots.d.ts +60 -0
  167. package/dist/organisms/Dialog/DialogSlots.js +54 -0
  168. package/dist/organisms/Dialog/strings.d.ts +5 -0
  169. package/dist/organisms/Dialog/strings.js +5 -0
  170. package/dist/organisms/FabMenu/FabMenu.d.ts +104 -0
  171. package/dist/organisms/FabMenu/FabMenu.js +142 -0
  172. package/dist/organisms/FabMenu/strings.d.ts +9 -0
  173. package/dist/organisms/FabMenu/strings.js +5 -0
  174. package/dist/organisms/List/List.d.ts +190 -0
  175. package/dist/organisms/List/List.js +148 -0
  176. package/dist/organisms/Menu/Menu.d.ts +313 -0
  177. package/dist/organisms/Menu/Menu.js +865 -0
  178. package/dist/organisms/Menu/MenuSlots.d.ts +35 -0
  179. package/dist/organisms/Menu/MenuSlots.js +36 -0
  180. package/dist/organisms/NavigationBar/NavigationBar.d.ts +96 -0
  181. package/dist/organisms/NavigationBar/NavigationBar.js +77 -0
  182. package/dist/organisms/NavigationRail/ModalNavigationRail.d.ts +105 -0
  183. package/dist/organisms/NavigationRail/ModalNavigationRail.js +272 -0
  184. package/dist/organisms/NavigationRail/NavigationRail.d.ts +148 -0
  185. package/dist/organisms/NavigationRail/NavigationRail.js +114 -0
  186. package/dist/organisms/NavigationRail/NavigationRailSection.d.ts +54 -0
  187. package/dist/organisms/NavigationRail/NavigationRailSection.js +96 -0
  188. package/dist/organisms/NavigationRail/strings.d.ts +7 -0
  189. package/dist/organisms/NavigationRail/strings.js +7 -0
  190. package/dist/organisms/NavigationSuite/NavigationSuite.d.ts +109 -0
  191. package/dist/organisms/NavigationSuite/NavigationSuite.js +86 -0
  192. package/dist/organisms/PaneScaffold/PaneScaffold.d.ts +118 -0
  193. package/dist/organisms/PaneScaffold/PaneScaffold.js +132 -0
  194. package/dist/organisms/Search/Search.d.ts +213 -0
  195. package/dist/organisms/Search/Search.js +783 -0
  196. package/dist/organisms/Search/SearchSlots.d.ts +18 -0
  197. package/dist/organisms/Search/SearchSlots.js +19 -0
  198. package/dist/organisms/Search/strings.d.ts +21 -0
  199. package/dist/organisms/Search/strings.js +12 -0
  200. package/dist/organisms/Select/Select.d.ts +186 -0
  201. package/dist/organisms/Select/Select.js +597 -0
  202. package/dist/organisms/Select/SelectSlots.d.ts +12 -0
  203. package/dist/organisms/Select/SelectSlots.js +12 -0
  204. package/dist/organisms/SideSheet/SideSheet.d.ts +88 -0
  205. package/dist/organisms/SideSheet/SideSheet.js +109 -0
  206. package/dist/organisms/SideSheet/SideSheetSlots.d.ts +35 -0
  207. package/dist/organisms/SideSheet/SideSheetSlots.js +37 -0
  208. package/dist/organisms/SideSheet/strings.d.ts +7 -0
  209. package/dist/organisms/SideSheet/strings.js +6 -0
  210. package/dist/organisms/Snackbar/Snackbar.d.ts +46 -0
  211. package/dist/organisms/Snackbar/Snackbar.js +36 -0
  212. package/dist/organisms/Snackbar/SnackbarHost.d.ts +57 -0
  213. package/dist/organisms/Snackbar/SnackbarHost.js +221 -0
  214. package/dist/organisms/Snackbar/snackbar-queue.d.ts +81 -0
  215. package/dist/organisms/Snackbar/snackbar-queue.js +114 -0
  216. package/dist/organisms/Snackbar/strings.d.ts +8 -0
  217. package/dist/organisms/Snackbar/strings.js +5 -0
  218. package/dist/organisms/SplitButton/SplitButton.d.ts +73 -0
  219. package/dist/organisms/SplitButton/SplitButton.js +77 -0
  220. package/dist/organisms/SplitButton/strings.d.ts +9 -0
  221. package/dist/organisms/SplitButton/strings.js +5 -0
  222. package/dist/organisms/Tabs/TabLink.d.ts +27 -0
  223. package/dist/organisms/Tabs/TabLink.js +25 -0
  224. package/dist/organisms/Tabs/TabNav.d.ts +19 -0
  225. package/dist/organisms/Tabs/TabNav.js +55 -0
  226. package/dist/organisms/Tabs/Tabs.d.ts +147 -0
  227. package/dist/organisms/Tabs/Tabs.js +223 -0
  228. package/dist/organisms/Tabs/tab-content.d.ts +23 -0
  229. package/dist/organisms/Tabs/tab-content.js +105 -0
  230. package/dist/organisms/Tabs/tab-fit.d.ts +4 -0
  231. package/dist/organisms/Tabs/tab-fit.js +65 -0
  232. package/dist/organisms/Tabs/tab-motion.d.ts +2 -0
  233. package/dist/organisms/Tabs/tab-motion.js +68 -0
  234. package/dist/organisms/TimePickerDialog/TimePickerDialog.d.ts +26 -0
  235. package/dist/organisms/TimePickerDialog/TimePickerDialog.js +34 -0
  236. package/dist/organisms/Toolbar/Toolbar.d.ts +75 -0
  237. package/dist/organisms/Toolbar/Toolbar.js +84 -0
  238. package/dist/organisms/Toolbar/ToolbarLayout.d.ts +44 -0
  239. package/dist/organisms/Toolbar/ToolbarLayout.js +90 -0
  240. package/dist/organisms/Toolbar/ToolbarScroll.d.ts +8 -0
  241. package/dist/organisms/Toolbar/ToolbarScroll.js +222 -0
  242. package/dist/organisms/Tooltip/RichTooltip.d.ts +73 -0
  243. package/dist/organisms/Tooltip/RichTooltip.js +250 -0
  244. package/dist/organisms/Tooltip/Tooltip.d.ts +52 -0
  245. package/dist/organisms/Tooltip/Tooltip.js +99 -0
  246. package/dist/organisms/Tooltip/tooltip-behavior.d.ts +43 -0
  247. package/dist/organisms/Tooltip/tooltip-behavior.js +307 -0
  248. package/dist/organisms/TopAppBar/TopAppBar.d.ts +107 -0
  249. package/dist/organisms/TopAppBar/TopAppBar.js +78 -0
  250. package/dist/organisms/TopAppBar/TopAppBarScroll.d.ts +7 -0
  251. package/dist/organisms/TopAppBar/TopAppBarScroll.js +155 -0
  252. package/dist/organisms/index.d.ts +36 -0
  253. package/dist/organisms/index.js +36 -0
  254. package/dist/palettes/blue.css +275 -0
  255. package/dist/palettes/green.css +275 -0
  256. package/dist/palettes/index.css +823 -0
  257. package/dist/palettes/orange.css +275 -0
  258. package/dist/shapes.css +115 -0
  259. package/dist/strings/index.d.ts +35 -0
  260. package/dist/strings/index.js +39 -0
  261. package/dist/styles-no-fonts.css +12025 -0
  262. package/dist/styles.css +12123 -0
  263. package/dist/stylesheet.d.ts +2 -0
  264. package/dist/tokens/breakpoints.d.ts +33 -0
  265. package/dist/tokens/breakpoints.js +31 -0
  266. package/dist/tokens/space.d.ts +26 -0
  267. package/dist/tokens/space.js +26 -0
  268. package/package.json +110 -3
@@ -0,0 +1,118 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type LayoutElementProps } from '../../internal/layout-element.tsx';
3
+ /** List-detail panes: the list, the detail of the chosen item and an optional extra one. */
4
+ export type ListDetailPaneName = 'list' | 'detail' | 'extra';
5
+ /** Supporting-pane panes: the main one, the supporting one and an optional extra one. */
6
+ export type SupportingPaneName = 'main' | 'supporting' | 'extra';
7
+ /** A pane's name, in either variant. */
8
+ export type PaneName = ListDetailPaneName | SupportingPaneName;
9
+ /** The variant: `list-detail` (`ListDetailPaneScaffold`) or `supporting` (`SupportingPaneScaffold`). */
10
+ export type PaneScaffoldVariant = 'list-detail' | 'supporting';
11
+ interface PaneScaffoldCommonProps extends LayoutElementProps {
12
+ children?: ReactNode;
13
+ }
14
+ export interface PaneScaffoldListDetailProps extends PaneScaffoldCommonProps {
15
+ /** List and detail. Panes `list`, `detail` and, optionally, `extra`. Defaults to `list-detail`. */
16
+ variant?: 'list-detail' | undefined;
17
+ /**
18
+ * The pane the user is looking at: the only one shown when the scaffold fits one pane, and one of
19
+ * those shown when it fits more (Compose's current destination). Defaults to `list` (Compose
20
+ * starts on the list). Not `current`, which in matekit names the current navigation destination.
21
+ */
22
+ pane?: ListDetailPaneName | undefined;
23
+ }
24
+ export interface PaneScaffoldSupportingProps extends PaneScaffoldCommonProps {
25
+ /** Content with a supporting pane. Panes `main`, `supporting` and, optionally, `extra`. */
26
+ variant: 'supporting';
27
+ /** The pane the user is looking at (see the list-detail `pane`). Defaults to `main`. */
28
+ pane?: SupportingPaneName | undefined;
29
+ }
30
+ export type PaneScaffoldProps = PaneScaffoldListDetailProps | PaneScaffoldSupportingProps;
31
+ /**
32
+ * Material 3 pane layout, list-detail or content with a supporting pane, showing one, two or three
33
+ * panes like Compose's `ListDetailPaneScaffold` and `SupportingPaneScaffold`. It counts panes by
34
+ * **its own width, not the window's** (unlike `NavigationSuite`, which follows the window): inside a
35
+ * layout with its own sidebar, a 900 px window can show the rail and a single pane.
36
+ *
37
+ * ```tsx
38
+ * const pane = selected ? 'detail' : 'list'
39
+ * const main = (name: ListDetailPaneName) => (pane === name ? 'main' : undefined)
40
+ *
41
+ * <PaneScaffold pane={pane}>
42
+ * <NavigationSuite aria-label="Main">…</NavigationSuite>
43
+ * <Pane name="list" render={<section aria-label="Inbox" />} role={main('list')}>
44
+ * <TopAppBar><TopAppBarTitle>Inbox</TopAppBarTitle></TopAppBar>
45
+ * <List>…</List>
46
+ * </Pane>
47
+ * <Pane name="detail" render={<section aria-labelledby="subject" />} role={main('detail')}>
48
+ * <TopAppBar><TopAppBarTitle id="subject">…</TopAppBarTitle></TopAppBar>
49
+ * …
50
+ * </Pane>
51
+ * </PaneScaffold>
52
+ * ```
53
+ *
54
+ * - **How many panes:** by the width **of the scaffold** (rail included), with the window size class
55
+ * breakpoints: 1 below 840 px (`WINDOW_WIDTH.expanded`), 2 from 840 and 3 from 1200
56
+ * (`WINDOW_WIDTH.large`). Full screen, that is Compose's rule; inside a narrower layout (an app
57
+ * sidebar), it counts the room it really has. They are container queries: no JavaScript, also from
58
+ * a Server Component. The root has `container-type: inline-size`: in a context that sizes to its
59
+ * content (a flex item without a width), give it a width. Whatever the app shows depending on the
60
+ * number of panes (a back button only needed with one) uses the same container:
61
+ * `@container mk-pane-scaffold (width >= 52.5rem) { … }`.
62
+ * - **Which:** with one, the `pane`. With more, the `pane` and the higher-priority ones (Compose: the
63
+ * detail or the main pane, then the list or the supporting one, then the extra), from start to end:
64
+ * list, detail, extra; or main, supporting, extra. The rest stay mounted and hidden (also from
65
+ * accessibility): their state and scroll position are kept. Only the panes that exist take room: a
66
+ * scaffold with a single `Pane` (a screen with no supporting content) fills the width at any size,
67
+ * and the detail or main pane with the extra one and no list or supporting pane shows those two.
68
+ * - **Landmarks:** give each pane a named `<section>` with `render` and add `role="main"` to the one
69
+ * that is the `pane`, as in the example: there is always exactly one visible `main` (on a phone,
70
+ * whichever pane is on screen), and the `NavigationSuite`, a `<nav>`, stays outside it. Change the
71
+ * `role`, not the `render` element: a different element would mount the pane again and lose its
72
+ * state and scroll position. A fixed `render={<main />}` on the detail leaves a phone showing the
73
+ * list with no visible `main`. A pane that is always the only one (a single-pane screen) can be a
74
+ * `<main>`.
75
+ * - **Widths:** the secondary pane is 360 (412 from 1200), the detail or main pane takes the rest, 24
76
+ * between panes; if they do not fit, all shrink equally (Compose's split).
77
+ * - **Look (kit):** `surface` background. From a scaffold width of 600, panes with a surface (all but
78
+ * the list, or what `surface` says) are `surface-container-lowest` with a 28 top radius, 24 below
79
+ * the top edge and down to the bottom one, 24 at the start (0 next to the rail) and 16 at the end.
80
+ * Narrower (a phone, or a scaffold in little room), panes touch the edges, with no surface.
81
+ * - **Scrolling:** each pane scrolls on its own; a `TopAppBar` as first child sticks and collapses
82
+ * inside its pane (ADR-0024).
83
+ * - **Navigation:** a `NavigationSuite` child places itself: the rail at the start (panes stick to it)
84
+ * and the bar at the bottom, full width. Rail or bar is still decided by the window (ADR-0029).
85
+ * - **Height:** the window's (`100dvh`); inside another layout, set it with `style` or a class.
86
+ * - **Safe areas** (`env(safe-area-inset-*)`, with `viewport-fit=cover`): above the panes, on the sides
87
+ * and at the bottom (inside the pane, so it scrolls to the end), except where the `NavigationSuite`
88
+ * already takes them.
89
+ *
90
+ * Native props, `ref` and `render` (for example `render={<div role="presentation" />}`) reach the root
91
+ * `<div>`.
92
+ */
93
+ export declare function PaneScaffold({ variant, pane, className, style, children, ...props }: PaneScaffoldProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
94
+ export interface PaneProps extends LayoutElementProps {
95
+ /**
96
+ * Which pane it is: `list`, `detail` or `extra` in list-detail; `main`, `supporting` or `extra` in
97
+ * supporting. It decides its place, its priority and its width.
98
+ */
99
+ name: PaneName;
100
+ /**
101
+ * Whether it has its own surface (`surface-container-lowest`, radius 28) from a width of 600.
102
+ * Defaults to `true` for every pane except `list`, which sits on the background as in the kit (its
103
+ * items bring their own background). In a compact window no pane has one.
104
+ */
105
+ surface?: boolean | undefined;
106
+ children?: ReactNode;
107
+ }
108
+ /**
109
+ * A pane of the `PaneScaffold`: a `<div>` that scrolls on its own (or the `render` element, usually a
110
+ * named `<section aria-label="…" />`, with `role="main"` while it is the scaffold's `pane`: see
111
+ * Landmarks in `PaneScaffold`). It goes as a direct child of the scaffold, in start-to-end order
112
+ * (list, detail, extra), which is also the reading and Tab order.
113
+ *
114
+ * Its first child can be a `TopAppBar`: it sticks to the top of the pane and collapses as the pane
115
+ * scrolls. Native props, `ref` and `render` reach the element.
116
+ */
117
+ export declare function Pane({ name, surface, className, style, children, ...props }: PaneProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
118
+ export {};
@@ -0,0 +1,132 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // Organismo universal (ADR-0003): sin estado, efectos, contexto ni eventos; no lleva 'use client'.
3
+ // Paneles de lista y detalle y de contenido con panel de apoyo, como ListDetailPaneScaffold y
4
+ // SupportingPaneScaffold de Compose (docs/research/11-disposicion-adaptable-compose.md § 2). API y
5
+ // motivos: ADR-0030.
6
+ //
7
+ // Todo lo que cambia con el ancho es CSS (pane-scaffold.css): cuántos paneles se ven, cuáles, su
8
+ // ancho, su superficie y los márgenes salen del ancho del propio scaffold (container queries sobre la
9
+ // raíz, con los cortes de ventana de Compose); la ubicación del NavigationSuite (rail o barra) sigue
10
+ // a la ventana, como la suite. Las zonas seguras también son CSS. El componente solo escribe el caso y el
11
+ // panel de `pane` en atributos (`data-variant`, `data-current`) y el nombre de cada panel
12
+ // (`data-pane`); así el HTML del servidor ya es el correcto y no hay salto al hidratar.
13
+ //
14
+ // Los paneles ocultos quedan montados (`visibility: hidden`): su estado de React y lo desplazado
15
+ // sobreviven al cambiar de ventana o de panel actual (comprobado en los tres motores, ADR-0030).
16
+ import { Children, Fragment, isValidElement } from 'react';
17
+ import { isDevelopment } from '../../internal/dev.js';
18
+ import { mkWarn } from '../../internal/diagnostics.js';
19
+ import { cx } from '../../internal/interactive.js';
20
+ import { layoutElement } from '../../internal/layout-element.js';
21
+ const PANES = {
22
+ 'list-detail': ['list', 'detail', 'extra'],
23
+ supporting: ['main', 'supporting', 'extra'],
24
+ };
25
+ /**
26
+ * Material 3 pane layout, list-detail or content with a supporting pane, showing one, two or three
27
+ * panes like Compose's `ListDetailPaneScaffold` and `SupportingPaneScaffold`. It counts panes by
28
+ * **its own width, not the window's** (unlike `NavigationSuite`, which follows the window): inside a
29
+ * layout with its own sidebar, a 900 px window can show the rail and a single pane.
30
+ *
31
+ * ```tsx
32
+ * const pane = selected ? 'detail' : 'list'
33
+ * const main = (name: ListDetailPaneName) => (pane === name ? 'main' : undefined)
34
+ *
35
+ * <PaneScaffold pane={pane}>
36
+ * <NavigationSuite aria-label="Main">…</NavigationSuite>
37
+ * <Pane name="list" render={<section aria-label="Inbox" />} role={main('list')}>
38
+ * <TopAppBar><TopAppBarTitle>Inbox</TopAppBarTitle></TopAppBar>
39
+ * <List>…</List>
40
+ * </Pane>
41
+ * <Pane name="detail" render={<section aria-labelledby="subject" />} role={main('detail')}>
42
+ * <TopAppBar><TopAppBarTitle id="subject">…</TopAppBarTitle></TopAppBar>
43
+ * …
44
+ * </Pane>
45
+ * </PaneScaffold>
46
+ * ```
47
+ *
48
+ * - **How many panes:** by the width **of the scaffold** (rail included), with the window size class
49
+ * breakpoints: 1 below 840 px (`WINDOW_WIDTH.expanded`), 2 from 840 and 3 from 1200
50
+ * (`WINDOW_WIDTH.large`). Full screen, that is Compose's rule; inside a narrower layout (an app
51
+ * sidebar), it counts the room it really has. They are container queries: no JavaScript, also from
52
+ * a Server Component. The root has `container-type: inline-size`: in a context that sizes to its
53
+ * content (a flex item without a width), give it a width. Whatever the app shows depending on the
54
+ * number of panes (a back button only needed with one) uses the same container:
55
+ * `@container mk-pane-scaffold (width >= 52.5rem) { … }`.
56
+ * - **Which:** with one, the `pane`. With more, the `pane` and the higher-priority ones (Compose: the
57
+ * detail or the main pane, then the list or the supporting one, then the extra), from start to end:
58
+ * list, detail, extra; or main, supporting, extra. The rest stay mounted and hidden (also from
59
+ * accessibility): their state and scroll position are kept. Only the panes that exist take room: a
60
+ * scaffold with a single `Pane` (a screen with no supporting content) fills the width at any size,
61
+ * and the detail or main pane with the extra one and no list or supporting pane shows those two.
62
+ * - **Landmarks:** give each pane a named `<section>` with `render` and add `role="main"` to the one
63
+ * that is the `pane`, as in the example: there is always exactly one visible `main` (on a phone,
64
+ * whichever pane is on screen), and the `NavigationSuite`, a `<nav>`, stays outside it. Change the
65
+ * `role`, not the `render` element: a different element would mount the pane again and lose its
66
+ * state and scroll position. A fixed `render={<main />}` on the detail leaves a phone showing the
67
+ * list with no visible `main`. A pane that is always the only one (a single-pane screen) can be a
68
+ * `<main>`.
69
+ * - **Widths:** the secondary pane is 360 (412 from 1200), the detail or main pane takes the rest, 24
70
+ * between panes; if they do not fit, all shrink equally (Compose's split).
71
+ * - **Look (kit):** `surface` background. From a scaffold width of 600, panes with a surface (all but
72
+ * the list, or what `surface` says) are `surface-container-lowest` with a 28 top radius, 24 below
73
+ * the top edge and down to the bottom one, 24 at the start (0 next to the rail) and 16 at the end.
74
+ * Narrower (a phone, or a scaffold in little room), panes touch the edges, with no surface.
75
+ * - **Scrolling:** each pane scrolls on its own; a `TopAppBar` as first child sticks and collapses
76
+ * inside its pane (ADR-0024).
77
+ * - **Navigation:** a `NavigationSuite` child places itself: the rail at the start (panes stick to it)
78
+ * and the bar at the bottom, full width. Rail or bar is still decided by the window (ADR-0029).
79
+ * - **Height:** the window's (`100dvh`); inside another layout, set it with `style` or a class.
80
+ * - **Safe areas** (`env(safe-area-inset-*)`, with `viewport-fit=cover`): above the panes, on the sides
81
+ * and at the bottom (inside the pane, so it scrolls to the end), except where the `NavigationSuite`
82
+ * already takes them.
83
+ *
84
+ * Native props, `ref` and `render` (for example `render={<div role="presentation" />}`) reach the root
85
+ * `<div>`.
86
+ */
87
+ export function PaneScaffold({ variant = 'list-detail', pane, className, style, children, ...props }) {
88
+ const shown = pane ?? (variant === 'supporting' ? 'main' : 'list');
89
+ if (isDevelopment())
90
+ warnPanesNotInVariant(variant, children);
91
+ return layoutElement('PaneScaffold', cx('mk-pane-scaffold', className), style, { ...props, 'data-variant': variant, 'data-current': shown }, _jsx("div", { className: "mk-pane-scaffold-grid", children: children }));
92
+ }
93
+ /**
94
+ * A pane of the `PaneScaffold`: a `<div>` that scrolls on its own (or the `render` element, usually a
95
+ * named `<section aria-label="…" />`, with `role="main"` while it is the scaffold's `pane`: see
96
+ * Landmarks in `PaneScaffold`). It goes as a direct child of the scaffold, in start-to-end order
97
+ * (list, detail, extra), which is also the reading and Tab order.
98
+ *
99
+ * Its first child can be a `TopAppBar`: it sticks to the top of the pane and collapses as the pane
100
+ * scrolls. Native props, `ref` and `render` reach the element.
101
+ */
102
+ export function Pane({ name, surface = name !== 'list', className, style, children, ...props }) {
103
+ return layoutElement('Pane', cx('mk-pane', className), style, { ...props, 'data-pane': name, 'data-surface': surface ? '' : undefined }, children);
104
+ }
105
+ // Los `Pane` entre los hijos: directos, en arrays y en fragmentos.
106
+ function panesIn(children) {
107
+ const names = [];
108
+ for (const child of Children.toArray(children)) {
109
+ if (!isValidElement(child))
110
+ continue;
111
+ if (child.type === Pane && child.props.name)
112
+ names.push(child.props.name);
113
+ else if (child.type === Fragment)
114
+ names.push(...panesIn(child.props.children));
115
+ }
116
+ return names;
117
+ }
118
+ // En desarrollo, avisa una vez si un `Pane` tiene un nombre de otro caso (`main` en lista y detalle):
119
+ // nunca se mostraría. Mira los hijos directos, en arrays y en fragmentos; no ve los paneles que
120
+ // dibuja otro componente.
121
+ function warnPanesNotInVariant(variant, children) {
122
+ const valid = PANES[variant];
123
+ for (const name of panesIn(children)) {
124
+ if (valid.includes(name))
125
+ continue;
126
+ mkWarn('MK_PANE_NOT_IN_VARIANT', {
127
+ component: 'PaneScaffold',
128
+ problem: `has a <Pane name="${name}">, which is not a pane of variant="${variant}" and is never shown`,
129
+ fix: `use one of ${valid.map((n) => `"${n}"`).join(', ')}, or set variant="${variant === 'list-detail' ? 'supporting' : 'list-detail'}"`,
130
+ }, { name, variant, valid });
131
+ }
132
+ }
@@ -0,0 +1,213 @@
1
+ import { type ChangeEvent, type HTMLAttributes, type InputHTMLAttributes, type KeyboardEvent, type LiHTMLAttributes, type MouseEvent, type ReactNode, type Ref } from 'react';
2
+ import { type ListItemProps } from '../List/List.tsx';
3
+ import type { AccessibleNameProps } from '../../internal/accessible-name.ts';
4
+ /** How the suggestions are shown: below the bar (`docked`) or in a modal view that fills the screen. */
5
+ export type SearchViewMode = 'docked' | 'full-screen';
6
+ /**
7
+ * Which view the search uses. `auto` (the default) chooses by the window size: full screen in a
8
+ * compact window (under 600 px wide, `WINDOW_WIDTH.medium`, or under 480 px tall,
9
+ * `WINDOW_HEIGHT.medium`, like a phone in landscape, where the on-screen keyboard leaves no room for a
10
+ * list below the bar) and docked otherwise; the same rule as `Dialog view="auto"` and `NavigationSuite`.
11
+ */
12
+ export type SearchViewChoice = 'auto' | SearchViewMode;
13
+ /**
14
+ * The event behind a text change (`onValueChange`): typing (`change`), Escape that clears the text or
15
+ * Enter on a suggestion (`keydown`), the clear button or a click on a suggestion (`click`).
16
+ */
17
+ export type SearchChangeEvent = ChangeEvent<HTMLInputElement> | KeyboardEvent<HTMLInputElement> | MouseEvent<HTMLElement>;
18
+ export interface SearchProps extends Omit<HTMLAttributes<HTMLElement>, 'onSubmit' | 'onSelect' | 'defaultValue'> {
19
+ /** The search text, controlled. With `onValueChange`. */
20
+ value?: string | undefined;
21
+ /** The initial text when uncontrolled. */
22
+ defaultValue?: string | undefined;
23
+ /**
24
+ * The text changed, with the event as second argument like `RadioGroup`, `Slider` or `Tabs`
25
+ * (`SearchChangeEvent`): typing, clearing (the button or Escape) or choosing a suggestion (its text).
26
+ */
27
+ onValueChange?: ((value: string, event: SearchChangeEvent) => void) | undefined;
28
+ /**
29
+ * Enter with no active suggestion: search for the text. If the bar is inside a `<form>`, the form
30
+ * is submitted afterwards (like Enter in a native field).
31
+ */
32
+ onSubmit?: ((value: string) => void) | undefined;
33
+ /** A suggestion was chosen (Enter on the active one, or a click): receives its `value`. */
34
+ onSelect?: ((value: string) => void) | undefined;
35
+ /** The suggestions view (`auto` chooses by the window width). Defaults to `auto`. */
36
+ view?: SearchViewChoice | undefined;
37
+ /** Ref to the `<search>`. For the input, use `ref` on `SearchBar`. */
38
+ ref?: Ref<HTMLElement> | undefined;
39
+ }
40
+ /**
41
+ * Material 3 Expressive search: the root, a `<search>` (the page's search region) that shares the
42
+ * state between the bar and the suggestions. It goes with a `SearchBar` and, if there are
43
+ * suggestions, a `SearchView`.
44
+ *
45
+ * The app provides the suggestions: they are not filtered inside (local filtering or a remote
46
+ * search is up to the app, with the text from `value`/`onValueChange`).
47
+ *
48
+ * ```tsx
49
+ * const [q, setQ] = useState('')
50
+ * const results = FRUITS.filter((f) => matches(f, q))
51
+ * <Search value={q} onValueChange={setQ} onSubmit={search} onSelect={open}>
52
+ * <SearchBar label="Search fruits" placeholder="Search fruits">
53
+ * <SearchBarLeading><SearchIcon /></SearchBarLeading>
54
+ * </SearchBar>
55
+ * <SearchView loading={loading}>
56
+ * {results.map((f) => <SearchSuggestion key={f.id} value={f.name} />)}
57
+ * </SearchView>
58
+ * </Search>
59
+ * ```
60
+ *
61
+ * Keyboard (APG combobox): arrows move the active suggestion (wrapping), Enter chooses the active
62
+ * one or searches, Escape closes the suggestions and, when closed, clears the text; Alt+Down Arrow
63
+ * opens them.
64
+ *
65
+ * It is a block that takes its container's width, up to 720 px (Compose `SearchBarMaxWidth`).
66
+ * Inside a `TopAppBar` (as a direct child) it takes the title's place.
67
+ */
68
+ export declare function Search({ value: valueProp, defaultValue, onValueChange, onSubmit, onSelect, view, className, children, ref, onPointerDown, onKeyDown, onFocus, ...rest }: SearchProps): import("react").JSX.Element;
69
+ /** Input props the bar does not let you change (the search manages them). */
70
+ type ManagedInputProps = 'type' | 'value' | 'defaultValue' | 'children' | 'aria-label' | 'aria-labelledby' | 'role';
71
+ export type SearchBarProps = Omit<InputHTMLAttributes<HTMLInputElement>, ManagedInputProps> & AccessibleNameProps & {
72
+ /** Name of the clear button, shown while there is text. Defaults to "Clear search". */
73
+ clearLabel?: string | undefined;
74
+ /**
75
+ * The parts: `SearchBarLeading` and `SearchBarTrailing`, as direct children (or inside a fragment). In
76
+ * the DOM they go in the order they are seen (start, input, clear button, end), whatever order they
77
+ * are written in, so Tab reaches the field before a button at the end.
78
+ */
79
+ children?: ReactNode;
80
+ /** Ref to the `<input>`. */
81
+ ref?: Ref<HTMLInputElement> | undefined;
82
+ };
83
+ /**
84
+ * The search bar: a 56 pill (kit) with the `<input type="search">`, the start and end parts
85
+ * (`SearchBarLeading`, `SearchBarTrailing`) and a clear button while there is text.
86
+ *
87
+ * The accessible name is required (`label`, `aria-labelledby` or `aria-label`): the hint text
88
+ * (`placeholder`) is not a name. Native props (`name`, `placeholder`, `disabled`, `autoFocus`,
89
+ * `onFocus`…) and `ref` go to the `<input>`; `className` and `style`, to the pill. With a
90
+ * `SearchView` in the same `Search`, the input is a `combobox` (APG); without one, a plain search
91
+ * field.
92
+ *
93
+ * Inside a `<form>`, Enter submits the form (with `name`, the text is sent like any other field).
94
+ */
95
+ export declare function SearchBar({ label, 'aria-label': ariaLabel, 'aria-labelledby': labelledBy, placeholder, clearLabel, className, style, children, ref, onChange, onKeyDown, onClick, onBlur, autoComplete, ...inputProps }: SearchBarProps): import("react").JSX.Element;
96
+ export interface SearchViewProps extends HTMLAttributes<HTMLUListElement> {
97
+ /** Searching: a progress bar above the list and `loadingLabel` in the live region. */
98
+ loading?: boolean | undefined;
99
+ /** The loading text (the progress bar's name and the announcement). Defaults to "Searching…". */
100
+ loadingLabel?: string | undefined;
101
+ /** The text shown when typed text has no suggestions. Defaults to "No results". */
102
+ emptyLabel?: string | undefined;
103
+ /** Announcement of the number of suggestions. Defaults to "1 suggestion" / "N suggestions". */
104
+ formatCount?: ((count: number) => string) | undefined;
105
+ /** Name of the button that closes the full-screen view. Defaults to "Close search". */
106
+ closeLabel?: string | undefined;
107
+ /** Announcement when a suggestion is removed with Delete. Defaults to "Removed …" with its text. */
108
+ formatRemoved?: ((text: string) => string) | undefined;
109
+ /** Description of suggestions that can be removed (`onRemove`). Defaults to "Press Delete to remove". */
110
+ removeHint?: string | undefined;
111
+ /** Ref to the `<ul role="listbox">`. */
112
+ ref?: Ref<HTMLUListElement> | undefined;
113
+ }
114
+ /**
115
+ * The search suggestions: a `listbox` with `SearchSuggestion` and `SearchSuggestionGroup` as
116
+ * children. Native props and `ref` go to the `<ul role="listbox">`; `className` and `style`, to the
117
+ * layer that contains it.
118
+ *
119
+ * - **Docked** (medium or wider windows that are at least 480 px tall, or `view="docked"`): a top-layer popover anchored below
120
+ * the bar, 2 px apart, as wide as the bar, Surface Container High with a 12 radius (kit). It opens
121
+ * on typing, on a click in the bar or with the arrows, and closes with Escape, on choosing, on
122
+ * searching or when focus leaves the search.
123
+ * - **Full screen** (compact windows, narrow or short, or `view="full-screen"`): a modal `<dialog>` with its own bar
124
+ * (back, the field and clear) and the list below; focus is trapped, Escape and the back button
125
+ * close it, and focus returns to the bar.
126
+ *
127
+ * With text and no suggestions (and not loading), it shows `emptyLabel`. The count is announced in
128
+ * a polite live region half a second after the last change.
129
+ */
130
+ export declare function SearchView({ loading, loadingLabel, emptyLabel, formatCount, closeLabel, formatRemoved, removeHint, className, style, children, ref, ...listboxProps }: SearchViewProps): import("react").JSX.Element;
131
+ export interface SearchSuggestionProps extends Omit<ListItemProps, 'value' | 'role'> {
132
+ /** What `onSelect` receives when it is chosen. */
133
+ value: string;
134
+ /** The text that goes into the bar when it is chosen. Defaults to `value`. */
135
+ textValue?: string | undefined;
136
+ /** It cannot be chosen; the arrows skip it (`aria-disabled`). */
137
+ disabled?: boolean | undefined;
138
+ /**
139
+ * Removal was requested (Delete with the suggestion active): receives its `value`. The search
140
+ * stores nothing: the app takes it out of its list (and wherever it keeps it). Without
141
+ * `onRemove`, it cannot be removed.
142
+ */
143
+ onRemove?: ((value: string) => void) | undefined;
144
+ }
145
+ /**
146
+ * A suggestion: a `listbox` option (`<li role="option">`) that looks like a list item (`ListItem`,
147
+ * ADR-0018): its parts `ListItemLeading`, `ListItemHeadline`, `ListItemSupporting` and
148
+ * `ListItemTrailing` go as children. Without children (or with only text), it shows the text as a
149
+ * `ListItemHeadline`.
150
+ *
151
+ * It does not take focus: the arrows mark the active one with `aria-activedescendant` and
152
+ * `aria-selected`, and it is chosen with Enter or a click. No controls inside (an option cannot
153
+ * contain interactive elements).
154
+ *
155
+ * Removing (for example, recent searches): with `onRemove`, Delete on the active one requests it,
156
+ * `formatRemoved` ("Removed …") is announced and the active one moves to the next when the app
157
+ * removes it. The search notifies; the app stores and deletes (like `InputChip`'s `onRemove`). There
158
+ * is no button in the option for the pointer: the app offers a separate action such as "Clear
159
+ * history".
160
+ *
161
+ * ```tsx
162
+ * const { recent, add, remove } = useRecentSearches('searches') // the app's (localStorage, for example)
163
+ * <Search onSubmit={add} onSelect={add} …>
164
+ * <SearchBar label="Search" />
165
+ * <SearchView>
166
+ * {recent.map((r) => <SearchSuggestion key={r} value={r} onRemove={remove} />)}
167
+ * </SearchView>
168
+ * </Search>
169
+ * ```
170
+ *
171
+ * ```tsx
172
+ * <SearchSuggestion value="mate cocido" />
173
+ * <SearchSuggestion value="p-17" textValue="Yerba">
174
+ * <ListItemLeading><HistoryIcon /></ListItemLeading>
175
+ * <ListItemHeadline>Yerba</ListItemHeadline>
176
+ * <ListItemSupporting>Grocery</ListItemSupporting>
177
+ * </SearchSuggestion>
178
+ * ```
179
+ */
180
+ export declare function SearchSuggestion({ value, textValue, disabled, onRemove, id, className, children, onClick, 'aria-describedby': describedBy, ...rest }: SearchSuggestionProps): import("react").JSX.Element;
181
+ export interface SearchSuggestionGroupProps extends HTMLAttributes<HTMLUListElement> {
182
+ /** Ref to the `<ul role="group">`. */
183
+ ref?: Ref<HTMLUListElement> | undefined;
184
+ }
185
+ /**
186
+ * A named group of suggestions: for example recent searches and suggested ones. Its children are a
187
+ * `SearchSuggestionGroupLabel` and the `SearchSuggestion`s. It is a `<ul role="group">` named by its
188
+ * label (APG's grouped listbox pattern), inside an `<li role="none">` (an `<li>` does not allow the
189
+ * `group` role). Native props and `ref` go to the `<ul>`; an `aria-labelledby` of your own wins.
190
+ *
191
+ * ```tsx
192
+ * <SearchSuggestionGroup>
193
+ * <SearchSuggestionGroupLabel>Recent</SearchSuggestionGroupLabel>
194
+ * {recent.map((r) => <SearchSuggestion key={r} value={r} />)}
195
+ * </SearchSuggestionGroup>
196
+ * ```
197
+ */
198
+ export declare function SearchSuggestionGroup({ className, ...rest }: SearchSuggestionGroupProps): import("react").JSX.Element;
199
+ export interface SearchSuggestionGroupLabelProps extends LiHTMLAttributes<HTMLLIElement> {
200
+ /** Ref to the label element (an `<li role="presentation">`). */
201
+ ref?: Ref<HTMLLIElement> | undefined;
202
+ }
203
+ /**
204
+ * The visible name of a `SearchSuggestionGroup` (for example "Recent"), styled as a list subheader
205
+ * (Title Small, `on-surface-variant`). It names the group (`aria-labelledby`), without passing ids.
206
+ * It is not a suggestion: the arrows skip it.
207
+ *
208
+ * ```tsx
209
+ * <SearchSuggestionGroup><SearchSuggestionGroupLabel>Recent</SearchSuggestionGroupLabel>…</SearchSuggestionGroup>
210
+ * ```
211
+ */
212
+ export declare function SearchSuggestionGroupLabel({ className, ...props }: SearchSuggestionGroupLabelProps): import("react").JSX.Element;
213
+ export {};