Skip to content

Commit

Permalink
Merge pull request #1727 from epam/bugfix/CountIndicator-fixed-gray
Browse files Browse the repository at this point in the history
[CountIndicator, Tag]: fixed gray color
  • Loading branch information
AlekseyManetov authored Nov 3, 2023
2 parents da159af + ce59f61 commit 27bc5ff
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 20 deletions.
2 changes: 1 addition & 1 deletion app/src/docs/_examples/countIndicator/Basic.example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function BasicCountIndicatorExample() {
const getCountIndicator = (item: CountIndicatorProps) => {
if (item.color === 'white') {
return (
<div style={ { backgroundColor: '#1D1E26', display: 'flex', justifyItems: 'center' } }>
<div style={ { backgroundColor: 'var(--uui-neutral-70)', display: 'flex', justifyItems: 'center' } }>
<CountIndicator caption={ item.caption } color={ item.color } size={ item.size } />
</div>
);
Expand Down
5 changes: 4 additions & 1 deletion epam-assets/theme/theme_electric.scss
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,10 @@
.uui-count_indicator.uui-color-neutral {
--uui-count_indicator-bg: var(--uui-neutral-30);
--uui-count_indicator-border: var(--uui-neutral-30);
--uui-color-contrast: var(--uui-neutral-80);
}

.uui-count_indicator:is(.uui-color-neutral, .uui-color-white, .uui-color-sun, .uui-color-warning) {
--uui-count_indicator-caption: var(--uui-neutral-70);
}

/* Status Indicator */
Expand Down
5 changes: 4 additions & 1 deletion epam-assets/theme/theme_loveship.scss
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,10 @@
.uui-count_indicator.uui-color-neutral {
--uui-count_indicator-bg: var(--uui-neutral-30);
--uui-count_indicator-border: var(--uui-neutral-30);
--uui-count_indicator-caption: var(--uui-neutral-80);
}

.uui-count_indicator:is(.uui-color-gray, .uui-color-neutral, .uui-color-white, .uui-color-sun, .uui-color-warning) {
--uui-count_indicator-caption: var(--uui-neutral-70);
}

/* Status Indicator */
Expand Down
20 changes: 11 additions & 9 deletions epam-assets/theme/theme_loveship_dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -715,19 +715,15 @@

/* CountIndicator */

.uui-count_indicator.uui-color-neutral,
.uui-count_indicator.uui-color-info,
.uui-count_indicator.uui-color-blue,
.uui-count_indicator.uui-color-grass,
.uui-count_indicator.uui-color-success,
.uui-count_indicator.uui-color-critical,
.uui-count_indicator.uui-color-red,
.uui-count_indicator.uui-color-warning,
.uui-count_indicator.uui-color-amber {
.uui-count_indicator:is(.uui-color-neutral, .uui-color-info, .uui-color-blue, .uui-color-grass, .uui-color-success, .uui-color-critical, .uui-color-red, .uui-color-warning, .uui-color-amber) {
--uui-count_indicator-bg: var(--uui-color-60);
--uui-count_indicator-border: var(--uui-color-60);
}

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

/* Status Indicator */

.uui-status_indicator.uui-color-white.uui-fill-outline {
Expand Down Expand Up @@ -801,6 +797,12 @@
--uui-text-font: var(--uui-font);
--uui-text-font-weight: 300;
}

/* Tag */

.uui-tag.uui-color-neutral {
--uui-tag-bg: var(--uui-neutral-40);
}
}

.uui-theme-loveship_dark {
Expand Down
7 changes: 5 additions & 2 deletions epam-assets/theme/theme_promo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -615,13 +615,16 @@
--uui-tooltip-text: var(--white);
}

/* Informer */
/* CountIndicator */

.uui-count_indicator.uui-color-gray,
.uui-count_indicator.uui-color-neutral {
--uui-count_indicator-bg: var(--uui-neutral-30);
--uui-count_indicator-border: var(--uui-neutral-30);
--uui-count_indicator-caption: var(--uui-neutral-80);
}

.uui-count_indicator:is(.uui-color-gray, .uui-color-neutral, .uui-color-white, .uui-color-amber, .uui-color-warning) {
--uui-count_indicator-caption: var(--uui-neutral-70);
}

/* Status Indicator */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ exports[`PickerInput should render with maximum props 1`] = `
className="body multiline"
>
<button
className="container uui-button-box uui-enabled size-42 root uui-color-gray uui-tag"
className="container uui-button-box uui-enabled size-42 root uui-color-neutral uui-tag"
onClick={[Function]}
tabIndex={-1}
type="button"
Expand All @@ -427,7 +427,7 @@ exports[`PickerInput should render with maximum props 1`] = `
</div>
</button>
<button
className="container uui-button-box uui-enabled size-42 root uui-color-gray uui-tag"
className="container uui-button-box uui-enabled size-42 root uui-color-neutral uui-tag"
onClick={[Function]}
tabIndex={-1}
type="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exports[`PickerToggler should render with maximum props 1`] = `
className="body multiline"
>
<button
className="container uui-button-box uui-enabled size-42 root uui-color-gray uui-tag"
className="container uui-button-box uui-enabled size-42 root uui-color-neutral uui-tag"
onClick={[Function]}
tabIndex={-1}
type="button"
Expand Down
2 changes: 1 addition & 1 deletion uui/components/widgets/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function applyTagMods(mods: TagMods) {
return [
css['size-' + (mods.size || defaultSize)],
css.root,
'uui-color-gray',
'uui-color-neutral',
'uui-tag',
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`Tag should be rendered correctly 1`] = `
<button
className="container uui-button-box uui-enabled size-36 root uui-color-gray uui-tag"
className="container uui-button-box uui-enabled size-36 root uui-color-neutral uui-tag"
onClick={[Function]}
tabIndex={-1}
type="button"
Expand All @@ -11,7 +11,7 @@ exports[`Tag should be rendered correctly 1`] = `

exports[`Tag should be rendered correctly with props 1`] = `
<button
className="container uui-button-box uui-enabled -clickable size-36 root uui-color-gray uui-tag"
className="container uui-button-box uui-enabled -clickable size-36 root uui-color-neutral uui-tag"
onClick={[Function]}
tabIndex={0}
type="button"
Expand Down

0 comments on commit 27bc5ff

Please sign in to comment.