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
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 CDGet <jooy2.contact@gmail.com> (https://cdget.com).
3
+ Copyright (c) 2026 CDGet (https://cdget.com).
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -2,29 +2,29 @@
2
2
  page on npm as well as the front page on GitHub, `.npmignore` keeps `docs/`
3
3
  out of the tarball, and npm resolves a relative image against the published
4
4
  package before it falls back to anything else. -->
5
- <img src="https://raw.githubusercontent.com/jooy2/material-plus/main/docs/public/logo-large.png" alt="Material Plus" width="96" height="96">
5
+ <img src="https://raw.githubusercontent.com/jooy2/material-plus-ui/main/docs/public/logo-large.png" alt="Material Plus" width="96" height="96">
6
6
 
7
7
  # Material Plus
8
8
 
9
- [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jooy2/material-plus/blob/main/LICENSE) ![Programming Language Usage](https://img.shields.io/github/languages/top/jooy2/material-plus) [![npm downloads](https://img.shields.io/npm/dm/material-plus-ui.svg)](https://www.npmjs.com/package/material-plus-ui) [![npm latest package](https://img.shields.io/npm/v/material-plus-ui/latest.svg)](https://www.npmjs.com/package/material-plus-ui) ![npm bundle size](https://img.shields.io/bundlephobia/min/material-plus-ui)
9
+ [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jooy2/material-plus-ui/blob/main/LICENSE) ![Programming Language Usage](https://img.shields.io/github/languages/top/jooy2/material-plus-ui) [![npm downloads](https://img.shields.io/npm/dm/material-plus-ui.svg)](https://www.npmjs.com/package/material-plus-ui) [![npm latest package](https://img.shields.io/npm/v/material-plus-ui/latest.svg)](https://www.npmjs.com/package/material-plus-ui) ![npm bundle size](https://img.shields.io/bundlephobia/min/material-plus-ui)
10
10
 
11
- ### 📘 [**material-plus.cdget.com**](https://material-plus.cdget.com)
11
+ This README is the quick start. [The documentation site](https://material-plus.cdget.com) has a page per component, with live previews and the full props table.
12
12
 
13
- Live previews and full props for every component. This README is just the quick start.
13
+ ![Material Plus components arranged around the Material Plus mark: a search field, a settings card, radio buttons and checkboxes, buttons and chips, a segmented button and pagination, an alert, a slider, a progress bar and a meter, an avatar stack, a badge and a rating](https://raw.githubusercontent.com/jooy2/material-plus-ui/main/.github/showcase.png)
14
14
 
15
15
  ---
16
16
 
17
- **Material Plus is a React component library implementing Material Design 3.** It is the pile of components you end up writing in every Material project — the field that handles IME composition properly, the icon wrapper that agrees with your set — extracted, documented and tested.
17
+ **Material Plus is a React component library implementing Material Design 3.** It follows the specification directly rather than wrapping somebody's implementation of it, so its colour roles, type scale and shapes are the ones the spec names.
18
18
 
19
- It follows the specification directly rather than wrapping somebody's implementation of it, so its colour roles, type scale and shapes are the ones the spec names.
19
+ It also goes on past where the specification stops. The button ladder keeps the spec's 32, 40 and 56px and adds 64 and 72 — the next size the spec names is 96, and a 96px button beside a 64px field is not a row — and the charts, the data table and the command palette are components the spec never named at all.
20
20
 
21
21
  - **Themed in one line.** Set `--mp-source-color` and every colour role follows, the way Material generates a scheme from a source colour. No provider, no theme object, no re-render.
22
22
  - **It coexists.** Nothing here is page-level — no reset, no provider, no global styling — and it reads the `--md-sys-color-*` tokens your page already has if they are there. A project already running Material keeps its own setup.
23
23
  - **IME-safe by construction.** Korean, Japanese and Chinese composition survives whatever your `onChange` does with the value.
24
24
  - **Bring your own icons.** `MPIcon` takes a component or an element from any set. `lucide-react` ships with the package, gathered in one readable constants file.
25
25
  - **Works in a Next.js server component**, and in any bundler: the components carry `"use client"`, the barrel and the data do not, and every specifier in `dist/` names a file — so webpack, Vite, esbuild, Rollup and plain Node all resolve it.
26
- - **ESM only**, TypeScript declarations included, and tree-shakeable for real: one component is 2.9 kB gzipped and five are 7.4 kB, against 74 kB for all hundred and eleven. `npm run measure` prints those numbers off a real bundler, so they cannot quietly stop being true. The stylesheet splits the same way.
27
- - **One runtime dependency.** React 18 or 19, Node.js 22 or later.
26
+ - **ESM only**, TypeScript declarations included, and tree-shakeable for real: one component is 3.8 kB gzipped and five are 9.8 kB, against 130.6 kB for every export there is. `npm run measure` prints those numbers off a real bundler, so they cannot quietly stop being true. The stylesheet splits the same way.
27
+ - **Two runtime dependencies**, and the second is loaded rather than bundled: `lucide-react` for the glyphs, and `highlight.js` behind `MPCodeBlock` — every grammar sits behind an `import()`, so a page that renders no code block never downloads one. React 18 or 19, Node.js 22 or later.
28
28
 
29
29
  ## Documentation
30
30
 
@@ -34,6 +34,7 @@ Everything is documented at **[material-plus.cdget.com](https://material-plus.cd
34
34
  | --- | --- |
35
35
  | [**Getting started**](https://material-plus.cdget.com/guide/getting-started) | Install and setup, end to end. |
36
36
  | [**All components**](https://material-plus.cdget.com/components/) | Every component, one page each: live previews and the full props table. |
37
+ | [**Browser support**](https://material-plus.cdget.com/browser-support) | Which browsers and versions it runs in, and what is reduced in the older ones. |
37
38
  | [**Changelog**](https://material-plus.cdget.com/changelog) | What changed in each release. |
38
39
 
39
40
  Also available in Korean / 한국어 문서: **[material-plus.cdget.com/ko/](https://material-plus.cdget.com/ko/)**
@@ -74,7 +75,7 @@ If Tailwind v4 is already in your project, import the token sheet instead:
74
75
  @import 'material-plus-ui/tailwind.css';
75
76
  ```
76
77
 
77
- A page that renders a handful of components can take the tokens and a sheet each instead of the whole 113 kB — 4.5 kB gzipped for one component against 16.1 kB for the lot. [The guide](https://material-plus.cdget.com/guide/getting-started#if-you-only-render-a-few-components) has the numbers and where the two paths cross.
78
+ A page that renders a handful of components can take the tokens and a sheet each instead of the whole 172.2 kB — 6.3 kB gzipped for one component against 23.4 kB for the lot. [The guide](https://material-plus.cdget.com/guide/getting-started#if-you-only-render-a-few-components) has the numbers and where the two paths cross.
78
79
 
79
80
  ```ts
80
81
  import 'material-plus-ui/styles/tokens.css';
@@ -133,10 +134,7 @@ Full details, including scoped and runtime theming, are in [the theming guide](h
133
134
 
134
135
  ## Components
135
136
 
136
- | Component | What it is |
137
- | --- | --- |
138
- | [`MPTextField`](https://material-plus.cdget.com/components/inputs/text-field) | An outlined text field that survives an IME, with the label, supporting text, adornments and password toggle already assembled. |
139
- | [`MPIcon`](https://material-plus.cdget.com/components/display/icon) | A glyph at a known size in a known colour, from whichever icon set you use. |
137
+ There are over 120, grouped into layout, inputs, display, feedback, motion and charts. Each has a page of its own at [material-plus.cdget.com/components/](https://material-plus.cdget.com/components/), with the full props table and previews that are the component running in the page.
140
138
 
141
139
  ### Why `MPTextField` exists
142
140
 
@@ -151,7 +149,7 @@ A controlled `<input>` renders from its `value`. While an input method is compos
151
149
 
152
150
  ## Contributing
153
151
 
154
- Issues and pull requests are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).
152
+ Issues and pull requests are welcome. [CONTRIBUTING.md](CONTRIBUTING.md) has the repository layout, the commands and what a component is expected to own. Participation is subject to the [Code of Conduct](CODE_OF_CONDUCT.md).
155
153
 
156
154
  ```bash
157
155
  npm install # also builds, via `prepare`
@@ -160,6 +158,14 @@ npm run typecheck # src, test and docs
160
158
  npm run docs:dev # the documentation site
161
159
  ```
162
160
 
161
+ To report a security issue, follow the process in [SECURITY.md](SECURITY.md) instead of opening a public issue.
162
+
163
+ For anything else that does not belong in a public issue, write to CDGet at [cdget.com/contact](https://cdget.com/contact).
164
+
165
+ ## Sponsor
166
+
167
+ Material Plus is free to use and maintained in the open. If it saves you time, you can support the work at [cdget.com/donate](https://cdget.com/donate) or through the Sponsor button on GitHub.
168
+
163
169
  ## License
164
170
 
165
171
  [MIT](LICENSE) © [CDGet](https://cdget.com)
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { MPSize, MPVariant } from '../../types.js';
2
+ import type { MPDensity, MPSize, MPElevation, MPVariant } from '../../types.js';
3
3
  export interface MPAccordionProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'defaultValue' | 'onChange'> {
4
4
  /**
5
5
  * Whether more than one section may be open at once.
@@ -31,11 +31,31 @@ export interface MPAccordionProps extends Omit<React.ComponentPropsWithoutRef<'d
31
31
  * @default 'outlined'
32
32
  */
33
33
  variant?: MPVariant;
34
+ /**
35
+ * How far off the page the sheet is lifted, on MD3's own scale.
36
+ *
37
+ * It moves the **tone** as well as the shadow, because Material pairs the two:
38
+ * a level-2 surface is `surface-container` under a level-2 shadow, and a prop
39
+ * that only cast a shadow would raise this into a surface the specification
40
+ * has no name for. Given a level, `variant` is left holding only its hairline.
41
+ *
42
+ * Left unset, `variant` decides — and `variant="elevated"` is this at `1`.
43
+ */
44
+ elevation?: MPElevation;
34
45
  /**
35
46
  * The room inside every section, and the type scale of its header and body.
36
47
  * @default 'md'
37
48
  */
38
49
  size?: MPSize;
50
+ /**
51
+ * Takes room out of every section's header and body.
52
+ *
53
+ * An accordion is a list of rows that happen to open, so it wants density for
54
+ * the reason a list does: a panel of eight sections that fits on the screen is
55
+ * a different component from one that has to be scrolled to be understood.
56
+ * @default 0
57
+ */
58
+ density?: MPDensity;
39
59
  /**
40
60
  * Keeps closed panels in the DOM so the browser's own page search can find and
41
61
  * open them. Overrides `keepMounted`.
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{Accordion as a}from"@base-ui/react/accordion";import{MPIcon as i}from"../icon/MPIcon.js";import{ChevronDownIcon as r}from"../../constants/icons.js";import{MPStateLayer as o}from"../../internal/StateLayer.js";import{CONTROL_GAP as s,CONTROL_ICON as l,hasContent as d,META_TEXT as c,PROSE_TEXT as m,SHEET_PAD_X as u,SHEET_PAD_Y as p,SHEET_TITLE as f}from"../../internal/scale.js";import{CONTAINER_SURFACE as h}from"../../internal/surface.js";import{useMPSize as v}from"../../internal/config.js";const x=/*@__PURE__*/n.createContext({size:"md",dividers:!0}),b=/*@__PURE__*/["h-(--accordion-panel-height) overflow-hidden","transition-[height] duration-(--mp-sys-motion-duration-short4) ease-mp-standard","motion-reduce:transition-none","data-starting-style:h-0 data-ending-style:h-0"].join(" ");const g={xs:"pb-2.5",sm:"pb-3",md:"pb-4",lg:"pb-5",xl:"pb-6"};export const MPAccordion=/*@__PURE__*/n.forwardRef(function({multiple:t=!1,value:i,defaultValue:r,onValueChange:o,dividers:s=!0,disabled:l=!1,variant:d="outlined",size:c,hiddenUntilFound:m=!1,keepMounted:u=!1,className:p,children:f,...b},g){const j=v(c),N=n.useMemo(()=>({size:j,dividers:s}),[j,s]);return e(x.Provider,{value:N,children:e(a.Root,{ref:g,multiple:t,value:i,defaultValue:r,onValueChange:e=>o?.(e),disabled:l,hiddenUntilFound:m,keepMounted:u,"data-mp-size":j,"data-mp-variant":d,className:["mp-accordion rounded-mp-md flex w-full flex-col",h[d],"text-mp-on-surface",s?"overflow-hidden [&>div+div]:border-mp-outline-variant [&>div+div]:border-t":"p-1",p??""].filter(Boolean).join(" "),...b,children:f})})});export const MPAccordionItem=/*@__PURE__*/n.forwardRef(function({value:h,title:v,subtitle:j,startIcon:N,action:w,disabled:y=!1,className:_,children:k,...z},C){const{size:M,dividers:A}=n.useContext(x),P=u[M],B=p[M],I=n.useRef(null),[R,V]=n.useState(!1),F=n.useCallback(e=>{var t;I.current=e,e&&V(e.hasAttribute("data-open")&&!((t=e).hasAttribute("data-starting-style")&&parseFloat(getComputedStyle(t).transitionDuration)>0))},[]);return t(a.Item,{ref:C,value:h,disabled:y,className:["mp-accordion__item flex flex-col",_??""].filter(Boolean).join(" "),...z,children:[t(a.Header,{className:"m-0 flex w-full items-center font-[inherit]",children:[t(a.Trigger,{className:["group relative flex min-w-0 flex-1 cursor-pointer items-center text-start","appearance-none border-0 bg-transparent font-[inherit] text-inherit",P,B,s[M],A?"":"rounded-mp-sm","outline-mp-secondary focus-visible:outline-2 focus-visible:-outline-offset-2","focus-visible:outline-solid outline-none","disabled:text-mp-on-surface/38 disabled:cursor-default"].filter(Boolean).join(" "),children:[e(o,{}),d(N)?e("span",{className:"text-mp-on-surface-variant flex h-[1lh] shrink-0 items-center",children:N}):null,t("span",{className:"mp-accordion__text flex min-w-0 flex-1 flex-col",children:[d(v)?e("span",{className:`mp-accordion__title truncate ${f[M]}`,children:v}):null,d(j)?e("span",{className:`mp-accordion__subtitle text-mp-on-surface-variant truncate ${c}`,children:j}):null]}),e("span",{className:["text-mp-on-surface-variant flex h-[1lh] shrink-0 items-center","transition-[rotate] duration-(--mp-sys-motion-duration-short4)","ease-mp-standard motion-reduce:transition-none","group-data-panel-open:rotate-180"].join(" "),children:e(i,{icon:r,size:l[M]})})]}),d(w)?e("span",{className:`flex shrink-0 items-center ${P}`,children:w}):null]}),e(a.Panel,{ref:F,className:[b,R?"data-open:overflow-visible":""].filter(Boolean).join(" "),onTransitionEnd:e=>{e.target===I.current&&"height"===e.propertyName&&V(I.current.hasAttribute("data-open"))},children:e("div",{className:["min-w-0",m[M],"text-mp-on-surface-variant",P,g[M]].join(" "),children:k})})]})});
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{Accordion as i}from"@base-ui/react/accordion";import{MPIcon as a}from"../icon/MPIcon.js";import{ChevronDownIcon as r}from"../../constants/icons.js";import{MPStateLayer as o}from"../../internal/StateLayer.js";import{CONTROL_GAP as s,CONTROL_ICON as l,hasContent as d,META_TEXT as c,PROSE_TEXT as m,SHEET_TITLE as u}from"../../internal/scale.js";import{sheetPadX as p,sheetPadY as f}from"../../internal/density.js";import{containerSurface as h}from"../../internal/elevation.js";import{useMPDensity as v,useMPSize as x}from"../../internal/config.js";const b=/*@__PURE__*/n.createContext({size:"md",density:0,dividers:!0}),g=/*@__PURE__*/["h-(--accordion-panel-height) overflow-hidden","transition-[height] duration-(--mp-sys-motion-duration-short4) ease-mp-standard","motion-reduce:transition-none","data-starting-style:h-0 data-ending-style:h-0"].join(" ");const j={xs:"pb-2.5",sm:"pb-3",md:"pb-4",lg:"pb-5",xl:"pb-6"};export const MPAccordion=/*@__PURE__*/n.forwardRef(function({multiple:t=!1,value:a,defaultValue:r,onValueChange:o,dividers:s=!0,disabled:l=!1,variant:d="outlined",elevation:c,size:m,density:u,hiddenUntilFound:p=!1,keepMounted:f=!1,className:g,children:j,...N},y){const w=x(m),_=v(u),k=n.useMemo(()=>({size:w,density:_,dividers:s}),[w,_,s]);return e(b.Provider,{value:k,children:e(i.Root,{ref:y,multiple:t,value:a,defaultValue:r,onValueChange:e=>o?.(e),disabled:l,hiddenUntilFound:p,keepMounted:f,"data-mp-size":w,"data-mp-variant":d,className:["mp-accordion rounded-mp-md flex w-full flex-col",h(d,c),"text-mp-on-surface",s?"overflow-hidden [&>div+div]:border-mp-outline-variant [&>div+div]:border-t":"p-1",g??""].filter(Boolean).join(" "),...N,children:j})})});export const MPAccordionItem=/*@__PURE__*/n.forwardRef(function({value:h,title:v,subtitle:x,startIcon:N,action:y,disabled:w=!1,className:_,children:k,...z},C){const{size:M,density:A,dividers:P}=n.useContext(b),B=p(M,A),I=f(M,A),R=n.useRef(null),[V,F]=n.useState(!1),S=n.useCallback(e=>{var t;R.current=e,e&&F(e.hasAttribute("data-open")&&!((t=e).hasAttribute("data-starting-style")&&parseFloat(getComputedStyle(t).transitionDuration)>0))},[]);return t(i.Item,{ref:C,value:h,disabled:w,className:["mp-accordion__item flex flex-col",_??""].filter(Boolean).join(" "),...z,children:[t(i.Header,{className:"m-0 flex w-full items-center font-[inherit]",children:[t(i.Trigger,{className:["group relative flex min-w-0 flex-1 cursor-pointer items-center text-start","appearance-none border-0 bg-transparent font-[inherit] text-inherit",B,I,s[M],P?"":"rounded-mp-sm","outline-mp-secondary focus-visible:outline-2 focus-visible:-outline-offset-2","focus-visible:outline-solid outline-none","disabled:text-mp-on-surface/38 disabled:cursor-default"].filter(Boolean).join(" "),children:[e(o,{}),d(N)?e("span",{className:"text-mp-on-surface-variant flex h-[1lh] shrink-0 items-center",children:N}):null,t("span",{className:"mp-accordion__text flex min-w-0 flex-1 flex-col",children:[d(v)?e("span",{className:`mp-accordion__title truncate ${u[M]}`,children:v}):null,d(x)?e("span",{className:`mp-accordion__subtitle text-mp-on-surface-variant truncate ${c}`,children:x}):null]}),e("span",{className:["text-mp-on-surface-variant flex h-[1lh] shrink-0 items-center","transition-[rotate] duration-(--mp-sys-motion-duration-short4)","ease-mp-standard motion-reduce:transition-none","group-data-panel-open:rotate-180"].join(" "),children:e(a,{icon:r,size:l[M]})})]}),d(y)?e("span",{className:`flex shrink-0 items-center ${B}`,children:y}):null]}),e(i.Panel,{ref:S,className:[g,V?"data-open:overflow-visible":""].filter(Boolean).join(" "),onTransitionEnd:e=>{e.target===R.current&&"height"===e.propertyName&&F(R.current.hasAttribute("data-open"))},children:e("div",{className:["min-w-0",m[M],"text-mp-on-surface-variant",B,j[M]].join(" "),children:k})})]})});
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { MPColor, MPSize, MPVariant } from '../../types.js';
2
+ import type { MPColor, MPDensity, MPSize, MPTransition, MPVariant } from '../../types.js';
3
3
  /**
4
4
  * How loudly an alert announces itself.
5
5
  *
@@ -32,7 +32,7 @@ export interface MPAlertProps extends Omit<React.ComponentPropsWithoutRef<'div'>
32
32
  *
33
33
  * Four roles, not a severity ladder — there is no `info`, `success` or
34
34
  * `warning` here, because [the specification's colour
35
- * system](../design/color) has no way to derive them and a library that
35
+ * system](../../design/color) has no way to derive them and a library that
36
36
  * invented three more families would be promising tokens the sheet cannot
37
37
  * produce. `error` is the one severity Material does name, and the rest is an
38
38
  * emphasis decision: `primary` for a notice, `secondary` or `tertiary` for one
@@ -45,6 +45,16 @@ export interface MPAlertProps extends Omit<React.ComponentPropsWithoutRef<'div'>
45
45
  * @default 'md'
46
46
  */
47
47
  size?: MPSize;
48
+ /**
49
+ * Takes room out of the message without shrinking it.
50
+ *
51
+ * The step that matters on an alert is the first one. A page that shows
52
+ * several at once — a form reporting four invalid fields, a queue of
53
+ * warnings — stacks a lot of padding, and `-1` gives most of it back while
54
+ * leaving the text at the size a message has to be read at.
55
+ * @default 0
56
+ */
57
+ density?: MPDensity;
48
58
  /**
49
59
  * The heading line. With it the alert is two-part — a headline and the detail
50
60
  * under it; without it the whole thing is one line.
@@ -76,7 +86,19 @@ export interface MPAlertProps extends Omit<React.ComponentPropsWithoutRef<'div'>
76
86
  * their own.
77
87
  */
78
88
  live?: MPAlertLive;
79
- /** Passing it is what makes the dismiss button appear. */
89
+ /**
90
+ * Passing it is what makes the dismiss button appear.
91
+ *
92
+ * **It fires when the alert has finished leaving, not when the × is
93
+ * pressed.** An alert is in the flow of the page, so taking one out moves
94
+ * everything under it — and the caller owns the mount, which means an alert
95
+ * whose callback fired on the press had already been unmounted by the time
96
+ * there was anything to animate. So the press starts the exit and this is the
97
+ * end of it, roughly 200ms later, which is the moment `{open && <MPAlert/>}`
98
+ * wants to hear about.
99
+ *
100
+ * The event is the press that started it, held rather than re-created.
101
+ */
80
102
  onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;
81
103
  /**
82
104
  * The accessible name of the dismiss button. Defaults to the word for
@@ -90,6 +112,15 @@ export interface MPAlertProps extends Omit<React.ComponentPropsWithoutRef<'div'>
90
112
  locale?: string;
91
113
  /** The message. */
92
114
  children?: React.ReactNode;
115
+ /**
116
+ * An entrance, run once as it mounts.
117
+ *
118
+ * `transition="fade"` is the whole of what most callers want; the object form
119
+ * takes a duration, an edge to come from, or a scale to start at. Anything
120
+ * that has to run again — on scroll, on hover, under your own control — is an
121
+ * [MPAnimateFade](../motion/animate-fade) and its siblings.
122
+ */
123
+ transition?: MPTransition;
93
124
  }
94
125
  /**
95
126
  * A message about something that happened, set into the page it is about.
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{MPIcon as r}from"../icon/MPIcon.js";import{CloseIcon as o,ErrorIcon as i,InfoIcon as l}from"../../constants/icons.js";import{accentSlots as a}from"../../internal/accent.js";import{useMPLocale as s,useMPMessages as c}from"../../internal/locale.js";import{ALERT as m}from"../../internal/messages/alert.js";import{MPStateLayer as f}from"../../internal/StateLayer.js";import{CONTROL_ICON as p,hasContent as d,PROSE_TEXT as u,SHEET_GAP as x,SHEET_PAD as v,SHEET_TITLE as h,STACK_GAP as b}from"../../internal/scale.js";import{useMPColor as j,useMPSize as g}from"../../internal/config.js";const y={filled:"bg-(--_mp-accent) text-(--_mp-on-accent)",tonal:"bg-(--_mp-accent-container) text-(--_mp-on-accent-container)",elevated:"shadow-mp-1 bg-mp-surface-container-low text-mp-on-surface",outlined:"border-mp-outline border bg-transparent text-mp-on-surface",text:"bg-transparent text-mp-on-surface"},N={filled:"",tonal:"",elevated:"text-(--_mp-accent)",outlined:"text-(--_mp-accent)",text:"text-(--_mp-accent)"},_={filled:"",tonal:"",elevated:"text-mp-on-surface-variant",outlined:"text-mp-on-surface-variant",text:"text-mp-on-surface-variant"},w={primary:"polite",secondary:"polite",tertiary:"polite",error:"assertive"},z={assertive:"alert",polite:"status",off:void 0};export const MPAlert=/*@__PURE__*/n.forwardRef(function({variant:n="tonal",color:k,size:B,title:C,icon:L,action:M,live:P,onClose:A,closeLabel:I,locale:R,className:S,style:$,children:q,...D},E){const F=j(k),G=g(B),H=s(R),J=c(m,H),K=N[n],O=d(C),Q=void 0===L?e(r,{icon:"error"===F?i:l,size:p[G]}):L;return t("div",{ref:E,role:z[P??w[F]],"data-mp-size":G,"data-mp-variant":n,className:["mp-alert rounded-mp-md flex w-full items-start","box-border",v[G],x[G],u[G],y[n],S??""].filter(Boolean).join(" "),style:{...a(F),...$},...D,children:[d(Q)?e("span",{className:["flex h-[1lh] shrink-0 items-center",K].filter(Boolean).join(" "),children:Q}):null,t("div",{className:`flex min-w-0 flex-1 flex-col ${b[G]}`,children:[O?e("div",{className:[h[G],K].filter(Boolean).join(" "),children:C}):null,d(q)?e("div",{className:O?_[n]:void 0,children:q}):null]}),d(M)?e("div",{className:"flex h-[1lh] shrink-0 items-center",children:M}):null,A?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:t("button",{type:"button","aria-label":I??J.dismiss,onClick:A,className:["group rounded-mp-full relative -m-1 flex size-8 cursor-pointer items-center","justify-center bg-transparent text-inherit","outline-mp-secondary focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-solid outline-none"].join(" "),children:[e(f,{}),e(r,{icon:o,size:p[G]})]})}):null]})});
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{MPIcon as r}from"../icon/MPIcon.js";import{CloseIcon as i,ErrorIcon as o,InfoIcon as a}from"../../constants/icons.js";import{accentSlots as l}from"../../internal/accent.js";import{transitionProps as s}from"../../internal/transition.js";import{useMPLocale as c,useMPMessages as m}from"../../internal/locale.js";import{ALERT as d}from"../../internal/messages/alert.js";import{inertProps as p}from"../../internal/inert.js";import{MPStateLayer as f}from"../../internal/StateLayer.js";import{CONTROL_ICON as u,hasContent as x,PROSE_TEXT as v,SHEET_GAP as h,SHEET_TITLE as b,STACK_GAP as j}from"../../internal/scale.js";import{sheetPad as y}from"../../internal/density.js";import{useMPColor as g,useMPDensity as N,useMPSize as w}from"../../internal/config.js";const _={filled:"bg-(--_mp-accent) text-(--_mp-on-accent)",tonal:"bg-(--_mp-accent-container) text-(--_mp-on-accent-container)",elevated:"shadow-mp-1 bg-mp-surface-container-low text-mp-on-surface",outlined:"border-mp-outline border bg-transparent text-mp-on-surface",text:"bg-transparent text-mp-on-surface"},z={filled:"",tonal:"",elevated:"text-(--_mp-accent)",outlined:"text-(--_mp-accent)",text:"text-(--_mp-accent)"},k={filled:"",tonal:"",elevated:"text-mp-on-surface-variant",outlined:"text-mp-on-surface-variant",text:"text-mp-on-surface-variant"},C={primary:"polite",secondary:"polite",tertiary:"polite",error:"assertive"},B={assertive:"alert",polite:"status",off:void 0};export const MPAlert=/*@__PURE__*/n.forwardRef(function({variant:L="tonal",color:R,size:S,density:E,title:M,icon:P,action:T,live:A,onClose:D,closeLabel:F,locale:I,transition:$,className:q,style:G,children:H,...J},K){const O=s($),Q=g(R),U=w(S),V=N(E),W=c(I),X=m(d,W),[Y,Z]=n.useState(!1),ee=n.useRef(null),te=n.useRef(null),ne=n.useCallback(()=>{const e=ee.current;ee.current=null,e&&D?.(e)},[D]);n.useLayoutEffect(()=>{const e=te.current;Y&&e&&0===parseFloat(getComputedStyle(e).transitionDuration)&&ne()},[Y,ne]);const re=z[L],ie=x(M),oe=void 0===P?e(r,{icon:"error"===Q?o:a,size:u[U]}):P,ae=t("div",{ref:K,role:B[A??C[Q]],"data-mp-size":U,"data-mp-variant":L,...p(Y),className:["mp-alert rounded-mp-md flex w-full items-start","box-border",y(U,V),h[U],v[U],_[L],O.className,q??""].filter(Boolean).join(" "),style:{...l(Q),...O.style,...G},...J,children:[x(oe)?e("span",{className:["flex h-[1lh] shrink-0 items-center",re].filter(Boolean).join(" "),children:oe}):null,t("div",{className:`flex min-w-0 flex-1 flex-col ${j[U]}`,children:[ie?e("div",{className:[b[U],re].filter(Boolean).join(" "),children:M}):null,x(H)?e("div",{className:ie?k[L]:void 0,children:H}):null]}),x(T)?e("div",{className:"flex h-[1lh] shrink-0 items-center",children:T}):null,D?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:t("button",{type:"button","aria-label":F??X.dismiss,disabled:Y,onClick:e=>{ee.current=e,Z(!0)},className:["group rounded-mp-full relative -m-1 flex size-8 cursor-pointer items-center","justify-center appearance-none border-0 bg-transparent p-0 text-inherit","outline-mp-secondary focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-solid outline-none"].join(" "),children:[e(f,{}),e(r,{icon:i,size:u[U]})]})}):null]});return D?e("div",{ref:te,className:["mp-alert__reveal grid transition-[grid-template-rows,opacity]","duration-(--mp-sys-motion-duration-short4)","ease-(--mp-sys-motion-easing-emphasized-accelerate)","motion-reduce:transition-none",Y?"grid-rows-[0fr] opacity-0":"grid-rows-[1fr]"].join(" "),onTransitionEnd:e=>{Y&&"grid-template-rows"===e.propertyName&&e.target===e.currentTarget&&ne()},children:e("div",{className:"min-h-0 "+(Y?"overflow-hidden":""),children:ae})}):ae});
@@ -0,0 +1,107 @@
1
+ import * as React from 'react';
2
+ import type { MPColor, MPDensity, MPSize } from '../../types.js';
3
+ /** One heading in the list. */
4
+ export interface MPAnchorItem {
5
+ /**
6
+ * The fragment it points at — `#getting-started`. The `id` it names is what
7
+ * the list watches, so a heading with no `id` cannot be tracked.
8
+ */
9
+ href: string;
10
+ /** What the row says. */
11
+ label: React.ReactNode;
12
+ /**
13
+ * How deep the heading sits, counted from `0`.
14
+ *
15
+ * Only the indent depends on it. The list itself stays flat, because a nested
16
+ * `<ul>` inside a table of contents is announced as a list inside a list, and
17
+ * a reader who has just been told there are twelve headings does not need to
18
+ * be told again that four of them are their own list.
19
+ * @default 0
20
+ */
21
+ depth?: number;
22
+ }
23
+ export interface MPAnchorProps extends Omit<React.ComponentPropsWithoutRef<'nav'>, 'color' | 'children'> {
24
+ /** The headings, in the order they appear on the page. */
25
+ items: readonly MPAnchorItem[];
26
+ /**
27
+ * Which row is marked, by its `href`. Given, the list stops watching the
28
+ * scroll and says what it is told.
29
+ */
30
+ activeHref?: string | null;
31
+ /** Called whenever the row the reader is in changes. */
32
+ onActiveChange?: (href: string | null) => void;
33
+ /**
34
+ * How far below the top of the scrollport a heading counts as reached, in
35
+ * pixels.
36
+ *
37
+ * Set it to the height of a sticky header, or the heading under the bar is
38
+ * never the one marked: it has scrolled past the top of the page and is still
39
+ * behind the header, so the reader is looking at the section before it.
40
+ * @default 0
41
+ */
42
+ offset?: number;
43
+ /**
44
+ * What scrolls, when it is not the document. The element an `MPPageLayout`
45
+ * with `scroll="content"` puts the page inside, for instance.
46
+ */
47
+ container?: React.RefObject<HTMLElement | null>;
48
+ /**
49
+ * Draws the rail down the leading edge, with the row the reader is in lit.
50
+ * @default true
51
+ */
52
+ rail?: boolean;
53
+ /** The size of a row's text, and how far one level of heading is set in. */
54
+ size?: MPSize;
55
+ /** Which accent family the marked row reads. @default 'primary' */
56
+ color?: MPColor;
57
+ /** Tightens the rows and nothing else. @default 0 */
58
+ density?: MPDensity;
59
+ /**
60
+ * Which language the `<nav>` is named in. Falls back to the nearest
61
+ * `MPLocaleProvider`, then to English.
62
+ */
63
+ locale?: string;
64
+ /** The accessible name of the `<nav>`. Defaults to the wording in `locale`. */
65
+ label?: string;
66
+ }
67
+ /**
68
+ * The headings of the page being read, with the one the reader is in marked.
69
+ *
70
+ * ```tsx
71
+ * <MPAnchor
72
+ * items={[
73
+ * { href: '#install', label: 'Install' },
74
+ * { href: '#usage', label: 'Usage' },
75
+ * { href: '#options', label: 'Options', depth: 1 }
76
+ * ]}
77
+ * />
78
+ * ```
79
+ *
80
+ * ## It is a `<nav>` of real links
81
+ *
82
+ * Which is what makes it work before any of the tracking runs: the rows jump to
83
+ * their headings with JavaScript turned off, they are in the link list a screen
84
+ * reader can pull up, and a middle-click opens one in a tab. Watching the scroll
85
+ * is added on top rather than being what holds it up.
86
+ *
87
+ * The marked row carries `aria-current="location"` rather than `"true"`. That
88
+ * value means "where the reader is within a set of links", which is exactly what
89
+ * a table of contents reports and is not what `"true"` — the current *page* —
90
+ * says.
91
+ *
92
+ * ## The headings are given, not scraped
93
+ *
94
+ * `items` is a list the caller already has. Whatever produced the page — an MDX
95
+ * pipeline, a CMS, a route's own frontmatter — knows its own headings and their
96
+ * ids, and a component that went looking for `<h2>`s in the document would be
97
+ * guessing at which of them were content and which were chrome.
98
+ *
99
+ * ## Nothing slides
100
+ *
101
+ * The rail's lit segment is a border on the row rather than a marker that
102
+ * travels between rows. A thing moving under a reader who is already moving is
103
+ * the one animation a table of contents should not have, and it is also the one
104
+ * that cannot be got right — the marker and the scroll are answering the same
105
+ * gesture at two different speeds.
106
+ */
107
+ export declare const MPAnchor: React.ForwardRefExoticComponent<MPAnchorProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsx as e}from"react/jsx-runtime";import*as n from"react";import{accentSlots as t}from"../../internal/accent.js";import{useMPLocale as r,useMPMessages as o}from"../../internal/locale.js";import{ANCHOR as i}from"../../internal/messages/anchor.js";import{CONTROL_TEXT as l}from"../../internal/scale.js";import{useMPColor as s,useMPDensity as c,useMPSize as a}from"../../internal/config.js";const m={xs:"py-1",sm:"py-1",md:"py-1.5",lg:"py-2",xl:"py-2.5"},u={xs:["py-0.5","py-0.5","py-0.5"],sm:["py-0.5","py-0.5","py-0.5"],md:["py-1","py-0.5","py-0.5"],lg:["py-1.5","py-1","py-0.5"],xl:["py-2","py-1.5","py-1"]};function p(e,n){return 0===n?m[e]:u[e][-n-1]}const d={xs:8,sm:10,md:12,lg:14,xl:16};export const MPAnchor=/*@__PURE__*/n.forwardRef(function({items:m,activeHref:u,onActiveChange:f,offset:h=0,container:y,rail:g=!0,size:v,color:b,density:x,locale:w,label:j,className:B,style:E,...R},C){const _=a(v),A=s(b),H=c(x),N=o(i,r(w)),[z,L]=n.useState(null),T=void 0!==u,k=T?u:z,I=n.useRef(f);I.current=f;const F=n.useRef(m);F.current=m;const P=m.map(e=>e.href).join(" ");n.useEffect(()=>{if(T)return;const e=y?.current??window;let n=0,t=null;const r=()=>{n=0;const e=function(e,n,t){const r=(t?t.getBoundingClientRect().top:0)+n+1;let o=null;for(const n of e){const e=document.getElementById(n.href.replace(/^#/,""));e&&e.getBoundingClientRect().top<=r&&(o=n.href)}return(t?t.scrollTop+t.clientHeight>=t.scrollHeight-2:window.innerHeight+window.scrollY>=document.documentElement.scrollHeight-2)&&e.length>0?e[e.length-1].href:o}(F.current,h,y?.current??null);e!==t&&(t=e,L(e),I.current?.(e))},o=()=>{0===n&&(n=requestAnimationFrame(r))};return r(),e.addEventListener("scroll",o,{passive:!0}),window.addEventListener("resize",o,{passive:!0}),()=>{0!==n&&cancelAnimationFrame(n),e.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[P,h,y,T]);const S=y?e=>{if(!e.defaultPrevented)return;const n=e.currentTarget.getAttribute("href"),t=y.current;if(!n?.startsWith("#")||!t)return;const r=document.getElementById(n.slice(1));if(!r)return;const o=t.scrollTop+(r.getBoundingClientRect().top-t.getBoundingClientRect().top)-h;t.scrollTo({top:o})}:void 0;return e("nav",{ref:C,"aria-label":j??N.label,"data-mp-size":_,className:["mp-anchor min-w-0",B??""].filter(Boolean).join(" "),style:{...t(A),...E},...R,children:e("ul",{className:["mp-anchor__list m-0 flex list-none flex-col p-0",g?"border-mp-outline-variant border-s":""].filter(Boolean).join(" "),children:m.map(n=>e("li",{className:g?"-ms-px":void 0,children:e("a",{href:n.href,onClick:S,"aria-current":k===n.href?"location":void 0,className:["mp-anchor__link block min-w-0 truncate no-underline","text-mp-on-surface-variant hover:text-mp-on-surface",l[_],p(_,H),"transition-[color,border-color] duration-(--mp-sys-motion-duration-short4)","ease-mp-standard motion-reduce:transition-none","aria-[current=location]:text-(--_mp-accent) aria-[current=location]:font-medium",g?"border-s border-transparent ps-3 aria-[current=location]:border-(--_mp-accent)":"","outline-mp-secondary focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:rounded-mp-xs focus-visible:outline-solid outline-none"].filter(Boolean).join(" "),style:{marginInlineStart:n.depth?n.depth*d[_]:void 0},children:n.label})},n.href))})})});
@@ -0,0 +1,2 @@
1
+ export { MPAnchor } from './MPAnchor.js';
2
+ export type { MPAnchorItem, MPAnchorProps } from './MPAnchor.js';
@@ -0,0 +1 @@
1
+ export{MPAnchor}from"./MPAnchor.js";
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { MPAnimateProps, MPSide } from '../../types.js';
4
- export interface MPAnimateAppearProps extends MPAnimateProps, React.ComponentPropsWithoutRef<'div'> {
3
+ import type { MPAnimateProps, MPAnimateTimelineProps, MPSide } from '../../types.js';
4
+ export interface MPAnimateAppearProps extends MPAnimateProps, MPAnimateTimelineProps, React.ComponentPropsWithoutRef<'div'> {
5
5
  /**
6
6
  * How long after one child the next one starts, in milliseconds. This is the
7
7
  * whole effect — everything else is what a single child does.
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as e}from"react/jsx-runtime";import*as a from"react";import{useRender as t}from"@base-ui/react/use-render";import{ANIMATION_CLASS as r,ANIM_BASE as s,animationSlots as n,isInfinite as i,slideOffsets as o,useAnimationRun as l}from"../../internal/animate.js";export const MPAnimateAppear=/*@__PURE__*/a.forwardRef(function({duration:m,delay:p=0,easing:d,repeat:c=1,alternate:f,paused:y,trigger:u="mount",play:h,once:g=!0,threshold:x=.2,stagger:N=80,from:j="bottom",distance:A="0.75rem",fade:b=!0,reverse:E=!1,render:$,className:v,style:w,children:B,...C},M){const P=l({trigger:u,play:h,once:g,threshold:x,paused:y,infinite:i(c)}),{x:R,y:V}=o(j,A),_=a.Children.toArray(B),k=`${s} ${r.slide}`,q=_.map((t,r)=>{const s=E?_.length-1-r:r,i=n({effect:"slide",duration:m,delay:p+s*N,easing:d,repeat:c,alternate:f,x:R,y:V,opacity:b?0:1});if(!a.isValidElement(t))return e("span",{className:k,style:i,children:t},r);const o=t.props;return a.cloneElement(t,{className:[k,o.className].filter(Boolean).join(" "),style:{...i,...o.style}})});return t({render:$,ref:[M,P.ref],props:{...C,className:v,style:{"--_mp-anim-state":P.state,...w},...P.handlers,"data-mp-animation":"appear","data-mp-state":P.state,children:q}})});
2
+ import*as e from"react";import{useRender as a}from"@base-ui/react/use-render";import{ANIMATION_CLASS as r,ANIM_BASE as t,isInfinite as n,slideOffsets as i,staggerChildren as s,useAnimationRun as o}from"../../internal/animate.js";export const MPAnimateAppear=/*@__PURE__*/e.forwardRef(function({duration:e,delay:d=0,easing:m,repeat:p=1,alternate:l,paused:c,trigger:f="mount",play:g,once:u=!0,threshold:y=.2,stagger:h=80,from:v="bottom",distance:x="0.75rem",fade:b=!0,reverse:w=!1,timeline:A,range:N,render:$,className:j,style:M,children:P,...R},_){const k=o({trigger:f,play:g,once:u,threshold:y,paused:c,infinite:n(p)}),q="view"===A?c?"paused":"running":k.state,{x:z,y:B}=i(v,x),C=s(P,`${t} ${r.slide}`,{effect:"slide",duration:e,delay:d,easing:m,repeat:p,alternate:l,x:z,y:B,opacity:b?0:1,timeline:A,range:N},{stagger:h,reverse:w});return a({render:$,ref:[_,k.ref],props:{...R,className:j,style:{"--_mp-anim-state":q,...M},...k.handlers,"data-mp-animation":"appear","data-mp-state":q,children:C}})});
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { MPAnimateProps } from '../../types.js';
4
- export interface MPAnimateBlinkProps extends MPAnimateProps, React.ComponentPropsWithoutRef<'div'> {
3
+ import type { MPAnimateProps, MPAnimateStaggerProps, MPAnimateTimelineProps } from '../../types.js';
4
+ export interface MPAnimateBlinkProps extends MPAnimateProps, MPAnimateStaggerProps, MPAnimateTimelineProps, React.ComponentPropsWithoutRef<'div'> {
5
5
  /**
6
6
  * How faint it gets at the bottom of the cycle, between `0` and `1`. Raise it
7
7
  * for something that has to stay readable while it pulses.
@@ -1 +1,2 @@
1
- import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,useAnimateElement as a}from"../../internal/animate.js";export const MPAnimateBlink=/*@__PURE__*/e.forwardRef(function({duration:e,delay:n=0,easing:i,repeat:o="infinite",alternate:s,paused:l,trigger:p="mount",play:c,once:d=!0,threshold:f=.2,min:m=0,render:u,className:y,style:g,children:h,...N},b){const j=a({effect:"blink",duration:e,delay:n,easing:i,repeat:o,alternate:s,opacity:m,trigger:p,play:c,once:d,threshold:f,paused:l,infinite:t(o)});return r({render:u,ref:[b,j.ref],props:{...N,className:[j.className,y].filter(Boolean).join(" "),style:{...j.style,...g},...j.props,children:h}})});
1
+ "use client";
2
+ import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,useAnimateElement as n}from"../../internal/animate.js";export const MPAnimateBlink=/*@__PURE__*/e.forwardRef(function({duration:e,delay:a=0,easing:i,repeat:s="infinite",alternate:o,paused:l,trigger:d="mount",play:p,once:c=!0,threshold:m=.2,stagger:f=0,durationStep:g,reverse:u,timeline:h,range:y,min:N=0,render:b,className:j,style:k,children:v,...B},S){const w=n({effect:"blink",duration:e,delay:a,easing:i,repeat:s,alternate:o,opacity:N,trigger:d,play:p,once:c,threshold:m,paused:l,infinite:t(s),stagger:f,durationStep:g,reverse:u,timeline:h,range:y,children:v});return r({render:b,ref:[S,w.ref],props:{...B,className:[w.className,j].filter(Boolean).join(" "),style:{...w.style,...k},...w.props,children:w.children}})});
@@ -0,0 +1,67 @@
1
+ import * as React from 'react';
2
+ import type { MPAnimateProps, MPAnimateTimelineProps } from '../../types.js';
3
+ export interface MPAnimateCounterProps extends Omit<MPAnimateProps, 'alternate' | 'repeat'>, MPAnimateTimelineProps, Omit<React.ComponentPropsWithoutRef<'span'>, 'children'> {
4
+ /** The number it settles on. */
5
+ value: number;
6
+ /**
7
+ * Where it starts.
8
+ * @default 0
9
+ */
10
+ from?: number;
11
+ /**
12
+ * How the number is written — anything `Intl.NumberFormat` takes, so a
13
+ * currency, a percentage or a compact notation is a prop rather than a
14
+ * template.
15
+ *
16
+ * Formatted rather than concatenated because the pieces of a number are not
17
+ * in the same order everywhere: `1 234,56 €` and `$1,234.56` are the same
18
+ * value, and a `prefix`/`suffix` pair can only write one of them.
19
+ */
20
+ options?: Intl.NumberFormatOptions;
21
+ /**
22
+ * Which language it is written in. Falls back to the browser's own, which is
23
+ * what `Intl` does when nobody says.
24
+ */
25
+ locale?: string;
26
+ /**
27
+ * The whole formatter, for the numbers `Intl` has no option for — an ordinal,
28
+ * a score out of ten, a duration. Overrides `options` and `locale`.
29
+ */
30
+ format?: (value: number) => string;
31
+ }
32
+ /**
33
+ * A number counting up to its value.
34
+ *
35
+ * The one effect in this set that **cannot** be a keyframe on its own, because
36
+ * text is not an animatable property: every frame needs a fresh interpolation
37
+ * put through a formatter.
38
+ *
39
+ * ## It is still a CSS animation
40
+ *
41
+ * The obvious implementation is a `requestAnimationFrame` loop with its own
42
+ * clock, its own easing and its own idea of what *paused* means — three things
43
+ * that have to be kept in step with the rest of the library and will not be.
44
+ *
45
+ * So the animation here is a real one, over a registered custom property, and
46
+ * the frame loop does nothing but **read** it. `duration`, `delay`, the easing
47
+ * token, `trigger`, `paused`, `timeline="view"` and `prefers-reduced-motion`
48
+ * are then the same machinery every other effect uses rather than a second
49
+ * implementation of each. A counter waiting to be scrolled to shows `from`
50
+ * rather than the answer, for free: a paused animation with `fill-mode: both`
51
+ * is sitting on its own first frame.
52
+ *
53
+ * ## What a screen reader gets
54
+ *
55
+ * The final number, once, out of a clipped box — the counting copy is
56
+ * `aria-hidden`. A live count would be announced sixty times a second, and the
57
+ * one thing a reader wants from a statistic is the statistic.
58
+ *
59
+ * ## In a background tab
60
+ *
61
+ * `requestAnimationFrame` does not run in a tab nobody is looking at, so a
62
+ * counter left in the background sits at `from` and jumps to its value on
63
+ * return, having been "running" the whole time. That is correct — the reader
64
+ * sees the number they came back for — and it is worth knowing before it is
65
+ * reported as a bug.
66
+ */
67
+ export declare const MPAnimateCounter: React.ForwardRefExoticComponent<MPAnimateCounterProps & React.RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{numberFormatter as a}from"../../internal/intl.js";import{useAnimateElement as r}from"../../internal/animate.js";import{VISUALLY_HIDDEN as i}from"../../internal/visually-hidden.js";export const MPAnimateCounter=/*@__PURE__*/n.forwardRef(function({value:s,from:o=0,options:m,locale:l,format:u,duration:c,delay:f=0,easing:p,paused:d,trigger:y="mount",play:g,once:h=!0,threshold:N=.2,timeline:j,range:A,className:F,style:v,...S},x){const C=r({effect:"count",effectClass:"mp-anim-count",duration:c,delay:f,easing:p,repeat:1,from:o,to:s,trigger:y,play:g,once:h,threshold:N,paused:d,infinite:!1,timeline:j,range:A}),b=u??(e=>a(l,m).format(e)),q=n.useRef(null),[w,P]=n.useState(o);return n.useEffect(()=>{const e=q.current;if(!e||"undefined"==typeof requestAnimationFrame)return;let t=0,n=!0;const a="view"===j&&CSS.supports("animation-timeline","view()"),r=()=>{if(!n)return;const i=e.getAnimations().filter(e=>"mp-anim-count"===e.animationName),o=i.every(e=>"finished"===e.playState);if(0===i.length||o&&!a)P(s);else{const t=Number.parseFloat(getComputedStyle(e).getPropertyValue("--mp-count"));Number.isFinite(t)&&P(t)}i.length>0&&(a||!o)&&(t=requestAnimationFrame(r))};return t=requestAnimationFrame(r),()=>{n=!1,cancelAnimationFrame(t)}},[C.style,C.props["data-mp-state"],j,s]),t("span",{ref:e=>{q.current=e,C.ref(e),"function"==typeof x?x(e):x&&(x.current=e)},className:[C.className,F].filter(Boolean).join(" "),style:{...C.style,...v},...C.props,...S,children:[e("span",{className:i,children:b(s)}),e("span",{"aria-hidden":"true",className:"tabular-nums",children:b(w)})]})});
@@ -0,0 +1,2 @@
1
+ export { MPAnimateCounter } from './MPAnimateCounter.js';
2
+ export type { MPAnimateCounterProps } from './MPAnimateCounter.js';
@@ -0,0 +1 @@
1
+ export{MPAnimateCounter}from"./MPAnimateCounter.js";
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { MPAnimateMode, MPAnimateProps } from '../../types.js';
4
- export interface MPAnimateFadeProps extends MPAnimateProps, React.ComponentPropsWithoutRef<'div'> {
3
+ import type { MPAnimateMode, MPAnimateProps, MPAnimateStaggerProps, MPAnimateTimelineProps } from '../../types.js';
4
+ export interface MPAnimateFadeProps extends MPAnimateProps, MPAnimateStaggerProps, MPAnimateTimelineProps, React.ComponentPropsWithoutRef<'div'> {
5
5
  /**
6
6
  * Whether the content arrives or leaves. An exit is quicker than an entrance
7
7
  * — MD3's `short4` against `medium2` — unless `duration` says otherwise.
@@ -1 +1,2 @@
1
- import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as a,useAnimateElement as t}from"../../internal/animate.js";export const MPAnimateFade=/*@__PURE__*/e.forwardRef(function({duration:e,delay:n=0,easing:o,repeat:i=1,alternate:s,paused:l,trigger:d="mount",play:m,once:p=!0,threshold:c=.2,mode:f="in",from:u=0,render:y,className:g,style:h,children:N,...j},b){const w=t({effect:"fade",duration:e,delay:n,easing:o,repeat:i,alternate:s,mode:f,opacity:u,trigger:d,play:m,once:p,threshold:c,paused:l,infinite:a(i)});return r({render:y,ref:[b,w.ref],props:{...j,className:[w.className,g].filter(Boolean).join(" "),style:{...w.style,...h},...w.props,children:N}})});
1
+ "use client";
2
+ import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as a,useAnimateElement as t}from"../../internal/animate.js";export const MPAnimateFade=/*@__PURE__*/e.forwardRef(function({duration:e,delay:n=0,easing:i,repeat:o=1,alternate:s,paused:l,trigger:d="mount",play:m,once:p=!0,threshold:c=.2,stagger:f=0,durationStep:g,reverse:u,timeline:h,range:y,mode:N="in",from:j=0,render:v,className:S,style:b,children:w,...x},A){const B=t({effect:"fade",duration:e,delay:n,easing:i,repeat:o,alternate:s,mode:N,opacity:j,trigger:d,play:m,once:p,threshold:c,paused:l,infinite:a(o),stagger:f,durationStep:g,reverse:u,timeline:h,range:y,children:w});return r({render:v,ref:[A,B.ref],props:{...x,className:[B.className,S].filter(Boolean).join(" "),style:{...B.style,...b},...B.props,children:B.children}})});
@@ -0,0 +1,53 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { MPAnimateProps, MPAnimateStaggerProps } from '../../types.js';
4
+ export interface MPAnimateFloatProps extends Omit<MPAnimateProps, 'alternate'>, MPAnimateStaggerProps, React.ComponentPropsWithoutRef<'div'> {
5
+ /**
6
+ * How far it rises at the top of the drift — a number in pixels, or any CSS
7
+ * length. Small on purpose: this says *not fixed down*, and anything a reader
8
+ * can measure says *moving* instead.
9
+ * @default '0.625rem'
10
+ */
11
+ distance?: number | string;
12
+ /**
13
+ * How far it wanders to either side. Less than `distance`, so the path reads
14
+ * as a drift rather than as a circle.
15
+ * @default '0.375rem'
16
+ */
17
+ sway?: number | string;
18
+ /**
19
+ * How far it leans at the extremes, in degrees. `0` by default — a tilt is
20
+ * the difference between something floating and something *tumbling*, and
21
+ * anything with text on it wants none of it.
22
+ * @default 0
23
+ */
24
+ tilt?: number;
25
+ /** Renders something other than a `<div>`. Base UI's own escape hatch. */
26
+ render?: useRender.RenderProp;
27
+ children?: React.ReactNode;
28
+ }
29
+ /**
30
+ * An endless, slow drift.
31
+ *
32
+ * The only thing in this set that says **not fixed to the page**. A card that
33
+ * drifts is a card that is above the sheet rather than printed on it, and no
34
+ * amount of shadow says that as plainly as half a centimetre of unhurried
35
+ * travel — a shadow is a claim about depth, and this is depth behaving.
36
+ *
37
+ * It has no arrival, which is what keeps it out of the shared effect table: the
38
+ * six entrances go from a state to the element's own, and this one goes nowhere
39
+ * and comes back. Its keyframe is its own.
40
+ *
41
+ * ## Never on a control
42
+ *
43
+ * A button that drifts cannot be pointed at. The pointer arrives where the
44
+ * button was, the button has moved four pixels, and the reader has to track a
45
+ * target that is running away from them — which is precisely the failure the
46
+ * library's rule against transforming controls exists to prevent. This is for
47
+ * decoration: an illustration, a hero graphic, a badge on a marketing page.
48
+ *
49
+ * It is also for one at a time. Six things drifting on their own cycles is a
50
+ * page that will not sit still to be read, and there is no way to look at any
51
+ * one of them.
52
+ */
53
+ export declare const MPAnimateFloat: React.ForwardRefExoticComponent<MPAnimateFloatProps & 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{isInfinite as t,lengthValue as a,useAnimateElement as n}from"../../internal/animate.js";export const MPAnimateFloat=/*@__PURE__*/e.forwardRef(function({duration:e=6e3,delay:s=0,easing:i="standard",repeat:o="infinite",paused:l,trigger:d="mount",play:c,once:f=!0,threshold:p=.2,stagger:m=0,durationStep:g,reverse:u,distance:y="0.625rem",sway:h="0.375rem",tilt:N=0,render:j,className:v,style:w,children:x,...S},b){const A=n({effect:"float",effectClass:"mp-anim-float",duration:e,delay:s,easing:i,repeat:o,x:a(h),y:a(y),angle:`${N}deg`,trigger:d,play:c,once:f,threshold:p,paused:l,infinite:t(o),stagger:m,durationStep:g,reverse:u,children:x});return r({render:j,ref:[b,A.ref],props:{...S,className:[A.className,v].filter(Boolean).join(" "),style:{...A.style,...w},...A.props,children:A.children}})});
@@ -0,0 +1,2 @@
1
+ export { MPAnimateFloat } from './MPAnimateFloat.js';
2
+ export type { MPAnimateFloatProps } from './MPAnimateFloat.js';
@@ -0,0 +1 @@
1
+ export{MPAnimateFloat}from"./MPAnimateFloat.js";
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { MPAnimateMode, MPAnimateProps } from '../../types.js';
4
- export interface MPAnimateGrowProps extends MPAnimateProps, React.ComponentPropsWithoutRef<'div'> {
3
+ import type { MPAnimateMode, MPAnimateProps, MPAnimateStaggerProps, MPAnimateTimelineProps } from '../../types.js';
4
+ export interface MPAnimateGrowProps extends MPAnimateProps, MPAnimateStaggerProps, MPAnimateTimelineProps, React.ComponentPropsWithoutRef<'div'> {
5
5
  /**
6
6
  * Whether the content unfolds or folds away. An exit is quicker than an
7
7
  * entrance — MD3's `short4` against `medium4` — unless `duration` says