@getcortexlabs/mavis-core 0.1.0-alpha.1 → 0.1.0-alpha.11

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 (482) hide show
  1. package/README.md +2 -2
  2. package/dist/accordion.d.ts +17 -0
  3. package/dist/accordion.d.ts.map +1 -0
  4. package/dist/accordion.js +42 -0
  5. package/dist/accordion.js.map +1 -0
  6. package/dist/alert.d.ts +21 -0
  7. package/dist/alert.d.ts.map +1 -0
  8. package/dist/alert.js +13 -0
  9. package/dist/alert.js.map +1 -0
  10. package/dist/app-icons.d.ts +27 -0
  11. package/dist/app-icons.d.ts.map +1 -0
  12. package/dist/app-icons.js +42 -0
  13. package/dist/app-icons.js.map +1 -0
  14. package/dist/avatar.d.ts +10 -0
  15. package/dist/avatar.d.ts.map +1 -0
  16. package/dist/avatar.js +11 -0
  17. package/dist/avatar.js.map +1 -0
  18. package/dist/badge.d.ts +7 -0
  19. package/dist/badge.d.ts.map +1 -0
  20. package/dist/badge.js +11 -0
  21. package/dist/badge.js.map +1 -0
  22. package/dist/capabilities.d.ts +132 -0
  23. package/dist/capabilities.d.ts.map +1 -0
  24. package/dist/capabilities.js +180 -0
  25. package/dist/capabilities.js.map +1 -0
  26. package/dist/chart.d.ts +40 -0
  27. package/dist/chart.d.ts.map +1 -0
  28. package/dist/chart.js +73 -0
  29. package/dist/chart.js.map +1 -0
  30. package/dist/chip.d.ts +9 -0
  31. package/dist/chip.d.ts.map +1 -0
  32. package/dist/chip.js +16 -0
  33. package/dist/chip.js.map +1 -0
  34. package/dist/choice-motion.d.ts +14 -0
  35. package/dist/choice-motion.d.ts.map +1 -0
  36. package/dist/choice-motion.js +5 -0
  37. package/dist/choice-motion.js.map +1 -0
  38. package/dist/choice.d.ts +15 -0
  39. package/dist/choice.d.ts.map +1 -0
  40. package/dist/choice.js +27 -0
  41. package/dist/choice.js.map +1 -0
  42. package/dist/collections.d.ts +46 -0
  43. package/dist/collections.d.ts.map +1 -0
  44. package/dist/collections.js +48 -0
  45. package/dist/collections.js.map +1 -0
  46. package/dist/combobox.d.ts +42 -0
  47. package/dist/combobox.d.ts.map +1 -0
  48. package/dist/combobox.js +159 -0
  49. package/dist/combobox.js.map +1 -0
  50. package/dist/contracts.d.ts +1321 -0
  51. package/dist/contracts.d.ts.map +1 -0
  52. package/dist/contracts.js +268 -0
  53. package/dist/contracts.js.map +1 -0
  54. package/dist/date-input.d.ts +10 -0
  55. package/dist/date-input.d.ts.map +1 -0
  56. package/dist/date-input.js +58 -0
  57. package/dist/date-input.js.map +1 -0
  58. package/dist/date-time.d.ts +19 -0
  59. package/dist/date-time.d.ts.map +1 -0
  60. package/dist/date-time.js +27 -0
  61. package/dist/date-time.js.map +1 -0
  62. package/dist/date.d.ts +96 -0
  63. package/dist/date.d.ts.map +1 -0
  64. package/dist/date.js +235 -0
  65. package/dist/date.js.map +1 -0
  66. package/dist/dialog.d.ts +4 -0
  67. package/dist/dialog.d.ts.map +1 -0
  68. package/dist/dialog.js +21 -0
  69. package/dist/dialog.js.map +1 -0
  70. package/dist/discovery.d.ts +49 -0
  71. package/dist/discovery.d.ts.map +1 -0
  72. package/dist/discovery.js +80 -0
  73. package/dist/discovery.js.map +1 -0
  74. package/dist/empty-state.d.ts +2 -0
  75. package/dist/empty-state.d.ts.map +1 -0
  76. package/dist/empty-state.js +5 -0
  77. package/dist/empty-state.js.map +1 -0
  78. package/dist/experimental-collections.d.ts +82 -0
  79. package/dist/experimental-collections.d.ts.map +1 -0
  80. package/dist/experimental-collections.js +8 -0
  81. package/dist/experimental-collections.js.map +1 -0
  82. package/dist/experimental-effects.d.ts +107 -0
  83. package/dist/experimental-effects.d.ts.map +1 -0
  84. package/dist/experimental-effects.js +24 -0
  85. package/dist/experimental-effects.js.map +1 -0
  86. package/dist/experimental-platforms.d.ts +94 -0
  87. package/dist/experimental-platforms.d.ts.map +1 -0
  88. package/dist/experimental-platforms.js +2 -0
  89. package/dist/experimental-platforms.js.map +1 -0
  90. package/dist/experimental-playback.d.ts +63 -0
  91. package/dist/experimental-playback.d.ts.map +1 -0
  92. package/dist/experimental-playback.js +46 -0
  93. package/dist/experimental-playback.js.map +1 -0
  94. package/dist/experimental-regions.d.ts +179 -0
  95. package/dist/experimental-regions.d.ts.map +1 -0
  96. package/dist/experimental-regions.js +554 -0
  97. package/dist/experimental-regions.js.map +1 -0
  98. package/dist/experimental-sensors.d.ts +42 -0
  99. package/dist/experimental-sensors.d.ts.map +1 -0
  100. package/dist/experimental-sensors.js +2 -0
  101. package/dist/experimental-sensors.js.map +1 -0
  102. package/dist/experimental-surfaces.d.ts +127 -0
  103. package/dist/experimental-surfaces.d.ts.map +1 -0
  104. package/dist/experimental-surfaces.js +2 -0
  105. package/dist/experimental-surfaces.js.map +1 -0
  106. package/dist/experimental.d.ts +197 -0
  107. package/dist/experimental.d.ts.map +1 -0
  108. package/dist/experimental.js +855 -0
  109. package/dist/experimental.js.map +1 -0
  110. package/dist/files.d.ts +87 -0
  111. package/dist/files.d.ts.map +1 -0
  112. package/dist/files.js +328 -0
  113. package/dist/files.js.map +1 -0
  114. package/dist/form.d.ts +39 -0
  115. package/dist/form.d.ts.map +1 -0
  116. package/dist/form.js +170 -0
  117. package/dist/form.js.map +1 -0
  118. package/dist/grid.d.ts +3 -0
  119. package/dist/grid.d.ts.map +1 -0
  120. package/dist/grid.js +16 -0
  121. package/dist/grid.js.map +1 -0
  122. package/dist/icon.d.ts +15 -0
  123. package/dist/icon.d.ts.map +1 -0
  124. package/dist/icon.js +28 -0
  125. package/dist/icon.js.map +1 -0
  126. package/dist/icons.d.ts +2002 -0
  127. package/dist/icons.d.ts.map +1 -0
  128. package/dist/icons.js +2003 -0
  129. package/dist/icons.js.map +1 -0
  130. package/dist/index.d.ts +59 -3
  131. package/dist/index.d.ts.map +1 -1
  132. package/dist/index.js +42 -1
  133. package/dist/index.js.map +1 -1
  134. package/dist/input.d.ts +14 -0
  135. package/dist/input.d.ts.map +1 -1
  136. package/dist/input.js +12 -0
  137. package/dist/input.js.map +1 -1
  138. package/dist/link.d.ts +36 -0
  139. package/dist/link.d.ts.map +1 -0
  140. package/dist/link.js +60 -0
  141. package/dist/link.js.map +1 -0
  142. package/dist/list-item.d.ts +3 -0
  143. package/dist/list-item.d.ts.map +1 -0
  144. package/dist/list-item.js +7 -0
  145. package/dist/list-item.js.map +1 -0
  146. package/dist/motion.d.ts +58 -0
  147. package/dist/motion.d.ts.map +1 -0
  148. package/dist/motion.js +73 -0
  149. package/dist/motion.js.map +1 -0
  150. package/dist/multi-select.d.ts +4 -0
  151. package/dist/multi-select.d.ts.map +1 -0
  152. package/dist/multi-select.js +23 -0
  153. package/dist/multi-select.js.map +1 -0
  154. package/dist/navigation-transition.d.ts +10 -0
  155. package/dist/navigation-transition.d.ts.map +1 -0
  156. package/dist/navigation-transition.js +10 -0
  157. package/dist/navigation-transition.js.map +1 -0
  158. package/dist/navigation.d.ts +22 -0
  159. package/dist/navigation.d.ts.map +1 -0
  160. package/dist/navigation.js +54 -0
  161. package/dist/navigation.js.map +1 -0
  162. package/dist/number-input.d.ts +21 -0
  163. package/dist/number-input.d.ts.map +1 -0
  164. package/dist/number-input.js +63 -0
  165. package/dist/number-input.js.map +1 -0
  166. package/dist/popover.d.ts +17 -0
  167. package/dist/popover.d.ts.map +1 -0
  168. package/dist/popover.js +19 -0
  169. package/dist/popover.js.map +1 -0
  170. package/dist/progress.d.ts +19 -0
  171. package/dist/progress.d.ts.map +1 -0
  172. package/dist/progress.js +19 -0
  173. package/dist/progress.js.map +1 -0
  174. package/dist/responsive.d.ts +18 -0
  175. package/dist/responsive.d.ts.map +1 -0
  176. package/dist/responsive.js +35 -0
  177. package/dist/responsive.js.map +1 -0
  178. package/dist/section-scroll.d.ts +14 -0
  179. package/dist/section-scroll.d.ts.map +1 -0
  180. package/dist/section-scroll.js +28 -0
  181. package/dist/section-scroll.js.map +1 -0
  182. package/dist/segmented.d.ts +11 -0
  183. package/dist/segmented.d.ts.map +1 -0
  184. package/dist/segmented.js +30 -0
  185. package/dist/segmented.js.map +1 -0
  186. package/dist/sheet.d.ts +19 -0
  187. package/dist/sheet.d.ts.map +1 -0
  188. package/dist/sheet.js +15 -0
  189. package/dist/sheet.js.map +1 -0
  190. package/dist/tabs.d.ts +11 -0
  191. package/dist/tabs.d.ts.map +1 -0
  192. package/dist/tabs.js +28 -0
  193. package/dist/tabs.js.map +1 -0
  194. package/dist/theme/themes.d.ts.map +1 -1
  195. package/dist/theme/themes.js +85 -12
  196. package/dist/theme/themes.js.map +1 -1
  197. package/dist/theme/types.d.ts +64 -4
  198. package/dist/theme/types.d.ts.map +1 -1
  199. package/dist/theme/typography.d.ts +10 -0
  200. package/dist/theme/typography.d.ts.map +1 -0
  201. package/dist/theme/typography.js +90 -0
  202. package/dist/theme/typography.js.map +1 -0
  203. package/dist/time.d.ts +34 -0
  204. package/dist/time.d.ts.map +1 -0
  205. package/dist/time.js +78 -0
  206. package/dist/time.js.map +1 -0
  207. package/dist/toast.d.ts +43 -0
  208. package/dist/toast.d.ts.map +1 -0
  209. package/dist/toast.js +228 -0
  210. package/dist/toast.js.map +1 -0
  211. package/dist/vue/button-content.d.ts +10 -0
  212. package/dist/vue/button-content.d.ts.map +1 -0
  213. package/dist/vue/button-content.js +54 -0
  214. package/dist/vue/button-content.js.map +1 -0
  215. package/dist/vue/cached-activity.d.ts +3 -0
  216. package/dist/vue/cached-activity.d.ts.map +1 -0
  217. package/dist/vue/cached-activity.js +13 -0
  218. package/dist/vue/cached-activity.js.map +1 -0
  219. package/dist/vue/carousel.d.ts +11 -0
  220. package/dist/vue/carousel.d.ts.map +1 -0
  221. package/dist/vue/carousel.js +115 -0
  222. package/dist/vue/carousel.js.map +1 -0
  223. package/dist/vue/chart.d.ts +194 -0
  224. package/dist/vue/chart.d.ts.map +1 -0
  225. package/dist/vue/chart.js +246 -0
  226. package/dist/vue/chart.js.map +1 -0
  227. package/dist/vue/combobox.d.ts +155 -0
  228. package/dist/vue/combobox.d.ts.map +1 -0
  229. package/dist/vue/combobox.js +195 -0
  230. package/dist/vue/combobox.js.map +1 -0
  231. package/dist/vue/command-palette.d.ts +129 -0
  232. package/dist/vue/command-palette.d.ts.map +1 -0
  233. package/dist/vue/command-palette.js +187 -0
  234. package/dist/vue/command-palette.js.map +1 -0
  235. package/dist/vue/component-props.d.ts +3310 -0
  236. package/dist/vue/component-props.d.ts.map +1 -0
  237. package/dist/vue/component-props.js +43 -0
  238. package/dist/vue/component-props.js.map +1 -0
  239. package/dist/vue/configurator-props.d.ts +277 -0
  240. package/dist/vue/configurator-props.d.ts.map +1 -0
  241. package/dist/vue/configurator-props.js +63 -0
  242. package/dist/vue/configurator-props.js.map +1 -0
  243. package/dist/vue/configurator.d.ts +403 -0
  244. package/dist/vue/configurator.d.ts.map +1 -0
  245. package/dist/vue/configurator.js +287 -0
  246. package/dist/vue/configurator.js.map +1 -0
  247. package/dist/vue/contracts.d.ts +18 -0
  248. package/dist/vue/contracts.d.ts.map +1 -0
  249. package/dist/vue/contracts.js +24 -0
  250. package/dist/vue/contracts.js.map +1 -0
  251. package/dist/vue/data-table.d.ts +17 -0
  252. package/dist/vue/data-table.d.ts.map +1 -0
  253. package/dist/vue/data-table.js +133 -0
  254. package/dist/vue/data-table.js.map +1 -0
  255. package/dist/vue/date-calendar.d.ts +64 -0
  256. package/dist/vue/date-calendar.d.ts.map +1 -0
  257. package/dist/vue/date-calendar.js +65 -0
  258. package/dist/vue/date-calendar.js.map +1 -0
  259. package/dist/vue/date-picker.d.ts +1000 -0
  260. package/dist/vue/date-picker.d.ts.map +1 -0
  261. package/dist/vue/date-picker.js +334 -0
  262. package/dist/vue/date-picker.js.map +1 -0
  263. package/dist/vue/date-props.d.ts +278 -0
  264. package/dist/vue/date-props.d.ts.map +1 -0
  265. package/dist/vue/date-props.js +81 -0
  266. package/dist/vue/date-props.js.map +1 -0
  267. package/dist/vue/dialog.d.ts +21 -0
  268. package/dist/vue/dialog.d.ts.map +1 -0
  269. package/dist/vue/dialog.js +58 -0
  270. package/dist/vue/dialog.js.map +1 -0
  271. package/dist/vue/discovery-components.d.ts +50 -0
  272. package/dist/vue/discovery-components.d.ts.map +1 -0
  273. package/dist/vue/discovery-components.js +2 -0
  274. package/dist/vue/discovery-components.js.map +1 -0
  275. package/dist/vue/discovery-controls.d.ts +197 -0
  276. package/dist/vue/discovery-controls.d.ts.map +1 -0
  277. package/dist/vue/discovery-controls.js +166 -0
  278. package/dist/vue/discovery-controls.js.map +1 -0
  279. package/dist/vue/discovery-props.d.ts +249 -0
  280. package/dist/vue/discovery-props.d.ts.map +1 -0
  281. package/dist/vue/discovery-props.js +87 -0
  282. package/dist/vue/discovery-props.js.map +1 -0
  283. package/dist/vue/files.d.ts +53 -0
  284. package/dist/vue/files.d.ts.map +1 -0
  285. package/dist/vue/files.js +40 -0
  286. package/dist/vue/files.js.map +1 -0
  287. package/dist/vue/forms.d.ts +4 -0
  288. package/dist/vue/forms.d.ts.map +1 -0
  289. package/dist/vue/forms.js +15 -0
  290. package/dist/vue/forms.js.map +1 -0
  291. package/dist/vue/global-components.d.ts +259 -3
  292. package/dist/vue/global-components.d.ts.map +1 -1
  293. package/dist/vue/index.d.ts +54 -4
  294. package/dist/vue/index.d.ts.map +1 -1
  295. package/dist/vue/index.js +45 -2
  296. package/dist/vue/index.js.map +1 -1
  297. package/dist/vue/inline-content.d.ts +54 -0
  298. package/dist/vue/inline-content.d.ts.map +1 -0
  299. package/dist/vue/inline-content.js +64 -0
  300. package/dist/vue/inline-content.js.map +1 -0
  301. package/dist/vue/layout-context.d.ts +4 -2
  302. package/dist/vue/layout-context.d.ts.map +1 -1
  303. package/dist/vue/layout-context.js +7 -2
  304. package/dist/vue/layout-context.js.map +1 -1
  305. package/dist/vue/list-motion.d.ts +7 -0
  306. package/dist/vue/list-motion.d.ts.map +1 -0
  307. package/dist/vue/list-motion.js +28 -0
  308. package/dist/vue/list-motion.js.map +1 -0
  309. package/dist/vue/loading-effect.d.ts +7 -0
  310. package/dist/vue/loading-effect.d.ts.map +1 -0
  311. package/dist/vue/loading-effect.js +32 -0
  312. package/dist/vue/loading-effect.js.map +1 -0
  313. package/dist/vue/menu.d.ts +122 -0
  314. package/dist/vue/menu.d.ts.map +1 -0
  315. package/dist/vue/menu.js +79 -0
  316. package/dist/vue/menu.js.map +1 -0
  317. package/dist/vue/navigation-controls.d.ts +124 -0
  318. package/dist/vue/navigation-controls.d.ts.map +1 -0
  319. package/dist/vue/navigation-controls.js +117 -0
  320. package/dist/vue/navigation-controls.js.map +1 -0
  321. package/dist/vue/navigation-props.d.ts +283 -0
  322. package/dist/vue/navigation-props.d.ts.map +1 -0
  323. package/dist/vue/navigation-props.js +82 -0
  324. package/dist/vue/navigation-props.js.map +1 -0
  325. package/dist/vue/navigation.d.ts +7 -0
  326. package/dist/vue/navigation.d.ts.map +1 -0
  327. package/dist/vue/navigation.js +15 -0
  328. package/dist/vue/navigation.js.map +1 -0
  329. package/dist/vue/platform.d.ts +37 -0
  330. package/dist/vue/platform.d.ts.map +1 -0
  331. package/dist/vue/platform.js +46 -0
  332. package/dist/vue/platform.js.map +1 -0
  333. package/dist/vue/props.d.ts +3326 -510
  334. package/dist/vue/props.d.ts.map +1 -1
  335. package/dist/vue/props.js +314 -83
  336. package/dist/vue/props.js.map +1 -1
  337. package/dist/vue/reveal-state.d.ts +18 -0
  338. package/dist/vue/reveal-state.d.ts.map +1 -0
  339. package/dist/vue/reveal-state.js +76 -0
  340. package/dist/vue/reveal-state.js.map +1 -0
  341. package/dist/vue/theme-provider.d.ts +58 -0
  342. package/dist/vue/theme-provider.d.ts.map +1 -0
  343. package/dist/vue/theme-provider.js +69 -0
  344. package/dist/vue/theme-provider.js.map +1 -0
  345. package/dist/vue/theme.d.ts +1029 -19
  346. package/dist/vue/theme.d.ts.map +1 -1
  347. package/dist/vue/theme.js +47 -2
  348. package/dist/vue/theme.js.map +1 -1
  349. package/dist/vue/time-picker.d.ts +488 -0
  350. package/dist/vue/time-picker.d.ts.map +1 -0
  351. package/dist/vue/time-picker.js +190 -0
  352. package/dist/vue/time-picker.js.map +1 -0
  353. package/dist/vue/toast.d.ts +29 -0
  354. package/dist/vue/toast.d.ts.map +1 -0
  355. package/dist/vue/toast.js +79 -0
  356. package/dist/vue/toast.js.map +1 -0
  357. package/dist/vue/tree-view.d.ts +111 -0
  358. package/dist/vue/tree-view.d.ts.map +1 -0
  359. package/dist/vue/tree-view.js +180 -0
  360. package/dist/vue/tree-view.js.map +1 -0
  361. package/dist/vue/virtual-list.d.ts +26 -0
  362. package/dist/vue/virtual-list.d.ts.map +1 -0
  363. package/dist/vue/virtual-list.js +2 -0
  364. package/dist/vue/virtual-list.js.map +1 -0
  365. package/dist/vue/wayfinding-controls.d.ts +198 -0
  366. package/dist/vue/wayfinding-controls.d.ts.map +1 -0
  367. package/dist/vue/wayfinding-controls.js +310 -0
  368. package/dist/vue/wayfinding-controls.js.map +1 -0
  369. package/dist/vue/wayfinding-props.d.ts +221 -0
  370. package/dist/vue/wayfinding-props.d.ts.map +1 -0
  371. package/dist/vue/wayfinding-props.js +86 -0
  372. package/dist/vue/wayfinding-props.js.map +1 -0
  373. package/dist/vue/workflow-props.d.ts +110 -0
  374. package/dist/vue/workflow-props.d.ts.map +1 -0
  375. package/dist/vue/workflow-props.js +37 -0
  376. package/dist/vue/workflow-props.js.map +1 -0
  377. package/dist/vue/workflows.d.ts +267 -0
  378. package/dist/vue/workflows.d.ts.map +1 -0
  379. package/dist/vue/workflows.js +200 -0
  380. package/dist/vue/workflows.js.map +1 -0
  381. package/dist/wayfinding.d.ts +50 -0
  382. package/dist/wayfinding.d.ts.map +1 -0
  383. package/dist/wayfinding.js +54 -0
  384. package/dist/wayfinding.js.map +1 -0
  385. package/package.json +5 -1
  386. package/src/accordion.ts +66 -0
  387. package/src/alert.ts +16 -0
  388. package/src/app-icons.ts +57 -0
  389. package/src/avatar.ts +11 -0
  390. package/src/badge.ts +11 -0
  391. package/src/capabilities.ts +183 -0
  392. package/src/chart.ts +112 -0
  393. package/src/chip.ts +20 -0
  394. package/src/choice-motion.ts +12 -0
  395. package/src/choice.ts +41 -0
  396. package/src/collections.ts +87 -0
  397. package/src/combobox.ts +198 -0
  398. package/src/contracts.ts +324 -0
  399. package/src/date-input.ts +87 -0
  400. package/src/date-time.ts +37 -0
  401. package/src/date.ts +280 -0
  402. package/src/dialog.ts +22 -0
  403. package/src/discovery.ts +139 -0
  404. package/src/empty-state.ts +4 -0
  405. package/src/experimental-collections.ts +87 -0
  406. package/src/experimental-effects.ts +146 -0
  407. package/src/experimental-platforms.ts +96 -0
  408. package/src/experimental-playback.ts +115 -0
  409. package/src/experimental-regions.ts +777 -0
  410. package/src/experimental-sensors.ts +50 -0
  411. package/src/experimental-surfaces.ts +124 -0
  412. package/src/experimental.ts +1102 -0
  413. package/src/files.ts +408 -0
  414. package/src/form.ts +190 -0
  415. package/src/grid.ts +19 -0
  416. package/src/icon.ts +30 -0
  417. package/src/icons.ts +2002 -0
  418. package/src/index.ts +93 -2
  419. package/src/input.ts +27 -0
  420. package/src/link.ts +91 -0
  421. package/src/list-item.ts +5 -0
  422. package/src/motion.ts +80 -0
  423. package/src/multi-select.ts +30 -0
  424. package/src/navigation-transition.ts +14 -0
  425. package/src/navigation.ts +61 -0
  426. package/src/number-input.ts +80 -0
  427. package/src/popover.ts +38 -0
  428. package/src/progress.ts +22 -0
  429. package/src/responsive.ts +61 -0
  430. package/src/section-scroll.ts +46 -0
  431. package/src/segmented.ts +39 -0
  432. package/src/sheet.ts +31 -0
  433. package/src/tabs.ts +35 -0
  434. package/src/theme/themes.ts +89 -12
  435. package/src/theme/types.ts +55 -2
  436. package/src/theme/typography.ts +84 -0
  437. package/src/time.ts +83 -0
  438. package/src/toast.ts +249 -0
  439. package/src/vue/button-content.ts +60 -0
  440. package/src/vue/cached-activity.ts +13 -0
  441. package/src/vue/carousel.ts +173 -0
  442. package/src/vue/chart.ts +338 -0
  443. package/src/vue/combobox.ts +238 -0
  444. package/src/vue/command-palette.ts +232 -0
  445. package/src/vue/component-props.ts +70 -0
  446. package/src/vue/configurator-props.ts +67 -0
  447. package/src/vue/configurator.ts +350 -0
  448. package/src/vue/contracts.ts +39 -0
  449. package/src/vue/data-table.ts +190 -0
  450. package/src/vue/date-calendar.ts +76 -0
  451. package/src/vue/date-picker.ts +410 -0
  452. package/src/vue/date-props.ts +89 -0
  453. package/src/vue/dialog.ts +63 -0
  454. package/src/vue/discovery-components.ts +60 -0
  455. package/src/vue/discovery-controls.ts +218 -0
  456. package/src/vue/discovery-props.ts +92 -0
  457. package/src/vue/files.ts +53 -0
  458. package/src/vue/forms.ts +20 -0
  459. package/src/vue/global-components.ts +248 -4
  460. package/src/vue/index.ts +97 -4
  461. package/src/vue/inline-content.ts +71 -0
  462. package/src/vue/layout-context.ts +10 -3
  463. package/src/vue/list-motion.ts +31 -0
  464. package/src/vue/loading-effect.ts +44 -0
  465. package/src/vue/menu.ts +100 -0
  466. package/src/vue/navigation-controls.ts +138 -0
  467. package/src/vue/navigation-props.ts +87 -0
  468. package/src/vue/navigation.ts +16 -0
  469. package/src/vue/platform.ts +73 -0
  470. package/src/vue/props.ts +348 -96
  471. package/src/vue/reveal-state.ts +83 -0
  472. package/src/vue/theme-provider.ts +74 -0
  473. package/src/vue/theme.ts +65 -3
  474. package/src/vue/time-picker.ts +227 -0
  475. package/src/vue/toast.ts +99 -0
  476. package/src/vue/tree-view.ts +220 -0
  477. package/src/vue/virtual-list.ts +28 -0
  478. package/src/vue/wayfinding-controls.ts +412 -0
  479. package/src/vue/wayfinding-props.ts +97 -0
  480. package/src/vue/workflow-props.ts +41 -0
  481. package/src/vue/workflows.ts +257 -0
  482. package/src/wayfinding.ts +85 -0
