@equinor/eds-core-react 2.3.7 → 2.4.0-beta.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 (49) hide show
  1. package/build/index.css +389 -39
  2. package/build/index.min.css +1 -1
  3. package/dist/eds-core-react.cjs +29 -23
  4. package/dist/esm/components/Autocomplete/AutocompleteContext.js +2 -2
  5. package/dist/esm/components/Autocomplete/MultipleInput.js +2 -2
  6. package/dist/esm/components/Autocomplete/OptionList.js +6 -4
  7. package/dist/esm/components/Autocomplete/useAutocomplete.js +4 -0
  8. package/dist/esm/components/Datepicker/calendars/CalendarGrid.js +4 -8
  9. package/dist/esm/components/Datepicker/calendars/CalendarHeader.js +6 -6
  10. package/dist/esm/components/Datepicker/fields/DateSegment.js +4 -1
  11. package/dist/esm/components/InputWrapper/InputWrapper.js +1 -1
  12. package/dist/esm/components/Popover/Popover.js +4 -4
  13. package/dist/esm/components/Textarea/Textarea.js +1 -1
  14. package/dist/esm-next/components/next/Banner/Banner.js +88 -0
  15. package/dist/esm-next/components/next/Button/Button.js +1 -0
  16. package/dist/esm-next/components/next/Icon/Icon.js +27 -1
  17. package/dist/esm-next/components/next/Input/Input.js +1 -1
  18. package/dist/esm-next/components/next/Link/Link.js +24 -0
  19. package/dist/esm-next/components/next/Search/Search.js +118 -0
  20. package/dist/esm-next/components/next/TextArea/TextArea.js +131 -0
  21. package/dist/esm-next/components/next/Tooltip/Tooltip.js +84 -0
  22. package/dist/esm-next/index.next.js +5 -0
  23. package/dist/index.next.cjs +445 -6
  24. package/dist/types/components/Autocomplete/AutocompleteContext.d.ts +2 -2
  25. package/dist/types/components/Autocomplete/useAutocomplete.d.ts +2 -2
  26. package/dist/types/components/next/Banner/Banner.d.ts +23 -0
  27. package/dist/types/components/next/Banner/Banner.figma.d.ts +1 -0
  28. package/dist/types/components/next/Banner/Banner.types.d.ts +33 -0
  29. package/dist/types/components/next/Banner/index.d.ts +2 -0
  30. package/dist/types/components/next/Icon/Icon.d.ts +0 -1
  31. package/dist/types/components/next/Input/Input.types.d.ts +4 -1
  32. package/dist/types/components/next/Link/Link.d.ts +4 -0
  33. package/dist/types/components/next/Link/Link.figma.d.ts +1 -0
  34. package/dist/types/components/next/Link/Link.types.d.ts +11 -0
  35. package/dist/types/components/next/Link/index.d.ts +2 -0
  36. package/dist/types/components/next/Search/Search.d.ts +9 -0
  37. package/dist/types/components/next/Search/Search.figma.d.ts +1 -0
  38. package/dist/types/components/next/Search/Search.types.d.ts +16 -0
  39. package/dist/types/components/next/Search/index.d.ts +2 -0
  40. package/dist/types/components/next/TextArea/TextArea.d.ts +11 -0
  41. package/dist/types/components/next/TextArea/TextArea.figma.d.ts +1 -0
  42. package/dist/types/components/next/TextArea/TextArea.types.d.ts +21 -0
  43. package/dist/types/components/next/TextArea/index.d.ts +2 -0
  44. package/dist/types/components/next/Tooltip/Tooltip.d.ts +7 -0
  45. package/dist/types/components/next/Tooltip/Tooltip.figma.d.ts +1 -0
  46. package/dist/types/components/next/Tooltip/Tooltip.types.d.ts +17 -0
  47. package/dist/types/components/next/Tooltip/index.d.ts +2 -0
  48. package/dist/types/components/next/index.d.ts +10 -0
  49. package/package.json +41 -34
