material-plus-ui 1.6.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (501) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +20 -14
  3. package/dist/components/accordion/MPAccordion.d.ts +21 -1
  4. package/dist/components/accordion/MPAccordion.js +1 -1
  5. package/dist/components/alert/MPAlert.d.ts +34 -3
  6. package/dist/components/alert/MPAlert.js +1 -1
  7. package/dist/components/anchor/MPAnchor.d.ts +107 -0
  8. package/dist/components/anchor/MPAnchor.js +2 -0
  9. package/dist/components/anchor/index.d.ts +2 -0
  10. package/dist/components/anchor/index.js +1 -0
  11. package/dist/components/animate-appear/MPAnimateAppear.d.ts +2 -2
  12. package/dist/components/animate-appear/MPAnimateAppear.js +1 -1
  13. package/dist/components/animate-blink/MPAnimateBlink.d.ts +2 -2
  14. package/dist/components/animate-blink/MPAnimateBlink.js +2 -1
  15. package/dist/components/animate-counter/MPAnimateCounter.d.ts +67 -0
  16. package/dist/components/animate-counter/MPAnimateCounter.js +2 -0
  17. package/dist/components/animate-counter/index.d.ts +2 -0
  18. package/dist/components/animate-counter/index.js +1 -0
  19. package/dist/components/animate-fade/MPAnimateFade.d.ts +2 -2
  20. package/dist/components/animate-fade/MPAnimateFade.js +2 -1
  21. package/dist/components/animate-float/MPAnimateFloat.d.ts +53 -0
  22. package/dist/components/animate-float/MPAnimateFloat.js +2 -0
  23. package/dist/components/animate-float/index.d.ts +2 -0
  24. package/dist/components/animate-float/index.js +1 -0
  25. package/dist/components/animate-grow/MPAnimateGrow.d.ts +2 -2
  26. package/dist/components/animate-grow/MPAnimateGrow.js +2 -1
  27. package/dist/components/animate-lighting/MPAnimateLighting.js +1 -0
  28. package/dist/components/animate-reveal/MPAnimateReveal.d.ts +64 -0
  29. package/dist/components/animate-reveal/MPAnimateReveal.js +2 -0
  30. package/dist/components/animate-reveal/index.d.ts +2 -0
  31. package/dist/components/animate-reveal/index.js +1 -0
  32. package/dist/components/animate-rotate/MPAnimateRotate.d.ts +2 -2
  33. package/dist/components/animate-rotate/MPAnimateRotate.js +2 -1
  34. package/dist/components/animate-scramble/MPAnimateScramble.d.ts +65 -0
  35. package/dist/components/animate-scramble/MPAnimateScramble.js +2 -0
  36. package/dist/components/animate-scramble/index.d.ts +2 -0
  37. package/dist/components/animate-scramble/index.js +1 -0
  38. package/dist/components/animate-shake/MPAnimateShake.d.ts +65 -0
  39. package/dist/components/animate-shake/MPAnimateShake.js +2 -0
  40. package/dist/components/animate-shake/index.d.ts +2 -0
  41. package/dist/components/animate-shake/index.js +1 -0
  42. package/dist/components/animate-slide/MPAnimateSlide.d.ts +2 -2
  43. package/dist/components/animate-slide/MPAnimateSlide.js +2 -1
  44. package/dist/components/animate-split/MPAnimateSplit.d.ts +56 -0
  45. package/dist/components/animate-split/MPAnimateSplit.js +2 -0
  46. package/dist/components/animate-split/index.d.ts +2 -0
  47. package/dist/components/animate-split/index.js +1 -0
  48. package/dist/components/animate-typing/MPAnimateTyping.js +1 -1
  49. package/dist/components/animate-zoom/MPAnimateZoom.d.ts +2 -2
  50. package/dist/components/animate-zoom/MPAnimateZoom.js +2 -1
  51. package/dist/components/app-logo/MPAppLogo.d.ts +171 -0
  52. package/dist/components/app-logo/MPAppLogo.js +2 -0
  53. package/dist/components/app-logo/index.d.ts +2 -0
  54. package/dist/components/app-logo/index.js +1 -0
  55. package/dist/components/area-chart/MPAreaChart.d.ts +79 -0
  56. package/dist/components/area-chart/MPAreaChart.js +2 -0
  57. package/dist/components/area-chart/index.d.ts +2 -0
  58. package/dist/components/area-chart/index.js +1 -0
  59. package/dist/components/aspect-ratio/MPAspectRatio.d.ts +1 -1
  60. package/dist/components/aspect-ratio/MPAspectRatio.js +2 -1
  61. package/dist/components/avatar/MPAvatar.d.ts +10 -1
  62. package/dist/components/avatar/MPAvatar.js +1 -1
  63. package/dist/components/bar-chart/MPBarChart.d.ts +74 -0
  64. package/dist/components/bar-chart/MPBarChart.js +2 -0
  65. package/dist/components/bar-chart/index.d.ts +2 -0
  66. package/dist/components/bar-chart/index.js +1 -0
  67. package/dist/components/blockquote/MPBlockquote.d.ts +18 -1
  68. package/dist/components/blockquote/MPBlockquote.js +1 -1
  69. package/dist/components/bottom-navigation/MPBottomNavigation.d.ts +2 -18
  70. package/dist/components/bottom-navigation/MPBottomNavigation.js +1 -1
  71. package/dist/components/box/MPBox.d.ts +43 -8
  72. package/dist/components/box/MPBox.js +2 -1
  73. package/dist/components/breadcrumb/MPBreadcrumb.js +1 -1
  74. package/dist/components/button/MPButton.js +1 -1
  75. package/dist/components/calendar/MPCalendar.js +1 -1
  76. package/dist/components/card/MPCard.js +1 -1
  77. package/dist/components/carousel/MPCarousel.js +1 -1
  78. package/dist/components/checkbox/MPCheckbox.js +1 -1
  79. package/dist/components/chip/MPChip.d.ts +11 -2
  80. package/dist/components/chip/MPChip.js +1 -1
  81. package/dist/components/code-block/MPCodeBlock.d.ts +177 -0
  82. package/dist/components/code-block/MPCodeBlock.js +2 -0
  83. package/dist/components/code-block/index.d.ts +2 -0
  84. package/dist/components/code-block/index.js +1 -0
  85. package/dist/components/collapsible/MPCollapsible.d.ts +12 -1
  86. package/dist/components/collapsible/MPCollapsible.js +1 -1
  87. package/dist/components/color-picker/MPColorPicker.js +1 -1
  88. package/dist/components/combobox/MPCombobox.d.ts +21 -4
  89. package/dist/components/combobox/MPCombobox.js +1 -1
  90. package/dist/components/command-palette/MPCommandPalette.d.ts +12 -2
  91. package/dist/components/command-palette/MPCommandPalette.js +1 -1
  92. package/dist/components/config/MPConfigProvider.d.ts +49 -7
  93. package/dist/components/config/MPConfigProvider.js +1 -1
  94. package/dist/components/confirm/MPConfirmProvider.js +1 -1
  95. package/dist/components/container/MPContainer.d.ts +9 -2
  96. package/dist/components/container/MPContainer.js +2 -1
  97. package/dist/components/data-list/MPDataList.d.ts +82 -0
  98. package/dist/components/data-list/MPDataList.js +2 -0
  99. package/dist/components/data-list/index.d.ts +2 -0
  100. package/dist/components/data-list/index.js +1 -0
  101. package/dist/components/data-table/MPDataTable.d.ts +314 -0
  102. package/dist/components/data-table/MPDataTable.js +2 -0
  103. package/dist/components/data-table/index.d.ts +2 -0
  104. package/dist/components/data-table/index.js +1 -0
  105. package/dist/components/date-picker/MPDatePicker.js +1 -1
  106. package/dist/components/dialog/MPDialog.d.ts +10 -2
  107. package/dist/components/dialog/MPDialog.js +1 -1
  108. package/dist/components/drawer/MPDrawer.d.ts +8 -2
  109. package/dist/components/drawer/MPDrawer.js +1 -1
  110. package/dist/components/empty/MPEmpty.d.ts +10 -1
  111. package/dist/components/empty/MPEmpty.js +1 -1
  112. package/dist/components/fieldset/MPFieldset.js +1 -1
  113. package/dist/components/file-picker/MPFilePicker.js +1 -1
  114. package/dist/components/flex/MPFlex.d.ts +95 -0
  115. package/dist/components/flex/MPFlex.js +2 -0
  116. package/dist/components/flex/index.d.ts +2 -0
  117. package/dist/components/flex/index.js +1 -0
  118. package/dist/components/floating-action-button/MPFloatingActionButton.js +1 -1
  119. package/dist/components/floating-bottom-navigation/MPFloatingBottomNavigation.d.ts +127 -0
  120. package/dist/components/floating-bottom-navigation/MPFloatingBottomNavigation.js +2 -0
  121. package/dist/components/floating-bottom-navigation/index.d.ts +2 -0
  122. package/dist/components/floating-bottom-navigation/index.js +1 -0
  123. package/dist/components/footer/MPFooter.d.ts +24 -4
  124. package/dist/components/footer/MPFooter.js +1 -1
  125. package/dist/components/form/MPForm.js +1 -1
  126. package/dist/components/gauge-chart/MPGaugeChart.d.ts +78 -0
  127. package/dist/components/gauge-chart/MPGaugeChart.js +2 -0
  128. package/dist/components/gauge-chart/index.d.ts +2 -0
  129. package/dist/components/gauge-chart/index.js +1 -0
  130. package/dist/components/grid/MPGrid.d.ts +25 -8
  131. package/dist/components/grid/MPGrid.js +1 -1
  132. package/dist/components/header/MPHeader.d.ts +26 -4
  133. package/dist/components/header/MPHeader.js +1 -1
  134. package/dist/components/heatmap-chart/MPHeatmapChart.d.ts +75 -0
  135. package/dist/components/heatmap-chart/MPHeatmapChart.js +2 -0
  136. package/dist/components/heatmap-chart/index.d.ts +2 -0
  137. package/dist/components/heatmap-chart/index.js +1 -0
  138. package/dist/components/hover-card/MPHoverCard.d.ts +101 -0
  139. package/dist/components/hover-card/MPHoverCard.js +2 -0
  140. package/dist/components/hover-card/index.d.ts +2 -0
  141. package/dist/components/hover-card/index.js +1 -0
  142. package/dist/components/icon/MPIcon.js +1 -1
  143. package/dist/components/image/MPImage.d.ts +122 -5
  144. package/dist/components/image/MPImage.js +1 -1
  145. package/dist/components/image/index.d.ts +1 -1
  146. package/dist/components/line-chart/MPLineChart.d.ts +66 -0
  147. package/dist/components/line-chart/MPLineChart.js +2 -0
  148. package/dist/components/line-chart/index.d.ts +2 -0
  149. package/dist/components/line-chart/index.js +1 -0
  150. package/dist/components/list/MPList.d.ts +23 -1
  151. package/dist/components/list/MPList.js +1 -1
  152. package/dist/components/menu/MPMenu.d.ts +1 -1
  153. package/dist/components/menu/MPMenu.js +1 -1
  154. package/dist/components/menubar/MPMenubar.js +1 -1
  155. package/dist/components/meter/MPMeter.d.ts +87 -0
  156. package/dist/components/meter/MPMeter.js +2 -0
  157. package/dist/components/meter/index.d.ts +2 -0
  158. package/dist/components/meter/index.js +1 -0
  159. package/dist/components/mockup/MPMockup.d.ts +143 -0
  160. package/dist/components/mockup/MPMockup.js +2 -0
  161. package/dist/components/mockup/index.d.ts +2 -0
  162. package/dist/components/mockup/index.js +1 -0
  163. package/dist/components/navigation-menu/MPNavigationMenu.js +1 -1
  164. package/dist/components/number-field/MPNumberField.js +1 -1
  165. package/dist/components/pie-chart/MPPieChart.d.ts +77 -0
  166. package/dist/components/pie-chart/MPPieChart.js +2 -0
  167. package/dist/components/pie-chart/index.d.ts +2 -0
  168. package/dist/components/pie-chart/index.js +1 -0
  169. package/dist/components/pill/MPPill.js +1 -1
  170. package/dist/components/popconfirm/MPPopconfirm.d.ts +2 -2
  171. package/dist/components/popover/MPPopover.d.ts +1 -0
  172. package/dist/components/popover/MPPopover.js +1 -1
  173. package/dist/components/portal/MPPortal.d.ts +75 -0
  174. package/dist/components/portal/MPPortal.js +2 -0
  175. package/dist/components/portal/index.d.ts +2 -0
  176. package/dist/components/portal/index.js +1 -0
  177. package/dist/components/radio-group/MPRadioGroup.js +1 -1
  178. package/dist/components/rating/MPRating.js +1 -1
  179. package/dist/components/scatter-chart/MPScatterChart.d.ts +66 -0
  180. package/dist/components/scatter-chart/MPScatterChart.js +2 -0
  181. package/dist/components/scatter-chart/index.d.ts +2 -0
  182. package/dist/components/scatter-chart/index.js +1 -0
  183. package/dist/components/scroll-area/MPScrollArea.d.ts +82 -0
  184. package/dist/components/scroll-area/MPScrollArea.js +2 -0
  185. package/dist/components/scroll-area/index.d.ts +2 -0
  186. package/dist/components/scroll-area/index.js +1 -0
  187. package/dist/components/scroll-zone/MPScrollZone.d.ts +165 -0
  188. package/dist/components/scroll-zone/MPScrollZone.js +2 -0
  189. package/dist/components/scroll-zone/index.d.ts +2 -0
  190. package/dist/components/scroll-zone/index.js +1 -0
  191. package/dist/components/segmented-button/MPSegmentedButton.js +1 -1
  192. package/dist/components/select/MPSelect.d.ts +27 -4
  193. package/dist/components/select/MPSelect.js +1 -1
  194. package/dist/components/show/MPShow.d.ts +78 -0
  195. package/dist/components/show/MPShow.js +2 -0
  196. package/dist/components/show/index.d.ts +2 -0
  197. package/dist/components/show/index.js +1 -0
  198. package/dist/components/sidebar/MPSidebar.d.ts +20 -1
  199. package/dist/components/sidebar/MPSidebar.js +1 -1
  200. package/dist/components/sparkline/MPSparkline.d.ts +85 -0
  201. package/dist/components/sparkline/MPSparkline.js +2 -0
  202. package/dist/components/sparkline/index.d.ts +2 -0
  203. package/dist/components/sparkline/index.js +1 -0
  204. package/dist/components/spoiler/MPSpoiler.d.ts +12 -0
  205. package/dist/components/spoiler/MPSpoiler.js +1 -1
  206. package/dist/components/stack/MPStack.d.ts +198 -0
  207. package/dist/components/stack/MPStack.js +2 -0
  208. package/dist/components/stack/index.d.ts +2 -0
  209. package/dist/components/stack/index.js +1 -0
  210. package/dist/components/statistic/MPStatistic.d.ts +104 -0
  211. package/dist/components/statistic/MPStatistic.js +2 -0
  212. package/dist/components/statistic/index.d.ts +2 -0
  213. package/dist/components/statistic/index.js +1 -0
  214. package/dist/components/stepper/MPStepper.js +1 -1
  215. package/dist/components/table/MPTable.d.ts +25 -3
  216. package/dist/components/table/MPTable.js +1 -1
  217. package/dist/components/tabs/MPTabs.d.ts +12 -0
  218. package/dist/components/tabs/MPTabs.js +1 -1
  219. package/dist/components/timeline/MPTimeline.js +1 -1
  220. package/dist/components/timeline-chart/MPTimelineChart.d.ts +63 -0
  221. package/dist/components/timeline-chart/MPTimelineChart.js +2 -0
  222. package/dist/components/timeline-chart/index.d.ts +2 -0
  223. package/dist/components/timeline-chart/index.js +1 -0
  224. package/dist/components/toggle/MPToggle.js +1 -1
  225. package/dist/components/toolbar/MPToolbar.d.ts +106 -0
  226. package/dist/components/toolbar/MPToolbar.js +2 -0
  227. package/dist/components/toolbar/index.d.ts +2 -0
  228. package/dist/components/toolbar/index.js +1 -0
  229. package/dist/components/tooltip/MPTooltip.js +1 -1
  230. package/dist/components/tour/MPTour.d.ts +120 -0
  231. package/dist/components/tour/MPTour.js +2 -0
  232. package/dist/components/tour/index.d.ts +2 -0
  233. package/dist/components/tour/index.js +1 -0
  234. package/dist/components/transfer/MPTransfer.js +1 -1
  235. package/dist/components/tree-select/MPTreeSelect.d.ts +113 -0
  236. package/dist/components/tree-select/MPTreeSelect.js +2 -0
  237. package/dist/components/tree-select/index.d.ts +2 -0
  238. package/dist/components/tree-select/index.js +1 -0
  239. package/dist/components/tree-view/MPTreeView.d.ts +153 -0
  240. package/dist/components/tree-view/MPTreeView.js +2 -0
  241. package/dist/components/tree-view/index.d.ts +2 -0
  242. package/dist/components/tree-view/index.js +1 -0
  243. package/dist/components/typography/MPTypography.d.ts +10 -1
  244. package/dist/components/typography/MPTypography.js +2 -1
  245. package/dist/constants/glyphs.d.ts +33 -31
  246. package/dist/constants/glyphs.js +1 -1
  247. package/dist/constants/icons.d.ts +32 -31
  248. package/dist/constants/icons.js +1 -1
  249. package/dist/hooks/index.d.ts +22 -5
  250. package/dist/hooks/index.js +1 -1
  251. package/dist/hooks/useMPColorScheme.js +1 -0
  252. package/dist/hooks/useMPDisclosure.d.ts +58 -0
  253. package/dist/hooks/useMPDisclosure.js +2 -0
  254. package/dist/hooks/useMPElementSize.d.ts +55 -0
  255. package/dist/hooks/useMPElementSize.js +2 -0
  256. package/dist/hooks/useMPMediaQuery.d.ts +40 -0
  257. package/dist/hooks/useMPMediaQuery.js +2 -0
  258. package/dist/hooks/useMPOnScreen.d.ts +58 -0
  259. package/dist/hooks/useMPOnScreen.js +2 -0
  260. package/dist/hooks/useMPReducedMotion.js +1 -0
  261. package/dist/hooks/useMPWindowClass.d.ts +7 -0
  262. package/dist/hooks/useMPWindowClass.js +1 -0
  263. package/dist/index.d.ts +35 -1
  264. package/dist/index.js +1 -1
  265. package/dist/internal/Calendar.js +1 -1
  266. package/dist/internal/ChartChrome.d.ts +199 -0
  267. package/dist/internal/ChartChrome.js +2 -0
  268. package/dist/internal/ChartFrame.d.ts +197 -0
  269. package/dist/internal/ChartFrame.js +2 -0
  270. package/dist/internal/FieldOutline.d.ts +14 -5
  271. package/dist/internal/FieldOutline.js +1 -1
  272. package/dist/internal/Picker.js +1 -1
  273. package/dist/internal/PopupArrow.d.ts +60 -0
  274. package/dist/internal/PopupArrow.js +2 -0
  275. package/dist/internal/SupportingText.d.ts +24 -0
  276. package/dist/internal/SupportingText.js +1 -1
  277. package/dist/internal/animate-core.d.ts +121 -0
  278. package/dist/internal/animate-core.js +1 -0
  279. package/dist/internal/animate.d.ts +75 -55
  280. package/dist/internal/animate.js +1 -1
  281. package/dist/internal/bottom-navigation.d.ts +58 -0
  282. package/dist/internal/bottom-navigation.js +2 -0
  283. package/dist/internal/chart.d.ts +461 -0
  284. package/dist/internal/chart.js +1 -0
  285. package/dist/internal/color-scheme.d.ts +0 -9
  286. package/dist/internal/color-scheme.js +1 -1
  287. package/dist/internal/config.d.ts +24 -5
  288. package/dist/internal/config.js +1 -1
  289. package/dist/internal/data-table.d.ts +195 -0
  290. package/dist/internal/data-table.js +1 -0
  291. package/dist/internal/date.d.ts +22 -18
  292. package/dist/internal/date.js +1 -1
  293. package/dist/internal/density.d.ts +9 -0
  294. package/dist/internal/density.js +1 -0
  295. package/dist/internal/elevation.d.ts +26 -0
  296. package/dist/internal/elevation.js +1 -0
  297. package/dist/internal/highlight.d.ts +96 -0
  298. package/dist/internal/highlight.js +1 -0
  299. package/dist/internal/i18n.d.ts +180 -0
  300. package/dist/internal/initials.d.ts +28 -0
  301. package/dist/internal/initials.js +1 -0
  302. package/dist/internal/intl.d.ts +64 -0
  303. package/dist/internal/intl.js +1 -0
  304. package/dist/internal/mark.d.ts +52 -0
  305. package/dist/internal/mark.js +1 -0
  306. package/dist/internal/measure.d.ts +31 -0
  307. package/dist/internal/measure.js +1 -0
  308. package/dist/internal/messages/anchor.d.ts +3 -0
  309. package/dist/internal/messages/anchor.js +1 -0
  310. package/dist/internal/messages/chart.d.ts +3 -0
  311. package/dist/internal/messages/chart.js +1 -0
  312. package/dist/internal/messages/code.d.ts +3 -0
  313. package/dist/internal/messages/code.js +1 -0
  314. package/dist/internal/messages/data-table.d.ts +3 -0
  315. package/dist/internal/messages/data-table.js +1 -0
  316. package/dist/internal/messages/scroll.d.ts +3 -0
  317. package/dist/internal/messages/scroll.js +1 -0
  318. package/dist/internal/messages/sparkline.d.ts +3 -0
  319. package/dist/internal/messages/sparkline.js +1 -0
  320. package/dist/internal/messages/tour.d.ts +3 -0
  321. package/dist/internal/messages/tour.js +1 -0
  322. package/dist/internal/messages/transfer.d.ts +1 -1
  323. package/dist/internal/messages/transfer.js +1 -1
  324. package/dist/internal/mockup.d.ts +174 -0
  325. package/dist/internal/mockup.js +2 -0
  326. package/dist/internal/page-layout.d.ts +24 -5
  327. package/dist/internal/page-layout.js +1 -1
  328. package/dist/internal/responsive.d.ts +55 -0
  329. package/dist/internal/responsive.js +1 -0
  330. package/dist/internal/scale.d.ts +0 -17
  331. package/dist/internal/scale.js +1 -1
  332. package/dist/internal/step.d.ts +15 -0
  333. package/dist/internal/step.js +1 -1
  334. package/dist/internal/table.d.ts +53 -0
  335. package/dist/internal/table.js +1 -0
  336. package/dist/internal/text.d.ts +57 -0
  337. package/dist/internal/text.js +1 -0
  338. package/dist/internal/threshold.d.ts +19 -0
  339. package/dist/internal/threshold.js +1 -0
  340. package/dist/internal/time-scale.d.ts +44 -0
  341. package/dist/internal/time-scale.js +1 -0
  342. package/dist/internal/transition.d.ts +33 -0
  343. package/dist/internal/transition.js +1 -0
  344. package/dist/internal/visibility.d.ts +48 -0
  345. package/dist/internal/visibility.js +1 -0
  346. package/dist/internal/window-class.d.ts +29 -2
  347. package/dist/internal/window-class.js +1 -1
  348. package/dist/locales/ar.js +1 -1
  349. package/dist/locales/de.js +1 -1
  350. package/dist/locales/es.js +1 -1
  351. package/dist/locales/fr.js +1 -1
  352. package/dist/locales/hi.js +1 -1
  353. package/dist/locales/id.js +1 -1
  354. package/dist/locales/it.js +1 -1
  355. package/dist/locales/ja.js +1 -1
  356. package/dist/locales/ko.js +1 -1
  357. package/dist/locales/nl.js +1 -1
  358. package/dist/locales/pl.js +1 -1
  359. package/dist/locales/pt.js +1 -1
  360. package/dist/locales/ru.js +1 -1
  361. package/dist/locales/th.js +1 -1
  362. package/dist/locales/tr.js +1 -1
  363. package/dist/locales/vi.js +1 -1
  364. package/dist/locales/zh-hans.js +1 -1
  365. package/dist/locales/zh-hant.js +1 -1
  366. package/dist/styles/accordion.css +1 -1
  367. package/dist/styles/alert.css +1 -1
  368. package/dist/styles/anchor.css +2 -0
  369. package/dist/styles/animate-appear.css +1 -1
  370. package/dist/styles/animate-blink.css +1 -1
  371. package/dist/styles/animate-counter.css +2 -0
  372. package/dist/styles/animate-fade.css +1 -1
  373. package/dist/styles/animate-float.css +2 -0
  374. package/dist/styles/animate-grow.css +1 -1
  375. package/dist/styles/animate-headline.css +1 -1
  376. package/dist/styles/animate-lighting.css +1 -1
  377. package/dist/styles/animate-marquee.css +1 -1
  378. package/dist/styles/animate-reveal.css +2 -0
  379. package/dist/styles/animate-rotate.css +1 -1
  380. package/dist/styles/animate-scramble.css +2 -0
  381. package/dist/styles/animate-shake.css +2 -0
  382. package/dist/styles/animate-slide.css +1 -1
  383. package/dist/styles/animate-split.css +2 -0
  384. package/dist/styles/animate-typing.css +1 -1
  385. package/dist/styles/animate-zoom.css +1 -1
  386. package/dist/styles/app-logo.css +2 -0
  387. package/dist/styles/area-chart.css +2 -0
  388. package/dist/styles/aspect-ratio.css +1 -1
  389. package/dist/styles/avatar.css +1 -1
  390. package/dist/styles/badge.css +1 -1
  391. package/dist/styles/bar-chart.css +2 -0
  392. package/dist/styles/blockquote.css +1 -1
  393. package/dist/styles/bottom-navigation.css +1 -1
  394. package/dist/styles/box.css +1 -1
  395. package/dist/styles/breadcrumb.css +1 -1
  396. package/dist/styles/button.css +1 -1
  397. package/dist/styles/calendar.css +1 -1
  398. package/dist/styles/card.css +1 -1
  399. package/dist/styles/carousel.css +1 -1
  400. package/dist/styles/chat-bubble.css +1 -1
  401. package/dist/styles/checkbox.css +1 -1
  402. package/dist/styles/chip.css +1 -1
  403. package/dist/styles/code-block.css +2 -0
  404. package/dist/styles/collapsible.css +1 -1
  405. package/dist/styles/color-picker.css +1 -1
  406. package/dist/styles/combobox.css +1 -1
  407. package/dist/styles/command-palette.css +1 -1
  408. package/dist/styles/config.css +1 -1
  409. package/dist/styles/confirm.css +1 -1
  410. package/dist/styles/container.css +1 -1
  411. package/dist/styles/data-list.css +2 -0
  412. package/dist/styles/data-table.css +2 -0
  413. package/dist/styles/date-picker.css +1 -1
  414. package/dist/styles/date-range-picker.css +1 -1
  415. package/dist/styles/date-time-picker.css +1 -1
  416. package/dist/styles/dialog.css +1 -1
  417. package/dist/styles/divider.css +1 -1
  418. package/dist/styles/drawer.css +1 -1
  419. package/dist/styles/empty.css +1 -1
  420. package/dist/styles/fieldset.css +1 -1
  421. package/dist/styles/file-picker.css +1 -1
  422. package/dist/styles/flex.css +2 -0
  423. package/dist/styles/floating-action-button.css +1 -1
  424. package/dist/styles/floating-bottom-navigation.css +2 -0
  425. package/dist/styles/footer.css +1 -1
  426. package/dist/styles/form.css +1 -1
  427. package/dist/styles/gauge-chart.css +2 -0
  428. package/dist/styles/grid.css +1 -1
  429. package/dist/styles/header.css +1 -1
  430. package/dist/styles/heatmap-chart.css +2 -0
  431. package/dist/styles/highlight.css +1 -1
  432. package/dist/styles/hover-card.css +2 -0
  433. package/dist/styles/icon-button.css +1 -1
  434. package/dist/styles/icon.css +1 -1
  435. package/dist/styles/image.css +1 -1
  436. package/dist/styles/line-chart.css +2 -0
  437. package/dist/styles/list.css +1 -1
  438. package/dist/styles/locale.css +1 -1
  439. package/dist/styles/menu.css +1 -1
  440. package/dist/styles/menubar.css +1 -1
  441. package/dist/styles/meter.css +2 -0
  442. package/dist/styles/mockup.css +2 -0
  443. package/dist/styles/navigation-menu.css +1 -1
  444. package/dist/styles/number-field.css +1 -1
  445. package/dist/styles/otp-field.css +1 -1
  446. package/dist/styles/overlay.css +1 -1
  447. package/dist/styles/page-layout.css +1 -1
  448. package/dist/styles/pagination.css +1 -1
  449. package/dist/styles/pie-chart.css +2 -0
  450. package/dist/styles/pill.css +1 -1
  451. package/dist/styles/popconfirm.css +1 -1
  452. package/dist/styles/popover.css +1 -1
  453. package/dist/styles/portal.css +2 -0
  454. package/dist/styles/progress-box.css +1 -1
  455. package/dist/styles/progress-circular.css +1 -1
  456. package/dist/styles/progress-linear.css +1 -1
  457. package/dist/styles/radio-group.css +1 -1
  458. package/dist/styles/rating.css +1 -1
  459. package/dist/styles/scatter-chart.css +2 -0
  460. package/dist/styles/scroll-area.css +2 -0
  461. package/dist/styles/scroll-zone.css +2 -0
  462. package/dist/styles/segmented-button.css +1 -1
  463. package/dist/styles/select.css +1 -1
  464. package/dist/styles/show.css +2 -0
  465. package/dist/styles/sidebar.css +1 -1
  466. package/dist/styles/skeleton.css +1 -1
  467. package/dist/styles/slider.css +1 -1
  468. package/dist/styles/snackbar.css +1 -1
  469. package/dist/styles/sparkline.css +2 -0
  470. package/dist/styles/spoiler.css +1 -1
  471. package/dist/styles/stack.css +2 -0
  472. package/dist/styles/statistic.css +2 -0
  473. package/dist/styles/stepper.css +1 -1
  474. package/dist/styles/switch.css +1 -1
  475. package/dist/styles/table.css +1 -1
  476. package/dist/styles/tabs.css +1 -1
  477. package/dist/styles/text-field.css +1 -1
  478. package/dist/styles/text-link.css +1 -1
  479. package/dist/styles/time-picker.css +1 -1
  480. package/dist/styles/timeline-chart.css +2 -0
  481. package/dist/styles/timeline.css +1 -1
  482. package/dist/styles/toggle.css +1 -1
  483. package/dist/styles/tokens.css +1 -1
  484. package/dist/styles/toolbar.css +2 -0
  485. package/dist/styles/tour.css +2 -0
  486. package/dist/styles/transfer.css +1 -1
  487. package/dist/styles/tree-select.css +2 -0
  488. package/dist/styles/tree-view.css +2 -0
  489. package/dist/styles/typography.css +1 -1
  490. package/dist/styles.css +1 -1
  491. package/dist/tailwind.css +2606 -185
  492. package/dist/types.d.ts +566 -5
  493. package/package.json +26 -25
  494. package/.fix.py +0 -92
  495. package/dist/components/avatar-group/MPAvatarGroup.d.ts +0 -74
  496. package/dist/components/avatar-group/MPAvatarGroup.js +0 -2
  497. package/dist/components/avatar-group/index.d.ts +0 -2
  498. package/dist/components/avatar-group/index.js +0 -1
  499. package/dist/internal/avatar-group.d.ts +0 -22
  500. package/dist/internal/avatar-group.js +0 -2
  501. package/dist/styles/avatar-group.css +0 -2
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Dialog } from '@base-ui/react/dialog';
3
- import type { MPColor, MPControlEventProps, MPSize } from '../../types.js';
3
+ import type { MPColor, MPControlEventProps, MPSize, MPSlots } from '../../types.js';
4
4
  /**
5
5
  * A dialog takes `size` and `color` and stops there.
6
6
  *
@@ -126,6 +126,14 @@ export interface MPDialogProps extends MPControlEventProps<HTMLElement> {
126
126
  children?: React.ReactNode;
127
127
  className?: string;
128
128
  style?: React.CSSProperties;
129
+ /**
130
+ * A class name for a part `className` cannot reach.
131
+ *
132
+ * - `backdrop` — the scrim behind the sheet. It is a sibling of the dialog
133
+ * rather than a child, and both render at the end of `<body>`, so nothing
134
+ * written against the root reaches it.
135
+ */
136
+ classNames?: MPSlots<'backdrop'>;
129
137
  }
