@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,346 @@
1
+ ---
2
+ title: MazChart
3
+ description: MazChart is a standalone component which generates graphics & charts with chart.js
4
+ ---
5
+
6
+ # {{ $frontmatter.title }}
7
+
8
+ {{ $frontmatter.description }}
9
+
10
+ To use this component, you have to install the `chart.js` and `vue-chartjs` dependency
11
+
12
+ <div class="flex gap-4">
13
+ <NpmBadge package="chart.js" dist-tag="4" />
14
+ <NpmBadge package="vue-chartjs" dist-tag="5" />
15
+ </div>
16
+
17
+ ```bash
18
+ npm install chart.js@^4 vue-chartjs@^5
19
+ ```
20
+
21
+ ::: info
22
+
23
+ For maz-ui versions below `3.9.x`, you should only install `chart.js@^3`
24
+
25
+ <NpmBadge package="chart.js" dist-tag="3" />
26
+
27
+ ```bash
28
+ npm install chart.js@^3
29
+ ```
30
+
31
+ :::
32
+
33
+ ## Documentation
34
+
35
+ Follow the [Chart.JS](https://www.chartjs.org/docs/latest/) documentation to create your own chart.
36
+
37
+ You can also check the documentation and [examples of vue-chartjs](https://vue-chartjs.org/examples/)
38
+
39
+ You can use all the plugins of Chart.JS. Follow the examples below.
40
+
41
+ ## Bar chart
42
+
43
+ <MazChart
44
+ v-bind="{ ...barChart }"
45
+ />
46
+
47
+ ::: details View code
48
+
49
+ ```vue
50
+ <script setup lang="ts">
51
+ import dataLabels from 'chartjs-plugin-datalabels'
52
+
53
+ const barChart = {
54
+ type: 'bar',
55
+ data: {
56
+ labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
57
+ datasets: [{
58
+ label: 'My First Dataset',
59
+ data: [65, 59, 80, 81, 56, 55, 40],
60
+ backgroundColor: [
61
+ 'rgba(255, 99, 132, 0.2)',
62
+ 'rgba(255, 159, 64, 0.2)',
63
+ 'rgba(255, 205, 86, 0.2)',
64
+ 'rgba(75, 192, 192, 0.2)',
65
+ 'rgba(54, 162, 235, 0.2)',
66
+ 'rgba(153, 102, 255, 0.2)',
67
+ 'rgba(201, 203, 207, 0.2)'
68
+ ],
69
+ borderColor: [
70
+ 'rgb(255, 99, 132)',
71
+ 'rgb(255, 159, 64)',
72
+ 'rgb(255, 205, 86)',
73
+ 'rgb(75, 192, 192)',
74
+ 'rgb(54, 162, 235)',
75
+ 'rgb(153, 102, 255)',
76
+ 'rgb(201, 203, 207)'
77
+ ],
78
+ borderWidth: 1
79
+ }]
80
+ },
81
+ }
82
+ </script>
83
+
84
+ <template>
85
+ <MazChart
86
+ :type="barChart.type"
87
+ :data="barChart.data"
88
+ :options="barChart.options"
89
+ />
90
+ </template>
91
+ ```
92
+
93
+ :::
94
+
95
+ ## Pie chart
96
+
97
+ <br/>
98
+
99
+ <MazChart
100
+ :type="pieChart.type"
101
+ :data="pieChart.data"
102
+ :options="pieChart.options"
103
+ />
104
+
105
+ ::: details View code
106
+
107
+ ```vue
108
+ <script setup lang="ts">
109
+ const pieChart = {
110
+ type: 'doughnut',
111
+ data: {
112
+ labels: [
113
+ `Perfects - ${40}%`,
114
+ `Bons - ${35}%`,
115
+ `Mauvais - ${25}%`,
116
+ ],
117
+ datasets: [
118
+ {
119
+ backgroundColor: [
120
+ '#fcb731',
121
+ 'rgb(28 209 161)',
122
+ 'rgb(255, 109, 106)',
123
+ ],
124
+ data: [
125
+ 40,
126
+ 35,
127
+ 25,
128
+ ],
129
+ },
130
+ ],
131
+ },
132
+ }
133
+ </script>
134
+
135
+ <template>
136
+ <MazChart
137
+ :type="pieChart.type"
138
+ :data="pieChart.data"
139
+ />
140
+ </template>
141
+ ```
142
+
143
+ :::
144
+
145
+ ## Line chart
146
+
147
+ <br/>
148
+
149
+ <MazChart v-bind="lineChart" />
150
+
151
+ ::: details View code
152
+
153
+ ```vue
154
+ <script setup lang="ts">
155
+ import dataLabels from 'chartjs-plugin-datalabels'
156
+
157
+ let delayed: boolean
158
+
159
+ const animation = {
160
+ onComplete: () => {
161
+ delayed = true
162
+ },
163
+ delay: (context: Record<string, any>) => {
164
+ let delay = 0
165
+ if (context.type === 'data' && context.mode === 'default' && !delayed) {
166
+ delay = context.dataIndex * 100 + context.datasetIndex * 50
167
+ }
168
+ return delay
169
+ },
170
+ }
171
+
172
+ const lineChart = {
173
+ type: 'line',
174
+ // locally registered and available for this chart
175
+ plugins: [dataLabels],
176
+ data: {
177
+ labels: [1, 2, 3, 4, 5, 6],
178
+ datasets: [
179
+ {
180
+ label: 'Moyenne des bons pronos du groupe',
181
+ data: [10, 15, 20, 25, 30, 35],
182
+ fill: false,
183
+ borderColor: 'rgb(28 209 161)',
184
+ tension: 0.5,
185
+ backgroundColor: '#17a2b8',
186
+ },
187
+ {
188
+ label: 'Vos bons pronos',
189
+ data: [10, 15, 20, 25, 30, 35],
190
+ fill: false,
191
+ borderColor: '#333',
192
+ tension: 0.5,
193
+ backgroundColor: '#1e90ff',
194
+ },
195
+ ],
196
+ },
197
+ options: {
198
+ plugins: {
199
+ datalabels: {
200
+ backgroundColor: (context: Record<string, any>) => {
201
+ return context.dataset.backgroundColor
202
+ },
203
+ borderRadius: 4,
204
+ color: 'white',
205
+ font: {
206
+ weight: 'bold',
207
+ },
208
+ padding: 6,
209
+ },
210
+ },
211
+ animation,
212
+ }
213
+ }
214
+ </script>
215
+
216
+ <template>
217
+ <MazChart v-bind="lineChart" />
218
+ </template>
219
+ ```
220
+
221
+ :::
222
+
223
+ <script setup lang="ts">
224
+ import dataLabels from 'chartjs-plugin-datalabels'
225
+
226
+ let delayed: boolean
227
+
228
+ const animation = {
229
+ onComplete: () => {
230
+ delayed = true
231
+ },
232
+ delay: (context: Record<string, any>) => {
233
+ let delay = 0
234
+ if (context.type === 'data' && context.mode === 'default' && !delayed) {
235
+ delay = context.dataIndex *100 + context.datasetIndex* 50
236
+ }
237
+ return delay
238
+ },
239
+ }
240
+
241
+ const pieChart = {
242
+ type: 'doughnut',
243
+ data: {
244
+ labels: [
245
+ `Perfects - ${40}%`,
246
+ `Bons - ${35}%`,
247
+ `Mauvais - ${25}%`,
248
+ ],
249
+ datasets: [
250
+ {
251
+ backgroundColor: [
252
+ '#fcb731',
253
+ 'rgb(28 209 161)',
254
+ 'rgb(255, 109, 106)',
255
+ ],
256
+ data: [
257
+ 40,
258
+ 35,
259
+ 25,
260
+ ],
261
+ },
262
+ ],
263
+ },
264
+ }
265
+
266
+ const lineChart = {
267
+ type: 'line',
268
+ // locally registered and available for this chart
269
+ plugins: [dataLabels],
270
+ data: {
271
+ labels: [1, 2, 3, 4, 5, 6],
272
+ datasets: [
273
+ {
274
+ label: 'Moyenne des bons pronos du groupe',
275
+ data: [10, 15, 20, 25, 30, 35],
276
+ fill: false,
277
+ borderColor: 'rgb(28 209 161)',
278
+ tension: 0.5,
279
+ backgroundColor: '#17a2b8',
280
+ },
281
+ {
282
+ label: 'Vos bons pronos',
283
+ data: [20, 15, 15, 30, 22, 40],
284
+ fill: false,
285
+ borderColor: '#333',
286
+ tension: 0.5,
287
+ backgroundColor: '#1e90ff',
288
+ },
289
+ ],
290
+ },
291
+ options: {
292
+ plugins: {
293
+ datalabels: {
294
+ backgroundColor: (context: Record<string, any>) => {
295
+ return context.dataset.backgroundColor
296
+ },
297
+ borderRadius: 4,
298
+ color: 'white',
299
+ font: {
300
+ weight: 'bold',
301
+ },
302
+ padding: 6,
303
+ },
304
+ },
305
+ animation,
306
+ }
307
+ }
308
+
309
+ const barChart = {
310
+ type: 'bar',
311
+ data: {
312
+ labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
313
+ datasets: [{
314
+ label: 'My First Dataset',
315
+ data: [65, 59, 80, 81, 56, 55, 40],
316
+ backgroundColor: [
317
+ 'rgba(255, 99, 132, 0.2)',
318
+ 'rgba(255, 159, 64, 0.2)',
319
+ 'rgba(255, 205, 86, 0.2)',
320
+ 'rgba(75, 192, 192, 0.2)',
321
+ 'rgba(54, 162, 235, 0.2)',
322
+ 'rgba(153, 102, 255, 0.2)',
323
+ 'rgba(201, 203, 207, 0.2)'
324
+ ],
325
+ borderColor: [
326
+ 'rgb(255, 99, 132)',
327
+ 'rgb(255, 159, 64)',
328
+ 'rgb(255, 205, 86)',
329
+ 'rgb(75, 192, 192)',
330
+ 'rgb(54, 162, 235)',
331
+ 'rgb(153, 102, 255)',
332
+ 'rgb(201, 203, 207)'
333
+ ],
334
+ borderWidth: 1
335
+ }]
336
+ },
337
+ }
338
+ </script>
339
+
340
+ <!--@include: ./../../.vitepress/generated-docs/maz-chart.doc.md-->
341
+
342
+ ## Types
343
+
344
+ ### ChartProps
345
+
346
+ Follow this link to see the type definitions: [vue-chartjs/src/types.ts](https://github.com/apertureless/vue-chartjs/blob/main/src/types.ts#L12)
@@ -0,0 +1,168 @@
1
+ ---
2
+ title: MazCheckbox
3
+ description: MazCheckbox is a standalone component that replaces the standard html input checkbox. Color options are available.
4
+ ---
5
+
6
+ # {{ $frontmatter.title }}
7
+
8
+ {{ $frontmatter.description }}
9
+
10
+ <!--@include: ./../.vitepress/mixins/getting-started.md-->
11
+
12
+ ## Basic usage
13
+
14
+ `v-model="{{checked}}"`
15
+
16
+ <MazCheckbox v-model="checked" :label="checked ? 'Checked' : 'Unchecked'" />
17
+
18
+ ```vue
19
+ <script lang="ts" setup>
20
+ import { MazCheckbox } from 'maz-ui/components'
21
+ import { ref } from 'vue'
22
+
23
+ const checked = ref(false)
24
+ </script>
25
+
26
+ <template>
27
+ <MazCheckbox v-model="checked" :label="checked ? 'Checked' : 'Unchecked'" />
28
+ </template>
29
+ ```
30
+
31
+ ## Colors
32
+
33
+ `v-model="{{chosenColors}}"`
34
+
35
+ <div class="maz-flex maz-flex-col maz-gap-2">
36
+ <MazCheckbox
37
+ v-for="color in colors"
38
+ :key="color"
39
+ v-model="chosenColors"
40
+ :color="color"
41
+ :id="color"
42
+ :name="color"
43
+ :value="color"
44
+ >
45
+ {{ color }}
46
+ </MazCheckbox>
47
+ </div>
48
+
49
+ ::: details View code
50
+
51
+ ```vue
52
+ <script lang="ts" setup>
53
+ import type { Color } from 'maz-ui/components'
54
+ import { MazCheckbox } from 'maz-ui/components'
55
+ import { ref } from 'vue'
56
+
57
+ const chosenColors = ref([])
58
+
59
+ const colors: Color[] = [
60
+ 'primary',
61
+ 'secondary',
62
+ 'info',
63
+ 'success',
64
+ 'warning',
65
+ 'destructive',
66
+ 'contrast',
67
+ 'accent',
68
+ ]
69
+ </script>
70
+
71
+ <template>
72
+ <MazCheckbox
73
+ v-for="color in colors"
74
+ :id="color"
75
+ :key="color"
76
+ v-model="chosenColors"
77
+ :color="color"
78
+ name="color"
79
+ :value="color"
80
+ >
81
+ {{ color }}
82
+ </MazCheckbox>
83
+ </template>
84
+ ```
85
+
86
+ :::
87
+
88
+ ## Sizing
89
+
90
+ `v-model="{{chosenSizes}}"`
91
+
92
+ <div class="maz-flex maz-flex-col maz-gap-2">
93
+ <MazCheckbox
94
+ v-for="size in sizes"
95
+ :key="size"
96
+ v-model="chosenSizes"
97
+ name="size"
98
+ :value="size"
99
+ :size="size"
100
+ >
101
+ {{ size }}
102
+ </MazCheckbox>
103
+ </div>
104
+
105
+ ::: details View code
106
+
107
+ ```vue
108
+ <script lang="ts" setup>
109
+ import type { MazSize } from 'maz-ui/components'
110
+ import { MazCheckbox } from 'maz-ui/components'
111
+ import { ref } from 'vue'
112
+
113
+ const chosenSizes = ref([])
114
+
115
+ const sizes: MazSize[] = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
116
+ </script>
117
+
118
+ <template>
119
+ <MazCheckbox
120
+ v-for="size in sizes"
121
+ :key="size"
122
+ v-model="chosenSizes"
123
+ name="size"
124
+ :value="size"
125
+ :size="size"
126
+ >
127
+ {{ size }}
128
+ </MazCheckbox>
129
+ </template>
130
+ ```
131
+
132
+ :::
133
+
134
+ ## Disabled
135
+
136
+ <div class="maz-flex maz-flex-col maz-gap-2">
137
+ <MazCheckbox :model-value="false" disabled name="disabled">
138
+ disabled
139
+ </MazCheckbox>
140
+
141
+ <MazCheckbox :model-value="true" disabled name="disabled">
142
+ disabled & checked
143
+ </MazCheckbox>
144
+ </div>
145
+
146
+ <script lang="ts" setup>
147
+ import { ref } from 'vue'
148
+ import { type Color, type Size } from 'maz-ui/components'
149
+
150
+ const checked = ref(false)
151
+ const chosenColors = ref([])
152
+ const chosenSizes = ref([])
153
+
154
+ const colors: Color[] = [
155
+ 'primary',
156
+ 'secondary',
157
+ 'info',
158
+ 'success',
159
+ 'warning',
160
+ 'destructive',
161
+ 'contrast',
162
+ 'accent',
163
+ ]
164
+
165
+ const sizes: Size[] = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
166
+ </script>
167
+
168
+ <!--@include: ./../../.vitepress/generated-docs/maz-checkbox.doc.md-->