material-plus-ui 1.5.0 → 1.7.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 (549) hide show
  1. package/README.md +2 -2
  2. package/dist/components/accordion/MPAccordion.d.ts +21 -1
  3. package/dist/components/accordion/MPAccordion.js +1 -1
  4. package/dist/components/alert/MPAlert.d.ts +33 -2
  5. package/dist/components/alert/MPAlert.js +1 -1
  6. package/dist/components/anchor/MPAnchor.d.ts +107 -0
  7. package/dist/components/anchor/MPAnchor.js +2 -0
  8. package/dist/components/anchor/index.d.ts +2 -0
  9. package/dist/components/anchor/index.js +1 -0
  10. package/dist/components/animate-appear/MPAnimateAppear.d.ts +2 -2
  11. package/dist/components/animate-appear/MPAnimateAppear.js +1 -1
  12. package/dist/components/animate-blink/MPAnimateBlink.d.ts +2 -2
  13. package/dist/components/animate-blink/MPAnimateBlink.js +2 -1
  14. package/dist/components/animate-counter/MPAnimateCounter.d.ts +67 -0
  15. package/dist/components/animate-counter/MPAnimateCounter.js +2 -0
  16. package/dist/components/animate-counter/index.d.ts +2 -0
  17. package/dist/components/animate-counter/index.js +1 -0
  18. package/dist/components/animate-fade/MPAnimateFade.d.ts +2 -2
  19. package/dist/components/animate-fade/MPAnimateFade.js +2 -1
  20. package/dist/components/animate-float/MPAnimateFloat.d.ts +53 -0
  21. package/dist/components/animate-float/MPAnimateFloat.js +2 -0
  22. package/dist/components/animate-float/index.d.ts +2 -0
  23. package/dist/components/animate-float/index.js +1 -0
  24. package/dist/components/animate-grow/MPAnimateGrow.d.ts +2 -2
  25. package/dist/components/animate-grow/MPAnimateGrow.js +2 -1
  26. package/dist/components/animate-lighting/MPAnimateLighting.js +2 -1
  27. package/dist/components/animate-reveal/MPAnimateReveal.d.ts +64 -0
  28. package/dist/components/animate-reveal/MPAnimateReveal.js +2 -0
  29. package/dist/components/animate-reveal/index.d.ts +2 -0
  30. package/dist/components/animate-reveal/index.js +1 -0
  31. package/dist/components/animate-rotate/MPAnimateRotate.d.ts +2 -2
  32. package/dist/components/animate-rotate/MPAnimateRotate.js +2 -1
  33. package/dist/components/animate-scramble/MPAnimateScramble.d.ts +65 -0
  34. package/dist/components/animate-scramble/MPAnimateScramble.js +2 -0
  35. package/dist/components/animate-scramble/index.d.ts +2 -0
  36. package/dist/components/animate-scramble/index.js +1 -0
  37. package/dist/components/animate-shake/MPAnimateShake.d.ts +65 -0
  38. package/dist/components/animate-shake/MPAnimateShake.js +2 -0
  39. package/dist/components/animate-shake/index.d.ts +2 -0
  40. package/dist/components/animate-shake/index.js +1 -0
  41. package/dist/components/animate-slide/MPAnimateSlide.d.ts +2 -2
  42. package/dist/components/animate-slide/MPAnimateSlide.js +2 -1
  43. package/dist/components/animate-split/MPAnimateSplit.d.ts +56 -0
  44. package/dist/components/animate-split/MPAnimateSplit.js +2 -0
  45. package/dist/components/animate-split/index.d.ts +2 -0
  46. package/dist/components/animate-split/index.js +1 -0
  47. package/dist/components/animate-typing/MPAnimateTyping.js +1 -1
  48. package/dist/components/animate-zoom/MPAnimateZoom.d.ts +2 -2
  49. package/dist/components/animate-zoom/MPAnimateZoom.js +2 -1
  50. package/dist/components/app-logo/MPAppLogo.d.ts +156 -0
  51. package/dist/components/app-logo/MPAppLogo.js +2 -0
  52. package/dist/components/app-logo/index.d.ts +2 -0
  53. package/dist/components/app-logo/index.js +1 -0
  54. package/dist/components/area-chart/MPAreaChart.d.ts +79 -0
  55. package/dist/components/area-chart/MPAreaChart.js +2 -0
  56. package/dist/components/area-chart/index.d.ts +2 -0
  57. package/dist/components/area-chart/index.js +1 -0
  58. package/dist/components/aspect-ratio/MPAspectRatio.js +2 -1
  59. package/dist/components/avatar/MPAvatar.d.ts +10 -1
  60. package/dist/components/avatar/MPAvatar.js +1 -1
  61. package/dist/components/badge/MPBadge.js +1 -1
  62. package/dist/components/bar-chart/MPBarChart.d.ts +74 -0
  63. package/dist/components/bar-chart/MPBarChart.js +2 -0
  64. package/dist/components/bar-chart/index.d.ts +2 -0
  65. package/dist/components/bar-chart/index.js +1 -0
  66. package/dist/components/blockquote/MPBlockquote.d.ts +10 -1
  67. package/dist/components/blockquote/MPBlockquote.js +1 -1
  68. package/dist/components/bottom-navigation/MPBottomNavigation.d.ts +19 -18
  69. package/dist/components/bottom-navigation/MPBottomNavigation.js +1 -1
  70. package/dist/components/box/MPBox.d.ts +43 -8
  71. package/dist/components/box/MPBox.js +2 -1
  72. package/dist/components/breadcrumb/MPBreadcrumb.js +1 -1
  73. package/dist/components/button/MPButton.d.ts +49 -3
  74. package/dist/components/button/MPButton.js +1 -1
  75. package/dist/components/calendar/MPCalendar.d.ts +160 -0
  76. package/dist/components/calendar/MPCalendar.js +2 -0
  77. package/dist/components/calendar/index.d.ts +2 -0
  78. package/dist/components/calendar/index.js +1 -0
  79. package/dist/components/card/MPCard.js +1 -1
  80. package/dist/components/carousel/MPCarousel.js +1 -1
  81. package/dist/components/chat-bubble/MPChatBubble.js +1 -1
  82. package/dist/components/checkbox/MPCheckbox.js +1 -1
  83. package/dist/components/chip/MPChip.d.ts +31 -7
  84. package/dist/components/chip/MPChip.js +1 -1
  85. package/dist/components/code-block/MPCodeBlock.d.ts +177 -0
  86. package/dist/components/code-block/MPCodeBlock.js +2 -0
  87. package/dist/components/code-block/index.d.ts +2 -0
  88. package/dist/components/code-block/index.js +1 -0
  89. package/dist/components/collapsible/MPCollapsible.d.ts +12 -1
  90. package/dist/components/collapsible/MPCollapsible.js +1 -1
  91. package/dist/components/color-picker/MPColorPicker.js +1 -1
  92. package/dist/components/combobox/MPCombobox.d.ts +71 -5
  93. package/dist/components/combobox/MPCombobox.js +1 -1
  94. package/dist/components/command-palette/MPCommandPalette.d.ts +12 -2
  95. package/dist/components/command-palette/MPCommandPalette.js +1 -1
  96. package/dist/components/config/MPConfigProvider.d.ts +166 -0
  97. package/dist/components/config/MPConfigProvider.js +2 -0
  98. package/dist/components/config/index.d.ts +2 -0
  99. package/dist/components/config/index.js +1 -0
  100. package/dist/components/confirm/MPConfirmProvider.d.ts +143 -0
  101. package/dist/components/confirm/MPConfirmProvider.js +2 -0
  102. package/dist/components/confirm/index.d.ts +2 -0
  103. package/dist/components/confirm/index.js +1 -0
  104. package/dist/components/container/MPContainer.d.ts +9 -2
  105. package/dist/components/container/MPContainer.js +2 -1
  106. package/dist/components/data-list/MPDataList.d.ts +82 -0
  107. package/dist/components/data-list/MPDataList.js +2 -0
  108. package/dist/components/data-list/index.d.ts +2 -0
  109. package/dist/components/data-list/index.js +1 -0
  110. package/dist/components/data-table/MPDataTable.d.ts +295 -0
  111. package/dist/components/data-table/MPDataTable.js +2 -0
  112. package/dist/components/data-table/index.d.ts +2 -0
  113. package/dist/components/data-table/index.js +1 -0
  114. package/dist/components/date-picker/MPDatePicker.d.ts +53 -2
  115. package/dist/components/date-picker/MPDatePicker.js +1 -1
  116. package/dist/components/date-picker/index.d.ts +1 -1
  117. package/dist/components/date-range-picker/MPDateRangePicker.js +1 -1
  118. package/dist/components/date-time-picker/MPDateTimePicker.js +1 -1
  119. package/dist/components/dialog/MPDialog.d.ts +24 -3
  120. package/dist/components/dialog/MPDialog.js +1 -1
  121. package/dist/components/divider/MPDivider.js +1 -1
  122. package/dist/components/drawer/MPDrawer.d.ts +8 -2
  123. package/dist/components/drawer/MPDrawer.js +1 -1
  124. package/dist/components/empty/MPEmpty.d.ts +10 -1
  125. package/dist/components/empty/MPEmpty.js +1 -1
  126. package/dist/components/fieldset/MPFieldset.js +1 -1
  127. package/dist/components/file-picker/MPFilePicker.js +1 -1
  128. package/dist/components/flex/MPFlex.d.ts +95 -0
  129. package/dist/components/flex/MPFlex.js +2 -0
  130. package/dist/components/flex/index.d.ts +2 -0
  131. package/dist/components/flex/index.js +1 -0
  132. package/dist/components/floating-action-button/MPFloatingActionButton.js +1 -1
  133. package/dist/components/floating-bottom-navigation/MPFloatingBottomNavigation.d.ts +127 -0
  134. package/dist/components/floating-bottom-navigation/MPFloatingBottomNavigation.js +2 -0
  135. package/dist/components/floating-bottom-navigation/index.d.ts +2 -0
  136. package/dist/components/floating-bottom-navigation/index.js +1 -0
  137. package/dist/components/footer/MPFooter.d.ts +24 -4
  138. package/dist/components/footer/MPFooter.js +1 -1
  139. package/dist/components/form/MPForm.js +1 -1
  140. package/dist/components/gauge-chart/MPGaugeChart.d.ts +78 -0
  141. package/dist/components/gauge-chart/MPGaugeChart.js +2 -0
  142. package/dist/components/gauge-chart/index.d.ts +2 -0
  143. package/dist/components/gauge-chart/index.js +1 -0
  144. package/dist/components/grid/MPGrid.d.ts +23 -1
  145. package/dist/components/grid/MPGrid.js +1 -1
  146. package/dist/components/header/MPHeader.d.ts +26 -4
  147. package/dist/components/header/MPHeader.js +1 -1
  148. package/dist/components/heatmap-chart/MPHeatmapChart.d.ts +75 -0
  149. package/dist/components/heatmap-chart/MPHeatmapChart.js +2 -0
  150. package/dist/components/heatmap-chart/index.d.ts +2 -0
  151. package/dist/components/heatmap-chart/index.js +1 -0
  152. package/dist/components/hover-card/MPHoverCard.d.ts +100 -0
  153. package/dist/components/hover-card/MPHoverCard.js +2 -0
  154. package/dist/components/hover-card/index.d.ts +2 -0
  155. package/dist/components/hover-card/index.js +1 -0
  156. package/dist/components/image/MPImage.d.ts +121 -0
  157. package/dist/components/image/MPImage.js +2 -0
  158. package/dist/components/image/index.d.ts +2 -0
  159. package/dist/components/image/index.js +1 -0
  160. package/dist/components/line-chart/MPLineChart.d.ts +66 -0
  161. package/dist/components/line-chart/MPLineChart.js +2 -0
  162. package/dist/components/line-chart/index.d.ts +2 -0
  163. package/dist/components/line-chart/index.js +1 -0
  164. package/dist/components/list/MPList.d.ts +51 -1
  165. package/dist/components/list/MPList.js +1 -1
  166. package/dist/components/menu/MPMenu.d.ts +21 -2
  167. package/dist/components/menu/MPMenu.js +1 -1
  168. package/dist/components/menubar/MPMenubar.js +1 -1
  169. package/dist/components/meter/MPMeter.d.ts +87 -0
  170. package/dist/components/meter/MPMeter.js +2 -0
  171. package/dist/components/meter/index.d.ts +2 -0
  172. package/dist/components/meter/index.js +1 -0
  173. package/dist/components/mockup/MPMockup.d.ts +143 -0
  174. package/dist/components/mockup/MPMockup.js +2 -0
  175. package/dist/components/mockup/index.d.ts +2 -0
  176. package/dist/components/mockup/index.js +1 -0
  177. package/dist/components/navigation-menu/MPNavigationMenu.js +1 -1
  178. package/dist/components/number-field/MPNumberField.d.ts +3 -3
  179. package/dist/components/number-field/MPNumberField.js +1 -1
  180. package/dist/components/otp-field/MPOtpField.js +1 -1
  181. package/dist/components/overlay/MPOverlay.d.ts +1 -1
  182. package/dist/components/overlay/MPOverlay.js +1 -1
  183. package/dist/components/pagination/MPPagination.js +1 -1
  184. package/dist/components/panes/MPPanes.js +1 -1
  185. package/dist/components/pie-chart/MPPieChart.d.ts +77 -0
  186. package/dist/components/pie-chart/MPPieChart.js +2 -0
  187. package/dist/components/pie-chart/index.d.ts +2 -0
  188. package/dist/components/pie-chart/index.js +1 -0
  189. package/dist/components/pill/MPPill.js +1 -1
  190. package/dist/components/popconfirm/MPPopconfirm.d.ts +92 -0
  191. package/dist/components/popconfirm/MPPopconfirm.js +2 -0
  192. package/dist/components/popconfirm/index.d.ts +2 -0
  193. package/dist/components/popconfirm/index.js +1 -0
  194. package/dist/components/popover/MPPopover.d.ts +1 -1
  195. package/dist/components/popover/MPPopover.js +1 -1
  196. package/dist/components/portal/MPPortal.d.ts +75 -0
  197. package/dist/components/portal/MPPortal.js +2 -0
  198. package/dist/components/portal/index.d.ts +2 -0
  199. package/dist/components/portal/index.js +1 -0
  200. package/dist/components/progress-box/MPProgressBox.js +1 -1
  201. package/dist/components/progress-circular/MPProgressCircular.js +1 -1
  202. package/dist/components/progress-linear/MPProgressLinear.js +1 -1
  203. package/dist/components/radio-group/MPRadioGroup.js +1 -1
  204. package/dist/components/rating/MPRating.js +1 -1
  205. package/dist/components/scatter-chart/MPScatterChart.d.ts +66 -0
  206. package/dist/components/scatter-chart/MPScatterChart.js +2 -0
  207. package/dist/components/scatter-chart/index.d.ts +2 -0
  208. package/dist/components/scatter-chart/index.js +1 -0
  209. package/dist/components/scroll-area/MPScrollArea.d.ts +82 -0
  210. package/dist/components/scroll-area/MPScrollArea.js +2 -0
  211. package/dist/components/scroll-area/index.d.ts +2 -0
  212. package/dist/components/scroll-area/index.js +1 -0
  213. package/dist/components/scroll-zone/MPScrollZone.d.ts +165 -0
  214. package/dist/components/scroll-zone/MPScrollZone.js +2 -0
  215. package/dist/components/scroll-zone/index.d.ts +2 -0
  216. package/dist/components/scroll-zone/index.js +1 -0
  217. package/dist/components/segmented-button/MPSegmentedButton.js +1 -1
  218. package/dist/components/select/MPSelect.d.ts +28 -5
  219. package/dist/components/select/MPSelect.js +1 -1
  220. package/dist/components/shortcut/MPShortcut.js +1 -1
  221. package/dist/components/show/MPShow.d.ts +78 -0
  222. package/dist/components/show/MPShow.js +2 -0
  223. package/dist/components/show/index.d.ts +2 -0
  224. package/dist/components/show/index.js +1 -0
  225. package/dist/components/sidebar/MPSidebar.d.ts +20 -1
  226. package/dist/components/sidebar/MPSidebar.js +1 -1
  227. package/dist/components/skeleton/MPSkeleton.js +1 -1
  228. package/dist/components/slider/MPSlider.d.ts +27 -0
  229. package/dist/components/slider/MPSlider.js +1 -1
  230. package/dist/components/snackbar/MPSnackbar.d.ts +20 -1
  231. package/dist/components/snackbar/MPSnackbar.js +1 -1
  232. package/dist/components/sparkline/MPSparkline.d.ts +85 -0
  233. package/dist/components/sparkline/MPSparkline.js +2 -0
  234. package/dist/components/sparkline/index.d.ts +2 -0
  235. package/dist/components/sparkline/index.js +1 -0
  236. package/dist/components/spoiler/MPSpoiler.d.ts +12 -0
  237. package/dist/components/spoiler/MPSpoiler.js +1 -1
  238. package/dist/components/stack/MPStack.d.ts +198 -0
  239. package/dist/components/stack/MPStack.js +2 -0
  240. package/dist/components/stack/index.d.ts +2 -0
  241. package/dist/components/stack/index.js +1 -0
  242. package/dist/components/statistic/MPStatistic.d.ts +104 -0
  243. package/dist/components/statistic/MPStatistic.js +2 -0
  244. package/dist/components/statistic/index.d.ts +2 -0
  245. package/dist/components/statistic/index.js +1 -0
  246. package/dist/components/stepper/MPStepper.d.ts +153 -0
  247. package/dist/components/stepper/MPStepper.js +2 -0
  248. package/dist/components/stepper/index.d.ts +2 -0
  249. package/dist/components/stepper/index.js +1 -0
  250. package/dist/components/switch/MPSwitch.js +1 -1
  251. package/dist/components/table/MPTable.d.ts +24 -2
  252. package/dist/components/table/MPTable.js +1 -1
  253. package/dist/components/tabs/MPTabs.d.ts +12 -0
  254. package/dist/components/tabs/MPTabs.js +1 -1
  255. package/dist/components/text-field/MPTextField.d.ts +38 -14
  256. package/dist/components/text-field/MPTextField.js +1 -1
  257. package/dist/components/time-picker/MPTimePicker.js +1 -1
  258. package/dist/components/timeline/MPTimeline.d.ts +10 -2
  259. package/dist/components/timeline/MPTimeline.js +1 -1
  260. package/dist/components/timeline-chart/MPTimelineChart.d.ts +63 -0
  261. package/dist/components/timeline-chart/MPTimelineChart.js +2 -0
  262. package/dist/components/timeline-chart/index.d.ts +2 -0
  263. package/dist/components/timeline-chart/index.js +1 -0
  264. package/dist/components/toggle/MPToggle.js +1 -1
  265. package/dist/components/toolbar/MPToolbar.d.ts +106 -0
  266. package/dist/components/toolbar/MPToolbar.js +2 -0
  267. package/dist/components/toolbar/index.d.ts +2 -0
  268. package/dist/components/toolbar/index.js +1 -0
  269. package/dist/components/tour/MPTour.d.ts +120 -0
  270. package/dist/components/tour/MPTour.js +2 -0
  271. package/dist/components/tour/index.d.ts +2 -0
  272. package/dist/components/tour/index.js +1 -0
  273. package/dist/components/transfer/MPTransfer.js +1 -1
  274. package/dist/components/tree-select/MPTreeSelect.d.ts +113 -0
  275. package/dist/components/tree-select/MPTreeSelect.js +2 -0
  276. package/dist/components/tree-select/index.d.ts +2 -0
  277. package/dist/components/tree-select/index.js +1 -0
  278. package/dist/components/tree-view/MPTreeView.d.ts +153 -0
  279. package/dist/components/tree-view/MPTreeView.js +2 -0
  280. package/dist/components/tree-view/index.d.ts +2 -0
  281. package/dist/components/tree-view/index.js +1 -0
  282. package/dist/components/typography/MPTypography.d.ts +17 -1
  283. package/dist/components/typography/MPTypography.js +1 -1
  284. package/dist/components/visually-hidden/MPVisuallyHidden.d.ts +60 -0
  285. package/dist/components/visually-hidden/MPVisuallyHidden.js +2 -0
  286. package/dist/components/visually-hidden/index.d.ts +2 -0
  287. package/dist/components/visually-hidden/index.js +1 -0
  288. package/dist/constants/glyphs.d.ts +4 -0
  289. package/dist/constants/glyphs.js +1 -1
  290. package/dist/constants/icons.d.ts +2 -0
  291. package/dist/constants/icons.js +1 -1
  292. package/dist/hooks/index.d.ts +40 -0
  293. package/dist/hooks/index.js +1 -0
  294. package/dist/hooks/useMPColorScheme.d.ts +135 -0
  295. package/dist/hooks/useMPColorScheme.js +2 -0
  296. package/dist/hooks/useMPDisclosure.d.ts +58 -0
  297. package/dist/hooks/useMPDisclosure.js +2 -0
  298. package/dist/hooks/useMPElementSize.d.ts +55 -0
  299. package/dist/hooks/useMPElementSize.js +2 -0
  300. package/dist/hooks/useMPMediaQuery.d.ts +40 -0
  301. package/dist/hooks/useMPMediaQuery.js +2 -0
  302. package/dist/hooks/useMPOnScreen.d.ts +58 -0
  303. package/dist/hooks/useMPOnScreen.js +2 -0
  304. package/dist/hooks/useMPReducedMotion.d.ts +32 -0
  305. package/dist/hooks/useMPReducedMotion.js +2 -0
  306. package/dist/hooks/useMPShortcut.d.ts +105 -0
  307. package/dist/hooks/useMPShortcut.js +2 -0
  308. package/dist/hooks/useMPWindowClass.d.ts +55 -0
  309. package/dist/hooks/useMPWindowClass.js +2 -0
  310. package/dist/index.d.ts +43 -1
  311. package/dist/index.js +1 -1
  312. package/dist/internal/Calendar.d.ts +19 -4
  313. package/dist/internal/Calendar.js +1 -1
  314. package/dist/internal/ChartChrome.d.ts +205 -0
  315. package/dist/internal/ChartChrome.js +2 -0
  316. package/dist/internal/ChartFrame.d.ts +197 -0
  317. package/dist/internal/ChartFrame.js +2 -0
  318. package/dist/internal/FieldOutline.d.ts +14 -5
  319. package/dist/internal/FieldOutline.js +1 -1
  320. package/dist/internal/Picker.d.ts +15 -3
  321. package/dist/internal/Picker.js +1 -1
  322. package/dist/internal/SupportingText.d.ts +24 -0
  323. package/dist/internal/SupportingText.js +1 -1
  324. package/dist/internal/animate-core.d.ts +121 -0
  325. package/dist/internal/animate-core.js +1 -0
  326. package/dist/internal/animate.d.ts +75 -55
  327. package/dist/internal/animate.js +1 -1
  328. package/dist/internal/bottom-navigation.d.ts +58 -0
  329. package/dist/internal/bottom-navigation.js +2 -0
  330. package/dist/internal/chart.d.ts +471 -0
  331. package/dist/internal/chart.js +1 -0
  332. package/dist/internal/color-scheme.d.ts +28 -0
  333. package/dist/internal/color-scheme.js +2 -0
  334. package/dist/internal/config.d.ts +62 -0
  335. package/dist/internal/config.js +2 -0
  336. package/dist/internal/data-table.d.ts +162 -0
  337. package/dist/internal/data-table.js +1 -0
  338. package/dist/internal/date.d.ts +50 -3
  339. package/dist/internal/date.js +1 -1
  340. package/dist/internal/density.d.ts +9 -0
  341. package/dist/internal/density.js +1 -0
  342. package/dist/internal/elevation.d.ts +26 -0
  343. package/dist/internal/elevation.js +1 -0
  344. package/dist/internal/highlight.d.ts +96 -0
  345. package/dist/internal/highlight.js +1 -0
  346. package/dist/internal/i18n.d.ts +196 -1
  347. package/dist/internal/initials.d.ts +28 -0
  348. package/dist/internal/initials.js +1 -0
  349. package/dist/internal/mark.d.ts +52 -0
  350. package/dist/internal/mark.js +1 -0
  351. package/dist/internal/measure.d.ts +31 -0
  352. package/dist/internal/measure.js +1 -0
  353. package/dist/internal/messages/anchor.d.ts +3 -0
  354. package/dist/internal/messages/anchor.js +1 -0
  355. package/dist/internal/messages/chart.d.ts +3 -0
  356. package/dist/internal/messages/chart.js +1 -0
  357. package/dist/internal/messages/code.d.ts +3 -0
  358. package/dist/internal/messages/code.js +1 -0
  359. package/dist/internal/messages/confirm.d.ts +3 -0
  360. package/dist/internal/messages/confirm.js +1 -0
  361. package/dist/internal/messages/data-table.d.ts +3 -0
  362. package/dist/internal/messages/data-table.js +1 -0
  363. package/dist/internal/messages/picker.js +1 -1
  364. package/dist/internal/messages/scroll.d.ts +3 -0
  365. package/dist/internal/messages/scroll.js +1 -0
  366. package/dist/internal/messages/sparkline.d.ts +3 -0
  367. package/dist/internal/messages/sparkline.js +1 -0
  368. package/dist/internal/messages/tour.d.ts +3 -0
  369. package/dist/internal/messages/tour.js +1 -0
  370. package/dist/internal/mockup.d.ts +174 -0
  371. package/dist/internal/mockup.js +2 -0
  372. package/dist/internal/page-layout.d.ts +24 -5
  373. package/dist/internal/page-layout.js +1 -1
  374. package/dist/internal/progress.d.ts +14 -0
  375. package/dist/internal/responsive.d.ts +55 -0
  376. package/dist/internal/responsive.js +1 -0
  377. package/dist/internal/scale.d.ts +0 -17
  378. package/dist/internal/scale.js +1 -1
  379. package/dist/internal/step.d.ts +86 -0
  380. package/dist/internal/step.js +1 -0
  381. package/dist/internal/table.d.ts +53 -0
  382. package/dist/internal/table.js +1 -0
  383. package/dist/internal/text.d.ts +57 -0
  384. package/dist/internal/text.js +1 -0
  385. package/dist/internal/threshold.d.ts +19 -0
  386. package/dist/internal/threshold.js +1 -0
  387. package/dist/internal/time-scale.d.ts +44 -0
  388. package/dist/internal/time-scale.js +1 -0
  389. package/dist/internal/transition.d.ts +33 -0
  390. package/dist/internal/transition.js +1 -0
  391. package/dist/internal/visibility.d.ts +48 -0
  392. package/dist/internal/visibility.js +1 -0
  393. package/dist/internal/window-class.d.ts +48 -0
  394. package/dist/internal/window-class.js +2 -0
  395. package/dist/locales/ar.js +1 -1
  396. package/dist/locales/de.js +1 -1
  397. package/dist/locales/es.js +1 -1
  398. package/dist/locales/fr.js +1 -1
  399. package/dist/locales/hi.js +1 -1
  400. package/dist/locales/id.js +1 -1
  401. package/dist/locales/it.js +1 -1
  402. package/dist/locales/ja.js +1 -1
  403. package/dist/locales/ko.js +1 -1
  404. package/dist/locales/nl.js +1 -1
  405. package/dist/locales/pl.js +1 -1
  406. package/dist/locales/pt.js +1 -1
  407. package/dist/locales/ru.js +1 -1
  408. package/dist/locales/th.js +1 -1
  409. package/dist/locales/tr.js +1 -1
  410. package/dist/locales/vi.js +1 -1
  411. package/dist/locales/zh-hans.js +1 -1
  412. package/dist/locales/zh-hant.js +1 -1
  413. package/dist/styles/accordion.css +1 -1
  414. package/dist/styles/alert.css +1 -1
  415. package/dist/styles/anchor.css +2 -0
  416. package/dist/styles/animate-appear.css +1 -1
  417. package/dist/styles/animate-blink.css +1 -1
  418. package/dist/styles/animate-counter.css +2 -0
  419. package/dist/styles/animate-fade.css +1 -1
  420. package/dist/styles/animate-float.css +2 -0
  421. package/dist/styles/animate-grow.css +1 -1
  422. package/dist/styles/animate-headline.css +1 -1
  423. package/dist/styles/animate-lighting.css +1 -1
  424. package/dist/styles/animate-marquee.css +1 -1
  425. package/dist/styles/animate-reveal.css +2 -0
  426. package/dist/styles/animate-rotate.css +1 -1
  427. package/dist/styles/animate-scramble.css +2 -0
  428. package/dist/styles/animate-shake.css +2 -0
  429. package/dist/styles/animate-slide.css +1 -1
  430. package/dist/styles/animate-split.css +2 -0
  431. package/dist/styles/animate-typing.css +1 -1
  432. package/dist/styles/animate-zoom.css +1 -1
  433. package/dist/styles/app-logo.css +2 -0
  434. package/dist/styles/area-chart.css +2 -0
  435. package/dist/styles/aspect-ratio.css +1 -1
  436. package/dist/styles/avatar.css +1 -1
  437. package/dist/styles/badge.css +1 -1
  438. package/dist/styles/bar-chart.css +2 -0
  439. package/dist/styles/blockquote.css +1 -1
  440. package/dist/styles/bottom-navigation.css +1 -1
  441. package/dist/styles/box.css +1 -1
  442. package/dist/styles/breadcrumb.css +1 -1
  443. package/dist/styles/button.css +1 -1
  444. package/dist/styles/calendar.css +2 -0
  445. package/dist/styles/card.css +1 -1
  446. package/dist/styles/carousel.css +1 -1
  447. package/dist/styles/chat-bubble.css +1 -1
  448. package/dist/styles/checkbox.css +1 -1
  449. package/dist/styles/chip.css +1 -1
  450. package/dist/styles/code-block.css +2 -0
  451. package/dist/styles/collapsible.css +1 -1
  452. package/dist/styles/color-picker.css +1 -1
  453. package/dist/styles/combobox.css +1 -1
  454. package/dist/styles/command-palette.css +1 -1
  455. package/dist/styles/config.css +2 -0
  456. package/dist/styles/confirm.css +2 -0
  457. package/dist/styles/container.css +1 -1
  458. package/dist/styles/data-list.css +2 -0
  459. package/dist/styles/data-table.css +2 -0
  460. package/dist/styles/date-picker.css +1 -1
  461. package/dist/styles/date-range-picker.css +1 -1
  462. package/dist/styles/date-time-picker.css +1 -1
  463. package/dist/styles/dialog.css +1 -1
  464. package/dist/styles/divider.css +1 -1
  465. package/dist/styles/drawer.css +1 -1
  466. package/dist/styles/empty.css +1 -1
  467. package/dist/styles/fieldset.css +1 -1
  468. package/dist/styles/file-picker.css +1 -1
  469. package/dist/styles/flex.css +2 -0
  470. package/dist/styles/floating-action-button.css +1 -1
  471. package/dist/styles/floating-bottom-navigation.css +2 -0
  472. package/dist/styles/footer.css +1 -1
  473. package/dist/styles/form.css +1 -1
  474. package/dist/styles/gauge-chart.css +2 -0
  475. package/dist/styles/grid.css +1 -1
  476. package/dist/styles/header.css +1 -1
  477. package/dist/styles/heatmap-chart.css +2 -0
  478. package/dist/styles/highlight.css +1 -1
  479. package/dist/styles/hover-card.css +2 -0
  480. package/dist/styles/icon-button.css +1 -1
  481. package/dist/styles/image.css +2 -0
  482. package/dist/styles/line-chart.css +2 -0
  483. package/dist/styles/list.css +1 -1
  484. package/dist/styles/locale.css +1 -1
  485. package/dist/styles/menu.css +1 -1
  486. package/dist/styles/menubar.css +1 -1
  487. package/dist/styles/meter.css +2 -0
  488. package/dist/styles/mockup.css +2 -0
  489. package/dist/styles/navigation-menu.css +1 -1
  490. package/dist/styles/number-field.css +1 -1
  491. package/dist/styles/otp-field.css +1 -1
  492. package/dist/styles/overlay.css +1 -1
  493. package/dist/styles/page-layout.css +1 -1
  494. package/dist/styles/pagination.css +1 -1
  495. package/dist/styles/panes.css +1 -1
  496. package/dist/styles/pie-chart.css +2 -0
  497. package/dist/styles/pill.css +1 -1
  498. package/dist/styles/popconfirm.css +2 -0
  499. package/dist/styles/popover.css +1 -1
  500. package/dist/styles/portal.css +2 -0
  501. package/dist/styles/progress-box.css +1 -1
  502. package/dist/styles/progress-circular.css +1 -1
  503. package/dist/styles/progress-linear.css +1 -1
  504. package/dist/styles/radio-group.css +1 -1
  505. package/dist/styles/rating.css +1 -1
  506. package/dist/styles/scatter-chart.css +2 -0
  507. package/dist/styles/scroll-area.css +2 -0
  508. package/dist/styles/scroll-zone.css +2 -0
  509. package/dist/styles/segmented-button.css +1 -1
  510. package/dist/styles/select.css +1 -1
  511. package/dist/styles/shortcut.css +1 -1
  512. package/dist/styles/show.css +2 -0
  513. package/dist/styles/sidebar.css +1 -1
  514. package/dist/styles/skeleton.css +1 -1
  515. package/dist/styles/slider.css +1 -1
  516. package/dist/styles/snackbar.css +1 -1
  517. package/dist/styles/sparkline.css +2 -0
  518. package/dist/styles/spoiler.css +1 -1
  519. package/dist/styles/stack.css +2 -0
  520. package/dist/styles/statistic.css +2 -0
  521. package/dist/styles/stepper.css +2 -0
  522. package/dist/styles/switch.css +1 -1
  523. package/dist/styles/table.css +1 -1
  524. package/dist/styles/tabs.css +1 -1
  525. package/dist/styles/text-field.css +1 -1
  526. package/dist/styles/text-link.css +1 -1
  527. package/dist/styles/time-picker.css +1 -1
  528. package/dist/styles/timeline-chart.css +2 -0
  529. package/dist/styles/timeline.css +1 -1
  530. package/dist/styles/toggle.css +1 -1
  531. package/dist/styles/tokens.css +1 -1
  532. package/dist/styles/toolbar.css +2 -0
  533. package/dist/styles/tour.css +2 -0
  534. package/dist/styles/transfer.css +1 -1
  535. package/dist/styles/tree-select.css +2 -0
  536. package/dist/styles/tree-view.css +2 -0
  537. package/dist/styles/typography.css +1 -1
  538. package/dist/styles/visually-hidden.css +2 -0
  539. package/dist/styles.css +1 -1
  540. package/dist/tailwind.css +1423 -114
  541. package/dist/types.d.ts +628 -3
  542. package/package.json +8 -2
  543. package/dist/components/avatar-group/MPAvatarGroup.d.ts +0 -74
  544. package/dist/components/avatar-group/MPAvatarGroup.js +0 -2
  545. package/dist/components/avatar-group/index.d.ts +0 -2
  546. package/dist/components/avatar-group/index.js +0 -1
  547. package/dist/internal/avatar-group.d.ts +0 -22
  548. package/dist/internal/avatar-group.js +0 -2
  549. package/dist/styles/avatar-group.css +0 -2
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { MPAnimateMode, MPAnimateProps } from '../../types.js';
4
- export interface MPAnimateRotateProps extends MPAnimateProps, React.ComponentPropsWithoutRef<'div'> {
3
+ import type { MPAnimateMode, MPAnimateProps, MPAnimateStaggerProps, MPAnimateTimelineProps } from '../../types.js';
4
+ export interface MPAnimateRotateProps extends MPAnimateProps, MPAnimateStaggerProps, MPAnimateTimelineProps, React.ComponentPropsWithoutRef<'div'> {
5
5
  /**
6
6
  * Whether the content turns into place or out of it.
7
7
  * @default 'in'
@@ -1 +1,2 @@
1
- import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,useAnimateElement as a}from"../../internal/animate.js";export const MPAnimateRotate=/*@__PURE__*/e.forwardRef(function({duration:e,delay:n=0,easing:o,repeat:i=1,alternate:s,paused:l,trigger:d="mount",play:m,once:c=!0,threshold:f=.2,mode:p="in",from:g=-180,to:u=0,origin:y="center",fade:h=!0,render:N,className:j,style:R,children:$,...b},w){const x=a({effect:"rotate",duration:e,delay:n,easing:o,repeat:i,alternate:s,mode:p,angle:`${g}deg`,angleTo:`${u}deg`,opacity:h?0:1,trigger:d,play:m,once:c,threshold:f,paused:l,infinite:t(i)});return r({render:N,ref:[w,x.ref],props:{...b,className:[x.className,j].filter(Boolean).join(" "),style:{transformOrigin:y,...x.style,...R},...x.props,children:$}})});
1
+ "use client";
2
+ import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,useAnimateElement as a}from"../../internal/animate.js";export const MPAnimateRotate=/*@__PURE__*/e.forwardRef(function({duration:e,delay:n=0,easing:i,repeat:o=1,alternate:s,paused:l,trigger:d="mount",play:g,once:m=!0,threshold:c=.2,stagger:p=0,durationStep:f,reverse:u,timeline:h,range:y,mode:N="in",from:j=-180,to:v=0,origin:R="center",fade:S=!0,render:$,className:b,style:w,children:x,...A},B){const M=a({effect:"rotate",duration:e,delay:n,easing:i,repeat:o,alternate:s,mode:N,angle:`${j}deg`,angleTo:`${v}deg`,opacity:S?0:1,trigger:d,play:g,once:m,threshold:c,paused:l,infinite:t(o),stagger:p,durationStep:f,reverse:u,timeline:h,range:y,children:x});return r({render:$,ref:[B,M.ref],props:{...A,className:[M.className,b].filter(Boolean).join(" "),style:{transformOrigin:R,...M.style,...w},...M.props,children:M.children}})});
@@ -0,0 +1,65 @@
1
+ import * as React from 'react';
2
+ import type { MPAnimateProps } from '../../types.js';
3
+ export interface MPAnimateScrambleProps extends Omit<MPAnimateProps, 'alternate' | 'easing'>, Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {
4
+ /** The text, when it is easier to pass than to nest. Overrides `children`. */
5
+ text?: string;
6
+ /**
7
+ * How long the whole line takes to settle, in milliseconds.
8
+ * @default 1200
9
+ */
10
+ duration?: number;
11
+ /**
12
+ * How much of that each character spends unsettled, as a fraction of the
13
+ * whole. At `1` the last character is still noise when the first has been
14
+ * still for the entire run; low values make the line resolve almost at once.
15
+ * @default 0.4
16
+ */
17
+ spread?: number;
18
+ /**
19
+ * How often an unsettled character is replaced, in milliseconds. Below about
20
+ * 30 the noise stops reading as characters and starts reading as flicker.
21
+ * @default 50
22
+ */
23
+ tick?: number;
24
+ /** The alphabet the noise is drawn from. */
25
+ characters?: string;
26
+ /** Which language the text is in, for deciding where a character ends. */
27
+ locale?: string;
28
+ /** The text to settle. Only text is settled — see below. */
29
+ children?: React.ReactNode;
30
+ }
31
+ /**
32
+ * Text settling out of noise.
33
+ *
34
+ * `MPAnimateTyping`'s sibling, and the difference is what the box does. A
35
+ * typewriter's line grows a character at a time, so everything after it on the
36
+ * page moves while it runs; this one is **its finished length from the first
37
+ * frame** and only the characters inside it change. That is why it is the one
38
+ * to reach for in a heading, a table cell or anything else with something
39
+ * beside it.
40
+ *
41
+ * ## Written in JavaScript, and paused like everything else
42
+ *
43
+ * There is no keyframe for this: replacing a character with a random one is not
44
+ * an interpolation, so the frame loop is real. What it borrows is the trigger,
45
+ * the play state and the rewind — so `trigger="visible"`, `paused` and a
46
+ * `manual` replay behave exactly as they do on the six declared effects.
47
+ *
48
+ * Before it is triggered it shows its own **first frame**, which for this
49
+ * effect is the line fully scrambled. Not the answer: a heading that has
50
+ * already resolved while it waits to be scrolled to has given away the thing it
51
+ * was about to do. The waiting noise is fixed rather than churning, because
52
+ * motion that starts before the trigger is not the effect, it is a distraction
53
+ * beside it.
54
+ *
55
+ * ## What a screen reader gets
56
+ *
57
+ * The finished line, once, out of a clipped box; the settling copy is
58
+ * `aria-hidden`. Noise read out character by character is not text, and
59
+ * find-on-page still matches the real words.
60
+ *
61
+ * Under `prefers-reduced-motion` the line is simply there, finished, from the
62
+ * first frame — the state rather than the animation, because an effect switched
63
+ * off at the wrong end would leave a heading permanently unreadable.
64
+ */
65
+ export declare const MPAnimateScramble: React.ForwardRefExoticComponent<MPAnimateScrambleProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as a from"react";import{isInfinite as r,useAnimationRun as n,usePrefersReducedMotion as s}from"../../internal/animate.js";import{graphemesOf as i,textOf as o}from"../../internal/text.js";import{VISUALLY_HIDDEN as m}from"../../internal/visually-hidden.js";export const MPAnimateScramble=/*@__PURE__*/a.forwardRef(function({text:c,duration:l=1200,spread:u=.4,tick:d=50,characters:h="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789#%&@$?!",locale:p,delay:f=0,repeat:g=1,paused:x,trigger:M="mount",play:j,once:y=!0,threshold:A=.2,className:N,style:b,children:v,...F},w){const S=s(),q=n({trigger:M,play:j,once:y,threshold:A,paused:x,infinite:r(g)}),E=c??o(v),P=a.useMemo(()=>i(E,p),[E,p]),[R,k]=a.useState(0),B="running"===q.state&&!S;a.useEffect(()=>{if(S)return void k(1);if(!B)return void k(0);let e=0,t=0;const a=r=>{0===t&&(t=r);const n=r-t-f,s=l>0?Math.min(1,Math.max(0,n/l)):1;k(s),s<1&&(e=requestAnimationFrame(a))};return e=requestAnimationFrame(a),()=>cancelAnimationFrame(e)},[B,S,l,f,q.started]);const C=S?E:P.map((e,t)=>(e=>{const t=P.length>1?e/(P.length-1):0;return R>=t*u+(1-u)})(t)?e:(e=>{const t=(2654435761*e+40503*Math.floor(R*l/Math.max(1,d)))%h.length;return h[Math.abs(t)]??h[0]})(t)).join("");return t("div",{ref:e=>{q.ref(e),"function"==typeof w?w(e):w&&(w.current=e)},className:N,style:b,"data-mp-animation":"scramble","data-mp-state":q.state,...q.handlers,...F,children:[e("span",{className:m,children:E}),e("span",{"aria-hidden":"true",className:"tabular-nums whitespace-pre-wrap",children:C})]})});
@@ -0,0 +1,2 @@
1
+ export { MPAnimateScramble } from './MPAnimateScramble.js';
2
+ export type { MPAnimateScrambleProps } from './MPAnimateScramble.js';
@@ -0,0 +1 @@
1
+ export{MPAnimateScramble}from"./MPAnimateScramble.js";
@@ -0,0 +1,65 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { MPAnimateProps } from '../../types.js';
4
+ export interface MPAnimateShakeProps extends Omit<MPAnimateProps, 'alternate' | 'repeat' | 'once' | 'threshold'>, React.ComponentPropsWithoutRef<'div'> {
5
+ /**
6
+ * How far it travels at the widest point of the first swing — a number in
7
+ * pixels, or any CSS length.
8
+ * @default '0.5rem'
9
+ */
10
+ distance?: number | string;
11
+ /** Renders something other than a `<div>`. Base UI's own escape hatch. */
12
+ render?: useRender.RenderProp;
13
+ children?: React.ReactNode;
14
+ }
15
+ /**
16
+ * The answer to something that did not work.
17
+ *
18
+ * A wrong code, a rejected card, a form submitted with a field still empty. It
19
+ * is over in four hundred milliseconds and it says *that was refused* more
20
+ * plainly than any colour does — a red border is a **state** the field is now
21
+ * in, and this is a reply to what the reader just did.
22
+ *
23
+ * ## Why this is allowed, when a control never moves
24
+ *
25
+ * The library's rule is that controls do not transform, and it holds without
26
+ * exception — but the rule is about a control's **resting states**: hover,
27
+ * press, on, off. Movement there is a stand-in for something colour says
28
+ * better, and it makes a target that the pointer has to chase.
29
+ *
30
+ * A shake is not a state. It is not a thing the control *is*, it is a thing
31
+ * that just happened, and it is finished before a reader could try to point at
32
+ * it. That is the whole of the exception, and it is the only one.
33
+ *
34
+ * ## What keeps it from becoming decoration
35
+ *
36
+ * `trigger` defaults to **`manual`**, so nothing shakes on mount. A shake that
37
+ * runs when a page loads is decoration, and readers learn to ignore moving
38
+ * decoration — which costs the effect exactly the meaning it is here for.
39
+ *
40
+ * There is no `repeat`. A refusal is said once.
41
+ *
42
+ * The keyframe is home at both ends, so an interrupted shake leaves the element
43
+ * where the page put it, and its second half is smaller than its first — a
44
+ * shake that ends as hard as it starts reads as a loop that was cut off.
45
+ *
46
+ * ## Shaking again
47
+ *
48
+ * Set `play` back to `false` and then to `true`. The animation is rewound
49
+ * without unmounting anything, so the field keeps its value and its focus and
50
+ * the second wrong answer moves exactly as much as the first did.
51
+ *
52
+ * ```tsx
53
+ * const [wrong, setWrong] = React.useState(false);
54
+ *
55
+ * function reject() {
56
+ * setWrong(false);
57
+ * requestAnimationFrame(() => setWrong(true));
58
+ * }
59
+ *
60
+ * <MPAnimateShake play={wrong}>
61
+ * <MPOtpField />
62
+ * </MPAnimateShake>;
63
+ * ```
64
+ */
65
+ export declare const MPAnimateShake: React.ForwardRefExoticComponent<MPAnimateShakeProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{lengthValue as a,useAnimateElement as n}from"../../internal/animate.js";export const MPAnimateShake=/*@__PURE__*/e.forwardRef(function({duration:e=400,delay:s=0,easing:t="standard",paused:i,trigger:l="manual",play:o,distance:d="0.5rem",render:c,className:m,style:f,children:p,...h},u){const y=n({effect:"shake",effectClass:"mp-anim-shake",duration:e,delay:s,easing:t,repeat:1,x:a(d),trigger:l,play:o,once:!0,threshold:.2,paused:i,infinite:!1,children:p});return r({render:c,ref:[u,y.ref],props:{...h,className:[y.className,m].filter(Boolean).join(" "),style:{...y.style,...f},...y.props,children:y.children}})});
@@ -0,0 +1,2 @@
1
+ export { MPAnimateShake } from './MPAnimateShake.js';
2
+ export type { MPAnimateShakeProps } from './MPAnimateShake.js';
@@ -0,0 +1 @@
1
+ export{MPAnimateShake}from"./MPAnimateShake.js";
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { MPAnimateMode, MPAnimateProps, MPSide } from '../../types.js';
4
- export interface MPAnimateSlideProps extends MPAnimateProps, React.ComponentPropsWithoutRef<'div'> {
3
+ import type { MPAnimateMode, MPAnimateProps, MPAnimateStaggerProps, MPAnimateTimelineProps, MPSide } from '../../types.js';
4
+ export interface MPAnimateSlideProps extends MPAnimateProps, MPAnimateStaggerProps, MPAnimateTimelineProps, React.ComponentPropsWithoutRef<'div'> {
5
5
  /**
6
6
  * Whether the content slides in or slides away. `out` leaves by the same edge
7
7
  * it would have come from, and is quicker — MD3's `short4` against `medium4`.
@@ -1 +1,2 @@
1
- import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,slideOffsets as a,useAnimateElement as n}from"../../internal/animate.js";export const MPAnimateSlide=/*@__PURE__*/e.forwardRef(function({duration:e,delay:o=0,easing:i,repeat:s=1,alternate:l,paused:d,trigger:m="mount",play:c,once:p=!0,threshold:f=.2,mode:y="in",from:u="bottom",distance:g="100%",fade:h=!0,render:x,className:N,style:b,children:j,...w},A){const{x:B,y:M}=a(u,g),P=n({effect:"slide",duration:e,delay:o,easing:i,repeat:s,alternate:l,mode:y,x:B,y:M,opacity:h?0:1,trigger:m,play:c,once:p,threshold:f,paused:d,infinite:t(s)});return r({render:x,ref:[A,P.ref],props:{...w,className:[P.className,N].filter(Boolean).join(" "),style:{...P.style,...b},...P.props,children:j}})});
1
+ "use client";
2
+ import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,slideOffsets as a,useAnimateElement as n}from"../../internal/animate.js";export const MPAnimateSlide=/*@__PURE__*/e.forwardRef(function({duration:e,delay:i=0,easing:o,repeat:s=1,alternate:l,paused:d,trigger:m="mount",play:c,once:p=!0,threshold:f=.2,stagger:g=0,durationStep:u,reverse:y,timeline:h,range:x,mode:N="in",from:S="bottom",distance:b="100%",fade:j=!0,render:v,className:w,style:A,children:B,...M},P){const{x:R,y:k}=a(S,b),q=n({effect:"slide",duration:e,delay:i,easing:o,repeat:s,alternate:l,mode:N,x:R,y:k,opacity:j?0:1,trigger:m,play:c,once:p,threshold:f,paused:d,infinite:t(s),stagger:g,durationStep:u,reverse:y,timeline:h,range:x,children:B});return r({render:v,ref:[P,q.ref],props:{...M,className:[q.className,w].filter(Boolean).join(" "),style:{...q.style,...A},...q.props,children:q.children}})});
@@ -0,0 +1,56 @@
1
+ import * as React from 'react';
2
+ import type { MPAnimateProps, MPAnimateTimelineProps, MPSide } from '../../types.js';
3
+ /** What a line is cut into before it is animated. */
4
+ export type MPAnimateSplitBy = 'word' | 'character';
5
+ export interface MPAnimateSplitProps extends MPAnimateProps, MPAnimateTimelineProps, Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {
6
+ /** The text, when it is easier to pass than to nest. Overrides `children`. */
7
+ text?: string;
8
+ /**
9
+ * Whether each piece is a word or a character.
10
+ * @default 'word'
11
+ */
12
+ by?: MPAnimateSplitBy;
13
+ /**
14
+ * How long after one piece the next one starts, in milliseconds. This is the
15
+ * whole effect.
16
+ *
17
+ * The default is right for words. Characters want a good deal less — there
18
+ * are five or six times as many of them, and the same step turns a sentence
19
+ * into something that takes four seconds to finish arriving.
20
+ * @default 40
21
+ */
22
+ stagger?: number;
23
+ /**
24
+ * How much longer each piece takes than the one before it, in milliseconds.
25
+ * Negative shortens instead, clamped at zero.
26
+ * @default 0
27
+ */
28
+ durationStep?: number;
29
+ /** Runs the line from the last piece to the first. */
30
+ reverse?: boolean;
31
+ /**
32
+ * Which edge each piece drifts in from.
33
+ * @default 'bottom'
34
+ */
35
+ from?: MPSide;
36
+ /**
37
+ * How far each piece travels. Short on purpose — a long travel over forty
38
+ * pieces is a paragraph that is moving rather than a paragraph arriving.
39
+ * @default '0.5rem'
40
+ */
41
+ distance?: number | string;
42
+ /**
43
+ * Fades each piece in as it settles.
44
+ * @default true
45
+ */
46
+ fade?: boolean;
47
+ /**
48
+ * Which language the text is in, for deciding where a word ends. Only worth
49
+ * setting where the answer is genuinely ambiguous; `Intl.Segmenter` reads the
50
+ * script itself for most of them.
51
+ */
52
+ locale?: string;
53
+ /** The text to split. Only text is split — see below. */
54
+ children?: React.ReactNode;
55
+ }
56
+ export declare const MPAnimateSplit: React.ForwardRefExoticComponent<MPAnimateSplitProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsx as e,jsxs as a}from"react/jsx-runtime";import*as t from"react";import{ANIMATION_CLASS as r,ANIM_BASE as n,animationSlots as i,isInfinite as s,slideOffsets as l,useAnimationRun as o}from"../../internal/animate.js";import{graphemesOf as m,textOf as d,wordsOf as c}from"../../internal/text.js";import{VISUALLY_HIDDEN as p}from"../../internal/visually-hidden.js";export const MPAnimateSplit=/*@__PURE__*/t.forwardRef(function({text:t,by:f="word",duration:u,delay:h=0,easing:y,repeat:g=1,alternate:x,paused:j,trigger:N="mount",play:b,once:v=!0,threshold:w=.2,timeline:k,range:S,stagger:$=40,durationStep:A=0,reverse:M=!1,from:O="bottom",distance:P="0.5rem",fade:R=!0,locale:_,className:q,style:z,children:B,...C},D){const E=o({trigger:N,play:b,once:v,threshold:w,paused:j,infinite:s(g)}),F="view"===k?j?"paused":"running":E.state,G=t??d(B),{x:H,y:I}=l(O,P),J=c(G,_),K="character"===f?J.map(e=>m(e,_)):J.map(e=>[e]),L=`${n} ${r.slide} inline-block`,Q=K.reduce((e,a)=>e+a.length,0);let T=-1;return a("div",{ref:e=>{E.ref(e),"function"==typeof D?D(e):D&&(D.current=e)},className:q,style:{"--_mp-anim-state":F,...z},"data-mp-animation":"split","data-mp-state":F,...E.handlers,...C,children:[e("span",{className:p,children:G}),e("span",{"aria-hidden":"true",children:K.map((a,t)=>e("span",{className:"inline-block whitespace-pre",children:a.map((a,t)=>{T+=1;const r=M?Q-1-T:T;return e("span",{className:L,style:i({effect:"slide",duration:u,delay:h+r*$,easing:y,repeat:g,alternate:x,durationOffset:r*A,timeline:k,range:S,x:H,y:I,opacity:R?0:1}),children:a},t)})},t))})]})});
@@ -0,0 +1,2 @@
1
+ export { MPAnimateSplit } from './MPAnimateSplit.js';
2
+ export type { MPAnimateSplitBy, MPAnimateSplitProps } from './MPAnimateSplit.js';
@@ -0,0 +1 @@
1
+ export{MPAnimateSplit}from"./MPAnimateSplit.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as r from"react";import{isInfinite as n,useAnimationRun as a,usePrefersReducedMotion as i}from"../../internal/animate.js";import{VISUALLY_HIDDEN as s}from"../../internal/visually-hidden.js";function u(e){return"string"==typeof e||"number"==typeof e?String(e):Array.isArray(e)?e.map(u).join(""):""}export const MPAnimateTyping=/*@__PURE__*/r.forwardRef(function({text:o,speed:m=24,hold:c=1400,erase:f=!1,eraseSpeed:l,caret:d=!0,caretChar:p="|",duration:h,delay:g=0,repeat:y=1,paused:x,trigger:T="mount",play:j,once:v=!0,threshold:M=.2,className:N,style:S,children:w,...A},I){const E=a({trigger:T,play:j,once:v,threshold:M,paused:x,infinite:n(y)}),R=i(),b=o??u(w),C=r.useMemo(()=>function(e,t){if("undefined"!=typeof Intl&&"Segmenter"in Intl)return[...new Intl.Segmenter(t,{granularity:"grapheme"}).segment(e)].map(e=>e.segment);return[...e]}(b),[b]),P=C.length,[k,q]=r.useState(0),z=r.useRef(0),B=h&&P>0?h/P:1e3/Math.max(m,1),D=1e3/Math.max(l??2*m,1);return r.useEffect(()=>{z.current=0},[P]),r.useEffect(()=>{if(R||0===P)return void q(P);if(!E.started)return z.current=0,void q(0);if(x)return;let e,t=!1,r=z.current,n=1,a=!1;const i="infinite"===y?1/0:Math.max(1,y);if(r>=P&&1===i)return;const s=()=>{if(!t){if(a)return r-=1,z.current=r,q(r),r<=0&&(a=!1,n+=1),void(e=setTimeout(s,a?D:B));if(r+=1,z.current=r,q(r),r<P)e=setTimeout(s,B);else if(!(n>=i)){if(f)return a=!0,void(e=setTimeout(s,c));n+=1,e=setTimeout(()=>{t||(r=0,z.current=0,q(0),e=setTimeout(s,B))},c)}}};return q(r),e=setTimeout(s,0===r?g:B),()=>{t=!0,clearTimeout(e)}},[E.started,x,R,P,B,D,g,c,f,y]),t("div",{ref:e=>{E.ref(e),"function"==typeof I?I(e):I&&(I.current=e)},className:N,style:S,"data-mp-animation":"typing","data-mp-state":E.state,...E.handlers,...A,children:[e("span",{className:s,children:b}),t("span",{"aria-hidden":"true",className:"whitespace-pre-wrap",children:[C.slice(0,k).join(""),d?e("span",{className:"mp-typing-caret",children:p}):null]})]})});
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as r from"react";import{isInfinite as a,useAnimationRun as i,usePrefersReducedMotion as n}from"../../internal/animate.js";import{graphemesOf as s,textOf as o}from"../../internal/text.js";import{VISUALLY_HIDDEN as u}from"../../internal/visually-hidden.js";export const MPAnimateTyping=/*@__PURE__*/r.forwardRef(function({text:c,speed:m=24,hold:l=1400,erase:d=!1,eraseSpeed:f,caret:p=!0,caretChar:h="|",duration:y,delay:x=0,repeat:g=1,paused:T,trigger:j="mount",play:v,once:M=!0,threshold:N=.2,className:w,style:E,children:R,...S},A){const C=i({trigger:j,play:v,once:M,threshold:N,paused:T,infinite:a(g)}),P=n(),b=c??o(R),k=r.useMemo(()=>s(b),[b]),q=k.length,[z,B]=r.useState(0),D=r.useRef(0),F=y&&q>0?y/q:1e3/Math.max(m,1),G=1e3/Math.max(f??2*m,1);return r.useEffect(()=>{D.current=0},[q]),r.useEffect(()=>{if(P||0===q)return void B(q);if(!C.started)return D.current=0,void B(0);if(T)return;let e,t=!1,r=D.current,a=1,i=!1;const n="infinite"===g?1/0:Math.max(1,g);if(r>=q&&1===n)return;const s=()=>{if(!t){if(i)return r-=1,D.current=r,B(r),r<=0&&(i=!1,a+=1),void(e=setTimeout(s,i?G:F));if(r+=1,D.current=r,B(r),r<q)e=setTimeout(s,F);else if(!(a>=n)){if(d)return i=!0,void(e=setTimeout(s,l));a+=1,e=setTimeout(()=>{t||(r=0,D.current=0,B(0),e=setTimeout(s,F))},l)}}};return B(r),e=setTimeout(s,0===r?x:F),()=>{t=!0,clearTimeout(e)}},[C.started,T,P,q,F,G,x,l,d,g]),t("div",{ref:e=>{C.ref(e),"function"==typeof A?A(e):A&&(A.current=e)},className:w,style:E,"data-mp-animation":"typing","data-mp-state":C.state,...C.handlers,...S,children:[e("span",{className:u,children:b}),t("span",{"aria-hidden":"true",className:"whitespace-pre-wrap",children:[k.slice(0,z).join(""),p?e("span",{className:"mp-typing-caret",children:h}):null]})]})});
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { MPAnimateMode, MPAnimateProps } from '../../types.js';
4
- export interface MPAnimateZoomProps extends MPAnimateProps, React.ComponentPropsWithoutRef<'div'> {
3
+ import type { MPAnimateMode, MPAnimateProps, MPAnimateStaggerProps, MPAnimateTimelineProps } from '../../types.js';
4
+ export interface MPAnimateZoomProps extends MPAnimateProps, MPAnimateStaggerProps, MPAnimateTimelineProps, React.ComponentPropsWithoutRef<'div'> {
5
5
  /**
6
6
  * Whether the content comes forward or falls away. An exit is quicker than an
7
7
  * entrance — MD3's `short4` against `medium4` — unless `duration` says
@@ -1 +1,2 @@
1
- import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as a,useAnimateElement as t}from"../../internal/animate.js";export const MPAnimateZoom=/*@__PURE__*/e.forwardRef(function({duration:e,delay:o=0,easing:n,repeat:i=1,alternate:s,paused:l,trigger:m="mount",play:d,once:c=!0,threshold:f=.2,mode:p="in",from:u=.4,fade:y=!0,render:g,className:h,style:N,children:j,...b},w){const x=t({effect:"zoom",duration:e,delay:o,easing:n,repeat:i,alternate:s,mode:p,scale:u,opacity:y?0:1,trigger:m,play:d,once:c,threshold:f,paused:l,infinite:a(i)});return r({render:g,ref:[w,x.ref],props:{...b,className:[x.className,h].filter(Boolean).join(" "),style:{transformOrigin:"center",...x.style,...N},...x.props,children:j}})});
1
+ "use client";
2
+ import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,useAnimateElement as a}from"../../internal/animate.js";export const MPAnimateZoom=/*@__PURE__*/e.forwardRef(function({duration:e,delay:n=0,easing:o,repeat:i=1,alternate:s,paused:l,trigger:d="mount",play:m,once:c=!0,threshold:p=.2,stagger:f=0,durationStep:g,reverse:u,timeline:h,range:y,mode:N="in",from:j=.4,fade:v=!0,render:S,className:b,style:w,children:x,...z},A){const B=a({effect:"zoom",duration:e,delay:n,easing:o,repeat:i,alternate:s,mode:N,scale:j,opacity:v?0:1,trigger:d,play:m,once:c,threshold:p,paused:l,infinite:t(i),stagger:f,durationStep:g,reverse:u,timeline:h,range:y,children:x});return r({render:S,ref:[A,B.ref],props:{...z,className:[B.className,b].filter(Boolean).join(" "),style:{transformOrigin:"center",...B.style,...w},...B.props,children:B.children}})});
@@ -0,0 +1,156 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { MPColor, MPSize, MPVariant } from '../../types.js';
4
+ /**
5
+ * How the artwork is **framed**, which is the one question this component
6
+ * exists to answer.
7
+ *
8
+ * - `bare` — drawn as it was given, at the height `size` asks for and whatever
9
+ * width that comes to. No tile, no crop, no inset. The default, and the only
10
+ * one that is right for a logo drawn with its own background, its own margin,
11
+ * or the product's name set into it.
12
+ * - `app` — an app icon: a filled tile with the artwork inset in it and the
13
+ * corners cut off. What a mark drawn as a bare glyph needs before it can sit
14
+ * beside anything else.
15
+ * - `circle` — the same tile, round, for the products whose icon is a disc.
16
+ *
17
+ * There is no `square`. A tile with the corners left on is the one shape MD3
18
+ * does not draw, and an `app` icon at `xs` is already close enough to a square
19
+ * that a fourth value would be one nobody could see.
20
+ */
21
+ export type MPAppLogoShape = 'bare' | 'app' | 'circle';
22
+ export interface MPAppLogoProps extends Omit<React.ComponentPropsWithoutRef<'a'>, 'color' | 'href'> {
23
+ /**
24
+ * The artwork, as an image. Beaten by `children`, so a project that inlines
25
+ * its SVG and a project that links a PNG use the same component.
26
+ */
27
+ src?: string;
28
+ /** Candidate images at other resolutions, as on any `<img>`. */
29
+ srcSet?: string;
30
+ /**
31
+ * What the artwork says for a reader who cannot see it. Defaults to `name`,
32
+ * which is almost always right: a logo means the product.
33
+ */
34
+ alt?: string;
35
+ /**
36
+ * The product's name.
37
+ *
38
+ * One prop doing three jobs, as on `MPAvatar`: it names the artwork, its
39
+ * initials are what a tile falls back to, and it is drawn as the logotype
40
+ * when there is no artwork at all. That last one is what makes
41
+ * `<MPAppLogo name="Acme" />` — no file, no glyph, no markup — still a logo.
42
+ */
43
+ name?: string;
44
+ /** The initials on a tile, written out, for when the rule derived the wrong ones. */
45
+ initials?: string;
46
+ /**
47
+ * Draws the name beside the artwork, as the words half of a lockup.
48
+ *
49
+ * Off by default, because the common case is a file that already says the
50
+ * name. Turn it on for a bare mark — the icon in a header with the product
51
+ * beside it — and the name stops being read out twice: what is drawn *is* the
52
+ * accessible name from then on.
53
+ *
54
+ * Ignored when the name is already the whole logo, which is what a `bare`
55
+ * logo with no artwork is.
56
+ * @default false
57
+ */
58
+ showName?: boolean;
59
+ /** @default 'bare' */
60
+ shape?: MPAppLogoShape;
61
+ /**
62
+ * How much surface the tile paints. Nothing at all on `bare`, which draws no
63
+ * tile.
64
+ * @default 'filled'
65
+ */
66
+ variant?: MPVariant;
67
+ /**
68
+ * How tall the mark is — the control heights, so a logo and the button beside
69
+ * it in a header line up. On `bare` only the height is set and the width is
70
+ * whatever the artwork's proportions come to; on a tile both are, because a
71
+ * tile is square.
72
+ * @default 'md'
73
+ */
74
+ size?: MPSize;
75
+ /** @default 'primary' */
76
+ color?: MPColor;
77
+ /**
78
+ * Insets the artwork from the tile's edge, the way an app icon's glyph is
79
+ * held off its own corners. Turn it off for a mark drawn to fill the tile — a
80
+ * favicon, a photograph.
81
+ *
82
+ * No effect on `bare`, which has no tile to be inset from, and none on a tile
83
+ * showing initials, which are sized by their own type scale.
84
+ * @default true
85
+ */
86
+ padded?: boolean;
87
+ /**
88
+ * An exact height for the mark, overriding `size`. A number is pixels.
89
+ *
90
+ * The one escape hatch this component needs. A brand's artwork is drawn at a
91
+ * height somebody chose, and rounding it to the nearest rung of a ladder is
92
+ * how a logo ends up half a pixel off the type beside it.
93
+ */
94
+ height?: number | string;
95
+ /**
96
+ * Makes the whole lockup a link. A logo in a header is nearly always the way
97
+ * back to the front page, and a `<span>` inside an `<a>` the caller wrote is
98
+ * the same thing with one more element in it.
99
+ */
100
+ href?: string;
101
+ /** Anything else the `<img>` needs — `loading`, `decoding`, `crossOrigin`. */
102
+ imageProps?: Omit<React.ComponentPropsWithoutRef<'img'>, 'src' | 'srcSet' | 'alt'>;
103
+ /**
104
+ * Renders something other than a `<span>`, or than the `<a>` an `href` makes
105
+ * it. `render={<Link to="/" />}` for a router's own link, `render={<h1 />}`
106
+ * for the one page where the product's name is the page's heading.
107
+ */
108
+ render?: useRender.RenderProp;
109
+ /**
110
+ * The artwork, as markup. An inline `<svg>` is the usual one, and it is worth
111
+ * preferring to `src`: a mark that is part of the document takes the page's
112
+ * own colours, needs no second request, and cannot arrive late.
113
+ */
114
+ children?: React.ReactNode;
115
+ }
116
+ /**
117
+ * A product's mark, at a known size, that is never an empty box.
118
+ *
119
+ * ```tsx
120
+ * <MPAppLogo name="Acme" shape="app" href="/" showName />
121
+ * ```
122
+ *
123
+ * Four things can be the mark and exactly one of them is at a time: markup
124
+ * handed to `children`, an image at `src`, the initials of `name` on a tile, or
125
+ * — with no tile to put them on — the name itself, set as the logotype. The
126
+ * last of those is the point of the component: a product that has not drawn a
127
+ * logo yet still has one, and swapping it for the real file later is one prop.
128
+ *
129
+ * ## What it adds over an `<img>`
130
+ *
131
+ * The framing. A mark drawn as a bare glyph and a mark drawn with its own
132
+ * background need opposite treatment, and which of the two a given file is
133
+ * cannot be worked out from the file. So `shape` is a decision the caller makes
134
+ * once and everything else follows: `bare` keeps the artwork's own proportions
135
+ * and draws nothing behind it, `app` and `circle` inset it into a tile of the
136
+ * page's own colour.
137
+ *
138
+ * ## The name is in the document exactly once
139
+ *
140
+ * Which element carries it depends on what the mark turned out to be. A
141
+ * logotype *is* the name; an image can carry it as `alt`; a glyph and a pair of
142
+ * initials say nothing at all, so those are the cases a clipped copy is for.
143
+ * And whenever the words are drawn beside the mark, the mark becomes decoration
144
+ * rather than a second reading of the same thing — "AC" read out is two
145
+ * letters, not a product.
146
+ *
147
+ * ## What it does not carry
148
+ *
149
+ * No tagline, no version, no elevation. A logo with a line of text under it is
150
+ * a logo next to an `MPTypography`, and a second spelling for that would give
151
+ * the library two. Elevation is left out for a sharper reason: the prop moves
152
+ * tone as well as shadow everywhere else it appears, and a logo tile's tone is
153
+ * the accent — there is nothing for it to move to. An app icon is a sticker on
154
+ * the page rather than a thing hovering over it.
155
+ */
156
+ export declare const MPAppLogo: React.ForwardRefExoticComponent<MPAppLogoProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{useRender as r}from"@base-ui/react/use-render";import{accentSlots as a}from"../../internal/accent.js";import{initialsOf as o}from"../../internal/initials.js";import{cssLength as i}from"../../internal/length.js";import{CONTROL_GAP as l,CONTROL_HEIGHT as s,CONTROL_SQUARE as m,hasContent as c}from"../../internal/scale.js";import{VISUALLY_HIDDEN as d}from"../../internal/visually-hidden.js";import{useMPColor as p,useMPSize as u}from"../../internal/config.js";const f={xs:"text-[0.75rem]",sm:"text-[0.875rem]",md:"text-[1.0625rem]",lg:"text-[1.375rem]",xl:"text-[1.625rem]"},x={xs:"text-[0.75rem]",sm:"text-[0.875rem]",md:"text-[1.0625rem]",lg:"text-[1.3125rem]",xl:"text-[1.5625rem]"},g={xs:"rounded-mp-xs",sm:"rounded-mp-sm",md:"rounded-mp-md",lg:"rounded-mp-md",xl:"rounded-mp-md"},h={filled:"bg-(--_mp-accent) text-(--_mp-on-accent)",tonal:"bg-(--_mp-accent-container) text-(--_mp-on-accent-container)",elevated:"shadow-mp-1 bg-mp-surface-container-low text-(--_mp-accent)",outlined:"border-mp-outline border bg-transparent text-(--_mp-accent)",text:"text-mp-on-surface-variant bg-transparent"};export const MPAppLogo=/*@__PURE__*/n.forwardRef(function({src:v,srcSet:w,alt:b,name:j,initials:_,showName:y=!1,shape:N="bare",variant:k="filled",size:B,color:z,padded:P=!0,height:S,href:A,imageProps:F,render:L,className:M,style:R,children:$,...q},C){const D=u(B),E=p(z),G="bare"!==N,H=c($)?$:v?"image":null,I=G&&P,J=null===H&&!G,K=y&&!J&&c(j),O=b??j,Q=_??(j?o(j):""),T="image"===H&&!K&&c(O),U=J||T,V=!U&&!K&&c(O),W=i(S),X=W?{height:W,width:G?W:void 0}:null,Y=e("span",{"aria-hidden":!U||void 0,className:["mp-app-logo__mark flex shrink-0 items-center justify-center overflow-hidden","font-semibold tracking-tight whitespace-nowrap",W?"":s[D],G?[W?"":m[D],"circle"===N?"rounded-mp-full":g[D],x[D],h[k]].filter(Boolean).join(" "):["text-mp-on-surface w-auto",f[D]].join(" "),"[&_svg]:w-auto [&_svg]:shrink-0",I?"[&_svg]:h-[72%] [&_svg]:max-w-[72%]":"[&_svg]:h-full [&_svg]:max-w-full"].filter(Boolean).join(" "),style:X??void 0,children:"image"===H?e("img",{src:v,srcSet:w,alt:T?O??"":"",className:["w-auto object-contain",I?"h-[72%] max-w-[72%]":"h-full max-w-full"].join(" "),decoding:"async",...F}):H??(J?j:Q)});return r({render:L??e(A?"a":"span",{}),ref:C,props:{href:A,"data-mp-size":D,"data-mp-variant":k,className:["mp-app-logo inline-flex max-w-full min-w-0 items-center align-middle","text-mp-on-surface no-underline select-none",l[D],A?"rounded-mp-xs cursor-pointer":"",A?"outline-mp-secondary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-solid outline-none":"",M??""].filter(Boolean).join(" "),style:{...a(E),...R},children:t(n.Fragment,{children:[Y,K?e("span",{className:`mp-app-logo__name min-w-0 truncate font-semibold ${f[D]}`,children:j}):null,V?e("span",{className:d,children:O}):null]}),...q}})});
@@ -0,0 +1,2 @@
1
+ export { MPAppLogo } from './MPAppLogo.js';
2
+ export type { MPAppLogoProps, MPAppLogoShape } from './MPAppLogo.js';
@@ -0,0 +1 @@
1
+ export{MPAppLogo}from"./MPAppLogo.js";
@@ -0,0 +1,79 @@
1
+ import * as React from 'react';
2
+ import { type CartesianChartProps } from '../../internal/ChartFrame.js';
3
+ import type { MPChartCurve, MPChartValueLabels } from '../../types.js';
4
+ export interface MPAreaChartProps extends CartesianChartProps {
5
+ /**
6
+ * How the edge of the band gets from one point to the next.
7
+ * @default 'linear'
8
+ */
9
+ curve?: MPChartCurve;
10
+ /**
11
+ * Stacks the series on each other, so the top edge is the total and each
12
+ * band is one part's share of it.
13
+ *
14
+ * The value axis then measures totals, and the question the chart answers
15
+ * changes with it: unstacked areas are read against the axis one at a time,
16
+ * and a stack is read as a composition. Only the bottom band and the total
17
+ * are easy to read in a stack, which is the trade it makes.
18
+ * @default false
19
+ */
20
+ stacked?: boolean;
21
+ /**
22
+ * The dots on the joins. `auto` draws them on an unstacked chart with room
23
+ * for them and never on a stack, where a vertex belongs to a boundary rather
24
+ * than to a line.
25
+ * @default 'auto'
26
+ */
27
+ markers?: boolean | 'auto';
28
+ /**
29
+ * Which values are written onto the top edge.
30
+ * @default 'none'
31
+ */
32
+ valueLabels?: MPChartValueLabels;
33
+ }
34
+ /**
35
+ * A quantity over an ordered axis, with the room under it filled in.
36
+ *
37
+ * ```tsx
38
+ * <MPAreaChart
39
+ * categories={['Jan', 'Feb', 'Mar', 'Apr']}
40
+ * series={[{ name: 'Storage', data: [12, 19, 24, 31] }]}
41
+ * />
42
+ * ```
43
+ *
44
+ * It is a line chart that has been asked a second question. A line says where a
45
+ * number was; filling underneath says how much there is of it — so this is the
46
+ * shape for a volume, a total, a stock of something, and `stacked` is the shape
47
+ * for how that total is made up.
48
+ *
49
+ * ## The axis starts at zero, and on a line chart it does not
50
+ *
51
+ * That is the whole difference between the two, and it is not a preference. A
52
+ * filled area's **size** encodes the quantity, so the fill is only proportional
53
+ * to the value from a zero baseline; cropping the scale makes a band twice the
54
+ * height of another that is nowhere near twice its value.
55
+ *
56
+ * A line encodes **position** and claims nothing about proportion, which is why
57
+ * [MPLineChart](line-chart) is free to crop and this is not. If your data wants
58
+ * a cropped axis, it wants a line.
59
+ *
60
+ * ## Stacked bands are separated by surface, and the gap comes from above
61
+ *
62
+ * Two touching fills read as one shape, so a stack leaves two pixels of the
63
+ * page between neighbours. That gap is taken entirely from the band **above**
64
+ * the boundary: every band's top edge stays exactly where its cumulative total
65
+ * puts it, because that edge is the data and moving it to make room would be
66
+ * reporting a number the series does not have.
67
+ *
68
+ * Positives stack up and negatives stack down, so a category holding both is
69
+ * drawn as two runs from the baseline rather than as one band that has crossed
70
+ * itself.
71
+ *
72
+ * ## Only visible series are in the stack
73
+ *
74
+ * Turning a series off with the legend re-stacks the survivors rather than
75
+ * leaving a hole where it was. The colours do not move with them: a slot comes
76
+ * from a series' place in the `series` array, so what changes is the height of
77
+ * the stack and never which band is which.
78
+ */
79
+ export declare function MPAreaChart({ curve, stacked, markers, valueLabels, ...frame }: MPAreaChartProps): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{CartesianFrame as r}from"../../internal/ChartFrame.js";import{LINE_WIDTH as l,MARKER_RADIUS as n,MARK_GAP as a,bandPath as o,linePath as s}from"../../internal/chart.js";export function MPAreaChart({curve:u="linear",stacked:i=!1,markers:c="auto",valueLabels:h="none",...p}){return e(r,{...p,inset:!0,stacked:i,includeZero:!0,headroom:"none"===h?0:14,children:({plot:r,values:p,visible:m,colors:d,point:f,zeroPx:x,size:v,hovered:k,activeIndex:y,format:b})=>{const j=l[v],g=n[v],M=p.reduce((e,t)=>Math.max(e,t.length),0),_=M>1?r.width/(M-1):r.width,w="auto"===c?!i&&_>=6*g:c,z=p.map(()=>({top:[],base:[]}));for(let e=0;e<M;e+=1){let t=0,r=0;p.forEach((l,n)=>{const o=l[e]?.value??null;if(!m[n]||null===o)return z[n].top.push(null),void z[n].base.push(null);if(!i){const t=f(e,o);return z[n].top.push(t),void z[n].base.push({x:t.x,y:x})}const s=o>=0?t:r,u=s+o;o>=0?t=u:r=u;const c=f(e,u),h=f(e,s);z[n].top.push(c),z[n].base.push({x:h.x,y:0===s?h.y:h.y-Math.sign(o||1)*a})})}return e("g",{className:"mp-area-chart__marks",children:p.map((l,n)=>{if(!m[n])return null;const{top:a,base:c}=z[n],p=d[n];return t("g",{opacity:null!==k&&k!==n?.25:1,children:[e("path",{d:o(a,c,u),fill:p,fillOpacity:i?.85:.18,stroke:"none"}),e("path",{d:s(a,u),fill:"none",stroke:p,strokeWidth:j,strokeLinecap:"round",strokeLinejoin:"round"}),a.map((t,r)=>{if(!t)return null;const l=y===r;return w||l?e("circle",{cx:t.x,cy:t.y,r:l?g+1:g,fill:p,stroke:"var(--_mp-color-surface)",strokeWidth:2},r):null}),"none"===h?null:l.map((t,n)=>{const o=a[n];if(!o||null===t.value)return null;const s=l.filter(e=>null!==e.value),u=s.map(e=>e.value);if(!("all"===h||"last"===h&&t===s[s.length-1]||"extremes"===h&&(t.value===Math.min(...u)||t.value===Math.max(...u))))return null;const i=o.x>r.left+r.width-24?"end":o.x<r.left+24?"start":"middle";return e("text",{x:o.x,y:o.y-g-5,textAnchor:i,fill:"var(--_mp-color-on-surface)",fontSize:"xs"===v||"sm"===v?10:11,children:t.label??b(t.value)},n)})]},n)})})}})}
@@ -0,0 +1,2 @@
1
+ export { MPAreaChart } from './MPAreaChart.js';
2
+ export type { MPAreaChartProps } from './MPAreaChart.js';
@@ -0,0 +1 @@
1
+ export{MPAreaChart}from"./MPAreaChart.js";
@@ -1 +1,2 @@
1
- import*as e from"react";import{useRender as o}from"@base-ui/react/use-render";const i={xs:"rounded-mp-xs",sm:"rounded-mp-sm",md:"rounded-mp-md",lg:"rounded-mp-md",xl:"rounded-mp-xl"},t=/*@__PURE__*/["[&>img]:size-full","[&>video]:size-full","[&>canvas]:size-full","[&>svg]:size-full","[&>iframe]:size-full","[&>picture]:size-full","[&>picture>img]:size-full"].join(" "),r={cover:"[&>img]:object-cover [&>video]:object-cover [&>picture>img]:object-cover",contain:"[&>img]:object-contain [&>video]:object-contain [&>picture>img]:object-contain",fill:"[&>img]:object-fill [&>video]:object-fill [&>picture>img]:object-fill",none:"[&>img]:object-none [&>video]:object-none [&>picture>img]:object-none"};export const MPAspectRatio=/*@__PURE__*/e.forwardRef(function({ratio:e=1,fit:c="cover",rounded:l=!1,size:n="md",render:s,className:d,style:m,children:a,...u},f){const p=["mp-aspect-ratio relative block w-full overflow-hidden",t,r[c],l?i[n]:"",d??""].filter(Boolean).join(" ");return o({render:s,ref:f,props:{"data-mp-size":n,className:p,style:{aspectRatio:e,...m},children:a,...u}})});
1
+ "use client";
2
+ import*as e from"react";import{useRender as o}from"@base-ui/react/use-render";import{useMPSize as i}from"../../internal/config.js";const r={xs:"rounded-mp-xs",sm:"rounded-mp-sm",md:"rounded-mp-md",lg:"rounded-mp-md",xl:"rounded-mp-xl"},t=/*@__PURE__*/["[&>img]:size-full","[&>video]:size-full","[&>canvas]:size-full","[&>svg]:size-full","[&>iframe]:size-full","[&>picture]:size-full","[&>picture>img]:size-full"].join(" "),c={cover:"[&>img]:object-cover [&>video]:object-cover [&>picture>img]:object-cover",contain:"[&>img]:object-contain [&>video]:object-contain [&>picture>img]:object-contain",fill:"[&>img]:object-fill [&>video]:object-fill [&>picture>img]:object-fill",none:"[&>img]:object-none [&>video]:object-none [&>picture>img]:object-none"};export const MPAspectRatio=/*@__PURE__*/e.forwardRef(function({ratio:e=1,fit:n="cover",rounded:l=!1,size:s,render:m,className:d,style:a,children:f,...u},p){const j=i(s),b=["mp-aspect-ratio relative block w-full overflow-hidden",t,c[n],l?r[j]:"",d??""].filter(Boolean).join(" ");return o({render:m,ref:p,props:{"data-mp-size":j,className:b,style:{aspectRatio:e,...a},children:f,...u}})});
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { MPColor, MPSize, MPVariant } from '../../types.js';
2
+ import type { MPColor, MPSize, MPTransition, MPVariant } from '../../types.js';
3
3
  /** What Base UI reports about the picture as it loads. */
4
4
  export type MPAvatarLoadingStatus = 'idle' | 'loading' | 'loaded' | 'error';
5
5
  /**
@@ -86,6 +86,15 @@ export interface MPAvatarProps extends Omit<React.ComponentPropsWithoutRef<'span
86
86
  * it.
87
87
  */
88
88
  children?: React.ReactNode;
89
+ /**
90
+ * An entrance, run once as it mounts.
91
+ *
92
+ * `transition="fade"` is the whole of what most callers want; the object form
93
+ * takes a duration, an edge to come from, or a scale to start at. Anything
94
+ * that has to run again — on scroll, on hover, under your own control — is an
95
+ * [MPAnimateFade](../motion/animate-fade) and its siblings.
96
+ */
97
+ transition?: MPTransition;
89
98
  }
90
99
  /**
91
100
  * A picture of a person or a thing, at a known size, that is never an empty box.