@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.
Files changed (74) hide show
  1. package/dist/components/alert-banner/AlertBanner.js +1 -1
  2. package/dist/components/avatar/Avatar.js +1 -1
  3. package/dist/components/button/Button.js +1 -1
  4. package/dist/components/checkbox/Checkbox.js +1 -1
  5. package/dist/components/checkbox/CheckboxGroup.js +1 -1
  6. package/dist/components/date-picker/DatePicker.js +1 -1
  7. package/dist/components/grid/Grid.js +1 -1
  8. package/dist/components/grid/styles.cjs +59 -39
  9. package/dist/components/grid/styles.js +47 -35
  10. package/dist/components/icon/Icon.js +1 -1
  11. package/dist/components/icon-button/IconButton.js +1 -1
  12. package/dist/components/icon-button/styles.js +1 -1
  13. package/dist/components/icon-link-button/IconLinkButton.js +1 -1
  14. package/dist/components/icon-link-button/styles.js +1 -1
  15. package/dist/components/inline-message/InlineMessage.js +1 -1
  16. package/dist/components/intended-audience-signifier/FlagIcons.cjs +5 -16
  17. package/dist/components/intended-audience-signifier/FlagIcons.js +2 -2
  18. package/dist/components/intended-audience-signifier/IntendedAudienceSignifier.cjs +5 -6
  19. package/dist/components/intended-audience-signifier/IntendedAudienceSignifier.js +4 -2
  20. package/dist/components/intended-audience-signifier/styles.cjs +16 -2
  21. package/dist/components/intended-audience-signifier/styles.js +15 -3
  22. package/dist/components/layout/Layout.cjs +49 -84
  23. package/dist/components/layout/Layout.js +27 -76
  24. package/dist/components/layout/styles.cjs +5 -3
  25. package/dist/components/layout/styles.js +5 -4
  26. package/dist/components/link/Link.cjs +5 -5
  27. package/dist/components/link/Link.js +1 -1
  28. package/dist/components/link-button/LinkButton.js +1 -1
  29. package/dist/components/link-button/styles.js +1 -1
  30. package/dist/components/menu/Menu.js +1 -1
  31. package/dist/components/radio-group/RadioGroup.js +1 -1
  32. package/dist/components/select/Select.js +1 -1
  33. package/dist/components/text-area/TextArea.js +1 -1
  34. package/dist/components/text-input/TextInput.js +1 -1
  35. package/dist/components/topbar/TopBar.js +1 -1
  36. package/dist/components/topbar/topBarItem/TopBarItem.js +1 -1
  37. package/dist/components/topbar/topBarNavigation/TopBarNavigation.js +1 -1
  38. package/dist/components/topbar/topBarToolName/TopBarToolName.js +1 -1
  39. package/dist/components/typography/Typography.js +1 -1
  40. package/dist/components/typography/styles.cjs +5 -5
  41. package/dist/index.cjs +2 -0
  42. package/dist/index.js +1 -0
  43. package/dist/layout.cjs +0 -1
  44. package/dist/layout.js +1 -1
  45. package/dist/styleD/build/css/component/grid.css +9 -2
  46. package/dist/styleD/build/css/component/intendedAudienceSignifier.css +6 -4
  47. package/dist/styleD/build/css/component/layout.css +4 -4
  48. package/dist/styleD/build/css/semantic/grid.css +15 -0
  49. package/dist/styleD/build/css/semantic/sizing.css +3 -0
  50. package/dist/styleD/build/typescript/component/grid.cjs +15 -2
  51. package/dist/styleD/build/typescript/component/grid.js +15 -2
  52. package/dist/styleD/build/typescript/component/intendedAudienceSignifier.cjs +8 -5
  53. package/dist/styleD/build/typescript/component/intendedAudienceSignifier.js +8 -5
  54. package/dist/styleD/build/typescript/component/layout.cjs +7 -5
  55. package/dist/styleD/build/typescript/component/layout.js +7 -5
  56. package/dist/styleD/build/typescript/semantic/grid.cjs +21 -0
  57. package/dist/styleD/build/typescript/semantic/grid.js +19 -0
  58. package/dist/styleD/build/typescript/semantic/sizing.cjs +7 -0
  59. package/dist/styleD/build/typescript/semantic/sizing.js +7 -0
  60. package/dist/types/components/grid/sandbox.d.ts +2 -2
  61. package/dist/types/components/intended-audience-signifier/sandbox.d.ts +2 -2
  62. package/dist/types/components/intended-audience-signifier/styles.d.ts +2 -0
  63. package/dist/types/components/layout/Layout.d.ts +11 -19
  64. package/dist/types/components/layout/sandbox.d.ts +1 -1
  65. package/dist/types/components/layout/styles.d.ts +5 -2
  66. package/dist/types/components/layout/types.d.ts +13 -3
  67. package/dist/types/index.d.ts +2 -0
  68. package/dist/types/layout.d.ts +3 -3
  69. package/dist/types/styleD/build/typescript/component/grid.d.ts +15 -2
  70. package/dist/types/styleD/build/typescript/component/intendedAudienceSignifier.d.ts +6 -3
  71. package/dist/types/styleD/build/typescript/component/layout.d.ts +5 -3
  72. package/dist/types/styleD/build/typescript/semantic/grid.d.ts +21 -0
  73. package/dist/types/styleD/build/typescript/semantic/sizing.d.ts +7 -0
  74. package/package.json +2 -1
@@ -4,12 +4,25 @@ const componentGrid = {
4
4
  shared: {
5
5
  display: "flex",
6
6
  width: "100%",
7
- columns: 12,
8
- gap: "8px",
9
7
  direction: "row",
10
8
  wrap: "wrap",
11
9
  justifyContent: "flex-start",
12
10
  alignItems: "stretch"
11
+ },
12
+ sm: {
13
+ columns: 12,
14
+ gap: "16px",
15
+ padding: "16px"
16
+ },
17
+ md: {
18
+ columns: 12,
19
+ gap: "16px",
20
+ padding: "24px"
21
+ },
22
+ lg: {
23
+ columns: 12,
24
+ gap: "16px",
25
+ padding: "24px"
13
26
  }
14
27
  };
15
28
 
@@ -2,12 +2,25 @@ const componentGrid = {
2
2
  shared: {
3
3
  display: "flex",
4
4
  width: "100%",
5
- columns: 12,
6
- gap: "8px",
7
5
  direction: "row",
8
6
  wrap: "wrap",
9
7
  justifyContent: "flex-start",
10
8
  alignItems: "stretch"
9
+ },
10
+ sm: {
11
+ columns: 12,
12
+ gap: "16px",
13
+ padding: "16px"
14
+ },
15
+ md: {
16
+ columns: 12,
17
+ gap: "16px",
18
+ padding: "24px"
19
+ },
20
+ lg: {
21
+ columns: 12,
22
+ gap: "16px",
23
+ padding: "24px"
11
24
  }
12
25
  };
13
26
 
