@maz-ui/mcp 4.9.3 → 5.0.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.
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 -34
  33. package/docs/src/components/maz-bottom-sheet.md +74 -74
  34. package/docs/src/components/maz-btn-group.md +17 -17
  35. package/docs/src/components/maz-btn.md +129 -96
  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 -12
  58. package/docs/src/components/maz-pagination.md +2 -2
  59. package/docs/src/components/maz-popover.md +236 -236
  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 +187 -0
  91. package/docs/src/ecosystem/stylelint-config.md +302 -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 +11 -11
  95. package/docs/src/guide/icons.md +32 -5
  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 +296 -266
  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,187 @@
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 v3+v4 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 (v3 or v4), 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), Tailwind rules from [`eslint-plugin-better-tailwindcss`](https://github.com/schoero/eslint-plugin-better-tailwindcss), 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
+ The Tailwind plugin and other peer/transitive dependencies are bundled as direct dependencies, so you don't need to install them yourself.
17
+
18
+ ## Basic usage
19
+
20
+ Create `eslint.config.ts` (or `.mjs`/`.js`) at the root of your project:
21
+
22
+ ```ts
23
+ import { defineConfig } from '@maz-ui/eslint-config'
24
+
25
+ export default defineConfig()
26
+ ```
27
+
28
+ That's it. Vue is auto-detected from your `package.json` (presence of `vue` or `nuxt`).
29
+
30
+ ## Configuration
31
+
32
+ ```ts
33
+ import { defineConfig } from '@maz-ui/eslint-config'
34
+
35
+ export default defineConfig({
36
+ // Toggle features explicitly (each one is also auto-detected from your deps).
37
+ typescript: true, // default
38
+ vue: true, // auto-detected
39
+ sonarjs: true, // default
40
+ tailwindcss: false, // see "Tailwind support" below
41
+ vueAccessibility: false, // optional
42
+ formatters: true, // CSS/HTML/JSON/YAML/Markdown formatting via dprint
43
+
44
+ // 'production' downgrades console.log to error, 'development' keeps it warning.
45
+ env: 'production',
46
+
47
+ // Extra ignore globs (merged with sensible defaults).
48
+ ignores: ['**/*.generated.ts'],
49
+
50
+ // Direct rule overrides applied on top of the resolved config.
51
+ rules: {
52
+ 'no-console': 'error',
53
+ 'vue/custom-event-name-casing': ['error', 'kebab-case'],
54
+ },
55
+
56
+ // Log verbosity — see "Logging" below.
57
+ logLevel: 'default',
58
+ })
59
+ ```
60
+
61
+ ## Logging
62
+
63
+ The preset prints a titled box summarizing what it resolved (typescript, vue, tailwindcss preset, sonarjs, …) when ESLint loads. Powered by [`@maz-ui/node`](https://www.npmjs.com/package/@maz-ui/node)'s consola-based logger.
64
+
65
+ | `logLevel` | What you see |
66
+ | --- | --- |
67
+ | `'silent'` | Nothing. |
68
+ | `'default'` *(TTY default)* | A titled box summarizing the resolved feature toggles, with `(auto-detected)` / `(default)` annotations next to each value. |
69
+ | `'debug'` | Adds one line per major block applied (Vue rules, SonarJS preset, vue-a11y, Tailwind plugin, test relaxations, user overrides). |
70
+ | `'verbose'` | Adds the final shape: total block count and ignore-glob count. |
71
+
72
+ ```ts
73
+ defineConfig({ logLevel: 'debug' })
74
+ ```
75
+
76
+ The default is **`'default'` in interactive terminals (TTY) and `'silent'` otherwise** — CI, lint-staged, pipes, and JSON / SARIF formatters all write to stdout, where the box would corrupt machine-readable output. `logLevel` always wins when set explicitly.
77
+
78
+ You can also append raw flat-config items as additional arguments — they merge after the built-in configs:
79
+
80
+ ```ts
81
+ export default defineConfig(
82
+ { typescript: true },
83
+ {
84
+ files: ['**/*.legacy.ts'],
85
+ rules: { 'ts/no-explicit-any': 'off' },
86
+ },
87
+ )
88
+ ```
89
+
90
+ ## Tailwind support
91
+
92
+ Powered by [`eslint-plugin-better-tailwindcss`](https://github.com/schoero/eslint-plugin-better-tailwindcss) — supports both **Tailwind v3 and v4**, and ESLint 7→10.
93
+
94
+ The `tailwindcss` option accepts several shapes:
95
+
96
+ | Value | Behavior |
97
+ | --- | --- |
98
+ | `false` *(default)* | Disabled. |
99
+ | `true` | Same as `'recommended'` with default settings. |
100
+ | `'recommended'` | Stylistic + correctness rules. |
101
+ | `'stylistic'` | Formatting rules only — class order, line wrapping, no duplicate classes, etc. |
102
+ | `'correctness'` | Validation rules only — `no-unknown-classes`, `no-conflicting-classes`. |
103
+ | `MazTailwindcssOptions` | Pick a preset and pass plugin settings (Tailwind config path, prefix entry point, …). |
104
+
105
+ ```ts
106
+ defineConfig({
107
+ tailwindcss: {
108
+ preset: 'recommended',
109
+ // Tailwind v4 — path to the CSS that does `@import "tailwindcss" prefix(maz)`.
110
+ entryPoint: 'src/main.css',
111
+ // Tailwind v3 instead — path to your config file.
112
+ // tailwindConfig: 'tailwind.config.ts',
113
+ // Tailwind v4: detect custom @layer components classes (cards, btns, …).
114
+ detectComponentClasses: true,
115
+ // Monorepo: directory used to resolve `tailwindcss` and the config file.
116
+ cwd: 'apps/web',
117
+ },
118
+ })
119
+ ```
120
+
121
+ ::: warning Plugin needs to know your Tailwind setup
122
+ The plugin's correctness rules (`no-unknown-classes`, `no-conflicting-classes`) auto-resolve your Tailwind installation. Without `entryPoint` (v4) or `tailwindConfig` (v3), the plugin falls back to the **default Tailwind config** and won't know about your prefix, custom utilities, or theme tokens — which produces a flood of false positives in non-vanilla setups.
123
+
124
+ If you customize Tailwind in any meaningful way (prefix, extend theme, custom utilities), set `entryPoint` or `tailwindConfig` explicitly. If you hit false positives anyway, downgrade to `'stylistic'` (formatting only) or disable individual rules:
125
+
126
+ ```ts
127
+ defineConfig({
128
+ tailwindcss: 'recommended',
129
+ rules: {
130
+ 'better-tailwindcss/no-unknown-classes': 'off',
131
+ },
132
+ })
133
+ ```
134
+ :::
135
+
136
+ The plugin recognizes the most common class-name utilities out of the box (`clsx`, `cn`, `tw-merge`, `cva`, `tv`, …); see the [plugin docs](https://github.com/schoero/eslint-plugin-better-tailwindcss) for the full list and how to register your own.
137
+
138
+ ## What it includes
139
+
140
+ - **Antfu base** — TypeScript-aware rules, Stylistic formatting, modern import order.
141
+ - **SonarJS** — code quality and complexity heuristics, with a relaxed set for `*.spec.ts` / `*.test.ts`.
142
+ - **Vue rules** (when Vue/Nuxt is detected) — block-tag order, naming conventions, template a11y.
143
+ - **Tailwind plugin** (opt-in) — class ordering, duplicate / deprecated / unknown / conflicting class detection — see [Tailwind support](#tailwind-support).
144
+ - **Markdown** — prose linting baseline.
145
+ - **vueAccessibility** (opt-in) — `eslint-plugin-vuejs-accessibility` rules with the AudioWorklet globals fix.
146
+
147
+ ## Advanced
148
+
149
+ ### Compose your own config
150
+
151
+ ```ts
152
+ import {
153
+ baseRules,
154
+ sonarjsRules,
155
+ tailwindcssConfigs,
156
+ vueRules,
157
+ } from '@maz-ui/eslint-config'
158
+
159
+ export default [
160
+ {
161
+ rules: {
162
+ ...baseRules(true), // production = true → no-console: 'error'
163
+ ...sonarjsRules,
164
+ ...vueRules,
165
+ },
166
+ },
167
+ // Drop in just the Tailwind block, with whatever preset and settings you want.
168
+ ...tailwindcssConfigs('stylistic', { entryPoint: 'src/main.css' }),
169
+ ]
170
+ ```
171
+
172
+ ### Auto-detection caveat (monorepos)
173
+
174
+ Auto-detection of Vue / Nuxt reads the `package.json` in `process.cwd()` only. In a monorepo where `vue` is hoisted to the root and missing from a sub-package's `package.json`, detection silently fails. Set `vue: true` explicitly in those cases:
175
+
176
+ ```ts
177
+ defineConfig({ vue: true, tailwindcss: { preset: 'recommended', cwd: 'apps/web' } })
178
+ ```
179
+
180
+ ## Compatibility
181
+
182
+ | Tool | Required version |
183
+ | --- | --- |
184
+ | ESLint | `>=9.0.0 <11.0.0` |
185
+ | Node.js | `>=20.19.0` |
186
+ | TypeScript | `^5.0.0` |
187
+ | Tailwind CSS | `^3.3.0 \|\| ^4.0.0` *(when `tailwindcss` is on)* |
@@ -0,0 +1,302 @@
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 support (at-rule whitelist + tunable plugin policy), RTL-friendly logical properties, optional SCSS support, Vue/HTML block parsing, and a single `extends` knob to compose extra shareable configs.
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`, `stylelint-plugin-tailwindcss`, `stylelint-order`, …) 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` or `@tailwindcss/vite` is in dependencies | At-rule whitelist + Tailwind plugin with the `'minimal'` policy (see [Tailwind](#tailwind-css-v4) below) |
34
+ | `sass`, `sass-embedded` or `node-sass` is in dependencies | SCSS support (`stylelint-config-standard-scss`, `postcss-scss`) |
35
+
36
+ ::: warning Monorepo caveat
37
+ Detection only reads the `package.json` in the current working directory. In a monorepo where `tailwindcss`, `vue` or `sass` are hoisted to the root and **not declared** in a sub-package's `package.json`, detection silently fails when Stylelint runs from that sub-package. Set the relevant flags explicitly in those cases:
38
+
39
+ ```js
40
+ defineConfig({ vue: true, tailwind: true, scss: false })
41
+ ```
42
+ :::
43
+
44
+ ## Configuration
45
+
46
+ ```js
47
+ import { defineConfig } from '@maz-ui/stylelint-config'
48
+
49
+ export default defineConfig({
50
+ // Each one is also auto-detected — set explicitly to opt in/out.
51
+ vue: true,
52
+ html: false,
53
+
54
+ // `true` → 'minimal' plugin policy. Pass 'recommended' or 'strict' to enforce
55
+ // utility-first authoring conventions. `false` disables Tailwind support.
56
+ tailwind: true,
57
+ scss: false,
58
+
59
+ // Encourage logical CSS properties for RTL-friendly authoring:
60
+ // `inset-inline-start` instead of `left`, `margin-inline-start` instead
61
+ // of `margin-left`, etc. Highly recommended for design systems.
62
+ logical: true,
63
+
64
+ // Property order strategy.
65
+ // 'recess' : Recess-based ordering via stylelint-config-recess-order (default)
66
+ // 'alphabetical' : A→Z ordering via stylelint-order
67
+ // false : Disable ordering rules
68
+ order: 'recess',
69
+
70
+ // Extra ignore globs (merged with sensible defaults).
71
+ ignores: ['**/legacy/**'],
72
+
73
+ // Direct rule overrides applied on top of the resolved config.
74
+ rules: {
75
+ 'no-descending-specificity': null,
76
+ 'function-no-unknown': [true, { ignoreFunctions: ['v-bind', 'theme'] }],
77
+ },
78
+
79
+ // Per-file overrides appended last.
80
+ overrides: [
81
+ {
82
+ files: ['**/*.legacy.css'],
83
+ rules: { 'no-descending-specificity': null },
84
+ },
85
+ ],
86
+
87
+ // Layer extra shareable configs. Appended after the built-ins so they
88
+ // win Stylelint's cascade.
89
+ extends: ['stylelint-config-clean-order'],
90
+
91
+ // Log verbosity — see "Logging" below.
92
+ logLevel: 'default',
93
+ })
94
+ ```
95
+
96
+ ## Logging
97
+
98
+ The preset can explain what it resolved and which plugins / extends it added — useful when you can't figure out why a rule is on or off. Logging is powered by [`@maz-ui/node`](https://www.npmjs.com/package/@maz-ui/node)'s consola-based logger.
99
+
100
+ | `logLevel` | What you see |
101
+ | --- | --- |
102
+ | `'silent'` | Nothing. |
103
+ | `'default'` *(default)* | A titled box summarizing the resolved support (vue, tailwind, scss, html, logical, order), with `(auto-detected)` / `(default)` annotations next to each value. |
104
+ | `'debug'` | Adds one line per plugin / extends / overrides addition (`Vue: extended stylelint-config-recommended-vue`, `Tailwind: loaded 2 plugin(s) for "minimal" policy`, `User: extended stylelint-config-clean-order`, …). |
105
+ | `'verbose'` | Adds the final shape: complete `extends` list, plugin / rule / override / ignore counts. |
106
+
107
+ ```js
108
+ defineConfig({ logLevel: 'debug' })
109
+ ```
110
+
111
+ The `logLevel` type comes from `@maz-ui/node` and accepts the full set of consola levels (`'silent'`, `'error'`, `'warning'`, `'normal'`, `'default'`, `'debug'`, `'trace'`, `'verbose'`). The four values above are the ones the preset actually produces output for.
112
+
113
+ ## Logical properties (RTL-friendly)
114
+
115
+ 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:
116
+
117
+ ```css
118
+ /* ❌ Physical — breaks in RTL languages */
119
+ .toolbar {
120
+ margin-left: 1rem;
121
+ padding-right: 1rem;
122
+ text-align: left;
123
+ left: 0;
124
+ }
125
+
126
+ /* ✅ Logical — adapts to writing direction */
127
+ .toolbar {
128
+ margin-inline-start: 1rem;
129
+ padding-inline-end: 1rem;
130
+ text-align: start;
131
+ inset-inline-start: 0;
132
+ }
133
+ ```
134
+
135
+ 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.
136
+
137
+ Disable it explicitly if your project doesn't need RTL support:
138
+
139
+ ```js
140
+ defineConfig({ logical: false })
141
+ ```
142
+
143
+ ## Tailwind CSS v4
144
+
145
+ When `tailwind` is enabled (truthy or auto-detected), the preset:
146
+
147
+ - 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`.
148
+ - Sets `at-rule-no-deprecated` to allow `@apply` (Tailwind v4 still ships it as the canonical authoring directive).
149
+ - Forces `import-notation: 'string'` — Tailwind v4 only parses the `prefix(...)` modifier on bare-string `@import` forms, never on `url()`-wrapped imports.
150
+ - Loads [`stylelint-plugin-tailwindcss`](https://github.com/sonofmagic/dev-configs/tree/main/packages/stylelint-plugin-tailwindcss) and applies a curated rule set based on the chosen policy level.
151
+
152
+ ### Policy levels
153
+
154
+ The `tailwind` option accepts a strictness level. Pure `true` (or auto-detection) maps to `'minimal'`.
155
+
156
+ | Value | Plugin loaded | What runs |
157
+ | --- | --- | --- |
158
+ | `true` *(or auto-detected)* | ❌ | Same as `'minimal'`. |
159
+ | `'minimal'` | ❌ | At-rule whitelist + `import-notation: 'string'` + `at-rule-no-deprecated`. **No plugin rules.** |
160
+ | `'recommended'` | ✅ | `'minimal'` + `stylelint-plugin-tailwindcss`'s `recommended` preset (`no-invalid-apply`, `no-invalid-theme-function`, `no-atomic-class`, `no-apply`, `no-arbitrary-value`). |
161
+ | `'strict'` | ✅ | `'recommended'` + architecture-level rules (`no-theme-function`, `no-screen-directive`, `no-tailwind-directive`, `no-import-directive`, `no-css-layer`). |
162
+ | `false` | ❌ | Tailwind support disabled entirely (no at-rule whitelist, no plugin). |
163
+
164
+ ```js
165
+ defineConfig({ tailwind: 'recommended' })
166
+ ```
167
+
168
+ ::: warning Plugin rules need to find your Tailwind runtime
169
+ Both `'recommended'` and `'strict'` enable rules from `stylelint-plugin-tailwindcss` that resolve your project's Tailwind installation from each linted file's path. Projects with a Tailwind v4 prefix (`maz:`, `tw:`, …), a non-standard entry CSS, or a monorepo layout where the plugin can't locate Tailwind will produce a flood of false positives (every `@apply maz:flex` flagged as invalid).
170
+
171
+ `'minimal'` is the safe default — it only enables the at-rule whitelist and a couple of CSS-level rules, no runtime Tailwind validation.
172
+
173
+ If you want validation but hit false positives, drop the offending rule:
174
+
175
+ ```js
176
+ defineConfig({
177
+ tailwind: 'recommended',
178
+ rules: {
179
+ 'tailwindcss/no-invalid-apply': null,
180
+ 'tailwindcss/no-invalid-theme-function': null,
181
+ },
182
+ })
183
+ ```
184
+ :::
185
+
186
+ The plugin supports both Tailwind v3 and v4.
187
+
188
+ ## Property ordering
189
+
190
+ | Value | Behavior |
191
+ | --- | --- |
192
+ | `'recess'` *(default)* | Extends `stylelint-config-recess-order`. Pragmatic, widely adopted, groups related properties. |
193
+ | `'alphabetical'` | Loads `stylelint-order` and enables `order/properties-alphabetical-order`. Strict A→Z. |
194
+ | `false` | No ordering rules. |
195
+
196
+ To swap recess for another shareable order config (e.g. `stylelint-config-clean-order`), disable the built-in strategy and extend yours via the [`extends`](#layering-shareable-configs) option:
197
+
198
+ ```js
199
+ defineConfig({
200
+ order: false,
201
+ extends: ['stylelint-config-clean-order'],
202
+ })
203
+ ```
204
+
205
+ ## Layering shareable configs
206
+
207
+ The `extends` option appends entries **after** the built-ins, so user configs win Stylelint's cascade:
208
+
209
+ ```js
210
+ defineConfig({
211
+ extends: [
212
+ 'stylelint-config-clean-order', // alternative property order
213
+ '@stylistic/stylelint-config', // restore stylistic rules retired from Stylelint core
214
+ ],
215
+ })
216
+ ```
217
+
218
+ Use this to layer additional shareable configs without rewriting the whole `defineConfig` output.
219
+
220
+ ## What it includes
221
+
222
+ - **Stylelint Standard** — Idiomatic CSS rules from the official Stylelint config.
223
+ - **Property ordering** — Recess-based by default (`stylelint-config-recess-order`), alphabetical via `stylelint-order`, or off — see [Property ordering](#property-ordering).
224
+ - **Tailwind v4 support** (opt-in / auto-detected) — at-rule whitelist + `stylelint-plugin-tailwindcss` with three policy levels — see [Tailwind CSS v4](#tailwind-css-v4).
225
+ - **Vue / HTML support** (opt-in / auto-detected) — `<style>` and `<style scoped>` block parsing via `postcss-html`.
226
+ - **SCSS support** (opt-in / auto-detected) — `stylelint-config-standard-scss` + native SCSS at-rule whitelist.
227
+ - **Logical properties** — RTL-friendly authoring via `stylelint-use-logical-spec`.
228
+ - **BEM-friendly class patterns** — disables `selector-class-pattern` and `no-descending-specificity` so `m-btn__icon`, `m-btn--ghost` and `:deep(...)` selectors flow naturally.
229
+ - **Layering** — `extends` option to compose additional shareable configs on top of the resolved output.
230
+
231
+ ## Advanced
232
+
233
+ You can import the individual rule sets to compose your own:
234
+
235
+ ```js
236
+ import {
237
+ baseRules,
238
+ GLOBAL_IGNORES,
239
+ logicalRules,
240
+ scssRules,
241
+ TAILWIND_AT_RULES,
242
+ tailwindAtRuleNoUnknown,
243
+ tailwindPluginMinimal,
244
+ tailwindPluginRecommended,
245
+ tailwindPluginStrict,
246
+ tailwindRules,
247
+ } from '@maz-ui/stylelint-config'
248
+
249
+ export default {
250
+ rules: {
251
+ ...baseRules,
252
+ ...tailwindRules,
253
+ ...tailwindAtRuleNoUnknown,
254
+ ...tailwindPluginMinimal,
255
+ },
256
+ }
257
+ ```
258
+
259
+ Each `tailwindPlugin*` constant is the rule object for the corresponding policy level — useful when you compose Stylelint configs by hand instead of going through `defineConfig`.
260
+
261
+ ## Migrating from a hand-written `.stylelintrc`
262
+
263
+ If you used the historical maz-ui Stylelint setup, the migration boils down to:
264
+
265
+ ```diff
266
+ -/** @type {import('stylelint').Config} */
267
+ -export default {
268
+ - plugins: ['stylelint-scss'],
269
+ - extends: [
270
+ - 'stylelint-config-standard',
271
+ - 'stylelint-config-standard-scss',
272
+ - 'stylelint-config-recommended-vue',
273
+ - ],
274
+ - rules: {
275
+ - 'at-rule-no-unknown': [true, { ignoreAtRules: ['theme', 'apply', 'layer', /* ... */] }],
276
+ - 'scss/at-rule-no-unknown': [true, { ignoreAtRules: [/* same list */] }],
277
+ - 'selector-pseudo-class-no-unknown': [true, { ignorePseudoClasses: ['deep'] }],
278
+ - 'selector-class-pattern': null,
279
+ - 'no-descending-specificity': null,
280
+ - 'function-no-unknown': [true, { ignoreFunctions: ['v-bind'] }],
281
+ - 'nesting-selector-no-missing-scoping-root': null,
282
+ - },
283
+ - overrides: [
284
+ - { files: ['**/*.vue', '**/*.html'], customSyntax: 'postcss-html' },
285
+ - ],
286
+ -}
287
+ +import { defineConfig } from '@maz-ui/stylelint-config'
288
+ +
289
+ +export default defineConfig({
290
+ + vue: true,
291
+ + scss: true,
292
+ + tailwind: true, // 'minimal' | 'recommended' | 'strict' | false also accepted
293
+ + logical: true,
294
+ +})
295
+ ```
296
+
297
+ ## Compatibility
298
+
299
+ | Tool | Required version |
300
+ | --- | --- |
301
+ | Stylelint | `>=16.0.0 <18.0.0` |
302
+ | 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 {