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

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 (93) hide show
  1. package/dist/core-react.cjs.js +1226 -933
  2. package/dist/esm/components/Accordion/Accordion.js +5 -4
  3. package/dist/esm/components/Accordion/AccordionHeader.js +14 -12
  4. package/dist/esm/components/Accordion/AccordionHeaderTitle.js +5 -3
  5. package/dist/esm/components/Accordion/AccordionItem.js +5 -4
  6. package/dist/esm/components/Accordion/AccordionPanel.js +7 -6
  7. package/dist/esm/components/Avatar/Avatar.js +10 -8
  8. package/dist/esm/components/Banner/Banner.js +10 -8
  9. package/dist/esm/components/Banner/BannerActions.js +6 -4
  10. package/dist/esm/components/Banner/BannerIcon.js +6 -4
  11. package/dist/esm/components/Banner/BannerMessage.js +6 -4
  12. package/dist/esm/components/Breadcrumbs/Breadcrumb.js +12 -7
  13. package/dist/esm/components/Breadcrumbs/Breadcrumbs.js +37 -25
  14. package/dist/esm/components/Button/Button.js +11 -3
  15. package/dist/esm/components/Button/InnerFullWidth.js +8 -4
  16. package/dist/esm/components/Card/Card.js +5 -4
  17. package/dist/esm/components/Card/CardActions.js +7 -3
  18. package/dist/esm/components/Card/CardHeader.js +4 -1
  19. package/dist/esm/components/Card/CardHeaderTitle.js +4 -1
  20. package/dist/esm/components/Card/CardMedia.js +4 -1
  21. package/dist/esm/components/Checkbox/Checkbox.js +13 -9
  22. package/dist/esm/components/Checkbox/Input.js +34 -27
  23. package/dist/esm/components/Chip/Chip.js +12 -11
  24. package/dist/esm/components/Dialog/Actions.js +6 -4
  25. package/dist/esm/components/Dialog/CustomContent.js +11 -7
  26. package/dist/esm/components/Dialog/Dialog.js +7 -6
  27. package/dist/esm/components/Dialog/Title.js +12 -8
  28. package/dist/esm/components/Divider/Divider.js +3 -3
  29. package/dist/esm/components/EdsProvider/eds.context.js +5 -3
  30. package/dist/esm/components/Icon/Icon.js +12 -8
  31. package/dist/esm/components/Input/Input.js +6 -3
  32. package/dist/esm/components/Label/Label.js +10 -4
  33. package/dist/esm/components/List/List.js +6 -4
  34. package/dist/esm/components/List/ListItem.js +5 -4
  35. package/dist/esm/components/Menu/Menu.context.js +5 -3
  36. package/dist/esm/components/Menu/Menu.js +20 -12
  37. package/dist/esm/components/Menu/MenuItem.js +7 -4
  38. package/dist/esm/components/Menu/MenuList.js +7 -6
  39. package/dist/esm/components/Menu/MenuSection.js +14 -6
  40. package/dist/esm/components/Pagination/Pagination.js +62 -51
  41. package/dist/esm/components/Pagination/PaginationItem.js +6 -4
  42. package/dist/esm/components/Paper/Paper.js +3 -3
  43. package/dist/esm/components/Popover/Popover.js +26 -21
  44. package/dist/esm/components/Popover/PopoverContent.js +4 -1
  45. package/dist/esm/components/Popover/PopoverTitle.js +8 -3
  46. package/dist/esm/components/Progress/Circular/CircularProgress.js +23 -22
  47. package/dist/esm/components/Progress/Dots/DotProgress.js +17 -16
  48. package/dist/esm/components/Progress/Linear/LinearProgress.js +7 -6
  49. package/dist/esm/components/Progress/Star/StarProgress.js +17 -16
  50. package/dist/esm/components/Radio/Radio.js +36 -28
  51. package/dist/esm/components/Scrim/Scrim.js +9 -6
  52. package/dist/esm/components/Search/Search.js +15 -11
  53. package/dist/esm/components/Select/MultiSelect/MultiSelect.js +64 -52
  54. package/dist/esm/components/Select/NativeSelect/NativeSelect.js +10 -3
  55. package/dist/esm/components/Select/SingleSelect/SingleSelect.js +56 -46
  56. package/dist/esm/components/SideSheet/SideSheet.js +19 -14
  57. package/dist/esm/components/Slider/MinMax.js +5 -3
  58. package/dist/esm/components/Slider/Output.js +5 -3
  59. package/dist/esm/components/Slider/Slider.js +92 -73
  60. package/dist/esm/components/Slider/SliderInput.js +3 -3
  61. package/dist/esm/components/Snackbar/Snackbar.js +8 -4
  62. package/dist/esm/components/Snackbar/SnackbarAction.js +4 -1
  63. package/dist/esm/components/Switch/Switch.js +27 -23
  64. package/dist/esm/components/Switch/SwitchDefault.js +13 -9
  65. package/dist/esm/components/Switch/SwitchSmall.js +11 -7
  66. package/dist/esm/components/Table/Body.js +8 -6
  67. package/dist/esm/components/Table/Caption.js +3 -3
  68. package/dist/esm/components/Table/Cell.js +20 -16
  69. package/dist/esm/components/Table/DataCell/DataCell.js +8 -6
  70. package/dist/esm/components/Table/Head/Head.js +8 -6
  71. package/dist/esm/components/Table/HeaderCell/HeaderCell.js +12 -8
  72. package/dist/esm/components/Table/Row/Row.js +5 -4
  73. package/dist/esm/components/Table/Table.js +5 -4
  74. package/dist/esm/components/TableOfContents/LinkItem.js +5 -4
  75. package/dist/esm/components/TableOfContents/TableOfContents.js +11 -6
  76. package/dist/esm/components/Tabs/Tab.js +5 -4
  77. package/dist/esm/components/Tabs/TabList.js +7 -6
  78. package/dist/esm/components/Tabs/TabPanel.js +6 -4
  79. package/dist/esm/components/Tabs/TabPanels.js +6 -4
  80. package/dist/esm/components/Tabs/Tabs.js +10 -9
  81. package/dist/esm/components/TextField/Field.js +17 -9
  82. package/dist/esm/components/TextField/HelperText/HelperText.js +18 -15
  83. package/dist/esm/components/TextField/Icon/Icon.js +7 -4
  84. package/dist/esm/components/TextField/TextField.context.js +5 -3
  85. package/dist/esm/components/TextField/TextField.js +12 -3
  86. package/dist/esm/components/Textarea/Textarea.js +3 -1
  87. package/dist/esm/components/Tooltip/Tooltip.js +21 -15
  88. package/dist/esm/components/TopBar/Actions.js +6 -4
  89. package/dist/esm/components/TopBar/CustomContent.js +6 -4
  90. package/dist/esm/components/TopBar/Header.js +6 -4
  91. package/dist/esm/components/TopBar/TopBar.js +5 -4
  92. package/dist/esm/components/Typography/Typography.js +6 -4
  93. package/package.json +1 -1
