@guardian/stand 0.0.15 → 0.0.17

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 (130) hide show
  1. package/README.md +1 -0
  2. package/dist/TopBar.cjs +9 -3
  3. package/dist/TopBar.js +4 -1
  4. package/dist/components/avatar/Avatar.cjs +2 -2
  5. package/dist/components/button/Button.cjs +1 -1
  6. package/dist/components/button/Button.js +1 -1
  7. package/dist/components/button/styles.cjs +7 -4
  8. package/dist/components/button/styles.js +7 -4
  9. package/dist/components/byline/Byline.cjs +15 -15
  10. package/dist/components/favicon/Favicon.cjs +2 -2
  11. package/dist/components/icon-button/IconButton.cjs +4 -4
  12. package/dist/components/icon-button/IconButton.js +1 -1
  13. package/dist/components/icon-link-button/IconLinkButton.cjs +4 -4
  14. package/dist/components/icon-link-button/IconLinkButton.js +1 -1
  15. package/dist/components/link-button/LinkButton.cjs +1 -1
  16. package/dist/components/link-button/LinkButton.js +1 -1
  17. package/dist/components/menu/Menu.cjs +204 -0
  18. package/dist/components/menu/Menu.js +77 -0
  19. package/dist/components/menu/styles.cjs +104 -0
  20. package/dist/components/menu/styles.js +89 -0
  21. package/dist/components/tag-picker/TagTable.cjs +11 -11
  22. package/dist/components/topbar/TopBar.cjs +101 -0
  23. package/dist/components/topbar/TopBar.js +63 -0
  24. package/dist/components/topbar/styles.cjs +30 -0
  25. package/dist/components/topbar/styles.js +25 -0
  26. package/dist/components/topbar/topBarItem/TopBarItem.cjs +28 -0
  27. package/dist/components/topbar/topBarItem/TopBarItem.js +10 -0
  28. package/dist/components/topbar/topBarItem/styles.cjs +20 -0
  29. package/dist/components/topbar/topBarItem/styles.js +17 -0
  30. package/dist/components/topbar/topBarNavigation/TopBarNavigation.cjs +70 -0
  31. package/dist/components/topbar/topBarNavigation/TopBarNavigation.js +23 -0
  32. package/dist/components/topbar/topBarNavigation/styles.cjs +68 -0
  33. package/dist/components/topbar/topBarNavigation/styles.js +61 -0
  34. package/dist/components/topbar/{toolName → topBarToolName}/TopBarToolName.cjs +3 -2
  35. package/dist/components/topbar/topBarToolName/TopBarToolName.js +13 -0
  36. package/dist/index.cjs +4 -0
  37. package/dist/index.js +2 -0
  38. package/dist/menu.cjs +13 -0
  39. package/dist/menu.js +2 -0
  40. package/dist/styleD/build/css/base/typography.css +3 -3
  41. package/dist/styleD/build/css/component/TopBar.css +55 -1
  42. package/dist/styleD/build/css/component/avatar.css +1 -1
  43. package/dist/styleD/build/css/component/button.css +177 -255
  44. package/dist/styleD/build/css/component/favicon.css +1 -1
  45. package/dist/styleD/build/css/component/menu.css +83 -0
  46. package/dist/styleD/build/css/component/tagAutocomplete.css +1 -1
  47. package/dist/styleD/build/css/component/tagTable.css +1 -1
  48. package/dist/styleD/build/css/component/topBarItem.css +7 -0
  49. package/dist/styleD/build/css/component/userMenu.css +6 -6
  50. package/dist/styleD/build/css/semantic/colors.css +45 -46
  51. package/dist/styleD/build/css/semantic/shadow.css +7 -0
  52. package/dist/styleD/build/css/semantic/sizing.css +1 -0
  53. package/dist/styleD/build/css/semantic/typography.css +30 -30
  54. package/dist/styleD/build/typescript/base/typography.cjs +3 -3
  55. package/dist/styleD/build/typescript/base/typography.js +3 -3
  56. package/dist/styleD/build/typescript/component/TopBar.cjs +94 -0
  57. package/dist/styleD/build/typescript/component/TopBar.js +94 -0
  58. package/dist/styleD/build/typescript/component/button.cjs +5 -130
  59. package/dist/styleD/build/typescript/component/button.js +5 -130
  60. package/dist/styleD/build/typescript/component/menu.cjs +141 -0
  61. package/dist/styleD/build/typescript/component/menu.js +139 -0
  62. package/dist/styleD/build/typescript/semantic/colors.cjs +47 -52
  63. package/dist/styleD/build/typescript/semantic/colors.js +47 -52
  64. package/dist/styleD/build/typescript/semantic/shadow.cjs +7 -0
  65. package/dist/styleD/build/typescript/semantic/shadow.js +5 -0
  66. package/dist/styleD/build/typescript/semantic/sizing.cjs +1 -0
  67. package/dist/styleD/build/typescript/semantic/sizing.js +1 -0
  68. package/dist/types/TopBar.d.ts +12 -3
  69. package/dist/types/avatar.d.ts +1 -1
  70. package/dist/types/button.d.ts +1 -1
  71. package/dist/types/byline.d.ts +1 -1
  72. package/dist/types/components/avatar/styles.d.ts +2 -1
  73. package/dist/types/components/button/sandbox.d.ts +4 -4
  74. package/dist/types/components/button/styles.d.ts +2 -1
  75. package/dist/types/components/button/types.d.ts +1 -1
  76. package/dist/types/components/favicon/styles.d.ts +2 -1
  77. package/dist/types/components/icon/styles.d.ts +2 -1
  78. package/dist/types/components/icon-button/sandbox.d.ts +4 -4
  79. package/dist/types/components/icon-button/styles.d.ts +5 -129
  80. package/dist/types/components/icon-button/types.d.ts +1 -1
  81. package/dist/types/components/icon-link-button/sandbox.d.ts +4 -4
  82. package/dist/types/components/icon-link-button/styles.d.ts +5 -129
  83. package/dist/types/components/icon-link-button/types.d.ts +1 -1
  84. package/dist/types/components/link-button/sandbox.d.ts +4 -4
  85. package/dist/types/components/link-button/styles.d.ts +5 -129
  86. package/dist/types/components/link-button/types.d.ts +1 -1
  87. package/dist/types/components/menu/Menu.d.ts +7 -0
  88. package/dist/types/components/menu/sandbox.d.ts +5 -0
  89. package/dist/types/components/menu/styles.d.ts +28 -0
  90. package/dist/types/components/menu/types.d.ts +63 -0
  91. package/dist/types/components/topbar/TopBar.d.ts +8 -0
  92. package/dist/types/components/topbar/sandbox.d.ts +5 -0
  93. package/dist/types/components/topbar/styles.d.ts +9 -0
  94. package/dist/types/components/topbar/topBarItem/TopBarItem.d.ts +2 -0
  95. package/dist/types/components/topbar/topBarItem/sandbox.d.ts +5 -0
  96. package/dist/types/components/topbar/topBarItem/styles.d.ts +8 -0
  97. package/dist/types/components/topbar/topBarItem/types.d.ts +14 -0
  98. package/dist/types/components/topbar/topBarNavigation/TopBarNavigation.d.ts +2 -0
  99. package/dist/types/components/topbar/topBarNavigation/sandbox.d.ts +5 -0
  100. package/dist/types/components/topbar/topBarNavigation/styles.d.ts +12 -0
  101. package/dist/types/components/topbar/topBarNavigation/types.d.ts +44 -0
  102. package/dist/types/components/topbar/{toolName → topBarToolName}/styles.d.ts +2 -1
  103. package/dist/types/components/topbar/types.d.ts +3 -0
  104. package/dist/types/components/typography/styles.d.ts +2 -1
  105. package/dist/types/favicon.d.ts +1 -1
  106. package/dist/types/icon-button.d.ts +1 -1
  107. package/dist/types/icon-link-button.d.ts +1 -1
  108. package/dist/types/icon.d.ts +1 -1
  109. package/dist/types/index.d.ts +4 -0
  110. package/dist/types/link-button.d.ts +1 -1
  111. package/dist/types/menu.d.ts +21 -0
  112. package/dist/types/styleD/build/typescript/base/typography.d.ts +3 -3
  113. package/dist/types/styleD/build/typescript/component/TopBar.d.ts +94 -0
  114. package/dist/types/styleD/build/typescript/component/button.d.ts +3 -128
  115. package/dist/types/styleD/build/typescript/component/menu.d.ts +141 -0
  116. package/dist/types/styleD/build/typescript/semantic/colors.d.ts +44 -49
  117. package/dist/types/styleD/build/typescript/semantic/shadow.d.ts +7 -0
  118. package/dist/types/styleD/build/typescript/semantic/sizing.d.ts +1 -0
  119. package/dist/types/styleD/stories/semantic/Shadow.d.ts +1 -0
  120. package/dist/types/typography.d.ts +1 -1
  121. package/dist/util/css/reset.css +10 -0
  122. package/dist/util/reset.css.cjs +1 -1
  123. package/dist/util/reset.css.js +1 -1
  124. package/package.json +30 -17
  125. package/dist/components/topbar/toolName/TopBarToolName.js +0 -12
  126. /package/dist/components/topbar/{toolName → topBarToolName}/styles.cjs +0 -0
  127. /package/dist/components/topbar/{toolName → topBarToolName}/styles.js +0 -0
  128. /package/dist/types/components/topbar/{toolName → topBarToolName}/TopBarToolName.d.ts +0 -0
  129. /package/dist/types/components/topbar/{toolName → topBarToolName}/sandbox.d.ts +0 -0
  130. /package/dist/types/components/topbar/{toolName → topBarToolName}/types.d.ts +0 -0
@@ -0,0 +1,5 @@
1
+ const semanticShadow = {
2
+ raised: "0 0.125rem 0.375rem 0 rgb(0% 0% 0% / 0.3)"
3
+ };
4
+
5
+ export { semanticShadow };
@@ -2,6 +2,7 @@
2
2
 
