Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui5-shellbar): implement sap_horizon #4251

Merged
merged 8 commits into from
Nov 3, 2021
6 changes: 3 additions & 3 deletions packages/fiori/src/ShellBar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@
{{#*inline "coPilot"}}
<svg @click="{{_coPilotClick}}" focusable="false" width="44" role="presentation" aria-hidden="true" height="44" viewBox="-150 -150 300 300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="ui5-shellbar-coPilot">
<defs>
<linearGradient id="f" x1="0%" x2="100%" y1="100%" y2="0%"><stop offset="0%" stop-color="#c0d9f2" stop-opacity=".87"/><stop offset="80%" stop-color="#fff" stop-opacity=".87"/></linearGradient>
<linearGradient id="e" x1="0%" x2="100%" y1="100%" y2="0%"><stop offset="0%" stop-color="#b4d2ff" stop-opacity=".16"/><stop offset="80%" stop-color="#fff" stop-opacity=".16"/></linearGradient>
<linearGradient id="c" x1="0%" x2="100%" y1="100%" y2="0%"><stop offset="0%" stop-color="#b4d2ff" stop-opacity=".1"/><stop offset="80%" stop-color="#fff" stop-opacity=".1"/></linearGradient>
<linearGradient id="f" x1="0%" x2="100%" y1="100%" y2="0%"><stop offset="0%" class="ui5-shellbar-co-pilot-color1 ui5-shellbar-co-pilot-opaicty7"/><stop offset="80%" class="ui5-shellbar-co-pilot-color2 ui5-shellbar-co-pilot-opaicty7"/></linearGradient>
<linearGradient id="e" x1="0%" x2="100%" y1="100%" y2="0%"><stop offset="0%" class="ui5-shellbar-co-pilot-color1 ui5-shellbar-co-pilot-opaicty36"/><stop offset="80%" class="ui5-shellbar-co-pilot-color2 ui5-shellbar-co-pilot-opaicty36"/></linearGradient>
<linearGradient id="c" x1="0%" x2="100%" y1="100%" y2="0%"><stop offset="0%" class="ui5-shellbar-co-pilot-color1 ui5-shellbar-co-pilot-opaicty2"/><stop offset="80%" class="ui5-shellbar-co-pilot-color2 ui5-shellbar-co-pilot-opaicty2"/></linearGradient>
<path id="d" d="M98.158 0c.158 17.395-9.107 31.335-18.609 45.928-9.21 14.153-18.933 25.29-33.377 34.045C31.427 88.918 17.25 94.39 0 94.273c-17.155-.115-30.823-6.582-45.798-14.949-15.216-8.497-27.76-16.77-37.253-31.375C-92.668 33.158-98.487 17.571-97.179 0c1.233-16.978 12.691-29.086 21.044-43.957 8.456-15.059 12.272-32.152 26.873-41.367 14.76-9.322 31.83-7.68 49.262-6.77 16.897.88 31.86 3.06 46.42 11.693 14.452 8.568 23.18 20.866 32.26 34.976C88.05-30.91 98.014-17.277 98.157 0z">
<animate attributeName="d" values="{{coPilot.animationValues}}" dur="30s" repeatCount="indefinite"/>
<animateTransform attributeName="transform" type="scale" values="1;1.05;1.05;1.02;1" dur="0.15s" begin="a.mousedown" repeatCount="1" additive="sum"/>
Expand Down
65 changes: 39 additions & 26 deletions packages/fiori/src/themes/ShellBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
margin-left: 0.5rem;
border: none;
background: transparent;
outline-color: var(--sapShell_TextColor);
outline-color: var(--_ui5_shellbar_logo_outline_color);
color: var(--sapShell_TextColor);
box-sizing: border-box;
cursor: pointer;
Expand All @@ -38,40 +38,32 @@
text-overflow: initial;
}

.ui5-shellbar-menu-button,
.ui5-shellbar-button,
::slotted([ui5-button][slot="startButton"]) {
outline: none;
}

::slotted([ui5-button][slot="startButton"]:hover),
.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:hover,
.ui5-shellbar-button:hover,
.ui5-shellbar-image-button:hover {
background: var(--sapShell_Hover_Background);
}


::slotted([ui5-button][slot="startButton"]:hover),
.ui5-shellbar-button:hover,
.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:hover {
box-shadow: var(--_ui5_shellbar_button_box_shadow);
}

::slotted([ui5-button][slot="startButton"][active]),
.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:active,
.ui5-shellbar-button[active],
.ui5-shellbar-image-button:active {
background: var(--sapShell_Active_Background);
color: var(--sapShell_Active_TextColor);
color: var(--_ui5_shellbar_button_active_color);
}

::slotted([ui5-button][slot="startButton"][focused])::after,
.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:focus::after,
.ui5-shellbar-button[focused]::after,
.ui5-shellbar-image-button:focus::after {
content: "";
position: absolute;
width: calc(100% - 0.375rem);
height: calc(100% - 0.375rem);
border: 1px dotted var(--sapContent_ContrastFocusColor);
pointer-events: none;
left: 2px;
top: 2px;
z-index: 1;

.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:focus {
outline: var(--_ui5_shellbar_logo_outline);
outline-offset: var(--_ui5_shellbar_outline_offset);
}

slot[name="profile"] {
Expand Down Expand Up @@ -208,8 +200,8 @@ slot[name="profile"] {
}

.ui5-shellbar-logo:focus {
outline: 1px dotted var(--sapContent_ContrastFocusColor);
outline-offset: var(--_ui5_shellbar_logo_outline_offset);
outline: var(--_ui5_shellbar_logo_outline);
outline-offset: var(--_ui5_shellbar_outline_offset);
}

.ui5-shellbar-button {
Expand Down Expand Up @@ -349,7 +341,7 @@ slot[name="profile"] {
height: 1rem;
min-width: 1rem;
background: var(--sapContent_BadgeBackground);
color: var(--sapShell_TextColor);
color: var(--sapContent_BadgeTextColor);
top: 0.125rem;
left: 1.5rem;
padding: .25rem;
Expand Down Expand Up @@ -459,12 +451,13 @@ slot[name="profile"] {
.ui5-shellbar-copilot-wrapper:focus::after {
content: "";
position: absolute;
width: 100%;
height: calc(100% - 0.75rem);
border: 1px dotted var(--sapContent_ContrastFocusColor);
border: var(--_ui5_shellbar_logo_outline);
border-radius: var(--_ui5_shellbar_logo_outline_border_radius);
pointer-events: none;
left: 0;
top: 0.25rem;
right: 0;
z-index: 1;
}

Expand All @@ -477,6 +470,26 @@ slot[name="profile"] {
fill: var(--sapShellColor);
}

.ui5-shellbar-co-pilot-color1 {
stop-color: var(--_ui5_shellbar_copilot_stop_color1);
}

.ui5-shellbar-co-pilot-color2 {
stop-color: var(--_ui5_shellbar_copilot_stop_color2);
}

.ui5-shellbar-co-pilot-opacity7 {
stop-opacity: 0.7;
}

.ui5-shellbar-co-pilot-opacity36 {
stop-opacity: 0.36;
}

.ui5-shellbar-co-pilot-opacity2 {
stop-opacity: 0.2;
}

:host [dir="rtl"] ::slotted([ui5-button][slot="startButton"]) {
margin-left: 0.5rem;
margin-right: 0;
Expand Down
10 changes: 10 additions & 0 deletions packages/fiori/src/themes/base/ShellBar-parameters.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
:root {
--_ui5_shellbar_logo_outline_color: var(--sapContent_ContrastFocusColor);
--_ui5_shellbar_logo_outline: var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--_ui5_shellbar_logo_outline_color);
--_ui5_shellbar_outline_offset: -0.0625rem;
--_ui5_shellbar_button_box_shadow: none;
--_ui5_shellbar_button_active_color: var(--sapShell_Active_TextColor);
--_ui5_shellbar_logo_outline_border_radius: 0;
--_ui5_shellbar_copilot_stop_color1: #C0D9F2;
--_ui5_shellbar_copilot_stop_color2: #FFFFFF;
}
1 change: 1 addition & 0 deletions packages/fiori/src/themes/sap_belize/parameters-bundle.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@import "../base/IllustratedMessage-parameters.css";
@import "../base/Page-parameters.css";
@import "../base/ProductSwitchItem-parameters.css";
@import "../base/ShellBar-parameters.css";
@import "../base/TimelineItem-parameters.css";
@import "../base/UploadCollection-parameters.css";
@import "../base/WizardTab-parameters.css";
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@import "../base/IllustratedMessage-parameters.css";
@import "./Page-parameters.css";
@import "./ProductSwitchItem-parameters.css";
@import "../base/ShellBar-parameters.css";
@import "./TimelineItem-parameters.css";
@import "./UploadCollection-parameters.css";
@import "./WizardTab-parameters.css";
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@import "../base/IllustratedMessage-parameters.css";
@import "./Page-parameters.css";
@import "./ProductSwitchItem-parameters.css";
@import "../base/ShellBar-parameters.css";
@import "./TimelineItem-parameters.css";
@import "./UploadCollection-parameters.css";
@import "./WizardTab-parameters.css";
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@import "../base/IllustratedMessage-parameters.css";
@import "../base/Page-parameters.css";
@import "../base/ProductSwitchItem-parameters.css";
@import "../base/ShellBar-parameters.css";
@import "../base/TimelineItem-parameters.css";
@import "../base/UploadCollection-parameters.css";
@import "../base/WizardTab-parameters.css";
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@import "../base/IllustratedMessage-parameters.css";
@import "../base/Page-parameters.css";
@import "../base/ProductSwitchItem-parameters.css";
@import "../base/ShellBar-parameters.css";
@import "../base/TimelineItem-parameters.css";
@import "../base/UploadCollection-parameters.css";
@import "../base/WizardTab-parameters.css";
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@import "../base/IllustratedMessage-parameters.css";
@import "./Page-parameters.css";
@import "./ProductSwitchItem-parameters.css";
@import "../base/ShellBar-parameters.css";
@import "./TimelineItem-parameters.css";
@import "./UploadCollection-parameters.css";
@import "./WizardTab-parameters.css";
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@import "../base/IllustratedMessage-parameters.css";
@import "./Page-parameters.css";
@import "./ProductSwitchItem-parameters.css";
@import "../base/ShellBar-parameters.css";
@import "./TimelineItem-parameters.css";
@import "./UploadCollection-parameters.css";
@import "./WizardTab-parameters.css";
10 changes: 10 additions & 0 deletions packages/fiori/src/themes/sap_horizon/ShellBar-parameters.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
:root {
--_ui5_shellbar_logo_outline_color: var(--sapContent_FocusColor);
--_ui5_shellbar_logo_outline: var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--_ui5_shellbar_logo_outline_color);
--_ui5_shellbar_outline_offset: -0.125rem;
--_ui5_shellbar_button_box_shadow: inset var(--sapContent_Interaction_Shadow);
--_ui5_shellbar_button_active_color: var(--sapShell_TextColor);
--_ui5_shellbar_logo_outline_border_radius: var(--sapField_BorderCornerRadius);
--_ui5_shellbar_copilot_stop_color1: #0070F2;
--_ui5_shellbar_copilot_stop_color2: #EBF8FF;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@import "../base/IllustratedMessage-parameters.css";
@import "../base/Page-parameters.css";
@import "../base/ProductSwitchItem-parameters.css";
@import "./ShellBar-parameters.css";
@import "./TimelineItem-parameters.css";
@import "../base/UploadCollection-parameters.css";
@import "./WizardTab-parameters.css";
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@import "../base/IllustratedMessage-parameters.css";
@import "../base/Page-parameters.css";
@import "../base/ProductSwitchItem-parameters.css";
@import "../base/ShellBar-parameters.css";
@import "../base/TimelineItem-parameters.css";
@import "../base/UploadCollection-parameters.css";
@import "../base/WizardTab-parameters.css";
3 changes: 0 additions & 3 deletions packages/main/src/themes/base/sizes-parameters.css
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@
/* Responsive Popover */
--_ui5-responsive_popover_header_height: 2.75rem;

/* Shellbar */
--_ui5_shellbar_logo_outline_offset: -0.0625rem;

/* Side Navigation */
--ui5_side_navigation_item_height: 2.75rem;

Expand Down