@windmorph/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 (761) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +23 -0
  3. package/README.md +149 -2
  4. package/dist/cli.d.ts +1 -0
  5. package/dist/cli.js +112 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/components/app-bar/AppBarItems.js +23 -0
  8. package/dist/components/app-bar/AppBarItems.js.map +1 -0
  9. package/dist/components/app-bar/TopAppBar.d.ts +89 -0
  10. package/dist/components/app-bar/TopAppBar.js +103 -0
  11. package/dist/components/app-bar/TopAppBar.js.map +1 -0
  12. package/dist/components/app-bar/app-bar-styles.d.ts +280 -0
  13. package/dist/components/app-bar/app-bar-styles.js +142 -0
  14. package/dist/components/app-bar/app-bar-styles.js.map +1 -0
  15. package/dist/components/app-bar/app-bar-tokens.d.ts +7 -0
  16. package/dist/components/app-bar/app-bar-tokens.js +64 -0
  17. package/dist/components/app-bar/app-bar-tokens.js.map +1 -0
  18. package/dist/components/app-bar/use-app-bar-scroll.d.ts +6 -0
  19. package/dist/components/app-bar/use-app-bar-scroll.js +139 -0
  20. package/dist/components/app-bar/use-app-bar-scroll.js.map +1 -0
  21. package/dist/components/autocomplete/Autocomplete.d.ts +142 -0
  22. package/dist/components/autocomplete/Autocomplete.js +284 -0
  23. package/dist/components/autocomplete/Autocomplete.js.map +1 -0
  24. package/dist/components/badge/Badge.d.ts +71 -0
  25. package/dist/components/badge/Badge.js +72 -0
  26. package/dist/components/badge/Badge.js.map +1 -0
  27. package/dist/components/badge/badge-styles.d.ts +100 -0
  28. package/dist/components/badge/badge-styles.js +43 -0
  29. package/dist/components/badge/badge-styles.js.map +1 -0
  30. package/dist/components/badge/badge-tokens.d.ts +7 -0
  31. package/dist/components/badge/badge-tokens.js +40 -0
  32. package/dist/components/badge/badge-tokens.js.map +1 -0
  33. package/dist/components/button/Button.d.ts +91 -0
  34. package/dist/components/button/Button.js +96 -0
  35. package/dist/components/button/Button.js.map +1 -0
  36. package/dist/components/button/ButtonContext.d.ts +30 -0
  37. package/dist/components/button/ButtonContext.js +18 -0
  38. package/dist/components/button/ButtonContext.js.map +1 -0
  39. package/dist/components/button/DensityZeroButtons.js +25 -0
  40. package/dist/components/button/DensityZeroButtons.js.map +1 -0
  41. package/dist/components/button/button-pending.d.ts +10 -0
  42. package/dist/components/button/button-pending.js +166 -0
  43. package/dist/components/button/button-pending.js.map +1 -0
  44. package/dist/components/button/button-styles.d.ts +216 -0
  45. package/dist/components/button/button-styles.js +199 -0
  46. package/dist/components/button/button-styles.js.map +1 -0
  47. package/dist/components/button/button-tokens.d.ts +10 -0
  48. package/dist/components/button/button-tokens.js +257 -0
  49. package/dist/components/button/button-tokens.js.map +1 -0
  50. package/dist/components/button/connected-shapes.js +152 -0
  51. package/dist/components/button/connected-shapes.js.map +1 -0
  52. package/dist/components/card/Card.d.ts +60 -0
  53. package/dist/components/card/Card.js +69 -0
  54. package/dist/components/card/Card.js.map +1 -0
  55. package/dist/components/card/card-styles.d.ts +42 -0
  56. package/dist/components/card/card-styles.js +64 -0
  57. package/dist/components/card/card-styles.js.map +1 -0
  58. package/dist/components/card/card-tokens.d.ts +7 -0
  59. package/dist/components/card/card-tokens.js +84 -0
  60. package/dist/components/card/card-tokens.js.map +1 -0
  61. package/dist/components/carousel/Carousel.d.ts +124 -0
  62. package/dist/components/carousel/Carousel.js +387 -0
  63. package/dist/components/carousel/Carousel.js.map +1 -0
  64. package/dist/components/carousel/carousel-keylines.js +486 -0
  65. package/dist/components/carousel/carousel-keylines.js.map +1 -0
  66. package/dist/components/carousel/carousel-press-area.js +35 -0
  67. package/dist/components/carousel/carousel-press-area.js.map +1 -0
  68. package/dist/components/carousel/carousel-styles.d.ts +188 -0
  69. package/dist/components/carousel/carousel-styles.js +116 -0
  70. package/dist/components/carousel/carousel-styles.js.map +1 -0
  71. package/dist/components/carousel/carousel-tokens.d.ts +7 -0
  72. package/dist/components/carousel/carousel-tokens.js +18 -0
  73. package/dist/components/carousel/carousel-tokens.js.map +1 -0
  74. package/dist/components/checkbox/Checkbox.d.ts +78 -0
  75. package/dist/components/checkbox/Checkbox.js +77 -0
  76. package/dist/components/checkbox/Checkbox.js.map +1 -0
  77. package/dist/components/checkbox/checkbox-box.js +34 -0
  78. package/dist/components/checkbox/checkbox-box.js.map +1 -0
  79. package/dist/components/checkbox/checkbox-styles.d.ts +100 -0
  80. package/dist/components/checkbox/checkbox-styles.js +54 -0
  81. package/dist/components/checkbox/checkbox-styles.js.map +1 -0
  82. package/dist/components/checkbox/checkbox-tokens.d.ts +7 -0
  83. package/dist/components/checkbox/checkbox-tokens.js +41 -0
  84. package/dist/components/checkbox/checkbox-tokens.js.map +1 -0
  85. package/dist/components/chip/Chip.d.ts +171 -0
  86. package/dist/components/chip/Chip.js +348 -0
  87. package/dist/components/chip/Chip.js.map +1 -0
  88. package/dist/components/chip/ChipSet.d.ts +70 -0
  89. package/dist/components/chip/ChipSet.js +198 -0
  90. package/dist/components/chip/ChipSet.js.map +1 -0
  91. package/dist/components/chip/chip-styles.d.ts +263 -0
  92. package/dist/components/chip/chip-styles.js +360 -0
  93. package/dist/components/chip/chip-styles.js.map +1 -0
  94. package/dist/components/chip/chip-tokens.d.ts +13 -0
  95. package/dist/components/chip/chip-tokens.js +185 -0
  96. package/dist/components/chip/chip-tokens.js.map +1 -0
  97. package/dist/components/date-picker/CalendarGrid.js +94 -0
  98. package/dist/components/date-picker/CalendarGrid.js.map +1 -0
  99. package/dist/components/date-picker/CompactDateDialog.js +63 -0
  100. package/dist/components/date-picker/CompactDateDialog.js.map +1 -0
  101. package/dist/components/date-picker/DateField.d.ts +161 -0
  102. package/dist/components/date-picker/DateField.js +393 -0
  103. package/dist/components/date-picker/DateField.js.map +1 -0
  104. package/dist/components/date-picker/DateInput.d.ts +20 -0
  105. package/dist/components/date-picker/DateInput.js +99 -0
  106. package/dist/components/date-picker/DateInput.js.map +1 -0
  107. package/dist/components/date-picker/DatePicker.d.ts +165 -0
  108. package/dist/components/date-picker/DatePicker.js +492 -0
  109. package/dist/components/date-picker/DatePicker.js.map +1 -0
  110. package/dist/components/date-picker/PickerDialog.d.ts +121 -0
  111. package/dist/components/date-picker/PickerDialog.js +161 -0
  112. package/dist/components/date-picker/PickerDialog.js.map +1 -0
  113. package/dist/components/date-picker/calendar-parts.js +141 -0
  114. package/dist/components/date-picker/calendar-parts.js.map +1 -0
  115. package/dist/components/date-picker/date-format.js +72 -0
  116. package/dist/components/date-picker/date-format.js.map +1 -0
  117. package/dist/components/date-picker/date-picker-styles.d.ts +247 -0
  118. package/dist/components/date-picker/date-picker-styles.js +163 -0
  119. package/dist/components/date-picker/date-picker-styles.js.map +1 -0
  120. package/dist/components/date-picker/date-picker-tokens.d.ts +7 -0
  121. package/dist/components/date-picker/date-picker-tokens.js +104 -0
  122. package/dist/components/date-picker/date-picker-tokens.js.map +1 -0
  123. package/dist/components/date-picker/picker-dialog-context.js +8 -0
  124. package/dist/components/date-picker/picker-dialog-context.js.map +1 -0
  125. package/dist/components/date-picker/picker-dialog-styles.d.ts +95 -0
  126. package/dist/components/date-picker/picker-dialog-styles.js +57 -0
  127. package/dist/components/date-picker/picker-dialog-styles.js.map +1 -0
  128. package/dist/components/date-picker/picker-icons.js +24 -0
  129. package/dist/components/date-picker/picker-icons.js.map +1 -0
  130. package/dist/components/date-picker/use-media-query.js +21 -0
  131. package/dist/components/date-picker/use-media-query.js.map +1 -0
  132. package/dist/components/date-picker/use-size-transform.js +62 -0
  133. package/dist/components/date-picker/use-size-transform.js.map +1 -0
  134. package/dist/components/date-picker/use-view-exit.js +68 -0
  135. package/dist/components/date-picker/use-view-exit.js.map +1 -0
  136. package/dist/components/dialog/Dialog.d.ts +267 -0
  137. package/dist/components/dialog/Dialog.js +521 -0
  138. package/dist/components/dialog/Dialog.js.map +1 -0
  139. package/dist/components/dialog/dialog-styles.d.ts +335 -0
  140. package/dist/components/dialog/dialog-styles.js +377 -0
  141. package/dist/components/dialog/dialog-styles.js.map +1 -0
  142. package/dist/components/dialog/dialog-tokens.d.ts +7 -0
  143. package/dist/components/dialog/dialog-tokens.js +57 -0
  144. package/dist/components/dialog/dialog-tokens.js.map +1 -0
  145. package/dist/components/divider/Divider.d.ts +59 -0
  146. package/dist/components/divider/Divider.js +53 -0
  147. package/dist/components/divider/Divider.js.map +1 -0
  148. package/dist/components/divider/divider-styles.d.ts +90 -0
  149. package/dist/components/divider/divider-styles.js +66 -0
  150. package/dist/components/divider/divider-styles.js.map +1 -0
  151. package/dist/components/divider/divider-tokens.d.ts +7 -0
  152. package/dist/components/divider/divider-tokens.js +16 -0
  153. package/dist/components/divider/divider-tokens.js.map +1 -0
  154. package/dist/components/fab/Fab.d.ts +130 -0
  155. package/dist/components/fab/Fab.js +137 -0
  156. package/dist/components/fab/Fab.js.map +1 -0
  157. package/dist/components/fab/FabTooltip.js +36 -0
  158. package/dist/components/fab/FabTooltip.js.map +1 -0
  159. package/dist/components/fab/fab-styles.d.ts +286 -0
  160. package/dist/components/fab/fab-styles.js +131 -0
  161. package/dist/components/fab/fab-styles.js.map +1 -0
  162. package/dist/components/fab/fab-tokens.d.ts +12 -0
  163. package/dist/components/fab/fab-tokens.js +105 -0
  164. package/dist/components/fab/fab-tokens.js.map +1 -0
  165. package/dist/components/fab-menu/FabMenu.d.ts +156 -0
  166. package/dist/components/fab-menu/FabMenu.js +291 -0
  167. package/dist/components/fab-menu/FabMenu.js.map +1 -0
  168. package/dist/components/fab-menu/fab-menu-stagger.js +51 -0
  169. package/dist/components/fab-menu/fab-menu-stagger.js.map +1 -0
  170. package/dist/components/fab-menu/fab-menu-styles.d.ts +166 -0
  171. package/dist/components/fab-menu/fab-menu-styles.js +107 -0
  172. package/dist/components/fab-menu/fab-menu-styles.js.map +1 -0
  173. package/dist/components/fab-menu/fab-menu-tokens.d.ts +7 -0
  174. package/dist/components/fab-menu/fab-menu-tokens.js +120 -0
  175. package/dist/components/fab-menu/fab-menu-tokens.js.map +1 -0
  176. package/dist/components/icon-button/IconButton.d.ts +125 -0
  177. package/dist/components/icon-button/IconButton.js +112 -0
  178. package/dist/components/icon-button/IconButton.js.map +1 -0
  179. package/dist/components/icon-button/icon-button-styles.d.ts +217 -0
  180. package/dist/components/icon-button/icon-button-styles.js +244 -0
  181. package/dist/components/icon-button/icon-button-styles.js.map +1 -0
  182. package/dist/components/icon-button/icon-button-tokens.d.ts +11 -0
  183. package/dist/components/icon-button/icon-button-tokens.js +215 -0
  184. package/dist/components/icon-button/icon-button-tokens.js.map +1 -0
  185. package/dist/components/list/List.d.ts +265 -0
  186. package/dist/components/list/List.js +1386 -0
  187. package/dist/components/list/List.js.map +1 -0
  188. package/dist/components/list/ListMedia.d.ts +88 -0
  189. package/dist/components/list/ListMedia.js +132 -0
  190. package/dist/components/list/ListMedia.js.map +1 -0
  191. package/dist/components/list/list-styles.d.ts +375 -0
  192. package/dist/components/list/list-styles.js +220 -0
  193. package/dist/components/list/list-styles.js.map +1 -0
  194. package/dist/components/list/list-tokens.d.ts +7 -0
  195. package/dist/components/list/list-tokens.js +92 -0
  196. package/dist/components/list/list-tokens.js.map +1 -0
  197. package/dist/components/loading-indicator/LoadingIndicator.d.ts +65 -0
  198. package/dist/components/loading-indicator/LoadingIndicator.js +92 -0
  199. package/dist/components/loading-indicator/LoadingIndicator.js.map +1 -0
  200. package/dist/components/loading-indicator/lazy-loading-indicator.js +25 -0
  201. package/dist/components/loading-indicator/lazy-loading-indicator.js.map +1 -0
  202. package/dist/components/loading-indicator/loading-indicator-frames.js +149 -0
  203. package/dist/components/loading-indicator/loading-indicator-frames.js.map +1 -0
  204. package/dist/components/loading-indicator/loading-indicator-styles.d.ts +36 -0
  205. package/dist/components/loading-indicator/loading-indicator-styles.js +22 -0
  206. package/dist/components/loading-indicator/loading-indicator-styles.js.map +1 -0
  207. package/dist/components/loading-indicator/loading-indicator-tokens.d.ts +7 -0
  208. package/dist/components/loading-indicator/loading-indicator-tokens.js +44 -0
  209. package/dist/components/loading-indicator/loading-indicator-tokens.js.map +1 -0
  210. package/dist/components/menu/Menu.d.ts +215 -0
  211. package/dist/components/menu/Menu.js +715 -0
  212. package/dist/components/menu/Menu.js.map +1 -0
  213. package/dist/components/menu/menu-styles.d.ts +354 -0
  214. package/dist/components/menu/menu-styles.js +219 -0
  215. package/dist/components/menu/menu-styles.js.map +1 -0
  216. package/dist/components/menu/menu-tokens.d.ts +7 -0
  217. package/dist/components/menu/menu-tokens.js +93 -0
  218. package/dist/components/menu/menu-tokens.js.map +1 -0
  219. package/dist/components/menu/menu-trigger.d.ts +51 -0
  220. package/dist/components/menu/menu-trigger.js +100 -0
  221. package/dist/components/menu/menu-trigger.js.map +1 -0
  222. package/dist/components/menu/use-reveal-entering.js +42 -0
  223. package/dist/components/menu/use-reveal-entering.js.map +1 -0
  224. package/dist/components/navigation/NavItem.d.ts +54 -0
  225. package/dist/components/navigation/NavItem.js +182 -0
  226. package/dist/components/navigation/NavItem.js.map +1 -0
  227. package/dist/components/navigation/NavigationBar.d.ts +64 -0
  228. package/dist/components/navigation/NavigationBar.js +121 -0
  229. package/dist/components/navigation/NavigationBar.js.map +1 -0
  230. package/dist/components/navigation/NavigationRail.d.ts +91 -0
  231. package/dist/components/navigation/NavigationRail.js +285 -0
  232. package/dist/components/navigation/NavigationRail.js.map +1 -0
  233. package/dist/components/navigation/nav-item-styles.d.ts +190 -0
  234. package/dist/components/navigation/nav-item-styles.js +123 -0
  235. package/dist/components/navigation/nav-item-styles.js.map +1 -0
  236. package/dist/components/navigation/navigation-styles.d.ts +239 -0
  237. package/dist/components/navigation/navigation-styles.js +134 -0
  238. package/dist/components/navigation/navigation-styles.js.map +1 -0
  239. package/dist/components/navigation/navigation-tokens.d.ts +9 -0
  240. package/dist/components/navigation/navigation-tokens.js +114 -0
  241. package/dist/components/navigation/navigation-tokens.js.map +1 -0
  242. package/dist/components/navigation/use-hide-on-scroll.js +115 -0
  243. package/dist/components/navigation/use-hide-on-scroll.js.map +1 -0
  244. package/dist/components/navigation/use-item-arrow-keys.js +37 -0
  245. package/dist/components/navigation/use-item-arrow-keys.js.map +1 -0
  246. package/dist/components/navigation/use-rail-item-morph.js +61 -0
  247. package/dist/components/navigation/use-rail-item-morph.js.map +1 -0
  248. package/dist/components/progress/ProgressIndicator.d.ts +95 -0
  249. package/dist/components/progress/ProgressIndicator.js +426 -0
  250. package/dist/components/progress/ProgressIndicator.js.map +1 -0
  251. package/dist/components/progress/progress-geometry.js +285 -0
  252. package/dist/components/progress/progress-geometry.js.map +1 -0
  253. package/dist/components/progress/progress-styles.d.ts +81 -0
  254. package/dist/components/progress/progress-styles.js +43 -0
  255. package/dist/components/progress/progress-styles.js.map +1 -0
  256. package/dist/components/progress/progress-tokens.d.ts +7 -0
  257. package/dist/components/progress/progress-tokens.js +39 -0
  258. package/dist/components/progress/progress-tokens.js.map +1 -0
  259. package/dist/components/pull-to-refresh/PullToRefresh.d.ts +94 -0
  260. package/dist/components/pull-to-refresh/PullToRefresh.js +395 -0
  261. package/dist/components/pull-to-refresh/PullToRefresh.js.map +1 -0
  262. package/dist/components/pull-to-refresh/pull-to-refresh-math.js +37 -0
  263. package/dist/components/pull-to-refresh/pull-to-refresh-math.js.map +1 -0
  264. package/dist/components/pull-to-refresh/pull-to-refresh-styles.d.ts +53 -0
  265. package/dist/components/pull-to-refresh/pull-to-refresh-styles.js +14 -0
  266. package/dist/components/pull-to-refresh/pull-to-refresh-styles.js.map +1 -0
  267. package/dist/components/radio/RadioGroup.d.ts +121 -0
  268. package/dist/components/radio/RadioGroup.js +163 -0
  269. package/dist/components/radio/RadioGroup.js.map +1 -0
  270. package/dist/components/radio/radio-ring.js +21 -0
  271. package/dist/components/radio/radio-ring.js.map +1 -0
  272. package/dist/components/radio/radio-styles.d.ts +155 -0
  273. package/dist/components/radio/radio-styles.js +60 -0
  274. package/dist/components/radio/radio-styles.js.map +1 -0
  275. package/dist/components/radio/radio-tokens.d.ts +7 -0
  276. package/dist/components/radio/radio-tokens.js +31 -0
  277. package/dist/components/radio/radio-tokens.js.map +1 -0
  278. package/dist/components/search/SearchAppBar.d.ts +45 -0
  279. package/dist/components/search/SearchAppBar.js +61 -0
  280. package/dist/components/search/SearchAppBar.js.map +1 -0
  281. package/dist/components/search/SearchBar.d.ts +147 -0
  282. package/dist/components/search/SearchBar.js +412 -0
  283. package/dist/components/search/SearchBar.js.map +1 -0
  284. package/dist/components/search/search-styles.d.ts +243 -0
  285. package/dist/components/search/search-styles.js +143 -0
  286. package/dist/components/search/search-styles.js.map +1 -0
  287. package/dist/components/search/search-tokens.d.ts +9 -0
  288. package/dist/components/search/search-tokens.js +70 -0
  289. package/dist/components/search/search-tokens.js.map +1 -0
  290. package/dist/components/select/Select.d.ts +187 -0
  291. package/dist/components/select/Select.js +319 -0
  292. package/dist/components/select/Select.js.map +1 -0
  293. package/dist/components/select/field-shell.d.ts +29 -0
  294. package/dist/components/select/field-shell.js +135 -0
  295. package/dist/components/select/field-shell.js.map +1 -0
  296. package/dist/components/select/option-list.d.ts +81 -0
  297. package/dist/components/select/option-list.js +291 -0
  298. package/dist/components/select/option-list.js.map +1 -0
  299. package/dist/components/select/search-list.js +135 -0
  300. package/dist/components/select/search-list.js.map +1 -0
  301. package/dist/components/select/selection-cap.js +30 -0
  302. package/dist/components/select/selection-cap.js.map +1 -0
  303. package/dist/components/sheet/BottomSheet.d.ts +154 -0
  304. package/dist/components/sheet/BottomSheet.js +442 -0
  305. package/dist/components/sheet/BottomSheet.js.map +1 -0
  306. package/dist/components/sheet/SheetTrigger.d.ts +25 -0
  307. package/dist/components/sheet/SheetTrigger.js +46 -0
  308. package/dist/components/sheet/SheetTrigger.js.map +1 -0
  309. package/dist/components/sheet/SideSheet.d.ts +139 -0
  310. package/dist/components/sheet/SideSheet.js +289 -0
  311. package/dist/components/sheet/SideSheet.js.map +1 -0
  312. package/dist/components/sheet/bottom-sheet-gesture.js +30 -0
  313. package/dist/components/sheet/bottom-sheet-gesture.js.map +1 -0
  314. package/dist/components/sheet/lazy-bottom-sheet.js +33 -0
  315. package/dist/components/sheet/lazy-bottom-sheet.js.map +1 -0
  316. package/dist/components/sheet/sheet-gesture.js +48 -0
  317. package/dist/components/sheet/sheet-gesture.js.map +1 -0
  318. package/dist/components/sheet/sheet-icons.js +31 -0
  319. package/dist/components/sheet/sheet-icons.js.map +1 -0
  320. package/dist/components/sheet/sheet-settle.js +58 -0
  321. package/dist/components/sheet/sheet-settle.js.map +1 -0
  322. package/dist/components/sheet/sheet-styles.d.ts +312 -0
  323. package/dist/components/sheet/sheet-styles.js +229 -0
  324. package/dist/components/sheet/sheet-styles.js.map +1 -0
  325. package/dist/components/sheet/sheet-tokens.d.ts +12 -0
  326. package/dist/components/sheet/sheet-tokens.js +115 -0
  327. package/dist/components/sheet/sheet-tokens.js.map +1 -0
  328. package/dist/components/sheet/side-swipe-gesture.js +22 -0
  329. package/dist/components/sheet/side-swipe-gesture.js.map +1 -0
  330. package/dist/components/sheet/use-peek-inert.js +32 -0
  331. package/dist/components/sheet/use-peek-inert.js.map +1 -0
  332. package/dist/components/sheet/use-side-swipe.js +174 -0
  333. package/dist/components/sheet/use-side-swipe.js.map +1 -0
  334. package/dist/components/slider/Slider.d.ts +129 -0
  335. package/dist/components/slider/Slider.js +295 -0
  336. package/dist/components/slider/Slider.js.map +1 -0
  337. package/dist/components/slider/slider-geometry.js +138 -0
  338. package/dist/components/slider/slider-geometry.js.map +1 -0
  339. package/dist/components/slider/slider-styles.d.ts +133 -0
  340. package/dist/components/slider/slider-styles.js +97 -0
  341. package/dist/components/slider/slider-styles.js.map +1 -0
  342. package/dist/components/slider/slider-tokens.d.ts +7 -0
  343. package/dist/components/slider/slider-tokens.js +66 -0
  344. package/dist/components/slider/slider-tokens.js.map +1 -0
  345. package/dist/components/slider/use-touch-track.js +138 -0
  346. package/dist/components/slider/use-touch-track.js.map +1 -0
  347. package/dist/components/snackbar/Snackbar.d.ts +96 -0
  348. package/dist/components/snackbar/Snackbar.js +253 -0
  349. package/dist/components/snackbar/Snackbar.js.map +1 -0
  350. package/dist/components/snackbar/snackbar-state.d.ts +58 -0
  351. package/dist/components/snackbar/snackbar-state.js +73 -0
  352. package/dist/components/snackbar/snackbar-state.js.map +1 -0
  353. package/dist/components/snackbar/snackbar-styles.d.ts +109 -0
  354. package/dist/components/snackbar/snackbar-styles.js +67 -0
  355. package/dist/components/snackbar/snackbar-styles.js.map +1 -0
  356. package/dist/components/snackbar/snackbar-tokens.d.ts +7 -0
  357. package/dist/components/snackbar/snackbar-tokens.js +54 -0
  358. package/dist/components/snackbar/snackbar-tokens.js.map +1 -0
  359. package/dist/components/split-button/SplitButton.d.ts +109 -0
  360. package/dist/components/split-button/SplitButton.js +195 -0
  361. package/dist/components/split-button/SplitButton.js.map +1 -0
  362. package/dist/components/split-button/split-button-styles.d.ts +214 -0
  363. package/dist/components/split-button/split-button-styles.js +164 -0
  364. package/dist/components/split-button/split-button-styles.js.map +1 -0
  365. package/dist/components/split-button/split-button-tokens.d.ts +7 -0
  366. package/dist/components/split-button/split-button-tokens.js +36 -0
  367. package/dist/components/split-button/split-button-tokens.js.map +1 -0
  368. package/dist/components/switch/Switch.d.ts +82 -0
  369. package/dist/components/switch/Switch.js +165 -0
  370. package/dist/components/switch/Switch.js.map +1 -0
  371. package/dist/components/switch/switch-styles.d.ts +96 -0
  372. package/dist/components/switch/switch-styles.js +68 -0
  373. package/dist/components/switch/switch-styles.js.map +1 -0
  374. package/dist/components/switch/switch-thumb.js +41 -0
  375. package/dist/components/switch/switch-thumb.js.map +1 -0
  376. package/dist/components/switch/switch-tokens.d.ts +7 -0
  377. package/dist/components/switch/switch-tokens.js +78 -0
  378. package/dist/components/switch/switch-tokens.js.map +1 -0
  379. package/dist/components/tabs/Tabs.d.ts +120 -0
  380. package/dist/components/tabs/Tabs.js +346 -0
  381. package/dist/components/tabs/Tabs.js.map +1 -0
  382. package/dist/components/tabs/tabs-styles.d.ts +198 -0
  383. package/dist/components/tabs/tabs-styles.js +99 -0
  384. package/dist/components/tabs/tabs-styles.js.map +1 -0
  385. package/dist/components/tabs/tabs-tokens.d.ts +7 -0
  386. package/dist/components/tabs/tabs-tokens.js +121 -0
  387. package/dist/components/tabs/tabs-tokens.js.map +1 -0
  388. package/dist/components/text-field/TextField.d.ts +175 -0
  389. package/dist/components/text-field/TextField.js +250 -0
  390. package/dist/components/text-field/TextField.js.map +1 -0
  391. package/dist/components/text-field/text-field-styles.d.ts +252 -0
  392. package/dist/components/text-field/text-field-styles.js +209 -0
  393. package/dist/components/text-field/text-field-styles.js.map +1 -0
  394. package/dist/components/text-field/text-field-tokens.d.ts +7 -0
  395. package/dist/components/text-field/text-field-tokens.js +177 -0
  396. package/dist/components/text-field/text-field-tokens.js.map +1 -0
  397. package/dist/components/time-picker/TimePicker.d.ts +142 -0
  398. package/dist/components/time-picker/TimePicker.js +700 -0
  399. package/dist/components/time-picker/TimePicker.js.map +1 -0
  400. package/dist/components/time-picker/time-picker-styles.d.ts +175 -0
  401. package/dist/components/time-picker/time-picker-styles.js +112 -0
  402. package/dist/components/time-picker/time-picker-styles.js.map +1 -0
  403. package/dist/components/time-picker/time-picker-tokens.d.ts +7 -0
  404. package/dist/components/time-picker/time-picker-tokens.js +86 -0
  405. package/dist/components/time-picker/time-picker-tokens.js.map +1 -0
  406. package/dist/components/toolbar/Toolbar.d.ts +209 -0
  407. package/dist/components/toolbar/Toolbar.js +282 -0
  408. package/dist/components/toolbar/Toolbar.js.map +1 -0
  409. package/dist/components/toolbar/toolbar-styles.d.ts +403 -0
  410. package/dist/components/toolbar/toolbar-styles.js +253 -0
  411. package/dist/components/toolbar/toolbar-styles.js.map +1 -0
  412. package/dist/components/toolbar/toolbar-tokens.d.ts +27 -0
  413. package/dist/components/toolbar/toolbar-tokens.js +117 -0
  414. package/dist/components/toolbar/toolbar-tokens.js.map +1 -0
  415. package/dist/components/toolbar/use-toolbar-scroll-expansion.d.ts +56 -0
  416. package/dist/components/toolbar/use-toolbar-scroll-expansion.js +86 -0
  417. package/dist/components/toolbar/use-toolbar-scroll-expansion.js.map +1 -0
  418. package/dist/components/tooltip/Tooltip.d.ts +131 -0
  419. package/dist/components/tooltip/Tooltip.js +388 -0
  420. package/dist/components/tooltip/Tooltip.js.map +1 -0
  421. package/dist/components/tooltip/lazy-tooltip.js +35 -0
  422. package/dist/components/tooltip/lazy-tooltip.js.map +1 -0
  423. package/dist/components/tooltip/tooltip-placement.d.ts +16 -0
  424. package/dist/components/tooltip/tooltip-placement.js +14 -0
  425. package/dist/components/tooltip/tooltip-placement.js.map +1 -0
  426. package/dist/components/tooltip/tooltip-styles.d.ts +142 -0
  427. package/dist/components/tooltip/tooltip-styles.js +81 -0
  428. package/dist/components/tooltip/tooltip-styles.js.map +1 -0
  429. package/dist/components/tooltip/tooltip-tokens.d.ts +9 -0
  430. package/dist/components/tooltip/tooltip-tokens.js +72 -0
  431. package/dist/components/tooltip/tooltip-tokens.js.map +1 -0
  432. package/dist/components/tooltip/tooltip-trigger.d.ts +42 -0
  433. package/dist/components/tooltip/tooltip-trigger.js +115 -0
  434. package/dist/components/tooltip/tooltip-trigger.js.map +1 -0
  435. package/dist/composites/button-group/ButtonGroup.d.ts +116 -0
  436. package/dist/composites/button-group/ButtonGroup.js +270 -0
  437. package/dist/composites/button-group/ButtonGroup.js.map +1 -0
  438. package/dist/composites/button-group/button-group-styles.d.ts +73 -0
  439. package/dist/composites/button-group/button-group-styles.js +87 -0
  440. package/dist/composites/button-group/button-group-styles.js.map +1 -0
  441. package/dist/composites/button-group/lazy-overflow-menu.js +43 -0
  442. package/dist/composites/button-group/lazy-overflow-menu.js.map +1 -0
  443. package/dist/composites/button-group/overflow-menu-list.js +26 -0
  444. package/dist/composites/button-group/overflow-menu-list.js.map +1 -0
  445. package/dist/composites/button-group/use-overflow.js +75 -0
  446. package/dist/composites/button-group/use-overflow.js.map +1 -0
  447. package/dist/composites/button-group/use-press-expansion.js +155 -0
  448. package/dist/composites/button-group/use-press-expansion.js.map +1 -0
  449. package/dist/index.d.ts +142 -0
  450. package/dist/index.js +136 -0
  451. package/dist/motion/get-m3-spring.d.ts +6 -0
  452. package/dist/motion/get-m3-spring.js +10 -0
  453. package/dist/motion/get-m3-spring.js.map +1 -0
  454. package/dist/motion/reduced-motion.js +19 -0
  455. package/dist/motion/reduced-motion.js.map +1 -0
  456. package/dist/motion/use-m3-spring.d.ts +13 -0
  457. package/dist/motion/use-m3-spring.js +22 -0
  458. package/dist/motion/use-m3-spring.js.map +1 -0
  459. package/dist/next/NextRouterProvider.d.ts +13 -0
  460. package/dist/next/NextRouterProvider.js +26 -0
  461. package/dist/next/NextRouterProvider.js.map +1 -0
  462. package/dist/next/get-theme-from-cookies.d.ts +32 -0
  463. package/dist/next/get-theme-from-cookies.js +27 -0
  464. package/dist/next/get-theme-from-cookies.js.map +1 -0
  465. package/dist/next/navigation-guard.d.ts +30 -0
  466. package/dist/next/navigation-guard.js +68 -0
  467. package/dist/next/navigation-guard.js.map +1 -0
  468. package/dist/next.d.ts +5 -0
  469. package/dist/next.js +5 -0
  470. package/dist/primitives/ButtonBase.d.ts +115 -0
  471. package/dist/primitives/ButtonBase.js +231 -0
  472. package/dist/primitives/ButtonBase.js.map +1 -0
  473. package/dist/primitives/DomDirectionLocale.d.ts +18 -0
  474. package/dist/primitives/DomDirectionLocale.js +28 -0
  475. package/dist/primitives/DomDirectionLocale.js.map +1 -0
  476. package/dist/primitives/Field.d.ts +50 -0
  477. package/dist/primitives/Field.js +74 -0
  478. package/dist/primitives/Field.js.map +1 -0
  479. package/dist/primitives/IconFaces.js +23 -0
  480. package/dist/primitives/IconFaces.js.map +1 -0
  481. package/dist/primitives/Overlay.d.ts +39 -0
  482. package/dist/primitives/Overlay.js +86 -0
  483. package/dist/primitives/Overlay.js.map +1 -0
  484. package/dist/primitives/SelectionControl.d.ts +55 -0
  485. package/dist/primitives/SelectionControl.js +58 -0
  486. package/dist/primitives/SelectionControl.js.map +1 -0
  487. package/dist/primitives/Surface.d.ts +123 -0
  488. package/dist/primitives/Surface.js +68 -0
  489. package/dist/primitives/Surface.js.map +1 -0
  490. package/dist/primitives/ToolbarContext.js +12 -0
  491. package/dist/primitives/ToolbarContext.js.map +1 -0
  492. package/dist/primitives/TouchTarget.d.ts +14 -0
  493. package/dist/primitives/TouchTarget.js +20 -0
  494. package/dist/primitives/TouchTarget.js.map +1 -0
  495. package/dist/primitives/TriggerContext.d.ts +34 -0
  496. package/dist/primitives/TriggerContext.js +24 -0
  497. package/dist/primitives/TriggerContext.js.map +1 -0
  498. package/dist/primitives/hidden-input-focus.js +27 -0
  499. package/dist/primitives/hidden-input-focus.js.map +1 -0
  500. package/dist/primitives/icon-faces-styles.d.ts +9 -0
  501. package/dist/primitives/icon-faces-styles.js +45 -0
  502. package/dist/primitives/icon-faces-styles.js.map +1 -0
  503. package/dist/primitives/locale-with-direction.d.ts +9 -0
  504. package/dist/primitives/locale-with-direction.js +17 -0
  505. package/dist/primitives/locale-with-direction.js.map +1 -0
  506. package/dist/primitives/morph-path.d.ts +25 -0
  507. package/dist/primitives/morph-path.js +38 -0
  508. package/dist/primitives/morph-path.js.map +1 -0
  509. package/dist/primitives/selection-control-styles.d.ts +54 -0
  510. package/dist/primitives/selection-control-styles.js +44 -0
  511. package/dist/primitives/selection-control-styles.js.map +1 -0
  512. package/dist/primitives/use-m3-interaction.d.ts +51 -0
  513. package/dist/primitives/use-m3-interaction.js +149 -0
  514. package/dist/primitives/use-m3-interaction.js.map +1 -0
  515. package/dist/primitives/use-m3-morph.d.ts +18 -0
  516. package/dist/primitives/use-m3-morph.js +36 -0
  517. package/dist/primitives/use-m3-morph.js.map +1 -0
  518. package/dist/primitives/use-presence.d.ts +19 -0
  519. package/dist/primitives/use-presence.js +37 -0
  520. package/dist/primitives/use-presence.js.map +1 -0
  521. package/dist/primitives.d.ts +36 -0
  522. package/dist/primitives.js +34 -0
  523. package/dist/shapes/corner-rounding.d.ts +13 -0
  524. package/dist/shapes/corner-rounding.js +18 -0
  525. package/dist/shapes/corner-rounding.js.map +1 -0
  526. package/dist/shapes/cubic.d.ts +52 -0
  527. package/dist/shapes/cubic.js +189 -0
  528. package/dist/shapes/cubic.js.map +1 -0
  529. package/dist/shapes/feature-mapping.js +80 -0
  530. package/dist/shapes/feature-mapping.js.map +1 -0
  531. package/dist/shapes/features.d.ts +23 -0
  532. package/dist/shapes/features.js +82 -0
  533. package/dist/shapes/features.js.map +1 -0
  534. package/dist/shapes/float-mapping.js +65 -0
  535. package/dist/shapes/float-mapping.js.map +1 -0
  536. package/dist/shapes/generated/material-shape-path-record.d.ts +11 -0
  537. package/dist/shapes/generated/material-shape-path-record.js +48 -0
  538. package/dist/shapes/generated/material-shape-path-record.js.map +1 -0
  539. package/dist/shapes/generated/material-shape-paths.d.ts +78 -0
  540. package/dist/shapes/generated/material-shape-paths.js +218 -0
  541. package/dist/shapes/generated/material-shape-paths.js.map +1 -0
  542. package/dist/shapes/mask.d.ts +14 -0
  543. package/dist/shapes/mask.js +24 -0
  544. package/dist/shapes/mask.js.map +1 -0
  545. package/dist/shapes/material-shapes.d.ts +11 -0
  546. package/dist/shapes/material-shapes.js +250 -0
  547. package/dist/shapes/material-shapes.js.map +1 -0
  548. package/dist/shapes/morph.d.ts +25 -0
  549. package/dist/shapes/morph.js +97 -0
  550. package/dist/shapes/morph.js.map +1 -0
  551. package/dist/shapes/path.d.ts +33 -0
  552. package/dist/shapes/path.js +47 -0
  553. package/dist/shapes/path.js.map +1 -0
  554. package/dist/shapes/point.d.ts +28 -0
  555. package/dist/shapes/point.js +103 -0
  556. package/dist/shapes/point.js.map +1 -0
  557. package/dist/shapes/polygon-measure.js +140 -0
  558. package/dist/shapes/polygon-measure.js.map +1 -0
  559. package/dist/shapes/rounded-polygon.d.ts +44 -0
  560. package/dist/shapes/rounded-polygon.js +278 -0
  561. package/dist/shapes/rounded-polygon.js.map +1 -0
  562. package/dist/shapes/shape-path.d.ts +15 -0
  563. package/dist/shapes/shapes.d.ts +53 -0
  564. package/dist/shapes/shapes.js +171 -0
  565. package/dist/shapes/shapes.js.map +1 -0
  566. package/dist/styles/generated/components.css +710 -0
  567. package/dist/styles/generated/theme.css +247 -0
  568. package/dist/styles/generated/themes.css +3361 -0
  569. package/dist/styles/generated/tokens.css +284 -0
  570. package/dist/styles/styles.css +15 -0
  571. package/dist/styles/utilities.css +283 -0
  572. package/dist/styles.compiled.css +2 -0
  573. package/dist/theme/ThemeProvider.d.ts +72 -0
  574. package/dist/theme/ThemeProvider.js +144 -0
  575. package/dist/theme/ThemeProvider.js.map +1 -0
  576. package/dist/theme/ThemeScope.d.ts +32 -0
  577. package/dist/theme/ThemeScope.js +67 -0
  578. package/dist/theme/ThemeScope.js.map +1 -0
  579. package/dist/theme/ThemeScript.d.ts +26 -0
  580. package/dist/theme/ThemeScript.js +44 -0
  581. package/dist/theme/ThemeScript.js.map +1 -0
  582. package/dist/theme/context.d.ts +32 -0
  583. package/dist/theme/context.js +47 -0
  584. package/dist/theme/context.js.map +1 -0
  585. package/dist/theme/create-theme.d.ts +60 -0
  586. package/dist/theme/create-theme.js +47 -0
  587. package/dist/theme/create-theme.js.map +1 -0
  588. package/dist/theme/css.js +54 -0
  589. package/dist/theme/css.js.map +1 -0
  590. package/dist/theme/parse-palettes.js +40 -0
  591. package/dist/theme/parse-palettes.js.map +1 -0
  592. package/dist/theme/scheme.d.ts +6 -0
  593. package/dist/theme/scheme.js +118 -0
  594. package/dist/theme/scheme.js.map +1 -0
  595. package/dist/theme/state.d.ts +38 -0
  596. package/dist/theme/state.js +93 -0
  597. package/dist/theme/state.js.map +1 -0
  598. package/dist/theme/storage.js +21 -0
  599. package/dist/theme/storage.js.map +1 -0
  600. package/dist/tokens/breakpoints.d.ts +15 -0
  601. package/dist/tokens/breakpoints.js +16 -0
  602. package/dist/tokens/breakpoints.js.map +1 -0
  603. package/dist/tokens/color.d.ts +104 -0
  604. package/dist/tokens/color.js +147 -0
  605. package/dist/tokens/color.js.map +1 -0
  606. package/dist/tokens/component.d.ts +110 -0
  607. package/dist/tokens/component.js +67 -0
  608. package/dist/tokens/component.js.map +1 -0
  609. package/dist/tokens/density.d.ts +20 -0
  610. package/dist/tokens/density.js +27 -0
  611. package/dist/tokens/density.js.map +1 -0
  612. package/dist/tokens/elevation.d.ts +44 -0
  613. package/dist/tokens/elevation.js +45 -0
  614. package/dist/tokens/elevation.js.map +1 -0
  615. package/dist/tokens/motion.d.ts +79 -0
  616. package/dist/tokens/motion.js +126 -0
  617. package/dist/tokens/motion.js.map +1 -0
  618. package/dist/tokens/shape.d.ts +22 -0
  619. package/dist/tokens/shape.js +22 -0
  620. package/dist/tokens/shape.js.map +1 -0
  621. package/dist/tokens/spring-velocity.d.ts +19 -0
  622. package/dist/tokens/spring-velocity.js +44 -0
  623. package/dist/tokens/spring-velocity.js.map +1 -0
  624. package/dist/tokens/state.d.ts +18 -0
  625. package/dist/tokens/state.js +19 -0
  626. package/dist/tokens/state.js.map +1 -0
  627. package/dist/tokens/typography.d.ts +64 -0
  628. package/dist/tokens/typography.js +60 -0
  629. package/dist/tokens/typography.js.map +1 -0
  630. package/dist/tokens/z-index.d.ts +17 -0
  631. package/dist/tokens/z-index.js +18 -0
  632. package/dist/tokens/z-index.js.map +1 -0
  633. package/dist/utils/announce.js +51 -0
  634. package/dist/utils/announce.js.map +1 -0
  635. package/dist/utils/assert-collection-children.js +26 -0
  636. package/dist/utils/assert-collection-children.js.map +1 -0
  637. package/dist/utils/closed-by.d.ts +9 -0
  638. package/dist/utils/closed-by.js +12 -0
  639. package/dist/utils/closed-by.js.map +1 -0
  640. package/dist/utils/cn.d.ts +31 -0
  641. package/dist/utils/cn.js +37 -0
  642. package/dist/utils/cn.js.map +1 -0
  643. package/dist/utils/composite-keys.js +32 -0
  644. package/dist/utils/composite-keys.js.map +1 -0
  645. package/dist/utils/focus-visible.js +14 -0
  646. package/dist/utils/focus-visible.js.map +1 -0
  647. package/dist/utils/focus.js +51 -0
  648. package/dist/utils/focus.js.map +1 -0
  649. package/dist/utils/focusable-disabled.js +12 -0
  650. package/dist/utils/focusable-disabled.js.map +1 -0
  651. package/dist/utils/keep-pressed-in-place.d.ts +60 -0
  652. package/dist/utils/keep-pressed-in-place.js +127 -0
  653. package/dist/utils/keep-pressed-in-place.js.map +1 -0
  654. package/dist/utils/load-on-demand.js +111 -0
  655. package/dist/utils/load-on-demand.js.map +1 -0
  656. package/dist/utils/merge-data-tokens.d.ts +9 -0
  657. package/dist/utils/merge-data-tokens.js +15 -0
  658. package/dist/utils/merge-data-tokens.js.map +1 -0
  659. package/dist/utils/natural-size.js +53 -0
  660. package/dist/utils/natural-size.js.map +1 -0
  661. package/dist/utils/nearest-reveal.js +28 -0
  662. package/dist/utils/nearest-reveal.js.map +1 -0
  663. package/dist/utils/placement.js +14 -0
  664. package/dist/utils/placement.js.map +1 -0
  665. package/dist/utils/radio-group-keys.js +74 -0
  666. package/dist/utils/radio-group-keys.js.map +1 -0
  667. package/dist/utils/rendered-description.js +17 -0
  668. package/dist/utils/rendered-description.js.map +1 -0
  669. package/dist/utils/root-props.d.ts +103 -0
  670. package/dist/utils/root-props.js +51 -0
  671. package/dist/utils/root-props.js.map +1 -0
  672. package/dist/utils/search.d.ts +11 -0
  673. package/dist/utils/search.js +18 -0
  674. package/dist/utils/search.js.map +1 -0
  675. package/dist/utils/shortcut.js +20 -0
  676. package/dist/utils/shortcut.js.map +1 -0
  677. package/dist/utils/split-data-attributes.d.ts +12 -0
  678. package/dist/utils/split-data-attributes.js +20 -0
  679. package/dist/utils/split-data-attributes.js.map +1 -0
  680. package/dist/utils/toolbar-keys.js +28 -0
  681. package/dist/utils/toolbar-keys.js.map +1 -0
  682. package/dist/utils/tv.d.ts +7 -0
  683. package/dist/utils/tv.js +9 -0
  684. package/dist/utils/tv.js.map +1 -0
  685. package/dist/utils/typeahead.js +64 -0
  686. package/dist/utils/typeahead.js.map +1 -0
  687. package/dist/utils/warn-once.js +30 -0
  688. package/dist/utils/warn-once.js.map +1 -0
  689. package/dist/vendor/material-color-utilities/blend/blend.js +88 -0
  690. package/dist/vendor/material-color-utilities/blend/blend.js.map +1 -0
  691. package/dist/vendor/material-color-utilities/contrast/contrast.js +131 -0
  692. package/dist/vendor/material-color-utilities/contrast/contrast.js.map +1 -0
  693. package/dist/vendor/material-color-utilities/dislike/dislike_analyzer.js +58 -0
  694. package/dist/vendor/material-color-utilities/dislike/dislike_analyzer.js.map +1 -0
  695. package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2021.js +620 -0
  696. package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2021.js.map +1 -0
  697. package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2025.js +786 -0
  698. package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2025.js.map +1 -0
  699. package/dist/vendor/material-color-utilities/dynamiccolor/contrast_curve.js +59 -0
  700. package/dist/vendor/material-color-utilities/dynamiccolor/contrast_curve.js.map +1 -0
  701. package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_color.js +420 -0
  702. package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_color.js.map +1 -0
  703. package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_scheme.js +701 -0
  704. package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_scheme.js.map +1 -0
  705. package/dist/vendor/material-color-utilities/dynamiccolor/material_dynamic_colors.js +374 -0
  706. package/dist/vendor/material-color-utilities/dynamiccolor/material_dynamic_colors.js.map +1 -0
  707. package/dist/vendor/material-color-utilities/dynamiccolor/tone_delta_pair.js +65 -0
  708. package/dist/vendor/material-color-utilities/dynamiccolor/tone_delta_pair.js.map +1 -0
  709. package/dist/vendor/material-color-utilities/dynamiccolor/variant.js +38 -0
  710. package/dist/vendor/material-color-utilities/dynamiccolor/variant.js.map +1 -0
  711. package/dist/vendor/material-color-utilities/hct/cam16.js +309 -0
  712. package/dist/vendor/material-color-utilities/hct/cam16.js.map +1 -0
  713. package/dist/vendor/material-color-utilities/hct/hct.js +148 -0
  714. package/dist/vendor/material-color-utilities/hct/hct.js.map +1 -0
  715. package/dist/vendor/material-color-utilities/hct/hct_solver.js +660 -0
  716. package/dist/vendor/material-color-utilities/hct/hct_solver.js.map +1 -0
  717. package/dist/vendor/material-color-utilities/hct/viewing_conditions.js +117 -0
  718. package/dist/vendor/material-color-utilities/hct/viewing_conditions.js.map +1 -0
  719. package/dist/vendor/material-color-utilities/index.js +51 -0
  720. package/dist/vendor/material-color-utilities/index.js.map +1 -0
  721. package/dist/vendor/material-color-utilities/palettes/core_palette.js +22 -0
  722. package/dist/vendor/material-color-utilities/palettes/core_palette.js.map +1 -0
  723. package/dist/vendor/material-color-utilities/palettes/tonal_palette.js +134 -0
  724. package/dist/vendor/material-color-utilities/palettes/tonal_palette.js.map +1 -0
  725. package/dist/vendor/material-color-utilities/scheme/scheme.js +21 -0
  726. package/dist/vendor/material-color-utilities/scheme/scheme.js.map +1 -0
  727. package/dist/vendor/material-color-utilities/scheme/scheme_android.js +21 -0
  728. package/dist/vendor/material-color-utilities/scheme/scheme_android.js.map +1 -0
  729. package/dist/vendor/material-color-utilities/scheme/scheme_content.js +22 -0
  730. package/dist/vendor/material-color-utilities/scheme/scheme_content.js.map +1 -0
  731. package/dist/vendor/material-color-utilities/scheme/scheme_expressive.js +38 -0
  732. package/dist/vendor/material-color-utilities/scheme/scheme_expressive.js.map +1 -0
  733. package/dist/vendor/material-color-utilities/scheme/scheme_fidelity.js +22 -0
  734. package/dist/vendor/material-color-utilities/scheme/scheme_fidelity.js.map +1 -0
  735. package/dist/vendor/material-color-utilities/scheme/scheme_fruit_salad.js +22 -0
  736. package/dist/vendor/material-color-utilities/scheme/scheme_fruit_salad.js.map +1 -0
  737. package/dist/vendor/material-color-utilities/scheme/scheme_monochrome.js +22 -0
  738. package/dist/vendor/material-color-utilities/scheme/scheme_monochrome.js.map +1 -0
  739. package/dist/vendor/material-color-utilities/scheme/scheme_neutral.js +36 -0
  740. package/dist/vendor/material-color-utilities/scheme/scheme_neutral.js.map +1 -0
  741. package/dist/vendor/material-color-utilities/scheme/scheme_rainbow.js +22 -0
  742. package/dist/vendor/material-color-utilities/scheme/scheme_rainbow.js.map +1 -0
  743. package/dist/vendor/material-color-utilities/scheme/scheme_tonal_spot.js +41 -0
  744. package/dist/vendor/material-color-utilities/scheme/scheme_tonal_spot.js.map +1 -0
  745. package/dist/vendor/material-color-utilities/scheme/scheme_vibrant.js +39 -0
  746. package/dist/vendor/material-color-utilities/scheme/scheme_vibrant.js.map +1 -0
  747. package/dist/vendor/material-color-utilities/score/score.js +115 -0
  748. package/dist/vendor/material-color-utilities/score/score.js.map +1 -0
  749. package/dist/vendor/material-color-utilities/temperature/temperature_cache.js +227 -0
  750. package/dist/vendor/material-color-utilities/temperature/temperature_cache.js.map +1 -0
  751. package/dist/vendor/material-color-utilities/utils/color_utils.js +246 -0
  752. package/dist/vendor/material-color-utilities/utils/color_utils.js.map +1 -0
  753. package/dist/vendor/material-color-utilities/utils/image_utils.js +21 -0
  754. package/dist/vendor/material-color-utilities/utils/image_utils.js.map +1 -0
  755. package/dist/vendor/material-color-utilities/utils/math_utils.js +119 -0
  756. package/dist/vendor/material-color-utilities/utils/math_utils.js.map +1 -0
  757. package/dist/vendor/material-color-utilities/utils/string_utils.js +74 -0
  758. package/dist/vendor/material-color-utilities/utils/string_utils.js.map +1 -0
  759. package/dist/vendor/material-color-utilities/utils/theme_utils.js +24 -0
  760. package/dist/vendor/material-color-utilities/utils/theme_utils.js.map +1 -0
  761. package/package.json +114 -3
