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
@@ -23,22 +23,32 @@
23
23
  * gets you a translation, `MPLocaleProvider` gets you one for the whole
24
24
  * application at once, and the prop gets you one for anything else.
25
25
  *
26
- * ## Why English is the only table in this file
26
+ * ## Where the words themselves are
27
27
  *
28
- * The other eighteen live under `src/locales/`, and nothing in the library
29
- * imports them. They used to be here, and being here is what made them cost
30
- * something: a component that says one word — `MPButton` says *Loading* — held a
31
- * static import chain down to a table of every string in every language, and a
32
- * bundler cannot drop data that something imports. Twenty kilobytes, on every
33
- * consumer, for a word.
28
+ * Not here. This file is the shape of the table, the registry a translation
29
+ * arrives through, and the merge — no strings.
34
30
  *
35
- * So the table arrives from the outside instead. `registerMPMessages` below is
36
- * how, `material-plus-ui/locales` is where from, and the only thing that changed
37
- * for a reader is that the application now names the languages it speaks. Once
38
- * it has, `locale="ko"` resolves through exactly the path it always did.
31
+ * The eighteen translations live under `src/locales/`, and nothing in the
32
+ * library imports them. They used to be here, and being here is what made them
33
+ * cost something: a component that says one word — `MPButton` says *Loading* —
34
+ * held a static import chain down to a table of every string in every language,
35
+ * and a bundler cannot drop data that something imports. Twenty kilobytes, on
36
+ * every consumer, for a word. So the table arrives from the outside instead:
37
+ * `registerMPMessages` below is how, `material-plus-ui/locales` is where from,
38
+ * and the only thing that changed for a reader is that the application now names
39
+ * the languages it speaks. Once it has, `locale="ko"` resolves through exactly
40
+ * the path it always did.
41
+ *
42
+ * English left too, for the same reason one step smaller. It is thirteen modules
43
+ * under `internal/messages/`, one per namespace, because a bundler that can drop
44
+ * a module it can also drop an export — and cannot drop a property. Held as one
45
+ * object, English was 1.75 kB that every component carried whole: `MPButton`
46
+ * shipped the calendar's eighteen strings to say *Loading*. `resolveNamespace`
47
+ * is handed the namespace it should merge, so a component pays for the words it
48
+ * speaks and no others.
39
49
  *
40
50
  * The public surface is `registerMPMessages`, `MPLocaleProvider` and the
41
- * per-component `labels` props; `resolveMessages` and `fillMessage` stay
51
+ * per-component `labels` props; `resolveNamespace` and `fillMessage` stay
42
52
  * internal.
43
53
  */
44
54
  /**
@@ -141,6 +151,101 @@ export interface MPMessages {
141
151
  start: string;
142
152
  end: string;
143
153
  };
154
+ /**
155
+ * MPNumberField.
156
+ *
157
+ * The two steppers, which are a plus and a minus and have no words of their
158
+ * own — the same case the pagination's chevrons and the chat's delivery marks
159
+ * are in. They are read out and never drawn.
160
+ */
161
+ numberField: {
162
+ increase: string;
163
+ decrease: string;
164
+ };
165
+ /**
166
+ * MPCarousel.
167
+ *
168
+ * Every string here is read out and never drawn: the strip is pictures, the
169
+ * arrows are chevrons and the marks under it are dots. `{index}` and
170
+ * `{total}` are filled in by `fillMessage`, and they are named rather than
171
+ * positional for the reason the pagination's are — a language that counts the
172
+ * total first is not a language this table can serve with an argument order.
173
+ */
174
+ carousel: {
175
+ /** The name of the `region` the strip is inside. */
176
+ label: string;
177
+ /** The two arrows. */
178
+ previous: string;
179
+ next: string;
180
+ /** One slide, and its own position mark. `Slide 2 of 5`. */
181
+ slide: string;
182
+ };
183
+ /**
184
+ * MPBreadcrumb.
185
+ *
186
+ * Both read out and never drawn: a trail's steps are the caller's words, and
187
+ * these are the two things around them that are not.
188
+ */
189
+ breadcrumb: {
190
+ /** The name of the `<nav>` the trail is inside. */
191
+ label: string;
192
+ /** The `…` that puts the folded middle back. */
193
+ expand: string;
194
+ };
195
+ /**
196
+ * MPCombobox.
197
+ *
198
+ * Both **drawn**, which is what makes them belong here rather than in a prop:
199
+ * a Korean page whose search box says *No matches* has answered in a language
200
+ * the reader did not ask a question in. `{label}` is the text they typed, and
201
+ * is filled in by `fillMessage`.
202
+ */
203
+ combobox: {
204
+ /** The line where the rows would be, when nothing matched. */
205
+ empty: string;
206
+ /** The row that offers what was typed as a value of its own. */
207
+ add: string;
208
+ };
209
+ /**
210
+ * MPTable.
211
+ *
212
+ * One string, drawn across the whole width where the rows would be. A table
213
+ * that says *No data* in the middle of a translated page is the one part of it
214
+ * that was not translated.
215
+ */
216
+ table: {
217
+ empty: string;
218
+ };
219
+ /**
220
+ * MPFilePicker.
221
+ *
222
+ * The line inside the box, and the largest piece of text this table holds. It
223
+ * is drawn, it is an instruction, and it is the whole of what the component
224
+ * tells a reader to do.
225
+ */
226
+ filePicker: {
227
+ prompt: string;
228
+ };
229
+ /**
230
+ * MPTextLink.
231
+ *
232
+ * The sentence after a link that takes over the window. Read out and never
233
+ * drawn — the arrow says it to a reader who can see it, and this says it to
234
+ * everybody else.
235
+ */
236
+ textLink: {
237
+ newTab: string;
238
+ };
239
+ /**
240
+ * MPOverlay.
241
+ *
242
+ * The name of a modal region that may hold nothing readable at all — a bare
243
+ * spinner, a `clear` sheet. Without it a screen reader announces the region as
244
+ * nothing, which is why the component defaults it rather than requiring it.
245
+ */
246
+ overlay: {
247
+ label: string;
248
+ };
144
249
  /** MPAlert. */
