@maz-ui/mcp 5.0.1-beta.0 → 5.1.0-beta.1
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/README.md +61 -228
- package/bin/maz-ui-mcp.mjs +2 -5
- package/dist/cli.d.mts +7 -0
- package/dist/cli.d.ts +7 -0
- package/dist/cli.mjs +16 -0
- package/dist/index.d.mts +345 -0
- package/dist/index.d.ts +345 -0
- package/dist/index.mjs +16 -0
- package/dist/shared/mcp.DseFuKdl.mjs +2968 -0
- package/docs/README.md +207 -0
- package/docs/agents/agents-md.md +52 -0
- package/docs/agents/claude-rule.md +52 -0
- package/docs/components/maz-accordion.md +78 -0
- package/docs/{src/components → components}/maz-alert.md +31 -164
- package/docs/components/maz-animated-counter.md +87 -0
- package/docs/components/maz-animated-element.md +46 -0
- package/docs/components/maz-animated-text.md +53 -0
- package/docs/components/maz-avatar.md +193 -0
- package/docs/components/maz-backdrop.md +178 -0
- package/docs/{src/components → components}/maz-badge.md +26 -67
- package/docs/components/maz-bottom-sheet.md +257 -0
- package/docs/{src/components → components}/maz-btn-group.md +27 -189
- package/docs/{src/components → components}/maz-btn.md +62 -245
- package/docs/components/maz-card-spotlight.md +84 -0
- package/docs/{src/components → components}/maz-card.md +67 -192
- package/docs/components/maz-carousel.md +153 -0
- package/docs/{src/components → components}/maz-chart.md +17 -161
- package/docs/components/maz-checkbox.md +138 -0
- package/docs/components/maz-checklist.md +251 -0
- package/docs/components/maz-circular-progress-bar.md +109 -0
- package/docs/{src/components → components}/maz-code-highlight.md +15 -93
- package/docs/components/maz-container.md +241 -0
- package/docs/{src/components → components}/maz-date-picker.md +85 -454
- package/docs/components/maz-dialog-confirm.md +215 -0
- package/docs/components/maz-dialog.md +143 -0
- package/docs/components/maz-drawer.md +107 -0
- package/docs/components/maz-dropdown.md +419 -0
- package/docs/{src/components → components}/maz-dropzone.md +80 -221
- package/docs/components/maz-expand-animation.md +82 -0
- package/docs/components/maz-fullscreen-loader.md +58 -0
- package/docs/components/maz-gallery.md +79 -0
- package/docs/{src/components → components}/maz-icon.md +32 -83
- package/docs/components/maz-input-code.md +73 -0
- package/docs/components/maz-input-number.md +79 -0
- package/docs/components/maz-input-phone-number.md +536 -0
- package/docs/components/maz-input-price.md +68 -0
- package/docs/components/maz-input-tags.md +112 -0
- package/docs/{src/components → components}/maz-input.md +74 -221
- package/docs/components/maz-lazy-img.md +113 -0
- package/docs/components/maz-link.md +146 -0
- package/docs/components/maz-loading-bar.md +38 -0
- package/docs/{src/components → components}/maz-markdown-editor.md +72 -125
- package/docs/components/maz-pagination.md +82 -0
- package/docs/components/maz-popover.md +794 -0
- package/docs/{src/components → components}/maz-pull-to-refresh.md +59 -45
- package/docs/components/maz-radio-buttons.md +313 -0
- package/docs/components/maz-radio.md +119 -0
- package/docs/{src/components → components}/maz-read-more.md +31 -122
- package/docs/components/maz-reading-progress-bar.md +96 -0
- package/docs/{src/components → components}/maz-select-country.md +80 -340
- package/docs/{src/components → components}/maz-select.md +76 -206
- package/docs/components/maz-sidebar-content.md +25 -0
- package/docs/components/maz-sidebar-footer.md +25 -0
- package/docs/components/maz-sidebar-group.md +27 -0
- package/docs/components/maz-sidebar-header.md +25 -0
- package/docs/components/maz-sidebar-menu-button.md +41 -0
- package/docs/components/maz-sidebar-menu-item.md +25 -0
- package/docs/components/maz-sidebar-menu-sub.md +32 -0
- package/docs/components/maz-sidebar-menu.md +25 -0
- package/docs/components/maz-sidebar-separator.md +21 -0
- package/docs/components/maz-sidebar-trigger.md +25 -0
- package/docs/{src/components → components}/maz-sidebar.md +117 -329
- package/docs/{src/components → components}/maz-skeleton.md +27 -156
- package/docs/{src/components → components}/maz-slider.md +33 -66
- package/docs/components/maz-spinner.md +84 -0
- package/docs/{src/components → components}/maz-stepper.md +48 -185
- package/docs/components/maz-switch.md +86 -0
- package/docs/components/maz-table-cell.md +27 -0
- package/docs/components/maz-table-row.md +28 -0
- package/docs/components/maz-table-title.md +27 -0
- package/docs/components/maz-table-virtualizer.md +31 -0
- package/docs/components/maz-table.md +426 -0
- package/docs/components/maz-tabs-bar.md +43 -0
- package/docs/components/maz-tabs-content-item.md +27 -0
- package/docs/components/maz-tabs-content.md +27 -0
- package/docs/{src/components → components}/maz-tabs.md +89 -126
- package/docs/components/maz-textarea.md +255 -0
- package/docs/components/maz-ticker.md +427 -0
- package/docs/components/maz-timeline.md +304 -0
- package/docs/components/maz-ui-provider.md +26 -0
- package/docs/{src/components → components}/maz-window-mockup.md +38 -105
- package/docs/composables/use-aos.md +41 -0
- package/docs/composables/use-breakpoints.md +42 -0
- package/docs/composables/use-dialog.md +58 -0
- package/docs/{src/composables → composables}/use-display-names.md +12 -59
- package/docs/{src/composables → composables}/use-drag.md +14 -68
- package/docs/{src/composables → composables}/use-form-validator.md +22 -696
- package/docs/{src/composables → composables}/use-idle-timeout.md +13 -97
- package/docs/{src/composables → composables}/use-pull-to-refresh.md +14 -7
- package/docs/{src/composables → composables}/use-reading-time.md +20 -56
- package/docs/composables/use-string-matching.md +41 -0
- package/docs/{src/composables → composables}/use-swipe.md +14 -81
- package/docs/{src/composables → composables}/use-timer.md +12 -38
- package/docs/composables/use-toast.md +50 -0
- package/docs/{src/composables → composables}/use-user-visibility.md +14 -56
- package/docs/composables/use-wait.md +50 -0
- package/docs/composables/use-window-size.md +25 -0
- package/docs/{src/directives → directives}/click-outside.md +13 -99
- package/docs/{src/directives → directives}/fullscreen-img.md +10 -28
- package/docs/{src/directives → directives}/lazy-img.md +14 -49
- package/docs/{src/directives → directives}/tooltip.md +12 -217
- package/docs/{src/directives → directives}/zoom-img.md +11 -38
- package/docs/{src/ecosystem → ecosystem}/eslint-config.md +37 -29
- package/docs/ecosystem/icons/icon-set.md +25 -0
- package/docs/{src/ecosystem → ecosystem}/icons/index.md +21 -15
- package/docs/ecosystem/mcp.md +165 -0
- package/docs/{src/ecosystem → ecosystem}/node/exec-promise.md +12 -6
- package/docs/ecosystem/node/index.md +53 -0
- package/docs/{src/ecosystem → ecosystem}/node/logger.md +12 -6
- package/docs/{src/ecosystem → ecosystem}/node/print-banner.md +12 -4
- package/docs/ecosystem/node/setup-agents.md +102 -0
- package/docs/{src/ecosystem → ecosystem}/nuxt.md +50 -19
- package/docs/{src/ecosystem → ecosystem}/stylelint-config.md +33 -25
- package/docs/{src/ecosystem → ecosystem}/themes.md +72 -235
- package/docs/{src/ecosystem → ecosystem}/translations.md +25 -23
- package/docs/ecosystem/utils/camel-case.md +37 -0
- package/docs/ecosystem/utils/capitalize.md +37 -0
- package/docs/{src/ecosystem → ecosystem}/utils/check-availability.md +14 -8
- package/docs/{src/ecosystem → ecosystem}/utils/cookie.md +18 -12
- package/docs/ecosystem/utils/country-code-to-unicode-flag.md +128 -0
- package/docs/{src/ecosystem → ecosystem}/utils/currency.md +12 -26
- package/docs/{src/ecosystem → ecosystem}/utils/date.md +10 -24
- package/docs/ecosystem/utils/debounce-callback.md +44 -0
- package/docs/{src/ecosystem → ecosystem}/utils/debounce-id.md +14 -8
- package/docs/{src/ecosystem → ecosystem}/utils/debounce.md +14 -8
- package/docs/ecosystem/utils/fetch-locale-ip.md +39 -0
- package/docs/{src/ecosystem → ecosystem}/utils/format-json.md +11 -5
- package/docs/{src/ecosystem → ecosystem}/utils/format-phone-number.md +12 -6
- package/docs/ecosystem/utils/get-browser-locale.md +35 -0
- package/docs/ecosystem/utils/get-country-flag-url.md +67 -0
- package/docs/{src/ecosystem → ecosystem}/utils/get-error-message.md +10 -4
- package/docs/{src/ecosystem → ecosystem}/utils/idle-timeout.md +15 -9
- package/docs/{src/ecosystem → ecosystem}/utils/index.md +10 -13
- package/docs/{src/ecosystem → ecosystem}/utils/is-client.md +11 -5
- package/docs/{src/ecosystem → ecosystem}/utils/is-equal.md +14 -8
- package/docs/{src/ecosystem → ecosystem}/utils/is-ios.md +12 -6
- package/docs/ecosystem/utils/is-server.md +37 -0
- package/docs/ecosystem/utils/is-standalone-mode.md +49 -0
- package/docs/{src/ecosystem → ecosystem}/utils/kebab-case.md +10 -4
- package/docs/{src/ecosystem → ecosystem}/utils/normalize-string.md +10 -4
- package/docs/{src/ecosystem → ecosystem}/utils/number.md +10 -24
- package/docs/{src/ecosystem → ecosystem}/utils/pascal-case.md +11 -5
- package/docs/{src/ecosystem → ecosystem}/utils/prevent-ios-input-zoom.md +14 -8
- package/docs/{src/ecosystem → ecosystem}/utils/script-loader.md +16 -8
- package/docs/{src/ecosystem → ecosystem}/utils/sleep.md +10 -4
- package/docs/{src/ecosystem → ecosystem}/utils/snake-case.md +10 -4
- package/docs/{src/ecosystem → ecosystem}/utils/swipe-handler.md +14 -8
- package/docs/{src/ecosystem → ecosystem}/utils/textarea-autogrow.md +12 -6
- package/docs/{src/ecosystem → ecosystem}/utils/throttle-id.md +13 -7
- package/docs/{src/ecosystem → ecosystem}/utils/throttle.md +14 -8
- package/docs/ecosystem/utils/truthy-filter.md +37 -0
- package/docs/{src/ecosystem → ecosystem}/utils/types/deep-key-of.md +11 -5
- package/docs/{src/ecosystem → ecosystem}/utils/types/deep-partial.md +10 -4
- package/docs/ecosystem/utils/types/deep-required.md +45 -0
- package/docs/ecosystem/utils/types/flatten-object-keys.md +50 -0
- package/docs/{src/ecosystem → ecosystem}/utils/types/generic-instance-type.md +10 -4
- package/docs/{src/ecosystem → ecosystem}/utils/types/infer-maybe-ref.md +10 -4
- package/docs/ecosystem/utils/upper-first.md +38 -0
- package/docs/{src/ecosystem → ecosystem}/utils/user-visibility.md +12 -6
- package/docs/guide/ai-agents.md +239 -0
- package/docs/{src/guide → guide}/browser-support.md +22 -15
- package/docs/{src/guide → guide}/getting-started.md +34 -139
- package/docs/{src/guide → guide}/global-defaults.md +12 -11
- package/docs/{src/guide → guide}/maz-ui-provider.md +17 -16
- package/docs/{src/guide → guide}/migration-v5.md +95 -88
- package/docs/{src/guide → guide}/resolvers.md +33 -100
- package/docs/guide/tailwind.md +507 -0
- package/docs/{src/guide → guide}/vue.md +33 -39
- package/docs/manifest.json +1 -0
- package/docs/{src/plugins → plugins}/aos.md +20 -55
- package/docs/{src/plugins → plugins}/dialog.md +14 -161
- package/docs/plugins/toast.md +221 -0
- package/docs/plugins/wait.md +78 -0
- package/docs/reference/icons.md +46 -0
- package/docs/reference/tailwind-tokens.md +191 -0
- package/docs/rules.md +59 -0
- package/package.json +86 -22
- package/dist/mcp.d.mts +0 -153
- package/dist/mcp.d.ts +0 -153
- package/dist/mcp.mjs +0 -1511
- package/docs/generated-docs/maz-accordion.doc.md +0 -21
- package/docs/generated-docs/maz-alert.doc.md +0 -20
- package/docs/generated-docs/maz-animated-counter.doc.md +0 -17
- package/docs/generated-docs/maz-animated-element.doc.md +0 -14
- package/docs/generated-docs/maz-animated-text.doc.md +0 -17
- package/docs/generated-docs/maz-avatar.doc.md +0 -45
- package/docs/generated-docs/maz-backdrop.doc.md +0 -55
- package/docs/generated-docs/maz-badge.doc.md +0 -16
- package/docs/generated-docs/maz-bottom-sheet.doc.md +0 -24
- package/docs/generated-docs/maz-btn-group.doc.md +0 -20
- package/docs/generated-docs/maz-btn.doc.md +0 -33
- package/docs/generated-docs/maz-card-spotlight.doc.md +0 -16
- package/docs/generated-docs/maz-card.doc.md +0 -39
- package/docs/generated-docs/maz-carousel.doc.md +0 -17
- package/docs/generated-docs/maz-chart.doc.md +0 -10
- package/docs/generated-docs/maz-checkbox.doc.md +0 -33
- package/docs/generated-docs/maz-checklist.doc.md +0 -30
- package/docs/generated-docs/maz-circular-progress-bar.doc.md +0 -27
- package/docs/generated-docs/maz-code-highlight.doc.md +0 -11
- package/docs/generated-docs/maz-container.doc.md +0 -26
- package/docs/generated-docs/maz-date-picker.doc.md +0 -56
- package/docs/generated-docs/maz-dialog-confirm.doc.md +0 -24
- package/docs/generated-docs/maz-dialog.doc.md +0 -22
- package/docs/generated-docs/maz-drawer.doc.md +0 -25
- package/docs/generated-docs/maz-dropdown.doc.md +0 -45
- package/docs/generated-docs/maz-dropzone.doc.md +0 -82
- package/docs/generated-docs/maz-expand-animation.doc.md +0 -12
- package/docs/generated-docs/maz-fullscreen-loader.doc.md +0 -13
- package/docs/generated-docs/maz-gallery.doc.md +0 -17
- package/docs/generated-docs/maz-icon.doc.md +0 -16
- package/docs/generated-docs/maz-input-code.doc.md +0 -25
- package/docs/generated-docs/maz-input-number.doc.md +0 -33
- package/docs/generated-docs/maz-input-phone-number.doc.md +0 -62
- package/docs/generated-docs/maz-input-price.doc.md +0 -26
- package/docs/generated-docs/maz-input-tags.doc.md +0 -24
- package/docs/generated-docs/maz-input.doc.md +0 -54
- package/docs/generated-docs/maz-lazy-img.doc.md +0 -49
- package/docs/generated-docs/maz-link.doc.md +0 -31
- package/docs/generated-docs/maz-loading-bar.doc.md +0 -6
- package/docs/generated-docs/maz-markdown-editor.doc.md +0 -65
- package/docs/generated-docs/maz-pagination.doc.md +0 -21
- package/docs/generated-docs/maz-popover.doc.md +0 -79
- package/docs/generated-docs/maz-pull-to-refresh.doc.md +0 -50
- package/docs/generated-docs/maz-radio-buttons.doc.md +0 -34
- package/docs/generated-docs/maz-radio.doc.md +0 -33
- package/docs/generated-docs/maz-read-more.doc.md +0 -18
- package/docs/generated-docs/maz-reading-progress-bar.doc.md +0 -18
- package/docs/generated-docs/maz-select-country.doc.md +0 -45
- package/docs/generated-docs/maz-select.doc.md +0 -32
- package/docs/generated-docs/maz-sidebar-content.doc.md +0 -5
- package/docs/generated-docs/maz-sidebar-footer.doc.md +0 -5
- package/docs/generated-docs/maz-sidebar-group.doc.md +0 -11
- package/docs/generated-docs/maz-sidebar-header.doc.md +0 -5
- package/docs/generated-docs/maz-sidebar-menu-button.doc.md +0 -27
- package/docs/generated-docs/maz-sidebar-menu-item.doc.md +0 -5
- package/docs/generated-docs/maz-sidebar-menu-sub.doc.md +0 -16
- package/docs/generated-docs/maz-sidebar-menu.doc.md +0 -5
- package/docs/generated-docs/maz-sidebar-separator.doc.md +0 -0
- package/docs/generated-docs/maz-sidebar-trigger.doc.md +0 -5
- package/docs/generated-docs/maz-sidebar.doc.md +0 -36
- package/docs/generated-docs/maz-skeleton.doc.md +0 -12
- package/docs/generated-docs/maz-slider.doc.md +0 -20
- package/docs/generated-docs/maz-spinner.doc.md +0 -6
- package/docs/generated-docs/maz-stepper.doc.md +0 -30
- package/docs/generated-docs/maz-switch.doc.md +0 -31
- package/docs/generated-docs/maz-table-cell.doc.md +0 -5
- package/docs/generated-docs/maz-table-row.doc.md +0 -12
- package/docs/generated-docs/maz-table-title.doc.md +0 -5
- package/docs/generated-docs/maz-table-virtualizer.doc.md +0 -20
- package/docs/generated-docs/maz-table.doc.md +0 -72
- package/docs/generated-docs/maz-tabs-bar.doc.md +0 -29
- package/docs/generated-docs/maz-tabs-content-item.doc.md +0 -11
- package/docs/generated-docs/maz-tabs-content.doc.md +0 -5
- package/docs/generated-docs/maz-tabs.doc.md +0 -20
- package/docs/generated-docs/maz-textarea.doc.md +0 -46
- package/docs/generated-docs/maz-ticker.doc.md +0 -25
- package/docs/generated-docs/maz-timeline.doc.md +0 -32
- package/docs/generated-docs/maz-ui-provider.doc.md +0 -12
- package/docs/generated-docs/maz-window-mockup.doc.md +0 -23
- package/docs/src/blog/v4.md +0 -276
- package/docs/src/blog/v5.md +0 -184
- package/docs/src/changelog.md +0 -7
- package/docs/src/components/index.md +0 -8
- package/docs/src/components/maz-accordion.md +0 -80
- package/docs/src/components/maz-animated-counter.md +0 -124
- package/docs/src/components/maz-animated-element.md +0 -36
- package/docs/src/components/maz-animated-text.md +0 -36
- package/docs/src/components/maz-avatar.md +0 -227
- package/docs/src/components/maz-backdrop.md +0 -250
- package/docs/src/components/maz-bottom-sheet.md +0 -533
- package/docs/src/components/maz-card-spotlight.md +0 -163
- package/docs/src/components/maz-carousel.md +0 -231
- package/docs/src/components/maz-checkbox.md +0 -168
- package/docs/src/components/maz-checklist.md +0 -414
- package/docs/src/components/maz-circular-progress-bar.md +0 -145
- package/docs/src/components/maz-container.md +0 -363
- package/docs/src/components/maz-dialog-confirm.md +0 -240
- package/docs/src/components/maz-dialog.md +0 -164
- package/docs/src/components/maz-drawer.md +0 -181
- package/docs/src/components/maz-dropdown.md +0 -691
- package/docs/src/components/maz-expand-animation.md +0 -99
- package/docs/src/components/maz-fullscreen-loader.md +0 -58
- package/docs/src/components/maz-gallery.md +0 -85
- package/docs/src/components/maz-input-code.md +0 -61
- package/docs/src/components/maz-input-number.md +0 -81
- package/docs/src/components/maz-input-phone-number.md +0 -942
- package/docs/src/components/maz-input-price.md +0 -67
- package/docs/src/components/maz-input-tags.md +0 -114
- package/docs/src/components/maz-lazy-img.md +0 -88
- package/docs/src/components/maz-link.md +0 -178
- package/docs/src/components/maz-loading-bar.md +0 -26
- package/docs/src/components/maz-pagination.md +0 -79
- package/docs/src/components/maz-popover.md +0 -1416
- package/docs/src/components/maz-radio-buttons.md +0 -462
- package/docs/src/components/maz-radio.md +0 -142
- package/docs/src/components/maz-reading-progress-bar.md +0 -74
- package/docs/src/components/maz-spinner.md +0 -93
- package/docs/src/components/maz-switch.md +0 -92
- package/docs/src/components/maz-table.md +0 -732
- package/docs/src/components/maz-textarea.md +0 -400
- package/docs/src/components/maz-ticker.md +0 -692
- package/docs/src/components/maz-timeline.md +0 -478
- package/docs/src/composables/use-aos.md +0 -34
- package/docs/src/composables/use-breakpoints.md +0 -35
- package/docs/src/composables/use-dialog.md +0 -88
- package/docs/src/composables/use-string-matching.md +0 -63
- package/docs/src/composables/use-toast.md +0 -71
- package/docs/src/composables/use-wait.md +0 -62
- package/docs/src/composables/use-window-size.md +0 -18
- package/docs/src/ecosystem/icons/icon-set.md +0 -123
- package/docs/src/ecosystem/mcp.md +0 -210
- package/docs/src/ecosystem/node/index.md +0 -53
- package/docs/src/ecosystem/utils/camel-case.md +0 -31
- package/docs/src/ecosystem/utils/capitalize.md +0 -50
- package/docs/src/ecosystem/utils/country-code-to-unicode-flag.md +0 -213
- package/docs/src/ecosystem/utils/debounce-callback.md +0 -38
- package/docs/src/ecosystem/utils/fetch-locale-ip.md +0 -33
- package/docs/src/ecosystem/utils/get-browser-locale.md +0 -29
- package/docs/src/ecosystem/utils/get-country-flag-url.md +0 -156
- package/docs/src/ecosystem/utils/is-server.md +0 -31
- package/docs/src/ecosystem/utils/is-standalone-mode.md +0 -43
- package/docs/src/ecosystem/utils/truthy-filter.md +0 -31
- package/docs/src/ecosystem/utils/types/deep-required.md +0 -39
- package/docs/src/ecosystem/utils/types/flatten-object-keys.md +0 -44
- package/docs/src/ecosystem/utils/upper-first.md +0 -32
- package/docs/src/guide/cli.md +0 -144
- package/docs/src/guide/migration-v4.md +0 -925
- package/docs/src/guide/tailwind.md +0 -158
- package/docs/src/index.md +0 -603
- package/docs/src/made-with-maz-ui.md +0 -58
- package/docs/src/plugins/toast.md +0 -349
- package/docs/src/plugins/wait.md +0 -109
- package/docs/src/theme-editor.md +0 -21
|
@@ -1,31 +1,26 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: MazSelectCountry
|
|
3
|
-
description: MazSelectCountry is a versatile Vue component for selecting countries or languages with built-in internationalization support and customizable display options
|
|
2
|
+
title: "MazSelectCountry"
|
|
3
|
+
description: "MazSelectCountry is a versatile Vue component for selecting countries or languages with built-in internationalization support and customizable display options"
|
|
4
|
+
package: "maz-ui"
|
|
5
|
+
url: "https://maz-ui.com/components/maz-select-country"
|
|
4
6
|
---
|
|
5
7
|
|
|
6
|
-
#
|
|
8
|
+
# MazSelectCountry
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
> MazSelectCountry is a versatile Vue component for selecting countries or languages with built-in internationalization support and customizable display options
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
- Package: `maz-ui`
|
|
13
|
+
- Import: `import MazSelectCountry from 'maz-ui/components/MazSelectCountry'`
|
|
14
|
+
- Nuxt: auto-imported by `@maz-ui/nuxt`, no import needed in a Nuxt app
|
|
15
|
+
- Web: https://maz-ui.com/components/maz-select-country
|
|
11
16
|
|
|
12
|
-
|
|
17
|
+
**Tip:**
|
|
13
18
|
|
|
14
|
-
|
|
19
|
+
This component can be translated globally using the [MazUi](../ecosystem/translations.md) plugin.
|
|
15
20
|
|
|
16
|
-
|
|
17
|
-
<div class="maz:flex maz:gap-4 maz:flex-wrap">
|
|
18
|
-
<MazSelectCountry
|
|
19
|
-
v-model="selectedCountry"
|
|
20
|
-
:codes="['FR', 'DE', 'IT', 'ES', 'GB', 'NL', 'BE', 'AT', 'CH', 'PT']"
|
|
21
|
-
label="Select a country"
|
|
22
|
-
/>
|
|
23
|
-
<div class="maz:text-sm maz:text-muted">
|
|
24
|
-
Selected: {{ selectedCountry || 'None' }}
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
21
|
+
## Basic usage
|
|
27
22
|
|
|
28
|
-
|
|
23
|
+
The most common use case is selecting a country. The component automatically displays country names in the user's locale with their respective flags.
|
|
29
24
|
|
|
30
25
|
```vue
|
|
31
26
|
<script setup>
|
|
@@ -42,27 +37,10 @@ const selectedCountry = ref('FR')
|
|
|
42
37
|
</template>
|
|
43
38
|
```
|
|
44
39
|
|
|
45
|
-
</template>
|
|
46
|
-
</ComponentDemo>
|
|
47
|
-
|
|
48
40
|
## Language selection
|
|
49
41
|
|
|
50
42
|
Configure the component to display languages instead of countries by setting the appropriate `displayNamesOptions`.
|
|
51
43
|
|
|
52
|
-
<ComponentDemo>
|
|
53
|
-
<div class="maz:flex maz:gap-4 maz:flex-wrap">
|
|
54
|
-
<MazSelectCountry
|
|
55
|
-
v-model="selectedLanguage"
|
|
56
|
-
label="Select a language"
|
|
57
|
-
:display-names-options="{ type: 'language' }"
|
|
58
|
-
/>
|
|
59
|
-
<div class="maz:text-sm maz:text-muted">
|
|
60
|
-
Selected: {{ selectedLanguage || 'None' }}
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
|
|
64
|
-
<template #code>
|
|
65
|
-
|
|
66
44
|
```vue
|
|
67
45
|
<script setup>
|
|
68
46
|
import { ref } from 'vue'
|
|
@@ -79,53 +57,8 @@ const selectedLanguage = ref('en')
|
|
|
79
57
|
</template>
|
|
80
58
|
```
|
|
81
59
|
|
|
82
|
-
</template>
|
|
83
|
-
</ComponentDemo>
|
|
84
|
-
|
|
85
60
|
## Sizes and colors
|
|
86
61
|
|
|
87
|
-
<ComponentDemo>
|
|
88
|
-
<div class="maz:grid maz:grid-cols-1 maz:md:grid-cols-2 maz:gap-4">
|
|
89
|
-
<div class="maz:space-y-4">
|
|
90
|
-
<h4 class="maz:font-semibold">Sizes</h4>
|
|
91
|
-
<MazSelectCountry
|
|
92
|
-
v-model="sizeExample1"
|
|
93
|
-
size="sm"
|
|
94
|
-
label="Small"
|
|
95
|
-
/>
|
|
96
|
-
<MazSelectCountry
|
|
97
|
-
v-model="sizeExample2"
|
|
98
|
-
size="md"
|
|
99
|
-
label="Medium (default)"
|
|
100
|
-
/>
|
|
101
|
-
<MazSelectCountry
|
|
102
|
-
v-model="sizeExample3"
|
|
103
|
-
size="lg"
|
|
104
|
-
label="Large"
|
|
105
|
-
/>
|
|
106
|
-
</div>
|
|
107
|
-
<div class="maz:space-y-4">
|
|
108
|
-
<h4 class="maz:font-semibold">Colors</h4>
|
|
109
|
-
<MazSelectCountry
|
|
110
|
-
v-model="colorExample1"
|
|
111
|
-
color="primary"
|
|
112
|
-
label="Primary"
|
|
113
|
-
/>
|
|
114
|
-
<MazSelectCountry
|
|
115
|
-
v-model="colorExample2"
|
|
116
|
-
color="secondary"
|
|
117
|
-
label="Secondary"
|
|
118
|
-
/>
|
|
119
|
-
<MazSelectCountry
|
|
120
|
-
v-model="colorExample3"
|
|
121
|
-
color="accent"
|
|
122
|
-
label="Accent"
|
|
123
|
-
/>
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
|
|
127
|
-
<template #code>
|
|
128
|
-
|
|
129
62
|
```vue
|
|
130
63
|
<template>
|
|
131
64
|
<!-- Sizes -->
|
|
@@ -164,24 +97,10 @@ const selectedLanguage = ref('en')
|
|
|
164
97
|
</template>
|
|
165
98
|
```
|
|
166
99
|
|
|
167
|
-
</template>
|
|
168
|
-
</ComponentDemo>
|
|
169
|
-
|
|
170
100
|
## Preferred countries
|
|
171
101
|
|
|
172
102
|
You can prioritize certain countries to appear at the top of the list using the `preferredCodes` prop.
|
|
173
103
|
|
|
174
|
-
<ComponentDemo>
|
|
175
|
-
<div class="maz:flex maz:gap-4 maz:flex-wrap">
|
|
176
|
-
<MazSelectCountry
|
|
177
|
-
v-model="preferredExample"
|
|
178
|
-
label="European countries first"
|
|
179
|
-
:preferred-codes="['FR', 'DE', 'IT', 'ES', 'GB']"
|
|
180
|
-
/>
|
|
181
|
-
</div>
|
|
182
|
-
|
|
183
|
-
<template #code>
|
|
184
|
-
|
|
185
104
|
```vue
|
|
186
105
|
<template>
|
|
187
106
|
<MazSelectCountry
|
|
@@ -192,35 +111,10 @@ You can prioritize certain countries to appear at the top of the list using the
|
|
|
192
111
|
</template>
|
|
193
112
|
```
|
|
194
113
|
|
|
195
|
-
</template>
|
|
196
|
-
</ComponentDemo>
|
|
197
|
-
|
|
198
114
|
## Filtering options
|
|
199
115
|
|
|
200
116
|
Control which countries are displayed using `onlyCodes` to show only specific countries, or `ignoredCodes` to exclude certain ones.
|
|
201
117
|
|
|
202
|
-
<ComponentDemo>
|
|
203
|
-
<div class="maz:grid maz:grid-cols-1 maz:md:grid-cols-2 maz:gap-4">
|
|
204
|
-
<div>
|
|
205
|
-
<h4 class="maz:font-semibold maz:mb-2">Only European countries</h4>
|
|
206
|
-
<MazSelectCountry
|
|
207
|
-
v-model="europeExample"
|
|
208
|
-
label="European countries only"
|
|
209
|
-
:only-codes="['FR', 'DE', 'IT', 'ES', 'GB', 'NL', 'BE', 'AT', 'CH', 'PT']"
|
|
210
|
-
/>
|
|
211
|
-
</div>
|
|
212
|
-
<div>
|
|
213
|
-
<h4 class="maz:font-semibold maz:mb-2">Exclude specific countries</h4>
|
|
214
|
-
<MazSelectCountry
|
|
215
|
-
v-model="excludeExample"
|
|
216
|
-
label="All except some countries"
|
|
217
|
-
:ignored-codes="['KP', 'SY', 'AF']"
|
|
218
|
-
/>
|
|
219
|
-
</div>
|
|
220
|
-
</div>
|
|
221
|
-
|
|
222
|
-
<template #code>
|
|
223
|
-
|
|
224
118
|
```vue
|
|
225
119
|
<template>
|
|
226
120
|
<!-- Only specific countries -->
|
|
@@ -239,36 +133,10 @@ Control which countries are displayed using `onlyCodes` to show only specific co
|
|
|
239
133
|
</template>
|
|
240
134
|
```
|
|
241
135
|
|
|
242
|
-
</template>
|
|
243
|
-
</ComponentDemo>
|
|
244
|
-
|
|
245
136
|
## Custom display options
|
|
246
137
|
|
|
247
138
|
Configure how country/language names are displayed using the `displayNamesOptions` prop, which leverages the browser's `Intl.DisplayNames` API.
|
|
248
139
|
|
|
249
|
-
<ComponentDemo>
|
|
250
|
-
<div class="maz:grid maz:grid-cols-1 maz:md:grid-cols-2 maz:gap-4">
|
|
251
|
-
<div>
|
|
252
|
-
<h4 class="maz:font-semibold maz:mb-2">Short country names</h4>
|
|
253
|
-
<MazSelectCountry
|
|
254
|
-
v-model="shortExample"
|
|
255
|
-
label="Short names"
|
|
256
|
-
:display-names-options="{ type: 'region', style: 'short' }"
|
|
257
|
-
/>
|
|
258
|
-
</div>
|
|
259
|
-
<div>
|
|
260
|
-
<h4 class="maz:font-semibold maz:mb-2">Languages with narrow style</h4>
|
|
261
|
-
<MazSelectCountry
|
|
262
|
-
v-model="languageNarrowExample"
|
|
263
|
-
label="Language names (narrow)"
|
|
264
|
-
:display-names-options="{ type: 'language', style: 'narrow' }"
|
|
265
|
-
hide-flags
|
|
266
|
-
/>
|
|
267
|
-
</div>
|
|
268
|
-
</div>
|
|
269
|
-
|
|
270
|
-
<template #code>
|
|
271
|
-
|
|
272
140
|
```vue
|
|
273
141
|
<template>
|
|
274
142
|
<!-- Short country names -->
|
|
@@ -288,9 +156,6 @@ Configure how country/language names are displayed using the `displayNamesOption
|
|
|
288
156
|
</template>
|
|
289
157
|
```
|
|
290
158
|
|
|
291
|
-
</template>
|
|
292
|
-
</ComponentDemo>
|
|
293
|
-
|
|
294
159
|
## Flags source
|
|
295
160
|
|
|
296
161
|
By default, the flags are images of the [flagcdn.com](https://flagcdn.com) CDN: each user's browser requests them from this third party. The `flag-src` prop changes where they come from, in four ways:
|
|
@@ -335,17 +200,6 @@ export default defineNuxtConfig({
|
|
|
335
200
|
|
|
336
201
|
`loadCountryFlag` gives the square flag of a code from the 256 flags of `@maz-ui/icons`, as a `data:image/svg+xml` URL: no request to a third party (nothing to allow for flagcdn.com in your Content Security Policy, the user's IP is not sent to it), and the component works offline (hybrid apps with Capacitor or Cordova, PWAs, intranets).
|
|
337
202
|
|
|
338
|
-
<ComponentDemo>
|
|
339
|
-
<div class="maz:flex maz:gap-4 maz:flex-wrap">
|
|
340
|
-
<MazSelectCountry
|
|
341
|
-
v-model="localFlagsExample"
|
|
342
|
-
label="Country (flags of maz-ui)"
|
|
343
|
-
:flag-src="loadCountryFlag"
|
|
344
|
-
/>
|
|
345
|
-
</div>
|
|
346
|
-
|
|
347
|
-
<template #code>
|
|
348
|
-
|
|
349
203
|
```vue
|
|
350
204
|
<script lang="ts" setup>
|
|
351
205
|
import { loadCountryFlag } from 'maz-ui/country-flags'
|
|
@@ -363,9 +217,6 @@ const selectedCountry = ref('FR')
|
|
|
363
217
|
</template>
|
|
364
218
|
```
|
|
365
219
|
|
|
366
|
-
</template>
|
|
367
|
-
</ComponentDemo>
|
|
368
|
-
|
|
369
220
|
How it stays light:
|
|
370
221
|
|
|
371
222
|
- Nothing in maz-ui imports `maz-ui/country-flags`: an app that does not import it has **no flag file at all** in its build.
|
|
@@ -376,11 +227,12 @@ How it stays light:
|
|
|
376
227
|
const flagSrc = (code: string) => import('maz-ui/country-flags').then(({ loadCountryFlag }) => loadCountryFlag(code))
|
|
377
228
|
```
|
|
378
229
|
|
|
379
|
-
|
|
230
|
+
**Tip: Content Security Policy**
|
|
231
|
+
|
|
380
232
|
The flags are `data:` URLs: a strict CSP must allow `img-src data:` (already needed by the lazy images of maz-ui).
|
|
381
|
-
:::
|
|
382
233
|
|
|
383
|
-
|
|
234
|
+
**Tip: PWA precache**
|
|
235
|
+
|
|
384
236
|
Once you use `loadCountryFlag`, the 256 flag chunks are part of your build, so a service worker that precaches every `**/*.js` downloads all of them at install. Keep them (every flag available offline) or exclude them and let them load on demand. With Vite, the chunks are named after their module, `MazFlagSquareFR-[hash].js`:
|
|
385
237
|
|
|
386
238
|
```ts
|
|
@@ -389,7 +241,6 @@ VitePWA({ workbox: { globIgnores: ['**/MazFlagSquare*.js'] } })
|
|
|
389
241
|
```
|
|
390
242
|
|
|
391
243
|
Nuxt names its chunks `_nuxt/[hash].js` only: name the flag chunks yourself to exclude them, e.g. `vite.build.rollupOptions.output.chunkFileNames: chunk => chunk.name.startsWith('MazFlagSquare') ? '_nuxt/flags/[name].[hash].js' : '_nuxt/[hash].js'`, then ignore `**/_nuxt/flags/**`.
|
|
392
|
-
:::
|
|
393
244
|
|
|
394
245
|
### Your own files
|
|
395
246
|
|
|
@@ -430,18 +281,6 @@ You can also replace the flags entirely with the `selector-flag` and `country-li
|
|
|
430
281
|
|
|
431
282
|
Hide country flags using the `hideFlags` prop for a cleaner text-only interface.
|
|
432
283
|
|
|
433
|
-
<ComponentDemo>
|
|
434
|
-
<div class="maz:flex maz:gap-4 maz:flex-wrap">
|
|
435
|
-
<MazSelectCountry
|
|
436
|
-
v-model="noFlagsExample"
|
|
437
|
-
label="Countries without flags"
|
|
438
|
-
hide-flags
|
|
439
|
-
placeholder="Text-only country selection"
|
|
440
|
-
/>
|
|
441
|
-
</div>
|
|
442
|
-
|
|
443
|
-
<template #code>
|
|
444
|
-
|
|
445
284
|
```vue
|
|
446
285
|
<template>
|
|
447
286
|
<MazSelectCountry
|
|
@@ -453,35 +292,10 @@ Hide country flags using the `hideFlags` prop for a cleaner text-only interface.
|
|
|
453
292
|
</template>
|
|
454
293
|
```
|
|
455
294
|
|
|
456
|
-
</template>
|
|
457
|
-
</ComponentDemo>
|
|
458
|
-
|
|
459
295
|
## Custom locale
|
|
460
296
|
|
|
461
297
|
Override the default locale to display country/language names in a specific language.
|
|
462
298
|
|
|
463
|
-
<ComponentDemo>
|
|
464
|
-
<div class="maz:grid maz:grid-cols-1 maz:md:grid-cols-2 maz:gap-4">
|
|
465
|
-
<div>
|
|
466
|
-
<h4 class="maz:font-semibold maz:mb-2">Countries in French</h4>
|
|
467
|
-
<MazSelectCountry
|
|
468
|
-
v-model="frenchExample"
|
|
469
|
-
label="Pays (French)"
|
|
470
|
-
locale="fr-FR"
|
|
471
|
-
/>
|
|
472
|
-
</div>
|
|
473
|
-
<div>
|
|
474
|
-
<h4 class="maz:font-semibold maz:mb-2">Countries in Spanish</h4>
|
|
475
|
-
<MazSelectCountry
|
|
476
|
-
v-model="spanishExample"
|
|
477
|
-
label="País (Spanish)"
|
|
478
|
-
locale="es-ES"
|
|
479
|
-
/>
|
|
480
|
-
</div>
|
|
481
|
-
</div>
|
|
482
|
-
|
|
483
|
-
<template #code>
|
|
484
|
-
|
|
485
299
|
```vue
|
|
486
300
|
<template>
|
|
487
301
|
<!-- Countries in French -->
|
|
@@ -500,47 +314,10 @@ Override the default locale to display country/language names in a specific lang
|
|
|
500
314
|
</template>
|
|
501
315
|
```
|
|
502
316
|
|
|
503
|
-
</template>
|
|
504
|
-
</ComponentDemo>
|
|
505
|
-
|
|
506
317
|
## States and validation
|
|
507
318
|
|
|
508
319
|
The component supports all the standard form states for better user experience.
|
|
509
320
|
|
|
510
|
-
<ComponentDemo>
|
|
511
|
-
<div class="maz:grid maz:grid-cols-1 maz:md:grid-cols-2 maz:gap-4">
|
|
512
|
-
<div class="maz:space-y-4">
|
|
513
|
-
<MazSelectCountry
|
|
514
|
-
v-model="successExample"
|
|
515
|
-
label="Success state"
|
|
516
|
-
success
|
|
517
|
-
hint="Valid country selected"
|
|
518
|
-
/>
|
|
519
|
-
<MazSelectCountry
|
|
520
|
-
v-model="warningExample"
|
|
521
|
-
label="Warning state"
|
|
522
|
-
warning
|
|
523
|
-
hint="Please verify your selection"
|
|
524
|
-
/>
|
|
525
|
-
</div>
|
|
526
|
-
<div class="maz:space-y-4">
|
|
527
|
-
<MazSelectCountry
|
|
528
|
-
v-model="errorExample"
|
|
529
|
-
label="Error state"
|
|
530
|
-
error
|
|
531
|
-
hint="Please select a valid country"
|
|
532
|
-
/>
|
|
533
|
-
<MazSelectCountry
|
|
534
|
-
v-model="disabledExample"
|
|
535
|
-
label="Disabled state"
|
|
536
|
-
disabled
|
|
537
|
-
hint="Selection is not available"
|
|
538
|
-
/>
|
|
539
|
-
</div>
|
|
540
|
-
</div>
|
|
541
|
-
|
|
542
|
-
<template #code>
|
|
543
|
-
|
|
544
321
|
```vue
|
|
545
322
|
<template>
|
|
546
323
|
<MazSelectCountry
|
|
@@ -573,25 +350,10 @@ The component supports all the standard form states for better user experience.
|
|
|
573
350
|
</template>
|
|
574
351
|
```
|
|
575
352
|
|
|
576
|
-
</template>
|
|
577
|
-
</ComponentDemo>
|
|
578
|
-
|
|
579
353
|
## Custom options
|
|
580
354
|
|
|
581
355
|
Provide your own list of options instead of using the built-in country/language codes.
|
|
582
356
|
|
|
583
|
-
<ComponentDemo>
|
|
584
|
-
<div class="maz:flex maz:gap-4 maz:flex-wrap">
|
|
585
|
-
<MazSelectCountry
|
|
586
|
-
v-model="customExample"
|
|
587
|
-
label="Custom regions"
|
|
588
|
-
:options="customRegions"
|
|
589
|
-
hide-flags
|
|
590
|
-
/>
|
|
591
|
-
</div>
|
|
592
|
-
|
|
593
|
-
<template #code>
|
|
594
|
-
|
|
595
357
|
```vue
|
|
596
358
|
<script setup>
|
|
597
359
|
import { ref } from 'vue'
|
|
@@ -616,25 +378,10 @@ const customRegions = [
|
|
|
616
378
|
</template>
|
|
617
379
|
```
|
|
618
380
|
|
|
619
|
-
</template>
|
|
620
|
-
</ComponentDemo>
|
|
621
|
-
|
|
622
381
|
## Display code instead of name
|
|
623
382
|
|
|
624
383
|
Show country/language codes in the input field instead of names using the `displayCode` prop.
|
|
625
384
|
|
|
626
|
-
<ComponentDemo>
|
|
627
|
-
<div class="maz:flex maz:gap-4 maz:flex-wrap">
|
|
628
|
-
<MazSelectCountry
|
|
629
|
-
v-model="codeDisplayExample"
|
|
630
|
-
label="Display country codes"
|
|
631
|
-
display-code
|
|
632
|
-
placeholder="Shows codes like 'FR', 'US'..."
|
|
633
|
-
/>
|
|
634
|
-
</div>
|
|
635
|
-
|
|
636
|
-
<template #code>
|
|
637
|
-
|
|
638
385
|
```vue
|
|
639
386
|
<template>
|
|
640
387
|
<MazSelectCountry
|
|
@@ -646,31 +393,10 @@ Show country/language codes in the input field instead of names using the `displ
|
|
|
646
393
|
</template>
|
|
647
394
|
```
|
|
648
395
|
|
|
649
|
-
</template>
|
|
650
|
-
</ComponentDemo>
|
|
651
|
-
|
|
652
396
|
## Advanced configuration
|
|
653
397
|
|
|
654
398
|
Combine multiple features for complex use cases, such as business applications requiring specific country lists with custom styling.
|
|
655
399
|
|
|
656
|
-
<ComponentDemo>
|
|
657
|
-
<div class="maz:max-w-md">
|
|
658
|
-
<MazSelectCountry
|
|
659
|
-
v-model="advancedExample"
|
|
660
|
-
label="Business countries"
|
|
661
|
-
color="primary"
|
|
662
|
-
size="lg"
|
|
663
|
-
:preferred-codes="['US', 'GB', 'DE', 'FR', 'CA']"
|
|
664
|
-
:ignored-codes="['AQ', 'BV', 'HM']"
|
|
665
|
-
:search-threshold="2"
|
|
666
|
-
display-code
|
|
667
|
-
success
|
|
668
|
-
hint="Primary business regions prioritized"
|
|
669
|
-
/>
|
|
670
|
-
</div>
|
|
671
|
-
|
|
672
|
-
<template #code>
|
|
673
|
-
|
|
674
400
|
```vue
|
|
675
401
|
<template>
|
|
676
402
|
<MazSelectCountry
|
|
@@ -688,9 +414,6 @@ Combine multiple features for complex use cases, such as business applications r
|
|
|
688
414
|
</template>
|
|
689
415
|
```
|
|
690
416
|
|
|
691
|
-
</template>
|
|
692
|
-
</ComponentDemo>
|
|
693
|
-
|
|
694
417
|
## How it works
|
|
695
418
|
|
|
696
419
|
The `MazSelectCountry` component is built on top of `MazSelect` and leverages the powerful `useDisplayNames` composable, which uses the browser's native `Intl.DisplayNames` API for internationalization.
|
|
@@ -726,48 +449,65 @@ const allCountries = getAllDisplayNames({
|
|
|
726
449
|
|
|
727
450
|
This ensures consistent internationalization across your application while providing maximum flexibility for different use cases.
|
|
728
451
|
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
import
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
452
|
+
## MazSelectCountry API
|
|
453
|
+
|
|
454
|
+
`import MazSelectCountry from 'maz-ui/components/MazSelectCountry'`
|
|
455
|
+
|
|
456
|
+
### Props
|
|
457
|
+
|
|
458
|
+
- `id` (`string`): Id of the component.
|
|
459
|
+
- `color` (`"primary" | "secondary" | "accent" | "info" | "success" | "warning" | "destructive" | "contrast" | "transparent"`, default: `"primary"`): Color of the component.
|
|
460
|
+
- `size` (`"xs" | "sm" | "md" | "lg" | "xl" | "mini"`, default: `md`): Size of the component.
|
|
461
|
+
- `preferred-codes` (`Option["code"][]`): Preferred countries to display.
|
|
462
|
+
- `ignored-codes` (`Option["code"][]`): Ignored countries to display.
|
|
463
|
+
- `only-codes` (`Option["code"][]`): Only countries to display.
|
|
464
|
+
- `list-position` (`MazPopoverPosition`, default: `'auto'`): Position of the list.
|
|
465
|
+
- `hide-flags` (`boolean`): Hide flags.
|
|
466
|
+
- `flag-src` (`MazCountryFlagSrc`, default: `undefined (flags from flagcdn.com)`): Source of the flags, instead of the flagcdn.com CDN: - a URL template with the code, `{code}` (lowercase) or `{CODE}` (uppercase): `/flags/{code}.svg` - a function giving the image source of a code (URL or data URL), called when the flag becomes visible, or `undefined` to display the code in a badge Use `loadCountryFlag` from `maz-ui/country-flags` for the flags of `@maz-ui/icons`, without any request to a third party. Can be set for the whole app with the `defaults.global.flagSrc` option of the MazUi plugin.
|
|
467
|
+
- `search` (`boolean`, default: `true`): Display search input in options list.
|
|
468
|
+
- `show-code-in-list` (`boolean`, default: `false`): Show code on list.
|
|
469
|
+
- `locale` (`string`, default: `locale defined within the maz-ui plugin or browser locale or en-US`): Locale.
|
|
470
|
+
- `success` (`boolean`): Success state.
|
|
471
|
+
- `error` (`boolean`): Error state.
|
|
472
|
+
- `warning` (`boolean`): Warning state.
|
|
473
|
+
- `display-code` (`boolean`)
|
|
474
|
+
- `search-threshold` (`number`, default: `0.75`): Search threshold.
|
|
475
|
+
- `translations` (`Partial<{ searchPlaceholder: string; }>`, default: `MazUiTranslationsNestedSchema['selectCountry']`): Translations.
|
|
476
|
+
- `hint` (`string`): Hint message displayed.
|
|
477
|
+
- `options` (`Option[]`): Options.
|
|
478
|
+
- `display-names-options` (`DisplayNamesOptions`, default: `{ type: "region", languageDisplay: "standard", fallback: "code", style: "long" }`): Display name type.
|
|
479
|
+
- `codes-type` (`CodesType`, default: `defined by displayNamesOptions.type (if 'region', 'country' is used, otherwise 'iso')`): Codes type. Values: `'iso'`, `'bcp'`, `'country'`, `'all'` (non exhaustive).
|
|
480
|
+
- `open` (`boolean`, default: `false`): Open the select.
|
|
481
|
+
- `model-value` (`Option["code"]`, `v-model`): The value of the select.
|
|
482
|
+
- `block` (`boolean`): The input will be displayed in full width.
|
|
483
|
+
- `disabled` (`boolean`): Disable the component.
|
|
484
|
+
- `required` (`boolean`): Make the input required in the form.
|
|
485
|
+
- `placeholder` (`string`): The placeholder of the select.
|
|
486
|
+
- `label` (`string`): The label of the select.
|
|
487
|
+
- `search-function` (`((query: string, options: Option[]) => Option[] | undefined)`): Replace the default search function to provide a custom search function.
|
|
488
|
+
- `transition` (`string`, default: `'scale-fade'`): The transition name of the panel list options.
|
|
489
|
+
- `prefer-position` (`MazPopoverPreferPosition`, default: `'bottom-start'`): The prefer position of the list.
|
|
490
|
+
- `fallback-position` (`MazPopoverFallbackPosition`, default: `'top-start'`): The fallback position of the list.
|
|
491
|
+
- `top-label` (`string`): Static label displayed above the input field. Unlike the floating label, this remains fixed.
|
|
492
|
+
- `autocomplete` (`string`, default: `'off'`): The autocomplete attribute of the input.
|
|
493
|
+
- `option-value-key` (`string`, default: `"code"`): The key of the option value.
|
|
494
|
+
- `option-label-key` (`string`, default: `"name"`): The key of the option label.
|
|
495
|
+
- `option-input-value-key` (`string`, default: `"name"`): The key of the option input value.
|
|
496
|
+
- `item-height` (`number`): The height of the option list item.
|
|
497
|
+
- `max-list-height` (`number`, default: `240`): The max height of the option list.
|
|
498
|
+
- `max-list-width` (`number`, default: `250`): The max width of the option list.
|
|
499
|
+
- `min-list-height` (`number`): The min height of the option list.
|
|
500
|
+
- `min-list-width` (`number`, default: `200`): The min width of the option list.
|
|
501
|
+
- `format-input-value` (`((value: Option["code"]) => string)`): The function to format the input value.
|
|
502
|
+
|
|
503
|
+
### Events
|
|
504
|
+
|
|
505
|
+
- `@update:model-value` (payload: `value?: Option["code"] | undefined`): Emitted when the model value changes
|
|
506
|
+
|
|
507
|
+
### Slots
|
|
508
|
+
|
|
509
|
+
- `#selector-flag`: Country selector flag Bindings: `countryCode: Option["code"]` (current selected country code - Ex: `"FR"`).
|
|
510
|
+
- `#no-results`
|
|
511
|
+
- `#country-list-flag`: Country list flag Bindings: `option: Option` (country data), `isSelected: boolean` (`true` if option is selected).
|
|
512
|
+
- `#country-list-code` Bindings: `option: Option`, `isSelected: boolean`.
|
|
513
|
+
- `#country-list-name` Bindings: `option: Option`, `isSelected: boolean`.
|