@maz-ui/mcp 5.0.0-beta.2 → 5.0.0-beta.24

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 (142) hide show
  1. package/README.md +1 -1
  2. package/dist/mcp.d.mts +22 -9
  3. package/dist/mcp.d.ts +22 -9
  4. package/dist/mcp.mjs +160 -83
  5. package/docs/generated-docs/maz-avatar.doc.md +25 -25
  6. package/docs/generated-docs/maz-btn.doc.md +1 -1
  7. package/docs/generated-docs/maz-checkbox.doc.md +16 -17
  8. package/docs/generated-docs/maz-circular-progress-bar.doc.md +1 -1
  9. package/docs/generated-docs/maz-code-highlight.doc.md +11 -0
  10. package/docs/generated-docs/maz-date-picker.doc.md +41 -41
  11. package/docs/generated-docs/maz-drawer.doc.md +7 -8
  12. package/docs/generated-docs/maz-expand-animation.doc.md +4 -4
  13. package/docs/generated-docs/maz-fullscreen-loader.doc.md +5 -5
  14. package/docs/generated-docs/maz-gallery.doc.md +15 -15
  15. package/docs/generated-docs/maz-input-code.doc.md +16 -16
  16. package/docs/generated-docs/maz-input-phone-number.doc.md +42 -38
  17. package/docs/generated-docs/maz-input-price.doc.md +14 -14
  18. package/docs/generated-docs/maz-input-tags.doc.md +16 -16
  19. package/docs/generated-docs/maz-input.doc.md +33 -33
  20. package/docs/generated-docs/maz-lazy-img.doc.md +14 -14
  21. package/docs/generated-docs/maz-loading-bar.doc.md +4 -4
  22. package/docs/generated-docs/maz-pull-to-refresh.doc.md +10 -10
  23. package/docs/generated-docs/maz-radio-buttons.doc.md +17 -17
  24. package/docs/generated-docs/maz-radio.doc.md +16 -16
  25. package/docs/generated-docs/maz-reading-progress-bar.doc.md +4 -4
  26. package/docs/generated-docs/maz-sidebar-content.doc.md +5 -0
  27. package/docs/generated-docs/maz-sidebar-footer.doc.md +5 -0
  28. package/docs/generated-docs/maz-sidebar-group.doc.md +11 -0
  29. package/docs/generated-docs/maz-sidebar-header.doc.md +5 -0
  30. package/docs/generated-docs/maz-sidebar-menu-button.doc.md +27 -0
  31. package/docs/generated-docs/maz-sidebar-menu-item.doc.md +5 -0
  32. package/docs/generated-docs/maz-sidebar-menu-sub.doc.md +16 -0
  33. package/docs/generated-docs/maz-sidebar-menu.doc.md +5 -0
  34. package/docs/generated-docs/maz-sidebar-separator.doc.md +0 -0
  35. package/docs/generated-docs/maz-sidebar-trigger.doc.md +5 -0
  36. package/docs/generated-docs/maz-sidebar.doc.md +36 -0
  37. package/docs/generated-docs/maz-slider.doc.md +1 -1
  38. package/docs/generated-docs/maz-spinner.doc.md +4 -4
  39. package/docs/generated-docs/maz-switch.doc.md +14 -14
  40. package/docs/generated-docs/maz-table.doc.md +5 -5
  41. package/docs/generated-docs/maz-textarea.doc.md +25 -24
  42. package/docs/generated-docs/maz-ticker.doc.md +1 -1
  43. package/docs/generated-docs/maz-window-mockup.doc.md +23 -0
  44. package/docs/src/blog/v4.md +1 -1
  45. package/docs/src/blog/v5.md +5 -7
  46. package/docs/src/components/maz-btn.md +1 -1
  47. package/docs/src/components/maz-code-highlight.md +233 -0
  48. package/docs/src/components/maz-container.md +2 -2
  49. package/docs/src/components/maz-date-picker.md +1 -1
  50. package/docs/src/components/maz-dialog.md +46 -0
  51. package/docs/src/components/maz-icon.md +2 -2
  52. package/docs/src/components/maz-input-phone-number.md +106 -103
  53. package/docs/src/components/maz-sidebar.md +719 -0
  54. package/docs/src/components/maz-textarea.md +27 -1
  55. package/docs/src/components/maz-timeline.md +60 -0
  56. package/docs/src/components/maz-window-mockup.md +249 -0
  57. package/docs/src/directives/click-outside.md +8 -15
  58. package/docs/src/directives/fullscreen-img.md +1 -1
  59. package/docs/src/directives/lazy-img.md +5 -5
  60. package/docs/src/directives/tooltip.md +24 -1
  61. package/docs/src/directives/zoom-img.md +1 -1
  62. package/docs/src/ecosystem/eslint-config.md +95 -1
  63. package/docs/src/{guide/icons.md → ecosystem/icons/index.md} +1 -1
  64. package/docs/src/ecosystem/node/exec-promise.md +87 -0
  65. package/docs/src/ecosystem/node/index.md +53 -0
  66. package/docs/src/ecosystem/node/logger.md +146 -0
  67. package/docs/src/ecosystem/node/print-banner.md +93 -0
  68. package/docs/src/{guide → ecosystem}/nuxt.md +81 -47
  69. package/docs/src/{guide → ecosystem}/themes.md +153 -72
  70. package/docs/src/{guide → ecosystem}/translations.md +1 -1
  71. package/docs/src/ecosystem/utils/camel-case.md +31 -0
  72. package/docs/src/{helpers → ecosystem/utils}/capitalize.md +2 -3
  73. package/docs/src/ecosystem/utils/check-availability.md +79 -0
  74. package/docs/src/ecosystem/utils/cookie.md +80 -0
  75. package/docs/src/{helpers → ecosystem/utils}/currency.md +2 -2
  76. package/docs/src/{helpers → ecosystem/utils}/date.md +2 -2
  77. package/docs/src/ecosystem/utils/debounce-callback.md +38 -0
  78. package/docs/src/ecosystem/utils/debounce-id.md +69 -0
  79. package/docs/src/ecosystem/utils/debounce.md +65 -0
  80. package/docs/src/ecosystem/utils/fetch-locale-ip.md +33 -0
  81. package/docs/src/ecosystem/utils/format-json.md +33 -0
  82. package/docs/src/ecosystem/utils/format-phone-number.md +37 -0
  83. package/docs/src/ecosystem/utils/get-browser-locale.md +29 -0
  84. package/docs/src/ecosystem/utils/get-error-message.md +39 -0
  85. package/docs/src/ecosystem/utils/idle-timeout.md +90 -0
  86. package/docs/src/ecosystem/utils/index.md +60 -0
  87. package/docs/src/ecosystem/utils/is-client.md +32 -0
  88. package/docs/src/ecosystem/utils/is-equal.md +38 -0
  89. package/docs/src/ecosystem/utils/is-server.md +31 -0
  90. package/docs/src/ecosystem/utils/is-standalone-mode.md +43 -0
  91. package/docs/src/ecosystem/utils/kebab-case.md +36 -0
  92. package/docs/src/ecosystem/utils/normalize-string.md +77 -0
  93. package/docs/src/{helpers → ecosystem/utils}/number.md +2 -2
  94. package/docs/src/ecosystem/utils/pascal-case.md +35 -0
  95. package/docs/src/ecosystem/utils/script-loader.md +77 -0
  96. package/docs/src/ecosystem/utils/sleep.md +59 -0
  97. package/docs/src/ecosystem/utils/snake-case.md +36 -0
  98. package/docs/src/ecosystem/utils/swipe-handler.md +91 -0
  99. package/docs/src/ecosystem/utils/textarea-autogrow.md +41 -0
  100. package/docs/src/ecosystem/utils/throttle-id.md +48 -0
  101. package/docs/src/ecosystem/utils/throttle.md +57 -0
  102. package/docs/src/ecosystem/utils/truthy-filter.md +31 -0
  103. package/docs/src/ecosystem/utils/types/deep-key-of.md +48 -0
  104. package/docs/src/ecosystem/utils/types/deep-partial.md +42 -0
  105. package/docs/src/ecosystem/utils/types/deep-required.md +39 -0
  106. package/docs/src/ecosystem/utils/types/flatten-object-keys.md +44 -0
  107. package/docs/src/ecosystem/utils/types/generic-instance-type.md +42 -0
  108. package/docs/src/ecosystem/utils/types/infer-maybe-ref.md +35 -0
  109. package/docs/src/ecosystem/utils/upper-first.md +32 -0
  110. package/docs/src/ecosystem/utils/user-visibility.md +69 -0
  111. package/docs/src/guide/getting-started.md +15 -13
  112. package/docs/src/guide/global-defaults.md +101 -0
  113. package/docs/src/guide/maz-ui-provider.md +6 -3
  114. package/docs/src/guide/migration-v4.md +13 -9
  115. package/docs/src/guide/migration-v5.md +67 -12
  116. package/docs/src/guide/resolvers.md +7 -7
  117. package/docs/src/guide/tailwind.md +4 -0
  118. package/docs/src/guide/vue.md +4 -4
  119. package/docs/src/index.md +12 -12
  120. package/docs/src/plugins/aos.md +1 -1
  121. package/docs/src/plugins/wait.md +1 -1
  122. package/package.json +6 -5
  123. package/docs/src/helpers/camel-case.md +0 -14
  124. package/docs/src/helpers/check-availability.md +0 -14
  125. package/docs/src/helpers/debounce-callback.md +0 -14
  126. package/docs/src/helpers/debounce-id.md +0 -14
  127. package/docs/src/helpers/debounce.md +0 -14
  128. package/docs/src/helpers/is-client.md +0 -14
  129. package/docs/src/helpers/is-equal.md +0 -14
  130. package/docs/src/helpers/is-standalone-mode.md +0 -14
  131. package/docs/src/helpers/kebab-case.md +0 -14
  132. package/docs/src/helpers/normalize-string.md +0 -14
  133. package/docs/src/helpers/pascal-case.md +0 -14
  134. package/docs/src/helpers/script-loader.md +0 -14
  135. package/docs/src/helpers/sleep.md +0 -14
  136. package/docs/src/helpers/snake-case.md +0 -14
  137. package/docs/src/helpers/throttle-id.md +0 -14
  138. package/docs/src/helpers/throttle.md +0 -14
  139. /package/docs/src/{guide → ecosystem/icons}/icon-set.md +0 -0
  140. /package/docs/src/{guide → ecosystem}/mcp.md +0 -0
  141. /package/docs/src/{helpers → ecosystem/utils}/country-code-to-unicode-flag.md +0 -0
  142. /package/docs/src/{helpers → ecosystem/utils}/get-country-flag-url.md +0 -0
