@guardian/stand 0.0.15 → 0.0.17
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 +1 -0
- package/dist/TopBar.cjs +9 -3
- package/dist/TopBar.js +4 -1
- package/dist/components/avatar/Avatar.cjs +2 -2
- package/dist/components/button/Button.cjs +1 -1
- package/dist/components/button/Button.js +1 -1
- package/dist/components/button/styles.cjs +7 -4
- package/dist/components/button/styles.js +7 -4
- package/dist/components/byline/Byline.cjs +15 -15
- package/dist/components/favicon/Favicon.cjs +2 -2
- package/dist/components/icon-button/IconButton.cjs +4 -4
- package/dist/components/icon-button/IconButton.js +1 -1
- package/dist/components/icon-link-button/IconLinkButton.cjs +4 -4
- package/dist/components/icon-link-button/IconLinkButton.js +1 -1
- package/dist/components/link-button/LinkButton.cjs +1 -1
- package/dist/components/link-button/LinkButton.js +1 -1
- package/dist/components/menu/Menu.cjs +204 -0
- package/dist/components/menu/Menu.js +77 -0
- package/dist/components/menu/styles.cjs +104 -0
- package/dist/components/menu/styles.js +89 -0
- package/dist/components/tag-picker/TagTable.cjs +11 -11
- package/dist/components/topbar/TopBar.cjs +101 -0
- package/dist/components/topbar/TopBar.js +63 -0
- package/dist/components/topbar/styles.cjs +30 -0
- package/dist/components/topbar/styles.js +25 -0
- package/dist/components/topbar/topBarItem/TopBarItem.cjs +28 -0
- package/dist/components/topbar/topBarItem/TopBarItem.js +10 -0
- package/dist/components/topbar/topBarItem/styles.cjs +20 -0
- package/dist/components/topbar/topBarItem/styles.js +17 -0
- package/dist/components/topbar/topBarNavigation/TopBarNavigation.cjs +70 -0
- package/dist/components/topbar/topBarNavigation/TopBarNavigation.js +23 -0
- package/dist/components/topbar/topBarNavigation/styles.cjs +68 -0
- package/dist/components/topbar/topBarNavigation/styles.js +61 -0
- package/dist/components/topbar/{toolName → topBarToolName}/TopBarToolName.cjs +3 -2
- package/dist/components/topbar/topBarToolName/TopBarToolName.js +13 -0
- package/dist/index.cjs +4 -0
- package/dist/index.js +2 -0
- package/dist/menu.cjs +13 -0
- package/dist/menu.js +2 -0
- package/dist/styleD/build/css/base/typography.css +3 -3
- package/dist/styleD/build/css/component/TopBar.css +55 -1
- package/dist/styleD/build/css/component/avatar.css +1 -1
- package/dist/styleD/build/css/component/button.css +177 -255
- package/dist/styleD/build/css/component/favicon.css +1 -1
- package/dist/styleD/build/css/component/menu.css +83 -0
- package/dist/styleD/build/css/component/tagAutocomplete.css +1 -1
- package/dist/styleD/build/css/component/tagTable.css +1 -1
- package/dist/styleD/build/css/component/topBarItem.css +7 -0
- package/dist/styleD/build/css/component/userMenu.css +6 -6
- package/dist/styleD/build/css/semantic/colors.css +45 -46
- package/dist/styleD/build/css/semantic/shadow.css +7 -0
- package/dist/styleD/build/css/semantic/sizing.css +1 -0
- package/dist/styleD/build/css/semantic/typography.css +30 -30
- package/dist/styleD/build/typescript/base/typography.cjs +3 -3
- package/dist/styleD/build/typescript/base/typography.js +3 -3
- package/dist/styleD/build/typescript/component/TopBar.cjs +94 -0
- package/dist/styleD/build/typescript/component/TopBar.js +94 -0
- package/dist/styleD/build/typescript/component/button.cjs +5 -130
- package/dist/styleD/build/typescript/component/button.js +5 -130
- package/dist/styleD/build/typescript/component/menu.cjs +141 -0
- package/dist/styleD/build/typescript/component/menu.js +139 -0
- package/dist/styleD/build/typescript/semantic/colors.cjs +47 -52
- package/dist/styleD/build/typescript/semantic/colors.js +47 -52
- package/dist/styleD/build/typescript/semantic/shadow.cjs +7 -0
- package/dist/styleD/build/typescript/semantic/shadow.js +5 -0
- package/dist/styleD/build/typescript/semantic/sizing.cjs +1 -0
- package/dist/styleD/build/typescript/semantic/sizing.js +1 -0
- package/dist/types/TopBar.d.ts +12 -3
- package/dist/types/avatar.d.ts +1 -1
- package/dist/types/button.d.ts +1 -1
- package/dist/types/byline.d.ts +1 -1
- package/dist/types/components/avatar/styles.d.ts +2 -1
- package/dist/types/components/button/sandbox.d.ts +4 -4
- package/dist/types/components/button/styles.d.ts +2 -1
- package/dist/types/components/button/types.d.ts +1 -1
- package/dist/types/components/favicon/styles.d.ts +2 -1
- package/dist/types/components/icon/styles.d.ts +2 -1
- package/dist/types/components/icon-button/sandbox.d.ts +4 -4
- package/dist/types/components/icon-button/styles.d.ts +5 -129
- package/dist/types/components/icon-button/types.d.ts +1 -1
- package/dist/types/components/icon-link-button/sandbox.d.ts +4 -4
- package/dist/types/components/icon-link-button/styles.d.ts +5 -129
- package/dist/types/components/icon-link-button/types.d.ts +1 -1
- package/dist/types/components/link-button/sandbox.d.ts +4 -4
- package/dist/types/components/link-button/styles.d.ts +5 -129
- package/dist/types/components/link-button/types.d.ts +1 -1
- package/dist/types/components/menu/Menu.d.ts +7 -0
- package/dist/types/components/menu/sandbox.d.ts +5 -0
- package/dist/types/components/menu/styles.d.ts +28 -0
- package/dist/types/components/menu/types.d.ts +63 -0
- package/dist/types/components/topbar/TopBar.d.ts +8 -0
- package/dist/types/components/topbar/sandbox.d.ts +5 -0
- package/dist/types/components/topbar/styles.d.ts +9 -0
- package/dist/types/components/topbar/topBarItem/TopBarItem.d.ts +2 -0
- package/dist/types/components/topbar/topBarItem/sandbox.d.ts +5 -0
- package/dist/types/components/topbar/topBarItem/styles.d.ts +8 -0
- package/dist/types/components/topbar/topBarItem/types.d.ts +14 -0
- package/dist/types/components/topbar/topBarNavigation/TopBarNavigation.d.ts +2 -0
- package/dist/types/components/topbar/topBarNavigation/sandbox.d.ts +5 -0
- package/dist/types/components/topbar/topBarNavigation/styles.d.ts +12 -0
- package/dist/types/components/topbar/topBarNavigation/types.d.ts +44 -0
- package/dist/types/components/topbar/{toolName → topBarToolName}/styles.d.ts +2 -1
- package/dist/types/components/topbar/types.d.ts +3 -0
- package/dist/types/components/typography/styles.d.ts +2 -1
- package/dist/types/favicon.d.ts +1 -1
- package/dist/types/icon-button.d.ts +1 -1
- package/dist/types/icon-link-button.d.ts +1 -1
- package/dist/types/icon.d.ts +1 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/link-button.d.ts +1 -1
- package/dist/types/menu.d.ts +21 -0
- package/dist/types/styleD/build/typescript/base/typography.d.ts +3 -3
- package/dist/types/styleD/build/typescript/component/TopBar.d.ts +94 -0
- package/dist/types/styleD/build/typescript/component/button.d.ts +3 -128
- package/dist/types/styleD/build/typescript/component/menu.d.ts +141 -0
- package/dist/types/styleD/build/typescript/semantic/colors.d.ts +44 -49
- package/dist/types/styleD/build/typescript/semantic/shadow.d.ts +7 -0
- package/dist/types/styleD/build/typescript/semantic/sizing.d.ts +1 -0
- package/dist/types/styleD/stories/semantic/Shadow.d.ts +1 -0
- package/dist/types/typography.d.ts +1 -1
- package/dist/util/css/reset.css +10 -0
- package/dist/util/reset.css.cjs +1 -1
- package/dist/util/reset.css.js +1 -1
- package/package.json +30 -17
- package/dist/components/topbar/toolName/TopBarToolName.js +0 -12
- /package/dist/components/topbar/{toolName → topBarToolName}/styles.cjs +0 -0
- /package/dist/components/topbar/{toolName → topBarToolName}/styles.js +0 -0
- /package/dist/types/components/topbar/{toolName → topBarToolName}/TopBarToolName.d.ts +0 -0
- /package/dist/types/components/topbar/{toolName → topBarToolName}/sandbox.d.ts +0 -0
- /package/dist/types/components/topbar/{toolName → topBarToolName}/types.d.ts +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const componentName = "TopBarNavigation";
|
|
2
|
+
export declare const componentTsx = "import { TopBarNavigation } from '@guardian/stand/TopBar';\n\nexport const Component = () => (\n\t<TopBarNavigation text=\"Recipe\" icon=\"yakitori\" />\n);\n";
|
|
3
|
+
export declare const componentCss = "\n/* import the topbarnavigation styles */\n@import '@guardian/stand/component/TopBar.css';\n\n.stand-top-bar-navigation {\n\tdisplay: var(--component-top-bar-navigation-shared-display);\n\talign-items: var(--component-top-bar-navigation-shared-align-items);\n\tcolor: var(--component-top-bar-navigation-unselected-color);\n\theight: var(--component-top-bar-navigation-shared-height);\n\tpadding-top: var(--component-top-bar-navigation-shared-padding-top);\n\tpadding-right: var(--component-top-bar-navigation-shared-padding-right);\n\tpadding-bottom: var(--component-top-bar-navigation-shared-padding-bottom);\n\tpadding-left: var(--component-top-bar-navigation-shared-padding-left);\n\ttext-decoration: var(--component-top-bar-navigation-shared-text-decoration);\n\n\tborder-top: var(--component-top-bar-navigation-shared-border-top);\n\tborder-bottom: var(--component-top-bar-navigation-unselected-border-bottom);\n\n\t&[data-hovered],\n\t&:hover {\n\t\tborder-bottom: var(--component-top-bar-navigation-selected-border-bottom);\n\t\tcursor: var(--component-top-bar-navigation-shared-cursor);\n\t}\n\n\t&[data-focus-visible],\n\t&:focus-visible {\n\t\toutline: var(--component-top-bar-navigation-shared-focus-visible-outline);\n\t\tborder-bottom: var(--component-top-bar-navigation-selected-border-bottom);\n\t\toutline-offset: var(--component-top-bar-navigation-shared-focus-visible-outline-offset);\n\t}\n\n\t&[data-disabled] {\n\t\tcursor: var(--component-top-bar-navigation-shared-disabled-cursor);\n\t\tcolor: var(--component-top-bar-navigation-shared-disabled-color);\n\t}\n\n\tfont: var(--component-top-bar-navigation-md-typography-font);\n\tletter-spacing: var(--component-top-bar-navigation-md-typography-letter-spacing);\n\tfont-variation-settings: 'wdth'\n\t\tvar(--component-top-bar-navigation-md-typography-font-width);\n}\n\n.stand-navigation-text {\n\tmargin-left: var(--component-top-bar-navigation-text-margin-left);\n}\n\n.stand-expand-more {\n\tmargin-top: var(--component-top-bar-navigation-expand-more-padding-top);\n\tmargin-left: var(--component-top-bar-navigation-expand-more-padding-left);\n}\n";
|
|
4
|
+
export declare const componentHtml = "<div class=\"container\">\n\t<span class=\"stand-top-bar-navigation\">\n\t\t<span class=\"material-symbols \" >file_upload</span>\n\t\t<span class=\"stand-navigation-text\">Navigation</span>\n\t\t<div class=\"stand-expand-more\">\n\t\t\t<span class=\"material-symbols\" >keyboard_arrow_down</span>\n\t\t</div>\n\t</span>\n</div>\n";
|
|
5
|
+
export declare const componentJs = "\nimport { componentTopBar } from \"@guardian/stand\";\n\nconst style = `\n\tdisplay: ${componentTopBar.Navigation.shared.display};\n\talign-items: ${componentTopBar.Navigation.shared['align-items']};\n\tcolor: ${componentTopBar.Navigation.unselected.color};\n\theight: ${componentTopBar.Navigation.shared.height};\n\tpadding-top: ${componentTopBar.Navigation.shared.padding.top};\n\tpadding-right: ${componentTopBar.Navigation.shared.padding.right};\n\tpadding-bottom: ${componentTopBar.Navigation.shared.padding.bottom};\n\tpadding-left: ${componentTopBar.Navigation.shared.padding.left};\n\ttext-decoration: ${componentTopBar.Navigation.shared['text-decoration']};\n\n\tfont: ${componentTopBar.Navigation.md.typography.font};\n\tletter-spacing: ${componentTopBar.Navigation.md.typography.letterSpacing};\n\tfont-variation-settings: 'wdth'\n\t\t${componentTopBar.Navigation.md.typography.fontWidth};\n\n\t&:hover {\n\t\tborder-bottom: ${componentTopBar.Navigation.selected['border-bottom']};\n\t\tcursor: ${componentTopBar.Navigation.shared.cursor};\n\t}\n\n\t&:focus-visible {\n\t\toutline: ${componentTopBar.Navigation.shared[':focus-visible'].outline};\n\t\tborder-bottom: ${componentTopBar.Navigation.selected['border-bottom']};\n\t\toutline-offset: ${componentTopBar.Navigation.shared[':focus-visible']['outline-offset']};\n\t}\n\n\t&[data-disabled] {\n\t\tcursor: ${componentTopBar.Navigation.shared[':disabled'].cursor};\n\t\tcolor: ${componentTopBar.Navigation.shared[':disabled'].color};\n\t}\n`;\n\nconst textStyle = `margin-left: ${componentTopBar.Navigation.text.margin.left};\n`;\n\nconst expandMoreStyle = `\n\tmargin-top: ${componentTopBar.Navigation.menuIndicator.margin.top};\n\tmargin-left: ${componentTopBar.Navigation.menuIndicator.margin.left};\n`;\n\ndocument.getElementById(\"app\").innerHTML = `\n\t<span style=\"${style}\">\n\t\t<span class=\"material-symbols\">file_upload</span>\n\t\t<span style=\"${textStyle}\">Navigation</span>\n\t\t<div style=\"${expandMoreStyle}\">\n\t\t\t<span class=\"material-symbols\">keyboard_arrow_down</span>\n\t\t</div>\n\t</span>\n`;\n";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SerializedStyles } from '@emotion/react';
|
|
2
|
+
import type { ComponentTopBar } from '../../../styleD/build/typescript/component/TopBar';
|
|
3
|
+
import type { DeepPartial, Prettify } from '../../../util/types';
|
|
4
|
+
import type { TopBarNavigationProps } from './types';
|
|
5
|
+
export type TopBarNavigationTheme = Prettify<ComponentTopBar['Navigation']>;
|
|
6
|
+
export type PartialTopBarNavigationTheme = DeepPartial<TopBarNavigationTheme>;
|
|
7
|
+
export declare const defaultTopBarNavigationTheme: TopBarNavigationTheme;
|
|
8
|
+
export declare const topBarNavigationStyles: (theme: TopBarNavigationTheme, selected: boolean) => SerializedStyles;
|
|
9
|
+
export declare const topBarNavigationDividerStyles: (theme: TopBarNavigationTheme, { alignment }: Required<Pick<TopBarNavigationProps, 'alignment'>>) => SerializedStyles;
|
|
10
|
+
export declare const topBarNavigationTextStyles: (theme: TopBarNavigationTheme) => SerializedStyles;
|
|
11
|
+
export declare const topBarNavigationTypographyStyles: (theme: TopBarNavigationTheme, size: 'md' | 'sm') => SerializedStyles;
|
|
12
|
+
export declare const topBarMenuIndicatorStyles: (theme: TopBarNavigationTheme) => SerializedStyles;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { PressEvent } from 'react-aria-components';
|
|
3
|
+
import type { DefaultProps } from '../../../util/types';
|
|
4
|
+
import type { IconProps } from '../../icon/types';
|
|
5
|
+
import type { TopBarNavigationTheme } from './styles';
|
|
6
|
+
export interface TopBarNavigationProps extends DefaultProps<TopBarNavigationTheme> {
|
|
7
|
+
/**
|
|
8
|
+
* Text to display in navigation
|
|
9
|
+
*/
|
|
10
|
+
text: string;
|
|
11
|
+
/**
|
|
12
|
+
* Size of the text and icons
|
|
13
|
+
*/
|
|
14
|
+
size?: 'md' | 'sm';
|
|
15
|
+
/**
|
|
16
|
+
* Whether the component is the currently selected navigation
|
|
17
|
+
*/
|
|
18
|
+
isSelected?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Icon to display in navigation
|
|
21
|
+
*/
|
|
22
|
+
icon?: IconProps['symbol'] | Exclude<IconProps['children'], string>;
|
|
23
|
+
/**
|
|
24
|
+
* Menu sections and items to render in the dropdown menu - only children of type MenuSection and MenuItem will be rendered.
|
|
25
|
+
* `href` and `onPress` will be ignored if this prop is supplied.
|
|
26
|
+
*/
|
|
27
|
+
menuChildren?: ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Link to navigate to
|
|
30
|
+
*/
|
|
31
|
+
href?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Handler for navigation on press
|
|
34
|
+
*/
|
|
35
|
+
onPress?: (e: PressEvent) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Whether the navigation is disabled
|
|
38
|
+
*/
|
|
39
|
+
isDisabled?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Determines the alignment of the item within the top bar
|
|
42
|
+
*/
|
|
43
|
+
alignment?: 'left' | 'right';
|
|
44
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { SerializedStyles } from '@emotion/react';
|
|
2
2
|
import { type ComponentTopBar } from '../../..//styleD/build/typescript/component/TopBar';
|
|
3
|
-
import type { Prettify } from '../../../util/types';
|
|
3
|
+
import type { DeepPartial, Prettify } from '../../../util/types';
|
|
4
4
|
export type TopBarToolNameTheme = Prettify<ComponentTopBar['ToolName']>;
|
|
5
|
+
export type PartialTopBarToolNameTheme = DeepPartial<TopBarToolNameTheme>;
|
|
5
6
|
export declare const defaultToolNameTheme: TopBarToolNameTheme;
|
|
6
7
|
export declare const toolNameStyles: (theme: TopBarToolNameTheme) => SerializedStyles;
|
|
7
8
|
export declare const toolNameTypography: (theme: TopBarToolNameTheme) => SerializedStyles;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { SerializedStyles } from '@emotion/react';
|
|
2
2
|
import { type ComponentTypography } from '../../styleD/build/typescript/component/typography';
|
|
3
|
-
import type { Prettify } from '../../util/types';
|
|
3
|
+
import type { DeepPartial, Prettify } from '../../util/types';
|
|
4
4
|
import type { TypographyProps } from './types';
|
|
5
5
|
export type TypographyTheme = Prettify<ComponentTypography>;
|
|
6
|
+
export type PartialTypographyTheme = DeepPartial<TypographyTheme>;
|
|
6
7
|
export declare const defaultTypographyTheme: TypographyTheme;
|
|
7
8
|
export declare const typographyStyles: (theme: TypographyTheme, { variant }: Required<Pick<TypographyProps, 'variant'>>) => SerializedStyles;
|
package/dist/types/favicon.d.ts
CHANGED
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
*/
|
|
15
15
|
export { Favicon } from './components/favicon/Favicon';
|
|
16
16
|
export type { FaviconProps } from './components/favicon/types';
|
|
17
|
-
export type { FaviconTheme } from './components/favicon/styles';
|
|
17
|
+
export type { PartialFaviconTheme as FaviconTheme } from './components/favicon/styles';
|
|
18
18
|
export { componentFavicon } from './styleD/build/typescript/component/favicon';
|
|
19
19
|
export type { ComponentFavicon } from './styleD/build/typescript/component/favicon';
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
*/
|
|
18
18
|
export { IconButton } from './components/icon-button/IconButton';
|
|
19
19
|
export type { IconButtonProps } from './components/icon-button/types';
|
|
20
|
-
export type { IconButtonTheme } from './components/icon-button/styles';
|
|
20
|
+
export type { PartialIconButtonTheme as IconButtonTheme } from './components/icon-button/styles';
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
*/
|
|
18
18
|
export { IconLinkButton } from './components/icon-link-button/IconLinkButton';
|
|
19
19
|
export type { IconLinkButtonProps } from './components/icon-link-button/types';
|
|
20
|
-
export type { IconLinkButtonTheme } from './components/icon-link-button/styles';
|
|
20
|
+
export type { PartialIconLinkButtonTheme as IconLinkButtonTheme } from './components/icon-link-button/styles';
|
package/dist/types/icon.d.ts
CHANGED
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
*/
|
|
23
23
|
export { Icon } from './components/icon/Icon';
|
|
24
24
|
export type { IconProps } from './components/icon/types';
|
|
25
|
-
export type { IconTheme } from './components/icon/styles';
|
|
25
|
+
export type { PartialIconTheme as IconTheme } from './components/icon/styles';
|
|
26
26
|
export { componentIcon } from './styleD/build/typescript/component/icon';
|
|
27
27
|
export type { ComponentIcon } from './styleD/build/typescript/component/icon';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ export { componentIcon } from './styleD/build/typescript/component/icon';
|
|
|
26
26
|
export type { ComponentIcon } from './styleD/build/typescript/component/icon';
|
|
27
27
|
export { componentFavicon } from './styleD/build/typescript/component/favicon';
|
|
28
28
|
export type { ComponentFavicon } from './styleD/build/typescript/component/favicon';
|
|
29
|
+
export { componentMenu } from './styleD/build/typescript/component/menu';
|
|
30
|
+
export type { ComponentMenu } from './styleD/build/typescript/component/menu';
|
|
29
31
|
export { componentTopBar } from './styleD/build/typescript/component/TopBar';
|
|
30
32
|
export type { ComponentTopBar } from './styleD/build/typescript/component/TopBar';
|
|
31
33
|
/**
|
|
@@ -50,3 +52,5 @@ export { semanticTypography } from './styleD/build/typescript/semantic/typograph
|
|
|
50
52
|
export type { SemanticTypography } from './styleD/build/typescript/semantic/typography';
|
|
51
53
|
export { semanticSizing } from './styleD/build/typescript/semantic/sizing';
|
|
52
54
|
export type { SemanticSizing } from './styleD/build/typescript/semantic/sizing';
|
|
55
|
+
export { semanticShadow } from './styleD/build/typescript/semantic/shadow';
|
|
56
|
+
export type { SemanticShadow } from './styleD/build/typescript/semantic/shadow';
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
*/
|
|
18
18
|
export { LinkButton } from './components/link-button/LinkButton';
|
|
19
19
|
export type { LinkButtonProps } from './components/link-button/types';
|
|
20
|
-
export type { LinkButtonTheme } from './components/link-button/styles';
|
|
20
|
+
export type { PartialLinkButtonTheme as LinkButtonTheme } from './components/link-button/styles';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Menu component entry point
|
|
3
|
+
*
|
|
4
|
+
* Peer dependencies required to use these components:
|
|
5
|
+
* - `@emotion/react`
|
|
6
|
+
* - `react`
|
|
7
|
+
* - `react-dom`
|
|
8
|
+
* - `typescript`
|
|
9
|
+
* - `react-aria-components`
|
|
10
|
+
* - `@react-aria/focus`
|
|
11
|
+
*
|
|
12
|
+
* See the `peerDependencies` section of package.json for compatible versions.
|
|
13
|
+
*
|
|
14
|
+
* If you only need the built CSS (./component/menu.css),
|
|
15
|
+
* you don't need to install these.
|
|
16
|
+
*/
|
|
17
|
+
export { Menu, MenuItem, MenuSection, MenuSeparator, MenuToggle, } from './components/menu/Menu';
|
|
18
|
+
export type { MenuProps, MenuItemProps, MenuSectionProps, MenuSeparatorProps, MenuTriggerProps, MenuPopoverProps as PopoverProps, } from './components/menu/types';
|
|
19
|
+
export type { PartialMenuTheme as MenuTheme, PartialMenuItemTheme as MenuItemTheme, PartialMenuSectionTheme as MenuSectionTheme, PartialMenuSeparatorTheme as MenuSeparatorTheme, PartialMenuPopoverTheme as MenuPopoverTheme, } from './components/menu/styles';
|
|
20
|
+
export { componentMenu } from './styleD/build/typescript/component/menu';
|
|
21
|
+
export type { ComponentMenu } from './styleD/build/typescript/component/menu';
|
|
@@ -33,13 +33,13 @@ export declare const baseTypography: {
|
|
|
33
33
|
readonly '48-rem': "3rem";
|
|
34
34
|
};
|
|
35
35
|
readonly weight: {
|
|
36
|
-
readonly 'Guardian Headline': {
|
|
37
|
-
readonly bold: 700;
|
|
38
|
-
};
|
|
39
36
|
readonly 'Guardian Text Egyptian': {
|
|
40
37
|
readonly normal: 400;
|
|
41
38
|
readonly bold: 700;
|
|
42
39
|
};
|
|
40
|
+
readonly 'Guardian Headline': {
|
|
41
|
+
readonly bold: 700;
|
|
42
|
+
};
|
|
43
43
|
readonly 'Open Sans': {
|
|
44
44
|
readonly light: 340;
|
|
45
45
|
readonly normal: 460;
|
|
@@ -2,6 +2,100 @@
|
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
3
|
*/
|
|
4
4
|
export declare const componentTopBar: {
|
|
5
|
+
'background-color': string;
|
|
6
|
+
display: string;
|
|
7
|
+
height: string;
|
|
8
|
+
'justify-content': string;
|
|
9
|
+
border: string;
|
|
10
|
+
Item: {
|
|
11
|
+
display: string;
|
|
12
|
+
'align-items': string;
|
|
13
|
+
height: string;
|
|
14
|
+
sm: {
|
|
15
|
+
padding: {
|
|
16
|
+
top: string;
|
|
17
|
+
right: string;
|
|
18
|
+
bottom: string;
|
|
19
|
+
left: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
md: {
|
|
23
|
+
padding: {
|
|
24
|
+
top: string;
|
|
25
|
+
right: string;
|
|
26
|
+
bottom: string;
|
|
27
|
+
left: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
lg: {
|
|
31
|
+
padding: {
|
|
32
|
+
top: string;
|
|
33
|
+
right: string;
|
|
34
|
+
bottom: string;
|
|
35
|
+
left: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
border: string;
|
|
39
|
+
};
|
|
40
|
+
Navigation: {
|
|
41
|
+
shared: {
|
|
42
|
+
display: string;
|
|
43
|
+
position: string;
|
|
44
|
+
'align-items': string;
|
|
45
|
+
cursor: string;
|
|
46
|
+
'text-decoration': string;
|
|
47
|
+
height: string;
|
|
48
|
+
':disabled': {
|
|
49
|
+
cursor: string;
|
|
50
|
+
color: string;
|
|
51
|
+
};
|
|
52
|
+
padding: {
|
|
53
|
+
top: string;
|
|
54
|
+
right: string;
|
|
55
|
+
bottom: string;
|
|
56
|
+
left: string;
|
|
57
|
+
};
|
|
58
|
+
':focus-visible': {
|
|
59
|
+
outline: string;
|
|
60
|
+
'outline-offset': string;
|
|
61
|
+
};
|
|
62
|
+
'border-top': string;
|
|
63
|
+
divider: string;
|
|
64
|
+
};
|
|
65
|
+
text: {
|
|
66
|
+
margin: {
|
|
67
|
+
left: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
menuIndicator: {
|
|
71
|
+
margin: {
|
|
72
|
+
top: string;
|
|
73
|
+
left: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
selected: {
|
|
77
|
+
color: string;
|
|
78
|
+
'border-bottom': string;
|
|
79
|
+
};
|
|
80
|
+
unselected: {
|
|
81
|
+
color: string;
|
|
82
|
+
'border-bottom': string;
|
|
83
|
+
};
|
|
84
|
+
md: {
|
|
85
|
+
typography: {
|
|
86
|
+
font: string;
|
|
87
|
+
letterSpacing: string;
|
|
88
|
+
fontWidth: number;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
sm: {
|
|
92
|
+
typography: {
|
|
93
|
+
font: string;
|
|
94
|
+
letterSpacing: string;
|
|
95
|
+
fontWidth: number;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
};
|
|
5
99
|
ToolName: {
|
|
6
100
|
display: string;
|
|
7
101
|
'align-items': string;
|
|
@@ -19,7 +19,7 @@ export declare const componentButton: {
|
|
|
19
19
|
'outline-offset': string;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
primary: {
|
|
23
23
|
shared: {
|
|
24
24
|
color: string;
|
|
25
25
|
backgroundColor: string;
|
|
@@ -144,7 +144,7 @@ export declare const componentButton: {
|
|
|
144
144
|
};
|
|
145
145
|
};
|
|
146
146
|
};
|
|
147
|
-
|
|
147
|
+
secondary: {
|
|
148
148
|
shared: {
|
|
149
149
|
color: string;
|
|
150
150
|
backgroundColor: string;
|
|
@@ -269,132 +269,7 @@ export declare const componentButton: {
|
|
|
269
269
|
};
|
|
270
270
|
};
|
|
271
271
|
};
|
|
272
|
-
|
|
273
|
-
shared: {
|
|
274
|
-
color: string;
|
|
275
|
-
backgroundColor: string;
|
|
276
|
-
borderRadius: string;
|
|
277
|
-
border: string;
|
|
278
|
-
':hover': {
|
|
279
|
-
backgroundColor: string;
|
|
280
|
-
border: string;
|
|
281
|
-
};
|
|
282
|
-
':active': {
|
|
283
|
-
backgroundColor: string;
|
|
284
|
-
border: string;
|
|
285
|
-
};
|
|
286
|
-
':disabled': {
|
|
287
|
-
color: string;
|
|
288
|
-
backgroundColor: string;
|
|
289
|
-
border: string;
|
|
290
|
-
};
|
|
291
|
-
};
|
|
292
|
-
xs: {
|
|
293
|
-
height: string;
|
|
294
|
-
padding: {
|
|
295
|
-
top: string;
|
|
296
|
-
right: string;
|
|
297
|
-
bottom: string;
|
|
298
|
-
left: string;
|
|
299
|
-
withIcon: {
|
|
300
|
-
iconLeft: {
|
|
301
|
-
left: string;
|
|
302
|
-
};
|
|
303
|
-
};
|
|
304
|
-
};
|
|
305
|
-
typography: {
|
|
306
|
-
font: string;
|
|
307
|
-
letterSpacing: string;
|
|
308
|
-
fontWidth: number;
|
|
309
|
-
};
|
|
310
|
-
icon: {
|
|
311
|
-
size: string;
|
|
312
|
-
gap: string;
|
|
313
|
-
};
|
|
314
|
-
iconButton: {
|
|
315
|
-
width: string;
|
|
316
|
-
};
|
|
317
|
-
};
|
|
318
|
-
sm: {
|
|
319
|
-
height: string;
|
|
320
|
-
padding: {
|
|
321
|
-
top: string;
|
|
322
|
-
right: string;
|
|
323
|
-
bottom: string;
|
|
324
|
-
left: string;
|
|
325
|
-
withIcon: {
|
|
326
|
-
iconLeft: {
|
|
327
|
-
left: string;
|
|
328
|
-
};
|
|
329
|
-
};
|
|
330
|
-
};
|
|
331
|
-
typography: {
|
|
332
|
-
font: string;
|
|
333
|
-
letterSpacing: string;
|
|
334
|
-
fontWidth: number;
|
|
335
|
-
};
|
|
336
|
-
icon: {
|
|
337
|
-
size: string;
|
|
338
|
-
gap: string;
|
|
339
|
-
};
|
|
340
|
-
iconButton: {
|
|
341
|
-
width: string;
|
|
342
|
-
};
|
|
343
|
-
};
|
|
344
|
-
md: {
|
|
345
|
-
height: string;
|
|
346
|
-
padding: {
|
|
347
|
-
top: string;
|
|
348
|
-
right: string;
|
|
349
|
-
bottom: string;
|
|
350
|
-
left: string;
|
|
351
|
-
withIcon: {
|
|
352
|
-
iconLeft: {
|
|
353
|
-
left: string;
|
|
354
|
-
};
|
|
355
|
-
};
|
|
356
|
-
};
|
|
357
|
-
typography: {
|
|
358
|
-
font: string;
|
|
359
|
-
letterSpacing: string;
|
|
360
|
-
fontWidth: number;
|
|
361
|
-
};
|
|
362
|
-
icon: {
|
|
363
|
-
size: string;
|
|
364
|
-
gap: string;
|
|
365
|
-
};
|
|
366
|
-
iconButton: {
|
|
367
|
-
width: string;
|
|
368
|
-
};
|
|
369
|
-
};
|
|
370
|
-
lg: {
|
|
371
|
-
height: string;
|
|
372
|
-
padding: {
|
|
373
|
-
top: string;
|
|
374
|
-
right: string;
|
|
375
|
-
bottom: string;
|
|
376
|
-
left: string;
|
|
377
|
-
withIcon: {
|
|
378
|
-
iconLeft: {
|
|
379
|
-
left: string;
|
|
380
|
-
};
|
|
381
|
-
};
|
|
382
|
-
};
|
|
383
|
-
typography: {
|
|
384
|
-
font: string;
|
|
385
|
-
letterSpacing: string;
|
|
386
|
-
fontWidth: number;
|
|
387
|
-
};
|
|
388
|
-
icon: {
|
|
389
|
-
size: string;
|
|
390
|
-
gap: string;
|
|
391
|
-
};
|
|
392
|
-
iconButton: {
|
|
393
|
-
width: string;
|
|
394
|
-
};
|
|
395
|
-
};
|
|
396
|
-
};
|
|
397
|
-
'neutral-secondary': {
|
|
272
|
+
tertiary: {
|
|
398
273
|
shared: {
|
|
399
274
|
color: string;
|
|
400
275
|
backgroundColor: string;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
export declare const componentMenu: {
|
|
5
|
+
menu: {
|
|
6
|
+
shared: {
|
|
7
|
+
display: string;
|
|
8
|
+
'flex-direction': string;
|
|
9
|
+
'background-color': string;
|
|
10
|
+
border: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
menuSection: {
|
|
14
|
+
header: {
|
|
15
|
+
shared: {
|
|
16
|
+
display: string;
|
|
17
|
+
'align-items': string;
|
|
18
|
+
padding: {
|
|
19
|
+
top: string;
|
|
20
|
+
right: string;
|
|
21
|
+
bottom: string;
|
|
22
|
+
left: string;
|
|
23
|
+
};
|
|
24
|
+
'background-color': string;
|
|
25
|
+
color: string;
|
|
26
|
+
};
|
|
27
|
+
sm: {
|
|
28
|
+
height: string;
|
|
29
|
+
typography: {
|
|
30
|
+
font: string;
|
|
31
|
+
letterSpacing: string;
|
|
32
|
+
fontWidth: number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
md: {
|
|
36
|
+
height: string;
|
|
37
|
+
typography: {
|
|
38
|
+
font: string;
|
|
39
|
+
letterSpacing: string;
|
|
40
|
+
fontWidth: number;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
menuItem: {
|
|
46
|
+
shared: {
|
|
47
|
+
display: string;
|
|
48
|
+
'grid-template-areas': string;
|
|
49
|
+
'grid-template-areas-with-description': string;
|
|
50
|
+
'grid-template-columns': string;
|
|
51
|
+
gap: string;
|
|
52
|
+
'align-items': string;
|
|
53
|
+
padding: {
|
|
54
|
+
top: string;
|
|
55
|
+
right: string;
|
|
56
|
+
bottom: string;
|
|
57
|
+
left: string;
|
|
58
|
+
};
|
|
59
|
+
'border-bottom': string;
|
|
60
|
+
'background-color': string;
|
|
61
|
+
icon: {
|
|
62
|
+
'grid-area': string;
|
|
63
|
+
'align-self': string;
|
|
64
|
+
color: string;
|
|
65
|
+
};
|
|
66
|
+
label: {
|
|
67
|
+
'grid-area': string;
|
|
68
|
+
color: string;
|
|
69
|
+
typography: {
|
|
70
|
+
font: string;
|
|
71
|
+
letterSpacing: string;
|
|
72
|
+
fontWidth: number;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
description: {
|
|
76
|
+
'grid-area': string;
|
|
77
|
+
color: string;
|
|
78
|
+
typography: {
|
|
79
|
+
font: string;
|
|
80
|
+
letterSpacing: string;
|
|
81
|
+
fontWidth: number;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
aside: {
|
|
85
|
+
'grid-area': string;
|
|
86
|
+
'justify-self': string;
|
|
87
|
+
'align-self': string;
|
|
88
|
+
color: string;
|
|
89
|
+
typography: {
|
|
90
|
+
font: string;
|
|
91
|
+
letterSpacing: string;
|
|
92
|
+
fontWidth: number;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
':last-child': {
|
|
96
|
+
'border-bottom': string;
|
|
97
|
+
};
|
|
98
|
+
':hover': {
|
|
99
|
+
'background-color': string;
|
|
100
|
+
};
|
|
101
|
+
':focus-visible': {
|
|
102
|
+
outline: string;
|
|
103
|
+
'outline-offset': string;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
sm: {
|
|
107
|
+
icon: {
|
|
108
|
+
size: string;
|
|
109
|
+
'line-height': number;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
md: {
|
|
113
|
+
icon: {
|
|
114
|
+
size: string;
|
|
115
|
+
'line-height': number;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
menuSeparator: {
|
|
120
|
+
shared: {
|
|
121
|
+
'background-color': string;
|
|
122
|
+
height: string;
|
|
123
|
+
width: string;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
menuPopover: {
|
|
127
|
+
shared: {
|
|
128
|
+
overflow: string;
|
|
129
|
+
shadow: string;
|
|
130
|
+
};
|
|
131
|
+
sm: {
|
|
132
|
+
'max-width': string;
|
|
133
|
+
width: string;
|
|
134
|
+
};
|
|
135
|
+
md: {
|
|
136
|
+
'max-width': string;
|
|
137
|
+
width: string;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
export type ComponentMenu = typeof componentMenu;
|