package/src/vue/index.ts CHANGED
@@ -1,24 +1,117 @@
1
1
  export { createThemeContext, themeKey, useMavisTheme } from './theme.js'
2
- export type { MavisThemeContext } from './theme.js'
3
- export { layoutDirection, useDefaultShrink } from './layout-context.js'
2
+ export { useMavisListMotion } from './list-motion.js'
3
+ export {
4
+ MPlatform,
5
+ useMavisPlatform,
6
+ platformProps,
7
+ platformKey,
8
+ createPlatformContext,
9
+ } from './platform.js'
10
+ export type { MavisPlatform, MavisPlatformTarget, MavisPlatformContext } from './platform.js'
11
+ export type {
12
+ MavisThemeContext,
13
+ Appearance,
14
+ AppearanceMode,
15
+ AppearanceSource,
16
+ ThemeContextOptions,
17
+ } from './theme.js'
18
+ export { layoutDirection, useDefaultShrink, useLayoutShrink } from './layout-context.js'
4
19
  export { textContent } from './text-content.js'
5
20
  export type {} from './global-components.js'
21
+ export type { InputPlatformAttributes } from './global-components.js'
6
22
  export {
7
23
  boxProps,
24
+ motionBoxProps,
8
25
  spacingProp,
9
26
  rowProps,
10
27
  columnProps,
28
+ stackProps,
29
+ gridProps,
30
+ linkProps,
31
+ linkEmits,
11
32
  cardProps,
12
33
  buttonProps,
13
34
  textProps,
14
35
  sliderProps,
15
36
  inputProps,
37
+ switchProps,
38
+ checkboxProps,
39
+ checkboxEmits,
40
+ radioGroupProps,
41
+ radioGroupEmits,
42
+ selectProps,
43
+ selectEmits,
44
+ switchEmits,
16
45
  inputEmits,
46
+ iconProps,
17
47
  screenProps,
18
48
  revealProps,
19
- componentProps,
49
+ sheetProps,
50
+ sheetEmits,
20
51
  viewAttrs,
21
52
  actionEmits,
22
53
  sliderEmits,
23
54
  } from './props.js'
