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,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { MPResponsive } from '../../types';
3
+ import type { MPResponsive } from '../../types.js';
4
4
  /**
5
5
  * How a row divides the space its items did not take.
6
6
  *
@@ -1 +1,2 @@
1
+ "use client";
1
2
  import*as e from"react";import{useRender as t}from"@base-ui/react/use-render";const n=["compact","medium","expanded","large","extra-large"];function r(e,t,r){const a=function(e){return null==e?{}:"object"==typeof e?e:{compact:e}}(t),s={};for(const t of n){const n=a[t];void 0!==n&&(s[`--_mp-${e}-${t}`]=r(n))}return s}function a(e,t){return null==e?t:"object"==typeof e?{compact:t,...e}:e}function s(e){return String(Math.max(1,Math.round(e)))}function o(e){return String(Math.max(1,Math.round(e)))}function c(e){return String(Math.max(0,Math.round(e)))}function i(e){const t=.25*Math.max(0,e);return`${Number(t.toFixed(5))}rem`}const l={start:"justify-start",center:"justify-center",end:"justify-end","space-between":"justify-between","space-around":"justify-around","space-evenly":"justify-evenly"},f={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},u={start:"content-start",center:"content-center",end:"content-end","space-between":"content-between","space-around":"content-around","space-evenly":"content-evenly",stretch:"content-stretch"},p={auto:"self-auto",start:"self-start",center:"self-center",end:"self-end",stretch:"self-stretch",baseline:"self-baseline"};export const MPGrid=/*@__PURE__*/e.forwardRef(function({columns:e,spacing:n,rowSpacing:o,columnSpacing:c,justifyContent:p,alignItems:d,alignContent:m,wrap:y=!0,render:g,className:h,style:x,children:b,...j},w){return t({render:g,ref:w,props:{className:["mp-grid flex",y?"flex-wrap":"flex-nowrap","gap-x-(--_mp-gap-x) gap-y-(--_mp-gap-y)",p?l[p]:"",d?f[d]:"",m?u[m]:"",h??""].filter(Boolean).join(" "),style:{...r("cols",a(e,12),s),...r("gap-x",a(c??n,4),i),...r("gap-y",a(o??n,4),i),...x},children:b,...j}})});export const MPGridItem=/*@__PURE__*/e.forwardRef(function({span:e,offset:n,alignSelf:a,render:s,className:i,style:l,children:f,...u},d){return t({render:s,ref:d,props:{className:["mp-grid-item",a?p[a]:"",i??""].filter(Boolean).join(" "),style:{...r("span",e,o),...r("offset",n,c),...l},children:f,...u}})});
