Skip to content

Commit

Permalink
Merge pull request #2208 from epam/feature/Badge-final-design-review
Browse files Browse the repository at this point in the history
Feature/Badge final design review
  • Loading branch information
AlekseyManetov authored May 13, 2024
2 parents e98c036 + 9407654 commit bb5c1c7
Show file tree
Hide file tree
Showing 53 changed files with 154 additions and 42 deletions.
30 changes: 30 additions & 0 deletions epam-assets/theme/theme_electric.scss
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,28 @@
/* Badge */

.uui-badge.uui-color-white {
&.uui-fill-solid {
--uui-badge-bg-hover: var(--uui-neutral-30);
--uui-badge-border-hover: var(--uui-neutral-30);

.uui-count_indicator {
--uui-count_indicator-caption: var(--uui-neutral-80);
}
}

&.uui-fill-outline {
--uui-badge-bg: var(--uui-neutral-0);
--uui-badge-border: var(--uui-neutral-30);
--uui-badge-bg-hover: var(--uui-neutral-10);
--uui-badge-border-hover: var(--uui-neutral-30);
--uui-badge-caption: var(--uui-neutral-80);
--uui-badge-caption-hover: var(--uui-neutral-80);

.uui-count_indicator {
--uui-count_indicator-bg: color-mix(in srgb, var(--uui-badge-caption) 8%, transparent);
--uui-count_indicator-border: color-mix(in srgb, var(--uui-badge-caption) 40%, transparent);
--uui-count_indicator-caption: var(--uui-neutral-80);
}
}
}

Expand All @@ -270,6 +285,11 @@
--uui-badge-border: var(--uui-neutral-30);
--uui-badge-border-hover: var(--uui-neutral-40);
--uui-color-contrast: var(--uui-neutral-80);

.uui-count_indicator {
--uui-count_indicator-bg: var(--uui-neutral-0);
--uui-count_indicator-border: var(--uui-neutral-0);
}
}

&.uui-fill-outline {
Expand All @@ -284,6 +304,10 @@
&.uui-fill-solid {
--uui-badge-bg-hover: var(--uui-neutral-20);
--uui-badge-border-hover: var(--uui-neutral-20);

.uui-count_indicator {
--uui-count_indicator-caption: var(--uui-neutral-80);
}
}

&.uui-fill-outline {
Expand All @@ -293,6 +317,12 @@
--uui-badge-border-hover: var(--uui-neutral-30);
--uui-badge-caption: var(--uui-neutral-95);
--uui-badge-caption-hover: var(--uui-neutral-80);

.uui-count_indicator {
--uui-count_indicator-bg: color-mix(in srgb, var(--uui-badge-caption) 8%, transparent);
--uui-count_indicator-border: color-mix(in srgb, var(--uui-badge-caption) 40%, transparent);
--uui-count_indicator-caption: var(--uui-neutral-80);
}
}
}

Expand Down
35 changes: 31 additions & 4 deletions epam-assets/theme/theme_loveship.scss
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,14 @@
/* Badge */

.uui-badge.uui-color-white {
--uui-badge-bg-hover: var(--uui-neutral-30);
--uui-badge-border-hover: var(--uui-neutral-30);
&.uui-fill-solid {
--uui-badge-bg-hover: var(--uui-neutral-30);
--uui-badge-border-hover: var(--uui-neutral-30);

.uui-count_indicator {
--uui-count_indicator-caption: var(--uui-neutral-80);
}
}

&.uui-fill-outline {
--uui-badge-bg: var(--uui-neutral-0);
Expand All @@ -313,6 +319,12 @@
--uui-badge-border-hover: var(--uui-neutral-60);
--uui-badge-caption: var(--uui-neutral-80);
--uui-badge-caption-hover: var(--uui-neutral-80);

.uui-count_indicator {
--uui-count_indicator-bg: color-mix(in srgb, var(--uui-badge-caption) 8%, transparent);
--uui-count_indicator-border: color-mix(in srgb, var(--uui-badge-caption) 40%, transparent);
--uui-count_indicator-caption: var(--uui-neutral-80);
}
}
}

Expand All @@ -324,6 +336,11 @@
--uui-badge-border: var(--uui-neutral-30);
--uui-badge-border-hover: var(--uui-neutral-40);
--uui-color-contrast: var(--uui-neutral-80);

.uui-count_indicator {
--uui-count_indicator-bg: var(--uui-neutral-0);
--uui-count_indicator-border: var(--uui-neutral-0);
}
}

