@guardian/stand 0.0.8 → 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 (58) hide show
  1. package/README.md +26 -9
  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/index.cjs +6 -9
  9. package/dist/index.js +3 -4
  10. package/dist/styleD/build/css/{css/base → base}/sizing.css +2 -0
  11. package/dist/styleD/build/css/{css/base → base}/spacing.css +4 -0
  12. package/dist/styleD/build/css/{css/base → base}/typography.css +1 -0
  13. package/dist/styleD/build/css/semantic/colors.css +65 -0
  14. package/dist/styleD/build/css/{css/semantic → semantic}/sizing.css +1 -0
  15. package/dist/styleD/build/css/{css/semantic → semantic}/typography.css +6 -0
  16. package/dist/styleD/build/typescript/base/sizing.cjs +2 -0
  17. package/dist/styleD/build/typescript/base/sizing.js +2 -0
  18. package/dist/styleD/build/typescript/base/spacing.cjs +4 -0
  19. package/dist/styleD/build/typescript/base/spacing.js +4 -0
  20. package/dist/styleD/build/typescript/base/typography.cjs +2 -1
  21. package/dist/styleD/build/typescript/base/typography.js +2 -1
  22. package/dist/styleD/build/typescript/semantic/colors.cjs +40 -2
  23. package/dist/styleD/build/typescript/semantic/colors.js +40 -2
  24. package/dist/styleD/build/typescript/semantic/sizing.cjs +1 -0
  25. package/dist/styleD/build/typescript/semantic/sizing.js +1 -0
  26. package/dist/styleD/build/typescript/semantic/typography.cjs +10 -0
  27. package/dist/styleD/build/typescript/semantic/typography.js +10 -0
  28. package/dist/tag-picker.cjs +13 -0
  29. package/dist/tag-picker.js +4 -0
  30. package/dist/types/byline.d.ts +25 -0
  31. package/dist/types/components/byline/Byline.d.ts +1 -1
  32. package/dist/types/components/byline/styles.d.ts +1 -1
  33. package/dist/types/components/byline/theme.d.ts +1 -1
  34. package/dist/types/components/tag-picker/TagAutocomplete.d.ts +1 -1
  35. package/dist/types/components/tag-picker/TagTable.d.ts +1 -1
  36. package/dist/types/components/tag-picker/styles.d.ts +1 -1
  37. package/dist/types/index.d.ts +11 -10
  38. package/dist/types/styleD/build/typescript/base/sizing.d.ts +2 -0
  39. package/dist/types/styleD/build/typescript/base/spacing.d.ts +4 -0
  40. package/dist/types/styleD/build/typescript/base/typography.d.ts +1 -0
  41. package/dist/types/styleD/build/typescript/semantic/colors.d.ts +38 -0
  42. package/dist/types/styleD/build/typescript/semantic/sizing.d.ts +1 -0
  43. package/dist/types/styleD/build/typescript/semantic/typography.d.ts +10 -0
  44. package/dist/types/tag-picker.d.ts +21 -0
  45. package/dist/types/util/mergeDeep.d.ts +1 -0
  46. package/dist/types/{components/util.d.ts → util/types.d.ts} +3 -1
  47. package/dist/types/utils.d.ts +6 -0
  48. package/dist/utils.cjs +8 -0
  49. package/dist/utils.js +1 -0
  50. package/package.json +48 -1
  51. package/dist/styleD/build/css/css/semantic/colors.css +0 -29
  52. /package/dist/styleD/build/css/{css/base → base}/colors.css +0 -0
  53. /package/dist/styleD/build/css/{css/base → base}/radius.css +0 -0
  54. /package/dist/styleD/build/css/{css/component → component}/byline.css +0 -0
  55. /package/dist/styleD/build/css/{css/component → component}/tagAutocomplete.css +0 -0
  56. /package/dist/styleD/build/css/{css/component → component}/tagTable.css +0 -0
  57. /package/dist/{components/util.cjs → util/mergeDeep.cjs} +0 -0
  58. /package/dist/{components/util.js → util/mergeDeep.js} +0 -0
package/README.md CHANGED
@@ -171,12 +171,11 @@ _Status: WIP_
171
171
 
172
172
  ```ts
173
173
  import { css } from '@emotion/react';
174
+ import { semanticColors, semanticTypography } from '@guardian/stand'; // JS/TS usage
174
175
  import {
175
- semanticColors,
176
- semanticTypography,
177
176
  convertTypographyToEmotionObjectStyle, // helper function to convert from typography token object to emotion CSS object style
178
177
  convertTypographyToEmotionStringStyle, // helper function to convert from typography token object to emotion CSS string style
179
- } from '@guardian/stand'; // JS/TS usage
178
+ } from '@guardian/stand/utils'; // Utils for working with design tokens
180
179
  import '@guardian/stand/semantic/typography.css'; // CSS usage
181
180
 
182
181
  /* JS/TS usage */
@@ -464,6 +463,7 @@ A flexible byline editor component built in ProseMirror and React with usability
464
463
 
465
464
  You'll need to install the following peer dependencies in your project to use the `Byline` component:
466
465
 
466
+ - `@emotion/react`
467
467
  - `@guardian/prosemirror-invisibles`
468
468
  - `prosemirror-dropcursor`
469
469
  - `prosemirror-history`
@@ -471,14 +471,19 @@ You'll need to install the following peer dependencies in your project to use th
471
471
  - `prosemirror-model`
472
472
  - `prosemirror-state`
473
473
  - `prosemirror-view`
474
+ - `react`
475
+ - `react-dom`
476
+ - `typescript`
474
477
 
475
- See the `peerDependencies` section of `package.json` for compatible versions to install.
478
+ See the `peerDependencies` section of `package.json` for compatible versions.
479
+
480
+ **Note:** If you only need the built CSS (`@guardian/stand/component/byline.css`), you don't need to install these dependencies.
476
481
 
477
482
  #### Usage
478
483
 
479
484
  ```tsx
480
- import type { BylineModel } from '@guardian/stand';
481
- import { Byline } from '@guardian/stand';
485
+ import type { BylineModel } from '@guardian/stand/byline';
486
+ import { Byline } from '@guardian/stand/byline';
482
487
 
