@guardian/stand 0.0.9 → 0.0.11

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 (158) hide show
  1. package/README.md +1122 -1
  2. package/dist/avatar.cjs +9 -0
  3. package/dist/avatar.js +2 -0
  4. package/dist/button.cjs +9 -0
  5. package/dist/button.js +2 -0
  6. package/dist/components/TitleText.cjs +28 -0
  7. package/dist/components/TitleText.js +22 -0
  8. package/dist/components/avatar/Avatar.cjs +57 -0
  9. package/dist/components/avatar/Avatar.js +27 -0
  10. package/dist/components/avatar/styles.cjs +33 -0
  11. package/dist/components/avatar/styles.js +29 -0
  12. package/dist/components/avatar/types.cjs +16 -0
  13. package/dist/components/avatar/types.js +14 -0
  14. package/dist/components/button/Button.cjs +38 -0
  15. package/dist/components/button/Button.js +19 -0
  16. package/dist/components/button/styles.cjs +68 -0
  17. package/dist/components/button/styles.js +63 -0
  18. package/dist/components/icon/Icon.cjs +46 -0
  19. package/dist/components/icon/Icon.js +19 -0
  20. package/dist/components/icon/styles.cjs +27 -0
  21. package/dist/components/icon/styles.js +20 -0
  22. package/dist/components/icon-button/IconButton.cjs +45 -0
  23. package/dist/components/icon-button/IconButton.js +26 -0
  24. package/dist/components/icon-button/styles.cjs +9 -0
  25. package/dist/components/icon-button/styles.js +6 -0
  26. package/dist/components/icon-link-button/IconLinkButton.cjs +47 -0
  27. package/dist/components/icon-link-button/IconLinkButton.js +23 -0
  28. package/dist/components/icon-link-button/styles.cjs +9 -0
  29. package/dist/components/icon-link-button/styles.js +6 -0
  30. package/dist/components/link-button/LinkButton.cjs +35 -0
  31. package/dist/components/link-button/LinkButton.js +16 -0
  32. package/dist/components/link-button/styles.cjs +9 -0
  33. package/dist/components/link-button/styles.js +6 -0
  34. package/dist/components/typography/Typography.cjs +26 -0
  35. package/dist/components/typography/Typography.js +13 -0
  36. package/dist/components/typography/styles.cjs +15 -0
  37. package/dist/components/typography/styles.js +12 -0
  38. package/dist/components/user-menu/PreferenceRadioGroup.cjs +53 -0
  39. package/dist/components/user-menu/PreferenceRadioGroup.js +19 -0
  40. package/dist/components/user-menu/UserMenu.cjs +67 -0
  41. package/dist/components/user-menu/UserMenu.js +11 -0
  42. package/dist/components/user-menu/default-options.cjs +109 -0
  43. package/dist/components/user-menu/default-options.js +105 -0
  44. package/dist/components/user-menu/styles.cjs +90 -0
  45. package/dist/components/user-menu/styles.js +83 -0
  46. package/dist/fonts/MaterialSymbolsOutlined.css +23 -0
  47. package/dist/fonts/MaterialSymbolsRound.css +23 -0
  48. package/dist/fonts/MaterialSymbolsSharp.css +23 -0
  49. package/dist/fonts/material-symbols-types.ts +3825 -0
  50. package/dist/icon-button.cjs +7 -0
  51. package/dist/icon-button.js +1 -0
  52. package/dist/icon-link-button.cjs +7 -0
  53. package/dist/icon-link-button.js +1 -0
  54. package/dist/icon.cjs +9 -0
  55. package/dist/icon.js +2 -0
  56. package/dist/index.cjs +16 -4
  57. package/dist/index.js +6 -0
  58. package/dist/link-button.cjs +7 -0
  59. package/dist/link-button.js +1 -0
  60. package/dist/styleD/build/css/base/colors.css +1 -1
  61. package/dist/styleD/build/css/base/sizing.css +2 -0
  62. package/dist/styleD/build/css/component/avatar.css +54 -0
  63. package/dist/styleD/build/css/component/button.css +282 -0
  64. package/dist/styleD/build/css/component/byline.css +1 -1
  65. package/dist/styleD/build/css/component/icon.css +11 -0
  66. package/dist/styleD/build/css/component/typography.css +7 -0
  67. package/dist/styleD/build/css/component/userMenu.css +29 -0
  68. package/dist/styleD/build/css/semantic/colors.css +12 -8
  69. package/dist/styleD/build/css/semantic/sizing.css +1 -0
  70. package/dist/styleD/build/css/semantic/typography.css +3 -0
  71. package/dist/styleD/build/typescript/base/colors.cjs +1 -1
  72. package/dist/styleD/build/typescript/base/colors.js +1 -1
  73. package/dist/styleD/build/typescript/base/sizing.cjs +2 -0
  74. package/dist/styleD/build/typescript/base/sizing.js +2 -0
  75. package/dist/styleD/build/typescript/component/avatar.cjs +88 -0
  76. package/dist/styleD/build/typescript/component/avatar.js +86 -0
  77. package/dist/styleD/build/typescript/component/button.cjs +523 -0
  78. package/dist/styleD/build/typescript/component/button.js +521 -0
  79. package/dist/styleD/build/typescript/component/byline.cjs +1 -1
  80. package/dist/styleD/build/typescript/component/byline.js +1 -1
  81. package/dist/styleD/build/typescript/component/icon.cjs +19 -0
  82. package/dist/styleD/build/typescript/component/icon.js +17 -0
  83. package/dist/styleD/build/typescript/component/typography.cjs +7 -0
  84. package/dist/styleD/build/typescript/component/typography.js +5 -0
  85. package/dist/styleD/build/typescript/component/userMenu.cjs +37 -0
  86. package/dist/styleD/build/typescript/component/userMenu.js +35 -0
  87. package/dist/styleD/build/typescript/semantic/colors.cjs +14 -10
  88. package/dist/styleD/build/typescript/semantic/colors.js +14 -10
  89. package/dist/styleD/build/typescript/semantic/sizing.cjs +2 -1
  90. package/dist/styleD/build/typescript/semantic/sizing.js +2 -1
  91. package/dist/styleD/build/typescript/semantic/typography.cjs +5 -0
  92. package/dist/styleD/build/typescript/semantic/typography.js +5 -0
  93. package/dist/types/avatar.d.ts +19 -0
  94. package/dist/types/button.d.ts +20 -0
  95. package/dist/types/components/TitleText.d.ts +6 -0
  96. package/dist/types/components/avatar/Avatar.d.ts +2 -0
  97. package/dist/types/components/avatar/styles.d.ts +8 -0
  98. package/dist/types/components/avatar/types.d.ts +45 -0
  99. package/dist/types/components/button/Button.d.ts +2 -0
  100. package/dist/types/components/button/styles.d.ts +7 -0
  101. package/dist/types/components/button/types.d.ts +18 -0
  102. package/dist/types/components/byline/schema.d.ts +1 -1
  103. package/dist/types/components/icon/Icon.d.ts +2 -0
  104. package/dist/types/components/icon/styles.d.ts +8 -0
  105. package/dist/types/components/icon/types.d.ts +28 -0
  106. package/dist/types/components/icon-button/IconButton.d.ts +2 -0
  107. package/dist/types/components/icon-button/styles.d.ts +522 -0
  108. package/dist/types/components/icon-button/types.d.ts +26 -0
  109. package/dist/types/components/icon-link-button/IconLinkButton.d.ts +2 -0
  110. package/dist/types/components/icon-link-button/styles.d.ts +522 -0
  111. package/dist/types/components/icon-link-button/types.d.ts +26 -0
  112. package/dist/types/components/link-button/LinkButton.d.ts +2 -0
  113. package/dist/types/components/link-button/styles.d.ts +522 -0
  114. package/dist/types/components/link-button/types.d.ts +18 -0
  115. package/dist/types/components/typography/Typography.d.ts +6 -0
  116. package/dist/types/components/typography/styles.d.ts +7 -0
  117. package/dist/types/components/typography/types.d.ts +13 -0
  118. package/dist/types/components/user-menu/PreferenceRadioGroup.d.ts +15 -0
  119. package/dist/types/components/user-menu/UserMenu.d.ts +17 -0
  120. package/dist/types/components/user-menu/default-options.d.ts +5 -0
  121. package/dist/types/components/user-menu/model.d.ts +9 -0
  122. package/dist/types/components/user-menu/styles.d.ts +9 -0
  123. package/dist/types/components/user-menu/theme.d.ts +3 -0
  124. package/dist/types/components/user-menu/types.d.ts +5 -0
  125. package/dist/types/fonts/material-symbols-types.d.ts +3822 -0
  126. package/dist/types/icon-button.d.ts +20 -0
  127. package/dist/types/icon-link-button.d.ts +20 -0
  128. package/dist/types/icon.d.ts +27 -0
  129. package/dist/types/index.d.ts +17 -0
  130. package/dist/types/link-button.d.ts +20 -0
  131. package/dist/types/styleD/build/typescript/base/colors.d.ts +1 -1
  132. package/dist/types/styleD/build/typescript/base/sizing.d.ts +2 -0
  133. package/dist/types/styleD/build/typescript/component/avatar.d.ts +88 -0
  134. package/dist/types/styleD/build/typescript/component/button.d.ts +523 -0
  135. package/dist/types/styleD/build/typescript/component/icon.d.ts +19 -0
  136. package/dist/types/styleD/build/typescript/component/typography.d.ts +7 -0
  137. package/dist/types/styleD/build/typescript/component/userMenu.d.ts +37 -0
  138. package/dist/types/styleD/build/typescript/semantic/colors.d.ts +7 -3
  139. package/dist/types/styleD/build/typescript/semantic/sizing.d.ts +1 -0
  140. package/dist/types/styleD/build/typescript/semantic/typography.d.ts +5 -0
  141. package/dist/types/typography.d.ts +19 -0
  142. package/dist/types/user-menu.d.ts +18 -0
  143. package/dist/types/util/reset.d.ts +1 -0
  144. package/dist/types/util/storybookStyles.d.ts +1 -0
  145. package/dist/types/util/types.d.ts +28 -0
  146. package/dist/types/utils.d.ts +1 -0
  147. package/dist/typography.cjs +9 -0
  148. package/dist/typography.js +2 -0
  149. package/dist/user-menu.cjs +9 -0
  150. package/dist/user-menu.js +2 -0
  151. package/dist/util/css/reset.css +124 -0
  152. package/dist/util/reset.cjs +10 -0
  153. package/dist/util/reset.css.cjs +5 -0
  154. package/dist/util/reset.css.js +3 -0
  155. package/dist/util/reset.js +8 -0
  156. package/dist/utils.cjs +2 -0
  157. package/dist/utils.js +1 -0
  158. package/package.json +81 -3