@@ -5,7 +5,7 @@ const componentIntendedAudienceSignifier = {
5
5
  flexDirection: "row",
6
6
  justifyContent: "center",
7
7
  alignItems: "center",
8
- borderColor: "#000000",
8
+ borderColor: "#cccccc",
9
9
  borderWidth: "1px",
10
10
  borderStyle: "solid",
11
11
  borderRadius: "0.125rem",
@@ -13,16 +13,19 @@ const componentIntendedAudienceSignifier = {
13
13
  paddingX: "4px",
14
14
  boxSizing: "border-box",
15
15
  width: "fit-content",
16
- gap: "8px",
16
+ gap: "4px",
17
17
  svg: {
18
18
  height: "unset",
19
19
  width: "unset"
20
20
  },
21
+ chevron: {
22
+ fill: "#545454",
23
+ size: "10px"
24
+ },
21
25
  color: "#545454",
22
26
  typography: {
23
- fontWeight: 400,
24
- fontSize: "0.75rem",
25
- lineHeight: 1
27
+ font: "normal 460 0.75rem/1.3 Open Sans",
28
+ lineHeight: "1"
26
29
  }
27
30
  };
28
31
 
@@ -3,7 +3,7 @@ const componentIntendedAudienceSignifier = {
3
3
  flexDirection: "row",
4
4
  justifyContent: "center",
5
5
  alignItems: "center",
6
- borderColor: "#000000",
6
+ borderColor: "#cccccc",
7
7
  borderWidth: "1px",
8
8
  borderStyle: "solid",
9
9
  borderRadius: "0.125rem",
@@ -11,16 +11,19 @@ const componentIntendedAudienceSignifier = {
11
11
  paddingX: "4px",
12
12
  boxSizing: "border-box",
13
13
  width: "fit-content",
14
- gap: "8px",
14
+ gap: "4px",
15
15
  svg: {
16
16
  height: "unset",
17
17
  width: "unset"
18
18
  },
19
+ chevron: {
20
+ fill: "#545454",
21
+ size: "10px"
22
+ },
19
23
  color: "#545454",
20
24
  typography: {
21
- fontWeight: 400,
22
- fontSize: "0.75rem",
23
- lineHeight: 1
25
+ font: "normal 460 0.75rem/1.3 Open Sans",
26
+ lineHeight: "1"
24
27
  }
25
28
  };
26
29
 
@@ -5,10 +5,7 @@ const componentLayout = {
5
5
  shared: {
6
6
  display: "grid",
7
7
  minHeight: "100svh",
8
- width: "100%",
9
- "max-width": "1584px",
10
- "margin-left": "auto",
11
- "margin-right": "auto"
8
+ width: "100%"
12
9
  },
13
10
  sm: {
14
11
  gridTemplateAreas: "'alertbanner'\n'topbar'\n'sidebar'\n'main'",
@@ -40,8 +37,13 @@ const componentLayout = {
40
37
  width: "200px"
41
38
  },
42
39
  lg: {
43
- width: "320px"
40
+ width: "280px"
44
41
  }
42
+ },
43
+ main: {
44
+ "max-width": "1584px",
45
+ "margin-left": "auto",
46
+ "margin-right": "auto"
45
47
  }
46
48
  };
47
49
 
@@ -3,10 +3,7 @@ const componentLayout = {
3
3
  shared: {
4
4
  display: "grid",
5
5
  minHeight: "100svh",
6
- width: "100%",
7
- "max-width": "1584px",
8
- "margin-left": "auto",
9
- "margin-right": "auto"
6
+ width: "100%"
10
7
  },
11
8
  sm: {
12
9
  gridTemplateAreas: "'alertbanner'\n'topbar'\n'sidebar'\n'main'",
@@ -38,8 +35,13 @@ const componentLayout = {
38
35
  width: "200px"
39
36
  },
40
37
  lg: {
41
- width: "320px"
38
+ width: "280px"
42
39
  }
40
+ },
41
+ main: {
42
+ "max-width": "1584px",
43
+ "margin-left": "auto",
44
+ "margin-right": "auto"
43
45
  }
44
46
  };
45
47
 
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ const semanticGrid = {
4
+ gutter: {
5
+ "lg-px": "16px",
6
+ "md-px": "16px",
7
+ "sm-px": "16px"
8
+ },
9
+ margin: {
10
+ "lg-px": "24px",
11
+ "md-px": "24px",
12
+ "sm-px": "16px"
13
+ },
14
+ columns: {
15
+ lg: 12,
16
+ md: 12,
17
+ sm: 12
18
+ }
19
+ };
20
+
21
+ exports.semanticGrid = semanticGrid;
@@ -0,0 +1,19 @@
1
+ const semanticGrid = {
2
+ gutter: {
3
+ "lg-px": "16px",
4
+ "md-px": "16px",
5
+ "sm-px": "16px"
6
+ },
7
+ margin: {
8
+ "lg-px": "24px",
9
+ "md-px": "24px",
10
+ "sm-px": "16px"
11
+ },
12
+ columns: {
13
+ lg: 12,
14
+ md: 12,
15
+ sm: 12
16
+ }
17
+ };
18
+
19
+ export { semanticGrid };
@@ -18,6 +18,13 @@ const semanticSizing = {
18
18
  default: "0.0625rem",
19
19
  md: "0.125rem",
20
20
  "extra-wide": "0.5rem"
21
+ },
22
+ sidebar: {
23
+ "md-px": "200px",
24
+ "lg-px": "280px"
25
+ },
26
+ layout: {
27
+ "max-width-px": "1584px"
21
28
  }
22
29
  };
23
30
 
@@ -16,6 +16,13 @@ const semanticSizing = {
16
16
  default: "0.0625rem",
17
17
  md: "0.125rem",
18
18
  "extra-wide": "0.5rem"
19
+ },
20
+ sidebar: {
21
+ "md-px": "200px",
22
+ "lg-px": "280px"
23
+ },
24
+ layout: {
25
+ "max-width-px": "1584px"
19
26
  }
20
27
  };
21
28
 
@@ -1,5 +1,5 @@
1
1
  export declare const componentName = "Grid";
2
2
  export declare const componentTsx = "import { Grid, Item } from '@guardian/stand/grid';\n\nexport const Component = () => (\n\t<Grid>\n\t\t<Item size={{ sm: 12, md: 8, lg: 6 }}>Main content - sm:12, md:8, lg:6</Item>\n\t\t<Item size={{ sm: 12, md: 4, lg: 3 }} offset={{ md: 1, lg: 2 }}>\n\t\t\tMore content - sm:12, md:4, lg:3, offset md:1, lg:2\n\t\t</Item>\n\t\t<Item size=\"auto\">Auto width</Item>\n\t\t<Item size=\"grow\">Grows to fill</Item>\n\t</Grid>\n);\n";
