diff --git a/packages/main/src/TabContainer.hbs b/packages/main/src/TabContainer.hbs index a877845a3783..b06bfe628c84 100644 --- a/packages/main/src/TabContainer.hbs +++ b/packages/main/src/TabContainer.hbs @@ -25,16 +25,10 @@ ?disabled="{{this.disabled}}" aria-labelledby="{{this.ariaLabelledBy}}" > - {{#if this.isTextOnlyTab}} - {{> textOnlyTab}} - {{/if}} - - {{#if this.isIconTab}} - {{> iconTab}} - {{/if}} - - {{#if this.isMixedModeTab}} - {{> mixedModeTab}} + {{#if this.isInline}} + {{> inlineTab}} + {{else}} + {{> standardTab}} {{/if}} {{/unless}} @@ -71,23 +65,12 @@ -{{#*inline "textOnlyTab"}} -
- - - {{this.item.text}} - - - {{#if this.item.additionalText}} - ({{this.item.additionalText}}) - {{/if}} -
-{{/inline}} - -{{#*inline "iconTab"}} -
- -
+{{#*inline "standardTab"}} + {{#if this.item.icon}} +
+ +
+ {{/if}}
{{#if this.item.additionalText}} @@ -103,17 +86,23 @@
{{/inline}} -{{#*inline "mixedModeTab"}} -
- {{#if this.item.additionalText}} - {{this.item.additionalText}} - {{/if}} +{{#*inline "inlineTab"}} + {{#if this.item.icon}} +
+ +
+ {{/if}} +
{{#if this.item.text}} {{this.item.text}} {{/if}} + + {{#if this.item.additionalText}} + {{this.item.additionalText}} + {{/if}}
-{{/inline}} +{{/inline}} \ No newline at end of file diff --git a/packages/main/src/TabContainer.js b/packages/main/src/TabContainer.js index 970389863adf..6108af3f98b6 100644 --- a/packages/main/src/TabContainer.js +++ b/packages/main/src/TabContainer.js @@ -25,6 +25,7 @@ import TabContainerPopoverTemplate from "./generated/templates/TabContainerPopov import tabContainerCss from "./generated/themes/TabContainer.css.js"; import tabContainerPopoverCss from "./generated/themes/TabContainerPopup.css.js"; import ResponsivePopoverCommonCss from "./generated/themes/ResponsivePopoverCommon.css.js"; +import TabLayout from "./types/TabLayout.js"; const SCROLL_STEP = 128; @@ -51,7 +52,7 @@ const metadata = { }, properties: /** @lends sap.ui.webcomponents.main.TabContainer.prototype */ { /** - * Determines whether the tabs are in a fixed state that is not + * Defines whether the tabs are in a fixed state that is not * expandable/collapsible by user interaction. * * @type {Boolean} @@ -63,7 +64,7 @@ const metadata = { }, /** - * Determines whether the tab content is collapsed. + * Defines whether the tab content is collapsed. * * @type {Boolean} * @defaultvalue false @@ -74,7 +75,7 @@ const metadata = { }, /** - * Specifies if the overflow select list is displayed. + * Defines whether the overflow select list is displayed. *

* The overflow select list represents a list, where all tab filters are displayed * so that it's easier for the user to select a specific tab filter. @@ -87,6 +88,28 @@ const metadata = { type: Boolean, }, + /** + * Defines the alignment of the main text and the additionalText of a tab. + *
+ * Note: + * The main text and the additionalText would be displayed vertically by defualt, + * but when set to Inline, they would be displayed horizontally. + *

+ * Available options are: + *