@@ -1,4 +1,3 @@
1
- import _extends from '@babel/runtime/helpers/extends';
2
1
  import { forwardRef, useState, useLayoutEffect } from 'react';
3
2
  import styled from 'styled-components';
4
3
  import { Icon } from '../Icon/index.js';
@@ -6,6 +5,7 @@ import { PaginationItem } from './PaginationItem.js';
6
5
  import { pagination } from './Pagination.tokens.js';
7
6
  import { chevron_left, chevron_right, more_horizontal } from '@equinor/eds-icons';
8
7
  import { PaginationControl } from './paginationControl.js';
8
+ import { jsx, jsxs } from 'react/jsx-runtime';
9
9
  import { useIsMounted } from '../../hooks/useMountedRef.js';
10
10
  import { Typography } from '../Typography/Typography.js';
11
11
  import { Button } from '../Button/Button.js';
@@ -89,60 +89,71 @@ const Pagination = /*#__PURE__*/forwardRef(function Pagination({
89
89
  withItemIndicator,
90
90
  ...rest
91
91
  };
92
- const pagination = /*#__PURE__*/React.createElement(Navigation, _extends({
93
- "aria-label": "pagination"
94
- }, props), /*#__PURE__*/React.createElement(OrderedList, {
95
- style: {
96
- gridTemplateColumns: `repeat(${columns}, 48px)`
97
- }
98
- }, /*#__PURE__*/React.createElement(ListItem, {
99
- key: "previous"
100
- }, /*#__PURE__*/React.createElement(Button, {
101
- variant: "ghost_icon",
102
- onClick: activePage > 1 ? event => {
103
- onPageChange(event, activePage - 1);
104
- } : undefined,
105
- disabled: activePage === 1,
106
- "aria-label": "Go to previous page"
107
- }, /*#__PURE__*/React.createElement(Icon, {
108
- name: "chevron_left"
109
- }))), items.length > 0 ? items.map((page, index) => page !== 'ELLIPSIS' ?
110
- /*#__PURE__*/
111
- // eslint-disable-next-line react/no-array-index-key
112
- React.createElement(ListItem, {
113
- key: `list-item ${index}`
114
- }, /*#__PURE__*/React.createElement(PaginationItem, _extends({}, page, {
115
- "aria-label": getAriaLabel(page, activePage),
116
- "aria-current": activePage,
117
- page: page,
118
- selected: page === activePage,
119
- onClick: event => {
120
- onPageChange(event, page);
121
- }
122
- }))) : /*#__PURE__*/React.createElement(ListItem // eslint-disable-next-line react/no-array-index-key
123
- , {
124
- key: `ellipsis-${index}`
125
- }, /*#__PURE__*/React.createElement(StyledIcon, {
126
- name: "more_horizontal",
127
- "aria-label": "Ellipsis of pages"
128
- }))) : undefined, /*#__PURE__*/React.createElement(ListItem, {
129
- key: "next"
130
- }, /*#__PURE__*/React.createElement(Button, {
131
- variant: "ghost_icon",
132
- onClick: activePage < pages ? event => {
133
- onPageChange(event, activePage + 1);
134
- } : undefined,
135
- "aria-label": "Go to next page",
136
- disabled: activePage === pages
137
- }, /*#__PURE__*/React.createElement(Icon, {
138
- name: "chevron_right"
139
- })))));
140
- return withItemIndicator ? /*#__PURE__*/React.createElement(FlexContainer, null, /*#__PURE__*/React.createElement(Text, null, currentItemFirst !== currentItemLast ? `${currentItemFirst}
92
+
93
+ const pagination = /*#__PURE__*/jsx(Navigation, {
94
+ "aria-label": "pagination",
95
+ ...props,
96
+ children: /*#__PURE__*/jsxs(OrderedList, {
97
+ style: {
98
+ gridTemplateColumns: `repeat(${columns}, 48px)`
99
+ },
100
+ children: [/*#__PURE__*/jsx(ListItem, {
101
+ children: /*#__PURE__*/jsx(Button, {
102
+ variant: "ghost_icon",
103
+ onClick: activePage > 1 ? event => {
104
+ onPageChange(event, activePage - 1);
105
+ } : undefined,
106
+ disabled: activePage === 1,
107
+ "aria-label": "Go to previous page",
108
+ children: /*#__PURE__*/jsx(Icon, {
109
+ name: "chevron_left"
110
+ })
111
+ })
112
+ }, "previous"), items.length > 0 ? items.map((page, index) => page !== 'ELLIPSIS' ?
113
+ /*#__PURE__*/
114
+ // eslint-disable-next-line react/no-array-index-key
115
+ jsx(ListItem, {
116
+ children: /*#__PURE__*/jsx(PaginationItem, { ...page,
117
+ "aria-label": getAriaLabel(page, activePage),
118
+ "aria-current": activePage,
119
+ page: page,
120
+ selected: page === activePage,
121
+ onClick: event => {
122
+ onPageChange(event, page);
123
+ }
124
+ })
125
+ }, `list-item ${index}`) : /*#__PURE__*/jsx(ListItem // eslint-disable-next-line react/no-array-index-key
126
+ , {
127
+ children: /*#__PURE__*/jsx(StyledIcon, {
128
+ name: "more_horizontal",
129
+ "aria-label": "Ellipsis of pages"
130
+ })
131
+ }, `ellipsis-${index}`)) : undefined, /*#__PURE__*/jsx(ListItem, {
132
+ children: /*#__PURE__*/jsx(Button, {
133
+ variant: "ghost_icon",
134
+ onClick: activePage < pages ? event => {
135
+ onPageChange(event, activePage + 1);
136
+ } : undefined,
137
+ "aria-label": "Go to next page",
138
+ disabled: activePage === pages,
139
+ children: /*#__PURE__*/jsx(Icon, {
140
+ name: "chevron_right"
141
+ })
142
+ })
143
+ }, "next")]
144
+ })
145
+ });
146
+
147
+ return withItemIndicator ? /*#__PURE__*/jsxs(FlexContainer, {
148
+ children: [/*#__PURE__*/jsx(Text, {
149
+ children: currentItemFirst !== currentItemLast ? `${currentItemFirst}
141
150
  ${' - '}
142
151
  ${currentItemLast}
143
152
  ${' of '}
144
153
  ${totalItems}
145
- ${' items'}` : `${currentItemFirst} ${' of '} ${totalItems} ${' items'}`), pagination) : pagination;
154
+ ${' items'}` : `${currentItemFirst} ${' of '} ${totalItems} ${' items'}`
155
+ }), pagination]
156
+ }) : pagination;
146
157
  });
