@orange-halo/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.
@@ -3,34 +3,35 @@
3
3
  "button": {
4
4
  "$description": "Button — chunky, tactile, playful with offset shadows",
5
5
  "base": {
6
- "fontFamily": { "$type": "fontFamily", "$value": "{typography.label.fontFamily}" },
7
- "fontWeight": { "$type": "fontWeight", "$value": "{font.weight.medium}" },
8
- "letterSpacing": { "$type": "dimension", "$value": "{font.letterSpacing.wide}" },
9
- "borderRadius": { "$type": "dimension", "$value": "{radius.md}" },
10
- "borderWidth": { "$type": "dimension", "$value": "2.5px" },
6
+ "fontFamily": { "$type": "fontFamily", "$value": "{typography.control.fontFamily}" },
7
+ "fontWeight": { "$type": "fontWeight", "$value": "{typography.control.fontWeight}" },
8
+ "letterSpacing": { "$type": "dimension", "$value": "{typography.control.letterSpacing}" },
9
+ "borderRadius": { "$type": "dimension", "$value": "{shape.control}" },
10
+ "borderWidth": { "$type": "dimension", "$value": "{stroke.control}" },
11
11
  "transitionDuration": { "$type": "duration", "$value": "{motion.snappy}" },
12
12
  "transitionEasing": { "$type": "cubicBezier", "$value": "{motion.easePlayful}" }
13
13
  },
14
14
  "size": {
15
+ "$description": "Matches oh-button.ts, which reads these. Minimum 16px text",
15
16
  "sm": {
16
- "fontSize": { "$type": "dimension", "$value": "{font.size.sm}" },
17
- "paddingX": { "$type": "dimension", "$value": "{spacing.3}" },
17
+ "fontSize": { "$type": "dimension", "$value": "{typography.control.fontSize.sm}" },
18
+ "paddingX": { "$type": "dimension", "$value": "{spacing.4}" },
18
19
  "paddingY": { "$type": "dimension", "$value": "{spacing.2}" },
19
- "minHeight": { "$type": "dimension", "$value": "36px" },
20
- "gap": { "$type": "dimension", "$value": "{spacing.1-5}" }
20
+ "minHeight": { "$type": "dimension", "$value": "40px" },
21
+ "gap": { "$type": "dimension", "$value": "{spacing.2}" }
21
22
  },
22
23
  "md": {
23
- "fontSize": { "$type": "dimension", "$value": "{font.size.sm}" },
24
- "paddingX": { "$type": "dimension", "$value": "{spacing.4}" },
25
- "paddingY": { "$type": "dimension", "$value": "{spacing.2-5}" },
26
- "minHeight": { "$type": "dimension", "$value": "44px" },
24
+ "fontSize": { "$type": "dimension", "$value": "{typography.control.fontSize.md}" },
25
+ "paddingX": { "$type": "dimension", "$value": "{spacing.6}" },
26
+ "paddingY": { "$type": "dimension", "$value": "{spacing.3}" },
27
+ "minHeight": { "$type": "dimension", "$value": "48px" },
27
28
  "gap": { "$type": "dimension", "$value": "{spacing.2}" }
28
29
  },
29
30
  "lg": {
30
- "fontSize": { "$type": "dimension", "$value": "{font.size.base}" },
31
- "paddingX": { "$type": "dimension", "$value": "{spacing.6}" },
32
- "paddingY": { "$type": "dimension", "$value": "{spacing.3-5}" },
33
- "minHeight": { "$type": "dimension", "$value": "52px" },
31
+ "fontSize": { "$type": "dimension", "$value": "{typography.control.fontSize.lg}" },
32
+ "paddingX": { "$type": "dimension", "$value": "{spacing.8}" },
33
+ "paddingY": { "$type": "dimension", "$value": "{spacing.4}" },
34
+ "minHeight": { "$type": "dimension", "$value": "56px" },
34
35
  "gap": { "$type": "dimension", "$value": "{spacing.2-5}" }
35
36
  }
36
37
  },
@@ -40,14 +41,14 @@
40
41
  "background": { "$type": "color", "$value": "{color.brand.primary}" },
41
42
  "backgroundHover": { "$type": "color", "$value": "{color.brand.primaryHover}" },
42
43
  "backgroundActive": { "$type": "color", "$value": "{color.brand.primaryActive}" },
43
- "color": { "$type": "color", "$value": "{color.surface.white}" },
44
+ "color": { "$type": "color", "$value": "{color.text.onBrand}" },
44
45
  "borderColor": { "$type": "color", "$value": "{color.brand.primary}" },
45
46
  "shadowColor": { "$type": "color", "$value": "{shadow.primary}" }
46
47
  },
