material-plus-ui 1.3.0 → 1.4.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 (551) hide show
  1. package/README.md +4 -3
  2. package/dist/components/accordion/MPAccordion.d.ts +1 -1
  3. package/dist/components/accordion/MPAccordion.js +2 -1
  4. package/dist/components/accordion/index.d.ts +2 -2
  5. package/dist/components/accordion/index.js +1 -1
  6. package/dist/components/alert/MPAlert.d.ts +27 -1
  7. package/dist/components/alert/MPAlert.js +2 -1
  8. package/dist/components/alert/index.d.ts +2 -2
  9. package/dist/components/alert/index.js +1 -1
  10. package/dist/components/animate-appear/MPAnimateAppear.d.ts +1 -1
  11. package/dist/components/animate-appear/MPAnimateAppear.js +2 -1
  12. package/dist/components/animate-appear/index.d.ts +2 -2
  13. package/dist/components/animate-appear/index.js +1 -1
  14. package/dist/components/animate-blink/MPAnimateBlink.d.ts +1 -1
  15. package/dist/components/animate-blink/MPAnimateBlink.js +1 -1
  16. package/dist/components/animate-blink/index.d.ts +2 -2
  17. package/dist/components/animate-blink/index.js +1 -1
  18. package/dist/components/animate-fade/MPAnimateFade.d.ts +1 -1
  19. package/dist/components/animate-fade/MPAnimateFade.js +1 -1
  20. package/dist/components/animate-fade/index.d.ts +2 -2
  21. package/dist/components/animate-fade/index.js +1 -1
  22. package/dist/components/animate-grow/MPAnimateGrow.d.ts +1 -1
  23. package/dist/components/animate-grow/MPAnimateGrow.js +1 -1
  24. package/dist/components/animate-grow/index.d.ts +2 -2
  25. package/dist/components/animate-grow/index.js +1 -1
  26. package/dist/components/animate-headline/MPAnimateHeadline.d.ts +1 -1
  27. package/dist/components/animate-headline/MPAnimateHeadline.js +2 -1
  28. package/dist/components/animate-headline/index.d.ts +2 -2
  29. package/dist/components/animate-headline/index.js +1 -1
  30. package/dist/components/animate-lighting/MPAnimateLighting.d.ts +1 -1
  31. package/dist/components/animate-lighting/MPAnimateLighting.js +1 -1
  32. package/dist/components/animate-lighting/index.d.ts +2 -2
  33. package/dist/components/animate-lighting/index.js +1 -1
  34. package/dist/components/animate-marquee/MPAnimateMarquee.d.ts +1 -1
  35. package/dist/components/animate-marquee/MPAnimateMarquee.js +2 -1
  36. package/dist/components/animate-marquee/index.d.ts +2 -2
  37. package/dist/components/animate-marquee/index.js +1 -1
  38. package/dist/components/animate-rotate/MPAnimateRotate.d.ts +1 -1
  39. package/dist/components/animate-rotate/MPAnimateRotate.js +1 -1
  40. package/dist/components/animate-rotate/index.d.ts +2 -2
  41. package/dist/components/animate-rotate/index.js +1 -1
  42. package/dist/components/animate-slide/MPAnimateSlide.d.ts +1 -1
  43. package/dist/components/animate-slide/MPAnimateSlide.js +1 -1
  44. package/dist/components/animate-slide/index.d.ts +2 -2
  45. package/dist/components/animate-slide/index.js +1 -1
  46. package/dist/components/animate-typing/MPAnimateTyping.d.ts +1 -1
  47. package/dist/components/animate-typing/MPAnimateTyping.js +2 -1
  48. package/dist/components/animate-typing/index.d.ts +2 -2
  49. package/dist/components/animate-typing/index.js +1 -1
  50. package/dist/components/animate-zoom/MPAnimateZoom.d.ts +1 -1
  51. package/dist/components/animate-zoom/MPAnimateZoom.js +1 -1
  52. package/dist/components/animate-zoom/index.d.ts +2 -2
  53. package/dist/components/animate-zoom/index.js +1 -1
  54. package/dist/components/aspect-ratio/MPAspectRatio.d.ts +1 -1
  55. package/dist/components/aspect-ratio/MPAspectRatio.js +1 -1
  56. package/dist/components/aspect-ratio/index.d.ts +2 -2
  57. package/dist/components/aspect-ratio/index.js +1 -1
  58. package/dist/components/avatar/MPAvatar.d.ts +1 -1
  59. package/dist/components/avatar/MPAvatar.js +2 -1
  60. package/dist/components/avatar/index.d.ts +2 -2
  61. package/dist/components/avatar/index.js +1 -1
  62. package/dist/components/avatar-group/MPAvatarGroup.d.ts +74 -0
  63. package/dist/components/avatar-group/MPAvatarGroup.js +2 -0
  64. package/dist/components/avatar-group/index.d.ts +2 -0
  65. package/dist/components/avatar-group/index.js +1 -0
  66. package/dist/components/badge/MPBadge.d.ts +1 -1
  67. package/dist/components/badge/MPBadge.js +2 -1
  68. package/dist/components/badge/index.d.ts +2 -2
  69. package/dist/components/badge/index.js +1 -1
  70. package/dist/components/blockquote/MPBlockquote.d.ts +1 -1
  71. package/dist/components/blockquote/MPBlockquote.js +2 -1
  72. package/dist/components/blockquote/index.d.ts +2 -2
  73. package/dist/components/blockquote/index.js +1 -1
  74. package/dist/components/bottom-navigation/MPBottomNavigation.d.ts +1 -1
  75. package/dist/components/bottom-navigation/MPBottomNavigation.js +2 -1
  76. package/dist/components/bottom-navigation/index.d.ts +2 -2
  77. package/dist/components/bottom-navigation/index.js +1 -1
  78. package/dist/components/box/MPBox.d.ts +1 -1
  79. package/dist/components/box/MPBox.js +1 -1
  80. package/dist/components/box/index.d.ts +2 -2
  81. package/dist/components/box/index.js +1 -1
  82. package/dist/components/breadcrumb/MPBreadcrumb.d.ts +11 -5
  83. package/dist/components/breadcrumb/MPBreadcrumb.js +2 -1
  84. package/dist/components/breadcrumb/index.d.ts +2 -2
  85. package/dist/components/breadcrumb/index.js +1 -1
  86. package/dist/components/button/MPButton.d.ts +1 -1
  87. package/dist/components/button/MPButton.js +2 -1
  88. package/dist/components/button/index.d.ts +2 -2
  89. package/dist/components/button/index.js +1 -1
  90. package/dist/components/button-group/MPButtonGroup.d.ts +10 -1
  91. package/dist/components/button-group/MPButtonGroup.js +2 -1
  92. package/dist/components/button-group/index.d.ts +2 -2
  93. package/dist/components/button-group/index.js +1 -1
  94. package/dist/components/card/MPCard.d.ts +1 -1
  95. package/dist/components/card/MPCard.js +2 -1
  96. package/dist/components/card/index.d.ts +2 -2
  97. package/dist/components/card/index.js +1 -1
  98. package/dist/components/carousel/MPCarousel.d.ts +13 -8
  99. package/dist/components/carousel/MPCarousel.js +2 -1
  100. package/dist/components/carousel/index.d.ts +2 -2
  101. package/dist/components/carousel/index.js +1 -1
  102. package/dist/components/chat-bubble/MPChatBubble.d.ts +16 -3
  103. package/dist/components/chat-bubble/MPChatBubble.js +2 -1
  104. package/dist/components/chat-bubble/index.d.ts +2 -2
  105. package/dist/components/chat-bubble/index.js +1 -1
  106. package/dist/components/checkbox/MPCheckbox.d.ts +1 -1
  107. package/dist/components/checkbox/MPCheckbox.js +2 -1
  108. package/dist/components/checkbox/index.d.ts +2 -2
  109. package/dist/components/checkbox/index.js +1 -1
  110. package/dist/components/chip/MPChip.d.ts +1 -1
  111. package/dist/components/chip/MPChip.js +2 -1
  112. package/dist/components/chip/index.d.ts +2 -2
  113. package/dist/components/chip/index.js +1 -1
  114. package/dist/components/collapsible/MPCollapsible.d.ts +1 -1
  115. package/dist/components/collapsible/MPCollapsible.js +2 -1
  116. package/dist/components/collapsible/index.d.ts +2 -2
  117. package/dist/components/collapsible/index.js +1 -1
  118. package/dist/components/color-picker/MPColorPicker.d.ts +22 -19
  119. package/dist/components/color-picker/MPColorPicker.js +2 -1
  120. package/dist/components/color-picker/index.d.ts +2 -2
  121. package/dist/components/color-picker/index.js +1 -1
  122. package/dist/components/combobox/MPCombobox.d.ts +23 -5
  123. package/dist/components/combobox/MPCombobox.js +2 -1
  124. package/dist/components/combobox/index.d.ts +2 -2
  125. package/dist/components/combobox/index.js +1 -1
  126. package/dist/components/command-palette/MPCommandPalette.d.ts +132 -0
  127. package/dist/components/command-palette/MPCommandPalette.js +2 -0
  128. package/dist/components/command-palette/index.d.ts +2 -0
  129. package/dist/components/command-palette/index.js +1 -0
  130. package/dist/components/container/MPContainer.d.ts +1 -1
  131. package/dist/components/container/MPContainer.js +1 -1
  132. package/dist/components/container/index.d.ts +2 -2
  133. package/dist/components/container/index.js +1 -1
  134. package/dist/components/date-picker/MPDatePicker.d.ts +3 -3
  135. package/dist/components/date-picker/MPDatePicker.js +2 -1
  136. package/dist/components/date-picker/index.d.ts +2 -2
  137. package/dist/components/date-picker/index.js +1 -1
  138. package/dist/components/date-range-picker/MPDateRangePicker.d.ts +3 -3
  139. package/dist/components/date-range-picker/MPDateRangePicker.js +2 -1
  140. package/dist/components/date-range-picker/index.d.ts +2 -2
  141. package/dist/components/date-range-picker/index.js +1 -1
  142. package/dist/components/date-time-picker/MPDateTimePicker.d.ts +9 -4
  143. package/dist/components/date-time-picker/MPDateTimePicker.js +2 -1
  144. package/dist/components/date-time-picker/index.d.ts +2 -2
  145. package/dist/components/date-time-picker/index.js +1 -1
  146. package/dist/components/dialog/MPDialog.d.ts +1 -1
  147. package/dist/components/dialog/MPDialog.js +2 -1
  148. package/dist/components/dialog/index.d.ts +2 -2
  149. package/dist/components/dialog/index.js +1 -1
  150. package/dist/components/divider/MPDivider.d.ts +1 -1
  151. package/dist/components/divider/MPDivider.js +2 -1
  152. package/dist/components/divider/index.d.ts +2 -2
  153. package/dist/components/divider/index.js +1 -1
  154. package/dist/components/drawer/MPDrawer.d.ts +1 -1
  155. package/dist/components/drawer/MPDrawer.js +2 -1
  156. package/dist/components/drawer/index.d.ts +2 -2
  157. package/dist/components/drawer/index.js +1 -1
  158. package/dist/components/empty/MPEmpty.d.ts +1 -1
  159. package/dist/components/empty/MPEmpty.js +2 -1
  160. package/dist/components/empty/index.d.ts +2 -2
  161. package/dist/components/empty/index.js +1 -1
  162. package/dist/components/fieldset/MPFieldset.d.ts +52 -0
  163. package/dist/components/fieldset/MPFieldset.js +2 -0
  164. package/dist/components/fieldset/index.d.ts +2 -0
  165. package/dist/components/fieldset/index.js +1 -0
  166. package/dist/components/file-picker/MPFilePicker.d.ts +5 -4
  167. package/dist/components/file-picker/MPFilePicker.js +2 -1
  168. package/dist/components/file-picker/index.d.ts +2 -2
  169. package/dist/components/file-picker/index.js +1 -1
  170. package/dist/components/floating-action-button/MPFloatingActionButton.d.ts +1 -1
  171. package/dist/components/floating-action-button/MPFloatingActionButton.js +2 -1
  172. package/dist/components/floating-action-button/index.d.ts +2 -2
  173. package/dist/components/floating-action-button/index.js +1 -1
  174. package/dist/components/footer/MPFooter.d.ts +94 -0
  175. package/dist/components/footer/MPFooter.js +2 -0
  176. package/dist/components/footer/index.d.ts +2 -0
  177. package/dist/components/footer/index.js +1 -0
  178. package/dist/components/form/MPForm.d.ts +73 -0
  179. package/dist/components/form/MPForm.js +2 -0
  180. package/dist/components/form/index.d.ts +2 -0
  181. package/dist/components/form/index.js +1 -0
  182. package/dist/components/grid/MPGrid.d.ts +1 -1
  183. package/dist/components/grid/MPGrid.js +1 -0
  184. package/dist/components/grid/index.d.ts +2 -2
  185. package/dist/components/grid/index.js +1 -1
  186. package/dist/components/header/MPHeader.d.ts +122 -0
  187. package/dist/components/header/MPHeader.js +2 -0
  188. package/dist/components/header/index.d.ts +2 -0
  189. package/dist/components/header/index.js +1 -0
  190. package/dist/components/highlight/MPHighlight.d.ts +9 -2
  191. package/dist/components/highlight/MPHighlight.js +2 -1
  192. package/dist/components/highlight/index.d.ts +2 -2
  193. package/dist/components/highlight/index.js +1 -1
  194. package/dist/components/icon/MPIcon.d.ts +1 -1
  195. package/dist/components/icon/MPIcon.js +1 -0
  196. package/dist/components/icon/index.d.ts +2 -2
  197. package/dist/components/icon/index.js +1 -1
  198. package/dist/components/icon-button/MPIconButton.d.ts +1 -1
  199. package/dist/components/icon-button/MPIconButton.js +2 -1
  200. package/dist/components/icon-button/index.d.ts +2 -2
  201. package/dist/components/icon-button/index.js +1 -1
  202. package/dist/components/list/MPList.d.ts +1 -1
  203. package/dist/components/list/MPList.js +2 -1
  204. package/dist/components/list/index.d.ts +2 -2
  205. package/dist/components/list/index.js +1 -1
  206. package/dist/components/locale/MPLocaleProvider.d.ts +1 -1
  207. package/dist/components/locale/MPLocaleProvider.js +2 -1
  208. package/dist/components/locale/index.d.ts +2 -2
  209. package/dist/components/locale/index.js +1 -1
  210. package/dist/components/menu/MPMenu.d.ts +1 -1
  211. package/dist/components/menu/MPMenu.js +2 -1
  212. package/dist/components/menu/index.d.ts +2 -2
  213. package/dist/components/menu/index.js +1 -1
  214. package/dist/components/menubar/MPMenubar.d.ts +82 -0
  215. package/dist/components/menubar/MPMenubar.js +2 -0
  216. package/dist/components/menubar/index.d.ts +2 -0
  217. package/dist/components/menubar/index.js +1 -0
  218. package/dist/components/navigation-menu/MPNavigationMenu.d.ts +151 -0
  219. package/dist/components/navigation-menu/MPNavigationMenu.js +2 -0
  220. package/dist/components/navigation-menu/index.d.ts +2 -0
  221. package/dist/components/navigation-menu/index.js +1 -0
  222. package/dist/components/number-field/MPNumberField.d.ts +13 -4
  223. package/dist/components/number-field/MPNumberField.js +2 -1
  224. package/dist/components/number-field/index.d.ts +2 -2
  225. package/dist/components/number-field/index.js +1 -1
  226. package/dist/components/otp-field/MPOtpField.d.ts +1 -1
  227. package/dist/components/otp-field/MPOtpField.js +2 -1
  228. package/dist/components/otp-field/index.d.ts +2 -2
  229. package/dist/components/otp-field/index.js +1 -1
  230. package/dist/components/overlay/MPOverlay.d.ts +9 -3
  231. package/dist/components/overlay/MPOverlay.js +2 -1
  232. package/dist/components/overlay/index.d.ts +2 -2
  233. package/dist/components/overlay/index.js +1 -1
  234. package/dist/components/page-layout/MPPageLayout.d.ts +145 -0
  235. package/dist/components/page-layout/MPPageLayout.js +2 -0
  236. package/dist/components/page-layout/index.d.ts +2 -0
  237. package/dist/components/page-layout/index.js +1 -0
  238. package/dist/components/pagination/MPPagination.d.ts +2 -2
  239. package/dist/components/pagination/MPPagination.js +2 -1
  240. package/dist/components/pagination/index.d.ts +2 -2
  241. package/dist/components/pagination/index.js +1 -1
  242. package/dist/components/panes/MPPanes.d.ts +1 -1
  243. package/dist/components/panes/MPPanes.js +2 -1
  244. package/dist/components/panes/index.d.ts +2 -2
  245. package/dist/components/panes/index.js +1 -1
  246. package/dist/components/pill/MPPill.d.ts +1 -1
  247. package/dist/components/pill/MPPill.js +2 -1
  248. package/dist/components/pill/index.d.ts +2 -2
  249. package/dist/components/pill/index.js +1 -1
  250. package/dist/components/popover/MPPopover.d.ts +1 -1
  251. package/dist/components/popover/MPPopover.js +2 -1
  252. package/dist/components/popover/index.d.ts +2 -2
  253. package/dist/components/popover/index.js +1 -1
  254. package/dist/components/progress-box/MPProgressBox.d.ts +2 -2
  255. package/dist/components/progress-box/MPProgressBox.js +2 -1
  256. package/dist/components/progress-box/index.d.ts +2 -2
  257. package/dist/components/progress-box/index.js +1 -1
  258. package/dist/components/progress-circular/MPProgressCircular.d.ts +2 -2
  259. package/dist/components/progress-circular/MPProgressCircular.js +2 -1
  260. package/dist/components/progress-circular/index.d.ts +2 -2
  261. package/dist/components/progress-circular/index.js +1 -1
  262. package/dist/components/progress-linear/MPProgressLinear.d.ts +2 -2
  263. package/dist/components/progress-linear/MPProgressLinear.js +2 -1
  264. package/dist/components/progress-linear/index.d.ts +2 -2
  265. package/dist/components/progress-linear/index.js +1 -1
  266. package/dist/components/radio-group/MPRadioGroup.d.ts +1 -1
  267. package/dist/components/radio-group/MPRadioGroup.js +2 -1
  268. package/dist/components/radio-group/index.d.ts +2 -2
  269. package/dist/components/radio-group/index.js +1 -1
  270. package/dist/components/rating/MPRating.d.ts +2 -2
  271. package/dist/components/rating/MPRating.js +2 -1
  272. package/dist/components/rating/index.d.ts +2 -2
  273. package/dist/components/rating/index.js +1 -1
  274. package/dist/components/segmented-button/MPSegmentedButton.d.ts +1 -1
  275. package/dist/components/segmented-button/MPSegmentedButton.js +2 -1
  276. package/dist/components/segmented-button/index.d.ts +2 -2
  277. package/dist/components/segmented-button/index.js +1 -1
  278. package/dist/components/select/MPSelect.d.ts +13 -2
  279. package/dist/components/select/MPSelect.js +2 -1
  280. package/dist/components/select/index.d.ts +2 -2
  281. package/dist/components/select/index.js +1 -1
  282. package/dist/components/shortcut/MPShortcut.d.ts +1 -1
  283. package/dist/components/shortcut/MPShortcut.js +2 -1
  284. package/dist/components/shortcut/index.d.ts +2 -2
  285. package/dist/components/shortcut/index.js +1 -1
  286. package/dist/components/sidebar/MPSidebar.d.ts +160 -0
  287. package/dist/components/sidebar/MPSidebar.js +2 -0
  288. package/dist/components/sidebar/MPSidebarTrigger.d.ts +45 -0
  289. package/dist/components/sidebar/MPSidebarTrigger.js +2 -0
  290. package/dist/components/sidebar/index.d.ts +4 -0
  291. package/dist/components/sidebar/index.js +1 -0
  292. package/dist/components/skeleton/MPSkeleton.d.ts +1 -1
  293. package/dist/components/skeleton/MPSkeleton.js +2 -1
  294. package/dist/components/skeleton/index.d.ts +2 -2
  295. package/dist/components/skeleton/index.js +1 -1
  296. package/dist/components/slider/MPSlider.d.ts +1 -1
  297. package/dist/components/slider/MPSlider.js +2 -1
  298. package/dist/components/slider/index.d.ts +2 -2
  299. package/dist/components/slider/index.js +1 -1
  300. package/dist/components/snackbar/MPSnackbar.d.ts +1 -1
  301. package/dist/components/snackbar/MPSnackbar.js +2 -1
  302. package/dist/components/snackbar/index.d.ts +2 -2
  303. package/dist/components/snackbar/index.js +1 -1
  304. package/dist/components/spoiler/MPSpoiler.d.ts +1 -1
  305. package/dist/components/spoiler/MPSpoiler.js +2 -1
  306. package/dist/components/spoiler/index.d.ts +2 -2
  307. package/dist/components/spoiler/index.js +1 -1
  308. package/dist/components/switch/MPSwitch.d.ts +1 -1
  309. package/dist/components/switch/MPSwitch.js +2 -1
  310. package/dist/components/switch/index.d.ts +2 -2
  311. package/dist/components/switch/index.js +1 -1
  312. package/dist/components/table/MPTable.d.ts +28 -6
  313. package/dist/components/table/MPTable.js +2 -1
  314. package/dist/components/table/index.d.ts +2 -2
  315. package/dist/components/table/index.js +1 -1
  316. package/dist/components/tabs/MPTabs.d.ts +1 -1
  317. package/dist/components/tabs/MPTabs.js +2 -1
  318. package/dist/components/tabs/index.d.ts +2 -2
  319. package/dist/components/tabs/index.js +1 -1
  320. package/dist/components/text-field/MPTextField.d.ts +15 -4
  321. package/dist/components/text-field/MPTextField.js +2 -1
  322. package/dist/components/text-field/index.d.ts +2 -2
  323. package/dist/components/text-field/index.js +1 -1
  324. package/dist/components/text-link/MPTextLink.d.ts +8 -2
  325. package/dist/components/text-link/MPTextLink.js +2 -1
  326. package/dist/components/text-link/index.d.ts +2 -2
  327. package/dist/components/text-link/index.js +1 -1
  328. package/dist/components/time-picker/MPTimePicker.d.ts +7 -3
  329. package/dist/components/time-picker/MPTimePicker.js +2 -1
  330. package/dist/components/time-picker/index.d.ts +2 -2
  331. package/dist/components/time-picker/index.js +1 -1
  332. package/dist/components/timeline/MPTimeline.d.ts +1 -1
  333. package/dist/components/timeline/MPTimeline.js +2 -1
  334. package/dist/components/timeline/index.d.ts +2 -2
  335. package/dist/components/timeline/index.js +1 -1
  336. package/dist/components/toggle/MPToggle.d.ts +72 -0
  337. package/dist/components/toggle/MPToggle.js +2 -0
  338. package/dist/components/toggle/index.d.ts +2 -0
  339. package/dist/components/toggle/index.js +1 -0
  340. package/dist/components/toggle-group/MPToggleGroup.d.ts +74 -0
  341. package/dist/components/toggle-group/MPToggleGroup.js +2 -0
  342. package/dist/components/toggle-group/index.d.ts +2 -0
  343. package/dist/components/toggle-group/index.js +1 -0
  344. package/dist/components/tooltip/MPTooltip.d.ts +1 -1
  345. package/dist/components/tooltip/MPTooltip.js +2 -1
  346. package/dist/components/tooltip/index.d.ts +2 -2
  347. package/dist/components/tooltip/index.js +1 -1
  348. package/dist/components/transfer/MPTransfer.d.ts +98 -0
  349. package/dist/components/transfer/MPTransfer.js +2 -0
  350. package/dist/components/transfer/index.d.ts +2 -0
  351. package/dist/components/transfer/index.js +1 -0
  352. package/dist/components/typography/MPTypography.d.ts +1 -1
  353. package/dist/components/typography/MPTypography.js +2 -1
  354. package/dist/components/typography/index.d.ts +2 -2
  355. package/dist/components/typography/index.js +1 -1
  356. package/dist/constants/glyphs.d.ts +72 -0
  357. package/dist/constants/glyphs.js +2 -0
  358. package/dist/constants/icons.d.ts +32 -60
  359. package/dist/constants/icons.js +1 -1
  360. package/dist/index.d.ts +91 -78
  361. package/dist/index.js +1 -1
  362. package/dist/internal/Calendar.d.ts +3 -3
  363. package/dist/internal/Calendar.js +2 -1
  364. package/dist/internal/FieldOutline.d.ts +1 -1
  365. package/dist/internal/FieldOutline.js +2 -1
  366. package/dist/internal/Picker.d.ts +2 -2
  367. package/dist/internal/Picker.js +2 -1
  368. package/dist/internal/StateLayer.js +1 -0
  369. package/dist/internal/SupportingText.d.ts +1 -1
  370. package/dist/internal/SupportingText.js +2 -1
  371. package/dist/internal/WidthSizer.js +1 -0
  372. package/dist/internal/accent.d.ts +1 -1
  373. package/dist/internal/animate.d.ts +1 -18
  374. package/dist/internal/animate.js +2 -1
  375. package/dist/internal/avatar-group.d.ts +22 -0
  376. package/dist/internal/avatar-group.js +2 -0
  377. package/dist/internal/button-group.d.ts +20 -1
  378. package/dist/internal/button-group.js +2 -1
  379. package/dist/internal/color.d.ts +0 -5
  380. package/dist/internal/color.js +1 -1
  381. package/dist/internal/date.d.ts +1 -1
  382. package/dist/internal/date.js +1 -1
  383. package/dist/internal/i18n.d.ts +245 -14
  384. package/dist/internal/i18n.js +1 -1
  385. package/dist/internal/keys.d.ts +72 -0
  386. package/dist/internal/keys.js +2 -0
  387. package/dist/internal/length.d.ts +42 -0
  388. package/dist/internal/length.js +1 -0
  389. package/dist/internal/link.d.ts +44 -0
  390. package/dist/internal/link.js +1 -0
  391. package/dist/internal/locale.d.ts +27 -3
  392. package/dist/internal/locale.js +2 -1
  393. package/dist/internal/menu.d.ts +1 -1
  394. package/dist/internal/menu.js +1 -0
  395. package/dist/internal/messages/alert.d.ts +3 -0
  396. package/dist/internal/messages/alert.js +1 -0
  397. package/dist/internal/messages/breadcrumb.d.ts +3 -0
  398. package/dist/internal/messages/breadcrumb.js +1 -0
  399. package/dist/internal/messages/carousel.d.ts +3 -0
  400. package/dist/internal/messages/carousel.js +1 -0
  401. package/dist/internal/messages/chat.d.ts +3 -0
  402. package/dist/internal/messages/chat.js +1 -0
  403. package/dist/internal/messages/color-picker.d.ts +3 -0
  404. package/dist/internal/messages/color-picker.js +1 -0
  405. package/dist/internal/messages/combobox.d.ts +3 -0
  406. package/dist/internal/messages/combobox.js +1 -0
  407. package/dist/internal/messages/command.d.ts +3 -0
  408. package/dist/internal/messages/command.js +1 -0
  409. package/dist/internal/messages/common.d.ts +3 -0
  410. package/dist/internal/messages/common.js +1 -0
  411. package/dist/internal/messages/empty.d.ts +3 -0
  412. package/dist/internal/messages/empty.js +1 -0
  413. package/dist/internal/messages/file-picker.d.ts +3 -0
  414. package/dist/internal/messages/file-picker.js +1 -0
  415. package/dist/internal/messages/layout.d.ts +3 -0
  416. package/dist/internal/messages/layout.js +1 -0
  417. package/dist/internal/messages/number-field.d.ts +3 -0
  418. package/dist/internal/messages/number-field.js +1 -0
  419. package/dist/internal/messages/overlay.d.ts +3 -0
  420. package/dist/internal/messages/overlay.js +1 -0
  421. package/dist/internal/messages/pagination.d.ts +3 -0
  422. package/dist/internal/messages/pagination.js +1 -0
  423. package/dist/internal/messages/picker.d.ts +3 -0
  424. package/dist/internal/messages/picker.js +1 -0
  425. package/dist/internal/messages/rating.d.ts +3 -0
  426. package/dist/internal/messages/rating.js +1 -0
  427. package/dist/internal/messages/spoiler.d.ts +3 -0
  428. package/dist/internal/messages/spoiler.js +1 -0
  429. package/dist/internal/messages/table.d.ts +3 -0
  430. package/dist/internal/messages/table.js +1 -0
  431. package/dist/internal/messages/text-field.d.ts +3 -0
  432. package/dist/internal/messages/text-field.js +1 -0
  433. package/dist/internal/messages/text-link.d.ts +3 -0
  434. package/dist/internal/messages/text-link.js +1 -0
  435. package/dist/internal/messages/transfer.d.ts +3 -0
  436. package/dist/internal/messages/transfer.js +1 -0
  437. package/dist/internal/page-layout.d.ts +182 -0
  438. package/dist/internal/page-layout.js +2 -0
  439. package/dist/internal/progress.d.ts +1 -1
  440. package/dist/internal/scale.d.ts +18 -1
  441. package/dist/internal/scale.js +1 -1
  442. package/dist/internal/surface.d.ts +1 -1
  443. package/dist/internal/surface.js +1 -1
  444. package/dist/locales/ar.d.ts +1 -1
  445. package/dist/locales/ar.js +1 -1
  446. package/dist/locales/de.d.ts +1 -1
  447. package/dist/locales/de.js +1 -1
  448. package/dist/locales/es.d.ts +1 -1
  449. package/dist/locales/es.js +1 -1
  450. package/dist/locales/fr.d.ts +1 -1
  451. package/dist/locales/fr.js +1 -1
  452. package/dist/locales/hi.d.ts +1 -1
  453. package/dist/locales/hi.js +1 -1
  454. package/dist/locales/id.d.ts +1 -1
  455. package/dist/locales/id.js +1 -1
  456. package/dist/locales/index.d.ts +19 -19
  457. package/dist/locales/index.js +1 -1
  458. package/dist/locales/it.d.ts +1 -1
  459. package/dist/locales/it.js +1 -1
  460. package/dist/locales/ja.d.ts +1 -1
  461. package/dist/locales/ja.js +1 -1
  462. package/dist/locales/ko.d.ts +1 -1
  463. package/dist/locales/ko.js +1 -1
  464. package/dist/locales/nl.d.ts +1 -1
  465. package/dist/locales/nl.js +1 -1
  466. package/dist/locales/pl.d.ts +1 -1
  467. package/dist/locales/pl.js +1 -1
  468. package/dist/locales/pt.d.ts +1 -1
  469. package/dist/locales/pt.js +1 -1
  470. package/dist/locales/ru.d.ts +1 -1
  471. package/dist/locales/ru.js +1 -1
  472. package/dist/locales/th.d.ts +1 -1
  473. package/dist/locales/th.js +1 -1
  474. package/dist/locales/tr.d.ts +1 -1
  475. package/dist/locales/tr.js +1 -1
  476. package/dist/locales/vi.d.ts +1 -1
  477. package/dist/locales/vi.js +1 -1
  478. package/dist/locales/zh-hans.d.ts +1 -1
  479. package/dist/locales/zh-hans.js +1 -1
  480. package/dist/locales/zh-hant.d.ts +1 -1
  481. package/dist/locales/zh-hant.js +1 -1
  482. package/dist/styles/accordion.css +1 -1
  483. package/dist/styles/alert.css +1 -1
  484. package/dist/styles/avatar-group.css +2 -0
  485. package/dist/styles/avatar.css +1 -1
  486. package/dist/styles/badge.css +1 -1
  487. package/dist/styles/blockquote.css +1 -1
  488. package/dist/styles/bottom-navigation.css +1 -1
  489. package/dist/styles/box.css +1 -1
  490. package/dist/styles/breadcrumb.css +1 -1
  491. package/dist/styles/button-group.css +1 -1
  492. package/dist/styles/button.css +1 -1
  493. package/dist/styles/card.css +1 -1
  494. package/dist/styles/carousel.css +1 -1
  495. package/dist/styles/chat-bubble.css +1 -1
  496. package/dist/styles/checkbox.css +1 -1
  497. package/dist/styles/chip.css +1 -1
  498. package/dist/styles/collapsible.css +1 -1
  499. package/dist/styles/color-picker.css +1 -1
  500. package/dist/styles/combobox.css +1 -1
  501. package/dist/styles/command-palette.css +2 -0
  502. package/dist/styles/date-picker.css +1 -1
  503. package/dist/styles/date-range-picker.css +1 -1
  504. package/dist/styles/date-time-picker.css +1 -1
  505. package/dist/styles/dialog.css +1 -1
  506. package/dist/styles/divider.css +1 -1
  507. package/dist/styles/drawer.css +1 -1
  508. package/dist/styles/empty.css +1 -1
  509. package/dist/styles/fieldset.css +2 -0
  510. package/dist/styles/file-picker.css +1 -1
  511. package/dist/styles/floating-action-button.css +1 -1
  512. package/dist/styles/footer.css +2 -0
  513. package/dist/styles/form.css +2 -0
  514. package/dist/styles/header.css +2 -0
  515. package/dist/styles/highlight.css +1 -1
  516. package/dist/styles/icon-button.css +1 -1
  517. package/dist/styles/list.css +1 -1
  518. package/dist/styles/locale.css +1 -1
  519. package/dist/styles/menu.css +1 -1
  520. package/dist/styles/menubar.css +2 -0
  521. package/dist/styles/navigation-menu.css +2 -0
  522. package/dist/styles/number-field.css +1 -1
  523. package/dist/styles/otp-field.css +1 -1
  524. package/dist/styles/overlay.css +1 -1
  525. package/dist/styles/page-layout.css +2 -0
  526. package/dist/styles/pagination.css +1 -1
  527. package/dist/styles/panes.css +1 -1
  528. package/dist/styles/pill.css +1 -1
  529. package/dist/styles/popover.css +1 -1
  530. package/dist/styles/progress-box.css +1 -1
  531. package/dist/styles/progress-circular.css +1 -1
  532. package/dist/styles/progress-linear.css +1 -1
  533. package/dist/styles/radio-group.css +1 -1
  534. package/dist/styles/segmented-button.css +1 -1
  535. package/dist/styles/select.css +1 -1
  536. package/dist/styles/sidebar.css +2 -0
  537. package/dist/styles/skeleton.css +1 -1
  538. package/dist/styles/slider.css +1 -1
  539. package/dist/styles/spoiler.css +1 -1
  540. package/dist/styles/switch.css +1 -1
  541. package/dist/styles/table.css +1 -1
  542. package/dist/styles/tabs.css +1 -1
  543. package/dist/styles/text-field.css +1 -1
  544. package/dist/styles/text-link.css +1 -1
  545. package/dist/styles/time-picker.css +1 -1
  546. package/dist/styles/timeline.css +1 -1
  547. package/dist/styles/toggle-group.css +2 -0
  548. package/dist/styles/toggle.css +2 -0
  549. package/dist/styles/transfer.css +2 -0
  550. package/dist/styles.css +1 -1
  551. package/package.json +12 -10