3
- export declare const componentCss = "\n/* import the grid styles */\n@import '@guardian/stand/component/grid.css';\n\n.stand-grid-container {\n\tdisplay: var(--component-grid-shared-display);\n\tflex-direction: row;\n\tflex-wrap: wrap;\n\tjustify-content: flex-start;\n\talign-items: stretch;\n\tgap: 16px;\n}\n\n.stand-grid-item {\n\tbox-sizing: border-box;\n\tpadding: 16px;\n\tbackground: #eff3ff;\n\tborder: 1px solid #b8c9ff;\n\tborder-radius: 6px;\n\ttext-align: center;\n}\n\n.stand-grid-item--main {\n\tflex: 0 0 calc(((100% - 11 * 16px) * 6 / 12) + 5 * 16px);\n}\n\n.stand-grid-item--sidebar {\n\tflex: 0 0 calc(((100% - 11 * 16px) * 3 / 12) + 2 * 16px);\n\tmargin-left: calc(((100% - 11 * 16px) * 1 / 12) + 1 * 16px);\n}\n\n.stand-grid-item--auto {\n\tflex: 0 0 auto;\n\twidth: auto;\n\tmax-width: none;\n\twhite-space: nowrap;\n}\n\n.stand-grid-item--grow {\n\tflex-basis: 0;\n\tflex-grow: 1;\n\tmax-width: 100%;\n}\n";
3
+ export declare const componentCss = "\n/* import the grid styles */\n@import '@guardian/stand/component/grid.css';\n\n.stand-grid-container {\n\t--gap: var(--component-grid-sm-gap);\n\tdisplay: var(--component-grid-shared-display);\n\tflex-direction: var(--component-grid-shared-direction);\n\tflex-wrap: var(--component-grid-shared-wrap);\n\tjustify-content: var(--component-grid-shared-justify-content);\n\talign-items: var(--component-grid-shared-align-items);\n\tgap: var(--gap);\n\tpadding: 0 var(--component-grid-sm-padding);\n}\n\n@media (min-width: 830px) {\n\t.stand-grid-container {\n\t\t--gap: var(--component-grid-md-gap);\n\t\tpadding: 0 var(--component-grid-md-padding);\n\t}\n}\n\n@media (min-width: 1056px) {\n\t.stand-grid-container {\n\t\t--gap: var(--component-grid-lg-gap);\n\t\tpadding: 0 var(--component-grid-lg-padding);\n\t}\n}\n\n.stand-grid-item {\n\tbox-sizing: border-box;\n\tpadding: 16px;\n\tbackground: #eff3ff;\n\tborder: 1px solid #b8c9ff;\n\tborder-radius: 6px;\n\ttext-align: center;\n}\n\n/* 6-column span: ((100% - 11 * gap) * 6 / 12) + 5 * gap */\n.stand-grid-item--main {\n\tflex: 0 0 calc(((100% - 11 * var(--gap)) * 6 / 12) + 5 * var(--gap));\n}\n\n/* 3-column span with 1-column offset */\n.stand-grid-item--sidebar {\n\tflex: 0 0 calc(((100% - 11 * var(--gap)) * 3 / 12) + 2 * var(--gap));\n\tmargin-left: calc(((100% - 11 * var(--gap)) * 1 / 12) + 1 * var(--gap));\n}\n\n.stand-grid-item--auto {\n\tflex: 0 0 auto;\n\twidth: auto;\n\tmax-width: none;\n\twhite-space: nowrap;\n}\n\n.stand-grid-item--grow {\n\tflex-basis: 0;\n\tflex-grow: 1;\n\tmax-width: 100%;\n}\n";
4
4
  export declare const componentHtml = "<div class=\"container\">\n\t<div class=\"stand-grid-container\">\n\t\t<div class=\"stand-grid-item stand-grid-item--main\">Main content</div>\n\t\t<div class=\"stand-grid-item stand-grid-item--sidebar\">Sidebar</div>\n\t\t<div class=\"stand-grid-item stand-grid-item--auto\">Auto width</div>\n\t\t<div class=\"stand-grid-item stand-grid-item--grow\">Grows to fill</div>\n\t</div>\n</div>\n";
5
- export declare const componentJs = "\nimport { componentGrid } from \"@guardian/stand\";\n\nconst containerStyle = `\n\tdisplay: ${componentGrid.shared.display};\n\tflex-direction: row;\n\tflex-wrap: wrap;\n\tjustify-content: flex-start;\n\talign-items: stretch;\n\tgap: 16px;\n`;\n\nconst itemStyle = `\n\tbox-sizing: border-box;\n\tpadding: 16px;\n\tbackground: #eff3ff;\n\tborder: 1px solid #b8c9ff;\n\tborder-radius: 6px;\n\ttext-align: center;\n`;\n\ndocument.getElementById(\"app\").innerHTML = `\n\t<div style=\"${containerStyle}\">\n\t\t<div style=\"${itemStyle}; flex: 0 0 calc(((100% - 11 * 16px) * 6 / 12) + 5 * 16px);\">Main content</div>\n\t\t<div style=\"${itemStyle}; flex: 0 0 calc(((100% - 11 * 16px) * 3 / 12) + 2 * 16px); margin-left: calc(((100% - 11 * 16px) * 1 / 12) + 1 * 16px);\">Sidebar</div>\n\t\t<div style=\"${itemStyle}; flex: 0 0 auto; width: auto; max-width: none; white-space: nowrap;\">Auto width</div>\n\t\t<div style=\"${itemStyle}; flex-basis: 0; flex-grow: 1; max-width: 100%;\">Grows to fill</div>\n\t</div>\n`;\n";
5
+ export declare const componentJs = "\nimport { componentGrid } from \"@guardian/stand\";\n\nconst { shared, sm } = componentGrid;\n\nconst containerStyle = `\n\tdisplay: ${shared.display};\n\tflex-direction: ${shared.direction};\n\tflex-wrap: ${shared.wrap};\n\tjustify-content: ${shared.justifyContent};\n\talign-items: ${shared.alignItems};\n\tgap: ${sm.gap};\n\tpadding: 0 ${sm.padding};\n`;\n\nconst itemStyle = `\n\tbox-sizing: border-box;\n\tpadding: 16px;\n\tbackground: #eff3ff;\n\tborder: 1px solid #b8c9ff;\n\tborder-radius: 6px;\n\ttext-align: center;\n`;\n\n// 6-column span: ((100% - (columns - 1) * gap) * size / columns) + (size - 1) * gap\nconst mainWidth = `calc(((100% - (${sm.columns} - 1) * ${sm.gap}) * 6 / ${sm.columns}) + 5 * ${sm.gap})`;\n// 3-column span with 1-column offset\nconst sidebarWidth = `calc(((100% - (${sm.columns} - 1) * ${sm.gap}) * 3 / ${sm.columns}) + 2 * ${sm.gap})`;\nconst sidebarOffset = `calc(((100% - (${sm.columns} - 1) * ${sm.gap}) * 1 / ${sm.columns}) + 1 * ${sm.gap})`;\n\ndocument.getElementById(\"app\").innerHTML = `\n\t<div style=\"${containerStyle}\">\n\t\t<div style=\"${itemStyle}; flex: 0 0 ${mainWidth};\">Main content</div>\n\t\t<div style=\"${itemStyle}; flex: 0 0 ${sidebarWidth}; margin-left: ${sidebarOffset};\">Sidebar</div>\n\t\t<div style=\"${itemStyle}; flex: 0 0 auto; width: auto; max-width: none; white-space: nowrap;\">Auto width</div>\n\t\t<div style=\"${itemStyle}; flex-basis: 0; flex-grow: 1; max-width: 100%;\">Grows to fill</div>\n\t</div>\n`;\n";
@@ -1,5 +1,5 @@
1
1
  export declare const componentName = "IntendedAudienceSignifier";
