diff --git a/packages/common/core/src/utils/typedoc/typedoc-json-to-md.ts b/packages/common/core/src/utils/typedoc/typedoc-json-to-md.ts index 2e7a8cc97d..3c92beec42 100644 --- a/packages/common/core/src/utils/typedoc/typedoc-json-to-md.ts +++ b/packages/common/core/src/utils/typedoc/typedoc-json-to-md.ts @@ -5,6 +5,7 @@ import type { IntrinsicType, ReflectionType, ReferenceType, + Type, } from 'typedoc'; const tableSeparator = '|'; @@ -41,8 +42,9 @@ export function convertJsonToMarkdown(jsonItems: DeclarationReflection[]): strin function getInterfaces(filteredJSON: DeclarationReflection[]): string[] { const res: string[] = []; - filteredJSON.filter(({ kindString: filteredString, children: filteredChildren }) => filteredString === 'Interface' - && typeof filteredChildren !== 'undefined').forEach(({ name, children }) => { + filteredJSON + .filter(({ kindString, children, indexSignature }) => kindString === 'Interface' && (!children || !indexSignature)) + .forEach(({ name, children, indexSignature }) => { res.push(`\n### ${name}`); // Find default values @@ -54,8 +56,18 @@ function getInterfaces(filteredJSON: DeclarationReflection[]): string[] { defaultValues[name] = defaultValue?.toString() || ''; }); + if (indexSignature) { + res.push(tableSeparator + ['Key', 'Type', 'Description'].join(` ${tableSeparator} `) + tableSeparator); + res.push(tableSeparator + ['---', ':---:', '---'].join(`${tableSeparator}`) + tableSeparator); + res.push(tableSeparator + [ + printType(indexSignature.parameters?.[0]?.type), + printType(indexSignature.type), + indexSignature.comment?.shortText, + ].join(` ${tableSeparator} `) + tableSeparator); + return; + } res.push( - tableSeparator + ['name', 'Type', 'Required', 'Default', 'Description'].join(` ${tableSeparator} `) + tableSeparator + tableSeparator + ['Name', 'Type', 'Required', 'Default', 'Description'].join(` ${tableSeparator} `) + tableSeparator ); res.push( tableSeparator + ['---', '---', ':---:', '---', '---'].join(`${tableSeparator}`) + tableSeparator @@ -70,6 +82,7 @@ function getInterfaces(filteredJSON: DeclarationReflection[]): string[] { commentString.replace(/\n/g, '') ].join(` ${tableSeparator} `) + tableSeparator); }); + return; }); return res; @@ -112,7 +125,7 @@ function getClass(filteredJSON: DeclarationReflection[]): string[] { const parameterSection: string[] = []; if (parameters && parameters.length) { parameterSection.push(`Name | Type | Description \n---|---|---`); - parameters?.map(({name: paramName, type: paramType, comment: paramComment }) => { + parameters?.map(({ name: paramName, type: paramType, comment: paramComment }) => { params.push(`\`${paramName}\`: ${printType(paramType)}`); parameterSection.push(`**${paramName}** | ${printType(paramType)} | ${paramComment?.shortText || ' '} |`); }); @@ -129,15 +142,15 @@ function getClass(filteredJSON: DeclarationReflection[]): string[] { return res; } -function printType(typeObject?: SomeType | unknown) { - const getTypeValue = (tObj: SomeType | LiteralType | IntrinsicType) => { +function printType(typeObject?: SomeType | unknown): string { + const getTypeValue = (tObj: SomeType | LiteralType | IntrinsicType | Type) => { if ('name' in tObj) { return tObj.name.toString(); - } + } if ('value' in tObj) { return tObj.value?.toString(); - } - return tObj.type + } + return tObj.type; }; const someType = typeObject as SomeType; if (someType && someType.type) { @@ -151,8 +164,11 @@ function printType(typeObject?: SomeType | unknown) { } return `\`${someType.name}\``; } + case 'array': + return `${printType(someType.elementType).replace(/^(_|`)|(_|`)$/g, '')}[]` case 'union': - return someType.types.map((tObj) => `\`${getTypeValue(tObj)}\``).join(' \\| '); + return someType.types.map((tObj) => `\`${printType(tObj).replace(/^(_|`)|(_|`)$/g, '')}\``).join(' \\| ') + ; } } return '_unknown_'; diff --git a/packages/components/accordion/documentation/specifications/accordion-group/spec.md b/packages/components/accordion/documentation/specifications/accordion-group/spec.md index 78d1d8012a..65a4af0c33 100644 --- a/packages/components/accordion/documentation/specifications/accordion-group/spec.md +++ b/packages/components/accordion/documentation/specifications/accordion-group/spec.md @@ -4,7 +4,7 @@ ## Interfaces ### OdsAccordionGroupMethod -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`registerAccordion`** | _void_ | ✴️ | | | |**`unRegisterAccordion`** | _void_ | ✴️ | | | @@ -17,9 +17,9 @@ Name | Type | Description ---|---|--- -**accordion** | `OsdsAccordion` | +**accordion** | `OsdsAccordion` | | > **unRegisterAccordion**(`accordion`: `OsdsAccordion`) => `Promise` Name | Type | Description ---|---|--- -**accordion** | `OsdsAccordion` | \ No newline at end of file +**accordion** | `OsdsAccordion` | | \ No newline at end of file diff --git a/packages/components/accordion/documentation/specifications/accordion/spec.md b/packages/components/accordion/documentation/specifications/accordion/spec.md index 04cfc77ecd..5171f41f00 100644 --- a/packages/components/accordion/documentation/specifications/accordion/spec.md +++ b/packages/components/accordion/documentation/specifications/accordion/spec.md @@ -5,7 +5,7 @@ ## Interfaces ### OdsAccordionAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`color`** | `ODS_THEME_COLOR_INTENT` | | | main color: see component principles| |**`contrasted`** | _boolean_ | | | contrasted or not: see component principles| @@ -14,7 +14,7 @@ |**`size`** | `md` | | | size: see component principles| ### OdsAccordionEvent -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`odsAccordionToggle`** | `EventEmitter` | ✴️ | | Event triggered on accordion toggle| diff --git a/packages/components/breadcrumb/documentation/specifications/spec.md b/packages/components/breadcrumb/documentation/specifications/spec.md index 8d873463f2..6c91dcc6a8 100644 --- a/packages/components/breadcrumb/documentation/specifications/spec.md +++ b/packages/components/breadcrumb/documentation/specifications/spec.md @@ -4,13 +4,13 @@ ## Interfaces ### OdsBreadcrumbAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`contrasted`** | _boolean_ | | | contrasted or not: see component principles| -|**`items`** | `string` \| `array` | ✴️ | | List of breadcrumb items to display| +|**`items`** | `string` \| `OdsBreadcrumbAttributeItem[]` | ✴️ | | List of breadcrumb items to display| ### OdsBreadcrumbAttributeItem -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`href`** | _string_ | ✴️ | | Item link to redirect to| |**`icon`** | `ODS_ICON_NAME` | | | Icon to display| diff --git a/packages/components/button/documentation/specifications/spec.md b/packages/components/button/documentation/specifications/spec.md index 4dbe4fd9bb..4947a3793e 100644 --- a/packages/components/button/documentation/specifications/spec.md +++ b/packages/components/button/documentation/specifications/spec.md @@ -5,7 +5,7 @@ ## Interfaces ### OdsButtonAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`circle`** | _boolean_ | | | use a circle shape| |**`color`** | `ODS_THEME_COLOR_INTENT` | | | main color: see component principles| diff --git a/packages/components/cart/documentation/specifications/spec.md b/packages/components/cart/documentation/specifications/spec.md index 58dd1750cb..364a80c571 100644 --- a/packages/components/cart/documentation/specifications/spec.md +++ b/packages/components/cart/documentation/specifications/spec.md @@ -5,7 +5,7 @@ ## Interfaces ### OdsCartAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`collapsed`** | _boolean_ | | | is the cart is collapsed (if collapsible)| |**`collapsible`** | _boolean_ | | | is the cart can be collapsed in a smaller view| @@ -14,45 +14,45 @@ |**`size`** | `sm` | | | size: see component principles| ### OdsCartHeaderAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`headerTitle`** | _string_ | | | | ### OdsCartHeaderMethod -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`refresh`** | _void_ | ✴️ | | Render manually the cart header in order to refresh the component.| ### OdsCartManagerAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`footer`** | `OdsCartManagerFooter` | | | describe what the footer is made of| |**`i18n`** | `OdsI18nHook` | | | internationalisation system connector| |**`inline`** | _boolean_ | | | full width or not: see component principles| |**`period`** | `ODS_PERIOD_ISO_CODE` | | | ISO period code that describe the duration of a periodical payment| -|**`sections`** | _unknown_ | ✴️ | | Sections made of one item and multiple options| +|**`sections`** | OdsCartManagerSection[] | ✴️ | | Sections made of one item and multiple options| |**`size`** | `sm` | | | size: see component principles| |**`vatMode`** | _boolean_ | | | is the cart display the Value Added Tax| ### OdsCartManagerFooter -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| -|**`items`** | _unknown_ | ✴️ | | | +|**`items`** | OdsCartManagerFooterItem` \| `OdsCartManagerTotal[] | ✴️ | | | ### OdsCartManagerMethod -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`getProductQuantity`** | `Promise` | ✴️ | | get the number of item flagged as product| |**`getTotalAmount`** | `Promise` | ✴️ | | get the total amount of the cart| ### OdsCartManagerSection -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`item`** | `OdsCartManagerItem` | ✴️ | | | -|**`options`** | _unknown_ | ✴️ | | | +|**`options`** | OdsCartManagerItem[] | ✴️ | | | ### OdsCartMethod -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`getItemQuantity`** | `Promise` | ✴️ | | get the number of cart items detected in the DOM| |**`refresh`** | `Promise` | ✴️ | | Render manually the cart in order to refresh the component.| diff --git a/packages/components/checkbox-button/documentation/specifications/spec.md b/packages/components/checkbox-button/documentation/specifications/spec.md index 21de970f05..07f4ca11fc 100644 --- a/packages/components/checkbox-button/documentation/specifications/spec.md +++ b/packages/components/checkbox-button/documentation/specifications/spec.md @@ -5,7 +5,7 @@ ## Interfaces ### OdsCheckboxButtonAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`checked`** | _boolean_ | | | The checked status of the checkbox button| |**`checking`** | _boolean_ | | | | diff --git a/packages/components/checkbox/documentation/specifications/spec.md b/packages/components/checkbox/documentation/specifications/spec.md index 65e67f7621..d9a0d672d0 100644 --- a/packages/components/checkbox/documentation/specifications/spec.md +++ b/packages/components/checkbox/documentation/specifications/spec.md @@ -4,7 +4,7 @@ ## Interfaces ### OdsCheckboxAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`afterSave`** | `OdsCheckboxAttributeCbk` | | | afterSave input allows to set a function that returns a promise.It is called after each time an update was performed and allowing to manage pessimistic update strategy| |**`ariaLabel`** | `undefined` \| `string` | ✴️ | | The corresponding aria-label describing its content| @@ -20,13 +20,13 @@ |**`value`** | _string_ | ✴️ | | Its corresponding value| ### OdsCheckboxCheckedChangeEventDetail -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`checked`** | _boolean_ | ✴️ | | | |**`value`** | _string_ | ✴️ | | | ### OdsCheckboxEvent -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`odsBlur`** | `EventEmitter` | ✴️ | | Event triggered on checkbox blur| |**`odsCheckedChange`** | `EventEmitter` | ✴️ | | the checked state changed| @@ -34,19 +34,19 @@ |**`odsUpdatingChange`** | `EventEmitter` | ✴️ | | the checked state is being changed| ### OdsCheckboxFocusChangeEventDetail -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`focus`** | _boolean_ | ✴️ | | | |**`value`** | _string_ | ✴️ | | | ### OdsCheckboxMethod -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`setFocus`** | `Promise` | ✴️ | | programmatically set the focus on the checkbox.this method has to call OdsCheckboxController.setFocus| |**`setTabindex`** | `Promise` | ✴️ | | set the tab index.this method has to call OdsCheckboxController.setTabindex| ### OdsCheckboxUpdatingChangeEventDetail -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`updating`** | _boolean_ | ✴️ | | | |**`value`** | _string_ | ✴️ | | | @@ -62,4 +62,4 @@ Name | Type | Description ---|---|--- -**index** | _number_ | \ No newline at end of file +**index** | _number_ | | \ No newline at end of file diff --git a/packages/components/chip/documentation/specifications/spec.md b/packages/components/chip/documentation/specifications/spec.md index 3dab76e35d..0994f4a491 100644 --- a/packages/components/chip/documentation/specifications/spec.md +++ b/packages/components/chip/documentation/specifications/spec.md @@ -5,7 +5,7 @@ ## Interfaces ### OdsChipAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`color`** | `ODS_THEME_COLOR_INTENT` | | | Chip color theme| |**`contrasted`** | _boolean_ | | | Chip is in contrasterd mode or not| diff --git a/packages/components/clipboard/documentation/specifications/spec.md b/packages/components/clipboard/documentation/specifications/spec.md index 48bcd05305..c8f03edf59 100644 --- a/packages/components/clipboard/documentation/specifications/spec.md +++ b/packages/components/clipboard/documentation/specifications/spec.md @@ -4,14 +4,14 @@ ## Interfaces ### OdsClipboardAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`disabled`** | _boolean_ | | | Disabled the input, the focus, and the tooltip| |**`inline`** | _boolean_ | | | Indicates if the input is full width or not: see component principles| |**`value`** | _string_ | ✴️ | | Input text value| ### OdsClipboardEvent -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`odsClipboardCopied`** | `EventEmitter` | ✴️ | | | diff --git a/packages/components/code/documentation/specifications/spec.md b/packages/components/code/documentation/specifications/spec.md index cb2e1644c8..6b2467a24b 100644 --- a/packages/components/code/documentation/specifications/spec.md +++ b/packages/components/code/documentation/specifications/spec.md @@ -5,14 +5,14 @@ ## Interfaces ### OdsCodeAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`color`** | `ODS_THEME_COLOR_INTENT` | | | main color: see component principles| |**`contrasted`** | _boolean_ | | | contrasted or not: see component principles| |**`size`** | `md` | | | size: see component principles| ### OdsCodeEvent -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`odsCodeCopy`** | `EventEmitter` | ✴️ | | Event triggered on code content copy| diff --git a/packages/components/collapsible/documentation/specifications/spec.md b/packages/components/collapsible/documentation/specifications/spec.md index 9df79e88bd..4900d38883 100644 --- a/packages/components/collapsible/documentation/specifications/spec.md +++ b/packages/components/collapsible/documentation/specifications/spec.md @@ -4,12 +4,12 @@ ## Interfaces ### OdsCollapsibleAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`opened`** | _boolean_ | | | opened or not| ### OdsCollapsibleEvent -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`odsCollapsibleToggle`** | `EventEmitter` | ✴️ | | Event triggered on collapsible toggle| diff --git a/packages/components/divider/documentation/specifications/spec.md b/packages/components/divider/documentation/specifications/spec.md index 0d8f00802b..9bbc4ea842 100644 --- a/packages/components/divider/documentation/specifications/spec.md +++ b/packages/components/divider/documentation/specifications/spec.md @@ -5,7 +5,7 @@ ## Interfaces ### OdsDividerAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`color`** | `ODS_THEME_COLOR_INTENT` | | | Divider color theme| |**`contrasted`** | _boolean_ | | | Divider design as contrasted version| diff --git a/packages/components/flag/documentation/specifications/spec.md b/packages/components/flag/documentation/specifications/spec.md index c3e3ca83c0..0f591ee5f0 100644 --- a/packages/components/flag/documentation/specifications/spec.md +++ b/packages/components/flag/documentation/specifications/spec.md @@ -4,7 +4,7 @@ ## Interfaces ### OdsFlagAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`assetPath`** | _string_ | | | override the `ODS` directory path of the assets.if not set, the configured path in `ODS` will be used.| |**`iso`** | `ODS_FLAG_ISO_CODE_UNION` | | | Flag ISO country code| diff --git a/packages/components/form-field/documentation/specifications/spec.md b/packages/components/form-field/documentation/specifications/spec.md index c58ee6a345..bed98a5ea5 100644 --- a/packages/components/form-field/documentation/specifications/spec.md +++ b/packages/components/form-field/documentation/specifications/spec.md @@ -4,7 +4,7 @@ ## Interfaces ### OdsFormFieldAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`error`** | _string_ | | | Indicates if the Form Field shows error or not| |**`inline`** | _boolean_ | | | Indicates if the Form Field is full width or not: see component principles| diff --git a/packages/components/icon/documentation/specifications/spec.md b/packages/components/icon/documentation/specifications/spec.md index 99e973760d..ea5718e542 100644 --- a/packages/components/icon/documentation/specifications/spec.md +++ b/packages/components/icon/documentation/specifications/spec.md @@ -5,7 +5,7 @@ ## Interfaces ### OdsIconAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`ariaName`** | _string_ | ✴️ | | Icon ARIA name| |**`color`** | `ODS_THEME_COLOR_INTENT` | | | Icon color theme| diff --git a/packages/components/input/documentation/specifications/spec.md b/packages/components/input/documentation/specifications/spec.md index 873c5d3089..9c0236d873 100644 --- a/packages/components/input/documentation/specifications/spec.md +++ b/packages/components/input/documentation/specifications/spec.md @@ -5,7 +5,7 @@ ## Interfaces ### OdsInputAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`ariaLabel`** | `undefined` \| `string` | ✴️ | | | |**`ariaLabelledby`** | _string_ | | | ID of the element that labels the input| @@ -36,14 +36,14 @@ |**`value`** | `OdsInputValue` | ✴️ | | Current value of the input| ### OdsInputEvent -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`odsInputBlur`** | `EventEmitter` | ✴️ | | | |**`odsInputFocus`** | `EventEmitter` | ✴️ | | | |**`odsValueChange`** | `EventEmitter` | ✴️ | | the input value changed| ### OdsInputMethod -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`clear`** | `Promise` | ✴️ | | empty the value| |**`getValidity`** | `Promise` | ✴️ | | get the validity state| @@ -55,7 +55,7 @@ |**`stepUp`** | `Promise` | ✴️ | | | ### OdsInputValidityState -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`badInput`** | _boolean_ | | | | |**`customError`** | _boolean_ | ✴️ | | | @@ -72,7 +72,7 @@ |**`valueMissing`** | _boolean_ | ✴️ | | | ### OdsInputValueChangeEventDetail -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`oldValue`** | `undefined` \| `string` | | | | |**`validity`** | `OdsValidityState` | ✴️ | | | @@ -121,7 +121,7 @@ Name | Type | Description ---|---|--- -**value** | _number_ | +**value** | _number_ | | > **stepDown**() => `Promise` diff --git a/packages/components/link/documentation/specifications/spec.md b/packages/components/link/documentation/specifications/spec.md index f239239fd0..b412fe1978 100644 --- a/packages/components/link/documentation/specifications/spec.md +++ b/packages/components/link/documentation/specifications/spec.md @@ -5,7 +5,7 @@ ## Interfaces ### OdsLinkAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`color`** | `ODS_THEME_COLOR_INTENT` | | | Link color theme| |**`contrasted`** | _boolean_ | | | Link design as contrasted version| diff --git a/packages/components/menu/documentation/specifications/spec.md b/packages/components/menu/documentation/specifications/spec.md index f89a739154..dcfcd8fd6e 100644 --- a/packages/components/menu/documentation/specifications/spec.md +++ b/packages/components/menu/documentation/specifications/spec.md @@ -4,7 +4,7 @@ ## Interfaces ### OdsMenuAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`disabled`** | _boolean_ | | | Menu is disabled or not| diff --git a/packages/components/message/documentation/specifications/spec.md b/packages/components/message/documentation/specifications/spec.md index be220e60ea..682a4b45be 100644 --- a/packages/components/message/documentation/specifications/spec.md +++ b/packages/components/message/documentation/specifications/spec.md @@ -5,7 +5,7 @@ ## Interfaces ### OdsMessageAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`color`** | `ODS_THEME_COLOR_INTENT` | | | Message color theme| |**`contrasted`** | _boolean_ | | | Message is in contrasted mode or not| @@ -15,7 +15,7 @@ |**`type`** | `ODS_MESSAGE_TYPE` | | | The message type| ### OdsMessageEvent -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`odsRemoveClick`** | `EventEmitter` | ✴️ | | Event triggered on removable icon click| diff --git a/packages/components/modal/documentation/specifications/spec.md b/packages/components/modal/documentation/specifications/spec.md index d75cb7f5c0..624f15e4e1 100644 --- a/packages/components/modal/documentation/specifications/spec.md +++ b/packages/components/modal/documentation/specifications/spec.md @@ -4,7 +4,7 @@ ## Interfaces ### OdsModalAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`color`** | `ODS_THEME_COLOR_INTENT` | ✴️ | | Color of the modal's header background| |**`dismissible`** | _boolean_ | | | Defines if the modal is dismissible (displays a close button)| diff --git a/packages/components/pagination/documentation/specifications/spec.md b/packages/components/pagination/documentation/specifications/spec.md index 327e3de1c2..c9fd00b0ce 100644 --- a/packages/components/pagination/documentation/specifications/spec.md +++ b/packages/components/pagination/documentation/specifications/spec.md @@ -5,7 +5,7 @@ ## Interfaces ### OdsPaginationAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`current`** | _number_ | ✴️ | | Its corresponding current page.| |**`disabled`** | _boolean_ | ✴️ | | indicates if the pagination is entirely disabled.it means no interactions (hover, click, focus, etc)| @@ -15,18 +15,18 @@ |**`totalPages`** | _number_ | ✴️ | | The total amount of pages.| ### OdsPaginationChangedEventDetail -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`current`** | _number_ | ✴️ | | | |**`oldCurrent`** | _number_ | | | | ### OdsPaginationEvent -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`odsPaginationChanged`** | `EventEmitter` | ✴️ | | Emitted when the value has changed| ### OdsPaginationMethod -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`setPageIndex`** | `Promise` | ✴️ | | set page index on the component| diff --git a/packages/components/password/documentation/specifications/spec.md b/packages/components/password/documentation/specifications/spec.md index 439e4f5308..533945f654 100644 --- a/packages/components/password/documentation/specifications/spec.md +++ b/packages/components/password/documentation/specifications/spec.md @@ -4,7 +4,7 @@ ## Interfaces ### OdsPasswordAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`ariaLabel`** | `undefined` \| `string` | ✴️ | | ariaLabel of the password| |**`ariaLabelledby`** | _string_ | | | ID of the element that labels the password| diff --git a/packages/components/phone-number/documentation/specifications/spec.md b/packages/components/phone-number/documentation/specifications/spec.md index d6e0f5776f..a770ed2ccb 100644 --- a/packages/components/phone-number/documentation/specifications/spec.md +++ b/packages/components/phone-number/documentation/specifications/spec.md @@ -5,10 +5,10 @@ ## Interfaces ### OdsPhoneNumberAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`clearable`** | _boolean_ | | | Ability to clear the phone number value| -|**`countries`** | `string` \| `array` | | | A specific subset of countries to display in the select instead of the whole list| +|**`countries`** | `string` \| `ODS_COUNTRY_ISO_CODE[]` | | | A specific subset of countries to display in the select instead of the whole list| |**`disabled`** | _boolean_ | | | | |**`error`** | _boolean_ | | | Indicates if the phone number shows error or not| |**`isoCode`** | `ODS_COUNTRY_ISO_CODE` | | | Select value| diff --git a/packages/components/popover/documentation/specifications/spec.md b/packages/components/popover/documentation/specifications/spec.md index 6540f92138..9d880fe808 100644 --- a/packages/components/popover/documentation/specifications/spec.md +++ b/packages/components/popover/documentation/specifications/spec.md @@ -4,7 +4,7 @@ ## Interfaces ### OdsPopoverMethod -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`closeSurface`** | `Promise` | ✴️ | | Close the surface| diff --git a/packages/components/progress-bar/documentation/specifications/spec.md b/packages/components/progress-bar/documentation/specifications/spec.md index 85671070a9..77662192ae 100644 --- a/packages/components/progress-bar/documentation/specifications/spec.md +++ b/packages/components/progress-bar/documentation/specifications/spec.md @@ -4,7 +4,7 @@ ## Interfaces ### OdsProgressBarAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`max`** | _number_ | | | Sets the maximum value the progress can reach| |**`value`** | _number_ | | | The value of the progress bar| diff --git a/packages/components/quantity/documentation/specifications/spec.md b/packages/components/quantity/documentation/specifications/spec.md index 27a918d097..c5c6409055 100644 --- a/packages/components/quantity/documentation/specifications/spec.md +++ b/packages/components/quantity/documentation/specifications/spec.md @@ -4,7 +4,7 @@ ## Interfaces ### OdsQuantityAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`disabled`** | _boolean_ | | | Quantity is disabled or not| diff --git a/packages/components/radio-button/documentation/specifications/spec.md b/packages/components/radio-button/documentation/specifications/spec.md index 1f9078faf3..5df7746fa3 100644 --- a/packages/components/radio-button/documentation/specifications/spec.md +++ b/packages/components/radio-button/documentation/specifications/spec.md @@ -5,7 +5,7 @@ ## Interfaces ### OdsRadioButtonAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`checked`** | _boolean_ | | | The checked status of the radio button| |**`checking`** | _boolean_ | | | | diff --git a/packages/components/radio/documentation/specifications/radio-group/spec.md b/packages/components/radio/documentation/specifications/radio-group/spec.md index 79059bdac2..863455fa30 100644 --- a/packages/components/radio/documentation/specifications/radio-group/spec.md +++ b/packages/components/radio/documentation/specifications/radio-group/spec.md @@ -4,7 +4,7 @@ ## Interfaces ### OdsRadioGroupAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`defaultValue`** | _unknown_ | | | | |**`disabled`** | _boolean_ | ✴️ | | Radio-group should be disabled or not| @@ -16,18 +16,18 @@ |**`save`** | `Promise` | | | save input allow to set a function that returns a promise.It is called before each time an update is performed and allowing to manage pessimistic update strategy| ### OdsRadioGroupEvent -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`odsDisabledChange`** | `EventEmitter` | ✴️ | | | |**`odsValueChange`** | `EventEmitter` | ✴️ | | Emitted when the value has changed.| ### OdsRadioGroupMethod -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`getRadios`** | `Promise` | ✴️ | | | ### OdsRadioGroupValueChangeEventDetail -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`newValue`** | _string_ | ✴️ | | | |**`previousValue`** | _string_ | ✴️ | | | @@ -43,14 +43,14 @@ Name | Type | Description ---|---|--- -**radio** | `OsdsRadio` | +**radio** | `OsdsRadio` | | > **unregisterRadio**(`radio`: `OsdsRadio`) => `Promise` Name | Type | Description ---|---|--- -**radio** | `OsdsRadio` | +**radio** | `OsdsRadio` | | > **updateState**(`__namedParameters`: _unknown_) => `Promise` Name | Type | Description ---|---|--- -**__namedParameters** | _unknown_ | \ No newline at end of file +**__namedParameters** | _unknown_ | | \ No newline at end of file diff --git a/packages/components/radio/documentation/specifications/radio/spec.md b/packages/components/radio/documentation/specifications/radio/spec.md index 546c138a9d..bcee37eeed 100644 --- a/packages/components/radio/documentation/specifications/radio/spec.md +++ b/packages/components/radio/documentation/specifications/radio/spec.md @@ -4,7 +4,7 @@ ## Interfaces ### OdsRadioAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`ariaLabel`** | `undefined` \| `string` | ✴️ | | The corresponding aria-label describing its content| |**`ariaLabelledby`** | _string_ | | | The id to an external description| @@ -19,19 +19,19 @@ |**`save`** | `Promise` | | | save input allow to set a function that returns a promise.It is called before each time an update is performed and allowing to manage pessimistic update strategy| ### OdsRadioCheckedChangeEventDetail -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`checked`** | _boolean_ | ✴️ | | | |**`value`** | _string_ | ✴️ | | | ### OdsRadioCheckingChangeEventDetail -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`checking`** | _boolean_ | ✴️ | | | |**`value`** | _string_ | ✴️ | | | ### OdsRadioEvent -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`odsBlur`** | `EventEmitter` | ✴️ | | Event triggered on radio blur| |**`odsCheckedChange`** | `EventEmitter` | ✴️ | | the checked state changed| @@ -39,6 +39,10 @@ |**`odsFocus`** | `EventEmitter` | ✴️ | | Event triggered on radio focus| |**`odsValueChange`** | `EventEmitter` | ✴️ | | the radio value changed| +### OdsRadioMethod +|Name | Type | Required | Default | Description| +|---|---|:---:|---|---| + ## Classes ### OsdsRadio \ No newline at end of file diff --git a/packages/components/range/documentation/specifications/spec.md b/packages/components/range/documentation/specifications/spec.md index 33c794f454..5d559f02fc 100644 --- a/packages/components/range/documentation/specifications/spec.md +++ b/packages/components/range/documentation/specifications/spec.md @@ -4,7 +4,7 @@ ## Interfaces ### OdsRangeAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`color`** | `ODS_THEME_COLOR_INTENT` | | | Range color theme| |**`disabled`** | _boolean_ | | | Indicate if the range is entirely disabled.It means no interaction is possible (hover, click, focus, etc)| @@ -20,12 +20,12 @@ |**`value`** | `OdsRangeValue` | ✴️ | | The range value| ### OdsRangeEvent -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`odsValueChange`** | `EventEmitter` | ✴️ | | the range value changed| ### OdsRangeValueChangeEventDetail -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`oldValue`** | `OdsRangeValue` | | | | |**`validity`** | `OdsValidityState` | ✴️ | | | diff --git a/packages/components/search-bar/documentation/specifications/spec.md b/packages/components/search-bar/documentation/specifications/spec.md index 2a32c46aec..f3a21dcc47 100644 --- a/packages/components/search-bar/documentation/specifications/spec.md +++ b/packages/components/search-bar/documentation/specifications/spec.md @@ -4,20 +4,26 @@ ## Interfaces ### OdsSearchBarAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`contrasted`** | _boolean_ | | | Indicates if the search-bar is contrasted or not: see component principles| |**`disabled`** | _boolean_ | | | Indicates if the search-bar is disabled or not: see component principles| |**`loading`** | _boolean_ | | | Indicates if the search-bar is in loading state or not| -|**`options`** | _unknown_ | | | List of the options on the select| +|**`options`** | OdsSearchbarOption[] | | | List of the options on the select| |**`placeholder`** | _string_ | | | Placeholder text for the search-bar| |**`value`** | _string_ | ✴️ | | Current value of the search-bar| ### OdsSearchBarEvent -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`odsSearchSubmit`** | `EventEmitter` | ✴️ | | Send event with the input value when click on button search ou with keyboard navigation| +### OdsSearchbarOption +|Name | Type | Required | Default | Description| +|---|---|:---:|---|---| +|**`label`** | _string_ | ✴️ | | | +|**`value`** | _string_ | ✴️ | | | + ## Classes ### OsdsSearchBar \ No newline at end of file diff --git a/packages/components/search-bar/src/components/osds-search-bar/interfaces/attributes.ts b/packages/components/search-bar/src/components/osds-search-bar/interfaces/attributes.ts index bcf35d1958..b41ebad079 100644 --- a/packages/components/search-bar/src/components/osds-search-bar/interfaces/attributes.ts +++ b/packages/components/search-bar/src/components/osds-search-bar/interfaces/attributes.ts @@ -1,3 +1,9 @@ + +interface OdsSearchbarOption { + label: string; + value: string; +} + interface OdsSearchBarAttribute { /** Indicates if the search-bar is contrasted or not: see component principles */ contrasted?: boolean; @@ -6,7 +12,7 @@ interface OdsSearchBarAttribute { /** Indicates if the search-bar is in loading state or not */ loading?: boolean; /** List of the options on the select */ - options?: { label: string, value: string }[]; + options?: OdsSearchbarOption[]; /** Placeholder text for the search-bar */ placeholder?: string; /** Current value of the search-bar */ @@ -15,4 +21,5 @@ interface OdsSearchBarAttribute { export { OdsSearchBarAttribute, + OdsSearchbarOption, } \ No newline at end of file diff --git a/packages/components/search-bar/src/components/osds-search-bar/osds-search-bar.tsx b/packages/components/search-bar/src/components/osds-search-bar/osds-search-bar.tsx index 0be5b4826b..4a8cb31254 100644 --- a/packages/components/search-bar/src/components/osds-search-bar/osds-search-bar.tsx +++ b/packages/components/search-bar/src/components/osds-search-bar/osds-search-bar.tsx @@ -1,13 +1,14 @@ import type { OdsInputValueChangeEvent } from '@ovhcloud/ods-component-input'; import type { OdsSelectValueChangeEvent } from '@ovhcloud/ods-component-select'; import type { OdsSearchBarEvent } from './interfaces/events'; -import type { OdsSearchBarAttribute } from './interfaces/attributes'; +import type { OdsSearchBarAttribute, OdsSearchbarOption } from './interfaces/attributes'; import { Component, Element, Host, h, Prop, Event, EventEmitter, Listen } from '@stencil/core'; import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming'; import { ODS_ICON_NAME, ODS_ICON_SIZE } from '@ovhcloud/ods-component-icon'; import { ODS_BUTTON_SIZE } from '@ovhcloud/ods-component-button'; import { ODS_INPUT_TYPE } from '@ovhcloud/ods-component-input'; import { DEFAULT_ATTRIBUTE } from './constants/default-attributes'; + /** * @slot (unnamed) - SearchBar content */ @@ -34,7 +35,7 @@ export class OsdsSearchBar implements OdsSearchBarAttribute, OdsSearchBarEvent { @Prop({ reflect: true }) public placeholder?: string = DEFAULT_ATTRIBUTE.placeholder; /** @see OdsSearchBarAttributes.options */ - @Prop({ reflect: true }) public options?: { label: string; value: string; }[] = DEFAULT_ATTRIBUTE.options; + @Prop({ reflect: true }) public options?: OdsSearchbarOption[] = DEFAULT_ATTRIBUTE.options; /** @see OdsSearchBarAttributes.value */ @Prop({ reflect: true, mutable: true }) public value: string = DEFAULT_ATTRIBUTE.value; diff --git a/packages/components/search-bar/src/components/osds-search-bar/public-api.ts b/packages/components/search-bar/src/components/osds-search-bar/public-api.ts index 9fcc52614a..88be030d80 100644 --- a/packages/components/search-bar/src/components/osds-search-bar/public-api.ts +++ b/packages/components/search-bar/src/components/osds-search-bar/public-api.ts @@ -1,3 +1,3 @@ -export type { OdsSearchBarAttribute } from './interfaces/attributes'; +export type { OdsSearchBarAttribute, OdsSearchbarOption } from './interfaces/attributes'; export type { OdsSearchBarEvent } from './interfaces/events'; export { OsdsSearchBar } from './osds-search-bar'; diff --git a/packages/components/select/documentation/specifications/spec.md b/packages/components/select/documentation/specifications/spec.md index b3e795e3f8..e3d62f01d6 100644 --- a/packages/components/select/documentation/specifications/spec.md +++ b/packages/components/select/documentation/specifications/spec.md @@ -5,7 +5,7 @@ ## Interfaces ### OdsSelectAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`ariaLabel`** | `undefined` \| `string` | ✴️ | | The corresponding aria-label describing its content| |**`ariaLabelledby`** | _string_ | ✴️ | | The id to an external description| @@ -20,14 +20,14 @@ |**`value`** | `OdsInputValue` | ✴️ | | Its corresponding value. It needs to correspond to the value of the option| ### OdsSelectEvent -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`odsBlur`** | `EventEmitter` | ✴️ | | Event triggered on select blur| |**`odsFocus`** | `EventEmitter` | ✴️ | | Event triggered on select focus| |**`odsValueChange`** | `EventEmitter` | ✴️ | | Emitted when the value has changed| ### OdsSelectMethod -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`clear`** | `Promise` | ✴️ | | erase the current selection| |**`getValidity`** | `Promise` | ✴️ | | get the validity state| @@ -37,28 +37,28 @@ |**`validate`** | `Promise` | ✴️ | | check that the select is valid or not.In case of required field, the validation will check the entered valueand set the field in error if it is not fulfilled| ### OdsSelectOptionAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`selected`** | _boolean_ | | | | |**`value`** | `OdsInputValue` | ✴️ | | | ### OdsSelectOptionClickEventDetail -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`value`** | `OdsInputValue` | ✴️ | | | ### OdsSelectOptionEvent -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`odsSelectOptionClick`** | `EventEmitter` | ✴️ | | the select value changed| ### OdsSelectOptionMethod -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`getLabel`** | `Promise` | ✴️ | | get label of the element| ### OdsSelectValueChangeEventDetail -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`oldValue`** | `OdsInputValue` | | | | |**`selection`** | `undefined` \| `OsdsSelectOption` | ✴️ | | | diff --git a/packages/components/skeleton/documentation/specifications/spec.md b/packages/components/skeleton/documentation/specifications/spec.md index c499a3253e..543b9fe015 100644 --- a/packages/components/skeleton/documentation/specifications/spec.md +++ b/packages/components/skeleton/documentation/specifications/spec.md @@ -5,7 +5,7 @@ ## Interfaces ### OdsSkeletonAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`inline`** | _boolean_ | | | inline or not: see component principles| |**`randomized`** | _boolean_ | | | wether or not skeleton size is randomized| diff --git a/packages/components/spinner/documentation/specifications/spec.md b/packages/components/spinner/documentation/specifications/spec.md index 90a710a1b9..fb21eb9a4a 100644 --- a/packages/components/spinner/documentation/specifications/spec.md +++ b/packages/components/spinner/documentation/specifications/spec.md @@ -5,7 +5,7 @@ ## Interfaces ### OdsSpinnerAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`contrasted`** | _boolean_ | | | contrasted or not: see component principles| |**`inline`** | _boolean_ | | | full width or not: see component principles| diff --git a/packages/components/switch/documentation/specifications/spec.md b/packages/components/switch/documentation/specifications/spec.md index c32c8b3574..459eddd173 100644 --- a/packages/components/switch/documentation/specifications/spec.md +++ b/packages/components/switch/documentation/specifications/spec.md @@ -5,7 +5,7 @@ ## Interfaces ### OdsSwitchAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`color`** | `ODS_THEME_COLOR_INTENT` | | | main color: see component principles| |**`contrasted`** | _boolean_ | | | contrasted or not: see component principles| @@ -14,18 +14,18 @@ |**`variant`** | `flat` | | | used design aspect| ### OdsSwitchChangedEventDetail -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`current`** | _string_ | ✴️ | | | |**`previous`** | _string_ | | | | ### OdsSwitchEvent -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`odsSwitchChanged`** | `EventEmitter` | ✴️ | | Event triggered on accordion toggle| ### OdsSwitchItemAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`checked`** | _boolean_ | ✴️ | | The checked status of the SwitchItem| |**`id`** | _string_ | ✴️ | | Its corresponding id| diff --git a/packages/components/tabs/documentation/specifications/spec.md b/packages/components/tabs/documentation/specifications/spec.md index db4b0aeb1e..4a3921e664 100644 --- a/packages/components/tabs/documentation/specifications/spec.md +++ b/packages/components/tabs/documentation/specifications/spec.md @@ -5,12 +5,12 @@ ## Interfaces ### OdsTabBarAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`size`** | `md` | | | Tabs size| ### OdsTabBarItemAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`active`** | _boolean_ | ✴️ | | is this tab item is selected or not| |**`contrasted`** | _boolean_ | ✴️ | | is in contrasted mode or not| @@ -18,36 +18,36 @@ |**`panel`** | _string_ | ✴️ | | The panel of the corresponding Tab| ### OdsTabBarItemEvent -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`odsTabItemSelectEvent`** | `EventEmitter` | ✴️ | | Tab Bar item is selected| ### OdsTabItemSelectEventDetail -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`panel`** | _string_ | ✴️ | | | |**`tabItem`** | `OsdsTabBarItem` | ✴️ | | | ### OdsTabPanelAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`active`** | _boolean_ | ✴️ | | is the panel is active or nor| |**`name`** | _string_ | ✴️ | | identifier name of the panel| ### OdsTabsAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`contrasted`** | _boolean_ | ✴️ | | The tab is contrasted| |**`panel`** | _string_ | ✴️ | | Tabs active panel| |**`size`** | `md` | ✴️ | | Tabs size| ### OdsTabsChangeEventDetail -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`panel`** | _string_ | ✴️ | | | ### OdsTabsEvent -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`odsTabsChanged`** | `EventEmitter` | ✴️ | | The selected tab changed| diff --git a/packages/components/text/documentation/specifications/spec.md b/packages/components/text/documentation/specifications/spec.md index bfcbb61d4f..1c8b2bc5eb 100644 --- a/packages/components/text/documentation/specifications/spec.md +++ b/packages/components/text/documentation/specifications/spec.md @@ -5,7 +5,7 @@ ## Interfaces ### OdsTextAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`breakSpaces`** | _boolean_ | | | If text handles break spaces or not| |**`color`** | `ODS_THEME_COLOR_INTENT` | | | Text contrasted theme| diff --git a/packages/components/textarea/documentation/specifications/spec.md b/packages/components/textarea/documentation/specifications/spec.md index bb7d077445..abe6da4d35 100644 --- a/packages/components/textarea/documentation/specifications/spec.md +++ b/packages/components/textarea/documentation/specifications/spec.md @@ -5,7 +5,7 @@ ## Interfaces ### OdsTextAreaAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`ariaLabel`** | `undefined` \| `string` | ✴️ | | ariaLabel: see component principles| |**`ariaLabelledby`** | _string_ | | | ariaLabelledby: see component principles| @@ -31,14 +31,14 @@ |**`value`** | _string_ | ✴️ | | value: see component principles| ### OdsTextAreaEvent -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`odsBlur`** | `EventEmitter` | ✴️ | | Event triggered on textarea blur| |**`odsFocus`** | `EventEmitter` | ✴️ | | Event triggered on textarea focus| |**`odsValueChange`** | `EventEmitter` | ✴️ | | The textarea value changed| ### OdsTextAreaMethod -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`clear`** | `Promise` | ✴️ | | empty the value| |**`getValidity`** | `Promise` | ✴️ | | get the validity state| @@ -47,7 +47,7 @@ |**`setTextAreaTabindex`** | `Promise` | ✴️ | | set a custom tab index for easier navigation| ### OdsTextAreaValueChangeEvent -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`oldValue`** | `undefined` \| `string` | | | | |**`validity`** | `OdsTextAreaValidityState` | | | | diff --git a/packages/components/tile/documentation/specifications/spec.md b/packages/components/tile/documentation/specifications/spec.md index 93a6020e6a..f62d1761fa 100644 --- a/packages/components/tile/documentation/specifications/spec.md +++ b/packages/components/tile/documentation/specifications/spec.md @@ -5,7 +5,7 @@ ## Interfaces ### OdsTileAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`checked`** | _boolean_ | | | If the tile is selected or not| |**`checking`** | _boolean_ | | | awaiting a change of checked state| diff --git a/packages/components/toggle/documentation/specifications/spec.md b/packages/components/toggle/documentation/specifications/spec.md index 84c6622533..b96b3bbf0b 100644 --- a/packages/components/toggle/documentation/specifications/spec.md +++ b/packages/components/toggle/documentation/specifications/spec.md @@ -4,7 +4,7 @@ ## Interfaces ### OdsToggleAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`checked`** | _boolean_ | | | Toggle is checked or not| |**`checking`** | _boolean_ | | | Awaiting a change of checked state| diff --git a/packages/components/tooltip/documentation/specifications/spec.md b/packages/components/tooltip/documentation/specifications/spec.md index 3719a79515..720dd8eca1 100644 --- a/packages/components/tooltip/documentation/specifications/spec.md +++ b/packages/components/tooltip/documentation/specifications/spec.md @@ -5,12 +5,12 @@ ## Interfaces ### OdsTooltipAttribute -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`variant`** | `ODS_TOOLTIP_VARIANT` | | | with or without visible tip: see component principles| ### OdsTooltipMethod -|name | Type | Required | Default | Description| +|Name | Type | Required | Default | Description| |---|---|:---:|---|---| |**`closeSurface`** | `Promise` | ✴️ | | Close the surface| |**`setTabindex`** | `Promise` | ✴️ | | set tab index on the component|