@equinor/eds-core-react 0.15.0-dev.20211116v2 → 0.16.1-dev.12072021

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 (76) hide show
  1. package/dist/core-react.cjs.js +425 -143
  2. package/dist/esm/components/Accordion/AccordionHeader.js +2 -2
  3. package/dist/esm/components/Accordion/AccordionItem.js +2 -2
  4. package/dist/esm/components/Breadcrumbs/Breadcrumbs.js +1 -1
  5. package/dist/esm/components/Button/Button.js +1 -1
  6. package/dist/esm/components/Button/tokens/button.js +2 -2
  7. package/dist/esm/components/Button/tokens/contained.js +4 -4
  8. package/dist/esm/components/Button/tokens/ghost.js +4 -4
  9. package/dist/esm/components/Button/tokens/icon.js +6 -6
  10. package/dist/esm/components/Button/tokens/outlined.js +4 -4
  11. package/dist/esm/components/Card/Card.js +2 -3
  12. package/dist/esm/components/Card/CardActions.js +6 -2
  13. package/dist/esm/components/Card/CardContent.js +24 -0
  14. package/dist/esm/components/Card/CardHeader.js +1 -1
  15. package/dist/esm/components/Card/CardMedia.js +2 -2
  16. package/dist/esm/components/Card/index.js +3 -0
  17. package/dist/esm/components/Checkbox/Input.js +5 -3
  18. package/dist/esm/components/Chip/Chip.js +1 -1
  19. package/dist/esm/components/Divider/Divider.tokens.js +2 -2
  20. package/dist/esm/components/Icon/Icon.js +7 -7
  21. package/dist/esm/components/Input/Input.tokens.js +4 -4
  22. package/dist/esm/components/Menu/Menu.context.js +6 -1
  23. package/dist/esm/components/Menu/Menu.js +6 -0
  24. package/dist/esm/components/Menu/MenuItem.js +6 -6
  25. package/dist/esm/components/Menu/MenuList.js +2 -2
  26. package/dist/esm/components/Menu/MenuSection.js +4 -4
  27. package/dist/esm/components/Pagination/Pagination.js +5 -10
  28. package/dist/esm/components/Progress/Circular/CircularProgress.js +1 -1
  29. package/dist/esm/components/Progress/Linear/LinearProgress.js +1 -1
  30. package/dist/esm/components/Radio/Radio.js +4 -2
  31. package/dist/esm/components/Search/Search.js +10 -8
  32. package/dist/esm/components/Search/Search.tokens.js +7 -0
  33. package/dist/esm/components/Select/MultiSelect/MultiSelect.js +2 -2
  34. package/dist/esm/components/Select/Select.tokens.js +2 -2
  35. package/dist/esm/components/Select/SingleSelect/SingleSelect.js +1 -1
  36. package/dist/esm/components/Slider/Slider.js +4 -4
  37. package/dist/esm/components/Slider/SliderInput.js +1 -1
  38. package/dist/esm/components/Switch/Switch.styles.js +1 -1
  39. package/dist/esm/components/Switch/Switch.tokens.js +4 -4
  40. package/dist/esm/components/Switch/SwitchSmall.js +2 -1
  41. package/dist/esm/components/Table/DataCell/DataCell.tokens.js +2 -2
  42. package/dist/esm/components/Tabs/Tab.js +2 -2
  43. package/dist/esm/components/Tabs/TabList.js +2 -2
  44. package/dist/esm/components/Tabs/TabPanel.js +1 -1
  45. package/dist/esm/components/Tabs/TabPanels.js +2 -2
  46. package/dist/esm/components/TextField/Field.js +2 -2
  47. package/dist/esm/components/TextField/HelperText/HelperText.js +1 -1
  48. package/dist/esm/components/Textarea/Textarea.js +1 -1
  49. package/dist/esm/components/TopBar/Actions.js +1 -1
  50. package/dist/esm/components/Typography/Typography.js +3 -3
  51. package/dist/esm/hooks/useAutoResize.js +1 -1
  52. package/dist/esm/hooks/useId.js +1 -1
  53. package/dist/esm/hooks/useToken.js +2 -2
  54. package/dist/esm/index.js +0 -1
  55. package/dist/esm/node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_curry1.js +25 -0
  56. package/dist/esm/node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_curry2.js +38 -0
  57. package/dist/esm/node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_curry3.js +57 -0
  58. package/dist/esm/node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_has.js +7 -0
  59. package/dist/esm/node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isObject.js +7 -0
  60. package/dist/esm/node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isPlaceholder.js +7 -0
  61. package/dist/esm/node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/mergeDeepRight.js +36 -0
  62. package/dist/esm/node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/mergeDeepWithKey.js +49 -0
  63. package/dist/esm/node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/mergeWithKey.js +53 -0
  64. package/dist/esm/utils/templates/common.js +1 -1
  65. package/dist/esm/utils/templates/index.js +8 -15
  66. package/dist/types/components/Card/CardContent.d.ts +3 -0
  67. package/dist/types/components/Card/index.d.ts +3 -1
  68. package/dist/types/components/Menu/Menu.d.ts +2 -2
  69. package/dist/types/components/Menu/MenuItem.d.ts +2 -2
  70. package/dist/types/components/Menu/MenuList.d.ts +1 -1
  71. package/dist/types/components/Table/Cell.d.ts +2 -2
  72. package/dist/types/components/Table/DataCell/DataCell.d.ts +1 -1
  73. package/dist/types/components/Table/HeaderCell/HeaderCell.d.ts +1 -1
  74. package/dist/types/components/Typography/Typography.tokens.d.ts +2 -1
  75. package/dist/types/index.d.ts +0 -1
  76. package/package.json +6 -6
