@guardian/stand 0.0.41 → 0.0.43
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/IntendedAudienceSignifier/IntendedAudienceSignifier.cjs +20 -39
- package/dist/components/IntendedAudienceSignifier/IntendedAudienceSignifier.d.cts +1 -1
- package/dist/components/IntendedAudienceSignifier/IntendedAudienceSignifier.d.ts +1 -1
- package/dist/components/IntendedAudienceSignifier/IntendedAudienceSignifier.js +21 -40
- package/dist/components/IntendedAudienceSignifier/types.d.cts +3 -4
- package/dist/components/IntendedAudienceSignifier/types.d.ts +3 -4
- package/dist/components/Layout/Layout.cjs +6 -2
- package/dist/components/Layout/Layout.js +6 -2
- package/dist/components/Layout/styles.cjs +27 -1
- package/dist/components/Layout/styles.js +27 -1
- package/dist/components/Layout/types.d.cts +10 -0
- package/dist/components/Layout/types.d.ts +10 -0
- package/dist/index.cjs +4 -0
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/styleD/build/css/base/typography.css +2 -2
- package/dist/styleD/build/css/component/alertBanner.css +1 -1
- package/dist/styleD/build/css/component/autocomplete.css +1 -1
- package/dist/styleD/build/css/component/avatar.css +1 -1
- package/dist/styleD/build/css/component/button.css +3 -3
- package/dist/styleD/build/css/component/checkbox.css +2 -2
- package/dist/styleD/build/css/component/datePicker.css +1 -1
- package/dist/styleD/build/css/component/favicon.css +1 -1
- package/dist/styleD/build/css/component/form.css +1 -1
- package/dist/styleD/build/css/component/inlineMessage.css +1 -1
- package/dist/styleD/build/css/component/layout.css +6 -0
- package/dist/styleD/build/css/component/menu.css +3 -3
- package/dist/styleD/build/css/component/radioGroup.css +3 -3
- package/dist/styleD/build/css/component/select.css +2 -2
- package/dist/styleD/build/css/component/tagTable.css +1 -1
- package/dist/styleD/build/css/component/textArea.css +2 -2
- package/dist/styleD/build/css/component/textInput.css +2 -2
- package/dist/styleD/build/css/component/topBar.css +2 -2
- package/dist/styleD/build/css/component/userMenu.css +6 -6
- package/dist/styleD/build/css/semantic/breakpoints.css +1 -1
- package/dist/styleD/build/css/semantic/colors.css +1 -0
- package/dist/styleD/build/css/semantic/grid.css +6 -0
- package/dist/styleD/build/css/semantic/radius.css +9 -0
- package/dist/styleD/build/css/semantic/spacing.css +12 -0
- package/dist/styleD/build/css/semantic/typography.css +61 -61
- package/dist/styleD/build/typescript/component/layout.cjs +13 -1
- package/dist/styleD/build/typescript/component/layout.d.cts +18 -0
- package/dist/styleD/build/typescript/component/layout.d.ts +18 -0
- package/dist/styleD/build/typescript/component/layout.js +13 -1
- package/dist/styleD/build/typescript/semantic/colors.cjs +2 -1
- package/dist/styleD/build/typescript/semantic/colors.d.cts +1 -0
- package/dist/styleD/build/typescript/semantic/colors.d.ts +1 -0
- package/dist/styleD/build/typescript/semantic/colors.js +2 -1
- package/dist/styleD/build/typescript/semantic/grid.cjs +7 -1
- package/dist/styleD/build/typescript/semantic/grid.d.cts +6 -0
- package/dist/styleD/build/typescript/semantic/grid.d.ts +6 -0
- package/dist/styleD/build/typescript/semantic/grid.js +7 -1
- package/dist/styleD/build/typescript/semantic/radius.cjs +11 -0
- package/dist/styleD/build/typescript/semantic/radius.d.cts +12 -0
- package/dist/styleD/build/typescript/semantic/radius.d.ts +12 -0
- package/dist/styleD/build/typescript/semantic/radius.js +11 -0
- package/dist/styleD/build/typescript/semantic/spacing.cjs +14 -0
- package/dist/styleD/build/typescript/semantic/spacing.d.cts +15 -0
- package/dist/styleD/build/typescript/semantic/spacing.d.ts +15 -0
- package/dist/styleD/build/typescript/semantic/spacing.js +14 -0
- package/package.json +3 -1
|
@@ -4,66 +4,47 @@ const require_FlagIcons = require("./FlagIcons.cjs");
|
|
|
4
4
|
const require_styles = require("./styles.cjs");
|
|
5
5
|
let _emotion_react_jsx_runtime = require("@emotion/react/jsx-runtime");
|
|
6
6
|
//#region src/components/IntendedAudienceSignifier/IntendedAudienceSignifier.tsx
|
|
7
|
-
const
|
|
7
|
+
const icons = {
|
|
8
8
|
UK: require_FlagIcons.ukFlag,
|
|
9
9
|
US: require_FlagIcons.usFlag,
|
|
10
10
|
AUS: require_FlagIcons.auFlag,
|
|
11
|
-
|
|
11
|
+
global: require_FlagIcons.globeIcon
|
|
12
12
|
};
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
const getIntendedAudienceIconElement = (source, audience) => {
|
|
18
|
-
if (audience === "Domestic for Domestic") return getSourceIconElement(source, audience);
|
|
19
|
-
if (audience === "Global" || audience === "Domestic For Global") return require_FlagIcons.globeIcon;
|
|
20
|
-
return sourceIcons[audience];
|
|
21
|
-
};
|
|
22
|
-
const getSourceDescription = (source, audience) => {
|
|
23
|
-
switch (audience) {
|
|
24
|
-
case "Global": return "Global";
|
|
25
|
-
case "Domestic For Global":
|
|
26
|
-
case "Domestic for Domestic":
|
|
13
|
+
const getSourceDescription = (source) => {
|
|
14
|
+
switch (source) {
|
|
15
|
+
case "global": return "Global";
|
|
27
16
|
case "UK":
|
|
28
17
|
case "US":
|
|
29
18
|
case "AUS": return source;
|
|
30
19
|
}
|
|
31
20
|
};
|
|
32
|
-
const
|
|
33
|
-
switch (
|
|
34
|
-
case "Global"
|
|
35
|
-
case "Domestic For Global": return "Global";
|
|
36
|
-
case "Domestic for Domestic": return "Domestic";
|
|
21
|
+
const getTargetDescription = (source, target) => {
|
|
22
|
+
switch (target) {
|
|
23
|
+
case "global": return "Global";
|
|
37
24
|
case "UK":
|
|
38
25
|
case "US":
|
|
39
|
-
case "AUS": return
|
|
26
|
+
case "AUS": return target === source ? "Domestic" : target;
|
|
40
27
|
}
|
|
41
28
|
};
|
|
42
|
-
const getSignifierDescription = (source, audience) => {
|
|
43
|
-
return `${getSourceDescription(source, audience)} article for ${getAudienceDescription(source, audience)} audience`;
|
|
44
|
-
};
|
|
45
29
|
const AUDIENCE_NOT_KNOWN_DESCRIPTION = "Intended audience unknown";
|
|
46
|
-
|
|
30
|
+
const getSignifierDescription = (source, target) => {
|
|
31
|
+
if (!source || !target) return AUDIENCE_NOT_KNOWN_DESCRIPTION;
|
|
32
|
+
return `${getSourceDescription(source)} article for ${getTargetDescription(source, target)} audience`;
|
|
33
|
+
};
|
|
34
|
+
function IntendedAudienceSignifier({ source, target, theme = {}, cssOverrides, className, ...props }) {
|
|
47
35
|
const mergedTheme = require_mergeDeep.mergeDeep(require_styles.defaultIntendedAudienceSignifierTheme, theme);
|
|
48
|
-
|
|
49
|
-
...props,
|
|
50
|
-
className,
|
|
51
|
-
css: [require_styles.intendedAudienceSignifierStyles(mergedTheme), cssOverrides],
|
|
52
|
-
"aria-label": AUDIENCE_NOT_KNOWN_DESCRIPTION,
|
|
53
|
-
children: /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("span", { children: "Don‘t know" })
|
|
54
|
-
});
|
|
36
|
+
const description = getSignifierDescription(source, target);
|
|
55
37
|
const iconStyles = require_styles.intendedAudienceSignifierIconStyles(mergedTheme);
|
|
56
38
|
const chevronIconStyles = require_styles.intendedAudienceSignifierChevronIconStyles(mergedTheme);
|
|
57
|
-
|
|
58
|
-
return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsxs)("div", {
|
|
39
|
+
return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("div", {
|
|
59
40
|
...props,
|
|
60
41
|
className,
|
|
61
42
|
css: [require_styles.intendedAudienceSignifierStyles(mergedTheme), cssOverrides],
|
|
62
43
|
"aria-label": description,
|
|
63
|
-
children: [
|
|
44
|
+
children: target && source ? /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsxs)(_emotion_react_jsx_runtime.Fragment, { children: [
|
|
64
45
|
/* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("div", {
|
|
65
46
|
css: iconStyles,
|
|
66
|
-
children:
|
|
47
|
+
children: icons[source]
|
|
67
48
|
}),
|
|
68
49
|
/* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("div", {
|
|
69
50
|
css: chevronIconStyles,
|
|
@@ -71,9 +52,9 @@ function IntendedAudienceSignifier({ source, intendedAudience, theme = {}, cssOv
|
|
|
71
52
|
}),
|
|
72
53
|
/* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("div", {
|
|
73
54
|
css: iconStyles,
|
|
74
|
-
children:
|
|
55
|
+
children: icons[target]
|
|
75
56
|
})
|
|
76
|
-
]
|
|
57
|
+
] }) : /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("span", { children: "Don‘t know" })
|
|
77
58
|
});
|
|
78
59
|
}
|
|
79
60
|
//#endregion
|
|
@@ -3,7 +3,7 @@ import { IntendedAudienceSignifierProps } from "./types.cjs";
|
|
|
3
3
|
//#region src/components/IntendedAudienceSignifier/IntendedAudienceSignifier.d.ts
|
|
4
4
|
declare function IntendedAudienceSignifier({
|
|
5
5
|
source,
|
|
6
|
-
|
|
6
|
+
target,
|
|
7
7
|
theme,
|
|
8
8
|
cssOverrides,
|
|
9
9
|
className,
|
|
@@ -3,7 +3,7 @@ import { IntendedAudienceSignifierProps } from "./types.js";
|
|
|
3
3
|
//#region src/components/IntendedAudienceSignifier/IntendedAudienceSignifier.d.ts
|
|
4
4
|
declare function IntendedAudienceSignifier({
|
|
5
5
|
source,
|
|
6
|
-
|
|
6
|
+
target,
|
|
7
7
|
theme,
|
|
8
8
|
cssOverrides,
|
|
9
9
|
className,
|
|
@@ -1,68 +1,49 @@
|
|
|
1
1
|
import { mergeDeep } from "../../util/mergeDeep.js";
|
|
2
2
|
import { DoubleChevronRightSvg, auFlag, globeIcon, ukFlag, usFlag } from "./FlagIcons.js";
|
|
3
3
|
import { defaultIntendedAudienceSignifierTheme, intendedAudienceSignifierChevronIconStyles, intendedAudienceSignifierIconStyles, intendedAudienceSignifierStyles } from "./styles.js";
|
|
4
|
-
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
5
5
|
//#region src/components/IntendedAudienceSignifier/IntendedAudienceSignifier.tsx
|
|
6
|
-
const
|
|
6
|
+
const icons = {
|
|
7
7
|
UK: ukFlag,
|
|
8
8
|
US: usFlag,
|
|
9
9
|
AUS: auFlag,
|
|
10
|
-
|
|
10
|
+
global: globeIcon
|
|
11
11
|
};
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
16
|
-
const getIntendedAudienceIconElement = (source, audience) => {
|
|
17
|
-
if (audience === "Domestic for Domestic") return getSourceIconElement(source, audience);
|
|
18
|
-
if (audience === "Global" || audience === "Domestic For Global") return globeIcon;
|
|
19
|
-
return sourceIcons[audience];
|
|
20
|
-
};
|
|
21
|
-
const getSourceDescription = (source, audience) => {
|
|
22
|
-
switch (audience) {
|
|
23
|
-
case "Global": return "Global";
|
|
24
|
-
case "Domestic For Global":
|
|
25
|
-
case "Domestic for Domestic":
|
|
12
|
+
const getSourceDescription = (source) => {
|
|
13
|
+
switch (source) {
|
|
14
|
+
case "global": return "Global";
|
|
26
15
|
case "UK":
|
|
27
16
|
case "US":
|
|
28
17
|
case "AUS": return source;
|
|
29
18
|
}
|
|
30
19
|
};
|
|
31
|
-
const
|
|
32
|
-
switch (
|
|
33
|
-
case "Global"
|
|
34
|
-
case "Domestic For Global": return "Global";
|
|
35
|
-
case "Domestic for Domestic": return "Domestic";
|
|
20
|
+
const getTargetDescription = (source, target) => {
|
|
21
|
+
switch (target) {
|
|
22
|
+
case "global": return "Global";
|
|
36
23
|
case "UK":
|
|
37
24
|
case "US":
|
|
38
|
-
case "AUS": return
|
|
25
|
+
case "AUS": return target === source ? "Domestic" : target;
|
|
39
26
|
}
|
|
40
27
|
};
|
|
41
|
-
const getSignifierDescription = (source, audience) => {
|
|
42
|
-
return `${getSourceDescription(source, audience)} article for ${getAudienceDescription(source, audience)} audience`;
|
|
43
|
-
};
|
|
44
28
|
const AUDIENCE_NOT_KNOWN_DESCRIPTION = "Intended audience unknown";
|
|
45
|
-
|
|
29
|
+
const getSignifierDescription = (source, target) => {
|
|
30
|
+
if (!source || !target) return AUDIENCE_NOT_KNOWN_DESCRIPTION;
|
|
31
|
+
return `${getSourceDescription(source)} article for ${getTargetDescription(source, target)} audience`;
|
|
32
|
+
};
|
|
33
|
+
function IntendedAudienceSignifier({ source, target, theme = {}, cssOverrides, className, ...props }) {
|
|
46
34
|
const mergedTheme = mergeDeep(defaultIntendedAudienceSignifierTheme, theme);
|
|
47
|
-
|
|
48
|
-
...props,
|
|
49
|
-
className,
|
|
50
|
-
css: [intendedAudienceSignifierStyles(mergedTheme), cssOverrides],
|
|
51
|
-
"aria-label": AUDIENCE_NOT_KNOWN_DESCRIPTION,
|
|
52
|
-
children: /* @__PURE__ */ jsx("span", { children: "Don‘t know" })
|
|
53
|
-
});
|
|
35
|
+
const description = getSignifierDescription(source, target);
|
|
54
36
|
const iconStyles = intendedAudienceSignifierIconStyles(mergedTheme);
|
|
55
37
|
const chevronIconStyles = intendedAudienceSignifierChevronIconStyles(mergedTheme);
|
|
56
|
-
|
|
57
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
38
|
+
return /* @__PURE__ */ jsx("div", {
|
|
58
39
|
...props,
|
|
59
40
|
className,
|
|
60
41
|
css: [intendedAudienceSignifierStyles(mergedTheme), cssOverrides],
|
|
61
42
|
"aria-label": description,
|
|
62
|
-
children: [
|
|
43
|
+
children: target && source ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
63
44
|
/* @__PURE__ */ jsx("div", {
|
|
64
45
|
css: iconStyles,
|
|
65
|
-
children:
|
|
46
|
+
children: icons[source]
|
|
66
47
|
}),
|
|
67
48
|
/* @__PURE__ */ jsx("div", {
|
|
68
49
|
css: chevronIconStyles,
|
|
@@ -70,9 +51,9 @@ function IntendedAudienceSignifier({ source, intendedAudience, theme = {}, cssOv
|
|
|
70
51
|
}),
|
|
71
52
|
/* @__PURE__ */ jsx("div", {
|
|
72
53
|
css: iconStyles,
|
|
73
|
-
children:
|
|
54
|
+
children: icons[target]
|
|
74
55
|
})
|
|
75
|
-
]
|
|
56
|
+
] }) : /* @__PURE__ */ jsx("span", { children: "Don‘t know" })
|
|
76
57
|
});
|
|
77
58
|
}
|
|
78
59
|
//#endregion
|
|
@@ -2,11 +2,10 @@ import { DefaultProps } from "../../util/types.cjs";
|
|
|
2
2
|
import { IntendedAudienceSignifierTheme } from "./styles.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/components/IntendedAudienceSignifier/types.d.ts
|
|
5
|
-
type
|
|
6
|
-
type IntendedAudience = 'Global' | 'Domestic for Domestic' | 'Domestic For Global' | "Don't know" | 'UK' | 'US' | 'AUS';
|
|
5
|
+
type SourceOrTarget = 'global' | 'UK' | 'US' | 'AUS';
|
|
7
6
|
interface IntendedAudienceSignifierProps extends DefaultProps<IntendedAudienceSignifierTheme> {
|
|
8
|
-
source
|
|
9
|
-
|
|
7
|
+
source?: SourceOrTarget;
|
|
8
|
+
target?: SourceOrTarget;
|
|
10
9
|
}
|
|
11
10
|
//#endregion
|
|
12
11
|
export { IntendedAudienceSignifierProps };
|
|
@@ -2,11 +2,10 @@ import { DefaultProps } from "../../util/types.js";
|
|
|
2
2
|
import { IntendedAudienceSignifierTheme } from "./styles.js";
|
|
3
3
|
|
|
4
4
|
//#region src/components/IntendedAudienceSignifier/types.d.ts
|
|
5
|
-
type
|
|
6
|
-
type IntendedAudience = 'Global' | 'Domestic for Domestic' | 'Domestic For Global' | "Don't know" | 'UK' | 'US' | 'AUS';
|
|
5
|
+
type SourceOrTarget = 'global' | 'UK' | 'US' | 'AUS';
|
|
7
6
|
interface IntendedAudienceSignifierProps extends DefaultProps<IntendedAudienceSignifierTheme> {
|
|
8
|
-
source
|
|
9
|
-
|
|
7
|
+
source?: SourceOrTarget;
|
|
8
|
+
target?: SourceOrTarget;
|
|
10
9
|
}
|
|
11
10
|
//#endregion
|
|
12
11
|
export { IntendedAudienceSignifierProps };
|
|
@@ -45,9 +45,13 @@ function LayoutSidebar({ as: Component = "aside", children, layoutSmBreakpoint =
|
|
|
45
45
|
/**
|
|
46
46
|
* Places children into the main grid area of the Layout.
|
|
47
47
|
*/
|
|
48
|
-
function LayoutMain({ as: Component = "main", children, fluid = true, theme = {}, cssOverrides, ...props }) {
|
|
48
|
+
function LayoutMain({ as: Component = "main", children, fluid = true, paddingTop = true, paddingBottom = true, theme = {}, cssOverrides, ...props }) {
|
|
49
49
|
return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(Component, {
|
|
50
|
-
css: [require_styles.mainLayoutStyles(require_mergeDeep.mergeDeep(require_styles.defaultMainTheme, theme), {
|
|
50
|
+
css: [require_styles.mainLayoutStyles(require_mergeDeep.mergeDeep(require_styles.defaultMainTheme, theme), {
|
|
51
|
+
fluid,
|
|
52
|
+
paddingTop,
|
|
53
|
+
paddingBottom
|
|
54
|
+
}), cssOverrides],
|
|
51
55
|
...props,
|
|
52
56
|
children
|
|
53
57
|
});
|
|
@@ -44,9 +44,13 @@ function LayoutSidebar({ as: Component = "aside", children, layoutSmBreakpoint =
|
|
|
44
44
|
/**
|
|
45
45
|
* Places children into the main grid area of the Layout.
|
|
46
46
|
*/
|
|
47
|
-
function LayoutMain({ as: Component = "main", children, fluid = true, theme = {}, cssOverrides, ...props }) {
|
|
47
|
+
function LayoutMain({ as: Component = "main", children, fluid = true, paddingTop = true, paddingBottom = true, theme = {}, cssOverrides, ...props }) {
|
|
48
48
|
return /* @__PURE__ */ jsx(Component, {
|
|
49
|
-
css: [mainLayoutStyles(mergeDeep(defaultMainTheme, theme), {
|
|
49
|
+
css: [mainLayoutStyles(mergeDeep(defaultMainTheme, theme), {
|
|
50
|
+
fluid,
|
|
51
|
+
paddingTop,
|
|
52
|
+
paddingBottom
|
|
53
|
+
}), cssOverrides],
|
|
50
54
|
...props,
|
|
51
55
|
children
|
|
52
56
|
});
|
|
@@ -21,7 +21,7 @@ const sidebarLayoutStyles = () => {
|
|
|
21
21
|
grid-area: sidebar;
|
|
22
22
|
`;
|
|
23
23
|
};
|
|
24
|
-
const mainLayoutStyles = (theme, { fluid }) => {
|
|
24
|
+
const mainLayoutStyles = (theme, { fluid, paddingTop, paddingBottom }) => {
|
|
25
25
|
return _emotion_react.css`
|
|
26
26
|
grid-area: main;
|
|
27
27
|
${fluid ? "" : _emotion_react.css`
|
|
@@ -29,6 +29,32 @@ const mainLayoutStyles = (theme, { fluid }) => {
|
|
|
29
29
|
margin-left: ${theme.marginLeft};
|
|
30
30
|
margin-right: ${theme.marginRight};
|
|
31
31
|
`}
|
|
32
|
+
${paddingTop ? _emotion_react.css`
|
|
33
|
+
${require_mq.from.sm} {
|
|
34
|
+
padding-top: ${theme.sm.padding.top};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
${require_mq.from.md} {
|
|
38
|
+
padding-top: ${theme.md.padding.top};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
${require_mq.from.lg} {
|
|
42
|
+
padding-top: ${theme.lg.padding.top};
|
|
43
|
+
}
|
|
44
|
+
` : ""}
|
|
45
|
+
${paddingBottom ? _emotion_react.css`
|
|
46
|
+
${require_mq.from.sm} {
|
|
47
|
+
padding-bottom: ${theme.sm.padding.bottom};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
${require_mq.from.md} {
|
|
51
|
+
padding-bottom: ${theme.md.padding.bottom};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
${require_mq.from.lg} {
|
|
55
|
+
padding-bottom: ${theme.lg.padding.bottom};
|
|
56
|
+
}
|
|
57
|
+
` : ""}
|
|
32
58
|
`;
|
|
33
59
|
};
|
|
34
60
|
const layoutStyles = (theme) => {
|
|
@@ -20,7 +20,7 @@ const sidebarLayoutStyles = () => {
|
|
|
20
20
|
grid-area: sidebar;
|
|
21
21
|
`;
|
|
22
22
|
};
|
|
23
|
-
const mainLayoutStyles = (theme, { fluid }) => {
|
|
23
|
+
const mainLayoutStyles = (theme, { fluid, paddingTop, paddingBottom }) => {
|
|
24
24
|
return css`
|
|
25
25
|
grid-area: main;
|
|
26
26
|
${fluid ? "" : css`
|
|
@@ -28,6 +28,32 @@ const mainLayoutStyles = (theme, { fluid }) => {
|
|
|
28
28
|
margin-left: ${theme.marginLeft};
|
|
29
29
|
margin-right: ${theme.marginRight};
|
|
30
30
|
`}
|
|
31
|
+
${paddingTop ? css`
|
|
32
|
+
${from.sm} {
|
|
33
|
+
padding-top: ${theme.sm.padding.top};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
${from.md} {
|
|
37
|
+
padding-top: ${theme.md.padding.top};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
${from.lg} {
|
|
41
|
+
padding-top: ${theme.lg.padding.top};
|
|
42
|
+
}
|
|
43
|
+
` : ""}
|
|
44
|
+
${paddingBottom ? css`
|
|
45
|
+
${from.sm} {
|
|
46
|
+
padding-bottom: ${theme.sm.padding.bottom};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
${from.md} {
|
|
50
|
+
padding-bottom: ${theme.md.padding.bottom};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
${from.lg} {
|
|
54
|
+
padding-bottom: ${theme.lg.padding.bottom};
|
|
55
|
+
}
|
|
56
|
+
` : ""}
|
|
31
57
|
`;
|
|
32
58
|
};
|
|
33
59
|
const layoutStyles = (theme) => {
|
|
@@ -12,6 +12,16 @@ interface MainProps extends DefaultPropsWithChildren<MainTheme>, React.HTMLAttri
|
|
|
12
12
|
* This can be used to prevent the layout from becoming too stretched on very wide screens.
|
|
13
13
|
*/
|
|
14
14
|
fluid?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* When `true`, applies vertical padding to the main content area.
|
|
17
|
+
* This is enabled by default and can be disabled when the consumer wants to handle vertical spacing themselves
|
|
18
|
+
*/
|
|
19
|
+
paddingTop?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* When `true`, applies bottom padding to the main content area.
|
|
22
|
+
* This is enabled by default, and can be disabled when the consumer wants to handle vertical spacing themselves
|
|
23
|
+
*/
|
|
24
|
+
paddingBottom?: boolean;
|
|
15
25
|
as?: React.ElementType;
|
|
16
26
|
}
|
|
17
27
|
interface SidebarProps extends DefaultPropsWithChildren<SidebarTheme>, React.HTMLAttributes<HTMLElement> {
|
|
@@ -12,6 +12,16 @@ interface MainProps extends DefaultPropsWithChildren<MainTheme>, React.HTMLAttri
|
|
|
12
12
|
* This can be used to prevent the layout from becoming too stretched on very wide screens.
|
|
13
13
|
*/
|
|
14
14
|
fluid?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* When `true`, applies vertical padding to the main content area.
|
|
17
|
+
* This is enabled by default and can be disabled when the consumer wants to handle vertical spacing themselves
|
|
18
|
+
*/
|
|
19
|
+
paddingTop?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* When `true`, applies bottom padding to the main content area.
|
|
22
|
+
* This is enabled by default, and can be disabled when the consumer wants to handle vertical spacing themselves
|
|
23
|
+
*/
|
|
24
|
+
paddingBottom?: boolean;
|
|
15
25
|
as?: React.ElementType;
|
|
16
26
|
}
|
|
17
27
|
interface SidebarProps extends DefaultPropsWithChildren<SidebarTheme>, React.HTMLAttributes<HTMLElement> {
|
package/dist/index.cjs
CHANGED
|
@@ -34,6 +34,8 @@ const require_grid$1 = require("./styleD/build/typescript/semantic/grid.cjs");
|
|
|
34
34
|
const require_typography$2 = require("./styleD/build/typescript/semantic/typography.cjs");
|
|
35
35
|
const require_sizing$1 = require("./styleD/build/typescript/semantic/sizing.cjs");
|
|
36
36
|
const require_shadow = require("./styleD/build/typescript/semantic/shadow.cjs");
|
|
37
|
+
const require_radius$1 = require("./styleD/build/typescript/semantic/radius.cjs");
|
|
38
|
+
const require_spacing$1 = require("./styleD/build/typescript/semantic/spacing.cjs");
|
|
37
39
|
exports.baseColors = require_colors.baseColors;
|
|
38
40
|
exports.baseRadius = require_radius.baseRadius;
|
|
39
41
|
exports.baseSizing = require_sizing.baseSizing;
|
|
@@ -66,6 +68,8 @@ exports.componentUserMenu = require_userMenu.componentUserMenu;
|
|
|
66
68
|
exports.semanticBreakpoints = require_breakpoints.semanticBreakpoints;
|
|
67
69
|
exports.semanticColors = require_colors$1.semanticColors;
|
|
68
70
|
exports.semanticGrid = require_grid$1.semanticGrid;
|
|
71
|
+
exports.semanticRadius = require_radius$1.semanticRadius;
|
|
69
72
|
exports.semanticShadow = require_shadow.semanticShadow;
|
|
70
73
|
exports.semanticSizing = require_sizing$1.semanticSizing;
|
|
74
|
+
exports.semanticSpacing = require_spacing$1.semanticSpacing;
|
|
71
75
|
exports.semanticTypography = require_typography$2.semanticTypography;
|
package/dist/index.d.cts
CHANGED
|
@@ -33,4 +33,6 @@ import { SemanticColors, semanticColors } from "./styleD/build/typescript/semant
|
|
|
33
33
|
import { SemanticGrid, semanticGrid } from "./styleD/build/typescript/semantic/grid.cjs";
|
|
34
34
|
import { SemanticSizing, semanticSizing } from "./styleD/build/typescript/semantic/sizing.cjs";
|
|
35
35
|
import { SemanticShadow, semanticShadow } from "./styleD/build/typescript/semantic/shadow.cjs";
|
|
36
|
-
|
|
36
|
+
import { SemanticRadius, semanticRadius } from "./styleD/build/typescript/semantic/radius.cjs";
|
|
37
|
+
import { SemanticSpacing, semanticSpacing } from "./styleD/build/typescript/semantic/spacing.cjs";
|
|
38
|
+
export { type BaseColors, type BaseRadius, type BaseSizing, type BaseSpacing, type BaseTypography, type ComponentAlertBanner, type ComponentAutocomplete, type ComponentAvatar, type ComponentButton, type ComponentByline, type ComponentCheckbox, type ComponentDatePicker, type ComponentFavicon, type ComponentForm, type ComponentGrid, type ComponentIcon, type ComponentInlineMessage, type ComponentIntendedAudienceSignifier, type ComponentLayout, type ComponentLink, type ComponentMenu, type ComponentRadioGroup, type ComponentSelect, type ComponentTagTable, type ComponentTextArea, type ComponentTextInput, type ComponentTopBar, type ComponentTypography, type ComponentUserMenu, type SemanticBreakpoints, type SemanticColors, type SemanticGrid, type SemanticRadius, type SemanticShadow, type SemanticSizing, type SemanticSpacing, type SemanticTypography, baseColors, baseRadius, baseSizing, baseSpacing, baseTypography, componentAlertBanner, componentAutocomplete, componentAvatar, componentButton, componentByline, componentCheckbox, componentDatePicker, componentFavicon, componentForm, componentGrid, componentIcon, componentInlineMessage, componentIntendedAudienceSignifier, componentLayout, componentLink, componentMenu, componentRadioGroup, componentSelect, componentTagTable, componentTextArea, componentTextInput, componentTopBar, componentTypography, componentUserMenu, semanticBreakpoints, semanticColors, semanticGrid, semanticRadius, semanticShadow, semanticSizing, semanticSpacing, semanticTypography };
|
package/dist/index.d.ts
CHANGED
|
@@ -33,4 +33,6 @@ import { SemanticColors, semanticColors } from "./styleD/build/typescript/semant
|
|
|
33
33
|
import { SemanticGrid, semanticGrid } from "./styleD/build/typescript/semantic/grid.js";
|
|
34
34
|
import { SemanticSizing, semanticSizing } from "./styleD/build/typescript/semantic/sizing.js";
|
|
35
35
|
import { SemanticShadow, semanticShadow } from "./styleD/build/typescript/semantic/shadow.js";
|
|
36
|
-
|
|
36
|
+
import { SemanticRadius, semanticRadius } from "./styleD/build/typescript/semantic/radius.js";
|
|
37
|
+
import { SemanticSpacing, semanticSpacing } from "./styleD/build/typescript/semantic/spacing.js";
|
|
38
|
+
export { type BaseColors, type BaseRadius, type BaseSizing, type BaseSpacing, type BaseTypography, type ComponentAlertBanner, type ComponentAutocomplete, type ComponentAvatar, type ComponentButton, type ComponentByline, type ComponentCheckbox, type ComponentDatePicker, type ComponentFavicon, type ComponentForm, type ComponentGrid, type ComponentIcon, type ComponentInlineMessage, type ComponentIntendedAudienceSignifier, type ComponentLayout, type ComponentLink, type ComponentMenu, type ComponentRadioGroup, type ComponentSelect, type ComponentTagTable, type ComponentTextArea, type ComponentTextInput, type ComponentTopBar, type ComponentTypography, type ComponentUserMenu, type SemanticBreakpoints, type SemanticColors, type SemanticGrid, type SemanticRadius, type SemanticShadow, type SemanticSizing, type SemanticSpacing, type SemanticTypography, baseColors, baseRadius, baseSizing, baseSpacing, baseTypography, componentAlertBanner, componentAutocomplete, componentAvatar, componentButton, componentByline, componentCheckbox, componentDatePicker, componentFavicon, componentForm, componentGrid, componentIcon, componentInlineMessage, componentIntendedAudienceSignifier, componentLayout, componentLink, componentMenu, componentRadioGroup, componentSelect, componentTagTable, componentTextArea, componentTextInput, componentTopBar, componentTypography, componentUserMenu, semanticBreakpoints, semanticColors, semanticGrid, semanticRadius, semanticShadow, semanticSizing, semanticSpacing, semanticTypography };
|
package/dist/index.js
CHANGED
|
@@ -33,4 +33,6 @@ import { semanticGrid } from "./styleD/build/typescript/semantic/grid.js";
|
|
|
33
33
|
import { semanticTypography } from "./styleD/build/typescript/semantic/typography.js";
|
|
34
34
|
import { semanticSizing } from "./styleD/build/typescript/semantic/sizing.js";
|
|
35
35
|
import { semanticShadow } from "./styleD/build/typescript/semantic/shadow.js";
|
|
36
|
-
|
|
36
|
+
import { semanticRadius } from "./styleD/build/typescript/semantic/radius.js";
|
|
37
|
+
import { semanticSpacing } from "./styleD/build/typescript/semantic/spacing.js";
|
|
38
|
+
export { baseColors, baseRadius, baseSizing, baseSpacing, baseTypography, componentAlertBanner, componentAutocomplete, componentAvatar, componentButton, componentByline, componentCheckbox, componentDatePicker, componentFavicon, componentForm, componentGrid, componentIcon, componentInlineMessage, componentIntendedAudienceSignifier, componentLayout, componentLink, componentMenu, componentRadioGroup, componentSelect, componentTagTable, componentTextArea, componentTextInput, componentTopBar, componentTypography, componentUserMenu, semanticBreakpoints, semanticColors, semanticGrid, semanticRadius, semanticShadow, semanticSizing, semanticSpacing, semanticTypography };
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
--base-typography-letter-spacing-densest-px: -1px;
|
|
52
52
|
--base-typography-letter-spacing-denser-px: -0.5px;
|
|
53
53
|
--base-typography-letter-spacing-dense-px: -0.2px;
|
|
54
|
-
--base-typography-letter-spacing-default-px:
|
|
54
|
+
--base-typography-letter-spacing-default-px: 0px;
|
|
55
55
|
--base-typography-letter-spacing-densest-rem: -0.0625rem;
|
|
56
56
|
--base-typography-letter-spacing-denser-rem: -0.03125rem;
|
|
57
57
|
--base-typography-letter-spacing-dense-rem: -0.0125rem;
|
|
58
|
-
--base-typography-letter-spacing-default-rem:
|
|
58
|
+
--base-typography-letter-spacing-default-rem: 0rem;
|
|
59
59
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
--component-alert-banner-shared-content-color: #000000;
|
|
22
22
|
--component-alert-banner-shared-content-typography-font: normal 460
|
|
23
23
|
0.875rem/1.3 'Open Sans';
|
|
24
|
-
--component-alert-banner-shared-content-typography-letter-spacing:
|
|
24
|
+
--component-alert-banner-shared-content-typography-letter-spacing: 0rem;
|
|
25
25
|
--component-alert-banner-shared-content-typography-font-width: 95;
|
|
26
26
|
--component-alert-banner-shared-content-icon-color: #545454;
|
|
27
27
|
--component-alert-banner-information-background-color: #e8f0fb;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
--component-autocomplete-listbox-border-style: solid;
|
|
15
15
|
--component-autocomplete-listbox-border-color: #8d8d8d;
|
|
16
16
|
--component-autocomplete-listbox-padding-y: 8px;
|
|
17
|
-
--component-autocomplete-listbox-padding-x:
|
|
17
|
+
--component-autocomplete-listbox-padding-x: 0px;
|
|
18
18
|
--component-autocomplete-listbox-background-color: #ffffff;
|
|
19
19
|
--component-autocomplete-listbox-item-padding-y: 8px;
|
|
20
20
|
--component-autocomplete-listbox-item-padding-x: 12px;
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
--component-avatar-shared-button-disabled-cursor: not-allowed;
|
|
77
77
|
--component-avatar-sm-size: 2rem;
|
|
78
78
|
--component-avatar-sm-typography-font: normal 700 0.75rem/1 'Open Sans';
|
|
79
|
-
--component-avatar-sm-typography-letter-spacing:
|
|
79
|
+
--component-avatar-sm-typography-letter-spacing: 0rem;
|
|
80
80
|
--component-avatar-sm-typography-font-width: 95;
|
|
81
81
|
--component-avatar-md-size: 2.5rem;
|
|
82
82
|
--component-avatar-md-typography-font: normal 700 0.875rem/1 'Open Sans';
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
--component-button-primary-xs-padding-with-icon-icon-left-left: 0.25rem;
|
|
34
34
|
--component-button-primary-xs-typography-font: normal 700 0.75rem/1
|
|
35
35
|
'Open Sans';
|
|
36
|
-
--component-button-primary-xs-typography-letter-spacing:
|
|
36
|
+
--component-button-primary-xs-typography-letter-spacing: 0rem;
|
|
37
37
|
--component-button-primary-xs-typography-font-width: 95;
|
|
38
38
|
--component-button-primary-xs-icon-size: 1.125rem;
|
|
39
39
|
--component-button-primary-xs-icon-gap: 0.25rem;
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
--component-button-secondary-xs-padding-with-icon-icon-left-left: 0.25rem;
|
|
96
96
|
--component-button-secondary-xs-typography-font: normal 700 0.75rem/1
|
|
97
97
|
'Open Sans';
|
|
98
|
-
--component-button-secondary-xs-typography-letter-spacing:
|
|
98
|
+
--component-button-secondary-xs-typography-letter-spacing: 0rem;
|
|
99
99
|
--component-button-secondary-xs-typography-font-width: 95;
|
|
100
100
|
--component-button-secondary-xs-icon-size: 1.125rem;
|
|
101
101
|
--component-button-secondary-xs-icon-gap: 0.25rem;
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
--component-button-tertiary-xs-padding-with-icon-icon-left-left: 0.25rem;
|
|
158
158
|
--component-button-tertiary-xs-typography-font: normal 700 0.75rem/1
|
|
159
159
|
'Open Sans';
|
|
160
|
-
--component-button-tertiary-xs-typography-letter-spacing:
|
|
160
|
+
--component-button-tertiary-xs-typography-letter-spacing: 0rem;
|
|
161
161
|
--component-button-tertiary-xs-typography-font-width: 95;
|
|
162
162
|
--component-button-tertiary-xs-icon-size: 1.125rem;
|
|
163
163
|
--component-button-tertiary-xs-icon-gap: 0.25rem;
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
--component-checkbox-input-shared-disabled-indicator-selected-background-color: #dcdcdc;
|
|
40
40
|
--component-checkbox-input-sm-typography-font: normal 460 0.875rem/1.3
|
|
41
41
|
'Open Sans';
|
|
42
|
-
--component-checkbox-input-sm-typography-letter-spacing:
|
|
42
|
+
--component-checkbox-input-sm-typography-letter-spacing: 0rem;
|
|
43
43
|
--component-checkbox-input-sm-typography-font-width: 95;
|
|
44
44
|
--component-checkbox-input-sm-indicator-size: 1.25rem;
|
|
45
45
|
--component-checkbox-input-md-typography-font: normal 460 1rem/1.3 'Open Sans';
|
|
46
|
-
--component-checkbox-input-md-typography-letter-spacing:
|
|
46
|
+
--component-checkbox-input-md-typography-letter-spacing: 0rem;
|
|
47
47
|
--component-checkbox-input-md-typography-font-width: 95;
|
|
48
48
|
--component-checkbox-input-md-indicator-size: 1.5rem;
|
|
49
49
|
--component-checkbox-group-shared-display: flex;
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
--component-date-picker-calendar-header-shared-button-disabled-color: #999999;
|
|
97
97
|
--component-date-picker-calendar-grid-shared-typography-font: normal 460
|
|
98
98
|
0.875rem/1.3 'Open Sans';
|
|
99
|
-
--component-date-picker-calendar-grid-shared-typography-letter-spacing:
|
|
99
|
+
--component-date-picker-calendar-grid-shared-typography-letter-spacing: 0rem;
|
|
100
100
|
--component-date-picker-calendar-grid-shared-typography-font-width: 95;
|
|
101
101
|
--component-date-picker-calendar-grid-shared-border-collapse: collapse;
|
|
102
102
|
--component-date-picker-calendar-grid-shared-border-spacing: 0;
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
--component-favicon-user-select: none;
|
|
13
13
|
--component-favicon-typography-font: normal 700 1.25rem/1.15
|
|
14
14
|
'GH Guardian Headline';
|
|
15
|
-
--component-favicon-typography-letter-spacing:
|
|
15
|
+
--component-favicon-typography-letter-spacing: 0rem;
|
|
16
16
|
--component-favicon-typography-font-width: 100;
|
|
17
17
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
--component-form-input-shared-description-color: #545454;
|
|
13
13
|
--component-form-input-shared-description-typography-font: normal 460
|
|
14
14
|
0.875rem/1.3 'Open Sans';
|
|
15
|
-
--component-form-input-shared-description-typography-letter-spacing:
|
|
15
|
+
--component-form-input-shared-description-typography-letter-spacing: 0rem;
|
|
16
16
|
--component-form-input-shared-description-typography-font-width: 95;
|
|
17
17
|
--component-form-input-shared-description-disabled-color: #999999;
|
|
18
18
|
--component-form-input-sm-label-typography-font: normal 700 0.875rem/1.15
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
--component-inline-message-shared-icon-align-self: flex-start;
|
|
11
11
|
--component-inline-message-shared-typography-font: normal 460 0.875rem/1.3
|
|
12
12
|
'Open Sans';
|
|
13
|
-
--component-inline-message-shared-typography-letter-spacing:
|
|
13
|
+
--component-inline-message-shared-typography-letter-spacing: 0rem;
|
|
14
14
|
--component-inline-message-shared-typography-font-width: 95;
|
|
15
15
|
--component-inline-message-error-color: #8c2113;
|
|
16
16
|
--component-inline-message-success-color: #326528;
|
|
@@ -27,4 +27,10 @@
|
|
|
27
27
|
--component-layout-main-max-width: 1584px;
|
|
28
28
|
--component-layout-main-margin-left: auto;
|
|
29
29
|
--component-layout-main-margin-right: auto;
|
|
30
|
+
--component-layout-main-sm-padding-top: 24px;
|
|
31
|
+
--component-layout-main-sm-padding-bottom: 64px;
|
|
32
|
+
--component-layout-main-md-padding-top: 28px;
|
|
33
|
+
--component-layout-main-md-padding-bottom: 64px;
|
|
34
|
+
--component-layout-main-lg-padding-top: 48px;
|
|
35
|
+
--component-layout-main-lg-padding-bottom: 64px;
|
|
30
36
|
}
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
--component-menu-menu-item-shared-label-color: #000000;
|
|
46
46
|
--component-menu-menu-item-shared-label-typography-font: normal 460 1rem/1.3
|
|
47
47
|
'Open Sans';
|
|
48
|
-
--component-menu-menu-item-shared-label-typography-letter-spacing:
|
|
48
|
+
--component-menu-menu-item-shared-label-typography-letter-spacing: 0rem;
|
|
49
49
|
--component-menu-menu-item-shared-label-typography-font-width: 95;
|
|
50
50
|
--component-menu-menu-item-shared-description-grid-area: description;
|
|
51
51
|
--component-menu-menu-item-shared-description-color: #545454;
|
|
52
52
|
--component-menu-menu-item-shared-description-typography-font: normal 460
|
|
53
53
|
0.875rem/1.3 'Open Sans';
|
|
54
|
-
--component-menu-menu-item-shared-description-typography-letter-spacing:
|
|
54
|
+
--component-menu-menu-item-shared-description-typography-letter-spacing: 0rem;
|
|
55
55
|
--component-menu-menu-item-shared-description-typography-font-width: 95;
|
|
56
56
|
--component-menu-menu-item-shared-aside-grid-area: aside;
|
|
57
57
|
--component-menu-menu-item-shared-aside-justify-self: end;
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
--component-menu-menu-item-shared-aside-color: #000000;
|
|
60
60
|
--component-menu-menu-item-shared-aside-typography-font: normal 460 1rem/1.3
|
|
61
61
|
'Open Sans';
|
|
62
|
-
--component-menu-menu-item-shared-aside-typography-letter-spacing:
|
|
62
|
+
--component-menu-menu-item-shared-aside-typography-letter-spacing: 0rem;
|
|
63
63
|
--component-menu-menu-item-shared-aside-typography-font-width: 95;
|
|
64
64
|
--component-menu-menu-item-shared-last-child-border-bottom: none;
|
|
65
65
|
--component-menu-menu-item-shared-hover-background-color: #f6f6f6;
|