47
48
  "secondary": {
48
49
  "$description": "Secondary — cream surface with emphasis border",
49
50
  "background": { "$type": "color", "$value": "{color.surface.base}" },
50
- "backgroundHover": { "$type": "color", "$value": "{color.surface.white}" },
51
+ "backgroundHover": { "$type": "color", "$value": "{color.surface.hover}" },
51
52
  "backgroundActive": { "$type": "color", "$value": "{color.surface.activePressed}" },
52
53
  "color": { "$type": "color", "$value": "{color.text.primary}" },
53
54
  "borderColor": { "$type": "color", "$value": "{color.border.emphasis}" },
@@ -58,14 +59,13 @@
58
59
  "background": { "$type": "color", "$value": "{color.accent.default}" },
59
60
  "backgroundHover": { "$type": "color", "$value": "{color.accent.hover}" },
60
61
  "backgroundActive": { "$type": "color", "$value": "{color.accent.active}" },
61
- "color": { "$type": "color", "$value": "{color.surface.white}" },
62
+ "color": { "$type": "color", "$value": "{color.text.onAccent}" },
62
63
  "borderColor": { "$type": "color", "$value": "{color.accent.default}" },
63
64
  "shadowColor": { "$type": "color", "$value": "{color.accent.shadow}" }
64
65
  }
65
66
  },
66
67
  "focus": {
67
- "$description": "Warm, friendly focus ring",
68
- "ringWidth": { "$type": "dimension", "$value": "3px" },
68
+ "$description": "Focus is an underline in focus.ringColor; glow is decoration",
69
69
  "ringColor": { "$type": "color", "$value": "{focus.ringColor}" },
70
70
  "glowColor": { "$type": "color", "$value": "{focus.glowColor}" }
71
71
  }
@@ -73,11 +73,11 @@
73
73
  "input": {
74
74
  "$description": "Input — chunky border, inset shadow, tactile feel",
75
75
  "base": {
76
- "fontFamily": { "$type": "fontFamily", "$value": "{font.family.sans}" },
77
- "fontSize": { "$type": "dimension", "$value": "{font.size.lg}" },
78
- "lineHeight": { "$type": "number", "$value": "{font.lineHeight.normal}" },
79
- "borderRadius": { "$type": "dimension", "$value": "{radius.md}" },
80
- "borderWidth": { "$type": "dimension", "$value": "2.5px" },
76
+ "fontFamily": { "$type": "fontFamily", "$value": "{typography.control.fontFamily}" },
77
+ "fontSize": { "$type": "dimension", "$value": "{typography.control.fontSize.md}" },
78
+ "lineHeight": { "$type": "number", "$value": "{typography.body.base.lineHeight}" },
79
+ "borderRadius": { "$type": "dimension", "$value": "{shape.control}" },
80
+ "borderWidth": { "$type": "dimension", "$value": "{stroke.control}" },
81
81
  "transitionDuration": { "$type": "duration", "$value": "{motion.snappy}" },
82
82
  "transitionEasing": { "$type": "cubicBezier", "$value": "{motion.easeGentle}" }
83
83
  },
@@ -100,9 +100,9 @@
100
100
  "borderColor": { "$type": "color", "$value": "{color.border.hover}" }
101
101
  },
