@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
@@ -0,0 +1,112 @@
1
+ ---
2
+ title: "MazInputTags"
3
+ description: "MazInputTags is a standalone component like free inputs to help user select many values and return an Array of strings. Color options are also available."
4
+ package: "maz-ui"
5
+ url: "https://maz-ui.com/components/maz-input-tags"
6
+ ---
7
+
8
+ # MazInputTags
9
+
10
+ > MazInputTags is a standalone component like free inputs to help user select many values and return an Array of strings. Color options are also available.
11
+
12
+ - Package: `maz-ui`
13
+ - Import: `import MazInputTags from 'maz-ui/components/MazInputTags'`
14
+ - Nuxt: auto-imported by `@maz-ui/nuxt`, no import needed in a Nuxt app
15
+ - Web: https://maz-ui.com/components/maz-input-tags
16
+
17
+ > Before use it, you should install the MazUi plugin in your project, follow instructions in [Getting Started](../guide/getting-started.md)
18
+
19
+ ## Basic usage
20
+
21
+ **Returned value**
22
+
23
+ ```vue
24
+ <script lang="ts" setup>
25
+ import MazInputTags from 'maz-ui/components/MazInputTags'
26
+ import { ref } from 'vue'
27
+
28
+ const tags = ref(['tags 1', 'tags 2'])
29
+ const sizes = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
30
+ </script>
31
+
32
+ <template>
33
+ <MazInputTags
34
+ v-model="tags"
35
+ label="Enter tags"
36
+ color="info"
37
+ />
38
+ </template>
39
+ ```
40
+
41
+ ## Sizing
42
+
43
+ ```vue
44
+ <script lang="ts" setup>
45
+ import MazInputTags from 'maz-ui/components/MazInputTags'
46
+ import { ref } from 'vue'
47
+
48
+ const tags = ref(['tags 1', 'tags 2'])
49
+ const sizes = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
50
+ </script>
51
+
52
+ <template>
53
+ <div class="flex flex-col gap-2">
54
+ <MazInputTags
55
+ v-for="size in sizes"
56
+ :key="size"
57
+ v-model="tags"
58
+ :size="size"
59
+ placeholder="Enter tags"
60
+ color="secondary"
61
+ />
62
+ </div>
63
+ </template>
64
+ ```
65
+
66
+ ```vue
67
+ <script lang="ts" setup>
68
+ import MazInputTags from 'maz-ui/components/MazInputTags'
69
+ import { ref } from 'vue'
70
+
71
+ const tags = ref(['tags 1', 'tags 2'])
72
+ const sizes = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
73
+ </script>
74
+
75
+ <template>
76
+ <MazInputTags
77
+ v-model="tags"
78
+ label="Enter tags"
79
+ color="info"
80
+ />
81
+
82
+ <MazInputTags
83
+ v-model="tags"
84
+ placeholder="Enter tags"
85
+ color="secondary"
86
+ size="sm"
87
+ />
88
+ </template>
89
+ ```
90
+
91
+ ## MazInputTags API
92
+
93
+ `import MazInputTags from 'maz-ui/components/MazInputTags'`
94
+
95
+ ### Props
96
+
97
+ - `model-value` (`(string | number)[]`, `v-model`): The modelValue of the input.
98
+ - `placeholder` (`string`): The placeholder of the input.
99
+ - `label` (`string`): The label of the input.
100
+ - `disabled` (`boolean`, default: `false`): Disable the input.
101
+ - `error` (`boolean`, default: `false`): Display the input with error style.
102
+ - `success` (`boolean`, default: `false`): Display the input with success style.
103
+ - `warning` (`boolean`, default: `false`): Display the input with warning style.
104
+ - `size` (`"xs" | "sm" | "md" | "lg" | "xl" | "mini"`): The size of the input.
105
+ - `color` (`"primary" | "secondary" | "accent" | "info" | "success" | "warning" | "destructive" | "contrast" | "transparent"`, default: `"primary"`): The color of the input.
106
+ - `block` (`boolean`): The input will be displayed in full width.
107
+ - `add-tags-on-blur` (`boolean`, default: `true`): Add tags on blur.
108
+ - `hint` (`string`): The hint text to display below the input.
109
+
110
+ ### Events
111
+
112
+ - `@update:model-value` (payload: `value?: (string | number)[] | undefined`)
@@ -1,20 +1,22 @@
1
1
  ---
