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/dist/types.d.ts CHANGED
@@ -37,6 +37,91 @@ import type * as React from 'react';
37
37
  * the caller wants a custom control instead.
38
38
  */
39
39
  export type MPSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
40
+ /**
41
+ * How tightly a component that holds other things is packed.
42
+ *
43
+ * Material's own scale, and Material's own numbers: `0` is the component at the
44
+ * size it was asked for, and each step below it takes 4dp out. Nothing here
45
+ * invents a word for that, because the specification already counts — and a
46
+ * `'compact'` of this library's own would be a second name for a thing MD3 has
47
+ * a name for, which is the one rule `MPSize` bends and nothing else should.
48
+ *
49
+ * ## It is not a second size ladder
50
+ *
51
+ * `size` picks which control this is: the height, the type role, and the padding
52
+ * that follows from both. `density` takes room out of the one that was picked,
53
+ * and takes it out of the **spacing only** — the type scale does not move. A
54
+ * table at `-2` is the same words in less room rather than smaller words, which
55
+ * is what a reader of a dense screen actually wants: more rows, at the size they
56
+ * could already read.
57
+ *
58
+ * That is also why the two axes cannot be collapsed into one. `size="sm"` on a
59
+ * list is a small list; `density={-2}` on a list is a normal list with more of
60
+ * it on the screen. A single ladder would make those the same request.
61
+ *
62
+ * ## Where it stops
63
+ *
64
+ * A step that would take a control under 24px is not taken. That floor is the
65
+ * one `MPSize` already names — below it a control stops meeting a touch target —
66
+ * and clamping is the better of the three answers available: refusing the value
67
+ * would make `density={-3}` an error on exactly the rung most likely to be given
68
+ * it, and honouring it would ship a control nobody can hit.
69
+ *
70
+ * ## Only containers take it
71
+ *
72
+ * A button is one control at one height, and `size` is the axis it has. A list,
73
+ * a table, a toolbar, a card — anything whose job is to hold a number of things
74
+ * — changes character with how many of them fit on a screen, and that is the
75
+ * question this answers.
76
+ */
77
+ export type MPDensity = 0 | -1 | -2 | -3;
78
+ /**
79
+ * How far off the page a surface is lifted.
80
+ *
81
+ * MD3's own levels, and all five of the raised ones. `0` is flat on the page,
82
+ * `1` is where an elevated card and a resting elevated button sit, `2` is a menu
83
+ * or a button under the pointer, `3` is a dialog, and `4` and `5` are there
84
+ * because the specification defines them and a ladder with holes in it is worse
85
+ * than no ladder at all.
86
+ *
87
+ * ## It moves the tone as well as the shadow
88
+ *
89
+ * Which is the whole reason this can exist here, and the reason a naive
90
+ * `elevation` prop cannot. MD3 does not treat height as a free axis: an elevated
91
+ * surface is `surface-container-low` **under** a level-1 shadow, and the tone
92
+ * and the shadow are one decision rather than two. A prop that only cast a
93
+ * shadow would raise a `filled` box into a surface the specification has no name
94
+ * for — a raised object that is somehow still the flattest tone in the system.
95
+ *
96
+ * So each level names a surface role and the shadow that goes with it, which is
97
+ * the pairing MD3 publishes:
98
+ *
99
+ * | `elevation` | Surface role | Shadow |
100
+ * | ----------- | --------------------------- | -------- |
101
+ * | `0` | `surface` | none |
102
+ * | `1` | `surface-container-low` | level 1 |
103
+ * | `2` | `surface-container` | level 2 |
104
+ * | `3` | `surface-container-high` | level 3 |
105
+ * | `4` | `surface-container-high` | level 4 |
106
+ * | `5` | `surface-container-highest` | level 5 |
107
+ *
108
+ * Four and five share a tone on purpose. The specification runs out of container
109
+ * roles before it runs out of levels, and inventing a sixth tone to keep the
110
+ * columns tidy would be inventing a colour role.
111
+ *
112
+ * ## Its relationship to `variant`
113
+ *
114
+ * `variant="elevated"` **is** `elevation={1}`, named. It stays because the
115
+ * vocabulary is about emphasis — a caller choosing between `filled` and
116
+ * `elevated` is choosing how loud a card is, not how many pixels it floats — and
117
+ * because it is the answer nearly every raised surface wants.
118
+ *
119
+ * Given a level, the level decides the surface and `variant` is left holding
120
+ * only its hairline: `outlined` keeps its border, and nothing else paints.
121
+ * Anything else would be two props writing one `background-color`, and the
122
+ * winner would depend on the order two class names happened to be generated in.
123
+ */
124
+ export type MPElevation = 0 | 1 | 2 | 3 | 4 | 5;
40
125
  /**
41
126
  * An accent colour role.
42
127
  *
@@ -45,6 +130,29 @@ export type MPSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
45
130
  * token sheet has no way to derive.
46
131
  */