@@ -68,6 +68,32 @@ You can use the `top-label` attribute to display a top label above the textarea.
68
68
  </template>
69
69
  </ComponentDemo>
70
70
 
71
+ ## With assistive text
72
+
73
+ You can use the `assistive-text` attribute to display a assistive text below the textarea.
74
+
75
+ <ComponentDemo>
76
+ <MazTextarea
77
+ v-model="value"
78
+ top-label="Your message"
79
+ placeholder="Type your message..."
80
+ assistive-text="This is an assistive text"
81
+ />
82
+
83
+ <template #code>
84
+
85
+ ```html
86
+ <MazTextarea
87
+ v-model="value"
88
+ top-label="Your message"
89
+ placeholder="Type your message..."
90
+ assistive-text="This is an assistive text"
91
+ />
92
+ ```
93
+
94
+ </template>
95
+ </ComponentDemo>
96
+
71
97
  ## With label and append slots
72
98
 
73
99
  You can use the `label` and `append` slots to customize the label and the append element.
@@ -84,7 +110,7 @@ You can use the `label` and `append` slots to customize the label and the append
84
110
  </span>
85
111
  </template>
86
112
  <template #append>
87
- <MazBtn icon="paper-airplane" size="sm" @click="sendMessage" />
113
+ <MazBtn icon="/paper-airplane.svg" size="sm" @click="sendMessage" />
88
114
  </template>
