From 045ad25a3225af357f53ab05dae4d38916fa4815 Mon Sep 17 00:00:00 2001 From: Inna Atanasova Date: Wed, 18 Sep 2024 10:05:52 -0400 Subject: [PATCH] fix(styles): update examples using Rating Indicator [ci visual] --- packages/styles/src/facet.scss | 1 + packages/styles/src/rating-indicator.scss | 6 +- .../card/extended-header.example.html | 57 +++--- .../stories/Dev/facets/combined.example.html | 54 ++++-- .../stories/Dev/facets/facets.stories.js | 11 -- .../Dev/facets/object-page.example.html | 56 ++++-- .../Dev/facets/rating-indicator.example.html | 23 --- .../dynamic-page/with-facets.example.html | 56 ++++-- packages/theming-preview/src/icon.html | 163 ++++++++++++------ 9 files changed, 261 insertions(+), 166 deletions(-) delete mode 100644 packages/styles/stories/Dev/facets/rating-indicator.example.html diff --git a/packages/styles/src/facet.scss b/packages/styles/src/facet.scss index 52465d32f2..eb980608b6 100644 --- a/packages/styles/src/facet.scss +++ b/packages/styles/src/facet.scss @@ -46,6 +46,7 @@ $block: #{$fd-namespace}-facet; .#{$block}__container { flex-direction: column; + margin-block: 0; } .#{$block}__rating-container { diff --git a/packages/styles/src/rating-indicator.scss b/packages/styles/src/rating-indicator.scss index 8652eef91c..ed0968e623 100644 --- a/packages/styles/src/rating-indicator.scss +++ b/packages/styles/src/rating-indicator.scss @@ -66,7 +66,7 @@ $block: #{$fd-namespace}-rating-indicator; &__list { @include fd-reset(); - + @include fd-inline-flex-vertical-center() { gap: var(--ratingIndicator_Item_Spacing); }; @@ -94,11 +94,11 @@ $block: #{$fd-namespace}-rating-indicator; position: absolute; &:first-child { - clip-path: inset(0 50% 0 0); + clip-path: inset(0 48% 0 0); left: 0; @include fd-rtl() { - clip-path: inset(0 0 0 50%); + clip-path: inset(0 0 0 48%); left: auto; right: 0; } diff --git a/packages/styles/stories/Components/card/extended-header.example.html b/packages/styles/stories/Components/card/extended-header.example.html index 572d8968d9..2b87b9e727 100644 --- a/packages/styles/stories/Components/card/extended-header.example.html +++ b/packages/styles/stories/Components/card/extended-header.example.html @@ -186,28 +186,45 @@
-
-
- - - - - - - - - - - - - - - - - +
+
+
- (205) + (2.5 of 5)
+
diff --git a/packages/styles/stories/Dev/facets/combined.example.html b/packages/styles/stories/Dev/facets/combined.example.html index 7749b7211b..53cceefddd 100644 --- a/packages/styles/stories/Dev/facets/combined.example.html +++ b/packages/styles/stories/Dev/facets/combined.example.html @@ -50,26 +50,44 @@

Pricin

-

Average User Rating

-

6 reviews

+ Average User Rating
-
- - - - - - - - - - - - - - +
+
- (2 of 5) + (2.5 of 5)
diff --git a/packages/styles/stories/Dev/facets/facets.stories.js b/packages/styles/stories/Dev/facets/facets.stories.js index 387d5e0b75..d65da241b7 100644 --- a/packages/styles/stories/Dev/facets/facets.stories.js +++ b/packages/styles/stories/Dev/facets/facets.stories.js @@ -1,7 +1,6 @@ import objectPageMobileExampleHtml from "./object-page-mobile.example.html?raw"; import objectPageExampleHtml from "./object-page.example.html?raw"; import imageFacetExampleHtml from "./image-facet.example.html?raw"; -import ratingIndicatorExampleHtml from "./rating-indicator.example.html?raw"; import formFacetLinkExampleHtml from "./form-facet-link.example.html?raw"; import formFacetExampleHtml from "./form-facet.example.html?raw"; import keyValueExampleHtml from "./key-value.example.html?raw"; @@ -71,16 +70,6 @@ FormFacetLink.parameters = { } } }; -export const RatingIndicator = () => ratingIndicatorExampleHtml; -RatingIndicator.storyName = 'Rating Indicator Facet'; -RatingIndicator.parameters = { - docs: { - description: { - story: `The Rating Indicator Facet displays a **Rating Indicator**. It consists of a mandatory title, optional supplementary texts - like a subtitle or a dynamic text, and the rating indicator.` - } - } -}; export const ImageFacet = () => imageFacetExampleHtml; ImageFacet.storyName = 'Image/Avatar Facet'; ImageFacet.parameters = { diff --git a/packages/styles/stories/Dev/facets/object-page.example.html b/packages/styles/stories/Dev/facets/object-page.example.html index 4ebce5379f..25498cdc01 100644 --- a/packages/styles/stories/Dev/facets/object-page.example.html +++ b/packages/styles/stories/Dev/facets/object-page.example.html @@ -130,27 +130,45 @@

Prici

-
-

Average User Rating

-

6 reviews

+
+
Average User Rating
-
- - - - - - - - - - - - - - +
+
- (2 of 5) + (2.5 of 5)
diff --git a/packages/styles/stories/Dev/facets/rating-indicator.example.html b/packages/styles/stories/Dev/facets/rating-indicator.example.html deleted file mode 100644 index 7e20cfcce4..0000000000 --- a/packages/styles/stories/Dev/facets/rating-indicator.example.html +++ /dev/null @@ -1,23 +0,0 @@ -
-

Average User Rating

-

6 reviews

-
-
- - - - - - - - - - - - - - -
- (4 of 5) -
-
diff --git a/packages/styles/stories/Layouts/dynamic-page/with-facets.example.html b/packages/styles/stories/Layouts/dynamic-page/with-facets.example.html index 5f7f577467..d8c1e8023e 100644 --- a/packages/styles/stories/Layouts/dynamic-page/with-facets.example.html +++ b/packages/styles/stories/Layouts/dynamic-page/with-facets.example.html @@ -145,27 +145,45 @@

Prici

-
-

Average User Rating

-

6 reviews

+
+ Average User Rating
-
- - - - - - - - - - - - - - +
+
- (2 of 5) + (2.5 of 5)
diff --git a/packages/theming-preview/src/icon.html b/packages/theming-preview/src/icon.html index 3549f63657..9645a22c80 100644 --- a/packages/theming-preview/src/icon.html +++ b/packages/theming-preview/src/icon.html @@ -92,64 +92,121 @@

Rating Indicator

-
-
- - - - - - - - - - - - - - +
+
+
- (2 of 5) + (2.5 of 5)
-
-
-
- - - - - - - - - - - - - - + +
+
+
- (2 of 5) + (2.5 of 5)
-
-
-
- - - - - - - - - - - - - - + +
+
+
- (2 of 5) + (2.5 of 5)