@jetbrains/ring-ui-built 6.0.75 → 6.0.76
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.
@@ -1,15 +1,15 @@
|
|
1
|
-
import { ReactElement,
|
1
|
+
import { ReactElement, ReactNode, HTMLAttributes, SyntheticEvent, Ref } from 'react';
|
2
2
|
import { SelectHandlerParams } from '../list/list';
|
3
3
|
import { AnchorProps, DropdownAttrs } from '../dropdown/dropdown';
|
4
4
|
import PopupMenu, { PopupMenuAttrs } from '../popup-menu/popup-menu';
|
5
5
|
import { ListDataItem } from '../list/consts';
|
6
6
|
export interface DropdownAnchorWrapperProps extends AnchorProps {
|
7
|
-
anchor: ReactElement |
|
7
|
+
anchor: ReactElement | ReadonlyArray<ReactNode> | string | ((props: AnchorProps, ariaProps: HTMLAttributes<HTMLElement>) => ReactElement | null);
|
8
8
|
activeListItemId?: string | null | undefined;
|
9
9
|
listId?: string | undefined;
|
10
10
|
}
|
11
11
|
export interface DropdownMenuProps<T = unknown> extends Omit<DropdownAttrs, 'anchor' | 'onSelect' | 'children'> {
|
12
|
-
anchor: ReactElement |
|
12
|
+
anchor: ReactElement | ReadonlyArray<ReactNode> | string | ((props: AnchorProps, ariaProps: HTMLAttributes<HTMLElement>) => ReactElement | null);
|
13
13
|
data?: readonly ListDataItem<T>[] | undefined;
|
14
14
|
ariaLabel?: string | null | undefined;
|
15
15
|
onSelect?: ((item: ListDataItem<T>, event: Event | SyntheticEvent, params?: SelectHandlerParams) => void) | undefined;
|
@@ -29,7 +29,7 @@ function rerenderHOC(ComposedComponent) {
|
|
29
29
|
var _ref = this.composedRef(this.props.forwardedRef);
|
30
30
|
return /*#__PURE__*/jsx(ComposedComponent, _objectSpread2(_objectSpread2({}, this.state), {}, {
|
31
31
|
ref: function ref(instance) {
|
32
|
-
|
32
|
+
_ref(instance != null ? _objectSpread2(_objectSpread2({}, instance), {}, {
|
33
33
|
rerender: _this2.setState.bind(_this2)
|
34
34
|
}) : null);
|
35
35
|
}
|