@@ -0,0 +1,33 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ export type BannerTone = 'info' | 'warning' | 'danger' | 'success';
3
+ export type BannerActionsPlacement = 'left' | 'bottom';
4
+ export type BannerProps = {
5
+ /** Visual tone of the banner
6
+ * @default 'info'
7
+ */
8
+ tone?: BannerTone;
9
+ /**
10
+ * ARIA role. Use `'alert'` for urgent messages that require immediate attention.
11
+ * @default 'status'
12
+ */
13
+ role?: HTMLAttributes<HTMLDivElement>['role'];
14
+ /** Callback when the dismiss button is clicked. When provided, a close button is rendered. */
15
+ onDismiss?: () => void;
16
+ children: ReactNode;
17
+ } & HTMLAttributes<HTMLDivElement>;
18
+ export type BannerIconProps = {
19
+ children: ReactNode;
20
+ } & HTMLAttributes<HTMLSpanElement>;
21
+ export type BannerMessageProps = {
22
+ children: ReactNode;
23
+ } & HTMLAttributes<HTMLParagraphElement>;
24
+ export type BannerActionsProps = {
25
+ /**
26
+ * Where to place the actions relative to the message.
27
+ * - `left`: Actions appear inline to the right of the message
28
+ * - `bottom`: Actions appear below the message, spanning full width
29
+ * @default 'left'
30
+ */
31
+ placement?: BannerActionsPlacement;
32
+ children: ReactNode;
33
+ } & HTMLAttributes<HTMLDivElement>;
@@ -0,0 +1,2 @@
1
+ export { Banner } from './Banner';
2
+ export type { BannerProps, BannerTone, BannerIconProps, BannerMessageProps, BannerActionsProps, BannerActionsPlacement, } from './Banner.types';
@@ -1,5 +1,4 @@
1
1
  import type { IconProps } from './Icon.types';
2
- import './icon.css';
3
2
  /**
4
3
  * Icon component for EDS 2.0
5
4
  *
@@ -12,7 +12,10 @@ export type InputProps = {
12
12
  endText?: string;
13
13
  /** Adornment at the end (icons, buttons, etc.) */
14
14
  endAdornment?: ReactNode;
15
- /** Render as input or textarea */
15
+ /**
16
+ * Render as input or textarea.
17
+ * @internal Use the TextArea component instead of `as="textarea"`.
18
+ */
16
19
  as?: 'input' | 'textarea';
17
20
  /** Class name applied to the container element */
18
21
  containerClassName?: string;
