@m3ui-vue/m3ui-vue 0.8.8 → 0.9.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 (375) hide show
  1. package/README.md +25 -5
  2. package/dist/API.md +3661 -0
  3. package/dist/MIcon-CaEooCmZ.js.map +1 -1
  4. package/dist/{MMenuItem-5xojJYAL.js → MTextField-pJU1vFaR.js} +374 -364
  5. package/dist/MTextField-pJU1vFaR.js.map +1 -0
  6. package/dist/api.json +1 -0
  7. package/dist/barcode.js +9 -11
  8. package/dist/barcode.js.map +1 -1
  9. package/dist/chart.js.map +1 -1
  10. package/dist/code-editor.js +2 -2
  11. package/dist/code-editor.js.map +1 -1
  12. package/dist/components/MAbsolute.vue.d.ts +12 -0
  13. package/dist/components/MAlert.vue.d.ts +4 -0
  14. package/dist/components/MAppBar.vue.d.ts +12 -0
  15. package/dist/components/MAppLayout.vue.d.ts +2 -0
  16. package/dist/components/MAspectRatio.vue.d.ts +1 -0
  17. package/dist/components/MAutocomplete.vue.d.ts +18 -0
  18. package/dist/components/MAvatar.vue.d.ts +3 -0
  19. package/dist/components/MBadge.vue.d.ts +6 -0
  20. package/dist/components/MBar.vue.d.ts +5 -0
  21. package/dist/components/MBarcode.vue.d.ts +9 -0
  22. package/dist/components/MBottomSheet.vue.d.ts +3 -0
  23. package/dist/components/MBox.vue.d.ts +6 -0
  24. package/dist/components/MBreadcrumbs.vue.d.ts +2 -0
  25. package/dist/components/MButton.vue.d.ts +14 -4
  26. package/dist/components/MButtonGroup.vue.d.ts +7 -0
  27. package/dist/components/MCalendar.vue.d.ts +8 -0
  28. package/dist/components/MCard.vue.d.ts +17 -0
  29. package/dist/components/MCarousel.vue.d.ts +61 -36
  30. package/dist/components/MCenter.vue.d.ts +1 -0
  31. package/dist/components/MChart.vue.d.ts +7 -0
  32. package/dist/components/MChatBubble.vue.d.ts +10 -0
  33. package/dist/components/MCheckbox.vue.d.ts +5 -0
  34. package/dist/components/MChip.vue.d.ts +9 -0
  35. package/dist/components/MCircleProgressBar.vue.d.ts +7 -0
  36. package/dist/components/MCodeEditor.vue.d.ts +9 -0
  37. package/dist/components/MColorPicker.vue.d.ts +8 -0
  38. package/dist/components/MColorPickerModal.vue.d.ts +4 -0
  39. package/dist/components/MCommandPalette.vue.d.ts +8 -0
  40. package/dist/components/MConfirmDialog.vue.d.ts +7 -0
  41. package/dist/components/MContainer.vue.d.ts +4 -0
  42. package/dist/components/MContextMenu.vue.d.ts +3 -6
  43. package/dist/components/MCopyButton.vue.d.ts +10 -0
  44. package/dist/components/MDataTable.vue.d.ts +33 -12
  45. package/dist/components/MDatePicker.vue.d.ts +16 -0
  46. package/dist/components/MDatePickerModal.vue.d.ts +9 -0
  47. package/dist/components/MDateRangePicker.vue.d.ts +18 -0
  48. package/dist/components/MDateRangePickerModal.vue.d.ts +9 -0
  49. package/dist/components/MDialog.vue.d.ts +10 -6
  50. package/dist/components/MDivider.vue.d.ts +6 -0
  51. package/dist/components/MDragDropList.vue.d.ts +6 -0
  52. package/dist/components/MEmoji.vue.d.ts +6 -0
  53. package/dist/components/MEmojiButton.vue.d.ts +5 -0
  54. package/dist/components/MEmojiSelector.vue.d.ts +21 -5
  55. package/dist/components/MEmptyState.vue.d.ts +4 -0
  56. package/dist/components/MExpansionPanel.vue.d.ts +9 -0
  57. package/dist/components/MExportButton.vue.d.ts +8 -0
  58. package/dist/components/MFab.vue.d.ts +9 -0
  59. package/dist/components/MFabMenu.vue.d.ts +15 -1
  60. package/dist/components/MFileUpload.vue.d.ts +8 -0
  61. package/dist/components/MFixed.vue.d.ts +10 -0
  62. package/dist/components/MFlex.vue.d.ts +7 -1
  63. package/dist/components/MFooter.vue.d.ts +11 -0
  64. package/dist/components/MFullscreen.vue.d.ts +2 -0
  65. package/dist/components/MGrid.vue.d.ts +7 -0
  66. package/dist/components/MHotkeys.vue.d.ts +4 -0
  67. package/dist/components/MIcon.vue.d.ts +2 -0
  68. package/dist/components/MIconButton.vue.d.ts +10 -0
  69. package/dist/components/MInfiniteScroll.vue.d.ts +6 -0
  70. package/dist/components/MJsonEditor.vue.d.ts +8 -0
  71. package/dist/components/MJsonViewer.vue.d.ts +4 -0
  72. package/dist/components/MKanban.vue.d.ts +2 -0
  73. package/dist/components/MKbd.vue.d.ts +2 -0
  74. package/dist/components/MLightbox.vue.d.ts +19 -5
  75. package/dist/components/MList.vue.d.ts +7 -0
  76. package/dist/components/MListItem.vue.d.ts +24 -0
  77. package/dist/components/MListSubheader.vue.d.ts +6 -0
  78. package/dist/components/MLoadingIndicator.vue.d.ts +10 -0
  79. package/dist/components/MLoadingOverlay.vue.d.ts +5 -0
  80. package/dist/components/MMarkdown.vue.d.ts +3 -0
  81. package/dist/components/MMaskField.vue.d.ts +15 -0
  82. package/dist/components/MMasonry.vue.d.ts +5 -0
  83. package/dist/components/MMenu.vue.d.ts +3 -6
  84. package/dist/components/MMenuDivider.vue.d.ts +4 -0
  85. package/dist/components/MMenuItem.vue.d.ts +5 -0
  86. package/dist/components/MMultiAutocomplete.vue.d.ts +20 -0
  87. package/dist/components/MMultiSelect.vue.d.ts +21 -0
  88. package/dist/components/MNavigationBar.vue.d.ts +2 -0
  89. package/dist/components/MNavigationDrawer.vue.d.ts +11 -0
  90. package/dist/components/MNavigationRail.vue.d.ts +9 -6
  91. package/dist/components/MNavigationSuite.vue.d.ts +5 -3
  92. package/dist/components/MNumberField.vue.d.ts +17 -0
  93. package/dist/components/MOverlay.vue.d.ts +3 -0
  94. package/dist/components/MPageProgress.vue.d.ts +3 -0
  95. package/dist/components/MPagination.vue.d.ts +3 -0
  96. package/dist/components/MPasswordMeter.vue.d.ts +1 -0
  97. package/dist/components/MPinInput.vue.d.ts +11 -0
  98. package/dist/components/MProgressBar.vue.d.ts +6 -0
  99. package/dist/components/MPullToRefresh.vue.d.ts +8 -0
  100. package/dist/components/MQRCode.vue.d.ts +6 -0
  101. package/dist/components/MRadio.vue.d.ts +5 -0
  102. package/dist/components/MRadioGroup.vue.d.ts +6 -0
  103. package/dist/components/MRating.vue.d.ts +11 -0
  104. package/dist/components/MRelativeTime.vue.d.ts +1 -0
  105. package/dist/components/MResponsive.vue.d.ts +3 -0
  106. package/dist/components/MResult.vue.d.ts +6 -0
  107. package/dist/components/MRichTextEditor.vue.d.ts +8 -0
  108. package/dist/components/MScheduler.vue.d.ts +48 -1
  109. package/dist/components/MScrollable.vue.d.ts +3 -0
  110. package/dist/components/MSearchBar.vue.d.ts +6 -0
  111. package/dist/components/MSection.vue.d.ts +5 -0
  112. package/dist/components/MSegmentedButton.vue.d.ts +5 -0
  113. package/dist/components/MSelect.vue.d.ts +17 -0
  114. package/dist/components/MShader.vue.d.ts +1 -0
  115. package/dist/components/MShape.vue.d.ts +1 -1
  116. package/dist/components/MShortNavigationBar.vue.d.ts +8 -9
  117. package/dist/components/MSideSheet.vue.d.ts +3 -0
  118. package/dist/components/MSignaturePad.vue.d.ts +7 -0
  119. package/dist/components/MSimpleCarousel.vue.d.ts +12 -2
  120. package/dist/components/MSkeleton.vue.d.ts +8 -0
  121. package/dist/components/MSlider.vue.d.ts +15 -1
  122. package/dist/components/MSnackbar.vue.d.ts +1 -0
  123. package/dist/components/MSpinner.vue.d.ts +6 -0
  124. package/dist/components/MSplitButton.vue.d.ts +7 -0
  125. package/dist/components/MSplitter.vue.d.ts +4 -0
  126. package/dist/components/MSpotlightSearch.vue.d.ts +18 -0
  127. package/dist/components/MStack.vue.d.ts +8 -1
  128. package/dist/components/MStatCard.vue.d.ts +7 -0
  129. package/dist/components/MStepper.vue.d.ts +7 -0
  130. package/dist/components/MSticky.vue.d.ts +2 -0
  131. package/dist/components/MSubtitle.vue.d.ts +4 -0
  132. package/dist/components/MSwitch.vue.d.ts +5 -6
  133. package/dist/components/MTable.vue.d.ts +17 -4
  134. package/dist/components/MTabs.vue.d.ts +6 -0
  135. package/dist/components/MTagInput.vue.d.ts +17 -0
  136. package/dist/components/MTerminal.vue.d.ts +4 -0
  137. package/dist/components/MText.vue.d.ts +10 -0
  138. package/dist/components/MTextField.vue.d.ts +18 -0
  139. package/dist/components/MTimePicker.vue.d.ts +10 -0
  140. package/dist/components/MTimePickerModal.vue.d.ts +5 -0
  141. package/dist/components/MTimeline.vue.d.ts +3 -0
  142. package/dist/components/MTitle.vue.d.ts +4 -0
  143. package/dist/components/MToggleButton.vue.d.ts +4 -0
  144. package/dist/components/MToolbar.vue.d.ts +6 -1
  145. package/dist/components/MTooltip.vue.d.ts +7 -0
  146. package/dist/components/MTopAppBar.vue.d.ts +8 -0
  147. package/dist/components/MTour.vue.d.ts +5 -0
  148. package/dist/components/MTransferList.vue.d.ts +11 -0
  149. package/dist/components/MTree.vue.d.ts +11 -0
  150. package/dist/components/MTreeTable.vue.d.ts +7 -0
  151. package/dist/components/MVirtualTable.vue.d.ts +6 -0
  152. package/dist/components/MWindow.vue.d.ts +33 -1
  153. package/dist/composables/_carouselStrategy.d.ts +101 -0
  154. package/dist/composables/useLocale.d.ts +21 -0
  155. package/dist/data/emoji-names/emoji-names-de.d.ts +2 -0
  156. package/dist/data/emoji-names/emoji-names-en.d.ts +2 -0
  157. package/dist/data/emoji-names/emoji-names-es.d.ts +2 -0
  158. package/dist/data/emoji-names/emoji-names-fr.d.ts +2 -0
  159. package/dist/data/emoji-names/emoji-names-ja.d.ts +2 -0
  160. package/dist/data/emoji-names/emoji-names-ko.d.ts +2 -0
  161. package/dist/data/emoji-names/emoji-names-pt.d.ts +2 -0
  162. package/dist/data/emoji-names/emoji-names-zh.d.ts +2 -0
  163. package/dist/data/emojis.d.ts +7 -1
  164. package/dist/emoji-names-de-BphO5XpV.js +1877 -0
  165. package/dist/emoji-names-de-BphO5XpV.js.map +1 -0
  166. package/dist/emoji-names-en-9ZvMRvzi.js +1877 -0
  167. package/dist/emoji-names-en-9ZvMRvzi.js.map +1 -0
  168. package/dist/emoji-names-es-DvfWU3Pj.js +1877 -0
  169. package/dist/emoji-names-es-DvfWU3Pj.js.map +1 -0
  170. package/dist/emoji-names-fr-B-jhUlsP.js +1877 -0
  171. package/dist/emoji-names-fr-B-jhUlsP.js.map +1 -0
  172. package/dist/emoji-names-ja-l8cMFJo1.js +1877 -0
  173. package/dist/emoji-names-ja-l8cMFJo1.js.map +1 -0
  174. package/dist/emoji-names-ko-YP-o9G0c.js +1877 -0
  175. package/dist/emoji-names-ko-YP-o9G0c.js.map +1 -0
  176. package/dist/emoji-names-pt-DGj_Js4M.js +1877 -0
  177. package/dist/emoji-names-pt-DGj_Js4M.js.map +1 -0
  178. package/dist/emoji-names-zh-Dzecwtw_.js +1877 -0
  179. package/dist/emoji-names-zh-Dzecwtw_.js.map +1 -0
  180. package/dist/index.d.ts +2 -2
  181. package/dist/locales/index.js +140 -7
  182. package/dist/locales/index.js.map +1 -1
  183. package/dist/m3ui-vue.css +1 -1
  184. package/dist/m3ui.js +6642 -5160
  185. package/dist/m3ui.js.map +1 -1
  186. package/dist/markdown.js +1 -1
  187. package/dist/markdown.js.map +1 -1
  188. package/dist/plugin.d.ts +6 -0
  189. package/dist/qrcode.js.map +1 -1
  190. package/dist/rich-text-editor.js +10 -10
  191. package/dist/rich-text-editor.js.map +1 -1
  192. package/dist/styles.css +1 -1
  193. package/dist/terminal.js +34 -27
  194. package/dist/terminal.js.map +1 -1
  195. package/dist/{useLocale-D3ZWZ8jY.js → useLocale-Drihe5G2.js} +33 -11
  196. package/dist/useLocale-Drihe5G2.js.map +1 -0
  197. package/package.json +4 -2
  198. package/src/__tests__/MCarousel.test.ts +183 -21
  199. package/src/__tests__/MDialog.test.ts +18 -0
  200. package/src/__tests__/MEmojiSelector.test.ts +138 -0
  201. package/src/__tests__/MHotkeys.test.ts +57 -0
  202. package/src/__tests__/MLightbox.test.ts +313 -5
  203. package/src/__tests__/MScheduler.test.ts +122 -0
  204. package/src/__tests__/MTerminal.test.ts +63 -0
  205. package/src/__tests__/attrsFallthrough.test.ts +65 -0
  206. package/src/__tests__/hostLocale.test.ts +57 -0
  207. package/src/__tests__/plugin.test.ts +28 -1
  208. package/src/components/MAbsolute.vue +18 -0
  209. package/src/components/MAlert.vue +12 -0
  210. package/src/components/MAppBar.vue +12 -0
  211. package/src/components/MAppLayout.vue +11 -0
  212. package/src/components/MAspectRatio.vue +6 -0
  213. package/src/components/MAutocomplete.vue +24 -0
  214. package/src/components/MAvatar.vue +12 -1
  215. package/src/components/MBadge.vue +11 -0
  216. package/src/components/MBar.vue +19 -0
  217. package/src/components/MBarcode.vue +18 -2
  218. package/src/components/MBottomSheet.vue +13 -1
  219. package/src/components/MBox.vue +12 -0
  220. package/src/components/MBreadcrumbs.vue +7 -0
  221. package/src/components/MButton.vue +22 -4
  222. package/src/components/MButtonGroup.vue +13 -0
  223. package/src/components/MCalendar.vue +14 -0
  224. package/src/components/MCard.vue +26 -0
  225. package/src/components/MCarousel.vue +542 -200
  226. package/src/components/MCenter.vue +6 -0
  227. package/src/components/MChart.vue +12 -0
  228. package/src/components/MChatBubble.vue +17 -0
  229. package/src/components/MCheckbox.vue +11 -0
  230. package/src/components/MChip.vue +17 -0
  231. package/src/components/MCircleProgressBar.vue +13 -0
  232. package/src/components/MCodeEditor.vue +18 -2
  233. package/src/components/MColorPicker.vue +13 -0
  234. package/src/components/MColorPickerModal.vue +12 -0
  235. package/src/components/MCommandPalette.vue +17 -1
  236. package/src/components/MConfirmDialog.vue +15 -0
  237. package/src/components/MContainer.vue +9 -0
  238. package/src/components/MContextMenu.vue +20 -7
  239. package/src/components/MCopyButton.vue +16 -0
  240. package/src/components/MDataTable.vue +58 -12
  241. package/src/components/MDatePicker.vue +21 -0
  242. package/src/components/MDatePickerModal.vue +17 -1
  243. package/src/components/MDateRangePicker.vue +23 -0
  244. package/src/components/MDateRangePickerModal.vue +17 -1
  245. package/src/components/MDialog.vue +43 -10
  246. package/src/components/MDivider.vue +6 -0
  247. package/src/components/MDragDropList.vue +18 -0
  248. package/src/components/MEmoji.vue +6 -0
  249. package/src/components/MEmojiButton.vue +11 -0
  250. package/src/components/MEmojiSelector.vue +486 -78
  251. package/src/components/MEmptyState.vue +9 -0
  252. package/src/components/MExpansionPanel.vue +17 -0
  253. package/src/components/MExportButton.vue +15 -0
  254. package/src/components/MFab.vue +20 -1
  255. package/src/components/MFabMenu.vue +20 -0
  256. package/src/components/MFileUpload.vue +19 -0
  257. package/src/components/MFixed.vue +16 -0
  258. package/src/components/MFlex.vue +11 -0
  259. package/src/components/MFooter.vue +11 -0
  260. package/src/components/MFullscreen.vue +8 -0
  261. package/src/components/MGrid.vue +12 -0
  262. package/src/components/MHotkeys.vue +20 -13
  263. package/src/components/MIcon.vue +10 -1
  264. package/src/components/MIconButton.vue +13 -0
  265. package/src/components/MInfiniteScroll.vue +16 -0
  266. package/src/components/MJsonEditor.vue +13 -0
  267. package/src/components/MJsonViewer.vue +7 -0
  268. package/src/components/MKanban.vue +18 -0
  269. package/src/components/MKbd.vue +6 -0
  270. package/src/components/MLightbox.vue +766 -268
  271. package/src/components/MList.vue +15 -0
  272. package/src/components/MListDetail.vue +11 -0
  273. package/src/components/MListItem.vue +37 -0
  274. package/src/components/MListSubheader.vue +6 -0
  275. package/src/components/MLoadingIndicator.vue +15 -0
  276. package/src/components/MLoadingOverlay.vue +18 -1
  277. package/src/components/MMarkdown.vue +7 -0
  278. package/src/components/MMaskField.vue +21 -0
  279. package/src/components/MMasonry.vue +11 -0
  280. package/src/components/MMenu.vue +19 -7
  281. package/src/components/MMenuDivider.vue +4 -0
  282. package/src/components/MMenuItem.vue +16 -0
  283. package/src/components/MMultiAutocomplete.vue +26 -0
  284. package/src/components/MMultiSelect.vue +27 -0
  285. package/src/components/MNavigationBar.vue +7 -0
  286. package/src/components/MNavigationDrawer.vue +30 -1
  287. package/src/components/MNavigationRail.vue +27 -6
  288. package/src/components/MNavigationSuite.vue +20 -3
  289. package/src/components/MNotificationHost.vue +3 -0
  290. package/src/components/MNumberField.vue +24 -0
  291. package/src/components/MOverlay.vue +11 -0
  292. package/src/components/MPageProgress.vue +7 -0
  293. package/src/components/MPagination.vue +15 -1
  294. package/src/components/MPasswordMeter.vue +7 -0
  295. package/src/components/MPinInput.vue +19 -0
  296. package/src/components/MProgressBar.vue +9 -0
  297. package/src/components/MPullToRefresh.vue +17 -0
  298. package/src/components/MQRCode.vue +12 -0
  299. package/src/components/MRadio.vue +11 -0
  300. package/src/components/MRadioGroup.vue +11 -0
  301. package/src/components/MRating.vue +19 -0
  302. package/src/components/MRelative.vue +8 -0
  303. package/src/components/MRelativeTime.vue +6 -0
  304. package/src/components/MResponsive.vue +9 -0
  305. package/src/components/MResult.vue +14 -0
  306. package/src/components/MRichTextEditor.vue +14 -0
  307. package/src/components/MScheduler.vue +303 -115
  308. package/src/components/MScrollable.vue +8 -0
  309. package/src/components/MSearchBar.vue +17 -0
  310. package/src/components/MSection.vue +13 -0
  311. package/src/components/MSegmentedButton.vue +10 -0
  312. package/src/components/MSelect.vue +22 -0
  313. package/src/components/MShader.vue +13 -0
  314. package/src/components/MShape.vue +6 -0
  315. package/src/components/MShortNavigationBar.vue +23 -9
  316. package/src/components/MSideSheet.vue +14 -1
  317. package/src/components/MSignaturePad.vue +15 -0
  318. package/src/components/MSimpleCarousel.vue +18 -0
  319. package/src/components/MSkeleton.vue +8 -0
  320. package/src/components/MSlider.vue +21 -0
  321. package/src/components/MSnackbar.vue +5 -0
  322. package/src/components/MSpacer.vue +6 -0
  323. package/src/components/MSpinner.vue +10 -0
  324. package/src/components/MSplitButton.vue +17 -1
  325. package/src/components/MSplitter.vue +10 -0
  326. package/src/components/MSpotlightSearch.vue +28 -1
  327. package/src/components/MStack.vue +12 -0
  328. package/src/components/MStatCard.vue +13 -0
  329. package/src/components/MStepper.vue +12 -0
  330. package/src/components/MSticky.vue +7 -0
  331. package/src/components/MSubtitle.vue +9 -0
  332. package/src/components/MSupportingPane.vue +10 -0
  333. package/src/components/MSwitch.vue +14 -6
  334. package/src/components/MTable.vue +33 -4
  335. package/src/components/MTabs.vue +12 -0
  336. package/src/components/MTagInput.vue +23 -0
  337. package/src/components/MTerminal.vue +33 -10
  338. package/src/components/MText.vue +15 -0
  339. package/src/components/MTextField.vue +26 -0
  340. package/src/components/MTimePicker.vue +15 -0
  341. package/src/components/MTimePickerModal.vue +13 -1
  342. package/src/components/MTimeline.vue +7 -0
  343. package/src/components/MTitle.vue +9 -0
  344. package/src/components/MToggleButton.vue +12 -0
  345. package/src/components/MToolbar.vue +12 -0
  346. package/src/components/MTooltip.vue +18 -0
  347. package/src/components/MTopAppBar.vue +18 -0
  348. package/src/components/MTour.vue +15 -2
  349. package/src/components/MTransferList.vue +24 -0
  350. package/src/components/MTree.vue +11 -0
  351. package/src/components/MTreeTable.vue +15 -0
  352. package/src/components/MVirtualTable.vue +12 -0
  353. package/src/components/MWindow.vue +34 -0
  354. package/src/composables/_carouselStrategy.ts +712 -0
  355. package/src/composables/useLocale.ts +54 -3
  356. package/src/data/emoji-names/emoji-names-de.ts +1875 -0
  357. package/src/data/emoji-names/emoji-names-en.ts +1875 -0
  358. package/src/data/emoji-names/emoji-names-es.ts +1875 -0
  359. package/src/data/emoji-names/emoji-names-fr.ts +1875 -0
  360. package/src/data/emoji-names/emoji-names-ja.ts +1875 -0
  361. package/src/data/emoji-names/emoji-names-ko.ts +1875 -0
  362. package/src/data/emoji-names/emoji-names-pt.ts +1875 -0
  363. package/src/data/emoji-names/emoji-names-zh.ts +1875 -0
  364. package/src/data/emojis.ts +29 -198
  365. package/src/index.ts +2 -2
  366. package/src/locales/de.ts +19 -0
  367. package/src/locales/es.ts +19 -0
  368. package/src/locales/fr.ts +19 -0
  369. package/src/locales/ja.ts +19 -0
  370. package/src/locales/ko.ts +19 -0
  371. package/src/locales/pt.ts +19 -0
  372. package/src/locales/zh.ts +19 -0
  373. package/src/plugin.ts +14 -2
  374. package/dist/MMenuItem-5xojJYAL.js.map +0 -1
  375. package/dist/useLocale-D3ZWZ8jY.js.map +0 -1
