Skip to content

Commit

Permalink
Support inverse color tokens for Toast and Tooltip (#682)
Browse files Browse the repository at this point in the history
* draft

* testing a new naming convention

* test using data attributes component level instead

* use overlay pattern tokens

* build is broken

* fix token

* test syntax

* added changeset & fix for missing value

* fix missing @ in reference

* fix missing colors in overrides

* fix wrong references

* update colors

* add size tokens

* github-actions[bot] Regenerated snapshots

* Update witty-countries-ring.md

* fix overlay tokens

* fix disabled color change

* github-actions[bot] Regenerated snapshots

* Update witty-countries-ring.md

* use inverse instead of emphasis

* github-actions[bot] Regenerated snapshots

* Update witty-countries-ring.md

* fix disabled colors

* github-actions[bot] Regenerated snapshots

* Update witty-countries-ring.md

---------

Co-authored-by: Lukas Oppermann <[email protected]>
Co-authored-by: langermank <[email protected]>
  • Loading branch information
3 people authored Aug 21, 2023
1 parent 5ffe790 commit a082224
Show file tree
Hide file tree
Showing 133 changed files with 1,287 additions and 203 deletions.
9 changes: 9 additions & 0 deletions .changeset/witty-countries-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@primer/primitives': minor
---

- Add `inverse` color options for semantic color tokens to support Toast
- Update the default `emphasis` background color to `white` in dark mode
- Add `overlay` size tokens


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.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const bgColors = [
'bgColor-disabled',
'bgColor-emphasis',
'bgColor-transparent',
'bgColor-inverse',
]

export const Background = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ export default {
},
}

const fgColors = ['fgColor-default', 'fgColor-muted', 'fgColor-onEmphasis', 'fgColor-disabled', 'fgColor-link']
const fgColors = [
'fgColor-default',
'fgColor-muted',
'fgColor-onEmphasis',
'fgColor-onInverse',
'fgColor-disabled',
'fgColor-link',
]

export const Foreground = () => {
return (
Expand Down
10 changes: 10 additions & 0 deletions docs/storybook/stories/Color/Functional/Roles.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const Neutral = () => {
return (
<>
<ColorPreview color={'fgColor-neutral'} textColor canvasColor="bgColor-default" />
<ColorPreview color={'fgColor-neutral-onInverse'} textColor canvasColor="bgColor-inverse" />
<ColorPreview color={'bgColor-neutral-muted'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'bgColor-neutral-emphasis'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'borderColor-neutral-muted'} borderColor canvasColor="bgColor-default" />
Expand All @@ -25,6 +26,7 @@ export const Accent = () => {
return (
<>
<ColorPreview color={'fgColor-accent'} textColor canvasColor="bgColor-default" />
<ColorPreview color={'fgColor-accent-onInverse'} textColor canvasColor="bgColor-inverse" />
<ColorPreview color={'bgColor-accent-muted'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'bgColor-accent-emphasis'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'borderColor-accent-muted'} borderColor canvasColor="bgColor-default" />
Expand All @@ -37,6 +39,7 @@ export const Success = () => {
return (
<>
<ColorPreview color={'fgColor-success'} textColor canvasColor="bgColor-default" />
<ColorPreview color={'fgColor-success-onInverse'} textColor canvasColor="bgColor-inverse" />
<ColorPreview color={'bgColor-success-muted'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'bgColor-success-emphasis'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'borderColor-success-muted'} borderColor canvasColor="bgColor-default" />
Expand All @@ -49,6 +52,7 @@ export const Attention = () => {
return (
<>
<ColorPreview color={'fgColor-attention'} textColor canvasColor="bgColor-default" />
<ColorPreview color={'fgColor-attention-onInverse'} textColor canvasColor="bgColor-inverse" />
<ColorPreview color={'bgColor-attention-muted'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'bgColor-attention-emphasis'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'borderColor-attention-muted'} borderColor canvasColor="bgColor-default" />
Expand All @@ -61,6 +65,7 @@ export const Severe = () => {
return (
<>
<ColorPreview color={'fgColor-severe'} textColor canvasColor="bgColor-default" />
<ColorPreview color={'fgColor-severe-onInverse'} textColor canvasColor="bgColor-inverse" />
<ColorPreview color={'bgColor-severe-muted'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'bgColor-severe-emphasis'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'borderColor-severe-muted'} borderColor canvasColor="bgColor-default" />
Expand All @@ -73,6 +78,7 @@ export const Danger = () => {
return (
<>
<ColorPreview color={'fgColor-danger'} textColor canvasColor="bgColor-default" />
<ColorPreview color={'fgColor-danger-onInverse'} textColor canvasColor="bgColor-inverse" />
<ColorPreview color={'bgColor-danger-muted'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'bgColor-danger-emphasis'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'borderColor-danger-muted'} borderColor canvasColor="bgColor-default" />
Expand All @@ -85,6 +91,7 @@ export const Open = () => {
return (
<>
<ColorPreview color={'fgColor-open'} textColor canvasColor="bgColor-default" />
<ColorPreview color={'fgColor-open-onInverse'} textColor canvasColor="bgColor-inverse" />
<ColorPreview color={'bgColor-open-muted'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'bgColor-open-emphasis'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'borderColor-open-muted'} borderColor canvasColor="bgColor-default" />
Expand All @@ -97,6 +104,7 @@ export const Closed = () => {
return (
<>
<ColorPreview color={'fgColor-closed'} textColor canvasColor="bgColor-default" />
<ColorPreview color={'fgColor-closed-onInverse'} textColor canvasColor="bgColor-inverse" />
<ColorPreview color={'bgColor-closed-muted'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'bgColor-closed-emphasis'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'borderColor-closed-muted'} borderColor canvasColor="bgColor-default" />
Expand All @@ -109,6 +117,7 @@ export const Done = () => {
return (
<>
<ColorPreview color={'fgColor-done'} textColor canvasColor="bgColor-default" />
<ColorPreview color={'fgColor-done-onInverse'} textColor canvasColor="bgColor-inverse" />
<ColorPreview color={'bgColor-done-muted'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'bgColor-done-emphasis'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'borderColor-done-muted'} borderColor canvasColor="bgColor-default" />
Expand All @@ -121,6 +130,7 @@ export const Sponsors = () => {
return (
<>
<ColorPreview color={'fgColor-sponsors'} textColor canvasColor="bgColor-default" />
<ColorPreview color={'fgColor-sponsors-onInverse'} textColor canvasColor="bgColor-inverse" />
<ColorPreview color={'bgColor-sponsors-muted'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'bgColor-sponsors-emphasis'} bgColor canvasColor="bgColor-default" />
<ColorPreview color={'borderColor-sponsors-muted'} borderColor canvasColor="bgColor-default" />
Expand Down
Loading

0 comments on commit a082224

Please sign in to comment.