@@ -0,0 +1,4 @@
1
+ export declare const Link: import("react").ForwardRefExoticComponent<{
2
+ href: string;
3
+ variant?: import("./Link.types").LinkVariant;
4
+ } & Omit<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, "href"> & import("react").RefAttributes<HTMLAnchorElement>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { AnchorHTMLAttributes } from 'react';
2
+ export type LinkVariant = 'inline' | 'standalone';
3
+ export type LinkProps = {
4
+ /** Link destination URL */
5
+ href: string;
6
+ /** Visual variant
7
+ * - `inline` (default): used within text, inherits surrounding font size
8
+ * - `standalone`: used on its own with flex layout, compose icons as children
9
+ */
10
+ variant?: LinkVariant;
11
+ } & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>;
@@ -0,0 +1,2 @@
1
+ export { Link } from './Link';
2
+ export type { LinkProps, LinkVariant } from './Link.types';
@@ -0,0 +1,9 @@
1
+ import './search.css';
2
+ export declare const Search: import("react").ForwardRefExoticComponent<{
3
+ label?: import("react").ReactNode;
4
+ description?: import("react").ReactNode;
5
+ helperMessage?: import("react").ReactNode;
6
+ id?: string;
7
+ onClear?: () => void;
8
+ clearLabel?: string;
9
+ } & Omit<import("..").InputProps, "type" | "as" | "hideErrorIcon" | "startText" | "startAdornment" | "endText" | "endAdornment"> & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,16 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { InputProps } from '../Input/Input.types';
3
+ export type SearchProps = {
4
+ /** Label for the field */
5
+ label?: ReactNode;
6
+ /** Descriptive text that provides additional context for the field */
7
+ description?: ReactNode;
8
+ /** Helper or validation message shown below the input */
9
+ helperMessage?: ReactNode;
10
+ /** Unique identifier for the field */
11
+ id?: string;
12
+ /** Callback fired when the clear button is clicked */
13
+ onClear?: () => void;
14
+ /** Accessible label for the clear button. Defaults to "Clear search". Override for localisation. */
15
+ clearLabel?: string;
16
+ } & Omit<InputProps, 'startAdornment' | 'endAdornment' | 'startText' | 'endText' | 'as' | 'hideErrorIcon' | 'type'>;
@@ -0,0 +1,2 @@
1
+ export { Search } from './Search';
2
+ export type { SearchProps } from './Search.types';
@@ -0,0 +1,11 @@
1
+ export declare const TextArea: import("react").ForwardRefExoticComponent<{
2
+ label?: import("react").ReactNode;
3
+ labelInfo?: string;
4
+ indicator?: string;
5
+ description?: import("react").ReactNode;
6
+ helperMessage?: import("react").ReactNode;
7
+ id?: string;
8
+ invalid?: boolean;
9
+ maxRows?: number;
10
+ showCharacterCount?: boolean;
11
+ } & Omit<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, "id"> & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -0,0 +1,21 @@
1
+ import type { ReactNode, TextareaHTMLAttributes } from 'react';
2
+ export type TextAreaProps = {
3
+ /** Label for the field */
4
+ label?: ReactNode;
5
+ /** Info tooltip content shown next to the label */
6
+ labelInfo?: string;
7
+ /** Indicator text shown after label, e.g. "(Required)" or "(Optional)" */
8
+ indicator?: string;
9
+ /** Descriptive text that provides additional context for the field */
10
+ description?: ReactNode;
11
+ /** Helper or validation message shown below the textarea */
12
+ helperMessage?: ReactNode;
13
+ /** Unique identifier for the field */
14
+ id?: string;
15
+ /** Invalid state - shows error styling */
16
+ invalid?: boolean;
17
+ /** Maximum number of rows before the textarea stops growing and becomes scrollable */
18
+ maxRows?: number;
19
+ /** Show a character count below the textarea. Displays "n / max" when `maxLength` is set, otherwise just "n" */
20
+ showCharacterCount?: boolean;
21
+ } & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'id'>;
@@ -0,0 +1,2 @@
1
+ export { TextArea } from './TextArea';
2
+ export type { TextAreaProps } from './TextArea.types';
@@ -0,0 +1,7 @@
1
+ import { type HTMLAttributes, type ReactElement } from 'react';
2
+ export declare const Tooltip: import("react").ForwardRefExoticComponent<{
3
+ title?: string;
4
+ placement?: import("./Tooltip.types").TooltipPlacement;
5
+ disabled?: boolean;
6
+ children: ReactElement<HTMLAttributes<HTMLElement>>;
7
+ } & Omit<HTMLAttributes<HTMLDivElement>, "title"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,17 @@
1
+ import type { HTMLAttributes, ReactElement } from 'react';
2
+ export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
3
+ export type TooltipProps = {
4
+ /** Text displayed inside the tooltip bubble */
5
+ title?: string;
6
+ /** Placement of the tooltip relative to the anchor element
7
+ * @default 'top'
8
+ */
9
+ placement?: TooltipPlacement;
10
+ /** Disable the tooltip */
11
+ disabled?: boolean;
12
+ /** The element that triggers the tooltip on hover/focus.
13
+ * Must be a single React element. The trigger is wrapped in an inline-block span
14
+ * for anchor positioning — use a wrapper div if full-width layout is needed.
15
+ */
16
+ children: ReactElement<HTMLAttributes<HTMLElement>>;
17
+ } & Omit<HTMLAttributes<HTMLDivElement>, 'title'>;
@@ -0,0 +1,2 @@
1
+ export { Tooltip } from './Tooltip';
2
+ export type { TooltipPlacement, TooltipProps } from './Tooltip.types';
@@ -14,3 +14,13 @@ export { Input } from './Input';
14
14
  export type { InputProps } from './Input';
15
15
  export { TextField } from './TextField';
16
16
  export type { TextFieldProps } from './TextField';
17
+ export { TextArea } from './TextArea';
18
+ export type { TextAreaProps } from './TextArea';
19
+ export { Search } from './Search';
20
+ export type { SearchProps } from './Search';
21
+ export { Link } from './Link';
22
+ export type { LinkProps, LinkVariant } from './Link';
23
+ export { Tooltip } from './Tooltip';
24
+ export type { TooltipPlacement, TooltipProps } from './Tooltip';
25
+ export { Banner } from './Banner';
26
+ export type { BannerProps, BannerTone, BannerIconProps, BannerMessageProps, BannerActionsProps, BannerActionsPlacement, } from './Banner';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/eds-core-react",
3
- "version": "2.3.7",
3
+ "version": "2.4.0-beta.0",
4
4
  "description": "The React implementation of the Equinor Design System",
5
5
  "sideEffects": [
6
6
  "**/*.css"
@@ -31,7 +31,14 @@
31
31
  "types": "./dist/types/index.d.ts",
32
32
  "import": "./dist/esm/index.js",
33
33
  "require": "./dist/eds-core-react.cjs"
34
- }
34
+ },
35
+ "./next": {
36
+ "types": "./dist/types/index.next.d.ts",
37
+ "import": "./dist/esm-next/index.next.js",
38
+ "require": "./dist/index.next.cjs"
39
+ },
40
+ "./next/index.css": "./build/index.css",
41
+ "./next/index.min.css": "./build/index.min.css"
35
42
  },
