Skip to content

Releases: iTwin/iTwinUI

@itwin/[email protected]

27 Aug 13:27
22a6844
Compare
Choose a tag to compare

Minor Changes

  • #2040: The colors of disabled controls have been adjusted make them easier to distinguish from regular controls.
    • Also added hover state to disabled button, select, input, textarea, and actionable list item to help with accessibility.
  • #2153: Nested ThemeProviders will now reuse the same toaster instead of creating new ones.
  • #2201: List and ListItem will now be rendered as <div>s instead of <ul>/<li>. This change makes these components less restrictive and less error-prone to use.
  • #2187: Floating elements will now use position: fixed instead of position: absolute.
    • This fixes some issues when a floating element is placed near the edge of the viewport.
    • Some components affected: Tooltip, Popover, Select, DropdownMenu, ComboBox, etc.
  • #2190: Popover now enables the size middleware to prevent it from overflowing the viewport.
    • This also affects other popover-like components (e.g. Select, ComboBox, DropdownMenu).
    • Popover now also sets a default max-height of 400px to prevent it from becoming too large. This can be customized using the middleware.size.maxHeight prop.
  • #2205: tableFilters.TextFilter now prevents the user from applying the filter when the text input is empty.
  • #2205: BaseFilter now renders as a <form> and FilterButtonBar now renders a <button type="submit">. Together, this enables the use of browser's built-in validation before applying filters.
    • The setFilter prop in FilterButtonBar has been deprecated, as onSubmit should be used instead.

      Diff
        <BaseFilter
      +   onSubmit={() => setFilter(text)}
        >
          …
          <FilterButtonBar
      -     setFilter={() => setFilter(text)}
          />
        </BaseFilter>

Patch Changes

  • #2194: Fixed an issue where CommonJS files in the development build output (DEV-cjs/ directory) were being treated as ESM, inadvertently causing runtime errors during development.
  • #2185: Portal containers will now default to a <div> rendered at the end of <body> instead of a <div> rendered inside the <ThemeProvider>.
  • #2202: IconButton will now reroute the HTML title prop to its own label prop for better accessibility. The title prop has also been marked deprecated to encourage the use of label.
  • #2168: Adjusted focus management in Popover so that it allows interactive elements inside the popover to be more easily focused. This more closely matches the behavior of the HTML <dialog> element, which focuses the first interactive element inside it.
  • #2207: Fixed a bug where pointer-events: none was sometimes applied to the main <body> when a MenuItem was hovered in a popout window.
  • #2189: Floating elements will now have a few pixels of padding from the edge of the viewport.
  • #2202: IconButton will now display warnings during development when it's missing a label.
  • #2178: Reduced layout thrashing on Table component by memoizing an expensive ref function.
  • #2194: The development build output is now also formatted using prettier for easier debugging.

@itwin/[email protected]

29 Jul 22:29
1e04f66
Compare
Choose a tag to compare

Patch Changes

  • #2138: Fixed an issue in Table column resizing where passing in a width value that was less than the column's default minWidth would cause an undesirable shift when the column was resized.
  • #2170: Fixed an issue in virtualized Tree where the style prop passed to TreeNode was not respected.
  • #2170: Fixed an issue in virtualized Tree where horizontal scroll was impossible to achieve.
  • #2174: Fixed an issue in Table where the virtualizer was being initialized even when the enableVirtualization prop wasn't set to true.

@itwin/[email protected]

23 Jul 21:45
191d554
Compare
Choose a tag to compare

Patch Changes

  • #2163: Fixed an issue in virtualized Table where horizontal scroll was broken.

@itwin/[email protected]

23 Jul 15:12
2952902
Compare
Choose a tag to compare

Patch Changes

  • #2143: Added border-radius to the Table component so that all its corners are correctly rounded.
  • #2161: Fixed issue where emptyTableContent would not appear on virutalized Table components.

@itwin/[email protected]

17 Jul 15:23
e4b624b
Compare
Choose a tag to compare

Patch Changes

  • #2147: Fixed a CSS issue in ExpandableBlock where its content wouldn't stay constrained by the width of the parent.
  • #2148: Fixed regression where the value of the toggleRowSelected action for the Table would be undefined when selectSubRows was set to false.

@itwin/[email protected]

16 Jul 15:54
36ee7e3
Compare
Choose a tag to compare