102
102
  "focus": {
103
- "background": { "$type": "color", "$value": "{color.surface.white}" },
104
- "borderColor": { "$type": "color", "$value": "{color.border.focus}" },
105
- "focusRingColor": { "$type": "color", "$value": "{color.border.focusInner}" }
103
+ "background": { "$type": "color", "$value": "{color.surface.highlight}" },
104
+ "borderColor": { "$type": "color", "$value": "{focus.ringColor}" },
105
+ "focusRingColor": { "$type": "color", "$value": "{focus.ringColor}" }
106
106
  },
107
107
  "error": {
108
108
  "borderColor": { "$type": "color", "$value": "{color.feedback.error}" },
@@ -115,8 +115,8 @@
115
115
  "$description": "Card — raised surface with visible frame",
116
116
  "base": {
117
117
  "background": { "$type": "color", "$value": "{color.surface.raised}" },
118
- "borderRadius": { "$type": "dimension", "$value": "{shape.container}" },
119
- "borderWidth": { "$type": "dimension", "$value": "{border.width.1}" },
118
+ "borderRadius": { "$type": "dimension", "$value": "{shape.large}" },
119
+ "borderWidth": { "$type": "dimension", "$value": "{stroke.surface}" },
120
120
  "borderColor": { "$type": "color", "$value": "{color.border.default}" },
121
121
  "shadow": { "$type": "shadow", "$value": "{elevation.soft}" },
122
122
  "padding": { "$type": "dimension", "$value": "{spacing.5}" }
@@ -125,25 +125,60 @@
125
125
  "$description": "Interactive card — gentle warmth on hover",
126
126
  "transitionDuration": { "$type": "duration", "$value": "{motion.gentle}" },
127
127
  "transitionEasing": { "$type": "cubicBezier", "$value": "{motion.easeGentle}" },
128
- "backgroundHover": { "$type": "color", "$value": "{color.warm.cream}" },
128
+ "backgroundHover": { "$type": "color", "$value": "{color.surface.base}" },
129
129
  "borderColorHover": { "$type": "color", "$value": "{color.border.brand}" },
130
130
  "shadowHover": { "$type": "shadow", "$value": "{elevation.medium}" }
131
131
  },
132
+ "raised": {
133
+ "$description": "Raised card (default) — subtle top-lit gradient",
134
+ "gradientStart": { "$type": "color", "$value": "{color.surface.highlight}" },
135
+ "gradientMid": { "$type": "color", "$value": "{color.surface.base}" },
136
+ "gradientEnd": { "$type": "color", "$value": "{color.surface.raised}" },
137
+ "borderColor": { "$type": "color", "$value": "{color.border.default}" }
138
+ },
139
+ "flat": {
140
+ "$description": "Flat card — border-led, minimal shadow",
141
+ "gradientStart": { "$type": "color", "$value": "{color.surface.base}" },
142
+ "gradientEnd": { "$type": "color", "$value": "{color.surface.raised}" },
143
+ "borderColor": { "$type": "color", "$value": "{color.border.default}" }
144
+ },
132
145
  "sunlit": {
133
146
  "$description": "Sunlit card — featured with gradient",
134
- "background": { "$type": "string", "$value": "{gradient.sunlit}" },
147
+ "background": { "$type": "string", "$value": "linear-gradient(180deg, {color.surface.featuredStart} 0%, {color.surface.featuredMid} 30%, {color.surface.featuredEnd} 100%)" },
148
+ "gradientStart": { "$type": "color", "$value": "{color.surface.featuredStart}" },
149
+ "gradientMid": { "$type": "color", "$value": "{color.surface.featuredMid}" },
150
+ "gradientEnd": { "$type": "color", "$value": "{color.surface.featuredEnd}" },
135
151
  "borderColor": { "$type": "color", "$value": "{color.border.brand}" },
152
+ "borderColorHover": { "$type": "color", "$value": "{color.border.brandHover}" },
136
153
  "shadow": { "$type": "shadow", "$value": "{elevation.medium}" }
154
+ },
155
+ "section": {
156
+ "$description": "Card header and footer",
157
+ "dividerColor": { "$type": "color", "$value": "{color.border.divider}" },
158
+ "headerGradientStart": { "$type": "color", "$value": "{color.surface.sheen}" },
159
+ "headerGradientEnd": { "$type": "color", "$value": "rgba(255, 255, 255, 0)" }
160
+ }
161
+ },
162
+ "progress": {
163
+ "$description": "Progress — chunky pill track",
164
+ "track": {
165
+ "insetShadow": { "$type": "color", "$value": "rgba(0, 0, 0, 0.06)", "$description": "Neutral, so it works on every track colour" }
166
+ },
167
+ "inverse": {
168
+ "$description": "On brand/accent backgrounds (e.g. journey hero). Fill is cream so it reads at 3.7:1 against the track.",
169
+ "trackBackground": { "$type": "color", "$value": "rgba(255, 255, 255, 0.15)" },
170
+ "trackBorder": { "$type": "color", "$value": "rgba(255, 255, 255, 0.3)" },
171
+ "fill": { "$type": "color", "$value": "{color.text.inverse}" }
137
172
  }
138
173
  },
