@guardian/stand 0.0.16 → 0.0.18

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 (141) 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/avatarButton.cjs +7 -0
  5. package/dist/avatarButton.js +1 -0
  6. package/dist/avatarLink.cjs +7 -0
  7. package/dist/avatarLink.js +1 -0
  8. package/dist/components/avatar/styles.cjs +24 -0
  9. package/dist/components/avatar/styles.js +24 -0
  10. package/dist/components/avatar-button/AvatarButton.cjs +14 -0
  11. package/dist/components/avatar-button/AvatarButton.js +12 -0
  12. package/dist/components/avatar-button/styles.cjs +29 -0
  13. package/dist/components/avatar-button/styles.js +26 -0
  14. package/dist/components/avatar-link/AvatarLink.cjs +14 -0
  15. package/dist/components/avatar-link/AvatarLink.js +12 -0
  16. package/dist/components/avatar-link/styles.cjs +24 -0
  17. package/dist/components/avatar-link/styles.js +21 -0
  18. package/dist/components/button/Button.cjs +1 -1
  19. package/dist/components/button/Button.js +1 -1
  20. package/dist/components/icon-button/IconButton.cjs +1 -1
  21. package/dist/components/icon-button/IconButton.js +1 -1
  22. package/dist/components/icon-link-button/IconLinkButton.cjs +1 -1
  23. package/dist/components/icon-link-button/IconLinkButton.js +1 -1
  24. package/dist/components/inline-message/InlineMessage.cjs +56 -0
  25. package/dist/components/inline-message/InlineMessage.js +27 -0
  26. package/dist/components/inline-message/styles.cjs +17 -0
  27. package/dist/components/inline-message/styles.js +14 -0
  28. package/dist/components/link-button/LinkButton.cjs +1 -1
  29. package/dist/components/link-button/LinkButton.js +1 -1
  30. package/dist/components/menu/styles.cjs +1 -0
  31. package/dist/components/menu/styles.js +1 -0
  32. package/dist/components/topbar/TopBar.cjs +101 -0
  33. package/dist/components/topbar/TopBar.js +63 -0
  34. package/dist/components/topbar/styles.cjs +30 -0
  35. package/dist/components/topbar/styles.js +25 -0
  36. package/dist/components/topbar/topBarItem/TopBarItem.cjs +28 -0
  37. package/dist/components/topbar/topBarItem/TopBarItem.js +10 -0
  38. package/dist/components/topbar/topBarItem/styles.cjs +20 -0
  39. package/dist/components/topbar/topBarItem/styles.js +17 -0
  40. package/dist/components/topbar/topBarNavigation/TopBarNavigation.cjs +70 -0
  41. package/dist/components/topbar/topBarNavigation/TopBarNavigation.js +23 -0
  42. package/dist/components/topbar/topBarNavigation/styles.cjs +68 -0
  43. package/dist/components/topbar/topBarNavigation/styles.js +61 -0
  44. package/dist/components/topbar/{toolName → topBarToolName}/TopBarToolName.cjs +3 -2
  45. package/dist/components/topbar/topBarToolName/TopBarToolName.js +13 -0
  46. package/dist/index.cjs +2 -0
  47. package/dist/index.js +1 -0
  48. package/dist/inline-message.cjs +9 -0
  49. package/dist/inline-message.js +2 -0
  50. package/dist/styleD/build/css/base/typography.css +3 -3
  51. package/dist/styleD/build/css/component/TopBar.css +55 -1
  52. package/dist/styleD/build/css/component/avatar.css +32 -1
  53. package/dist/styleD/build/css/component/button.css +177 -255
  54. package/dist/styleD/build/css/component/favicon.css +1 -1
  55. package/dist/styleD/build/css/component/inlineMessage.css +17 -0
  56. package/dist/styleD/build/css/component/menu.css +5 -4
  57. package/dist/styleD/build/css/component/tagAutocomplete.css +1 -1
  58. package/dist/styleD/build/css/component/tagTable.css +1 -1
  59. package/dist/styleD/build/css/component/topBarItem.css +7 -0
  60. package/dist/styleD/build/css/component/userMenu.css +6 -6
  61. package/dist/styleD/build/css/semantic/colors.css +45 -46
  62. package/dist/styleD/build/css/semantic/sizing.css +1 -0
  63. package/dist/styleD/build/css/semantic/typography.css +68 -30
  64. package/dist/styleD/build/typescript/base/typography.cjs +3 -3
  65. package/dist/styleD/build/typescript/base/typography.js +3 -3
  66. package/dist/styleD/build/typescript/component/TopBar.cjs +94 -0
  67. package/dist/styleD/build/typescript/component/TopBar.js +94 -0
  68. package/dist/styleD/build/typescript/component/avatar.cjs +95 -12
  69. package/dist/styleD/build/typescript/component/avatar.js +95 -12
  70. package/dist/styleD/build/typescript/component/button.cjs +5 -130
  71. package/dist/styleD/build/typescript/component/button.js +5 -130
  72. package/dist/styleD/build/typescript/component/inlineMessage.cjs +28 -0
  73. package/dist/styleD/build/typescript/component/inlineMessage.js +26 -0
  74. package/dist/styleD/build/typescript/component/menu.cjs +2 -1
  75. package/dist/styleD/build/typescript/component/menu.js +2 -1
  76. package/dist/styleD/build/typescript/semantic/colors.cjs +47 -52
  77. package/dist/styleD/build/typescript/semantic/colors.js +47 -52
  78. package/dist/styleD/build/typescript/semantic/sizing.cjs +1 -0
  79. package/dist/styleD/build/typescript/semantic/sizing.js +1 -0
  80. package/dist/styleD/build/typescript/semantic/typography.cjs +50 -0
  81. package/dist/styleD/build/typescript/semantic/typography.js +50 -0
  82. package/dist/types/TopBar.d.ts +12 -3
  83. package/dist/types/avatar-button.d.ts +18 -0
  84. package/dist/types/avatar-link.d.ts +18 -0
  85. package/dist/types/components/avatar-button/AvatarButton.d.ts +2 -0
  86. package/dist/types/components/avatar-button/sandbox.d.ts +5 -0
  87. package/dist/types/components/avatar-button/styles.d.ts +6 -0
  88. package/dist/types/components/avatar-button/types.d.ts +3 -0
  89. package/dist/types/components/avatar-link/AvatarLink.d.ts +2 -0
  90. package/dist/types/components/avatar-link/sandbox.d.ts +5 -0
  91. package/dist/types/components/avatar-link/styles.d.ts +6 -0
  92. package/dist/types/components/avatar-link/types.d.ts +3 -0
  93. package/dist/types/components/button/sandbox.d.ts +4 -4
  94. package/dist/types/components/button/types.d.ts +1 -1
  95. package/dist/types/components/icon-button/sandbox.d.ts +4 -4
  96. package/dist/types/components/icon-button/styles.d.ts +3 -128
  97. package/dist/types/components/icon-button/types.d.ts +1 -1
  98. package/dist/types/components/icon-link-button/sandbox.d.ts +4 -4
  99. package/dist/types/components/icon-link-button/styles.d.ts +3 -128
  100. package/dist/types/components/icon-link-button/types.d.ts +1 -1
  101. package/dist/types/components/inline-message/InlineMessage.d.ts +2 -0
  102. package/dist/types/components/inline-message/sandbox.d.ts +5 -0
  103. package/dist/types/components/inline-message/styles.d.ts +8 -0
  104. package/dist/types/components/inline-message/types.d.ts +21 -0
  105. package/dist/types/components/link-button/sandbox.d.ts +4 -4
  106. package/dist/types/components/link-button/styles.d.ts +3 -128
  107. package/dist/types/components/link-button/types.d.ts +1 -1
  108. package/dist/types/components/topbar/TopBar.d.ts +8 -0
  109. package/dist/types/components/topbar/sandbox.d.ts +5 -0
  110. package/dist/types/components/topbar/styles.d.ts +9 -0
  111. package/dist/types/components/topbar/topBarItem/TopBarItem.d.ts +2 -0
  112. package/dist/types/components/topbar/topBarItem/sandbox.d.ts +5 -0
  113. package/dist/types/components/topbar/topBarItem/styles.d.ts +8 -0
  114. package/dist/types/components/topbar/topBarItem/types.d.ts +14 -0
  115. package/dist/types/components/topbar/topBarNavigation/TopBarNavigation.d.ts +2 -0
  116. package/dist/types/components/topbar/topBarNavigation/sandbox.d.ts +5 -0
  117. package/dist/types/components/topbar/topBarNavigation/styles.d.ts +12 -0
  118. package/dist/types/components/topbar/topBarNavigation/types.d.ts +44 -0
  119. package/dist/types/components/topbar/types.d.ts +3 -0
  120. package/dist/types/index.d.ts +2 -0
  121. package/dist/types/inline-message.d.ts +19 -0
  122. package/dist/types/styleD/build/typescript/base/typography.d.ts +3 -3
  123. package/dist/types/styleD/build/typescript/component/TopBar.d.ts +94 -0
  124. package/dist/types/styleD/build/typescript/component/avatar.d.ts +83 -0
  125. package/dist/types/styleD/build/typescript/component/button.d.ts +3 -128
  126. package/dist/types/styleD/build/typescript/component/inlineMessage.d.ts +28 -0
  127. package/dist/types/styleD/build/typescript/component/menu.d.ts +1 -0
  128. package/dist/types/styleD/build/typescript/semantic/colors.d.ts +44 -49
  129. package/dist/types/styleD/build/typescript/semantic/sizing.d.ts +1 -0
  130. package/dist/types/styleD/build/typescript/semantic/typography.d.ts +50 -0
  131. package/dist/util/css/reset.css +10 -0
  132. package/dist/util/reset.css.cjs +1 -1
  133. package/dist/util/reset.css.js +1 -1
  134. package/package.json +35 -18
  135. package/dist/components/topbar/toolName/TopBarToolName.js +0 -12
  136. /package/dist/components/topbar/{toolName → topBarToolName}/styles.cjs +0 -0
  137. /package/dist/components/topbar/{toolName → topBarToolName}/styles.js +0 -0
  138. /package/dist/types/components/topbar/{toolName → topBarToolName}/TopBarToolName.d.ts +0 -0
  139. /package/dist/types/components/topbar/{toolName → topBarToolName}/sandbox.d.ts +0 -0
  140. /package/dist/types/components/topbar/{toolName → topBarToolName}/styles.d.ts +0 -0
  141. /package/dist/types/components/topbar/{toolName → topBarToolName}/types.d.ts +0 -0