24
- export type { BoxProps, ComponentProps, Align, Justify } from './props.js'
55
+ export type { BoxProps, Align, Justify } from './props.js'
56
+
57
+ export { useToast, useToastHost, installAppToast, useAppToastHost } from './toast.js'
58
+ export { toastProps } from './props.js'
59
+
60
+ export { useDialogState } from './dialog.js'
61
+ export { dialogProps, dialogEmits } from './props.js'
62
+
63
+ export { tabsProps, tabsEmits } from './props.js'
64
+
65
+ export { listItemProps, separatorProps, avatarProps, badgeProps, skeletonProps } from './props.js'
66
+
67
+ export { progressProps, alertProps, alertEmits } from './props.js'
68
+
69
+ export { accordionProps, accordionEmits, segmentedProps, segmentedEmits } from './props.js'
70
+
71
+ export { chipProps, chipEmits, emptyStateProps } from './props.js'
72
+
73
+ export { MThemeProvider, themeProviderProps } from './theme-provider.js'
74
+ export { MSpan, inlineContent } from './inline-content.js'
75
+ export type { TextRun } from './inline-content.js'
76
+ export { spanProps } from './props.js'
77
+
78
+ export { useCachedActivity } from './cached-activity.js'
79
+ export { buttonContent, ButtonAdornment, useButtonAction } from './button-content.js'
80
+
81
+ export { componentProps } from './component-props.js'
82
+ export type { ComponentProps } from './component-props.js'
83
+ export * from './date-props.js'
84
+ export * from './date-picker.js'
85
+ export * from './date-calendar.js'
86
+ export * from './combobox.js'
87
+ export * from './files.js'
88
+ export * from './forms.js'
89
+ export * from './workflow-props.js'
90
+ export * from './workflows.js'
91
+ export { useRevealState } from './reveal-state.js'
92
+ export type { RevealHost } from './reveal-state.js'
93
+
94
+ export * from './configurator-props.js'
95
+ export * from './configurator.js'
96
+ export { useLoadingDecoration } from './loading-effect.js'
97
+ export { navigationKey, useMavisNavigation, useNavigationOptions } from './navigation.js'
98
+
99
+ export * from './navigation-props.js'
100
+ export * from './navigation-controls.js'
101
+ export * from './menu.js'
102
+ export * from './time-picker.js'
103
+
104
+ export type { VirtualListComponent } from './virtual-list.js'
105
+
106
+ export * from './discovery-props.js'
107
+ export * from './discovery-controls.js'
108
+ export * from './carousel.js'
109
+ export * from './tree-view.js'
110
+ export * from './data-table.js'
111
+
112
+ export type { CarouselComponent, DataTableComponent } from './discovery-components.js'
113
+
114
+ export * from './wayfinding-props.js'
115
+ export * from './wayfinding-controls.js'
116
+ export * from './command-palette.js'
117
+ export * from './chart.js'
@@ -0,0 +1,71 @@
1
+ import { Comment, Fragment, Text, defineComponent, type VNode } from '@vue/runtime-core'
2
+ import type { FontWeight, Palette } from '../theme/types.js'
3
+ import { validateWeight } from '../theme/typography.js'
4
+ import { spanProps } from './props.js'
5
+
6
+ export interface TextRun {
7
+ text: string
8
+ weight?: FontWeight
9
+ tone?: keyof Palette
10
+ strong?: boolean
11
+ italic?: boolean
12
+ }
13
+
14
+ /** A declarative text run, consumed by MText before native/DOM views are created. */
15
+ export const MSpan = defineComponent({
16
+ name: 'MSpan',
17
+ inheritAttrs: false,
18
+ props: spanProps,
19
+ setup(): () => null {
20
+ throw new TypeError('MSpan must be inside MText or another MSpan')
21
+ },
22
+ })
23
+
24
+ export function inlineContent(
25
+ nodes: VNode[] = [],
26
+ inherited: Omit<TextRun, 'text'> = {},
27
+ ): TextRun[] {
28
+ const runs: TextRun[] = []
29
+ for (const node of Array.isArray(nodes) ? nodes : [nodes]) {
30
+ if (typeof node === 'string' || typeof node === 'number') {
31
+ runs.push({ ...inherited, text: String(node) })
32
+ continue
33
+ }
34
+ if (!node || typeof node === 'boolean') continue
35
+ if (node.type === Comment) continue
36
+ if (node.type === Text) {
37
+ runs.push({ ...inherited, text: String(node.children ?? '') })
38
+ } else if (node.type === Fragment) {
39
+ runs.push(...inlineContent(node.children as VNode[], inherited))
40
+ } else if (node.type === MSpan) {
41
+ const props = node.props ?? {}
42
+ for (const key of Object.keys(props)) {
43
+ if (!['text', 'weight', 'tone', 'emphasis', 'key'].includes(key)) {
44
+ throw new TypeError(`MSpan does not accept ${key}; use text, weight, tone or emphasis`)
45
+ }
46
+ }
47
+ if (props.emphasis !== undefined && !['strong', 'em'].includes(props.emphasis))
48
+ throw new RangeError('Unknown text emphasis')
49
+ const next = { ...inherited }
50
+ if (props.emphasis === 'strong') {
51
+ next.strong = true
52
+ next.weight = 'bold'
53
+ }
54
+ if (props.emphasis === 'em') next.italic = true
55
+ if (props.weight !== undefined) next.weight = validateWeight(props.weight)
56
+ if (props.tone !== undefined) next.tone = props.tone
57
+ const children = node.children as { default?: () => VNode[] } | VNode[] | null
58
+ if (props.text !== undefined) runs.push({ ...next, text: String(props.text) })
59
+ else if (typeof node.children === 'string') runs.push({ ...next, text: node.children })
60
+ else
61
+ runs.push(
62
+ ...inlineContent(Array.isArray(children) ? children : children?.default?.(), next),
63
+ )
64
+ } else {
65
+ throw new TypeError(
66
+ 'MText accepts text and MSpan. Use a layout for views; links have a separate navigation contract.',
67
+ )
68
+ }
69
+ }
70
+ return runs
71
+ }
@@ -1,8 +1,15 @@
1
- import { inject, type InjectionKey } from '@vue/runtime-core'
1
+ import { computed, inject, unref, type InjectionKey, type Ref } from '@vue/runtime-core'
2
2
 
