@guardian/stand 0.0.7 → 0.0.9

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 (73) hide show
  1. package/README.md +243 -32
  2. package/dist/byline.cjs +9 -0
  3. package/dist/byline.js +2 -0
  4. package/dist/components/byline/styles.cjs +5 -5
  5. package/dist/components/byline/styles.js +1 -1
  6. package/dist/components/tag-picker/styles.cjs +11 -11
  7. package/dist/components/tag-picker/styles.js +1 -1
  8. package/dist/fonts/OpenSans.css +327 -0
  9. package/dist/index.cjs +14 -9
  10. package/dist/index.js +7 -4
  11. package/dist/styleD/build/css/{css/base → base}/colors.css +3 -3
  12. package/dist/styleD/build/css/base/radius.css +12 -0
  13. package/dist/styleD/build/css/base/sizing.css +24 -0
  14. package/dist/styleD/build/css/base/spacing.css +40 -0
  15. package/dist/styleD/build/css/{css/base → base}/typography.css +17 -1
  16. package/dist/styleD/build/css/semantic/colors.css +65 -0
  17. package/dist/styleD/build/css/semantic/sizing.css +15 -0
  18. package/dist/styleD/build/css/semantic/typography.css +151 -0
  19. package/dist/styleD/build/typescript/base/colors.cjs +3 -3
  20. package/dist/styleD/build/typescript/base/colors.js +3 -3
  21. package/dist/styleD/build/typescript/base/radius.cjs +12 -0
  22. package/dist/styleD/build/typescript/base/radius.js +10 -0
  23. package/dist/styleD/build/typescript/base/sizing.cjs +24 -0
  24. package/dist/styleD/build/typescript/base/sizing.js +22 -0
  25. package/dist/styleD/build/typescript/base/spacing.cjs +40 -0
  26. package/dist/styleD/build/typescript/base/spacing.js +38 -0
  27. package/dist/styleD/build/typescript/base/typography.cjs +22 -6
  28. package/dist/styleD/build/typescript/base/typography.js +22 -6
  29. package/dist/styleD/build/typescript/semantic/colors.cjs +53 -13
  30. package/dist/styleD/build/typescript/semantic/colors.js +53 -13
  31. package/dist/styleD/build/typescript/semantic/sizing.cjs +21 -0
  32. package/dist/styleD/build/typescript/semantic/sizing.js +19 -0
  33. package/dist/styleD/build/typescript/semantic/typography.cjs +86 -342
  34. package/dist/styleD/build/typescript/semantic/typography.js +86 -342
  35. package/dist/styleD/utils/semantic/typography.cjs +2 -10
  36. package/dist/styleD/utils/semantic/typography.js +2 -10
  37. package/dist/tag-picker.cjs +13 -0
  38. package/dist/tag-picker.js +4 -0
  39. package/dist/types/byline.d.ts +25 -0
  40. package/dist/types/components/byline/Byline.d.ts +1 -1
  41. package/dist/types/components/byline/styles.d.ts +1 -1
  42. package/dist/types/components/byline/theme.d.ts +1 -1
  43. package/dist/types/components/tag-picker/TagAutocomplete.d.ts +1 -1
  44. package/dist/types/components/tag-picker/TagTable.d.ts +1 -1
  45. package/dist/types/components/tag-picker/styles.d.ts +1 -1
  46. package/dist/types/index.d.ts +19 -10
  47. package/dist/types/styleD/build/typescript/base/colors.d.ts +3 -3
  48. package/dist/types/styleD/build/typescript/base/radius.d.ts +12 -0
  49. package/dist/types/styleD/build/typescript/base/sizing.d.ts +24 -0
  50. package/dist/types/styleD/build/typescript/base/spacing.d.ts +40 -0
  51. package/dist/types/styleD/build/typescript/base/typography.d.ts +19 -3
  52. package/dist/types/styleD/build/typescript/semantic/colors.d.ts +49 -9
  53. package/dist/types/styleD/build/typescript/semantic/sizing.d.ts +21 -0
  54. package/dist/types/styleD/build/typescript/semantic/typography.d.ts +48 -304
  55. package/dist/types/styleD/stories/base/Radius.d.ts +1 -0
  56. package/dist/types/styleD/stories/base/Sizing.d.ts +1 -0
  57. package/dist/types/styleD/stories/base/Spacing.d.ts +1 -0
  58. package/dist/types/styleD/stories/semantic/Sizing.d.ts +1 -0
  59. package/dist/types/styleD/utils/semantic/typography.d.ts +1 -8
  60. package/dist/types/tag-picker.d.ts +21 -0
  61. package/dist/types/util/mergeDeep.d.ts +1 -0
  62. package/dist/types/{components/util.d.ts → util/types.d.ts} +3 -1
  63. package/dist/types/utils.d.ts +6 -0
  64. package/dist/utils.cjs +8 -0
  65. package/dist/utils.js +1 -0
  66. package/package.json +59 -7
  67. package/dist/styleD/build/css/css/semantic/colors.css +0 -27
  68. package/dist/styleD/build/css/css/semantic/typography.css +0 -138
  69. /package/dist/styleD/build/css/{css/component → component}/byline.css +0 -0
  70. /package/dist/styleD/build/css/{css/component → component}/tagAutocomplete.css +0 -0
  71. /package/dist/styleD/build/css/{css/component → component}/tagTable.css +0 -0
  72. /package/dist/{components/util.cjs → util/mergeDeep.cjs} +0 -0
  73. /package/dist/{components/util.js → util/mergeDeep.js} +0 -0