@@ -1,2 +1,2 @@
1
- export { MPDateRangePicker } from './MPDateRangePicker';
2
- export type { MPDateRange, MPDateRangePickerProps, MPDateRangePreset } from './MPDateRangePicker';
1
+ export { MPDateRangePicker } from './MPDateRangePicker.js';
2
+ export type { MPDateRange, MPDateRangePickerProps, MPDateRangePreset } from './MPDateRangePicker.js';
@@ -1 +1 @@
1
- export{MPDateRangePicker}from"./MPDateRangePicker";
1
+ export{MPDateRangePicker}from"./MPDateRangePicker.js";
@@ -1,8 +1,8 @@
1
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
- import type { MPWeekday } from '../../types';
2
+ import { type MPPickerLabels } from '../../internal/Calendar.js';
3
+ import { type MPPickerShellProps } from '../../internal/Picker.js';
4
+ import { type MPTimeUnit } from '../../internal/date.js';
5
+ import type { MPWeekday } from '../../types.js';
6
6
  export interface MPDateTimePickerProps extends MPPickerShellProps {
7
7
  /** The chosen moment. Use with `onValueChange` for a controlled picker. */
8
8
  value?: Date | null;
@@ -40,6 +40,11 @@ export interface MPDateTimePickerProps extends MPPickerShellProps {
40
40
  /** A 12-hour dial with an AM/PM column. Defaults to whatever the locale does. */
41
41
  hour12?: boolean;
42
42
  showSeconds?: boolean;
43
+ /**
44
+ * How far apart the rows of each clock column are. Rounded, and held between 1
45
+ * and the column's own span — see [MPTimePicker](./time-picker).
46
+ * @default 1
47
+ */
43
48
  hourStep?: number;
44
49
  minuteStep?: number;
45
50
  secondStep?: number;
@@ -1 +1,2 @@
1
- import{jsx as e,jsxs as o}from"react/jsx-runtime";import*as t from"react";import{MPButton as l}from"../button/MPButton";import{MPIcon as a}from"../icon/MPIcon";import{CalendarIcon as n}from"../../constants/icons";import{MPCalendar as r,MPTimeGrid as i}from"../../internal/Calendar";import{FOOTER_SIZE as s,MPPickerDivider as c,MPPickerFooter as d,MPPickerShell as m,useDisplaySamples as u}from"../../internal/Picker";import{useMPLocale as h,useMPMessages as p}from"../../internal/locale";import{CONTROL_ICON as f}from"../../internal/scale";import{formatDate as S,isDayOutside as b,isHour12 as g,isValidDate as v,localeWeekStart as D,mergeDateAndTime as x,startOfDay as C,startOfMonth as k,timeUnitSpan as w,toISODateTime as z,today as O,withPlaceholder as y,withTime as T}from"../../internal/date";export const MPDateTimePicker=/*@__PURE__*/t.forwardRef(function({value:M,defaultValue:P,onValueChange:j,open:I,defaultOpen:N,onOpenChange:V,defaultMonth:B,minDate:R,maxDate:E,shouldDisableDate:F,shouldDisableTime:q,locale:A,weekStartsOn:G,format:H,hour12:J,showSeconds:K=!1,hourStep:L=1,minuteStep:Q=1,secondStep:U=1,placeholder:W,clearable:X=!1,showNowButton:Y=!0,closeOnSelect:Z=!1,labels:$,name:_,size:ee="md",color:oe="primary",readOnly:te=!1,disabled:le=!1,startIcon:ae,...ne},re){const ie=h(A),se=p("picker",ie,$),ce=G??D(ie),de=J??g(ie),[me,ue]=t.useState(P??null),he=void 0!==M?M:me,[pe,fe]=t.useState(N??!1),Se=I??pe,[be,ge]=t.useState(()=>k(v(he)?he:B??O()));t.useEffect(()=>{Se&&ge(k(v(he)?he:B??O()))},[Se]);const ve=e=>{e&&(te||le)||(void 0===I&&fe(e),V?.(e))},De=e=>{void 0===M&&ue(e),j?.(e)},xe=t.useCallback((e,o)=>{const[t,l]=w(o,e),a=C(e).getTime();return!!(v(R)&&a+1e3*l<R.getTime())||(!!(v(E)&&a+1e3*t>E.getTime())||(q?.(e,o)??!1))},[R,E,q]),Ce=H??{dateStyle:"medium",timeStyle:"short",hour12:de},ke=new Date,we=T(ke,{seconds:K?ke.getSeconds():0}),ze=b(we,R,E)||(F?.(we)??!1)||xe(we,"second"),Oe=y(u(ie,Ce),W);return e(m,{...ne,slug:"date-time-picker",size:ee,color:oe,readOnly:te,disabled:le,triggerRef:re,startIcon:void 0===ae?e(a,{icon:n,size:f[ee]}):ae,display:v(he)?S(he,ie,Ce):W??"",samples:Oe,empty:!v(he),clearable:X,onClear:()=>De(null),open:Se,onOpenChange:ve,labels:se,hiddenValues:_?[{name:_,value:v(he)?z(he,K):""}]:void 0,children:o("div",{className:"flex flex-col gap-1.5",children:[o("div",{className:"flex items-stretch gap-2",children:[e(r,{size:ee,color:oe,locale:ie,weekStartsOn:ce,month:be,onMonthChange:ge,selected:[he],onSelect:e=>{const o=v(he)?x(e,he):C(e);De(o),ge(k(o)),Z&&ve(!1)},minDate:R,maxDate:E,shouldDisableDate:F,labels:se,autoFocus:!0}),e(c,{}),e(i,{size:ee,locale:ie,value:v(he)?he:null,referenceDate:v(he)?he:O(),onChange:De,hour12:de,showSeconds:K,hourStep:L,minuteStep:Q,secondStep:U,shouldDisableTime:xe,labels:se})]}),o(d,{children:[X?e(l,{variant:"text",size:s[ee],color:oe,onClick:()=>{De(null),ve(!1)},children:se.clear}):null,Y?e(l,{variant:"text",size:s[ee],color:oe,disabled:ze,onClick:()=>{De(we),ge(k(we))},children:se.now}):null,e(l,{variant:"filled",size:s[ee],color:oe,onClick:()=>ve(!1),children:se.done})]})]})})});
1
+ "use client";
2
+ import{jsx as e,jsxs as o}from"react/jsx-runtime";import*as t from"react";import{MPButton as l}from"../button/MPButton.js";import{MPIcon as a}from"../icon/MPIcon.js";import{CalendarIcon as n}from"../../constants/icons.js";import{MPCalendar as s,MPTimeGrid as r}from"../../internal/Calendar.js";import{FOOTER_SIZE as i,MPPickerDivider as c,MPPickerFooter as m,MPPickerShell as d,useDisplaySamples as u}from"../../internal/Picker.js";import{useMPLocale as p,useMPMessages as h}from"../../internal/locale.js";import{PICKER as f}from"../../internal/messages/picker.js";import{CONTROL_ICON as S}from"../../internal/scale.js";import{formatDate as b,isDayOutside as g,isHour12 as v,isValidDate as D,localeWeekStart as j,mergeDateAndTime as x,startOfDay as C,startOfMonth as k,timeUnitSpan as w,toISODateTime as z,today as O,withPlaceholder as y,withTime as T}from"../../internal/date.js";export const MPDateTimePicker=/*@__PURE__*/t.forwardRef(function({value:M,defaultValue:P,onValueChange:I,open:N,defaultOpen:V,onOpenChange:B,defaultMonth:R,minDate:E,maxDate:F,shouldDisableDate:q,shouldDisableTime:A,locale:G,weekStartsOn:H,format:J,hour12:K,showSeconds:L=!1,hourStep:Q=1,minuteStep:U=1,secondStep:W=1,placeholder:X,clearable:Y=!1,showNowButton:Z=!0,closeOnSelect:$=!1,labels:_,name:ee,size:oe="md",color:te="primary",readOnly:le=!1,disabled:ae=!1,startIcon:ne,...se},re){const ie=p(G),ce=h(f,ie,_),me=H??j(ie),de=K??v(ie),[ue,pe]=t.useState(P??null),he=void 0!==M?M:ue,[fe,Se]=t.useState(V??!1),be=N??fe,[ge,ve]=t.useState(()=>k(D(he)?he:R??O()));t.useEffect(()=>{be&&ve(k(D(he)?he:R??O()))},[be]);const De=e=>{e&&(le||ae)||(void 0===N&&Se(e),B?.(e))},je=e=>{void 0===M&&pe(e),I?.(e)},xe=t.useCallback((e,o)=>{const[t,l]=w(o,e),a=C(e).getTime();return!!(D(E)&&a+1e3*l<E.getTime())||(!!(D(F)&&a+1e3*t>F.getTime())||(A?.(e,o)??!1))},[E,F,A]),Ce=J??{dateStyle:"medium",timeStyle:"short",hour12:de},ke=new Date,we=T(ke,{seconds:L?ke.getSeconds():0}),ze=g(we,E,F)||(q?.(we)??!1)||xe(we,"second"),Oe=y(u(ie,Ce),X);return e(d,{...se,slug:"date-time-picker",size:oe,color:te,readOnly:le,disabled:ae,triggerRef:re,startIcon:void 0===ne?e(a,{icon:n,size:S[oe]}):ne,display:D(he)?b(he,ie,Ce):X??"",samples:Oe,empty:!D(he),clearable:Y,onClear:()=>je(null),open:be,onOpenChange:De,labels:ce,hiddenValues:ee?[{name:ee,value:D(he)?z(he,L):""}]:void 0,children:o("div",{className:"flex flex-col gap-1.5",children:[o("div",{className:"flex items-stretch gap-2",children:[e(s,{size:oe,color:te,locale:ie,weekStartsOn:me,month:ge,onMonthChange:ve,selected:[he],onSelect:e=>{const o=D(he)?x(e,he):C(e);je(o),ve(k(o)),$&&De(!1)},minDate:E,maxDate:F,shouldDisableDate:q,labels:ce,autoFocus:!0}),e(c,{}),e(r,{size:oe,locale:ie,value:D(he)?he:null,referenceDate:D(he)?he:O(),onChange:je,hour12:de,showSeconds:L,hourStep:Q,minuteStep:U,secondStep:W,shouldDisableTime:xe,labels:ce})]}),o(m,{children:[Y?e(l,{variant:"text",size:i[oe],color:te,onClick:()=>{je(null),De(!1)},children:ce.clear}):null,Z?e(l,{variant:"text",size:i[oe],color:te,disabled:ze,onClick:()=>{je(we),ve(k(we))},children:ce.now}):null,e(l,{variant:"filled",size:i[oe],color:te,onClick:()=>De(!1),children:ce.done})]})]})})});
@@ -1,2 +1,2 @@
1
- export { MPDateTimePicker } from './MPDateTimePicker';
2
- export type { MPDateTimePickerProps } from './MPDateTimePicker';
1
+ export { MPDateTimePicker } from './MPDateTimePicker.js';
2
+ export type { MPDateTimePickerProps } from './MPDateTimePicker.js';
@@ -1 +1 @@
1
- export{MPDateTimePicker}from"./MPDateTimePicker";
1
+ export{MPDateTimePicker}from"./MPDateTimePicker.js";
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Dialog } from '@base-ui/react/dialog';
3
- import type { MPColor, MPSize } from '../../types';
3
+ import type { MPColor, MPSize } from '../../types.js';
4
4
  /**
5
5
  * A dialog takes `size` and `color` and stops there.
6
6
  *
@@ -1 +1,2 @@
1
- import{jsx as e,jsxs as l}from"react/jsx-runtime";import{Dialog as t}from"@base-ui/react/dialog";import{MPIcon as i}from"../icon/MPIcon";import{CloseIcon as n}from"../../constants/icons";import{accentSlots as o}from"../../internal/accent";import{useMPLocale as s,useMPMessages as a}from"../../internal/locale";import{MPStateLayer as r}from"../../internal/StateLayer";import{SHEET_GAP as m,hasContent as c}from"../../internal/scale";import{FADE as p,PORTAL_LAYER as d,SCRIM as x,SHEET_MOTION as f}from"../../internal/surface";const u={xs:"max-w-[320px]",sm:"max-w-[400px]",md:"max-w-[560px]",lg:"max-w-[720px]",xl:"max-w-[960px]"},h=`transition-[opacity,scale] ${f}`,g=["motion-safe:data-starting-style:scale-95","motion-safe:data-ending-style:scale-95"].join(" "),y={xs:"p-3",sm:"p-4",md:"p-6",lg:"p-7",xl:"p-8"},v={xs:"px-3",sm:"px-4",md:"px-6",lg:"px-7",xl:"px-8"},b={xs:"py-3",sm:"py-4",md:"py-6",lg:"py-7",xl:"py-8"},w={xs:"text-mp-title-medium",sm:"text-mp-title-large",md:"text-mp-headline-small",lg:"text-mp-headline-medium",xl:"text-mp-headline-large"},j={xs:"text-mp-body-small",sm:"text-mp-body-small",md:"text-mp-body-medium",lg:"text-mp-body-large",xl:"text-mp-body-large"},N={xs:20,sm:22,md:24,lg:28,xl:32};export const MPDialogClose=t.Close;export function MPDialog({open:f,defaultOpen:$,onOpenChange:k,trigger:C,icon:P,title:B,description:z,actions:D,dividers:O=!1,showClose:M,closeLabel:L,locale:S,width:T,fullWidth:W=!0,fullScreen:I=!1,modal:R=!0,dismissible:V=!0,size:_="md",color:q="secondary",className:A,style:E,children:F}){const G=s(S),H=a("common",G),J=M??I,K=c(P),Q=c(B)||c(z)||K,U=c(D),X=O?y[_]:v[_],Y="border-mp-outline-variant border-t";return l(t.Root,{open:f,defaultOpen:$,modal:R,disablePointerDismissal:!V,onOpenChange:(e,l)=>{V||e||"escape-key"!==l.reason?k?.(e):l.cancel()},children:[C?e(t.Trigger,{render:C}):null,l(t.Portal,{children:[e(t.Backdrop,{className:`${d} fixed inset-0 ${p} ${x}`}),e(t.Viewport,{className:[d,"fixed inset-0 flex justify-center",I?"items-stretch":"items-center p-4"].join(" "),children:l(t.Popup,{"data-mp-size":_,className:["mp-dialog relative flex w-full flex-col overflow-hidden","bg-mp-surface-container-high text-mp-on-surface shadow-mp-3 outline-none",I?"h-full max-w-none rounded-none":`rounded-mp-xl max-h-full ${void 0===T?u[_]:""}`,I||W?"":"w-auto",O?"":`${b[_]} ${m[_]}`,h,I?"":g,A??""].filter(Boolean).join(" "),style:{...o(q),...void 0===T||I?null:{maxWidth:"number"==typeof T?`${T}px`:T},...E},children:[Q||J?l("div",{className:["flex shrink-0 items-start gap-3",X,K&&!J?"flex-col items-center text-center":""].filter(Boolean).join(" "),children:[K?e("span",{className:"flex shrink-0 items-center justify-center text-(--_mp-accent)",children:P}):null,l("div",{className:`flex min-w-0 flex-1 flex-col ${m[_]}`,children:[c(B)?e(t.Title,{className:`m-0 ${w[_]}`,children:B}):null,c(z)?e(t.Description,{className:`text-mp-on-surface-variant m-0 ${j[_]}`,children:z}):null]}),J?l(t.Close,{"aria-label":L??H.close,className:["group text-mp-on-surface-variant relative flex size-10 shrink-0","rounded-mp-full cursor-pointer items-center justify-center","outline-mp-secondary focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-solid outline-none"].join(" "),children:[e(r,{}),e(i,{icon:n,size:N[_]})]}):null]}):null,c(F)?e("div",{className:["min-h-0 flex-1 overflow-y-auto overscroll-contain",j[_],X,O&&(Q||J)?Y:""].filter(Boolean).join(" "),children:F}):null,U?e("div",{className:["flex shrink-0 flex-wrap items-center justify-end gap-2",X,O?Y:""].filter(Boolean).join(" "),children:D}):null]})})]})]})}
1
+ "use client";
2
+ import{jsx as e,jsxs as l}from"react/jsx-runtime";import{Dialog as t}from"@base-ui/react/dialog";import{MPIcon as i}from"../icon/MPIcon.js";import{CloseIcon as n}from"../../constants/icons.js";import{accentSlots as s}from"../../internal/accent.js";import{cssLength as o}from"../../internal/length.js";import{useMPLocale as a,useMPMessages as r}from"../../internal/locale.js";import{COMMON as m}from"../../internal/messages/common.js";import{MPStateLayer as c}from"../../internal/StateLayer.js";import{SHEET_GAP as p,hasContent as d}from"../../internal/scale.js";import{FADE as x,PORTAL_LAYER as f,SCRIM as u,SHEET_MOTION as h}from"../../internal/surface.js";const g={xs:"max-w-[320px]",sm:"max-w-[400px]",md:"max-w-[560px]",lg:"max-w-[720px]",xl:"max-w-[960px]"},y=`transition-[opacity,scale] ${h}`,j=/*@__PURE__*/["motion-safe:data-starting-style:scale-95","motion-safe:data-ending-style:scale-95"].join(" "),v={xs:"p-3",sm:"p-4",md:"p-6",lg:"p-7",xl:"p-8"},b={xs:"px-3",sm:"px-4",md:"px-6",lg:"px-7",xl:"px-8"},w={xs:"py-3",sm:"py-4",md:"py-6",lg:"py-7",xl:"py-8"},N={xs:"text-mp-title-medium",sm:"text-mp-title-large",md:"text-mp-headline-small",lg:"text-mp-headline-medium",xl:"text-mp-headline-large"},$={xs:"text-mp-body-small",sm:"text-mp-body-small",md:"text-mp-body-medium",lg:"text-mp-body-large",xl:"text-mp-body-large"},k={xs:20,sm:22,md:24,lg:28,xl:32};export const MPDialogClose=t.Close;export function MPDialog({open:h,defaultOpen:C,onOpenChange:P,trigger:B,icon:z,title:D,description:O,actions:M,dividers:L=!1,showClose:S,closeLabel:T,locale:W,width:I,fullWidth:R=!0,fullScreen:V=!1,modal:_=!0,dismissible:q=!0,size:A="md",color:E="secondary",className:F,style:G,children:H}){const J=a(W),K=r(m,J),Q=S??V,U=d(z),X=d(D)||d(O)||U,Y=d(M),Z=L?v[A]:b[A],ee="border-mp-outline-variant border-t";return l(t.Root,{open:h,defaultOpen:C,modal:_,disablePointerDismissal:!q,onOpenChange:(e,l)=>{q||e||"escape-key"!==l.reason?P?.(e):l.cancel()},children:[B?e(t.Trigger,{render:B}):null,l(t.Portal,{children:[e(t.Backdrop,{className:`${f} fixed inset-0 ${x} ${u}`}),e(t.Viewport,{className:[f,"fixed inset-0 flex justify-center",V?"items-stretch":"items-center p-4"].join(" "),children:l(t.Popup,{"data-mp-size":A,className:["mp-dialog relative flex w-full flex-col overflow-hidden","bg-mp-surface-container-high text-mp-on-surface shadow-mp-3 outline-none",V?"h-full max-w-none rounded-none":`rounded-mp-xl max-h-full ${void 0===I?g[A]:""}`,V||R?"":"w-auto",L?"":`${w[A]} ${p[A]}`,y,V?"":j,F??""].filter(Boolean).join(" "),style:{...s(E),...void 0===I||V?null:{maxWidth:o(I)},...G},children:[X||Q?l("div",{className:["flex shrink-0 items-start gap-3",Z,U&&!Q?"flex-col items-center text-center":""].filter(Boolean).join(" "),children:[U?e("span",{className:"flex shrink-0 items-center justify-center text-(--_mp-accent)",children:z}):null,l("div",{className:`flex min-w-0 flex-1 flex-col ${p[A]}`,children:[d(D)?e(t.Title,{className:`m-0 ${N[A]}`,children:D}):null,d(O)?e(t.Description,{className:`text-mp-on-surface-variant m-0 ${$[A]}`,children:O}):null]}),Q?l(t.Close,{"aria-label":T??K.close,className:["group text-mp-on-surface-variant relative flex size-10 shrink-0","rounded-mp-full cursor-pointer items-center justify-center","outline-mp-secondary focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-solid outline-none"].join(" "),children:[e(c,{}),e(i,{icon:n,size:k[A]})]}):null]}):null,d(H)?e("div",{className:["min-h-0 flex-1 overflow-y-auto overscroll-contain",$[A],Z,L&&(X||Q)?ee:""].filter(Boolean).join(" "),children:H}):null,Y?e("div",{className:["flex shrink-0 flex-wrap items-center justify-end gap-2",Z,L?ee:""].filter(Boolean).join(" "),children:M}):null]})})]})]})}
@@ -1,2 +1,2 @@
1
- export { MPDialog, MPDialogClose } from './MPDialog';
2
- export type { MPDialogCloseProps, MPDialogProps } from './MPDialog';
1
+ export { MPDialog, MPDialogClose } from './MPDialog.js';
2
+ export type { MPDialogCloseProps, MPDialogProps } from './MPDialog.js';
@@ -1 +1 @@
1
- export{MPDialog,MPDialogClose}from"./MPDialog";
1
+ export{MPDialog,MPDialogClose}from"./MPDialog.js";
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { MPAlign, MPColor, MPOrientation, MPSize } from '../../types';
2
+ import type { MPAlign, MPColor, MPOrientation, MPSize } from '../../types.js';
3
3
  /** Where the label sits along a labelled divider. Ignored without a label. */
4
4
  export type MPDividerTextAlign = MPAlign;
5
5
  export interface MPDividerProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'color' | 'children'> {
@@ -1 +1,2 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as t from"react";import{Separator as l}from"@base-ui/react/separator";import{hasContent as a}from"../../internal/scale";const i="[border-color:var(--_mp-line)]";function o(e){return"number"==typeof e?`${e}px`:e}const n={horizontal:{start:["w-4 shrink-0","flex-1"],center:["flex-1","flex-1"],end:["flex-1","w-4 shrink-0"]},vertical:{start:["h-4 shrink-0","flex-1"],center:["flex-1","flex-1"],end:["flex-1","h-4 shrink-0"]}},s={xs:"text-mp-label-small",sm:"text-mp-label-small",md:"text-mp-label-medium",lg:"text-mp-label-large",xl:"text-mp-label-large"},m={xs:"gap-1.5",sm:"gap-2",md:"gap-3",lg:"gap-3.5",xl:"gap-4"};export const MPDivider=/*@__PURE__*/t.forwardRef(function({orientation:t="horizontal",color:p,size:d="md",length:c,thickness:f,textAlign:h="center",className:x,style:u,children:v,...b},w){const g="vertical"===t,_=a(v),$={"--_mp-line":p?`var(--_mp-color-${p})`:"var(--_mp-color-outline-variant)","--_mp-rule":o(f)??"1px"},j=o(c),k={...$,...void 0===j?null:g?{height:j}:{width:j},...u};if(!_)return e(l,{ref:w,orientation:t,"data-mp-size":d,className:["mp-divider",g?"w-0 border-l [border-left-width:var(--_mp-rule)] "+(void 0===j?"self-stretch":""):"h-0 w-full border-t [border-top-width:var(--_mp-rule)]",i,x??""].filter(Boolean).join(" "),style:k,...b});const[N,y]=n[t][h],z=g?"w-0 border-l [border-left-width:var(--_mp-rule)]":"h-0 border-t [border-top-width:var(--_mp-rule)]";return r(l,{ref:w,orientation:t,"aria-label":"string"==typeof v?v:void 0,"data-mp-size":d,className:["mp-divider flex items-center",g?"w-auto flex-col "+(void 0===j?"self-stretch":""):"w-full",m[d],x??""].filter(Boolean).join(" "),style:k,...b,children:[e("span",{"aria-hidden":"true",className:`${z} ${N} ${i}`}),e("span",{className:["text-mp-on-surface-variant shrink-0 whitespace-nowrap",s[d],g?"[writing-mode:vertical-rl]":""].filter(Boolean).join(" "),children:v}),e("span",{"aria-hidden":"true",className:`${z} ${y} ${i}`})]})});
1
+ "use client";
2
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as t from"react";import{Separator as l}from"@base-ui/react/separator";import{hasContent as a}from"../../internal/scale.js";import{cssLength as i}from"../../internal/length.js";const o="[border-color:var(--_mp-line)]",n={horizontal:{start:["w-4 shrink-0","flex-1"],center:["flex-1","flex-1"],end:["flex-1","w-4 shrink-0"]},vertical:{start:["h-4 shrink-0","flex-1"],center:["flex-1","flex-1"],end:["flex-1","h-4 shrink-0"]}},s={xs:"text-mp-label-small",sm:"text-mp-label-small",md:"text-mp-label-medium",lg:"text-mp-label-large",xl:"text-mp-label-large"},m={xs:"gap-1.5",sm:"gap-2",md:"gap-3",lg:"gap-3.5",xl:"gap-4"};export const MPDivider=/*@__PURE__*/t.forwardRef(function({orientation:t="horizontal",color:d,size:p="md",length:c,thickness:f,textAlign:h="center",className:x,style:u,children:v,...b},w){const g="vertical"===t,_=a(v),j={"--_mp-line":d?`var(--_mp-color-${d})`:"var(--_mp-color-outline-variant)","--_mp-rule":i(f)??"1px"},$=i(c),k={...j,...void 0===$?null:g?{height:$}:{width:$},...u};if(!_)return e(l,{ref:w,orientation:t,"data-mp-size":p,className:["mp-divider",g?"w-0 border-l [border-left-width:var(--_mp-rule)] "+(void 0===$?"self-stretch":""):"h-0 w-full border-t [border-top-width:var(--_mp-rule)]",o,x??""].filter(Boolean).join(" "),style:k,...b});const[N,z]=n[t][h],y=g?"w-0 border-l [border-left-width:var(--_mp-rule)]":"h-0 border-t [border-top-width:var(--_mp-rule)]";return r(l,{ref:w,orientation:t,"aria-label":"string"==typeof v?v:void 0,"data-mp-size":p,className:["mp-divider flex items-center",g?"w-auto flex-col "+(void 0===$?"self-stretch":""):"w-full",m[p],x??""].filter(Boolean).join(" "),style:k,...b,children:[e("span",{"aria-hidden":"true",className:`${y} ${N} ${o}`}),e("span",{className:["text-mp-on-surface-variant shrink-0 whitespace-nowrap",s[p],g?"[writing-mode:vertical-rl]":""].filter(Boolean).join(" "),children:v}),e("span",{"aria-hidden":"true",className:`${y} ${z} ${o}`})]})});
@@ -1,2 +1,2 @@
1
- export { MPDivider } from './MPDivider';
2
- export type { MPDividerProps, MPDividerTextAlign } from './MPDivider';
1
+ export { MPDivider } from './MPDivider.js';
2
+ export type { MPDividerProps, MPDividerTextAlign } from './MPDivider.js';
@@ -1 +1 @@
1
- export{MPDivider}from"./MPDivider";
1
+ export{MPDivider}from"./MPDivider.js";
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Dialog } from '@base-ui/react/dialog';
3
- import type { MPSide, MPSize } from '../../types';
3
+ import type { MPSide, MPSize } from '../../types.js';
4
4
  /**
5
5
  * How the panel relates to the page, in MD3's own two words for it.
6
6
  *
@@ -1 +1,2 @@
1
- import{jsx as e,jsxs as t,Fragment as l}from"react/jsx-runtime";import*as a from"react";import{Dialog as o}from"@base-ui/react/dialog";import{MPIcon as n}from"../icon/MPIcon";import{CloseIcon as r}from"../../constants/icons";import{useMPLocale as i,useMPMessages as s}from"../../internal/locale";import{MPStateLayer as d}from"../../internal/StateLayer";import{hasContent as m,META_TEXT as c,PROSE_TEXT as f,SHEET_GAP as u,SHEET_PAD_X as p,SHEET_PAD_Y as x,SHEET_TITLE as h}from"../../internal/scale";import{FADE as b,PORTAL_LAYER as g,SCRIM as y,SHEET_MOTION as v}from"../../internal/surface";const w={xs:"w-60",sm:"w-72",md:"w-90",lg:"w-104",xl:"w-120"},$={left:"rounded-r-mp-lg",right:"rounded-l-mp-lg",top:"rounded-b-mp-xl",bottom:"rounded-t-mp-xl"},j={left:"border-r",right:"border-l",top:"border-b",bottom:"border-t"},N={left:"flex-row justify-start",right:"flex-row justify-end",top:"flex-col justify-start",bottom:"flex-col justify-end"},C={left:"motion-safe:data-starting-style:-translate-x-full motion-safe:data-ending-style:-translate-x-full",right:"motion-safe:data-starting-style:translate-x-full motion-safe:data-ending-style:translate-x-full",top:"motion-safe:data-starting-style:-translate-y-full motion-safe:data-ending-style:-translate-y-full",bottom:"motion-safe:data-starting-style:translate-y-full motion-safe:data-ending-style:translate-y-full"},k=`transition-[opacity,translate] ${v}`,z="border-mp-outline-variant border-t";export const MPDrawerClose=o.Close;export function MPDrawer({side:v="left",mode:P="modal",open:B,defaultOpen:D,onOpenChange:O,trigger:M,title:L,description:S,actions:T,dividers:F=!1,showClose:I,closeLabel:R,locale:V,extent:q,rounded:A=!0,dismissible:E=!0,size:G="md",className:H,style:J,children:K}){const Q=i(V),U=s("common",Q),W="modal"===P,X="left"===v||"right"===v,Y=I??W,Z=R??U.close,[_,ee]=a.useState(D??!0),te=B??_,le=p[G],ae=x[G],oe=F?`${le} ${ae}`:le,ne=m(L)||m(S),re=m(T),ie=void 0===q?null:{[X?"width":"height"]:"number"==typeof q?`${q}px`:q},se=["mp-drawer relative flex flex-col overflow-hidden box-border","border-mp-outline-variant outline-none",W?"bg-mp-surface-container-low shadow-mp-1":"bg-mp-surface","text-mp-on-surface",f[G],j[v],A?$[v]:"",W?`${k} ${C[v]}`:"",X?`h-full max-w-full ${void 0===q?w[G]:""}`:"w-full "+(void 0===q?"max-h-[85%]":""),F?"":`${ae} ${u[G]}`,H??""].filter(Boolean).join(" "),de=W?o.Title:"h2",me=W?o.Description:"p",ce=["group text-mp-on-surface-variant relative flex size-10 shrink-0","rounded-mp-full cursor-pointer items-center justify-center","appearance-none border-0 bg-transparent","outline-mp-secondary focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-solid outline-none"].join(" "),fe=t(l,{children:[ne||Y?t("div",{className:`flex shrink-0 items-start gap-3 ${oe}`,children:[t("div",{className:"flex min-w-0 flex-1 flex-col",children:[m(L)?e(de,{className:`m-0 ${h[G]}`,children:L}):null,m(S)?e(me,{className:`text-mp-on-surface-variant m-0 ${c}`,children:S}):null]}),Y?W?t(o.Close,{"aria-label":Z,className:ce,children:[e(d,{}),e(n,{icon:r,size:20})]}):t("button",{type:"button","aria-label":Z,className:ce,onClick:()=>{void 0===B&&ee(!1),O?.(!1)},children:[e(d,{}),e(n,{icon:r,size:20})]}):null]}):null,m(K)?e("div",{className:["min-h-0 flex-1 overflow-y-auto overscroll-contain",oe,F&&(ne||Y)?z:"",F?"":"-my-1 py-1"].filter(Boolean).join(" "),children:K}):null,re?e("div",{className:["flex shrink-0 flex-wrap items-center justify-end gap-2",oe,F?z:""].filter(Boolean).join(" "),children:T}):null]});return W?t(o.Root,{open:B,defaultOpen:D,disablePointerDismissal:!E,onOpenChange:(e,t)=>{E||e||"escape-key"!==t.reason?O?.(e):t.cancel()},children:[M?e(o.Trigger,{render:M}):null,t(o.Portal,{children:[e(o.Backdrop,{className:`${g} fixed inset-0 ${b} ${y}`}),e(o.Viewport,{className:`${g} fixed inset-0 flex ${N[v]}`,children:e(o.Popup,{"data-mp-size":G,"data-mp-side":v,"data-mp-mode":P,className:se,style:{...ie,...J},children:fe})})]})]}):te?e("div",{"data-mp-size":G,"data-mp-side":v,"data-mp-mode":P,className:se,style:{...ie,...J},children:fe}):null}
1
+ "use client";
2
+ import{jsx as e,jsxs as t,Fragment as l}from"react/jsx-runtime";import*as a from"react";import{Dialog as o}from"@base-ui/react/dialog";import{MPIcon as n}from"../icon/MPIcon.js";import{CloseIcon as r}from"../../constants/icons.js";import{useMPLocale as i,useMPMessages as s}from"../../internal/locale.js";import{COMMON as d}from"../../internal/messages/common.js";import{MPStateLayer as m}from"../../internal/StateLayer.js";import{cssLength as f}from"../../internal/length.js";import{hasContent as c,META_TEXT as p,PROSE_TEXT as u,SHEET_GAP as x,SHEET_PAD_X as h,SHEET_PAD_Y as g,SHEET_TITLE as b}from"../../internal/scale.js";import{FADE as y,PORTAL_LAYER as v,SCRIM as j,SHEET_MOTION as w}from"../../internal/surface.js";const $={xs:"w-60",sm:"w-72",md:"w-90",lg:"w-104",xl:"w-120"},N={left:"rounded-r-mp-lg",right:"rounded-l-mp-lg",top:"rounded-b-mp-xl",bottom:"rounded-t-mp-xl"},C={left:"border-r",right:"border-l",top:"border-b",bottom:"border-t"},k={left:"flex-row justify-start",right:"flex-row justify-end",top:"flex-col justify-start",bottom:"flex-col justify-end"},z={left:"motion-safe:data-starting-style:-translate-x-full motion-safe:data-ending-style:-translate-x-full",right:"motion-safe:data-starting-style:translate-x-full motion-safe:data-ending-style:translate-x-full",top:"motion-safe:data-starting-style:-translate-y-full motion-safe:data-ending-style:-translate-y-full",bottom:"motion-safe:data-starting-style:translate-y-full motion-safe:data-ending-style:translate-y-full"},P=`transition-[opacity,translate] ${w}`,B="border-mp-outline-variant border-t";export const MPDrawerClose=o.Close;export function MPDrawer({side:w="left",mode:D="modal",open:O,defaultOpen:M,onOpenChange:L,trigger:S,title:T,description:F,actions:I,dividers:R=!1,showClose:V,closeLabel:q,locale:A,extent:E,rounded:G=!0,dismissible:H=!0,size:J="md",className:K,style:Q,children:U}){const W=i(A),X=s(d,W),Y="modal"===D,Z="left"===w||"right"===w,_=V??Y,ee=q??X.close,[te,le]=a.useState(M??!0),ae=O??te,oe=h[J],ne=g[J],re=R?`${oe} ${ne}`:oe,ie=c(T)||c(F),se=c(I),de=void 0===E?null:{[Z?"width":"height"]:f(E)},me=["mp-drawer relative flex flex-col overflow-hidden box-border","border-mp-outline-variant outline-none",Y?"bg-mp-surface-container-low shadow-mp-1":"bg-mp-surface","text-mp-on-surface",u[J],C[w],G?N[w]:"",Y?`${P} ${z[w]}`:"",Z?`h-full max-w-full ${void 0===E?$[J]:""}`:"w-full "+(void 0===E?"max-h-[85%]":""),R?"":`${ne} ${x[J]}`,K??""].filter(Boolean).join(" "),fe=Y?o.Title:"h2",ce=Y?o.Description:"p",pe=/*@__PURE__*/["group text-mp-on-surface-variant relative flex size-10 shrink-0","rounded-mp-full cursor-pointer items-center justify-center","appearance-none border-0 bg-transparent","outline-mp-secondary focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-solid outline-none"].join(" "),ue=t(l,{children:[ie||_?t("div",{className:`flex shrink-0 items-start gap-3 ${re}`,children:[t("div",{className:"flex min-w-0 flex-1 flex-col",children:[c(T)?e(fe,{className:`m-0 ${b[J]}`,children:T}):null,c(F)?e(ce,{className:`text-mp-on-surface-variant m-0 ${p}`,children:F}):null]}),_?Y?t(o.Close,{"aria-label":ee,className:pe,children:[e(m,{}),e(n,{icon:r,size:20})]}):t("button",{type:"button","aria-label":ee,className:pe,onClick:()=>{void 0===O&&le(!1),L?.(!1)},children:[e(m,{}),e(n,{icon:r,size:20})]}):null]}):null,c(U)?e("div",{className:["min-h-0 flex-1 overflow-y-auto overscroll-contain",re,R&&(ie||_)?B:"",R?"":"-my-1 py-1"].filter(Boolean).join(" "),children:U}):null,se?e("div",{className:["flex shrink-0 flex-wrap items-center justify-end gap-2",re,R?B:""].filter(Boolean).join(" "),children:I}):null]});return Y?t(o.Root,{open:O,defaultOpen:M,disablePointerDismissal:!H,onOpenChange:(e,t)=>{H||e||"escape-key"!==t.reason?L?.(e):t.cancel()},children:[S?e(o.Trigger,{render:S}):null,t(o.Portal,{children:[e(o.Backdrop,{className:`${v} fixed inset-0 ${y} ${j}`}),e(o.Viewport,{className:`${v} fixed inset-0 flex ${k[w]}`,children:e(o.Popup,{"data-mp-size":J,"data-mp-side":w,"data-mp-mode":D,className:me,style:{...de,...Q},children:ue})})]})]}):ae?e("div",{"data-mp-size":J,"data-mp-side":w,"data-mp-mode":D,className:me,style:{...de,...Q},children:ue}):null}
@@ -1,2 +1,2 @@
1
- export { MPDrawer, MPDrawerClose } from './MPDrawer';
2
- export type { MPDrawerCloseProps, MPDrawerMode, MPDrawerProps } from './MPDrawer';
1
+ export { MPDrawer, MPDrawerClose } from './MPDrawer.js';
2
+ export type { MPDrawerCloseProps, MPDrawerMode, MPDrawerProps } from './MPDrawer.js';
@@ -1 +1 @@
1
- export{MPDrawer,MPDrawerClose}from"./MPDrawer";
1
+ export{MPDrawer,MPDrawerClose}from"./MPDrawer.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 { MPSize, MPVariant } from '../../types';
3
+ import type { MPSize, MPVariant } from '../../types.js';
4
4
  export interface MPEmptyProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'color' | 'title'> {
5
5
  /**
6
6
  * The headline. Defaults to the words for "nothing here" in `locale`; pass
@@ -1 +1,2 @@
1
- import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import*as n from"react";import{useRender as a}from"@base-ui/react/use-render";import{useMPLocale as l,useMPMessages as s}from"../../internal/locale";import{hasContent as i,PROSE_TEXT as o,SHEET_GAP as m,SHEET_PAD_X as c,SHEET_TITLE as d}from"../../internal/scale";import{CONTAINER_SURFACE as p}from"../../internal/surface";const x={xs:"py-5",sm:"py-6",md:"py-8",lg:"py-10",xl:"py-12"},f={xs:"text-[1.5rem]",sm:"text-[1.75rem]",md:"text-[2.25rem]",lg:"text-[2.75rem]",xl:"text-[3.25rem]"};function u(){return t("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",className:"size-[1em]",children:[e("path",{d:"M1.75 9.75h3l.9 1.6h4.7l.9-1.6h3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"m1.75 9.75 2.1-6a1.5 1.5 0 0 1 1.42-1h5.46a1.5 1.5 0 0 1 1.42 1l2.1 6v2a1.5 1.5 0 0 1-1.5 1.5h-9.5a1.5 1.5 0 0 1-1.5-1.5Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"})]})}export const MPEmpty=/*@__PURE__*/n.forwardRef(function({variant:n="text",size:h="md",title:v,icon:y,action:j,locale:N,render:k,className:g,style:w,children:z,...$},L){const B=l(N),C=s("empty",B),M=void 0===v?C.title:v,W=void 0===y?e(u,{}):y,b=i(M),E=["mp-empty flex w-full flex-col items-center justify-center text-center",c[h],x[h],"text"===n?"":"rounded-mp-md",m[h],p[n],"text-mp-on-surface",g??""].filter(Boolean).join(" ");return a({render:k,ref:L,props:{role:"status","data-mp-size":h,"data-mp-variant":n,className:E,style:w,children:t(r,{children:[i(W)?e("span",{className:`text-mp-on-surface-variant flex items-center ${f[h]} [&>svg]:size-[1em]`,children:W}):null,b||i(z)?t("div",{className:`flex max-w-prose flex-col items-center ${m[h]}`,children:[b?e("div",{className:d[h],children:M}):null,i(z)?e("div",{className:`${o[h]} ${b?"text-mp-on-surface-variant":""}`,children:z}):null]}):null,i(j)?e("div",{className:"flex flex-wrap items-center justify-center gap-2",children:j}):null]}),...$}})});
1
+ "use client";
2
+ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import*as s from"react";import{useRender as n}from"@base-ui/react/use-render";import{useMPLocale as a,useMPMessages as l}from"../../internal/locale.js";import{EMPTY as i}from"../../internal/messages/empty.js";import{hasContent as o,PROSE_TEXT as m,SHEET_GAP as c,SHEET_PAD_X as d,SHEET_TITLE as p}from"../../internal/scale.js";import{CONTAINER_SURFACE as f}from"../../internal/surface.js";const x={xs:"py-5",sm:"py-6",md:"py-8",lg:"py-10",xl:"py-12"},u={xs:"text-[1.5rem]",sm:"text-[1.75rem]",md:"text-[2.25rem]",lg:"text-[2.75rem]",xl:"text-[3.25rem]"};function h(){return t("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",className:"size-[1em]",children:[e("path",{d:"M1.75 9.75h3l.9 1.6h4.7l.9-1.6h3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"m1.75 9.75 2.1-6a1.5 1.5 0 0 1 1.42-1h5.46a1.5 1.5 0 0 1 1.42 1l2.1 6v2a1.5 1.5 0 0 1-1.5 1.5h-9.5a1.5 1.5 0 0 1-1.5-1.5Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"})]})}export const MPEmpty=/*@__PURE__*/s.forwardRef(function({variant:s="text",size:v="md",title:j,icon:y,action:N,locale:g,render:k,className:w,style:z,children:$,...L},B){const C=a(g),M=l(i,C),W=void 0===j?M.title:j,b=void 0===y?e(h,{}):y,E=o(W),F=["mp-empty flex w-full flex-col items-center justify-center text-center",d[v],x[v],"text"===s?"":"rounded-mp-md",c[v],f[s],"text-mp-on-surface",w??""].filter(Boolean).join(" ");return n({render:k,ref:B,props:{role:"status","data-mp-size":v,"data-mp-variant":s,className:F,style:z,children:t(r,{children:[o(b)?e("span",{className:`text-mp-on-surface-variant flex items-center ${u[v]} [&>svg]:size-[1em]`,children:b}):null,E||o($)?t("div",{className:`flex max-w-prose flex-col items-center ${c[v]}`,children:[E?e("div",{className:p[v],children:W}):null,o($)?e("div",{className:`${m[v]} ${E?"text-mp-on-surface-variant":""}`,children:$}):null]}):null,o(N)?e("div",{className:"flex flex-wrap items-center justify-center gap-2",children:N}):null]}),...L}})});
@@ -1,2 +1,2 @@
1
- export { MPEmpty } from './MPEmpty';
2
- export type { MPEmptyProps } from './MPEmpty';
1
+ export { MPEmpty } from './MPEmpty.js';
2
+ export type { MPEmptyProps } from './MPEmpty.js';
@@ -1 +1 @@
1
- export{MPEmpty}from"./MPEmpty";
1
+ export{MPEmpty}from"./MPEmpty.js";
@@ -0,0 +1,52 @@
1
+ import * as React from 'react';
2
+ import type { MPSize } from '../../types.js';
3
+ export interface MPFieldsetProps extends Omit<React.ComponentPropsWithoutRef<'fieldset'>, 'color'> {
4
+ /**
5
+ * What the group is called.
6
+ *
7
+ * It becomes part of the accessible name of every control inside, so it has to
8
+ * be a phrase that still reads correctly in front of each of them — "Billing
9
+ * address", not "Where should we send it?".
10
+ */
11
+ legend?: React.ReactNode;
12
+ /** A line under the legend. */
13
+ description?: React.ReactNode;
14
+ /**
15
+ * Disables every control inside at once, the way a `<fieldset>` always has.
16
+ * @default false
17
+ */
18
+ disabled?: boolean;
19
+ /**
20
+ * The legend's type scale and the gap the controls stand at.
21
+ * @default 'md'
22
+ */
23
+ size?: MPSize;
24
+ children?: React.ReactNode;
25
+ }
26
+ /**
27
+ * A group of controls that answer one question together, with a name on it.
28
+ *
29
+ * ## Why it draws no surface
30
+ *
31
+ * Because a group of fields is a **grouping** and not a sheet, and the sheet
32
+ * already exists: put this inside an [MPCard](../layout/card) or an
33
+ * [MPBox](../layout/box) when one is wanted. A fieldset that painted its own
34
+ * would be a second sheet inside the first the moment anybody did.
35
+ *
36
+ * What it owns instead is the legend, the gap the controls stand at, and the one
37
+ * thing only a real `<fieldset>` can do: **`disabled` reaches every control
38
+ * inside it**, including ones a component three levels down rendered and never
39
+ * heard of it. That is not something a context could promise.
40
+ *
41
+ * ## Why the legend is not a `<legend>`
42
+ *
43
+ * It is a `<div>` pointed at by `aria-labelledby` — Base UI's decision, and the
44
+ * one that makes the group a normal flex container. A real rendered `<legend>`
45
+ * is lifted out of its fieldset's content box by every browser, so a `gap` would
46
+ * put no space at all under it and the first control would sit against the name
47
+ * of the group.
48
+ *
49
+ * The accessible name is the same either way, which is the only part that had to
50
+ * survive.
51
+ */
52
+ export declare const MPFieldset: React.ForwardRefExoticComponent<MPFieldsetProps & React.RefAttributes<HTMLFieldSetElement>>;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsx as e,jsxs as s}from"react/jsx-runtime";import*as l from"react";import{Fieldset as a}from"@base-ui/react/fieldset";import{hasContent as r,META_TEXT as n,SHEET_GAP as i,SHEET_TITLE as t,STACK_GAP as o}from"../../internal/scale.js";export const MPFieldset=/*@__PURE__*/l.forwardRef(function({legend:l,description:m,disabled:c=!1,size:d="md",className:f,children:p,...x},u){const h=r(l)||r(m);return s(a.Root,{ref:u,disabled:c,"data-mp-size":d,className:["mp-fieldset flex min-w-0 flex-col","m-0 border-0 p-0",i[d],f??""].filter(Boolean).join(" "),...x,children:[h?s(a.Legend,{className:`mp-fieldset__legend flex min-w-0 flex-col p-0 ${o[d]}`,children:[r(l)?e("span",{className:`text-mp-on-surface ${t[d]}`,children:l}):null,r(m)?e("span",{className:`text-mp-on-surface-variant ${n}`,children:m}):null]}):null,p]})});
@@ -0,0 +1,2 @@
1
+ export { MPFieldset } from './MPFieldset.js';
2
+ export type { MPFieldsetProps } from './MPFieldset.js';
@@ -0,0 +1 @@
1
+ export{MPFieldset}from"./MPFieldset.js";
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { MPStyleProps } from '../../types';
2
+ import type { MPStyleProps } from '../../types.js';
3
3
  /** Why a file was turned away. One reason per file, in the order they are checked. */
4
4
  export type MPFileRejectionReason = 'type' | 'size' | 'count';
5
5
  export interface MPFileRejection {
@@ -52,7 +52,7 @@ export interface MPFilePickerProps extends MPStyleProps {
52
52
  description?: React.ReactNode;
53
53
  /** The message under the box, which also turns the picker over. */
54
54
  errorMessage?: React.ReactNode;
55
- /** The line inside the box. @default 'Drop files here, or click to browse' */
55
+ /** The line inside the box. Defaults to the wording in `locale`. */
56
56
  title?: React.ReactNode;
57
57
  /** The line under it — what is accepted, how big, how many. */
58
58
  hint?: React.ReactNode;
@@ -68,8 +68,9 @@ export interface MPFilePickerProps extends MPStyleProps {
68
68
  */
69
69
  removeLabel?: (name: string) => string;
70
70
  /**
71
- * Which language the remove buttons' default names are written in. Falls back
72
- * to the nearest `MPLocaleProvider`, then to English.
71
+ * Which language the box's own words are written in — the prompt inside it and
72
+ * the remove buttons' names. Falls back to the nearest `MPLocaleProvider`,
73
+ * then to English.
73
74
  */
74
75
  locale?: string;
75
76
  /** Marks the field required. */
@@ -1 +1,2 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as n from"react";import{MPIcon as t}from"../icon/MPIcon";import{CloseIcon as a,UploadIcon as i}from"../../constants/icons";import{fillMessage as o}from"../../internal/i18n";import{useMPLocale as l,useMPMessages as s}from"../../internal/locale";import{MPStateLayer as c}from"../../internal/StateLayer";import{CONTROL_ICON as p,META_TEXT as m,PROSE_TEXT as u,STACK_GAP as d,hasContent as f}from"../../internal/scale";const h={xs:"p-4",sm:"p-5",md:"p-6",lg:"p-8",xl:"p-10"};export function formatFileSize(e){if(e<1e3)return`${e} B`;const r=["kB","MB","GB","TB"];let n=e/1e3,t=0;for(;n>=1e3&&t<r.length-1;)n/=1e3,t+=1;return`${n<10?n.toFixed(1):Math.round(n)} ${r[t]}`}function x(e,r){const n=e.name.toLowerCase(),t=e.type.toLowerCase();return r.split(",").map(e=>e.trim().toLowerCase()).filter(Boolean).some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?t.startsWith(e.slice(0,-1)):t===e)}export const MPFilePicker=/*@__PURE__*/n.forwardRef(function({accept:b,multiple:v=!1,maxSize:g,maxFiles:y,value:N,defaultValue:j,onFilesChange:k,onReject:w,label:z,description:C,errorMessage:I,title:B,hint:D,icon:F,showList:L=!0,removeLabel:M,locale:S,size:$="md",fullWidth:T=!0,required:W=!1,disabled:_=!1,readOnly:P=!1,name:R,id:E},O){const q=l(S),A=s("common",q),V=n.useRef(null);n.useImperativeHandle(O,()=>V.current,[]);const[G,H]=n.useState(()=>[...j??[]]),Y=N?[...N]:G,J=n.useRef(0),[K,Q]=n.useState(!1),U=f(I),X=_||P,Z=n.useId(),ee=n.useId(),re=n.useCallback(e=>{N||H(e),k?.(e)},[k,N]),ne=n.useCallback(e=>{const r=[],n=[],t=v?y??Number.POSITIVE_INFINITY:1,a=v?Y.length:0;for(const i of e)b&&!x(i,b)?n.push({file:i,reason:"type"}):void 0!==g&&i.size>g?n.push({file:i,reason:"size"}):a+r.length>=t?n.push({file:i,reason:"count"}):r.push(i);return{kept:r,rejections:n}},[b,Y.length,y,g,v]),te=n.useCallback(e=>{const{kept:r,rejections:n}=ne(e);n.length>0&&w?.(n),r.length>0&&re(v?[...Y,...r]:r)},[ne,re,Y,v,w]);return r("div",{className:["mp-file-picker flex-col align-top",d[$],T?"flex w-full":"inline-flex"].join(" "),"data-mp-size":$,"data-disabled":_||void 0,"data-invalid":U||void 0,children:[f(z)?r("span",{id:ee,className:[m,_?"text-mp-on-surface/38":U?"text-mp-error":"text-mp-on-surface-variant"].join(" "),children:[z,W?e("span",{"aria-hidden":"true",children:" *"}):null]}):null,r("div",{className:"flex w-full flex-col",onDragEnter:e=>{X||(e.preventDefault(),J.current+=1,Q(!0))},onDragOver:e=>{X||(e.preventDefault(),e.dataTransfer.dropEffect="copy")},onDragLeave:()=>{X||(J.current=Math.max(0,J.current-1),0===J.current&&Q(!1))},onDrop:e=>{X||(e.preventDefault(),J.current=0,Q(!1),te(Array.from(e.dataTransfer.files)))},children:[r("button",{type:"button",id:E,disabled:_,"aria-describedby":f(C)||U?Z:void 0,"aria-invalid":U||void 0,className:["mp-file-picker__zone group relative flex w-full flex-col items-center","justify-center gap-2 text-center","rounded-mp-md box-border border-2 border-dashed","appearance-none bg-transparent font-[inherit] outline-none","transition-[border-color,background-color] duration-(--mp-sys-motion-duration-short4)",h[$],u[$],_?"border-mp-on-surface/12 text-mp-on-surface/38 cursor-default":[P?"cursor-default":"cursor-pointer",U?"border-mp-error":"border-mp-outline-variant","text-mp-on-surface",K?"border-mp-primary bg-mp-primary/8":""].filter(Boolean).join(" ")].filter(Boolean).join(" "),onClick:()=>{!X&&V.current&&(V.current.value="",V.current.click())},children:[X?null:e(c,{layer:"inset-0 rounded-[inherit] bg-mp-primary"}),void 0===F?e(t,{icon:i,size:1.6*p[$],className:_?"":"text-mp-primary"}):f(F)?e("span",{className:_?"":"text-mp-primary",children:F}):null,e("span",{className:"font-medium",children:B??"Drop files here, or click to browse"}),f(D)?e("span",{className:[m,_?"text-mp-on-surface/38":"text-mp-on-surface-variant"].join(" "),children:D}):null]}),e("input",{ref:V,type:"file",name:R,accept:b,multiple:v,required:W&&0===Y.length,disabled:X,tabIndex:-1,"aria-labelledby":f(z)?ee:void 0,"aria-describedby":f(C)||U?Z:void 0,className:"absolute size-px overflow-hidden opacity-0 [clip-path:inset(50%)]",onChange:e=>te(Array.from(e.target.files??[]))})]}),L&&Y.length>0?e("ul",{className:["mp-file-picker__list m-0 flex w-full list-none flex-col p-0",d[$]].join(" "),children:Y.map((n,i)=>r("li",{className:["rounded-mp-xs bg-mp-surface-container-low flex w-full items-center gap-3","px-3 py-2",u[$],_?"text-mp-on-surface/38":"text-mp-on-surface"].join(" "),children:[e("span",{className:"min-w-0 flex-1 truncate",children:n.name}),e("span",{className:[m,"shrink-0 tabular-nums",_?"text-mp-on-surface/38":"text-mp-on-surface-variant"].join(" "),children:formatFileSize(n.size)}),X?null:r("button",{type:"button","aria-label":M?M(n.name):o(A.removeNamed,{label:n.name}),className:["group text-mp-on-surface-variant relative flex size-8 shrink-0","cursor-pointer appearance-none items-center justify-center rounded-full","bg-transparent p-0 font-[inherit] outline-none"].join(" "),onClick:()=>re(Y.filter((e,r)=>r!==i)),children:[e(c,{}),e(t,{icon:a,size:18})]})]},`${n.name}-${n.size}-${n.lastModified}-${i}`))}):null,U?e("span",{id:Z,className:[m,"text-mp-error"].join(" "),children:I}):f(C)?e("span",{id:Z,className:[m,_?"text-mp-on-surface/38":"text-mp-on-surface-variant"].join(" "),children:C}):null]})});
1
+ "use client";
2
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as n from"react";import{MPIcon as t}from"../icon/MPIcon.js";import{CloseIcon as a,UploadIcon as i}from"../../constants/icons.js";import{fillMessage as o}from"../../internal/i18n.js";import{useMPLocale as l,useMPMessages as s}from"../../internal/locale.js";import{COMMON as c}from"../../internal/messages/common.js";import{FILE_PICKER as m}from"../../internal/messages/file-picker.js";import{MPStateLayer as p}from"../../internal/StateLayer.js";import{CONTROL_ICON as u,META_TEXT as d,PROSE_TEXT as f,STACK_GAP as h,hasContent as x}from"../../internal/scale.js";const b={xs:"p-4",sm:"p-5",md:"p-6",lg:"p-8",xl:"p-10"};export function formatFileSize(e){if(e<1e3)return`${e} B`;const r=["kB","MB","GB","TB"];let n=e/1e3,t=0;for(;n>=1e3&&t<r.length-1;)n/=1e3,t+=1;return`${n<10?n.toFixed(1):Math.round(n)} ${r[t]}`}function v(e,r){const n=e.name.toLowerCase(),t=e.type.toLowerCase();return r.split(",").map(e=>e.trim().toLowerCase()).filter(Boolean).some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?t.startsWith(e.slice(0,-1)):t===e)}export const MPFilePicker=/*@__PURE__*/n.forwardRef(function({accept:g,multiple:j=!1,maxSize:y,maxFiles:N,value:k,defaultValue:z,onFilesChange:w,onReject:C,label:I,description:B,errorMessage:D,title:F,hint:L,icon:M,showList:S=!0,removeLabel:$,locale:T,size:W="md",fullWidth:_=!0,required:P=!1,disabled:R=!1,readOnly:E=!1,name:O,id:q},A){const V=l(T),G=s(c,V),H=s(m,V),Y=n.useRef(null);n.useImperativeHandle(A,()=>Y.current,[]);const[J,K]=n.useState(()=>[...z??[]]),Q=k?[...k]:J,U=n.useRef(0),[X,Z]=n.useState(!1),ee=x(D),re=R||E,ne=n.useId(),te=n.useId(),ae=n.useCallback(e=>{k||K(e),w?.(e)},[w,k]),ie=n.useCallback(e=>{const r=[],n=[],t=j?N??Number.POSITIVE_INFINITY:1,a=j?Q.length:0;for(const i of e)g&&!v(i,g)?n.push({file:i,reason:"type"}):void 0!==y&&i.size>y?n.push({file:i,reason:"size"}):a+r.length>=t?n.push({file:i,reason:"count"}):r.push(i);return{kept:r,rejections:n}},[g,Q.length,N,y,j]),oe=n.useCallback(e=>{const{kept:r,rejections:n}=ie(e);n.length>0&&C?.(n),r.length>0&&ae(j?[...Q,...r]:r)},[ie,ae,Q,j,C]);return r("div",{className:["mp-file-picker flex-col align-top",h[W],_?"flex w-full":"inline-flex"].join(" "),"data-mp-size":W,"data-disabled":R||void 0,"data-invalid":ee||void 0,children:[x(I)?r("span",{id:te,className:[d,R?"text-mp-on-surface/38":ee?"text-mp-error":"text-mp-on-surface-variant"].join(" "),children:[I,P?e("span",{"aria-hidden":"true",children:" *"}):null]}):null,r("div",{className:"relative flex w-full flex-col",onDragEnter:e=>{re||(e.preventDefault(),U.current+=1,Z(!0))},onDragOver:e=>{re||(e.preventDefault(),e.dataTransfer.dropEffect="copy")},onDragLeave:()=>{re||(U.current=Math.max(0,U.current-1),0===U.current&&Z(!1))},onDrop:e=>{re||(e.preventDefault(),U.current=0,Z(!1),oe(Array.from(e.dataTransfer.files)))},children:[r("button",{type:"button",id:q,disabled:R,"aria-describedby":x(B)||ee?ne:void 0,"aria-invalid":ee||void 0,className:["mp-file-picker__zone group relative flex w-full flex-col items-center","justify-center gap-2 text-center","rounded-mp-md box-border border-2 border-dashed","appearance-none bg-transparent font-[inherit] outline-none","transition-[border-color,background-color] duration-(--mp-sys-motion-duration-short4)",b[W],f[W],R?"border-mp-on-surface/12 text-mp-on-surface/38 cursor-default":[E?"cursor-default":"cursor-pointer",ee?"border-mp-error":"border-mp-outline-variant","text-mp-on-surface",X?"border-mp-primary bg-mp-primary/8":""].filter(Boolean).join(" ")].filter(Boolean).join(" "),onClick:()=>{!re&&Y.current&&(Y.current.value="",Y.current.click())},children:[re?null:e(p,{layer:"inset-0 rounded-[inherit] bg-mp-primary"}),void 0===M?e(t,{icon:i,size:1.6*u[W],className:R?"":"text-mp-primary"}):x(M)?e("span",{className:R?"":"text-mp-primary",children:M}):null,e("span",{className:"font-medium",children:F??H.prompt}),x(L)?e("span",{className:[d,R?"text-mp-on-surface/38":"text-mp-on-surface-variant"].join(" "),children:L}):null]}),e("input",{ref:Y,type:"file",name:O,accept:g,multiple:j,required:P&&0===Q.length,disabled:re,tabIndex:-1,"aria-labelledby":x(I)?te:void 0,"aria-describedby":x(B)||ee?ne:void 0,className:"absolute size-px overflow-hidden opacity-0 [clip-path:inset(50%)]",onChange:e=>oe(Array.from(e.target.files??[]))})]}),S&&Q.length>0?e("ul",{className:["mp-file-picker__list m-0 flex w-full list-none flex-col p-0",h[W]].join(" "),children:Q.map((n,i)=>r("li",{className:["rounded-mp-xs bg-mp-surface-container-low flex w-full items-center gap-3","px-3 py-2",f[W],R?"text-mp-on-surface/38":"text-mp-on-surface"].join(" "),children:[e("span",{className:"min-w-0 flex-1 truncate",children:n.name}),e("span",{className:[d,"shrink-0 tabular-nums",R?"text-mp-on-surface/38":"text-mp-on-surface-variant"].join(" "),children:formatFileSize(n.size)}),re?null:r("button",{type:"button","aria-label":$?$(n.name):o(G.removeNamed,{label:n.name}),className:["group text-mp-on-surface-variant relative flex size-8 shrink-0","cursor-pointer appearance-none items-center justify-center rounded-full","bg-transparent p-0 font-[inherit] outline-none"].join(" "),onClick:()=>ae(Q.filter((e,r)=>r!==i)),children:[e(p,{}),e(t,{icon:a,size:18})]})]},`${n.name}-${n.size}-${n.lastModified}-${i}`))}):null,ee?e("span",{id:ne,className:[d,"text-mp-error"].join(" "),children:D}):x(B)?e("span",{id:ne,className:[d,R?"text-mp-on-surface/38":"text-mp-on-surface-variant"].join(" "),children:B}):null]})});
@@ -1,2 +1,2 @@
1
- export { MPFilePicker, formatFileSize } from './MPFilePicker';
2
- export type { MPFilePickerProps, MPFileRejection, MPFileRejectionReason } from './MPFilePicker';
1
+ export { MPFilePicker, formatFileSize } from './MPFilePicker.js';
2
+ export type { MPFilePickerProps, MPFileRejection, MPFileRejectionReason } from './MPFilePicker.js';
@@ -1 +1 @@
1
- export{MPFilePicker,formatFileSize}from"./MPFilePicker";
1
+ export{MPFilePicker,formatFileSize}from"./MPFilePicker.js";
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { MPColor, MPCorner, MPPosition, MPSize } from '../../types';
2
+ import type { MPColor, MPCorner, MPPosition, MPSize } from '../../types.js';
3
3
  /**
4
4
  * The three containers MD3 gives a floating button, and the reason there are not
5
5
  * five of them.
@@ -1 +1,2 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";import*as a from"react";import{Button as o}from"@base-ui/react/button";import{accentSlots as n}from"../../internal/accent";import{MPStateLayer as i}from"../../internal/StateLayer";import{hasContent as s}from"../../internal/scale";const r={filled:"bg-(--_mp-accent) text-(--_mp-on-accent)",tonal:"bg-(--_mp-accent-container) text-(--_mp-on-accent-container)",elevated:"bg-mp-surface-container-high text-(--_mp-accent)"},m={xs:"h-10",sm:"h-12",md:"h-14",lg:"h-18",xl:"h-24"},l={xs:"min-w-10 gap-0 px-0",sm:"min-w-12 gap-0 px-0",md:"min-w-14 gap-0 px-0",lg:"min-w-18 gap-0 px-0",xl:"min-w-24 gap-0 px-0"},p={xs:"rounded-mp-md",sm:"rounded-mp-lg",md:"rounded-mp-lg",lg:"rounded-mp-xl",xl:"rounded-mp-xl"},d={xs:24,sm:24,md:24,lg:30,xl:36},f={xs:"text-mp-label-large",sm:"text-mp-label-large",md:"text-mp-label-large",lg:"text-mp-title-medium",xl:"text-mp-title-medium"},c={xs:"min-w-16 gap-1.5 px-3",sm:"min-w-18 gap-2 px-4",md:"min-w-20 gap-2 px-4",lg:"min-w-24 gap-2.5 px-5",xl:"min-w-28 gap-3 px-6"},x={absolute:"absolute z-30",sticky:"sticky z-30",fixed:"fixed z-40"},u={"top-start":"top-(--_mp-fab-offset) start-(--_mp-fab-offset)","top-end":"top-(--_mp-fab-offset) end-(--_mp-fab-offset)","bottom-start":"bottom-(--_mp-fab-offset) start-(--_mp-fab-offset)","bottom-end":"bottom-(--_mp-fab-offset) end-(--_mp-fab-offset)"};export const MPFloatingActionButton=/*@__PURE__*/a.forwardRef(function({icon:a,label:b,extended:g=!1,variant:h="tonal",color:w="primary",size:y="md",position:_="fixed",corner:v="bottom-end",offset:j=16,disabled:k=!1,type:z="button",className:N,style:$,...B},A){return e(o,{ref:A,type:z,disabled:k,"aria-label":b,"data-mp-size":y,"data-mp-variant":h,className:["mp-fab group inline-flex shrink-0 items-center justify-center","box-border overflow-hidden align-middle whitespace-nowrap select-none","cursor-pointer appearance-none font-[inherit]","outline-mp-secondary focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-solid outline-none","transition-[background-color,box-shadow,color,min-width,padding,gap]","duration-(--mp-sys-motion-duration-short4) ease-mp-standard",p[y],m[y],f[y],g?c[y]:l[y],k?"bg-mp-on-surface/12 text-mp-on-surface/38 cursor-default shadow-none":`${r[h]} shadow-mp-3`,"static"===_?"relative":`${x[_]} ${u[v]}`,N??""].filter(Boolean).join(" "),style:{...n(w),"--_mp-fab-offset":"number"==typeof j?`${j}px`:j,...$},...B,children:[k?null:t(i,{}),s(a)?t("span",{className:"relative flex shrink-0 items-center justify-center",style:{width:d[y],height:d[y]},children:a}):null,t("span",{className:["relative grid transition-[grid-template-columns]","duration-(--mp-sys-motion-duration-short4) ease-mp-standard",g?"grid-cols-[1fr]":"grid-cols-[0fr]"].join(" "),children:t("span",{className:"min-w-0 truncate",children:b})})]})});
1
+ "use client";
2
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";import*as a from"react";import{Button as n}from"@base-ui/react/button";import{accentSlots as o}from"../../internal/accent.js";import{cssLength as i}from"../../internal/length.js";import{MPStateLayer as s}from"../../internal/StateLayer.js";import{hasContent as r}from"../../internal/scale.js";const m={filled:"bg-(--_mp-accent) text-(--_mp-on-accent)",tonal:"bg-(--_mp-accent-container) text-(--_mp-on-accent-container)",elevated:"bg-mp-surface-container-high text-(--_mp-accent)"},l={xs:"h-10",sm:"h-12",md:"h-14",lg:"h-18",xl:"h-24"},p={xs:"min-w-10 gap-0 px-0",sm:"min-w-12 gap-0 px-0",md:"min-w-14 gap-0 px-0",lg:"min-w-18 gap-0 px-0",xl:"min-w-24 gap-0 px-0"},d={xs:"rounded-mp-md",sm:"rounded-mp-lg",md:"rounded-mp-lg",lg:"rounded-mp-xl",xl:"rounded-mp-xl"},f={xs:24,sm:24,md:24,lg:30,xl:36},c={xs:"text-mp-label-large",sm:"text-mp-label-large",md:"text-mp-label-large",lg:"text-mp-title-medium",xl:"text-mp-title-medium"},x={xs:"min-w-16 gap-1.5 px-3",sm:"min-w-18 gap-2 px-4",md:"min-w-20 gap-2 px-4",lg:"min-w-24 gap-2.5 px-5",xl:"min-w-28 gap-3 px-6"},u={absolute:"absolute z-30",sticky:"sticky z-30",fixed:"fixed z-40"},b={"top-start":"top-(--_mp-fab-offset) start-(--_mp-fab-offset)","top-end":"top-(--_mp-fab-offset) end-(--_mp-fab-offset)","bottom-start":"bottom-(--_mp-fab-offset) start-(--_mp-fab-offset)","bottom-end":"bottom-(--_mp-fab-offset) end-(--_mp-fab-offset)"};export const MPFloatingActionButton=/*@__PURE__*/a.forwardRef(function({icon:a,label:g,extended:h=!1,variant:w="tonal",color:y="primary",size:_="md",position:j="fixed",corner:v="bottom-end",offset:k=16,disabled:z=!1,type:N="button",className:B,style:$,...A},F){return e(n,{ref:F,type:N,disabled:z,"aria-label":g,"data-mp-size":_,"data-mp-variant":w,className:["mp-fab group inline-flex shrink-0 items-center justify-center","box-border overflow-hidden align-middle whitespace-nowrap select-none","cursor-pointer appearance-none font-[inherit]","outline-mp-secondary focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-solid outline-none","transition-[background-color,box-shadow,color,min-width,padding,gap]","duration-(--mp-sys-motion-duration-short4) ease-mp-standard",d[_],l[_],c[_],h?x[_]:p[_],z?"bg-mp-on-surface/12 text-mp-on-surface/38 cursor-default shadow-none":`${m[w]} shadow-mp-3`,"static"===j?"relative":`${u[j]} ${b[v]}`,B??""].filter(Boolean).join(" "),style:{...o(y),"--_mp-fab-offset":i(k),...$},...A,children:[z?null:t(s,{}),r(a)?t("span",{className:"relative flex shrink-0 items-center justify-center",style:{width:f[_],height:f[_]},children:a}):null,t("span",{className:["relative grid transition-[grid-template-columns]","duration-(--mp-sys-motion-duration-short4) ease-mp-standard",h?"grid-cols-[1fr]":"grid-cols-[0fr]"].join(" "),children:t("span",{className:"min-w-0 truncate",children:g})})]})});
@@ -1,2 +1,2 @@
1
- export { MPFloatingActionButton } from './MPFloatingActionButton';
2
- export type { MPFloatingActionButtonProps, MPFloatingActionButtonVariant } from './MPFloatingActionButton';
1
+ export { MPFloatingActionButton } from './MPFloatingActionButton.js';
2
+ export type { MPFloatingActionButtonProps, MPFloatingActionButtonVariant } from './MPFloatingActionButton.js';
@@ -1 +1 @@
1
- export{MPFloatingActionButton}from"./MPFloatingActionButton";
1
+ export{MPFloatingActionButton}from"./MPFloatingActionButton.js";
@@ -0,0 +1,94 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { MPPosition, MPSize, MPVariant } from '../../types.js';
4
+ export interface MPFooterProps extends Omit<React.ComponentPropsWithoutRef<'footer'>, 'title'> {
5
+ /**
6
+ * How the sheet sits in the page's scroll.
7
+ *
8
+ * `static` — the default, and the opposite of [MPHeader](./header)'s — is what
9
+ * a footer *is*: the thing at the end of the document, reached by scrolling to
10
+ * it. `sticky` and `fixed` are for the bar that has to stay in reach — a
11
+ * form's save row, a cookie notice — and an [MPPageLayout](./page-layout)
12
+ * reserves the height a `fixed` one takes out of the flow.
13
+ * @default 'static'
14
+ */
15
+ position?: MPPosition;
16
+ /**
17
+ * How much surface the sheet paints, on the **container** ladder — a footer is
18
+ * never dyed, because what sits on it arrives with colours of its own.
19
+ *
20
+ * `outlined` is the default here and `tonal` is [MPHeader](./header)'s,
21
+ * because the two sit against different things. A header is over content that
22
+ * is passing underneath it and needs a tone of its own to stay legible; a
23
+ * footer has the end of the document above it and nothing below, so the
24
+ * hairline is the whole of what says the document ended.
25
+ * @default 'outlined'
26
+ */
27
+ variant?: MPVariant;
28
+ /**
29
+ * The sheet's scale — its gutter and the air above and below its content. As
30
+ * on [MPBox](./box), `size` here is the size of the *sheet*: it sets no height
31
+ * and no type scale.
32
+ * @default 'md'
33
+ */
34
+ size?: MPSize;
35
+ /**
36
+ * Holds the content to a measure and centres it while the sheet itself still
37
+ * spans the window. The same ladder [MPContainer](./container)'s `maxWidth`
38
+ * uses.
39
+ * @default 'none'
40
+ */
41
+ maxWidth?: MPSize | 'none';
42
+ /**
43
+ * The gutter, and the air above and below.
44
+ * @default true
45
+ */
46
+ padded?: boolean;
47
+ /**
48
+ * The name the region is announced by. Worth writing when a page has more than
49
+ * one `<footer>` in it — an article's own and the site's.
50
+ */
51
+ label?: string;
52
+ /**
53
+ * Renders something other than a `<footer>`. Base UI's own escape hatch, and
54
+ * rarely what you want: at the top level of a document that tag is the
55
+ * `contentinfo` landmark, and it is what says "this is the site's own
56
+ * information" rather than "this is more of the article".
57
+ */
58
+ render?: useRender.RenderProp;
59
+ /**
60
+ * Everything in it.
61
+ *
62
+ * A footer's content is four columns of links on one site and a single line on
63
+ * the next, all of it the caller's — which is why this component has slots for
64
+ * nothing and room for anything.
65
+ */
66
+ children?: React.ReactNode;
67
+ }
68
+ /**
69
+ * The sheet at the end of a page.
70
+ *
71
+ * A real `<footer>`, which is the whole reason it is a component rather than a
72
+ * div: at the top level of a document that tag is the `contentinfo` landmark —
73
+ * the region a screen reader offers as "the site's own information", and the one
74
+ * a search engine reads the copyright, the address and the site map out of.
75
+ *
76
+ * ## Why it has no slots, and [MPHeader](./header) does
77
+ *
78
+ * Because a header's three regions are a fixed arrangement worth writing once,
79
+ * and a footer's content is not an arrangement at all. Four columns of links on
80
+ * one site, a copyright line on the next, a language picker and a row of logos
81
+ * on the third. A component that guessed would be a component every second site
82
+ * had to fight.
83
+ *
84
+ * What it decides instead is the **sheet**: the surface, the gutter, the measure,
85
+ * and whether it stays in reach. Everything above that is an
86
+ * [MPGrid](./grid) or an [MPContainer](./container) the caller puts inside it.
87
+ *
88
+ * ## Inside a layout, and outside one
89
+ *
90
+ * Inside an [MPPageLayout](./page-layout) it registers itself, so a `fixed`
91
+ * footer's height is reserved rather than sitting on top of the last paragraph.
92
+ * Outside one it is simply a sheet.
93
+ */
94
+ export declare const MPFooter: React.ForwardRefExoticComponent<MPFooterProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsx as e}from"react/jsx-runtime";import*as t from"react";import{useRender as o}from"@base-ui/react/use-render";import{BAR_SURFACE as r,MPPageLayoutContext as a}from"../../internal/page-layout.js";import{MEASURE as i,SHEET_PAD_X as n,SHEET_PAD_Y as s}from"../../internal/scale.js";const l={static:"",absolute:"absolute inset-x-0 bottom-0 z-30",sticky:"sticky bottom-0 z-30",fixed:"fixed inset-x-0 bottom-0 z-40"};export const MPFooter=/*@__PURE__*/t.forwardRef(function({position:m="static",variant:c="outlined",size:d="md",maxWidth:f="none",padded:u=!0,label:p,render:b,className:x,children:j,...z},h){const{register:v}=t.useContext(a),w=t.useCallback(e=>{v("footer",e),"function"==typeof h?h(e):h&&(h.current=e)},[v,h]);return o({render:b??e("footer",{}),ref:w,props:{"aria-label":p,"data-mp-size":d,"data-mp-variant":c,className:["mp-footer text-mp-on-surface box-border w-full min-w-0",r[c],"outlined"===c?"border-mp-outline-variant border-t":"",l[m],x??""].filter(Boolean).join(" "),children:e("div",{className:["mp-footer__inner w-full",u?`${n[d]} ${s[d]}`:"","none"===f?"":`${i[f]} mx-auto`].filter(Boolean).join(" "),children:j}),...z}})});
@@ -0,0 +1,2 @@
1
+ export { MPFooter } from './MPFooter.js';
2
+ export type { MPFooterProps } from './MPFooter.js';
@@ -0,0 +1 @@
1
+ export{MPFooter}from"./MPFooter.js";
@@ -0,0 +1,73 @@
1
+ import * as React from 'react';
2
+ import type { MPSize } from '../../types.js';
3
+ /**
4
+ * When a field decides whether it is valid.
5
+ *
6
+ * Base UI's own three, under Base UI's own spelling. This is one of the few
7
+ * places the library does *not* invent a word of its own: `validationMode` is
8
+ * what a caller will read everywhere else, and a nicer synonym would only be a
9
+ * word they had to translate back.
10
+ */
11
+ export type MPFormValidationMode = 'onSubmit' | 'onBlur' | 'onChange';
12
+ /** Errors that came from somewhere else, keyed by the field's `name`. */
13
+ export type MPFormErrors = Record<string, string | string[]>;
14
+ export interface MPFormProps extends Omit<React.ComponentPropsWithoutRef<'form'>, 'onSubmit'> {
15
+ /**
16
+ * When a field validates.
17
+ *
18
+ * - `onSubmit` — on submit, and on every change afterwards. The default, and
19
+ * the only one that does not tell somebody their email address is wrong
20
+ * while they are still typing it.
21
+ * - `onBlur` — when a field loses focus.
22
+ * - `onChange` — on every keystroke.
23
+ * @default 'onSubmit'
24
+ */
25
+ validationMode?: MPFormValidationMode;
26
+ /**
27
+ * Errors from outside the browser's own validation — a server, a form action,
28
+ * a schema — keyed by the `name` of the field each belongs to.
29
+ *
30
+ * They are shown **on the field**, and cleared as soon as that field changes.
31
+ */
32
+ errors?: MPFormErrors;
33
+ /**
34
+ * Called on a valid submit, with the form's values. The native submit event is
35
+ * prevented, so nothing navigates.
36
+ */
37
+ onSubmit?: (values: Record<string, unknown>) => void;
38
+ /**
39
+ * The gap between the form's children. A form is a stack, and this is which
40
+ * rung of the [ladder](../../design/prop-conventions#size) it stacks on.
41
+ * @default 'md'
42
+ */
43
+ size?: MPSize;
44
+ children?: React.ReactNode;
45
+ }
46
+ /**
47
+ * A `<form>` that knows which of its fields is wrong.
48
+ *
49
+ * On its own, a page of [MPTextField](./text-field)s validates one field at a
50
+ * time, and a failed submit leaves the reader to go and find the red one. What
51
+ * this adds is the part that has to be owned **above** the fields: a submit
52
+ * collects every field's validity at once, focus lands on the first one that
53
+ * failed, and `errors` puts a server's answer back on the field it belongs to
54
+ * rather than in a banner at the top of the page.
55
+ *
56
+ * ## It is not a form library
57
+ *
58
+ * There is no schema here, no resolver and no field array. A project that wants
59
+ * those keeps the one it already has and hands the result to `errors`, which is
60
+ * the seam this is built around — and it is a seam rather than an integration
61
+ * precisely because every one of those libraries can produce
62
+ * `{ [name]: message }`.
63
+ *
64
+ * ## Why it lays its children out at all
65
+ *
66
+ * Because a form is a **stack**, and a stack with no gap is a stack of fields
67
+ * touching. The gap is the only visual decision here: no surface, no padding, no
68
+ * measure. Those belong to an [MPCard](../layout/card) or an
69
+ * [MPContainer](../layout/container) around it, for the reason a container gives
70
+ * — the thing that decides the shape of a page should not also be the thing that
71
+ * submits it.
72
+ */
73
+ export declare const MPForm: React.ForwardRefExoticComponent<MPFormProps & React.RefAttributes<HTMLFormElement>>;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsx as r}from"react/jsx-runtime";import*as o from"react";import{Form as e}from"@base-ui/react/form";import{SHEET_GAP as i}from"../../internal/scale.js";export const MPForm=/*@__PURE__*/o.forwardRef(function({validationMode:o="onSubmit",errors:m,onSubmit:a,size:t="md",className:n,children:s,...f},l){return r(e,{ref:l,validationMode:o,errors:m,onFormSubmit:r=>a?.(r),"data-mp-size":t,className:["mp-form flex flex-col",i[t],n??""].filter(Boolean).join(" "),...f,children:s})});
@@ -0,0 +1,2 @@
1
+ export { MPForm } from './MPForm.js';
2
+ export type { MPFormErrors, MPFormProps, MPFormValidationMode } from './MPForm.js';
@@ -0,0 +1 @@
1
+ export{MPForm}from"./MPForm.js";