@guardian/stand 0.0.14 → 0.0.16
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/dist/TopBar.cjs +9 -0
- package/dist/TopBar.js +2 -0
- package/dist/components/avatar/Avatar.cjs +2 -2
- 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 +3 -3
- package/dist/components/icon-link-button/IconLinkButton.cjs +3 -3
- package/dist/components/menu/Menu.cjs +204 -0
- package/dist/components/menu/Menu.js +77 -0
- package/dist/components/menu/styles.cjs +103 -0
- package/dist/components/menu/styles.js +88 -0
- package/dist/components/tag-picker/TagTable.cjs +11 -11
- package/dist/components/topbar/toolName/TopBarToolName.cjs +31 -0
- package/dist/components/topbar/toolName/TopBarToolName.js +12 -0
- package/dist/components/topbar/toolName/styles.cjs +44 -0
- package/dist/components/topbar/toolName/styles.js +37 -0
- package/dist/index.cjs +6 -0
- package/dist/index.js +3 -0
- package/dist/menu.cjs +13 -0
- package/dist/menu.js +2 -0
- package/dist/styleD/build/css/component/TopBar.css +20 -0
- package/dist/styleD/build/css/component/menu.css +82 -0
- package/dist/styleD/build/css/semantic/shadow.css +7 -0
- package/dist/styleD/build/typescript/component/TopBar.cjs +28 -0
- package/dist/styleD/build/typescript/component/TopBar.js +26 -0
- package/dist/styleD/build/typescript/component/menu.cjs +140 -0
- package/dist/styleD/build/typescript/component/menu.js +138 -0
- package/dist/styleD/build/typescript/semantic/shadow.cjs +7 -0
- package/dist/styleD/build/typescript/semantic/shadow.js +5 -0
- package/dist/types/TopBar.d.ts +19 -0
- 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/sandbox.d.ts +5 -0
- package/dist/types/components/avatar/styles.d.ts +2 -1
- package/dist/types/components/button/sandbox.d.ts +5 -0
- package/dist/types/components/button/styles.d.ts +2 -1
- package/dist/types/components/favicon/sandbox.d.ts +5 -0
- package/dist/types/components/favicon/styles.d.ts +2 -1
- package/dist/types/components/icon/sandbox.d.ts +5 -0
- package/dist/types/components/icon/styles.d.ts +2 -1
- package/dist/types/components/icon-button/sandbox.d.ts +5 -0
- package/dist/types/components/icon-button/styles.d.ts +2 -1
- package/dist/types/components/icon-link-button/sandbox.d.ts +5 -0
- package/dist/types/components/icon-link-button/styles.d.ts +2 -1
- package/dist/types/components/link-button/sandbox.d.ts +5 -0
- package/dist/types/components/link-button/styles.d.ts +2 -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/toolName/TopBarToolName.d.ts +2 -0
- package/dist/types/components/topbar/toolName/sandbox.d.ts +5 -0
- package/dist/types/components/topbar/toolName/styles.d.ts +11 -0
- package/dist/types/components/topbar/toolName/types.d.ts +22 -0
- package/dist/types/components/typography/sandbox.d.ts +5 -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 +6 -0
- package/dist/types/link-button.d.ts +1 -1
- package/dist/types/menu.d.ts +21 -0
- package/dist/types/styleD/build/typescript/component/TopBar.d.ts +28 -0
- package/dist/types/styleD/build/typescript/component/menu.d.ts +140 -0
- package/dist/types/styleD/build/typescript/semantic/shadow.d.ts +7 -0
- package/dist/types/styleD/stories/semantic/Shadow.d.ts +1 -0
- package/dist/types/typography.d.ts +1 -1
- package/dist/types/util/storybook/sandbox/Sandbox.d.ts +14 -0
- package/package.json +34 -9
- /package/dist/types/util/{storybookStyles.d.ts → storybook/styles.d.ts} +0 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
|
+
import { componentMenu } from '../../styleD/build/typescript/component/menu.js';
|
|
3
|
+
import { convertTypographyToEmotionStringStyle } from '../../styleD/utils/semantic/typography.js';
|
|
4
|
+
|
|
5
|
+
const defaultMenuTheme = componentMenu.menu;
|
|
6
|
+
const menuStyles = (theme) => css`
|
|
7
|
+
display: ${theme.shared.display};
|
|
8
|
+
flex-direction: ${theme.shared["flex-direction"]};
|
|
9
|
+
border: ${theme.shared.border};
|
|
10
|
+
background: ${theme.shared["background-color"]};
|
|
11
|
+
`;
|
|
12
|
+
const defaultMenuSectionTheme = componentMenu.menuSection;
|
|
13
|
+
const menuSectionHeaderStyles = (theme, { size }) => css`
|
|
14
|
+
display: ${theme.header.shared.display};
|
|
15
|
+
align-items: ${theme.header.shared["align-items"]};
|
|
16
|
+
padding: ${theme.header.shared.padding.top}
|
|
17
|
+
${theme.header.shared.padding.right} ${theme.header.shared.padding.bottom}
|
|
18
|
+
${theme.header.shared.padding.left};
|
|
19
|
+
height: ${theme.header[size].height};
|
|
20
|
+
background: ${theme.header.shared["background-color"]};
|
|
21
|
+
color: ${theme.header.shared.color};
|
|
22
|
+
${convertTypographyToEmotionStringStyle(theme.header[size].typography)}
|
|
23
|
+
`;
|
|
24
|
+
const defaultMenuItemTheme = componentMenu.menuItem;
|
|
25
|
+
const menuItemStyles = (theme, { description }, isFocusVisible = false) => css`
|
|
26
|
+
display: ${theme.shared.display};
|
|
27
|
+
grid-template-columns: ${theme.shared["grid-template-columns"]};
|
|
28
|
+
grid-template-areas: ${description ? theme.shared["grid-template-areas-with-description"] : theme.shared["grid-template-areas"]};
|
|
29
|
+
gap: ${theme.shared.gap};
|
|
30
|
+
align-items: ${theme.shared["align-items"]};
|
|
31
|
+
padding: ${theme.shared.padding.top} ${theme.shared.padding.right}
|
|
32
|
+
${theme.shared.padding.bottom} ${theme.shared.padding.left};
|
|
33
|
+
border-bottom: ${theme.shared["border-bottom"]};
|
|
34
|
+
&:last-child {
|
|
35
|
+
border-bottom: ${theme.shared[":last-child"]["border-bottom"]};
|
|
36
|
+
}
|
|
37
|
+
&[data-hovered],
|
|
38
|
+
&:hover {
|
|
39
|
+
background: ${theme.shared[":hover"]["background-color"]};
|
|
40
|
+
}
|
|
41
|
+
${isFocusVisible ? css`
|
|
42
|
+
outline: ${theme.shared[":focus-visible"]["outline"]};
|
|
43
|
+
outline-offset: ${theme.shared[":focus-visible"]["outline-offset"]};
|
|
44
|
+
background: ${theme.shared[":hover"]["background-color"]};
|
|
45
|
+
` : css`
|
|
46
|
+
outline: none;
|
|
47
|
+
`}
|
|
48
|
+
`;
|
|
49
|
+
const menuItemIconStyles = (theme, { size }) => css`
|
|
50
|
+
grid-area: ${theme.shared.icon["grid-area"]};
|
|
51
|
+
align-self: ${theme.shared.icon["align-self"]};
|
|
52
|
+
color: ${theme.shared.icon.color};
|
|
53
|
+
/* Ensure the line-height matches the font line-height of the label for alignment */
|
|
54
|
+
line-height: ${theme[size].icon["line-height"]};
|
|
55
|
+
`;
|
|
56
|
+
const menuItemLabelStyles = (theme) => css`
|
|
57
|
+
grid-area: ${theme.shared.label["grid-area"]};
|
|
58
|
+
color: ${theme.shared.label.color};
|
|
59
|
+
${convertTypographyToEmotionStringStyle(theme.shared.label.typography)}
|
|
60
|
+
)}
|
|
61
|
+
`;
|
|
62
|
+
const menuItemDescriptionStyles = (theme) => css`
|
|
63
|
+
grid-area: ${theme.shared.description["grid-area"]};
|
|
64
|
+
color: ${theme.shared.description.color};
|
|
65
|
+
${convertTypographyToEmotionStringStyle(theme.shared.description.typography)}
|
|
66
|
+
`;
|
|
67
|
+
const menuItemAsideStyles = (theme) => css`
|
|
68
|
+
grid-area: ${theme.shared.aside["grid-area"]};
|
|
69
|
+
justify-self: ${theme.shared.aside["justify-self"]};
|
|
70
|
+
align-self: ${theme.shared.aside["align-self"]};
|
|
71
|
+
color: ${theme.shared.aside.color};
|
|
72
|
+
${convertTypographyToEmotionStringStyle(theme.shared.aside.typography)}
|
|
73
|
+
`;
|
|
74
|
+
const defaultMenuSeparatorTheme = componentMenu.menuSeparator;
|
|
75
|
+
const menuSeparatorStyles = (theme) => css`
|
|
76
|
+
background-color: ${theme.shared["background-color"]};
|
|
77
|
+
height: ${theme.shared.height};
|
|
78
|
+
width: ${theme.shared.width};
|
|
79
|
+
`;
|
|
80
|
+
const defaultMenuPopoverTheme = componentMenu.menuPopover;
|
|
81
|
+
const menuPopoverStyles = (theme, { size }) => css`
|
|
82
|
+
overflow: ${theme.shared.overflow};
|
|
83
|
+
max-width: ${theme[size]["max-width"]};
|
|
84
|
+
width: ${theme[size].width};
|
|
85
|
+
box-shadow: ${theme.shared.shadow};
|
|
86
|
+
`;
|
|
87
|
+
|
|
88
|
+
export { defaultMenuItemTheme, defaultMenuPopoverTheme, defaultMenuSectionTheme, defaultMenuSeparatorTheme, defaultMenuTheme, menuItemAsideStyles, menuItemDescriptionStyles, menuItemIconStyles, menuItemLabelStyles, menuItemStyles, menuPopoverStyles, menuSectionHeaderStyles, menuSeparatorStyles, menuStyles };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
4
|
-
var react
|
|
5
|
-
var
|
|
4
|
+
var react = require('@emotion/react');
|
|
5
|
+
var React = require('react');
|
|
6
6
|
var reactAriaComponents = require('react-aria-components');
|
|
7
7
|
var styles = require('./styles.cjs');
|
|
8
8
|
|
|
@@ -28,10 +28,10 @@ function TagTable({
|
|
|
28
28
|
cssOverrides
|
|
29
29
|
}) {
|
|
30
30
|
const canDrag = !!onReorder;
|
|
31
|
-
const [localRows, setLocalRows] =
|
|
32
|
-
const localRowsRef =
|
|
31
|
+
const [localRows, setLocalRows] = React.useState(() => [...rows]);
|
|
32
|
+
const localRowsRef = React.useRef(localRows);
|
|
33
33
|
localRowsRef.current = localRows;
|
|
34
|
-
|
|
34
|
+
React.useEffect(() => {
|
|
35
35
|
setLocalRows([...rows]);
|
|
36
36
|
}, [rows]);
|
|
37
37
|
const filtered = localRows.filter(filterRows);
|
|
@@ -99,7 +99,7 @@ function TagTable({
|
|
|
99
99
|
reactAriaComponents.Cell,
|
|
100
100
|
{
|
|
101
101
|
css: [
|
|
102
|
-
react
|
|
102
|
+
react.css`
|
|
103
103
|
width: 1%;
|
|
104
104
|
`
|
|
105
105
|
],
|
|
@@ -111,7 +111,7 @@ function TagTable({
|
|
|
111
111
|
{
|
|
112
112
|
css: [
|
|
113
113
|
styles.tagTableCellStyles(theme),
|
|
114
|
-
react
|
|
114
|
+
react.css`
|
|
115
115
|
position: relative;
|
|
116
116
|
width: 15%;
|
|
117
117
|
`
|
|
@@ -124,7 +124,7 @@ function TagTable({
|
|
|
124
124
|
{
|
|
125
125
|
css: [
|
|
126
126
|
styles.tagTableCellStyles(theme),
|
|
127
|
-
react
|
|
127
|
+
react.css`
|
|
128
128
|
width: 50%;
|
|
129
129
|
`
|
|
130
130
|
],
|
|
@@ -137,7 +137,7 @@ function TagTable({
|
|
|
137
137
|
{
|
|
138
138
|
css: [
|
|
139
139
|
styles.tagTableCellStyles(theme),
|
|
140
|
-
react
|
|
140
|
+
react.css`
|
|
141
141
|
width: 20%;
|
|
142
142
|
`
|
|
143
143
|
],
|
|
@@ -149,7 +149,7 @@ function TagTable({
|
|
|
149
149
|
{
|
|
150
150
|
css: [
|
|
151
151
|
styles.tagTableCellStyles(theme),
|
|
152
|
-
react
|
|
152
|
+
react.css`
|
|
153
153
|
text-align: center;
|
|
154
154
|
width: 10%;
|
|
155
155
|
`
|
|
@@ -172,7 +172,7 @@ function TagTable({
|
|
|
172
172
|
{
|
|
173
173
|
css: [
|
|
174
174
|
styles.tagTableCellStyles(theme),
|
|
175
|
-
react
|
|
175
|
+
react.css`
|
|
176
176
|
text-align: center;
|
|
177
177
|
width: 10%;
|
|
178
178
|
`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
4
|
+
var mergeDeep = require('../../../util/mergeDeep.cjs');
|
|
5
|
+
var Favicon = require('../../favicon/Favicon.cjs');
|
|
6
|
+
var Icon = require('../../icon/Icon.cjs');
|
|
7
|
+
var styles = require('./styles.cjs');
|
|
8
|
+
|
|
9
|
+
const TopBarToolName = ({
|
|
10
|
+
name,
|
|
11
|
+
favicon,
|
|
12
|
+
subsection,
|
|
13
|
+
subsectionIcon,
|
|
14
|
+
theme = {},
|
|
15
|
+
cssOverrides
|
|
16
|
+
}) => {
|
|
17
|
+
const mergedTheme = mergeDeep.mergeDeep(styles.defaultToolNameTheme, theme);
|
|
18
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { css: [styles.toolNameStyles(mergedTheme), cssOverrides], children: [
|
|
19
|
+
/* @__PURE__ */ jsxRuntime.jsx(Favicon.Favicon, { ...favicon }),
|
|
20
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { css: [styles.toolNameTypography(mergedTheme)], children: name }),
|
|
21
|
+
subsection && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
22
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { css: styles.dividerStyles(mergedTheme), children: "\xA0" }),
|
|
23
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { css: styles.subsectionStyles(mergedTheme), children: [
|
|
24
|
+
subsectionIcon && /* @__PURE__ */ jsxRuntime.jsx(Icon.Icon, { size: "sm", children: subsectionIcon }),
|
|
25
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { css: styles.subsectionTypography(mergedTheme), children: subsection })
|
|
26
|
+
] })
|
|
27
|
+
] })
|
|
28
|
+
] });
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
exports.TopBarToolName = TopBarToolName;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from '@emotion/react/jsx-runtime';
|
|
2
|
+
import { mergeDeep } from '../../../util/mergeDeep.js';
|
|
3
|
+
import { Favicon } from '../../favicon/Favicon.js';
|
|
4
|
+
import { Icon } from '../../icon/Icon.js';
|
|
5
|
+
import { toolNameTypography, dividerStyles, subsectionTypography, subsectionStyles, toolNameStyles, defaultToolNameTheme } from './styles.js';
|
|
6
|
+
|
|
7
|
+
const TopBarToolName = ({ name, favicon, subsection, subsectionIcon, theme = {}, cssOverrides }) => {
|
|
8
|
+
const mergedTheme = mergeDeep(defaultToolNameTheme, theme);
|
|
9
|
+
return jsxs("div", { css: [toolNameStyles(mergedTheme), cssOverrides], children: [jsx(Favicon, { ...favicon }), jsx("div", { css: [toolNameTypography(mergedTheme)], children: name }), subsection && jsxs(Fragment, { children: [jsx("div", { css: dividerStyles(mergedTheme), children: "\xA0" }), jsxs("div", { css: subsectionStyles(mergedTheme), children: [subsectionIcon && jsx(Icon, { size: "sm", children: subsectionIcon }), jsx("div", { css: subsectionTypography(mergedTheme), children: subsection })] })] })] });
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { TopBarToolName };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var react = require('@emotion/react');
|
|
4
|
+
var TopBar = require('../../../styleD/build/typescript/component/TopBar.cjs');
|
|
5
|
+
var typography = require('../../../styleD/utils/semantic/typography.cjs');
|
|
6
|
+
|
|
7
|
+
const defaultToolNameTheme = TopBar.componentTopBar.ToolName;
|
|
8
|
+
const toolNameStyles = (theme) => {
|
|
9
|
+
return react.css`
|
|
10
|
+
display: ${theme.display};
|
|
11
|
+
align-items: ${theme["align-items"]};
|
|
12
|
+
gap: ${theme.gap};
|
|
13
|
+
`;
|
|
14
|
+
};
|
|
15
|
+
const toolNameTypography = (theme) => {
|
|
16
|
+
return react.css`
|
|
17
|
+
${typography.convertTypographyToEmotionStringStyle(theme.typography)}
|
|
18
|
+
`;
|
|
19
|
+
};
|
|
20
|
+
const dividerStyles = (theme) => {
|
|
21
|
+
return react.css`
|
|
22
|
+
border-right: ${theme.divider.border};
|
|
23
|
+
height: ${theme.divider.height};
|
|
24
|
+
`;
|
|
25
|
+
};
|
|
26
|
+
const subsectionStyles = (theme) => {
|
|
27
|
+
return react.css`
|
|
28
|
+
display: ${theme.display};
|
|
29
|
+
align-items: ${theme["align-items"]};
|
|
30
|
+
gap: ${theme.subsection.gap};
|
|
31
|
+
`;
|
|
32
|
+
};
|
|
33
|
+
const subsectionTypography = (theme) => {
|
|
34
|
+
return react.css`
|
|
35
|
+
${typography.convertTypographyToEmotionStringStyle(theme.subsection.typography)}
|
|
36
|
+
`;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
exports.defaultToolNameTheme = defaultToolNameTheme;
|
|
40
|
+
exports.dividerStyles = dividerStyles;
|
|
41
|
+
exports.subsectionStyles = subsectionStyles;
|
|
42
|
+
exports.subsectionTypography = subsectionTypography;
|
|
43
|
+
exports.toolNameStyles = toolNameStyles;
|
|
44
|
+
exports.toolNameTypography = toolNameTypography;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
|
+
import { componentTopBar } from '../../../styleD/build/typescript/component/TopBar.js';
|
|
3
|
+
import { convertTypographyToEmotionStringStyle } from '../../../styleD/utils/semantic/typography.js';
|
|
4
|
+
|
|
5
|
+
const defaultToolNameTheme = componentTopBar.ToolName;
|
|
6
|
+
const toolNameStyles = (theme) => {
|
|
7
|
+
return css`
|
|
8
|
+
display: ${theme.display};
|
|
9
|
+
align-items: ${theme["align-items"]};
|
|
10
|
+
gap: ${theme.gap};
|
|
11
|
+
`;
|
|
12
|
+
};
|
|
13
|
+
const toolNameTypography = (theme) => {
|
|
14
|
+
return css`
|
|
15
|
+
${convertTypographyToEmotionStringStyle(theme.typography)}
|
|
16
|
+
`;
|
|
17
|
+
};
|
|
18
|
+
const dividerStyles = (theme) => {
|
|
19
|
+
return css`
|
|
20
|
+
border-right: ${theme.divider.border};
|
|
21
|
+
height: ${theme.divider.height};
|
|
22
|
+
`;
|
|
23
|
+
};
|
|
24
|
+
const subsectionStyles = (theme) => {
|
|
25
|
+
return css`
|
|
26
|
+
display: ${theme.display};
|
|
27
|
+
align-items: ${theme["align-items"]};
|
|
28
|
+
gap: ${theme.subsection.gap};
|
|
29
|
+
`;
|
|
30
|
+
};
|
|
31
|
+
const subsectionTypography = (theme) => {
|
|
32
|
+
return css`
|
|
33
|
+
${convertTypographyToEmotionStringStyle(theme.subsection.typography)}
|
|
34
|
+
`;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { defaultToolNameTheme, dividerStyles, subsectionStyles, subsectionTypography, toolNameStyles, toolNameTypography };
|
package/dist/index.cjs
CHANGED
|
@@ -9,6 +9,8 @@ var button = require('./styleD/build/typescript/component/button.cjs');
|
|
|
9
9
|
var typography$1 = require('./styleD/build/typescript/component/typography.cjs');
|
|
10
10
|
var icon = require('./styleD/build/typescript/component/icon.cjs');
|
|
11
11
|
var favicon = require('./styleD/build/typescript/component/favicon.cjs');
|
|
12
|
+
var menu = require('./styleD/build/typescript/component/menu.cjs');
|
|
13
|
+
var TopBar = require('./styleD/build/typescript/component/TopBar.cjs');
|
|
12
14
|
var colors = require('./styleD/build/typescript/base/colors.cjs');
|
|
13
15
|
var typography = require('./styleD/build/typescript/base/typography.cjs');
|
|
14
16
|
var spacing = require('./styleD/build/typescript/base/spacing.cjs');
|
|
@@ -17,6 +19,7 @@ var radius = require('./styleD/build/typescript/base/radius.cjs');
|
|
|
17
19
|
var colors$1 = require('./styleD/build/typescript/semantic/colors.cjs');
|
|
18
20
|
var typography$2 = require('./styleD/build/typescript/semantic/typography.cjs');
|
|
19
21
|
var sizing$1 = require('./styleD/build/typescript/semantic/sizing.cjs');
|
|
22
|
+
var shadow = require('./styleD/build/typescript/semantic/shadow.cjs');
|
|
20
23
|
|
|
21
24
|
|
|
22
25
|
|
|
@@ -29,6 +32,8 @@ exports.componentButton = button.componentButton;
|
|
|
29
32
|
exports.componentTypography = typography$1.componentTypography;
|
|
30
33
|
exports.componentIcon = icon.componentIcon;
|
|
31
34
|
exports.componentFavicon = favicon.componentFavicon;
|
|
35
|
+
exports.componentMenu = menu.componentMenu;
|
|
36
|
+
exports.componentTopBar = TopBar.componentTopBar;
|
|
32
37
|
exports.baseColors = colors.baseColors;
|
|
33
38
|
exports.baseTypography = typography.baseTypography;
|
|
34
39
|
exports.baseSpacing = spacing.baseSpacing;
|
|
@@ -37,3 +42,4 @@ exports.baseRadius = radius.baseRadius;
|
|
|
37
42
|
exports.semanticColors = colors$1.semanticColors;
|
|
38
43
|
exports.semanticTypography = typography$2.semanticTypography;
|
|
39
44
|
exports.semanticSizing = sizing$1.semanticSizing;
|
|
45
|
+
exports.semanticShadow = shadow.semanticShadow;
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,8 @@ 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
9
|
export { componentFavicon } from './styleD/build/typescript/component/favicon.js';
|
|
10
|
+
export { componentMenu } from './styleD/build/typescript/component/menu.js';
|
|
11
|
+
export { componentTopBar } from './styleD/build/typescript/component/TopBar.js';
|
|
10
12
|
export { baseColors } from './styleD/build/typescript/base/colors.js';
|
|
11
13
|
export { baseTypography } from './styleD/build/typescript/base/typography.js';
|
|
12
14
|
export { baseSpacing } from './styleD/build/typescript/base/spacing.js';
|
|
@@ -15,3 +17,4 @@ export { baseRadius } from './styleD/build/typescript/base/radius.js';
|
|
|
15
17
|
export { semanticColors } from './styleD/build/typescript/semantic/colors.js';
|
|
16
18
|
export { semanticTypography } from './styleD/build/typescript/semantic/typography.js';
|
|
17
19
|
export { semanticSizing } from './styleD/build/typescript/semantic/sizing.js';
|
|
20
|
+
export { semanticShadow } from './styleD/build/typescript/semantic/shadow.js';
|
package/dist/menu.cjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var Menu = require('./components/menu/Menu.cjs');
|
|
4
|
+
var menu = require('./styleD/build/typescript/component/menu.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
exports.Menu = Menu.Menu;
|
|
9
|
+
exports.MenuItem = Menu.MenuItem;
|
|
10
|
+
exports.MenuSection = Menu.MenuSection;
|
|
11
|
+
exports.MenuSeparator = Menu.MenuSeparator;
|
|
12
|
+
exports.MenuToggle = Menu.MenuToggle;
|
|
13
|
+
exports.componentMenu = menu.componentMenu;
|
package/dist/menu.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
--component-top-bar-tool-name-display: flex;
|
|
7
|
+
--component-top-bar-tool-name-align-items: center;
|
|
8
|
+
--component-top-bar-tool-name-gap: 8px;
|
|
9
|
+
--component-top-bar-tool-name-typography-font: normal 700 1.25rem/1.15
|
|
10
|
+
'GH Guardian Headline';
|
|
11
|
+
--component-top-bar-tool-name-typography-letter-spacing: 0rem;
|
|
12
|
+
--component-top-bar-tool-name-typography-font-width: 100;
|
|
13
|
+
--component-top-bar-tool-name-divider-border: 0.0625rem solid #cccccc;
|
|
14
|
+
--component-top-bar-tool-name-divider-height: 2rem;
|
|
15
|
+
--component-top-bar-tool-name-subsection-gap: 2px;
|
|
16
|
+
--component-top-bar-tool-name-subsection-typography-font: normal 700 1rem/1.15
|
|
17
|
+
'Open Sans';
|
|
18
|
+
--component-top-bar-tool-name-subsection-typography-letter-spacing: -0.0125rem;
|
|
19
|
+
--component-top-bar-tool-name-subsection-typography-font-width: 88;
|
|
20
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
--component-menu-menu-shared-display: flex;
|
|
7
|
+
--component-menu-menu-shared-flex-direction: column;
|
|
8
|
+
--component-menu-menu-shared-background-color: #ffffff;
|
|
9
|
+
--component-menu-menu-shared-border: 0.0625rem solid #cccccc;
|
|
10
|
+
--component-menu-menu-section-header-shared-display: flex;
|
|
11
|
+
--component-menu-menu-section-header-shared-align-items: center;
|
|
12
|
+
--component-menu-menu-section-header-shared-padding-top: 0;
|
|
13
|
+
--component-menu-menu-section-header-shared-padding-right: 0.5rem;
|
|
14
|
+
--component-menu-menu-section-header-shared-padding-bottom: 0;
|
|
15
|
+
--component-menu-menu-section-header-shared-padding-left: 0.5rem;
|
|
16
|
+
--component-menu-menu-section-header-shared-background-color: #ededed;
|
|
17
|
+
--component-menu-menu-section-header-shared-color: #000000;
|
|
18
|
+
--component-menu-menu-section-header-sm-height: 1.5rem;
|
|
19
|
+
--component-menu-menu-section-header-sm-typography-font: normal 700 0.875rem/1
|
|
20
|
+
'Open Sans';
|
|
21
|
+
--component-menu-menu-section-header-sm-typography-letter-spacing: -0.0125rem;
|
|
22
|
+
--component-menu-menu-section-header-sm-typography-font-width: 95;
|
|
23
|
+
--component-menu-menu-section-header-md-height: 2rem;
|
|
24
|
+
--component-menu-menu-section-header-md-typography-font: normal 700 1rem/1
|
|
25
|
+
'Open Sans';
|
|
26
|
+
--component-menu-menu-section-header-md-typography-letter-spacing: -0.0125rem;
|
|
27
|
+
--component-menu-menu-section-header-md-typography-font-width: 95;
|
|
28
|
+
--component-menu-menu-item-shared-display: grid;
|
|
29
|
+
--component-menu-menu-item-shared-grid-template-areas: 'icon label aside';
|
|
30
|
+
--component-menu-menu-item-shared-grid-template-areas-with-description: 'icon label aside'
|
|
31
|
+
'. description .';
|
|
32
|
+
--component-menu-menu-item-shared-grid-template-columns: auto 6fr 1fr;
|
|
33
|
+
--component-menu-menu-item-shared-gap: 0.25rem;
|
|
34
|
+
--component-menu-menu-item-shared-align-items: center;
|
|
35
|
+
--component-menu-menu-item-shared-padding-top: 0.75rem;
|
|
36
|
+
--component-menu-menu-item-shared-padding-right: 1rem;
|
|
37
|
+
--component-menu-menu-item-shared-padding-bottom: 0.75rem;
|
|
38
|
+
--component-menu-menu-item-shared-padding-left: 1rem;
|
|
39
|
+
--component-menu-menu-item-shared-border-bottom: 0.0625rem solid #cccccc;
|
|
40
|
+
--component-menu-menu-item-shared-icon-grid-area: icon;
|
|
41
|
+
--component-menu-menu-item-shared-icon-align-self: start;
|
|
42
|
+
--component-menu-menu-item-shared-icon-color: #545454;
|
|
43
|
+
--component-menu-menu-item-shared-label-grid-area: label;
|
|
44
|
+
--component-menu-menu-item-shared-label-color: #000000;
|
|
45
|
+
--component-menu-menu-item-shared-label-typography-font: normal 460 1rem/1.3
|
|
46
|
+
'Open Sans';
|
|
47
|
+
--component-menu-menu-item-shared-label-typography-letter-spacing: 0rem;
|
|
48
|
+
--component-menu-menu-item-shared-label-typography-font-width: 95;
|
|
49
|
+
--component-menu-menu-item-shared-description-grid-area: description;
|
|
50
|
+
--component-menu-menu-item-shared-description-color: #545454;
|
|
51
|
+
--component-menu-menu-item-shared-description-typography-font: normal 460
|
|
52
|
+
0.875rem/1.3 'Open Sans';
|
|
53
|
+
--component-menu-menu-item-shared-description-typography-letter-spacing: 0rem;
|
|
54
|
+
--component-menu-menu-item-shared-description-typography-font-width: 95;
|
|
55
|
+
--component-menu-menu-item-shared-aside-grid-area: aside;
|
|
56
|
+
--component-menu-menu-item-shared-aside-justify-self: end;
|
|
57
|
+
--component-menu-menu-item-shared-aside-align-self: start;
|
|
58
|
+
--component-menu-menu-item-shared-aside-color: #000000;
|
|
59
|
+
--component-menu-menu-item-shared-aside-typography-font: normal 460 1rem/1.3
|
|
60
|
+
'Open Sans';
|
|
61
|
+
--component-menu-menu-item-shared-aside-typography-letter-spacing: 0rem;
|
|
62
|
+
--component-menu-menu-item-shared-aside-typography-font-width: 95;
|
|
63
|
+
--component-menu-menu-item-shared-last-child-border-bottom: none;
|
|
64
|
+
--component-menu-menu-item-shared-hover-background-color: #ededed;
|
|
65
|
+
--component-menu-menu-item-shared-focus-visible-outline: 0.125rem solid
|
|
66
|
+
#0072a9;
|
|
67
|
+
--component-menu-menu-item-shared-focus-visible-outline-offset: -0.125rem;
|
|
68
|
+
--component-menu-menu-item-sm-icon-size: 1.125rem;
|
|
69
|
+
--component-menu-menu-item-sm-icon-line-height: 1.3;
|
|
70
|
+
--component-menu-menu-item-md-icon-size: 1.25rem;
|
|
71
|
+
--component-menu-menu-item-md-icon-line-height: 1.3;
|
|
72
|
+
--component-menu-menu-separator-shared-background-color: #ededed;
|
|
73
|
+
--component-menu-menu-separator-shared-height: 0.5rem;
|
|
74
|
+
--component-menu-menu-separator-shared-width: 100%;
|
|
75
|
+
--component-menu-menu-popover-shared-overflow: auto;
|
|
76
|
+
--component-menu-menu-popover-shared-shadow: 0 0.125rem 0.375rem 0
|
|
77
|
+
rgb(0% 0% 0% / 0.3);
|
|
78
|
+
--component-menu-menu-popover-sm-max-width: 200px;
|
|
79
|
+
--component-menu-menu-popover-sm-width: 100%;
|
|
80
|
+
--component-menu-menu-popover-md-max-width: 320px;
|
|
81
|
+
--component-menu-menu-popover-md-width: 100%;
|
|
82
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const componentTopBar = {
|
|
4
|
+
ToolName: {
|
|
5
|
+
display: "flex",
|
|
6
|
+
"align-items": "center",
|
|
7
|
+
gap: "8px",
|
|
8
|
+
typography: {
|
|
9
|
+
font: "normal 700 1.25rem/1.15 GH Guardian Headline",
|
|
10
|
+
letterSpacing: "0rem",
|
|
11
|
+
fontWidth: 100
|
|
12
|
+
},
|
|
13
|
+
divider: {
|
|
14
|
+
border: "0.0625rem solid #cccccc",
|
|
15
|
+
height: "2rem"
|
|
16
|
+
},
|
|
17
|
+
subsection: {
|
|
18
|
+
gap: "2px",
|
|
19
|
+
typography: {
|
|
20
|
+
font: "normal 700 1rem/1.15 Open Sans",
|
|
21
|
+
letterSpacing: "-0.0125rem",
|
|
22
|
+
fontWidth: 88
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.componentTopBar = componentTopBar;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const componentTopBar = {
|
|
2
|
+
ToolName: {
|
|
3
|
+
display: "flex",
|
|
4
|
+
"align-items": "center",
|
|
5
|
+
gap: "8px",
|
|
6
|
+
typography: {
|
|
7
|
+
font: "normal 700 1.25rem/1.15 GH Guardian Headline",
|
|
8
|
+
letterSpacing: "0rem",
|
|
9
|
+
fontWidth: 100
|
|
10
|
+
},
|
|
11
|
+
divider: {
|
|
12
|
+
border: "0.0625rem solid #cccccc",
|
|
13
|
+
height: "2rem"
|
|
14
|
+
},
|
|
15
|
+
subsection: {
|
|
16
|
+
gap: "2px",
|
|
17
|
+
typography: {
|
|
18
|
+
font: "normal 700 1rem/1.15 Open Sans",
|
|
19
|
+
letterSpacing: "-0.0125rem",
|
|
20
|
+
fontWidth: 88
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { componentTopBar };
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const componentMenu = {
|
|
4
|
+
menu: {
|
|
5
|
+
shared: {
|
|
6
|
+
display: "flex",
|
|
7
|
+
"flex-direction": "column",
|
|
8
|
+
"background-color": "#ffffff",
|
|
9
|
+
border: "0.0625rem solid #cccccc"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
menuSection: {
|
|
13
|
+
header: {
|
|
14
|
+
shared: {
|
|
15
|
+
display: "flex",
|
|
16
|
+
"align-items": "center",
|
|
17
|
+
padding: {
|
|
18
|
+
top: "0",
|
|
19
|
+
right: "0.5rem",
|
|
20
|
+
bottom: "0",
|
|
21
|
+
left: "0.5rem"
|
|
22
|
+
},
|
|
23
|
+
"background-color": "#ededed",
|
|
24
|
+
color: "#000000"
|
|
25
|
+
},
|
|
26
|
+
sm: {
|
|
27
|
+
height: "1.5rem",
|
|
28
|
+
typography: {
|
|
29
|
+
font: "normal 700 0.875rem/1 Open Sans",
|
|
30
|
+
letterSpacing: "-0.0125rem",
|
|
31
|
+
fontWidth: 95
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
md: {
|
|
35
|
+
height: "2rem",
|
|
36
|
+
typography: {
|
|
37
|
+
font: "normal 700 1rem/1 Open Sans",
|
|
38
|
+
letterSpacing: "-0.0125rem",
|
|
39
|
+
fontWidth: 95
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
menuItem: {
|
|
45
|
+
shared: {
|
|
46
|
+
display: "grid",
|
|
47
|
+
"grid-template-areas": "'icon label aside'",
|
|
48
|
+
"grid-template-areas-with-description": "'icon label aside' '. description .'",
|
|
49
|
+
"grid-template-columns": "auto 6fr 1fr",
|
|
50
|
+
gap: "0.25rem",
|
|
51
|
+
"align-items": "center",
|
|
52
|
+
padding: {
|
|
53
|
+
top: "0.75rem",
|
|
54
|
+
right: "1rem",
|
|
55
|
+
bottom: "0.75rem",
|
|
56
|
+
left: "1rem"
|
|
57
|
+
},
|
|
58
|
+
"border-bottom": "0.0625rem solid #cccccc",
|
|
59
|
+
icon: {
|
|
60
|
+
"grid-area": "icon",
|
|
61
|
+
"align-self": "start",
|
|
62
|
+
color: "#545454"
|
|
63
|
+
},
|
|
64
|
+
label: {
|
|
65
|
+
"grid-area": "label",
|
|
66
|
+
color: "#000000",
|
|
67
|
+
typography: {
|
|
68
|
+
font: "normal 460 1rem/1.3 Open Sans",
|
|
69
|
+
letterSpacing: "0rem",
|
|
70
|
+
fontWidth: 95
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
description: {
|
|
74
|
+
"grid-area": "description",
|
|
75
|
+
color: "#545454",
|
|
76
|
+
typography: {
|
|
77
|
+
font: "normal 460 0.875rem/1.3 Open Sans",
|
|
78
|
+
letterSpacing: "0rem",
|
|
79
|
+
fontWidth: 95
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
aside: {
|
|
83
|
+
"grid-area": "aside",
|
|
84
|
+
"justify-self": "end",
|
|
85
|
+
"align-self": "start",
|
|
86
|
+
color: "#000000",
|
|
87
|
+
typography: {
|
|
88
|
+
font: "normal 460 1rem/1.3 Open Sans",
|
|
89
|
+
letterSpacing: "0rem",
|
|
90
|
+
fontWidth: 95
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
":last-child": {
|
|
94
|
+
"border-bottom": "none"
|
|
95
|
+
},
|
|
96
|
+
":hover": {
|
|
97
|
+
"background-color": "#ededed"
|
|
98
|
+
},
|
|
99
|
+
":focus-visible": {
|
|
100
|
+
outline: "0.125rem solid #0072a9",
|
|
101
|
+
"outline-offset": "-0.125rem"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
sm: {
|
|
105
|
+
icon: {
|
|
106
|
+
size: "1.125rem",
|
|
107
|
+
"line-height": 1.3
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
md: {
|
|
111
|
+
icon: {
|
|
112
|
+
size: "1.25rem",
|
|
113
|
+
"line-height": 1.3
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
menuSeparator: {
|
|
118
|
+
shared: {
|
|
119
|
+
"background-color": "#ededed",
|
|
120
|
+
height: "0.5rem",
|
|
121
|
+
width: "100%"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
menuPopover: {
|
|
125
|
+
shared: {
|
|
126
|
+
overflow: "auto",
|
|
127
|
+
shadow: "0 0.125rem 0.375rem 0 rgb(0% 0% 0% / 0.3)"
|
|
128
|
+
},
|
|
129
|
+
sm: {
|
|
130
|
+
"max-width": "200px",
|
|
131
|
+
width: "100%"
|
|
132
|
+
},
|
|
133
|
+
md: {
|
|
134
|
+
"max-width": "320px",
|
|
135
|
+
width: "100%"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
exports.componentMenu = componentMenu;
|