-
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 BTP Side Panel
- Loading branch information
1 parent
bc50266
commit 8754c09
Showing
18 changed files
with
147 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -170,4 +170,4 @@ | |
"fast-deep-equal": "^3.1.3", | ||
"jsdom": "^20.0.1" | ||
} | ||
} | ||
} |
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,58 @@ | ||
@import './new-settings'; | ||
@import "mixins/mixins"; | ||
|
||
$block: #{$fd-namespace}-side-panel; | ||
|
||
.#{$block} { | ||
--fdSide_Panel_Background: var(--sapTile_Background); | ||
--fdSide_Panel_BoxShadow: var(--sapNotifications_Shadow2); | ||
|
||
@include fd-reset(); | ||
|
||
width: 100%; | ||
height: 100%; | ||
background: var(--fdSide_Panel_Background); | ||
border-radius: var(--sapElement_BorderCornerRadius); | ||
border: 0.0625rem solid var(--fdSidePanel_Border_Color); | ||
box-shadow: var(--fdSide_Panel_BoxShadow); | ||
|
||
@include fd-hover() { | ||
--fdSide_Panel_Background: var(--sapTile_Hover_Background); | ||
} | ||
|
||
@include fd-focus() { | ||
--fdSide_Panel_BoxShadow: none; | ||
--fdSide_Panel_Background: var(--sapTile_Background); | ||
|
||
outline: var(--sapContent_FocusStyle) var(--sapContent_FocusWidth) var(--sapContent_FocusColor); | ||
} | ||
|
||
&__header { | ||
@include fd-reset(); | ||
|
||
@include fd-flex-vertical-center() { | ||
gap: 0.75rem; | ||
justify-content: space-between; | ||
} | ||
|
||
padding: 0.5rem; | ||
} | ||
|
||
&__actions { | ||
@include fd-reset(); | ||
|
||
@include fd-flex-vertical-center() { | ||
gap: 0.5rem; | ||
} | ||
} | ||
|
||
&__content { | ||
@include fd-reset(); | ||
|
||
padding: 0; | ||
} | ||
|
||
&__footer { | ||
@include fd-reset(); | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/styles/src/theming/common/side-panel/_sap_fiori.scss
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,3 @@ | ||
:root { | ||
--fdSidePanel_Border_Color: transparent; | ||
} |
5 changes: 5 additions & 0 deletions
5
packages/styles/src/theming/common/side-panel/_sap_fiori_hc.scss
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,5 @@ | ||
@import "./sap_fiori"; | ||
|
||
:root { | ||
--fdSidePanel_Border_Color: var(--sapGroup_ContentBorderColor); | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/styles/src/theming/common/side-panel/_sap_horizon.scss
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,3 @@ | ||
:root { | ||
--fdSidePanel_Border_Color: transparent; | ||
} |
5 changes: 5 additions & 0 deletions
5
packages/styles/src/theming/common/side-panel/_sap_horizon_hc.scss
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,5 @@ | ||
@import "./sap_horizon"; | ||
|
||
:root { | ||
--fdSidePanel_Border_Color: var(--sapGroup_ContentBorderColor); | ||
} |
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
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
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
25 changes: 25 additions & 0 deletions
25
packages/styles/stories/BTP/side-panel/anatomy.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,25 @@ | ||
<aside role="region" aria-label="Side Panel" class="fd-side-panel" tabindex="0" style="width: 400px;"> | ||
<div class="fd-side-panel__header"> | ||
<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> | ||
<span class="fd-title-bar__subtitle">Subtitle, byline, description</span> | ||
</div> | ||
</div> | ||
<div class="fd-side-panel__actions"> | ||
<button class="fd-button fd-button--nested-square" aria-label="Expand Panel"> | ||
<i class="sap-icon--decline" role="presentation"></i> | ||
</button> | ||
<button class="fd-button fd-button--nested-square" aria-label="Open Sub Panel"> | ||
<i class="sap-icon--slim-arrow-up" role="presentation"></i> | ||
</button> | ||
<button class="fd-button fd-button--nested-square" aria-label="Close Panel"> | ||
<i class="sap-icon--decline" role="presentation"></i> | ||
</button> | ||
</div> | ||
</div> | ||
<div class="fd-side-panel__content"></div> | ||
<div class="fd-side-panel__footer"></div> | ||
</aside> |
37 changes: 37 additions & 0 deletions
37
packages/styles/stories/BTP/side-panel/side-panel.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,37 @@ | ||
import anatomyExampleHtml from "./anatomy.example.html?raw"; | ||
|
||
import '../../../src/side-panel.scss'; | ||
import '../../../src/title-bar.scss'; | ||
import '../../../src/icon.scss'; | ||
import '../../../src/button.scss'; | ||
|
||
export default { | ||
title: 'BTP/Side Panel', | ||
parameters: { | ||
description: `<br><br>### Elements | ||
- Title Bar / Header (mandatory): the Title Bar for the Side Panel. | ||
- Open Sub Panel (optional): opens the Sub Panel to show additional content. | ||
- Expand / Collapse Side Panel (mandatory): expands or Collapses the Side Panel. | ||
- Close Panel (mandatory): closes the Side Panel completely. | ||
- Content Area (mandatory): main panel content is displayed here. Level 1: content area can be split by a Responsive Splitter (horizontal) content from either area can be dragged and dropped into either content area. | ||
- Responsive Splitter (optional): a responsive splitter can be used to split content in the content area and can be moved up or down to show or hide content allowing users to view more or less content. Content can be dragged and dropped from content areas to perform actions. | ||
- Pagination Bar (optional) | ||
- Footer (optional): optional actions for the Side Panel can be placed in the footer. Footers are optional and not required. | ||
- Close Sub Panel (optional): closes the Sub Panel | ||
- Sub Panel (optional): sub panel content is displayed here. Level 2: content area can be split by a Responsive Splitter (Horizontal) content from either area can be dragged and dropped into either content area. | ||
`, | ||
tags: ['btp','horizon-only'] | ||
} | ||
}; | ||
|
||
export const Anatomy = () => anatomyExampleHtml; | ||
Anatomy.parameters = { | ||
docs: { | ||
story: { | ||
}, | ||
description: { | ||
story: `` | ||
} | ||
} | ||
}; |