maz-ui 5.0.0 → 5.1.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/dist/assets/{MazDropzone.DJ8au25t.css → MazDropzone.BW2grpTi.css} +1 -1
  2. package/dist/chunks/{MazDrawer.DANxKYxJ.js → MazDrawer.CC8zomfx.js} +2 -2
  3. package/dist/chunks/{MazDropzone.POH3pmfi.js → MazDropzone.Dez5j0WP.js} +2 -2
  4. package/dist/components/MazDrawer.js +1 -1
  5. package/dist/components/MazDropzone.js +1 -1
  6. package/dist/components/MazDropzone.vue.d.ts +2 -2
  7. package/dist/components/MazInputPrice.vue.d.ts +1 -1
  8. package/dist/components/index.js +2 -2
  9. package/docs/README.md +207 -0
  10. package/docs/agents/agents-md.md +52 -0
  11. package/docs/agents/claude-rule.md +52 -0
  12. package/docs/components/maz-accordion.md +76 -0
  13. package/docs/components/maz-alert.md +241 -0
  14. package/docs/components/maz-animated-counter.md +87 -0
  15. package/docs/components/maz-animated-element.md +46 -0
  16. package/docs/components/maz-animated-text.md +53 -0
  17. package/docs/components/maz-avatar.md +193 -0
  18. package/docs/components/maz-backdrop.md +178 -0
  19. package/docs/components/maz-badge.md +167 -0
  20. package/docs/components/maz-bottom-sheet.md +257 -0
  21. package/docs/components/maz-btn-group.md +316 -0
  22. package/docs/components/maz-btn.md +423 -0
  23. package/docs/components/maz-card-spotlight.md +84 -0
  24. package/docs/components/maz-card.md +321 -0
  25. package/docs/components/maz-carousel.md +153 -0
  26. package/docs/components/maz-chart.md +206 -0
  27. package/docs/components/maz-checkbox.md +138 -0
  28. package/docs/components/maz-checklist.md +251 -0
  29. package/docs/components/maz-circular-progress-bar.md +109 -0
  30. package/docs/components/maz-code-highlight.md +155 -0
  31. package/docs/components/maz-container.md +241 -0
  32. package/docs/components/maz-date-picker.md +791 -0
  33. package/docs/components/maz-dialog-confirm.md +215 -0
  34. package/docs/components/maz-dialog.md +143 -0
  35. package/docs/components/maz-drawer.md +106 -0
  36. package/docs/components/maz-dropdown.md +419 -0
  37. package/docs/components/maz-dropzone.md +387 -0
  38. package/docs/components/maz-expand-animation.md +82 -0
  39. package/docs/components/maz-fullscreen-loader.md +58 -0
  40. package/docs/components/maz-gallery.md +79 -0
  41. package/docs/components/maz-icon.md +203 -0
  42. package/docs/components/maz-input-code.md +73 -0
  43. package/docs/components/maz-input-number.md +79 -0
  44. package/docs/components/maz-input-phone-number.md +536 -0
  45. package/docs/components/maz-input-price.md +68 -0
  46. package/docs/components/maz-input-tags.md +112 -0
  47. package/docs/components/maz-input.md +334 -0
  48. package/docs/components/maz-lazy-img.md +113 -0
  49. package/docs/components/maz-link.md +146 -0
  50. package/docs/components/maz-loading-bar.md +38 -0
  51. package/docs/components/maz-markdown-editor.md +320 -0
  52. package/docs/components/maz-pagination.md +82 -0
  53. package/docs/components/maz-popover.md +794 -0
  54. package/docs/components/maz-pull-to-refresh.md +222 -0
  55. package/docs/components/maz-radio-buttons.md +313 -0
  56. package/docs/components/maz-radio.md +119 -0
  57. package/docs/components/maz-read-more.md +209 -0
  58. package/docs/components/maz-reading-progress-bar.md +96 -0
  59. package/docs/components/maz-select-country.md +513 -0
  60. package/docs/components/maz-select.md +318 -0
  61. package/docs/components/maz-sidebar-content.md +25 -0
  62. package/docs/components/maz-sidebar-footer.md +25 -0
  63. package/docs/components/maz-sidebar-group.md +27 -0
  64. package/docs/components/maz-sidebar-header.md +25 -0
  65. package/docs/components/maz-sidebar-menu-button.md +41 -0
  66. package/docs/components/maz-sidebar-menu-item.md +25 -0
  67. package/docs/components/maz-sidebar-menu-sub.md +32 -0
  68. package/docs/components/maz-sidebar-menu.md +25 -0
  69. package/docs/components/maz-sidebar-separator.md +21 -0
  70. package/docs/components/maz-sidebar-trigger.md +25 -0
  71. package/docs/components/maz-sidebar.md +507 -0
  72. package/docs/components/maz-skeleton.md +226 -0
  73. package/docs/components/maz-slider.md +165 -0
  74. package/docs/components/maz-spinner.md +84 -0
  75. package/docs/components/maz-stepper.md +301 -0
  76. package/docs/components/maz-switch.md +86 -0
  77. package/docs/components/maz-table-cell.md +27 -0
  78. package/docs/components/maz-table-row.md +28 -0
  79. package/docs/components/maz-table-title.md +27 -0
  80. package/docs/components/maz-table-virtualizer.md +31 -0
  81. package/docs/components/maz-table.md +426 -0
  82. package/docs/components/maz-tabs-bar.md +43 -0
  83. package/docs/components/maz-tabs-content-item.md +27 -0
  84. package/docs/components/maz-tabs-content.md +27 -0
  85. package/docs/components/maz-tabs.md +308 -0
  86. package/docs/components/maz-textarea.md +255 -0
  87. package/docs/components/maz-ticker.md +427 -0
  88. package/docs/components/maz-timeline.md +304 -0
  89. package/docs/components/maz-ui-provider.md +26 -0
  90. package/docs/components/maz-window-mockup.md +182 -0
  91. package/docs/composables/use-aos.md +41 -0
  92. package/docs/composables/use-breakpoints.md +42 -0
  93. package/docs/composables/use-dialog.md +58 -0
  94. package/docs/composables/use-display-names.md +130 -0
  95. package/docs/composables/use-drag.md +185 -0
  96. package/docs/composables/use-form-validator.md +1123 -0
  97. package/docs/composables/use-idle-timeout.md +172 -0
  98. package/docs/composables/use-pull-to-refresh.md +86 -0
  99. package/docs/composables/use-reading-time.md +132 -0
  100. package/docs/composables/use-string-matching.md +41 -0
  101. package/docs/composables/use-swipe.md +171 -0
  102. package/docs/composables/use-timer.md +104 -0
  103. package/docs/composables/use-toast.md +50 -0
  104. package/docs/composables/use-user-visibility.md +127 -0
  105. package/docs/composables/use-wait.md +50 -0
  106. package/docs/composables/use-window-size.md +25 -0
  107. package/docs/directives/click-outside.md +182 -0
  108. package/docs/directives/fullscreen-img.md +83 -0
  109. package/docs/directives/lazy-img.md +182 -0
  110. package/docs/directives/tooltip.md +298 -0
  111. package/docs/directives/zoom-img.md +100 -0
  112. package/docs/ecosystem/eslint-config.md +289 -0
  113. package/docs/ecosystem/icons/icon-set.md +25 -0
  114. package/docs/ecosystem/icons/index.md +584 -0
  115. package/docs/ecosystem/mcp.md +165 -0
  116. package/docs/ecosystem/node/exec-promise.md +93 -0
  117. package/docs/ecosystem/node/index.md +53 -0
  118. package/docs/ecosystem/node/logger.md +152 -0
  119. package/docs/ecosystem/node/print-banner.md +101 -0
  120. package/docs/ecosystem/node/setup-agents.md +102 -0
  121. package/docs/ecosystem/nuxt.md +551 -0
  122. package/docs/ecosystem/stylelint-config.md +310 -0
  123. package/docs/ecosystem/themes.md +966 -0
  124. package/docs/ecosystem/translations.md +1173 -0
  125. package/docs/ecosystem/utils/camel-case.md +37 -0
  126. package/docs/ecosystem/utils/capitalize.md +37 -0
  127. package/docs/ecosystem/utils/check-availability.md +85 -0
  128. package/docs/ecosystem/utils/cookie.md +86 -0
  129. package/docs/ecosystem/utils/country-code-to-unicode-flag.md +128 -0
  130. package/docs/ecosystem/utils/currency.md +53 -0
  131. package/docs/ecosystem/utils/date.md +53 -0
  132. package/docs/ecosystem/utils/debounce-callback.md +44 -0
  133. package/docs/ecosystem/utils/debounce-id.md +75 -0
  134. package/docs/ecosystem/utils/debounce.md +71 -0
  135. package/docs/ecosystem/utils/fetch-locale-ip.md +39 -0
  136. package/docs/ecosystem/utils/format-json.md +39 -0
  137. package/docs/ecosystem/utils/format-phone-number.md +43 -0
  138. package/docs/ecosystem/utils/get-browser-locale.md +35 -0
  139. package/docs/ecosystem/utils/get-country-flag-url.md +67 -0
  140. package/docs/ecosystem/utils/get-error-message.md +45 -0
  141. package/docs/ecosystem/utils/idle-timeout.md +96 -0
  142. package/docs/ecosystem/utils/index.md +57 -0
  143. package/docs/ecosystem/utils/is-client.md +38 -0
  144. package/docs/ecosystem/utils/is-equal.md +44 -0
  145. package/docs/ecosystem/utils/is-ios.md +43 -0
  146. package/docs/ecosystem/utils/is-server.md +37 -0
  147. package/docs/ecosystem/utils/is-standalone-mode.md +49 -0
  148. package/docs/ecosystem/utils/kebab-case.md +42 -0
  149. package/docs/ecosystem/utils/normalize-string.md +83 -0
  150. package/docs/ecosystem/utils/number.md +51 -0
  151. package/docs/ecosystem/utils/pascal-case.md +41 -0
  152. package/docs/ecosystem/utils/prevent-ios-input-zoom.md +72 -0
  153. package/docs/ecosystem/utils/script-loader.md +85 -0
  154. package/docs/ecosystem/utils/sleep.md +65 -0
  155. package/docs/ecosystem/utils/snake-case.md +42 -0
  156. package/docs/ecosystem/utils/swipe-handler.md +97 -0
  157. package/docs/ecosystem/utils/textarea-autogrow.md +47 -0
  158. package/docs/ecosystem/utils/throttle-id.md +54 -0
  159. package/docs/ecosystem/utils/throttle.md +63 -0
  160. package/docs/ecosystem/utils/truthy-filter.md +37 -0
  161. package/docs/ecosystem/utils/types/deep-key-of.md +54 -0
  162. package/docs/ecosystem/utils/types/deep-partial.md +48 -0
  163. package/docs/ecosystem/utils/types/deep-required.md +45 -0
  164. package/docs/ecosystem/utils/types/flatten-object-keys.md +50 -0
  165. package/docs/ecosystem/utils/types/generic-instance-type.md +48 -0
  166. package/docs/ecosystem/utils/types/infer-maybe-ref.md +41 -0
  167. package/docs/ecosystem/utils/upper-first.md +38 -0
  168. package/docs/ecosystem/utils/user-visibility.md +75 -0
  169. package/docs/guide/ai-agents.md +237 -0
  170. package/docs/guide/browser-support.md +88 -0
  171. package/docs/guide/getting-started.md +191 -0
  172. package/docs/guide/global-defaults.md +103 -0
  173. package/docs/guide/maz-ui-provider.md +231 -0
  174. package/docs/guide/migration-v5.md +871 -0
  175. package/docs/guide/resolvers.md +650 -0
  176. package/docs/guide/tailwind.md +483 -0
  177. package/docs/guide/vue.md +286 -0
  178. package/docs/manifest.json +1 -0
  179. package/docs/plugins/aos.md +312 -0
  180. package/docs/plugins/dialog.md +269 -0
  181. package/docs/plugins/toast.md +221 -0
  182. package/docs/plugins/wait.md +78 -0
  183. package/docs/reference/icons.md +46 -0
  184. package/docs/reference/tailwind-tokens.md +191 -0
  185. package/docs/rules.md +57 -0
  186. package/package.json +31 -4
