This repository was archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 52
feat(theme): updating color palette and scheme #1069
Merged
Merged
Changes from all commits
Commits
Show all changes
132 commits
Select commit
Hold shift + click to select a range
bd77115
wip
levithomason b4d5452
-fixed compiling issues
d3add7f
-fixed of the label components
697869d
-adding missing colors form the color scheme
bbf5b15
-updates on the text component
dd593b2
-added grey 900
1e934b7
-updated bodyBackground
01a90f0
Merge branch 'master' into feat/color-palette-update
9ece9dd
-updates on the color scheme grey color
330b8f4
-updated on the dark and high contrast themes
69c1ce6
-updated button variables in dark theme
7212f85
-improved typings
d180ff6
-updating primary menu styles (default, pointing)
e146c4f
-fixes of underlined menu
db569cc
-wip use border for components without background
718abe1
-wip fix
f4b8dca
-fixed vertical menu styles
043a667
-fixes for the border colors
8a1dd43
-fixed primary menu border color
8d59cf4
-fixes
f12c1ef
-fixed grey color
f0c2964
-fixed menu color example
72850da
-vertical pointing border color fix
4d53e35
-fixed icon only issues
66efad3
-fixed disabled color
f186a44
-updates on the color scheme
ce972b2
-removed unnecessary vertical color
b9f68ef
-fixed icons
4cc0c2f
Merge branch 'master' into feat/color-palette-update
09ff8c9
Merge branch 'master' into feat/color-palette-update
0de5235
-alert fixes
23d59fd
-update on the hover color
8a313fe
-updates of vertical focus styles
f4b9cec
-created functino for generating the colors scheme
0c67096
-updated color scheme for dark theme
703700b
-fixed vertical focus background
2c9b161
-fixed typings issues around color prop
64f0830
-fixed menu example color
6f36f3c
-extracted light colors overrides
05b5d49
-removed comments
785761b
-init hoc color scheme
1ff6062
-adjusments on the colors used in hoc
fc05434
Merge branch 'master' into feat/color-palette-update
89bb562
compiler issues
54fc16e
-updated colors
e6182cc
-updated list and radio group
a1a619d
-fix vertical focus background color in dark theme
ca87c86
-fixed disabled icon and menu item in dark theme
3165d4f
-fixing hover color on primary menu
2c43080
Merge branch 'master' into feat/color-palette-update
mnajdova b870aad
-replaced grey colors from color palette
6d27464
Merge remote-tracking branch 'origin/feat/color-palette-update' into …
0ae80d1
-replaced tinted background
baa2143
-replaced primary colors
7147cea
-fixes
140cdd7
-added orange colors
f91cc8a
-fixed errors
0fa9061
-converted red colors
bf47697
-updated some colors
b98eefc
-added green pink and orange colors
502a5bf
-removed unused imports
4c82a1c
-removed unused colors from dark theme color scheme
c23eb61
-removing more unused colors
5701c85
-removed unused imports
85d223c
-removed green04 from hoc site variables
1e4949b
-removed unused import
5318e64
-removed more colors from site variables
0cc3fdb
-move red color for hoc theme in colors.ts
5e85080
-changed black and white colors in variables in hoc theme
f3a8a4b
Merge branch 'master' into feat/color-palette-update
96f8574
-updates after merging master
add62e9
-improved typings
1fb0373
-updated more colors
0e0dd13
-replaced blue info color for the status with primary
c6a159c
-removed red color from dark theme
8f7854c
-improved typings of text variables in base team
5f97b4b
-fixed verticalBackgroundColor variables usage
009f1f7
-updated colors type in divider styles
83df6e8
-changed the way the ColorScheme is defined
10c7546
-fixed root/wrapper differences in picking the color
db04cf4
-changed chat message background color for mine messages
67d45e8
Merge branch 'master' into feat/color-palette-update
8b65931
-fixed for dark theme
b405b0e
-updated colors for list item and radio group in dark theme
74b29b0
-added function for extending the color palette
2b1adde
-fixed import in label variables
4fac4dc
-fixed colors in Chat perf examples to avoid screener regressions
e8e5313
-updated red[100] to match the correct color
1c2d77a
-fixed menuStyles
c74149e
-moved colorUtils to themes, and exported that as part of stardust
3cdac0b
-added colors guide
64db23b
Merge branch 'master' into feat/color-palette-update
0eaba88
-improved color picking in order to avoid null pointers
9109c48
-fixed typo
bd31400
-removed the added md file (will be added as a separate PR)
fa6ffea
-removed Text color from teams theme
bbd77b6
-addressing comments on the PR
ecc7e97
-addressing more comments on PR
1ccccc3
-addressing comments on the PR
4503e8e
-fixed some menu style sin hc theme
bdc4bce
-fixed text in color palette guide
2c1934b
-replaced getColorSchemeKey with getColorScheme
19e2abc
-fixed base theme Text's color scheme usage
fe46147
Merge branch 'master' into feat/color-palette-update
290971a
Merge branch 'master' into feat/color-palette-update
e433487
-merge conflicts
c37d609
-resolved eslint error
a506306
-updated color scheme
2cd0085
-fixed types
0a0e5d7
-fixed base theme colors
2f651a3
-added transparent colors to the color palette
83a379d
Merge branch 'master' into feat/color-palette-update
d42bce7
-fixed divider border color
e840df2
-improved disabled menu values
23d6037
-removed unnecessary comments
f4cc146
-removed unnecessary overrides
5a72de2
-fixed borderActive in primary's color schemes
7daccf2
-renamed primary to brand
a8311a5
-updated color schemes
9ddc71a
-added dark theme in the color scheme example
871b521
Merge branch 'master' into feat/color-palette-update
ec4e408
-updated changelog
b41c97a
-removed color prop from Menu
cf0c385
-added links for the color scheme and color palette on the colors guide
eb69a40
-fixed colors guide
0af64a4
Merge branch 'master' into feat/color-palette-update
cfd807b
-removed comments
eda0f3f
-fixed changelog
0464fee
-added unit tests for the colors utils
2ffd9a1
-replaced the order of the color schemes and color palette
e754a90
-addressed PR comments: colorScheme -> colors everywhere in the style…
4c6fbc5
-removed duplicate line in the typings
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import * as React from 'react' | ||
import * as _ from 'lodash' | ||
import { | ||
createComponent, | ||
ComponentSlotStylesInput, | ||
ThemePrepared, | ||
Grid, | ||
ShorthandValue, | ||
Header, | ||
} from '@stardust-ui/react' | ||
|
||
import ColorBox from './ColorBox' | ||
|
||
type ColorVariantsProps = { | ||
name?: string | ||
themes?: ThemePrepared[] | ||
headers?: ShorthandValue[] | ||
} | ||
|
||
export const colorVariantsStyles: ComponentSlotStylesInput<ColorVariantsProps> = { | ||
root: { | ||
border: '1px solid transparent', | ||
borderRadius: '.25rem', | ||
overflow: 'hidden', | ||
}, | ||
} | ||
|
||
const ColorSchemes = createComponent<ColorVariantsProps>({ | ||
displayName: 'ColorVariants', | ||
render: ({ name, themes, headers, stardust: { classes } }) => { | ||
if (themes.length === 0) return <></> | ||
|
||
const colorSchemes = _.map(themes, theme => theme.siteVariables.colorScheme[name]) | ||
|
||
const elements = _.flatMap(_.head(colorSchemes), (i, token) => [ | ||
<ColorBox | ||
name={token} | ||
key={`${token}schema`} | ||
size="small" | ||
value={undefined} | ||
styles={{ backgroundColor: '#f2f2f2' }} | ||
/>, | ||
..._.map(colorSchemes, (colorScheme, i) => ( | ||
<ColorBox key={`${token}${i}`} size="small" value={colorScheme[token]} /> | ||
)), | ||
]) | ||
|
||
const columns = `auto ${_.times(themes.length, () => '180px').join(' ')}` | ||
return ( | ||
<div className={classes.root}> | ||
<Grid columns={columns}> | ||
{headers && headers.map(header => Header.create(header))} | ||
{elements} | ||
</Grid> | ||
</div> | ||
) | ||
}, | ||
}) | ||
|
||
export default ColorSchemes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
docs/src/examples/components/Label/Variations/LabelExampleColor.shorthand.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import * as React from 'react' | ||
import { Label, Provider } from '@stardust-ui/react' | ||
import * as _ from 'lodash' | ||
|
||
const LabelExampleColor = () => ( | ||
<Provider.Consumer | ||
render={({ siteVariables: { colorScheme } }) => | ||
Object.keys(colorScheme).map(color => ( | ||
render={({ siteVariables: { primitiveColors, emphasisColors, naturalColors } }) => | ||
_.keys({ ...primitiveColors, ...emphasisColors, ...naturalColors }).map(color => ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extracting only the colors we had previously in the example There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
<span key={color}> | ||
<Label color={color} content={color} />{' '} | ||
</span> | ||
|
12 changes: 0 additions & 12 deletions
12
docs/src/examples/components/Menu/Variations/MenuExamplePrimary.shorthand.tsx
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May it will be better just to skip undefined values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this I wasn't sure myself. I wanted to emphasize that we are missing some of the colors, but I agree that it is confusing for the community to see these values empty values. @kuzhelov @layershifter what do you think?