@maz-ui/mcp 5.0.1-beta.0 → 5.1.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/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 +14 -0
- package/dist/index.d.mts +340 -0
- package/dist/index.d.ts +340 -0
- package/dist/index.mjs +14 -0
- package/dist/shared/mcp.DzqVbCaL.mjs +2346 -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 +76 -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 +26 -189
- package/docs/{src/components → components}/maz-btn.md +60 -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 +106 -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 +43 -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 +22 -16
- 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 +46 -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 +237 -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 +483 -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 +57 -0
- package/package.json +84 -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,462 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: MazRadioButtons
|
|
3
|
-
description: MazRadioButtons is a standalone component to select a value in a list. Made with native HTMLInputElement type radio
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# {{ $frontmatter.title }}
|
|
7
|
-
|
|
8
|
-
{{ $frontmatter.description }}
|
|
9
|
-
|
|
10
|
-
<!--@include: ./../../.vitepress/mixins/getting-started.md-->
|
|
11
|
-
|
|
12
|
-
## Basic usage
|
|
13
|
-
|
|
14
|
-
<ComponentDemo>
|
|
15
|
-
<p class="maz:mb-4">
|
|
16
|
-
Select a competition
|
|
17
|
-
</p>
|
|
18
|
-
|
|
19
|
-
<MazRadioButtons
|
|
20
|
-
v-model="selectedCompetition"
|
|
21
|
-
:options="competitions"
|
|
22
|
-
/>
|
|
23
|
-
|
|
24
|
-
<template #code>
|
|
25
|
-
|
|
26
|
-
```vue
|
|
27
|
-
<template>
|
|
28
|
-
<MazRadioButtons
|
|
29
|
-
v-model="selectedCompetition"
|
|
30
|
-
:options="competitions"
|
|
31
|
-
/>
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<script lang="ts" setup>
|
|
35
|
-
import { ref } from 'vue'
|
|
36
|
-
|
|
37
|
-
import MazRadioButtons from 'maz-ui/components/MazRadioButtons'
|
|
38
|
-
|
|
39
|
-
const selectedCompetition = ref<string>()
|
|
40
|
-
|
|
41
|
-
const competitions = [
|
|
42
|
-
{
|
|
43
|
-
value: "1",
|
|
44
|
-
label: "Ligue 1",
|
|
45
|
-
areaName: "France",
|
|
46
|
-
areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/c/c3/Flag_of_France.svg",
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
value: "2",
|
|
50
|
-
label: "Premier League",
|
|
51
|
-
areaName: "England",
|
|
52
|
-
areaEnsignUrl: "https://crests.football-data.org/770.svg",
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
value: "3",
|
|
56
|
-
label: "Bundesliga",
|
|
57
|
-
areaName: "Germany",
|
|
58
|
-
areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/b/ba/Flag_of_Germany.svg",
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
value: "4",
|
|
62
|
-
label: "Eredivisie",
|
|
63
|
-
areaName: "Netherlands",
|
|
64
|
-
areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/2/20/Flag_of_the_Netherlands.svg",
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
value: "5",
|
|
68
|
-
label: "Serie A",
|
|
69
|
-
areaName: "Italy",
|
|
70
|
-
areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/0/03/Flag_of_Italy.svg",
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
value: "6",
|
|
74
|
-
label: "Primera Division",
|
|
75
|
-
areaName: "Spain",
|
|
76
|
-
areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/9/9a/Flag_of_Spain.svg",
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
value: "7",
|
|
80
|
-
label: "Primeira Liga",
|
|
81
|
-
areaName: "Portugal",
|
|
82
|
-
areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/5/5c/Flag_of_Portugal.svg",
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
value: "8",
|
|
86
|
-
label: "UEFA Champions League",
|
|
87
|
-
areaName: "Europe",
|
|
88
|
-
areaEnsignUrl: "https://crests.football-data.org/EUR.svg",
|
|
89
|
-
}
|
|
90
|
-
]
|
|
91
|
-
</script>
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
</template>
|
|
95
|
-
</ComponentDemo>
|
|
96
|
-
|
|
97
|
-
## Custom slot template
|
|
98
|
-
|
|
99
|
-
<ComponentDemo>
|
|
100
|
-
<p class="maz:mb-4">
|
|
101
|
-
Select a competition
|
|
102
|
-
</p>
|
|
103
|
-
|
|
104
|
-
<MazRadioButtons
|
|
105
|
-
v-model="selectedCompetition"
|
|
106
|
-
:options="competitions"
|
|
107
|
-
color="secondary"
|
|
108
|
-
v-slot="{ option, selected }"
|
|
109
|
-
>
|
|
110
|
-
<div style="display: flex;">
|
|
111
|
-
<MazAvatar
|
|
112
|
-
v-if="option.areaEnsignUrl"
|
|
113
|
-
:src="option.areaEnsignUrl"
|
|
114
|
-
style="margin-right: 16px;"
|
|
115
|
-
size="0.8rem"
|
|
116
|
-
/>
|
|
117
|
-
<div style="display: flex; flex-direction: column;">
|
|
118
|
-
<span>
|
|
119
|
-
{{ option.label }}
|
|
120
|
-
</span>
|
|
121
|
-
<span :class="{ 'maz:text-muted': !selected }">
|
|
122
|
-
{{ option.areaName }}
|
|
123
|
-
</span>
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
</MazRadioButtons>
|
|
127
|
-
|
|
128
|
-
<template #code>
|
|
129
|
-
|
|
130
|
-
```html
|
|
131
|
-
<MazRadioButtons
|
|
132
|
-
v-model="selectedCompetition"
|
|
133
|
-
:options="competitions"
|
|
134
|
-
color="secondary"
|
|
135
|
-
>
|
|
136
|
-
<template #default="{ option, selected }">
|
|
137
|
-
<div style="display: flex;">
|
|
138
|
-
<MazAvatar
|
|
139
|
-
v-if="option.areaEnsignUrl"
|
|
140
|
-
:src="option.areaEnsignUrl"
|
|
141
|
-
style="margin-right: 16px;"
|
|
142
|
-
size="0.8rem"
|
|
143
|
-
/>
|
|
144
|
-
<div style="display: flex; flex-direction: column;">
|
|
145
|
-
<span>
|
|
146
|
-
{{ option.label }}
|
|
147
|
-
</span>
|
|
148
|
-
<span :class="{ 'maz:text-muted': !selected }">
|
|
149
|
-
{{ option.areaName }}
|
|
150
|
-
</span>
|
|
151
|
-
</div>
|
|
152
|
-
</div>
|
|
153
|
-
</template>
|
|
154
|
-
</MazRadioButtons>
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
</template>
|
|
158
|
-
|
|
159
|
-
</ComponentDemo>
|
|
160
|
-
|
|
161
|
-
## Orientation - Column
|
|
162
|
-
|
|
163
|
-
<ComponentDemo>
|
|
164
|
-
<p class="maz:mb-4">
|
|
165
|
-
Select a competition
|
|
166
|
-
</p>
|
|
167
|
-
|
|
168
|
-
<MazRadioButtons
|
|
169
|
-
v-model="selectedCompetition"
|
|
170
|
-
:options="competitions"
|
|
171
|
-
orientation="col"
|
|
172
|
-
v-slot="{ option, selected }"
|
|
173
|
-
>
|
|
174
|
-
<div style="display: flex;">
|
|
175
|
-
<MazAvatar
|
|
176
|
-
v-if="option.areaEnsignUrl"
|
|
177
|
-
:src="option.areaEnsignUrl"
|
|
178
|
-
style="margin-right: 16px;"
|
|
179
|
-
size="0.8rem"
|
|
180
|
-
/>
|
|
181
|
-
<div style="display: flex; flex-direction: column;">
|
|
182
|
-
<span>
|
|
183
|
-
{{ option.label }}
|
|
184
|
-
</span>
|
|
185
|
-
<span :class="{ 'maz:text-muted': !selected }">
|
|
186
|
-
{{ option.areaName }}
|
|
187
|
-
</span>
|
|
188
|
-
</div>
|
|
189
|
-
</div>
|
|
190
|
-
</MazRadioButtons>
|
|
191
|
-
|
|
192
|
-
<template #code>
|
|
193
|
-
|
|
194
|
-
```vue
|
|
195
|
-
<template>
|
|
196
|
-
<MazRadioButtons
|
|
197
|
-
v-model="selectedCompetition"
|
|
198
|
-
:options="competitions"
|
|
199
|
-
orientation="col | row"
|
|
200
|
-
v-slot="{ option, selected }"
|
|
201
|
-
>
|
|
202
|
-
<div style="display: flex;">
|
|
203
|
-
<MazAvatar
|
|
204
|
-
v-if="option.areaEnsignUrl"
|
|
205
|
-
:src="option.areaEnsignUrl"
|
|
206
|
-
style="margin-right: 16px;"
|
|
207
|
-
size="0.8rem"
|
|
208
|
-
/>
|
|
209
|
-
<div style="display: flex; flex-direction: column;">
|
|
210
|
-
<span>
|
|
211
|
-
{{ option.label }}
|
|
212
|
-
</span>
|
|
213
|
-
<span :class="{ 'maz:text-muted': !selected }">
|
|
214
|
-
{{ option.areaName }}
|
|
215
|
-
</span>
|
|
216
|
-
</div>
|
|
217
|
-
</div>
|
|
218
|
-
</MazRadioButtons>
|
|
219
|
-
</template>
|
|
220
|
-
|
|
221
|
-
<script lang="ts" setup>
|
|
222
|
-
import { ref } from 'vue'
|
|
223
|
-
|
|
224
|
-
import { MazRadioButtons, MazAvatar } from 'maz-ui/components'
|
|
225
|
-
|
|
226
|
-
const selectedCompetition = ref<string>()
|
|
227
|
-
|
|
228
|
-
const competitions = [
|
|
229
|
-
{
|
|
230
|
-
value: "1",
|
|
231
|
-
label: "Ligue 1",
|
|
232
|
-
areaName: "France",
|
|
233
|
-
areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/c/c3/Flag_of_France.svg",
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
value: "2",
|
|
237
|
-
label: "Premier League",
|
|
238
|
-
areaName: "England",
|
|
239
|
-
areaEnsignUrl: "https://crests.football-data.org/770.svg",
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
value: "3",
|
|
243
|
-
label: "Bundesliga",
|
|
244
|
-
areaName: "Germany",
|
|
245
|
-
areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/b/ba/Flag_of_Germany.svg",
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
value: "4",
|
|
249
|
-
label: "Eredivisie",
|
|
250
|
-
areaName: "Netherlands",
|
|
251
|
-
areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/2/20/Flag_of_the_Netherlands.svg",
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
value: "5",
|
|
255
|
-
label: "Serie A",
|
|
256
|
-
areaName: "Italy",
|
|
257
|
-
areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/0/03/Flag_of_Italy.svg",
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
value: "6",
|
|
261
|
-
label: "Primera Division",
|
|
262
|
-
areaName: "Spain",
|
|
263
|
-
areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/9/9a/Flag_of_Spain.svg",
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
value: "7",
|
|
267
|
-
label: "Primeira Liga",
|
|
268
|
-
areaName: "Portugal",
|
|
269
|
-
areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/5/5c/Flag_of_Portugal.svg",
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
value: "8",
|
|
273
|
-
label: "UEFA Champions League",
|
|
274
|
-
areaName: "Europe",
|
|
275
|
-
areaEnsignUrl: "https://crests.football-data.org/EUR.svg",
|
|
276
|
-
}
|
|
277
|
-
]
|
|
278
|
-
</script>
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
</template>
|
|
282
|
-
|
|
283
|
-
</ComponentDemo>
|
|
284
|
-
|
|
285
|
-
## Selector icon with options equal-size
|
|
286
|
-
|
|
287
|
-
This option will display a select icon on the left of the label
|
|
288
|
-
|
|
289
|
-
<ComponentDemo>
|
|
290
|
-
<MazRadioButtons
|
|
291
|
-
v-slot="{ option, selected }"
|
|
292
|
-
v-model="selectedMode"
|
|
293
|
-
:options="modeOptions"
|
|
294
|
-
selector
|
|
295
|
-
equal-size
|
|
296
|
-
block
|
|
297
|
-
class="vp-raw"
|
|
298
|
-
>
|
|
299
|
-
<div class="maz:flex maz:flex-col maz:items-start maz:p-2">
|
|
300
|
-
<h3 class="maz:mb-2 maz:text-xl maz:font-semibold">
|
|
301
|
-
{{ option.label }}
|
|
302
|
-
</h3>
|
|
303
|
-
<span :class="{ 'maz:text-muted': !selected }">
|
|
304
|
-
{{ option.description }}
|
|
305
|
-
</span>
|
|
306
|
-
</div>
|
|
307
|
-
</MazRadioButtons>
|
|
308
|
-
|
|
309
|
-
<template #code>
|
|
310
|
-
|
|
311
|
-
```vue
|
|
312
|
-
<template>
|
|
313
|
-
<MazRadioButtons
|
|
314
|
-
v-slot="{ option, selected }"
|
|
315
|
-
v-model="selectedMode"
|
|
316
|
-
:options="modeOptions"
|
|
317
|
-
selector
|
|
318
|
-
equal-size
|
|
319
|
-
block
|
|
320
|
-
>
|
|
321
|
-
<div class="flex flex-col items-start p-2">
|
|
322
|
-
<h3 class="mb-2 text-xl font-semibold">
|
|
323
|
-
{{ option.label }}
|
|
324
|
-
</h3>
|
|
325
|
-
<span :class="{ 'text-muted': !selected }">
|
|
326
|
-
{{ option.description }}
|
|
327
|
-
</span>
|
|
328
|
-
</div>
|
|
329
|
-
</MazRadioButtons>
|
|
330
|
-
</template>
|
|
331
|
-
|
|
332
|
-
<script lang="ts" setup>
|
|
333
|
-
import { ref } from 'vue'
|
|
334
|
-
import { type MazRadioButtonsOption } from 'maz-ui/components/MazRadioButtons'
|
|
335
|
-
|
|
336
|
-
const selectedMode = ref('scores')
|
|
337
|
-
|
|
338
|
-
const modeOptions: MazRadioButtonsOption[] = [
|
|
339
|
-
{
|
|
340
|
-
label: 'Scores',
|
|
341
|
-
value: 'scores',
|
|
342
|
-
description:
|
|
343
|
-
'Predict the score of matches. If you find the outcome of the match you win 5 points, if you get the perfect score you double your score!',
|
|
344
|
-
style: 'min-width: 250px;'
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
label: 'Cotes',
|
|
348
|
-
value: 'odds',
|
|
349
|
-
description:
|
|
350
|
-
'Predict with match odds. If you find the correct winner of the match you earn the points associated with the rating, if you have the perfect score you double your score.',
|
|
351
|
-
style: 'min-width: 250px;'
|
|
352
|
-
},
|
|
353
|
-
]
|
|
354
|
-
</script>
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
</template>
|
|
358
|
-
</ComponentDemo>
|
|
359
|
-
|
|
360
|
-
## Types
|
|
361
|
-
|
|
362
|
-
### options
|
|
363
|
-
|
|
364
|
-
The options prop is an array of `ButtonsRadioOption` type
|
|
365
|
-
|
|
366
|
-
```ts
|
|
367
|
-
export type ButtonsRadioOption = {
|
|
368
|
-
/** The label of the option */
|
|
369
|
-
label: string
|
|
370
|
-
/** The value of the option */
|
|
371
|
-
value: string | number | boolean
|
|
372
|
-
/** The classes to apply to the option */
|
|
373
|
-
classes?: any
|
|
374
|
-
/** The style to apply to the option */
|
|
375
|
-
style?: StyleValue
|
|
376
|
-
} & Record<string, unknown>
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
## Accessibility
|
|
380
|
-
|
|
381
|
-
The root element is a `radiogroup` of native radio inputs: pass an `aria-label` (or `aria-labelledby`) to name it. The `hint` describes the group (`aria-describedby`) and `error` sets `aria-invalid`. The arrows move between the options natively.
|
|
382
|
-
|
|
383
|
-
When no `name` is provided, each instance gets a unique one, so two groups of the same page never share their radios.
|
|
384
|
-
|
|
385
|
-
<!--@include: ./../../.vitepress/generated-docs/maz-radio-buttons.doc.md-->
|
|
386
|
-
|
|
387
|
-
<script lang="ts" setup>
|
|
388
|
-
import { ref } from 'vue'
|
|
389
|
-
import MazRadioButtons from 'maz-ui/components/MazRadioButtons'
|
|
390
|
-
|
|
391
|
-
const selectedCompetition = ref<string>()
|
|
392
|
-
|
|
393
|
-
const competitions = [
|
|
394
|
-
{
|
|
395
|
-
value: "1",
|
|
396
|
-
label: "Ligue 1",
|
|
397
|
-
areaName: "France",
|
|
398
|
-
areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/c/c3/Flag_of_France.svg",
|
|
399
|
-
},
|
|
400
|
-
{
|
|
401
|
-
value: "2",
|
|
402
|
-
label: "Premier League",
|
|
403
|
-
areaName: "England",
|
|
404
|
-
areaEnsignUrl: "https://crests.football-data.org/770.svg",
|
|
405
|
-
},
|
|
406
|
-
{
|
|
407
|
-
value: "3",
|
|
408
|
-
label: "Bundesliga",
|
|
409
|
-
areaName: "Germany",
|
|
410
|
-
areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/b/ba/Flag_of_Germany.svg",
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
value: "4",
|
|
414
|
-
label: "Eredivisie",
|
|
415
|
-
areaName: "Netherlands",
|
|
416
|
-
areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/2/20/Flag_of_the_Netherlands.svg",
|
|
417
|
-
},
|
|
418
|
-
{
|
|
419
|
-
value: "5",
|
|
420
|
-
label: "Serie A",
|
|
421
|
-
areaName: "Italy",
|
|
422
|
-
areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/0/03/Flag_of_Italy.svg",
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
value: "6",
|
|
426
|
-
label: "Primera Division",
|
|
427
|
-
areaName: "Spain",
|
|
428
|
-
areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/en/9/9a/Flag_of_Spain.svg",
|
|
429
|
-
},
|
|
430
|
-
{
|
|
431
|
-
value: "7",
|
|
432
|
-
label: "Primeira Liga",
|
|
433
|
-
areaName: "Portugal",
|
|
434
|
-
areaEnsignUrl: "https://upload.wikimedia.org/wikipedia/commons/5/5c/Flag_of_Portugal.svg",
|
|
435
|
-
},
|
|
436
|
-
{
|
|
437
|
-
value: "8",
|
|
438
|
-
label: "UEFA Champions League",
|
|
439
|
-
areaName: "Europe",
|
|
440
|
-
areaEnsignUrl: "https://crests.football-data.org/EUR.svg",
|
|
441
|
-
}
|
|
442
|
-
]
|
|
443
|
-
|
|
444
|
-
const selectedMode = ref('scores')
|
|
445
|
-
|
|
446
|
-
const modeOptions = [
|
|
447
|
-
{
|
|
448
|
-
label: 'Scores',
|
|
449
|
-
value: 'scores',
|
|
450
|
-
description:
|
|
451
|
-
'Predict the score of matches. If you find the outcome of the match you win 5 points, if you get the perfect score you double your score!',
|
|
452
|
-
style: 'min-width: 250px;'
|
|
453
|
-
},
|
|
454
|
-
{
|
|
455
|
-
label: 'Cotes',
|
|
456
|
-
value: 'odds',
|
|
457
|
-
description:
|
|
458
|
-
'Predict with match odds. If you find the correct winner of the match you earn the points associated with the rating, if you have the perfect score you double your score.',
|
|
459
|
-
style: 'min-width: 250px;'
|
|
460
|
-
},
|
|
461
|
-
]
|
|
462
|
-
</script>
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: MazRadio
|
|
3
|
-
description: MazRadio is a standalone component
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# {{ $frontmatter.title }}
|
|
7
|
-
|
|
8
|
-
{{ $frontmatter.description }}
|
|
9
|
-
|
|
10
|
-
<!--@include: ./../../.vitepress/mixins/getting-started.md-->
|
|
11
|
-
|
|
12
|
-
## Basic usage
|
|
13
|
-
|
|
14
|
-
`v-model="{{chosenColor ?? 'undefined'}}"`
|
|
15
|
-
|
|
16
|
-
<div class="maz:flex maz:flex-col maz:gap-2">
|
|
17
|
-
<MazRadio
|
|
18
|
-
v-for="color in colors"
|
|
19
|
-
v-model="chosenColor"
|
|
20
|
-
name="chosenColor"
|
|
21
|
-
:color="color"
|
|
22
|
-
:key="color"
|
|
23
|
-
:value="color"
|
|
24
|
-
>
|
|
25
|
-
{{ color }}
|
|
26
|
-
</MazRadio>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
::: details View code
|
|
30
|
-
|
|
31
|
-
```vue
|
|
32
|
-
<script lang="ts" setup>
|
|
33
|
-
import MazRadio from 'maz-ui/components/MazRadio'
|
|
34
|
-
import { ref } from 'vue'
|
|
35
|
-
|
|
36
|
-
const chosenColor = ref('primary')
|
|
37
|
-
const chosenSize = ref('mini')
|
|
38
|
-
|
|
39
|
-
const colors: Color[] = [
|
|
40
|
-
'primary',
|
|
41
|
-
'secondary',
|
|
42
|
-
'info',
|
|
43
|
-
'success',
|
|
44
|
-
'warning',
|
|
45
|
-
'destructive',
|
|
46
|
-
'accent',
|
|
47
|
-
'contrast',
|
|
48
|
-
]
|
|
49
|
-
</script>
|
|
50
|
-
|
|
51
|
-
<template>
|
|
52
|
-
<MazRadio
|
|
53
|
-
v-for="color in colors"
|
|
54
|
-
:key="color"
|
|
55
|
-
v-model="chosenColor"
|
|
56
|
-
name="chosenColor"
|
|
57
|
-
:color="color"
|
|
58
|
-
:value="color"
|
|
59
|
-
>
|
|
60
|
-
{{ color }}
|
|
61
|
-
</MazRadio>
|
|
62
|
-
</template>
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
:::
|
|
66
|
-
|
|
67
|
-
## Sizing
|
|
68
|
-
|
|
69
|
-
`v-model="{{chosenSize ?? 'undefined'}}"`
|
|
70
|
-
|
|
71
|
-
<div class="maz:flex maz:flex-col maz:gap-2">
|
|
72
|
-
<MazRadio
|
|
73
|
-
v-for="size in sizes"
|
|
74
|
-
v-model="chosenSize"
|
|
75
|
-
name="chosenSize"
|
|
76
|
-
:key="size"
|
|
77
|
-
:size="size"
|
|
78
|
-
:value="size"
|
|
79
|
-
:label="size"
|
|
80
|
-
/>
|
|
81
|
-
</div>
|
|
82
|
-
|
|
83
|
-
::: details View code
|
|
84
|
-
|
|
85
|
-
```vue
|
|
86
|
-
<script lang="ts" setup>
|
|
87
|
-
import MazRadio from 'maz-ui/components/MazRadio'
|
|
88
|
-
import type { Size } from 'maz-ui/components'
|
|
89
|
-
import { ref } from 'vue'
|
|
90
|
-
|
|
91
|
-
const chosenSize = ref('mini')
|
|
92
|
-
|
|
93
|
-
const sizes: Size[] = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
|
|
94
|
-
</script>
|
|
95
|
-
|
|
96
|
-
<template>
|
|
97
|
-
<MazRadio
|
|
98
|
-
v-for="size in sizes"
|
|
99
|
-
:key="size"
|
|
100
|
-
v-model="chosenSize"
|
|
101
|
-
name="chosenSize"
|
|
102
|
-
:size="size"
|
|
103
|
-
:value="size"
|
|
104
|
-
:label="size"
|
|
105
|
-
/>
|
|
106
|
-
</template>
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
:::
|
|
110
|
-
|
|
111
|
-
## Disabled
|
|
112
|
-
|
|
113
|
-
<div class="maz:flex maz:flex-col maz:gap-2">
|
|
114
|
-
<MazRadio disabled name="disabled" value="disabled2">
|
|
115
|
-
disabled
|
|
116
|
-
</MazRadio>
|
|
117
|
-
|
|
118
|
-
<MazRadio model-value="disabled" disabled name="disabled" value="disabled">
|
|
119
|
-
disabled & selected
|
|
120
|
-
</MazRadio>
|
|
121
|
-
</div>
|
|
122
|
-
|
|
123
|
-
<script lang="ts" setup>
|
|
124
|
-
import { ref } from 'vue'
|
|
125
|
-
const chosenColor = ref()
|
|
126
|
-
const chosenSize = ref()
|
|
127
|
-
|
|
128
|
-
const colors: Color[] = [
|
|
129
|
-
'primary',
|
|
130
|
-
'secondary',
|
|
131
|
-
'info',
|
|
132
|
-
'success',
|
|
133
|
-
'warning',
|
|
134
|
-
'destructive',
|
|
135
|
-
'accent',
|
|
136
|
-
'contrast',
|
|
137
|
-
]
|
|
138
|
-
|
|
139
|
-
const sizes: Size[] = ['mini', 'xs', 'sm', 'md', 'lg', 'xl']
|
|
140
|
-
</script>
|
|
141
|
-
|
|
142
|
-
<!--@include: ./../../.vitepress/generated-docs/maz-radio.doc.md-->
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: MazReadingProgressBar
|
|
3
|
-
description: MazReadingProgressBar is a standalone component to display a reading progress bar
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# {{ $frontmatter.title }}
|
|
7
|
-
|
|
8
|
-
{{ $frontmatter.description }}
|
|
9
|
-
|
|
10
|
-
<!--@include: ./../../.vitepress/mixins/getting-started.md-->
|
|
11
|
-
|
|
12
|
-
This component use the `<Teleport />` component to move the progress bar to the top of the page. You can set the `teleport-selector` prop to change the target of the teleportation.
|
|
13
|
-
|
|
14
|
-
## Basic usage
|
|
15
|
-
|
|
16
|
-
Look at the top of the page to see the component in action (scroll in page to inscrease progress bar width).
|
|
17
|
-
|
|
18
|
-
<MazReadingProgressBar content-selector=".VPDoc" teleport-selector="#app" />
|
|
19
|
-
|
|
20
|
-
```vue
|
|
21
|
-
<script lang="ts" setup>
|
|
22
|
-
import MazReadingProgressBar from 'maz-ui/components/MazReadingProgressBar'
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<template>
|
|
26
|
-
<MazReadingProgressBar content-selector=".VPDoc" teleport-selector="#app" />
|
|
27
|
-
</template>
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Types
|
|
31
|
-
|
|
32
|
-
### Props
|
|
33
|
-
|
|
34
|
-
```ts
|
|
35
|
-
export interface Props {
|
|
36
|
-
/**
|
|
37
|
-
* Height of the progress bar
|
|
38
|
-
* @default 4px
|
|
39
|
-
*/
|
|
40
|
-
height?: string
|
|
41
|
-
/**
|
|
42
|
-
* Color of the progress bar
|
|
43
|
-
* @default primary
|
|
44
|
-
*/
|
|
45
|
-
color?: Color
|
|
46
|
-
/**
|
|
47
|
-
* Selector of the element to teleport the progress bar
|
|
48
|
-
* @default body
|
|
49
|
-
*/
|
|
50
|
-
teleportSelector?: string
|
|
51
|
-
/**
|
|
52
|
-
* Selector of the element to get the height
|
|
53
|
-
* @default body
|
|
54
|
-
*/
|
|
55
|
-
contentSelector?: string
|
|
56
|
-
/**
|
|
57
|
-
* Offset of the progress bar
|
|
58
|
-
* @default 0
|
|
59
|
-
*/
|
|
60
|
-
offset?: number
|
|
61
|
-
/**
|
|
62
|
-
* Class of the progress bar
|
|
63
|
-
* @default undefined
|
|
64
|
-
*/
|
|
65
|
-
barClass?: HTMLAttributes['class']
|
|
66
|
-
/**
|
|
67
|
-
* Instead of using the height of the content with a selector, you can set a scroll distance
|
|
68
|
-
* @default undefined
|
|
69
|
-
*/
|
|
70
|
-
distance?: number
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
<!--@include: ./../../.vitepress/generated-docs/maz-reading-progress-bar.doc.md-->
|