47
132
  export type MPColor = 'primary' | 'secondary' | 'tertiary' | 'error';
133
+ /**
134
+ * Where a reading changes colour.
135
+ *
136
+ * The one place in this library where an accent family is *computed* rather than
137
+ * chosen, and it lives here rather than inside whichever component needed it
138
+ * first because more than one component reports the same reading. A meter and a
139
+ * gauge are one quantity in two shapes, and a page carrying both must not
140
+ * disagree about where the amber starts.
141
+ *
142
+ * Left to the caller this is a ternary at every call site, and the fourth one
143
+ * would get it wrong.
144
+ *
145
+ * The families are still MD3's four. There is no `warning` in the specification,
146
+ * so an amber band is `tertiary` under whatever source colour the page is
147
+ * themed from — which is the honest answer, and the reason a threshold names a
148
+ * role rather than a colour.
149
+ */
150
+ export interface MPThreshold {
151
+ /** The value from which this family applies, in the reading's own units. */
152
+ from: number;
153
+ /** What the reading turns at and above that point. */
154
+ color: MPColor;
155
+ }
48
156
  /**
49
157
  * How much of a surface a component paints.
50
158
  *
@@ -83,6 +191,242 @@ export type MPSide = 'top' | 'right' | 'bottom' | 'left';
83
191
  * the reading-end corner, which is the left one under RTL.
84
192
  */
85
193
  export type MPCorner = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
