@maz-ui/mcp 4.0.0-beta.32 → 4.0.0-beta.35
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/dist/mcp.mjs +1 -1
- package/docs/generated-docs/maz-backdrop.doc.md +16 -22
- package/docs/generated-docs/maz-carousel.doc.md +6 -6
- package/docs/generated-docs/maz-checklist.doc.md +12 -12
- package/docs/generated-docs/maz-dialog.doc.md +6 -6
- package/docs/generated-docs/maz-dropdown.doc.md +21 -21
- package/docs/generated-docs/maz-input-phone-number.doc.md +37 -37
- package/docs/generated-docs/maz-popover.doc.md +7 -6
- package/docs/generated-docs/maz-select-country.doc.md +26 -26
- package/docs/generated-docs/maz-select.doc.md +1 -1
- package/docs/generated-docs/maz-table-row.doc.md +1 -0
- package/docs/generated-docs/maz-table.doc.md +37 -37
- package/docs/src/components/maz-backdrop.md +236 -2
- package/docs/src/components/maz-date-picker.md +1 -1
- package/docs/src/components/maz-dialog.md +4 -100
- package/docs/src/components/maz-dropdown.md +1 -1
- package/docs/src/components/maz-popover.md +20 -20
- package/docs/src/components/maz-slider.md +6 -6
- package/docs/src/components/maz-table.md +1 -1
- package/docs/src/composables/use-display-names.md +18 -15
- package/docs/src/composables/use-form-validator.md +1 -1
- package/docs/src/directives/tooltip.md +2 -2
- package/docs/src/guide/icon-set.md +6 -8
- package/docs/src/guide/icons.md +89 -81
- package/docs/src/guide/migration-v4.md +91 -75
- package/docs/src/guide/nuxt.md +9 -1
- package/docs/src/guide/themes.md +4 -2
- package/docs/src/guide/translations.md +2 -8
- package/docs/src/guide/vue.md +47 -11
- package/docs/src/index.md +26 -26
- package/package.json +9 -9
package/dist/mcp.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { existsSync, readFileSync, readdirSync } from 'node:fs';
|
|
|
7
7
|
import { resolve, dirname, join } from 'node:path';
|
|
8
8
|
import { fileURLToPath } from 'node:url';
|
|
9
9
|
|
|
10
|
-
const version = "4.0.0-beta.
|
|
10
|
+
const version = "4.0.0-beta.34";
|
|
11
11
|
|
|
12
12
|
const _dirname = dirname(fileURLToPath(import.meta.url));
|
|
13
13
|
class DocumentationService {
|
|
@@ -14,48 +14,42 @@
|
|
|
14
14
|
| **justify** | Justify content | `"center" \| "end" \| "start" \| "space-between" \| "space-around" \| "none"` | No |
|
|
15
15
|
| **align** | Align content | `"center" \| "end" \| "start" \| "none"` | No |
|
|
16
16
|
| **variant** | Variant | `"bottom-sheet" \| "dialog" \| "drawer"` | No |
|
|
17
|
+
| **aria-labelledby** | ID for aria-labelledby | `string` | No |
|
|
18
|
+
| **aria-describedby** | ID for aria-describedby | `string` | No |
|
|
17
19
|
|
|
18
20
|
## Events
|
|
19
21
|
|
|
20
|
-
| Event name | Properties
|
|
21
|
-
| ------------------ |
|
|
22
|
-
| open |
|
|
23
|
-
| close |
|
|
24
|
-
| update:model-value |
|
|
25
|
-
| before-close |
|
|
22
|
+
| Event name | Properties | Description |
|
|
23
|
+
| ------------------ | -------------------------------------------- | ----------------------------------- |
|
|
24
|
+
| open | | Emitted when modal is open |
|
|
25
|
+
| close | | Emitted when modal is close |
|
|
26
|
+
| update:model-value | **value** `boolean` - The value of the model | Emitted when modal is open or close |
|
|
27
|
+
| before-close | | Emitted before modal is close |
|
|
26
28
|
|
|
27
29
|
## Slots
|
|
28
30
|
|
|
29
|
-
| Name | Description | Bindings
|
|
30
|
-
| ------- | ----------------------- |
|
|
31
|
-
| default | Place your content here | **close** `Function` - close function
|
|
31
|
+
| Name | Description | Bindings |
|
|
32
|
+
| ------- | ----------------------- | ------------------------------------- |
|
|
33
|
+
| default | Place your content here | **close** `Function` - close function |
|
|
32
34
|
|
|
33
35
|
## Expose
|
|
34
36
|
|
|
35
|
-
### onBackdropAnimationEnter
|
|
36
|
-
|
|
37
|
-
>
|
|
38
|
-
|
|
39
37
|
### onBackdropAnimationLeave
|
|
40
38
|
|
|
41
|
-
>
|
|
42
|
-
|
|
43
|
-
### onBackdropClicked
|
|
44
|
-
|
|
45
|
-
>
|
|
39
|
+
> Animation leave event <br/>`@description` This is used to handle animation leave events
|
|
46
40
|
|
|
47
41
|
### close
|
|
48
42
|
|
|
49
|
-
>
|
|
43
|
+
> Close the backdrop <br/>`@description` This is used to close the backdrop
|
|
50
44
|
|
|
51
45
|
### present
|
|
52
46
|
|
|
53
|
-
>
|
|
47
|
+
> The present state of the backdrop <br/>`@description` This is used to check if the backdrop is present (open)
|
|
54
48
|
|
|
55
49
|
### toggleModal
|
|
56
50
|
|
|
57
|
-
>
|
|
51
|
+
> Toggle the backdrop <br/>`@description` This is used to toggle the backdrop<br/>`@param` The value to toggle the backdrop (optional)
|
|
58
52
|
|
|
59
53
|
### onKeyPress
|
|
60
54
|
|
|
61
|
-
>
|
|
55
|
+
> Key press event <br/>`@description` This is used to handle key press events
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
## Props
|
|
2
2
|
|
|
3
|
-
| Name | Description | Type
|
|
4
|
-
| ----------------------- | ---------------------------------- |
|
|
5
|
-
| **hide-scroll-buttons** | Hide display the scroll buttons | `boolean`
|
|
6
|
-
| **translations** | Translations of the carousel | `DeepPartial<
|
|
7
|
-
| **hide-scrollbar** | Hide the scrollbar when not active | `boolean`
|
|
8
|
-
| **title** | The title of the carousel | `string`
|
|
3
|
+
| Name | Description | Type | Required | Default |
|
|
4
|
+
| ----------------------- | ---------------------------------- | -------------------------------------------------------- | -------- | ---------------------------------------- |
|
|
5
|
+
| **hide-scroll-buttons** | Hide display the scroll buttons | `boolean` | No | `false` |
|
|
6
|
+
| **translations** | Translations of the carousel | `DeepPartial<MazUiTranslationsNestedSchema['carousel']>` | No | `Translations from @maz-ui/translations` |
|
|
7
|
+
| **hide-scrollbar** | Hide the scrollbar when not active | `boolean` | No | `false` |
|
|
8
|
+
| **title** | The title of the carousel | `string` | No | `undefined` |
|
|
9
9
|
|
|
10
10
|
## Slots
|
|
11
11
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
## Props
|
|
2
2
|
|
|
3
|
-
| Name | Description | Type
|
|
4
|
-
| ------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
5
|
-
| **model-value** | The model value of the checklist (selected items) | `(T extends unknown)[]`
|
|
6
|
-
| **query** | The query to filter the items (model) | `string`
|
|
7
|
-
| **items** | The list of items to display | `(O extends MazChecklistItemOption)[]`
|
|
8
|
-
| **title** | The title of the checklist | `string`
|
|
9
|
-
| **elevation** | Add elevation to the card | `boolean`
|
|
10
|
-
| **search** | The search input options | `boolean \| MazInputProps`
|
|
11
|
-
| **search-options** | The options to normalize the search query (used by the default search function) By default, the threshold is 0.75 | `intersection`
|
|
12
|
-
| **search-function** | Replace the default search function to provide a custom search function | `TSFunctionType`
|
|
13
|
-
| **color** | The color of the checklist (card, checkbox and search input) | `MazColor`
|
|
14
|
-
| **translations** | Translations of the checklist component | `DeepPartial<
|
|
3
|
+
| Name | Description | Type | Required | Default |
|
|
4
|
+
| ------------------- | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | -------- | ----------------------------------------------------- |
|
|
5
|
+
| **model-value** | The model value of the checklist (selected items) | `(T extends unknown)[]` | No | `undefined` |
|
|
6
|
+
| **query** | The query to filter the items (model) | `string` | No | `undefined` |
|
|
7
|
+
| **items** | The list of items to display | `(O extends MazChecklistItemOption)[]` | No | `undefined` |
|
|
8
|
+
| **title** | The title of the checklist | `string` | No | `undefined` |
|
|
9
|
+
| **elevation** | Add elevation to the card | `boolean` | No | `false` |
|
|
10
|
+
| **search** | The search input options | `boolean \| MazInputProps` | No | `{ enabled: false, debounce: 300, autoFocus: false }` |
|
|
11
|
+
| **search-options** | The options to normalize the search query (used by the default search function) By default, the threshold is 0.75 | `intersection` | No | `undefined` |
|
|
12
|
+
| **search-function** | Replace the default search function to provide a custom search function | `TSFunctionType` | No | `undefined` |
|
|
13
|
+
| **color** | The color of the checklist (card, checkbox and search input) | `MazColor` | No | `primary` |
|
|
14
|
+
| **translations** | Translations of the checklist component | `DeepPartial<MazUiTranslationsNestedSchema['checklist']>` | No | `Translations from @maz-ui/translations` |
|
|
15
15
|
|
|
16
16
|
## Events
|
|
17
17
|
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
## Slots
|
|
10
10
|
|
|
11
|
-
| Name | Description | Bindings
|
|
12
|
-
| ------- | ------------------------ |
|
|
13
|
-
| header | Header slot | **close** `Function` - close function
|
|
14
|
-
| title | Title slot in the header |
|
|
15
|
-
| default | Default content | **close** `Function` - close function
|
|
16
|
-
| footer | Footer slot | **close** `Function` - close function
|
|
11
|
+
| Name | Description | Bindings |
|
|
12
|
+
| ------- | ------------------------ | ------------------------------------- |
|
|
13
|
+
| header | Header slot | **close** `Function` - close function |
|
|
14
|
+
| title | Title slot in the header | |
|
|
15
|
+
| default | Default content | **close** `Function` - close function |
|
|
16
|
+
| footer | Footer slot | **close** `Function` - close function |
|
|
17
17
|
|
|
18
18
|
## Expose
|
|
19
19
|
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
## Props
|
|
2
2
|
|
|
3
|
-
| Name | Description | Type | Required | Default
|
|
4
|
-
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | -------- |
|
|
5
|
-
| **model-value** | `v-model` <br/>Controls whether the dropdown menu is open | `boolean` | No | `false`
|
|
6
|
-
| **style** | Inline styles to apply to the component root element | `HTMLAttributes['style']` | No | `undefined`
|
|
7
|
-
| **class** | CSS classes to apply to the component root element | `HTMLAttributes['class']` | No | `undefined`
|
|
8
|
-
| **items** | Menu items to display in the dropdown Each item can be either a link (with href/to properties) or an action (with onClick function)<br/>**Example:** `[ { label: 'Profile', href: '/profile' }, { label: 'Settings', onClick: () => console.log('Settings clicked') } ]` | `MazDropdownMenuItem[]` | No | `[]`
|
|
9
|
-
| **id** | Unique identifier for the dropdown component | `string` | No | `undefined`
|
|
10
|
-
| **trigger** | Determines how the dropdown should be triggered | `MazPopoverProps['trigger']` | No | `adaptive`
|
|
11
|
-
| **color** | Color theme for the dropdown button | `MazColor` | No | `transparent`
|
|
12
|
-
| **position** | Position of the menu relative to trigger | `Native type` | No | `auto`
|
|
13
|
-
| **prefer-position** | Preferred position of the menu relative to trigger when auto position is used | `Native type` | No | `bottom-start`
|
|
14
|
-
| **close-on-click** | Controls whether the dropdown menu closes when a menu item is clicked | `boolean` | No | `true`
|
|
15
|
-
| **disabled** | Disables the dropdown functionality | `boolean` | No | `false`
|
|
16
|
-
| **chevron** | Controls whether to show the chevron icon in the trigger button | `boolean` | No | `true`
|
|
17
|
-
| **screen-reader-description** | Accessible description for screen readers describing the dropdown functionality If not provided, the default translation of
|
|
18
|
-
| **menu-panel-class** | Additional CSS classes to apply to the dropdown menu panel Useful for customizing the dropdown appearance (background, border, etc.) | `HTMLAttributes['class']` | No | `undefined`
|
|
19
|
-
| **menu-panel-style** | Inline styles to apply to the dropdown menu panel Useful for custom styling. You may use `!important` to override default styles | `HTMLAttributes['style']` | No | `undefined`
|
|
20
|
-
| **block** | Makes the dropdown button expand to full width of its container | `boolean` | No | `false`
|
|
21
|
-
| **dropdown-icon** | Icon to use instead of the default chevron for the dropdown indicator Can be either an icon name string or a Vue component<br/>**Example:** `'arrow-down'` | `string \| IconComponent` | No | `undefined`
|
|
22
|
-
| **dropdown-icon-animation** | Controls whether the dropdown icon rotates when the dropdown is opened | `boolean` | No | `true`
|
|
23
|
-
| **size** | Size of the dropdown button | `MazSize` | No | `md`
|
|
3
|
+
| Name | Description | Type | Required | Default | Possible values |
|
|
4
|
+
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | -------- | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
5
|
+
| **model-value** | `v-model` <br/>Controls whether the dropdown menu is open | `boolean` | No | `false` | - |
|
|
6
|
+
| **style** | Inline styles to apply to the component root element | `HTMLAttributes['style']` | No | `undefined` | - |
|
|
7
|
+
| **class** | CSS classes to apply to the component root element | `HTMLAttributes['class']` | No | `undefined` | - |
|
|
8
|
+
| **items** | Menu items to display in the dropdown Each item can be either a link (with href/to properties) or an action (with onClick function)<br/>**Example:** `[ { label: 'Profile', href: '/profile' }, { label: 'Settings', onClick: () => console.log('Settings clicked') } ]` | `MazDropdownMenuItem[]` | No | `[]` | - |
|
|
9
|
+
| **id** | Unique identifier for the dropdown component | `string` | No | `undefined` | - |
|
|
10
|
+
| **trigger** | Determines how the dropdown should be triggered | `MazPopoverProps['trigger']` | No | `adaptive` | `click, hover, manual, adaptive` |
|
|
11
|
+
| **color** | Color theme for the dropdown button | `MazColor` | No | `transparent` | `primary, secondary, info, success, warning, destructive, transparent, contrast, accent` |
|
|
12
|
+
| **position** | Position of the menu relative to trigger | `Native type` | No | `auto` | `auto, top, bottom, left, right, top-start, top-end, bottom-start, bottom-end, left-start, left-end, right-start, right-end` |
|
|
13
|
+
| **prefer-position** | Preferred position of the menu relative to trigger when auto position is used | `Native type` | No | `bottom-start` | `auto, top, bottom, left, right, top-start, top-end, bottom-start, bottom-end, left-start, left-end, right-start, right-end` |
|
|
14
|
+
| **close-on-click** | Controls whether the dropdown menu closes when a menu item is clicked | `boolean` | No | `true` | - |
|
|
15
|
+
| **disabled** | Disables the dropdown functionality | `boolean` | No | `false` | - |
|
|
16
|
+
| **chevron** | Controls whether to show the chevron icon in the trigger button | `boolean` | No | `true` | - |
|
|
17
|
+
| **screen-reader-description** | Accessible description for screen readers describing the dropdown functionality If not provided, the default translation of MazUiTranslations plugin will be used | `string` | No | `MazUiTranslationsSchema['dropdown']['screenReaderDescription']` | - |
|
|
18
|
+
| **menu-panel-class** | Additional CSS classes to apply to the dropdown menu panel Useful for customizing the dropdown appearance (background, border, etc.) | `HTMLAttributes['class']` | No | `undefined` | - |
|
|
19
|
+
| **menu-panel-style** | Inline styles to apply to the dropdown menu panel Useful for custom styling. You may use `!important` to override default styles | `HTMLAttributes['style']` | No | `undefined` | - |
|
|
20
|
+
| **block** | Makes the dropdown button expand to full width of its container | `boolean` | No | `false` | - |
|
|
21
|
+
| **dropdown-icon** | Icon to use instead of the default chevron for the dropdown indicator Can be either an icon name string or a Vue component<br/>**Example:** `'arrow-down'` | `string \| IconComponent` | No | `undefined` | - |
|
|
22
|
+
| **dropdown-icon-animation** | Controls whether the dropdown icon rotates when the dropdown is opened | `boolean` | No | `true` | - |
|
|
23
|
+
| **size** | Size of the dropdown button | `MazSize` | No | `md` | `mini, xs, sm, md, lg, xl` |
|
|
24
24
|
|
|
25
25
|
## Events
|
|
26
26
|
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
## Props
|
|
2
2
|
|
|
3
|
-
| Name | Description | Type
|
|
4
|
-
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
5
|
-
| **style** | Style attribut of the component root element | `HTMLAttributes['style']`
|
|
6
|
-
| **class** | Class attribut of the component root element | `HTMLAttributes['class']`
|
|
7
|
-
| **model-value** | `v-model` <br/>The current value of the input field in international format (e.g. +33612345678)<br/>**Example:** `"+33612345678"` | `string \| undefined \| null`
|
|
8
|
-
| **country-code** | `v-model:country-code` <br/>The selected country code (e.g. "FR")<br/>**Example:** `"FR"` | `CountryCode \| undefined \| null`
|
|
9
|
-
| **id** | Unique identifier for the component<br/>**Example:** `"phone-input-1"` | `string`
|
|
10
|
-
| **placeholder** | Text displayed when the input is empty<br/>**Example:** `"Enter your phone number"` | `string`
|
|
11
|
-
| **label** | Label displayed above the input<br/>**Example:** `"Phone Number"` | `string`
|
|
12
|
-
| **preferred-countries** | List of country codes to place first in the select list<br/>**Example:** `["FR", "BE", "GE"]` | `CountryCode[]`
|
|
13
|
-
| **ignored-countries** | List of country codes to be removed from the select list<br/>**Example:** `["FR", "BE", "GE"]` | `CountryCode[]`
|
|
14
|
-
| **only-countries** | List of country codes to only have the countries selected in the select list<br/>**Example:** `["FR", "BE", "GE"]` | `CountryCode[]`
|
|
15
|
-
| **translations** | Locale strings of the component The default values are the translations of the
|
|
16
|
-
| **list-position** | Position where the list of countries will be opened | `MazPopoverProps['position']`
|
|
17
|
-
| **color** | Component color applied | `MazColor`
|
|
18
|
-
| **size** | Component size applied | `MazSize`
|
|
19
|
-
| **hide-flags** | Remove flags in country list | `boolean`
|
|
20
|
-
| **disabled** | Disable input | `boolean`
|
|
21
|
-
| **example** | Show the phone number example | `boolean`
|
|
22
|
-
| **search** | Disable search input in country list | `boolean`
|
|
23
|
-
| **search-threshold** | Threshold of the search input in country list where 1 is a perfect match and 0 is a match with any character | `number`
|
|
24
|
-
| **use-browser-locale** | If true, the browser locale will be used | `boolean`
|
|
25
|
-
| **fetch-country** | The component will make a request (https://ipwho.is) to get the location of the user and use it to set the default country code | `boolean`
|
|
26
|
-
| **hide-country-select** | Hide the country selector | `boolean`
|
|
27
|
-
| **show-code-in-list** | Show country calling code in the country list | `boolean`
|
|
28
|
-
| **custom-countries-list** | Replace country names | `Record<CountryCode, string>`
|
|
29
|
-
| **auto-format** | Disabled auto-format when phone is valid | `"blur" \| "typing" \| "disabled" \| false`
|
|
30
|
-
| **country-locale** | Locale of country list<br/>**Example:** `"fr-FR"` | `string`
|
|
31
|
-
| **validation-error** | Disable validation error UI | `boolean`
|
|
32
|
-
| **validation-success** | Disable validation success UI | `boolean`
|
|
33
|
-
| **success** | Add success UI | `boolean`
|
|
34
|
-
| **error** | Add error UI | `boolean`
|
|
35
|
-
| **display-country-name** | Will replace the calling code by the country name in the country selector | `boolean`
|
|
36
|
-
| **block** | The input will be displayed in full width | `boolean`
|
|
37
|
-
| **orientation** | Orientation of the inputs in the component | `'row' \| 'col' \| 'responsive'`
|
|
38
|
-
| **country-select-attributes** | Meta attributes of the country input | `Record<string, unknown>`
|
|
39
|
-
| **phone-input-attributes** | Meta attributes of the phone number input | `Record<string, unknown>`
|
|
3
|
+
| Name | Description | Type | Required | Default | Possible values |
|
|
4
|
+
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
|
5
|
+
| **style** | Style attribut of the component root element | `HTMLAttributes['style']` | No | `undefined` | - |
|
|
6
|
+
| **class** | Class attribut of the component root element | `HTMLAttributes['class']` | No | `undefined` | - |
|
|
7
|
+
| **model-value** | `v-model` <br/>The current value of the input field in international format (e.g. +33612345678)<br/>**Example:** `"+33612345678"` | `string \| undefined \| null` | No | `undefined` | - |
|
|
8
|
+
| **country-code** | `v-model:country-code` <br/>The selected country code (e.g. "FR")<br/>**Example:** `"FR"` | `CountryCode \| undefined \| null` | No | `undefined` | - |
|
|
9
|
+
| **id** | Unique identifier for the component<br/>**Example:** `"phone-input-1"` | `string` | No | `undefined` | - |
|
|
10
|
+
| **placeholder** | Text displayed when the input is empty<br/>**Example:** `"Enter your phone number"` | `string` | No | `undefined` | - |
|
|
11
|
+
| **label** | Label displayed above the input<br/>**Example:** `"Phone Number"` | `string` | No | `undefined` | - |
|
|
12
|
+
| **preferred-countries** | List of country codes to place first in the select list<br/>**Example:** `["FR", "BE", "GE"]` | `CountryCode[]` | No | `undefined` | - |
|
|
13
|
+
| **ignored-countries** | List of country codes to be removed from the select list<br/>**Example:** `["FR", "BE", "GE"]` | `CountryCode[]` | No | `undefined` | - |
|
|
14
|
+
| **only-countries** | List of country codes to only have the countries selected in the select list<br/>**Example:** `["FR", "BE", "GE"]` | `CountryCode[]` | No | `undefined` | - |
|
|
15
|
+
| **translations** | Locale strings of the component The default values are the translations of the MazUiTranslations plugin | `Partial<MazUiTranslationsNestedSchema['inputPhoneNumber']>` | No | `{ countrySelect: { error: 'Choose country', placeholder: 'Country code', searchPlaceholder: 'Search the country', }, phoneInput: { placeholder: 'Phone number', example: 'Example: {example}', }, }` | - |
|
|
16
|
+
| **list-position** | Position where the list of countries will be opened | `MazPopoverProps['position']` | No | `'bottom-start'` | `top left, top right, bottom left, bottom right` |
|
|
17
|
+
| **color** | Component color applied | `MazColor` | No | `'primary'` | `primary, secondary, accent, info, success, warning, destructive, contrast` |
|
|
18
|
+
| **size** | Component size applied | `MazSize` | No | `'md'` | `xs, sm, md, lg, xl, mini` |
|
|
19
|
+
| **hide-flags** | Remove flags in country list | `boolean` | No | `false` | - |
|
|
20
|
+
| **disabled** | Disable input | `boolean` | No | `false` | - |
|
|
21
|
+
| **example** | Show the phone number example | `boolean` | No | `true` | - |
|
|
22
|
+
| **search** | Disable search input in country list | `boolean` | No | `true` | - |
|
|
23
|
+
| **search-threshold** | Threshold of the search input in country list where 1 is a perfect match and 0 is a match with any character | `number` | No | `0.75` | - |
|
|
24
|
+
| **use-browser-locale** | If true, the browser locale will be used | `boolean` | No | `true` | - |
|
|
25
|
+
| **fetch-country** | The component will make a request (https://ipwho.is) to get the location of the user and use it to set the default country code | `boolean` | No | `false` | - |
|
|
26
|
+
| **hide-country-select** | Hide the country selector | `boolean` | No | `false` | - |
|
|
27
|
+
| **show-code-in-list** | Show country calling code in the country list | `boolean` | No | `false` | - |
|
|
28
|
+
| **custom-countries-list** | Replace country names | `Record<CountryCode, string>` | No | `undefined` | - |
|
|
29
|
+
| **auto-format** | Disabled auto-format when phone is valid | `"blur" \| "typing" \| "disabled" \| false` | No | `'blur'` | - |
|
|
30
|
+
| **country-locale** | Locale of country list<br/>**Example:** `"fr-FR"` | `string` | No | `undefined` | - |
|
|
31
|
+
| **validation-error** | Disable validation error UI | `boolean` | No | `true` | - |
|
|
32
|
+
| **validation-success** | Disable validation success UI | `boolean` | No | `true` | - |
|
|
33
|
+
| **success** | Add success UI | `boolean` | No | `false` | - |
|
|
34
|
+
| **error** | Add error UI | `boolean` | No | `false` | - |
|
|
35
|
+
| **display-country-name** | Will replace the calling code by the country name in the country selector | `boolean` | No | `false` | - |
|
|
36
|
+
| **block** | The input will be displayed in full width | `boolean` | No | `false` | - |
|
|
37
|
+
| **orientation** | Orientation of the inputs in the component | `'row' \| 'col' \| 'responsive'` | No | `'responsive'` | `row, col, responsive` |
|
|
38
|
+
| **country-select-attributes** | Meta attributes of the country input | `Record<string, unknown>` | No | `() => ({ name: 'country', autocomplete: 'off', style: { width: '14rem', }, })` | - |
|
|
39
|
+
| **phone-input-attributes** | Meta attributes of the phone number input | `Record<string, unknown>` | No | `() => ({ name: 'phone', autocomplete: 'tel', inputmode: 'tel', })` | - |
|
|
40
40
|
|
|
41
41
|
## Events
|
|
42
42
|
|
|
@@ -33,12 +33,13 @@
|
|
|
33
33
|
|
|
34
34
|
## Events
|
|
35
35
|
|
|
36
|
-
| Event name
|
|
37
|
-
|
|
|
38
|
-
| update:model-value
|
|
39
|
-
| open
|
|
40
|
-
| close
|
|
41
|
-
|
|
|
36
|
+
| Event name | Properties | Description |
|
|
37
|
+
| --------------------- | ---------------------------------------- | ---------------------------------- |
|
|
38
|
+
| update:model-value | **value** `boolean` - The new open state | Emitted when popover state changes |
|
|
39
|
+
| open | | Emitted when popover opens |
|
|
40
|
+
| close | | Emitted when popover closes |
|
|
41
|
+
| after-close-animation | | Emitted after the close animation |
|
|
42
|
+
| toggle | **value** `boolean` - The new open state | Emitted when popover toggles |
|
|
42
43
|
|
|
43
44
|
## Slots
|
|
44
45
|
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
## Props
|
|
2
2
|
|
|
3
|
-
| Name | Description | Type
|
|
4
|
-
| ------------------------- | -------------------------------------------- |
|
|
5
|
-
| **style** | Style attribut of the component root element | `HTMLAttributes['style']`
|
|
6
|
-
| **class** | Class attribut of the component root element | `HTMLAttributes['class']`
|
|
7
|
-
| **id** | Id of the component | `string`
|
|
8
|
-
| **color** | Color of the component | `MazColor`
|
|
9
|
-
| **size** | Size of the component | `MazSize`
|
|
10
|
-
| **preferred-codes** | Preferred countries to display | `Option['code'][]`
|
|
11
|
-
| **ignored-codes** | Ignored countries to display | `Option['code'][]`
|
|
12
|
-
| **only-codes** | Only countries to display | `Option['code'][]`
|
|
13
|
-
| **list-position** | Position of the list | `MazPopoverProps['position']`
|
|
14
|
-
| **hide-flags** | Hide flags | `boolean`
|
|
15
|
-
| **search** | Display search input in options list | `boolean`
|
|
16
|
-
| **show-code-in-list** | Show code on list | `boolean`
|
|
17
|
-
| **locale** | Locale | `string`
|
|
18
|
-
| **success** | Success state | `boolean`
|
|
19
|
-
| **error** | Error state | `boolean`
|
|
20
|
-
| **warning** | Warning state | `boolean`
|
|
21
|
-
| **display-code** | | `boolean`
|
|
22
|
-
| **search-threshold** | Search threshold | `number`
|
|
23
|
-
| **translations** | Translations | `Partial<
|
|
24
|
-
| **hint** | Hint message displayed | `string`
|
|
25
|
-
| **options** | Options | `Option[]`
|
|
26
|
-
| **display-names-options** | Display name type | `Intl.DisplayNamesOptions`
|
|
27
|
-
| **codes-type** | Codes type | `CodesType`
|
|
28
|
-
| **open** | Open the select | `boolean`
|
|
3
|
+
| Name | Description | Type | Required | Default | Possible values |
|
|
4
|
+
| ------------------------- | -------------------------------------------- | --------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------- | ------------------------------------ |
|
|
5
|
+
| **style** | Style attribut of the component root element | `HTMLAttributes['style']` | No | `undefined` | - |
|
|
6
|
+
| **class** | Class attribut of the component root element | `HTMLAttributes['class']` | No | `undefined` | - |
|
|
7
|
+
| **id** | Id of the component | `string` | No | `undefined` | - |
|
|
8
|
+
| **color** | Color of the component | `MazColor` | No | `primary` | - |
|
|
9
|
+
| **size** | Size of the component | `MazSize` | No | `md` | - |
|
|
10
|
+
| **preferred-codes** | Preferred countries to display | `Option['code'][]` | No | `undefined` | - |
|
|
11
|
+
| **ignored-codes** | Ignored countries to display | `Option['code'][]` | No | `undefined` | - |
|
|
12
|
+
| **only-codes** | Only countries to display | `Option['code'][]` | No | `undefined` | - |
|
|
13
|
+
| **list-position** | Position of the list | `MazPopoverProps['position']` | No | `auto` | - |
|
|
14
|
+
| **hide-flags** | Hide flags | `boolean` | No | `undefined` | - |
|
|
15
|
+
| **search** | Display search input in options list | `boolean` | No | `true` | - |
|
|
16
|
+
| **show-code-in-list** | Show code on list | `boolean` | No | `false` | - |
|
|
17
|
+
| **locale** | Locale | `string` | No | `locale defined within the maz-ui plugin or browser locale or en-US` | - |
|
|
18
|
+
| **success** | Success state | `boolean` | No | `undefined` | - |
|
|
19
|
+
| **error** | Error state | `boolean` | No | `undefined` | - |
|
|
20
|
+
| **warning** | Warning state | `boolean` | No | `undefined` | - |
|
|
21
|
+
| **display-code** | | `boolean` | No | `undefined` | - |
|
|
22
|
+
| **search-threshold** | Search threshold | `number` | No | `undefined` | - |
|
|
23
|
+
| **translations** | Translations | `Partial<MazUiTranslationsNestedSchema['selectCountry']>` | No | `MazUiTranslationsNestedSchema['selectCountry']` | - |
|
|
24
|
+
| **hint** | Hint message displayed | `string` | No | `undefined` | - |
|
|
25
|
+
| **options** | Options | `Option[]` | No | `undefined` | - |
|
|
26
|
+
| **display-names-options** | Display name type | `Intl.DisplayNamesOptions` | No | `{ type: 'region', languageDisplay: 'standard', fallback: 'code', style: 'long' }` | - |
|
|
27
|
+
| **codes-type** | Codes type | `CodesType` | No | `defined by displayNamesOptions.type (if 'region', 'country' is used, otherwise 'iso')` | `iso' \| 'bcp' \| 'country' \| 'all` |
|
|
28
|
+
| **open** | Open the select | `boolean` | No | `false` | - |
|
|
29
29
|
|
|
30
30
|
## Events
|
|
31
31
|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
| **disabled** | Disable the component | `boolean` | No | `undefined` |
|
|
29
29
|
| **block** | The input will be displayed in full width | `boolean` | No | `undefined` |
|
|
30
30
|
| **autocomplete** | The autocomplete attribute of the input | `string` | No | `'off'` |
|
|
31
|
-
| **translations** | The translations of the component | `Partial<
|
|
31
|
+
| **translations** | The translations of the component | `Partial<MazUiTranslationsNestedSchema['select']>` | No | `{ searchPlaceholder: 'Search in options', }` |
|
|
32
32
|
| **format-input-value** | The function to format the input value | `(value: Multiple extends true ? Value[] : Value) => string` | No | `undefined` |
|
|
33
33
|
| **transition** | The transition name of the panel list options | `MazPopoverProps['transition']` | No | `'scale-fade'` |
|
|
34
34
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
| Name | Description | Type | Required |
|
|
4
4
|
| ------------- | --------------------------------- | --------- | -------- |
|
|
5
5
|
| **hoverable** | Override hoverable of table props | `boolean` | No |
|
|
6
|
+
| **is-head** | If true, the row is a head row | `boolean` | No |
|
|
6
7
|
|
|
7
8
|
## Slots
|
|
8
9
|
|