@guardian/stand 0.0.8 → 0.0.10
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 +1148 -10
- package/dist/avatar.cjs +9 -0
- package/dist/avatar.js +2 -0
- package/dist/button.cjs +9 -0
- package/dist/button.js +2 -0
- package/dist/byline.cjs +9 -0
- package/dist/byline.js +2 -0
- package/dist/components/TitleText.cjs +28 -0
- package/dist/components/TitleText.js +22 -0
- package/dist/components/avatar/Avatar.cjs +57 -0
- package/dist/components/avatar/Avatar.js +27 -0
- package/dist/components/avatar/styles.cjs +33 -0
- package/dist/components/avatar/styles.js +29 -0
- package/dist/components/avatar/types.cjs +16 -0
- package/dist/components/avatar/types.js +14 -0
- package/dist/components/button/Button.cjs +29 -0
- package/dist/components/button/Button.js +14 -0
- package/dist/components/button/styles.cjs +58 -0
- package/dist/components/button/styles.js +53 -0
- package/dist/components/byline/styles.cjs +5 -5
- package/dist/components/byline/styles.js +1 -1
- package/dist/components/icon/Icon.cjs +46 -0
- package/dist/components/icon/Icon.js +19 -0
- package/dist/components/icon/styles.cjs +27 -0
- package/dist/components/icon/styles.js +20 -0
- package/dist/components/link-button/LinkButton.cjs +29 -0
- package/dist/components/link-button/LinkButton.js +14 -0
- package/dist/components/link-button/styles.cjs +9 -0
- package/dist/components/link-button/styles.js +6 -0
- package/dist/components/tag-picker/styles.cjs +11 -11
- package/dist/components/tag-picker/styles.js +1 -1
- package/dist/components/typography/Typography.cjs +26 -0
- package/dist/components/typography/Typography.js +13 -0
- package/dist/components/typography/styles.cjs +15 -0
- package/dist/components/typography/styles.js +12 -0
- package/dist/components/user-menu/PreferenceRadioGroup.cjs +53 -0
- package/dist/components/user-menu/PreferenceRadioGroup.js +19 -0
- package/dist/components/user-menu/UserMenu.cjs +67 -0
- package/dist/components/user-menu/UserMenu.js +11 -0
- package/dist/components/user-menu/default-options.cjs +109 -0
- package/dist/components/user-menu/default-options.js +105 -0
- package/dist/components/user-menu/styles.cjs +90 -0
- package/dist/components/user-menu/styles.js +83 -0
- package/dist/fonts/MaterialSymbolsOutlined.css +23 -0
- package/dist/fonts/MaterialSymbolsRound.css +23 -0
- package/dist/fonts/MaterialSymbolsSharp.css +23 -0
- package/dist/fonts/material-symbols-types.ts +3825 -0
- package/dist/icon.cjs +9 -0
- package/dist/icon.js +2 -0
- package/dist/index.cjs +22 -13
- package/dist/index.js +9 -4
- package/dist/link-button.cjs +7 -0
- package/dist/link-button.js +1 -0
- package/dist/styleD/build/css/{css/base → base}/colors.css +1 -1
- package/dist/styleD/build/css/{css/base → base}/sizing.css +4 -0
- package/dist/styleD/build/css/{css/base → base}/spacing.css +4 -0
- package/dist/styleD/build/css/{css/base → base}/typography.css +1 -0
- package/dist/styleD/build/css/component/avatar.css +54 -0
- package/dist/styleD/build/css/component/button.css +218 -0
- package/dist/styleD/build/css/{css/component → component}/byline.css +1 -1
- package/dist/styleD/build/css/component/icon.css +11 -0
- package/dist/styleD/build/css/component/typography.css +7 -0
- package/dist/styleD/build/css/component/userMenu.css +29 -0
- package/dist/styleD/build/css/semantic/colors.css +69 -0
- package/dist/styleD/build/css/{css/semantic → semantic}/sizing.css +2 -0
- package/dist/styleD/build/css/{css/semantic → semantic}/typography.css +9 -0
- package/dist/styleD/build/typescript/base/colors.cjs +1 -1
- package/dist/styleD/build/typescript/base/colors.js +1 -1
- package/dist/styleD/build/typescript/base/sizing.cjs +4 -0
- package/dist/styleD/build/typescript/base/sizing.js +4 -0
- package/dist/styleD/build/typescript/base/spacing.cjs +4 -0
- package/dist/styleD/build/typescript/base/spacing.js +4 -0
- package/dist/styleD/build/typescript/base/typography.cjs +2 -1
- package/dist/styleD/build/typescript/base/typography.js +2 -1
- package/dist/styleD/build/typescript/component/avatar.cjs +88 -0
- package/dist/styleD/build/typescript/component/avatar.js +86 -0
- package/dist/styleD/build/typescript/component/button.cjs +331 -0
- package/dist/styleD/build/typescript/component/button.js +329 -0
- package/dist/styleD/build/typescript/component/byline.cjs +1 -1
- package/dist/styleD/build/typescript/component/byline.js +1 -1
- package/dist/styleD/build/typescript/component/icon.cjs +19 -0
- package/dist/styleD/build/typescript/component/icon.js +17 -0
- package/dist/styleD/build/typescript/component/typography.cjs +7 -0
- package/dist/styleD/build/typescript/component/typography.js +5 -0
- package/dist/styleD/build/typescript/component/userMenu.cjs +37 -0
- package/dist/styleD/build/typescript/component/userMenu.js +35 -0
- package/dist/styleD/build/typescript/semantic/colors.cjs +47 -5
- package/dist/styleD/build/typescript/semantic/colors.js +47 -5
- package/dist/styleD/build/typescript/semantic/sizing.cjs +3 -1
- package/dist/styleD/build/typescript/semantic/sizing.js +3 -1
- package/dist/styleD/build/typescript/semantic/typography.cjs +15 -0
- package/dist/styleD/build/typescript/semantic/typography.js +15 -0
- package/dist/tag-picker.cjs +13 -0
- package/dist/tag-picker.js +4 -0
- package/dist/types/avatar.d.ts +19 -0
- package/dist/types/button.d.ts +20 -0
- package/dist/types/byline.d.ts +25 -0
- package/dist/types/components/TitleText.d.ts +6 -0
- package/dist/types/components/avatar/Avatar.d.ts +2 -0
- package/dist/types/components/avatar/styles.d.ts +8 -0
- package/dist/types/components/avatar/types.d.ts +45 -0
- package/dist/types/components/button/Button.d.ts +2 -0
- package/dist/types/components/button/styles.d.ts +7 -0
- package/dist/types/components/button/types.d.ts +13 -0
- package/dist/types/components/byline/Byline.d.ts +1 -1
- package/dist/types/components/byline/schema.d.ts +1 -1
- package/dist/types/components/byline/styles.d.ts +1 -1
- package/dist/types/components/byline/theme.d.ts +1 -1
- package/dist/types/components/icon/Icon.d.ts +2 -0
- package/dist/types/components/icon/styles.d.ts +8 -0
- package/dist/types/components/icon/types.d.ts +28 -0
- package/dist/types/components/link-button/LinkButton.d.ts +2 -0
- package/dist/types/components/link-button/styles.d.ts +330 -0
- package/dist/types/components/link-button/types.d.ts +13 -0
- package/dist/types/components/tag-picker/TagAutocomplete.d.ts +1 -1
- package/dist/types/components/tag-picker/TagTable.d.ts +1 -1
- package/dist/types/components/tag-picker/styles.d.ts +1 -1
- package/dist/types/components/typography/Typography.d.ts +6 -0
- package/dist/types/components/typography/styles.d.ts +7 -0
- package/dist/types/components/typography/types.d.ts +13 -0
- package/dist/types/components/user-menu/PreferenceRadioGroup.d.ts +15 -0
- package/dist/types/components/user-menu/UserMenu.d.ts +17 -0
- package/dist/types/components/user-menu/default-options.d.ts +5 -0
- package/dist/types/components/user-menu/model.d.ts +9 -0
- package/dist/types/components/user-menu/styles.d.ts +9 -0
- package/dist/types/components/user-menu/theme.d.ts +3 -0
- package/dist/types/components/user-menu/types.d.ts +5 -0
- package/dist/types/fonts/material-symbols-types.d.ts +3822 -0
- package/dist/types/icon.d.ts +27 -0
- package/dist/types/index.d.ts +25 -7
- package/dist/types/link-button.d.ts +20 -0
- package/dist/types/styleD/build/typescript/base/colors.d.ts +1 -1
- package/dist/types/styleD/build/typescript/base/sizing.d.ts +4 -0
- package/dist/types/styleD/build/typescript/base/spacing.d.ts +4 -0
- package/dist/types/styleD/build/typescript/base/typography.d.ts +1 -0
- package/dist/types/styleD/build/typescript/component/avatar.d.ts +88 -0
- package/dist/types/styleD/build/typescript/component/button.d.ts +331 -0
- package/dist/types/styleD/build/typescript/component/icon.d.ts +19 -0
- package/dist/types/styleD/build/typescript/component/typography.d.ts +7 -0
- package/dist/types/styleD/build/typescript/component/userMenu.d.ts +37 -0
- package/dist/types/styleD/build/typescript/semantic/colors.d.ts +45 -3
- package/dist/types/styleD/build/typescript/semantic/sizing.d.ts +2 -0
- package/dist/types/styleD/build/typescript/semantic/typography.d.ts +15 -0
- package/dist/types/tag-picker.d.ts +21 -0
- package/dist/types/typography.d.ts +19 -0
- package/dist/types/user-menu.d.ts +18 -0
- package/dist/types/util/mergeDeep.d.ts +1 -0
- package/dist/types/util/reset.d.ts +1 -0
- package/dist/types/util/storybookStyles.d.ts +1 -0
- package/dist/types/util/types.d.ts +34 -0
- package/dist/types/utils.d.ts +7 -0
- package/dist/typography.cjs +9 -0
- package/dist/typography.js +2 -0
- package/dist/user-menu.cjs +9 -0
- package/dist/user-menu.js +2 -0
- package/dist/util/css/reset.css +124 -0
- package/dist/util/reset.cjs +10 -0
- package/dist/util/reset.css.cjs +5 -0
- package/dist/util/reset.css.js +3 -0
- package/dist/util/reset.js +8 -0
- package/dist/utils.cjs +10 -0
- package/dist/utils.js +2 -0
- package/package.json +112 -3
- package/dist/styleD/build/css/css/semantic/colors.css +0 -29
- package/dist/types/components/util.d.ts +0 -4
- /package/dist/styleD/build/css/{css/base → base}/radius.css +0 -0
- /package/dist/styleD/build/css/{css/component → component}/tagAutocomplete.css +0 -0
- /package/dist/styleD/build/css/{css/component → component}/tagTable.css +0 -0
- /package/dist/{components/util.cjs → util/mergeDeep.cjs} +0 -0
- /package/dist/{components/util.js → util/mergeDeep.js} +0 -0
|
@@ -13,10 +13,22 @@ 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
|
-
|
|
19
|
-
'
|
|
29
|
+
base: string;
|
|
30
|
+
'raised-1': string;
|
|
31
|
+
'raised-2': string;
|
|
20
32
|
};
|
|
21
33
|
surface: {
|
|
22
34
|
'light-1': string;
|
|
@@ -24,10 +36,16 @@ export declare const semanticColors: {
|
|
|
24
36
|
'dark-1': string;
|
|
25
37
|
};
|
|
26
38
|
border: {
|
|
27
|
-
subtle: string;
|
|
28
39
|
default: string;
|
|
40
|
+
secondary: string;
|
|
41
|
+
tertiary: string;
|
|
29
42
|
strong: string;
|
|
30
43
|
'inverse-strong': string;
|
|
44
|
+
'interactive-emphasised': string;
|
|
45
|
+
'interactive-neutral': string;
|
|
46
|
+
'interactive-disabled': string;
|
|
47
|
+
'interactive-focused': string;
|
|
48
|
+
'interactive-selected': string;
|
|
31
49
|
};
|
|
32
50
|
status: {
|
|
33
51
|
'status-draft': string;
|
|
@@ -35,5 +53,29 @@ export declare const semanticColors: {
|
|
|
35
53
|
'status-selected': string;
|
|
36
54
|
'status-focused': string;
|
|
37
55
|
};
|
|
56
|
+
fill: {
|
|
57
|
+
'interactive-primary-emphasised': string;
|
|
58
|
+
'interactive-primary-emphasised-hover': string;
|
|
59
|
+
'interactive-primary-emphasised-pressed': string;
|
|
60
|
+
'interactive-secondary-emphasised-hover': string;
|
|
61
|
+
'interactive-secondary-emphasised-pressed': string;
|
|
62
|
+
'interactive-primary-neutral': string;
|
|
63
|
+
'interactive-primary-neutral-hover': string;
|
|
64
|
+
'interactive-primary-neutral-pressed': string;
|
|
65
|
+
'interactive-secondary-neutral-hover': string;
|
|
66
|
+
'interactive-secondary-neutral-pressed': string;
|
|
67
|
+
'interactive-disabled': string;
|
|
68
|
+
'green-subtle': string;
|
|
69
|
+
'blue-subtle': string;
|
|
70
|
+
'red-subtle': string;
|
|
71
|
+
'cyan-subtle': string;
|
|
72
|
+
'teal-subtle': string;
|
|
73
|
+
'cool-purple-subtle': string;
|
|
74
|
+
'warm-purple-subtle': string;
|
|
75
|
+
'magenta-subtle': string;
|
|
76
|
+
'orange-subtle': string;
|
|
77
|
+
'yellow-subtle': string;
|
|
78
|
+
selected: string;
|
|
79
|
+
};
|
|
38
80
|
};
|
|
39
81
|
export type SemanticColors = typeof semanticColors;
|
|
@@ -192,5 +192,20 @@ 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
|
+
};
|
|
205
|
+
'interactive-md': {
|
|
206
|
+
font: string;
|
|
207
|
+
letterSpacing: string;
|
|
208
|
+
fontWidth: number;
|
|
209
|
+
};
|
|
195
210
|
};
|
|
196
211
|
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,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typography component entry point
|
|
3
|
+
*
|
|
4
|
+
* Peer dependencies required to use these components:
|
|
5
|
+
* - `@emotion/react`
|
|
6
|
+
* - `react`
|
|
7
|
+
* - `react-dom`
|
|
8
|
+
* - `typescript`
|
|
9
|
+
*
|
|
10
|
+
* See the `peerDependencies` section of package.json for compatible versions.
|
|
11
|
+
*
|
|
12
|
+
* If you only need the built CSS (./component/typography.css),
|
|
13
|
+
* you don't need to install these.
|
|
14
|
+
*/
|
|
15
|
+
export { Typography } from './components/typography/Typography';
|
|
16
|
+
export type { TypographyProps } from './components/typography/types';
|
|
17
|
+
export type { TypographyTheme } from './components/typography/styles';
|
|
18
|
+
export { componentTypography } from './styleD/build/typescript/component/typography';
|
|
19
|
+
export type { ComponentTypography } from './styleD/build/typescript/component/typography';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User Menu 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/userMenu.css, ./component/userMenu.css),
|
|
14
|
+
* you don't need to install these.
|
|
15
|
+
*/
|
|
16
|
+
export { UserMenu } from './components/user-menu/UserMenu';
|
|
17
|
+
export { componentUserMenu } from './styleD/build/typescript/component/userMenu';
|
|
18
|
+
export type { ComponentUserMenu } from './styleD/build/typescript/component/userMenu';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mergeDeep<A extends object, B extends object>(obj1: A, obj2: B): A & B;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GlobalResetStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const tableStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { SerializedStyles } from '@emotion/react';
|
|
3
|
+
export interface DefaultProps<ThemeType, ClassNameType = undefined> {
|
|
4
|
+
/**
|
|
5
|
+
* Custom theme overrides for the component, this is the recommended way to
|
|
6
|
+
* customize the appearance of the component based on the design system tokens
|
|
7
|
+
*/
|
|
8
|
+
theme?: DeepPartial<ThemeType>;
|
|
9
|
+
/**
|
|
10
|
+
* Class name to be applied to the component's root element, for scenarios where
|
|
11
|
+
* custom styling is needed outside of the design system theming.
|
|
12
|
+
*
|
|
13
|
+
* Either use type ClassNameType (when extending a component from react-aria-components)
|
|
14
|
+
* or optional string if ClassNameType is undefined/not provided.
|
|
15
|
+
*/
|
|
16
|
+
className?: ClassNameType extends undefined ? string | undefined : ClassNameType;
|
|
17
|
+
/**
|
|
18
|
+
* If the theme does not cover all use cases, you can use this prop to
|
|
19
|
+
* override component styles by passing in the result of [emotion's `css` function/prop](https://emotion.sh/docs/introduction).
|
|
20
|
+
*/
|
|
21
|
+
cssOverrides?: SerializedStyles | SerializedStyles[];
|
|
22
|
+
}
|
|
23
|
+
export interface DefaultPropsWithChildren<ThemeType, ClassNameType = undefined, ChildrenType = React.ReactNode> extends DefaultProps<ThemeType, ClassNameType> {
|
|
24
|
+
/**
|
|
25
|
+
* The content of the component
|
|
26
|
+
*/
|
|
27
|
+
children?: ChildrenType;
|
|
28
|
+
}
|
|
29
|
+
export type Prettify<T> = {
|
|
30
|
+
[K in keyof T]: T[K];
|
|
31
|
+
} & {};
|
|
32
|
+
export type DeepPartial<T> = T extends object ? {
|
|
33
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
34
|
+
} : T;
|
|
@@ -0,0 +1,7 @@
|
|
|
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';
|
|
7
|
+
export { GlobalResetStyles } from './util/reset';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var Typography = require('./components/typography/Typography.cjs');
|
|
4
|
+
var typography = require('./styleD/build/typescript/component/typography.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
exports.Typography = Typography.Typography;
|
|
9
|
+
exports.componentTypography = typography.componentTypography;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Select CSS resets for use with the stand design system.
|
|
3
|
+
Modified from https://github.com/guardian/csnx/blob/0f68024f6f3bee003b5f95e66d29fb74987a8dec/libs/%40guardian/source/src/foundations/utils/resets.ts
|
|
4
|
+
*/
|
|
5
|
+
*,
|
|
6
|
+
*::after,
|
|
7
|
+
*::before {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
html {
|
|
12
|
+
text-size-adjust: none;
|
|
13
|
+
-webkit-text-size-adjust: none;
|
|
14
|
+
-webkit-tap-highlight-color: transparent;
|
|
15
|
+
-webkit-font-smoothing: antialiased;
|
|
16
|
+
-moz-osx-font-smoothing: grayscale;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
html,
|
|
20
|
+
body {
|
|
21
|
+
text-rendering: optimizeLegibility;
|
|
22
|
+
font-feature-settings: 'kern';
|
|
23
|
+
font-kerning: normal; /* Safari 7+, Firefox 24+, Chrome 33(?)+, Opera 21 */
|
|
24
|
+
font-variant-ligatures: common-ligatures;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
html,
|
|
28
|
+
body,
|
|
29
|
+
div,
|
|
30
|
+
span,
|
|
31
|
+
applet,
|
|
32
|
+
object,
|
|
33
|
+
iframe,
|
|
34
|
+
h1,
|
|
35
|
+
h2,
|
|
36
|
+
h3,
|
|
37
|
+
h4,
|
|
38
|
+
h5,
|
|
39
|
+
h6,
|
|
40
|
+
p,
|
|
41
|
+
blockquote,
|
|
42
|
+
pre,
|
|
43
|
+
a,
|
|
44
|
+
abbr,
|
|
45
|
+
acronym,
|
|
46
|
+
address,
|
|
47
|
+
big,
|
|
48
|
+
cite,
|
|
49
|
+
code,
|
|
50
|
+
del,
|
|
51
|
+
dfn,
|
|
52
|
+
em,
|
|
53
|
+
img,
|
|
54
|
+
ins,
|
|
55
|
+
kbd,
|
|
56
|
+
q,
|
|
57
|
+
s,
|
|
58
|
+
samp,
|
|
59
|
+
small,
|
|
60
|
+
strike,
|
|
61
|
+
strong,
|
|
62
|
+
sub,
|
|
63
|
+
sup,
|
|
64
|
+
tt,
|
|
65
|
+
var,
|
|
66
|
+
b,
|
|
67
|
+
u,
|
|
68
|
+
i,
|
|
69
|
+
center,
|
|
70
|
+
dl,
|
|
71
|
+
dt,
|
|
72
|
+
dd,
|
|
73
|
+
menu,
|
|
74
|
+
ol,
|
|
75
|
+
ul,
|
|
76
|
+
li,
|
|
77
|
+
fieldset,
|
|
78
|
+
form,
|
|
79
|
+
label,
|
|
80
|
+
legend,
|
|
81
|
+
table,
|
|
82
|
+
caption,
|
|
83
|
+
tbody,
|
|
84
|
+
tfoot,
|
|
85
|
+
thead,
|
|
86
|
+
tr,
|
|
87
|
+
th,
|
|
88
|
+
td,
|
|
89
|
+
article,
|
|
90
|
+
aside,
|
|
91
|
+
canvas,
|
|
92
|
+
details,
|
|
93
|
+
embed,
|
|
94
|
+
figure,
|
|
95
|
+
figcaption,
|
|
96
|
+
footer,
|
|
97
|
+
header,
|
|
98
|
+
hgroup,
|
|
99
|
+
main,
|
|
100
|
+
menu,
|
|
101
|
+
nav,
|
|
102
|
+
output,
|
|
103
|
+
ruby,
|
|
104
|
+
section,
|
|
105
|
+
summary,
|
|
106
|
+
time,
|
|
107
|
+
mark,
|
|
108
|
+
audio,
|
|
109
|
+
video {
|
|
110
|
+
margin: 0;
|
|
111
|
+
padding: 0;
|
|
112
|
+
border: 0;
|
|
113
|
+
font-size: 100%;
|
|
114
|
+
font: inherit;
|
|
115
|
+
vertical-align: baseline;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
*[hidden] {
|
|
119
|
+
display: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
body {
|
|
123
|
+
min-height: 100svh;
|
|
124
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var reset = "/*\nSelect CSS resets for use with the stand design system.\nModified from https://github.com/guardian/csnx/blob/0f68024f6f3bee003b5f95e66d29fb74987a8dec/libs/%40guardian/source/src/foundations/utils/resets.ts\n*/\n*,\n*::after,\n*::before {\n\tbox-sizing: border-box;\n}\n\nhtml {\n\ttext-size-adjust: none;\n\t-webkit-text-size-adjust: none;\n\t-webkit-tap-highlight-color: transparent;\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n}\n\nhtml,\nbody {\n\ttext-rendering: optimizeLegibility;\n\tfont-feature-settings: 'kern';\n\tfont-kerning: normal; /* Safari 7+, Firefox 24+, Chrome 33(?)+, Opera 21 */\n\tfont-variant-ligatures: common-ligatures;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nmenu,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tfont-size: 100%;\n\tfont: inherit;\n\tvertical-align: baseline;\n}\n\n*[hidden] {\n\tdisplay: none;\n}\n\nbody {\n\tmin-height: 100svh;\n}\n";
|
|
4
|
+
|
|
5
|
+
module.exports = reset;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var reset = "/*\nSelect CSS resets for use with the stand design system.\nModified from https://github.com/guardian/csnx/blob/0f68024f6f3bee003b5f95e66d29fb74987a8dec/libs/%40guardian/source/src/foundations/utils/resets.ts\n*/\n*,\n*::after,\n*::before {\n\tbox-sizing: border-box;\n}\n\nhtml {\n\ttext-size-adjust: none;\n\t-webkit-text-size-adjust: none;\n\t-webkit-tap-highlight-color: transparent;\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n}\n\nhtml,\nbody {\n\ttext-rendering: optimizeLegibility;\n\tfont-feature-settings: 'kern';\n\tfont-kerning: normal; /* Safari 7+, Firefox 24+, Chrome 33(?)+, Opera 21 */\n\tfont-variant-ligatures: common-ligatures;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nmenu,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tfont-size: 100%;\n\tfont: inherit;\n\tvertical-align: baseline;\n}\n\n*[hidden] {\n\tdisplay: none;\n}\n\nbody {\n\tmin-height: 100svh;\n}\n";
|
|
2
|
+
|
|
3
|
+
export { reset as default };
|
package/dist/utils.cjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var typography = require('./styleD/utils/semantic/typography.cjs');
|
|
4
|
+
var reset = require('./util/reset.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
exports.convertTypographyToEmotionObjectStyle = typography.convertTypographyToEmotionObjectStyle;
|
|
9
|
+
exports.convertTypographyToEmotionStringStyle = typography.convertTypographyToEmotionStringStyle;
|
|
10
|
+
exports.GlobalResetStyles = reset.GlobalResetStyles;
|
package/dist/utils.js
ADDED
package/package.json
CHANGED
|
@@ -1,14 +1,64 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guardian/stand",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
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
|
+
"./avatar": {
|
|
13
|
+
"types": "./dist/types/avatar.d.ts",
|
|
14
|
+
"import": "./dist/avatar.js",
|
|
15
|
+
"require": "./dist/avatar.cjs"
|
|
16
|
+
},
|
|
17
|
+
"./button": {
|
|
18
|
+
"types": "./dist/types/button.d.ts",
|
|
19
|
+
"import": "./dist/button.js",
|
|
20
|
+
"require": "./dist/button.cjs"
|
|
21
|
+
},
|
|
22
|
+
"./link-button": {
|
|
23
|
+
"types": "./dist/types/link-button.d.ts",
|
|
24
|
+
"import": "./dist/link-button.js",
|
|
25
|
+
"require": "./dist/link-button.cjs"
|
|
26
|
+
},
|
|
27
|
+
"./typography": {
|
|
28
|
+
"types": "./dist/types/typography.d.ts",
|
|
29
|
+
"import": "./dist/typography.js",
|
|
30
|
+
"require": "./dist/typography.cjs"
|
|
31
|
+
},
|
|
32
|
+
"./icon": {
|
|
33
|
+
"types": "./dist/types/icon.d.ts",
|
|
34
|
+
"import": "./dist/icon.js",
|
|
35
|
+
"require": "./dist/icon.cjs"
|
|
36
|
+
},
|
|
37
|
+
"./byline": {
|
|
38
|
+
"types": "./dist/types/byline.d.ts",
|
|
39
|
+
"import": "./dist/byline.js",
|
|
40
|
+
"require": "./dist/byline.cjs"
|
|
41
|
+
},
|
|
42
|
+
"./tag-picker": {
|
|
43
|
+
"types": "./dist/types/tag-picker.d.ts",
|
|
44
|
+
"import": "./dist/tag-picker.js",
|
|
45
|
+
"require": "./dist/tag-picker.cjs"
|
|
46
|
+
},
|
|
47
|
+
"./user-menu": {
|
|
48
|
+
"types": "./dist/types/user-menu.d.ts",
|
|
49
|
+
"import": "./dist/user-menu.js",
|
|
50
|
+
"require": "./dist/user-menu.cjs"
|
|
51
|
+
},
|
|
52
|
+
"./utils": {
|
|
53
|
+
"types": "./dist/types/utils.d.ts",
|
|
54
|
+
"import": "./dist/utils.js",
|
|
55
|
+
"require": "./dist/utils.cjs"
|
|
56
|
+
},
|
|
11
57
|
"./fonts/OpenSans.css": "./dist/fonts/OpenSans.css",
|
|
58
|
+
"./fonts/MaterialSymbolsOutlined.css": "./dist/fonts/MaterialSymbolsOutlined.css",
|
|
59
|
+
"./fonts/MaterialSymbolsRound.css": "./dist/fonts/MaterialSymbolsRound.css",
|
|
60
|
+
"./fonts/MaterialSymbolsSharp.css": "./dist/fonts/MaterialSymbolsSharp.css",
|
|
61
|
+
"./util/reset.css": "./dist/util/css/reset.css",
|
|
12
62
|
"./base/colors.css": "./dist/styleD/build/css/base/colors.css",
|
|
13
63
|
"./base/typography.css": "./dist/styleD/build/css/base/typography.css",
|
|
14
64
|
"./base/spacing.css": "./dist/styleD/build/css/base/spacing.css",
|
|
@@ -19,7 +69,44 @@
|
|
|
19
69
|
"./semantic/sizing.css": "./dist/styleD/build/css/semantic/sizing.css",
|
|
20
70
|
"./component/byline.css": "./dist/styleD/build/css/component/byline.css",
|
|
21
71
|
"./component/tagAutocomplete.css": "./dist/styleD/build/css/component/tagAutocomplete.css",
|
|
22
|
-
"./component/tagTable.css": "./dist/styleD/build/css/component/tagTable.css"
|
|
72
|
+
"./component/tagTable.css": "./dist/styleD/build/css/component/tagTable.css",
|
|
73
|
+
"./component/userMenu.css": "./dist/styleD/build/css/component/userMenu.css",
|
|
74
|
+
"./component/avatar.css": "./dist/styleD/build/css/component/avatar.css",
|
|
75
|
+
"./component/button.css": "./dist/styleD/build/css/component/button.css",
|
|
76
|
+
"./component/typography.css": "./dist/styleD/build/css/component/typography.css",
|
|
77
|
+
"./component/icon.css": "./dist/styleD/build/css/component/icon.css"
|
|
78
|
+
},
|
|
79
|
+
"//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.",
|
|
80
|
+
"typesVersions": {
|
|
81
|
+
"*": {
|
|
82
|
+
"avatar": [
|
|
83
|
+
"./dist/types/avatar.d.ts"
|
|
84
|
+
],
|
|
85
|
+
"button": [
|
|
86
|
+
"./dist/types/button.d.ts"
|
|
87
|
+
],
|
|
88
|
+
"link-button": [
|
|
89
|
+
"./dist/types/link-button.d.ts"
|
|
90
|
+
],
|
|
91
|
+
"typography": [
|
|
92
|
+
"./dist/types/typography.d.ts"
|
|
93
|
+
],
|
|
94
|
+
"icon": [
|
|
95
|
+
"./dist/types/icon.d.ts"
|
|
96
|
+
],
|
|
97
|
+
"byline": [
|
|
98
|
+
"./dist/types/byline.d.ts"
|
|
99
|
+
],
|
|
100
|
+
"tag-picker": [
|
|
101
|
+
"./dist/types/tag-picker.d.ts"
|
|
102
|
+
],
|
|
103
|
+
"user-menu": [
|
|
104
|
+
"./dist/types/user-menu.d.ts"
|
|
105
|
+
],
|
|
106
|
+
"utils": [
|
|
107
|
+
"./dist/types/utils.d.ts"
|
|
108
|
+
]
|
|
109
|
+
}
|
|
23
110
|
},
|
|
24
111
|
"files": [
|
|
25
112
|
"dist"
|
|
@@ -29,7 +116,9 @@
|
|
|
29
116
|
"directory": "stand-component-library"
|
|
30
117
|
},
|
|
31
118
|
"main": "./dist/index.cjs",
|
|
119
|
+
"module": "./dist/index.js",
|
|
32
120
|
"types": "./dist/types/index.d.ts",
|
|
121
|
+
"sideEffects": false,
|
|
33
122
|
"devDependencies": {
|
|
34
123
|
"@changesets/cli": "^2.29.8",
|
|
35
124
|
"@emotion/react": "11.11.4",
|
|
@@ -38,6 +127,7 @@
|
|
|
38
127
|
"@guardian/prettier": "10.0.0",
|
|
39
128
|
"@guardian/prosemirror-invisibles": "3.1.1",
|
|
40
129
|
"@guardian/tsconfig": "1.0.1",
|
|
130
|
+
"@material-design-icons/svg": "^0.14.15",
|
|
41
131
|
"@playwright/experimental-ct-react17": "^1.57.0",
|
|
42
132
|
"@rollup/plugin-commonjs": "29.0.0",
|
|
43
133
|
"@rollup/plugin-node-resolve": "16.0.3",
|
|
@@ -66,16 +156,20 @@
|
|
|
66
156
|
"react": "17.0.2",
|
|
67
157
|
"react-aria-components": "1.13.0",
|
|
68
158
|
"react-dom": "17.0.2",
|
|
159
|
+
"remark-gfm": "^4.0.1",
|
|
69
160
|
"rimraf": "6.1.2",
|
|
70
161
|
"rollup": "4.55.3",
|
|
71
162
|
"rollup-plugin-copy": "^3.5.0",
|
|
72
163
|
"rollup-plugin-esbuild": "6.2.1",
|
|
164
|
+
"rollup-plugin-import-css": "^4.2.0",
|
|
73
165
|
"rollup-plugin-node-externals": "8.1.2",
|
|
74
166
|
"storybook": "^10.1.11",
|
|
75
167
|
"style-dictionary": "^5.1.4",
|
|
76
168
|
"ts-jest": "29.4.6",
|
|
77
169
|
"tslib": "2.8.1",
|
|
78
|
-
"typescript": "5.1.3"
|
|
170
|
+
"typescript": "5.1.3",
|
|
171
|
+
"vite": "^7.3.1",
|
|
172
|
+
"vite-plugin-svgr": "^4.5.0"
|
|
79
173
|
},
|
|
80
174
|
"peerDependencies": {
|
|
81
175
|
"@emotion/react": ">=11.11.4 <=11.14.0",
|
|
@@ -92,6 +186,9 @@
|
|
|
92
186
|
"typescript": ">=5.0.0 <=5.9.3"
|
|
93
187
|
},
|
|
94
188
|
"peerDependenciesMeta": {
|
|
189
|
+
"@emotion/react": {
|
|
190
|
+
"optional": true
|
|
191
|
+
},
|
|
95
192
|
"@guardian/prosemirror-invisibles": {
|
|
96
193
|
"optional": true
|
|
97
194
|
},
|
|
@@ -112,6 +209,18 @@
|
|
|
112
209
|
},
|
|
113
210
|
"prosemirror-view": {
|
|
114
211
|
"optional": true
|
|
212
|
+
},
|
|
213
|
+
"react": {
|
|
214
|
+
"optional": true
|
|
215
|
+
},
|
|
216
|
+
"react-aria-components": {
|
|
217
|
+
"optional": true
|
|
218
|
+
},
|
|
219
|
+
"react-dom": {
|
|
220
|
+
"optional": true
|
|
221
|
+
},
|
|
222
|
+
"typescript": {
|
|
223
|
+
"optional": true
|
|
115
224
|
}
|
|
116
225
|
},
|
|
117
226
|
"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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|