@brunosouzas/design-system 0.6.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/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 +71 -155
- package/dist/tokens/generated/tokens.js +72 -156
- 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 +62 -110
- package/tokens/generated/tokens.json +72 -156
- package/tokens/generated/tokens.ts +72 -156
- 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,118 +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
|
-
readonly
|
|
167
|
-
readonly fill: "#
|
|
168
|
-
readonly ring: "#
|
|
111
|
+
readonly neutral: {
|
|
112
|
+
readonly fill: "#F6F3EC";
|
|
113
|
+
readonly ring: "#D8D6D0";
|
|
169
114
|
};
|
|
170
|
-
readonly
|
|
171
|
-
readonly fill: "#
|
|
172
|
-
readonly ring: "#
|
|
173
|
-
};
|
|
174
|
-
readonly plum: {
|
|
175
|
-
readonly fill: "#3D2B66";
|
|
176
|
-
readonly ring: "#483577";
|
|
177
|
-
};
|
|
178
|
-
readonly raspberry: {
|
|
179
|
-
readonly fill: "#C94F7C";
|
|
180
|
-
readonly ring: "#BE4572";
|
|
181
|
-
};
|
|
182
|
-
readonly salmon: {
|
|
183
|
-
readonly fill: "#FF9E7A";
|
|
184
|
-
readonly ring: "#F48D68";
|
|
185
|
-
};
|
|
186
|
-
readonly sky: {
|
|
187
|
-
readonly fill: "#BFE3F7";
|
|
188
|
-
readonly ring: "#AAD5EC";
|
|
189
|
-
};
|
|
190
|
-
readonly slate: {
|
|
191
|
-
readonly fill: "#2E3A59";
|
|
192
|
-
readonly ring: "#38466A";
|
|
193
|
-
};
|
|
194
|
-
readonly teal: {
|
|
195
|
-
readonly fill: "#1F8A8A";
|
|
196
|
-
readonly ring: "#2A9A99";
|
|
115
|
+
readonly personalRose: {
|
|
116
|
+
readonly fill: "#F5C9DA";
|
|
117
|
+
readonly ring: "#E0ABC0";
|
|
197
118
|
};
|
|
198
119
|
readonly trackAi: {
|
|
199
|
-
readonly fill: "#
|
|
200
|
-
readonly ring: "#
|
|
120
|
+
readonly fill: "#C5CDF2";
|
|
121
|
+
readonly ring: "#A5AEDA";
|
|
201
122
|
};
|
|
202
123
|
readonly trackDelivery: {
|
|
203
|
-
readonly fill: "#
|
|
204
|
-
readonly ring: "#
|
|
124
|
+
readonly fill: "#B9DEC3";
|
|
125
|
+
readonly ring: "#98C6A5";
|
|
205
126
|
};
|
|
206
127
|
readonly trackIntegration: {
|
|
207
|
-
readonly fill: "#
|
|
208
|
-
readonly ring: "#
|
|
209
|
-
};
|
|
210
|
-
readonly violet: {
|
|
211
|
-
readonly fill: "#5B3CC4";
|
|
212
|
-
readonly ring: "#6748CF";
|
|
128
|
+
readonly fill: "#F7C6A1";
|
|
129
|
+
readonly ring: "#E3AB84";
|
|
213
130
|
};
|
|
214
|
-
readonly
|
|
215
|
-
readonly fill: "#
|
|
216
|
-
readonly ring: "#
|
|
131
|
+
readonly trackPersonal: {
|
|
132
|
+
readonly fill: "#F4DD8E";
|
|
133
|
+
readonly ring: "#DDC46C";
|
|
217
134
|
};
|
|
218
135
|
};
|
|
219
136
|
readonly font: {
|
|
220
|
-
readonly mono: "ui-monospace, 'SF Mono', Menlo, Consolas, monospace";
|
|
221
|
-
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";
|
|
222
140
|
readonly weightBold: 700;
|
|
223
141
|
readonly weightHeavy: 900;
|
|
224
142
|
};
|
|
225
143
|
readonly illustration: {
|
|
226
|
-
readonly accent: "#
|
|
227
|
-
readonly codePanel: "#
|
|
228
|
-
readonly
|
|
229
|
-
readonly
|
|
230
|
-
readonly
|
|
231
|
-
readonly
|
|
232
|
-
readonly textBar: "#C9D6F5";
|
|
233
|
-
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";
|
|
234
150
|
};
|
|
235
151
|
readonly map: {
|
|
236
152
|
readonly badgeHeight: 20;
|
|
@@ -249,7 +165,7 @@ export declare const tokens: {
|
|
|
249
165
|
readonly nodeRadius: 10;
|
|
250
166
|
readonly outline: 3;
|
|
251
167
|
readonly ringWidth: 3;
|
|
252
|
-
readonly shadow:
|
|
168
|
+
readonly shadow: 0;
|
|
253
169
|
readonly stopRadius: 12;
|
|
254
170
|
readonly zonePadding: 32;
|
|
255
171
|
readonly zoneTitleTint: 0.6;
|
|
@@ -284,9 +200,9 @@ export declare const tokens: {
|
|
|
284
200
|
readonly small: 6;
|
|
285
201
|
};
|
|
286
202
|
readonly shadow: {
|
|
287
|
-
readonly block:
|
|
288
|
-
readonly pill:
|
|
289
|
-
readonly small:
|
|
203
|
+
readonly block: 0;
|
|
204
|
+
readonly pill: 0;
|
|
205
|
+
readonly small: 0;
|
|
290
206
|
};
|
|
291
207
|
readonly site: {
|
|
292
208
|
readonly dark: {
|
|
@@ -300,8 +216,8 @@ export declare const tokens: {
|
|
|
300
216
|
readonly textLight: "#B4AFB6";
|
|
301
217
|
};
|
|
302
218
|
readonly font: {
|
|
303
|
-
readonly primary: "
|
|
304
|
-
readonly secondary: "
|
|
219
|
+
readonly primary: "'Source Sans 3', sans-serif";
|
|
220
|
+
readonly secondary: "'Source Serif 4', serif";
|
|
305
221
|
};
|
|
306
222
|
readonly fontSize: {
|
|
307
223
|
readonly base: 16;
|
|
@@ -338,14 +254,14 @@ export declare const tokens: {
|
|
|
338
254
|
readonly backdropPark: "#183F52";
|
|
339
255
|
readonly backdropWater: "#1E3175";
|
|
340
256
|
readonly backdropWaterEdge: "#2A3F8A";
|
|
341
|
-
readonly background: "#
|
|
342
|
-
readonly grid: "#
|
|
343
|
-
readonly muted: "#
|
|
344
|
-
readonly panel: "#
|
|
345
|
-
readonly rim: "#
|
|
346
|
-
readonly rimWidth:
|
|
347
|
-
readonly shadow: "#
|
|
348
|
-
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";
|
|
349
265
|
readonly zoneOpacity: 0.22;
|
|
350
266
|
};
|
|
351
267
|
readonly light: {
|
|
@@ -353,14 +269,14 @@ export declare const tokens: {
|
|
|
353
269
|
readonly backdropPark: "#D4F2DF";
|
|
354
270
|
readonly backdropWater: "#C9D8FF";
|
|
355
271
|
readonly backdropWaterEdge: "#B5C7F5";
|
|
356
|
-
readonly background: "#
|
|
357
|
-
readonly grid: "#
|
|
358
|
-
readonly muted: "#
|
|
272
|
+
readonly background: "#F6F3EC";
|
|
273
|
+
readonly grid: "#EDE8DE";
|
|
274
|
+
readonly muted: "#5C5852";
|
|
359
275
|
readonly panel: "#FFFFFF";
|
|
360
|
-
readonly rim: "#
|
|
276
|
+
readonly rim: "#F6F3EC";
|
|
361
277
|
readonly rimWidth: 0;
|
|
362
|
-
readonly shadow: "#
|
|
363
|
-
readonly text: "#
|
|
278
|
+
readonly shadow: "#121212";
|
|
279
|
+
readonly text: "#121212";
|
|
364
280
|
readonly zoneOpacity: 0.12;
|
|
365
281
|
};
|
|
366
282
|
};
|