@needless-ui/tokens 0.1.0
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.
- package/LICENSE +21 -0
- package/README.md +40 -0
- package/dist/tokens.css +325 -0
- package/dist/tokens.json +1676 -0
- package/package.json +45 -0
- package/src/color/dark.tokens.json +716 -0
- package/src/color/light.tokens.json +716 -0
- package/src/color/static.tokens.json +32 -0
- package/src/dimension.tokens.json +43 -0
- package/src/elevation.tokens.json +51 -0
- package/src/motion.tokens.json +15 -0
- package/src/semantic.tokens.json +82 -0
- package/src/typography.tokens.json +41 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$description": "Generated by scripts/palette.ts. Colors that stay the same in every mode.",
|
|
3
|
+
"color": {
|
|
4
|
+
"$type": "color",
|
|
5
|
+
"static": {
|
|
6
|
+
"white": {
|
|
7
|
+
"$value": {
|
|
8
|
+
"colorSpace": "oklch",
|
|
9
|
+
"components": [
|
|
10
|
+
1,
|
|
11
|
+
0,
|
|
12
|
+
0
|
|
13
|
+
],
|
|
14
|
+
"hex": "#ffffff"
|
|
15
|
+
},
|
|
16
|
+
"$description": "Text on dark solid fills."
|
|
17
|
+
},
|
|
18
|
+
"ink": {
|
|
19
|
+
"$value": {
|
|
20
|
+
"colorSpace": "oklch",
|
|
21
|
+
"components": [
|
|
22
|
+
0.22,
|
|
23
|
+
0.02,
|
|
24
|
+
262
|
|
25
|
+
],
|
|
26
|
+
"hex": "#161b24"
|
|
27
|
+
},
|
|
28
|
+
"$description": "Text on bright solid fills, such as warning."
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"space": {
|
|
3
|
+
"$type": "dimension",
|
|
4
|
+
"$description": "Spacing scale on a 4px grid.",
|
|
5
|
+
"0": { "$value": { "value": 0, "unit": "px" } },
|
|
6
|
+
"1": { "$value": { "value": 0.25, "unit": "rem" } },
|
|
7
|
+
"2": { "$value": { "value": 0.5, "unit": "rem" } },
|
|
8
|
+
"3": { "$value": { "value": 0.75, "unit": "rem" } },
|
|
9
|
+
"4": { "$value": { "value": 1, "unit": "rem" } },
|
|
10
|
+
"5": { "$value": { "value": 1.25, "unit": "rem" } },
|
|
11
|
+
"6": { "$value": { "value": 1.5, "unit": "rem" } },
|
|
12
|
+
"8": { "$value": { "value": 2, "unit": "rem" } },
|
|
13
|
+
"10": { "$value": { "value": 2.5, "unit": "rem" } },
|
|
14
|
+
"12": { "$value": { "value": 3, "unit": "rem" } },
|
|
15
|
+
"16": { "$value": { "value": 4, "unit": "rem" } }
|
|
16
|
+
},
|
|
17
|
+
"radius": {
|
|
18
|
+
"$type": "dimension",
|
|
19
|
+
"none": { "$value": { "value": 0, "unit": "px" } },
|
|
20
|
+
"sm": { "$value": { "value": 0.25, "unit": "rem" } },
|
|
21
|
+
"md": { "$value": { "value": 0.375, "unit": "rem" } },
|
|
22
|
+
"lg": { "$value": { "value": 0.5, "unit": "rem" } },
|
|
23
|
+
"xl": { "$value": { "value": 0.75, "unit": "rem" } },
|
|
24
|
+
"full": { "$value": { "value": 9999, "unit": "px" } }
|
|
25
|
+
},
|
|
26
|
+
"border-width": {
|
|
27
|
+
"$type": "dimension",
|
|
28
|
+
"thin": { "$value": { "value": 1, "unit": "px" } },
|
|
29
|
+
"thick": { "$value": { "value": 2, "unit": "px" } }
|
|
30
|
+
},
|
|
31
|
+
"control-height": {
|
|
32
|
+
"$type": "dimension",
|
|
33
|
+
"$description": "Heights for buttons and inputs. The smallest still clears the WCAG 2.2 24×24px target minimum.",
|
|
34
|
+
"sm": { "$value": { "value": 1.75, "unit": "rem" } },
|
|
35
|
+
"md": { "$value": { "value": 2.25, "unit": "rem" } },
|
|
36
|
+
"lg": { "$value": { "value": 2.75, "unit": "rem" } }
|
|
37
|
+
},
|
|
38
|
+
"focus-ring": {
|
|
39
|
+
"$type": "dimension",
|
|
40
|
+
"width": { "$value": { "value": 2, "unit": "px" } },
|
|
41
|
+
"offset": { "$value": { "value": 2, "unit": "px" } }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"shadow": {
|
|
3
|
+
"$type": "shadow",
|
|
4
|
+
"$description": "Elevation for floating surfaces. The color comes from each mode, so shadows stay visible on dark canvases.",
|
|
5
|
+
"sm": {
|
|
6
|
+
"$value": {
|
|
7
|
+
"color": "{color.shadow}",
|
|
8
|
+
"offsetX": { "value": 0, "unit": "px" },
|
|
9
|
+
"offsetY": { "value": 1, "unit": "px" },
|
|
10
|
+
"blur": { "value": 2, "unit": "px" },
|
|
11
|
+
"spread": { "value": 0, "unit": "px" }
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"md": {
|
|
15
|
+
"$value": [
|
|
16
|
+
{
|
|
17
|
+
"color": "{color.shadow}",
|
|
18
|
+
"offsetX": { "value": 0, "unit": "px" },
|
|
19
|
+
"offsetY": { "value": 8, "unit": "px" },
|
|
20
|
+
"blur": { "value": 24, "unit": "px" },
|
|
21
|
+
"spread": { "value": -6, "unit": "px" }
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"color": "{color.shadow}",
|
|
25
|
+
"offsetX": { "value": 0, "unit": "px" },
|
|
26
|
+
"offsetY": { "value": 1, "unit": "px" },
|
|
27
|
+
"blur": { "value": 3, "unit": "px" },
|
|
28
|
+
"spread": { "value": 0, "unit": "px" }
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"lg": {
|
|
33
|
+
"$value": [
|
|
34
|
+
{
|
|
35
|
+
"color": "{color.shadow}",
|
|
36
|
+
"offsetX": { "value": 0, "unit": "px" },
|
|
37
|
+
"offsetY": { "value": 24, "unit": "px" },
|
|
38
|
+
"blur": { "value": 48, "unit": "px" },
|
|
39
|
+
"spread": { "value": -12, "unit": "px" }
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"color": "{color.shadow}",
|
|
43
|
+
"offsetX": { "value": 0, "unit": "px" },
|
|
44
|
+
"offsetY": { "value": 2, "unit": "px" },
|
|
45
|
+
"blur": { "value": 6, "unit": "px" },
|
|
46
|
+
"spread": { "value": 0, "unit": "px" }
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"duration": {
|
|
3
|
+
"$type": "duration",
|
|
4
|
+
"$description": "Collapsed to near-zero when the user prefers reduced motion.",
|
|
5
|
+
"fast": { "$value": { "value": 120, "unit": "ms" } },
|
|
6
|
+
"normal": { "$value": { "value": 200, "unit": "ms" } },
|
|
7
|
+
"slow": { "$value": { "value": 320, "unit": "ms" } }
|
|
8
|
+
},
|
|
9
|
+
"easing": {
|
|
10
|
+
"$type": "cubicBezier",
|
|
11
|
+
"standard": { "$value": [0.2, 0, 0, 1] },
|
|
12
|
+
"enter": { "$value": [0, 0, 0.2, 1] },
|
|
13
|
+
"exit": { "$value": [0.4, 0, 1, 1] }
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$description": "Semantic aliases. Components use these, never the numbered scales, so a mode switch only has to swap the scales.",
|
|
3
|
+
"color": {
|
|
4
|
+
"$type": "color",
|
|
5
|
+
"bg": {
|
|
6
|
+
"canvas": { "$value": "{color.neutral.1}", "$description": "Page background." },
|
|
7
|
+
"subtle": {
|
|
8
|
+
"$value": "{color.neutral.2}",
|
|
9
|
+
"$description": "Slightly raised or recessed areas."
|
|
10
|
+
},
|
|
11
|
+
"muted": { "$value": "{color.neutral.3}", "$description": "Wells and quiet fills." }
|
|
12
|
+
},
|
|
13
|
+
"text": {
|
|
14
|
+
"default": { "$value": "{color.neutral.12}" },
|
|
15
|
+
"muted": { "$value": "{color.neutral.11}" }
|
|
16
|
+
},
|
|
17
|
+
"border": {
|
|
18
|
+
"subtle": { "$value": "{color.neutral.6}" },
|
|
19
|
+
"default": { "$value": "{color.neutral.7}" },
|
|
20
|
+
"strong": { "$value": "{color.neutral.8}" }
|
|
21
|
+
},
|
|
22
|
+
"focus-ring": {
|
|
23
|
+
"$value": "{color.accent.11}",
|
|
24
|
+
"$description": "Keyboard focus outline. At least 3:1 against the canvas in both modes."
|
|
25
|
+
},
|
|
26
|
+
"accent": {
|
|
27
|
+
"solid": { "$value": "{color.accent.9}" },
|
|
28
|
+
"solid-hover": { "$value": "{color.accent.10}" },
|
|
29
|
+
"on-solid": { "$value": "{color.static.white}" },
|
|
30
|
+
"soft": { "$value": "{color.accent.3}" },
|
|
31
|
+
"soft-hover": { "$value": "{color.accent.4}" },
|
|
32
|
+
"soft-active": { "$value": "{color.accent.5}" },
|
|
33
|
+
"border": { "$value": "{color.accent.7}" },
|
|
34
|
+
"border-hover": { "$value": "{color.accent.8}" },
|
|
35
|
+
"text": { "$value": "{color.accent.11}" }
|
|
36
|
+
},
|
|
37
|
+
"neutral": {
|
|
38
|
+
"solid": { "$value": "{color.neutral.12}" },
|
|
39
|
+
"solid-hover": { "$value": "{color.neutral.11}" },
|
|
40
|
+
"on-solid": { "$value": "{color.neutral.1}" },
|
|
41
|
+
"soft": { "$value": "{color.neutral.3}" },
|
|
42
|
+
"soft-hover": { "$value": "{color.neutral.4}" },
|
|
43
|
+
"soft-active": { "$value": "{color.neutral.5}" },
|
|
44
|
+
"border": { "$value": "{color.neutral.7}" },
|
|
45
|
+
"border-hover": { "$value": "{color.neutral.8}" },
|
|
46
|
+
"text": { "$value": "{color.neutral.12}" }
|
|
47
|
+
},
|
|
48
|
+
"danger": {
|
|
49
|
+
"solid": { "$value": "{color.danger.9}" },
|
|
50
|
+
"solid-hover": { "$value": "{color.danger.10}" },
|
|
51
|
+
"on-solid": { "$value": "{color.static.white}" },
|
|
52
|
+
"soft": { "$value": "{color.danger.3}" },
|
|
53
|
+
"soft-hover": { "$value": "{color.danger.4}" },
|
|
54
|
+
"soft-active": { "$value": "{color.danger.5}" },
|
|
55
|
+
"border": { "$value": "{color.danger.7}" },
|
|
56
|
+
"border-hover": { "$value": "{color.danger.8}" },
|
|
57
|
+
"text": { "$value": "{color.danger.11}" }
|
|
58
|
+
},
|
|
59
|
+
"success": {
|
|
60
|
+
"solid": { "$value": "{color.success.9}" },
|
|
61
|
+
"solid-hover": { "$value": "{color.success.10}" },
|
|
62
|
+
"on-solid": { "$value": "{color.static.white}" },
|
|
63
|
+
"soft": { "$value": "{color.success.3}" },
|
|
64
|
+
"soft-hover": { "$value": "{color.success.4}" },
|
|
65
|
+
"soft-active": { "$value": "{color.success.5}" },
|
|
66
|
+
"border": { "$value": "{color.success.7}" },
|
|
67
|
+
"border-hover": { "$value": "{color.success.8}" },
|
|
68
|
+
"text": { "$value": "{color.success.11}" }
|
|
69
|
+
},
|
|
70
|
+
"warning": {
|
|
71
|
+
"solid": { "$value": "{color.warning.9}" },
|
|
72
|
+
"solid-hover": { "$value": "{color.warning.10}" },
|
|
73
|
+
"on-solid": { "$value": "{color.static.ink}" },
|
|
74
|
+
"soft": { "$value": "{color.warning.3}" },
|
|
75
|
+
"soft-hover": { "$value": "{color.warning.4}" },
|
|
76
|
+
"soft-active": { "$value": "{color.warning.5}" },
|
|
77
|
+
"border": { "$value": "{color.warning.7}" },
|
|
78
|
+
"border-hover": { "$value": "{color.warning.8}" },
|
|
79
|
+
"text": { "$value": "{color.warning.11}" }
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"font-family": {
|
|
3
|
+
"$type": "fontFamily",
|
|
4
|
+
"sans": {
|
|
5
|
+
"$value": [
|
|
6
|
+
"system-ui",
|
|
7
|
+
"-apple-system",
|
|
8
|
+
"Segoe UI",
|
|
9
|
+
"Roboto",
|
|
10
|
+
"Helvetica Neue",
|
|
11
|
+
"Arial",
|
|
12
|
+
"sans-serif"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"mono": {
|
|
16
|
+
"$value": ["ui-monospace", "SFMono-Regular", "SF Mono", "Menlo", "Consolas", "monospace"]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"font-size": {
|
|
20
|
+
"$type": "dimension",
|
|
21
|
+
"xs": { "$value": { "value": 0.75, "unit": "rem" } },
|
|
22
|
+
"sm": { "$value": { "value": 0.875, "unit": "rem" } },
|
|
23
|
+
"md": { "$value": { "value": 1, "unit": "rem" } },
|
|
24
|
+
"lg": { "$value": { "value": 1.125, "unit": "rem" } },
|
|
25
|
+
"xl": { "$value": { "value": 1.25, "unit": "rem" } },
|
|
26
|
+
"2xl": { "$value": { "value": 1.5, "unit": "rem" } },
|
|
27
|
+
"3xl": { "$value": { "value": 1.875, "unit": "rem" } }
|
|
28
|
+
},
|
|
29
|
+
"font-weight": {
|
|
30
|
+
"$type": "fontWeight",
|
|
31
|
+
"regular": { "$value": 400 },
|
|
32
|
+
"medium": { "$value": 500 },
|
|
33
|
+
"semibold": { "$value": 600 },
|
|
34
|
+
"bold": { "$value": 700 }
|
|
35
|
+
},
|
|
36
|
+
"line-height": {
|
|
37
|
+
"$type": "number",
|
|
38
|
+
"tight": { "$value": 1.25 },
|
|
39
|
+
"normal": { "$value": 1.5 }
|
|
40
|
+
}
|
|
41
|
+
}
|