@guardian/stand 0.0.9 → 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 +1122 -1
- 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/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/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/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 +16 -4
- package/dist/index.js +6 -0
- package/dist/link-button.cjs +7 -0
- package/dist/link-button.js +1 -0
- package/dist/styleD/build/css/base/colors.css +1 -1
- package/dist/styleD/build/css/base/sizing.css +2 -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/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 +12 -8
- package/dist/styleD/build/css/semantic/sizing.css +1 -0
- package/dist/styleD/build/css/semantic/typography.css +3 -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 +2 -0
- package/dist/styleD/build/typescript/base/sizing.js +2 -0
- 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 +14 -10
- package/dist/styleD/build/typescript/semantic/colors.js +14 -10
- package/dist/styleD/build/typescript/semantic/sizing.cjs +2 -1
- package/dist/styleD/build/typescript/semantic/sizing.js +2 -1
- package/dist/styleD/build/typescript/semantic/typography.cjs +5 -0
- package/dist/styleD/build/typescript/semantic/typography.js +5 -0
- package/dist/types/avatar.d.ts +19 -0
- package/dist/types/button.d.ts +20 -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/schema.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/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 +17 -0
- 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 +2 -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 +7 -3
- package/dist/types/styleD/build/typescript/semantic/sizing.d.ts +1 -0
- package/dist/types/styleD/build/typescript/semantic/typography.d.ts +5 -0
- package/dist/types/typography.d.ts +19 -0
- package/dist/types/user-menu.d.ts +18 -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 +28 -0
- package/dist/types/utils.d.ts +1 -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 +2 -0
- package/dist/utils.js +1 -0
- package/package.json +65 -3
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export declare const TitleText: ({ headingLevel, children, className, }: {
|
|
3
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6 | undefined;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string | undefined;
|
|
6
|
+
}) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SerializedStyles } from '@emotion/react';
|
|
2
|
+
import type { ComponentAvatar } from '../../styleD/build/typescript/component/avatar';
|
|
3
|
+
import type { Prettify } from '../../util/types';
|
|
4
|
+
import type { AvatarProps } from './types';
|
|
5
|
+
export type AvatarTheme = Prettify<ComponentAvatar>;
|
|
6
|
+
export declare const defaultAvatarTheme: AvatarTheme;
|
|
7
|
+
export declare const avatarImageStyles: SerializedStyles;
|
|
8
|
+
export declare const avatarStyles: (theme: AvatarTheme, { size, color }: Required<Pick<AvatarProps, 'size' | 'color'>>) => SerializedStyles;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ComponentAvatar } from '../../styleD/build/typescript/component/avatar';
|
|
2
|
+
import type { DefaultProps } from '../../util/types';
|
|
3
|
+
import type { AvatarTheme } from './styles';
|
|
4
|
+
export type AvatarColors = keyof ComponentAvatar['shared']['color'];
|
|
5
|
+
export declare const avatarColors: AvatarColors[];
|
|
6
|
+
interface AvatarBaseProps extends DefaultProps<AvatarTheme> {
|
|
7
|
+
/**
|
|
8
|
+
* Size variant of the avatar
|
|
9
|
+
*/
|
|
10
|
+
size?: keyof Omit<AvatarTheme, 'shared'>;
|
|
11
|
+
/**
|
|
12
|
+
* Color variant of the avatar
|
|
13
|
+
*/
|
|
14
|
+
color?: AvatarColors;
|
|
15
|
+
}
|
|
16
|
+
interface AvatarWithImage extends AvatarBaseProps {
|
|
17
|
+
/**
|
|
18
|
+
* Image URL for the avatar
|
|
19
|
+
*/
|
|
20
|
+
src: string;
|
|
21
|
+
/**
|
|
22
|
+
* Alternative text for the image (required when src is provided)
|
|
23
|
+
*/
|
|
24
|
+
alt: string;
|
|
25
|
+
/**
|
|
26
|
+
* Initials to display when image fails to load (optional)
|
|
27
|
+
*/
|
|
28
|
+
initials?: string;
|
|
29
|
+
}
|
|
30
|
+
interface AvatarWithInitials extends AvatarBaseProps {
|
|
31
|
+
/**
|
|
32
|
+
* Image URL for the avatar (optional)
|
|
33
|
+
*/
|
|
34
|
+
src?: never;
|
|
35
|
+
/**
|
|
36
|
+
* Alternative text for the image (optional)
|
|
37
|
+
*/
|
|
38
|
+
alt?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Initials to display (required, typically 1-2 characters)
|
|
41
|
+
*/
|
|
42
|
+
initials: string;
|
|
43
|
+
}
|
|
44
|
+
export type AvatarProps = AvatarWithImage | AvatarWithInitials;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SerializedStyles } from '@emotion/react';
|
|
2
|
+
import type { ComponentButton } from '../../styleD/build/typescript/component/button';
|
|
3
|
+
import type { Prettify } from '../../util/types';
|
|
4
|
+
import type { ButtonProps } from './types';
|
|
5
|
+
export type ButtonTheme = Prettify<ComponentButton>;
|
|
6
|
+
export declare const defaultButtonTheme: ButtonTheme;
|
|
7
|
+
export declare const buttonStyles: (theme: ButtonTheme, { size, variant }: Required<Pick<ButtonProps, 'size' | 'variant'>>) => SerializedStyles;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ButtonProps as RACButtonProps } from 'react-aria-components';
|
|
2
|
+
import type { DefaultProps } from '../../util/types';
|
|
3
|
+
import type { ButtonTheme } from './styles';
|
|
4
|
+
export interface ButtonProps extends DefaultProps<ButtonTheme, RACButtonProps['className']>, RACButtonProps {
|
|
5
|
+
/**
|
|
6
|
+
* Size variant of the button
|
|
7
|
+
*/
|
|
8
|
+
size?: keyof Omit<ButtonTheme['emphasised-primary'], 'shared'>;
|
|
9
|
+
/**
|
|
10
|
+
* Variant of the button
|
|
11
|
+
*/
|
|
12
|
+
variant?: keyof Omit<ButtonTheme, 'shared'>;
|
|
13
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Schema } from 'prosemirror-model';
|
|
2
|
-
export declare const bylineEditorSchema: Schema<"
|
|
2
|
+
export declare const bylineEditorSchema: Schema<"text" | "doc" | "chip", any>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentIcon } from '../../styleD/build/typescript/component/icon';
|
|
2
|
+
import type { Prettify } from '../../util/types';
|
|
3
|
+
import type { IconProps } from './types';
|
|
4
|
+
export type IconTheme = Prettify<ComponentIcon>;
|
|
5
|
+
export declare const defaultIconTheme: IconTheme;
|
|
6
|
+
export declare const iconStyles: (theme: IconTheme, { size, fill, mode, }: Required<Pick<IconProps, "size">> & Pick<IconProps, "fill"> & {
|
|
7
|
+
mode: 'text' | 'svg';
|
|
8
|
+
}) => import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { MaterialSymbol } from '../../fonts/material-symbols-types';
|
|
3
|
+
import type { DefaultPropsWithChildren } from '../../util/types';
|
|
4
|
+
import type { IconTheme } from './styles';
|
|
5
|
+
export type { MaterialSymbol } from '../../fonts/material-symbols-types';
|
|
6
|
+
export interface IconProps extends DefaultPropsWithChildren<IconTheme, undefined, MaterialSymbol | Exclude<React.ReactNode, string>> {
|
|
7
|
+
/**
|
|
8
|
+
* Size variant of the icon
|
|
9
|
+
*/
|
|
10
|
+
size?: keyof Omit<IconTheme, 'shared'>;
|
|
11
|
+
/**
|
|
12
|
+
* Fill/color of the icon. Default is to inherit from text color or icon defaults.
|
|
13
|
+
*/
|
|
14
|
+
fill?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Alternative text for the icon, used for accessibility.
|
|
17
|
+
* This must be provided if the icon is not purely decorative, and should describe the meaning or function of the icon.
|
|
18
|
+
*/
|
|
19
|
+
alt?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Alternative to using the `children` prop for rendering Material Symbol icons,
|
|
22
|
+
* you can use the `symbol` prop to specify the icon by its symbol name.
|
|
23
|
+
* This is a convenience for font icons, allowing you to simply provide the symbol name in a type-safe way without needing to pass it as a child string.
|
|
24
|
+
* For example, instead of `<Icon>home</Icon>`, you can use `<Icon symbol="home" />`.
|
|
25
|
+
* This prop is mutually exclusive with `children` when rendering font icons, and takes precedence over `children` if both are provided.
|
|
26
|
+
*/
|
|
27
|
+
symbol?: MaterialSymbol;
|
|
28
|
+
}
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
import type { ButtonTheme } from '../button/styles';
|
|
2
|
+
export type LinkButtonTheme = ButtonTheme;
|
|
3
|
+
export declare const defaultLinkButtonTheme: ButtonTheme;
|
|
4
|
+
export declare const linkButtonStyles: (theme: {
|
|
5
|
+
shared: {
|
|
6
|
+
display: string;
|
|
7
|
+
'-webkit-appearance': string;
|
|
8
|
+
'text-align': string;
|
|
9
|
+
'box-shadow': string;
|
|
10
|
+
cursor: string;
|
|
11
|
+
'justify-content': string;
|
|
12
|
+
'align-items': string;
|
|
13
|
+
'text-decoration': string;
|
|
14
|
+
':disabled': {
|
|
15
|
+
cursor: string;
|
|
16
|
+
};
|
|
17
|
+
':focus-visible': {
|
|
18
|
+
outline: string;
|
|
19
|
+
'outline-offset': string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
'emphasised-primary': {
|
|
23
|
+
shared: {
|
|
24
|
+
color: string;
|
|
25
|
+
backgroundColor: string;
|
|
26
|
+
borderRadius: string;
|
|
27
|
+
border: string;
|
|
28
|
+
':hover': {
|
|
29
|
+
backgroundColor: string;
|
|
30
|
+
border: string;
|
|
31
|
+
};
|
|
32
|
+
':active': {
|
|
33
|
+
backgroundColor: string;
|
|
34
|
+
border: string;
|
|
35
|
+
};
|
|
36
|
+
':disabled': {
|
|
37
|
+
color: string;
|
|
38
|
+
backgroundColor: string;
|
|
39
|
+
border: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
xs: {
|
|
43
|
+
height: string;
|
|
44
|
+
padding: {
|
|
45
|
+
top: string;
|
|
46
|
+
right: string;
|
|
47
|
+
bottom: string;
|
|
48
|
+
left: string;
|
|
49
|
+
};
|
|
50
|
+
typography: {
|
|
51
|
+
font: string;
|
|
52
|
+
letterSpacing: string;
|
|
53
|
+
fontWidth: number;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
sm: {
|
|
57
|
+
height: string;
|
|
58
|
+
padding: {
|
|
59
|
+
top: string;
|
|
60
|
+
right: string;
|
|
61
|
+
bottom: string;
|
|
62
|
+
left: string;
|
|
63
|
+
};
|
|
64
|
+
typography: {
|
|
65
|
+
font: string;
|
|
66
|
+
letterSpacing: string;
|
|
67
|
+
fontWidth: number;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
md: {
|
|
71
|
+
height: string;
|
|
72
|
+
padding: {
|
|
73
|
+
top: string;
|
|
74
|
+
right: string;
|
|
75
|
+
bottom: string;
|
|
76
|
+
left: string;
|
|
77
|
+
};
|
|
78
|
+
typography: {
|
|
79
|
+
font: string;
|
|
80
|
+
letterSpacing: string;
|
|
81
|
+
fontWidth: number;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
lg: {
|
|
85
|
+
height: string;
|
|
86
|
+
padding: {
|
|
87
|
+
top: string;
|
|
88
|
+
right: string;
|
|
89
|
+
bottom: string;
|
|
90
|
+
left: string;
|
|
91
|
+
};
|
|
92
|
+
typography: {
|
|
93
|
+
font: string;
|
|
94
|
+
letterSpacing: string;
|
|
95
|
+
fontWidth: number;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
'emphasised-secondary': {
|
|
100
|
+
shared: {
|
|
101
|
+
color: string;
|
|
102
|
+
backgroundColor: string;
|
|
103
|
+
borderRadius: string;
|
|
104
|
+
border: string;
|
|
105
|
+
':hover': {
|
|
106
|
+
backgroundColor: string;
|
|
107
|
+
border: string;
|
|
108
|
+
};
|
|
109
|
+
':active': {
|
|
110
|
+
backgroundColor: string;
|
|
111
|
+
border: string;
|
|
112
|
+
};
|
|
113
|
+
':disabled': {
|
|
114
|
+
color: string;
|
|
115
|
+
backgroundColor: string;
|
|
116
|
+
border: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
xs: {
|
|
120
|
+
height: string;
|
|
121
|
+
padding: {
|
|
122
|
+
top: string;
|
|
123
|
+
right: string;
|
|
124
|
+
bottom: string;
|
|
125
|
+
left: string;
|
|
126
|
+
};
|
|
127
|
+
typography: {
|
|
128
|
+
font: string;
|
|
129
|
+
letterSpacing: string;
|
|
130
|
+
fontWidth: number;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
sm: {
|
|
134
|
+
height: string;
|
|
135
|
+
padding: {
|
|
136
|
+
top: string;
|
|
137
|
+
right: string;
|
|
138
|
+
bottom: string;
|
|
139
|
+
left: string;
|
|
140
|
+
};
|
|
141
|
+
typography: {
|
|
142
|
+
font: string;
|
|
143
|
+
letterSpacing: string;
|
|
144
|
+
fontWidth: number;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
md: {
|
|
148
|
+
height: string;
|
|
149
|
+
padding: {
|
|
150
|
+
top: string;
|
|
151
|
+
right: string;
|
|
152
|
+
bottom: string;
|
|
153
|
+
left: string;
|
|
154
|
+
};
|
|
155
|
+
typography: {
|
|
156
|
+
font: string;
|
|
157
|
+
letterSpacing: string;
|
|
158
|
+
fontWidth: number;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
lg: {
|
|
162
|
+
height: string;
|
|
163
|
+
padding: {
|
|
164
|
+
top: string;
|
|
165
|
+
right: string;
|
|
166
|
+
bottom: string;
|
|
167
|
+
left: string;
|
|
168
|
+
};
|
|
169
|
+
typography: {
|
|
170
|
+
font: string;
|
|
171
|
+
letterSpacing: string;
|
|
172
|
+
fontWidth: number;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
'neutral-primary': {
|
|
177
|
+
shared: {
|
|
178
|
+
color: string;
|
|
179
|
+
backgroundColor: string;
|
|
180
|
+
borderRadius: string;
|
|
181
|
+
border: string;
|
|
182
|
+
':hover': {
|
|
183
|
+
backgroundColor: string;
|
|
184
|
+
border: string;
|
|
185
|
+
};
|
|
186
|
+
':active': {
|
|
187
|
+
backgroundColor: string;
|
|
188
|
+
border: string;
|
|
189
|
+
};
|
|
190
|
+
':disabled': {
|
|
191
|
+
color: string;
|
|
192
|
+
backgroundColor: string;
|
|
193
|
+
border: string;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
xs: {
|
|
197
|
+
height: string;
|
|
198
|
+
padding: {
|
|
199
|
+
top: string;
|
|
200
|
+
right: string;
|
|
201
|
+
bottom: string;
|
|
202
|
+
left: string;
|
|
203
|
+
};
|
|
204
|
+
typography: {
|
|
205
|
+
font: string;
|
|
206
|
+
letterSpacing: string;
|
|
207
|
+
fontWidth: number;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
sm: {
|
|
211
|
+
height: string;
|
|
212
|
+
padding: {
|
|
213
|
+
top: string;
|
|
214
|
+
right: string;
|
|
215
|
+
bottom: string;
|
|
216
|
+
left: string;
|
|
217
|
+
};
|
|
218
|
+
typography: {
|
|
219
|
+
font: string;
|
|
220
|
+
letterSpacing: string;
|
|
221
|
+
fontWidth: number;
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
md: {
|
|
225
|
+
height: string;
|
|
226
|
+
padding: {
|
|
227
|
+
top: string;
|
|
228
|
+
right: string;
|
|
229
|
+
bottom: string;
|
|
230
|
+
left: string;
|
|
231
|
+
};
|
|
232
|
+
typography: {
|
|
233
|
+
font: string;
|
|
234
|
+
letterSpacing: string;
|
|
235
|
+
fontWidth: number;
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
lg: {
|
|
239
|
+
height: string;
|
|
240
|
+
padding: {
|
|
241
|
+
top: string;
|
|
242
|
+
right: string;
|
|
243
|
+
bottom: string;
|
|
244
|
+
left: string;
|
|
245
|
+
};
|
|
246
|
+
typography: {
|
|
247
|
+
font: string;
|
|
248
|
+
letterSpacing: string;
|
|
249
|
+
fontWidth: number;
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
'neutral-secondary': {
|
|
254
|
+
shared: {
|
|
255
|
+
color: string;
|
|
256
|
+
backgroundColor: string;
|
|
257
|
+
borderRadius: string;
|
|
258
|
+
border: string;
|
|
259
|
+
':hover': {
|
|
260
|
+
backgroundColor: string;
|
|
261
|
+
border: string;
|
|
262
|
+
};
|
|
263
|
+
':active': {
|
|
264
|
+
backgroundColor: string;
|
|
265
|
+
border: string;
|
|
266
|
+
};
|
|
267
|
+
':disabled': {
|
|
268
|
+
color: string;
|
|
269
|
+
backgroundColor: string;
|
|
270
|
+
border: string;
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
xs: {
|
|
274
|
+
height: string;
|
|
275
|
+
padding: {
|
|
276
|
+
top: string;
|
|
277
|
+
right: string;
|
|
278
|
+
bottom: string;
|
|
279
|
+
left: string;
|
|
280
|
+
};
|
|
281
|
+
typography: {
|
|
282
|
+
font: string;
|
|
283
|
+
letterSpacing: string;
|
|
284
|
+
fontWidth: number;
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
sm: {
|
|
288
|
+
height: string;
|
|
289
|
+
padding: {
|
|
290
|
+
top: string;
|
|
291
|
+
right: string;
|
|
292
|
+
bottom: string;
|
|
293
|
+
left: string;
|
|
294
|
+
};
|
|
295
|
+
typography: {
|
|
296
|
+
font: string;
|
|
297
|
+
letterSpacing: string;
|
|
298
|
+
fontWidth: number;
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
md: {
|
|
302
|
+
height: string;
|
|
303
|
+
padding: {
|
|
304
|
+
top: string;
|
|
305
|
+
right: string;
|
|
306
|
+
bottom: string;
|
|
307
|
+
left: string;
|
|
308
|
+
};
|
|
309
|
+
typography: {
|
|
310
|
+
font: string;
|
|
311
|
+
letterSpacing: string;
|
|
312
|
+
fontWidth: number;
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
lg: {
|
|
316
|
+
height: string;
|
|
317
|
+
padding: {
|
|
318
|
+
top: string;
|
|
319
|
+
right: string;
|
|
320
|
+
bottom: string;
|
|
321
|
+
left: string;
|
|
322
|
+
};
|
|
323
|
+
typography: {
|
|
324
|
+
font: string;
|
|
325
|
+
letterSpacing: string;
|
|
326
|
+
fontWidth: number;
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
}, { size, variant }: Required<Pick<import("../button/types").ButtonProps, "size" | "variant">>) => import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { LinkProps as RACLinkProps } from 'react-aria-components';
|
|
2
|
+
import type { DefaultProps } from '../../util/types';
|
|
3
|
+
import type { LinkButtonTheme } from './styles';
|
|
4
|
+
export interface LinkButtonProps extends DefaultProps<LinkButtonTheme, RACLinkProps['className']>, RACLinkProps {
|
|
5
|
+
/**
|
|
6
|
+
* Size variant of the link button
|
|
7
|
+
*/
|
|
8
|
+
size?: keyof Omit<LinkButtonTheme['emphasised-primary'], 'shared'>;
|
|
9
|
+
/**
|
|
10
|
+
* Variant of the button
|
|
11
|
+
*/
|
|
12
|
+
variant?: keyof Omit<LinkButtonTheme, 'shared'>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { TypographyProps } from './types';
|
|
3
|
+
export declare const Typography: ({ element, variant, children, cssOverrides, theme, ...props }: TypographyProps) => import("react").DetailedReactHTMLElement<{
|
|
4
|
+
className?: string | undefined;
|
|
5
|
+
css: (import("@emotion/react").SerializedStyles | import("@emotion/react").SerializedStyles[] | undefined)[];
|
|
6
|
+
}, HTMLElement>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SerializedStyles } from '@emotion/react';
|
|
2
|
+
import { type ComponentTypography } from '../../styleD/build/typescript/component/typography';
|
|
3
|
+
import type { Prettify } from '../../util/types';
|
|
4
|
+
import type { TypographyProps } from './types';
|
|
5
|
+
export type TypographyTheme = Prettify<ComponentTypography>;
|
|
6
|
+
export declare const defaultTypographyTheme: TypographyTheme;
|
|
7
|
+
export declare const typographyStyles: (theme: TypographyTheme, { variant }: Required<Pick<TypographyProps, 'variant'>>) => SerializedStyles;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SemanticTypography } from '../..';
|
|
2
|
+
import type { DefaultPropsWithChildren } from '../../util/types';
|
|
3
|
+
import type { TypographyTheme } from './styles';
|
|
4
|
+
export interface TypographyProps extends DefaultPropsWithChildren<TypographyTheme> {
|
|
5
|
+
/**
|
|
6
|
+
* HTML element to render with font applied to
|
|
7
|
+
*/
|
|
8
|
+
element?: 'div' | 'span' | 'p' | 'b' | 'i' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
9
|
+
/**
|
|
10
|
+
* Font variant to apply as a CSS style to the element
|
|
11
|
+
*/
|
|
12
|
+
variant?: keyof SemanticTypography;
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ComponentUserMenu } from '../../styleD/build/typescript/component/userMenu';
|
|
2
|
+
import type { DeepPartial } from '../../util/types';
|
|
3
|
+
import type { Option } from './model';
|
|
4
|
+
interface PreferenceRadioGroupProps {
|
|
5
|
+
theme?: DeepPartial<ComponentUserMenu>;
|
|
6
|
+
options: Option[];
|
|
7
|
+
name: string;
|
|
8
|
+
currentValue?: string;
|
|
9
|
+
changeValue: {
|
|
10
|
+
(value: string): void;
|
|
11
|
+
};
|
|
12
|
+
format?: 'stack' | 'rows';
|
|
13
|
+
}
|
|
14
|
+
export declare function PreferenceRadioGroup({ name, options, currentValue, changeValue, theme, format, }: PreferenceRadioGroupProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ComponentUserMenu } from '../../styleD/build/typescript/component/userMenu';
|
|
2
|
+
import type { DeepPartial } from '../../util/types';
|
|
3
|
+
import type { Option } from './model';
|
|
4
|
+
import type { UserPreferences } from './types';
|
|
5
|
+
export interface UserMenuProps {
|
|
6
|
+
theme?: DeepPartial<ComponentUserMenu>;
|
|
7
|
+
feedBacklink?: string;
|
|
8
|
+
preferences: UserPreferences;
|
|
9
|
+
updatePreferences: {
|
|
10
|
+
(mod: Partial<UserPreferences>): void;
|
|
11
|
+
};
|
|
12
|
+
textSizeOptions?: Option[];
|
|
13
|
+
fontFamilyOptions?: Option[];
|
|
14
|
+
colorSchemeOptions?: Option[];
|
|
15
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
16
|
+
}
|
|
17
|
+
export declare function UserMenu({ theme, feedBacklink, preferences, updatePreferences, textSizeOptions, fontFamilyOptions, colorSchemeOptions, headingLevel, }: UserMenuProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SerializedStyles } from '@emotion/react';
|
|
2
|
+
import type { ComponentUserMenu } from '../../styleD/build/typescript/component/userMenu';
|
|
3
|
+
import type { DeepPartial } from '../../util/types';
|
|
4
|
+
export declare const userMenuStyles: (partialTheme?: DeepPartial<ComponentUserMenu>) => SerializedStyles;
|
|
5
|
+
export declare const userMenuHeadingStyles: (partialTheme?: DeepPartial<ComponentUserMenu>) => SerializedStyles;
|
|
6
|
+
export declare const toggleButtonStackedGroupStyles: (partialTheme?: DeepPartial<ComponentUserMenu>) => SerializedStyles;
|
|
7
|
+
export declare const radioGroupLabelStyles: (partialTheme?: DeepPartial<ComponentUserMenu>) => SerializedStyles;
|
|
8
|
+
export declare const toggleButtonRowsGroupStyles: (partialTheme?: DeepPartial<ComponentUserMenu>) => SerializedStyles;
|
|
9
|
+
export declare const toggleButtonStyles: (partialTheme?: DeepPartial<ComponentUserMenu>) => SerializedStyles;
|