@maz-ui/mcp 5.0.0-beta.5 → 5.0.0-beta.51

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 (164) hide show
  1. package/README.md +1 -1
  2. package/dist/mcp.d.mts +22 -9
  3. package/dist/mcp.d.ts +22 -9
  4. package/dist/mcp.mjs +160 -83
  5. package/docs/generated-docs/maz-avatar.doc.md +30 -30
  6. package/docs/generated-docs/maz-bottom-sheet.doc.md +16 -13
  7. package/docs/generated-docs/maz-btn.doc.md +21 -19
  8. package/docs/generated-docs/maz-checkbox.doc.md +16 -17
  9. package/docs/generated-docs/maz-circular-progress-bar.doc.md +1 -1
  10. package/docs/generated-docs/maz-code-highlight.doc.md +11 -0
  11. package/docs/generated-docs/maz-container.doc.md +1 -0
  12. package/docs/generated-docs/maz-date-picker.doc.md +41 -41
  13. package/docs/generated-docs/maz-drawer.doc.md +7 -8
  14. package/docs/generated-docs/maz-dropdown.doc.md +3 -0
  15. package/docs/generated-docs/maz-expand-animation.doc.md +4 -4
  16. package/docs/generated-docs/maz-fullscreen-loader.doc.md +5 -5
  17. package/docs/generated-docs/maz-gallery.doc.md +15 -15
  18. package/docs/generated-docs/maz-input-code.doc.md +16 -16
  19. package/docs/generated-docs/maz-input-phone-number.doc.md +43 -42
  20. package/docs/generated-docs/maz-input-price.doc.md +14 -14
  21. package/docs/generated-docs/maz-input-tags.doc.md +16 -16
  22. package/docs/generated-docs/maz-input.doc.md +33 -33
  23. package/docs/generated-docs/maz-lazy-img.doc.md +14 -14
  24. package/docs/generated-docs/maz-loading-bar.doc.md +4 -4
  25. package/docs/generated-docs/maz-markdown-editor.doc.md +65 -0
  26. package/docs/generated-docs/maz-popover.doc.md +1 -1
  27. package/docs/generated-docs/maz-pull-to-refresh.doc.md +39 -20
  28. package/docs/generated-docs/maz-radio-buttons.doc.md +17 -17
  29. package/docs/generated-docs/maz-radio.doc.md +16 -16
  30. package/docs/generated-docs/maz-reading-progress-bar.doc.md +4 -4
  31. package/docs/generated-docs/maz-select-country.doc.md +27 -26
  32. package/docs/generated-docs/maz-sidebar-content.doc.md +5 -0
  33. package/docs/generated-docs/maz-sidebar-footer.doc.md +5 -0
  34. package/docs/generated-docs/maz-sidebar-group.doc.md +11 -0
  35. package/docs/generated-docs/maz-sidebar-header.doc.md +5 -0
  36. package/docs/generated-docs/maz-sidebar-menu-button.doc.md +27 -0
  37. package/docs/generated-docs/maz-sidebar-menu-item.doc.md +5 -0
  38. package/docs/generated-docs/maz-sidebar-menu-sub.doc.md +16 -0
  39. package/docs/generated-docs/maz-sidebar-menu.doc.md +5 -0
  40. package/docs/generated-docs/maz-sidebar-separator.doc.md +0 -0
  41. package/docs/generated-docs/maz-sidebar-trigger.doc.md +5 -0
  42. package/docs/generated-docs/maz-sidebar.doc.md +36 -0
  43. package/docs/generated-docs/maz-slider.doc.md +1 -1
  44. package/docs/generated-docs/maz-spinner.doc.md +4 -4
  45. package/docs/generated-docs/maz-switch.doc.md +14 -14
  46. package/docs/generated-docs/maz-table-virtualizer.doc.md +20 -0
  47. package/docs/generated-docs/maz-table.doc.md +43 -37
  48. package/docs/generated-docs/maz-tabs-bar.doc.md +20 -9
  49. package/docs/generated-docs/maz-tabs.doc.md +6 -3
  50. package/docs/generated-docs/maz-textarea.doc.md +27 -25
  51. package/docs/generated-docs/maz-ticker.doc.md +1 -1
  52. package/docs/generated-docs/maz-timeline.doc.md +4 -4
  53. package/docs/generated-docs/maz-window-mockup.doc.md +23 -0
  54. package/docs/src/blog/v4.md +1 -1
  55. package/docs/src/blog/v5.md +5 -7
  56. package/docs/src/components/maz-avatar.md +52 -4
  57. package/docs/src/components/maz-bottom-sheet.md +300 -169
  58. package/docs/src/components/maz-btn.md +1 -1
  59. package/docs/src/components/maz-checklist.md +10 -10
  60. package/docs/src/components/maz-code-highlight.md +233 -0
  61. package/docs/src/components/maz-date-picker.md +55 -1
  62. package/docs/src/components/maz-dialog.md +46 -0
  63. package/docs/src/components/maz-dropdown.md +32 -16
  64. package/docs/src/components/maz-icon.md +16 -5
  65. package/docs/src/components/maz-input-phone-number.md +30 -0
  66. package/docs/src/components/maz-lazy-img.md +64 -0
  67. package/docs/src/components/maz-markdown-editor.md +369 -0
  68. package/docs/src/components/maz-pull-to-refresh.md +176 -17
  69. package/docs/src/components/maz-select-country.md +138 -1
  70. package/docs/src/components/maz-sidebar.md +719 -0
  71. package/docs/src/components/maz-table.md +156 -1
  72. package/docs/src/components/maz-tabs.md +110 -3
  73. package/docs/src/components/maz-textarea.md +58 -0
  74. package/docs/src/components/maz-timeline.md +60 -0
  75. package/docs/src/components/maz-window-mockup.md +249 -0
  76. package/docs/src/composables/use-drag.md +239 -0
  77. package/docs/src/composables/use-form-validator.md +297 -16
  78. package/docs/src/composables/use-pull-to-refresh.md +79 -0
  79. package/docs/src/composables/use-swipe.md +26 -11
  80. package/docs/src/directives/click-outside.md +8 -15
  81. package/docs/src/directives/fullscreen-img.md +1 -1
  82. package/docs/src/directives/lazy-img.md +44 -11
  83. package/docs/src/directives/tooltip.md +24 -1
  84. package/docs/src/directives/zoom-img.md +1 -1
  85. package/docs/src/ecosystem/eslint-config.md +95 -1
  86. package/docs/src/{guide/icons.md → ecosystem/icons/index.md} +1 -1
  87. package/docs/src/ecosystem/node/exec-promise.md +87 -0
  88. package/docs/src/ecosystem/node/index.md +53 -0
  89. package/docs/src/ecosystem/node/logger.md +146 -0
  90. package/docs/src/ecosystem/node/print-banner.md +93 -0
  91. package/docs/src/{guide → ecosystem}/nuxt.md +102 -47
  92. package/docs/src/{guide → ecosystem}/themes.md +152 -71
  93. package/docs/src/{guide → ecosystem}/translations.md +1 -1
  94. package/docs/src/ecosystem/utils/camel-case.md +31 -0
  95. package/docs/src/{helpers → ecosystem/utils}/capitalize.md +2 -3
  96. package/docs/src/ecosystem/utils/check-availability.md +79 -0
  97. package/docs/src/ecosystem/utils/cookie.md +80 -0
  98. package/docs/src/ecosystem/utils/debounce-callback.md +38 -0
  99. package/docs/src/ecosystem/utils/debounce-id.md +69 -0
  100. package/docs/src/ecosystem/utils/debounce.md +65 -0
  101. package/docs/src/ecosystem/utils/fetch-locale-ip.md +33 -0
  102. package/docs/src/ecosystem/utils/format-json.md +33 -0
  103. package/docs/src/ecosystem/utils/format-phone-number.md +37 -0
  104. package/docs/src/ecosystem/utils/get-browser-locale.md +29 -0
  105. package/docs/src/ecosystem/utils/get-error-message.md +39 -0
  106. package/docs/src/ecosystem/utils/idle-timeout.md +90 -0
  107. package/docs/src/ecosystem/utils/index.md +60 -0
  108. package/docs/src/ecosystem/utils/is-client.md +32 -0
  109. package/docs/src/ecosystem/utils/is-equal.md +38 -0
  110. package/docs/src/ecosystem/utils/is-server.md +31 -0
  111. package/docs/src/ecosystem/utils/is-standalone-mode.md +43 -0
  112. package/docs/src/ecosystem/utils/kebab-case.md +36 -0
  113. package/docs/src/ecosystem/utils/normalize-string.md +77 -0
  114. package/docs/src/ecosystem/utils/pascal-case.md +35 -0
  115. package/docs/src/ecosystem/utils/script-loader.md +77 -0
  116. package/docs/src/ecosystem/utils/sleep.md +59 -0
  117. package/docs/src/ecosystem/utils/snake-case.md +36 -0
  118. package/docs/src/ecosystem/utils/swipe-handler.md +91 -0
  119. package/docs/src/ecosystem/utils/textarea-autogrow.md +41 -0
  120. package/docs/src/ecosystem/utils/throttle-id.md +48 -0
  121. package/docs/src/ecosystem/utils/throttle.md +57 -0
  122. package/docs/src/ecosystem/utils/truthy-filter.md +31 -0
  123. package/docs/src/ecosystem/utils/types/deep-key-of.md +48 -0
  124. package/docs/src/ecosystem/utils/types/deep-partial.md +42 -0
  125. package/docs/src/ecosystem/utils/types/deep-required.md +39 -0
  126. package/docs/src/ecosystem/utils/types/flatten-object-keys.md +44 -0
  127. package/docs/src/ecosystem/utils/types/generic-instance-type.md +42 -0
  128. package/docs/src/ecosystem/utils/types/infer-maybe-ref.md +35 -0
  129. package/docs/src/ecosystem/utils/upper-first.md +32 -0
  130. package/docs/src/ecosystem/utils/user-visibility.md +69 -0
  131. package/docs/src/guide/getting-started.md +15 -13
  132. package/docs/src/guide/global-defaults.md +102 -0
  133. package/docs/src/guide/maz-ui-provider.md +6 -3
  134. package/docs/src/guide/migration-v4.md +13 -9
  135. package/docs/src/guide/migration-v5.md +211 -15
  136. package/docs/src/guide/resolvers.md +8 -8
  137. package/docs/src/guide/tailwind.md +4 -0
  138. package/docs/src/guide/vue.md +4 -4
  139. package/docs/src/index.md +13 -13
  140. package/docs/src/plugins/aos.md +1 -1
  141. package/package.json +11 -10
  142. package/docs/src/helpers/camel-case.md +0 -14
  143. package/docs/src/helpers/check-availability.md +0 -14
  144. package/docs/src/helpers/debounce-callback.md +0 -14
  145. package/docs/src/helpers/debounce-id.md +0 -14
  146. package/docs/src/helpers/debounce.md +0 -14
  147. package/docs/src/helpers/is-client.md +0 -14
  148. package/docs/src/helpers/is-equal.md +0 -14
  149. package/docs/src/helpers/is-standalone-mode.md +0 -14
  150. package/docs/src/helpers/kebab-case.md +0 -14
  151. package/docs/src/helpers/normalize-string.md +0 -14
  152. package/docs/src/helpers/pascal-case.md +0 -14
  153. package/docs/src/helpers/script-loader.md +0 -14
  154. package/docs/src/helpers/sleep.md +0 -14
  155. package/docs/src/helpers/snake-case.md +0 -14
  156. package/docs/src/helpers/throttle-id.md +0 -14
  157. package/docs/src/helpers/throttle.md +0 -14
  158. /package/docs/src/{guide → ecosystem/icons}/icon-set.md +0 -0
  159. /package/docs/src/{guide → ecosystem}/mcp.md +0 -0
  160. /package/docs/src/{helpers → ecosystem/utils}/country-code-to-unicode-flag.md +0 -0
  161. /package/docs/src/{helpers → ecosystem/utils}/currency.md +0 -0
  162. /package/docs/src/{helpers → ecosystem/utils}/date.md +0 -0
  163. /package/docs/src/{helpers → ecosystem/utils}/get-country-flag-url.md +0 -0
  164. /package/docs/src/{helpers → ecosystem/utils}/number.md +0 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: MazBottomSheet
