@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,49 @@
1
+ ---
2
+ title: MazPullToRefresh
3
+ description: MazPullToRefresh is a standalone component to add pull to refresh feature
4
+ ---
5
+
6
+ # {{ $frontmatter.title }}
7
+
8
+ {{ $frontmatter.description }}
9
+
10
+ <!--@include: ./../.vitepress/mixins/getting-started.md-->
11
+
12
+ ## Demo
13
+
14
+ ![MazPullToRefresh](/img/maz-pull-to-refresh.gif)
15
+
16
+ ## Basic usage
17
+
18
+ Wrap your app inside this component
19
+
20
+ ```vue
21
+ <script lang="ts" setup>
22
+ import { MazPullToRefresh } from 'maz-ui/components'
23
+
24
+ async function pullToRefreshAction() {
25
+ // do promise or just `window.location.reload()`
26
+ }
27
+ </script>
28
+
29
+ <template>
30
+ <MazPullToRefresh
31
+ header-class="maz-bg-bg-dark maz-text-foreground-light"
32
+ class="maz-flex maz-min-h-screen maz-w-full maz-flex-col"
33
+ :action="pullToRefreshAction"
34
+ spinner-color="white"
35
+ standalone-mode
36
+ :disabled="false"
37
+ >
38
+ <div>
39
+ App Content
40
+ </div>
41
+ </MazPullToRefresh>
42
+ </template>
43
+ ```
44
+
45
+ ::: warning
46
+ More documentation to come
47
+ :::
48
+
49
+ <!--@include: ./../../.vitepress/generated-docs/maz-pull-to-refresh.doc.md-->
@@ -0,0 +1,456 @@
1
+ ---
2
+ title: MazRadioButtons
3
+ description: MazRadioButtons is a standalone component to select a value in a list. Made with native HTMLInputElement type radio
4
+ ---
5
+
6
+ # {{ $frontmatter.title }}
7
+
8
+ {{ $frontmatter.description }}
9
+
10
+ <!--@include: ./../.vitepress/mixins/getting-started.md-->
11
+
12
+ ## Basic usage
13
+
14
+ <ComponentDemo>
15
+ <p class="maz-mb-4">
16
+ Select a competition
17
+ </p>
18
+
19
+ <MazRadioButtons
20
+ v-model="selectedCompetition"
21
+ :options="competitions"
22
+ />
23
+
24
+ <template #code>
25
+
26
+ ```vue
27
+ <template>
28
+ <MazRadioButtons
29
+ v-model="selectedCompetition"
30
+ :options="competitions"
31
+ />
32
+ </template>
33
+
34
+ <script lang="ts" setup>
35
+ import { ref } from 'vue'
36
+
37
+ import { MazRadioButtons } from 'maz-ui/components'
38
+
39
+ const selectedCompetition = ref<string>()
40
+
41
+ const competitions = [
42
+ {
43
+ value: "1",
44
+ label: "Ligue 1",
45
+ areaName: "France",
46
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/c/c3/Flag_of_France.svg",
47
+ },
48
+ {
49
+ value: "2",
50
+ label: "Premier League",
51
+ areaName: "England",
52
+ areaEnsignUrl: "https://crests.football-data.org/770.svg",
53
+ },
54
+ {
55
+ value: "3",
56
+ label: "Bundesliga",
57
+ areaName: "Germany",
58
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/b/ba/Flag_of_Germany.svg",
59
+ },
60
+ {
61
+ value: "4",
62
+ label: "Eredivisie",
63
+ areaName: "Netherlands",
64
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/2/20/Flag_of_the_Netherlands.svg",
65
+ },
66
+ {
67
+ value: "5",
68
+ label: "Serie A",
69
+ areaName: "Italy",
70
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/0/03/Flag_of_Italy.svg",
71
+ },
72
+ {
73
+ value: "6",
74
+ label: "Primera Division",
75
+ areaName: "Spain",
76
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/9/9a/Flag_of_Spain.svg",
77
+ },
78
+ {
79
+ value: "7",
80
+ label: "Primeira Liga",
81
+ areaName: "Portugal",
82
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/5/5c/Flag_of_Portugal.svg",
83
+ },
84
+ {
85
+ value: "8",
86
+ label: "UEFA Champions League",
87
+ areaName: "Europe",
88
+ areaEnsignUrl: "https://crests.football-data.org/EUR.svg",
89
+ }
90
+ ]
91
+ </script>
92
+ ```
93
+
94
+ </template>
95
+ </ComponentDemo>
96
+
97
+ ## Custom slot template
98
+
99
+ <ComponentDemo>
100
+ <p class="maz-mb-4">
101
+ Select a competition
102
+ </p>
103
+
104
+ <MazRadioButtons
105
+ v-model="selectedCompetition"
106
+ :options="competitions"
107
+ color="secondary"
108
+ v-slot="{ option, selected }"
109
+ >
110
+ <div style="display: flex;">
111
+ <MazAvatar
112
+ v-if="option.areaEnsignUrl"
113
+ :src="option.areaEnsignUrl"
114
+ style="margin-right: 16px;"
115
+ size="0.8rem"
116
+ />
117
+ <div style="display: flex; flex-direction: column;">
118
+ <span>
119
+ {{ option.label }}
120
+ </span>
121
+ <span :class="{ 'maz-text-muted': !selected }">
122
+ {{ option.areaName }}
123
+ </span>
124
+ </div>
125
+ </div>
126
+ </MazRadioButtons>
127
+
128
+ <template #code>
129
+
130
+ ```html
131
+ <MazRadioButtons
132
+ v-model="selectedCompetition"
133
+ :options="competitions"
134
+ color="secondary"
135
+ >
136
+ <template #default="{ option, selected }">
137
+ <div style="display: flex;">
138
+ <MazAvatar
139
+ v-if="option.areaEnsignUrl"
140
+ :src="option.areaEnsignUrl"
141
+ style="margin-right: 16px;"
142
+ size="0.8rem"
143
+ />
144
+ <div style="display: flex; flex-direction: column;">
145
+ <span>
146
+ {{ option.label }}
147
+ </span>
148
+ <span :class="{ 'maz-text-muted': !selected }">
149
+ {{ option.areaName }}
150
+ </span>
151
+ </div>
152
+ </div>
153
+ </template>
154
+ </MazRadioButtons>
155
+ ```
156
+
157
+ </template>
158
+
159
+ </ComponentDemo>
160
+
161
+ ## Orientation - Column
162
+
163
+ <ComponentDemo>
164
+ <p class="maz-mb-4">
165
+ Select a competition
166
+ </p>
167
+
168
+ <MazRadioButtons
169
+ v-model="selectedCompetition"
170
+ :options="competitions"
171
+ orientation="col"
172
+ v-slot="{ option, selected }"
173
+ >
174
+ <div style="display: flex;">
175
+ <MazAvatar
176
+ v-if="option.areaEnsignUrl"
177
+ :src="option.areaEnsignUrl"
178
+ style="margin-right: 16px;"
179
+ size="0.8rem"
180
+ />
181
+ <div style="display: flex; flex-direction: column;">
182
+ <span>
183
+ {{ option.label }}
184
+ </span>
185
+ <span :class="{ 'maz-text-muted': !selected }">
186
+ {{ option.areaName }}
187
+ </span>
188
+ </div>
189
+ </div>
190
+ </MazRadioButtons>
191
+
192
+ <template #code>
193
+
194
+ ```vue
195
+ <template>
196
+ <MazRadioButtons
197
+ v-model="selectedCompetition"
198
+ :options="competitions"
199
+ orientation="col | row"
200
+ v-slot="{ option, selected }"
201
+ >
202
+ <div style="display: flex;">
203
+ <MazAvatar
204
+ v-if="option.areaEnsignUrl"
205
+ :src="option.areaEnsignUrl"
206
+ style="margin-right: 16px;"
207
+ size="0.8rem"
208
+ />
209
+ <div style="display: flex; flex-direction: column;">
210
+ <span>
211
+ {{ option.label }}
212
+ </span>
213
+ <span :class="{ 'maz-text-muted': !selected }">
214
+ {{ option.areaName }}
215
+ </span>
216
+ </div>
217
+ </div>
218
+ </MazRadioButtons>
219
+ </template>
220
+
221
+ <script lang="ts" setup>
222
+ import { ref } from 'vue'
223
+
224
+ import { MazRadioButtons, MazAvatar } from 'maz-ui/components'
225
+
226
+ const selectedCompetition = ref<string>()
227
+
228
+ const competitions = [
229
+ {
230
+ value: "1",
231
+ label: "Ligue 1",
232
+ areaName: "France",
233
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/c/c3/Flag_of_France.svg",
234
+ },
235
+ {
236
+ value: "2",
237
+ label: "Premier League",
238
+ areaName: "England",
239
+ areaEnsignUrl: "https://crests.football-data.org/770.svg",
240
+ },
241
+ {
242
+ value: "3",
243
+ label: "Bundesliga",
244
+ areaName: "Germany",
245
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/b/ba/Flag_of_Germany.svg",
246
+ },
247
+ {
248
+ value: "4",
249
+ label: "Eredivisie",
250
+ areaName: "Netherlands",
251
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/2/20/Flag_of_the_Netherlands.svg",
252
+ },
253
+ {
254
+ value: "5",
255
+ label: "Serie A",
256
+ areaName: "Italy",
257
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/0/03/Flag_of_Italy.svg",
258
+ },
259
+ {
260
+ value: "6",
261
+ label: "Primera Division",
262
+ areaName: "Spain",
263
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/9/9a/Flag_of_Spain.svg",
264
+ },
265
+ {
266
+ value: "7",
267
+ label: "Primeira Liga",
268
+ areaName: "Portugal",
269
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/5/5c/Flag_of_Portugal.svg",
270
+ },
271
+ {
272
+ value: "8",
273
+ label: "UEFA Champions League",
274
+ areaName: "Europe",
275
+ areaEnsignUrl: "https://crests.football-data.org/EUR.svg",
276
+ }
277
+ ]
278
+ </script>
279
+ ```
280
+
281
+ </template>
282
+
283
+ </ComponentDemo>
284
+
285
+ ## Selector icon with options equal-size
286
+
287
+ This option will display a select icon on the left of the label
288
+
289
+ <ComponentDemo>
290
+ <MazRadioButtons
291
+ v-slot="{ option, selected }"
292
+ v-model="selectedMode"
293
+ :options="modeOptions"
294
+ selector
295
+ equal-size
296
+ block
297
+ class="vp-raw"
298
+ >
299
+ <div class="maz-flex maz-flex-col maz-items-start maz-p-2">
300
+ <h3 class="maz-mb-2 maz-text-xl maz-font-semibold">
301
+ {{ option.label }}
302
+ </h3>
303
+ <span :class="{ 'maz-text-muted': !selected }">
304
+ {{ option.description }}
305
+ </span>
306
+ </div>
307
+ </MazRadioButtons>
308
+
309
+ <template #code>
310
+
311
+ ```vue
312
+ <template>
313
+ <MazRadioButtons
314
+ v-slot="{ option, selected }"
315
+ v-model="selectedMode"
316
+ :options="modeOptions"
317
+ selector
318
+ equal-size
319
+ block
320
+ >
321
+ <div class="flex flex-col items-start p-2">
322
+ <h3 class="mb-2 text-xl font-semibold">
323
+ {{ option.label }}
324
+ </h3>
325
+ <span :class="{ 'text-muted': !selected }">
326
+ {{ option.description }}
327
+ </span>
328
+ </div>
329
+ </MazRadioButtons>
330
+ </template>
331
+
332
+ <script lang="ts" setup>
333
+ import { ref } from 'vue'
334
+ import { type MazRadioButtonsOption } from 'maz-ui/components/MazRadioButtons'
335
+
336
+ const selectedMode = ref('scores')
337
+
338
+ const modeOptions: MazRadioButtonsOption[] = [
339
+ {
340
+ label: 'Scores',
341
+ value: 'scores',
342
+ description:
343
+ 'Predict the score of matches. If you find the outcome of the match you win 5 points, if you get the perfect score you double your score!',
344
+ style: 'min-width: 250px;'
345
+ },
346
+ {
347
+ label: 'Cotes',
348
+ value: 'odds',
349
+ description:
350
+ 'Predict with match odds. If you find the correct winner of the match you earn the points associated with the rating, if you have the perfect score you double your score.',
351
+ style: 'min-width: 250px;'
352
+ },
353
+ ]
354
+ </script>
355
+ ```
356
+
357
+ </template>
358
+ </ComponentDemo>
359
+
360
+ ## Types
361
+
362
+ ### options
363
+
364
+ The options prop is an array of `ButtonsRadioOption` type
365
+
366
+ ```ts
367
+ export type ButtonsRadioOption = {
368
+ /** The label of the option */
369
+ label: string
370
+ /** The value of the option */
371
+ value: string | number | boolean
372
+ /** The classes to apply to the option */
373
+ classes?: any
374
+ /** The style to apply to the option */
375
+ style?: StyleValue
376
+ } & Record<string, unknown>
377
+ ```
378
+
379
+ <!--@include: ./../../.vitepress/generated-docs/maz-radio-buttons.doc.md-->
380
+
381
+ <script lang="ts" setup>
382
+ import { ref } from 'vue'
383
+ import MazRadioButtons from 'maz-ui/src/components/MazRadioButtons.vue'
384
+
385
+ const selectedCompetition = ref<string>()
386
+
387
+ const competitions = [
388
+ {
389
+ value: "1",
390
+ label: "Ligue 1",
391
+ areaName: "France",
392
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/c/c3/Flag_of_France.svg",
393
+ },
394
+ {
395
+ value: "2",
396
+ label: "Premier League",
397
+ areaName: "England",
398
+ areaEnsignUrl: "https://crests.football-data.org/770.svg",
399
+ },
400
+ {
401
+ value: "3",
402
+ label: "Bundesliga",
403
+ areaName: "Germany",
404
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/b/ba/Flag_of_Germany.svg",
405
+ },
406
+ {
407
+ value: "4",
408
+ label: "Eredivisie",
409
+ areaName: "Netherlands",
410
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/2/20/Flag_of_the_Netherlands.svg",
411
+ },
412
+ {
413
+ value: "5",
414
+ label: "Serie A",
415
+ areaName: "Italy",
416
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/0/03/Flag_of_Italy.svg",
417
+ },
418
+ {
419
+ value: "6",
420
+ label: "Primera Division",
421
+ areaName: "Spain",
422
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/9/9a/Flag_of_Spain.svg",
423
+ },
424
+ {
425
+ value: "7",
426
+ label: "Primeira Liga",
427
+ areaName: "Portugal",
428
+ areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/5/5c/Flag_of_Portugal.svg",
429
+ },
430
+ {
431
+ value: "8",
432
+ label: "UEFA Champions League",
433
+ areaName: "Europe",
434
+ areaEnsignUrl: "https://crests.football-data.org/EUR.svg",
435
+ }
436
+ ]
437
+
438
+ const selectedMode = ref('scores')
439
+
440
+ const modeOptions = [
441
+ {
442
+ label: 'Scores',
443
+ value: 'scores',
444
+ description:
445
+ 'Predict the score of matches. If you find the outcome of the match you win 5 points, if you get the perfect score you double your score!',
446
+ style: 'min-width: 250px;'
447
+ },
448
+ {
449
+ label: 'Cotes',
450
+ value: 'odds',
451
+ description:
452
+ 'Predict with match odds. If you find the correct winner of the match you earn the points associated with the rating, if you have the perfect score you double your score.',
453
+ style: 'min-width: 250px;'
454
+ },
455
+ ]
456
+ </script>
@@ -0,0 +1,141 @@
1
+ ---
2
+ title: MazRadio
3
+ description: MazRadio is a standalone component
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="{{chosenColor ?? 'undefined'}}"`
15
+
16
+ <div class="maz-flex maz-flex-col maz-gap-2">
17
+ <MazRadio
18
+ v-for="color in colors"
19
+ v-model="chosenColor"
20
+ name="chosenColor"
21
+ :color="color"
22
+ :key="color"
23
+ :value="color"
24
+ >
25
+ {{ color }}
26
+ </MazRadio>
27
+ </div>
28
+
29
+ ::: details View code
30
+
31
+ ```vue
32
+ <script lang="ts" setup>
33
+ import { MazRadio } from 'maz-ui/components'
34
+ import { ref } from 'vue'
35
+
36
+ const chosenColor = ref('primary')
37
+ const chosenSize = ref('mini')
38
+
39
+ const colors: Color[] = [
40
+ 'primary',
41
+ 'secondary',
42
+ 'info',
43
+ 'success',
44
+ 'warning',
45
+ 'destructive',
46
+ 'accent',
47
+ 'contrast',
48
+ ]
49
+ </script>
50
+
51
+ <template>
52
+ <MazRadio
53
+ v-for="color in colors"
54
+ :key="color"
55
+ v-model="chosenColor"
56
+ name="chosenColor"
57
+ :color="color"
58
+ :value="color"
59
+ >
60
+ {{ color }}
61
+ </MazRadio>
62
+ </template>
63
+ ```
64
+
65
+ :::
66
+
67
+ ## Sizing
68
+
69
+ `v-model="{{chosenSize ?? 'undefined'}}"`
70
+
71
+ <div class="maz-flex maz-flex-col maz-gap-2">
72
+ <MazRadio
73
+ v-for="size in sizes"
74
+ v-model="chosenSize"
75
+ name="chosenSize"
76
+ :key="size"
77
+ :size="size"
78
+ :value="size"
79
+ :label="size"
80
+ />
81
+ </div>
82
+
83
+ ::: details View code
84
+
85
+ ```vue
86
+ <script lang="ts" setup>
87
+ import { MazRadio, type Size } from 'maz-ui/components'
88
+ import { ref } from 'vue'
89
+
90
+ const chosenSize = ref('mini')
91
+
92
+ const sizes: Size[] = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
93
+ </script>
94
+
95
+ <template>
96
+ <MazRadio
97
+ v-for="size in sizes"
98
+ :key="size"
99
+ v-model="chosenSize"
100
+ name="chosenSize"
101
+ :size="size"
102
+ :value="size"
103
+ :label="size"
104
+ />
105
+ </template>
106
+ ```
107
+
108
+ :::
109
+
110
+ ## Disabled
111
+
112
+ <div class="maz-flex maz-flex-col maz-gap-2">
113
+ <MazRadio disabled name="disabled" value="disabled2">
114
+ disabled
115
+ </MazRadio>
116
+
117
+ <MazRadio model-value="disabled" disabled name="disabled" value="disabled">
118
+ disabled & selected
119
+ </MazRadio>
120
+ </div>
121
+
122
+ <script lang="ts" setup>
123
+ import { ref } from 'vue'
124
+ const chosenColor = ref()
125
+ const chosenSize = ref()
126
+
127
+ const colors: Color[] = [
128
+ 'primary',
129
+ 'secondary',
130
+ 'info',
131
+ 'success',
132
+ 'warning',
133
+ 'destructive',
134
+ 'accent',
135
+ 'contrast',
136
+ ]
137
+
138
+ const sizes: Size[] = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
139
+ </script>
140
+
141
+ <!--@include: ./../../.vitepress/generated-docs/maz-radio.doc.md-->
@@ -0,0 +1,74 @@
1
+ ---
2
+ title: MazReadingProgressBar
3
+ description: MazReadingProgressBar is a standalone component to display a reading progress bar
4
+ ---
5
+
6
+ # {{ $frontmatter.title }}
7
+
8
+ {{ $frontmatter.description }}
9
+
10
+ <!--@include: ./../.vitepress/mixins/getting-started.md-->
11
+
12
+ This component use the `<Teleport />` component to move the progress bar to the top of the page. You can set the `teleport-selector` prop to change the target of the teleportation.
13
+
14
+ ## Basic usage
15
+
16
+ Look at the top of the page to see the component in action (scroll in page to inscrease progress bar width).
17
+
18
+ <MazReadingProgressBar content-selector=".VPDoc" teleport-selector="#app" />
19
+
20
+ ```vue
21
+ <script lang="ts" setup>
22
+ import MazReadingProgressBar from 'maz-ui/components/MazReadingProgressBar'
23
+ </script>
24
+
25
+ <template>
26
+ <MazReadingProgressBar content-selector=".VPDoc" teleport-selector="#app" />
27
+ </template>
28
+ ```
29
+
30
+ ## Types
31
+
32
+ ### Props
33
+
34
+ ```ts
35
+ export interface Props {
36
+ /**
37
+ * Height of the progress bar
38
+ * @default 4px
39
+ */
40
+ height?: string
41
+ /**
42
+ * Color of the progress bar
43
+ * @default primary
44
+ */
45
+ color?: Color
46
+ /**
47
+ * Selector of the element to teleport the progress bar
48
+ * @default body
49
+ */
50
+ teleportSelector?: string
51
+ /**
52
+ * Selector of the element to get the height
53
+ * @default body
54
+ */
55
+ contentSelector?: string
56
+ /**
57
+ * Offset of the progress bar
58
+ * @default 0
59
+ */
60
+ offset?: number
61
+ /**
62
+ * Class of the progress bar
63
+ * @default undefined
64
+ */
65
+ barClass?: HTMLAttributes['class']
66
+ /**
67
+ * Instead of using the height of the content with a selector, you can set a scroll distance
68
+ * @default undefined
69
+ */
70
+ distance?: number
71
+ }
72
+ ```
73
+
74
+ <!--@include: ./../../.vitepress/generated-docs/maz-reading-progress-bar.doc.md-->