147
158
 
148
159
  export { Pagination };
@@ -1,6 +1,6 @@
1
- import _extends from '@babel/runtime/helpers/extends';
2
1
  import { forwardRef } from 'react';
3
2
  import { pagination } from './Pagination.tokens.js';
3
+ import { jsx } from 'react/jsx-runtime';
4
4
  import { Button } from '../Button/Button.js';
5
5
 
6
6
  const PaginationItem = /*#__PURE__*/forwardRef(function PaginationItem({
@@ -16,13 +16,15 @@ const PaginationItem = /*#__PURE__*/forwardRef(function PaginationItem({
16
16
  ...rest
17
17
  };
18
18
  const background = selected ? pagination.entities.item.states.active.background : null;
19
- return /*#__PURE__*/React.createElement(Button, _extends({
19
+ return /*#__PURE__*/jsx(Button, {
20
20
  style: {
21
21
  background
22
22
  },
23
23
  variant: "ghost_icon",
24
- onClick: onClick ? onClick : undefined
25
- }, props), page);
24
+ onClick: onClick ? onClick : undefined,
25
+ ...props,
26
+ children: page
27
+ });
26
28
  });
27
29
 
28
30
  export { PaginationItem };
@@ -1,7 +1,7 @@
1
- import _extends from '@babel/runtime/helpers/extends';
2
1
  import { forwardRef } from 'react';
3
2
  import styled from 'styled-components';
4
3
  import { paper, elevation } from './Paper.tokens.js';
4
+ import { jsx } from 'react/jsx-runtime';
5
5
 
6
6
  const StyledPaper = styled.div.withConfig({
7
7
  displayName: "Paper__StyledPaper",
@@ -16,9 +16,9 @@ const Paper = /*#__PURE__*/forwardRef(function Paper({
16
16
  const props = { ...rest,
17
17
  elevation: elevation[elevation$1] || 'none'
18
18
  };
19
- return /*#__PURE__*/React.createElement(StyledPaper, _extends({}, props, {
19
+ return /*#__PURE__*/jsx(StyledPaper, { ...props,
20
20
  ref: ref
21
- }));
21
+ });
22
22
  });
23
23
 
24
24
  export { Paper };
@@ -1,9 +1,9 @@
1
- import _extends from '@babel/runtime/helpers/extends';
2
1
  import { forwardRef, useState } from 'react';
3
2
  import styled, { css } from 'styled-components';
4
3
  import { Icon } from '../Icon/index.js';
5
4
  import { close } from '@equinor/eds-icons';
6
5
  import { popover } from './Popover.tokens.js';
6
+ import { jsxs, jsx } from 'react/jsx-runtime';
7
7
  import { useCombinedRefs } from '../../hooks/useCombinedRefs.js';
8
8
  import { useOutsideClick } from '../../hooks/useOutsideClick.js';
9
9
  import { useGlobalKeyPress } from '../../hooks/useGlobalKeyPress.js';
@@ -63,29 +63,34 @@ const Popover = /*#__PURE__*/forwardRef(function Popover({
63
63
  ...rest,
64
64
  ...attributes.popper
65
65
  };
66
- return /*#__PURE__*/React.createElement(PopoverPaper, _extends({
66
+ return /*#__PURE__*/jsxs(PopoverPaper, {
67
67
  ref: popoverRef,
68
68
  elevation: "overlay",
69
69
  style: styles.popper,
70
- "data-testid": "popover"
71
- }, props), /*#__PURE__*/React.createElement(ArrowWrapper, {
72
- ref: setArrowRef,
73
- style: styles.arrow,
74
- className: "arrow"
75
- }, /*#__PURE__*/React.createElement(PopoverArrow, {
76
- className: "arrowSvg"
77
- }, /*#__PURE__*/React.createElement("path", {
78
- d: "M0.504838 4.86885C-0.168399 4.48524 -0.168399 3.51476 0.504838 3.13115L6 8.59227e-08L6 8L0.504838 4.86885Z"
79
- }))), children, /*#__PURE__*/React.createElement(StyledCloseButton, {
80
- onClick: onClose,
81
- variant: "ghost_icon",
82
- "data-testid": "popover-close",
83
- "aria-label": "Close popover"
84
- }, /*#__PURE__*/React.createElement(Icon, {
85
- name: "close",
86
- data: close,
87
- size: 24
88
- })));
70
+ "data-testid": "popover",
71
+ ...props,
72
+ children: [/*#__PURE__*/jsx(ArrowWrapper, {
73
+ ref: setArrowRef,
74
+ style: styles.arrow,
75
+ className: "arrow",
76
+ children: /*#__PURE__*/jsx(PopoverArrow, {
77
+ className: "arrowSvg",
78
+ children: /*#__PURE__*/jsx("path", {
79
+ d: "M0.504838 4.86885C-0.168399 4.48524 -0.168399 3.51476 0.504838 3.13115L6 8.59227e-08L6 8L0.504838 4.86885Z"
80
+ })
81
+ })
82
+ }), children, /*#__PURE__*/jsx(StyledCloseButton, {
83
+ onClick: onClose,
84
+ variant: "ghost_icon",
85
+ "data-testid": "popover-close",
86
+ "aria-label": "Close popover",
87
+ children: /*#__PURE__*/jsx(Icon, {
88
+ name: "close",
89
+ data: close,
90
+ size: 24
91
+ })
92
+ })]
93
+ });
89
94
  });
90
95
 
91
96
  export { Popover };
@@ -1,5 +1,6 @@
1
1
  import { forwardRef } from 'react';
2
2
  import styled from 'styled-components';
3
+ import { jsx } from 'react/jsx-runtime';
3
4
 
4
5
  const ContentWrapper = styled.div.withConfig({
5
6
  displayName: "PopoverContent__ContentWrapper",
@@ -12,7 +13,9 @@ const PopoverContent = /*#__PURE__*/forwardRef(function PopoverContent({
12
13
  const props = { ...rest,
13
14
  ref
14
15
  };
15
- return /*#__PURE__*/React.createElement(ContentWrapper, props, children);
16
+ return /*#__PURE__*/jsx(ContentWrapper, { ...props,
17
+ children: children
18
+ });
16
19
  }); // PopoverContent.displayName = 'eds-popover-content'
17
20
 
18
21
  export { PopoverContent };
@@ -1,6 +1,7 @@
1
1
  import { forwardRef } from 'react';
2
2
  import styled from 'styled-components';
3
3
  import { popover } from './Popover.tokens.js';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
4
5
  import { Divider } from '../Divider/Divider.js';
5
6
 
6
7
  const StyledPopoverTitle = styled.div.withConfig({
@@ -18,9 +19,13 @@ const PopoverTitle = /*#__PURE__*/forwardRef(function PopoverTitle({
18
19
  const props = { ...rest,
19
20
  ref
20
21
  };
21
- return /*#__PURE__*/React.createElement("div", props, /*#__PURE__*/React.createElement(StyledPopoverTitle, null, children), /*#__PURE__*/React.createElement(StyledDivider, {
22
- variant: "small"
23
- }));
22
+ return /*#__PURE__*/jsxs("div", { ...props,
23
+ children: [/*#__PURE__*/jsx(StyledPopoverTitle, {
24
+ children: children
25
+ }), /*#__PURE__*/jsx(StyledDivider, {
26
+ variant: "small"
27
+ })]
28
+ });
24
29
  });
25
30
 
26
31
  export { PopoverTitle };
@@ -1,7 +1,7 @@
1
- import _extends from '@babel/runtime/helpers/extends';
2
1
  import { forwardRef } from 'react';
3
2
  import styled, { keyframes, css } from 'styled-components';
4
3
  import * as CircularProgress_tokens from './CircularProgress.tokens.js';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
5
 
6
6
  const indeterminate = keyframes(["100%{transform:rotate(360deg);}"]);
7
7
  const Svg = styled.svg.withConfig({
@@ -63,31 +63,32 @@ const CircularProgress = /*#__PURE__*/forwardRef(function CircularProgress({
63
63
  }
64
64
  }
65
65
 
66
- return /*#__PURE__*/React.createElement(Svg, _extends({}, props, {
66
+ return /*#__PURE__*/jsxs(Svg, { ...props,
67
67
  viewBox: "24 24 48 48",
68
68
  role: "progressbar",
69
69
  height: size,
70
70
  width: size,
71
- preserveAspectRatio: "xMidYMid meet"
72
- }), /*#__PURE__*/React.createElement(TrackCircle, {
73
- style: trackStyle,
74
- cx: 48,
75
- cy: 48,
76
- r: (48 - thickness) / 2,
77
- fill: "none",
78
- strokeWidth: thickness,
79
- stroke: token.background
80
- }), /*#__PURE__*/React.createElement(ProgressCircle, {
81
- style: trackStyle,
82
- cx: 48,
83
- cy: 48,
84
- r: (48 - thickness) / 2,
85
- fill: "none",
86
- strokeLinecap: "round",
87
- strokeWidth: thickness,
88
- strokeDasharray: variant === 'determinate' ? circumference : 48,
89
- stroke: token.entities.progress.background
90
- }));
71
+ preserveAspectRatio: "xMidYMid meet",
72
+ children: [/*#__PURE__*/jsx(TrackCircle, {
73
+ style: trackStyle,
74
+ cx: 48,
75
+ cy: 48,
76
+ r: (48 - thickness) / 2,
77
+ fill: "none",
78
+ strokeWidth: thickness,
79
+ stroke: token.background
80
+ }), /*#__PURE__*/jsx(ProgressCircle, {
81
+ style: trackStyle,
82
+ cx: 48,
83
+ cy: 48,
84
+ r: (48 - thickness) / 2,
85
+ fill: "none",
86
+ strokeLinecap: "round",
87
+ strokeWidth: thickness,
88
+ strokeDasharray: variant === 'determinate' ? circumference : 48,
89
+ stroke: token.entities.progress.background
90
+ })]
91
+ });
91
92
  }); // CircularProgress.displayName = 'eds-circular-progress'
92
93
 
93
94
  export { CircularProgress };
@@ -1,7 +1,7 @@
1
- import _extends from '@babel/runtime/helpers/extends';
2
1
  import { forwardRef } from 'react';
3
2
  import styled, { keyframes } from 'styled-components';
4
3
  import * as DotProgress_tokens from './DotProgress.tokens.js';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
5
 
6
6
  const opacity = keyframes(["0%{opacity:1;}100%{opacity:0.5;}"]);
7
7
  const Svg = styled.svg.withConfig({
@@ -30,25 +30,26 @@ const DotProgress = /*#__PURE__*/forwardRef(function DotProgress({
30
30
  };
31
31
  const height = size / 4;
32
32
  const width = size;
33
- return /*#__PURE__*/React.createElement(Svg, _extends({}, props, {
33
+ return /*#__PURE__*/jsxs(Svg, { ...props,
34
34
  role: "progressbar",
35
35
  viewBox: "0 0 16 4",
36
36
  height: height,
37
37
  width: width,
38
- preserveAspectRatio: "xMidYMid meet"
39
- }), /*#__PURE__*/React.createElement("circle", {
40
- cx: 2,
41
- cy: 2,
42
- r: 2
43
- }), /*#__PURE__*/React.createElement("circle", {
44
- cx: 8,
45
- cy: 2,
46
- r: 2
47
- }), /*#__PURE__*/React.createElement("circle", {
48
- cx: 14,
49
- cy: 2,
50
- r: 2
51
- }));
38
+ preserveAspectRatio: "xMidYMid meet",
39
+ children: [/*#__PURE__*/jsx("circle", {
40
+ cx: 2,
41
+ cy: 2,
42
+ r: 2
43
+ }), /*#__PURE__*/jsx("circle", {
44
+ cx: 8,
45
+ cy: 2,
46
+ r: 2
47
+ }), /*#__PURE__*/jsx("circle", {
48
+ cx: 14,
49
+ cy: 2,
50
+ r: 2
51
+ })]
52
+ });
52
53
  });
53
54
 
54
55
  export { DotProgress };
@@ -1,7 +1,7 @@
1
- import _extends from '@babel/runtime/helpers/extends';
2
1
  import { forwardRef } from 'react';
3
2
  import styled, { keyframes } from 'styled-components';
4
3
  import { primary } from './LinearProgress.tokens.js';
4
+ import { jsx } from 'react/jsx-runtime';
5
5
 
6
6
  const indeterminate = keyframes(["0%{left:-200%;right:100%;}60%{left:107%;right:-8%;}100%{left:107%;right:-8%;}"]);
7
7
  const Track = styled.div.withConfig({
@@ -39,11 +39,12 @@ const LinearProgress = /*#__PURE__*/forwardRef(function LinearProgress({
39
39
  const transformStyle = {
40
40
  transform: barStyle
41
41
  };
42
- return /*#__PURE__*/React.createElement(Track, _extends({}, props, {
43
- role: "progressbar"
44
- }), variant === 'indeterminate' ? /*#__PURE__*/React.createElement(IndeterminateProgressBar, null) : /*#__PURE__*/React.createElement(ProgressBar, {
45
- style: transformStyle
46
- }));
42
+ return /*#__PURE__*/jsx(Track, { ...props,
43
+ role: "progressbar",
44
+ children: variant === 'indeterminate' ? /*#__PURE__*/jsx(IndeterminateProgressBar, {}) : /*#__PURE__*/jsx(ProgressBar, {
45
+ style: transformStyle
46
+ })
47
+ });
47
48
  }); // LinearProgress.displayName = 'eds-linear-progress'
48
49
 
49
50
  export { LinearProgress };
@@ -1,7 +1,7 @@
1
- import _extends from '@babel/runtime/helpers/extends';
2
1
  import { forwardRef } from 'react';
3
2
  import styled, { keyframes, css } from 'styled-components';
4
3
  import { token } from './StarProgress.tokens.js';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
5
 
6
6
  const indeterminate = keyframes(["0%{opacity:1;}20%{opacity:0.8;}40%{opacity:0.6;}60%{opacity:0.4;}80%{opacity:0.2;}100%{opacity:0.05;}"]);
7
7
  const determinate = keyframes(["0%{opacity:0;}10%{opacity:0.05;}20%{opacity:0.2;}40%{opacity:0.4;}60%{opacity:0.6;}80%{opacity:0.8;}100%{opacity:1;}"]);
@@ -35,27 +35,28 @@ const StarProgress = /*#__PURE__*/forwardRef(function StarProgress({
35
35
  }
36
36
  }
37
37
 
38
- return /*#__PURE__*/React.createElement(Svg, _extends({}, props, {
38
+ return /*#__PURE__*/jsxs(Svg, { ...props,
39
39
  role: "progressbar",
40
40
  width: width,
41
41
  height: height,
42
42
  viewBox: "0 0 40 48",
43
43
  fill: "none",
44
44
  xmlns: "http://www.w3.org/2000/svg",
45
- preserveAspectRatio: "xMidYMid meet"
46
- }), /*#__PURE__*/React.createElement("path", {
47
- d: "M32.756 34.6798L29.482 36.5817C29.4139 36.6219 29.3295 36.6227 29.2606 36.5829L25.9476 34.7151C25.7975 34.6306 25.7967 34.4149 25.9456 34.3284L29.2397 32.4256C29.3077 32.3858 29.3914 32.3858 29.4603 32.4248L32.754 34.2931C32.9033 34.3784 32.9041 34.5929 32.756 34.6798Z"
48
- }), /*#__PURE__*/React.createElement("path", {
49
- d: "M25.9596 45.4706L22.6655 43.5867C22.5966 43.5469 22.554 43.4744 22.554 43.396V41.4289V39.5922C22.5519 39.4204 22.7381 39.3109 22.8878 39.397L26.1819 41.2981C26.25 41.3379 26.2926 41.4104 26.2934 41.4896V43.4268V45.2762C26.2947 45.4472 26.1085 45.5559 25.9596 45.4706Z"
50
- }), /*#__PURE__*/React.createElement("path", {
51
- d: "M12.3022 47.7037V44.9795V42.6544C12.3022 42.5495 12.3576 42.4515 12.4482 42.3986L14.1262 41.4062L16.8143 39.8188C17.0119 39.7019 17.2617 39.8442 17.2625 40.0739L17.2633 42.7627V45.1456C17.2633 45.251 17.2079 45.3486 17.1165 45.4015L12.7496 47.9587C12.552 48.0748 12.3031 47.9325 12.3022 47.7037Z"
52
- }), /*#__PURE__*/React.createElement("path", {
53
- d: "M0.221343 34.2106L6.76939 30.4056C6.90636 30.326 7.07449 30.3256 7.21227 30.4023L13.8378 34.1401C14.138 34.3095 14.14 34.7413 13.8415 34.9131L7.25492 38.7182C7.11795 38.7977 6.94941 38.7985 6.81204 38.7206L0.225854 34.9836C-0.0734986 34.8139 -0.075549 34.3833 0.221343 34.2106Z"
54
- }), /*#__PURE__*/React.createElement("path", {
55
- d: "M6.03876 9.125L16.9237 15.5151C17.1513 15.6484 17.2903 15.8912 17.2903 16.1549V28.8331C17.2903 29.4076 16.665 29.7647 16.1704 29.4728L5.28546 23.0264C5.05869 22.8919 4.92008 22.6479 4.9209 22.3855V9.76307C4.92254 9.1902 5.54503 8.83467 6.03876 9.125Z"
56
- }), /*#__PURE__*/React.createElement("path", {
57
- d: "M39.6262 1.07261V11.7603V19.3368C39.627 19.7178 39.4265 20.0709 39.0988 20.2644L31.4145 24.8195L23.3545 29.5964C22.6385 30.0192 21.7339 29.5029 21.7339 28.6717V10.3259C21.7339 9.94495 21.9356 9.5927 22.2641 9.39955L38.008 0.149533C38.7232 -0.270381 39.6241 0.24385 39.6262 1.07261Z"
58
- }));
45
+ preserveAspectRatio: "xMidYMid meet",
46
+ children: [/*#__PURE__*/jsx("path", {
47
+ d: "M32.756 34.6798L29.482 36.5817C29.4139 36.6219 29.3295 36.6227 29.2606 36.5829L25.9476 34.7151C25.7975 34.6306 25.7967 34.4149 25.9456 34.3284L29.2397 32.4256C29.3077 32.3858 29.3914 32.3858 29.4603 32.4248L32.754 34.2931C32.9033 34.3784 32.9041 34.5929 32.756 34.6798Z"
48
+ }), /*#__PURE__*/jsx("path", {
49
+ d: "M25.9596 45.4706L22.6655 43.5867C22.5966 43.5469 22.554 43.4744 22.554 43.396V41.4289V39.5922C22.5519 39.4204 22.7381 39.3109 22.8878 39.397L26.1819 41.2981C26.25 41.3379 26.2926 41.4104 26.2934 41.4896V43.4268V45.2762C26.2947 45.4472 26.1085 45.5559 25.9596 45.4706Z"
50
+ }), /*#__PURE__*/jsx("path", {
51
+ d: "M12.3022 47.7037V44.9795V42.6544C12.3022 42.5495 12.3576 42.4515 12.4482 42.3986L14.1262 41.4062L16.8143 39.8188C17.0119 39.7019 17.2617 39.8442 17.2625 40.0739L17.2633 42.7627V45.1456C17.2633 45.251 17.2079 45.3486 17.1165 45.4015L12.7496 47.9587C12.552 48.0748 12.3031 47.9325 12.3022 47.7037Z"
52
+ }), /*#__PURE__*/jsx("path", {
53
+ d: "M0.221343 34.2106L6.76939 30.4056C6.90636 30.326 7.07449 30.3256 7.21227 30.4023L13.8378 34.1401C14.138 34.3095 14.14 34.7413 13.8415 34.9131L7.25492 38.7182C7.11795 38.7977 6.94941 38.7985 6.81204 38.7206L0.225854 34.9836C-0.0734986 34.8139 -0.075549 34.3833 0.221343 34.2106Z"
54
+ }), /*#__PURE__*/jsx("path", {
55
+ d: "M6.03876 9.125L16.9237 15.5151C17.1513 15.6484 17.2903 15.8912 17.2903 16.1549V28.8331C17.2903 29.4076 16.665 29.7647 16.1704 29.4728L5.28546 23.0264C5.05869 22.8919 4.92008 22.6479 4.9209 22.3855V9.76307C4.92254 9.1902 5.54503 8.83467 6.03876 9.125Z"
56
+ }), /*#__PURE__*/jsx("path", {
57
+ d: "M39.6262 1.07261V11.7603V19.3368C39.627 19.7178 39.4265 20.0709 39.0988 20.2644L31.4145 24.8195L23.3545 29.5964C22.6385 30.0192 21.7339 29.5029 21.7339 28.6717V10.3259C21.7339 9.94495 21.9356 9.5927 22.2641 9.39955L38.008 0.149533C38.7232 -0.270381 39.6241 0.24385 39.6262 1.07261Z"
58
+ })]
59
+ });
59
60
  }); // StarProgress.displayName = 'eds-star-progress'
60
61
 
61
62
  export { StarProgress };
@@ -1,13 +1,14 @@
1
- import _extends from '@babel/runtime/helpers/extends';
2
1
  import { forwardRef, useMemo } from 'react';
3
2
  import styled, { ThemeProvider } from 'styled-components';
4
3
  import { radio_button_selected, radio_button_unselected } from '@equinor/eds-icons';
5
4
  import { comfortable } from './Radio.tokens.js';
5
+ import { jsxs, jsx } from 'react/jsx-runtime';
6
6
  import { outlineTemplate } from '../../utils/templates/focus.js';
7
7
  import { typographyTemplate, spacingsTemplate } from '../../utils/templates/index.js';
8
8
  import { useEds } from '../EdsProvider/eds.context.js';
9
9
  import { useToken } from '../../hooks/useToken.js';
10
10
 
11
+ /* eslint camelcase: "off" */
11
12
  const Input = styled.input.attrs(({
12
13
  type = 'radio'
13
14
  }) => ({
@@ -82,38 +83,45 @@ const Radio = /*#__PURE__*/forwardRef(function Radio({
82
83
  const iconSize = 24;
83
84
  const fill = disabled ? comfortable.states.disabled.background : comfortable.background;
84
85
  const renderSVG = useMemo(() => {
85
- return /*#__PURE__*/React.createElement(Svg, {
86
+ return /*#__PURE__*/jsxs(Svg, {
86
87
  width: iconSize,
87
88
  height: iconSize,
88
89
  viewBox: `0 0 ${iconSize} ${iconSize}`,
89
90
  fill: fill,
90
- "aria-hidden": true
91
- }, /*#__PURE__*/React.createElement(StyledPath, {
92
- icon: radio_button_selected,
93
- name: "selected"
94
- }), /*#__PURE__*/React.createElement(StyledPath, {
95
- icon: radio_button_unselected,
96
- name: "unselected"
97
- }));
91
+ "aria-hidden": true,
92
+ children: [/*#__PURE__*/jsx(StyledPath, {
93
+ icon: radio_button_selected,
94
+ name: "selected"
95
+ }), /*#__PURE__*/jsx(StyledPath, {
96
+ icon: radio_button_unselected,
97
+ name: "unselected"
98
+ })]
99
+ });
98
100
  }, [fill]);
99
- return /*#__PURE__*/React.createElement(ThemeProvider, {
100
- theme: token
101
- }, label ? /*#__PURE__*/React.createElement(StyledLabel, {
102
- disabled: disabled,
103
- className: className
104
- }, /*#__PURE__*/React.createElement(InputWrapper, {
105
- disabled: disabled
106
- }, /*#__PURE__*/React.createElement(Input, _extends({}, rest, {
107
- ref: ref,
108
- disabled: disabled,
109
- iconSize: iconSize
110
- })), renderSVG), /*#__PURE__*/React.createElement(LabelText, null, label)) : /*#__PURE__*/React.createElement(InputWrapper, {
111
- disabled: disabled
112
- }, /*#__PURE__*/React.createElement(Input, _extends({}, rest, {
113
- ref: ref,
114
- disabled: disabled,
115
- iconSize: iconSize
116
- })), renderSVG));
101
+ return /*#__PURE__*/jsx(ThemeProvider, {
102
+ theme: token,
103
+ children: label ? /*#__PURE__*/jsxs(StyledLabel, {
104
+ disabled: disabled,
105
+ className: className,
106
+ children: [/*#__PURE__*/jsxs(InputWrapper, {
107
+ disabled: disabled,
108
+ children: [/*#__PURE__*/jsx(Input, { ...rest,
109
+ ref: ref,
110
+ disabled: disabled,
111
+ iconSize: iconSize
112
+ }), renderSVG]
113
+ }), /*#__PURE__*/jsx(LabelText, {
114
+ children: label
115
+ })]
116
+ }) : /*#__PURE__*/jsxs(InputWrapper, {
117
+ disabled: disabled,
118
+ children: [/*#__PURE__*/jsx(Input, { ...rest,
119
+ ref: ref,
120
+ disabled: disabled,
121
+ iconSize: iconSize
122
+ }), renderSVG]
123
+ })
124
+ });
117
125
  });
118
126
  Radio.displayName = 'Radio';
119
127
 
@@ -1,7 +1,7 @@
1
- import _extends from '@babel/runtime/helpers/extends';
2
1
  import { forwardRef } from 'react';
3
2
  import styled from 'styled-components';
4
3
  import { scrim } from './Scrim.tokens.js';
4
+ import { jsx } from 'react/jsx-runtime';
5
5
  import { useHideBodyScroll } from '../../hooks/useHideBodyScroll.js';
6
6
  import { useGlobalKeyPress } from '../../hooks/useGlobalKeyPress.js';
7
7
 
@@ -49,11 +49,14 @@ const Scrim = /*#__PURE__*/forwardRef(function Scrim({
49
49
  event.stopPropagation();
50
50
  };
51
51
 
52
- return /*#__PURE__*/React.createElement(StyledScrim, _extends({
53
- onClick: handleMouseClose
54
- }, props), /*#__PURE__*/React.createElement(ScrimContent, {
55
- onClick: handleContentClick
56
- }, children));
52
+ return /*#__PURE__*/jsx(StyledScrim, {
53
+ onClick: handleMouseClose,
54
+ ...props,
55
+ children: /*#__PURE__*/jsx(ScrimContent, {
56
+ onClick: handleContentClick,
57
+ children: children
58
+ })
59
+ });
57
60
  });
58
61
 
59
62
  export { Scrim };