From ca90fbf5bbaa1751eb940b5b5210b03ca066882d Mon Sep 17 00:00:00 2001 From: Marcus Notheis Date: Mon, 30 Mar 2020 09:22:03 +0200 Subject: [PATCH] docs: use enum type instead of string (#1391) In several places, string was used as @type annotation for the documentation. This PR is replacing those string annotations with the corresponding enums. --- packages/main/src/Avatar.js | 8 ++++---- packages/main/src/Calendar.js | 2 +- packages/main/src/CheckBox.js | 2 +- packages/main/src/ComboBox.js | 2 +- packages/main/src/DatePicker.js | 4 ++-- packages/main/src/DayPicker.js | 2 +- packages/main/src/FileUploader.js | 2 +- packages/main/src/Input.js | 4 ++-- packages/main/src/Link.js | 2 +- packages/main/src/List.js | 4 ++-- packages/main/src/ListItem.js | 2 +- packages/main/src/MessageStrip.js | 4 ++-- packages/main/src/MonthPicker.js | 2 +- packages/main/src/MultiComboBox.js | 2 +- packages/main/src/RadioButton.js | 2 +- packages/main/src/Select.js | 2 +- packages/main/src/StandardListItem.js | 3 ++- packages/main/src/SuggestionItem.js | 6 ++++-- packages/main/src/Tab.js | 2 +- packages/main/src/TabContainer.js | 2 +- packages/main/src/TimePicker.js | 2 +- packages/main/src/TimelineItem.js | 2 +- packages/main/src/Title.js | 2 +- packages/main/src/Toast.js | 2 +- packages/main/src/YearPicker.js | 2 +- 25 files changed, 36 insertions(+), 33 deletions(-) diff --git a/packages/main/src/Avatar.js b/packages/main/src/Avatar.js index a3bed6457e04..c4d1a6650cb8 100644 --- a/packages/main/src/Avatar.js +++ b/packages/main/src/Avatar.js @@ -71,7 +71,7 @@ const metadata = { *
  • Circle
  • *
  • Square
  • * * - * @type {string} + * @type {ValueState} * @defaultvalue "None" * @public */ diff --git a/packages/main/src/Input.js b/packages/main/src/Input.js index 5586637ea5b2..3e7b5f20c48b 100644 --- a/packages/main/src/Input.js +++ b/packages/main/src/Input.js @@ -170,7 +170,7 @@ const metadata = { * that use different soft keyboard layouts depending on the given input type. * * - * @type {string} + * @type {InputType} * @defaultvalue "Text" * @public */ @@ -204,7 +204,7 @@ const metadata = { *
  • Information
  • * * - * @type {string} + * @type {ValueState} * @defaultvalue "None" * @public */ diff --git a/packages/main/src/Link.js b/packages/main/src/Link.js index 07183c09dd95..9d776d9216dc 100644 --- a/packages/main/src/Link.js +++ b/packages/main/src/Link.js @@ -67,7 +67,7 @@ const metadata = { *

    * Note: Avaialble options are Default, Subtle, and Emphasized. * - * @type {string} + * @type {LinkDesign} * @defaultvalue "Default" * @public */ diff --git a/packages/main/src/List.js b/packages/main/src/List.js index 58ff92f3def6..3b81324aff7b 100644 --- a/packages/main/src/List.js +++ b/packages/main/src/List.js @@ -96,7 +96,7 @@ const metadata = { * Note: Avalaible options are None, SingleSelect, * MultiSelect, and Delete. * - * @type {string} + * @type {ListMode} * @defaultvalue "None" * @public */ @@ -127,7 +127,7 @@ const metadata = { * item doesn't have a bottom separator. * * - * @type {string} + * @type {ListSeparators} * @defaultvalue "All" * @public */ diff --git a/packages/main/src/ListItem.js b/packages/main/src/ListItem.js index 2893caffb23b..93b54acc1b0b 100644 --- a/packages/main/src/ListItem.js +++ b/packages/main/src/ListItem.js @@ -24,7 +24,7 @@ const metadata = { * Note: When set to Active, the item will provide visual response upon press and hover, * while with type Inactive and Detail - will not. * - * @type {string} + * @type {ListItemType} * @defaultvalue "Active" * @public */ diff --git a/packages/main/src/MessageStrip.js b/packages/main/src/MessageStrip.js index d935960978b7..24b0d6eb9711 100644 --- a/packages/main/src/MessageStrip.js +++ b/packages/main/src/MessageStrip.js @@ -85,8 +85,8 @@ const metadata = { * * See all the available icons in the Icon Explorer. * - * @type {string} - * @defaultvalue "" + * @type {HTMLElement} + * @slot * @public */ "icon": { diff --git a/packages/main/src/MonthPicker.js b/packages/main/src/MonthPicker.js index fbe34207b137..f7760c49aeb1 100644 --- a/packages/main/src/MonthPicker.js +++ b/packages/main/src/MonthPicker.js @@ -32,7 +32,7 @@ const metadata = { /** * Sets a calendar type used for display. * If not set, the calendar type of the global configuration is used. - * @type {string} + * @type {CalendarType} * @public */ primaryCalendarType: { diff --git a/packages/main/src/MultiComboBox.js b/packages/main/src/MultiComboBox.js index e07da85945c4..0abc81a1d73e 100644 --- a/packages/main/src/MultiComboBox.js +++ b/packages/main/src/MultiComboBox.js @@ -125,7 +125,7 @@ const metadata = { *
  • Information
  • * * - * @type {string} + * @type {ValueState} * @defaultvalue "None" * @public */ diff --git a/packages/main/src/RadioButton.js b/packages/main/src/RadioButton.js index 3ee2805b1110..24d37019dfa2 100644 --- a/packages/main/src/RadioButton.js +++ b/packages/main/src/RadioButton.js @@ -95,7 +95,7 @@ const metadata = { *
  • Warning
  • * * - * @type {string} + * @type {ValueState} * @defaultvalue "None" * @public */ diff --git a/packages/main/src/Select.js b/packages/main/src/Select.js index 0910c2595f24..c4151574f4a1 100644 --- a/packages/main/src/Select.js +++ b/packages/main/src/Select.js @@ -106,7 +106,7 @@ const metadata = { *
  • Information
  • * * - * @type {string} + * @type {ValueState} * @defaultvalue "None" * @public */ diff --git a/packages/main/src/StandardListItem.js b/packages/main/src/StandardListItem.js index 1f384d925d5a..9a20643f2cb3 100644 --- a/packages/main/src/StandardListItem.js +++ b/packages/main/src/StandardListItem.js @@ -75,7 +75,8 @@ const metadata = { * Defines the state of the info. *
    * Available options are: "None" (by default), "Success", "Warning" and "Erorr". - * @type {string} + * @type {ValueState} + * @defaultvalue "None" * @public * @since 0.13.0 */ diff --git a/packages/main/src/SuggestionItem.js b/packages/main/src/SuggestionItem.js index bc0d531a1aa1..a9be193ff872 100644 --- a/packages/main/src/SuggestionItem.js +++ b/packages/main/src/SuggestionItem.js @@ -83,7 +83,8 @@ const metadata = { * Defines the state of the info. *

    * Available options are: "None" (by default), "Success", "Warning" and "Erorr". - * @type {string} + * @type {ValueState} + * @defaultvalue "None" * @public */ infoState: { @@ -97,7 +98,8 @@ const metadata = { * Note: * When set, the other properties, such as image, icon, description, etc. will be omitted * and only the text will be displayed. - * @type {string} + * @type {boolean} + * @defaultvalue false * @public */ group: { diff --git a/packages/main/src/Tab.js b/packages/main/src/Tab.js index 3045b5fadf23..10cefe13e1d2 100644 --- a/packages/main/src/Tab.js +++ b/packages/main/src/Tab.js @@ -84,7 +84,7 @@ const metadata = { * *

    * Note: The color value depends on the current theme. - * @type {string} + * @type {SemanticColor} * @defaultvalue "Default" * @public */ diff --git a/packages/main/src/TabContainer.js b/packages/main/src/TabContainer.js index 5a5137365c0a..90f288db8c23 100644 --- a/packages/main/src/TabContainer.js +++ b/packages/main/src/TabContainer.js @@ -105,7 +105,7 @@ const metadata = { *
  • Inline
  • * * - * @type {string} + * @type {ValueState} * @defaultvalue "None" * @public */ diff --git a/packages/main/src/TimelineItem.js b/packages/main/src/TimelineItem.js index 21ab10fd3297..5ace4a8bf791 100644 --- a/packages/main/src/TimelineItem.js +++ b/packages/main/src/TimelineItem.js @@ -45,7 +45,7 @@ const metadata = { * Defines the name of the item. * * @type {string} - * @defaultvalue false + * @defaultvalue "" * @public */ itemName: { diff --git a/packages/main/src/Title.js b/packages/main/src/Title.js index d2a256f4137c..c4cae375a2a2 100644 --- a/packages/main/src/Title.js +++ b/packages/main/src/Title.js @@ -30,7 +30,7 @@ const metadata = { * Defines the ui5-title level. * Available options are: "H6" to "H1". * - * @type {string} + * @type {TitleLevel} * @defaultvalue "H2" * @public */ diff --git a/packages/main/src/Toast.js b/packages/main/src/Toast.js index c4386e2aef37..d765251495f0 100644 --- a/packages/main/src/Toast.js +++ b/packages/main/src/Toast.js @@ -51,7 +51,7 @@ const metadata = { *
  • BottomEnd
  • * * - * @type {string} + * @type {ToastPlacement} * @defaultvalue "BottomCenter" * @public */ diff --git a/packages/main/src/YearPicker.js b/packages/main/src/YearPicker.js index 8d981b23b964..1bf7c9ccf6fc 100644 --- a/packages/main/src/YearPicker.js +++ b/packages/main/src/YearPicker.js @@ -32,7 +32,7 @@ const metadata = { /** * Sets a calendar type used for display. * If not set, the calendar type of the global configuration is used. - * @type {string} + * @type {CalendarType} * @public */ primaryCalendarType: {