Minor Changes

  • #2106: All internal CSS class prefixes have been changed to prevent style conflicts across minor versions.

    • While this is not considered a breaking change according to our support policy, this change might affect you if you ignore our pleas to not rely on these internal class names. The recommendation is to pass your own custom className through props.
  • #2131: Development-only warnings will now be properly excluded from the production build. This is done using a separate "development" entrypoint listed in package.json#exports.

  • #2135: Changed the column manager from a DropdownMenu to a Popover to fix invalid markup and accessibility issues.

  • Added dependency on @tanstack/react-virtual to replace the custom virtual-scroll implementation. This affects the enableVirtualization prop in ComboBox, Table, and Tree.

    • #2061: Virtualized ComboBox now correctly supports dynamic sizing, e.g. when options both with and without subLabel are present.

    • #2092: Virtualized Table has been improved so that scrolling no longer jumps when rows are scrolled past.

    • #2139: Virtualized Tree no longer requires a wrapping scrollable element, since the tree itself is scrollable now.

      Diff
      - <div style={{overflow: 'auto', height: 'min(400px, 90vh)'}}>
          <Tree
            enableVirtualization
      +     style={{height: 'min(400px, 90vh)'}}
          />
      - </div>

Patch Changes

  • #2139: Added overflow: auto to Tree component to provide more consistent styling across components.
  • #2137: Console warnings will now be displayed during development when multiple versions of iTwinUI are detected.
  • #2145: Fixed an issue where the Overlay component was causing bundler warnings about a non-analyzable expression used in a dependency.
  • #2135: The Table column manager button's open state no longer has the Button's blue active color.
  • #2142: Added displayNames to all components that were previously missing them.
  • #2141: displayNames have been eliminated from the production build, so they only show up during development.
  • #2135: ActionColumn's dropdownMenuProps no longer exposes the unnecessary matchWidth prop.

@itwin/[email protected]

03 Jul 17:16
1205baa
Compare
Choose a tag to compare

Patch Changes

  • #2127: Fixed an issue in Dialog and Modal, where long titles were not wrapping properly.

@itwin/[email protected]

02 Jul 16:00
9c0ba8d
Compare
Choose a tag to compare

Patch Changes

@itwin/[email protected]

26 Jun 14:26
c700b09
Compare
Choose a tag to compare

Minor Changes

  • #2048: Added a new defaultValue prop to ComboBox. This is useful when you don't want to maintain your own state but still want to control the initial value.

  • #2076: Added open popover styling to Button (and IconButton). When an associated Popover or DropdownMenu is open, the button will now get a subtle visual indication.

  • #2111: Added the ability to pass arbitrary DOM props to TreeNode.

  • #2107: A new meta object is exported, containing meta information about the package.

    import { meta } from '@itwin/itwinui-react';
    
    console.log(meta.version, meta.module); // 3.12.0, ESM
  • #2048: Fixed a bug in ComboBox where the controlled state (value prop) was not given priority over the uncontrolled state. As a result:

    • Setting the default value using value={myDefaultValue} will no longer work. Instead, use the new defaultValue prop.
    • Resetting the value using value={null} will now force the ComboBox to be in controlled mode. If you want to reset the value but be in uncontrolled mode, then use value={undefined}, or better yet, reset the component state using key.
  • #2101: Passing an IconButton to Tile.QuickAction and Tile.TypeIndicator is now deprecated. Use Tile.IconButton instead.

  • #2021: In menu-like components (DropdownMenu, SplitButton, Table's column manager), using the mouse to operate the menu will no longer move focus like it does when using the keyboard.

  • #2021: MenuItem's tabIndex now is 0 when it's selected and -1 when it's not. Additionally, MenuItem passed inside most menu type components (e.g. DropdownMenu, SplitButton, Table's column manager, etc.) have roving tabIndex.

  • Dependency changes:

    • #2116: Bumped the minimum required version of @floating-ui/react to 0.26.18.
    • #2100: Replaced dependency on tslib with @swc/helpers. This is used mainly by the CommonJS build for interop reasons.

Patch Changes

  • #2117: Fixed an error in Select caused by updating @floating-ui/react to 0.26.18.
  • #2101: Fixed a small visual bug in Tile.IconButton where the hover state wasn't working.
  • #2021: MenuItem now renders as a <button> instead of a <div>.
  • #2113: Fixed an issue where a portaled Popover was sometimes showing up in the wrong window during the first render.
  • #2048: Fixed a bug in ComboBox where the isSelected passed to itemRenderer was always false whenever multiple was true.

Build Output Changes

  • #2102: The build output is now generated using SWC and uses the new JSX transform instead of React.createElement.
  • #2118: Type declarations are now generated using TypeScript 5.5 with "module": "NodeNext".
  • #2118: The package.json#exports fallback for /react-table types is now handled using typesVersions.
  • #2100: The build output is now (again) formatted using prettier for easier debugging.
  • #2100: All code comments have been removed from the build output.

@itwin/[email protected]

12 Jun 13:59
50a7d5d
Compare
Choose a tag to compare

Patch Changes

  • #2098: Fixed a regression in Table component where selectSubRows prop being set to false would cause parent rows to become uncheckable.