@maz-ui/mcp 4.0.0-beta.26

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 (175) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +264 -0
  3. package/bin/maz-ui-mcp.mjs +7 -0
  4. package/dist/mcp.d.mts +13 -0
  5. package/dist/mcp.d.ts +13 -0
  6. package/dist/mcp.mjs +586 -0
  7. package/docs/generated-docs/maz-accordion.doc.md +21 -0
  8. package/docs/generated-docs/maz-animated-counter.doc.md +17 -0
  9. package/docs/generated-docs/maz-animated-element.doc.md +14 -0
  10. package/docs/generated-docs/maz-animated-text.doc.md +14 -0
  11. package/docs/generated-docs/maz-avatar.doc.md +44 -0
  12. package/docs/generated-docs/maz-backdrop.doc.md +61 -0
  13. package/docs/generated-docs/maz-badge.doc.md +16 -0
  14. package/docs/generated-docs/maz-bottom-sheet.doc.md +21 -0
  15. package/docs/generated-docs/maz-btn.doc.md +30 -0
  16. package/docs/generated-docs/maz-card-spotlight.doc.md +16 -0
  17. package/docs/generated-docs/maz-card.doc.md +39 -0
  18. package/docs/generated-docs/maz-carousel.doc.md +16 -0
  19. package/docs/generated-docs/maz-chart.doc.md +10 -0
  20. package/docs/generated-docs/maz-checkbox.doc.md +34 -0
  21. package/docs/generated-docs/maz-checklist.doc.md +30 -0
  22. package/docs/generated-docs/maz-circular-progress-bar.doc.md +27 -0
  23. package/docs/generated-docs/maz-date-picker.doc.md +52 -0
  24. package/docs/generated-docs/maz-dialog-confirm.doc.md +24 -0
  25. package/docs/generated-docs/maz-dialog.doc.md +22 -0
  26. package/docs/generated-docs/maz-drawer.doc.md +26 -0
  27. package/docs/generated-docs/maz-dropdown.doc.md +42 -0
  28. package/docs/generated-docs/maz-dropzone.doc.md +82 -0
  29. package/docs/generated-docs/maz-expand-animation.doc.md +12 -0
  30. package/docs/generated-docs/maz-fullscreen-loader.doc.md +13 -0
  31. package/docs/generated-docs/maz-gallery.doc.md +17 -0
  32. package/docs/generated-docs/maz-icon.doc.md +18 -0
  33. package/docs/generated-docs/maz-input-code.doc.md +25 -0
  34. package/docs/generated-docs/maz-input-number.doc.md +31 -0
  35. package/docs/generated-docs/maz-input-phone-number.doc.md +56 -0
  36. package/docs/generated-docs/maz-input-price.doc.md +26 -0
  37. package/docs/generated-docs/maz-input-tags.doc.md +24 -0
  38. package/docs/generated-docs/maz-input.doc.md +54 -0
  39. package/docs/generated-docs/maz-lazy-img.doc.md +31 -0
  40. package/docs/generated-docs/maz-link.doc.md +31 -0
  41. package/docs/generated-docs/maz-loading-bar.doc.md +6 -0
  42. package/docs/generated-docs/maz-pagination.doc.md +22 -0
  43. package/docs/generated-docs/maz-popover.doc.md +70 -0
  44. package/docs/generated-docs/maz-pull-to-refresh.doc.md +31 -0
  45. package/docs/generated-docs/maz-radio-buttons.doc.md +33 -0
  46. package/docs/generated-docs/maz-radio.doc.md +33 -0
  47. package/docs/generated-docs/maz-reading-progress-bar.doc.md +18 -0
  48. package/docs/generated-docs/maz-select-country.doc.md +44 -0
  49. package/docs/generated-docs/maz-select.doc.md +65 -0
  50. package/docs/generated-docs/maz-slider.doc.md +20 -0
  51. package/docs/generated-docs/maz-spinner.doc.md +6 -0
  52. package/docs/generated-docs/maz-stepper.doc.md +29 -0
  53. package/docs/generated-docs/maz-switch.doc.md +31 -0
  54. package/docs/generated-docs/maz-table-cell.doc.md +5 -0
  55. package/docs/generated-docs/maz-table-row.doc.md +11 -0
  56. package/docs/generated-docs/maz-table-title.doc.md +5 -0
  57. package/docs/generated-docs/maz-table.doc.md +66 -0
  58. package/docs/generated-docs/maz-tabs-bar.doc.md +18 -0
  59. package/docs/generated-docs/maz-tabs-content-item.doc.md +11 -0
  60. package/docs/generated-docs/maz-tabs-content.doc.md +5 -0
  61. package/docs/generated-docs/maz-tabs.doc.md +17 -0
  62. package/docs/generated-docs/maz-textarea.doc.md +41 -0
  63. package/docs/src/components/index.md +8 -0
  64. package/docs/src/components/maz-accordion.md +80 -0
  65. package/docs/src/components/maz-animated-counter.md +124 -0
  66. package/docs/src/components/maz-animated-element.md +36 -0
  67. package/docs/src/components/maz-animated-text.md +36 -0
  68. package/docs/src/components/maz-avatar.md +179 -0
  69. package/docs/src/components/maz-backdrop.md +16 -0
  70. package/docs/src/components/maz-badge.md +222 -0
  71. package/docs/src/components/maz-bottom-sheet.md +398 -0
  72. package/docs/src/components/maz-btn.md +526 -0
  73. package/docs/src/components/maz-card-spotlight.md +163 -0
  74. package/docs/src/components/maz-card.md +447 -0
  75. package/docs/src/components/maz-carousel.md +127 -0
  76. package/docs/src/components/maz-chart.md +346 -0
  77. package/docs/src/components/maz-checkbox.md +168 -0
  78. package/docs/src/components/maz-checklist.md +414 -0
  79. package/docs/src/components/maz-circular-progress-bar.md +147 -0
  80. package/docs/src/components/maz-date-picker.md +1078 -0
  81. package/docs/src/components/maz-dialog-confirm.md +240 -0
  82. package/docs/src/components/maz-dialog.md +208 -0
  83. package/docs/src/components/maz-drawer.md +177 -0
  84. package/docs/src/components/maz-dropdown.md +650 -0
  85. package/docs/src/components/maz-dropzone.md +442 -0
  86. package/docs/src/components/maz-expand-animation.md +99 -0
  87. package/docs/src/components/maz-fullscreen-loader.md +58 -0
  88. package/docs/src/components/maz-gallery.md +85 -0
  89. package/docs/src/components/maz-icon.md +85 -0
  90. package/docs/src/components/maz-input-code.md +61 -0
  91. package/docs/src/components/maz-input-number.md +81 -0
  92. package/docs/src/components/maz-input-phone-number.md +867 -0
  93. package/docs/src/components/maz-input-price.md +58 -0
  94. package/docs/src/components/maz-input-tags.md +114 -0
  95. package/docs/src/components/maz-input.md +453 -0
  96. package/docs/src/components/maz-lazy-img.md +24 -0
  97. package/docs/src/components/maz-link.md +156 -0
  98. package/docs/src/components/maz-loading-bar.md +26 -0
  99. package/docs/src/components/maz-pagination.md +81 -0
  100. package/docs/src/components/maz-popover.md +1414 -0
  101. package/docs/src/components/maz-pull-to-refresh.md +49 -0
  102. package/docs/src/components/maz-radio-buttons.md +456 -0
  103. package/docs/src/components/maz-radio.md +141 -0
  104. package/docs/src/components/maz-reading-progress-bar.md +74 -0
  105. package/docs/src/components/maz-select-country.md +636 -0
  106. package/docs/src/components/maz-select.md +439 -0
  107. package/docs/src/components/maz-slider.md +191 -0
  108. package/docs/src/components/maz-spinner.md +93 -0
  109. package/docs/src/components/maz-stepper.md +418 -0
  110. package/docs/src/components/maz-switch.md +92 -0
  111. package/docs/src/components/maz-table.md +571 -0
  112. package/docs/src/components/maz-tabs.md +231 -0
  113. package/docs/src/components/maz-textarea.md +218 -0
  114. package/docs/src/composables/use-aos.md +34 -0
  115. package/docs/src/composables/use-breakpoints.md +35 -0
  116. package/docs/src/composables/use-dialog.md +88 -0
  117. package/docs/src/composables/use-display-names.md +174 -0
  118. package/docs/src/composables/use-form-validator.md +1149 -0
  119. package/docs/src/composables/use-idle-timeout.md +256 -0
  120. package/docs/src/composables/use-reading-time.md +168 -0
  121. package/docs/src/composables/use-string-matching.md +63 -0
  122. package/docs/src/composables/use-swipe.md +223 -0
  123. package/docs/src/composables/use-timer.md +130 -0
  124. package/docs/src/composables/use-toast.md +71 -0
  125. package/docs/src/composables/use-user-visibility.md +169 -0
  126. package/docs/src/composables/use-wait.md +62 -0
  127. package/docs/src/composables/use-window-size.md +18 -0
  128. package/docs/src/demo/DemoAuthPage.vue +178 -0
  129. package/docs/src/demo/DemoDashboardPage.vue +298 -0
  130. package/docs/src/demo/DemoProductPage.vue +135 -0
  131. package/docs/src/directives/click-outside.md +275 -0
  132. package/docs/src/directives/fullscreen-img.md +101 -0
  133. package/docs/src/directives/lazy-img.md +184 -0
  134. package/docs/src/directives/tooltip.md +458 -0
  135. package/docs/src/directives/zoom-img.md +127 -0
  136. package/docs/src/guide/cli.md +144 -0
  137. package/docs/src/guide/getting-started.md +284 -0
  138. package/docs/src/guide/icon-set.md +60 -0
  139. package/docs/src/guide/icons.md +481 -0
  140. package/docs/src/guide/mcp.md +210 -0
  141. package/docs/src/guide/migration-v4.md +898 -0
  142. package/docs/src/guide/nuxt.md +411 -0
  143. package/docs/src/guide/resolvers.md +697 -0
  144. package/docs/src/guide/themes.md +789 -0
  145. package/docs/src/guide/translations.md +1173 -0
  146. package/docs/src/guide/vue.md +243 -0
  147. package/docs/src/helpers/camel-case.md +14 -0
  148. package/docs/src/helpers/capitalize.md +51 -0
  149. package/docs/src/helpers/check-availability.md +14 -0
  150. package/docs/src/helpers/country-code-to-unicode-flag.md +213 -0
  151. package/docs/src/helpers/currency.md +67 -0
  152. package/docs/src/helpers/date.md +67 -0
  153. package/docs/src/helpers/debounce-callback.md +14 -0
  154. package/docs/src/helpers/debounce-id.md +14 -0
  155. package/docs/src/helpers/debounce.md +14 -0
  156. package/docs/src/helpers/get-country-flag-url.md +156 -0
  157. package/docs/src/helpers/is-client.md +14 -0
  158. package/docs/src/helpers/is-equal.md +14 -0
  159. package/docs/src/helpers/is-standalone-mode.md +14 -0
  160. package/docs/src/helpers/kebab-case.md +14 -0
  161. package/docs/src/helpers/normalize-string.md +14 -0
  162. package/docs/src/helpers/number.md +65 -0
  163. package/docs/src/helpers/pascal-case.md +14 -0
  164. package/docs/src/helpers/script-loader.md +14 -0
  165. package/docs/src/helpers/sleep.md +14 -0
  166. package/docs/src/helpers/snake-case.md +14 -0
  167. package/docs/src/helpers/throttle-id.md +14 -0
  168. package/docs/src/helpers/throttle.md +14 -0
  169. package/docs/src/index.md +555 -0
  170. package/docs/src/made-with-maz-ui.md +58 -0
  171. package/docs/src/plugins/aos.md +347 -0
  172. package/docs/src/plugins/dialog.md +411 -0
  173. package/docs/src/plugins/toast.md +349 -0
  174. package/docs/src/plugins/wait.md +109 -0
  175. package/package.json +84 -0