194
+ /**
195
+ * Where a point sits along the category axis.
196
+ *
197
+ * A string is a name and has no position of its own, so it takes the slot its
198
+ * index gives it. A number or a `Date` is a place on a number line, which is
199
+ * what lets a chart of readings taken at uneven times draw the gaps between
200
+ * them rather than spacing them evenly and reporting a pause as a steady rate.
201
+ */
202
+ export type MPChartCategory = string | number | Date;
203
+ /**
204
+ * One value, and everything a chart might want to know about it.
205
+ *
206
+ * `y: null` is a **gap** rather than a zero — a sensor that was offline, a month
207
+ * that has not closed. A line breaks across it, an area breaks with it, and a
208
+ * bar is not drawn. That distinction is the whole reason a datum may be `null`
209
+ * at all: a chart that draws missing data as zero reports an outage as a
210
+ * collapse, and it does it in the one shape a reader trusts without checking.
211
+ */
212
+ export interface MPChartPoint {
213
+ /** The value. `null` is a gap. */
214
+ y: number | null;
215
+ /**
216
+ * Its place on the category axis. Without one the point is placed by its
217
+ * index, against the chart's `categories` if it was given any.
218
+ */
219
+ x?: MPChartCategory;
220
+ /**
221
+ * A second magnitude, for the marks that carry one — a bubble's radius, a
222
+ * cell's weight. The charts with no use for it ignore it.
223
+ */
224
+ z?: number;
225
+ /**
226
+ * Overrides its series' colour for this one point: the slice worth pointing
227
+ * at, the bar that went over budget. An `MPColor` family, or any CSS colour.
228
+ */
229
+ color?: MPColor | (string & {});
230
+ /** What the tooltip, the table and any value label say in place of `y`. */
231
+ label?: React.ReactNode;
232
+ }
233
+ /** A number, a gap, or a point with more to say about itself. */
234
+ export type MPChartDatum = number | null | MPChartPoint;
235
+ /**
236
+ * One line, one band of bars, one ring of slices — the unit identity attaches
237
+ * to.
238
+ *
239
+ * Colour follows the series and never its position in the drawing. Hiding
240
+ * Europe has to leave Asia the colour it already was, so the palette slot comes
241
+ * from where a series sits in this array rather than from how many of its
242
+ * neighbours happen to be visible: a reader who learned that blue is Europe
243
+ * learned something a re-render is not allowed to take back.
244
+ */
245
+ export interface MPChartSeries {
246
+ /**
247
+ * Its name in the legend, the tooltip and the table. Two series or more
248
+ * always draw a legend, so a series without a name is one the reader has no
249
+ * way to tell from the others.
250
+ */
251
+ name?: string;
252
+ /** Its values, in category order. */
253
+ data: readonly MPChartDatum[];
254
+ /**
255
+ * Overrides the palette slot this series would take. An `MPColor` family, or
256
+ * any CSS colour.
257
+ *
258
+ * The one place in this library where a colour is not a semantic role, and
259
+ * deliberately so: a series is an *entity* — a region, a plan, a competitor —
260
+ * and nothing about being one means success or danger. Reach for it to match
261
+ * a brand, or to hold one entity's colour steady across two charts. Not to
262
+ * say how a number should be felt.
263
+ */
264
+ color?: MPColor | (string & {});
265
+ /**
266
+ * Starts the series hidden. Only means anything beside an interactive legend,
267
+ * which is what turns it back on.
268
+ * @default false
269
+ */
270
+ hidden?: boolean;
271
+ }
272
+ /**
273
+ * One span on a timeline — a stretch with two ends.
274
+ *
275
+ * Its own type rather than an `end` bolted onto `MPChartPoint`, because a
276
+ * second position on the axis is a field the other seven charts would carry and
277
+ * never read. The trade this file makes is that a name means one thing
278
+ * everywhere, and a point that sometimes has an end and usually does not is the
279
+ * opposite of that.
280
+ *
281
+ * `start` and `end` rather than `x` and `end`: a span has two places on the
282
+ * axis, and naming one of them `x` only reads correctly to somebody who already
283
+ * knows which one it is.
284
+ */
285
+ export interface MPTimelineSpan {
286
+ /** When it begins. A `Date`, or a number of milliseconds. */
287
+ start: MPChartCategory;
288
+ /** And when it is done. One that ends before it starts is drawn either way round. */
289
+ end: MPChartCategory;
290
+ /** What the span is called, in the hover panel and the table. */
291
+ label?: React.ReactNode;
292
+ /** Overrides its row's colour for this one span. */
293
+ color?: MPColor | (string & {});
294
+ }
295
+ /**
296
+ * One row of a timeline, and everything on it.
297
+ *
298
+ * A row is a series — one entity, one name, one colour — but its data are spans
299
+ * rather than values, so it cannot be an `MPChartSeries`. There is no `hidden`
300
+ * here and no legend to pair one with: a timeline's rows **are** its category
301
+ * axis, already named down the side, and a twenty-entry legend restating them
302
+ * is not a filter anybody wants.
303
+ */
304
+ export interface MPTimelineSeries {
305
+ /** Its name on the axis, in the hover panel and in the table. */
306
+ name?: string;
307
+ /** The spans on this row. Overlapping ones are drawn over each other. */
308
+ data: readonly MPTimelineSpan[];
309
+ /** Overrides the palette slot this row would otherwise take. */
310
+ color?: MPColor | (string & {});
311
+ }
312
+ /** How a line gets from one point to the next. */
313
+ export type MPChartCurve = 'linear' | 'smooth' | 'step';
314
+ /**
315
+ * Which values are written onto the marks themselves.
316
+ *
317
+ * `none` by default everywhere, which is not timidity: a number beside every
318
+ * point is the most reliable way to make a chart unreadable. Label the last one
319
+ * or the two extremes, and let the axis and the hover layer carry the rest.
320
+ * `all` is there for the eight-bar chart where it genuinely is the answer.
321
+ */
322
+ export type MPChartValueLabels = 'none' | 'last' | 'extremes' | 'all';
323
+ /**
324
+ * What the pointer uncovers.
325
+ *
326
+ * - `index` — every series at the category under the pointer, with a crosshair
327
+ * dropped through it. The default wherever the series share an x, because the
328
+ * question a line chart is asked is "what happened in March" and not "what is
329
+ * this pixel".
330
+ * - `item` — the one mark being pointed at.
331
+ * - `none` — nothing, and then the numbers have to be readable some other way.
332
+ * The table under every chart is that way.
333
+ */
334
+ export type MPChartTooltipMode = 'index' | 'item' | 'none';
335
+ /** One series' answer at the category the pointer is resting on. */
336
+ export interface MPChartTooltipItem {
337
+ /** Its place in the `series` array — the same index its colour came from. */
338
+ seriesIndex: number;
339
+ name?: string;
340
+ color: string;
341
+ value: number | null;
342
+ /** `value`, written the way this chart writes numbers. */
343
+ formatted: string;
344
+ /** What the point called itself, if it said. */
345
+ label?: React.ReactNode;
346
+ }
347
+ /** What a replacement tooltip is handed. */
348
+ export interface MPChartTooltipContext {
349
+ index: number;
350
+ category: MPChartCategory;
351
+ /** Only the series that are visible and have a value here. */
352
+ items: readonly MPChartTooltipItem[];
353
+ }
354
+ /** The hover layer, where `true` and `false` are not enough. */
355
+ export interface MPChartTooltip {
356
+ /** @default 'index', or 'item' where the marks are not arranged in columns */
357
+ mode?: MPChartTooltipMode;
358
+ /**
359
+ * The line dropped through the plot at the active category. On in `index`
360
+ * mode and never drawn in `item` mode: a crosshair says "these numbers all
361
+ * belong to this column", and where there is no column it is a line through
362
+ * one dot.
363
+ * @default true
364
+ */
365
+ crosshair?: boolean;
366
+ /** Draws the panel yourself. The frame still decides when it opens and where. */
367
+ render?: (context: MPChartTooltipContext) => React.ReactNode;
368
+ }
369
+ /**
370
+ * One of a chart's two axes.
371
+ *
372
+ * `xAxis` is the category axis and `yAxis` is the value axis on every chart and
373
+ * in both orientations. Turning a bar chart on its side changes the drawing and
374
+ * not what the caller's data means, so it must not also move their axis options
375
+ * from one prop to the other.
376
+ */
377
+ export interface MPChartAxis {
378
+ /**
379
+ * Leaves it undrawn — its rule, its ticks and its labels — and gives the room
380
+ * back to the plot.
381
+ */
382
+ hidden?: boolean;
383
+ /** A name for what it measures, set beside it. */
384
+ label?: React.ReactNode;
385
+ /**
386
+ * The gridlines it casts across the plot. On for the value axis and off for
387
+ * the category axis, which is the one arrangement that helps a value be read
388
+ * without turning the plot into graph paper.
389
+ */
390
+ grid?: boolean;
391
+ /**
392
+ * Where the scale starts and ends. Taken from the data otherwise, and from
393
+ * zero on the value axis — a bar's length is proportional to its value only
394
+ * when the baseline is zero. Set `min` where zero genuinely is not it.
395
+ */
396
+ min?: number;
397
+ max?: number;
398
+ /**
399
+ * Roughly how many ticks. The scale still rounds them to numbers a reader can
400
+ * do arithmetic on, so this is a target and not a count.
401
+ */
402
+ tickCount?: number;
403
+ /** How a tick is written, overriding the chart's own `format`. */
404
+ tickFormat?: (value: MPChartCategory, index: number) => React.ReactNode;
405
+ /**
406
+ * How much room it keeps for its ticks and its label, in pixels. Measured off
407
+ * the ticks themselves otherwise. Set it when a long category name needs
408
+ * more, or when two charts stacked on a dashboard have to line their plots up.
409
+ */
410
+ thickness?: number;
411
+ }
412
+ /** Where the legend sits, and what it does when it is used. */
413
+ export interface MPChartLegend {
414
+ /** Which edge of the plot. @default 'bottom' */
415
+ side?: MPSide;
416
+ /** Where along that edge. @default 'center' */
417
+ align?: MPAlign;
418
+ /**
419
+ * Clicking an entry hides and shows its series, and hovering one dims the
420
+ * rest.
421
+ * @default true
422
+ */
423
+ interactive?: boolean;
424
+ /**
425
+ * Writes each series' value at the active category beside its name.
426
+ * @default false
427
+ */
428
+ showValue?: boolean;
429
+ }
86
430
  /**
87
431
  * Which day a week is drawn as starting on. `0` is Sunday, the way `Date`
88
432
  * counts.
@@ -135,6 +479,63 @@ export type MPWindowClass = 'compact' | 'medium' | 'expanded' | 'large' | 'extra
135
479
  * five — anything not named keeps whatever the class below it said.
136
480
  */