139
174
  "badge": {
140
175
  "$description": "Badge — small status indicators",
141
176
  "base": {
142
- "fontFamily": { "$type": "fontFamily", "$value": "{font.family.sans}" },
143
- "fontSize": { "$type": "dimension", "$value": "{font.size.xs}" },
144
- "fontWeight": { "$type": "fontWeight", "$value": "{font.weight.medium}" },
145
- "letterSpacing": { "$type": "dimension", "$value": "{font.letterSpacing.wide}" },
146
- "borderRadius": { "$type": "dimension", "$value": "{shape.pill}" },
177
+ "fontFamily": { "$type": "fontFamily", "$value": "{typography.label.fontFamily}" },
178
+ "fontSize": { "$type": "dimension", "$value": "{typography.body.base.fontSize}" },
179
+ "fontWeight": { "$type": "fontWeight", "$value": "{typography.label.base.fontWeight}" },
180
+ "letterSpacing": { "$type": "dimension", "$value": "{typography.label.base.letterSpacing}" },
181
+ "borderRadius": { "$type": "dimension", "$value": "{shape.compact}" },
147
182
  "paddingX": { "$type": "dimension", "$value": "{spacing.2-5}" },
148
183
  "paddingY": { "$type": "dimension", "$value": "{spacing.1}" }
149
184
  },
@@ -169,7 +204,7 @@
169
204
  "color": { "$type": "color", "$value": "{color.feedback.warning}" }
170
205
  },
171
206
  "neutral": {
172
- "background": { "$type": "color", "$value": "{color.warm.parchment}" },
207
+ "background": { "$type": "color", "$value": "{color.surface.inset}" },
173
208
  "color": { "$type": "color", "$value": "{color.text.secondary}" }
174
209
  }
175
210
  }
@@ -179,6 +214,19 @@
179
214
  "color": { "$type": "color", "$value": "{color.text.link}" },
180
215
  "colorHover": { "$type": "color", "$value": "{color.text.linkHover}" },
181
216
  "textDecoration": { "$type": "string", "$value": "underline" },
182
- "textDecorationHover": { "$type": "string", "$value": "none" }
217
+ "textDecorationHover": { "$type": "string", "$value": "none" },
218
+ "inverse": {
219
+ "$description": "On brand/accent backgrounds",
220
+ "focusBackground": { "$type": "color", "$value": "rgba(0, 0, 0, 0.1)", "$description": "Focus tint — paired with the underline, which is the indicator" }
221
+ }
222
+ },
223
+ "modal": {
224
+ "$description": "Modal dialog",
225
+ "overlay": { "$type": "color", "$value": "{color.surface.backdrop}" }
226
+ },
227
+ "closeButton": {
228
+ "$description": "Icon-only close buttons in alerts and modals",
229
+ "backgroundHover": { "$type": "color", "$value": "rgba(0, 0, 0, 0.08)", "$description": "Neutral tint that works on every alert variant" },
230
+ "shadowHover": { "$type": "color", "$value": "rgba(0, 0, 0, 0.15)", "$description": "Offset shadow colour on hover and press. Neutral, like the background, so it works on every alert variant" }
183
231
  }
