@itwin/itwinui-react 2.11.0 → 2.11.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.11.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1284](https://github.com/iTwin/iTwinUI/pull/1284): Add fix in `useId` to avoid bundlers trying to import non-existing export.
8
+
3
9
  ## 2.11.0
4
10
 
5
11
  ### Minor Changes
@@ -40,4 +40,7 @@ const useId = () => {
40
40
  return React.useMemo(() => `iui-${uniqueValue}`, [uniqueValue]);
41
41
  };
42
42
  exports.useId = useId;
43
- const useUniqueValue = (_a = React.useId) !== null && _a !== void 0 ? _a : (() => (0, numbers_js_1.getRandomValue)(10));
43
+ // This is needed to avoid bundlers trying to import non-existing export.
44
+ // Read more: https://github.com/webpack/webpack/issues/14814
45
+ const _React = React;
46
+ const useUniqueValue = (_a = _React.useId) !== null && _a !== void 0 ? _a : (() => (0, numbers_js_1.getRandomValue)(10));
@@ -13,4 +13,7 @@ export const useId = () => {
13
13
  const uniqueValue = useUniqueValue();
14
14
  return React.useMemo(() => `iui-${uniqueValue}`, [uniqueValue]);
15
15
  };
16
- const useUniqueValue = (_a = React.useId) !== null && _a !== void 0 ? _a : (() => getRandomValue(10));
16
+ // This is needed to avoid bundlers trying to import non-existing export.
17
+ // Read more: https://github.com/webpack/webpack/issues/14814
18
+ const _React = React;
19
+ const useUniqueValue = (_a = _React.useId) !== null && _a !== void 0 ? _a : (() => getRandomValue(10));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/itwinui-react",
3
- "version": "2.11.0",
3
+ "version": "2.11.1",
4
4
  "author": "Bentley Systems",
5
5
  "license": "MIT",
6
6
  "main": "cjs/index.js",