89
115
  </MazTextarea>
90
116
 
@@ -9,6 +9,21 @@ description: MazTimeline is a step/progress timeline component for Vue 3 with su
9
9
 
10
10
  <!--@include: ./../../.vitepress/mixins/getting-started.md-->
11
11
 
12
+ ---
13
+
14
+ Control the current step:
15
+
16
+ <MazRadioButtons
17
+ :model-value="currentStep"
18
+ size="sm"
19
+ :options="[
20
+ { label: 'None', value: -1 },
21
+ ...steps.map((step, index) => ({ label: index, value: index })),
22
+ { label: 'All Completed', value: 99 },
23
+ ]"
24
+ @update:model-value="currentStep = $event"
25
+ />
26
+
12
27
  ## Basic usage
13
28
 
14
29
  <ComponentDemo>
@@ -292,6 +307,40 @@ Customize the indicator border radius with the `rounded-size` prop.
292
307
  </template>
293
308
  </ComponentDemo>
294
309
 
310
+ ## Custom Icons
311
+
312
+ <ComponentDemo>
313
+ <MazTimeline :model-value="0" :steps="iconsSteps" direction="horizontal" size="lg" />
314
+
315
+ <template #code>
316
+
317
+ ```vue
318
+ <template>
319
+ <MazTimeline
320
+ v-model="currentStep"
321
+ :steps="steps"
322
+ size="lg"
323
+ />
324
+ </template>
325
+
326
+ <script lang="ts" setup>
327
+ import { MazCommandLine } from '@maz-ui/icons/MazCommandLine'
328
+ import { MazClipboardDocumentList } from '@maz-ui/icons/MazClipboardDocumentList'
329
+ import { MazClipboardDocumentCheck } from '@maz-ui/icons/MazClipboardDocumentCheck'
330
+ import { MazComputerDesktop } from '@maz-ui/icons/MazComputerDesktop'
331
+
332
+ const iconsSteps = [
333
+ { title: 'PO', subtitle: 'Writing PRD', icon: MazClipboardDocumentList },
334
+ { title: 'Dev', subtitle: 'Building Code', icon: MazCommandLine },
335
+ { title: 'Tech Lead', subtitle: 'Review Code', icon: MazComputerDesktop },
336
+ { title: 'QA', subtitle: 'Testing', icon: MazClipboardDocumentCheck },
337
+ ]
338
+ </script>
339
+ ```
340
+
341
+ </template>
342
+ </ComponentDemo>
343
+
295
344
  ## Custom slots