130
138
  export type MPDialogCloseProps = React.ComponentProps<typeof Dialog.Close>;
131
139
  /**
@@ -160,4 +168,4 @@ export declare const MPDialogClose: React.ForwardRefExoticComponent<Omit<import(
160
168
  * is no `variant`: a dialog that could be told to sit flat on the page would be a
161
169
  * dialog that could be told to stop being a dialog.
162
170
  */
163
- export declare function MPDialog({ open, defaultOpen, onOpenChange, trigger, icon, title, description, actions, dividers, showClose, closeLabel, locale: localeProp, width, fullWidth, fullScreen, modal, dismissible, size: sizeProp, color, onKeyDown, onKeyUp, onFocus, onBlur, onClick, onDoubleClick, onContextMenu, className, style, children }: MPDialogProps): React.JSX.Element;
171
+ export declare function MPDialog({ open, defaultOpen, onOpenChange, trigger, icon, title, description, actions, dividers, showClose, closeLabel, locale: localeProp, width, fullWidth, fullScreen, modal, dismissible, size: sizeProp, color, onKeyDown, onKeyUp, onFocus, onBlur, onClick, onDoubleClick, onContextMenu, classNames, className, style, children }: MPDialogProps): React.JSX.Element;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as e,jsxs as l}from"react/jsx-runtime";import{Dialog as n}from"@base-ui/react/dialog";import{MPIcon as o}from"../icon/MPIcon.js";import{CloseIcon as t}from"../../constants/icons.js";import{accentSlots as i}from"../../internal/accent.js";import{cssLength as s}from"../../internal/length.js";import{useMPLocale as a,useMPMessages as r}from"../../internal/locale.js";import{COMMON as m}from"../../internal/messages/common.js";import{MPStateLayer as c}from"../../internal/StateLayer.js";import{SHEET_GAP as p,hasContent as d}from"../../internal/scale.js";import{FADE as x,PORTAL_LAYER as f,SCRIM as u,SHEET_MOTION as h}from"../../internal/surface.js";import{useMPSize as g}from"../../internal/config.js";const y={xs:"max-w-[320px]",sm:"max-w-[400px]",md:"max-w-[560px]",lg:"max-w-[720px]",xl:"max-w-[960px]"},j=`transition-[opacity,scale] ${h}`,b=/*@__PURE__*/["motion-safe:data-starting-style:scale-95","motion-safe:data-ending-style:scale-95"].join(" "),v={xs:"p-3",sm:"p-4",md:"p-6",lg:"p-7",xl:"p-8"},w={xs:"px-3",sm:"px-4",md:"px-6",lg:"px-7",xl:"px-8"},C={xs:"py-3",sm:"py-4",md:"py-6",lg:"py-7",xl:"py-8"},N={xs:"text-mp-title-medium",sm:"text-mp-title-large",md:"text-mp-headline-small",lg:"text-mp-headline-medium",xl:"text-mp-headline-large"},k={xs:"text-mp-body-small",sm:"text-mp-body-small",md:"text-mp-body-medium",lg:"text-mp-body-large",xl:"text-mp-body-large"},$={xs:20,sm:22,md:24,lg:28,xl:32};export const MPDialogClose=n.Close;export function MPDialog({open:h,defaultOpen:D,onOpenChange:B,trigger:P,icon:M,title:z,description:K,actions:O,dividers:F=!1,showClose:L,closeLabel:S,locale:T,width:U,fullWidth:W=!0,fullScreen:I=!1,modal:R=!0,dismissible:V=!0,size:_,color:q="secondary",onKeyDown:A,onKeyUp:E,onFocus:G,onBlur:H,onClick:J,onDoubleClick:Q,onContextMenu:X,className:Y,style:Z,children:ee}){const le=g(_),ne=a(T),oe=r(m,ne),te=L??I,ie=d(M),se=d(z)||d(K)||ie,ae=d(O),re=F?v[le]:w[le],me="border-mp-outline-variant border-t";return l(n.Root,{open:h,defaultOpen:D,modal:R,disablePointerDismissal:!V,onOpenChange:(e,l)=>{V||e||"escape-key"!==l.reason?B?.(e):l.cancel()},children:[P?e(n.Trigger,{render:P}):null,l(n.Portal,{children:[e(n.Backdrop,{className:`${f} fixed inset-0 ${x} ${u}`}),e(n.Viewport,{className:[f,"fixed inset-0 flex justify-center",I?"items-stretch":"items-center p-4"].join(" "),children:l(n.Popup,{"data-mp-size":le,onKeyDown:A,onKeyUp:E,onFocus:G,onBlur:H,onClick:J,onDoubleClick:Q,onContextMenu:X,className:["mp-dialog relative flex w-full flex-col overflow-hidden","bg-mp-surface-container-high text-mp-on-surface shadow-mp-3 outline-none",I?"h-full max-w-none rounded-none":`rounded-mp-xl max-h-full ${void 0===U?y[le]:""}`,I||W?"":"w-auto",F?"":`${C[le]} ${p[le]}`,j,I?"":b,Y??""].filter(Boolean).join(" "),style:{...i(q),...void 0===U||I?null:{maxWidth:s(U)},...Z},children:[se||te?l("div",{className:["flex shrink-0 items-start gap-3",re,ie&&!te?"flex-col items-center text-center":""].filter(Boolean).join(" "),children:[ie?e("span",{className:"flex shrink-0 items-center justify-center text-(--_mp-accent)",children:M}):null,l("div",{className:`flex min-w-0 flex-1 flex-col ${p[le]}`,children:[d(z)?e(n.Title,{className:`m-0 ${N[le]}`,children:z}):null,d(K)?e(n.Description,{className:`text-mp-on-surface-variant m-0 ${k[le]}`,children:K}):null]}),te?l(n.Close,{"aria-label":S??oe.close,className:["group text-mp-on-surface-variant relative flex size-10 shrink-0","rounded-mp-full cursor-pointer items-center justify-center","outline-mp-secondary focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-solid outline-none"].join(" "),children:[e(c,{}),e(o,{icon:t,size:$[le]})]}):null]}):null,d(ee)?e("div",{className:["min-h-0 flex-1 overflow-y-auto overscroll-contain",k[le],re,F&&(se||te)?me:""].filter(Boolean).join(" "),children:ee}):null,ae?e("div",{className:["flex shrink-0 flex-wrap items-center justify-end gap-2",re,F?me:""].filter(Boolean).join(" "),children:O}):null]})})]})]})}
2
+ import{jsx as e,jsxs as l}from"react/jsx-runtime";import{Dialog as n}from"@base-ui/react/dialog";import{MPIcon as o}from"../icon/MPIcon.js";import{CloseIcon as i}from"../../constants/icons.js";import{accentSlots as t}from"../../internal/accent.js";import{cssLength as s}from"../../internal/length.js";import{useMPLocale as a,useMPMessages as r}from"../../internal/locale.js";import{COMMON as m}from"../../internal/messages/common.js";import{MPStateLayer as c}from"../../internal/StateLayer.js";import{SHEET_GAP as p,hasContent as d}from"../../internal/scale.js";import{FADE as x,PORTAL_LAYER as f,SCRIM as u,SHEET_MOTION as h}from"../../internal/surface.js";import{useMPSize as g}from"../../internal/config.js";const y={xs:"max-w-[320px]",sm:"max-w-[400px]",md:"max-w-[560px]",lg:"max-w-[720px]",xl:"max-w-[960px]"},j=`transition-[opacity,scale] ${h}`,b=/*@__PURE__*/["motion-safe:data-starting-style:scale-95","motion-safe:data-ending-style:scale-95"].join(" "),v={xs:"p-3",sm:"p-4",md:"p-6",lg:"p-7",xl:"p-8"},w={xs:"px-3",sm:"px-4",md:"px-6",lg:"px-7",xl:"px-8"},N={xs:"py-3",sm:"py-4",md:"py-6",lg:"py-7",xl:"py-8"},C={xs:"text-mp-title-medium",sm:"text-mp-title-large",md:"text-mp-headline-small",lg:"text-mp-headline-medium",xl:"text-mp-headline-large"},k={xs:"text-mp-body-small",sm:"text-mp-body-small",md:"text-mp-body-medium",lg:"text-mp-body-large",xl:"text-mp-body-large"},B={xs:20,sm:22,md:24,lg:28,xl:32};export const MPDialogClose=n.Close;export function MPDialog({open:h,defaultOpen:D,onOpenChange:$,trigger:P,icon:M,title:z,description:K,actions:O,dividers:F=!1,showClose:L,closeLabel:S,locale:T,width:U,fullWidth:W=!0,fullScreen:I=!1,modal:R=!0,dismissible:V=!0,size:_,color:q="secondary",onKeyDown:A,onKeyUp:E,onFocus:G,onBlur:H,onClick:J,onDoubleClick:Q,onContextMenu:X,classNames:Y,className:Z,style:ee,children:le}){const ne=g(_),oe=a(T),ie=r(m,oe),te=L??I,se=d(M),ae=d(z)||d(K)||se,re=d(O),me=F?v[ne]:w[ne],ce="border-mp-outline-variant border-t";return l(n.Root,{open:h,defaultOpen:D,modal:R,disablePointerDismissal:!V,onOpenChange:(e,l)=>{V||e||"escape-key"!==l.reason?$?.(e):l.cancel()},children:[P?e(n.Trigger,{render:P}):null,l(n.Portal,{children:[e(n.Backdrop,{className:[`${f} fixed inset-0`,x,u,Y?.backdrop??""].filter(Boolean).join(" ")}),e(n.Viewport,{className:[f,"fixed inset-0 flex justify-center",I?"items-stretch":"items-center p-4"].join(" "),children:l(n.Popup,{"data-mp-size":ne,onKeyDown:A,onKeyUp:E,onFocus:G,onBlur:H,onClick:J,onDoubleClick:Q,onContextMenu:X,className:["mp-dialog relative flex w-full flex-col overflow-hidden","bg-mp-surface-container-high text-mp-on-surface shadow-mp-3 outline-none",I?"h-full max-w-none rounded-none":`rounded-mp-xl max-h-full ${void 0===U?y[ne]:""}`,I||W?"":"w-auto",F?"":`${N[ne]} ${p[ne]}`,j,I?"":b,Z??""].filter(Boolean).join(" "),style:{...t(q),...void 0===U||I?null:{maxWidth:s(U)},...ee},children:[ae||te?l("div",{className:["flex shrink-0 items-start gap-3",me,se&&!te?"flex-col items-center text-center":""].filter(Boolean).join(" "),children:[se?e("span",{className:"flex shrink-0 items-center justify-center text-(--_mp-accent)",children:M}):null,l("div",{className:`flex min-w-0 flex-1 flex-col ${p[ne]}`,children:[d(z)?e(n.Title,{className:`m-0 ${C[ne]}`,children:z}):null,d(K)?e(n.Description,{className:`text-mp-on-surface-variant m-0 ${k[ne]}`,children:K}):null]}),te?l(n.Close,{"aria-label":S??ie.close,className:["group text-mp-on-surface-variant relative flex size-10 shrink-0","rounded-mp-full cursor-pointer items-center justify-center","outline-mp-secondary focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-solid outline-none"].join(" "),children:[e(c,{}),e(o,{icon:i,size:B[ne]})]}):null]}):null,d(le)?e("div",{className:["min-h-0 flex-1 overflow-y-auto overscroll-contain",k[ne],me,F&&(ae||te)?ce:""].filter(Boolean).join(" "),children:le}):null,re?e("div",{className:["flex shrink-0 flex-wrap items-center justify-end gap-2",me,F?ce:""].filter(Boolean).join(" "),children:O}):null]})})]})]})}
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Dialog } from '@base-ui/react/dialog';
3
- import type { MPSide, MPSize } from '../../types.js';
3
+ import type { MPSide, MPSize, MPSlots } from '../../types.js';
4
4
  /**
5
5
  * How the panel relates to the page, in MD3's own two words for it.
6
6
  *
@@ -123,6 +123,12 @@ export interface MPDrawerProps {
123
123
  children?: React.ReactNode;
124
124
  className?: string;
125
125
  style?: React.CSSProperties;
126
+ /**
127
+ * A class name for a part `className` cannot reach.
128
+ *
129
+ * - `backdrop` — the scrim behind the panel, drawn only on a modal drawer.
130
+ */
131
+ classNames?: MPSlots<'backdrop'>;
126
132
  }