2
- export declare const componentTsx = "import { IntendedAudienceSignifier } from '@guardian/stand/intended-audience-signifier';\n\nexport const Component = () => (\n\t<>\n\t\t<IntendedAudienceSignifier source=\"UK\" intendedAudience='Global' />\n\t\t<IntendedAudienceSignifier source=\"US\" intendedAudience='Global' />\n\t\t<IntendedAudienceSignifier source=\"AUS\" intendedAudience='Global' />\n\t\t<IntendedAudienceSignifier source=\"UK\" intendedAudience='Domestic for Domestic' />\n\t\t<IntendedAudienceSignifier source=\"US\" intendedAudience='Domestic for Domestic' />\n\t\t<IntendedAudienceSignifier source=\"AUS\" intendedAudience='Domestic for Domestic' />\n\t\t<IntendedAudienceSignifier source=\"UK\" intendedAudience='Domestic For Global' />\n\t\t<IntendedAudienceSignifier source=\"US\" intendedAudience='Domestic For Global' />\n\t\t<IntendedAudienceSignifier source=\"AUS\" intendedAudience='Domestic For Global' />\n\t\t<IntendedAudienceSignifier source=\"UK\" intendedAudience='Domestic For Global' theme={{ color: '#c70000' }} />\n\t\t<IntendedAudienceSignifier source=\"AUS\" intendedAudience='Global' cssOverrides={{ border-color: '#0000FF',align-items: 'flex-end' }}/>\n\t\t<IntendedAudienceSignifier source=\"UK\" intendedAudience=\"Don't know\" />\n\t\t<IntendedAudienceSignifier source=\"US\" intendedAudience=\"Don't know\" />\n\t\t<IntendedAudienceSignifier source=\"AUS\" intendedAudience=\"Don't know\" />\n\t\t<IntendedAudienceSignifier source=\"UK\" intendedAudience='US' />\n\t\t<IntendedAudienceSignifier source=\"US\" intendedAudience='UK' />\n\t</>\n);\n";
3
- export declare const componentCss = "\n/* import the intended audience signifier styles */\n@import '@guardian/stand/component/intendedAudienceSignifier.css';\n\n.stand-intended-audience-signifier {\n\tcolor: var(--component-intended-audience-signifier-color);\n\tfont-weight: var(--component-intended-audience-signifier-typography-font-weight);\n\tfont-size: var(--component-intended-audience-signifier-typography-font-size);\n\tline-height: var(--component-intended-audience-signifier-typography-line-height);\n\tborder-width: var(--component-intended-audience-signifier-border-width);\n\tborder-style: var(--component-intended-audience-signifier-border-style);\n\tborder-color: var(--component-intended-audience-signifier-border-color);\n\tdisplay: var(--component-intended-audience-signifier-display);\n\tflex-direction: var(--component-intended-audience-signifier-flex-direction);\n\tjustify-content: var(--component-intended-audience-signifier-justify-content);\n\talign-items: var(--component-intended-audience-signifier-align-items);\n\tborder-radius: var(--component-intended-audience-signifier-border-width);\n\tpadding: var(--component-intended-audience-signifier-padding-y) var(--component-intended-audience-signifier-padding-x);\n\tbox-sizing: var(--component-intended-audience-signifier-box-sizing);\n\twidth: var(--component-intended-audience-signifier-width);\n\tgap: var(--component-intended-audience-signifier-gap: 8px);\n}\n\n.stand-intended-audience-signifier svg {\n\twidth: var(--component-intended-audience-signifier-svg-width):\n\theight: var(--component-intended-audience-signifier-svg-height);\n}\n\n.stand-intended-audience-signifier-flag {\n\theight: 12px;\n}\n\n.stand-intended-audience-signifier-chevron {\n\twidth: 13px;\n\theight: 13px;\n\tfill: #545454;\n}\n";
2
+ export declare const componentTsx = "import { IntendedAudienceSignifier } from '@guardian/stand/intendedAudienceSignifier;\n\nexport const Component = () => (\n\t<>\n\t\t<IntendedAudienceSignifier source=\"UK\" intendedAudience='Global' />\n\t\t<IntendedAudienceSignifier source=\"US\" intendedAudience='Global' />\n\t\t<IntendedAudienceSignifier source=\"AUS\" intendedAudience='Global' />\n\t\t<IntendedAudienceSignifier source=\"UK\" intendedAudience='Domestic for Domestic' />\n\t\t<IntendedAudienceSignifier source=\"US\" intendedAudience='Domestic for Domestic' />\n\t\t<IntendedAudienceSignifier source=\"AUS\" intendedAudience='Domestic for Domestic' />\n\t\t<IntendedAudienceSignifier source=\"UK\" intendedAudience='Domestic For Global' />\n\t\t<IntendedAudienceSignifier source=\"US\" intendedAudience='Domestic For Global' />\n\t\t<IntendedAudienceSignifier source=\"AUS\" intendedAudience='Domestic For Global' />\n\t\t<IntendedAudienceSignifier source=\"UK\" intendedAudience='Domestic For Global' theme={{ color: '#c70000' }} />\n\t\t<IntendedAudienceSignifier source=\"AUS\" intendedAudience='Global' cssOverrides={{ border-color: '#0000FF',align-items: 'flex-end' }}/>\n\t\t<IntendedAudienceSignifier source=\"UK\" intendedAudience=\"Don't know\" />\n\t\t<IntendedAudienceSignifier source=\"US\" intendedAudience=\"Don't know\" />\n\t\t<IntendedAudienceSignifier source=\"AUS\" intendedAudience=\"Don't know\" />\n\t\t<IntendedAudienceSignifier source=\"UK\" intendedAudience='US' />\n\t\t<IntendedAudienceSignifier source=\"US\" intendedAudience='UK' />\n\t</>\n);\n";
3
+ export declare const componentCss = "\n/* import the intended audience signifier styles */\n@import '@guardian/stand/component/intendedAudienceSignifier.css';\n\n.stand-intended-audience-signifier {\n\tcolor: var(--component-intended-audience-signifier-color);\n\tfont-weight: var(--component-intended-audience-signifier-typography-font-weight);\n\tfont-size: var(--component-intended-audience-signifier-typography-font-size);\n\tline-height: var(--component-intended-audience-signifier-typography-line-height);\n\tborder-width: var(--component-intended-audience-signifier-border-width);\n\tborder-style: var(--component-intended-audience-signifier-border-style);\n\tborder-color: var(--component-intended-audience-signifier-border-color);\n\tdisplay: var(--component-intended-audience-signifier-display);\n\tflex-direction: var(--component-intended-audience-signifier-flex-direction);\n\tjustify-content: var(--component-intended-audience-signifier-justify-content);\n\talign-items: var(--component-intended-audience-signifier-align-items);\n\tborder-radius: var(--component-intended-audience-signifier-border-width);\n\tpadding: var(--component-intended-audience-signifier-padding-y) var(--component-intended-audience-signifier-padding-x);\n\tbox-sizing: var(--component-intended-audience-signifier-box-sizing);\n\twidth: var(--component-intended-audience-signifier-width);\n\tgap: var(--component-intended-audience-signifier-gap);\n}\n\n.stand-intended-audience-signifier svg {\n\twidth: var(--component-intended-audience-signifier-svg-width):\n\theight: var(--component-intended-audience-signifier-svg-height);\n}\n\n.stand-intended-audience-signifier-flag {\n\theight: 12px;\n}\n\n.stand-intended-audience-signifier-chevron {\n\twidth: 13px;\n\theight: 13px;\n\tfill: #545454;\n}\n";
4
4
  export declare const componentHtml = "<div class=\"container flow-column\">\n\t<div class=\"stand-intended-audience-signifier\">\n\t\t<svg class=\"stand-intended-audience-signifier-flag\" viewBox=\"0 0 640 480\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n\t\t\t<path fill=\"#012169\" d=\"M0 0h640v480H0z\" />\n\t\t</svg>\n\t\t<svg class=\"stand-intended-audience-signifier-chevron\" viewBox=\"0 0 9 7\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n\t\t\t<path d=\"M5.75 0H3.5L6 3.5L3.5 7H5.75L8.25 3.5L5.75 0Z\" />\n\t\t\t<path d=\"M2.25 0H0L2.5 3.5L0 7H2.25L4.75 3.5L2.25 0Z\" />\n\t\t</svg>\n\t\t<svg class=\"stand-intended-audience-signifier-flag\" viewBox=\"0 0 640 480\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n\t\t\t<path fill=\"#bd3d44\" d=\"M0 0h640v480H0\" />\n\t\t</svg>\n\t</div>\n\n\t<div class=\"stand-intended-audience-signifier\" style=\"--component-intended-audience-signifier-color: #c70000;\">\n\t\t<span>AU</span>\n\t\t<svg class=\"stand-intended-audience-signifier-chevron\" viewBox=\"0 0 9 7\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n\t\t\t<path d=\"M5.75 0H3.5L6 3.5L3.5 7H5.75L8.25 3.5L5.75 0Z\" />\n\t\t\t<path d=\"M2.25 0H0L2.5 3.5L0 7H2.25L4.75 3.5L2.25 0Z\" />\n\t\t</svg>\n\t\t<span>GLOBAL</span>\n\t</div>\n</div>\n";
