@guardian/stand 0.0.4 → 0.0.6

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.
Files changed (83) hide show
  1. package/README.md +394 -7
  2. package/dist/{byline → components/byline}/Byline.cjs +5 -5
  3. package/dist/{byline → components/byline}/Byline.js +5 -5
  4. package/dist/components/byline/styles.cjs +266 -0
  5. package/dist/components/byline/styles.js +256 -0
  6. package/dist/components/tag-picker/TagAutocomplete.cjs +107 -0
  7. package/dist/components/tag-picker/TagAutocomplete.js +26 -0
  8. package/dist/components/tag-picker/TagTable.cjs +203 -0
  9. package/dist/components/tag-picker/TagTable.js +91 -0
  10. package/dist/components/tag-picker/styles.cjs +198 -0
  11. package/dist/components/tag-picker/styles.js +185 -0
  12. package/dist/components/util.cjs +19 -0
  13. package/dist/components/util.js +17 -0
  14. package/dist/index.cjs +15 -1
  15. package/dist/index.js +8 -1
  16. package/dist/styleD/build/css/css/base/colors.css +122 -0
  17. package/dist/styleD/build/css/css/base/typography.css +43 -0
  18. package/dist/styleD/build/css/css/component/byline.css +36 -0
  19. package/dist/styleD/build/css/css/component/tagAutocomplete.css +23 -0
  20. package/dist/styleD/build/css/css/component/tagTable.css +39 -0
  21. package/dist/styleD/build/css/css/semantic/colors.css +27 -0
  22. package/dist/styleD/build/css/css/semantic/typography.css +138 -0
  23. package/dist/styleD/build/typescript/base/colors.cjs +144 -0
  24. package/dist/styleD/build/typescript/base/colors.js +142 -0
  25. package/dist/styleD/build/typescript/base/typography.cjs +65 -0
  26. package/dist/styleD/build/typescript/base/typography.js +63 -0
  27. package/dist/styleD/build/typescript/component/byline.cjs +42 -0
  28. package/dist/styleD/build/typescript/component/byline.js +40 -0
  29. package/dist/styleD/build/typescript/component/tagAutocomplete.cjs +29 -0
  30. package/dist/styleD/build/typescript/component/tagAutocomplete.js +27 -0
  31. package/dist/styleD/build/typescript/component/tagTable.cjs +53 -0
  32. package/dist/styleD/build/typescript/component/tagTable.js +51 -0
  33. package/dist/styleD/build/typescript/semantic/colors.cjs +37 -0
  34. package/dist/styleD/build/typescript/semantic/colors.js +35 -0
  35. package/dist/styleD/build/typescript/semantic/typography.cjs +462 -0
  36. package/dist/styleD/build/typescript/semantic/typography.js +460 -0
  37. package/dist/styleD/utils/semantic/typography.cjs +17 -0
  38. package/dist/styleD/utils/semantic/typography.js +15 -0
  39. package/dist/types/components/byline/Byline.d.ts +83 -0
  40. package/dist/types/components/byline/styles.d.ts +13 -0
  41. package/dist/types/components/byline/theme.d.ts +3 -0
  42. package/dist/types/components/tag-picker/TagAutocomplete.d.ts +117 -0
  43. package/dist/types/components/tag-picker/TagTable.d.ts +126 -0
  44. package/dist/types/components/tag-picker/example-tags.d.ts +2 -0
  45. package/dist/types/components/tag-picker/styles.d.ts +16 -0
  46. package/dist/types/components/tag-picker/types.d.ts +65 -0
  47. package/dist/types/{byline → components}/util.d.ts +1 -0
  48. package/dist/types/index.d.ts +26 -2
  49. package/dist/types/styleD/build/typescript/base/colors.d.ts +144 -0
  50. package/dist/types/styleD/build/typescript/base/typography.d.ts +65 -0
  51. package/dist/types/styleD/build/typescript/component/byline.d.ts +42 -0
  52. package/dist/types/styleD/build/typescript/component/tagAutocomplete.d.ts +29 -0
  53. package/dist/types/styleD/build/typescript/component/tagTable.d.ts +53 -0
  54. package/dist/types/styleD/build/typescript/semantic/colors.d.ts +37 -0
  55. package/dist/types/styleD/build/typescript/semantic/typography.d.ts +462 -0
  56. package/dist/types/styleD/stories/base/Typography.d.ts +1 -0
  57. package/dist/types/styleD/stories/base/storybookColorPalette.d.ts +19 -0
  58. package/dist/types/styleD/stories/semantic/TypographyPresets.d.ts +1 -0
  59. package/dist/types/styleD/utils/semantic/typography.d.ts +15 -0
  60. package/dist/types/styleD/utils/semantic/typography.test.d.ts +1 -0
  61. package/package.json +67 -22
  62. package/dist/byline/styles.cjs +0 -244
  63. package/dist/byline/styles.js +0 -234
  64. package/dist/types/byline/Byline.d.ts +0 -17
  65. package/dist/types/byline/styles.d.ts +0 -11
  66. package/dist/types/byline/theme.d.ts +0 -44
  67. /package/dist/{byline → components/byline}/Preview.cjs +0 -0
  68. /package/dist/{byline → components/byline}/Preview.js +0 -0
  69. /package/dist/{byline → components/byline}/lib.cjs +0 -0
  70. /package/dist/{byline → components/byline}/lib.js +0 -0
  71. /package/dist/{byline → components/byline}/placeholder.cjs +0 -0
  72. /package/dist/{byline → components/byline}/placeholder.js +0 -0
  73. /package/dist/{byline → components/byline}/plugins.cjs +0 -0
  74. /package/dist/{byline → components/byline}/plugins.js +0 -0
  75. /package/dist/{byline → components/byline}/schema.cjs +0 -0
  76. /package/dist/{byline → components/byline}/schema.js +0 -0
  77. /package/dist/types/{byline → components/byline}/Preview.d.ts +0 -0
  78. /package/dist/types/{byline → components/byline}/contributors-fixture.d.ts +0 -0
  79. /package/dist/types/{byline → components/byline}/lib.d.ts +0 -0
  80. /package/dist/types/{byline → components/byline}/lib.test.d.ts +0 -0
  81. /package/dist/types/{byline → components/byline}/placeholder.d.ts +0 -0
  82. /package/dist/types/{byline → components/byline}/plugins.d.ts +0 -0
  83. /package/dist/types/{byline → components/byline}/schema.d.ts +0 -0
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+ export declare const componentTagTable: {
5
+ heading: {
6
+ backgroundColor: string;
7
+ fontWeight: number;
8
+ paddingTop: string;
9
+ paddingRight: string;
10
+ paddingBottom: string;
11
+ paddingLeft: string;
12
+ };
13
+ cell: {
14
+ paddingX: string;
15
+ paddingY: string;
16
+ firstCellPaddingLeft: string;
17
+ borderBetweenCells: {
18
+ borderWidth: string;
19
+ borderStyle: string;
20
+ borderColor: string;
21
+ };
22
+ };
23
+ row: {
24
+ height: string;
25
+ backgroundColor: string;
26
+ backgroundHoverColor: string;
27
+ borderBottom: {
28
+ borderWidth: string;
29
+ borderStyle: string;
30
+ borderColor: string;
31
+ };
32
+ firstRowBackgroundColor: string;
33
+ firstRowBackgroundHoverColor: string;
34
+ };
35
+ addButton: {
36
+ color: string;
37
+ paddingX: string;
38
+ paddingY: string;
39
+ backgroundColor: string;
40
+ backgroundHoverColor: string;
41
+ fontWeight: number;
42
+ fontSize: string;
43
+ };
44
+ typeBadge: {
45
+ color: string;
46
+ backgroundColor: string;
47
+ paddingX: string;
48
+ paddingY: string;
49
+ fontWeight: number;
50
+ fontSize: string;
51
+ };
52
+ };
53
+ export type ComponentTagTable = typeof componentTagTable;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+ export declare const semanticColors: {
5
+ text: {
6
+ primary: string;
7
+ secondary: string;
8
+ tertiary: string;
9
+ 'inverse-default': string;
10
+ 'inverse-secondary': string;
11
+ 'inverse-tertiary': string;
12
+ 'inverse-strong': string;
13
+ warning: string;
14
+ success: string;
15
+ };
16
+ surface: {
17
+ 'light-1': string;
18
+ 'light-2': string;
19
+ 'dark-1': string;
20
+ };
21
+ border: {
22
+ subtle: string;
23
+ default: string;
24
+ strong: string;
25
+ 'inverse-strong': string;
26
+ };
27
+ bg: {
28
+ 'default-onDark': string;
29
+ 'default-onLight': string;
30
+ };
31
+ status: {
32
+ 'status-draft': string;
33
+ 'status-live': string;
34
+ 'status-selected': string;
35
+ };
36
+ };
37
+ export type SemanticColors = typeof semanticColors;
@@ -0,0 +1,462 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+ export declare const semanticTypography: {
5
+ 'title-sm': {
6
+ font: {
7
+ fontFamily: string;
8
+ fontWeight: number;
9
+ fontSize: string;
10
+ fontStyle: string;
11
+ lineHeight: number;
12
+ letterSpacing: string;
13
+ };
14
+ letterSpacing: string;
15
+ fontWidth: number;
16
+ };
17
+ 'title-md': {
18
+ font: {
19
+ fontFamily: string;
20
+ fontWeight: number;
21
+ fontSize: string;
22
+ fontStyle: string;
23
+ lineHeight: number;
24
+ letterSpacing: string;
25
+ };
26
+ letterSpacing: string;
27
+ fontWidth: number;
28
+ };
29
+ 'title-lg': {
30
+ font: {
31
+ fontFamily: string;
32
+ fontWeight: number;
33
+ fontSize: string;
34
+ fontStyle: string;
35
+ lineHeight: number;
36
+ letterSpacing: string;
37
+ };
38
+ letterSpacing: string;
39
+ fontWidth: number;
40
+ };
41
+ 'title-xl': {
42
+ font: {
43
+ fontFamily: string;
44
+ fontWeight: number;
45
+ fontSize: string;
46
+ fontStyle: string;
47
+ lineHeight: number;
48
+ letterSpacing: string;
49
+ };
50
+ letterSpacing: string;
51
+ fontWidth: number;
52
+ };
53
+ 'heading-xs': {
54
+ font: {
55
+ fontFamily: string;
56
+ fontWeight: number;
57
+ fontSize: string;
58
+ fontStyle: string;
59
+ lineHeight: number;
60
+ letterSpacing: string;
61
+ };
62
+ letterSpacing: string;
63
+ fontWidth: number;
64
+ };
65
+ 'heading-sm': {
66
+ font: {
67
+ fontFamily: string;
68
+ fontWeight: number;
69
+ fontSize: string;
70
+ fontStyle: string;
71
+ lineHeight: number;
72
+ letterSpacing: string;
73
+ };
74
+ letterSpacing: string;
75
+ fontWidth: number;
76
+ };
77
+ 'heading-md': {
78
+ font: {
79
+ fontFamily: string;
80
+ fontWeight: number;
81
+ fontSize: string;
82
+ fontStyle: string;
83
+ lineHeight: number;
84
+ letterSpacing: string;
85
+ };
86
+ letterSpacing: string;
87
+ fontWidth: number;
88
+ };
89
+ 'heading-lg': {
90
+ font: {
91
+ fontFamily: string;
92
+ fontWeight: number;
93
+ fontSize: string;
94
+ fontStyle: string;
95
+ lineHeight: number;
96
+ letterSpacing: string;
97
+ };
98
+ letterSpacing: string;
99
+ fontWidth: number;
100
+ };
101
+ 'heading-xl': {
102
+ font: {
103
+ fontFamily: string;
104
+ fontWeight: number;
105
+ fontSize: string;
106
+ fontStyle: string;
107
+ lineHeight: number;
108
+ letterSpacing: string;
109
+ };
110
+ letterSpacing: string;
111
+ fontWidth: number;
112
+ };
113
+ 'heading-2xl': {
114
+ font: {
115
+ fontFamily: string;
116
+ fontWeight: number;
117
+ fontSize: string;
118
+ fontStyle: string;
119
+ lineHeight: number;
120
+ letterSpacing: string;
121
+ };
122
+ letterSpacing: string;
123
+ fontWidth: number;
124
+ };
125
+ 'heading-compact-xs': {
126
+ font: {
127
+ fontFamily: string;
128
+ fontWeight: number;
129
+ fontSize: string;
130
+ fontStyle: string;
131
+ lineHeight: number;
132
+ letterSpacing: string;
133
+ };
134
+ letterSpacing: string;
135
+ fontWidth: number;
136
+ };
137
+ 'heading-compact-sm': {
138
+ font: {
139
+ fontFamily: string;
140
+ fontWeight: number;
141
+ fontSize: string;
142
+ fontStyle: string;
143
+ lineHeight: number;
144
+ letterSpacing: string;
145
+ };
146
+ letterSpacing: string;
147
+ fontWidth: number;
148
+ };
149
+ 'heading-compact-md': {
150
+ font: {
151
+ fontFamily: string;
152
+ fontWeight: number;
153
+ fontSize: string;
154
+ fontStyle: string;
155
+ lineHeight: number;
156
+ letterSpacing: string;
157
+ };
158
+ letterSpacing: string;
159
+ fontWidth: number;
160
+ };
161
+ 'heading-compact-lg': {
162
+ font: {
163
+ fontFamily: string;
164
+ fontWeight: number;
165
+ fontSize: string;
166
+ fontStyle: string;
167
+ lineHeight: number;
168
+ letterSpacing: string;
169
+ };
170
+ letterSpacing: string;
171
+ fontWidth: number;
172
+ };
173
+ 'heading-compact-xl': {
174
+ font: {
175
+ fontFamily: string;
176
+ fontWeight: number;
177
+ fontSize: string;
178
+ fontStyle: string;
179
+ lineHeight: number;
180
+ letterSpacing: string;
181
+ };
182
+ letterSpacing: string;
183
+ fontWidth: number;
184
+ };
185
+ 'heading-compact-2xl': {
186
+ font: {
187
+ fontFamily: string;
188
+ fontWeight: number;
189
+ fontSize: string;
190
+ fontStyle: string;
191
+ lineHeight: number;
192
+ letterSpacing: string;
193
+ };
194
+ letterSpacing: string;
195
+ fontWidth: number;
196
+ };
197
+ 'body-sm': {
198
+ font: {
199
+ fontFamily: string;
200
+ fontWeight: number;
201
+ fontSize: string;
202
+ fontStyle: string;
203
+ lineHeight: number;
204
+ letterSpacing: string;
205
+ };
206
+ letterSpacing: string;
207
+ fontWidth: number;
208
+ };
209
+ 'body-md': {
210
+ font: {
211
+ fontFamily: string;
212
+ fontWeight: number;
213
+ fontSize: string;
214
+ fontStyle: string;
215
+ lineHeight: number;
216
+ letterSpacing: string;
217
+ };
218
+ letterSpacing: string;
219
+ fontWidth: number;
220
+ };
221
+ 'body-lg': {
222
+ font: {
223
+ fontFamily: string;
224
+ fontWeight: number;
225
+ fontSize: string;
226
+ fontStyle: string;
227
+ lineHeight: number;
228
+ letterSpacing: string;
229
+ };
230
+ letterSpacing: string;
231
+ fontWidth: number;
232
+ };
233
+ 'body-xl': {
234
+ font: {
235
+ fontFamily: string;
236
+ fontWeight: number;
237
+ fontSize: string;
238
+ fontStyle: string;
239
+ lineHeight: number;
240
+ letterSpacing: string;
241
+ };
242
+ letterSpacing: string;
243
+ fontWidth: number;
244
+ };
245
+ 'body-italic-sm': {
246
+ font: {
247
+ fontFamily: string;
248
+ fontWeight: number;
249
+ fontSize: string;
250
+ fontStyle: string;
251
+ lineHeight: number;
252
+ letterSpacing: string;
253
+ };
254
+ letterSpacing: string;
255
+ fontWidth: number;
256
+ };
257
+ 'body-italic-md': {
258
+ font: {
259
+ fontFamily: string;
260
+ fontWeight: number;
261
+ fontSize: string;
262
+ fontStyle: string;
263
+ lineHeight: number;
264
+ letterSpacing: string;
265
+ };
266
+ letterSpacing: string;
267
+ fontWidth: number;
268
+ };
269
+ 'body-italic-lg': {
270
+ font: {
271
+ fontFamily: string;
272
+ fontWeight: number;
273
+ fontSize: string;
274
+ fontStyle: string;
275
+ lineHeight: number;
276
+ letterSpacing: string;
277
+ };
278
+ letterSpacing: string;
279
+ fontWidth: number;
280
+ };
281
+ 'body-italic-xl': {
282
+ font: {
283
+ fontFamily: string;
284
+ fontWeight: number;
285
+ fontSize: string;
286
+ fontStyle: string;
287
+ lineHeight: number;
288
+ letterSpacing: string;
289
+ };
290
+ letterSpacing: string;
291
+ fontWidth: number;
292
+ };
293
+ 'body-compact-sm': {
294
+ font: {
295
+ fontFamily: string;
296
+ fontWeight: number;
297
+ fontSize: string;
298
+ fontStyle: string;
299
+ lineHeight: number;
300
+ letterSpacing: string;
301
+ };
302
+ letterSpacing: string;
303
+ fontWidth: number;
304
+ };
305
+ 'body-compact-md': {
306
+ font: {
307
+ fontFamily: string;
308
+ fontWeight: number;
309
+ fontSize: string;
310
+ fontStyle: string;
311
+ lineHeight: number;
312
+ letterSpacing: string;
313
+ };
314
+ letterSpacing: string;
315
+ fontWidth: number;
316
+ };
317
+ 'body-compact-lg': {
318
+ font: {
319
+ fontFamily: string;
320
+ fontWeight: number;
321
+ fontSize: string;
322
+ fontStyle: string;
323
+ lineHeight: number;
324
+ letterSpacing: string;
325
+ };
326
+ letterSpacing: string;
327
+ fontWidth: number;
328
+ };
329
+ 'body-compact-xl': {
330
+ font: {
331
+ fontFamily: string;
332
+ fontWeight: number;
333
+ fontSize: string;
334
+ fontStyle: string;
335
+ lineHeight: number;
336
+ letterSpacing: string;
337
+ };
338
+ letterSpacing: string;
339
+ fontWidth: number;
340
+ };
341
+ 'body-compact-italic-sm': {
342
+ font: {
343
+ fontFamily: string;
344
+ fontWeight: number;
345
+ fontSize: string;
346
+ fontStyle: string;
347
+ lineHeight: number;
348
+ letterSpacing: string;
349
+ };
350
+ letterSpacing: string;
351
+ fontWidth: number;
352
+ };
353
+ 'body-compact-italic-md': {
354
+ font: {
355
+ fontFamily: string;
356
+ fontWeight: number;
357
+ fontSize: string;
358
+ fontStyle: string;
359
+ lineHeight: number;
360
+ letterSpacing: string;
361
+ };
362
+ letterSpacing: string;
363
+ fontWidth: number;
364
+ };
365
+ 'body-compact-italic-lg': {
366
+ font: {
367
+ fontFamily: string;
368
+ fontWeight: number;
369
+ fontSize: string;
370
+ fontStyle: string;
371
+ lineHeight: number;
372
+ letterSpacing: string;
373
+ };
374
+ letterSpacing: string;
375
+ fontWidth: number;
376
+ };
377
+ 'body-compact-italic-xl': {
378
+ font: {
379
+ fontFamily: string;
380
+ fontWeight: number;
381
+ fontSize: string;
382
+ fontStyle: string;
383
+ lineHeight: number;
384
+ letterSpacing: string;
385
+ };
386
+ letterSpacing: string;
387
+ fontWidth: number;
388
+ };
389
+ 'meta-md': {
390
+ font: {
391
+ fontFamily: string;
392
+ fontWeight: number;
393
+ fontSize: string;
394
+ fontStyle: string;
395
+ lineHeight: number;
396
+ letterSpacing: string;
397
+ };
398
+ letterSpacing: string;
399
+ fontWidth: number;
400
+ };
401
+ 'meta-compact-md': {
402
+ font: {
403
+ fontFamily: string;
404
+ fontWeight: number;
405
+ fontSize: string;
406
+ fontStyle: string;
407
+ lineHeight: number;
408
+ letterSpacing: string;
409
+ };
410
+ letterSpacing: string;
411
+ fontWidth: number;
412
+ };
413
+ 'article-body-md': {
414
+ font: {
415
+ fontFamily: string;
416
+ fontWeight: number;
417
+ fontSize: string;
418
+ fontStyle: string;
419
+ lineHeight: number;
420
+ letterSpacing: string;
421
+ };
422
+ letterSpacing: string;
423
+ fontWidth: number;
424
+ };
425
+ 'article-body-bold-md': {
426
+ font: {
427
+ fontFamily: string;
428
+ fontWeight: number;
429
+ fontSize: string;
430
+ fontStyle: string;
431
+ lineHeight: number;
432
+ letterSpacing: string;
433
+ };
434
+ letterSpacing: string;
435
+ fontWidth: number;
436
+ };
437
+ 'article-body-italic-md': {
438
+ font: {
439
+ fontFamily: string;
440
+ fontWeight: number;
441
+ fontSize: string;
442
+ fontStyle: string;
443
+ lineHeight: number;
444
+ letterSpacing: string;
445
+ };
446
+ letterSpacing: string;
447
+ fontWidth: number;
448
+ };
449
+ 'article-body-bold-italic-md': {
450
+ font: {
451
+ fontFamily: string;
452
+ fontWeight: number;
453
+ fontSize: string;
454
+ fontStyle: string;
455
+ lineHeight: number;
456
+ letterSpacing: string;
457
+ };
458
+ letterSpacing: string;
459
+ fontWidth: number;
460
+ };
461
+ };
462
+ export type SemanticTypography = typeof semanticTypography;
@@ -0,0 +1 @@
1
+ export declare const Typography: () => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ type Colors = string[] | Record<string, string>;
3
+ /**
4
+ * A single color row your styleguide showing title, subtitle and one or more colors, used
5
+ * as a child of `ColorPalette`.
6
+ */
7
+ export declare const ColorItem: ({ title, colors, }: {
8
+ title: string;
9
+ colors: Colors;
10
+ }) => import("@emotion/react/jsx-runtime").JSX.Element;
11
+ interface ColorPaletteProps {
12
+ children?: React.ReactNode;
13
+ }
14
+ /**
15
+ * Styleguide documentation for colors, including names, captions, and color swatches,
16
+ * all specified as `ColorItem` children of this wrapper component.
17
+ */
18
+ export declare const ColorPalette: ({ children, ...props }: ColorPaletteProps) => import("@emotion/react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -0,0 +1 @@
1
+ export declare const TypographyPresets: () => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import type { SerializedStyles } from '@emotion/react';
2
+ type SemanticTypography = {
3
+ font: {
4
+ fontFamily: string;
5
+ fontWeight: number;
6
+ fontSize: string;
7
+ fontStyle: string;
8
+ lineHeight: number;
9
+ letterSpacing: string;
10
+ };
11
+ letterSpacing: string;
12
+ fontWidth: number;
13
+ };
14
+ export declare const convertTypographyToEmotion: (typography: SemanticTypography) => SerializedStyles;
15
+ export {};