@equinor/eds-core-react 2.3.5 → 2.3.7
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/build/index.css +143 -277
- package/build/index.min.css +1 -5
- package/dist/eds-core-react.cjs +209 -25
- package/dist/esm/components/Autocomplete/AddNewOption.js +1 -1
- package/dist/esm/components/Autocomplete/Autocomplete.js +1 -1
- package/dist/esm/components/Autocomplete/Option.js +11 -2
- package/dist/esm/components/Autocomplete/SelectAllOption.js +1 -1
- package/dist/esm/components/Autocomplete/useAutocomplete.js +13 -2
- package/dist/esm/components/Banner/Banner.tokens.js +2 -10
- package/dist/esm/components/Chip/Chip.js +1 -1
- package/dist/esm/components/Chip/Chip.tokens.js +0 -2
- package/dist/esm/components/Datepicker/DatePicker.js +4 -1
- package/dist/esm/components/Datepicker/DateRangePicker.js +4 -1
- package/dist/esm/components/Datepicker/fields/DateFieldSegments.js +11 -2
- package/dist/esm/components/Datepicker/utils/get-calendar-date.js +1 -1
- package/dist/esm/components/Datepicker/utils/getLocalizedValidationErrors.js +164 -0
- package/dist/esm/components/EdsProvider/eds.context.js +1 -1
- package/dist/esm/components/Menu/Menu.context.js +1 -1
- package/dist/esm/components/SideBar/SideBar.context.js +1 -1
- package/dist/esm/components/Table/DataCell/DataCell.js +1 -1
- package/dist/esm/components/Table/FooterCell/FooterCell.js +1 -1
- package/dist/esm/components/Table/HeaderCell/HeaderCell.js +1 -1
- package/dist/esm/components/Typography/Typography.js +1 -1
- package/dist/esm/index.js +64 -64
- package/dist/esm-next/components/next/Button/Button.js +3 -5
- package/dist/esm-next/components/next/Input/Input.js +6 -11
- package/dist/esm-next/components/next/TextField/TextField.js +7 -2
- package/dist/esm-next/index.next.js +4 -4
- package/dist/index.next.cjs +15 -18
- package/dist/types/components/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/types/components/Autocomplete/AutocompleteContext.d.ts +2 -2
- package/dist/types/components/Autocomplete/useAutocomplete.d.ts +3 -2
- package/dist/types/components/Datepicker/DateRangePicker.d.ts +1 -1
- package/dist/types/components/Datepicker/utils/getLocalizedValidationErrors.d.ts +9 -0
- package/dist/types/components/SideBar/SideBarButton/index.d.ts +1 -1
- package/dist/types/components/next/Input/Input.types.d.ts +6 -4
- package/dist/types/components/next/TextField/TextField.d.ts +1 -0
- package/package.json +33 -33
|
@@ -94,7 +94,7 @@ export declare const AutocompleteContext: import("react").Context<{
|
|
|
94
94
|
optionLabel?: (option: unknown) => string;
|
|
95
95
|
} & {
|
|
96
96
|
ref?: React.Ref<HTMLInputElement>;
|
|
97
|
-
}, "
|
|
97
|
+
}, "disabled" | "className" | "style" | "meta" | "label" | "ref" | "multiple" | "variant" | "placeholder" | "readOnly" | "options" | "helperText" | "helperIcon" | "loading" | "optionDisabled" | "totalOptions" | "initialSelectedOptions" | "noOptionsText" | "hideClearButton" | "selectedOptions" | "selectionDisplay" | "onOptionsChange" | "onInputChange" | "onAddNewOption" | "allowSelectAll" | "optionComponent" | "optionsFilter" | "autoWidth" | "clearSearchOnChange" | "multiline" | "dropdownHeight" | "itemToKey" | "itemCompare" | "onClear" | "optionLabel">;
|
|
98
98
|
highlightedIndex: number;
|
|
99
99
|
selectedItem: unknown;
|
|
100
100
|
isOpen: boolean;
|
|
@@ -208,7 +208,7 @@ export declare const useAutocompleteContext: () => {
|
|
|
208
208
|
optionLabel?: (option: unknown) => string;
|
|
209
209
|
} & {
|
|
210
210
|
ref?: React.Ref<HTMLInputElement>;
|
|
211
|
-
}, "
|
|
211
|
+
}, "disabled" | "className" | "style" | "meta" | "label" | "ref" | "multiple" | "variant" | "placeholder" | "readOnly" | "options" | "helperText" | "helperIcon" | "loading" | "optionDisabled" | "totalOptions" | "initialSelectedOptions" | "noOptionsText" | "hideClearButton" | "selectedOptions" | "selectionDisplay" | "onOptionsChange" | "onInputChange" | "onAddNewOption" | "allowSelectAll" | "optionComponent" | "optionsFilter" | "autoWidth" | "clearSearchOnChange" | "multiline" | "dropdownHeight" | "itemToKey" | "itemCompare" | "onClear" | "optionLabel">;
|
|
212
212
|
highlightedIndex: number;
|
|
213
213
|
selectedItem: unknown;
|
|
214
214
|
isOpen: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DOMAttributes } from 'react';
|
|
1
2
|
import { AutocompleteProps } from './Autocomplete';
|
|
2
3
|
import { AutocompleteToken } from './Autocomplete.tokens';
|
|
3
4
|
export declare const useAutocomplete: <T>({ options, totalOptions, label, meta, className, style, disabled, readOnly, loading, hideClearButton, onOptionsChange, onAddNewOption, onInputChange, selectedOptions: _selectedOptions, selectionDisplay, multiple, itemToKey: _itemToKey, itemCompare: _itemCompare, allowSelectAll, initialSelectedOptions: _initialSelectedOptions, optionDisabled, optionsFilter, autoWidth, placeholder, optionLabel, clearSearchOnChange, multiline, dropdownHeight, optionComponent, helperText, helperIcon, noOptionsText, variant, onClear, ref, ...other }: AutocompleteProps<T> & {
|
|
@@ -26,7 +27,7 @@ export declare const useAutocomplete: <T>({ options, totalOptions, label, meta,
|
|
|
26
27
|
disabled: boolean;
|
|
27
28
|
ref: import("react").RefObject<HTMLInputElement>;
|
|
28
29
|
}>, "preventKeyAction">>;
|
|
29
|
-
consolidatedEvents: Partial<
|
|
30
|
+
consolidatedEvents: Partial<DOMAttributes<unknown>>;
|
|
30
31
|
multiple: boolean;
|
|
31
32
|
disabled: boolean;
|
|
32
33
|
optionDisabled: (option: T) => boolean;
|
|
@@ -102,7 +103,7 @@ export declare const useAutocomplete: <T>({ options, totalOptions, label, meta,
|
|
|
102
103
|
optionLabel?: (option: T) => string;
|
|
103
104
|
}) & {
|
|
104
105
|
ref?: React.Ref<HTMLInputElement>;
|
|
105
|
-
}, "
|
|
106
|
+
}, "disabled" | "className" | "style" | "meta" | "label" | "ref" | "multiple" | "variant" | "placeholder" | "readOnly" | "options" | "helperText" | "helperIcon" | "loading" | "optionDisabled" | "totalOptions" | "initialSelectedOptions" | "noOptionsText" | "hideClearButton" | "selectedOptions" | "selectionDisplay" | "onOptionsChange" | "onInputChange" | "onAddNewOption" | "allowSelectAll" | "optionComponent" | "optionsFilter" | "autoWidth" | "clearSearchOnChange" | "multiline" | "dropdownHeight" | "itemToKey" | "itemCompare" | "onClear" | "optionLabel">;
|
|
106
107
|
highlightedIndex: number;
|
|
107
108
|
selectedItem: T;
|
|
108
109
|
isOpen: boolean;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* DateRangePicker component encapsulates the logic for selecting a range of dates
|
|
3
3
|
* Either by accessible input fields or by a calendar.
|
|
4
4
|
*/
|
|
5
|
-
export declare const DateRangePicker: import("react").ForwardRefExoticComponent<Omit<import("./props").DatePickerProps, "
|
|
5
|
+
export declare const DateRangePicker: import("react").ForwardRefExoticComponent<Omit<import("./props").DatePickerProps, "value" | "defaultValue" | "onChange" | "multiple" | "showTimeInput" | "stateRef"> & Partial<{
|
|
6
6
|
onChange: (range: {
|
|
7
7
|
from: Date | null;
|
|
8
8
|
to: Date | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DateValue } from '@internationalized/date';
|
|
2
|
+
/**
|
|
3
|
+
* Generates validation error messages using the provided locale instead of
|
|
4
|
+
* navigator.language (which is what react-stately uses internally).
|
|
5
|
+
*
|
|
6
|
+
* This fixes the issue where validation messages appear in the browser's
|
|
7
|
+
* language rather than the locale configured via I18nProvider.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getLocalizedValidationErrors(validationDetails: ValidityState, locale: string, minValue?: DateValue | null, maxValue?: DateValue | null, timezone?: string): string[];
|
|
@@ -7,4 +7,4 @@ export type SideBarButtonProps = {
|
|
|
7
7
|
export declare const SideBarButton: import("react").ForwardRefExoticComponent<{
|
|
8
8
|
label: string;
|
|
9
9
|
icon: IconData;
|
|
10
|
-
} & Omit<ButtonProps, "
|
|
10
|
+
} & Omit<ButtonProps, "type" | "variant" | "href" | "fullWidth"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -2,13 +2,15 @@ import { InputHTMLAttributes, ReactNode } from 'react';
|
|
|
2
2
|
export type InputProps = {
|
|
3
3
|
/** Invalid state - shows error styling */
|
|
4
4
|
invalid?: boolean;
|
|
5
|
-
/**
|
|
5
|
+
/** Hide error icon when invalid - defaults to false (icon shows by default) */
|
|
6
|
+
hideErrorIcon?: boolean;
|
|
7
|
+
/** Text at the start (e.g., "https://", "NOK") */
|
|
6
8
|
startText?: string;
|
|
7
|
-
/** Adornment at the start (icons, buttons, etc.)
|
|
9
|
+
/** Adornment at the start (icons, buttons, etc.) */
|
|
8
10
|
startAdornment?: ReactNode;
|
|
9
|
-
/** Text at the end (e.g., "km", "%")
|
|
11
|
+
/** Text at the end (e.g., "km", "%") */
|
|
10
12
|
endText?: string;
|
|
11
|
-
/** Adornment at the end (icons, buttons, etc.)
|
|
13
|
+
/** Adornment at the end (icons, buttons, etc.) */
|
|
12
14
|
endAdornment?: ReactNode;
|
|
13
15
|
/** Render as input or textarea */
|
|
14
16
|
as?: 'input' | 'textarea';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/eds-core-react",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.7",
|
|
4
4
|
"description": "The React implementation of the Equinor Design System",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css"
|
|
@@ -40,27 +40,27 @@
|
|
|
40
40
|
"react"
|
|
41
41
|
],
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@figma/code-connect": "^1.
|
|
44
|
-
"@playwright/test": "^1.
|
|
43
|
+
"@figma/code-connect": "^1.4.1",
|
|
44
|
+
"@playwright/test": "^1.58.2",
|
|
45
45
|
"@rollup/plugin-babel": "^6.1.0",
|
|
46
|
-
"@rollup/plugin-commonjs": "^
|
|
46
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
47
47
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
48
|
-
"@storybook/addon-a11y": "^
|
|
49
|
-
"@storybook/addon-docs": "^
|
|
50
|
-
"@storybook/addon-links": "^
|
|
51
|
-
"@storybook/react-vite": "^
|
|
48
|
+
"@storybook/addon-a11y": "^10.2.10",
|
|
49
|
+
"@storybook/addon-docs": "^10.2.10",
|
|
50
|
+
"@storybook/addon-links": "^10.2.10",
|
|
51
|
+
"@storybook/react-vite": "^10.2.10",
|
|
52
52
|
"@testing-library/dom": "^10.4.1",
|
|
53
53
|
"@testing-library/jest-dom": "^6.9.1",
|
|
54
|
-
"@testing-library/react": "16.3.
|
|
54
|
+
"@testing-library/react": "16.3.2",
|
|
55
55
|
"@testing-library/user-event": "14.6.1",
|
|
56
56
|
"@types/jest": "^30.0.0",
|
|
57
57
|
"@types/mdx": "^2.0.13",
|
|
58
|
-
"@types/node": "^
|
|
58
|
+
"@types/node": "^25.3.0",
|
|
59
59
|
"@types/ramda": "^0.31.1",
|
|
60
|
-
"@types/react": "^19.2.
|
|
61
|
-
"@types/react-dom": "^19.2.
|
|
60
|
+
"@types/react": "^19.2.14",
|
|
61
|
+
"@types/react-dom": "^19.2.3",
|
|
62
62
|
"babel-plugin-styled-components": "^2.1.4",
|
|
63
|
-
"eslint-plugin-storybook": "
|
|
63
|
+
"eslint-plugin-storybook": "10.2.10",
|
|
64
64
|
"jest": "^30.2.0",
|
|
65
65
|
"jest-environment-jsdom": "^30.2.0",
|
|
66
66
|
"jest-styled-components": "^7.2.0",
|
|
@@ -68,16 +68,16 @@
|
|
|
68
68
|
"postcss": "^8.5.6",
|
|
69
69
|
"postcss-import": "^16.1.1",
|
|
70
70
|
"ramda": "^0.32.0",
|
|
71
|
-
"react": "^19.2.
|
|
72
|
-
"react-dom": "^19.2.
|
|
73
|
-
"react-hook-form": "^7.
|
|
74
|
-
"react-router-dom": "^7.
|
|
75
|
-
"rollup": "^4.
|
|
76
|
-
"rollup-plugin-delete": "^3.0.
|
|
71
|
+
"react": "^19.2.4",
|
|
72
|
+
"react-dom": "^19.2.4",
|
|
73
|
+
"react-hook-form": "^7.71.2",
|
|
74
|
+
"react-router-dom": "^7.13.0",
|
|
75
|
+
"rollup": "^4.57.1",
|
|
76
|
+
"rollup-plugin-delete": "^3.0.2",
|
|
77
77
|
"rollup-plugin-postcss": "^4.0.2",
|
|
78
78
|
"rollup-preserve-directives": "^1.1.3",
|
|
79
|
-
"storybook": "^
|
|
80
|
-
"styled-components": "6.
|
|
79
|
+
"storybook": "^10.2.10",
|
|
80
|
+
"styled-components": "6.3.11",
|
|
81
81
|
"tsc-watch": "^7.2.0",
|
|
82
82
|
"typescript": "^5.9.3"
|
|
83
83
|
},
|
|
@@ -87,19 +87,19 @@
|
|
|
87
87
|
"styled-components": "^6"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@babel/runtime": "^7.28.
|
|
91
|
-
"@floating-ui/react": "^0.27.
|
|
92
|
-
"@internationalized/date": "^3.
|
|
93
|
-
"@react-aria/utils": "^3.
|
|
94
|
-
"@react-stately/calendar": "^3.9.
|
|
95
|
-
"@react-stately/datepicker": "^3.
|
|
96
|
-
"@react-types/shared": "^3.
|
|
97
|
-
"@tanstack/react-virtual": "3.13.
|
|
98
|
-
"downshift": "9.
|
|
99
|
-
"react-aria": "^3.
|
|
100
|
-
"@equinor/eds-
|
|
90
|
+
"@babel/runtime": "^7.28.6",
|
|
91
|
+
"@floating-ui/react": "^0.27.18",
|
|
92
|
+
"@internationalized/date": "^3.11.0",
|
|
93
|
+
"@react-aria/utils": "^3.33.0",
|
|
94
|
+
"@react-stately/calendar": "^3.9.2",
|
|
95
|
+
"@react-stately/datepicker": "^3.16.0",
|
|
96
|
+
"@react-types/shared": "^3.33.0",
|
|
97
|
+
"@tanstack/react-virtual": "3.13.18",
|
|
98
|
+
"downshift": "9.3.2",
|
|
99
|
+
"react-aria": "^3.46.0",
|
|
100
|
+
"@equinor/eds-tokens": "^2.2.0",
|
|
101
101
|
"@equinor/eds-utils": "^2.0.0",
|
|
102
|
-
"@equinor/eds-
|
|
102
|
+
"@equinor/eds-icons": "^1.3.0"
|
|
103
103
|
},
|
|
104
104
|
"scripts": {
|
|
105
105
|
"build": "rollup -c && tsc -p tsconfig.build.json",
|