5
5
  export declare const componentJs = "\nimport { componentIntendedAudienceSignifier } from \"@guardian/stand\";\n\nconst sheet = new CSSStyleSheet();\n\nsheet.replaceSync(`\n\t.js-stand-intended-audience-signifier {\n\t\tcolor: ${componentIntendedAudienceSignifier.color};\n\t\tfont-weight: ${componentIntendedAudienceSignifier.typography.fontWeight};\n\t\tfont-size: ${componentIntendedAudienceSignifier.typography.fontSize};\n\t\tline-height: ${componentIntendedAudienceSignifier.typography.lineHeight};\n\t\tborder-width: ${componentIntendedAudienceSignifier.borderWidth};\n\t\tborder-style: ${componentIntendedAudienceSignifier.borderStyle};\n\t\tborder-color: ${componentIntendedAudienceSignifier.borderColor};\n\t\tdisplay: ${componentIntendedAudienceSignifier.display};\n\t\tflex-direction: ${componentIntendedAudienceSignifier.flexDirection};\n\t\tjustify-content: ${componentIntendedAudienceSignifier.justifyContent};\n\t\talign-items: ${componentIntendedAudienceSignifier.alignItems};\n\t\tborder-radius: ${componentIntendedAudienceSignifier.borderRadius};\n\t\tpadding: ${componentIntendedAudienceSignifier.paddingY} ${componentIntendedAudienceSignifier.paddingX};\n\t\tbox-sizing: ${componentIntendedAudienceSignifier.boxSizing};\n\t\twidth: ${componentIntendedAudienceSignifier.width};\n\t\tgap: ${componentIntendedAudienceSignifier.gap};\n\t}\n\n\t.js-stand-intended-audience-signifier-chevron {\n\t\twidth: 13px;\n\t\theight: 13px;\n\t\tfill: #545454;\n\t}\n\n\t.stand-intended-audience-signifier svg {\n\t\twidth: ${componentIntendedAudienceSignifier.svg.width}:\n\t\theight: ${componentIntendedAudienceSignifier.svg.height};\n\t}\n`);\n\ndocument.adoptedStyleSheets.push(sheet);\n\ndocument.getElementById(\"app\").innerHTML = `\n\t<div class=\"container flow-column\">\n\t\t<div class=\"js-stand-intended-audience-signifier\">\n\t\t\t\t<svg\n\t\t\t\theight=\"12px\"\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\tid=\"flag-icons-gb\"\n\t\t\t\tviewBox=\"0 0 640 480\"\n\t\t\t>\n\t\t\t\t<path fill=\"#012169\" d=\"M0 0h640v480H0z\" />\n\t\t\t\t<path\n\t\t\t\t\tfill=\"#FFF\"\n\t\t\t\t\td=\"m75 0 244 181L562 0h78v62L400 241l240 178v61h-80L320 301 81 480H0v-60l239-178L0 64V0z\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\tfill=\"#C8102E\"\n\t\t\t\t\td=\"m424 281 216 159v40L369 281zm-184 20 6 35L54 480H0zM640 0v3L391 191l2-44L590 0zM0 0l239 176h-60L0 42z\"\n\t\t\t\t/>\n\t\t\t\t<path fill=\"#FFF\" d=\"M241 0v480h160V0zM0 160v160h640V160z\" />\n\t\t\t\t<path fill=\"#C8102E\" d=\"M0 193v96h640v-96zM273 0v480h96V0z\" />\n\t\t\t</svg>\n\t\t\t<svg class=\"js-stand-intended-audience-signifier-chevron\" viewBox=\"0 0 9 7\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n\t\t\t\t<path d=\"M5.75 0H3.5L6 3.5L3.5 7H5.75L8.25 3.5L5.75 0Z\" />\n\t\t\t\t<path d=\"M2.25 0H0L2.5 3.5L0 7H2.25L4.75 3.5L2.25 0Z\" />\n\t\t\t</svg>\n\t\t\t\t\t<svg\n\t\t\t\theight=\"12px\"\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\tid=\"flag-icons-gb\"\n\t\t\t\tviewBox=\"0 0 640 480\"\n\t\t\t>\n\t\t\t\t<path fill=\"#012169\" d=\"M0 0h640v480H0z\" />\n\t\t\t\t<path\n\t\t\t\t\tfill=\"#FFF\"\n\t\t\t\t\td=\"m75 0 244 181L562 0h78v62L400 241l240 178v61h-80L320 301 81 480H0v-60l239-178L0 64V0z\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\tfill=\"#C8102E\"\n\t\t\t\t\td=\"m424 281 216 159v40L369 281zm-184 20 6 35L54 480H0zM640 0v3L391 191l2-44L590 0zM0 0l239 176h-60L0 42z\"\n\t\t\t\t/>\n\t\t\t\t<path fill=\"#FFF\" d=\"M241 0v480h160V0zM0 160v160h640V160z\" />\n\t\t\t\t<path fill=\"#C8102E\" d=\"M0 193v96h640v-96zM273 0v480h96V0z\" />\n\t\t\t</svg>\n\t\t</div>\n\n\t\t<div class=\"js-stand-intended-audience-signifier\" style=\"color: #c70000; border-color: #c70000;\">\n\t\t\t<svg\n\t\t\t\theight=\"12px\"\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\tid=\"flag-icons-au\"\n\t\t\t\tviewBox=\"0 0 640 480\"\n\t\t\t>\n\t\t\t\t<path fill=\"#00008B\" d=\"M0 0h640v480H0z\" />\n\t\t\t\t<path\n\t\t\t\t\tfill=\"#fff\"\n\t\t\t\t\td=\"m37.5 0 122 90.5L281 0h39v31l-120 89.5 120 89V240h-40l-120-89.5L40.5 240H0v-30l119.5-89L0 32V0z\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\tfill=\"red\"\n\t\t\t\t\td=\"M212 140.5 320 220v20l-135.5-99.5zm-92 10 3 17.5-96 72H0zM320 0v1.5l-124.5 94 1-22L295 0zM0 0l119.5 88h-30L0 21z\"\n\t\t\t\t/>\n\t\t\t\t<path fill=\"#fff\" d=\"M120.5 0v240h80V0zM0 80v80h320V80z\" />\n\t\t\t\t<path fill=\"red\" d=\"M0 96.5v48h320v-48zM136.5 0v240h48V0z\" />\n\t\t\t\t<path\n\t\t\t\t\tfill=\"#fff\"\n\t\t\t\t\td=\"m527 396.7-20.5 2.6 2.2 20.5-14.8-14.4-14.7 14.5 2-20.5-20.5-2.4 17.3-11.2-10.9-17.5 19.6 6.5 6.9-19.5 7.1 19.4 19.5-6.7-10.7 17.6zm-3.7-117.2 2.7-13-9.8-9 13.2-1.5 5.5-12.1 5.5 12.1 13.2 1.5-9.8 9 2.7 13-11.6-6.6zm-104.1-60-20.3 2.2 1.8 20.3-14.4-14.5-14.8 14.1 2.4-20.3-20.2-2.7 17.3-10.8-10.5-17.5 19.3 6.8L387 178l6.7 19.3 19.4-6.3-10.9 17.3 17.1 11.2ZM623 186.7l-20.9 2.7 2.3 20.9-15.1-14.7-15 14.8 2.1-21-20.9-2.4 17.7-11.5-11.1-17.9 20 6.7 7-19.8 7.2 19.8 19.9-6.9-11 18zm-96.1-83.5-20.7 2.3 1.9 20.8-14.7-14.8-15.1 14.4 2.4-20.7-20.7-2.8 17.7-11L467 73.5l19.7 6.9 7.3-19.5 6.8 19.7 19.8-6.5-11.1 17.6zM234 385.7l-45.8 5.4 4.6 45.9-32.8-32.4-33 32.2 4.9-45.9-45.8-5.8 38.9-24.8-24-39.4 43.6 15 15.8-43.4 15.5 43.5 43.7-14.7-24.3 39.2 38.8 25.1Z\"\n\t\t\t\t/>\n\t\t\t</svg>\n\t\t\t<svg class=\"js-stand-intended-audience-signifier-chevron\" viewBox=\"0 0 9 7\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n\t\t\t\t<path d=\"M5.75 0H3.5L6 3.5L3.5 7H5.75L8.25 3.5L5.75 0Z\" />\n\t\t\t\t<path d=\"M2.25 0H0L2.5 3.5L0 7H2.25L4.75 3.5L2.25 0Z\" />\n\t\t\t</svg>\n\t\t\t<svg\n\t\t\t\theight=\"12px\"\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\tid=\"flag-icons-au\"\n\t\t\t\tviewBox=\"0 0 640 480\"\n\t\t\t>\n\t\t\t\t<path fill=\"#00008B\" d=\"M0 0h640v480H0z\" />\n\t\t\t\t<path\n\t\t\t\t\tfill=\"#fff\"\n\t\t\t\t\td=\"m37.5 0 122 90.5L281 0h39v31l-120 89.5 120 89V240h-40l-120-89.5L40.5 240H0v-30l119.5-89L0 32V0z\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\tfill=\"red\"\n\t\t\t\t\td=\"M212 140.5 320 220v20l-135.5-99.5zm-92 10 3 17.5-96 72H0zM320 0v1.5l-124.5 94 1-22L295 0zM0 0l119.5 88h-30L0 21z\"\n\t\t\t\t/>\n\t\t\t\t<path fill=\"#fff\" d=\"M120.5 0v240h80V0zM0 80v80h320V80z\" />\n\t\t\t\t<path fill=\"red\" d=\"M0 96.5v48h320v-48zM136.5 0v240h48V0z\" />\n\t\t\t\t<path\n\t\t\t\t\tfill=\"#fff\"\n\t\t\t\t\td=\"m527 396.7-20.5 2.6 2.2 20.5-14.8-14.4-14.7 14.5 2-20.5-20.5-2.4 17.3-11.2-10.9-17.5 19.6 6.5 6.9-19.5 7.1 19.4 19.5-6.7-10.7 17.6zm-3.7-117.2 2.7-13-9.8-9 13.2-1.5 5.5-12.1 5.5 12.1 13.2 1.5-9.8 9 2.7 13-11.6-6.6zm-104.1-60-20.3 2.2 1.8 20.3-14.4-14.5-14.8 14.1 2.4-20.3-20.2-2.7 17.3-10.8-10.5-17.5 19.3 6.8L387 178l6.7 19.3 19.4-6.3-10.9 17.3 17.1 11.2ZM623 186.7l-20.9 2.7 2.3 20.9-15.1-14.7-15 14.8 2.1-21-20.9-2.4 17.7-11.5-11.1-17.9 20 6.7 7-19.8 7.2 19.8 19.9-6.9-11 18zm-96.1-83.5-20.7 2.3 1.9 20.8-14.7-14.8-15.1 14.4 2.4-20.7-20.7-2.8 17.7-11L467 73.5l19.7 6.9 7.3-19.5 6.8 19.7 19.8-6.5-11.1 17.6zM234 385.7l-45.8 5.4 4.6 45.9-32.8-32.4-33 32.2 4.9-45.9-45.8-5.8 38.9-24.8-24-39.4 43.6 15 15.8-43.4 15.5 43.5 43.7-14.7-24.3 39.2 38.8 25.1Z\"\n\t\t\t\t/>\n\t\t\t</svg>\n\t\t</div>\n\t</div>\n`;\n";
