@maz-ui/mcp 5.0.1-beta.0 → 5.1.0-beta.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 (343) hide show
  1. package/README.md +61 -228
  2. package/bin/maz-ui-mcp.mjs +2 -5
  3. package/dist/cli.d.mts +7 -0
  4. package/dist/cli.d.ts +7 -0
  5. package/dist/cli.mjs +16 -0
  6. package/dist/index.d.mts +345 -0
  7. package/dist/index.d.ts +345 -0
  8. package/dist/index.mjs +16 -0
  9. package/dist/shared/mcp.DseFuKdl.mjs +2968 -0
  10. package/docs/README.md +207 -0
  11. package/docs/agents/agents-md.md +52 -0
  12. package/docs/agents/claude-rule.md +52 -0
  13. package/docs/components/maz-accordion.md +78 -0
  14. package/docs/{src/components → components}/maz-alert.md +31 -164
  15. package/docs/components/maz-animated-counter.md +87 -0
  16. package/docs/components/maz-animated-element.md +46 -0
  17. package/docs/components/maz-animated-text.md +53 -0
  18. package/docs/components/maz-avatar.md +193 -0
  19. package/docs/components/maz-backdrop.md +178 -0
  20. package/docs/{src/components → components}/maz-badge.md +26 -67
  21. package/docs/components/maz-bottom-sheet.md +257 -0
  22. package/docs/{src/components → components}/maz-btn-group.md +27 -189
  23. package/docs/{src/components → components}/maz-btn.md +62 -245
  24. package/docs/components/maz-card-spotlight.md +84 -0
  25. package/docs/{src/components → components}/maz-card.md +67 -192
  26. package/docs/components/maz-carousel.md +153 -0
  27. package/docs/{src/components → components}/maz-chart.md +17 -161
  28. package/docs/components/maz-checkbox.md +138 -0
  29. package/docs/components/maz-checklist.md +251 -0
  30. package/docs/components/maz-circular-progress-bar.md +109 -0
  31. package/docs/{src/components → components}/maz-code-highlight.md +15 -93
  32. package/docs/components/maz-container.md +241 -0
  33. package/docs/{src/components → components}/maz-date-picker.md +85 -454
  34. package/docs/components/maz-dialog-confirm.md +215 -0
  35. package/docs/components/maz-dialog.md +143 -0
  36. package/docs/components/maz-drawer.md +107 -0
  37. package/docs/components/maz-dropdown.md +419 -0
  38. package/docs/{src/components → components}/maz-dropzone.md +80 -221
  39. package/docs/components/maz-expand-animation.md +82 -0
  40. package/docs/components/maz-fullscreen-loader.md +58 -0
  41. package/docs/components/maz-gallery.md +79 -0
  42. package/docs/{src/components → components}/maz-icon.md +32 -83
  43. package/docs/components/maz-input-code.md +73 -0
  44. package/docs/components/maz-input-number.md +79 -0
  45. package/docs/components/maz-input-phone-number.md +536 -0
  46. package/docs/components/maz-input-price.md +68 -0
  47. package/docs/components/maz-input-tags.md +112 -0
  48. package/docs/{src/components → components}/maz-input.md +74 -221
  49. package/docs/components/maz-lazy-img.md +113 -0
  50. package/docs/components/maz-link.md +146 -0
  51. package/docs/components/maz-loading-bar.md +38 -0
  52. package/docs/{src/components → components}/maz-markdown-editor.md +72 -125
  53. package/docs/components/maz-pagination.md +82 -0
  54. package/docs/components/maz-popover.md +794 -0
  55. package/docs/{src/components → components}/maz-pull-to-refresh.md +59 -45
  56. package/docs/components/maz-radio-buttons.md +313 -0
  57. package/docs/components/maz-radio.md +119 -0
  58. package/docs/{src/components → components}/maz-read-more.md +31 -122
  59. package/docs/components/maz-reading-progress-bar.md +96 -0
  60. package/docs/{src/components → components}/maz-select-country.md +80 -340
  61. package/docs/{src/components → components}/maz-select.md +76 -206
  62. package/docs/components/maz-sidebar-content.md +25 -0
  63. package/docs/components/maz-sidebar-footer.md +25 -0
  64. package/docs/components/maz-sidebar-group.md +27 -0
  65. package/docs/components/maz-sidebar-header.md +25 -0
  66. package/docs/components/maz-sidebar-menu-button.md +41 -0
  67. package/docs/components/maz-sidebar-menu-item.md +25 -0
  68. package/docs/components/maz-sidebar-menu-sub.md +32 -0
  69. package/docs/components/maz-sidebar-menu.md +25 -0
  70. package/docs/components/maz-sidebar-separator.md +21 -0
  71. package/docs/components/maz-sidebar-trigger.md +25 -0
  72. package/docs/{src/components → components}/maz-sidebar.md +117 -329
  73. package/docs/{src/components → components}/maz-skeleton.md +27 -156
  74. package/docs/{src/components → components}/maz-slider.md +33 -66
  75. package/docs/components/maz-spinner.md +84 -0
  76. package/docs/{src/components → components}/maz-stepper.md +48 -185
  77. package/docs/components/maz-switch.md +86 -0
  78. package/docs/components/maz-table-cell.md +27 -0
  79. package/docs/components/maz-table-row.md +28 -0
  80. package/docs/components/maz-table-title.md +27 -0
  81. package/docs/components/maz-table-virtualizer.md +31 -0
  82. package/docs/components/maz-table.md +426 -0
  83. package/docs/components/maz-tabs-bar.md +43 -0
  84. package/docs/components/maz-tabs-content-item.md +27 -0
  85. package/docs/components/maz-tabs-content.md +27 -0
  86. package/docs/{src/components → components}/maz-tabs.md +89 -126
  87. package/docs/components/maz-textarea.md +255 -0
  88. package/docs/components/maz-ticker.md +427 -0
  89. package/docs/components/maz-timeline.md +304 -0
  90. package/docs/components/maz-ui-provider.md +26 -0
  91. package/docs/{src/components → components}/maz-window-mockup.md +38 -105
  92. package/docs/composables/use-aos.md +41 -0
  93. package/docs/composables/use-breakpoints.md +42 -0
  94. package/docs/composables/use-dialog.md +58 -0
  95. package/docs/{src/composables → composables}/use-display-names.md +12 -59
  96. package/docs/{src/composables → composables}/use-drag.md +14 -68
  97. package/docs/{src/composables → composables}/use-form-validator.md +22 -696
  98. package/docs/{src/composables → composables}/use-idle-timeout.md +13 -97
  99. package/docs/{src/composables → composables}/use-pull-to-refresh.md +14 -7
  100. package/docs/{src/composables → composables}/use-reading-time.md +20 -56
  101. package/docs/composables/use-string-matching.md +41 -0
  102. package/docs/{src/composables → composables}/use-swipe.md +14 -81
  103. package/docs/{src/composables → composables}/use-timer.md +12 -38
  104. package/docs/composables/use-toast.md +50 -0
  105. package/docs/{src/composables → composables}/use-user-visibility.md +14 -56
  106. package/docs/composables/use-wait.md +50 -0
  107. package/docs/composables/use-window-size.md +25 -0
  108. package/docs/{src/directives → directives}/click-outside.md +13 -99
  109. package/docs/{src/directives → directives}/fullscreen-img.md +10 -28
  110. package/docs/{src/directives → directives}/lazy-img.md +14 -49
  111. package/docs/{src/directives → directives}/tooltip.md +12 -217
  112. package/docs/{src/directives → directives}/zoom-img.md +11 -38
  113. package/docs/{src/ecosystem → ecosystem}/eslint-config.md +37 -29
  114. package/docs/ecosystem/icons/icon-set.md +25 -0
  115. package/docs/{src/ecosystem → ecosystem}/icons/index.md +21 -15
  116. package/docs/ecosystem/mcp.md +165 -0
  117. package/docs/{src/ecosystem → ecosystem}/node/exec-promise.md +12 -6
  118. package/docs/ecosystem/node/index.md +53 -0
  119. package/docs/{src/ecosystem → ecosystem}/node/logger.md +12 -6
  120. package/docs/{src/ecosystem → ecosystem}/node/print-banner.md +12 -4
  121. package/docs/ecosystem/node/setup-agents.md +102 -0
  122. package/docs/{src/ecosystem → ecosystem}/nuxt.md +50 -19
  123. package/docs/{src/ecosystem → ecosystem}/stylelint-config.md +33 -25
  124. package/docs/{src/ecosystem → ecosystem}/themes.md +72 -235
  125. package/docs/{src/ecosystem → ecosystem}/translations.md +25 -23
  126. package/docs/ecosystem/utils/camel-case.md +37 -0
  127. package/docs/ecosystem/utils/capitalize.md +37 -0
  128. package/docs/{src/ecosystem → ecosystem}/utils/check-availability.md +14 -8
  129. package/docs/{src/ecosystem → ecosystem}/utils/cookie.md +18 -12
  130. package/docs/ecosystem/utils/country-code-to-unicode-flag.md +128 -0
  131. package/docs/{src/ecosystem → ecosystem}/utils/currency.md +12 -26
  132. package/docs/{src/ecosystem → ecosystem}/utils/date.md +10 -24
  133. package/docs/ecosystem/utils/debounce-callback.md +44 -0
  134. package/docs/{src/ecosystem → ecosystem}/utils/debounce-id.md +14 -8
  135. package/docs/{src/ecosystem → ecosystem}/utils/debounce.md +14 -8
  136. package/docs/ecosystem/utils/fetch-locale-ip.md +39 -0
  137. package/docs/{src/ecosystem → ecosystem}/utils/format-json.md +11 -5
  138. package/docs/{src/ecosystem → ecosystem}/utils/format-phone-number.md +12 -6
  139. package/docs/ecosystem/utils/get-browser-locale.md +35 -0
  140. package/docs/ecosystem/utils/get-country-flag-url.md +67 -0
  141. package/docs/{src/ecosystem → ecosystem}/utils/get-error-message.md +10 -4
  142. package/docs/{src/ecosystem → ecosystem}/utils/idle-timeout.md +15 -9
  143. package/docs/{src/ecosystem → ecosystem}/utils/index.md +10 -13
  144. package/docs/{src/ecosystem → ecosystem}/utils/is-client.md +11 -5
  145. package/docs/{src/ecosystem → ecosystem}/utils/is-equal.md +14 -8
  146. package/docs/{src/ecosystem → ecosystem}/utils/is-ios.md +12 -6
  147. package/docs/ecosystem/utils/is-server.md +37 -0
  148. package/docs/ecosystem/utils/is-standalone-mode.md +49 -0
  149. package/docs/{src/ecosystem → ecosystem}/utils/kebab-case.md +10 -4
  150. package/docs/{src/ecosystem → ecosystem}/utils/normalize-string.md +10 -4
  151. package/docs/{src/ecosystem → ecosystem}/utils/number.md +10 -24
  152. package/docs/{src/ecosystem → ecosystem}/utils/pascal-case.md +11 -5
  153. package/docs/{src/ecosystem → ecosystem}/utils/prevent-ios-input-zoom.md +14 -8
  154. package/docs/{src/ecosystem → ecosystem}/utils/script-loader.md +16 -8
  155. package/docs/{src/ecosystem → ecosystem}/utils/sleep.md +10 -4
  156. package/docs/{src/ecosystem → ecosystem}/utils/snake-case.md +10 -4
  157. package/docs/{src/ecosystem → ecosystem}/utils/swipe-handler.md +14 -8
  158. package/docs/{src/ecosystem → ecosystem}/utils/textarea-autogrow.md +12 -6
  159. package/docs/{src/ecosystem → ecosystem}/utils/throttle-id.md +13 -7
  160. package/docs/{src/ecosystem → ecosystem}/utils/throttle.md +14 -8
  161. package/docs/ecosystem/utils/truthy-filter.md +37 -0
  162. package/docs/{src/ecosystem → ecosystem}/utils/types/deep-key-of.md +11 -5
  163. package/docs/{src/ecosystem → ecosystem}/utils/types/deep-partial.md +10 -4
  164. package/docs/ecosystem/utils/types/deep-required.md +45 -0
  165. package/docs/ecosystem/utils/types/flatten-object-keys.md +50 -0
  166. package/docs/{src/ecosystem → ecosystem}/utils/types/generic-instance-type.md +10 -4
  167. package/docs/{src/ecosystem → ecosystem}/utils/types/infer-maybe-ref.md +10 -4
  168. package/docs/ecosystem/utils/upper-first.md +38 -0
  169. package/docs/{src/ecosystem → ecosystem}/utils/user-visibility.md +12 -6
  170. package/docs/guide/ai-agents.md +239 -0
  171. package/docs/{src/guide → guide}/browser-support.md +22 -15
  172. package/docs/{src/guide → guide}/getting-started.md +34 -139
  173. package/docs/{src/guide → guide}/global-defaults.md +12 -11
  174. package/docs/{src/guide → guide}/maz-ui-provider.md +17 -16
  175. package/docs/{src/guide → guide}/migration-v5.md +95 -88
  176. package/docs/{src/guide → guide}/resolvers.md +33 -100
  177. package/docs/guide/tailwind.md +507 -0
  178. package/docs/{src/guide → guide}/vue.md +33 -39
  179. package/docs/manifest.json +1 -0
  180. package/docs/{src/plugins → plugins}/aos.md +20 -55
  181. package/docs/{src/plugins → plugins}/dialog.md +14 -161
  182. package/docs/plugins/toast.md +221 -0
  183. package/docs/plugins/wait.md +78 -0
  184. package/docs/reference/icons.md +46 -0
  185. package/docs/reference/tailwind-tokens.md +191 -0
  186. package/docs/rules.md +59 -0
  187. package/package.json +86 -22
  188. package/dist/mcp.d.mts +0 -153
  189. package/dist/mcp.d.ts +0 -153
  190. package/dist/mcp.mjs +0 -1511
  191. package/docs/generated-docs/maz-accordion.doc.md +0 -21
  192. package/docs/generated-docs/maz-alert.doc.md +0 -20
  193. package/docs/generated-docs/maz-animated-counter.doc.md +0 -17
  194. package/docs/generated-docs/maz-animated-element.doc.md +0 -14
  195. package/docs/generated-docs/maz-animated-text.doc.md +0 -17
  196. package/docs/generated-docs/maz-avatar.doc.md +0 -45
  197. package/docs/generated-docs/maz-backdrop.doc.md +0 -55
  198. package/docs/generated-docs/maz-badge.doc.md +0 -16
  199. package/docs/generated-docs/maz-bottom-sheet.doc.md +0 -24
  200. package/docs/generated-docs/maz-btn-group.doc.md +0 -20
  201. package/docs/generated-docs/maz-btn.doc.md +0 -33
  202. package/docs/generated-docs/maz-card-spotlight.doc.md +0 -16
  203. package/docs/generated-docs/maz-card.doc.md +0 -39
  204. package/docs/generated-docs/maz-carousel.doc.md +0 -17
  205. package/docs/generated-docs/maz-chart.doc.md +0 -10
  206. package/docs/generated-docs/maz-checkbox.doc.md +0 -33
  207. package/docs/generated-docs/maz-checklist.doc.md +0 -30
  208. package/docs/generated-docs/maz-circular-progress-bar.doc.md +0 -27
  209. package/docs/generated-docs/maz-code-highlight.doc.md +0 -11
  210. package/docs/generated-docs/maz-container.doc.md +0 -26
  211. package/docs/generated-docs/maz-date-picker.doc.md +0 -56
  212. package/docs/generated-docs/maz-dialog-confirm.doc.md +0 -24
  213. package/docs/generated-docs/maz-dialog.doc.md +0 -22
  214. package/docs/generated-docs/maz-drawer.doc.md +0 -25
  215. package/docs/generated-docs/maz-dropdown.doc.md +0 -45
  216. package/docs/generated-docs/maz-dropzone.doc.md +0 -82
  217. package/docs/generated-docs/maz-expand-animation.doc.md +0 -12
  218. package/docs/generated-docs/maz-fullscreen-loader.doc.md +0 -13
  219. package/docs/generated-docs/maz-gallery.doc.md +0 -17
  220. package/docs/generated-docs/maz-icon.doc.md +0 -16
  221. package/docs/generated-docs/maz-input-code.doc.md +0 -25
  222. package/docs/generated-docs/maz-input-number.doc.md +0 -33
  223. package/docs/generated-docs/maz-input-phone-number.doc.md +0 -62
  224. package/docs/generated-docs/maz-input-price.doc.md +0 -26
  225. package/docs/generated-docs/maz-input-tags.doc.md +0 -24
  226. package/docs/generated-docs/maz-input.doc.md +0 -54
  227. package/docs/generated-docs/maz-lazy-img.doc.md +0 -49
  228. package/docs/generated-docs/maz-link.doc.md +0 -31
  229. package/docs/generated-docs/maz-loading-bar.doc.md +0 -6
  230. package/docs/generated-docs/maz-markdown-editor.doc.md +0 -65
  231. package/docs/generated-docs/maz-pagination.doc.md +0 -21
  232. package/docs/generated-docs/maz-popover.doc.md +0 -79
  233. package/docs/generated-docs/maz-pull-to-refresh.doc.md +0 -50
  234. package/docs/generated-docs/maz-radio-buttons.doc.md +0 -34
  235. package/docs/generated-docs/maz-radio.doc.md +0 -33
  236. package/docs/generated-docs/maz-read-more.doc.md +0 -18
  237. package/docs/generated-docs/maz-reading-progress-bar.doc.md +0 -18
  238. package/docs/generated-docs/maz-select-country.doc.md +0 -45
  239. package/docs/generated-docs/maz-select.doc.md +0 -32
  240. package/docs/generated-docs/maz-sidebar-content.doc.md +0 -5
  241. package/docs/generated-docs/maz-sidebar-footer.doc.md +0 -5
  242. package/docs/generated-docs/maz-sidebar-group.doc.md +0 -11
  243. package/docs/generated-docs/maz-sidebar-header.doc.md +0 -5
  244. package/docs/generated-docs/maz-sidebar-menu-button.doc.md +0 -27
  245. package/docs/generated-docs/maz-sidebar-menu-item.doc.md +0 -5
  246. package/docs/generated-docs/maz-sidebar-menu-sub.doc.md +0 -16
  247. package/docs/generated-docs/maz-sidebar-menu.doc.md +0 -5
  248. package/docs/generated-docs/maz-sidebar-separator.doc.md +0 -0
  249. package/docs/generated-docs/maz-sidebar-trigger.doc.md +0 -5
  250. package/docs/generated-docs/maz-sidebar.doc.md +0 -36
  251. package/docs/generated-docs/maz-skeleton.doc.md +0 -12
  252. package/docs/generated-docs/maz-slider.doc.md +0 -20
  253. package/docs/generated-docs/maz-spinner.doc.md +0 -6
  254. package/docs/generated-docs/maz-stepper.doc.md +0 -30
  255. package/docs/generated-docs/maz-switch.doc.md +0 -31
  256. package/docs/generated-docs/maz-table-cell.doc.md +0 -5
  257. package/docs/generated-docs/maz-table-row.doc.md +0 -12
  258. package/docs/generated-docs/maz-table-title.doc.md +0 -5
  259. package/docs/generated-docs/maz-table-virtualizer.doc.md +0 -20
  260. package/docs/generated-docs/maz-table.doc.md +0 -72
  261. package/docs/generated-docs/maz-tabs-bar.doc.md +0 -29
  262. package/docs/generated-docs/maz-tabs-content-item.doc.md +0 -11
  263. package/docs/generated-docs/maz-tabs-content.doc.md +0 -5
  264. package/docs/generated-docs/maz-tabs.doc.md +0 -20
  265. package/docs/generated-docs/maz-textarea.doc.md +0 -46
  266. package/docs/generated-docs/maz-ticker.doc.md +0 -25
  267. package/docs/generated-docs/maz-timeline.doc.md +0 -32
  268. package/docs/generated-docs/maz-ui-provider.doc.md +0 -12
  269. package/docs/generated-docs/maz-window-mockup.doc.md +0 -23
  270. package/docs/src/blog/v4.md +0 -276
  271. package/docs/src/blog/v5.md +0 -184
  272. package/docs/src/changelog.md +0 -7
  273. package/docs/src/components/index.md +0 -8
  274. package/docs/src/components/maz-accordion.md +0 -80
  275. package/docs/src/components/maz-animated-counter.md +0 -124
  276. package/docs/src/components/maz-animated-element.md +0 -36
  277. package/docs/src/components/maz-animated-text.md +0 -36
  278. package/docs/src/components/maz-avatar.md +0 -227
  279. package/docs/src/components/maz-backdrop.md +0 -250
  280. package/docs/src/components/maz-bottom-sheet.md +0 -533
  281. package/docs/src/components/maz-card-spotlight.md +0 -163
  282. package/docs/src/components/maz-carousel.md +0 -231
  283. package/docs/src/components/maz-checkbox.md +0 -168
  284. package/docs/src/components/maz-checklist.md +0 -414
  285. package/docs/src/components/maz-circular-progress-bar.md +0 -145
  286. package/docs/src/components/maz-container.md +0 -363
  287. package/docs/src/components/maz-dialog-confirm.md +0 -240
  288. package/docs/src/components/maz-dialog.md +0 -164
  289. package/docs/src/components/maz-drawer.md +0 -181
  290. package/docs/src/components/maz-dropdown.md +0 -691
  291. package/docs/src/components/maz-expand-animation.md +0 -99
  292. package/docs/src/components/maz-fullscreen-loader.md +0 -58
  293. package/docs/src/components/maz-gallery.md +0 -85
  294. package/docs/src/components/maz-input-code.md +0 -61
  295. package/docs/src/components/maz-input-number.md +0 -81
  296. package/docs/src/components/maz-input-phone-number.md +0 -942
  297. package/docs/src/components/maz-input-price.md +0 -67
  298. package/docs/src/components/maz-input-tags.md +0 -114
  299. package/docs/src/components/maz-lazy-img.md +0 -88
  300. package/docs/src/components/maz-link.md +0 -178
  301. package/docs/src/components/maz-loading-bar.md +0 -26
  302. package/docs/src/components/maz-pagination.md +0 -79
  303. package/docs/src/components/maz-popover.md +0 -1416
  304. package/docs/src/components/maz-radio-buttons.md +0 -462
  305. package/docs/src/components/maz-radio.md +0 -142
  306. package/docs/src/components/maz-reading-progress-bar.md +0 -74
  307. package/docs/src/components/maz-spinner.md +0 -93
  308. package/docs/src/components/maz-switch.md +0 -92
  309. package/docs/src/components/maz-table.md +0 -732
  310. package/docs/src/components/maz-textarea.md +0 -400
  311. package/docs/src/components/maz-ticker.md +0 -692
  312. package/docs/src/components/maz-timeline.md +0 -478
  313. package/docs/src/composables/use-aos.md +0 -34
  314. package/docs/src/composables/use-breakpoints.md +0 -35
  315. package/docs/src/composables/use-dialog.md +0 -88
  316. package/docs/src/composables/use-string-matching.md +0 -63
  317. package/docs/src/composables/use-toast.md +0 -71
  318. package/docs/src/composables/use-wait.md +0 -62
  319. package/docs/src/composables/use-window-size.md +0 -18
  320. package/docs/src/ecosystem/icons/icon-set.md +0 -123
  321. package/docs/src/ecosystem/mcp.md +0 -210
  322. package/docs/src/ecosystem/node/index.md +0 -53
  323. package/docs/src/ecosystem/utils/camel-case.md +0 -31
  324. package/docs/src/ecosystem/utils/capitalize.md +0 -50
  325. package/docs/src/ecosystem/utils/country-code-to-unicode-flag.md +0 -213
  326. package/docs/src/ecosystem/utils/debounce-callback.md +0 -38
  327. package/docs/src/ecosystem/utils/fetch-locale-ip.md +0 -33
  328. package/docs/src/ecosystem/utils/get-browser-locale.md +0 -29
  329. package/docs/src/ecosystem/utils/get-country-flag-url.md +0 -156
  330. package/docs/src/ecosystem/utils/is-server.md +0 -31
  331. package/docs/src/ecosystem/utils/is-standalone-mode.md +0 -43
  332. package/docs/src/ecosystem/utils/truthy-filter.md +0 -31
  333. package/docs/src/ecosystem/utils/types/deep-required.md +0 -39
  334. package/docs/src/ecosystem/utils/types/flatten-object-keys.md +0 -44
  335. package/docs/src/ecosystem/utils/upper-first.md +0 -32
  336. package/docs/src/guide/cli.md +0 -144
  337. package/docs/src/guide/migration-v4.md +0 -925
  338. package/docs/src/guide/tailwind.md +0 -158
  339. package/docs/src/index.md +0 -603
  340. package/docs/src/made-with-maz-ui.md +0 -58
  341. package/docs/src/plugins/toast.md +0 -349
  342. package/docs/src/plugins/wait.md +0 -109
  343. package/docs/src/theme-editor.md +0 -21