127
133
  export type MPDrawerCloseProps = React.ComponentProps<typeof Dialog.Close>;
128
134
  /**
@@ -184,4 +190,4 @@ export declare const MPDrawerClose: React.ForwardRefExoticComponent<Omit<import(
184
190
  * `SLIDE` gives a reader who asked for less motion the old behaviour exactly:
185
191
  * the fade, with nowhere to travel from.
186
192
  */
187
- export declare function MPDrawer({ side, mode, open, defaultOpen, onOpenChange, trigger, title, description, actions, dividers, showClose, closeLabel, locale: localeProp, extent, rounded, dismissible, size: sizeProp, className, style, children }: MPDrawerProps): React.JSX.Element | null;
193
+ export declare function MPDrawer({ side, mode, open, defaultOpen, onOpenChange, trigger, title, description, actions, dividers, showClose, closeLabel, locale: localeProp, extent, rounded, dismissible, size: sizeProp, classNames, className, style, children }: MPDrawerProps): React.JSX.Element | null;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as e,jsxs as t,Fragment as l}from"react/jsx-runtime";import*as a from"react";import{Dialog as o}from"@base-ui/react/dialog";import{MPIcon as n}from"../icon/MPIcon.js";import{CloseIcon as r}from"../../constants/icons.js";import{useMPLocale as i,useMPMessages as s}from"../../internal/locale.js";import{COMMON as d}from"../../internal/messages/common.js";import{MPStateLayer as m}from"../../internal/StateLayer.js";import{cssLength as f}from"../../internal/length.js";import{hasContent as c,META_TEXT as p,PROSE_TEXT as u,SHEET_GAP as x,SHEET_PAD_X as h,SHEET_PAD_Y as g,SHEET_TITLE as b}from"../../internal/scale.js";import{FADE as y,PORTAL_LAYER as j,SCRIM as v,SHEET_MOTION as w}from"../../internal/surface.js";import{useMPSize as $}from"../../internal/config.js";const N={xs:"w-60",sm:"w-72",md:"w-90",lg:"w-104",xl:"w-120"},C={left:"rounded-r-mp-lg",right:"rounded-l-mp-lg",top:"rounded-b-mp-xl",bottom:"rounded-t-mp-xl"},k={left:"border-r",right:"border-l",top:"border-b",bottom:"border-t"},z={left:"flex-row justify-start",right:"flex-row justify-end",top:"flex-col justify-start",bottom:"flex-col justify-end"},P={left:"motion-safe:data-starting-style:-translate-x-full motion-safe:data-ending-style:-translate-x-full",right:"motion-safe:data-starting-style:translate-x-full motion-safe:data-ending-style:translate-x-full",top:"motion-safe:data-starting-style:-translate-y-full motion-safe:data-ending-style:-translate-y-full",bottom:"motion-safe:data-starting-style:translate-y-full motion-safe:data-ending-style:translate-y-full"},B=`transition-[opacity,translate] ${w}`,D="border-mp-outline-variant border-t";export const MPDrawerClose=o.Close;export function MPDrawer({side:w="left",mode:O="modal",open:M,defaultOpen:L,onOpenChange:S,trigger:T,title:F,description:I,actions:R,dividers:V=!1,showClose:q,closeLabel:A,locale:E,extent:G,rounded:H=!0,dismissible:J=!0,size:K,className:Q,style:U,children:W}){const X=$(K),Y=i(E),Z=s(d,Y),_="modal"===O,ee="left"===w||"right"===w,te=q??_,le=A??Z.close,[ae,oe]=a.useState(L??!0),ne=M??ae,re=h[X],ie=g[X],se=V?`${re} ${ie}`:re,de=c(F)||c(I),me=c(R),fe=void 0===G?null:{[ee?"width":"height"]:f(G)},ce=["mp-drawer relative flex flex-col overflow-hidden box-border","border-mp-outline-variant outline-none",_?"bg-mp-surface-container-low shadow-mp-1":"bg-mp-surface","text-mp-on-surface",u[X],k[w],H?C[w]:"",_?`${B} ${P[w]}`:"",ee?`h-full max-w-full ${void 0===G?N[X]:""}`:"w-full "+(void 0===G?"max-h-[85%]":""),V?"":`${ie} ${x[X]}`,Q??""].filter(Boolean).join(" "),pe=_?o.Title:"h2",ue=_?o.Description:"p",xe=/*@__PURE__*/["group text-mp-on-surface-variant relative flex size-10 shrink-0","rounded-mp-full cursor-pointer items-center justify-center","appearance-none border-0 bg-transparent","outline-mp-secondary focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-solid outline-none"].join(" "),he=t(l,{children:[de||te?t("div",{className:`flex shrink-0 items-start gap-3 ${se}`,children:[t("div",{className:"flex min-w-0 flex-1 flex-col",children:[c(F)?e(pe,{className:`m-0 ${b[X]}`,children:F}):null,c(I)?e(ue,{className:`text-mp-on-surface-variant m-0 ${p}`,children:I}):null]}),te?_?t(o.Close,{"aria-label":le,className:xe,children:[e(m,{}),e(n,{icon:r,size:20})]}):t("button",{type:"button","aria-label":le,className:xe,onClick:()=>{void 0===M&&oe(!1),S?.(!1)},children:[e(m,{}),e(n,{icon:r,size:20})]}):null]}):null,c(W)?e("div",{className:["min-h-0 flex-1 overflow-y-auto overscroll-contain",se,V&&(de||te)?D:"",V?"":"-my-1 py-1"].filter(Boolean).join(" "),children:W}):null,me?e("div",{className:["flex shrink-0 flex-wrap items-center justify-end gap-2",se,V?D:""].filter(Boolean).join(" "),children:R}):null]});return _?t(o.Root,{open:M,defaultOpen:L,disablePointerDismissal:!J,onOpenChange:(e,t)=>{J||e||"escape-key"!==t.reason?S?.(e):t.cancel()},children:[T?e(o.Trigger,{render:T}):null,t(o.Portal,{children:[e(o.Backdrop,{className:`${j} fixed inset-0 ${y} ${v}`}),e(o.Viewport,{className:`${j} fixed inset-0 flex ${z[w]}`,children:e(o.Popup,{"data-mp-size":X,"data-mp-side":w,"data-mp-mode":O,className:ce,style:{...fe,...U},children:he})})]})]}):ne?e("div",{"data-mp-size":X,"data-mp-side":w,"data-mp-mode":O,className:ce,style:{...fe,...U},children:he}):null}
2
+ import{jsx as e,jsxs as t,Fragment as l}from"react/jsx-runtime";import*as a from"react";import{Dialog as o}from"@base-ui/react/dialog";import{MPIcon as n}from"../icon/MPIcon.js";import{CloseIcon as r}from"../../constants/icons.js";import{useMPLocale as i,useMPMessages as s}from"../../internal/locale.js";import{COMMON as d}from"../../internal/messages/common.js";import{MPStateLayer as m}from"../../internal/StateLayer.js";import{cssLength as f}from"../../internal/length.js";import{hasContent as c,META_TEXT as p,PROSE_TEXT as u,SHEET_GAP as x,SHEET_PAD_X as h,SHEET_PAD_Y as g,SHEET_TITLE as b}from"../../internal/scale.js";import{FADE as y,PORTAL_LAYER as j,SCRIM as v,SHEET_MOTION as w}from"../../internal/surface.js";import{useMPSize as N}from"../../internal/config.js";const $={xs:"w-60",sm:"w-72",md:"w-90",lg:"w-104",xl:"w-120"},k={left:"rounded-r-mp-lg",right:"rounded-l-mp-lg",top:"rounded-b-mp-xl",bottom:"rounded-t-mp-xl"},C={left:"border-r",right:"border-l",top:"border-b",bottom:"border-t"},z={left:"flex-row justify-start",right:"flex-row justify-end",top:"flex-col justify-start",bottom:"flex-col justify-end"},P={left:"motion-safe:data-starting-style:-translate-x-full motion-safe:data-ending-style:-translate-x-full",right:"motion-safe:data-starting-style:translate-x-full motion-safe:data-ending-style:translate-x-full",top:"motion-safe:data-starting-style:-translate-y-full motion-safe:data-ending-style:-translate-y-full",bottom:"motion-safe:data-starting-style:translate-y-full motion-safe:data-ending-style:translate-y-full"},B=`transition-[opacity,translate] ${w}`,D="border-mp-outline-variant border-t";export const MPDrawerClose=o.Close;export function MPDrawer({side:w="left",mode:O="modal",open:M,defaultOpen:L,onOpenChange:S,trigger:T,title:F,description:I,actions:R,dividers:V=!1,showClose:q,closeLabel:A,locale:E,extent:G,rounded:H=!0,dismissible:J=!0,size:K,classNames:Q,className:U,style:W,children:X}){const Y=N(K),Z=i(E),_=s(d,Z),ee="modal"===O,te="left"===w||"right"===w,le=q??ee,ae=A??_.close,[oe,ne]=a.useState(L??!0),re=M??oe,ie=h[Y],se=g[Y],de=V?`${ie} ${se}`:ie,me=c(F)||c(I),fe=c(R),ce=void 0===G?null:{[te?"width":"height"]:f(G)},pe=["mp-drawer relative flex flex-col overflow-hidden box-border","border-mp-outline-variant outline-none",ee?"bg-mp-surface-container-low shadow-mp-1":"bg-mp-surface","text-mp-on-surface",u[Y],C[w],H?k[w]:"",ee?`${B} ${P[w]}`:"",te?`h-full max-w-full ${void 0===G?$[Y]:""}`:"w-full "+(void 0===G?"max-h-[85%]":""),V?"":`${se} ${x[Y]}`,U??""].filter(Boolean).join(" "),ue=ee?o.Title:"h2",xe=ee?o.Description:"p",he=/*@__PURE__*/["group text-mp-on-surface-variant relative flex size-10 shrink-0","rounded-mp-full cursor-pointer items-center justify-center","appearance-none border-0 bg-transparent","outline-mp-secondary focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-solid outline-none"].join(" "),ge=t(l,{children:[me||le?t("div",{className:`flex shrink-0 items-start gap-3 ${de}`,children:[t("div",{className:"flex min-w-0 flex-1 flex-col",children:[c(F)?e(ue,{className:`m-0 ${b[Y]}`,children:F}):null,c(I)?e(xe,{className:`text-mp-on-surface-variant m-0 ${p}`,children:I}):null]}),le?ee?t(o.Close,{"aria-label":ae,className:he,children:[e(m,{}),e(n,{icon:r,size:20})]}):t("button",{type:"button","aria-label":ae,className:he,onClick:()=>{void 0===M&&ne(!1),S?.(!1)},children:[e(m,{}),e(n,{icon:r,size:20})]}):null]}):null,c(X)?e("div",{className:["min-h-0 flex-1 overflow-y-auto overscroll-contain",de,V&&(me||le)?D:"",V?"":"-my-1 py-1"].filter(Boolean).join(" "),children:X}):null,fe?e("div",{className:["flex shrink-0 flex-wrap items-center justify-end gap-2",de,V?D:""].filter(Boolean).join(" "),children:R}):null]});return ee?t(o.Root,{open:M,defaultOpen:L,disablePointerDismissal:!J,onOpenChange:(e,t)=>{J||e||"escape-key"!==t.reason?S?.(e):t.cancel()},children:[T?e(o.Trigger,{render:T}):null,t(o.Portal,{children:[e(o.Backdrop,{className:[`${j} fixed inset-0`,y,v,Q?.backdrop??""].filter(Boolean).join(" ")}),e(o.Viewport,{className:`${j} fixed inset-0 flex ${z[w]}`,children:e(o.Popup,{"data-mp-size":Y,"data-mp-side":w,"data-mp-mode":O,className:pe,style:{...ce,...W},children:ge})})]})]}):re?e("div",{"data-mp-size":Y,"data-mp-side":w,"data-mp-mode":O,className:pe,style:{...ce,...W},children:ge}):null}
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { MPSize, MPVariant } from '../../types.js';
3
+ import type { MPSize, MPTransition, MPVariant } from '../../types.js';
4
4
  export interface MPEmptyProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'color' | 'title'> {
5
5
  /**
6
6
  * The headline. Defaults to the words for "nothing here" in `locale`; pass
@@ -46,6 +46,15 @@ export interface MPEmptyProps extends Omit<React.ComponentPropsWithoutRef<'div'>
46
46
  render?: useRender.RenderProp;
47
47
  /** The sentence under the headline: why it is empty, or what to do next. */
48
48
  children?: React.ReactNode;
49
+ /**
50
+ * An entrance, run once as it mounts.
51
+ *
52
+ * `transition="fade"` is the whole of what most callers want; the object form
53
+ * takes a duration, an edge to come from, or a scale to start at. Anything
54
+ * that has to run again — on scroll, on hover, under your own control — is an
55
+ * [MPAnimateFade](../motion/animate-fade) and its siblings.
56
+ */
57
+ transition?: MPTransition;
49
58
  }
