@equinor/eds-core-react 0.19.0 → 0.20.0

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 (80) hide show
  1. package/README.md +18 -19
  2. package/dist/eds-core-react.cjs.js +1011 -347
  3. package/dist/esm/components/Accordion/Accordion.js +1 -1
  4. package/dist/esm/components/Autocomplete/Autocomplete.js +481 -0
  5. package/dist/esm/components/Autocomplete/Autocomplete.tokens.js +103 -0
  6. package/dist/esm/components/Autocomplete/Option.js +52 -0
  7. package/dist/esm/components/Banner/Banner.js +2 -2
  8. package/dist/esm/components/Banner/BannerMessage.js +1 -1
  9. package/dist/esm/components/Breadcrumbs/Breadcrumb.js +2 -2
  10. package/dist/esm/components/Breadcrumbs/Breadcrumbs.js +1 -1
  11. package/dist/esm/components/Button/Button.js +2 -2
  12. package/dist/esm/components/Button/InnerFullWidth.js +1 -1
  13. package/dist/esm/components/Button/tokens/contained.js +1 -1
  14. package/dist/esm/components/Button/tokens/ghost.js +1 -1
  15. package/dist/esm/components/Button/tokens/icon.js +1 -1
  16. package/dist/esm/components/Button/tokens/outlined.js +1 -1
  17. package/dist/esm/components/Card/Card.js +1 -1
  18. package/dist/esm/components/Card/CardActions.js +2 -2
  19. package/dist/esm/components/Card/CardHeader.js +1 -1
  20. package/dist/esm/components/Checkbox/Input.js +1 -1
  21. package/dist/esm/components/Dialog/Dialog.js +2 -2
  22. package/dist/esm/components/Dialog/DialogContent.js +1 -1
  23. package/dist/esm/components/Dialog/DialogHeader.js +1 -1
  24. package/dist/esm/components/Input/Input.js +1 -1
  25. package/dist/esm/components/Input/Input.tokens.js +1 -1
  26. package/dist/esm/components/Menu/Menu.context.js +1 -1
  27. package/dist/esm/components/Menu/Menu.js +2 -2
  28. package/dist/esm/components/Menu/MenuItem.js +3 -3
  29. package/dist/esm/components/Menu/MenuSection.js +1 -1
  30. package/dist/esm/components/Pagination/Pagination.js +2 -2
  31. package/dist/esm/components/Pagination/PaginationItem.js +1 -1
  32. package/dist/esm/components/Popover/Popover.js +4 -5
  33. package/dist/esm/components/Popover/PopoverHeader.js +1 -1
  34. package/dist/esm/components/Progress/Circular/CircularProgress.js +55 -28
  35. package/dist/esm/components/Progress/Linear/LinearProgress.js +34 -7
  36. package/dist/esm/components/Radio/Radio.js +1 -1
  37. package/dist/esm/components/Search/Search.js +4 -4
  38. package/dist/esm/components/Select/MultiSelect/MultiSelect.js +6 -3
  39. package/dist/esm/components/Select/NativeSelect/NativeSelect.js +2 -2
  40. package/dist/esm/components/Select/Select.tokens.js +1 -1
  41. package/dist/esm/components/Select/SingleSelect/SingleSelect.js +4 -2
  42. package/dist/esm/components/Select/commonStyles.js +2 -2
  43. package/dist/esm/components/SideSheet/SideSheet.js +2 -3
  44. package/dist/esm/components/Slider/Slider.js +39 -8
  45. package/dist/esm/components/Snackbar/Snackbar.js +1 -1
  46. package/dist/esm/components/Switch/Switch.js +1 -1
  47. package/dist/esm/components/Table/Cell.js +2 -2
  48. package/dist/esm/components/Table/DataCell/DataCell.js +2 -2
  49. package/dist/esm/components/Table/DataCell/DataCell.tokens.js +1 -1
  50. package/dist/esm/components/Table/HeaderCell/HeaderCell.js +2 -2
  51. package/dist/esm/components/Table/index.js +1 -1
  52. package/dist/esm/components/TableOfContents/TableOfContents.js +2 -2
  53. package/dist/esm/components/Tabs/TabList.js +1 -1
  54. package/dist/esm/components/Tabs/Tabs.js +3 -3
  55. package/dist/esm/components/TextField/Field.js +3 -3
  56. package/dist/esm/components/TextField/HelperText/HelperText.js +1 -1
  57. package/dist/esm/components/TextField/TextField.js +3 -3
  58. package/dist/esm/components/Textarea/Textarea.js +2 -2
  59. package/dist/esm/components/TopBar/TopBar.js +1 -1
  60. package/dist/esm/index.js +16 -15
  61. package/dist/esm/node_modules/.pnpm/{ramda@0.27.2/node_modules/ramda/src → ramda@0.28.0/node_modules/ramda/es}/internal/_curry1.js +2 -5
  62. package/dist/esm/node_modules/.pnpm/{ramda@0.27.2/node_modules/ramda/src → ramda@0.28.0/node_modules/ramda/es}/internal/_curry2.js +3 -7
  63. package/dist/esm/node_modules/.pnpm/{ramda@0.27.2/node_modules/ramda/src → ramda@0.28.0/node_modules/ramda/es}/internal/_curry3.js +4 -9
  64. package/dist/esm/node_modules/.pnpm/{ramda@0.27.2/node_modules/ramda/src → ramda@0.28.0/node_modules/ramda/es}/internal/_has.js +1 -3
  65. package/dist/esm/node_modules/.pnpm/{ramda@0.27.2/node_modules/ramda/src → ramda@0.28.0/node_modules/ramda/es}/internal/_isObject.js +1 -3
  66. package/dist/esm/node_modules/.pnpm/{ramda@0.27.2/node_modules/ramda/src → ramda@0.28.0/node_modules/ramda/es}/internal/_isPlaceholder.js +1 -3
  67. package/dist/esm/node_modules/.pnpm/{ramda@0.27.2/node_modules/ramda/src → ramda@0.28.0/node_modules/ramda/es}/mergeDeepRight.js +3 -8
  68. package/dist/esm/node_modules/.pnpm/{ramda@0.27.2/node_modules/ramda/src → ramda@0.28.0/node_modules/ramda/es}/mergeDeepWithKey.js +4 -9
  69. package/dist/esm/node_modules/.pnpm/{ramda@0.27.2/node_modules/ramda/src → ramda@0.28.0/node_modules/ramda/es}/mergeWithKey.js +3 -7
  70. package/dist/types/components/Autocomplete/Autocomplete.d.ts +82 -0
  71. package/dist/types/components/Autocomplete/Autocomplete.tokens.d.ts +3 -0
  72. package/dist/types/components/Autocomplete/Option.d.ts +15 -0
  73. package/dist/types/components/Autocomplete/index.d.ts +1 -0
  74. package/dist/types/components/Menu/MenuItem.d.ts +2 -2
  75. package/dist/types/components/Select/MultiSelect/MultiSelect.d.ts +1 -0
  76. package/dist/types/components/Select/SingleSelect/SingleSelect.d.ts +1 -0
  77. package/dist/types/components/Slider/Slider.d.ts +9 -9
  78. package/dist/types/components/Slider/SliderInput.d.ts +0 -6
  79. package/dist/types/index.d.ts +1 -0
  80. package/package.json +47 -42