@@ -20,7 +20,7 @@ export declare const linkButtonStyles: (theme: {
20
20
  'outline-offset': string;
21
21
  };
22
22
  };
23
- 'emphasised-primary': {
23
+ primary: {
24
24
  shared: {
25
25
  color: string;
26
26
  backgroundColor: string;
@@ -145,7 +145,7 @@ export declare const linkButtonStyles: (theme: {
145
145
  };
146
146
  };
147
147
  };
148
- 'emphasised-secondary': {
148
+ secondary: {
149
149
  shared: {
150
150
  color: string;
151
151
  backgroundColor: string;
@@ -270,132 +270,7 @@ export declare const linkButtonStyles: (theme: {
270
270
  };
271
271
  };
272
272
  };
273
- 'neutral-primary': {
274
- shared: {
275
- color: string;
276
- backgroundColor: string;
277
- borderRadius: string;
278
- border: string;
279
- ':hover': {
280
- backgroundColor: string;
281
- border: string;
282
- };
283
- ':active': {
284
- backgroundColor: string;
285
- border: string;
286
- };
287
- ':disabled': {
288
- color: string;
289
- backgroundColor: string;
290
- border: string;
291
- };
292
- };
293
- xs: {
294
- height: string;
295
- padding: {
296
- top: string;
297
- right: string;
298
- bottom: string;
299
- left: string;
300
- withIcon: {
301
- iconLeft: {
302
- left: string;
303
- };
304
- };
305
- };
306
- typography: {
307
- font: string;
308
- letterSpacing: string;
309
- fontWidth: number;
310
- };
311
- icon: {
312
- size: string;
313
- gap: string;
314
- };
315
- iconButton: {
316
- width: string;
317
- };
318
- };
319
- sm: {
320
- height: string;
321
- padding: {
322
- top: string;
323
- right: string;
324
- bottom: string;
325
- left: string;
326
- withIcon: {
327
- iconLeft: {
328
- left: string;
329
- };
330
- };
331
- };
332
- typography: {
333
- font: string;
334
- letterSpacing: string;
335
- fontWidth: number;
336
- };
337
- icon: {
338
- size: string;
339
- gap: string;
340
- };
341
- iconButton: {
342
- width: string;
343
- };
344
- };
345
- md: {
346
- height: string;
347
- padding: {
348
- top: string;
349
- right: string;
350
- bottom: string;
351
- left: string;
352
- withIcon: {
353
- iconLeft: {
354
- left: string;
355
- };
356
- };
357
- };
358
- typography: {
359
- font: string;
360
- letterSpacing: string;
361
- fontWidth: number;
362
- };
363
- icon: {
364
- size: string;
365
- gap: string;
366
- };
367
- iconButton: {
368
- width: string;
369
- };
370
- };
371
- lg: {
372
- height: string;
373
- padding: {
374
- top: string;
375
- right: string;
376
- bottom: string;
377
- left: string;
378
- withIcon: {
379
- iconLeft: {
380
- left: string;
381
- };
382
- };
383
- };
384
- typography: {
385
- font: string;
386
- letterSpacing: string;
387
- fontWidth: number;
388
- };
389
- icon: {
390
- size: string;
391
- gap: string;
392
- };
393
- iconButton: {
394
- width: string;
395
- };
396
- };
397
- };
398
- 'neutral-secondary': {
273
+ tertiary: {
399
274
  shared: {
400
275
  color: string;
401
276
  backgroundColor: string;
@@ -6,7 +6,7 @@ export interface LinkButtonProps extends DefaultProps<LinkButtonTheme, RACLinkPr
6
6
  /**
7
7
  * Size variant of the link button
8
8
  */
9
- size?: keyof Omit<LinkButtonTheme['emphasised-primary'], 'shared'>;
9
+ size?: keyof Omit<LinkButtonTheme['primary'], 'shared'>;
10
10
  /**
11
11
  * Variant of the button
12
12
  */
@@ -0,0 +1,8 @@
1
+ import type { TopBarProps } from './types';
2
+ export declare function TopBarContainerRight({ children, }: {
3
+ children: TopBarProps['children'];
4
+ }): import("@emotion/react/jsx-runtime").JSX.Element;
5
+ export declare function TopBarContainerLeft({ children, }: {
6
+ children: TopBarProps['children'];
7
+ }): import("@emotion/react/jsx-runtime").JSX.Element;
8
+ export declare function TopBar({ children, theme, cssOverrides, className, ...props }: TopBarProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare const componentName = "TopBar";
2
+ export declare const componentTsx = "import { TopBar, TopBarToolName } from '@guardian/stand/TopBar';\n\nexport const Component = () => (\n\t<TopBar><TopBarToolName name=\"Composer\" favicon={{ letter: \"C\" }} /></TopBar>\n);\n";
3
+ export declare const componentCss = "\n/* import the styles */\n@import '@guardian/stand/component/TopBar.css';\n@import '@guardian/stand/component/favicon.css';\n\n.stand-top-bar {\n\tdisplay: var(--component-top-bar-display);\n\tjustify-content: var(--component-top-bar-justify-content);\n\theight: var(--component-top-bar-height);\n\tborder: var(--component-top-bar-border);\n}\n\n.stand-top-bar-lhs {\n\tdisplay: var(--component-top-bar-display);\n}\n\n.stand-top-bar-tool-name {\n\tdisplay: var(--component-top-bar-tool-name-display);\n\talign-items: var(--component-top-bar-tool-name-align-items);\n\tgap: var(--component-top-bar-tool-name-gap);\n\tfont: var(--component-top-bar-tool-name-typography-font);\n\tletter-spacing: var(--component-top-bar-tool-name-typography-letter-spacing);\n\tfont-variation-settings: \"wdth\" var(--component-top-bar-tool-name-typography-font-width);\n}\n\n.stand-favicon {\n\t\tbackground-color: var(--component-favicon-color-background);\n\t\tdisplay: var(--component-favicon-display);\n\t\talign-items: var(--component-favicon-align-items);\n\t\tjustify-content: var(--component-favicon-justify-content);\n\t\twidth: var(--component-favicon-size);\n\t\theight: var(--component-favicon-size);\n\t\tuser-select: var(--component-favicon-user-select);\n\t\tcolor: var(--component-favicon-color-text);\n\t\tfont: var(--component-favicon-typography-font);\n\t\tletter-spacing: var(--component-favicon-typography-letter-spacing);\n\t\tfont-variation-settings: \"wdth\" var(--component-favicon-typography-font-width);\n}\n\n.stand-top-bar-item {\n\tdisplay: var(--component-top-bar-item-display);\n\talign-items: var(--component-top-bar-item-align-items);\n\theight: var(--component-top-bar-item-height);\n\tpadding: var(--component-top-bar-item-sm-padding-top) var(--component-top-bar-item-sm-padding-right) var(--component-top-bar-item-sm-padding-bottom) var(--component-top-bar-item-sm-padding-left);\n\tborder-right: var(--component-top-bar-item-border);\n}\n\n";
4
+ export declare const componentHtml = "\n\t<div class=\"stand-top-bar\">\n\t\t<div class=\"stand-top-bar-lhs\">\n\t\t\t<div class=\"stand-top-bar-tool-name stand-top-bar-item\">\n\t\t\t\t<div class=\"stand-favicon\">C</div>\n\t\t\t\t<div>Composer</div>\n\t\t\t</div>\n\t\t\t<div class=\"stand-top-bar-item\">Item 1</div>\n\t\t</div>\n\t</div>\n";
5
+ export declare const componentJs = "\nimport { componentTopBar } from \"@guardian/stand\";\nimport { componentFavicon } from \"@guardian/stand\";\nconst style = `\n\tdisplay: ${componentTopBar.display};\n\tjustify-content: ${componentTopBar['justify-content']};\n\theight: ${componentTopBar.height};\n\tborder: ${componentTopBar.border};\n`;\n\nconst lhsStyle = `\n\tdisplay: ${componentTopBar.display};\n`;\n\nconst toolNameStyle = `display: ${componentTopBar.ToolName.display};\n\talign-items: ${componentTopBar.ToolName['align-items']};\n\tgap: ${componentTopBar.ToolName.gap};\n\tfont: ${componentTopBar.ToolName.typography.font};\n\tletter-spacing: ${componentTopBar.ToolName.typography.letterSpacing};\n\tfont-variation-settings: \"wdth\" ${componentTopBar.ToolName.typography.fontWidth};\n`;\n\nconst faviconStyle = `\n\tbackground-color: ${componentFavicon.color.background};\n\tdisplay: ${componentFavicon.display};\n\talign-items: ${componentFavicon['align-items']};\n\tjustify-content: ${componentFavicon['justify-content']};\n\twidth: ${componentFavicon.size};\n\theight: ${componentFavicon.size};\n\tuser-select: ${componentFavicon.userSelect};\n\tcolor: ${componentFavicon.color.text};\n\tfont: ${componentFavicon.typography.font};\n\tletter-spacing: ${componentFavicon.typography.letterSpacing};\n\tfont-variation-settings: \"wdth\" ${componentFavicon.typography['font-width']};\n`;\n\nconst topBarItemStyle = `display: ${componentTopBar.Item.display};\n\talign-items: ${componentTopBar.Item['align-items']};\n\theight: ${componentTopBar.Item.height};\n\tpadding: ${componentTopBar.Item.sm.padding.top} ${componentTopBar.Item.sm.padding.right} ${componentTopBar.Item.sm.padding.bottom} ${componentTopBar.Item.sm.padding.left};\n\tborder-right: ${componentTopBar.Item.border};\n`;\n\ndocument.getElementById(\"app\").innerHTML = `\n\t<div style=\"${style}\">\n\t\t<div style=\"${lhsStyle}\">\n\t\t\t<div style=\"${topBarItemStyle}\">\n\t\t\t\t<div style=\"${toolNameStyle}\">\n\t\t\t\t\t<div style=\"${faviconStyle}\">C</div>\n\t\t\t\t\t<div>Composer</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div style=\"${topBarItemStyle}\">Item 1</div>\n\t\t</div>\n\t</div>\n`;\n";
@@ -0,0 +1,9 @@
1
+ import type { SerializedStyles } from '@emotion/react';
2
+ import type { ComponentTopBar } from '../../styleD/build/typescript/component/TopBar';
3
+ import type { DeepPartial, Prettify } from '../../util/types';
4
+ export type TopBarTheme = Prettify<ComponentTopBar>;
5
+ export type PartialTopBarTheme = DeepPartial<TopBarTheme>;
6
+ export declare const defaultTopBarTheme: TopBarTheme;
7
+ export declare const topBarStyles: (theme: TopBarTheme) => SerializedStyles;
8
+ export declare const topBarContainerLeftStyles: (theme: TopBarTheme) => SerializedStyles;
9
+ export declare const topBarContainerRightStyles: (theme: TopBarTheme) => SerializedStyles;
@@ -0,0 +1,2 @@
1
+ import type { TopBarItemProps } from './types';
2
+ export declare function TopBarItem({ children, alignment, theme, cssOverrides, className, size, ...props }: TopBarItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare const componentName = "TopBarItem";
2
+ export declare const componentTsx = "import { TopBarItem } from '@guardian/stand/TopBar';\n\nexport const Component = () => (\n\t<TopBarItem>Hello</TopBarItem>\n);\n";
3
+ export declare const componentCss = "\n/* import the topbaritem styles */\n@import '@guardian/stand/component/TopBar.css';\n\n.stand-top-bar-item {\n\tdisplay: var(--component-top-bar-item-display);\n\talign-items: var(--component-top-bar-item-align-items);\n\theight: var(--component-top-bar-item-height);\n\tpadding: var(--component-top-bar-item-sm-padding-top) var(--component-top-bar-item-sm-padding-right) var(--component-top-bar-item-sm-padding-bottom) var(--component-top-bar-item-sm-padding-left);\n\tborder-right: var(--component-top-bar-item-border);\n}\n";
4
+ export declare const componentHtml = "<div class=\"container\">\n\t<div class=\"stand-top-bar-item\">Hello</div>\n</div>\n";
5
+ export declare const componentJs = "\nimport { componentTopBar } from \"@guardian/stand\";\n\nconst style = `\n\tdisplay: ${componentTopBar.Item.display};\n\talign-items: ${componentTopBar.Item['align-items']};\n\theight: ${componentTopBar.Item.height};\n\tpadding: ${componentTopBar.Item.sm.padding.top} ${componentTopBar.Item.sm.padding.right} ${componentTopBar.Item.sm.padding.bottom} ${componentTopBar.Item.sm.padding.left};\n\tborder-right: ${componentTopBar.Item.border};\n`;\n\ndocument.getElementById(\"app\").innerHTML = `\n\t<div class=\"container\">\n\t\t<div style=\"${style}\">Hello</div>\n\t</div>\n`;\n";
@@ -0,0 +1,8 @@
1
+ import type { SerializedStyles } from '@emotion/react';
2
+ import type { ComponentTopBar } from '../../../styleD/build/typescript/component/TopBar';
3
+ import type { DeepPartial, Prettify } from '../../../util/types';
4
+ import type { TopBarItemProps } from './types';
5
+ export type TopBarItemTheme = Prettify<ComponentTopBar['Item']>;
6
+ export type PartialTopBarItemTheme = DeepPartial<TopBarItemTheme>;
7
+ export declare const defaultTopBarItemTheme: TopBarItemTheme;
8
+ export declare const topBarItemStyles: (theme: TopBarItemTheme, alignment: 'left' | 'right', { size }: Required<Pick<TopBarItemProps, 'size'>>) => SerializedStyles;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import type { DefaultProps } from '../../../util/types';
3
+ import type { TopBarItemTheme } from './styles';
4
+ export interface TopBarItemProps extends DefaultProps<TopBarItemTheme> {
5
+ children?: React.ReactNode;
6
+ /**
7
+ * Determines the alignment of the item within the top bar
8
+ */
9
+ alignment?: 'left' | 'right';
10
+ /**
11
+ * Determines how much width the item takes up in the top bar, defaults to `'md'`
12
+ */
13
+ size?: 'sm' | 'md' | 'lg';
14
+ }
@@ -0,0 +1,2 @@
1
+ import type { TopBarNavigationProps } from './types';
2
+ export declare function TopBarNavigation({ text, size, isSelected, icon, menuChildren, href, onPress, isDisabled, alignment, theme, cssOverrides, className, ...props }: TopBarNavigationProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare const componentName = "TopBarNavigation";
2
+ export declare const componentTsx = "import { TopBarNavigation } from '@guardian/stand/TopBar';\n\nexport const Component = () => (\n\t<TopBarNavigation text=\"Recipe\" icon=\"yakitori\" />\n);\n";
3
+ export declare const componentCss = "\n/* import the topbarnavigation styles */\n@import '@guardian/stand/component/TopBar.css';\n\n.stand-top-bar-navigation {\n\tdisplay: var(--component-top-bar-navigation-shared-display);\n\talign-items: var(--component-top-bar-navigation-shared-align-items);\n\tcolor: var(--component-top-bar-navigation-unselected-color);\n\theight: var(--component-top-bar-navigation-shared-height);\n\tpadding-top: var(--component-top-bar-navigation-shared-padding-top);\n\tpadding-right: var(--component-top-bar-navigation-shared-padding-right);\n\tpadding-bottom: var(--component-top-bar-navigation-shared-padding-bottom);\n\tpadding-left: var(--component-top-bar-navigation-shared-padding-left);\n\ttext-decoration: var(--component-top-bar-navigation-shared-text-decoration);\n\n\tborder-top: var(--component-top-bar-navigation-shared-border-top);\n\tborder-bottom: var(--component-top-bar-navigation-unselected-border-bottom);\n\n\t&[data-hovered],\n\t&:hover {\n\t\tborder-bottom: var(--component-top-bar-navigation-selected-border-bottom);\n\t\tcursor: var(--component-top-bar-navigation-shared-cursor);\n\t}\n\n\t&[data-focus-visible],\n\t&:focus-visible {\n\t\toutline: var(--component-top-bar-navigation-shared-focus-visible-outline);\n\t\tborder-bottom: var(--component-top-bar-navigation-selected-border-bottom);\n\t\toutline-offset: var(--component-top-bar-navigation-shared-focus-visible-outline-offset);\n\t}\n\n\t&[data-disabled] {\n\t\tcursor: var(--component-top-bar-navigation-shared-disabled-cursor);\n\t\tcolor: var(--component-top-bar-navigation-shared-disabled-color);\n\t}\n\n\tfont: var(--component-top-bar-navigation-md-typography-font);\n\tletter-spacing: var(--component-top-bar-navigation-md-typography-letter-spacing);\n\tfont-variation-settings: 'wdth'\n\t\tvar(--component-top-bar-navigation-md-typography-font-width);\n}\n\n.stand-navigation-text {\n\tmargin-left: var(--component-top-bar-navigation-text-margin-left);\n}\n\n.stand-expand-more {\n\tmargin-top: var(--component-top-bar-navigation-expand-more-padding-top);\n\tmargin-left: var(--component-top-bar-navigation-expand-more-padding-left);\n}\n";
4
+ export declare const componentHtml = "<div class=\"container\">\n\t<span class=\"stand-top-bar-navigation\">\n\t\t<span class=\"material-symbols \" >file_upload</span>\n\t\t<span class=\"stand-navigation-text\">Navigation</span>\n\t\t<div class=\"stand-expand-more\">\n\t\t\t<span class=\"material-symbols\" >keyboard_arrow_down</span>\n\t\t</div>\n\t</span>\n</div>\n";
5
+ export declare const componentJs = "\nimport { componentTopBar } from \"@guardian/stand\";\n\nconst style = `\n\tdisplay: ${componentTopBar.Navigation.shared.display};\n\talign-items: ${componentTopBar.Navigation.shared['align-items']};\n\tcolor: ${componentTopBar.Navigation.unselected.color};\n\theight: ${componentTopBar.Navigation.shared.height};\n\tpadding-top: ${componentTopBar.Navigation.shared.padding.top};\n\tpadding-right: ${componentTopBar.Navigation.shared.padding.right};\n\tpadding-bottom: ${componentTopBar.Navigation.shared.padding.bottom};\n\tpadding-left: ${componentTopBar.Navigation.shared.padding.left};\n\ttext-decoration: ${componentTopBar.Navigation.shared['text-decoration']};\n\n\tfont: ${componentTopBar.Navigation.md.typography.font};\n\tletter-spacing: ${componentTopBar.Navigation.md.typography.letterSpacing};\n\tfont-variation-settings: 'wdth'\n\t\t${componentTopBar.Navigation.md.typography.fontWidth};\n\n\t&:hover {\n\t\tborder-bottom: ${componentTopBar.Navigation.selected['border-bottom']};\n\t\tcursor: ${componentTopBar.Navigation.shared.cursor};\n\t}\n\n\t&:focus-visible {\n\t\toutline: ${componentTopBar.Navigation.shared[':focus-visible'].outline};\n\t\tborder-bottom: ${componentTopBar.Navigation.selected['border-bottom']};\n\t\toutline-offset: ${componentTopBar.Navigation.shared[':focus-visible']['outline-offset']};\n\t}\n\n\t&[data-disabled] {\n\t\tcursor: ${componentTopBar.Navigation.shared[':disabled'].cursor};\n\t\tcolor: ${componentTopBar.Navigation.shared[':disabled'].color};\n\t}\n`;\n\nconst textStyle = `margin-left: ${componentTopBar.Navigation.text.margin.left};\n`;\n\nconst expandMoreStyle = `\n\tmargin-top: ${componentTopBar.Navigation.menuIndicator.margin.top};\n\tmargin-left: ${componentTopBar.Navigation.menuIndicator.margin.left};\n`;\n\ndocument.getElementById(\"app\").innerHTML = `\n\t<span style=\"${style}\">\n\t\t<span class=\"material-symbols\">file_upload</span>\n\t\t<span style=\"${textStyle}\">Navigation</span>\n\t\t<div style=\"${expandMoreStyle}\">\n\t\t\t<span class=\"material-symbols\">keyboard_arrow_down</span>\n\t\t</div>\n\t</span>\n`;\n";
@@ -0,0 +1,12 @@
1
+ import type { SerializedStyles } from '@emotion/react';
2
+ import type { ComponentTopBar } from '../../../styleD/build/typescript/component/TopBar';
3
+ import type { DeepPartial, Prettify } from '../../../util/types';
4
+ import type { TopBarNavigationProps } from './types';
5
+ export type TopBarNavigationTheme = Prettify<ComponentTopBar['Navigation']>;
6
+ export type PartialTopBarNavigationTheme = DeepPartial<TopBarNavigationTheme>;
7
+ export declare const defaultTopBarNavigationTheme: TopBarNavigationTheme;
8
+ export declare const topBarNavigationStyles: (theme: TopBarNavigationTheme, selected: boolean) => SerializedStyles;
9
+ export declare const topBarNavigationDividerStyles: (theme: TopBarNavigationTheme, { alignment }: Required<Pick<TopBarNavigationProps, 'alignment'>>) => SerializedStyles;
10
+ export declare const topBarNavigationTextStyles: (theme: TopBarNavigationTheme) => SerializedStyles;
11
+ export declare const topBarNavigationTypographyStyles: (theme: TopBarNavigationTheme, size: 'md' | 'sm') => SerializedStyles;
12
+ export declare const topBarMenuIndicatorStyles: (theme: TopBarNavigationTheme) => SerializedStyles;
@@ -0,0 +1,44 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { PressEvent } from 'react-aria-components';
3
+ import type { DefaultProps } from '../../../util/types';
4
+ import type { IconProps } from '../../icon/types';
5
+ import type { TopBarNavigationTheme } from './styles';
6
+ export interface TopBarNavigationProps extends DefaultProps<TopBarNavigationTheme> {
7
+ /**
8
+ * Text to display in navigation
9
+ */
10
+ text: string;
11
+ /**
12
+ * Size of the text and icons
13
+ */
14
+ size?: 'md' | 'sm';
15
+ /**
16
+ * Whether the component is the currently selected navigation
17
+ */
18
+ isSelected?: boolean;
19
+ /**
20
+ * Icon to display in navigation
21
+ */
22
+ icon?: IconProps['symbol'] | Exclude<IconProps['children'], string>;
23
+ /**
24
+ * Menu sections and items to render in the dropdown menu - only children of type MenuSection and MenuItem will be rendered.
25
+ * `href` and `onPress` will be ignored if this prop is supplied.
26
+ */
27
+ menuChildren?: ReactNode;
28
+ /**
29
+ * Link to navigate to
30
+ */
31
+ href?: string;
32
+ /**
33
+ * Handler for navigation on press
34
+ */
35
+ onPress?: (e: PressEvent) => void;
36
+ /**
37
+ * Whether the navigation is disabled
38
+ */
39
+ isDisabled?: boolean;
40
+ /**
41
+ * Determines the alignment of the item within the top bar
42
+ */
43
+ alignment?: 'left' | 'right';
44
+ }
@@ -0,0 +1,3 @@
1
+ import type { DefaultPropsWithChildren } from '../../util/types';
2
+ import type { TopBarTheme } from './styles';
3
+ export type TopBarProps = DefaultPropsWithChildren<TopBarTheme>;
@@ -26,6 +26,8 @@ export { componentIcon } from './styleD/build/typescript/component/icon';
26
26
  export type { ComponentIcon } from './styleD/build/typescript/component/icon';
27
27
  export { componentFavicon } from './styleD/build/typescript/component/favicon';
28
28
  export type { ComponentFavicon } from './styleD/build/typescript/component/favicon';
29
+ export { componentInlineMessage } from './styleD/build/typescript/component/inlineMessage';
30
+ export type { ComponentInlineMessage } from './styleD/build/typescript/component/inlineMessage';
29
31
  export { componentMenu } from './styleD/build/typescript/component/menu';
30
32
  export type { ComponentMenu } from './styleD/build/typescript/component/menu';
31
33
  export { componentTopBar } from './styleD/build/typescript/component/TopBar';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * InlineMessage component entry point
3
+ *
4
+ * Peer dependencies required to use these components:
5
+ * - `@emotion/react`
6
+ * - `react`
7
+ * - `react-dom`
8
+ * - `typescript`
9
+ *
10
+ * See the `peerDependencies` section of package.json for compatible versions.
11
+ *
12
+ * If you only need the built CSS (./component/inlineMessage.css),
13
+ * you don't need to install these.
14
+ */
15
+ export { InlineMessage } from './components/inline-message/InlineMessage';
16
+ export type { InlineMessageProps } from './components/inline-message/types';
17
+ export type { PartialInlineMessageTheme as InlineMessageTheme } from './components/inline-message/styles';
18
+ export { componentInlineMessage } from './styleD/build/typescript/component/inlineMessage';
19
+ export type { ComponentInlineMessage } from './styleD/build/typescript/component/inlineMessage';
@@ -33,13 +33,13 @@ export declare const baseTypography: {
33
33
  readonly '48-rem': "3rem";
34
34
  };
35
35
  readonly weight: {
36
- readonly 'Guardian Headline': {
37
- readonly bold: 700;
38
- };
39
36
  readonly 'Guardian Text Egyptian': {
40
37
  readonly normal: 400;
41
38
  readonly bold: 700;
42
39
  };
40
+ readonly 'Guardian Headline': {
41
+ readonly bold: 700;
42
+ };
43
43
  readonly 'Open Sans': {
44
44
  readonly light: 340;
45
45
  readonly normal: 460;
@@ -2,6 +2,100 @@
2
2
  * Do not edit directly, this file was auto-generated.
3
3
  */
4
4
  export declare const componentTopBar: {
5
+ 'background-color': string;
6
+ display: string;
7
+ height: string;
8
+ 'justify-content': string;
9
+ border: string;
10
+ Item: {
11
+ display: string;
12
+ 'align-items': string;
13
+ height: string;
14
+ sm: {
15
+ padding: {
16
+ top: string;
17
+ right: string;
18
+ bottom: string;
19
+ left: string;
20
+ };
21
+ };
22
+ md: {
23
+ padding: {
24
+ top: string;
25
+ right: string;
26
+ bottom: string;
27
+ left: string;
28
+ };
29
+ };
30
+ lg: {
31
+ padding: {
32
+ top: string;
33
+ right: string;
34
+ bottom: string;
35
+ left: string;
36
+ };
37
+ };
38
+ border: string;
39
+ };
40
+ Navigation: {
41
+ shared: {
42
+ display: string;
43
+ position: string;
44
+ 'align-items': string;
45
+ cursor: string;
46
+ 'text-decoration': string;
47
+ height: string;
48
+ ':disabled': {
49
+ cursor: string;
50
+ color: string;
51
+ };
52
+ padding: {
53
+ top: string;
54
+ right: string;
55
+ bottom: string;
56
+ left: string;
57
+ };
58
+ ':focus-visible': {
59
+ outline: string;
60
+ 'outline-offset': string;
61
+ };
62
+ 'border-top': string;
63
+ divider: string;
64
+ };
65
+ text: {
66
+ margin: {
67
+ left: string;
68
+ };
69
+ };
70
+ menuIndicator: {
71
+ margin: {
72
+ top: string;
73
+ left: string;
74
+ };
75
+ };
76
+ selected: {
77
+ color: string;
78
+ 'border-bottom': string;
79
+ };
80
+ unselected: {
81
+ color: string;
82
+ 'border-bottom': string;
83
+ };
84
+ md: {
85
+ typography: {
86
+ font: string;
87
+ letterSpacing: string;
88
+ fontWidth: number;
89
+ };
90
+ };
91
+ sm: {
92
+ typography: {
93
+ font: string;
94
+ letterSpacing: string;
95
+ fontWidth: number;
96
+ };
97
+ };
98
+ };
5
99
  ToolName: {
6
100
  display: string;
7
101
  'align-items': string;
@@ -8,56 +8,122 @@ export declare const componentAvatar: {
8
8
  text: string;
9
9
  background: string;
10
10
  border: string;
11
+ ':hover': {
12
+ background: string;
13
+ };
14
+ ':active': {
15
+ background: string;
16
+ };
11
17
  };
12
18
  blue: {
13
19
  text: string;
14
20
  background: string;
15
21
  border: string;
22
+ ':hover': {
23
+ background: string;
24
+ };
25
+ ':active': {
26
+ background: string;
27
+ };
16
28
  };
17
29
  red: {
18
30
  text: string;
19
31
  background: string;
20
32
  border: string;
33
+ ':hover': {
34
+ background: string;
35
+ };
36
+ ':active': {
37
+ background: string;
38
+ };
21
39
  };
22
40
  cyan: {
23
41
  text: string;
24
42
  background: string;
25
43
  border: string;
44
+ ':hover': {
45
+ background: string;
46
+ };
47
+ ':active': {
48
+ background: string;
49
+ };
26
50
  };
27
51
  teal: {
28
52
  text: string;
29
53
  background: string;
30
54
  border: string;
55
+ ':hover': {
56
+ background: string;
57
+ };
58
+ ':active': {
59
+ background: string;
60
+ };
31
61
  };
32
62
  'cool-purple': {
33
63
  text: string;
34
64
  background: string;
35
65
  border: string;
66
+ ':hover': {
67
+ background: string;
68
+ };
69
+ ':active': {
70
+ background: string;
71
+ };
36
72
  };
37
73
  'warm-purple': {
38
74
  text: string;
39
75
  background: string;
40
76
  border: string;
77
+ ':hover': {
78
+ background: string;
79
+ };
80
+ ':active': {
81
+ background: string;
82
+ };
41
83
  };
42
84
  magenta: {
43
85
  text: string;
44
86
  background: string;
45
87
  border: string;
88
+ ':hover': {
89
+ background: string;
90
+ };
91
+ ':active': {
92
+ background: string;
93
+ };
46
94
  };
47
95
  orange: {
48
96
  text: string;
49
97
  background: string;
50
98
  border: string;
99
+ ':hover': {
100
+ background: string;
101
+ };
102
+ ':active': {
103
+ background: string;
104
+ };
51
105
  };
52
106
  yellow: {
53
107
  text: string;
54
108
  background: string;
55
109
  border: string;
110
+ ':hover': {
111
+ background: string;
112
+ };
113
+ ':active': {
114
+ background: string;
115
+ };
56
116
  };
57
117
  outlined: {
58
118
  text: string;
59
119
  background: string;
60
120
  border: string;
121
+ ':hover': {
122
+ background: string;
123
+ };
124
+ ':active': {
125
+ background: string;
126
+ };
61
127
  };
62
128
  };
63
129
  display: string;
@@ -67,6 +133,23 @@ export declare const componentAvatar: {
67
133
  'flex-shrink': string;
68
134
  'border-radius': string;
69
135
  'user-select': string;
136
+ link: {
137
+ width: string;
138
+ ':focus-visible': {
139
+ outline: string;
140
+ 'outline-offset': string;
141
+ };
142
+ 'text-decoration': string;
143
+ };
144
+ button: {
145
+ background: string;
146
+ border: string;
147
+ padding: string;
148
+ cursor: string;
149
+ ':disabled': {
150
+ cursor: string;
151
+ };
152
+ };
70
153
  };
71
154
  sm: {
72
155
  size: string;