137
481
  export type MPResponsive<T> = T | Partial<Record<MPWindowClass, T>>;
482
+ /**
483
+ * How wide content is allowed to get.
484
+ *
485
+ * Two vocabularies in one prop, because a measure is asked for in two different
486
+ * ways and neither covers the other.
487
+ *
488
+ * A **rung of the size ladder** is the common one, and it is pinned to the
489
+ * window size classes rather than to the type scale: `maxWidth="md"` is "never
490
+ * wider than an expanded window", which is a sentence about the specification
491
+ * rather than a number somebody liked. `xs` is one rung below the ladder, at
492
+ * 480dp, for the column of a form or a sign-in card.
493
+ *
494
+ * A **CSS length** is the other: `'60ch'`, `'42rem'`, `'800px'`, or anything else
495
+ * `max-width` takes. A measure is often a decision about the text rather than
496
+ * about the window — the classic answer is around 60 characters, which no ladder
497
+ * of window widths can spell — and a library that only offered its own five
498
+ * rungs would be making every one of those callers write a `className` to undo
499
+ * one it did not want.
500
+ *
501
+ * `'none'` is neither, and is what nearly every component means by default: no
502
+ * limit at all.
503
+ *
504
+ * The value is not validated. An unusable length reaches `max-width`, which
505
+ * ignores what it cannot parse and leaves the element unbounded — the same
506
+ * answer `'none'` gives, and a better one than a component that renders nothing
507
+ * because a unit was mistyped.
508
+ */
509
+ export type MPMeasure = MPSize | 'none' | (string & {});
510
+ /**
511
+ * A class name per part, for the parts a `className` cannot reach.
512
+ *
513
+ * `className` lands on a component's **root**, and for most components that is
514
+ * the whole story: one element, one class list, merged with the component's own.
515
+ * A few draw parts that no selector written against the root will ever find,
516
+ * because they are not under it — a select's popup, a dialog's backdrop, a
517
+ * tooltip's bubble all render at the end of `<body>`. Those are what this is
518
+ * for.
519
+ *
520
+ * ## There is never a `root` key
521
+ *
522
+ * `className` is the root, on every component. A second spelling of it is
523
+ * exactly the drift the prop conventions exist to prevent, and a caller reading
524
+ * two names for one thing has to work out which one wins.
525
+ *
526
+ * ## The part classes are still there
527
+ *
528
+ * Every part this library draws already carries a BEM-style class of its own —
529
+ * `mp-select__popup`, `mp-dialog__backdrop` — and a stylesheet of your own can
530
+ * always select those. This prop is for the other path: a class written at the
531
+ * call site, generated in the same Tailwind pass as the component's, which is
532
+ * the only way a *utility* can reach a part.
533
+ *
534
+ * The names are shared where the parts are: `popup` is the same idea on a
535
+ * select, a menu and a popover. What each component adds beyond that is on its
536
+ * own page.
537
+ */
538
+ export type MPSlots<Slot extends string> = Partial<Record<Slot, string>>;
138
539
  /**
139
540
  * The axes most components share.
140
541
  *
@@ -189,8 +590,8 @@ export interface MPStyleProps {
189
590
  export interface MPControlEventProps<Element extends HTMLElement = HTMLElement> {
190
591
  /**
191
592
  * Every keystroke that reaches the control, modifiers included — which makes
192
- * this the one to reach for for a combination. It is also the only one of
193
- * these where `preventDefault` still means anything.
593
+ * this the one to reach for when a combination matters. It is also the only
594
+ * one of these where `preventDefault` still means anything.
194
595
  */