145
250
  alert: {
146
251
  /** The × in the corner, which has no text of its own. */
@@ -224,6 +329,108 @@ export interface MPMessages {
224
329
  /** The line above the button, saying why the content is covered. */
225
330
  notice: string;
226
331
  };
332
+ /**
333
+ * MPPageLayout, and the parts of a page it arranges.
334
+ *
335
+ * One namespace for the skeleton rather than one per component, for the reason
336
+ * the pickers share theirs: they are one vocabulary, written by whoever
337
+ * translates a page's chrome, and a caller who has translated the word for a
338
+ * sidebar has translated the button that opens it in the same breath.
339
+ */
340
+ layout: {
341
+ /**
342
+ * The link that jumps past the navigation, drawn only while it holds the
343
+ * focus.
344
+ *
345
+ * Drawn rather than only announced, which makes it one of the few strings
346
+ * here that a sighted keyboard reader actually sees — and the one it would
347
+ * be least forgivable to leave in English, because the readers it exists for
348
+ * are the ones who cannot skip it.
349
+ */
350
+ skipToContent: string;
351
+ /**
352
+ * What an `MPSidebar` is called when nothing named it.
353
+ *
354
+ * Read out and never drawn. Every `<aside>` needs a name and a page with two
355
+ * of them *must* have one each, or a screen reader offers two regions called
356
+ * "complementary" — which is exactly why this is a default rather than a
357
+ * required prop.
358
+ */
359
+ sidebar: string;
360
+ /** The hamburger, which is a drawing and has no word of its own. */
361
+ openSidebar: string;
362
+ /** The same button once the drawer is open. */
363
+ closeSidebar: string;
364
+ /** The handle on a resizable column's inner edge. */
365
+ resizeSidebar: string;
366
+ };
367
+ /**
368
+ * MPTransfer.
369
+ *
370
+ * Every string here is **drawn**, which is unusual in this table and is what
371
+ * makes the namespace necessary: the two headings, the filter's placeholder
372
+ * and the line an empty list shows are all read off the screen, and a Korean
373
+ * page with a column headed *Available* is a page the component broke.
374
+ *
375
+ * The two arrows are the exception and are read out rather than drawn, for the
376
+ * reason the pagination's steppers are.
377
+ */
378
+ transfer: {
379
+ /** The heading over the list of things that have not been chosen. */
380
+ source: string;
381
+ /** And over the list of things that have. */
382
+ target: string;
383
+ /** The arrow that sends the ticked rows across. */
384
+ toTarget: string;
385
+ /** And the one that brings them back. */
386
+ toSource: string;
387
+ /** The filter above each list. */
388
+ search: string;
389
+ /** What a list with nothing in it says. */
390
+ empty: string;
391
+ };
392
+ /**
393
+ * MPCommandPalette.
394
+ *
395
+ * Three strings, two of them drawn: a palette that says *Type a command or
396
+ * search…* to a Korean reader is a palette that has told them, in the first
397
+ * thing they see, that it is not for them.
398
+ */
399
+ command: {
400
+ /** The dialog's accessible name. It has no visible title to take one from. */
401
+ label: string;
402
+ /** The placeholder in the field. */
403
+ search: string;
404
+ /** The line where the rows would be, when nothing matched. */
405
+ empty: string;
406
+ };
407
+ /**
408
+ * MPColorPicker.
409
+ *
410
+ * The one control in the library whose parts have **nowhere to take a name
411
+ * from**: a saturation square, a hue rail and an opacity rail are three
412
+ * draggable rectangles, and without these they are three draggable rectangles
413
+ * to a screen reader too.
414
+ *
415
+ * `empty` is the exception and is drawn — it is what the trigger reads before
416
+ * a colour has been chosen.
417
+ */
418
+ colorPicker: {
419
+ /** The saturation/brightness square. */
420
+ area: string;
421
+ /** The hue rail beside it. */
422
+ hue: string;
423
+ /** The opacity rail, when `alpha` is on. */
424
+ alpha: string;
425
+ /** The field the value can be typed into. */
426
+ value: string;
427
+ /** The grid of ready-made colours. */
428
+ swatches: string;
429
+ /** The × that empties the control. */
430
+ clear: string;
431
+ /** What the trigger reads before anything has been chosen. */
432
+ empty: string;
433
+ };
227
434
  }
