@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,16 @@
1
+ ---
2
+ title: MazBackdrop
3
+ description: MazBackdrop is a standalone component to manage components that need a backdrop
4
+ ---
5
+
6
+ # {{ $frontmatter.title }}
7
+
8
+ {{ $frontmatter.description }}
9
+
10
+ <!--@include: ./../.vitepress/mixins/getting-started.md-->
11
+
12
+ ::: tip
13
+ This component uses `<Teleport to="body">`, so you can implement this component anywhere you want
14
+ :::
15
+
16
+ <!--@include: ./../../.vitepress/generated-docs/maz-backdrop.doc.md-->
@@ -0,0 +1,222 @@
1
+ ---
2
+ title: MazBadge
3
+ description: MazBadge is a standalone component to show short text in colored container
4
+ ---
5
+
6
+ # {{ $frontmatter.title }}
7
+
8
+ {{ $frontmatter.description }}
9
+
10
+ <!--@include: ./../.vitepress/mixins/getting-started.md-->
11
+
12
+ ## Basic usage
13
+
14
+ <MazBadge>
15
+ Badge
16
+ </MazBadge>
17
+
18
+ ```vue
19
+ <script lang="ts" setup>
20
+ import MazBadge from 'maz-ui/components/MazBadge'
21
+ </script>
22
+
23
+ <template>
24
+ <MazBadge>
25
+ Badge
26
+ </MazBadge>
27
+ </template>
28
+ ```
29
+
30
+ ## Options
31
+
32
+ > See all options props [here](#props)
33
+
34
+ ### Colors
35
+
36
+ <br />
37
+
38
+ <div class="flex space-between gap-05 items-center flex-wrap">
39
+ <MazBadge v-for="color in colors" :key="color" :color="color">
40
+ {{ color }}
41
+ </MazBadge>
42
+ </div>
43
+
44
+ ```vue
45
+ <script lang="ts" setup>
46
+ import MazBadge from 'maz-ui/components/MazBadge'
47
+
48
+ const colors = [
49
+ 'primary',
50
+ 'secondary',
51
+ 'info',
52
+ 'success',
53
+ 'warning',
54
+ 'destructive',
55
+ 'contrast',
56
+ 'accent',
57
+ 'background',
58
+ ]
59
+ </script>
60
+
61
+ <template>
62
+ <MazBadge v-for="color in color" :key="color" :color="color">
63
+ {{ color }}
64
+ </MazBadge>
65
+ </template>
66
+ ```
67
+
68
+ ### Outlined
69
+
70
+ <br />
71
+
72
+ <div class="flex space-between gap-05 items-center flex-wrap">
73
+ <MazBadge v-for="color in colors" :key="color" :color="color" outlined>
74
+ {{ color }}
75
+ </MazBadge>
76
+ </div>
77
+
78
+ ```vue
79
+ <script lang="ts" setup>
80
+ import MazBadge from 'maz-ui/components/MazBadge'
81
+
82
+ const colors = [
83
+ 'primary',
84
+ 'secondary',
85
+ 'info',
86
+ 'success',
87
+ 'warning',
88
+ 'destructive',
89
+ 'contrast',
90
+ 'accent',
91
+ 'background',
92
+ ]
93
+ </script>
94
+
95
+ <template>
96
+ <MazBadge v-for="color in color" :key="color" :color="color" outlined>
97
+ {{ color }}
98
+ </MazBadge>
99
+ </template>
100
+ ```
101
+
102
+ ### Pastel
103
+
104
+ <br />
105
+
106
+ <div class="flex space-between gap-05 items-center flex-wrap">
107
+ <MazBadge v-for="color in colors" :key="color" :color="color" pastel>
108
+ {{ color }}
109
+ </MazBadge>
110
+ </div>
111
+
112
+ ```vue
113
+ <script lang="ts" setup>
114
+ import MazBadge from 'maz-ui/components/MazBadge'
115
+
116
+ const colors = [
117
+ 'primary',
118
+ 'secondary',
119
+ 'info',
120
+ 'success',
121
+ 'warning',
122
+ 'destructive',
123
+ 'contrast',
124
+ 'accent',
125
+ 'background',
126
+ ]
127
+ </script>
128
+
129
+ <template>
130
+ <MazBadge v-for="color in color" :key="color" :color="color" pastel>
131
+ {{ color }}
132
+ </MazBadge>
133
+ </template>
134
+ ```
135
+
136
+ ### Size
137
+
138
+ <br />
139
+
140
+ <div class="flex space-between gap-05 items-center flex-wrap">
141
+ <MazBadge size="0.8rem">
142
+ 0.8rem
143
+ </MazBadge>
144
+ <MazBadge size="1.2rem">
145
+ 1.2rem
146
+ </MazBadge>
147
+ <MazBadge size="1.6rem">
148
+ 1.6rem
149
+ </MazBadge>
150
+ <MazBadge size="2rem">
151
+ 2rem
152
+ </MazBadge>
153
+ <MazBadge size="2.4rem">
154
+ 2.4rem
155
+ </MazBadge>
156
+ </div>
157
+
158
+ ```vue
159
+ <script lang="ts" setup>
160
+ import { MazBadge } from 'maz-ui/components'
161
+ </script>
162
+
163
+ <template>
164
+ <MazBadge size="0.8rem">
165
+ 0.8rem
166
+ </MazBadge>
167
+ <MazBadge size="1.2rem">
168
+ 1.2rem
169
+ </MazBadge>
170
+ <MazBadge size="1.6rem">
171
+ 1.6rem
172
+ </MazBadge>
173
+ <MazBadge size="2rem">
174
+ 2rem
175
+ </MazBadge>
176
+ <MazBadge size="2.4rem">
177
+ 2.4rem
178
+ </MazBadge>
179
+ </template>
180
+ ```
181
+
182
+ ### Rounded sizes
183
+
184
+ <br />
185
+
186
+ <div class="flex space-between gap-05 items-center flex-wrap">
187
+ <MazBadge v-for="size in roundedSize" :key="size" :rounded-size="size" size="1.2rem">
188
+ {{ size }}
189
+ </MazBadge>
190
+ </div>
191
+
192
+ ```vue
193
+ <script lang="ts" setup>
194
+ import { MazBadge } from 'maz-ui/components'
195
+
196
+ const roundedSize = ['none', 'sm', 'md', 'lg', 'xl', 'full']
197
+ </script>
198
+
199
+ <template>
200
+ <MazBadge v-for="size in roundedSize" :key="size" :rounded-size="size" size="1.2rem">
201
+ {{ size }}
202
+ </MazBadge>
203
+ </template>
204
+ ```
205
+
206
+ <script lang="ts" setup>
207
+ const colors = [
208
+ 'primary',
209
+ 'secondary',
210
+ 'info',
211
+ 'success',
212
+ 'warning',
213
+ 'destructive',
214
+ 'contrast',
215
+ 'accent',
216
+ 'background',
217
+ ]
218
+
219
+ const roundedSize = ['none', 'sm', 'md', 'lg', 'xl', 'full']
220
+ </script>
221
+
222
+ <!--@include: ./../../.vitepress/generated-docs/maz-badge.doc.md-->
@@ -0,0 +1,398 @@
1
+ ---
2
+ title: MazBottomSheet
3
+ description: MazBottomSheet is a standalone component like a simple dialog but at the bottom of screen. Useful for mobile UX.
4
+ ---
5
+
6
+ # {{ $frontmatter.title }}
7
+
8
+ {{ $frontmatter.description }}
9
+
10
+ <!--@include: ./../.vitepress/mixins/getting-started.md-->
11
+
12
+ ::: tip
13
+ This component uses the `<Teleport to="body">` with [MazBackdrop](./maz-backdrop.md), so you can implement this component anywhere and it inherits all its props
14
+ :::
15
+
16
+ ## Interactive Demo
17
+
18
+ <ComponentDemo expanded>
19
+ <div class="maz-flex maz-flex-col maz-gap-4">
20
+ <!-- Product Selection Demo -->
21
+ <MazCard>
22
+ <template #title>
23
+ <div class="maz-flex maz-items-center maz-gap-3">
24
+ <MazAvatar src="https://images.unsplash.com/photo-1542291026-7eec264c27ff?w=100" size="lg" />
25
+ <div>
26
+ <h3 class="maz-text-lg maz-font-semibold">Nike Air Max</h3>
27
+ <p class="maz-text-muted maz-text-sm">Premium Running Shoes</p>
28
+ </div>
29
+ </div>
30
+ </template>
31
+ <div class="maz-space-y-4">
32
+ <div class="maz-flex maz-items-center maz-justify-between">
33
+ <span class="maz-font-medium">Price:</span>
34
+ <span class="maz-text-xl maz-font-bold maz-text-primary">$129.99</span>
35
+ </div>
36
+ <div class="maz-flex maz-gap-2">
37
+ <MazBtn color="primary" @click="openProductOptions">
38
+ <MazIcon name="cog" class="maz-mr-2" />
39
+ Customize Options
40
+ </MazBtn>
41
+ <MazBtn color="secondary" @click="openUserSettings">
42
+ <MazIcon name="user" class="maz-mr-2" />
43
+ Profile Settings
44
+ </MazBtn>
45
+ </div>
46
+ </div>
47
+ </MazCard>
48
+ <MazCard v-if="selectedOptions.size || selectedOptions.color" class="maz-bg-secondary/10">
49
+ <template #title>Selected Options</template>
50
+ <div class="maz-flex maz-gap-4">
51
+ <MazBadge v-if="selectedOptions.size" color="info">
52
+ Size: {{ selectedOptions.size }}
53
+ </MazBadge>
54
+ <MazBadge v-if="selectedOptions.color" color="success">
55
+ Color: {{ selectedOptions.color }}
56
+ </MazBadge>
57
+ <MazBadge v-if="quantity > 1" color="warning">
58
+ Qty: {{ quantity }}
59
+ </MazBadge>
60
+ </div>
61
+ </MazCard>
62
+ </div>
63
+ <MazBottomSheet v-model="isProductOpen" title="Customize Your Shoes">
64
+ <div class="maz-space-y-6 maz-p-6">
65
+ <!-- Size Selection -->
66
+ <div>
67
+ <h4 class="maz-text-lg maz-font-semibold maz-mb-3">Select Size</h4>
68
+ <div class="maz-grid maz-grid-cols-4 maz-gap-2">
69
+ <MazBtn
70
+ v-for="size in sizes"
71
+ :key="size"
72
+ :color="selectedOptions.size === size ? 'primary' : 'secondary'"
73
+ size="sm"
74
+ @click="selectedOptions.size = size"
75
+ >
76
+ {{ size }}
77
+ </MazBtn>
78
+ </div>
79
+ </div>
80
+ <div>
81
+ <h4 class="maz-text-lg maz-font-semibold maz-mb-3">Select Color</h4>
82
+ <div class="maz-grid maz-grid-cols-3 maz-gap-3">
83
+ <div
84
+ v-for="color in colors"
85
+ :key="color.name"
86
+ class="maz-flex maz-flex-col maz-items-center maz-cursor-pointer maz-p-3 maz-rounded-lg maz-border-2 maz-transition-all"
87
+ :class="selectedOptions.color === color.name ? 'maz-border-primary maz-bg-primary/10' : 'maz-border-border hover:maz-border-primary/50'"
88
+ @click="selectedOptions.color = color.name"
89
+ >
90
+ <div
91
+ class="maz-w-8 maz-h-8 maz-rounded-full maz-mb-2"
92
+ :style="{ backgroundColor: color.value }"
93
+ />
94
+ <span class="maz-text-sm maz-font-medium">{{ color.name }}</span>
95
+ </div>
96
+ </div>
97
+ </div>
98
+ <div>
99
+ <MazInputNumber
100
+ v-model="quantity"
101
+ label="Quantity"
102
+ :min="1"
103
+ :max="10"
104
+ />
105
+ </div>
106
+ <div class="maz-flex maz-gap-3 maz-pt-4">
107
+ <MazBtn color="primary" class="maz-flex-1" @click="addToCart">
108
+ <MazIcon name="shopping-cart" class="maz-mr-2" />
109
+ Add to Cart (${{ (129.99 * quantity).toFixed(2) }})
110
+ </MazBtn>
111
+ <MazBtn color="secondary" @click="isProductOpen = false">
112
+ Cancel
113
+ </MazBtn>
114
+ </div>
115
+ </div>
116
+ </MazBottomSheet>
117
+
118
+ <MazBottomSheet v-model="isUserOpen" title="Profile Settings">
119
+ <div class="maz-space-y-6 maz-p-6">
120
+ <div class="maz-flex maz-items-center maz-gap-4 maz-p-4 maz-bg-secondary/10 maz-rounded-lg">
121
+ <MazAvatar src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=100" size="xl" />
122
+ <div>
123
+ <h4 class="maz-font-semibold">John Doe</h4>
124
+ <p class="maz-text-muted maz-text-sm">john.doe@example.com</p>
125
+ <MazBadge color="success" size="xs">Premium Member</MazBadge>
126
+ </div>
127
+ </div>
128
+ <div class="maz-flex maz-gap-4 maz-items-start">
129
+ <MazInput
130
+ v-model="userForm.name"
131
+ label="Full Name"
132
+ placeholder="Enter your name"
133
+ />
134
+ <MazInput
135
+ v-model="userForm.email"
136
+ label="Email"
137
+ type="email"
138
+ placeholder="Enter your email"
139
+ />
140
+ <MazSelect
141
+ v-model="userForm.country"
142
+ label="Country"
143
+ :options="countries"
144
+ placeholder="Select your country"
145
+ />
146
+ </div>
147
+ <div class="maz-flex maz-gap-4">
148
+ <div class="maz-flex maz-items-center maz-justify-between maz-p-4 maz-border maz-border-border maz-rounded-lg">
149
+ <div>
150
+ <p class="maz-font-medium">Email Notifications</p>
151
+ <p class="maz-text-sm maz-text-muted">Receive updates about your orders</p>
152
+ </div>
153
+ <MazSwitch v-model="userForm.notifications" />
154
+ </div>
155
+ <div class="maz-flex maz-items-center maz-justify-between maz-p-4 maz-border maz-border-border maz-rounded-lg">
156
+ <div>
157
+ <p class="maz-font-medium">Dark Mode</p>
158
+ <p class="maz-text-sm maz-text-muted">Switch to dark theme</p>
159
+ </div>
160
+ <MazSwitch v-model="userForm.darkMode" />
161
+ </div>
162
+ </div>
163
+ <div class="maz-flex maz-gap-3 maz-pt-4">
164
+ <MazBtn color="primary" class="maz-flex-1" @click="saveSettings">
165
+ <MazIcon name="check" class="maz-mr-2" />
166
+ Save Changes
167
+ </MazBtn>
168
+ <MazBtn color="secondary" @click="isUserOpen = false">
169
+ Cancel
170
+ </MazBtn>
171
+ </div>
172
+ </div>
173
+ </MazBottomSheet>
174
+
175
+ <template #code>
176
+
177
+ ```vue
178
+ <template>
179
+ <div class="maz-flex maz-flex-col maz-gap-4">
180
+ <!-- Product Card -->
181
+ <MazCard>
182
+ <template #title>
183
+ <div class="maz-flex maz-items-center maz-gap-3">
184
+ <MazAvatar src="https://images.unsplash.com/photo-1542291026-7eec264c27ff?w=100" size="lg" />
185
+ <div>
186
+ <h3 class="maz-text-lg maz-font-semibold">
187
+ Nike Air Max
188
+ </h3>
189
+ <p class="maz-text-sm maz-text-muted">
190
+ Premium Running Shoes
191
+ </p>
192
+ </div>
193
+ </div>
194
+ </template>
195
+
196
+ <div class="maz-space-y-4">
197
+ <div class="maz-flex maz-items-center maz-justify-between">
198
+ <span class="maz-font-medium">Price:</span>
199
+ <span class="maz-text-xl maz-font-bold maz-text-primary">$129.99</span>
200
+ </div>
201
+
202
+ <div class="maz-flex maz-gap-2">
203
+ <MazBtn color="primary" @click="openProductOptions">
204
+ Customize Options
205
+ </MazBtn>
206
+ <MazBtn color="secondary" @click="openUserSettings">
207
+ Profile Settings
208
+ </MazBtn>
209
+ </div>
210
+ </div>
211
+ </MazCard>
212
+ </div>
213
+
214
+ <!-- Product Options Bottom Sheet -->
215
+ <MazBottomSheet v-model="isProductOpen" title="Customize Your Shoes">
216
+ <div class="maz-space-y-6 maz-p-6">
217
+ <!-- Size Selection -->
218
+ <div>
219
+ <h4 class="maz-mb-3 maz-text-lg maz-font-semibold">
220
+ Select Size
221
+ </h4>
222
+ <div class="maz-grid maz-grid-cols-4 maz-gap-2">
223
+ <MazBtn
224
+ v-for="size in sizes"
225
+ :key="size"
226
+ :color="selectedOptions.size === size ? 'primary' : 'secondary'"
227
+ size="sm"
228
+ @click="selectedOptions.size = size"
229
+ >
230
+ {{ size }}
231
+ </MazBtn>
232
+ </div>
233
+ </div>
234
+
235
+ <!-- Color Selection with Visual Swatches -->
236
+ <div>
237
+ <h4 class="maz-mb-3 maz-text-lg maz-font-semibold">
238
+ Select Color
239
+ </h4>
240
+ <div class="maz-grid maz-grid-cols-3 maz-gap-3">
241
+ <div
242
+ v-for="color in colors"
243
+ :key="color.name"
244
+ class="maz-flex maz-cursor-pointer maz-flex-col maz-items-center maz-rounded-lg maz-border-2 maz-p-3"
245
+ :class="selectedOptions.color === color.name ? 'maz-border-primary' : 'maz-border-border'"
246
+ @click="selectedOptions.color = color.name"
247
+ >
248
+ <div
249
+ class="maz-mb-2 maz-size-8 maz-rounded-full"
250
+ :style="{ backgroundColor: color.value }"
251
+ />
252
+ <span class="maz-text-sm">{{ color.name }}</span>
253
+ </div>
254
+ </div>
255
+ </div>
256
+
257
+ <!-- Quantity Input -->
258
+ <MazInputNumber
259
+ v-model="quantity"
260
+ label="Quantity"
261
+ :min="1"
262
+ :max="10"
263
+ />
264
+
265
+ <!-- Actions -->
266
+ <div class="maz-flex maz-gap-3 maz-pt-4">
267
+ <MazBtn color="primary" class="maz-flex-1" @click="addToCart">
268
+ Add to Cart (${{ (129.99 * quantity).toFixed(2) }})
269
+ </MazBtn>
270
+ <MazBtn color="secondary" @click="isProductOpen = false">
271
+ Cancel
272
+ </MazBtn>
273
+ </div>
274
+ </div>
275
+ </MazBottomSheet>
276
+
277
+ <MazBottomSheet v-model="isUserOpen" title="Profile Settings">
278
+ <div class="maz-space-y-6 maz-p-6">
279
+ <div class="maz-flex maz-items-center maz-gap-4 maz-p-4 maz-bg-secondary/10 maz-rounded-lg">
280
+ <MazAvatar src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=100" size="xl" />
281
+ <div>
282
+ <h4 class="maz-font-semibold">John Doe</h4>
283
+ <p class="maz-text-muted maz-text-sm">john.doe@example.com</p>
284
+ <MazBadge color="success" size="xs">Premium Member</MazBadge>
285
+ </div>
286
+ </div>
287
+ <div class="maz-space-y-4">
288
+ <MazInput
289
+ v-model="userForm.name"
290
+ label="Full Name"
291
+ placeholder="Enter your name"
292
+ />
293
+ <MazInput
294
+ v-model="userForm.email"
295
+ label="Email"
296
+ type="email"
297
+ placeholder="Enter your email"
298
+ />
299
+ <MazSelect
300
+ v-model="userForm.country"
301
+ label="Country"
302
+ :options="countries"
303
+ placeholder="Select your country"
304
+ />
305
+ <div class="maz-flex maz-items-center maz-justify-between maz-p-4 maz-border maz-border-border maz-rounded-lg">
306
+ <div>
307
+ <p class="maz-font-medium">Email Notifications</p>
308
+ <p class="maz-text-sm maz-text-muted">Receive updates about your orders</p>
309
+ </div>
310
+ <MazSwitch v-model="userForm.notifications" />
311
+ </div>
312
+ <div class="maz-flex maz-items-center maz-justify-between maz-p-4 maz-border maz-border-border maz-rounded-lg">
313
+ <div>
314
+ <p class="maz-font-medium">Dark Mode</p>
315
+ <p class="maz-text-sm maz-text-muted">Switch to dark theme</p>
316
+ </div>
317
+ <MazSwitch v-model="userForm.darkMode" />
318
+ </div>
319
+ </div>
320
+ <div class="maz-flex maz-gap-3 maz-pt-4">
321
+ <MazBtn color="primary" class="maz-flex-1" @click="saveSettings">
322
+ <MazIcon name="check" class="maz-mr-2" />
323
+ Save Changes
324
+ </MazBtn>
325
+ <MazBtn color="secondary" @click="isUserOpen = false">
326
+ Cancel
327
+ </MazBtn>
328
+ </div>
329
+ </div>
330
+ </MazBottomSheet>
331
+ </template>
332
+ ```
333
+
334
+ </template>
335
+ </ComponentDemo>
336
+
337
+ <!--@include: ./../../.vitepress/generated-docs/maz-bottom-sheet.doc.md-->
338
+
339
+ <script setup>
340
+ import { ref, reactive } from 'vue'
341
+
342
+ const isProductOpen = ref(false)
343
+ const isUserOpen = ref(false)
344
+ const quantity = ref(1)
345
+
346
+ const selectedOptions = reactive({
347
+ size: '',
348
+ color: ''
349
+ })
350
+
351
+ const userForm = reactive({
352
+ name: 'John Doe',
353
+ email: 'john.doe@example.com',
354
+ country: 'US',
355
+ notifications: true,
356
+ darkMode: false
357
+ })
358
+
359
+ const sizes = ['7', '8', '9', '10', '11', '12']
360
+ const colors = [
361
+ { name: 'Black', value: '#000000' },
362
+ { name: 'White', value: '#FFFFFF' },
363
+ { name: 'Red', value: '#EF4444' },
364
+ { name: 'Blue', value: '#3B82F6' },
365
+ { name: 'Green', value: '#10B981' },
366
+ { name: 'Purple', value: '#8B5CF6' }
367
+ ]
368
+
369
+ const countries = [
370
+ { label: 'United States', value: 'US' },
371
+ { label: 'Canada', value: 'CA' },
372
+ { label: 'United Kingdom', value: 'UK' },
373
+ { label: 'France', value: 'FR' },
374
+ { label: 'Germany', value: 'DE' }
375
+ ]
376
+
377
+ function openProductOptions() {
378
+ isProductOpen.value = true
379
+ }
380
+
381
+ function openUserSettings() {
382
+ isUserOpen.value = true
383
+ }
384
+
385
+ function addToCart() {
386
+ if (!selectedOptions.size || !selectedOptions.color) {
387
+ alert('Please select size and color first!')
388
+ return
389
+ }
390
+ alert(`Added ${quantity.value} ${selectedOptions.color} shoes (size ${selectedOptions.size}) to cart!`)
391
+ isProductOpen.value = false
392
+ }
393
+
394
+ function saveSettings() {
395
+ alert('Settings saved successfully!')
396
+ isUserOpen.value = false
397
+ }
398
+ </script>