@@ -1,4 +1,17 @@
1
1
  <script setup lang="ts">
2
+ /**
3
+ * A simple, general-purpose data table — sortable columns, built-in search, pagination, and optional row
4
+ * selection, with an escape hatch to delegate all three to your backend via serverSide.
5
+ *
6
+ * @slot toolbar Extra content in the toolbar next to the search input (filters, buttons, etc.)
7
+ * @slot empty Custom empty-state content, replaces the default icon + text
8
+ * @slot row-actions Per-row action buttons — rendering this slot adds a trailing actions column
9
+ * @event update:modelValue Emitted when the selection changes — powers v-model
10
+ * @event update:page Emitted when the page changes — powers v-model:page
11
+ * @event rowClick Emitted with the row's data when you click a row (unless `selectOnRowClick` makes the click
12
+ * select it).
13
+ * @event fetch Emitted instead of filtering locally when serverSide is true
14
+ */
2
15
  import { computed, onMounted, ref, watch } from 'vue'
3
16
  import MCheckbox from './MCheckbox.vue'
4
17
  import MIcon from './MIcon.vue'
@@ -28,25 +41,41 @@ const SKEL = [65, 80, 50, 75, 90, 55, 70, 85, 60, 78, 88, 52, 70, 83, 58]
28
41
 
