@itwin/itwinui-react 3.17.2 → 3.17.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.
@@ -10,7 +10,10 @@ import {
10
10
  polymorphic,
11
11
  Box,
12
12
  } from '../../utils/index.js';
13
- import { DropdownMenu } from '../DropdownMenu/DropdownMenu.js';
13
+ import {
14
+ DropdownMenu,
15
+ DropdownMenuCloseOnClickContext,
16
+ } from '../DropdownMenu/DropdownMenu.js';
14
17
  import { IconButton } from '../Buttons/IconButton.js';
15
18
  import { ProgressRadial } from '../ProgressIndicators/ProgressRadial.js';
16
19
  import { LinkAction } from '../LinkAction/LinkAction.js';
@@ -174,41 +177,39 @@ let TileMoreOptions = React.forwardRef((props, forwardedRef) => {
174
177
  let { className, children = [], buttonProps, ...rest } = props;
175
178
  let [isMenuVisible, setIsMenuVisible] = React.useState(false);
176
179
  return React.createElement(
177
- Box,
180
+ DropdownMenuCloseOnClickContext.Provider,
178
181
  {
179
- className: cx(
180
- 'iui-tile-more-options',
181
- {
182
- 'iui-visible': isMenuVisible,
183
- },
184
- className,
185
- ),
186
- ref: forwardedRef,
187
- ...rest,
182
+ value: true,
188
183
  },
189
184
  React.createElement(
190
- DropdownMenu,
185
+ Box,
191
186
  {
192
- onVisibleChange: setIsMenuVisible,
193
- menuItems: (close) =>
194
- children?.map((option) =>
195
- React.cloneElement(option, {
196
- onClick: (value) => {
197
- close();
198
- option.props.onClick?.(value);
199
- },
200
- }),
201
- ),
187
+ className: cx(
188
+ 'iui-tile-more-options',
189
+ {
190
+ 'iui-visible': isMenuVisible,
191
+ },
192
+ className,
193
+ ),
194
+ ref: forwardedRef,
195
+ ...rest,
202
196
  },
203
197
  React.createElement(
204
- IconButton,
198
+ DropdownMenu,
205
199
  {
206
- styleType: 'borderless',
207
- size: 'small',
208
- 'aria-label': 'More options',
209
- ...buttonProps,
200
+ onVisibleChange: setIsMenuVisible,
201
+ menuItems: children,
210
202
  },
211
- React.createElement(SvgMore, null),
203
+ React.createElement(
204
+ IconButton,
205
+ {
206
+ styleType: 'borderless',
207
+ size: 'small',
208
+ 'aria-label': 'More options',
209
+ ...buttonProps,
210
+ },
211
+ React.createElement(SvgMore, null),
212
+ ),
212
213
  ),
213
214
  ),
214
215
  );
package/esm/styles.js CHANGED
@@ -1,4 +1,4 @@
1
- const t = '3.17.2';
1
+ const t = '3.17.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.17.2",
3
+ "version": "3.17.3",
4
4
  "author": "Bentley Systems",
5
5
  "license": "MIT",
6
6
  "type": "module",