@equinor/eds-core-react 0.44.0 → 0.45.1
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/dist/eds-core-react.cjs +60 -52
- package/dist/esm/components/Autocomplete/Autocomplete.js +22 -6
- package/dist/esm/components/Banner/Banner.js +3 -3
- package/dist/esm/components/Breadcrumbs/Breadcrumb.js +1 -1
- package/dist/esm/components/Button/Button.js +20 -11
- package/dist/esm/components/Button/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/esm/components/Button/ButtonGroup/ButtonGroup.tokens.js +0 -1
- package/dist/esm/components/Button/tokens/index.js +12 -12
- package/dist/esm/components/Checkbox/Input.js +1 -1
- package/dist/esm/components/Datepicker/DatePicker.js +1 -1
- package/dist/esm/components/Datepicker/DateRangePicker.js +1 -1
- package/dist/esm/components/Datepicker/calendars/CalendarCell.js +1 -1
- package/dist/esm/components/Datepicker/fields/DateFieldSegments.js +2 -1
- package/dist/esm/components/Datepicker/fields/Toggle.js +5 -2
- package/dist/esm/components/Datepicker/utils/get-calendar-date.js +1 -1
- package/dist/esm/components/Datepicker/utils/useGetLocale.js +7 -5
- package/dist/esm/components/Dialog/Dialog.js +3 -3
- package/dist/esm/components/EdsProvider/eds.context.js +1 -1
- package/dist/esm/components/Input/Input.js +1 -1
- package/dist/esm/components/InputWrapper/HelperText/HelperText.token.js +2 -6
- package/dist/esm/components/InputWrapper/InputWrapper.js +1 -1
- package/dist/esm/components/Label/Label.tokens.js +1 -4
- 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 +1 -1
- package/dist/esm/components/Pagination/Pagination.js +1 -1
- package/dist/esm/components/Paper/Paper.js +1 -1
- package/dist/esm/components/Popover/Popover.js +4 -4
- package/dist/esm/components/Progress/Circular/CircularProgress.js +1 -1
- package/dist/esm/components/Progress/Star/StarProgress.js +1 -1
- package/dist/esm/components/Radio/Radio.js +1 -1
- package/dist/esm/components/Search/Search.js +1 -1
- package/dist/esm/components/Select/NativeSelect.js +2 -2
- package/dist/esm/components/SideBar/SideBar.js +2 -2
- package/dist/esm/components/SideBar/SideBarAccordion/index.js +1 -1
- package/dist/esm/components/Slider/Slider.js +1 -1
- package/dist/esm/components/Slider/Slider.tokens.js +2 -6
- package/dist/esm/components/Slider/SliderInput.js +3 -3
- package/dist/esm/components/Snackbar/Snackbar.js +3 -3
- package/dist/esm/components/Switch/Switch.js +2 -2
- package/dist/esm/components/Switch/SwitchDefault.js +1 -1
- package/dist/esm/components/Switch/SwitchSmall.js +1 -1
- package/dist/esm/components/Table/DataCell/DataCell.js +2 -2
- package/dist/esm/components/Table/FooterCell/FooterCell.js +2 -2
- package/dist/esm/components/Table/HeaderCell/HeaderCell.js +3 -3
- package/dist/esm/components/TableOfContents/TableOfContents.js +3 -3
- package/dist/esm/components/TextField/TextField.js +2 -3
- package/dist/esm/components/Tooltip/Tooltip.js +2 -2
- package/dist/esm/components/Tooltip/Tooltip.tokens.js +1 -11
- package/dist/esm/components/TopBar/TopBar.js +3 -3
- package/dist/esm/components/Typography/Typography.js +1 -1
- package/dist/types/components/Autocomplete/Autocomplete.d.ts +7 -2
- package/dist/types/components/TextField/TextField.d.ts +1 -1
- package/package.json +33 -33
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { forwardRef, useState, useCallback } from 'react';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
|
-
import { outlineTemplate, spacingsTemplate, typographyMixin
|
|
3
|
+
import { useToken, outlineTemplate, spacingsTemplate, typographyMixin } from '@equinor/eds-utils';
|
|
4
4
|
import { inputToken } from './Input.tokens.js';
|
|
5
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
6
|
import { useEds } from '../EdsProvider/eds.context.js';
|
|
@@ -17,15 +17,11 @@ const helperText = {
|
|
|
17
17
|
comfortable: {
|
|
18
18
|
left: comfortable.small,
|
|
19
19
|
right: comfortable.small,
|
|
20
|
-
top: comfortable.small,
|
|
21
|
-
bottom: '6px'
|
|
22
|
-
},
|
|
20
|
+
top: comfortable.small},
|
|
23
21
|
compact: {
|
|
24
22
|
left: comfortable.small,
|
|
25
23
|
right: comfortable.small,
|
|
26
|
-
top: comfortable.xx_small
|
|
27
|
-
bottom: '6px'
|
|
28
|
-
}
|
|
24
|
+
top: comfortable.xx_small}
|
|
29
25
|
}
|
|
30
26
|
};
|
|
31
27
|
|
|
@@ -3,8 +3,8 @@ import styled, { ThemeProvider } from 'styled-components';
|
|
|
3
3
|
import { useToken } from '@equinor/eds-utils';
|
|
4
4
|
import { inputToken } from './InputWrapper.tokens.js';
|
|
5
5
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
-
import { HelperText as TextfieldHelperText } from './HelperText/HelperText.js';
|
|
7
6
|
import { Label as Label$1 } from '../Label/Label.js';
|
|
7
|
+
import { HelperText as TextfieldHelperText } from './HelperText/HelperText.js';
|
|
8
8
|
import { useEds } from '../EdsProvider/eds.context.js';
|
|
9
9
|
|
|
10
10
|
const Container = styled.div.withConfig({
|
|
@@ -2,12 +2,12 @@ import { forwardRef, useMemo, useEffect } from 'react';
|
|
|
2
2
|
import styled, { ThemeProvider } from 'styled-components';
|
|
3
3
|
import { MenuProvider, useMenu } from './Menu.context.js';
|
|
4
4
|
import { MenuList } from './MenuList.js';
|
|
5
|
-
import {
|
|
5
|
+
import { useToken, mergeRefs, useIsomorphicLayoutEffect, bordersTemplate, useGlobalKeyPress } from '@equinor/eds-utils';
|
|
6
6
|
import { menu } from './Menu.tokens.js';
|
|
7
7
|
import { offset, flip, shift, size, useFloating, autoUpdate, useInteractions, useDismiss } from '@floating-ui/react';
|
|
8
8
|
import { jsx } from 'react/jsx-runtime';
|
|
9
|
-
import { Paper } from '../Paper/Paper.js';
|
|
10
9
|
import { useEds } from '../EdsProvider/eds.context.js';
|
|
10
|
+
import { Paper } from '../Paper/Paper.js';
|
|
11
11
|
|
|
12
12
|
const {
|
|
13
13
|
border
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import { menu } from './Menu.tokens.js';
|
|
4
|
-
import { typographyTemplate, spacingsTemplate, outlineTemplate
|
|
4
|
+
import { mergeRefs, typographyTemplate, spacingsTemplate, outlineTemplate } from '@equinor/eds-utils';
|
|
5
5
|
import { useMenu } from './Menu.context.js';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
@@ -5,7 +5,7 @@ import { Button } from '../Button/index.js';
|
|
|
5
5
|
import { Icon } from '../Icon/index.js';
|
|
6
6
|
import { PaginationItem } from './PaginationItem.js';
|
|
7
7
|
import { pagination } from './Pagination.tokens.js';
|
|
8
|
-
import {
|
|
8
|
+
import { more_horizontal, chevron_right, chevron_left } from '@equinor/eds-icons';
|
|
9
9
|
import { PaginationControl } from './paginationControl.js';
|
|
10
10
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
11
|
import { Typography } from '../Typography/Typography.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import {
|
|
3
|
+
import { elevation, paper } from './Paper.tokens.js';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
const StyledPaper = styled.div.withConfig({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { forwardRef, useRef, useMemo, useEffect } from 'react';
|
|
2
|
-
import styled, {
|
|
3
|
-
import {
|
|
2
|
+
import styled, { ThemeProvider, css } from 'styled-components';
|
|
3
|
+
import { mergeRefs, useToken, typographyTemplate, bordersTemplate, outlineTemplate } from '@equinor/eds-utils';
|
|
4
4
|
import { popover } from './Popover.tokens.js';
|
|
5
|
-
import { useFloating, offset, flip, shift, arrow,
|
|
5
|
+
import { useFloating, autoUpdate, offset, flip, shift, arrow, useInteractions, useDismiss, FloatingFocusManager } from '@floating-ui/react';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
|
-
import { Paper } from '../Paper/Paper.js';
|
|
8
7
|
import { useEds } from '../EdsProvider/eds.context.js';
|
|
8
|
+
import { Paper } from '../Paper/Paper.js';
|
|
9
9
|
|
|
10
10
|
const PopoverPaper = styled(Paper).withConfig({
|
|
11
11
|
displayName: "Popover__PopoverPaper",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { forwardRef, useState, useEffect } from 'react';
|
|
2
|
-
import styled, {
|
|
2
|
+
import styled, { css, keyframes } from 'styled-components';
|
|
3
3
|
import * as CircularProgress_tokens from './CircularProgress.tokens.js';
|
|
4
4
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -2,7 +2,7 @@ import { forwardRef, useMemo } from 'react';
|
|
|
2
2
|
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
|
-
import {
|
|
5
|
+
import { useToken, spacingsTemplate, outlineTemplate, typographyTemplate } from '@equinor/eds-utils';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
7
|
import { useEds } from '../EdsProvider/eds.context.js';
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { forwardRef, useRef, useState, useEffect, useMemo } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import {
|
|
3
|
+
import { close, search } from '@equinor/eds-icons';
|
|
4
4
|
import { Button } from '../Button/index.js';
|
|
5
5
|
import { Icon } from '../Icon/index.js';
|
|
6
6
|
import { mergeRefs, setReactInputValue } from '@equinor/eds-utils';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import styled, {
|
|
2
|
+
import styled, { ThemeProvider, css } from 'styled-components';
|
|
3
3
|
import { nativeselect } from './NativeSelect.tokens.js';
|
|
4
|
-
import { typographyTemplate, spacingsTemplate, outlineTemplate
|
|
4
|
+
import { useToken, typographyTemplate, spacingsTemplate, outlineTemplate } from '@equinor/eds-utils';
|
|
5
5
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
6
|
import { useEds } from '../EdsProvider/eds.context.js';
|
|
7
7
|
import { Label } from '../Label/Label.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { forwardRef, useEffect } from 'react';
|
|
2
|
-
import styled, {
|
|
2
|
+
import styled, { ThemeProvider, css } from 'styled-components';
|
|
3
3
|
import { sidebar } from './SideBar.tokens.js';
|
|
4
|
-
import {
|
|
4
|
+
import { useToken, bordersTemplate } from '@equinor/eds-utils';
|
|
5
5
|
import { SideBarProvider, useSideBar } from './SideBar.context.js';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
7
|
import { useEds } from '../EdsProvider/eds.context.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { forwardRef, useState, useMemo, Children } from 'react';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
|
-
import {
|
|
3
|
+
import { useId, mergeRefs, bordersTemplate, outlineTemplate } from '@equinor/eds-utils';
|
|
4
4
|
import { chevron_up, chevron_down, arrow_drop_down } from '@equinor/eds-icons';
|
|
5
5
|
import { useSideBar } from '../SideBar.context.js';
|
|
6
6
|
import { sidebar } from '../SideBar.tokens.js';
|
|
@@ -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 {
|
|
7
|
+
import { useId, bordersTemplate } from '@equinor/eds-utils';
|
|
8
8
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
10
|
const {
|
|
@@ -66,11 +66,9 @@ const slider = {
|
|
|
66
66
|
background: indicatorColor,
|
|
67
67
|
states: {
|
|
68
68
|
hover: {
|
|
69
|
-
|
|
70
|
-
},
|
|
69
|
+
},
|
|
71
70
|
disabled: {
|
|
72
|
-
|
|
73
|
-
}
|
|
71
|
+
}
|
|
74
72
|
}
|
|
75
73
|
}
|
|
76
74
|
},
|
|
@@ -122,7 +120,6 @@ const slider = {
|
|
|
122
120
|
hover: {
|
|
123
121
|
background: primaryHoverAlt,
|
|
124
122
|
border: {
|
|
125
|
-
type: 'border',
|
|
126
123
|
color: primaryHover
|
|
127
124
|
}
|
|
128
125
|
}
|
|
@@ -147,7 +144,6 @@ const slider = {
|
|
|
147
144
|
disabled: {
|
|
148
145
|
background: backgroundColorDisabled,
|
|
149
146
|
border: {
|
|
150
|
-
type: 'border',
|
|
151
147
|
color: backgroundColorMedium
|
|
152
148
|
}
|
|
153
149
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import { slider } from './Slider.tokens.js';
|
|
4
|
-
import {
|
|
4
|
+
import { outlineTemplate, bordersTemplate } from '@equinor/eds-utils';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
const {
|
|
@@ -14,9 +14,9 @@ const {
|
|
|
14
14
|
} = slider;
|
|
15
15
|
const track = css(["width:100%;height:100%;cursor:pointer;background:none;"]);
|
|
16
16
|
const thumb = css(["", " height:", ";width:", ";background:", ";cursor:pointer;position:relative;z-index:1;"], bordersTemplate(handle.border), handle.height, handle.width, handle.background);
|
|
17
|
-
const thumbHover = css(["@media (hover:hover) and (pointer:fine){box-shadow:0px 0px 0px 6px ", ";border-color:", ";}"], handle.states.hover.background, handle.states.hover.border.
|
|
17
|
+
const thumbHover = css(["@media (hover:hover) and (pointer:fine){box-shadow:0px 0px 0px 6px ", ";border-color:", ";}"], handle.states.hover.background, handle.states.hover.border.color);
|
|
18
18
|
const thumbHoverAndDisabled = css(["@media (hover:hover) and (pointer:fine){cursor:not-allowed;box-shadow:none;}"]);
|
|
19
|
-
const thumbDisabled = css(["background-color:", ";border-color:", ";"], _disabled.background, _disabled.border.
|
|
19
|
+
const thumbDisabled = css(["background-color:", ";border-color:", ";"], _disabled.background, _disabled.border.color);
|
|
20
20
|
const StyledSliderInput = styled.input.attrs(() => ({
|
|
21
21
|
type: 'range'
|
|
22
22
|
})).withConfig({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { forwardRef, useState, useRef, useEffect } from 'react';
|
|
2
|
-
import styled, {
|
|
2
|
+
import styled, { ThemeProvider, css } from 'styled-components';
|
|
3
3
|
import { snackbar } from './Snackbar.tokens.js';
|
|
4
|
-
import { spacingsTemplate, bordersTemplate, typographyTemplate
|
|
4
|
+
import { useToken, spacingsTemplate, bordersTemplate, typographyTemplate } from '@equinor/eds-utils';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
|
-
import { Paper } from '../Paper/Paper.js';
|
|
7
6
|
import { useEds } from '../EdsProvider/eds.context.js';
|
|
7
|
+
import { Paper } from '../Paper/Paper.js';
|
|
8
8
|
|
|
9
9
|
const PopoverDiv = styled('div').withConfig({
|
|
10
10
|
shouldForwardProp: () => true //workaround to avoid warning until popover gets added to react types
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import styled, {
|
|
2
|
+
import styled, { ThemeProvider, css } from 'styled-components';
|
|
3
3
|
import { SwitchSmall } from './SwitchSmall.js';
|
|
4
4
|
import { SwitchDefault } from './SwitchDefault.js';
|
|
5
5
|
import { comfortable } from './Switch.tokens.js';
|
|
6
|
-
import {
|
|
6
|
+
import { useToken, typographyTemplate } from '@equinor/eds-utils';
|
|
7
7
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
8
|
import { useEds } from '../EdsProvider/eds.context.js';
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import { bordersTemplate } from '@equinor/eds-utils';
|
|
4
|
-
import {
|
|
4
|
+
import { GridWrapper, BaseInputWrapper, BaseInput } from './Switch.styles.js';
|
|
5
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
const Input = styled(BaseInput).withConfig({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
|
-
import {
|
|
3
|
+
import { GridWrapper, BaseInputWrapper, BaseInput } from './Switch.styles.js';
|
|
4
4
|
import { outlineTemplate } from '@equinor/eds-utils';
|
|
5
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import styled, {
|
|
3
|
-
import { spacingsTemplate, typographyTemplate, bordersTemplate
|
|
2
|
+
import styled, { ThemeProvider, css } from 'styled-components';
|
|
3
|
+
import { useToken, spacingsTemplate, typographyTemplate, bordersTemplate } from '@equinor/eds-utils';
|
|
4
4
|
import { applyVariant, tableCell } from './DataCell.tokens.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
import { useEds } from '../../EdsProvider/eds.context.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import styled, {
|
|
3
|
-
import { spacingsTemplate, typographyTemplate, bordersTemplate
|
|
2
|
+
import styled, { ThemeProvider, css } from 'styled-components';
|
|
3
|
+
import { useToken, spacingsTemplate, typographyTemplate, bordersTemplate } from '@equinor/eds-utils';
|
|
4
4
|
import { token } from '../HeaderCell/HeaderCell.tokens.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
import { useEds } from '../../EdsProvider/eds.context.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import styled, {
|
|
3
|
-
import { spacingsTemplate, typographyTemplate, bordersTemplate
|
|
2
|
+
import styled, { ThemeProvider, css } from 'styled-components';
|
|
3
|
+
import { useToken, spacingsTemplate, typographyTemplate, bordersTemplate } from '@equinor/eds-utils';
|
|
4
4
|
import { token } from './HeaderCell.tokens.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
import { useEds } from '../../EdsProvider/eds.context.js';
|
|
@@ -34,7 +34,7 @@ const StyledTableCell = styled.th.withConfig({
|
|
|
34
34
|
const CellInner = styled.div.withConfig({
|
|
35
35
|
displayName: "HeaderCell__CellInner",
|
|
36
36
|
componentId: "sc-18w2o3a-1"
|
|
37
|
-
})(["display:flex;align-items:center;"]);
|
|
37
|
+
})(["display:flex;align-items:center;height:100%;"]);
|
|
38
38
|
const TableHeaderCell = /*#__PURE__*/forwardRef(function TableHeaderCell({
|
|
39
39
|
children,
|
|
40
40
|
sort,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import styled, {
|
|
2
|
+
import styled, { ThemeProvider, css } from 'styled-components';
|
|
3
3
|
import { List } from '../List/index.js';
|
|
4
|
-
import {
|
|
4
|
+
import { useToken, typographyTemplate } from '@equinor/eds-utils';
|
|
5
5
|
import { tableOfContents } from './TableOfContents.tokens.js';
|
|
6
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 { Typography } from '../Typography/Typography.js';
|
|
9
9
|
|
|
10
10
|
const StyledTableOfContents = styled.nav.withConfig({
|
|
11
11
|
displayName: "TableOfContents__StyledTableOfContents",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
2
|
import { useId } from '@equinor/eds-utils';
|
|
3
|
-
import { jsxs,
|
|
3
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import { InputWrapper } from '../InputWrapper/InputWrapper.js';
|
|
5
5
|
import { Textarea } from '../Textarea/Textarea.js';
|
|
6
6
|
import { Input } from '../Input/Input.js';
|
|
@@ -49,7 +49,7 @@ const TextField = /*#__PURE__*/forwardRef(function TextField({
|
|
|
49
49
|
})]
|
|
50
50
|
}),
|
|
51
51
|
rowsMax,
|
|
52
|
-
ref: inputRef || textareaRef,
|
|
52
|
+
ref: ref || inputRef || textareaRef,
|
|
53
53
|
$multiline: multiline,
|
|
54
54
|
...other
|
|
55
55
|
};
|
|
@@ -60,7 +60,6 @@ const TextField = /*#__PURE__*/forwardRef(function TextField({
|
|
|
60
60
|
disabled
|
|
61
61
|
};
|
|
62
62
|
const containerProps = {
|
|
63
|
-
ref,
|
|
64
63
|
className,
|
|
65
64
|
style: {
|
|
66
65
|
width: '100%',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { forwardRef, useRef, useState, useMemo, useEffect, cloneElement } from 'react';
|
|
2
2
|
import { createPortal } from 'react-dom';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import { typographyTemplate, spacingsTemplate, bordersTemplate
|
|
4
|
+
import { mergeRefs, typographyTemplate, spacingsTemplate, bordersTemplate } from '@equinor/eds-utils';
|
|
5
5
|
import { tooltip } from './Tooltip.tokens.js';
|
|
6
|
-
import { useFloating, offset, flip, shift, arrow,
|
|
6
|
+
import { useFloating, autoUpdate, offset, flip, shift, arrow, useInteractions, useHover, useFocus, useRole, useDismiss } from '@floating-ui/react';
|
|
7
7
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { useEds } from '../EdsProvider/eds.context.js';
|
|
9
9
|
|
|
@@ -39,19 +39,9 @@ const tooltip = {
|
|
|
39
39
|
radius: borderRadius
|
|
40
40
|
},
|
|
41
41
|
entities: {
|
|
42
|
-
tooltip: {
|
|
43
|
-
height: spacingXlarge
|
|
44
|
-
},
|
|
45
42
|
arrow: {
|
|
46
43
|
width: '6px',
|
|
47
|
-
height: spacingSmall
|
|
48
|
-
spacings: {
|
|
49
|
-
bottom: '-6px',
|
|
50
|
-
top: '-6px',
|
|
51
|
-
left: '-6px',
|
|
52
|
-
right: '-6px'
|
|
53
|
-
}
|
|
54
|
-
}
|
|
44
|
+
height: spacingSmall}
|
|
55
45
|
},
|
|
56
46
|
spacings: {
|
|
57
47
|
left: spacingSmall,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import styled, {
|
|
3
|
-
import { bordersTemplate, spacingsTemplate, typographyTemplate
|
|
2
|
+
import styled, { ThemeProvider, css } from 'styled-components';
|
|
3
|
+
import { useToken, bordersTemplate, spacingsTemplate, typographyTemplate } from '@equinor/eds-utils';
|
|
4
4
|
import { topbar } from './TopBar.tokens.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
|
-
import { Paper } from '../Paper/Paper.js';
|
|
7
6
|
import { useEds } from '../EdsProvider/eds.context.js';
|
|
7
|
+
import { Paper } from '../Paper/Paper.js';
|
|
8
8
|
|
|
9
9
|
const StyledTopBar = styled(Paper).withConfig({
|
|
10
10
|
displayName: "TopBar__StyledTopBar",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import { typographyTemplate, outlineTemplate } from '@equinor/eds-utils';
|
|
4
|
-
import {
|
|
4
|
+
import { quickVariants, typography, colors, link } from './Typography.tokens.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
const getElementType = (variant, link) => {
|
|
@@ -84,6 +84,11 @@ export type AutocompleteProps<T> = {
|
|
|
84
84
|
*/
|
|
85
85
|
dropdownHeight?: number;
|
|
86
86
|
/**
|
|
87
|
+
* Method that is used to select a key that can be used for comparing items. If omitted, objects are matched by reference.
|
|
88
|
+
*/
|
|
89
|
+
itemToKey?: (value: T | null) => unknown;
|
|
90
|
+
/**
|
|
91
|
+
* @deprecated since version 0.45.0 - use itemToKey instead
|
|
87
92
|
* Method that is used to compare objects by value. If omitted, objects are matched by reference.
|
|
88
93
|
*/
|
|
89
94
|
itemCompare?: (value: T, compare: T) => boolean;
|
|
@@ -92,9 +97,9 @@ export type AutocompleteProps<T> = {
|
|
|
92
97
|
*/
|
|
93
98
|
onClear?: () => void;
|
|
94
99
|
} & HTMLAttributes<HTMLDivElement>;
|
|
95
|
-
declare function AutocompleteInner<T>(props: AutocompleteProps<T>, ref: React.ForwardedRef<
|
|
100
|
+
declare function AutocompleteInner<T>(props: AutocompleteProps<T>, ref: React.ForwardedRef<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
|
|
96
101
|
export declare const Autocomplete: <T>(props: AutocompleteProps<T> & {
|
|
97
|
-
ref?: React.ForwardedRef<
|
|
102
|
+
ref?: React.ForwardedRef<HTMLInputElement>;
|
|
98
103
|
/** @ignore */
|
|
99
104
|
displayName?: string | undefined;
|
|
100
105
|
}) => ReturnType<typeof AutocompleteInner>;
|
|
@@ -27,5 +27,5 @@ type SharedTextFieldProps = {
|
|
|
27
27
|
multiline?: boolean;
|
|
28
28
|
};
|
|
29
29
|
export type TextFieldProps = SharedTextFieldProps & (TextareaHTMLAttributes<HTMLTextAreaElement> | InputHTMLAttributes<HTMLInputElement>);
|
|
30
|
-
export declare const TextField: import("react").ForwardRefExoticComponent<TextFieldProps & import("react").RefAttributes<
|
|
30
|
+
export declare const TextField: import("react").ForwardRefExoticComponent<TextFieldProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
31
31
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/eds-core-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.1",
|
|
4
4
|
"description": "The React implementation of the Equinor Design System",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css"
|
|
@@ -33,44 +33,44 @@
|
|
|
33
33
|
],
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@rollup/plugin-babel": "^6.0.4",
|
|
36
|
-
"@rollup/plugin-commonjs": "^28.0.
|
|
37
|
-
"@rollup/plugin-node-resolve": "^16.0.
|
|
38
|
-
"@storybook/addon-a11y": "^8.
|
|
39
|
-
"@storybook/addon-actions": "^8.
|
|
40
|
-
"@storybook/addon-docs": "^8.
|
|
41
|
-
"@storybook/addon-essentials": "^8.
|
|
42
|
-
"@storybook/addon-links": "^8.
|
|
43
|
-
"@storybook/blocks": "^8.
|
|
44
|
-
"@storybook/preview-api": "^8.
|
|
45
|
-
"@storybook/react": "^8.
|
|
46
|
-
"@storybook/react-vite": "^8.
|
|
36
|
+
"@rollup/plugin-commonjs": "^28.0.3",
|
|
37
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
38
|
+
"@storybook/addon-a11y": "^8.6.12",
|
|
39
|
+
"@storybook/addon-actions": "^8.6.12",
|
|
40
|
+
"@storybook/addon-docs": "^8.6.12",
|
|
41
|
+
"@storybook/addon-essentials": "^8.6.12",
|
|
42
|
+
"@storybook/addon-links": "^8.6.12",
|
|
43
|
+
"@storybook/blocks": "^8.6.12",
|
|
44
|
+
"@storybook/preview-api": "^8.6.12",
|
|
45
|
+
"@storybook/react": "^8.6.12",
|
|
46
|
+
"@storybook/react-vite": "^8.6.12",
|
|
47
47
|
"@testing-library/dom": "^10.4.0",
|
|
48
48
|
"@testing-library/jest-dom": "^6.6.3",
|
|
49
|
-
"@testing-library/react": "16.
|
|
49
|
+
"@testing-library/react": "16.3.0",
|
|
50
50
|
"@testing-library/user-event": "14.5.2",
|
|
51
51
|
"@types/jest": "^29.5.14",
|
|
52
52
|
"@types/ramda": "^0.30.2",
|
|
53
|
-
"@types/react": "^18.3.
|
|
54
|
-
"@types/react-dom": "^18.3.
|
|
53
|
+
"@types/react": "^18.3.20",
|
|
54
|
+
"@types/react-dom": "^18.3.6",
|
|
55
55
|
"babel-plugin-styled-components": "^2.1.4",
|
|
56
56
|
"jest": "^29.7.0",
|
|
57
57
|
"jest-environment-jsdom": "^29.7.0",
|
|
58
58
|
"jest-styled-components": "^7.2.0",
|
|
59
59
|
"js-file-download": "^0.4.12",
|
|
60
|
-
"postcss": "^8.
|
|
60
|
+
"postcss": "^8.5.3",
|
|
61
61
|
"ramda": "^0.30.1",
|
|
62
62
|
"react": "^18.3.1",
|
|
63
63
|
"react-dom": "^18.3.1",
|
|
64
|
-
"react-hook-form": "^7.
|
|
65
|
-
"react-router-dom": "^6.
|
|
66
|
-
"rollup": "^4.
|
|
67
|
-
"rollup-plugin-delete": "^2.
|
|
64
|
+
"react-hook-form": "^7.56.1",
|
|
65
|
+
"react-router-dom": "^6.30.0",
|
|
66
|
+
"rollup": "^4.40.1",
|
|
67
|
+
"rollup-plugin-delete": "^2.2.0",
|
|
68
68
|
"rollup-plugin-postcss": "^4.0.2",
|
|
69
69
|
"rollup-preserve-directives": "^1.1.3",
|
|
70
|
-
"storybook": "^8.
|
|
71
|
-
"styled-components": "6.1.
|
|
70
|
+
"storybook": "^8.6.12",
|
|
71
|
+
"styled-components": "6.1.17",
|
|
72
72
|
"tsc-watch": "^6.2.1",
|
|
73
|
-
"typescript": "^5.
|
|
73
|
+
"typescript": "^5.8.3"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"react": ">=16.8",
|
|
@@ -78,19 +78,19 @@
|
|
|
78
78
|
"styled-components": ">=5.1"
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"@babel/runtime": "^7.
|
|
82
|
-
"@floating-ui/react": "^0.27.
|
|
83
|
-
"@internationalized/date": "^3.
|
|
84
|
-
"@react-aria/utils": "^3.
|
|
85
|
-
"@react-stately/calendar": "^3.
|
|
86
|
-
"@react-stately/datepicker": "^3.
|
|
87
|
-
"@react-types/shared": "^3.
|
|
81
|
+
"@babel/runtime": "^7.27.0",
|
|
82
|
+
"@floating-ui/react": "^0.27.8",
|
|
83
|
+
"@internationalized/date": "^3.8.0",
|
|
84
|
+
"@react-aria/utils": "^3.28.2",
|
|
85
|
+
"@react-stately/calendar": "^3.8.0",
|
|
86
|
+
"@react-stately/datepicker": "^3.14.0",
|
|
87
|
+
"@react-types/shared": "^3.29.0",
|
|
88
88
|
"@tanstack/react-virtual": "3.13.2",
|
|
89
89
|
"downshift": "9.0.8",
|
|
90
|
-
"react-aria": "^3.
|
|
91
|
-
"@equinor/eds-icons": "^0.22.0",
|
|
90
|
+
"react-aria": "^3.39.0",
|
|
92
91
|
"@equinor/eds-tokens": "0.9.2",
|
|
93
|
-
"@equinor/eds-
|
|
92
|
+
"@equinor/eds-icons": "^0.22.0",
|
|
93
|
+
"@equinor/eds-utils": "0.8.7"
|
|
94
94
|
},
|
|
95
95
|
"scripts": {
|
|
96
96
|
"build": "rollup -c --bundleConfigAsCjs && tsc -p tsconfig.build.json",
|