29
42
  const props = withDefaults(
30
43
  defineProps<{
44
+ /** Column definitions: { key, label, sortable?, width?, align? } */
31
45
  columns: TableColumn[]
46
+ /** Table data rows */
32
47
  rows: Record<string, any>[]
48
+ /** Show skeleton loading state */
33
49
  loading?: boolean
50
+ /** Text when no rows (defaults to the locale string) */
34
51
  emptyText?: string
52
+ /** Unique key field in each row */
35
53
  rowKey?: string
36
- selectable?: boolean
37
- /** Con `selectable`, que el click en cualquier parte de la fila la marque/desmarque (en vez de
38
- * emitir `rowClick`). Default false: sólo el checkbox selecciona y el click en la fila emite
39
- * `rowClick`, así una tabla puede seleccionar filas y a la vez abrirlas al click.
54
+ /**
55
+ * Enable row selection with checkboxes (by default only the checkbox toggles a row; clicking the row itself
56
+ * still emits row-click)
40
57
  */
58
+ selectable?: boolean
59
+ /** With selectable, clicking anywhere on a row toggles its selection instead of emitting row-click */
60
+ // Con `selectable`, que el click en cualquier parte de la fila la marque/desmarque (en vez de
61
+ // emitir `rowClick`). Default false: sólo el checkbox selecciona y el click en la fila emite
62
+ // `rowClick`, así una tabla puede seleccionar filas y a la vez abrirlas al click.
41
63
  selectOnRowClick?: boolean
64
+ /** Selected rows (v-model) */
42
65
  modelValue?: Record<string, any>[]
66
+ /** Rows per page */
43
67
  perPage?: number
68
+ /** Show search input */
44
69
  searchable?: boolean
45
70
  /** Emit `fetch` instead of filtering locally. Requires :total. */
46
71
  serverSide?: boolean
72
+ /** Total rows (for server-side pagination) */
47
73
  total?: number
74
+ /** Current page (v-model via update:page) */
48
75
  page?: number
76
+ /** Placeholder for search input (defaults to the locale string) */
49
77
  searchPlaceholder?: string
78
+ /** Text for selected count badge, pluralized with 's' (defaults to the locale string) */
50
79
  selectedText?: string
51
80
  }>(),
52
81
  {
@@ -1,4 +1,10 @@
1
1
  <script setup lang="ts">
2
+ /**
3
+ * Switches between different views or content sections. The indicator animates via two independent springs
4
+ * (offset and width), not a CSS transition — see the component source for details.
5
+ *
6
+ * @event update:modelValue Emitted with the value of the tab you picked.
7
+ */
2
8
  import { nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
3
9
  import MIcon from './MIcon.vue'
4
10
 
@@ -10,8 +16,14 @@ interface Tab {
10
16
  }
11
17
 
12
18
  const props = withDefaults(defineProps<{
19
+ /** Active tab value (v-model) */
13
20
  modelValue: string | number
21
+ /** Tab definitions */
14
22
  tabs: Tab[]
23
+ /**
24
+ * Primary: short sliding underline shorter than the tab with a stretch animation. Secondary: full-width
25
+ * underline spanning the entire tab, text-only.
26
+ */
15
27
  variant?: 'primary' | 'secondary'
16
28
  /** Fixed (default, M3 `TabRow`): tabs evenly share the available width, no scrolling — use for 2-5 tabs. Scrollable (M3 `ScrollableTabRow`): tabs keep their natural width and the row scrolls horizontally when they overflow — use for many tabs. */
17
29
  scrollable?: boolean
@@ -1,4 +1,10 @@
1
1
  <script setup lang="ts">
2
+ /**
3
+ * Type and press Enter or comma to add a free-form tag. Backspace on an empty input removes the last tag.
4
+ *
5
+ * @event update:modelValue Emitted whenever a tag is added or removed — powers v-model
6
+ * @event debounced Emitted debounce ms after the tag list stops changing (only when debounce > 0)
7
+ */
2
8
  import { computed, ref, useId } from 'vue'
3
9
  import MIcon from './MIcon.vue'
4
10
  import { useFieldBg } from '../composables/useFieldBg'
@@ -6,20 +12,37 @@ import { useDebounce } from '../composables/useDebounce'
6
12
 
7
13
  const props = withDefaults(
8
14
  defineProps<{
15
+ /** Array of tags (v-model) */
9
16
  modelValue: string[]
17
+ /** Floating label text */
10
18
  label?: string
19
+ /** Input placeholder */
11
20
  placeholder?: string
21
+ /** Field style */
12
22
  variant?: 'filled' | 'outlined'
23
+ /** Disables the field */
13
24
  disabled?: boolean
25
+ /** Error state */
14
26
  error?: boolean
27
+ /** Error message shown when error is true */
15
28
  errorLabel?: string
29
+ /** Helper text below field */
16
30
  hint?: string
31
+ /** Marks as required — adds a red asterisk after the label */
17
32
  required?: boolean
33
+ /** Material Symbol icon name */
18
34
  leadingIcon?: string
35
+ /**
36
+ * Overrides the auto-detected background color used to cut the floating label out of the outlined border
37
+ */
19
38
  fieldBg?: string
39
+ /** Max number of tags allowed */
20
40
  maxTags?: number
41
+ /** Allow duplicate tags */
21
42
  duplicates?: boolean
43
+ /** Show a clear-all button */
22
44
  clearable?: boolean
45
+ /** Delay (ms) before firing the @debounced event */
23
46
  debounce?: number
24
47
  }>(),
25
48
  {
@@ -1,12 +1,23 @@
1
1
  <script setup lang="ts">
2
+ /**
3
+ * A terminal emulator built on xterm.js — pre-filled static output, or fully interactive keyboard input.
4
+ *
5
+ * @event line Emitted with the buffered text once the user presses Enter — the usual event to handle a
6
+ * submitted command
7
+ * @event input Emitted for every raw keystroke/data chunk xterm receives (not readonly)
8
+ */
2
9
  import { ref, onMounted, onBeforeUnmount, watch } from 'vue'
3
10
  import MIcon from './MIcon.vue'
4
11
 
5
12
  const props = withDefaults(
6
13
  defineProps<{
14
+ /** Initial lines to display */
7
15
  lines?: string[]
16
+ /** Disable input */
8
17
  readonly?: boolean
18
+ /** Title bar text */
9
19
  title?: string
20
+ /** Minimum height */
10
21
  minHeight?: string
11
22
  }>(),
12
23
  {
@@ -38,8 +49,10 @@ function writeLines(lines: string[]) {
38
49
  })
39
50
  }
40
51
 
52
+ // xterm draws on a canvas, so it can't use the CSS variables directly: read them (from the
53
+ // container, so a palette set on an ancestor applies too) and hand xterm plain colors.
41
54
  function getThemeColors() {
42
- const style = getComputedStyle(document.documentElement)
55
+ const style = getComputedStyle(containerRef.value ?? document.documentElement)
43
56
  return {
44
57
  background: style.getPropertyValue('--color-surface-container-lowest').trim() || '#0f0d13',
45
58
  foreground: style.getPropertyValue('--color-on-surface').trim() || '#e6e1e5',
@@ -49,6 +62,14 @@ function getThemeColors() {
49
62
  }
50
63
  }
51
64
 
65
+ // Theme (.dark) and palette (data-palette) changes don't reach the canvas on their own: re-read
66
+ // the colors whenever <html> changes, like useFieldBg does.
67
+ let themeObserver: MutationObserver | null = null
68
+ let unmounted = false
69
+ function applyTheme() {
70
+ if (terminal) terminal.options.theme = getThemeColors()
71
+ }
72
+
52
73
  onMounted(async () => {
53
74
  if (!containerRef.value) return
54
75
 
@@ -58,8 +79,8 @@ onMounted(async () => {
58
79
  ])
59
80
 
60
81
  try { await import('@xterm/xterm/css/xterm.css') } catch { /* consumer will provide styles */ }
61
-
62
- const colors = getThemeColors()
82
+ // Unmounted while xterm was loading: don't create a terminal (and observers) nobody will dispose.
83
+ if (unmounted || !containerRef.value) return
63
84
 
64
85
  terminal = new xtermMod.Terminal({
65
86
  fontFamily: "'JetBrains Mono', 'Fira Code', 'Consolas', monospace",
@@ -67,13 +88,7 @@ onMounted(async () => {
67
88
  lineHeight: 1.4,
68
89
  cursorBlink: !props.readonly,
69
90
  disableStdin: props.readonly,
70
- theme: {
71
- background: colors.background,
72
- foreground: colors.foreground,
73
- cursor: colors.cursor,
74
- cursorAccent: colors.cursorAccent,
75
- selectionBackground: colors.selectionBackground,
76
- },
91
+ theme: getThemeColors(),
77
92
  scrollback: 1000,
78
93
  convertEol: true,
79
94
  })
@@ -110,6 +125,12 @@ onMounted(async () => {
110
125
  try { fitAddon?.fit() } catch { /* ignore */ }
111
126
  })
112
127
  resizeObserver.observe(containerRef.value)
128
+
129
+ themeObserver = new MutationObserver(applyTheme)
130
+ themeObserver.observe(document.documentElement, {
131
+ attributes: true,
132
+ attributeFilter: ['class', 'style', 'data-theme', 'data-palette'],
133
+ })
113
134
  })
114
135
 
115
136
  watch(() => props.lines, (newLines) => {
@@ -119,7 +140,9 @@ watch(() => props.lines, (newLines) => {
119
140
  })
120
141
 
121
142
  onBeforeUnmount(() => {
143
+ unmounted = true
122
144
  resizeObserver?.disconnect()
145
+ themeObserver?.disconnect()
123
146
  terminal?.dispose()
124
147
  })
125
148
 
@@ -1,4 +1,9 @@
1
1
  <script setup lang="ts">
2
+ /**
3
+ * Renders any of the 15 Material 3 typography variants, with an auto-selected semantic HTML tag.
4
+ *
5
+ * @slot default The text.
6
+ */
2
7
  import { computed } from 'vue'
3
8
 
4
9
  export type TextVariant =
@@ -10,12 +15,22 @@ export type TextVariant =
10
15
 
11
16
  const props = withDefaults(
12
17
  defineProps<{
18
+ /** Typography variant from the Material 3 type scale */
13
19
  variant?: TextVariant
20
+ /**
21
+ * HTML tag to render (auto-selected based on variant — h1/h2/h3 for display/headline, p for title/body,
22
+ * span for label)
23
+ */
14
24
  tag?: string
25
+ /** Text color */
15
26
  color?: 'on-surface' | 'on-surface-variant' | 'primary' | 'secondary' | 'tertiary' | 'error' | 'inherit'
27
+ /** Text alignment */
16
28
  align?: 'left' | 'center' | 'right'
29
+ /** Truncate text with ellipsis on overflow */
17
30
  truncate?: boolean
31
+ /** Clamp text to a specific number of lines */
18
32
  lines?: 1 | 2 | 3 | 4 | 5 | 6
33
+ /** Font weight override */
19
34
  weight?: 'regular' | 'medium' | 'bold'
20
35
  }>(),
21
36
  { variant: 'body-medium', color: 'inherit', align: 'left' },
@@ -1,4 +1,12 @@
1
1
  <script setup lang="ts">
2
+ /**
3
+ * The standard single- or multi-line text input, filled or outlined, with floating label.
4
+ *
5
+ * @slot trailing Custom trailing content (e.g. an icon button) — replaces the built-in clear button when
6
+ * present
7
+ * @event update:modelValue Emitted on every keystroke — powers v-model
8
+ * @event debounced Emitted debounce ms after the user stops typing (only when debounce > 0)
9
+ */
2
10
  import { computed, ref, useId, useSlots } from "vue";
3
11
  import MIcon from "./MIcon.vue";
4
12
  import { useFieldBg } from "../composables/useFieldBg";
@@ -6,21 +14,39 @@ import { useDebounce } from "../composables/useDebounce";
6
14
 
7
15
  const props = withDefaults(
8
16
  defineProps<{
17
+ /** Bound value (v-model) */
9
18
  modelValue: string | number;
19
+ /** Field label */
10
20
  label: string;
21
+ /** HTML input type */
11
22
  type?: string;
23
+ /** Visual style */
12
24
  variant?: "filled" | "outlined";
25
+ /** Puts the field in error state (red border and label) */
13
26
  error?: boolean;
27
+ /** Error message shown below the field (only visible when error is true) */
14
28
  errorLabel?: string;
29
+ /** Hint text shown below the field */
15
30
  hint?: string;
31
+ /** Disables the field */
16
32
  disabled?: boolean;
33
+ /** Marks as required — adds a red asterisk after the label */
17
34
  required?: boolean;
35
+ /** Renders a textarea instead of an input */
18
36
  multiline?: boolean;
37
+ /** Textarea rows (when multiline) */
19
38
  rows?: number;
39
+ /** Passed through to the native autocomplete attribute */
20
40
  autocomplete?: string;
41
+ /** Material Symbol shown before the input */
21
42
  leadingIcon?: string;
43
+ /** Show a clear button when the field has a value */
22
44
  clearable?: boolean;
45
+ /**
46
+ * Overrides the auto-detected background color used to cut the floating label out of the outlined border
47
+ */
23
48
  fieldBg?: string;
49
+ /** Delay (ms) before firing the @debounced event. v-model always updates immediately */
24
50
  debounce?: number;
25
51
  }>(),
26
52
  {
@@ -1,19 +1,34 @@
1
1
  <script setup lang="ts">
2
+ /**
3
+ * An inline, dropdown-anchored hour/minute picker with 12h/24h format support.
4
+ *
5
+ * @event update:modelValue Emitted with the picked time.
6
+ */
2
7
  import { computed, onMounted, onUnmounted, ref, watch } from 'vue'
3
8
  import MIcon from './MIcon.vue'
4
9
  import { useFieldBg } from '../composables/useFieldBg'
5
10
  import { useLocale } from '../composables/useLocale'
6
11
 
7
12
  const props = withDefaults(defineProps<{
13
+ /** Selected time (HH:MM, v-model) */
8
14
  modelValue: string | null
15
+ /** Field label */
9
16
  label?: string
17
+ /** Placeholder shown when no time is selected — falls back to label, then the current locale's string */
10
18
  placeholder?: string
19
+ /** Disables the picker */
11
20
  disabled?: boolean
21
+ /** Error state */
12
22
  error?: boolean
23
+ /** Error message shown when error is true */
13
24
  errorLabel?: string
25
+ /** Hint text below the field */
14
26
  hint?: string
27
+ /** Minute increment step */
15
28
  minuteStep?: number
29
+ /** Use 24-hour format */
16
30
  use24h?: boolean
31
+ /** Overrides the auto-detected background color used to cut the floating label out of the border */
17
32
  fieldBg?: string
18
33
  }>(), { minuteStep: 5, use24h: true })
19
34
 
@@ -1,14 +1,26 @@
1
1
  <script setup lang="ts">
2
+ /**
3
+ * A modal, centered time picker with a clock dial and a keyboard input mode. Supports AM/PM toggle and 24h
4
+ * format — the sibling of MTimePicker, a fully separate component rather than a shared internal.
5
+ *
6
+ * @event update:modelValue Emitted when a time is confirmed — powers v-model
7
+ * @event update:show Emitted when the dialog opens or closes — powers v-model:show
8
+ */
2
9
  import { computed, ref, watch } from 'vue'
3
10
  import MButton from './MButton.vue'
4
11
  import MIconButton from './MIconButton.vue'
5
12
  import { useLocale } from '../composables/useLocale'
6
13
 
7
14
  const props = withDefaults(defineProps<{
15
+ /** Selected time in HH:MM format (v-model) */
8
16
  modelValue: string | null
17
+ /** Controls dialog visibility (v-model:show) */
9
18
  show?: boolean
19
+ /** Use 24-hour format (shows inner ring 13-23) */
10
20
  use24h?: boolean
21
+ /** Minute increment step */
11
22
  minuteStep?: number
23
+ /** Dialog title */
12
24
  title?: string
13
25
  }>(), {
14
26
  modelValue: null,
@@ -234,7 +246,7 @@ function onKeydown(e: KeyboardEvent) { if (e.key === 'Escape') cancel() }
234
246
 
235
247
  <template>
236
248
  <Teleport to="body">
237
- <Transition name="m3-tp-modal">
249
+ <Transition name="m3-tp-modal" appear>
238
250
  <div
239
251
  v-if="show"
240
252
  class="fixed inset-0 z-50 flex items-center justify-center bg-scrim/32 p-4"
@@ -1,4 +1,8 @@
1
1
  <script setup lang="ts">
2
+ /**
3
+ * A vertical event timeline with icon dots, dates, and colors — standard single-column or alternating
4
+ * left/right layout.
5
+ */
2
6
  import MIcon from "./MIcon.vue";
3
7
 
4
8
  export interface TimelineItem {
@@ -12,8 +16,11 @@ export interface TimelineItem {
12
16
 
13
17
  withDefaults(
14
18
  defineProps<{
19
+ /** Array of timeline entries — required */
15
20
  items: TimelineItem[];
21
+ /** Compact spacing between items */
16
22
  dense?: boolean;
23
+ /** Alternate items left/right of a central line instead of a single left-aligned column */
17
24
  alternating?: boolean;
18
25
  }>(),
19
26
  { dense: false, alternating: false },
@@ -1,13 +1,22 @@
1
1
  <script setup lang="ts">
2
+ /**
3
+ * Semantic heading component in three sizes — a thin wrapper around `MText` at medium weight.
4
+ *
5
+ * @slot default The title text.
6
+ */
2
7
  import { computed } from 'vue'
3
8
  import MText from './MText.vue'
4
9
  import type { TextVariant } from './MText.vue'
5
10
 
6
11
  const props = withDefaults(
7
12
  defineProps<{
13
+ /** Title size (maps to headline-large/medium/small) */
8
14
  size?: 'large' | 'medium' | 'small'
15
+ /** Text color */
9
16
  color?: 'on-surface' | 'on-surface-variant' | 'primary' | 'secondary' | 'tertiary' | 'error' | 'inherit'
17
+ /** Text alignment */
10
18
  align?: 'left' | 'center' | 'right'
19
+ /** Truncate text with ellipsis on overflow */
11
20
  truncate?: boolean
12
21
  }>(),
13
22
  { size: 'large', color: 'inherit' },
@@ -1,4 +1,12 @@
1
1
  <script setup lang="ts">
2
+ /**
3
+ * M3 Expressive's standalone toggle button — morphs its own shape between a pill and a squared corner on check,
4
+ * and squishes further while pressed, all on a real spring. Distinct from MSegmentedButton/MButtonGroup, which
5
+ * are groups of options — this is a single button.
6
+ *
7
+ * @slot default The button's label, after the icon.
8
+ * @event update:checked Emitted when clicked — powers v-model:checked
9
+ */
2
10
  import { computed, onMounted, onUnmounted, ref, watch } from 'vue'
3
11
  import MIcon from './MIcon.vue'
4
12
 
@@ -6,9 +14,13 @@ const props = withDefaults(
6
14
  defineProps<{
7
15
  /** Whether the toggle button is checked/selected — v-model. */
8
16
  checked: boolean
17
+ /** Visual style, matching MButton's naming */
9
18
  variant?: 'filled' | 'tonal' | 'outlined' | 'elevated'
19
+ /** Disables interaction */
10
20
  disabled?: boolean
21
+ /** Material Symbol icon name shown before the label */
11
22
  icon?: string
23
+ /** Same 5-tier expressive sizing as MButton */
12
24
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
13
25
  }>(),
14
26
  {
@@ -1,11 +1,23 @@
1
1
  <script setup lang="ts">
2
+ /**
3
+ * A container for grouping icon buttons and actions — docked to an edge or floating as a rounded pill,
4
+ * horizontal or vertical, with an optional paired FAB.
5
+ *
6
+ * @slot fab A FAB rendered alongside the toolbar body, positioned by fabPosition
7
+ * @slot default Toolbar items — typically MIconButton/MButton, separated with MDivider
8
+ */
2
9
  import { computed } from 'vue'
3
10
 
4
11
  const props = withDefaults(defineProps<{
12
+ /** Docked (edge-attached, full width/height, bordered) or floating (rounded pill with shadow) */
5
13
  variant?: 'docked' | 'floating'
14
+ /** Layout direction */
6
15
  orientation?: 'horizontal' | 'vertical'
16
+ /** Background color scheme */
7
17
  color?: 'surface' | 'primary' | 'secondary' | 'tertiary'
18
+ /** Where the #fab slot renders relative to the toolbar body */
8
19
  fabPosition?: 'start' | 'end' | 'none'
20
+ /** Item alignment along the main axis */
9
21
  align?: 'start' | 'center' | 'end' | 'between'
10
22
  }>(), {
11
23
  variant: 'docked',
@@ -1,10 +1,27 @@
1
1
  <script setup lang="ts">
2
+ /**
3
+ * A hover/focus-triggered label — plain text, or a rich variant with a title, detailed content, and action
4
+ * buttons.
5
+ *
6
+ * @slot default The trigger element the tooltip is anchored to
7
+ * @slot content Rich-tooltip body content (only used when rich is true)
8
+ * @slot actions Rich-tooltip action buttons row (only used when rich is true)
9
+ */
2
10
  import { nextTick, onMounted, onUnmounted, ref } from 'vue'
3
11
 
12
+ defineOptions({ inheritAttrs: false })
13
+
4
14
  const props = withDefaults(defineProps<{
15
+ /** Tooltip text (plain variant), or the rich variant's title line */
5
16
  text?: string
17
+ /** Tooltip position relative to the trigger */
6
18
  placement?: 'top' | 'bottom' | 'left' | 'right'
19
+ /** Show delay in ms after hover/focus */
7
20
  delay?: number
21
+ /**
22
+ * Rich tooltip with a #content slot and optional #actions. Stays open when hovering the tooltip itself
23
+ * instead of closing immediately.
24
+ */
8
25
  rich?: boolean
9
26
  }>(), { placement: 'top', delay: 600, rich: false })
10
27
 
@@ -85,6 +102,7 @@ onUnmounted(() => {
85
102
  <template>
86
103
  <span
87
104
  ref="triggerEl"
105
+ v-bind="$attrs"
88
106
  class="inline-flex"
89
107
  @mouseenter="show"
90
108
  @mouseleave="hide"
@@ -1,16 +1,34 @@
1
1
  <script setup lang="ts">
2
+ /**
3
+ * A top app bar in four M3 layouts — center-aligned, small, medium, and large — with a leading navigation icon
4
+ * and trailing actions.
5
+ *
6
+ * @slot navigation Custom leading area (default: an MIconButton built from the navigationIcon prop)
7
+ * @slot title Custom title content (default: renders the title prop)
8
+ * @slot actions Trailing action buttons
9
+ * @event navigation Emitted when the default navigation icon button is clicked (not emitted when the
10
+ * #navigation slot is overridden — that content is fully custom)
11
+ */
2
12
  import MIconButton from './MIconButton.vue'
3
13
  import { useLocale } from '../composables/useLocale'
4
14
 
5
15
  withDefaults(defineProps<{
16
+ /** App bar title */
6
17
  title?: string
18
+ /** 64dp small/center-aligned row, or a 112dp medium / 152dp large two-row layout with the title below */
7
19
  variant?: 'center' | 'small' | 'medium' | 'large'
20
+ /** Leading icon (e.g. menu, arrow_back) */
8
21
  navigationIcon?: string
9
22
  /** Accessible label for the navigation icon button — defaults to the
10
23
  * locale's generic "Menu" label; override when navigationIcon is
11
24
  * actually a back arrow rather than a drawer toggle. */
12
25
  navigationLabel?: string
26
+ /**
27
+ * Swaps both container color (surface → surface-container) and elevation (level 0 → level 2), matching the
28
+ * real M3 on-scroll container tokens rather than just adding a shadow
29
+ */
13
30
  elevated?: boolean
31
+ /** Add a bottom border (border-outline-variant) */
14
32
  bordered?: boolean
15
33
  }>(), { variant: 'small' })
16
34
 
@@ -1,4 +1,12 @@
1
1
  <script setup lang="ts">
2
+ /**
3
+ * A guided, step-by-step walkthrough that highlights a page element per step with an auto-positioned tooltip
4
+ * and a dimming scrim.
5
+ *
6
+ * @event update:modelValue Emitted when the tour opens or closes (Escape-less — closed via the X button,
7
+ * clicking the scrim, or finishing) — powers v-model
8
+ * @event finish Emitted when the user completes the last step (clicks the finish button)
9
+ */
2
10
  import { ref, computed, watch, nextTick, onBeforeUnmount } from 'vue'
3
11
  import MButton from './MButton.vue'
4
12
  import MIcon from './MIcon.vue'
@@ -12,10 +20,15 @@ export interface TourStep {
12
20
  }
13
21
 
14
22
  const props = defineProps<{
23
+ /** Show/hide the tour (v-model) */
15
24
  modelValue: boolean
25
+ /** Ordered list of steps; see `TourStep` */
16
26
  steps: TourStep[]
27
+ /** Label for the Previous button (defaults to the locale string, 'Previous') */
17
28
  prevLabel?: string
29
+ /** Label for the Next button (defaults to the locale string, 'Next') */
18
30
  nextLabel?: string
31
+ /** Label for the final step's button (defaults to the locale string, 'Finish') */
19
32
  finishLabel?: string
20
33
  }>()
21
34
 
@@ -192,12 +205,12 @@ onBeforeUnmount(() => { stopListeners(); clearHighlight() })
192
205
  <template>
193
206
  <Teleport to="body">
194
207
  <!-- Overlay -->
195
- <Transition name="m3-tour">
208
+ <Transition name="m3-tour" appear>
196
209
  <div v-if="modelValue && step" class="fixed inset-0 z-200 bg-scrim/32" @click="close" />
197
210
  </Transition>
198
211
 
199
212
  <!-- Tooltip -->
200
- <Transition name="m3-tour">
213
+ <Transition name="m3-tour" appear>
201
214
  <div
202
215
  v-if="modelValue && step"
203
216
  class="fixed z-202 w-80 max-w-[calc(100vw-1rem)] rounded-xl bg-surface-container-high p-5 shadow-elevation-3"
@@ -9,6 +9,19 @@ export interface TransferItem {
9
9
  </script>
10
10
 
11
11
  <script setup lang="ts" generic="T extends TransferItem = TransferItem">
12
+ /**
13
+ * Move items between two panes, with select-all, optional search and v-model on the values in the target pane.
14
+ * Check rows and use the arrows, or double-click a row (or press Enter on its checkbox) to send it straight
15
+ * across. When the component is narrow, the panes stack and the arrows point up and down.
16
+ *
17
+ * @slot item Custom row content. Without bare it replaces the icon and text and keeps the checkbox, highlight
18
+ * and hover; with bare it draws the whole row. side is 'source' or 'target', toggle() checks the row, move()
19
+ * sends it to the other pane. Buttons, links, fields and elements with data-transfer-action keep their own
20
+ * clicks
21
+ * @slot source-empty Custom content when the source pane is empty
22
+ * @slot target-empty Custom content when the target pane is empty
23
+ * @event update:modelValue Emitted whenever items move between panes (v-model)
24
+ */
12
25
  import { computed, ref } from 'vue'
13
26
  import MIconButton from './MIconButton.vue'
14
27
  import MTransferPane from './_MTransferPane.vue'
@@ -19,16 +32,27 @@ const locale = useLocale()
19
32
  type Value = string | number
20
33
 
21
34
  const props = withDefaults(defineProps<{
35
+ /** Values in the target (right or bottom) pane (v-model) */
22
36
  modelValue: Value[]
37
+ /** Full list of items; see `TransferItem` (or your own type extending it) */
23
38
  items: T[]
39
+ /** Source pane title (defaults to the locale string) */
24
40
  sourceTitle?: string
41
+ /** Target pane title (defaults to the locale string) */
25
42
  targetTitle?: string
43
+ /** Show a search field in each pane. It matches the label and the description */
26
44
  filterable?: boolean
45
+ /** Search field placeholder (defaults to the locale string) */
27
46
  searchPlaceholder?: string
47
+ /** Text when a pane is empty (defaults to the locale string) */
28
48
  emptyText?: string
49
+ /** Aria label for the move-all-right button (defaults to the locale string) */
29
50
  moveAllRightLabel?: string
51
+ /** Aria label for the move-selected-right button (defaults to the locale string) */
30
52
  moveRightLabel?: string
53
+ /** Aria label for the move-selected-left button (defaults to the locale string) */
31
54
  moveLeftLabel?: string
55
+ /** Aria label for the move-all-left button (defaults to the locale string) */
32
56
  moveAllLeftLabel?: string
33
57
  /** Height of each list's scroll area (any CSS length). */
34
58
  listHeight?: string