@equinor/eds-core-react 0.40.0 → 0.40.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.
Files changed (53) hide show
  1. package/dist/eds-core-react.cjs +2 -6
  2. package/dist/esm/components/Autocomplete/Autocomplete.js +3 -3
  3. package/dist/esm/components/Autocomplete/Autocomplete.tokens.js +1 -1
  4. package/dist/esm/components/Button/tokens/contained.js +1 -1
  5. package/dist/esm/components/Button/tokens/contained_icon.js +1 -1
  6. package/dist/esm/components/Button/tokens/ghost.js +1 -1
  7. package/dist/esm/components/Button/tokens/icon.js +1 -1
  8. package/dist/esm/components/Button/tokens/outlined.js +1 -1
  9. package/dist/esm/components/Input/Input.tokens.js +1 -1
  10. package/dist/esm/components/InputWrapper/InputWrapper.tokens.js +1 -1
  11. package/dist/esm/components/Table/DataCell/DataCell.tokens.js +1 -1
  12. package/dist/esm/node_modules/.pnpm/ramda@0.30.1/node_modules/ramda/es/internal/_isPlaceholder.js +5 -0
  13. package/dist/types/components/Autocomplete/Autocomplete.d.ts +1 -89
  14. package/dist/types/components/Banner/BannerMessage.d.ts +0 -1
  15. package/dist/types/components/Card/Card.d.ts +1 -1
  16. package/dist/types/components/Chip/Chip.d.ts +1 -1
  17. package/dist/types/components/Chip/Icon.d.ts +20 -3
  18. package/dist/types/components/Datepicker/DatePicker.d.ts +3 -4
  19. package/dist/types/components/Datepicker/DateRangePicker.d.ts +7 -8
  20. package/dist/types/components/Datepicker/calendars/CalendarWrapper.d.ts +0 -1
  21. package/dist/types/components/Datepicker/fields/DateFieldSegments.d.ts +0 -1
  22. package/dist/types/components/Datepicker/fields/DateRangeField.d.ts +0 -1
  23. package/dist/types/components/Datepicker/fields/FieldWrapper.d.ts +1 -1
  24. package/dist/types/components/Dialog/DialogActions.d.ts +0 -1
  25. package/dist/types/components/Dialog/DialogTitle.d.ts +0 -1
  26. package/dist/types/components/Divider/Divider.d.ts +3 -3
  27. package/dist/types/components/Icon/Icon.d.ts +48 -3
  28. package/dist/types/components/List/List.d.ts +1 -1
  29. package/dist/types/components/List/ListItem.d.ts +0 -1
  30. package/dist/types/components/Paper/Paper.d.ts +0 -1
  31. package/dist/types/components/Progress/Linear/LinearProgress.d.ts +1 -1
  32. package/dist/types/components/SideBar/SideBarButton/index.d.ts +0 -1
  33. package/dist/types/components/SideSheet/SideSheet.d.ts +1 -1
  34. package/dist/types/components/Snackbar/Snackbar.d.ts +1 -1
  35. package/dist/types/components/Switch/Switch.d.ts +1 -1
  36. package/dist/types/components/Switch/Switch.styles.d.ts +0 -1
  37. package/dist/types/components/Table/HeaderCell/HeaderCell.d.ts +1 -1
  38. package/dist/types/components/Table/Inner.context.d.ts +0 -1
  39. package/dist/types/components/Table/Row/Row.d.ts +0 -1
  40. package/dist/types/components/Tabs/Tabs.context.d.ts +0 -1
  41. package/package.json +40 -40
  42. package/dist/esm/node_modules/.pnpm/ramda@0.30.0/node_modules/ramda/es/internal/_isPlaceholder.js +0 -7
  43. package/dist/esm/node_modules/.pnpm/ramda@0.30.0/node_modules/ramda/es/internal/_placeholder.js +0 -5
  44. /package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.30.1}/node_modules/ramda/es/internal/_curry1.js +0 -0
  45. /package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.30.1}/node_modules/ramda/es/internal/_curry2.js +0 -0
  46. /package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.30.1}/node_modules/ramda/es/internal/_curry3.js +0 -0
  47. /package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.30.1}/node_modules/ramda/es/internal/_has.js +0 -0
  48. /package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.30.1}/node_modules/ramda/es/internal/_isObject.js +0 -0
  49. /package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.30.1}/node_modules/ramda/es/mergeDeepRight.js +0 -0
  50. /package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.30.1}/node_modules/ramda/es/mergeDeepWithKey.js +0 -0
  51. /package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.30.1}/node_modules/ramda/es/mergeWith.js +0 -0
  52. /package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.30.1}/node_modules/ramda/es/mergeWithKey.js +0 -0
  53. /package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.30.1}/node_modules/ramda/es/pickBy.js +0 -0