@@ -0,0 +1,526 @@
1
+ ---
2
+ title: MazBtn
3
+ description: MazBtn is a standalone component that replaces the standard html button with a beautiful design system. Many options like colors, sizes, disabled state, loading state, icons are included. Support of router-link and nuxt-link
4
+ ---
5
+
6
+ # {{ $frontmatter.title }}
7
+
8
+ {{ $frontmatter.description }}
9
+
10
+ <!--@include: ./../.vitepress/mixins/getting-started.md-->
11
+
12
+ ## Basic usage
13
+
14
+ <ComponentDemo expanded>
15
+ <MazBtn>Button</MazBtn>
16
+
17
+ <template #code>
18
+
19
+ ```vue
20
+ <script setup lang="ts">
21
+ import MazBtn from 'maz-ui/components/MazBtn'
22
+ </script>
23
+
24
+ <template>
25
+ <MazBtn>Button</MazBtn>
26
+ </template>
27
+ ```
28
+
29
+ </template>
30
+ </ComponentDemo>
31
+
32
+ ## Sizes
33
+
34
+ Use the attribute `size` with value `{{ sizes.join(', ') }}`
35
+
36
+ <ComponentDemo>
37
+ <div class="flex items-start gap-05 items-center flex-wrap">
38
+ <MazBtn v-for="size in sizes" :size="size">{{ size }}</MazBtn>
39
+ </div>
40
+
41
+ <template #code>
42
+
43
+ ```vue
44
+ <script setup lang="ts">
45
+ const sizes = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
46
+ </script>
47
+
48
+ <template>
49
+ <MazBtn v-for="size in sizes" :key="size" :size="size">
50
+ {{ size }}
51
+ </MazBtn>
52
+ </template>
53
+ ```
54
+
55
+ </template>
56
+ </ComponentDemo>
57
+
58
+ ## Colors
59
+
60
+ Use the attribute `color` with a value in this [list](./../guide/colors.md), the component will use this color
61
+
62
+ <ComponentDemo>
63
+ <div class="flex items-start gap-05 flex-wrap">
64
+ <MazBtn v-for="color of colors" :key="color" :color="color">{{ color }}</MazBtn>
65
+ </div>
66
+
67
+ <template #code>
68
+
69
+ ```html
70
+ <MazBtn>primary</MazBtn>
71
+ <MazBtn color="secondary">secondary</MazBtn>
72
+ <MazBtn color="info">info</MazBtn>
73
+ <MazBtn color="success">success</MazBtn>
74
+ <MazBtn color="warning">warning</MazBtn>
75
+ <MazBtn color="destructive">destructive</MazBtn>
76
+ <MazBtn color="contrast">contrast</MazBtn>
77
+ <MazBtn color="accent">accent</MazBtn>
78
+ <MazBtn color="background">background</MazBtn>
79
+ <MazBtn color="transparent">transparent</MazBtn>
80
+ ```
81
+
82
+ </template>
83
+ </ComponentDemo>
84
+
85
+ ## Outlined
86
+
87
+ Transform the button into an outlined button with the attribute `outlined`
88
+
89
+ <ComponentDemo>
90
+ <div class="flex items-start gap-05 flex-wrap">
91
+ <MazBtn v-for="color of colors" :color="color" outlined>{{ color }}</MazBtn>
92
+ </div>
93
+
94
+ <template #code>
95
+
96
+ ```html
97
+ <MazBtn outlined>primary</MazBtn>
98
+ <MazBtn color="secondary" outlined>secondary</MazBtn>
99
+ <MazBtn color="info" outlined>info</MazBtn>
100
+ <MazBtn color="success" outlined>success</MazBtn>
101
+ <MazBtn color="warning" outlined>warning</MazBtn>
102
+ <MazBtn color="destructive" outlined>destructive</MazBtn>
103
+ <MazBtn color="contrast" outlined>contrast</MazBtn>
104
+ <MazBtn color="accent" outlined>accent</MazBtn>
105
+ <MazBtn color="background" outlined>background</MazBtn>
106
+ <MazBtn color="transparent" outlined>transparent</MazBtn>
107
+ ```
108
+
109
+ </template>
110
+ </ComponentDemo>
111
+
112
+ ## Loading
113
+
114
+ The loading state is available with the attribute `loading`
115
+
116
+ <ComponentDemo>
117
+ <div class="flex items-start gap-05 flex-wrap">
118
+ <div v-for="color of colors"
119
+ :key="color" class="maz-flex maz-flex-col maz-flex-center">
120
+ <MazBtn
121
+ loading
122
+ :color="color"
123
+ left-icon="user"
124
+ right-icon="user"
125
+ >
126
+ {{ color }}
127
+ </MazBtn>
128
+ <span class="maz-text-muted maz-text-xs"> {{ color }} </span>
129
+ </div>
130
+ </div>
131
+
132
+ <template #code>
133
+
134
+ ```vue
135
+ <script lang="ts" setup>
136
+ const colors = [
137
+ 'primary',
138
+ 'secondary',
139
+ 'info',
140
+ 'success',
141
+ 'warning',
142
+ 'destructive',
143
+ 'contrast',
144
+ 'accent',
145
+ 'transparent',
146
+ 'background',
147
+ ]
148
+ </script>
149
+
150
+ <template>
151
+ <MazBtn
152
+ v-for="color of colors"
153
+ :key="color"
154
+ loading
155
+ :color="color"
156
+ >
157
+ {{ color }}
158
+ </MazBtn>
159
+ </template>
160
+ ```
161
+
162
+ </template>
163
+ </ComponentDemo>
164
+
165
+ ## Pastel
166
+
167
+ The pastel state is available with the attribute `pastel`
168
+
169
+ ::: info
170
+ Better in light mode
171
+ :::
172
+
173
+ <ComponentDemo>
174
+
175
+ <div class="flex items-start gap-05 rounded maz-p-3 flex-wrap">
176
+ <MazBtn v-for="color of colors" :color="color" pastel>{{ color }}</MazBtn>
177
+ </div>
178
+
179
+ <template #code>
180
+
181
+ ```html
182
+ <MazBtn pastel>primary</MazBtn>
183
+ <MazBtn color="secondary" pastel>secondary</MazBtn>
184
+ <MazBtn color="info" pastel>info</MazBtn>
185
+ <MazBtn color="success" pastel>success</MazBtn>
186
+ <MazBtn color="warning" pastel>warning</MazBtn>
187
+ <MazBtn color="destructive" pastel>destructive</MazBtn>
188
+ <MazBtn color="contrast" pastel>contrast</MazBtn>
189
+ <MazBtn color="accent" pastel>accent</MazBtn>
190
+ <MazBtn color="background" pastel>background</MazBtn>
191
+ <MazBtn color="transparent" pastel>transparent</MazBtn>
192
+ ```
193
+
194
+ </template>
195
+ </ComponentDemo>
196
+
197
+ ## Rounded Size
198
+
199
+ Choose the size of the rounded with the attribute `rounded-size` and value `none`, `sm`, `md`, `lg`, `xl`, `full`
200
+
201
+ <ComponentDemo>
202
+
203
+ <div class="flex items-start gap-05 rounded maz-p-3 flex-wrap">
204
+ <MazBtn v-for="size of ['none', 'sm', 'md', 'lg', 'xl', 'full']" :rounded-size="size">{{ size }}</MazBtn>
205
+ </div>
206
+
207
+ <template #code>
208
+
209
+ ```html
210
+ <MazBtn rounded-size="none">none</MazBtn>
211
+ <MazBtn rounded-size="sm">sm</MazBtn>
212
+ <MazBtn rounded-size="md">md</MazBtn>
213
+ <MazBtn rounded-size="lg">lg</MazBtn>
214
+ <MazBtn rounded-size="xl">xl</MazBtn>
215
+ <MazBtn rounded-size="full">full</MazBtn>
216
+ ```
217
+
218
+ </template>
219
+ </ComponentDemo>
220
+
221
+ ## Fab
222
+
223
+ The button can be a fab button with the attribute `fab`
224
+
225
+ <ComponentDemo>
226
+ <div class="maz-flex maz-gap-5 maz-items-center">
227
+ <MazBtn fab icon="sun" size="mini" />
228
+ <MazBtn fab icon="sun" size="xs" />
229
+ <MazBtn fab icon="sun" size="sm" />
230
+ <MazBtn fab>
231
+ fab
232
+ </MazBtn>
233
+ <MazBtn fab icon="sun" size="lg" />
234
+ <MazBtn fab icon="sun" size="xl" />
235
+ </div>
236
+
237
+ <template #code>
238
+
239
+ ```html
240
+ <MazBtn fab icon="sun" size="mini" />
241
+ <MazBtn fab icon="sun" size="xs" />
242
+ <MazBtn fab icon="sun" size="sm" />
243
+ <MazBtn fab> fab </MazBtn>
244
+ <MazBtn fab icon="sun" size="lg" />
245
+ <MazBtn fab icon="sun" size="xl" />
246
+ ```
247
+
248
+ </template>
249
+ </ComponentDemo>
250
+
251
+ ## Block
252
+
253
+ Will take `width: 100%;`
254
+
255
+ <ComponentDemo>
256
+ <MazBtn block>block</MazBtn>
257
+
258
+ <template #code>
259
+
260
+ ```html
261
+ <MazBtn block>block</MazBtn>
262
+ ```
263
+
264
+ </template>
265
+ </ComponentDemo>
266
+
267
+ ## Justify
268
+
269
+ This property is used to align the content of the button.
270
+
271
+ By default, the justify is `center`
272
+
273
+ <ComponentDemo>
274
+ <div class="maz-flex maz-flex-col maz-gap-2">
275
+ <MazBtn block justify="center" icon="users" right-icon="sun" size="md">center</MazBtn>
276
+ <MazBtn block justify="start" icon="users" right-icon="sun" size="md">start</MazBtn>
277
+ <MazBtn block justify="end" icon="users" right-icon="sun" size="md">end</MazBtn>
278
+ <MazBtn block justify="space-between" icon="users" right-icon="sun" size="md">between</MazBtn>
279
+ <MazBtn block justify="space-around" icon="users" right-icon="sun" size="md">around</MazBtn>
280
+ <MazBtn block justify="space-evenly" icon="users" right-icon="sun" size="md">evenly</MazBtn>
281
+ </div>
282
+
283
+ <template #code>
284
+
285
+ ```html
286
+ <MazBtn block justify="center" icon="users" right-icon="sun" size="md">center</MazBtn>
287
+ <MazBtn block justify="start" icon="users" right-icon="sun" size="md">start</MazBtn>
288
+ <MazBtn block justify="end" icon="users" right-icon="sun" size="md">end</MazBtn>
289
+ <MazBtn block justify="space-between" icon="users" right-icon="sun" size="md">between</MazBtn>
290
+ <MazBtn block justify="space-around" icon="users" right-icon="sun" size="md">around</MazBtn>
291
+ <MazBtn block justify="space-evenly" icon="users" right-icon="sun" size="md">evenly</MazBtn>
292
+ ```
293
+
294
+ </template>
295
+
296
+ </ComponentDemo>
297
+
298
+ ## Disabled
299
+
300
+ <ComponentDemo>
301
+ <MazBtn disabled>disabled</MazBtn>
302
+
303
+ <template #code>
304
+
305
+ ```html
306
+ <MazBtn disabled>disabled</MazBtn>
307
+ ```
308
+
309
+ </template>
310
+ </ComponentDemo>
311
+
312
+ ## Icons
313
+
314
+ <ComponentDemo>
315
+ <div class="maz-flex maz-gap-2 maz-rounded maz-flex-wrap maz-items-center">
316
+ <MazBtn :left-icon="MazCheck" size="sm">
317
+ left-icon
318
+ </MazBtn>
319
+ <MazBtn :right-icon="MazHome">
320
+ right-icon
321
+ </MazBtn>
322
+ <MazBtn fab :icon="MazCommandLine" size="lg" />
323
+ <MazBtn :left-icon="MazSpinner" size="sm" color="warning">
324
+ icon component
325
+ </MazBtn>
326
+ </div>
327
+
328
+ <template #code>
329
+
330
+ ```html
331
+ <MazBtn :left-icon="MazCheck" size="sm">
332
+ left-icon
333
+ </MazBtn>
334
+ <MazBtn :right-icon="MazHome">
335
+ right-icon
336
+ </MazBtn>
337
+ <MazBtn fab :icon="MazCommandLine" size="lg" />
338
+ <MazBtn :icon="MazSpinner" size="sm" color="warning">
339
+ icon component
340
+ </MazBtn>
341
+ ```
342
+
343
+ </template>
344
+ </ComponentDemo>
345
+
346
+ ### Use icon name
347
+
348
+ ::: details View code
349
+
350
+ When you use the properties `right-icon`, `left-icon` or `icon` with the icon name (string), the component uses `<MazIcon name="..." />` component.
351
+
352
+ Check out how [MazIcon](./maz-icon.md) works, see all available icons and download them to put them in your public folder.
353
+
354
+ ```html
355
+ <MazBtn left-icon="check" size="sm"> left-icon </MazBtn>
356
+ <MazBtn right-icon="home"> right-icon </MazBtn>
357
+ <MazBtn icon="command-line" fab size="lg" />
358
+ ```
359
+
360
+ :::
361
+
362
+ ### Use your own SVG icons
363
+
364
+ ::: details View code
365
+
366
+ ```html
367
+ <MazBtn size="sm">
368
+ <template #left-icon>
369
+ <svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
370
+ <path
371
+ d="M4.5 12.75L10.5 18.75L19.5 5.25"
372
+ stroke="currentColor"
373
+ stroke-width="1.5"
374
+ stroke-linecap="round"
375
+ stroke-linejoin="round"
376
+ />
377
+ </svg>
378
+ </template>
379
+ left-icon
380
+ </MazBtn>
381
+ <MazBtn>
382
+ <template #right-icon>
383
+ <svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
384
+ <path
385
+ d="M2.25 12L11.2045 3.04549C11.6438 2.60615 12.3562 2.60615 12.7955 3.04549L21.75 12M4.5 9.75V19.875C4.5 20.4963 5.00368 21 5.625 21H9.75V16.125C9.75 15.5037 10.2537 15 10.875 15H13.125C13.7463 15 14.25 15.5037 14.25 16.125V21H18.375C18.9963 21 19.5 20.4963 19.5 19.875V9.75M8.25 21H16.5"
386
+ stroke="currentColor"
387
+ stroke-width="1.5"
388
+ stroke-linecap="round"
389
+ stroke-linejoin="round"
390
+ />
391
+ </svg>
392
+ </template>
393
+ right-icon
394
+ </MazBtn>
395
+ <MazBtn fab size="lg">
396
+ <template #icon>
397
+ <svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
398
+ <path
399
+ d="M6.75 7.5L9.75 9.75L6.75 12M11.25 12H14.25M5.25 20.25H18.75C19.9926 20.25 21 19.2426 21 18V6C21 4.75736 19.9926 3.75 18.75 3.75H5.25C4.00736 3.75 3 4.75736 3 6V18C3 19.2426 4.00736 20.25 5.25 20.25Z"
400
+ stroke="currentColor"
401
+ stroke-width="1.5"
402
+ stroke-linecap="round"
403
+ stroke-linejoin="round"
404
+ />
405
+ </svg>
406
+ </template>
407
+ </MazBtn>
408
+ ```
409
+
410
+ :::
411
+
412
+ ### Use [@maz-ui/icons](./../guide/icons.md)
413
+
414
+ ::: details View code
415
+
416
+ ```vue
417
+ <script lang="ts" setup>
418
+ import MazBtn from 'maz-ui/components/MazBtn'
419
+
420
+ import { MazCheck, MazHome, MazCommandLine } from '@maz-ui/icons'
421
+ </script>
422
+
423
+ <template>
424
+ <MazBtn :left-icon="MazCheck" size="sm">
425
+ left-icon
426
+ </MazBtn>
427
+ <MazBtn :right-icon="MazHome">
428
+ right-icon
429
+ </MazBtn>
430
+ <MazBtn fab :icon="MazCommandLine" size="lg" />
431
+ </template>
432
+ ```
433
+
434
+ :::
435
+
436
+ ### Use [vite-svg-loader](https://github.com/jpkleemans/vite-svg-loader)
437
+
438
+ ::: details View code
439
+
440
+ ```vue
441
+ <script lang="ts" setup>
442
+ import MazBtn from 'maz-ui/components/MazBtn'
443
+
444
+ import MazCheck from '@maz-ui/icons/svg/check.svg?component'
445
+ import MazHome from '@maz-ui/icons/svg/home.svg?component'
446
+ import MazCommandLine from '@maz-ui/icons/svg/command-line.svg?component'
447
+ </script>
448
+
449
+ <template>
450
+ <MazBtn :left-icon="MazCheck" size="sm">
451
+ left-icon
452
+ </MazBtn>
453
+ <MazBtn :right-icon="MazHome">
454
+ right-icon
455
+ </MazBtn>
456
+ <MazBtn fab :icon="MazCommandLine" size="lg" />
457
+ </template>
458
+ ```
459
+
460
+ :::
461
+
462
+ ### Use your own components
463
+
464
+ ::: details View code
465
+
466
+ ```vue
467
+ <script lang="ts" setup>
468
+ import { MazBtn, MazSpinner } from 'maz-ui/components'
469
+ </script>
470
+
471
+ <template>
472
+ <MazBtn :left-icon="MazSpinner" size="sm" color="info">
473
+ left-icon
474
+ </MazBtn>
475
+ </template>
476
+ ```
477
+
478
+ :::
479
+
480
+ ## [HTMLLinkElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement)
481
+
482
+ ::: info
483
+ When `href` attribute is provided, the component automatically becomes a `<a href="..." />`
484
+ :::
485
+
486
+ <MazBtn href="https://www.google.com" target="_blank">Is Button Link</MazBtn>
487
+
488
+ ```html
489
+ <MazBtn href="https://www.google.com" target="_blank"> Is Button Link </MazBtn>
490
+ ```
491
+
492
+ ## [RouterLink](https://router.vuejs.org/api/#router-link)
493
+
494
+ ::: info
495
+ When `to` attribute is provided, the component automatically becomes a `<RouterLink to="..." />`
496
+ :::
497
+
498
+ <MazBtn :to="{ path: '/made-with-maz-ui.html' }">Is Router Link</MazBtn>
499
+
500
+ ```html
501
+ <MazBtn :to="{ path: '/made-with-maz-ui.html' }"> Is RouterLink </MazBtn>
502
+ ```
503
+
504
+ <script setup lang="ts">
505
+ import { computed } from 'vue'
506
+ import { MazCheck, MazHome, MazCommandLine } from '@maz-ui/icons'
507
+ import MazSpinner from 'maz-ui/src/components/MazSpinner.vue'
508
+
509
+ const colors = [
510
+ 'primary',
511
+ 'secondary',
512
+ 'accent',
513
+ 'info',
514
+ 'success',
515
+ 'warning',
516
+ 'destructive',
517
+ 'contrast',
518
+ 'background',
519
+ 'transparent',
520
+ ]
521
+
522
+ const sizes = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
523
+
524
+ </script>
525
+
526
+ <!--@include: ./../../.vitepress/generated-docs/maz-btn.doc.md-->
@@ -0,0 +1,163 @@
1
+ ---
2
+ title: MazCardSpotlight
3
+ description: MazCardSpotlight is a standalone component
4
+ ---
5
+
6
+ # {{ $frontmatter.title }}
7
+
8
+ {{ $frontmatter.description }}
9
+
10
+ <!--@include: ./../.vitepress/mixins/getting-started.md-->
11
+
12
+ **This component is better in dark mode**
13
+
14
+ <MazBtn @click="setColorMode('dark')" color="warning">
15
+ Switch to dark theme
16
+ </MazBtn>
17
+
18
+ ::: tip
19
+ If you want to increase the border width, you must just add padding @default: `var(--maz-border-width)` (1px)
20
+ :::
21
+
22
+ ## Basic usage
23
+
24
+ <ComponentDemo>
25
+ <MazCardSpotlight style="width: 500px; max-width: 100%;">
26
+ <h3 style="margin-top: 0; margin-bottom: 30px;">
27
+ Hover this component <br />
28
+ To see the magic appear
29
+ </h3>
30
+ <div class="maz-flex maz-gap-2">
31
+ <MazBtn color="contrast" @click="setColorMode('light')">
32
+ Switch to light mode
33
+ </MazBtn>
34
+ <MazBtn color="contrast" @click="setColorMode('dark')">
35
+ Switch to dark mode
36
+ </MazBtn>
37
+ </div>
38
+ </MazCardSpotlight>
39
+
40
+ <template #code>
41
+
42
+ ```vue
43
+ <script lang="ts" setup>
44
+ import { useTheme } from '@maz-ui/themes/composables/useTheme'
45
+ import MazCardSpotlight from 'maz-ui/components/MazCardSpotlight'
46
+
47
+ const { setColorMode } = useTheme()
48
+ </script>
49
+
50
+ <template>
51
+ <MazCardSpotlight style="width: 500px; max-width: 100%;">
52
+ <h3 style="margin-top: 0; Fmargin-bottom: 30px;">
53
+ Hover this component <br>
54
+ To see the magic appear
55
+ </h3>
56
+ <MazBtn color="contrast" @click="setColorMode('light')">
57
+ Switch to light theme
58
+ </MazBtn>
59
+ </MazCardSpotlight>
60
+ </template>
61
+ ```
62
+
63
+ </template>
64
+ </ComponentDemo>
65
+
66
+ ## Effect with multiple cards and with secondary color
67
+
68
+ <ComponentDemo>
69
+ <div class="maz-grid maz-gap-4 maz-grid-cols-1 mob-l:maz-grid-cols-2 tab-l:maz-grid-cols-3">
70
+ <MazCardSpotlight v-for="competition of competitions" :key="competition.label" color="secondary">
71
+ <div style="display: flex;">
72
+ <MazAvatar
73
+ v-if="competition.areaEnsignUrl"
74
+ :src="competition.areaEnsignUrl"
75
+ style="margin-right: 16px;"
76
+ size="0.8rem"
77
+ />
78
+ <div style="display: flex; flex-direction: column;" class="maz-truncate">
79
+ <span class="maz-truncate">
80
+ {{ competition.label }}
81
+ </span>
82
+ <span class="maz-truncate">
83
+ {{ competition.area }}
84
+ </span>
85
+ </div>
86
+ </div>
87
+ </MazCardSpotlight>
88
+ </div>
89
+
90
+ <template #code>
91
+
92
+ ```html
93
+ <div class="grid gap-4 grid-cols-1 mob-l:grid-cols-2 tab-l:grid-cols-3">
94
+ <MazCardSpotlight v-for="competition of competitions" :key="competition.label" color="secondary">
95
+ <div class="flex p-4">
96
+ <MazAvatar
97
+ v-if="competition.areaEnsignUrl"
98
+ :src="competition.areaEnsignUrl"
99
+ style="margin-right: 16px"
100
+ size="0.8rem"
101
+ />
102
+ <div class="truncate flex column">
103
+ <span class="truncate"> {{ competition.label }} </span>
104
+ <span class="truncate"> {{ competition.area }} </span>
105
+ </div>
106
+ </div>
107
+ </MazCardSpotlight>
108
+ </div>
109
+ ```
110
+
111
+ </template>
112
+ </ComponentDemo>
113
+
114
+ <!--@include: ./../../.vitepress/generated-docs/maz-card-spotlight.doc.md-->
115
+
116
+ <script lang="ts" setup>
117
+ import { useTheme } from '@maz-ui/themes/composables/useTheme'
118
+
119
+ const { setColorMode } = useTheme()
120
+
121
+ const competitions = [
122
+ {
123
+ label: "Ligue 1",
124
+ area: "France",
125
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/c/c3/Flag_of_France.svg",
126
+ },
127
+ {
128
+ label: "Premier League",
129
+ area: "England",
130
+ areaEnsignUrl: "https://crests.football-data.org/770.svg",
131
+ },
132
+ {
133
+ label: "Bundesliga",
134
+ area: "Germany",
135
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/b/ba/Flag_of_Germany.svg",
136
+ },
137
+ {
138
+ label: "Eredivisie",
139
+ area: "Netherlands",
140
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/2/20/Flag_of_the_Netherlands.svg",
141
+ },
142
+ {
143
+ label: "Serie A",
144
+ area: "Italy",
145
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/0/03/Flag_of_Italy.svg",
146
+ },
147
+ {
148
+ label: "Primera Division",
149
+ area: "Spain",
150
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/9/9a/Flag_of_Spain.svg",
151
+ },
152
+ {
153
+ label: "Primeira Liga",
154
+ area: "Portugal",
155
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/5/5c/Flag_of_Portugal.svg",
156
+ },
157
+ {
158
+ label: "UEFA Champions League",
159
+ area: "Europe",
160
+ areaEnsignUrl: "https://crests.football-data.org/EUR.svg",
161
+ }
162
+ ]
163
+ </script>