483
488
  const Component = () => {
484
489
  const bylineModel: BylineModel = {
@@ -518,9 +523,15 @@ autocomplete input for selecting tags from a list of options, based on the [Reac
518
523
 
519
524
  **Peer dependencies:**
520
525
 
526
+ - `@emotion/react`
527
+ - `react`
521
528
  - `react-aria-components`
529
+ - `react-dom`
530
+ - `typescript`
531
+
532
+ See the `peerDependencies` section of `package.json` for compatible versions.
522
533
 
523
- See the `peerDependencies` section of the `package.json` for compatible versions to install.
534
+ **Note:** If you only need the built CSS (`@guardian/stand/component/tagAutocomplete.css`), you don't need to install these dependencies.
524
535
 
525
536
  ##### Props
526
537
 
@@ -536,9 +547,15 @@ based on the [React Aria Table](https://react-spectrum.adobe.com/react-aria/Tabl
536
547
 
537
548
  **Peer dependencies:**
538
549
 
550
+ - `@emotion/react`
551
+ - `react`
539
552
  - `react-aria-components`
553
+ - `react-dom`
554
+ - `typescript`
555
+
556
+ See the `peerDependencies` section of `package.json` for compatible versions.
540
557
 
541
- See the `peerDependencies` section of the `package.json` for compatible versions to install.
558
+ **Note:** If you only need the built CSS (`@guardian/stand/component/tagTable.css`), you don't need to install these dependencies.
542
559
 
543
560
  ##### Props
544
561
 
@@ -549,7 +566,7 @@ See [`TagTableProps`](src/components/tag-picker/TagTable.tsx#L31) for the full l
549
566
  _Example with TagAutocomplete and TagTable combined:_
550
567
 
551
568
  ```tsx
552
- import { TagAutocomplete, TagTable } from '@guardian/stand';
569
+ import { TagAutocomplete, TagTable } from '@guardian/stand/tag-picker';
553
570
 
554
571
  const Component = () => {
555
572
  const [selectedTags, setSelectedTags] = useState<
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var Byline = require('./components/byline/Byline.cjs');
4
+ var byline = require('./styleD/build/typescript/component/byline.cjs');
5
+
6
+
7
+
8
+ exports.Byline = Byline.Byline;
9
+ exports.componentByline = byline.componentByline;
package/dist/byline.js ADDED
@@ -0,0 +1,2 @@
1
+ export { Byline } from './components/byline/Byline.js';
2
+ export { componentByline } from './styleD/build/typescript/component/byline.js';
@@ -2,14 +2,14 @@
2
2
 
3
3
  var react = require('@emotion/react');
4
4
  var byline = require('../../styleD/build/typescript/component/byline.cjs');
5
- var util = require('../util.cjs');
5
+ var mergeDeep = require('../../util/mergeDeep.cjs');
6
6
 
7
7
  const bylineContainerStyles = react.css`
8
8
  position: relative;
9
9
  width: 100%;
10
10
  `;
11
11
  const bylineEditorStyles = (partialTheme = {}) => {
12
- const theme = util.mergeDeep(byline.componentByline, partialTheme);
12
+ const theme = mergeDeep.mergeDeep(byline.componentByline, partialTheme);
13
13
  return react.css`
14
14
  border-color: ${theme.borderColor};
15
15
  border-style: ${theme.borderStyle};
@@ -205,7 +205,7 @@ const bylineEditorStyles = (partialTheme = {}) => {
205
205
  `;
206
206
  };
207
207
  const dropdownContainerStyles = (showDropdown, partialTheme = {}) => {
208
- const theme = util.mergeDeep(byline.componentByline["dropdown"], partialTheme);
208
+ const theme = mergeDeep.mergeDeep(byline.componentByline["dropdown"], partialTheme);
209
209
  return react.css`
210
210
  position: absolute;
211
211
  box-sizing: border-box;
@@ -226,7 +226,7 @@ const dropdownUlStyles = react.css`
226
226
  list-style-type: none;
227
227
  `;
228
228
  const dropdownLiStyles = (partialTheme = {}) => {
229
- const theme = util.mergeDeep(byline.componentByline["dropdown"], partialTheme);
229
+ const theme = mergeDeep.mergeDeep(byline.componentByline["dropdown"], partialTheme);
230
230
  return react.css`
231
231
  cursor: pointer;
232
232
  padding: 5px;
@@ -237,7 +237,7 @@ const dropdownLiStyles = (partialTheme = {}) => {
237
237
  `;
238
238
  };
239
239
  const selectedDropdownLiStyles = (partialTheme = {}) => {
240
- const theme = util.mergeDeep(byline.componentByline["dropdown"], partialTheme);
240
+ const theme = mergeDeep.mergeDeep(byline.componentByline["dropdown"], partialTheme);
241
241
  return react.css`
242
242
  background-color: ${theme.li.selectedBackgroundColor};
243
243
  color: ${theme.li.selectedColor};
@@ -1,6 +1,6 @@
1
1
  import { css } from '@emotion/react';
2
2
  import { componentByline } from '../../styleD/build/typescript/component/byline.js';
3
- import { mergeDeep } from '../util.js';
3
+ import { mergeDeep } from '../../util/mergeDeep.js';
4
4
 
5
5
  const bylineContainerStyles = css`
6
6
  position: relative;
@@ -3,10 +3,10 @@
3
3
  var react = require('@emotion/react');
4
4
  var tagAutocomplete = require('../../styleD/build/typescript/component/tagAutocomplete.cjs');
5
5
  var tagTable = require('../../styleD/build/typescript/component/tagTable.cjs');
6
- var util = require('../util.cjs');
6
+ var mergeDeep = require('../../util/mergeDeep.cjs');
7
7
 
8
8
  const tagAutocompleteInputStyles = (partialTheme = {}) => {
9
- const theme = util.mergeDeep(tagAutocomplete.componentTagAutocomplete, partialTheme);
9
+ const theme = mergeDeep.mergeDeep(tagAutocomplete.componentTagAutocomplete, partialTheme);
10
10
  return react.css`
11
11
  width: 100%;
12
12
  box-sizing: border-box;
@@ -23,7 +23,7 @@ const tagAutocompleteInputStyles = (partialTheme = {}) => {
23
23
  `;
24
24
  };
25
25
  const listboxStyles = (partialTheme = {}) => {
26
- const theme = util.mergeDeep(tagAutocomplete.componentTagAutocomplete, partialTheme);
26
+ const theme = mergeDeep.mergeDeep(tagAutocomplete.componentTagAutocomplete, partialTheme);
27
27
  return react.css`
28
28
  padding: ${theme.listbox.paddingY} ${theme.listbox.paddingX};
29
29
  max-height: 320px;
@@ -35,7 +35,7 @@ const listboxStyles = (partialTheme = {}) => {
35
35
  `;
36
36
  };
37
37
  const listboxItemStyles = (partialTheme = {}) => {
38
- const theme = util.mergeDeep(tagAutocomplete.componentTagAutocomplete, partialTheme);
38
+ const theme = mergeDeep.mergeDeep(tagAutocomplete.componentTagAutocomplete, partialTheme);
39
39
  return react.css`
40
40
  padding: ${theme.listbox.item.paddingY} ${theme.listbox.item.paddingX};
41
41
  cursor: pointer;
@@ -48,13 +48,13 @@ const listboxItemStyles = (partialTheme = {}) => {
48
48
  `;
49
49
  };
50
50
  const listboxInfoStyles = (partialTheme = {}) => {
51
- const theme = util.mergeDeep(tagAutocomplete.componentTagAutocomplete, partialTheme);
51
+ const theme = mergeDeep.mergeDeep(tagAutocomplete.componentTagAutocomplete, partialTheme);
52
52
  return react.css`
53
53
  padding: ${theme.listbox.item.paddingY} ${theme.listbox.item.paddingX};
54
54
  `;
55
55
  };
56
56
  const tagTableHeadingStyles = (partialTheme = {}) => {
57
- const theme = util.mergeDeep(tagTable.componentTagTable, partialTheme);
57
+ const theme = mergeDeep.mergeDeep(tagTable.componentTagTable, partialTheme);
58
58
  return react.css`
59
59
  background-color: ${theme.heading.backgroundColor};
60
60
  font-weight: ${theme.heading.fontWeight};
@@ -63,7 +63,7 @@ const tagTableHeadingStyles = (partialTheme = {}) => {
63
63
  `;
64
64
  };
65
65
  const tagTableCellStyles = (partialTheme = {}) => {
66
- const theme = util.mergeDeep(tagTable.componentTagTable, partialTheme);
66
+ const theme = mergeDeep.mergeDeep(tagTable.componentTagTable, partialTheme);
67
67
  return react.css`
68
68
  padding: ${theme.cell.paddingY} ${theme.cell.paddingX};
69
69
 
@@ -79,7 +79,7 @@ const tagTableCellStyles = (partialTheme = {}) => {
79
79
  `;
80
80
  };
81
81
  const tagTableRowStyles = (canDrag, partialTheme = {}) => {
82
- const theme = util.mergeDeep(tagTable.componentTagTable, partialTheme);
82
+ const theme = mergeDeep.mergeDeep(tagTable.componentTagTable, partialTheme);
83
83
  return react.css`
84
84
  background-color: ${theme.row.backgroundColor};
85
85
  height: ${theme.row.height};
@@ -106,7 +106,7 @@ const tagTableRowStyles = (canDrag, partialTheme = {}) => {
106
106
  `;
107
107
  };
108
108
  const tagTableStyles = (canRemoveTag, partialTheme = {}) => {
109
- const theme = util.mergeDeep(tagTable.componentTagTable, partialTheme);
109
+ const theme = mergeDeep.mergeDeep(tagTable.componentTagTable, partialTheme);
110
110
  return react.css`
111
111
  width: 100%;
112
112
  border-collapse: collapse;
@@ -129,7 +129,7 @@ const tagTableRemoveButtonStyles = react.css`
129
129
  }
130
130
  `;
131
131
  const tagTableAddButtonStyles = (partialTheme = {}) => {
132
- const theme = util.mergeDeep(tagTable.componentTagTable, partialTheme);
132
+ const theme = mergeDeep.mergeDeep(tagTable.componentTagTable, partialTheme);
133
133
  return react.css`
134
134
  :hover {
135
135
  cursor: pointer;
@@ -172,7 +172,7 @@ const tagTableDragButtonStyles = react.css`
172
172
  }
173
173
  `;
174
174
  const tagTableTypeBadgeStyles = (partialTheme = {}) => {
175
- const theme = util.mergeDeep(tagTable.componentTagTable, partialTheme);
175
+ const theme = mergeDeep.mergeDeep(tagTable.componentTagTable, partialTheme);
176
176
  return react.css`
177
177
  white-space: nowrap;
178
178
  text-transform: uppercase;
@@ -1,7 +1,7 @@
1
1
  import { css } from '@emotion/react';
2
2
  import { componentTagAutocomplete } from '../../styleD/build/typescript/component/tagAutocomplete.js';
3
3
  import { componentTagTable } from '../../styleD/build/typescript/component/tagTable.js';
4
- import { mergeDeep } from '../util.js';
4
+ import { mergeDeep } from '../../util/mergeDeep.js';
5
5
 
6
6
  const tagAutocompleteInputStyles = (partialTheme = {}) => {
7
7
  const theme = mergeDeep(componentTagAutocomplete, partialTheme);
package/dist/index.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var Byline = require('./components/byline/Byline.cjs');
4
- var TagTable = require('./components/tag-picker/TagTable.cjs');
5
- var TagAutocomplete = require('./components/tag-picker/TagAutocomplete.cjs');
3
+ var byline = require('./styleD/build/typescript/component/byline.cjs');
4
+ var tagAutocomplete = require('./styleD/build/typescript/component/tagAutocomplete.cjs');
5
+ var tagTable = require('./styleD/build/typescript/component/tagTable.cjs');
6
6
  var colors = require('./styleD/build/typescript/base/colors.cjs');
7
7
  var typography = require('./styleD/build/typescript/base/typography.cjs');
8
8
  var spacing = require('./styleD/build/typescript/base/spacing.cjs');
@@ -11,13 +11,12 @@ var radius = require('./styleD/build/typescript/base/radius.cjs');
11
11
  var colors$1 = require('./styleD/build/typescript/semantic/colors.cjs');
12
12
  var typography$1 = require('./styleD/build/typescript/semantic/typography.cjs');
13
13
  var sizing$1 = require('./styleD/build/typescript/semantic/sizing.cjs');
14
- var typography$2 = require('./styleD/utils/semantic/typography.cjs');
15
14
 
16
15
 
17
16
 
18
- exports.Byline = Byline.Byline;
19
- exports.TagTable = TagTable.TagTable;
20
- exports.TagAutocomplete = TagAutocomplete.TagAutocomplete;
17
+ exports.componentByline = byline.componentByline;
18
+ exports.componentTagAutocomplete = tagAutocomplete.componentTagAutocomplete;
19
+ exports.componentTagTable = tagTable.componentTagTable;
21
20
  exports.baseColors = colors.baseColors;
22
21
  exports.baseTypography = typography.baseTypography;
23
22
  exports.baseSpacing = spacing.baseSpacing;
@@ -26,5 +25,3 @@ exports.baseRadius = radius.baseRadius;
26
25
  exports.semanticColors = colors$1.semanticColors;
27
26
  exports.semanticTypography = typography$1.semanticTypography;
28
27
  exports.semanticSizing = sizing$1.semanticSizing;
29
- exports.convertTypographyToEmotionObjectStyle = typography$2.convertTypographyToEmotionObjectStyle;
30
- exports.convertTypographyToEmotionStringStyle = typography$2.convertTypographyToEmotionStringStyle;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export { Byline } from './components/byline/Byline.js';
2
- export { TagTable } from './components/tag-picker/TagTable.js';
3
- export { TagAutocomplete } from './components/tag-picker/TagAutocomplete.js';
1
+ export { componentByline } from './styleD/build/typescript/component/byline.js';
2
+ export { componentTagAutocomplete } from './styleD/build/typescript/component/tagAutocomplete.js';
3
+ export { componentTagTable } from './styleD/build/typescript/component/tagTable.js';
4
4
  export { baseColors } from './styleD/build/typescript/base/colors.js';
5
5
  export { baseTypography } from './styleD/build/typescript/base/typography.js';
6
6
  export { baseSpacing } from './styleD/build/typescript/base/spacing.js';
@@ -9,4 +9,3 @@ export { baseRadius } from './styleD/build/typescript/base/radius.js';
9
9
  export { semanticColors } from './styleD/build/typescript/semantic/colors.js';
10
10
  export { semanticTypography } from './styleD/build/typescript/semantic/typography.js';
11
11
  export { semanticSizing } from './styleD/build/typescript/semantic/sizing.js';
12
- export { convertTypographyToEmotionObjectStyle, convertTypographyToEmotionStringStyle } from './styleD/utils/semantic/typography.js';
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  :root {
6
+ --base-sizing-size-1-px: 1px;
6
7
  --base-sizing-size-2-px: 2px;
7
8
  --base-sizing-size-16-px: 16px;
8
9
  --base-sizing-size-18-px: 18px;
@@ -11,6 +12,7 @@
11
12
  --base-sizing-size-32-px: 32px;
12
13
  --base-sizing-size-40-px: 40px;
13
14
  --base-sizing-size-48-px: 48px;
15
+ --base-sizing-size-1-rem: 0.0625rem;
14
16
  --base-sizing-size-2-rem: 0.125rem;
15
17
  --base-sizing-size-16-rem: 1rem;
16
18
  --base-sizing-size-18-rem: 1.125rem;
@@ -5,7 +5,9 @@
5
5
  :root {
6
6
  --base-spacing-2-px: 2px;
7
7
  --base-spacing-4-px: 4px;
8
+ --base-spacing-6-px: 6px;
8
9
  --base-spacing-8-px: 8px;
10
+ --base-spacing-10-px: 10px;
9
11
  --base-spacing-12-px: 12px;
10
12
  --base-spacing-16-px: 16px;
11
13
  --base-spacing-20-px: 20px;
@@ -20,7 +22,9 @@
20
22
  --base-spacing-96-px: 96px;
21
23
  --base-spacing-2-rem: 0.125rem;
22
24
  --base-spacing-4-rem: 0.25rem;
25
+ --base-spacing-6-rem: 0.375rem;
23
26
  --base-spacing-8-rem: 0.5rem;
27
+ --base-spacing-10-rem: 0.625rem;
24
28
  --base-spacing-12-rem: 0.75rem;
25
29
  --base-spacing-16-rem: 1rem;
26
30
  --base-spacing-20-rem: 1.25rem;
@@ -47,6 +47,7 @@
47
47
  --base-typography-line-height-tight: 1.15;
48
48
  --base-typography-line-height-normal: 1.3;
49
49
  --base-typography-line-height-loose: 1.4;
50
+ --base-typography-line-height-interactive: 1;
50
51
  --base-typography-letter-spacing-densest-px: -1px;
51
52
  --base-typography-letter-spacing-denser-px: -0.5px;
52
53
  --base-typography-letter-spacing-dense-px: -0.2px;
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+
5
+ :root {
6
+ --semantic-colors-text-default: #000000;
7
+ --semantic-colors-text-subdued: #545454;
8
+ --semantic-colors-text-inverse-default: #dcdcdc;
9
+ --semantic-colors-text-inverse-subdued: #cccccc;
10
+ --semantic-colors-text-inverse-strong: #ffffff;
11
+ --semantic-colors-text-error: #8c2113;
12
+ --semantic-colors-text-warning: #433608;
13
+ --semantic-colors-text-success: #326528;
14
+ --semantic-colors-text-information: #00344e;
15
+ --semantic-colors-text-disabled: #999999;
16
+ --semantic-colors-text-green: #24491d;
17
+ --semantic-colors-text-blue: #092f62;
18
+ --semantic-colors-text-red: #65170e;
19
+ --semantic-colors-text-cyan: #00344e;
20
+ --semantic-colors-text-teal: #0e2729;
21
+ --semantic-colors-text-cool-purple: #394069;
22
+ --semantic-colors-text-warm-purple: #381350;
23
+ --semantic-colors-text-magenta: #581734;
24
+ --semantic-colors-text-orange: #693c16;
25
+ --semantic-colors-text-yellow: #5b4a0b;
26
+ --semantic-colors-text-interactive-disabled: #999999;
27
+ --semantic-colors-bg-default-on-dark: #121212;
28
+ --semantic-colors-bg-default-on-light: #ffffff;
29
+ --semantic-colors-surface-light-1: #f6f6f6;
30
+ --semantic-colors-surface-light-2: #ededed;
31
+ --semantic-colors-surface-dark-1: #333333;
32
+ --semantic-colors-border-subtle: #cccccc;
33
+ --semantic-colors-border-default: #8d8d8d;
34
+ --semantic-colors-border-strong: #545454;
35
+ --semantic-colors-border-inverse-strong: #ffffff;
36
+ --semantic-colors-border-interactive-emphasised: #0d4289;
37
+ --semantic-colors-border-interactive-neutral: #545454;
38
+ --semantic-colors-border-interactive-disabled: #dcdcdc;
39
+ --semantic-colors-border-interactive-focused: #0072a9;
40
+ --semantic-colors-status-status-draft: #f1c21b;
41
+ --semantic-colors-status-status-live: #4e9e3e;
42
+ --semantic-colors-status-status-selected: #0072a9;
43
+ --semantic-colors-status-status-focused: #0072a9;
44
+ --semantic-colors-fill-interactive-primary-emphasised: #0d4289;
45
+ --semantic-colors-fill-interactive-primary-emphasised-hover: #092f62;
46
+ --semantic-colors-fill-interactive-primary-emphasised-pressed: #092f62;
47
+ --semantic-colors-fill-interactive-secondary-emphasised-hover: #e8f0fb;
48
+ --semantic-colors-fill-interactive-secondary-emphasised-pressed: #e8f0fb;
49
+ --semantic-colors-fill-interactive-primary-neutral: #545454;
50
+ --semantic-colors-fill-interactive-primary-neutral-hover: #333333;
51
+ --semantic-colors-fill-interactive-primary-neutral-pressed: #333333;
52
+ --semantic-colors-fill-interactive-secondary-neutral-hover: #ededed;
53
+ --semantic-colors-fill-interactive-secondary-neutral-pressed: #ededed;
54
+ --semantic-colors-fill-interactive-disabled: #dcdcdc;
55
+ --semantic-colors-fill-green-subtle: #cde4c9;
56
+ --semantic-colors-fill-blue-subtle: #bdd4f4;
57
+ --semantic-colors-fill-red-subtle: #f5c6c0;
58
+ --semantic-colors-fill-cyan-subtle: #b8d8e7;
59
+ --semantic-colors-fill-teal-subtle: #c5dfe1;
60
+ --semantic-colors-fill-cool-purple-subtle: #dbdff7;
61
+ --semantic-colors-fill-warm-purple-subtle: #dac3e8;
62
+ --semantic-colors-fill-magenta-subtle: #edc6d7;
63
+ --semantic-colors-fill-orange-subtle: #fcddc6;
64
+ --semantic-colors-fill-yellow-subtle: #fbeebf;
65
+ }
@@ -10,5 +10,6 @@
10
10
  --semantic-sizing-icon-sm: 1.125rem;
11
11
  --semantic-sizing-icon-md: 1.25rem;
12
12
  --semantic-sizing-icon-lg: 1.5rem;
13
+ --semantic-sizing-border-default: 0.0625rem;
13
14
  --semantic-sizing-border-md: 0.125rem;
14
15
  }
@@ -142,4 +142,10 @@
142
142
  GuardianTextEgyptian;
143
143
  --semantic-typography-article-body-bold-italic-md-letter-spacing: 0rem;
144
144
  --semantic-typography-article-body-bold-italic-md-font-width: 100;
145
+ --semantic-typography-interactive-xs-font: normal 700 0.75rem/1 'Open Sans';
146
+ --semantic-typography-interactive-xs-letter-spacing: 0rem;
147
+ --semantic-typography-interactive-xs-font-width: 95;
148
+ --semantic-typography-interactive-sm-font: normal 700 0.875rem/1 'Open Sans';
149
+ --semantic-typography-interactive-sm-letter-spacing: -0.0125rem;
150
+ --semantic-typography-interactive-sm-font-width: 95;
145
151
  }
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const baseSizing = {
4
+ "size-1-px": "1px",
4
5
  "size-2-px": "2px",
5
6
  "size-16-px": "16px",
6
7
  "size-18-px": "18px",
@@ -9,6 +10,7 @@ const baseSizing = {
9
10
  "size-32-px": "32px",
10
11
  "size-40-px": "40px",
11
12
  "size-48-px": "48px",
13
+ "size-1-rem": "0.0625rem",
12
14
  "size-2-rem": "0.125rem",
13
15
  "size-16-rem": "1rem",
14
16
  "size-18-rem": "1.125rem",
@@ -1,4 +1,5 @@
1
1
  const baseSizing = {
2
+ "size-1-px": "1px",
2
3
  "size-2-px": "2px",
3
4
  "size-16-px": "16px",
4
5
  "size-18-px": "18px",
@@ -7,6 +8,7 @@ const baseSizing = {
7
8
  "size-32-px": "32px",
8
9
  "size-40-px": "40px",
9
10
  "size-48-px": "48px",
11
+ "size-1-rem": "0.0625rem",
10
12
  "size-2-rem": "0.125rem",
11
13
  "size-16-rem": "1rem",
12
14
  "size-18-rem": "1.125rem",
@@ -3,7 +3,9 @@
3
3
  const baseSpacing = {
4
4
  "2-px": "2px",
5
5
  "4-px": "4px",
6
+ "6-px": "6px",
6
7
  "8-px": "8px",
8
+ "10-px": "10px",
7
9
  "12-px": "12px",
8
10
  "16-px": "16px",
9
11
  "20-px": "20px",
@@ -18,7 +20,9 @@ const baseSpacing = {
18
20
  "96-px": "96px",
19
21
  "2-rem": "0.125rem",
20
22
  "4-rem": "0.25rem",
23
+ "6-rem": "0.375rem",
21
24
  "8-rem": "0.5rem",
25
+ "10-rem": "0.625rem",
22
26
  "12-rem": "0.75rem",
23
27
  "16-rem": "1rem",
24
28
  "20-rem": "1.25rem",
@@ -1,7 +1,9 @@
1
1
  const baseSpacing = {
2
2
  "2-px": "2px",
3
3
  "4-px": "4px",
4
+ "6-px": "6px",
4
5
  "8-px": "8px",
6
+ "10-px": "10px",
5
7
  "12-px": "12px",
6
8
  "16-px": "16px",
7
9
  "20-px": "20px",
@@ -16,7 +18,9 @@ const baseSpacing = {
16
18
  "96-px": "96px",
17
19
  "2-rem": "0.125rem",
18
20
  "4-rem": "0.25rem",
21
+ "6-rem": "0.375rem",
19
22
  "8-rem": "0.5rem",
23
+ "10-rem": "0.625rem",
20
24
  "12-rem": "0.75rem",
21
25
  "16-rem": "1rem",
22
26
  "20-rem": "1.25rem",
@@ -63,7 +63,8 @@ const baseTypography = {
63
63
  "line-height": {
64
64
  tight: 1.15,
65
65
  normal: 1.3,
66
- loose: 1.4
66
+ loose: 1.4,
67
+ interactive: 1
67
68
  },
68
69
  "letter-spacing": {
69
70
  "densest-px": "-1px",
@@ -61,7 +61,8 @@ const baseTypography = {
61
61
  "line-height": {
62
62
  tight: 1.15,
63
63
  normal: 1.3,
64
- loose: 1.4
64
+ loose: 1.4,
65
+ interactive: 1
65
66
  },
66
67
  "letter-spacing": {
67
68
  "densest-px": "-1px",
@@ -11,7 +11,18 @@ const semanticColors = {
11
11
  warning: "#433608",
12
12
  success: "#326528",
13
13
  information: "#00344e",
14
- disabled: "#999999"
14
+ disabled: "#999999",
15
+ green: "#24491d",
16
+ blue: "#092f62",
17
+ red: "#65170e",
18
+ cyan: "#00344e",
19
+ teal: "#0e2729",
20
+ "cool-purple": "#394069",
21
+ "warm-purple": "#381350",
22
+ magenta: "#581734",
23
+ orange: "#693c16",
24
+ yellow: "#5b4a0b",
25
+ "interactive-disabled": "#999999"
15
26
  },
16
27
  bg: {
17
28
  "default-onDark": "#121212",
@@ -26,13 +37,40 @@ const semanticColors = {
26
37
  subtle: "#cccccc",
27
38
  default: "#8d8d8d",
28
39
  strong: "#545454",
29
- "inverse-strong": "#ffffff"
40
+ "inverse-strong": "#ffffff",
41
+ "interactive-emphasised": "#0d4289",
42
+ "interactive-neutral": "#545454",
43
+ "interactive-disabled": "#dcdcdc",
44
+ "interactive-focused": "#0072a9"
30
45
  },
31
46
  status: {
32
47
  "status-draft": "#f1c21b",
33
48
  "status-live": "#4e9e3e",
34
49
  "status-selected": "#0072a9",
35
50
  "status-focused": "#0072a9"
51
+ },
52
+ fill: {
53
+ "interactive-primary-emphasised": "#0d4289",
54
+ "interactive-primary-emphasised-hover": "#092f62",
55
+ "interactive-primary-emphasised-pressed": "#092f62",
56
+ "interactive-secondary-emphasised-hover": "#e8f0fb",
57
+ "interactive-secondary-emphasised-pressed": "#e8f0fb",
58
+ "interactive-primary-neutral": "#545454",
59
+ "interactive-primary-neutral-hover": "#333333",
60
+ "interactive-primary-neutral-pressed": "#333333",
61
+ "interactive-secondary-neutral-hover": "#ededed",
62
+ "interactive-secondary-neutral-pressed": "#ededed",
63
+ "interactive-disabled": "#dcdcdc",
64
+ "green-subtle": "#cde4c9",
65
+ "blue-subtle": "#bdd4f4",
66
+ "red-subtle": "#f5c6c0",
67
+ "cyan-subtle": "#b8d8e7",
68
+ "teal-subtle": "#c5dfe1",
69
+ "cool-purple-subtle": "#dbdff7",
70
+ "warm-purple-subtle": "#dac3e8",
71
+ "magenta-subtle": "#edc6d7",
72
+ "orange-subtle": "#fcddc6",
73
+ "yellow-subtle": "#fbeebf"
36
74
  }
37
75
  };
38
76
 
@@ -9,7 +9,18 @@ const semanticColors = {
9
9
  warning: "#433608",
10
10
  success: "#326528",
11
11
  information: "#00344e",
12
- disabled: "#999999"
12
+ disabled: "#999999",
13
+ green: "#24491d",
14
+ blue: "#092f62",
15
+ red: "#65170e",
16
+ cyan: "#00344e",
17
+ teal: "#0e2729",
18
+ "cool-purple": "#394069",
19
+ "warm-purple": "#381350",
20
+ magenta: "#581734",
21
+ orange: "#693c16",
22
+ yellow: "#5b4a0b",
23
+ "interactive-disabled": "#999999"
13
24
  },
14
25
  bg: {
15
26
  "default-onDark": "#121212",
@@ -24,13 +35,40 @@ const semanticColors = {
24
35
  subtle: "#cccccc",
25
36
  default: "#8d8d8d",
26
37
  strong: "#545454",
27
- "inverse-strong": "#ffffff"
38
+ "inverse-strong": "#ffffff",
39
+ "interactive-emphasised": "#0d4289",
40
+ "interactive-neutral": "#545454",
41
+ "interactive-disabled": "#dcdcdc",
42
+ "interactive-focused": "#0072a9"
28
43
  },
29
44
  status: {
30
45
  "status-draft": "#f1c21b",
31
46
  "status-live": "#4e9e3e",
32
47
  "status-selected": "#0072a9",
33
48
  "status-focused": "#0072a9"
49
+ },
50
+ fill: {
51
+ "interactive-primary-emphasised": "#0d4289",
52
+ "interactive-primary-emphasised-hover": "#092f62",
53
+ "interactive-primary-emphasised-pressed": "#092f62",
54
+ "interactive-secondary-emphasised-hover": "#e8f0fb",
55
+ "interactive-secondary-emphasised-pressed": "#e8f0fb",
56
+ "interactive-primary-neutral": "#545454",
57
+ "interactive-primary-neutral-hover": "#333333",
58
+ "interactive-primary-neutral-pressed": "#333333",
59
+ "interactive-secondary-neutral-hover": "#ededed",
60
+ "interactive-secondary-neutral-pressed": "#ededed",
61
+ "interactive-disabled": "#dcdcdc",
62
+ "green-subtle": "#cde4c9",
63
+ "blue-subtle": "#bdd4f4",
64
+ "red-subtle": "#f5c6c0",
65
+ "cyan-subtle": "#b8d8e7",
66
+ "teal-subtle": "#c5dfe1",
67
+ "cool-purple-subtle": "#dbdff7",
68
+ "warm-purple-subtle": "#dac3e8",
69
+ "magenta-subtle": "#edc6d7",
70
+ "orange-subtle": "#fcddc6",
71
+ "yellow-subtle": "#fbeebf"
34
72
  }
35
73
  };
36
74
 
@@ -13,6 +13,7 @@ const semanticSizing = {
13
13
  lg: "1.5rem"
14
14
  },
15
15
  border: {
16
+ default: "0.0625rem",
16
17
  md: "0.125rem"
17
18
  }
18
19
  };
@@ -11,6 +11,7 @@ const semanticSizing = {
11
11
  lg: "1.5rem"
12
12
  },
13
13
  border: {
14
+ default: "0.0625rem",
14
15
  md: "0.125rem"
15
16
  }
16
17
  };
@@ -190,6 +190,16 @@ const semanticTypography = {
190
190
  font: "italic 700 1rem/1.4 GuardianTextEgyptian",
191
191
  letterSpacing: "0rem",
192
192
  fontWidth: 100
193
+ },
194
+ "interactive-xs": {
195
+ font: "normal 700 0.75rem/1 Open Sans",
196
+ letterSpacing: "0rem",
197
+ fontWidth: 95
198
+ },
199
+ "interactive-sm": {
200
+ font: "normal 700 0.875rem/1 Open Sans",
201
+ letterSpacing: "-0.0125rem",
202
+ fontWidth: 95
193
203
  }
194
204
  };
195
205
 
@@ -188,6 +188,16 @@ const semanticTypography = {
188
188
  font: "italic 700 1rem/1.4 GuardianTextEgyptian",
189
189
  letterSpacing: "0rem",
190
190
  fontWidth: 100
191
+ },
192
+ "interactive-xs": {
193
+ font: "normal 700 0.75rem/1 Open Sans",
194
+ letterSpacing: "0rem",
195
+ fontWidth: 95
196
+ },
197
+ "interactive-sm": {
198
+ font: "normal 700 0.875rem/1 Open Sans",
199
+ letterSpacing: "-0.0125rem",
200
+ fontWidth: 95
191
201
  }
192
202
  };
193
203
 
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var TagTable = require('./components/tag-picker/TagTable.cjs');
4
+ var TagAutocomplete = require('./components/tag-picker/TagAutocomplete.cjs');
5
+ var tagTable = require('./styleD/build/typescript/component/tagTable.cjs');
6
+ var tagAutocomplete = require('./styleD/build/typescript/component/tagAutocomplete.cjs');
7
+
8
+
9
+
10
+ exports.TagTable = TagTable.TagTable;
11
+ exports.TagAutocomplete = TagAutocomplete.TagAutocomplete;
12
+ exports.componentTagTable = tagTable.componentTagTable;
13
+ exports.componentTagAutocomplete = tagAutocomplete.componentTagAutocomplete;
@@ -0,0 +1,4 @@
1
+ export { TagTable } from './components/tag-picker/TagTable.js';
2
+ export { TagAutocomplete } from './components/tag-picker/TagAutocomplete.js';
3
+ export { componentTagTable } from './styleD/build/typescript/component/tagTable.js';
4
+ export { componentTagAutocomplete } from './styleD/build/typescript/component/tagAutocomplete.js';
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Byline component entry point
3
+ *
4
+ * Peer dependencies required to use this component:
5
+ * - `@emotion/react`
6
+ * - `@guardian/prosemirror-invisibles`
7
+ * - `prosemirror-dropcursor`
8
+ * - `prosemirror-history`
9
+ * - `prosemirror-keymap`
10
+ * - `prosemirror-model`
11
+ * - `prosemirror-state`
12
+ * - `prosemirror-view`
13
+ * - `react`
14
+ * - `react-dom`
15
+ * - `typescript`
16
+ *
17
+ * See the `peerDependencies` section of package.json for compatible versions.
18
+ *
19
+ * If you only need the built CSS (./component/byline.css), you don't need to install these.
20
+ */
21
+ export { Byline } from './components/byline/Byline';
22
+ export type { BylineModel } from './components/byline/lib';
23
+ export type { PartialBylineTheme } from './components/byline/theme';
24
+ export { componentByline } from './styleD/build/typescript/component/byline';
25
+ export type { ComponentByline } from './styleD/build/typescript/component/byline';
@@ -1,6 +1,6 @@
1
1
  import type { FocusEventHandler } from 'react';
2
2
  import type { ComponentByline } from '../../styleD/build/typescript/component/byline';
3
- import type { DeepPartial } from '../util';
3
+ import type { DeepPartial } from '../../util/types';
4
4
  import type { BylineModel, TaggedContributor } from './lib';
5
5
  type BylineProps = {
6
6
  /** `theme` - Used to customise the look and feel of the Byline component */
@@ -1,7 +1,7 @@
1
1
  import type { SerializedStyles } from '@emotion/react';
2
2
  import type { Node } from 'prosemirror-model';
3
3
  import { type ComponentByline } from '../../styleD/build/typescript/component/byline';
4
- import type { DeepPartial } from '../util';
4
+ import type { DeepPartial } from '../../util/types';
5
5
  export declare const bylineContainerStyles: SerializedStyles;
6
6
  export declare const bylineEditorStyles: (partialTheme?: DeepPartial<ComponentByline>) => SerializedStyles;
7
7
  export declare const dropdownContainerStyles: (showDropdown: boolean, partialTheme?: DeepPartial<ComponentByline['dropdown']>) => SerializedStyles;
@@ -1,3 +1,3 @@
1
1
  import type { ComponentByline } from '../../styleD/build/typescript/component/byline';
2
- import type { DeepPartial } from '../util';
2
+ import type { DeepPartial } from '../../util/types';
3
3
  export type PartialBylineTheme = DeepPartial<ComponentByline>;
@@ -1,7 +1,7 @@
1
1
  import type { SerializedStyles } from '@emotion/react';
2
2
  import type { ReactElement } from 'react';
3
3
  import type { ComponentTagAutocomplete } from '../../styleD/build/typescript/component/tagAutocomplete';
4
- import type { DeepPartial } from '../util';
4
+ import type { DeepPartial } from '../../util/types';
5
5
  import type { Tag } from './types';
6
6
  interface TagAutocompleteProps<T extends Tag = Tag> {
7
7
  /** `addTag` - Function called when an option is picked from the dropdown */
@@ -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
  */
@@ -28,7 +33,3 @@ export { semanticTypography } from './styleD/build/typescript/semantic/typograph
28
33
  export type { SemanticTypography } from './styleD/build/typescript/semantic/typography';
29
34
  export { semanticSizing } from './styleD/build/typescript/semantic/sizing';
30
35
  export type { SemanticSizing } from './styleD/build/typescript/semantic/sizing';
31
- /**
32
- * utils exports
33
- */
34
- export { convertTypographyToEmotionObjectStyle, convertTypographyToEmotionStringStyle, } from './styleD/utils/semantic/typography';
@@ -2,6 +2,7 @@
2
2
  * Do not edit directly, this file was auto-generated.
3
3
  */
4
4
  export declare const baseSizing: {
5
+ readonly 'size-1-px': "1px";
5
6
  readonly 'size-2-px': "2px";
6
7
  readonly 'size-16-px': "16px";
7
8
  readonly 'size-18-px': "18px";
@@ -10,6 +11,7 @@ export declare const baseSizing: {
10
11
  readonly 'size-32-px': "32px";
11
12
  readonly 'size-40-px': "40px";
12
13
  readonly 'size-48-px': "48px";
14
+ readonly 'size-1-rem': "0.0625rem";
13
15
  readonly 'size-2-rem': "0.125rem";
14
16
  readonly 'size-16-rem': "1rem";
15
17
  readonly 'size-18-rem': "1.125rem";
@@ -4,7 +4,9 @@
4
4
  export declare const baseSpacing: {
5
5
  readonly '2-px': "2px";
6
6
  readonly '4-px': "4px";
7
+ readonly '6-px': "6px";
7
8
  readonly '8-px': "8px";
9
+ readonly '10-px': "10px";
8
10
  readonly '12-px': "12px";
9
11
  readonly '16-px': "16px";
10
12
  readonly '20-px': "20px";
@@ -19,7 +21,9 @@ export declare const baseSpacing: {
19
21
  readonly '96-px': "96px";
20
22
  readonly '2-rem': "0.125rem";
21
23
  readonly '4-rem': "0.25rem";
24
+ readonly '6-rem': "0.375rem";
22
25
  readonly '8-rem': "0.5rem";
26
+ readonly '10-rem': "0.625rem";
23
27
  readonly '12-rem': "0.75rem";
24
28
  readonly '16-rem': "1rem";
25
29
  readonly '20-rem': "1.25rem";
@@ -65,6 +65,7 @@ export declare const baseTypography: {
65
65
  readonly tight: 1.15;
66
66
  readonly normal: 1.3;
67
67
  readonly loose: 1.4;
68
+ readonly interactive: 1;
68
69
  };
69
70
  readonly 'letter-spacing': {
70
71
  readonly 'densest-px': "-1px";
@@ -13,6 +13,17 @@ export declare const semanticColors: {
13
13
  success: string;
14
14
  information: string;
15
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;
16
27
  };
17
28
  bg: {
18
29
  'default-onDark': string;
@@ -28,6 +39,10 @@ export declare const semanticColors: {
28
39
  default: string;
29
40
  strong: string;
30
41
  'inverse-strong': string;
42
+ 'interactive-emphasised': string;
43
+ 'interactive-neutral': string;
44
+ 'interactive-disabled': string;
45
+ 'interactive-focused': string;
31
46
  };
32
47
  status: {
33
48
  'status-draft': string;
@@ -35,5 +50,28 @@ export declare const semanticColors: {
35
50
  'status-selected': string;
36
51
  'status-focused': string;
37
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;
75
+ };
38
76
  };
39
77
  export type SemanticColors = typeof semanticColors;
@@ -14,6 +14,7 @@ export declare const semanticSizing: {
14
14
  lg: string;
15
15
  };
16
16
  border: {
17
+ default: string;
17
18
  md: string;
18
19
  };
19
20
  };
@@ -192,5 +192,15 @@ export declare const semanticTypography: {
192
192
  letterSpacing: string;
193
193
  fontWidth: number;
194
194
  };
195
+ 'interactive-xs': {
196
+ font: string;
197
+ letterSpacing: string;
198
+ fontWidth: number;
199
+ };
200
+ 'interactive-sm': {
201
+ font: string;
202
+ letterSpacing: string;
203
+ fontWidth: number;
204
+ };
195
205
  };
196
206
  export type SemanticTypography = typeof semanticTypography;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Tag picker components entry point
3
+ *
4
+ * Peer dependencies required to use these components:
5
+ * - `@emotion/react`
6
+ * - `react`
7
+ * - `react-aria-components`
8
+ * - `react-dom`
9
+ * - `typescript`
10
+ *
11
+ * See the `peerDependencies` section of package.json for compatible versions.
12
+ *
13
+ * If you only need the built CSS (./component/tagTable.css, ./component/tagAutocomplete.css),
14
+ * you don't need to install these.
15
+ */
16
+ export { TagTable } from './components/tag-picker/TagTable';
17
+ export { TagAutocomplete } from './components/tag-picker/TagAutocomplete';
18
+ export { componentTagTable } from './styleD/build/typescript/component/tagTable';
19
+ export type { ComponentTagTable } from './styleD/build/typescript/component/tagTable';
20
+ export { componentTagAutocomplete } from './styleD/build/typescript/component/tagAutocomplete';
21
+ export type { ComponentTagAutocomplete } from './styleD/build/typescript/component/tagAutocomplete';
@@ -0,0 +1 @@
1
+ export declare function mergeDeep<A extends object, B extends object>(obj1: A, obj2: B): A & B;
@@ -1,4 +1,6 @@
1
+ export type Prettify<T> = {
2
+ [K in keyof T]: T[K];
3
+ } & {};
1
4
  export type DeepPartial<T> = T extends object ? {
2
5
  [P in keyof T]?: DeepPartial<T[P]>;
3
6
  } : T;
4
- export declare function mergeDeep<A extends object, B extends object>(obj1: A, obj2: B): A & B;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Utils entry point
3
+ *
4
+ * Utilities for working with design tokens and styles.
5
+ */
6
+ export { convertTypographyToEmotionObjectStyle, convertTypographyToEmotionStringStyle, } from './styleD/utils/semantic/typography';
package/dist/utils.cjs ADDED
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+
3
+ var typography = require('./styleD/utils/semantic/typography.cjs');
4
+
5
+
6
+
7
+ exports.convertTypographyToEmotionObjectStyle = typography.convertTypographyToEmotionObjectStyle;
8
+ exports.convertTypographyToEmotionStringStyle = typography.convertTypographyToEmotionStringStyle;
package/dist/utils.js ADDED
@@ -0,0 +1 @@
1
+ export { convertTypographyToEmotionObjectStyle, convertTypographyToEmotionStringStyle } from './styleD/utils/semantic/typography.js';
package/package.json CHANGED
@@ -1,13 +1,29 @@
1
1
  {
2
2
  "name": "@guardian/stand",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "type": "module",
5
+ "//exports": "Each component has its own entry point for optimal tree-shaking. Main entry point only includes design tokens and utilities. New components/foundations should follow the same pattern.",
5
6
  "exports": {
6
7
  ".": {
7
8
  "types": "./dist/types/index.d.ts",
8
9
  "import": "./dist/index.js",
9
10
  "require": "./dist/index.cjs"
10
11
  },
12
+ "./byline": {
13
+ "types": "./dist/types/byline.d.ts",
14
+ "import": "./dist/byline.js",
15
+ "require": "./dist/byline.cjs"
16
+ },
17
+ "./tag-picker": {
18
+ "types": "./dist/types/tag-picker.d.ts",
19
+ "import": "./dist/tag-picker.js",
20
+ "require": "./dist/tag-picker.cjs"
21
+ },
22
+ "./utils": {
23
+ "types": "./dist/types/utils.d.ts",
24
+ "import": "./dist/utils.js",
25
+ "require": "./dist/utils.cjs"
26
+ },
11
27
  "./fonts/OpenSans.css": "./dist/fonts/OpenSans.css",
12
28
  "./base/colors.css": "./dist/styleD/build/css/base/colors.css",
13
29
  "./base/typography.css": "./dist/styleD/build/css/base/typography.css",
@@ -21,6 +37,20 @@
21
37
  "./component/tagAutocomplete.css": "./dist/styleD/build/css/component/tagAutocomplete.css",
22
38
  "./component/tagTable.css": "./dist/styleD/build/css/component/tagTable.css"
23
39
  },
40
+ "//typesVersions": "Provides backward compatibility for TypeScript moduleResolution: node - maps subpath imports to correct type definition files. When adding new components with their own entry points, ensure to add them here.",
41
+ "typesVersions": {
42
+ "*": {
43
+ "byline": [
44
+ "./dist/types/byline.d.ts"
45
+ ],
46
+ "tag-picker": [
47
+ "./dist/types/tag-picker.d.ts"
48
+ ],
49
+ "utils": [
50
+ "./dist/types/utils.d.ts"
51
+ ]
52
+ }
53
+ },
24
54
  "files": [
25
55
  "dist"
26
56
  ],
@@ -29,7 +59,9 @@
29
59
  "directory": "stand-component-library"
30
60
  },
31
61
  "main": "./dist/index.cjs",
62
+ "module": "./dist/index.js",
32
63
  "types": "./dist/types/index.d.ts",
64
+ "sideEffects": false,
33
65
  "devDependencies": {
34
66
  "@changesets/cli": "^2.29.8",
35
67
  "@emotion/react": "11.11.4",
@@ -92,6 +124,9 @@
92
124
  "typescript": ">=5.0.0 <=5.9.3"
93
125
  },
94
126
  "peerDependenciesMeta": {
127
+ "@emotion/react": {
128
+ "optional": true
129
+ },
95
130
  "@guardian/prosemirror-invisibles": {
96
131
  "optional": true
97
132
  },
@@ -112,6 +147,18 @@
112
147
  },
113
148
  "prosemirror-view": {
114
149
  "optional": true
150
+ },
151
+ "react": {
152
+ "optional": true
153
+ },
154
+ "react-aria-components": {
155
+ "optional": true
156
+ },
157
+ "react-dom": {
158
+ "optional": true
159
+ },
160
+ "typescript": {
161
+ "optional": true
115
162
  }
116
163
  },
117
164
  "scripts": {
@@ -1,29 +0,0 @@
1
- /**
2
- * Do not edit directly, this file was auto-generated.
3
- */
4
-
5
- :root {
6
- --semantic-colors-text-default: #000000;
7
- --semantic-colors-text-subdued: #545454;
8
- --semantic-colors-text-inverse-default: #dcdcdc;
9
- --semantic-colors-text-inverse-subdued: #cccccc;
10
- --semantic-colors-text-inverse-strong: #ffffff;
11
- --semantic-colors-text-error: #8c2113;
12
- --semantic-colors-text-warning: #433608;
13
- --semantic-colors-text-success: #326528;
14
- --semantic-colors-text-information: #00344e;
15
- --semantic-colors-text-disabled: #999999;
16
- --semantic-colors-bg-default-on-dark: #121212;
17
- --semantic-colors-bg-default-on-light: #ffffff;
18
- --semantic-colors-surface-light-1: #f6f6f6;
19
- --semantic-colors-surface-light-2: #ededed;
20
- --semantic-colors-surface-dark-1: #333333;
21
- --semantic-colors-border-subtle: #cccccc;
22
- --semantic-colors-border-default: #8d8d8d;
23
- --semantic-colors-border-strong: #545454;
24
- --semantic-colors-border-inverse-strong: #ffffff;
25
- --semantic-colors-status-status-draft: #f1c21b;
26
- --semantic-colors-status-status-live: #4e9e3e;
27
- --semantic-colors-status-status-selected: #0072a9;
28
- --semantic-colors-status-status-focused: #0072a9;
29
- }
File without changes