@code-sherpas/pharos-tokens 0.5.0 → 0.7.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/README.md +7 -0
- package/RULES.md +1 -1
- package/dist/index.js +83 -16
- package/dist/styles.css +145 -98
- package/dist/tokens.d.ts +192 -91
- package/dist/tokens.js +153 -98
- package/dist/tokens.json +83 -16
- package/package.json +2 -1
- package/src/color.tokens.json +77 -77
- package/src/radius.tokens.json +24 -8
- package/src/shadow.tokens.json +113 -18
- package/src/spacing.tokens.json +61 -17
- package/src/typography.tokens.json +139 -12
package/src/shadow.tokens.json
CHANGED
|
@@ -3,37 +3,115 @@
|
|
|
3
3
|
"sm": {
|
|
4
4
|
"$value": "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
5
5
|
"$type": "shadow",
|
|
6
|
-
"$description": "
|
|
6
|
+
"$description": "Resting elements."
|
|
7
7
|
},
|
|
8
8
|
"md": {
|
|
9
9
|
"$value": "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
|
10
10
|
"$type": "shadow",
|
|
11
|
-
"$description": "
|
|
11
|
+
"$description": "Cards."
|
|
12
12
|
},
|
|
13
13
|
"lg": {
|
|
14
14
|
"$value": "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
|
|
15
15
|
"$type": "shadow",
|
|
16
|
-
"$description": "
|
|
16
|
+
"$description": "Popups: popovers, dropdown menus."
|
|
17
17
|
},
|
|
18
18
|
"xl": {
|
|
19
19
|
"$value": "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
|
|
20
20
|
"$type": "shadow",
|
|
21
|
-
"$description": "Modals
|
|
21
|
+
"$description": "Modals and sheets."
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"zIndex": {
|
|
25
|
+
"base": {
|
|
26
|
+
"$value": "0",
|
|
27
|
+
"$type": "number",
|
|
28
|
+
"$description": "The page flow: the default stacking context."
|
|
29
|
+
},
|
|
30
|
+
"sticky": {
|
|
31
|
+
"$value": "1100",
|
|
32
|
+
"$type": "number",
|
|
33
|
+
"$description": "Sticky and fixed app chrome: headers, top bars, sticky table headers."
|
|
34
|
+
},
|
|
35
|
+
"overlay": {
|
|
36
|
+
"$value": "1300",
|
|
37
|
+
"$type": "number",
|
|
38
|
+
"$description": "The scrim behind modal UI (Dialog, Sheet)."
|
|
39
|
+
},
|
|
40
|
+
"modal": {
|
|
41
|
+
"$value": "1400",
|
|
42
|
+
"$type": "number",
|
|
43
|
+
"$description": "Modal UI: Dialog and Sheet panels."
|
|
44
|
+
},
|
|
45
|
+
"popover": {
|
|
46
|
+
"$value": "1500",
|
|
47
|
+
"$type": "number",
|
|
48
|
+
"$description": "Anchored floating UI: Popover, DropdownMenu, Select and Combobox lists. Above modal so it can open from inside a Dialog or Sheet."
|
|
49
|
+
},
|
|
50
|
+
"toast": {
|
|
51
|
+
"$value": "1700",
|
|
52
|
+
"$type": "number",
|
|
53
|
+
"$description": "Toasts and transient notifications."
|
|
54
|
+
},
|
|
55
|
+
"tooltip": {
|
|
56
|
+
"$value": "1800",
|
|
57
|
+
"$type": "number",
|
|
58
|
+
"$description": "Tooltips: always on top."
|
|
22
59
|
}
|
|
23
60
|
},
|
|
24
61
|
"z": {
|
|
25
|
-
"0": {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
62
|
+
"0": {
|
|
63
|
+
"$value": "0",
|
|
64
|
+
"$type": "number",
|
|
65
|
+
"$description": "DEPRECATED: use --pharos-z-index-base (decision D29). Removed in the next major.",
|
|
66
|
+
"$deprecated": "Use {zIndex.base} (decision D29). Removed in the next major."
|
|
67
|
+
},
|
|
68
|
+
"header": {
|
|
69
|
+
"$value": "1000",
|
|
70
|
+
"$type": "number",
|
|
71
|
+
"$deprecated": "Use {zIndex.sticky} (decision D29). Removed in the next major.",
|
|
72
|
+
"$description": "DEPRECATED: use --pharos-z-index-sticky (decision D29). Removed in the next major."
|
|
73
|
+
},
|
|
74
|
+
"above-header": {
|
|
75
|
+
"$value": "1100",
|
|
76
|
+
"$type": "number",
|
|
77
|
+
"$deprecated": "Use {zIndex.sticky} (decision D29). Removed in the next major.",
|
|
78
|
+
"$description": "DEPRECATED: use --pharos-z-index-sticky (decision D29). Removed in the next major."
|
|
79
|
+
},
|
|
80
|
+
"modal-overlay": {
|
|
81
|
+
"$value": "9998",
|
|
82
|
+
"$type": "number",
|
|
83
|
+
"$deprecated": "Use {zIndex.overlay} (decision D29). Removed in the next major.",
|
|
84
|
+
"$description": "DEPRECATED: use --pharos-z-index-overlay (decision D29). Removed in the next major."
|
|
85
|
+
},
|
|
86
|
+
"modal": {
|
|
87
|
+
"$value": "9999",
|
|
88
|
+
"$type": "number",
|
|
89
|
+
"$deprecated": "Use {zIndex.modal} (decision D29). Removed in the next major.",
|
|
90
|
+
"$description": "DEPRECATED: use --pharos-z-index-modal (decision D29). Removed in the next major."
|
|
91
|
+
},
|
|
92
|
+
"drawer-overlay": {
|
|
93
|
+
"$value": "9999",
|
|
94
|
+
"$type": "number",
|
|
95
|
+
"$deprecated": "Use {zIndex.overlay} (decision D29). Removed in the next major.",
|
|
96
|
+
"$description": "DEPRECATED: use --pharos-z-index-overlay (decision D29). Removed in the next major."
|
|
97
|
+
},
|
|
98
|
+
"drawer": {
|
|
99
|
+
"$value": "10000",
|
|
100
|
+
"$type": "number",
|
|
101
|
+
"$deprecated": "Use {zIndex.modal} (decision D29). Removed in the next major.",
|
|
102
|
+
"$description": "DEPRECATED: use --pharos-z-index-modal (decision D29). Removed in the next major."
|
|
103
|
+
},
|
|
104
|
+
"dropdown": {
|
|
105
|
+
"$value": "10001",
|
|
106
|
+
"$type": "number",
|
|
107
|
+
"$deprecated": "Use {zIndex.popover} (decision D29). Removed in the next major.",
|
|
108
|
+
"$description": "DEPRECATED: use --pharos-z-index-popover (decision D29). Removed in the next major."
|
|
109
|
+
},
|
|
33
110
|
"tooltip": {
|
|
34
111
|
"$value": "10002",
|
|
35
112
|
"$type": "number",
|
|
36
|
-
"$description": "
|
|
113
|
+
"$description": "DEPRECATED: use --pharos-z-index-tooltip (decision D29). Removed in the next major.",
|
|
114
|
+
"$deprecated": "Use {zIndex.tooltip} (decision D29). Removed in the next major."
|
|
37
115
|
}
|
|
38
116
|
},
|
|
39
117
|
"duration": {
|
|
@@ -42,12 +120,29 @@
|
|
|
42
120
|
"$type": "duration",
|
|
43
121
|
"$description": "Micro interactions (hover)."
|
|
44
122
|
},
|
|
45
|
-
"normal": {
|
|
46
|
-
|
|
123
|
+
"normal": {
|
|
124
|
+
"$value": "200ms",
|
|
125
|
+
"$type": "duration",
|
|
126
|
+
"$description": "Default transitions."
|
|
127
|
+
},
|
|
128
|
+
"slow": {
|
|
129
|
+
"$value": "300ms",
|
|
130
|
+
"$type": "duration",
|
|
131
|
+
"$description": "Panel slide, overlay fade."
|
|
132
|
+
}
|
|
47
133
|
},
|
|
48
134
|
"easing": {
|
|
49
|
-
"in": {
|
|
50
|
-
|
|
51
|
-
|
|
135
|
+
"in": {
|
|
136
|
+
"$value": "cubic-bezier(0.4, 0, 1, 1)",
|
|
137
|
+
"$type": "cubicBezier"
|
|
138
|
+
},
|
|
139
|
+
"out": {
|
|
140
|
+
"$value": "cubic-bezier(0, 0, 0.2, 1)",
|
|
141
|
+
"$type": "cubicBezier"
|
|
142
|
+
},
|
|
143
|
+
"in-out": {
|
|
144
|
+
"$value": "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
145
|
+
"$type": "cubicBezier"
|
|
146
|
+
}
|
|
52
147
|
}
|
|
53
148
|
}
|
package/src/spacing.tokens.json
CHANGED
|
@@ -1,45 +1,89 @@
|
|
|
1
1
|
{
|
|
2
2
|
"spacing": {
|
|
3
|
-
"0": {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
"0": {
|
|
4
|
+
"$value": "0",
|
|
5
|
+
"$type": "dimension",
|
|
6
|
+
"$description": "0 step of the rem scale."
|
|
7
|
+
},
|
|
8
|
+
"1": {
|
|
9
|
+
"$value": "0.25rem",
|
|
10
|
+
"$type": "dimension",
|
|
11
|
+
"$description": "4px step of the rem scale."
|
|
12
|
+
},
|
|
7
13
|
"2": {
|
|
8
14
|
"$value": "0.5rem",
|
|
9
15
|
"$type": "dimension",
|
|
10
|
-
"$description": "8px
|
|
16
|
+
"$description": "8px step of the rem scale."
|
|
11
17
|
},
|
|
12
|
-
"2.5": { "$value": "0.625rem", "$type": "dimension", "$description": "10px." },
|
|
13
18
|
"3": {
|
|
14
19
|
"$value": "0.75rem",
|
|
15
20
|
"$type": "dimension",
|
|
16
|
-
"$description": "12px
|
|
21
|
+
"$description": "12px step of the rem scale."
|
|
17
22
|
},
|
|
18
23
|
"4": {
|
|
19
24
|
"$value": "1rem",
|
|
20
25
|
"$type": "dimension",
|
|
21
|
-
"$description": "16px. Default body padding
|
|
26
|
+
"$description": "16px step of the rem scale. Default body padding."
|
|
27
|
+
},
|
|
28
|
+
"5": {
|
|
29
|
+
"$value": "1.25rem",
|
|
30
|
+
"$type": "dimension",
|
|
31
|
+
"$description": "20px step of the rem scale."
|
|
22
32
|
},
|
|
23
|
-
"5": { "$value": "1.25rem", "$type": "dimension", "$description": "20px." },
|
|
24
33
|
"6": {
|
|
25
34
|
"$value": "1.5rem",
|
|
26
35
|
"$type": "dimension",
|
|
27
|
-
"$description": "24px. Default card padding
|
|
36
|
+
"$description": "24px step of the rem scale. Default card padding."
|
|
37
|
+
},
|
|
38
|
+
"7": {
|
|
39
|
+
"$value": "1.75rem",
|
|
40
|
+
"$type": "dimension",
|
|
41
|
+
"$description": "28px step of the rem scale."
|
|
28
42
|
},
|
|
29
|
-
"7": { "$value": "1.75rem", "$type": "dimension", "$description": "28px." },
|
|
30
43
|
"8": {
|
|
31
44
|
"$value": "2rem",
|
|
32
45
|
"$type": "dimension",
|
|
33
|
-
"$description": "32px. Section gap
|
|
46
|
+
"$description": "32px step of the rem scale. Section gap; height of sm controls."
|
|
34
47
|
},
|
|
35
48
|
"10": {
|
|
36
49
|
"$value": "2.5rem",
|
|
37
50
|
"$type": "dimension",
|
|
38
|
-
"$description": "40px
|
|
51
|
+
"$description": "40px step of the rem scale. Height of md controls."
|
|
39
52
|
},
|
|
40
|
-
"12": {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
53
|
+
"12": {
|
|
54
|
+
"$value": "3rem",
|
|
55
|
+
"$type": "dimension",
|
|
56
|
+
"$description": "48px step of the rem scale. Height of lg controls."
|
|
57
|
+
},
|
|
58
|
+
"16": {
|
|
59
|
+
"$value": "4rem",
|
|
60
|
+
"$type": "dimension",
|
|
61
|
+
"$description": "64px step of the rem scale."
|
|
62
|
+
},
|
|
63
|
+
"20": {
|
|
64
|
+
"$value": "5rem",
|
|
65
|
+
"$type": "dimension",
|
|
66
|
+
"$description": "80px step of the rem scale."
|
|
67
|
+
},
|
|
68
|
+
"24": {
|
|
69
|
+
"$value": "6rem",
|
|
70
|
+
"$type": "dimension",
|
|
71
|
+
"$description": "96px step of the rem scale."
|
|
72
|
+
},
|
|
73
|
+
"0.5": {
|
|
74
|
+
"$value": "0.125rem",
|
|
75
|
+
"$type": "dimension",
|
|
76
|
+
"$description": "2px step of the rem scale."
|
|
77
|
+
},
|
|
78
|
+
"1.5": {
|
|
79
|
+
"$value": "0.375rem",
|
|
80
|
+
"$type": "dimension",
|
|
81
|
+
"$description": "6px step of the rem scale."
|
|
82
|
+
},
|
|
83
|
+
"2.5": {
|
|
84
|
+
"$value": "0.625rem",
|
|
85
|
+
"$type": "dimension",
|
|
86
|
+
"$description": "10px step of the rem scale."
|
|
87
|
+
}
|
|
44
88
|
}
|
|
45
89
|
}
|
|
@@ -13,10 +13,22 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"weight": {
|
|
16
|
-
"regular": {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
"regular": {
|
|
17
|
+
"$value": "400",
|
|
18
|
+
"$type": "fontWeight"
|
|
19
|
+
},
|
|
20
|
+
"medium": {
|
|
21
|
+
"$value": "500",
|
|
22
|
+
"$type": "fontWeight"
|
|
23
|
+
},
|
|
24
|
+
"semibold": {
|
|
25
|
+
"$value": "600",
|
|
26
|
+
"$type": "fontWeight"
|
|
27
|
+
},
|
|
28
|
+
"bold": {
|
|
29
|
+
"$value": "700",
|
|
30
|
+
"$type": "fontWeight"
|
|
31
|
+
}
|
|
20
32
|
},
|
|
21
33
|
"size": {
|
|
22
34
|
"xs": {
|
|
@@ -66,16 +78,131 @@
|
|
|
66
78
|
}
|
|
67
79
|
},
|
|
68
80
|
"lineHeight": {
|
|
69
|
-
"tight": {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"
|
|
81
|
+
"tight": {
|
|
82
|
+
"$value": "1.25",
|
|
83
|
+
"$type": "number"
|
|
84
|
+
},
|
|
85
|
+
"snug": {
|
|
86
|
+
"$value": "1.375",
|
|
87
|
+
"$type": "number"
|
|
88
|
+
},
|
|
89
|
+
"normal": {
|
|
90
|
+
"$value": "1.5",
|
|
91
|
+
"$type": "number",
|
|
92
|
+
"$description": "Default body line-height."
|
|
93
|
+
},
|
|
94
|
+
"relaxed": {
|
|
95
|
+
"$value": "1.625",
|
|
96
|
+
"$type": "number"
|
|
97
|
+
},
|
|
98
|
+
"loose": {
|
|
99
|
+
"$value": "2",
|
|
100
|
+
"$type": "number"
|
|
101
|
+
}
|
|
74
102
|
},
|
|
75
103
|
"letterSpacing": {
|
|
76
|
-
"tight": {
|
|
77
|
-
|
|
78
|
-
|
|
104
|
+
"tight": {
|
|
105
|
+
"$value": "-0.025em",
|
|
106
|
+
"$type": "dimension"
|
|
107
|
+
},
|
|
108
|
+
"normal": {
|
|
109
|
+
"$value": "0",
|
|
110
|
+
"$type": "dimension"
|
|
111
|
+
},
|
|
112
|
+
"wide": {
|
|
113
|
+
"$value": "0.025em",
|
|
114
|
+
"$type": "dimension"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"type": {
|
|
119
|
+
"display": {
|
|
120
|
+
"$type": "typography",
|
|
121
|
+
"$value": {
|
|
122
|
+
"fontFamily": "{font.family.sans}",
|
|
123
|
+
"fontSize": "{font.size.5xl}",
|
|
124
|
+
"fontWeight": "{font.weight.bold}",
|
|
125
|
+
"lineHeight": "1.1",
|
|
126
|
+
"letterSpacing": "{font.letterSpacing.tight}"
|
|
127
|
+
},
|
|
128
|
+
"$description": "Display (5xl). Brand surfaces and covers."
|
|
129
|
+
},
|
|
130
|
+
"h1": {
|
|
131
|
+
"$type": "typography",
|
|
132
|
+
"$value": {
|
|
133
|
+
"fontFamily": "{font.family.sans}",
|
|
134
|
+
"fontSize": "{font.size.4xl}",
|
|
135
|
+
"fontWeight": "{font.weight.bold}",
|
|
136
|
+
"lineHeight": "{font.lineHeight.tight}",
|
|
137
|
+
"letterSpacing": "-0.02em"
|
|
138
|
+
},
|
|
139
|
+
"$description": "H1 (4xl)."
|
|
140
|
+
},
|
|
141
|
+
"h2": {
|
|
142
|
+
"$type": "typography",
|
|
143
|
+
"$value": {
|
|
144
|
+
"fontFamily": "{font.family.sans}",
|
|
145
|
+
"fontSize": "{font.size.3xl}",
|
|
146
|
+
"fontWeight": "{font.weight.semibold}",
|
|
147
|
+
"lineHeight": "{font.lineHeight.tight}",
|
|
148
|
+
"letterSpacing": "{font.letterSpacing.normal}"
|
|
149
|
+
},
|
|
150
|
+
"$description": "H2 (3xl)."
|
|
151
|
+
},
|
|
152
|
+
"h3": {
|
|
153
|
+
"$type": "typography",
|
|
154
|
+
"$value": {
|
|
155
|
+
"fontFamily": "{font.family.sans}",
|
|
156
|
+
"fontSize": "{font.size.2xl}",
|
|
157
|
+
"fontWeight": "{font.weight.semibold}",
|
|
158
|
+
"lineHeight": "{font.lineHeight.tight}",
|
|
159
|
+
"letterSpacing": "{font.letterSpacing.normal}"
|
|
160
|
+
},
|
|
161
|
+
"$description": "H3 / large titles (2xl)."
|
|
162
|
+
},
|
|
163
|
+
"lesson-title": {
|
|
164
|
+
"$type": "typography",
|
|
165
|
+
"$value": {
|
|
166
|
+
"fontFamily": "{font.family.sans}",
|
|
167
|
+
"fontSize": "{font.size.xl}",
|
|
168
|
+
"fontWeight": "{font.weight.semibold}",
|
|
169
|
+
"lineHeight": "{font.lineHeight.tight}",
|
|
170
|
+
"letterSpacing": "{font.letterSpacing.normal}"
|
|
171
|
+
},
|
|
172
|
+
"$description": "Lesson titles (xl)."
|
|
173
|
+
},
|
|
174
|
+
"subtitle": {
|
|
175
|
+
"$type": "typography",
|
|
176
|
+
"$value": {
|
|
177
|
+
"fontFamily": "{font.family.sans}",
|
|
178
|
+
"fontSize": "{font.size.lg}",
|
|
179
|
+
"fontWeight": "{font.weight.medium}",
|
|
180
|
+
"lineHeight": "{font.lineHeight.tight}",
|
|
181
|
+
"letterSpacing": "{font.letterSpacing.normal}"
|
|
182
|
+
},
|
|
183
|
+
"$description": "Subtitles (lg)."
|
|
184
|
+
},
|
|
185
|
+
"body": {
|
|
186
|
+
"$type": "typography",
|
|
187
|
+
"$value": {
|
|
188
|
+
"fontFamily": "{font.family.sans}",
|
|
189
|
+
"fontSize": "{font.size.sm}",
|
|
190
|
+
"fontWeight": "{font.weight.regular}",
|
|
191
|
+
"lineHeight": "{font.lineHeight.normal}",
|
|
192
|
+
"letterSpacing": "{font.letterSpacing.normal}"
|
|
193
|
+
},
|
|
194
|
+
"$description": "Body default (sm, 14px / 1.5). Colour signals interaction, not bold."
|
|
195
|
+
},
|
|
196
|
+
"caption": {
|
|
197
|
+
"$type": "typography",
|
|
198
|
+
"$value": {
|
|
199
|
+
"fontFamily": "{font.family.sans}",
|
|
200
|
+
"fontSize": "{font.size.xs}",
|
|
201
|
+
"fontWeight": "{font.weight.bold}",
|
|
202
|
+
"lineHeight": "{font.lineHeight.normal}",
|
|
203
|
+
"letterSpacing": "0.06em"
|
|
204
|
+
},
|
|
205
|
+
"$description": "Tiny eyebrow / caption labels (xs), ALL-CAPS with wide tracking; helper text at 400."
|
|
79
206
|
}
|
|
80
207
|
}
|
|
81
208
|
}
|