@@ -4,3 +4,5 @@ import type { Prettify } from '../../util/types';
4
4
  export type IntendedAudienceSignifierTheme = Prettify<ComponentIntendedAudienceSignifier>;
5
5
  export declare const defaultIntendedAudienceSignifierTheme: IntendedAudienceSignifierTheme;
6
6
  export declare const intendedAudienceSignifierStyles: (theme: IntendedAudienceSignifierTheme) => SerializedStyles;
7
+ export declare const intendedAudienceSignifierIconStyles: (theme: IntendedAudienceSignifierTheme) => SerializedStyles;
8
+ export declare const intendedAudienceSignifierChevronIconStyles: (theme: IntendedAudienceSignifierTheme) => SerializedStyles;
@@ -1,19 +1,11 @@
1
- import type { LayoutProps, SidebarProps } from './types';
2
- /**
3
- * Currently a WIP (Subject to change, but usable) sidebar that can be used in the Layout, it supports two different layout behaviors at the sm breakpoint,
4
- * either 'above-grid' which will place the sidebar above the grid content effectively making it a horizontal bar at the top of the page,
5
- * or 'hidden' which will hide the sidebar entirely at the sm breakpoint.
6
- *
7
- * The consumer can choose how to make the sidebar content accessible through other means (e.g. a collapsible menu in the TopBar) when using the 'hidden' option.
8
- */
9
- export declare function Sidebar({ children, layoutSmBreakpoint, theme, cssOverrides, ...props }: SidebarProps): import("@emotion/react/jsx-runtime").JSX.Element;
10
- /**
11
- * A layout component that defines a grid structure for the page, it has specific areas for an AlertBanner, TopBar, Sidebar and Grid content.
12
- *
13
- * The layout adjusts based on the defined breakpoints in the theme, allowing for responsive design.
14
- *
15
- * The Layout component will look through its children and place them in the correct grid area based on their type (AlertBanner, TopBar, Sidebar, Grid), it ignores any children that are not of these types.
16
- *
17
- * Consumers can customize the layout by providing their own themes and CSS overrides for each of the components.
18
- */
19
- export declare function Layout({ children, fluid, theme, cssOverrides, ...props }: LayoutProps): import("@emotion/react/jsx-runtime").JSX.Element;
1
+ import type React from 'react';
2
+ import type { LayoutProps, LayoutSlotProps, MainProps, SidebarProps } from './types';
3
+ interface LayoutCompound {
4
+ (props: LayoutProps): React.ReactElement;
5
+ AlertBanner: (props: LayoutSlotProps) => React.ReactElement;
6
+ TopBar: (props: LayoutSlotProps) => React.ReactElement;
7
+ Sidebar: (props: SidebarProps) => React.ReactElement;
8
+ Main: (props: MainProps) => React.ReactElement;
9
+ }
10
+ export declare const Layout: LayoutCompound;
11
+ export {};
@@ -1,5 +1,5 @@
1
1
  export declare const componentName = "Layout";
