@guardian/stand 0.0.15 → 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/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/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/component/menu.css +82 -0
- package/dist/styleD/build/css/semantic/shadow.css +7 -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 +1 -1
- 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/styles.d.ts +2 -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/styles.d.ts +2 -1
- package/dist/types/components/icon-link-button/styles.d.ts +2 -1
- 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/styles.d.ts +2 -1
- 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/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/package.json +17 -2
|
@@ -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
|
`
|
package/dist/index.cjs
CHANGED
|
@@ -9,6 +9,7 @@ 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');
|
|
12
13
|
var TopBar = require('./styleD/build/typescript/component/TopBar.cjs');
|
|
13
14
|
var colors = require('./styleD/build/typescript/base/colors.cjs');
|
|
14
15
|
var typography = require('./styleD/build/typescript/base/typography.cjs');
|
|
@@ -18,6 +19,7 @@ var radius = require('./styleD/build/typescript/base/radius.cjs');
|
|
|
18
19
|
var colors$1 = require('./styleD/build/typescript/semantic/colors.cjs');
|
|
19
20
|
var typography$2 = require('./styleD/build/typescript/semantic/typography.cjs');
|
|
20
21
|
var sizing$1 = require('./styleD/build/typescript/semantic/sizing.cjs');
|
|
22
|
+
var shadow = require('./styleD/build/typescript/semantic/shadow.cjs');
|
|
21
23
|
|
|
22
24
|
|
|
23
25
|
|
|
@@ -30,6 +32,7 @@ exports.componentButton = button.componentButton;
|
|
|
30
32
|
exports.componentTypography = typography$1.componentTypography;
|
|
31
33
|
exports.componentIcon = icon.componentIcon;
|
|
32
34
|
exports.componentFavicon = favicon.componentFavicon;
|
|
35
|
+
exports.componentMenu = menu.componentMenu;
|
|
33
36
|
exports.componentTopBar = TopBar.componentTopBar;
|
|
34
37
|
exports.baseColors = colors.baseColors;
|
|
35
38
|
exports.baseTypography = typography.baseTypography;
|
|
@@ -39,3 +42,4 @@ exports.baseRadius = radius.baseRadius;
|
|
|
39
42
|
exports.semanticColors = colors$1.semanticColors;
|
|
40
43
|
exports.semanticTypography = typography$2.semanticTypography;
|
|
41
44
|
exports.semanticSizing = sizing$1.semanticSizing;
|
|
45
|
+
exports.semanticShadow = shadow.semanticShadow;
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ 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';
|
|
10
11
|
export { componentTopBar } from './styleD/build/typescript/component/TopBar.js';
|
|
11
12
|
export { baseColors } from './styleD/build/typescript/base/colors.js';
|
|
12
13
|
export { baseTypography } from './styleD/build/typescript/base/typography.js';
|
|
@@ -16,3 +17,4 @@ export { baseRadius } from './styleD/build/typescript/base/radius.js';
|
|
|
16
17
|
export { semanticColors } from './styleD/build/typescript/semantic/colors.js';
|
|
17
18
|
export { semanticTypography } from './styleD/build/typescript/semantic/typography.js';
|
|
18
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,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,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;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
const componentMenu = {
|
|
2
|
+
menu: {
|
|
3
|
+
shared: {
|
|
4
|
+
display: "flex",
|
|
5
|
+
"flex-direction": "column",
|
|
6
|
+
"background-color": "#ffffff",
|
|
7
|
+
border: "0.0625rem solid #cccccc"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
menuSection: {
|
|
11
|
+
header: {
|
|
12
|
+
shared: {
|
|
13
|
+
display: "flex",
|
|
14
|
+
"align-items": "center",
|
|
15
|
+
padding: {
|
|
16
|
+
top: "0",
|
|
17
|
+
right: "0.5rem",
|
|
18
|
+
bottom: "0",
|
|
19
|
+
left: "0.5rem"
|
|
20
|
+
},
|
|
21
|
+
"background-color": "#ededed",
|
|
22
|
+
color: "#000000"
|
|
23
|
+
},
|
|
24
|
+
sm: {
|
|
25
|
+
height: "1.5rem",
|
|
26
|
+
typography: {
|
|
27
|
+
font: "normal 700 0.875rem/1 Open Sans",
|
|
28
|
+
letterSpacing: "-0.0125rem",
|
|
29
|
+
fontWidth: 95
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
md: {
|
|
33
|
+
height: "2rem",
|
|
34
|
+
typography: {
|
|
35
|
+
font: "normal 700 1rem/1 Open Sans",
|
|
36
|
+
letterSpacing: "-0.0125rem",
|
|
37
|
+
fontWidth: 95
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
menuItem: {
|
|
43
|
+
shared: {
|
|
44
|
+
display: "grid",
|
|
45
|
+
"grid-template-areas": "'icon label aside'",
|
|
46
|
+
"grid-template-areas-with-description": "'icon label aside' '. description .'",
|
|
47
|
+
"grid-template-columns": "auto 6fr 1fr",
|
|
48
|
+
gap: "0.25rem",
|
|
49
|
+
"align-items": "center",
|
|
50
|
+
padding: {
|
|
51
|
+
top: "0.75rem",
|
|
52
|
+
right: "1rem",
|
|
53
|
+
bottom: "0.75rem",
|
|
54
|
+
left: "1rem"
|
|
55
|
+
},
|
|
56
|
+
"border-bottom": "0.0625rem solid #cccccc",
|
|
57
|
+
icon: {
|
|
58
|
+
"grid-area": "icon",
|
|
59
|
+
"align-self": "start",
|
|
60
|
+
color: "#545454"
|
|
61
|
+
},
|
|
62
|
+
label: {
|
|
63
|
+
"grid-area": "label",
|
|
64
|
+
color: "#000000",
|
|
65
|
+
typography: {
|
|
66
|
+
font: "normal 460 1rem/1.3 Open Sans",
|
|
67
|
+
letterSpacing: "0rem",
|
|
68
|
+
fontWidth: 95
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
description: {
|
|
72
|
+
"grid-area": "description",
|
|
73
|
+
color: "#545454",
|
|
74
|
+
typography: {
|
|
75
|
+
font: "normal 460 0.875rem/1.3 Open Sans",
|
|
76
|
+
letterSpacing: "0rem",
|
|
77
|
+
fontWidth: 95
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
aside: {
|
|
81
|
+
"grid-area": "aside",
|
|
82
|
+
"justify-self": "end",
|
|
83
|
+
"align-self": "start",
|
|
84
|
+
color: "#000000",
|
|
85
|
+
typography: {
|
|
86
|
+
font: "normal 460 1rem/1.3 Open Sans",
|
|
87
|
+
letterSpacing: "0rem",
|
|
88
|
+
fontWidth: 95
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
":last-child": {
|
|
92
|
+
"border-bottom": "none"
|
|
93
|
+
},
|
|
94
|
+
":hover": {
|
|
95
|
+
"background-color": "#ededed"
|
|
96
|
+
},
|
|
97
|
+
":focus-visible": {
|
|
98
|
+
outline: "0.125rem solid #0072a9",
|
|
99
|
+
"outline-offset": "-0.125rem"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
sm: {
|
|
103
|
+
icon: {
|
|
104
|
+
size: "1.125rem",
|
|
105
|
+
"line-height": 1.3
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
md: {
|
|
109
|
+
icon: {
|
|
110
|
+
size: "1.25rem",
|
|
111
|
+
"line-height": 1.3
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
menuSeparator: {
|
|
116
|
+
shared: {
|
|
117
|
+
"background-color": "#ededed",
|
|
118
|
+
height: "0.5rem",
|
|
119
|
+
width: "100%"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
menuPopover: {
|
|
123
|
+
shared: {
|
|
124
|
+
overflow: "auto",
|
|
125
|
+
shadow: "0 0.125rem 0.375rem 0 rgb(0% 0% 0% / 0.3)"
|
|
126
|
+
},
|
|
127
|
+
sm: {
|
|
128
|
+
"max-width": "200px",
|
|
129
|
+
width: "100%"
|
|
130
|
+
},
|
|
131
|
+
md: {
|
|
132
|
+
"max-width": "320px",
|
|
133
|
+
width: "100%"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
export { componentMenu };
|
package/dist/types/TopBar.d.ts
CHANGED
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
*/
|
|
15
15
|
export { TopBarToolName } from './components/topbar/toolName/TopBarToolName';
|
|
16
16
|
export type { TopBarToolNameProps } from './components/topbar/toolName/types';
|
|
17
|
-
export type { TopBarToolNameTheme } from './components/topbar/toolName/styles';
|
|
17
|
+
export type { PartialTopBarToolNameTheme as TopBarToolNameTheme } from './components/topbar/toolName/styles';
|
|
18
18
|
export { componentTopBar } from './styleD/build/typescript/component/TopBar';
|
|
19
19
|
export type { ComponentTopBar } from './styleD/build/typescript/component/TopBar';
|
package/dist/types/avatar.d.ts
CHANGED
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
*/
|
|
15
15
|
export { Avatar } from './components/avatar/Avatar';
|
|
16
16
|
export type { AvatarProps } from './components/avatar/types';
|
|
17
|
-
export type { AvatarTheme } from './components/avatar/styles';
|
|
17
|
+
export type { PartialAvatarTheme as AvatarTheme } from './components/avatar/styles';
|
|
18
18
|
export { componentAvatar } from './styleD/build/typescript/component/avatar';
|
|
19
19
|
export type { ComponentAvatar } from './styleD/build/typescript/component/avatar';
|
package/dist/types/button.d.ts
CHANGED
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export { Button } from './components/button/Button';
|
|
17
17
|
export type { ButtonProps } from './components/button/types';
|
|
18
|
-
export type { ButtonTheme } from './components/button/styles';
|
|
18
|
+
export type { PartialButtonTheme as ButtonTheme } from './components/button/styles';
|
|
19
19
|
export { componentButton } from './styleD/build/typescript/component/button';
|
|
20
20
|
export type { ComponentButton } from './styleD/build/typescript/component/button';
|
package/dist/types/byline.d.ts
CHANGED
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
*/
|
|
21
21
|
export { Byline } from './components/byline/Byline';
|
|
22
22
|
export type { BylineModel } from './components/byline/lib';
|
|
23
|
-
export type { PartialBylineTheme } from './components/byline/theme';
|
|
23
|
+
export type { PartialBylineTheme as BylineTheme } from './components/byline/theme';
|
|
24
24
|
export { componentByline } from './styleD/build/typescript/component/byline';
|
|
25
25
|
export type { ComponentByline } from './styleD/build/typescript/component/byline';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { SerializedStyles } from '@emotion/react';
|
|
2
2
|
import type { ComponentAvatar } from '../../styleD/build/typescript/component/avatar';
|
|
3
|
-
import type { Prettify } from '../../util/types';
|
|
3
|
+
import type { DeepPartial, Prettify } from '../../util/types';
|
|
4
4
|
import type { AvatarProps } from './types';
|
|
5
5
|
export type AvatarTheme = Prettify<ComponentAvatar>;
|
|
6
|
+
export type PartialAvatarTheme = DeepPartial<AvatarTheme>;
|
|
6
7
|
export declare const defaultAvatarTheme: AvatarTheme;
|
|
7
8
|
export declare const avatarImageStyles: SerializedStyles;
|
|
8
9
|
export declare const avatarStyles: (theme: AvatarTheme, { size, color }: Required<Pick<AvatarProps, 'size' | 'color'>>) => SerializedStyles;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { SerializedStyles } from '@emotion/react';
|
|
2
2
|
import type { ComponentButton } from '../../styleD/build/typescript/component/button';
|
|
3
|
-
import type { Prettify } from '../../util/types';
|
|
3
|
+
import type { DeepPartial, Prettify } from '../../util/types';
|
|
4
4
|
import type { ButtonProps } from './types';
|
|
5
5
|
export type ButtonTheme = Prettify<ComponentButton>;
|
|
6
|
+
export type PartialButtonTheme = DeepPartial<ButtonTheme>;
|
|
6
7
|
export declare const defaultButtonTheme: ButtonTheme;
|
|
7
8
|
export declare const buttonStyles: (theme: ButtonTheme, { size, variant }: Required<Pick<ButtonProps, 'size' | 'variant'>>, hasIcon?: boolean, isIconButton?: boolean) => SerializedStyles;
|