@maz-ui/mcp 4.9.1 → 5.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/dist/mcp.mjs +1 -1
  2. package/docs/generated-docs/maz-alert.doc.md +1 -1
  3. package/docs/generated-docs/maz-avatar.doc.md +1 -1
  4. package/docs/generated-docs/maz-badge.doc.md +8 -8
  5. package/docs/generated-docs/maz-btn.doc.md +26 -26
  6. package/docs/generated-docs/maz-card.doc.md +19 -19
  7. package/docs/generated-docs/maz-chart.doc.md +8 -8
  8. package/docs/generated-docs/maz-container.doc.md +20 -20
  9. package/docs/generated-docs/maz-drawer.doc.md +8 -8
  10. package/docs/generated-docs/maz-dropdown.doc.md +1 -1
  11. package/docs/generated-docs/maz-dropzone.doc.md +2 -2
  12. package/docs/generated-docs/maz-gallery.doc.md +15 -15
  13. package/docs/generated-docs/maz-icon.doc.md +11 -14
  14. package/docs/generated-docs/maz-input.doc.md +38 -38
  15. package/docs/generated-docs/maz-lazy-img.doc.md +18 -0
  16. package/docs/generated-docs/maz-link.doc.md +9 -9
  17. package/docs/generated-docs/maz-pagination.doc.md +9 -9
  18. package/docs/generated-docs/maz-popover.doc.md +5 -1
  19. package/docs/generated-docs/maz-radio-buttons.doc.md +17 -17
  20. package/docs/generated-docs/maz-select.doc.md +2 -2
  21. package/docs/generated-docs/maz-skeleton.doc.md +10 -10
  22. package/docs/generated-docs/maz-table.doc.md +37 -37
  23. package/docs/generated-docs/maz-textarea.doc.md +1 -1
  24. package/docs/generated-docs/maz-timeline.doc.md +1 -1
  25. package/docs/src/blog/v4.md +7 -7
  26. package/docs/src/blog/v5.md +186 -0
  27. package/docs/src/components/maz-accordion.md +1 -1
  28. package/docs/src/components/maz-alert.md +15 -15
  29. package/docs/src/components/maz-animated-counter.md +4 -4
  30. package/docs/src/components/maz-avatar.md +2 -2
  31. package/docs/src/components/maz-backdrop.md +7 -7
  32. package/docs/src/components/maz-badge.md +16 -30
  33. package/docs/src/components/maz-bottom-sheet.md +74 -74
  34. package/docs/src/components/maz-btn-group.md +17 -13
  35. package/docs/src/components/maz-btn.md +127 -90
  36. package/docs/src/components/maz-card-spotlight.md +5 -5
  37. package/docs/src/components/maz-card.md +20 -20
  38. package/docs/src/components/maz-carousel.md +14 -14
  39. package/docs/src/components/maz-chart.md +23 -4
  40. package/docs/src/components/maz-checkbox.md +3 -3
  41. package/docs/src/components/maz-checklist.md +19 -19
  42. package/docs/src/components/maz-circular-progress-bar.md +4 -4
  43. package/docs/src/components/maz-container.md +52 -37
  44. package/docs/src/components/maz-date-picker.md +7 -7
  45. package/docs/src/components/maz-dialog-confirm.md +2 -2
  46. package/docs/src/components/maz-drawer.md +14 -14
  47. package/docs/src/components/maz-dropdown.md +27 -12
  48. package/docs/src/components/maz-dropzone.md +6 -6
  49. package/docs/src/components/maz-expand-animation.md +2 -2
  50. package/docs/src/components/maz-fullscreen-loader.md +2 -2
  51. package/docs/src/components/maz-gallery.md +1 -1
  52. package/docs/src/components/maz-icon.md +113 -60
  53. package/docs/src/components/maz-input-code.md +1 -1
  54. package/docs/src/components/maz-input-phone-number.md +89 -88
  55. package/docs/src/components/maz-input-tags.md +2 -2
  56. package/docs/src/components/maz-input.md +42 -12
  57. package/docs/src/components/maz-link.md +28 -10
  58. package/docs/src/components/maz-pagination.md +2 -2
  59. package/docs/src/components/maz-popover.md +236 -235
  60. package/docs/src/components/maz-pull-to-refresh.md +2 -2
  61. package/docs/src/components/maz-radio-buttons.md +11 -11
  62. package/docs/src/components/maz-radio.md +3 -3
  63. package/docs/src/components/maz-read-more.md +7 -7
  64. package/docs/src/components/maz-select-country.md +26 -26
  65. package/docs/src/components/maz-select.md +1 -1
  66. package/docs/src/components/maz-skeleton.md +25 -25
  67. package/docs/src/components/maz-spinner.md +2 -2
  68. package/docs/src/components/maz-stepper.md +5 -5
  69. package/docs/src/components/maz-switch.md +1 -1
  70. package/docs/src/components/maz-table.md +10 -10
  71. package/docs/src/components/maz-tabs.md +17 -17
  72. package/docs/src/components/maz-textarea.md +8 -8
  73. package/docs/src/components/maz-ticker.md +37 -37
  74. package/docs/src/components/maz-timeline.md +9 -9
  75. package/docs/src/composables/use-dialog.md +1 -1
  76. package/docs/src/composables/use-display-names.md +2 -2
  77. package/docs/src/composables/use-form-validator.md +35 -35
  78. package/docs/src/composables/use-idle-timeout.md +3 -3
  79. package/docs/src/composables/use-reading-time.md +5 -5
  80. package/docs/src/composables/use-string-matching.md +4 -4
  81. package/docs/src/composables/use-swipe.md +3 -3
  82. package/docs/src/composables/use-timer.md +3 -3
  83. package/docs/src/composables/use-toast.md +1 -1
  84. package/docs/src/composables/use-user-visibility.md +1 -1
  85. package/docs/src/composables/use-wait.md +2 -2
  86. package/docs/src/directives/click-outside.md +17 -17
  87. package/docs/src/directives/lazy-img.md +5 -5
  88. package/docs/src/directives/tooltip.md +15 -15
  89. package/docs/src/directives/zoom-img.md +1 -1
  90. package/docs/src/ecosystem/eslint-config.md +100 -0
  91. package/docs/src/ecosystem/stylelint-config.md +190 -0
  92. package/docs/src/guide/browser-support.md +81 -0
  93. package/docs/src/guide/getting-started.md +23 -16
  94. package/docs/src/guide/icon-set.md +13 -13
  95. package/docs/src/guide/icons.md +35 -8
  96. package/docs/src/guide/maz-ui-provider.md +6 -6
  97. package/docs/src/guide/migration-v4.md +3 -3
  98. package/docs/src/guide/migration-v5.md +662 -0
  99. package/docs/src/guide/nuxt.md +27 -44
  100. package/docs/src/guide/resolvers.md +2 -2
  101. package/docs/src/guide/tailwind.md +154 -0
  102. package/docs/src/guide/themes.md +258 -485
  103. package/docs/src/guide/vue.md +8 -5
  104. package/docs/src/helpers/capitalize.md +4 -4
  105. package/docs/src/helpers/country-code-to-unicode-flag.md +37 -37
  106. package/docs/src/helpers/currency.md +4 -4
  107. package/docs/src/helpers/date.md +4 -4
  108. package/docs/src/helpers/get-country-flag-url.md +9 -9
  109. package/docs/src/helpers/number.md +5 -5
  110. package/docs/src/index.md +304 -246
  111. package/docs/src/made-with-maz-ui.md +5 -5
  112. package/docs/src/plugins/aos.md +6 -6
  113. package/docs/src/plugins/dialog.md +4 -4
  114. package/docs/src/plugins/toast.md +3 -3
  115. package/docs/src/plugins/wait.md +1 -1
  116. package/package.json +5 -5
