Skip to content

Commit

Permalink
Language label redesign - admin listings
Browse files Browse the repository at this point in the history
  • Loading branch information
albinazs committed Jun 4, 2024
1 parent 252bae9 commit 5373c8b
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 4 deletions.
12 changes: 8 additions & 4 deletions client/scss/components/_status-tag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@
}

&--label {
color: theme('colors.text-context');
background: theme('colors.border-button-small-outline-default');
border: theme('colors.border-button-small-outline-default');
font-weight: 500;
padding: theme('spacing.[0.5]') theme('spacing.2');
color: theme('colors.text-status-label');
font-weight: theme('fontWeight.medium');
// stylelint-disable-next-line property-disallowed-list
text-transform: capitalize;
background: theme('colors.surface-status-label');
border: 1px solid theme('colors.text-status-label');
border-radius: theme('borderRadius.xxl');
}
}

Expand Down
24 changes: 24 additions & 0 deletions client/src/tokens/colorThemes.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ const light = [
textUtility: 'w-text-surface-button-critical-hover',
cssVariable: '--w-color-surface-button-critical-hover',
},
'surface-status-label': {
value: 'var(--w-color-info-50)',
bgUtility: 'w-bg-surface-status-label',
textUtility: 'w-text-surface-status-label',
cssVariable: '--w-color-surface-status-label',
},
},
},
{
Expand Down Expand Up @@ -189,6 +195,12 @@ const light = [
textUtility: 'w-text-text-button-critical-outline-hover',
cssVariable: '--w-color-text-button-critical-outline-hover',
},
'text-status-label': {
value: 'var(--w-color-info-100)',
bgUtility: 'w-bg-text-status-label',
textUtility: 'w-text-text-status-label',
cssVariable: '--w-color-text-status-label',
},
},
},
{
Expand Down Expand Up @@ -358,6 +370,12 @@ const dark = [
textUtility: 'w-text-surface-button-critical-hover',
cssVariable: '--w-color-surface-button-critical-hover',
},
'surface-status-label': {
value: 'var(--w-color-grey-600)',
bgUtility: 'w-bg-surface-status-label',
textUtility: 'w-text-surface-status-label',
cssVariable: '--w-color-surface-status-label',
},
},
},
{
Expand Down Expand Up @@ -447,6 +465,12 @@ const dark = [
textUtility: 'w-text-text-button-critical-outline-hover',
cssVariable: '--w-color-text-button-critical-outline-hover',
},
'text-status-label': {
value: 'var(--w-color-info-75)',
bgUtility: 'w-bg-text-status-label',
textUtility: 'w-text-text-status-label',
cssVariable: '--w-color-text-status-label',
},
},
},
{
Expand Down
8 changes: 8 additions & 0 deletions client/src/tokens/colorVariables.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ describe('generateColorVariables', () => {
"--w-color-info-50-hue": "calc(var(--w-color-info-125-hue) + 2.2)",
"--w-color-info-50-lightness": "calc(var(--w-color-info-125-lightness) + 65.9%)",
"--w-color-info-50-saturation": "calc(var(--w-color-info-125-saturation) + 15.1%)",
"--w-color-info-75": "hsl(var(--w-color-info-75-hue) var(--w-color-info-75-saturation) var(--w-color-info-75-lightness))",
"--w-color-info-75-hue": "calc(var(--w-color-info-125-hue) + 0.4)",
"--w-color-info-75-lightness": "calc(var(--w-color-info-125-lightness) + 36.3%)",
"--w-color-info-75-saturation": "calc(var(--w-color-info-125-saturation) - 27.4%)",
"--w-color-positive-100": "hsl(var(--w-color-positive-100-hue) var(--w-color-positive-100-saturation) var(--w-color-positive-100-lightness))",
"--w-color-positive-100-hue": "162.1",
"--w-color-positive-100-lightness": "31.6%",
Expand Down Expand Up @@ -213,6 +217,7 @@ describe('generateThemeColorVariables', () => {
"--w-color-surface-menu-item-active": "var(--w-color-primary-200)",
"--w-color-surface-menus": "var(--w-color-primary)",
"--w-color-surface-page": "var(--w-color-white)",
"--w-color-surface-status-label": "var(--w-color-info-50)",
"--w-color-surface-tooltip": "var(--w-color-primary-200)",
"--w-color-text-button": "var(--w-color-white)",
"--w-color-text-button-critical-outline-hover": "var(--w-color-critical-200)",
Expand All @@ -228,6 +233,7 @@ describe('generateThemeColorVariables', () => {
"--w-color-text-link-hover": "var(--w-color-secondary-400)",
"--w-color-text-meta": "var(--w-color-grey-400)",
"--w-color-text-placeholder": "var(--w-color-grey-400)",
"--w-color-text-status-label": "var(--w-color-info-100)",
}
`);
});
Expand Down Expand Up @@ -260,6 +266,7 @@ describe('generateThemeColorVariables', () => {
"--w-color-surface-menu-item-active": "var(--w-color-grey-700)",
"--w-color-surface-menus": "var(--w-color-grey-800)",
"--w-color-surface-page": "var(--w-color-grey-600)",
"--w-color-surface-status-label": "var(--w-color-grey-600)",
"--w-color-surface-tooltip": "var(--w-color-grey-500)",
"--w-color-text-button": "var(--w-color-white)",
"--w-color-text-button-critical-outline-hover": "var(--w-color-critical-50)",
Expand All @@ -275,6 +282,7 @@ describe('generateThemeColorVariables', () => {
"--w-color-text-link-hover": "var(--w-color-secondary-75)",
"--w-color-text-meta": "var(--w-color-grey-150)",
"--w-color-text-placeholder": "var(--w-color-grey-200)",
"--w-color-text-status-label": "var(--w-color-info-75)",
}
`);
});
Expand Down
9 changes: 9 additions & 0 deletions client/src/tokens/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,15 @@ const staticColors = {
usage: 'Background and icons for information messages',
contrastText: 'white',
},
75: {
hex: '#80B6C7',
hsl: 'hsl(194.4, 38.8%, 64.1%)',
bgUtility: 'w-bg-info-75',
textUtility: 'w-text-info-75',
cssVariable: '--w-color-info-75',
usage: 'Background and icons for information messages',
contrastText: 'white',
},
50: {
hex: '#E2F5FC',
hsl: 'hsl(196.2 81.3% 93.7%)',
Expand Down
1 change: 1 addition & 0 deletions client/src/tokens/objectStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const borderRadius = {
DEFAULT: '0.3125rem', // 5px
md: '0.625rem', // 10px
xl: '1.5rem', // 24px
xxl: '2rem', // 32px
full: '100%',
};

Expand Down

0 comments on commit 5373c8b

Please sign in to comment.