@@ -0,0 +1,54 @@
1
+ import { ButtonBaseActionProps, ButtonBaseLinkProps } from "../../primitives/ButtonBase.js";
2
+ import { BadgeProps } from "../badge/Badge.js";
3
+ import "./nav-item-styles.js";
4
+ import { ReactElement, ReactNode, RefObject } from "react";
5
+ //#region src/components/navigation/NavItem.d.ts
6
+ export interface NavItemClassNames {
7
+ /** The item's button or link, merged with `className`. */
8
+ root?: string;
9
+ /** The pill around the icon that holds the active indicator and the state layer. */
10
+ pill?: string;
11
+ /** The active indicator: the filled pill shown on the current destination. */
12
+ indicator?: string;
13
+ /** The state layer over the pill (hover, focus and press). */
14
+ stateLayer?: string;
15
+ /** The icon. */
16
+ icon?: string;
17
+ /** The label text. */
18
+ label?: string;
19
+ /** The badge's wrapper: on the icon, or after the label in the expanded rail. */
20
+ badge?: string;
21
+ }
22
+ export interface NavItemOwnProps {
23
+ /** The icon. Hidden from assistive tech; the label names the item. */
24
+ icon: ReactElement;
25
+ /** Icon shown while selected, e.g. a filled variant. */
26
+ selectedIcon?: ReactElement;
27
+ /** The label. */
28
+ children: ReactNode;
29
+ /** Marks the current destination (`aria-current="page"`). */
30
+ selected?: boolean;
31
+ /**
32
+ * A `Badge` for dynamic information, such as a count. It overlaps the icon's top end, or
33
+ * sits after the label in the expanded rail. It describes the item to assistive tech
34
+ * with its text, or with `badgeLabel`.
35
+ */
36
+ badge?: ReactElement<BadgeProps>;
37
+ /**
38
+ * What the badge means, read after the item's name, e.g. "3 new messages". Defaults to
39
+ * the badge's `label` or text; a small (dot) badge reads its `labels.newNotification`
40
+ * ("New notification"), as M3 asks of badges without a count.
41
+ */
42
+ badgeLabel?: string;
43
+ /**
44
+ * Called when the current destination is pressed again. M3: re-selecting the active
45
+ * destination resets the page's scroll position to the top, so scroll to the top here.
46
+ */
47
+ onReselect?: () => void;
48
+ /** Classes for each part, by slot. */
49
+ classNames?: NavItemClassNames;
50
+ }
51
+ type OmitItem<T> = Omit<T, keyof NavItemOwnProps | 'toggle'>;
52
+ export type NavItemProps = NavItemOwnProps & (OmitItem<ButtonBaseActionProps> | OmitItem<ButtonBaseLinkProps>);
53
+ //#endregion
54
+ //# sourceMappingURL=NavItem.d.ts.map
@@ -0,0 +1,182 @@
1
+ "use client";
2
+ import { cn } from "../../utils/cn.js";
3
+ import { useM3Spring } from "../../motion/use-m3-spring.js";
4
+ import { setRippleOrigin, useRippleHold } from "../../primitives/use-m3-interaction.js";
5
+ import { ButtonBase } from "../../primitives/ButtonBase.js";
6
+ import { mergeDataTokens } from "../../utils/merge-data-tokens.js";
7
+ import { BadgedBox } from "../badge/Badge.js";
8
+ import { navItemStyles } from "./nav-item-styles.js";
9
+ import { isValidElement, useId, useLayoutEffect, useRef, useState } from "react";
10
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
11
+ import { animate, useReducedMotion } from "motion/react";
12
+ //#region src/components/navigation/NavItem.tsx
13
+ /**
14
+ * Slides the current item's pill from the previous current item's, on the fast spatial
15
+ * spring, changing width on the way when their labels differ. `lastIndicatorRef` holds the
16
+ * last current pill for every item in one list; without it the pill doesn't slide, and under
17
+ * reduced motion it fades in place.
18
+ */
19
+ function useSlidingIndicator(selected, lastIndicatorRef) {
20
+ const indicatorRef = useRef(null);
21
+ const wasSelected = useRef(selected);
22
+ const spring = useM3Spring("spatial", "fast");
23
+ const reducedMotion = useReducedMotion();
24
+ useLayoutEffect(() => {
25
+ const indicator = indicatorRef.current;
26
+ const changed = wasSelected.current !== selected;
27
+ wasSelected.current = selected;
28
+ if (!lastIndicatorRef || !selected || !indicator) return;
29
+ const previous = lastIndicatorRef.current;
30
+ lastIndicatorRef.current = indicator;
31
+ if (!changed || reducedMotion || !previous?.isConnected || previous === indicator) return;
32
+ indicator.style.transform = "";
33
+ indicator.style.width = "";
34
+ const from = previous.getBoundingClientRect();
35
+ const to = indicator.getBoundingClientRect();
36
+ const offset = from.top - to.top;
37
+ if (offset === 0) return;
38
+ indicator.style.transform = `translateY(${offset}px)`;
39
+ if (from.width === to.width) {
40
+ animate(indicator, { y: [offset, 0] }, spring);
41
+ return;
42
+ }
43
+ indicator.style.width = `${from.width}px`;
44
+ animate(indicator, {
45
+ y: [offset, 0],
46
+ width: [from.width, to.width]
47
+ }, spring).then(() => {
48
+ indicator.style.width = "";
49
+ });
50
+ }, [
51
+ selected,
52
+ lastIndicatorRef,
53
+ reducedMotion,
54
+ spring
55
+ ]);
56
+ return indicatorRef;
57
+ }
58
+ /**
59
+ * What a badge tells assistive tech about its item: its `label`, its text, or, for a small
60
+ * badge (no children), "New notification" (`labels.newNotification`).
61
+ */
62
+ function badgeDescription(badge) {
63
+ if (!isValidElement(badge)) return null;
64
+ const { label, labels, children } = badge.props;
65
+ if (label != null) return label;
66
+ if (typeof children === "string" || typeof children === "number") return String(children);
67
+ if (children == null || children === false) return labels?.newNotification ?? "New notification";
68
+ return null;
69
+ }
70
+ /** Shared navigation item: a link (`href`) or button with the M3 pill indicator. */
71
+ function NavItem({ layout, enterLabel, lastIndicatorRef, icon, selectedIcon, children, selected, badge, badgeLabel, onReselect, classNames, className, ...base }) {
72
+ const styles = navItemStyles({
73
+ layout,
74
+ enterLabel,
75
+ slide: Boolean(lastIndicatorRef)
76
+ });
77
+ const indicatorRef = useSlidingIndicator(Boolean(selected), lastIndicatorRef);
78
+ const descriptionId = useId();
79
+ const inline = layout === "rail-start" || layout === "bar-start";
80
+ const badgeAfterLabel = layout === "rail-start";
81
+ const description = badgeLabel ?? badgeDescription(badge);
82
+ const label = /* @__PURE__ */ jsx("span", {
83
+ "data-nav-label": "",
84
+ "data-slot": "label",
85
+ className: styles.label({ class: classNames?.label }),
86
+ children
87
+ });
88
+ const iconFaces = selectedIcon ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
89
+ "data-shown": !selected || void 0,
90
+ className: styles.iconFace(),
91
+ children: icon
92
+ }), /* @__PURE__ */ jsx("span", {
93
+ "data-shown": selected || void 0,
94
+ className: styles.iconFace(),
95
+ children: selectedIcon
96
+ })] }) : icon;
97
+ const action = base;
98
+ const stateLayerRef = useRef(null);
99
+ const [pressed, setPressed] = useState(false);
100
+ const rippling = useRippleHold(pressed && !action.disabled);
101
+ return /* @__PURE__ */ jsxs(ButtonBase, {
102
+ ...action,
103
+ onPress: (event) => {
104
+ action.onPress?.(event);
105
+ if (selected) onReselect?.();
106
+ },
107
+ onPressChange: (isPressed) => {
108
+ action.onPressChange?.(isPressed);
109
+ setPressed(isPressed);
110
+ },
111
+ onPointerDown: (event) => {
112
+ action.onPointerDown?.(event);
113
+ if (stateLayerRef.current && !action.disabled && event.button === 0) setRippleOrigin(stateLayerRef.current, event.clientX, event.clientY);
114
+ },
115
+ onKeyDown: (event) => {
116
+ action.onKeyDown?.(event);
117
+ if (stateLayerRef.current && !action.disabled && (event.key === "Enter" || event.key === " ")) setRippleOrigin(stateLayerRef.current);
118
+ },
119
+ "data-nav-item": "",
120
+ "aria-current": selected ? "page" : void 0,
121
+ "aria-describedby": [action["aria-describedby"], badge && description != null ? descriptionId : void 0].filter(Boolean).join(" ") || void 0,
122
+ "data-current": selected || void 0,
123
+ "data-tokens": mergeDataTokens(layout.startsWith("rail") ? "md-comp-nav-rail" : "md-comp-nav-bar", action),
124
+ "data-layout": layout,
125
+ className: styles.root({ class: cn(classNames?.root, className) }),
126
+ children: [
127
+ /* @__PURE__ */ jsxs("span", {
128
+ "data-slot": "pill",
129
+ className: styles.pill({ class: classNames?.pill }),
130
+ children: [
131
+ /* @__PURE__ */ jsx("span", {
132
+ ref: indicatorRef,
133
+ "aria-hidden": "true",
134
+ "data-slot": "indicator",
135
+ className: styles.indicator({ class: classNames?.indicator })
136
+ }),
137
+ /* @__PURE__ */ jsx("span", {
138
+ ref: stateLayerRef,
139
+ "aria-hidden": "true",
140
+ "data-rippling": rippling || void 0,
141
+ "data-disabled": action.disabled || void 0,
142
+ className: styles.stateLayer({ class: classNames?.stateLayer })
143
+ }),
144
+ /* @__PURE__ */ jsxs("span", {
145
+ className: styles.content(),
146
+ children: [
147
+ /* @__PURE__ */ jsx("span", {
148
+ "aria-hidden": "true",
149
+ "data-slot": "icon",
150
+ className: styles.icon({ class: classNames?.icon }),
151
+ children: badge && !badgeAfterLabel ? /* @__PURE__ */ jsx(BadgedBox, {
152
+ badge,
153
+ className: styles.badgedBox({ class: classNames?.badge }),
154
+ children: /* @__PURE__ */ jsx("span", {
155
+ className: styles.iconStack(),
156
+ children: iconFaces
157
+ })
158
+ }) : iconFaces
159
+ }),
160
+ inline && label,
161
+ badge && badgeAfterLabel && /* @__PURE__ */ jsx("span", {
162
+ "aria-hidden": "true",
163
+ className: styles.badge({ class: classNames?.badge }),
164
+ children: badge
165
+ })
166
+ ]
167
+ })
168
+ ]
169
+ }),
170
+ !inline && label,
171
+ badge && description != null && /* @__PURE__ */ jsx("span", {
172
+ id: descriptionId,
173
+ hidden: true,
174
+ children: description
175
+ })
176
+ ]
177
+ });
178
+ }
179
+ //#endregion
180
+ export { NavItem };
181
+
182
+ //# sourceMappingURL=NavItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavItem.js","names":[],"sources":["../../../src/components/navigation/NavItem.tsx"],"sourcesContent":["'use client';\n\nimport { animate, useReducedMotion } from 'motion/react';\nimport {\n isValidElement,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n type KeyboardEvent,\n type PointerEvent,\n type ReactElement,\n type ReactNode,\n type RefObject,\n} from 'react';\nimport { useM3Spring } from '../../motion/use-m3-spring';\nimport { setRippleOrigin, useRippleHold } from '../../primitives/use-m3-interaction';\nimport {\n ButtonBase,\n type ButtonBaseActionProps,\n type ButtonBaseLinkProps,\n} from '../../primitives/ButtonBase';\nimport { cn } from '../../utils/cn';\nimport { BadgedBox, type BadgeProps } from '../badge/Badge';\nimport { navItemStyles, type NavItemLayout } from './nav-item-styles';\nimport { mergeDataTokens } from '../../utils/merge-data-tokens';\n\nexport interface NavItemClassNames {\n /** The item's button or link, merged with `className`. */\n root?: string;\n /** The pill around the icon that holds the active indicator and the state layer. */\n pill?: string;\n /** The active indicator: the filled pill shown on the current destination. */\n indicator?: string;\n /** The state layer over the pill (hover, focus and press). */\n stateLayer?: string;\n /** The icon. */\n icon?: string;\n /** The label text. */\n label?: string;\n /** The badge's wrapper: on the icon, or after the label in the expanded rail. */\n badge?: string;\n}\n\nexport interface NavItemOwnProps {\n /** The icon. Hidden from assistive tech; the label names the item. */\n icon: ReactElement;\n /** Icon shown while selected, e.g. a filled variant. */\n selectedIcon?: ReactElement;\n /** The label. */\n children: ReactNode;\n /** Marks the current destination (`aria-current=\"page\"`). */\n selected?: boolean;\n /**\n * A `Badge` for dynamic information, such as a count. It overlaps the icon's top end, or\n * sits after the label in the expanded rail. It describes the item to assistive tech\n * with its text, or with `badgeLabel`.\n */\n badge?: ReactElement<BadgeProps>;\n /**\n * What the badge means, read after the item's name, e.g. \"3 new messages\". Defaults to\n * the badge's `label` or text; a small (dot) badge reads its `labels.newNotification`\n * (\"New notification\"), as M3 asks of badges without a count.\n */\n badgeLabel?: string;\n /**\n * Called when the current destination is pressed again. M3: re-selecting the active\n * destination resets the page's scroll position to the top, so scroll to the top here.\n */\n onReselect?: () => void;\n /** Classes for each part, by slot. */\n classNames?: NavItemClassNames;\n}\n\ntype OmitItem<T> = Omit<T, keyof NavItemOwnProps | 'toggle'>;\n\nexport type NavItemProps = NavItemOwnProps &\n (OmitItem<ButtonBaseActionProps> | OmitItem<ButtonBaseLinkProps>);\n\n/**\n * Slides the current item's pill from the previous current item's, on the fast spatial\n * spring, changing width on the way when their labels differ. `lastIndicatorRef` holds the\n * last current pill for every item in one list; without it the pill doesn't slide, and under\n * reduced motion it fades in place.\n */\nfunction useSlidingIndicator(\n selected: boolean,\n lastIndicatorRef: RefObject<HTMLElement | null> | undefined,\n) {\n const indicatorRef = useRef<HTMLSpanElement>(null);\n const wasSelected = useRef(selected);\n const spring = useM3Spring('spatial', 'fast');\n const reducedMotion = useReducedMotion();\n useLayoutEffect(() => {\n const indicator = indicatorRef.current;\n const changed = wasSelected.current !== selected;\n wasSelected.current = selected;\n if (!lastIndicatorRef || !selected || !indicator) return;\n const previous = lastIndicatorRef.current;\n lastIndicatorRef.current = indicator;\n if (!changed || reducedMotion || !previous?.isConnected || previous === indicator) return;\n // Measure both pills at rest; an earlier slide may have left a transform or width behind.\n indicator.style.transform = '';\n indicator.style.width = '';\n const from = previous.getBoundingClientRect();\n const to = indicator.getBoundingClientRect();\n const offset = from.top - to.top;\n if (offset === 0) return;\n // Start from the old place and width now: Motion's first frame comes a frame later.\n indicator.style.transform = `translateY(${offset}px)`;\n if (from.width === to.width) {\n animate(indicator, { y: [offset, 0] }, spring);\n return;\n }\n indicator.style.width = `${from.width}px`;\n // Width animates in px; once settled the pill sizes itself to its content again.\n void animate(indicator, { y: [offset, 0], width: [from.width, to.width] }, spring).then(() => {\n indicator.style.width = '';\n });\n }, [selected, lastIndicatorRef, reducedMotion, spring]);\n return indicatorRef;\n}\n\n/**\n * What a badge tells assistive tech about its item: its `label`, its text, or, for a small\n * badge (no children), \"New notification\" (`labels.newNotification`).\n */\nfunction badgeDescription(badge: ReactElement<BadgeProps> | undefined): string | null {\n // A badge can arrive as a lazy server reference without props yet (React's dev server\n // rendering), so read it only from a real element.\n if (!isValidElement<BadgeProps>(badge)) return null;\n const { label, labels, children } = badge.props;\n if (label != null) return label;\n if (typeof children === 'string' || typeof children === 'number') return String(children);\n if (children == null || children === false) {\n return labels?.newNotification ?? 'New notification';\n }\n return null;\n}\n\n/** Shared navigation item: a link (`href`) or button with the M3 pill indicator. */\nexport function NavItem({\n layout,\n enterLabel,\n lastIndicatorRef,\n icon,\n selectedIcon,\n children,\n selected,\n badge,\n badgeLabel,\n onReselect,\n classNames,\n className,\n ...base\n}: NavItemProps & {\n layout: NavItemLayout;\n enterLabel?: boolean;\n /** The list's last current pill, so this item's pill slides from it when it becomes current. */\n lastIndicatorRef?: RefObject<HTMLElement | null>;\n}) {\n const styles = navItemStyles({ layout, enterLabel, slide: Boolean(lastIndicatorRef) });\n const indicatorRef = useSlidingIndicator(Boolean(selected), lastIndicatorRef);\n const descriptionId = useId();\n const inline = layout === 'rail-start' || layout === 'bar-start';\n // M3: badges sit on the icon, except in the expanded rail, where they follow the label.\n const badgeAfterLabel = layout === 'rail-start';\n const description = badgeLabel ?? badgeDescription(badge);\n const label = (\n <span\n data-nav-label=\"\"\n data-slot=\"label\"\n className={styles.label({ class: classNames?.label })}\n >\n {children}\n </span>\n );\n const iconFaces = selectedIcon ? (\n <>\n <span data-shown={!selected || undefined} className={styles.iconFace()}>\n {icon}\n </span>\n <span data-shown={selected || undefined} className={styles.iconFace()}>\n {selectedIcon}\n </span>\n </>\n ) : (\n icon\n );\n const action = base as ButtonBaseActionProps;\n // M3: a press ripples through the pill. The item is the pressable element, so the pill's\n // state layer gets its own press state and a ripple origin in its own box.\n const stateLayerRef = useRef<HTMLSpanElement>(null);\n const [pressed, setPressed] = useState(false);\n const rippling = useRippleHold(pressed && !action.disabled);\n return (\n <ButtonBase\n {...action}\n onPress={(event) => {\n action.onPress?.(event);\n if (selected) onReselect?.();\n }}\n onPressChange={(isPressed) => {\n action.onPressChange?.(isPressed);\n setPressed(isPressed);\n }}\n onPointerDown={(event: PointerEvent<HTMLButtonElement>) => {\n action.onPointerDown?.(event);\n if (stateLayerRef.current && !action.disabled && event.button === 0) {\n setRippleOrigin(stateLayerRef.current, event.clientX, event.clientY);\n }\n }}\n onKeyDown={(event: KeyboardEvent<HTMLButtonElement>) => {\n action.onKeyDown?.(event);\n if (\n stateLayerRef.current &&\n !action.disabled &&\n (event.key === 'Enter' || event.key === ' ')\n ) {\n setRippleOrigin(stateLayerRef.current);\n }\n }}\n data-nav-item=\"\"\n aria-current={selected ? 'page' : undefined}\n aria-describedby={\n [action['aria-describedby'], badge && description != null ? descriptionId : undefined]\n .filter(Boolean)\n .join(' ') || undefined\n }\n data-current={selected || undefined}\n // The bar's or rail's component tokens, resolved on the item for its state and layout.\n data-tokens={mergeDataTokens(\n layout.startsWith('rail') ? 'md-comp-nav-rail' : 'md-comp-nav-bar',\n action,\n )}\n data-layout={layout}\n className={styles.root({ class: cn(classNames?.root, className) })}\n >\n <span data-slot=\"pill\" className={styles.pill({ class: classNames?.pill })}>\n <span\n ref={indicatorRef}\n aria-hidden=\"true\"\n data-slot=\"indicator\"\n className={styles.indicator({ class: classNames?.indicator })}\n />\n <span\n ref={stateLayerRef}\n aria-hidden=\"true\"\n data-rippling={rippling || undefined}\n data-disabled={action.disabled || undefined}\n className={styles.stateLayer({ class: classNames?.stateLayer })}\n />\n <span className={styles.content()}>\n <span\n aria-hidden=\"true\"\n data-slot=\"icon\"\n className={styles.icon({ class: classNames?.icon })}\n >\n {badge && !badgeAfterLabel ? (\n <BadgedBox badge={badge} className={styles.badgedBox({ class: classNames?.badge })}>\n <span className={styles.iconStack()}>{iconFaces}</span>\n </BadgedBox>\n ) : (\n iconFaces\n )}\n </span>\n {inline && label}\n {badge && badgeAfterLabel && (\n <span aria-hidden=\"true\" className={styles.badge({ class: classNames?.badge })}>\n {badge}\n </span>\n )}\n </span>\n </span>\n {!inline && label}\n {badge && description != null && (\n <span id={descriptionId} hidden>\n {description}\n </span>\n )}\n </ButtonBase>\n );\n}\n"],"mappings":"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"}
@@ -0,0 +1,64 @@
1
+ import { NavItemProps } from "./NavItem.js";
2
+ import { NavigationBarArrangement } from "./navigation-styles.js";
3
+ import { ComponentPropsWithRef, ReactNode, RefObject } from "react";
4
+ //#region src/components/navigation/NavigationBar.d.ts
5
+ type Naming = {
6
+ /** Accessible name for the navigation bar. Required unless `aria-labelledby` is set. */
7
+ 'aria-label': string;
8
+ } | {
9
+ /** The id of the element that names the navigation bar. Required unless `aria-label` is set. */
10
+ 'aria-labelledby': string;
11
+ };
12
+ export interface NavigationBarClassNames {
13
+ /** The `<nav>` container, merged with `className`. */
14
+ root?: string;
15
+ /** Every item in the bar, merged with each item's own classes. */
16
+ item?: string;
17
+ }
18
+ interface NavigationBarOwnProps {
19
+ /**
20
+ * Icons above labels (compact windows) or beside them (the flexible bar in medium
21
+ * windows). Items beside their icons stack, sharing the width equally, whenever their
22
+ * labels don't fit on one line side by side (a narrow bar or large text), so no label is
23
+ * cut off; the bar then carries `data-stacked`. @default "top"
24
+ */
25
+ iconPlacement?: 'top' | 'start';
26
+ /**
27
+ * Share the width equally, or centre the items. Stacked items centre within side
28
+ * padding; items beside their icons keep their own width, with the extra space at the
29
+ * ends. @default "equal", or "centered" when iconPlacement is "start"
30
+ */
31
+ arrangement?: NavigationBarArrangement;
32
+ /**
33
+ * `hide-on-scroll` slides the bar off the bottom while the page scrolls down and back
34
+ * on any scroll up. The bar becomes `sticky` at the bottom, so put it last in a
35
+ * scrolling layout and don't add positioning classes. It stays put under reduced
36
+ * motion. M3: don't hide the bar on scroll when a screen reader is active, so leave
37
+ * this off where assistive tech is in use. @default "pinned"
38
+ */
39
+ scrollBehavior?: 'pinned' | 'hide-on-scroll';
40
+ /** With `hide-on-scroll`, the element that scrolls instead of the page. */
41
+ scrollRef?: RefObject<HTMLElement | null>;
42
+ /** `NavigationBarItem` elements (3–5 in M3). */
43
+ children: ReactNode;
44
+ /** Classes for each part, by slot. */
45
+ classNames?: NavigationBarClassNames;
46
+ }
47
+ export type NavigationBarProps = NavigationBarOwnProps & Naming & Omit<ComponentPropsWithRef<'nav'>, keyof NavigationBarOwnProps | 'aria-label' | 'aria-labelledby'>;
48
+ /**
49
+ * M3 Expressive flexible navigation bar: 3–5 destinations along the bottom of compact and
50
+ * medium windows. Items stack the icon above the label, or (`iconPlacement="start"`) place
51
+ * it beside the label in a 40px pill. Labels wrap rather than truncate, and the bar grows
52
+ * to fit them. Tab or the arrow keys move between items.
53
+ *
54
+ * @example
55
+ * <NavigationBar aria-label="Main" className="fixed inset-x-0 bottom-0">
56
+ * <NavigationBarItem href="/" icon={<HomeIcon />} selected>Home</NavigationBarItem>
57
+ * </NavigationBar>
58
+ */
59
+ export declare function NavigationBar({ iconPlacement, arrangement, scrollBehavior, scrollRef, children, classNames, className, style, ref, onKeyDown, ...rest }: NavigationBarProps): import("react").JSX.Element;
60
+ export type NavigationBarItemProps = NavItemProps;
61
+ /** A destination in a {@link NavigationBar}: a link (`href`) or a button. */
62
+ export declare function NavigationBarItem({ className, ...props }: NavigationBarItemProps): import("react").JSX.Element;
63
+ //#endregion
64
+ //# sourceMappingURL=NavigationBar.d.ts.map
@@ -0,0 +1,121 @@
1
+ "use client";
2
+ import { cn } from "../../utils/cn.js";
3
+ import { mergeDataTokens } from "../../utils/merge-data-tokens.js";
4
+ import { useWarnOnce } from "../../utils/warn-once.js";
5
+ import { NavItem } from "./NavItem.js";
6
+ import { navigationBarStyles } from "./navigation-styles.js";
7
+ import { onItemArrowKeys } from "./use-item-arrow-keys.js";
8
+ import { useHideOnScroll } from "./use-hide-on-scroll.js";
9
+ import { Children, createContext, isValidElement, useContext, useLayoutEffect, useState } from "react";
10
+ import { jsx } from "react/jsx-runtime";
11
+ import { useObjectRef } from "react-aria";
12
+ //#region src/components/navigation/NavigationBar.tsx
13
+ const BarContext = createContext(null);
14
+ /**
15
+ * M3 Expressive flexible navigation bar: 3–5 destinations along the bottom of compact and
16
+ * medium windows. Items stack the icon above the label, or (`iconPlacement="start"`) place
17
+ * it beside the label in a 40px pill. Labels wrap rather than truncate, and the bar grows
18
+ * to fit them. Tab or the arrow keys move between items.
19
+ *
20
+ * @example
21
+ * <NavigationBar aria-label="Main" className="fixed inset-x-0 bottom-0">
22
+ * <NavigationBarItem href="/" icon={<HomeIcon />} selected>Home</NavigationBarItem>
23
+ * </NavigationBar>
24
+ */
25
+ function NavigationBar({ iconPlacement = "top", arrangement = iconPlacement === "start" ? "centered" : "equal", scrollBehavior = "pinned", scrollRef, children, classNames, className, style, ref, onKeyDown, ...rest }) {
26
+ const navRef = useObjectRef(ref);
27
+ const hideOnScroll = scrollBehavior === "hide-on-scroll";
28
+ useHideOnScroll(hideOnScroll, navRef, scrollRef);
29
+ const stacked = useStackWhenCrowded(navRef, iconPlacement === "start");
30
+ const layout = stacked ? "top" : iconPlacement;
31
+ const styles = navigationBarStyles({
32
+ arrangement: stacked ? "equal" : arrangement,
33
+ iconPlacement: layout,
34
+ hideOnScroll
35
+ });
36
+ const count = Children.toArray(children).filter(isValidElement).length;
37
+ useWarnOnce(count > 0 && (count < 3 || count > 5), `[@windmorph/react] A NavigationBar should have 3 to 5 destinations (M3); it has ${count}. Use tabs for two, and a navigation rail for more than five.`);
38
+ const padding = arrangement === "centered" && iconPlacement === "top" && count <= 6 ? `${(100 - 10 * (count + 3)) / 2}%` : void 0;
39
+ const arrowKeys = onItemArrowKeys("horizontal");
40
+ return /* @__PURE__ */ jsx("nav", {
41
+ ...rest,
42
+ ref: navRef,
43
+ onKeyDown: (event) => {
44
+ onKeyDown?.(event);
45
+ arrowKeys(event);
46
+ },
47
+ style: {
48
+ paddingInline: padding,
49
+ ...style
50
+ },
51
+ "data-tokens": mergeDataTokens("md-comp-nav-bar", rest),
52
+ "data-stacked": stacked || void 0,
53
+ className: styles.root({ class: cn(classNames?.root, className) }),
54
+ children: /* @__PURE__ */ jsx(BarContext, {
55
+ value: {
56
+ iconPlacement: layout,
57
+ itemClassName: styles.item({ class: classNames?.item })
58
+ },
59
+ children
60
+ })
61
+ });
62
+ }
63
+ /**
64
+ * An inline item's width besides its label: 4px outside the pill on each side, 16px inside
65
+ * it, a 24px icon and the 4px gap before the label (`nav-item-styles.ts`, `bar-start`).
66
+ */
67
+ const INLINE_ITEM_CHROME = 68;
68
+ /**
69
+ * Whether inline items must stack because their labels don't fit on one line side by side,
70
+ * as at large text sizes (M3: "Ensure the full label is always visible on-screen at up to 2x
71
+ * text sizing"; 2026-10-15). Each label is measured on one line (the same type role in both
72
+ * layouts, so the answer doesn't change with the layout it picks), again whenever the bar
73
+ * or a label resizes (a narrower window, a larger root text size, a web font loading).
74
+ */
75
+ function useStackWhenCrowded(navRef, inline) {
76
+ const [stacked, setStacked] = useState(false);
77
+ useLayoutEffect(() => {
78
+ const nav = navRef.current;
79
+ if (!inline || !nav) {
80
+ setStacked(false);
81
+ return;
82
+ }
83
+ const labels = () => [...nav.querySelectorAll("[data-nav-label]")];
84
+ const measure = () => {
85
+ if (nav.clientWidth === 0) return setStacked(false);
86
+ let needed = 0;
87
+ for (const label of labels()) {
88
+ const wrap = label.style.whiteSpace;
89
+ label.style.whiteSpace = "nowrap";
90
+ const badge = label.closest("[data-nav-item]")?.querySelector("[data-size=\"large\"]");
91
+ const overhang = badge ? Math.max(0, badge.offsetWidth - 12) : 0;
92
+ needed += label.scrollWidth + INLINE_ITEM_CHROME + overhang;
93
+ label.style.whiteSpace = wrap;
94
+ }
95
+ const style = getComputedStyle(nav);
96
+ const available = nav.clientWidth - parseFloat(style.paddingLeft) - parseFloat(style.paddingRight);
97
+ setStacked(needed > available + .5);
98
+ };
99
+ measure();
100
+ if (typeof ResizeObserver === "undefined") return;
101
+ const observer = new ResizeObserver(measure);
102
+ observer.observe(nav);
103
+ labels().forEach((label) => observer.observe(label));
104
+ return () => observer.disconnect();
105
+ }, [navRef, inline]);
106
+ return inline && stacked;
107
+ }
108
+ /** A destination in a {@link NavigationBar}: a link (`href`) or a button. */
109
+ function NavigationBarItem({ className, ...props }) {
110
+ const bar = useContext(BarContext);
111
+ if (!bar) throw new Error("NavigationBarItem must be rendered inside a NavigationBar");
112
+ return /* @__PURE__ */ jsx(NavItem, {
113
+ ...props,
114
+ className: cn(bar.itemClassName, className),
115
+ layout: bar.iconPlacement === "start" ? "bar-start" : "bar-top"
116
+ });
117
+ }
118
+ //#endregion
119
+ export { NavigationBar, NavigationBarItem };
120
+
121
+ //# sourceMappingURL=NavigationBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavigationBar.js","names":[],"sources":["../../../src/components/navigation/NavigationBar.tsx"],"sourcesContent":["'use client';\n\nimport {\n Children,\n createContext,\n isValidElement,\n useContext,\n useLayoutEffect,\n useState,\n type ComponentPropsWithRef,\n type CSSProperties,\n type ReactNode,\n type RefObject,\n} from 'react';\nimport { useObjectRef } from 'react-aria';\nimport { cn } from '../../utils/cn';\nimport { useWarnOnce } from '../../utils/warn-once';\nimport { NavItem, type NavItemProps } from './NavItem';\nimport { navigationBarStyles, type NavigationBarArrangement } from './navigation-styles';\nimport { useHideOnScroll } from './use-hide-on-scroll';\nimport { onItemArrowKeys } from './use-item-arrow-keys';\nimport { mergeDataTokens } from '../../utils/merge-data-tokens';\n\ninterface BarContextValue {\n iconPlacement: 'top' | 'start';\n itemClassName: string;\n}\n\nconst BarContext = createContext<BarContextValue | null>(null);\n\ntype Naming =\n | {\n /** Accessible name for the navigation bar. Required unless `aria-labelledby` is set. */\n 'aria-label': string;\n }\n | {\n /** The id of the element that names the navigation bar. Required unless `aria-label` is set. */\n 'aria-labelledby': string;\n };\n\nexport interface NavigationBarClassNames {\n /** The `<nav>` container, merged with `className`. */\n root?: string;\n /** Every item in the bar, merged with each item's own classes. */\n item?: string;\n}\n\ninterface NavigationBarOwnProps {\n /**\n * Icons above labels (compact windows) or beside them (the flexible bar in medium\n * windows). Items beside their icons stack, sharing the width equally, whenever their\n * labels don't fit on one line side by side (a narrow bar or large text), so no label is\n * cut off; the bar then carries `data-stacked`. @default \"top\"\n */\n iconPlacement?: 'top' | 'start';\n /**\n * Share the width equally, or centre the items. Stacked items centre within side\n * padding; items beside their icons keep their own width, with the extra space at the\n * ends. @default \"equal\", or \"centered\" when iconPlacement is \"start\"\n */\n arrangement?: NavigationBarArrangement;\n /**\n * `hide-on-scroll` slides the bar off the bottom while the page scrolls down and back\n * on any scroll up. The bar becomes `sticky` at the bottom, so put it last in a\n * scrolling layout and don't add positioning classes. It stays put under reduced\n * motion. M3: don't hide the bar on scroll when a screen reader is active, so leave\n * this off where assistive tech is in use. @default \"pinned\"\n */\n scrollBehavior?: 'pinned' | 'hide-on-scroll';\n /** With `hide-on-scroll`, the element that scrolls instead of the page. */\n scrollRef?: RefObject<HTMLElement | null>;\n /** `NavigationBarItem` elements (3–5 in M3). */\n children: ReactNode;\n /** Classes for each part, by slot. */\n classNames?: NavigationBarClassNames;\n}\n\nexport type NavigationBarProps = NavigationBarOwnProps &\n Naming &\n Omit<\n ComponentPropsWithRef<'nav'>,\n keyof NavigationBarOwnProps | 'aria-label' | 'aria-labelledby'\n >;\n\n/**\n * M3 Expressive flexible navigation bar: 3–5 destinations along the bottom of compact and\n * medium windows. Items stack the icon above the label, or (`iconPlacement=\"start\"`) place\n * it beside the label in a 40px pill. Labels wrap rather than truncate, and the bar grows\n * to fit them. Tab or the arrow keys move between items.\n *\n * @example\n * <NavigationBar aria-label=\"Main\" className=\"fixed inset-x-0 bottom-0\">\n * <NavigationBarItem href=\"/\" icon={<HomeIcon />} selected>Home</NavigationBarItem>\n * </NavigationBar>\n */\nexport function NavigationBar({\n iconPlacement = 'top',\n arrangement = iconPlacement === 'start' ? 'centered' : 'equal',\n scrollBehavior = 'pinned',\n scrollRef,\n children,\n classNames,\n className,\n style,\n ref,\n onKeyDown,\n ...rest\n}: NavigationBarProps) {\n const navRef = useObjectRef(ref);\n const hideOnScroll = scrollBehavior === 'hide-on-scroll';\n useHideOnScroll(hideOnScroll, navRef, scrollRef);\n const stacked = useStackWhenCrowded(navRef, iconPlacement === 'start');\n // Inline items that don't fit on one line become stacked items sharing the width equally.\n const layout = stacked ? 'top' : iconPlacement;\n const styles = navigationBarStyles({\n arrangement: stacked ? 'equal' : arrangement,\n iconPlacement: layout,\n hideOnScroll,\n });\n const count = Children.toArray(children).filter(isValidElement).length;\n // M3: a navigation bar holds three to five destinations (fewer: tabs; more: a rail).\n useWarnOnce(\n count > 0 && (count < 3 || count > 5),\n `[@windmorph/react] A NavigationBar should have 3 to 5 destinations (M3); it has ${count}. Use tabs for two, and a navigation rail for more than five.`,\n );\n // Compose: centred stacked items sit within (100% − 10% × (n + 3)) / 2 each side, up to 6.\n const padding =\n arrangement === 'centered' && iconPlacement === 'top' && count <= 6\n ? `${(100 - 10 * (count + 3)) / 2}%`\n : undefined;\n const arrowKeys = onItemArrowKeys('horizontal');\n return (\n <nav\n {...rest}\n ref={navRef}\n onKeyDown={(event) => {\n onKeyDown?.(event);\n arrowKeys(event);\n }}\n style={{ paddingInline: padding, ...style } as CSSProperties}\n data-tokens={mergeDataTokens('md-comp-nav-bar', rest)}\n data-stacked={stacked || undefined}\n className={styles.root({ class: cn(classNames?.root, className) })}\n >\n <BarContext\n value={{ iconPlacement: layout, itemClassName: styles.item({ class: classNames?.item }) }}\n >\n {children}\n </BarContext>\n </nav>\n );\n}\n\n/**\n * An inline item's width besides its label: 4px outside the pill on each side, 16px inside\n * it, a 24px icon and the 4px gap before the label (`nav-item-styles.ts`, `bar-start`).\n */\nconst INLINE_ITEM_CHROME = 4 + 16 + 24 + 4 + 16 + 4;\n\n/**\n * Whether inline items must stack because their labels don't fit on one line side by side,\n * as at large text sizes (M3: \"Ensure the full label is always visible on-screen at up to 2x\n * text sizing\"; 2026-10-15). Each label is measured on one line (the same type role in both\n * layouts, so the answer doesn't change with the layout it picks), again whenever the bar\n * or a label resizes (a narrower window, a larger root text size, a web font loading).\n */\nfunction useStackWhenCrowded(navRef: RefObject<HTMLElement | null>, inline: boolean) {\n const [stacked, setStacked] = useState(false);\n useLayoutEffect(() => {\n const nav = navRef.current;\n if (!inline || !nav) {\n setStacked(false);\n return;\n }\n const labels = () => [...nav.querySelectorAll<HTMLElement>('[data-nav-label]')];\n const measure = () => {\n // Not laid out (hidden, or no layout engine): keep the layout asked for.\n if (nav.clientWidth === 0) return setStacked(false);\n let needed = 0;\n for (const label of labels()) {\n const wrap = label.style.whiteSpace;\n label.style.whiteSpace = 'nowrap';\n // A large badge on the icon takes room past the icon's end edge (12px inside it).\n const badge = label\n .closest('[data-nav-item]')\n ?.querySelector<HTMLElement>('[data-size=\"large\"]');\n const overhang = badge ? Math.max(0, badge.offsetWidth - 12) : 0;\n needed += label.scrollWidth + INLINE_ITEM_CHROME + overhang;\n label.style.whiteSpace = wrap;\n }\n const style = getComputedStyle(nav);\n const available =\n nav.clientWidth - parseFloat(style.paddingLeft) - parseFloat(style.paddingRight);\n setStacked(needed > available + 0.5);\n };\n measure();\n if (typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver(measure);\n observer.observe(nav);\n labels().forEach((label) => observer.observe(label));\n return () => observer.disconnect();\n }, [navRef, inline]);\n return inline && stacked;\n}\n\nexport type NavigationBarItemProps = NavItemProps;\n\n/** A destination in a {@link NavigationBar}: a link (`href`) or a button. */\nexport function NavigationBarItem({ className, ...props }: NavigationBarItemProps) {\n const bar = useContext(BarContext);\n if (!bar) throw new Error('NavigationBarItem must be rendered inside a NavigationBar');\n return (\n <NavItem\n {...(props as NavItemProps)}\n className={cn(bar.itemClassName, className)}\n layout={bar.iconPlacement === 'start' ? 'bar-start' : 'bar-top'}\n />\n );\n}\n"],"mappings":"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"}
@@ -0,0 +1,91 @@
1
+ import { NavItemProps } from "./NavItem.js";
2
+ import { ComponentPropsWithRef, ReactNode } from "react";
3
+ //#region src/components/navigation/NavigationRail.d.ts
4
+ type Naming = {
5
+ /** Accessible name for the navigation rail. Required unless `aria-labelledby` is set. */
6
+ 'aria-label': string;
7
+ } | {
8
+ /** The id of the element that names the navigation rail. Required unless `aria-label` is set. */
9
+ 'aria-labelledby': string;
10
+ };
11
+ export interface NavigationRailClassNames {
12
+ /** The `<nav>` container, merged with `className`. */
13
+ root?: string;
14
+ /** The in-flow rail's scrolling column, which holds the 44px top inset. */
15
+ body?: string;
16
+ /** The content above the items (`header`). */
17
+ header?: string;
18
+ /** The list of items. */
19
+ items?: string;
20
+ /** The expanded modal rail's sheet. */
21
+ sheet?: string;
22
+ /** The scrim behind the expanded modal rail. */
23
+ scrim?: string;
24
+ }
25
+ interface NavigationRailOwnProps {
26
+ /** Whether the rail is expanded (controlled). */
27
+ expanded?: boolean;
28
+ /** Whether the rail starts expanded (uncontrolled). @default false */
29
+ defaultExpanded?: boolean;
30
+ /** Called when the rail expands or collapses. */
31
+ onExpandedChange?: (expanded: boolean) => void;
32
+ /**
33
+ * Expand over the page as a modal sheet with a scrim instead of pushing content.
34
+ * Pressing outside, Escape or choosing an item collapses it.
35
+ * @default false
36
+ */
37
+ modal?: boolean;
38
+ /** With `modal`, show nothing while collapsed (the expanded rail slides in). @default false */
39
+ hideOnCollapse?: boolean;
40
+ /** Content above the items, e.g. a menu button and a FAB; a function receives the state. */
41
+ header?: ReactNode | ((state: {
42
+ expanded: boolean;
43
+ toggle: () => void;
44
+ }) => ReactNode);
45
+ /**
46
+ * Align the items as a group to the top, or to the middle of the space below the header
47
+ * (M3 recommends centre on tablets, within easier reach). The header stays at the top.
48
+ * @default "top"
49
+ */
50
+ itemAlignment?: 'top' | 'center';
51
+ /** Draw a divider on the edge next to the content. @default false */
52
+ divider?: boolean;
53
+ /**
54
+ * How the current item's pill moves to a newly chosen item. `expand` (M3: "the active
55
+ * indicator expands from the center of the icon") grows it in place. `slide` moves it from
56
+ * the previously chosen item on the fast spatial spring while the rail is expanded (in
57
+ * place or modal), as in Google's Expressive showcase; an extension beyond the M3 spec.
58
+ * The collapsed rail always expands, and reduced motion fades the pill in place.
59
+ * @default "expand"
60
+ */
61
+ indicatorMotion?: 'expand' | 'slide';
62
+ /** `NavigationRailItem` elements. */
63
+ children: ReactNode;
64
+ /** Classes for each part, by slot. */
65
+ classNames?: NavigationRailClassNames;
66
+ }
67
+ export type NavigationRailProps = NavigationRailOwnProps & Naming & Omit<ComponentPropsWithRef<'nav'>, keyof NavigationRailOwnProps | 'aria-label' | 'aria-labelledby'>;
68
+ /**
69
+ * M3 Expressive navigation rail: destinations along the start edge. Collapsed (96px) items
70
+ * show the icon above the label; expanded (220–360px) they show it beside the label and
71
+ * the rail's width springs open. With `modal`, the expanded rail opens over the page as a
72
+ * sheet with a scrim, focusing its first interactive element. Put a menu button in
73
+ * `header` to toggle `expanded`. Tab or the Up / Down arrows move between items, and
74
+ * labels wrap rather than truncate.
75
+ *
76
+ * Icons stay on one line through the middle of the collapsed rail in both states. For a
77
+ * different collapsed width, set `--m3-rail-collapsed-width` (e.g. the class
78
+ * `[--m3-rail-collapsed-width:80px]`) rather than a `w-*` class; M3's widths are 96px
79
+ * (Expressive) and 80px (baseline).
80
+ *
81
+ * @example
82
+ * <NavigationRail aria-label="Main" header={({ toggle }) => <IconButton icon={<MenuIcon />} aria-label="Menu" onPress={toggle} />}>
83
+ * <NavigationRailItem href="/inbox" icon={<InboxIcon />} selected>Inbox</NavigationRailItem>
84
+ * </NavigationRail>
85
+ */
86
+ export declare function NavigationRail({ expanded, defaultExpanded, onExpandedChange, modal, hideOnCollapse, header, itemAlignment, divider, indicatorMotion, children, classNames, className, style, ...rest }: NavigationRailProps): import("react").JSX.Element;
87
+ export type NavigationRailItemProps = NavItemProps;
88
+ /** A destination in a {@link NavigationRail}: a link (`href`) or a button. */
89
+ export declare function NavigationRailItem({ onPress, ...props }: NavigationRailItemProps): import("react").JSX.Element;
90
+ //#endregion
91
+ //# sourceMappingURL=NavigationRail.d.ts.map