@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,240 @@
1
+ ---
2
+ title: MazDialogConfirm
3
+ description: MazDialogConfirm is a standalone component that dialogs with the user to show important information and propose confirmation. You should wait for this response with await.
4
+
5
+ ---
6
+
7
+ # {{ $frontmatter.title }}
8
+
9
+ {{ $frontmatter.description }}
10
+
11
+ <!--@include: ./../.vitepress/mixins/getting-started.md-->
12
+
13
+ ::: info
14
+ This component uses [MazDialog](./maz-dialog.md), so it inherits all its props
15
+ :::
16
+
17
+ ::: tip
18
+ This component uses `<Teleport to="body">` with [MazBackdrop](./maz-backdrop.md), so you can implement this component anywhere and it inherits all its props
19
+ :::
20
+
21
+ ## Basic usage
22
+
23
+ <MazBtn @click="askToUser">Ask user</MazBtn>
24
+
25
+ <MazDialogConfirm identifier="one" accept-text="Ok" reject-text="Reject" />
26
+
27
+ <MazDialogConfirm identifier="two" :buttons="buttons">
28
+ <template #title>
29
+ Do you really want to delete this user?
30
+ </template>
31
+ <template #default>
32
+ Are you really sure you want to delete this user?
33
+ </template>
34
+ </MazDialogConfirm>
35
+
36
+ <MazDialog v-model="confirmDialog">
37
+ <template #title>
38
+ User deleted
39
+ </template>
40
+ <template #default>
41
+ User has been deleted!
42
+ </template>
43
+ <template #footer="{ close }">
44
+ <MazBtn @click="close">
45
+ Ok
46
+ </MazBtn>
47
+ </template>
48
+ </MazDialog>
49
+
50
+ ```vue
51
+ <script setup>
52
+ import MazDialogConfirm, { useMazDialogConfirm } from 'maz-ui/components/MazDialogConfirm'
53
+ import MazDialog from 'maz-ui/components/MazDialog'
54
+
55
+ import { ref } from 'vue'
56
+
57
+ const confirmDialog = ref(false)
58
+
59
+ const { showDialogAndWaitChoice, data } = useMazDialogConfirm()
60
+
61
+ data.value = {
62
+ title: 'Delete user',
63
+ message: 'Are you sure you want to delete this user?',
64
+ }
65
+
66
+ const buttons: DialogCustomButton[] = [
67
+ {
68
+ text: 'Cancel',
69
+ type: 'reject',
70
+ color: 'destructive',
71
+ outlined: true,
72
+ response: 'cancel',
73
+ size: 'sm',
74
+ },
75
+ {
76
+ text: 'Delete!',
77
+ type: 'resolve',
78
+ color: 'success',
79
+ response: 'delete',
80
+ size: 'lg',
81
+ },
82
+ ]
83
+
84
+ async function askToUser() {
85
+ try {
86
+ const acceptResponse = await showDialogAndWaitChoice('one')
87
+ toast.success(acceptResponse, {
88
+ position: 'top-right'
89
+ })
90
+ const rejectResponse = await showDialogAndWaitChoice('two')
91
+ toast.success(rejectResponse, {
92
+ position: 'top-right'
93
+ })
94
+ confirmDialog.value = true
95
+ }
96
+ catch (rejectResponse) {
97
+ toast.error(rejectResponse, {
98
+ position: 'top-right'
99
+ })
100
+ }
101
+ }
102
+ </script>
103
+
104
+ <template>
105
+ <MazBtn @click="askToUser">
106
+ Ask user
107
+ </MazBtn>
108
+
109
+ <MazDialogConfirm
110
+ :data="dataPromiseOne"
111
+ identifier="one"
112
+ />
113
+
114
+ <MazDialogConfirm identifier="two" :buttons="buttons">
115
+ <template #title>
116
+ Do you really want to delete this user?
117
+ </template>
118
+ <template #default>
119
+ Are you really sure you want to delete this user?
120
+ </template>
121
+ </MazDialogConfirm>
122
+
123
+ <MazDialog v-model="confirmDialog">
124
+ <template #title>
125
+ User deleted
126
+ </template>
127
+ <template #default>
128
+ User has been deleted!
129
+ </template>
130
+ <template #footer="{ close }">
131
+ <MazBtn @click="close">
132
+ Ok
133
+ </MazBtn>
134
+ </template>
135
+ </MazDialog>
136
+ </template>
137
+ ```
138
+
139
+ ## Types
140
+
141
+ ```ts
142
+ interface MazDialogConfirmData {
143
+ /**
144
+ * Dialog title
145
+ */
146
+ title?: string
147
+ /**
148
+ * Dialog message
149
+ */
150
+ message?: string
151
+ /**
152
+ * Dialog custom buttons
153
+ * @default [{ text: 'Confirm', color: 'success', type: 'accept' }, { text: 'Cancel', color: 'destructive', type: 'reject' }]
154
+ * @type {MazDialogConfirmButton[]}
155
+ */
156
+ buttons?: MazDialogConfirmButton[]
157
+ }
158
+
159
+ // All props of MazBtn
160
+ interface MazDialogConfirmButton {
161
+ text?: string
162
+ block?: boolean
163
+ color?: Color
164
+ disabled?: boolean
165
+ loading?: boolean
166
+ outlined?: boolean
167
+ rounded?: boolean
168
+ size?: Size
169
+ text: string
170
+ type: 'accept' | 'reject'
171
+ response?: unknown
172
+ }
173
+
174
+ type Color = 'primary'
175
+ | 'secondary'
176
+ | 'info'
177
+ | 'success'
178
+ | 'warning'
179
+ | 'destructive'
180
+ | 'accent'
181
+ | 'contrast'
182
+ | 'transparent'
183
+
184
+ type Size = 'mini' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'
185
+ ```
186
+
187
+ <!--@include: ./../../.vitepress/generated-docs/maz-dialog-confirm.doc.md-->
188
+
189
+ <script setup lang="ts">
190
+ import { ref } from 'vue'
191
+ import { useToast } from 'maz-ui/src/composables/useToast'
192
+ import MazDialogConfirm, {
193
+ useMazDialogConfirm, type MazDialogConfirmButton, type MazDialogConfirmData
194
+ } from 'maz-ui/src/components/MazDialogConfirm.vue'
195
+
196
+ const { showDialogAndWaitChoice, data } = useMazDialogConfirm()
197
+ const confirmDialog = ref(false)
198
+ const toast = useToast()
199
+
200
+ async function askToUser () {
201
+ try {
202
+ const acceptResponse = await showDialogAndWaitChoice('one')
203
+ toast.success(acceptResponse, {
204
+ position: 'top-right'
205
+ })
206
+ const rejectResponse = await showDialogAndWaitChoice('two')
207
+ toast.success(rejectResponse, {
208
+ position: 'top-right'
209
+ })
210
+ confirmDialog.value = true
211
+ } catch (rejectResponse) {
212
+ toast.error(rejectResponse, {
213
+ position: 'top-right'
214
+ })
215
+ }
216
+ }
217
+
218
+ data.value = {
219
+ title: 'Delete user',
220
+ message: 'Are you sure you want to delete this user?',
221
+ }
222
+
223
+ const buttons: MazDialogConfirmButton[] = [
224
+ {
225
+ text: 'Cancel',
226
+ type: 'reject',
227
+ color: 'destructive',
228
+ outlined: true,
229
+ response: 'cancel',
230
+ size: 'sm',
231
+ },
232
+ {
233
+ text: 'Delete!',
234
+ type: 'accept',
235
+ color: 'success',
236
+ response: 'delete',
237
+ size: 'lg',
238
+ },
239
+ ]
240
+ </script>
@@ -0,0 +1,208 @@
1
+ ---
2
+ title: MazDialog
3
+ description: MazDialog is a standalone dialog component to show important informations to the user or propose specific action. Many options are available. You can hide the header or the footer, full-size layout, differents states etc.
4
+ ---
5
+
6
+ # {{ $frontmatter.title }}
7
+
8
+ {{ $frontmatter.description }}
9
+
10
+ <!--@include: ./../.vitepress/mixins/getting-started.md-->
11
+
12
+ ::: tip
13
+ This component usex `<Teleport to="body">` with [MazBackdrop](./maz-backdrop.md), so you can implement this component anywhere and it inherits all its props
14
+ :::
15
+
16
+ ## Basic usage
17
+
18
+ <ComponentDemo expanded>
19
+ <MazBtn @click="isOpen = true">Open Dialog</MazBtn>
20
+
21
+ <MazDialog v-model="isOpen" title="Dialog Title">
22
+ <p>
23
+ Your content
24
+ </p>
25
+ <template #footer="{ close }">
26
+ <MazBtn @click="close">
27
+ Confirm
28
+ </MazBtn>
29
+ </template>
30
+ </MazDialog>
31
+
32
+ <template #code>
33
+
34
+ ```vue
35
+ <script setup>
36
+ import { MazDialog } from 'maz-ui/components'
37
+ import { ref } from 'vue'
38
+
39
+ const isOpen = ref(false)
40
+ </script>
41
+
42
+ <template>
43
+ <MazBtn @click="isOpen = true">
44
+ Open Dialog
45
+ </MazBtn>
46
+
47
+ <MazDialog v-model="isOpen" title="Dialog Title">
48
+ <p>
49
+ Your content
50
+ </p>
51
+
52
+ <template #footer="{ close }">
53
+ <MazBtn @click="close">
54
+ Confirm
55
+ </MazBtn>
56
+ </template>
57
+ </MazDialog>
58
+ </template>
59
+ ```
60
+
61
+ </template>
62
+ </ComponentDemo>
63
+
64
+ ## Scrollable
65
+
66
+ For long content, you can enable scrolling in content part (Header and footer slot remain visible at top and bottom)
67
+
68
+ ::: warning
69
+ With this option, an overflow is applied: So, some problems with absolute content may appear - such as `<MazSelect />` opened list can not be visible outside the dialog content part, you should scroll again to show the full content - **Check example below**
70
+ :::
71
+
72
+ <ComponentDemo>
73
+ <MazBtn @click="scollableOpened = true">Open Scrollable Dialog</MazBtn>
74
+
75
+ <MazDialog v-model="scollableOpened" title="Dialog Title" max-height="400px" scrollable>
76
+ <template #title>
77
+ Scrollable Dialog Title
78
+ </template>
79
+ <template #default>
80
+ <p style="padding-bottom: 2rem;">
81
+ Scroll
82
+ </p>
83
+ <p style="padding-bottom: 2rem;">
84
+ Scroll
85
+ </p>
86
+ <p style="padding-bottom: 2rem;">
87
+ Scroll
88
+ </p>
89
+ <p style="padding-bottom: 2rem;">
90
+ Scroll
91
+ </p>
92
+ <p style="padding-bottom: 2rem;">
93
+ Scroll
94
+ </p>
95
+ <p style="padding-bottom: 2rem;">
96
+ Scroll
97
+ </p>
98
+ <p style="padding-bottom: 2rem;">
99
+ Scroll
100
+ </p>
101
+ <p style="padding-bottom: 2rem;">
102
+ Scroll
103
+ </p>
104
+ <p style="padding-bottom: 2rem;">
105
+ Scroll
106
+ </p>
107
+ <p style="padding-bottom: 2rem;">
108
+ Scroll
109
+ </p>
110
+ <p style="padding-bottom: 2rem;">
111
+ Scroll
112
+ </p>
113
+ <p style="padding-bottom: 2rem;">
114
+ Scroll
115
+ </p>
116
+ <p style="padding-bottom: 2rem;">
117
+ Scroll
118
+ </p>
119
+ <p style="padding-bottom: 2rem;">
120
+ Scroll
121
+ </p>
122
+ <p style="padding-bottom: 2rem;">
123
+ Scroll
124
+ </p>
125
+ <p style="padding-bottom: 2rem;">
126
+ Scroll
127
+ </p>
128
+ <p style="padding-bottom: 2rem;">
129
+ Scroll
130
+ </p>
131
+ <p style="padding-bottom: 2rem;">
132
+ Scroll
133
+ </p>
134
+ <p style="padding-bottom: 2rem;">
135
+ Click on the select to open the list
136
+ </p>
137
+ <MazSelect
138
+ :model-value="1"
139
+ :options="[
140
+ { value: 1, label: 1 },
141
+ { value: 2, label: 2 },
142
+ { value: 3, label: 3 },
143
+ { value: 4, label: 4 },
144
+ { value: 5, label: 5 },
145
+ { value: 6, label: 6 },
146
+ ]"
147
+ />
148
+ </template>
149
+ <template #footer>
150
+ <MazBtn @click="scollableOpened = false">
151
+ Confirm
152
+ </MazBtn>
153
+ </template>
154
+ </MazDialog>
155
+
156
+ <template #code>
157
+
158
+ ```html
159
+ <MazDialog v-model="scollableOpened" title="Dialog Title" max-height="400px" scrollable>
160
+ <template #title> Scrollable Dialog Title </template>
161
+
162
+ <template #default>
163
+ <p style="padding-bottom: 2rem">Scroll</p>
164
+ <p style="padding-bottom: 2rem">Scroll</p>
165
+ <p style="padding-bottom: 2rem">Scroll</p>
166
+ <p style="padding-bottom: 2rem">Scroll</p>
167
+ <p style="padding-bottom: 2rem">Scroll</p>
168
+ <p style="padding-bottom: 2rem">Scroll</p>
169
+ <p style="padding-bottom: 2rem">Scroll</p>
170
+ <p style="padding-bottom: 2rem">Scroll</p>
171
+ <p style="padding-bottom: 2rem">Scroll</p>
172
+ <p style="padding-bottom: 2rem">Scroll</p>
173
+ <p style="padding-bottom: 2rem">Scroll</p>
174
+ <p style="padding-bottom: 2rem">Scroll</p>
175
+ <p style="padding-bottom: 2rem">Scroll</p>
176
+ <p style="padding-bottom: 2rem">Scroll</p>
177
+ <p style="padding-bottom: 2rem">Scroll</p>
178
+ <p style="padding-bottom: 2rem">Scroll</p>
179
+ <p style="padding-bottom: 2rem">Scroll</p>
180
+ <p style="padding-bottom: 2rem">Scroll</p>
181
+ <MazSelect
182
+ :model-value="1"
183
+ :options="[
184
+ { value: 1, label: 1 },
185
+ { value: 2, label: 2 },
186
+ { value: 3, label: 3 },
187
+ { value: 4, label: 4 },
188
+ { value: 5, label: 5 },
189
+ { value: 6, label: 6 },
190
+ ]"
191
+ />
192
+ </template>
193
+ <template #footer>
194
+ <MazBtn @click="scollableOpened = false"> Confirm </MazBtn>
195
+ </template>
196
+ </MazDialog>
197
+ ```
198
+
199
+ </template>
200
+ </ComponentDemo>
201
+
202
+ <!--@include: ./../../.vitepress/generated-docs/maz-dialog.doc.md-->
203
+
204
+ <script setup>
205
+ import { ref } from 'vue'
206
+ const isOpen = ref(false)
207
+ const scollableOpened = ref(false)
208
+ </script>
@@ -0,0 +1,177 @@
1
+ ---
2
+ title: MazDrawer
3
+ description: MazDrawer is a standalone component to add a collapsible sidebar at the top and bottom bar
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">` with [MazBackdrop](./maz-backdrop.md), so you can implement this component anywhere and it inherits all its props
14
+ :::
15
+
16
+ ## Basic usage
17
+
18
+ <ComponentDemo expanded>
19
+ <div class="maz-flex maz-flex-col maz-gap-2 maz-flex-center">
20
+ <MazBtn @click="isOpenedTop = !isOpenedTop">
21
+ Open top drawer
22
+ </MazBtn>
23
+ <div class="maz-flex maz-flex-wrap maz-gap-2">
24
+ <MazBtn @click="isOpenedLeft = !isOpenedLeft">
25
+ Open left drawer
26
+ </MazBtn>
27
+ <MazBtn @click="isOpenedRight = !isOpenedRight">
28
+ Open right drawer
29
+ </MazBtn>
30
+ </div>
31
+ <MazBtn @click="isOpenedBottom = !isOpenedBottom">
32
+ Open bottom drawer
33
+ </MazBtn>
34
+ </div>
35
+
36
+ <template #code>
37
+
38
+ ```html
39
+ <MazBtn @click="isOpenedTop = !isOpenedTop"> Open top drawer </MazBtn>
40
+ <MazBtn @click="isOpenedLeft = !isOpenedLeft"> Open left drawer </MazBtn>
41
+ <MazBtn @click="isOpenedRight = !isOpenedRight"> Open right drawer </MazBtn>
42
+ <MazBtn @click="isOpenedBottom = !isOpenedBottom"> Open bottom drawer </MazBtn>
43
+
44
+ <MazDrawer variant="top" v-model="isOpenedTop">
45
+ <template #title> Drawer top </template>
46
+ <template #default="{ close }">
47
+ <div style="padding: 16px">
48
+ <p>Content</p>
49
+ <div class="maz-flex maz-flex-wrap maz-gap-2 maz-mt-4">
50
+ <MazBtn color="destructive" @click="close"> Close </MazBtn>
51
+ </div>
52
+ </div>
53
+ </template>
54
+ </MazDrawer>
55
+
56
+ <MazDrawer variant="bottom" v-model="isOpenedBottom">
57
+ <template #title> Drawer bottom </template>
58
+ <template #default="{ close }">
59
+ <div style="padding: 16px">
60
+ <p>Content</p>
61
+ <div class="maz-flex maz-flex-wrap maz-gap-2 maz-mt-4">
62
+ <MazBtn color="destructive" @click="close"> Close </MazBtn>
63
+ </div>
64
+ </div>
65
+ </template>
66
+ </MazDrawer>
67
+
68
+ <MazDrawer variant="left" v-model="isOpenedLeft">
69
+ <template #title> Drawer left </template>
70
+ <template #default="{ close }">
71
+ <div style="padding: 16px">
72
+ <p>Content</p>
73
+ <div class="maz-flex maz-flex-wrap maz-gap-2 maz-mt-4">
74
+ <MazBtn color="destructive" @click="close"> Close </MazBtn>
75
+ </div>
76
+ </div>
77
+ </template>
78
+ </MazDrawer>
79
+
80
+ <MazDrawer variant="right" v-model="isOpenedRight">
81
+ <template #title> Drawer right </template>
82
+ <template #default="{ close }">
83
+ <div style="padding: 16px">
84
+ <p>Content</p>
85
+ <div class="maz-flex maz-flex-wrap maz-gap-2 maz-mt-4">
86
+ <MazBtn color="destructive" @click="close"> Close </MazBtn>
87
+ </div>
88
+ </div>
89
+ </template>
90
+ </MazDrawer>
91
+ ```
92
+
93
+ </template>
94
+ </ComponentDemo>
95
+
96
+ <MazDrawer variant="top" v-model="isOpenedTop">
97
+ <template #title>
98
+ Drawer top
99
+ </template>
100
+ <template #default="{ close }">
101
+ <div style="padding: 16px;">
102
+ <p>
103
+ Content
104
+ </p>
105
+ <div class="maz-flex maz-flex-wrap maz-gap-2 maz-mt-4">
106
+ <MazBtn color="destructive" @click="close">
107
+ Close
108
+ </MazBtn>
109
+ </div>
110
+ </div>
111
+ </template>
112
+ </MazDrawer>
113
+
114
+ <MazDrawer variant="bottom" v-model="isOpenedBottom">
115
+ <template #title>
116
+ Drawer bottom
117
+ </template>
118
+ <template #default="{ close }">
119
+ <div style="padding: 16px;">
120
+ <p>
121
+ Content
122
+ </p>
123
+ <div class="maz-flex maz-flex-wrap maz-gap-2 maz-mt-4">
124
+ <MazBtn color="destructive" @click="close">
125
+ Close
126
+ </MazBtn>
127
+ </div>
128
+ </div>
129
+ </template>
130
+ </MazDrawer>
131
+
132
+ <MazDrawer variant="left" v-model="isOpenedLeft">
133
+ <template #title>
134
+ Drawer left
135
+ </template>
136
+ <template #default="{ close }">
137
+ <div style="padding: 16px;">
138
+ <p>
139
+ Content
140
+ </p>
141
+ <div class="maz-flex maz-flex-wrap maz-gap-2 maz-mt-4">
142
+ <MazBtn color="destructive" @click="close">
143
+ Close
144
+ </MazBtn>
145
+ </div>
146
+ </div>
147
+ </template>
148
+ </MazDrawer>
149
+
150
+ <MazDrawer variant="right" v-model="isOpenedRight">
151
+ <template #title>
152
+ Drawer right
153
+ </template>
154
+ <template #default="{ close }">
155
+ <div style="padding: 16px;">
156
+ <p>
157
+ Content
158
+ </p>
159
+ <div class="maz-flex maz-flex-wrap maz-gap-2 maz-mt-4">
160
+ <MazBtn color="destructive" @click="close">
161
+ Close
162
+ </MazBtn>
163
+ </div>
164
+ </div>
165
+ </template>
166
+ </MazDrawer>
167
+
168
+ <script lang="ts" setup>
169
+ import { ref } from 'vue'
170
+
171
+ const isOpenedTop = ref(false)
172
+ const isOpenedBottom = ref(false)
173
+ const isOpenedRight = ref(false)
174
+ const isOpenedLeft = ref(false)
175
+ </script>
176
+
177
+ <!--@include: ./../../.vitepress/generated-docs/maz-drawer.doc.md-->