@@ -0,0 +1,310 @@
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
+ package: "@maz-ui/stylelint-config"
5
+ url: "https://maz-ui.com/ecosystem/stylelint-config"
6
+ ---
7
+
8
+ # @maz-ui/stylelint-config
9
+
10
+ > Stylelint preset for Vue/Nuxt/JS/TS projects, with first-class Tailwind CSS v4 support, RTL-friendly logical properties, and SCSS opt-in.
11
+
12
+ - Package: `@maz-ui/stylelint-config`
13
+ - Import: `import { defineConfig } from '@maz-ui/stylelint-config'`
14
+ - Web: https://maz-ui.com/ecosystem/stylelint-config
15
+
16
+ `@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.
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ pnpm add -D @maz-ui/stylelint-config stylelint
22
+ ```
23
+
24
+ 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.
25
+
26
+ ## Basic usage
27
+
28
+ Create `stylelint.config.mjs` at the root of your project:
29
+
30
+ ```js
31
+ import { defineConfig } from '@maz-ui/stylelint-config'
32
+
33
+ export default defineConfig()
34
+ ```
35
+
36
+ Vue, Tailwind and SCSS are auto-detected from your `package.json`:
37
+
38
+ | Detected when… | Enables… |
39
+ | --- | --- |
40
+ | `vue` or `nuxt` is in dependencies | Vue support (`stylelint-config-recommended-vue`, `<style>` block parsing) |
41
+ | `tailwindcss` or `@tailwindcss/vite` is in dependencies | At-rule whitelist + Tailwind plugin with the `'minimal'` policy (see Tailwind below) |
42
+ | `sass`, `sass-embedded` or `node-sass` is in dependencies | SCSS support (`stylelint-config-standard-scss`, `postcss-scss`) |
43
+
44
+ **Warning: Monorepo caveat**
45
+
46
+ 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:
47
+
48
+ ```js
49
+ defineConfig({ vue: true, tailwind: true, scss: false })
50
+ ```
51
+
52
+ ## Configuration
53
+
54
+ ```js
55
+ import { defineConfig } from '@maz-ui/stylelint-config'
56
+
57
+ export default defineConfig({
58
+ // Each one is also auto-detected - set explicitly to opt in/out.
59
+ vue: true,
60
+ html: false,
61
+
62
+ // `true` → 'minimal' plugin policy. Pass 'recommended' or 'strict' to enforce
63
+ // utility-first authoring conventions. `false` disables Tailwind support.
64
+ tailwind: true,
65
+ scss: false,
66
+
67
+ // Encourage logical CSS properties for RTL-friendly authoring:
68
+ // `inset-inline-start` instead of `left`, `margin-inline-start` instead
69
+ // of `margin-left`, etc. Highly recommended for design systems.
70
+ logical: true,
71
+
72
+ // Property order strategy.
73
+ // 'recess' : Recess-based ordering via stylelint-config-recess-order (default)
74
+ // 'alphabetical' : A→Z ordering via stylelint-order
75
+ // false : Disable ordering rules
76
+ order: 'recess',
77
+
78
+ // Extra ignore globs (merged with sensible defaults).
79
+ ignores: ['**/legacy/**'],
80
+
81
+ // Direct rule overrides applied on top of the resolved config.
82
+ rules: {
83
+ 'no-descending-specificity': null,
84
+ 'function-no-unknown': [true, { ignoreFunctions: ['v-bind', 'theme'] }],
85
+ },
86
+
87
+ // Per-file overrides appended last.
88
+ overrides: [
89
+ {
90
+ files: ['**/*.legacy.css'],
91
+ rules: { 'no-descending-specificity': null },
92
+ },
93
+ ],
94
+
95
+ // Layer extra shareable configs. Appended after the built-ins so they
96
+ // win Stylelint's cascade.
97
+ extends: ['stylelint-config-clean-order'],
98
+
99
+ // Log verbosity - see "Logging" below.
100
+ logLevel: 'default',
101
+ })
102
+ ```
103
+
104
+ ## Logging
105
+
106
+ 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.
107
+
108
+ | `logLevel` | What you see |
109
+ | --- | --- |
110
+ | `'silent'` | Nothing. |
111
+ | `'default'` *(default)* | A titled box summarizing the resolved support (vue, tailwind, scss, html, logical, order), with `(auto-detected)` / `(default)` annotations next to each value. |
112
+ | `'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`, …). |
113
+ | `'verbose'` | Adds the final shape: complete `extends` list, plugin / rule / override / ignore counts. |
114
+
115
+ ```js
116
+ defineConfig({ logLevel: 'debug' })
117
+ ```
118
+
119
+ 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.
120
+
121
+ ## Logical properties (RTL-friendly)
122
+
123
+ 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:
124
+
125
+ ```css
126
+ /* ❌ Physical - breaks in RTL languages */
127
+ .toolbar {
128
+ margin-left: 1rem;
129
+ padding-right: 1rem;
130
+ text-align: left;
131
+ left: 0;
132
+ }
133
+
134
+ /* ✅ Logical - adapts to writing direction */
135
+ .toolbar {
136
+ margin-inline-start: 1rem;
137
+ padding-inline-end: 1rem;
138
+ text-align: start;
139
+ inset-inline-start: 0;
140
+ }
141
+ ```
142
+
143
+ 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.
144
+
145
+ Disable it explicitly if your project doesn't need RTL support:
146
+
147
+ ```js
148
+ defineConfig({ logical: false })
149
+ ```
150
+
151
+ ## Tailwind CSS v4
152
+
153
+ When `tailwind` is enabled (truthy or auto-detected), the preset:
154
+
155
+ - 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`.
156
+ - Sets `at-rule-no-deprecated` to allow `@apply` (Tailwind v4 still ships it as the canonical authoring directive).
157
+ - Forces `import-notation: 'string'` - Tailwind v4 only parses the `prefix(...)` modifier on bare-string `@import` forms, never on `url()`-wrapped imports.
158
+ - 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.
159
+
160
+ ### Policy levels
161
+
162
+ The `tailwind` option accepts a strictness level. Pure `true` (or auto-detection) maps to `'minimal'`.
163
+
164
+ | Value | Plugin loaded | What runs |
165
+ | --- | --- | --- |
166
+ | `true` *(or auto-detected)* | ❌ | Same as `'minimal'`. |
167
+ | `'minimal'` | ❌ | At-rule whitelist + `import-notation: 'string'` + `at-rule-no-deprecated`. **No plugin rules.** |
168
+ | `'recommended'` | ✅ | `'minimal'` + `stylelint-plugin-tailwindcss`'s `recommended` preset (`no-invalid-apply`, `no-invalid-theme-function`, `no-atomic-class`, `no-apply`, `no-arbitrary-value`). |
169
+ | `'strict'` | ✅ | `'recommended'` + architecture-level rules (`no-theme-function`, `no-screen-directive`, `no-tailwind-directive`, `no-import-directive`, `no-css-layer`). |
170
+ | `false` | ❌ | Tailwind support disabled entirely (no at-rule whitelist, no plugin). |
171
+
172
+ ```js
173
+ defineConfig({ tailwind: 'recommended' })
174
+ ```
175
+
176
+ **Warning: Plugin rules need to find your Tailwind runtime**
177
+
178
+ 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).
179
+
180
+ `'minimal'` is the safe default - it only enables the at-rule whitelist and a couple of CSS-level rules, no runtime Tailwind validation.
181
+
182
+ If you want validation but hit false positives, drop the offending rule:
183
+
184
+ ```js
185
+ defineConfig({
186
+ tailwind: 'recommended',
187
+ rules: {
188
+ 'tailwindcss/no-invalid-apply': null,
189
+ 'tailwindcss/no-invalid-theme-function': null,
190
+ },
191
+ })
192
+ ```
193
+
194
+ The plugin supports both Tailwind v3 and v4.
195
+
196
+ ## Property ordering
197
+
198
+ | Value | Behavior |
199
+ | --- | --- |
200
+ | `'recess'` *(default)* | Extends `stylelint-config-recess-order`. Pragmatic, widely adopted, groups related properties. |
201
+ | `'alphabetical'` | Loads `stylelint-order` and enables `order/properties-alphabetical-order`. Strict A→Z. |
202
+ | `false` | No ordering rules. |
203
+
204
+ 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` option:
205
+
206
+ ```js
207
+ defineConfig({
208
+ order: false,
209
+ extends: ['stylelint-config-clean-order'],
210
+ })
211
+ ```
212
+
213
+ ## Layering shareable configs
214
+
215
+ The `extends` option appends entries **after** the built-ins, so user configs win Stylelint's cascade:
216
+
217
+ ```js
218
+ defineConfig({
219
+ extends: [
220
+ 'stylelint-config-clean-order', // alternative property order
221
+ '@stylistic/stylelint-config', // restore stylistic rules retired from Stylelint core
222
+ ],
223
+ })
224
+ ```
225
+
226
+ Use this to layer additional shareable configs without rewriting the whole `defineConfig` output.
227
+
228
+ ## What it includes
229
+
230
+ - **Stylelint Standard** - Idiomatic CSS rules from the official Stylelint config.
231
+ - **Property ordering** - Recess-based by default (`stylelint-config-recess-order`), alphabetical via `stylelint-order`, or off - see Property ordering.
232
+ - **Tailwind v4 support** (opt-in / auto-detected) - at-rule whitelist + `stylelint-plugin-tailwindcss` with three policy levels - see Tailwind CSS v4.
233
+ - **Vue / HTML support** (opt-in / auto-detected) - `<style>` and `<style scoped>` block parsing via `postcss-html`.
234
+ - **SCSS support** (opt-in / auto-detected) - `stylelint-config-standard-scss` + native SCSS at-rule whitelist.
235
+ - **Logical properties** - RTL-friendly authoring via `stylelint-use-logical-spec`.
236
+ - **BEM-friendly class patterns** - disables `selector-class-pattern` and `no-descending-specificity` so `m-btn__icon`, `m-btn--ghost` and `:deep(...)` selectors flow naturally.
237
+ - **Layering** - `extends` option to compose additional shareable configs on top of the resolved output.
238
+
239
+ ## Advanced
240
+
241
+ You can import the individual rule sets to compose your own:
242
+
243
+ ```js
244
+ import {
245
+ baseRules,
246
+ GLOBAL_IGNORES,
247
+ logicalRules,
248
+ scssRules,
249
+ TAILWIND_AT_RULES,
250
+ tailwindAtRuleNoUnknown,
251
+ tailwindPluginMinimal,
252
+ tailwindPluginRecommended,
253
+ tailwindPluginStrict,
254
+ tailwindRules,
255
+ } from '@maz-ui/stylelint-config'
256
+
257
+ export default {
258
+ rules: {
259
+ ...baseRules,
260
+ ...tailwindRules,
261
+ ...tailwindAtRuleNoUnknown,
262
+ ...tailwindPluginMinimal,
263
+ },
264
+ }
265
+ ```
266
+
267
+ 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`.
268
+
269
+ ## Migrating from a hand-written `.stylelintrc`
270
+
271
+ If you used the historical maz-ui Stylelint setup, the migration boils down to:
272
+
273
+ ```diff
274
+ -/** @type {import('stylelint').Config} */
275
+ -export default {
276
+ - plugins: ['stylelint-scss'],
277
+ - extends: [
278
+ - 'stylelint-config-standard',
279
+ - 'stylelint-config-standard-scss',
280
+ - 'stylelint-config-recommended-vue',
281
+ - ],
282
+ - rules: {
283
+ - 'at-rule-no-unknown': [true, { ignoreAtRules: ['theme', 'apply', 'layer', /* ... */] }],
284
+ - 'scss/at-rule-no-unknown': [true, { ignoreAtRules: [/* same list */] }],
285
+ - 'selector-pseudo-class-no-unknown': [true, { ignorePseudoClasses: ['deep'] }],
286
+ - 'selector-class-pattern': null,
287
+ - 'no-descending-specificity': null,
288
+ - 'function-no-unknown': [true, { ignoreFunctions: ['v-bind'] }],
289
+ - 'nesting-selector-no-missing-scoping-root': null,
290
+ - },
291
+ - overrides: [
292
+ - { files: ['**/*.vue', '**/*.html'], customSyntax: 'postcss-html' },
293
+ - ],
294
+ -}
295
+ +import { defineConfig } from '@maz-ui/stylelint-config'
296
+ +
297
+ +export default defineConfig({
298
+ + vue: true,
299
+ + scss: true,
300
+ + tailwind: true, // 'minimal' | 'recommended' | 'strict' | false also accepted
301
+ + logical: true,
302
+ +})
303
+ ```
304
+
305
+ ## Compatibility
306
+
307
+ | Tool | Required version |
308
+ | --- | --- |
309
+ | Stylelint | `>=16.0.0 <18.0.0` |
310
+ | Node.js | `>=20.19.0` |