@@ -172,12 +172,8 @@ const button = {
172
172
  }
173
173
  };
174
174
 
175
- var _placeholder = {
176
- '@@functional/placeholder': true
177
- };
178
-
179
175
  function _isPlaceholder(a) {
180
- return a === _placeholder;
176
+ return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;
181
177
  }
182
178
 
183
179
  /**
@@ -9975,7 +9971,7 @@ function AutocompleteInner(props, ref) {
9975
9971
  } = react$1.useFloating({
9976
9972
  placement: 'bottom-start',
9977
9973
  middleware: [react$1.offset(4), react$1.flip({
9978
- boundary: document?.body
9974
+ boundary: typeof document === 'undefined' ? undefined : document?.body
9979
9975
  }), react$1.size({
9980
9976
  apply({
9981
9977
  rects,
@@ -12,8 +12,8 @@ import { bordersTemplate, useToken, useIsomorphicLayoutEffect } from '@equinor/e
12
12
  import { AutocompleteOption } from './Option.js';
13
13
  import { useFloating, offset, flip, size, useInteractions, autoUpdate } from '@floating-ui/react';
14
14
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
15
- import pickBy from '../../node_modules/.pnpm/ramda@0.30.0/node_modules/ramda/es/pickBy.js';
16
- import mergeWith from '../../node_modules/.pnpm/ramda@0.30.0/node_modules/ramda/es/mergeWith.js';
15
+ import pickBy from '../../node_modules/.pnpm/ramda@0.30.1/node_modules/ramda/es/pickBy.js';
16
+ import mergeWith from '../../node_modules/.pnpm/ramda@0.30.1/node_modules/ramda/es/mergeWith.js';
17
17
  import { HelperText as TextfieldHelperText } from '../InputWrapper/HelperText/HelperText.js';
18
18
  import { useEds } from '../EdsProvider/eds.context.js';
19
19
  import { Label } from '../Label/Label.js';
@@ -579,7 +579,7 @@ function AutocompleteInner(props, ref) {
579
579
  } = useFloating({
580
580
  placement: 'bottom-start',
581
581
  middleware: [offset(4), flip({
582
- boundary: document?.body
582
+ boundary: typeof document === 'undefined' ? undefined : document?.body
583
583
  }), size({
584
584
  apply({
585
585
  rects,
@@ -1,5 +1,5 @@
1
1
  import { tokens } from '@equinor/eds-tokens';
2
- import mergeDeepRight from '../../node_modules/.pnpm/ramda@0.30.0/node_modules/ramda/es/mergeDeepRight.js';
2
+ import mergeDeepRight from '../../node_modules/.pnpm/ramda@0.30.1/node_modules/ramda/es/mergeDeepRight.js';
3
3
 
4
4
  const {
5
5
  typography,
@@ -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.30.0/node_modules/ramda/es/mergeDeepRight.js';
3
+ import mergeDeepRight from '../../../node_modules/.pnpm/ramda@0.30.1/node_modules/ramda/es/mergeDeepRight.js';
4
4
 
5
5
  const {
6
6
  colors: {
@@ -1,6 +1,6 @@
1
1
  import { tokens } from '@equinor/eds-tokens';
2
2
  import { primary as primary$1, secondary as secondary$1, danger as danger$1 } from './contained.js';
3
- import mergeDeepRight from '../../../node_modules/.pnpm/ramda@0.30.0/node_modules/ramda/es/mergeDeepRight.js';
3
+ import mergeDeepRight from '../../../node_modules/.pnpm/ramda@0.30.1/node_modules/ramda/es/mergeDeepRight.js';
4
4
 
5
5
  const {
6
6
  clickbounds: {
@@ -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.30.0/node_modules/ramda/es/mergeDeepRight.js';
3
+ import mergeDeepRight from '../../../node_modules/.pnpm/ramda@0.30.1/node_modules/ramda/es/mergeDeepRight.js';
4
4
 
5
5
  const {
6
6
  colors: {
@@ -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.30.0/node_modules/ramda/es/mergeDeepRight.js';
3
+ import mergeDeepRight from '../../../node_modules/.pnpm/ramda@0.30.1/node_modules/ramda/es/mergeDeepRight.js';
4
4
 
5
5
  const {
6
6
  colors: {
@@ -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.30.0/node_modules/ramda/es/mergeDeepRight.js';
3
+ import mergeDeepRight from '../../../node_modules/.pnpm/ramda@0.30.1/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.30.0/node_modules/ramda/es/mergeDeepRight.js';
2
+ import mergeDeepRight from '../../node_modules/.pnpm/ramda@0.30.1/node_modules/ramda/es/mergeDeepRight.js';
3
3
 
4
4
  const {
5
5
  colors: {
@@ -1,5 +1,5 @@
1
1
  import { tokens } from '@equinor/eds-tokens';
2
- import mergeDeepRight from '../../node_modules/.pnpm/ramda@0.30.0/node_modules/ramda/es/mergeDeepRight.js';
2
+ import mergeDeepRight from '../../node_modules/.pnpm/ramda@0.30.1/node_modules/ramda/es/mergeDeepRight.js';
3
3
 
4
4
  const {
5
5
  colors: {
@@ -1,5 +1,5 @@
1
1
  import { tokens } from '@equinor/eds-tokens';
2
- import mergeDeepRight from '../../../node_modules/.pnpm/ramda@0.30.0/node_modules/ramda/es/mergeDeepRight.js';
2
+ import mergeDeepRight from '../../../node_modules/.pnpm/ramda@0.30.1/node_modules/ramda/es/mergeDeepRight.js';
3
3
 
4
4
  const {
5
5
  typography: {
@@ -0,0 +1,5 @@
1
+ function _isPlaceholder(a) {
2
+ return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;
3
+ }
4
+
5
+ export { _isPlaceholder as default };
@@ -93,95 +93,7 @@ export type AutocompleteProps<T> = {
93
93
  itemCompare?: (value: T, compare: T) => boolean;
94
94
  } & HTMLAttributes<HTMLDivElement>;
95
95
  declare function AutocompleteInner<T>(props: AutocompleteProps<T>, ref: React.ForwardedRef<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
96
- export declare const Autocomplete: <T>(props: {
97
- /** List of options in dropdown */
98
- options: readonly T[];
99
- /** Label for the select element */
100
- label: ReactNode;
101
- /** Array of initial selected items
102
- * @default []
103
- */
104
- initialSelectedOptions?: T[];
105
- /** Text that will be displayed under the text field */
106
- helperText?: string;
107
- /** Icon that will be displayed before the helper text */
108
- helperIcon?: ReactNode;
109
- /** Set text for the "no options" item. Set to an empty string to force off
110
- * @default 'No options'
111
- */
112
- noOptionsText?: string;
113
- /** Variants */
114
- variant?: Variants;
115
- /** Meta text, for instance unit */
116
- meta?: ReactNode;
117
- /** Disabled state
118
- * @default false
119
- */
120
- disabled?: boolean;
121
- /** Set loading state (shows a spinner in the right side of the input field)
122
- * @default false
123
- */
124
- loading?: boolean;
125
- /** Read Only
126
- * @default false
127
- */
128
- readOnly?: boolean;
129
- /** Hide clear button even when items are selected
130
- * @default false
131
- */
132
- hideClearButton?: boolean;
133
- /** If this prop is used, the select will become a controlled component. Use an empty
134
- * array [] if there will be no initial selected items.
135
- * Note that this prop replaces the need for ```initialSelectedOptions```
136
- * The items that should be selected. */
137
- selectedOptions?: T[];
138
- /** Callback for the selected item change
139
- * changes.selectedItems gives the selected items
140
- */
141
- onOptionsChange?: (changes: AutocompleteChanges<T>) => void;
142
- /** Callback for input changes.
143
- * Returns input value
144
- */
145
- onInputChange?: (text: string) => void;
146
- /** Enable multiselect */
147
- multiple?: boolean;
148
- /** Add select-all option. Throws an error if true while multiple = false */
149
- allowSelectAll?: boolean;
150
- /** Custom option label. NOTE: This is required when option is an object */
151
- optionLabel?: (option: T) => string;
152
- /** Custom option template */
153
- optionComponent?: (option: T, isSelected: boolean) => ReactNode;
154
- /** Disable use of react portal for dropdown
155
- * @deprecated Autocomplete now uses the native popover api to render the dropdown. This prop will be removed in a future version
156
- */
157
- disablePortal?: boolean;
158
- /** Disable option
159
- * @default () => false
160
- */
161
- optionDisabled?: (option: T) => boolean;
162
- /** Custom filter function for options */
163
- optionsFilter?: (option: T, inputValue: string) => boolean;
164
- /** If `true` the width of the dropdown will adjust to the width of the input */
165
- autoWidth?: boolean;
166
- /** Descriptive text for whats selected or about to be selected */
167
- placeholder?: string;
168
- /** Toggle if input is cleared when an option is selected when `multiple` is `true`
169
- * @default true
170
- */
171
- clearSearchOnChange?: boolean;
172
- /** Will wrap overflowing text at the expence of some performance overhead to calculate item heigths. Mostly relevant in combination with autoWidth
173
- * @default false
174
- */
175
- multiline?: boolean;
176
- /** Override default max height on dropdown (in px)
177
- * @default 300
178
- */
179
- dropdownHeight?: number;
180
- /**
181
- * Method that is used to compare objects by value. If omitted, objects are matched by reference.
182
- */
183
- itemCompare?: (value: T, compare: T) => boolean;
184
- } & HTMLAttributes<HTMLDivElement> & {
96
+ export declare const Autocomplete: <T>(props: AutocompleteProps<T> & {
185
97
  ref?: React.ForwardedRef<HTMLDivElement>;
186
98
  /** @ignore */
187
99
  displayName?: string | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TypographyProps } from '../Typography/Typography';
3
2
  export type BannerMessageProps = {
4
3
  /** Text content */
@@ -9,7 +9,7 @@ export type CardProps = {
9
9
  } & HTMLAttributes<HTMLDivElement>;
10
10
  export declare const Card: import("react").ForwardRefExoticComponent<{
11
11
  /** Variant */
12
- variant?: 'default' | 'info' | 'warning' | 'danger';
12
+ variant?: "default" | "info" | "warning" | "danger";
13
13
  /** Elevation */
14
14
  elevation?: AvailableElevations;
15
15
  } & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
@@ -13,5 +13,5 @@ export declare const Chip: import("react").ForwardRefExoticComponent<{
13
13
  /** Delete callback */
14
14
  onDelete?: (Event: any) => void;
15
15
  /** Variant */
16
- variant?: 'active' | 'error' | 'default';
16
+ variant?: "active" | "error" | "default";
17
17
  } & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,9 +1,26 @@
1
- /// <reference types="react" />
2
1
  type IconProps = {
3
2
  $variant: 'active' | 'error' | 'default';
4
3
  $disabled: boolean;
5
4
  };
6
- export declare const Icon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<Omit<import("../Icon").IconProps, "ref"> & import("react").RefAttributes<SVGSVGElement>, "ref"> & {
5
+ export declare const Icon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<(Omit<Omit<{
6
+ title?: string;
7
+ color?: string;
8
+ size?: 16 | 18 | 24 | 32 | 40 | 48;
9
+ rotation?: 0 | 90 | 180 | 270;
10
+ name: import("../Icon/Icon.types").Name;
11
+ data?: import("@equinor/eds-icons").IconData;
7
12
  ref?: import("react").Ref<SVGSVGElement>;
8
- }, IconProps>> & string & Omit<import("../Icon/Icon.types").IconType, keyof import("react").Component<any, {}, any>>;
13
+ } & import("react").SVGProps<SVGSVGElement>, "ref"> & import("react").RefAttributes<SVGSVGElement>, "ref"> & {
14
+ ref?: import("react").Ref<SVGSVGElement>;
15
+ }) | (Omit<Omit<{
16
+ title?: string;
17
+ color?: string;
18
+ size?: 16 | 18 | 24 | 32 | 40 | 48;
19
+ rotation?: 0 | 90 | 180 | 270;
20
+ name?: import("../Icon/Icon.types").Name;
21
+ data: import("@equinor/eds-icons").IconData;
22
+ ref?: import("react").Ref<SVGSVGElement>;
23
+ } & import("react").SVGProps<SVGSVGElement>, "ref"> & import("react").RefAttributes<SVGSVGElement>, "ref"> & {
24
+ ref?: import("react").Ref<SVGSVGElement>;
25
+ }), IconProps>> & string & Omit<import("../Icon/Icon.types").IconType, keyof import("react").Component<any, {}, any>>;
9
26
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * DatePicker component encapsulates the logic for selecting a single date.
4
3
  * Either by accessible input field or by a calendar.
@@ -8,8 +7,8 @@ export declare const DatePicker: import("react").ForwardRefExoticComponent<Omit<
8
7
  disabled?: boolean;
9
8
  readOnly?: boolean;
10
9
  helperProps?: import("../InputWrapper/HelperText").HelperTextProps;
11
- value: Date;
12
- onChange: (date: Date) => void;
10
+ value: Date | null;
11
+ onChange: (date: Date | null) => void;
13
12
  label: string;
14
13
  minValue: Date;
15
14
  maxValue: Date;
@@ -18,7 +17,7 @@ export declare const DatePicker: import("react").ForwardRefExoticComponent<Omit<
18
17
  Header: (props: import("./props").HeaderFooterProps<import("@react-stately/calendar").CalendarState>) => import("react").ReactNode;
19
18
  showTimeInput?: boolean;
20
19
  hideClearButton?: boolean;
21
- defaultValue?: Date;
20
+ defaultValue?: Date | null;
22
21
  timezone: string;
23
22
  granularity?: "hour" | "minute" | "second";
24
23
  formatOptions?: import("react-aria").DateFormatterOptions;
@@ -1,21 +1,20 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * DateRangePicker component encapsulates the logic for selecting a range of dates
4
3
  * Either by accessible input fields or by a calendar.
5
4
  */
6
5
  export declare const DateRangePicker: import("react").ForwardRefExoticComponent<Omit<import("./props").DatePickerProps, "defaultValue" | "onChange" | "value" | "multiple" | "showTimeInput" | "stateRef"> & Partial<{
7
6
  onChange: (range: {
8
- from: Date;
9
- to: Date;
10
- }) => void;
7
+ from: Date | null;
8
+ to: Date | null;
9
+ } | null) => void;
11
10
  value: {
12
- from: Date;
13
- to: Date;
11
+ from: Date | null;
12
+ to: Date | null;
14
13
  };
15
14
  stateRef: import("react").MutableRefObject<import("@react-stately/calendar").RangeCalendarState>;
16
15
  defaultValue: {
17
- from: Date;
18
- to: Date;
16
+ from: Date | null;
17
+ to: Date | null;
19
18
  };
20
19
  Footer: (props: import("./props").HeaderFooterProps<import("@react-stately/calendar").RangeCalendarState>) => import("react").ReactNode;
21
20
  Header: (props: import("./props").HeaderFooterProps<import("@react-stately/calendar").RangeCalendarState>) => import("react").ReactNode;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const CalendarWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DateFieldStateOptions } from '@react-stately/datepicker';
3
2
  /**
4
3
  * A field that wraps segments for inputting a date / date-time
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InputProps } from '../../Input';
3
2
  import { AriaDatePickerProps, DateValue } from 'react-aria';
4
3
  import { GroupDOMAttributes } from '@react-types/shared';
@@ -6,7 +6,7 @@ import { GroupDOMAttributes } from '@react-types/shared';
6
6
  */
7
7
  export declare const InputFieldWrapper: import("react").ForwardRefExoticComponent<{
8
8
  children: ReactNode;
9
- color?: InputWrapperProps['color'];
9
+ color?: InputWrapperProps["color"];
10
10
  disabled: boolean;
11
11
  readonly: boolean;
12
12
  } & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  export type DialogActionsProps = React.HTMLAttributes<HTMLDivElement>;
3
2
  export declare const DialogActions: import("react").ForwardRefExoticComponent<DialogActionsProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  export type DialogTitleProps = React.HTMLAttributes<HTMLDivElement>;
3
2
  export declare const DialogTitle: import("react").ForwardRefExoticComponent<DialogTitleProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -11,11 +11,11 @@ export type DividerProps = {
11
11
  } & HTMLAttributes<HTMLHRElement>;
12
12
  export declare const Divider: import("react").ForwardRefExoticComponent<{
13
13
  /** Color variants */
14
- color?: 'lighter' | 'light' | 'medium';
14
+ color?: "lighter" | "light" | "medium";
15
15
  /** Vertical spacings */
16
- variant?: 'small' | 'medium';
16
+ variant?: "small" | "medium";
17
17
  /** Divider thickness in px*/
18
- size?: '1' | '2';
18
+ size?: "1" | "2";
19
19
  /** @ignore */
20
20
  className?: string;
21
21
  } & HTMLAttributes<HTMLHRElement> & import("react").RefAttributes<HTMLHRElement>>;
@@ -1,7 +1,22 @@
1
1
  import { Ref, SVGProps } from 'react';
2
2
  import type { IconData } from '@equinor/eds-icons';
3
3
  import type { Name } from './Icon.types';
4
- export type IconProps = {
4
+ export type IconProps = ({
5
+ /** Title for icon when used semantically */
6
+ title?: string;
7
+ /** Color */
8
+ color?: string;
9
+ /** Size */
10
+ size?: 16 | 18 | 24 | 32 | 40 | 48;
11
+ /** Rotation */
12
+ rotation?: 0 | 90 | 180 | 270;
13
+ /** Name */
14
+ name: Name;
15
+ /** Manually specify which icon data to use */
16
+ data?: IconData;
17
+ /** @ignore */
18
+ ref?: Ref<SVGSVGElement>;
19
+ } | {
5
20
  /** Title for icon when used semantically */
6
21
  title?: string;
7
22
  /** Color */
@@ -13,8 +28,38 @@ export type IconProps = {
13
28
  /** Name */
14
29
  name?: Name;
15
30
  /** Manually specify which icon data to use */
31
+ data: IconData;
32
+ /** @ignore */
33
+ ref?: Ref<SVGSVGElement>;
34
+ }) & SVGProps<SVGSVGElement>;
35
+ export declare const Icon: import("react").ForwardRefExoticComponent<(Omit<{
36
+ /** Title for icon when used semantically */
37
+ title?: string;
38
+ /** Color */
39
+ color?: string;
40
+ /** Size */
41
+ size?: 16 | 18 | 24 | 32 | 40 | 48;
42
+ /** Rotation */
43
+ rotation?: 0 | 90 | 180 | 270;
44
+ /** Name */
45
+ name: Name;
46
+ /** Manually specify which icon data to use */
16
47
  data?: IconData;
17
48
  /** @ignore */
18
49
  ref?: Ref<SVGSVGElement>;
19
- } & SVGProps<SVGSVGElement>;
20
- export declare const Icon: import("react").ForwardRefExoticComponent<Omit<IconProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
50
+ } & SVGProps<SVGSVGElement>, "ref"> | Omit<{
51
+ /** Title for icon when used semantically */
52
+ title?: string;
53
+ /** Color */
54
+ color?: string;
55
+ /** Size */
56
+ size?: 16 | 18 | 24 | 32 | 40 | 48;
57
+ /** Rotation */
58
+ rotation?: 0 | 90 | 180 | 270;
59
+ /** Name */
60
+ name?: Name;
61
+ /** Manually specify which icon data to use */
62
+ data: IconData;
63
+ /** @ignore */
64
+ ref?: Ref<SVGSVGElement>;
65
+ } & SVGProps<SVGSVGElement>, "ref">) & import("react").RefAttributes<SVGSVGElement>>;
@@ -7,7 +7,7 @@ export type ListProps = {
7
7
  } & HTMLAttributes<HTMLUListElement | HTMLOListElement>;
8
8
  declare const List: import("react").ForwardRefExoticComponent<{
9
9
  /** Is the list an ordered or unordered list */
10
- variant?: 'bullet' | 'numbered';
10
+ variant?: "bullet" | "numbered";
11
11
  /** Start number if other than 1 for ordered lists */
12
12
  start?: string;
13
13
  } & HTMLAttributes<HTMLOListElement | HTMLUListElement> & import("react").RefAttributes<HTMLOListElement | HTMLUListElement>>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type ListItemProps = React.HTMLAttributes<HTMLLIElement>;
3
2
  declare const ListItem: import("react").ForwardRefExoticComponent<ListItemProps & import("react").RefAttributes<HTMLLIElement>>;
4
3
  export { ListItem };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ElevationTypes } from './Paper.tokens';
3
2
  export type PaperProps = {
4
3
  elevation?: ElevationTypes;
@@ -10,7 +10,7 @@ export type LinearProgressProps = {
10
10
  declare const LinearProgress: import("react").ForwardRefExoticComponent<{
11
11
  /** Variant
12
12
  * Use indeterminate when there is no progress value */
13
- variant?: 'indeterminate' | 'determinate';
13
+ variant?: "indeterminate" | "determinate";
14
14
  /** The value of the progress indicator for determinate variant
15
15
  * Value between 0 and 100 */
16
16
  value?: number;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ButtonProps } from '../../Button';
3
2
  import { IconData } from '@equinor/eds-icons';
4
3
  export type SideBarButtonProps = {
@@ -15,7 +15,7 @@ export declare const SideSheet: import("react").ForwardRefExoticComponent<{
15
15
  /** Title for Side Sheet */
16
16
  title?: string;
17
17
  /** Variant controls width of Side Sheet */
18
- variant?: 'small' | 'medium' | 'large' | 'xlarge';
18
+ variant?: "small" | "medium" | "large" | "xlarge";
19
19
  /** OnClick function (close) */
20
20
  onClose?: (Event: any) => void;
21
21
  /** Open / close Side Sheet */
@@ -17,5 +17,5 @@ export declare const Snackbar: import("react").ForwardRefExoticComponent<{
17
17
  /** Callback fired when the snackbar is closed by auto hide duration timeout */
18
18
  onClose?: () => void;
19
19
  /** Placement of the snackbar relative to the viewport */
20
- placement?: 'left' | 'right' | 'top' | 'bottom' | 'top-left' | 'bottom-left' | 'top-right' | 'bottom-right';
20
+ placement?: "left" | "right" | "top" | "bottom" | "top-left" | "bottom-left" | "top-right" | "bottom-right";
21
21
  } & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
@@ -11,7 +11,7 @@ export declare const Switch: import("react").ForwardRefExoticComponent<{
11
11
  /** Label for the switch. Required to make it a11y compliant */
12
12
  label?: string;
13
13
  /** Switch size, use the small version with caution */
14
- size?: 'default' | 'small';
14
+ size?: "default" | "small";
15
15
  /** If true, the switch will be disabled */
16
16
  disabled?: boolean;
17
17
  } & Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const BaseInputWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
3
2
  export declare const BaseInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
4
3
  ref?: import("react").Ref<HTMLInputElement>;
@@ -1,5 +1,5 @@
1
1
  import { ThHTMLAttributes } from 'react';
2
2
  export declare const TableHeaderCell: import("react").ForwardRefExoticComponent<{
3
- sort?: React.AriaAttributes['aria-sort'];
3
+ sort?: React.AriaAttributes["aria-sort"];
4
4
  sticky?: boolean;
5
5
  } & ThHTMLAttributes<HTMLTableCellElement> & import("react").RefAttributes<HTMLTableCellElement>>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type State = {
3
2
  variant: 'body' | 'head';
4
3
  sticky?: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type RowProps = {
3
2
  /** Hightlight row as active */
4
3
  active?: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Variants } from './Tabs.types';
3
2
  type State = {
4
3
  variant: Variants;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/eds-core-react",
3
- "version": "0.40.0",
3
+ "version": "0.40.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": "^25.0.7",
36
+ "@rollup/plugin-commonjs": "^26.0.1",
37
37
  "@rollup/plugin-node-resolve": "^15.2.3",
38
- "@storybook/addon-a11y": "^8.0.2",
39
- "@storybook/addon-actions": "^8.0.2",
40
- "@storybook/addon-docs": "^8.0.2",
41
- "@storybook/addon-essentials": "^8.0.2",
42
- "@storybook/addon-links": "^8.0.2",
43
- "@storybook/blocks": "^8.0.2",
44
- "@storybook/preview-api": "^8.0.2",
45
- "@storybook/react": "^8.0.2",
46
- "@storybook/react-vite": "^8.0.2",
47
- "@testing-library/dom": "^9.3.3",
48
- "@testing-library/jest-dom": "^6.1.4",
49
- "@testing-library/react": "14.0.0",
50
- "@testing-library/user-event": "14.5.1",
51
- "@types/jest": "^29.5.6",
52
- "@types/ramda": "^0.30.0",
53
- "@types/react": "^18.2.33",
54
- "@types/react-dom": "^18.2.14",
38
+ "@storybook/addon-a11y": "^8.1.11",
39
+ "@storybook/addon-actions": "^8.1.11",
40
+ "@storybook/addon-docs": "^8.1.11",
41
+ "@storybook/addon-essentials": "^8.1.11",
42
+ "@storybook/addon-links": "^8.1.11",
43
+ "@storybook/blocks": "^8.1.11",
44
+ "@storybook/preview-api": "^8.1.11",
45
+ "@storybook/react": "^8.1.11",
46
+ "@storybook/react-vite": "^8.1.11",
47
+ "@testing-library/dom": "^10.3.1",
48
+ "@testing-library/jest-dom": "^6.4.6",
49
+ "@testing-library/react": "16.0.0",
50
+ "@testing-library/user-event": "14.5.2",
51
+ "@types/jest": "^29.5.12",
52
+ "@types/ramda": "^0.30.1",
53
+ "@types/react": "^18.3.3",
54
+ "@types/react-dom": "^18.3.0",
55
55
  "babel-loader": "^9.1.3",
56
56
  "babel-plugin-styled-components": "^2.1.4",
57
57
  "jest": "^29.7.0",
58
58
  "jest-environment-jsdom": "^29.7.0",
59
59
  "jest-styled-components": "^7.2.0",
60
60
  "js-file-download": "^0.4.12",
61
- "postcss": "^8.4.31",
62
- "ramda": "^0.30.0",
63
- "react": "^18.2.0",
64
- "react-dom": "^18.2.0",
65
- "react-hook-form": "^7.47.0",
66
- "react-router-dom": "^6.17.0",
67
- "rollup": "^4.2.0",
61
+ "postcss": "^8.4.39",
62
+ "ramda": "^0.30.1",
63
+ "react": "^18.3.1",
64
+ "react-dom": "^18.3.1",
65
+ "react-hook-form": "^7.52.1",
66
+ "react-router-dom": "^6.24.1",
67
+ "rollup": "^4.18.1",
68
68
  "rollup-plugin-delete": "^2.0.0",
69
69
  "rollup-plugin-postcss": "^4.0.2",
70
- "storybook": "^8.0.2",
70
+ "storybook": "^8.1.11",
71
71
  "styled-components": "6.1.11",
72
- "tsc-watch": "^6.0.4",
73
- "typescript": "^5.2.2"
72
+ "tsc-watch": "^6.2.0",
73
+ "typescript": "^5.5.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.24.0",
82
- "@floating-ui/react": "^0.26.13",
83
- "@internationalized/date": "^3.5.3",
84
- "@react-aria/utils": "^3.24.0",
85
- "@react-stately/calendar": "^3.5.0",
86
- "@react-stately/datepicker": "^3.9.3",
87
- "@react-types/shared": "^3.23.0",
88
- "@tanstack/react-virtual": "3.5.0",
81
+ "@babel/runtime": "^7.24.7",
82
+ "@floating-ui/react": "^0.26.19",
83
+ "@internationalized/date": "^3.5.4",
84
+ "@react-aria/utils": "^3.24.1",
85
+ "@react-stately/calendar": "^3.5.1",
86
+ "@react-stately/datepicker": "^3.9.4",
87
+ "@react-types/shared": "^3.23.1",
88
+ "@tanstack/react-virtual": "3.8.2",
89
89
  "downshift": "9.0.6",
90
- "react-aria": "^3.33.0",
90
+ "react-aria": "^3.33.1",
91
91
  "@equinor/eds-icons": "^0.21.0",
92
- "@equinor/eds-tokens": "0.9.2",
93
- "@equinor/eds-utils": "0.8.5"
92
+ "@equinor/eds-utils": "0.8.5",
93
+ "@equinor/eds-tokens": "0.9.2"
94
94
  },
95
95
  "scripts": {
96
96
  "build": "rollup -c --bundleConfigAsCjs && tsc -p tsconfig.build.json",
@@ -1,7 +0,0 @@
1
- import _placeholder from './_placeholder.js';
2
-
3
- function _isPlaceholder(a) {
4
- return a === _placeholder;
5
- }
6
-
7
- export { _isPlaceholder as default };
@@ -1,5 +0,0 @@
1
- var _placeholder = {
2
- '@@functional/placeholder': true
3
- };
4
-
5
- export { _placeholder as default };