@itwin/itwinui-react 3.16.0 → 3.16.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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.16.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2378](https://github.com/iTwin/iTwinUI/pull/2378): Fixed folder variant `Tile`'s broken layout when it has a long name.
8
+
9
+ ## 3.16.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#2362](https://github.com/iTwin/iTwinUI/pull/2362): `Select` with "small" size now has the same height (`24px`) as other input elements with "small" size (e.g. `ComboBox`)
14
+ - [#2370](https://github.com/iTwin/iTwinUI/pull/2370): Fixed `Panels` animations not working in some rare cases.
15
+ - [#2374](https://github.com/iTwin/iTwinUI/pull/2374): Fixed `HeaderButton`'s `startIcon` and `endIcon` fill color.
16
+ - [#2359](https://github.com/iTwin/iTwinUI/pull/2359): `Tooltip` now remains visible when hovered up to `4px` outside its border.
17
+
3
18
  ## 3.16.0
4
19
 
5
20
  ### Minor Changes
@@ -8,15 +8,13 @@ Object.defineProperty(exports, 'HeaderDropdownButton', {
8
8
  return HeaderDropdownButton;
9
9
  },
10
10
  });
11
- const _interop_require_default = require('@swc/helpers/_/_interop_require_default');
12
11
  const _interop_require_wildcard = require('@swc/helpers/_/_interop_require_wildcard');
13
- const _classnames = _interop_require_default._(require('classnames'));
14
12
  const _react = _interop_require_wildcard._(require('react'));
15
13
  const _DropdownMenu = require('../DropdownMenu/DropdownMenu.js');
16
14
  const _index = require('../../utils/index.js');
17
15
  const _HeaderBasicButton = require('./HeaderBasicButton.js');
18
16
  const HeaderDropdownButton = _react.forwardRef((props, ref) => {
19
- let { menuItems, className, children, ...rest } = props;
17
+ let { menuItems, children, ...rest } = props;
20
18
  let [isMenuOpen, setIsMenuOpen] = _react.useState(false);
21
19
  let [menuWidth, setMenuWidth] = _react.useState(0);
22
20
  let buttonRef = _react.useRef(null);
@@ -36,10 +34,6 @@ const HeaderDropdownButton = _react.forwardRef((props, ref) => {
36
34
  _react.createElement(
37
35
  _HeaderBasicButton.HeaderBasicButton,
38
36
  {
39
- className: (0, _classnames.default)(
40
- 'iui-header-breadcrumb-button',
41
- className,
42
- ),
43
37
  ref: refs,
44
38
  'aria-label': 'Dropdown',
45
39
  endIcon: isMenuOpen
@@ -53,11 +53,14 @@ const PanelsWrapper = _react.forwardRef((props, forwardedRef) => {
53
53
  return;
54
54
  _reactdom.flushSync(() => setActivePanelId(newActiveId));
55
55
  onActiveIdChange.current?.(newActiveId);
56
- ref.current?.ownerDocument.getElementById(newActiveId)?.scrollIntoView({
57
- block: 'nearest',
58
- inline: 'center',
59
- behavior: motionOk ? 'smooth' : 'instant',
60
- });
56
+ ref.current
57
+ ?.getRootNode()
58
+ .getElementById(newActiveId)
59
+ ?.scrollIntoView({
60
+ block: 'nearest',
61
+ inline: 'center',
62
+ behavior: motionOk ? 'smooth' : 'instant',
63
+ });
61
64
  },
62
65
  [activePanelId, motionOk, onActiveIdChange],
63
66
  );
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.16.0';
3
+ const e = '3.16.2';
4
4
  const u = new Proxy(
5
5
  {},
6
6
  {
@@ -1,4 +1,3 @@
1
- import cx from 'classnames';
2
1
  import * as React from 'react';
3
2
  import { DropdownMenu } from '../DropdownMenu/DropdownMenu.js';
4
3
  import {
@@ -8,7 +7,7 @@ import {
8
7
  } from '../../utils/index.js';
9
8
  import { HeaderBasicButton } from './HeaderBasicButton.js';
10
9
  export const HeaderDropdownButton = React.forwardRef((props, ref) => {
11
- let { menuItems, className, children, ...rest } = props;
10
+ let { menuItems, children, ...rest } = props;
12
11
  let [isMenuOpen, setIsMenuOpen] = React.useState(false);
13
12
  let [menuWidth, setMenuWidth] = React.useState(0);
14
13
  let buttonRef = React.useRef(null);
@@ -28,7 +27,6 @@ export const HeaderDropdownButton = React.forwardRef((props, ref) => {
28
27
  React.createElement(
29
28
  HeaderBasicButton,
30
29
  {
31
- className: cx('iui-header-breadcrumb-button', className),
32
30
  ref: refs,
33
31
  'aria-label': 'Dropdown',
34
32
  endIcon: isMenuOpen
@@ -39,11 +39,14 @@ export const PanelsWrapper = React.forwardRef((props, forwardedRef) => {
39
39
  return;
40
40
  ReactDOM.flushSync(() => setActivePanelId(newActiveId));
41
41
  onActiveIdChange.current?.(newActiveId);
42
- ref.current?.ownerDocument.getElementById(newActiveId)?.scrollIntoView({
43
- block: 'nearest',
44
- inline: 'center',
45
- behavior: motionOk ? 'smooth' : 'instant',
46
- });
42
+ ref.current
43
+ ?.getRootNode()
44
+ .getElementById(newActiveId)
45
+ ?.scrollIntoView({
46
+ block: 'nearest',
47
+ inline: 'center',
48
+ behavior: motionOk ? 'smooth' : 'instant',
49
+ });
47
50
  },
48
51
  [activePanelId, motionOk, onActiveIdChange],
49
52
  );
package/DEV-esm/styles.js CHANGED
@@ -1,4 +1,4 @@
1
- const t = '3.16.0';
1
+ const t = '3.16.2';
2
2
  const u = new Proxy(
3
3
  {},
4
4
  {
@@ -8,15 +8,13 @@ Object.defineProperty(exports, 'HeaderDropdownButton', {
8
8
  return HeaderDropdownButton;
9
9
  },
10
10
  });
11
- const _interop_require_default = require('@swc/helpers/_/_interop_require_default');
12
11
  const _interop_require_wildcard = require('@swc/helpers/_/_interop_require_wildcard');
13
- const _classnames = _interop_require_default._(require('classnames'));
14
12
  const _react = _interop_require_wildcard._(require('react'));
15
13
  const _DropdownMenu = require('../DropdownMenu/DropdownMenu.js');
16
14
  const _index = require('../../utils/index.js');
17
15
  const _HeaderBasicButton = require('./HeaderBasicButton.js');
18
16
  const HeaderDropdownButton = _react.forwardRef((props, ref) => {
19
- let { menuItems, className, children, ...rest } = props;
17
+ let { menuItems, children, ...rest } = props;
20
18
  let [isMenuOpen, setIsMenuOpen] = _react.useState(false);
21
19
  let [menuWidth, setMenuWidth] = _react.useState(0);
22
20
  let buttonRef = _react.useRef(null);
@@ -36,10 +34,6 @@ const HeaderDropdownButton = _react.forwardRef((props, ref) => {
36
34
  _react.createElement(
37
35
  _HeaderBasicButton.HeaderBasicButton,
38
36
  {
39
- className: (0, _classnames.default)(
40
- 'iui-header-breadcrumb-button',
41
- className,
42
- ),
43
37
  ref: refs,
44
38
  'aria-label': 'Dropdown',
45
39
  endIcon: isMenuOpen
@@ -53,11 +53,14 @@ const PanelsWrapper = _react.forwardRef((props, forwardedRef) => {
53
53
  return;
54
54
  _reactdom.flushSync(() => setActivePanelId(newActiveId));
55
55
  onActiveIdChange.current?.(newActiveId);
56
- ref.current?.ownerDocument.getElementById(newActiveId)?.scrollIntoView({
57
- block: 'nearest',
58
- inline: 'center',
59
- behavior: motionOk ? 'smooth' : 'instant',
60
- });
56
+ ref.current
57
+ ?.getRootNode()
58
+ .getElementById(newActiveId)
59
+ ?.scrollIntoView({
60
+ block: 'nearest',
61
+ inline: 'center',
62
+ behavior: motionOk ? 'smooth' : 'instant',
63
+ });
61
64
  },
62
65
  [activePanelId, motionOk, onActiveIdChange],
63
66
  );
@@ -8,7 +8,7 @@ type ProgressLinearProps = {
8
8
  /**
9
9
  * Progress variant. If true, `value` will be ignored.
10
10
  *
11
- * Defaults to true if `value` is passed, otherwise false.
11
+ * Defaults to false if `value` is passed, otherwise true.
12
12
  */
13
13
  indeterminate?: boolean;
14
14
  /**
@@ -42,7 +42,8 @@ export type TreeProps<T> = {
42
42
  /**
43
43
  * Render function that should return the node element.
44
44
  * Recommended to use `TreeNode` component.
45
- * Must be memoized.
45
+ *
46
+ ***Note**: When virtualization is enabled, the return value of `nodeRenderer()` is cloned and a `ref` is passed to it. Thus, you would need a `React.forwardRef` in the component returned by `nodeRenderer()`, except if you are returning `TreeNode` since that already forwards its ref.
46
47
  * @example
47
48
  * const nodeRenderer = React.useCallback(({ node, ...rest }: NodeRenderProps<DataType>) => (
48
49
  * <TreeNode
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.16.0';
3
+ const e = '3.16.2';
4
4
  const u = new Proxy(
5
5
  {},
6
6
  {
@@ -1,4 +1,3 @@
1
- import cx from 'classnames';
2
1
  import * as React from 'react';
3
2
  import { DropdownMenu } from '../DropdownMenu/DropdownMenu.js';
4
3
  import {
@@ -8,7 +7,7 @@ import {
8
7
  } from '../../utils/index.js';
9
8
  import { HeaderBasicButton } from './HeaderBasicButton.js';
10
9
  export const HeaderDropdownButton = React.forwardRef((props, ref) => {
11
- let { menuItems, className, children, ...rest } = props;
10
+ let { menuItems, children, ...rest } = props;
12
11
  let [isMenuOpen, setIsMenuOpen] = React.useState(false);
13
12
  let [menuWidth, setMenuWidth] = React.useState(0);
14
13
  let buttonRef = React.useRef(null);
@@ -28,7 +27,6 @@ export const HeaderDropdownButton = React.forwardRef((props, ref) => {
28
27
  React.createElement(
29
28
  HeaderBasicButton,
30
29
  {
31
- className: cx('iui-header-breadcrumb-button', className),
32
30
  ref: refs,
33
31
  'aria-label': 'Dropdown',
34
32
  endIcon: isMenuOpen
@@ -39,11 +39,14 @@ export const PanelsWrapper = React.forwardRef((props, forwardedRef) => {
39
39
  return;
40
40
  ReactDOM.flushSync(() => setActivePanelId(newActiveId));
41
41
  onActiveIdChange.current?.(newActiveId);
42
- ref.current?.ownerDocument.getElementById(newActiveId)?.scrollIntoView({
43
- block: 'nearest',
44
- inline: 'center',
45
- behavior: motionOk ? 'smooth' : 'instant',
46
- });
42
+ ref.current
43
+ ?.getRootNode()
44
+ .getElementById(newActiveId)
45
+ ?.scrollIntoView({
46
+ block: 'nearest',
47
+ inline: 'center',
48
+ behavior: motionOk ? 'smooth' : 'instant',
49
+ });
47
50
  },
48
51
  [activePanelId, motionOk, onActiveIdChange],
49
52
  );
@@ -8,7 +8,7 @@ type ProgressLinearProps = {
8
8
  /**
9
9
  * Progress variant. If true, `value` will be ignored.
10
10
  *
11
- * Defaults to true if `value` is passed, otherwise false.
11
+ * Defaults to false if `value` is passed, otherwise true.
12
12
  */
13
13
  indeterminate?: boolean;
14
14
  /**
@@ -42,7 +42,8 @@ export type TreeProps<T> = {
42
42
  /**
43
43
  * Render function that should return the node element.
44
44
  * Recommended to use `TreeNode` component.
45
- * Must be memoized.
45
+ *
46
+ ***Note**: When virtualization is enabled, the return value of `nodeRenderer()` is cloned and a `ref` is passed to it. Thus, you would need a `React.forwardRef` in the component returned by `nodeRenderer()`, except if you are returning `TreeNode` since that already forwards its ref.
46
47
  * @example
47
48
  * const nodeRenderer = React.useCallback(({ node, ...rest }: NodeRenderProps<DataType>) => (
48
49
  * <TreeNode
package/esm/styles.js CHANGED
@@ -1,4 +1,4 @@
1
- const t = '3.16.0';
1
+ const t = '3.16.2';
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.16.0",
3
+ "version": "3.16.2",
4
4
  "author": "Bentley Systems",
5
5
  "license": "MIT",
6
6
  "type": "module",