@humanforest/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 +67 -0
- package/dataviz/dataviz.css +149 -0
- package/dataviz/tokens.json +1591 -0
- package/dataviz/unovis.css +151 -0
- package/deck/deck.css +515 -0
- package/deck/deck.json +358 -0
- package/geo/london-boroughs.json +1 -0
- package/geo/london-dots-coarse.json +1 -0
- package/geo/london-dots-fine.json +1 -0
- package/geo/london-dots-medium.json +1 -0
- package/geo/london-dots-ultra.json +1 -0
- package/geo/london-wards.json +1 -0
- package/glyphs/glyphs.json +1 -0
- package/logos/f-rot.svg +4 -0
- package/logos/f.svg +4 -0
- package/logos/favicon-c2w.svg +9 -0
- package/logos/favicon-console.svg +9 -0
- package/logos/favicon-ds.svg +9 -0
- package/logos/favicon-fleet.svg +9 -0
- package/logos/favicon-flex.svg +9 -0
- package/logos/favicon-plus.svg +9 -0
- package/logos/favicon-radar.svg +9 -0
- package/logos/favicon-tower.svg +9 -0
- package/logos/lockup-horizontal.svg +17 -0
- package/logos/lockup-vertical.svg +17 -0
- package/logos/mark-mono.svg +4 -0
- package/logos/mark.svg +7 -0
- package/logos/wordmark.svg +9 -0
- package/motion/motion.css +104 -0
- package/motion/motion.json +85 -0
- package/motion/motion.theme.css +16 -0
- package/package.json +50 -0
- package/scales/ramps.css +182 -0
- package/scales/ramps.json +605 -0
- package/scales/theme.css +256 -0
- package/src/colourEngine.ts +604 -0
- package/src/glyphs.ts +127 -0
- package/src/logo.ts +50 -0
- package/src/subbrands.ts +44 -0
- package/src/sublogo.ts +80 -0
- package/src/sublogoSvg.ts +134 -0
- package/type/type.css +232 -0
- package/type/type.deck.css +74 -0
- package/type/type.json +548 -0
- package/type/type.theme.css +31 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/* Forest → Unovis adapter — generated by scripts/dataviz.ts. Do not edit by hand. */
|
|
2
|
+
/* var() indirection, plus the one vendor rule that cannot be expressed as a var. Import AFTER
|
|
3
|
+
dataviz.css and the semantic theme. */
|
|
4
|
+
/* :root:root — Unovis injects its own :root defaults at runtime (after this sheet loads), so we
|
|
5
|
+
need to win on specificity, not order. */
|
|
6
|
+
:root:root {
|
|
7
|
+
--vis-color0: var(--dataviz-categorical-safe-1);
|
|
8
|
+
--vis-color1: var(--dataviz-categorical-safe-2);
|
|
9
|
+
--vis-color2: var(--dataviz-categorical-safe-3);
|
|
10
|
+
--vis-color3: var(--dataviz-categorical-safe-4);
|
|
11
|
+
--vis-color4: var(--dataviz-categorical-safe-5);
|
|
12
|
+
--vis-color5: var(--dataviz-categorical-safe-6);
|
|
13
|
+
--vis-font-family: var(--font-sans);
|
|
14
|
+
--vis-dark-font-family: var(--font-sans);
|
|
15
|
+
--vis-axis-grid-color: var(--ui-border);
|
|
16
|
+
--vis-dark-axis-grid-color: var(--ui-border);
|
|
17
|
+
--vis-axis-tick-color: var(--ui-border);
|
|
18
|
+
--vis-dark-axis-tick-color: var(--ui-border);
|
|
19
|
+
--vis-axis-tick-label-color: var(--ui-text-muted);
|
|
20
|
+
--vis-dark-axis-tick-label-color: var(--ui-text-muted);
|
|
21
|
+
--vis-axis-label-color: var(--ui-text-muted);
|
|
22
|
+
--vis-dark-axis-label-color: var(--ui-text-muted);
|
|
23
|
+
--vis-legend-label-color: var(--ui-text);
|
|
24
|
+
--vis-dark-legend-label-color: var(--ui-text);
|
|
25
|
+
--vis-tooltip-background-color: color-mix(in oklab, var(--ui-bg-elevated) 80%, transparent);
|
|
26
|
+
--vis-dark-tooltip-background-color: color-mix(in oklab, var(--ui-bg-elevated) 80%, transparent);
|
|
27
|
+
--vis-tooltip-backdrop-filter: blur(12px) saturate(1.4);
|
|
28
|
+
--vis-dark-tooltip-backdrop-filter: blur(12px) saturate(1.4);
|
|
29
|
+
--vis-tooltip-border-color: var(--ui-border);
|
|
30
|
+
--vis-dark-tooltip-border-color: var(--ui-border);
|
|
31
|
+
--vis-tooltip-text-color: var(--ui-text-highlighted);
|
|
32
|
+
--vis-dark-tooltip-text-color: var(--ui-text-highlighted);
|
|
33
|
+
--vis-tooltip-border-radius: var(--ui-radius);
|
|
34
|
+
--vis-dark-tooltip-border-radius: var(--ui-radius);
|
|
35
|
+
--vis-tooltip-padding: 0;
|
|
36
|
+
--vis-dark-tooltip-padding: 0;
|
|
37
|
+
--vis-crosshair-line-stroke-color: var(--ui-text-dimmed);
|
|
38
|
+
--vis-dark-crosshair-line-stroke-color: var(--ui-text-dimmed);
|
|
39
|
+
--vis-donut-background-color: transparent;
|
|
40
|
+
--vis-dark-donut-background-color: transparent;
|
|
41
|
+
--vis-donut-central-label-font-size: 28px;
|
|
42
|
+
--vis-dark-donut-central-label-font-size: 28px;
|
|
43
|
+
--vis-donut-central-label-font-weight: 700;
|
|
44
|
+
--vis-dark-donut-central-label-font-weight: 700;
|
|
45
|
+
--vis-donut-central-label-text-color: var(--ui-text-highlighted);
|
|
46
|
+
--vis-dark-donut-central-label-text-color: var(--ui-text-highlighted);
|
|
47
|
+
--vis-donut-central-sub-label-font-size: 13px;
|
|
48
|
+
--vis-dark-donut-central-sub-label-font-size: 13px;
|
|
49
|
+
--vis-donut-central-sub-label-text-color: var(--ui-text-muted);
|
|
50
|
+
--vis-dark-donut-central-sub-label-text-color: var(--ui-text-muted);
|
|
51
|
+
--vis-nested-donut-central-label-font-size: 20px;
|
|
52
|
+
--vis-dark-nested-donut-central-label-font-size: 20px;
|
|
53
|
+
--vis-nested-donut-central-label-font-weight: 700;
|
|
54
|
+
--vis-dark-nested-donut-central-label-font-weight: 700;
|
|
55
|
+
--vis-nested-donut-central-label-text-color: var(--ui-text-highlighted);
|
|
56
|
+
--vis-dark-nested-donut-central-label-text-color: var(--ui-text-highlighted);
|
|
57
|
+
--vis-nested-donut-central-sublabel-text-color: var(--ui-text-muted);
|
|
58
|
+
--vis-dark-nested-donut-central-sublabel-text-color: var(--ui-text-muted);
|
|
59
|
+
--vis-nested-donut-background-color: transparent;
|
|
60
|
+
--vis-dark-nested-donut-background-color: transparent;
|
|
61
|
+
--vis-nested-donut-segment-stroke-color: var(--ui-bg);
|
|
62
|
+
--vis-dark-nested-donut-segment-stroke-color: var(--ui-bg);
|
|
63
|
+
--vis-nested-donut-segment-stroke-width: 3px;
|
|
64
|
+
--vis-dark-nested-donut-segment-stroke-width: 3px;
|
|
65
|
+
--vis-timeline-row-even-fill-color: var(--ui-bg);
|
|
66
|
+
--vis-dark-timeline-row-even-fill-color: var(--ui-bg);
|
|
67
|
+
--vis-timeline-row-odd-fill-color: var(--ui-bg-muted);
|
|
68
|
+
--vis-dark-timeline-row-odd-fill-color: var(--ui-bg-muted);
|
|
69
|
+
--vis-timeline-label-color: var(--ui-text-muted);
|
|
70
|
+
--vis-dark-timeline-label-color: var(--ui-text-muted);
|
|
71
|
+
--vis-timeline-scrollbar-background-color: var(--ui-bg-muted);
|
|
72
|
+
--vis-dark-timeline-scrollbar-background-color: var(--ui-bg-muted);
|
|
73
|
+
--vis-timeline-scrollbar-color: var(--ui-border-accented);
|
|
74
|
+
--vis-dark-timeline-scrollbar-color: var(--ui-border-accented);
|
|
75
|
+
--vis-sankey-node-label-color: var(--ui-text-highlighted);
|
|
76
|
+
--vis-dark-sankey-node-label-color: var(--ui-text-highlighted);
|
|
77
|
+
--vis-sankey-node-label-background-fill-color: var(--ui-bg);
|
|
78
|
+
--vis-dark-sankey-node-label-background-fill-color: var(--ui-bg);
|
|
79
|
+
--vis-sankey-node-label-background-stroke-color: var(--ui-border);
|
|
80
|
+
--vis-dark-sankey-node-label-background-stroke-color: var(--ui-border);
|
|
81
|
+
--vis-sankey-icon-color: var(--ui-bg);
|
|
82
|
+
--vis-dark-sankey-icon-color: var(--ui-bg);
|
|
83
|
+
--vis-treemap-internal-label-font-size: 16px;
|
|
84
|
+
--vis-dark-treemap-internal-label-font-size: 16px;
|
|
85
|
+
--vis-treemap-tile-radius: 12px;
|
|
86
|
+
--vis-dark-treemap-tile-radius: 12px;
|
|
87
|
+
--vis-treemap-tile-gap: 4px;
|
|
88
|
+
--vis-dark-treemap-tile-gap: 4px;
|
|
89
|
+
--vis-tooltip-title-color: var(--ui-text-highlighted);
|
|
90
|
+
--vis-tooltip-title-border-bottom: 1px solid var(--ui-border);
|
|
91
|
+
--vis-tooltip-label-color: var(--ui-text);
|
|
92
|
+
--vis-tooltip-value-color: var(--ui-text-highlighted);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Treemap concentric corners. Unovis draws group and leaf tiles as flat sibling rects sharing one
|
|
96
|
+
rx, so nesting gets no radius of its own and equal radii read as pinched inner corners. The
|
|
97
|
+
concentric rule is inner = outer − gap: with the house 8px corner and 4px padding, leaves take
|
|
98
|
+
4px. Leaves are the only tiles carrying the clickable class (treemapDefaults turns the affordance
|
|
99
|
+
on for exactly this reason); rx/ry are SVG geometry properties, so CSS overrides the attribute
|
|
100
|
+
Unovis sets. Matched on the emotion class suffix — Unovis hashes the prefix per build, the label
|
|
101
|
+
is stable. Separation comes from the padding gap showing the darker group tile beneath, not from
|
|
102
|
+
a stroke: a stroke on every tile double-borders the nesting. */
|
|
103
|
+
rect[class*="-clickable-tile"] {
|
|
104
|
+
rx: calc(var(--vis-treemap-tile-radius, 8px) - var(--vis-treemap-tile-gap, 4px));
|
|
105
|
+
ry: calc(var(--vis-treemap-tile-radius, 8px) - var(--vis-treemap-tile-gap, 4px));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Re-centre the central label pair. Unovis anchors both texts on the hole's centre and separates
|
|
109
|
+
them with dy ±0.55em on each text's OWN font-size, so the block's optical centre always sits
|
|
110
|
+
above the true centre — and the gap widens with the label size. Shifting by a fraction of the
|
|
111
|
+
label size restores the centring and keeps it correct if a chart overrides the size locally.
|
|
112
|
+
dy is an attribute CSS cannot reach; translate composes with the transform attribute Unovis
|
|
113
|
+
sets, so it is the one lever here.
|
|
114
|
+
|
|
115
|
+
The two components need separate rules because they disagree twice. The flat donut sizes its
|
|
116
|
+
label from --vis-donut-*, the nested one from --vis-nested-donut-*, so one shared rule shifts
|
|
117
|
+
the nested label by half the FLAT donut's 28px. And they class their texts differently: the flat
|
|
118
|
+
donut gives BOTH texts the -central-label suffix, while the nested one names its second
|
|
119
|
+
-central-sub-label. Matching only the first suffix therefore moved the nested label down onto a
|
|
120
|
+
sub-label that stayed put. Both texts of a pair must shift by the same amount — that is what preserves
|
|
121
|
+
their spacing while re-centring the block. (No backticks in this comment: it lives inside a
|
|
122
|
+
template literal.) */
|
|
123
|
+
g[class*="-donut-component"]:not([class*="-nested-donut-component"]) text[class*="-central-label"] {
|
|
124
|
+
translate: 0 calc(0.5 * var(--vis-donut-central-label-font-size, 16px));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
g[class*="-nested-donut-component"] text[class*="-central-label"],
|
|
128
|
+
g[class*="-nested-donut-component"] text[class*="-central-sub-label"] {
|
|
129
|
+
translate: 0 calc(0.5 * var(--vis-nested-donut-central-label-font-size, 16px));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* Group labels get their own size. Unovis scales label type to tile area for LEAVES only
|
|
133
|
+
(enableTileLabelFontSizeVariation, gated on the node having no children), so an internal node
|
|
134
|
+
keeps the flat default
|
|
135
|
+
however large its group is — a zone heading ends up smaller than the station labels inside it.
|
|
136
|
+
Internal nodes carry their own class, so the heading can be sized here; it has to stay within
|
|
137
|
+
the tilePaddingTop strip the group reserves for it. */
|
|
138
|
+
text[class*="-internal-label"] {
|
|
139
|
+
font-size: var(--vis-treemap-internal-label-font-size, 16px);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* Square the label clip. Unovis gives each tile's label a clipPath rect that copies the tile's
|
|
143
|
+
corner radius and is inset by labelOffset on every side — and it translates the label group to
|
|
144
|
+
exactly that rect's top-left. The first glyph therefore lands on its own clip's rounded corner
|
|
145
|
+
and gets sliced, at every radius, and raising labelOffset cannot help because it moves the label
|
|
146
|
+
and the clip together. The clip's job is to stop text overflowing the tile, which a square does;
|
|
147
|
+
the tile keeps its own radius, and the label stays inset by labelOffset. */
|
|
148
|
+
[class*="-tile-group"] clipPath rect {
|
|
149
|
+
rx: 0;
|
|
150
|
+
ry: 0;
|
|
151
|
+
}
|