@@ -2,7 +2,7 @@ import type { SerializedStyles } from '@emotion/react';
2
2
  import { type ReactElement } from 'react';
3
3
  import { Row } from 'react-aria-components';
4
4
  import type { ComponentTagTable } from '../../styleD/build/typescript/component/tagTable';
5
- import type { DeepPartial } from '../util';
5
+ import type { DeepPartial } from '../../util/types';
6
6
  import type { TagRow } from './types';
7
7
  type Row = TagRow | {
8
8
  tag: TagRow;
@@ -1,7 +1,7 @@
1
1
  import type { SerializedStyles } from '@emotion/react';
2
2
  import { type ComponentTagAutocomplete } from '../../styleD/build/typescript/component/tagAutocomplete';
3
3
  import { type ComponentTagTable } from '../../styleD/build/typescript/component/tagTable';
4
- import { type DeepPartial } from '../util';
4
+ import type { DeepPartial } from '../../util/types';
5
5
  export declare const tagAutocompleteInputStyles: (partialTheme?: DeepPartial<ComponentTagAutocomplete>) => SerializedStyles;
6
6
  export declare const listboxStyles: (partialTheme?: DeepPartial<ComponentTagAutocomplete>) => SerializedStyles;
7
7
  export declare const listboxItemStyles: (partialTheme?: DeepPartial<ComponentTagAutocomplete>) => SerializedStyles;
@@ -1,11 +1,16 @@
1
1
  /**
2
- * component exports
2
+ * Main entry point - Design tokens only
3
+ * Import components from their own entry points, this isolates components within their own peer dependencies.
3
4
  */
4
- export { Byline } from './components/byline/Byline';
5
- export type { BylineModel } from './components/byline/lib';
6
- export type { PartialBylineTheme } from './components/byline/theme';
7
- export { TagTable } from './components/tag-picker/TagTable';
8
- export { TagAutocomplete } from './components/tag-picker/TagAutocomplete';
5
+ /**
6
+ * editorial components tokens exports
7
+ */
8
+ export { componentByline } from './styleD/build/typescript/component/byline';
9
+ export type { ComponentByline } from './styleD/build/typescript/component/byline';
10
+ export { componentTagAutocomplete } from './styleD/build/typescript/component/tagAutocomplete';
11
+ export type { ComponentTagAutocomplete } from './styleD/build/typescript/component/tagAutocomplete';
12
+ export { componentTagTable } from './styleD/build/typescript/component/tagTable';
13
+ export type { ComponentTagTable } from './styleD/build/typescript/component/tagTable';
9
14
  /**
10
15
  * style dictionary exports - base
11
16
  */
@@ -13,6 +18,12 @@ export { baseColors } from './styleD/build/typescript/base/colors';
13
18
  export type { BaseColors } from './styleD/build/typescript/base/colors';
14
19
  export { baseTypography } from './styleD/build/typescript/base/typography';
15
20
  export type { BaseTypography } from './styleD/build/typescript/base/typography';
21
+ export { baseSpacing } from './styleD/build/typescript/base/spacing';
22
+ export type { BaseSpacing } from './styleD/build/typescript/base/spacing';
23
+ export { baseSizing } from './styleD/build/typescript/base/sizing';
24
+ export type { BaseSizing } from './styleD/build/typescript/base/sizing';
25
+ export { baseRadius } from './styleD/build/typescript/base/radius';
26
+ export type { BaseRadius } from './styleD/build/typescript/base/radius';
16
27
  /**
17
28
  * style dictionary exports - semantic
18
29
  */
@@ -20,7 +31,5 @@ export { semanticColors } from './styleD/build/typescript/semantic/colors';
20
31
  export type { SemanticColors } from './styleD/build/typescript/semantic/colors';
21
32
  export { semanticTypography } from './styleD/build/typescript/semantic/typography';
22
33
  export type { SemanticTypography } from './styleD/build/typescript/semantic/typography';
23
- /**
24
- * utils exports
25
- */
26
- export { convertTypographyToEmotionObjectStyle, convertTypographyToEmotionStringStyle, } from './styleD/utils/semantic/typography';
34
+ export { semanticSizing } from './styleD/build/typescript/semantic/sizing';
35
+ export type { SemanticSizing } from './styleD/build/typescript/semantic/sizing';
@@ -82,7 +82,7 @@ export declare const baseColors: {
82
82
  };
83
83
  readonly yellow: {
84
84
  readonly '50': "#433608";
85
- readonly '100': "#6f590c";
85
+ readonly '100': "#5b4a0b";
86
86
  readonly '200': "#9a7c11";
87
87
  readonly '300': "#c69f16";
88
88
  readonly '400': "#f1c21b";
@@ -94,7 +94,7 @@ export declare const baseColors: {
94
94
  };
95
95
  readonly orange: {
96
96
  readonly '50': "#45260e";
97
- readonly '100': "#713e17";
97
+ readonly '100': "#693c16";
98
98
  readonly '200': "#9d5621";
99
99
  readonly '300': "#c96e2a";
100
100
  readonly '400': "#f58633";
@@ -131,7 +131,7 @@ export declare const baseColors: {
131
131
  readonly 'cool-purple': {
132
132
  readonly '50': "#232740";
133
133
  readonly '100': "#394069";
134
- readonly '200': "#505a92";
134
+ readonly '200': "#485084";
135
135
  readonly '300': "#6773bb";
136
136
  readonly '400': "#7d8ce4";
137
137
  readonly '500': "#94a1e9";
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+ export declare const baseRadius: {
5
+ readonly 'corner-2-px': "2px";
6
+ readonly 'corner-4-px': "4px";
7
+ readonly 'corner-8-px': "8px";
8
+ readonly 'corner-2-rem': "0.125rem";
9
+ readonly 'corner-4-rem': "0.25rem";
10
+ readonly 'corner-8-rem': "0.5rem";
11
+ };
12
+ export type BaseRadius = typeof baseRadius;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+ export declare const baseSizing: {
5
+ readonly 'size-1-px': "1px";
6
+ readonly 'size-2-px': "2px";
7
+ readonly 'size-16-px': "16px";
8
+ readonly 'size-18-px': "18px";
9
+ readonly 'size-20-px': "20px";
10
+ readonly 'size-24-px': "24px";
11
+ readonly 'size-32-px': "32px";
12
+ readonly 'size-40-px': "40px";
13
+ readonly 'size-48-px': "48px";
14
+ readonly 'size-1-rem': "0.0625rem";
15
+ readonly 'size-2-rem': "0.125rem";
16
+ readonly 'size-16-rem': "1rem";
17
+ readonly 'size-18-rem': "1.125rem";
18
+ readonly 'size-20-rem': "1.25rem";
19
+ readonly 'size-24-rem': "1.5rem";
20
+ readonly 'size-32-rem': "2rem";
21
+ readonly 'size-40-rem': "2.5rem";
22
+ readonly 'size-48-rem': "3rem";
23
+ };
24
+ export type BaseSizing = typeof baseSizing;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+ export declare const baseSpacing: {
5
+ readonly '2-px': "2px";
6
+ readonly '4-px': "4px";
7
+ readonly '6-px': "6px";
8
+ readonly '8-px': "8px";
9
+ readonly '10-px': "10px";
10
+ readonly '12-px': "12px";
11
+ readonly '16-px': "16px";
12
+ readonly '20-px': "20px";
13
+ readonly '24-px': "24px";
14
+ readonly '32-px': "32px";
15
+ readonly '36-px': "36px";
16
+ readonly '40-px': "40px";
17
+ readonly '48-px': "48px";
18
+ readonly '64-px': "64px";
19
+ readonly '72-px': "72px";
20
+ readonly '80-px': "80px";
21
+ readonly '96-px': "96px";
22
+ readonly '2-rem': "0.125rem";
23
+ readonly '4-rem': "0.25rem";
24
+ readonly '6-rem': "0.375rem";
25
+ readonly '8-rem': "0.5rem";
26
+ readonly '10-rem': "0.625rem";
27
+ readonly '12-rem': "0.75rem";
28
+ readonly '16-rem': "1rem";
29
+ readonly '20-rem': "1.25rem";
30
+ readonly '24-rem': "1.5rem";
31
+ readonly '32-rem': "2rem";
32
+ readonly '36-rem': "2.25rem";
33
+ readonly '40-rem': "2.5rem";
34
+ readonly '48-rem': "3rem";
35
+ readonly '64-rem': "4rem";
36
+ readonly '72-rem': "4.5rem";
37
+ readonly '80-rem': "5rem";
38
+ readonly '96-rem': "6rem";
39
+ };
40
+ export type BaseSpacing = typeof baseSpacing;
@@ -20,13 +20,24 @@ export declare const baseTypography: {
20
20
  readonly '36-px': "36px";
21
21
  readonly '42-px': "42px";
22
22
  readonly '48-px': "48px";
23
+ readonly '12-rem': "0.75rem";
24
+ readonly '14-rem': "0.875rem";
25
+ readonly '16-rem': "1rem";
26
+ readonly '18-rem': "1.125rem";
27
+ readonly '20-rem': "1.25rem";
28
+ readonly '24-rem': "1.5rem";
29
+ readonly '28-rem': "1.75rem";
30
+ readonly '32-rem': "2rem";
31
+ readonly '36-rem': "2.25rem";
32
+ readonly '42-rem': "2.625rem";
33
+ readonly '48-rem': "3rem";
23
34
  };
24
35
  readonly weight: {
25
- readonly 'Guardian Text Egyptian': {
26
- readonly normal: 400;
36
+ readonly 'Guardian Headline': {
27
37
  readonly bold: 700;
28
38
  };
29
- readonly 'Guardian Headline': {
39
+ readonly 'Guardian Text Egyptian': {
40
+ readonly normal: 400;
30
41
  readonly bold: 700;
31
42
  };
32
43
  readonly 'Open Sans': {
@@ -54,12 +65,17 @@ export declare const baseTypography: {
54
65
  readonly tight: 1.15;
55
66
  readonly normal: 1.3;
56
67
  readonly loose: 1.4;
68
+ readonly interactive: 1;
57
69
  };
58
70
  readonly 'letter-spacing': {
59
71
  readonly 'densest-px': "-1px";
60
72
  readonly 'denser-px': "-0.5px";
61
73
  readonly 'dense-px': "-0.2px";
62
74
  readonly 'default-px': "0px";
75
+ readonly 'densest-rem': "-0.0625rem";
76
+ readonly 'denser-rem': "-0.03125rem";
77
+ readonly 'dense-rem': "-0.0125rem";
78
+ readonly 'default-rem': "0rem";
63
79
  };
64
80
  };
65
81
  export type BaseTypography = typeof baseTypography;
@@ -3,15 +3,31 @@
3
3
  */
4
4
  export declare const semanticColors: {
5
5
  text: {
6
- primary: string;
7
- secondary: string;
8
- tertiary: string;
6
+ default: string;
7
+ subdued: string;
9
8
  'inverse-default': string;
10
- 'inverse-secondary': string;
11
- 'inverse-tertiary': string;
9
+ 'inverse-subdued': string;
12
10
  'inverse-strong': string;
11
+ error: string;
13
12
  warning: string;
14
13
  success: string;
14
+ information: string;
15
+ disabled: string;
16
+ green: string;
17
+ blue: string;
18
+ red: string;
19
+ cyan: string;
20
+ teal: string;
21
+ 'cool-purple': string;
22
+ 'warm-purple': string;
23
+ magenta: string;
24
+ orange: string;
25
+ yellow: string;
26
+ 'interactive-disabled': string;
27
+ };
28
+ bg: {
29
+ 'default-onDark': string;
30
+ 'default-onLight': string;
15
31
  };
16
32
  surface: {
17
33
  'light-1': string;
@@ -23,15 +39,39 @@ export declare const semanticColors: {
23
39
  default: string;
24
40
  strong: string;
25
41
  'inverse-strong': string;
26
- };
27
- bg: {
28
- 'default-onDark': string;
29
- 'default-onLight': string;
42
+ 'interactive-emphasised': string;
43
+ 'interactive-neutral': string;
44
+ 'interactive-disabled': string;
45
+ 'interactive-focused': string;
30
46
  };
31
47
  status: {
32
48
  'status-draft': string;
33
49
  'status-live': string;
34
50
  'status-selected': string;
51
+ 'status-focused': string;
52
+ };
53
+ fill: {
54
+ 'interactive-primary-emphasised': string;
55
+ 'interactive-primary-emphasised-hover': string;
56
+ 'interactive-primary-emphasised-pressed': string;
57
+ 'interactive-secondary-emphasised-hover': string;
58
+ 'interactive-secondary-emphasised-pressed': string;
59
+ 'interactive-primary-neutral': string;
60
+ 'interactive-primary-neutral-hover': string;
61
+ 'interactive-primary-neutral-pressed': string;
62
+ 'interactive-secondary-neutral-hover': string;
63
+ 'interactive-secondary-neutral-pressed': string;
64
+ 'interactive-disabled': string;
65
+ 'green-subtle': string;
66
+ 'blue-subtle': string;
67
+ 'red-subtle': string;
68
+ 'cyan-subtle': string;
69
+ 'teal-subtle': string;
70
+ 'cool-purple-subtle': string;
71
+ 'warm-purple-subtle': string;
72
+ 'magenta-subtle': string;
73
+ 'orange-subtle': string;
74
+ 'yellow-subtle': string;
35
75
  };
36
76
  };
37
77
  export type SemanticColors = typeof semanticColors;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+ export declare const semanticSizing: {
5
+ height: {
6
+ xs: string;
7
+ sm: string;
8
+ md: string;
9
+ lg: string;
10
+ };
11
+ icon: {
12
+ sm: string;
13
+ md: string;
14
+ lg: string;
15
+ };
16
+ border: {
17
+ default: string;
18
+ md: string;
19
+ };
20
+ };
21
+ export type SemanticSizing = typeof semanticSizing;