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
@@ -0,0 +1,461 @@
1
+ import type * as React from 'react';
2
+ import type { MPChartCategory, MPChartCurve, MPChartDatum, MPChartSeries, MPSize } from '../types.js';
3
+ /**
4
+ * The arithmetic and the vocabulary the charts share.
5
+ *
6
+ * Nothing in here draws anything and nothing in here is a class name. It is the
7
+ * palette a series is handed, the numbers a value is written as, and — as the
8
+ * plotted charts arrive — the scales and the ticks under them. Kept apart for
9
+ * the reason `internal/data-table.ts` is: a component whose interesting fifty
10
+ * lines are buried in machinery is a component nobody can read.
11
+ */
12
+ /**
13
+ * How many colours a chart can hand out before it starts repeating.
14
+ *
15
+ * Eight, and a chart that reaches the ninth should not have: a ninth hue is
16
+ * indistinguishable from one of the first eight under colour-vision deficiency
17
+ * whichever one is chosen. Fold the tail into one "other" series, or draw a
18
+ * second chart.
19
+ */
20
+ export declare const CHART_SLOTS = 8;
21
+ /**
22
+ * What colour a mark is, in the fixed order the palette is handed out in.
23
+ *
24
+ * `index` is the series' place in the array it was passed in, **not** its place
25
+ * among the ones currently visible. That is the whole point: filtering a legend
26
+ * must not repaint the survivors, because a reader who learned that Europe is
27
+ * blue has learned something a re-render is not allowed to take back.
28
+ *
29
+ * A series that names its own colour gets it. An `MPColor` resolves to that
30
+ * accent role; anything else is passed through as CSS, so a brand hex or a
31
+ * custom property of the caller's both work.
32
+ */
33
+ export declare function seriesColor(index: number, explicit?: string): string;
34
+ /** Where a figure stops being read and starts being counted. */
35
+ export declare const COMPACT_FROM = 10000;
36
+ /**
37
+ * A number as the reader should see it, compacted once it stops being readable
38
+ * in full.
39
+ *
40
+ * Four digits stay and five do not. `1,284` is a figure anybody takes in at a
41
+ * glance, and `1.3K` has thrown away two of them to save two characters; at
42
+ * `12,900` the digits have stopped being read and started being counted, so
43
+ * `12.9K` loses nothing. Past that it is the only honest picture: nobody
44
+ * compares `1,284,003` with `1,911,220` by reading them, and `1.3M` against
45
+ * `1.9M` is what they were going to conclude anyway.
46
+ *
47
+ * `format` overrides all of it, because a caller who has said
48
+ * `{ style: 'currency', currency: 'USD' }` has said what they want and a
49
+ * component that compacted it anyway would be arguing.
50
+ */
51
+ export declare function formatStatistic(value: number, locale: string | undefined, format: Intl.NumberFormatOptions | undefined, compact: boolean): string;
52
+ /** Which way a figure has moved, and whether that is the good direction. */
53
+ export interface MPStatisticDelta {
54
+ /** The change, in the value's own units. */
55
+ absolute: number;
56
+ /** And as a share of where it started. `null` when it started at nothing. */
57
+ percent: number | null;
58
+ /** `0` when it has not moved at all, which is a third state rather than "up". */
59
+ direction: -1 | 0 | 1;
60
+ /** Whether the direction is the one the caller says is good. */
61
+ good: boolean;
62
+ }
63
+ /**
64
+ * The move from one figure to another.
65
+ *
66
+ * A percentage of zero is `null` rather than `Infinity` or `100%`. Something
67
+ * that was nothing and is now something has not grown by an amount — it has
68
+ * started — and every one of the numbers that could be printed there is a lie a
69
+ * reader would take at face value.
70
+ */
71
+ export declare function deltaOf(value: number, previous: number, betterWhen: 'up' | 'down'): MPStatisticDelta;
72
+ /**
73
+ * A point in **plot pixels**, or `null` where the series has a gap.
74
+ *
75
+ * Deliberately not `MPChartPoint`, which is the caller's datum. Everything past
76
+ * this line works in pixels: a builder that could still see a value would be a
77
+ * builder that has to know which way round the axes are.
78
+ */
79
+ export type PlotPoint = {
80
+ x: number;
81
+ y: number;
82
+ } | null;
83
+ /**
84
+ * A series as one `d`, broken wherever it has a gap.
85
+ *
86
+ * The break is the point. A `null` is a month nothing was measured in, and a
87
+ * path that joined the two sides of it would draw a straight line through a
88
+ * value nobody has — which is the one thing a reader would never guess was
89
+ * invented, because it looks exactly like data.
90
+ */
91
+ export declare function linePath(points: readonly PlotPoint[], curve: MPChartCurve): string;
92
+ /**
93
+ * The ribbon between two runs of points.
94
+ *
95
+ * Built run by run, so a gap is a gap in the fill as well — and a gap in
96
+ * *either* edge is a gap in the band, because a ribbon with only one side is
97
+ * not a shape. An area that closed across a missing month would fill in a value
98
+ * that was never measured: the same lie the bridged line tells, painted over a
99
+ * larger part of the chart.
100
+ *
101
+ * The underside is drawn with the **same** curve and its opening `M` turned
102
+ * into an `L`. Both halves matter: a smoothed top over a straight bottom
103
+ * disagrees with itself about where the band is between two points, and a
104
+ * second `moveto` inside the path lifts the pen and leaves the fill with no
105
+ * side.
106
+ */
107
+ export declare function bandPath(top: readonly PlotPoint[], bottom: readonly PlotPoint[], curve: MPChartCurve): string;
108
+ /**
109
+ * The same path closed down to a flat baseline, for an area standing on the
110
+ * axis rather than on another band.
111
+ */
112
+ export declare function areaPath(points: readonly PlotPoint[], baseline: number, curve: MPChartCurve): string;
113
+ /**
114
+ * Which edge of a bar is its data end — the one the value is at.
115
+ *
116
+ * `none` is the inner segment of a stack, whose two faces are both boundaries
117
+ * between shares rather than the end of anything, and so are both left square.
118
+ *
119
+ * `both` is a **span**: a stretch with two ends, neither of which is more the
120
+ * value than the other. A bar grows from a baseline and has one data end; a
121
+ * timeline's bar has no baseline at all.
122
+ */
123
+ export type BarEnd = 'top' | 'bottom' | 'left' | 'right' | 'none' | 'both';
124
+ /**
125
+ * A rectangle with the two corners at its **data end** cut off.
126
+ *
127
+ * Rounded at the end and square at the baseline, and that is not a stylistic
128
+ * split. A bar rounded where it meets the axis has lost the exact point it
129
+ * starts from, and a row of them turns the baseline into a scalloped edge. The
130
+ * end is where the value is, and that is the end worth softening.
131
+ *
132
+ * Which end that is comes from the caller rather than from the geometry,
133
+ * because it is the *sign* and the orientation together that decide: a negative
134
+ * bar hangs below the axis and a horizontal one grows sideways, and in both the
135
+ * corners to soften are the ones furthest from zero.
136
+ *
137
+ * The radius shrinks to fit rather than clipping, so a bar two pixels tall is a
138
+ * bar and not a dome.
139
+ */
140
+ export declare function barPath(x: number, y: number, width: number, height: number, radius: number, end: BarEnd): string;
141
+ /** The lowest and highest a series reaches, with the caller's overrides applied. */
142
+ export declare function extentOf(values: readonly (number | null)[], min?: number, max?: number): {
143
+ min: number;
144
+ max: number;
145
+ };
146
+ /**
147
+ * The lowest and highest a set of series reaches.
148
+ *
149
+ * Stacked is a different question rather than a variation on the same one: what
150
+ * a stacked chart's axis has to hold is the tallest *column*, and the tallest
151
+ * column is not made of the largest values. Positives and negatives accumulate
152
+ * separately, because a column of +8 and −3 is eleven units tall and reaches
153
+ * from −3 to 8, not from 0 to 5.
154
+ *
155
+ * `null` when nothing was measured at all, which is a different answer from
156
+ * `{ min: 0, max: 0 }` — one is an empty chart and the other is a chart of
157
+ * zeroes.
158
+ */
159
+ export declare function seriesExtent(values: readonly (readonly ChartValue[])[], stacked: boolean): {
160
+ min: number;
161
+ max: number;
162
+ } | null;
163
+ /** A value axis: where it starts, where it ends, and what it ticks at. */
164
+ export interface ValueScale {
165
+ min: number;
166
+ max: number;
167
+ ticks: number[];
168
+ /** A value as a fraction of the plot — `0` at `min`, `1` at `max`. */
169
+ fraction: (value: number) => number;
170
+ }
171
+ /**
172
+ * The scale a value axis runs on, rounded out to numbers.
173
+ *
174
+ * Rounding **outward** is the part that matters. A maximum of 4,830 becomes
175
+ * 5,000, so the top tick is a round number and the tallest mark stops short of
176
+ * the ceiling; a scale whose last bar touches the frame reads as clipped even
177
+ * when it is exactly right.
178
+ *
179
+ * Zero stays in range unless the caller says otherwise, because a bar's length
180
+ * is proportional to its value only from a zero baseline. A line chart of a
181
+ * quantity that never goes near zero is the case for passing `min` — and it is
182
+ * a case the caller makes, not one the chart makes for them.
183
+ */
184
+ export declare function valueScale(extent: {
185
+ min: number;
186
+ max: number;
187
+ } | null, options?: {
188
+ min?: number;
189
+ max?: number;
190
+ tickCount?: number;
191
+ /** Keeps zero in range. Off for an axis the caller pinned. */
192
+ includeZero?: boolean;
193
+ }): ValueScale;
194
+ /** The plot's box inside the chart, once the axes have taken their bands. */
195
+ export interface PlotBox {
196
+ left: number;
197
+ top: number;
198
+ width: number;
199
+ height: number;
200
+ }
201
+ /** A band scale: one slot per category, with the marks centred in it. */
202
+ export interface BandScale {
203
+ /** The centre of category `index`, in pixels along the axis. */
204
+ centre: (index: number) => number;
205
+ /** How wide one slot is. */
206
+ step: number;
207
+ /** How much of a slot the marks in it may take, together. */
208
+ band: number;
209
+ }
210
+ export declare function bandScale(count: number, length: number, ratio: number): BandScale;
211
+ /**
212
+ * Roughly how wide a string renders at a given font size.
213
+ *
214
+ * An estimate on purpose. The exact answer is a canvas measurement per label
215
+ * per render, on a path that runs again on every resize — and what the number
216
+ * is used for is deciding how much room to reserve, where a few pixels of
217
+ * generosity cost nothing and a reflow costs a frame.
218
+ *
219
+ * 0.6em is about the advance of a digit in the sans-serifs a UI runs in.
220
+ * Anything CJK is close to a full em, so the wider characters are counted as
221
+ * one: a Korean axis reserving 60% of the room it needs is an axis that
222
+ * overlaps itself.
223
+ */
224
+ export declare function textWidth(text: string, fontSize: number): number;
225
+ /**
226
+ * A label cut to the room it has.
227
+ *
228
+ * The alternative, when a category name is wider than its slot, is to drop
229
+ * labels until the survivors fit — and on five categories called things like
230
+ * "Onboarding flow" that leaves exactly one. An axis with one label is not a
231
+ * shorter axis, it is an unlabelled one. So cut instead: the first few
232
+ * characters tell five words apart, and the hover layer and the table both
233
+ * still carry the whole of it.
234
+ */
235
+ export declare function truncate(text: string, maxWidth: number, fontSize: number): string;
236
+ /**
237
+ * How many labels an axis can show before they collide — every nth.
238
+ *
239
+ * Every nth rather than rotating them. A rotated axis is unreadable at a
240
+ * glance, and it takes a band of the plot to be unreadable in.
241
+ */
242
+ export declare function tickStride(count: number, available: number, labelWidth: number): number;
243
+ /**
244
+ * Whether the label at `index` survives the stride.
245
+ *
246
+ * Every nth, and — where it fits — the last one, which is the part a plain
247
+ * modulo gets wrong: a fourteen-day axis at a stride of two ends at day
248
+ * thirteen, and a percentage axis ends at 80%. The end of a scale is the number
249
+ * a reader looks for first, and dropping it to keep the arithmetic tidy is the
250
+ * wrong trade.
251
+ *
252
+ * `roomForLast` is measured rather than assumed — see `fitsLast`. Forcing a
253
+ * label that does not fit turns a missing "Jun" into an overlapping "MayJun".
254
+ */
255
+ export declare function showsTick(index: number, count: number, stride: number, roomForLast: boolean): boolean;
256
+ /**
257
+ * Whether the last label clears the last one the stride kept.
258
+ *
259
+ * The two sit `(count - 1) % stride` steps apart, and they need half of each
260
+ * label plus a little air: labels are centred on their tick, so only the inner
261
+ * halves can meet.
262
+ */
263
+ export declare function fitsLast(count: number, stride: number, step: number, labelWidth: number): boolean;
264
+ /** One datum, unpacked into the parts the frame reads. */
265
+ export interface ChartValue {
266
+ value: number | null;
267
+ x?: MPChartCategory;
268
+ z?: number;
269
+ color?: string;
270
+ label?: React.ReactNode;
271
+ }
272
+ /**
273
+ * A datum in the one shape everything downstream reads.
274
+ *
275
+ * Every way of being absent collapses to `value: null` here — `null` itself, a
276
+ * missing entry, a `NaN`, an `Infinity`. They mean the same thing to a reader
277
+ * and they must mean the same thing to the path builder, because a `NaN` that
278
+ * survives this far reaches the scale and leaves the letters `NaN` in the `d`
279
+ * attribute, where it silently draws nothing at all.
280
+ */
281
+ export declare function toValue(datum: MPChartDatum): ChartValue;
282
+ /** Every series unpacked, in the order it was given. */
283
+ export declare function toValues(series: readonly MPChartSeries[]): ChartValue[][];
284
+ /**
285
+ * A category as a number, for an axis that is really a second value axis.
286
+ *
287
+ * A `Date` is its epoch milliseconds, which is what makes a scatter of
288
+ * timestamps work at all. A string is not a place on a number line, so it comes
289
+ * back `null` rather than `NaN` — the same rule `toValue` follows, for the same
290
+ * reason.
291
+ */
292
+ export declare function toNumber(value: MPChartCategory | undefined): number | null;
293
+ /** How many categories there are: the longest series decides. */
294
+ export declare function categoryCount(series: readonly MPChartSeries[]): number;
295
+ /**
296
+ * What category `index` is called, from the three places it can come from.
297
+ *
298
+ * The chart's own `categories` first, then whatever a point said its `x` was,
299
+ * then the index. A chart given neither still has an axis — it is numbered, and
300
+ * a numbered axis is a great deal better than a blank one.
301
+ */
302
+ export declare function categoryAt(index: number, categories: readonly MPChartCategory[] | undefined, values: readonly (readonly ChartValue[])[]): MPChartCategory;
303
+ /**
304
+ * A category as the axis writes it.
305
+ *
306
+ * A `Date` gets a short day rather than a full one: an axis is a row of labels
307
+ * that have to fit beside each other, and "Mar 4" carries what "March 4, 2026"
308
+ * carries in a third of the room. The year is the caller's to add with
309
+ * `tickFormat` when a chart spans one.
310
+ */
311
+ export declare function formatCategory(value: MPChartCategory, locale: string | undefined): string;
312
+ /**
313
+ * How tall the drawing is, before the caller says otherwise.
314
+ *
315
+ * Not the control ladder. A chart is a figure on a page rather than a control
316
+ * in a row, so the rungs are set against what a plot needs to be readable: `md`
317
+ * at 220 gives five gridlines about forty pixels apart, which is roughly where
318
+ * a reader stops being able to place a value between two of them.
319
+ */
320
+ export declare const PLOT_HEIGHT: Record<MPSize, number>;
321
+ /**
322
+ * What the axis labels are set in, in pixels.
323
+ *
324
+ * Pixels and not a type role, because these are drawn inside an `<svg>` where a
325
+ * class does not reach and the number is needed for the arithmetic anyway —
326
+ * every band an axis reserves is measured from its own font size.
327
+ */
328
+ export declare const CHART_FONT_SIZE: Record<MPSize, number>;
329
+ /** How heavy a line is. Two pixels at `md`, which is the chart line weight. */
330
+ export declare const LINE_WIDTH: Record<MPSize, number>;
331
+ /**
332
+ * How big a marker is.
333
+ *
334
+ * `md` at 4 makes an 8px dot, which is the floor for a mark a pointer is
335
+ * expected to land on. Below that the hit target is doing all the work and the
336
+ * mark is only telling the reader where to aim.
337
+ */
338
+ export declare const MARKER_RADIUS: Record<MPSize, number>;
339
+ /**
340
+ * The gap of surface between two marks that would otherwise touch.
341
+ *
342
+ * Two pixels, and it is structural rather than decorative: where two fills meet
343
+ * with no gap the eye reads one shape, and the boundary between them is exactly
344
+ * the thing the chart is drawing.
345
+ */
346
+ export declare const MARK_GAP = 2;
347
+ /** How much a bar's data end is rounded. */
348
+ export declare const BAR_RADIUS = 4;
349
+ /**
350
+ * How thick a bar is allowed to get.
351
+ *
352
+ * A cap rather than a size: bars are sized by their band, and two categories in
353
+ * a wide chart would otherwise be two slabs half the plot across. Past about
354
+ * this width a bar stops reading as a measured length and starts reading as a
355
+ * block of colour, and the axis it is measured against gets no easier to use.
356
+ */
357
+ export declare const BAR_MAX_THICKNESS: Record<MPSize, number>;
358
+ /**
359
+ * How much of its slot a band of bars takes, leaving the rest as air.
360
+ *
361
+ * Bars need the gap and lines do not, which is the whole reason the frame takes
362
+ * a ratio at all: a row of bars with no space between them is a histogram, and
363
+ * a histogram means something else — that the categories are contiguous
364
+ * intervals rather than separate things.
365
+ */
366
+ export declare const BAR_BAND_RATIO = 0.72;
367
+ /**
368
+ * A point on a circle, in the convention the round charts use: **zero is twelve
369
+ * o'clock and the angle grows clockwise**.
370
+ *
371
+ * Not the mathematical convention, where zero is three o'clock and the angle
372
+ * grows the other way. A chart of parts is read the way a clock is read, and
373
+ * every angle a caller passes — `startAngle`, a gauge's sweep — is easier to
374
+ * reason about in the one they already have.
375
+ */
376
+ export declare function polarPoint(cx: number, cy: number, radius: number, angle: number): {
377
+ x: number;
378
+ y: number;
379
+ };
380
+ /**
381
+ * A ring segment, or a pie slice when the inner radius is nothing.
382
+ *
383
+ * A full turn is drawn as **two** arcs rather than one, and that is not a
384
+ * flourish: an SVG arc is defined by its two endpoints, so a sweep of exactly
385
+ * 360° starts and ends at the same point and the renderer draws nothing at all.
386
+ * A single-category pie is a real chart, and it would come out blank.
387
+ */
388
+ export declare function arcPath(cx: number, cy: number, outer: number, inner: number, from: number, to: number): string;
389
+ /**
390
+ * The extent of the **category** values, for an axis that runs on numbers.
391
+ *
392
+ * Only points that have a `y` count. A point with no value is not on the plot,
393
+ * so letting its `x` stretch the axis would leave a margin of empty plot
394
+ * standing in for data that was never drawn.
395
+ */
396
+ export declare function categoryExtent(values: readonly (readonly ChartValue[])[], categories: readonly MPChartCategory[] | undefined): {
397
+ min: number;
398
+ max: number;
399
+ } | null;
400
+ /** The shapes a mark can take, in the order they are handed out. */
401
+ export type MPChartMarkShape = 'circle' | 'square' | 'triangle' | 'diamond' | 'cross';
402
+ /**
403
+ * The five, in an order chosen for how quickly one is told from the next.
404
+ *
405
+ * A circle first because it is the mark a scatter is expected to use, then the
406
+ * two that differ from it most — a square by its corners, a triangle by having
407
+ * three of them — before the two that are refinements of those.
408
+ *
409
+ * They exist because the palette runs out sooner here than anywhere else.
410
+ * Colour alone separates **three** series where any two marks can touch, and a
411
+ * scatter is exactly that case; a shape is the second channel that carries the
412
+ * rest, and it survives greyscale, print and forced colours as well.
413
+ */
414
+ export declare const MARK_SHAPES: readonly MPChartMarkShape[];
415
+ /** One mark, centred on a point. */
416
+ export declare function markPath(shape: MPChartMarkShape, cx: number, cy: number, radius: number): string;
417
+ /**
418
+ * Where one point sits along a category axis that runs on numbers.
419
+ *
420
+ * The same three sources `categoryAt` reads, in the same order — but per
421
+ * **point** rather than per column, because on a scatter each series has its
422
+ * own x at every index and there is no column for them to share.
423
+ */
424
+ export declare function pointX(value: ChartValue, index: number, categories: readonly MPChartCategory[] | undefined): number | null;
425
+ /**
426
+ * How big a bubble is, for a magnitude carried by its **area**.
427
+ *
428
+ * The radius goes as the square root, and that is the whole of it: area grows
429
+ * as the square of the radius, so a bubble drawn with its radius proportional
430
+ * to the value shows four times the ink for twice the number. Every reader
431
+ * judges the blob and not the line across it, which makes the naive version a
432
+ * chart that doubles its own data.
433
+ *
434
+ * `min` is a floor rather than zero, because a bubble of no radius is a point
435
+ * that has been removed from the chart.
436
+ */
437
+ export declare function bubbleRadius(z: number, maxZ: number, max: number, min: number): number;
438
+ /** How many steps the sequential ramp has. */
439
+ export declare const RAMP_STEPS = 5;
440
+ /**
441
+ * Which step of the ramp a fraction of the range lands on.
442
+ *
443
+ * **Steps rather than a gradient**, and that is the decision worth stating. A
444
+ * continuous fill looks better and is read worse: a reader given a smooth ramp
445
+ * can say "darker" and nothing else, where five steps let them match a cell to
446
+ * a band in the legend and come away with a number. Five is about the most
447
+ * anybody tells apart in one hue.
448
+ */
449
+ export declare function rampStep(fraction: number): number;
450
+ /** The colour of one step, by its index from the low end. */
451
+ export declare function rampFill(step: number): string;
452
+ /**
453
+ * The ink a label sits in **on** a ramp step.
454
+ *
455
+ * The two darkest steps take the light ink and the rest take the dark one. It
456
+ * is a threshold rather than a computation because the ramp is five fixed
457
+ * colours: a contrast calculation here would be arithmetic performed on every
458
+ * cell, every render, to arrive at an answer that was settled when the ramp was
459
+ * fitted.
460
+ */
461
+ export declare function rampInk(step: number): string;
@@ -0,0 +1 @@
1
+ import{dateTimeFormatter as t,numberFormatter as n}from"./intl.js";export const CHART_SLOTS=8;const o=new Set(["primary","secondary","tertiary","error"]);export function seriesColor(t,n){return n?o.has(n)?`var(--_mp-color-${n})`:n:`var(--_mp-chart-${t%8+1})`}export const COMPACT_FROM=1e4;const r={notation:"compact",maximumFractionDigits:1},e={month:"short",day:"numeric"};export function formatStatistic(t,o,e,a){return Number.isFinite(t)?e?n(o,e).format(t):a&&Math.abs(t)>=1e4?n(o,r).format(t):n(o).format(t):""}export function deltaOf(t,n,o){const r=t-n,e=r>0?1:r<0?-1:0;return{absolute:r,percent:0===n?null:r/Math.abs(n)*100,direction:e,good:0!==e&&1===e==("up"===o)}}function a(t,n){if(0===t.length)return"";if(1===t.length)return`M${t[0].x} ${t[0].y}h0`;const o=`M${t[0].x} ${t[0].y}`;if("smooth"===n)return o+function(t){const n=t.length,o=[];for(let r=0;r<n-1;r+=1){const n=t[r+1].x-t[r].x;o.push(0===n?0:(t[r+1].y-t[r].y)/n)}const r=[o[0]??0];for(let t=1;t<n-1;t+=1){const n=o[t-1],e=o[t];r.push(n*e<=0?0:2*n*e/(n+e))}r.push(o[n-2]??0);const e=[];for(let o=0;o<n-1;o+=1){const n=(t[o+1].x-t[o].x)/3;e.push(`C${t[o].x+n} ${t[o].y+r[o]*n} ${t[o+1].x-n} ${t[o+1].y-r[o+1]*n} ${t[o+1].x} ${t[o+1].y}`)}return e.join("")}(t);const r=[];for(let o=1;o<t.length;o+=1)if("step"===n){const n=(t[o-1].x+t[o].x)/2;r.push(`H${n}V${t[o].y}H${t[o].x}`)}else r.push(`L${t[o].x} ${t[o].y}`);return o+r.join("")}export function linePath(t,n){return function(t){const n=[];let o=[];for(const r of t)null===r?(o.length>0&&n.push(o),o=[]):o.push(r);return o.length>0&&n.push(o),n}(t).map(t=>a(t,n)).join("")}export function bandPath(t,n,o){const r=[];let e=[],i=[];const u=()=>{e.length>0&&r.push(`${a(e,o)}${a([...i].reverse(),o).replace(/^M/,"L")}Z`),e=[],i=[]};return t.forEach((t,o)=>{const r=n[o];null!==t&&null!=r?(e.push(t),i.push(r)):u()}),u(),r.join("")}export function areaPath(t,n,o){return bandPath(t,t.map(t=>null===t?null:{x:t.x,y:n}),o)}export function barPath(t,n,o,r,e,a){const i=Math.abs(o),u=Math.abs(r);if(0===i||0===u)return"";const l=Math.max(0,Math.min(e,i/2,u/2)),c="both"===a,s={tl:c||"top"===a||"left"===a?l:0,tr:c||"top"===a||"right"===a?l:0,br:c||"bottom"===a||"right"===a?l:0,bl:c||"bottom"===a||"left"===a?l:0},x=(t,n,o)=>t>0?`a${t} ${t} 0 0 1 ${n} ${o}`:"";return`M${t+s.tl} ${n}h`+(i-s.tl-s.tr)+x(s.tr,s.tr,s.tr)+"v"+(u-s.tr-s.br)+x(s.br,-s.br,s.br)+"h"+-(i-s.bl-s.br)+x(s.bl,-s.bl,-s.bl)+"v"+-(u-s.tl-s.bl)+x(s.tl,s.tl,-s.tl)+"Z"}export function extentOf(t,n,o){const r=t.filter(t=>null!==t&&Number.isFinite(t)),e=n??(r.length>0?Math.min(...r):0),a=o??(r.length>0?Math.max(...r):0);return e===a?{min:e-.5,max:a+.5}:{min:e,max:a}}export function seriesExtent(t,n){let o=1/0,r=-1/0,e=!1;if(n){const n=t.reduce((t,n)=>Math.max(t,n.length),0);for(let a=0;a<n;a+=1){let n=0,i=0;for(const o of t){const t=o[a]?.value;null!=t&&(e=!0,t>=0?n+=t:i+=t)}o=Math.min(o,i),r=Math.max(r,n)}}else for(const n of t)for(const{value:t}of n)null!==t&&(e=!0,o=Math.min(o,t),r=Math.max(r,t));return e?{min:o,max:r}:null}function i(t){const n=10**Math.floor(Math.log10(t)),o=t/n;return o<=1?n:o<=2?2*n:o<=5?5*n:10*n}export function valueScale(t,n={}){const{tickCount:o=5,includeZero:r=!0}=n;let e=n.min??t?.min??0,a=n.max??t?.max??1;if(r&&void 0===n.min&&(e=Math.min(e,0)),r&&void 0===n.max&&(a=Math.max(a,0)),a===e){const t=Math.abs(a)>0?.5*Math.abs(a):1;e-=t,a+=t}const u=void 0!==n.min&&void 0!==n.max?function(t,n){const o=10**Math.floor(Math.log10(t/Math.max(1,n)));let r=i(t/Math.max(1,n)),e=1/0;for(const a of[.1,1,10])for(const i of[1,2,2.5,5]){const u=i*a*o,l=t/u,c=Math.round(l);if(c<1||Math.abs(l-c)>1e-9)continue;const s=Math.abs(c-n);s<e&&(e=s,r=u)}return r}(a-e,o):i((a-e)/Math.max(1,o)),l=void 0!==n.min?e:Math.floor(e/u)*u,c=void 0!==n.max?a:Math.ceil(a/u)*u,s=c-l||1,x=[];for(let t=l;t<=c+1e-9*u;t+=u)x.push(Number(t.toFixed(12)));return{min:l,max:c,ticks:x,fraction:t=>(t-l)/s}}export function bandScale(t,n,o){const r=t>0?n/t:n;return{step:r,band:r*o,centre:t=>r*(t+.5)}}export function textWidth(t,n){let o=0;for(const n of t)o+=/[ᄀ-ᇿ⺀-꓏가-퟿豈-﫿︰-﹏]/.test(n)?1:.6;return o*n}export function truncate(t,n,o){if(n<=0||textWidth(t,o)<=n)return t;const r=n-textWidth("…",o);let e="",a=0;for(const n of t){const t=a+textWidth(n,o);if(t>r)break;a=t,e+=n}return e.length>0?`${e.trimEnd()}…`:"…"}export function tickStride(t,n,o){return t<=1||n<=0?1:Math.max(1,Math.ceil(t/Math.max(1,Math.floor(n/Math.max(1,o)))))}export function showsTick(t,n,o,r){return t%o===0||r&&t===n-1}export function fitsLast(t,n,o,r){const e=(t-1)%n;return e>0&&e*o>=r+8}export function toValue(t){return null==t?{value:null}:"number"==typeof t?{value:Number.isFinite(t)?t:null}:"object"==typeof t&&"y"in t?{value:null!==t.y&&Number.isFinite(t.y)?t.y:null,x:t.x,z:t.z,color:t.color?seriesColor(0,t.color):void 0,label:t.label}:{value:null}}export function toValues(t){return t.map(t=>t.data.map(toValue))}export function toNumber(t){return t instanceof Date?Number.isFinite(t.getTime())?t.getTime():null:"number"==typeof t&&Number.isFinite(t)?t:null}export function categoryCount(t){return t.reduce((t,n)=>Math.max(t,n.data.length),0)}export function categoryAt(t,n,o){if(n&&t<n.length)return n[t];for(const n of o){const o=n[t]?.x;if(void 0!==o)return o}return t}export function formatCategory(o,r){return o instanceof Date?t(r,e).format(o):"number"==typeof o?n(r).format(o):o}export const PLOT_HEIGHT={xs:120,sm:160,md:220,lg:280,xl:360};export const CHART_FONT_SIZE={xs:10,sm:11,md:12,lg:13,xl:14};export const LINE_WIDTH={xs:1.5,sm:1.75,md:2,lg:2.5,xl:3};export const MARKER_RADIUS={xs:3,sm:3.5,md:4,lg:4.5,xl:5};export const MARK_GAP=2;export const BAR_RADIUS=4;export const BAR_MAX_THICKNESS={xs:24,sm:32,md:40,lg:48,xl:56};export const BAR_BAND_RATIO=.72;export function polarPoint(t,n,o,r){return{x:t+o*Math.sin(r),y:n-o*Math.cos(r)}}export function arcPath(t,n,o,r,e,a){const i=a-e;if(Math.abs(i)<1e-9||o<=0)return"";const u=Math.abs(i)>=2*Math.PI-1e-9,l=u?e+2*Math.PI*Math.sign(i||1):a,c=e+(l-e)/2,s=Math.abs(l-e)>Math.PI?1:0,x=l>e?1:0,h=x?0:1,$=polarPoint(t,n,o,e),f=polarPoint(t,n,o,c),m=polarPoint(t,n,o,l),p=u?`A${o} ${o} 0 0 ${x} ${f.x} ${f.y}A${o} ${o} 0 0 ${x} ${m.x} ${m.y}`:`A${o} ${o} 0 ${s} ${x} ${m.x} ${m.y}`;if(r<=0)return u?`M${$.x} ${$.y}${p}Z`:`M${t} ${n}L${$.x} ${$.y}${p}Z`;const M=polarPoint(t,n,r,l),b=polarPoint(t,n,r,c),d=polarPoint(t,n,r,e),y=u?`A${r} ${r} 0 0 ${h} ${b.x} ${b.y}A${r} ${r} 0 0 ${h} ${d.x} ${d.y}`:`A${r} ${r} 0 ${s} ${h} ${d.x} ${d.y}`;return`M${$.x} ${$.y}${p}L${M.x} ${M.y}${y}Z`}export function categoryExtent(t,n){let o=1/0,r=-1/0,e=!1;return t.forEach(t=>{t.forEach((t,a)=>{if(null===t.value)return;const i=toNumber(t.x??n?.[a]??a);null!==i&&(e=!0,o=Math.min(o,i),r=Math.max(r,i))})}),e?{min:o,max:r}:null}export const MARK_SHAPES=["circle","square","triangle","diamond","cross"];const u={circle:1,square:.886,triangle:1.35,diamond:1.25,cross:1.1};export function markPath(t,n,o,r){const e=r*u[t];switch(t){case"square":return`M${n-e} ${o-e}h${2*e}v${2*e}h${2*-e}Z`;case"triangle":return`M${n} ${o-e}L${n+.866*e} ${o+.5*e}L${n-.866*e} ${o+.5*e}Z`;case"diamond":return`M${n} ${o-e}L${n+e} ${o}L${n} ${o+e}L${n-e} ${o}Z`;case"cross":return`M${n-e} ${o-e}L${n+e} ${o+e}M${n+e} ${o-e}L${n-e} ${o+e}`;default:return`M${n-e} ${o}a${e} ${e} 0 1 0 ${2*e} 0a${e} ${e} 0 1 0 ${2*-e} 0Z`}}export function pointX(t,n,o){return toNumber(t.x??o?.[n]??n)}export function bubbleRadius(t,n,o,r){return n<=0||t<=0?r:r+(o-r)*Math.sqrt(Math.min(1,t/n))}export const RAMP_STEPS=5;export function rampStep(t){return Number.isFinite(t)?Math.min(4,Math.max(0,Math.floor(5*t))):0}export function rampFill(t){return`var(--_mp-chart-scale-${Math.min(5,Math.max(1,t+1))})`}export function rampInk(t){return t>=3?"var(--_mp-color-surface)":"var(--_mp-color-on-surface)"}
@@ -4,15 +4,6 @@ export type MPColorScheme = 'light' | 'dark' | 'system';
4
4
  export type MPResolvedColorScheme = 'light' | 'dark';