3
- export const layoutDirection: InjectionKey<'row' | 'column'> = Symbol('mavis.layout')
3
+ export const layoutDirection: InjectionKey<'row' | 'column' | Readonly<Ref<'row' | 'column'>>> =
4
+ Symbol('mavis.layout')
4
5
 
5
6
  /** Rows may wrap text to fit their width; columns preserve the natural height of content. */
6
7
  export function useDefaultShrink(): number {
7
- return inject(layoutDirection, 'column') === 'row' ? 1 : 0
8
+ return unref(inject(layoutDirection, 'column')) === 'row' ? 1 : 0
9
+ }
10
+
11
+ /** A responsive parent changes direction without replacing its children. */
12
+ export function useLayoutShrink() {
13
+ const direction = inject(layoutDirection, 'column')
14
+ return computed(() => (unref(direction) === 'row' ? 1 : 0))
8
15
  }
@@ -0,0 +1,31 @@
1
+ import { markRaw, onScopeDispose } from '@vue/runtime-core'
2
+ import {
3
+ createMotionRegion,
4
+ type MotionLayoutOptions,
5
+ type MotionPlayback,
6
+ } from '../experimental.js'
7
+
8
+ /** Shared Vue data changes; the host measures keyed direct children and Jolt owns playback. */
9
+ export function useMavisListMotion(options: MotionLayoutOptions = {}) {
10
+ const region = markRaw(createMotionRegion())
11
+ let active: MotionPlayback | undefined
12
+ let disposed = false
13
+ onScopeDispose(() => {
14
+ disposed = true
15
+ active?.stop()
16
+ })
17
+ return {
18
+ region,
19
+ update(change: () => void): MotionPlayback {
20
+ if (disposed) throw new Error('This list motion scope is disposed.')
21
+ if (typeof change !== 'function')
22
+ throw new TypeError('List motion needs a synchronous data change.')
23
+ if (!region.available) {
24
+ change()
25
+ return { finished: Promise.resolve(false), stop() {} }
26
+ }
27
+ active = region.animateLayout(change, options)
28
+ return active
29
+ },
30
+ }
31
+ }
@@ -0,0 +1,44 @@
1
+ import { watch, onScopeDispose } from '@vue/runtime-core'
2
+ import { markRaw } from '@vue/reactivity'
3
+ import {
4
+ createMotionSurface,
5
+ type MotionLoadingEffect,
6
+ type MotionLoaderOptions,
7
+ } from '../experimental.js'
8
+
9
+ /** Internal decoration; the declared presentation and Jolt own its lifetime. */
10
+ export function useLoadingDecoration(
11
+ settings: () => MotionLoaderOptions & {
12
+ kind: 'shimmer' | 'dots' | 'bars' | 'ring'
13
+ animated: boolean
14
+ },
15
+ ) {
16
+ const surface = markRaw(createMotionSurface())
17
+ const off = surface.use((motion) => {
18
+ let resource: MotionLoadingEffect | undefined
19
+ const stop = watch(
20
+ settings,
21
+ (options) => {
22
+ resource?.dispose()
23
+ resource = undefined
24
+ if (!options.animated) return
25
+ resource =
26
+ options.kind === 'shimmer'
27
+ ? motion.shimmer({ duration: options.duration })
28
+ : motion.loader({
29
+ style: options.kind,
30
+ size: options.size,
31
+ color: options.color,
32
+ duration: options.duration,
33
+ })
34
+ },
35
+ { immediate: true },
36
+ )
37
+ return () => {
38
+ stop()
39
+ resource?.dispose()
40
+ }
41
+ })
42
+ onScopeDispose(off)
43
+ return surface
44
+ }
@@ -0,0 +1,100 @@
1
+ import { defineComponent, h, type Component } from '@vue/runtime-core'
2
+ import { choiceKey, type ChoiceValue } from '../choice.js'
3
+ import { validateMenu, type MenuAction } from '../collections.js'
4
+ import type { PopoverCloseReason } from '../popover.js'
5
+ import { menuProps } from './navigation-props.js'
6
+ import { MThemeProvider } from './theme-provider.js'
7
+ import { useMavisTheme } from './theme.js'
8
+
9
+ export function createMenu(
10
+ ui: {
11
+ Popover: Component
12
+ Column: Component
13
+ Text: Component
14
+ Button: Component
15
+ Separator: Component
16
+ },
17
+ keyboard?: (event: unknown) => void,
18
+ ) {
19
+ return defineComponent({
20
+ name: 'MMenu',
21
+ inheritAttrs: false,
22
+ props: menuProps,
23
+ emits: {
24
+ 'update:open': (_open: boolean) => true,
25
+ select: (_value: ChoiceValue, _item: MenuAction) => true,
26
+ close: (_reason: PopoverCloseReason) => true,
27
+ },
28
+ setup(props, { attrs, emit }) {
29
+ const { theme } = useMavisTheme()
30
+ return () => {
31
+ validateMenu(props.items)
32
+ const { items: _items, ...presentation } = props
33
+ return h(
34
+ ui.Popover,
35
+ {
36
+ ...attrs,
37
+ ...presentation,
38
+ role: 'menu',
39
+ padding: 'xs',
40
+ 'onUpdate:open': (open: boolean) => emit('update:open', open),
41
+ onClose: (reason: PopoverCloseReason) => emit('close', reason),
42
+ },
43
+ () =>
44
+ h(ui.Column, { gap: 'xs', ...(keyboard ? { onKeydown: keyboard } : {}) }, () =>
45
+ props.items.map((item) => {
46
+ if ('type' in item)
47
+ return item.type === 'separator'
48
+ ? h(ui.Separator, { key: `decoration:${item.key}` })
49
+ : h(ui.Text, {
50
+ key: `decoration:${item.key}`,
51
+ text: item.label,
52
+ accessibilityLabel: item.label,
53
+ variant: 'overline',
54
+ tone: 'muted',
55
+ })
56
+ const action = () =>
57
+ h(ui.Button, {
58
+ key: choiceKey(item.value),
59
+ text: item.label,
60
+ accessibilityLabel: item.label,
61
+ icon: item.icon,
62
+ variant: 'ghost',
63
+ disabled: item.disabled,
64
+ ...(keyboard
65
+ ? {
66
+ role: 'menuitem',
67
+ tabindex: -1,
68
+ style: {
69
+ justifyContent: 'flex-start',
70
+ color: item.destructive ? theme.value.colors.danger : undefined,
71
+ },
72
+ }
73
+ : {}),
74
+ onClick: () => {
75
+ if (!props.open || props.disabled || item.disabled) return
76
+ emit('select', item.value, item)
77
+ emit('update:open', false)
78
+ emit('close', 'select')
79
+ },
80
+ })
81
+ return h(
82
+ MThemeProvider,
83
+ {
84
+ key: choiceKey(item.value),
85
+ theme: item.destructive
86
+ ? {
87
+ ...theme.value,
88
+ colors: { ...theme.value.colors, text: theme.value.colors.danger },
89
+ }
90
+ : theme.value,
91
+ },
92
+ action,
93
+ )
94
+ }),
95
+ ),
96
+ )
97
+ }
98
+ },
99
+ })
100
+ }
@@ -0,0 +1,138 @@
1
+ import { defineComponent, h, inject, mergeProps, type Component } from '@vue/runtime-core'
2
+ import { choiceKey } from '../choice.js'
3
+ import { validateNavigation } from '../collections.js'
4
+ import { appBarProps, tabBarProps } from './navigation-props.js'
5
+ import { navigationKey } from './navigation.js'
6
+ import { useMavisTheme } from './theme.js'
7
+
8
+ export function createNavigationControls(
9
+ ui: { Row: Component; Column: Component; Text: Component; Button: Component; Badge: Component },
10
+ platform: 'web' | 'native',
11
+ ) {
12
+ const MAppBar = defineComponent({
13
+ name: 'MAppBar',
14
+ inheritAttrs: false,
15
+ props: appBarProps,
16
+ emits: { back: () => true, error: (_error: unknown) => true },
17
+ setup(props, { attrs, slots, emit }) {
18
+ const navigation = inject(navigationKey, undefined)
19
+ const { theme } = useMavisTheme()
20
+ async function back() {
21
+ try {
22
+ const navigate = props.navigateBack ?? navigation?.back
23
+ if (!navigate) throw new Error('MAppBar back requires navigation or navigateBack.')
24
+ await navigate()
25
+ emit('back')
26
+ } catch (error) {
27
+ emit('error', error)
28
+ }
29
+ }
30
+ return () => {
31
+ if (!props.title.trim()) throw new TypeError('App bars require a title.')
32
+ return h(
33
+ ui.Row,
34
+ mergeProps(
35
+ {
36
+ id: props.id,
37
+ padding: 'md',
38
+ gap: 'md',
39
+ shrink: 0,
40
+ backgroundColor: theme.value.colors.surface,
41
+ },
42
+ attrs,
43
+ platform === 'web'
44
+ ? { role: 'group', 'aria-label': props.title, class: 'm-app-bar' }
45
+ : {},
46
+ ),
47
+ () => [
48
+ props.back
49
+ ? h(ui.Button, {
50
+ icon: 'arrow-left',
51
+ accessibilityLabel: props.backLabel,
52
+ variant: 'ghost',
53
+ onClick: back,
54
+ })
55
+ : null,
56
+ slots.leading?.(),
57
+ h(ui.Column, { grow: 1, shrink: 1, gap: 'xs' }, () => [
58
+ h(ui.Text, { text: props.title, variant: 'heading', as: 'h1' }),
59
+ props.subtitle
60
+ ? h(ui.Text, { text: props.subtitle, variant: 'caption', tone: 'muted' })
61
+ : null,
62
+ ]),
63
+ slots.actions?.(),
64
+ ],
65
+ )
66
+ }
67
+ },
68
+ })
69
+ const MTabBar = defineComponent({
70
+ name: 'MTabBar',
71
+ inheritAttrs: false,
72
+ props: tabBarProps,
73
+ emits: { error: (_error: unknown) => true },
74
+ setup(props, { attrs, emit }) {
75
+ const { theme } = useMavisTheme()
76
+ return () => {
77
+ validateNavigation(props.items)
78
+ if (!props.label.trim()) throw new TypeError('Tab bars require a navigation label.')
79
+ return h(
80
+ ui.Row,
81
+ mergeProps(
82
+ {
83
+ id: props.id,
84
+ gap: 'xs',
85
+ padding: 'sm',
86
+ shrink: 0,
87
+ backgroundColor: theme.value.colors.surface,
88
+ },
89
+ attrs,
90
+ platform === 'web'
91
+ ? {
92
+ role: 'navigation',
93
+ 'aria-label': props.label,
94
+ class: 'm-tab-bar',
95
+ style: props.safeArea
96
+ ? {
97
+ paddingBottom:
98
+ 'max(var(--m-tab-padding, 8px), env(safe-area-inset-bottom))',
99
+ }
100
+ : undefined,
101
+ }
102
+ : { accessibilityLabel: props.label },
103
+ ),
104
+ () =>
105
+ props.items.map((item) => {
106
+ const current = item.value === props.modelValue
107
+ return h(
108
+ ui.Button,
109
+ {
110
+ key: choiceKey(item.value),
111
+ grow: 1,
112
+ shrink: 1,
113
+ text: item.label,
114
+ icon: item.icon,
115
+ href: item.href,
116
+ navigate: item.navigate,
117
+ disabled: props.disabled || item.disabled,
118
+ variant: current ? 'primary' : 'ghost',
119
+ accessibilityLabel: `${item.label}${item.badge !== undefined ? ` ${item.badge}` : ''}${current && platform === 'native' ? `. ${props.currentLabel}` : ''}`,
120
+ ...(platform === 'web' ? { 'aria-current': current ? 'page' : undefined } : {}),
121
+ onError: (error: unknown) => emit('error', error),
122
+ },
123
+ item.badge === undefined
124
+ ? undefined
125
+ : {
126
+ trailing: () => [
127
+ platform === 'web' ? ' ' : null,
128
+ h(ui.Badge, { text: String(item.badge), accessibilityHidden: true }),
129
+ ],
130
+ },
131
+ )
132
+ }),
133
+ )
134
+ }
135
+ },
136
+ })
137
+ return { MAppBar, MTabBar }
138
+ }
@@ -0,0 +1,87 @@
1
+ import type { PropType } from '@vue/runtime-core'
2
+ import type { ChoiceValue } from '../choice.js'
3
+ import type { MenuItem, NavigationItem, VirtualItemKey } from '../collections.js'
4
+ import type { PopoverPlacement } from '../popover.js'
5
+ import type { HourCycle, LocalTime, TimeLocale } from '../time.js'
6
+ import { buttonProps, inputProps, spacingProp } from './props.js'
7
+
8
+ export const popoverProps = {
9
+ id: inputProps.id,
10
+ open: Boolean,
11
+ label: { type: String, required: true as const },
12
+ triggerLabel: { type: String, required: true as const },
13
+ icon: buttonProps.icon,
14
+ variant: { ...buttonProps.variant, default: 'secondary' },
15
+ disabled: Boolean,
16
+ placement: { type: String as PropType<PopoverPlacement>, default: 'bottom-start' },
17
+ width: { type: Number, default: 280 },
18
+ padding: { ...spacingProp, default: 'md' },
19
+ /** Menu owns its keyboard behavior; ordinary popovers contain arbitrary controls. */
20
+ role: { type: String as PropType<'dialog' | 'menu'>, default: 'dialog' },
21
+ }
22
+ export const menuProps = {
23
+ ...popoverProps,
24
+ items: { type: Array as PropType<readonly MenuItem[]>, required: true as const },
25
+ }
26
+ export const appBarProps = {
27
+ id: inputProps.id,
28
+ title: { type: String, required: true as const },
29
+ subtitle: String,
30
+ back: Boolean,
31
+ backLabel: { type: String, default: 'Back' },
32
+ /** Optional app-owned callback; otherwise uses the installed navigation service. */
33
+ navigateBack: Function as PropType<() => void | Promise<unknown>>,
34
+ }
35
+ export const tabBarProps = {
36
+ id: inputProps.id,
37
+ label: { type: String, required: true as const },
38
+ modelValue: { type: [String, Number] as PropType<ChoiceValue | null>, default: null },
39
+ items: { type: Array as PropType<readonly NavigationItem[]>, required: true as const },
40
+ disabled: Boolean,
41
+ currentLabel: { type: String, default: 'Current page' },
42
+ /** Web viewport inset; native MScreen already owns the safe area. */
43
+ safeArea: { type: Boolean, default: false },
44
+ }
45
+ export const timePickerProps = {
46
+ id: inputProps.id,
47
+ label: inputProps.label,
48
+ width: inputProps.width,
49
+ grow: inputProps.grow,
50
+ shrink: inputProps.shrink,
51
+ modelValue: { type: String as PropType<LocalTime | null>, default: null },
52
+ draft: { type: String, default: undefined },
53
+ min: String,
54
+ max: String,
55
+ minuteStep: { type: Number, default: 1 },
56
+ locale: { type: String as PropType<TimeLocale>, default: 'en-US' },
57
+ hourCycle: String as PropType<HourCycle>,
58
+ name: inputProps.name,
59
+ disabled: Boolean,
60
+ readonly: Boolean,
61
+ required: Boolean,
62
+ helperText: inputProps.helperText,
63
+ error: inputProps.error,
64
+ placeholder: { type: String, default: undefined },
65
+ chooseLabel: { type: String, default: 'Choose time' },
66
+ confirmLabel: { type: String, default: 'Apply' },
67
+ cancelLabel: { type: String, default: 'Cancel' },
68
+ clearLabel: { type: String, default: 'Clear time' },
69
+ hourLabel: { type: String, default: 'Hour' },
70
+ minuteLabel: { type: String, default: 'Minute' },
71
+ periodLabel: { type: String, default: 'Period' },
72
+ invalidLabel: {
73
+ type: String,
74
+ default: 'Enter a valid time within the allowed range and interval.',
75
+ },
76
+ }
77
+ export const virtualListProps = {
78
+ id: inputProps.id,
79
+ label: { type: String, required: true as const },
80
+ items: { type: Array as PropType<readonly unknown[]>, required: true as const },
81
+ itemKey: { type: [String, Function] as PropType<VirtualItemKey>, default: 'id' },
82
+ rowHeight: { type: Number, required: true as const },
83
+ height: { type: Number, required: true as const },
84
+ overscan: { type: Number, default: 3 },
85
+ initialIndex: { type: Number, default: 0 },
86
+ emptyLabel: { type: String, default: 'No items' },
87
+ }
@@ -0,0 +1,16 @@
1
+ import { inject, type InjectionKey } from '@vue/runtime-core'
2
+ import { resolveNavigation, type MavisNavigation, type NavigationOptions } from '../link.js'
3
+
4
+ export const navigationKey: InjectionKey<MavisNavigation | undefined> = Symbol('mavis-navigation')
5
+
6
+ export function useMavisNavigation(): MavisNavigation {
7
+ const navigation = inject(navigationKey, undefined)
8
+ if (!navigation) throw new Error('Provide navigation when installing Mavis in this app.')
9
+ return navigation
10
+ }
11
+
12
+ /** Renderer helper; read reactive component props at render/activation time. */
13
+ export function useNavigationOptions(options: NavigationOptions) {
14
+ const navigation = inject(navigationKey, undefined)
15
+ return () => resolveNavigation(options, navigation)
16
+ }