@brunosouzas/design-system 0.6.1 → 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/NOTICE +13 -0
- package/README.md +75 -40
- package/dist/scripts/cover.d.ts +7 -4
- package/dist/scripts/cover.js +25 -8
- package/dist/src/fonts/embed.d.ts +7 -0
- package/dist/src/fonts/embed.js +219 -0
- package/dist/src/pieces/bank-objects.d.ts +1 -1
- package/dist/src/pieces/bank-objects.js +26 -18
- package/dist/src/pieces/cover.js +2 -1
- package/dist/src/pieces/diagram.js +3 -3
- package/dist/src/pieces/eip-icons.js +27 -27
- package/dist/src/pieces/emote.d.ts +13 -0
- package/dist/src/pieces/emote.js +88 -0
- package/dist/src/pieces/index.d.ts +1 -1
- package/dist/src/pieces/index.js +1 -1
- package/dist/src/pieces/ink.d.ts +26 -16
- package/dist/src/pieces/ink.js +15 -6
- package/dist/src/pieces/library.d.ts +9 -15
- package/dist/src/pieces/library.js +52 -53
- package/dist/src/pieces/link-icons.d.ts +2 -1
- package/dist/src/pieces/link-icons.js +10 -18
- package/dist/src/pieces/metro.d.ts +4 -2
- package/dist/src/pieces/metro.js +14 -13
- package/dist/src/pieces/node.d.ts +5 -3
- package/dist/src/pieces/node.js +6 -4
- package/dist/src/pieces/params.js +2 -2
- package/dist/tokens/generated/tokens.d.ts +68 -156
- package/dist/tokens/generated/tokens.js +69 -157
- package/fonts/OFL.txt +97 -0
- package/fonts/SourceCodePro-Bold.ttf +0 -0
- package/fonts/SourceCodePro-Regular.ttf +0 -0
- package/fonts/SourceSans3-Black.ttf +0 -0
- package/fonts/SourceSans3-Bold.ttf +0 -0
- package/fonts/SourceSans3-Regular.ttf +0 -0
- package/package.json +10 -1
- package/tokens/generated/tokens.css +60 -110
- package/tokens/generated/tokens.json +69 -157
- package/tokens/generated/tokens.ts +69 -157
- package/dist/src/pieces/cast.d.ts +0 -35
- package/dist/src/pieces/cast.js +0 -333
|
@@ -17,9 +17,11 @@ export declare const el: (tag: SvgTag, attrs?: Attrs, ...children: Child[]) => S
|
|
|
17
17
|
export declare const g: (attrs: Attrs, ...children: Child[]) => SvgNode;
|
|
18
18
|
export declare const drawn: (body: readonly SvgNode[], text?: readonly SvgNode[]) => Drawn;
|
|
19
19
|
/**
|
|
20
|
-
* Hard offset shadow
|
|
21
|
-
*
|
|
22
|
-
*
|
|
20
|
+
* Hard offset shadow: the pieces draw none since 0.7.0 (ADR 0009, `shadow.block`
|
|
21
|
+
* is 0), so with offset 0 this returns the shape alone and the output carries no
|
|
22
|
+
* hidden node. With an offset above 0, for a caller that still wants one: an ink
|
|
23
|
+
* copy of the shape translated by `offset`, then the shape. Inside the outlined
|
|
24
|
+
* group the copy keeps the outline too.
|
|
23
25
|
*/
|
|
24
26
|
export declare const shadowed: (shape: SvgNode, offset?: number) => SvgNode[];
|
|
25
27
|
/** Rounds to two decimals so computed geometry stays short and stable in the output. */
|
package/dist/src/pieces/node.js
CHANGED
|
@@ -34,11 +34,13 @@ export const el = (tag, attrs = {}, ...children) => ({
|
|
|
34
34
|
export const g = (attrs, ...children) => el("g", attrs, ...children);
|
|
35
35
|
export const drawn = (body, text = []) => ({ body, text });
|
|
36
36
|
/**
|
|
37
|
-
* Hard offset shadow
|
|
38
|
-
*
|
|
39
|
-
*
|
|
37
|
+
* Hard offset shadow: the pieces draw none since 0.7.0 (ADR 0009, `shadow.block`
|
|
38
|
+
* is 0), so with offset 0 this returns the shape alone and the output carries no
|
|
39
|
+
* hidden node. With an offset above 0, for a caller that still wants one: an ink
|
|
40
|
+
* copy of the shape translated by `offset`, then the shape. Inside the outlined
|
|
41
|
+
* group the copy keeps the outline too.
|
|
40
42
|
*/
|
|
41
|
-
export const shadowed = (shape, offset = tokens.shadow.block) => [
|
|
43
|
+
export const shadowed = (shape, offset = tokens.shadow.block) => offset === 0 ? [shape] : [
|
|
42
44
|
{
|
|
43
45
|
...shape,
|
|
44
46
|
attrs: {
|
|
@@ -32,7 +32,7 @@ export const isColourLiteral = (value) => COLOUR_LITERAL.test(value);
|
|
|
32
32
|
export const colour = (path, name = "colour") => {
|
|
33
33
|
const value = COLOUR_TOKENS.get(path);
|
|
34
34
|
if (value === undefined)
|
|
35
|
-
throw new RangeError(`${name}: expected a colour token path such as color.healthy, found ${JSON.stringify(path)}`);
|
|
35
|
+
throw new RangeError(`${name}: expected a colour token path such as color.state.healthy, found ${JSON.stringify(path)}`);
|
|
36
36
|
return value;
|
|
37
37
|
};
|
|
38
38
|
const describe = (value) => (value === undefined ? "nothing" : JSON.stringify(value));
|
|
@@ -62,7 +62,7 @@ const checkValue = (spec, value, path, out) => {
|
|
|
62
62
|
if (isColourLiteral(value))
|
|
63
63
|
return report("colour literals are not allowed; use a token path");
|
|
64
64
|
if (!COLOUR_TOKENS.has(value))
|
|
65
|
-
return report(`expected a colour token path such as color.healthy, found ${describe(value)}`);
|
|
65
|
+
return report(`expected a colour token path such as color.state.healthy, found ${describe(value)}`);
|
|
66
66
|
return;
|
|
67
67
|
case "dataColor":
|
|
68
68
|
if (typeof value !== "string")
|
|
@@ -27,6 +27,7 @@ export declare const tokens: {
|
|
|
27
27
|
readonly trackAi: "#1B1F28";
|
|
28
28
|
readonly trackDelivery: "#18231D";
|
|
29
29
|
readonly trackIntegration: "#2A1C15";
|
|
30
|
+
readonly trackPersonal: "#29240F";
|
|
30
31
|
readonly warning: "#EBB34B";
|
|
31
32
|
};
|
|
32
33
|
readonly light: {
|
|
@@ -41,60 +42,25 @@ export declare const tokens: {
|
|
|
41
42
|
readonly success: "#2B7A4B";
|
|
42
43
|
readonly text: "#121212";
|
|
43
44
|
readonly textMuted: "#5C5852";
|
|
44
|
-
readonly trackAi: "#
|
|
45
|
-
readonly trackDelivery: "#
|
|
46
|
-
readonly trackIntegration: "#
|
|
45
|
+
readonly trackAi: "#C5CDF2";
|
|
46
|
+
readonly trackDelivery: "#B9DEC3";
|
|
47
|
+
readonly trackIntegration: "#F7C6A1";
|
|
48
|
+
readonly trackPersonal: "#F4DD8E";
|
|
47
49
|
readonly warning: "#8F5F00";
|
|
48
50
|
};
|
|
49
51
|
};
|
|
50
52
|
readonly cast: {
|
|
51
|
-
readonly agent: {
|
|
52
|
-
readonly neck: "#E3E8F5";
|
|
53
|
-
readonly shine: "#E6ECFF";
|
|
54
|
-
};
|
|
55
|
-
readonly architect: {
|
|
56
|
-
readonly fill: "#22B5A4";
|
|
57
|
-
readonly shine: "#9CF0E4";
|
|
58
|
-
};
|
|
59
|
-
readonly data: {
|
|
60
|
-
readonly fill: "#8C6CF0";
|
|
61
|
-
readonly lens: "#EAF1FF";
|
|
62
|
-
readonly lid: "#C2B1FF";
|
|
63
|
-
readonly shine: "#B39CFF";
|
|
64
|
-
};
|
|
65
|
-
readonly dev: {
|
|
66
|
-
readonly chin: "#8FA6FF";
|
|
67
|
-
readonly fill: "#5B7CFA";
|
|
68
|
-
readonly screen: "#DCE6FF";
|
|
69
|
-
};
|
|
70
|
-
readonly devops: {
|
|
71
|
-
readonly fill: "#D76AA5";
|
|
72
|
-
readonly shine: "#F3B8D6";
|
|
73
|
-
};
|
|
74
53
|
readonly emotePop: {
|
|
75
54
|
readonly damping: 9;
|
|
76
55
|
readonly mass: 0.7;
|
|
77
56
|
readonly stiffness: 170;
|
|
78
57
|
};
|
|
79
58
|
readonly eyes: "#FFC98A";
|
|
80
|
-
readonly glow: "#7FD1FF";
|
|
81
|
-
readonly ground: "#D3DBF5";
|
|
82
|
-
readonly metal: "#C9D2E8";
|
|
83
|
-
readonly mouth: "#B94A3E";
|
|
84
|
-
readonly request: {
|
|
85
|
-
readonly shine: "#D6E2FF";
|
|
86
|
-
};
|
|
87
59
|
};
|
|
88
60
|
readonly color: {
|
|
89
|
-
readonly
|
|
90
|
-
readonly
|
|
91
|
-
readonly
|
|
92
|
-
readonly failFast: "#E0661F";
|
|
93
|
-
readonly failure: "#E04848";
|
|
94
|
-
readonly healthy: "#3DDC84";
|
|
95
|
-
readonly ink: "#0A1033";
|
|
96
|
-
readonly panel: "#EEF2FF";
|
|
97
|
-
readonly ring: "#E0E7FB";
|
|
61
|
+
readonly ink: "#121212";
|
|
62
|
+
readonly panel: "#F6F3EC";
|
|
63
|
+
readonly ring: "#EDE8DE";
|
|
98
64
|
readonly state: {
|
|
99
65
|
readonly backend: "#FF6B6B";
|
|
100
66
|
readonly blocked: "#FF8A3D";
|
|
@@ -104,13 +70,12 @@ export declare const tokens: {
|
|
|
104
70
|
readonly healthy: "#3DDC84";
|
|
105
71
|
readonly transitional: "#FFD25A";
|
|
106
72
|
};
|
|
107
|
-
readonly transitional: "#FFD25A";
|
|
108
73
|
readonly white: "#FFFFFF";
|
|
109
74
|
};
|
|
110
75
|
readonly cover: {
|
|
111
76
|
readonly height: 420;
|
|
112
77
|
readonly labelSize: 19;
|
|
113
|
-
readonly labelWeight:
|
|
78
|
+
readonly labelWeight: 700;
|
|
114
79
|
readonly pillHeight: 36;
|
|
115
80
|
readonly ringRadius: 90;
|
|
116
81
|
readonly ringStep: 28;
|
|
@@ -119,122 +84,69 @@ export declare const tokens: {
|
|
|
119
84
|
readonly width: 800;
|
|
120
85
|
};
|
|
121
86
|
readonly coverBackground: {
|
|
122
|
-
readonly
|
|
123
|
-
readonly fill: "#
|
|
124
|
-
readonly ring: "#
|
|
125
|
-
};
|
|
126
|
-
readonly cobalt: {
|
|
127
|
-
readonly fill: "#1E4FA0";
|
|
128
|
-
readonly ring: "#2758AE";
|
|
129
|
-
};
|
|
130
|
-
readonly cream: {
|
|
131
|
-
readonly fill: "#FFF1C9";
|
|
132
|
-
readonly ring: "#F4E2AE";
|
|
133
|
-
};
|
|
134
|
-
readonly deepTeal: {
|
|
135
|
-
readonly fill: "#0F6E6E";
|
|
136
|
-
readonly ring: "#167A79";
|
|
137
|
-
};
|
|
138
|
-
readonly emerald: {
|
|
139
|
-
readonly fill: "#2F9E6E";
|
|
140
|
-
readonly ring: "#38AB79";
|
|
141
|
-
};
|
|
142
|
-
readonly forest: {
|
|
143
|
-
readonly fill: "#24604F";
|
|
144
|
-
readonly ring: "#2B6E5B";
|
|
87
|
+
readonly aiLilac: {
|
|
88
|
+
readonly fill: "#DCC7F0";
|
|
89
|
+
readonly ring: "#C3A9DC";
|
|
145
90
|
};
|
|
146
|
-
readonly
|
|
147
|
-
readonly fill: "#
|
|
148
|
-
readonly ring: "#
|
|
91
|
+
readonly aiSky: {
|
|
92
|
+
readonly fill: "#B5D5F2";
|
|
93
|
+
readonly ring: "#94BBDE";
|
|
149
94
|
};
|
|
150
|
-
readonly
|
|
151
|
-
readonly fill: "#
|
|
152
|
-
readonly ring: "#
|
|
95
|
+
readonly deliveryMint: {
|
|
96
|
+
readonly fill: "#A9DCD6";
|
|
97
|
+
readonly ring: "#88C4BD";
|
|
153
98
|
};
|
|
154
|
-
readonly
|
|
155
|
-
readonly fill: "#
|
|
156
|
-
readonly ring: "#
|
|
99
|
+
readonly deliveryOlive: {
|
|
100
|
+
readonly fill: "#D3DFA8";
|
|
101
|
+
readonly ring: "#B9C78A";
|
|
157
102
|
};
|
|
158
|
-
readonly
|
|
159
|
-
readonly fill: "#
|
|
160
|
-
readonly ring: "#
|
|
103
|
+
readonly integrationClay: {
|
|
104
|
+
readonly fill: "#E9CDBE";
|
|
105
|
+
readonly ring: "#D3B3A3";
|
|
161
106
|
};
|
|
162
|
-
readonly
|
|
163
|
-
readonly fill: "#
|
|
164
|
-
readonly ring: "#
|
|
107
|
+
readonly integrationSand: {
|
|
108
|
+
readonly fill: "#EED7A8";
|
|
109
|
+
readonly ring: "#D8BF8C";
|
|
165
110
|
};
|
|
166
111
|
readonly neutral: {
|
|
167
112
|
readonly fill: "#F6F3EC";
|
|
168
113
|
readonly ring: "#D8D6D0";
|
|
169
114
|
};
|
|
170
|
-
readonly
|
|
171
|
-
readonly fill: "#
|
|
172
|
-
readonly ring: "#
|
|
173
|
-
};
|
|
174
|
-
readonly peach: {
|
|
175
|
-
readonly fill: "#F4D8BC";
|
|
176
|
-
readonly ring: "#EAC7A3";
|
|
177
|
-
};
|
|
178
|
-
readonly plum: {
|
|
179
|
-
readonly fill: "#3D2B66";
|
|
180
|
-
readonly ring: "#483577";
|
|
181
|
-
};
|
|
182
|
-
readonly raspberry: {
|
|
183
|
-
readonly fill: "#C94F7C";
|
|
184
|
-
readonly ring: "#BE4572";
|
|
185
|
-
};
|
|
186
|
-
readonly salmon: {
|
|
187
|
-
readonly fill: "#FF9E7A";
|
|
188
|
-
readonly ring: "#F48D68";
|
|
189
|
-
};
|
|
190
|
-
readonly sky: {
|
|
191
|
-
readonly fill: "#BFE3F7";
|
|
192
|
-
readonly ring: "#AAD5EC";
|
|
193
|
-
};
|
|
194
|
-
readonly slate: {
|
|
195
|
-
readonly fill: "#2E3A59";
|
|
196
|
-
readonly ring: "#38466A";
|
|
197
|
-
};
|
|
198
|
-
readonly teal: {
|
|
199
|
-
readonly fill: "#1F8A8A";
|
|
200
|
-
readonly ring: "#2A9A99";
|
|
115
|
+
readonly personalRose: {
|
|
116
|
+
readonly fill: "#F5C9DA";
|
|
117
|
+
readonly ring: "#E0ABC0";
|
|
201
118
|
};
|
|
202
119
|
readonly trackAi: {
|
|
203
|
-
readonly fill: "#
|
|
204
|
-
readonly ring: "#
|
|
120
|
+
readonly fill: "#C5CDF2";
|
|
121
|
+
readonly ring: "#A5AEDA";
|
|
205
122
|
};
|
|
206
123
|
readonly trackDelivery: {
|
|
207
|
-
readonly fill: "#
|
|
208
|
-
readonly ring: "#
|
|
124
|
+
readonly fill: "#B9DEC3";
|
|
125
|
+
readonly ring: "#98C6A5";
|
|
209
126
|
};
|
|
210
127
|
readonly trackIntegration: {
|
|
211
|
-
readonly fill: "#
|
|
212
|
-
readonly ring: "#
|
|
213
|
-
};
|
|
214
|
-
readonly violet: {
|
|
215
|
-
readonly fill: "#5B3CC4";
|
|
216
|
-
readonly ring: "#6748CF";
|
|
128
|
+
readonly fill: "#F7C6A1";
|
|
129
|
+
readonly ring: "#E3AB84";
|
|
217
130
|
};
|
|
218
|
-
readonly
|
|
219
|
-
readonly fill: "#
|
|
220
|
-
readonly ring: "#
|
|
131
|
+
readonly trackPersonal: {
|
|
132
|
+
readonly fill: "#F4DD8E";
|
|
133
|
+
readonly ring: "#DDC46C";
|
|
221
134
|
};
|
|
222
135
|
};
|
|
223
136
|
readonly font: {
|
|
224
|
-
readonly mono: "ui-monospace, 'SF Mono', Menlo, Consolas, monospace";
|
|
225
|
-
readonly sans: "
|
|
137
|
+
readonly mono: "'Source Code Pro', ui-monospace, 'SF Mono', Menlo, Consolas, monospace";
|
|
138
|
+
readonly sans: "'Source Sans 3', 'Helvetica Neue', Helvetica, Arial, sans-serif";
|
|
139
|
+
readonly serif: "'Source Serif 4', Georgia, 'Times New Roman', serif";
|
|
226
140
|
readonly weightBold: 700;
|
|
227
141
|
readonly weightHeavy: 900;
|
|
228
142
|
};
|
|
229
143
|
readonly illustration: {
|
|
230
|
-
readonly accent: "#
|
|
231
|
-
readonly codePanel: "#
|
|
232
|
-
readonly
|
|
233
|
-
readonly
|
|
234
|
-
readonly
|
|
235
|
-
readonly
|
|
236
|
-
readonly textBar: "#C9D6F5";
|
|
237
|
-
readonly transitionalShade: "#E8B830";
|
|
144
|
+
readonly accent: "#E04E17";
|
|
145
|
+
readonly codePanel: "#1D1C1A";
|
|
146
|
+
readonly iconLine: "#D7D1C5";
|
|
147
|
+
readonly road: "#5C5852";
|
|
148
|
+
readonly tape: "#F4E4D8";
|
|
149
|
+
readonly textBar: "#D7D1C5";
|
|
238
150
|
};
|
|
239
151
|
readonly map: {
|
|
240
152
|
readonly badgeHeight: 20;
|
|
@@ -253,7 +165,7 @@ export declare const tokens: {
|
|
|
253
165
|
readonly nodeRadius: 10;
|
|
254
166
|
readonly outline: 3;
|
|
255
167
|
readonly ringWidth: 3;
|
|
256
|
-
readonly shadow:
|
|
168
|
+
readonly shadow: 0;
|
|
257
169
|
readonly stopRadius: 12;
|
|
258
170
|
readonly zonePadding: 32;
|
|
259
171
|
readonly zoneTitleTint: 0.6;
|
|
@@ -288,9 +200,9 @@ export declare const tokens: {
|
|
|
288
200
|
readonly small: 6;
|
|
289
201
|
};
|
|
290
202
|
readonly shadow: {
|
|
291
|
-
readonly block:
|
|
292
|
-
readonly pill:
|
|
293
|
-
readonly small:
|
|
203
|
+
readonly block: 0;
|
|
204
|
+
readonly pill: 0;
|
|
205
|
+
readonly small: 0;
|
|
294
206
|
};
|
|
295
207
|
readonly site: {
|
|
296
208
|
readonly dark: {
|
|
@@ -304,8 +216,8 @@ export declare const tokens: {
|
|
|
304
216
|
readonly textLight: "#B4AFB6";
|
|
305
217
|
};
|
|
306
218
|
readonly font: {
|
|
307
|
-
readonly primary: "
|
|
308
|
-
readonly secondary: "
|
|
219
|
+
readonly primary: "'Source Sans 3', sans-serif";
|
|
220
|
+
readonly secondary: "'Source Serif 4', serif";
|
|
309
221
|
};
|
|
310
222
|
readonly fontSize: {
|
|
311
223
|
readonly base: 16;
|
|
@@ -342,14 +254,14 @@ export declare const tokens: {
|
|
|
342
254
|
readonly backdropPark: "#183F52";
|
|
343
255
|
readonly backdropWater: "#1E3175";
|
|
344
256
|
readonly backdropWaterEdge: "#2A3F8A";
|
|
345
|
-
readonly background: "#
|
|
346
|
-
readonly grid: "#
|
|
347
|
-
readonly muted: "#
|
|
348
|
-
readonly panel: "#
|
|
349
|
-
readonly rim: "#
|
|
350
|
-
readonly rimWidth:
|
|
351
|
-
readonly shadow: "#
|
|
352
|
-
readonly text: "#
|
|
257
|
+
readonly background: "#121110";
|
|
258
|
+
readonly grid: "#3B3834";
|
|
259
|
+
readonly muted: "#ADA79D";
|
|
260
|
+
readonly panel: "#1D1C1A";
|
|
261
|
+
readonly rim: "#F1EEE8";
|
|
262
|
+
readonly rimWidth: 0;
|
|
263
|
+
readonly shadow: "#121110";
|
|
264
|
+
readonly text: "#F1EEE8";
|
|
353
265
|
readonly zoneOpacity: 0.22;
|
|
354
266
|
};
|
|
355
267
|
readonly light: {
|
|
@@ -357,14 +269,14 @@ export declare const tokens: {
|
|
|
357
269
|
readonly backdropPark: "#D4F2DF";
|
|
358
270
|
readonly backdropWater: "#C9D8FF";
|
|
359
271
|
readonly backdropWaterEdge: "#B5C7F5";
|
|
360
|
-
readonly background: "#
|
|
361
|
-
readonly grid: "#
|
|
362
|
-
readonly muted: "#
|
|
272
|
+
readonly background: "#F6F3EC";
|
|
273
|
+
readonly grid: "#EDE8DE";
|
|
274
|
+
readonly muted: "#5C5852";
|
|
363
275
|
readonly panel: "#FFFFFF";
|
|
364
|
-
readonly rim: "#
|
|
276
|
+
readonly rim: "#F6F3EC";
|
|
365
277
|
readonly rimWidth: 0;
|
|
366
|
-
readonly shadow: "#
|
|
367
|
-
readonly text: "#
|
|
278
|
+
readonly shadow: "#121212";
|
|
279
|
+
readonly text: "#121212";
|
|
368
280
|
readonly zoneOpacity: 0.12;
|
|
369
281
|
};
|
|
370
282
|
};
|