2
- title: MazInput
3
- description: MazInput is a standalone component that replaces the standard html input text with a beautiful design system. Many options like colors, sizes, disabled, loading, error, warning, valid states, error messages and icons are included.
2
+ title: "MazInput"
3
+ description: "MazInput is a standalone component that replaces the standard html input text with a beautiful design system. Many options like colors, sizes, disabled, loading, error, warning, valid states, error messages and icons are included."
4
+ package: "maz-ui"
5
+ url: "https://maz-ui.com/components/maz-input"
4
6
  ---
5
7
 
6
- # {{ $frontmatter.title }}
8
+ # MazInput
7
9
 
8
- {{ $frontmatter.description }}
10
+ > MazInput is a standalone component that replaces the standard html input text with a beautiful design system. Many options like colors, sizes, disabled, loading, error, warning, valid states, error messages and icons are included.
9
11
 
10
- <!--@include: ./../../.vitepress/mixins/getting-started.md-->
12
+ - Package: `maz-ui`
13
+ - Import: `import MazInput from 'maz-ui/components/MazInput'`
14
+ - Nuxt: auto-imported by `@maz-ui/nuxt`, no import needed in a Nuxt app
15
+ - Web: https://maz-ui.com/components/maz-input
11
16
 
12
- ## Basic usage
13
-
14
- <ComponentDemo>
15
- <MazInput v-model="inputValue" label="Label" name="firstname" />
17
+ > Before use it, you should install the MazUi plugin in your project, follow instructions in [Getting Started](../guide/getting-started.md)
16
18
 
17
- <template #code>
19
+ ## Basic usage
18
20
 
19
21
  ```vue
20
22
  <script setup>
@@ -33,127 +35,55 @@ const inputValue = ref()
33
35
  </template>
34
36
  ```
35
37
 
36
- </template>
37
- </ComponentDemo>
38
-
39
38
  ## Top label
40
39
 
41
- <ComponentDemo>
42
- <MazInput v-model="inputValue" top-label="Top label" placeholder="Placeholder" autocomplete="off" />
43
-
44
- <template #code>
45
-
46
40
  ```html
47
41
  <MazInput v-model="inputValue" top-label="Top label" placeholder="Placeholder" />
48
42
  ```
49
43
 
50
- </template>
51
- </ComponentDemo>
52
-
53
44
  ## Assistive text
54
45
 
55
- <ComponentDemo>
56
- <MazInput v-model="inputValue" top-label="Top label" assistive-text="Assistive text" placeholder="Placeholder" />
57
- <br />
58
- <br />
59
- <MazInput v-model="inputValue" error top-label="Top label" assistive-text="Assistive text" placeholder="Placeholder" />
60
-
61
- <template #code>
62
-
63
46
  ```html
64
47
  <MazInput v-model="inputValue" top-label="Top label" assistive-text="Assistive text" placeholder="Placeholder" />
65
48
  ```
66
49
 
67
- </template>
68
- </ComponentDemo>
69
-
70
50
  ## Password
71
51
 
72
- <ComponentDemo>
73
- <form>
74
- <MazInput v-model="passwordValue" label="Label" type="password" name="password" autocomplete="nope" />
75
- </form>
76
-
77
- <template #code>
78
-
79
52
  ```html
80
53
  <MazInput v-model="passwordValue" label="Label" type="password" />
81
54
  ```
82
55
 
83
- </template>
84
- </ComponentDemo>
85
-
86
56
  ## Placeholder
87
57
 
88
- <ComponentDemo>
89
- <MazInput v-model="inputValue" placeholder="placeholder" autocomplete="off" />
90
-
91
- <template #code>
92
-
93
58
  ```html
94
59
  <MazInput v-model="inputValue" placeholder="placeholder" />
95
60
  ```
96
61
 
97
- </template>
98
- </ComponentDemo>
99
-
100
62
  ## Required
101
63
 
