@guardian/stand 0.0.36 → 0.0.38
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/alert-banner/AlertBanner.js +1 -1
- package/dist/components/avatar/Avatar.js +1 -1
- package/dist/components/button/Button.js +1 -1
- package/dist/components/checkbox/Checkbox.js +1 -1
- package/dist/components/checkbox/CheckboxGroup.js +1 -1
- package/dist/components/date-picker/DatePicker.js +1 -1
- package/dist/components/grid/Grid.js +1 -1
- package/dist/components/grid/styles.cjs +59 -39
- package/dist/components/grid/styles.js +47 -35
- package/dist/components/icon/Icon.js +1 -1
- package/dist/components/icon-button/IconButton.js +1 -1
- package/dist/components/icon-button/styles.js +1 -1
- package/dist/components/icon-link-button/IconLinkButton.js +1 -1
- package/dist/components/icon-link-button/styles.js +1 -1
- package/dist/components/inline-message/InlineMessage.js +1 -1
- package/dist/components/intended-audience-signifier/FlagIcons.cjs +5 -16
- package/dist/components/intended-audience-signifier/FlagIcons.js +2 -2
- package/dist/components/intended-audience-signifier/IntendedAudienceSignifier.cjs +5 -6
- package/dist/components/intended-audience-signifier/IntendedAudienceSignifier.js +4 -2
- package/dist/components/intended-audience-signifier/styles.cjs +16 -2
- package/dist/components/intended-audience-signifier/styles.js +15 -3
- package/dist/components/layout/Layout.cjs +49 -84
- package/dist/components/layout/Layout.js +27 -76
- package/dist/components/layout/styles.cjs +5 -3
- package/dist/components/layout/styles.js +5 -4
- package/dist/components/link/Link.cjs +5 -5
- package/dist/components/link/Link.js +1 -1
- package/dist/components/link-button/LinkButton.js +1 -1
- package/dist/components/link-button/styles.js +1 -1
- package/dist/components/menu/Menu.js +1 -1
- package/dist/components/radio-group/RadioGroup.js +1 -1
- package/dist/components/select/Select.js +1 -1
- package/dist/components/text-area/TextArea.js +1 -1
- package/dist/components/text-input/TextInput.js +1 -1
- package/dist/components/topbar/TopBar.js +1 -1
- package/dist/components/topbar/topBarItem/TopBarItem.js +1 -1
- package/dist/components/topbar/topBarNavigation/TopBarNavigation.js +1 -1
- package/dist/components/topbar/topBarToolName/TopBarToolName.js +1 -1
- package/dist/components/typography/Typography.js +1 -1
- package/dist/components/typography/styles.cjs +5 -5
- package/dist/index.cjs +2 -0
- package/dist/index.js +1 -0
- package/dist/layout.cjs +0 -1
- package/dist/layout.js +1 -1
- package/dist/styleD/build/css/component/grid.css +9 -2
- package/dist/styleD/build/css/component/intendedAudienceSignifier.css +6 -4
- package/dist/styleD/build/css/component/layout.css +4 -4
- package/dist/styleD/build/css/semantic/grid.css +15 -0
- package/dist/styleD/build/css/semantic/sizing.css +3 -0
- package/dist/styleD/build/typescript/component/grid.cjs +15 -2
- package/dist/styleD/build/typescript/component/grid.js +15 -2
- package/dist/styleD/build/typescript/component/intendedAudienceSignifier.cjs +8 -5
- package/dist/styleD/build/typescript/component/intendedAudienceSignifier.js +8 -5
- package/dist/styleD/build/typescript/component/layout.cjs +7 -5
- package/dist/styleD/build/typescript/component/layout.js +7 -5
- package/dist/styleD/build/typescript/semantic/grid.cjs +21 -0
- package/dist/styleD/build/typescript/semantic/grid.js +19 -0
- package/dist/styleD/build/typescript/semantic/sizing.cjs +7 -0
- package/dist/styleD/build/typescript/semantic/sizing.js +7 -0
- package/dist/types/components/grid/sandbox.d.ts +2 -2
- package/dist/types/components/intended-audience-signifier/sandbox.d.ts +2 -2
- package/dist/types/components/intended-audience-signifier/styles.d.ts +2 -0
- package/dist/types/components/layout/Layout.d.ts +11 -19
- package/dist/types/components/layout/sandbox.d.ts +1 -1
- package/dist/types/components/layout/styles.d.ts +5 -2
- package/dist/types/components/layout/types.d.ts +13 -3
- package/dist/types/index.d.ts +2 -0
- package/dist/types/layout.d.ts +3 -3
- package/dist/types/styleD/build/typescript/component/grid.d.ts +15 -2
- package/dist/types/styleD/build/typescript/component/intendedAudienceSignifier.d.ts +6 -3
- package/dist/types/styleD/build/typescript/component/layout.d.ts +5 -3
- package/dist/types/styleD/build/typescript/semantic/grid.d.ts +21 -0
- package/dist/types/styleD/build/typescript/semantic/sizing.d.ts +7 -0
- package/package.json +2 -1
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
4
|
-
var react = require('@emotion/react');
|
|
5
|
-
var React = require('react');
|
|
6
4
|
var mergeDeep = require('../../util/mergeDeep.cjs');
|
|
7
|
-
var AlertBanner = require('../alert-banner/AlertBanner.cjs');
|
|
8
|
-
var Grid = require('../grid/Grid.cjs');
|
|
9
|
-
var TopBar = require('../topbar/TopBar.cjs');
|
|
10
5
|
var styles = require('./styles.cjs');
|
|
11
6
|
|
|
12
|
-
|
|
7
|
+
const LayoutAlertBanner = ({
|
|
8
|
+
as: Component = "aside",
|
|
9
|
+
children,
|
|
10
|
+
cssOverrides,
|
|
11
|
+
...props
|
|
12
|
+
}) => {
|
|
13
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Component, { css: [styles.alertBannerLayoutStyles(), cssOverrides], ...props, children });
|
|
14
|
+
};
|
|
15
|
+
const LayoutTopBar = ({
|
|
16
|
+
as: Component = "nav",
|
|
17
|
+
children,
|
|
18
|
+
cssOverrides,
|
|
19
|
+
...props
|
|
20
|
+
}) => {
|
|
21
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Component, { css: [styles.topBarLayoutStyles(), cssOverrides], ...props, children });
|
|
22
|
+
};
|
|
23
|
+
function LayoutSidebar({
|
|
24
|
+
as: Component = "aside",
|
|
13
25
|
children,
|
|
14
26
|
layoutSmBreakpoint = "hidden",
|
|
15
27
|
theme = {},
|
|
@@ -18,97 +30,50 @@ function Sidebar({
|
|
|
18
30
|
}) {
|
|
19
31
|
const mergedTheme = mergeDeep.mergeDeep(styles.defaultSidebarTheme, theme);
|
|
20
32
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
21
|
-
|
|
33
|
+
Component,
|
|
22
34
|
{
|
|
23
|
-
css: [
|
|
35
|
+
css: [
|
|
36
|
+
styles.sidebarLayoutStyles(),
|
|
37
|
+
styles.sidebarStyles(mergedTheme, { layoutSmBreakpoint }),
|
|
38
|
+
cssOverrides
|
|
39
|
+
],
|
|
24
40
|
...props,
|
|
25
41
|
children
|
|
26
42
|
}
|
|
27
43
|
);
|
|
28
44
|
}
|
|
29
|
-
function
|
|
45
|
+
function LayoutMain({
|
|
46
|
+
as: Component = "main",
|
|
30
47
|
children,
|
|
31
48
|
fluid = true,
|
|
32
49
|
theme = {},
|
|
33
50
|
cssOverrides,
|
|
34
51
|
...props
|
|
35
52
|
}) {
|
|
36
|
-
const mergedTheme = mergeDeep.mergeDeep(styles.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
if (child.type === AlertBanner.AlertBanner) {
|
|
46
|
-
const alertBannerChild = child;
|
|
47
|
-
const alertBannerCssOverrides = Array.isArray(
|
|
48
|
-
alertBannerChild.props.cssOverrides
|
|
49
|
-
) ? alertBannerChild.props.cssOverrides : alertBannerChild.props.cssOverrides ? [alertBannerChild.props.cssOverrides] : [];
|
|
50
|
-
alertBanner ?? (alertBanner = React.cloneElement(alertBannerChild, {
|
|
51
|
-
cssOverrides: [styles.alertBannerLayoutStyles(), ...alertBannerCssOverrides]
|
|
52
|
-
}));
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
if (child.type === TopBar.TopBar) {
|
|
56
|
-
const topBarChild = child;
|
|
57
|
-
const topBarCssOverrides = Array.isArray(topBarChild.props.cssOverrides) ? topBarChild.props.cssOverrides : topBarChild.props.cssOverrides ? [topBarChild.props.cssOverrides] : [];
|
|
58
|
-
topBar ?? (topBar = React.cloneElement(topBarChild, {
|
|
59
|
-
cssOverrides: [styles.topBarLayoutStyles(), ...topBarCssOverrides]
|
|
60
|
-
}));
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
if (child.type === Sidebar) {
|
|
64
|
-
const sidebarChild = child;
|
|
65
|
-
const sidebarCssOverrides = Array.isArray(sidebarChild.props.cssOverrides) ? sidebarChild.props.cssOverrides : sidebarChild.props.cssOverrides ? [sidebarChild.props.cssOverrides] : [];
|
|
66
|
-
sidebar ?? (sidebar = React.cloneElement(sidebarChild, {
|
|
67
|
-
cssOverrides: [styles.sidebarLayoutStyles(), ...sidebarCssOverrides]
|
|
68
|
-
}));
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
if (child.type === Grid.Grid) {
|
|
72
|
-
const gridChild = child;
|
|
73
|
-
const gridCssOverrides = Array.isArray(gridChild.props.cssOverrides) ? gridChild.props.cssOverrides : gridChild.props.cssOverrides ? [gridChild.props.cssOverrides] : [];
|
|
74
|
-
main ?? (main = React.cloneElement(gridChild, {
|
|
75
|
-
as: "main",
|
|
76
|
-
cssOverrides: [
|
|
77
|
-
styles.mainLayoutStyles(mergedTheme, { fluid }),
|
|
78
|
-
...gridCssOverrides
|
|
79
|
-
]
|
|
80
|
-
}));
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
if (!main) {
|
|
84
|
-
const childWithProps = child;
|
|
85
|
-
if ("cssOverrides" in childWithProps.props) {
|
|
86
|
-
const childCssOverrides = Array.isArray(
|
|
87
|
-
childWithProps.props.cssOverrides
|
|
88
|
-
) ? childWithProps.props.cssOverrides : [childWithProps.props.cssOverrides ?? react.css``];
|
|
89
|
-
main ?? (main = React.cloneElement(childWithProps, {
|
|
90
|
-
cssOverrides: [
|
|
91
|
-
styles.mainLayoutStyles(mergedTheme, { fluid }),
|
|
92
|
-
...childCssOverrides
|
|
93
|
-
]
|
|
94
|
-
}));
|
|
95
|
-
} else {
|
|
96
|
-
main ?? (main = React.cloneElement(childWithProps, {
|
|
97
|
-
css: [
|
|
98
|
-
styles.mainLayoutStyles(mergedTheme, { fluid }),
|
|
99
|
-
childWithProps.props.css
|
|
100
|
-
]
|
|
101
|
-
}));
|
|
102
|
-
}
|
|
53
|
+
const mergedTheme = mergeDeep.mergeDeep(styles.defaultMainTheme, theme);
|
|
54
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
55
|
+
Component,
|
|
56
|
+
{
|
|
57
|
+
css: [styles.mainLayoutStyles(mergedTheme, { fluid }), cssOverrides],
|
|
58
|
+
...props,
|
|
59
|
+
children
|
|
103
60
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
function LayoutRoot({
|
|
64
|
+
children,
|
|
65
|
+
theme = {},
|
|
66
|
+
cssOverrides,
|
|
67
|
+
...props
|
|
68
|
+
}) {
|
|
69
|
+
const mergedTheme = mergeDeep.mergeDeep(styles.defaultLayoutTheme, theme);
|
|
70
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { css: [styles.layoutStyles(mergedTheme), cssOverrides], ...props, children });
|
|
111
71
|
}
|
|
72
|
+
const Layout = Object.assign(LayoutRoot, {
|
|
73
|
+
AlertBanner: LayoutAlertBanner,
|
|
74
|
+
TopBar: LayoutTopBar,
|
|
75
|
+
Sidebar: LayoutSidebar,
|
|
76
|
+
Main: LayoutMain
|
|
77
|
+
});
|
|
112
78
|
|
|
113
79
|
exports.Layout = Layout;
|
|
114
|
-
exports.Sidebar = Sidebar;
|
|
@@ -1,83 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
-
import React from 'react';
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
4
2
|
import { mergeDeep } from '../../util/mergeDeep.js';
|
|
5
|
-
import {
|
|
6
|
-
import { Grid } from '../grid/Grid.js';
|
|
7
|
-
import { TopBar } from '../topbar/TopBar.js';
|
|
8
|
-
import { alertBannerLayoutStyles, topBarLayoutStyles, sidebarLayoutStyles, mainLayoutStyles, layoutStyles, sidebarStyles, defaultSidebarTheme, defaultLayoutTheme } from './styles.js';
|
|
3
|
+
import { layoutStyles, mainLayoutStyles, sidebarLayoutStyles, sidebarStyles, topBarLayoutStyles, alertBannerLayoutStyles, defaultSidebarTheme, defaultMainTheme, defaultLayoutTheme } from './styles.js';
|
|
9
4
|
|
|
10
|
-
|
|
5
|
+
const LayoutAlertBanner = ({ as: Component = "aside", children, cssOverrides, ...props }) => {
|
|
6
|
+
return jsx(Component, { css: [alertBannerLayoutStyles(), cssOverrides], ...props, children });
|
|
7
|
+
};
|
|
8
|
+
const LayoutTopBar = ({ as: Component = "nav", children, cssOverrides, ...props }) => {
|
|
9
|
+
return jsx(Component, { css: [topBarLayoutStyles(), cssOverrides], ...props, children });
|
|
10
|
+
};
|
|
11
|
+
function LayoutSidebar({ as: Component = "aside", children, layoutSmBreakpoint = "hidden", theme = {}, cssOverrides, ...props }) {
|
|
11
12
|
const mergedTheme = mergeDeep(defaultSidebarTheme, theme);
|
|
12
|
-
return jsx(
|
|
13
|
+
return jsx(Component, { css: [
|
|
14
|
+
sidebarLayoutStyles(),
|
|
15
|
+
sidebarStyles(mergedTheme, { layoutSmBreakpoint }),
|
|
16
|
+
cssOverrides
|
|
17
|
+
], ...props, children });
|
|
13
18
|
}
|
|
14
|
-
function
|
|
19
|
+
function LayoutMain({ as: Component = "main", children, fluid = true, theme = {}, cssOverrides, ...props }) {
|
|
20
|
+
const mergedTheme = mergeDeep(defaultMainTheme, theme);
|
|
21
|
+
return jsx(Component, { css: [mainLayoutStyles(mergedTheme, { fluid }), cssOverrides], ...props, children });
|
|
22
|
+
}
|
|
23
|
+
function LayoutRoot({ children, theme = {}, cssOverrides, ...props }) {
|
|
15
24
|
const mergedTheme = mergeDeep(defaultLayoutTheme, theme);
|
|
16
|
-
|
|
17
|
-
let topBar = null;
|
|
18
|
-
let sidebar = null;
|
|
19
|
-
let main = null;
|
|
20
|
-
React.Children.forEach(children, (child) => {
|
|
21
|
-
if (!React.isValidElement(child)) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
if (child.type === AlertBanner) {
|
|
25
|
-
const alertBannerChild = child;
|
|
26
|
-
const alertBannerCssOverrides = Array.isArray(alertBannerChild.props.cssOverrides) ? alertBannerChild.props.cssOverrides : alertBannerChild.props.cssOverrides ? [alertBannerChild.props.cssOverrides] : [];
|
|
27
|
-
alertBanner ?? (alertBanner = React.cloneElement(alertBannerChild, {
|
|
28
|
-
cssOverrides: [alertBannerLayoutStyles(), ...alertBannerCssOverrides]
|
|
29
|
-
}));
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
if (child.type === TopBar) {
|
|
33
|
-
const topBarChild = child;
|
|
34
|
-
const topBarCssOverrides = Array.isArray(topBarChild.props.cssOverrides) ? topBarChild.props.cssOverrides : topBarChild.props.cssOverrides ? [topBarChild.props.cssOverrides] : [];
|
|
35
|
-
topBar ?? (topBar = React.cloneElement(topBarChild, {
|
|
36
|
-
cssOverrides: [topBarLayoutStyles(), ...topBarCssOverrides]
|
|
37
|
-
}));
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
if (child.type === Sidebar) {
|
|
41
|
-
const sidebarChild = child;
|
|
42
|
-
const sidebarCssOverrides = Array.isArray(sidebarChild.props.cssOverrides) ? sidebarChild.props.cssOverrides : sidebarChild.props.cssOverrides ? [sidebarChild.props.cssOverrides] : [];
|
|
43
|
-
sidebar ?? (sidebar = React.cloneElement(sidebarChild, {
|
|
44
|
-
cssOverrides: [sidebarLayoutStyles(), ...sidebarCssOverrides]
|
|
45
|
-
}));
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
if (child.type === Grid) {
|
|
49
|
-
const gridChild = child;
|
|
50
|
-
const gridCssOverrides = Array.isArray(gridChild.props.cssOverrides) ? gridChild.props.cssOverrides : gridChild.props.cssOverrides ? [gridChild.props.cssOverrides] : [];
|
|
51
|
-
main ?? (main = React.cloneElement(gridChild, {
|
|
52
|
-
as: "main",
|
|
53
|
-
cssOverrides: [
|
|
54
|
-
mainLayoutStyles(mergedTheme, { fluid }),
|
|
55
|
-
...gridCssOverrides
|
|
56
|
-
]
|
|
57
|
-
}));
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
if (!main) {
|
|
61
|
-
const childWithProps = child;
|
|
62
|
-
if ("cssOverrides" in childWithProps.props) {
|
|
63
|
-
const childCssOverrides = Array.isArray(childWithProps.props.cssOverrides) ? childWithProps.props.cssOverrides : [childWithProps.props.cssOverrides ?? css``];
|
|
64
|
-
main ?? (main = React.cloneElement(childWithProps, {
|
|
65
|
-
cssOverrides: [
|
|
66
|
-
mainLayoutStyles(mergedTheme, { fluid }),
|
|
67
|
-
...childCssOverrides
|
|
68
|
-
]
|
|
69
|
-
}));
|
|
70
|
-
} else {
|
|
71
|
-
main ?? (main = React.cloneElement(childWithProps, {
|
|
72
|
-
css: [
|
|
73
|
-
mainLayoutStyles(mergedTheme, { fluid }),
|
|
74
|
-
childWithProps.props.css
|
|
75
|
-
]
|
|
76
|
-
}));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
return jsxs("div", { css: [layoutStyles(mergedTheme), cssOverrides], ...props, children: [alertBanner, topBar, sidebar, main] });
|
|
25
|
+
return jsx("div", { css: [layoutStyles(mergedTheme), cssOverrides], ...props, children });
|
|
81
26
|
}
|
|
27
|
+
const Layout = Object.assign(LayoutRoot, {
|
|
28
|
+
AlertBanner: LayoutAlertBanner,
|
|
29
|
+
TopBar: LayoutTopBar,
|
|
30
|
+
Sidebar: LayoutSidebar,
|
|
31
|
+
Main: LayoutMain
|
|
32
|
+
});
|
|
82
33
|
|
|
83
|
-
export { Layout
|
|
34
|
+
export { Layout };
|
|
@@ -6,6 +6,7 @@ var mq = require('../../styleD/utils/semantic/mq.cjs');
|
|
|
6
6
|
|
|
7
7
|
const defaultLayoutTheme = layout.componentLayout["layout"];
|
|
8
8
|
const defaultSidebarTheme = layout.componentLayout["sidebar"];
|
|
9
|
+
const defaultMainTheme = layout.componentLayout["main"];
|
|
9
10
|
const alertBannerLayoutStyles = () => {
|
|
10
11
|
return react.css`
|
|
11
12
|
grid-area: alertbanner;
|
|
@@ -25,9 +26,9 @@ const mainLayoutStyles = (theme, { fluid }) => {
|
|
|
25
26
|
return react.css`
|
|
26
27
|
grid-area: main;
|
|
27
28
|
${fluid ? "" : react.css`
|
|
28
|
-
max-width: ${theme
|
|
29
|
-
margin-left: ${theme
|
|
30
|
-
margin-right: ${theme
|
|
29
|
+
max-width: ${theme["max-width"]};
|
|
30
|
+
margin-left: ${theme["margin-left"]};
|
|
31
|
+
margin-right: ${theme["margin-right"]};
|
|
31
32
|
`}
|
|
32
33
|
`;
|
|
33
34
|
};
|
|
@@ -84,6 +85,7 @@ const sidebarStyles = (theme, { layoutSmBreakpoint }) => {
|
|
|
84
85
|
|
|
85
86
|
exports.alertBannerLayoutStyles = alertBannerLayoutStyles;
|
|
86
87
|
exports.defaultLayoutTheme = defaultLayoutTheme;
|
|
88
|
+
exports.defaultMainTheme = defaultMainTheme;
|
|
87
89
|
exports.defaultSidebarTheme = defaultSidebarTheme;
|
|
88
90
|
exports.layoutStyles = layoutStyles;
|
|
89
91
|
exports.mainLayoutStyles = mainLayoutStyles;
|
|
@@ -4,6 +4,7 @@ import { from } from '../../styleD/utils/semantic/mq.js';
|
|
|
4
4
|
|
|
5
5
|
const defaultLayoutTheme = componentLayout["layout"];
|
|
6
6
|
const defaultSidebarTheme = componentLayout["sidebar"];
|
|
7
|
+
const defaultMainTheme = componentLayout["main"];
|
|
7
8
|
const alertBannerLayoutStyles = () => {
|
|
8
9
|
return css`
|
|
9
10
|
grid-area: alertbanner;
|
|
@@ -23,9 +24,9 @@ const mainLayoutStyles = (theme, { fluid }) => {
|
|
|
23
24
|
return css`
|
|
24
25
|
grid-area: main;
|
|
25
26
|
${fluid ? "" : css`
|
|
26
|
-
max-width: ${theme
|
|
27
|
-
margin-left: ${theme
|
|
28
|
-
margin-right: ${theme
|
|
27
|
+
max-width: ${theme["max-width"]};
|
|
28
|
+
margin-left: ${theme["margin-left"]};
|
|
29
|
+
margin-right: ${theme["margin-right"]};
|
|
29
30
|
`}
|
|
30
31
|
`;
|
|
31
32
|
};
|
|
@@ -80,4 +81,4 @@ const sidebarStyles = (theme, { layoutSmBreakpoint }) => {
|
|
|
80
81
|
`;
|
|
81
82
|
};
|
|
82
83
|
|
|
83
|
-
export { alertBannerLayoutStyles, defaultLayoutTheme, defaultSidebarTheme, layoutStyles, mainLayoutStyles, sidebarLayoutStyles, sidebarStyles, topBarLayoutStyles };
|
|
84
|
+
export { alertBannerLayoutStyles, defaultLayoutTheme, defaultMainTheme, defaultSidebarTheme, layoutStyles, mainLayoutStyles, sidebarLayoutStyles, sidebarStyles, topBarLayoutStyles };
|
|
@@ -4,8 +4,8 @@ var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
|
4
4
|
var reactAriaComponents = require('react-aria-components');
|
|
5
5
|
var colors = require('../../styleD/build/typescript/semantic/colors.cjs');
|
|
6
6
|
var mergeDeep = require('../../util/mergeDeep.cjs');
|
|
7
|
-
var styles = require('../typography/styles.cjs');
|
|
8
|
-
var styles
|
|
7
|
+
var styles$1 = require('../typography/styles.cjs');
|
|
8
|
+
var styles = require('./styles.cjs');
|
|
9
9
|
|
|
10
10
|
function Link({
|
|
11
11
|
children,
|
|
@@ -15,16 +15,16 @@ function Link({
|
|
|
15
15
|
className,
|
|
16
16
|
...props
|
|
17
17
|
}) {
|
|
18
|
-
const mergedTheme = mergeDeep.mergeDeep(styles
|
|
18
|
+
const mergedTheme = mergeDeep.mergeDeep(styles.defaultLinkTheme, theme);
|
|
19
19
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
20
20
|
reactAriaComponents.Link,
|
|
21
21
|
{
|
|
22
22
|
css: [
|
|
23
|
-
styles.typographyStyles(
|
|
23
|
+
styles$1.typographyStyles(
|
|
24
24
|
{ color: colors.semanticColors.text.strong },
|
|
25
25
|
{ variant: typography }
|
|
26
26
|
),
|
|
27
|
-
styles
|
|
27
|
+
styles.linkStyles(mergedTheme),
|
|
28
28
|
cssOverrides
|
|
29
29
|
],
|
|
30
30
|
className,
|
|
@@ -3,7 +3,7 @@ import { Link as Link$1 } from 'react-aria-components';
|
|
|
3
3
|
import { semanticColors } from '../../styleD/build/typescript/semantic/colors.js';
|
|
4
4
|
import { mergeDeep } from '../../util/mergeDeep.js';
|
|
5
5
|
import { typographyStyles } from '../typography/styles.js';
|
|
6
|
-
import {
|
|
6
|
+
import { defaultLinkTheme, linkStyles } from './styles.js';
|
|
7
7
|
|
|
8
8
|
function Link({ children, typography = "body-sm", theme = {}, cssOverrides, className, ...props }) {
|
|
9
9
|
const mergedTheme = mergeDeep(defaultLinkTheme, theme);
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
|
2
2
|
import { Link, composeRenderProps } from 'react-aria-components';
|
|
3
3
|
import { mergeDeep } from '../../util/mergeDeep.js';
|
|
4
4
|
import { Icon } from '../icon/Icon.js';
|
|
5
|
-
import {
|
|
5
|
+
import { defaultLinkButtonTheme, linkButtonStyles } from './styles.js';
|
|
6
6
|
|
|
7
7
|
function LinkButton({ variant = "primary", size = "md", theme = {}, cssOverrides, icon, ...props }) {
|
|
8
8
|
const mergedTheme = mergeDeep(defaultLinkButtonTheme, theme);
|
|
@@ -2,7 +2,7 @@ import { jsxs, jsx, Fragment } from '@emotion/react/jsx-runtime';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { MenuTrigger, Menu as Menu$1, MenuItem as MenuItem$1, MenuSection as MenuSection$1, Header, Separator, Popover as Popover$1 } from 'react-aria-components';
|
|
4
4
|
import { mergeDeep } from '../../util/mergeDeep.js';
|
|
5
|
-
import { menuStyles, menuItemIconStyles, menuItemLabelStyles, menuItemDescriptionStyles, menuItemAsideStyles, menuItemStyles,
|
|
5
|
+
import { defaultMenuTheme, menuStyles, defaultMenuItemTheme, menuItemIconStyles, menuItemLabelStyles, menuItemDescriptionStyles, menuItemAsideStyles, menuItemStyles, defaultMenuSectionTheme, menuSectionHeaderStyles, defaultMenuSeparatorTheme, menuSeparatorStyles, defaultMenuPopoverTheme, menuPopoverStyles } from './styles.js';
|
|
6
6
|
import { Icon } from '../icon/Icon.js';
|
|
7
7
|
|
|
8
8
|
function Popover({ size = "md", children, theme = {}, cssOverrides, ...props }) {
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Radio as Radio$1, composeRenderProps, RadioGroup as RadioGroup$1 } from 'react-aria-components';
|
|
4
4
|
import { mergeDeep } from '../../util/mergeDeep.js';
|
|
5
5
|
import { FormInputContainer } from '../form/Form.js';
|
|
6
|
-
import { radioIndicatorStyles, radioStyles, radioGroupStyles
|
|
6
|
+
import { defaultRadioGroupTheme, radioIndicatorStyles, radioStyles, radioGroupStyles } from './styles.js';
|
|
7
7
|
|
|
8
8
|
function RadioGroup({ size = "md", isInvalid = false, theme = {}, children, ...props }) {
|
|
9
9
|
const mergedTheme = mergeDeep(defaultRadioGroupTheme, theme);
|
|
@@ -4,7 +4,7 @@ import { ListBoxItem, Select as Select$1, Button, SelectValue, Popover, ListBox
|
|
|
4
4
|
import { mergeDeep } from '../../util/mergeDeep.js';
|
|
5
5
|
import { FormInputContainer } from '../form/Form.js';
|
|
6
6
|
import { Icon } from '../icon/Icon.js';
|
|
7
|
-
import { listBoxItemStyles, buttonStyles, popoverStyles,
|
|
7
|
+
import { defaultSelectTheme, listBoxItemStyles, buttonStyles, popoverStyles, listBoxStyles } from './styles.js';
|
|
8
8
|
|
|
9
9
|
function Option({ children, theme = {} }) {
|
|
10
10
|
const mergedTheme = mergeDeep(defaultSelectTheme, theme);
|
|
@@ -2,7 +2,7 @@ import { jsx } from '@emotion/react/jsx-runtime';
|
|
|
2
2
|
import { TextField, TextArea as TextArea$1 } from 'react-aria-components';
|
|
3
3
|
import { mergeDeep } from '../../util/mergeDeep.js';
|
|
4
4
|
import { FormInputContainer } from '../form/Form.js';
|
|
5
|
-
import {
|
|
5
|
+
import { defaultTextAreaTheme, textAreaStyles } from './styles.js';
|
|
6
6
|
|
|
7
7
|
function TextArea({ size = "md", isInvalid = false, theme = {}, placeholder, ...props }) {
|
|
8
8
|
const mergedTheme = mergeDeep(defaultTextAreaTheme, theme);
|
|
@@ -2,7 +2,7 @@ import { jsx } from '@emotion/react/jsx-runtime';
|
|
|
2
2
|
import { TextField, Input } from 'react-aria-components';
|
|
3
3
|
import { mergeDeep } from '../../util/mergeDeep.js';
|
|
4
4
|
import { FormInputContainer } from '../form/Form.js';
|
|
5
|
-
import {
|
|
5
|
+
import { defaultTextInputTheme, textInputStyles } from './styles.js';
|
|
6
6
|
|
|
7
7
|
function TextInput({ size = "md", isInvalid = false, theme = {}, placeholder, ...props }) {
|
|
8
8
|
const mergedTheme = mergeDeep(defaultTextInputTheme, theme);
|
|
@@ -5,7 +5,7 @@ import { mergeDeep } from '../../util/mergeDeep.js';
|
|
|
5
5
|
import { useResize } from '../../util/useResize.js';
|
|
6
6
|
import { Avatar } from '../avatar/Avatar.js';
|
|
7
7
|
import { Icon } from '../icon/Icon.js';
|
|
8
|
-
import { topBarCollapsedNavMenuButtonStyles, topBarCollapsedNavMenuPopoverStyles, topBarContainerStyles, topBarSpacerStyles, topBarStyles
|
|
8
|
+
import { defaultTopBarTheme, topBarCollapsedNavMenuButtonStyles, topBarCollapsedNavMenuPopoverStyles, topBarContainerStyles, topBarSpacerStyles, topBarStyles } from './styles.js';
|
|
9
9
|
import { TopBarItem } from './topBarItem/TopBarItem.js';
|
|
10
10
|
import { TopBarNavigation } from './topBarNavigation/TopBarNavigation.js';
|
|
11
11
|
import { TopBarToolName } from './topBarToolName/TopBarToolName.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { mergeDeep } from '../../../util/mergeDeep.js';
|
|
3
|
-
import {
|
|
3
|
+
import { defaultTopBarItemTheme, topBarItemStyles } from './styles.js';
|
|
4
4
|
|
|
5
5
|
function TopBarItem({ children, alignment = "left", theme = {}, cssOverrides, className, size = "md", _menuOpen, ...props }) {
|
|
6
6
|
const mergedTheme = mergeDeep(defaultTopBarItemTheme, theme);
|
|
@@ -3,7 +3,7 @@ import { Pressable, Link } from 'react-aria-components';
|
|
|
3
3
|
import { mergeDeep } from '../../../util/mergeDeep.js';
|
|
4
4
|
import { Icon } from '../../icon/Icon.js';
|
|
5
5
|
import { Menu, MenuToggle } from '../../menu/Menu.js';
|
|
6
|
-
import { topBarNavigationTextStyles, topBarMenuIndicatorStyles, topBarNavigationStyles, topBarNavigationTypographyStyles, topBarNavigationDividerStyles
|
|
6
|
+
import { defaultTopBarNavigationTheme, topBarNavigationTextStyles, topBarMenuIndicatorStyles, topBarNavigationStyles, topBarNavigationTypographyStyles, topBarNavigationDividerStyles } from './styles.js';
|
|
7
7
|
|
|
8
8
|
const menuIndicator = "keyboard_arrow_down";
|
|
9
9
|
function TopBarNavigation({ text, size = "md", isSelected = false, icon, menuChildren, href, onPress, isDisabled, alignment = "left", theme = {}, cssOverrides, className, _menuOpen, ...props }) {
|
|
@@ -4,7 +4,7 @@ import { mergeDeep } from '../../../util/mergeDeep.js';
|
|
|
4
4
|
import { Favicon } from '../../favicon/Favicon.js';
|
|
5
5
|
import { Icon } from '../../icon/Icon.js';
|
|
6
6
|
import { TopBarItem } from '../topBarItem/TopBarItem.js';
|
|
7
|
-
import { toolNameHoverLinkTextExpandedStyles, toolNameHoverLinkTextCollapsedStyles, toolNameHoverLinkStyles, toolNameLinkStyles,
|
|
7
|
+
import { defaultToolNameTheme, toolNameHoverLinkTextExpandedStyles, toolNameHoverLinkTextCollapsedStyles, toolNameHoverLinkStyles, toolNameLinkStyles, toolNameTypography, dividerStyles, subsectionTypography, subsectionStyles, toolNameStyles } from './styles.js';
|
|
8
8
|
|
|
9
9
|
function ToolName({ name, favicon, subsection, subsectionIcon, collapseBelow = "lg", theme = {}, cssOverrides }) {
|
|
10
10
|
const mergedTheme = mergeDeep(defaultToolNameTheme, theme);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import { mergeDeep } from '../../util/mergeDeep.js';
|
|
3
|
-
import {
|
|
3
|
+
import { defaultTypographyTheme, typographyStyles } from './styles.js';
|
|
4
4
|
|
|
5
5
|
const Typography = ({ element = "span", variant = "body-md", children, cssOverrides, theme = {}, ...props }) => {
|
|
6
6
|
const mergedTheme = mergeDeep(defaultTypographyTheme, theme);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var react = require('@emotion/react');
|
|
4
|
-
var typography
|
|
5
|
-
var typography = require('../../styleD/utils/semantic/typography.cjs');
|
|
6
|
-
var typography$
|
|
4
|
+
var typography = require('../../styleD/build/typescript/component/typography.cjs');
|
|
5
|
+
var typography$1 = require('../../styleD/utils/semantic/typography.cjs');
|
|
6
|
+
var typography$2 = require('../../styleD/build/typescript/semantic/typography.cjs');
|
|
7
7
|
|
|
8
|
-
const defaultTypographyTheme = typography
|
|
8
|
+
const defaultTypographyTheme = typography.componentTypography;
|
|
9
9
|
const typographyStyles = (theme, { variant }) => react.css`
|
|
10
|
-
${typography.convertTypographyToEmotionStringStyle(typography$
|
|
10
|
+
${typography$1.convertTypographyToEmotionStringStyle(typography$2.semanticTypography[variant])}
|
|
11
11
|
color: ${theme.color};
|
|
12
12
|
`;
|
|
13
13
|
|
package/dist/index.cjs
CHANGED
|
@@ -30,6 +30,7 @@ var sizing = require('./styleD/build/typescript/base/sizing.cjs');
|
|
|
30
30
|
var spacing = require('./styleD/build/typescript/base/spacing.cjs');
|
|
31
31
|
var typography = require('./styleD/build/typescript/base/typography.cjs');
|
|
32
32
|
var colors$1 = require('./styleD/build/typescript/semantic/colors.cjs');
|
|
33
|
+
var grid$1 = require('./styleD/build/typescript/semantic/grid.cjs');
|
|
33
34
|
var typography$2 = require('./styleD/build/typescript/semantic/typography.cjs');
|
|
34
35
|
var sizing$1 = require('./styleD/build/typescript/semantic/sizing.cjs');
|
|
35
36
|
var shadow = require('./styleD/build/typescript/semantic/shadow.cjs');
|
|
@@ -67,6 +68,7 @@ exports.baseSizing = sizing.baseSizing;
|
|
|
67
68
|
exports.baseSpacing = spacing.baseSpacing;
|
|
68
69
|
exports.baseTypography = typography.baseTypography;
|
|
69
70
|
exports.semanticColors = colors$1.semanticColors;
|
|
71
|
+
exports.semanticGrid = grid$1.semanticGrid;
|
|
70
72
|
exports.semanticTypography = typography$2.semanticTypography;
|
|
71
73
|
exports.semanticSizing = sizing$1.semanticSizing;
|
|
72
74
|
exports.semanticShadow = shadow.semanticShadow;
|
package/dist/index.js
CHANGED
|
@@ -28,6 +28,7 @@ export { baseSizing } from './styleD/build/typescript/base/sizing.js';
|
|
|
28
28
|
export { baseSpacing } from './styleD/build/typescript/base/spacing.js';
|
|
29
29
|
export { baseTypography } from './styleD/build/typescript/base/typography.js';
|
|
30
30
|
export { semanticColors } from './styleD/build/typescript/semantic/colors.js';
|
|
31
|
+
export { semanticGrid } from './styleD/build/typescript/semantic/grid.js';
|
|
31
32
|
export { semanticTypography } from './styleD/build/typescript/semantic/typography.js';
|
|
32
33
|
export { semanticSizing } from './styleD/build/typescript/semantic/sizing.js';
|
|
33
34
|
export { semanticShadow } from './styleD/build/typescript/semantic/shadow.js';
|
package/dist/layout.cjs
CHANGED
package/dist/layout.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Layout
|
|
1
|
+
export { Layout } from './components/layout/Layout.js';
|
|
2
2
|
export { componentLayout } from './styleD/build/typescript/component/layout.js';
|
|
@@ -5,10 +5,17 @@
|
|
|
5
5
|
:root {
|
|
6
6
|
--component-grid-shared-display: flex;
|
|
7
7
|
--component-grid-shared-width: 100%;
|
|
8
|
-
--component-grid-shared-columns: 12;
|
|
9
|
-
--component-grid-shared-gap: 8px;
|
|
10
8
|
--component-grid-shared-direction: row;
|
|
11
9
|
--component-grid-shared-wrap: wrap;
|
|
12
10
|
--component-grid-shared-justify-content: flex-start;
|
|
13
11
|
--component-grid-shared-align-items: stretch;
|
|
12
|
+
--component-grid-sm-columns: 12;
|
|
13
|
+
--component-grid-sm-gap: 16px;
|
|
14
|
+
--component-grid-sm-padding: 16px;
|
|
15
|
+
--component-grid-md-columns: 12;
|
|
16
|
+
--component-grid-md-gap: 16px;
|
|
17
|
+
--component-grid-md-padding: 24px;
|
|
18
|
+
--component-grid-lg-columns: 12;
|
|
19
|
+
--component-grid-lg-gap: 16px;
|
|
20
|
+
--component-grid-lg-padding: 24px;
|
|
14
21
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
--component-intended-audience-signifier-flex-direction: row;
|
|
8
8
|
--component-intended-audience-signifier-justify-content: center;
|
|
9
9
|
--component-intended-audience-signifier-align-items: center;
|
|
10
|
-
--component-intended-audience-signifier-border-color: #
|
|
10
|
+
--component-intended-audience-signifier-border-color: #cccccc;
|
|
11
11
|
--component-intended-audience-signifier-border-width: 1px;
|
|
12
12
|
--component-intended-audience-signifier-border-style: solid;
|
|
13
13
|
--component-intended-audience-signifier-border-radius: 0.125rem;
|
|
@@ -15,11 +15,13 @@
|
|
|
15
15
|
--component-intended-audience-signifier-padding-x: 4px;
|
|
16
16
|
--component-intended-audience-signifier-box-sizing: border-box;
|
|
17
17
|
--component-intended-audience-signifier-width: fit-content;
|
|
18
|
-
--component-intended-audience-signifier-gap:
|
|
18
|
+
--component-intended-audience-signifier-gap: 4px;
|
|
19
19
|
--component-intended-audience-signifier-svg-height: unset;
|
|
20
20
|
--component-intended-audience-signifier-svg-width: unset;
|
|
21
|
+
--component-intended-audience-signifier-chevron-fill: #545454;
|
|
22
|
+
--component-intended-audience-signifier-chevron-size: 10px;
|
|
21
23
|
--component-intended-audience-signifier-color: #545454;
|
|
22
|
-
--component-intended-audience-signifier-typography-font
|
|
23
|
-
|
|
24
|
+
--component-intended-audience-signifier-typography-font: normal 460
|
|
25
|
+
0.75rem/1.3 'Open Sans';
|
|
24
26
|
--component-intended-audience-signifier-typography-line-height: 1;
|
|
25
27
|
}
|
|
@@ -6,9 +6,6 @@
|
|
|
6
6
|
--component-layout-layout-shared-display: grid;
|
|
7
7
|
--component-layout-layout-shared-min-height: 100svh;
|
|
8
8
|
--component-layout-layout-shared-width: 100%;
|
|
9
|
-
--component-layout-layout-shared-max-width: 1584px;
|
|
10
|
-
--component-layout-layout-shared-margin-left: auto;
|
|
11
|
-
--component-layout-layout-shared-margin-right: auto;
|
|
12
9
|
--component-layout-layout-sm-grid-template-areas: 'alertbanner' 'topbar'
|
|
13
10
|
'sidebar' 'main';
|
|
14
11
|
--component-layout-layout-sm-grid-template-columns: 1fr;
|
|
@@ -26,5 +23,8 @@
|
|
|
26
23
|
--component-layout-sidebar-sm-above-grid-display: block;
|
|
27
24
|
--component-layout-sidebar-md-display: block;
|
|
28
25
|
--component-layout-sidebar-md-width: 200px;
|
|
29
|
-
--component-layout-sidebar-lg-width:
|
|
26
|
+
--component-layout-sidebar-lg-width: 280px;
|
|
27
|
+
--component-layout-main-max-width: 1584px;
|
|
28
|
+
--component-layout-main-margin-left: auto;
|
|
29
|
+
--component-layout-main-margin-right: auto;
|
|
30
30
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
--semantic-grid-gutter-lg-px: 16px;
|
|
7
|
+
--semantic-grid-gutter-md-px: 16px;
|
|
8
|
+
--semantic-grid-gutter-sm-px: 16px;
|
|
9
|
+
--semantic-grid-margin-lg-px: 24px;
|
|
10
|
+
--semantic-grid-margin-md-px: 24px;
|
|
11
|
+
--semantic-grid-margin-sm-px: 16px;
|
|
12
|
+
--semantic-grid-columns-lg: 12;
|
|
13
|
+
--semantic-grid-columns-md: 12;
|
|
14
|
+
--semantic-grid-columns-sm: 12;
|
|
15
|
+
}
|
|
@@ -15,4 +15,7 @@
|
|
|
15
15
|
--semantic-sizing-border-default: 0.0625rem;
|
|
16
16
|
--semantic-sizing-border-md: 0.125rem;
|
|
17
17
|
--semantic-sizing-border-extra-wide: 0.5rem;
|
|
18
|
+
--semantic-sizing-sidebar-md-px: 200px;
|
|
19
|
+
--semantic-sizing-sidebar-lg-px: 280px;
|
|
20
|
+
--semantic-sizing-layout-max-width-px: 1584px;
|
|
18
21
|
}
|