material-plus-ui 0.0.1 → 1.1.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 (341) hide show
  1. package/README.md +39 -28
  2. package/dist/components/accordion/MPAccordion.d.ts +115 -0
  3. package/dist/components/accordion/MPAccordion.js +1 -0
  4. package/dist/components/accordion/index.d.ts +2 -0
  5. package/dist/components/accordion/index.js +1 -0
  6. package/dist/components/alert/MPAlert.d.ts +91 -0
  7. package/dist/components/alert/MPAlert.js +1 -0
  8. package/dist/components/alert/index.d.ts +2 -0
  9. package/dist/components/alert/index.js +1 -0
  10. package/dist/components/animate-appear/MPAnimateAppear.d.ts +56 -0
  11. package/dist/components/animate-appear/MPAnimateAppear.js +1 -0
  12. package/dist/components/animate-appear/index.d.ts +2 -0
  13. package/dist/components/animate-appear/index.js +1 -0
  14. package/dist/components/animate-blink/MPAnimateBlink.d.ts +41 -0
  15. package/dist/components/animate-blink/MPAnimateBlink.js +1 -0
  16. package/dist/components/animate-blink/index.d.ts +2 -0
  17. package/dist/components/animate-blink/index.js +1 -0
  18. package/dist/components/animate-fade/MPAnimateFade.d.ts +38 -0
  19. package/dist/components/animate-fade/MPAnimateFade.js +1 -0
  20. package/dist/components/animate-fade/index.d.ts +2 -0
  21. package/dist/components/animate-fade/index.js +1 -0
  22. package/dist/components/animate-grow/MPAnimateGrow.d.ts +52 -0
  23. package/dist/components/animate-grow/MPAnimateGrow.js +1 -0
  24. package/dist/components/animate-grow/index.d.ts +2 -0
  25. package/dist/components/animate-grow/index.js +1 -0
  26. package/dist/components/animate-headline/MPAnimateHeadline.d.ts +63 -0
  27. package/dist/components/animate-headline/MPAnimateHeadline.js +1 -0
  28. package/dist/components/animate-headline/index.d.ts +2 -0
  29. package/dist/components/animate-headline/index.js +1 -0
  30. package/dist/components/animate-lighting/MPAnimateLighting.d.ts +68 -0
  31. package/dist/components/animate-lighting/MPAnimateLighting.js +1 -0
  32. package/dist/components/animate-lighting/index.d.ts +2 -0
  33. package/dist/components/animate-lighting/index.js +1 -0
  34. package/dist/components/animate-marquee/MPAnimateMarquee.d.ts +66 -0
  35. package/dist/components/animate-marquee/MPAnimateMarquee.js +1 -0
  36. package/dist/components/animate-marquee/index.d.ts +2 -0
  37. package/dist/components/animate-marquee/index.js +1 -0
  38. package/dist/components/animate-rotate/MPAnimateRotate.d.ts +56 -0
  39. package/dist/components/animate-rotate/MPAnimateRotate.js +1 -0
  40. package/dist/components/animate-rotate/index.d.ts +2 -0
  41. package/dist/components/animate-rotate/index.js +1 -0
  42. package/dist/components/animate-slide/MPAnimateSlide.d.ts +53 -0
  43. package/dist/components/animate-slide/MPAnimateSlide.js +1 -0
  44. package/dist/components/animate-slide/index.d.ts +2 -0
  45. package/dist/components/animate-slide/index.js +1 -0
  46. package/dist/components/animate-typing/MPAnimateTyping.d.ts +59 -0
  47. package/dist/components/animate-typing/MPAnimateTyping.js +1 -0
  48. package/dist/components/animate-typing/index.d.ts +2 -0
  49. package/dist/components/animate-typing/index.js +1 -0
  50. package/dist/components/animate-zoom/MPAnimateZoom.d.ts +44 -0
  51. package/dist/components/animate-zoom/MPAnimateZoom.js +1 -0
  52. package/dist/components/animate-zoom/index.d.ts +2 -0
  53. package/dist/components/animate-zoom/index.js +1 -0
  54. package/dist/components/aspect-ratio/MPAspectRatio.d.ts +69 -0
  55. package/dist/components/aspect-ratio/MPAspectRatio.js +1 -0
  56. package/dist/components/aspect-ratio/index.d.ts +2 -0
  57. package/dist/components/aspect-ratio/index.js +1 -0
  58. package/dist/components/avatar/MPAvatar.d.ts +104 -0
  59. package/dist/components/avatar/MPAvatar.js +1 -0
  60. package/dist/components/avatar/index.d.ts +2 -0
  61. package/dist/components/avatar/index.js +1 -0
  62. package/dist/components/badge/MPBadge.d.ts +104 -0
  63. package/dist/components/badge/MPBadge.js +1 -0
  64. package/dist/components/badge/index.d.ts +2 -0
  65. package/dist/components/badge/index.js +1 -0
  66. package/dist/components/blockquote/MPBlockquote.d.ts +73 -0
  67. package/dist/components/blockquote/MPBlockquote.js +1 -0
  68. package/dist/components/blockquote/index.d.ts +2 -0
  69. package/dist/components/blockquote/index.js +1 -0
  70. package/dist/components/bottom-navigation/MPBottomNavigation.d.ts +144 -0
  71. package/dist/components/bottom-navigation/MPBottomNavigation.js +1 -0
  72. package/dist/components/bottom-navigation/index.d.ts +2 -0
  73. package/dist/components/bottom-navigation/index.js +1 -0
  74. package/dist/components/box/MPBox.d.ts +78 -0
  75. package/dist/components/box/MPBox.js +1 -0
  76. package/dist/components/box/index.d.ts +2 -0
  77. package/dist/components/box/index.js +1 -0
  78. package/dist/components/breadcrumb/MPBreadcrumb.d.ts +127 -0
  79. package/dist/components/breadcrumb/MPBreadcrumb.js +1 -0
  80. package/dist/components/breadcrumb/index.d.ts +2 -0
  81. package/dist/components/breadcrumb/index.js +1 -0
  82. package/dist/components/button/MPButton.d.ts +75 -0
  83. package/dist/components/button/MPButton.js +1 -0
  84. package/dist/components/button/index.d.ts +2 -0
  85. package/dist/components/button/index.js +1 -0
  86. package/dist/components/button-group/MPButtonGroup.d.ts +31 -0
  87. package/dist/components/button-group/MPButtonGroup.js +1 -0
  88. package/dist/components/button-group/index.d.ts +2 -0
  89. package/dist/components/button-group/index.js +1 -0
  90. package/dist/components/card/MPCard.d.ts +73 -0
  91. package/dist/components/card/MPCard.js +1 -0
  92. package/dist/components/card/index.d.ts +2 -0
  93. package/dist/components/card/index.js +1 -0
  94. package/dist/components/carousel/MPCarousel.d.ts +116 -0
  95. package/dist/components/carousel/MPCarousel.js +1 -0
  96. package/dist/components/carousel/index.d.ts +2 -0
  97. package/dist/components/carousel/index.js +1 -0
  98. package/dist/components/chat-bubble/MPChatBubble.d.ts +132 -0
  99. package/dist/components/chat-bubble/MPChatBubble.js +1 -0
  100. package/dist/components/chat-bubble/index.d.ts +2 -0
  101. package/dist/components/chat-bubble/index.js +1 -0
  102. package/dist/components/checkbox/MPCheckbox.d.ts +76 -0
  103. package/dist/components/checkbox/MPCheckbox.js +1 -0
  104. package/dist/components/checkbox/index.d.ts +2 -0
  105. package/dist/components/checkbox/index.js +1 -0
  106. package/dist/components/chip/MPChip.d.ts +74 -0
  107. package/dist/components/chip/MPChip.js +1 -0
  108. package/dist/components/chip/index.d.ts +2 -0
  109. package/dist/components/chip/index.js +1 -0
  110. package/dist/components/collapsible/MPCollapsible.d.ts +97 -0
  111. package/dist/components/collapsible/MPCollapsible.js +1 -0
  112. package/dist/components/collapsible/index.d.ts +2 -0
  113. package/dist/components/collapsible/index.js +1 -0
  114. package/dist/components/color-picker/MPColorPicker.d.ts +131 -0
  115. package/dist/components/color-picker/MPColorPicker.js +1 -0
  116. package/dist/components/color-picker/index.d.ts +2 -0
  117. package/dist/components/color-picker/index.js +1 -0
  118. package/dist/components/combobox/MPCombobox.d.ts +175 -0
  119. package/dist/components/combobox/MPCombobox.js +1 -0
  120. package/dist/components/combobox/index.d.ts +2 -0
  121. package/dist/components/combobox/index.js +1 -0
  122. package/dist/components/container/MPContainer.d.ts +75 -0
  123. package/dist/components/container/MPContainer.js +1 -0
  124. package/dist/components/container/index.d.ts +2 -0
  125. package/dist/components/container/index.js +1 -0
  126. package/dist/components/date-picker/MPDatePicker.d.ts +98 -0
  127. package/dist/components/date-picker/MPDatePicker.js +1 -0
  128. package/dist/components/date-picker/index.d.ts +2 -0
  129. package/dist/components/date-picker/index.js +1 -0
  130. package/dist/components/date-range-picker/MPDateRangePicker.d.ts +98 -0
  131. package/dist/components/date-range-picker/MPDateRangePicker.js +1 -0
  132. package/dist/components/date-range-picker/index.d.ts +2 -0
  133. package/dist/components/date-range-picker/index.js +1 -0
  134. package/dist/components/date-time-picker/MPDateTimePicker.d.ts +78 -0
  135. package/dist/components/date-time-picker/MPDateTimePicker.js +1 -0
  136. package/dist/components/date-time-picker/index.d.ts +2 -0
  137. package/dist/components/date-time-picker/index.js +1 -0
  138. package/dist/components/dialog/MPDialog.d.ts +150 -0
  139. package/dist/components/dialog/MPDialog.js +1 -0
  140. package/dist/components/dialog/index.d.ts +2 -0
  141. package/dist/components/dialog/index.js +1 -0
  142. package/dist/components/divider/MPDivider.d.ts +80 -0
  143. package/dist/components/divider/MPDivider.js +1 -0
  144. package/dist/components/divider/index.d.ts +2 -0
  145. package/dist/components/divider/index.js +1 -0
  146. package/dist/components/drawer/MPDrawer.d.ts +168 -0
  147. package/dist/components/drawer/MPDrawer.js +1 -0
  148. package/dist/components/drawer/index.d.ts +2 -0
  149. package/dist/components/drawer/index.js +1 -0
  150. package/dist/components/empty/MPEmpty.d.ts +74 -0
  151. package/dist/components/empty/MPEmpty.js +1 -0
  152. package/dist/components/empty/index.d.ts +2 -0
  153. package/dist/components/empty/index.js +1 -0
  154. package/dist/components/file-picker/MPFilePicker.d.ts +113 -0
  155. package/dist/components/file-picker/MPFilePicker.js +1 -0
  156. package/dist/components/file-picker/index.d.ts +2 -0
  157. package/dist/components/file-picker/index.js +1 -0
  158. package/dist/components/floating-action-button/MPFloatingActionButton.d.ts +126 -0
  159. package/dist/components/floating-action-button/MPFloatingActionButton.js +1 -0
  160. package/dist/components/floating-action-button/index.d.ts +2 -0
  161. package/dist/components/floating-action-button/index.js +1 -0
  162. package/dist/components/grid/MPGrid.d.ts +155 -0
  163. package/dist/components/grid/MPGrid.js +1 -0
  164. package/dist/components/grid/index.d.ts +2 -0
  165. package/dist/components/grid/index.js +1 -0
  166. package/dist/components/highlight/MPHighlight.d.ts +95 -0
  167. package/dist/components/highlight/MPHighlight.js +1 -0
  168. package/dist/components/highlight/index.d.ts +2 -0
  169. package/dist/components/highlight/index.js +1 -0
  170. package/dist/components/icon-button/MPIconButton.d.ts +59 -0
  171. package/dist/components/icon-button/MPIconButton.js +1 -0
  172. package/dist/components/icon-button/index.d.ts +2 -0
  173. package/dist/components/icon-button/index.js +1 -0
  174. package/dist/components/list/MPList.d.ts +96 -0
  175. package/dist/components/list/MPList.js +1 -0
  176. package/dist/components/list/index.d.ts +2 -0
  177. package/dist/components/list/index.js +1 -0
  178. package/dist/components/locale/MPLocaleProvider.d.ts +63 -0
  179. package/dist/components/locale/MPLocaleProvider.js +1 -0
  180. package/dist/components/locale/index.d.ts +2 -0
  181. package/dist/components/locale/index.js +1 -0
  182. package/dist/components/menu/MPMenu.d.ts +232 -0
  183. package/dist/components/menu/MPMenu.js +1 -0
  184. package/dist/components/menu/index.d.ts +2 -0
  185. package/dist/components/menu/index.js +1 -0
  186. package/dist/components/number-field/MPNumberField.d.ts +117 -0
  187. package/dist/components/number-field/MPNumberField.js +1 -0
  188. package/dist/components/number-field/index.d.ts +2 -0
  189. package/dist/components/number-field/index.js +1 -0
  190. package/dist/components/otp-field/MPOtpField.d.ts +89 -0
  191. package/dist/components/otp-field/MPOtpField.js +1 -0
  192. package/dist/components/otp-field/index.d.ts +2 -0
  193. package/dist/components/otp-field/index.js +1 -0
  194. package/dist/components/overlay/MPOverlay.d.ts +96 -0
  195. package/dist/components/overlay/MPOverlay.js +1 -0
  196. package/dist/components/overlay/index.d.ts +2 -0
  197. package/dist/components/overlay/index.js +1 -0
  198. package/dist/components/pagination/MPPagination.d.ts +106 -0
  199. package/dist/components/pagination/MPPagination.js +1 -0
  200. package/dist/components/pagination/index.d.ts +2 -0
  201. package/dist/components/pagination/index.js +1 -0
  202. package/dist/components/panes/MPPanes.d.ts +100 -0
  203. package/dist/components/panes/MPPanes.js +1 -0
  204. package/dist/components/panes/index.d.ts +2 -0
  205. package/dist/components/panes/index.js +1 -0
  206. package/dist/components/pill/MPPill.d.ts +117 -0
  207. package/dist/components/pill/MPPill.js +1 -0
  208. package/dist/components/pill/index.d.ts +2 -0
  209. package/dist/components/pill/index.js +1 -0
  210. package/dist/components/popover/MPPopover.d.ts +143 -0
  211. package/dist/components/popover/MPPopover.js +1 -0
  212. package/dist/components/popover/index.d.ts +2 -0
  213. package/dist/components/popover/index.js +1 -0
  214. package/dist/components/progress-box/MPProgressBox.d.ts +40 -0
  215. package/dist/components/progress-box/MPProgressBox.js +1 -0
  216. package/dist/components/progress-box/index.d.ts +2 -0
  217. package/dist/components/progress-box/index.js +1 -0
  218. package/dist/components/progress-circular/MPProgressCircular.d.ts +32 -0
  219. package/dist/components/progress-circular/MPProgressCircular.js +1 -0
  220. package/dist/components/progress-circular/index.d.ts +2 -0
  221. package/dist/components/progress-circular/index.js +1 -0
  222. package/dist/components/progress-linear/MPProgressLinear.d.ts +32 -0
  223. package/dist/components/progress-linear/MPProgressLinear.js +1 -0
  224. package/dist/components/progress-linear/index.d.ts +2 -0
  225. package/dist/components/progress-linear/index.js +1 -0
  226. package/dist/components/radio-group/MPRadioGroup.d.ts +81 -0
  227. package/dist/components/radio-group/MPRadioGroup.js +1 -0
  228. package/dist/components/radio-group/index.d.ts +2 -0
  229. package/dist/components/radio-group/index.js +1 -0
  230. package/dist/components/rating/MPRating.d.ts +135 -0
  231. package/dist/components/rating/MPRating.js +1 -0
  232. package/dist/components/rating/index.d.ts +2 -0
  233. package/dist/components/rating/index.js +1 -0
  234. package/dist/components/segmented-button/MPSegmentedButton.d.ts +75 -0
  235. package/dist/components/segmented-button/MPSegmentedButton.js +1 -0
  236. package/dist/components/segmented-button/index.d.ts +2 -0
  237. package/dist/components/segmented-button/index.js +1 -0
  238. package/dist/components/select/MPSelect.d.ts +103 -0
  239. package/dist/components/select/MPSelect.js +1 -0
  240. package/dist/components/select/index.d.ts +2 -0
  241. package/dist/components/select/index.js +1 -0
  242. package/dist/components/shortcut/MPShortcut.d.ts +67 -0
  243. package/dist/components/shortcut/MPShortcut.js +1 -0
  244. package/dist/components/shortcut/index.d.ts +2 -0
  245. package/dist/components/shortcut/index.js +1 -0
  246. package/dist/components/skeleton/MPSkeleton.d.ts +76 -0
  247. package/dist/components/skeleton/MPSkeleton.js +1 -0
  248. package/dist/components/skeleton/index.d.ts +2 -0
  249. package/dist/components/skeleton/index.js +1 -0
  250. package/dist/components/slider/MPSlider.d.ts +77 -0
  251. package/dist/components/slider/MPSlider.js +1 -0
  252. package/dist/components/slider/index.d.ts +2 -0
  253. package/dist/components/slider/index.js +1 -0
  254. package/dist/components/snackbar/MPSnackbar.d.ts +175 -0
  255. package/dist/components/snackbar/MPSnackbar.js +1 -0
  256. package/dist/components/snackbar/index.d.ts +2 -0
  257. package/dist/components/snackbar/index.js +1 -0
  258. package/dist/components/spoiler/MPSpoiler.d.ts +106 -0
  259. package/dist/components/spoiler/MPSpoiler.js +1 -0
  260. package/dist/components/spoiler/index.d.ts +2 -0
  261. package/dist/components/spoiler/index.js +1 -0
  262. package/dist/components/switch/MPSwitch.d.ts +75 -0
  263. package/dist/components/switch/MPSwitch.js +1 -0
  264. package/dist/components/switch/index.d.ts +2 -0
  265. package/dist/components/switch/index.js +1 -0
  266. package/dist/components/table/MPTable.d.ts +120 -0
  267. package/dist/components/table/MPTable.js +1 -0
  268. package/dist/components/table/index.d.ts +2 -0
  269. package/dist/components/table/index.js +1 -0
  270. package/dist/components/tabs/MPTabs.d.ts +145 -0
  271. package/dist/components/tabs/MPTabs.js +1 -0
  272. package/dist/components/tabs/index.d.ts +2 -0
  273. package/dist/components/tabs/index.js +1 -0
  274. package/dist/components/text-field/MPTextField.d.ts +51 -22
  275. package/dist/components/text-field/MPTextField.js +1 -1
  276. package/dist/components/text-link/MPTextLink.d.ts +88 -0
  277. package/dist/components/text-link/MPTextLink.js +1 -0
  278. package/dist/components/text-link/index.d.ts +2 -0
  279. package/dist/components/text-link/index.js +1 -0
  280. package/dist/components/time-picker/MPTimePicker.d.ts +108 -0
  281. package/dist/components/time-picker/MPTimePicker.js +1 -0
  282. package/dist/components/time-picker/index.d.ts +2 -0
  283. package/dist/components/time-picker/index.js +1 -0
  284. package/dist/components/timeline/MPTimeline.d.ts +96 -0
  285. package/dist/components/timeline/MPTimeline.js +1 -0
  286. package/dist/components/timeline/index.d.ts +2 -0
  287. package/dist/components/timeline/index.js +1 -0
  288. package/dist/components/tooltip/MPTooltip.d.ts +117 -0
  289. package/dist/components/tooltip/MPTooltip.js +1 -0
  290. package/dist/components/tooltip/index.d.ts +2 -0
  291. package/dist/components/tooltip/index.js +1 -0
  292. package/dist/components/typography/MPTypography.d.ts +94 -0
  293. package/dist/components/typography/MPTypography.js +1 -0
  294. package/dist/components/typography/index.d.ts +2 -0
  295. package/dist/components/typography/index.js +1 -0
  296. package/dist/constants/icons.d.ts +49 -0
  297. package/dist/constants/icons.js +1 -1
  298. package/dist/index.d.ts +73 -0
  299. package/dist/index.js +1 -1
  300. package/dist/internal/Calendar.d.ts +118 -0
  301. package/dist/internal/Calendar.js +1 -0
  302. package/dist/internal/FieldOutline.d.ts +109 -0
  303. package/dist/internal/FieldOutline.js +1 -0
  304. package/dist/internal/Picker.d.ts +153 -0
  305. package/dist/internal/Picker.js +1 -0
  306. package/dist/internal/StateLayer.d.ts +45 -0
  307. package/dist/internal/StateLayer.js +1 -0
  308. package/dist/internal/SupportingText.d.ts +23 -0
  309. package/dist/internal/SupportingText.js +1 -0
  310. package/dist/internal/WidthSizer.d.ts +31 -0
  311. package/dist/internal/WidthSizer.js +1 -0
  312. package/dist/internal/accent.d.ts +39 -0
  313. package/dist/internal/accent.js +1 -0
  314. package/dist/internal/animate.d.ts +179 -0
  315. package/dist/internal/animate.js +1 -0
  316. package/dist/internal/button-group.d.ts +21 -0
  317. package/dist/internal/button-group.js +1 -0
  318. package/dist/internal/color.d.ts +125 -0
  319. package/dist/internal/color.js +1 -0
  320. package/dist/internal/date.d.ts +179 -0
  321. package/dist/internal/date.js +1 -0
  322. package/dist/internal/i18n.d.ts +241 -0
  323. package/dist/internal/i18n.js +1 -0
  324. package/dist/internal/inert.d.ts +11 -0
  325. package/dist/internal/inert.js +1 -0
  326. package/dist/internal/locale.d.ts +43 -0
  327. package/dist/internal/locale.js +1 -0
  328. package/dist/internal/menu.d.ts +23 -0
  329. package/dist/internal/menu.js +1 -0
  330. package/dist/internal/progress.d.ts +126 -0
  331. package/dist/internal/progress.js +1 -0
  332. package/dist/internal/scale.d.ts +127 -0
  333. package/dist/internal/scale.js +1 -0
  334. package/dist/internal/surface.d.ts +76 -0
  335. package/dist/internal/surface.js +1 -0
  336. package/dist/internal/visually-hidden.d.ts +23 -0
  337. package/dist/internal/visually-hidden.js +1 -0
  338. package/dist/styles.css +1 -1
  339. package/dist/tailwind.css +1871 -20
  340. package/dist/types.d.ts +262 -16
  341. package/package.json +16 -21