@@ -0,0 +1,100 @@
1
+ ---
2
+ title: '@maz-ui/eslint-config'
3
+ description: ESLint flat-config preset for Vue/Nuxt/JS/TS projects, layered on @antfu/eslint-config with SonarJS, Tailwind and a11y add-ons.
4
+ ---
5
+
6
+ # {{ $frontmatter.title }}
7
+
8
+ `@maz-ui/eslint-config` ships an opinionated ESLint **flat config** for the kind of stack maz-ui itself uses: TypeScript, Vue 3 / Nuxt 3, optional Tailwind CSS, and tests. It is built on top of [`@antfu/eslint-config`](https://github.com/antfu/eslint-config) so you get a battle-tested baseline, then layered with quality rules from [SonarJS](https://github.com/SonarSource/eslint-plugin-sonarjs) and accessibility rules from [`eslint-plugin-vuejs-accessibility`](https://github.com/vue-a11y/eslint-plugin-vuejs-accessibility).
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ pnpm add -D @maz-ui/eslint-config eslint
14
+ ```
15
+
16
+ ## Basic usage
17
+
18
+ Create `eslint.config.ts` (or `.mjs`/`.js`) at the root of your project:
19
+
20
+ ```ts
21
+ import { defineConfig } from '@maz-ui/eslint-config'
22
+
23
+ export default defineConfig()
24
+ ```
25
+
26
+ That's it. Vue is auto-detected from your `package.json` (presence of `vue` or `nuxt`).
27
+
28
+ ## Configuration
29
+
30
+ ```ts
31
+ import { defineConfig } from '@maz-ui/eslint-config'
32
+
33
+ export default defineConfig({
34
+ // Toggle features explicitly (each one is also auto-detected from your deps).
35
+ typescript: true, // default
36
+ vue: true, // auto-detected
37
+ sonarjs: true, // default
38
+ tailwindcss: false, // optional, requires eslint-plugin-tailwindcss
39
+ vueAccessibility: false, // optional
40
+ formatters: true, // CSS/HTML/JSON/YAML/Markdown formatting via dprint
41
+
42
+ // 'production' downgrades console.log to error, 'development' keeps it warning.
43
+ env: 'production',
44
+
45
+ // Extra ignore globs (merged with sensible defaults).
46
+ ignores: ['**/*.generated.ts'],
47
+
48
+ // Direct rule overrides applied on top of the resolved config.
49
+ rules: {
50
+ 'no-console': 'error',
51
+ 'vue/custom-event-name-casing': ['error', 'kebab-case'],
52
+ },
53
+ })
54
+ ```
55
+
56
+ You can also append raw flat-config items as additional arguments — they merge after the built-in configs:
57
+
58
+ ```ts
59
+ export default defineConfig(
60
+ { typescript: true },
61
+ {
62
+ files: ['**/*.legacy.ts'],
63
+ rules: { 'ts/no-explicit-any': 'off' },
64
+ },
65
+ )
66
+ ```
67
+
68
+ ## What it includes
69
+
70
+ - **Antfu base** — TypeScript-aware rules, Stylistic formatting, modern import order.
71
+ - **SonarJS** — code quality and complexity heuristics, with a relaxed set for `*.spec.ts` / `*.test.ts`.
72
+ - **Vue rules** (when Vue/Nuxt is detected) — block-tag order, naming conventions, template a11y.
73
+ - **Tailwind plugin** (opt-in) — class ordering, no-contradicting classes, valid Tailwind syntax.
74
+ - **Markdown** — prose linting baseline.
75
+
76
+ ## Advanced
77
+
78
+ You can import the individual rule sets if you want to compose your own config:
79
+
80
+ ```ts
81
+ import { baseRules, sonarjsRules, tailwindcssRules, vueRules } from '@maz-ui/eslint-config'
82
+
83
+ export default [
84
+ {
85
+ rules: {
86
+ ...baseRules(true),
87
+ ...sonarjsRules,
88
+ // ...
89
+ },
90
+ },
91
+ ]
92
+ ```
93
+
94
+ ## Compatibility
95
+
96
+ | Tool | Required version |
97
+ | --- | --- |
98
+ | ESLint | `>=9.0.0 <11.0.0` |
99
+ | Node.js | `>=20.19.0` |
100
+ | TypeScript | `^5.0.0` |
@@ -0,0 +1,190 @@
1
+ ---
2
+ title: '@maz-ui/stylelint-config'
3
+ description: Stylelint preset for Vue/Nuxt/JS/TS projects, with first-class Tailwind CSS v4 support, RTL-friendly logical properties, and SCSS opt-in.
4
+ ---
5
+
6
+ # {{ $frontmatter.title }}
7
+
8
+ `@maz-ui/stylelint-config` is the Stylelint counterpart to [`@maz-ui/eslint-config`](./eslint-config.md). It builds on Stylelint's official **standard** config and layers in the conventions used by maz-ui itself: BEM-friendly class patterns, Tailwind v4 at-rule whitelist, RTL-friendly logical properties, optional SCSS support, and Vue/HTML block parsing.
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ pnpm add -D @maz-ui/stylelint-config stylelint
14
+ ```
15
+
16
+ The peer dependencies the preset relies on (`stylelint-config-standard`, `stylelint-config-recommended-vue`, `stylelint-use-logical-spec`, …) are bundled as direct dependencies, so you don't need to install them yourself.
17
+
18
+ ## Basic usage
19
+
20
+ Create `stylelint.config.mjs` at the root of your project:
21
+
22
+ ```js
23
+ import { defineConfig } from '@maz-ui/stylelint-config'
24
+
25
+ export default defineConfig()
26
+ ```
27
+
28
+ Vue, Tailwind and SCSS are auto-detected from your `package.json`:
29
+
30
+ | Detected when… | Enables… |
31
+ | --- | --- |
32
+ | `vue` or `nuxt` is in dependencies | Vue support (`stylelint-config-recommended-vue`, `<style>` block parsing) |
33
+ | `tailwindcss` is in dependencies | Tailwind v4 at-rule whitelist (`@apply`, `@theme`, `@layer`, `@variant`, …) |
34
+ | `sass`, `sass-embedded` or `node-sass` is in dependencies | SCSS support (`stylelint-config-recommended-scss`, `postcss-scss`) |
35
+
36
+ ## Configuration
37
+
38
+ ```js
39
+ import { defineConfig } from '@maz-ui/stylelint-config'
40
+
41
+ export default defineConfig({
42
+ // Each one is also auto-detected — set explicitly to opt in/out.
43
+ vue: true,
44
+ html: false,
45
+ tailwind: true,
46
+ scss: false,
47
+
48
+ // Encourage logical CSS properties for RTL-friendly authoring:
49
+ // `inset-inline-start` instead of `left`, `margin-inline-start` instead
50
+ // of `margin-left`, etc. Highly recommended for design systems.
51
+ logical: true,
52
+
53
+ // Property order strategy.
54
+ // 'recess' : Recess-based ordering via stylelint-config-recess-order (default)
55
+ // 'alphabetical' : Strict A→Z ordering
56
+ // false : Disable ordering rules
57
+ order: 'recess',
58
+
59
+ // Extra ignore globs (merged with sensible defaults).
60
+ ignores: ['**/legacy/**'],
61
+
62
+ // Direct rule overrides applied on top of the resolved config.
63
+ rules: {
64
+ 'no-descending-specificity': null,
65
+ 'function-no-unknown': [true, { ignoreFunctions: ['v-bind', 'theme'] }],
66
+ },
67
+
68
+ // Per-file overrides appended last.
69
+ overrides: [
70
+ {
71
+ files: ['**/*.legacy.css'],
72
+ rules: { 'no-descending-specificity': null },
73
+ },
74
+ ],
75
+ })
76
+ ```
77
+
78
+ ## Logical properties (RTL-friendly)
79
+
80
+ When `logical: true` (default), the preset enables [`stylelint-use-logical-spec`](https://github.com/Jordan-Hall/stylelint-use-logical-spec) which warns whenever you use a physical CSS property that has a logical equivalent:
81
+
82
+ ```css
83
+ /* ❌ Physical — breaks in RTL languages */
84
+ .toolbar {
85
+ margin-left: 1rem;
86
+ padding-right: 1rem;
87
+ text-align: left;
88
+ left: 0;
89
+ }
90
+
91
+ /* ✅ Logical — adapts to writing direction */
92
+ .toolbar {
93
+ margin-inline-start: 1rem;
94
+ padding-inline-end: 1rem;
95
+ text-align: start;
96
+ inset-inline-start: 0;
97
+ }
98
+ ```
99
+
100
+ If you ship a design system that has to work in both LTR and RTL locales (Arabic, Hebrew, Persian, …), this rule is the cheapest way to keep your CSS direction-agnostic without auditing every property by hand.
101
+
102
+ Disable it explicitly if your project doesn't need RTL support:
103
+
104
+ ```js
105
+ defineConfig({ logical: false })
106
+ ```
107
+
108
+ ## Tailwind CSS v4
109
+
110
+ When `tailwind: true`, the preset:
111
+
112
+ - Whitelists every Tailwind v4 at-rule via `at-rule-no-unknown` (and `scss/at-rule-no-unknown` when SCSS is also on): `@apply`, `@theme`, `@layer`, `@variant`, `@custom-variant`, `@reference`, `@utility`, `@source`, `@screen`, `@starting-style`, `@tailwind`.
113
+ - Sets `at-rule-no-deprecated` to allow `@apply` (Tailwind v4 still ships it as the canonical authoring directive).
114
+ - Forces `import-notation: 'string'` — Tailwind v4 only parses the `prefix(...)` modifier on bare-string `@import` forms, never on `url()`-wrapped imports.
115
+
116
+ ## What it includes
117
+
118
+ - **Stylelint Standard** — Idiomatic CSS rules from the official Stylelint config.
119
+ - **Property ordering** (`stylelint-config-recess-order`) — Recess-based, the most widely adopted convention for non-alphabetical ordering.
120
+ - **Vue / HTML support** (opt-in / auto-detected) — `<style>` and `<style scoped>` block parsing via `postcss-html`.
121
+ - **SCSS support** (opt-in / auto-detected) — full `stylelint-config-recommended-scss` + native SCSS at-rule whitelist.
122
+ - **Logical properties** — RTL-friendly authoring.
123
+ - **BEM-friendly class patterns** — disables `selector-class-pattern` and `no-descending-specificity` so `m-btn__icon`, `m-btn--ghost` and `:deep(...)` selectors flow naturally.
124
+
125
+ ## Advanced
126
+
127
+ You can import the individual rule sets to compose your own:
128
+
129
+ ```js
130
+ import {
131
+ baseRules,
132
+ GLOBAL_IGNORES,
133
+ logicalRules,
134
+ scssRules,
135
+ TAILWIND_AT_RULES,
136
+ tailwindAtRuleNoUnknown,
137
+ tailwindRules,
138
+ } from '@maz-ui/stylelint-config'
139
+
140
+ export default {
141
+ rules: {
142
+ ...baseRules,
143
+ ...tailwindRules,
144
+ ...tailwindAtRuleNoUnknown,
145
+ },
146
+ }
147
+ ```
148
+
149
+ ## Migrating from a hand-written `.stylelintrc`
150
+
151
+ If you used the historical maz-ui Stylelint setup, the migration boils down to:
152
+
153
+ ```diff
154
+ -/** @type {import('stylelint').Config} */
155
+ -export default {
156
+ - plugins: ['stylelint-scss'],
157
+ - extends: [
158
+ - 'stylelint-config-standard',
159
+ - 'stylelint-config-standard-scss',
160
+ - 'stylelint-config-recommended-vue',
161
+ - ],
162
+ - rules: {
163
+ - 'at-rule-no-unknown': [true, { ignoreAtRules: ['theme', 'apply', 'layer', /* ... */] }],
164
+ - 'scss/at-rule-no-unknown': [true, { ignoreAtRules: [/* same list */] }],
165
+ - 'selector-pseudo-class-no-unknown': [true, { ignorePseudoClasses: ['deep'] }],
166
+ - 'selector-class-pattern': null,
167
+ - 'no-descending-specificity': null,
168
+ - 'function-no-unknown': [true, { ignoreFunctions: ['v-bind'] }],
169
+ - 'nesting-selector-no-missing-scoping-root': null,
170
+ - },
171
+ - overrides: [
172
+ - { files: ['**/*.vue', '**/*.html'], customSyntax: 'postcss-html' },
173
+ - ],
174
+ -}
175
+ +import { defineConfig } from '@maz-ui/stylelint-config'
176
+ +
177
+ +export default defineConfig({
178
+ + vue: true,
179
+ + scss: true,
180
+ + tailwind: true,
181
+ + logical: true,
182
+ +})
183
+ ```
184
+
185
+ ## Compatibility
186
+
187
+ | Tool | Required version |
188
+ | --- | --- |
189
+ | Stylelint | `>=16.0.0 <18.0.0` |
190
+ | Node.js | `>=20.19.0` |
@@ -0,0 +1,81 @@
1
+ ---
2
+ title: Browser support
3
+ description: Maz-UI v5 browser compatibility matrix and the native CSS features it depends on.
4
+ ---
5
+
6
+ # {{ $frontmatter.title }}
7
+
8
+ Maz-UI v5 is built on **Tailwind CSS v4**, which relies on modern native CSS features with no polyfill path. If your audience still uses older browsers, stay on Maz-UI v4.
9
+
10
+ ## Minimum versions
11
+
12
+ | Browser | Minimum |
13
+ | ------------------ | ------- |
14
+ | **Chromium** (Chrome, Edge, Opera, Brave, Arc, …) | **111** (March 2023) |
15
+ | **Safari** (macOS, iOS, iPadOS) | **16.4** (March 2023) |
16
+ | **Firefox** | **128** (July 2024) |
17
+ | **Samsung Internet** | **22** (2023) |
18
+
19
+ On the Android side: Chrome 111+ is bundled with Android 13+ devices and is available as an update on anything from Android 7. WebView apps built against API level 24+ get Chromium 111+ automatically.
20
+
21
+ Anything older than the versions above will not render the design system correctly. The most common failure mode is colors looking wrong (because `color-mix()` doesn't resolve) or cascade layers being ignored.
22
+
23
+ ## Why these minimums
24
+
25
+ Maz-UI v5 + Tailwind v4 uses the following native CSS features:
26
+
27
+ ### `color-mix()`
28
+
29
+ Used for every alpha modifier (`bg-primary/50`, the custom `color-mix(in srgb, var(--X) 60%, transparent)` generated by the `@maz-ui/upgrade` package for `hsl(var(--X) / 60%)`, etc.).
30
+
31
+ [Browser support · caniuse](https://caniuse.com/?search=color-mix) — supported everywhere since Chromium 111 / Safari 16.4 / Firefox 128.
32
+
33
+ ### `@property`
34
+
35
+ Used internally by Tailwind v4 to declare typed custom properties with default values. Powers the `--tw-translate-x`, `--tw-rotate`, etc. that back transform utilities.
36
+
37
+ [Browser support · caniuse](https://caniuse.com/?search=%40property) — supported everywhere since Chromium 111 / Safari 16.4 / Firefox 128.
38
+
39
+ ### Native CSS nesting
40
+
41
+ Used by Tailwind v4 internally and by Maz-UI utilities like `cap-f` (`&::first-letter`). v4 does not run a CSS-nesting preprocessor; the output relies on the browser parsing nested rules directly.
42
+
43
+ [Browser support · caniuse](https://caniuse.com/css-nesting) — supported everywhere since Chromium 112 / Safari 16.5 / Firefox 117.
44
+
45
+ ### `:has()` selector
46
+
47
+ Used by a few Maz-UI utilities for parent-aware styling.
48
+
49
+ [Browser support · caniuse](https://caniuse.com/css-has) — supported everywhere since Chromium 105 / Safari 15.4 / Firefox 121.
50
+
51
+ ## Testing on older browsers
52
+
53
+ If you need to support a browser older than the matrix above:
54
+
55
+ 1. **Stay on Maz-UI v4** — it keeps Tailwind v3 and targets Chromium 90+, Safari 14+, Firefox 90+.
56
+ 2. **Check your real audience** using your analytics tool before bumping to v5. "Support everything" is often outdated advice in 2026 — most teams can comfortably drop anything older than Chromium 111.
57
+
58
+ ## Testing on the minimum versions
59
+
60
+ Playwright can install exact minimum-version browsers for regression testing:
61
+
62
+ ```bash
63
+ pnpm add -D @playwright/test
64
+ npx playwright install chromium@111 firefox@128 webkit@16.4
65
+ ```
66
+
67
+ Then run your visual tests against that matrix in CI.
68
+
69
+ ## What happens on unsupported browsers
70
+
71
+ - **`color-mix` unsupported** — any utility that goes through an alpha modifier (`bg-primary/50`, the custom overlay colors in MazDialog / MazBackdrop) falls back to the base color with no transparency. Visual regression but not a crash.
72
+ - **`@property` unsupported** — transform, translate, rotate, scale utilities don't animate smoothly because the custom properties aren't interpolatable without `@property`.
73
+ - **Cascade layers unsupported** — the order of Maz-UI styles vs app styles becomes non-deterministic, so resets and utilities can override app styles (or vice versa) unpredictably.
74
+
75
+ The safe recommendation is: detect at app boot and show an "unsupported browser" screen if you can't guarantee the minimum matrix.
76
+
77
+ ## See also
78
+
79
+ - [Migration v4 → v5](./migration-v5.md) — the full upgrade guide
80
+ - [Tailwind v4 browser support](https://tailwindcss.com/blog/tailwindcss-v4#browser-support) — upstream notes
81
+ - [Tailwind CSS integration](./tailwind.md) — how the design system plugs into your own Tailwind
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Getting Started
3
- description: Build Vue and Nuxt applications faster with Maz-UI v4 - The modern, modular component library
3
+ description: Build Vue and Nuxt applications faster with Maz-UI v5 - The modern, modular component library
4
4
  head:
5
5
  - - meta
6
6
  - name: keywords
@@ -16,24 +16,29 @@ head:
16
16
  - 🌱 **Tree-shaking** - Import only what you need
17
17
  - 🛠️ **TypeScript-first** - Full type safety out of the box
18
18
  - 🚀 **Performance** - Tree-shaking benefits and maximum optimization
19
- - 🎨 **Theming system** - Customizable themes and dark mode support (4 presets available) - [@maz-ui/themes](./themes.md)
19
+ - 🎨 **Theming system** - Customizable themes and dark mode support (5 presets available) - [@maz-ui/themes](./themes.md)
20
+ - 💨 **Optional Tailwind bridge** - Already have a Tailwind v4 setup? Expose your active maz-ui theme tokens (colors, radius, breakpoints, custom utilities) to your own Tailwind config - [Tailwind integration](./tailwind.md)
20
21
  - 🌐 **Internationalization** - Locale management and tree-shakable imports - [@maz-ui/translations](./translations.md)
21
- - 🎨 **Icon library** - Comprehensive collection of SVG icons designed for performance and flexibility (400+ icons) - [@maz-ui/icons](./icons.md)
22
+ - 🎨 **Icon library** - Comprehensive collection of SVG icons designed for performance and flexibility (860+ icons) - [@maz-ui/icons](./icons.md)
22
23
  - 🧰 **Nuxt module** - Effortless Maz-UI integration with auto-imports - [@maz-ui/nuxt](./nuxt.md)
23
- - 🤖 **MCP** - Connect your IA agents to the documentation - [@maz-ui/mcp](./mcp.md)
24
+ - 🤖 **MCP** - Connect your AI agents to the documentation - [@maz-ui/mcp](./mcp.md)
24
25
 
25
26
  :::
26
27
 
28
+ ::: tip Migrating from v4?
29
+ Run `npx @maz-ui/upgrade ./` to handle the mechanical part of the migration (CSS subpath imports, prop renames, CSS var renames, Nuxt config keys, custom preset color keys, and `package.json` version bumps). See the [v5 migration guide](./migration-v5.md) for the rest.
30
+ :::
31
+
27
32
  ## Guides
28
33
 
29
34
  Start by choosing your framework:
30
35
 
31
- <div class="maz-flex maz-gap-4 maz-w-full maz-flex-col tab-m:maz-flex-row vp-raw">
36
+ <div class="maz:flex maz:gap-4 maz:w-full maz:flex-col maz:tab-m:flex-row vp-raw">
32
37
  <MazCard
33
38
  href="/guide/vue"
34
- class="maz-flex-1"
39
+ class="maz:flex-1"
35
40
  :gallery="{
36
- images: ['https://positivethinking.tech/wp-content/uploads/2021/01/Logo-Vuejs.png'],
41
+ images: ['/vue.png'],
37
42
  height: 200,
38
43
  width: '100%',
39
44
  }"
@@ -51,10 +56,10 @@ Start by choosing your framework:
51
56
  </MazCard>
52
57
  <MazCard
53
58
  href="/guide/nuxt"
54
- class="maz-flex-1"
59
+ class="maz:flex-1"
55
60
  content-title="Nuxt Users Guide"
56
61
  :gallery="{
57
- images: ['https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8mpeku6brwkfmrsumu3h.png'],
62
+ images: ['/nuxt.png'],
58
63
  height: 200,
59
64
  width: '100%',
60
65
  }"
@@ -80,7 +85,7 @@ Extend Maz-UI with our specialized companion packages:
80
85
 
81
86
  **Advanced Theming System**
82
87
 
83
- Modern theme system with HSL variables, dark mode support, and flexible strategies.
88
+ Modern theme system with OKLCh color scales, runtime preset switching, and dark mode support.
84
89
 
85
90
  ```bash
86
91
  npm install @maz-ui/themes
@@ -88,9 +93,10 @@ npm install @maz-ui/themes
88
93
 
89
94
  **Features:**
90
95
 
91
- - 🎨 HSL CSS custom properties
92
- - 🌓 Smart dark mode detection
93
- - ⚡ Multiple rendering strategies
96
+ - 🎨 OKLCh color system with perceptually uniform 11-step scales
97
+ - 🌓 Smart dark mode detection and class/media/auto strategies
98
+ - ⚡ `runtime` and `buildtime` rendering strategies
99
+ - 🍪 Active preset persisted across reloads (opt-out)
94
100
  - 🛡️ Full TypeScript support
95
101
 
96
102
  [→ View Theme Documentation](./themes.md)
@@ -154,7 +160,7 @@ npm install @maz-ui/icons
154
160
 
155
161
  ### Tree-Shaking Benefits
156
162
 
157
- Maz-UI v4 is built with tree-shaking in mind. Import only what you need for optimal bundle sizes:
163
+ Maz-UI v5 is built with tree-shaking in mind. Import only what you need for optimal bundle sizes:
158
164
 
159
165
  ```typescript
160
166
  /**
@@ -162,7 +168,7 @@ Maz-UI v4 is built with tree-shaking in mind. Import only what you need for opti
162
168
  */
163
169
 
164
170
  // ❌ Avoid importing everything
165
- import { formatCurrency, debounce } from 'maz-ui'
171
+ import { formatCurrency, debounce } from '@maz-ui/utils'
166
172
  // ✅ Import from @maz-ui/utils
167
173
  import { formatCurrency, debounce } from '@maz-ui/utils'
168
174
 
@@ -242,8 +248,9 @@ Browse [GitHub discussions](https://github.com/LouisMazel/maz-ui/discussions) or
242
248
  </div>
243
249
 
244
250
  <style scoped>
251
+ @reference "../../.vitepress/theme/main.css";
245
252
  .hero-section {
246
- @apply maz-rounded maz-p-8 maz-my-12 maz-from-primary-400 maz-to-secondary-700 maz-bg-gradient-to-br;
253
+ @apply maz:rounded-md maz:p-8 maz:my-12 maz:from-primary-400 maz:to-secondary-700 maz:bg-linear-to-br;
247
254
  }
248
255
 
249
256
  .features-grid {
@@ -13,21 +13,21 @@ All icons follow a consistent naming pattern:
13
13
  ## Find your icon
14
14
 
15
15
  <ComponentDemo>
16
- <div class="maz-flex maz-flex-col maz-gap-4">
17
- <div class="maz-flex maz-gap-2 maz-items-start">
18
- <MazInput v-model="search" label="Search icon" @update:model-value="search = $event.trim()" :left-icon="SearchIcon" class="flex-1" :assistive-text="`${filteredIcons.length} icons found`" />
16
+ <div class="maz:flex maz:flex-col maz:gap-4">
17
+ <div class="maz:flex maz:gap-2 maz:items-start">
18
+ <MazInput v-model="search" label="Search icon" @update:model-value="search = $event.trim()" :start-icon="SearchIcon" class="flex-1" :assistive-text="`${filteredIcons.length} icons found`" />
19
19
  </div>
20
20
  <MazTabs v-model="currentTab">
21
21
  <MazTabsBar :items="tabs" />
22
22
  </MazTabs>
23
- <div class="maz-grid maz-grid-cols-3 maz-gap-2">
24
- <div v-for="icon in filteredIcons" :key="icon.name" class="maz-flex maz-flex-col maz-items-center maz-gap-3 maz-text-center maz-border maz-border-solid maz-border-divider maz-rounded maz-p-4 maz-truncate">
25
- <component :is="icon.component" class="maz-size-8" />
26
- <span class="maz-text-xs maz-text-muted maz-truncate">{{ icon.name }}</span>
27
- <div class="maz-flex maz-flex-row maz-gap-2 maz-w-full">
28
- <MazBtn v-tooltip="{ text: 'Copy Name', panelClass: 'maz-text-xs' }" class="maz-flex-1" size="xs" color="background" outlined @click="copyIcon(icon.name)" :icon="ClipboardDocumentIcon" />
29
- <MazBtn v-tooltip="{ text: 'Copy Static Import', panelClass: 'maz-text-xs' }" class="maz-flex-1" size="xs" color="background" outlined @click="copyStaticImport(icon.name)" :icon="ClipboardDocumentListIcon" />
30
- <MazBtn v-tooltip="{ text: 'Copy Lazy Import', panelClass: 'maz-text-xs' }" class="maz-flex-1" size="xs" color="background" outlined @click="copyLazyImport(icon.name)" :icon="ClipboardDocumentListIcon" />
23
+ <div class="maz:grid maz:grid-cols-3 maz:gap-2">
24
+ <div v-for="icon in filteredIcons" :key="icon.name" class="maz:flex maz:flex-col maz:items-center maz:gap-3 maz:text-center maz:border maz:border-solid maz:border-divider maz:rounded-md maz:p-4 maz:truncate">
25
+ <component :is="icon.component" class="maz:size-8" />
26
+ <span class="maz:text-xs maz:text-muted maz:truncate">{{ icon.name }}</span>
27
+ <div class="maz:flex maz:flex-row maz:gap-2 maz:w-full">
28
+ <MazBtn v-tooltip="{ text: 'Copy Name', panelClass: 'maz:text-xs' }" class="maz:flex-1" size="xs" color="surface" outlined @click="copyIcon(icon.name)" :icon="ClipboardDocumentIcon" />
29
+ <MazBtn v-tooltip="{ text: 'Copy Static Import', panelClass: 'maz:text-xs' }" class="maz:flex-1" size="xs" color="surface" outlined @click="copyStaticImport(icon.name)" :icon="ClipboardDocumentListIcon" />
30
+ <MazBtn v-tooltip="{ text: 'Copy Lazy Import', panelClass: 'maz:text-xs' }" class="maz:flex-1" size="xs" color="surface" outlined @click="copyLazyImport(icon.name)" :icon="ClipboardDocumentListIcon" />
31
31
  </div>
32
32
  </div>
33
33
  </div>
@@ -112,12 +112,12 @@ const copyIcon = (icon) => {
112
112
  }
113
113
 
114
114
  const copyStaticImport = (icon) => {
115
- navigator.clipboard.writeText(`import { ${icon} } from '@maz-ui/icons'`)
115
+ navigator.clipboard.writeText(`import { ${icon} } from '@maz-ui/icons/${icon}'`)
116
116
  success('Static import copied to clipboard')
117
117
  }
118
118
 
119
119
  const copyLazyImport = (icon) => {
120
- navigator.clipboard.writeText(`import { Lazy${icon} } from '@maz-ui/icons'`)
120
+ navigator.clipboard.writeText(`import { ${icon} } from '@maz-ui/icons/lazy/${icon}'`)
121
121
  success('Lazy import copied to clipboard')
122
122
  }
123
123
  </script>
@@ -5,8 +5,8 @@ A comprehensive collection of **860 beautiful SVG icons** ready for use in your
5
5
  ## Features
6
6
 
7
7
  - **860+ icons** - All icons are available [in the icon set page](./icon-set.md)
8
- - **Static & Lazy components** - Static (eagerly loaded) by default, lazy (async) when you need to optimize bundle size
9
- - **Multiple usage patterns** - Direct SVG files, Vue components, or auto-import
8
+ - **Three component variants** - `static` (eager Vue component, default), `lazy` (async Vue component), and `raw` **(new in v5)** raw SVG strings for inlining without a Vue component or async chunk
9
+ - **Multiple usage patterns** - Vue components, raw SVG strings, direct SVG files, or auto-import
10
10
  - **TypeScript support** - Full type definitions included
11
11
  - **Tree-shakeable** - Import only the icons you need
12
12
  - **Customizable** - Easy to style with CSS
@@ -83,9 +83,9 @@ Lazy icons are prefixed with `Lazy` and use `defineAsyncComponent` under the hoo
83
83
 
84
84
  ```vue
85
85
  <script setup lang="ts">
86
- import { LazyMazCheck, LazyMazHeart, LazyMazUser } from '@maz-ui/icons'
87
- // Or import from the lazy sub-path (without Lazy prefix):
88
- // import { MazCheck } from '@maz-ui/icons/lazy'
86
+ import { MazCheck } from '@maz-ui/icons/lazy/MazCheck'
87
+ import { MazHeart } from '@maz-ui/icons/lazy/MazHeart'
88
+ import { MazUser } from '@maz-ui/icons/lazy/MazUser'
89
89
  </script>
90
90
 
91
91
  <template>
@@ -101,15 +101,41 @@ import { LazyMazCheck, LazyMazHeart, LazyMazUser } from '@maz-ui/icons'
101
101
  You can also import individual icons directly for optimal tree-shaking:
102
102
 
103
103
  ```ts
104
- // Static icon (individual file)
105
- import { MazCheck } from '@maz-ui/icons/MazCheck'
104
+ // Static Vue component (individual file)
105
+ import { MazCheck } from '@maz-ui/icons/static/MazCheck'
106
106
 
107
- // Lazy icon (individual file)
107
+ // Lazy Vue component (individual file)
108
108
  import { MazCheck } from '@maz-ui/icons/lazy/MazCheck'
109
+
110
+ // Raw SVG string (individual file) — new in v5
111
+ import { MazCheck } from '@maz-ui/icons/raw/MazCheck'
109
112
  ```
110
113
 
111
114
  :::
112
115
 
116
+ #### Raw SVG strings (new in v5)
117
+
118
+ Each icon is 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 — useful for icons rendered hundreds of times on a page (lists, tables) or for one-off `innerHTML` use.
119
+
120
+ ```vue
121
+ <script setup lang="ts">
122
+ import MazIcon from 'maz-ui/components/MazIcon'
123
+ import { MazStar } from '@maz-ui/icons/raw/MazStar'
124
+ </script>
125
+
126
+ <template>
127
+ <MazIcon :icon="MazStar" />
128
+ </template>
129
+ ```
130
+
131
+ **When to use which variant:**
132
+
133
+ | Variant | Bundle cost | Use case |
134
+ | --- | --- | --- |
135
+ | `static` | Vue component, eager | Default. Few icons per page, simplest path. |
136
+ | `lazy` | Vue component, async chunk | Many icons but most off-screen at first paint. |
137
+ | `raw` | Inline SVG string | Same icon repeated many times in a list/table; or you want zero component overhead. |
138
+
113
139
  **Benefits:**
114
140
 
115
141
  - ✅ Tree-shaking - Only bundled icons are included
@@ -167,6 +193,7 @@ export default defineConfig({
167
193
  </template>
168
194
 
169
195
  <style scoped>
196
+ @reference "../../.vitepress/theme/main.css";
170
197
  .nav-icon {
171
198
  @apply w-6 h-6 text-gray-600 hover:text-blue-500 transition-colors cursor-pointer;
172
199
  }
@@ -26,12 +26,12 @@ The standard approach to initialize Maz-UI is the [`MazUi` plugin](./vue.md#inst
26
26
  import { MazUi } from 'maz-ui/plugins/maz-ui'
27
27
  import { mazUi } from '@maz-ui/themes/presets/mazUi'
28
28
  import { fr } from '@maz-ui/translations'
29
- import 'maz-ui/styles'
29
+ import 'maz-ui/style.css'
30
30
 
31
31
  app.use(MazUi, {
32
32
  theme: {
33
33
  preset: mazUi,
34
- strategy: 'hybrid',
34
+ strategy: 'runtime',
35
35
  },
36
36
  translations: {
37
37
  locale: 'fr',
@@ -74,7 +74,7 @@ import { fr } from '@maz-ui/translations'
74
74
 
75
75
  <template>
76
76
  <MazUiProvider
77
- :theme="{ preset: mazUi, strategy: 'hybrid' }"
77
+ :theme="{ preset: mazUi, strategy: 'runtime' }"
78
78
  :translations="{ locale: 'fr', messages: { fr } }"
79
79
  >
80
80
  <!-- All Maz-UI components inside this subtree work as expected -->
@@ -99,7 +99,7 @@ The entire Maz-UI setup is now code-split into the Dashboard chunk.
99
99
  interface ThemeOptions {
100
100
  preset: ThemePreset // Required - Theme preset (mazUi, ocean, pristine, obsidian, or custom)
101
101
  overrides?: ThemePresetOverrides // Partial overrides for colors, foundation, etc.
102
- strategy?: 'runtime' | 'buildtime' | 'hybrid' // CSS generation strategy (default: 'hybrid')
102
+ strategy?: 'runtime' | 'buildtime' // CSS generation strategy (default: 'runtime')
103
103
  darkModeStrategy?: 'class' | 'media' // Dark mode handling (default: 'class')
104
104
  colorMode?: 'light' | 'dark' | 'auto' // Initial color mode (default: 'auto')
105
105
  mode?: 'light' | 'dark' | 'both' // Supported color modes (default: 'both')
@@ -208,7 +208,7 @@ const locale = ref('fr')
208
208
  <MazUiProvider
209
209
  :theme="{
210
210
  preset: mazUi,
211
- strategy: 'hybrid',
211
+ strategy: 'runtime',
212
212
  colorMode: 'auto',
213
213
  }"
214
214
  :translations="{
@@ -217,7 +217,7 @@ const locale = ref('fr')
217
217
  messages: { fr },
218
218
  }"
219
219
  >
220
- <div class="maz-bg-background maz-text-foreground maz-p-4">
220
+ <div class="maz:bg-surface maz:text-foreground maz:p-4">
221
221
  <h1>My Dashboard</h1>
222
222
  <MazBtn color="primary">Action</MazBtn>
223
223
  <MazInput placeholder="Search..." />