195
596
  onKeyDown?: React.KeyboardEventHandler<Element>;
196
597
  /** The same keystroke released. */
@@ -273,18 +674,83 @@ export type MPIconGlyph = React.ComponentType<MPIconGlyphProps> | React.ReactEle
273
674
  */
274
675
  export type MPEasing = 'linear' | 'standard' | 'standard-decelerate' | 'standard-accelerate' | 'emphasized' | 'emphasized-decelerate' | 'emphasized-accelerate';
275
676
  /**
276
- * The six effects the `MPAnimate*` components are built out of.
677
+ * The seven effects the `MPAnimate*` components are built out of.
277
678
  *
278
679
  * Named after what a reader sees rather than after the CSS property underneath:
279
680
  * `zoom` and `grow` are both a change of scale, and they are two words because
280
681
  * they are two *gestures* — one arrives from the middle of where it will end
281
682
  * up, the other unfolds from an edge of it.
282
683
  *
283
- * Everything past these six is a component rather than a value. A marquee that
684
+ * Everything past these seven is a component rather than a value. A marquee that
284
685
  * duplicates its children, a headline that swaps between them, a typewriter
285
686
  * that counts characters — none of those can be a class name and a few numbers.
286
687
  */
287
- export type MPAnimation = 'fade' | 'grow' | 'slide' | 'zoom' | 'rotate' | 'blink';
688
+ export type MPAnimation = 'fade' | 'grow' | 'slide' | 'zoom' | 'rotate' | 'blink' | 'reveal';
689
+ /**
690
+ * An entrance, on a component that displays something.
691
+ *
692
+ * A bare effect name is the whole of what most callers want —
693
+ * `transition="fade"` — and the object form is there for the rest: a different
694
+ * duration, a slide from another edge, a zoom that starts closer in.
695
+ *
696
+ * ## It runs on mount, once
697
+ *
698
+ * There is no `trigger`, no `repeat` and no scroll timeline here, and their
699
+ * absence is the design. Those are what the `MPAnimate*` components are, and a
700
+ * prop offering half of them would be a second, worse spelling of machinery that
701
+ * already exists. The moment the answer is "when it scrolls into view", the
702
+ * wrapper is the right tool.
703
+ *
704
+ * ## Why the prop exists at all, then
705
+ *
706
+ * Because wrapping is the wrong shape twice. A component that lays its children
707
+ * into boxes of its own — `MPStack` — puts them somewhere nothing outside can
708
+ * reach, so a per-item entrance is only expressible from inside. And wrapping
709
+ * every card of a grid costs a second element per card, which a
710
+ * `display: contents` wrapper cannot avoid: an element that generates no box has
711
+ * nothing to animate.
712
+ *
713
+ * It is on the components that **display** something and on none of the
714
+ * controls. That is a cost decision as much as a taste one — see
715
+ * `internal/transition.ts` — and the taste half is that a button arriving with a
716
+ * flourish is a page's decision about a region, made with a wrapper, rather than
717
+ * something every button in the library should carry the tables for.
718
+ */
719
+ export type MPTransition = MPAnimation | MPTransitionOptions;
720
+ /** What a `transition` takes when a bare effect name is not enough. */
721
+ export interface MPTransitionOptions {
722
+ /** Which of the seven effects runs. */
723
+ effect: MPAnimation;
724
+ /** How long it takes, in milliseconds. Unset takes the effect's own token. */
725
+ duration?: number;
726
+ /**
727
+ * How long before it starts, in milliseconds.
728
+ * @default 0
729
+ */
730
+ delay?: number;
731
+ /** Which Material easing curve it runs on. */
732
+ easing?: MPEasing;
733
+ /**
734
+ * Whether it fades in as it arrives. Every effect does unless told not to,
735
+ * because an entrance that only moves reads as a jump.
736
+ * @default true
737
+ */
738
+ fade?: boolean;
739
+ /** How far a `slide` travels: a CSS length, or a percentage of the element. */
740
+ distance?: number | string;
741
+ /**
742
+ * Which edge a `slide` comes from, or a `reveal` is wiped from.
743
+ * @default 'bottom' for `slide`, 'left' for `reveal`
744
+ */
745
+ from?: MPSide;
746
+ /** Where a `grow` or a `zoom` starts, as a scale. */
747
+ scale?: number;
748
+ /**
749
+ * How far a `rotate` turns from, in degrees.
750
+ * @default -180
751
+ */
752
+ angle?: number;
753
+ }
288
754
  /**
289
755
  * What makes an animation run.
290
756
  *
@@ -365,3 +831,98 @@ export interface MPAnimateProps {
365
831
  */
