-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(colors)!: remove old colors and convert to input and show figma …
…token (#1711) * refactor(colors)!: remove deprecated and legacy colors * docs(colors): convert to input colors and show figma token
- v15.9.0
- v15.8.0
- v15.7.0
- v15.6.0
- v15.5.0
- v15.4.1
- v15.4.0
- v15.4.0-alpha.1
- v15.4.0-alpha.0
- v15.3.1
- v15.3.0
- v15.2.1
- v15.2.0
- v15.1.0
- v15.0.1
- v15.0.0
- v15.0.0-alpha.18
- v15.0.0-alpha.17
- v15.0.0-alpha.16
- v15.0.0-alpha.15
- v15.0.0-alpha.14
- v15.0.0-alpha.13
- v15.0.0-alpha.12
- v15.0.0-alpha.11
- v15.0.0-alpha.10
- v15.0.0-alpha.9
- v15.0.0-alpha.8
- v15.0.0-alpha.7
- v15.0.0-alpha.6
- v15.0.0-alpha.5
- v15.0.0-alpha.4
- v15.0.0-alpha.3
- v15.0.0-alpha.2
- v15.0.0-alpha.1
- v15.0.0-alpha.0
- v14.0.0
- v13.12.0
- v13.11.0
- v13.11.0-alpha.0
- v13.10.0
- v13.9.0
- v13.8.1
- v13.8.0
- v13.7.1
- v13.7.0
- v13.6.1
- v13.6.0
- v13.5.0
- v13.4.0
- v13.3.0
- v13.2.0
- v13.2.0-alpha.0
- v13.1.1
- v13.1.0
- v13.0.0
- remove-lp-pages
Showing
11 changed files
with
174 additions
and
254 deletions.
There are no files selected for viewing
This file contains 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,26 @@ | ||
.color-list__label { | ||
width: fit-content; | ||
padding: var(--eds-size-half); | ||
border-radius: var(--eds-theme-box-button-border-radius); | ||
|
||
font: var(--eds-theme-typography-label-md-subtle); | ||
color: rgb(235, 87, 87); | ||
|
||
background-color: var(--eds-theme-color-background-neutral-subtle); | ||
} | ||
|
||
.color-list__input { | ||
width: 100%; | ||
height: 5rem; | ||
} | ||
|
||
.color-list__input::-webkit-color-swatch { | ||
border-color: transparent; | ||
} | ||
.color-list__input::-webkit-color-swatch-wrapper { | ||
padding: 0; | ||
} | ||
|
||
.color-list__input::-moz-color-swatch { | ||
border-color: transparent; | ||
} |
This file contains 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,33 +1,42 @@ | ||
import React, { Component } from 'react'; | ||
import { Grid } from '../../../src'; | ||
import { TokenSpecimen } from '../TokenSpecimen/TokenSpecimen'; | ||
import React from 'react'; | ||
import styles from './ColorList.module.css'; | ||
|
||
type ListItem = { | ||
name: string; | ||
value: any; | ||
value: string; | ||
figmaToken?: string; | ||
tailwindClass?: string; | ||
}; | ||
|
||
type Props = { | ||
listItems: ListItem[]; | ||
}; | ||
|
||
export class ColorList extends Component<Props> { | ||
render() { | ||
return ( | ||
<Grid> | ||
{this.props.listItems.map(function (listItem) { | ||
return ( | ||
<TokenSpecimen | ||
inlineStyles={{ | ||
backgroundColor: `var(${listItem.name})`, | ||
}} | ||
key={listItem.name} | ||
name={listItem.name} | ||
value={listItem.value} | ||
/> | ||
); | ||
})} | ||
</Grid> | ||
); | ||
} | ||
} | ||
export const ColorList = (props: Props) => ( | ||
<div className="flex flex-col gap-4"> | ||
{props.listItems.map(function (listItem) { | ||
return ( | ||
<div className="bg-neutral-default flex gap-4 p-4" key={listItem.name}> | ||
<div className="flex w-80 flex-col gap-1"> | ||
<label | ||
className={styles['color-list__label']} | ||
htmlFor={listItem.name} | ||
> | ||
<code>{listItem.name}</code> | ||
</label> | ||
{listItem.figmaToken && <span>{listItem.figmaToken}</span>} | ||
{listItem.tailwindClass && <span>{listItem.tailwindClass}</span>} | ||
<code>{listItem.value}</code> | ||
</div> | ||
<input | ||
className={styles['color-list__input']} | ||
id={listItem.name} | ||
readOnly | ||
type="color" | ||
value={listItem.value} | ||
/> | ||
</div> | ||
); | ||
})} | ||
</div> | ||
); |
This file was deleted.
Oops, something went wrong.
This file contains 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,38 @@ | ||
import React from 'react'; | ||
import '../DesignTokens.css'; | ||
import { Section } from '../../../../src'; | ||
import filterTokens from '../../../util/filterTokens'; | ||
import { ColorList } from '../../ColorList/ColorList'; | ||
|
||
export const Tier1Colors = () => { | ||
const getListItems = (filterTerm: string, figmaTokenHeader: string) => | ||
filterTokens(filterTerm).map(({ name, value }) => ({ | ||
name, | ||
value, | ||
figmaToken: | ||
figmaTokenHeader + '/' + name.slice(name.lastIndexOf('-') + 1), | ||
})); | ||
return ( | ||
<div> | ||
<Section title="Neutral Colors"> | ||
<ColorList listItems={getListItems('eds-color-neutral', 'neutral')} /> | ||
</Section> | ||
<Section title="Brand Colors"> | ||
<ColorList listItems={getListItems('eds-color-brand', 'brand-grape')} /> | ||
</Section> | ||
<Section className="flex flex-col gap-3" title="Other Colors"> | ||
<ColorList | ||
listItems={getListItems('eds-color-other-orange', 'orange')} | ||
/> | ||
<ColorList listItems={getListItems('eds-color-other-mint', 'mint')} /> | ||
<ColorList | ||
listItems={getListItems('eds-color-other-yellow', 'yellow')} | ||
/> | ||
<ColorList listItems={getListItems('eds-color-other-ruby', 'ruby')} /> | ||
<ColorList | ||
listItems={getListItems('eds-color-other-lemon', 'supporting')} | ||
/> | ||
</Section> | ||
</div> | ||
); | ||
}; |
This file contains 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 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 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.