@@ -0,0 +1,108 @@
1
+ import * as React from 'react';
2
+ import { type MPPickerLabels } from '../../internal/Calendar';
3
+ import { type MPPickerShellProps } from '../../internal/Picker';
4
+ import { type MPTimeUnit } from '../../internal/date';
5
+ /**
6
+ * Which column of the clock a row belongs to.
7
+ *
8
+ * Re-exported so a caller writing a `shouldDisableTime` rule can name the
9
+ * argument it is handed.
10
+ */
11
+ export type { MPTimeUnit };
12
+ export interface MPTimePickerProps extends MPPickerShellProps {
13
+ /**
14
+ * The chosen time. A `Date`, so it carries a day as well — see
15
+ * `referenceDate`.
16
+ */
17
+ value?: Date | null;
18
+ defaultValue?: Date | null;
19
+ onValueChange?: (value: Date | null) => void;
20
+ open?: boolean;
21
+ defaultOpen?: boolean;
22
+ onOpenChange?: (open: boolean) => void;
23
+ /**
24
+ * The day a chosen time is written onto while there is no value yet.
25
+ * @default today
26
+ */
27
+ referenceDate?: Date;
28
+ /** The earliest time of day that may be chosen. Only the clock is read. */
29
+ minTime?: Date | null;
30
+ /** The latest time of day that may be chosen. */
31
+ maxTime?: Date | null;
32
+ /**
33
+ * Blocks individual rows. Called once per row per column with the instant that
34
+ * row would produce and the column it is in, so a rule may be as coarse as
35
+ * "no afternoons" or as fine as one minute.
36
+ */
37
+ shouldDisableTime?: (value: Date, unit: MPTimeUnit) => boolean;
38
+ /** A 12-hour dial with an AM/PM column. Defaults to whatever the locale does. */
39
+ hour12?: boolean;
40
+ /**
41
+ * Adds the seconds column.
42
+ * @default false
43
+ */
44
+ showSeconds?: boolean;
45
+ /**
46
+ * How far apart the rows of each column are.
47
+ * @default 1
48
+ */
49
+ hourStep?: number;
50
+ minuteStep?: number;
51
+ secondStep?: number;
52
+ /**
53
+ * A BCP 47 tag deciding whether the clock is 12- or 24-hour, what AM and PM
54
+ * are called, and how the trigger writes the time. Falls back to the nearest
55
+ * `MPLocaleProvider`, then to the platform's own.
56
+ */
57
+ locale?: string;
58
+ /**
59
+ * How the trigger writes the chosen time. Passed straight to `Intl`.
60
+ * @default { hour: 'numeric', minute: '2-digit' }, plus seconds when shown
61
+ */
62
+ format?: Intl.DateTimeFormatOptions;
63
+ placeholder?: React.ReactNode;
64
+ clearable?: boolean;
65
+ /**
66
+ * Offers the shortcut to the current time in the footer.
67
+ * @default true
68
+ */
69
+ showNowButton?: boolean;
70
+ /**
71
+ * Closes the popup as soon as any column is touched.
72
+ *
73
+ * `false` by default, and unlike `MPDatePicker`: a time is two answers, and
74
+ * closing after the first one would make choosing 9:30 a matter of opening the
75
+ * popup twice.
76
+ * @default false
77
+ */
78
+ closeOnSelect?: boolean;
79
+ labels?: Partial<MPPickerLabels>;
80
+ /** Identifies the field when a form is submitted, as `HH:MM` (`HH:MM:SS`). */
81
+ name?: string;
82
+ }
83
+ /**
84
+ * A time of day, chosen from columns.
85
+ *
86
+ * The bounds are checked at the granularity of the column being drawn, which is
87
+ * the detail that separates a working time picker from a frustrating one. With a
88
+ * `minTime` of 09:30, the hour `9` stays available — the hour *contains* allowed
89
+ * minutes — and it is the minute column that greys out `00` through `25`. The
90
+ * naive check compares the whole candidate instant, hides the 9 entirely, and
91
+ * makes half past nine unreachable.
92
+ *
93
+ * The value is a `Date` rather than a string or a number of minutes, because
94
+ * everything else in this library that carries a moment is one, and because a
95
+ * time on its own has nowhere to record which day it is on — which is what
96
+ * decides whether it crossed a daylight-saving boundary. `referenceDate` is the
97
+ * day a bare time is written onto.
98
+ *
99
+ * ## Columns, not MD3's dial
100
+ *
101
+ * This is the one place the library knowingly draws something the specification
102
+ * draws differently, and the reason is in `internal/Calendar.tsx` next to the
103
+ * grid itself: a dial is a pointer control, MD3 ships a second "time input" mode
104
+ * precisely because a dial cannot serve a keyboard, and a component with two
105
+ * implementations of one question has the accessible one hidden behind a toggle.
106
+ * Columns answer both readers at once, in the library's own shapes.
107
+ */
108
+ export declare const MPTimePicker: React.ForwardRefExoticComponent<MPTimePickerProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as o}from"react/jsx-runtime";import*as n from"react";import{MPButton as l}from"../button/MPButton";import{MPIcon as r}from"../icon/MPIcon";import{ClockIcon as t}from"../../constants/icons";import{MPTimeGrid as a}from"../../internal/Calendar";import{FOOTER_SIZE as i,MPPickerFooter as s,MPPickerShell as c,useDisplaySamples as u}from"../../internal/Picker";import{useMPLocale as d,useMPMessages as m}from"../../internal/locale";import{CONTROL_ICON as p}from"../../internal/scale";import{formatDate as h,isHour12 as f,isValidDate as g,secondsOfDay as S,timeUnitSpan as b,toISOTime as v,withPlaceholder as C,withTime as x}from"../../internal/date";export const MPTimePicker=n.forwardRef(function({value:k,defaultValue:w,onValueChange:z,open:D,defaultOpen:O,onOpenChange:y,referenceDate:P,minTime:T,maxTime:M,shouldDisableTime:j,hour12:I,showSeconds:V=!1,hourStep:B=1,minuteStep:N=1,secondStep:R=1,locale:F,format:H,placeholder:q,clearable:A=!1,showNowButton:E=!0,closeOnSelect:G=!1,labels:J,name:K,size:L="md",color:Q="primary",readOnly:U=!1,disabled:W=!1,startIcon:X,...Y},Z){const $=d(F),_=m("picker",$,J),ee=I??f($),[oe,ne]=n.useState(w??null),le=void 0!==k?k:oe,[re,te]=n.useState(O??!1),ae=D??re,[ie]=n.useState(()=>P??new Date),se=e=>{e&&(U||W)||(void 0===D&&te(e),y?.(e))},ce=e=>{void 0===k&&ne(e),z?.(e)},ue=n.useCallback((e,o)=>{const[n,l]=b(o,e);return!!(g(T)&&l<S(T))||(!!(g(M)&&n>S(M))||(j?.(e,o)??!1))},[T,M,j]),de=H??{hour:"numeric",minute:"2-digit",hour12:ee,...V?{second:"2-digit"}:{}},me=new Date,pe=x(P??ie,{hours:me.getHours(),minutes:me.getMinutes(),seconds:V?me.getSeconds():0}),he=E||A||!G,fe=C(u($,de),q);return e(c,{...Y,slug:"time-picker",size:L,color:Q,readOnly:U,disabled:W,triggerRef:Z,startIcon:void 0===X?e(r,{icon:t,size:p[L]}):X,display:g(le)?h(le,$,de):q??"",samples:fe,empty:!g(le),clearable:A,onClear:()=>ce(null),open:ae,onOpenChange:se,labels:_,hiddenValues:K?[{name:K,value:g(le)?v(le,V):""}]:void 0,children:o("div",{className:"flex flex-col "+(he?"gap-1.5":""),children:[e(a,{size:L,locale:$,value:g(le)?le:null,referenceDate:P??ie,onChange:e=>{ce(e),G&&se(!1)},hour12:ee,showSeconds:V,hourStep:B,minuteStep:N,secondStep:R,shouldDisableTime:ue,labels:_,autoFocus:!0}),he?o(s,{children:[A?e(l,{variant:"text",size:i[L],color:Q,onClick:()=>{ce(null),se(!1)},children:_.clear}):null,E?e(l,{variant:"text",size:i[L],color:Q,disabled:ue(pe,"second"),onClick:()=>{ce(pe),se(!1)},children:_.now}):null,G?null:e(l,{variant:"filled",size:i[L],color:Q,onClick:()=>se(!1),children:_.done})]}):null]})})});
@@ -0,0 +1,2 @@
1
+ export { MPTimePicker } from './MPTimePicker';
2
+ export type { MPTimePickerProps, MPTimeUnit } from './MPTimePicker';
@@ -0,0 +1 @@
1
+ export{MPTimePicker}from"./MPTimePicker";
@@ -0,0 +1,96 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { MPColor, MPOrientation, MPSize } from '../../types';
4
+ /**
5
+ * How far along one item is.
6
+ *
7
+ * Three states rather than two, because "the one you are on" is not the same
8
+ * claim as "done", and a sequence that cannot say which step is current is a
9
+ * list. Each gets its own axis — a filled bullet, a filled bullet with a halo
10
+ * around it, an empty one — rather than three shades of the same thing.
11
+ */
12
+ export type MPTimelineStatus = 'complete' | 'current' | 'upcoming';
13
+ /** How the line between two items is drawn. `none` leaves the gap open. */
14
+ export type MPTimelineConnector = 'solid' | 'dashed' | 'dotted' | 'none';
15
+ export interface MPTimelineProps extends Omit<React.ComponentPropsWithoutRef<'ol'>, 'color'> {
16
+ /**
17
+ * How far the sequence has got: the index of the item being worked on now.
18
+ * Everything before it is complete, everything after it is still to come.
19
+ *
20
+ * An index rather than a value, because a timeline has no selection — nothing
21
+ * here is chosen, and the only question is how far down the list reality has
22
+ * reached. Omit it and every item is `upcoming` unless it says otherwise; pass
23
+ * the item count to mark the whole sequence done.
24
+ */
25
+ active?: number;
26
+ /** @default 'md' */
27
+ size?: MPSize;
28
+ /** @default 'primary' */
29
+ color?: MPColor;
30
+ /**
31
+ * Which way the sequence runs. `vertical` is the default and the one that
32
+ * takes an arbitrary number of steps with an arbitrary amount to say about
33
+ * each; `horizontal` is the stepper across the top of a checkout, and it is
34
+ * only honest while every label is short.
35
+ * @default 'vertical'
36
+ */
37
+ orientation?: MPOrientation;
38
+ /** Renders something other than an `<ol>` — Base UI's own escape hatch. */
39
+ render?: useRender.RenderProp;
40
+ children?: React.ReactNode;
41
+ }
42
+ export interface MPTimelineItemProps extends Omit<React.ComponentPropsWithoutRef<'li'>, 'color' | 'title'> {
43
+ /** The heading of this step. */
44
+ title?: React.ReactNode;
45
+ /**
46
+ * When it happened — a date, a duration, a name. Set beside the title on a
47
+ * wide item and under it on a narrow one.
48
+ */
49
+ meta?: React.ReactNode;
50
+ /**
51
+ * What goes inside the bullet: a number, an icon, an avatar. Omit it and the
52
+ * bullet is a plain disc, which is what a step with nothing to say about
53
+ * itself should be.
54
+ */
55
+ bullet?: React.ReactNode;
56
+ /**
57
+ * Overrides what the timeline's `active` would have computed for this item — a
58
+ * step that failed and stopped the sequence, a step that was skipped.
59
+ */
60
+ status?: MPTimelineStatus;
61
+ /** Overrides the timeline's accent family for this item alone. */
62
+ color?: MPColor;
63
+ /**
64
+ * How the line to the next item is drawn.
65
+ * @default 'solid'
66
+ */
67
+ connector?: MPTimelineConnector;
68
+ /** The body of the step. */
69
+ children?: React.ReactNode;
70
+ }
71
+ /**
72
+ * One step.
73
+ *
74
+ * Its index is not a prop and cannot be: an item that had to be told where it
75
+ * was in the list would be an item every caller could put in the wrong place,
76
+ * and `active={2}` would stop meaning anything. The timeline numbers its
77
+ * children as it walks them and hands each one its index through a context.
78
+ */
79
+ export declare const MPTimelineItem: React.ForwardRefExoticComponent<MPTimelineItemProps & React.RefAttributes<HTMLLIElement>>;
80
+ /**
81
+ * A sequence of steps, in the order they happen in.
82
+ *
83
+ * There is no Base UI primitive under this and there should not be: a timeline
84
+ * has no selection, no roving focus and no keyboard contract — it is a list, and
85
+ * reaching for a composite primitive to draw one would hand every consumer's
86
+ * record of events the semantics of a widget.
87
+ *
88
+ * It is an `<ol>` for the reason it exists at all: the order *is* the content. A
89
+ * screen reader announcing "list of 5 items" over an unordered list would be
90
+ * describing something else.
91
+ *
92
+ * The children are numbered here rather than by a prop on each item, so `active`
93
+ * has something to count against and inserting a step in the middle does not
94
+ * mean renumbering the ones after it.
95
+ */
96
+ export declare const MPTimeline: React.ForwardRefExoticComponent<MPTimelineProps & React.RefAttributes<HTMLOListElement>>;
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as t from"react";import{useRender as n}from"@base-ui/react/use-render";import{accentSlots as l}from"../../internal/accent";import{hasContent as a,META_TEXT as o,PROSE_TEXT as i,SHEET_TITLE as s}from"../../internal/scale";const c=t.createContext(null),m=t.createContext({index:0,last:!1}),p={xs:"0.875rem",sm:"1rem",md:"1.25rem",lg:"1.5rem",xl:"1.875rem"},d={xs:"gap-2",sm:"gap-2.5",md:"gap-3",lg:"gap-3.5",xl:"gap-4"},u={xs:"pb-5",sm:"pb-6",md:"pb-7",lg:"pb-8",xl:"pb-10"},x={xs:"pe-5",sm:"pe-6",md:"pe-7",lg:"pe-8",xl:"pe-10"},f={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted",none:""},b={complete:"bg-(--_mp-accent) text-(--_mp-on-accent)",current:"bg-(--_mp-accent) text-(--_mp-on-accent) shadow-[0_0_0_0.25rem_var(--_mp-accent-container)]",upcoming:"border-mp-outline text-mp-on-surface-variant border-2 bg-transparent"},v={complete:"border-(--_mp-accent)",current:"border-mp-outline-variant",upcoming:"border-mp-outline-variant"},h={complete:"text-mp-on-surface",current:"text-(--_mp-accent)",upcoming:"text-mp-on-surface-variant"};export const MPTimelineItem=t.forwardRef(function({title:n,meta:g,bullet:_,status:N,color:y,connector:z="solid",className:j,style:w,children:$,...C},M){const P=t.useContext(c),{index:B,last:k}=t.useContext(m),A=P?.size??"md",R=P?.orientation??"vertical",T=y??P?.color??"primary",I=P?.active??null,q=N??(null===I?"upcoming":B<I?"complete":B===I?"current":"upcoming"),D="horizontal"===R,E="none"!==z&&!k,F=e("span",{"aria-hidden":"true",className:["rounded-mp-full relative z-10 flex shrink-0 items-center justify-center","size-(--_mp-bullet) text-[calc(var(--_mp-bullet)*0.5)] leading-none font-medium","tabular-nums [&>svg]:size-[0.6em]",b[q],"transition-[background-color,border-color,box-shadow,color]","duration-(--mp-sys-motion-duration-short4)"].join(" "),children:_}),G=E?e("span",{"aria-hidden":"true",className:["pointer-events-none absolute",D?"start-(--_mp-bullet) top-[calc(var(--_mp-bullet)/2_-_1px)] end-0 border-t-2":"top-(--_mp-bullet) start-[calc(var(--_mp-bullet)/2_-_1px)] bottom-0 border-s-2",f[z],v[q]].filter(Boolean).join(" ")}):null,H=r("div",{className:"flex min-w-0 flex-col gap-0.5 "+(D?"mt-2":""),children:[a(n)||a(g)?r("div",{className:"flex flex-wrap items-baseline gap-x-2",children:[a(n)?e("span",{className:`${s[A]} ${h[q]}`,children:n}):null,a(g)?e("span",{className:`text-mp-on-surface-variant ${o}`,children:g}):null]}):null,a($)?e("div",{className:`text-mp-on-surface-variant ${i[A]}`,children:$}):null]});return r("li",{ref:M,"aria-current":"current"===q?"step":void 0,"data-status":q,className:["relative",D?`flex min-w-0 flex-1 flex-col ${k?"":x[A]}`:`flex ${d[A]} ${k?"":u[A]}`,j??""].filter(Boolean).join(" "),style:{"--_mp-bullet":p[A],...l(T),...w},...C,children:[G,F,H]})});export const MPTimeline=t.forwardRef(function({active:r,size:l="md",color:a="primary",orientation:o="vertical",render:i,className:s,style:p,children:d,...u},x){const f=t.Children.toArray(d),b=f.length,v=t.useMemo(()=>({size:l,orientation:o,color:a,active:r??null}),[l,o,a,r]),h=t.useMemo(()=>Array.from({length:b},(e,r)=>({index:r,last:r===b-1})),[b]),g=n({render:i??e("ol",{}),ref:x,props:{role:"list","data-mp-size":l,className:["mp-timeline flex","horizontal"===o?"flex-row":"flex-col",s??""].filter(Boolean).join(" "),style:p,children:f.map((r,t)=>e(m.Provider,{value:h[t],children:r},t)),...u}});return e(c.Provider,{value:v,children:g})});
@@ -0,0 +1,2 @@
1
+ export { MPTimeline, MPTimelineItem } from './MPTimeline';
2
+ export type { MPTimelineConnector, MPTimelineItemProps, MPTimelineProps, MPTimelineStatus } from './MPTimeline';
@@ -0,0 +1 @@
1
+ export{MPTimeline,MPTimelineItem}from"./MPTimeline";
@@ -0,0 +1,117 @@
1
+ import * as React from 'react';
2
+ import { Tooltip as BaseUITooltip } from '@base-ui/react/tooltip';
3
+ import type { MPAlign, MPColor, MPSide, MPSize } from '../../types';
4
+ export interface MPTooltipProps {
5
+ /**
6
+ * What the tooltip says.
7
+ *
8
+ * A short phrase. A tooltip is not a container — it cannot be reached by a
9
+ * pointer on a touch screen, it disappears the moment attention moves, and
10
+ * anything inside it that could be clicked cannot be. Content that needs
11
+ * either of those wants a popover, not this.
12
+ */
13
+ content: React.ReactNode;
14
+ /**
15
+ * The element the tooltip hangs off. Exactly one element, which must accept a
16
+ * ref and spread props — every Material Plus component does.
17
+ */
18
+ children: React.ReactElement;
19
+ /**
20
+ * Which edge of the trigger it appears on. May flip to the opposite side when
21
+ * there is no room, which is Base UI's doing and is the right behaviour.
22
+ * @default 'top'
23
+ */
24
+ side?: MPSide;
25
+ /**
26
+ * Where it sits along that edge.
27
+ * @default 'center'
28
+ */
29
+ align?: MPAlign;
30
+ /**
31
+ * Distance from the trigger, in pixels.
32
+ * @default 6
33
+ */
34
+ sideOffset?: number;
35
+ /**
36
+ * How long the pointer has to rest before it opens, in milliseconds.
37
+ */
38
+ delay?: number;
39
+ /** How long it waits before closing once the pointer leaves. */
40
+ closeDelay?: number;
41
+ /**
42
+ * Draws the little wedge pointing at the trigger.
43
+ * @default true
44
+ */
45
+ arrow?: boolean;
46
+ /** Whether the tooltip is open. Use with `onOpenChange` for a controlled one. */
47
+ open?: boolean;
48
+ /** Whether it starts open, for an uncontrolled one. */
49
+ defaultOpen?: boolean;
50
+ onOpenChange?: (open: boolean) => void;
51
+ /**
52
+ * Stops the tooltip from opening at all, without disabling the trigger. For
53
+ * the tooltip that only exists while a label is truncated.
54
+ * @default false
55
+ */
56
+ disabled?: boolean;
57
+ /**
58
+ * @default 'sm'
59
+ */
60
+ size?: MPSize;
61
+ /**
62
+ * Which accent family the plate is painted in.
63
+ *
64
+ * **No default**, and this is the third component in the library with none —
65
+ * for the strongest reason of the three. MD3's plain tooltip is
66
+ * `inverse-surface` under `inverse-on-surface`: the neutral palette read at
67
+ * the *other* end of the scheme, so the plate is dark on a light page and
68
+ * light on a dark one. That is what makes a tooltip legible over content it
69
+ * was never designed against, which is the only content a tooltip ever
70
+ * appears over.
71
+ *
72
+ * Setting it swaps in an accent fill. Worth doing for a tooltip that is itself
73
+ * a warning; wrong for the other ninety-nine, because a red tooltip on a
74
+ * delete button is saying something the tooltip does not know.
75
+ */
76
+ color?: MPColor;
77
+ className?: string;
78
+ style?: React.CSSProperties;
79
+ }
80
+ /**
81
+ * Shares one delay across a group of tooltips: once any of them has opened, its
82
+ * neighbours open instantly, and the wait comes back after a pause.
83
+ *
84
+ * Worth wrapping a toolbar in. Without it, moving along a row of icon buttons
85
+ * means waiting out the full delay at every stop, which is what makes tooltips
86
+ * feel like they are fighting the pointer.
87
+ */
88
+ export declare const MPTooltipProvider: React.FC<import("@base-ui/react").TooltipProviderProps>;
89
+ export type MPTooltipProviderProps = React.ComponentProps<typeof BaseUITooltip.Provider>;
90
+ /**
91
+ * A short label that appears when the pointer rests on something.
92
+ *
93
+ * The whole component is a wrapper:
94
+ * `<MPTooltip content="Copy"><MPButton …/></MPTooltip>`. Base UI's trigger merges
95
+ * itself onto the child rather than rendering a box of its own, so the tooltip
96
+ * adds no element to the layout and the child stays whatever it was — a button,
97
+ * a chip, a truncated cell.
98
+ *
99
+ * Base UI owns the parts that are genuinely hard: the delay and the group
100
+ * timeout, opening on focus but not on a focus that came from a click, closing
101
+ * on Escape, and keeping the popup off the edges of the window.
102
+ *
103
+ * The one thing it deliberately leaves open is the part that makes a tooltip
104
+ * mean anything to a screen reader — `role="tooltip"` on the plate and an
105
+ * `aria-describedby` pointing at it from the trigger — because a popup can be
106
+ * many things and only the caller knows which. Here it is always a tooltip, so
107
+ * this component wires both, and drops the reference while it is closed rather
108
+ * than pointing at an element that is not in the document.
109
+ *
110
+ * ## No shadow
111
+ *
112
+ * MD3 puts a plain tooltip at elevation 0, and this follows it. What separates
113
+ * the plate from the page is that it is the *inverse* surface — a dark card on a
114
+ * light page — and a shadow under something already that far from its background
115
+ * reads as a second, softer edge rather than as height.
116
+ */
117
+ export declare function MPTooltip({ content, children, size, color, side, align, sideOffset, delay, closeDelay, arrow, open, defaultOpen, onOpenChange, disabled, className, style }: MPTooltipProps): React.JSX.Element;
@@ -0,0 +1 @@
1
+ import{jsx as t,jsxs as o}from"react/jsx-runtime";import*as e from"react";import{Tooltip as a}from"@base-ui/react/tooltip";import{accentSlots as i}from"../../internal/accent";export const MPTooltipProvider=a.Provider;const l={xs:"py-0.5",sm:"py-1",md:"py-1",lg:"py-1.5",xl:"py-2"},r={xs:"px-1.5",sm:"px-2",md:"px-2",lg:"px-3",xl:"px-4"},s={xs:"text-mp-body-small",sm:"text-mp-body-small",md:"text-mp-body-small",lg:"text-mp-body-medium",xl:"text-mp-body-medium"},d={xs:6,sm:7,md:8,lg:9,xl:10};export function MPTooltip({content:p,children:n,size:m="sm",color:c,side:x="top",align:y="center",sideOffset:u=6,delay:h,closeDelay:f,arrow:g=!0,open:b,defaultOpen:v,onOpenChange:_,disabled:P=!1,className:O,style:j}){const w=d[m],N=e.useId(),[z,T]=e.useState(v??!1),M=b??z,B={"--_mp-tooltip":c?`var(--_mp-color-${c})`:"var(--_mp-color-inverse-surface)","--_mp-on-tooltip":c?`var(--_mp-color-on-${c})`:"var(--_mp-color-inverse-on-surface)",...c?i(c):null};return o(a.Root,{open:b,defaultOpen:v,onOpenChange:t=>{T(t),_?.(t)},children:[t(a.Trigger,{render:n,delay:h,closeDelay:f,disabled:P,"aria-describedby":M?N:void 0}),t(a.Portal,{children:t(a.Positioner,{className:"mp-portal z-50 outline-none",side:x,align:y,sideOffset:u,children:o(a.Popup,{id:N,role:"tooltip","data-mp-size":m,className:["mp-tooltip rounded-mp-xs max-w-64 outline-none","bg-(--_mp-tooltip) text-(--_mp-on-tooltip)","transition-opacity duration-(--mp-sys-motion-duration-short4)","data-starting-style:opacity-0 data-ending-style:opacity-0","data-instant:duration-0",r[m],l[m],s[m],O??""].filter(Boolean).join(" "),style:{...B,...j},children:[g?t(a.Arrow,{className:["data-[side=top]:bottom-[-1px]","data-[side=bottom]:top-[-1px] data-[side=bottom]:rotate-180","data-[side=left]:right-[-1px] data-[side=left]:-rotate-90","data-[side=right]:left-[-1px] data-[side=right]:rotate-90"].join(" "),children:t("svg",{width:w,height:w/2,viewBox:"0 0 10 5","aria-hidden":"true",className:"block",children:t("path",{d:"M0 0h10L5 5z",fill:"var(--_mp-tooltip)"})})}):null,p]})})})]})}
@@ -0,0 +1,2 @@
1
+ export { MPTooltip, MPTooltipProvider } from './MPTooltip';
2
+ export type { MPTooltipProps, MPTooltipProviderProps } from './MPTooltip';
@@ -0,0 +1 @@
1
+ export{MPTooltip,MPTooltipProvider}from"./MPTooltip";
@@ -0,0 +1,94 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { MPColor } from '../../types';
4
+ /**
5
+ * What a piece of text *is*, which decides both its type scale and the element
6
+ * it renders as.
7
+ *
8
+ * This is deliberately not called `variant`. In this library `variant` means how
9
+ * much of a surface a component paints — `filled` / `tonal` / `elevated` /
10
+ * `outlined` / `text` — and a second meaning for the same word is exactly what
11
+ * the prop conventions forbid.
12
+ *
13
+ * The names are the document's rather than the specification's, and that is the
14
+ * one place this component's vocabulary is not MD3's. The reason is that these
15
+ * values pick an **element**: `h2` has to be spelled `h2` because what it emits
16
+ * is an `<h2>`, and a caller who wrote `level="headline-large"` would have no
17
+ * way to say which heading level they meant. The Material role each one is set
18
+ * in is in the table on `LEVEL_TEXT` below, and is what a reader actually sees.
19
+ */
20
+ export type MPTypographyLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body' | 'lead' | 'caption' | 'overline';
21
+ /**
22
+ * How the text is set against its measure.
23
+ *
24
+ * `start` and `end` rather than `left` and `right` — the same rule `MPAlign`
25
+ * follows — plus `justify`, which is the one value that is about the paragraph
26
+ * rather than about which edge it hangs off, and so has no place in the shared
27
+ * type.
28
+ */
29
+ export type MPTypographyAlign = 'start' | 'center' | 'end' | 'justify';
30
+ export type MPTypographyWeight = 'regular' | 'medium' | 'semibold' | 'bold';
31
+ export interface MPTypographyProps extends Omit<React.ComponentPropsWithoutRef<'p'>, 'color' | 'children'> {
32
+ /**
33
+ * The type scale, and the element that carries it. `h1`–`h6` render the
34
+ * matching heading, `lead`/`body` a `<p>`, `caption`/`overline` a `<span>`.
35
+ * @default 'body'
36
+ */
37
+ level?: MPTypographyLevel;
38
+ /**
39
+ * Which accent family the text reads. Unlike every control in the library this
40
+ * has **no default**: prose inherits the surface's own ink unless a role is
41
+ * asked for, because the common case for a paragraph is to look like the
42
+ * paragraphs around it.
43
+ */
44
+ color?: MPColor;
45
+ /**
46
+ * Overrides the weight the level would otherwise pick.
47
+ *
48
+ * Worth knowing before reaching for it: **Material headings are not bold.**
49
+ * Every display, headline and `title-large` role in MD3 is weight 400, and
50
+ * that is what `level` hands out. A heading set in 600 is the single fastest
51
+ * way to make a Material page look like it belongs to some other system.
52
+ */
53
+ weight?: MPTypographyWeight;
54
+ align?: MPTypographyAlign;
55
+ /**
56
+ * Clamps the text to this many lines with an ellipsis. `1` is a single-line
57
+ * truncation. Omit it and the text wraps as far as it needs to.
58
+ */
59
+ lines?: number;
60
+ /**
61
+ * Adds the space below that a run of prose expects. Off by default: a library
62
+ * component that injects margins is one a layout has to fight.
63
+ * @default false
64
+ */
65
+ gutter?: boolean;
66
+ /**
67
+ * Renders a different element without changing the type scale — an `h2`-sized
68
+ * line that is semantically a `<p>`, or the other way round. Base UI's own
69
+ * escape hatch.
70
+ */
71
+ render?: useRender.RenderProp;
72
+ children?: React.ReactNode;
73
+ }
74
+ /**
75
+ * Text at one of Material's type roles.
76
+ *
77
+ * The type scale is the one thing in a design system that everything else is
78
+ * measured against, and until now it only existed inside the components that
79
+ * happened to need it — a text field's label, a button's. This is that ladder on
80
+ * its own, so a page can set a heading in the same `headline-large` its
81
+ * components are built out of without wrapping it in a control.
82
+ *
83
+ * `level` sets the scale *and* the element, which is the common case. When they
84
+ * have to differ — a subheading that should not enter the document outline, a
85
+ * `<p>` that has to look like an `h3` — `render` breaks the tie.
86
+ *
87
+ * ## It is not on the size ladder
88
+ *
89
+ * There is no `size` prop, and that is the same call `MPIcon` makes. `MPSize` is
90
+ * a *control* ladder: `md` means 56px tall, and a paragraph has no height to
91
+ * pick from a scale. `level` is this component's scale, and it is the Material
92
+ * one rather than five steps of the library's own.
93
+ */
94
+ export declare const MPTypography: React.ForwardRefExoticComponent<MPTypographyProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1 @@
1
+ import*as p from"react";import{useRender as t}from"@base-ui/react/use-render";import{accentSlots as e}from"../../internal/accent";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"},o=new Set(["caption","overline"]),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"},h="[&.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"},n={start:"text-start",center:"text-center",end:"text-end",justify:"text-justify"},g={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=p.forwardRef(function({level:i="body",color:c,weight:d,align:s,lines:u,gutter:b=!1,render:x,className:f,style:v,children:j,...w},N){const k=["mp-typography",r[i],l[d??a[i]],h,b?y[i]:"[&.mp-typography]:mb-0",s?n[s]:"",u?g[u]??"line-clamp-6":"",c?"[&.mp-typography]:text-(--_mp-accent)":o.has(i)?"[&.mp-typography]:text-mp-on-surface-variant":"[&.mp-typography]:text-mp-on-surface",f??""].filter(Boolean).join(" ");return t({render:x??p.createElement(m[i]),ref:N,props:{className:k,style:c?{...e(c),...v}:v,children:j,...w}})});
@@ -0,0 +1,2 @@
1
+ export { MPTypography } from './MPTypography';
2
+ export type { MPTypographyAlign, MPTypographyLevel, MPTypographyProps, MPTypographyWeight } from './MPTypography';
@@ -0,0 +1 @@
1
+ export{MPTypography}from"./MPTypography";
@@ -14,8 +14,24 @@ export declare const ChevronUpIcon: import("react").ForwardRefExoticComponent<Om
14
14
  export declare const ChevronLeftIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
15
15
  /** Next, in a pager or a carousel. */
16
16
  export declare const ChevronRightIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
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>>;
19
+ /** And last. */
20
+ export declare const ChevronsRightIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
17
21
  /** Search, for a field's leading adornment. */
18
22
  export declare const SearchIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
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>>;
25
+ /** Sorted descending. */
26
+ export declare const ArrowDownIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
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>>;
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>>;
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>>;
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>>;
19
35
  /** Copy to clipboard. */
20
36
  export declare const CopyIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
21
37
  /** Severity: something worth knowing. */
@@ -26,6 +42,24 @@ export declare const SuccessIcon: import("react").ForwardRefExoticComponent<Omit
26
42
  export declare const WarningIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
27
43
  /** Severity: it did not work. */
28
44
  export declare const ErrorIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
45
+ /** One step up: a number field's increment. */
46
+ export declare const AddIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
47
+ /** One step down: a number field's decrement, and a half-ticked checkbox. */
48
+ export declare const RemoveIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
49
+ /** Send a file the other way. A file picker's dropzone. */
50
+ export declare const UploadIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
51
+ /** A day on a calendar: what a date picker's trigger wears. */
52
+ export declare const CalendarIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
53
+ /** A time of day: what a time picker's trigger wears. */
54
+ export declare const ClockIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
55
+ /**
56
+ * A score. Drawn as an outline, and filled by whatever is scoring with it —
57
+ * lucide draws it `fill="none"`, and `MPRating` overlays a copy in `fill-current`
58
+ * rather than shipping a second glyph.
59
+ */
60
+ export declare const StarIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
61
+ /** Work in progress, spun by whatever is waiting on it. */
62
+ export declare const SpinnerIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
29
63
  /**
30
64
  * The same glyphs, keyed by role.
31
65
  *
@@ -44,12 +78,27 @@ export declare const ICONS: {
44
78
  readonly 'chevron-up': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
45
79
  readonly 'chevron-left': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
46
80
  readonly 'chevron-right': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
81
+ readonly 'chevrons-left': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
82
+ readonly 'chevrons-right': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
47
83
  readonly search: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
84
+ readonly 'arrow-up': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
85
+ readonly 'arrow-down': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
86
+ readonly 'arrow-right': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
87
+ readonly more: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
88
+ readonly link: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
89
+ readonly 'external-link': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
48
90
  readonly copy: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
49
91
  readonly info: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
50
92
  readonly success: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
51
93
  readonly warning: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
52
94
  readonly error: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
95
+ readonly add: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
96
+ readonly remove: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
97
+ readonly upload: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
98
+ readonly calendar: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
99
+ readonly clock: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
100
+ readonly star: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
101
+ readonly spinner: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
53
102
  };
54
103
  /** Every role name `ICONS` answers to. */
55
104
  export type MPIconName = keyof typeof ICONS;
@@ -1 +1 @@
1
- import{Check as o,ChevronDown as n,ChevronLeft as c,ChevronRight as r,ChevronUp as e,CircleAlert as t,CircleCheck as i,Copy as s,Eye as I,EyeOff as p,Info as h,Search as x,TriangleAlert as C,X as v}from"lucide-react";export const VisibilityIcon=I;export const VisibilityOffIcon=p;export const CloseIcon=v;export const CheckIcon=o;export const ChevronDownIcon=n;export const ChevronUpIcon=e;export const ChevronLeftIcon=c;export const ChevronRightIcon=r;export const SearchIcon=x;export const CopyIcon=s;export const InfoIcon=h;export const SuccessIcon=i;export const WarningIcon=C;export const ErrorIcon=t;export const ICONS={visibility:VisibilityIcon,"visibility-off":VisibilityOffIcon,close:CloseIcon,check:CheckIcon,"chevron-down":ChevronDownIcon,"chevron-up":ChevronUpIcon,"chevron-left":ChevronLeftIcon,"chevron-right":ChevronRightIcon,search:SearchIcon,copy:CopyIcon,info:InfoIcon,success:SuccessIcon,warning:WarningIcon,error:ErrorIcon};
1
+ import{ArrowDown as o,ArrowRight as n,ArrowUp as c,CalendarDays as r,Check as t,ChevronDown as e,ChevronLeft as I,ChevronRight as s,ChevronsLeft as i,ChevronsRight as p,ChevronUp as h,CircleAlert as x,CircleCheck as a,Clock as l,Copy as v,Ellipsis as C,ExternalLink as f,Eye as w,EyeOff as d,Info as g,Link as k,LoaderCircle as y,Minus as S,Plus as A,Search as L,Star as R,TriangleAlert as u,Upload as b,X as m}from"lucide-react";export const VisibilityIcon=w;export const VisibilityOffIcon=d;export const CloseIcon=m;export const CheckIcon=t;export const ChevronDownIcon=e;export const ChevronUpIcon=h;export const ChevronLeftIcon=I;export const ChevronRightIcon=s;export const ChevronsLeftIcon=i;export const ChevronsRightIcon=p;export const SearchIcon=L;export const ArrowUpIcon=c;export const ArrowDownIcon=o;export const ArrowRightIcon=n;export const MoreIcon=C;export const LinkIcon=k;export const ExternalLinkIcon=f;export const CopyIcon=v;export const InfoIcon=g;export const SuccessIcon=a;export const WarningIcon=u;export const ErrorIcon=x;export const AddIcon=A;export const RemoveIcon=S;export const UploadIcon=b;export const CalendarIcon=r;export const ClockIcon=l;export const StarIcon=R;export const SpinnerIcon=y;export const ICONS={visibility:VisibilityIcon,"visibility-off":VisibilityOffIcon,close:CloseIcon,check:CheckIcon,"chevron-down":ChevronDownIcon,"chevron-up":ChevronUpIcon,"chevron-left":ChevronLeftIcon,"chevron-right":ChevronRightIcon,"chevrons-left":ChevronsLeftIcon,"chevrons-right":ChevronsRightIcon,search:SearchIcon,"arrow-up":ArrowUpIcon,"arrow-down":ArrowDownIcon,"arrow-right":ArrowRightIcon,more:MoreIcon,link:LinkIcon,"external-link":ExternalLinkIcon,copy:CopyIcon,info:InfoIcon,success:SuccessIcon,warning:WarningIcon,error:ErrorIcon,add:AddIcon,remove:RemoveIcon,upload:UploadIcon,calendar:CalendarIcon,clock:ClockIcon,star:StarIcon,spinner:SpinnerIcon};