36
43
  "keywords": [
37
44
  "eds",
@@ -40,66 +47,66 @@
40
47
  "react"
41
48
  ],
42
49
  "devDependencies": {
43
- "@figma/code-connect": "^1.4.1",
44
- "@playwright/test": "^1.58.2",
45
- "@rollup/plugin-babel": "^6.1.0",
46
- "@rollup/plugin-commonjs": "^29.0.0",
50
+ "@figma/code-connect": "^1.4.3",
51
+ "@playwright/test": "^1.59.1",
52
+ "@rollup/plugin-babel": "^7.0.0",
53
+ "@rollup/plugin-commonjs": "^29.0.2",
47
54
  "@rollup/plugin-node-resolve": "^16.0.3",
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",
55
+ "@storybook/addon-a11y": "^10.3.3",
56
+ "@storybook/addon-docs": "^10.3.3",
57
+ "@storybook/addon-links": "^10.3.3",
58
+ "@storybook/react-vite": "^10.3.3",
52
59
  "@testing-library/dom": "^10.4.1",
53
60
  "@testing-library/jest-dom": "^6.9.1",
54
61
  "@testing-library/react": "16.3.2",
55
62
  "@testing-library/user-event": "14.6.1",
56
63
  "@types/jest": "^30.0.0",
57
64
  "@types/mdx": "^2.0.13",
58
- "@types/node": "^25.3.0",
65
+ "@types/node": "^25.5.0",
59
66
  "@types/ramda": "^0.31.1",
60
67
  "@types/react": "^19.2.14",
61
68
  "@types/react-dom": "^19.2.3",
62
69
  "babel-plugin-styled-components": "^2.1.4",
63
- "eslint-plugin-storybook": "10.2.10",
64
- "jest": "^30.2.0",
65
- "jest-environment-jsdom": "^30.2.0",
66
- "jest-styled-components": "^7.2.0",
70
+ "eslint-plugin-storybook": "10.3.3",
71
+ "jest": "^30.3.0",
72
+ "jest-environment-jsdom": "^30.3.0",
73
+ "jest-styled-components": "^7.4.0",
67
74
  "js-file-download": "^0.4.12",
68
- "postcss": "^8.5.6",
75
+ "postcss": "^8.5.8",
69
76
  "postcss-import": "^16.1.1",
70
77
  "ramda": "^0.32.0",
71
78
  "react": "^19.2.4",
72
79
  "react-dom": "^19.2.4",
73
- "react-hook-form": "^7.71.2",
74
- "react-router-dom": "^7.13.0",
75
- "rollup": "^4.57.1",
80
+ "react-hook-form": "^7.72.0",
81
+ "react-router-dom": "^7.13.2",
82
+ "rollup": "^4.60.1",
76
83
  "rollup-plugin-delete": "^3.0.2",
77
84
  "rollup-plugin-postcss": "^4.0.2",
78
85
  "rollup-preserve-directives": "^1.1.3",
79
- "storybook": "^10.2.10",
80
- "styled-components": "6.3.11",
86
+ "storybook": "^10.3.3",
87
+ "styled-components": "6.3.12",
81
88
  "tsc-watch": "^7.2.0",
82
89
  "typescript": "^5.9.3"
83
90
  },
84
91
  "peerDependencies": {
85
- "react": "^19",
86
- "react-dom": "^19",
92
+ "react": "^18 || ^19",
93
+ "react-dom": "^18 || ^19",
87
94
  "styled-components": "^6"
88
95
  },
89
96
  "dependencies": {
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",
97
+ "@babel/runtime": "^7.29.2",
98
+ "@floating-ui/react": "^0.27.19",
99
+ "@internationalized/date": "^3.12.0",
100
+ "@react-aria/utils": "^3.33.1",
101
+ "@react-stately/calendar": "^3.9.3",
102
+ "@react-stately/datepicker": "^3.16.1",
103
+ "@react-types/shared": "^3.33.1",
104
+ "@tanstack/react-virtual": "3.13.23",
98
105
  "downshift": "9.3.2",
99
- "react-aria": "^3.46.0",
106
+ "react-aria": "^3.47.0",
107
+ "@equinor/eds-icons": "^1.3.0",
100
108
  "@equinor/eds-tokens": "^2.2.0",
101
- "@equinor/eds-utils": "^2.0.0",
102
- "@equinor/eds-icons": "^1.3.0"
109
+ "@equinor/eds-utils": "^2.1.0"
103
110
  },
104
111
  "scripts": {
105
112
  "build": "rollup -c && tsc -p tsconfig.build.json",