184
232
  }
@@ -0,0 +1,170 @@
1
+ {
2
+ "$description": "Core scales shared by every brand: spacing, fixed sizes (content widths and breakpoints) and stacking order. Structural, so layouts behave the same in every brand.",
3
+ "spacing": {
4
+ "$description": "Generous spacing — breathing room, not dense",
5
+ "0": {
6
+ "$type": "dimension",
7
+ "$value": "0"
8
+ },
9
+ "px": {
10
+ "$type": "dimension",
11
+ "$value": "1px"
12
+ },
13
+ "0-5": {
14
+ "$type": "dimension",
15
+ "$value": "0.125rem",
16
+ "$description": "2px"
17
+ },
18
+ "1": {
19
+ "$type": "dimension",
20
+ "$value": "0.25rem",
21
+ "$description": "4px"
22
+ },
23
+ "1-5": {
24
+ "$type": "dimension",
25
+ "$value": "0.375rem",
26
+ "$description": "6px"
27
+ },
28
+ "2": {
29
+ "$type": "dimension",
30
+ "$value": "0.5rem",
31
+ "$description": "8px"
32
+ },
33
+ "2-5": {
34
+ "$type": "dimension",
35
+ "$value": "0.625rem",
36
+ "$description": "10px"
37
+ },
38
+ "3": {
39
+ "$type": "dimension",
40
+ "$value": "0.75rem",
41
+ "$description": "12px"
42
+ },
43
+ "3-5": {
44
+ "$type": "dimension",
45
+ "$value": "0.875rem",
46
+ "$description": "14px"
47
+ },
48
+ "4": {
49
+ "$type": "dimension",
50
+ "$value": "1rem",
51
+ "$description": "16px"
52
+ },
53
+ "5": {
54
+ "$type": "dimension",
55
+ "$value": "1.25rem",
56
+ "$description": "20px"
57
+ },
58
+ "6": {
59
+ "$type": "dimension",
60
+ "$value": "1.5rem",
61
+ "$description": "24px"
62
+ },
63
+ "7": {
64
+ "$type": "dimension",
65
+ "$value": "1.75rem",
66
+ "$description": "28px"
67
+ },
68
+ "8": {
69
+ "$type": "dimension",
70
+ "$value": "2rem",
71
+ "$description": "32px"
72
+ },
73
+ "10": {
74
+ "$type": "dimension",
75
+ "$value": "2.5rem",
76
+ "$description": "40px"
77
+ },
78
+ "12": {
79
+ "$type": "dimension",
80
+ "$value": "3rem",
81
+ "$description": "48px"
82
+ },
83
+ "16": {
84
+ "$type": "dimension",
85
+ "$value": "4rem",
86
+ "$description": "64px"
87
+ },
88
+ "20": {
89
+ "$type": "dimension",
90
+ "$value": "5rem",
91
+ "$description": "80px"
92
+ }
93
+ },
94
+ "size": {
95
+ "$description": "Fixed layout sizes: content widths and viewport breakpoints",
96
+ "container": {
97
+ "$description": "Content max-widths",
98
+ "sm": {
99
+ "$type": "dimension",
100
+ "$value": "640px"
101
+ },
102
+ "md": {
103
+ "$type": "dimension",
104
+ "$value": "768px"
105
+ },
106
+ "lg": {
107
+ "$type": "dimension",
108
+ "$value": "1024px"
109
+ },
110
+ "xl": {
111
+ "$type": "dimension",
112
+ "$value": "1280px"
113
+ }
114
+ },
115
+ "breakpoint": {
116
+ "$description": "Viewport widths for @media queries. CSS can't read custom properties in a media query, so components write the value; check:tokens fails any (min|max)-width that isn't one of these (or one pixel either side, for adjoining ranges).",
117
+ "xs": {
118
+ "$type": "dimension",
119
+ "$value": "480px"
120
+ },
121
+ "sm": {
122
+ "$type": "dimension",
123
+ "$value": "640px"
124
+ },
125
+ "md": {
126
+ "$type": "dimension",
127
+ "$value": "768px"
128
+ },
129
+ "lg": {
130
+ "$type": "dimension",
131
+ "$value": "1024px"
132
+ }
133
+ }
134
+ },
135
+ "zIndex": {
136
+ "$description": "Z-index layering",
137
+ "0": {
138
+ "$type": "number",
139
+ "$value": 0
140
+ },
141
+ "10": {
142
+ "$type": "number",
143
+ "$value": 10
144
+ },
145
+ "20": {
146
+ "$type": "number",
147
+ "$value": 20
148
+ },
149
+ "dropdown": {
150
+ "$type": "number",
151
+ "$value": 1000
152
+ },
153
+ "sticky": {
154
+ "$type": "number",
155
+ "$value": 1100
156
+ },
157
+ "modal": {
158
+ "$type": "number",
159
+ "$value": 1200
160
+ },
161
+ "popover": {
162
+ "$type": "number",
163
+ "$value": 1300
164
+ },
165
+ "tooltip": {
166
+ "$type": "number",
167
+ "$value": 1400
168
+ }
169
+ }
170
+ }
@@ -1,46 +0,0 @@
1
- /**
2
- * Orange Halo Light Theme
3
- * Auto-generated - do not edit directly
4
- * WCAG AA compliant color contrast ratios
5
- */
6
-
7
- :root, [data-theme='light'] {
8
- --oh-color-brand-primary: #c54300;
9
- --oh-color-brand-primary-hover: #9e3500;
10
- --oh-color-brand-primary-active: #9e3500;
11
- --oh-color-brand-primary-subtle: #fff3e0;
12
- --oh-color-brand-primary-muted: #ffe0b2;
13
- --oh-color-brand-highlight: #e8a838;
14
- --oh-color-brand-highlight-subtle: #fdf3d4;
15
- --oh-color-accent-default: #5f8a8b;
16
- --oh-color-accent-hover: #4d7172;
17
- --oh-color-accent-subtle: #f0f6f6;
18
- --oh-color-accent-muted: #e0ebeb;
19
- --oh-color-feedback-success: #4a8a4c;
20
- --oh-color-feedback-success-subtle: #f0f7f1;
21
- --oh-color-feedback-error: #b54540;
22
- --oh-color-feedback-error-subtle: #fdf4f3;
23
- --oh-color-feedback-warning: #8c5e1c;
24
- --oh-color-feedback-warning-subtle: #fefaee;
25
- --oh-color-feedback-info: #4d7172;
26
- --oh-color-feedback-info-subtle: #f0f6f6;
27
- --oh-color-surface-base: #faf7f2;
28
- --oh-color-surface-raised: #f5f0e8;
29
- --oh-color-surface-sunlit: #faf7f2;
30
- --oh-color-surface-inset: #ede8df;
31
- --oh-color-surface-overlay: rgba(61, 50, 41, 0.4);
32
- --oh-color-surface-disabled: #e2dcd2;
33
- --oh-color-border-default: #e2dcd2;
34
- --oh-color-border-subtle: #ede8df;
35
- --oh-color-border-emphasis: #c9c1b4;
36
- --oh-color-border-focus: #c54300;
37
- --oh-color-border-brand: rgba(197, 67, 0, 0.25);
38
- --oh-color-text-primary: #3d3229;
39
- --oh-color-text-secondary: #6b5d4d;
40
- --oh-color-text-disabled: #c9c1b4;
41
- --oh-color-text-inverse: #faf7f2;
42
- --oh-color-text-link: #c54300;
43
- --oh-color-text-link-hover: #9e3500;
44
- --oh-focus-ring-color: rgba(197, 67, 0, 0.35);
45
- --oh-focus-glow-color: rgba(197, 67, 0, 0.15);
46
- }