3
3
  const semanticSizing = {
4
4
  height: {
5
+ xxs: "1.25rem",
5
6
  xs: "1.5rem",
6
7
  sm: "2rem",
7
8
  md: "2.5rem",
@@ -1,5 +1,6 @@
1
1
  const semanticSizing = {
2
2
  height: {
3
+ xxs: "1.25rem",
3
4
  xs: "1.5rem",
4
5
  sm: "2rem",
5
6
  md: "2.5rem",
@@ -12,8 +12,17 @@
12
12
  * If you only need the built CSS (./component/TopBar.css),
13
13
  * you don't need to install these.
14
14
  */
15
- export { TopBarToolName } from './components/topbar/toolName/TopBarToolName';
16
- export type { TopBarToolNameProps } from './components/topbar/toolName/types';
17
- export type { TopBarToolNameTheme } from './components/topbar/toolName/styles';
18
15
  export { componentTopBar } from './styleD/build/typescript/component/TopBar';
19
16
  export type { ComponentTopBar } from './styleD/build/typescript/component/TopBar';
17
+ export { TopBarToolName } from './components/topbar/topBarToolName/TopBarToolName';
18
+ export type { TopBarToolNameProps } from './components/topbar/topBarToolName/types';
19
+ export type { PartialTopBarToolNameTheme as TopBarToolNameTheme } from './components/topbar/topBarToolName/styles';
20
+ export { TopBarNavigation } from './components/topbar/topBarNavigation/TopBarNavigation';
21
+ export type { TopBarNavigationProps } from './components/topbar/topBarNavigation/types';
22
+ export type { PartialTopBarNavigationTheme as TopBarNavigationTheme } from './components/topbar/topBarNavigation/styles';
23
+ export { TopBarItem } from './components/topbar/topBarItem/TopBarItem';
24
+ export type { TopBarItemProps } from './components/topbar/topBarItem/types';
25
+ export type { PartialTopBarItemTheme as TopBarItemTheme } from './components/topbar/topBarItem/styles';
26
+ export { TopBar } from './components/topbar/TopBar';
27
+ export type { TopBarProps } from './components/topbar/types';
28
+ export type { PartialTopBarTheme as TopBarTheme } from './components/topbar/styles';
@@ -14,6 +14,6 @@
14
14
  */
15
15
  export { Avatar } from './components/avatar/Avatar';
16
16
  export type { AvatarProps } from './components/avatar/types';
17
- export type { AvatarTheme } from './components/avatar/styles';
17
+ export type { PartialAvatarTheme as AvatarTheme } from './components/avatar/styles';
18
18
  export { componentAvatar } from './styleD/build/typescript/component/avatar';
19
19
  export type { ComponentAvatar } from './styleD/build/typescript/component/avatar';
@@ -15,6 +15,6 @@
15
15
  */
16
16
  export { Button } from './components/button/Button';
17
17
  export type { ButtonProps } from './components/button/types';
18
- export type { ButtonTheme } from './components/button/styles';
18
+ export type { PartialButtonTheme as ButtonTheme } from './components/button/styles';
19
19
  export { componentButton } from './styleD/build/typescript/component/button';
20
20
  export type { ComponentButton } from './styleD/build/typescript/component/button';
@@ -20,6 +20,6 @@
20
20
  */
21
21
  export { Byline } from './components/byline/Byline';
22
22
  export type { BylineModel } from './components/byline/lib';
23
- export type { PartialBylineTheme } from './components/byline/theme';
23
+ export type { PartialBylineTheme as BylineTheme } from './components/byline/theme';
24
24
  export { componentByline } from './styleD/build/typescript/component/byline';
25
25
  export type { ComponentByline } from './styleD/build/typescript/component/byline';
@@ -1,8 +1,9 @@
1
1
  import type { SerializedStyles } from '@emotion/react';
2
2
  import type { ComponentAvatar } from '../../styleD/build/typescript/component/avatar';
3
- import type { Prettify } from '../../util/types';
3
+ import type { DeepPartial, Prettify } from '../../util/types';
4
4
  import type { AvatarProps } from './types';
5
5
  export type AvatarTheme = Prettify<ComponentAvatar>;
6
+ export type PartialAvatarTheme = DeepPartial<AvatarTheme>;
6
7
  export declare const defaultAvatarTheme: AvatarTheme;
7
8
  export declare const avatarImageStyles: SerializedStyles;
8
9
  export declare const avatarStyles: (theme: AvatarTheme, { size, color }: Required<Pick<AvatarProps, 'size' | 'color'>>) => SerializedStyles;
@@ -1,5 +1,5 @@
1
1
  export declare const componentName = "Button";
2
- export declare const componentTsx = "import { Button } from '@guardian/stand/button';\n\nexport const Component = () => (\n\t<>\n\t\t<div className=\"container\">\n\t\t\t<Button onPress={() => alert('Button Clicked from React')}>Button</Button>\n\t\t\t<Button isDisabled onPress={() => alert('Button Clicked from React')}>\n\t\t\t\tDisabled Button\n\t\t\t</Button>\n\t\t</div>\n\t\t<div className=\"container\">\n\t\t\t<Button\n\t\t\t\tonPress={() => alert('Button Clicked from React')}\n\t\t\t\tvariant=\"neutral-secondary\"\n\t\t\t\ticon=\"raven\"\n\t\t\t>\n\t\t\t\tButton with Icon\n\t\t\t</Button>\n\t\t\t<Button\n\t\t\t\tisDisabled\n\t\t\t\tonPress={() => alert('Button Clicked from React')}\n\t\t\t\tvariant=\"neutral-secondary\"\n\t\t\t\ticon=\"owl\"\n\t\t\t>\n\t\t\t\tDisabled Button with Icon\n\t\t\t</Button>\n\t\t</div>\n\t</>\n);\n\n";
3
- export declare const componentCss = "@import '@guardian/stand/component/button.css';\n\n /* shared button styles for all variants */\n .stand-button {\n \tdisplay: var(--component-button-shared-display);\n \t-webkit-appearance: var(--component-button-shared-webkit-appearance);\n \ttext-align: var(--component-button-shared-text-align);\n \tbox-shadow: var(--component-button-shared-box-shadow);\n \ttext-decoration: var(--component-button-shared-text-decoration);\n \tcursor: var(--component-button-shared-cursor);\n \tjustify-content: var(--component-button-shared-justify-content);\n \talign-items: var(--component-button-shared-align-items);\n }\n .stand-button:focus-visible {\n \toutline: var(--component-button-shared-focus-visible-outline);\n \toutline-offset: var(--component-button-shared-focus-visible-outline-offset);\n }\n .stand-button:disabled {\n \tcursor: var(--component-button-shared-disabled-cursor);\n }\n\n /* example setup of button/link button style using md size and emphasised primary variant */\n .stand-button-emphasised-primary {\n \tcolor: var(--component-button-emphasised-primary-shared-color);\n \tbackground: var(\n \t\t--component-button-emphasised-primary-shared-background-color\n \t);\n \theight: var(--component-button-emphasised-primary-md-height);\n \tpadding: var(--component-button-emphasised-primary-md-padding-top)\n \tvar(--component-button-emphasised-primary-md-padding-right)\n \tvar(--component-button-emphasised-primary-md-padding-bottom)\n \tvar(--component-button-emphasised-primary-md-padding-left);\n \tfont: var(--component-button-emphasised-primary-md-typography-font);\n \tletter-spacing: var(\n \t\t--component-button-emphasised-primary-md-typography-letter-spacing\n \t);\n \tfont-variation-settings: \"wdth\"\n \tvar(--component-button-emphasised-primary-md-typography-font-width);\n \tborder: var(--component-button-emphasised-primary-shared-border);\n \tborder-radius: var(\n \t\t--component-button-emphasised-primary-shared-border-radius\n \t);\n }\n .stand-button-emphasised-primary:hover {\n \tbackground: var(\n \t\t--component-button-emphasised-primary-shared-hover-background-color\n \t);\n \tborder: var(--component-button-emphasised-primary-shared-hover-border);\n }\n .stand-button-emphasised-primary:active {\n \tbackground: var(\n \t\t--component-button-emphasised-primary-shared-active-background-color\n \t);\n \tborder: var(--component-button-emphasised-primary-shared-active-border);\n }\n .stand-button-emphasised-primary:disabled {\n \tcolor: var(--component-button-emphasised-primary-shared-disabled-color);\n \tbackground: var(\n \t\t--component-button-emphasised-primary-shared-disabled-background-color\n \t);\n \tborder: var(--component-button-emphasised-primary-shared-disabled-border);\n \t}\n \t.stand-button-emphasised-primary > .material-symbols {\n \tfont-size: var(--component-button-emphasised-primary-md-icon-size);\n \t}\n \t.stand-button-emphasised-primary:has(> .material-symbols) {\n \tpadding-left: var(\n \t\t--component-button-emphasised-primary-md-padding-with-icon-icon-left-left\n \t);\n \tgap: var(--component-button-emphasised-primary-md-icon-gap);\n }\n\n /* example setup of button/link button style using md size and neutral secondary variant */\n .stand-button-neutral-secondary {\n \tcolor: var(--component-button-neutral-secondary-shared-color);\n \tbackground: var(--component-button-neutral-secondary-shared-background-color);\n \theight: var(--component-button-neutral-secondary-md-height);\n \tpadding: var(--component-button-neutral-secondary-md-padding-top)\n \tvar(--component-button-neutral-secondary-md-padding-right)\n \tvar(--component-button-neutral-secondary-md-padding-bottom)\n \tvar(--component-button-neutral-secondary-md-padding-left);\n \tfont: var(--component-button-neutral-secondary-md-typography-font);\n \tletter-spacing: var(\n \t\t--component-button-neutral-secondary-md-typography-letter-spacing\n \t);\n \tfont-variation-settings: \"wdth\"\n \tvar(--component-button-neutral-secondary-md-typography-font-width);\n \tborder: var(--component-button-neutral-secondary-shared-border);\n \tborder-radius: var(--component-button-neutral-secondary-shared-border-radius);\n }\n .stand-button-neutral-secondary:hover {\n \tbackground: var(\n \t\t--component-button-neutral-secondary-shared-hover-background-color\n \t);\n \tborder: var(--component-button-neutral-secondary-shared-hover-border);\n }\n .stand-button-neutral-secondary:active {\n \tbackground: var(\n \t\t--component-button-neutral-secondary-shared-active-background-color\n \t);\n \tborder: var(--component-button-neutral-secondary-shared-active-border);\n }\n .stand-button-neutral-secondary:disabled {\n \tcolor: var(--component-button-neutral-secondary-shared-disabled-color);\n \tbackground: var(\n \t\t--component-button-neutral-secondary-shared-disabled-background-color\n \t);\n \tborder: var(--component-button-neutral-secondary-shared-disabled-border);\n }\n .stand-button-neutral-secondary > .material-symbols {\n \tfont-size: var(--component-button-neutral-secondary-md-icon-size);\n }\n .stand-button-neutral-secondary:has(> .material-symbols) {\n \tpadding-left: var(\n \t\t--component-button-neutral-secondary-md-padding-with-icon-icon-left-left\n \t);\n \tgap: var(--component-button-neutral-secondary-md-icon-gap);\n }\n\n";
4
- export declare const componentHtml = "<div class=\"container flow-column\">\n <div class=\"container\">\n \t<button class=\"stand-button stand-button-emphasised-primary\">Button</button>\n \t<button class=\"stand-button stand-button-emphasised-primary\" disabled>Disabled Button</button>\n </div>\n\n <div class=\"container\">\n \t<button class=\"stand-button stand-button-neutral-secondary\"><span class=\"material-symbols\">raven</span>Button with Icon</button>\n \t<button class=\"stand-button stand-button-neutral-secondary\" disabled><span class=\"material-symbols\">owl</span>Disabled Button with Icon</button>\n </div>\n\n</div>\n";
5
- export declare const componentJs = "\t// for ts/js\n\t\timport { componentButton } from \"@guardian/stand\";\n\n \t// example of creating a stylesheet in js\n \tconst sheet = new CSSStyleSheet();\n\n \t// apply the rules to the sheet\n \tsheet.replaceSync(`\n \t/* shared button styles for all variants */\n \t.js-stand-button {\n \t\tdisplay: ${componentButton.shared.display};\n \t\t-webkit-appearance: ${componentButton.shared[\"-webkit-appearance\"]};\n \t\ttext-align: ${componentButton.shared[\"text-align\"]};\n \t\tbox-shadow: ${componentButton.shared[\"box-shadow\"]};\n \t\ttext-decoration: ${componentButton.shared[\"text-decoration\"]};\n \t\tcursor: ${componentButton.shared.cursor};\n \t\tjustify-content: ${componentButton.shared[\"justify-content\"]};\n \t\talign-items: ${componentButton.shared[\"align-items\"]};\n \t}\n \t.js-stand-button:focus-visible {\n \t\toutline: ${componentButton.shared[\":focus-visible\"].outline};\n \t\toutline-offset: ${componentButton.shared[\":focus-visible\"][\"outline-offset\"]};\n \t}\n \t.js-stand-button:disabled {\n \t\tcursor: ${componentButton.shared[\":disabled\"].cursor};\n \t}\n\n \t/* example setup of button/link button style using md size and emphasised primary variant */\n \t.js-stand-button-emphasised-primary {\n \t\tcolor: ${componentButton[\"emphasised-primary\"].shared.color};\n \t\tbackground: ${componentButton[\"emphasised-primary\"].shared.backgroundColor};\n \t\theight: ${componentButton[\"emphasised-primary\"].md.height};\n \t\tpadding: ${componentButton[\"emphasised-primary\"].md.padding.top}\n \t\t${componentButton[\"emphasised-primary\"].md.padding.right}\n \t\t${componentButton[\"emphasised-primary\"].md.padding.bottom}\n \t\t${componentButton[\"emphasised-primary\"].md.padding.left};\n \t\tfont: ${componentButton[\"emphasised-primary\"].md.typography.font};\n \t\tletter-spacing: ${componentButton[\"emphasised-primary\"].md.typography.letterSpacing};\n \t\tfont-variation-settings: 'wdth'\n \t\t${componentButton[\"emphasised-primary\"].md.typography.fontWidth};\n \t\tborder: ${componentButton[\"emphasised-primary\"].shared.border};\n \t\tborder-radius: ${componentButton[\"emphasised-primary\"].shared.borderRadius};\n \t}\n \t.js-stand-button-emphasised-primary:hover {\n \t\tbackground: ${componentButton[\"emphasised-primary\"].shared[\":hover\"].backgroundColor};\n \t\tborder: ${componentButton[\"emphasised-primary\"].shared[\":hover\"].border}\n \t}\n \t.js-stand-button-emphasised-primary:active {\n \t\tbackground: ${componentButton[\"emphasised-primary\"].shared[\":active\"].backgroundColor};\n \t\tborder: ${componentButton[\"emphasised-primary\"].shared[\":active\"].border};\n \t}\n \t.js-stand-button-emphasised-primary:disabled {\n \t\tcolor: ${componentButton[\"emphasised-primary\"].shared[\":disabled\"].color};\n \t\tbackground: ${componentButton[\"emphasised-primary\"].shared[\":disabled\"].backgroundColor};\n \t\tborder: ${componentButton[\"emphasised-primary\"].shared[\":disabled\"].border};\n \t}\n \t.js-stand-button-emphasised-primary > .material-symbols {\n \t\tfont-size: ${componentButton[\"emphasised-primary\"].md.icon.size}\n \t}\n \t.js-stand-button-emphasised-primary:has(> .material-symbols) {\n \t\tpadding-left: ${componentButton[\"emphasised-primary\"].md.padding.withIcon.iconLeft.left};\n \t\tgap: ${componentButton[\"emphasised-primary\"].md.icon.gap};\n \t}\n\n \t/* example setup of button/link button style using md size and neutral secondary variant */\n \t.js-stand-button-neutral-secondary {\n \t\tcolor: ${componentButton[\"neutral-secondary\"].shared.color};\n \t\tbackground: ${componentButton[\"neutral-secondary\"].shared.backgroundColor};\n \t\theight: ${componentButton[\"neutral-secondary\"].md.height};\n \t\tpadding: ${componentButton[\"neutral-secondary\"].md.padding.top}\n \t\t${componentButton[\"neutral-secondary\"].md.padding.right}\n \t\t${componentButton[\"neutral-secondary\"].md.padding.bottom}\n \t\t${componentButton[\"neutral-secondary\"].md.padding.left};\n \t\tfont: ${componentButton[\"neutral-secondary\"].md.typography.font};\n \t\tletter-spacing: ${componentButton[\"neutral-secondary\"].md.typography.letterSpacing};\n \t\tfont-variation-settings: 'wdth'\n \t\t${componentButton[\"neutral-secondary\"].md.typography.fontWidth};\n \t\tborder: ${componentButton[\"neutral-secondary\"].shared.border};\n \t\tborder-radius: ${componentButton[\"neutral-secondary\"].shared.borderRadius};\n \t}\n \t.js-stand-button-neutral-secondary:hover {\n \t\tbackground: ${componentButton[\"neutral-secondary\"].shared[\":hover\"].backgroundColor};\n \t\tborder: ${componentButton[\"neutral-secondary\"].shared[\":hover\"].border};\n \t}\n \t.js-stand-button-neutral-secondary:active {\n \t\tbackground: ${componentButton[\"neutral-secondary\"].shared[\":active\"].backgroundColor};\n \t\tborder: ${componentButton[\"neutral-secondary\"].shared[\":active\"].border};\n \t}\n \t.js-stand-button-neutral-secondary:disabled {\n \t\tcolor: ${componentButton[\"neutral-secondary\"].shared[\":disabled\"].color};\n \t\tbackground: ${componentButton[\"neutral-secondary\"].shared[\":disabled\"].backgroundColor};\n \t\tborder: ${componentButton[\"neutral-secondary\"].shared[\":disabled\"].border};\n \t}\n \t.js-stand-button-neutral-secondary > .material-symbols {\n \t\tfont-size: ${componentButton[\"neutral-secondary\"].md.icon.size}\n \t}\n \t.js-stand-button-neutral-secondary:has(> .material-symbols) {\n \t\tpadding-left: ${componentButton[\"neutral-secondary\"].md.padding.withIcon.iconLeft.left};\n \t\tgap: ${componentButton[\"neutral-secondary\"].md.icon.gap};\n \t}\n\n `);\n\n // update the document with the sheet\n document.adoptedStyleSheets.push(sheet);\n\n // modify the dom with the button components using the generated stylesheet\n document.getElementById(\"app\").innerHTML = `<div class=\"container flow-column\">\n \t<div class=\"container\">\n \t\t<button class=\"js-stand-button js-stand-button-emphasised-primary\">Button</button>\n \t\t<button class=\"js-stand-button js-stand-button-emphasised-primary\" disabled>Disabled Button</button>\n \t</div>\n \t<div class=\"container\">\n \t\t<button class=\"js-stand-button js-stand-button-neutral-secondary\"><span class=\"material-symbols\">raven</span>Button with Icon</button>\n \t\t<button class=\"js-stand-button js-stand-button-neutral-secondary\" disabled><span class=\"material-symbols\">owl</span>Disabled Button with Icon</button>\n \t</div>\n </div>`;\n\n";
2
+ export declare const componentTsx = "import { Button } from '@guardian/stand/button';\n\nexport const Component = () => (\n\t<>\n\t\t<div className=\"container\">\n\t\t\t<Button onPress={() => alert('Button Clicked from React')}>Button</Button>\n\t\t\t<Button isDisabled onPress={() => alert('Button Clicked from React')}>\n\t\t\t\tDisabled Button\n\t\t\t</Button>\n\t\t</div>\n\t\t<div className=\"container\">\n\t\t\t<Button\n\t\t\t\tonPress={() => alert('Button Clicked from React')}\n\t\t\t\tvariant=\"tertiary\"\n\t\t\t\ticon=\"raven\"\n\t\t\t>\n\t\t\t\tButton with Icon\n\t\t\t</Button>\n\t\t\t<Button\n\t\t\t\tisDisabled\n\t\t\t\tonPress={() => alert('Button Clicked from React')}\n\t\t\t\tvariant=\"tertiary\"\n\t\t\t\ticon=\"owl\"\n\t\t\t>\n\t\t\t\tDisabled Button with Icon\n\t\t\t</Button>\n\t\t</div>\n\t</>\n);\n\n";
3
+ export declare const componentCss = "@import '@guardian/stand/component/button.css';\n\n /* shared button styles for all variants */\n .stand-button {\n \tdisplay: var(--component-button-shared-display);\n \t-webkit-appearance: var(--component-button-shared-webkit-appearance);\n \ttext-align: var(--component-button-shared-text-align);\n \tbox-shadow: var(--component-button-shared-box-shadow);\n \ttext-decoration: var(--component-button-shared-text-decoration);\n \tcursor: var(--component-button-shared-cursor);\n \tjustify-content: var(--component-button-shared-justify-content);\n \talign-items: var(--component-button-shared-align-items);\n }\n .stand-button:focus-visible {\n \toutline: var(--component-button-shared-focus-visible-outline);\n \toutline-offset: var(--component-button-shared-focus-visible-outline-offset);\n }\n .stand-button:disabled {\n \tcursor: var(--component-button-shared-disabled-cursor);\n }\n\n /* example setup of button/link button style using md size and emphasised primary variant */\n .stand-button-primary {\n \tcolor: var(--component-button-primary-shared-color);\n \tbackground: var(\n \t\t--component-button-primary-shared-background-color\n \t);\n \theight: var(--component-button-primary-md-height);\n \tpadding: var(--component-button-primary-md-padding-top)\n \tvar(--component-button-primary-md-padding-right)\n \tvar(--component-button-primary-md-padding-bottom)\n \tvar(--component-button-primary-md-padding-left);\n \tfont: var(--component-button-primary-md-typography-font);\n \tletter-spacing: var(\n \t\t--component-button-primary-md-typography-letter-spacing\n \t);\n \tfont-variation-settings: \"wdth\"\n \tvar(--component-button-primary-md-typography-font-width);\n \tborder: var(--component-button-primary-shared-border);\n \tborder-radius: var(\n \t\t--component-button-primary-shared-border-radius\n \t);\n }\n .stand-button-primary:hover {\n \tbackground: var(\n \t\t--component-button-primary-shared-hover-background-color\n \t);\n \tborder: var(--component-button-primary-shared-hover-border);\n }\n .stand-button-primary:active {\n \tbackground: var(\n \t\t--component-button-primary-shared-active-background-color\n \t);\n \tborder: var(--component-button-primary-shared-active-border);\n }\n .stand-button-primary:disabled {\n \tcolor: var(--component-button-primary-shared-disabled-color);\n \tbackground: var(\n \t\t--component-button-primary-shared-disabled-background-color\n \t);\n \tborder: var(--component-button-primary-shared-disabled-border);\n \t}\n \t.stand-button-primary > .material-symbols {\n \tfont-size: var(--component-button-primary-md-icon-size);\n \t}\n \t.stand-button-primary:has(> .material-symbols) {\n \tpadding-left: var(\n \t\t--component-button-primary-md-padding-with-icon-icon-left-left\n \t);\n \tgap: var(--component-button-primary-md-icon-gap);\n }\n\n /* example setup of button/link button style using md size and neutral secondary variant */\n .stand-button-tertiary {\n \tcolor: var(--component-button-tertiary-shared-color);\n \tbackground: var(--component-button-tertiary-shared-background-color);\n \theight: var(--component-button-tertiary-md-height);\n \tpadding: var(--component-button-tertiary-md-padding-top)\n \tvar(--component-button-tertiary-md-padding-right)\n \tvar(--component-button-tertiary-md-padding-bottom)\n \tvar(--component-button-tertiary-md-padding-left);\n \tfont: var(--component-button-tertiary-md-typography-font);\n \tletter-spacing: var(\n \t\t--component-button-tertiary-md-typography-letter-spacing\n \t);\n \tfont-variation-settings: \"wdth\"\n \tvar(--component-button-tertiary-md-typography-font-width);\n \tborder: var(--component-button-tertiary-shared-border);\n \tborder-radius: var(--component-button-tertiary-shared-border-radius);\n }\n .stand-button-tertiary:hover {\n \tbackground: var(\n \t\t--component-button-tertiary-shared-hover-background-color\n \t);\n \tborder: var(--component-button-tertiary-shared-hover-border);\n }\n .stand-button-tertiary:active {\n \tbackground: var(\n \t\t--component-button-tertiary-shared-active-background-color\n \t);\n \tborder: var(--component-button-tertiary-shared-active-border);\n }\n .stand-button-tertiary:disabled {\n \tcolor: var(--component-button-tertiary-shared-disabled-color);\n \tbackground: var(\n \t\t--component-button-tertiary-shared-disabled-background-color\n \t);\n \tborder: var(--component-button-tertiary-shared-disabled-border);\n }\n .stand-button-tertiary > .material-symbols {\n \tfont-size: var(--component-button-tertiary-md-icon-size);\n }\n .stand-button-tertiary:has(> .material-symbols) {\n \tpadding-left: var(\n \t\t--component-button-tertiary-md-padding-with-icon-icon-left-left\n \t);\n \tgap: var(--component-button-tertiary-md-icon-gap);\n }\n\n";
4
+ export declare const componentHtml = "<div class=\"container flow-column\">\n <div class=\"container\">\n \t<button class=\"stand-button stand-button-primary\">Button</button>\n \t<button class=\"stand-button stand-button-primary\" disabled>Disabled Button</button>\n </div>\n\n <div class=\"container\">\n \t<button class=\"stand-button stand-button-tertiary\"><span class=\"material-symbols\">raven</span>Button with Icon</button>\n \t<button class=\"stand-button stand-button-tertiary\" disabled><span class=\"material-symbols\">owl</span>Disabled Button with Icon</button>\n </div>\n\n</div>\n";
5
+ export declare const componentJs = "\t// for ts/js\n\t\timport { componentButton } from \"@guardian/stand\";\n\n \t// example of creating a stylesheet in js\n \tconst sheet = new CSSStyleSheet();\n\n \t// apply the rules to the sheet\n \tsheet.replaceSync(`\n \t/* shared button styles for all variants */\n \t.js-stand-button {\n \t\tdisplay: ${componentButton.shared.display};\n \t\t-webkit-appearance: ${componentButton.shared[\"-webkit-appearance\"]};\n \t\ttext-align: ${componentButton.shared[\"text-align\"]};\n \t\tbox-shadow: ${componentButton.shared[\"box-shadow\"]};\n \t\ttext-decoration: ${componentButton.shared[\"text-decoration\"]};\n \t\tcursor: ${componentButton.shared.cursor};\n \t\tjustify-content: ${componentButton.shared[\"justify-content\"]};\n \t\talign-items: ${componentButton.shared[\"align-items\"]};\n \t}\n \t.js-stand-button:focus-visible {\n \t\toutline: ${componentButton.shared[\":focus-visible\"].outline};\n \t\toutline-offset: ${componentButton.shared[\":focus-visible\"][\"outline-offset\"]};\n \t}\n \t.js-stand-button:disabled {\n \t\tcursor: ${componentButton.shared[\":disabled\"].cursor};\n \t}\n\n \t/* example setup of button/link button style using md size and emphasised primary variant */\n \t.js-stand-button-primary {\n \t\tcolor: ${componentButton[\"primary\"].shared.color};\n \t\tbackground: ${componentButton[\"primary\"].shared.backgroundColor};\n \t\theight: ${componentButton[\"primary\"].md.height};\n \t\tpadding: ${componentButton[\"primary\"].md.padding.top}\n \t\t${componentButton[\"primary\"].md.padding.right}\n \t\t${componentButton[\"primary\"].md.padding.bottom}\n \t\t${componentButton[\"primary\"].md.padding.left};\n \t\tfont: ${componentButton[\"primary\"].md.typography.font};\n \t\tletter-spacing: ${componentButton[\"primary\"].md.typography.letterSpacing};\n \t\tfont-variation-settings: 'wdth'\n \t\t${componentButton[\"primary\"].md.typography.fontWidth};\n \t\tborder: ${componentButton[\"primary\"].shared.border};\n \t\tborder-radius: ${componentButton[\"primary\"].shared.borderRadius};\n \t}\n \t.js-stand-button-primary:hover {\n \t\tbackground: ${componentButton[\"primary\"].shared[\":hover\"].backgroundColor};\n \t\tborder: ${componentButton[\"primary\"].shared[\":hover\"].border}\n \t}\n \t.js-stand-button-primary:active {\n \t\tbackground: ${componentButton[\"primary\"].shared[\":active\"].backgroundColor};\n \t\tborder: ${componentButton[\"primary\"].shared[\":active\"].border};\n \t}\n \t.js-stand-button-primary:disabled {\n \t\tcolor: ${componentButton[\"primary\"].shared[\":disabled\"].color};\n \t\tbackground: ${componentButton[\"primary\"].shared[\":disabled\"].backgroundColor};\n \t\tborder: ${componentButton[\"primary\"].shared[\":disabled\"].border};\n \t}\n \t.js-stand-button-primary > .material-symbols {\n \t\tfont-size: ${componentButton[\"primary\"].md.icon.size}\n \t}\n \t.js-stand-button-primary:has(> .material-symbols) {\n \t\tpadding-left: ${componentButton[\"primary\"].md.padding.withIcon.iconLeft.left};\n \t\tgap: ${componentButton[\"primary\"].md.icon.gap};\n \t}\n\n \t/* example setup of button/link button style using md size and neutral secondary variant */\n \t.js-stand-button-tertiary {\n \t\tcolor: ${componentButton[\"tertiary\"].shared.color};\n \t\tbackground: ${componentButton[\"tertiary\"].shared.backgroundColor};\n \t\theight: ${componentButton[\"tertiary\"].md.height};\n \t\tpadding: ${componentButton[\"tertiary\"].md.padding.top}\n \t\t${componentButton[\"tertiary\"].md.padding.right}\n \t\t${componentButton[\"tertiary\"].md.padding.bottom}\n \t\t${componentButton[\"tertiary\"].md.padding.left};\n \t\tfont: ${componentButton[\"tertiary\"].md.typography.font};\n \t\tletter-spacing: ${componentButton[\"tertiary\"].md.typography.letterSpacing};\n \t\tfont-variation-settings: 'wdth'\n \t\t${componentButton[\"tertiary\"].md.typography.fontWidth};\n \t\tborder: ${componentButton[\"tertiary\"].shared.border};\n \t\tborder-radius: ${componentButton[\"tertiary\"].shared.borderRadius};\n \t}\n \t.js-stand-button-tertiary:hover {\n \t\tbackground: ${componentButton[\"tertiary\"].shared[\":hover\"].backgroundColor};\n \t\tborder: ${componentButton[\"tertiary\"].shared[\":hover\"].border};\n \t}\n \t.js-stand-button-tertiary:active {\n \t\tbackground: ${componentButton[\"tertiary\"].shared[\":active\"].backgroundColor};\n \t\tborder: ${componentButton[\"tertiary\"].shared[\":active\"].border};\n \t}\n \t.js-stand-button-tertiary:disabled {\n \t\tcolor: ${componentButton[\"tertiary\"].shared[\":disabled\"].color};\n \t\tbackground: ${componentButton[\"tertiary\"].shared[\":disabled\"].backgroundColor};\n \t\tborder: ${componentButton[\"tertiary\"].shared[\":disabled\"].border};\n \t}\n \t.js-stand-button-tertiary > .material-symbols {\n \t\tfont-size: ${componentButton[\"tertiary\"].md.icon.size}\n \t}\n \t.js-stand-button-tertiary:has(> .material-symbols) {\n \t\tpadding-left: ${componentButton[\"tertiary\"].md.padding.withIcon.iconLeft.left};\n \t\tgap: ${componentButton[\"tertiary\"].md.icon.gap};\n \t}\n\n `);\n\n // update the document with the sheet\n document.adoptedStyleSheets.push(sheet);\n\n // modify the dom with the button components using the generated stylesheet\n document.getElementById(\"app\").innerHTML = `<div class=\"container flow-column\">\n \t<div class=\"container\">\n \t\t<button class=\"js-stand-button js-stand-button-primary\">Button</button>\n \t\t<button class=\"js-stand-button js-stand-button-primary\" disabled>Disabled Button</button>\n \t</div>\n \t<div class=\"container\">\n \t\t<button class=\"js-stand-button js-stand-button-tertiary\"><span class=\"material-symbols\">raven</span>Button with Icon</button>\n \t\t<button class=\"js-stand-button js-stand-button-tertiary\" disabled><span class=\"material-symbols\">owl</span>Disabled Button with Icon</button>\n \t</div>\n </div>`;\n\n";
@@ -1,7 +1,8 @@
1
1
  import type { SerializedStyles } from '@emotion/react';
2
2
  import type { ComponentButton } from '../../styleD/build/typescript/component/button';
3
- import type { Prettify } from '../../util/types';
3
+ import type { DeepPartial, Prettify } from '../../util/types';
4
4
  import type { ButtonProps } from './types';
5
5
  export type ButtonTheme = Prettify<ComponentButton>;
6
+ export type PartialButtonTheme = DeepPartial<ButtonTheme>;
6
7
  export declare const defaultButtonTheme: ButtonTheme;
7
8
  export declare const buttonStyles: (theme: ButtonTheme, { size, variant }: Required<Pick<ButtonProps, 'size' | 'variant'>>, hasIcon?: boolean, isIconButton?: boolean) => SerializedStyles;
@@ -6,7 +6,7 @@ export interface ButtonProps extends DefaultProps<ButtonTheme, RACButtonProps['c
6
6
  /**
7
7
  * Size variant of the button
8
8
  */
9
- size?: keyof Omit<ButtonTheme['emphasised-primary'], 'shared'>;
9
+ size?: keyof Omit<ButtonTheme['primary'], 'shared'>;
10
10
  /**
11
11
  * Variant of the button
12
12
  */
@@ -1,7 +1,8 @@
1
1
  import type { SerializedStyles } from '@emotion/react';
2
2
  import { type ComponentFavicon } from '../../styleD/build/typescript/component/favicon';
3
- import type { Prettify } from '../../util/types';
3
+ import type { DeepPartial, Prettify } from '../../util/types';
4
4
  export type FaviconTheme = Prettify<ComponentFavicon>;
5
+ export type PartialFaviconTheme = DeepPartial<FaviconTheme>;
5
6
  export declare const defaultFaviconTheme: FaviconTheme;
6
7
  export declare const faviconStyles: (theme: FaviconTheme) => SerializedStyles;
7
8
  export declare const faviconTypographyStyles: (theme: FaviconTheme) => SerializedStyles;
@@ -1,7 +1,8 @@
1
1
  import type { ComponentIcon } from '../../styleD/build/typescript/component/icon';
2
- import type { Prettify } from '../../util/types';
2
+ import type { DeepPartial, Prettify } from '../../util/types';
3
3
  import type { IconProps } from './types';
4
4
  export type IconTheme = Prettify<ComponentIcon>;
5
+ export type PartialIconTheme = DeepPartial<IconTheme>;
5
6
  export declare const defaultIconTheme: IconTheme;
6
7
  export declare const iconStyles: (theme: IconTheme, { size, fill, mode, }: Required<Pick<IconProps, "size">> & Pick<IconProps, "fill"> & {
7
8
  mode: 'text' | 'svg';
@@ -1,5 +1,5 @@
1
1
  export declare const componentName = "IconButton";
2
- export declare const componentTsx = "import { IconButton } from \"@guardian/stand/icon-button\";\n\nexport const Component = () => (\n\t<>\n\t\t<IconButton\n onPress={() => alert(\"You summoned a raven!\")}\n symbol=\"raven\"\n ariaLabel=\"Summon a raven\"\n />\n <IconButton\n isDisabled\n onPress={() => alert(\"You consulted with an owl!\")}\n symbol=\"owl\"\n ariaLabel=\"Consult with an owl\"\n\t\t variant=\"neutral-secondary\"\n />\n\t</>\n);\n\n";
3
- export declare const componentCss = "@import '@guardian/stand/component/button.css';\n\n /* shared button styles for all variants */\n\t.stand-icon-button {\n\t\tdisplay: var(--component-button-shared-display);\n\t\t-webkit-appearance: var(--component-button-shared-webkit-appearance);\n\t\ttext-align: var(--component-button-shared-text-align);\n\t\tbox-shadow: var(--component-button-shared-box-shadow);\n\t\ttext-decoration: var(--component-button-shared-text-decoration);\n\t\tcursor: var(--component-button-shared-cursor);\n\t\tjustify-content: var(--component-button-shared-justify-content);\n\t\talign-items: var(--component-button-shared-align-items);\n\t}\n\t.stand-icon-button:focus-visible {\n\t\toutline: var(--component-button-shared-focus-visible-outline);\n\t\toutline-offset: var(--component-button-shared-focus-visible-outline-offset);\n\t}\n\t.stand-icon-button:disabled {\n\t\tcursor: var(--component-button-shared-disabled-cursor);\n\t}\n\n\t/* example setup of button/link button style using md size and emphasised primary variant */\n\t.stand-icon-button-emphasised-primary {\n\t\tcolor: var(--component-button-emphasised-primary-shared-color);\n\t\tbackground: var(\n\t\t\t--component-button-emphasised-primary-shared-background-color\n\t\t);\n\t\twidth: var(--component-button-emphasised-primary-md-icon-button-width);\n\t\theight: var(--component-button-emphasised-primary-md-height);\n\t\tpadding: 0;\n\t\tfont: var(--component-button-emphasised-primary-md-typography-font);\n\t\tletter-spacing: var(\n\t\t\t--component-button-emphasised-primary-md-typography-letter-spacing\n\t\t);\n\t\tfont-variation-settings: \"wdth\"\n\t\t\tvar(--component-button-emphasised-primary-md-typography-font-width);\n\t\tborder: var(--component-button-emphasised-primary-shared-border);\n\t\tborder-radius: var(\n\t\t\t--component-button-emphasised-primary-shared-border-radius\n\t\t);\n\t}\n\t.stand-icon-button-emphasised-primary:hover {\n\t\tbackground: var(\n\t\t\t--component-button-emphasised-primary-shared-hover-background-color\n\t\t);\n\t\tborder: var(--component-button-emphasised-primary-shared-hover-border);\n\t}\n\t.stand-icon-button-emphasised-primary:active {\n\t\tbackground: var(\n\t\t\t--component-button-emphasised-primary-shared-active-background-color\n\t\t);\n\t\tborder: var(--component-button-emphasised-primary-shared-active-border);\n\t}\n\t.stand-icon-button-emphasised-primary:disabled {\n\t\tcolor: var(--component-button-emphasised-primary-shared-disabled-color);\n\t\tbackground: var(\n\t\t\t--component-button-emphasised-primary-shared-disabled-background-color\n\t\t);\n\t\tborder: var(--component-button-emphasised-primary-shared-disabled-border);\n\t}\n\t.stand-icon-button-emphasised-primary > .material-symbols {\n\t\tfont-size: var(--component-button-emphasised-primary-md-icon-size);\n\t}\n\n\t/* example setup of button/link button style using md size and neutral secondary variant */\n\t.stand-icon-button-neutral-secondary {\n\t\tcolor: var(--component-button-neutral-secondary-shared-color);\n\t\tbackground: var(--component-button-neutral-secondary-shared-background-color);\n\t\twidth: var(--component-button-neutral-secondary-md-icon-button-width);\n\t\theight: var(--component-button-neutral-secondary-md-height);\n\t\tpadding: 0;\n\t\tfont: var(--component-button-neutral-secondary-md-typography-font);\n\t\tletter-spacing: var(\n\t\t\t--component-button-neutral-secondary-md-typography-letter-spacing\n\t\t);\n\t\tfont-variation-settings: \"wdth\"\n\t\t\tvar(--component-button-neutral-secondary-md-typography-font-width);\n\t\tborder: var(--component-button-neutral-secondary-shared-border);\n\t\tborder-radius: var(--component-button-neutral-secondary-shared-border-radius);\n\t}\n\t.stand-icon-button-neutral-secondary:hover {\n\t\tbackground: var(\n\t\t\t--component-button-neutral-secondary-shared-hover-background-color\n\t\t);\n\t\tborder: var(--component-button-neutral-secondary-shared-hover-border);\n\t}\n\t.stand-icon-button-neutral-secondary:active {\n\t\tbackground: var(\n\t\t\t--component-button-neutral-secondary-shared-active-background-color\n\t\t);\n\t\tborder: var(--component-button-neutral-secondary-shared-active-border);\n\t}\n\t.stand-icon-button-neutral-secondary:disabled, .stand-icon-button-neutral-secondary[data-disabled] {\n\t\tcolor: var(--component-button-neutral-secondary-shared-disabled-color);\n\t\tbackground: var(\n\t\t\t--component-button-neutral-secondary-shared-disabled-background-color\n\t\t);\n\t\tborder: var(--component-button-neutral-secondary-shared-disabled-border);\n\t}\n\t.stand-icon-button-neutral-secondary > .material-symbols {\n\t\tfont-size: var(--component-button-neutral-secondary-md-icon-size);\n\t}\n\n";
4
- export declare const componentHtml = "<div class=\"container\">\n <button class=\"stand-icon-button stand-icon-button-emphasised-primary\" title=\"Summon a raven\" aria-label=\"Summon a raven\"><span class=\"material-symbols\" aria-hidden=\"true\">raven</span></button>\n <button class=\"stand-icon-button stand-icon-button-neutral-secondary\" disabled title=\"Consult with an owl\" aria-label=\"Consult with an owl\"><span class=\"material-symbols\" aria-hidden=\"true\">owl</span></button>\n</div>\n";
5
- export declare const componentJs = "\t// for ts/js\n\timport { componentButton } from \"@guardian/stand\";\n\n\t// example of creating a stylesheet in js\n\tconst sheet = new CSSStyleSheet();\n\n\t// apply the rules to the sheet\n\tsheet.replaceSync(`\n\t/* shared button styles for all variants */\n\t.js-stand-icon-button {\n\t\tdisplay: ${componentButton.shared.display};\n\t\t-webkit-appearance: ${componentButton.shared[\"-webkit-appearance\"]};\n\t\ttext-align: ${componentButton.shared[\"text-align\"]};\n\t\tbox-shadow: ${componentButton.shared[\"box-shadow\"]};\n\t\ttext-decoration: ${componentButton.shared[\"text-decoration\"]};\n\t\tcursor: ${componentButton.shared.cursor};\n\t\tjustify-content: ${componentButton.shared[\"justify-content\"]};\n\t\talign-items: ${componentButton.shared[\"align-items\"]};\n\t}\n\t.js-stand-icon-button:focus-visible {\n\t\toutline: ${componentButton.shared[\":focus-visible\"].outline};\n\t\toutline-offset: ${componentButton.shared[\":focus-visible\"][\"outline-offset\"]};\n\t}\n\t.js-stand-icon-button:disabled {\n\t\tcursor: ${componentButton.shared[\":disabled\"].cursor};\n\t}\n\n\t/* example setup of button/link button style using md size and emphasised primary variant */\n\t.js-stand-icon-button-emphasised-primary {\n\t\tcolor: ${componentButton[\"emphasised-primary\"].shared.color};\n\t\tbackground: ${componentButton[\"emphasised-primary\"].shared.backgroundColor};\n\t\twidth: ${componentButton[\"emphasised-primary\"].md.iconButton.width};\n\t\theight: ${componentButton[\"emphasised-primary\"].md.height};\n\t\tpadding: 0;\n\t\tfont: ${componentButton[\"emphasised-primary\"].md.typography.font};\n\t\tletter-spacing: ${componentButton[\"emphasised-primary\"].md.typography.letterSpacing};\n\t\tfont-variation-settings: 'wdth'\n\t\t${componentButton[\"emphasised-primary\"].md.typography.fontWidth};\n\t\tborder: ${componentButton[\"emphasised-primary\"].shared.border};\n\t\tborder-radius: ${componentButton[\"emphasised-primary\"].shared.borderRadius};\n\t}\n\t.js-stand-icon-button-emphasised-primary:hover {\n\t\tbackground: ${componentButton[\"emphasised-primary\"].shared[\":hover\"].backgroundColor};\n\t\tborder: ${componentButton[\"emphasised-primary\"].shared[\":hover\"].border}\n\t}\n\t.js-stand-icon-button-emphasised-primary:active {\n\t\tbackground: ${componentButton[\"emphasised-primary\"].shared[\":active\"].backgroundColor};\n\t\tborder: ${componentButton[\"emphasised-primary\"].shared[\":active\"].border};\n\t}\n\t.js-stand-icon-button-emphasised-primary:disabled {\n\t\tcolor: ${componentButton[\"emphasised-primary\"].shared[\":disabled\"].color};\n\t\tbackground: ${componentButton[\"emphasised-primary\"].shared[\":disabled\"].backgroundColor};\n\t\tborder: ${componentButton[\"emphasised-primary\"].shared[\":disabled\"].border};\n\t}\n\t.js-stand-icon-button-emphasised-primary > .material-symbols {\n\t\tfont-size: ${componentButton[\"emphasised-primary\"].md.icon.size}\n\t}\n\n\t/* example setup of button/link button style using md size and neutral secondary variant */\n\t.js-stand-icon-button-neutral-secondary {\n\t\tcolor: ${componentButton[\"neutral-secondary\"].shared.color};\n\t\tbackground: ${componentButton[\"neutral-secondary\"].shared.backgroundColor};\n\t\twidth: ${componentButton[\"neutral-secondary\"].md.iconButton.width};\n\t\theight: ${componentButton[\"neutral-secondary\"].md.height};\n\t\tpadding: 0;\n\t\tfont: ${componentButton[\"neutral-secondary\"].md.typography.font};\n\t\tletter-spacing: ${componentButton[\"neutral-secondary\"].md.typography.letterSpacing};\n\t\tfont-variation-settings: 'wdth'\n\t\t${componentButton[\"neutral-secondary\"].md.typography.fontWidth};\n\t\tborder: ${componentButton[\"neutral-secondary\"].shared.border};\n\t\tborder-radius: ${componentButton[\"neutral-secondary\"].shared.borderRadius};\n\t}\n\t.js-stand-icon-button-neutral-secondary:hover {\n\t\tbackground: ${componentButton[\"neutral-secondary\"].shared[\":hover\"].backgroundColor};\n\t\tborder: ${componentButton[\"neutral-secondary\"].shared[\":hover\"].border};\n\t}\n\t.js-stand-icon-button-neutral-secondary:active {\n\t\tbackground: ${componentButton[\"neutral-secondary\"].shared[\":active\"].backgroundColor};\n\t\tborder: ${componentButton[\"neutral-secondary\"].shared[\":active\"].border};\n\t}\n\t.js-stand-icon-button-neutral-secondary:disabled, .js-stand-icon-button-neutral-secondary[data-disabled] {\n\t\tcolor: ${componentButton[\"neutral-secondary\"].shared[\":disabled\"].color};\n\t\tbackground: ${componentButton[\"neutral-secondary\"].shared[\":disabled\"].backgroundColor};\n\t\tborder: ${componentButton[\"neutral-secondary\"].shared[\":disabled\"].border};\n\t}\n\t.js-stand-icon-button-neutral-secondary > .material-symbols {\n\t\tfont-size: ${componentButton[\"neutral-secondary\"].md.icon.size}\n\t}\n\t`);\n\n\t// update the document with the sheet\n\tdocument.adoptedStyleSheets.push(sheet);\n\n\t// modify the dom with the button components using the generated stylesheet\n\tdocument.getElementById(\"app\").innerHTML = `\n\t<div class=\"container\">\n\t\t<button class=\"js-stand-icon-button js-stand-icon-button-emphasised-primary\" title=\"Summon a raven\"><span class=\"material-symbols\">raven</span></button>\n\t\t<button class=\"js-stand-icon-button js-stand-icon-button-neutral-secondary\" disabled title=\"Consult with an owl\"><span class=\"material-symbols\">owl</span></button>\n\t</div>\n\t`;\n\n";
2
+ export declare const componentTsx = "import { IconButton } from \"@guardian/stand/icon-button\";\n\nexport const Component = () => (\n\t<>\n\t\t<IconButton\n onPress={() => alert(\"You summoned a raven!\")}\n symbol=\"raven\"\n ariaLabel=\"Summon a raven\"\n />\n <IconButton\n isDisabled\n onPress={() => alert(\"You consulted with an owl!\")}\n symbol=\"owl\"\n ariaLabel=\"Consult with an owl\"\n\t\t variant=\"tertiary\"\n />\n\t</>\n);\n\n";
3
+ export declare const componentCss = "@import '@guardian/stand/component/button.css';\n\n /* shared button styles for all variants */\n\t.stand-icon-button {\n\t\tdisplay: var(--component-button-shared-display);\n\t\t-webkit-appearance: var(--component-button-shared-webkit-appearance);\n\t\ttext-align: var(--component-button-shared-text-align);\n\t\tbox-shadow: var(--component-button-shared-box-shadow);\n\t\ttext-decoration: var(--component-button-shared-text-decoration);\n\t\tcursor: var(--component-button-shared-cursor);\n\t\tjustify-content: var(--component-button-shared-justify-content);\n\t\talign-items: var(--component-button-shared-align-items);\n\t}\n\t.stand-icon-button:focus-visible {\n\t\toutline: var(--component-button-shared-focus-visible-outline);\n\t\toutline-offset: var(--component-button-shared-focus-visible-outline-offset);\n\t}\n\t.stand-icon-button:disabled {\n\t\tcursor: var(--component-button-shared-disabled-cursor);\n\t}\n\n\t/* example setup of button/link button style using md size and emphasised primary variant */\n\t.stand-icon-button-primary {\n\t\tcolor: var(--component-button-primary-shared-color);\n\t\tbackground: var(\n\t\t\t--component-button-primary-shared-background-color\n\t\t);\n\t\twidth: var(--component-button-primary-md-icon-button-width);\n\t\theight: var(--component-button-primary-md-height);\n\t\tpadding: 0;\n\t\tfont: var(--component-button-primary-md-typography-font);\n\t\tletter-spacing: var(\n\t\t\t--component-button-primary-md-typography-letter-spacing\n\t\t);\n\t\tfont-variation-settings: \"wdth\"\n\t\t\tvar(--component-button-primary-md-typography-font-width);\n\t\tborder: var(--component-button-primary-shared-border);\n\t\tborder-radius: var(\n\t\t\t--component-button-primary-shared-border-radius\n\t\t);\n\t}\n\t.stand-icon-button-primary:hover {\n\t\tbackground: var(\n\t\t\t--component-button-primary-shared-hover-background-color\n\t\t);\n\t\tborder: var(--component-button-primary-shared-hover-border);\n\t}\n\t.stand-icon-button-primary:active {\n\t\tbackground: var(\n\t\t\t--component-button-primary-shared-active-background-color\n\t\t);\n\t\tborder: var(--component-button-primary-shared-active-border);\n\t}\n\t.stand-icon-button-primary:disabled {\n\t\tcolor: var(--component-button-primary-shared-disabled-color);\n\t\tbackground: var(\n\t\t\t--component-button-primary-shared-disabled-background-color\n\t\t);\n\t\tborder: var(--component-button-primary-shared-disabled-border);\n\t}\n\t.stand-icon-button-primary > .material-symbols {\n\t\tfont-size: var(--component-button-primary-md-icon-size);\n\t}\n\n\t/* example setup of button/link button style using md size and neutral secondary variant */\n\t.stand-icon-button-tertiary {\n\t\tcolor: var(--component-button-tertiary-shared-color);\n\t\tbackground: var(--component-button-tertiary-shared-background-color);\n\t\twidth: var(--component-button-tertiary-md-icon-button-width);\n\t\theight: var(--component-button-tertiary-md-height);\n\t\tpadding: 0;\n\t\tfont: var(--component-button-tertiary-md-typography-font);\n\t\tletter-spacing: var(\n\t\t\t--component-button-tertiary-md-typography-letter-spacing\n\t\t);\n\t\tfont-variation-settings: \"wdth\"\n\t\t\tvar(--component-button-tertiary-md-typography-font-width);\n\t\tborder: var(--component-button-tertiary-shared-border);\n\t\tborder-radius: var(--component-button-tertiary-shared-border-radius);\n\t}\n\t.stand-icon-button-tertiary:hover {\n\t\tbackground: var(\n\t\t\t--component-button-tertiary-shared-hover-background-color\n\t\t);\n\t\tborder: var(--component-button-tertiary-shared-hover-border);\n\t}\n\t.stand-icon-button-tertiary:active {\n\t\tbackground: var(\n\t\t\t--component-button-tertiary-shared-active-background-color\n\t\t);\n\t\tborder: var(--component-button-tertiary-shared-active-border);\n\t}\n\t.stand-icon-button-tertiary:disabled, .stand-icon-button-tertiary[data-disabled] {\n\t\tcolor: var(--component-button-tertiary-shared-disabled-color);\n\t\tbackground: var(\n\t\t\t--component-button-tertiary-shared-disabled-background-color\n\t\t);\n\t\tborder: var(--component-button-tertiary-shared-disabled-border);\n\t}\n\t.stand-icon-button-tertiary > .material-symbols {\n\t\tfont-size: var(--component-button-tertiary-md-icon-size);\n\t}\n\n";
4
+ export declare const componentHtml = "<div class=\"container\">\n <button class=\"stand-icon-button stand-icon-button-primary\" title=\"Summon a raven\" aria-label=\"Summon a raven\"><span class=\"material-symbols\" aria-hidden=\"true\">raven</span></button>\n <button class=\"stand-icon-button stand-icon-button-tertiary\" disabled title=\"Consult with an owl\" aria-label=\"Consult with an owl\"><span class=\"material-symbols\" aria-hidden=\"true\">owl</span></button>\n</div>\n";
5
+ export declare const componentJs = "\t// for ts/js\n\timport { componentButton } from \"@guardian/stand\";\n\n\t// example of creating a stylesheet in js\n\tconst sheet = new CSSStyleSheet();\n\n\t// apply the rules to the sheet\n\tsheet.replaceSync(`\n\t/* shared button styles for all variants */\n\t.js-stand-icon-button {\n\t\tdisplay: ${componentButton.shared.display};\n\t\t-webkit-appearance: ${componentButton.shared[\"-webkit-appearance\"]};\n\t\ttext-align: ${componentButton.shared[\"text-align\"]};\n\t\tbox-shadow: ${componentButton.shared[\"box-shadow\"]};\n\t\ttext-decoration: ${componentButton.shared[\"text-decoration\"]};\n\t\tcursor: ${componentButton.shared.cursor};\n\t\tjustify-content: ${componentButton.shared[\"justify-content\"]};\n\t\talign-items: ${componentButton.shared[\"align-items\"]};\n\t}\n\t.js-stand-icon-button:focus-visible {\n\t\toutline: ${componentButton.shared[\":focus-visible\"].outline};\n\t\toutline-offset: ${componentButton.shared[\":focus-visible\"][\"outline-offset\"]};\n\t}\n\t.js-stand-icon-button:disabled {\n\t\tcursor: ${componentButton.shared[\":disabled\"].cursor};\n\t}\n\n\t/* example setup of button/link button style using md size and emphasised primary variant */\n\t.js-stand-icon-button-primary {\n\t\tcolor: ${componentButton[\"primary\"].shared.color};\n\t\tbackground: ${componentButton[\"primary\"].shared.backgroundColor};\n\t\twidth: ${componentButton[\"primary\"].md.iconButton.width};\n\t\theight: ${componentButton[\"primary\"].md.height};\n\t\tpadding: 0;\n\t\tfont: ${componentButton[\"primary\"].md.typography.font};\n\t\tletter-spacing: ${componentButton[\"primary\"].md.typography.letterSpacing};\n\t\tfont-variation-settings: 'wdth'\n\t\t${componentButton[\"primary\"].md.typography.fontWidth};\n\t\tborder: ${componentButton[\"primary\"].shared.border};\n\t\tborder-radius: ${componentButton[\"primary\"].shared.borderRadius};\n\t}\n\t.js-stand-icon-button-primary:hover {\n\t\tbackground: ${componentButton[\"primary\"].shared[\":hover\"].backgroundColor};\n\t\tborder: ${componentButton[\"primary\"].shared[\":hover\"].border}\n\t}\n\t.js-stand-icon-button-primary:active {\n\t\tbackground: ${componentButton[\"primary\"].shared[\":active\"].backgroundColor};\n\t\tborder: ${componentButton[\"primary\"].shared[\":active\"].border};\n\t}\n\t.js-stand-icon-button-primary:disabled {\n\t\tcolor: ${componentButton[\"primary\"].shared[\":disabled\"].color};\n\t\tbackground: ${componentButton[\"primary\"].shared[\":disabled\"].backgroundColor};\n\t\tborder: ${componentButton[\"primary\"].shared[\":disabled\"].border};\n\t}\n\t.js-stand-icon-button-primary > .material-symbols {\n\t\tfont-size: ${componentButton[\"primary\"].md.icon.size}\n\t}\n\n\t/* example setup of button/link button style using md size and neutral secondary variant */\n\t.js-stand-icon-button-tertiary {\n\t\tcolor: ${componentButton[\"tertiary\"].shared.color};\n\t\tbackground: ${componentButton[\"tertiary\"].shared.backgroundColor};\n\t\twidth: ${componentButton[\"tertiary\"].md.iconButton.width};\n\t\theight: ${componentButton[\"tertiary\"].md.height};\n\t\tpadding: 0;\n\t\tfont: ${componentButton[\"tertiary\"].md.typography.font};\n\t\tletter-spacing: ${componentButton[\"tertiary\"].md.typography.letterSpacing};\n\t\tfont-variation-settings: 'wdth'\n\t\t${componentButton[\"tertiary\"].md.typography.fontWidth};\n\t\tborder: ${componentButton[\"tertiary\"].shared.border};\n\t\tborder-radius: ${componentButton[\"tertiary\"].shared.borderRadius};\n\t}\n\t.js-stand-icon-button-tertiary:hover {\n\t\tbackground: ${componentButton[\"tertiary\"].shared[\":hover\"].backgroundColor};\n\t\tborder: ${componentButton[\"tertiary\"].shared[\":hover\"].border};\n\t}\n\t.js-stand-icon-button-tertiary:active {\n\t\tbackground: ${componentButton[\"tertiary\"].shared[\":active\"].backgroundColor};\n\t\tborder: ${componentButton[\"tertiary\"].shared[\":active\"].border};\n\t}\n\t.js-stand-icon-button-tertiary:disabled, .js-stand-icon-button-tertiary[data-disabled] {\n\t\tcolor: ${componentButton[\"tertiary\"].shared[\":disabled\"].color};\n\t\tbackground: ${componentButton[\"tertiary\"].shared[\":disabled\"].backgroundColor};\n\t\tborder: ${componentButton[\"tertiary\"].shared[\":disabled\"].border};\n\t}\n\t.js-stand-icon-button-tertiary > .material-symbols {\n\t\tfont-size: ${componentButton[\"tertiary\"].md.icon.size}\n\t}\n\t`);\n\n\t// update the document with the sheet\n\tdocument.adoptedStyleSheets.push(sheet);\n\n\t// modify the dom with the button components using the generated stylesheet\n\tdocument.getElementById(\"app\").innerHTML = `\n\t<div class=\"container\">\n\t\t<button class=\"js-stand-icon-button js-stand-icon-button-primary\" title=\"Summon a raven\"><span class=\"material-symbols\">raven</span></button>\n\t\t<button class=\"js-stand-icon-button js-stand-icon-button-tertiary\" disabled title=\"Consult with an owl\"><span class=\"material-symbols\">owl</span></button>\n\t</div>\n\t`;\n\n";
@@ -1,5 +1,6 @@
1
- import type { ButtonTheme } from '../button/styles';
1
+ import type { ButtonTheme, PartialButtonTheme } from '../button/styles';
2
2
  export type IconButtonTheme = ButtonTheme;
3
+ export type PartialIconButtonTheme = PartialButtonTheme;
3
4
  export declare const defaultIconButtonTheme: ButtonTheme;
4
5
  export declare const iconButtonStyles: (theme: {
5
6
  shared: {
@@ -19,7 +20,7 @@ export declare const iconButtonStyles: (theme: {
19
20
  'outline-offset': string;
20
21
  };
21
22
  };
22
- 'emphasised-primary': {
23
+ primary: {
23
24
  shared: {
24
25
  color: string;
25
26
  backgroundColor: string;
@@ -144,7 +145,7 @@ export declare const iconButtonStyles: (theme: {
144
145
  };
145
146
  };
146
147
  };
147
- 'emphasised-secondary': {
148
+ secondary: {
148
149
  shared: {
149
150
  color: string;
150
151
  backgroundColor: string;
@@ -269,132 +270,7 @@ export declare const iconButtonStyles: (theme: {
269
270
  };
270
271
  };
271
272
  };
272
- 'neutral-primary': {
273
- shared: {
274
- color: string;
275
- backgroundColor: string;
276
- borderRadius: string;
277
- border: string;
278
- ':hover': {
279
- backgroundColor: string;
280
- border: string;
281
- };
282
- ':active': {
283
- backgroundColor: string;
284
- border: string;
285
- };
286
- ':disabled': {
287
- color: string;
288
- backgroundColor: string;
289
- border: string;
290
- };
291
- };
292
- xs: {
293
- height: string;
294
- padding: {
295
- top: string;
296
- right: string;
297
- bottom: string;
298
- left: string;
299
- withIcon: {
300
- iconLeft: {
301
- left: string;
302
- };
303
- };
304
- };
305
- typography: {
306
- font: string;
307
- letterSpacing: string;
308
- fontWidth: number;
309
- };
310
- icon: {
311
- size: string;
312
- gap: string;
313
- };
314
- iconButton: {
315
- width: string;
316
- };
317
- };
318
- sm: {
319
- height: string;
320
- padding: {
321
- top: string;
322
- right: string;
323
- bottom: string;
324
- left: string;
325
- withIcon: {
326
- iconLeft: {
327
- left: string;
328
- };
329
- };
330
- };
331
- typography: {
332
- font: string;
333
- letterSpacing: string;
334
- fontWidth: number;
335
- };
336
- icon: {
337
- size: string;
338
- gap: string;
339
- };
340
- iconButton: {
341
- width: string;
342
- };
343
- };
344
- md: {
345
- height: string;
346
- padding: {
347
- top: string;
348
- right: string;
349
- bottom: string;
350
- left: string;
351
- withIcon: {
352
- iconLeft: {
353
- left: string;
354
- };
355
- };
356
- };
357
- typography: {
358
- font: string;
359
- letterSpacing: string;
360
- fontWidth: number;
361
- };
362
- icon: {
363
- size: string;
364
- gap: string;
365
- };
366
- iconButton: {
367
- width: string;
368
- };
369
- };
370
- lg: {
371
- height: string;
372
- padding: {
373
- top: string;
374
- right: string;
375
- bottom: string;
376
- left: string;
377
- withIcon: {
378
- iconLeft: {
379
- left: string;
380
- };
381
- };
382
- };
383
- typography: {
384
- font: string;
385
- letterSpacing: string;
386
- fontWidth: number;
387
- };
388
- icon: {
389
- size: string;
390
- gap: string;
391
- };
392
- iconButton: {
393
- width: string;
394
- };
395
- };
396
- };
397
- 'neutral-secondary': {
273
+ tertiary: {
398
274
  shared: {
399
275
  color: string;
400
276
  backgroundColor: string;
@@ -6,7 +6,7 @@ export interface IconButtonProps extends DefaultPropsWithChildren<IconButtonThem
6
6
  /**
7
7
  * Size variant of the avatar
8
8
  */
9
- size?: keyof Omit<IconButtonTheme['emphasised-primary'], 'shared'>;
9
+ size?: keyof Omit<IconButtonTheme['primary'], 'shared'>;
10
10
  /**
11
11
  * Variant of the button
12
12
  */
@@ -1,5 +1,5 @@
1
1
  export declare const componentName = "IconLinkButton";
2
- export declare const componentTsx = "import { IconLinkButton } from \"@guardian/stand/icon-link-button\";\n\nexport const Component = () => (\n\t<>\n\t\t<IconLinkButton\n href=\"#\"\n symbol=\"raven\"\n ariaLabel=\"Summon a raven\"\n />\n <IconLinkButton\n href=\"#\"\n isDisabled\n variant=\"emphasised-secondary\"\n symbol=\"owl\"\n ariaLabel=\"Consult with an owl\"\n />\n\t</>\n);\n\n";
3
- export declare const componentCss = "@import '@guardian/stand/component/button.css';\n\n /* shared button styles for all variants */\n\t.stand-icon-button {\n\t\tdisplay: var(--component-button-shared-display);\n\t\t-webkit-appearance: var(--component-button-shared-webkit-appearance);\n\t\ttext-align: var(--component-button-shared-text-align);\n\t\tbox-shadow: var(--component-button-shared-box-shadow);\n\t\ttext-decoration: var(--component-button-shared-text-decoration);\n\t\tcursor: var(--component-button-shared-cursor);\n\t\tjustify-content: var(--component-button-shared-justify-content);\n\t\talign-items: var(--component-button-shared-align-items);\n\t}\n\t.stand-icon-button:focus-visible {\n\t\toutline: var(--component-button-shared-focus-visible-outline);\n\t\toutline-offset: var(--component-button-shared-focus-visible-outline-offset);\n\t}\n\t.stand-icon-button:disabled {\n\t\tcursor: var(--component-button-shared-disabled-cursor);\n\t}\n\n\t/* example setup of button/link button style using md size and emphasised primary variant */\n\t.stand-icon-button-emphasised-primary {\n\t\tcolor: var(--component-button-emphasised-primary-shared-color);\n\t\tbackground: var(\n\t\t\t--component-button-emphasised-primary-shared-background-color\n\t\t);\n\t\twidth: var(--component-button-emphasised-primary-md-icon-button-width);\n\t\theight: var(--component-button-emphasised-primary-md-height);\n\t\tpadding: 0;\n\t\tfont: var(--component-button-emphasised-primary-md-typography-font);\n\t\tletter-spacing: var(\n\t\t\t--component-button-emphasised-primary-md-typography-letter-spacing\n\t\t);\n\t\tfont-variation-settings: \"wdth\"\n\t\t\tvar(--component-button-emphasised-primary-md-typography-font-width);\n\t\tborder: var(--component-button-emphasised-primary-shared-border);\n\t\tborder-radius: var(\n\t\t\t--component-button-emphasised-primary-shared-border-radius\n\t\t);\n\t}\n\t.stand-icon-button-emphasised-primary:hover {\n\t\tbackground: var(\n\t\t\t--component-button-emphasised-primary-shared-hover-background-color\n\t\t);\n\t\tborder: var(--component-button-emphasised-primary-shared-hover-border);\n\t}\n\t.stand-icon-button-emphasised-primary:active {\n\t\tbackground: var(\n\t\t\t--component-button-emphasised-primary-shared-active-background-color\n\t\t);\n\t\tborder: var(--component-button-emphasised-primary-shared-active-border);\n\t}\n\t.stand-icon-button-emphasised-primary:disabled {\n\t\tcolor: var(--component-button-emphasised-primary-shared-disabled-color);\n\t\tbackground: var(\n\t\t\t--component-button-emphasised-primary-shared-disabled-background-color\n\t\t);\n\t\tborder: var(--component-button-emphasised-primary-shared-disabled-border);\n\t}\n\t.stand-icon-button-emphasised-primary > .material-symbols {\n\t\tfont-size: var(--component-button-emphasised-primary-md-icon-size);\n\t}\n\n\t/* example setup of button/link button style using md size and neutral secondary variant */\n\t.stand-icon-button-neutral-secondary {\n\t\tcolor: var(--component-button-neutral-secondary-shared-color);\n\t\tbackground: var(--component-button-neutral-secondary-shared-background-color);\n\t\twidth: var(--component-button-neutral-secondary-md-icon-button-width);\n\t\theight: var(--component-button-neutral-secondary-md-height);\n\t\tpadding: 0;\n\t\tfont: var(--component-button-neutral-secondary-md-typography-font);\n\t\tletter-spacing: var(\n\t\t\t--component-button-neutral-secondary-md-typography-letter-spacing\n\t\t);\n\t\tfont-variation-settings: \"wdth\"\n\t\t\tvar(--component-button-neutral-secondary-md-typography-font-width);\n\t\tborder: var(--component-button-neutral-secondary-shared-border);\n\t\tborder-radius: var(--component-button-neutral-secondary-shared-border-radius);\n\t}\n\t.stand-icon-button-neutral-secondary:hover {\n\t\tbackground: var(\n\t\t\t--component-button-neutral-secondary-shared-hover-background-color\n\t\t);\n\t\tborder: var(--component-button-neutral-secondary-shared-hover-border);\n\t}\n\t.stand-icon-button-neutral-secondary:active {\n\t\tbackground: var(\n\t\t\t--component-button-neutral-secondary-shared-active-background-color\n\t\t);\n\t\tborder: var(--component-button-neutral-secondary-shared-active-border);\n\t}\n\t.stand-icon-button-neutral-secondary:disabled, .stand-icon-button-neutral-secondary[data-disabled] {\n\t\tcolor: var(--component-button-neutral-secondary-shared-disabled-color);\n\t\tbackground: var(\n\t\t\t--component-button-neutral-secondary-shared-disabled-background-color\n\t\t);\n\t\tborder: var(--component-button-neutral-secondary-shared-disabled-border);\n\t}\n\t.stand-icon-button-neutral-secondary > .material-symbols {\n\t\tfont-size: var(--component-button-neutral-secondary-md-icon-size);\n\t}\n\n";
4
- export declare const componentHtml = "<div class=\"container\">\n <a class=\"stand-icon-button stand-icon-button-emphasised-primary\" href=\"#\" title=\"Summon a raven\" aria-label=\"Summon a raven\"><span class=\"material-symbols\" aria-hidden=\"true\">raven</span></a>\n <a class=\"stand-icon-button stand-icon-button-neutral-secondary\" data-disabled title=\"Consult with an owl\" aria-label=\"Consult with an owl\"><span class=\"material-symbols\" aria-hidden=\"true\">owl</span></a>\n</div>\n";
5
- export declare const componentJs = "\t// for ts/js\n\timport { componentButton } from \"@guardian/stand\";\n\n\t// example of creating a stylesheet in js\n\tconst sheet = new CSSStyleSheet();\n\n\t// apply the rules to the sheet\n\tsheet.replaceSync(`\n\t/* shared button styles for all variants */\n\t.js-stand-icon-button {\n\t\tdisplay: ${componentButton.shared.display};\n\t\t-webkit-appearance: ${componentButton.shared[\"-webkit-appearance\"]};\n\t\ttext-align: ${componentButton.shared[\"text-align\"]};\n\t\tbox-shadow: ${componentButton.shared[\"box-shadow\"]};\n\t\ttext-decoration: ${componentButton.shared[\"text-decoration\"]};\n\t\tcursor: ${componentButton.shared.cursor};\n\t\tjustify-content: ${componentButton.shared[\"justify-content\"]};\n\t\talign-items: ${componentButton.shared[\"align-items\"]};\n\t}\n\t.js-stand-icon-button:focus-visible {\n\t\toutline: ${componentButton.shared[\":focus-visible\"].outline};\n\t\toutline-offset: ${componentButton.shared[\":focus-visible\"][\"outline-offset\"]};\n\t}\n\t.js-stand-icon-button:disabled {\n\t\tcursor: ${componentButton.shared[\":disabled\"].cursor};\n\t}\n\n\t/* example setup of button/link button style using md size and emphasised primary variant */\n\t.js-stand-icon-button-emphasised-primary {\n\t\tcolor: ${componentButton[\"emphasised-primary\"].shared.color};\n\t\tbackground: ${componentButton[\"emphasised-primary\"].shared.backgroundColor};\n\t\twidth: ${componentButton[\"emphasised-primary\"].md.iconButton.width};\n\t\theight: ${componentButton[\"emphasised-primary\"].md.height};\n\t\tpadding: 0;\n\t\tfont: ${componentButton[\"emphasised-primary\"].md.typography.font};\n\t\tletter-spacing: ${componentButton[\"emphasised-primary\"].md.typography.letterSpacing};\n\t\tfont-variation-settings: 'wdth'\n\t\t${componentButton[\"emphasised-primary\"].md.typography.fontWidth};\n\t\tborder: ${componentButton[\"emphasised-primary\"].shared.border};\n\t\tborder-radius: ${componentButton[\"emphasised-primary\"].shared.borderRadius};\n\t}\n\t.js-stand-icon-button-emphasised-primary:hover {\n\t\tbackground: ${componentButton[\"emphasised-primary\"].shared[\":hover\"].backgroundColor};\n\t\tborder: ${componentButton[\"emphasised-primary\"].shared[\":hover\"].border}\n\t}\n\t.js-stand-icon-button-emphasised-primary:active {\n\t\tbackground: ${componentButton[\"emphasised-primary\"].shared[\":active\"].backgroundColor};\n\t\tborder: ${componentButton[\"emphasised-primary\"].shared[\":active\"].border};\n\t}\n\t.js-stand-icon-button-emphasised-primary:disabled, .js-stand-icon-button-emphasised-primary[data-disabled] {\n\t\tcolor: ${componentButton[\"emphasised-primary\"].shared[\":disabled\"].color};\n\t\tbackground: ${componentButton[\"emphasised-primary\"].shared[\":disabled\"].backgroundColor};\n\t\tborder: ${componentButton[\"emphasised-primary\"].shared[\":disabled\"].border};\n\t}\n\t.js-stand-icon-button-emphasised-primary > .material-symbols {\n\t\tfont-size: ${componentButton[\"emphasised-primary\"].md.icon.size}\n\t}\n\n\t/* example setup of button/link button style using md size and neutral secondary variant */\n\t.js-stand-icon-button-neutral-secondary {\n\t\tcolor: ${componentButton[\"neutral-secondary\"].shared.color};\n\t\tbackground: ${componentButton[\"neutral-secondary\"].shared.backgroundColor};\n\t\twidth: ${componentButton[\"neutral-secondary\"].md.iconButton.width};\n\t\theight: ${componentButton[\"neutral-secondary\"].md.height};\n\t\tpadding: 0;\n\t\tfont: ${componentButton[\"neutral-secondary\"].md.typography.font};\n\t\tletter-spacing: ${componentButton[\"neutral-secondary\"].md.typography.letterSpacing};\n\t\tfont-variation-settings: 'wdth'\n\t\t${componentButton[\"neutral-secondary\"].md.typography.fontWidth};\n\t\tborder: ${componentButton[\"neutral-secondary\"].shared.border};\n\t\tborder-radius: ${componentButton[\"neutral-secondary\"].shared.borderRadius};\n\t}\n\t.js-stand-icon-button-neutral-secondary:hover {\n\t\tbackground: ${componentButton[\"neutral-secondary\"].shared[\":hover\"].backgroundColor};\n\t\tborder: ${componentButton[\"neutral-secondary\"].shared[\":hover\"].border};\n\t}\n\t.js-stand-icon-button-neutral-secondary:active {\n\t\tbackground: ${componentButton[\"neutral-secondary\"].shared[\":active\"].backgroundColor};\n\t\tborder: ${componentButton[\"neutral-secondary\"].shared[\":active\"].border};\n\t}\n\t.js-stand-icon-button-neutral-secondary:disabled, .js-stand-icon-button-neutral-secondary[data-disabled] {\n\t\tcolor: ${componentButton[\"neutral-secondary\"].shared[\":disabled\"].color};\n\t\tbackground: ${componentButton[\"neutral-secondary\"].shared[\":disabled\"].backgroundColor};\n\t\tborder: ${componentButton[\"neutral-secondary\"].shared[\":disabled\"].border};\n\t}\n\t.js-stand-icon-button-neutral-secondary > .material-symbols {\n\t\tfont-size: ${componentButton[\"neutral-secondary\"].md.icon.size}\n\t}\n\t`);\n\n\t// update the document with the sheet\n\tdocument.adoptedStyleSheets.push(sheet);\n\n\t// modify the dom with the button components using the generated stylesheet\n\tdocument.getElementById(\"app\").innerHTML = `\n\t<div class=\"container\">\n\t\t<a class=\"js-stand-icon-button js-stand-icon-button-emphasised-primary\" href=\"#\" title=\"Summon a raven\"><span class=\"material-symbols\">raven</span></a>\n\t\t<a class=\"js-stand-icon-button js-stand-icon-button-neutral-secondary\" data-disabled title=\"Consult with an owl\"><span class=\"material-symbols\">owl</span></a>\n\t</div>\n\t`;\n\n";
2
+ export declare const componentTsx = "import { IconLinkButton } from \"@guardian/stand/icon-link-button\";\n\nexport const Component = () => (\n\t<>\n\t\t<IconLinkButton\n href=\"#\"\n symbol=\"raven\"\n ariaLabel=\"Summon a raven\"\n />\n <IconLinkButton\n href=\"#\"\n isDisabled\n variant=\"secondary\"\n symbol=\"owl\"\n ariaLabel=\"Consult with an owl\"\n />\n\t</>\n);\n\n";
3
+ export declare const componentCss = "@import '@guardian/stand/component/button.css';\n\n /* shared button styles for all variants */\n\t.stand-icon-button {\n\t\tdisplay: var(--component-button-shared-display);\n\t\t-webkit-appearance: var(--component-button-shared-webkit-appearance);\n\t\ttext-align: var(--component-button-shared-text-align);\n\t\tbox-shadow: var(--component-button-shared-box-shadow);\n\t\ttext-decoration: var(--component-button-shared-text-decoration);\n\t\tcursor: var(--component-button-shared-cursor);\n\t\tjustify-content: var(--component-button-shared-justify-content);\n\t\talign-items: var(--component-button-shared-align-items);\n\t}\n\t.stand-icon-button:focus-visible {\n\t\toutline: var(--component-button-shared-focus-visible-outline);\n\t\toutline-offset: var(--component-button-shared-focus-visible-outline-offset);\n\t}\n\t.stand-icon-button:disabled {\n\t\tcursor: var(--component-button-shared-disabled-cursor);\n\t}\n\n\t/* example setup of button/link button style using md size and emphasised primary variant */\n\t.stand-icon-button-primary {\n\t\tcolor: var(--component-button-primary-shared-color);\n\t\tbackground: var(\n\t\t\t--component-button-primary-shared-background-color\n\t\t);\n\t\twidth: var(--component-button-primary-md-icon-button-width);\n\t\theight: var(--component-button-primary-md-height);\n\t\tpadding: 0;\n\t\tfont: var(--component-button-primary-md-typography-font);\n\t\tletter-spacing: var(\n\t\t\t--component-button-primary-md-typography-letter-spacing\n\t\t);\n\t\tfont-variation-settings: \"wdth\"\n\t\t\tvar(--component-button-primary-md-typography-font-width);\n\t\tborder: var(--component-button-primary-shared-border);\n\t\tborder-radius: var(\n\t\t\t--component-button-primary-shared-border-radius\n\t\t);\n\t}\n\t.stand-icon-button-primary:hover {\n\t\tbackground: var(\n\t\t\t--component-button-primary-shared-hover-background-color\n\t\t);\n\t\tborder: var(--component-button-primary-shared-hover-border);\n\t}\n\t.stand-icon-button-primary:active {\n\t\tbackground: var(\n\t\t\t--component-button-primary-shared-active-background-color\n\t\t);\n\t\tborder: var(--component-button-primary-shared-active-border);\n\t}\n\t.stand-icon-button-primary:disabled {\n\t\tcolor: var(--component-button-primary-shared-disabled-color);\n\t\tbackground: var(\n\t\t\t--component-button-primary-shared-disabled-background-color\n\t\t);\n\t\tborder: var(--component-button-primary-shared-disabled-border);\n\t}\n\t.stand-icon-button-primary > .material-symbols {\n\t\tfont-size: var(--component-button-primary-md-icon-size);\n\t}\n\n\t/* example setup of button/link button style using md size and neutral secondary variant */\n\t.stand-icon-button-tertiary {\n\t\tcolor: var(--component-button-tertiary-shared-color);\n\t\tbackground: var(--component-button-tertiary-shared-background-color);\n\t\twidth: var(--component-button-tertiary-md-icon-button-width);\n\t\theight: var(--component-button-tertiary-md-height);\n\t\tpadding: 0;\n\t\tfont: var(--component-button-tertiary-md-typography-font);\n\t\tletter-spacing: var(\n\t\t\t--component-button-tertiary-md-typography-letter-spacing\n\t\t);\n\t\tfont-variation-settings: \"wdth\"\n\t\t\tvar(--component-button-tertiary-md-typography-font-width);\n\t\tborder: var(--component-button-tertiary-shared-border);\n\t\tborder-radius: var(--component-button-tertiary-shared-border-radius);\n\t}\n\t.stand-icon-button-tertiary:hover {\n\t\tbackground: var(\n\t\t\t--component-button-tertiary-shared-hover-background-color\n\t\t);\n\t\tborder: var(--component-button-tertiary-shared-hover-border);\n\t}\n\t.stand-icon-button-tertiary:active {\n\t\tbackground: var(\n\t\t\t--component-button-tertiary-shared-active-background-color\n\t\t);\n\t\tborder: var(--component-button-tertiary-shared-active-border);\n\t}\n\t.stand-icon-button-tertiary:disabled, .stand-icon-button-tertiary[data-disabled] {\n\t\tcolor: var(--component-button-tertiary-shared-disabled-color);\n\t\tbackground: var(\n\t\t\t--component-button-tertiary-shared-disabled-background-color\n\t\t);\n\t\tborder: var(--component-button-tertiary-shared-disabled-border);\n\t}\n\t.stand-icon-button-tertiary > .material-symbols {\n\t\tfont-size: var(--component-button-tertiary-md-icon-size);\n\t}\n\n";
4
+ export declare const componentHtml = "<div class=\"container\">\n <a class=\"stand-icon-button stand-icon-button-primary\" href=\"#\" title=\"Summon a raven\" aria-label=\"Summon a raven\"><span class=\"material-symbols\" aria-hidden=\"true\">raven</span></a>\n <a class=\"stand-icon-button stand-icon-button-tertiary\" data-disabled title=\"Consult with an owl\" aria-label=\"Consult with an owl\"><span class=\"material-symbols\" aria-hidden=\"true\">owl</span></a>\n</div>\n";
5
+ export declare const componentJs = "\t// for ts/js\n\timport { componentButton } from \"@guardian/stand\";\n\n\t// example of creating a stylesheet in js\n\tconst sheet = new CSSStyleSheet();\n\n\t// apply the rules to the sheet\n\tsheet.replaceSync(`\n\t/* shared button styles for all variants */\n\t.js-stand-icon-button {\n\t\tdisplay: ${componentButton.shared.display};\n\t\t-webkit-appearance: ${componentButton.shared[\"-webkit-appearance\"]};\n\t\ttext-align: ${componentButton.shared[\"text-align\"]};\n\t\tbox-shadow: ${componentButton.shared[\"box-shadow\"]};\n\t\ttext-decoration: ${componentButton.shared[\"text-decoration\"]};\n\t\tcursor: ${componentButton.shared.cursor};\n\t\tjustify-content: ${componentButton.shared[\"justify-content\"]};\n\t\talign-items: ${componentButton.shared[\"align-items\"]};\n\t}\n\t.js-stand-icon-button:focus-visible {\n\t\toutline: ${componentButton.shared[\":focus-visible\"].outline};\n\t\toutline-offset: ${componentButton.shared[\":focus-visible\"][\"outline-offset\"]};\n\t}\n\t.js-stand-icon-button:disabled {\n\t\tcursor: ${componentButton.shared[\":disabled\"].cursor};\n\t}\n\n\t/* example setup of button/link button style using md size and emphasised primary variant */\n\t.js-stand-icon-button-primary {\n\t\tcolor: ${componentButton[\"primary\"].shared.color};\n\t\tbackground: ${componentButton[\"primary\"].shared.backgroundColor};\n\t\twidth: ${componentButton[\"primary\"].md.iconButton.width};\n\t\theight: ${componentButton[\"primary\"].md.height};\n\t\tpadding: 0;\n\t\tfont: ${componentButton[\"primary\"].md.typography.font};\n\t\tletter-spacing: ${componentButton[\"primary\"].md.typography.letterSpacing};\n\t\tfont-variation-settings: 'wdth'\n\t\t${componentButton[\"primary\"].md.typography.fontWidth};\n\t\tborder: ${componentButton[\"primary\"].shared.border};\n\t\tborder-radius: ${componentButton[\"primary\"].shared.borderRadius};\n\t}\n\t.js-stand-icon-button-primary:hover {\n\t\tbackground: ${componentButton[\"primary\"].shared[\":hover\"].backgroundColor};\n\t\tborder: ${componentButton[\"primary\"].shared[\":hover\"].border}\n\t}\n\t.js-stand-icon-button-primary:active {\n\t\tbackground: ${componentButton[\"primary\"].shared[\":active\"].backgroundColor};\n\t\tborder: ${componentButton[\"primary\"].shared[\":active\"].border};\n\t}\n\t.js-stand-icon-button-primary:disabled, .js-stand-icon-button-primary[data-disabled] {\n\t\tcolor: ${componentButton[\"primary\"].shared[\":disabled\"].color};\n\t\tbackground: ${componentButton[\"primary\"].shared[\":disabled\"].backgroundColor};\n\t\tborder: ${componentButton[\"primary\"].shared[\":disabled\"].border};\n\t}\n\t.js-stand-icon-button-primary > .material-symbols {\n\t\tfont-size: ${componentButton[\"primary\"].md.icon.size}\n\t}\n\n\t/* example setup of button/link button style using md size and neutral secondary variant */\n\t.js-stand-icon-button-tertiary {\n\t\tcolor: ${componentButton[\"tertiary\"].shared.color};\n\t\tbackground: ${componentButton[\"tertiary\"].shared.backgroundColor};\n\t\twidth: ${componentButton[\"tertiary\"].md.iconButton.width};\n\t\theight: ${componentButton[\"tertiary\"].md.height};\n\t\tpadding: 0;\n\t\tfont: ${componentButton[\"tertiary\"].md.typography.font};\n\t\tletter-spacing: ${componentButton[\"tertiary\"].md.typography.letterSpacing};\n\t\tfont-variation-settings: 'wdth'\n\t\t${componentButton[\"tertiary\"].md.typography.fontWidth};\n\t\tborder: ${componentButton[\"tertiary\"].shared.border};\n\t\tborder-radius: ${componentButton[\"tertiary\"].shared.borderRadius};\n\t}\n\t.js-stand-icon-button-tertiary:hover {\n\t\tbackground: ${componentButton[\"tertiary\"].shared[\":hover\"].backgroundColor};\n\t\tborder: ${componentButton[\"tertiary\"].shared[\":hover\"].border};\n\t}\n\t.js-stand-icon-button-tertiary:active {\n\t\tbackground: ${componentButton[\"tertiary\"].shared[\":active\"].backgroundColor};\n\t\tborder: ${componentButton[\"tertiary\"].shared[\":active\"].border};\n\t}\n\t.js-stand-icon-button-tertiary:disabled, .js-stand-icon-button-tertiary[data-disabled] {\n\t\tcolor: ${componentButton[\"tertiary\"].shared[\":disabled\"].color};\n\t\tbackground: ${componentButton[\"tertiary\"].shared[\":disabled\"].backgroundColor};\n\t\tborder: ${componentButton[\"tertiary\"].shared[\":disabled\"].border};\n\t}\n\t.js-stand-icon-button-tertiary > .material-symbols {\n\t\tfont-size: ${componentButton[\"tertiary\"].md.icon.size}\n\t}\n\t`);\n\n\t// update the document with the sheet\n\tdocument.adoptedStyleSheets.push(sheet);\n\n\t// modify the dom with the button components using the generated stylesheet\n\tdocument.getElementById(\"app\").innerHTML = `\n\t<div class=\"container\">\n\t\t<a class=\"js-stand-icon-button js-stand-icon-button-primary\" href=\"#\" title=\"Summon a raven\"><span class=\"material-symbols\">raven</span></a>\n\t\t<a class=\"js-stand-icon-button js-stand-icon-button-tertiary\" data-disabled title=\"Consult with an owl\"><span class=\"material-symbols\">owl</span></a>\n\t</div>\n\t`;\n\n";