Skip to content

Commit c68bec8

Browse files
authored
Add new palette & text specs (#1228)
* feat: add new Pallete & background colors * feat: add new text specs * chore: add changeset * fix: lint typo error * docs: add more details on changeset
1 parent 579ed8a commit c68bec8

File tree

6 files changed

+48
-0
lines changed

6 files changed

+48
-0
lines changed

.changeset/heavy-rivers-punch.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
"@channel.io/bezier-react": patch
3+
---
4+
5+
add new text/palette specs
6+
- add 2 color palette
7+
- grey50_80
8+
- grey850_80
9+
- add 2 text specs
10+
- size30
11+
- size36
12+
- add 3 semantic colors
13+
- bg-grey-dim-lightest
14+
- light: grey50_80
15+
- dark: grey850_80

packages/bezier-react/src/foundation/Colors/Palette/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,13 @@ type BaseColorfulPaletteKey300_20 = `${BaseColorfulPaletteKey300}_20`
115115

116116
type AlphaGreyKey =
117117
| `${BasePaletteKey.Grey}900_90`
118+
| `${BasePaletteKey.Grey}850_80`
118119
| `${BasePaletteKey.Grey}800_80`
119120
| `${BasePaletteKey.Grey}700_80`
120121
| `${BasePaletteKey.Grey}200_80`
121122
| `${BasePaletteKey.Grey}100_90`
122123
| `${BasePaletteKey.Grey}100_80`
124+
| `${BasePaletteKey.Grey}50_80`
123125

124126
type AlphaWhiteKey =
125127
| `${BasePaletteKey.White}_90`
@@ -250,11 +252,13 @@ export const Palette: PaletteType = {
250252

251253
// Alpha Grey
252254
grey900_90: getAlphaHex(PaletteWithoutAlpha.grey900, 90),
255+
grey850_80: getAlphaHex(PaletteWithoutAlpha.grey850, 80),
253256
grey800_80: getAlphaHex(PaletteWithoutAlpha.grey800, 80),
254257
grey700_80: getAlphaHex(PaletteWithoutAlpha.grey700, 80),
255258
grey200_80: getAlphaHex(PaletteWithoutAlpha.grey200, 80),
256259
grey100_90: getAlphaHex(PaletteWithoutAlpha.grey100, 90),
257260
grey100_80: getAlphaHex(PaletteWithoutAlpha.grey100, 80),
261+
grey50_80: getAlphaHex(PaletteWithoutAlpha.grey50, 80),
258262

259263
// Alpha White
260264
white_90: getAlphaHex(PaletteWithoutAlpha.white, 90),

packages/bezier-react/src/foundation/Colors/Theme/presets/DarkTheme.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,14 @@ const DarkTheme: ThemeType = {
2424
'bg-black-lightest': Palette.white_5,
2525

2626
'bg-grey-dark': Palette.grey500,
27+
'bg-grey-dim-lightest': Palette.grey850_80,
2728
'bg-grey-light': Palette.grey700,
2829
'bg-grey-lighter': Palette.grey800,
2930
'bg-grey-lightest': Palette.grey850,
3031

32+
'bg-white-dim-dark': Palette.black_60,
33+
'bg-white-dim-light': Palette.black_20,
34+
3135
// Colorful text and background
3236
'bgtxt-blue-dark': Palette.blue400,
3337
'bgtxt-blue-normal': Palette.blue300,

packages/bezier-react/src/foundation/Colors/Theme/presets/LightTheme.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@ const LightTheme: ThemeType = {
2525

2626
'bg-grey-darkest': Palette.grey900,
2727
'bg-grey-dark': Palette.grey500,
28+
'bg-grey-dim-lightest': Palette.grey50_80,
2829
'bg-grey-light': Palette.grey200,
2930
'bg-grey-lighter': Palette.grey100,
3031
'bg-grey-lightest': Palette.grey50,
3132

33+
'bg-white-dim-dark': Palette.white_60,
34+
'bg-white-dim-light': Palette.white_20,
35+
3236
// Colorful text and background
3337
'bgtxt-blue-dark': Palette.blue500,
3438
'bgtxt-blue-normal': Palette.blue400,

packages/bezier-react/src/foundation/Colors/Theme/types/SemanticNames.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ type MonoBackgroundColor =
88
| `bg-${BaseMonoPaletteKey}-light`
99
| `bg-${BaseMonoPaletteKey}-lighter`
1010
| `bg-${BaseMonoPaletteKey}-lightest`
11+
| `bg-${BasePaletteKey.Grey}-dim-lightest`
12+
| `bg-${BasePaletteKey.White}-dim-dark`
13+
| `bg-${BasePaletteKey.White}-dim-light`
1114

1215
type LayoutBackgroundColor =
1316
| 'bg-gnb'

packages/bezier-react/src/foundation/Typography.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ export enum TypoAbsoluteNumber {
1212
Typo18 = 1.8,
1313
Typo22 = 2.2,
1414
Typo24 = 2.4,
15+
Typo30 = 3.0,
16+
Typo36 = 3.6,
1517
}
1618

1719
export enum LineHeightAbsoluteNumber {
@@ -22,6 +24,8 @@ export enum LineHeightAbsoluteNumber {
2224
Lh24 = 2.4,
2325
Lh28 = 2.8,
2426
Lh32 = 3.2,
27+
Lh36 = 3.6,
28+
Lh44 = 4.4,
2529
}
2630

2731
const Size11 = css`
@@ -79,6 +83,18 @@ const Size24 = css`
7983
letter-spacing: -0.4px;
8084
`
8185

86+
const Size30 = css`
87+
font-size: ${TypoAbsoluteNumber.Typo30}rem;
88+
line-height: ${LineHeightAbsoluteNumber.Lh36}rem;
89+
letter-spacing: -0.4px;
90+
`
91+
92+
const Size36 = css`
93+
font-size: ${TypoAbsoluteNumber.Typo36}rem;
94+
line-height: ${LineHeightAbsoluteNumber.Lh44}rem;
95+
letter-spacing: -0.4px;
96+
`
97+
8298
export type TypographyType = ReturnType<typeof css>
8399

84100
export const Typography = {
@@ -92,4 +108,6 @@ export const Typography = {
92108
Size18,
93109
Size22,
94110
Size24,
111+
Size30,
112+
Size36,
95113
}

0 commit comments

Comments
 (0)