@@ -3,8 +3,8 @@ import styled, { css, ThemeProvider } from 'styled-components';
3
3
  import { token } from './tokens/index.js';
4
4
  import { spacingsTemplate, bordersTemplate, typographyTemplate, outlineTemplate, useToken } from '@equinor/eds-utils';
5
5
  import { InnerFullWidth } from './InnerFullWidth.js';
6
- import { jsx } from 'react/jsx-runtime';
7
6
  import { useEds } from '../EdsProvider/eds.context.js';
7
+ import { jsx } from 'react/jsx-runtime';
8
8
 
9
9
  const getVariant = (tokenSet, variant) => {
10
10
  switch (variant) {
@@ -40,7 +40,7 @@ const getToken = (variant, color) => {
40
40
  const Inner = styled.span.withConfig({
41
41
  displayName: "Button__Inner",
42
42
  componentId: "sc-1hs0myn-0"
43
- })(["display:grid;grid-gap:var(--eds_button__gap,8px);grid-auto-flow:column;align-items:center;height:100%;justify-content:center;& >:is(svg,img){margin-top:var(--eds_button__icon__margin_y,0);margin-bottom:var(--eds_button__icon__margin_y,0);}"]);
43
+ })(["display:grid;grid-gap:var(--eds_button__gap,8px);grid-auto-flow:column;align-items:center;height:100%;justify-content:center;& > :is(svg,img){margin-top:var(--eds_button__icon__margin_y,0);margin-bottom:var(--eds_button__icon__margin_y,0);}"]);
44
44
  const ButtonBase = styled.button.withConfig({
45
45
  displayName: "Button__ButtonBase",
46
46
  componentId: "sc-1hs0myn-1"
@@ -9,7 +9,7 @@ const FullWidthCenterContent = styled.span.withConfig({
9
9
  const FullWidthInner = styled.span.withConfig({
10
10
  displayName: "InnerFullWidth__FullWidthInner",
11
11
  componentId: "sc-qeawkb-1"
12
- })(["height:100%;display:flex;align-items:center;>:is(svg,img){margin-top:var(--eds_button__margin_y,inherit);margin-bottom:var(--eds_button__margin_y,inherit);}>:is(svg,img):first-child{margin-right:var(--eds_button__fullwidth__icon__margin_x,8px);}>:is(svg,img):last-child{margin-left:var(--eds_button__fullwidth__icon__margin_x,8px);}>:is(svg,img):only-child{margin-left:auto;margin-right:auto;}> span:first-child{margin-left:var(--eds_button__fullwidth__margin_x,32px);}> span:last-child{margin-right:var(--eds_button__fullwidth__margin_x,32px);}> span:only-child{margin-right:0;margin-left:0;}"]);
12
+ })(["height:100%;display:flex;align-items:center;> :is(svg,img){margin-top:var(--eds_button__margin_y,inherit);margin-bottom:var(--eds_button__margin_y,inherit);}> :is(svg,img):first-child{margin-right:var(--eds_button__fullwidth__icon__margin_x,8px);}> :is(svg,img):last-child{margin-left:var(--eds_button__fullwidth__icon__margin_x,8px);}> :is(svg,img):only-child{margin-left:auto;margin-right:auto;}> span:first-child{margin-left:var(--eds_button__fullwidth__margin_x,32px);}> span:last-child{margin-right:var(--eds_button__fullwidth__margin_x,32px);}> span:only-child{margin-right:0;margin-left:0;}"]);
13
13
  const InnerFullWidth = /*#__PURE__*/forwardRef(function InnerFullWidth(_ref, ref) {
14
14
  let {
15
15
  children
@@ -1,6 +1,6 @@
1
1
  import { tokens } from '@equinor/eds-tokens';
2
2
  import { button } from './button.js';
3
- import mergeDeepRight from '../../../node_modules/.pnpm/ramda@0.27.2/node_modules/ramda/src/mergeDeepRight.js';
3
+ import mergeDeepRight from '../../../node_modules/.pnpm/ramda@0.28.0/node_modules/ramda/es/mergeDeepRight.js';
4
4
 
5
5
  const {
6
6
  colors: {
@@ -1,5 +1,5 @@
1
1
  import { tokens } from '@equinor/eds-tokens';
2
- import mergeDeepRight from '../../../node_modules/.pnpm/ramda@0.27.2/node_modules/ramda/src/mergeDeepRight.js';
2
+ import mergeDeepRight from '../../../node_modules/.pnpm/ramda@0.28.0/node_modules/ramda/es/mergeDeepRight.js';
3
3
  import { button } from './button.js';
4
4
 
5
5
  const {
@@ -1,5 +1,5 @@
1
1
  import { tokens } from '@equinor/eds-tokens';
2
- import mergeDeepRight from '../../../node_modules/.pnpm/ramda@0.27.2/node_modules/ramda/src/mergeDeepRight.js';
2
+ import mergeDeepRight from '../../../node_modules/.pnpm/ramda@0.28.0/node_modules/ramda/es/mergeDeepRight.js';
3
3
  import { button } from './button.js';
4
4
 
5
5
  const {
@@ -1,5 +1,5 @@
1
1
  import { tokens } from '@equinor/eds-tokens';
2
- import mergeDeepRight from '../../../node_modules/.pnpm/ramda@0.27.2/node_modules/ramda/src/mergeDeepRight.js';
2
+ import mergeDeepRight from '../../../node_modules/.pnpm/ramda@0.28.0/node_modules/ramda/es/mergeDeepRight.js';
3
3
  import { button } from './button.js';
4
4
 
5
5
  const {
@@ -10,7 +10,7 @@ const {
10
10
  const StyledCard = styled.div.withConfig({
11
11
  displayName: "Card__StyledCard",
12
12
  componentId: "sc-bjucjn-0"
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:", ";", ";"], _ref => {
13
+ })(["width:100%;position:relative;background-color:", ";box-sizing:border-box;display:flex;flex-direction:column;grid-gap:16px;cursor:", ";", ";"], _ref => {
14
14
  let {
15
15
  background
16
16
  } = _ref;
@@ -1,8 +1,8 @@
1
1
  import { forwardRef } from 'react';
2
2
  import styled from 'styled-components';
3
+ import { Typography } from '../Typography/Typography.js';
3
4
  import { primary } from './Card.tokens.js';
4
5
  import { jsxs, jsx } from 'react/jsx-runtime';
5
- import { Typography } from '../Typography/Typography.js';
6
6
 
7
7
  const {
8
8
  spacings
@@ -10,7 +10,7 @@ const {
10
10
  const StyledCardActions = styled.div.withConfig({
11
11
  displayName: "CardActions__StyledCardActions",
12
12
  componentId: "sc-1d5vskp-0"
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:", ";}"], _ref => {
13
+ })(["display:grid;grid-gap:8px;grid-auto-flow:column;align-items:center;justify-content:", ";padding:0 ", " 0 ", ";margin-top:auto;:first-child{padding-top:", ";}:last-child{padding-bottom:", ";}"], _ref => {
14
14
  let {
15
15
  justifyContent
16
16
  } = _ref;
@@ -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;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);
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(_ref, ref) {
14
14
  let {
15
15
  children,
@@ -3,8 +3,8 @@ import styled, { ThemeProvider } from 'styled-components';
3
3
  import { checkbox_indeterminate, checkbox as checkbox$1, checkbox_outline } from '@equinor/eds-icons';
4
4
  import { checkbox } from './Checkbox.tokens.js';
5
5
  import { outlineTemplate, spacingsTemplate, useToken } from '@equinor/eds-utils';
6
- import { jsx, jsxs } from 'react/jsx-runtime';
7
6
  import { useEds } from '../EdsProvider/eds.context.js';
7
+ import { jsx, jsxs } from 'react/jsx-runtime';
8
8
 
9
9
  /* eslint camelcase: "off" */
10
10
  const StyledPath = styled.path.attrs(_ref => {
@@ -2,11 +2,11 @@ import { forwardRef } from 'react';
2
2
  import { createPortal } from 'react-dom';
3
3
  import styled, { css, ThemeProvider } from 'styled-components';
4
4
  import { typographyTemplate, bordersTemplate, useToken } from '@equinor/eds-utils';
5
- import { dialog } from './Dialog.tokens.js';
6
- import { jsx, Fragment } from 'react/jsx-runtime';
7
5
  import { Paper } from '../Paper/Paper.js';
8
6
  import { Scrim } from '../Scrim/Scrim.js';
7
+ import { dialog } from './Dialog.tokens.js';
9
8
  import { useEds } from '../EdsProvider/eds.context.js';
9
+ import { jsx, Fragment } from 'react/jsx-runtime';
10
10
 
11
11
  const StyledDialog = styled(Paper).attrs({
12
12
  tabIndex: 0,
@@ -1,8 +1,8 @@
1
1
  import { forwardRef } from 'react';
2
2
  import styled, { css } from 'styled-components';
3
+ import { Divider } from '../Divider/Divider.js';
3
4
  import { typographyTemplate } from '@equinor/eds-utils';
4
5
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
5
- import { Divider } from '../Divider/Divider.js';
6
6
 
7
7
  const StyledDialogContent = styled.div.withConfig({
8
8
  displayName: "DialogContent__StyledDialogContent",
@@ -1,7 +1,7 @@
1
1
  import { forwardRef } from 'react';
2
2
  import styled, { css } from 'styled-components';
3
- import { jsxs, jsx } from 'react/jsx-runtime';
4
3
  import { Divider } from '../Divider/Divider.js';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
5
 
6
6
  const StyledDialogHeader = styled.div.withConfig({
7
7
  displayName: "DialogHeader__StyledDialogHeader",
@@ -2,8 +2,8 @@ import { forwardRef } from 'react';
2
2
  import styled, { css, ThemeProvider } from 'styled-components';
3
3
  import { inputToken } from './Input.tokens.js';
4
4
  import { outlineTemplate, typographyTemplate, spacingsTemplate, useToken } from '@equinor/eds-utils';
5
- import { jsx } from 'react/jsx-runtime';
6
5
  import { useEds } from '../EdsProvider/eds.context.js';
6
+ import { jsx } from 'react/jsx-runtime';
7
7
 
8
8
  const StyledInput = styled.input.withConfig({
9
9
  displayName: "Input__StyledInput",
@@ -1,5 +1,5 @@
1
1
  import { tokens as tokens$1 } from '@equinor/eds-tokens';
2
- import mergeDeepRight from '../../node_modules/.pnpm/ramda@0.27.2/node_modules/ramda/src/mergeDeepRight.js';
2
+ import mergeDeepRight from '../../node_modules/.pnpm/ramda@0.28.0/node_modules/ramda/es/mergeDeepRight.js';
3
3
 
4
4
  const {
5
5
  colors: {
@@ -1,4 +1,4 @@
1
- import { useState, useContext, createContext } from 'react';
1
+ import { useContext, createContext, useState } from 'react';
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
 
4
4
  const initalState = {
@@ -2,12 +2,12 @@ import { forwardRef, useState, useEffect } from 'react';
2
2
  import * as ReactDom from 'react-dom';
3
3
  import styled, { css, ThemeProvider } from 'styled-components';
4
4
  import { MenuProvider, useMenu } from './Menu.context.js';
5
+ import { Paper } from '../Paper/Paper.js';
5
6
  import { MenuList } from './MenuList.js';
6
7
  import { bordersTemplate, useIsMounted, useToken, usePopper, useOutsideClick, useGlobalKeyPress } from '@equinor/eds-utils';
7
8
  import { menu } from './Menu.tokens.js';
8
- import { jsx, Fragment } from 'react/jsx-runtime';
9
- import { Paper } from '../Paper/Paper.js';
10
9
  import { useEds } from '../EdsProvider/eds.context.js';
10
+ import { jsx, Fragment } from 'react/jsx-runtime';
11
11
 
12
12
  const {
13
13
  border
@@ -1,4 +1,4 @@
1
- import { memo, forwardRef } from 'react';
1
+ import { forwardRef } from 'react';
2
2
  import styled, { css } from 'styled-components';
3
3
  import { menu } from './Menu.tokens.js';
4
4
  import { typographyTemplate, spacingsTemplate, outlineTemplate, useCombinedRefs } from '@equinor/eds-utils';
@@ -50,7 +50,7 @@ const Content = styled.div.withConfig({
50
50
  displayName: "MenuItem__Content",
51
51
  componentId: "sc-1g9fpbe-1"
52
52
  })(["width:auto;display:grid;grid-gap:16px;grid-auto-flow:column;grid-auto-columns:max-content auto max-content;align-items:center;"]);
53
- const MenuItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function MenuItem(_ref5, ref) {
53
+ const MenuItem = /*#__PURE__*/forwardRef(function MenuItem(_ref5, ref) {
54
54
  let {
55
55
  children,
56
56
  disabled,
@@ -97,7 +97,7 @@ const MenuItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function MenuItem(_r
97
97
  children: children
98
98
  })
99
99
  });
100
- }));
100
+ });
101
101
  MenuItem.displayName = 'MenuItem';
102
102
 
103
103
  export { MenuItem };
@@ -2,9 +2,9 @@ import { memo } from 'react';
2
2
  import styled from 'styled-components';
3
3
  import { menu } from './Menu.tokens.js';
4
4
  import { spacingsTemplate } from '@equinor/eds-utils';
5
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
6
5
  import { Divider } from '../Divider/Divider.js';
7
6
  import { Typography } from '../Typography/Typography.js';
7
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
8
8
 
9
9
  const Header = styled.div.attrs(() => ({
10
10
  tabIndex: 0
@@ -1,14 +1,14 @@
1
1
  import { forwardRef, useState, useLayoutEffect } from 'react';
2
2
  import styled from 'styled-components';
3
3
  import { useIsMounted } from '@equinor/eds-utils';
4
+ import { Button } from '../Button/Button.js';
4
5
  import { Icon } from '../Icon/index.js';
6
+ import { Typography } from '../Typography/Typography.js';
5
7
  import { PaginationItem } from './PaginationItem.js';
6
8
  import { pagination } from './Pagination.tokens.js';
7
9
  import { chevron_left, chevron_right, more_horizontal } from '@equinor/eds-icons';
8
10
  import { PaginationControl } from './paginationControl.js';
9
11
  import { jsx, jsxs } from 'react/jsx-runtime';
10
- import { Typography } from '../Typography/Typography.js';
11
- import { Button } from '../Button/Button.js';
12
12
 
13
13
  const icons = {
14
14
  chevron_left,
@@ -1,7 +1,7 @@
1
1
  import { forwardRef } from 'react';
2
+ import { Button } from '../Button/Button.js';
2
3
  import { pagination } from './Pagination.tokens.js';
3
4
  import { jsx } from 'react/jsx-runtime';
4
- import { Button } from '../Button/Button.js';
5
5
 
6
6
  const PaginationItem = /*#__PURE__*/forwardRef(function PaginationItem(_ref, ref) {
7
7
  let {
@@ -1,10 +1,10 @@
1
1
  import { forwardRef, useState, useEffect } from 'react';
2
2
  import styled, { css, ThemeProvider } from 'styled-components';
3
+ import { Paper } from '../Paper/Paper.js';
3
4
  import { typographyTemplate, bordersTemplate, useCombinedRefs, useOutsideClick, useGlobalKeyPress, usePopper, useToken } from '@equinor/eds-utils';
4
5
  import { popover } from './Popover.tokens.js';
5
- import { jsx, jsxs } from 'react/jsx-runtime';
6
- import { Paper } from '../Paper/Paper.js';
7
6
  import { useEds } from '../EdsProvider/eds.context.js';
7
+ import { jsx, jsxs } from 'react/jsx-runtime';
8
8
 
9
9
  const PopoverPaper = styled(Paper).withConfig({
10
10
  displayName: "Popover__PopoverPaper",
@@ -59,12 +59,12 @@ const Popover = /*#__PURE__*/forwardRef(function Popover(_ref5, ref) {
59
59
  const [arrowRef, setArrowRef] = useState(null);
60
60
  const popoverRef = useCombinedRefs(ref, setPopperEl);
61
61
  useOutsideClick(popperEl, e => {
62
- if (open && onClose !== null && anchorEl && !anchorEl.contains(e.target)) {
62
+ if (open && onClose && anchorEl && !anchorEl.contains(e.target)) {
63
63
  onClose();
64
64
  }
65
65
  });
66
66
  useGlobalKeyPress('Escape', () => {
67
- if (onClose !== null && open) {
67
+ if (onClose && open) {
68
68
  onClose();
69
69
  }
70
70
  });
@@ -98,7 +98,6 @@ const Popover = /*#__PURE__*/forwardRef(function Popover(_ref5, ref) {
98
98
  ref: popoverRef,
99
99
  elevation: "overlay",
100
100
  style: styles.popper,
101
- "data-testid": "popover",
102
101
  ...props,
103
102
  children: [/*#__PURE__*/jsx(ArrowWrapper, {
104
103
  ref: setArrowRef,
@@ -1,7 +1,7 @@
1
1
  import { forwardRef } from 'react';
2
2
  import styled, { css } from 'styled-components';
3
- import { jsxs, jsx } from 'react/jsx-runtime';
4
3
  import { Divider } from '../Divider/Divider.js';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
5
 
6
6
  const StyledPopoverHeader = styled.div.withConfig({
7
7
  displayName: "PopoverHeader__StyledPopoverHeader",
@@ -1,7 +1,7 @@
1
- import { forwardRef } from 'react';
1
+ import { forwardRef, useState, useEffect } from 'react';
2
2
  import styled, { keyframes, css } from 'styled-components';
3
3
  import * as CircularProgress_tokens from './CircularProgress.tokens.js';
4
- import { jsxs, jsx } from 'react/jsx-runtime';
4
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
5
5
 
6
6
  const indeterminate = keyframes(["100%{transform:rotate(360deg);}"]);
7
7
  const Svg = styled.svg.withConfig({
@@ -13,13 +13,17 @@ const Svg = styled.svg.withConfig({
13
13
  } = _ref;
14
14
  return variant === 'indeterminate' ? css(["animation:", " 1.4s linear infinite;"], indeterminate) : css(["transform:rotate(-90deg);"]);
15
15
  });
16
+ const SrOnlyOutput = styled.output.withConfig({
17
+ displayName: "CircularProgress__SrOnlyOutput",
18
+ componentId: "sc-hib054-1"
19
+ })(["position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;"]);
16
20
  const TrackCircle = styled.circle.withConfig({
17
21
  displayName: "CircularProgress__TrackCircle",
18
- componentId: "sc-hib054-1"
22
+ componentId: "sc-hib054-2"
19
23
  })([""]);
20
24
  const ProgressCircle = styled.circle.withConfig({
21
25
  displayName: "CircularProgress__ProgressCircle",
22
- componentId: "sc-hib054-2"
26
+ componentId: "sc-hib054-3"
23
27
  })([""]);
24
28
 
25
29
  const getToken = color => {
@@ -53,6 +57,7 @@ const CircularProgress = /*#__PURE__*/forwardRef(function CircularProgress(_ref2
53
57
  variant
54
58
  };
55
59
  const token = getToken(color);
60
+ const [srProgress, setSrProgress] = useState(0);
56
61
  const circumference = 2 * Math.PI * ((48 - thickness) / 2);
57
62
 
58
63
  if (variant === 'determinate') {
@@ -67,30 +72,52 @@ const CircularProgress = /*#__PURE__*/forwardRef(function CircularProgress(_ref2
67
72
  }
68
73
  }
69
74
 
70
- return /*#__PURE__*/jsxs(Svg, { ...props,
71
- viewBox: "24 24 48 48",
72
- role: "progressbar",
73
- height: size,
74
- width: size,
75
- preserveAspectRatio: "xMidYMid meet",
76
- children: [/*#__PURE__*/jsx(TrackCircle, {
77
- style: trackStyle,
78
- cx: 48,
79
- cy: 48,
80
- r: (48 - thickness) / 2,
81
- fill: "none",
82
- strokeWidth: thickness,
83
- stroke: token.background
84
- }), /*#__PURE__*/jsx(ProgressCircle, {
85
- style: trackStyle,
86
- cx: 48,
87
- cy: 48,
88
- r: (48 - thickness) / 2,
89
- fill: "none",
90
- strokeLinecap: "round",
91
- strokeWidth: thickness,
92
- strokeDasharray: variant === 'determinate' ? circumference : 48,
93
- stroke: token.entities.progress.background
75
+ useEffect(() => {
76
+ if (variant === 'indeterminate') return;
77
+
78
+ if (progress >= 25 && progress < 50) {
79
+ setSrProgress(25);
80
+ } else if (progress >= 50 && progress < 75) {
81
+ setSrProgress(50);
82
+ } else if (progress >= 75 && progress < 100) {
83
+ setSrProgress(75);
84
+ } else if (progress === 100) {
85
+ setSrProgress(100);
86
+ }
87
+ }, [progress, variant]);
88
+
89
+ const getProgressFormatted = () => {
90
+ return "Loading ".concat(srProgress, "%");
91
+ };
92
+
93
+ return /*#__PURE__*/jsxs(Fragment, {
94
+ children: [/*#__PURE__*/jsxs(Svg, { ...props,
95
+ viewBox: "24 24 48 48",
96
+ role: "progressbar",
97
+ height: size,
98
+ width: size,
99
+ preserveAspectRatio: "xMidYMid meet",
100
+ children: [/*#__PURE__*/jsx(TrackCircle, {
101
+ style: trackStyle,
102
+ cx: 48,
103
+ cy: 48,
104
+ r: (48 - thickness) / 2,
105
+ fill: "none",
106
+ strokeWidth: thickness,
107
+ stroke: token.background
108
+ }), /*#__PURE__*/jsx(ProgressCircle, {
109
+ style: trackStyle,
110
+ cx: 48,
111
+ cy: 48,
112
+ r: (48 - thickness) / 2,
113
+ fill: "none",
114
+ strokeLinecap: "round",
115
+ strokeWidth: thickness,
116
+ strokeDasharray: variant === 'determinate' ? circumference : 48,
117
+ stroke: token.entities.progress.background
118
+ })]
119
+ }), variant === 'determinate' && /*#__PURE__*/jsx(SrOnlyOutput, {
120
+ children: getProgressFormatted()
94
121
  })]
95
122
  });
96
123
  }); // CircularProgress.displayName = 'eds-circular-progress'
@@ -1,7 +1,7 @@
1
- import { forwardRef } from 'react';
1
+ import { forwardRef, useState, useEffect } from 'react';
2
2
  import styled, { keyframes } from 'styled-components';
3
3
  import { primary } from './LinearProgress.tokens.js';
4
- import { jsx } from 'react/jsx-runtime';
4
+ import { jsxs, Fragment, 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({
@@ -16,6 +16,10 @@ const IndeterminateProgressBar = styled.div.withConfig({
16
16
  displayName: "LinearProgress__IndeterminateProgressBar",
17
17
  componentId: "sc-5orxpi-2"
18
18
  })(["width:75%;border-radius:50px;position:absolute;left:0;bottom:0;top:0;transition:transform 0.2s linear;transform-origin:left;background-color:", ";animation:", " 1.5s cubic-bezier(0.165,0.84,0.44,1) 1s infinite;"], primary.entities.progress.background, indeterminate);
19
+ const SrOnlyOutput = styled.output.withConfig({
20
+ displayName: "LinearProgress__SrOnlyOutput",
21
+ componentId: "sc-5orxpi-3"
22
+ })(["position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;"]);
19
23
  const LinearProgress = /*#__PURE__*/forwardRef(function LinearProgress(_ref, ref) {
20
24
  let {
21
25
  variant = 'indeterminate',
@@ -25,6 +29,7 @@ const LinearProgress = /*#__PURE__*/forwardRef(function LinearProgress(_ref, ref
25
29
  const props = { ...rest,
26
30
  ref
27
31
  };
32
+ const [srProgress, setSrProgress] = useState(0);
28
33
  let barStyle;
29
34
 
30
35
  if (variant === 'determinate') {
@@ -40,11 +45,33 @@ const LinearProgress = /*#__PURE__*/forwardRef(function LinearProgress(_ref, ref
40
45
  const transformStyle = {
41
46
  transform: barStyle
42
47
  };
43
- return /*#__PURE__*/jsx(Track, { ...props,
44
- role: "progressbar",
45
- children: variant === 'indeterminate' ? /*#__PURE__*/jsx(IndeterminateProgressBar, {}) : /*#__PURE__*/jsx(ProgressBar, {
46
- style: transformStyle
47
- })
48
+ useEffect(() => {
49
+ if (variant === 'indeterminate') return;
50
+
51
+ if (value >= 25 && value < 50) {
52
+ setSrProgress(25);
53
+ } else if (value >= 50 && value < 75) {
54
+ setSrProgress(50);
55
+ } else if (value >= 75 && value < 100) {
56
+ setSrProgress(75);
57
+ } else if (value === 100) {
58
+ setSrProgress(100);
59
+ }
60
+ }, [value, variant]);
61
+
62
+ const getProgressFormatted = () => {
63
+ return "Loading ".concat(srProgress, "%");
64
+ };
65
+
66
+ return /*#__PURE__*/jsxs(Fragment, {
67
+ children: [/*#__PURE__*/jsx(Track, { ...props,
68
+ role: "progressbar",
69
+ children: variant === 'indeterminate' ? /*#__PURE__*/jsx(IndeterminateProgressBar, {}) : /*#__PURE__*/jsx(ProgressBar, {
70
+ style: transformStyle
71
+ })
72
+ }), variant === 'determinate' && /*#__PURE__*/jsx(SrOnlyOutput, {
73
+ children: getProgressFormatted()
74
+ })]
48
75
  });
49
76
  }); // LinearProgress.displayName = 'eds-linear-progress'
50
77
 
@@ -3,8 +3,8 @@ import styled, { ThemeProvider } from 'styled-components';
3
3
  import { radio_button_selected, radio_button_unselected } from '@equinor/eds-icons';
4
4
  import { comfortable } from './Radio.tokens.js';
5
5
  import { outlineTemplate, typographyTemplate, spacingsTemplate, useToken } from '@equinor/eds-utils';
6
- import { jsxs, jsx } from 'react/jsx-runtime';
7
6
  import { useEds } from '../EdsProvider/eds.context.js';
7
+ import { jsxs, jsx } from 'react/jsx-runtime';
8
8
 
9
9
  /* eslint camelcase: "off" */
10
10
  const Input = styled.input.attrs(_ref => {
@@ -2,12 +2,12 @@ import { forwardRef, useRef, useState, useEffect } from 'react';
2
2
  import styled, { css, ThemeProvider } from 'styled-components';
3
3
  import { search as search$1, close } from '@equinor/eds-icons';
4
4
  import { search } from './Search.tokens.js';
5
+ import { useEds } from '../EdsProvider/eds.context.js';
6
+ import { Button } from '../Button/Button.js';
5
7
  import { Icon } from '../Icon/index.js';
8
+ import { Input } from '../Input/Input.js';
6
9
  import { bordersTemplate, spacingsTemplate, typographyTemplate, useToken, useCombinedRefs, setReactInputValue } from '@equinor/eds-utils';
7
10
  import { jsx, jsxs } from 'react/jsx-runtime';
8
- import { Input } from '../Input/Input.js';
9
- import { Button } from '../Button/Button.js';
10
- import { useEds } from '../EdsProvider/eds.context.js';
11
11
 
12
12
  const Container = styled.span.withConfig({
13
13
  displayName: "Search__Container",
@@ -40,7 +40,7 @@ const SearchInput = styled(Input).withConfig({
40
40
  theme,
41
41
  disabled
42
42
  } = _ref2;
43
- return css(["height:calc(", " - 2px);align-self:start;box-shadow:unset;&[type='search']::-webkit-search-decoration,&[type='search']::-webkit-search-cancel-button,&[type='search']::-webkit-search-results-button,&[type='search']::-webkit-search-results-decoration{-webkit-appearance:none;}", " &:focus{outline:none;}", ""], theme.height, typographyTemplate(theme.typography), disabled && css(["cursor:not-allowed;"]));
43
+ return css(["height:calc(", " - 2px);align-self:start;box-shadow:unset;&[type='search']::-webkit-search-decoration,&[type='search']::-webkit-search-cancel-button,&[type='search']::-webkit-search-results-button,&[type='search']::-webkit-search-results-decoration{-webkit-appearance:none;}", " &:focus{outline:none;}&:-webkit-autofill{box-shadow:0 0 0px 1000px ", " inset;}&:autofill{box-shadow:0 0 0px 1000px ", " inset;}", ""], theme.height, typographyTemplate(theme.typography), theme.background, theme.background, disabled && css(["cursor:not-allowed;"]));
44
44
  });
45
45
  const InsideButton = styled(Button).withConfig({
46
46
  displayName: "Search__InsideButton",
@@ -1,5 +1,6 @@
1
1
  import { forwardRef, useState } from 'react';
2
2
  import { useMultipleSelection, useCombobox } from 'downshift';
3
+ import { Label } from '../../Label/Label.js';
3
4
  import { Icon } from '../../Icon/index.js';
4
5
  import { CheckboxInput } from '../../Checkbox/Input.js';
5
6
  import { close, arrow_drop_up, arrow_drop_down } from '@equinor/eds-icons';
@@ -7,9 +8,8 @@ import styled, { ThemeProvider } from 'styled-components';
7
8
  import { multiSelect } from '../Select.tokens.js';
8
9
  import { StyledListItem, Container, StyledInputWrapper, PaddedInput, StyledButton, StyledList } from '../commonStyles.js';
9
10
  import { spacingsTemplate, useToken } from '@equinor/eds-utils';
10
- import { jsx, jsxs } from 'react/jsx-runtime';
11
11
  import { useEds } from '../../EdsProvider/eds.context.js';
12
- import { Label } from '../../Label/Label.js';
12
+ import { jsx, jsxs } from 'react/jsx-runtime';
13
13
 
14
14
  const PaddedStyledListItem = styled(StyledListItem).withConfig({
15
15
  displayName: "MultiSelect__PaddedStyledListItem",
@@ -20,6 +20,8 @@ const PaddedStyledListItem = styled(StyledListItem).withConfig({
20
20
  } = _ref;
21
21
  return spacingsTemplate(theme.spacings);
22
22
  });
23
+
24
+ /** @deprecated Use `<Autocomplete multiple />` instead. */
23
25
  const MultiSelect = /*#__PURE__*/forwardRef(function MultiSelect(_ref2, ref) {
24
26
  let {
25
27
  items = [],
@@ -155,7 +157,8 @@ const MultiSelect = /*#__PURE__*/forwardRef(function MultiSelect(_ref2, ref) {
155
157
  meta: meta,
156
158
  disabled: disabled
157
159
  }), /*#__PURE__*/jsxs(StyledInputWrapper, { ...getComboboxProps(),
158
- children: [/*#__PURE__*/jsx(PaddedInput, { ...getInputProps(getDropdownProps({
160
+ children: [/*#__PURE__*/jsx(PaddedInput, { ...getInputProps( // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
161
+ getDropdownProps({
159
162
  preventKeyAction: isOpen,
160
163
  disabled: disabled
161
164
  })),
@@ -1,10 +1,10 @@
1
1
  import { forwardRef } from 'react';
2
2
  import styled, { css, ThemeProvider } from 'styled-components';
3
+ import { Label } from '../../Label/Label.js';
3
4
  import { nativeselect } from './NativeSelect.tokens.js';
4
5
  import { typographyTemplate, spacingsTemplate, outlineTemplate, useToken } from '@equinor/eds-utils';
5
- import { jsx, jsxs } from 'react/jsx-runtime';
6
6
  import { useEds } from '../../EdsProvider/eds.context.js';
7
- import { Label } from '../../Label/Label.js';
7
+ import { jsx, jsxs } from 'react/jsx-runtime';
8
8
 
9
9
  const Container = styled.div.withConfig({
10
10
  displayName: "NativeSelect__Container",
@@ -1,5 +1,5 @@
1
1
  import { tokens } from '@equinor/eds-tokens';
2
- import mergeDeepRight from '../../node_modules/.pnpm/ramda@0.27.2/node_modules/ramda/src/mergeDeepRight.js';
2
+ import mergeDeepRight from '../../node_modules/.pnpm/ramda@0.28.0/node_modules/ramda/es/mergeDeepRight.js';
3
3
 
4
4
  const {
5
5
  typography,
@@ -1,14 +1,14 @@
1
1
  import { forwardRef, useState, useEffect } from 'react';
2
2
  import { useCombobox } from 'downshift';
3
3
  import styled, { ThemeProvider } from 'styled-components';
4
+ import { Label } from '../../Label/Label.js';
4
5
  import { Icon } from '../../Icon/index.js';
5
6
  import { close, arrow_drop_up, arrow_drop_down } from '@equinor/eds-icons';
6
7
  import { spacingsTemplate, useToken } from '@equinor/eds-utils';
7
8
  import { select } from '../Select.tokens.js';
8
9
  import { StyledListItem, Container, StyledInputWrapper, PaddedInput, StyledButton, StyledList } from '../commonStyles.js';
9
- import { jsx, jsxs } from 'react/jsx-runtime';
10
10
  import { useEds } from '../../EdsProvider/eds.context.js';
11
- import { Label } from '../../Label/Label.js';
11
+ import { jsx, jsxs } from 'react/jsx-runtime';
12
12
 
13
13
  const PaddedStyledListItem = styled(StyledListItem).withConfig({
14
14
  displayName: "SingleSelect__PaddedStyledListItem",
@@ -19,6 +19,8 @@ const PaddedStyledListItem = styled(StyledListItem).withConfig({
19
19
  } = _ref;
20
20
  return spacingsTemplate(theme.spacings);
21
21
  });
22
+ /** @deprecated Use `<Autocomplete />` instead */
23
+
22
24
  const SingleSelect = /*#__PURE__*/forwardRef(function SingleSelect(_ref2, ref) {
23
25
  let {
24
26
  items = [],
@@ -1,9 +1,9 @@
1
+ import { Input } from '../Input/Input.js';
1
2
  import { List } from '../List/index.js';
3
+ import { Button } from '../Button/Button.js';
2
4
  import styled, { css } from 'styled-components';
3
5
  import { select } from './Select.tokens.js';
4
6
  import { bordersTemplate, typographyTemplate } from '@equinor/eds-utils';
5
- import { Input } from '../Input/Input.js';
6
- import { Button } from '../Button/Button.js';
7
7
 
8
8
  const {
9
9
  entities: {