@itwin/itwinui-react 3.19.2 → 3.19.3

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,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.19.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2622](https://github.com/iTwin/iTwinUI/pull/2622): Fixed `ComboBox` and `Select` bug by no longer rendering the deselect ("❌") button in the tags when the multiselect `ComboBox`'s input or the multiselect `Select` is disabled.
8
+ - [#2618](https://github.com/iTwin/iTwinUI/pull/2618): `TreeNode` hover styles only applied when hover is supported.
9
+ - [#2624](https://github.com/iTwin/iTwinUI/pull/2624): Floating elements will try to prefer a best fit placement.
10
+
3
11
  ## 3.19.2
4
12
 
5
13
  ### Patch Changes
@@ -410,10 +410,12 @@ const ComboBox = _react.forwardRef((props, forwardedRef) => {
410
410
  return _react.createElement(_SelectTag.SelectTag, {
411
411
  key: option.label,
412
412
  label: option.label,
413
- onRemove: () => {
414
- handleOptionSelection(__originalIndex);
415
- hide();
416
- },
413
+ onRemove: inputProps?.disabled
414
+ ? void 0
415
+ : () => {
416
+ handleOptionSelection(__originalIndex);
417
+ hide();
418
+ },
417
419
  });
418
420
  })
419
421
  .filter(Boolean)
@@ -97,7 +97,7 @@ const usePopover = (options) => {
97
97
  (0, _react1.offset)(middleware.offset),
98
98
  middleware.flip &&
99
99
  (0, _react1.flip)({
100
- padding: 4,
100
+ padding: 5,
101
101
  }),
102
102
  middleware.shift &&
103
103
  (0, _react1.shift)({
@@ -238,14 +238,16 @@ const CustomSelect = _react.forwardRef((props, forwardedRef) => {
238
238
  _react.createElement(_SelectTag.SelectTag, {
239
239
  key: option.label,
240
240
  label: option.label,
241
- onRemove: () => {
242
- handleOptionSelection(option, {
243
- isSelected: true,
244
- });
245
- selectRef.current?.focus();
246
- },
241
+ onRemove: disabled
242
+ ? void 0
243
+ : () => {
244
+ handleOptionSelection(option, {
245
+ isSelected: true,
246
+ });
247
+ selectRef.current?.focus();
248
+ },
247
249
  }),
248
- [handleOptionSelection],
250
+ [disabled, handleOptionSelection],
249
251
  );
250
252
  let popover = (0, _Popover.usePopover)({
251
253
  visible: isOpen,
package/DEV-cjs/styles.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
- const e = '3.19.2';
3
+ const e = '3.19.3';
4
4
  const u = new Proxy(
5
5
  {},
6
6
  {
@@ -406,10 +406,12 @@ export const ComboBox = React.forwardRef((props, forwardedRef) => {
406
406
  return React.createElement(SelectTag, {
407
407
  key: option.label,
408
408
  label: option.label,
409
- onRemove: () => {
410
- handleOptionSelection(__originalIndex);
411
- hide();
412
- },
409
+ onRemove: inputProps?.disabled
410
+ ? void 0
411
+ : () => {
412
+ handleOptionSelection(__originalIndex);
413
+ hide();
414
+ },
413
415
  });
414
416
  })
415
417
  .filter(Boolean)
@@ -98,7 +98,7 @@ export const usePopover = (options) => {
98
98
  void 0 !== middleware.offset && offset(middleware.offset),
99
99
  middleware.flip &&
100
100
  flip({
101
- padding: 4,
101
+ padding: 5,
102
102
  }),
103
103
  middleware.shift &&
104
104
  shift({
@@ -230,14 +230,16 @@ let CustomSelect = React.forwardRef((props, forwardedRef) => {
230
230
  React.createElement(SelectTag, {
231
231
  key: option.label,
232
232
  label: option.label,
233
- onRemove: () => {
234
- handleOptionSelection(option, {
235
- isSelected: true,
236
- });
237
- selectRef.current?.focus();
238
- },
233
+ onRemove: disabled
234
+ ? void 0
235
+ : () => {
236
+ handleOptionSelection(option, {
237
+ isSelected: true,
238
+ });
239
+ selectRef.current?.focus();
240
+ },
239
241
  }),
240
- [handleOptionSelection],
242
+ [disabled, handleOptionSelection],
241
243
  );
242
244
  let popover = usePopover({
243
245
  visible: isOpen,
package/DEV-esm/styles.js CHANGED
@@ -1,4 +1,4 @@
1
- const t = '3.19.2';
1
+ const t = '3.19.3';
2
2
  const u = new Proxy(
3
3
  {},
4
4
  {
@@ -410,10 +410,12 @@ const ComboBox = _react.forwardRef((props, forwardedRef) => {
410
410
  return _react.createElement(_SelectTag.SelectTag, {
411
411
  key: option.label,
412
412
  label: option.label,
413
- onRemove: () => {
414
- handleOptionSelection(__originalIndex);
415
- hide();
416
- },
413
+ onRemove: inputProps?.disabled
414
+ ? void 0
415
+ : () => {
416
+ handleOptionSelection(__originalIndex);
417
+ hide();
418
+ },
417
419
  });
418
420
  })
419
421
  .filter(Boolean)
@@ -97,7 +97,7 @@ const usePopover = (options) => {
97
97
  (0, _react1.offset)(middleware.offset),
98
98
  middleware.flip &&
99
99
  (0, _react1.flip)({
100
- padding: 4,
100
+ padding: 5,
101
101
  }),
102
102
  middleware.shift &&
103
103
  (0, _react1.shift)({
@@ -238,14 +238,16 @@ const CustomSelect = _react.forwardRef((props, forwardedRef) => {
238
238
  _react.createElement(_SelectTag.SelectTag, {
239
239
  key: option.label,
240
240
  label: option.label,
241
- onRemove: () => {
242
- handleOptionSelection(option, {
243
- isSelected: true,
244
- });
245
- selectRef.current?.focus();
246
- },
241
+ onRemove: disabled
242
+ ? void 0
243
+ : () => {
244
+ handleOptionSelection(option, {
245
+ isSelected: true,
246
+ });
247
+ selectRef.current?.focus();
248
+ },
247
249
  }),
248
- [handleOptionSelection],
250
+ [disabled, handleOptionSelection],
249
251
  );
250
252
  let popover = (0, _Popover.usePopover)({
251
253
  visible: isOpen,
package/cjs/styles.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
- const e = '3.19.2';
3
+ const e = '3.19.3';
4
4
  const u = new Proxy(
5
5
  {},
6
6
  {
@@ -406,10 +406,12 @@ export const ComboBox = React.forwardRef((props, forwardedRef) => {
406
406
  return React.createElement(SelectTag, {
407
407
  key: option.label,
408
408
  label: option.label,
409
- onRemove: () => {
410
- handleOptionSelection(__originalIndex);
411
- hide();
412
- },
409
+ onRemove: inputProps?.disabled
410
+ ? void 0
411
+ : () => {
412
+ handleOptionSelection(__originalIndex);
413
+ hide();
414
+ },
413
415
  });
414
416
  })
415
417
  .filter(Boolean)
@@ -98,7 +98,7 @@ export const usePopover = (options) => {
98
98
  void 0 !== middleware.offset && offset(middleware.offset),
99
99
  middleware.flip &&
100
100
  flip({
101
- padding: 4,
101
+ padding: 5,
102
102
  }),
103
103
  middleware.shift &&
104
104
  shift({
@@ -230,14 +230,16 @@ let CustomSelect = React.forwardRef((props, forwardedRef) => {
230
230
  React.createElement(SelectTag, {
231
231
  key: option.label,
232
232
  label: option.label,
233
- onRemove: () => {
234
- handleOptionSelection(option, {
235
- isSelected: true,
236
- });
237
- selectRef.current?.focus();
238
- },
233
+ onRemove: disabled
234
+ ? void 0
235
+ : () => {
236
+ handleOptionSelection(option, {
237
+ isSelected: true,
238
+ });
239
+ selectRef.current?.focus();
240
+ },
239
241
  }),
240
- [handleOptionSelection],
242
+ [disabled, handleOptionSelection],
241
243
  );
242
244
  let popover = usePopover({
243
245
  visible: isOpen,
package/esm/styles.js CHANGED
@@ -1,4 +1,4 @@
1
- const t = '3.19.2';
1
+ const t = '3.19.3';
2
2
  const u = new Proxy(
3
3
  {},
4
4
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/itwinui-react",
3
- "version": "3.19.2",
3
+ "version": "3.19.3",
4
4
  "author": "Bentley Systems",
5
5
  "license": "MIT",
6
6
  "type": "module",