296
345
 
297
346
  MazTimeline provides scoped slots for full customization.
@@ -378,6 +427,10 @@ MazTimeline provides scoped slots for full customization.
378
427
 
379
428
  <script lang="ts" setup>
380
429
  import { ref } from 'vue'
430
+ import { MazComputerDesktop } from '@maz-ui/icons/MazComputerDesktop'
431
+ import { MazCommandLine } from '@maz-ui/icons/MazCommandLine'
432
+ import { MazClipboardDocumentList } from '@maz-ui/icons/MazClipboardDocumentList'
433
+ import { MazClipboardDocumentCheck } from '@maz-ui/icons/MazClipboardDocumentCheck'
381
434
 
382
435
  const currentStep = ref(1)
383
436
  const clickableStep = ref(0)
@@ -410,6 +463,13 @@ MazTimeline provides scoped slots for full customization.
410
463
  { title: 'Complete', subtitle: 'All done!' },
411
464
  ]
412
465
 
466
+ const iconsSteps = [
467
+ { title: 'PO', subtitle: 'Writing PRD', icon: MazClipboardDocumentList },
468
+ { title: 'Dev', subtitle: 'Building Code', icon: MazCommandLine },
469
+ { title: 'Tech Lead', subtitle: 'Review Code', icon: MazComputerDesktop },
470
+ { title: 'QA', subtitle: 'Testing', icon: MazClipboardDocumentCheck },
471
+ ]
472
+
413
473
  const colors = ['primary', 'secondary', 'info', 'success', 'warning', 'destructive']
414
474
  const sizes = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
415
475
  const roundedSizes = ['full', 'lg', 'md', 'sm', 'none']