102
- <ComponentDemo>
103
- <MazInput v-model="inputValue" label="label required" required autocomplete="off" />
104
-
105
- <template #code>
106
-
107
64
  ```html
108
65
  <MazInput v-model="inputValue" label="label required" required />
109
66
  ```
110
67
 
111
- </template>
112
- </ComponentDemo>
113
-
114
68
  ## Disabled
115
69
 
116
- <ComponentDemo>
117
- <MazInput v-model="inputValue" label="label disabled" disabled autocomplete="off" />
118
-
119
- <template #code>
120
-
121
70
  ```html
122
71
  <MazInput v-model="inputValue" label="label disabled" disabled />
123
72
  ```
124
73
 
125
- </template>
126
- </ComponentDemo>
127
-
128
74
  ## Hint
129
75
 
130
76
  > Will replace the label, useful to display short message
131
77
 
132
- <ComponentDemo>
133
- <MazInput v-model="defaultInputValue" label="label hint" hint="An error occured" error autocomplete="off" />
134
-
135
- <template #code>
136
-
137
78
  ```html
138
79
  <MazInput v-model="defaultInputValue" label="label hint" hint="An error occured" error />
139
80
  ```
140
81
 
141
- </template>
142
- </ComponentDemo>
143
-
144
82
  ## Icons
145
83
 
146
- <MazInput
147
- v-model="inputValue"
148
- label="label icons"
149
- start-icon="/banknotes.svg"
150
- end-icon="/user.svg"
151
- autocomplete="off"
152
- />
153
-
154
84
  ### Use icon name
155
85
 
156
- ::: details View code
86
+ **Details: View code**
157
87
 
158
88
  When you use the properties `end-icon`, `start-icon` or `icon` with the icon name (string), the component uses `<MazIcon icon="..." />` component.
159
89
 
@@ -163,11 +93,9 @@ Check out how [MazIcon](./maz-icon.md) works, see all available icons and downlo
163
93
  <MazInput v-model="inputValue" label="label icons" start-icon="/banknotes.svg" end-icon="/user.svg" />
164
94
  ```
165
95
 
166
- :::
167
-
168
96
  ### Use your own SVG icons
169
97
 
170
- ::: details View code
98
+ **Details: View code**
171
99
 
172
100
  ```html
173
101
  <MazInput v-model="inputValue" label="label icons">
@@ -203,11 +131,9 @@ Check out how [MazIcon](./maz-icon.md) works, see all available icons and downlo
203
131
  </MazInput>
204
132
  ```
205
133
 
206
- :::
207
-
208
134
  ### Use [vite-svg-loader](https://github.com/jpkleemans/vite-svg-loader)
209
135
 
210
- ::: details View code
136
+ **Details: View code**
211
137
 
212
138
  ```vue
213
139
  <script lang="ts" setup>
@@ -229,13 +155,11 @@ const inputValue = ref('value')
229
155
  </template>
230
156
  ```
231
157
 
232
- :::
233
-
234
158
  ### Pass a full `MazIconProps` object
235
159
 
236
- `startIcon` and `endIcon` also accept a full `MazIconProps` object — pass the same shape `<MazIcon>` accepts to override the size, set a `<title>` for screen readers, attach `svgAttributes`, etc.
160
+ `startIcon` and `endIcon` also accept a full `MazIconProps` object - pass the same shape `<MazIcon>` accepts to override the size, set a `<title>` for screen readers, attach `svgAttributes`, etc.
237
161
 
238
- ::: details View code
162
+ **Details: View code**
239
163
 
240
164
  ```vue
241
165
  <script lang="ts" setup>
@@ -259,28 +183,14 @@ const inputValue = ref('value')
259
183
  </template>
260
184
  ```
261
185
 
262
- :::
263
-
264
186
  ## Auto focus
265
187
 
266
188
  > Will focus automatically the component
267
189
 
268
- <ComponentDemo>
269
- <MazInput
270
- v-model="inputValue"
271
- label="label auto-focus"
272
- autocomplete="off"
273
- />
274
-
275
- <template #code>
276
-
277
190
  ```html
278
191
  <MazInput v-model="inputValue" label="label auto-focus" auto-focus />