5
5
  export declare const SCHEME_ATTRIBUTE = "data-mp-scheme";
6
6
  export declare const DEFAULT_STORAGE_KEY = "mp-color-scheme";
7
- /**
8
- * Puts the choice on the document element, or takes it off.
9
- *
10
- * `'system'` **removes** the attribute rather than writing it, which is the
11
- * whole of how the media query gets its say back: the dark block is reached
12
- * either by `prefers-color-scheme` on a root that is not forced light, or by the
13
- * attribute. An attribute spelling out `system` would match neither.
14
- */
15
- export declare function applyScheme(scheme: MPColorScheme): void;
16
7
  export declare function setScheme(storageKey: string, scheme: MPColorScheme): void;
17
8
  export declare function useChosenScheme(storageKey: string): MPColorScheme;
18
9
  /**
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import*as e from"react";export const SCHEME_ATTRIBUTE="data-mp-scheme";export const DEFAULT_STORAGE_KEY="mp-color-scheme";const t="(prefers-color-scheme: dark)";function n(e){return"light"===e||"dark"===e||"system"===e}let o;const r=new Set;function c(){for(const e of r)e()}export function applyScheme(e){if("undefined"==typeof document)return;const t=document.documentElement;"system"===e?t.removeAttribute("data-mp-scheme"):t.setAttribute("data-mp-scheme",e)}export function setScheme(e,t){o=t,function(e,t){try{"system"===t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch{}}(e,t),applyScheme(t),c()}function s(e){return r.add(e),()=>{r.delete(e)}}function u(e){return o??=function(){if("undefined"==typeof document)return;const e=document.documentElement.getAttribute("data-mp-scheme");return n(e)&&"system"!==e?e:void 0}()??function(e){try{if("undefined"==typeof localStorage)return"system";const t=localStorage.getItem(e);return n(t)?t:"system"}catch{return"system"}}(e),o}export function useChosenScheme(t){const n=e.useCallback(()=>u(t),[t]);return e.useSyncExternalStore(s,n,()=>"system")}function m(e){if("undefined"==typeof window||!window.matchMedia)return()=>{};const n=window.matchMedia(t);return n.addEventListener("change",e),()=>n.removeEventListener("change",e)}function i(){return"undefined"!=typeof window&&window.matchMedia?.(t).matches?"dark":"light"}export function useSystemScheme(){return e.useSyncExternalStore(m,i,()=>"light")}export function resetScheme(){o=void 0,c()}
2
+ import*as e from"react";export const SCHEME_ATTRIBUTE="data-mp-scheme";export const DEFAULT_STORAGE_KEY="mp-color-scheme";const t="(prefers-color-scheme: dark)";function n(e){return"light"===e||"dark"===e||"system"===e}let o;const r=new Set;function c(){for(const e of r)e()}export function setScheme(e,t){o=t,function(e,t){try{"system"===t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch{}}(e,t),function(e){if("undefined"==typeof document)return;const t=document.documentElement;"system"===e?t.removeAttribute("data-mp-scheme"):t.setAttribute("data-mp-scheme",e)}(t),c()}function s(e){return r.add(e),()=>{r.delete(e)}}function u(e){return o??=function(){if("undefined"==typeof document)return;const e=document.documentElement.getAttribute("data-mp-scheme");return n(e)&&"system"!==e?e:void 0}()??function(e){try{if("undefined"==typeof localStorage)return"system";const t=localStorage.getItem(e);return n(t)?t:"system"}catch{return"system"}}(e),o}export function useChosenScheme(t){const n=e.useCallback(()=>u(t),[t]);return e.useSyncExternalStore(s,n,()=>"system")}function m(e){if("undefined"==typeof window||!window.matchMedia)return()=>{};const n=window.matchMedia(t);return n.addEventListener("change",e),()=>n.removeEventListener("change",e)}function i(){return"undefined"!=typeof window&&window.matchMedia?.(t).matches?"dark":"light"}export function useSystemScheme(){return e.useSyncExternalStore(m,i,()=>"light")}export function resetScheme(){o=void 0,c()}
@@ -1,9 +1,10 @@
1
1
  /**
2
- * The two prop defaults an application can move for the whole page.
2
+ * The prop defaults an application can move for the whole page.
3
3
  *
4
- * `size` and `color` are the only axes where every component in this library
5
- * starts from the *same* answer — `md` and `primary` — which is what makes a
6
- * single app-wide default meaningful for them and meaningless for anything else.
4
+ * `size`, `color` and `density` are the only axes where every component that has
5
+ * them starts from the *same* answer — `md`, `primary` and `0` — which is what
6
+ * makes a single app-wide default meaningful for them and meaningless for
7
+ * anything else.
7
8
  * A `variant` default is per component by design (`MPAccordion` is `outlined`,
8
9
  * `MPAlert` is `tonal`, `MPBadge` is `filled`), so one global value would be
9
10
  * overwriting six considered decisions with one arbitrary one.
@@ -26,11 +27,20 @@
26
27
  * has to reach every call site is exactly what context is for.
27
28
  */
