@maz-ui/mcp 4.9.3 → 5.0.0-beta.0
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/dist/mcp.mjs +1 -1
- package/docs/generated-docs/maz-alert.doc.md +1 -1
- package/docs/generated-docs/maz-avatar.doc.md +1 -1
- package/docs/generated-docs/maz-badge.doc.md +8 -8
- package/docs/generated-docs/maz-btn.doc.md +26 -26
- package/docs/generated-docs/maz-card.doc.md +19 -19
- package/docs/generated-docs/maz-chart.doc.md +8 -8
- package/docs/generated-docs/maz-container.doc.md +20 -20
- package/docs/generated-docs/maz-drawer.doc.md +8 -8
- package/docs/generated-docs/maz-dropdown.doc.md +1 -1
- package/docs/generated-docs/maz-dropzone.doc.md +2 -2
- package/docs/generated-docs/maz-gallery.doc.md +15 -15
- package/docs/generated-docs/maz-icon.doc.md +11 -14
- package/docs/generated-docs/maz-input.doc.md +38 -38
- package/docs/generated-docs/maz-lazy-img.doc.md +18 -0
- package/docs/generated-docs/maz-link.doc.md +9 -9
- package/docs/generated-docs/maz-pagination.doc.md +9 -9
- package/docs/generated-docs/maz-popover.doc.md +5 -1
- package/docs/generated-docs/maz-radio-buttons.doc.md +17 -17
- package/docs/generated-docs/maz-select.doc.md +2 -2
- package/docs/generated-docs/maz-skeleton.doc.md +10 -10
- package/docs/generated-docs/maz-table.doc.md +37 -37
- package/docs/generated-docs/maz-textarea.doc.md +1 -1
- package/docs/generated-docs/maz-timeline.doc.md +1 -1
- package/docs/src/blog/v4.md +7 -7
- package/docs/src/blog/v5.md +186 -0
- package/docs/src/components/maz-accordion.md +1 -1
- package/docs/src/components/maz-alert.md +15 -15
- package/docs/src/components/maz-animated-counter.md +4 -4
- package/docs/src/components/maz-avatar.md +2 -2
- package/docs/src/components/maz-backdrop.md +7 -7
- package/docs/src/components/maz-badge.md +12 -30
- package/docs/src/components/maz-bottom-sheet.md +74 -74
- package/docs/src/components/maz-btn-group.md +17 -17
- package/docs/src/components/maz-btn.md +127 -94
- package/docs/src/components/maz-card-spotlight.md +5 -5
- package/docs/src/components/maz-card.md +20 -20
- package/docs/src/components/maz-carousel.md +14 -14
- package/docs/src/components/maz-chart.md +23 -4
- package/docs/src/components/maz-checkbox.md +3 -3
- package/docs/src/components/maz-checklist.md +19 -19
- package/docs/src/components/maz-circular-progress-bar.md +4 -4
- package/docs/src/components/maz-container.md +52 -37
- package/docs/src/components/maz-date-picker.md +7 -7
- package/docs/src/components/maz-dialog-confirm.md +2 -2
- package/docs/src/components/maz-drawer.md +14 -14
- package/docs/src/components/maz-dropdown.md +27 -12
- package/docs/src/components/maz-dropzone.md +6 -6
- package/docs/src/components/maz-expand-animation.md +2 -2
- package/docs/src/components/maz-fullscreen-loader.md +2 -2
- package/docs/src/components/maz-gallery.md +1 -1
- package/docs/src/components/maz-icon.md +113 -60
- package/docs/src/components/maz-input-code.md +1 -1
- package/docs/src/components/maz-input-phone-number.md +89 -88
- package/docs/src/components/maz-input-tags.md +2 -2
- package/docs/src/components/maz-input.md +42 -12
- package/docs/src/components/maz-link.md +28 -12
- package/docs/src/components/maz-pagination.md +2 -2
- package/docs/src/components/maz-popover.md +236 -236
- package/docs/src/components/maz-pull-to-refresh.md +2 -2
- package/docs/src/components/maz-radio-buttons.md +11 -11
- package/docs/src/components/maz-radio.md +3 -3
- package/docs/src/components/maz-read-more.md +7 -7
- package/docs/src/components/maz-select-country.md +26 -26
- package/docs/src/components/maz-select.md +1 -1
- package/docs/src/components/maz-skeleton.md +25 -25
- package/docs/src/components/maz-spinner.md +2 -2
- package/docs/src/components/maz-stepper.md +5 -5
- package/docs/src/components/maz-switch.md +1 -1
- package/docs/src/components/maz-table.md +10 -10
- package/docs/src/components/maz-tabs.md +17 -17
- package/docs/src/components/maz-textarea.md +8 -8
- package/docs/src/components/maz-ticker.md +37 -37
- package/docs/src/components/maz-timeline.md +9 -9
- package/docs/src/composables/use-dialog.md +1 -1
- package/docs/src/composables/use-display-names.md +2 -2
- package/docs/src/composables/use-form-validator.md +35 -35
- package/docs/src/composables/use-idle-timeout.md +3 -3
- package/docs/src/composables/use-reading-time.md +5 -5
- package/docs/src/composables/use-string-matching.md +4 -4
- package/docs/src/composables/use-swipe.md +3 -3
- package/docs/src/composables/use-timer.md +3 -3
- package/docs/src/composables/use-toast.md +1 -1
- package/docs/src/composables/use-user-visibility.md +1 -1
- package/docs/src/composables/use-wait.md +2 -2
- package/docs/src/directives/click-outside.md +17 -17
- package/docs/src/directives/lazy-img.md +5 -5
- package/docs/src/directives/tooltip.md +15 -15
- package/docs/src/directives/zoom-img.md +1 -1
- package/docs/src/ecosystem/eslint-config.md +100 -0
- package/docs/src/ecosystem/stylelint-config.md +190 -0
- package/docs/src/guide/browser-support.md +81 -0
- package/docs/src/guide/getting-started.md +23 -16
- package/docs/src/guide/icon-set.md +11 -11
- package/docs/src/guide/icons.md +32 -5
- package/docs/src/guide/maz-ui-provider.md +6 -6
- package/docs/src/guide/migration-v4.md +3 -3
- package/docs/src/guide/migration-v5.md +662 -0
- package/docs/src/guide/nuxt.md +27 -44
- package/docs/src/guide/resolvers.md +2 -2
- package/docs/src/guide/tailwind.md +154 -0
- package/docs/src/guide/themes.md +258 -485
- package/docs/src/guide/vue.md +8 -5
- package/docs/src/helpers/capitalize.md +4 -4
- package/docs/src/helpers/country-code-to-unicode-flag.md +37 -37
- package/docs/src/helpers/currency.md +4 -4
- package/docs/src/helpers/date.md +4 -4
- package/docs/src/helpers/get-country-flag-url.md +9 -9
- package/docs/src/helpers/number.md +5 -5
- package/docs/src/index.md +296 -266
- package/docs/src/made-with-maz-ui.md +5 -5
- package/docs/src/plugins/aos.md +6 -6
- package/docs/src/plugins/dialog.md +4 -4
- package/docs/src/plugins/toast.md +3 -3
- package/docs/src/plugins/wait.md +1 -1
- package/package.json +5 -5
package/docs/src/guide/vue.md
CHANGED
|
@@ -43,7 +43,7 @@ import { MazUi } from 'maz-ui/plugins/maz-ui'
|
|
|
43
43
|
import { mazUi } from '@maz-ui/themes'
|
|
44
44
|
import { en } from '@maz-ui/translations/locales'
|
|
45
45
|
|
|
46
|
-
import 'maz-ui/
|
|
46
|
+
import 'maz-ui/style.css'
|
|
47
47
|
|
|
48
48
|
app.use(MazUi, {
|
|
49
49
|
theme: {
|
|
@@ -74,7 +74,7 @@ import { fr } from '@maz-ui/translations/locales'
|
|
|
74
74
|
// or import fr from '@maz-ui/translations/locales/fr'
|
|
75
75
|
|
|
76
76
|
// Import Maz-UI styles before your own CSS
|
|
77
|
-
import 'maz-ui/
|
|
77
|
+
import 'maz-ui/style.css'
|
|
78
78
|
import './style.css'
|
|
79
79
|
|
|
80
80
|
app.use(MazUi, {
|
|
@@ -84,15 +84,18 @@ app.use(MazUi, {
|
|
|
84
84
|
* @see https://maz-ui.com/guide/themes
|
|
85
85
|
*/
|
|
86
86
|
theme: {
|
|
87
|
-
preset: mazUi, // 'ocean' | 'pristine' | 'obsidian'
|
|
87
|
+
preset: mazUi, // 'ocean' | 'pristine' | 'obsidian' | 'nova'
|
|
88
88
|
overrides: {
|
|
89
89
|
foundation: {
|
|
90
|
-
'
|
|
90
|
+
'space': '0.25rem',
|
|
91
91
|
'border-width': '0.0625rem',
|
|
92
92
|
},
|
|
93
|
+
scales: {
|
|
94
|
+
rounded: { md: '0.7rem' },
|
|
95
|
+
},
|
|
93
96
|
colors: {
|
|
94
97
|
light: {
|
|
95
|
-
primary: '
|
|
98
|
+
primary: 'oklch(0.65 0.19 254)',
|
|
96
99
|
}
|
|
97
100
|
}
|
|
98
101
|
}
|
|
@@ -10,7 +10,7 @@ description: The module capitalize is a function that adds a capital letter to a
|
|
|
10
10
|
<MazInput v-model="stringValue" />
|
|
11
11
|
|
|
12
12
|
<div
|
|
13
|
-
style="padding: 16px; margin-top: 16px; background-color:
|
|
13
|
+
style="padding: 16px; margin-top: 16px; background-color: var(--maz-surface-300);"
|
|
14
14
|
class="flex flex-center rounded gap-05"
|
|
15
15
|
>
|
|
16
16
|
formatted value: <strong>{{ stringFormatted }}</strong>
|
|
@@ -18,7 +18,7 @@ description: The module capitalize is a function that adds a capital letter to a
|
|
|
18
18
|
|
|
19
19
|
```vue
|
|
20
20
|
<script lang="ts" setup>
|
|
21
|
-
import { capitalize } from 'maz-ui'
|
|
21
|
+
import { capitalize } from '@maz-ui/utils'
|
|
22
22
|
import { computed, ref } from 'vue'
|
|
23
23
|
|
|
24
24
|
const stringValue = ref('string value')
|
|
@@ -32,7 +32,7 @@ const stringFormatted = computed(() =>
|
|
|
32
32
|
<MazInput v-model="stringValue" />
|
|
33
33
|
|
|
34
34
|
<div
|
|
35
|
-
style="padding: 16px; margin-top: 16px; background-color:
|
|
35
|
+
style="padding: 16px; margin-top: 16px; background-color: var(--maz-surface-300);"
|
|
36
36
|
>
|
|
37
37
|
{{ stringFormatted }}
|
|
38
38
|
</div>
|
|
@@ -40,7 +40,7 @@ const stringFormatted = computed(() =>
|
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
<script lang="ts" setup>
|
|
43
|
-
import { capitalize } from 'maz-ui'
|
|
43
|
+
import { capitalize } from '@maz-ui/utils'
|
|
44
44
|
import { ref, computed } from 'vue'
|
|
45
45
|
|
|
46
46
|
const stringValue = ref('string value')
|
|
@@ -27,7 +27,7 @@ description: Convert country code in unicode flag
|
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<script lang="ts" setup >
|
|
30
|
-
import { countryCodeToUnicodeFlag } from 'maz-ui'
|
|
30
|
+
import { countryCodeToUnicodeFlag } from '@maz-ui/utils'
|
|
31
31
|
|
|
32
32
|
const unicodeFlag = countryCodeToUnicodeFlag('FR')
|
|
33
33
|
</script>
|
|
@@ -35,18 +35,18 @@ description: Convert country code in unicode flag
|
|
|
35
35
|
|
|
36
36
|
## Example
|
|
37
37
|
|
|
38
|
-
<div class="maz
|
|
39
|
-
<span class="maz
|
|
40
|
-
<span class="maz
|
|
41
|
-
<span class="maz
|
|
42
|
-
<span class="maz
|
|
43
|
-
<span class="maz
|
|
44
|
-
<span class="maz
|
|
45
|
-
<span class="maz
|
|
46
|
-
<span class="maz
|
|
47
|
-
<span class="maz
|
|
48
|
-
<span class="maz
|
|
49
|
-
<span class="maz
|
|
38
|
+
<div class="maz:gap-2 maz:flex maz:flex-wrap maz:items-center">
|
|
39
|
+
<span class="maz:text-xs">{{ flag }}</span>
|
|
40
|
+
<span class="maz:text-sm">{{ flag }}</span>
|
|
41
|
+
<span class="maz:text-base">{{ flag }}</span>
|
|
42
|
+
<span class="maz:text-lg">{{ flag }}</span>
|
|
43
|
+
<span class="maz:text-xl">{{ flag }}</span>
|
|
44
|
+
<span class="maz:text-2xl">{{ flag }}</span>
|
|
45
|
+
<span class="maz:text-3xl">{{ flag }}</span>
|
|
46
|
+
<span class="maz:text-4xl">{{ flag }}</span>
|
|
47
|
+
<span class="maz:text-5xl">{{ flag }}</span>
|
|
48
|
+
<span class="maz:text-6xl">{{ flag }}</span>
|
|
49
|
+
<span class="maz:text-7xl">{{ flag }}</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
<MazSelect
|
|
@@ -59,20 +59,20 @@ description: Convert country code in unicode flag
|
|
|
59
59
|
>
|
|
60
60
|
<template #default="{ option, isSelected }">
|
|
61
61
|
<div
|
|
62
|
-
class="maz
|
|
62
|
+
class="maz:flex maz:items-center maz:gap-3"
|
|
63
63
|
>
|
|
64
|
-
<span class="maz
|
|
64
|
+
<span class="maz:text-lg">
|
|
65
65
|
{{ option.unicodeFlag }}
|
|
66
66
|
</span>
|
|
67
67
|
<MazBadge
|
|
68
68
|
pastel
|
|
69
69
|
size="0.7rem"
|
|
70
|
-
class="maz
|
|
71
|
-
:class="{ 'maz
|
|
70
|
+
class="maz:w-9"
|
|
71
|
+
:class="{ 'maz:text-muted': !isSelected }"
|
|
72
72
|
>
|
|
73
73
|
{{ option.value }}
|
|
74
74
|
</MazBadge>
|
|
75
|
-
<span :class="{ 'maz
|
|
75
|
+
<span :class="{ 'maz:font-semibold': isSelected }">
|
|
76
76
|
{{ option.label }}
|
|
77
77
|
</span>
|
|
78
78
|
</div>
|
|
@@ -81,7 +81,7 @@ description: Convert country code in unicode flag
|
|
|
81
81
|
|
|
82
82
|
<script lang="ts" setup>
|
|
83
83
|
import { computed, ref, onMounted } from 'vue'
|
|
84
|
-
import { countryCodeToUnicodeFlag } from 'maz-ui'
|
|
84
|
+
import { countryCodeToUnicodeFlag } from '@maz-ui/utils'
|
|
85
85
|
import { getCountries } from 'libphonenumber-js'
|
|
86
86
|
|
|
87
87
|
const unicodeFlag = countryCodeToUnicodeFlag('FR')
|
|
@@ -125,18 +125,18 @@ description: Convert country code in unicode flag
|
|
|
125
125
|
```vue
|
|
126
126
|
|
|
127
127
|
<template>
|
|
128
|
-
<div class="maz
|
|
129
|
-
<span class="maz
|
|
130
|
-
<span class="maz
|
|
131
|
-
<span class="maz
|
|
132
|
-
<span class="maz
|
|
133
|
-
<span class="maz
|
|
134
|
-
<span class="maz
|
|
135
|
-
<span class="maz
|
|
136
|
-
<span class="maz
|
|
137
|
-
<span class="maz
|
|
138
|
-
<span class="maz
|
|
139
|
-
<span class="maz
|
|
128
|
+
<div class="maz:gap-2 maz:flex maz:flex-wrap maz:items-center">
|
|
129
|
+
<span class="maz:text-xs">{{ flag }}</span>
|
|
130
|
+
<span class="maz:text-sm">{{ flag }}</span>
|
|
131
|
+
<span class="maz:text-base">{{ flag }}</span>
|
|
132
|
+
<span class="maz:text-lg">{{ flag }}</span>
|
|
133
|
+
<span class="maz:text-xl">{{ flag }}</span>
|
|
134
|
+
<span class="maz:text-2xl">{{ flag }}</span>
|
|
135
|
+
<span class="maz:text-3xl">{{ flag }}</span>
|
|
136
|
+
<span class="maz:text-4xl">{{ flag }}</span>
|
|
137
|
+
<span class="maz:text-5xl">{{ flag }}</span>
|
|
138
|
+
<span class="maz:text-6xl">{{ flag }}</span>
|
|
139
|
+
<span class="maz:text-7xl">{{ flag }}</span>
|
|
140
140
|
</div>
|
|
141
141
|
|
|
142
142
|
<MazSelect
|
|
@@ -149,20 +149,20 @@ description: Convert country code in unicode flag
|
|
|
149
149
|
>
|
|
150
150
|
<template #default="{ option, isSelected }">
|
|
151
151
|
<div
|
|
152
|
-
class="maz
|
|
152
|
+
class="maz:flex maz:items-center maz:gap-3"
|
|
153
153
|
>
|
|
154
|
-
<span class="maz
|
|
154
|
+
<span class="maz:text-lg">
|
|
155
155
|
{{ option.unicodeFlag }}
|
|
156
156
|
</span>
|
|
157
157
|
<MazBadge
|
|
158
158
|
pastel
|
|
159
159
|
size="0.7rem"
|
|
160
|
-
class="maz
|
|
161
|
-
:class="{ 'maz
|
|
160
|
+
class="maz:w-9"
|
|
161
|
+
:class="{ 'maz:text-muted': !isSelected }"
|
|
162
162
|
>
|
|
163
163
|
{{ option.value }}
|
|
164
164
|
</MazBadge>
|
|
165
|
-
<span :class="{ 'maz
|
|
165
|
+
<span :class="{ 'maz:font-semibold': isSelected }">
|
|
166
166
|
{{ option.label }}
|
|
167
167
|
</span>
|
|
168
168
|
</div>
|
|
@@ -172,7 +172,7 @@ description: Convert country code in unicode flag
|
|
|
172
172
|
|
|
173
173
|
<script lang="ts" setup>
|
|
174
174
|
import { computed, ref, onMounted } from 'vue'
|
|
175
|
-
import { countryCodeToUnicodeFlag } from 'maz-ui'
|
|
175
|
+
import { countryCodeToUnicodeFlag } from '@maz-ui/utils'
|
|
176
176
|
import { getCountries } from 'libphonenumber-js'
|
|
177
177
|
|
|
178
178
|
const countryCode = ref('FR')
|
|
@@ -16,7 +16,7 @@ Enter only numbers
|
|
|
16
16
|
<MazInput v-model="numberValue" type="number" />
|
|
17
17
|
|
|
18
18
|
<div
|
|
19
|
-
style="padding: 16px; margin-top: 16px; background-color:
|
|
19
|
+
style="padding: 16px; margin-top: 16px; background-color: var(--maz-surface-300);"
|
|
20
20
|
class="flex flex-center rounded gap-05"
|
|
21
21
|
>
|
|
22
22
|
formatted value: <strong>{{ priceFormatted }}</strong>
|
|
@@ -24,7 +24,7 @@ Enter only numbers
|
|
|
24
24
|
|
|
25
25
|
```vue
|
|
26
26
|
<script lang="ts" setup>
|
|
27
|
-
import { formatCurrency } from 'maz-ui'
|
|
27
|
+
import { formatCurrency } from '@maz-ui/utils'
|
|
28
28
|
import { computed, ref } from 'vue'
|
|
29
29
|
|
|
30
30
|
const numberValue = ref(69)
|
|
@@ -38,7 +38,7 @@ const priceFormatted = computed(() =>
|
|
|
38
38
|
<MazInput v-model="numberValue" type="number" />
|
|
39
39
|
|
|
40
40
|
<div
|
|
41
|
-
style="padding: 16px; margin-top: 16px; background-color:
|
|
41
|
+
style="padding: 16px; margin-top: 16px; background-color: var(--maz-surface-300);"
|
|
42
42
|
>
|
|
43
43
|
{{ priceFormatted }}
|
|
44
44
|
</div>
|
|
@@ -46,7 +46,7 @@ const priceFormatted = computed(() =>
|
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
<script lang="ts" setup>
|
|
49
|
-
import { formatCurrency } from 'maz-ui'
|
|
49
|
+
import { formatCurrency } from '@maz-ui/utils'
|
|
50
50
|
import { ref, computed } from 'vue'
|
|
51
51
|
|
|
52
52
|
const numberValue = ref(69)
|
package/docs/src/helpers/date.md
CHANGED
|
@@ -12,7 +12,7 @@ description: The module formatDate is a function that formats dates with the nat
|
|
|
12
12
|
<MazInput v-model="dateValue" type="date" />
|
|
13
13
|
|
|
14
14
|
<div
|
|
15
|
-
style="padding: 16px; margin-top: 16px; background-color:
|
|
15
|
+
style="padding: 16px; margin-top: 16px; background-color: var(--maz-surface-300);"
|
|
16
16
|
class="flex flex-center rounded gap-05"
|
|
17
17
|
>
|
|
18
18
|
formatted value: <strong>{{ dateFormatted }}</strong>
|
|
@@ -20,7 +20,7 @@ description: The module formatDate is a function that formats dates with the nat
|
|
|
20
20
|
|
|
21
21
|
```vue
|
|
22
22
|
<script lang="ts" setup>
|
|
23
|
-
import { formatDate } from 'maz-ui'
|
|
23
|
+
import { formatDate } from '@maz-ui/utils'
|
|
24
24
|
import { computed, ref } from 'vue'
|
|
25
25
|
|
|
26
26
|
const dateValue = ref('2022-02-01')
|
|
@@ -34,7 +34,7 @@ const dateFormatted = computed(() =>
|
|
|
34
34
|
<MazInput v-model="dateValue" type="date" />
|
|
35
35
|
|
|
36
36
|
<div
|
|
37
|
-
style="padding: 16px; margin-top: 16px; background-color:
|
|
37
|
+
style="padding: 16px; margin-top: 16px; background-color: var(--maz-surface-300);"
|
|
38
38
|
>
|
|
39
39
|
{{ dateFormatted }}
|
|
40
40
|
</div>
|
|
@@ -56,7 +56,7 @@ const DEFAULT_OPTIONS: Intl.DateTimeFormatOptions = {
|
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
<script lang="ts" setup>
|
|
59
|
-
import { formatDate } from 'maz-ui'
|
|
59
|
+
import { formatDate } from '@maz-ui/utils'
|
|
60
60
|
import { ref, computed } from 'vue'
|
|
61
61
|
|
|
62
62
|
const dateValue = ref('2022-02-01')
|
|
@@ -17,18 +17,18 @@ description: Get country flag from flagcdn.com with a simple function call
|
|
|
17
17
|
>
|
|
18
18
|
<template #default="{ option, isSelected }">
|
|
19
19
|
<div
|
|
20
|
-
class="maz
|
|
20
|
+
class="maz:flex maz:items-center maz:gap-3"
|
|
21
21
|
>
|
|
22
|
-
<img :src="option.flagSrc" class="maz
|
|
22
|
+
<img :src="option.flagSrc" class="maz:text-lg" :alt="`Flag of ${option.label}`" />
|
|
23
23
|
<MazBadge
|
|
24
24
|
pastel
|
|
25
25
|
size="0.7rem"
|
|
26
|
-
class="maz
|
|
27
|
-
:class="{ 'maz
|
|
26
|
+
class="maz:w-9"
|
|
27
|
+
:class="{ 'maz:text-muted': !isSelected }"
|
|
28
28
|
>
|
|
29
29
|
{{ option.value }}
|
|
30
30
|
</MazBadge>
|
|
31
|
-
<span :class="{ 'maz
|
|
31
|
+
<span :class="{ 'maz:font-semibold': isSelected }">
|
|
32
32
|
{{ option.label }}
|
|
33
33
|
</span>
|
|
34
34
|
</div>
|
|
@@ -45,7 +45,7 @@ description: Get country flag from flagcdn.com with a simple function call
|
|
|
45
45
|
</template>
|
|
46
46
|
|
|
47
47
|
<script lang="ts" setup >
|
|
48
|
-
import { getCountryFlagUrl } from 'maz-ui'
|
|
48
|
+
import { getCountryFlagUrl } from '@maz-ui/utils'
|
|
49
49
|
|
|
50
50
|
const flagSrc = getCountryFlagUrl('FR')
|
|
51
51
|
</script>
|
|
@@ -53,7 +53,7 @@ description: Get country flag from flagcdn.com with a simple function call
|
|
|
53
53
|
|
|
54
54
|
## Sizing
|
|
55
55
|
|
|
56
|
-
<div class="maz
|
|
56
|
+
<div class="maz:gap-2 maz:flex maz:flex-wrap maz:items-center">
|
|
57
57
|
<img
|
|
58
58
|
v-for="{ src, size, countryCode } in sizedFlags"
|
|
59
59
|
:key="src"
|
|
@@ -76,7 +76,7 @@ description: Get country flag from flagcdn.com with a simple function call
|
|
|
76
76
|
|
|
77
77
|
<script lang="ts" setup>
|
|
78
78
|
import { computed } from 'vue'
|
|
79
|
-
import { getCountryFlagUrl } from 'maz-ui'
|
|
79
|
+
import { getCountryFlagUrl } from '@maz-ui/utils'
|
|
80
80
|
|
|
81
81
|
const countryCode = ref('FR')
|
|
82
82
|
|
|
@@ -103,7 +103,7 @@ description: Get country flag from flagcdn.com with a simple function call
|
|
|
103
103
|
|
|
104
104
|
<script lang="ts" setup>
|
|
105
105
|
import { computed, ref, onMounted } from 'vue'
|
|
106
|
-
import { getCountryFlagUrl } from 'maz-ui'
|
|
106
|
+
import { getCountryFlagUrl } from '@maz-ui/utils'
|
|
107
107
|
import { getCountries } from 'libphonenumber-js'
|
|
108
108
|
|
|
109
109
|
const countryCode = ref('FR')
|
|
@@ -12,15 +12,15 @@ description: The module formatNumber is a function that formats numbers with the
|
|
|
12
12
|
<MazInput v-model="numberValue" type="number" />
|
|
13
13
|
|
|
14
14
|
<div
|
|
15
|
-
style="padding: 16px; margin-top: 16px; background-color:
|
|
16
|
-
class="maz
|
|
15
|
+
style="padding: 16px; margin-top: 16px; background-color: var(--maz-surface-300);"
|
|
16
|
+
class="maz:flex maz:flex-center maz:rounded-md maz:gap-0.5"
|
|
17
17
|
>
|
|
18
18
|
formatted value: <strong>{{ numberFormatted }}</strong>
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
21
|
```vue
|
|
22
22
|
<script lang="ts" setup>
|
|
23
|
-
import { formatNumber } from 'maz-ui'
|
|
23
|
+
import { formatNumber } from '@maz-ui/utils'
|
|
24
24
|
import { computed, ref } from 'vue'
|
|
25
25
|
|
|
26
26
|
const numberValue = ref(69)
|
|
@@ -34,7 +34,7 @@ const numberFormatted = computed(() =>
|
|
|
34
34
|
<MazInput v-model="numberValue" type="number" />
|
|
35
35
|
|
|
36
36
|
<div
|
|
37
|
-
style="padding: 16px; margin-top: 16px; background-color:
|
|
37
|
+
style="padding: 16px; margin-top: 16px; background-color: var(--maz-surface-300);"
|
|
38
38
|
>
|
|
39
39
|
{{ numberFormatted }}
|
|
40
40
|
</div>
|
|
@@ -54,7 +54,7 @@ const DEFAULT_OPTIONS: Intl.NumberFormatOptions = {
|
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
<script lang="ts" setup>
|
|
57
|
-
import { formatNumber } from 'maz-ui'
|
|
57
|
+
import { formatNumber } from '@maz-ui/utils'
|
|
58
58
|
import { ref, computed } from 'vue'
|
|
59
59
|
|
|
60
60
|
const numberValue = ref(69)
|