3
- description: MazBottomSheet is a standalone component like a simple dialog but at the bottom of screen. Useful for mobile UX.
3
+ description: MazBottomSheet is a standalone component like a simple dialog but anchored at the bottom of the screen. Full-width on mobile and constrained/centered on desktop, with a header (icon, title, close button), a footer and many replaceable slots. Useful for mobile UX.
4
4
  ---
5
5
 
6
6
  # {{ $frontmatter.title }}
@@ -10,14 +10,250 @@ description: MazBottomSheet is a standalone component like a simple dialog but a
10
10
  <!--@include: ./../../.vitepress/mixins/getting-started.md-->
11
11
 
12
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
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 (`persistent`, `closeOnEscape`, etc.)
14
14
  :::
15
15
 
16
- ## Interactive Demo
16
+ ## Basic usage
17
+
18
+ The sheet has a header (with the `title` and a close button) and an optional `footer` slot. It opens full-width on mobile and is constrained/centered on desktop (see [Max width](#max-width)).
19
+
20
+ <ComponentDemo expanded>
21
+ <MazBtn @click="basicOpened = true">Open Bottom Sheet</MazBtn>
22
+
23
+ <MazBottomSheet v-model="basicOpened" title="Bottom Sheet Title">
24
+ <p>Your content goes here.</p>
25
+ <template #footer="{ close }">
26
+ <MazBtn color="transparent" @click="close">Cancel</MazBtn>
27
+ <MazBtn @click="close">Confirm</MazBtn>
28
+ </template>
29
+ </MazBottomSheet>
30
+
31
+ <template #code>
32
+
33
+ ```vue
34
+ <script setup>
35
+ import MazBottomSheet from 'maz-ui/components/MazBottomSheet'
36
+ import { ref } from 'vue'
37
+
38
+ const basicOpened = ref(false)
39
+ </script>
40
+
41
+ <template>
42
+ <MazBtn @click="basicOpened = true">
43
+ Open Bottom Sheet
44
+ </MazBtn>
45
+
46
+ <MazBottomSheet v-model="basicOpened" title="Bottom Sheet Title">
47
+ <p>Your content goes here.</p>
48
+
49
+ <template #footer="{ close }">
50
+ <MazBtn color="transparent" @click="close">
51
+ Cancel
52
+ </MazBtn>
53
+ <MazBtn @click="close">
54
+ Confirm
55
+ </MazBtn>
56
+ </template>
57
+ </MazBottomSheet>
58
+ </template>
59
+ ```
60
+
61
+ </template>
62
+ </ComponentDemo>
63
+
64
+ ## Swipe to close (iOS-like)
65
+
66
+ By default a drag handle (grab bar) is shown at the top of the sheet, and you can **close the sheet by dragging that handle down** - the sheet follows your pointer and either dismisses (past the threshold) or snaps back. This works with both touch and mouse.
67
+
68
+ Disable it with `:swipe-to-close="false"` (the handle is then hidden too), or replace the handle with the `#handle` slot. A `persistent` sheet never dismisses on swipe: it snaps back instead.
69
+
70
+ <ComponentDemo>
71
+ <MazBtn @click="swipeOpened = true">Open swipeable sheet</MazBtn>
72
+
73
+ <MazBottomSheet v-model="swipeOpened" title="Drag me down">
74
+ <p>Grab the bar at the top and drag down to close, or release before the threshold to snap back.</p>
75
+ </MazBottomSheet>
76
+
77
+ <template #code>
78
+
79
+ ```html
80
+ <!-- enabled by default -->
81
+ <MazBottomSheet v-model="swipeOpened" title="Drag me down">
82
+ <p>Grab the bar at the top and drag down to close.</p>
83
+ </MazBottomSheet>
84
+
85
+ <!-- disable the handle and the gesture -->
86
+ <MazBottomSheet v-model="swipeOpened" :swipe-to-close="false" title="No swipe" />
87
+
88
+ <!-- custom handle -->
89
+ <MazBottomSheet v-model="swipeOpened" title="Custom handle">
90
+ <template #handle>
91
+ <span class="maz:h-1.5 maz:w-12 maz:rounded-full maz:bg-primary" />
92
+ </template>
93
+ </MazBottomSheet>
94
+ ```
95
+
96
+ </template>
97
+ </ComponentDemo>
98
+
99
+ ## Header with an icon
100
+
101
+ Pass an `icon` (an icon value or a full `MazIconProps` object) to display it on the left of the title.
102
+
103
+ <ComponentDemo>
104
+ <MazBtn @click="iconOpened = true">Open with icon</MazBtn>
105
+
106
+ <MazBottomSheet v-model="iconOpened" title="Notifications" icon="/bell.svg">
107
+ <p>You have 3 new notifications.</p>
108
+ <template #footer="{ close }">
109
+ <MazBtn @click="close">Mark all as read</MazBtn>
110
+ </template>
111
+ </MazBottomSheet>
112
+
113
+ <template #code>
114
+
115
+ ```html
116
+ <MazBottomSheet v-model="iconOpened" title="Notifications" icon="/bell.svg">
117
+ <p>You have 3 new notifications.</p>
118
+
119
+ <template #footer="{ close }">
120
+ <MazBtn @click="close">Mark all as read</MazBtn>
121
+ </template>
122
+ </MazBottomSheet>
123
+ ```
124
+
125
+ </template>
126
+ </ComponentDemo>
127
+
128
+ ## Replaceable slots
129
+
130
+ Everything in the header is replaceable: use `#icon` and `#title` to customize parts of the default header, or `#header` to replace the whole header (you get the `close` function as a binding).
131
+
132
+ <ComponentDemo>
133
+ <MazBtn @click="slotsOpened = true">Open custom header</MazBtn>
134
+
135
+ <MazBottomSheet v-model="slotsOpened">
136
+ <template #icon>
137
+ <MazAvatar src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=100" size="sm" />
138
+ </template>
139
+ <template #title>
140
+ <span class="maz:text-primary">Custom title</span>
141
+ </template>
142
+ <p>The icon and the title slots are fully replaceable.</p>
143
+ </MazBottomSheet>
144
+
145
+ <template #code>
146
+
147
+ ```html
148
+ <MazBottomSheet v-model="slotsOpened">
149
+ <template #icon>
150
+ <MazAvatar src="/avatar.jpg" size="sm" />
151
+ </template>
152
+
153
+ <template #title>
154
+ <span class="maz:text-primary">Custom title</span>
155
+ </template>
156
+
157
+ <p>The icon and the title slots are fully replaceable.</p>
158
+ </MazBottomSheet>
159
+
160
+ <!-- or replace the whole header -->
161
+ <MazBottomSheet v-model="slotsOpened">
162
+ <template #header="{ close }">
163
+ <div class="maz:flex maz:items-center maz:justify-between maz:p-4">
164
+ <strong>My header</strong>
165
+ <MazBtn size="sm" color="transparent" @click="close">Close</MazBtn>
166
+ </div>
167
+ </template>
168
+ </MazBottomSheet>
169
+ ```
170
+
171
+ </template>
172
+ </ComponentDemo>
173
+
174
+ ## Max width
175
+
176
+ On mobile the sheet is always **full-width**. From the tablet breakpoint and up, it is **constrained** to `max-width` and centered horizontally. The default `max-width` is `35rem`; pass the `max-width` prop (a [`MazSizeUnit`](#props)) to override it.
177
+
178
+ <ComponentDemo>
179
+ <MazBtn @click="wideOpened = true">Open wide sheet</MazBtn>
180
+
181
+ <MazBottomSheet v-model="wideOpened" title="Wide sheet" max-width="60rem">
182
+ <p>This sheet is constrained to 60rem on desktop and full-width on mobile.</p>
183
+ </MazBottomSheet>
184
+
185
+ <template #code>
186
+
187
+ ```html
188
+ <MazBottomSheet v-model="wideOpened" title="Wide sheet" max-width="60rem">
189
+ <p>This sheet is constrained to 60rem on desktop and full-width on mobile.</p>
190
+ </MazBottomSheet>
191
+ ```
192
+
193
+ </template>
194
+ </ComponentDemo>
195
+
196
+ ## Without header
197
+
198
+ Hide the whole header with `hide-header`, or only the close button with `hide-close-button`.
199
+
200
+ <ComponentDemo>
201
+ <MazBtn @click="noHeaderOpened = true">Open without header</MazBtn>
202
+
203
+ <MazBottomSheet v-model="noHeaderOpened" hide-header>
204
+ <div class="maz:flex maz:flex-col maz:gap-3 maz:text-center">
205
+ <p>No header here, you control the whole layout.</p>
206
+ <MazBtn @click="noHeaderOpened = false">Got it</MazBtn>
207
+ </div>
208
+ </MazBottomSheet>
209
+
210
+ <template #code>
211
+
212
+ ```html
213
+ <MazBottomSheet v-model="noHeaderOpened" hide-header>
214
+ <div class="maz:flex maz:flex-col maz:gap-3 maz:text-center">
215
+ <p>No header here, you control the whole layout.</p>
216
+ <MazBtn @click="noHeaderOpened = false">Got it</MazBtn>
217
+ </div>
218
+ </MazBottomSheet>
219
+ ```
220
+
221
+ </template>
222
+ </ComponentDemo>
223
+
224
+ ## Persistent
225
+
226
+ A `persistent` sheet cannot be closed by clicking outside or pressing escape, and the close button is removed. Provide your own action to close it.
227
+
228
+ <ComponentDemo>
229
+ <MazBtn @click="persistentOpened = true">Open persistent sheet</MazBtn>
230
+
231
+ <MazBottomSheet v-model="persistentOpened" title="Action required" icon="/exclamation-triangle.svg" persistent>
232
+ <p>You must confirm before closing this sheet.</p>
233
+ <template #footer>
234
+ <MazBtn @click="persistentOpened = false">I understand</MazBtn>
235
+ </template>
236
+ </MazBottomSheet>
237
+
238
+ <template #code>
239
+
240
+ ```html
241
+ <MazBottomSheet v-model="persistentOpened" title="Action required" persistent>
242
+ <p>You must confirm before closing this sheet.</p>
243
+
244
+ <template #footer>
245
+ <MazBtn @click="persistentOpened = false">I understand</MazBtn>
246
+ </template>
247
+ </MazBottomSheet>
248
+ ```
249
+
250
+ </template>
251
+ </ComponentDemo>
252
+
253
+ ## Full example
17
254
 
18
255
  <ComponentDemo expanded>
19
256
  <div class="maz:flex maz:flex-col maz:gap-4">
20
- <!-- Product Selection Demo -->
21
257
  <MazCard>
22
258
  <template #title>
23
259
  <div class="maz:flex maz:items-center maz:gap-3">
@@ -60,9 +296,8 @@ This component uses the `<Teleport to="body">` with [MazBackdrop](./maz-backdrop
60
296
  </div>
61
297
  </MazCard>
62
298
  </div>
63
- <MazBottomSheet v-model="isProductOpen" title="Customize Your Shoes">
299
+ <MazBottomSheet v-model="isProductOpen" title="Customize Your Shoes" icon="/cog.svg" :padding="false">
64
300
  <div class="maz:space-y-6 maz:p-6">
65
- <!-- Size Selection -->
66
301
  <div>
67
302
  <h4 class="maz:text-lg maz:font-semibold maz:mb-3">Select Size</h4>
68
303
  <div class="maz:grid maz:grid-cols-4 maz:gap-2">
@@ -103,19 +338,17 @@ This component uses the `<Teleport to="body">` with [MazBackdrop](./maz-backdrop
103
338
  :max="10"
104
339
  />
105
340
  </div>
106
- <div class="maz:flex maz:gap-3 maz:pt-4">
107
- <MazBtn color="primary" class="maz:flex-1" @click="addToCart">
108
- <MazIcon icon="/shopping-cart.svg" class="maz:me-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
341
  </div>
342
+ <template #footer="{ close }">
343
+ <MazBtn color="transparent" @click="close">Cancel</MazBtn>
344
+ <MazBtn color="primary" @click="addToCart">
345
+ <MazIcon icon="/shopping-cart.svg" class="maz:me-2" />
346
+ Add to Cart (${{ (129.99 * quantity).toFixed(2) }})
347
+ </MazBtn>
348
+ </template>
116
349
  </MazBottomSheet>
117
350
 
118
- <MazBottomSheet v-model="isUserOpen" title="Profile Settings">
351
+ <MazBottomSheet v-model="isUserOpen" title="Profile Settings" icon="/user.svg" max-width="48rem" :padding="false">
119
352
  <div class="maz:space-y-6 maz:p-6">
120
353
  <div class="maz:flex maz:items-center maz:gap-4 maz:p-4 maz:bg-secondary/10 maz:rounded-lg">
121
354
  <MazAvatar src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=100" size="xl" />
@@ -160,173 +393,63 @@ This component uses the `<Teleport to="body">` with [MazBackdrop](./maz-backdrop
160
393
  <MazSwitch v-model="userForm.darkMode" />
161
394
  </div>
162
395
  </div>
163
- <div class="maz:flex maz:gap-3 maz:pt-4">
164
- <MazBtn color="primary" class="maz:flex-1" @click="saveSettings">
165
- <MazIcon icon="/check.svg" class="maz:me-2" />
166
- Save Changes
167
- </MazBtn>
168
- <MazBtn color="secondary" @click="isUserOpen = false">
169
- Cancel
170
- </MazBtn>
171
- </div>
172
396
  </div>
397
+ <template #footer="{ close }">
398
+ <MazBtn color="transparent" @click="close">Cancel</MazBtn>
399
+ <MazBtn color="primary" @click="saveSettings">
400
+ <MazIcon icon="/check.svg" class="maz:me-2" />
401
+ Save Changes
402
+ </MazBtn>
403
+ </template>
173
404
  </MazBottomSheet>
174
405
 
175
406
  <template #code>
176
407
 
177
408
  ```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>
409
+ <script setup>
410
+ import MazBottomSheet from 'maz-ui/components/MazBottomSheet'
411
+ import { reactive, ref } from 'vue'
213
412
 
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>
413
+ const isProductOpen = ref(false)
414
+ const quantity = ref(1)
415
+ const selectedOptions = reactive({ size: '', color: '' })
234
416
 
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-divider'"
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>
417
+ function openProductOptions() {
418
+ isProductOpen.value = true
419
+ }
420
+ </script>
256
421
 
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>
422
+ <template>
423
+ <MazBtn color="primary" @click="openProductOptions">
424
+ Customize Options
425
+ </MazBtn>
276
426
 
277
- <MazBottomSheet v-model="isUserOpen" title="Profile Settings">
427
+ <MazBottomSheet v-model="isProductOpen" title="Customize Your Shoes" icon="/cog.svg" :padding="false">
278
428
  <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-divider 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-divider 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 icon="/check.svg" class="maz:me-2" />
323
- Save Changes
324
- </MazBtn>
325
- <MazBtn color="secondary" @click="isUserOpen = false">
326
- Cancel
429
+ <h4 class="maz:mb-3 maz:text-lg maz:font-semibold">
430
+ Select Size
431
+ </h4>
432
+ <div class="maz:grid maz:grid-cols-4 maz:gap-2">
433
+ <MazBtn
434
+ v-for="size in sizes"
435
+ :key="size"
436
+ :color="selectedOptions.size === size ? 'primary' : 'secondary'"
437
+ size="sm"
438
+ @click="selectedOptions.size = size"
439
+ >
440
+ {{ size }}
327
441
  </MazBtn>
328
442
  </div>
329
443
  </div>
444
+
445
+ <template #footer="{ close }">
446
+ <MazBtn color="transparent" @click="close">
447
+ Cancel
448
+ </MazBtn>
449
+ <MazBtn color="primary" @click="addToCart">
450
+ Add to Cart (${{ (129.99 * quantity).toFixed(2) }})
451
+ </MazBtn>
452
+ </template>
330
453
  </MazBottomSheet>
331
454
  </template>
332
455
  ```
@@ -339,6 +462,14 @@ This component uses the `<Teleport to="body">` with [MazBackdrop](./maz-backdrop
339
462
  <script setup>
340
463
  import { ref, reactive } from 'vue'
341
464
 
465
+ const basicOpened = ref(false)
466
+ const swipeOpened = ref(false)
467
+ const iconOpened = ref(false)
468
+ const slotsOpened = ref(false)
469
+ const wideOpened = ref(false)
470
+ const noHeaderOpened = ref(false)
471
+ const persistentOpened = ref(false)
472
+
342
473
  const isProductOpen = ref(false)
343
474
  const isUserOpen = ref(false)
344
475
  const quantity = ref(1)
@@ -454,7 +454,7 @@ Check out how [MazIcon](./maz-icon.md) works, see all available icons and downlo
454
454
 
455
455
  :::
456
456
 
457
- ### Use [@maz-ui/icons](./../guide/icons.md)
457
+ ### Use [@maz-ui/icons](./../ecosystem/icons/.md)
458
458
 
459
459
  ::: details View code
460
460
 
@@ -163,25 +163,25 @@ You can replace the default search function by providing a custom search functio
163
163
  :search-function="customEmployeeSearch"
164
164
  color="success"
165
165
  elevation
166
- class="max-h-96"
166
+ class="maz:max-h-96"
167
167
  >
168
168
  <template #item="{ item }">
169
- <div class="flex w-full items-center gap-4">
170
- <div class="flex h-12 w-12 flex-none items-center justify-center rounded-full bg-gradient-to-br from-primary-500 to-secondary-500 text-white font-semibold text-lg">
169
+ <div class="maz:flex maz:w-full maz:items-center maz:gap-4">
170
+ <div class="maz:flex maz:h-12 maz:w-12 maz:flex-none maz:items-center maz:justify-center maz:rounded-full maz:bg-linear-to-br maz:from-primary-500 maz:to-secondary-500 maz:text-white maz:font-semibold maz:text-lg">
171
171
  {{ item.initials }}
172
172
  </div>
173
- <div class="flex flex-1 flex-col gap-1">
174
- <div class="flex items-center gap-2">
175
- <span class="font-semibold text-normal">{{ item.label }}</span>
173
+ <div class="maz:flex maz:flex-1 maz:flex-col maz:gap-1">
174
+ <div class="maz:flex maz:items-center maz:gap-2">
175
+ <span class="maz:font-semibold maz:text-normal">{{ item.label }}</span>
176
176
  <MazBadge :color="item.departmentColor" size="xs">
177
177
  {{ item.department }}
178
178
  </MazBadge>
179
179
  </div>
180
- <span class="text-muted text-sm">{{ item.email }}</span>
180
+ <span class="maz:text-muted maz:text-sm">{{ item.email }}</span>
181
181
  </div>
182
- <div class="flex flex-none items-center gap-1">
183
- <MazIcon icon="/star.svg" class="text-warning-500" size="1rem" />
184
- <span class="text-sm font-medium">{{ item.rating }}</span>
182
+ <div class="maz:flex maz:flex-none maz:items-center maz:gap-1">
183
+ <MazIcon icon="/star.svg" class="maz:text-warning-500" size="1rem" />
184
+ <span class="maz:text-sm maz:font-medium">{{ item.rating }}</span>
185
185
  </div>
186
186
  </div>
187
187
  </template>