@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,58 @@
1
+ ---
2
+ title: MazInputPrice
3
+ description: MazInputPrice is a standalone component that replaces the standard html input text and formats the text enter according to the currency provided
4
+ ---
5
+
6
+ # {{ $frontmatter.title }}
7
+
8
+ {{ $frontmatter.description }}
9
+
10
+ <!--@include: ./../.vitepress/mixins/getting-started.md-->
11
+
12
+ ## Basic usage
13
+
14
+ <MazInputPrice
15
+ v-model="priceValue"
16
+ label="Enter your price"
17
+ currency="USD"
18
+ locale="en-US"
19
+ :min="5"
20
+ :max="1000"
21
+ @formatted="formattedPrice = $event"
22
+ />
23
+
24
+ priceValue: {{ priceValue }}
25
+
26
+ formattedPrice: {{ formattedPrice }}
27
+
28
+ <script lang="ts" setup>
29
+ import { ref } from 'vue'
30
+
31
+ const priceValue = ref(2)
32
+ const formattedPrice = ref()
33
+ </script>
34
+
35
+ ```vue
36
+ <script lang="ts" setup>
37
+ import { MazInputPrice } from 'maz-ui/components'
38
+ import { ref } from 'vue'
39
+
40
+ const priceValue = ref(2)
41
+ const formattedPrice = ref()
42
+ </script>
43
+
44
+ <template>
45
+ <MazInputPrice
46
+ v-model="priceValue"
47
+ label="Enter your price"
48
+ currency="USD"
49
+ locale="en-US"
50
+ :min="5"
51
+ :max="1000"
52
+ @formatted="formattedPrice = $event"
53
+ />
54
+ </template>
55
+ ```
56
+
57
+ <!--@include: ./../.vitepress/mixins/maz-input-props.md-->
58
+ <!--@include: ./../../.vitepress/generated-docs/maz-input-price.doc.md-->
@@ -0,0 +1,114 @@
1
+ ---
2
+ title: MazInputTags
3
+ description: MazInputTags is a standalone component like free inputs to help user select many values and return an Array of strings. Color options are also available.
4
+ ---
5
+
6
+ # {{ $frontmatter.title }}
7
+
8
+ {{ $frontmatter.description }}
9
+
10
+ <!--@include: ./../.vitepress/mixins/getting-started.md-->
11
+
12
+ ## Basic usage
13
+
14
+ <MazInputTags
15
+ v-model="tags"
16
+ placeholder="Enter tags"
17
+ color="info"
18
+ />
19
+
20
+ **Returned value**
21
+
22
+ <code>
23
+ tags: {{ tags }}
24
+ </code>
25
+
26
+ ```vue
27
+ <script lang="ts" setup>
28
+ import { MazInputTags } from 'maz-ui/components'
29
+ import { ref } from 'vue'
30
+
31
+ const tags = ref(['tags 1', 'tags 2'])
32
+ const sizes = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
33
+ </script>
34
+
35
+ <template>
36
+ <MazInputTags
37
+ v-model="tags"
38
+ label="Enter tags"
39
+ color="info"
40
+ />
41
+ </template>
42
+ ```
43
+
44
+ ## Sizing
45
+
46
+ <div class="maz-flex maz-flex-col maz-gap-2">
47
+ <MazInputTags
48
+ v-for="size in sizes"
49
+ :key="size"
50
+ :size="size"
51
+ v-model="tags"
52
+ placeholder="Enter tags"
53
+ color="secondary"
54
+ size="sm"
55
+ />
56
+ </div>
57
+
58
+ ```vue
59
+ <script lang="ts" setup>
60
+ import { MazInputTags } from 'maz-ui/components'
61
+ import { ref } from 'vue'
62
+
63
+ const tags = ref(['tags 1', 'tags 2'])
64
+ const sizes = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
65
+ </script>
66
+
67
+ <template>
68
+ <div class="maz-flex maz-flex-col maz-gap-2">
69
+ <MazInputTags
70
+ v-for="size in sizes"
71
+ :key="size"
72
+ v-model="tags"
73
+ :size="size"
74
+ placeholder="Enter tags"
75
+ color="secondary"
76
+ />
77
+ </div>
78
+ </template>
79
+ ```
80
+
81
+ <script lang="ts" setup>
82
+ import { ref } from 'vue'
83
+
84
+ const tags = ref(['tags 1', 'tags 2'])
85
+ const sizes = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
86
+ </script>
87
+
88
+ ```vue
89
+ <script lang="ts" setup>
90
+ import { MazInputTags } from 'maz-ui/components'
91
+ import { ref } from 'vue'
92
+
93
+ const tags = ref(['tags 1', 'tags 2'])
94
+ const sizes = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
95
+ </script>
96
+
97
+ <template>
98
+ <MazInputTags
99
+ v-model="tags"
100
+ label="Enter tags"
101
+ color="info"
102
+ />
103
+
104
+ <MazInputTags
105
+ v-model="tags"
106
+ placeholder="Enter tags"
107
+ color="secondary"
108
+ size="sm"
109
+ />
110
+ </template>
111
+ ```
112
+
113
+ <!--@include: ./../.vitepress/mixins/maz-input-props.md-->
114
+ <!--@include: ./../../.vitepress/generated-docs/maz-input-tags.doc.md-->
@@ -0,0 +1,453 @@
1
+ ---
2
+ title: MazInput
3
+ description: MazInput is a standalone component that replaces the standard html input text with a beautiful design system. Many options like colors, sizes, disabled, loading, error, warning, valid states, error messages and icons are included.
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
+ <MazInput v-model="inputValue" label="Label" name="firstname" />
16
+
17
+ <template #code>
18
+
19
+ ```vue
20
+ <script setup>
21
+ import { MazInput } from 'maz-ui/components'
22
+ import { ref } from 'vue'
23
+
24
+ const inputValue = ref()
25
+ </script>
26
+
27
+ <template>
28
+ <MazInput
29
+ v-model="inputValue"
30
+ label="Label"
31
+ autocomplete="off"
32
+ />
33
+ </template>
34
+ ```
35
+
36
+ </template>
37
+ </ComponentDemo>
38
+
39
+ ## Top label
40
+
41
+ <ComponentDemo>
42
+ <MazInput v-model="inputValue" top-label="Top label" placeholder="Placeholder" autocomplete="off" />
43
+
44
+ <template #code>
45
+
46
+ ```html
47
+ <MazInput v-model="inputValue" top-label="Top label" placeholder="Placeholder" />
48
+ ```
49
+
50
+ </template>
51
+ </ComponentDemo>
52
+
53
+ ## Assistive text
54
+
55
+ <ComponentDemo>
56
+ <MazInput v-model="inputValue" top-label="Top label" assistive-text="Assistive text" placeholder="Placeholder" />
57
+ <br />
58
+ <br />
59
+ <MazInput v-model="inputValue" error top-label="Top label" assistive-text="Assistive text" placeholder="Placeholder" />
60
+
61
+ <template #code>
62
+
63
+ ```html
64
+ <MazInput v-model="inputValue" top-label="Top label" assistive-text="Assistive text" placeholder="Placeholder" />
65
+ ```
66
+
67
+ </template>
68
+ </ComponentDemo>
69
+
70
+ ## Password
71
+
72
+ <ComponentDemo>
73
+ <form>
74
+ <MazInput v-model="passwordValue" label="Label" type="password" name="password" autocomplete="nope" />
75
+ </form>
76
+
77
+ <template #code>
78
+
79
+ ```html
80
+ <MazInput v-model="passwordValue" label="Label" type="password" />
81
+ ```
82
+
83
+ </template>
84
+ </ComponentDemo>
85
+
86
+ ## Placeholder
87
+
88
+ <ComponentDemo>
89
+ <MazInput v-model="inputValue" placeholder="placeholder" autocomplete="off" />
90
+
91
+ <template #code>
92
+
93
+ ```html
94
+ <MazInput v-model="inputValue" placeholder="placeholder" />
95
+ ```
96
+
97
+ </template>
98
+ </ComponentDemo>
99
+
100
+ ## Required
101
+
102
+ > Will make the input required and `*` charac to the label or the placeholder
103
+
104
+ <ComponentDemo>
105
+ <MazInput v-model="inputValue" label="label required" required autocomplete="off" />
106
+
107
+ <template #code>
108
+
109
+ ```html
110
+ <MazInput v-model="inputValue" label="label required" required />
111
+ ```
112
+
113
+ </template>
114
+ </ComponentDemo>
115
+
116
+ ## Disabled
117
+
118
+ <ComponentDemo>
119
+ <MazInput v-model="inputValue" label="label disabled" disabled autocomplete="off" />
120
+
121
+ <template #code>
122
+
123
+ ```html
124
+ <MazInput v-model="inputValue" label="label disabled" disabled />
125
+ ```
126
+
127
+ </template>
128
+ </ComponentDemo>
129
+
130
+ ## Hint
131
+
132
+ > Will replace the label, useful to display short message
133
+
134
+ <ComponentDemo>
135
+ <MazInput v-model="defaultInputValue" label="label hint" hint="An error occured" error autocomplete="off" />
136
+
137
+ <template #code>
138
+
139
+ ```html
140
+ <MazInput v-model="defaultInputValue" label="label hint" hint="An error occured" error />
141
+ ```
142
+
143
+ </template>
144
+ </ComponentDemo>
145
+
146
+ ## Icons
147
+
148
+ <MazInput
149
+ v-model="inputValue"
150
+ label="label icons"
151
+ left-icon="banknotes"
152
+ right-icon="user"
153
+ autocomplete="off"
154
+ />
155
+
156
+ ### Use icon name
157
+
158
+ ::: details View code
159
+
160
+ When you use the properties `right-icon`, `left-icon` or `icon` with the icon name (string), the component uses `<MazIcon name="..." />` component.
161
+
162
+ Check out how [MazIcon](./maz-icon.md) works, see all available icons and download them to put them in your public folder.
163
+
164
+ ```html
165
+ <MazInput v-model="inputValue" label="label icons" left-icon="banknotes" right-icon="user" />
166
+ ```
167
+
168
+ :::
169
+
170
+ ### Use your own SVG icons
171
+
172
+ ::: details View code
173
+
174
+ ```html
175
+ <MazInput v-model="inputValue" label="label icons">
176
+ <template #left-icon>
177
+ <svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
178
+ <path
179
+ d="M2.25 18.75C7.71719 18.75 13.0136 19.4812 18.0468 20.8512C18.7738 21.0491 19.5 20.5086 19.5 19.7551V18.75M3.75 4.5V5.25C3.75 5.66421 3.41421 6 3 6H2.25M2.25 6V5.625C2.25 5.00368 2.75368 4.5 3.375 4.5H20.25M2.25 6V15M20.25 4.5V5.25C20.25 5.66421 20.5858 6 21 6H21.75M20.25 4.5H20.625C21.2463 4.5 21.75 5.00368 21.75 5.625V15.375C21.75 15.9963 21.2463 16.5 20.625 16.5H20.25M21.75 15H21C20.5858 15 20.25 15.3358 20.25 15.75V16.5M20.25 16.5H3.75M3.75 16.5H3.375C2.75368 16.5 2.25 15.9963 2.25 15.375V15M3.75 16.5V15.75C3.75 15.3358 3.41421 15 3 15H2.25M15 10.5C15 12.1569 13.6569 13.5 12 13.5C10.3431 13.5 9 12.1569 9 10.5C9 8.84315 10.3431 7.5 12 7.5C13.6569 7.5 15 8.84315 15 10.5ZM18 10.5H18.0075V10.5075H18V10.5ZM6 10.5H6.0075V10.5075H6V10.5Z"
180
+ stroke="currentColor"
181
+ stroke-width="1.5"
182
+ stroke-linecap="round"
183
+ stroke-linejoin="round"
184
+ />
185
+ </svg>
186
+ </template>
187
+ <template #right-icon>
188
+ <svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
189
+ <path
190
+ d="M15.75 6C15.75 8.07107 14.071 9.75 12 9.75C9.9289 9.75 8.24996 8.07107 8.24996 6C8.24996 3.92893 9.9289 2.25 12 2.25C14.071 2.25 15.75 3.92893 15.75 6Z"
191
+ stroke="currentColor"
192
+ stroke-width="1.5"
193
+ stroke-linecap="round"
194
+ stroke-linejoin="round"
195
+ />
196
+ <path
197
+ d="M4.5011 20.1182C4.5714 16.0369 7.90184 12.75 12 12.75C16.0982 12.75 19.4287 16.0371 19.4988 20.1185C17.216 21.166 14.6764 21.75 12.0003 21.75C9.32396 21.75 6.78406 21.1659 4.5011 20.1182Z"
198
+ stroke="currentColor"
199
+ stroke-width="1.5"
200
+ stroke-linecap="round"
201
+ stroke-linejoin="round"
202
+ />
203
+ </svg>
204
+ </template>
205
+ </MazInput>
206
+ ```
207
+
208
+ :::
209
+
210
+ ### Use [vite-svg-loader](https://github.com/jpkleemans/vite-svg-loader)
211
+
212
+ ::: details View code
213
+
214
+ ```vue
215
+ <script lang="ts" setup>
216
+ import MazBanknotes from '@maz-ui/svg/banknotes.svg'
217
+ import MazUser from '@maz-ui/svg/user.svg'
218
+ import { MazInput } from 'maz-ui/components'
219
+ import { ref } from 'vue'
220
+
221
+ const inputValue = ref('value')
222
+ </script>
223
+
224
+ <template>
225
+ <MazInput
226
+ v-model="inputValue"
227
+ label="label icons"
228
+ :left-icon="MazBanknotes"
229
+ :right-icon="MazUser"
230
+ />
231
+ </template>
232
+ ```
233
+
234
+ :::
235
+
236
+ ## Auto focus
237
+
238
+ > Will focus automatically the component
239
+
240
+ <ComponentDemo>
241
+ <MazInput
242
+ v-model="inputValue"
243
+ label="label auto-focus"
244
+ autocomplete="off"
245
+ />
246
+
247
+ <template #code>
248
+
249
+ ```html
250
+ <MazInput v-model="inputValue" label="label auto-focus" auto-focus />
251
+ ```
252
+
253
+ </template>
254
+ </ComponentDemo>
255
+
256
+ ## Debounce
257
+
258
+ > The value emit by the input will be delayed, usefull for searching
259
+ >
260
+ > The attribute `debounce` is in milliseconds
261
+ >
262
+ > If the debounce is true, the default debounce delay is 500ms
263
+
264
+ <ComponentDemo>
265
+ <MazInput v-model="inputValue" label="label debounce" :debounce="1000" autocomplete="off" />
266
+
267
+ <p class="maz-mt-2">
268
+ modelValue: {{ inputValue ?? 'null' }}
269
+ </p>
270
+
271
+ <template #code>
272
+
273
+ ```html
274
+ <MazInput v-model="inputValue" label="label debounce" :debounce="1000" />
275
+ ```
276
+
277
+ </template>
278
+ </ComponentDemo>
279
+
280
+ ## Sizes
281
+
282
+ > Use the attribute `size` with a value in {{ sizes.join(', ') }}
283
+
284
+ <ComponentDemo>
285
+ <div class="maz-flex maz-flex-col maz-gap-2 maz-items-start">
286
+ <MazInput
287
+ v-for="size in sizes"
288
+ :key="size"
289
+ v-model="inputValue"
290
+ :label="['mini', 'xs'].includes(size) ? undefined : size"
291
+ :placeholder="['mini', 'xs'].includes(size) ? size : undefined"
292
+ :size="size"
293
+ autocomplete="off"
294
+ />
295
+ </div>
296
+
297
+ <template #code>
298
+
299
+ ```vue
300
+ <script setup lang="ts">
301
+ const sizes = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
302
+ </script>
303
+
304
+ <template>
305
+ <MazInput
306
+ v-for="size in sizes"
307
+ :key="size"
308
+ v-model="inputValue"
309
+ :label="size"
310
+ :size="size"
311
+ />
312
+ </template>
313
+ ```
314
+
315
+ </template>
316
+ </ComponentDemo>
317
+
318
+ ## Colors
319
+
320
+ ::: tip
321
+ Click on each input to show colors
322
+ :::
323
+
324
+ ::: info
325
+ Use the attribute `color` with a value in this [list](./../guide/colors.md), the component will use this color
326
+ :::
327
+
328
+ <ComponentDemo>
329
+ <div class="maz-flex maz-flex-col maz-gap-2 maz-items-start">
330
+ <MazInput
331
+ v-for="name in colors"
332
+ :key="name"
333
+ v-model="inputValue"
334
+ :label="name"
335
+ :color="name"
336
+ autocomplete="off"
337
+ />
338
+ </div>
339
+
340
+ <template #code>
341
+
342
+ ```vue
343
+ <script setup>
344
+ const colors = ['primary', 'secondary', 'info', 'success', 'warning', 'destructive', 'accent', 'contrast']
345
+ </script>
346
+
347
+ <template>
348
+ <MazInput
349
+ v-for="name in colors"
350
+ :key="name"
351
+ v-model="inputValue"
352
+ :label="name"
353
+ :color="name"
354
+ />
355
+ </template>
356
+ ```
357
+
358
+ </template>
359
+ </ComponentDemo>
360
+
361
+ ## Rounded Size
362
+
363
+ Use the attribute `rounded-size` with a value in `'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full'`
364
+
365
+ <ComponentDemo>
366
+ <div class="maz-flex maz-flex-col maz-gap-2 maz-items-start">
367
+ <MazInput rounded-size="none" placeholder="Rounded input" autocomplete="off" />
368
+ <MazInput rounded-size="sm" placeholder="Rounded input" autocomplete="off" />
369
+ <MazInput rounded-size="md" placeholder="Rounded input" autocomplete="off" />
370
+ <MazInput rounded-size="lg" placeholder="Rounded input" autocomplete="off" />
371
+ <MazInput rounded-size="xl" placeholder="Rounded input" autocomplete="off" />
372
+ <MazInput rounded-size="full" placeholder="Rounded input" autocomplete="off" />
373
+ </div>
374
+
375
+ <template #code>
376
+
377
+ ```html
378
+ <MazInput rounded-size="none" placeholder="Rounded input" />
379
+ <MazInput rounded-size="sm" placeholder="Rounded input" />
380
+ <MazInput rounded-size="md" placeholder="Rounded input" />
381
+ <MazInput rounded-size="lg" placeholder="Rounded input" />
382
+ <MazInput rounded-size="xl" placeholder="Rounded input" />
383
+ <MazInput rounded-size="full" placeholder="Rounded input" />
384
+ ```
385
+
386
+ </template>
387
+ </ComponentDemo>
388
+
389
+ ## State
390
+
391
+ <ComponentDemo title="destructive">
392
+ <MazInput v-model="inputValue" label="Label" error autocomplete="off" />
393
+
394
+ <template #code>
395
+
396
+ ```html
397
+ <MazInput v-model="inputValue" label="Label" error />
398
+ ```
399
+
400
+ </template>
401
+ </ComponentDemo>
402
+
403
+ <br />
404
+ <br />
405
+
406
+ <ComponentDemo title="Warning">
407
+ <MazInput v-model="inputValue" label="Label" warning autocomplete="off" />
408
+
409
+ <template #code>
410
+
411
+ ```html
412
+ <MazInput v-model="inputValue" label="Label" warning />
413
+ ```
414
+
415
+ </template>
416
+ </ComponentDemo>
417
+
418
+ <br />
419
+ <br />
420
+
421
+ <ComponentDemo title="Success">
422
+ <MazInput v-model="inputValue" label="Label" success autocomplete="off" />
423
+
424
+ <template #code>
425
+
426
+ ```html
427
+ <MazInput v-model="inputValue" label="Label" success />
428
+ ```
429
+
430
+ </template>
431
+ </ComponentDemo>
432
+
433
+ <script setup lang="ts">
434
+ import { ref, computed } from 'vue'
435
+ const inputValue = ref()
436
+ const passwordValue = ref()
437
+ const defaultInputValue = ref('any value')
438
+
439
+ const sizes = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
440
+
441
+ const colors = [
442
+ 'primary',
443
+ 'secondary',
444
+ 'info',
445
+ 'success',
446
+ 'warning',
447
+ 'destructive',
448
+ 'accent',
449
+ 'contrast',
450
+ ]
451
+ </script>
452
+
453
+ <!--@include: ./../../.vitepress/generated-docs/maz-input.doc.md-->
@@ -0,0 +1,24 @@
1
+ ---
2
+ title: MazLazyImg
3
+ description: MazLazyImg is a standalone component to display images and svgs with lazy loading
4
+ ---
5
+
6
+ # {{ $frontmatter.title }}
7
+
8
+ {{ $frontmatter.description }}
9
+
10
+ <!--@include: ./../.vitepress/mixins/getting-started.md-->
11
+
12
+ <MazLazyImg src="https://loremflickr.com/1000/1000" block />
13
+
14
+ ```vue
15
+ <script setup lang="ts">
16
+ import { MazLazyImg } from 'maz-ui/components'
17
+ </script>
18
+
19
+ <template>
20
+ <MazLazyImg src="https://loremflickr.com/1000/1000" block />
21
+ </template>
22
+ ```
23
+
24
+ <!--@include: ./../../.vitepress/generated-docs/maz-lazy-img.doc.md-->