@@ -1,45 +1,44 @@
1
1
  ---
2
- title: MazDatePicker
3
- description: A powerful and flexible date picker component with support for single dates, date ranges, time selection, and extensive customization options
2
+ title: "MazDatePicker"
3
+ description: "A powerful and flexible date picker component with support for single dates, date ranges, time selection, and extensive customization options"
4
+ package: "maz-ui"
5
+ url: "https://maz-ui.com/components/maz-date-picker"
4
6
  ---
5
7
 
6
- # {{ $frontmatter.title }}
8
+ # MazDatePicker
7
9
 
8
- {{ $frontmatter.description }}
10
+ > A powerful and flexible date picker component with support for single dates, date ranges, time selection, and extensive customization options
9
11
 
10
- <!--@include: ./../../.vitepress/mixins/getting-started.md-->
12
+ - Package: `maz-ui`
13
+ - Import: `import MazDatePicker from 'maz-ui/components/MazDatePicker'`
14
+ - Nuxt: auto-imported by `@maz-ui/nuxt`, no import needed in a Nuxt app
15
+ - Web: https://maz-ui.com/components/maz-date-picker
11
16
 
12
- <!--@include: ./../../.vitepress/mixins/translated-component.md-->
17
+ > Before use it, you should install the MazUi plugin in your project, follow instructions in [Getting Started](../guide/getting-started.md)
18
+
19
+ **Tip:**
20
+
21
+ This component can be translated globally using the [MazUi](../ecosystem/translations.md) plugin.
13
22
 
