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,2 @@
1
+ "use client";
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as r from"react";import{MPIcon as n}from"../icon/MPIcon.js";import{ChevronDownIcon as a}from"../../constants/icons.js";import{containerSurface as o}from"../../internal/elevation.js";import{MPStateLayer as i}from"../../internal/StateLayer.js";import{CONTROL_GAP as s,CONTROL_ICON as l,PROSE_TEXT as c,hasContent as u}from"../../internal/scale.js";import{useMPDensity as d,useMPSize as m}from"../../internal/config.js";const p=/*@__PURE__*/r.createContext({size:"md",density:0,disabled:!1,expandedKeys:new Set,selectedKeys:new Set,activeKey:null,toggle:()=>{},select:()=>{},activate:()=>{},register:()=>()=>{}}),f=/*@__PURE__*/r.createContext(!1),g={xs:28,sm:32,md:40,lg:48,xl:56},x={xs:14,sm:16,md:20,lg:24,xl:28},v={xs:"px-1.5",sm:"px-2",md:"px-2.5",lg:"px-3",xl:"px-3.5"},h="rounded-mp-full",b={none:"",simple:"mp-tree--simple",folder:"mp-tree--folder"};function y(e,t){return Math.max(24,g[e]+4*t)}function w(e){return Array.from(e.querySelectorAll('[role="treeitem"]')).filter(e=>null===e.closest("[data-mp-closing]"))}const k=e=>String(e);export const MPTreeView=/*@__PURE__*/r.forwardRef(function({variant:t="outlined",elevation:n,size:a,density:i,lines:s="simple",expanded:l,defaultExpanded:c,onExpandedChange:u,selected:f,defaultSelected:g,onSelectedChange:v,multiple:h=!1,disabled:C=!1,label:j,className:N,style:S,children:_,onKeyDown:A,...K},D){const P=m(a),E=d(i),[R,M]=r.useState(c??[]),[I,z]=r.useState(g??[]),[B,F]=r.useState(null),T=l??R,V=f??I,L=r.useRef(null),$=r.useCallback(e=>{L.current=e,"function"==typeof D?D(e):D&&(D.current=e)},[D]),q=r.useCallback(e=>{const t=k(e),r=l??R,n=r.some(e=>k(e)===t)?r.filter(e=>k(e)!==t):[...r,e];void 0===l&&M(n),u?.(n)},[l,R,u]),H=r.useCallback(e=>{const t=k(e),r=f??I,n=r.some(e=>k(e)===t),a=h?n?r.filter(e=>k(e)!==t):[...r,e]:[e];void 0===f&&z(a),v?.(a)},[h,f,I,v]),O=r.useRef(new Map),U=r.useCallback((e,t)=>(O.current.set(e,t),()=>{O.current.delete(e)}),[]),G=r.useMemo(()=>T.map(k).join("\0"),[T]),J=r.useMemo(()=>V.map(k).join("\0"),[V]),Q=r.useMemo(()=>({size:P,density:E,disabled:C,expandedKeys:new Set(T.map(k)),selectedKeys:new Set(V.map(k)),activeKey:B,toggle:q,select:H,activate:F,register:U}),[P,E,C,G,J,B,q,H,U]);return r.useEffect(()=>{if(null!==B&&O.current.has(B))return;const e=L.current;if(!e)return;const t=w(e);t.length>0&&F(t[0].dataset.mpValue??null)}),e(p.Provider,{value:Q,children:e("ul",{ref:$,role:"tree","aria-label":j,"aria-multiselectable":h||void 0,"data-mp-size":P,"data-mp-variant":t,className:["mp-tree rounded-mp-md m-0 box-border flex list-none flex-col p-1",o(t,n),"text-mp-on-surface",b[s],N??""].filter(Boolean).join(" "),style:{"--_mp-tree-indent":`${x[P]}px`,"--_mp-tree-row":`${y(P,E)}px`,...S},onKeyDown:function(e){if(A?.(e),e.defaultPrevented)return;const t=L.current,r=e.target?.closest?.('[role="treeitem"]');if(!t||!r||!t.contains(r))return;const n=w(t),a=n.indexOf(r);if(-1===a)return;const o=t=>{t&&(e.preventDefault(),F(t.dataset.mpValue??null),t.focus())},i=e=>{const t=e.dataset.mpValue;t&&O.current.get(t)?.toggle()},s="rtl"===getComputedStyle(t).direction,l=s?"ArrowLeft":"ArrowRight",c=s?"ArrowRight":"ArrowLeft",u=r.getAttribute("aria-expanded");switch(e.key){case"ArrowDown":o(n[a+1]);break;case"ArrowUp":o(n[a-1]);break;case"Home":o(n[0]);break;case"End":o(n[n.length-1]);break;case l:"false"===u?(e.preventDefault(),i(r)):"true"===u&&o(n[a+1]);break;case c:"true"===u?(e.preventDefault(),i(r)):o(r.parentElement?.closest('[role="treeitem"]'));break;case"Enter":case" ":e.preventDefault(),r.click()}},...K,children:_})})});export const MPTreeItem=/*@__PURE__*/r.forwardRef(function({value:o,label:d,startIcon:m,endIcon:g,action:x,href:b,expandable:y,disabled:w=!1,className:C,children:j,onClick:N,...S},_){const{size:A,disabled:K,expandedKeys:D,selectedKeys:P,activeKey:E,toggle:R,select:M,activate:I,register:z}=r.useContext(p),B=r.useId(),F=o??B,T=k(F),V=r.useRef(null),L=r.useCallback(e=>{V.current=e,"function"==typeof _?_(e):_&&(_.current=e)},[_]),$=r.Children.toArray(j),q=y??$.length>0,H=q&&D.has(T),O=P.has(T),U=w||K,G=r.useRef({toggle:()=>{}});G.current.toggle=()=>{!U&&q&&R(F)};const J=r.useContext(f);r.useEffect(()=>J?void 0:z(T,G.current),[J,T,z]);const[Q,W]=r.useState(H),[X,Y]=r.useState(H),Z=r.useRef(null);r.useEffect(()=>{if(H){W(!0);const e=requestAnimationFrame(()=>Y(!0));return()=>cancelAnimationFrame(e)}Y(!1);const e=Z.current;(null===e||getComputedStyle(e).transitionDuration.split(",").every(e=>0===Number.parseFloat(e)))&&W(!1)},[H]);const ee=["mp-tree__row group relative flex min-w-0 flex-1 items-center overflow-hidden text-start","h-(--_mp-tree-row) no-underline",v[A],h,s[A],c[A],"transition-[background-color,color] duration-(--mp-sys-motion-duration-short4)","ease-mp-standard motion-reduce:transition-none","group-focus-visible/tree-item:outline-mp-secondary","group-focus-visible/tree-item:outline-2 group-focus-visible/tree-item:-outline-offset-2","group-focus-visible/tree-item:outline-solid",U?"text-mp-on-surface/38 cursor-default":O?"bg-mp-secondary-container text-mp-on-secondary-container cursor-pointer":"text-mp-on-surface cursor-pointer"].filter(Boolean).join(" "),te=t(r.Fragment,{children:[U?null:e(i,{}),e("span",{"aria-hidden":"true",onClick:e=>{!U&&q&&(e.stopPropagation(),e.preventDefault(),V.current?.focus(),I(T),R(F))},className:["mp-tree__arrow relative flex h-[1lh] w-[1.15em] shrink-0 items-center justify-center","transition-[rotate] duration-(--mp-sys-motion-duration-short4)","ease-mp-standard motion-reduce:transition-none",q?"text-mp-on-surface-variant":"",H?"rotate-0":"-rotate-90 rtl:rotate-90"].filter(Boolean).join(" "),children:q?e(n,{icon:a,size:l[A]-6}):null}),u(m)?e("span",{className:"text-mp-on-surface-variant relative flex h-[1lh] shrink-0 items-center",children:m}):null,e("span",{className:"relative min-w-0 flex-1 truncate",children:d}),u(g)?e("span",{className:"text-mp-on-surface-variant relative flex h-[1lh] shrink-0 items-center",children:g}):null]});return t("li",{ref:L,role:"treeitem","aria-expanded":q?H:void 0,"aria-selected":!!O||void 0,"aria-disabled":U||void 0,"data-mp-value":T,tabIndex:E===T?0:-1,className:["mp-tree__item group/tree-item relative block",C??""].filter(Boolean).join(" "),style:{outline:"none"},onClick:function(e){e.stopPropagation(),U?e.preventDefault():(V.current?.focus(),I(T),N?.(e),e.defaultPrevented||(q&&R(F),M(F)))},...S,children:[t("div",{className:"flex w-full items-center",children:[b&&!U?e("a",{href:b,tabIndex:-1,className:ee,"aria-current":O?"page":void 0,children:te}):e("div",{className:ee,children:te}),u(x)?e("span",{className:`mp-tree__action flex shrink-0 items-center ${v[A]}`,onClick:e=>e.stopPropagation(),children:x}):null]}),q&&Q&&$.length>0?e("div",{ref:Z,"data-mp-closing":H?void 0:"",className:["mp-tree__branch grid","transition-[grid-template-rows] duration-(--mp-sys-motion-duration-short4)","ease-mp-standard motion-reduce:transition-none",X?"grid-rows-[1fr]":"pointer-events-none grid-rows-[0fr]"].join(" "),onTransitionEnd:e=>{e.target!==e.currentTarget||"grid-template-rows"!==e.propertyName||H||W(!1)},children:e("ul",{role:"group",className:"m-0 min-h-0 list-none overflow-hidden ps-(--_mp-tree-indent)",children:e(f.Provider,{value:J||!H,children:j})})}):null]})});
@@ -0,0 +1,2 @@
1
+ export { MPTreeItem, MPTreeView } from './MPTreeView.js';
2
+ export type { MPTreeItemProps, MPTreeViewLines, MPTreeViewProps, MPTreeViewValue } from './MPTreeView.js';
@@ -0,0 +1 @@
1
+ export{MPTreeItem,MPTreeView}from"./MPTreeView.js";
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { MPColor } from '../../types.js';
3
+ import type { MPColor, MPTransition } from '../../types.js';
4
4
  /**
5
5
  * What a piece of text *is*, which decides both its type scale and the element
6
6
  * it renders as.
@@ -77,6 +77,15 @@ export interface MPTypographyProps extends Omit<React.ComponentPropsWithoutRef<'
77
77
  */
