@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,15 +1,16 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: MazUiProvider
|
|
3
|
-
description: A component-based alternative to the MazUi plugin for initializing theme and translations, ideal for lazy-loaded pages and micro-frontends.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
- name: keywords
|
|
7
|
-
content: maz-ui provider, vue provider component, lazy loading, theme provider, translations provider, tree-shaking, code splitting, maz-ui
|
|
2
|
+
title: "MazUiProvider"
|
|
3
|
+
description: "A component-based alternative to the MazUi plugin for initializing theme and translations, ideal for lazy-loaded pages and micro-frontends."
|
|
4
|
+
package: "maz-ui"
|
|
5
|
+
url: "https://maz-ui.com/guide/maz-ui-provider"
|
|
8
6
|
---
|
|
9
7
|
|
|
10
|
-
#
|
|
8
|
+
# MazUiProvider
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
> A component-based alternative to the MazUi plugin for initializing theme and translations, ideal for lazy-loaded pages and micro-frontends.
|
|
11
|
+
|
|
12
|
+
- Package: `maz-ui`
|
|
13
|
+
- Web: https://maz-ui.com/guide/maz-ui-provider
|
|
13
14
|
|
|
14
15
|
## Why MazUiProvider?
|
|
15
16
|
|
|
@@ -90,8 +91,8 @@ The entire Maz-UI setup is now code-split into the Dashboard chunk.
|
|
|
90
91
|
|
|
91
92
|
| Prop | Type | Required | Description |
|
|
92
93
|
|------|------|----------|-------------|
|
|
93
|
-
| `theme` | `object` | Yes | Theme configuration. Must include `preset`. See [Theming](
|
|
94
|
-
| `translations` | `object` | Yes | Translations configuration. Must include `locale` and `messages` with at least the current locale's messages. See [Translations](
|
|
94
|
+
| `theme` | `object` | Yes | Theme configuration. Must include `preset`. See [Theming](../ecosystem/themes.md) for details. |
|
|
95
|
+
| `translations` | `object` | Yes | Translations configuration. Must include `locale` and `messages` with at least the current locale's messages. See [Translations](../ecosystem/translations.md) for details. |
|
|
95
96
|
|
|
96
97
|
### theme
|
|
97
98
|
|
|
@@ -109,9 +110,9 @@ interface ThemeOptions {
|
|
|
109
110
|
}
|
|
110
111
|
```
|
|
111
112
|
|
|
112
|
-
|
|
113
|
+
**Warning: Why is preset required?**
|
|
114
|
+
|
|
113
115
|
Providing the theme preset synchronously avoids FOUC (Flash of Unstyled Content). Without a preset, components would render without their CSS variables until the theme loads, causing a visible flash.
|
|
114
|
-
:::
|
|
115
116
|
|
|
116
117
|
### translations
|
|
117
118
|
|
|
@@ -124,7 +125,8 @@ interface TranslationsOptions {
|
|
|
124
125
|
}
|
|
125
126
|
```
|
|
126
127
|
|
|
127
|
-
|
|
128
|
+
**Warning: Why are locale and messages required?**
|
|
129
|
+
|
|
128
130
|
By default, Maz-UI does not bundle any translations to keep your bundle small. Translation files are loaded asynchronously on demand.
|
|
129
131
|
|
|
130
132
|
If you don't provide the messages for the current locale synchronously, components like `MazInputPhoneNumber` will briefly show translation keys (e.g. `inputPhoneNumber.countrySelect.placeholder`) instead of actual text until the async loading completes.
|
|
@@ -137,7 +139,6 @@ import { fr } from '@maz-ui/translations'
|
|
|
137
139
|
// Messages for 'fr' are available immediately -- no flash
|
|
138
140
|
const translations = { locale: 'fr', messages: { fr } }
|
|
139
141
|
```
|
|
140
|
-
:::
|
|
141
142
|
|
|
142
143
|
## Plugin vs Provider
|
|
143
144
|
|
|
@@ -153,7 +154,7 @@ const translations = { locale: 'fr', messages: { fr } }
|
|
|
153
154
|
|
|
154
155
|
- Your app uses Maz-UI components on most or all pages
|
|
155
156
|
- You want a simple, one-time setup
|
|
156
|
-
- You're using Nuxt (the [Nuxt module](
|
|
157
|
+
- You're using Nuxt (the [Nuxt module](../ecosystem/nuxt.md) handles everything automatically)
|
|
157
158
|
|
|
158
159
|
### When to use the provider
|
|
159
160
|
|
|
@@ -220,7 +221,7 @@ const locale = ref('fr')
|
|
|
220
221
|
messages: { fr },
|
|
221
222
|
}"
|
|
222
223
|
>
|
|
223
|
-
<div class="
|
|
224
|
+
<div class="bg-surface text-foreground p-4">
|
|
224
225
|
<h1>My Dashboard</h1>
|
|
225
226
|
<MazBtn color="primary">Action</MazBtn>
|
|
226
227
|
<MazInput placeholder="Search..." />
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Maz-UI v5.0.0 Migration Guide
|
|
3
|
-
description: What changes for you when upgrading from Maz-UI v4 to v5
|
|
2
|
+
title: "Maz-UI v5.0.0 Migration Guide"
|
|
3
|
+
description: "What changes for you when upgrading from Maz-UI v4 to v5"
|
|
4
|
+
package: "maz-ui"
|
|
5
|
+
url: "https://maz-ui.com/guide/migration-v5"
|
|
4
6
|
---
|
|
5
7
|
|
|
6
|
-
#
|
|
8
|
+
# Maz-UI v5.0.0 Migration Guide
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
> What changes for you when upgrading from Maz-UI v4 to v5
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
- Package: `maz-ui`
|
|
13
|
+
- Web: https://maz-ui.com/guide/migration-v5
|
|
14
|
+
|
|
15
|
+
Maz-UI v5 is a major release. For **most consumers** the migration is short - you keep installing the package, importing its styles, using the components. Below is what actually changes for you.
|
|
16
|
+
|
|
17
|
+
**Warning: Solo maintainer notice**
|
|
18
|
+
|
|
19
|
+
Maz-UI is maintained by a single developer. After the v5 stable release, **v4 will no longer receive any support** - no security fixes, no backports. Please plan your upgrade.
|
|
13
20
|
|
|
14
21
|
## Run the upgrade tool
|
|
15
22
|
|
|
@@ -31,7 +38,7 @@ See the full list of transforms in the [`@maz-ui/upgrade` README](https://github
|
|
|
31
38
|
|
|
32
39
|
## Migrate with the Maz-UI MCP server
|
|
33
40
|
|
|
34
|
-
You don't have to scroll through this page by hand. The official **[`@maz-ui/mcp`](
|
|
41
|
+
You don't have to scroll through this page by hand. The official **[`@maz-ui/mcp`](../ecosystem/mcp.md)** server exposes this guide (and every other Maz-UI doc - components, composables, plugins, helpers) to your AI assistant via the Model Context Protocol. Once it's wired up, the assistant can search the migration guide, pull the exact section it needs, and patch your codebase with full context on what changed in v5.
|
|
35
42
|
|
|
36
43
|
### One-time setup
|
|
37
44
|
|
|
@@ -40,7 +47,7 @@ You don't have to scroll through this page by hand. The official **[`@maz-ui/mcp
|
|
|
40
47
|
claude mcp add maz-ui npx @maz-ui/mcp --scope project
|
|
41
48
|
```
|
|
42
49
|
|
|
43
|
-
For Cursor, Windsurf, VS Code Copilot, Cline and Claude Desktop, see the [MCP guide](
|
|
50
|
+
For Cursor, Windsurf, VS Code Copilot, Cline and Claude Desktop, see the [MCP guide](../ecosystem/mcp.md#ai-assistant-configuration). Then restart your assistant.
|
|
44
51
|
|
|
45
52
|
### A migration flow that works
|
|
46
53
|
|
|
@@ -56,9 +63,9 @@ For Cursor, Windsurf, VS Code Copilot, Cline and Claude Desktop, see the [MCP gu
|
|
|
56
63
|
|
|
57
64
|
> Apply the codemod for "Required changes" sections 2, 3, 6 and 14 (CSS subpath, `rounded-size="base"`, `left-icon`/`right-icon`, Nuxt `injectMainCss`). Show me a diff before saving.
|
|
58
65
|
|
|
59
|
-
4. **Discuss the judgment calls.** For sections that have more than a rename
|
|
66
|
+
4. **Discuss the judgment calls.** For sections that have more than a rename - `MazIcon` API, `MazChart` `update-mode`, theme preset reshape - let the assistant ask before rewriting:
|
|
60
67
|
|
|
61
|
-
> For "Required changes" sections 4, 8 and 10
|
|
68
|
+
> For "Required changes" sections 4, 8 and 10-12, do not patch automatically. Tell me which of my call sites are affected and propose options.
|
|
62
69
|
|
|
63
70
|
5. **Verify.** After patches:
|
|
64
71
|
|
|
@@ -71,18 +78,18 @@ For Cursor, Windsurf, VS Code Copilot, Cline and Claude Desktop, see the [MCP gu
|
|
|
71
78
|
- *"I see `hsl(var(--maz-primary))` in my CSS. Apply the v5 fix everywhere with the alpha cases handled via `color-mix`."*
|
|
72
79
|
- *"Compare my `MazIcon` usages against the v5 API and split the codemod into a deterministic part (URL/Vue component) and a part you want me to confirm."*
|
|
73
80
|
|
|
74
|
-
The MCP server is read-only
|
|
81
|
+
The MCP server is read-only - it ships docs, not code edits - so the assistant still has to write the patches against your repo with whatever tooling it has. But it removes the "did I miss a section?" risk: the guide and the rest of the v5 docs are always one tool call away.
|
|
75
82
|
|
|
76
83
|
## Migration checklist
|
|
77
84
|
|
|
78
85
|
1. Bump **Node to ≥ 22.12** and confirm your audience has modern browsers (see below).
|
|
79
86
|
2. If your **custom CSS** uses `hsl(var(--maz-<color>))`, simplify to `var(--maz-<color>)`.
|
|
80
87
|
3. Rename `import 'maz-ui/styles'` to `import 'maz-ui/style.css'` (and `maz-ui/aos-styles` → `maz-ui/aos.css`).
|
|
81
|
-
4. Replace any `rounded-size="base"` with `rounded-size="md"` (or drop the prop
|
|
88
|
+
4. Replace any `rounded-size="base"` with `rounded-size="md"` (or drop the prop - the new default is visually identical).
|
|
82
89
|
5. Replace any **numeric `MazBadge` size** (`size="0.8rem"`, `size="1.2em"`, …) with one of the standardized keywords (`'mini' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'`).
|
|
83
|
-
6. **`MazIcon` API simplified**
|
|
84
|
-
7. Rename **`left-icon` / `right-icon`** to **`start-icon` / `end-icon`** (and the matching slots / `--has-*-icon` classes) on `MazBtn`, `MazInput`, `MazLink`, `MazContainer`, `MazSelect`. Same idea for `MazCard`'s `footer-align` and `MazDrawer`'s `variant`
|
|
85
|
-
8. **`MazChart`** drops `vue-chartjs` (lighter bundle, no eager registration of unused chart types). The `update-mode` prop now defaults to `'none'`
|
|
90
|
+
6. **`MazIcon` API simplified** - drop `name`, `path` and `src` props; use a single `icon` prop that accepts a Vue component, a URL/`data:` URI, or a raw SVG string.
|
|
91
|
+
7. Rename **`left-icon` / `right-icon`** to **`start-icon` / `end-icon`** (and the matching slots / `--has-*-icon` classes) on `MazBtn`, `MazInput`, `MazLink`, `MazContainer`, `MazSelect`. Same idea for `MazCard`'s `footer-align` and `MazDrawer`'s `variant` - `'left' | 'right'` becomes `'start' | 'end'`.
|
|
92
|
+
8. **`MazChart`** drops `vue-chartjs` (lighter bundle, no eager registration of unused chart types). The `update-mode` prop now defaults to `'none'` - pass `update-mode="default"` if you want animated data updates.
|
|
86
93
|
9. **`MazAvatar` size scale fixed.** A CSS-unit `size` now renders at its real value (`size="2rem"` is a 32px avatar, it was ~96px before). Multiply your unit values by 3 to keep the same render, or switch to a `MazSize` keyword (`'mini' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'`). The upgrade tool does the ×3 rewrite for you on static values.
|
|
87
94
|
10. Rename **`MazPullToRefresh`**'s `on-click` prop to `on-refresh` (handled by the upgrade tool).
|
|
88
95
|
11. Replace bare **`from 'maz-ui'`** utility imports with **`from '@maz-ui/utils'`** (the root re-export of utils was removed; handled by the upgrade tool). Components/composables/directives/plugins stay on their subpaths; types remain importable from `maz-ui`.
|
|
@@ -114,7 +121,7 @@ There is no polyfill path. If your audience still relies on older browsers, stay
|
|
|
114
121
|
|
|
115
122
|
### 1. `hsl(var(--maz-<color>))` → `var(--maz-<color>)` in your CSS
|
|
116
123
|
|
|
117
|
-
The biggest
|
|
124
|
+
The biggest - and usually only - change to chase down in your codebase.
|
|
118
125
|
|
|
119
126
|
**In v4** the CSS variables injected by `@maz-ui/themes` held raw HSL channels (`210 100% 56%`), so you had to wrap them yourself:
|
|
120
127
|
|
|
@@ -207,27 +214,27 @@ rg "rounded-?size\s*=\s*['\"]base['\"]" src/
|
|
|
207
214
|
<MazIcon :icon="MazStar" />
|
|
208
215
|
|
|
209
216
|
<!-- v5 -->
|
|
210
|
-
<MazIcon icon="/home.svg" /> <!-- relative URL
|
|
217
|
+
<MazIcon icon="/home.svg" /> <!-- relative URL - `mazIconPath` is prepended in SSR -->
|
|
211
218
|
<MazIcon icon="/icons/home.svg" /> <!-- absolute path -->
|
|
212
219
|
<MazIcon icon="/assets/star.svg" />
|
|
213
220
|
<MazIcon :icon="MazStar" /> <!-- unchanged -->
|
|
214
221
|
```
|
|
215
222
|
|
|
216
|
-
The `mazIconPath` `provide` (and Nuxt's `mazUi.general.defaultMazIconPath`) is still honored
|
|
223
|
+
The `mazIconPath` `provide` (and Nuxt's `mazUi.general.defaultMazIconPath`) is still honored - it now acts as a **base URL prefix** for relative URL icons, mainly useful in SSR where `fetch('/icons/home.svg')` cannot resolve without a host.
|
|
217
224
|
|
|
218
225
|
New props:
|
|
219
226
|
|
|
220
|
-
- `fallback`
|
|
221
|
-
- `svg-attributes`
|
|
222
|
-
- `flip-icon-for-rtl`
|
|
227
|
+
- `fallback` - same shape as `icon`. Used when `icon` is missing or fails to load. Defaults to `MazQuestionMarkCircle`.
|
|
228
|
+
- `svg-attributes` - extra attributes injected onto the rendered `<svg>`.
|
|
229
|
+
- `flip-icon-for-rtl` - mirror the icon horizontally when the document direction is RTL (useful for chevrons/arrows).
|
|
223
230
|
|
|
224
231
|
Removed:
|
|
225
232
|
|
|
226
233
|
- `loaded` and `unloaded` events (only `error` remains, useful for telemetry/fallback wiring).
|
|
227
234
|
|
|
228
|
-
The `<MazIcon>` rendering also got a small a11y polish
|
|
235
|
+
The `<MazIcon>` rendering also got a small a11y polish - it sets `aria-hidden="true"` by default and switches to `role="img"` (without `aria-hidden`) automatically when an `aria-label` is provided.
|
|
229
236
|
|
|
230
|
-
### 5. New raw icon import path
|
|
237
|
+
### 5. New raw icon import path - `@maz-ui/icons/raw/*`
|
|
231
238
|
|
|
232
239
|
Each bundled icon is now also exported as a **raw SVG string** under the `raw/` subpath. Pass it to `<MazIcon :icon="…" />` to inline the SVG without paying the cost of a Vue component or an async chunk.
|
|
233
240
|
|
|
@@ -242,14 +249,14 @@ import { MazStar } from '@maz-ui/icons/raw/MazStar'
|
|
|
242
249
|
</template>
|
|
243
250
|
```
|
|
244
251
|
|
|
245
|
-
The existing `static/` (eager Vue component) and `lazy/` (async Vue component) entries are still available
|
|
252
|
+
The existing `static/` (eager Vue component) and `lazy/` (async Vue component) entries are still available - pick what fits the situation. See the [icons guide](../ecosystem/icons/index.md#raw-svg-strings-new-in-v5) for the full decision matrix.
|
|
246
253
|
|
|
247
|
-
### 6. Logical direction props
|
|
254
|
+
### 6. Logical direction props - `left-icon`/`right-icon` → `start-icon`/`end-icon`
|
|
248
255
|
|
|
249
256
|
To make components RTL-correct out of the box, every prop / slot / class that names a *visual* edge has been renamed to a *logical* edge:
|
|
250
257
|
|
|
251
258
|
- **`left` / `right`** describe a physical position; they don't flip when `dir="rtl"`.
|
|
252
|
-
- **`start` / `end`** follow the inline direction
|
|
259
|
+
- **`start` / `end`** follow the inline direction - `start` is the side where reading begins (left in LTR, right in RTL).
|
|
253
260
|
|
|
254
261
|
This is consistent with native CSS (`margin-inline-start`, `padding-inline-end`, `text-align: start`) and with how design systems like Radix UI and MUI handle direction.
|
|
255
262
|
|
|
@@ -263,7 +270,7 @@ This is consistent with native CSS (`margin-inline-start`, `padding-inline-end`,
|
|
|
263
270
|
| `MazContainer` | `left-icon` / `right-icon` props, `#icon-left` / `#icon-right` slots | `start-icon` / `end-icon` props, `#icon-start` / `#icon-end` slots |
|
|
264
271
|
| `MazSelect` | `#left-icon` / `#right-icon` slots | `#start-icon` / `#end-icon` slots |
|
|
265
272
|
| `MazCard` | `footer-align: 'left' \| 'right'` | `footer-align: 'start' \| 'end'` |
|
|
266
|
-
| `MazDrawer` | `variant: 'left' \| 'right' \| 'top' \| 'bottom'` | `variant: 'start' \| 'end' \| 'top' \| 'bottom'` (`top` / `bottom` unchanged
|
|
273
|
+
| `MazDrawer` | `variant: 'left' \| 'right' \| 'top' \| 'bottom'` | `variant: 'start' \| 'end' \| 'top' \| 'bottom'` (`top` / `bottom` unchanged - physical) |
|
|
267
274
|
|
|
268
275
|
`top` and `bottom` are intentionally kept (block-axis edges that don't flip in RTL).
|
|
269
276
|
|
|
@@ -295,9 +302,9 @@ If you target maz-ui's internal selectors from your own CSS, also rename:
|
|
|
295
302
|
<MazDrawer variant="end" />
|
|
296
303
|
```
|
|
297
304
|
|
|
298
|
-
|
|
305
|
+
**Warning: Icon names**
|
|
306
|
+
|
|
299
307
|
In v4, a string icon prop (`left-icon="user"`) was an icon **name**, resolved to `${mazIconPath}/user.svg`. In v5, a string is a **URL** or a raw SVG: a bare name renders nothing. Use the URL of the same file (`start-icon="/user.svg"`, `mazIconPath` is still prepended to relative URLs) or an icon component. The `@maz-ui/upgrade` codemod rewrites the static values for you.
|
|
300
|
-
:::
|
|
301
308
|
|
|
302
309
|
```bash
|
|
303
310
|
# Quick search to chase down the renames
|
|
@@ -308,18 +315,18 @@ rg "(left|right)-icon|(left|right)Icon|footer-align=\"(left|right)\"|variant=\"(
|
|
|
308
315
|
|
|
309
316
|
`MazBtn`, `MazInput`, `MazLink`, `MazContainer` and `MazDropdown` all forward their `start-icon` / `end-icon` / `icon` / `dropdown-icon` to an internal `<MazIcon>`. In v5 these props now accept either:
|
|
310
317
|
|
|
311
|
-
1. **A bare value**
|
|
312
|
-
2. **A full `MazIconProps` object**
|
|
318
|
+
1. **A bare value** - Vue component, URL/`data:` URI, or raw SVG string (the same shape `MazIcon`'s `icon` prop accepts). This is the existing common case.
|
|
319
|
+
2. **A full `MazIconProps` object** - `{ icon, size, title, svgAttributes, fallback, flipIconForRtl }`. Useful when you need to override the inherited size, set a `<title>` for screen readers, or pass per-icon SVG attributes.
|
|
313
320
|
|
|
314
321
|
```vue
|
|
315
322
|
<!-- v4 only accepted a bare value -->
|
|
316
323
|
<MazBtn :left-icon="MazStar" />
|
|
317
324
|
|
|
318
|
-
<!-- v5
|
|
325
|
+
<!-- v5 - bare value still works -->
|
|
319
326
|
<MazBtn :start-icon="MazStar" />
|
|
320
327
|
<MazBtn start-icon="/icons/star.svg" />
|
|
321
328
|
|
|
322
|
-
<!-- v5
|
|
329
|
+
<!-- v5 - full props object for fine-grained control -->
|
|
323
330
|
<MazBtn
|
|
324
331
|
size="sm"
|
|
325
332
|
:start-icon="{
|
|
@@ -340,21 +347,21 @@ Falling back to passing `undefined` (or just omitting the prop) opts the icon ou
|
|
|
340
347
|
What this means for you:
|
|
341
348
|
|
|
342
349
|
- The peer dependency on `vue-chartjs` is gone. If you were importing anything from it directly, switch to `chart.js`.
|
|
343
|
-
- The `update-mode` prop now **defaults to `'none'`** (previously `'default'`). Subsequent data / options changes no longer animate by default
|
|
344
|
-
- The re-exported types (`MazChartData`, `MazChartType`, `MazChartUpdateMode`, `MazChartPlugin`, `MazChartDefaultDataPoint`) are unchanged
|
|
350
|
+
- The `update-mode` prop now **defaults to `'none'`** (previously `'default'`). Subsequent data / options changes no longer animate by default - this is what makes large dashboards stop freezing on prop updates. The initial render still animates per the chart's `options`. Pass `update-mode="default"` to restore the v4 behavior.
|
|
351
|
+
- The re-exported types (`MazChartData`, `MazChartType`, `MazChartUpdateMode`, `MazChartPlugin`, `MazChartDefaultDataPoint`) are unchanged - they now come from `chart.js` instead of `vue-chartjs` but are otherwise the same. The `ChartProps` link in the v4 docs (which pointed to `vue-chartjs/src/types.ts`) is replaced by the `MazChartProps` interface documented on the [MazChart page](../components/maz-chart.md).
|
|
345
352
|
|
|
346
353
|
```vue
|
|
347
|
-
<!-- v4
|
|
354
|
+
<!-- v4 - animated update on every data change -->
|
|
348
355
|
<MazChart :type :data :options />
|
|
349
356
|
|
|
350
|
-
<!-- v5
|
|
357
|
+
<!-- v5 - same call, but data updates skip animations by default -->
|
|
351
358
|
<MazChart :type :data :options />
|
|
352
359
|
|
|
353
|
-
<!-- v5
|
|
360
|
+
<!-- v5 - restore v4 animated updates -->
|
|
354
361
|
<MazChart :type :data :options update-mode="default" />
|
|
355
362
|
```
|
|
356
363
|
|
|
357
|
-
If you weren't using `vue-chartjs` directly and were happy with the default animation behavior on every update, you can ignore this
|
|
364
|
+
If you weren't using `vue-chartjs` directly and were happy with the default animation behavior on every update, you can ignore this - only add `update-mode="default"` where the animation matters.
|
|
358
365
|
|
|
359
366
|
### 9. `MazBadge` `size` prop now uses `MazSize`
|
|
360
367
|
|
|
@@ -378,8 +385,8 @@ Approximate mapping if you want to preserve your previous footprint:
|
|
|
378
385
|
| --- | --- |
|
|
379
386
|
| ≤ 0.65rem (~10px) | `'mini'` |
|
|
380
387
|
| 0.7rem (~11px) | `'xs'` |
|
|
381
|
-
| 0.75
|
|
382
|
-
| 0.85
|
|
388
|
+
| 0.75-0.8rem (12px) | `'sm'` |
|
|
389
|
+
| 0.85-0.9rem (~14px) | `'md'` (default) |
|
|
383
390
|
| 1rem (16px) | `'lg'` |
|
|
384
391
|
| ≥ 1.125rem (18px) | `'xl'` |
|
|
385
392
|
|
|
@@ -390,15 +397,15 @@ The `@maz-ui/upgrade` codemod rewrites the static `rem` sizes to the closest key
|
|
|
390
397
|
rg "MazBadge[^/]*size=\"[0-9]" src/
|
|
391
398
|
```
|
|
392
399
|
|
|
393
|
-
If you really need a custom size, wrap or override via your own class
|
|
400
|
+
If you really need a custom size, wrap or override via your own class - pass `size="md"` (or omit it) and apply a Tailwind text utility:
|
|
394
401
|
|
|
395
402
|
```vue
|
|
396
|
-
<MazBadge size="md" class="
|
|
403
|
+
<MazBadge size="md" class="text-[0.7rem]" />
|
|
397
404
|
```
|
|
398
405
|
|
|
399
|
-
### 10. Theme preset rename
|
|
406
|
+
### 10. Theme preset rename - `background` → `surface`, `border` → `divider`
|
|
400
407
|
|
|
401
|
-
Preset keys now use the same names that components and Tailwind utilities have used all along. There is no compatibility alias
|
|
408
|
+
Preset keys now use the same names that components and Tailwind utilities have used all along. There is no compatibility alias - rename the keys in your custom preset.
|
|
402
409
|
|
|
403
410
|
```ts
|
|
404
411
|
// v4
|
|
@@ -425,7 +432,7 @@ The runtime CSS variables follow:
|
|
|
425
432
|
| `--maz-background[-N]` | `--maz-surface[-N]` |
|
|
426
433
|
| `--maz-border[-N]` | `--maz-divider[-N]` |
|
|
427
434
|
|
|
428
|
-
Tailwind utilities `
|
|
435
|
+
Tailwind utilities `bg-surface`, `text-surface-700`, `border-divider` are stable - they pointed at these renamed vars even in v4 and continue to work.
|
|
429
436
|
|
|
430
437
|
```bash
|
|
431
438
|
# Find leftovers
|
|
@@ -468,7 +475,7 @@ The single foundation radius is replaced by a full radius scale. Move your value
|
|
|
468
475
|
}
|
|
469
476
|
```
|
|
470
477
|
|
|
471
|
-
The bridge maps every `--maz-rounded-{key}` to its matching Tailwind `--radius-{key}`, so `
|
|
478
|
+
The bridge maps every `--maz-rounded-{key}` to its matching Tailwind `--radius-{key}`, so `rounded-md`, `rounded-lg`, etc. all move with your preset.
|
|
472
479
|
|
|
473
480
|
### 12. New optional preset blocks: `scales` and `components`
|
|
474
481
|
|
|
@@ -491,7 +498,7 @@ The bridge maps every `--maz-rounded-{key}` to its matching Tailwind `--radius-{
|
|
|
491
498
|
}
|
|
492
499
|
```
|
|
493
500
|
|
|
494
|
-
Both blocks are optional; the bundled presets ship with sensible defaults. New `foundation` keys also landed and are all optional: `font-mono`, `font-display`, `disabled-opacity`, `disabled-cursor`. See the [themes guide](
|
|
501
|
+
Both blocks are optional; the bundled presets ship with sensible defaults. New `foundation` keys also landed and are all optional: `font-mono`, `font-display`, `disabled-opacity`, `disabled-cursor`. See the [themes guide](../ecosystem/themes.md) for the full surface.
|
|
495
502
|
|
|
496
503
|
### 13. Theme strategy: `'hybrid'` removed, no more critical CSS
|
|
497
504
|
|
|
@@ -499,10 +506,10 @@ The `@maz-ui/themes` rendering pipeline collapsed back to a single path: the ful
|
|
|
499
506
|
|
|
500
507
|
What changed:
|
|
501
508
|
|
|
502
|
-
- `Strategy` is now `'runtime' | 'buildtime'`
|
|
509
|
+
- `Strategy` is now `'runtime' | 'buildtime'` - `'hybrid'` no longer exists. The runtime default is `'runtime'`.
|
|
503
510
|
- `MazUiTheme` plugin options no longer accept `injectCriticalCSS` / `injectFullCSS`.
|
|
504
511
|
- `@maz-ui/nuxt`'s `theme` config no longer accepts `injectAllCSSOnServer`.
|
|
505
|
-
- `generateCSS` / `buildThemeCSS` / `buildSeparateThemeFiles` no longer accept `onlyCritical`, `criticalColors`, `criticalFoundation`, or `includeColorScales`. `buildSeparateThemeFiles` now returns `{ full, lightOnly, darkOnly }` only
|
|
512
|
+
- `generateCSS` / `buildThemeCSS` / `buildSeparateThemeFiles` no longer accept `onlyCritical`, `criticalColors`, `criticalFoundation`, or `includeColorScales`. `buildSeparateThemeFiles` now returns `{ full, lightOnly, darkOnly }` only - no more `critical`.
|
|
506
513
|
|
|
507
514
|
What you need to do:
|
|
508
515
|
|
|
@@ -532,7 +539,7 @@ To keep first-paint clean, **pass the preset object** (not just a string name) s
|
|
|
532
539
|
|
|
533
540
|
### 14. Nuxt module: `mazUi.css.injectMainCss` → `mazUi.css.injectCss`
|
|
534
541
|
|
|
535
|
-
The Nuxt module config key that toggles the global maz-ui stylesheet has been renamed. The old name is **silently ignored**
|
|
542
|
+
The Nuxt module config key that toggles the global maz-ui stylesheet has been renamed. The old name is **silently ignored** - your app would build but ship without the maz-ui CSS - so update it.
|
|
536
543
|
|
|
537
544
|
```diff
|
|
538
545
|
export default defineNuxtConfig({
|
|
@@ -547,7 +554,7 @@ The Nuxt module config key that toggles the global maz-ui stylesheet has been re
|
|
|
547
554
|
|
|
548
555
|
### 15. `color="background"` → `color="surface"` on components
|
|
549
556
|
|
|
550
|
-
The components that exposed `color="background"` in their public prop now use `color="surface"`. The visual result is identical
|
|
557
|
+
The components that exposed `color="background"` in their public prop now use `color="surface"`. The visual result is identical - only the literal changes.
|
|
551
558
|
|
|
552
559
|
| Component | v4 | v5 |
|
|
553
560
|
| --- | --- | --- |
|
|
@@ -606,7 +613,7 @@ The upgrade tool rewrites static `size="<unit>"` values on `<MazAvatar>` automat
|
|
|
606
613
|
rg "<MazAvatar[^>]*\bsize=" src/
|
|
607
614
|
```
|
|
608
615
|
|
|
609
|
-
### 17. `MazPullToRefresh`
|
|
616
|
+
### 17. `MazPullToRefresh` - `on-click` → `on-refresh`
|
|
610
617
|
|
|
611
618
|
The callback prop of `MazPullToRefresh` was renamed from `on-click` to `on-refresh` to reflect what it actually does: it runs when the refresh is triggered on release, not on a click.
|
|
612
619
|
|
|
@@ -625,7 +632,7 @@ The upgrade tool rewrites this automatically on `<MazPullToRefresh>` tags (both
|
|
|
625
632
|
rg "<MazPullToRefresh[^>]*\bon-?[Cc]lick" src/
|
|
626
633
|
```
|
|
627
634
|
|
|
628
|
-
The component was also rewritten on top of the new [usePullToRefresh](
|
|
635
|
+
The component was also rewritten on top of the new [usePullToRefresh](../composables/use-pull-to-refresh.md) composable. Behavior changes to check:
|
|
629
636
|
|
|
630
637
|
- **The pull follows the scroll container.** It starts only when the closest scrollable ancestor (or `container-selector`, or the window) is at the top. In v4, only the window scroll was read, so a layout with a scrolling `<main>` refreshed in the middle of a list.
|
|
631
638
|
- **`distance` is now the indicator distance after resistance** (default `80`, was `100` of raw finger movement). With the default `resistance` of `0.5`, the trigger needs about 160px of finger movement. Lower `distance` or raise `resistance` for a shorter gesture.
|
|
@@ -636,7 +643,7 @@ The component was also rewritten on top of the new [usePullToRefresh](./../compo
|
|
|
636
643
|
|
|
637
644
|
### 18. Root `maz-ui` import removed for utilities
|
|
638
645
|
|
|
639
|
-
In v4, the bare `maz-ui` entry re-exported `@maz-ui/utils`, so you could write `import { sleep } from 'maz-ui'`. In v5 that root re-export is gone
|
|
646
|
+
In v4, the bare `maz-ui` entry re-exported `@maz-ui/utils`, so you could write `import { sleep } from 'maz-ui'`. In v5 that root re-export is gone - import helpers from their package directly:
|
|
640
647
|
|
|
641
648
|
```ts
|
|
642
649
|
// v4
|
|
@@ -704,27 +711,27 @@ rg "from 'valibot'" src/
|
|
|
704
711
|
|
|
705
712
|
### Theme colors are now emitted as OKLCh
|
|
706
713
|
|
|
707
|
-
`@maz-ui/themes` now ships its bundled presets (`mazUi`, `ocean`, `pristine`, `obsidian`, `nova`) in `oklch()` form, and the runtime CSS variables (`--maz-primary`, `--maz-primary-100`, …) therefore hold OKLCh colors. The 50
|
|
714
|
+
`@maz-ui/themes` now ships its bundled presets (`mazUi`, `ocean`, `pristine`, `obsidian`, `nova`) in `oklch()` form, and the runtime CSS variables (`--maz-primary`, `--maz-primary-100`, …) therefore hold OKLCh colors. The 50-950 scale is derived in CSS via OKLCh relative color syntax - `oklch(from var(--maz-X) clamp(0, calc(l ± offset), 1) calc(c * mult) h)` - perceptually uniform, chroma-preserving, and live-reactive to base color overrides.
|
|
708
715
|
|
|
709
716
|
This is **transparent for consumers**:
|
|
710
717
|
|
|
711
718
|
- Components keep working unchanged.
|
|
712
|
-
- Custom CSS using `var(--maz-<color>)` keeps working
|
|
719
|
+
- Custom CSS using `var(--maz-<color>)` keeps working - `oklch()` is a regular CSS color.
|
|
713
720
|
- `color-mix(in srgb, var(--maz-primary) 50%, transparent)` still works; `color-mix(in oklab, …)` will give you slightly better blending if you care.
|
|
714
|
-
- Custom presets written in `hsl()`, `rgb()`, `#hex` or the legacy `'210 100% 56%'` form still parse
|
|
721
|
+
- Custom presets written in `hsl()`, `rgb()`, `#hex` or the legacy `'210 100% 56%'` form still parse - they get converted to OKLCh on the fly.
|
|
715
722
|
|
|
716
723
|
You only need to do something if you were:
|
|
717
724
|
|
|
718
|
-
- **Reading the channel format** of a color from `--maz-*` in JS
|
|
719
|
-
- **Calling the legacy JS palette helpers** (`generateColorScale`, `adjustColorLightness`, `getContrastColor`, `parseHSL`)
|
|
725
|
+
- **Reading the channel format** of a color from `--maz-*` in JS - the value used to be an `hsl(...)` string, it's now an `oklch(...)` string (and at runtime the base may resolve through `light-dark()`). Use `getComputedStyle(...).getPropertyValue(...)` and a CSS color parser if you need channels.
|
|
726
|
+
- **Calling the legacy JS palette helpers** (`generateColorScale`, `adjustColorLightness`, `getContrastColor`, `parseHSL`) - these exports were removed in v5. See BREAKING - removed exports for replacements.
|
|
720
727
|
|
|
721
|
-
Why the switch: OKLCh is perceptually uniform, so generated scales (`primary-50` → `primary-950`) ramp consistently across hues
|
|
728
|
+
Why the switch: OKLCh is perceptually uniform, so generated scales (`primary-50` → `primary-950`) ramp consistently across hues - yellow-700 won't look muddy compared to blue-700 anymore. It also unlocks Display P3 colors when you author a vivid preset.
|
|
722
729
|
|
|
723
730
|
### Preset type: `HSL` → `CSSColor`
|
|
724
731
|
|
|
725
732
|
If you authored a custom preset via `@maz-ui/themes`, the color field type is now the looser `CSSColor = string` instead of the template literal `HSL`.
|
|
726
733
|
|
|
727
|
-
- Your existing raw values (`'210 100% 56%'`) keep working
|
|
734
|
+
- Your existing raw values (`'210 100% 56%'`) keep working - they are auto-wrapped in `hsl(...)` at runtime by `normalizeColor`.
|
|
728
735
|
- You can now use any CSS color form: `'hsl(210 100% 56%)'`, `'#22c55e'`, `'oklch(0.7 0.15 30)'`, `'rgb(22 194 211)'`.
|
|
729
736
|
- Type checking on custom colors is now permissive. If you want strict validation, keep using the raw HSL form or validate at your boundary.
|
|
730
737
|
|
|
@@ -738,7 +745,7 @@ Tailwind v4 changed the default `border` color from the configured gray to `curr
|
|
|
738
745
|
|
|
739
746
|
Most visual regressions were caught during the migration, but keep an eye on:
|
|
740
747
|
|
|
741
|
-
- Shadows, radius and blur scales
|
|
748
|
+
- Shadows, radius and blur scales - Tailwind v4 shifted a few names (`shadow` → `shadow-sm`, `blur` → `blur-sm`, etc.). Maz-ui components have been updated internally; your own code is affected only if you used these classes directly.
|
|
742
749
|
- `outline-none` → `outline-hidden` (same story).
|
|
743
750
|
|
|
744
751
|
### `nova` preset added, bundled palettes refreshed
|
|
@@ -747,27 +754,27 @@ Four bundled presets remain (`mazUi`, `pristine`, `ocean`, `obsidian`) plus a ne
|
|
|
747
754
|
|
|
748
755
|
| Preset | Identity |
|
|
749
756
|
| --- | --- |
|
|
750
|
-
| `pristine` | Sober Apple
|
|
751
|
-
| `ocean` | Calm water
|
|
752
|
-
| `obsidian` | Dark luxe
|
|
753
|
-
| `nova` | Modern AI
|
|
757
|
+
| `pristine` | Sober Apple - near-black primary, system blue accent, system purple secondary, SF system font, Apple spring easing. |
|
|
758
|
+
| `ocean` | Calm water - teal primary, deep navy secondary, sandy ochre accent. |
|
|
759
|
+
| `obsidian` | Dark luxe - indigo primary, gold accent, fuchsia secondary, snappy expo easing. |
|
|
760
|
+
| `nova` | Modern AI - electric violet primary, cyan accent, hot coral secondary. |
|
|
754
761
|
|
|
755
762
|
Switching to one of the bundled presets does not require any code change beyond the preset name. If you depended on the previous (washed-out gray) `secondary` color in a custom theme, override it back via `colors.{light,dark}.secondary` in your preset.
|
|
756
763
|
|
|
757
|
-
### Theming: native CSS rewrite (new
|
|
764
|
+
### Theming: native CSS rewrite (new - non-breaking by default)
|
|
758
765
|
|
|
759
766
|
The `@maz-ui/themes` CSS pipeline was rewritten to lean on native CSS instead of JS:
|
|
760
767
|
|
|
761
768
|
- Base colors are now emitted as a single `--maz-X: light-dark(L, D)` declaration. The browser resolves it for you.
|
|
762
769
|
- Color scales `--maz-X-50` through `--maz-X-950` are derived via OKLCh relative color syntax at runtime, so any override on the base color cascades through the whole scale automatically (and preserves its chroma).
|
|
763
770
|
- `:root` declares `color-scheme: light dark` so native widgets (scrollbars, native `<select>`, date pickers, autofill) follow the active mode out of the box.
|
|
764
|
-
- A `<meta name="color-scheme">` tag is **automatically injected** at boot (Vue + Nuxt SSR). No user action
|
|
771
|
+
- A `<meta name="color-scheme">` tag is **automatically injected** at boot (Vue + Nuxt SSR). No user action - prevents the Flash of inAccurate coloR Theme.
|
|
765
772
|
|
|
766
773
|
Consumer-visible CSS surface is unchanged: `var(--maz-primary)`, `--maz-primary-500`, Tailwind utilities `bg-primary/60`, `bg-primary-500`, etc. all keep working.
|
|
767
774
|
|
|
768
|
-
#### `lightClass` (new
|
|
775
|
+
#### `lightClass` (new - optional, default `'light'`)
|
|
769
776
|
|
|
770
|
-
Mirror of `darkClass`. When `colorMode === 'light'` and `darkModeStrategy === 'class'`, this class is added to `<html>` to force `color-scheme: only light`. Default `'light'`
|
|
777
|
+
Mirror of `darkClass`. When `colorMode === 'light'` and `darkModeStrategy === 'class'`, this class is added to `<html>` to force `color-scheme: only light`. Default `'light'` - set to `false`/custom string if it clashes with an existing class in your app:
|
|
771
778
|
|
|
772
779
|
```ts
|
|
773
780
|
app.use(MazUi, {
|
|
@@ -783,26 +790,26 @@ Non-breaking: if you never explicitly forced light, nothing changes.
|
|
|
783
790
|
|
|
784
791
|
#### `setColorMode` / `toggleDarkMode` now return `Promise<void>`
|
|
785
792
|
|
|
786
|
-
Both functions are now async to support the optional `{ animate: true }` parameter (View Transitions). Existing callers that ignored the return value keep working
|
|
793
|
+
Both functions are now async to support the optional `{ animate: true }` parameter (View Transitions). Existing callers that ignored the return value keep working - `await` is only required when you need to chain.
|
|
787
794
|
|
|
788
795
|
```ts
|
|
789
796
|
const { setColorMode, toggleDarkMode } = useTheme()
|
|
790
797
|
|
|
791
|
-
// Existing v4 call
|
|
798
|
+
// Existing v4 call - still works, return value ignored
|
|
792
799
|
setColorMode('dark')
|
|
793
800
|
toggleDarkMode()
|
|
794
801
|
|
|
795
|
-
// v5
|
|
802
|
+
// v5 - await to chain after the change is applied
|
|
796
803
|
await setColorMode('dark')
|
|
797
804
|
|
|
798
|
-
// v5
|
|
805
|
+
// v5 - animated full-page switch via document.startViewTransition()
|
|
799
806
|
await toggleDarkMode({ animate: true })
|
|
800
807
|
await setColorMode('dark', { animate: true })
|
|
801
808
|
```
|
|
802
809
|
|
|
803
|
-
The View Transitions glue is lazy-imported
|
|
810
|
+
The View Transitions glue is lazy-imported - when `animate` is not used, it stays out of your boot bundle. Browsers that don't support the API apply the change immediately with no animation.
|
|
804
811
|
|
|
805
|
-
#### BREAKING
|
|
812
|
+
#### BREAKING - removed exports
|
|
806
813
|
|
|
807
814
|
The JS-based palette generator is gone. The following helpers used to be exported from `@maz-ui/themes` and **no longer exist** in v5:
|
|
808
815
|
|
|
@@ -817,11 +824,11 @@ The JS-based palette generator is gone. The following helpers used to be exporte
|
|
|
817
824
|
|
|
818
825
|
If you were importing any of the removed helpers from `@maz-ui/themes`, replace them before upgrading.
|
|
819
826
|
|
|
820
|
-
### Preset name persistence (new
|
|
827
|
+
### Preset name persistence (new - opt-out, no breaking change)
|
|
821
828
|
|
|
822
|
-
`@maz-ui/themes` now persists the active preset name in a `maz-preset` cookie (1-year TTL, `SameSite=Lax`)
|
|
829
|
+
`@maz-ui/themes` now persists the active preset name in a `maz-preset` cookie (1-year TTL, `SameSite=Lax`) - same shape as the existing `maz-color-mode` cookie:
|
|
823
830
|
|
|
824
|
-
- The cookie is read at boot and **takes priority over `options.preset`**
|
|
831
|
+
- The cookie is read at boot and **takes priority over `options.preset`** - even when `options.preset` is a preset object. `options.preset` (string or object) is the default the app boots with; the cookie carries the user's last explicit choice and wins.
|
|
825
832
|
- It is written after every successful preset resolution and after every `useTheme().updateTheme()` call.
|
|
826
833
|
- If the saved name no longer resolves, the cookie is cleared and the runtime falls back to `options.preset` (or default).
|
|
827
834
|
|
|
@@ -838,27 +845,27 @@ The same option is exposed in the Nuxt module config under `mazUi.theme.persistP
|
|
|
838
845
|
|
|
839
846
|
## Troubleshooting
|
|
840
847
|
|
|
841
|
-
**Colors look wrong in devtools
|
|
848
|
+
**Colors look wrong in devtools - I see `hsl(hsl(...))` somewhere.**
|
|
842
849
|
You still have `hsl(var(--maz-<color>))` in your CSS. See the required change above.
|
|
843
850
|
|
|
844
851
|
**A maz-ui component's border is a weird color.**
|
|
845
852
|
Expected if you were overriding `--maz-divider` (renamed from `--maz-border` in v5) with a non-color value. Confirm it's a valid CSS color.
|
|
846
853
|
|
|
847
854
|
**My custom preset's colors are ignored.**
|
|
848
|
-
Check the preset's type
|
|
855
|
+
Check the preset's type - if you imported `HSL` explicitly, switch to `CSSColor` (or just remove the type annotation). Raw HSL strings still work at runtime.
|
|
849
856
|
|
|
850
857
|
## Advanced: you had your own Tailwind setup
|
|
851
858
|
|
|
852
859
|
If you were already running Tailwind v3 in your app, shipping classes like `maz-flex` yourself, you need the same migration as any Tailwind v3 → v4 upgrade:
|
|
853
860
|
|
|
854
|
-
1. Run the official Tailwind upgrade tool: `npx @tailwindcss/upgrade`
|
|
861
|
+
1. Run the official Tailwind upgrade tool: `npx @tailwindcss/upgrade` - it handles 95% of the work (utility renames, `@apply !important` syntax, `tailwind.config` → CSS-first, …).
|
|
855
862
|
2. Replace any `hsl(var(--maz-<color>))` in your own CSS (see above).
|
|
856
863
|
3. Read the [Tailwind integration](./tailwind.md) page to learn how to import maz-ui's bridge and expose your theme tokens to your own Tailwind config.
|
|
857
864
|
|
|
858
|
-
This is a niche path
|
|
865
|
+
This is a niche path - most consumers never wrote maz-prefixed classes in their own code.
|
|
859
866
|
|
|
860
867
|
## See also
|
|
861
868
|
|
|
862
|
-
- [Tailwind CSS integration](./tailwind.md)
|
|
863
|
-
- [Theming](
|
|
864
|
-
- [Browser Support](./browser-support.md)
|
|
869
|
+
- [Tailwind CSS integration](./tailwind.md) - optional, for consumers who have their own Tailwind setup
|
|
870
|
+
- [Theming](../ecosystem/themes.md) - preset authoring and runtime theme switching
|
|
871
|
+
- [Browser Support](./browser-support.md) - exact minimum versions and the features they enable
|