2
- export declare const componentTsx = "import { Grid, Item } from '@guardian/stand/grid';\nimport { Layout, Sidebar } from '@guardian/stand/layout';\nimport { TopBar, TopBarToolName } from '@guardian/stand/TopBar';\n\nexport const Component = () => (\n\t<Layout>\n\t\t<TopBar>\n\t\t\t<TopBarToolName name=\"Layout Demo\" favicon={{ letter: 'L' }} />\n\t\t</TopBar>\n\t\t<Sidebar layoutSmBreakpoint=\"above-grid\">\n\t\t\t<div style={{ padding: '8px' }}>Sidebar content</div>\n\t\t</Sidebar>\n\t\t<Grid>\n\t\t\t<Item size={{ sm: 12, md: 8 }}>Main content</Item>\n\t\t\t<Item size={{ sm: 12, md: 4 }}>Secondary content</Item>\n\t\t</Grid>\n\t</Layout>\n);\n";
2
+ export declare const componentTsx = "import { Grid, Item } from '@guardian/stand/grid';\nimport { AlertBanner } from '@guardian/stand/alert-banner';\nimport { Layout } from '@guardian/stand/layout';\nimport { TopBar, TopBarToolName } from '@guardian/stand/TopBar';\n\nexport const Component = () => (\n\t<Layout aria-label=\"Page layout\">\n\t\t<Layout.AlertBanner as=\"div\" role=\"status\" aria-live=\"polite\">\n\t\t\t<AlertBanner level=\"information\">Layout banner message</AlertBanner>\n\t\t</Layout.AlertBanner>\n\t\t<Layout.TopBar>\n\t\t\t<TopBar>\n\t\t\t\t<TopBarToolName name=\"Layout Demo\" favicon={{ letter: 'L' }} />\n\t\t\t</TopBar>\n\t\t</Layout.TopBar>\n\t\t<Layout.Sidebar as=\"nav\" aria-label=\"Secondary navigation\" layoutSmBreakpoint=\"above-grid\">\n\t\t\t<div style={{ padding: '8px' }}>Sidebar content</div>\n\t\t</Layout.Sidebar>\n\t\t<Layout.Main fluid={false}>\n\t\t\t<Grid>\n\t\t\t\t<Item size={{ sm: 12, md: 8 }}>Main content</Item>\n\t\t\t\t<Item size={{ sm: 12, md: 4 }}>Secondary content</Item>\n\t\t\t</Grid>\n\t\t</Layout.Main>\n\t</Layout>\n);\n";
3
3
  export declare const componentCss = "\n/* import the layout styles */\n@import '@guardian/stand/component/layout.css';\n@import '@guardian/stand/semantic/breakpoints.css';\n\n/*\n * Use the TopBar and Grid/Item custom CSS examples from their respective\n * component docs to style the content placed inside these layout regions.\n */\n\n.stand-layout {\n\tdisplay: var(--component-layout-layout-shared-display);\n\tmin-height: var(--component-layout-layout-shared-min-height);\n\twidth: var(--component-layout-layout-shared-width);\n\tgrid-template-areas: var(--component-layout-layout-sm-grid-template-areas);\n\tgrid-template-columns: var(--component-layout-layout-sm-grid-template-columns);\n\tgrid-template-rows: var(--component-layout-layout-sm-grid-template-rows);\n}\n\n.stand-layout-alert-banner {\n\tgrid-area: alertbanner;\n}\n\n.stand-layout-top-bar {\n\tgrid-area: topbar;\n}\n\n.stand-layout-sidebar {\n\tgrid-area: sidebar;\n\tbackground: #f2f2f2;\n\tpadding: 8px;\n}\n\n.stand-layout-main {\n\tgrid-area: main;\n\tpadding: 8px;\n}\n\n@media (min-width: var(--semantic-breakpoints-md)) {\n\t.stand-layout {\n\t\tgrid-template-areas: var(--component-layout-layout-md-grid-template-areas);\n\t\tgrid-template-columns: var(--component-layout-layout-md-grid-template-columns);\n\t\tgrid-template-rows: var(--component-layout-layout-md-grid-template-rows);\n\t}\n\n\t.stand-layout-sidebar {\n\t\tdisplay: var(--component-layout-sidebar-md-display);\n\t\twidth: var(--component-layout-sidebar-md-width);\n\t}\n}\n";
4
4
  export declare const componentHtml = "<div class=\"container\">\n\t<div class=\"stand-layout\">\n\t\t<div class=\"stand-layout-alert-banner\">Alert banner area</div>\n\t\t<div class=\"stand-layout-top-bar\">Top bar area</div>\n\t\t<div class=\"stand-layout-sidebar\">Sidebar area</div>\n\t\t<div class=\"stand-layout-main\">Main content area</div>\n\t</div>\n</div>\n";
5
5
  export declare const componentJs = "\nimport { componentLayout, semanticBreakpoints } from \"@guardian/stand\";\n\n// Use the TopBar and Grid/Item custom JS examples from their respective\n// component docs to style the content placed inside these layout regions.\n\n\tconst sheet = new CSSStyleSheet();\n\n\tsheet.replaceSync(`\n\t .js-stand-layout {\n\t display: ${componentLayout.layout.shared.display};\n\t min-height: ${componentLayout.layout.shared.minHeight};\n\t width: ${componentLayout.layout.shared.width};\n\t grid-template-areas: ${componentLayout.layout.sm.gridTemplateAreas};\n\t grid-template-columns: ${componentLayout.layout.sm.gridTemplateColumns};\n\t grid-template-rows: ${componentLayout.layout.sm.gridTemplateRows};\n\t }\n\t .js-stand-layout-alert-banner {\n\t grid-area: alertbanner;\n\t }\n\t .js-stand-layout-top-bar {\n\t grid-area: topbar;\n\t }\n\t .js-stand-layout-sidebar {\n\t grid-area: sidebar;\n\t display: ${componentLayout.sidebar.sm.aboveGrid.display};\n\t background: #f2f2f2;\n\t padding: 8px;\n\t }\n\t .js-stand-layout-main {\n\t grid-area: main;\n\t padding: 8px;\n\t }\n\t @media (min-width: ${semanticBreakpoints.md}) {\n\t .js-stand-layout {\n\t grid-template-areas: ${componentLayout.layout.md.gridTemplateAreas};\n\t grid-template-columns: ${componentLayout.layout.md.gridTemplateColumns};\n\t grid-template-rows: ${componentLayout.layout.md.gridTemplateRows};\n\t }\n\t .js-stand-layout-sidebar {\n\t display: ${componentLayout.sidebar.md.display};\n\t width: ${componentLayout.sidebar.md.width};\n\t }\n\t }\n\t`);\n\n\tdocument.adoptedStyleSheets.push(sheet);\n\n\tdocument.getElementById(\"app\").innerHTML = `\n\t <div class=\"js-stand-layout\">\n\t <div class=\"js-stand-layout-alert-banner\">Alert banner area</div>\n\t <div class=\"js-stand-layout-top-bar\">Top bar area</div>\n\t <div class=\"js-stand-layout-sidebar\">Sidebar area</div>\n\t <div class=\"js-stand-layout-main\">Main content area</div>\n\t </div>\n\t`;\n";
@@ -1,16 +1,19 @@
1
1
  import type { SerializedStyles } from '@emotion/react';
2
2
  import type { ComponentLayout } from '../../styleD/build/typescript/component/layout';
3
3
  import type { DeepPartial, Prettify } from '../../util/types';
4
- import type { LayoutProps, SidebarProps } from './types';
4
+ import type { MainProps, SidebarProps } from './types';
5
5
  export type LayoutTheme = Prettify<ComponentLayout['layout']>;
6
6
  export type PartialLayoutTheme = Prettify<DeepPartial<LayoutTheme>>;
7
7
  export declare const defaultLayoutTheme: LayoutTheme;
8
8
  export type SidebarTheme = Prettify<ComponentLayout['sidebar']>;
9
9
  export type PartialSidebarTheme = Prettify<DeepPartial<SidebarTheme>>;
10
10
  export declare const defaultSidebarTheme: SidebarTheme;
11
+ export type MainTheme = Prettify<ComponentLayout['main']>;
12
+ export type PartialMainTheme = Prettify<DeepPartial<MainTheme>>;
13
+ export declare const defaultMainTheme: MainTheme;
11
14
  export declare const alertBannerLayoutStyles: () => SerializedStyles;
12
15
  export declare const topBarLayoutStyles: () => SerializedStyles;
13
16
  export declare const sidebarLayoutStyles: () => SerializedStyles;
14
- export declare const mainLayoutStyles: (theme: LayoutTheme, { fluid }: Required<Pick<LayoutProps, 'fluid'>>) => SerializedStyles;
17
+ export declare const mainLayoutStyles: (theme: MainTheme, { fluid }: Required<Pick<MainProps, 'fluid'>>) => SerializedStyles;
15
18
  export declare const layoutStyles: (theme: LayoutTheme) => SerializedStyles;