78
78
  render?: useRender.RenderProp;
79
79
  children?: React.ReactNode;
80
+ /**
81
+ * An entrance, run once as it mounts.
82
+ *
83
+ * `transition="fade"` is the whole of what most callers want; the object form
84
+ * takes a duration, an edge to come from, or a scale to start at. Anything
85
+ * that has to run again — on scroll, on hover, under your own control — is an
86
+ * [MPAnimateFade](../motion/animate-fade) and its siblings.
87
+ */
88
+ transition?: MPTransition;
80
89
  }
81
90
  /**
82
91
  * Text at one of Material's type roles.
@@ -1 +1,2 @@
1
- import*as p from"react";import{useRender as e}from"@base-ui/react/use-render";import{accentSlots as t}from"../../internal/accent.js";const r={h1:"[&.mp-typography]:text-mp-display-small",h2:"[&.mp-typography]:text-mp-headline-large",h3:"[&.mp-typography]:text-mp-headline-medium",h4:"[&.mp-typography]:text-mp-headline-small",h5:"[&.mp-typography]:text-mp-title-large",h6:"[&.mp-typography]:text-mp-title-medium",lead:"[&.mp-typography]:text-mp-title-large",body:"[&.mp-typography]:text-mp-body-large",caption:"[&.mp-typography]:text-mp-body-small",overline:"[&.mp-typography]:text-mp-label-small [&.mp-typography]:tracking-[0.08em] uppercase"},a={h1:"regular",h2:"regular",h3:"regular",h4:"regular",h5:"regular",h6:"medium",lead:"regular",body:"regular",caption:"regular",overline:"medium"},m={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",lead:"p",body:"p",caption:"span",overline:"span"},y={h1:"[&.mp-typography]:mb-4",h2:"[&.mp-typography]:mb-3.5",h3:"[&.mp-typography]:mb-3",h4:"[&.mp-typography]:mb-2.5",h5:"[&.mp-typography]:mb-2",h6:"[&.mp-typography]:mb-2",lead:"[&.mp-typography]:mb-4",body:"[&.mp-typography]:mb-3",caption:"[&.mp-typography]:mb-2",overline:"[&.mp-typography]:mb-2"},o="[&.mp-typography]:mt-0 [&.mp-typography]:ms-0 [&.mp-typography]:me-0",l={regular:"[&.mp-typography]:font-normal",medium:"[&.mp-typography]:font-medium",semibold:"[&.mp-typography]:font-semibold",bold:"[&.mp-typography]:font-bold"},h={start:"text-start",center:"text-center",end:"text-end",justify:"text-justify"},n={1:"truncate",2:"line-clamp-2",3:"line-clamp-3",4:"line-clamp-4",5:"line-clamp-5",6:"line-clamp-6"};export const MPTypography=/*@__PURE__*/p.forwardRef(function({level:g="body",color:i,weight:d,align:c,lines:s,gutter:b=!1,render:u,className:x,style:f,children:v,...j},w){const N=["mp-typography",r[g],l[d??a[g]],o,b?y[g]:"[&.mp-typography]:mb-0",c?h[c]:"",s?n[s]??"line-clamp-6":"",i?"[&.mp-typography]:text-(--_mp-accent)":"",x??""].filter(Boolean).join(" ");return e({render:u??p.createElement(m[g]),ref:w,props:{className:N,style:i?{...t(i),...f}:f,children:v,...j}})});
1
+ "use client";
2
+ import*as p from"react";import{useRender as t}from"@base-ui/react/use-render";import{accentSlots as e}from"../../internal/accent.js";import{transitionProps as r}from"../../internal/transition.js";const a={h1:"[&.mp-typography]:text-mp-display-small",h2:"[&.mp-typography]:text-mp-headline-large",h3:"[&.mp-typography]:text-mp-headline-medium",h4:"[&.mp-typography]:text-mp-headline-small",h5:"[&.mp-typography]:text-mp-title-large",h6:"[&.mp-typography]:text-mp-title-medium",lead:"[&.mp-typography]:text-mp-title-large",body:"[&.mp-typography]:text-mp-body-large",caption:"[&.mp-typography]:text-mp-body-small",overline:"[&.mp-typography]:text-mp-label-small [&.mp-typography]:tracking-[0.08em] uppercase"},m={h1:"regular",h2:"regular",h3:"regular",h4:"regular",h5:"regular",h6:"medium",lead:"regular",body:"regular",caption:"regular",overline:"medium"},o={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",lead:"p",body:"p",caption:"span",overline:"span"},y={h1:"[&.mp-typography]:mb-4",h2:"[&.mp-typography]:mb-3.5",h3:"[&.mp-typography]:mb-3",h4:"[&.mp-typography]:mb-2.5",h5:"[&.mp-typography]:mb-2",h6:"[&.mp-typography]:mb-2",lead:"[&.mp-typography]:mb-4",body:"[&.mp-typography]:mb-3",caption:"[&.mp-typography]:mb-2",overline:"[&.mp-typography]:mb-2"},l="[&.mp-typography]:mt-0 [&.mp-typography]:ms-0 [&.mp-typography]:me-0",h={regular:"[&.mp-typography]:font-normal",medium:"[&.mp-typography]:font-medium",semibold:"[&.mp-typography]:font-semibold",bold:"[&.mp-typography]:font-bold"},n={start:"text-start",center:"text-center",end:"text-end",justify:"text-justify"},i={1:"truncate",2:"line-clamp-2",3:"line-clamp-3",4:"line-clamp-4",5:"line-clamp-5",6:"line-clamp-6"};export const MPTypography=/*@__PURE__*/p.forwardRef(function({level:g="body",color:s,weight:c,align:d,lines:b,gutter:u=!1,render:x,transition:f,className:j,style:v,children:N,...$},w){const k=r(f),B=["mp-typography",a[g],h[c??m[g]],l,u?y[g]:"[&.mp-typography]:mb-0",d?n[d]:"",b?i[b]??"line-clamp-6":"",s?"[&.mp-typography]:text-(--_mp-accent)":"",j??""].filter(Boolean).join(" ");return t({render:x??p.createElement(o[g]),ref:w,props:{className:`${B}${k.className?` ${k.className}`:""}`,style:s?{...e(s),...k.style,...v}:{...k.style,...v},children:N,...$}})});
@@ -1,67 +1,69 @@
1
1
  /** The glyph a password field shows while the password is legible. */
2
- export declare const VisibilityIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
2
+ export declare const VisibilityIcon: import("lucide-react").LucideIcon;
3
3
  /** The glyph a password field shows while the password is masked. */
4
- export declare const VisibilityOffIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
4
+ export declare const VisibilityOffIcon: import("lucide-react").LucideIcon;
5
5
  /** Dismiss: a chip, a dialog, an alert. */
6
- export declare const CloseIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
6
+ export declare const CloseIcon: import("lucide-react").LucideIcon;
7
7
  /** A ticked option, a completed step. */
8
- export declare const CheckIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
8
+ export declare const CheckIcon: import("lucide-react").LucideIcon;
9
9
  /** Disclosure, pointing down. */
10
- export declare const ChevronDownIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
10
+ export declare const ChevronDownIcon: import("lucide-react").LucideIcon;
11
11
  /** Disclosure, pointing up. */
12
- export declare const ChevronUpIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
12
+ export declare const ChevronUpIcon: import("lucide-react").LucideIcon;
13
13
  /** Previous, in a pager or a carousel. */
14
- export declare const ChevronLeftIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
14
+ export declare const ChevronLeftIcon: import("lucide-react").LucideIcon;
15
15
  /** Next, in a pager or a carousel. */
16
- export declare const ChevronRightIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
16
+ export declare const ChevronRightIcon: import("lucide-react").LucideIcon;
17
17
  /** First, in a pager: the stepper that jumps to an end rather than by one. */
18
- export declare const ChevronsLeftIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
18
+ export declare const ChevronsLeftIcon: import("lucide-react").LucideIcon;
19
19
  /** And last. */
20
- export declare const ChevronsRightIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
20
+ export declare const ChevronsRightIcon: import("lucide-react").LucideIcon;
21
21
  /** Search, for a field's leading adornment. */
22
- export declare const SearchIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
22
+ export declare const SearchIcon: import("lucide-react").LucideIcon;
23
23
  /** Sorted ascending: the arrow a table's sorted column carries. */
24
- export declare const ArrowUpIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
24
+ export declare const ArrowUpIcon: import("lucide-react").LucideIcon;
25
25
  /** Sorted descending. */
26
- export declare const ArrowDownIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
26
+ export declare const ArrowDownIcon: import("lucide-react").LucideIcon;
27
27
  /** And then: the mark a breadcrumb can put between two steps. */
28
- export declare const ArrowRightIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
28
+ export declare const ArrowRightIcon: import("lucide-react").LucideIcon;
29
29
  /** The trail a breadcrumb hides behind, and any other "there is more here". */
30
- export declare const MoreIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
30
+ export declare const MoreIcon: import("lucide-react").LucideIcon;
31
31
  /** A link that goes somewhere on this site. */
32
- export declare const LinkIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
32
+ export declare const LinkIcon: import("lucide-react").LucideIcon;
33
33
  /** A link that takes over the window. */
34
- export declare const ExternalLinkIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
34
+ export declare const ExternalLinkIcon: import("lucide-react").LucideIcon;
35
35
  /** Copy to clipboard. */
36
- export declare const CopyIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
36
+ export declare const CopyIcon: import("lucide-react").LucideIcon;
37
+ /** Source as it was written — `MPCodeBlock`'s toggle out of the colouring. */
38
+ export declare const CodeIcon: import("lucide-react").LucideIcon;
37
39
  /** A picture that could not be fetched — `MPImage`'s own fallback. */
38
- export declare const BrokenImageIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
40
+ export declare const BrokenImageIcon: import("lucide-react").LucideIcon;
39
41
  /** Severity: something worth knowing. */
40
- export declare const InfoIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
42
+ export declare const InfoIcon: import("lucide-react").LucideIcon;
41
43
  /** Severity: it worked. */
42
- export declare const SuccessIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
44
+ export declare const SuccessIcon: import("lucide-react").LucideIcon;
43
45
  /** Severity: proceed carefully. */
44
- export declare const WarningIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
46
+ export declare const WarningIcon: import("lucide-react").LucideIcon;
45
47
  /** Severity: it did not work. */
46
- export declare const ErrorIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
48
+ export declare const ErrorIcon: import("lucide-react").LucideIcon;
47
49
  /** One step up: a number field's increment. */
48
- export declare const AddIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
50
+ export declare const AddIcon: import("lucide-react").LucideIcon;
49
51
  /** One step down: a number field's decrement, and a half-ticked checkbox. */
50
- export declare const RemoveIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
52
+ export declare const RemoveIcon: import("lucide-react").LucideIcon;
51
53
  /** Send a file the other way. A file picker's dropzone. */
52
- export declare const UploadIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
54
+ export declare const UploadIcon: import("lucide-react").LucideIcon;
53
55
  /** A day on a calendar: what a date picker's trigger wears. */
54
- export declare const CalendarIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
56
+ export declare const CalendarIcon: import("lucide-react").LucideIcon;
55
57
  /** A time of day: what a time picker's trigger wears. */
56
- export declare const ClockIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
58
+ export declare const ClockIcon: import("lucide-react").LucideIcon;
57
59
  /**
58
60
  * A score. Drawn as an outline, and filled by whatever is scoring with it —
59
61
  * lucide draws it `fill="none"`, and `MPRating` overlays a copy in `fill-current`
60
62
  * rather than shipping a second glyph.
61
63
  */
62
- export declare const StarIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
64
+ export declare const StarIcon: import("lucide-react").LucideIcon;
63
65
  /** Work in progress, spun by whatever is waiting on it. */
64
- export declare const SpinnerIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
66
+ export declare const SpinnerIcon: import("lucide-react").LucideIcon;
65
67
  /**
66
68
  * Three lines: the navigation a window has become too narrow to show.
67
69
  *
@@ -71,4 +73,4 @@ export declare const SpinnerIcon: import("react").ForwardRefExoticComponent<Omit
71
73
  * argument that ever justifies a symbol — and `MPSidebarTrigger` gives it a
72
74
  * name for the readers it still says nothing to.
73
75
  */
74
- export declare const MenuIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
76
+ export declare const MenuIcon: import("lucide-react").LucideIcon;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{ArrowDown as o,ArrowRight as n,ArrowUp as t,CalendarDays as c,Check as r,ChevronDown as e,ChevronLeft as s,ChevronRight as p,ChevronsLeft as I,ChevronsRight as x,ChevronUp as i,CircleAlert as h,CircleCheck as C,Clock as a,Copy as l,Ellipsis as v,ExternalLink as f,Eye as d,ImageOff as g,EyeOff as k,Info as w,Link as m,LoaderCircle as A,Menu as L,Minus as R,Plus as S,Search as u,Star as y,TriangleAlert as U,Upload as b,X as D}from"lucide-react";export const VisibilityIcon=d;export const VisibilityOffIcon=k;export const CloseIcon=D;export const CheckIcon=r;export const ChevronDownIcon=e;export const ChevronUpIcon=i;export const ChevronLeftIcon=s;export const ChevronRightIcon=p;export const ChevronsLeftIcon=I;export const ChevronsRightIcon=x;export const SearchIcon=u;export const ArrowUpIcon=t;export const ArrowDownIcon=o;export const ArrowRightIcon=n;export const MoreIcon=v;export const LinkIcon=m;export const ExternalLinkIcon=f;export const CopyIcon=l;export const BrokenImageIcon=g;export const InfoIcon=w;export const SuccessIcon=C;export const WarningIcon=U;export const ErrorIcon=h;export const AddIcon=S;export const RemoveIcon=R;export const UploadIcon=b;export const CalendarIcon=c;export const ClockIcon=a;export const StarIcon=y;export const SpinnerIcon=A;export const MenuIcon=L;
2
+ import{ArrowDown as o,ArrowRight as n,ArrowUp as t,CalendarDays as c,Check as r,ChevronDown as e,ChevronLeft as s,ChevronRight as p,ChevronsLeft as I,ChevronsRight as x,ChevronUp as i,CircleAlert as C,CircleCheck as h,Clock as a,Code as l,Copy as v,Ellipsis as d,ExternalLink as f,Eye as g,ImageOff as k,EyeOff as w,Info as m,Link as A,LoaderCircle as L,Menu as R,Minus as S,Plus as u,Search as y,Star as U,TriangleAlert as b,Upload as D,X as E}from"lucide-react";export const VisibilityIcon=g;export const VisibilityOffIcon=w;export const CloseIcon=E;export const CheckIcon=r;export const ChevronDownIcon=e;export const ChevronUpIcon=i;export const ChevronLeftIcon=s;export const ChevronRightIcon=p;export const ChevronsLeftIcon=I;export const ChevronsRightIcon=x;export const SearchIcon=y;export const ArrowUpIcon=t;export const ArrowDownIcon=o;export const ArrowRightIcon=n;export const MoreIcon=d;export const LinkIcon=A;export const ExternalLinkIcon=f;export const CopyIcon=v;export const CodeIcon=l;export const BrokenImageIcon=k;export const InfoIcon=m;export const SuccessIcon=h;export const WarningIcon=b;export const ErrorIcon=C;export const AddIcon=u;export const RemoveIcon=S;export const UploadIcon=D;export const CalendarIcon=c;export const ClockIcon=a;export const StarIcon=U;export const SpinnerIcon=L;export const MenuIcon=R;
@@ -41,37 +41,38 @@ export * from './glyphs.js';
41
41
  * file. Reach for the named exports when only one or two are needed.
42
42
  */
43
43
  export declare const ICONS: {
44
- readonly visibility: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
45
- readonly 'visibility-off': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
46
- readonly close: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
47
- readonly check: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
48
- readonly 'chevron-down': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
49
- readonly 'chevron-up': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
50
- readonly 'chevron-left': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
51
- readonly 'chevron-right': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
52
- readonly 'chevrons-left': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
53
- readonly 'chevrons-right': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
54
- readonly search: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
55
- readonly 'arrow-up': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
56
- readonly 'arrow-down': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
57
- readonly 'arrow-right': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
58
- readonly more: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
59
- readonly menu: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
60
- readonly link: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
61
- readonly 'external-link': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
62
- readonly copy: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
63
- readonly 'broken-image': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
64
- readonly info: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
65
- readonly success: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
66
- readonly warning: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
67
- readonly error: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
68
- readonly add: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
69
- readonly remove: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
70
- readonly upload: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
71
- readonly calendar: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
72
- readonly clock: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
73
- readonly star: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
74
- readonly spinner: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
44
+ readonly visibility: import("lucide-react").LucideIcon;
45
+ readonly 'visibility-off': import("lucide-react").LucideIcon;
46
+ readonly close: import("lucide-react").LucideIcon;
47
+ readonly check: import("lucide-react").LucideIcon;
48
+ readonly 'chevron-down': import("lucide-react").LucideIcon;
49
+ readonly 'chevron-up': import("lucide-react").LucideIcon;
50
+ readonly 'chevron-left': import("lucide-react").LucideIcon;
51
+ readonly 'chevron-right': import("lucide-react").LucideIcon;
52
+ readonly 'chevrons-left': import("lucide-react").LucideIcon;
53
+ readonly 'chevrons-right': import("lucide-react").LucideIcon;
54
+ readonly search: import("lucide-react").LucideIcon;
55
+ readonly 'arrow-up': import("lucide-react").LucideIcon;
56
+ readonly 'arrow-down': import("lucide-react").LucideIcon;
57
+ readonly 'arrow-right': import("lucide-react").LucideIcon;
58
+ readonly more: import("lucide-react").LucideIcon;
59
+ readonly menu: import("lucide-react").LucideIcon;
60
+ readonly link: import("lucide-react").LucideIcon;
61
+ readonly 'external-link': import("lucide-react").LucideIcon;
62
+ readonly copy: import("lucide-react").LucideIcon;
63
+ readonly code: import("lucide-react").LucideIcon;
64
+ readonly 'broken-image': import("lucide-react").LucideIcon;
65
+ readonly info: import("lucide-react").LucideIcon;
66
+ readonly success: import("lucide-react").LucideIcon;
67
+ readonly warning: import("lucide-react").LucideIcon;
68
+ readonly error: import("lucide-react").LucideIcon;
69
+ readonly add: import("lucide-react").LucideIcon;
70
+ readonly remove: import("lucide-react").LucideIcon;
71
+ readonly upload: import("lucide-react").LucideIcon;
72
+ readonly calendar: import("lucide-react").LucideIcon;
73
+ readonly clock: import("lucide-react").LucideIcon;
74
+ readonly star: import("lucide-react").LucideIcon;
75
+ readonly spinner: import("lucide-react").LucideIcon;
75
76
  };
76
77
  /** Every role name `ICONS` answers to. */
77
78
  export type MPIconName = keyof typeof ICONS;
@@ -1 +1 @@
1
- export*from"./glyphs.js";import{VisibilityIcon as r,VisibilityOffIcon as o,CloseIcon as e,CheckIcon as n,ChevronDownIcon as i,ChevronUpIcon as c,ChevronLeftIcon as s,ChevronRightIcon as h,ChevronsLeftIcon as l,ChevronsRightIcon as t,SearchIcon as a,ArrowUpIcon as p,ArrowDownIcon as v,ArrowRightIcon as f,MoreIcon as g,MenuIcon as m,LinkIcon as d,ExternalLinkIcon as w,CopyIcon as k,BrokenImageIcon as u,InfoIcon as y,SuccessIcon as b,WarningIcon as x,ErrorIcon as j,AddIcon as C,RemoveIcon as I,UploadIcon as N,CalendarIcon as O,ClockIcon as S,StarIcon as q,SpinnerIcon as z}from"./glyphs.js";export const ICONS={visibility:r,"visibility-off":o,close:e,check:n,"chevron-down":i,"chevron-up":c,"chevron-left":s,"chevron-right":h,"chevrons-left":l,"chevrons-right":t,search:a,"arrow-up":p,"arrow-down":v,"arrow-right":f,more:g,menu:m,link:d,"external-link":w,copy:k,"broken-image":u,info:y,success:b,warning:x,error:j,add:C,remove:I,upload:N,calendar:O,clock:S,star:q,spinner:z};
1
+ export*from"./glyphs.js";import{VisibilityIcon as r,VisibilityOffIcon as o,CloseIcon as e,CheckIcon as n,ChevronDownIcon as c,ChevronUpIcon as i,ChevronLeftIcon as s,ChevronRightIcon as h,ChevronsLeftIcon as l,ChevronsRightIcon as t,SearchIcon as a,ArrowUpIcon as p,ArrowDownIcon as v,ArrowRightIcon as d,MoreIcon as f,MenuIcon as g,LinkIcon as m,ExternalLinkIcon as w,CopyIcon as k,CodeIcon as u,BrokenImageIcon as y,InfoIcon as b,SuccessIcon as x,WarningIcon as j,ErrorIcon as C,AddIcon as I,RemoveIcon as N,UploadIcon as O,CalendarIcon as S,ClockIcon as q,StarIcon as z,SpinnerIcon as A}from"./glyphs.js";export const ICONS={visibility:r,"visibility-off":o,close:e,check:n,"chevron-down":c,"chevron-up":i,"chevron-left":s,"chevron-right":h,"chevrons-left":l,"chevrons-right":t,search:a,"arrow-up":p,"arrow-down":v,"arrow-right":d,more:f,menu:g,link:m,"external-link":w,copy:k,code:u,"broken-image":y,info:b,success:x,warning:j,error:C,add:I,remove:N,upload:O,calendar:S,clock:q,star:z,spinner:A};
@@ -2,11 +2,21 @@
2
2
  * The machinery this library was already running, with a name a consumer can
3
3
  * import.
4
4
  *
5
- * Every hook here existed in `internal/` before it existed here, and each was
6
- * exported for the same reason: an application that has told the library
7
- * something — or that has to answer a question the library has already answered
8
- * for itself — should not have to answer it a second time, in numbers or in
9
- * detection code that can drift away from what the components are using.
5
+ * Two kinds live here, and both are the same argument.
6
+ *
7
+ * The first existed in `internal/` before it existed here, and was exported
8
+ * because an application that has told the library something — or that has to
9
+ * answer a question the library has already answered for itself — should not
10
+ * have to answer it a second time, in numbers or in detection code that can
11
+ * drift away from what the components are using.
12
+ *
13
+ * The second is the general form of something the library does several times
14
+ * over and could not export as it stood. `useMPWindowClass` watches four media
15
+ * queries; `useMPMediaQuery` is one. `MPTabs` measures its own bar;
16
+ * `useMPElementSize` is that measurement. `trigger="visible"` watches an
17
+ * element cross the viewport; `useMPOnScreen` is the watching without the
18
+ * animation. And `useMPDisclosure` is the six lines every page writes to open a
19
+ * dialog, with the two details a version written in a hurry leaves out.
10
20
  *
11
21
  * `useMPLocale` and `useMPSnackbar` are not here. They belong to a provider and
12
22
  * live with it, the way a hook that reads a context should.
@@ -20,4 +30,11 @@ export type { MPColorScheme, MPResolvedColorScheme, MPColorSchemeOptions, MPColo
20
30
  export { useMPWindowClass } from './useMPWindowClass.js';
21
31
  export { useMPReducedMotion } from './useMPReducedMotion.js';
22
32
  export { useMPShortcut, useMPPlatform } from './useMPShortcut.js';
33
+ export { useMPMediaQuery } from './useMPMediaQuery.js';
34
+ export { useMPElementSize } from './useMPElementSize.js';
35
+ export type { MPElementSize } from './useMPElementSize.js';
36
+ export { useMPOnScreen } from './useMPOnScreen.js';
37
+ export type { MPOnScreenOptions } from './useMPOnScreen.js';
38
+ export { useMPDisclosure } from './useMPDisclosure.js';
39
+ export type { MPDisclosure } from './useMPDisclosure.js';
23
40
  export type { MPShortcutOptions, MPResolvedOS } from './useMPShortcut.js';
@@ -1 +1 @@
1
- export{useMPColorScheme,mpColorSchemeScript}from"./useMPColorScheme.js";export{useMPWindowClass}from"./useMPWindowClass.js";export{useMPReducedMotion}from"./useMPReducedMotion.js";export{useMPShortcut,useMPPlatform}from"./useMPShortcut.js";
1
+ export{useMPColorScheme,mpColorSchemeScript}from"./useMPColorScheme.js";export{useMPWindowClass}from"./useMPWindowClass.js";export{useMPReducedMotion}from"./useMPReducedMotion.js";export{useMPShortcut,useMPPlatform}from"./useMPShortcut.js";export{useMPMediaQuery}from"./useMPMediaQuery.js";export{useMPElementSize}from"./useMPElementSize.js";export{useMPOnScreen}from"./useMPOnScreen.js";export{useMPDisclosure}from"./useMPDisclosure.js";
@@ -1 +1,2 @@
1
+ "use client";
1
2
  import*as e from"react";import{DEFAULT_STORAGE_KEY as t,SCHEME_ATTRIBUTE as r,setScheme as s,useChosenScheme as o,useSystemScheme as c}from"../internal/color-scheme.js";export function useMPColorScheme(r={}){const{storageKey:m=t}=r,a=o(m),i=c(),l="system"===a?i:a,n=e.useCallback(e=>s(m,e),[m]),u=e.useCallback(()=>s(m,"dark"===l?"light":"dark"),[m,l]);return e.useMemo(()=>({scheme:a,resolved:l,isSystem:"system"===a,setScheme:n,toggle:u}),[a,l,n,u])}export function mpColorSchemeScript(e={}){const{storageKey:s=t}=e;return`try{var s=localStorage.getItem(${JSON.stringify(s)});if(s==="dark"||s==="light")document.documentElement.setAttribute(${JSON.stringify(r)},s)}catch(e){}`}
@@ -0,0 +1,58 @@
1
+ /** Whether something is open, and the three ways to change that. */
2
+ export interface MPDisclosure {
3
+ open: boolean;
4
+ /** Opens it. Already open, nothing happens and nothing re-renders. */
5
+ onOpen: () => void;
6
+ /** Closes it. */
7
+ onClose: () => void;
8
+ /** The other one, whichever that is. */
9
+ onToggle: () => void;
10
+ /**
11
+ * Sets it outright, which is what a controlled prop wants: pass this straight
12
+ * to an `onOpenChange`.
13
+ */
14
+ setOpen: (open: boolean) => void;
15
+ }
16
+ /**
17
+ * Open, and the three ways to change it.
18
+ *
19
+ * The most-written six lines in any application using this library. A dialog, a
20
+ * drawer, a popover, a menu and a command palette are all controlled the same
21
+ * way — `open` and `onOpenChange` — and every page that mounts one writes the
22
+ * same `useState` and the same three callbacks, usually as inline arrows that
23
+ * are a new function on every render.
24
+ *
25
+ * ```tsx
26
+ * const dialog = useMPDisclosure();
27
+ *
28
+ * <MPButton onClick={dialog.onOpen}>Delete</MPButton>
29
+ * <MPDialog open={dialog.open} onOpenChange={dialog.setOpen} title="Delete?">
30
+ * <MPButton onClick={dialog.onClose}>Cancel</MPButton>
31
+ * </MPDialog>;
32
+ * ```
33
+ *
34
+ * ## Why the library ships one at all
35
+ *
36
+ * Because the alternative is not "no hook", it is a hook per application, and
37
+ * the two things this gets right are the two that get left out of one written in
38
+ * a hurry.
39
+ *
40
+ * Every callback is stable for the life of the component. An inline
41
+ * `onClick={() => setOpen(true)}` is a new function on every render, which
42
+ * re-renders a memoised trigger for no reason and defeats the `React.memo` a
43
+ * page put there on purpose.
44
+ *
45
+ * And `onOpen` on something already open is not a state change. React bails out
46
+ * of a `useState` set to the value it already holds, so the three callbacks here
47
+ * cost nothing when they are asked for what is already true — which matters
48
+ * because a close handler is often wired to three things at once: a button, an
49
+ * `onOpenChange`, and an Escape the component also handles.
50
+ *
51
+ * ## It is not a controlled/uncontrolled helper
52
+ *
53
+ * It holds state, so it makes a thing controlled. A component that should
54
+ * manage its own open state takes `defaultOpen` and needs none of this.
55
+ *
56
+ * @param defaultOpen what it starts as. @default false
57
+ */
58
+ export declare function useMPDisclosure(defaultOpen?: boolean): MPDisclosure;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import*as e from"react";export function useMPDisclosure(o=!1){const[s,n]=e.useState(o),a=e.useCallback(()=>n(!0),[]),l=e.useCallback(()=>n(!1),[]),t=e.useCallback(()=>n(e=>!e),[]);return e.useMemo(()=>({open:s,onOpen:a,onClose:l,onToggle:t,setOpen:n}),[s,a,l,t])}
@@ -0,0 +1,55 @@
1
+ import * as React from 'react';
2
+ /** What an element measures, in CSS pixels. */
3
+ export interface MPElementSize {
4
+ width: number;
5
+ height: number;
6
+ }
7
+ /**
8
+ * How big an element is, kept up to date as it changes.
9
+ *
10
+ * The library measures elements in five places — a tab bar deciding whether it
11
+ * overflows, a field sizing its outline's notch, panes tracking a drag — and an
12
+ * application that wants the same answer had to write the `ResizeObserver`
13
+ * out again, including the two parts of it that are easy to get wrong.
14
+ *
15
+ * ```tsx
16
+ * const ref = React.useRef<HTMLDivElement>(null);
17
+ * const { width } = useMPElementSize(ref);
18
+ *
19
+ * <div ref={ref}>{width > 480 ? <Chart /> : <Figure />}</div>;
20
+ * ```
21
+ *
22
+ * This is the answer for **a component's own width**, which is what a container
23
+ * query asks and a media query cannot: a card in a sidebar and the same card in
24
+ * a main column are the same window and two different widths.
25
+ * [useMPMediaQuery](#usempmediaquery) is the other question.
26
+ *
27
+ * ## Zero until it has measured
28
+ *
29
+ * The first render has no element yet — a ref is filled in during the commit —
30
+ * so the first answer is `{ width: 0, height: 0 }` and the real one arrives on
31
+ * the render after it. Branch on a threshold rather than on the number itself,
32
+ * or a chart will mount, be told it is zero wide, and mount again.
33
+ *
34
+ * ## The two parts that are easy to get wrong
35
+ *
36
+ * It reads `getBoundingClientRect`, not the observer entry's `contentRect`.
37
+ * Those differ by the padding and the border — `contentRect` is the content box
38
+ * — and a caller comparing a measurement against a breakpoint means the box the
39
+ * element actually occupies.
40
+ *
41
+ * And it re-renders only when a number changes. A `ResizeObserver` fires for a
42
+ * subpixel reflow that rounds to the same integer, and a hook that set state on
43
+ * every callback would re-render a chart on every scroll of a page with a
44
+ * sticky header.
45
+ *
46
+ * ## Where there is no observer
47
+ *
48
+ * A browser without `ResizeObserver` measures once on mount and stays there,
49
+ * which is right more often than it is wrong: an element that never resizes is
50
+ * the common case, and the alternative is a `resize` listener that misses every
51
+ * change the window did not cause.
52
+ *
53
+ * @param ref a ref to the element to measure.
54
+ */
55
+ export declare function useMPElementSize(ref: React.RefObject<Element | null>): MPElementSize;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import*as e from"react";export function useMPElementSize(t){const[n,i]=e.useState({width:0,height:0});return e.useEffect(()=>{const e=t.current;if(!e)return;const n=()=>{const t=e.getBoundingClientRect(),n={width:Math.round(t.width),height:Math.round(t.height)};i(e=>e.width===n.width&&e.height===n.height?e:n)};if(n(),"undefined"==typeof ResizeObserver)return;const r=new ResizeObserver(n);return r.observe(e),()=>r.disconnect()},[t]),n}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Whether a media query matches, and it re-renders when that changes.
3
+ *
4
+ * The general form of what this library already does four times over for the
5
+ * window size classes, and once each for `prefers-reduced-motion` and the
6
+ * colour scheme. A page has questions of its own — is this a coarse pointer, is
7
+ * the window tall enough for a two-row bar, is the reader in a high-contrast
8
+ * mode — and had to write the subscription out again to ask one.
9
+ *
10
+ * ```tsx
11
+ * const coarse = useMPMediaQuery('(pointer: coarse)');
12
+ *
13
+ * <MPTooltip disabled={coarse}>…</MPTooltip>;
14
+ * ```
15
+ *
16
+ * ## Reach for `useMPWindowClass` for a width
17
+ *
18
+ * A width query written here is a copy of a number the library also holds, and
19
+ * the two drift the moment an `MPConfigProvider` moves a boundary. Ask
20
+ * [useMPWindowClass](#usempwindowclass) instead — it reads the same ladder the
21
+ * grid and the sidebar do.
22
+ *
23
+ * ## On a server, and before hydration
24
+ *
25
+ * `onServer`, which defaults to `false`. There is no window to ask, and a
26
+ * default of "matches" would mean every server-rendered page claiming every
27
+ * preference at once.
28
+ *
29
+ * `useSyncExternalStore` is what makes the correction on hydration legitimate
30
+ * rather than a mismatch React warns about — but it is a second render, so
31
+ * anything that swaps a whole layout on this does so visibly on a first load.
32
+ * Where that matters the answer is CSS, which has no first render to be wrong.
33
+ *
34
+ * A browser without `matchMedia` gets the same `onServer` answer, for the same
35
+ * reason: there is no way to ask, and a guess is worse than the caller's own.
36
+ *
37
+ * @param query any CSS media query, without the `@media`.
38
+ * @param onServer what to answer where there is nothing to ask. @default false
39
+ */
40
+ export declare function useMPMediaQuery(query: string, onServer?: boolean): boolean;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import*as e from"react";export function useMPMediaQuery(t,a=!1){const r=e.useMemo(()=>function(e){if("undefined"==typeof window||!window.matchMedia)return null;let t=n.get(e);t||(t=window.matchMedia(e),n.set(e,t));return t}(t),[t]),c=e.useCallback(e=>r?(r.addEventListener("change",e),()=>r.removeEventListener("change",e)):()=>{},[r]),o=e.useCallback(()=>r?r.matches:a,[r,a]),u=e.useCallback(()=>a,[a]);return e.useSyncExternalStore(c,o,u)}const n=new Map;
@@ -0,0 +1,58 @@
1
+ import * as React from 'react';
2
+ /** What to watch for. */
3
+ export interface MPOnScreenOptions {
4
+ /**
5
+ * How much of the element has to be showing before it counts, from `0` to `1`.
6
+ *
7
+ * The same default the `MPAnimate*` components take, so a page's own answer
8
+ * and the library's arrive at the same scroll position.
9
+ * @default 0.2
10
+ */
11
+ threshold?: number;
12
+ /**
13
+ * Whether it stops watching the first time. Off, it reports every entrance and
14
+ * every exit.
15
+ * @default true
16
+ */
17
+ once?: boolean;
18
+ /**
19
+ * A CSS `margin`-shaped string that grows or shrinks the region the element is
20
+ * tested against — `'200px 0px'` reports something 200px before it arrives.
21
+ * For loading a picture, or starting a request, ahead of the reader.
22
+ */
23
+ rootMargin?: string;
24
+ }
25
+ /**
26
+ * Whether an element is on screen.
27
+ *
28
+ * The `MPAnimate*` components already ask this — `trigger="visible"` is exactly
29
+ * it — and an application asks it for other reasons: loading an image, starting
30
+ * a request, marking a section read, pausing something expensive that has
31
+ * scrolled away.
32
+ *
33
+ * ```tsx
34
+ * const ref = React.useRef<HTMLDivElement>(null);
35
+ * const seen = useMPOnScreen(ref);
36
+ *
37
+ * <div ref={ref}>{seen ? <Chart data={data} /> : <MPSkeleton height={240} />}</div>;
38
+ * ```
39
+ *
40
+ * ## `once` is on, and that is the common case
41
+ *
42
+ * Most reasons to ask are one-way: something loads, or is marked read, and does
43
+ * not unload when it scrolls off. Turn it off for the ones that are not — a
44
+ * video that should pause, a poll that should stop.
45
+ *
46
+ * ## Where there is no observer
47
+ *
48
+ * `true`. A browser with no `IntersectionObserver` has no way to be asked, and
49
+ * showing content is the answer that fails safe: the alternative is a page
50
+ * whose every deferred section stays a skeleton forever.
51
+ *
52
+ * The same is true before the ref is filled in, which is why this starts at
53
+ * `false` and not at `true` — on the first render there is no element yet, and
54
+ * an element that has not been observed is not the same as one that cannot be.
55
+ *
56
+ * @param ref a ref to the element to watch.
57
+ */
58
+ export declare function useMPOnScreen(ref: React.RefObject<Element | null>, { threshold, once, rootMargin }?: MPOnScreenOptions): boolean;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import*as e from"react";export function useMPOnScreen(r,{threshold:n=.2,once:t=!0,rootMargin:o}={}){const[s,c]=e.useState(!1);return e.useEffect(()=>{const e=r.current;if(!e)return;if("undefined"==typeof IntersectionObserver)return void c(!0);const s=new IntersectionObserver(([e])=>{e.isIntersecting?(c(!0),t&&s.disconnect()):t||c(!1)},{threshold:n,rootMargin:o});return s.observe(e),()=>s.disconnect()},[r,n,t,o]),s}
@@ -1 +1,2 @@
1
+ "use client";
1
2
  import{usePrefersReducedMotion as e}from"../internal/animate.js";export function useMPReducedMotion(){return e()}
@@ -43,6 +43,13 @@ import type { MPWindowClass } from '../types.js';
43
43
  * responsive props and Tailwind's own variants are resolved by the browser
44
44
  * before anything paints.
45
45
  *
46
+ * ## Where the boundaries come from
47
+ *
48
+ * MD3's own, unless an `MPConfigProvider` above this moved them — its
49
+ * `breakpoints` prop is the JavaScript half of a page that has moved the
50
+ * stylesheet's too. See the provider for why moving one without the other is
51
+ * worse than moving neither.
52
+ *
46
53
  * @param onServer what to answer where there is no window. @default 'expanded'
47
54
  */
48
55
  export declare function useMPWindowClass(onServer?: MPWindowClass): MPWindowClass;
@@ -1 +1,2 @@
1
+ "use client";
1
2
  import{useWindowClass as n}from"../internal/window-class.js";export function useMPWindowClass(e="expanded"){return n(e)}