279
192
  ```
280
193
 
281
- </template>
282
- </ComponentDemo>
283
-
284
194
  ## Debounce
285
195
 
286
196
  > The value emit by the input will be delayed, usefull for searching
@@ -289,40 +199,13 @@ const inputValue = ref('value')
289
199
  >
290
200
  > If the debounce is true, the default debounce delay is 500ms
291
201
 
292
- <ComponentDemo>
293
- <MazInput v-model="inputValue" label="label debounce" :debounce="1000" autocomplete="off" />
294
-
295
- <p class="maz:mt-2">
296
- modelValue: {{ inputValue ?? 'null' }}
297
- </p>
298
-
299
- <template #code>
300
-
301
202
  ```html
302
203
  <MazInput v-model="inputValue" label="label debounce" :debounce="1000" />
303
204
  ```
304
205
 
305
- </template>
306
- </ComponentDemo>
307
-
308
206
  ## Sizes
309
207
 
310
- > Use the attribute `size` with a value in {{ sizes.join(', ') }}
311
-
312
- <ComponentDemo>
313
- <div class="maz:flex maz:flex-col maz:gap-2 maz:items-start">
314
- <MazInput
315
- v-for="size in sizes"
316
- :key="size"
317
- v-model="inputValue"
318
- :label="['mini', 'xs'].includes(size) ? undefined : size"
319
- :placeholder="['mini', 'xs'].includes(size) ? size : undefined"
320
- :size="size"
321
- autocomplete="off"
322
- />
323
- </div>
324
-
325
- <template #code>
208
+ > Use the attribute `size` with a value in
326
209
 
327
210
  ```vue
328
211
  <script setup lang="ts">
@@ -340,32 +223,15 @@ const sizes = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
340
223
  </template>
341
224
  ```
342
225
 
343
- </template>
344
- </ComponentDemo>
226
+ **Note: Zoom on iOS**
345
227
 
346
- ::: info Zoom on iOS
347
228
  iOS zooms the page when a focused field has a font size below `16px` (most sizes with a `14px` `base-font-size`). This applies to every form field: `MazInput` and the components built on it, `MazTextarea`, `MazInputCode`... To prevent it without changing the design of the fields, enable the `general.preventIosInputZoom` option of [@maz-ui/nuxt](../ecosystem/nuxt.md), or call [preventIosInputZoom](../ecosystem/utils/prevent-ios-input-zoom.md) from `@maz-ui/utils` in a Vue app.
348
- :::
349
229
 
350
230
  ## Colors
351
231
 
352
- ::: tip
232
+ **Tip:**
233
+
353
234
  Click on each input to show colors
354
- :::
355
-
356
- <ComponentDemo>
357
- <div class="maz:flex maz:flex-col maz:gap-2 maz:items-start">
358
- <MazInput
359
- v-for="name in colors"
360
- :key="name"
361
- v-model="inputValue"
362
- :label="name"
363
- :color="name"
364
- autocomplete="off"
365
- />
366
- </div>
367
-
368
- <template #code>
369
235
 
370
236
  ```vue
371
237
  <script setup>