50
59
  /**
51
60
  * What stands where content would have been: a glyph, a headline, a sentence and
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import*as n from"react";import{useRender as s}from"@base-ui/react/use-render";import{useMPLocale as a,useMPMessages as l}from"../../internal/locale.js";import{EMPTY as i}from"../../internal/messages/empty.js";import{hasContent as o,PROSE_TEXT as m,SHEET_GAP as c,SHEET_PAD_X as d,SHEET_TITLE as p}from"../../internal/scale.js";import{CONTAINER_SURFACE as f}from"../../internal/surface.js";import{useMPSize as x}from"../../internal/config.js";const u={xs:"py-5",sm:"py-6",md:"py-8",lg:"py-10",xl:"py-12"},h={xs:"text-[1.5rem]",sm:"text-[1.75rem]",md:"text-[2.25rem]",lg:"text-[2.75rem]",xl:"text-[3.25rem]"};function v(){return t("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",className:"size-[1em]",children:[e("path",{d:"M1.75 9.75h3l.9 1.6h4.7l.9-1.6h3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"m1.75 9.75 2.1-6a1.5 1.5 0 0 1 1.42-1h5.46a1.5 1.5 0 0 1 1.42 1l2.1 6v2a1.5 1.5 0 0 1-1.5 1.5h-9.5a1.5 1.5 0 0 1-1.5-1.5Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"})]})}export const MPEmpty=/*@__PURE__*/n.forwardRef(function({variant:n="text",size:j,title:y,icon:g,action:N,locale:k,render:w,className:z,style:$,children:L,...B},C){const M=x(j),W=a(k),b=l(i,W),E=void 0===y?b.title:y,F=void 0===g?e(v,{}):g,P=o(E),R=["mp-empty flex w-full flex-col items-center justify-center text-center",d[M],u[M],"text"===n?"":"rounded-mp-md",c[M],f[n],"text-mp-on-surface",z??""].filter(Boolean).join(" ");return s({render:w,ref:C,props:{role:"status","data-mp-size":M,"data-mp-variant":n,className:R,style:$,children:t(r,{children:[o(F)?e("span",{className:`text-mp-on-surface-variant flex items-center ${h[M]} [&>svg]:size-[1em]`,children:F}):null,P||o(L)?t("div",{className:`flex max-w-prose flex-col items-center ${c[M]}`,children:[P?e("div",{className:p[M],children:E}):null,o(L)?e("div",{className:`${m[M]} ${P?"text-mp-on-surface-variant":""}`,children:L}):null]}):null,o(N)?e("div",{className:"flex flex-wrap items-center justify-center gap-2",children:N}):null]}),...B}})});
2
+ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import*as s from"react";import{useRender as n}from"@base-ui/react/use-render";import{useMPLocale as a,useMPMessages as i}from"../../internal/locale.js";import{transitionProps as l}from"../../internal/transition.js";import{EMPTY as o}from"../../internal/messages/empty.js";import{hasContent as m,PROSE_TEXT as c,SHEET_GAP as d,SHEET_PAD_X as p,SHEET_TITLE as f}from"../../internal/scale.js";import{CONTAINER_SURFACE as x}from"../../internal/surface.js";import{useMPSize as u}from"../../internal/config.js";const h={xs:"py-5",sm:"py-6",md:"py-8",lg:"py-10",xl:"py-12"},j={xs:"text-[1.5rem]",sm:"text-[1.75rem]",md:"text-[2.25rem]",lg:"text-[2.75rem]",xl:"text-[3.25rem]"};function v(){return t("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",className:"size-[1em]",children:[e("path",{d:"M1.75 9.75h3l.9 1.6h4.7l.9-1.6h3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"m1.75 9.75 2.1-6a1.5 1.5 0 0 1 1.42-1h5.46a1.5 1.5 0 0 1 1.42 1l2.1 6v2a1.5 1.5 0 0 1-1.5 1.5h-9.5a1.5 1.5 0 0 1-1.5-1.5Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"})]})}export const MPEmpty=/*@__PURE__*/s.forwardRef(function({variant:s="text",size:y,title:N,icon:g,action:k,locale:$,render:w,transition:z,className:L,style:B,children:C,...M},W){const b=l(z),E=u(y),F=a($),P=i(o,F),R=void 0===N?P.title:N,Z=void 0===g?e(v,{}):g,q=m(R),A=["mp-empty flex w-full flex-col items-center justify-center text-center",p[E],h[E],"text"===s?"":"rounded-mp-md",d[E],x[s],"text-mp-on-surface",L??""].filter(Boolean).join(" ");return n({render:w,ref:W,props:{role:"status","data-mp-size":E,"data-mp-variant":s,className:`${A}${b.className?` ${b.className}`:""}`,style:{...b.style,...B},children:t(r,{children:[m(Z)?e("span",{className:`text-mp-on-surface-variant flex items-center ${j[E]} [&>svg]:size-[1em]`,children:Z}):null,q||m(C)?t("div",{className:`flex max-w-prose flex-col items-center ${d[E]}`,children:[q?e("div",{className:f[E],children:R}):null,m(C)?e("div",{className:`${c[E]} ${q?"text-mp-on-surface-variant":""}`,children:C}):null]}):null,m(k)?e("div",{className:"flex flex-wrap items-center justify-center gap-2",children:k}):null]}),...M}})});
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as e,jsxs as s}from"react/jsx-runtime";import*as l from"react";import{Fieldset as a}from"@base-ui/react/fieldset";import{hasContent as r,META_TEXT as n,SHEET_GAP as i,SHEET_TITLE as t,STACK_GAP as o}from"../../internal/scale.js";export const MPFieldset=/*@__PURE__*/l.forwardRef(function({legend:l,description:m,disabled:c=!1,size:d="md",className:f,children:p,...x},u){const h=r(l)||r(m);return s(a.Root,{ref:u,disabled:c,"data-mp-size":d,className:["mp-fieldset flex min-w-0 flex-col","m-0 border-0 p-0",i[d],f??""].filter(Boolean).join(" "),...x,children:[h?s(a.Legend,{className:`mp-fieldset__legend flex min-w-0 flex-col p-0 ${o[d]}`,children:[r(l)?e("span",{className:`text-mp-on-surface ${t[d]}`,children:l}):null,r(m)?e("span",{className:`text-mp-on-surface-variant ${n}`,children:m}):null]}):null,p]})});
2
+ import{jsx as e,jsxs as s}from"react/jsx-runtime";import*as l from"react";import{Fieldset as r}from"@base-ui/react/fieldset";import{useMPSize as a}from"../../internal/config.js";import{hasContent as n,META_TEXT as i,SHEET_GAP as t,SHEET_TITLE as o,STACK_GAP as m}from"../../internal/scale.js";export const MPFieldset=/*@__PURE__*/l.forwardRef(function({legend:l,description:c,disabled:d=!1,size:f,className:p,children:x,...u},j){const h=a(f),N=n(l)||n(c);return s(r.Root,{ref:j,disabled:d,"data-mp-size":h,className:["mp-fieldset flex min-w-0 flex-col","m-0 border-0 p-0",t[h],p??""].filter(Boolean).join(" "),...u,children:[N?s(r.Legend,{className:`mp-fieldset__legend flex min-w-0 flex-col p-0 ${m[h]}`,children:[n(l)?e("span",{className:`text-mp-on-surface ${o[h]}`,children:l}):null,n(c)?e("span",{className:`text-mp-on-surface-variant ${i}`,children:c}):null]}):null,x]})});
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as n from"react";import{MPIcon as t}from"../icon/MPIcon.js";import{CloseIcon as a,UploadIcon as i}from"../../constants/icons.js";import{fillMessage as l}from"../../internal/i18n.js";import{useMPLocale as o,useMPMessages as s}from"../../internal/locale.js";import{COMMON as c}from"../../internal/messages/common.js";import{FILE_PICKER as m}from"../../internal/messages/file-picker.js";import{MPStateLayer as p}from"../../internal/StateLayer.js";import{CONTROL_ICON as u,META_TEXT as d,PROSE_TEXT as f,STACK_GAP as h,hasContent as x}from"../../internal/scale.js";import{useMPSize as b}from"../../internal/config.js";const v={xs:"p-4",sm:"p-5",md:"p-6",lg:"p-8",xl:"p-10"};export function formatFileSize(e){if(e<1e3)return`${e} B`;const r=["kB","MB","GB","TB"];let n=e/1e3,t=0;for(;n>=1e3&&t<r.length-1;)n/=1e3,t+=1;return`${n<10?n.toFixed(1):Math.round(n)} ${r[t]}`}function g(e,r){const n=e.name.toLowerCase(),t=e.type.toLowerCase();return r.split(",").map(e=>e.trim().toLowerCase()).filter(Boolean).some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?t.startsWith(e.slice(0,-1)):t===e)}export const MPFilePicker=/*@__PURE__*/n.forwardRef(function({accept:j,multiple:y=!1,maxSize:N,maxFiles:k,value:z,defaultValue:w,onFilesChange:C,onReject:I,label:B,description:D,errorMessage:F,title:L,hint:M,icon:S,showList:$=!0,removeLabel:T,locale:W,size:_,fullWidth:P=!0,required:R=!1,disabled:E=!1,readOnly:O=!1,name:q,id:A,className:V,style:G},H){const Y=b(_),J=o(W),K=s(c,J),Q=s(m,J),U=n.useRef(null);n.useImperativeHandle(H,()=>U.current,[]);const[X,Z]=n.useState(()=>[...w??[]]),ee=z?[...z]:X,re=n.useRef(0),[ne,te]=n.useState(!1),ae=x(F),ie=E||O,le=n.useId(),oe=n.useId(),se=n.useCallback(e=>{z||Z(e),C?.(e)},[C,z]),ce=n.useCallback(e=>{const r=[],n=[],t=y?k??Number.POSITIVE_INFINITY:1,a=y?ee.length:0;for(const i of e)j&&!g(i,j)?n.push({file:i,reason:"type"}):void 0!==N&&i.size>N?n.push({file:i,reason:"size"}):a+r.length>=t?n.push({file:i,reason:"count"}):r.push(i);return{kept:r,rejections:n}},[j,ee.length,k,N,y]),me=n.useCallback(e=>{const{kept:r,rejections:n}=ce(e);n.length>0&&I?.(n),r.length>0&&se(y?[...ee,...r]:r)},[ce,se,ee,y,I]);return r("div",{className:["mp-file-picker flex-col align-top",h[Y],P?"flex w-full":"inline-flex",V??""].filter(Boolean).join(" "),style:G,"data-mp-size":Y,"data-disabled":E||void 0,"data-invalid":ae||void 0,children:[x(B)?r("span",{id:oe,className:[d,E?"text-mp-on-surface/38":ae?"text-mp-error":"text-mp-on-surface-variant"].join(" "),children:[B,R?e("span",{"aria-hidden":"true",children:" *"}):null]}):null,r("div",{className:"relative flex w-full flex-col",onDragEnter:e=>{ie||(e.preventDefault(),re.current+=1,te(!0))},onDragOver:e=>{ie||(e.preventDefault(),e.dataTransfer.dropEffect="copy")},onDragLeave:()=>{ie||(re.current=Math.max(0,re.current-1),0===re.current&&te(!1))},onDrop:e=>{ie||(e.preventDefault(),re.current=0,te(!1),me(Array.from(e.dataTransfer.files)))},children:[r("button",{type:"button",id:A,disabled:E,"aria-describedby":x(D)||ae?le:void 0,"aria-invalid":ae||void 0,className:["mp-file-picker__zone group relative flex w-full flex-col items-center","justify-center gap-2 text-center","rounded-mp-md box-border border-2 border-dashed","appearance-none bg-transparent font-[inherit] outline-none","transition-[border-color,background-color] duration-(--mp-sys-motion-duration-short4)",v[Y],f[Y],E?"border-mp-on-surface/12 text-mp-on-surface/38 cursor-default":[O?"cursor-default":"cursor-pointer",ae?"border-mp-error":"border-mp-outline-variant","text-mp-on-surface",ne?"border-mp-primary bg-mp-primary/8":""].filter(Boolean).join(" ")].filter(Boolean).join(" "),onClick:()=>{!ie&&U.current&&(U.current.value="",U.current.click())},children:[ie?null:e(p,{layer:"inset-0 rounded-[inherit] bg-mp-primary"}),void 0===S?e(t,{icon:i,size:1.6*u[Y],className:E?"":"text-mp-primary"}):x(S)?e("span",{className:E?"":"text-mp-primary",children:S}):null,e("span",{className:"font-medium",children:L??Q.prompt}),x(M)?e("span",{className:[d,E?"text-mp-on-surface/38":"text-mp-on-surface-variant"].join(" "),children:M}):null]}),e("input",{ref:U,type:"file",name:q,accept:j,multiple:y,required:R&&0===ee.length,disabled:ie,tabIndex:-1,"aria-labelledby":x(B)?oe:void 0,"aria-describedby":x(D)||ae?le:void 0,className:"absolute size-px overflow-hidden opacity-0 [clip-path:inset(50%)]",onChange:e=>me(Array.from(e.target.files??[]))})]}),$&&ee.length>0?e("ul",{className:["mp-file-picker__list m-0 flex w-full list-none flex-col p-0",h[Y]].join(" "),children:ee.map((n,i)=>r("li",{className:["rounded-mp-xs bg-mp-surface-container-low flex w-full items-center gap-3","px-3 py-2",f[Y],E?"text-mp-on-surface/38":"text-mp-on-surface"].join(" "),children:[e("span",{className:"min-w-0 flex-1 truncate",children:n.name}),e("span",{className:[d,"shrink-0 tabular-nums",E?"text-mp-on-surface/38":"text-mp-on-surface-variant"].join(" "),children:formatFileSize(n.size)}),ie?null:r("button",{type:"button","aria-label":T?T(n.name):l(K.removeNamed,{label:n.name}),className:["group text-mp-on-surface-variant relative flex size-8 shrink-0","cursor-pointer appearance-none items-center justify-center rounded-full","bg-transparent p-0 font-[inherit] outline-none"].join(" "),onClick:()=>se(ee.filter((e,r)=>r!==i)),children:[e(p,{}),e(t,{icon:a,size:18})]})]},`${n.name}-${n.size}-${n.lastModified}-${i}`))}):null,ae?e("span",{id:le,className:[d,"text-mp-error"].join(" "),children:F}):x(D)?e("span",{id:le,className:[d,E?"text-mp-on-surface/38":"text-mp-on-surface-variant"].join(" "),children:D}):null]})});
2
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as n from"react";import{MPIcon as t}from"../icon/MPIcon.js";import{CloseIcon as a,UploadIcon as i}from"../../constants/icons.js";import{fillMessage as o}from"../../internal/i18n.js";import{useMPLocale as l,useMPMessages as s}from"../../internal/locale.js";import{COMMON as c}from"../../internal/messages/common.js";import{FILE_PICKER as m}from"../../internal/messages/file-picker.js";import{MPStateLayer as p}from"../../internal/StateLayer.js";import{CONTROL_ICON as u,META_TEXT as d,PROSE_TEXT as f,STACK_GAP as h,hasContent as x}from"../../internal/scale.js";import{useMPSize as b}from"../../internal/config.js";const v={xs:"p-4",sm:"p-5",md:"p-6",lg:"p-8",xl:"p-10"};export function formatFileSize(e){if(e<1e3)return`${e} B`;const r=["kB","MB","GB","TB"];let n=e/1e3,t=0;for(;n>=1e3&&t<r.length-1;)n/=1e3,t+=1;return`${n<10?n.toFixed(1):Math.round(n)} ${r[t]}`}function g(e){return`${e.name}-${e.size}-${e.lastModified}`}const j=new Set;function y(e,r){const n=e.name.toLowerCase(),t=e.type.toLowerCase();return r.split(",").map(e=>e.trim().toLowerCase()).filter(Boolean).some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?t.startsWith(e.slice(0,-1)):t===e)}export const MPFilePicker=/*@__PURE__*/n.forwardRef(function({accept:N,multiple:k=!1,maxSize:w,maxFiles:z,value:B,defaultValue:C,onFilesChange:I,onReject:S,label:$,description:D,errorMessage:F,title:L,hint:M,icon:T,showList:W=!0,removeLabel:_,locale:P,size:R,fullWidth:E=!0,required:O=!1,disabled:q=!1,readOnly:A=!1,name:V,id:G,className:H,style:Y},J){const K=b(R),Q=l(P),U=s(c,Q),X=s(m,Q),Z=n.useRef(null);n.useImperativeHandle(J,()=>Z.current,[]);const[ee,re]=n.useState(()=>[...C??[]]),ne=B?[...B]:ee,te=n.useRef(0),[ae,ie]=n.useState(!1),oe=x(F),le=q||A,se=n.useId(),ce=n.useId(),me=n.useCallback(e=>{B||re(e),I?.(e)},[I,B]),pe=n.useCallback(e=>{const r=[],n=[],t=k?z??Number.POSITIVE_INFINITY:1,a=k?ne.length:0;for(const i of e)N&&!y(i,N)?n.push({file:i,reason:"type"}):void 0!==w&&i.size>w?n.push({file:i,reason:"size"}):a+r.length>=t?n.push({file:i,reason:"count"}):r.push(i);return{kept:r,rejections:n}},[N,ne.length,z,w,k]),[ue,de]=n.useState(j),fe=n.useCallback(e=>{const{kept:r,rejections:n}=pe(e);n.length>0&&S?.(n),r.length>0&&(de(new Set(r.map(g))),me(k?[...ne,...r]:r))},[pe,me,ne,k,S]);return r("div",{className:["mp-file-picker flex-col align-top",h[K],E?"flex w-full":"inline-flex",H??""].filter(Boolean).join(" "),style:Y,"data-mp-size":K,"data-disabled":q||void 0,"data-invalid":oe||void 0,children:[x($)?r("span",{id:ce,className:[d,q?"text-mp-on-surface/38":oe?"text-mp-error":"text-mp-on-surface-variant"].join(" "),children:[$,O?e("span",{"aria-hidden":"true",children:" *"}):null]}):null,r("div",{className:"relative flex w-full flex-col",onDragEnter:e=>{le||(e.preventDefault(),te.current+=1,ie(!0))},onDragOver:e=>{le||(e.preventDefault(),e.dataTransfer.dropEffect="copy")},onDragLeave:()=>{le||(te.current=Math.max(0,te.current-1),0===te.current&&ie(!1))},onDrop:e=>{le||(e.preventDefault(),te.current=0,ie(!1),fe(Array.from(e.dataTransfer.files)))},children:[r("button",{type:"button",id:G,disabled:q,"aria-describedby":x(D)||oe?se:void 0,"aria-invalid":oe||void 0,className:["mp-file-picker__zone group relative flex w-full flex-col items-center","justify-center gap-2 text-center","rounded-mp-md box-border border-2 border-dashed","appearance-none bg-transparent font-[inherit] outline-none","transition-[border-color,background-color] duration-(--mp-sys-motion-duration-short4)",v[K],f[K],q?"border-mp-on-surface/12 text-mp-on-surface/38 cursor-default":[A?"cursor-default":"cursor-pointer",oe?"border-mp-error":"border-mp-outline-variant","text-mp-on-surface",ae?"border-mp-primary bg-mp-primary/8":""].filter(Boolean).join(" ")].filter(Boolean).join(" "),onClick:()=>{!le&&Z.current&&(Z.current.value="",Z.current.click())},children:[le?null:e(p,{layer:"inset-0 rounded-[inherit] bg-mp-primary"}),void 0===T?e(t,{icon:i,size:1.6*u[K],className:q?"":"text-mp-primary"}):x(T)?e("span",{className:q?"":"text-mp-primary",children:T}):null,e("span",{className:"font-medium",children:L??X.prompt}),x(M)?e("span",{className:[d,q?"text-mp-on-surface/38":"text-mp-on-surface-variant"].join(" "),children:M}):null]}),e("input",{ref:Z,type:"file",name:V,accept:N,multiple:k,required:O&&0===ne.length,disabled:le,tabIndex:-1,"aria-labelledby":x($)?ce:void 0,"aria-describedby":x(D)||oe?se:void 0,className:"absolute size-px overflow-hidden opacity-0 [clip-path:inset(50%)]",onChange:e=>fe(Array.from(e.target.files??[]))})]}),W&&ne.length>0?e("ul",{className:["mp-file-picker__list m-0 flex w-full list-none flex-col p-0",h[K]].join(" "),children:ne.map((n,i)=>r("li",{className:["rounded-mp-xs bg-mp-surface-container-low flex w-full items-center gap-3","px-3 py-2",f[K],q?"text-mp-on-surface/38":"text-mp-on-surface",ue.has(g(n))?"mp-row-arrive":""].filter(Boolean).join(" "),children:[e("span",{className:"min-w-0 flex-1 truncate",children:n.name}),e("span",{className:[d,"shrink-0 tabular-nums",q?"text-mp-on-surface/38":"text-mp-on-surface-variant"].join(" "),children:formatFileSize(n.size)}),le?null:r("button",{type:"button","aria-label":_?_(n.name):o(U.removeNamed,{label:n.name}),className:["group text-mp-on-surface-variant relative flex size-8 shrink-0","cursor-pointer appearance-none items-center justify-center rounded-full","bg-transparent p-0 font-[inherit] outline-none"].join(" "),onClick:()=>me(ne.filter((e,r)=>r!==i)),children:[e(p,{}),e(t,{icon:a,size:18})]})]},`${g(n)}-${i}`))}):null,oe?e("span",{id:se,className:[d,"text-mp-error"].join(" "),children:F}):x(D)?e("span",{id:se,className:[d,q?"text-mp-on-surface/38":"text-mp-on-surface-variant"].join(" "),children:D}):null]})});
@@ -0,0 +1,95 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { MPGridAlign, MPGridJustify } from '../grid/MPGrid.js';
4
+ import type { MPResponsive } from '../../types.js';
5
+ /** Which way the items run. */
6
+ export type MPFlexDirection = 'row' | 'column';
7
+ export interface MPFlexProps extends React.ComponentPropsWithoutRef<'div'> {
8
+ /**
9
+ * Which way the items run, and the width at which that changes.
10
+ *
11
+ * `direction={{ compact: 'column', medium: 'row' }}` is the whole reason this
12
+ * component exists as something other than a `className`: a stack on a phone
13
+ * and a row from 600dp up is the most common layout decision there is, and
14
+ * writing it as a Tailwind variant means writing the library's boundary out
15
+ * again in a number that has to match.
16
+ * @default 'row'
17
+ */
18
+ direction?: MPResponsive<MPFlexDirection>;
19
+ /**
20
+ * Whether items that do not fit move onto another line.
21
+ * @default false
22
+ */
23
+ wrap?: MPResponsive<boolean>;
24
+ /**
25
+ * How the space the items did not take is divided along the direction.
26
+ * @default 'start'
27
+ */
28
+ justify?: MPResponsive<MPGridJustify>;
29
+ /**
30
+ * How the items sit across it.
31
+ *
32
+ * `stretch` is CSS's own default and is what makes two cards in a row the same
33
+ * height without either being told a height. `center` is what a row of a label
34
+ * and a control wants.
35
+ * @default 'stretch'
36
+ */
37
+ align?: MPResponsive<MPGridAlign>;
38
+ /**
39
+ * The space between items. A number is pixels, a string is any CSS length.
40
+ * @default 0
41
+ */
42
+ gap?: MPResponsive<number | string>;
43
+ /**
44
+ * Lays out as `inline-flex`, so the box is as wide as its contents and sits in
45
+ * a line of text.
46
+ * @default false
47
+ */
48
+ inline?: boolean;
49
+ /**
50
+ * Renders something other than a `<div>`. Base UI's own escape hatch, so it
51
+ * behaves here exactly as it does on every Base UI primitive.
52
+ */
53
+ render?: useRender.RenderProp;
54
+ children?: React.ReactNode;
55
+ }
56
+ /**
57
+ * A row, or a column, and the width at which it changes from one to the other.
58
+ *
59
+ * It draws nothing. No surface, no padding, no corner — only the five properties
60
+ * a flex container has, each of which can be said per window size class.
61
+ *
62
+ * ## Why this and not a `className`
63
+ *
64
+ * For a row that is always a row, a `className` is the better answer and this
65
+ * component is overhead. What it is for is the row that is a column on a phone:
66
+ *
67
+ * ```tsx
68
+ * <MPFlex direction={{ compact: 'column', medium: 'row' }} gap={16}>
69
+ * ```
70
+ *
71
+ * Written as Tailwind variants that is `flex-col md:flex-row`, which is the
72
+ * library's boundary said again in Tailwind's numbers — 768px rather than 600 —
73
+ * and a layout that reflows at one width while the `MPGrid` beside it reflows at
74
+ * another. The variants this package ships (`mp-medium:flex-row`) fix the number
75
+ * and are the right answer where a page is already writing Tailwind; this is the
76
+ * answer for a page that would rather say it in props, and it resolves in CSS
77
+ * either way. See [Breakpoints](../../design/breakpoints).
78
+ *
79
+ * ## Its relationship to the other three
80
+ *
81
+ * - [MPGrid](./grid) divides a row into columns and is what a *page* is laid out
82
+ * on. Reach for it when things have to line up with things in another row.
83
+ * - [MPStack](./stack) lays things **over** each other in a pile, which is a
84
+ * different idea that shares an unfortunate name across the ecosystem.
85
+ * - [MPBox](./box) is a sheet with padding and a surface. This is neither.
86
+ *
87
+ * ## Every axis is responsive, and resolved in CSS
88
+ *
89
+ * The values reach the stylesheet as `--_mp-flex-*` slots, one per class the
90
+ * caller actually named, and the rules in `styles.css` fall each class back to
91
+ * the one below it. So a window crossing 600dp changes the layout with nothing
92
+ * re-rendering, and a server-rendered first paint is already right — which is
93
+ * the half of this that a hook and a branch cannot do.
94
+ */
95
+ export declare const MPFlex: React.ForwardRefExoticComponent<MPFlexProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{responsiveSlots as n}from"../../internal/responsive.js";import{cssLength as t}from"../../internal/length.js";export const MPFlex=/*@__PURE__*/e.forwardRef(function({direction:e,wrap:f,justify:a,align:o,gap:s,inline:p=!1,render:x,className:c,style:m,children:d,...u},g){return r({render:x,ref:g,props:{className:["mp-flex",p?"inline-flex":"flex",c??""].filter(Boolean).join(" "),style:{...n("flex-dir",e,e=>e),...n("flex-wrap",f,e=>e?"wrap":"nowrap"),...n("flex-justify",a,i),...n("flex-align",o,l),...n("flex-gap",s,e=>t(e)),...m},children:d,...u}})});function i(e){return"start"===e||"end"===e?`flex-${e}`:e}function l(e){return"start"===e||"end"===e?`flex-${e}`:e}
@@ -0,0 +1,2 @@
1
+ export { MPFlex } from './MPFlex.js';
2
+ export type { MPFlexDirection, MPFlexProps } from './MPFlex.js';
@@ -0,0 +1 @@
1
+ export{MPFlex}from"./MPFlex.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as t,jsxs as e}from"react/jsx-runtime";import*as n from"react";import{Button as o}from"@base-ui/react/button";import{accentSlots as a}from"../../internal/accent.js";import{cssLength as i}from"../../internal/length.js";import{MPStateLayer as s}from"../../internal/StateLayer.js";import{hasContent as r}from"../../internal/scale.js";import{useMPColor as m,useMPSize as l}from"../../internal/config.js";const p={filled:"bg-(--_mp-accent) text-(--_mp-on-accent)",tonal:"bg-(--_mp-accent-container) text-(--_mp-on-accent-container)",elevated:"bg-mp-surface-container-high text-(--_mp-accent)"},d={xs:"h-10",sm:"h-12",md:"h-14",lg:"h-18",xl:"h-24"},f={xs:"min-w-10 gap-0 px-0",sm:"min-w-12 gap-0 px-0",md:"min-w-14 gap-0 px-0",lg:"min-w-18 gap-0 px-0",xl:"min-w-24 gap-0 px-0"},c={xs:"rounded-mp-md",sm:"rounded-mp-lg",md:"rounded-mp-lg",lg:"rounded-mp-xl",xl:"rounded-mp-xl"},x={xs:24,sm:24,md:24,lg:30,xl:36},u={xs:"text-mp-label-large",sm:"text-mp-label-large",md:"text-mp-label-large",lg:"text-mp-title-medium",xl:"text-mp-title-medium"},g={xs:"min-w-16 gap-1.5 px-3",sm:"min-w-18 gap-2 px-4",md:"min-w-20 gap-2 px-4",lg:"min-w-24 gap-2.5 px-5",xl:"min-w-28 gap-3 px-6"},b={absolute:"absolute z-30",sticky:"sticky z-30",fixed:"fixed z-40"},h={"top-start":"top-(--_mp-fab-offset) start-(--_mp-fab-offset)","top-end":"top-(--_mp-fab-offset) end-(--_mp-fab-offset)","bottom-start":"bottom-(--_mp-fab-offset) start-(--_mp-fab-offset)","bottom-end":"bottom-(--_mp-fab-offset) end-(--_mp-fab-offset)"};export const MPFloatingActionButton=/*@__PURE__*/n.forwardRef(function({icon:n,label:w,extended:_=!1,variant:y="tonal",color:j,size:v,position:k="fixed",corner:z="bottom-end",offset:N=16,disabled:B=!1,type:$="button",className:A,style:F,...L},M){const P=m(j),R=l(v);return e(o,{ref:M,type:$,disabled:B,"aria-label":w,"data-mp-size":R,"data-mp-variant":y,className:["mp-fab group inline-flex shrink-0 items-center justify-center","box-border overflow-hidden align-middle whitespace-nowrap select-none","cursor-pointer appearance-none font-[inherit]","outline-mp-secondary focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-solid outline-none","transition-[background-color,box-shadow,color,min-width,padding,gap]","duration-(--mp-sys-motion-duration-short4) ease-mp-standard",c[R],d[R],u[R],_?g[R]:f[R],B?"bg-mp-on-surface/12 text-mp-on-surface/38 cursor-default shadow-none":`${p[y]} shadow-mp-3`,"static"===k?"relative":`${b[k]} ${h[z]}`,A??""].filter(Boolean).join(" "),style:{...a(P),"--_mp-fab-offset":i(N),...F},...L,children:[B?null:t(s,{}),r(n)?t("span",{className:"relative flex shrink-0 items-center justify-center",style:{width:x[R],height:x[R]},children:n}):null,t("span",{className:["relative grid transition-[grid-template-columns]","duration-(--mp-sys-motion-duration-short4) ease-mp-standard",_?"grid-cols-[1fr]":"grid-cols-[0fr]"].join(" "),children:t("span",{className:"min-w-0 truncate",children:w})})]})});
2
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";import*as o from"react";import{Button as n}from"@base-ui/react/button";import{accentSlots as a}from"../../internal/accent.js";import{cssLength as i}from"../../internal/length.js";import{MPStateLayer as s}from"../../internal/StateLayer.js";import{hasContent as r}from"../../internal/scale.js";import{useMPColor as m,useMPSize as l}from"../../internal/config.js";const p={filled:"bg-(--_mp-accent) text-(--_mp-on-accent)",tonal:"bg-(--_mp-accent-container) text-(--_mp-on-accent-container)",elevated:"bg-mp-surface-container-high text-(--_mp-accent)"},d={xs:"h-10",sm:"h-12",md:"h-14",lg:"h-18",xl:"h-24"},f={xs:"min-w-10 gap-0 px-0",sm:"min-w-12 gap-0 px-0",md:"min-w-14 gap-0 px-0",lg:"min-w-18 gap-0 px-0",xl:"min-w-24 gap-0 px-0"},c={xs:"rounded-mp-md",sm:"rounded-mp-lg",md:"rounded-mp-lg",lg:"rounded-mp-xl",xl:"rounded-mp-xl"},x={xs:24,sm:24,md:24,lg:30,xl:36},u={xs:"text-mp-label-large",sm:"text-mp-label-large",md:"text-mp-label-large",lg:"text-mp-title-medium",xl:"text-mp-title-medium"},b={xs:"min-w-16 gap-1.5 px-3",sm:"min-w-18 gap-2 px-4",md:"min-w-20 gap-2 px-4",lg:"min-w-24 gap-2.5 px-5",xl:"min-w-28 gap-3 px-6"},g={absolute:"absolute z-30",sticky:"sticky z-30",fixed:"fixed z-40"},h={"top-start":"top-(--_mp-fab-offset) start-(--_mp-fab-offset)","top-end":"top-(--_mp-fab-offset) end-(--_mp-fab-offset)","bottom-start":"bottom-(--_mp-fab-offset) start-(--_mp-fab-offset)","bottom-end":"bottom-(--_mp-fab-offset) end-(--_mp-fab-offset)"};export const MPFloatingActionButton=/*@__PURE__*/o.forwardRef(function({icon:o,label:w,extended:_=!1,variant:y="tonal",color:j,size:v,position:k="fixed",corner:z="bottom-end",offset:N=16,disabled:B=!1,type:$="button",className:A,style:F,...L},M){const P=m(j),R=l(v);return e(n,{ref:M,type:$,disabled:B,"aria-label":w,"data-mp-size":R,"data-mp-variant":y,className:["mp-fab group inline-flex shrink-0 items-center justify-center","box-border overflow-hidden align-middle whitespace-nowrap select-none","cursor-pointer appearance-none border-0 font-[inherit]","outline-mp-secondary focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-solid outline-none","transition-[background-color,box-shadow,color,min-width,padding,gap]","duration-(--mp-sys-motion-duration-short4) ease-mp-standard",c[R],d[R],u[R],_?b[R]:f[R],B?"bg-mp-on-surface/12 text-mp-on-surface/38 cursor-default shadow-none":`${p[y]} shadow-mp-3`,"static"===k?"relative":`${g[k]} ${h[z]}`,A??""].filter(Boolean).join(" "),style:{...a(P),"--_mp-fab-offset":i(N),...F},...L,children:[B?null:t(s,{}),r(o)?t("span",{className:"relative flex shrink-0 items-center justify-center",style:{width:x[R],height:x[R]},children:o}):null,t("span",{className:["relative grid transition-[grid-template-columns]","duration-(--mp-sys-motion-duration-short4) ease-mp-standard",_?"grid-cols-[1fr]":"grid-cols-[0fr]"].join(" "),children:t("span",{className:"min-w-0 truncate",children:w})})]})});
@@ -0,0 +1,127 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import { type MPBottomNavigationLabels, type MPBottomNavigationValue } from '../../internal/bottom-navigation.js';
4
+ import type { MPElevation, MPPosition, MPSize, MPVariant } from '../../types.js';
5
+ export interface MPFloatingBottomNavigationProps extends Omit<React.ComponentPropsWithoutRef<'nav'>, 'defaultValue' | 'onChange'> {
6
+ /** The destination the reader is on. Use with `onValueChange` for a controlled bar. */
7
+ value?: MPBottomNavigationValue | null;
8
+ /** Which starts current, for an uncontrolled bar. */
9
+ defaultValue?: MPBottomNavigationValue | null;
10
+ /** Called with the value of the destination that was pressed. */
11
+ onValueChange?: (value: MPBottomNavigationValue) => void;
12
+ /**
13
+ * How the bar sits in the page's scroll.
14
+ *
15
+ * `fixed` — the default — holds it against the bottom of the window.
16
+ * `sticky` holds it against the bottom of whatever is scrolling, `absolute`
17
+ * against the bottom of the nearest positioned ancestor — which is what a bar
18
+ * inside a phone screen of its own wants — and `static` puts it back in the
19
+ * flow, centred.
20
+ * @default 'fixed'
21
+ */
22
+ position?: MPPosition;
23
+ /**
24
+ * How far the bar floats above the bottom edge. A number is pixels, a string
25
+ * is any CSS length.
26
+ *
27
+ * This is the whole difference between this component and
28
+ * `MPBottomNavigation`: the gap under it is what makes the page keep going
29
+ * underneath rather than stop at a bar.
30
+ * @default 16
31
+ */
32
+ offset?: number | string;
33
+ /**
34
+ * Which names are drawn. `selected` here, against the `all` a full-width bar
35
+ * defaults to: this one is only as wide as what is in it, so five drawn names
36
+ * would stretch it across the screen and it would stop being a lozenge.
37
+ * @default 'selected'
38
+ */
39
+ labels?: MPBottomNavigationLabels;
40
+ /**
41
+ * How much surface the lozenge paints.
42
+ *
43
+ * A container's ladder, so the sheet is never dyed — what carries the accent
44
+ * is the one destination that is current.
45
+ * @default 'filled'
46
+ */
47
+ variant?: MPVariant;
48
+ /**
49
+ * How far off the page it is lifted.
50
+ *
51
+ * `3` here, against the nothing every other surface defaults to, because this
52
+ * bar is *defined* by not being part of the page: a lozenge lying flat over
53
+ * the content it is floating above reads as a mistake rather than as a
54
+ * decision.
55
+ * @default 3
56
+ */
57
+ elevation?: MPElevation;
58
+ /**
59
+ * The height of the row and its type scale.
60
+ * @default 'md'
61
+ */
62
+ size?: MPSize;
63
+ /**
64
+ * Adds `env(safe-area-inset-bottom)` to `offset`, so the bar clears a phone's
65
+ * home indicator rather than sitting on it.
66
+ *
67
+ * Unlike on `MPBottomNavigation` this moves the whole sheet rather than the
68
+ * row inside it: there is nothing under a floating bar that has to stay
69
+ * covered.
70
+ * @default true
71
+ */
72
+ safeArea?: boolean;
73
+ /** Every destination stops answering. */
74
+ disabled?: boolean;
75
+ /**
76
+ * The name the bar is announced by — "Main", "Sections". A landmark with no
77
+ * name is one a screen reader lists as "navigation".
78
+ */
79
+ label?: string;
80
+ /**
81
+ * Renders something other than a `<nav>`. Rarely what you want here: a row of
82
+ * destinations is navigation.
83
+ */
84
+ render?: useRender.RenderProp;
85
+ /** The `MPBottomNavigationItem`s — the same item the full-width bar takes. */
86
+ children?: React.ReactNode;
87
+ }
88
+ /**
89
+ * A row of destinations floating clear of the bottom edge of the window.
90
+ *
91
+ * ```tsx
92
+ * <MPFloatingBottomNavigation defaultValue="home" label="Main">
93
+ * <MPBottomNavigationItem value="home" icon={<HomeIcon />}>Home</MPBottomNavigationItem>
94
+ * <MPBottomNavigationItem value="search" icon={<SearchIcon />}>Search</MPBottomNavigationItem>
95
+ * </MPFloatingBottomNavigation>
96
+ * ```
97
+ *
98
+ * It is `MPBottomNavigation` lifted off the page. The same `<nav>`, the same
99
+ * `MPBottomNavigationItem` children, the same `aria-current="page"` — and
100
+ * deliberately not a `role="tablist"`, for the same reason: a bottom navigation
101
+ * changes what the page *is*, not which panel of one is showing.
102
+ *
103
+ * ## Everything about the shape follows from `offset`
104
+ *
105
+ * Because the page keeps going underneath, the sheet is a stadium rather than a
106
+ * bar with two corners; it is only as wide as its destinations; it carries a
107
+ * shadow, because a lozenge lying flat over what it is floating above reads as
108
+ * a mistake; and it names only the destination the reader is on, since five
109
+ * drawn names would stretch it back into a bar.
110
+ *
111
+ * ## There is no second highlight
112
+ *
113
+ * The destination the reader is on wears the same active indicator it wears in
114
+ * the full-width bar — MD3's pill, widening out of a circle behind the glyph.
115
+ * A floating bar could instead have one tile that slides between destinations,
116
+ * and this deliberately does not: the specification draws one selected
117
+ * treatment, and a lozenge with both would be saying where the reader is twice,
118
+ * on two different curves.
119
+ *
120
+ * ## Which bar to reach for
121
+ *
122
+ * `MPBottomNavigation` when the bar is the bottom of the screen — the page
123
+ * stops at it, and the tonal step between `surface-container` and `surface` is
124
+ * what separates them. This one when the content is meant to run underneath: a
125
+ * map, a photograph, a feed that should not end in a bar.
126
+ */
127
+ export declare const MPFloatingBottomNavigation: React.ForwardRefExoticComponent<MPFloatingBottomNavigationProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsx as e}from"react/jsx-runtime";import*as t from"react";import{useRender as a}from"@base-ui/react/use-render";import{MPBottomNavigationContext as o}from"../../internal/bottom-navigation.js";import{containerSurface as i}from"../../internal/elevation.js";import{cssLength as l}from"../../internal/length.js";import{useMPSize as s}from"../../internal/config.js";const n={xs:"h-12",sm:"h-14",md:"h-16",lg:"h-18",xl:"h-20"},r={xs:"px-1",sm:"px-1.5",md:"px-2",lg:"px-2.5",xl:"px-3"},m={xs:"gap-0.5",sm:"gap-1",md:"gap-1.5",lg:"gap-2",xl:"gap-2.5"},f={static:"mx-auto w-fit",absolute:"absolute inset-x-0 bottom-(--_mp-nav-offset) z-30 mx-auto w-fit",sticky:"sticky bottom-(--_mp-nav-offset) z-30 mx-auto w-fit",fixed:"fixed inset-x-0 bottom-(--_mp-nav-offset) z-40 mx-auto w-fit"};export const MPFloatingBottomNavigation=/*@__PURE__*/t.forwardRef(function({value:p,defaultValue:d=null,onValueChange:x,position:u="fixed",offset:c=16,labels:b="selected",variant:g="filled",elevation:v=3,size:h,safeArea:j=!0,disabled:w=!1,label:z,render:y,className:_,style:k,children:N,...B},C){const M=s(h),[P,V]=t.useState(d),A=void 0!==p,F=A?p:P,R=t.useCallback(e=>{A||V(e),x?.(e)},[A,x]),S=t.useMemo(()=>({value:F??null,change:R,size:M,labels:b,disabled:w,floating:!0}),[F,R,M,b,w]),$=l(c);return a({render:y??e("nav",{}),ref:C,props:{"aria-label":z,"data-mp-size":M,"data-mp-variant":g,className:["mp-floating-bottom-navigation rounded-mp-full box-border flex max-w-full min-w-0","items-stretch",n[M],r[M],m[M],i(g,v),"text-mp-on-surface",f[u],_??""].filter(Boolean).join(" "),style:{"--_mp-nav-offset":j?`calc(${$} + env(safe-area-inset-bottom))`:$,...k},children:e(o.Provider,{value:S,children:N}),...B}})});
@@ -0,0 +1,2 @@
1
+ export { MPFloatingBottomNavigation } from './MPFloatingBottomNavigation.js';
2
+ export type { MPFloatingBottomNavigationProps } from './MPFloatingBottomNavigation.js';
@@ -0,0 +1 @@
1
+ export{MPFloatingBottomNavigation}from"./MPFloatingBottomNavigation.js";
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { MPPosition, MPSize, MPVariant } from '../../types.js';
3
+ import type { MPDensity, MPMeasure, MPPosition, MPResponsive, MPSize, MPElevation, MPVariant } from '../../types.js';
4
4
  export interface MPFooterProps extends Omit<React.ComponentPropsWithoutRef<'footer'>, 'title'> {
5
5
  /**
6
6
  * How the sheet sits in the page's scroll.
@@ -25,6 +25,16 @@ export interface MPFooterProps extends Omit<React.ComponentPropsWithoutRef<'foot
25
25
  * @default 'outlined'
26
26
  */
27
27
  variant?: MPVariant;
28
+ /**
29
+ * How far off the page the bar is lifted, on MD3's own scale.
30
+ *
31
+ * It moves the tone as well as the shadow — see `MPElevation`. A bar's
32
+ * `elevated` is level 2 rather than 1, because a bar sits over the page's
33
+ * content rather than in it; an explicit level says exactly what it says.
34
+ *
35
+ * Left unset, `variant` decides.
36
+ */
37
+ elevation?: MPElevation;
28
38
  /**
29
39
  * The sheet's scale — its gutter and the air above and below its content. As
30
40
  * on [MPBox](./box), `size` here is the size of the *sheet*: it sets no height
@@ -32,13 +42,23 @@ export interface MPFooterProps extends Omit<React.ComponentPropsWithoutRef<'foot
32
42
  * @default 'md'
33
43
  */
34
44
  size?: MPSize;
45
+ /**
46
+ * Takes room out of the gutter and the air above and below the content.
47
+ *
48
+ * A footer is the sheet a page ends on, and the amount of screen it takes is
49
+ * mostly padding. On a dense page it is the first thing that should give some
50
+ * back.
51
+ * @default 0
52
+ */
53
+ density?: MPDensity;
35
54
  /**
36
55
  * Holds the content to a measure and centres it while the sheet itself still
37
- * spans the window. The same ladder [MPContainer](./container)'s `maxWidth`
38
- * uses.
56
+ * spans the window. The same prop [MPContainer](./container)'s `maxWidth` is —
57
+ * a rung of the size ladder, a CSS length of your own, or a map keyed by
58
+ * window size class.
39
59
  * @default 'none'
40
60
  */
41
- maxWidth?: MPSize | 'none';
61
+ maxWidth?: MPResponsive<MPMeasure>;
42
62
  /**
43
63
  * The gutter, and the air above and below.
44
64
  * @default true
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as e}from"react/jsx-runtime";import*as t from"react";import{useRender as o}from"@base-ui/react/use-render";import{BAR_SURFACE as r,MPPageLayoutContext as a}from"../../internal/page-layout.js";import{MEASURE as i,SHEET_PAD_X as n,SHEET_PAD_Y as s}from"../../internal/scale.js";import{useMPSize as l}from"../../internal/config.js";const m={static:"",absolute:"absolute inset-x-0 bottom-0 z-30",sticky:"sticky bottom-0 z-30",fixed:"fixed inset-x-0 bottom-0 z-40"};export const MPFooter=/*@__PURE__*/t.forwardRef(function({position:f="static",variant:c="outlined",size:d,maxWidth:p="none",padded:u=!0,label:b,render:x,className:j,children:z,...h},v){const w=l(d),{register:y}=t.useContext(a),g=t.useCallback(e=>{y("footer",e),"function"==typeof v?v(e):v&&(v.current=e)},[y,v]);return o({render:x??e("footer",{}),ref:g,props:{"aria-label":b,"data-mp-size":w,"data-mp-variant":c,className:["mp-footer text-mp-on-surface box-border w-full min-w-0",r[c],"outlined"===c?"border-mp-outline-variant border-t":"",m[f],j??""].filter(Boolean).join(" "),children:e("div",{className:["mp-footer__inner w-full",u?`${n[w]} ${s[w]}`:"","none"===p?"":`${i[p]} mx-auto`].filter(Boolean).join(" "),children:z}),...h}})});
2
+ import{jsx as e}from"react/jsx-runtime";import*as o from"react";import{useRender as t}from"@base-ui/react/use-render";import{barSurface as r,MPPageLayoutContext as n}from"../../internal/page-layout.js";import{sheetPadX as i,sheetPadY as a}from"../../internal/density.js";import{measureValue as s}from"../../internal/measure.js";import{useWindowMins as m}from"../../internal/window-class.js";import{responsiveSlots as l,withBaseline as f}from"../../internal/responsive.js";import{useMPDensity as d,useMPSize as p}from"../../internal/config.js";const c={static:"",absolute:"absolute inset-x-0 bottom-0 z-30",sticky:"sticky bottom-0 z-30",fixed:"fixed inset-x-0 bottom-0 z-40"};export const MPFooter=/*@__PURE__*/o.forwardRef(function({position:u="static",variant:b="outlined",elevation:x,size:j,density:v,maxWidth:y="none",padded:w=!0,label:z,render:h,className:g,children:k,...N},B){const C=p(j),$=d(v),_=m(),{register:F}=o.useContext(n),M=o.useCallback(e=>{F("footer",e),"function"==typeof B?B(e):B&&(B.current=e)},[F,B]);return t({render:h??e("footer",{}),ref:M,props:{"aria-label":z,"data-mp-size":C,"data-mp-variant":b,className:["mp-footer text-mp-on-surface box-border w-full min-w-0",r(b,x),"outlined"===b?"border-mp-outline-variant border-t":"",c[u],g??""].filter(Boolean).join(" "),children:e("div",{className:["mp-footer__inner w-full",w?`${i(C,$)} ${a(C,$)}`:"","none"===y?"":"mp-measure mx-auto"].filter(Boolean).join(" "),style:"none"===y?void 0:l("measure",f(y,"none"),e=>s(e,_)),children:k}),...N}})});
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as r}from"react/jsx-runtime";import*as o from"react";import{Form as e}from"@base-ui/react/form";import{SHEET_GAP as i}from"../../internal/scale.js";export const MPForm=/*@__PURE__*/o.forwardRef(function({validationMode:o="onSubmit",errors:m,onSubmit:a,size:t="md",className:n,children:s,...f},l){return r(e,{ref:l,validationMode:o,errors:m,onFormSubmit:r=>a?.(r),"data-mp-size":t,className:["mp-form flex flex-col",i[t],n??""].filter(Boolean).join(" "),...f,children:s})});
2
+ import{jsx as r}from"react/jsx-runtime";import*as o from"react";import{Form as e}from"@base-ui/react/form";import{useMPSize as i}from"../../internal/config.js";import{SHEET_GAP as t}from"../../internal/scale.js";export const MPForm=/*@__PURE__*/o.forwardRef(function({validationMode:o="onSubmit",errors:m,onSubmit:a,size:n,className:s,children:f,...l},c){const d=i(n);return r(e,{ref:c,validationMode:o,errors:m,onFormSubmit:r=>a?.(r),"data-mp-size":d,className:["mp-form flex flex-col",t[d],s??""].filter(Boolean).join(" "),...l,children:f})});