-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(styles): introduce new Title Bar BTP component [ci visual] (#4874)
- Loading branch information
1 parent
aa348d6
commit 8f30a88
Showing
11 changed files
with
347 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@import './new-settings'; | ||
@import './mixins'; | ||
|
||
$block: #{$fd-namespace}-title-bar; | ||
|
||
.#{$block} { | ||
@include fd-reset(); | ||
@include fd-ellipsis(); | ||
|
||
@include fd-flex-vertical-center() { | ||
gap: 0.125rem; | ||
} | ||
|
||
max-width: 100%; | ||
|
||
&__container { | ||
@include fd-reset(); | ||
@include fd-ellipsis(); | ||
|
||
@include fd-flex(column) { | ||
gap: 0.125rem; | ||
} | ||
} | ||
|
||
&__title-container { | ||
@include fd-reset(); | ||
|
||
@include fd-flex-vertical-center() { | ||
gap: 0.125rem; | ||
} | ||
} | ||
|
||
&__title { | ||
@include fd-reset(); | ||
@include fd-ellipsis(); | ||
|
||
font-size: 1.25rem; | ||
font-weight: bold; | ||
line-height: 1.5rem; | ||
} | ||
|
||
&__subtitle { | ||
@include fd-reset(); | ||
@include fd-ellipsis(); | ||
|
||
font-weight: normal; | ||
font-size: var(--sapFontSize); | ||
color: var(--sapContent_LabelColor); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
167 changes: 167 additions & 0 deletions
167
packages/styles/stories/BTP/title-bar/desktop.example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
<div class="fd-toolbar fd-toolbar--clear fd-toolbar--title-bar" role="toolbar" aria-label="Left, center, and right-aligned toolbar"> | ||
<div class="fd-title-bar"> | ||
<div class="fd-title-bar__container"> | ||
<div class="fd-title-bar__title-container"> | ||
<h4 class="fd-title-bar__title">Title</h4> | ||
</div> | ||
</div> | ||
</div> | ||
<span class="fd-toolbar__spacer"></span> | ||
<div class="fd-segmented-button" role="group" aria-label="Group label"> | ||
<button class="fd-button fd-button--compact">View 1</button> | ||
<button class="fd-button fd-button--compact fd-button--toggled" aria-pressed="true">View 2</button> | ||
<button class="fd-button fd-button--compact">View 3</button> | ||
</div> | ||
<span class="fd-toolbar__spacer"></span> | ||
<button class="fd-button fd-button--compact fd-button--transparent" aria-label="Filter"> | ||
<i class="sap-icon--filter" role="presentation"></i> | ||
</button> | ||
<button class="fd-button fd-button--compact fd-button--transparent" aria-label="Sort"> | ||
<i class="sap-icon--sort" role="presentation"></i> | ||
</button> | ||
<button class="fd-button fd-button--compact fd-button--transparent" aria-label="Group"> | ||
<i class="sap-icon--group-2" role="presentation"></i> | ||
</button> | ||
</div> | ||
|
||
<br><br> | ||
<div class="fd-toolbar fd-toolbar--clear fd-toolbar--title-bar" role="toolbar" aria-label="Left, center, and right-aligned toolbar"> | ||
<div class="fd-title-bar"> | ||
<div class="fd-title-bar__container"> | ||
<div class="fd-title-bar__title-container"> | ||
<h4 class="fd-title-bar__title">Title</h4> | ||
<button class="fd-button fd-button--nested" aria-label="information"> | ||
<i class="sap-icon--hint" role="presentation"></i> | ||
</button> | ||
</div> | ||
<span class="fd-title-bar__subtitle">Subtitle, byline, description</span> | ||
</div> | ||
</div> | ||
<span class="fd-toolbar__spacer"></span> | ||
<div class="fd-segmented-button" role="group" aria-label="Group label"> | ||
<button class="fd-button fd-button--compact">View 1</button> | ||
<button class="fd-button fd-button--compact fd-button--toggled" aria-pressed="true">View 2</button> | ||
<button class="fd-button fd-button--compact">View 3</button> | ||
</div> | ||
<span class="fd-toolbar__spacer"></span> | ||
<button class="fd-button fd-button--compact fd-button--transparent" aria-label="Filter"> | ||
<i class="sap-icon--filter" role="presentation"></i> | ||
</button> | ||
<button class="fd-button fd-button--compact fd-button--transparent" aria-label="Sort"> | ||
<i class="sap-icon--sort" role="presentation"></i> | ||
</button> | ||
<button class="fd-button fd-button--compact fd-button--transparent" aria-label="Group"> | ||
<i class="sap-icon--group-2" role="presentation"></i> | ||
</button> | ||
</div> | ||
|
||
<br><br> | ||
<div class="fd-toolbar fd-toolbar--clear fd-toolbar--title-bar" role="toolbar" aria-label="Left, center, and right-aligned toolbar"> | ||
<div class="fd-title-bar"> | ||
<div class="fd-title-bar__container"> | ||
<button class="fd-button fd-button--compact fd-button--transparent" aria-label="Back"> | ||
<i class="sap-icon--navigation-left-arrow" role="presentation"></i> | ||
</button> | ||
</div> | ||
<div class="fd-title-bar__container"> | ||
<div class="fd-title-bar__title-container"> | ||
<h4 class="fd-title-bar__title">Title</h4> | ||
<button class="fd-button fd-button--nested" aria-label="information"> | ||
<i class="sap-icon--hint" role="presentation"></i> | ||
</button> | ||
</div> | ||
<span class="fd-title-bar__subtitle">Subtitle, byline, description</span> | ||
</div> | ||
</div> | ||
<span class="fd-toolbar__spacer"></span> | ||
<div class="fd-segmented-button" role="group" aria-label="Group label"> | ||
<button class="fd-button fd-button--compact">View 1</button> | ||
<button class="fd-button fd-button--compact fd-button--toggled" aria-pressed="true">View 2</button> | ||
<button class="fd-button fd-button--compact">View 3</button> | ||
</div> | ||
<span class="fd-toolbar__spacer"></span> | ||
<button class="fd-button fd-button--compact fd-button--transparent" aria-label="Filter"> | ||
<i class="sap-icon--filter" role="presentation"></i> | ||
</button> | ||
<button class="fd-button fd-button--compact fd-button--transparent" aria-label="Sort"> | ||
<i class="sap-icon--sort" role="presentation"></i> | ||
</button> | ||
<button class="fd-button fd-button--compact fd-button--transparent" aria-label="Group"> | ||
<i class="sap-icon--group-2" role="presentation"></i> | ||
</button> | ||
</div> | ||
|
||
<br><br> | ||
<div class="fd-toolbar fd-toolbar--clear fd-toolbar--title-bar" role="toolbar" aria-label="Left, center, and right-aligned toolbar"> | ||
<div class="fd-title-bar"> | ||
<div class="fd-title-bar__container"> | ||
<ul class="fd-breadcrumb"> | ||
<li class="fd-breadcrumb__item"><a class="fd-link" tabindex="0" href="#"><span class="fd-link__content">Products</span></a></li> | ||
<li class="fd-breadcrumb__item"><a class="fd-link" tabindex="0" href="#"><span class="fd-link__content">Suppliers</span></a></li> | ||
</ul> | ||
<div class="fd-title-bar__title-container"> | ||
<h4 class="fd-title-bar__title">Title</h4> | ||
<button class="fd-button fd-button--nested" aria-label="information"> | ||
<i class="sap-icon--hint" role="presentation"></i> | ||
</button> | ||
</div> | ||
<span class="fd-title-bar__subtitle">Subtitle, byline, description</span> | ||
</div> | ||
</div> | ||
<span class="fd-toolbar__spacer"></span> | ||
<div class="fd-segmented-button" role="group" aria-label="Group label"> | ||
<button class="fd-button fd-button--compact">View 1</button> | ||
<button class="fd-button fd-button--compact fd-button--toggled" aria-pressed="true">View 2</button> | ||
<button class="fd-button fd-button--compact">View 3</button> | ||
</div> | ||
<span class="fd-toolbar__spacer"></span> | ||
<button class="fd-button fd-button--compact fd-button--transparent" aria-label="Filter"> | ||
<i class="sap-icon--filter" role="presentation"></i> | ||
</button> | ||
<button class="fd-button fd-button--compact fd-button--transparent" aria-label="Sort"> | ||
<i class="sap-icon--sort" role="presentation"></i> | ||
</button> | ||
<button class="fd-button fd-button--compact fd-button--transparent" aria-label="Group"> | ||
<i class="sap-icon--group-2" role="presentation"></i> | ||
</button> | ||
</div> | ||
|
||
<br><br> | ||
<div class="fd-toolbar fd-toolbar--clear fd-toolbar--title-bar" role="toolbar" aria-label="Left, center, and right-aligned toolbar"> | ||
<div class="fd-title-bar"> | ||
<div class="fd-title-bar__container"> | ||
<button class="fd-button fd-button--compact fd-button--transparent" aria-label="Back"> | ||
<i class="sap-icon--navigation-left-arrow" role="presentation"></i> | ||
</button> | ||
</div> | ||
<div class="fd-title-bar__container"> | ||
<ul class="fd-breadcrumb"> | ||
<li class="fd-breadcrumb__item"><a class="fd-link" tabindex="0" href="#"><span class="fd-link__content">Products</span></a></li> | ||
<li class="fd-breadcrumb__item"><a class="fd-link" tabindex="0" href="#"><span class="fd-link__content">Suppliers</span></a></li> | ||
</ul> | ||
<div class="fd-title-bar__title-container"> | ||
<h4 class="fd-title-bar__title">Title</h4> | ||
<button class="fd-button fd-button--nested" aria-label="information"> | ||
<i class="sap-icon--hint" role="presentation"></i> | ||
</button> | ||
</div> | ||
<span class="fd-title-bar__subtitle">Subtitle, byline, description</span> | ||
</div> | ||
</div> | ||
<span class="fd-toolbar__spacer"></span> | ||
<div class="fd-segmented-button" role="group" aria-label="Group label"> | ||
<button class="fd-button fd-button--compact">View 1</button> | ||
<button class="fd-button fd-button--compact fd-button--toggled" aria-pressed="true">View 2</button> | ||
<button class="fd-button fd-button--compact">View 3</button> | ||
</div> | ||
<span class="fd-toolbar__spacer"></span> | ||
<button class="fd-button fd-button--compact fd-button--transparent" aria-label="Filter"> | ||
<i class="sap-icon--filter" role="presentation"></i> | ||
</button> | ||
<button class="fd-button fd-button--compact fd-button--transparent" aria-label="Sort"> | ||
<i class="sap-icon--sort" role="presentation"></i> | ||
</button> | ||
<button class="fd-button fd-button--compact fd-button--transparent" aria-label="Group"> | ||
<i class="sap-icon--group-2" role="presentation"></i> | ||
</button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<div style="max-width: 600px;"> | ||
<div class="fd-toolbar fd-toolbar--clear fd-toolbar--title-bar" role="toolbar" aria-label="Left, center, and right-aligned toolbar"> | ||
<div class="fd-title-bar"> | ||
<div class="fd-title-bar__container"> | ||
<button class="fd-button fd-button--transparent" aria-label="Back"> | ||
<i class="sap-icon--navigation-left-arrow" role="presentation"></i> | ||
</button> | ||
</div> | ||
<div class="fd-title-bar__container"> | ||
<div class="fd-title-bar__title-container"> | ||
<h4 class="fd-title-bar__title">Title</h4> | ||
<button class="fd-button fd-button--nested" aria-label="information"> | ||
<i class="sap-icon--hint" role="presentation"></i> | ||
</button> | ||
</div> | ||
<span class="fd-title-bar__subtitle">Subtitle, byline, description</span> | ||
</div> | ||
</div> | ||
<span class="fd-toolbar__spacer"></span> | ||
|
||
<button class="fd-button fd-button--transparent" aria-label="Filter"> | ||
<i class="sap-icon--filter" role="presentation"></i> | ||
</button> | ||
<button class="fd-button fd-button--transparent" aria-label="Sort"> | ||
<i class="sap-icon--sort" role="presentation"></i> | ||
</button> | ||
<button class="fd-button fd-button--transparent" aria-label="Overflow"> | ||
<i class="sap-icon--overflow" role="presentation"></i> | ||
</button> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<div style="max-width: 860px;"> | ||
<div class="fd-toolbar fd-toolbar--clear fd-toolbar--title-bar" role="toolbar" aria-label="Left, center, and right-aligned toolbar"> | ||
<div class="fd-title-bar"> | ||
<div class="fd-title-bar__container"> | ||
<button class="fd-button fd-button--transparent" aria-label="Back"> | ||
<i class="sap-icon--navigation-left-arrow" role="presentation"></i> | ||
</button> | ||
</div> | ||
<div class="fd-title-bar__container"> | ||
<div class="fd-title-bar__title-container"> | ||
<h4 class="fd-title-bar__title">Title</h4> | ||
<button class="fd-button fd-button--nested" aria-label="information"> | ||
<i class="sap-icon--hint" role="presentation"></i> | ||
</button> | ||
</div> | ||
<span class="fd-title-bar__subtitle">Subtitle, byline, description</span> | ||
</div> | ||
</div> | ||
<span class="fd-toolbar__spacer"></span> | ||
<div class="fd-segmented-button" role="group" aria-label="Group label"> | ||
<button class="fd-button">View 1</button> | ||
<button class="fd-button fd-button--toggled" aria-pressed="true">View 2</button> | ||
<button class="fd-button">View 3</button> | ||
</div> | ||
<button class="fd-button fd-button--transparent" aria-label="Filter"> | ||
<i class="sap-icon--filter" role="presentation"></i> | ||
</button> | ||
<button class="fd-button fd-button--transparent" aria-label="Sort"> | ||
<i class="sap-icon--sort" role="presentation"></i> | ||
</button> | ||
<button class="fd-button fd-button--transparent" aria-label="Group"> | ||
<i class="sap-icon--group-2" role="presentation"></i> | ||
</button> | ||
</div> | ||
</div> |
51 changes: 51 additions & 0 deletions
51
packages/styles/stories/BTP/title-bar/title-bar.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import desktopExampleHtml from './desktop.example.html?raw'; | ||
import tabletExampleHtml from './tablet.example.html?raw'; | ||
import mobileExampleHtml from './mobile.example.html?raw'; | ||
|
||
import '../../../src/icon.scss'; | ||
import '../../../src/link.scss'; | ||
import '../../../src/button.scss'; | ||
import '../../../src/toolbar.scss'; | ||
import '../../../src/title-bar.scss'; | ||
import '../../../src/breadcrumb.scss'; | ||
import '../../../src/segmented-button.scss'; | ||
|
||
export default { | ||
title: 'BTP/Title Bar', | ||
parameters: { | ||
description: `Title Bar is a composite control that uses a toolbar as a container and a title for labeling. It varies from the standard title control in its bold visual state and text size. In addition, the title bar comes in three variants: | ||
- <b>Standard</b> - similar to the Fiori title but visually different | ||
- <b>Title and Subtitle</b> - when an additional line of text is displayed below the title | ||
- <b>Title and Info Icon</b> - when an additional icon is displayed right after the title | ||
`, | ||
tags: ['btp', 'development', 'horizon-only'] | ||
} | ||
}; | ||
export const Desktop = () => desktopExampleHtml; | ||
Desktop.parameters = { | ||
docs: { | ||
description: { | ||
story: `` | ||
} | ||
} | ||
}; | ||
|
||
|
||
export const Tablet = () => tabletExampleHtml; | ||
Tablet.parameters = { | ||
docs: { | ||
description: { | ||
story: `` | ||
} | ||
} | ||
}; | ||
|
||
export const Mobile = () => mobileExampleHtml; | ||
Mobile.parameters = { | ||
docs: { | ||
description: { | ||
story: `` | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.