@@ -383,25 +249,10 @@ const colors = ['primary', 'secondary', 'info', 'success', 'warning', 'destructi
383
249
  </template>
384
250
  ```
385
251
 
386
- </template>
387
- </ComponentDemo>
388
-
389
252
  ## Rounded Size
390
253
 
391
254
  Use the attribute `rounded-size` with a value in `'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full'`
392
255
 
393
- <ComponentDemo>
394
- <div class="maz:flex maz:flex-col maz:gap-2 maz:items-start">
395
- <MazInput rounded-size="none" placeholder="Rounded input" autocomplete="off" />
396
- <MazInput rounded-size="sm" placeholder="Rounded input" autocomplete="off" />
397
- <MazInput rounded-size="md" placeholder="Rounded input" autocomplete="off" />
398
- <MazInput rounded-size="lg" placeholder="Rounded input" autocomplete="off" />
399
- <MazInput rounded-size="xl" placeholder="Rounded input" autocomplete="off" />
400
- <MazInput rounded-size="full" placeholder="Rounded input" autocomplete="off" />
401
- </div>
402
-
403
- <template #code>
404
-
405
256
  ```html
406
257
  <MazInput rounded-size="none" placeholder="Rounded input" />
407
258
  <MazInput rounded-size="sm" placeholder="Rounded input" />
@@ -411,71 +262,73 @@ Use the attribute `rounded-size` with a value in `'none' | 'sm' | 'md' | 'lg' |
411
262
  <MazInput rounded-size="full" placeholder="Rounded input" />
412
263
  ```
413
264
 
414
- </template>
415
- </ComponentDemo>
416
-
417
265
  ## State
418
266
 
419
- <ComponentDemo title="destructive">
420
- <MazInput v-model="inputValue" label="Label" error autocomplete="off" />
421
-
422
- <template #code>
267
+ **destructive**
423
268
 
424
269
  ```html
425
270
  <MazInput v-model="inputValue" label="Label" error />
426
271
  ```
427
272
 
428
- </template>
429
- </ComponentDemo>
430
-
431
- <br />
432
- <br />
433
-
434
- <ComponentDemo title="Warning">
435
- <MazInput v-model="inputValue" label="Label" warning autocomplete="off" />
436
-
437
- <template #code>
273
+ **Warning**
438
274
 
439
275
  ```html
440
276
  <MazInput v-model="inputValue" label="Label" warning />
441
277
  ```
442
278
 
443
- </template>
444
- </ComponentDemo>
445
-
446
- <br />
447
- <br />
448
-
449
- <ComponentDemo title="Success">
450
- <MazInput v-model="inputValue" label="Label" success autocomplete="off" />
451
-
452
- <template #code>
279
+ **Success**
453
280
 
454
281
  ```html
455
282
  <MazInput v-model="inputValue" label="Label" success />
456
283
  ```
457
284
 
458
- </template>
459
- </ComponentDemo>
460
-
461
- <script setup lang="ts">
462
- import { ref, computed } from 'vue'
463
- const inputValue = ref()
464
- const passwordValue = ref()
465
- const defaultInputValue = ref('any value')
466
-
467
- const sizes = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
468
-
469
- const colors = [
470
- 'primary',
471
- 'secondary',
472
- 'info',
473
- 'success',
474
- 'warning',
475
- 'destructive',
476
- 'accent',
477
- 'contrast',
478
- ]
479
- </script>
480
-
481
- <!--@include: ./../../.vitepress/generated-docs/maz-input.doc.md-->
285
+ ## MazInput API
286
+
287
+ `import MazInput from 'maz-ui/components/MazInput'`
288
+
289
+ ### Props
290
+
291
+ - `model-value` (`T`, `v-model`): The current value of the input field. This prop is used for two-way data binding with v-model.
292
+ - `placeholder` (`string`): Text displayed when the input is empty to guide the user.
293
+ - `label` (`string`): Floating label that appears inside the input and moves up when focused or filled. Provides better UX than traditional placeholders.
294
+ - `top-label` (`string`): Static label displayed above the input field. Unlike the floating label, this remains fixed.
295
+ - `assistive-text` (`string`): Helper text displayed below the input to provide additional context or validation feedback.
296
+ - `color` (`"primary" | "secondary" | "accent" | "info" | "success" | "warning" | "destructive" | "contrast" | "transparent"`, default: `"primary"`): Theme color that affects the border and focus states of the input.
297
+ - `type` (`InputTypeHTMLAttribute`, default: `"text"`): HTML input type attribute that determines the input behavior and validation. Values: `'text'`, `'password'`, `'email'`, `'number'`, `'tel'`, `'url'`, `'search'`, `'date'`, `'time'`, `'datetime-local'`, `'month'`, `'week'` (non exhaustive).
298
+ - `required` (`boolean`, default: `false`): Makes the input field mandatory for form submission.
299
+ - `disabled` (`boolean`, default: `false`): Disables the input field, preventing user interaction and form submission.
300
+ - `readonly` (`boolean`): Makes the input field read-only, allowing selection but preventing modification.
301
+ - `id` (`string`): Unique identifier for the input element, used for form labels and accessibility.
302
+ - `error` (`boolean`, default: `false`): Applies error styling (red border and text) to indicate validation failure.
303
+ - `success` (`boolean`, default: `false`): Applies success styling (green border and text) to indicate successful validation.
304
+ - `warning` (`boolean`, default: `false`): Applies warning styling (orange border and text) to indicate potential issues.
305
+ - `hint` (`string`): Alternative text that replaces the label when provided. Useful for contextual hints.
306
+ - `input-classes` (`string`): Additional CSS classes to apply specifically to the input wrapper element.
307
+ - `border` (`boolean`, default: `true`): Controls whether the input has a visible border. Set to false for borderless inputs.
308
+ - `inputmode` (`"none" | "text" | "search" | "url" | "email" | "tel" | "numeric" | "decimal"`, default: `"text"`): HTML inputmode attribute that provides hints for virtual keyboards on mobile devices.
309
+ - `size` (`"xs" | "sm" | "md" | "lg" | "xl" | "mini"`): Controls the height and text size of the input component.
310
+ - `debounce` (`number | boolean`, default: `false`): Enables input debouncing to limit the frequency of value updates. When true, uses 500ms delay. When a number, uses that value as delay in milliseconds.
311
+ - `auto-focus` (`boolean`, default: `false`): Automatically focuses the input when the component mounts.
312
+ - `border-active` (`boolean`, default: `false`): When true, shows the colored border immediately instead of only on focus.
313
+ - `start-icon` (`any`): Icon displayed on the inline-start edge of the input (left in LTR, right in RTL). Accepts a bare value (Vue component, raw SVG string, URL or `data:` URI) or a full `MazIconProps` object for fine-grained control (size, title, svgAttributes, fallback, …).
314
+ - `end-icon` (`any`): Icon displayed on the inline-end edge of the input (right in LTR, left in RTL). Accepts a bare value or a full `MazIconProps` object.
315
+ - `rounded-size` (`MazRoundedSize`, default: `'md'`): Controls the border radius of the input component. Values: `'none'`, `'sm'`, `'md'`, `'lg'`, `'xl'`, `'full'` (non exhaustive).
316
+ - `block` (`boolean`): Makes the input expand to the full width of its container.
317
+ - `name` (`string`): The name of the input field. Used for form submission and validation.
318
+ - `autocomplete` (`string`): The autocomplete attribute for the input field. Used for form submission and validation.
319
+ - `loading` (`boolean`, default: `false`): Loading state for the input field. Used to show a loading spinner.
320
+
321
+ ### Events
322
+
323
+ - `@update:model-value` (payload: `value?: T | undefined`): Triggered when the input value changes, used for v-model two-way binding. This event is debounced if the debounce prop is enabled
324
+ - `@click` (payload: `event: Event`): Triggered when the user clicks on the input field
325
+ - `@blur` (payload: `event: Event`): Triggered when the input field loses focus (user clicks outside or tabs away)
326
+ - `@change` (payload: `event: Event`): Triggered when the input value changes and the field loses focus. Different from input event which fires on every keystroke
327
+ - `@focus` (payload: `event: Event`): Triggered when the input field gains focus (user clicks or tabs into the field)
328
+ - `@input` (payload: `event: Event`): Triggered on every keystroke or input interaction (real-time input changes). This is the raw input event, not debounced
329
+
330
+ ### Slots
331
+
332
+ - `#start-icon`: Custom content for the inline-start edge of the input field (left in LTR, right in RTL).
333
+ - `#end-icon`: Custom content for the inline-end edge of the input field (right in LTR, left in RTL).
334
+ - `#loader`: Loader slot.
@@ -0,0 +1,113 @@
1
+ ---
2
+ title: "MazLazyImg"
3
+ description: "MazLazyImg is a standalone component to display images and svgs with lazy loading"
4
+ package: "maz-ui"
5
+ url: "https://maz-ui.com/components/maz-lazy-img"
6
+ ---
7
+
8
+ # MazLazyImg
9
+
10
+ > MazLazyImg is a standalone component to display images and svgs with lazy loading
11
+
12
+ - Package: `maz-ui`
13
+ - Import: `import MazLazyImg from 'maz-ui/components/MazLazyImg'`
14
+ - Nuxt: auto-imported by `@maz-ui/nuxt`, no import needed in a Nuxt app
15
+ - Web: https://maz-ui.com/components/maz-lazy-img
16
+
17
+ > Before use it, you should install the MazUi plugin in your project, follow instructions in [Getting Started](../guide/getting-started.md)
18
+
19
+ ```vue
20
+ <script setup lang="ts">
21
+ import MazLazyImg from 'maz-ui/components/MazLazyImg'
22
+ </script>
23
+
24
+ <template>
25
+ <MazLazyImg src="https://placedog.net/1000/1000" block />
26
+ </template>
27
+ ```
28
+
29
+ **Tip: Performance**
30
+
31
+ `MazLazyImg` relies on the [`vLazyImg`](../directives/lazy-img.md) directive, whose `IntersectionObserver`s are pooled and shared across every instance - rendering many images (galleries, lists, avatars) stays cheap.
32
+
33
+ ## Responsive sources
34
+
35
+ Pass an object with `sources` to serve different images depending on the media query (like a native `<picture>`).
36
+
37
+ ```vue
38
+ <template>
39
+ <MazLazyImg
40
+ :src="{
41
+ sources: [
42
+ { srcset: 'https://placedog.net/600/400', media: '(max-width: 600px)' },
43
+ { srcset: 'https://placedog.net/1500/1000', media: '(min-width: 601px)' },
44
+ ],
45
+ }"
46
+ block
47
+ />
48
+ </template>
49
+ ```
50
+
51
+ ## Image height full
52
+
53
+ By default the image is displayed with `width: 100%`. Enable `image-height-full` to fill the **height** instead: the image keeps its aspect ratio, fills 100% of the height and overflows/crops horizontally. Handy for wide images or SVGs inside a fixed-height container.
54
+
55
+ ```vue
56
+ <template>
57
+ <div style="height: 200px;">
58
+ <MazLazyImg image-height-full src="https://placedog.net/1500/1000" />
59
+ </div>
60
+ </template>
61
+ ```
62
+
63
+ ## Fallback on error
64
+
65
+ Provide `fallback-src` to swap the image when it fails to load.
66
+
67
+ ```vue
68
+ <template>
69
+ <MazLazyImg
70
+ src="https://broken-link-image-src.example"
71
+ fallback-src="https://placedog.net/500/500"
72
+ block
73
+ />
74
+ </template>
75
+ ```
76
+
77
+ ## Without loader
78
+
79
+ Hide the spinner shown while the image is loading with `hide-loader`.
80
+
81
+ ```vue
82
+ <template>
83
+ <MazLazyImg src="https://placedog.net/1000/1000" hide-loader block />
84
+ </template>
85
+ ```
86
+
87
+ ## MazLazyImg API
88
+
89
+ `import MazLazyImg from 'maz-ui/components/MazLazyImg'`
90
+
91
+ ### Props
92
+
93
+ - `src` (`MazImage | null`): The source of the image.
94
+ - `alt` (`string`): The alt of the image.
95
+ - `hide-loader` (`boolean`): Remove the loader.
96
+ - `observer-once` (`boolean`, default: `true`): Remove the observer once the image is loaded.
97
+ - `load-once` (`boolean`): Remove the observer once the image is loaded.
98
+ - `image-height-full` (`boolean`): Make the image height full.
99
+ - `observer-options` (`{ root?: HTMLElement | null | undefined; threshold: number; rootMargin?: string | undefined; }`): The options of the observer.
100
+ - `fallback-src` (`string`): The fallback src to replace the src on loading error.
101
+ - `img-class` (`ClassValue`): The classes of the image element.
102
+ - `block` (`boolean`): The image will be displayed in full width.
103
+
104
+ ### Events
105
+
106
+ - `@intersecting` (payload: `el: Element`): Emitted when the image is intersecting
107
+ - `@loading` (payload: `el: Element`): Emitted when the image is loading
108
+ - `@loaded` (payload: `el: Element`): Emitted when the image is loaded
109
+ - `@error` (payload: `el: Element`): Emitted when the image is in error
110
+
111
+ ### Slots
112
+
113
+ - `#default`