@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.
- package/LICENSE +21 -0
- package/README.md +264 -0
- package/bin/maz-ui-mcp.mjs +7 -0
- package/dist/mcp.d.mts +13 -0
- package/dist/mcp.d.ts +13 -0
- package/dist/mcp.mjs +586 -0
- package/docs/generated-docs/maz-accordion.doc.md +21 -0
- package/docs/generated-docs/maz-animated-counter.doc.md +17 -0
- package/docs/generated-docs/maz-animated-element.doc.md +14 -0
- package/docs/generated-docs/maz-animated-text.doc.md +14 -0
- package/docs/generated-docs/maz-avatar.doc.md +44 -0
- package/docs/generated-docs/maz-backdrop.doc.md +61 -0
- package/docs/generated-docs/maz-badge.doc.md +16 -0
- package/docs/generated-docs/maz-bottom-sheet.doc.md +21 -0
- package/docs/generated-docs/maz-btn.doc.md +30 -0
- package/docs/generated-docs/maz-card-spotlight.doc.md +16 -0
- package/docs/generated-docs/maz-card.doc.md +39 -0
- package/docs/generated-docs/maz-carousel.doc.md +16 -0
- package/docs/generated-docs/maz-chart.doc.md +10 -0
- package/docs/generated-docs/maz-checkbox.doc.md +34 -0
- package/docs/generated-docs/maz-checklist.doc.md +30 -0
- package/docs/generated-docs/maz-circular-progress-bar.doc.md +27 -0
- package/docs/generated-docs/maz-date-picker.doc.md +52 -0
- package/docs/generated-docs/maz-dialog-confirm.doc.md +24 -0
- package/docs/generated-docs/maz-dialog.doc.md +22 -0
- package/docs/generated-docs/maz-drawer.doc.md +26 -0
- package/docs/generated-docs/maz-dropdown.doc.md +42 -0
- package/docs/generated-docs/maz-dropzone.doc.md +82 -0
- package/docs/generated-docs/maz-expand-animation.doc.md +12 -0
- package/docs/generated-docs/maz-fullscreen-loader.doc.md +13 -0
- package/docs/generated-docs/maz-gallery.doc.md +17 -0
- package/docs/generated-docs/maz-icon.doc.md +18 -0
- package/docs/generated-docs/maz-input-code.doc.md +25 -0
- package/docs/generated-docs/maz-input-number.doc.md +31 -0
- package/docs/generated-docs/maz-input-phone-number.doc.md +56 -0
- package/docs/generated-docs/maz-input-price.doc.md +26 -0
- package/docs/generated-docs/maz-input-tags.doc.md +24 -0
- package/docs/generated-docs/maz-input.doc.md +54 -0
- package/docs/generated-docs/maz-lazy-img.doc.md +31 -0
- package/docs/generated-docs/maz-link.doc.md +31 -0
- package/docs/generated-docs/maz-loading-bar.doc.md +6 -0
- package/docs/generated-docs/maz-pagination.doc.md +22 -0
- package/docs/generated-docs/maz-popover.doc.md +70 -0
- package/docs/generated-docs/maz-pull-to-refresh.doc.md +31 -0
- package/docs/generated-docs/maz-radio-buttons.doc.md +33 -0
- package/docs/generated-docs/maz-radio.doc.md +33 -0
- package/docs/generated-docs/maz-reading-progress-bar.doc.md +18 -0
- package/docs/generated-docs/maz-select-country.doc.md +44 -0
- package/docs/generated-docs/maz-select.doc.md +65 -0
- package/docs/generated-docs/maz-slider.doc.md +20 -0
- package/docs/generated-docs/maz-spinner.doc.md +6 -0
- package/docs/generated-docs/maz-stepper.doc.md +29 -0
- package/docs/generated-docs/maz-switch.doc.md +31 -0
- package/docs/generated-docs/maz-table-cell.doc.md +5 -0
- package/docs/generated-docs/maz-table-row.doc.md +11 -0
- package/docs/generated-docs/maz-table-title.doc.md +5 -0
- package/docs/generated-docs/maz-table.doc.md +66 -0
- package/docs/generated-docs/maz-tabs-bar.doc.md +18 -0
- package/docs/generated-docs/maz-tabs-content-item.doc.md +11 -0
- package/docs/generated-docs/maz-tabs-content.doc.md +5 -0
- package/docs/generated-docs/maz-tabs.doc.md +17 -0
- package/docs/generated-docs/maz-textarea.doc.md +41 -0
- package/docs/src/components/index.md +8 -0
- package/docs/src/components/maz-accordion.md +80 -0
- package/docs/src/components/maz-animated-counter.md +124 -0
- package/docs/src/components/maz-animated-element.md +36 -0
- package/docs/src/components/maz-animated-text.md +36 -0
- package/docs/src/components/maz-avatar.md +179 -0
- package/docs/src/components/maz-backdrop.md +16 -0
- package/docs/src/components/maz-badge.md +222 -0
- package/docs/src/components/maz-bottom-sheet.md +398 -0
- package/docs/src/components/maz-btn.md +526 -0
- package/docs/src/components/maz-card-spotlight.md +163 -0
- package/docs/src/components/maz-card.md +447 -0
- package/docs/src/components/maz-carousel.md +127 -0
- package/docs/src/components/maz-chart.md +346 -0
- package/docs/src/components/maz-checkbox.md +168 -0
- package/docs/src/components/maz-checklist.md +414 -0
- package/docs/src/components/maz-circular-progress-bar.md +147 -0
- package/docs/src/components/maz-date-picker.md +1078 -0
- package/docs/src/components/maz-dialog-confirm.md +240 -0
- package/docs/src/components/maz-dialog.md +208 -0
- package/docs/src/components/maz-drawer.md +177 -0
- package/docs/src/components/maz-dropdown.md +650 -0
- package/docs/src/components/maz-dropzone.md +442 -0
- package/docs/src/components/maz-expand-animation.md +99 -0
- package/docs/src/components/maz-fullscreen-loader.md +58 -0
- package/docs/src/components/maz-gallery.md +85 -0
- package/docs/src/components/maz-icon.md +85 -0
- package/docs/src/components/maz-input-code.md +61 -0
- package/docs/src/components/maz-input-number.md +81 -0
- package/docs/src/components/maz-input-phone-number.md +867 -0
- package/docs/src/components/maz-input-price.md +58 -0
- package/docs/src/components/maz-input-tags.md +114 -0
- package/docs/src/components/maz-input.md +453 -0
- package/docs/src/components/maz-lazy-img.md +24 -0
- package/docs/src/components/maz-link.md +156 -0
- package/docs/src/components/maz-loading-bar.md +26 -0
- package/docs/src/components/maz-pagination.md +81 -0
- package/docs/src/components/maz-popover.md +1414 -0
- package/docs/src/components/maz-pull-to-refresh.md +49 -0
- package/docs/src/components/maz-radio-buttons.md +456 -0
- package/docs/src/components/maz-radio.md +141 -0
- package/docs/src/components/maz-reading-progress-bar.md +74 -0
- package/docs/src/components/maz-select-country.md +636 -0
- package/docs/src/components/maz-select.md +439 -0
- package/docs/src/components/maz-slider.md +191 -0
- package/docs/src/components/maz-spinner.md +93 -0
- package/docs/src/components/maz-stepper.md +418 -0
- package/docs/src/components/maz-switch.md +92 -0
- package/docs/src/components/maz-table.md +571 -0
- package/docs/src/components/maz-tabs.md +231 -0
- package/docs/src/components/maz-textarea.md +218 -0
- package/docs/src/composables/use-aos.md +34 -0
- package/docs/src/composables/use-breakpoints.md +35 -0
- package/docs/src/composables/use-dialog.md +88 -0
- package/docs/src/composables/use-display-names.md +174 -0
- package/docs/src/composables/use-form-validator.md +1149 -0
- package/docs/src/composables/use-idle-timeout.md +256 -0
- package/docs/src/composables/use-reading-time.md +168 -0
- package/docs/src/composables/use-string-matching.md +63 -0
- package/docs/src/composables/use-swipe.md +223 -0
- package/docs/src/composables/use-timer.md +130 -0
- package/docs/src/composables/use-toast.md +71 -0
- package/docs/src/composables/use-user-visibility.md +169 -0
- package/docs/src/composables/use-wait.md +62 -0
- package/docs/src/composables/use-window-size.md +18 -0
- package/docs/src/demo/DemoAuthPage.vue +178 -0
- package/docs/src/demo/DemoDashboardPage.vue +298 -0
- package/docs/src/demo/DemoProductPage.vue +135 -0
- package/docs/src/directives/click-outside.md +275 -0
- package/docs/src/directives/fullscreen-img.md +101 -0
- package/docs/src/directives/lazy-img.md +184 -0
- package/docs/src/directives/tooltip.md +458 -0
- package/docs/src/directives/zoom-img.md +127 -0
- package/docs/src/guide/cli.md +144 -0
- package/docs/src/guide/getting-started.md +284 -0
- package/docs/src/guide/icon-set.md +60 -0
- package/docs/src/guide/icons.md +481 -0
- package/docs/src/guide/mcp.md +210 -0
- package/docs/src/guide/migration-v4.md +898 -0
- package/docs/src/guide/nuxt.md +411 -0
- package/docs/src/guide/resolvers.md +697 -0
- package/docs/src/guide/themes.md +789 -0
- package/docs/src/guide/translations.md +1173 -0
- package/docs/src/guide/vue.md +243 -0
- package/docs/src/helpers/camel-case.md +14 -0
- package/docs/src/helpers/capitalize.md +51 -0
- package/docs/src/helpers/check-availability.md +14 -0
- package/docs/src/helpers/country-code-to-unicode-flag.md +213 -0
- package/docs/src/helpers/currency.md +67 -0
- package/docs/src/helpers/date.md +67 -0
- package/docs/src/helpers/debounce-callback.md +14 -0
- package/docs/src/helpers/debounce-id.md +14 -0
- package/docs/src/helpers/debounce.md +14 -0
- package/docs/src/helpers/get-country-flag-url.md +156 -0
- package/docs/src/helpers/is-client.md +14 -0
- package/docs/src/helpers/is-equal.md +14 -0
- package/docs/src/helpers/is-standalone-mode.md +14 -0
- package/docs/src/helpers/kebab-case.md +14 -0
- package/docs/src/helpers/normalize-string.md +14 -0
- package/docs/src/helpers/number.md +65 -0
- package/docs/src/helpers/pascal-case.md +14 -0
- package/docs/src/helpers/script-loader.md +14 -0
- package/docs/src/helpers/sleep.md +14 -0
- package/docs/src/helpers/snake-case.md +14 -0
- package/docs/src/helpers/throttle-id.md +14 -0
- package/docs/src/helpers/throttle.md +14 -0
- package/docs/src/index.md +555 -0
- package/docs/src/made-with-maz-ui.md +58 -0
- package/docs/src/plugins/aos.md +347 -0
- package/docs/src/plugins/dialog.md +411 -0
- package/docs/src/plugins/toast.md +349 -0
- package/docs/src/plugins/wait.md +109 -0
- package/package.json +84 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MazSpinner
|
|
3
|
+
description: MazSpinner is a standalone component that replaces the standard html input checkbox. Color options are available.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# {{ $frontmatter.title }}
|
|
7
|
+
|
|
8
|
+
{{ $frontmatter.description }}
|
|
9
|
+
|
|
10
|
+
## Basic usage
|
|
11
|
+
|
|
12
|
+
<MazSpinner />
|
|
13
|
+
|
|
14
|
+
```vue
|
|
15
|
+
<script>
|
|
16
|
+
import { MazSpinner } from 'maz-ui/components'
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<MazSpinner />
|
|
21
|
+
</template>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Options
|
|
25
|
+
|
|
26
|
+
### Colors
|
|
27
|
+
|
|
28
|
+
Choose the color of the spinner
|
|
29
|
+
|
|
30
|
+
By default the color is `theme`
|
|
31
|
+
|
|
32
|
+
<div class="maz-flex maz-gap-2 maz-flex-wrap">
|
|
33
|
+
<MazSpinner color="primary" />
|
|
34
|
+
<MazSpinner color="secondary" />
|
|
35
|
+
<MazSpinner color="destructive" />
|
|
36
|
+
<MazSpinner color="warning" />
|
|
37
|
+
<MazSpinner color="success" />
|
|
38
|
+
<MazSpinner color="info" />
|
|
39
|
+
<MazSpinner color="accent" />
|
|
40
|
+
<MazSpinner color="contrast" />
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
```vue
|
|
44
|
+
<MazSpinner color="primary" />
|
|
45
|
+
|
|
46
|
+
<MazSpinner color="secondary" />
|
|
47
|
+
|
|
48
|
+
<MazSpinner color="destructive" />
|
|
49
|
+
|
|
50
|
+
<MazSpinner color="warning" />
|
|
51
|
+
|
|
52
|
+
<MazSpinner color="success" />
|
|
53
|
+
|
|
54
|
+
<MazSpinner color="info" />
|
|
55
|
+
|
|
56
|
+
<MazSpinner color="accent" />
|
|
57
|
+
|
|
58
|
+
<MazSpinner color="contrast" />
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Sizes
|
|
62
|
+
|
|
63
|
+
Choose the size of the spinner
|
|
64
|
+
|
|
65
|
+
The default size is `2em`
|
|
66
|
+
|
|
67
|
+
<div class="maz-flex maz-gap-2 maz-flex-wrap maz-items-center">
|
|
68
|
+
<MazSpinner size="1em" />
|
|
69
|
+
<MazSpinner />
|
|
70
|
+
<MazSpinner size="3em" />
|
|
71
|
+
<MazSpinner size="4em" />
|
|
72
|
+
<MazSpinner size="5em" />
|
|
73
|
+
<MazSpinner size="6em" />
|
|
74
|
+
<MazSpinner size="7em" />
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
```vue
|
|
78
|
+
<MazSpinner size="1em" />
|
|
79
|
+
|
|
80
|
+
<MazSpinner size="2em" />
|
|
81
|
+
|
|
82
|
+
<MazSpinner size="3em" />
|
|
83
|
+
|
|
84
|
+
<MazSpinner size="4em" />
|
|
85
|
+
|
|
86
|
+
<MazSpinner size="5em" />
|
|
87
|
+
|
|
88
|
+
<MazSpinner size="6em" />
|
|
89
|
+
|
|
90
|
+
<MazSpinner size="7em" />
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
<!--@include: ./../../.vitepress/generated-docs/maz-spinner.doc.md-->
|
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MazStepper
|
|
3
|
+
description: MazStepper is a standalone UI component customizable, reactive for intuitive step-by-step navigation. Ideal for guiding users through forms, workflows, or checkout processes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# {{ $frontmatter.title }}
|
|
7
|
+
|
|
8
|
+
{{ $frontmatter.description }}
|
|
9
|
+
|
|
10
|
+
<!--@include: ./../.vitepress/mixins/getting-started.md-->
|
|
11
|
+
|
|
12
|
+
## Basic usage
|
|
13
|
+
|
|
14
|
+
<MazStepper auto-validate-steps>
|
|
15
|
+
<template #title-1>
|
|
16
|
+
Sign-In
|
|
17
|
+
</template>
|
|
18
|
+
<template #subtitle-1>
|
|
19
|
+
You should be sign-in to continue
|
|
20
|
+
</template>
|
|
21
|
+
<template #title-info-1>
|
|
22
|
+
Required
|
|
23
|
+
</template>
|
|
24
|
+
<template #content-1="{ nextStep }">
|
|
25
|
+
<form @submit.prevent="nextStep">
|
|
26
|
+
<MazInput v-model="email" label="E-mail" type="email" autocomplete="new-email" name="new-email" />
|
|
27
|
+
<br />
|
|
28
|
+
<br />
|
|
29
|
+
<MazInput v-model="password" label="password" type="password" autocomplete="new-password" name="new-password" />
|
|
30
|
+
<br />
|
|
31
|
+
<br />
|
|
32
|
+
<MazBtn type="submit">
|
|
33
|
+
Sign-In
|
|
34
|
+
</MazBtn>
|
|
35
|
+
</form>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<template #title-2>
|
|
39
|
+
Delivery address
|
|
40
|
+
</template>
|
|
41
|
+
<template #subtitle-2>
|
|
42
|
+
Where should we deliver your package?
|
|
43
|
+
</template>
|
|
44
|
+
<template #title-info-2>
|
|
45
|
+
{{ address }}
|
|
46
|
+
</template>
|
|
47
|
+
<template #content-2="{ nextStep, previousStep }">
|
|
48
|
+
<MazInput v-model="address" label="Delivery address" />
|
|
49
|
+
<br />
|
|
50
|
+
<br />
|
|
51
|
+
<div class="maz-flex maz-gap-4">
|
|
52
|
+
<MazBtn @click="previousStep" color="secondary">
|
|
53
|
+
Previous
|
|
54
|
+
</MazBtn>
|
|
55
|
+
<MazBtn @click="nextStep">
|
|
56
|
+
Validate
|
|
57
|
+
</MazBtn>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<template #title-3>
|
|
62
|
+
Checkout
|
|
63
|
+
</template>
|
|
64
|
+
<template #subtitle-3>
|
|
65
|
+
Provide credit card
|
|
66
|
+
</template>
|
|
67
|
+
<template #content-3="{ nextStep, previousStep }">
|
|
68
|
+
<MazInput label="Credit card number" type="number" />
|
|
69
|
+
<br />
|
|
70
|
+
<br />
|
|
71
|
+
<div class="maz-flex maz-gap-4">
|
|
72
|
+
<MazBtn @click="previousStep" color="secondary">
|
|
73
|
+
Previous
|
|
74
|
+
</MazBtn>
|
|
75
|
+
<MazBtn @click="nextStep">
|
|
76
|
+
Payment
|
|
77
|
+
</MazBtn>
|
|
78
|
+
</div>
|
|
79
|
+
</template>
|
|
80
|
+
</MazStepper>
|
|
81
|
+
|
|
82
|
+
::: details View code
|
|
83
|
+
|
|
84
|
+
```vue
|
|
85
|
+
<template>
|
|
86
|
+
<MazStepper auto-validate-steps>
|
|
87
|
+
<template #title-1>
|
|
88
|
+
Sign-In
|
|
89
|
+
</template>
|
|
90
|
+
<template #subtitle-1>
|
|
91
|
+
You should be signed in to continue
|
|
92
|
+
</template>
|
|
93
|
+
<template #title-info-1>
|
|
94
|
+
Required
|
|
95
|
+
</template>
|
|
96
|
+
<template #content-1="{ nextStep }">
|
|
97
|
+
<form @submit.prevent="nextStep">
|
|
98
|
+
<MazInput v-model="email" label="E-mail" type="email" autocomplete="new-email" name="new-email" />
|
|
99
|
+
<br />
|
|
100
|
+
<MazInput v-model="password" label="password" type="password" autocomplete="new-password" name="new-password" />
|
|
101
|
+
<br />
|
|
102
|
+
<MazBtn type="submit">
|
|
103
|
+
Sign-In
|
|
104
|
+
</MazBtn>
|
|
105
|
+
</form>
|
|
106
|
+
</template>
|
|
107
|
+
|
|
108
|
+
<template #title-2>
|
|
109
|
+
Delivery address
|
|
110
|
+
</template>
|
|
111
|
+
<template #subtitle-2>
|
|
112
|
+
Where should we deliver your package?
|
|
113
|
+
</template>
|
|
114
|
+
<template #title-info-2>
|
|
115
|
+
{{ address }}
|
|
116
|
+
</template>
|
|
117
|
+
<template #content-2="{ nextStep, previousStep }">
|
|
118
|
+
<MazInput v-model="address" label="Delivery address" />
|
|
119
|
+
<br />
|
|
120
|
+
<MazBtn @click="previousStep" color="secondary">
|
|
121
|
+
Previous
|
|
122
|
+
</MazBtn>
|
|
123
|
+
<br />
|
|
124
|
+
<br />
|
|
125
|
+
<MazBtn @click="nextStep">
|
|
126
|
+
Validate
|
|
127
|
+
</MazBtn>
|
|
128
|
+
</template>
|
|
129
|
+
|
|
130
|
+
<template #title-3>
|
|
131
|
+
Checkout
|
|
132
|
+
</template>
|
|
133
|
+
<template #subtitle-3>
|
|
134
|
+
Provide credit card
|
|
135
|
+
</template>
|
|
136
|
+
<template #content-3="{ nextStep, previousStep }">
|
|
137
|
+
<MazInput label="Credit card number" type="number" />
|
|
138
|
+
<br />
|
|
139
|
+
<MazBtn @click="previousStep" color="secondary">
|
|
140
|
+
Previous
|
|
141
|
+
</MazBtn>
|
|
142
|
+
<br />
|
|
143
|
+
<br />
|
|
144
|
+
<MazBtn @click="nextStep">
|
|
145
|
+
Payment
|
|
146
|
+
</MazBtn>
|
|
147
|
+
</template>
|
|
148
|
+
</MazStepper>
|
|
149
|
+
</template>
|
|
150
|
+
|
|
151
|
+
<script lang="ts" setup>
|
|
152
|
+
import { ref } from 'vue'
|
|
153
|
+
|
|
154
|
+
const email = ref()
|
|
155
|
+
const password = ref()
|
|
156
|
+
const address = ref('20 Cooper Square')
|
|
157
|
+
</script>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
:::
|
|
161
|
+
|
|
162
|
+
## Use `step` property instead of slots
|
|
163
|
+
|
|
164
|
+
Displayed steps are generated with the slots `<template #content-1 />`, but you can provide its title, subtitle and title-info with the `steps` props
|
|
165
|
+
|
|
166
|
+
<MazStepper
|
|
167
|
+
:steps="[
|
|
168
|
+
{ title: 'Title 1', subtitle: 'Subtitle 1', titleInfo: 'Info 1', },
|
|
169
|
+
{ title: 'Title 2', subtitle: 'Subtitle 2', titleInfo: 'Info 2' },
|
|
170
|
+
{ title: 'Title 3', subtitle: 'Subtitle 3', titleInfo: 'Info 3' },
|
|
171
|
+
{ title: 'Title 4', subtitle: 'Subtitle 4', titleInfo: 'Info 4' },
|
|
172
|
+
]"
|
|
173
|
+
>
|
|
174
|
+
<template #content-1> Content 1 </template>
|
|
175
|
+
<template #content-2> Content 2 </template>
|
|
176
|
+
<template #content-3> Content 3 </template>
|
|
177
|
+
<template #content-4> Content 4 </template>
|
|
178
|
+
</MazStepper>
|
|
179
|
+
|
|
180
|
+
```vue{3-8}
|
|
181
|
+
<template>
|
|
182
|
+
<MazStepper
|
|
183
|
+
:steps="[
|
|
184
|
+
{ title: 'Title 1', subtitle: 'Subtitle 1', titleInfo: 'Info 1' },
|
|
185
|
+
{ title: 'Title 2', subtitle: 'Subtitle 2', titleInfo: 'Info 2' },
|
|
186
|
+
{ title: 'Title 3', subtitle: 'Subtitle 3', titleInfo: 'Info 3' },
|
|
187
|
+
{ title: 'Title 4', subtitle: 'Subtitle 4', titleInfo: 'Info 4' },
|
|
188
|
+
]"
|
|
189
|
+
>
|
|
190
|
+
<template #content-1> Content 1 </template>
|
|
191
|
+
<template #content-2> Content 2 </template>
|
|
192
|
+
<template #content-3> Content 3 </template>
|
|
193
|
+
<template #content-4> Content 4 </template>
|
|
194
|
+
</MazStepper>
|
|
195
|
+
</template>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Set step states programmatically
|
|
199
|
+
|
|
200
|
+
You can set differents state with its style to each step with the property `step`
|
|
201
|
+
|
|
202
|
+
States available: `'success' | 'warning' | 'error' | 'disabled'`
|
|
203
|
+
|
|
204
|
+
You should respect order of steps in the array:
|
|
205
|
+
|
|
206
|
+
<MazStepper
|
|
207
|
+
v-model="currentStep"
|
|
208
|
+
:steps="[
|
|
209
|
+
{ disabled: true },
|
|
210
|
+
{ success: true },
|
|
211
|
+
{ warning: true, disabled: true },
|
|
212
|
+
{ error: true },
|
|
213
|
+
]"
|
|
214
|
+
>
|
|
215
|
+
|
|
216
|
+
<template #title-1> Title 1 </template>
|
|
217
|
+
<template #title-info-1> Disabled </template>
|
|
218
|
+
<template #content-1> Content 1 </template>
|
|
219
|
+
|
|
220
|
+
<template #title-2> Title 2 </template>
|
|
221
|
+
<template #title-info-2> Success </template>
|
|
222
|
+
<template #content-2> Content 2 </template>
|
|
223
|
+
|
|
224
|
+
<template #title-3> Title 3 </template>
|
|
225
|
+
<template #title-info-3> Warning & Disabled </template>
|
|
226
|
+
<template #content-3> Content 3 </template>
|
|
227
|
+
|
|
228
|
+
<template #title-4> Title 4 </template>
|
|
229
|
+
<template #title-info-4> Error </template>
|
|
230
|
+
<template #content-4> Content 4 </template>
|
|
231
|
+
</MazStepper>
|
|
232
|
+
|
|
233
|
+
```vue{4-9}
|
|
234
|
+
<template>
|
|
235
|
+
<MazStepper
|
|
236
|
+
v-model="currentStep"
|
|
237
|
+
:steps="[
|
|
238
|
+
{ disabled: true },
|
|
239
|
+
{ success: true },
|
|
240
|
+
{ warning: true, disabled: true },
|
|
241
|
+
{ error: true },
|
|
242
|
+
]"
|
|
243
|
+
>
|
|
244
|
+
<template #title-1> Title 1 </template>
|
|
245
|
+
<template #title-info-1> Disabled </template>
|
|
246
|
+
<template #content-1> Content 1 </template>
|
|
247
|
+
|
|
248
|
+
<template #title-2> Title 2 </template>
|
|
249
|
+
<template #title-info-2> Success </template>
|
|
250
|
+
<template #content-2> Content 2 </template>
|
|
251
|
+
|
|
252
|
+
<template #title-3> Title 3 </template>
|
|
253
|
+
<template #title-info-3> Warning & Disabled </template>
|
|
254
|
+
<template #content-3> Content 3 </template>
|
|
255
|
+
|
|
256
|
+
<template #title-4> Title 4 </template>
|
|
257
|
+
<template #title-info-4> Error </template>
|
|
258
|
+
<template #content-4> Content 4 </template>
|
|
259
|
+
</MazStepper>
|
|
260
|
+
</template>
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Auto validate steps
|
|
264
|
+
|
|
265
|
+
You can use the prop option:
|
|
266
|
+
|
|
267
|
+
- `auto-validate-steps`
|
|
268
|
+
|
|
269
|
+
Then all previous steps then the current and then the validated state
|
|
270
|
+
|
|
271
|
+
::: tip
|
|
272
|
+
Click on the first or third step to see the validated steps changes:
|
|
273
|
+
:::
|
|
274
|
+
|
|
275
|
+
<MazStepper v-model="currentStep" auto-validate-steps color="secondary">
|
|
276
|
+
<template #title-1> Step 1 </template>
|
|
277
|
+
<template #content-1> Content 1 </template>
|
|
278
|
+
|
|
279
|
+
<template #title-2> Step 2 </template>
|
|
280
|
+
<template #content-2> Content 2 </template>
|
|
281
|
+
|
|
282
|
+
<template #title-3> Step 3 </template>
|
|
283
|
+
<template #content-3> Content 3 </template>
|
|
284
|
+
</MazStepper>
|
|
285
|
+
|
|
286
|
+
```vue{4}
|
|
287
|
+
<template>
|
|
288
|
+
<MazStepper
|
|
289
|
+
v-model="currentStep"
|
|
290
|
+
auto-validate-steps
|
|
291
|
+
color="secondary"
|
|
292
|
+
>
|
|
293
|
+
<template #title-1> Step 1 </template>
|
|
294
|
+
<template #content-1> Content 1 </template>
|
|
295
|
+
|
|
296
|
+
<template #title-2> Step 2 </template>
|
|
297
|
+
<template #content-2> Content 2 </template>
|
|
298
|
+
|
|
299
|
+
<template #title-3> Step 3 </template>
|
|
300
|
+
<template #content-3> Content 3 </template>
|
|
301
|
+
</MazStepper>
|
|
302
|
+
</template>
|
|
303
|
+
|
|
304
|
+
<script setup lang="ts">
|
|
305
|
+
import { ref } from 'vue'
|
|
306
|
+
const currentStep = ref(2)
|
|
307
|
+
</script>
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
## Auto disabled next or/and previous steps
|
|
311
|
+
|
|
312
|
+
To not allow your users to go to the next steps, you can use the following prop options:
|
|
313
|
+
|
|
314
|
+
- `disabled-previous-steps`
|
|
315
|
+
- `disabled-next-steps`
|
|
316
|
+
|
|
317
|
+
::: tip
|
|
318
|
+
Try to click on first and third steps
|
|
319
|
+
:::
|
|
320
|
+
|
|
321
|
+
<MazStepper :model-value="2" disabled-previous-steps disabled-next-steps>
|
|
322
|
+
<template #title-1> Step 1 </template>
|
|
323
|
+
<template #content-1> Content 1 </template>
|
|
324
|
+
|
|
325
|
+
<template #title-2> Step 2 </template>
|
|
326
|
+
<template #content-2> Content 2 </template>
|
|
327
|
+
|
|
328
|
+
<template #title-3> Step 3 </template>
|
|
329
|
+
<template #content-3> Content 3 </template>
|
|
330
|
+
</MazStepper>
|
|
331
|
+
|
|
332
|
+
```vue{4,5}
|
|
333
|
+
<template>
|
|
334
|
+
<MazStepper
|
|
335
|
+
:model-value="2"
|
|
336
|
+
disabled-previous-steps
|
|
337
|
+
disabled-next-steps
|
|
338
|
+
>
|
|
339
|
+
<template #title-1> Step 1 </template>
|
|
340
|
+
<template #content-1> Content 1 </template>
|
|
341
|
+
|
|
342
|
+
<template #title-2> Step 2 </template>
|
|
343
|
+
<template #content-2> Content 2 </template>
|
|
344
|
+
|
|
345
|
+
<template #title-3> Step 3 </template>
|
|
346
|
+
<template #content-3> Content 3 </template>
|
|
347
|
+
</MazStepper>
|
|
348
|
+
</template>
|
|
349
|
+
|
|
350
|
+
<script setup lang="ts">
|
|
351
|
+
import { ref } from 'vue'
|
|
352
|
+
const currentStep = ref(2)
|
|
353
|
+
</script>
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
## All steps opened & success
|
|
357
|
+
|
|
358
|
+
To open and validate all steps, you can use the following prop options:
|
|
359
|
+
|
|
360
|
+
- `all-steps-validated`
|
|
361
|
+
- `all-steps-opened`
|
|
362
|
+
|
|
363
|
+
<MazStepper all-steps-validated all-steps-opened>
|
|
364
|
+
<template #title-1> Step 1 </template>
|
|
365
|
+
<template #content-1> Content 1 </template>
|
|
366
|
+
|
|
367
|
+
<template #title-2> Step 2 </template>
|
|
368
|
+
<template #content-2> Content 2 </template>
|
|
369
|
+
|
|
370
|
+
<template #title-3> Step 3 </template>
|
|
371
|
+
<template #content-3> Content 3 </template>
|
|
372
|
+
</MazStepper>
|
|
373
|
+
|
|
374
|
+
## Can close steps
|
|
375
|
+
|
|
376
|
+
Use the property `can-close-steps` to let the user be able to close each step on click
|
|
377
|
+
|
|
378
|
+
::: tip
|
|
379
|
+
Click on step titles to toggle content
|
|
380
|
+
:::
|
|
381
|
+
|
|
382
|
+
<MazStepper can-close-steps>
|
|
383
|
+
<template #title-1> Step 1 </template>
|
|
384
|
+
<template #content-1> Content 1 </template>
|
|
385
|
+
|
|
386
|
+
<template #title-2> Step 2 </template>
|
|
387
|
+
<template #content-2> Content 2 </template>
|
|
388
|
+
|
|
389
|
+
<template #title-3> Step 3 </template>
|
|
390
|
+
<template #content-3> Content 3 </template>
|
|
391
|
+
</MazStepper>
|
|
392
|
+
|
|
393
|
+
## Types
|
|
394
|
+
|
|
395
|
+
`step` property model
|
|
396
|
+
|
|
397
|
+
```ts
|
|
398
|
+
type Steps = Array<{
|
|
399
|
+
title?: string
|
|
400
|
+
subtitle?: string
|
|
401
|
+
titleInfo?: string
|
|
402
|
+
disabled?: boolean
|
|
403
|
+
error?: boolean
|
|
404
|
+
success?: boolean
|
|
405
|
+
warning?: boolean
|
|
406
|
+
}>
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
<script setup lang="ts">
|
|
410
|
+
import { ref } from 'vue'
|
|
411
|
+
|
|
412
|
+
const currentStep = ref(2)
|
|
413
|
+
const address = ref('20 Cooper Square')
|
|
414
|
+
const email = ref()
|
|
415
|
+
const password = ref()
|
|
416
|
+
</script>
|
|
417
|
+
|
|
418
|
+
<!--@include: ./../../.vitepress/generated-docs/maz-stepper.doc.md-->
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MazSwitch
|
|
3
|
+
description: MazSwitch is a standalone component that replaces the standard html input checkbox. Color options are available.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# {{ $frontmatter.title }}
|
|
7
|
+
|
|
8
|
+
{{ $frontmatter.description }}
|
|
9
|
+
|
|
10
|
+
<!--@include: ./../.vitepress/mixins/getting-started.md-->
|
|
11
|
+
|
|
12
|
+
<div class="maz-flex maz-flex-col maz-gap-3">
|
|
13
|
+
<MazSwitch
|
|
14
|
+
v-for="color in colors"
|
|
15
|
+
v-model="switchValue"
|
|
16
|
+
:color="color"
|
|
17
|
+
:name="color"
|
|
18
|
+
:key="color"
|
|
19
|
+
>
|
|
20
|
+
{{ color }}
|
|
21
|
+
</MazSwitch>
|
|
22
|
+
|
|
23
|
+
<p>Disabled</p>
|
|
24
|
+
|
|
25
|
+
<MazSwitch
|
|
26
|
+
v-model="switchValueDisabled"
|
|
27
|
+
name="disabled"
|
|
28
|
+
disabled
|
|
29
|
+
>
|
|
30
|
+
Disabled
|
|
31
|
+
</MazSwitch>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
```vue
|
|
35
|
+
<template>
|
|
36
|
+
<MazSwitch
|
|
37
|
+
v-for="color in colors"
|
|
38
|
+
v-model="switchValue"
|
|
39
|
+
:color="color"
|
|
40
|
+
:name="color"
|
|
41
|
+
:key="color"
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
<p>Disabled</p>
|
|
45
|
+
|
|
46
|
+
<MazSwitch
|
|
47
|
+
v-model="switchValue"
|
|
48
|
+
name="disabled"
|
|
49
|
+
disabled
|
|
50
|
+
>
|
|
51
|
+
{{ color }}
|
|
52
|
+
</MazSwitch>
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<script lang="ts" setup>
|
|
56
|
+
import { ref } from 'vue'
|
|
57
|
+
import { MazSwitch } from 'maz-ui/components'
|
|
58
|
+
|
|
59
|
+
const switchValue = ref(false)
|
|
60
|
+
const switchValueDisabled = ref(false)
|
|
61
|
+
|
|
62
|
+
const colors = [
|
|
63
|
+
'primary',
|
|
64
|
+
'secondary',
|
|
65
|
+
'info',
|
|
66
|
+
'success',
|
|
67
|
+
'warning',
|
|
68
|
+
'destructive',
|
|
69
|
+
'accent',
|
|
70
|
+
'contrast',
|
|
71
|
+
]
|
|
72
|
+
</script>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
<!--@include: ./../../.vitepress/generated-docs/maz-switch.doc.md-->
|
|
76
|
+
|
|
77
|
+
<script lang="ts" setup>
|
|
78
|
+
import { ref } from 'vue'
|
|
79
|
+
const switchValue = ref(false)
|
|
80
|
+
const switchValueDisabled = ref(false)
|
|
81
|
+
|
|
82
|
+
const colors = [
|
|
83
|
+
'primary',
|
|
84
|
+
'secondary',
|
|
85
|
+
'info',
|
|
86
|
+
'success',
|
|
87
|
+
'warning',
|
|
88
|
+
'destructive',
|
|
89
|
+
'accent',
|
|
90
|
+
'contrast',
|
|
91
|
+
]
|
|
92
|
+
</script>
|