@phcdevworks/spectre-tokens 1.0.0 → 2.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 +0 -0
- package/README.md +41 -24
- package/dist/index.cjs +1322 -811
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +63 -34
- package/dist/index.d.cts +1356 -86
- package/dist/index.d.ts +1356 -86
- package/dist/index.js +1322 -811
- package/dist/index.js.map +1 -1
- package/package.json +20 -4
- package/tokens/components.json +437 -0
- package/tokens/modes.json +499 -0
- package/tokens/palette.json +102 -0
- package/tokens/primitives.json +151 -0
- package/tokens/semantic-roles.json +65 -0
- package/tokens/typography.json +94 -0
- package/tokens/core.json +0 -912
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
{
|
|
2
|
+
"space": {
|
|
3
|
+
"0": "0rem",
|
|
4
|
+
"4": "0.25rem",
|
|
5
|
+
"8": "0.5rem",
|
|
6
|
+
"12": "0.75rem",
|
|
7
|
+
"16": "1rem",
|
|
8
|
+
"20": "1.25rem",
|
|
9
|
+
"24": "1.5rem",
|
|
10
|
+
"32": "2rem",
|
|
11
|
+
"40": "2.5rem",
|
|
12
|
+
"48": "3rem",
|
|
13
|
+
"56": "3.5rem",
|
|
14
|
+
"64": "4rem",
|
|
15
|
+
"80": "5rem",
|
|
16
|
+
"96": "6rem"
|
|
17
|
+
},
|
|
18
|
+
"radii": {
|
|
19
|
+
"none": "0",
|
|
20
|
+
"sm": "2px",
|
|
21
|
+
"md": "4px",
|
|
22
|
+
"lg": "8px",
|
|
23
|
+
"pill": "999px"
|
|
24
|
+
},
|
|
25
|
+
"shadows": {
|
|
26
|
+
"none": "none",
|
|
27
|
+
"sm": "0 1px 2px 0 {colors.neutral.800} / 0.06",
|
|
28
|
+
"md": "0 2px 6px -1px {colors.neutral.800} / 0.08",
|
|
29
|
+
"lg": "0 6px 16px -4px {colors.neutral.800} / 0.12"
|
|
30
|
+
},
|
|
31
|
+
"breakpoints": {
|
|
32
|
+
"sm": "640px",
|
|
33
|
+
"md": "768px",
|
|
34
|
+
"lg": "1024px",
|
|
35
|
+
"xl": "1280px",
|
|
36
|
+
"2xl": "1536px"
|
|
37
|
+
},
|
|
38
|
+
"zIndex": {
|
|
39
|
+
"base": "0",
|
|
40
|
+
"dropdown": "1000",
|
|
41
|
+
"sticky": "1100",
|
|
42
|
+
"fixed": "1200",
|
|
43
|
+
"overlay": "1300",
|
|
44
|
+
"modal": "1400",
|
|
45
|
+
"popover": "1500",
|
|
46
|
+
"tooltip": "1600"
|
|
47
|
+
},
|
|
48
|
+
"transitions": {
|
|
49
|
+
"duration": {
|
|
50
|
+
"instant": "75ms",
|
|
51
|
+
"fast": "150ms",
|
|
52
|
+
"base": "200ms",
|
|
53
|
+
"moderate": "300ms",
|
|
54
|
+
"slow": "500ms",
|
|
55
|
+
"slower": "700ms"
|
|
56
|
+
},
|
|
57
|
+
"easing": {
|
|
58
|
+
"linear": "linear",
|
|
59
|
+
"in": "cubic-bezier(0.4, 0, 1, 1)",
|
|
60
|
+
"out": "cubic-bezier(0, 0, 0.2, 1)",
|
|
61
|
+
"inOut": "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
62
|
+
"spring": "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"animations": {
|
|
66
|
+
"fadeIn": {
|
|
67
|
+
"duration": "200ms",
|
|
68
|
+
"easing": "cubic-bezier(0, 0, 0.2, 1)",
|
|
69
|
+
"keyframes": "fade-in"
|
|
70
|
+
},
|
|
71
|
+
"fadeOut": {
|
|
72
|
+
"duration": "150ms",
|
|
73
|
+
"easing": "cubic-bezier(0.4, 0, 1, 1)",
|
|
74
|
+
"keyframes": "fade-out"
|
|
75
|
+
},
|
|
76
|
+
"slideUp": {
|
|
77
|
+
"duration": "300ms",
|
|
78
|
+
"easing": "cubic-bezier(0, 0, 0.2, 1)",
|
|
79
|
+
"keyframes": "slide-up"
|
|
80
|
+
},
|
|
81
|
+
"slideDown": {
|
|
82
|
+
"duration": "300ms",
|
|
83
|
+
"easing": "cubic-bezier(0, 0, 0.2, 1)",
|
|
84
|
+
"keyframes": "slide-down"
|
|
85
|
+
},
|
|
86
|
+
"scaleIn": {
|
|
87
|
+
"duration": "200ms",
|
|
88
|
+
"easing": "cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
89
|
+
"keyframes": "scale-in"
|
|
90
|
+
},
|
|
91
|
+
"bounce": {
|
|
92
|
+
"duration": "300ms",
|
|
93
|
+
"easing": "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
94
|
+
"keyframes": "bounce"
|
|
95
|
+
},
|
|
96
|
+
"shake": {
|
|
97
|
+
"duration": "250ms",
|
|
98
|
+
"easing": "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
99
|
+
"keyframes": "shake"
|
|
100
|
+
},
|
|
101
|
+
"pulse": {
|
|
102
|
+
"duration": "1200ms",
|
|
103
|
+
"easing": "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
104
|
+
"keyframes": "pulse"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"opacity": {
|
|
108
|
+
"disabled": "0.38",
|
|
109
|
+
"hover": "0.92",
|
|
110
|
+
"active": "0.84",
|
|
111
|
+
"focus": "1",
|
|
112
|
+
"overlay": "0.5",
|
|
113
|
+
"tooltip": "0.95"
|
|
114
|
+
},
|
|
115
|
+
"aspectRatios": {
|
|
116
|
+
"square": "1/1",
|
|
117
|
+
"video": "16/9",
|
|
118
|
+
"portrait": "3/4",
|
|
119
|
+
"landscape": "4/3",
|
|
120
|
+
"ultrawide": "21/9",
|
|
121
|
+
"hero": "2/1"
|
|
122
|
+
},
|
|
123
|
+
"icons": {
|
|
124
|
+
"xs": "12px",
|
|
125
|
+
"sm": "16px",
|
|
126
|
+
"md": "20px",
|
|
127
|
+
"lg": "24px",
|
|
128
|
+
"xl": "32px",
|
|
129
|
+
"2xl": "40px",
|
|
130
|
+
"3xl": "48px"
|
|
131
|
+
},
|
|
132
|
+
"accessibility": {
|
|
133
|
+
"focusRing": {
|
|
134
|
+
"width": "2px",
|
|
135
|
+
"offset": "2px",
|
|
136
|
+
"style": "solid"
|
|
137
|
+
},
|
|
138
|
+
"minTouchTarget": "44px",
|
|
139
|
+
"minTextSize": "16px"
|
|
140
|
+
},
|
|
141
|
+
"borders": {
|
|
142
|
+
"card": "{colors.neutral.200}",
|
|
143
|
+
"input": "{colors.neutral.300}"
|
|
144
|
+
},
|
|
145
|
+
"border": {
|
|
146
|
+
"width": {
|
|
147
|
+
"base": "1px",
|
|
148
|
+
"thick": "2px"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"surface": {
|
|
3
|
+
"page": {
|
|
4
|
+
"value": "{colors.neutral.50}",
|
|
5
|
+
"description": "primary app background"
|
|
6
|
+
},
|
|
7
|
+
"card": {
|
|
8
|
+
"value": "{colors.white}",
|
|
9
|
+
"description": "containers and tiles"
|
|
10
|
+
},
|
|
11
|
+
"input": {
|
|
12
|
+
"value": "{colors.white}",
|
|
13
|
+
"description": "form inputs, textareas"
|
|
14
|
+
},
|
|
15
|
+
"overlay": {
|
|
16
|
+
"value": "{colors.neutral.900} / 0.6",
|
|
17
|
+
"description": "modals, dropdowns, flyouts"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"text": {
|
|
21
|
+
"onPage": {
|
|
22
|
+
"default": "{colors.neutral.900}",
|
|
23
|
+
"muted": "{colors.neutral.600}",
|
|
24
|
+
"subtle": "{colors.neutral.500}",
|
|
25
|
+
"meta": "{colors.neutral.500}",
|
|
26
|
+
"brand": "{colors.brand.600}"
|
|
27
|
+
},
|
|
28
|
+
"onSurface": {
|
|
29
|
+
"default": "{colors.neutral.900}",
|
|
30
|
+
"muted": "{colors.neutral.600}",
|
|
31
|
+
"subtle": "{colors.neutral.500}",
|
|
32
|
+
"meta": "{colors.neutral.500}",
|
|
33
|
+
"brand": "{colors.brand.600}"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"layout": {
|
|
37
|
+
"section": {
|
|
38
|
+
"padding": {
|
|
39
|
+
"sm": "1.5rem",
|
|
40
|
+
"md": "2rem",
|
|
41
|
+
"lg": "3rem"
|
|
42
|
+
},
|
|
43
|
+
"gap": {
|
|
44
|
+
"sm": "1rem",
|
|
45
|
+
"md": "1.5rem",
|
|
46
|
+
"lg": "2rem"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"stack": {
|
|
50
|
+
"gap": {
|
|
51
|
+
"sm": "0.5rem",
|
|
52
|
+
"md": "0.75rem",
|
|
53
|
+
"lg": "1rem"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"container": {
|
|
57
|
+
"paddingInline": {
|
|
58
|
+
"sm": "1rem",
|
|
59
|
+
"md": "1.5rem",
|
|
60
|
+
"lg": "2rem"
|
|
61
|
+
},
|
|
62
|
+
"maxWidth": "72rem"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"font": {
|
|
3
|
+
"xs": {
|
|
4
|
+
"size": "0.75rem",
|
|
5
|
+
"lineHeight": "1.25rem",
|
|
6
|
+
"weight": 400
|
|
7
|
+
},
|
|
8
|
+
"sm": {
|
|
9
|
+
"size": "0.875rem",
|
|
10
|
+
"lineHeight": "1.5rem",
|
|
11
|
+
"weight": 400
|
|
12
|
+
},
|
|
13
|
+
"md": {
|
|
14
|
+
"size": "1rem",
|
|
15
|
+
"lineHeight": "1.75rem",
|
|
16
|
+
"weight": 500
|
|
17
|
+
},
|
|
18
|
+
"lg": {
|
|
19
|
+
"size": "1.25rem",
|
|
20
|
+
"lineHeight": "2rem",
|
|
21
|
+
"weight": 500
|
|
22
|
+
},
|
|
23
|
+
"xl": {
|
|
24
|
+
"size": "1.5rem",
|
|
25
|
+
"lineHeight": "2.125rem",
|
|
26
|
+
"weight": 600
|
|
27
|
+
},
|
|
28
|
+
"2xl": {
|
|
29
|
+
"size": "1.875rem",
|
|
30
|
+
"lineHeight": "2.5rem",
|
|
31
|
+
"weight": 600
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"typography": {
|
|
35
|
+
"families": {
|
|
36
|
+
"sans": "system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif",
|
|
37
|
+
"serif": "'Times New Roman', Times, serif",
|
|
38
|
+
"mono": "'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace"
|
|
39
|
+
},
|
|
40
|
+
"scale": {
|
|
41
|
+
"xs": {
|
|
42
|
+
"fontSize": "0.75rem",
|
|
43
|
+
"lineHeight": "1.25rem",
|
|
44
|
+
"fontWeight": 400,
|
|
45
|
+
"letterSpacing": "0.02em"
|
|
46
|
+
},
|
|
47
|
+
"sm": {
|
|
48
|
+
"fontSize": "0.875rem",
|
|
49
|
+
"lineHeight": "1.5rem",
|
|
50
|
+
"fontWeight": 400
|
|
51
|
+
},
|
|
52
|
+
"md": {
|
|
53
|
+
"fontSize": "1rem",
|
|
54
|
+
"lineHeight": "1.75rem",
|
|
55
|
+
"fontWeight": 500
|
|
56
|
+
},
|
|
57
|
+
"lg": {
|
|
58
|
+
"fontSize": "1.25rem",
|
|
59
|
+
"lineHeight": "2rem",
|
|
60
|
+
"fontWeight": 600
|
|
61
|
+
},
|
|
62
|
+
"xl": {
|
|
63
|
+
"fontSize": "1.5rem",
|
|
64
|
+
"lineHeight": "2.125rem",
|
|
65
|
+
"fontWeight": 600
|
|
66
|
+
},
|
|
67
|
+
"2xl": {
|
|
68
|
+
"fontSize": "1.875rem",
|
|
69
|
+
"lineHeight": "2.5rem",
|
|
70
|
+
"fontWeight": 700
|
|
71
|
+
},
|
|
72
|
+
"3xl": {
|
|
73
|
+
"fontSize": "2.25rem",
|
|
74
|
+
"lineHeight": "2.75rem",
|
|
75
|
+
"fontWeight": 700
|
|
76
|
+
},
|
|
77
|
+
"4xl": {
|
|
78
|
+
"fontSize": "3rem",
|
|
79
|
+
"lineHeight": "3.5rem",
|
|
80
|
+
"fontWeight": 800
|
|
81
|
+
},
|
|
82
|
+
"5xl": {
|
|
83
|
+
"fontSize": "3.75rem",
|
|
84
|
+
"lineHeight": "4.25rem",
|
|
85
|
+
"fontWeight": 800
|
|
86
|
+
},
|
|
87
|
+
"6xl": {
|
|
88
|
+
"fontSize": "4.5rem",
|
|
89
|
+
"lineHeight": "5rem",
|
|
90
|
+
"fontWeight": 900
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|