&.uui-fill-outline {
Expand All @@ -339,15 +356,25 @@
&.uui-fill-solid {
--uui-badge-bg-hover: var(--uui-neutral-20);
--uui-badge-border-hover: var(--uui-neutral-20);

.uui-count_indicator {
--uui-count_indicator-caption: var(--uui-neutral-80);
}
}

&.uui-fill-outline {
--uui-badge-bg: var(--uui-neutral-10);
--uui-badge-bg-hover: var(--uui-neutral-20);
--uui-badge-border: var(--uui-neutral-30);
--uui-badge-border-hover: var(--uui-neutral-30);
--uui-badge-caption: var(--uui-neutral-80);
--uui-badge-caption-hover: var(--uui-neutral-80);
--uui-badge-caption: var(--uui-neutral-70);
--uui-badge-caption-hover: var(--uui-neutral-70);

.uui-count_indicator {
--uui-count_indicator-bg: color-mix(in srgb, var(--uui-badge-caption) 8%, transparent);
--uui-count_indicator-border: color-mix(in srgb, var(--uui-badge-caption) 40%, transparent);
--uui-count_indicator-caption: var(--uui-neutral-80);
}
}
}

Expand Down
77 changes: 41 additions & 36 deletions epam-assets/theme/theme_loveship_dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
.uui-badge {
&.uui-fill-outline {
.uui-count_indicator {
--uui-count_indicator-bg: var(--uui-neutral-70);
--uui-count_indicator-bg: var(--uui-neutral-80);
--uui-count_indicator-border: var(--uui-neutral-40);
--uui-count_indicator-caption: var(--uui-neutral-10);
}
Expand All @@ -349,18 +349,23 @@
.uui-badge.uui-color-neutral,
.uui-badge.uui-color-night300 {
&.uui-fill-solid {
--uui-badge-bg: var(--uui-neutral-40);
--uui-badge-bg-hover: var(--uui-neutral-30);
--uui-badge-border: var(--uui-neutral-40);
--uui-badge-border-hover: var(--uui-neutral-30);
--uui-color-contrast: var(--uui-neutral-5);
--uui-badge-caption: var(--uui-neutral-0);
--uui-badge-bg: var(--uui-neutral-30);
--uui-badge-border: var(--uui-neutral-30);
--uui-badge-bg-hover: var(--uui-neutral-40);
--uui-badge-border-hover: var(--uui-neutral-40);
--uui-badge-caption: var(--uui-neutral-5);

.uui-count_indicator {
--uui-count_indicator-bg: var(--uui-neutral-0);
--uui-count_indicator-border: var(--uui-neutral-0);
--uui-count_indicator-caption: var(--uui-neutral-80);
}
}

&.uui-fill-outline {
--uui-badge-bg: var(--uui-neutral-30);
--uui-badge-bg-hover: var(--uui-neutral-40);
--uui-badge-border: var(--uui-neutral-20);
--uui-badge-bg: var(--uui-neutral-60);
--uui-badge-border: var(--uui-neutral-30);
--uui-badge-bg-hover: var(--uui-neutral-50);
--uui-badge-border-hover: var(--uui-neutral-30);
--uui-badge-caption: var(--uui-neutral-0);
--uui-badge-caption-hover: var(--uui-neutral-5);
Expand All @@ -373,8 +378,8 @@
--uui-badge-border: var(--uui-neutral-30);
--uui-badge-bg-hover: var(--uui-neutral-10);
--uui-badge-border-hover: var(--uui-neutral-30);
--uui-badge-caption: var(--uui-neutral-80);
--uui-badge-caption-hover: var(--uui-neutral-80);
--uui-badge-caption: var(--uui-neutral-70);
--uui-badge-caption-hover: var(--uui-neutral-70);

.uui-count_indicator {
--uui-count_indicator-bg: color-mix(in srgb, var(--uui-neutral-100) 8%, transparent);
Expand All @@ -385,46 +390,46 @@
}

.uui-badge.uui-color-night100 {
&.uui-fill-solid {
--uui-badge-bg: var(--uui-neutral-40);
--uui-badge-bg-hover: var(--uui-neutral-30);
--uui-badge-border: var(--uui-neutral-40);
--uui-badge-border-hover: var(--uui-neutral-30);
--uui-badge-caption: var(--white);
--uui-badge-caption-hover: var(--white);
.uui-count_indicator {
--uui-count_indicator-bg: color-mix(in srgb, var(--uui-neutral-100) 8%, transparent);
--uui-count_indicator-border: color-mix(in srgb, var(--uui-neutral-100) 40%, transparent);
--uui-count_indicator-caption: var(--uui-neutral-80);
}

.uui-count_indicator {
--uui-count_indicator-bg: var(--uui-neutral-50);
--uui-count_indicator-border: var(--uui-neutral-50);
--uui-count_indicator-caption: var(--uui-neutral-10);
}
&.uui-fill-solid {
--uui-badge-bg: var(--uui-neutral-10);
--uui-badge-border: var(--uui-neutral-10);
--uui-badge-bg-hover: var(--uui-neutral-20);
--uui-badge-border-hover: var(--uui-neutral-20);
--uui-badge-caption: var(--uui-neutral-70);
--uui-badge-caption-hover: var(--uui-neutral-70);
}

&.uui-fill-outline {
--uui-badge-bg: color-mix(in srgb, var(--white) 20%, transparent);
--uui-badge-bg-hover: color-mix(in srgb, var(--white) 25%, transparent);
--uui-badge-border: var(--uui-neutral-20);
--uui-badge-border-hover: var(--uui-neutral-20);
--uui-badge-caption: var(--uui-neutral-5);
--uui-badge-caption-hover: var(--uui-neutral-5);
--uui-badge-bg: var(--uui-neutral-10);
--uui-badge-border: var(--uui-neutral-30);
--uui-badge-bg-hover: var(--uui-neutral-20);
--uui-badge-border-hover: var(--uui-neutral-30);
--uui-badge-caption: var(--uui-neutral-70);
--uui-badge-caption-hover: var(--uui-neutral-70);
}
}

.uui-badge.uui-color-night600 {
&.uui-fill-solid {
--uui-badge-bg: var(--uui-neutral-80);
--uui-badge-bg-hover: var(--uui-neutral-70);
--uui-badge-border: var(--uui-neutral-80);
--uui-badge-border-hover: var(--uui-neutral-70);
--uui-badge-bg: var(--uui-neutral-60);
--uui-badge-border: var(--uui-neutral-60);
--uui-badge-bg-hover: var(--uui-neutral-50);
--uui-badge-border-hover: var(--uui-neutral-50);
--uui-badge-caption: var(--white);
--uui-badge-caption-hover: var(--white);
}

&.uui-fill-outline {
--uui-badge-bg: var(--uui-neutral-80);
--uui-badge-border: var(--uui-neutral-60);
--uui-badge-bg-hover: var(--uui-neutral-70);
--uui-badge-border: var(--uui-neutral-30);
--uui-badge-border-hover: var(--uui-neutral-30);
--uui-badge-border-hover: var(--uui-neutral-60);
--uui-badge-caption: var(--uui-neutral-5);
--uui-badge-caption-hover: var(--uui-neutral-5);
}
Expand Down
31 changes: 29 additions & 2 deletions epam-assets/theme/theme_promo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,14 @@
/* Badge */

.uui-badge.uui-color-white {
--uui-badge-bg-hover: var(--uui-neutral-30);
--uui-badge-border-hover: var(--uui-neutral-30);
&.uui-fill-solid {
--uui-badge-bg-hover: var(--uui-neutral-30);
--uui-badge-border-hover: var(--uui-neutral-30);

.uui-count_indicator {
--uui-count_indicator-caption: var(--uui-neutral-80);
}
}

&.uui-fill-outline {
--uui-badge-bg: var(--uui-neutral-0);
Expand All @@ -303,6 +309,12 @@
--uui-badge-border-hover: var(--uui-neutral-60);
--uui-badge-caption: var(--uui-neutral-80);
--uui-badge-caption-hover: var(--uui-neutral-80);

.uui-count_indicator {
--uui-count_indicator-bg: color-mix(in srgb, var(--uui-badge-caption) 8%, transparent);
--uui-count_indicator-border: color-mix(in srgb, var(--uui-badge-caption) 40%, transparent);
--uui-count_indicator-caption: var(--uui-neutral-80);
}
}
}

Expand All @@ -314,6 +326,11 @@
--uui-badge-border: var(--uui-neutral-30);
--uui-badge-border-hover: var(--uui-neutral-40);
--uui-color-contrast: var(--uui-neutral-80);

.uui-count_indicator {
--uui-count_indicator-bg: var(--uui-neutral-0);
--uui-count_indicator-border: var(--uui-neutral-0);
}
}

&.uui-fill-outline {
Expand All @@ -329,6 +346,10 @@
&.uui-fill-solid {
--uui-badge-bg-hover: var(--uui-neutral-20);
--uui-badge-border-hover: var(--uui-neutral-20);

.uui-count_indicator {
--uui-count_indicator-caption: var(--uui-neutral-80);
}
}

&.uui-fill-outline {
Expand All @@ -338,6 +359,12 @@
--uui-badge-border-hover: var(--uui-neutral-30);
--uui-badge-caption: var(--uui-neutral-80);
--uui-badge-caption-hover: var(--uui-neutral-80);

.uui-count_indicator {
--uui-count_indicator-bg: color-mix(in srgb, var(--uui-badge-caption) 8%, transparent);
--uui-count_indicator-border: color-mix(in srgb, var(--uui-badge-caption) 40%, transparent);
--uui-count_indicator-caption: var(--uui-neutral-80);
}
}
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions uui/components/widgets/Badge.module.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
@use '../../assets/styles/index' as *;
@use 'sass:math';

@mixin scalable-icon-size($size, $additionalClass: '') {
$striped-size: strip-unit($size);

#{$additionalClass}:global(.uui-icon) {
svg {
@if ($striped-size == 18) {
height: 12px;
} @else if ($striped-size == 24) {
height: 18px;
} @else if ($striped-size == 30) {
height: 18px;
} @else if ($striped-size == 36) {
height: 18px;
} @else if ($striped-size == 42) {
height: 24px;
} @else if ($striped-size == 48) {
height: 24px;
}
width: inherit;
}
}
}

@mixin badge-layout($size, $borderWidth) {
min-height: $size;
min-width: $size;
Expand Down

0 comments on commit bb5c1c7

Please sign in to comment.