28
29
  import * as React from 'react';
29
- import type { MPColor, MPSize } from '../types.js';
30
+ import type { MPColor, MPDensity, MPSize, MPWindowClass } from '../types.js';
30
31
  /** What an `MPConfigProvider` can set. Anything unset is inherited, then default. */
31
32
  export interface MPConfigValue {
32
33
  size?: MPSize;
33
34
  color?: MPColor;
35
+ density?: MPDensity;
36
+ /**
37
+ * Where the window size classes begin, for the JavaScript half of the library.
38
+ *
39
+ * Partial and merged over MD3's own, in CSS pixels. See `MPConfigProvider` for
40
+ * what this does and does not reach — the stylesheet is not downstream of it,
41
+ * and cannot be.
42
+ */
43
+ breakpoints?: Partial<Record<MPWindowClass, number>>;
34
44
  }
35
45
  export declare const MPConfigContext: React.Context<MPConfigValue>;
36
46
  /** The configuration in force at this point in the tree. */
@@ -41,3 +51,12 @@ export declare function useMPConfig(): MPConfigValue;
41
51
  */
42
52
  export declare function useMPSize(size: MPSize | undefined): MPSize;
43
53
  export declare function useMPColor(color: MPColor | undefined): MPColor;
54
+ /**
55
+ * The third axis with an app-wide default, and the one most likely to be set
56
+ * once and never again: a product decides how dense it is at the top, not per
57
+ * table.
58
+ *
59
+ * Only the components that hold things read it, so a page set to `-2` tightens
60
+ * its lists and leaves its buttons at the height they have to be.
61
+ */
62
+ export declare function useMPDensity(density: MPDensity | undefined): MPDensity;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import*as t from"react";const e=Object.freeze({});export const MPConfigContext=/*@__PURE__*/t.createContext(e);export function useMPConfig(){return t.useContext(MPConfigContext)}export function useMPSize(e){const o=t.useContext(MPConfigContext);return e??o.size??"md"}export function useMPColor(e){const o=t.useContext(MPConfigContext);return e??o.color??"primary"}
2
+ import*as t from"react";const e=Object.freeze({});export const MPConfigContext=/*@__PURE__*/t.createContext(e);export function useMPConfig(){return t.useContext(MPConfigContext)}export function useMPSize(e){const o=t.useContext(MPConfigContext);return e??o.size??"md"}export function useMPColor(e){const o=t.useContext(MPConfigContext);return e??o.color??"primary"}export function useMPDensity(e){const o=t.useContext(MPConfigContext);return e??o.density??0}