material-plus-ui 1.3.0 → 1.3.1

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 (371) hide show
  1. package/README.md +3 -2
  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 +1 -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/badge/MPBadge.d.ts +1 -1
  63. package/dist/components/badge/MPBadge.js +2 -1
  64. package/dist/components/badge/index.d.ts +2 -2
  65. package/dist/components/badge/index.js +1 -1
  66. package/dist/components/blockquote/MPBlockquote.d.ts +1 -1
  67. package/dist/components/blockquote/MPBlockquote.js +2 -1
  68. package/dist/components/blockquote/index.d.ts +2 -2
  69. package/dist/components/blockquote/index.js +1 -1
  70. package/dist/components/bottom-navigation/MPBottomNavigation.d.ts +1 -1
  71. package/dist/components/bottom-navigation/MPBottomNavigation.js +2 -1
  72. package/dist/components/bottom-navigation/index.d.ts +2 -2
  73. package/dist/components/bottom-navigation/index.js +1 -1
  74. package/dist/components/box/MPBox.d.ts +1 -1
  75. package/dist/components/box/MPBox.js +1 -1
  76. package/dist/components/box/index.d.ts +2 -2
  77. package/dist/components/box/index.js +1 -1
  78. package/dist/components/breadcrumb/MPBreadcrumb.d.ts +1 -1
  79. package/dist/components/breadcrumb/MPBreadcrumb.js +2 -1
  80. package/dist/components/breadcrumb/index.d.ts +2 -2
  81. package/dist/components/breadcrumb/index.js +1 -1
  82. package/dist/components/button/MPButton.d.ts +1 -1
  83. package/dist/components/button/MPButton.js +2 -1
  84. package/dist/components/button/index.d.ts +2 -2
  85. package/dist/components/button/index.js +1 -1
  86. package/dist/components/button-group/MPButtonGroup.d.ts +1 -1
  87. package/dist/components/button-group/MPButtonGroup.js +2 -1
  88. package/dist/components/button-group/index.d.ts +2 -2
  89. package/dist/components/button-group/index.js +1 -1
  90. package/dist/components/card/MPCard.d.ts +1 -1
  91. package/dist/components/card/MPCard.js +2 -1
  92. package/dist/components/card/index.d.ts +2 -2
  93. package/dist/components/card/index.js +1 -1
  94. package/dist/components/carousel/MPCarousel.d.ts +1 -1
  95. package/dist/components/carousel/MPCarousel.js +2 -1
  96. package/dist/components/carousel/index.d.ts +2 -2
  97. package/dist/components/carousel/index.js +1 -1
  98. package/dist/components/chat-bubble/MPChatBubble.d.ts +1 -1
  99. package/dist/components/chat-bubble/MPChatBubble.js +2 -1
  100. package/dist/components/chat-bubble/index.d.ts +2 -2
  101. package/dist/components/chat-bubble/index.js +1 -1
  102. package/dist/components/checkbox/MPCheckbox.d.ts +1 -1
  103. package/dist/components/checkbox/MPCheckbox.js +2 -1
  104. package/dist/components/checkbox/index.d.ts +2 -2
  105. package/dist/components/checkbox/index.js +1 -1
  106. package/dist/components/chip/MPChip.d.ts +1 -1
  107. package/dist/components/chip/MPChip.js +2 -1
  108. package/dist/components/chip/index.d.ts +2 -2
  109. package/dist/components/chip/index.js +1 -1
  110. package/dist/components/collapsible/MPCollapsible.d.ts +1 -1
  111. package/dist/components/collapsible/MPCollapsible.js +2 -1
  112. package/dist/components/collapsible/index.d.ts +2 -2
  113. package/dist/components/collapsible/index.js +1 -1
  114. package/dist/components/color-picker/MPColorPicker.d.ts +2 -2
  115. package/dist/components/color-picker/MPColorPicker.js +2 -1
  116. package/dist/components/color-picker/index.d.ts +2 -2
  117. package/dist/components/color-picker/index.js +1 -1
  118. package/dist/components/combobox/MPCombobox.d.ts +1 -1
  119. package/dist/components/combobox/MPCombobox.js +2 -1
  120. package/dist/components/combobox/index.d.ts +2 -2
  121. package/dist/components/combobox/index.js +1 -1
  122. package/dist/components/container/MPContainer.d.ts +1 -1
  123. package/dist/components/container/MPContainer.js +1 -1
  124. package/dist/components/container/index.d.ts +2 -2
  125. package/dist/components/container/index.js +1 -1
  126. package/dist/components/date-picker/MPDatePicker.d.ts +3 -3
  127. package/dist/components/date-picker/MPDatePicker.js +2 -1
  128. package/dist/components/date-picker/index.d.ts +2 -2
  129. package/dist/components/date-picker/index.js +1 -1
  130. package/dist/components/date-range-picker/MPDateRangePicker.d.ts +3 -3
  131. package/dist/components/date-range-picker/MPDateRangePicker.js +2 -1
  132. package/dist/components/date-range-picker/index.d.ts +2 -2
  133. package/dist/components/date-range-picker/index.js +1 -1
  134. package/dist/components/date-time-picker/MPDateTimePicker.d.ts +4 -4
  135. package/dist/components/date-time-picker/MPDateTimePicker.js +2 -1
  136. package/dist/components/date-time-picker/index.d.ts +2 -2
  137. package/dist/components/date-time-picker/index.js +1 -1
  138. package/dist/components/dialog/MPDialog.d.ts +1 -1
  139. package/dist/components/dialog/MPDialog.js +2 -1
  140. package/dist/components/dialog/index.d.ts +2 -2
  141. package/dist/components/dialog/index.js +1 -1
  142. package/dist/components/divider/MPDivider.d.ts +1 -1
  143. package/dist/components/divider/MPDivider.js +2 -1
  144. package/dist/components/divider/index.d.ts +2 -2
  145. package/dist/components/divider/index.js +1 -1
  146. package/dist/components/drawer/MPDrawer.d.ts +1 -1
  147. package/dist/components/drawer/MPDrawer.js +2 -1
  148. package/dist/components/drawer/index.d.ts +2 -2
  149. package/dist/components/drawer/index.js +1 -1
  150. package/dist/components/empty/MPEmpty.d.ts +1 -1
  151. package/dist/components/empty/MPEmpty.js +2 -1
  152. package/dist/components/empty/index.d.ts +2 -2
  153. package/dist/components/empty/index.js +1 -1
  154. package/dist/components/file-picker/MPFilePicker.d.ts +1 -1
  155. package/dist/components/file-picker/MPFilePicker.js +2 -1
  156. package/dist/components/file-picker/index.d.ts +2 -2
  157. package/dist/components/file-picker/index.js +1 -1
  158. package/dist/components/floating-action-button/MPFloatingActionButton.d.ts +1 -1
  159. package/dist/components/floating-action-button/MPFloatingActionButton.js +2 -1
  160. package/dist/components/floating-action-button/index.d.ts +2 -2
  161. package/dist/components/floating-action-button/index.js +1 -1
  162. package/dist/components/grid/MPGrid.d.ts +1 -1
  163. package/dist/components/grid/MPGrid.js +1 -0
  164. package/dist/components/grid/index.d.ts +2 -2
  165. package/dist/components/grid/index.js +1 -1
  166. package/dist/components/highlight/MPHighlight.d.ts +2 -2
  167. package/dist/components/highlight/MPHighlight.js +2 -1
  168. package/dist/components/highlight/index.d.ts +2 -2
  169. package/dist/components/highlight/index.js +1 -1
  170. package/dist/components/icon/MPIcon.d.ts +1 -1
  171. package/dist/components/icon/MPIcon.js +1 -0
  172. package/dist/components/icon/index.d.ts +2 -2
  173. package/dist/components/icon/index.js +1 -1
  174. package/dist/components/icon-button/MPIconButton.d.ts +1 -1
  175. package/dist/components/icon-button/MPIconButton.js +2 -1
  176. package/dist/components/icon-button/index.d.ts +2 -2
  177. package/dist/components/icon-button/index.js +1 -1
  178. package/dist/components/list/MPList.d.ts +1 -1
  179. package/dist/components/list/MPList.js +2 -1
  180. package/dist/components/list/index.d.ts +2 -2
  181. package/dist/components/list/index.js +1 -1
  182. package/dist/components/locale/MPLocaleProvider.d.ts +1 -1
  183. package/dist/components/locale/MPLocaleProvider.js +2 -1
  184. package/dist/components/locale/index.d.ts +2 -2
  185. package/dist/components/locale/index.js +1 -1
  186. package/dist/components/menu/MPMenu.d.ts +1 -1
  187. package/dist/components/menu/MPMenu.js +2 -1
  188. package/dist/components/menu/index.d.ts +2 -2
  189. package/dist/components/menu/index.js +1 -1
  190. package/dist/components/number-field/MPNumberField.d.ts +1 -1
  191. package/dist/components/number-field/MPNumberField.js +2 -1
  192. package/dist/components/number-field/index.d.ts +2 -2
  193. package/dist/components/number-field/index.js +1 -1
  194. package/dist/components/otp-field/MPOtpField.d.ts +1 -1
  195. package/dist/components/otp-field/MPOtpField.js +2 -1
  196. package/dist/components/otp-field/index.d.ts +2 -2
  197. package/dist/components/otp-field/index.js +1 -1
  198. package/dist/components/overlay/MPOverlay.d.ts +1 -1
  199. package/dist/components/overlay/MPOverlay.js +2 -1
  200. package/dist/components/overlay/index.d.ts +2 -2
  201. package/dist/components/overlay/index.js +1 -1
  202. package/dist/components/pagination/MPPagination.d.ts +2 -2
  203. package/dist/components/pagination/MPPagination.js +2 -1
  204. package/dist/components/pagination/index.d.ts +2 -2
  205. package/dist/components/pagination/index.js +1 -1
  206. package/dist/components/panes/MPPanes.d.ts +1 -1
  207. package/dist/components/panes/MPPanes.js +2 -1
  208. package/dist/components/panes/index.d.ts +2 -2
  209. package/dist/components/panes/index.js +1 -1
  210. package/dist/components/pill/MPPill.d.ts +1 -1
  211. package/dist/components/pill/MPPill.js +2 -1
  212. package/dist/components/pill/index.d.ts +2 -2
  213. package/dist/components/pill/index.js +1 -1
  214. package/dist/components/popover/MPPopover.d.ts +1 -1
  215. package/dist/components/popover/MPPopover.js +2 -1
  216. package/dist/components/popover/index.d.ts +2 -2
  217. package/dist/components/popover/index.js +1 -1
  218. package/dist/components/progress-box/MPProgressBox.d.ts +2 -2
  219. package/dist/components/progress-box/MPProgressBox.js +2 -1
  220. package/dist/components/progress-box/index.d.ts +2 -2
  221. package/dist/components/progress-box/index.js +1 -1
  222. package/dist/components/progress-circular/MPProgressCircular.d.ts +2 -2
  223. package/dist/components/progress-circular/MPProgressCircular.js +2 -1
  224. package/dist/components/progress-circular/index.d.ts +2 -2
  225. package/dist/components/progress-circular/index.js +1 -1
  226. package/dist/components/progress-linear/MPProgressLinear.d.ts +2 -2
  227. package/dist/components/progress-linear/MPProgressLinear.js +2 -1
  228. package/dist/components/progress-linear/index.d.ts +2 -2
  229. package/dist/components/progress-linear/index.js +1 -1
  230. package/dist/components/radio-group/MPRadioGroup.d.ts +1 -1
  231. package/dist/components/radio-group/MPRadioGroup.js +2 -1
  232. package/dist/components/radio-group/index.d.ts +2 -2
  233. package/dist/components/radio-group/index.js +1 -1
  234. package/dist/components/rating/MPRating.d.ts +2 -2
  235. package/dist/components/rating/MPRating.js +2 -1
  236. package/dist/components/rating/index.d.ts +2 -2
  237. package/dist/components/rating/index.js +1 -1
  238. package/dist/components/segmented-button/MPSegmentedButton.d.ts +1 -1
  239. package/dist/components/segmented-button/MPSegmentedButton.js +2 -1
  240. package/dist/components/segmented-button/index.d.ts +2 -2
  241. package/dist/components/segmented-button/index.js +1 -1
  242. package/dist/components/select/MPSelect.d.ts +1 -1
  243. package/dist/components/select/MPSelect.js +2 -1
  244. package/dist/components/select/index.d.ts +2 -2
  245. package/dist/components/select/index.js +1 -1
  246. package/dist/components/shortcut/MPShortcut.d.ts +1 -1
  247. package/dist/components/shortcut/MPShortcut.js +2 -1
  248. package/dist/components/shortcut/index.d.ts +2 -2
  249. package/dist/components/shortcut/index.js +1 -1
  250. package/dist/components/skeleton/MPSkeleton.d.ts +1 -1
  251. package/dist/components/skeleton/MPSkeleton.js +2 -1
  252. package/dist/components/skeleton/index.d.ts +2 -2
  253. package/dist/components/skeleton/index.js +1 -1
  254. package/dist/components/slider/MPSlider.d.ts +1 -1
  255. package/dist/components/slider/MPSlider.js +2 -1
  256. package/dist/components/slider/index.d.ts +2 -2
  257. package/dist/components/slider/index.js +1 -1
  258. package/dist/components/snackbar/MPSnackbar.d.ts +1 -1
  259. package/dist/components/snackbar/MPSnackbar.js +2 -1
  260. package/dist/components/snackbar/index.d.ts +2 -2
  261. package/dist/components/snackbar/index.js +1 -1
  262. package/dist/components/spoiler/MPSpoiler.d.ts +1 -1
  263. package/dist/components/spoiler/MPSpoiler.js +2 -1
  264. package/dist/components/spoiler/index.d.ts +2 -2
  265. package/dist/components/spoiler/index.js +1 -1
  266. package/dist/components/switch/MPSwitch.d.ts +1 -1
  267. package/dist/components/switch/MPSwitch.js +2 -1
  268. package/dist/components/switch/index.d.ts +2 -2
  269. package/dist/components/switch/index.js +1 -1
  270. package/dist/components/table/MPTable.d.ts +1 -1
  271. package/dist/components/table/MPTable.js +2 -1
  272. package/dist/components/table/index.d.ts +2 -2
  273. package/dist/components/table/index.js +1 -1
  274. package/dist/components/tabs/MPTabs.d.ts +1 -1
  275. package/dist/components/tabs/MPTabs.js +2 -1
  276. package/dist/components/tabs/index.d.ts +2 -2
  277. package/dist/components/tabs/index.js +1 -1
  278. package/dist/components/text-field/MPTextField.d.ts +2 -2
  279. package/dist/components/text-field/MPTextField.js +2 -1
  280. package/dist/components/text-field/index.d.ts +2 -2
  281. package/dist/components/text-field/index.js +1 -1
  282. package/dist/components/text-link/MPTextLink.d.ts +1 -1
  283. package/dist/components/text-link/MPTextLink.js +2 -1
  284. package/dist/components/text-link/index.d.ts +2 -2
  285. package/dist/components/text-link/index.js +1 -1
  286. package/dist/components/time-picker/MPTimePicker.d.ts +3 -3
  287. package/dist/components/time-picker/MPTimePicker.js +2 -1
  288. package/dist/components/time-picker/index.d.ts +2 -2
  289. package/dist/components/time-picker/index.js +1 -1
  290. package/dist/components/timeline/MPTimeline.d.ts +1 -1
  291. package/dist/components/timeline/MPTimeline.js +2 -1
  292. package/dist/components/timeline/index.d.ts +2 -2
  293. package/dist/components/timeline/index.js +1 -1
  294. package/dist/components/tooltip/MPTooltip.d.ts +1 -1
  295. package/dist/components/tooltip/MPTooltip.js +2 -1
  296. package/dist/components/tooltip/index.d.ts +2 -2
  297. package/dist/components/tooltip/index.js +1 -1
  298. package/dist/components/typography/MPTypography.d.ts +1 -1
  299. package/dist/components/typography/MPTypography.js +2 -1
  300. package/dist/components/typography/index.d.ts +2 -2
  301. package/dist/components/typography/index.js +1 -1
  302. package/dist/constants/glyphs.d.ts +62 -0
  303. package/dist/constants/glyphs.js +2 -0
  304. package/dist/constants/icons.d.ts +31 -60
  305. package/dist/constants/icons.js +1 -1
  306. package/dist/index.d.ts +78 -78
  307. package/dist/index.js +1 -1
  308. package/dist/internal/Calendar.d.ts +3 -3
  309. package/dist/internal/Calendar.js +2 -1
  310. package/dist/internal/FieldOutline.d.ts +1 -1
  311. package/dist/internal/FieldOutline.js +2 -1
  312. package/dist/internal/Picker.d.ts +2 -2
  313. package/dist/internal/Picker.js +2 -1
  314. package/dist/internal/StateLayer.js +1 -0
  315. package/dist/internal/SupportingText.js +2 -1
  316. package/dist/internal/WidthSizer.js +1 -0
  317. package/dist/internal/accent.d.ts +1 -1
  318. package/dist/internal/animate.d.ts +1 -1
  319. package/dist/internal/animate.js +1 -0
  320. package/dist/internal/button-group.d.ts +1 -1
  321. package/dist/internal/button-group.js +1 -0
  322. package/dist/internal/date.d.ts +1 -1
  323. package/dist/internal/i18n.d.ts +48 -14
  324. package/dist/internal/i18n.js +1 -1
  325. package/dist/internal/locale.d.ts +8 -3
  326. package/dist/internal/locale.js +2 -1
  327. package/dist/internal/menu.d.ts +1 -1
  328. package/dist/internal/menu.js +1 -0
  329. package/dist/internal/messages/alert.d.ts +3 -0
  330. package/dist/internal/messages/alert.js +1 -0
  331. package/dist/internal/messages/chat.d.ts +3 -0
  332. package/dist/internal/messages/chat.js +1 -0
  333. package/dist/internal/messages/common.d.ts +3 -0
  334. package/dist/internal/messages/common.js +1 -0
  335. package/dist/internal/messages/empty.d.ts +3 -0
  336. package/dist/internal/messages/empty.js +1 -0
  337. package/dist/internal/messages/pagination.d.ts +3 -0
  338. package/dist/internal/messages/pagination.js +1 -0
  339. package/dist/internal/messages/picker.d.ts +3 -0
  340. package/dist/internal/messages/picker.js +1 -0
  341. package/dist/internal/messages/rating.d.ts +3 -0
  342. package/dist/internal/messages/rating.js +1 -0
  343. package/dist/internal/messages/spoiler.d.ts +3 -0
  344. package/dist/internal/messages/spoiler.js +1 -0
  345. package/dist/internal/messages/text-field.d.ts +3 -0
  346. package/dist/internal/messages/text-field.js +1 -0
  347. package/dist/internal/progress.d.ts +1 -1
  348. package/dist/internal/scale.d.ts +1 -1
  349. package/dist/internal/surface.d.ts +1 -1
  350. package/dist/internal/surface.js +1 -1
  351. package/dist/locales/ar.d.ts +1 -1
  352. package/dist/locales/de.d.ts +1 -1
  353. package/dist/locales/es.d.ts +1 -1
  354. package/dist/locales/fr.d.ts +1 -1
  355. package/dist/locales/hi.d.ts +1 -1
  356. package/dist/locales/id.d.ts +1 -1
  357. package/dist/locales/index.d.ts +19 -19
  358. package/dist/locales/index.js +1 -1
  359. package/dist/locales/it.d.ts +1 -1
  360. package/dist/locales/ja.d.ts +1 -1
  361. package/dist/locales/ko.d.ts +1 -1
  362. package/dist/locales/nl.d.ts +1 -1
  363. package/dist/locales/pl.d.ts +1 -1
  364. package/dist/locales/pt.d.ts +1 -1
  365. package/dist/locales/ru.d.ts +1 -1
  366. package/dist/locales/th.d.ts +1 -1
  367. package/dist/locales/tr.d.ts +1 -1
  368. package/dist/locales/vi.d.ts +1 -1
  369. package/dist/locales/zh-hans.d.ts +1 -1
  370. package/dist/locales/zh-hant.d.ts +1 -1
  371. package/package.json +11 -9
