@equinor/eds-core-react 1.0.0 → 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/
|
|
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
|
|
package/dist/eds-core-react.cjs
CHANGED
|
@@ -1184,7 +1184,7 @@ const Tooltip$2 = /*#__PURE__*/react.forwardRef(function Tooltip({
|
|
|
1184
1184
|
})],
|
|
1185
1185
|
whileElementsMounted: react$1.autoUpdate
|
|
1186
1186
|
});
|
|
1187
|
-
const
|
|
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
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
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)
|
|
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
|
|
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
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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)
|
|
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.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "The React implementation of the Equinor Design System",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css"
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
"typescript": "^5.9.2"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"react": "
|
|
73
|
-
"react-dom": "
|
|
74
|
-
"styled-components": "
|
|
72
|
+
"react": "^19",
|
|
73
|
+
"react-dom": "^19",
|
|
74
|
+
"styled-components": "^6"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@babel/runtime": "^7.28.3",
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"downshift": "9.0.8",
|
|
86
86
|
"react-aria": "^3.43.1",
|
|
87
87
|
"@equinor/eds-icons": "^1.0.0",
|
|
88
|
-
"@equinor/eds-
|
|
89
|
-
"@equinor/eds-
|
|
88
|
+
"@equinor/eds-utils": "1.0.1",
|
|
89
|
+
"@equinor/eds-tokens": "1.1.3"
|
|
90
90
|
},
|
|
91
91
|
"scripts": {
|
|
92
92
|
"build": "rollup -c --bundleConfigAsCjs && tsc -p tsconfig.build.json",
|