16
19
  export declare const sidebarStyles: (theme: SidebarTheme, { layoutSmBreakpoint }: Required<Pick<SidebarProps, 'layoutSmBreakpoint'>>) => SerializedStyles;
@@ -1,14 +1,18 @@
1
+ import type { SerializedStyles } from '@emotion/react';
2
+ import type React from 'react';
1
3
  import type { DefaultPropsWithChildren } from '../../util/types';
2
- import type { LayoutTheme, SidebarTheme } from './styles';
3
- export interface LayoutProps extends DefaultPropsWithChildren<LayoutTheme> {
4
+ import type { LayoutTheme, MainTheme, SidebarTheme } from './styles';
5
+ export type LayoutProps = DefaultPropsWithChildren<LayoutTheme>;
6
+ export interface MainProps extends DefaultPropsWithChildren<MainTheme>, React.HTMLAttributes<HTMLElement> {
4
7
  /**
5
8
  * When `true`, the layout will take up the full width of its container, enabled by default.
6
9
  * When `false`, the layout will have a max-width of 1584px and be centered within its container.
7
10
  * This can be used to prevent the layout from becoming too stretched on very wide screens.
8
11
  */
9
12
  fluid?: boolean;
13
+ as?: React.ElementType;
10
14
  }
11
- export interface SidebarProps extends DefaultPropsWithChildren<SidebarTheme> {
15
+ export interface SidebarProps extends DefaultPropsWithChildren<SidebarTheme>, React.HTMLAttributes<HTMLElement> {
12
16
  /**
13
17
  * Defines the layout behavior of the sidebar at the sm breakpoint.
14
18
  *
@@ -17,4 +21,10 @@ export interface SidebarProps extends DefaultPropsWithChildren<SidebarTheme> {
17
21
  *
18
22
  */
19
23
  layoutSmBreakpoint?: 'above-grid' | 'hidden';
24
+ as?: React.ElementType;
25
+ }
26
+ export interface LayoutSlotProps extends React.HTMLAttributes<HTMLElement> {
27
+ children?: React.ReactNode;
28
+ cssOverrides?: SerializedStyles | SerializedStyles[];
29
+ as?: React.ElementType;
20
30
  }
@@ -74,6 +74,8 @@ export type { BaseTypography } from './styleD/build/typescript/base/typography';
74
74
  */
75
75
  export { semanticColors } from './styleD/build/typescript/semantic/colors';
76
76
  export type { SemanticColors } from './styleD/build/typescript/semantic/colors';
77
+ export { semanticGrid } from './styleD/build/typescript/semantic/grid';
78
+ export type { SemanticGrid } from './styleD/build/typescript/semantic/grid';
77
79
  export { semanticTypography } from './styleD/build/typescript/semantic/typography';
78
80
  export type { SemanticTypography } from './styleD/build/typescript/semantic/typography';
79
81
  export { semanticSizing } from './styleD/build/typescript/semantic/sizing';
@@ -13,8 +13,8 @@
13
13
  * If you only need the built CSS (./component/layout.css),
14
14
  * you don't need to install these.
15
15
  */
16
- export { Layout, Sidebar } from './components/layout/Layout';
17
- export type { LayoutProps, SidebarProps } from './components/layout/types';
18
- export type { PartialLayoutTheme as LayoutTheme, PartialSidebarTheme as SidebarTheme, } from './components/layout/styles';
16
+ export { Layout } from './components/layout/Layout';
17
+ export type { LayoutProps, SidebarProps as LayoutSidebarProps, MainProps as LayoutMainProps, LayoutSlotProps as LayoutAlertBannerProps, LayoutSlotProps as LayoutTopBarProps, } from './components/layout/types';
18
+ export type { PartialLayoutTheme as LayoutTheme, PartialSidebarTheme as SidebarTheme, PartialMainTheme as MainTheme, } from './components/layout/styles';
19
19
  export { componentLayout } from './styleD/build/typescript/component/layout';
20
20
  export type { ComponentLayout } from './styleD/build/typescript/component/layout';
@@ -5,12 +5,25 @@ export declare const componentGrid: {
5
5
  shared: {
6
6
  display: string;
7
7
  width: string;
8
- columns: number;
9
- gap: string;
10
8
  direction: string;
11
9
  wrap: string;
12
10
  justifyContent: string;
13
11
  alignItems: string;
14
12
  };
13
+ sm: {
14
+ columns: number;
15
+ gap: string;
16
+ padding: string;
17
+ };
18
+ md: {
19
+ columns: number;
20
+ gap: string;
21
+ padding: string;
22
+ };
23
+ lg: {
24
+ columns: number;
25
+ gap: string;
26
+ padding: string;
27
+ };
15
28
  };
16
29
  export type ComponentGrid = typeof componentGrid;
@@ -19,11 +19,14 @@ export declare const componentIntendedAudienceSignifier: {
19
19
  height: string;
20
20
  width: string;
21
21
  };
22
+ chevron: {
23
+ fill: string;
24
+ size: string;
25
+ };
22
26
  color: string;
23
27
  typography: {
24
- fontWeight: number;
25
- fontSize: string;
26
- lineHeight: number;
28
+ font: string;
29
+ lineHeight: string;
27
30
  };
28
31
  };
29
32
  export type ComponentIntendedAudienceSignifier = typeof componentIntendedAudienceSignifier;
@@ -7,9 +7,6 @@ export declare const componentLayout: {
7
7
  display: string;
8
8
  minHeight: string;
9
9
  width: string;
10
- 'max-width': string;
11
- 'margin-left': string;
12
- 'margin-right': string;
13
10
  };
14
11
  sm: {
15
12
  gridTemplateAreas: string;
@@ -44,5 +41,10 @@ export declare const componentLayout: {
44
41
  width: string;
45
42
  };
46
43
  };
44
+ main: {
45
+ 'max-width': string;
46
+ 'margin-left': string;
47
+ 'margin-right': string;
48
+ };
47
49
  };
48
50
  export type ComponentLayout = typeof componentLayout;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+ export declare const semanticGrid: {
5
+ gutter: {
6
+ 'lg-px': string;
7
+ 'md-px': string;
8
+ 'sm-px': string;
9
+ };
10
+ margin: {
11
+ 'lg-px': string;
12
+ 'md-px': string;
13
+ 'sm-px': string;
14
+ };
15
+ columns: {
16
+ lg: number;
17
+ md: number;
18
+ sm: number;
19
+ };
20
+ };
21
+ export type SemanticGrid = typeof semanticGrid;
@@ -20,5 +20,12 @@ export declare const semanticSizing: {
20
20
  md: string;
21
21
  'extra-wide': string;
22
22
  };
23
+ sidebar: {
24
+ 'md-px': string;
25
+ 'lg-px': string;
26
+ };
27
+ layout: {
28
+ 'max-width-px': string;
29
+ };
23
30
  };
24
31
  export type SemanticSizing = typeof semanticSizing;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guardian/stand",
3
- "version": "0.0.36",
3
+ "version": "0.0.38",
4
4
  "repository": {
5
5
  "url": "https://github.com/guardian/stand"
6
6
  },
@@ -169,6 +169,7 @@
169
169
  "./base/radius.css": "./dist/styleD/build/css/base/radius.css",
170
170
  "./semantic/breakpoints.css": "./dist/styleD/build/css/semantic/breakpoints.css",
171
171
  "./semantic/colors.css": "./dist/styleD/build/css/semantic/colors.css",
172
+ "./semantic/grid.css": "./dist/styleD/build/css/semantic/grid.css",
172
173
  "./semantic/typography.css": "./dist/styleD/build/css/semantic/typography.css",
173
174
  "./semantic/sizing.css": "./dist/styleD/build/css/semantic/sizing.css",
174
175
  "./semantic/shadow.css": "./dist/styleD/build/css/semantic/shadow.css",