@@ -0,0 +1,249 @@
1
+ ---
2
+ title: MazWindowMockup
3
+ description: MazWindowMockup renders a macOS-style window frame in three variants — browser, terminal, and editor — to showcase content, demos, or code examples in your documentation or UI.
4
+ ---
5
+
6
+ # {{ $frontmatter.title }}
7
+
8
+ {{ $frontmatter.description }}
9
+
10
+ <!--@include: ./../../.vitepress/mixins/getting-started.md-->
11
+
12
+ ::: info Optional: shiki for code variants
13
+ When you pass the `code` prop, `MazWindowMockup` mounts `MazCodeHighlight` internally for syntax highlighting. This requires the [`shiki`](https://shiki.style) optional peer dependency to be installed. See the [MazCodeHighlight installation note](/components/maz-code-highlight#installation-requirement).
14
+ :::
15
+
16
+ ## Browser variant
17
+
18
+ The default variant. Displays an address bar with the `url` prop and a copy-URL button on the right side of the bar.
19
+
20
+ <ComponentDemo>
21
+ <MazWindowMockup url="https://maz-ui.com" min-height="100px">
22
+ <div style="padding: 1rem; text-align: center;">Browser content goes here</div>
23
+ </MazWindowMockup>
24
+
25
+ <template #code>
26
+
27
+ ```vue
28
+ <template>
29
+ <MazWindowMockup url="https://maz-ui.com" min-height="100px">
30
+ <div>Browser content goes here</div>
31
+ </MazWindowMockup>
32
+ </template>
33
+
34
+ <script lang="ts" setup>
35
+ import MazWindowMockup from 'maz-ui/components/MazWindowMockup'
36
+ </script>
37
+ ```
38
+
39
+ </template>
40
+ </ComponentDemo>
41
+
42
+ ### Hide the URL copy button
43
+
44
+ Set `:hide-url-copy="true"` to remove the copy-URL button from the title bar.
45
+
46
+ <ComponentDemo>
47
+ <MazWindowMockup url="https://maz-ui.com" min-height="80px" :hide-url-copy="true" />
48
+
49
+ <template #code>
50
+
51
+ ```vue
52
+ <template>
53
+ <MazWindowMockup url="https://maz-ui.com" min-height="80px" :hide-url-copy="true" />
54
+ </template>
55
+ ```
56
+
57
+ </template>
58
+ </ComponentDemo>
59
+
60
+ ### With screenshot
61
+
62
+ Use this variant to display a screenshot of a website.
63
+
64
+ <ComponentDemo>
65
+ <MazWindowMockup url="https://maz-ui.com" min-height="100px">
66
+ <img :src="screenshot" alt="Maz UI Demo Dashboard" width="100%">
67
+ </MazWindowMockup>
68
+
69
+ <template #code>
70
+
71
+ ```vue
72
+ <template>
73
+ <MazWindowMockup url="https://maz-ui.com" min-height="100px">
74
+ <img src="/img/screenshots/maz-ui-home-desktop.webp" alt="Maz UI Demo Dashboard" width="100%">
75
+ </MazWindowMockup>
76
+ </template>
77
+
78
+ <script lang="ts" setup>
79
+ import MazWindowMockup from 'maz-ui/components/MazWindowMockup'
80
+ </script>
81
+ ```
82
+
83
+ </template>
84
+ </ComponentDemo>
85
+
86
+ ## Terminal variant
87
+
88
+ Displays a centered title and a `$` prompt prefix in front of the code (when `code` is provided). The prompt prefix is **not** copied to the clipboard — the copy button only writes the raw `code` value.
89
+
90
+ <ComponentDemo>
91
+ <MazWindowMockup variant="terminal" title="zsh" code="pnpm add maz-ui" language="bash" />
92
+
93
+ <template #code>
94
+
95
+ ```vue
96
+ <template>
97
+ <MazWindowMockup variant="terminal" title="zsh" code="pnpm add maz-ui" language="bash" />
98
+ </template>
99
+
100
+ <script lang="ts" setup>
101
+ import MazWindowMockup from 'maz-ui/components/MazWindowMockup'
102
+ </script>
103
+ ```
104
+
105
+ </template>
106
+ </ComponentDemo>
107
+
108
+ ### Custom prompt
109
+
110
+ Replace the default `$` with any character via the `prompt` prop.
111
+
112
+ <ComponentDemo>
113
+ <MazWindowMockup variant="terminal" code="git status" language="bash" prompt="❯" />
114
+
115
+ <template #code>
116
+
117
+ ```vue
118
+ <template>
119
+ <MazWindowMockup variant="terminal" code="git status" language="bash" prompt="❯" />
120
+ </template>
121
+ ```
122
+
123
+ </template>
124
+ </ComponentDemo>
125
+
126
+ ### Without prompt
127
+
128
+ Hide the default prompt by setting `hide-prompt` to `true`.
129
+
130
+ <ComponentDemo>
131
+ <MazWindowMockup variant="terminal" code="git status" language="bash" :hide-prompt="true" />
132
+
133
+ <template #code>
134
+
135
+ ```vue
136
+ <template>
137
+ <MazWindowMockup variant="terminal" code="git status" language="bash" :hide-prompt="true" />
138
+ </template>
139
+ ```
140
+
141
+ </template>
142
+ </ComponentDemo>
143
+
144
+ ## Editor variant
145
+
146
+ Shows a filename tab anchored to the bottom of the title bar — matching the look of real editors like VSCode.
147
+
148
+ <ComponentDemo>
149
+ <MazWindowMockup variant="editor" filename="App.vue" :code="vueCode" language="vue" />
150
+
151
+ <template #code>
152
+
153
+ ```vue
154
+ <template>
155
+ <MazWindowMockup variant="editor" filename="App.vue" :code="vueCode" language="vue" />
156
+ </template>
157
+
158
+ <script lang="ts" setup>
159
+ import MazWindowMockup from 'maz-ui/components/MazWindowMockup'
160
+
161
+ const vueCode = `<template>
162
+ <MazBtn>Click me</MazBtn>
163
+ </template>`
164
+ </script>
165
+ ```
166
+
167
+ </template>
168
+ </ComponentDemo>
169
+
170
+ ## With code and language props
171
+
172
+ Pass `code` and `language` to display highlighted source code via `MazCodeHighlight`. The inner highlighter automatically renders with squared corners so it sits flush against the window's border.
173
+
174
+ <ComponentDemo>
175
+ <MazWindowMockup code="import MazBtn from 'maz-ui/components/MazBtn'" language="ts" />
176
+
177
+ <template #code>
178
+
179
+ ```vue
180
+ <template>
181
+ <MazWindowMockup code="import MazBtn from 'maz-ui/components/MazBtn'" language="ts" />
182
+ </template>
183
+
184
+ <script lang="ts" setup>
185
+ import MazWindowMockup from 'maz-ui/components/MazWindowMockup'
186
+ </script>
187
+ ```
188
+
189
+ </template>
190
+ </ComponentDemo>
191
+
192
+ ## Empty-state placeholder
193
+
194
+ When neither `code` nor a slot content is provided, the content area renders an empty placeholder. Pass the optional `label` prop to display a centered text inside it.
195
+
196
+ <ComponentDemo>
197
+ <MazWindowMockup url="https://maz-ui.com" min-height="160px" label="Preview" />
198
+
199
+ <template #code>
200
+
201
+ ```vue
202
+ <template>
203
+ <MazWindowMockup url="https://maz-ui.com" min-height="160px" label="Preview" />
204
+ </template>
205
+ ```
206
+
207
+ </template>
208
+ </ComponentDemo>
209
+
210
+ ## Custom translations
211
+
212
+ The URL copy button's aria-label and tooltip come from the `@maz-ui/translations` package (`windowMockup.copyUrlToClipboard` / `windowMockup.urlCopiedToClipboard`). Override per-instance with the `translations` prop:
213
+
214
+ <ComponentDemo>
215
+ <MazWindowMockup
216
+ url="https://maz-ui.com"
217
+ min-height="80px"
218
+ :translations="{ copyUrlToClipboard: 'Copier l\'URL', urlCopiedToClipboard: 'URL copiée !' }"
219
+ />
220
+
221
+ <template #code>
222
+
223
+ ```vue
224
+ <template>
225
+ <MazWindowMockup
226
+ url="https://maz-ui.com"
227
+ min-height="80px"
228
+ :translations="{
229
+ copyUrlToClipboard: 'Copier l\'URL',
230
+ urlCopiedToClipboard: 'URL copiée !',
231
+ }"
232
+ />
233
+ </template>
234
+ ```
235
+
236
+ </template>
237
+ </ComponentDemo>
238
+
239
+ For app-wide translations, set up the [maz-ui translations plugin](/translations) and the component will pick up your locale automatically.
240
+
241
+ <script lang="ts" setup>
242
+ import screenshot from './../assets/interface-screenshot.png'
243
+
244
+ const vueCode = `<template>
245
+ <MazBtn>Click me</MazBtn>
246
+ </template>`
247
+ </script>
248
+
249
+ <!--@include: ./../../.vitepress/generated-docs/maz-window-mockup.doc.md-->
@@ -11,8 +11,7 @@ description: vClickOutside is a Vue directive to trigger a function when the use
11
11
 
12
12
  <ComponentDemo>
13
13
  <div
14
- style="padding: 50px; background-color: var(--maz-surface-300);"
15
- class="maz:flex maz:flex-center maz:rounded-md"
14
+ class="maz:flex maz:flex-center maz:rounded-md maz:p-12 maz:bg-surface-300"
16
15
  >
17
16
  <MazCard v-click-outside="clikedOutside">
18
17
  Click outside me
@@ -21,8 +20,7 @@ description: vClickOutside is a Vue directive to trigger a function when the use
21
20
 
22
21
  <div
23
22
  v-if="hasClikedOutside"
24
- style="padding: 16px; margin-top: 16px; background-color: var(--maz-success); color: black;"
25
- class="maz:flex maz:flex-center maz:rounded-md"
23
+ class="maz:flex maz:flex-center maz:rounded-md maz:bg-sucess maz:text-success-foreground maz:p-4 maz:mt-4"
26
24
  >
27
25
  You clicked outside
28
26
  </div>
@@ -44,8 +42,7 @@ function clikedOutside() {
44
42
 
45
43
  <template>
46
44
  <div
47
- style="padding: 50px; background-color: var(--maz-surface-300);"
48
- class="flex flex-center rounded"
45
+ class="maz:flex maz:flex-center maz:rounded-md maz:p-12 maz:bg-surface-300"
49
46
  >
50
47
  <MazCard v-click-outside="clikedOutside">
51
48
  Click outside me
@@ -54,8 +51,7 @@ function clikedOutside() {
54
51
 
55
52
  <div
56
53
  v-if="hasClikedOutside"
57
- style="padding: 16px; margin-top: 16px; background-color: var(--maz-success); color: black;"
58
- class="flex flex-center rounded"
54
+ class="maz:flex maz:flex-center maz:rounded-md maz:bg-sucess maz:text-success-foreground maz:p-4 maz:mt-4"
59
55
  >
60
56
  You clicked outside
61
57
  </div>
@@ -71,8 +67,7 @@ The directive can accept an options object to customize its behavior:
71
67
 
72
68
  <ComponentDemo>
73
69
  <div
74
- style="padding: 50px; background-color: var(--maz-surface-300);"
75
- class="maz:flex maz:flex-center maz:rounded-md"
70
+ class="maz:flex maz:flex-center maz:rounded-md maz:p-12 maz:bg-surface-300"
76
71
  >
77
72
  <MazCard v-click-outside="{ callback: clickedOutsideWithIgnore, ignore: ['.ignore-me'] }">
78
73
  <div class="maz:p-4">
@@ -86,8 +81,7 @@ The directive can accept an options object to customize its behavior:
86
81
 
87
82
  <div
88
83
  v-if="hasClickedOutsideWithIgnore"
89
- style="padding: 16px; margin-top: 16px; background-color: var(--maz-warning); color: black;"
90
- class="maz:flex maz:flex-center maz:rounded-md"
84
+ class="maz:flex maz:flex-center maz:rounded-md maz:bg-sucess maz:text-success-foreground maz:p-4 maz:mt-4"
91
85
  >
92
86
  You clicked outside (button clicks are ignored)
93
87
  </div>
@@ -128,8 +122,7 @@ The directive can be configured to trigger only once:
128
122
 
129
123
  <ComponentDemo>
130
124
  <div
131
- style="padding: 50px; background-color: var(--maz-surface-300);"
132
- class="maz:flex maz:flex-center maz:rounded-md"
125
+ class="maz:flex maz:flex-center maz:rounded-md maz:p-12 maz:bg-surface-300"
133
126
  >
134
127
  <MazCard v-click-outside="{ callback: clickedOnce, once: true }">
135
128
  Click outside me (works only once)
@@ -249,7 +242,7 @@ app.mount('#app')
249
242
 
250
243
  ### Nuxt
251
244
 
252
- Please refer to the [Nuxt module documentation](./../guide/nuxt.md) for more information.
245
+ Please refer to the [Nuxt module documentation](./../ecosystem/nuxt.md) for more information.
253
246
 
254
247
  <script lang="ts" setup>
255
248
  import { ref } from 'vue'
@@ -83,7 +83,7 @@ app.mount('#app')
83
83
 
84
84
  ### Nuxt
85
85
 
86
- Please refer to the [Nuxt module documentation](./../guide/nuxt.md) for more information.
86
+ Please refer to the [Nuxt module documentation](./../ecosystem/nuxt.md) for more information.
87
87
 
88
88
  ## Types
89
89
 
@@ -10,7 +10,7 @@ description: vLazyImg is a Vue directive to lazy load images with many options.
10
10
  ## Basic usage
11
11
 
12
12
  <img
13
- style="background-color: var(--maz-surface-300); width: 80%;"
13
+ style="background-color: var(--maz-color-surface-300); width: 80%;"
14
14
  class="flex flex-center rounded"
15
15
  v-lazy-img="'https://placedog.net/1500/1000'"
16
16
  />
@@ -23,7 +23,7 @@ import { vLazyImg } from 'maz-ui/directives'
23
23
  <template>
24
24
  <img
25
25
  v-lazy-img="'https://placedog.net/1500/1000'"
26
- style="background-color: var(--maz-surface-300); width: 80%;"
26
+ style="background-color: var(--maz-color-surface-300); width: 80%;"
27
27
  class="flex flex-center rounded"
28
28
  >
29
29
  </template>
@@ -54,7 +54,7 @@ import { vLazyImg } from 'maz-ui/directives'
54
54
  > Open the developer console to show logs
55
55
 
56
56
  <img
57
- style="background-color: var(--maz-surface-300); width: 80%;"
57
+ style="background-color: var(--maz-color-surface-300); width: 80%;"
58
58
  class="flex flex-center rounded"
59
59
  v-lazy-img="lazyBinding"
60
60
  />
@@ -83,7 +83,7 @@ const lazyBinding: vLazyImgBindingValue = {
83
83
  <template>
84
84
  <img
85
85
  v-lazy-img="lazyBinding"
86
- style="background-color: var(--maz-surface-300); width: 80%;"
86
+ style="background-color: var(--maz-color-surface-300); width: 80%;"
87
87
  class="flex flex-center rounded"
88
88
  >
89
89
  </template>
@@ -129,7 +129,7 @@ app.mount('#app')
129
129
 
130
130
  ### Nuxt
131
131
 
132
- Please refer to the [Nuxt module documentation](./../guide/nuxt.md) for more information.
132
+ Please refer to the [Nuxt module documentation](./../ecosystem/nuxt.md) for more information.
133
133
 
134
134
  ## Types
135
135
 
@@ -400,6 +400,29 @@ The `offset` (in px) option allows you to adjust the position of the tooltip rel
400
400
  </template>
401
401
  </ComponentDemo>
402
402
 
403
+ ## Conditionally disable
404
+
405
+ Pass `false`, `null` or `undefined` as the binding value to silently disable the tooltip — no popover instance is created, no listeners are attached, and no warning is logged. This is the recommended way to skip the tooltip on the fly without conditionally rendering two different elements:
406
+
407
+ ```vue
408
+ <script lang="ts" setup>
409
+ import { vTooltip } from 'maz-ui/directives'
410
+ import { computed, ref } from 'vue'
411
+
412
+ const label = ref<string>('')
413
+ const tooltipBinding = computed(() => label.value ? { text: label.value } : false)
414
+ </script>
415
+
416
+ <template>
417
+ <!-- When label is empty the directive becomes a no-op -->
418
+ <MazBtn v-tooltip="tooltipBinding">
419
+ Hover me
420
+ </MazBtn>
421
+ </template>
422
+ ```
423
+
424
+ If the binding switches back to a valid value later, the tooltip mounts as expected. Toggling the value off again destroys the existing popover instance.
425
+
403
426
  ## Global install
404
427
 
405
428
  ### Vue
@@ -421,7 +444,7 @@ app.mount('#app')
421
444
 
422
445
  ### Nuxt
423
446
 
424
- Please refer to the [Nuxt module documentation](./../guide/nuxt.md) for more information.
447
+ Please refer to the [Nuxt module documentation](./../ecosystem/nuxt.md) for more information.
425
448
 
426
449
  ## Types
427
450
 
@@ -107,7 +107,7 @@ app.mount('#app')
107
107
 
108
108
  ### Nuxt
109
109
 
110
- Please refer to the [Nuxt module documentation](./../guide/nuxt.md) for more information.
110
+ Please refer to the [Nuxt module documentation](./../ecosystem/nuxt.md) for more information.
111
111
 
112
112
  ## Types
113
113