@equinor/eds-core-react 1.0.1 → 1.0.2

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 CHANGED
@@ -3,7 +3,7 @@
3
3
  Available components to help style your React application as an Equinor application. We publish new components regularly so make sure to check back often!
4
4
 
5
5
  Make sure to check out our [Storybook](https://storybook.eds.equinor.com/) for more examples!
6
- Read the [changelog](https://github.com/equinor/design-system/blob/develop/packages/eds-core-react/CHANGELOG.md) for details on specific releases.
6
+ Read the [changelog](https://github.com/equinor/design-system/blob/main/packages/eds-core-react/CHANGELOG.md) for details on specific releases.
7
7
 
8
8
  ## Installation
9
9
 
@@ -1184,7 +1184,7 @@ const Tooltip$2 = /*#__PURE__*/react.forwardRef(function Tooltip({
1184
1184
  })],
1185
1185
  whileElementsMounted: react$1.autoUpdate
1186
1186
  });
1187
- const anchorRef = react.useMemo(() => edsUtils.mergeRefs(refs.setReference, children?.ref), [refs.setReference, children?.ref]);
1187
+ const mergedAnchorRef = react.useMemo(() => edsUtils.mergeRefs(refs.setReference), [refs.setReference]);
1188
1188
  const tooltipRef = react.useMemo(() => edsUtils.mergeRefs(refs.setFloating, ref), [refs.setFloating, ref]);
1189
1189
  const {
1190
1190
  getReferenceProps,
@@ -1229,11 +1229,13 @@ const Tooltip$2 = /*#__PURE__*/react.forwardRef(function Tooltip({
1229
1229
  });
1230
1230
  }
1231
1231
  });
1232
- const updatedChildren = /*#__PURE__*/react.cloneElement(children, {
1233
- ...getReferenceProps({
1234
- ...children.props,
1235
- ref: anchorRef
1236
- })
1232
+ const updatedChildren = /*#__PURE__*/react.cloneElement(children,
1233
+ // eslint-disable-line @typescript-eslint/no-explicit-any
1234
+ {
1235
+ ...getReferenceProps(children.props),
1236
+ ref: edsUtils.mergeRefs(
1237
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
1238
+ children.props.ref, mergedAnchorRef)
1237
1239
  });
1238
1240
  react.useEffect(() => {
1239
1241
  if (!elements.floating) return;
@@ -1265,7 +1267,7 @@ const Tooltip$2 = /*#__PURE__*/react.forwardRef(function Tooltip({
1265
1267
  })]
1266
1268
  });
1267
1269
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1268
- children: [shouldOpen && open && !disabled && /*#__PURE__*/reactDom.createPortal(TooltipEl, portalContainer ?? rootElement ?? document.body), updatedChildren]
1270
+ children: [updatedChildren, shouldOpen && open && !disabled && /*#__PURE__*/reactDom.createPortal(TooltipEl, portalContainer ?? rootElement ?? document.body)]
1269
1271
  });
1270
1272
  });
1271
1273
 
@@ -62,7 +62,7 @@ const Tooltip = /*#__PURE__*/forwardRef(function Tooltip({
62
62
  })],
63
63
  whileElementsMounted: autoUpdate
64
64
  });
65
- const anchorRef = useMemo(() => mergeRefs(refs.setReference, children?.ref), [refs.setReference, children?.ref]);
65
+ const mergedAnchorRef = useMemo(() => mergeRefs(refs.setReference), [refs.setReference]);
66
66
  const tooltipRef = useMemo(() => mergeRefs(refs.setFloating, ref), [refs.setFloating, ref]);
67
67
  const {
68
68
  getReferenceProps,
@@ -107,11 +107,13 @@ const Tooltip = /*#__PURE__*/forwardRef(function Tooltip({
107
107
  });
108
108
  }
109
109
  });
110
- const updatedChildren = /*#__PURE__*/cloneElement(children, {
111
- ...getReferenceProps({
112
- ...children.props,
113
- ref: anchorRef
114
- })
110
+ const updatedChildren = /*#__PURE__*/cloneElement(children,
111
+ // eslint-disable-line @typescript-eslint/no-explicit-any
112
+ {
113
+ ...getReferenceProps(children.props),
114
+ ref: mergeRefs(
115
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
116
+ children.props.ref, mergedAnchorRef)
115
117
  });
116
118
  useEffect(() => {
117
119
  if (!elements.floating) return;
@@ -143,7 +145,7 @@ const Tooltip = /*#__PURE__*/forwardRef(function Tooltip({
143
145
  })]
144
146
  });
145
147
  return /*#__PURE__*/jsxs(Fragment, {
146
- children: [shouldOpen && open && !disabled && /*#__PURE__*/createPortal(TooltipEl, portalContainer ?? rootElement ?? document.body), updatedChildren]
148
+ children: [updatedChildren, shouldOpen && open && !disabled && /*#__PURE__*/createPortal(TooltipEl, portalContainer ?? rootElement ?? document.body)]
147
149
  });
148
150
  });
149
151
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/eds-core-react",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "The React implementation of the Equinor Design System",
5
5
  "sideEffects": [
6
6
  "**/*.css"
@@ -84,9 +84,9 @@
84
84
  "@tanstack/react-virtual": "3.13.12",
85
85
  "downshift": "9.0.8",
86
86
  "react-aria": "^3.43.1",
87
- "@equinor/eds-tokens": "1.1.2",
87
+ "@equinor/eds-icons": "^1.0.0",
88
88
  "@equinor/eds-utils": "1.0.1",
89
- "@equinor/eds-icons": "^1.0.0"
89
+ "@equinor/eds-tokens": "1.1.3"
90
90
  },
91
91
  "scripts": {
92
92
  "build": "rollup -c --bundleConfigAsCjs && tsc -p tsconfig.build.json",