@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
package/README.md CHANGED
@@ -181,3 +181,4 @@ Matrix generation in CI uses the same JSON file in the workflow `../.github/work
181
181
  - [Style Dictionary](https://guardian.github.io/stand/?path=/docs/style-dictionary--docs)
182
182
  - [Architecture Decision Records](https://guardian.github.io/stand/?path=/docs/architecture-decision-records--docs)
183
183
  - [Changelog](https://guardian.github.io/stand/?path=/docs/changelog--docs)
184
+ - [Vision](https://guardian.github.io/stand/?path=/docs/vision--docs)
package/dist/TopBar.cjs CHANGED
@@ -1,9 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var TopBarToolName = require('./components/topbar/toolName/TopBarToolName.cjs');
4
- var TopBar = require('./styleD/build/typescript/component/TopBar.cjs');
3
+ var TopBar$1 = require('./styleD/build/typescript/component/TopBar.cjs');
4
+ var TopBarToolName = require('./components/topbar/topBarToolName/TopBarToolName.cjs');
5
+ var TopBarNavigation = require('./components/topbar/topBarNavigation/TopBarNavigation.cjs');
6
+ var TopBarItem = require('./components/topbar/topBarItem/TopBarItem.cjs');
7
+ var TopBar = require('./components/topbar/TopBar.cjs');
5
8
 
6
9
 
7
10
 
11
+ exports.componentTopBar = TopBar$1.componentTopBar;
8
12
  exports.TopBarToolName = TopBarToolName.TopBarToolName;
9
- exports.componentTopBar = TopBar.componentTopBar;
13
+ exports.TopBarNavigation = TopBarNavigation.TopBarNavigation;
14
+ exports.TopBarItem = TopBarItem.TopBarItem;
15
+ exports.TopBar = TopBar.TopBar;
package/dist/TopBar.js CHANGED
@@ -1,2 +1,5 @@
1
- export { TopBarToolName } from './components/topbar/toolName/TopBarToolName.js';
2
1
  export { componentTopBar } from './styleD/build/typescript/component/TopBar.js';
2
+ export { TopBarToolName } from './components/topbar/topBarToolName/TopBarToolName.js';
3
+ export { TopBarNavigation } from './components/topbar/topBarNavigation/TopBarNavigation.js';
4
+ export { TopBarItem } from './components/topbar/topBarItem/TopBarItem.js';
5
+ export { TopBar } from './components/topbar/TopBar.js';
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var AvatarButton = require('./components/avatar-button/AvatarButton.cjs');
4
+
5
+
6
+
7
+ exports.AvatarButton = AvatarButton.AvatarButton;
@@ -0,0 +1 @@
1
+ export { AvatarButton } from './components/avatar-button/AvatarButton.js';
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var AvatarLink = require('./components/avatar-link/AvatarLink.cjs');
4
+
5
+
6
+
7
+ exports.AvatarLink = AvatarLink.AvatarLink;
@@ -0,0 +1 @@
1
+ export { AvatarLink } from './components/avatar-link/AvatarLink.js';
@@ -25,6 +25,30 @@ const avatarStyles = (theme, { size, color }) => {
25
25
  user-select: ${theme.shared["user-select"]};
26
26
  color: ${theme.shared.color[color].text};
27
27
  ${typography.convertTypographyToEmotionStringStyle(theme[size].typography)}
28
+
29
+ &[data-avatar-context='interactive']:hover {
30
+ background-color: ${theme.shared.color[color][":hover"].background};
31
+
32
+ :has(> img) {
33
+ background-color: black;
34
+ }
35
+
36
+ img {
37
+ mask-image: linear-gradient(rgb(0 0 0 / 70%), rgb(0 0 0 / 70%));
38
+ }
39
+ }
40
+
41
+ &[data-avatar-context='interactive']:active {
42
+ background-color: ${theme.shared.color[color][":active"].background};
43
+
44
+ :has(> img) {
45
+ background-color: black;
46
+ }
47
+
48
+ img {
49
+ mask-image: linear-gradient(rgb(0 0 0 / 60%), rgb(0 0 0 / 60%));
50
+ }
51
+ }
28
52
  `;
29
53
  };
30
54
 
