-
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.
fix(): refactor Rating Indicator [ci visual]
- Loading branch information
1 parent
53231b3
commit cd6e955
Showing
20 changed files
with
1,333 additions
and
2,616 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
12 changes: 1 addition & 11 deletions
12
packages/styles/src/theming/common/rating-indicator/_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 |
---|---|---|
@@ -1,15 +1,5 @@ | ||
@use "sass:map"; | ||
|
||
:root { | ||
/* Default mode */ | ||
--fdRating_Indicator_Selected_Hover_Opacity: 0.9; | ||
|
||
/* Display Only mode */ | ||
--fdRating_Indicator_Display_Only_Selected_Color: var(--sapTextColor); | ||
|
||
/* Disabled mode */ | ||
--fdRating_Indicator_Disabled_Selected_Color: var(--sapContent_RatedColor); | ||
--fdRating_Indicator_Disabled_Unselected_Color: var(--sapContent_UnratedColor); | ||
--fdRating_Indicator_Disabled_Control_Opacity: 0.4; | ||
--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio: 1; | ||
--fdRatingIndicator_Container_Border_Radius: 0; | ||
} |
15 changes: 0 additions & 15 deletions
15
packages/styles/src/theming/common/rating-indicator/_sap_fiori_hc.scss
This file was deleted.
Oops, something went wrong.
14 changes: 1 addition & 13 deletions
14
packages/styles/src/theming/common/rating-indicator/_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 |
---|---|---|
@@ -1,17 +1,5 @@ | ||
@use "sass:map"; | ||
|
||
:root { | ||
/* Default mode */ | ||
--fdRating_Indicator_Selected_Hover_Opacity: 0.9; | ||
|
||
/* Display Only mode */ | ||
--fdRating_Indicator_Display_Only_Selected_Color: var(--sapTextColor); | ||
|
||
/* Disabled mode */ | ||
--fdRating_Indicator_Disabled_Selected_Color: var(--sapContent_RatedColor); | ||
--fdRating_Indicator_Disabled_Unselected_Color: var(--sapContent_UnratedColor); | ||
--fdRating_Indicator_Disabled_Control_Opacity: 0.4; | ||
--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio: 0.75; | ||
--fdRating_Indicator_Border_Radius: 0.25rem; | ||
--fdRating_Indicator_Focus_Outline_Offset: 0.125rem; | ||
--fdRatingIndicator_Container_Border_Radius: 0.25rem; | ||
} |
8 changes: 0 additions & 8 deletions
8
packages/styles/src/theming/common/rating-indicator/_sap_horizon_hc.scss
This file was deleted.
Oops, something went wrong.
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
203 changes: 203 additions & 0 deletions
203
packages/styles/stories/Components/rating-indicator/basic.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,203 @@ | ||
<h4>Default</h4> | ||
<div class="fd-rating-indicator"> | ||
<div | ||
class="fd-rating-indicator__container" | ||
title="Rating" | ||
tabindex="0" | ||
role="slider" | ||
aria-orientation="horizontal" | ||
aria-roledescription="Rating Indicator" | ||
aria-valuemin="0" | ||
aria-valuenow="2.5" | ||
aria-valuemax="5" | ||
aria-valuetext="2.5 of 5" | ||
> | ||
<ul class="fd-rating-indicator__list" aria-hidden="true"> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
<span class="sap-icon sap-icon--unfavorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--unfavorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
<span class="sap-icon sap-icon--unfavorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--unfavorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
<span class="sap-icon sap-icon--unfavorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
</li> | ||
</ul> | ||
</div> | ||
<span class="fd-rating-indicator__dynamic-text">(2.5 of 5)</span> | ||
</div> | ||
|
||
<br> | ||
<h4>Hover</h4> | ||
<div class="fd-rating-indicator is-hover"> | ||
<div | ||
class="fd-rating-indicator__container" | ||
title="Rating" | ||
tabindex="0" | ||
role="slider" | ||
aria-orientation="horizontal" | ||
aria-roledescription="Rating Indicator" | ||
aria-valuemin="0" | ||
aria-valuenow="2.5" | ||
aria-valuemax="5" | ||
aria-valuetext="2.5 of 5" | ||
> | ||
<ul class="fd-rating-indicator__list" aria-hidden="true"> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
<span class="sap-icon sap-icon--unfavorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--unfavorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
<span class="sap-icon sap-icon--unfavorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--unfavorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
<span class="sap-icon sap-icon--unfavorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
</li> | ||
</ul> | ||
</div> | ||
<span class="fd-rating-indicator__dynamic-text">(2.5 of 5)</span> | ||
</div> | ||
|
||
<br> | ||
<h4>Focus</h4> | ||
<div class="fd-rating-indicator"> | ||
<div | ||
class="fd-rating-indicator__container is-focus" | ||
title="Rating" | ||
tabindex="0" | ||
role="slider" | ||
aria-orientation="horizontal" | ||
aria-roledescription="Rating Indicator" | ||
aria-valuemin="0" | ||
aria-valuenow="2.5" | ||
aria-valuemax="5" | ||
aria-valuetext="2.5 of 5" | ||
> | ||
<ul class="fd-rating-indicator__list" aria-hidden="true"> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
<span class="sap-icon sap-icon--unfavorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--unfavorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
<span class="sap-icon sap-icon--unfavorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--unfavorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
<span class="sap-icon sap-icon--unfavorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
</li> | ||
</ul> | ||
</div> | ||
<span class="fd-rating-indicator__dynamic-text">(2.5 of 5)</span> | ||
</div> | ||
|
||
<br> | ||
<h4>Read Only</h4> | ||
<div class="fd-rating-indicator is-readonly"> | ||
<div | ||
class="fd-rating-indicator__container" | ||
title="Rating" | ||
tabindex="0" | ||
role="slider" | ||
aria-orientation="horizontal" | ||
aria-roledescription="Rating Indicator" | ||
aria-valuemin="0" | ||
aria-valuenow="2.5" | ||
aria-valuemax="5" | ||
aria-valuetext="2.5 of 5" | ||
> | ||
<ul class="fd-rating-indicator__list" aria-hidden="true"> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
<span class="sap-icon sap-icon--unfavorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
</li> | ||
</ul> | ||
</div> | ||
<span class="fd-rating-indicator__dynamic-text">(2.5 of 5)</span> | ||
</div> | ||
|
||
<br> | ||
<h4>Disabled</h4> | ||
<div class="fd-rating-indicator is-disabled"> | ||
<div | ||
class="fd-rating-indicator__container" | ||
title="Rating" | ||
tabindex="0" | ||
role="slider" | ||
aria-orientation="horizontal" | ||
aria-roledescription="Rating Indicator" | ||
aria-valuemin="0" | ||
aria-valuenow="2.5" | ||
aria-valuemax="5" | ||
aria-valuetext="2.5 of 5" | ||
> | ||
<ul class="fd-rating-indicator__list" aria-hidden="true"> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--selected"></span> | ||
<span class="sap-icon sap-icon--unfavorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
</li> | ||
<li class="fd-rating-indicator__item"> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
<span class="sap-icon sap-icon--favorite fd-rating-indicator__icon fd-rating-indicator__icon--unselected"></span> | ||
</li> | ||
</ul> | ||
</div> | ||
<span class="fd-rating-indicator__dynamic-text">(2.5 of 5)</span> | ||
</div> |
39 changes: 0 additions & 39 deletions
39
packages/styles/stories/Components/rating-indicator/custom-icons.example.html
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.