@@ -30,7 +30,7 @@ const StyledAccordionHeader = styled.div.attrs(({
30
30
  })).withConfig({
31
31
  displayName: "AccordionHeader__StyledAccordionHeader",
32
32
  componentId: "sc-cu2e95-0"
33
- })(["", " ", " ", " &[data-focus-visible-added]:focus{", "}border-top:", ";background:", ";height:", ";margin:0;display:flex;align-items:center;box-sizing:border-box;", " > svg{color:", ";}"], typographyTemplate(header.typography), bordersTemplate(accordion.border), spacingsTemplate(header.spacings), outlineTemplate(header.states.focus.outline), ({
33
+ })(["", " ", " ", " &[data-focus-visible-added]:focus{", "}&:focus-visible{", "}border-top:", ";background:", ";height:", ";margin:0;display:flex;align-items:center;box-sizing:border-box;", " > svg{color:", ";}"], typographyTemplate(header.typography), bordersTemplate(accordion.border), spacingsTemplate(header.spacings), outlineTemplate(header.states.focus.outline), outlineTemplate(header.states.focus.outline), ({
34
34
  parentIndex
35
35
  }) => parentIndex === 0 ? null : 'none', header.background, header.height, ({
36
36
  disabled
@@ -99,7 +99,7 @@ const AccordionHeader = /*#__PURE__*/forwardRef(function AccordionHeader({
99
99
  size: 24,
100
100
  chevronPosition: chevronPosition,
101
101
  color: disabled ? chevronToken.states.disabled.background : chevronToken.background
102
- }, `${id}-icon`);
102
+ }, "".concat(id, "-icon"));
103
103
 
104
104
  const headerChildren = Children.map(children, child => {
105
105
  if (typeof child === 'string') {
@@ -18,8 +18,8 @@ const AccordionItem = /*#__PURE__*/forwardRef(function AccordionItem({
18
18
  };
19
19
 
20
20
  const Children$1 = Children.map(children, (child, childIndex) => {
21
- const headerId = `${accordionId}-header-${index + 1}`;
22
- const panelId = `${accordionId}-panel-${index + 1}`;
21
+ const headerId = "".concat(accordionId, "-header-").concat(index + 1);
22
+ const panelId = "".concat(accordionId, "-panel-").concat(index + 1);
23
23
  return childIndex === 0 ? /*#__PURE__*/cloneElement(child, {
24
24
  isExpanded: expanded,
25
25
  toggleExpanded,
@@ -86,7 +86,7 @@ const Breadcrumbs = /*#__PURE__*/forwardRef(function Breadcrumbs({
86
86
  children: "/"
87
87
  })
88
88
  })]
89
- }, `breadcrumb-${index}`));
89
+ }, "breadcrumb-".concat(index)));
90
90
  return /*#__PURE__*/jsx("nav", { ...props,
91
91
  "aria-label": "breadcrumbs",
92
92
  children: /*#__PURE__*/jsx(OrderedList, {
@@ -61,7 +61,7 @@ const ButtonBase = styled.button.withConfig({
61
61
  hover,
62
62
  disabled
63
63
  } = states;
64
- return css(["margin:0;padding:0;text-decoration:none;position:relative;cursor:pointer;display:inline-block;background:", ";height:", ";width:", ";svg{justify-self:center;}", " ", " ", " &::before{position:absolute;top:0;left:0;width:auto;min-height:auto;content:'';}&::after{position:absolute;top:-", ";left:-", ";width:", ";height:", ";content:'';}@media (hover:hover) and (pointer:fine){&:hover{background:", ";color:", ";", ";}}&:focus{outline:none;}&[data-focus-visible-added]:focus{", "}&::-moz-focus-inner{border:0;}&:disabled{cursor:not-allowed;background:", ";", ";", ";@media (hover:hover) and (pointer:fine){&:hover{background:", ";}}}"], theme.background, theme.height, theme.width, spacingsTemplate(theme.spacings), bordersTemplate(theme.border), typographyTemplate(theme.typography), clickbound === null || clickbound === void 0 ? void 0 : (_clickbound$offset = clickbound.offset) === null || _clickbound$offset === void 0 ? void 0 : _clickbound$offset.top, clickbound === null || clickbound === void 0 ? void 0 : (_clickbound$offset2 = clickbound.offset) === null || _clickbound$offset2 === void 0 ? void 0 : _clickbound$offset2.left, clickbound === null || clickbound === void 0 ? void 0 : clickbound.width, clickbound === null || clickbound === void 0 ? void 0 : clickbound.height, hover.background, (_hover$typography = hover.typography) === null || _hover$typography === void 0 ? void 0 : _hover$typography.color, bordersTemplate(hover === null || hover === void 0 ? void 0 : hover.border), outlineTemplate(focus.outline), disabled.background, bordersTemplate(disabled.border), typographyTemplate(disabled.typography), disabled.background);
64
+ return css(["margin:0;padding:0;text-decoration:none;position:relative;cursor:pointer;display:inline-block;background:", ";height:", ";width:", ";svg{justify-self:center;}", " ", " ", " &::before{position:absolute;top:0;left:0;width:auto;min-height:auto;content:'';}&::after{position:absolute;top:-", ";left:-", ";width:", ";height:", ";content:'';}@media (hover:hover) and (pointer:fine){&:hover{background:", ";color:", ";", ";}}&:focus{outline:none;}&[data-focus-visible-added]:focus{", "}&:focus-visible{", "}&::-moz-focus-inner{border:0;}&:disabled{cursor:not-allowed;background:", ";", ";", ";@media (hover:hover) and (pointer:fine){&:hover{background:", ";}}}"], theme.background, theme.height, theme.width, spacingsTemplate(theme.spacings), bordersTemplate(theme.border), typographyTemplate(theme.typography), clickbound === null || clickbound === void 0 ? void 0 : (_clickbound$offset = clickbound.offset) === null || _clickbound$offset === void 0 ? void 0 : _clickbound$offset.top, clickbound === null || clickbound === void 0 ? void 0 : (_clickbound$offset2 = clickbound.offset) === null || _clickbound$offset2 === void 0 ? void 0 : _clickbound$offset2.left, clickbound === null || clickbound === void 0 ? void 0 : clickbound.width, clickbound === null || clickbound === void 0 ? void 0 : clickbound.height, hover.background, (_hover$typography = hover.typography) === null || _hover$typography === void 0 ? void 0 : _hover$typography.color, bordersTemplate(hover === null || hover === void 0 ? void 0 : hover.border), outlineTemplate(focus.outline), outlineTemplate(focus.outline), disabled.background, bordersTemplate(disabled.border), typographyTemplate(disabled.typography), disabled.background);
65
65
  });
66
66
  const Button = /*#__PURE__*/forwardRef(function Button({
67
67
  color = 'primary',
@@ -66,7 +66,7 @@ const button = {
66
66
  height: clicboundHeight,
67
67
  width: '100%',
68
68
  offset: {
69
- top: `${(parseInt(clicboundHeight) - parseInt(buttonHeight)) / 2 + 1}px`,
69
+ top: "".concat((parseInt(clicboundHeight) - parseInt(buttonHeight)) / 2 + 1, "px"),
70
70
  left: '0'
71
71
  }
72
72
  },
@@ -116,7 +116,7 @@ const button = {
116
116
  height: compactClickboundHeight,
117
117
  width: '100%',
118
118
  offset: {
119
- top: `${(parseInt(compactClickboundHeight) - parseInt(compactButtonHeight)) / 2 + 1}px`,
119
+ top: "".concat((parseInt(compactClickboundHeight) - parseInt(compactButtonHeight)) / 2 + 1, "px"),
120
120
  left: '0'
121
121
  }
122
122
  }
@@ -1,6 +1,6 @@
1
1
  import { tokens } from '@equinor/eds-tokens';
2
2
  import { button } from './button.js';
3
- import * as R from 'ramda';
3
+ import mergeDeepRight_1 from '../../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/mergeDeepRight.js';
4
4
 
5
5
  const {
6
6
  colors: {
@@ -36,7 +36,7 @@ const {
36
36
  }
37
37
  }
38
38
  } = tokens;
39
- const primary = R.mergeDeepRight(button, {
39
+ const primary = mergeDeepRight_1(button, {
40
40
  background: primaryColor,
41
41
  typography: {
42
42
  color: primaryWhite
@@ -54,7 +54,7 @@ const primary = R.mergeDeepRight(button, {
54
54
  }
55
55
  }
56
56
  });
57
- const secondary = R.mergeDeepRight(primary, {
57
+ const secondary = mergeDeepRight_1(primary, {
58
58
  background: secondaryColor,
59
59
  border: {
60
60
  color: secondaryColor
@@ -68,7 +68,7 @@ const secondary = R.mergeDeepRight(primary, {
68
68
  }
69
69
  }
70
70
  });
71
- const danger = R.mergeDeepRight(primary, {
71
+ const danger = mergeDeepRight_1(primary, {
72
72
  background: dangerColor,
73
73
  border: {
74
74
  color: dangerColor
@@ -1,5 +1,5 @@
1
1
  import { tokens } from '@equinor/eds-tokens';
2
- import * as R from 'ramda';
2
+ import mergeDeepRight_1 from '../../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/mergeDeepRight.js';
3
3
  import { button } from './button.js';
4
4
 
5
5
  const {
@@ -35,7 +35,7 @@ const {
35
35
  }
36
36
  }
37
37
  } = tokens;
38
- const primary = R.mergeDeepRight(button, {
38
+ const primary = mergeDeepRight_1(button, {
39
39
  typography: {
40
40
  color: primaryColor
41
41
  },
@@ -54,7 +54,7 @@ const primary = R.mergeDeepRight(button, {
54
54
  }
55
55
  }
56
56
  });
57
- const secondary = R.mergeDeepRight(primary, {
57
+ const secondary = mergeDeepRight_1(primary, {
58
58
  typography: {
59
59
  color: secondaryColor
60
60
  },
@@ -67,7 +67,7 @@ const secondary = R.mergeDeepRight(primary, {
67
67
  }
68
68
  }
69
69
  });
70
- const danger = R.mergeDeepRight(primary, {
70
+ const danger = mergeDeepRight_1(primary, {
71
71
  typography: {
72
72
  color: dangerColor
73
73
  },
@@ -1,5 +1,5 @@
1
1
  import { tokens } from '@equinor/eds-tokens';
2
- import * as R from 'ramda';
2
+ import mergeDeepRight_1 from '../../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/mergeDeepRight.js';
3
3
  import { button } from './button.js';
4
4
 
5
5
  const {
@@ -37,7 +37,7 @@ const {
37
37
  },
38
38
  shape
39
39
  } = tokens;
40
- const primary = R.mergeDeepRight(button, {
40
+ const primary = mergeDeepRight_1(button, {
41
41
  height: shape.icon_button.minHeight,
42
42
  width: shape.icon_button.minWidth,
43
43
  typography: {
@@ -56,7 +56,7 @@ const primary = R.mergeDeepRight(button, {
56
56
  width: clicboundHeight,
57
57
  offset: {
58
58
  top: '0',
59
- left: `${(parseInt(clicboundHeight) - parseInt(shape.icon_button.minWidth)) / 2}px`
59
+ left: "".concat((parseInt(clicboundHeight) - parseInt(shape.icon_button.minWidth)) / 2, "px")
60
60
  }
61
61
  },
62
62
  states: {
@@ -87,13 +87,13 @@ const primary = R.mergeDeepRight(button, {
87
87
  width: compactClickboundHeight,
88
88
  offset: {
89
89
  top: '0',
90
- left: `${(parseInt(compactClickboundHeight) - parseInt(shape._modes.compact.icon_button.minWidth)) / 2}px`
90
+ left: "".concat((parseInt(compactClickboundHeight) - parseInt(shape._modes.compact.icon_button.minWidth)) / 2, "px")
91
91
  }
92
92
  }
93
93
  }
94
94
  }
95
95
  });
96
- const secondary = R.mergeDeepRight(primary, {
96
+ const secondary = mergeDeepRight_1(primary, {
97
97
  typography: {
98
98
  color: secondaryColor
99
99
  },
@@ -106,7 +106,7 @@ const secondary = R.mergeDeepRight(primary, {
106
106
  }
107
107
  }
108
108
  });
109
- const danger = R.mergeDeepRight(primary, {
109
+ const danger = mergeDeepRight_1(primary, {
110
110
  typography: {
111
111
  color: dangerColor
112
112
  },
@@ -1,5 +1,5 @@
1
1
  import { tokens } from '@equinor/eds-tokens';
2
- import * as R from 'ramda';
2
+ import mergeDeepRight_1 from '../../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/mergeDeepRight.js';
3
3
  import { button } from './button.js';
4
4
 
5
5
  const {
@@ -40,7 +40,7 @@ const {
40
40
  }
41
41
  }
42
42
  } = tokens;
43
- const primary = R.mergeDeepRight(button, {
43
+ const primary = mergeDeepRight_1(button, {
44
44
  typography: {
45
45
  color: primaryColor
46
46
  },
@@ -69,7 +69,7 @@ const primary = R.mergeDeepRight(button, {
69
69
  }
70
70
  }
71
71
  });
72
- const secondary = R.mergeDeepRight(primary, {
72
+ const secondary = mergeDeepRight_1(primary, {
73
73
  typography: {
74
74
  color: secondaryColor
75
75
  },
@@ -88,7 +88,7 @@ const secondary = R.mergeDeepRight(primary, {
88
88
  }
89
89
  }
90
90
  });
91
- const danger = R.mergeDeepRight(primary, {
91
+ const danger = mergeDeepRight_1(primary, {
92
92
  typography: {
93
93
  color: dangerColor
94
94
  },
@@ -3,7 +3,6 @@ import styled from 'styled-components';
3
3
  import * as Card_tokens from './Card.tokens.js';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
  import { bordersTemplate } from '../../utils/templates/borders.js';
6
- import { spacingsTemplate } from '../../utils/templates/index.js';
7
6
 
8
7
  const {
9
8
  primary
@@ -11,11 +10,11 @@ const {
11
10
  const StyledCard = styled.div.withConfig({
12
11
  displayName: "Card__StyledCard",
13
12
  componentId: "sc-bjucjn-0"
14
- })(["height:fit-content;width:100%;position:relative;background-color:", ";box-sizing:border-box;display:grid;grid-gap:16px;grid-auto-columns:auto;align-items:center;align-content:start;cursor:", ";", ";", ""], ({
13
+ })(["height:fit-content;width:100%;position:relative;background-color:", ";box-sizing:border-box;display:grid;grid-gap:16px;grid-auto-columns:auto;align-items:center;align-content:start;cursor:", ";", ";"], ({
15
14
  background
16
15
  }) => background, ({
17
16
  cursor
18
- }) => cursor, bordersTemplate(primary.border), spacingsTemplate(primary.spacings));
17
+ }) => cursor, bordersTemplate(primary.border));
19
18
  const Card = /*#__PURE__*/forwardRef(function Card({
20
19
  children,
21
20
  variant = 'default',
@@ -1,14 +1,18 @@
1
1
  import { forwardRef } from 'react';
2
2
  import styled from 'styled-components';
3
+ import { primary } from './Card.tokens.js';
3
4
  import { jsxs, jsx } from 'react/jsx-runtime';
4
5
  import { Typography } from '../Typography/Typography.js';
5
6
 
7
+ const {
8
+ spacings
9
+ } = primary;
6
10
  const StyledCardActions = styled.div.withConfig({
7
11
  displayName: "CardActions__StyledCardActions",
8
12
  componentId: "sc-1d5vskp-0"
9
- })(["display:grid;grid-gap:8px;grid-auto-flow:column;align-items:center;justify-content:", ";"], ({
13
+ })(["display:grid;grid-gap:8px;grid-auto-flow:column;align-items:center;justify-content:", ";padding:0 ", " 0 ", ";:first-child{padding-top:", ";}:last-child{padding-bottom:", ";}"], ({
10
14
  justifyContent
11
- }) => justifyContent);
15
+ }) => justifyContent, spacings.right, spacings.left, spacings.top, spacings.bottom);
12
16
  const CardActions = /*#__PURE__*/forwardRef(function CardActions({
13
17
  children,
14
18
  alignRight = false,
@@ -0,0 +1,24 @@
1
+ import { forwardRef } from 'react';
2
+ import styled from 'styled-components';
3
+ import { primary } from './Card.tokens.js';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ const {
7
+ spacings
8
+ } = primary;
9
+ const StyledCardContent = styled.div.withConfig({
10
+ displayName: "CardContent__StyledCardContent",
11
+ componentId: "sc-esm4ym-0"
12
+ })(["display:grid;padding:0 ", " 0 ", ";:last-child{padding-bottom:", ";}"], spacings.right, spacings.left, spacings.bottom);
13
+ const CardContent = /*#__PURE__*/forwardRef(function CardContent({
14
+ children,
15
+ ...props
16
+ }, ref) {
17
+ return /*#__PURE__*/jsx(StyledCardContent, {
18
+ ref: ref,
19
+ ...props,
20
+ children: children
21
+ });
22
+ });
23
+
24
+ export { CardContent };
@@ -9,7 +9,7 @@ const {
9
9
  const StyledCardHeader = styled.div.withConfig({
10
10
  displayName: "CardHeader__StyledCardHeader",
11
11
  componentId: "sc-15k8edh-0"
12
- })(["display:flex;justify-content:space-between;align-items:center;>:not(:first-child){margin-left:", ";}"], spacings.left);
12
+ })(["display:flex;justify-content:space-between;align-items:center;padding:0 ", " 0 ", ";>:not(:first-child){margin-left:", ";}:first-child{padding-top:", ";}:last-child{padding-bottom:", ";}"], spacings.right, spacings.left, spacings.left, spacings.top, spacings.bottom);
13
13
  const CardHeader = /*#__PURE__*/forwardRef(function CardHeader({
14
14
  children,
15
15
  ...rest
@@ -10,9 +10,9 @@ const {
10
10
  const StyledCardMedia = styled.div.withConfig({
11
11
  displayName: "CardMedia__StyledCardMedia",
12
12
  componentId: "sc-kr8q9c-0"
13
- })(["display:flex;width:100%;&:last-child{margin-bottom:8px;}", ""], ({
13
+ })(["display:flex;width:auto;", ""], ({
14
14
  fullWidth
15
- }) => fullWidth ? css(["> *{width:calc(100% + ", " + ", ");margin-left:-", ";margin-right:-", ";}&:first-child{margin-top:-", ";img{border-top-right-radius:", ";border-top-left-radius:", ";}}"], spacings.left, spacings.right, spacings.left, spacings.right, spacings.top, border.type === 'border' && border.radius, border.type === 'border' && border.radius) : css(["> *{width:100%;}"]));
15
+ }) => fullWidth ? css(["> *{width:100%;}&:first-child{img{border-top-right-radius:", ";border-top-left-radius:", ";}}&:last-child{img{border-bottom-right-radius:", ";border-bottom-left-radius:", ";}}"], border.type === 'border' && border.radius, border.type === 'border' && border.radius, border.type === 'border' && border.radius, border.type === 'border' && border.radius) : css(["padding:0 ", " 0 ", ";&:first-child{padding:", " ", " 0 ", ";}&:last-child{padding:0 ", " ", " ", ";}> *{width:100%;}"], spacings.right, spacings.left, spacings.top, spacings.right, spacings.left, spacings.right, spacings.bottom, spacings.left));
16
16
  const CardMedia = /*#__PURE__*/forwardRef(function CardMedia({
17
17
  children,
18
18
  fullWidth = false,
@@ -1,15 +1,18 @@
1
1
  import { Card as Card$1 } from './Card.js';
2
2
  import { CardActions } from './CardActions.js';
3
+ import { CardContent } from './CardContent.js';
3
4
  import { CardMedia } from './CardMedia.js';
4
5
  import { CardHeader } from './CardHeader.js';
5
6
  import { CardHeaderTitle } from './CardHeaderTitle.js';
6
7
 
7
8
  const Card = Card$1;
8
9
  Card.Actions = CardActions;
10
+ Card.Content = CardContent;
9
11
  Card.Header = CardHeader;
10
12
  Card.Media = CardMedia;
11
13
  Card.HeaderTitle = CardHeaderTitle;
12
14
  Card.Actions.displayName = 'Card.Actions';
15
+ Card.Content.displayName = 'Card.Content';
13
16
  Card.Header.displayName = 'Card.Header';
14
17
  Card.Media.displayName = 'Card.Media';
15
18
  Card.HeaderTitle.displayName = 'Card.HeaderTitle';
@@ -26,13 +26,15 @@ const Input = styled.input.attrs(({
26
26
  })).withConfig({
27
27
  displayName: "Input",
28
28
  componentId: "sc-rqj7qf-1"
29
- })(["--scale:", ";appearance:none;width:100%;height:100%;margin:0;grid-area:input;transform:scale(var(--scale));cursor:", ";&:focus{outline:none;}&[data-focus-visible-added]:focus + svg{", "}&:not(:checked) ~ svg path[name='checked']{display:none;}&:not(:checked) ~ svg path[name='not-checked']{display:inline;}&:checked ~ svg path[name='not-checked']{display:none;}&:checked ~ svg path[name='checked']{display:inline;}"], ({
29
+ })(["--scale:", ";appearance:none;width:100%;height:100%;margin:0;grid-area:input;transform:scale(var(--scale));cursor:", ";&:focus{outline:none;}&[data-focus-visible-added]:focus + svg{", "}&:focus-visible + svg{", "}&:not(:checked) ~ svg path[name='checked']{display:none;}&:not(:checked) ~ svg path[name='not-checked']{display:inline;}&:checked ~ svg path[name='not-checked']{display:none;}&:checked ~ svg path[name='checked']{display:inline;}"], ({
30
30
  theme,
31
31
  iconSize
32
32
  }) => parseFloat(theme.clickbound.height) / iconSize, ({
33
33
  disabled
34
34
  }) => disabled ? 'not-allowed' : 'pointer', ({
35
35
  theme
36
+ }) => outlineTemplate(theme.states.focus.outline), ({
37
+ theme
36
38
  }) => outlineTemplate(theme.states.focus.outline));
37
39
  const Svg = styled.svg.attrs(({
38
40
  height,
@@ -87,7 +89,7 @@ const CheckboxInput = /*#__PURE__*/forwardRef(function CheckboxInput({
87
89
  }), indeterminate ? /*#__PURE__*/jsx(Svg, {
88
90
  width: iconSize,
89
91
  height: iconSize,
90
- viewBox: `0 0 ${iconSize} ${iconSize}`,
92
+ viewBox: "0 0 ".concat(iconSize, " ").concat(iconSize),
91
93
  fill: fill,
92
94
  "aria-hidden": true,
93
95
  children: /*#__PURE__*/jsx(StyledPath, {
@@ -97,7 +99,7 @@ const CheckboxInput = /*#__PURE__*/forwardRef(function CheckboxInput({
97
99
  }) : /*#__PURE__*/jsxs(Svg, {
98
100
  width: iconSize,
99
101
  height: iconSize,
100
- viewBox: `0 0 ${iconSize} ${iconSize}`,
102
+ viewBox: "0 0 ".concat(iconSize, " ").concat(iconSize),
101
103
  fill: fill,
102
104
  "aria-hidden": true,
103
105
  children: [/*#__PURE__*/jsx(StyledPath, {
@@ -28,7 +28,7 @@ const StyledChips = styled.div.attrs(({
28
28
  })).withConfig({
29
29
  displayName: "Chip__StyledChips",
30
30
  componentId: "sc-wzsllq-0"
31
- })(["background:", ";height:", ";width:fit-content;display:grid;grid-gap:8px;grid-auto-flow:column;grid-auto-columns:max-content;align-items:center;z-index:10;svg{fill:", ";}@media (hover:hover) and (pointer:fine){&:hover{color:", ";svg{fill:", ";}}}&:focus{outline:none;}&[data-focus-visible-added]:focus{", "}", " ", " ", " ", " ", " ", " ", " ", ""], background, height, typography.color, states.hover.typography.color, states.hover.typography.color, outlineTemplate(states.focus.outline), bordersTemplate(border), spacingsTemplate(spacings), typographyTemplate(typography), ({
31
+ })(["background:", ";height:", ";width:fit-content;display:grid;grid-gap:8px;grid-auto-flow:column;grid-auto-columns:max-content;align-items:center;z-index:10;svg{fill:", ";}@media (hover:hover) and (pointer:fine){&:hover{color:", ";svg{fill:", ";}}}&:focus{outline:none;}&[data-focus-visible-added]:focus{", "}&:focus-visible{", "}", " ", " ", " ", " ", " ", " ", " ", ""], background, height, typography.color, states.hover.typography.color, states.hover.typography.color, outlineTemplate(states.focus.outline), outlineTemplate(states.focus.outline), bordersTemplate(border), spacingsTemplate(spacings), typographyTemplate(typography), ({
32
32
  clickable
33
33
  }) => clickable && css(["@media (hover:hover) and (pointer:fine){&:hover{cursor:pointer;}}"]), ({
34
34
  variant
@@ -25,12 +25,12 @@ const dividerHeight = 1;
25
25
 
26
26
  const reduceByValue = subtractValue => valueWithUnit => {
27
27
  const valueAndUnit = valueWithUnit.split(/(\d+)/).filter(val => val.length > 0);
28
- return `${parseInt(valueAndUnit[0]) - subtractValue}` + valueAndUnit[1];
28
+ return "".concat(parseInt(valueAndUnit[0]) - subtractValue) + valueAndUnit[1];
29
29
  };
30
30
 
31
31
  const reduceValueByDividerHeight = reduceByValue(dividerHeight);
32
32
  const baseDivider = {
33
- height: `${dividerHeight}px`
33
+ height: "".concat(dividerHeight, "px")
34
34
  };
35
35
  const divider = {
36
36
  lighter: {
@@ -10,7 +10,7 @@ const customIcon = icon => ({
10
10
 
11
11
  const transform = ({
12
12
  rotation
13
- }) => rotation ? `transform: rotate(${rotation}deg)` : '';
13
+ }) => rotation ? "transform: rotate(".concat(rotation, "deg)") : '';
14
14
 
15
15
  const StyledSvg = styled.svg.attrs(({
16
16
  height,
@@ -19,8 +19,8 @@ const StyledSvg = styled.svg.attrs(({
19
19
  }) => ({
20
20
  name: null,
21
21
  xmlns: 'http://www.w3.org/2000/svg',
22
- height: `${height}px`,
23
- width: `${width}px`,
22
+ height: "".concat(height, "px"),
23
+ width: "".concat(width, "px"),
24
24
  fill
25
25
  })).withConfig({
26
26
  displayName: "Icon__StyledSvg",
@@ -33,7 +33,7 @@ const StyledPath = styled.path.attrs(({
33
33
  size: null,
34
34
  fillRule: 'evenodd',
35
35
  clipRule: 'evenodd',
36
- transform: size / height !== 1 ? `scale(${size / height})` : null
36
+ transform: size / height !== 1 ? "scale(".concat(size / height, ")") : null
37
37
  })).withConfig({
38
38
  displayName: "Icon__StyledPath",
39
39
  componentId: "sc-6evbi1-1"
@@ -54,14 +54,14 @@ const Icon = /*#__PURE__*/forwardRef(function Icon({
54
54
  } = data ? customIcon(data) : get(name);
55
55
 
56
56
  if (typeof icon === 'undefined') {
57
- throw Error(`Icon "${name}" not found. Have you added it using Icon.add() or using data props?`);
57
+ throw Error("Icon \"".concat(name, "\" not found. Have you added it using Icon.add() or using data props?"));
58
58
  }
59
59
 
60
60
  let svgProps = {
61
61
  height: size,
62
62
  width: size,
63
63
  fill: color,
64
- viewBox: `0 0 ${size} ${size}`,
64
+ viewBox: "0 0 ".concat(size, " ").concat(size),
65
65
  className,
66
66
  rotation,
67
67
  name,
@@ -77,7 +77,7 @@ const Icon = /*#__PURE__*/forwardRef(function Icon({
77
77
  let titleId = '';
78
78
 
79
79
  if (title) {
80
- titleId = `${icon.prefix}-${icon.name}-${count}`;
80
+ titleId = "".concat(icon.prefix, "-").concat(icon.name, "-").concat(count);
81
81
  svgProps = { ...svgProps,
82
82
  title,
83
83
  role: 'img',
@@ -1,5 +1,5 @@
1
1
  import { tokens as tokens$1 } from '@equinor/eds-tokens';
2
- import { mergeDeepRight } from 'ramda';
2
+ import mergeDeepRight_1 from '../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/mergeDeepRight.js';
3
3
 
4
4
  const {
5
5
  colors: {
@@ -93,7 +93,7 @@ const input = {
93
93
  }
94
94
  }
95
95
  };
96
- const error = mergeDeepRight(input, {
96
+ const error = mergeDeepRight_1(input, {
97
97
  boxShadow: 'inset 0px -1px 0px 0px transparent',
98
98
  states: {
99
99
  active: {
@@ -116,7 +116,7 @@ const error = mergeDeepRight(input, {
116
116
  }
117
117
  }
118
118
  });
119
- const warning = mergeDeepRight(input, {
119
+ const warning = mergeDeepRight_1(input, {
120
120
  boxShadow: 'inset 0px -1px 0px 0px transparent',
121
121
  states: {
122
122
  active: {
@@ -139,7 +139,7 @@ const warning = mergeDeepRight(input, {
139
139
  }
140
140
  }
141
141
  });
142
- const success = mergeDeepRight(input, {
142
+ const success = mergeDeepRight_1(input, {
143
143
  boxShadow: 'inset 0px -1px 0px 0px transparent',
144
144
  states: {
145
145
  active: {
@@ -22,8 +22,13 @@ const MenuProvider = ({
22
22
  };
23
23
 
24
24
  const setOnClose = onClose => {
25
+ const onCloseHelper = () => {
26
+ onClose();
27
+ setFocusedIndex(-1);
28
+ };
29
+
25
30
  setState(prevState => ({ ...prevState,
26
- onClose
31
+ onClose: onCloseHelper
27
32
  }));
28
33
  };
29
34
 
@@ -50,6 +50,12 @@ const MenuContainer = /*#__PURE__*/forwardRef(function MenuContainer({
50
50
  useGlobalKeyPress('Escape', () => {
51
51
  if (open && onClose !== null) {
52
52
  onClose();
53
+ anchorEl.focus();
54
+ }
55
+ });
56
+ useGlobalKeyPress('Enter', () => {
57
+ if (open && onClose !== null) {
58
+ if (window.document.contains(anchorEl)) anchorEl.focus();
53
59
  }
54
60
  });
55
61
  return /*#__PURE__*/jsx(MenuList, { ...rest,
@@ -21,21 +21,21 @@ const {
21
21
  icon
22
22
  }
23
23
  } = menu;
24
- const ListItem = styled.li.attrs(({
24
+ const Item = styled.button.attrs(({
25
25
  isFocused
26
26
  }) => ({
27
27
  role: 'menuitem',
28
28
  tabIndex: isFocused ? -1 : 0
29
29
  })).withConfig({
30
- displayName: "MenuItem__ListItem",
30
+ displayName: "MenuItem__Item",
31
31
  componentId: "sc-1g9fpbe-0"
32
- })(["width:auto;position:relative;z-index:2;", " ", " ", " ", ""], typographyTemplate(typography), ({
32
+ })(["border:0;background-color:transparent;width:auto;position:relative;z-index:2;", " ", " ", " ", ""], typographyTemplate(typography), ({
33
33
  theme
34
34
  }) => spacingsTemplate(theme.entities.item.spacings), ({
35
35
  active
36
36
  }) => active && css(["background:", ";*{color:", ";}"], activeToken.background, activeToken.typography.color), ({
37
37
  disabled
38
- }) => disabled ? css(["*{color:", ";}svg{fill:", ";}&:focus{outline:none;}@media (hover:hover) and (pointer:fine){&:hover{cursor:not-allowed;}}"], disabledToken.typography.color, icon.states.disabled.typography.color) : css(["@media (hover:hover) and (pointer:fine){&:hover{z-index:1;cursor:pointer;background:", ";}}&:focus{", "}"], hover.background, outlineTemplate(focus.outline)));
38
+ }) => disabled ? css(["*{color:", ";}svg{fill:", ";}&:focus{outline:none;}@media (hover:hover) and (pointer:fine){&:hover{cursor:not-allowed;}}"], disabledToken.typography.color, icon.states.disabled.typography.color) : css(["@media (hover:hover) and (pointer:fine){&:hover{z-index:1;cursor:pointer;background:", ";}}&:focus{z-index:3;", "}"], hover.background, outlineTemplate(focus.outline)));
39
39
  const Content = styled.div.withConfig({
40
40
  displayName: "MenuItem__Content",
41
41
  componentId: "sc-1g9fpbe-1"
@@ -64,7 +64,7 @@ const MenuItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function MenuItem({
64
64
  disabled,
65
65
  isFocused
66
66
  };
67
- return /*#__PURE__*/jsx(ListItem, { ...props,
67
+ return /*#__PURE__*/jsx(Item, { ...props,
68
68
  ref: useCombinedRefs(ref, el => {
69
69
  if (el !== null && isFocused) {
70
70
  el.focus();
@@ -72,7 +72,7 @@ const MenuItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function MenuItem({
72
72
  }),
73
73
  onFocus: () => toggleFocus(index),
74
74
  onClick: e => {
75
- if (!disabled && onClick) {
75
+ if (onClick) {
76
76
  onClick(e);
77
77
 
78
78
  if (onClose !== null) {
@@ -7,10 +7,10 @@ import { menu } from './Menu.tokens.js';
7
7
  import { jsx } from 'react/jsx-runtime';
8
8
  import { spacingsTemplate } from '../../utils/templates/index.js';
9
9
 
10
- const List = styled.ul.withConfig({
10
+ const List = styled.div.withConfig({
11
11
  displayName: "MenuList__List",
12
12
  componentId: "sc-104rzof-0"
13
- })(["position:relative;list-style:none;margin:0;", " li:first-child{z-index:3;}"], spacingsTemplate(menu.spacings));
13
+ })(["position:relative;list-style:none;display:flex;flex-direction:column;margin:0;", " li:first-child{z-index:3;}"], spacingsTemplate(menu.spacings));
14
14
 
15
15
  function isIndexable(item) {
16
16
  if ( /*#__PURE__*/isValidElement(item) && !item.props.disabled && item.type === MenuItem) return true;
@@ -6,10 +6,10 @@ import { spacingsTemplate } from '../../utils/templates/index.js';
6
6
  import { Divider } from '../Divider/Divider.js';
7
7
  import { Typography } from '../Typography/Typography.js';
8
8
 
9
- const ListItem = styled.li.attrs(() => ({
9
+ const Header = styled.div.attrs(() => ({
10
10
  tabIndex: 0
11
11
  })).withConfig({
12
- displayName: "MenuSection__ListItem",
12
+ displayName: "MenuSection__Header",
13
13
  componentId: "sc-gfcbvg-0"
14
14
  })(["", " &:focus{outline:none;}"], spacingsTemplate(menu.entities.title.spacings));
15
15
  const MenuSection = /*#__PURE__*/React.memo(function MenuSection(props) {
@@ -19,11 +19,11 @@ const MenuSection = /*#__PURE__*/React.memo(function MenuSection(props) {
19
19
  index
20
20
  } = props;
21
21
  return /*#__PURE__*/jsxs(Fragment, {
22
- children: [index !== 0 && /*#__PURE__*/jsx("li", {
22
+ children: [index !== 0 && /*#__PURE__*/jsx("div", {
23
23
  children: /*#__PURE__*/jsx(Divider, {
24
24
  variant: "small"
25
25
  })
26
- }), title && /*#__PURE__*/jsx(ListItem, {
26
+ }), title && /*#__PURE__*/jsx(Header, {
27
27
  children: /*#__PURE__*/jsx(Typography, {
28
28
  group: "navigation",
29
29
  variant: "label",