@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
@@ -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>
@@ -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
@@ -101,15 +101,41 @@ import { MazUser } from '@maz-ui/icons/lazy/MazUser'
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..." />
@@ -105,7 +105,7 @@ npm uninstall dropzone
105
105
  ```typescript
106
106
  // main.ts
107
107
  import { createApp } from 'vue'
108
- import 'maz-ui/css/main.css'
108
+ import 'maz-ui/style.css'
109
109
  import App from './App.vue'
110
110
 
111
111
  createApp(App).mount('#app')
@@ -121,7 +121,7 @@ import { mazUi } from '@maz-ui/themes/presets'
121
121
  import { fr } from '@maz-ui/translations'
122
122
 
123
123
  // Import styles before your CSS
124
- import 'maz-ui/styles'
124
+ import 'maz-ui/style.css'
125
125
  import './style.css'
126
126
 
127
127
  import App from './App.vue'
@@ -173,7 +173,7 @@ export default defineNuxtConfig({
173
173
  // New configuration API
174
174
  theme: {
175
175
  preset: 'maz-ui',
176
- strategy: 'hybrid',
176
+ strategy: 'runtime',
177
177
  darkModeStrategy: 'class',
178
178
  },
179
179
  translations: {