366
832
  threshold?: number;
367
833
  }
834
+ /**
835
+ * Spreading one effect across a set rather than playing it on the box.
836
+ *
837
+ * Three props rather than an `MPAnimateStagger` component, and that is the
838
+ * whole design: a list settling in is not a different effect from a fade, it is
839
+ * the same fade told when to start. A wrapper component would be a second
840
+ * spelling of something the effects already do, and a caller would have to
841
+ * choose between "fade" and "fade one at a time" at the import.
842
+ *
843
+ * They belong to the effects that are **one `@keyframes` on the element
844
+ * itself**, which is these six. `MPAnimateMarquee` duplicates its children,
845
+ * `MPAnimateHeadline` swaps between them and `MPAnimateTyping` counts their
846
+ * characters; none of the three can hand an arbitrary child an animation, and
847
+ * `MPAnimateLighting` puts its movement on a pseudo-element that a child has
848
+ * no equivalent of. `MPAnimateAppear` is this with `stagger` already on and a
849
+ * default of 80ms, and runs on the same code.
850
+ */
851
+ /**
852
+ * What drives an effect: a clock, or the reader's own scrolling.
853
+ *
854
+ * `auto` is `document.timeline` — the animation runs for its `duration` once
855
+ * something starts it, which is what every effect here has always done.
856
+ *
857
+ * `view` hands the animation to CSS's `view()` timeline, so its progress *is*
858
+ * the element's progress through the scrollport. Scrolling back runs it
859
+ * backwards, and stopping halfway leaves it halfway: it is the same keyframe,
860
+ * driven by a position instead of by time.
861
+ */
862
+ export type MPAnimateTimeline = 'auto' | 'view';
863
+ /**
864
+ * Scroll-driven playback, on the effects that are one `@keyframes` on the
865
+ * element itself.
866
+ *
867
+ * Two props rather than a component, for the reason the stagger ones are: this
868
+ * is not a different effect, it is the same effect on a different clock. Every
869
+ * one of the six gets it, and a component that has to know what its children
870
+ * *are* gets none of it.
871
+ */
872
+ export interface MPAnimateTimelineProps {
873
+ /**
874
+ * What drives it.
875
+ *
876
+ * On `view`, three of the props above stop meaning anything: `duration`,
877
+ * `delay` and `repeat` are the clock's units and there is no clock. So is
878
+ * `trigger` — the scroll position *is* the trigger — and the animation is
879
+ * held `running` for it, because a paused scroll-driven animation shows
880
+ * nothing at all. An explicit `paused` is still honoured; it is the one of
881
+ * the four that is a caller saying stop rather than a default.
882
+ *
883
+ * A browser without `view()` falls back to the clock, and the effect plays
884
+ * once the way it always did. Degraded rather than blank, which is the whole
885
+ * reason the declaration is behind an `@supports`.
886
+ * @default 'auto'
887
+ */
888
+ timeline?: MPAnimateTimeline;
889
+ /**
890
+ * Which part of the element's travel through the scrollport the animation is
891
+ * spread over — any CSS `animation-range`. Only read on `timeline="view"`.
892
+ *
893
+ * The default runs from the moment the element's leading edge appears to a
894
+ * little under halfway across, so it has finished arriving by the time it is
895
+ * somewhere a reader would be looking at it. A range that ended at the far
896
+ * edge would leave everything on the page permanently mid-animation.
897
+ * @default 'entry 0% cover 45%'
898
+ */
899
+ range?: string;
900
+ }
901
+ export interface MPAnimateStaggerProps {
902
+ /**
903
+ * How long after one child the next one starts, in milliseconds.
904
+ *
905
+ * This is what turns the effect into a per-child one. At `0` — the default —
906
+ * the box itself animates, which is what these components have always done
907
+ * and what is right for a single subject.
908
+ *
909
+ * The step is per **child**, so what you pass matters: eight children are
910
+ * eight steps and one child holding eight things is one step. That is also
911
+ * how to opt part of a set out — group it.
912
+ * @default 0
913
+ */
914
+ stagger?: number;
915
+ /**
916
+ * How much longer each child takes than the one before it, in milliseconds.
917
+ * Negative shortens instead, clamped at zero. Only read alongside `stagger`.
918
+ * @default 0
919
+ */
920
+ durationStep?: number;
921
+ /**
922
+ * Runs the set from the last child to the first. Only the order is reversed —
923
+ * each child still plays forwards, which is what separates this from
924
+ * `mode="out"`.
925
+ * @default false
926
+ */
927
+ reverse?: boolean;
928
+ }