@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.
- package/README.md +394 -7
- package/dist/{byline → components/byline}/Byline.cjs +5 -5
- package/dist/{byline → components/byline}/Byline.js +5 -5
- package/dist/components/byline/styles.cjs +266 -0
- package/dist/components/byline/styles.js +256 -0
- package/dist/components/tag-picker/TagAutocomplete.cjs +107 -0
- package/dist/components/tag-picker/TagAutocomplete.js +26 -0
- package/dist/components/tag-picker/TagTable.cjs +203 -0
- package/dist/components/tag-picker/TagTable.js +91 -0
- package/dist/components/tag-picker/styles.cjs +198 -0
- package/dist/components/tag-picker/styles.js +185 -0
- package/dist/components/util.cjs +19 -0
- package/dist/components/util.js +17 -0
- package/dist/index.cjs +15 -1
- package/dist/index.js +8 -1
- package/dist/styleD/build/css/css/base/colors.css +122 -0
- package/dist/styleD/build/css/css/base/typography.css +43 -0
- package/dist/styleD/build/css/css/component/byline.css +36 -0
- package/dist/styleD/build/css/css/component/tagAutocomplete.css +23 -0
- package/dist/styleD/build/css/css/component/tagTable.css +39 -0
- package/dist/styleD/build/css/css/semantic/colors.css +27 -0
- package/dist/styleD/build/css/css/semantic/typography.css +138 -0
- package/dist/styleD/build/typescript/base/colors.cjs +144 -0
- package/dist/styleD/build/typescript/base/colors.js +142 -0
- package/dist/styleD/build/typescript/base/typography.cjs +65 -0
- package/dist/styleD/build/typescript/base/typography.js +63 -0
- package/dist/styleD/build/typescript/component/byline.cjs +42 -0
- package/dist/styleD/build/typescript/component/byline.js +40 -0
- package/dist/styleD/build/typescript/component/tagAutocomplete.cjs +29 -0
- package/dist/styleD/build/typescript/component/tagAutocomplete.js +27 -0
- package/dist/styleD/build/typescript/component/tagTable.cjs +53 -0
- package/dist/styleD/build/typescript/component/tagTable.js +51 -0
- package/dist/styleD/build/typescript/semantic/colors.cjs +37 -0
- package/dist/styleD/build/typescript/semantic/colors.js +35 -0
- package/dist/styleD/build/typescript/semantic/typography.cjs +462 -0
- package/dist/styleD/build/typescript/semantic/typography.js +460 -0
- package/dist/styleD/utils/semantic/typography.cjs +17 -0
- package/dist/styleD/utils/semantic/typography.js +15 -0
- package/dist/types/components/byline/Byline.d.ts +83 -0
- package/dist/types/components/byline/styles.d.ts +13 -0
- package/dist/types/components/byline/theme.d.ts +3 -0
- package/dist/types/components/tag-picker/TagAutocomplete.d.ts +117 -0
- package/dist/types/components/tag-picker/TagTable.d.ts +126 -0
- package/dist/types/components/tag-picker/example-tags.d.ts +2 -0
- package/dist/types/components/tag-picker/styles.d.ts +16 -0
- package/dist/types/components/tag-picker/types.d.ts +65 -0
- package/dist/types/{byline → components}/util.d.ts +1 -0
- package/dist/types/index.d.ts +26 -2
- package/dist/types/styleD/build/typescript/base/colors.d.ts +144 -0
- package/dist/types/styleD/build/typescript/base/typography.d.ts +65 -0
- package/dist/types/styleD/build/typescript/component/byline.d.ts +42 -0
- package/dist/types/styleD/build/typescript/component/tagAutocomplete.d.ts +29 -0
- package/dist/types/styleD/build/typescript/component/tagTable.d.ts +53 -0
- package/dist/types/styleD/build/typescript/semantic/colors.d.ts +37 -0
- package/dist/types/styleD/build/typescript/semantic/typography.d.ts +462 -0
- package/dist/types/styleD/stories/base/Typography.d.ts +1 -0
- package/dist/types/styleD/stories/base/storybookColorPalette.d.ts +19 -0
- package/dist/types/styleD/stories/semantic/TypographyPresets.d.ts +1 -0
- package/dist/types/styleD/utils/semantic/typography.d.ts +15 -0
- package/dist/types/styleD/utils/semantic/typography.test.d.ts +1 -0
- package/package.json +67 -22
- package/dist/byline/styles.cjs +0 -244
- package/dist/byline/styles.js +0 -234
- package/dist/types/byline/Byline.d.ts +0 -17
- package/dist/types/byline/styles.d.ts +0 -11
- package/dist/types/byline/theme.d.ts +0 -44
- /package/dist/{byline → components/byline}/Preview.cjs +0 -0
- /package/dist/{byline → components/byline}/Preview.js +0 -0
- /package/dist/{byline → components/byline}/lib.cjs +0 -0
- /package/dist/{byline → components/byline}/lib.js +0 -0
- /package/dist/{byline → components/byline}/placeholder.cjs +0 -0
- /package/dist/{byline → components/byline}/placeholder.js +0 -0
- /package/dist/{byline → components/byline}/plugins.cjs +0 -0
- /package/dist/{byline → components/byline}/plugins.js +0 -0
- /package/dist/{byline → components/byline}/schema.cjs +0 -0
- /package/dist/{byline → components/byline}/schema.js +0 -0
- /package/dist/types/{byline → components/byline}/Preview.d.ts +0 -0
- /package/dist/types/{byline → components/byline}/contributors-fixture.d.ts +0 -0
- /package/dist/types/{byline → components/byline}/lib.d.ts +0 -0
- /package/dist/types/{byline → components/byline}/lib.test.d.ts +0 -0
- /package/dist/types/{byline → components/byline}/placeholder.d.ts +0 -0
- /package/dist/types/{byline → components/byline}/plugins.d.ts +0 -0
- /package/dist/types/{byline → components/byline}/schema.d.ts +0 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { SerializedStyles } from '@emotion/react';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
import type { ComponentTagAutocomplete } from '../../styleD/build/typescript/component/tagAutocomplete';
|
|
4
|
+
import type { DeepPartial } from '../util';
|
|
5
|
+
import type { Tag } from './types';
|
|
6
|
+
interface TagAutocompleteProps<T extends Tag = Tag> {
|
|
7
|
+
/** `addTag` - Function called when an option is picked from the dropdown */
|
|
8
|
+
addTag: (tag: T) => void;
|
|
9
|
+
/** `loading` - Whether the component is loading options for the dropdown */
|
|
10
|
+
loading: boolean;
|
|
11
|
+
/** `onChange` - Function called when the combobox input changes */
|
|
12
|
+
onChange: (inputText: string) => void;
|
|
13
|
+
/** `options` - The list of options shown in the dropdown */
|
|
14
|
+
options: T[];
|
|
15
|
+
/** `label` - An accessible label for the combobox input */
|
|
16
|
+
label: string;
|
|
17
|
+
/** `placeholder` - A placeholder string for the combobox input */
|
|
18
|
+
placeholder: string;
|
|
19
|
+
/** `disabled` - Whether the combobox input is disabled */
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
/** `value` - The value of the combobox input */
|
|
22
|
+
value: string;
|
|
23
|
+
'data-testid'?: string;
|
|
24
|
+
/** `loadingIcon` - Icon used to show loading happening in the dropdown */
|
|
25
|
+
loadingIcon?: ReactElement;
|
|
26
|
+
/** `theme` - Used to customise the look and feel of the TagAutocomplete component */
|
|
27
|
+
theme?: DeepPartial<ComponentTagAutocomplete>;
|
|
28
|
+
/** `cssOverrides` - Escape hatch for styling that doesn't fall into the theme */
|
|
29
|
+
cssOverrides?: SerializedStyles;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* ## TagAutocomplete
|
|
33
|
+
*
|
|
34
|
+
* *Status: Testing*
|
|
35
|
+
*
|
|
36
|
+
* Part of the overall TagPicker component, the TagAutocomplete provides an accessible
|
|
37
|
+
* autocomplete input for selecting tags from a list of options, based on the [React Aria ComboBox](https://react-spectrum.adobe.com/react-aria/ComboBox) component.
|
|
38
|
+
*
|
|
39
|
+
* **Peer dependencies:**
|
|
40
|
+
* - `react-aria-components`
|
|
41
|
+
*
|
|
42
|
+
* See the `peerDependencies` section of the `package.json` for compatible versions to install.
|
|
43
|
+
*
|
|
44
|
+
* ## Usage
|
|
45
|
+
*
|
|
46
|
+
* *Example with TagAutocomplete and TagTable combined:*
|
|
47
|
+
*
|
|
48
|
+
* ```tsx
|
|
49
|
+
* import { TagAutocomplete, TagTable } from '@guardian/stand';
|
|
50
|
+
*
|
|
51
|
+
* const Component = () => {
|
|
52
|
+
* const [selectedTags, setSelectedTags] = useState<
|
|
53
|
+
* TagManagerObjectData[] // TagManagerObjectData is an internal type representing a Tag
|
|
54
|
+
* >([]);
|
|
55
|
+
|
|
56
|
+
* const [options, setOptions] = useState<TagManagerObjectData[]>([]);
|
|
57
|
+
* const [value, setValue] = useState('');
|
|
58
|
+
* const onChange = (inputText: string) => {
|
|
59
|
+
* setValue(inputText);
|
|
60
|
+
* if (inputText === '') {
|
|
61
|
+
* setOptions([]);
|
|
62
|
+
* return;
|
|
63
|
+
* }
|
|
64
|
+
*
|
|
65
|
+
* if (inputText === '*') {
|
|
66
|
+
* setOptions(exampleTags); // exampleTags is an array of Tags
|
|
67
|
+
* return;
|
|
68
|
+
* }
|
|
69
|
+
*
|
|
70
|
+
* // Simple filtering against exampleTags
|
|
71
|
+
* const filteredItems = exampleTags.filter((t) =>
|
|
72
|
+
* t.internalName.toLowerCase().includes(inputText.toLowerCase()),
|
|
73
|
+
* );
|
|
74
|
+
* return setOptions(filteredItems);
|
|
75
|
+
* };
|
|
76
|
+
|
|
77
|
+
* return (
|
|
78
|
+
* <>
|
|
79
|
+
* <div
|
|
80
|
+
* css={css`
|
|
81
|
+
* display: flex;
|
|
82
|
+
* `}
|
|
83
|
+
* >
|
|
84
|
+
* <TagAutocomplete
|
|
85
|
+
* onChange={onChange}
|
|
86
|
+
* options={options}
|
|
87
|
+
* label="Tags"
|
|
88
|
+
* addTag={(tag) =>
|
|
89
|
+
* setSelectedTags((tags) => {
|
|
90
|
+
* return [...tags, tag];
|
|
91
|
+
* })
|
|
92
|
+
* }
|
|
93
|
+
* loading={false}
|
|
94
|
+
* placeholder={''}
|
|
95
|
+
* disabled={false}
|
|
96
|
+
* value={value}
|
|
97
|
+
* />
|
|
98
|
+
* <select>
|
|
99
|
+
* option>All tags</option>
|
|
100
|
+
* </select>
|
|
101
|
+
* </div>
|
|
102
|
+
* <TagTable rows={selectedTags} filterRows={() => true} />
|
|
103
|
+
* </>
|
|
104
|
+
* );
|
|
105
|
+
* };
|
|
106
|
+
* ```
|
|
107
|
+
*
|
|
108
|
+
* #### Props
|
|
109
|
+
*
|
|
110
|
+
* See {@link TagAutocompleteProps} for a full list of props and descriptions.
|
|
111
|
+
*
|
|
112
|
+
* #### Example
|
|
113
|
+
*
|
|
114
|
+
* This is currently still in testing phase, so a production implementation is not yet available.
|
|
115
|
+
*/
|
|
116
|
+
export declare function TagAutocomplete<T extends Tag = Tag>({ addTag, loading, onChange, options, label, placeholder, disabled, value, 'data-testid': dataTestId, loadingIcon, theme, cssOverrides, }: TagAutocompleteProps<T>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
117
|
+
export {};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import type { SerializedStyles } from '@emotion/react';
|
|
2
|
+
import { type ReactElement } from 'react';
|
|
3
|
+
import { Row } from 'react-aria-components';
|
|
4
|
+
import type { ComponentTagTable } from '../../styleD/build/typescript/component/tagTable';
|
|
5
|
+
import type { DeepPartial } from '../util';
|
|
6
|
+
import type { TagRow } from './types';
|
|
7
|
+
type Row = TagRow | {
|
|
8
|
+
tag: TagRow;
|
|
9
|
+
};
|
|
10
|
+
export interface TagTableProps<R extends Row> {
|
|
11
|
+
/** `rows` - The collection of rows */
|
|
12
|
+
rows: R[];
|
|
13
|
+
/** `filterRows` - Function to filter rows from `rows` prop from appearing in the table */
|
|
14
|
+
filterRows: (row: R) => boolean;
|
|
15
|
+
/** `heading` - The table heading */
|
|
16
|
+
heading?: string;
|
|
17
|
+
/** `showTagType` - Whether to show tags' type in table */
|
|
18
|
+
showTagType?: boolean;
|
|
19
|
+
/** `showTagSectionName` - Whether to show tags' section name in table */
|
|
20
|
+
showTagSectionName?: boolean;
|
|
21
|
+
/** `removeAction` - Function called when the Remove button is pressed on a row */
|
|
22
|
+
removeAction?: (tag: R) => void;
|
|
23
|
+
/** `addAction` - Function called when the Add button is pressed on a row */
|
|
24
|
+
addAction?: (tag: R) => void;
|
|
25
|
+
/** `onReorder` - Function called when a re-ordering of rows through drag and drop is performed */
|
|
26
|
+
onReorder?: (tags: R[]) => void;
|
|
27
|
+
/** `canRemove` - Function to determine if a given row can be removed from the table */
|
|
28
|
+
canRemove?: (tag: R) => boolean;
|
|
29
|
+
'data-testid'?: string;
|
|
30
|
+
/** `removeIcon` - Icon used in the remove row button */
|
|
31
|
+
removeIcon?: ReactElement;
|
|
32
|
+
/** `gripIcon` - Icon to indicate that a row can be dragged, used in the accessible drag button */
|
|
33
|
+
gripIcon?: ReactElement;
|
|
34
|
+
/** `theme` - Used to customise the look and feel of the TagTable component */
|
|
35
|
+
theme?: DeepPartial<ComponentTagTable>;
|
|
36
|
+
/** `cssOverrides` - Escape hatch for styling that doesn't fall into the theme */
|
|
37
|
+
cssOverrides?: SerializedStyles;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* ## TagTable
|
|
41
|
+
*
|
|
42
|
+
* *Status: Testing*
|
|
43
|
+
*
|
|
44
|
+
* Part of the overall TagPicker component, the TagTable provides an accessible
|
|
45
|
+
* table for displaying tags, with options to add, remove, and reorder tags via drag and drop,
|
|
46
|
+
* based on the [React Aria Table](https://react-spectrum.adobe.com/react-aria/Table) component.
|
|
47
|
+
*
|
|
48
|
+
* **Peer dependencies:**
|
|
49
|
+
* - `react-aria-components`
|
|
50
|
+
*
|
|
51
|
+
* See the `peerDependencies` section of the `package.json` for compatible versions to install.
|
|
52
|
+
*
|
|
53
|
+
* ## Usage
|
|
54
|
+
*
|
|
55
|
+
* *Example with TagAutocomplete and TagTable combined:*
|
|
56
|
+
*
|
|
57
|
+
* ```tsx
|
|
58
|
+
* import { TagAutocomplete, TagTable } from '@guardian/stand';
|
|
59
|
+
*
|
|
60
|
+
* const Component = () => {
|
|
61
|
+
* const [selectedTags, setSelectedTags] = useState<
|
|
62
|
+
* TagManagerObjectData[] // TagManagerObjectData is an internal type representing a Tag
|
|
63
|
+
* >([]);
|
|
64
|
+
|
|
65
|
+
* const [options, setOptions] = useState<TagManagerObjectData[]>([]);
|
|
66
|
+
* const [value, setValue] = useState('');
|
|
67
|
+
* const onChange = (inputText: string) => {
|
|
68
|
+
* setValue(inputText);
|
|
69
|
+
* if (inputText === '') {
|
|
70
|
+
* setOptions([]);
|
|
71
|
+
* return;
|
|
72
|
+
* }
|
|
73
|
+
*
|
|
74
|
+
* if (inputText === '*') {
|
|
75
|
+
* setOptions(exampleTags); // exampleTags is an array of Tags
|
|
76
|
+
* return;
|
|
77
|
+
* }
|
|
78
|
+
*
|
|
79
|
+
* // Simple filtering against exampleTags
|
|
80
|
+
* const filteredItems = exampleTags.filter((t) =>
|
|
81
|
+
* t.internalName.toLowerCase().includes(inputText.toLowerCase()),
|
|
82
|
+
* );
|
|
83
|
+
* return setOptions(filteredItems);
|
|
84
|
+
* };
|
|
85
|
+
|
|
86
|
+
* return (
|
|
87
|
+
* <>
|
|
88
|
+
* <div
|
|
89
|
+
* css={css`
|
|
90
|
+
* display: flex;
|
|
91
|
+
* `}
|
|
92
|
+
* >
|
|
93
|
+
* <TagAutocomplete
|
|
94
|
+
* onChange={onChange}
|
|
95
|
+
* options={options}
|
|
96
|
+
* label="Tags"
|
|
97
|
+
* addTag={(tag) =>
|
|
98
|
+
* setSelectedTags((tags) => {
|
|
99
|
+
* return [...tags, tag];
|
|
100
|
+
* })
|
|
101
|
+
* }
|
|
102
|
+
* loading={false}
|
|
103
|
+
* placeholder={''}
|
|
104
|
+
* disabled={false}
|
|
105
|
+
* value={value}
|
|
106
|
+
* />
|
|
107
|
+
* <select>
|
|
108
|
+
* option>All tags</option>
|
|
109
|
+
* </select>
|
|
110
|
+
* </div>
|
|
111
|
+
* <TagTable rows={selectedTags} filterRows={() => true} />
|
|
112
|
+
* </>
|
|
113
|
+
* );
|
|
114
|
+
* };
|
|
115
|
+
* ```
|
|
116
|
+
*
|
|
117
|
+
* #### Props
|
|
118
|
+
*
|
|
119
|
+
* See {@link TagTableProps} for a full list of props and descriptions.
|
|
120
|
+
*
|
|
121
|
+
* #### Example
|
|
122
|
+
*
|
|
123
|
+
* This is currently still in testing phase, so a production implementation is not yet available.
|
|
124
|
+
*/
|
|
125
|
+
export declare function TagTable<R extends Row>({ rows, filterRows, heading, showTagType, showTagSectionName, removeAction: removeTag, addAction: addTag, onReorder, canRemove, 'data-testid': dataTestId, removeIcon, gripIcon, theme, cssOverrides, }: TagTableProps<R>): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
126
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SerializedStyles } from '@emotion/react';
|
|
2
|
+
import { type ComponentTagAutocomplete } from '../../styleD/build/typescript/component/tagAutocomplete';
|
|
3
|
+
import { type ComponentTagTable } from '../../styleD/build/typescript/component/tagTable';
|
|
4
|
+
import { type DeepPartial } from '../util';
|
|
5
|
+
export declare const tagAutocompleteInputStyles: (partialTheme?: DeepPartial<ComponentTagAutocomplete>) => SerializedStyles;
|
|
6
|
+
export declare const listboxStyles: (partialTheme?: DeepPartial<ComponentTagAutocomplete>) => SerializedStyles;
|
|
7
|
+
export declare const listboxItemStyles: (partialTheme?: DeepPartial<ComponentTagAutocomplete>) => SerializedStyles;
|
|
8
|
+
export declare const listboxInfoStyles: (partialTheme?: DeepPartial<ComponentTagAutocomplete>) => SerializedStyles;
|
|
9
|
+
export declare const tagTableHeadingStyles: (partialTheme?: DeepPartial<ComponentTagTable>) => SerializedStyles;
|
|
10
|
+
export declare const tagTableCellStyles: (partialTheme?: DeepPartial<ComponentTagTable>) => SerializedStyles;
|
|
11
|
+
export declare const tagTableRowStyles: (canDrag: boolean, partialTheme?: DeepPartial<ComponentTagTable>) => SerializedStyles;
|
|
12
|
+
export declare const tagTableStyles: (canRemoveTag: boolean, partialTheme?: DeepPartial<ComponentTagTable>) => SerializedStyles;
|
|
13
|
+
export declare const tagTableRemoveButtonStyles: SerializedStyles;
|
|
14
|
+
export declare const tagTableAddButtonStyles: (partialTheme?: DeepPartial<ComponentTagTable>) => SerializedStyles;
|
|
15
|
+
export declare const tagTableDragButtonStyles: SerializedStyles;
|
|
16
|
+
export declare const tagTableTypeBadgeStyles: (partialTheme?: DeepPartial<ComponentTagTable>) => SerializedStyles;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export type Tag = {
|
|
2
|
+
id: number;
|
|
3
|
+
internalName: string;
|
|
4
|
+
};
|
|
5
|
+
export type TagRow = Tag & {
|
|
6
|
+
type: string;
|
|
7
|
+
section: {
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export type TagManagerObjectData = {
|
|
12
|
+
id: number;
|
|
13
|
+
type: string;
|
|
14
|
+
internalName: string;
|
|
15
|
+
externalName: string;
|
|
16
|
+
slug: string;
|
|
17
|
+
section: {
|
|
18
|
+
id: number;
|
|
19
|
+
name: string;
|
|
20
|
+
pathPrefix: string;
|
|
21
|
+
sectionTagId: number;
|
|
22
|
+
slug: string;
|
|
23
|
+
};
|
|
24
|
+
parents: Array<{
|
|
25
|
+
uri: string;
|
|
26
|
+
data?: unknown;
|
|
27
|
+
links?: Array<{
|
|
28
|
+
rel: string;
|
|
29
|
+
href: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
}>;
|
|
32
|
+
}>;
|
|
33
|
+
externalReferences: Array<{
|
|
34
|
+
type: string;
|
|
35
|
+
token?: string | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
path: string;
|
|
38
|
+
contributorInformation: {
|
|
39
|
+
lastName?: string | undefined;
|
|
40
|
+
firstName?: string | undefined;
|
|
41
|
+
twitterHandle?: string | undefined;
|
|
42
|
+
rcsId?: string | undefined;
|
|
43
|
+
contactEmail?: string | undefined;
|
|
44
|
+
bylineImage?: {
|
|
45
|
+
imageId: string;
|
|
46
|
+
assets: Array<{
|
|
47
|
+
imageUrl: string;
|
|
48
|
+
width: number;
|
|
49
|
+
height: number;
|
|
50
|
+
mimeType: string;
|
|
51
|
+
}>;
|
|
52
|
+
} | undefined;
|
|
53
|
+
largeBylineImage?: {
|
|
54
|
+
imageId: string;
|
|
55
|
+
assets: Array<{
|
|
56
|
+
imageUrl: string;
|
|
57
|
+
width: number;
|
|
58
|
+
height: number;
|
|
59
|
+
mimeType: string;
|
|
60
|
+
}>;
|
|
61
|
+
} | undefined;
|
|
62
|
+
} | null;
|
|
63
|
+
adBlockingLevel?: 'NONE' | 'SUGGEST' | 'FORCE' | undefined;
|
|
64
|
+
contributionBlockingLevel?: 'NONE' | 'SUGGEST' | 'FORCE' | undefined;
|
|
65
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* component exports
|
|
3
|
+
*/
|
|
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';
|
|
9
|
+
/**
|
|
10
|
+
* style dictionary exports - base
|
|
11
|
+
*/
|
|
12
|
+
export { baseColors } from './styleD/build/typescript/base/colors';
|
|
13
|
+
export type { BaseColors } from './styleD/build/typescript/base/colors';
|
|
14
|
+
export { baseTypography } from './styleD/build/typescript/base/typography';
|
|
15
|
+
export type { BaseTypography } from './styleD/build/typescript/base/typography';
|
|
16
|
+
/**
|
|
17
|
+
* style dictionary exports - semantic
|
|
18
|
+
*/
|
|
19
|
+
export { semanticColors } from './styleD/build/typescript/semantic/colors';
|
|
20
|
+
export type { SemanticColors } from './styleD/build/typescript/semantic/colors';
|
|
21
|
+
export { semanticTypography } from './styleD/build/typescript/semantic/typography';
|
|
22
|
+
export type { SemanticTypography } from './styleD/build/typescript/semantic/typography';
|
|
23
|
+
/**
|
|
24
|
+
* utils exports
|
|
25
|
+
*/
|
|
26
|
+
export { convertTypographyToEmotion } from './styleD/utils/semantic/typography';
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
export declare const baseColors: {
|
|
5
|
+
readonly neutral: {
|
|
6
|
+
readonly '0': "#000000";
|
|
7
|
+
readonly '50': "#121212";
|
|
8
|
+
readonly '100': "#333333";
|
|
9
|
+
readonly '200': "#545454";
|
|
10
|
+
readonly '300': "#666666";
|
|
11
|
+
readonly '400': "#8d8d8d";
|
|
12
|
+
readonly '500': "#999999";
|
|
13
|
+
readonly '550': "#aeaeae";
|
|
14
|
+
readonly '600': "#bababa";
|
|
15
|
+
readonly '625': "#c1c1c1";
|
|
16
|
+
readonly '650': "#cccccc";
|
|
17
|
+
readonly '700': "#dcdcdc";
|
|
18
|
+
readonly '750': "#e6e6e6";
|
|
19
|
+
readonly '800': "#ededed";
|
|
20
|
+
readonly '850': "#f6f6f6";
|
|
21
|
+
readonly '900': "#ffffff";
|
|
22
|
+
};
|
|
23
|
+
readonly red: {
|
|
24
|
+
readonly '50': "#3d0e08";
|
|
25
|
+
readonly '100': "#65170e";
|
|
26
|
+
readonly '200': "#8c2113";
|
|
27
|
+
readonly '300': "#b42a19";
|
|
28
|
+
readonly '400': "#db331e";
|
|
29
|
+
readonly '500': "#e15847";
|
|
30
|
+
readonly '600': "#e87c6f";
|
|
31
|
+
readonly '700': "#eea198";
|
|
32
|
+
readonly '800': "#f5c6c0";
|
|
33
|
+
readonly '900': "#fbebe9";
|
|
34
|
+
};
|
|
35
|
+
readonly blue: {
|
|
36
|
+
readonly '50': "#061d3c";
|
|
37
|
+
readonly '100': "#092f62";
|
|
38
|
+
readonly '200': "#0d4289";
|
|
39
|
+
readonly '300': "#1054af";
|
|
40
|
+
readonly '400': "#1467d6";
|
|
41
|
+
readonly '500': "#3e82dd";
|
|
42
|
+
readonly '600': "#699ee5";
|
|
43
|
+
readonly '700': "#93b9ec";
|
|
44
|
+
readonly '800': "#bdd4f4";
|
|
45
|
+
readonly '900': "#e8f0fb";
|
|
46
|
+
};
|
|
47
|
+
readonly cyan: {
|
|
48
|
+
readonly '50': "#00202f";
|
|
49
|
+
readonly '100': "#00344e";
|
|
50
|
+
readonly '200': "#00496c";
|
|
51
|
+
readonly '300': "#005d8b";
|
|
52
|
+
readonly '400': "#0072a9";
|
|
53
|
+
readonly '500': "#2e8bb8";
|
|
54
|
+
readonly '600': "#5ca5c8";
|
|
55
|
+
readonly '700': "#8abed7";
|
|
56
|
+
readonly '800': "#b8d8e7";
|
|
57
|
+
readonly '900': "#e6f1f6";
|
|
58
|
+
};
|
|
59
|
+
readonly teal: {
|
|
60
|
+
readonly '50': "#050e0f";
|
|
61
|
+
readonly '100': "#0e2729";
|
|
62
|
+
readonly '200': "#174044";
|
|
63
|
+
readonly '300': "#287279";
|
|
64
|
+
readonly '400': "#318b94";
|
|
65
|
+
readonly '500': "#56a0a7";
|
|
66
|
+
readonly '600': "#7bb5bb";
|
|
67
|
+
readonly '700': "#a0cace";
|
|
68
|
+
readonly '800': "#c5dfe1";
|
|
69
|
+
readonly '900': "#eaf3f4";
|
|
70
|
+
};
|
|
71
|
+
readonly green: {
|
|
72
|
+
readonly '50': "#162c11";
|
|
73
|
+
readonly '100': "#24491d";
|
|
74
|
+
readonly '200': "#326528";
|
|
75
|
+
readonly '300': "#408233";
|
|
76
|
+
readonly '400': "#4e9e3e";
|
|
77
|
+
readonly '500': "#6eaf61";
|
|
78
|
+
readonly '600': "#8ec183";
|
|
79
|
+
readonly '700': "#aed2a6";
|
|
80
|
+
readonly '800': "#cde4c9";
|
|
81
|
+
readonly '900': "#edf5ec";
|
|
82
|
+
};
|
|
83
|
+
readonly yellow: {
|
|
84
|
+
readonly '50': "#433608";
|
|
85
|
+
readonly '100': "#6f590c";
|
|
86
|
+
readonly '200': "#9a7c11";
|
|
87
|
+
readonly '300': "#c69f16";
|
|
88
|
+
readonly '400': "#f1c21b";
|
|
89
|
+
readonly '500': "#f4cd44";
|
|
90
|
+
readonly '600': "#f6d86d";
|
|
91
|
+
readonly '700': "#f9e396";
|
|
92
|
+
readonly '800': "#fbeebf";
|
|
93
|
+
readonly '900': "#fef9e8";
|
|
94
|
+
};
|
|
95
|
+
readonly orange: {
|
|
96
|
+
readonly '50': "#45260e";
|
|
97
|
+
readonly '100': "#713e17";
|
|
98
|
+
readonly '200': "#9d5621";
|
|
99
|
+
readonly '300': "#c96e2a";
|
|
100
|
+
readonly '400': "#f58633";
|
|
101
|
+
readonly '500': "#f79c58";
|
|
102
|
+
readonly '600': "#f9b27c";
|
|
103
|
+
readonly '700': "#fac7a1";
|
|
104
|
+
readonly '800': "#fcddc6";
|
|
105
|
+
readonly '900': "#fef3eb";
|
|
106
|
+
};
|
|
107
|
+
readonly magenta: {
|
|
108
|
+
readonly '50': "#350e20";
|
|
109
|
+
readonly '100': "#581734";
|
|
110
|
+
readonly '200': "#7a2048";
|
|
111
|
+
readonly '300': "#9d295d";
|
|
112
|
+
readonly '400': "#bf3271";
|
|
113
|
+
readonly '500': "#cb578b";
|
|
114
|
+
readonly '600': "#d67ca4";
|
|
115
|
+
readonly '700': "#e2a1be";
|
|
116
|
+
readonly '800': "#edc6d7";
|
|
117
|
+
readonly '900': "#f9ebf1";
|
|
118
|
+
};
|
|
119
|
+
readonly 'warm-purple': {
|
|
120
|
+
readonly '50': "#220b30";
|
|
121
|
+
readonly '100': "#381350";
|
|
122
|
+
readonly '200': "#4e1a6f";
|
|
123
|
+
readonly '300': "#64228e";
|
|
124
|
+
readonly '400': "#7a29ad";
|
|
125
|
+
readonly '500': "#9250bc";
|
|
126
|
+
readonly '600': "#aa76cb";
|
|
127
|
+
readonly '700': "#c29dd9";
|
|
128
|
+
readonly '800': "#dac3e8";
|
|
129
|
+
readonly '900': "#f2eaf7";
|
|
130
|
+
};
|
|
131
|
+
readonly 'cool-purple': {
|
|
132
|
+
readonly '50': "#232740";
|
|
133
|
+
readonly '100': "#394069";
|
|
134
|
+
readonly '200': "#505a92";
|
|
135
|
+
readonly '300': "#6773bb";
|
|
136
|
+
readonly '400': "#7d8ce4";
|
|
137
|
+
readonly '500': "#94a1e9";
|
|
138
|
+
readonly '600': "#acb5ee";
|
|
139
|
+
readonly '700': "#c3caf3";
|
|
140
|
+
readonly '800': "#dbdff7";
|
|
141
|
+
readonly '900': "#f2f4fc";
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
export type BaseColors = typeof baseColors;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
export declare const baseTypography: {
|
|
5
|
+
readonly family: {
|
|
6
|
+
readonly 'Open Sans': "Open Sans";
|
|
7
|
+
readonly 'Open Sans Compact': "Open Sans";
|
|
8
|
+
readonly 'Guardian Text Egyptian': "GuardianTextEgyptian";
|
|
9
|
+
readonly 'Guardian Headline': "GH Guardian Headline";
|
|
10
|
+
};
|
|
11
|
+
readonly size: {
|
|
12
|
+
readonly '12-px': "12px";
|
|
13
|
+
readonly '14-px': "14px";
|
|
14
|
+
readonly '16-px': "16px";
|
|
15
|
+
readonly '18-px': "18px";
|
|
16
|
+
readonly '20-px': "20px";
|
|
17
|
+
readonly '24-px': "24px";
|
|
18
|
+
readonly '28-px': "28px";
|
|
19
|
+
readonly '32-px': "32px";
|
|
20
|
+
readonly '36-px': "36px";
|
|
21
|
+
readonly '42-px': "42px";
|
|
22
|
+
readonly '48-px': "48px";
|
|
23
|
+
};
|
|
24
|
+
readonly weight: {
|
|
25
|
+
readonly 'Guardian Text Egyptian': {
|
|
26
|
+
readonly normal: 400;
|
|
27
|
+
readonly bold: 700;
|
|
28
|
+
};
|
|
29
|
+
readonly 'Guardian Headline': {
|
|
30
|
+
readonly bold: 700;
|
|
31
|
+
};
|
|
32
|
+
readonly 'Open Sans': {
|
|
33
|
+
readonly light: 340;
|
|
34
|
+
readonly normal: 460;
|
|
35
|
+
readonly semiBold: 600;
|
|
36
|
+
readonly bold: 700;
|
|
37
|
+
};
|
|
38
|
+
readonly 'Open Sans Compact': {
|
|
39
|
+
readonly light: 360;
|
|
40
|
+
readonly normal: 460;
|
|
41
|
+
readonly semiBold: 600;
|
|
42
|
+
readonly bold: 700;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
readonly width: {
|
|
46
|
+
readonly 'Open Sans': 95;
|
|
47
|
+
readonly 'Open Sans Compact': 88;
|
|
48
|
+
};
|
|
49
|
+
readonly style: {
|
|
50
|
+
readonly normal: "normal";
|
|
51
|
+
readonly italic: "italic";
|
|
52
|
+
};
|
|
53
|
+
readonly 'line-height': {
|
|
54
|
+
readonly tight: 1.15;
|
|
55
|
+
readonly normal: 1.3;
|
|
56
|
+
readonly loose: 1.4;
|
|
57
|
+
};
|
|
58
|
+
readonly 'letter-spacing': {
|
|
59
|
+
readonly 'densest-px': "-1px";
|
|
60
|
+
readonly 'denser-px': "-0.5px";
|
|
61
|
+
readonly 'dense-px': "-0.2px";
|
|
62
|
+
readonly 'default-px': "0px";
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
export type BaseTypography = typeof baseTypography;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
export declare const componentByline: {
|
|
5
|
+
color: string;
|
|
6
|
+
backgroundColor: string;
|
|
7
|
+
readonlyBackgroundColor: string;
|
|
8
|
+
borderColor: string;
|
|
9
|
+
borderWidth: string;
|
|
10
|
+
borderStyle: string;
|
|
11
|
+
lineHeight: number;
|
|
12
|
+
chip: {
|
|
13
|
+
color: string;
|
|
14
|
+
borderColor: string;
|
|
15
|
+
borderWidth: string;
|
|
16
|
+
borderStyle: string;
|
|
17
|
+
borderRadius: string;
|
|
18
|
+
paddingX: string;
|
|
19
|
+
paddingY: string;
|
|
20
|
+
selectedBorderColor: string;
|
|
21
|
+
taggedBackgroundColor: string;
|
|
22
|
+
untaggedColor: string;
|
|
23
|
+
};
|
|
24
|
+
dropdown: {
|
|
25
|
+
borderColor: string;
|
|
26
|
+
borderWidth: string;
|
|
27
|
+
borderStyle: string;
|
|
28
|
+
backgroundColor: string;
|
|
29
|
+
li: {
|
|
30
|
+
color: string;
|
|
31
|
+
borderBottomColor: string;
|
|
32
|
+
borderBottomWidth: string;
|
|
33
|
+
borderBottomStyle: string;
|
|
34
|
+
selectedBackgroundColor: string;
|
|
35
|
+
selectedColor: string;
|
|
36
|
+
};
|
|
37
|
+
maxHeight: string;
|
|
38
|
+
};
|
|
39
|
+
invisiblesColor: string;
|
|
40
|
+
placeholderColor: string;
|
|
41
|
+
};
|
|
42
|
+
export type ComponentByline = typeof componentByline;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
export declare const componentTagAutocomplete: {
|
|
5
|
+
input: {
|
|
6
|
+
color: string;
|
|
7
|
+
backgroundColor: string;
|
|
8
|
+
disabledBackgroundColor: string;
|
|
9
|
+
borderWidth: string;
|
|
10
|
+
borderStyle: string;
|
|
11
|
+
borderColor: string;
|
|
12
|
+
padding: string;
|
|
13
|
+
};
|
|
14
|
+
listbox: {
|
|
15
|
+
borderWidth: string;
|
|
16
|
+
borderStyle: string;
|
|
17
|
+
borderColor: string;
|
|
18
|
+
paddingY: string;
|
|
19
|
+
paddingX: string;
|
|
20
|
+
backgroundColor: string;
|
|
21
|
+
item: {
|
|
22
|
+
paddingY: string;
|
|
23
|
+
paddingX: string;
|
|
24
|
+
backgroundHoverColor: string;
|
|
25
|
+
backgroundFocusedColor: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export type ComponentTagAutocomplete = typeof componentTagAutocomplete;
|