228
435
  /** A translation may fill in as much or as little of the table as it has. */
229
436
  export type MPPartialMessages = {
@@ -256,6 +463,25 @@ export interface MPLocale {
256
463
  /** The strings. Anything left out falls back to English, a namespace at a time. */
257
464
  messages: MPPartialMessages;
258
465
  }
466
+ /**
467
+ * One namespace's English strings, carrying the name they answer to.
468
+ *
469
+ * The thirteen of them live in `internal/messages/`, one to a module, and a
470
+ * component imports the one it speaks. That is the whole reason this type
471
+ * exists: `resolveNamespace` below is handed the English table rather than
472
+ * looking it up, so the twelve tables a component does not use are twelve modules
473
+ * nothing imports.
474
+ *
475
+ * The name travels with the strings rather than beside them, so a call site is
476
+ * `useMPMessages(PICKER, locale)` and cannot name one namespace while passing
477
+ * another's words.
478
+ */
479
+ export interface MPNamespace<Name extends keyof MPMessages> {
480
+ /** The key this namespace occupies in `MPMessages` and in a translation. */
481
+ readonly name: Name;
482
+ /** English, which every other language is merged over. */
483
+ readonly en: MPMessages[Name];
484
+ }
259
485
  /**
260
486
  * Teaches the library a language.
261
487
  *
@@ -272,7 +498,7 @@ export interface MPLocale {
272
498
  */
273
499
  export declare function registerMPMessages(...locales: MPLocale[]): void;
274
500
  /**
275
- * The strings for a locale, merged over English.
501
+ * One namespace's strings for a locale, merged over English.
276
502
  *
277
503
  * `undefined` is English rather than the runtime's own locale, and that is
278
504
  * deliberate: `navigator.language` differs between the server that renders the
@@ -281,11 +507,16 @@ export declare function registerMPMessages(...locales: MPLocale[]): void;
281
507
  * at. A component that should follow the reader is *told* which language to
282
508
  * follow — by its own `locale` prop, or by an `MPLocaleProvider` above it.
283
509
  *
510
+ * A namespace at a time, so a language that has one and not another keeps
511
+ * English for the rest rather than losing both. That was already how the merge
512
+ * worked; what changed is that the namespaces are no longer merged all at once,
513
+ * because a component that reads one of them should not carry the other twelve.
514
+ *
284
515
  * Note that this is only about the words in the table. The dates themselves are
285
516
  * formatted by `Intl` against the same tag, and `Intl` speaks every language the
286
517
  * platform does whether or not there is an entry here.
287
518
  */
288
- export declare function resolveMessages(locale?: string): MPMessages;
519
+ export declare function resolveNamespace<Name extends keyof MPMessages>(namespace: MPNamespace<Name>, locale?: string): MPMessages[Name];
289
520
  /**
290
521
  * A message with its placeholders filled in.
291
522
  *
@@ -1 +1 @@
1
- const e={common:{close:"Close",clear:"Clear",open:"Open",remove:"Remove",removeNamed:"Remove {label}",loading:"Loading"},textField:{showPassword:"Show the password",hidePassword:"Hide the password"},empty:{title:"Nothing here"},picker:{previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Previous year",nextYear:"Next year",previousYears:"Previous years",nextYears:"Next years",chooseMonth:"Choose a month",chooseYear:"Choose a year",today:"Today",now:"Now",clear:"Clear",done:"Done",hour:"Hour",minute:"Minute",second:"Second",meridiem:"AM/PM",start:"Start",end:"End"},alert:{dismiss:"Dismiss"},chat:{sending:"Sending",sent:"Sent",delivered:"Delivered",read:"Read",failed:"Not sent",typing:"Typing"},spoiler:{reveal:"Reveal",hide:"Hide",notice:"Hidden so it is not read by accident"},pagination:{label:"Pagination",page:"Page {page}",status:"Page {page} of {total}",previous:"Previous page",next:"Next page",first:"First page",last:"Last page"},rating:{label:"Rating",value:"{value} out of {max}",empty:"Not rated"}},t=new Map;export function registerMPMessages(...a){for(const e of a){t.set(e.locale.toLowerCase(),e.messages);for(const o of e.aliases??[])t.set(o.toLowerCase(),e.messages)}o.clear(),o.set("",e)}const o=new Map([["",e]]);export function resolveMessages(a){const s=a?.trim()??"",n=o.get(s);if(n)return n;const r=function(e){const t=e.toLowerCase().split(/[-_]/).filter(Boolean),o=t[0];if(!o)return[];const a=t.slice(1),s=a.find(e=>/^[a-z]{4}$/.test(e)),n=a.find(e=>/^([a-z]{2}|\d{3})$/.test(e));return[s?`${o}-${s}`:"",n?`${o}-${n}`:"",o].filter(Boolean)}(s).map(e=>t.get(e)).find(Boolean),i=r?{common:{...e.common,...r.common},textField:{...e.textField,...r.textField},empty:{...e.empty,...r.empty},picker:{...e.picker,...r.picker},alert:{...e.alert,...r.alert},chat:{...e.chat,...r.chat},pagination:{...e.pagination,...r.pagination},rating:{...e.rating,...r.rating},spoiler:{...e.spoiler,...r.spoiler}}:e;return o.set(s,i),i}export function fillMessage(e,t){return e.replace(/\{(\w+)\}/g,(e,o)=>t[o]??e)}
1
+ const e=new Map;export function registerMPMessages(...s){for(const t of s){e.set(t.locale.toLowerCase(),t.messages);for(const s of t.aliases??[])e.set(s.toLowerCase(),t.messages)}t.clear()}const t=new Map;export function resolveNamespace(s,n){const o=n?.trim()??"",r=`${s.name}\0${o}`,a=t.get(r);if(a)return a;const c=function(e){const t=e.toLowerCase().split(/[-_]/).filter(Boolean),s=t[0];if(!s)return[];const n=t.slice(1),o=n.find(e=>/^[a-z]{4}$/.test(e)),r=n.find(e=>/^([a-z]{2}|\d{3})$/.test(e));return[o?`${s}-${o}`:"",r?`${s}-${r}`:"",s].filter(Boolean)}(o).map(t=>e.get(t)).find(Boolean),i=c?.[s.name],f=i?{...s.en,...i}:s.en;return t.set(r,f),f}export function fillMessage(e,t){return e.replace(/\{(\w+)\}/g,(e,s)=>t[s]??e)}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * What keyboard the reader is on, and how a shortcut is spelled.
3
+ *
4
+ * Two components speak this vocabulary and they speak it in opposite
5
+ * directions: [MPShortcut](../components/shortcut/MPShortcut.tsx) *writes* a
6
+ * shortcut down, and [MPCommandPalette](../components/command-palette/MPCommandPalette.tsx)
7
+ * *reads* one off a real keyboard event. Both files already said that the two
8
+ * had to agree — "a shortcut a component displays and one it binds have to be
9
+ * spelled the same way, or the label on the screen is a claim nobody checked" —
10
+ * and both then answered the question separately.
11
+ *
12
+ * They disagreed. The palette tested `navigator.userAgent` alone, which is the
13
+ * one of the three sources a browser is most willing to freeze or lie about, so
14
+ * a page could draw `⌘K` and bind Ctrl+K. Written once, they cannot.
15
+ *
16
+ * Nothing here is exported from `src/index.ts`. It is the library talking to
17
+ * itself, in the sense `internal/` always means.
18
+ */
19
+ /** The three real platforms a shortcut is spelled for. */
20
+ export type MPResolvedOS = 'mac' | 'windows' | 'linux';
21
+ /**
22
+ * What the browser says it is running on.
23
+ *
24
+ * `userAgentData.platform` is the modern spelling and `navigator.platform` the
25
+ * deprecated one that every browser still answers; the user agent string is the
26
+ * last resort. All three are matched at once because the question is coarse —
27
+ * which of three key caps to print — and getting it slightly wrong is a label,
28
+ * not a bug.
29
+ */
30
+ export declare function detectOS(): MPResolvedOS;
31
+ /**
32
+ * `useSyncExternalStore` rather than `useEffect` plus state, and rather than
33
+ * reading `navigator` during render.
34
+ *
35
+ * Reading it during render is a hydration mismatch waiting to happen: the server
36
+ * has no `navigator`, so it would render `Ctrl` and the client would render `⌘`
37
+ * into the same markup. This hook is the one API that tells React the two are
38
+ * *meant* to differ — it hydrates with the server's answer and re-renders with
39
+ * the browser's, which is exactly the sequence a Mac reader sees.
40
+ */
41
+ export declare function useDetectedOS(): MPResolvedOS;
42
+ /**
43
+ * Splits the string form. Empty segments are what `'Ctrl++'` leaves behind, and
44
+ * dropping them is why the array form exists for that case.
45
+ */
46
+ export declare function tokenizeShortcut(keys: string | string[]): string[];
47
+ /**
48
+ * Whether a keyboard event is the shortcut this string names.
49
+ *
50
+ * The same vocabulary `MPShortcut` draws, read rather than written — and the
51
+ * same tokenizer, so a shortcut that can be displayed is a shortcut that can be
52
+ * matched.
53
+ *
54
+ * ## `Mod` is a name for a key, not a fifth modifier
55
+ *
56
+ * It resolves to Command on a Mac and Control everywhere else, so `Mod+K` and
57
+ * `Ctrl+K` are the *same combination* on Windows — and the check has to say so.
58
+ * Tested as a modifier of its own, they contradicted each other: `Ctrl+K` on
59
+ * Windows held Control, `Mod` was not named, and "is Control down without Mod
60
+ * being asked for" answered no. `Ctrl+K` simply never matched anywhere except a
61
+ * Mac, on the component whose whole job is to answer a shortcut.
62
+ *
63
+ * So `Mod` is folded into whichever real key it stands for, and the four
64
+ * modifiers are then compared as themselves.
65
+ *
66
+ * Each is checked in **both** directions. A shortcut that fired with extra
67
+ * modifiers held would take a combination the page had given to something else.
68
+ *
69
+ * The platform is passed rather than sniffed, so a caller reads it through the
70
+ * same hook the label does and the two cannot end up on different answers.
71
+ */
72
+ export declare function matchesShortcut(event: KeyboardEvent, shortcut: string | string[], os: MPResolvedOS): boolean;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import*as t from"react";export function detectOS(){if("undefined"==typeof navigator)return"windows";const t=navigator.userAgentData,e=`${t?.platform??""} ${navigator.platform??""} ${navigator.userAgent??""}`;return/mac|iphone|ipad|ipod/i.test(e)?"mac":/win/i.test(e)?"windows":"linux"}function e(){return()=>{}}function r(){return"windows"}export function useDetectedOS(){return t.useSyncExternalStore(e,detectOS,r)}export function tokenizeShortcut(t){return Array.isArray(t)?t.map(t=>t.trim()).filter(Boolean):t.split("+").map(t=>t.trim()).filter(Boolean)}export function matchesShortcut(t,e,r){const n=tokenizeShortcut(e).map(t=>t.toLowerCase()),o=n[n.length-1];if(void 0===o)return!1;const a=new Set(n.slice(0,-1)),i=a.has("mod"),s=a.has("ctrl")||i&&"mac"!==r,c=a.has("meta")||i&&"mac"===r;return s===t.ctrlKey&&c===t.metaKey&&(a.has("shift")===t.shiftKey&&a.has("alt")===t.altKey&&t.key.toLowerCase()===o)}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * A length, said the way this library says lengths.
3
+ *
4
+ * One rule, everywhere: **a number is CSS pixels and a string is already a CSS
5
+ * length.** Twelve components had written it out inline and four more had a
6
+ * private `toLength` of their own, which is sixteen copies of a sentence that is
7
+ * either true of the whole library or true of nothing.
8
+ *
9
+ * They all happened to agree. That is the argument for collecting them rather
10
+ * than against it — sixteen agreeing copies are sixteen chances for the
11
+ * seventeenth to be written slightly differently, and the difference would be a
12
+ * prop that quietly took a number to mean something else.
13
+ *
14
+ * Nothing here is exported from `src/index.ts`. It is the library talking to
15
+ * itself, in the sense `internal/` always means.
16
+ */
17
+ /** A number is pixels; a string is whatever it says; nothing is nothing. */
18
+ export declare function cssLength(value: number | string): string;
19
+ export declare function cssLength(value: number | string | undefined | null): string | undefined;
20
+ /**
21
+ * A CSS length string, in pixels, or `undefined` for one this cannot resolve.
22
+ *
23
+ * The two components that let a reader *drag* a size — `MPSidebar` and
24
+ * `MPPanes` — both have to turn a written bound into a number to clamp against,
25
+ * and both had the same regex and the same unit arithmetic. This is that,
26
+ * once.
27
+ *
28
+ * `undefined` rather than a fallback, so each caller decides what an
29
+ * unresolvable bound means. They do not agree, and should not: a pane with an
30
+ * unreadable `minSize` is a pane with no minimum, and a sidebar with an
31
+ * unreadable one still has a default to fall back to. A parser that picked for
32
+ * them would have to pick wrongly for one of them.
33
+ *
34
+ * ## What the units are measured against
35
+ *
36
+ * `%` is a share of `extent`, which is whatever the caller is dividing up — the
37
+ * split's own width, the window's. `rem` is the document's font size and `em` is
38
+ * `root`'s, which is the distinction that makes `em` worth accepting at all: a
39
+ * bound written in `em` is a bound in the *component's* text, and a component
40
+ * inside a scaled-down panel means something different by it than the page does.
41
+ */
42
+ export declare function pixelsIn(value: string, extent?: number, root?: Element | null): number | undefined;
@@ -0,0 +1 @@
1
+ export function cssLength(e){if(null!=e)return"number"==typeof e?`${e}px`:e}const e=/^\s*(-?[\d.]+)\s*(px|rem|em|%)\s*$/;export function pixelsIn(t,n,o){const r=e.exec(t);if(!r)return;const u=Number(r[1]);if(!Number.isNaN(u))switch(r[2]){case"px":return u;case"%":return void 0===n?void 0:n*u/100;case"rem":return"undefined"==typeof document?void 0:u*(Number.parseFloat(getComputedStyle(document.documentElement).fontSize)||16);default:return"undefined"!=typeof document&&o?u*(Number.parseFloat(getComputedStyle(o).fontSize)||16):void 0}}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * The two questions a component has to ask about a URL it did not write.
3
+ *
4
+ * Four components render an `<a>` whose `target` a caller can set, and three of
5
+ * them had worked out the same `rel` independently — which is three chances for
6
+ * the fourth to forget, and the fourth did. One of them also renders a URL that
7
+ * arrives from somewhere else entirely, which is a different question with a
8
+ * worse failure.
9
+ *
10
+ * Nothing here is exported from `src/index.ts`. It is the library talking to
11
+ * itself, in the sense `internal/` always means.
12
+ */
13
+ /**
14
+ * The `rel` a link opening in a new tab needs, unless the caller named one.
15
+ *
16
+ * `target="_blank"` hands the opened page a `window.opener` back into this one
17
+ * unless it is told not to. Modern browsers imply `noopener` and older ones do
18
+ * not; `noreferrer` is never implied by anything, and is what stops the address
19
+ * of the page the reader was on travelling to wherever they just went.
20
+ *
21
+ * A caller's own `rel` **replaces** this rather than extending it, which is the
22
+ * bargain these components already documented: a row that also needs `nofollow`
23
+ * says `rel="noopener noreferrer nofollow"` and means it. The alternative —
24
+ * merging — is a component quietly adding tokens to an attribute the caller
25
+ * wrote out in full.
26
+ */
27
+ export declare function linkRel(target: string | undefined, rel: string | undefined): string | undefined;
28
+ /**
29
+ * A URL if it is one a reader can safely be sent to, and nothing if it is not.
30
+ *
31
+ * This is for the URLs that arrive from **somewhere else** — the link preview on
32
+ * a message somebody else sent — rather than for the ones an application writes
33
+ * into its own navigation. React renders a `javascript:` href with a development
34
+ * warning and no more, so on a page built out of user-generated content a
35
+ * hostile preview URL is a one-click script execution.
36
+ *
37
+ * A URL with no scheme at all is relative, and a relative URL cannot escalate to
38
+ * anything: it resolves against the page it is already on. Those pass.
39
+ *
40
+ * Rejected means `undefined`, so the element renders with no `href` — visibly
41
+ * not a link, rather than a link that quietly goes nowhere. Half-sanitising a
42
+ * URL into something that still navigates is how a filter becomes a bypass.
43
+ */
44
+ export declare function safeHref(href: string | undefined): string | undefined;
@@ -0,0 +1 @@
1
+ export function linkRel(e,t){return void 0!==t?t:"_blank"===e?"noopener noreferrer":void 0}const e=/[\u0000-\u0020\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]/g,t=/^([a-z][a-z0-9+.-]*):/i,u=new Set(["http:","https:","mailto:","tel:"]);export function safeHref(r){if(!r)return;const n=t.exec(r.replace(e,""));return n?u.has(`${n[1].toLowerCase()}:`)?r:void 0:r}
@@ -12,14 +12,14 @@
12
12
  *
13
13
  * There is deliberately no third source. `navigator.language` is *not* consulted
14
14
  * as a fallback, and that is not an oversight — see the note on
15
- * `resolveMessages` in `internal/i18n.ts`. The runtime's own locale differs
15
+ * `resolveNamespace` in `internal/i18n.ts`. The runtime's own locale differs
16
16
  * between the server that renders the markup and the browser that hydrates it,
17
17
  * so reading it would put a hydration mismatch in the one part of the page a
18
18
  * reader is looking at. `undefined` therefore means "the platform's default",
19
19
  * which `Intl` resolves consistently in both places.
20
20
  */
21
21
  import * as React from 'react';
22
- import { type MPMessages } from './i18n';
22
+ import { type MPMessages, type MPNamespace } from './i18n.js';
23
23
  /**
24
24
  * `undefined` rather than `'en'`, and the distinction matters.
25
25
  *
@@ -39,5 +39,29 @@ export declare function useMPLocale(locale?: string): string | undefined;
39
39
  * what makes an unsupported language a partial answer rather than a dead end: a
40
40
  * caller supplies the handful of words they care about and everything else is
41
41
  * still translated, or still English, rather than blank.
42
+ *
43
+ * The namespace is passed as the object from `internal/messages/`, not as its
44
+ * name: it carries English with it, which is what lets a component that says one
45
+ * word leave the other twelve namespaces out of the bundle entirely. The objects
46
+ * are module constants, so the identity `useMemo` compares is stable.
47
+ *
48
+ * ## Why the overrides are keyed on what they say
49
+ *
50
+ * Because of how they are written. `labels={{ clear: 'Leeren' }}` is an object
51
+ * literal in JSX, which is a *new object every render* — so keyed on identity
52
+ * the memo missed every single time, and every component with a `labels` prop
53
+ * rebuilt its merged table on every render of its parent.
54
+ *
55
+ * That was not expensive on its own; what made it worth fixing is what the table
56
+ * is used for. It is handed straight back out of this hook, so a fresh object
57
+ * per render is a fresh prop for everything downstream — and the calendar keeps
58
+ * `labels` in a `useMemo` dependency of its own, where a new object per render
59
+ * of the page above meant re-deriving a month's worth of `Intl` names for a
60
+ * table that had not changed a word.
61
+ *
62
+ * `internal/Picker.ts` keys its display samples on `JSON.stringify` for exactly
63
+ * this reason, with the same trade written out there: two objects whose keys are
64
+ * in a different order read as two tables. That costs one extra miss and never a
65
+ * wrong answer.
42
66
  */
43
- export declare function useMPMessages<Namespace extends keyof MPMessages>(namespace: Namespace, locale: string | undefined, overrides?: Partial<MPMessages[Namespace]>): MPMessages[Namespace];
67
+ export declare function useMPMessages<Name extends keyof MPMessages>(namespace: MPNamespace<Name>, locale: string | undefined, overrides?: Partial<MPMessages[Name]>): MPMessages[Name];
@@ -1 +1,2 @@
1
- import*as e from"react";import{resolveMessages as t}from"./i18n";export const MPLocaleContext=/*@__PURE__*/e.createContext(void 0);export function useMPLocale(t){const o=e.useContext(MPLocaleContext);return t??o}export function useMPMessages(o,n,r){return e.useMemo(()=>{const e=t(n)[o];return r?{...e,...r}:e},[o,n,r])}
1
+ "use client";
2
+ import*as t from"react";import{resolveNamespace as e}from"./i18n.js";export const MPLocaleContext=/*@__PURE__*/t.createContext(void 0);export function useMPLocale(e){const o=t.useContext(MPLocaleContext);return e??o}export function useMPMessages(o,n,r){const s=void 0===r?"":JSON.stringify(r);return t.useMemo(()=>{const t=e(o,n);return r?{...t,...r}:t},[o,n,s])}
@@ -15,7 +15,7 @@
15
15
  * every row from having to answer "what if there is no menu".
16
16
  */
17
17
  import * as React from 'react';
18
- import type { MPColor, MPSize } from '../types';
18
+ import type { MPColor, MPSize } from '../types.js';
19
19
  export interface MPMenuContextValue {
20
20
  size: MPSize;
21
21
  color: MPColor;
@@ -1 +1,2 @@
1
+ "use client";
1
2
  import*as t from"react";export const MPMenuContext=/*@__PURE__*/t.createContext({size:"md",color:"primary"});
@@ -0,0 +1,3 @@
1
+ import type { MPNamespace } from '../i18n.js';
2
+ /** `MPAlert`'s dismiss button — see `MPMessages['alert']`. */
3
+ export declare const ALERT: MPNamespace<'alert'>;
@@ -0,0 +1 @@
1
+ export const ALERT={name:"alert",en:{dismiss:"Dismiss"}};
@@ -0,0 +1,3 @@
1
+ import type { MPNamespace } from '../i18n.js';
2
+ /** `MPBreadcrumb`'s two names — see `MPMessages['breadcrumb']`. */
3
+ export declare const BREADCRUMB: MPNamespace<'breadcrumb'>;
@@ -0,0 +1 @@
1
+ export const BREADCRUMB={name:"breadcrumb",en:{label:"Breadcrumb",expand:"Show hidden steps"}};
@@ -0,0 +1,3 @@
1
+ import type { MPNamespace } from '../i18n.js';
2
+ /** `MPCarousel`'s own names — see `MPMessages['carousel']`. */
3
+ export declare const CAROUSEL: MPNamespace<'carousel'>;
@@ -0,0 +1 @@
1
+ export const CAROUSEL={name:"carousel",en:{label:"Carousel",previous:"Previous slide",next:"Next slide",slide:"Slide {index} of {total}"}};
@@ -0,0 +1,3 @@
1
+ import type { MPNamespace } from '../i18n.js';
2
+ /** `MPChatBubble`'s delivery states — see `MPMessages['chat']`. */
3
+ export declare const CHAT: MPNamespace<'chat'>;
@@ -0,0 +1 @@
1
+ export const CHAT={name:"chat",en:{sending:"Sending",sent:"Sent",delivered:"Delivered",read:"Read",failed:"Not sent",typing:"Typing"}};
@@ -0,0 +1,3 @@
1
+ import type { MPNamespace } from '../i18n.js';
2
+ /** The names for the parts of the picker that have no text on them. */
3
+ export declare const COLOR_PICKER: MPNamespace<'colorPicker'>;
@@ -0,0 +1 @@
1
+ export const COLOR_PICKER={name:"colorPicker",en:{area:"Saturation and brightness",hue:"Hue",alpha:"Opacity",value:"Colour value",swatches:"Swatches",clear:"Clear",empty:"No colour"}};
@@ -0,0 +1,3 @@
1
+ import type { MPNamespace } from '../i18n.js';
2
+ /** `MPCombobox`'s two drawn lines — see `MPMessages['combobox']`. */
3
+ export declare const COMBOBOX: MPNamespace<'combobox'>;
@@ -0,0 +1 @@
1
+ export const COMBOBOX={name:"combobox",en:{empty:"No matches",add:"Add “{label}”"}};
@@ -0,0 +1,3 @@
1
+ import type { MPNamespace } from '../i18n.js';
2
+ /** `MPCommandPalette`'s three strings — see `MPMessages['command']`. */
3
+ export declare const COMMAND: MPNamespace<'command'>;
@@ -0,0 +1 @@
1
+ export const COMMAND={name:"command",en:{label:"Command palette",search:"Type a command or search…",empty:"No commands found"}};
@@ -0,0 +1,3 @@
1
+ import type { MPNamespace } from '../i18n.js';
2
+ /** The words that are not any one component's — see `MPMessages['common']`. */
3
+ export declare const COMMON: MPNamespace<'common'>;
@@ -0,0 +1 @@
1
+ export const COMMON={name:"common",en:{close:"Close",clear:"Clear",open:"Open",remove:"Remove",removeNamed:"Remove {label}",loading:"Loading"}};
@@ -0,0 +1,3 @@
1
+ import type { MPNamespace } from '../i18n.js';
2
+ /** `MPEmpty`'s heading — see `MPMessages['empty']`. */
3
+ export declare const EMPTY: MPNamespace<'empty'>;
@@ -0,0 +1 @@
1
+ export const EMPTY={name:"empty",en:{title:"Nothing here"}};
@@ -0,0 +1,3 @@
1
+ import type { MPNamespace } from '../i18n.js';
2
+ /** `MPFilePicker`'s prompt — see `MPMessages['filePicker']`. */
3
+ export declare const FILE_PICKER: MPNamespace<'filePicker'>;