@@ -1,2 +1,2 @@
1
- export { MPTimePicker } from './MPTimePicker';
2
- export type { MPTimePickerProps, MPTimeUnit } from './MPTimePicker';
1
+ export { MPTimePicker } from './MPTimePicker.js';
2
+ export type { MPTimePickerProps, MPTimeUnit } from './MPTimePicker.js';
@@ -1 +1 @@
1
- export{MPTimePicker}from"./MPTimePicker";
1
+ export{MPTimePicker}from"./MPTimePicker.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, MPOrientation, MPSize } from '../../types';
3
+ import type { MPColor, MPOrientation, MPSize } from '../../types.js';
4
4
  /**
5
5
  * How far along one item is.
6
6
  *
@@ -1 +1,2 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as t from"react";import{useRender as n}from"@base-ui/react/use-render";import{accentSlots as l}from"../../internal/accent";import{hasContent as a,META_TEXT as o,PROSE_TEXT as i,SHEET_TITLE as s}from"../../internal/scale";const c=/*@__PURE__*/t.createContext(null),m=/*@__PURE__*/t.createContext({index:0,last:!1}),p={xs:"0.875rem",sm:"1rem",md:"1.25rem",lg:"1.5rem",xl:"1.875rem"},d={xs:"gap-2",sm:"gap-2.5",md:"gap-3",lg:"gap-3.5",xl:"gap-4"},u={xs:"pb-5",sm:"pb-6",md:"pb-7",lg:"pb-8",xl:"pb-10"},x={xs:"pe-5",sm:"pe-6",md:"pe-7",lg:"pe-8",xl:"pe-10"},f={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted",none:""},b={complete:"bg-(--_mp-accent) text-(--_mp-on-accent)",current:"bg-(--_mp-accent) text-(--_mp-on-accent) shadow-[0_0_0_0.25rem_var(--_mp-accent-container)]",upcoming:"border-mp-outline text-mp-on-surface-variant border-2 bg-transparent"},v={complete:"border-(--_mp-accent)",current:"border-mp-outline-variant",upcoming:"border-mp-outline-variant"},h={complete:"text-mp-on-surface",current:"text-(--_mp-accent)",upcoming:"text-mp-on-surface-variant"};export const MPTimelineItem=/*@__PURE__*/t.forwardRef(function({title:n,meta:g,bullet:_,status:N,color:y,connector:z="solid",className:j,style:w,children:$,...C},M){const P=t.useContext(c),{index:B,last:k}=t.useContext(m),A=P?.size??"md",R=P?.orientation??"vertical",T=y??P?.color??"primary",I=P?.active??null,q=N??(null===I?"upcoming":B<I?"complete":B===I?"current":"upcoming"),D="horizontal"===R,E="none"!==z&&!k,F=e("span",{"aria-hidden":"true",className:["rounded-mp-full relative z-10 flex shrink-0 items-center justify-center","size-(--_mp-bullet) text-[calc(var(--_mp-bullet)*0.5)] leading-none font-medium","tabular-nums [&>svg]:size-[0.6em]",b[q],"transition-[background-color,border-color,box-shadow,color]","duration-(--mp-sys-motion-duration-short4)"].join(" "),children:_}),G=E?e("span",{"aria-hidden":"true",className:["pointer-events-none absolute",D?"start-(--_mp-bullet) top-[calc(var(--_mp-bullet)/2_-_1px)] end-0 border-t-2":"top-(--_mp-bullet) start-[calc(var(--_mp-bullet)/2_-_1px)] bottom-0 border-s-2",f[z],v[q]].filter(Boolean).join(" ")}):null,H=r("div",{className:"flex min-w-0 flex-col gap-0.5 "+(D?"mt-2":""),children:[a(n)||a(g)?r("div",{className:"flex flex-wrap items-baseline gap-x-2",children:[a(n)?e("span",{className:`${s[A]} ${h[q]}`,children:n}):null,a(g)?e("span",{className:`text-mp-on-surface-variant ${o}`,children:g}):null]}):null,a($)?e("div",{className:`text-mp-on-surface-variant ${i[A]}`,children:$}):null]});return r("li",{ref:M,"aria-current":"current"===q?"step":void 0,"data-status":q,className:["relative",D?`flex min-w-0 flex-1 flex-col ${k?"":x[A]}`:`flex ${d[A]} ${k?"":u[A]}`,j??""].filter(Boolean).join(" "),style:{"--_mp-bullet":p[A],...l(T),...w},...C,children:[G,F,H]})});export const MPTimeline=/*@__PURE__*/t.forwardRef(function({active:r,size:l="md",color:a="primary",orientation:o="vertical",render:i,className:s,style:p,children:d,...u},x){const f=t.Children.toArray(d),b=f.length,v=t.useMemo(()=>({size:l,orientation:o,color:a,active:r??null}),[l,o,a,r]),h=t.useMemo(()=>Array.from({length:b},(e,r)=>({index:r,last:r===b-1})),[b]),g=n({render:i??e("ol",{}),ref:x,props:{role:"list","data-mp-size":l,className:["mp-timeline flex","horizontal"===o?"flex-row":"flex-col",s??""].filter(Boolean).join(" "),style:p,children:f.map((r,t)=>e(m.Provider,{value:h[t],children:r},t)),...u}});return e(c.Provider,{value:v,children:g})});
1
+ "use client";
2
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as t from"react";import{useRender as n}from"@base-ui/react/use-render";import{accentSlots as l}from"../../internal/accent.js";import{hasContent as a,META_TEXT as o,PROSE_TEXT as i,SHEET_TITLE as s}from"../../internal/scale.js";const c=/*@__PURE__*/t.createContext(null),m=/*@__PURE__*/t.createContext({index:0,last:!1}),p={xs:"0.875rem",sm:"1rem",md:"1.25rem",lg:"1.5rem",xl:"1.875rem"},d={xs:"gap-2",sm:"gap-2.5",md:"gap-3",lg:"gap-3.5",xl:"gap-4"},u={xs:"pb-5",sm:"pb-6",md:"pb-7",lg:"pb-8",xl:"pb-10"},x={xs:"pe-5",sm:"pe-6",md:"pe-7",lg:"pe-8",xl:"pe-10"},f={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted",none:""},b={complete:"bg-(--_mp-accent) text-(--_mp-on-accent)",current:"bg-(--_mp-accent) text-(--_mp-on-accent) shadow-[0_0_0_0.25rem_var(--_mp-accent-container)]",upcoming:"border-mp-outline text-mp-on-surface-variant border-2 bg-transparent"},v={complete:"border-(--_mp-accent)",current:"border-mp-outline-variant",upcoming:"border-mp-outline-variant"},h={complete:"text-mp-on-surface",current:"text-(--_mp-accent)",upcoming:"text-mp-on-surface-variant"};export const MPTimelineItem=/*@__PURE__*/t.forwardRef(function({title:n,meta:g,bullet:_,status:N,color:j,connector:y="solid",className:z,style:w,children:$,...C},M){const P=t.useContext(c),{index:B,last:k}=t.useContext(m),A=P?.size??"md",R=P?.orientation??"vertical",T=j??P?.color??"primary",I=P?.active??null,q=N??(null===I?"upcoming":B<I?"complete":B===I?"current":"upcoming"),D="horizontal"===R,E="none"!==y&&!k,F=e("span",{"aria-hidden":"true",className:["rounded-mp-full relative z-10 flex shrink-0 items-center justify-center","size-(--_mp-bullet) text-[calc(var(--_mp-bullet)*0.5)] leading-none font-medium","tabular-nums [&>svg]:size-[0.6em]",b[q],"transition-[background-color,border-color,box-shadow,color]","duration-(--mp-sys-motion-duration-short4)"].join(" "),children:_}),G=E?e("span",{"aria-hidden":"true",className:["pointer-events-none absolute",D?"start-(--_mp-bullet) top-[calc(var(--_mp-bullet)/2_-_1px)] end-0 border-t-2":"top-(--_mp-bullet) start-[calc(var(--_mp-bullet)/2_-_1px)] bottom-0 border-s-2",f[y],v[q]].filter(Boolean).join(" ")}):null,H=r("div",{className:"flex min-w-0 flex-col gap-0.5 "+(D?"mt-2":""),children:[a(n)||a(g)?r("div",{className:"flex flex-wrap items-baseline gap-x-2",children:[a(n)?e("span",{className:`${s[A]} ${h[q]}`,children:n}):null,a(g)?e("span",{className:`text-mp-on-surface-variant ${o}`,children:g}):null]}):null,a($)?e("div",{className:`text-mp-on-surface-variant ${i[A]}`,children:$}):null]});return r("li",{ref:M,"aria-current":"current"===q?"step":void 0,"data-status":q,className:["relative",D?`flex min-w-0 flex-1 flex-col ${k?"":x[A]}`:`flex ${d[A]} ${k?"":u[A]}`,z??""].filter(Boolean).join(" "),style:{"--_mp-bullet":p[A],...l(T),...w},...C,children:[G,F,H]})});export const MPTimeline=/*@__PURE__*/t.forwardRef(function({active:r,size:l="md",color:a="primary",orientation:o="vertical",render:i,className:s,style:p,children:d,...u},x){const f=t.Children.toArray(d),b=f.length,v=t.useMemo(()=>({size:l,orientation:o,color:a,active:r??null}),[l,o,a,r]),h=t.useMemo(()=>Array.from({length:b},(e,r)=>({index:r,last:r===b-1})),[b]),g=n({render:i??e("ol",{}),ref:x,props:{role:"list","data-mp-size":l,className:["mp-timeline flex","horizontal"===o?"flex-row":"flex-col",s??""].filter(Boolean).join(" "),style:p,children:f.map((r,t)=>e(m.Provider,{value:h[t],children:r},t)),...u}});return e(c.Provider,{value:v,children:g})});
@@ -1,2 +1,2 @@
1
- export { MPTimeline, MPTimelineItem } from './MPTimeline';
2
- export type { MPTimelineConnector, MPTimelineItemProps, MPTimelineProps, MPTimelineStatus } from './MPTimeline';
1
+ export { MPTimeline, MPTimelineItem } from './MPTimeline.js';
2
+ export type { MPTimelineConnector, MPTimelineItemProps, MPTimelineProps, MPTimelineStatus } from './MPTimeline.js';
@@ -1 +1 @@
1
- export{MPTimeline,MPTimelineItem}from"./MPTimeline";
1
+ export{MPTimeline,MPTimelineItem}from"./MPTimeline.js";
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Tooltip as BaseUITooltip } from '@base-ui/react/tooltip';
3
- import type { MPAlign, MPColor, MPSide, MPSize } from '../../types';
3
+ import type { MPAlign, MPColor, MPSide, MPSize } from '../../types.js';
4
4
  export interface MPTooltipProps {
5
5
  /**
6
6
  * What the tooltip says.
@@ -1 +1,2 @@
1
- import{jsx as t,jsxs as o}from"react/jsx-runtime";import*as e from"react";import{Tooltip as a}from"@base-ui/react/tooltip";import{accentSlots as i}from"../../internal/accent";export const MPTooltipProvider=a.Provider;const l={xs:"py-0.5",sm:"py-1",md:"py-1",lg:"py-1.5",xl:"py-2"},r={xs:"px-1.5",sm:"px-2",md:"px-2",lg:"px-3",xl:"px-4"},s={xs:"text-mp-body-small",sm:"text-mp-body-small",md:"text-mp-body-small",lg:"text-mp-body-medium",xl:"text-mp-body-medium"},d={xs:6,sm:7,md:8,lg:9,xl:10};export function MPTooltip({content:p,children:n,size:m="sm",color:c,side:x="top",align:y="center",sideOffset:u=6,delay:h,closeDelay:f,arrow:g=!0,open:b,defaultOpen:v,onOpenChange:_,disabled:P=!1,className:O,style:j}){const w=d[m],N=e.useId(),[z,T]=e.useState(v??!1),M=b??z,B={"--_mp-tooltip":c?`var(--_mp-color-${c})`:"var(--_mp-color-inverse-surface)","--_mp-on-tooltip":c?`var(--_mp-color-on-${c})`:"var(--_mp-color-inverse-on-surface)",...c?i(c):null};return o(a.Root,{open:b,defaultOpen:v,onOpenChange:t=>{T(t),_?.(t)},children:[t(a.Trigger,{render:n,delay:h,closeDelay:f,disabled:P,"aria-describedby":M?N:void 0}),t(a.Portal,{children:t(a.Positioner,{className:"mp-portal z-50 outline-none",side:x,align:y,sideOffset:u,children:o(a.Popup,{id:N,role:"tooltip","data-mp-size":m,className:["mp-tooltip rounded-mp-xs max-w-64 outline-none","bg-(--_mp-tooltip) text-(--_mp-on-tooltip)","transition-opacity duration-(--mp-sys-motion-duration-short4)","data-starting-style:opacity-0 data-ending-style:opacity-0","data-instant:duration-0",r[m],l[m],s[m],O??""].filter(Boolean).join(" "),style:{...B,...j},children:[g?t(a.Arrow,{className:["data-[side=top]:bottom-[-1px]","data-[side=bottom]:top-[-1px] data-[side=bottom]:rotate-180","data-[side=left]:right-[-1px] data-[side=left]:-rotate-90","data-[side=right]:left-[-1px] data-[side=right]:rotate-90"].join(" "),children:t("svg",{width:w,height:w/2,viewBox:"0 0 10 5","aria-hidden":"true",className:"block",children:t("path",{d:"M0 0h10L5 5z",fill:"var(--_mp-tooltip)"})})}):null,p]})})})]})}
1
+ "use client";
2
+ import{jsx as t,jsxs as o}from"react/jsx-runtime";import*as e from"react";import{Tooltip as a}from"@base-ui/react/tooltip";import{accentSlots as i}from"../../internal/accent.js";export const MPTooltipProvider=a.Provider;const l={xs:"py-0.5",sm:"py-1",md:"py-1",lg:"py-1.5",xl:"py-2"},s={xs:"px-1.5",sm:"px-2",md:"px-2",lg:"px-3",xl:"px-4"},r={xs:"text-mp-body-small",sm:"text-mp-body-small",md:"text-mp-body-small",lg:"text-mp-body-medium",xl:"text-mp-body-medium"},d={xs:6,sm:7,md:8,lg:9,xl:10};export function MPTooltip({content:p,children:n,size:m="sm",color:c,side:x="top",align:y="center",sideOffset:u=6,delay:h,closeDelay:f,arrow:g=!0,open:b,defaultOpen:v,onOpenChange:_,disabled:P=!1,className:j,style:O}){const w=d[m],N=e.useId(),[z,T]=e.useState(v??!1),M=b??z,B={"--_mp-tooltip":c?`var(--_mp-color-${c})`:"var(--_mp-color-inverse-surface)","--_mp-on-tooltip":c?`var(--_mp-color-on-${c})`:"var(--_mp-color-inverse-on-surface)",...c?i(c):null};return o(a.Root,{open:b,defaultOpen:v,onOpenChange:t=>{T(t),_?.(t)},children:[t(a.Trigger,{render:n,delay:h,closeDelay:f,disabled:P,"aria-describedby":M?N:void 0}),t(a.Portal,{children:t(a.Positioner,{className:"mp-portal z-50 outline-none",side:x,align:y,sideOffset:u,children:o(a.Popup,{id:N,role:"tooltip","data-mp-size":m,className:["mp-tooltip rounded-mp-xs max-w-64 outline-none","bg-(--_mp-tooltip) text-(--_mp-on-tooltip)","transition-opacity duration-(--mp-sys-motion-duration-short4)","data-starting-style:opacity-0 data-ending-style:opacity-0","data-instant:duration-0",s[m],l[m],r[m],j??""].filter(Boolean).join(" "),style:{...B,...O},children:[g?t(a.Arrow,{className:["data-[side=top]:bottom-[-1px]","data-[side=bottom]:top-[-1px] data-[side=bottom]:rotate-180","data-[side=left]:right-[-1px] data-[side=left]:-rotate-90","data-[side=right]:left-[-1px] data-[side=right]:rotate-90"].join(" "),children:t("svg",{width:w,height:w/2,viewBox:"0 0 10 5","aria-hidden":"true",className:"block",children:t("path",{d:"M0 0h10L5 5z",fill:"var(--_mp-tooltip)"})})}):null,p]})})})]})}
@@ -1,2 +1,2 @@
1
- export { MPTooltip, MPTooltipProvider } from './MPTooltip';
2
- export type { MPTooltipProps, MPTooltipProviderProps } from './MPTooltip';
1
+ export { MPTooltip, MPTooltipProvider } from './MPTooltip.js';
2
+ export type { MPTooltipProps, MPTooltipProviderProps } from './MPTooltip.js';
@@ -1 +1 @@
1
- export{MPTooltip,MPTooltipProvider}from"./MPTooltip";
1
+ export{MPTooltip,MPTooltipProvider}from"./MPTooltip.js";
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { MPColor } from '../../types';
3
+ import type { MPColor } from '../../types.js';
4
4
  /**
5
5
  * What a piece of text *is*, which decides both its type scale and the element
6
6
  * it renders as.
@@ -1 +1,2 @@
1
- import*as p from"react";import{useRender as t}from"@base-ui/react/use-render";import{accentSlots as e}from"../../internal/accent";const r={h1:"[&.mp-typography]:text-mp-display-small",h2:"[&.mp-typography]:text-mp-headline-large",h3:"[&.mp-typography]:text-mp-headline-medium",h4:"[&.mp-typography]:text-mp-headline-small",h5:"[&.mp-typography]:text-mp-title-large",h6:"[&.mp-typography]:text-mp-title-medium",lead:"[&.mp-typography]:text-mp-title-large",body:"[&.mp-typography]:text-mp-body-large",caption:"[&.mp-typography]:text-mp-body-small",overline:"[&.mp-typography]:text-mp-label-small [&.mp-typography]:tracking-[0.08em] uppercase"},a={h1:"regular",h2:"regular",h3:"regular",h4:"regular",h5:"regular",h6:"medium",lead:"regular",body:"regular",caption:"regular",overline:"medium"},m={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",lead:"p",body:"p",caption:"span",overline:"span"},o=new Set(["caption","overline"]),y={h1:"[&.mp-typography]:mb-4",h2:"[&.mp-typography]:mb-3.5",h3:"[&.mp-typography]:mb-3",h4:"[&.mp-typography]:mb-2.5",h5:"[&.mp-typography]:mb-2",h6:"[&.mp-typography]:mb-2",lead:"[&.mp-typography]:mb-4",body:"[&.mp-typography]:mb-3",caption:"[&.mp-typography]:mb-2",overline:"[&.mp-typography]:mb-2"},h="[&.mp-typography]:mt-0 [&.mp-typography]:ms-0 [&.mp-typography]:me-0",l={regular:"[&.mp-typography]:font-normal",medium:"[&.mp-typography]:font-medium",semibold:"[&.mp-typography]:font-semibold",bold:"[&.mp-typography]:font-bold"},n={start:"text-start",center:"text-center",end:"text-end",justify:"text-justify"},g={1:"truncate",2:"line-clamp-2",3:"line-clamp-3",4:"line-clamp-4",5:"line-clamp-5",6:"line-clamp-6"};export const MPTypography=/*@__PURE__*/p.forwardRef(function({level:i="body",color:c,weight:d,align:s,lines:u,gutter:b=!1,render:x,className:f,style:v,children:j,...w},N){const k=["mp-typography",r[i],l[d??a[i]],h,b?y[i]:"[&.mp-typography]:mb-0",s?n[s]:"",u?g[u]??"line-clamp-6":"",c?"[&.mp-typography]:text-(--_mp-accent)":o.has(i)?"[&.mp-typography]:text-mp-on-surface-variant":"[&.mp-typography]:text-mp-on-surface",f??""].filter(Boolean).join(" ");return t({render:x??p.createElement(m[i]),ref:N,props:{className:k,style:c?{...e(c),...v}:v,children:j,...w}})});
1
+ "use client";
2
+ import*as p from"react";import{useRender as t}from"@base-ui/react/use-render";import{accentSlots as e}from"../../internal/accent.js";const r={h1:"[&.mp-typography]:text-mp-display-small",h2:"[&.mp-typography]:text-mp-headline-large",h3:"[&.mp-typography]:text-mp-headline-medium",h4:"[&.mp-typography]:text-mp-headline-small",h5:"[&.mp-typography]:text-mp-title-large",h6:"[&.mp-typography]:text-mp-title-medium",lead:"[&.mp-typography]:text-mp-title-large",body:"[&.mp-typography]:text-mp-body-large",caption:"[&.mp-typography]:text-mp-body-small",overline:"[&.mp-typography]:text-mp-label-small [&.mp-typography]:tracking-[0.08em] uppercase"},a={h1:"regular",h2:"regular",h3:"regular",h4:"regular",h5:"regular",h6:"medium",lead:"regular",body:"regular",caption:"regular",overline:"medium"},m={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",lead:"p",body:"p",caption:"span",overline:"span"},o=new Set(["caption","overline"]),y={h1:"[&.mp-typography]:mb-4",h2:"[&.mp-typography]:mb-3.5",h3:"[&.mp-typography]:mb-3",h4:"[&.mp-typography]:mb-2.5",h5:"[&.mp-typography]:mb-2",h6:"[&.mp-typography]:mb-2",lead:"[&.mp-typography]:mb-4",body:"[&.mp-typography]:mb-3",caption:"[&.mp-typography]:mb-2",overline:"[&.mp-typography]:mb-2"},h="[&.mp-typography]:mt-0 [&.mp-typography]:ms-0 [&.mp-typography]:me-0",l={regular:"[&.mp-typography]:font-normal",medium:"[&.mp-typography]:font-medium",semibold:"[&.mp-typography]:font-semibold",bold:"[&.mp-typography]:font-bold"},n={start:"text-start",center:"text-center",end:"text-end",justify:"text-justify"},g={1:"truncate",2:"line-clamp-2",3:"line-clamp-3",4:"line-clamp-4",5:"line-clamp-5",6:"line-clamp-6"};export const MPTypography=/*@__PURE__*/p.forwardRef(function({level:i="body",color:c,weight:d,align:s,lines:u,gutter:b=!1,render:x,className:f,style:v,children:j,...w},N){const k=["mp-typography",r[i],l[d??a[i]],h,b?y[i]:"[&.mp-typography]:mb-0",s?n[s]:"",u?g[u]??"line-clamp-6":"",c?"[&.mp-typography]:text-(--_mp-accent)":o.has(i)?"[&.mp-typography]:text-mp-on-surface-variant":"[&.mp-typography]:text-mp-on-surface",f??""].filter(Boolean).join(" ");return t({render:x??p.createElement(m[i]),ref:N,props:{className:k,style:c?{...e(c),...v}:v,children:j,...w}})});
@@ -1,2 +1,2 @@
1
- export { MPTypography } from './MPTypography';
2
- export type { MPTypographyAlign, MPTypographyLevel, MPTypographyProps, MPTypographyWeight } from './MPTypography';
1
+ export { MPTypography } from './MPTypography.js';
2
+ export type { MPTypographyAlign, MPTypographyLevel, MPTypographyProps, MPTypographyWeight } from './MPTypography.js';
@@ -1 +1 @@
1
- export{MPTypography}from"./MPTypography";
1
+ export{MPTypography}from"./MPTypography.js";
@@ -0,0 +1,62 @@
1
+ /** The glyph a password field shows while the password is legible. */
2
+ export declare const VisibilityIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
3
+ /** The glyph a password field shows while the password is masked. */
4
+ export declare const VisibilityOffIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
5
+ /** Dismiss: a chip, a dialog, an alert. */
6
+ export declare const CloseIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
7
+ /** A ticked option, a completed step. */
8
+ export declare const CheckIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
9
+ /** Disclosure, pointing down. */
10
+ export declare const ChevronDownIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
11
+ /** Disclosure, pointing up. */
12
+ export declare const ChevronUpIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
13
+ /** Previous, in a pager or a carousel. */
14
+ export declare const ChevronLeftIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
15
+ /** Next, in a pager or a carousel. */
16
+ export declare const ChevronRightIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
17
+ /** First, in a pager: the stepper that jumps to an end rather than by one. */
18
+ export declare const ChevronsLeftIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
19
+ /** And last. */
20
+ export declare const ChevronsRightIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
21
+ /** Search, for a field's leading adornment. */
22
+ export declare const SearchIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
23
+ /** Sorted ascending: the arrow a table's sorted column carries. */
24
+ export declare const ArrowUpIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
25
+ /** Sorted descending. */
26
+ export declare const ArrowDownIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
27
+ /** And then: the mark a breadcrumb can put between two steps. */
28
+ export declare const ArrowRightIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
29
+ /** The trail a breadcrumb hides behind, and any other "there is more here". */
30
+ export declare const MoreIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
31
+ /** A link that goes somewhere on this site. */
32
+ export declare const LinkIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
33
+ /** A link that takes over the window. */
34
+ export declare const ExternalLinkIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
35
+ /** Copy to clipboard. */
36
+ export declare const CopyIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
37
+ /** Severity: something worth knowing. */
38
+ export declare const InfoIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
39
+ /** Severity: it worked. */
40
+ export declare const SuccessIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
41
+ /** Severity: proceed carefully. */
42
+ export declare const WarningIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
43
+ /** Severity: it did not work. */
44
+ export declare const ErrorIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
45
+ /** One step up: a number field's increment. */
46
+ export declare const AddIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
47
+ /** One step down: a number field's decrement, and a half-ticked checkbox. */
48
+ export declare const RemoveIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
49
+ /** Send a file the other way. A file picker's dropzone. */
50
+ export declare const UploadIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
51
+ /** A day on a calendar: what a date picker's trigger wears. */
52
+ export declare const CalendarIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
53
+ /** A time of day: what a time picker's trigger wears. */
54
+ export declare const ClockIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
55
+ /**
56
+ * A score. Drawn as an outline, and filled by whatever is scoring with it —
57
+ * lucide draws it `fill="none"`, and `MPRating` overlays a copy in `fill-current`
58
+ * rather than shipping a second glyph.
59
+ */
60
+ export declare const StarIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
61
+ /** Work in progress, spun by whatever is waiting on it. */
62
+ export declare const SpinnerIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{ArrowDown as o,ArrowRight as n,ArrowUp as t,CalendarDays as c,Check as r,ChevronDown as e,ChevronLeft as s,ChevronRight as p,ChevronsLeft as x,ChevronsRight as I,ChevronUp as i,CircleAlert as h,CircleCheck as C,Clock as a,Copy as l,Ellipsis as v,ExternalLink as f,Eye as d,EyeOff as w,Info as g,Link as k,LoaderCircle as A,Minus as L,Plus as R,Search as S,Star as m,TriangleAlert as y,Upload as U,X as b}from"lucide-react";export const VisibilityIcon=d;export const VisibilityOffIcon=w;export const CloseIcon=b;export const CheckIcon=r;export const ChevronDownIcon=e;export const ChevronUpIcon=i;export const ChevronLeftIcon=s;export const ChevronRightIcon=p;export const ChevronsLeftIcon=x;export const ChevronsRightIcon=I;export const SearchIcon=S;export const ArrowUpIcon=t;export const ArrowDownIcon=o;export const ArrowRightIcon=n;export const MoreIcon=v;export const LinkIcon=k;export const ExternalLinkIcon=f;export const CopyIcon=l;export const InfoIcon=g;export const SuccessIcon=C;export const WarningIcon=y;export const ErrorIcon=h;export const AddIcon=R;export const RemoveIcon=L;export const UploadIcon=U;export const CalendarIcon=c;export const ClockIcon=a;export const StarIcon=m;export const SpinnerIcon=A;
@@ -1,65 +1,36 @@
1
- /** The glyph a password field shows while the password is legible. */
2
- export declare const VisibilityIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
3
- /** The glyph a password field shows while the password is masked. */
4
- export declare const VisibilityOffIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
5
- /** Dismiss: a chip, a dialog, an alert. */
6
- export declare const CloseIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
7
- /** A ticked option, a completed step. */
8
- export declare const CheckIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
9
- /** Disclosure, pointing down. */
10
- export declare const ChevronDownIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
11
- /** Disclosure, pointing up. */
12
- export declare const ChevronUpIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
13
- /** Previous, in a pager or a carousel. */
14
- export declare const ChevronLeftIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
15
- /** Next, in a pager or a carousel. */
16
- export declare const ChevronRightIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
17
- /** First, in a pager: the stepper that jumps to an end rather than by one. */
18
- export declare const ChevronsLeftIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
19
- /** And last. */
20
- export declare const ChevronsRightIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
21
- /** Search, for a field's leading adornment. */
22
- export declare const SearchIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
23
- /** Sorted ascending: the arrow a table's sorted column carries. */
24
- export declare const ArrowUpIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
25
- /** Sorted descending. */
26
- export declare const ArrowDownIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
27
- /** And then: the mark a breadcrumb can put between two steps. */
28
- export declare const ArrowRightIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
29
- /** The trail a breadcrumb hides behind, and any other "there is more here". */
30
- export declare const MoreIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
31
- /** A link that goes somewhere on this site. */
32
- export declare const LinkIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
33
- /** A link that takes over the window. */
34
- export declare const ExternalLinkIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
35
- /** Copy to clipboard. */
36
- export declare const CopyIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
37
- /** Severity: something worth knowing. */
38
- export declare const InfoIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
39
- /** Severity: it worked. */
40
- export declare const SuccessIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
41
- /** Severity: proceed carefully. */
42
- export declare const WarningIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
43
- /** Severity: it did not work. */
44
- export declare const ErrorIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
45
- /** One step up: a number field's increment. */
46
- export declare const AddIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
47
- /** One step down: a number field's decrement, and a half-ticked checkbox. */
48
- export declare const RemoveIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
49
- /** Send a file the other way. A file picker's dropzone. */
50
- export declare const UploadIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
51
- /** A day on a calendar: what a date picker's trigger wears. */
52
- export declare const CalendarIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
53
- /** A time of day: what a time picker's trigger wears. */
54
- export declare const ClockIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
55
1
  /**
56
- * A score. Drawn as an outline, and filled by whatever is scoring with it —
57
- * lucide draws it `fill="none"`, and `MPRating` overlays a copy in `fill-current`
58
- * rather than shipping a second glyph.
2
+ * The glyphs, and the table that names them.
3
+ *
4
+ * The glyphs themselves are `constants/glyphs.ts` and are re-exported from here
5
+ * unchanged — this is the file everything imports, components included, and
6
+ * `material-plus-ui/constants/icons` is still the path a caller writes.
7
+ *
8
+ * ## Two ways out of this file, and why
9
+ *
10
+ * - **The named exports** (`VisibilityIcon`, …) are what the library's own
11
+ * components import. A named import of one export lets a bundler drop every
12
+ * other binding, so a project that only uses `MPTextField` ships two glyphs
13
+ * rather than all of them.
14
+ * - **`ICONS`** is the same set as a lookup table, for an application that wants
15
+ * a name-keyed registry of its own — `<MPIcon icon={ICONS.close} />`. An
16
+ * object literal cannot be tree-shaken property by property, so importing it
17
+ * pulls in every glyph listed below. That is the trade it exists to make, and
18
+ * it is why the components never reach for it.
19
+ *
20
+ * ## Why the table is here and the glyphs are next door
21
+ *
22
+ * Because this module has to stay server-side and that one cannot. `ICONS` is
23
+ * read with a property access — `ICONS.check` — and a server component cannot
24
+ * read a property off a client module's namespace; it gets `undefined` and
25
+ * React reports an invalid element type. Held here, in a module with no
26
+ * directive on it, the table is a plain object whose values are the client
27
+ * references `constants/glyphs.ts` produces: a server component reads one out
28
+ * and passes it to `MPIcon` exactly as it would pass `CheckIcon`.
29
+ *
30
+ * Both halves therefore work from a server component, which is not something
31
+ * either arrangement managed on its own. See `scripts/mark-client.mjs`.
59
32
  */
60
- export declare const StarIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
61
- /** Work in progress, spun by whatever is waiting on it. */
62
- export declare const SpinnerIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
33
+ export * from './glyphs.js';
63
34
  /**
64
35
  * The same glyphs, keyed by role.
65
36
  *
@@ -1 +1 @@
1
- import{ArrowDown as o,ArrowRight as n,ArrowUp as c,CalendarDays as r,Check as t,ChevronDown as e,ChevronLeft as I,ChevronRight as s,ChevronsLeft as i,ChevronsRight as p,ChevronUp as h,CircleAlert as x,CircleCheck as a,Clock as l,Copy as v,Ellipsis as C,ExternalLink as f,Eye as w,EyeOff as d,Info as g,Link as k,LoaderCircle as y,Minus as S,Plus as A,Search as L,Star as R,TriangleAlert as u,Upload as b,X as m}from"lucide-react";export const VisibilityIcon=w;export const VisibilityOffIcon=d;export const CloseIcon=m;export const CheckIcon=t;export const ChevronDownIcon=e;export const ChevronUpIcon=h;export const ChevronLeftIcon=I;export const ChevronRightIcon=s;export const ChevronsLeftIcon=i;export const ChevronsRightIcon=p;export const SearchIcon=L;export const ArrowUpIcon=c;export const ArrowDownIcon=o;export const ArrowRightIcon=n;export const MoreIcon=C;export const LinkIcon=k;export const ExternalLinkIcon=f;export const CopyIcon=v;export const InfoIcon=g;export const SuccessIcon=a;export const WarningIcon=u;export const ErrorIcon=x;export const AddIcon=A;export const RemoveIcon=S;export const UploadIcon=b;export const CalendarIcon=r;export const ClockIcon=l;export const StarIcon=R;export const SpinnerIcon=y;export const ICONS={visibility:VisibilityIcon,"visibility-off":VisibilityOffIcon,close:CloseIcon,check:CheckIcon,"chevron-down":ChevronDownIcon,"chevron-up":ChevronUpIcon,"chevron-left":ChevronLeftIcon,"chevron-right":ChevronRightIcon,"chevrons-left":ChevronsLeftIcon,"chevrons-right":ChevronsRightIcon,search:SearchIcon,"arrow-up":ArrowUpIcon,"arrow-down":ArrowDownIcon,"arrow-right":ArrowRightIcon,more:MoreIcon,link:LinkIcon,"external-link":ExternalLinkIcon,copy:CopyIcon,info:InfoIcon,success:SuccessIcon,warning:WarningIcon,error:ErrorIcon,add:AddIcon,remove:RemoveIcon,upload:UploadIcon,calendar:CalendarIcon,clock:ClockIcon,star:StarIcon,spinner:SpinnerIcon};
1
+ export*from"./glyphs.js";import{VisibilityIcon as r,VisibilityOffIcon as o,CloseIcon as e,CheckIcon as n,ChevronDownIcon as c,ChevronUpIcon as i,ChevronLeftIcon as s,ChevronRightIcon as h,ChevronsLeftIcon as l,ChevronsRightIcon as t,SearchIcon as a,ArrowUpIcon as p,ArrowDownIcon as v,ArrowRightIcon as f,MoreIcon as d,LinkIcon as g,ExternalLinkIcon as w,CopyIcon as m,InfoIcon as y,SuccessIcon as k,WarningIcon as u,ErrorIcon as x,AddIcon as b,RemoveIcon as j,UploadIcon as C,CalendarIcon as I,ClockIcon as N,StarIcon as O,SpinnerIcon as S}from"./glyphs.js";export const ICONS={visibility:r,"visibility-off":o,close:e,check:n,"chevron-down":c,"chevron-up":i,"chevron-left":s,"chevron-right":h,"chevrons-left":l,"chevrons-right":t,search:a,"arrow-up":p,"arrow-down":v,"arrow-right":f,more:d,link:g,"external-link":w,copy:m,info:y,success:k,warning:u,error:x,add:b,remove:j,upload:C,calendar:I,clock:N,star:O,spinner:S};
package/dist/index.d.ts CHANGED
@@ -1,78 +1,78 @@
1
- export * from './types';
2
- export { registerMPMessages, type MPLocale, type MPMessages, type MPPartialMessages } from './internal/i18n';
3
- export * from './constants/icons';
4
- export * from './components/accordion';
5
- export * from './components/alert';
6
- export * from './components/animate-appear';
7
- export * from './components/animate-blink';
8
- export * from './components/animate-fade';
9
- export * from './components/animate-grow';
10
- export * from './components/animate-headline';
11
- export * from './components/animate-lighting';
12
- export * from './components/animate-marquee';
13
- export * from './components/animate-rotate';
14
- export * from './components/animate-slide';
15
- export * from './components/animate-typing';
16
- export * from './components/animate-zoom';
17
- export * from './components/aspect-ratio';
18
- export * from './components/avatar';
19
- export * from './components/badge';
20
- export * from './components/blockquote';
21
- export * from './components/bottom-navigation';
22
- export * from './components/box';
23
- export * from './components/breadcrumb';
24
- export * from './components/button';
25
- export * from './components/button-group';
26
- export * from './components/card';
27
- export * from './components/carousel';
28
- export * from './components/chat-bubble';
29
- export * from './components/checkbox';
30
- export * from './components/chip';
31
- export * from './components/collapsible';
32
- export * from './components/color-picker';
33
- export * from './components/combobox';
34
- export * from './components/container';
35
- export * from './components/date-picker';
36
- export * from './components/date-range-picker';
37
- export * from './components/date-time-picker';
38
- export * from './components/dialog';
39
- export * from './components/divider';
40
- export * from './components/drawer';
41
- export * from './components/empty';
42
- export * from './components/file-picker';
43
- export * from './components/floating-action-button';
44
- export * from './components/grid';
45
- export * from './components/highlight';
46
- export * from './components/icon';
47
- export * from './components/icon-button';
48
- export * from './components/list';
49
- export * from './components/locale';
50
- export * from './components/menu';
51
- export * from './components/number-field';
52
- export * from './components/otp-field';
53
- export * from './components/overlay';
54
- export * from './components/pagination';
55
- export * from './components/panes';
56
- export * from './components/pill';
57
- export * from './components/popover';
58
- export * from './components/progress-box';
59
- export * from './components/progress-circular';
60
- export * from './components/progress-linear';
61
- export * from './components/radio-group';
62
- export * from './components/rating';
63
- export * from './components/segmented-button';
64
- export * from './components/select';
65
- export * from './components/shortcut';
66
- export * from './components/skeleton';
67
- export * from './components/slider';
68
- export * from './components/snackbar';
69
- export * from './components/spoiler';
70
- export * from './components/switch';
71
- export * from './components/table';
72
- export * from './components/tabs';
73
- export * from './components/text-field';
74
- export * from './components/text-link';
75
- export * from './components/time-picker';
76
- export * from './components/timeline';
77
- export * from './components/tooltip';
78
- export * from './components/typography';
1
+ export * from './types.js';
2
+ export { registerMPMessages, type MPLocale, type MPMessages, type MPPartialMessages } from './internal/i18n.js';
3
+ export * from './constants/icons.js';
4
+ export * from './components/accordion/index.js';
5
+ export * from './components/alert/index.js';
6
+ export * from './components/animate-appear/index.js';
7
+ export * from './components/animate-blink/index.js';
8
+ export * from './components/animate-fade/index.js';
9
+ export * from './components/animate-grow/index.js';
10
+ export * from './components/animate-headline/index.js';
11
+ export * from './components/animate-lighting/index.js';
12
+ export * from './components/animate-marquee/index.js';
13
+ export * from './components/animate-rotate/index.js';
14
+ export * from './components/animate-slide/index.js';
15
+ export * from './components/animate-typing/index.js';
16
+ export * from './components/animate-zoom/index.js';
17
+ export * from './components/aspect-ratio/index.js';
18
+ export * from './components/avatar/index.js';
19
+ export * from './components/badge/index.js';
20
+ export * from './components/blockquote/index.js';
21
+ export * from './components/bottom-navigation/index.js';
22
+ export * from './components/box/index.js';
23
+ export * from './components/breadcrumb/index.js';
24
+ export * from './components/button/index.js';
25
+ export * from './components/button-group/index.js';
26
+ export * from './components/card/index.js';
27
+ export * from './components/carousel/index.js';
28
+ export * from './components/chat-bubble/index.js';
29
+ export * from './components/checkbox/index.js';
30
+ export * from './components/chip/index.js';
31
+ export * from './components/collapsible/index.js';
32
+ export * from './components/color-picker/index.js';
33
+ export * from './components/combobox/index.js';
34
+ export * from './components/container/index.js';
35
+ export * from './components/date-picker/index.js';
36
+ export * from './components/date-range-picker/index.js';
37
+ export * from './components/date-time-picker/index.js';
38
+ export * from './components/dialog/index.js';
39
+ export * from './components/divider/index.js';
40
+ export * from './components/drawer/index.js';
41
+ export * from './components/empty/index.js';
42
+ export * from './components/file-picker/index.js';
43
+ export * from './components/floating-action-button/index.js';
44
+ export * from './components/grid/index.js';
45
+ export * from './components/highlight/index.js';
46
+ export * from './components/icon/index.js';
47
+ export * from './components/icon-button/index.js';
48
+ export * from './components/list/index.js';
49
+ export * from './components/locale/index.js';
50
+ export * from './components/menu/index.js';
51
+ export * from './components/number-field/index.js';
52
+ export * from './components/otp-field/index.js';
53
+ export * from './components/overlay/index.js';
54
+ export * from './components/pagination/index.js';
55
+ export * from './components/panes/index.js';
56
+ export * from './components/pill/index.js';
57
+ export * from './components/popover/index.js';
58
+ export * from './components/progress-box/index.js';
59
+ export * from './components/progress-circular/index.js';
60
+ export * from './components/progress-linear/index.js';
61
+ export * from './components/radio-group/index.js';
62
+ export * from './components/rating/index.js';
63
+ export * from './components/segmented-button/index.js';
64
+ export * from './components/select/index.js';
65
+ export * from './components/shortcut/index.js';
66
+ export * from './components/skeleton/index.js';
67
+ export * from './components/slider/index.js';
68
+ export * from './components/snackbar/index.js';
69
+ export * from './components/spoiler/index.js';
70
+ export * from './components/switch/index.js';
71
+ export * from './components/table/index.js';
72
+ export * from './components/tabs/index.js';
73
+ export * from './components/text-field/index.js';
74
+ export * from './components/text-link/index.js';
75
+ export * from './components/time-picker/index.js';
76
+ export * from './components/timeline/index.js';
77
+ export * from './components/tooltip/index.js';
78
+ export * from './components/typography/index.js';
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export*from"./types";export{registerMPMessages}from"./internal/i18n";export*from"./constants/icons";export*from"./components/accordion";export*from"./components/alert";export*from"./components/animate-appear";export*from"./components/animate-blink";export*from"./components/animate-fade";export*from"./components/animate-grow";export*from"./components/animate-headline";export*from"./components/animate-lighting";export*from"./components/animate-marquee";export*from"./components/animate-rotate";export*from"./components/animate-slide";export*from"./components/animate-typing";export*from"./components/animate-zoom";export*from"./components/aspect-ratio";export*from"./components/avatar";export*from"./components/badge";export*from"./components/blockquote";export*from"./components/bottom-navigation";export*from"./components/box";export*from"./components/breadcrumb";export*from"./components/button";export*from"./components/button-group";export*from"./components/card";export*from"./components/carousel";export*from"./components/chat-bubble";export*from"./components/checkbox";export*from"./components/chip";export*from"./components/collapsible";export*from"./components/color-picker";export*from"./components/combobox";export*from"./components/container";export*from"./components/date-picker";export*from"./components/date-range-picker";export*from"./components/date-time-picker";export*from"./components/dialog";export*from"./components/divider";export*from"./components/drawer";export*from"./components/empty";export*from"./components/file-picker";export*from"./components/floating-action-button";export*from"./components/grid";export*from"./components/highlight";export*from"./components/icon";export*from"./components/icon-button";export*from"./components/list";export*from"./components/locale";export*from"./components/menu";export*from"./components/number-field";export*from"./components/otp-field";export*from"./components/overlay";export*from"./components/pagination";export*from"./components/panes";export*from"./components/pill";export*from"./components/popover";export*from"./components/progress-box";export*from"./components/progress-circular";export*from"./components/progress-linear";export*from"./components/radio-group";export*from"./components/rating";export*from"./components/segmented-button";export*from"./components/select";export*from"./components/shortcut";export*from"./components/skeleton";export*from"./components/slider";export*from"./components/snackbar";export*from"./components/spoiler";export*from"./components/switch";export*from"./components/table";export*from"./components/tabs";export*from"./components/text-field";export*from"./components/text-link";export*from"./components/time-picker";export*from"./components/timeline";export*from"./components/tooltip";export*from"./components/typography";
1
+ export*from"./types.js";export{registerMPMessages}from"./internal/i18n.js";export*from"./constants/icons.js";export*from"./components/accordion/index.js";export*from"./components/alert/index.js";export*from"./components/animate-appear/index.js";export*from"./components/animate-blink/index.js";export*from"./components/animate-fade/index.js";export*from"./components/animate-grow/index.js";export*from"./components/animate-headline/index.js";export*from"./components/animate-lighting/index.js";export*from"./components/animate-marquee/index.js";export*from"./components/animate-rotate/index.js";export*from"./components/animate-slide/index.js";export*from"./components/animate-typing/index.js";export*from"./components/animate-zoom/index.js";export*from"./components/aspect-ratio/index.js";export*from"./components/avatar/index.js";export*from"./components/badge/index.js";export*from"./components/blockquote/index.js";export*from"./components/bottom-navigation/index.js";export*from"./components/box/index.js";export*from"./components/breadcrumb/index.js";export*from"./components/button/index.js";export*from"./components/button-group/index.js";export*from"./components/card/index.js";export*from"./components/carousel/index.js";export*from"./components/chat-bubble/index.js";export*from"./components/checkbox/index.js";export*from"./components/chip/index.js";export*from"./components/collapsible/index.js";export*from"./components/color-picker/index.js";export*from"./components/combobox/index.js";export*from"./components/container/index.js";export*from"./components/date-picker/index.js";export*from"./components/date-range-picker/index.js";export*from"./components/date-time-picker/index.js";export*from"./components/dialog/index.js";export*from"./components/divider/index.js";export*from"./components/drawer/index.js";export*from"./components/empty/index.js";export*from"./components/file-picker/index.js";export*from"./components/floating-action-button/index.js";export*from"./components/grid/index.js";export*from"./components/highlight/index.js";export*from"./components/icon/index.js";export*from"./components/icon-button/index.js";export*from"./components/list/index.js";export*from"./components/locale/index.js";export*from"./components/menu/index.js";export*from"./components/number-field/index.js";export*from"./components/otp-field/index.js";export*from"./components/overlay/index.js";export*from"./components/pagination/index.js";export*from"./components/panes/index.js";export*from"./components/pill/index.js";export*from"./components/popover/index.js";export*from"./components/progress-box/index.js";export*from"./components/progress-circular/index.js";export*from"./components/progress-linear/index.js";export*from"./components/radio-group/index.js";export*from"./components/rating/index.js";export*from"./components/segmented-button/index.js";export*from"./components/select/index.js";export*from"./components/shortcut/index.js";export*from"./components/skeleton/index.js";export*from"./components/slider/index.js";export*from"./components/snackbar/index.js";export*from"./components/spoiler/index.js";export*from"./components/switch/index.js";export*from"./components/table/index.js";export*from"./components/tabs/index.js";export*from"./components/text-field/index.js";export*from"./components/text-link/index.js";export*from"./components/time-picker/index.js";export*from"./components/timeline/index.js";export*from"./components/tooltip/index.js";export*from"./components/typography/index.js";
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import { type MPTimeUnit } from './date';
3
- import type { MPMessages } from './i18n';
4
- import type { MPColor, MPSize, MPWeekday } from '../types';
2
+ import { type MPTimeUnit } from './date.js';
3
+ import type { MPMessages } from './i18n.js';
4
+ import type { MPColor, MPSize, MPWeekday } from '../types.js';
5
5
  /**
6
6
  * The calendar grid and the clock columns, written once for the four pickers.
7
7
  *
@@ -1 +1,2 @@
1
- import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import*as n from"react";import{MPButton as r}from"../components/button/MPButton";import{MPIcon as l}from"../components/icon/MPIcon";import{MPIconButton as a}from"../components/icon-button/MPIconButton";import{ChevronDownIcon as s,ChevronLeftIcon as c,ChevronRightIcon as i}from"../constants/icons";import{MPStateLayer as u}from"./StateLayer";import{CONTROL_ICON as m,META_TEXT as d,PROSE_TEXT as h}from"./scale";import{VISUALLY_HIDDEN as p}from"./visually-hidden";import{addDays as f,addMonths as g,addYears as v,calendarWeeks as y,compareDay as w,dateFormatter as x,daysInMonth as b,isDayOutside as D,isMonthBeforeYear as S,isSameDay as N,isSameMonth as M,isValidDate as P,makeDate as _,meridiemLabels as C,monthLabels as k,startOfDay as z,startOfMonth as F,today as Y,weekdayLabels as A,withTime as E,YEAR_PAGE_SIZE as j,yearPageStart as B}from"./date";const R={xs:"1.75rem",sm:"2rem",md:"2.5rem",lg:"2.75rem",xl:"3rem"},T={xs:"xs",sm:"xs",md:"sm",lg:"sm",xl:"md"},$=["group relative flex cursor-pointer items-center justify-center overflow-hidden","box-border appearance-none bg-transparent font-[inherit] tabular-nums select-none","transition-[background-color,border-color,color]","duration-(--mp-sys-motion-duration-short4)","outline-mp-secondary focus-visible:z-10 focus-visible:outline-2","focus-visible:outline-offset-[-2px] focus-visible:outline-solid outline-none"].join(" ");function H({children:t,label:n,selected:r,inRange:l=!1,rangeEdge:a=null,current:s=!1,muted:c=!1,disabled:i=!1,focused:m=!1,className:d,onClick:h,onPointerEnter:p,onKeyDown:f}){return o("button",{type:"button",role:"gridcell","aria-label":n,"aria-selected":r,"aria-current":s?"date":void 0,"aria-disabled":i||void 0,tabIndex:m?0:-1,"data-focus-target":m?"true":void 0,className:[$,"start"===a?"rounded-s-mp-full":"end"===a?"rounded-e-mp-full":"middle"===a?"rounded-none":"rounded-mp-full",i?"cursor-default text-mp-on-surface/38":r?"bg-(--_mp-accent) text-(--_mp-on-accent)":l?"bg-(--_mp-accent-container) text-(--_mp-on-accent-container)":s?"border border-(--_mp-accent) text-(--_mp-accent)":c?"text-mp-on-surface-variant":"text-mp-on-surface",d??""].filter(Boolean).join(" "),onClick:()=>{i||h()},onPointerEnter:p,onKeyDown:f,children:[i?null:e(u,{}),t]})}function K({size:n,color:u,view:d,month:p,locale:f,labels:g,showPreviousButton:v,showNextButton:y,onStep:w,onViewChange:x}){const b=k(f,"long")[p.getMonth()],D=String(p.getFullYear()),N=S(f),M=T[n],P="day"===d?[g.previousMonth,g.nextMonth]:"month"===d?[g.previousYear,g.nextYear]:[g.previousYears,g.nextYears],_=(o,t)=>t?e(a,{size:M,color:u,label:P[-1===o?0:1],icon:e(l,{icon:-1===o?c:i,size:m[M],className:"rtl:rotate-180"}),onClick:()=>w(o)}):e("span",{"aria-hidden":"true",className:"size-(--_mp-cell)"}),C=o=>e(l,{icon:s,size:m[M],className:["transition-transform duration-(--mp-sys-motion-duration-short4)",o?"rotate-180":""].filter(Boolean).join(" ")}),z=e(r,{variant:"text",size:M,color:u,"aria-label":g.chooseMonth,"aria-expanded":"month"===d,endIcon:C("month"===d),onClick:()=>x("month"===d?"day":"month"),children:b},"month"),F=e(r,{variant:"text",size:M,color:u,className:"tabular-nums","aria-label":g.chooseYear,"aria-expanded":"year"===d,endIcon:C("year"===d),onClick:()=>x("year"===d?"day":"year"),children:D},"year"),Y=B(p.getFullYear());return o("div",{className:"flex items-center justify-between gap-1",children:[_(-1,v),e("div",{className:"flex min-w-0 flex-1 items-center justify-center gap-1",children:"year"===d?e("span",{className:`text-mp-on-surface flex h-(--_mp-cell) items-center tabular-nums ${h[n]}`,children:`${Y}–${Y+j-1}`}):"month"===d?F:o(t,N?{children:[z,F]}:{children:[F,z]})}),_(1,y)]})}export function MPCalendar({size:t,color:r,locale:l,weekStartsOn:a,month:s,onMonthChange:c,selected:i,rangeStart:u=null,rangeEnd:m=null,onSelect:d,onPreviewChange:h,minDate:p,maxDate:f,shouldDisableDate:y,showOutsideDays:w=!0,autoFocus:x=!1,showPreviousButton:b=!0,showNextButton:S=!0,labels:N}){const[C,k]=n.useState("day"),A=n.useMemo(()=>i.filter(P),[i]),[E,B]=n.useState(()=>{const e=A.find(e=>M(e,s));return e?z(e):M(Y(),s)?Y():F(s)}),T=n.useRef(x),$=n.useRef(null);n.useEffect(()=>{B(e=>M(e,s)?e:F(s))},[s]),n.useLayoutEffect(()=>{T.current&&(T.current=!1,$.current?.querySelector('[data-focus-target="true"]')?.focus({preventScroll:!0}))});const H=n.useCallback(e=>D(e,p,f)||(y?.(e)??!1),[p,f,y]),q=e=>{T.current=!0,k(e)},I=e=>{T.current=!0,c(e)};return o("div",{ref:$,className:"mp-calendar flex flex-col gap-1",style:{"--_mp-cell":R[t]},onPointerLeave:()=>h?.(null),children:[e(K,{size:t,color:r,view:C,month:s,locale:l,labels:N,showPreviousButton:b,showNextButton:S,onStep:e=>{c("day"===C?g(s,e):v(s,"month"===C?e:e*j))},onViewChange:q}),e("div",{className:"h-[calc(var(--_mp-cell)*7)] w-[calc(var(--_mp-cell)*7)]",children:"day"===C?e(L,{size:t,locale:l,weekStartsOn:a,month:s,chosen:A,rangeStart:u,rangeEnd:m,focusedDate:E,showOutsideDays:w,isDisabled:H,onSelect:e=>{B(e),d(e)},onPreviewChange:h,onMoveFocus:e=>{T.current=!0,B(e),M(e,s)||c(F(e))}}):"month"===C?e(O,{size:t,locale:l,month:s,chosen:A,minDate:p,maxDate:f,onMoveCursor:I,onPick:e=>{c(_(s.getFullYear(),e,1)),q("day")}}):e(U,{size:t,month:s,chosen:A,minDate:p,maxDate:f,onMoveCursor:I,onPick:e=>{c(_(e,s.getMonth(),1)),q("month")}})})]})}function L({size:t,locale:r,weekStartsOn:l,month:a,chosen:s,rangeStart:c,rangeEnd:i,focusedDate:u,showOutsideDays:m,isDisabled:p,onSelect:v,onPreviewChange:b,onMoveFocus:D}){const S=A(r,l,"narrow"),_=A(r,l,"long"),C=(z=i,P(k=c)&&P(z)?w(k,z)<=0?[k,z]:[z,k]:null);var k,z;const F=Y(),E=n.useMemo(()=>{const e=x(r,{dateStyle:"full"});return y(a,l).map(o=>o.map(o=>({date:o,label:e.format(o)})))},[a,l,r]),j=n.useRef(null),B=n.useRef(a);n.useLayoutEffect(()=>{const e=j.current,o=B.current;if(B.current=a,!e||M(o,a))return;const t=o.getTime()<a.getTime(),n="rtl"===getComputedStyle(e).direction;e.style.setProperty("--_mp-calendar-from",String(t===n?-1:1)),e.dataset.mpPaged="true",e.style.animationName="none",e.offsetWidth,e.style.animationName=""},[a]);return o("div",{role:"grid","aria-label":x(r,{year:"numeric",month:"long"}).format(a),className:"flex h-full flex-col",children:[e("div",{role:"rowgroup",children:e("div",{role:"row",className:"grid grid-cols-7",children:S.map((o,t)=>e("span",{role:"columnheader","aria-label":_[t],className:`text-mp-on-surface-variant flex h-(--_mp-cell) items-center justify-center select-none ${d}`,children:o},t))})}),e("div",{ref:j,role:"rowgroup",className:"mp-calendar__page flex flex-1 flex-col",children:E.map((o,n)=>e("div",{role:"row",className:"grid grid-cols-7",children:o.map(({date:o,label:n})=>{const r=!M(o,a);if(r&&!m)return e("span",{role:"gridcell","aria-hidden":"true",className:"size-(--_mp-cell)"},o.getTime());const c=s.some(e=>N(e,o)),i=null!==C&&w(o,C[0])>=0&&w(o,C[1])<=0,d=null!==C&&i&&N(o,C[0]),y=null!==C&&i&&N(o,C[1]);return e(H,{label:n,selected:c,inRange:i&&!c,rangeEdge:i?d&&y?"both":d?"start":y?"end":"middle":null,current:N(o,F)&&!c,muted:r,disabled:p(o),focused:N(o,u),className:`size-(--_mp-cell) ${h[t]}`,onClick:()=>v(o),onPointerEnter:()=>b?.(o),onKeyDown:e=>((e,o)=>{const t=(o.getDay()-l+7)%7,n={ArrowLeft:()=>f(o,-1),ArrowRight:()=>f(o,1),ArrowUp:()=>f(o,-7),ArrowDown:()=>f(o,7),Home:()=>f(o,-t),End:()=>f(o,6-t),PageUp:()=>g(o,e.shiftKey?-12:-1),PageDown:()=>g(o,e.shiftKey?12:1)}[e.key];n&&(e.preventDefault(),D(n()))})(e,o),children:o.getDate()},o.getTime())})},n))})]})}function O({size:o,locale:t,month:n,chosen:r,minDate:l,maxDate:a,onMoveCursor:s,onPick:c}){const i=k(t,"short"),u=k(t,"long"),m=n.getFullYear(),d=new Date,p=e=>{const o={ArrowLeft:-1,ArrowRight:1,ArrowUp:-3,ArrowDown:3,PageUp:-12,PageDown:12}[e.key];void 0!==o&&(e.preventDefault(),s(g(F(n),o)))};return e("div",{role:"grid",className:"flex h-full flex-col justify-evenly",children:[0,1,2,3].map(t=>e("div",{role:"row",className:"grid grid-cols-3 gap-1",children:[0,1,2].map(s=>{const f=3*t+s,g=_(m,f,1),v=_(m,f,b(m,f));return e(H,{label:`${u[f]} ${m}`,selected:r.some(e=>e.getFullYear()===m&&e.getMonth()===f),current:d.getFullYear()===m&&d.getMonth()===f,disabled:P(l)&&w(v,l)<0||P(a)&&w(g,a)>0,focused:f===n.getMonth(),className:`h-(--_mp-cell) w-full ${h[o]}`,onClick:()=>c(f),onKeyDown:p,children:i[f]},f)})},t))})}function U({size:o,month:t,chosen:n,minDate:r,maxDate:l,onMoveCursor:a,onPick:s}){const c=B(t.getFullYear()),i=(new Date).getFullYear(),u=e=>{const o={ArrowLeft:-1,ArrowRight:1,ArrowUp:-4,ArrowDown:4,PageUp:-j,PageDown:j}[e.key];void 0!==o&&(e.preventDefault(),a(v(F(t),o)))};return e("div",{role:"grid",className:"flex h-full flex-col justify-evenly",children:[0,1,2].map(a=>e("div",{role:"row",className:"grid grid-cols-4 gap-1",children:[0,1,2,3].map(m=>{const d=c+4*a+m;return e(H,{label:String(d),selected:n.some(e=>e.getFullYear()===d),current:d===i,disabled:P(r)&&d<r.getFullYear()||P(l)&&d>l.getFullYear(),focused:d===t.getFullYear(),className:`h-(--_mp-cell) w-full ${h[o]}`,onClick:()=>s(d),onKeyDown:u,children:d},d)})},a))})}function q(e){const o=e.parentElement;if(!o)return;const t=e.getBoundingClientRect(),n=o.getBoundingClientRect(),r=t.top-n.top-o.clientTop+o.scrollTop,l=r+t.height;r<o.scrollTop?o.scrollTop=r:l>o.scrollTop+o.clientHeight&&(o.scrollTop=l-o.clientHeight)}export function MPTimeGrid({size:t,locale:r,value:l,referenceDate:a,onChange:s,hour12:c,showSeconds:i,hourStep:m,minuteStep:d,secondStep:f,shouldDisableTime:g,autoFocus:v=!1,labels:y}){const w=l??a,b=n.useRef(null),[D,S]=n.useMemo(()=>C(r),[r]);n.useEffect(()=>{const e=b.current;if(e?.querySelectorAll('[data-chosen="true"]').forEach(q),v){const o=e?.querySelector('[role="listbox"]');(o?.querySelector('[data-chosen="true"]')??o?.querySelector('[role="option"]'))?.focus({preventScroll:!0})}},[v]);const N=n.useMemo(()=>{const e=Math.ceil((c?12:24)/m),o=Array.from({length:e},(e,o)=>o*m);return c?o.map(e=>0===e?12:e):o},[c,m]),M=n.useMemo(()=>Array.from({length:Math.ceil(60/d)},(e,o)=>o*d),[d]),P=n.useMemo(()=>Array.from({length:Math.ceil(60/f)},(e,o)=>o*f),[f]),_=e=>String(e).padStart(2,"0"),k=c?w.getHours()%12||12:w.getHours(),z=(n,r,a,i,m)=>e("div",{role:"listbox","aria-label":r,className:["mp-time-grid__column flex flex-col gap-0.5 overflow-y-auto overscroll-contain","h-[calc(var(--_mp-cell)*7)] w-[calc(var(--_mp-cell)*1.75)]","scroll-py-0.5 [scrollbar-width:thin]"].join(" "),children:a.map(r=>{const a=((e,o)=>E(w,"hour"===e?{hours:c?o%12+(w.getHours()>=12?12:0):o}:"minute"===e?{minutes:o}:"second"===e?{seconds:o}:{hours:w.getHours()%12+12*o}))(n,r),d=null!==l&&i(r),p=g?.(a,n)??!1;return o("button",{type:"button",role:"option","aria-selected":d,"aria-disabled":p||void 0,"data-chosen":d?"true":void 0,className:[$,"rounded-mp-full h-(--_mp-cell) w-full shrink-0",h[t],p?"cursor-default text-mp-on-surface/38":d?"bg-(--_mp-accent) text-(--_mp-on-accent)":"text-mp-on-surface"].join(" "),onClick:()=>{p||s(a)},children:[p?null:e(u,{}),m(r)]},r)})},n);return o("div",{ref:b,className:"mp-time-grid flex gap-1",style:{"--_mp-cell":R[t]},children:[z("hour",y.hour,N,e=>e===k,e=>c?String(e):_(e)),z("minute",y.minute,M,e=>e===w.getMinutes(),_),i?z("second",y.second,P,e=>e===w.getSeconds(),_):null,c?z("meridiem",y.meridiem,[0,1],e=>(w.getHours()>=12?1:0)===e,e=>0===e?D:S):null,e("span",{className:p,"aria-live":"polite",children:null===l?"":x(r,{hour:"numeric",minute:"2-digit",...i?{second:"2-digit"}:{}}).format(l)})]})}
1
+ "use client";
2
+ import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import*as n from"react";import{MPButton as r}from"../components/button/MPButton.js";import{MPIcon as l}from"../components/icon/MPIcon.js";import{MPIconButton as a}from"../components/icon-button/MPIconButton.js";import{ChevronDownIcon as s,ChevronLeftIcon as c,ChevronRightIcon as i}from"../constants/icons.js";import{MPStateLayer as u}from"./StateLayer.js";import{CONTROL_ICON as m,META_TEXT as d,PROSE_TEXT as h}from"./scale.js";import{VISUALLY_HIDDEN as p}from"./visually-hidden.js";import{addDays as f,addMonths as g,addYears as v,calendarWeeks as y,compareDay as w,dateFormatter as x,daysInMonth as b,isDayOutside as D,isMonthBeforeYear as S,isSameDay as N,isSameMonth as M,isValidDate as P,makeDate as _,meridiemLabels as C,monthLabels as j,startOfDay as k,startOfMonth as z,today as F,weekdayLabels as Y,withTime as A,YEAR_PAGE_SIZE as E,yearPageStart as B}from"./date.js";const R={xs:"1.75rem",sm:"2rem",md:"2.5rem",lg:"2.75rem",xl:"3rem"},T={xs:"xs",sm:"xs",md:"sm",lg:"sm",xl:"md"},$=/*@__PURE__*/["group relative flex cursor-pointer items-center justify-center overflow-hidden","box-border appearance-none bg-transparent font-[inherit] tabular-nums select-none","transition-[background-color,border-color,color]","duration-(--mp-sys-motion-duration-short4)","outline-mp-secondary focus-visible:z-10 focus-visible:outline-2","focus-visible:outline-offset-[-2px] focus-visible:outline-solid outline-none"].join(" ");function H({children:t,label:n,selected:r,inRange:l=!1,rangeEdge:a=null,current:s=!1,muted:c=!1,disabled:i=!1,focused:m=!1,className:d,onClick:h,onPointerEnter:p,onKeyDown:f}){return o("button",{type:"button",role:"gridcell","aria-label":n,"aria-selected":r,"aria-current":s?"date":void 0,"aria-disabled":i||void 0,tabIndex:m?0:-1,"data-focus-target":m?"true":void 0,className:[$,"start"===a?"rounded-s-mp-full":"end"===a?"rounded-e-mp-full":"middle"===a?"rounded-none":"rounded-mp-full",i?"cursor-default text-mp-on-surface/38":r?"bg-(--_mp-accent) text-(--_mp-on-accent)":l?"bg-(--_mp-accent-container) text-(--_mp-on-accent-container)":s?"border border-(--_mp-accent) text-(--_mp-accent)":c?"text-mp-on-surface-variant":"text-mp-on-surface",d??""].filter(Boolean).join(" "),onClick:()=>{i||h()},onPointerEnter:p,onKeyDown:f,children:[i?null:e(u,{}),t]})}function K({size:n,color:u,view:d,month:p,locale:f,labels:g,showPreviousButton:v,showNextButton:y,onStep:w,onViewChange:x}){const b=j(f,"long")[p.getMonth()],D=String(p.getFullYear()),N=S(f),M=T[n],P="day"===d?[g.previousMonth,g.nextMonth]:"month"===d?[g.previousYear,g.nextYear]:[g.previousYears,g.nextYears],_=(o,t)=>t?e(a,{size:M,color:u,label:P[-1===o?0:1],icon:e(l,{icon:-1===o?c:i,size:m[M],className:"rtl:rotate-180"}),onClick:()=>w(o)}):e("span",{"aria-hidden":"true",className:"size-(--_mp-cell)"}),C=o=>e(l,{icon:s,size:m[M],className:["transition-transform duration-(--mp-sys-motion-duration-short4)",o?"rotate-180":""].filter(Boolean).join(" ")}),k=e(r,{variant:"text",size:M,color:u,"aria-label":g.chooseMonth,"aria-expanded":"month"===d,endIcon:C("month"===d),onClick:()=>x("month"===d?"day":"month"),children:b},"month"),z=e(r,{variant:"text",size:M,color:u,className:"tabular-nums","aria-label":g.chooseYear,"aria-expanded":"year"===d,endIcon:C("year"===d),onClick:()=>x("year"===d?"day":"year"),children:D},"year"),F=B(p.getFullYear());return o("div",{className:"flex items-center justify-between gap-1",children:[_(-1,v),e("div",{className:"flex min-w-0 flex-1 items-center justify-center gap-1",children:"year"===d?e("span",{className:`text-mp-on-surface flex h-(--_mp-cell) items-center tabular-nums ${h[n]}`,children:`${F}–${F+E-1}`}):"month"===d?z:o(t,N?{children:[k,z]}:{children:[z,k]})}),_(1,y)]})}export function MPCalendar({size:t,color:r,locale:l,weekStartsOn:a,month:s,onMonthChange:c,selected:i,rangeStart:u=null,rangeEnd:m=null,onSelect:d,onPreviewChange:h,minDate:p,maxDate:f,shouldDisableDate:y,showOutsideDays:w=!0,autoFocus:x=!1,showPreviousButton:b=!0,showNextButton:S=!0,labels:N}){const[C,j]=n.useState("day"),Y=n.useMemo(()=>i.filter(P),[i]),[A,B]=n.useState(()=>{const e=Y.find(e=>M(e,s));return e?k(e):M(F(),s)?F():z(s)}),T=n.useRef(x),$=n.useRef(null);n.useEffect(()=>{B(e=>M(e,s)?e:z(s))},[s]),n.useLayoutEffect(()=>{T.current&&(T.current=!1,$.current?.querySelector('[data-focus-target="true"]')?.focus({preventScroll:!0}))});const H=n.useCallback(e=>D(e,p,f)||(y?.(e)??!1),[p,f,y]),q=e=>{T.current=!0,j(e)},I=e=>{T.current=!0,c(e)};return o("div",{ref:$,className:"mp-calendar flex flex-col gap-1",style:{"--_mp-cell":R[t]},onPointerLeave:()=>h?.(null),children:[e(K,{size:t,color:r,view:C,month:s,locale:l,labels:N,showPreviousButton:b,showNextButton:S,onStep:e=>{c("day"===C?g(s,e):v(s,"month"===C?e:e*E))},onViewChange:q}),e("div",{className:"h-[calc(var(--_mp-cell)*7)] w-[calc(var(--_mp-cell)*7)]",children:"day"===C?e(L,{size:t,locale:l,weekStartsOn:a,month:s,chosen:Y,rangeStart:u,rangeEnd:m,focusedDate:A,showOutsideDays:w,isDisabled:H,onSelect:e=>{B(e),d(e)},onPreviewChange:h,onMoveFocus:e=>{T.current=!0,B(e),M(e,s)||c(z(e))}}):"month"===C?e(O,{size:t,locale:l,month:s,chosen:Y,minDate:p,maxDate:f,onMoveCursor:I,onPick:e=>{c(_(s.getFullYear(),e,1)),q("day")}}):e(U,{size:t,month:s,chosen:Y,minDate:p,maxDate:f,onMoveCursor:I,onPick:e=>{c(_(e,s.getMonth(),1)),q("month")}})})]})}function L({size:t,locale:r,weekStartsOn:l,month:a,chosen:s,rangeStart:c,rangeEnd:i,focusedDate:u,showOutsideDays:m,isDisabled:p,onSelect:v,onPreviewChange:b,onMoveFocus:D}){const S=Y(r,l,"narrow"),_=Y(r,l,"long"),C=(k=i,P(j=c)&&P(k)?w(j,k)<=0?[j,k]:[k,j]:null);var j,k;const z=F(),A=n.useMemo(()=>{const e=x(r,{dateStyle:"full"});return y(a,l).map(o=>o.map(o=>({date:o,label:e.format(o)})))},[a,l,r]),E=n.useRef(null),B=n.useRef(a);n.useLayoutEffect(()=>{const e=E.current,o=B.current;if(B.current=a,!e||M(o,a))return;const t=o.getTime()<a.getTime(),n="rtl"===getComputedStyle(e).direction;e.style.setProperty("--_mp-calendar-from",String(t===n?-1:1)),e.dataset.mpPaged="true",e.style.animationName="none",e.offsetWidth,e.style.animationName=""},[a]);return o("div",{role:"grid","aria-label":x(r,{year:"numeric",month:"long"}).format(a),className:"flex h-full flex-col",children:[e("div",{role:"rowgroup",children:e("div",{role:"row",className:"grid grid-cols-7",children:S.map((o,t)=>e("span",{role:"columnheader","aria-label":_[t],className:`text-mp-on-surface-variant flex h-(--_mp-cell) items-center justify-center select-none ${d}`,children:o},t))})}),e("div",{ref:E,role:"rowgroup",className:"mp-calendar__page flex flex-1 flex-col",children:A.map((o,n)=>e("div",{role:"row",className:"grid grid-cols-7",children:o.map(({date:o,label:n})=>{const r=!M(o,a);if(r&&!m)return e("span",{role:"gridcell","aria-hidden":"true",className:"size-(--_mp-cell)"},o.getTime());const c=s.some(e=>N(e,o)),i=null!==C&&w(o,C[0])>=0&&w(o,C[1])<=0,d=null!==C&&i&&N(o,C[0]),y=null!==C&&i&&N(o,C[1]);return e(H,{label:n,selected:c,inRange:i&&!c,rangeEdge:i?d&&y?"both":d?"start":y?"end":"middle":null,current:N(o,z)&&!c,muted:r,disabled:p(o),focused:N(o,u),className:`size-(--_mp-cell) ${h[t]}`,onClick:()=>v(o),onPointerEnter:()=>b?.(o),onKeyDown:e=>((e,o)=>{const t=(o.getDay()-l+7)%7,n={ArrowLeft:()=>f(o,-1),ArrowRight:()=>f(o,1),ArrowUp:()=>f(o,-7),ArrowDown:()=>f(o,7),Home:()=>f(o,-t),End:()=>f(o,6-t),PageUp:()=>g(o,e.shiftKey?-12:-1),PageDown:()=>g(o,e.shiftKey?12:1)}[e.key];n&&(e.preventDefault(),D(n()))})(e,o),children:o.getDate()},o.getTime())})},n))})]})}function O({size:o,locale:t,month:n,chosen:r,minDate:l,maxDate:a,onMoveCursor:s,onPick:c}){const i=j(t,"short"),u=j(t,"long"),m=n.getFullYear(),d=new Date,p=e=>{const o={ArrowLeft:-1,ArrowRight:1,ArrowUp:-3,ArrowDown:3,PageUp:-12,PageDown:12}[e.key];void 0!==o&&(e.preventDefault(),s(g(z(n),o)))};return e("div",{role:"grid",className:"flex h-full flex-col justify-evenly",children:[0,1,2,3].map(t=>e("div",{role:"row",className:"grid grid-cols-3 gap-1",children:[0,1,2].map(s=>{const f=3*t+s,g=_(m,f,1),v=_(m,f,b(m,f));return e(H,{label:`${u[f]} ${m}`,selected:r.some(e=>e.getFullYear()===m&&e.getMonth()===f),current:d.getFullYear()===m&&d.getMonth()===f,disabled:P(l)&&w(v,l)<0||P(a)&&w(g,a)>0,focused:f===n.getMonth(),className:`h-(--_mp-cell) w-full ${h[o]}`,onClick:()=>c(f),onKeyDown:p,children:i[f]},f)})},t))})}function U({size:o,month:t,chosen:n,minDate:r,maxDate:l,onMoveCursor:a,onPick:s}){const c=B(t.getFullYear()),i=(new Date).getFullYear(),u=e=>{const o={ArrowLeft:-1,ArrowRight:1,ArrowUp:-4,ArrowDown:4,PageUp:-E,PageDown:E}[e.key];void 0!==o&&(e.preventDefault(),a(v(z(t),o)))};return e("div",{role:"grid",className:"flex h-full flex-col justify-evenly",children:[0,1,2].map(a=>e("div",{role:"row",className:"grid grid-cols-4 gap-1",children:[0,1,2,3].map(m=>{const d=c+4*a+m;return e(H,{label:String(d),selected:n.some(e=>e.getFullYear()===d),current:d===i,disabled:P(r)&&d<r.getFullYear()||P(l)&&d>l.getFullYear(),focused:d===t.getFullYear(),className:`h-(--_mp-cell) w-full ${h[o]}`,onClick:()=>s(d),onKeyDown:u,children:d},d)})},a))})}function q(e){const o=e.parentElement;if(!o)return;const t=e.getBoundingClientRect(),n=o.getBoundingClientRect(),r=t.top-n.top-o.clientTop+o.scrollTop,l=r+t.height;r<o.scrollTop?o.scrollTop=r:l>o.scrollTop+o.clientHeight&&(o.scrollTop=l-o.clientHeight)}export function MPTimeGrid({size:t,locale:r,value:l,referenceDate:a,onChange:s,hour12:c,showSeconds:i,hourStep:m,minuteStep:d,secondStep:f,shouldDisableTime:g,autoFocus:v=!1,labels:y}){const w=l??a,b=n.useRef(null),[D,S]=n.useMemo(()=>C(r),[r]);n.useEffect(()=>{const e=b.current;if(e?.querySelectorAll('[data-chosen="true"]').forEach(q),v){const o=e?.querySelector('[role="listbox"]');(o?.querySelector('[data-chosen="true"]')??o?.querySelector('[role="option"]'))?.focus({preventScroll:!0})}},[v]);const N=n.useMemo(()=>{const e=Math.ceil((c?12:24)/m),o=Array.from({length:e},(e,o)=>o*m);return c?o.map(e=>0===e?12:e):o},[c,m]),M=n.useMemo(()=>Array.from({length:Math.ceil(60/d)},(e,o)=>o*d),[d]),P=n.useMemo(()=>Array.from({length:Math.ceil(60/f)},(e,o)=>o*f),[f]),_=e=>String(e).padStart(2,"0"),j=c?w.getHours()%12||12:w.getHours(),k=(n,r,a,i,m)=>e("div",{role:"listbox","aria-label":r,className:["mp-time-grid__column flex flex-col gap-0.5 overflow-y-auto overscroll-contain","h-[calc(var(--_mp-cell)*7)] w-[calc(var(--_mp-cell)*1.75)]","scroll-py-0.5 [scrollbar-width:thin]"].join(" "),children:a.map(r=>{const a=((e,o)=>A(w,"hour"===e?{hours:c?o%12+(w.getHours()>=12?12:0):o}:"minute"===e?{minutes:o}:"second"===e?{seconds:o}:{hours:w.getHours()%12+12*o}))(n,r),d=null!==l&&i(r),p=g?.(a,n)??!1;return o("button",{type:"button",role:"option","aria-selected":d,"aria-disabled":p||void 0,"data-chosen":d?"true":void 0,className:[$,"rounded-mp-full h-(--_mp-cell) w-full shrink-0",h[t],p?"cursor-default text-mp-on-surface/38":d?"bg-(--_mp-accent) text-(--_mp-on-accent)":"text-mp-on-surface"].join(" "),onClick:()=>{p||s(a)},children:[p?null:e(u,{}),m(r)]},r)})},n);return o("div",{ref:b,className:"mp-time-grid flex gap-1",style:{"--_mp-cell":R[t]},children:[k("hour",y.hour,N,e=>e===j,e=>c?String(e):_(e)),k("minute",y.minute,M,e=>e===w.getMinutes(),_),i?k("second",y.second,P,e=>e===w.getSeconds(),_):null,c?k("meridiem",y.meridiem,[0,1],e=>(w.getHours()>=12?1:0)===e,e=>0===e?D:S):null,e("span",{className:p,"aria-live":"polite",children:null===l?"":x(r,{hour:"numeric",minute:"2-digit",...i?{second:"2-digit"}:{}}).format(l)})]})}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { MPSize } from '../types';
2
+ import type { MPSize } from '../types.js';
3
3
  export interface MPFieldOutlineProps {
4
4
  /** The label, which is what cuts the notch. Without one the outline is closed. */
5
5
  label?: React.ReactNode;