@itwin/itwinui-react 2.12.0 → 2.12.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,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.12.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1494](https://github.com/iTwin/iTwinUI/pull/1494): Updated color-picker dot so its outline adapts dynamically to the backgrounds for better contrast.
8
+
9
+ ## 2.12.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#1467](https://github.com/iTwin/iTwinUI/pull/1467): Fixed an issue in Carousel where latest `onSlideChange` callback was being ignored.
14
+
3
15
  ## 2.12.0
4
16
 
5
17
  ### Minor Changes
@@ -7,6 +19,7 @@
7
19
  - [#1415](https://github.com/iTwin/iTwinUI/pull/1415): The styling strategy has changed so there will now be a single stylesheet included at runtime, instead of separate css imports inside every component. All the styles are also wrapped in a cascade layer named `itwinui`. This behavior can be customized using the `includeCss` prop in `ThemeProvider`.
8
20
 
9
21
  **Important note**: The dependencies on `@itwin/itwinui-css` and `@itwin/itwinui-variables` have been removed, so these packages _don't_ need to be installed if you are only using components from `@itwin/itwinui-react`.
22
+
10
23
  - [#1422](https://github.com/iTwin/iTwinUI/pull/1422): Changed `all: revert` to `all: revert-layer` so that only styles from the v1 layer are reverted, thus avoiding issues with inadvertently removing browser default styles.
11
24
  - [#1443](https://github.com/iTwin/iTwinUI/pull/1443): `DropdownButton` now supports `styleType='high-visibility'` to make it blue. This should be used sparingly, as a default or borderless dropdown button is the better choice in most cases.
12
25
  - [#1454](https://github.com/iTwin/iTwinUI/pull/1454): Added `disabled` prop to `ExpandableBlock` to disable intersction with it.
@@ -567,4 +580,4 @@ If you're interested in more details about every signle change, check out a full
567
580
 
568
581
  ## 1.X
569
582
 
570
- For any changes prior to 2.0.0, check out the [1.X changelog](https://github.com/iTwin/iTwinUI-react/blob/v1/packages/iTwinUI-react/CHANGELOG.md).
583
+ For any changes prior to 2.0.0, check out the [1.X changelog](https://github.com/iTwin/iTwinUI/blob/legacy/v1-react/packages/iTwinUI-react/CHANGELOG.md).
@@ -58,7 +58,9 @@ export declare const Carousel: React.ForwardRefExoticComponent<{
58
58
  DotsList: React.ForwardRefExoticComponent<{
59
59
  length?: number | undefined;
60
60
  currentIndex?: number | undefined;
61
- onSlideChange?: ((index: number) => void) | undefined;
61
+ onSlideChange?: ((index: number) => void) | undefined; /**
62
+ * Callback fired when the current slide changes.
63
+ */
62
64
  } & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>>;
63
65
  Dot: React.ForwardRefExoticComponent<{
64
66
  isActive?: boolean | undefined;
@@ -111,11 +111,11 @@ exports.Carousel = Object.assign(React.forwardRef((props, ref) => {
111
111
  }
112
112
  }
113
113
  };
114
- const userOnSlideChange = React.useRef(onSlideChange);
114
+ const userOnSlideChange = (0, index_js_1.useLatestRef)(onSlideChange);
115
115
  React.useEffect(() => {
116
116
  var _a;
117
117
  (_a = userOnSlideChange.current) === null || _a === void 0 ? void 0 : _a.call(userOnSlideChange, currentIndex);
118
- }, [currentIndex]);
118
+ }, [userOnSlideChange, currentIndex]);
119
119
  return (React.createElement("section", { "aria-roledescription": 'carousel', tabIndex: 0, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, ref: refs, className: (0, classnames_1.default)('iui-carousel', className), ...rest, id: id },
120
120
  React.createElement(CarouselContext_js_1.CarouselContext.Provider, { value: {
121
121
  currentIndex,