@maz-ui/mcp 5.0.0-beta.2 → 5.0.0-beta.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/mcp.d.mts +22 -9
- package/dist/mcp.d.ts +22 -9
- package/dist/mcp.mjs +160 -83
- package/docs/generated-docs/maz-avatar.doc.md +25 -25
- package/docs/generated-docs/maz-btn.doc.md +1 -1
- package/docs/generated-docs/maz-checkbox.doc.md +16 -17
- package/docs/generated-docs/maz-circular-progress-bar.doc.md +1 -1
- package/docs/generated-docs/maz-code-highlight.doc.md +11 -0
- package/docs/generated-docs/maz-date-picker.doc.md +41 -41
- package/docs/generated-docs/maz-drawer.doc.md +7 -8
- package/docs/generated-docs/maz-expand-animation.doc.md +4 -4
- package/docs/generated-docs/maz-fullscreen-loader.doc.md +5 -5
- package/docs/generated-docs/maz-gallery.doc.md +15 -15
- package/docs/generated-docs/maz-input-code.doc.md +16 -16
- package/docs/generated-docs/maz-input-phone-number.doc.md +42 -38
- package/docs/generated-docs/maz-input-price.doc.md +14 -14
- package/docs/generated-docs/maz-input-tags.doc.md +16 -16
- package/docs/generated-docs/maz-input.doc.md +33 -33
- package/docs/generated-docs/maz-lazy-img.doc.md +14 -14
- package/docs/generated-docs/maz-loading-bar.doc.md +4 -4
- package/docs/generated-docs/maz-markdown-editor.doc.md +65 -0
- package/docs/generated-docs/maz-popover.doc.md +1 -1
- package/docs/generated-docs/maz-pull-to-refresh.doc.md +10 -10
- package/docs/generated-docs/maz-radio-buttons.doc.md +17 -17
- package/docs/generated-docs/maz-radio.doc.md +16 -16
- package/docs/generated-docs/maz-reading-progress-bar.doc.md +4 -4
- package/docs/generated-docs/maz-sidebar-content.doc.md +5 -0
- package/docs/generated-docs/maz-sidebar-footer.doc.md +5 -0
- package/docs/generated-docs/maz-sidebar-group.doc.md +11 -0
- package/docs/generated-docs/maz-sidebar-header.doc.md +5 -0
- package/docs/generated-docs/maz-sidebar-menu-button.doc.md +27 -0
- package/docs/generated-docs/maz-sidebar-menu-item.doc.md +5 -0
- package/docs/generated-docs/maz-sidebar-menu-sub.doc.md +16 -0
- package/docs/generated-docs/maz-sidebar-menu.doc.md +5 -0
- package/docs/generated-docs/maz-sidebar-separator.doc.md +0 -0
- package/docs/generated-docs/maz-sidebar-trigger.doc.md +5 -0
- package/docs/generated-docs/maz-sidebar.doc.md +36 -0
- package/docs/generated-docs/maz-slider.doc.md +1 -1
- package/docs/generated-docs/maz-spinner.doc.md +4 -4
- package/docs/generated-docs/maz-switch.doc.md +14 -14
- package/docs/generated-docs/maz-table.doc.md +5 -5
- package/docs/generated-docs/maz-textarea.doc.md +25 -24
- package/docs/generated-docs/maz-ticker.doc.md +1 -1
- package/docs/generated-docs/maz-timeline.doc.md +4 -4
- package/docs/generated-docs/maz-window-mockup.doc.md +23 -0
- package/docs/src/blog/v4.md +1 -1
- package/docs/src/blog/v5.md +5 -7
- package/docs/src/components/maz-btn.md +1 -1
- package/docs/src/components/maz-code-highlight.md +233 -0
- package/docs/src/components/maz-container.md +2 -2
- package/docs/src/components/maz-date-picker.md +1 -1
- package/docs/src/components/maz-dialog.md +46 -0
- package/docs/src/components/maz-icon.md +2 -2
- package/docs/src/components/maz-input-phone-number.md +106 -103
- package/docs/src/components/maz-markdown-editor.md +369 -0
- package/docs/src/components/maz-sidebar.md +719 -0
- package/docs/src/components/maz-textarea.md +27 -1
- package/docs/src/components/maz-timeline.md +60 -0
- package/docs/src/components/maz-window-mockup.md +249 -0
- package/docs/src/directives/click-outside.md +8 -15
- package/docs/src/directives/fullscreen-img.md +1 -1
- package/docs/src/directives/lazy-img.md +5 -5
- package/docs/src/directives/tooltip.md +24 -1
- package/docs/src/directives/zoom-img.md +1 -1
- package/docs/src/ecosystem/eslint-config.md +95 -1
- package/docs/src/{guide/icons.md → ecosystem/icons/index.md} +1 -1
- package/docs/src/ecosystem/node/exec-promise.md +87 -0
- package/docs/src/ecosystem/node/index.md +53 -0
- package/docs/src/ecosystem/node/logger.md +146 -0
- package/docs/src/ecosystem/node/print-banner.md +93 -0
- package/docs/src/{guide → ecosystem}/nuxt.md +81 -47
- package/docs/src/{guide → ecosystem}/themes.md +153 -72
- package/docs/src/{guide → ecosystem}/translations.md +1 -1
- package/docs/src/ecosystem/utils/camel-case.md +31 -0
- package/docs/src/{helpers → ecosystem/utils}/capitalize.md +2 -3
- package/docs/src/ecosystem/utils/check-availability.md +79 -0
- package/docs/src/ecosystem/utils/cookie.md +80 -0
- package/docs/src/{helpers → ecosystem/utils}/currency.md +2 -2
- package/docs/src/{helpers → ecosystem/utils}/date.md +2 -2
- package/docs/src/ecosystem/utils/debounce-callback.md +38 -0
- package/docs/src/ecosystem/utils/debounce-id.md +69 -0
- package/docs/src/ecosystem/utils/debounce.md +65 -0
- package/docs/src/ecosystem/utils/fetch-locale-ip.md +33 -0
- package/docs/src/ecosystem/utils/format-json.md +33 -0
- package/docs/src/ecosystem/utils/format-phone-number.md +37 -0
- package/docs/src/ecosystem/utils/get-browser-locale.md +29 -0
- package/docs/src/ecosystem/utils/get-error-message.md +39 -0
- package/docs/src/ecosystem/utils/idle-timeout.md +90 -0
- package/docs/src/ecosystem/utils/index.md +60 -0
- package/docs/src/ecosystem/utils/is-client.md +32 -0
- package/docs/src/ecosystem/utils/is-equal.md +38 -0
- package/docs/src/ecosystem/utils/is-server.md +31 -0
- package/docs/src/ecosystem/utils/is-standalone-mode.md +43 -0
- package/docs/src/ecosystem/utils/kebab-case.md +36 -0
- package/docs/src/ecosystem/utils/normalize-string.md +77 -0
- package/docs/src/{helpers → ecosystem/utils}/number.md +2 -2
- package/docs/src/ecosystem/utils/pascal-case.md +35 -0
- package/docs/src/ecosystem/utils/script-loader.md +77 -0
- package/docs/src/ecosystem/utils/sleep.md +59 -0
- package/docs/src/ecosystem/utils/snake-case.md +36 -0
- package/docs/src/ecosystem/utils/swipe-handler.md +91 -0
- package/docs/src/ecosystem/utils/textarea-autogrow.md +41 -0
- package/docs/src/ecosystem/utils/throttle-id.md +48 -0
- package/docs/src/ecosystem/utils/throttle.md +57 -0
- package/docs/src/ecosystem/utils/truthy-filter.md +31 -0
- package/docs/src/ecosystem/utils/types/deep-key-of.md +48 -0
- package/docs/src/ecosystem/utils/types/deep-partial.md +42 -0
- package/docs/src/ecosystem/utils/types/deep-required.md +39 -0
- package/docs/src/ecosystem/utils/types/flatten-object-keys.md +44 -0
- package/docs/src/ecosystem/utils/types/generic-instance-type.md +42 -0
- package/docs/src/ecosystem/utils/types/infer-maybe-ref.md +35 -0
- package/docs/src/ecosystem/utils/upper-first.md +32 -0
- package/docs/src/ecosystem/utils/user-visibility.md +69 -0
- package/docs/src/guide/getting-started.md +15 -13
- package/docs/src/guide/global-defaults.md +101 -0
- package/docs/src/guide/maz-ui-provider.md +6 -3
- package/docs/src/guide/migration-v4.md +13 -9
- package/docs/src/guide/migration-v5.md +67 -12
- package/docs/src/guide/resolvers.md +7 -7
- package/docs/src/guide/tailwind.md +4 -0
- package/docs/src/guide/vue.md +4 -4
- package/docs/src/index.md +12 -12
- package/docs/src/plugins/aos.md +1 -1
- package/docs/src/plugins/wait.md +1 -1
- package/package.json +6 -5
- package/docs/src/helpers/camel-case.md +0 -14
- package/docs/src/helpers/check-availability.md +0 -14
- package/docs/src/helpers/debounce-callback.md +0 -14
- package/docs/src/helpers/debounce-id.md +0 -14
- package/docs/src/helpers/debounce.md +0 -14
- package/docs/src/helpers/is-client.md +0 -14
- package/docs/src/helpers/is-equal.md +0 -14
- package/docs/src/helpers/is-standalone-mode.md +0 -14
- package/docs/src/helpers/kebab-case.md +0 -14
- package/docs/src/helpers/normalize-string.md +0 -14
- package/docs/src/helpers/pascal-case.md +0 -14
- package/docs/src/helpers/script-loader.md +0 -14
- package/docs/src/helpers/sleep.md +0 -14
- package/docs/src/helpers/snake-case.md +0 -14
- package/docs/src/helpers/throttle-id.md +0 -14
- package/docs/src/helpers/throttle.md +0 -14
- /package/docs/src/{guide → ecosystem/icons}/icon-set.md +0 -0
- /package/docs/src/{guide → ecosystem}/mcp.md +0 -0
- /package/docs/src/{helpers → ecosystem/utils}/country-code-to-unicode-flag.md +0 -0
- /package/docs/src/{helpers → ecosystem/utils}/get-country-flag-url.md +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
## Props
|
|
2
|
+
|
|
3
|
+
| Name | Description | Type | Required | Default |
|
|
4
|
+
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | -------- | ------------------ |
|
|
5
|
+
| **id** | Unique identifier for the sidebar (auto-generated if not provided) | `string` | No | `undefined` |
|
|
6
|
+
| **open** | Whether the sidebar is open | `boolean` | No | `undefined` |
|
|
7
|
+
| **side** | Side of the sidebar | `"start" \| "end"` | No | `undefined` |
|
|
8
|
+
| **collapsible** | How the sidebar collapses - offcanvas: completely hidden - icon: only icons visible - hover: only icons visible by default, expands on mouse hover or keyboard focus (transient visual state — does not update `v-model:open` nor the persistence cookie) - none: always fully visible | `"offcanvas" \| "icon" \| "hover" \| "none"` | No | `undefined` |
|
|
9
|
+
| **mode** | How the sidebar affects layout - push: sidebar is in document flow - overlay: sidebar floats over content with a backdrop | `"push" \| "overlay"` | No | `undefined` |
|
|
10
|
+
| **width** | Width of the expanded sidebar | `string` | No | `undefined` |
|
|
11
|
+
| **icon-width** | Width of the collapsed sidebar in icon mode | `string` | No | `undefined` |
|
|
12
|
+
| **tooltip-mode** | When descendant `MazSidebarMenuButton` components should display their tooltip. - `always`: tooltip shows on hover regardless of the sidebar state - `closed`: tooltip only shows on hover when the sidebar is collapsed Individual buttons can override this via their own `tooltipMode` prop. | `MazSidebarTooltipMode` | No | `closed` |
|
|
13
|
+
| **persist** | Persist the open/collapsed state in a cookie so it survives reloads. Restoration happens on client mount (SSR-safe). For zero-flash SSR, read the cookie server-side and forward it via `v-model:open`. | `boolean` | No | `true` |
|
|
14
|
+
| **persist-key** | Cookie key used when `persist` is enabled. Set a unique key per sidebar instance if you mount several sidebars on the same site. | `string` | No | `maz-sidebar-open` |
|
|
15
|
+
|
|
16
|
+
## Events
|
|
17
|
+
|
|
18
|
+
| Event name | Properties | Description |
|
|
19
|
+
| ----------- | ---------- | ------------------------------- |
|
|
20
|
+
| update:open | | Emitted when open state changes |
|
|
21
|
+
|
|
22
|
+
## Slots
|
|
23
|
+
|
|
24
|
+
| Name | Description | Bindings |
|
|
25
|
+
| ------- | ----------- | -------- |
|
|
26
|
+
| default | | |
|
|
27
|
+
|
|
28
|
+
## Expose
|
|
29
|
+
|
|
30
|
+
### toggle
|
|
31
|
+
|
|
32
|
+
>
|
|
33
|
+
|
|
34
|
+
### setOpen
|
|
35
|
+
|
|
36
|
+
>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
| **min** | min value of sliders | `number` | No |
|
|
8
8
|
| **max** | max value of sliders | `number` | No |
|
|
9
9
|
| **step** | step value for slider increments | `number` | No |
|
|
10
|
-
| **size** | height size of slider bar | `
|
|
10
|
+
| **size** | height size of slider bar | `MazSizeUnit` | No |
|
|
11
11
|
| **divider** | remove div in different colors | `boolean` | No |
|
|
12
12
|
| **log** | become a logarithmic slider (exponential) | `boolean` | No |
|
|
13
13
|
| **color** | main slider color | `MazColor` | No |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## Props
|
|
2
2
|
|
|
3
|
-
| Name | Description | Type
|
|
4
|
-
| --------- | ------------------------ |
|
|
5
|
-
| **size** | The size of the spinner | `
|
|
6
|
-
| **color** | The color of the spinner | `MazColor`
|
|
3
|
+
| Name | Description | Type | Required | Default |
|
|
4
|
+
| --------- | ------------------------ | ------------- | -------- | ------- |
|
|
5
|
+
| **size** | The size of the spinner | `MazSizeUnit` | No | `2em` |
|
|
6
|
+
| **color** | The color of the spinner | `MazColor` | No | `theme` |
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
## Props
|
|
2
2
|
|
|
3
|
-
| Name | Description | Type | Required |
|
|
4
|
-
| --------------- | -------------------------------------------- | ------------- | -------- |
|
|
5
|
-
| **style** | Style attribut of the component root element | `Native type` | No |
|
|
6
|
-
| **class** | Class attribut of the component root element | `Native type` | No |
|
|
7
|
-
| **model-value** | The model value of the switch | `boolean` | No |
|
|
8
|
-
| **id** | The id of the switch | `string` | No |
|
|
9
|
-
| **disabled** | If the switch is disabled | `boolean` | No |
|
|
10
|
-
| **name** | The name of the switch | `string` | No |
|
|
11
|
-
| **label** | Text label | `string` | No |
|
|
12
|
-
| **color** | The color of the switch | `MazColor` | No |
|
|
13
|
-
| **error** | Whether there is an error with the input. | `boolean` | No |
|
|
14
|
-
| **success** | Whether the input is successful. | `boolean` | No |
|
|
15
|
-
| **warning** | Whether there is a warning with the input. | `boolean` | No |
|
|
16
|
-
| **hint** | The hint text to display below the input. | `string` | No |
|
|
3
|
+
| Name | Description | Type | Required |
|
|
4
|
+
| --------------- | -------------------------------------------- | ------------- | -------- |
|
|
5
|
+
| **style** | Style attribut of the component root element | `Native type` | No |
|
|
6
|
+
| **class** | Class attribut of the component root element | `Native type` | No |
|
|
7
|
+
| **model-value** | The model value of the switch | `boolean` | No |
|
|
8
|
+
| **id** | The id of the switch | `string` | No |
|
|
9
|
+
| **disabled** | If the switch is disabled | `boolean` | No |
|
|
10
|
+
| **name** | The name of the switch | `string` | No |
|
|
11
|
+
| **label** | Text label | `string` | No |
|
|
12
|
+
| **color** | The color of the switch | `MazColor` | No |
|
|
13
|
+
| **error** | Whether there is an error with the input. | `boolean` | No |
|
|
14
|
+
| **success** | Whether the input is successful. | `boolean` | No |
|
|
15
|
+
| **warning** | Whether there is a warning with the input. | `boolean` | No |
|
|
16
|
+
| **hint** | The hint text to display below the input. | `string` | No |
|
|
17
17
|
|
|
18
18
|
## Events
|
|
19
19
|
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
| **table-class** | CSS class of the table element | `HTMLAttributes['class']` | No | `undefined` | - |
|
|
6
6
|
| **table-style** | CSS style of the table element | `HTMLAttributes['style']` | No | `undefined` | - |
|
|
7
7
|
| **model-value** | `v-model` <br/>List of selected rows | `(string \| boolean \| number)[]` | No | `undefined` | - |
|
|
8
|
-
| **size** | Size of the table | `MazSize` | No | `
|
|
8
|
+
| **size** | Size of the table | `MazSize` | No | `md` | `xl, lg, md, sm, xs, mini` |
|
|
9
9
|
| **input-size** | Size of the search inputs | `MazSize` | No | `undefined` | `xl, lg, md, sm, xs, mini` |
|
|
10
10
|
| **title** | Title of the table | `string` | No | `undefined` | - |
|
|
11
11
|
| **headers** | Headers of the table | `MazTableHeader[]` | No | `undefined` | - |
|
|
12
12
|
| **sortable** | Enable sort feature on all columns | `boolean` | No | `false` | - |
|
|
13
|
-
| **headers-align** | Align all headers | `string` | No | `
|
|
13
|
+
| **headers-align** | Align all headers | `string` | No | `left` | - |
|
|
14
14
|
| **rows** | Rows of the table | `T[]` | No | `undefined` | - |
|
|
15
15
|
| **hoverable** | Add hover effect on rows | `boolean` | No | `false` | - |
|
|
16
16
|
| **search** | Enable search feature in table header | `boolean` | No | `false` | - |
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
| **elevation** | Add shadow to the table | `boolean` | No | `false` | - |
|
|
23
23
|
| **divider** | add divider between rows | `boolean` | No | `false` | - |
|
|
24
24
|
| **caption** | Caption of the table | `string` | No | `undefined` | - |
|
|
25
|
-
| **caption-side** | Caption side | `string` | No | `
|
|
25
|
+
| **caption-side** | Caption side | `string` | No | `bottom` | `top, bottom` |
|
|
26
26
|
| **pagination** | Add pagination in table footer | `boolean` | No | `false` | - |
|
|
27
27
|
| **page** | `v-model:page` <br/>Current page of pagination | `number` | No | `1` | - |
|
|
28
28
|
| **page-size** | `v-model:page-size` <br/>Number of items per page | `number` | No | `20` | - |
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
| **selectable** | Enable selection of rows | `boolean` | No | `false` | - |
|
|
34
34
|
| **selected-key** | Enable selection of rows - key of the selected row | `string` | No | `undefined` | - |
|
|
35
35
|
| **table-layout** | Table layout | `string` | No | `undefined` | `auto, fixed` |
|
|
36
|
-
| **color** | Color of the component | `MazColor` | No | `
|
|
36
|
+
| **color** | Color of the component | `MazColor` | No | `primary` | - |
|
|
37
37
|
| **translations** | Translations of the table | `DeepPartial<MazUiTranslationsNestedSchema['table']>` | No | `Translations from @maz-ui/translations` | - |
|
|
38
|
-
| **rounded-size** | Size radius of the component's border | `
|
|
38
|
+
| **rounded-size** | Size radius of the component's border | `MazRoundedSize` | No | `md` | `none, sm, md, lg, xl, full` |
|
|
39
39
|
| **scrollable** | Enable scrollable on table | `boolean` | No | `false` | - |
|
|
40
40
|
|
|
41
41
|
## Events
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
## Props
|
|
2
2
|
|
|
3
|
-
| Name | Description
|
|
4
|
-
| ------------------ |
|
|
5
|
-
| **style** | Style attribut of the component root element
|
|
6
|
-
| **class** | Class attribut of the component root element
|
|
7
|
-
| **model-value** | `v-model` <br/>
|
|
8
|
-
| **id** | The id of the textarea
|
|
9
|
-
| **name** | The name of the textarea
|
|
10
|
-
| **label** | The label of the textarea
|
|
11
|
-
| **placeholder** | The placeholder of the textarea
|
|
12
|
-
| **required** | If the textarea is required
|
|
13
|
-
| **disabled** | If the textarea is disabled
|
|
14
|
-
| **readonly** | If the textarea is readonly
|
|
15
|
-
| **error** | If the textarea has an error
|
|
16
|
-
| **success** | If the textarea has a success
|
|
17
|
-
| **warning** | If the textarea has a warning
|
|
18
|
-
| **hint** | The hint of the textarea
|
|
19
|
-
| **color** | The color of the textarea
|
|
20
|
-
| **rounded-size** | Size radius of the component's border
|
|
21
|
-
| **padding** | If the textarea has a padding
|
|
22
|
-
| **transparent** | If the textarea has a transparent background
|
|
23
|
-
| **border** | If the textarea has no border
|
|
24
|
-
| **autogrow** | If the textarea should autogrow based on its content
|
|
25
|
-
| **append-justify** | The alignment of the append slot
|
|
26
|
-
| **top-label** | Static label displayed above the textarea. Unlike the floating label, this remains fixed
|
|
3
|
+
| Name | Description | Type | Required | Default | Possible values |
|
|
4
|
+
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -------- | ----------- | ------------------------------------------------------------------------------------- |
|
|
5
|
+
| **style** | Style attribut of the component root element | `Native type` | No | `undefined` | - |
|
|
6
|
+
| **class** | Class attribut of the component root element | `Native type` | No | `undefined` | - |
|
|
7
|
+
| **model-value** | `v-model` <br/> | `T` | No | `undefined` | - |
|
|
8
|
+
| **id** | The id of the textarea | `string` | No | `undefined` | - |
|
|
9
|
+
| **name** | The name of the textarea | `string` | No | `undefined` | - |
|
|
10
|
+
| **label** | The label of the textarea | `string` | No | `undefined` | - |
|
|
11
|
+
| **placeholder** | The placeholder of the textarea | `string` | No | `undefined` | - |
|
|
12
|
+
| **required** | If the textarea is required | `boolean` | No | `undefined` | - |
|
|
13
|
+
| **disabled** | If the textarea is disabled | `boolean` | No | `undefined` | - |
|
|
14
|
+
| **readonly** | If the textarea is readonly | `boolean` | No | `undefined` | - |
|
|
15
|
+
| **error** | If the textarea has an error | `boolean` | No | `undefined` | - |
|
|
16
|
+
| **success** | If the textarea has a success | `boolean` | No | `undefined` | - |
|
|
17
|
+
| **warning** | If the textarea has a warning | `boolean` | No | `undefined` | - |
|
|
18
|
+
| **hint** | The hint of the textarea | `string` | No | `undefined` | - |
|
|
19
|
+
| **color** | The color of the textarea | `MazColor` | No | `undefined` | - |
|
|
20
|
+
| **rounded-size** | Size radius of the component's border | `MazRoundedSize` | No | `md` | - |
|
|
21
|
+
| **padding** | If the textarea has a padding | `boolean` | No | `true` | - |
|
|
22
|
+
| **transparent** | If the textarea has a transparent background | `boolean` | No | `false` | - |
|
|
23
|
+
| **border** | If the textarea has no border | `boolean` | No | `false` | - |
|
|
24
|
+
| **autogrow** | If the textarea should autogrow based on its content | `boolean` | No | `true` | - |
|
|
25
|
+
| **append-justify** | The alignment of the append slot | `"start" \| "end" \| "center" \| "space-between" \| "space-around" \| "space-evenly"` | No | `end` | `'start' \| 'end' \| 'center' \| 'space-between' \| 'space-around' \| 'space-evenly'` |
|
|
26
|
+
| **top-label** | Static label displayed above the textarea. Unlike the floating label, this remains fixed | `string` | No | `undefined` | - |
|
|
27
|
+
| **assistive-text** | Helper text displayed below the input to provide additional context or validation feedback<br/>**Example:** `"Must contain at least 8 characters"` | `string` | No | `undefined` | - |
|
|
27
28
|
|
|
28
29
|
## Events
|
|
29
30
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
| **pause-on-focus** | Pause animation when a child element receives focus | `boolean` | No | `false` | - |
|
|
12
12
|
| **paused** | Programmatic pause control - takes precedence over pauseOnHover and pauseOnFocus | `boolean` | No | `false` | - |
|
|
13
13
|
| **overlay** | Show gradient overlays on edges to fade content in/out | `boolean` | No | `true` | - |
|
|
14
|
-
| **overlay-size** | Size of the gradient overlay zones (CSS value) | `
|
|
14
|
+
| **overlay-size** | Size of the gradient overlay zones (CSS value) | `MazSizeUnit` | No | `33%` | - |
|
|
15
15
|
| **animation-timing-function** | CSS animation timing function | `string` | No | `linear` | - |
|
|
16
16
|
|
|
17
17
|
## Slots
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
|
|
17
17
|
## Events
|
|
18
18
|
|
|
19
|
-
| Event name
|
|
20
|
-
|
|
|
21
|
-
| update:
|
|
22
|
-
| click-step
|
|
19
|
+
| Event name | Properties | Description |
|
|
20
|
+
| ------------------ | ------------------------------------------------- | ---------------------------------------- |
|
|
21
|
+
| update:model-value | **value** `mixed` - The new active step index | Emitted when the active step changes |
|
|
22
|
+
| click-step | **payload** `mixed` - The step data and its index | Emitted when a clickable step is clicked |
|
|
23
23
|
|
|
24
24
|
## Slots
|
|
25
25
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Props
|
|
2
|
+
|
|
3
|
+
| Name | Description | Type | Required | Default | Possible values |
|
|
4
|
+
| ----------------- | ------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | -------- | ----------- | ----------------------------------- |
|
|
5
|
+
| **id** | Stable id used to scope the empty-state SVG pattern. Auto-generated if not provided. | `string` | No | `undefined` | - |
|
|
6
|
+
| **variant** | Window style variant | `MazWindowMockupVariant` | No | `browser` | `browser' \| 'terminal' \| 'editor` |
|
|
7
|
+
| **url** | URL to display in the browser address bar (browser variant only) | `string` | No | `localhost` | - |
|
|
8
|
+
| **filename** | Filename to display in the editor tab (editor variant only) | `string` | No | `index.vue` | - |
|
|
9
|
+
| **title** | Title to display in the terminal title bar (terminal variant only) | `string` | No | `zsh` | - |
|
|
10
|
+
| **min-height** | Minimum height of the content area as a CSS value (e.g. '200px') | `string` | No | `undefined` | - |
|
|
11
|
+
| **code** | Source code to display using MazCodeHighlight. Takes priority over the default slot. | `string` | No | `undefined` | - |
|
|
12
|
+
| **language** | Language identifier for syntax highlighting (e.g. 'vue', 'ts', 'bash') | `string` | No | `undefined` | - |
|
|
13
|
+
| **label** | Label displayed inside the empty-state placeholder when no code and no slot content are provided. | `string` | No | `undefined` | - |
|
|
14
|
+
| **hide-prompt** | Whether to hide the terminal prompt prefix (no-op on non-terminal variants) | `boolean` | No | `false` | - |
|
|
15
|
+
| **prompt** | Prefix to display before the code in the terminal (terminal variant only) | `string` | No | `$` | - |
|
|
16
|
+
| **hide-url-copy** | Hide the copy-to-clipboard button next to the URL bar (browser variant only). | `boolean` | No | `false` | - |
|
|
17
|
+
| **translations** | Custom translations for the component. Override either key independently. | `Partial<MazUiTranslationsNestedSchema['windowMockup']>` | No | `undefined` | - |
|
|
18
|
+
|
|
19
|
+
## Slots
|
|
20
|
+
|
|
21
|
+
| Name | Description | Bindings |
|
|
22
|
+
| ------- | ---------------------------------------------------------------------- | -------- |
|
|
23
|
+
| default | Free content (image, interface, etc.) shown when code prop is not set. | |
|
package/docs/src/blog/v4.md
CHANGED
|
@@ -236,7 +236,7 @@ export default defineNuxtConfig({
|
|
|
236
236
|
To help with migration from v3 to v4:
|
|
237
237
|
|
|
238
238
|
- **[Complete Migration Guide](../guide/migration-v4.md)** - Step-by-step migration instructions
|
|
239
|
-
- **[MCP Integration](../
|
|
239
|
+
- **[MCP Integration](../ecosystem/mcp.md)** - Connect AI agents for migration assistance
|
|
240
240
|
- **[Interactive Examples](../index.md)** - Live demonstrations of new features
|
|
241
241
|
- **[Community Support](https://github.com/LouisMazel/maz-ui/discussions)** - Get help from the community
|
|
242
242
|
|
package/docs/src/blog/v5.md
CHANGED
|
@@ -90,22 +90,20 @@ npx @maz-ui/upgrade ./ --dry-run
|
|
|
90
90
|
npx @maz-ui/upgrade ./
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
It
|
|
94
|
-
|
|
95
|
-
It respects your `.gitignore`, walks `.vue`/`.css`/`.ts`/`.tsx`/`.cts`/`.mts`/`.js`/`.jsx`/`.cjs`/`.mjs` and `package.json`, and skips the usual build dirs.
|
|
93
|
+
It handles 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)
|
|
96
94
|
|
|
97
95
|
### `@maz-ui/mcp` — for everything else
|
|
98
96
|
|
|
99
97
|
A few changes need a human eye: `MazIcon` API (needs your original asset paths), `MazBadge` numeric size mapping, `foundation.radius` → `scales.rounded.md` reshape, and `MazChart` `update-mode` default.
|
|
100
98
|
|
|
101
|
-
The [`@maz-ui/mcp`](/
|
|
99
|
+
The [`@maz-ui/mcp`](/ecosystem/mcp) server exposes the migration guide and every other Maz-UI doc to your AI assistant. Connect it once, then walk the guide section by section against your codebase — there's a [step-by-step flow](/guide/migration-v5#migrate-with-the-maz-ui-mcp-server) ready to copy-paste.
|
|
102
100
|
|
|
103
101
|
```bash
|
|
104
102
|
# Claude Code
|
|
105
103
|
claude mcp add maz-ui npx @maz-ui/mcp --scope project
|
|
106
104
|
```
|
|
107
105
|
|
|
108
|
-
Cursor, Windsurf, VS Code Copilot, Cline and Claude Desktop are all in the [MCP guide](/
|
|
106
|
+
Cursor, Windsurf, VS Code Copilot, Cline and Claude Desktop are all in the [MCP guide](/ecosystem/mcp).
|
|
109
107
|
|
|
110
108
|
### The full guide
|
|
111
109
|
|
|
@@ -157,11 +155,11 @@ export default defineNuxtConfig({
|
|
|
157
155
|
## Essential Links
|
|
158
156
|
|
|
159
157
|
- **[v5 Migration Guide](/guide/migration-v5)** — every breaking change, the upgrade CLI, the MCP flow
|
|
160
|
-
- **[Theming](/
|
|
158
|
+
- **[Theming](/ecosystem/themes)** — preset authoring, `scales` and `components` blocks, runtime switching
|
|
161
159
|
- **[Browser Support](/guide/browser-support)** — minimum versions and the features they enable
|
|
162
160
|
- **[Tailwind integration](/guide/tailwind)** — for consumers who ship their own Tailwind setup
|
|
163
161
|
- **[`@maz-ui/upgrade` README](https://github.com/LouisMazel/maz-ui/tree/master/packages/upgrade)** — full transform list and CLI reference
|
|
164
|
-
- **[Model Context Protocol (MCP)](/
|
|
162
|
+
- **[Model Context Protocol (MCP)](/ecosystem/mcp)** — connect AI assistants to the Maz-UI docs
|
|
165
163
|
- **[GitHub Repository](https://github.com/LouisMazel/maz-ui)** — source code & issues
|
|
166
164
|
- **[Changelog](https://github.com/LouisMazel/maz-ui/blob/master/CHANGELOG.md)** — detailed release notes
|
|
167
165
|
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MazCodeHighlight
|
|
3
|
+
description: MazCodeHighlight displays source code with syntax highlighting powered by shiki. It auto-detects dark/light mode, ships with a copy-to-clipboard button, a language badge, and supports lazy loading.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# {{ $frontmatter.title }}
|
|
7
|
+
|
|
8
|
+
{{ $frontmatter.description }}
|
|
9
|
+
|
|
10
|
+
<!--@include: ./../../.vitepress/mixins/getting-started.md-->
|
|
11
|
+
|
|
12
|
+
## Installation requirement
|
|
13
|
+
|
|
14
|
+
Install [`shiki`](https://shiki.style) in your project to enable highlighting:
|
|
15
|
+
|
|
16
|
+
::: code-group
|
|
17
|
+
|
|
18
|
+
```bash [pnpm]
|
|
19
|
+
pnpm add shiki
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```bash [npm]
|
|
23
|
+
npm install shiki
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```bash [yarn]
|
|
27
|
+
yarn add shiki
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
:::
|
|
31
|
+
|
|
32
|
+
If `shiki` is not installed, the component falls back to a plain `<pre><code>` block.
|
|
33
|
+
|
|
34
|
+
## Basic usage
|
|
35
|
+
|
|
36
|
+
<ComponentDemo>
|
|
37
|
+
<MazCodeHighlight code="const greeting = 'Hello, maz-ui!'" language="ts" />
|
|
38
|
+
|
|
39
|
+
<template #code>
|
|
40
|
+
|
|
41
|
+
```vue
|
|
42
|
+
<template>
|
|
43
|
+
<MazCodeHighlight code="const greeting = 'Hello, maz-ui!'" language="ts" />
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<script lang="ts" setup>
|
|
47
|
+
import MazCodeHighlight from 'maz-ui/components/MazCodeHighlight'
|
|
48
|
+
</script>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
</template>
|
|
52
|
+
</ComponentDemo>
|
|
53
|
+
|
|
54
|
+
## With slot
|
|
55
|
+
|
|
56
|
+
The default slot text is used as source code when the `code` prop is not provided. This is useful for plain text blocks.
|
|
57
|
+
|
|
58
|
+
<ComponentDemo>
|
|
59
|
+
<MazCodeHighlight language="bash">npm install maz-ui</MazCodeHighlight>
|
|
60
|
+
|
|
61
|
+
<template #code>
|
|
62
|
+
|
|
63
|
+
```vue
|
|
64
|
+
<template>
|
|
65
|
+
<MazCodeHighlight language="bash">npm install maz-ui</MazCodeHighlight>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<script lang="ts" setup>
|
|
69
|
+
import MazCodeHighlight from 'maz-ui/components/MazCodeHighlight'
|
|
70
|
+
</script>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
</template>
|
|
74
|
+
</ComponentDemo>
|
|
75
|
+
|
|
76
|
+
## Languages
|
|
77
|
+
|
|
78
|
+
Pass any valid [shiki language identifier](https://shiki.style/languages) to the `language` prop. The chosen language is also displayed as a small badge in the top-right corner (the badge fades out on hover when the copy button appears).
|
|
79
|
+
|
|
80
|
+
<ComponentDemo>
|
|
81
|
+
<MazCodeHighlight language="vue" :code="vueExample" />
|
|
82
|
+
|
|
83
|
+
<template #code>
|
|
84
|
+
|
|
85
|
+
```vue
|
|
86
|
+
<template>
|
|
87
|
+
<MazCodeHighlight language="vue" :code="vueExample" />
|
|
88
|
+
</template>
|
|
89
|
+
|
|
90
|
+
<script lang="ts" setup>
|
|
91
|
+
import MazCodeHighlight from 'maz-ui/components/MazCodeHighlight'
|
|
92
|
+
|
|
93
|
+
const vueExample = `<script lang="ts" setup>
|
|
94
|
+
import { ref } from 'vue'
|
|
95
|
+
const count = ref(0)
|
|
96
|
+
<\/script>
|
|
97
|
+
|
|
98
|
+
<template>
|
|
99
|
+
<button @click="count++">Count: {{ count }}</button>
|
|
100
|
+
</template>`
|
|
101
|
+
</script>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
</template>
|
|
105
|
+
</ComponentDemo>
|
|
106
|
+
|
|
107
|
+
## Custom theme
|
|
108
|
+
|
|
109
|
+
Override the auto-detected theme with any [shiki built-in theme](https://shiki.style/themes).
|
|
110
|
+
|
|
111
|
+
<ComponentDemo>
|
|
112
|
+
<MazCodeHighlight code="console.log('dracula theme')" language="js" theme="dracula" />
|
|
113
|
+
|
|
114
|
+
<template #code>
|
|
115
|
+
|
|
116
|
+
```vue
|
|
117
|
+
<template>
|
|
118
|
+
<MazCodeHighlight code="console.log('dracula theme')" language="js" theme="dracula" />
|
|
119
|
+
</template>
|
|
120
|
+
|
|
121
|
+
<script lang="ts" setup>
|
|
122
|
+
import MazCodeHighlight from 'maz-ui/components/MazCodeHighlight'
|
|
123
|
+
</script>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
</template>
|
|
127
|
+
</ComponentDemo>
|
|
128
|
+
|
|
129
|
+
## Copy to clipboard
|
|
130
|
+
|
|
131
|
+
A copy button is displayed in the top-right corner on hover (or when focused via keyboard). Clicking it writes the resolved code to the clipboard and shows a check icon for ~1.5s.
|
|
132
|
+
|
|
133
|
+
### Disable the copy button
|
|
134
|
+
|
|
135
|
+
Set `:copyable="false"` to hide the button entirely.
|
|
136
|
+
|
|
137
|
+
<ComponentDemo>
|
|
138
|
+
<MazCodeHighlight code="const noCopyButton = true" language="ts" :copyable="false" />
|
|
139
|
+
|
|
140
|
+
<template #code>
|
|
141
|
+
|
|
142
|
+
```vue
|
|
143
|
+
<template>
|
|
144
|
+
<MazCodeHighlight code="const noCopyButton = true" language="ts" :copyable="false" />
|
|
145
|
+
</template>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
</template>
|
|
149
|
+
</ComponentDemo>
|
|
150
|
+
|
|
151
|
+
### Copy a different value than the displayed code
|
|
152
|
+
|
|
153
|
+
Use `copyValue` when the displayed source differs from what should be copied — for example to strip a leading `$` prompt when rendering a shell command. This is the mechanism `MazWindowMockup` uses internally to keep the terminal prompt out of the clipboard.
|
|
154
|
+
|
|
155
|
+
<ComponentDemo>
|
|
156
|
+
<MazCodeHighlight code="$ pnpm add maz-ui" copy-value="pnpm add maz-ui" language="bash" />
|
|
157
|
+
|
|
158
|
+
<template #code>
|
|
159
|
+
|
|
160
|
+
```vue
|
|
161
|
+
<template>
|
|
162
|
+
<MazCodeHighlight
|
|
163
|
+
code="$ pnpm add maz-ui"
|
|
164
|
+
copy-value="pnpm add maz-ui"
|
|
165
|
+
language="bash"
|
|
166
|
+
/>
|
|
167
|
+
</template>
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
</template>
|
|
171
|
+
</ComponentDemo>
|
|
172
|
+
|
|
173
|
+
## Disable rounded corners
|
|
174
|
+
|
|
175
|
+
Set `:rounded="false"` to render the highlighted block with squared corners — useful when embedding inside another container that already has its own border-radius (e.g. inside `MazWindowMockup`).
|
|
176
|
+
|
|
177
|
+
<ComponentDemo>
|
|
178
|
+
<MazCodeHighlight code="// squared corners" language="ts" :rounded="false" />
|
|
179
|
+
|
|
180
|
+
<template #code>
|
|
181
|
+
|
|
182
|
+
```vue
|
|
183
|
+
<template>
|
|
184
|
+
<MazCodeHighlight code="// squared corners" language="ts" :rounded="false" />
|
|
185
|
+
</template>
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
</template>
|
|
189
|
+
</ComponentDemo>
|
|
190
|
+
|
|
191
|
+
## Custom translations
|
|
192
|
+
|
|
193
|
+
The copy button's aria-label and tooltip come from the `@maz-ui/translations` package (`codeHighlight.copyToClipboard` / `codeHighlight.copiedToClipboard`). You can override either key per-instance with the `translations` prop without touching the global locale:
|
|
194
|
+
|
|
195
|
+
<ComponentDemo>
|
|
196
|
+
<MazCodeHighlight
|
|
197
|
+
code="const hello = 'world'"
|
|
198
|
+
language="ts"
|
|
199
|
+
:translations="{ copyToClipboard: 'Copier le code', copiedToClipboard: 'Copié !' }"
|
|
200
|
+
/>
|
|
201
|
+
|
|
202
|
+
<template #code>
|
|
203
|
+
|
|
204
|
+
```vue
|
|
205
|
+
<template>
|
|
206
|
+
<MazCodeHighlight
|
|
207
|
+
code="const hello = 'world'"
|
|
208
|
+
language="ts"
|
|
209
|
+
:translations="{
|
|
210
|
+
copyToClipboard: 'Copier le code',
|
|
211
|
+
copiedToClipboard: 'Copié !',
|
|
212
|
+
}"
|
|
213
|
+
/>
|
|
214
|
+
</template>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
</template>
|
|
218
|
+
</ComponentDemo>
|
|
219
|
+
|
|
220
|
+
For app-wide translations, set up the [maz-ui translations plugin](/translations) and the component will pick up your locale automatically.
|
|
221
|
+
|
|
222
|
+
<script lang="ts" setup>
|
|
223
|
+
const vueExample = `<script lang="ts" setup>
|
|
224
|
+
import { ref } from 'vue'
|
|
225
|
+
const count = ref(0)
|
|
226
|
+
<\/script>
|
|
227
|
+
|
|
228
|
+
<template>
|
|
229
|
+
<button @click="count++">Count: {{ count }}</button>
|
|
230
|
+
</template>`
|
|
231
|
+
</script>
|
|
232
|
+
|
|
233
|
+
<!--@include: ./../../.vitepress/generated-docs/maz-code-highlight.doc.md-->
|
|
@@ -301,7 +301,7 @@ Use the `header` slot to fully customize the header, or use `title`, `icon-start
|
|
|
301
301
|
<ComponentDemo>
|
|
302
302
|
<MazContainer
|
|
303
303
|
title="Dashboard Overview"
|
|
304
|
-
start-icon="chart-bar"
|
|
304
|
+
start-icon="/chart-bar.svg"
|
|
305
305
|
elevation
|
|
306
306
|
:bordered="false"
|
|
307
307
|
rounded-size="xl"
|
|
@@ -329,7 +329,7 @@ Use the `header` slot to fully customize the header, or use `title`, `icon-start
|
|
|
329
329
|
<template>
|
|
330
330
|
<MazContainer
|
|
331
331
|
title="Dashboard Overview"
|
|
332
|
-
start-icon="chart-bar"
|
|
332
|
+
start-icon="/chart-bar.svg"
|
|
333
333
|
elevation
|
|
334
334
|
:bordered="false"
|
|
335
335
|
rounded-size="xl"
|
|
@@ -896,7 +896,7 @@ const disabledHours = [0, 1, 2, 11, 22, 23]
|
|
|
896
896
|
|
|
897
897
|
## Internationalization
|
|
898
898
|
|
|
899
|
-
MazDatePicker supports full internationalization. **By default, it uses the locale from the [MazUiTranslations](../
|
|
899
|
+
MazDatePicker supports full internationalization. **By default, it uses the locale from the [MazUiTranslations](../ecosystem/translations.md) plugin**, but you can override it:
|
|
900
900
|
|
|
901
901
|
<ComponentDemo>
|
|
902
902
|
<div class="maz:grid maz:grid-cols-1 maz:mob-l:grid-cols-2 maz:gap-4">
|