@canonical/design-tokens 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +42 -0
  2. package/assets.ruleset.json +19 -0
  3. package/package.json +19 -0
  4. package/terrazzo.config.ts +13 -0
  5. package/tokens/canonical/canonical.resolver.json +162 -0
  6. package/tokens/canonical/global/primitive/color.tokens.json +1097 -0
  7. package/tokens/canonical/global/primitive/dimension.tokens.json +571 -0
  8. package/tokens/canonical/global/primitive/number.tokens.json +600 -0
  9. package/tokens/canonical/global/primitive/typography.tokens.json +181 -0
  10. package/tokens/canonical/global/semantic/color/dark.tokens.json +4925 -0
  11. package/tokens/canonical/global/semantic/color/light.tokens.json +4925 -0
  12. package/tokens/canonical/global/semantic/dimension/large.tokens.json +3 -0
  13. package/tokens/canonical/global/semantic/dimension/medium.tokens.json +3 -0
  14. package/tokens/canonical/global/semantic/dimension/small.tokens.json +18 -0
  15. package/tokens/canonical/global/semantic/dimension/xLarge.tokens.json +12 -0
  16. package/tokens/canonical/global/semantic/modifier/anticipation/caution.tokens.json +61 -0
  17. package/tokens/canonical/global/semantic/modifier/anticipation/constructive.tokens.json +74 -0
  18. package/tokens/canonical/global/semantic/modifier/anticipation/destructive.tokens.json +74 -0
  19. package/tokens/canonical/global/semantic/modifier/criticality/error.tokens.json +87 -0
  20. package/tokens/canonical/global/semantic/modifier/criticality/information.tokens.json +61 -0
  21. package/tokens/canonical/global/semantic/modifier/criticality/success.tokens.json +87 -0
  22. package/tokens/canonical/global/semantic/modifier/criticality/warning.tokens.json +87 -0
  23. package/tokens/canonical/global/semantic/modifier/emphasis/branded.tokens.json +87 -0
  24. package/tokens/canonical/global/semantic/modifier/emphasis/highlighted.tokens.json +4 -0
  25. package/tokens/canonical/global/semantic/modifier/emphasis/muted.tokens.json +46 -0
  26. package/tokens/canonical/global/semantic/modifier/importance/primary.tokens.json +4 -0
  27. package/tokens/canonical/global/semantic/modifier/importance/secondary.tokens.json +4 -0
  28. package/tokens/canonical/global/semantic/modifier/importance/tertiary.tokens.json +4 -0
  29. package/tokens/canonical/global/semantic/modifier/surface/layer1.tokens.json +212 -0
  30. package/tokens/canonical/global/semantic/modifier/surface/layer2.tokens.json +212 -0
  31. package/tokens/canonical/global/semantic/modifier/surface/layer3.tokens.json +212 -0
  32. package/tokens/canonical/global/semantic/modifier/typography/apps.tokens.json +778 -0
  33. package/tokens/canonical/global/semantic/modifier/typography/docs.tokens.json +778 -0
  34. package/tokens/canonical/global/semantic/modifier/typography/global.tokens.json +866 -0
  35. package/tokens/canonical/global/semantic/modifier/typography/sites.tokens.json +62 -0
  36. package/tsconfig.json +4 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ "$schema": "https://designtokens.org/schemas/2025.10/format.json"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "$schema": "https://designtokens.org/schemas/2025.10/format.json"
