|
1 |
| -import * as tokens from "@khanacademy/wonder-blocks-tokens"; |
| 1 | +import { |
| 2 | + border, |
| 3 | + semanticColor, |
| 4 | + spacing, |
| 5 | +} from "@khanacademy/wonder-blocks-tokens"; |
2 | 6 |
|
3 | 7 | const theme = {
|
4 |
| - color: { |
5 |
| - bg: { |
6 |
| - inverse: tokens.color.darkBlue, |
| 8 | + /** |
| 9 | + * Shared tokens |
| 10 | + */ |
| 11 | + root: { |
| 12 | + // TODO(WB-1852): Remove light variant. |
| 13 | + color: { |
| 14 | + inverse: { |
| 15 | + background: semanticColor.surface.inverse, |
| 16 | + foreground: semanticColor.text.inverse, |
| 17 | + }, |
7 | 18 | },
|
8 |
| - text: { |
9 |
| - inverse: tokens.color.white, |
10 |
| - secondary: tokens.color.offBlack64, |
| 19 | + border: { |
| 20 | + radius: border.radius.medium_4, |
| 21 | + width: border.width.thin, |
11 | 22 | },
|
12 |
| - shadow: { |
13 |
| - default: tokens.color.offBlack16, |
| 23 | + }, |
| 24 | + /** |
| 25 | + * Building blocks |
| 26 | + */ |
| 27 | + backdrop: { |
| 28 | + color: { |
| 29 | + background: semanticColor.surface.overlay, |
| 30 | + }, |
| 31 | + }, |
| 32 | + dialog: { |
| 33 | + spacing: { |
| 34 | + padding: spacing.medium_16, |
| 35 | + }, |
| 36 | + }, |
| 37 | + footer: { |
| 38 | + color: { |
| 39 | + border: semanticColor.border.primary, |
14 | 40 | },
|
15 | 41 | },
|
16 |
| - border: { |
17 |
| - radius: tokens.border.radius.medium_4, |
18 |
| - width: tokens.border.width.thin, |
19 |
| - color: tokens.color.blue, |
| 42 | + header: { |
| 43 | + color: { |
| 44 | + border: semanticColor.border.primary, |
| 45 | + secondary: semanticColor.text.secondary, |
| 46 | + }, |
| 47 | + spacing: { |
| 48 | + paddingBlockMd: spacing.large_24, |
| 49 | + paddingInlineMd: spacing.xLarge_32, |
| 50 | + paddingInlineSm: spacing.medium_16, |
| 51 | + gap: spacing.xSmall_8, |
| 52 | + // The space between the title and dismiss button. |
| 53 | + titleGapMd: spacing.medium_16, |
| 54 | + titleGapSm: spacing.xLarge_32, |
| 55 | + }, |
| 56 | + }, |
| 57 | + panel: { |
| 58 | + color: { |
| 59 | + border: semanticColor.border.focus, |
| 60 | + }, |
| 61 | + spacing: { |
| 62 | + gap: spacing.xLarge_32, |
| 63 | + }, |
20 | 64 | },
|
21 |
| - spacing: { |
22 |
| - dialog: { |
23 |
| - small: tokens.spacing.medium_16, |
24 |
| - }, |
25 |
| - panel: { |
26 |
| - closeButton: tokens.spacing.medium_16, |
27 |
| - footer: tokens.spacing.xLarge_32, |
28 |
| - }, |
29 |
| - header: { |
30 |
| - xsmall: tokens.spacing.xSmall_8, |
31 |
| - small: tokens.spacing.medium_16, |
32 |
| - medium: tokens.spacing.large_24, |
33 |
| - large: tokens.spacing.xLarge_32, |
| 65 | + closeButton: { |
| 66 | + spacing: { |
| 67 | + gap: spacing.medium_16, |
34 | 68 | },
|
35 | 69 | },
|
36 | 70 | };
|
|
0 commit comments