@@ -1,2 +1,2 @@
1
- export { MPGrid, MPGridItem } from './MPGrid';
2
- export type { MPGridAlign, MPGridAlignSelf, MPGridItemProps, MPGridJustify, MPGridProps } from './MPGrid';
1
+ export { MPGrid, MPGridItem } from './MPGrid.js';
2
+ export type { MPGridAlign, MPGridAlignSelf, MPGridItemProps, MPGridJustify, MPGridProps } from './MPGrid.js';
@@ -1 +1 @@
1
- export{MPGrid,MPGridItem}from"./MPGrid";
1
+ export{MPGrid,MPGridItem}from"./MPGrid.js";
@@ -0,0 +1,122 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { MPAlign, MPPosition, MPSize, MPVariant } from '../../types.js';
4
+ export interface MPHeaderProps extends Omit<React.ComponentPropsWithoutRef<'header'>, 'title'> {
5
+ /**
6
+ * The leading slot: the mark, the product's name, the thing that is the same
7
+ * on every page — and, on a narrow window, the
8
+ * [MPSidebarTrigger](./sidebar#mpsidebartrigger) that goes ahead of it.
9
+ *
10
+ * A slot rather than the first of `children` because the three regions of a
11
+ * bar are laid out *against each other* — the middle can only be centred on
12
+ * the bar if the two ends are the component's to measure — and a caller
13
+ * writing three wrappers by hand is a caller whose header drifts from the next
14
+ * one.
15
+ */
16
+ brand?: React.ReactNode;
17
+ /**
18
+ * The trailing slot: the account menu, the theme switch, the call to action.
19
+ * Laid out end-aligned, so a row of icon buttons needs no wrapper of its own.
20
+ */
21
+ actions?: React.ReactNode;
22
+ /**
23
+ * Where the middle slot sits.
24
+ *
25
+ * `center` is MD3's own **center-aligned top app bar**, and it is centred on
26
+ * the *bar* rather than in the space left over: both ends are given equal
27
+ * shares, so the middle stays on the bar's midline however long the brand is.
28
+ * @default 'start'
29
+ */
30
+ align?: MPAlign;
31
+ /**
32
+ * How the bar sits in the page's scroll, spelled the way CSS spells it.
33
+ *
34
+ * `sticky` — the default — holds it against the top of the window once the
35
+ * page has scrolled to it, while leaving it in the flow so nothing has to be
36
+ * padded out of its way. `fixed` takes it out of the flow entirely, which an
37
+ * [MPPageLayout](./page-layout) answers by reserving its height. `static` lets
38
+ * it scroll away.
39
+ * @default 'sticky'
40
+ */
41
+ position?: MPPosition;
42
+ /**
43
+ * How much surface the bar paints, on the **container** ladder — the bar is
44
+ * never dyed, because what sits on it arrives with colours of its own.
45
+ *
46
+ * `tonal` is the default and is MD3's own scrolled top app bar:
47
+ * `surface-container` against the page's `surface`. `outlined` is the flat one
48
+ * — the page's own surface with a hairline where it ends — and `text` paints
49
+ * nothing at all, which is what a bar over a hero image wants.
50
+ * @default 'tonal'
51
+ */
52
+ variant?: MPVariant;
53
+ /**
54
+ * The bar's height floor, its gutter and the air between its slots.
55
+ *
56
+ * `md` is 64px, which is MD3's own small top app bar. It is a floor rather
57
+ * than a height: a bar whose middle slot wrapped onto a second line would
58
+ * otherwise clip it.
59
+ * @default 'md'
60
+ */
61
+ size?: MPSize;
62
+ /**
63
+ * Holds the row of slots to a measure and centres it while the sheet itself
64
+ * still spans the window. The same ladder [MPContainer](./container)'s
65
+ * `maxWidth` uses, so a header and the container under it line up on one edge.
66
+ * @default 'none'
67
+ */
68
+ maxWidth?: MPSize | 'none';
69
+ /**
70
+ * The gutter down each side of the row.
71
+ * @default true
72
+ */
73
+ padded?: boolean;
74
+ /**
75
+ * The name the bar is announced by. Worth writing when a page has more than
76
+ * one `<header>` in it — an article's own and the site's — because "banner"
77
+ * twice tells a reader which is which not at all.
78
+ */
79
+ label?: string;
80
+ /**
81
+ * Renders something other than a `<header>`. Base UI's own escape hatch, and
82
+ * rarely what you want: at the top level of a document that tag *is* the
83
+ * `banner` landmark, and it is what says so to a screen reader's landmark
84
+ * list, to a reader mode and to a crawler.
85
+ */
86
+ render?: useRender.RenderProp;
87
+ /** The middle slot: a row of navigation links, a search field, a headline. */
88
+ children?: React.ReactNode;
89
+ }
90
+ /**
91
+ * The bar across the top of a page. **MD3's top app bar**, with the site's own
92
+ * three regions on it.
93
+ *
94
+ * A real `<header>`, which is the whole reason it is a component rather than a
95
+ * row of divs: at the top level of a document that tag is the `banner` landmark,
96
+ * and it is what a screen reader's landmark list, a reader mode and a search
97
+ * engine's understanding of the page are built out of.
98
+ *
99
+ * The slots are props rather than compound sub-components, for
100
+ * [MPCard](./card)'s reason: the arrangement is fixed — brand, middle, actions —
101
+ * and what a caller wants to decide is what goes in each. That the middle can be
102
+ * centred on the bar's own midline is only possible *because* the ends are the
103
+ * component's to measure.
104
+ *
105
+ * ## Why there is no `divider`
106
+ *
107
+ * [MPBottomNavigation](./bottom-navigation) has one and this does not, and the
108
+ * difference is that this takes a `variant`. MD3 separates a bar from the
109
+ * content by **tone** — `surface-container` against `surface` — and the case a
110
+ * hairline exists for is the bar that paints the page's own surface. That bar is
111
+ * `variant="outlined"`, and the rule is what `outlined` *means* here: a
112
+ * container's outline is a hairline all the way round, and a bar has exactly one
113
+ * edge with anything on the other side of it.
114
+ *
115
+ * ## Inside a layout, and outside one
116
+ *
117
+ * Inside an [MPPageLayout](./page-layout) the bar registers itself, so a column
118
+ * that holds its place knows how far down the window to start and a `fixed` bar
119
+ * has its height reserved. Outside one it is simply a bar, and everything above
120
+ * still holds.
121
+ */
122
+ export declare const MPHeader: React.ForwardRefExoticComponent<MPHeaderProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as a from"react";import{useRender as i}from"@base-ui/react/use-render";import{BAR_SURFACE as n,MPPageLayoutContext as r}from"../../internal/page-layout.js";import{hasContent as s,MEASURE as l,SHEET_PAD_X as m}from"../../internal/scale.js";const d={xs:"min-h-12",sm:"min-h-14",md:"min-h-16",lg:"min-h-20",xl:"min-h-24"},o={xs:"text-mp-title-small",sm:"text-mp-title-medium",md:"text-mp-title-large",lg:"text-mp-headline-small",xl:"text-mp-headline-medium"},c={xs:"gap-1.5",sm:"gap-2",md:"gap-3",lg:"gap-4",xl:"gap-5"},p={xs:"gap-3",sm:"gap-4",md:"gap-6",lg:"gap-8",xl:"gap-10"},x={static:"",absolute:"absolute inset-x-0 top-0 z-30",sticky:"sticky top-0 z-30",fixed:"fixed inset-x-0 top-0 z-40"},f={start:"shrink-0",center:"flex-1 basis-0",end:"shrink-0"},u={start:"flex min-w-0 flex-1 items-center justify-start",center:"flex min-w-0 shrink items-center justify-center",end:"flex min-w-0 flex-1 items-center justify-end"};export const MPHeader=/*@__PURE__*/a.forwardRef(function({brand:h,actions:g,align:b="start",position:j="sticky",variant:v="tonal",size:w="md",maxWidth:y="none",padded:N=!0,label:k,render:_,className:z,children:$,...B},C){const{register:H}=a.useContext(r),M=a.useCallback(e=>{H("header",e),"function"==typeof C?C(e):C&&(C.current=e)},[H,C]);return i({render:_??e("header",{}),ref:M,props:{"aria-label":k,"data-mp-size":w,"data-mp-variant":v,className:["mp-header text-mp-on-surface box-border w-full min-w-0",n[v],"outlined"===v?"border-mp-outline-variant border-b":"",x[j],z??""].filter(Boolean).join(" "),children:t("div",{className:["flex w-full items-center",d[w],p[w],N?m[w]:"","none"===y?"":`${l[y]} mx-auto`].filter(Boolean).join(" "),children:[s(h)?e("div",{className:["mp-header__brand flex min-w-0 items-center",f[b],c[w],o[w]].join(" "),children:h}):"center"===b?e("div",{"aria-hidden":"true",className:f[b]}):null,s($)?e("div",{className:`mp-header__middle ${u[b]} ${c[w]}`,children:$}):null,s(g)?e("div",{className:["mp-header__actions flex min-w-0 items-center justify-end",f[b],c[w]].join(" "),children:g}):"center"===b?e("div",{"aria-hidden":"true",className:f[b]}):null]}),...B}})});
@@ -0,0 +1,2 @@
1
+ export { MPHeader } from './MPHeader.js';
2
+ export type { MPHeaderProps } from './MPHeader.js';
@@ -0,0 +1 @@
1
+ export{MPHeader}from"./MPHeader.js";
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import type { MPTypographyWeight } from '../typography/MPTypography';
3
- import type { MPColor, MPVariant } from '../../types';
2
+ import type { MPTypographyWeight } from '../typography/MPTypography.js';
3
+ import type { MPColor, MPVariant } from '../../types.js';
4
4
  /**
5
5
  * The four weights a mark can be drawn at.
6
6
  *
@@ -19,6 +19,13 @@ export interface MPHighlightProps extends Omit<React.ComponentPropsWithoutRef<'s
19
19
  * letters of it. A `RegExp` is used as written, with the global flag forced on;
20
20
  * `caseSensitive` and `wholeWord` are ignored for it, because a regular
21
21
  * expression already says both of those things itself.
22
+ *
23
+ * Strings are escaped, so a search box's contents are safe to pass straight
24
+ * through however they are spelled. A `RegExp` is **not** — it is run as
25
+ * written, which is the point of accepting one. Building one out of text
26
+ * somebody else typed is a denial of service waiting for the input that
27
+ * backtracks; escape it into a string term instead, or keep the expression a
28
+ * literal in your own source.
22
29
  */
23
30
  query: string | string[] | RegExp;
