@equinor/eds-core-react 0.19.0-dev.20220404 → 0.19.0-dev.202205096
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.
- package/README.md +18 -19
- package/dist/eds-core-react.cjs.js +85 -87
- package/dist/esm/components/Accordion/Accordion.js +1 -1
- package/dist/esm/components/Banner/Banner.js +2 -2
- package/dist/esm/components/Banner/BannerMessage.js +1 -1
- package/dist/esm/components/Breadcrumbs/Breadcrumb.js +2 -2
- package/dist/esm/components/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/esm/components/Button/Button.js +2 -2
- package/dist/esm/components/Button/InnerFullWidth.js +1 -1
- package/dist/esm/components/Button/tokens/contained.js +1 -1
- package/dist/esm/components/Button/tokens/ghost.js +1 -1
- package/dist/esm/components/Button/tokens/icon.js +1 -1
- package/dist/esm/components/Button/tokens/outlined.js +1 -1
- package/dist/esm/components/Card/CardActions.js +1 -1
- package/dist/esm/components/Card/CardHeader.js +1 -1
- package/dist/esm/components/Checkbox/Input.js +1 -1
- package/dist/esm/components/Dialog/Dialog.js +2 -2
- package/dist/esm/components/Dialog/DialogContent.js +1 -1
- package/dist/esm/components/Dialog/DialogHeader.js +1 -1
- package/dist/esm/components/Input/Input.js +1 -1
- package/dist/esm/components/Input/Input.tokens.js +1 -1
- package/dist/esm/components/Menu/Menu.context.js +1 -1
- package/dist/esm/components/Menu/Menu.js +2 -2
- package/dist/esm/components/Menu/MenuItem.js +3 -3
- package/dist/esm/components/Menu/MenuSection.js +1 -1
- package/dist/esm/components/Pagination/Pagination.js +2 -2
- package/dist/esm/components/Pagination/PaginationItem.js +1 -1
- package/dist/esm/components/Popover/Popover.js +2 -3
- package/dist/esm/components/Popover/PopoverHeader.js +1 -1
- package/dist/esm/components/Radio/Radio.js +1 -1
- package/dist/esm/components/Search/Search.js +4 -4
- package/dist/esm/components/Select/MultiSelect/MultiSelect.js +4 -3
- package/dist/esm/components/Select/NativeSelect/NativeSelect.js +2 -2
- package/dist/esm/components/Select/Select.tokens.js +1 -1
- package/dist/esm/components/Select/SingleSelect/SingleSelect.js +2 -2
- package/dist/esm/components/Select/commonStyles.js +2 -2
- package/dist/esm/components/SideSheet/SideSheet.js +2 -3
- package/dist/esm/components/Slider/Slider.js +39 -8
- package/dist/esm/components/Snackbar/Snackbar.js +1 -1
- package/dist/esm/components/Switch/Switch.js +1 -1
- package/dist/esm/components/Table/Cell.js +2 -2
- package/dist/esm/components/Table/DataCell/DataCell.js +1 -1
- package/dist/esm/components/Table/DataCell/DataCell.tokens.js +1 -1
- package/dist/esm/components/Table/HeaderCell/HeaderCell.js +1 -1
- package/dist/esm/components/Table/index.js +1 -1
- package/dist/esm/components/TableOfContents/TableOfContents.js +2 -2
- package/dist/esm/components/Tabs/TabList.js +1 -1
- package/dist/esm/components/Tabs/Tabs.js +1 -1
- package/dist/esm/components/TextField/Field.js +3 -3
- package/dist/esm/components/TextField/HelperText/HelperText.js +1 -1
- package/dist/esm/components/TextField/TextField.js +3 -3
- package/dist/esm/components/Textarea/Textarea.js +2 -2
- package/dist/esm/components/TopBar/TopBar.js +1 -1
- package/dist/esm/index.js +15 -15
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/types/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/types/components/Checkbox/Input.d.ts +1 -1
- package/dist/types/components/Icon/Icon.d.ts +1 -1
- package/dist/types/components/Menu/MenuItem.d.ts +2 -2
- package/dist/types/components/Progress/Circular/CircularProgress.d.ts +1 -1
- package/dist/types/components/Progress/Dots/DotProgress.d.ts +1 -1
- package/dist/types/components/Progress/Star/StarProgress.d.ts +1 -1
- package/dist/types/components/Slider/Slider.d.ts +11 -11
- package/dist/types/components/Slider/SliderInput.d.ts +0 -6
- package/dist/types/components/Switch/Switch.d.ts +1 -1
- package/package.json +46 -42
|
@@ -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
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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,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
|
|
@@ -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 ", "
|
|
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.
|
|
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: {
|
|
@@ -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 {
|
|
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__*/
|
|
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",
|
|
@@ -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",
|
|
@@ -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 {
|
|
12
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
13
13
|
|
|
14
14
|
const PaddedStyledListItem = styled(StyledListItem).withConfig({
|
|
15
15
|
displayName: "MultiSelect__PaddedStyledListItem",
|
|
@@ -155,7 +155,8 @@ const MultiSelect = /*#__PURE__*/forwardRef(function MultiSelect(_ref2, ref) {
|
|
|
155
155
|
meta: meta,
|
|
156
156
|
disabled: disabled
|
|
157
157
|
}), /*#__PURE__*/jsxs(StyledInputWrapper, { ...getComboboxProps(),
|
|
158
|
-
children: [/*#__PURE__*/jsx(PaddedInput, { ...getInputProps(
|
|
158
|
+
children: [/*#__PURE__*/jsx(PaddedInput, { ...getInputProps( // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
159
|
+
getDropdownProps({
|
|
159
160
|
preventKeyAction: isOpen,
|
|
160
161
|
disabled: disabled
|
|
161
162
|
})),
|
|
@@ -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 {
|
|
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.
|
|
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 {
|
|
11
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
12
12
|
|
|
13
13
|
const PaddedStyledListItem = styled(StyledListItem).withConfig({
|
|
14
14
|
displayName: "SingleSelect__PaddedStyledListItem",
|
|
@@ -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: {
|
|
@@ -2,11 +2,11 @@ import { forwardRef } from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { clear } from '@equinor/eds-icons';
|
|
4
4
|
import { bordersTemplate, spacingsTemplate } from '@equinor/eds-utils';
|
|
5
|
+
import { Typography } from '../Typography/Typography.js';
|
|
6
|
+
import { Button } from '../Button/Button.js';
|
|
5
7
|
import { Icon } from '../Icon/index.js';
|
|
6
8
|
import { comfortable, variants } from './SideSheet.tokens.js';
|
|
7
9
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
|
-
import { Button } from '../Button/Button.js';
|
|
9
|
-
import { Typography } from '../Typography/Typography.js';
|
|
10
10
|
|
|
11
11
|
const {
|
|
12
12
|
background,
|
|
@@ -41,7 +41,6 @@ const SideSheet = /*#__PURE__*/forwardRef(function SideSheet(_ref2, ref) {
|
|
|
41
41
|
}; // Controller must set open={false} when pressing the close button
|
|
42
42
|
|
|
43
43
|
return open && /*#__PURE__*/jsxs(StyledSideSheet, { ...props,
|
|
44
|
-
id: "side-sheet",
|
|
45
44
|
children: [/*#__PURE__*/jsxs(Header, {
|
|
46
45
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
47
46
|
variant: "h2",
|
|
@@ -4,7 +4,7 @@ import { slider } from './Slider.tokens.js';
|
|
|
4
4
|
import { MinMax } from './MinMax.js';
|
|
5
5
|
import { Output } from './Output.js';
|
|
6
6
|
import { SliderInput } from './SliderInput.js';
|
|
7
|
-
import { bordersTemplate } from '@equinor/eds-utils';
|
|
7
|
+
import { bordersTemplate, useId } from '@equinor/eds-utils';
|
|
8
8
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
10
|
const {
|
|
@@ -98,6 +98,7 @@ const Slider = /*#__PURE__*/forwardRef(function Slider(_ref10, ref) {
|
|
|
98
98
|
step = 1,
|
|
99
99
|
disabled,
|
|
100
100
|
ariaLabelledby,
|
|
101
|
+
'aria-labelledby': ariaLabelledbyNative,
|
|
101
102
|
...rest
|
|
102
103
|
} = _ref10;
|
|
103
104
|
const isRangeSlider = Array.isArray(value);
|
|
@@ -121,8 +122,7 @@ const Slider = /*#__PURE__*/forwardRef(function Slider(_ref10, ref) {
|
|
|
121
122
|
const maxRange = useRef(null);
|
|
122
123
|
|
|
123
124
|
const onValueChange = (event, valueArrIdx) => {
|
|
124
|
-
const
|
|
125
|
-
const changedValue = parseFloat(target.value);
|
|
125
|
+
const changedValue = parseFloat(event.target.value);
|
|
126
126
|
|
|
127
127
|
if (isRangeSlider) {
|
|
128
128
|
const newValue = sliderValue.slice();
|
|
@@ -187,14 +187,33 @@ const Slider = /*#__PURE__*/forwardRef(function Slider(_ref10, ref) {
|
|
|
187
187
|
}
|
|
188
188
|
};
|
|
189
189
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
190
|
+
let inputIdA = useId(null, 'inputA');
|
|
191
|
+
let inputIdB = useId(null, 'inputB');
|
|
192
|
+
let inputId = useId(null, 'thumb');
|
|
193
|
+
|
|
194
|
+
if (rest['id']) {
|
|
195
|
+
const overrideId = rest['id'];
|
|
196
|
+
inputIdA = "".concat(overrideId, "-thumb-a");
|
|
197
|
+
inputIdB = "".concat(overrideId, "-thumb-b");
|
|
198
|
+
inputId = "".concat(overrideId, "-thumb");
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const getAriaLabelledby = () => {
|
|
202
|
+
if (ariaLabelledbyNative) return ariaLabelledbyNative;
|
|
203
|
+
|
|
204
|
+
if (ariaLabelledby) {
|
|
205
|
+
console.warn('Slider: The "ariaLabelledby" prop is deprecated and will be removed in a future version of EDS, please use the native "aria-labelledby" instead');
|
|
206
|
+
return ariaLabelledby;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
return null;
|
|
210
|
+
};
|
|
211
|
+
|
|
193
212
|
return /*#__PURE__*/jsx(Fragment, {
|
|
194
213
|
children: isRangeSlider ? /*#__PURE__*/jsxs(RangeWrapper, { ...rest,
|
|
195
214
|
ref: ref,
|
|
196
215
|
role: "group",
|
|
197
|
-
"aria-labelledby":
|
|
216
|
+
"aria-labelledby": getAriaLabelledby(),
|
|
198
217
|
valA: sliderValue[0],
|
|
199
218
|
valB: sliderValue[1],
|
|
200
219
|
max: max,
|
|
@@ -210,6 +229,10 @@ const Slider = /*#__PURE__*/forwardRef(function Slider(_ref10, ref) {
|
|
|
210
229
|
value: sliderValue[0],
|
|
211
230
|
max: max,
|
|
212
231
|
min: min,
|
|
232
|
+
"aria-valuemax": max,
|
|
233
|
+
"aria-valuemin": min,
|
|
234
|
+
"aria-valuenow": sliderValue[0],
|
|
235
|
+
"aria-valuetext": getFormattedText(sliderValue[0]).toString(),
|
|
213
236
|
id: inputIdA,
|
|
214
237
|
step: step,
|
|
215
238
|
onChange: event => {
|
|
@@ -232,6 +255,10 @@ const Slider = /*#__PURE__*/forwardRef(function Slider(_ref10, ref) {
|
|
|
232
255
|
value: sliderValue[1],
|
|
233
256
|
min: min,
|
|
234
257
|
max: max,
|
|
258
|
+
"aria-valuemax": max,
|
|
259
|
+
"aria-valuemin": min,
|
|
260
|
+
"aria-valuenow": sliderValue[1],
|
|
261
|
+
"aria-valuetext": getFormattedText(sliderValue[1]).toString(),
|
|
235
262
|
id: inputIdB,
|
|
236
263
|
step: step,
|
|
237
264
|
ref: maxRange,
|
|
@@ -259,13 +286,17 @@ const Slider = /*#__PURE__*/forwardRef(function Slider(_ref10, ref) {
|
|
|
259
286
|
value: sliderValue[0],
|
|
260
287
|
min: min,
|
|
261
288
|
max: max,
|
|
289
|
+
"aria-valuemax": max,
|
|
290
|
+
"aria-valuemin": min,
|
|
291
|
+
"aria-valuenow": sliderValue[0],
|
|
292
|
+
"aria-valuetext": getFormattedText(sliderValue[0]).toString(),
|
|
262
293
|
step: step,
|
|
263
294
|
id: inputId,
|
|
264
295
|
onChange: event => {
|
|
265
296
|
onValueChange(event);
|
|
266
297
|
},
|
|
267
298
|
disabled: disabled,
|
|
268
|
-
"aria-labelledby":
|
|
299
|
+
"aria-labelledby": getAriaLabelledby(),
|
|
269
300
|
onMouseUp: event => handleCommitedValue(event),
|
|
270
301
|
onKeyUp: event => handleKeyUp(event)
|
|
271
302
|
}), /*#__PURE__*/jsx(Output, {
|
|
@@ -3,9 +3,9 @@ import * as ReactDom from 'react-dom';
|
|
|
3
3
|
import styled, { css, ThemeProvider } from 'styled-components';
|
|
4
4
|
import { snackbar } from './Snackbar.tokens.js';
|
|
5
5
|
import { spacingsTemplate, bordersTemplate, typographyTemplate, useToken } from '@equinor/eds-utils';
|
|
6
|
-
import { jsx } from 'react/jsx-runtime';
|
|
7
6
|
import { Paper } from '../Paper/Paper.js';
|
|
8
7
|
import { useEds } from '../EdsProvider/eds.context.js';
|
|
8
|
+
import { jsx } from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
10
|
const StyledSnackbar = styled(Paper).withConfig({
|
|
11
11
|
displayName: "Snackbar__StyledSnackbar",
|
|
@@ -4,8 +4,8 @@ import { SwitchSmall } from './SwitchSmall.js';
|
|
|
4
4
|
import { SwitchDefault } from './SwitchDefault.js';
|
|
5
5
|
import { comfortable } from './Switch.tokens.js';
|
|
6
6
|
import { typographyTemplate, useToken } from '@equinor/eds-utils';
|
|
7
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
7
|
import { useEds } from '../EdsProvider/eds.context.js';
|
|
8
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
10
|
const StyledLabel = styled.label.withConfig({
|
|
11
11
|
displayName: "Switch__StyledLabel",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import { InnerContext } from './Inner.context.js';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
2
|
import { TableDataCell } from './DataCell/DataCell.js';
|
|
5
3
|
import { TableHeaderCell } from './HeaderCell/HeaderCell.js';
|
|
4
|
+
import { InnerContext } from './Inner.context.js';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
const Cell = /*#__PURE__*/forwardRef(function Cell(_ref, ref) {
|
|
8
8
|
let { ...rest
|
|
@@ -2,8 +2,8 @@ import { forwardRef } from 'react';
|
|
|
2
2
|
import styled, { css, ThemeProvider } from 'styled-components';
|
|
3
3
|
import { spacingsTemplate, typographyTemplate, bordersTemplate, useToken } from '@equinor/eds-utils';
|
|
4
4
|
import { applyVariant, tableCell } from './DataCell.tokens.js';
|
|
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 StyledTableCell = styled.td.withConfig({
|
|
9
9
|
displayName: "DataCell__StyledTableCell",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { tokens } from '@equinor/eds-tokens';
|
|
2
|
-
import mergeDeepRight from '../../../node_modules/.pnpm/ramda@0.
|
|
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: {
|
|
@@ -2,8 +2,8 @@ import { forwardRef } from 'react';
|
|
|
2
2
|
import styled, { css, ThemeProvider } from 'styled-components';
|
|
3
3
|
import { spacingsTemplate, typographyTemplate, bordersTemplate, useToken } from '@equinor/eds-utils';
|
|
4
4
|
import { token } from './HeaderCell.tokens.js';
|
|
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 StyledTableCell = styled.th.withConfig({
|
|
9
9
|
displayName: "HeaderCell__StyledTableCell",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Table as Table$1 } from './Table.js';
|
|
2
2
|
import { Body } from './Body.js';
|
|
3
3
|
import { Cell } from './Cell.js';
|
|
4
|
-
import { Caption } from './Caption.js';
|
|
5
4
|
import { Head } from './Head/Head.js';
|
|
6
5
|
import { Row } from './Row/Row.js';
|
|
6
|
+
import { Caption } from './Caption.js';
|
|
7
7
|
|
|
8
8
|
const Table = Table$1;
|
|
9
9
|
Table.Body = Body;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
2
|
import styled, { css, ThemeProvider } from 'styled-components';
|
|
3
3
|
import { List } from '../List/index.js';
|
|
4
|
+
import { Typography } from '../Typography/Typography.js';
|
|
4
5
|
import { typographyTemplate, useToken } from '@equinor/eds-utils';
|
|
5
6
|
import { tableOfContents } from './TableOfContents.tokens.js';
|
|
6
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
-
import { Typography } from '../Typography/Typography.js';
|
|
8
7
|
import { useEds } from '../EdsProvider/eds.context.js';
|
|
8
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
10
|
const StyledTableOfContents = styled.nav.withConfig({
|
|
11
11
|
displayName: "TableOfContents__StyledTableOfContents",
|
|
@@ -13,7 +13,7 @@ const StyledTabList = styled.div.attrs(() => ({
|
|
|
13
13
|
})).withConfig({
|
|
14
14
|
displayName: "TabList__StyledTabList",
|
|
15
15
|
componentId: "sc-1g1p5i1-0"
|
|
16
|
-
})(["display:grid;grid-auto-flow:column;grid-auto-columns:", ";overflow-x:", ";scroll-snap-type:x mandatory;overscroll-behavior-x:contain;@media (prefers-reduced-motion:no-preference){scroll-behavior:smooth;}@media (hover:none){overflow-x:scroll;-webkit-overflow-scrolling:touch;scrollbar-width:0
|
|
16
|
+
})(["display:grid;grid-auto-flow:column;grid-auto-columns:", ";overflow-x:", ";scroll-snap-type:x mandatory;overscroll-behavior-x:contain;@media (prefers-reduced-motion:no-preference){scroll-behavior:smooth;}@media (hover:none){overflow-x:scroll;-webkit-overflow-scrolling:touch;scrollbar-width:0;& ::-webkit-scrollbar{width:0;height:0;}}"], _ref => {
|
|
17
17
|
let {
|
|
18
18
|
variant
|
|
19
19
|
} = _ref;
|
|
@@ -3,8 +3,8 @@ import { TabsProvider } from './Tabs.context.js';
|
|
|
3
3
|
import { token } from './Tabs.tokens.js';
|
|
4
4
|
import { useId, useCombinedRefs, useToken } from '@equinor/eds-utils';
|
|
5
5
|
import { ThemeProvider } from 'styled-components';
|
|
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 Tabs = /*#__PURE__*/forwardRef(function Tabs(_ref, ref) {
|
|
10
10
|
let {
|