Skip to content

Commit b04bfde

Browse files
authored
feat: new colors (#1087)
1 parent 0b841eb commit b04bfde

16 files changed

Lines changed: 34 additions & 20 deletions

File tree

.changeset/surface-color-tokens.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cube-dev/ui-kit': minor
3+
---
4+
5+
Add `#surface`, `#surface-2`, and `#surface-3` for layered backgrounds. `#light` now aliases `#surface-3`. Defaults that used `#dark-bg` (CopySnippet, CopyPasteBlock, disabled theme sample, scrollbar track, Storybook playground) use `#surface-2`. File- and radio-style tab fills use the surface scale instead of `#light` / `#white`. Prefer `#surface-2` over legacy `#dark-bg`; TypeScript named-color augmentation lists the surface tokens and no longer includes `dark-bg`.

docs/Usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Each semantic group provides a base color and variants following the pattern: `#
119119

120120
### Neutral Scales
121121

122-
**Dark scale:** `#dark`, `#dark-01` through `#dark-05`, `#dark-bg` — six-step neutral scale from near-black to light gray.
122+
**Dark scale:** `#dark`, `#dark-01` through `#dark-05`neutral scale from near-black to light gray. **Surfaces:** `#surface`, `#surface-2`, `#surface-3` — layered UI backgrounds.
123123

124124
**Purple scale:** `#purple-01` through `#purple-04` — additional purple shades for gradients and accents.
125125

docs/components/content/CopyPasteBlock.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ A block that displays a value with copy-to-clipboard functionality. Supports pas
1717

1818
### Style Defaults
1919

20-
- `fill``#dark-bg`
20+
- `fill``#surface-2`
2121
- `radius``1r`
2222
- `cursor` — pointer
2323
- `preset``t3` (switches to `t2` when `size="large"`)

docs/components/content/CopySnippet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ A code block with copy-to-clipboard functionality and syntax highlighting. Exten
2020

2121
### Style Defaults
2222

23-
- `fill``#dark-bg`
23+
- `fill``#surface-2`
2424
- `border``0`
2525
- `radius``1r`
2626
- `padding``0`

src/components/content/CopyPasteBlock/CopyPasteBlock.docs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ A block that displays a value with copy-to-clipboard functionality. Supports pas
1919

2020
### Style Defaults
2121

22-
- `fill``#dark-bg`
22+
- `fill``#surface-2`
2323
- `radius``1r`
2424
- `cursor` — pointer
2525
- `preset``t3` (switches to `t2` when `size="large"`)

src/components/content/CopyPasteBlock/CopyPasteBlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const CopyPasteBlockElement = tasty(Card, {
4545
qa: 'CopyPasteBlock',
4646
styles: {
4747
display: 'grid',
48-
fill: '#dark-bg',
48+
fill: '#surface-2',
4949
radius: '1r',
5050
padding: {
5151
'': '0 1px',

src/components/content/CopySnippet/CopySnippet.docs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ A code block with copy-to-clipboard functionality and syntax highlighting. Exten
2222

2323
### Style Defaults
2424

25-
- `fill``#dark-bg`
25+
- `fill``#surface-2`
2626
- `border``0`
2727
- `radius``1r`
2828
- `padding``0`

src/components/content/CopySnippet/CopySnippet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const CopySnippetElement = tasty(Card, {
9494
styles: {
9595
display: 'grid',
9696
gridRows: 'minmax(0, 1fr)',
97-
fill: '#dark-bg',
97+
fill: '#surface-2',
9898
border: 0,
9999
padding: 0,
100100
preset: 'default',

src/components/navigation/Tabs/styled.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,10 @@ export const TabElement = tasty(Item, {
217217
fill: {
218218
'': '#clear',
219219
'hovered & !type=narrow': '#dark.03',
220-
'type=file': '#light',
221-
'type=file & hovered': '#light.5',
222-
'type=radio & hovered': '#white.5',
223-
'(type=file | type=radio) & selected': '#white',
220+
'type=file': '#surface-3',
221+
'type=file & hovered': '#surface-3.5',
222+
'type=radio & hovered': '#surface.5',
223+
'(type=file | type=radio) & selected': '#surface',
224224
},
225225
border: {
226226
'': '#clear',

src/data/themes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default {
2525
border: '#note.20',
2626
},
2727
disabled: {
28-
fill: '#dark-bg',
28+
fill: '#surface-2',
2929
color: '#dark-03',
3030
border: '#dark.20',
3131
},

0 commit comments

Comments
 (0)