@guardian/stand 0.0.12 → 0.0.14
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 +110 -1746
- package/dist/components/avatar/Avatar.js +1 -1
- package/dist/components/byline/Byline.js +1 -1
- package/dist/components/favicon/Favicon.cjs +47 -0
- package/dist/components/favicon/Favicon.js +30 -0
- package/dist/components/favicon/styles.cjs +34 -0
- package/dist/components/favicon/styles.js +29 -0
- package/dist/components/tag-picker/TagAutocomplete.js +1 -1
- package/dist/components/tag-picker/TagTable.js +1 -1
- package/dist/components/user-menu/UserMenu.js +1 -1
- package/dist/favicon.cjs +9 -0
- package/dist/favicon.js +2 -0
- package/dist/index.cjs +6 -6
- package/dist/index.js +1 -1
- package/dist/styleD/build/css/component/favicon.css +17 -0
- package/dist/styleD/build/typescript/component/favicon.cjs +20 -0
- package/dist/styleD/build/typescript/component/favicon.js +18 -0
- package/dist/types/components/favicon/Favicon.d.ts +2 -0
- package/dist/types/components/favicon/styles.d.ts +8 -0
- package/dist/types/components/favicon/types.d.ts +38 -0
- package/dist/types/favicon.d.ts +19 -0
- package/dist/types/index.d.ts +2 -4
- package/dist/types/styleD/build/typescript/component/favicon.d.ts +20 -0
- package/package.json +26 -16
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, Fragment } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { mergeDeep } from '../../util/mergeDeep.js';
|
|
4
|
-
import {
|
|
4
|
+
import { avatarImageStyles, avatarStyles, defaultAvatarTheme } from './styles.js';
|
|
5
5
|
import { avatarColors } from './types.js';
|
|
6
6
|
|
|
7
7
|
const getColorFromString = (input) => {
|
|
@@ -10,7 +10,7 @@ import { createPlaceholderPlugin } from './placeholder.js';
|
|
|
10
10
|
import { clipboardPlugin, keybindings, bylinePlugin } from './plugins.js';
|
|
11
11
|
import { Preview } from './Preview.js';
|
|
12
12
|
import { bylineEditorSchema } from './schema.js';
|
|
13
|
-
import { bylineContainerStyles, bylineEditorStyles,
|
|
13
|
+
import { bylineContainerStyles, bylineEditorStyles, dropdownUlStyles, dropdownLiStyles, selectedDropdownLiStyles, dropdownContainerStyles } from './styles.js';
|
|
14
14
|
|
|
15
15
|
const Byline = ({ theme, allowUntaggedContributors, contributorLimit, enablePreview, placeholder, initialValue, readOnly, handleSave, searchContributors, onBlur }) => {
|
|
16
16
|
const editorRef = useRef(null);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var mergeDeep = require('../../util/mergeDeep.cjs');
|
|
6
|
+
var Icon = require('../icon/Icon.cjs');
|
|
7
|
+
var styles = require('./styles.cjs');
|
|
8
|
+
|
|
9
|
+
const Favicon = (props) => {
|
|
10
|
+
const mergedTheme = mergeDeep.mergeDeep(styles.defaultFaviconTheme, props.theme ?? {});
|
|
11
|
+
const [imageError, setImageError] = react.useState(false);
|
|
12
|
+
const handleImageError = () => {
|
|
13
|
+
setImageError(true);
|
|
14
|
+
};
|
|
15
|
+
const displayLetter = props.letter?.slice(0, 1).toUpperCase() ?? "";
|
|
16
|
+
if ("src" in props && !imageError) {
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { css: [styles.faviconStyles(mergedTheme), props.cssOverrides], children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18
|
+
"img",
|
|
19
|
+
{
|
|
20
|
+
src: props.src,
|
|
21
|
+
alt: props.alt,
|
|
22
|
+
title: props.alt,
|
|
23
|
+
onError: handleImageError,
|
|
24
|
+
css: styles.faviconImageStyles
|
|
25
|
+
}
|
|
26
|
+
) });
|
|
27
|
+
}
|
|
28
|
+
if ("letter" in props || imageError) {
|
|
29
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
css: [
|
|
33
|
+
styles.faviconStyles(mergedTheme),
|
|
34
|
+
styles.faviconTypographyStyles(mergedTheme),
|
|
35
|
+
props.cssOverrides
|
|
36
|
+
],
|
|
37
|
+
children: displayLetter
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
if ("icon" in props) {
|
|
42
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { css: [styles.faviconStyles(mergedTheme), props.cssOverrides], children: /* @__PURE__ */ jsxRuntime.jsx(Icon.Icon, { fill: mergedTheme.color.text, children: props.icon }) });
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
exports.Favicon = Favicon;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { mergeDeep } from '../../util/mergeDeep.js';
|
|
4
|
+
import { Icon } from '../icon/Icon.js';
|
|
5
|
+
import { defaultFaviconTheme, faviconImageStyles, faviconStyles, faviconTypographyStyles } from './styles.js';
|
|
6
|
+
|
|
7
|
+
const Favicon = (props) => {
|
|
8
|
+
const mergedTheme = mergeDeep(defaultFaviconTheme, props.theme ?? {});
|
|
9
|
+
const [imageError, setImageError] = useState(false);
|
|
10
|
+
const handleImageError = () => {
|
|
11
|
+
setImageError(true);
|
|
12
|
+
};
|
|
13
|
+
const displayLetter = props.letter?.slice(0, 1).toUpperCase() ?? "";
|
|
14
|
+
if ("src" in props && !imageError) {
|
|
15
|
+
return jsx("div", { css: [faviconStyles(mergedTheme), props.cssOverrides], children: jsx("img", { src: props.src, alt: props.alt, title: props.alt, onError: handleImageError, css: faviconImageStyles }) });
|
|
16
|
+
}
|
|
17
|
+
if ("letter" in props || imageError) {
|
|
18
|
+
return jsx("div", { css: [
|
|
19
|
+
faviconStyles(mergedTheme),
|
|
20
|
+
faviconTypographyStyles(mergedTheme),
|
|
21
|
+
props.cssOverrides
|
|
22
|
+
], children: displayLetter });
|
|
23
|
+
}
|
|
24
|
+
if ("icon" in props) {
|
|
25
|
+
return jsx("div", { css: [faviconStyles(mergedTheme), props.cssOverrides], children: jsx(Icon, { fill: mergedTheme.color.text, children: props.icon }) });
|
|
26
|
+
}
|
|
27
|
+
return null;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { Favicon };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var react = require('@emotion/react');
|
|
4
|
+
var favicon = require('../../styleD/build/typescript/component/favicon.cjs');
|
|
5
|
+
var typography = require('../../styleD/utils/semantic/typography.cjs');
|
|
6
|
+
|
|
7
|
+
const defaultFaviconTheme = favicon.componentFavicon;
|
|
8
|
+
const faviconStyles = (theme) => {
|
|
9
|
+
return react.css`
|
|
10
|
+
background-color: ${theme.color.background};
|
|
11
|
+
display: ${theme.display};
|
|
12
|
+
align-items: ${theme["align-items"]};
|
|
13
|
+
justify-content: ${theme["justify-content"]};
|
|
14
|
+
width: ${theme.size};
|
|
15
|
+
height: ${theme.size};
|
|
16
|
+
user-select: ${theme["user-select"]};
|
|
17
|
+
`;
|
|
18
|
+
};
|
|
19
|
+
const faviconTypographyStyles = (theme) => {
|
|
20
|
+
return react.css`
|
|
21
|
+
color: ${theme.color.text};
|
|
22
|
+
${typography.convertTypographyToEmotionStringStyle(theme.typography)}
|
|
23
|
+
`;
|
|
24
|
+
};
|
|
25
|
+
const faviconImageStyles = react.css`
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 100%;
|
|
28
|
+
object-fit: cover;
|
|
29
|
+
`;
|
|
30
|
+
|
|
31
|
+
exports.defaultFaviconTheme = defaultFaviconTheme;
|
|
32
|
+
exports.faviconImageStyles = faviconImageStyles;
|
|
33
|
+
exports.faviconStyles = faviconStyles;
|
|
34
|
+
exports.faviconTypographyStyles = faviconTypographyStyles;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
|
+
import { componentFavicon } from '../../styleD/build/typescript/component/favicon.js';
|
|
3
|
+
import { convertTypographyToEmotionStringStyle } from '../../styleD/utils/semantic/typography.js';
|
|
4
|
+
|
|
5
|
+
const defaultFaviconTheme = componentFavicon;
|
|
6
|
+
const faviconStyles = (theme) => {
|
|
7
|
+
return css`
|
|
8
|
+
background-color: ${theme.color.background};
|
|
9
|
+
display: ${theme.display};
|
|
10
|
+
align-items: ${theme["align-items"]};
|
|
11
|
+
justify-content: ${theme["justify-content"]};
|
|
12
|
+
width: ${theme.size};
|
|
13
|
+
height: ${theme.size};
|
|
14
|
+
user-select: ${theme["user-select"]};
|
|
15
|
+
`;
|
|
16
|
+
};
|
|
17
|
+
const faviconTypographyStyles = (theme) => {
|
|
18
|
+
return css`
|
|
19
|
+
color: ${theme.color.text};
|
|
20
|
+
${convertTypographyToEmotionStringStyle(theme.typography)}
|
|
21
|
+
`;
|
|
22
|
+
};
|
|
23
|
+
const faviconImageStyles = css`
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
object-fit: cover;
|
|
27
|
+
`;
|
|
28
|
+
|
|
29
|
+
export { defaultFaviconTheme, faviconImageStyles, faviconStyles, faviconTypographyStyles };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { ComboBox, Input, Popover, ListBox, Collection, ListBoxItem, ListBoxLoadMoreItem } from 'react-aria-components';
|
|
4
|
-
import { tagAutocompleteInputStyles,
|
|
4
|
+
import { tagAutocompleteInputStyles, listboxItemStyles, listboxInfoStyles, listboxStyles } from './styles.js';
|
|
5
5
|
|
|
6
6
|
function TagAutocomplete({ addTag, loading, onChange, options, label, placeholder, disabled, value, "data-testid": dataTestId, loadingIcon, theme, cssOverrides }) {
|
|
7
7
|
return jsx("div", { css: [
|
|
@@ -2,7 +2,7 @@ import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { useState, useRef, useEffect } from 'react';
|
|
4
4
|
import { useDragAndDrop, Table, TableHeader, Column, TableBody, Row, Cell, Button } from 'react-aria-components';
|
|
5
|
-
import { tagTableHeadingStyles,
|
|
5
|
+
import { tagTableHeadingStyles, tagTableDragButtonStyles, tagTableCellStyles, tagTableRemoveButtonStyles, tagTableAddButtonStyles, tagTableRowStyles, tagTableStyles, tagTableTypeBadgeStyles } from './styles.js';
|
|
6
6
|
|
|
7
7
|
const rowToTag = (row) => "tag" in row ? row.tag : row;
|
|
8
8
|
const TypeBadge = (type, theme) => {
|
|
@@ -2,7 +2,7 @@ import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
|
2
2
|
import { TitleText } from '../TitleText.js';
|
|
3
3
|
import { textSizes, fontFamilies, colorSchemes } from './default-options.js';
|
|
4
4
|
import { PreferenceRadioGroup } from './PreferenceRadioGroup.js';
|
|
5
|
-
import {
|
|
5
|
+
import { userMenuHeadingStyles, userMenuStyles } from './styles.js';
|
|
6
6
|
|
|
7
7
|
function UserMenu({ theme, feedBacklink, preferences, updatePreferences, textSizeOptions, fontFamilyOptions, colorSchemeOptions, headingLevel }) {
|
|
8
8
|
return jsxs("aside", { css: userMenuStyles(theme), children: [jsx(TitleText, { headingLevel, css: userMenuHeadingStyles(theme), children: "Accessibility Settings" }), jsx("div", { children: jsxs("p", { children: ["Customise your reading & writing experience.", " ", feedBacklink && jsx("a", { href: feedBacklink, target: "_blank", rel: "noreferrer", children: "Send feedback" })] }) }), (!textSizeOptions || textSizeOptions.length > 0) && jsx(PreferenceRadioGroup, { theme, options: textSizeOptions ?? textSizes, name: "Text Size", currentValue: preferences.fontpreferences, changeValue: (fontpreferences) => updatePreferences({ fontpreferences }) }), (!fontFamilyOptions || fontFamilyOptions.length > 0) && jsx(PreferenceRadioGroup, { theme, options: fontFamilyOptions ?? fontFamilies, name: "Font Family", currentValue: preferences.fontType, changeValue: (fontType) => updatePreferences({ fontType }) }), (!colorSchemeOptions || colorSchemeOptions.length > 0) && jsx(PreferenceRadioGroup, { theme, format: "rows", options: colorSchemeOptions ?? colorSchemes, name: "Color scheme", currentValue: preferences.colorScheme, changeValue: (colorScheme) => updatePreferences({ colorScheme }) })] });
|
package/dist/favicon.cjs
ADDED
package/dist/favicon.js
ADDED
package/dist/index.cjs
CHANGED
|
@@ -6,17 +6,17 @@ var tagTable = require('./styleD/build/typescript/component/tagTable.cjs');
|
|
|
6
6
|
var userMenu = require('./styleD/build/typescript/component/userMenu.cjs');
|
|
7
7
|
var avatar = require('./styleD/build/typescript/component/avatar.cjs');
|
|
8
8
|
var button = require('./styleD/build/typescript/component/button.cjs');
|
|
9
|
-
var typography = require('./styleD/build/typescript/component/typography.cjs');
|
|
9
|
+
var typography$1 = require('./styleD/build/typescript/component/typography.cjs');
|
|
10
10
|
var icon = require('./styleD/build/typescript/component/icon.cjs');
|
|
11
|
+
var favicon = require('./styleD/build/typescript/component/favicon.cjs');
|
|
11
12
|
var colors = require('./styleD/build/typescript/base/colors.cjs');
|
|
12
|
-
var typography
|
|
13
|
+
var typography = require('./styleD/build/typescript/base/typography.cjs');
|
|
13
14
|
var spacing = require('./styleD/build/typescript/base/spacing.cjs');
|
|
14
15
|
var sizing = require('./styleD/build/typescript/base/sizing.cjs');
|
|
15
16
|
var radius = require('./styleD/build/typescript/base/radius.cjs');
|
|
16
17
|
var colors$1 = require('./styleD/build/typescript/semantic/colors.cjs');
|
|
17
18
|
var typography$2 = require('./styleD/build/typescript/semantic/typography.cjs');
|
|
18
19
|
var sizing$1 = require('./styleD/build/typescript/semantic/sizing.cjs');
|
|
19
|
-
var reset = require('./util/reset.css.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
@@ -26,14 +26,14 @@ exports.componentTagTable = tagTable.componentTagTable;
|
|
|
26
26
|
exports.componentUserMenu = userMenu.componentUserMenu;
|
|
27
27
|
exports.componentAvatar = avatar.componentAvatar;
|
|
28
28
|
exports.componentButton = button.componentButton;
|
|
29
|
-
exports.componentTypography = typography.componentTypography;
|
|
29
|
+
exports.componentTypography = typography$1.componentTypography;
|
|
30
30
|
exports.componentIcon = icon.componentIcon;
|
|
31
|
+
exports.componentFavicon = favicon.componentFavicon;
|
|
31
32
|
exports.baseColors = colors.baseColors;
|
|
32
|
-
exports.baseTypography = typography
|
|
33
|
+
exports.baseTypography = typography.baseTypography;
|
|
33
34
|
exports.baseSpacing = spacing.baseSpacing;
|
|
34
35
|
exports.baseSizing = sizing.baseSizing;
|
|
35
36
|
exports.baseRadius = radius.baseRadius;
|
|
36
37
|
exports.semanticColors = colors$1.semanticColors;
|
|
37
38
|
exports.semanticTypography = typography$2.semanticTypography;
|
|
38
39
|
exports.semanticSizing = sizing$1.semanticSizing;
|
|
39
|
-
exports.GlobalResetStyles = reset;
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export { componentAvatar } from './styleD/build/typescript/component/avatar.js';
|
|
|
6
6
|
export { componentButton } from './styleD/build/typescript/component/button.js';
|
|
7
7
|
export { componentTypography } from './styleD/build/typescript/component/typography.js';
|
|
8
8
|
export { componentIcon } from './styleD/build/typescript/component/icon.js';
|
|
9
|
+
export { componentFavicon } from './styleD/build/typescript/component/favicon.js';
|
|
9
10
|
export { baseColors } from './styleD/build/typescript/base/colors.js';
|
|
10
11
|
export { baseTypography } from './styleD/build/typescript/base/typography.js';
|
|
11
12
|
export { baseSpacing } from './styleD/build/typescript/base/spacing.js';
|
|
@@ -14,4 +15,3 @@ export { baseRadius } from './styleD/build/typescript/base/radius.js';
|
|
|
14
15
|
export { semanticColors } from './styleD/build/typescript/semantic/colors.js';
|
|
15
16
|
export { semanticTypography } from './styleD/build/typescript/semantic/typography.js';
|
|
16
17
|
export { semanticSizing } from './styleD/build/typescript/semantic/sizing.js';
|
|
17
|
-
export { default as GlobalResetStyles } from './util/reset.css.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
--component-favicon-color-background: #00496c;
|
|
7
|
+
--component-favicon-color-text: #ffffff;
|
|
8
|
+
--component-favicon-size: 2rem;
|
|
9
|
+
--component-favicon-display: inline-flex;
|
|
10
|
+
--component-favicon-align-items: center;
|
|
11
|
+
--component-favicon-justify-content: center;
|
|
12
|
+
--component-favicon-user-select: none;
|
|
13
|
+
--component-favicon-typography-font: normal 700 1.25rem/1.15
|
|
14
|
+
'GH Guardian Headline';
|
|
15
|
+
--component-favicon-typography-letter-spacing: 0rem;
|
|
16
|
+
--component-favicon-typography-font-width: 100;
|
|
17
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const componentFavicon = {
|
|
4
|
+
color: {
|
|
5
|
+
background: "#00496c",
|
|
6
|
+
text: "#ffffff"
|
|
7
|
+
},
|
|
8
|
+
size: "2rem",
|
|
9
|
+
display: "inline-flex",
|
|
10
|
+
"align-items": "center",
|
|
11
|
+
"justify-content": "center",
|
|
12
|
+
"user-select": "none",
|
|
13
|
+
typography: {
|
|
14
|
+
font: "normal 700 1.25rem/1.15 GH Guardian Headline",
|
|
15
|
+
letterSpacing: "0rem",
|
|
16
|
+
fontWidth: 100
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.componentFavicon = componentFavicon;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const componentFavicon = {
|
|
2
|
+
color: {
|
|
3
|
+
background: "#00496c",
|
|
4
|
+
text: "#ffffff"
|
|
5
|
+
},
|
|
6
|
+
size: "2rem",
|
|
7
|
+
display: "inline-flex",
|
|
8
|
+
"align-items": "center",
|
|
9
|
+
"justify-content": "center",
|
|
10
|
+
"user-select": "none",
|
|
11
|
+
typography: {
|
|
12
|
+
font: "normal 700 1.25rem/1.15 GH Guardian Headline",
|
|
13
|
+
letterSpacing: "0rem",
|
|
14
|
+
fontWidth: 100
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { componentFavicon };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SerializedStyles } from '@emotion/react';
|
|
2
|
+
import { type ComponentFavicon } from '../../styleD/build/typescript/component/favicon';
|
|
3
|
+
import type { Prettify } from '../../util/types';
|
|
4
|
+
export type FaviconTheme = Prettify<ComponentFavicon>;
|
|
5
|
+
export declare const defaultFaviconTheme: FaviconTheme;
|
|
6
|
+
export declare const faviconStyles: (theme: FaviconTheme) => SerializedStyles;
|
|
7
|
+
export declare const faviconTypographyStyles: (theme: FaviconTheme) => SerializedStyles;
|
|
8
|
+
export declare const faviconImageStyles: SerializedStyles;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { DefaultProps } from '../../util/types';
|
|
2
|
+
import type { IconProps } from '../icon/types';
|
|
3
|
+
import type { FaviconTheme } from './styles';
|
|
4
|
+
interface FaviconWithLetter extends DefaultProps<FaviconTheme> {
|
|
5
|
+
/**
|
|
6
|
+
* Letter to render in the favicon
|
|
7
|
+
*/
|
|
8
|
+
letter: string;
|
|
9
|
+
icon?: never;
|
|
10
|
+
src?: never;
|
|
11
|
+
alt?: never;
|
|
12
|
+
}
|
|
13
|
+
interface FaviconWithIcon extends DefaultProps<FaviconTheme> {
|
|
14
|
+
/**
|
|
15
|
+
* Icon to display in the favicon
|
|
16
|
+
*/
|
|
17
|
+
icon: IconProps['symbol'] | Exclude<IconProps['children'], string>;
|
|
18
|
+
letter?: never;
|
|
19
|
+
src?: never;
|
|
20
|
+
alt?: never;
|
|
21
|
+
}
|
|
22
|
+
interface FaviconWithImage extends DefaultProps<FaviconTheme> {
|
|
23
|
+
/**
|
|
24
|
+
* Image URL for the favicon
|
|
25
|
+
*/
|
|
26
|
+
src: string;
|
|
27
|
+
/**
|
|
28
|
+
* Alternative text for the image (required when src is provided)
|
|
29
|
+
*/
|
|
30
|
+
alt: string;
|
|
31
|
+
/**
|
|
32
|
+
* Letter to display when image fails to load (optional)
|
|
33
|
+
*/
|
|
34
|
+
letter?: string;
|
|
35
|
+
icon?: never;
|
|
36
|
+
}
|
|
37
|
+
export type FaviconProps = FaviconWithLetter | FaviconWithIcon | FaviconWithImage;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Favicon 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/favicon.css),
|
|
13
|
+
* you don't need to install these.
|
|
14
|
+
*/
|
|
15
|
+
export { Favicon } from './components/favicon/Favicon';
|
|
16
|
+
export type { FaviconProps } from './components/favicon/types';
|
|
17
|
+
export type { FaviconTheme } from './components/favicon/styles';
|
|
18
|
+
export { componentFavicon } from './styleD/build/typescript/component/favicon';
|
|
19
|
+
export type { ComponentFavicon } from './styleD/build/typescript/component/favicon';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ export { componentTypography } from './styleD/build/typescript/component/typogra
|
|
|
24
24
|
export type { ComponentTypography } from './styleD/build/typescript/component/typography';
|
|
25
25
|
export { componentIcon } from './styleD/build/typescript/component/icon';
|
|
26
26
|
export type { ComponentIcon } from './styleD/build/typescript/component/icon';
|
|
27
|
+
export { componentFavicon } from './styleD/build/typescript/component/favicon';
|
|
28
|
+
export type { ComponentFavicon } from './styleD/build/typescript/component/favicon';
|
|
27
29
|
/**
|
|
28
30
|
* style dictionary exports - base
|
|
29
31
|
*/
|
|
@@ -46,7 +48,3 @@ export { semanticTypography } from './styleD/build/typescript/semantic/typograph
|
|
|
46
48
|
export type { SemanticTypography } from './styleD/build/typescript/semantic/typography';
|
|
47
49
|
export { semanticSizing } from './styleD/build/typescript/semantic/sizing';
|
|
48
50
|
export type { SemanticSizing } from './styleD/build/typescript/semantic/sizing';
|
|
49
|
-
/**
|
|
50
|
-
* utils exports
|
|
51
|
-
*/
|
|
52
|
-
export { default as GlobalResetStyles } from './util/reset.css?inline';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
export declare const componentFavicon: {
|
|
5
|
+
color: {
|
|
6
|
+
background: string;
|
|
7
|
+
text: string;
|
|
8
|
+
};
|
|
9
|
+
size: string;
|
|
10
|
+
display: string;
|
|
11
|
+
'align-items': string;
|
|
12
|
+
'justify-content': string;
|
|
13
|
+
'user-select': string;
|
|
14
|
+
typography: {
|
|
15
|
+
font: string;
|
|
16
|
+
letterSpacing: string;
|
|
17
|
+
fontWidth: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export type ComponentFavicon = typeof componentFavicon;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guardian/stand",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"type": "module",
|
|
5
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.",
|
|
6
6
|
"exports": {
|
|
@@ -44,6 +44,11 @@
|
|
|
44
44
|
"import": "./dist/icon.js",
|
|
45
45
|
"require": "./dist/icon.cjs"
|
|
46
46
|
},
|
|
47
|
+
"./favicon": {
|
|
48
|
+
"types": "./dist/types/favicon.d.ts",
|
|
49
|
+
"import": "./dist/favicon.js",
|
|
50
|
+
"require": "./dist/favicon.cjs"
|
|
51
|
+
},
|
|
47
52
|
"./byline": {
|
|
48
53
|
"types": "./dist/types/byline.d.ts",
|
|
49
54
|
"import": "./dist/byline.js",
|
|
@@ -84,7 +89,8 @@
|
|
|
84
89
|
"./component/avatar.css": "./dist/styleD/build/css/component/avatar.css",
|
|
85
90
|
"./component/button.css": "./dist/styleD/build/css/component/button.css",
|
|
86
91
|
"./component/typography.css": "./dist/styleD/build/css/component/typography.css",
|
|
87
|
-
"./component/icon.css": "./dist/styleD/build/css/component/icon.css"
|
|
92
|
+
"./component/icon.css": "./dist/styleD/build/css/component/icon.css",
|
|
93
|
+
"./component/favicon.css": "./dist/styleD/build/css/component/favicon.css"
|
|
88
94
|
},
|
|
89
95
|
"//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.",
|
|
90
96
|
"typesVersions": {
|
|
@@ -110,6 +116,9 @@
|
|
|
110
116
|
"icon": [
|
|
111
117
|
"./dist/types/icon.d.ts"
|
|
112
118
|
],
|
|
119
|
+
"favicon": [
|
|
120
|
+
"./dist/types/favicon.d.ts"
|
|
121
|
+
],
|
|
113
122
|
"byline": [
|
|
114
123
|
"./dist/types/byline.d.ts"
|
|
115
124
|
],
|
|
@@ -137,19 +146,19 @@
|
|
|
137
146
|
"devDependencies": {
|
|
138
147
|
"@changesets/cli": "^2.29.8",
|
|
139
148
|
"@emotion/react": "11.11.4",
|
|
140
|
-
"@figma/rest-api-spec": "^0.
|
|
141
|
-
"@guardian/eslint-config": "13.0.
|
|
149
|
+
"@figma/rest-api-spec": "^0.36.0",
|
|
150
|
+
"@guardian/eslint-config": "13.0.6",
|
|
142
151
|
"@guardian/prettier": "10.0.0",
|
|
143
152
|
"@guardian/prosemirror-invisibles": "3.1.1",
|
|
144
153
|
"@guardian/tsconfig": "1.0.1",
|
|
145
154
|
"@material-design-icons/svg": "^0.14.15",
|
|
146
|
-
"@playwright/experimental-ct-react17": "^1.
|
|
155
|
+
"@playwright/experimental-ct-react17": "^1.58.2",
|
|
147
156
|
"@rollup/plugin-commonjs": "29.0.0",
|
|
148
157
|
"@rollup/plugin-node-resolve": "16.0.3",
|
|
149
158
|
"@rollup/plugin-typescript": "12.3.0",
|
|
150
|
-
"@storybook/addon-docs": "^10.
|
|
151
|
-
"@storybook/addon-themes": "^10.
|
|
152
|
-
"@storybook/react-vite": "^10.
|
|
159
|
+
"@storybook/addon-docs": "^10.2.11",
|
|
160
|
+
"@storybook/addon-themes": "^10.2.11",
|
|
161
|
+
"@storybook/react-vite": "^10.2.11",
|
|
153
162
|
"@terrazzo/cli": "^0.10.5",
|
|
154
163
|
"@testing-library/jest-dom": "^6.9.1",
|
|
155
164
|
"@types/jest": "30.0.0",
|
|
@@ -157,11 +166,12 @@
|
|
|
157
166
|
"@types/react": "17.0.76",
|
|
158
167
|
"@types/react-dom": "17.0.25",
|
|
159
168
|
"change-case": "^5.4.4",
|
|
160
|
-
"eslint": "9.39.
|
|
161
|
-
"eslint-plugin-storybook": "^10.
|
|
169
|
+
"eslint": "9.39.3",
|
|
170
|
+
"eslint-plugin-storybook": "^10.2.11",
|
|
171
|
+
"husky": "^9.1.7",
|
|
162
172
|
"jest": "30.2.0",
|
|
163
173
|
"jest-environment-jsdom": "^30.1.2",
|
|
164
|
-
"prettier": "3.8.
|
|
174
|
+
"prettier": "3.8.1",
|
|
165
175
|
"prosemirror-dropcursor": "1.8.2",
|
|
166
176
|
"prosemirror-history": "1.4.1",
|
|
167
177
|
"prosemirror-keymap": "1.2.2",
|
|
@@ -172,14 +182,14 @@
|
|
|
172
182
|
"react-aria-components": "1.13.0",
|
|
173
183
|
"react-dom": "17.0.2",
|
|
174
184
|
"remark-gfm": "^4.0.1",
|
|
175
|
-
"rimraf": "6.1.
|
|
176
|
-
"rollup": "4.
|
|
185
|
+
"rimraf": "6.1.3",
|
|
186
|
+
"rollup": "4.59.0",
|
|
177
187
|
"rollup-plugin-copy": "^3.5.0",
|
|
178
188
|
"rollup-plugin-esbuild": "6.2.1",
|
|
179
189
|
"rollup-plugin-import-css": "^4.2.0",
|
|
180
190
|
"rollup-plugin-node-externals": "8.1.2",
|
|
181
|
-
"storybook": "^10.
|
|
182
|
-
"style-dictionary": "^5.
|
|
191
|
+
"storybook": "^10.2.11",
|
|
192
|
+
"style-dictionary": "^5.3.2",
|
|
183
193
|
"ts-jest": "29.4.6",
|
|
184
194
|
"tslib": "2.8.1",
|
|
185
195
|
"typescript": "5.1.3",
|
|
@@ -196,7 +206,7 @@
|
|
|
196
206
|
"prosemirror-state": "1.4.3",
|
|
197
207
|
"prosemirror-view": "1.37.2",
|
|
198
208
|
"react": "^17.0.2 || ^18.0.0 || ^19.0.0",
|
|
199
|
-
"react-aria-components": "1.13.0",
|
|
209
|
+
"react-aria-components": ">= 1.13.0 <= 1.15.1",
|
|
200
210
|
"react-dom": "^17.0.2 || ^18.0.0 || ^19.0.0",
|
|
201
211
|
"typescript": ">=5.0.0 <=5.9.3"
|
|
202
212
|
},
|