3
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://designtokens.org/schemas/2025.10/format.json",
3
+ "dimension": {
4
+ "$type": "dimension",
5
+ "size": {
6
+ "rootFontSize": {
7
+ "$value": "{dimension.200}",
8
+ "$description": "Base font size defining the root rem unit for small breakpoint layouts (16px)"
9
+ },
10
+ "height": {
11
+ "baseline": {
12
+ "$value": "{dimension.100}",
13
+ "$description": "Baseline grid unit for vertical rhythm and component alignment (8px)"
14
+ }
15
+ }
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://designtokens.org/schemas/2025.10/format.json",
3
+ "dimension": {
4
+ "$type": "dimension",
5
+ "size": {
6
+ "rootFontSize": {
7
+ "$value": "{dimension.225}",
8
+ "$description": "Base font size defining the root rem unit for extra-large breakpoint layouts (18px)"
9
+ }
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "$schema": "https://designtokens.org/schemas/2025.10/format.json",
3
+ "color": {
4
+ "foreground": {
5
+ "secondary": {
6
+ "$value": {
7
+ "colorSpace": "oklch",
8
+ "components": [0.5, 0.3, 328],
9
+ "alpha": 1
10
+ },
11
+ "$extensions": {
12
+ "com.canonical.modifier": {
13
+ "aliasOf": "color.foreground.secondary.warning"
14
+ }
15
+ },
16
+ "$description": "Secondary interactive foreground color for less prominent actions"
17
+ }
18
+ },
19
+ "text": {
20
+ "$value": {
21
+ "colorSpace": "oklch",
22
+ "components": [0.5, 0.3, 328],
23
+ "alpha": 1
24
+ },
25
+ "$extensions": {
26
+ "com.canonical.modifier": {
27
+ "aliasOf": "color.text.warning"
28
+ }
29
+ },
30
+ "$description": "Body text color for readable content"
31
+ },
32
+ "icon": {
33
+ "$value": {
34
+ "colorSpace": "oklch",
35
+ "components": [0.5, 0.3, 328],
36
+ "alpha": 1
37
+ },
38
+ "$extensions": {
39
+ "com.canonical.modifier": {
40
+ "aliasOf": "color.icon.warning"
41
+ }
42
+ },
43
+ "$description": "Icon fill color for informational and decorative icons"
44
+ },
45
+ "border": {
46
+ "$value": {
47
+ "colorSpace": "oklch",
48
+ "components": [0.5, 0.3, 328],
49
+ "alpha": 1
50
+ },
51
+ "$extensions": {
52
+ "com.canonical.modifier": {
53
+ "aliasOf": "color.border.warning"
54
+ }
55
+ },
56
+ "$description": "Border color for containers and separators"
57
+ },
58
+ "$type": "color"
59
+ },
60
+ "$description": "Anticipation: caution context. Uses .warning variant as closest handover match (placeholder)."
61
+ }
@@ -0,0 +1,74 @@
1
+ {
2
+ "$schema": "https://designtokens.org/schemas/2025.10/format.json",
3
+ "color": {
4
+ "foreground": {
5
+ "primary": {
6
+ "$value": {
7
+ "colorSpace": "oklch",
8
+ "components": [0.5, 0.3, 328],
9
+ "alpha": 1
10
+ },
11
+ "$extensions": {
12
+ "com.canonical.modifier": {
13
+ "aliasOf": "color.foreground.primary.constructive"
14
+ }
15
+ },
16
+ "$description": "Primary interactive foreground color for buttons and actionable elements"
17
+ },
18
+ "ghost": {
19
+ "$value": {
20
+ "colorSpace": "oklch",
21
+ "components": [0.5, 0.3, 328],
22
+ "alpha": 1
23
+ },
24
+ "$extensions": {
25
+ "com.canonical.modifier": {
26
+ "aliasOf": "color.foreground.ghost.constructive"
27
+ }
28
+ },
29
+ "$description": "Ghost-style foreground color for minimal-chrome interactive elements"
30
+ }
31
+ },
32
+ "text": {
33
+ "$value": {
34
+ "colorSpace": "oklch",
35
+ "components": [0.5, 0.3, 328],
36
+ "alpha": 1
37
+ },
38
+ "$extensions": {
39
+ "com.canonical.modifier": {
40
+ "aliasOf": "color.text.constructive"
41
+ }
42
+ },
43
+ "$description": "Body text color for readable content"
44
+ },
45
+ "icon": {
46
+ "$value": {
47
+ "colorSpace": "oklch",
48
+ "components": [0.5, 0.3, 328],
49
+ "alpha": 1
50
+ },
51
+ "$extensions": {
52
+ "com.canonical.modifier": {
53
+ "aliasOf": "color.icon.constructive"
54
+ }
55
+ },
56
+ "$description": "Icon fill color for informational and decorative icons"
57
+ },
58
+ "border": {
59
+ "$value": {
60
+ "colorSpace": "oklch",
61
+ "components": [0.5, 0.3, 328],
62
+ "alpha": 1
63
+ },
64
+ "$extensions": {
65
+ "com.canonical.modifier": {
66
+ "aliasOf": "color.border.constructive"
67
+ }
68
+ },
69
+ "$description": "Border color for containers and separators"
70
+ },
71
+ "$type": "color"
72
+ },
73
+ "$description": "Anticipation: constructive context."
74
+ }
@@ -0,0 +1,74 @@
1
+ {
2
+ "$schema": "https://designtokens.org/schemas/2025.10/format.json",
3
+ "color": {
4
+ "foreground": {
5
+ "primary": {
6
+ "$value": {
7
+ "colorSpace": "oklch",
8
+ "components": [0.5, 0.3, 328],
9
+ "alpha": 1
10
+ },
11
+ "$extensions": {
12
+ "com.canonical.modifier": {
13
+ "aliasOf": "color.foreground.primary.destructive"
14
+ }
15
+ },
16
+ "$description": "Primary interactive foreground color for buttons and actionable elements"
17
+ },
18
+ "ghost": {
19
+ "$value": {
20
+ "colorSpace": "oklch",
21
+ "components": [0.5, 0.3, 328],
22
+ "alpha": 1
23
+ },
24
+ "$extensions": {
25
+ "com.canonical.modifier": {
26
+ "aliasOf": "color.foreground.ghost.destructive"
27
+ }
28
+ },
29
+ "$description": "Ghost-style foreground color for minimal-chrome interactive elements"
30
+ }
31
+ },
32
+ "text": {
33
+ "$value": {
34
+ "colorSpace": "oklch",
35
+ "components": [0.5, 0.3, 328],
36
+ "alpha": 1
37
+ },
38
+ "$extensions": {
39
+ "com.canonical.modifier": {
40
+ "aliasOf": "color.text.destructive"
41
+ }
42
+ },
43
+ "$description": "Body text color for readable content"
44
+ },
45
+ "icon": {
46
+ "$value": {
47
+ "colorSpace": "oklch",
48
+ "components": [0.5, 0.3, 328],
49
+ "alpha": 1
50
+ },
51
+ "$extensions": {
52
+ "com.canonical.modifier": {
53
+ "aliasOf": "color.icon.destructive"
54
+ }
55
+ },
56
+ "$description": "Icon fill color for informational and decorative icons"
57
+ },
58
+ "border": {
59
+ "$value": {
60
+ "colorSpace": "oklch",
61
+ "components": [0.5, 0.3, 328],
62
+ "alpha": 1
63
+ },
64
+ "$extensions": {
65
+ "com.canonical.modifier": {
66
+ "aliasOf": "color.border.destructive"
67
+ }
68
+ },
69
+ "$description": "Border color for containers and separators"
70
+ },
71
+ "$type": "color"
72
+ },
73
+ "$description": "Anticipation: destructive context."
74
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "$schema": "https://designtokens.org/schemas/2025.10/format.json",
3
+ "color": {
4
+ "foreground": {
5
+ "secondary": {
6
+ "$value": {
7
+ "colorSpace": "oklch",
8
+ "components": [0.5, 0.3, 328],
9
+ "alpha": 1
10
+ },
11
+ "$extensions": {
12
+ "com.canonical.modifier": {
13
+ "aliasOf": "color.foreground.secondary.error"
14
+ }
15
+ },
16
+ "$description": "Secondary interactive foreground color for less prominent actions"
17
+ },
18
+ "input": {
19
+ "$value": {
20
+ "colorSpace": "oklch",
21
+ "components": [0.5, 0.3, 328],
22
+ "alpha": 1
23
+ },
24
+ "$extensions": {
25
+ "com.canonical.modifier": {
26
+ "aliasOf": "color.foreground.input.error"
27
+ }
28
+ },
29
+ "$description": "Foreground color for form input elements"
30
+ }
31
+ },
32
+ "text": {
33
+ "$value": {
34
+ "colorSpace": "oklch",
35
+ "components": [0.5, 0.3, 328],
36
+ "alpha": 1
37
+ },
38
+ "$extensions": {
39
+ "com.canonical.modifier": {
40
+ "aliasOf": "color.text.error"
41
+ }
42
+ },
43
+ "$description": "Body text color for readable content"
44
+ },
45
+ "icon": {
46
+ "$value": {
47
+ "colorSpace": "oklch",
48
+ "components": [0.5, 0.3, 328],
49
+ "alpha": 1
50
+ },
51
+ "$extensions": {
52
+ "com.canonical.modifier": {
53
+ "aliasOf": "color.icon.error"
54
+ }
55
+ },
56
+ "$description": "Icon fill color for informational and decorative icons"
57
+ },
58
+ "border": {
59
+ "$value": {
60
+ "colorSpace": "oklch",
61
+ "components": [0.5, 0.3, 328],
62
+ "alpha": 1
63
+ },
64
+ "$extensions": {
65
+ "com.canonical.modifier": {
66
+ "aliasOf": "color.border.error"
67
+ }
68
+ },
69
+ "$description": "Border color for containers and separators"
70
+ },
71
+ "focusRing": {
72
+ "$value": {
73
+ "colorSpace": "oklch",
74
+ "components": [0.5, 0.3, 328],
75
+ "alpha": 1
76
+ },
77
+ "$extensions": {
78
+ "com.canonical.modifier": {
79
+ "aliasOf": "color.focusRing.error"
80
+ }
81
+ },
82
+ "$description": "Outline color for keyboard focus indicators"
83
+ },
84
+ "$type": "color"
85
+ },
86
+ "$description": "Criticality: error context."
87
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "$schema": "https://designtokens.org/schemas/2025.10/format.json",
3
+ "color": {
4
+ "foreground": {
5
+ "secondary": {
6
+ "$value": {
7
+ "colorSpace": "oklch",
8
+ "components": [0.5, 0.3, 328],
9
+ "alpha": 1
10
+ },
11
+ "$extensions": {
12
+ "com.canonical.modifier": {
13
+ "aliasOf": "color.foreground.secondary.information"
14
+ }
15
+ },
16
+ "$description": "Secondary interactive foreground color for less prominent actions"
17
+ }
18
+ },
19
+ "text": {
20
+ "$value": {
21
+ "colorSpace": "oklch",
22
+ "components": [0.5, 0.3, 328],
23
+ "alpha": 1
24
+ },
25
+ "$extensions": {
26
+ "com.canonical.modifier": {
27
+ "aliasOf": "color.text.information"
28
+ }
29
+ },
30
+ "$description": "Body text color for readable content"
31
+ },
32
+ "icon": {
33
+ "$value": {
34
+ "colorSpace": "oklch",
35
+ "components": [0.5, 0.3, 328],
36
+ "alpha": 1
37
+ },
38
+ "$extensions": {
39
+ "com.canonical.modifier": {
40
+ "aliasOf": "color.icon.information"
41
+ }
42
+ },
43
+ "$description": "Icon fill color for informational and decorative icons"
44
+ },
45
+ "border": {
46
+ "$value": {
47
+ "colorSpace": "oklch",
48
+ "components": [0.5, 0.3, 328],
49
+ "alpha": 1
50
+ },
51
+ "$extensions": {
52
+ "com.canonical.modifier": {
53
+ "aliasOf": "color.border.information"
54
+ }
55
+ },
56
+ "$description": "Border color for containers and separators"
57
+ },
58
+ "$type": "color"
59
+ },
60
+ "$description": "Criticality: information context."
61
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "$schema": "https://designtokens.org/schemas/2025.10/format.json",
3
+ "color": {
4
+ "foreground": {
5
+ "secondary": {
6
+ "$value": {
7
+ "colorSpace": "oklch",
8
+ "components": [0.5, 0.3, 328],
9
+ "alpha": 1
10
+ },
11
+ "$extensions": {
12
+ "com.canonical.modifier": {
13
+ "aliasOf": "color.foreground.secondary.success"
14
+ }
15
+ },
16
+ "$description": "Secondary interactive foreground color for less prominent actions"
17
+ },
18
+ "input": {
19
+ "$value": {
20
+ "colorSpace": "oklch",
21
+ "components": [0.5, 0.3, 328],
22
+ "alpha": 1
23
+ },
24
+ "$extensions": {
25
+ "com.canonical.modifier": {
26
+ "aliasOf": "color.foreground.input.success"
27
+ }
28
+ },
29
+ "$description": "Foreground color for form input elements"
30
+ }
31
+ },
32
+ "text": {
33
+ "$value": {
34
+ "colorSpace": "oklch",
35
+ "components": [0.5, 0.3, 328],
36
+ "alpha": 1
37
+ },
38
+ "$extensions": {
39
+ "com.canonical.modifier": {
40
+ "aliasOf": "color.text.success"
41
+ }
42
+ },
43
+ "$description": "Body text color for readable content"
44
+ },
45
+ "icon": {
46
+ "$value": {
47
+ "colorSpace": "oklch",
48
+ "components": [0.5, 0.3, 328],
49
+ "alpha": 1
50
+ },
51
+ "$extensions": {
52
+ "com.canonical.modifier": {
53
+ "aliasOf": "color.icon.success"
54
+ }
55
+ },
56
+ "$description": "Icon fill color for informational and decorative icons"
57
+ },
58
+ "border": {
59
+ "$value": {
60
+ "colorSpace": "oklch",
61
+ "components": [0.5, 0.3, 328],
62
+ "alpha": 1
63
+ },
64
+ "$extensions": {
65
+ "com.canonical.modifier": {
66
+ "aliasOf": "color.border.success"
67
+ }
68
+ },
69
+ "$description": "Border color for containers and separators"
70
+ },
71
+ "focusRing": {
72
+ "$value": {
73
+ "colorSpace": "oklch",
74
+ "components": [0.5, 0.3, 328],
75
+ "alpha": 1
76
+ },
77
+ "$extensions": {
78
+ "com.canonical.modifier": {
79
+ "aliasOf": "color.focusRing.success"
80
+ }
81
+ },
82
+ "$description": "Outline color for keyboard focus indicators"
83
+ },
84
+ "$type": "color"
85
+ },
86
+ "$description": "Criticality: success context."
87
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "$schema": "https://designtokens.org/schemas/2025.10/format.json",
3
+ "color": {
4
+ "foreground": {
5
+ "secondary": {
6
+ "$value": {
7
+ "colorSpace": "oklch",
8
+ "components": [0.5, 0.3, 328],
9
+ "alpha": 1
10
+ },
11
+ "$extensions": {
12
+ "com.canonical.modifier": {
13
+ "aliasOf": "color.foreground.secondary.warning"
14
+ }
15
+ },
16
+ "$description": "Secondary interactive foreground color for less prominent actions"
17
+ },
18
+ "input": {
19
+ "$value": {
20
+ "colorSpace": "oklch",
21
+ "components": [0.5, 0.3, 328],
22
+ "alpha": 1
23
+ },
24
+ "$extensions": {
25
+ "com.canonical.modifier": {
26
+ "aliasOf": "color.foreground.input.warning"
27
+ }
28
+ },
29
+ "$description": "Foreground color for form input elements"
30
+ }
31
+ },
32
+ "text": {
33
+ "$value": {
34
+ "colorSpace": "oklch",
35
+ "components": [0.5, 0.3, 328],
36
+ "alpha": 1
37
+ },
38
+ "$extensions": {
39
+ "com.canonical.modifier": {
40
+ "aliasOf": "color.text.warning"
41
+ }
42
+ },
43
+ "$description": "Body text color for readable content"
44
+ },
45
+ "icon": {
46
+ "$value": {
47
+ "colorSpace": "oklch",
48
+ "components": [0.5, 0.3, 328],
49
+ "alpha": 1
50
+ },
51
+ "$extensions": {
52
+ "com.canonical.modifier": {
53
+ "aliasOf": "color.icon.warning"
54
+ }
55
+ },
56
+ "$description": "Icon fill color for informational and decorative icons"
57
+ },
58
+ "border": {
59
+ "$value": {
60
+ "colorSpace": "oklch",
61
+ "components": [0.5, 0.3, 328],
62
+ "alpha": 1
63
+ },
64
+ "$extensions": {
65
+ "com.canonical.modifier": {
66
+ "aliasOf": "color.border.warning"
67
+ }
68
+ },
69
+ "$description": "Border color for containers and separators"
70
+ },
71
+ "focusRing": {
72
+ "$value": {
73
+ "colorSpace": "oklch",
74
+ "components": [0.5, 0.3, 328],
75
+ "alpha": 1
76
+ },
77
+ "$extensions": {
78
+ "com.canonical.modifier": {
79
+ "aliasOf": "color.focusRing.warning"
80
+ }
81
+ },
82
+ "$description": "Outline color for keyboard focus indicators"
83
+ },
84
+ "$type": "color"
85
+ },
86
+ "$description": "Criticality: warning context."
87
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "$schema": "https://designtokens.org/schemas/2025.10/format.json",
3
+ "color": {
4
+ "foreground": {
5
+ "primary": {
6
+ "$value": {
7
+ "colorSpace": "oklch",
8
+ "components": [0.5, 0.3, 328],
9
+ "alpha": 1
10
+ },
11
+ "$extensions": {
12
+ "com.canonical.modifier": {
13
+ "aliasOf": "color.foreground.primary.branded"
14
+ }
15
+ },
16
+ "$description": "Primary interactive foreground color for buttons and actionable elements"
17
+ },
18
+ "secondary": {
19
+ "$value": {
20
+ "colorSpace": "oklch",
21
+ "components": [0.5, 0.3, 328],
22
+ "alpha": 1
23
+ },
24
+ "$extensions": {
25
+ "com.canonical.modifier": {
26
+ "aliasOf": "color.foreground.secondary.branded"
27
+ }
28
+ },
29
+ "$description": "Secondary interactive foreground color for less prominent actions"
30
+ },
31
+ "ghost": {
32
+ "$value": {
33
+ "colorSpace": "oklch",
34
+ "components": [0.5, 0.3, 328],
35
+ "alpha": 1
36
+ },
37
+ "$extensions": {
38
+ "com.canonical.modifier": {
39
+ "aliasOf": "color.foreground.ghost.branded"
40
+ }
41
+ },
42
+ "$description": "Ghost-style foreground color for minimal-chrome interactive elements"
43
+ }
44
+ },
45
+ "text": {
46
+ "$value": {
47
+ "colorSpace": "oklch",
48
+ "components": [0.5, 0.3, 328],
49
+ "alpha": 1
50
+ },
51
+ "$extensions": {
52
+ "com.canonical.modifier": {
53
+ "aliasOf": "color.text.branded"
54
+ }
55
+ },
56
+ "$description": "Body text color for readable content"
57
+ },
58
+ "icon": {
59
+ "$value": {
60
+ "colorSpace": "oklch",
61
+ "components": [0.5, 0.3, 328],
62
+ "alpha": 1
63
+ },
64
+ "$extensions": {
65
+ "com.canonical.modifier": {
66
+ "aliasOf": "color.icon.branded"
67
+ }
68
+ },
69
+ "$description": "Icon fill color for informational and decorative icons"
70
+ },
71
+ "border": {
72
+ "$value": {
73
+ "colorSpace": "oklch",
74
+ "components": [0.5, 0.3, 328],
75
+ "alpha": 1
76
+ },
77
+ "$extensions": {
78
+ "com.canonical.modifier": {
79
+ "aliasOf": "color.border.branded"
80
+ }
81
+ },
82
+ "$description": "Border color for containers and separators"
83
+ },
84
+ "$type": "color"
85
+ },
86
+ "$description": "Emphasis: branded context."
87
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema": "https://designtokens.org/schemas/2025.10/format.json",
3
+ "$description": "Emphasis: highlighted context. All roles deferred pending design confirmation."
4
+ }