24
31
  /**
@@ -1 +1,2 @@
1
- import{jsx as e}from"react/jsx-runtime";import*as n from"react";import{accentSlots as t}from"../../internal/accent";const r={filled:"bg-(--_mp-accent) text-(--_mp-on-accent)",tonal:"bg-(--_mp-accent-container) text-(--_mp-on-accent-container)",outlined:"border border-(--_mp-accent) bg-transparent text-(--_mp-accent)",text:"bg-transparent text-(--_mp-accent)"},o={regular:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},i=/[\p{L}\p{N}_]/u;function l(e){return e.replace(/[-.*+?^${}()|[\]\\]/g,"\\$&")}function a(e,n,t){const r=n>0?e[n-1]:"",o=t<e.length?e[t]:"";return!i.test(r)&&!i.test(o)}function c(e,n,t,r){n.lastIndex=0;const o=[];let i,l=0;for(;null!==(i=n.exec(e));){if(""===i[0]){n.lastIndex+=1;continue}const c=i.index,s=c+i[0].length;t&&!a(e,c,s)||(c>l&&o.push(e.slice(l,c)),o.push(r(i[0],String(c))),l=s)}return 0===o.length?e:(l<e.length&&o.push(e.slice(l)),o)}function s(e,t,r,o){if("string"==typeof e)return c(e,t,r,o);if("number"==typeof e)return c(String(e),t,r,o);if(Array.isArray(e))return n.Children.map(e,e=>s(e,t,r,o));if(n.isValidElement(e)){const i=e.props.children;return void 0===i||"function"==typeof i?e:n.cloneElement(e,void 0,s(i,t,r,o))}return e}export const MPHighlight=/*@__PURE__*/n.forwardRef(function({query:i,variant:a="tonal",color:c="tertiary",caseSensitive:u=!1,wholeWord:f=!1,underline:m=!1,weight:p,className:g,style:d,children:h,...x},b){const y=i instanceof RegExp?`re ${i.source} ${i.flags}`:Array.isArray(i)?`a ${i.join("\0")}`:`s ${i}`,_=n.useMemo(()=>function(e,n){if(e instanceof RegExp)return new RegExp(e.source,e.global?e.flags:`${e.flags}g`);const t=(Array.isArray(e)?e:[e]).map(e=>e.trim()).filter(Boolean).sort((e,n)=>n.length-e.length);return 0===t.length?null:new RegExp(t.map(l).join("|"),n?"gu":"giu")}(i,u),[y,u]),$=["rounded-mp-xs -mx-0.5 px-0.5","box-decoration-clone",r[a],m?"underline decoration-2 underline-offset-2":"",p?o[p]:""].filter(Boolean).join(" "),j=n.useMemo(()=>_?s(h,_,f,(n,t)=>e("mark",{className:$,children:n},t)):h,[h,_,f,$]);return e("span",{ref:b,className:["mp-highlight",g??""].filter(Boolean).join(" "),style:{...t(c),...d},...x,children:j})});
1
+ "use client";
2
+ import{jsx as e}from"react/jsx-runtime";import*as n from"react";import{accentSlots as t}from"../../internal/accent.js";const r={filled:"bg-(--_mp-accent) text-(--_mp-on-accent)",tonal:"bg-(--_mp-accent-container) text-(--_mp-on-accent-container)",outlined:"border border-(--_mp-accent) bg-transparent text-(--_mp-accent)",text:"bg-transparent text-(--_mp-accent)"},o={regular:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},i=/[\p{L}\p{N}_]/u;function l(e){return e.replace(/[-.*+?^${}()|[\]\\]/g,"\\$&")}function a(e,n,t){const r=n>0?e[n-1]:"",o=t<e.length?e[t]:"";return!i.test(r)&&!i.test(o)}function c(e,n,t,r){n.lastIndex=0;const o=[];let i,l=0;for(;null!==(i=n.exec(e));){if(""===i[0]){n.lastIndex+=1;continue}const c=i.index,s=c+i[0].length;t&&!a(e,c,s)||(c>l&&o.push(e.slice(l,c)),o.push(r(i[0],String(c))),l=s)}return 0===o.length?e:(l<e.length&&o.push(e.slice(l)),o)}function s(e,t,r,o){if("string"==typeof e)return c(e,t,r,o);if("number"==typeof e)return c(String(e),t,r,o);if(Array.isArray(e))return n.Children.map(e,e=>s(e,t,r,o));if(n.isValidElement(e)){const i=e.props.children;return void 0===i||"function"==typeof i?e:n.cloneElement(e,void 0,s(i,t,r,o))}return e}export const MPHighlight=/*@__PURE__*/n.forwardRef(function({query:i,variant:a="tonal",color:c="tertiary",caseSensitive:u=!1,wholeWord:f=!1,underline:m=!1,weight:p,className:g,style:d,children:h,...x},b){const y=i instanceof RegExp?`re ${i.source} ${i.flags}`:Array.isArray(i)?`a ${i.join("\0")}`:`s ${i}`,_=n.useMemo(()=>function(e,n){if(e instanceof RegExp)return new RegExp(e.source,e.global?e.flags:`${e.flags}g`);const t=(Array.isArray(e)?e:[e]).map(e=>e.trim()).filter(Boolean).sort((e,n)=>n.length-e.length);return 0===t.length?null:new RegExp(t.map(l).join("|"),n?"gu":"giu")}(i,u),[y,u]),j=["rounded-mp-xs -mx-0.5 px-0.5","box-decoration-clone",r[a],m?"underline decoration-2 underline-offset-2":"",p?o[p]:""].filter(Boolean).join(" "),$=n.useMemo(()=>_?s(h,_,f,(n,t)=>e("mark",{className:j,children:n},t)):h,[h,_,f,j]);return e("span",{ref:b,className:["mp-highlight",g??""].filter(Boolean).join(" "),style:{...t(c),...d},...x,children:$})});
@@ -1,2 +1,2 @@
1
- export { MPHighlight } from './MPHighlight';
2
- export type { MPHighlightProps, MPHighlightVariant } from './MPHighlight';
1
+ export { MPHighlight } from './MPHighlight.js';
2
+ export type { MPHighlightProps, MPHighlightVariant } from './MPHighlight.js';
@@ -1 +1 @@
1
- export{MPHighlight}from"./MPHighlight";
1
+ export{MPHighlight}from"./MPHighlight.js";
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { MPIconGlyph } from '../../types';
2
+ import type { MPIconGlyph } from '../../types.js';
3
3
  export interface MPIconProps extends Omit<React.ComponentPropsWithoutRef<'span'>, 'color'> {
4
4
  /**
5
5
  * The glyph to draw: a component from an icon set, or an element of your own.
@@ -1 +1,2 @@
1
+ "use client";
1
2
  import{jsx as e}from"react/jsx-runtime";import*as i from"react";function o(e){return!i.isValidElement(e)}export const MPIcon=/*@__PURE__*/i.forwardRef(function({icon:r,size:t,color:l,strokeWidth:n,center:s=!1,label:c,className:a,style:d,...f},m){const u=["mp-icon inline-flex shrink-0 items-center justify-center align-middle",void 0===t?"":"[&>svg]:block [&>svg]:size-full [&>img]:block [&>img]:size-full",s?"justify-self-center":"",a??""].filter(Boolean).join(" ");return e("span",{ref:m,className:u,style:{...void 0===t?{}:{width:t,height:t,fontSize:t},...void 0===l?{}:{color:l},...d},role:c?"img":void 0,"aria-label":c,"aria-hidden":!c||void 0,...f,children:o(r)?i.createElement(r,{size:t,color:void 0===l?"currentColor":l,strokeWidth:n}):r})});
@@ -1,2 +1,2 @@
1
- export { MPIcon } from './MPIcon';
2
- export type { MPIconProps } from './MPIcon';
1
+ export { MPIcon } from './MPIcon.js';
2
+ export type { MPIconProps } from './MPIcon.js';
@@ -1 +1 @@
1
- export{MPIcon}from"./MPIcon";
1
+ export{MPIcon}from"./MPIcon.js";
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { type MPButtonProps } from '../button/MPButton';
2
+ import { type MPButtonProps } from '../button/MPButton.js';
3
3
  export interface MPIconButtonProps extends Omit<MPButtonProps, 'children' | 'startIcon' | 'endIcon' | 'fullWidth'> {
4
4
  /**
5
5
  * The glyph.
@@ -1 +1,2 @@
1
- import{jsx as t}from"react/jsx-runtime";import*as r from"react";import{MPButton as o}from"../button/MPButton";export const MPIconButton=/*@__PURE__*/r.forwardRef(function({icon:r,label:a,variant:n="text",...e},i){return t(o,{ref:i,"aria-label":a,variant:n,startIcon:r,...e})});
1
+ "use client";
2
+ import{jsx as t}from"react/jsx-runtime";import*as r from"react";import{MPButton as o}from"../button/MPButton.js";export const MPIconButton=/*@__PURE__*/r.forwardRef(function({icon:r,label:a,variant:n="text",...e},i){return t(o,{ref:i,"aria-label":a,variant:n,startIcon:r,...e})});
@@ -1,2 +1,2 @@
1
- export { MPIconButton } from './MPIconButton';
2
- export type { MPIconButtonProps } from './MPIconButton';
1
+ export { MPIconButton } from './MPIconButton.js';
2
+ export type { MPIconButtonProps } from './MPIconButton.js';
@@ -1 +1 @@
1
- export{MPIconButton}from"./MPIconButton";
1
+ export{MPIconButton}from"./MPIconButton.js";
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { MPColor, MPSize, MPVariant } from '../../types';
3
+ import type { MPColor, MPSize, MPVariant } from '../../types.js';
4
4
  export interface MPListProps extends Omit<React.ComponentPropsWithoutRef<'ul'>, 'color'> {
5
5
  /**
6
6
  * How much surface the sheet paints behind the rows.
@@ -1 +1,2 @@
1
- import{jsx as e,jsxs as r,Fragment as n}from"react/jsx-runtime";import*as t from"react";import{useRender as i}from"@base-ui/react/use-render";import{accentSlots as o}from"../../internal/accent";import{CONTROL_GAP as l,hasContent as s,PROSE_TEXT as a,SHEET_PAD_X as d}from"../../internal/scale";import{MPStateLayer as c}from"../../internal/StateLayer";import{CONTAINER_SURFACE as m}from"../../internal/surface";const p=/*@__PURE__*/t.createContext({size:"md",color:"primary",dividers:!1}),u={xs:"py-1.5",sm:"py-2.5",md:"py-4",lg:"py-5",xl:"py-6"},f={xs:"text-mp-body-small",sm:"text-mp-body-small",md:"text-mp-body-medium",lg:"text-mp-body-medium",xl:"text-mp-body-medium"},x={xs:"rounded-mp-xs",sm:"rounded-mp-xs",md:"rounded-mp-sm",lg:"rounded-mp-sm",xl:"rounded-mp-md"};export const MPList=/*@__PURE__*/t.forwardRef(function({variant:r="outlined",size:n="md",color:l="primary",dividers:s=!1,render:a,className:d,style:c,children:u,...f},x){const h=t.useMemo(()=>({size:n,color:l,dividers:s}),[n,l,s]),v=["mp-list rounded-mp-md flex flex-col",m[r],"text-mp-on-surface",s?"overflow-hidden [&>li+li]:border-mp-outline-variant [&>li+li]:border-t":"p-1",d??""].filter(Boolean).join(" "),b=i({render:a??e("ul",{}),ref:x,props:{role:"list","data-mp-size":n,"data-mp-variant":r,className:v,style:{...o(l),...c},children:u,...f}});return e(p.Provider,{value:h,children:b})});export const MPListItem=/*@__PURE__*/t.forwardRef(function({startIcon:i,endIcon:o,description:m,action:h,href:v,selected:b=!1,disabled:y=!1,className:N,children:g,onClick:j,...k},w){const{size:z,dividers:B}=t.useContext(p),C=Boolean(j||v)&&!y,I=d[z],L=["group relative flex min-w-0 flex-1 items-center overflow-hidden text-start","font-[inherit] no-underline",I,u[z],l[z],a[z],"transition-[background-color,color] duration-(--mp-sys-motion-duration-short4)",B?"":x[z],y?"text-mp-on-surface/38 cursor-default":b?"bg-(--_mp-accent-container) text-(--_mp-on-accent-container)":"",C?["cursor-pointer appearance-none border-0",b?"":"bg-transparent","outline-mp-secondary focus-visible:outline-2 focus-visible:-outline-offset-2","focus-visible:outline-solid outline-none"].filter(Boolean).join(" "):""].filter(Boolean).join(" "),M=r(n,{children:[C?e(c,{}):null,s(i)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:i}):null,r("span",{className:"flex min-w-0 flex-1 flex-col",children:[s(g)?e("span",{className:"truncate",children:g}):null,s(m)?e("span",{className:["truncate",f[z],b?"opacity-80":"text-mp-on-surface-variant"].join(" "),children:m}):null]}),s(o)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:o}):null]});return r("li",{ref:w,"data-selected":b||void 0,className:["flex w-full items-center",N??""].filter(Boolean).join(" "),...k,children:[C&&v?e("a",{href:v,className:L,"aria-current":b?"page":void 0,onClick:j,children:M}):C?e("button",{type:"button",className:L,"aria-current":!!b||void 0,onClick:j,children:M}):e("div",{className:L,"aria-disabled":y||void 0,children:M}),s(h)?e("div",{className:`flex shrink-0 items-center ${I}`,children:h}):null]})});
1
+ "use client";
2
+ import{jsx as e,jsxs as r,Fragment as n}from"react/jsx-runtime";import*as t from"react";import{useRender as i}from"@base-ui/react/use-render";import{accentSlots as o}from"../../internal/accent.js";import{CONTROL_GAP as l,hasContent as s,PROSE_TEXT as a,SHEET_PAD_X as d}from"../../internal/scale.js";import{MPStateLayer as c}from"../../internal/StateLayer.js";import{CONTAINER_SURFACE as m}from"../../internal/surface.js";const p=/*@__PURE__*/t.createContext({size:"md",color:"primary",dividers:!1}),u={xs:"py-1.5",sm:"py-2.5",md:"py-4",lg:"py-5",xl:"py-6"},f={xs:"text-mp-body-small",sm:"text-mp-body-small",md:"text-mp-body-medium",lg:"text-mp-body-medium",xl:"text-mp-body-medium"},x={xs:"rounded-mp-xs",sm:"rounded-mp-xs",md:"rounded-mp-sm",lg:"rounded-mp-sm",xl:"rounded-mp-md"};export const MPList=/*@__PURE__*/t.forwardRef(function({variant:r="outlined",size:n="md",color:l="primary",dividers:s=!1,render:a,className:d,style:c,children:u,...f},x){const h=t.useMemo(()=>({size:n,color:l,dividers:s}),[n,l,s]),v=["mp-list rounded-mp-md flex flex-col",m[r],"text-mp-on-surface",s?"overflow-hidden [&>li+li]:border-mp-outline-variant [&>li+li]:border-t":"p-1",d??""].filter(Boolean).join(" "),b=i({render:a??e("ul",{}),ref:x,props:{role:"list","data-mp-size":n,"data-mp-variant":r,className:v,style:{...o(l),...c},children:u,...f}});return e(p.Provider,{value:h,children:b})});export const MPListItem=/*@__PURE__*/t.forwardRef(function({startIcon:i,endIcon:o,description:m,action:h,href:v,selected:b=!1,disabled:y=!1,className:N,children:j,onClick:g,...k},w){const{size:z,dividers:B}=t.useContext(p),C=Boolean(g||v)&&!y,I=d[z],L=["group relative flex min-w-0 flex-1 items-center overflow-hidden text-start","font-[inherit] no-underline",I,u[z],l[z],a[z],"transition-[background-color,color] duration-(--mp-sys-motion-duration-short4)",B?"":x[z],y?"text-mp-on-surface/38 cursor-default":b?"bg-(--_mp-accent-container) text-(--_mp-on-accent-container)":"",C?["cursor-pointer appearance-none border-0",b?"":"bg-transparent","outline-mp-secondary focus-visible:outline-2 focus-visible:-outline-offset-2","focus-visible:outline-solid outline-none"].filter(Boolean).join(" "):""].filter(Boolean).join(" "),M=r(n,{children:[C?e(c,{}):null,s(i)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:i}):null,r("span",{className:"flex min-w-0 flex-1 flex-col",children:[s(j)?e("span",{className:"truncate",children:j}):null,s(m)?e("span",{className:["truncate",f[z],b?"opacity-80":"text-mp-on-surface-variant"].join(" "),children:m}):null]}),s(o)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:o}):null]});return r("li",{ref:w,"data-selected":b||void 0,className:["flex w-full items-center",N??""].filter(Boolean).join(" "),...k,children:[C&&v?e("a",{href:v,className:L,"aria-current":b?"page":void 0,onClick:g,children:M}):C?e("button",{type:"button",className:L,"aria-current":!!b||void 0,onClick:g,children:M}):e("div",{className:L,"aria-disabled":y||void 0,children:M}),s(h)?e("div",{className:`flex shrink-0 items-center ${I}`,children:h}):null]})});
@@ -1,2 +1,2 @@
1
- export { MPList, MPListItem } from './MPList';
2
- export type { MPListItemProps, MPListProps } from './MPList';
1
+ export { MPList, MPListItem } from './MPList.js';
2
+ export type { MPListItemProps, MPListProps } from './MPList.js';
@@ -1 +1 @@
1
- export{MPList,MPListItem}from"./MPList";
1
+ export{MPList,MPListItem}from"./MPList.js";
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { useMPLocale } from '../../internal/locale';
2
+ import { useMPLocale } from '../../internal/locale.js';
3
3
  export interface MPLocaleProviderProps {
4
4
  /**
5
5
  * A BCP 47 tag — `ko`, `ja`, `pt-BR`, `zh-Hant`.
@@ -1 +1,2 @@
1
- import{jsx as r}from"react/jsx-runtime";import{MPLocaleContext as e,useMPLocale as o}from"../../internal/locale";export function MPLocaleProvider({locale:o,children:i}){return r(e.Provider,{value:o,children:i})}export{o as useMPLocale};
1
+ "use client";
2
+ import{jsx as r}from"react/jsx-runtime";import{MPLocaleContext as e,useMPLocale as o}from"../../internal/locale.js";export function MPLocaleProvider({locale:o,children:i}){return r(e.Provider,{value:o,children:i})}export{o as useMPLocale};
@@ -1,2 +1,2 @@
1
- export { MPLocaleProvider, useMPLocale } from './MPLocaleProvider';
2
- export type { MPLocaleProviderProps } from './MPLocaleProvider';
1
+ export { MPLocaleProvider, useMPLocale } from './MPLocaleProvider.js';
2
+ export type { MPLocaleProviderProps } from './MPLocaleProvider.js';
@@ -1 +1 @@
1
- export{MPLocaleProvider,useMPLocale}from"./MPLocaleProvider";
1
+ export{MPLocaleProvider,useMPLocale}from"./MPLocaleProvider.js";
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { MPAlign, MPColor, MPSide, MPSize } from '../../types';
2
+ import type { MPAlign, MPColor, MPSide, MPSize } from '../../types.js';
3
3
  /**
4
4
  * A menu takes `size` and `color` and stops there.
5
5
  *
@@ -1 +1,2 @@
1
- import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as t from"react";import{Menu as a}from"@base-ui/react/menu";import{ContextMenu as l}from"@base-ui/react/context-menu";import{MPIcon as r}from"../icon/MPIcon";import{CheckIcon as o,ChevronRightIcon as s}from"../../constants/icons";import{MPMenuContext as i}from"../../internal/menu";import{accentSlots as c}from"../../internal/accent";import{MPStateLayer as d}from"../../internal/StateLayer";import{CONTROL_ICON as m,META_TEXT as u,hasContent as p}from"../../internal/scale";import{FADE as h,PORTAL_LAYER as f}from"../../internal/surface";const x=["mp-menu__popup rounded-mp-xs shadow-mp-2 bg-mp-surface-container text-mp-on-surface","max-h-[min(24rem,var(--available-height))] min-w-[112px] max-w-[280px]","overflow-y-auto overscroll-contain py-2 outline-none",h].join(" "),b={xs:"min-h-8",sm:"min-h-10",md:"min-h-12",lg:"min-h-14",xl:"min-h-16"},g={xs:"px-2",sm:"px-2.5",md:"px-3",lg:"px-4",xl:"px-5"},N={xs:"gap-2",sm:"gap-2.5",md:"gap-3",lg:"gap-3",xl:"gap-4"},v={xs:"text-mp-label-medium",sm:"text-mp-label-large",md:"text-mp-label-large",lg:"text-mp-title-medium",xl:"text-mp-title-medium"};function C(e,n,t){return["group relative flex w-full cursor-pointer items-center select-none",n?"text-(--_mp-accent)":"text-mp-on-surface",b[e],g[e],N[e],v[e],"data-disabled:text-mp-on-surface/38 data-disabled:cursor-default","outline-none",t??""].filter(Boolean).join(" ")}function y(){return e(d,{layer:"inset-0 bg-current",className:"group-data-highlighted:opacity-8 group-data-popup-open:opacity-8 group-data-disabled:opacity-0"})}const k="relative flex shrink-0 items-center justify-center";function M({children:t,description:a}){return p(a)?n("span",{className:"relative flex min-w-0 flex-1 flex-col py-1.5 text-start",children:[e("span",{className:"truncate",children:t}),e("span",{className:`text-mp-on-surface-variant truncate ${u}`,children:a})]}):e("span",{className:"relative min-w-0 flex-1 truncate text-start",children:t})}function O({shortcut:n}){return p(n)?e("span",{className:`text-mp-on-surface-variant relative ms-2 shrink-0 ${u}`,children:n}):null}export function MPMenuItem({onClick:l,href:r,target:o,rel:s,startIcon:c,endIcon:d,shortcut:m,description:u,color:h,closeOnClick:f=!0,disabled:x=!1,label:b,children:g,className:N,style:v}){const{size:P}=t.useContext(i),I=n(t.Fragment,{children:[e(y,{}),p(c)?e("span",{className:`${k} text-mp-on-surface-variant`,children:c}):null,e(M,{description:u,children:g}),p(d)?e("span",{className:`${k} text-mp-on-surface-variant`,children:d}):null,e(O,{shortcut:m})]}),$=h?{"--_mp-accent":`var(--_mp-color-${h})`}:void 0,z=$||v?{...$,...v}:void 0;return void 0===r||x?e(a.Item,{disabled:x,label:b,closeOnClick:f,onClick:l,className:C(P,Boolean(h),N),style:z,children:I}):e(a.LinkItem,{href:r,target:o,rel:s??("_blank"===o?"noopener noreferrer":void 0),label:b,closeOnClick:f,onClick:l,className:C(P,Boolean(h),N),style:z,children:I})}export function MPMenuCheckboxItem({checked:l,defaultChecked:s,onCheckedChange:c,endIcon:d,shortcut:u,description:h,color:f,closeOnClick:x=!1,disabled:b=!1,label:g,children:N,className:v,style:P}){const{size:I}=t.useContext(i),$=f?{"--_mp-accent":`var(--_mp-color-${f})`}:void 0;return n(a.CheckboxItem,{checked:l,defaultChecked:s,onCheckedChange:e=>c?.(e),disabled:b,label:g,closeOnClick:x,className:C(I,Boolean(f),v),style:$||P?{...$,...P}:void 0,children:[e(y,{}),e("span",{className:`${k} text-(--_mp-accent)`,style:{width:m[I]},children:e(a.CheckboxItemIndicator,{className:"flex items-center justify-center",children:e(r,{icon:o,size:m[I]})})}),e(M,{description:h,children:N}),p(d)?e("span",{className:`${k} text-mp-on-surface-variant`,children:d}):null,e(O,{shortcut:u})]})}export function MPMenuRadioGroup({value:n,defaultValue:t,onValueChange:l,disabled:r=!1,children:o,className:s}){return e(a.RadioGroup,{value:n,defaultValue:t,onValueChange:e=>l?.(e),disabled:r,className:s,children:o})}export function MPMenuRadioItem({value:l,endIcon:r,shortcut:o,description:s,color:c,closeOnClick:d=!1,disabled:u=!1,label:h,children:f,className:x,style:b}){const{size:g}=t.useContext(i),N=c?{"--_mp-accent":`var(--_mp-color-${c})`}:void 0;return n(a.RadioItem,{value:l,disabled:u,label:h,closeOnClick:d,className:C(g,Boolean(c),x),style:N||b?{...N,...b}:void 0,children:[e(y,{}),e("span",{className:`${k} text-(--_mp-accent)`,style:{width:m[g]},children:e(a.RadioItemIndicator,{className:"flex items-center justify-center",children:e("span",{className:"block size-2.5 rounded-full bg-current"})})}),e(M,{description:s,children:f}),p(r)?e("span",{className:`${k} text-mp-on-surface-variant`,children:r}):null,e(O,{shortcut:o})]})}export function MPMenuGroup({label:l,children:r,className:o}){const{size:s}=t.useContext(i);return n(a.Group,{className:o,children:[p(l)?e(a.GroupLabel,{className:`text-mp-on-surface-variant pt-2 pb-1 ${g[s]} ${u}`,children:l}):null,r]})}export function MPMenuSeparator({className:n,...t}){return e(a.Separator,{className:["bg-mp-outline-variant my-2 h-px",n??""].filter(Boolean).join(" "),...t})}export function MPMenuSubmenu({label:l,startIcon:o,disabled:d=!1,side:u="right",sideOffset:h=0,children:b,className:g,style:N}){const{size:v,color:M}=t.useContext(i);return n(a.SubmenuRoot,{children:[n(a.SubmenuTrigger,{disabled:d,className:C(v,!1),children:[e(y,{}),p(o)?e("span",{className:`${k} text-mp-on-surface-variant`,children:o}):null,e("span",{className:"relative min-w-0 flex-1 truncate text-start",children:l}),e("span",{className:`${k} text-mp-on-surface-variant rtl:rotate-180`,children:e(r,{icon:s,size:m[v]})})]}),e(a.Portal,{children:e(a.Positioner,{className:f,side:u,sideOffset:h,align:"start",children:e(a.Popup,{className:[x,g??""].filter(Boolean).join(" "),style:{...c(M),...N},children:b})})})]})}export function MPMenu({size:l="md",color:r="primary",trigger:o,open:s,defaultOpen:d,onOpenChange:m,side:u="bottom",align:p="start",sideOffset:h=4,modal:b=!0,openOnHover:g=!1,loopFocus:N=!0,disabled:v=!1,className:C,style:y,children:k}){const M=t.useMemo(()=>({size:l,color:r}),[l,r]);return e(i.Provider,{value:M,children:n(a.Root,{open:s,defaultOpen:d,onOpenChange:e=>m?.(e),modal:b,loopFocus:N,disabled:v,children:[o?e(a.Trigger,{render:o,openOnHover:g,disabled:v}):null,e(a.Portal,{children:e(a.Positioner,{className:f,side:u,align:p,sideOffset:h,children:e(a.Popup,{"data-mp-size":l,className:[x,C??""].filter(Boolean).join(" "),style:{...c(r),...y},children:k})})})]})})}export function MPContextMenu({size:a="md",color:r="primary",content:o,children:s,open:d,defaultOpen:m,onOpenChange:u,loopFocus:p=!0,disabled:h=!1,className:b,style:g}){const N=t.useMemo(()=>({size:a,color:r}),[a,r]);return e(i.Provider,{value:N,children:n(l.Root,{open:d,defaultOpen:m,onOpenChange:e=>u?.(e),loopFocus:p,disabled:h,children:[e(l.Trigger,{children:s}),e(l.Portal,{children:e(l.Positioner,{className:f,children:e(l.Popup,{"data-mp-size":a,className:[x,b??""].filter(Boolean).join(" "),style:{...c(r),...g},children:o})})})]})})}
1
+ "use client";
2
+ import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as t from"react";import{Menu as a}from"@base-ui/react/menu";import{ContextMenu as l}from"@base-ui/react/context-menu";import{MPIcon as r}from"../icon/MPIcon.js";import{CheckIcon as s,ChevronRightIcon as o}from"../../constants/icons.js";import{linkRel as i}from"../../internal/link.js";import{MPMenuContext as c}from"../../internal/menu.js";import{accentSlots as d}from"../../internal/accent.js";import{MPStateLayer as m}from"../../internal/StateLayer.js";import{CONTROL_ICON as u,META_TEXT as p,hasContent as h}from"../../internal/scale.js";import{FADE as f,PORTAL_LAYER as x}from"../../internal/surface.js";const b=/*@__PURE__*/["mp-menu__popup rounded-mp-xs shadow-mp-2 bg-mp-surface-container text-mp-on-surface","max-h-[min(24rem,var(--available-height))] min-w-[112px] max-w-[280px]","overflow-y-auto overscroll-contain py-2 outline-none",f].join(" "),g={xs:"min-h-8",sm:"min-h-10",md:"min-h-12",lg:"min-h-14",xl:"min-h-16"},N={xs:"px-2",sm:"px-2.5",md:"px-3",lg:"px-4",xl:"px-5"},v={xs:"gap-2",sm:"gap-2.5",md:"gap-3",lg:"gap-3",xl:"gap-4"},C={xs:"text-mp-label-medium",sm:"text-mp-label-large",md:"text-mp-label-large",lg:"text-mp-title-medium",xl:"text-mp-title-medium"};function y(e,n,t){return["group relative flex w-full cursor-pointer items-center select-none",n?"text-(--_mp-accent)":"text-mp-on-surface",g[e],N[e],v[e],C[e],"data-disabled:text-mp-on-surface/38 data-disabled:cursor-default","outline-none",t??""].filter(Boolean).join(" ")}function k(){return e(m,{layer:"inset-0 bg-current",className:"group-data-highlighted:opacity-8 group-data-popup-open:opacity-8 group-data-disabled:opacity-0"})}const M="relative flex shrink-0 items-center justify-center";function O({children:t,description:a}){return h(a)?n("span",{className:"relative flex min-w-0 flex-1 flex-col py-1.5 text-start",children:[e("span",{className:"truncate",children:t}),e("span",{className:`text-mp-on-surface-variant truncate ${p}`,children:a})]}):e("span",{className:"relative min-w-0 flex-1 truncate text-start",children:t})}function P({shortcut:n}){return h(n)?e("span",{className:`text-mp-on-surface-variant relative ms-2 shrink-0 ${p}`,children:n}):null}export function MPMenuItem({onClick:l,href:r,target:s,rel:o,startIcon:d,endIcon:m,shortcut:u,description:p,color:f,closeOnClick:x=!0,disabled:b=!1,label:g,children:N,className:v,style:C}){const{size:j}=t.useContext(c),I=n(t.Fragment,{children:[e(k,{}),h(d)?e("span",{className:`${M} text-mp-on-surface-variant`,children:d}):null,e(O,{description:p,children:N}),h(m)?e("span",{className:`${M} text-mp-on-surface-variant`,children:m}):null,e(P,{shortcut:u})]}),$=f?{"--_mp-accent":`var(--_mp-color-${f})`}:void 0,z=$||C?{...$,...C}:void 0;return void 0===r||b?e(a.Item,{disabled:b,label:g,closeOnClick:x,onClick:l,className:y(j,Boolean(f),v),style:z,children:I}):e(a.LinkItem,{href:r,target:s,rel:i(s,o),label:g,closeOnClick:x,onClick:l,className:y(j,Boolean(f),v),style:z,children:I})}export function MPMenuCheckboxItem({checked:l,defaultChecked:o,onCheckedChange:i,endIcon:d,shortcut:m,description:p,color:f,closeOnClick:x=!1,disabled:b=!1,label:g,children:N,className:v,style:C}){const{size:j}=t.useContext(c),I=f?{"--_mp-accent":`var(--_mp-color-${f})`}:void 0;return n(a.CheckboxItem,{checked:l,defaultChecked:o,onCheckedChange:e=>i?.(e),disabled:b,label:g,closeOnClick:x,className:y(j,Boolean(f),v),style:I||C?{...I,...C}:void 0,children:[e(k,{}),e("span",{className:`${M} text-(--_mp-accent)`,style:{width:u[j]},children:e(a.CheckboxItemIndicator,{className:"flex items-center justify-center",children:e(r,{icon:s,size:u[j]})})}),e(O,{description:p,children:N}),h(d)?e("span",{className:`${M} text-mp-on-surface-variant`,children:d}):null,e(P,{shortcut:m})]})}export function MPMenuRadioGroup({value:n,defaultValue:t,onValueChange:l,disabled:r=!1,children:s,className:o}){return e(a.RadioGroup,{value:n,defaultValue:t,onValueChange:e=>l?.(e),disabled:r,className:o,children:s})}export function MPMenuRadioItem({value:l,endIcon:r,shortcut:s,description:o,color:i,closeOnClick:d=!1,disabled:m=!1,label:p,children:f,className:x,style:b}){const{size:g}=t.useContext(c),N=i?{"--_mp-accent":`var(--_mp-color-${i})`}:void 0;return n(a.RadioItem,{value:l,disabled:m,label:p,closeOnClick:d,className:y(g,Boolean(i),x),style:N||b?{...N,...b}:void 0,children:[e(k,{}),e("span",{className:`${M} text-(--_mp-accent)`,style:{width:u[g]},children:e(a.RadioItemIndicator,{className:"flex items-center justify-center",children:e("span",{className:"block size-2.5 rounded-full bg-current"})})}),e(O,{description:o,children:f}),h(r)?e("span",{className:`${M} text-mp-on-surface-variant`,children:r}):null,e(P,{shortcut:s})]})}export function MPMenuGroup({label:l,children:r,className:s}){const{size:o}=t.useContext(c);return n(a.Group,{className:s,children:[h(l)?e(a.GroupLabel,{className:`text-mp-on-surface-variant pt-2 pb-1 ${N[o]} ${p}`,children:l}):null,r]})}export function MPMenuSeparator({className:n,...t}){return e(a.Separator,{className:["bg-mp-outline-variant my-2 h-px",n??""].filter(Boolean).join(" "),...t})}export function MPMenuSubmenu({label:l,startIcon:s,disabled:i=!1,side:m="right",sideOffset:p=0,children:f,className:g,style:N}){const{size:v,color:C}=t.useContext(c);return n(a.SubmenuRoot,{children:[n(a.SubmenuTrigger,{disabled:i,className:y(v,!1),children:[e(k,{}),h(s)?e("span",{className:`${M} text-mp-on-surface-variant`,children:s}):null,e("span",{className:"relative min-w-0 flex-1 truncate text-start",children:l}),e("span",{className:`${M} text-mp-on-surface-variant rtl:rotate-180`,children:e(r,{icon:o,size:u[v]})})]}),e(a.Portal,{children:e(a.Positioner,{className:x,side:m,sideOffset:p,align:"start",children:e(a.Popup,{className:[b,g??""].filter(Boolean).join(" "),style:{...d(C),...N},children:f})})})]})}export function MPMenu({size:l="md",color:r="primary",trigger:s,open:o,defaultOpen:i,onOpenChange:m,side:u="bottom",align:p="start",sideOffset:h=4,modal:f,openOnHover:g=!1,loopFocus:N=!0,disabled:v=!1,className:C,style:y,children:k}){const M=t.useMemo(()=>({size:l,color:r}),[l,r]);return e(c.Provider,{value:M,children:n(a.Root,{open:o,defaultOpen:i,onOpenChange:e=>m?.(e),modal:f,loopFocus:N,disabled:v,children:[s?e(a.Trigger,{render:s,openOnHover:g,disabled:v}):null,e(a.Portal,{children:e(a.Positioner,{className:x,side:u,align:p,sideOffset:h,children:e(a.Popup,{"data-mp-size":l,className:[b,C??""].filter(Boolean).join(" "),style:{...d(r),...y},children:k})})})]})})}export function MPContextMenu({size:a="md",color:r="primary",content:s,children:o,open:i,defaultOpen:m,onOpenChange:u,loopFocus:p=!0,disabled:h=!1,className:f,style:g}){const N=t.useMemo(()=>({size:a,color:r}),[a,r]);return e(c.Provider,{value:N,children:n(l.Root,{open:i,defaultOpen:m,onOpenChange:e=>u?.(e),loopFocus:p,disabled:h,children:[e(l.Trigger,{children:o}),e(l.Portal,{children:e(l.Positioner,{className:x,children:e(l.Popup,{"data-mp-size":a,className:[b,f??""].filter(Boolean).join(" "),style:{...d(r),...g},children:s})})})]})})}
@@ -1,2 +1,2 @@
1
- export { MPContextMenu, MPMenu, MPMenuCheckboxItem, MPMenuGroup, MPMenuItem, MPMenuRadioGroup, MPMenuRadioItem, MPMenuSeparator, MPMenuSubmenu } from './MPMenu';
2
- export type { MPContextMenuProps, MPMenuCheckboxItemProps, MPMenuGroupProps, MPMenuItemProps, MPMenuProps, MPMenuRadioGroupProps, MPMenuRadioItemProps, MPMenuSeparatorProps, MPMenuSubmenuProps } from './MPMenu';
1
+ export { MPContextMenu, MPMenu, MPMenuCheckboxItem, MPMenuGroup, MPMenuItem, MPMenuRadioGroup, MPMenuRadioItem, MPMenuSeparator, MPMenuSubmenu } from './MPMenu.js';
2
+ export type { MPContextMenuProps, MPMenuCheckboxItemProps, MPMenuGroupProps, MPMenuItemProps, MPMenuProps, MPMenuRadioGroupProps, MPMenuRadioItemProps, MPMenuSeparatorProps, MPMenuSubmenuProps } from './MPMenu.js';
@@ -1 +1 @@
1
- export{MPContextMenu,MPMenu,MPMenuCheckboxItem,MPMenuGroup,MPMenuItem,MPMenuRadioGroup,MPMenuRadioItem,MPMenuSeparator,MPMenuSubmenu}from"./MPMenu";
1
+ export{MPContextMenu,MPMenu,MPMenuCheckboxItem,MPMenuGroup,MPMenuItem,MPMenuRadioGroup,MPMenuRadioItem,MPMenuSeparator,MPMenuSubmenu}from"./MPMenu.js";
@@ -0,0 +1,82 @@
1
+ import * as React from 'react';
2
+ import type { MPColor, MPOrientation, MPSize } from '../../types.js';
3
+ export interface MPMenubarProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'color'> {
4
+ /**
5
+ * Which way the bar runs. `vertical` is the shape a side rail of menus takes;
6
+ * the arrow keys follow it either way.
7
+ * @default 'horizontal'
8
+ */
9
+ orientation?: MPOrientation;
10
+ /**
11
+ * Whether an open menu takes the page away.
12
+ * @default true
13
+ */
14
+ modal?: boolean;
15
+ /**
16
+ * Whether the arrow keys wrap around at the ends of the bar.
17
+ * @default true
18
+ */
19
+ loopFocus?: boolean;
20
+ /** Disables every menu on the bar at once. */
21
+ disabled?: boolean;
22
+ /**
23
+ * The row height and type scale, passed to every menu on the bar.
24
+ * @default 'md'
25
+ */
26
+ size?: MPSize;
27
+ /**
28
+ * Which accent family an open menu's word reads, and which a chosen row inside
29
+ * it reads.
30
+ * @default 'primary'
31
+ */
32
+ color?: MPColor;
33
+ /** The `MPMenubarMenu`s. */
34
+ children?: React.ReactNode;
35
+ }
36
+ export interface MPMenubarMenuProps {
37
+ /** The word on the bar. */
38
+ label: React.ReactNode;
39
+ /** A glyph before the label. */
40
+ startIcon?: React.ReactNode;
41
+ /** Unavailable. The word stays on the bar and opens nothing. */
42
+ disabled?: boolean;
43
+ /** The rows, written exactly as they are inside an [MPMenu](./menu). */
44
+ children?: React.ReactNode;
45
+ }
46
+ /**
47
+ * One menu on the bar: the word, and the rows behind it.
48
+ *
49
+ * It has no `size` and no `color` of its own — both belong to the bar, which is
50
+ * the only place they can be set once and hold for every menu on it. The rows
51
+ * inside are the same [MPMenuItem](./menu), `MPMenuSeparator`, `MPMenuGroup` and
52
+ * `MPMenuSubmenu` an [MPMenu](./menu) takes, because it *is* the same menu.
53
+ */
54
+ export declare function MPMenubarMenu({ label, startIcon, disabled, children }: MPMenubarMenuProps): React.JSX.Element;
55
+ /**
56
+ * The strip of words at the top of an application — File, Edit, View — each of
57
+ * which opens a menu.
58
+ *
59
+ * ## What makes it a bar rather than a row of menus
60
+ *
61
+ * What happens once one of them is **open**: moving along the strip walks
62
+ * through the others instead of closing the one you left, and the arrow keys
63
+ * move between the menus as well as inside them. Base UI owns all of that, along
64
+ * with the `menubar` role — which is what tells a screen reader that the strip
65
+ * is one widget with one tab stop rather than six unrelated buttons.
66
+ *
67
+ * ## Why it draws no surface
68
+ *
69
+ * A menu bar sits **on** something: an [MPHeader](../layout/header), a title
70
+ * bar, a toolbar. A sheet under a strip that is already on a sheet is two
71
+ * sheets, and the second one has nothing to say. It is the same refusal
72
+ * [MPContainer](../layout/container#why-it-draws-no-surface) makes, one level
73
+ * down.
74
+ *
75
+ * ## When this is the wrong component
76
+ *
77
+ * When there are more actions than a strip can hold. A menu bar's whole
78
+ * advantage is that every heading is visible before you go looking for one, and
79
+ * a bar of twelve words has already lost it — that is an
80
+ * [MPCommandPalette](./command-palette).
81
+ */
82
+ export declare const MPMenubar: React.ForwardRefExoticComponent<MPMenubarProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as o from"react";import{Menubar as r}from"@base-ui/react/menubar";import{MPMenu as n}from"../menu/MPMenu.js";import{accentSlots as i}from"../../internal/accent.js";import{MPMenuContext as s}from"../../internal/menu.js";import{MPStateLayer as a}from"../../internal/StateLayer.js";import{CONTROL_GAP as l,hasContent as m}from"../../internal/scale.js";const c={xs:"h-6",sm:"h-7",md:"h-8",lg:"h-10",xl:"h-12"},p={xs:"px-1.5",sm:"px-2",md:"px-2.5",lg:"px-3",xl:"px-4"},u={xs:"text-mp-label-medium",sm:"text-mp-label-large",md:"text-mp-label-large",lg:"text-mp-title-medium",xl:"text-mp-title-medium"};export function MPMenubarMenu({label:r,startIcon:i,disabled:d=!1,children:f}){const{size:x,color:b}=o.useContext(s);return e(n,{size:x,color:b,disabled:d,openOnHover:!0,sideOffset:4,trigger:t("button",{type:"button",disabled:d,className:["mp-menubar__menu group text-mp-on-surface relative inline-flex shrink-0","rounded-mp-xs cursor-pointer items-center justify-center bg-transparent","appearance-none font-[inherit] whitespace-nowrap select-none","transition-colors duration-(--mp-sys-motion-duration-short4)","data-popup-open:text-(--_mp-accent)","disabled:text-mp-on-surface/38 disabled:cursor-default","outline-mp-secondary focus-visible:outline-2 focus-visible:-outline-offset-2","focus-visible:outline-solid outline-none",c[x],p[x],u[x],l[x]].join(" "),children:[d?null:e(a,{className:"group-data-popup-open:opacity-8"}),m(i)?e("span",{className:"relative flex",children:i}):null,e("span",{className:"relative",children:r})]}),children:f})}export const MPMenubar=/*@__PURE__*/o.forwardRef(function({orientation:t="horizontal",modal:n=!0,loopFocus:a=!0,disabled:m=!1,size:c="md",color:p="primary",className:u,style:d,children:f,...x},b){const h=o.useMemo(()=>({size:c,color:p}),[c,p]);return e(s.Provider,{value:h,children:e(r,{ref:b,orientation:t,modal:n,loopFocus:a,disabled:m,"data-mp-size":c,"data-mp-orientation":t,className:["mp-menubar flex items-center","vertical"===t?"flex-col items-stretch":"flex-row",l[c],u??""].filter(Boolean).join(" "),style:{...i(p),...d},...x,children:f})})});
@@ -0,0 +1,2 @@
1
+ export { MPMenubar, MPMenubarMenu } from './MPMenubar.js';
2
+ export type { MPMenubarMenuProps, MPMenubarProps } from './MPMenubar.js';
@@ -0,0 +1 @@
1
+ export{MPMenubar,MPMenubarMenu}from"./MPMenubar.js";