14
23
  ## Table of Contents
15
24
 
16
- - [Basic Usage](#basic-usage)
17
- - [Date Formats](#date-formats)
18
- - [Date Selection](#date-selection)
19
- - [Custom Trigger](#custom-trigger)
20
- - [Time Selection](#time-selection)
21
- - [Range Selection](#range-selection)
22
- - [Internationalization](#internationalization)
23
- - [Validation & Constraints](#validation--constraints)
24
- - [Types](#types)
25
- - [Props](#props)
26
- - [Events](#events)
27
- - [Slots](#slots)
25
+ - Basic Usage
26
+ - Date Formats
27
+ - Date Selection
28
+ - Custom Trigger
29
+ - Time Selection
30
+ - Range Selection
31
+ - Internationalization
32
+ - Validation & Constraints
33
+ - Types
34
+ - Props
35
+ - Events
36
+ - Slots
28
37
 
29
38
  ## Basic Usage
30
39
 
31
40
  The simplest way to use MazDatePicker:
32
41
 
33
- <ComponentDemo>
34
- <MazDatePicker
35
- v-model="basicDate"
36
- label="Select a date"
37
- placeholder="Choose your date"
38
- format="YYYY-MM-DD"
39
- />
40
-
41
- <template #code>
42
-
43
42
  ```vue
44
43
  <template>
45
44
  <MazDatePicker
@@ -57,9 +56,6 @@ const date = ref()
57
56
  </script>
58
57
  ```
59
58
 
60
- </template>
61
- </ComponentDemo>
62
-
63
59
  ## Date Formats
64
60
 
65
61
  Understanding date formats is crucial for using MazDatePicker effectively. The component uses two different format concepts:
@@ -72,30 +68,6 @@ This controls how dates are stored and transmitted in your `v-model`. Default is
72
68
 
73
69
  This controls how dates appear in the input field using `Intl.DateTimeFormatOptions`.
74
70
 
75
- <ComponentDemo>
76
- <div class="maz:grid maz:grid-cols-1 maz:mob-l:grid-cols-3 maz:gap-4">
77
- <MazDatePicker
78
- v-model="formatExample1"
79
- label="ISO Format (YYYY-MM-DD)"
80
- format="YYYY-MM-DD"
81
- :input-date-format="{ dateStyle: 'medium' }"
82
- />
83
- <MazDatePicker
84
- v-model="formatExample2"
85
- label="US Format (MM/DD/YYYY)"
86
- format="MM/DD/YYYY"
87
- :input-date-format="{ dateStyle: 'short' }"
88
- />
89
- <MazDatePicker
90
- v-model="formatExample3"
91
- label="European Format (DD-MM-YYYY)"
92
- format="DD-MM-YYYY"
93
- :input-date-format="{ dateStyle: 'medium' }"
94
- />
95
- </div>
96
-
97
- <template #code>
98
-
99
71
  ```vue
100
72
  <template>
101
73
  <!-- ISO Format (recommended) -->
@@ -132,22 +104,10 @@ const date3 = ref('15-03-2024') // European format
132
104
  </script>
133
105
  ```
134
106
 
135
- </template>
136
- </ComponentDemo>
137
-
138
107
  ### Custom Display Transformation
139
108
 
140
109
  Use `inputDateTransformer` to completely customize how dates appear in the input:
141
110
 
142
- <ComponentDemo>
143
- <MazDatePicker
144
- v-model="transformedDate"
145
- label="Custom Display Format"
146
- :input-date-transformer="({ value }) => value ? `📅 ${dayjs(value).format('dddd, MMMM Do YYYY')}` : ''"
147
- />
148
-
149
- <template #code>
150
-
151
111
  ```vue
152
112
  <template>
153
113
  <MazDatePicker
@@ -169,25 +129,10 @@ const transformDate = ({ value }) => {
169
129
  </script>
170
130
  ```
171
131
 
172
- </template>
173
- </ComponentDemo>
174
-
175
132
  ## Date Selection
176
133
 
177
134
  ### Standard Date Picker
178
135
 
179
- <br />
180
-
181
- <ComponentDemo>
182
- <MazDatePicker
183
- v-model="dateSelection"
184
- label="Select Date"
185
- color="primary"
186
- auto-close
187
- />
188
-
189
- <template #code>
190
-
191
136
  ```vue
192
137
  <template>
193
138
  <MazDatePicker
@@ -205,22 +150,10 @@ const date = ref()
205
150
  </script>
206
151
  ```
207
152
 
208
- </template>
209
- </ComponentDemo>
210
-
211
153
  ### Inline Date Picker
212
154
 
213
155
  Perfect for dashboards or when you want the calendar always visible:
214
156
 
215
- <ComponentDemo>
216
- <MazDatePicker
217
- v-model="inlineDate"
218
- inline
219
- color="secondary"
220
- />
221
-
222
- <template #code>
223
-
224
157
  ```vue
225
158
  <template>
226
159
  <MazDatePicker
@@ -237,23 +170,10 @@ const date = ref()
237
170
  </script>
238
171
  ```
239
172
 
240
- </template>
241
- </ComponentDemo>
242
-
243
173
  ### Double Calendar
244
174
 
245
175
  Show two months at once for better date selection:
246
176
 
247
- <ComponentDemo>
248
- <MazDatePicker
249
- v-model="doubleDate"
250
- label="Double Calendar"
251
- double
252
- color="success"
253
- />
254
-
255
- <template #code>
256
-
257
177
  ```vue
258
178
  <template>
259
179
  <MazDatePicker
@@ -271,9 +191,6 @@ const date = ref()
271
191
  </script>
272
192
  ```
273
193
 
274
- </template>
275
- </ComponentDemo>
276
-
277
194
  ## Custom Trigger
278
195
 
279
196
  By default MazDatePicker renders a readonly `MazInput` as the field that opens the calendar. Use the `#trigger` slot to replace it with your own element - a button, a custom input, an icon... Clicking the slotted element opens the calendar automatically (no `@click` needed), and the slot exposes the current open state plus functions for programmatic control.
@@ -287,23 +204,12 @@ By default MazDatePicker renders a readonly `MazInput` as the field that opens t
287
204
  | `close` | `() => void` | Close the calendar programmatically |
288
205
  | `toggle` | `() => void` | Toggle the calendar programmatically |
289
206
 
290
- <ComponentDemo>
291
- <MazDatePicker v-model="triggerDate" auto-close hide-header>
292
- <template #trigger="{ isOpen }">
293
- <MazBtn color="secondary" :class="{ 'maz:ring-2 maz:ring-offset-2 maz:ring-secondary': isOpen }">
294
- {{ triggerDate || 'Pick a date' }}
295
- </MazBtn>
296
- </template>
297
- </MazDatePicker>
298
-
299
- <template #code>
300
-
301
207
  ```vue
302
208
  <template>
303
209
  <MazDatePicker v-model="date" auto-close>
304
210
  <!-- Clicking the button opens the picker automatically. -->
305
211
  <template #trigger="{ isOpen }">
306
- <MazBtn color="secondary" :class="{ 'maz:ring-2 maz:ring-secondary': isOpen }">
212
+ <MazBtn color="secondary" :class="{ 'ring-2 ring-secondary': isOpen }">
307
213
  {{ date || 'Pick a date' }}
308
214
  </MazBtn>
309
215
  </template>
@@ -317,12 +223,9 @@ const date = ref()
317
223
  </script>
318
224
  ```
319
225
 
320
- </template>
321
- </ComponentDemo>
226
+ **Tip:**
322
227
 
323
- ::: tip
324
228
  The model value is not passed through the slot - use your own `v-model` ref (here `date`) to display the selected value in your custom trigger. The exposed `open` / `close` / `toggle` functions are only needed when you want to drive the picker from your own logic.
325
- :::
326
229
 
327
230
  > In `inline` mode the calendar is always visible, so the `trigger` slot is not rendered. To open the picker from an element rendered outside the component, use the `custom-element-selector` prop instead.
328
231
 
@@ -330,17 +233,6 @@ The model value is not passed through the slot - use your own `v-model` ref (her
330
233
 
331
234
  ### Date + Time (24h format)
332
235
 
333
- <ComponentDemo>
334
- <MazDatePicker
335
- v-model="dateTime24"
336
- label="Date & Time (24h)"
337
- format="YYYY-MM-DD HH:mm"
338
- time
339
- color="info"
340
- />
341
-
342
- <template #code>
343
-
344
236
  ```vue
345
237
  <template>
346
238
  <MazDatePicker
@@ -359,22 +251,8 @@ const dateTime = ref()
359
251
  </script>
360
252
  ```
361
253
 
362
- </template>
363
- </ComponentDemo>
364
-
365
254
  ### Date + Time (12h format)
366
255
 
367
- <ComponentDemo>
368
- <MazDatePicker
369
- v-model="dateTime12"
370
- label="Date & Time (12h)"
371
- format="YYYY-MM-DD hh:mm a"
372
- time
373
- color="warning"
374
- />
375
-
376
- <template #code>
377
-
378
256
  ```vue
379
257
  <template>
380
258
  <MazDatePicker
@@ -393,31 +271,8 @@ const dateTime = ref()
393
271
  </script>
394
272
  ```
395
273
 
396
- </template>
397
- </ComponentDemo>
398
-
399
274
  ### Time Only Selection
400
275
 
401
- <ComponentDemo>
402
- <div class="maz:grid maz:grid-cols-1 maz:mob-l:grid-cols-2 maz:gap-4">
403
- <MazDatePicker
404
- v-model="timeOnly24"
405
- label="Time Only (24h)"
406
- format="HH:mm"
407
- only-time
408
- color="accent"
409
- />
410
- <MazDatePicker
411
- v-model="timeOnly12"
412
- label="Time Only (12h)"
413
- format="hh:mm a"
414
- only-time
415
- color="destructive"
416
- />
417
- </div>
418
-
419
- <template #code>
420
-
421
276
  ```vue
422
277
  <template>
423
278
  <!-- 24h format -->
@@ -447,38 +302,8 @@ const time12 = ref('02:30 pm')
447
302
  </script>
448
303
  ```
449
304
 
450
- </template>
451
- </ComponentDemo>
452
-
453
305
  ### Custom Minute Intervals
454
306
 
455
- <ComponentDemo>
456
- <div class="maz:grid maz:grid-cols-1 maz:mob-l:grid-cols-3 maz:gap-4">
457
- <MazDatePicker
458
- v-model="timeInterval1"
459
- label="5min intervals"
460
- format="HH:mm"
461
- :minute-interval="5"
462
- only-time
463
- />
464
- <MazDatePicker
465
- v-model="timeInterval2"
466
- label="15min intervals"
467
- format="HH:mm"
468
- :minute-interval="15"
469
- only-time
470
- />
471
- <MazDatePicker
472
- v-model="timeInterval3"
473
- label="30min intervals"
474
- format="HH:mm"
475
- :minute-interval="30"
476
- only-time
477
- />
478
- </div>
479
-
480
- <template #code>
481
-
482
307
  ```vue
483
308
  <template>
484
309
  <MazDatePicker
@@ -515,25 +340,10 @@ const time3 = ref()
515
340
  </script>
516
341
  ```
517
342
 
518
- </template>
519
- </ComponentDemo>
520
-
521
343
  ## Range Selection
522
344
 
523
345
  For selecting date ranges, pass an object with `start` and `end` properties:
524
346
 
525
- <ComponentDemo>
526
- <MazDatePicker
527
- v-model="dateRange"
528
- label="Select Date Range"
529
- range
530
- double
531
- auto-close
532
- color="primary"
533
- />
534
-
535
- <template #code>
536
-
537
347
  ```vue
538
348
  <template>
539
349
  <MazDatePicker
@@ -556,25 +366,10 @@ const range = ref({
556
366
  </script>
557
367
  ```
558
368
 
559
- </template>
560
- </ComponentDemo>
561
-
562
369
  ### Range with Shortcuts
563
370
 
564
371
  Provide predefined shortcuts for common date ranges:
565
372
 
566
- <ComponentDemo>
567
- <MazDatePicker
568
- v-model="rangeWithShortcuts"
569
- label="Range with Shortcuts"
570
- range
571
- double
572
- :shortcuts="customShortcuts"
573
- color="secondary"
574
- />
575
-
576
- <template #code>
577
-
578
373
  ```vue
579
374
  <template>
580
375
  <MazDatePicker
@@ -625,9 +420,6 @@ const shortcuts = [
625
420
  </script>
626
421
  ```
627
422
 
628
- </template>
629
- </ComponentDemo>
630
-
631
423
  ### Property `shortcuts`
632
424
 
633
425
  #### Model
@@ -663,7 +455,7 @@ const shortcuts: MazDatePickerShortcut[] = [{
663
455
  }]
664
456
  ```
665
457
 
666
- ::: details View default shortcuts
458
+ **Details: View default shortcuts**
667
459
 
668
460
  ```ts
669
461
  const shortcuts = [
@@ -734,29 +526,10 @@ const shortcuts = [
734
526
  ]
735
527
  ```
736
528
 
737
- :::
738
-
739
529
  ## Validation & Constraints
740
530
 
741
531
  ### Min/Max Dates
742
532
 
743
- <br />
744
-
745
- <ComponentDemo>
746
- <MazDatePicker
747
- v-model="constrainedDate"
748
- label="Limited Date Range"
749
- :min-date="minMaxDates.min"
750
- :max-date="minMaxDates.max"
751
- color="info"
752
- @update:model-value="console.log($event)"
753
- />
754
- <p class="maz:text-sm maz:text-muted maz:mt-2">
755
- Min: {{ minMaxDates.min }} | Max: {{ minMaxDates.max }}
756
- </p>
757
-
758
- <template #code>
759
-
760
533
  ```vue
761
534
  <template>
762
535
  <MazDatePicker
@@ -778,24 +551,10 @@ const maxDate = dayjs().add(30, 'day').format('YYYY-MM-DD')
778
551
  </script>
779
552
  ```
780
553
 
781
- </template>
782
- </ComponentDemo>
783
-
784
554
  #### Property `min-max-auto`
785
555
 
786
556
  Disable min-max auto check to not change the value when it is out of range
787
557
 
788
- <ComponentDemo>
789
- <MazDatePicker
790
- v-model="constrainedDateMinMaxAuto"
791
- label="Not auto date range"
792
- :min-date="minMaxDates.min"
793
- :max-date="minMaxDates.max"
794
- :min-max-auto="false"
795
- />
796
-
797
- <template #code>
798
-
799
558
  ```vue
800
559
  <template>
801
560
  <MazDatePicker
@@ -817,32 +576,8 @@ const maxDate = dayjs().add(30, 'day').format('YYYY-MM-DD')
817
576
  </script>
818
577
  ```
819
578
 
820
- </template>
821
- </ComponentDemo>
822
-
823
579
  ### Disabled Days & Dates
824
580
 
825
- <br />
826
-
827
- <ComponentDemo>
828
- <div class="maz:grid maz:grid-cols-1 maz:mob-l:grid-cols-2 maz:gap-4">
829
- <MazDatePicker
830
- v-model="weekendDisabled"
831
- label="Weekends Disabled"
832
- :min-date="dayjs().subtract(1, 'day').format('YYYY-MM-DD')"
833
- :disabled-weekly="[0, 6]"
834
- color="warning"
835
- />
836
- <MazDatePicker
837
- v-model="specificDatesDisabled"
838
- label="Holidays Disabled"
839
- :disabled-dates="holidays"
840
- color="destructive"
841
- />
842
- </div>
843
-
844
- <template #code>
845
-
846
581
  ```vue
847
582
  <template>
848
583
  <!-- Disable weekends -->
@@ -884,35 +619,8 @@ const holidays = [
884
619
  </script>
885
620
  ```
886
621
 
887
- </template>
888
- </ComponentDemo>
889
-
890
622
  ### Disabled Hours
891
623
 
892
- <br />
893
-
894
- <ComponentDemo>
895
- <div class="maz:grid maz:grid-cols-1 maz:mob-l:grid-cols-2 maz:gap-4">
896
- <MazDatePicker
897
- v-model="dateTime"
898
- format="YYYY-MM-DD hh:mm a"
899
- time
900
- label="Disabled Hours"
901
- :disabled-hours="disabledHours"
902
- color="info"
903
- />
904
- <MazDatePicker
905
- v-model="time"
906
- format="HH:mm"
907
- only-time
908
- label="Disabled Hours"
909
- :disabled-hours="disabledHours"
910
- color="info"
911
- />
912
- </div>
913
-
914
- <template #code>
915
-
916
624
  ```vue
917
625
  <template>
918
626
  <MazDatePicker
@@ -944,46 +652,10 @@ const disabledHours = [0, 1, 2, 11, 22, 23]
944
652
  </script>
945
653
  ```
946
654
 
947
- </template>
948
- </ComponentDemo>
949
-
950
655
  ## Internationalization
951
656
 
952
657
  MazDatePicker supports full internationalization. **By default, it uses the locale from the [MazUiTranslations](../ecosystem/translations.md) plugin**, but you can override it:
953
658
 
954
- <ComponentDemo>
955
- <div class="maz:grid maz:grid-cols-1 maz:mob-l:grid-cols-2 maz:gap-4">
956
- <MazDatePicker
957
- v-model="frenchDate"
958
- label="French Locale"
959
- locale="fr-FR"
960
- :first-day-of-week="1"
961
- color="primary"
962
- />
963
- <MazDatePicker
964
- v-model="germanDate"
965
- label="German Locale"
966
- locale="de-DE"
967
- :first-day-of-week="1"
968
- color="secondary"
969
- />
970
- <MazDatePicker
971
- v-model="japaneseDate"
972
- label="Japanese Locale"
973
- locale="ja-JP"
974
- color="accent"
975
- />
976
- <MazDatePicker
977
- v-model="arabicDate"
978
- label="Arabic Locale"
979
- locale="ar-SA"
980
- :first-day-of-week="6"
981
- color="warning"
982
- />
983
- </div>
984
-
985
- <template #code>
986
-
987
659
  ```vue
988
660
  <template>
989
661
  <!-- French -->
@@ -1032,9 +704,6 @@ const arabicDate = ref()
1032
704
  </script>
1033
705
  ```
1034
706
 
1035
- </template>
1036
- </ComponentDemo>
1037
-
1038
707
  ## Types
1039
708
 
1040
709
  ```typescript
@@ -1063,98 +732,60 @@ interface MazDatePickerShortcut {
1063
732
 
1064
733
  - The input is a `combobox` opening a `dialog` (`aria-haspopup="dialog"`, `aria-expanded`, `aria-controls`).
1065
734
  - Each month is a `grid` labelled by the month and the year, the days of the week are its column headers and each day has its full date as label (`aria-current="date"` for today, `aria-selected` on the selected days).
1066
- - **Keyboard** in the calendar: only one day is in the tab sequence, the arrows move by day (<kbd>←</kbd> <kbd>→</kbd>) and by week (<kbd>↑</kbd> <kbd>↓</kbd>), <kbd>Home</kbd> / <kbd>End</kbd> go to the start / end of the week, <kbd>Page Up</kbd> / <kbd>Page Down</kbd> to the previous / next month (with <kbd>Shift</kbd>: year). Disabled days are skipped and the calendar follows the focus to the displayed month.
735
+ - **Keyboard** in the calendar: only one day is in the tab sequence, the arrows move by day (← →) and by week (↑ ↓), Home / End go to the start / end of the week, Page Up / Page Down to the previous / next month (with Shift: year). Disabled days are skipped and the calendar follows the focus to the displayed month.
1067
736
  - The navigation buttons labels come from `@maz-ui/translations` (`aria` namespace).
1068
737
 
1069
- <!--@include: ./../../.vitepress/mixins/maz-input-props.md-->
1070
-
1071
- <!--@include: ./../../.vitepress/generated-docs/maz-date-picker.doc.md-->
1072
-
1073
- <script setup lang="ts">
1074
- import { ref } from 'vue'
1075
- import dayjs from 'dayjs'
1076
-
1077
- // Basic examples
1078
- const basicDate = ref('2023-03-15')
1079
- const formatExample1 = ref('2024-03-15')
1080
- const formatExample2 = ref('03/15/2024')
1081
- const formatExample3 = ref('15-03-2024')
1082
- const transformedDate = ref()
1083
- const newDateValue = ref()
1084
- const triggerDate = ref()
1085
- // Date selection
1086
- const dateSelection = ref()
1087
- const inlineDate = ref()
1088
- const doubleDate = ref()
1089
-
1090
- // Time selection
1091
- const dateTime24 = ref()
1092
- const dateTime12 = ref()
1093
- const timeOnly24 = ref('14:30')
1094
- const timeOnly12 = ref('02:30 pm')
1095
- const timeInterval1 = ref()
1096
- const timeInterval2 = ref()
1097
- const timeInterval3 = ref()
1098
-
1099
- // Range selection
1100
- const dateRange = ref({ start: undefined, end: undefined })
1101
- const rangeWithShortcuts = ref({ start: undefined, end: undefined })
1102
-
1103
- // Internationalization
1104
- const frenchDate = ref()
1105
- const germanDate = ref()
1106
- const japaneseDate = ref()
1107
- const arabicDate = ref()
1108
-
1109
- // Validation
1110
- const constrainedDate = ref()
1111
- const constrainedDateMinMaxAuto = ref(dayjs().subtract(60, 'day').format('YYYY-MM-DD'))
1112
- const minMaxDates = {
1113
- min: dayjs().format('YYYY-MM-DD'),
1114
- max: dayjs().add(20, 'day').format('YYYY-MM-DD')
1115
- }
1116
- const weekendDisabled = ref()
1117
- const specificDatesDisabled = ref()
1118
- const holidays = [
1119
- dayjs().subtract(2, 'day').format('YYYY-MM-DD'),
1120
- dayjs().subtract(1, 'day').format('YYYY-MM-DD'),
1121
- dayjs().format('YYYY-MM-DD'),
1122
- dayjs().add(1, 'day').format('YYYY-MM-DD'),
1123
- dayjs().add(2, 'day').format('YYYY-MM-DD'),
1124
- dayjs().add(3, 'day').format('YYYY-MM-DD'),
1125
- dayjs().add(4, 'day').format('YYYY-MM-DD'),
1126
- ]
1127
-
1128
- // Disabled hours
1129
- const dateTime = ref()
1130
- const time = ref()
1131
- const disabledHours = [0, 1, 2, 11, 22, 23]
1132
-
1133
- // Shortcuts
1134
- const customShortcuts = [
1135
- {
1136
- label: 'Today',
1137
- identifier: 'today',
1138
- value: {
1139
- start: dayjs().format('YYYY-MM-DD'),
1140
- end: dayjs().format('YYYY-MM-DD')
1141
- }
1142
- },
1143
- {
1144
- label: 'Last 7 days',
1145
- identifier: 'last7days',
1146
- value: {
1147
- start: dayjs().subtract(6, 'day').format('YYYY-MM-DD'),
1148
- end: dayjs().format('YYYY-MM-DD')
1149
- }
1150
- },
1151
- {
1152
- label: 'This month',
1153
- identifier: 'thisMonth',
1154
- value: {
1155
- start: dayjs().startOf('month').format('YYYY-MM-DD'),
1156
- end: dayjs().endOf('month').format('YYYY-MM-DD')
1157
- }
1158
- }
1159
- ]
1160
- </script>
738
+ ## MazDatePicker API
739
+
740
+ `import MazDatePicker from 'maz-ui/components/MazDatePicker'`
741
+
742
+ ### Props
743
+
744
+ - `id` (`string`): The unique identifier of the component.
745
+ - `input-props` (`MazInputProps<MazInputValue>`): The props to apply to the input component.
746
+ - `model-value` (`MazDatePickerValue`, `v-model`): The value of the date picker component If an object is provided, the picker will be a range picker.
747
+ - `format` (`string`, default: `"YYYY-MM-DD"`): The format pattern for date display and parsing.
748
+ - `open` (`boolean`, default: `false`, `v-model:open`): Controls whether the picker window is open.
749
+ - `label` (`string`): The label text displayed above the input field.
750
+ - `placeholder` (`string`): The placeholder text shown when no value is selected.
751
+ - `input-date-format` (`Intl.DateTimeFormatOptions`, default: `{ dateStyle: "medium", timeStyle: "short" }`): The Intl.DateTimeFormatOptions for styling the input date display.
752
+ - `input-date-transformer` (`((payload: { formattedDate?: string | undefined; value?: MazDatePickerValue; locale: string; }) => string)`): Custom function to transform the formatted date display.
753
+ - `locale` (`string`, default: `""`, `v-model:locale`): The locale string for date formatting and localization.
754
+ - `hide-header` (`boolean`, default: `false`): Controls whether the calendar header is hidden.
755
+ - `disabled` (`boolean`, default: `false`): Controls whether the component is disabled.
756
+ - `first-day-of-week` (`0 | 1 | 2 | 3 | 4 | 5 | 6`, default: `0`): The first day of the week in the calendar. Values: `'0'`, `'1'`, `'2'`, `'3'`, `'4'`, `'5'`, `'6'` (non exhaustive).
757
+ - `auto-close` (`boolean`, default: `false`): Controls whether the picker closes automatically after date selection.
758
+ - `custom-element-selector` (`string`): CSS selector for a custom element that triggers the picker.
759
+ - `double` (`boolean`, default: `false`): Controls whether the picker displays two months side by side.
760
+ - `inline` (`boolean`, default: `false`): Controls whether the picker is displayed inline without input field.
761
+ - `color` (`"primary" | "secondary" | "accent" | "info" | "success" | "warning" | "destructive" | "contrast" | "transparent"`, default: `"primary"`): The color theme of the component.
762
+ - `picker-position` (`MazPopoverPosition`, default: `"auto"`): The position where the picker popover should appear. Values: `'top'`, `'bottom'`, `'left'`, `'right'`, `'top-end'`, `'bottom-end'`, `'left-end'`, `'right-end'`, `'top-start'`, `'bottom-start'`, `'left-start'`, `'right-start'` (non exhaustive).
763
+ - `picker-prefer-position` (`MazPopoverPreferPosition`, default: `"bottom-start"`): The preferred position of the picker popover. Values: `'top'`, `'bottom'`, `'left'`, `'right'`, `'top-end'`, `'bottom-end'`, `'left-end'`, `'right-end'`, `'top-start'`, `'bottom-start'`, `'left-start'`, `'right-start'` (non exhaustive).
764
+ - `picker-fallback-position` (`MazPopoverFallbackPosition`, default: `"top-start"`): The fallback position of the picker popover. Values: `'top'`, `'bottom'`, `'left'`, `'right'`, `'top-end'`, `'bottom-end'`, `'left-end'`, `'right-end'`, `'top-start'`, `'bottom-start'`, `'left-start'`, `'right-start'` (non exhaustive).
765
+ - `time` (`boolean`, default: `false`): Controls whether the picker includes a time selector.
766
+ - `only-time` (`boolean`, default: `false`): Controls whether the picker shows only time selection (no date).
767
+ - `minute-interval` (`number`, default: `5`): The interval in minutes for the time picker minute selection. Values: `'1'`, `'5'`, `'10'`, `'15'`, `'30'` (non exhaustive).
768
+ - `use-browser-locale` (`boolean`, default: `true`): Controls whether to automatically detect and use the browser's locale.
769
+ - `fetch-local` (`boolean`, default: `true`): Controls whether to fetch locale data dynamically.
770
+ - `shortcuts` (`boolean | MazDatePickerShortcut[]`, default: `true`): Array of predefined date range shortcuts or false to disable.
771
+ - `shortcut` (`string`): The identifier of the currently selected shortcut.
772
+ - `min-date` (`string`): The minimum selectable date in ISO format.
773
+ - `max-date` (`string`): The maximum selectable date in ISO format.
774
+ - `min-max-auto` (`boolean`, default: `true`): When minDate or maxDate are provided, if the current date is not between minDate and maxDate, the current date will be set to the minDate or maxDate.
775
+ - `disabled-weekly` (`number[]`, default: `[]`): Array of weekday numbers to disable (0 = Sunday, 6 = Saturday).
776
+ - `disabled-dates` (`string[]`, default: `[]`): Array of specific dates to disable in ISO format.
777
+ - `disabled-hours` (`number[]`, default: `[]`): Array of hour numbers to disable in the time picker (0-23).
778
+ - `block` (`boolean`, default: `false`): Controls whether the input displays in full width.
779
+ - `range` (`boolean`, default: `false`): Controls whether the picker operates in range selection mode.
780
+ - `transition` (`string`, default: `"scale-fade"`): The transition name of the popover.
781
+
782
+ ### Events
783
+
784
+ - `@update:model-value` (payload: `value: MazDatePickerValue`): Emitted when the picker value changes
785
+ - `@close` (payload: `(void | undefined)?`): Emitted when the picker closes
786
+ - `@update:locale` (payload: `value: string`)
787
+ - `@update:open` (payload: `value: boolean`)
788
+
789
+ ### Slots
790
+
791
+ - `#trigger`: Replace the default input with your own element Bindings: `isOpen: boolean` (Current open state of the popover), `close: () => void` (Function to close the popover), `open: () => void` (Function to open the popover), `toggle: () => void` (Function to toggle the popover).