@@ -23,6 +23,30 @@ const avatarStyles = (theme, { size, color }) => {
23
23
  user-select: ${theme.shared["user-select"]};
24
24
  color: ${theme.shared.color[color].text};
25
25
  ${convertTypographyToEmotionStringStyle(theme[size].typography)}
26
+
27
+ &[data-avatar-context='interactive']:hover {
28
+ background-color: ${theme.shared.color[color][":hover"].background};
29
+
30
+ :has(> img) {
31
+ background-color: black;
32
+ }
33
+
34
+ img {
35
+ mask-image: linear-gradient(rgb(0 0 0 / 70%), rgb(0 0 0 / 70%));
36
+ }
37
+ }
38
+
39
+ &[data-avatar-context='interactive']:active {
40
+ background-color: ${theme.shared.color[color][":active"].background};
41
+
42
+ :has(> img) {
43
+ background-color: black;
44
+ }
45
+
46
+ img {
47
+ mask-image: linear-gradient(rgb(0 0 0 / 60%), rgb(0 0 0 / 60%));
48
+ }
49
+ }
26
50
  `;
27
51
  };
28
52
 
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('@emotion/react/jsx-runtime');
4
+ var reactAriaComponents = require('react-aria-components');
5
+ var mergeDeep = require('../../util/mergeDeep.cjs');
6
+ var Avatar = require('../avatar/Avatar.cjs');
7
+ var styles = require('./styles.cjs');
8
+
9
+ function AvatarButton(props) {
10
+ const mergedTheme = mergeDeep.mergeDeep(styles.defaultAvatarButtonTheme, props.theme ?? {});
11
+ return /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.Button, { css: styles.avatarButtonStyles(mergedTheme), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(Avatar.Avatar, { ...props, "data-avatar-context": "interactive" }) });
12
+ }
13
+
14
+ exports.AvatarButton = AvatarButton;
@@ -0,0 +1,12 @@
1
+ import { jsx } from '@emotion/react/jsx-runtime';
2
+ import { Button } from 'react-aria-components';
3
+ import { mergeDeep } from '../../util/mergeDeep.js';
4
+ import { Avatar } from '../avatar/Avatar.js';
5
+ import { defaultAvatarButtonTheme, avatarButtonStyles } from './styles.js';
6
+
7
+ function AvatarButton(props) {
8
+ const mergedTheme = mergeDeep(defaultAvatarButtonTheme, props.theme ?? {});
9
+ return jsx(Button, { css: avatarButtonStyles(mergedTheme), ...props, children: jsx(Avatar, { ...props, "data-avatar-context": "interactive" }) });
10
+ }
11
+
12
+ export { AvatarButton };
@@ -0,0 +1,29 @@
1
+ 'use strict';
2
+
3
+ var react = require('@emotion/react');
4
+ var styles = require('../avatar/styles.cjs');
5
+
6
+ const defaultAvatarButtonTheme = styles.defaultAvatarTheme;
7
+ const avatarButtonStyles = (theme) => {
8
+ return react.css`
9
+ display: ${theme.shared.display};
10
+ width: ${theme.shared.link.width};
11
+ background: ${theme.shared.button.background};
12
+ border: ${theme.shared.button.border};
13
+ padding: ${theme.shared.button.padding};
14
+ cursor: ${theme.shared.button.cursor};
15
+ &[data-focus-visible],
16
+ &:focus-visible {
17
+ outline: ${theme.shared.link[":focus-visible"].outline};
18
+ outline-offset: ${theme.shared.link[":focus-visible"]["outline-offset"]};
19
+ border-radius: ${theme.shared["border-radius"]};
20
+ }
21
+ &[data-disabled],
22
+ &:disabled {
23
+ cursor: ${theme.shared.button[":disabled"].cursor};
24
+ }
25
+ `;
26
+ };
27
+
28
+ exports.avatarButtonStyles = avatarButtonStyles;
29
+ exports.defaultAvatarButtonTheme = defaultAvatarButtonTheme;
@@ -0,0 +1,26 @@
1
+ import { css } from '@emotion/react';
2
+ import { defaultAvatarTheme } from '../avatar/styles.js';
3
+
4
+ const defaultAvatarButtonTheme = defaultAvatarTheme;
5
+ const avatarButtonStyles = (theme) => {
6
+ return css`
7
+ display: ${theme.shared.display};
8
+ width: ${theme.shared.link.width};
9
+ background: ${theme.shared.button.background};
10
+ border: ${theme.shared.button.border};
11
+ padding: ${theme.shared.button.padding};
12
+ cursor: ${theme.shared.button.cursor};
13
+ &[data-focus-visible],
14
+ &:focus-visible {
15
+ outline: ${theme.shared.link[":focus-visible"].outline};
16
+ outline-offset: ${theme.shared.link[":focus-visible"]["outline-offset"]};
17
+ border-radius: ${theme.shared["border-radius"]};
18
+ }
19
+ &[data-disabled],
20
+ &:disabled {
21
+ cursor: ${theme.shared.button[":disabled"].cursor};
22
+ }
23
+ `;
24
+ };
25
+
26
+ export { avatarButtonStyles, defaultAvatarButtonTheme };
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('@emotion/react/jsx-runtime');
4
+ var reactAriaComponents = require('react-aria-components');
5
+ var mergeDeep = require('../../util/mergeDeep.cjs');
6
+ var Avatar = require('../avatar/Avatar.cjs');
7
+ var styles = require('./styles.cjs');
8
+
9
+ function AvatarLink(props) {
10
+ const mergedTheme = mergeDeep.mergeDeep(styles.defaultAvatarLinkTheme, props.theme ?? {});
11
+ return /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.Link, { css: styles.avatarLinkStyles(mergedTheme), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(Avatar.Avatar, { ...props, "data-avatar-context": "interactive" }) });
12
+ }
13
+
14
+ exports.AvatarLink = AvatarLink;
@@ -0,0 +1,12 @@
1
+ import { jsx } from '@emotion/react/jsx-runtime';
2
+ import { Link } from 'react-aria-components';
3
+ import { mergeDeep } from '../../util/mergeDeep.js';
4
+ import { Avatar } from '../avatar/Avatar.js';
5
+ import { defaultAvatarLinkTheme, avatarLinkStyles } from './styles.js';
6
+
7
+ function AvatarLink(props) {
8
+ const mergedTheme = mergeDeep(defaultAvatarLinkTheme, props.theme ?? {});
9
+ return jsx(Link, { css: avatarLinkStyles(mergedTheme), ...props, children: jsx(Avatar, { ...props, "data-avatar-context": "interactive" }) });
10
+ }
11
+
12
+ export { AvatarLink };
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ var react = require('@emotion/react');
4
+ var styles = require('../avatar/styles.cjs');
5
+
6
+ const defaultAvatarLinkTheme = styles.defaultAvatarTheme;
7
+ const avatarLinkStyles = (theme) => {
8
+ return react.css`
9
+ display: ${theme.shared.display};
10
+ width: ${theme.shared.link.width};
11
+
12
+ &[data-focus-visible],
13
+ &:focus-visible {
14
+ outline: ${theme.shared.link[":focus-visible"].outline};
15
+ outline-offset: ${theme.shared.link[":focus-visible"]["outline-offset"]};
16
+ border-radius: ${theme.shared["border-radius"]};
17
+ }
18
+
19
+ text-decoration: ${theme.shared.link["text-decoration"]};
20
+ `;
21
+ };
22
+
23
+ exports.avatarLinkStyles = avatarLinkStyles;
24
+ exports.defaultAvatarLinkTheme = defaultAvatarLinkTheme;
@@ -0,0 +1,21 @@
1
+ import { css } from '@emotion/react';
2
+ import { defaultAvatarTheme } from '../avatar/styles.js';
3
+
4
+ const defaultAvatarLinkTheme = defaultAvatarTheme;
5
+ const avatarLinkStyles = (theme) => {
6
+ return css`
7
+ display: ${theme.shared.display};
8
+ width: ${theme.shared.link.width};
9
+
10
+ &[data-focus-visible],
11
+ &:focus-visible {
12
+ outline: ${theme.shared.link[":focus-visible"].outline};
13
+ outline-offset: ${theme.shared.link[":focus-visible"]["outline-offset"]};
14
+ border-radius: ${theme.shared["border-radius"]};
15
+ }
16
+
17
+ text-decoration: ${theme.shared.link["text-decoration"]};
18
+ `;
19
+ };
20
+
21
+ export { avatarLinkStyles, defaultAvatarLinkTheme };
@@ -7,7 +7,7 @@ var Icon = require('../icon/Icon.cjs');
7
7
  var styles = require('./styles.cjs');
8
8
 
9
9
  function Button({
10
- variant = "emphasised-primary",
10
+ variant = "primary",
11
11
  size = "md",
12
12
  theme = {},
13
13
  cssOverrides,
@@ -4,7 +4,7 @@ import { mergeDeep } from '../../util/mergeDeep.js';
4
4
  import { Icon } from '../icon/Icon.js';
5
5
  import { buttonStyles, defaultButtonTheme } from './styles.js';
6
6
 
7
- function Button({ variant = "emphasised-primary", size = "md", theme = {}, cssOverrides, icon, ...props }) {
7
+ function Button({ variant = "primary", size = "md", theme = {}, cssOverrides, icon, ...props }) {
8
8
  const mergedTheme = mergeDeep(defaultButtonTheme, theme);
9
9
  const iconSize = size === "xs" ? "sm" : size;
10
10
  return jsx(Button$1, { ...props, css: [buttonStyles(mergedTheme, { variant, size }, !!icon), cssOverrides], children: composeRenderProps(props.children, (children) => (
@@ -8,7 +8,7 @@ var Icon = require('../icon/Icon.cjs');
8
8
  var styles = require('./styles.cjs');
9
9
 
10
10
  function IconButton({
11
- variant = "emphasised-primary",
11
+ variant = "primary",
12
12
  size = "md",
13
13
  symbol,
14
14
  ariaLabel,
@@ -5,7 +5,7 @@ import { mergeDeep } from '../../util/mergeDeep.js';
5
5
  import { Icon } from '../icon/Icon.js';
6
6
  import { iconButtonStyles, defaultIconButtonTheme } from './styles.js';
7
7
 
8
- function IconButton({ variant = "emphasised-primary", size = "md", symbol, ariaLabel, theme = {}, cssOverrides, ...props }) {
8
+ function IconButton({ variant = "primary", size = "md", symbol, ariaLabel, theme = {}, cssOverrides, ...props }) {
9
9
  const mergedTheme = mergeDeep(defaultIconButtonTheme, theme);
10
10
  const buttonRef = useRef(null);
11
11
  useEffect(() => {
@@ -8,7 +8,7 @@ var Icon = require('../icon/Icon.cjs');
8
8
  var styles = require('./styles.cjs');
9
9
 
10
10
  function IconLinkButton({
11
- variant = "emphasised-primary",
11
+ variant = "primary",
12
12
  size = "md",
13
13
  symbol,
14
14
  ariaLabel,
@@ -5,7 +5,7 @@ import { mergeDeep } from '../../util/mergeDeep.js';
5
5
  import { Icon } from '../icon/Icon.js';
6
6
  import { iconLinkButtonStyles, defaultIconLinkButtonTheme } from './styles.js';
7
7
 
8
- function IconLinkButton({ variant = "emphasised-primary", size = "md", symbol, ariaLabel, theme = {}, cssOverrides, ...props }) {
8
+ function IconLinkButton({ variant = "primary", size = "md", symbol, ariaLabel, theme = {}, cssOverrides, ...props }) {
9
9
  const mergedTheme = mergeDeep(defaultIconLinkButtonTheme, theme);
10
10
  const linkRef = useRef(null);
11
11
  useEffect(() => {
@@ -0,0 +1,56 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('@emotion/react/jsx-runtime');
4
+ var React = require('react');
5
+ var mergeDeep = require('../../util/mergeDeep.cjs');
6
+ var Icon = require('../icon/Icon.cjs');
7
+ var Typography = require('../typography/Typography.cjs');
8
+ var styles = require('./styles.cjs');
9
+
10
+ function InlineMessage({
11
+ children,
12
+ level,
13
+ hideIcon = false,
14
+ icon,
15
+ theme = {},
16
+ cssOverrides,
17
+ className,
18
+ ...props
19
+ }) {
20
+ const mergedTheme = mergeDeep.mergeDeep(styles.defaultInlineMessageTheme, theme);
21
+ const determinedIcon = React.useMemo(() => {
22
+ if (icon) {
23
+ return icon;
24
+ }
25
+ switch (level) {
26
+ case "error":
27
+ return "warning";
28
+ case "success":
29
+ return "check_circle";
30
+ case "information":
31
+ default:
32
+ return "info";
33
+ }
34
+ }, [icon, level]);
35
+ return /* @__PURE__ */ jsxRuntime.jsxs(
36
+ "div",
37
+ {
38
+ css: [styles.inlineMessageStyles(mergedTheme, { level }), cssOverrides],
39
+ className,
40
+ ...props,
41
+ children: [
42
+ !hideIcon && /* @__PURE__ */ jsxRuntime.jsx(Icon.Icon, { fill: mergedTheme[level].color, size: "md", children: determinedIcon }),
43
+ /* @__PURE__ */ jsxRuntime.jsx(
44
+ Typography.Typography,
45
+ {
46
+ variant: "help-text-form-md",
47
+ theme: { color: mergedTheme[level].color },
48
+ children
49
+ }
50
+ )
51
+ ]
52
+ }
53
+ );
54
+ }
55
+
56
+ exports.InlineMessage = InlineMessage;
@@ -0,0 +1,27 @@
1
+ import { jsxs, jsx } from '@emotion/react/jsx-runtime';
2
+ import { useMemo } from 'react';
3
+ import { mergeDeep } from '../../util/mergeDeep.js';
4
+ import { Icon } from '../icon/Icon.js';
5
+ import { Typography } from '../typography/Typography.js';
6
+ import { inlineMessageStyles, defaultInlineMessageTheme } from './styles.js';
7
+
8
+ function InlineMessage({ children, level, hideIcon = false, icon, theme = {}, cssOverrides, className, ...props }) {
9
+ const mergedTheme = mergeDeep(defaultInlineMessageTheme, theme);
10
+ const determinedIcon = useMemo(() => {
11
+ if (icon) {
12
+ return icon;
13
+ }
14
+ switch (level) {
15
+ case "error":
16
+ return "warning";
17
+ case "success":
18
+ return "check_circle";
19
+ case "information":
20
+ default:
21
+ return "info";
22
+ }
23
+ }, [icon, level]);
24
+ return jsxs("div", { css: [inlineMessageStyles(mergedTheme, { level }), cssOverrides], className, ...props, children: [!hideIcon && jsx(Icon, { fill: mergedTheme[level].color, size: "md", children: determinedIcon }), jsx(Typography, { variant: "help-text-form-md", theme: { color: mergedTheme[level].color }, children })] });
25
+ }
26
+
27
+ export { InlineMessage };
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var react = require('@emotion/react');
4
+ var inlineMessage = require('../../styleD/build/typescript/component/inlineMessage.cjs');
5
+
6
+ const defaultInlineMessageTheme = inlineMessage.componentInlineMessage;
7
+ const inlineMessageStyles = (theme, { level }) => {
8
+ return react.css`
9
+ display: ${theme.shared.display};
10
+ align-items: ${theme.shared["align-items"]};
11
+ gap: ${theme.shared.gap};
12
+ color: ${theme[level].color};
13
+ `;
14
+ };
15
+
16
+ exports.defaultInlineMessageTheme = defaultInlineMessageTheme;
17
+ exports.inlineMessageStyles = inlineMessageStyles;
@@ -0,0 +1,14 @@
1
+ import { css } from '@emotion/react';
2
+ import { componentInlineMessage } from '../../styleD/build/typescript/component/inlineMessage.js';
3
+
4
+ const defaultInlineMessageTheme = componentInlineMessage;
5
+ const inlineMessageStyles = (theme, { level }) => {
6
+ return css`
7
+ display: ${theme.shared.display};
8
+ align-items: ${theme.shared["align-items"]};
9
+ gap: ${theme.shared.gap};
10
+ color: ${theme[level].color};
11
+ `;
12
+ };
13
+
14
+ export { defaultInlineMessageTheme, inlineMessageStyles };
@@ -7,7 +7,7 @@ var Icon = require('../icon/Icon.cjs');
7
7
  var styles = require('./styles.cjs');
8
8
 
9
9
  function LinkButton({
10
- variant = "emphasised-primary",
10
+ variant = "primary",
11
11
  size = "md",
12
12
  theme = {},
13
13
  cssOverrides,
@@ -4,7 +4,7 @@ import { mergeDeep } from '../../util/mergeDeep.js';
4
4
  import { Icon } from '../icon/Icon.js';
5
5
  import { linkButtonStyles, defaultLinkButtonTheme } from './styles.js';
6
6
 
7
- function LinkButton({ variant = "emphasised-primary", size = "md", theme = {}, cssOverrides, icon, ...props }) {
7
+ function LinkButton({ variant = "primary", size = "md", theme = {}, cssOverrides, icon, ...props }) {
8
8
  const mergedTheme = mergeDeep(defaultLinkButtonTheme, theme);
9
9
  const iconSize = size === "xs" ? "sm" : size;
10
10
  return jsx(Link, { ...props, css: [
@@ -33,6 +33,7 @@ const menuItemStyles = (theme, { description }, isFocusVisible = false) => react
33
33
  padding: ${theme.shared.padding.top} ${theme.shared.padding.right}
34
34
  ${theme.shared.padding.bottom} ${theme.shared.padding.left};
35
35
  border-bottom: ${theme.shared["border-bottom"]};
36
+ background: ${theme.shared["background-color"]};
36
37
  &:last-child {
37
38
  border-bottom: ${theme.shared[":last-child"]["border-bottom"]};
38
39
  }
@@ -31,6 +31,7 @@ const menuItemStyles = (theme, { description }, isFocusVisible = false) => css`
31
31
  padding: ${theme.shared.padding.top} ${theme.shared.padding.right}
32
32
  ${theme.shared.padding.bottom} ${theme.shared.padding.left};
33
33
  border-bottom: ${theme.shared["border-bottom"]};
34
+ background: ${theme.shared["background-color"]};
34
35
  &:last-child {
35
36
  border-bottom: ${theme.shared[":last-child"]["border-bottom"]};
36
37
  }
@@ -0,0 +1,101 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('@emotion/react/jsx-runtime');
4
+ var React = require('react');
5
+ var mergeDeep = require('../../util/mergeDeep.cjs');
6
+ var Avatar = require('../avatar/Avatar.cjs');
7
+ var styles = require('./styles.cjs');
8
+ var TopBarItem = require('./topBarItem/TopBarItem.cjs');
9
+ var TopBarNavigation = require('./topBarNavigation/TopBarNavigation.cjs');
10
+ var TopBarToolName = require('./topBarToolName/TopBarToolName.cjs');
11
+
12
+ function TopBarSide({
13
+ children,
14
+ alignment
15
+ }) {
16
+ const items = [];
17
+ React.Children.forEach(children, (child, i) => {
18
+ if (!React.isValidElement(child)) {
19
+ return;
20
+ }
21
+ if (child.type === TopBarItem.TopBarItem) {
22
+ items.push(
23
+ React.cloneElement(child, {
24
+ key: `${child.key}-${i}`,
25
+ alignment
26
+ })
27
+ );
28
+ }
29
+ if (child.type === TopBarNavigation.TopBarNavigation) {
30
+ items.push(
31
+ React.cloneElement(child, {
32
+ key: `${child.key}-${i}`,
33
+ alignment
34
+ })
35
+ );
36
+ }
37
+ });
38
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: items });
39
+ }
40
+ function TopBarContainerRight({
41
+ children
42
+ }) {
43
+ return /* @__PURE__ */ jsxRuntime.jsx(TopBarSide, { alignment: "right", children });
44
+ }
45
+ function TopBarContainerLeft({
46
+ children
47
+ }) {
48
+ return /* @__PURE__ */ jsxRuntime.jsx(TopBarSide, { alignment: "left", children });
49
+ }
50
+ function TopBar({
51
+ children,
52
+ theme = {},
53
+ cssOverrides,
54
+ className,
55
+ ...props
56
+ }) {
57
+ const mergedTheme = mergeDeep.mergeDeep(styles.defaultTopBarTheme, theme);
58
+ let leftSide = null;
59
+ let rightSide = null;
60
+ let toolName = null;
61
+ let avatar = null;
62
+ React.Children.forEach(children, (child) => {
63
+ if (!React.isValidElement(child)) {
64
+ return;
65
+ }
66
+ if (child.type === TopBarToolName.TopBarToolName) {
67
+ toolName ?? (toolName = child);
68
+ }
69
+ if (child.type === Avatar.Avatar) {
70
+ avatar ?? (avatar = /* @__PURE__ */ jsxRuntime.jsx(TopBarItem.TopBarItem, { alignment: "right", children: child }));
71
+ }
72
+ if (child.type === TopBarContainerLeft) {
73
+ leftSide ?? (leftSide = child);
74
+ }
75
+ if (child.type === TopBarContainerRight) {
76
+ rightSide ?? (rightSide = child);
77
+ }
78
+ });
79
+ return /* @__PURE__ */ jsxRuntime.jsxs(
80
+ "div",
81
+ {
82
+ css: [styles.topBarStyles(mergedTheme), cssOverrides],
83
+ className,
84
+ ...props,
85
+ children: [
86
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { css: styles.topBarContainerLeftStyles(mergedTheme), children: [
87
+ toolName,
88
+ leftSide
89
+ ] }),
90
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { css: styles.topBarContainerRightStyles(mergedTheme), children: [
91
+ rightSide,
92
+ avatar
93
+ ] })
94
+ ]
95
+ }
96
+ );
97
+ }
98
+
99
+ exports.TopBar = TopBar;
100
+ exports.TopBarContainerLeft = TopBarContainerLeft;
101
+ exports.TopBarContainerRight = TopBarContainerRight;