@@ -0,0 +1,522 @@
1
+ import type { ButtonTheme } from '../button/styles';
2
+ export type IconLinkButtonTheme = ButtonTheme;
3
+ export declare const defaultIconLinkButtonTheme: ButtonTheme;
4
+ export declare const iconLinkButtonStyles: (theme: {
5
+ shared: {
6
+ display: string;
7
+ '-webkit-appearance': string;
8
+ 'text-align': string;
9
+ 'box-shadow': string;
10
+ cursor: string;
11
+ 'justify-content': string;
12
+ 'align-items': string;
13
+ 'text-decoration': string;
14
+ ':disabled': {
15
+ cursor: string;
16
+ };
17
+ ':focus-visible': {
18
+ outline: string;
19
+ 'outline-offset': string;
20
+ };
21
+ };
22
+ 'emphasised-primary': {
23
+ shared: {
24
+ color: string;
25
+ backgroundColor: string;
26
+ borderRadius: string;
27
+ border: string;
28
+ ':hover': {
29
+ backgroundColor: string;
30
+ border: string;
31
+ };
32
+ ':active': {
33
+ backgroundColor: string;
34
+ border: string;
35
+ };
36
+ ':disabled': {
37
+ color: string;
38
+ backgroundColor: string;
39
+ border: string;
40
+ };
41
+ };
42
+ xs: {
43
+ height: string;
44
+ padding: {
45
+ top: string;
46
+ right: string;
47
+ bottom: string;
48
+ left: string;
49
+ withIcon: {
50
+ iconLeft: {
51
+ left: string;
52
+ };
53
+ };
54
+ };
55
+ typography: {
56
+ font: string;
57
+ letterSpacing: string;
58
+ fontWidth: number;
59
+ };
60
+ icon: {
61
+ size: string;
62
+ gap: string;
63
+ };
64
+ iconButton: {
65
+ width: string;
66
+ };
67
+ };
68
+ sm: {
69
+ height: string;
70
+ padding: {
71
+ top: string;
72
+ right: string;
73
+ bottom: string;
74
+ left: string;
75
+ withIcon: {
76
+ iconLeft: {
77
+ left: string;
78
+ };
79
+ };
80
+ };
81
+ typography: {
82
+ font: string;
83
+ letterSpacing: string;
84
+ fontWidth: number;
85
+ };
86
+ icon: {
87
+ size: string;
88
+ gap: string;
89
+ };
90
+ iconButton: {
91
+ width: string;
92
+ };
93
+ };
94
+ md: {
95
+ height: string;
96
+ padding: {
97
+ top: string;
98
+ right: string;
99
+ bottom: string;
100
+ left: string;
101
+ withIcon: {
102
+ iconLeft: {
103
+ left: string;
104
+ };
105
+ };
106
+ };
107
+ typography: {
108
+ font: string;
109
+ letterSpacing: string;
110
+ fontWidth: number;
111
+ };
112
+ icon: {
113
+ size: string;
114
+ gap: string;
115
+ };
116
+ iconButton: {
117
+ width: string;
118
+ };
119
+ };
120
+ lg: {
121
+ height: string;
122
+ padding: {
123
+ top: string;
124
+ right: string;
125
+ bottom: string;
126
+ left: string;
127
+ withIcon: {
128
+ iconLeft: {
129
+ left: string;
130
+ };
131
+ };
132
+ };
133
+ typography: {
134
+ font: string;
135
+ letterSpacing: string;
136
+ fontWidth: number;
137
+ };
138
+ icon: {
139
+ size: string;
140
+ gap: string;
141
+ };
142
+ iconButton: {
143
+ width: string;
144
+ };
145
+ };
146
+ };
147
+ 'emphasised-secondary': {
148
+ shared: {
149
+ color: string;
150
+ backgroundColor: string;
151
+ borderRadius: string;
152
+ border: string;
153
+ ':hover': {
154
+ backgroundColor: string;
155
+ border: string;
156
+ };
157
+ ':active': {
158
+ backgroundColor: string;
159
+ border: string;
160
+ };
161
+ ':disabled': {
162
+ color: string;
163
+ backgroundColor: string;
164
+ border: string;
165
+ };
166
+ };
167
+ xs: {
168
+ height: string;
169
+ padding: {
170
+ top: string;
171
+ right: string;
172
+ bottom: string;
173
+ left: string;
174
+ withIcon: {
175
+ iconLeft: {
176
+ left: string;
177
+ };
178
+ };
179
+ };
180
+ typography: {
181
+ font: string;
182
+ letterSpacing: string;
183
+ fontWidth: number;
184
+ };
185
+ icon: {
186
+ size: string;
187
+ gap: string;
188
+ };
189
+ iconButton: {
190
+ width: string;
191
+ };
192
+ };
193
+ sm: {
194
+ height: string;
195
+ padding: {
196
+ top: string;
197
+ right: string;
198
+ bottom: string;
199
+ left: string;
200
+ withIcon: {
201
+ iconLeft: {
202
+ left: string;
203
+ };
204
+ };
205
+ };
206
+ typography: {
207
+ font: string;
208
+ letterSpacing: string;
209
+ fontWidth: number;
210
+ };
211
+ icon: {
212
+ size: string;
213
+ gap: string;
214
+ };
215
+ iconButton: {
216
+ width: string;
217
+ };
218
+ };
219
+ md: {
220
+ height: string;
221
+ padding: {
222
+ top: string;
223
+ right: string;
224
+ bottom: string;
225
+ left: string;
226
+ withIcon: {
227
+ iconLeft: {
228
+ left: string;
229
+ };
230
+ };
231
+ };
232
+ typography: {
233
+ font: string;
234
+ letterSpacing: string;
235
+ fontWidth: number;
236
+ };
237
+ icon: {
238
+ size: string;
239
+ gap: string;
240
+ };
241
+ iconButton: {
242
+ width: string;
243
+ };
244
+ };
245
+ lg: {
246
+ height: string;
247
+ padding: {
248
+ top: string;
249
+ right: string;
250
+ bottom: string;
251
+ left: string;
252
+ withIcon: {
253
+ iconLeft: {
254
+ left: string;
255
+ };
256
+ };
257
+ };
258
+ typography: {
259
+ font: string;
260
+ letterSpacing: string;
261
+ fontWidth: number;
262
+ };
263
+ icon: {
264
+ size: string;
265
+ gap: string;
266
+ };
267
+ iconButton: {
268
+ width: string;
269
+ };
270
+ };
271
+ };
272
+ 'neutral-primary': {
273
+ shared: {
274
+ color: string;
275
+ backgroundColor: string;
276
+ borderRadius: string;
277
+ border: string;
278
+ ':hover': {
279
+ backgroundColor: string;
280
+ border: string;
281
+ };
282
+ ':active': {
283
+ backgroundColor: string;
284
+ border: string;
285
+ };
286
+ ':disabled': {
287
+ color: string;
288
+ backgroundColor: string;
289
+ border: string;
290
+ };
291
+ };
292
+ xs: {
293
+ height: string;
294
+ padding: {
295
+ top: string;
296
+ right: string;
297
+ bottom: string;
298
+ left: string;
299
+ withIcon: {
300
+ iconLeft: {
301
+ left: string;
302
+ };
303
+ };
304
+ };
305
+ typography: {
306
+ font: string;
307
+ letterSpacing: string;
308
+ fontWidth: number;
309
+ };
310
+ icon: {
311
+ size: string;
312
+ gap: string;
313
+ };
314
+ iconButton: {
315
+ width: string;
316
+ };
317
+ };
318
+ sm: {
319
+ height: string;
320
+ padding: {
321
+ top: string;
322
+ right: string;
323
+ bottom: string;
324
+ left: string;
325
+ withIcon: {
326
+ iconLeft: {
327
+ left: string;
328
+ };
329
+ };
330
+ };
331
+ typography: {
332
+ font: string;
333
+ letterSpacing: string;
334
+ fontWidth: number;
335
+ };
336
+ icon: {
337
+ size: string;
338
+ gap: string;
339
+ };
340
+ iconButton: {
341
+ width: string;
342
+ };
343
+ };
344
+ md: {
345
+ height: string;
346
+ padding: {
347
+ top: string;
348
+ right: string;
349
+ bottom: string;
350
+ left: string;
351
+ withIcon: {
352
+ iconLeft: {
353
+ left: string;
354
+ };
355
+ };
356
+ };
357
+ typography: {
358
+ font: string;
359
+ letterSpacing: string;
360
+ fontWidth: number;
361
+ };
362
+ icon: {
363
+ size: string;
364
+ gap: string;
365
+ };
366
+ iconButton: {
367
+ width: string;
368
+ };
369
+ };
370
+ lg: {
371
+ height: string;
372
+ padding: {
373
+ top: string;
374
+ right: string;
375
+ bottom: string;
376
+ left: string;
377
+ withIcon: {
378
+ iconLeft: {
379
+ left: string;
380
+ };
381
+ };
382
+ };
383
+ typography: {
384
+ font: string;
385
+ letterSpacing: string;
386
+ fontWidth: number;
387
+ };
388
+ icon: {
389
+ size: string;
390
+ gap: string;
391
+ };
392
+ iconButton: {
393
+ width: string;
394
+ };
395
+ };
396
+ };
397
+ 'neutral-secondary': {
398
+ shared: {
399
+ color: string;
400
+ backgroundColor: string;
401
+ borderRadius: string;
402
+ border: string;
403
+ ':hover': {
404
+ backgroundColor: string;
405
+ border: string;
406
+ };
407
+ ':active': {
408
+ backgroundColor: string;
409
+ border: string;
410
+ };
411
+ ':disabled': {
412
+ color: string;
413
+ backgroundColor: string;
414
+ border: string;
415
+ };
416
+ };
417
+ xs: {
418
+ height: string;
419
+ padding: {
420
+ top: string;
421
+ right: string;
422
+ bottom: string;
423
+ left: string;
424
+ withIcon: {
425
+ iconLeft: {
426
+ left: string;
427
+ };
428
+ };
429
+ };
430
+ typography: {
431
+ font: string;
432
+ letterSpacing: string;
433
+ fontWidth: number;
434
+ };
435
+ icon: {
436
+ size: string;
437
+ gap: string;
438
+ };
439
+ iconButton: {
440
+ width: string;
441
+ };
442
+ };
443
+ sm: {
444
+ height: string;
445
+ padding: {
446
+ top: string;
447
+ right: string;
448
+ bottom: string;
449
+ left: string;
450
+ withIcon: {
451
+ iconLeft: {
452
+ left: string;
453
+ };
454
+ };
455
+ };
456
+ typography: {
457
+ font: string;
458
+ letterSpacing: string;
459
+ fontWidth: number;
460
+ };
461
+ icon: {
462
+ size: string;
463
+ gap: string;
464
+ };
465
+ iconButton: {
466
+ width: string;
467
+ };
468
+ };
469
+ md: {
470
+ height: string;
471
+ padding: {
472
+ top: string;
473
+ right: string;
474
+ bottom: string;
475
+ left: string;
476
+ withIcon: {
477
+ iconLeft: {
478
+ left: string;
479
+ };
480
+ };
481
+ };
482
+ typography: {
483
+ font: string;
484
+ letterSpacing: string;
485
+ fontWidth: number;
486
+ };
487
+ icon: {
488
+ size: string;
489
+ gap: string;
490
+ };
491
+ iconButton: {
492
+ width: string;
493
+ };
494
+ };
495
+ lg: {
496
+ height: string;
497
+ padding: {
498
+ top: string;
499
+ right: string;
500
+ bottom: string;
501
+ left: string;
502
+ withIcon: {
503
+ iconLeft: {
504
+ left: string;
505
+ };
506
+ };
507
+ };
508
+ typography: {
509
+ font: string;
510
+ letterSpacing: string;
511
+ fontWidth: number;
512
+ };
513
+ icon: {
514
+ size: string;
515
+ gap: string;
516
+ };
517
+ iconButton: {
518
+ width: string;
519
+ };
520
+ };
521
+ };
522
+ }, { size, variant }: Required<Pick<import("../button/types").ButtonProps, "size" | "variant">>, hasIcon?: boolean, isIconButton?: boolean) => import("@emotion/react").SerializedStyles;
@@ -0,0 +1,26 @@
1
+ import type { LinkProps as RACLinkProps } from 'react-aria-components';
2
+ import type { DefaultPropsWithChildren } from '../../util/types';
3
+ import type { IconProps, MaterialSymbol } from '../icon/types';
4
+ import type { IconLinkButtonTheme } from './styles';
5
+ export interface IconLinkButtonProps extends DefaultPropsWithChildren<IconLinkButtonTheme, RACLinkProps['className'], IconProps['children']>, Omit<RACLinkProps, 'children'> {
6
+ /**
7
+ * Size variant of the avatar
8
+ */
9
+ size?: keyof Omit<IconLinkButtonTheme['emphasised-primary'], 'shared'>;
10
+ /**
11
+ * Variant of the button
12
+ */
13
+ variant?: keyof Omit<IconLinkButtonTheme, 'shared'>;
14
+ /**
15
+ * Alternative to using the `children` prop for rendering Material Symbol icons,
16
+ * you can use the `symbol` prop to specify the icon by its symbol name.
17
+ * This is a convenience for font icons, allowing you to simply provide the symbol name in a type-safe way without needing to pass it as a child string.
18
+ * For example, instead of `<Icon>home</Icon>`, you can use `<Icon symbol="home" />`.
19
+ * This prop is mutually exclusive with `children` when rendering font icons, and takes precedence over `children` if both are provided.
20
+ */
21
+ symbol?: MaterialSymbol;
22
+ /**
23
+ * Accessible label for the icon button. Required for accessibility.
24
+ */
25
+ ariaLabel: string;
26
+ }
@@ -0,0 +1,2 @@
1
+ import type { LinkButtonProps } from './types';
2
+ export declare function LinkButton({ variant, size, theme, cssOverrides, icon, ...props }: LinkButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;