@jetbrains/ring-ui-built 7.0.15 → 7.0.16

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.
Files changed (49) hide show
  1. package/README.md +7 -8
  2. package/components/_helpers/button__classes.js +10 -3
  3. package/components/_helpers/caption.js +1 -1
  4. package/components/_helpers/dialog__body-scroll-preventer.js +1 -1
  5. package/components/auth-dialog-service/auth-dialog-service.d.ts +1 -1
  6. package/components/avatar/avatar.d.ts +1 -1
  7. package/components/button/button.d.ts +5 -1
  8. package/components/button/button.js +6 -3
  9. package/components/button/button__classes.d.ts +1 -1
  10. package/components/button-group/button-group.js +4 -2
  11. package/components/confirm/confirm.d.ts +1 -1
  12. package/components/contenteditable/contenteditable.d.ts +1 -1
  13. package/components/date-picker/date-picker.d.ts +1 -1
  14. package/components/dialog/dialog.d.ts +1 -1
  15. package/components/dropdown/dropdown.d.ts +4 -2
  16. package/components/dropdown-menu/dropdown-menu.d.ts +7 -5
  17. package/components/dropdown-menu/dropdown-menu.js +32 -17
  18. package/components/global/focus-sensor-hoc.d.ts +1 -1
  19. package/components/header/header.d.ts +1 -1
  20. package/components/header/profile.d.ts +2 -2
  21. package/components/icon/icon.d.ts +1 -1
  22. package/components/input/input.d.ts +1 -1
  23. package/components/list/list.d.ts +1 -1
  24. package/components/loader-inline/loader-inline.d.ts +1 -1
  25. package/components/login-dialog/login-dialog.d.ts +1 -1
  26. package/components/message/message.d.ts +1 -1
  27. package/components/pager/pager.d.ts +1 -1
  28. package/components/popup/popup.d.ts +2 -2
  29. package/components/popup-menu/popup-menu.d.ts +1 -1
  30. package/components/progress-bar/progress-bar.d.ts +1 -1
  31. package/components/query-assist/query-assist.d.ts +1 -1
  32. package/components/select/select.d.ts +3 -3
  33. package/components/select/select__popup.d.ts +1 -1
  34. package/components/style.css +1 -1
  35. package/components/table/header.d.ts +1 -1
  36. package/components/table/row.d.ts +1 -1
  37. package/components/tabs/dumb-tabs.d.ts +2 -1
  38. package/components/tag/tag.d.ts +1 -1
  39. package/components/tag/tag.js +1 -1
  40. package/components/tags-input/tags-input.d.ts +1 -1
  41. package/components/tags-list/tags-list.d.ts +1 -1
  42. package/components/toggle/toggle.d.ts +1 -1
  43. package/components/tooltip/tooltip.d.ts +1 -1
  44. package/components/upload/upload.d.ts +19 -0
  45. package/components/upload/upload.js +88 -0
  46. package/components/user-agreement/user-agreement.d.ts +1 -1
  47. package/components/user-card/card.d.ts +1 -1
  48. package/components/user-card/tooltip.d.ts +1 -1
  49. package/package.json +1 -1
package/README.md CHANGED
@@ -3,6 +3,13 @@
3
3
 
4
4
  [![official JetBrains project](https://jb.gg/badges/official-flat-square.svg)](https://github.com/JetBrains#jetbrains-on-github)
5
5
 
6
+ - [Design guildelines](https://www.jetbrains.com/help/ring-ui/welcome.html)
7
+ - [Usage examples in Storybook][docsite]
8
+ - [GitHub repository](https://github.com/JetBrains/ring-ui)
9
+ - [Issues in YouTrack](https://youtrack.jetbrains.com/issues/RG)
10
+ - [Builds in TeamCity][ci-project]
11
+ - [npm package][npm-package]
12
+
6
13
  This collection of UI components aims to provide all the necessary building blocks for web-based products built inside JetBrains, as well as third-party plugins developed for JetBrains' products.
7
14
 
8
15
  ## Try now
@@ -84,14 +91,6 @@ in a same build process, you can use the following configuration:
84
91
 
85
92
  See [CONTRIBUTING.md](./CONTRIBUTING.md)
86
93
 
87
- ## Links
88
-
89
- - [Living style guide][docsite]
90
- - [GitHub repository](https://github.com/JetBrains/ring-ui)
91
- - [Issues in YouTrack](https://youtrack.jetbrains.com/issues/RG)
92
- - [Builds in TeamCity][ci-project]
93
- - [npm package][npm-package]
94
-
95
94
  [docsite]: https://jetbrains.github.io/ring-ui
96
95
  [ci-project]: https://teamcity.jetbrains.com/project.html?projectId=JetBrainsUi_RingUi&tab=projectOverview
97
96
  [ci-bt]: https://teamcity.jetbrains.com/viewType.html?buildTypeId=JetBrainsUi_RingUi_GeminiTests&tab=buildTypeStatusDiv
@@ -1,6 +1,6 @@
1
1
  import classNames from 'classnames';
2
2
 
3
- var styles = {"glyph":"glyph_rui_2d39","heightS":"heightS_rui_0b90","heightM":"heightM_rui_0b90","heightL":"heightL_rui_0b90","button":"button_rui_0b90","block":"block_rui_0b90","inline":"inline_rui_0b90","icon":"icon_rui_0b90","withNormalIcon":"withNormalIcon_rui_0b90","active":"active_rui_0b90","danger":"danger_rui_0b90","disabled":"disabled_rui_0b90","primaryBlock":"primaryBlock_rui_0b90","loader":"loader_rui_0b90","loaderBackground":"loaderBackground_rui_0b90","iconOnly":"iconOnly_rui_0b90","text-loading":"text-loading_rui_0b90","progress":"progress_rui_0b90","delayed":"delayed_rui_0b90","short":"short_rui_0b90","dropdownIcon":"dropdownIcon_rui_0b90","primary":"primary_rui_0b90"};
3
+ var styles = {"glyph":"glyph_rui_2d39","heightS":"heightS_rui_0b90","heightM":"heightM_rui_0b90","heightL":"heightL_rui_0b90","button":"button_rui_0b90","block":"block_rui_0b90","inline":"inline_rui_0b90","icon":"icon_rui_0b90","withNormalIcon":"withNormalIcon_rui_0b90","active":"active_rui_0b90","disabled":"disabled_rui_0b90","danger":"danger_rui_0b90","flat":"flat_rui_0b90","whiteText":"whiteText_rui_0b90","primaryBlock":"primaryBlock_rui_0b90 flat_rui_0b90 whiteText_rui_0b90","success":"success_rui_0b90 flat_rui_0b90 whiteText_rui_0b90","error":"error_rui_0b90 flat_rui_0b90 whiteText_rui_0b90","secondary":"secondary_rui_0b90 flat_rui_0b90","ghost":"ghost_rui_0b90 flat_rui_0b90","iconOnly":"iconOnly_rui_0b90","loader":"loader_rui_0b90","loaderBackground":"loaderBackground_rui_0b90","progress":"progress_rui_0b90","delayed":"delayed_rui_0b90","short":"short_rui_0b90","dropdownIcon":"dropdownIcon_rui_0b90"};
4
4
 
5
5
  function getButtonClasses(_ref) {
6
6
  let {
@@ -9,6 +9,10 @@ function getButtonClasses(_ref) {
9
9
  disabled,
10
10
  loader,
11
11
  primary,
12
+ success,
13
+ error,
14
+ secondary,
15
+ ghost,
12
16
  short,
13
17
  inline,
14
18
  danger,
@@ -19,15 +23,18 @@ function getButtonClasses(_ref) {
19
23
  } = _ref;
20
24
  const iconOnly = icon && !children;
21
25
  const primaryBlock = primary && !inline;
22
- const withNormalIcon = icon && !active && !danger && !primary && !disabled && (!inline || iconOnly);
26
+ const withNormalIcon = iconOnly && inline && !active && !danger && !primary && !disabled;
23
27
  return classNames(styles.button, className, styles["height".concat(height)], inline ? styles.inline : styles.block, {
24
28
  [styles.active]: active,
25
29
  [styles.danger]: danger,
26
30
  [styles.delayed]: delayed,
27
31
  [styles.withNormalIcon]: withNormalIcon,
28
32
  [styles.loader]: loader,
29
- [styles.primary]: primary,
30
33
  [styles.primaryBlock]: primaryBlock,
34
+ [styles.success]: success,
35
+ [styles.error]: error,
36
+ [styles.secondary]: secondary,
37
+ [styles.ghost]: ghost,
31
38
  [styles.short]: short,
32
39
  [styles.disabled]: disabled,
33
40
  [styles.iconOnly]: iconOnly
@@ -3,7 +3,7 @@ import { jsx } from 'react/jsx-runtime';
3
3
  import { PureComponent } from 'react';
4
4
  import classNames from 'classnames';
5
5
 
6
- var styles = {"button":"button_rui_0b90","active":"active_rui_0b90","primary":"primary_rui_0b90","buttonGroup":"buttonGroup_rui_bbca common_rui_bbca buttonGroup_rui_f4fc","common":"common_rui_bbca","split":"split_rui_bbca common_rui_bbca buttonGroup_rui_f4fc","caption":"caption_rui_bbca font_rui_8bff","help":"help_rui_bbca"};
6
+ var styles = {"button":"button_rui_0b90","active":"active_rui_0b90","flat":"flat_rui_0b90","buttonGroup":"buttonGroup_rui_bbca common_rui_bbca buttonGroup_rui_f4fc","common":"common_rui_bbca","disabled":"disabled_rui_bbca","split":"split_rui_bbca common_rui_bbca buttonGroup_rui_f4fc","caption":"caption_rui_bbca font_rui_8bff","help":"help_rui_bbca"};
7
7
 
8
8
  class Caption extends PureComponent {
9
9
  render() {
@@ -1,7 +1,7 @@
1
1
  import 'core-js/modules/web.dom-collections.iterator.js';
2
2
  import scrollbarWidth from 'scrollbar-width';
3
3
 
4
- var styles = {"header":"header_rui_1d72","scrollableWrapper":"scrollableWrapper_rui_1d72","container":"container_rui_381e","nativeDialog":"nativeDialog_rui_381e","innerContainer":"innerContainer_rui_381e","content":"content_rui_381e","panel":"panel_rui_381e","clickableOverlay":"clickableOverlay_rui_381e","closeIconOutside":"closeIconOutside_rui_381e","closeIconInside":"closeIconInside_rui_381e","closeButton":"closeButton_rui_381e","closeIcon":"closeIcon_rui_381e","closeButtonOutside":"closeButtonOutside_rui_381e","closeButtonInside":"closeButtonInside_rui_381e","documentWithoutScroll":"documentWithoutScroll_rui_381e","popupTarget":"popupTarget_rui_381e","dense":"dense_rui_381e"};
4
+ var styles = {"header":"header_rui_1d72","scrollableWrapper":"scrollableWrapper_rui_1d72","container":"container_rui_381e","nativeDialog":"nativeDialog_rui_381e","innerContainer":"innerContainer_rui_381e","content":"content_rui_381e","panel":"panel_rui_381e","clickableOverlay":"clickableOverlay_rui_381e","closeIconOutside":"closeIconOutside_rui_381e","closeIcon":"closeIcon_rui_381e","closeButton":"closeButton_rui_381e","closeButtonOutside":"closeButtonOutside_rui_381e","closeButtonInside":"closeButtonInside_rui_381e","documentWithoutScroll":"documentWithoutScroll_rui_381e","popupTarget":"popupTarget_rui_381e","dense":"dense_rui_381e"};
5
5
 
6
6
  const isPrevented = new Set();
7
7
  let previousDocumentWidth = null;
@@ -1,5 +1,5 @@
1
1
  import AuthDialog, { AuthDialogProps } from '../auth-dialog/auth-dialog';
2
2
  export declare const reactRoot: import("react-dom/client").Root;
3
- type AuthDialogAttributes = JSX.LibraryManagedAttributes<typeof AuthDialog, AuthDialogProps>;
3
+ type AuthDialogAttributes = React.JSX.LibraryManagedAttributes<typeof AuthDialog, AuthDialogProps>;
4
4
  export default function showAuthDialog(props?: AuthDialogAttributes): () => void;
5
5
  export {};
@@ -36,4 +36,4 @@ export default class Avatar extends PureComponent<AvatarProps> {
36
36
  handleSuccess: () => void;
37
37
  render(): import("react/jsx-runtime").JSX.Element;
38
38
  }
39
- export type AvatarAttrs = JSX.LibraryManagedAttributes<typeof Avatar, AvatarProps>;
39
+ export type AvatarAttrs = React.JSX.LibraryManagedAttributes<typeof Avatar, AvatarProps>;
@@ -10,6 +10,10 @@ export interface ButtonBaseProps {
10
10
  delayed?: boolean | null | undefined;
11
11
  loader?: boolean | null | undefined;
12
12
  primary?: boolean | null | undefined;
13
+ success?: boolean | null | undefined;
14
+ error?: boolean | null | undefined;
15
+ secondary?: boolean | null | undefined;
16
+ ghost?: boolean | null | undefined;
13
17
  short?: boolean | null | undefined;
14
18
  /**
15
19
  * @deprecated Use inline instead
@@ -45,6 +49,6 @@ export declare class Button extends PureComponent<ButtonProps> {
45
49
  render(): import("react/jsx-runtime").JSX.Element;
46
50
  }
47
51
  export { Size as IconSize };
48
- export type ContainerProps<T extends ButtonProps> = JSX.LibraryManagedAttributes<typeof Button, T>;
52
+ export type ContainerProps<T extends ButtonProps> = React.JSX.LibraryManagedAttributes<typeof Button, T>;
49
53
  export type ButtonAttrs = ContainerProps<ButtonButtonProps> | ContainerProps<ButtonLinkProps>;
50
54
  export default Button;
@@ -16,7 +16,7 @@ import 'core-js/modules/es.regexp.exec.js';
16
16
  import 'core-js/modules/es.string.replace.js';
17
17
  import '../global/memoize.js';
18
18
 
19
- const _excluded = ["active", "danger", "delayed", "loader", "primary", "short", "text", "dropdown", "height", "icon", "iconSize", "iconClassName", "iconSuppressSizeWarning", "className", "children", "inline"];
19
+ const _excluded = ["active", "danger", "delayed", "loader", "primary", "success", "error", "secondary", "ghost", "short", "text", "dropdown", "height", "icon", "iconSize", "iconClassName", "iconSuppressSizeWarning", "className", "children", "inline"];
20
20
  const warnText = deprecate(() => {}, 'Button: "text" prop is deprecated and will be removed in 8.0. Use inline instead.');
21
21
  /**
22
22
  * @name Button
@@ -39,6 +39,10 @@ class Button extends PureComponent {
39
39
  delayed,
40
40
  loader,
41
41
  primary,
42
+ success,
43
+ error,
44
+ secondary,
45
+ ghost,
42
46
  short,
43
47
  text,
44
48
  dropdown,
@@ -66,7 +70,6 @@ class Button extends PureComponent {
66
70
  className: classNames(styles.icon, iconClassName),
67
71
  glyph: icon,
68
72
  size: iconSize,
69
- loading: loader && isInline,
70
73
  suppressSizeWarning: iconSuppressSizeWarning
71
74
  }), children, dropdown && jsx(Icon, {
72
75
  glyph: isInline ? chevron12pxDown : chevronDownIcon,
@@ -78,7 +81,7 @@ class Button extends PureComponent {
78
81
  }, props), {}, {
79
82
  className: classes,
80
83
  children: jsxs(Fragment, {
81
- children: [loader && !isInline && jsx("div", {
84
+ children: [loader && jsx("div", {
82
85
  className: styles.loaderBackground
83
86
  }), content]
84
87
  })
@@ -1,2 +1,2 @@
1
1
  import { ButtonProps } from './button';
2
- export declare function getButtonClasses({ className, active, disabled, loader, primary, short, inline, danger, delayed, icon, height, children, }: ButtonProps): string;
2
+ export declare function getButtonClasses({ className, active, disabled, loader, primary, success, error, secondary, ghost, short, inline, danger, delayed, icon, height, children, }: ButtonProps): string;
@@ -1,7 +1,7 @@
1
1
  import { a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import 'core-js/modules/es.regexp.exec.js';
3
3
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
4
- import { PureComponent } from 'react';
4
+ import { PureComponent, Children } from 'react';
5
5
  import classNames from 'classnames';
6
6
  import joinDataTestAttributes from '../global/data-tests.js';
7
7
  import { ControlLabel } from '../control-label/control-label.js';
@@ -25,7 +25,9 @@ class ButtonGroup extends PureComponent {
25
25
  help
26
26
  } = _this$props,
27
27
  restProps = _objectWithoutProperties(_this$props, _excluded);
28
- const classes = classNames(split ? styles.split : styles.buttonGroup, className);
28
+ const classes = classNames(split ? styles.split : styles.buttonGroup, className, {
29
+ [styles.disabled]: Children.toArray(this.props.children).every(child => child != null && typeof child === 'object' && 'props' in child && child.props.disabled)
30
+ });
29
31
  return jsxs(Fragment, {
30
32
  children: [label && jsx(ControlLabel, {
31
33
  children: label
@@ -33,4 +33,4 @@ export default class Confirm extends PureComponent<ConfirmProps> {
33
33
  onEscPress: () => void;
34
34
  render(): import("react/jsx-runtime").JSX.Element;
35
35
  }
36
- export type ConfirmAttributes = JSX.LibraryManagedAttributes<typeof Confirm, ConfirmProps>;
36
+ export type ConfirmAttributes = React.JSX.LibraryManagedAttributes<typeof Confirm, ConfirmProps>;
@@ -20,7 +20,7 @@ declare class ContentEditableBase extends Component<ContentEditableBaseProps> {
20
20
  componentDidUpdate(prevProps: ContentEditableBaseProps): void;
21
21
  render(): import("react/jsx-runtime").JSX.Element;
22
22
  }
23
- type ContentEditableBaseAttrs = JSX.LibraryManagedAttributes<typeof ContentEditableBase, ContentEditableBaseProps>;
23
+ type ContentEditableBaseAttrs = React.JSX.LibraryManagedAttributes<typeof ContentEditableBase, ContentEditableBaseProps>;
24
24
  export type ContentEditableProps = Omit<ContentEditableBaseAttrs, '__html'>;
25
25
  declare const ContentEditable: ({ children, ...props }: ContentEditableProps) => import("react/jsx-runtime").JSX.Element;
26
26
  export default ContentEditable;
@@ -47,4 +47,4 @@ export default class DatePicker extends PureComponent<DatePickerProps> {
47
47
  getAnchorText: () => string;
48
48
  render(): import("react/jsx-runtime").JSX.Element;
49
49
  }
50
- export type DatePickerAttrs = JSX.LibraryManagedAttributes<typeof DatePicker, DatePickerProps>;
50
+ export type DatePickerAttrs = React.JSX.LibraryManagedAttributes<typeof DatePicker, DatePickerProps>;
@@ -47,4 +47,4 @@ export default class Dialog extends PureComponent<DialogProps> {
47
47
  nativeDialog: React.RefObject<HTMLDialogElement>;
48
48
  render(): false | import("react/jsx-runtime").JSX.Element;
49
49
  }
50
- export type DialogAttrs = JSX.LibraryManagedAttributes<typeof Dialog, DialogProps>;
50
+ export type DialogAttrs = React.JSX.LibraryManagedAttributes<typeof Dialog, DialogProps>;
@@ -13,13 +13,15 @@ export interface DropdownChildProps {
13
13
  onContextMenu?: () => void | undefined;
14
14
  dontCloseOnAnchorClick: boolean;
15
15
  }
16
+ export type DropdownChildrenFunction = (props: Omit<PopupAttrs, 'children'>) => ReactNode;
17
+ export type DropdownChildren = ReactElement<PopupAttrs> | DropdownChildrenFunction;
16
18
  export interface DropdownProps extends Omit<HTMLAttributes<HTMLElement>, 'children'> {
17
19
  /**
18
20
  * Can be string, React element, or a function accepting an object with {active, pinned} properties and returning a React element
19
21
  * React element should render some interactive HTML element like `button` or `a`
20
22
  */
21
23
  anchor: ReactElement | readonly ReactElement[] | string | ((props: AnchorProps) => ReactNode);
22
- children: ReactElement<PopupAttrs> | ((props: Omit<PopupAttrs, 'children'>) => ReactNode);
24
+ children: DropdownChildren;
23
25
  initShown: boolean;
24
26
  disabled?: boolean | null | undefined;
25
27
  clickMode: boolean;
@@ -66,5 +68,5 @@ export default class Dropdown extends Component<DropdownProps, DropdownState> {
66
68
  _clearTimer(): void;
67
69
  render(): import("react/jsx-runtime").JSX.Element;
68
70
  }
69
- export type DropdownAttrs = JSX.LibraryManagedAttributes<typeof Dropdown, DropdownProps>;
71
+ export type DropdownAttrs = React.JSX.LibraryManagedAttributes<typeof Dropdown, DropdownProps>;
70
72
  export { Anchor };
@@ -1,19 +1,21 @@
1
- import { ReactElement, ReactNodeArray, HTMLAttributes, SyntheticEvent, Ref } from 'react';
1
+ import { ReactElement, HTMLAttributes, SyntheticEvent, Ref, ReactNode } from 'react';
2
2
  import { SelectHandlerParams } from '../list/list';
3
- import { AnchorProps, DropdownAttrs } from '../dropdown/dropdown';
3
+ import { AnchorProps, DropdownAttrs, DropdownChildrenFunction } 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 | ReactNodeArray | string | ((props: AnchorProps, ariaProps: HTMLAttributes<HTMLElement>) => ReactElement | null);
7
+ anchor: ReactElement | ReactNode[] | string | ((props: AnchorProps, ariaProps: HTMLAttributes<HTMLElement>) => ReactElement | null);
8
8
  activeListItemId?: string | null | undefined;
9
9
  listId?: string | undefined;
10
10
  }
11
+ type OnSelectHandler<T> = ((item: ListDataItem<T>, event: Event | SyntheticEvent, params?: SelectHandlerParams) => void) | undefined;
11
12
  export interface DropdownMenuProps<T = unknown> extends Omit<DropdownAttrs, 'anchor' | 'onSelect' | 'children'> {
12
- anchor: ReactElement | ReactNodeArray | string | ((props: AnchorProps, ariaProps: HTMLAttributes<HTMLElement>) => ReactElement | null);
13
+ anchor: ReactElement | ReactNode[] | string | ((props: AnchorProps, ariaProps: HTMLAttributes<HTMLElement>) => ReactElement | null);
13
14
  data?: readonly ListDataItem<T>[] | undefined;
14
15
  ariaLabel?: string | null | undefined;
15
- onSelect?: ((item: ListDataItem<T>, event: Event | SyntheticEvent, params?: SelectHandlerParams) => void) | undefined;
16
+ onSelect?: OnSelectHandler<T>;
16
17
  menuProps?: PopupMenuAttrs<T> | null | undefined;
18
+ children?: DropdownChildrenFunction;
17
19
  }
18
20
  declare const _default: (<T = unknown>(props: DropdownMenuProps<T> & {
19
21
  ref?: Ref<PopupMenu>;
@@ -65,7 +65,7 @@ import '../popup/popup.consts.js';
65
65
  import '../popup/popup.target.js';
66
66
 
67
67
  const _excluded = ["anchor", "pinned", "active", "activeListItemId", "listId"],
68
- _excluded2 = ["id", "anchor", "ariaLabel", "data", "onSelect", "menuProps"],
68
+ _excluded2 = ["id", "anchor", "ariaLabel", "data", "onSelect", "menuProps", "children"],
69
69
  _excluded3 = ["pinned", "active"];
70
70
  const defaultAriaLabel = 'Dropdown menu';
71
71
  function DropdownAnchorWrapper(_ref) {
@@ -110,25 +110,45 @@ function DropdownAnchorWrapper(_ref) {
110
110
  children: anchor
111
111
  }));
112
112
  }
113
- const DropdownMenu = /*#__PURE__*/forwardRef(function DropdownMenu(_ref2, forwardedRef) {
113
+ function renderDropdownMenuChildren(_ref2) {
114
+ let {
115
+ children,
116
+ popupMenuProps
117
+ } = _ref2;
118
+ if (!children) {
119
+ return jsx(PopupMenu, _objectSpread2({}, popupMenuProps));
120
+ }
121
+ return popupProps => children(_objectSpread2(_objectSpread2({}, popupProps), popupMenuProps));
122
+ }
123
+ const DropdownMenu = /*#__PURE__*/forwardRef(function DropdownMenu(_ref3, forwardedRef) {
114
124
  let {
115
125
  id,
116
126
  anchor,
117
127
  ariaLabel,
118
128
  data,
119
129
  onSelect,
120
- menuProps
121
- } = _ref2,
122
- restDropdownProps = _objectWithoutProperties(_ref2, _excluded2);
130
+ menuProps,
131
+ children
132
+ } = _ref3,
133
+ restDropdownProps = _objectWithoutProperties(_ref3, _excluded2);
123
134
  const listId = useMemo(() => id || getUID('dropdown-menu-list'), [id]);
135
+ const popupMenuProps = useMemo(() => _objectSpread2({
136
+ ref: forwardedRef,
137
+ id: listId,
138
+ ariaLabel: ariaLabel || defaultAriaLabel,
139
+ closeOnSelect: true,
140
+ activateFirstItem: true,
141
+ data,
142
+ onSelect
143
+ }, menuProps), [ariaLabel, data, forwardedRef, listId, menuProps, onSelect]);
124
144
  return jsx(ActiveItemContext.Provider, {
125
145
  children: jsx(Dropdown, _objectSpread2(_objectSpread2({
126
- anchor: _ref3 => {
146
+ anchor: _ref4 => {
127
147
  let {
128
148
  pinned,
129
149
  active
130
- } = _ref3,
131
- restAnchorProps = _objectWithoutProperties(_ref3, _excluded3);
150
+ } = _ref4,
151
+ restAnchorProps = _objectWithoutProperties(_ref4, _excluded3);
132
152
  return jsx(ActiveItemContext.ValueContext.Consumer, {
133
153
  children: activeItemId => jsx(DropdownAnchorWrapper, _objectSpread2({
134
154
  anchor: anchor,
@@ -140,15 +160,10 @@ const DropdownMenu = /*#__PURE__*/forwardRef(function DropdownMenu(_ref2, forwar
140
160
  });
141
161
  }
142
162
  }, restDropdownProps), {}, {
143
- children: jsx(PopupMenu, _objectSpread2({
144
- ref: forwardedRef,
145
- id: listId,
146
- ariaLabel: ariaLabel || defaultAriaLabel,
147
- closeOnSelect: true,
148
- activateFirstItem: true,
149
- data: data,
150
- onSelect: onSelect
151
- }, menuProps))
163
+ children: renderDropdownMenuChildren({
164
+ children,
165
+ popupMenuProps
166
+ })
152
167
  }))
153
168
  });
154
169
  });
@@ -14,6 +14,6 @@ export interface FocusSensorAddProps<T extends HTMLElement> {
14
14
  onFocusRestore: () => void;
15
15
  }
16
16
  type RestProps<P, T extends HTMLElement> = Omit<P, keyof FocusSensorAddProps<T>>;
17
- export type FocusSensorProps<P extends FocusSensorAddProps<T>, T extends HTMLElement, C extends ComponentType<P>> = RestProps<JSX.LibraryManagedAttributes<C, P>, T> & FocusSensorOuterProps<T>;
17
+ export type FocusSensorProps<P extends FocusSensorAddProps<T>, T extends HTMLElement, C extends ComponentType<P>> = RestProps<React.JSX.LibraryManagedAttributes<C, P>, T> & FocusSensorOuterProps<T>;
18
18
  export default function focusSensorHOC<T extends HTMLElement, P extends FocusSensorAddProps<T>, C extends ComponentType<P>>(ComposedComponent: C): ComponentType<FocusSensorProps<P, T, typeof ComposedComponent>>;
19
19
  export {};
@@ -19,7 +19,7 @@ declare class Header extends Component<HeaderProps> {
19
19
  };
20
20
  render(): import("react/jsx-runtime").JSX.Element;
21
21
  }
22
- export type HeaderAttrs = JSX.LibraryManagedAttributes<typeof Header, HeaderProps>;
22
+ export type HeaderAttrs = React.JSX.LibraryManagedAttributes<typeof Header, HeaderProps>;
23
23
  export default Header;
24
24
  export { default as Logo } from './logo';
25
25
  export { default as Tray } from './tray';
@@ -13,7 +13,7 @@ export interface ProfileTranslations {
13
13
  logout?: string | null | undefined;
14
14
  certificateMismatch?: string | null | undefined;
15
15
  }
16
- export interface ProfileProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> {
16
+ export interface ProfileProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect' | 'children'> {
17
17
  closeOnSelect: boolean;
18
18
  renderPopupItems: (items: ListDataItem[]) => readonly ListDataItem[];
19
19
  translations?: ProfileTranslations | null | undefined;
@@ -46,4 +46,4 @@ export default class Profile extends PureComponent<ProfileProps> {
46
46
  static Size: typeof Size;
47
47
  render(): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | null | undefined;
48
48
  }
49
- export type ProfileAttrs = JSX.LibraryManagedAttributes<typeof Profile, ProfileProps>;
49
+ export type ProfileAttrs = React.JSX.LibraryManagedAttributes<typeof Profile, ProfileProps>;
@@ -28,5 +28,5 @@ export default class Icon extends PureComponent<IconProps> {
28
28
  } | undefined;
29
29
  render(): import("react/jsx-runtime").JSX.Element | null;
30
30
  }
31
- export type IconAttrs = JSX.LibraryManagedAttributes<typeof Icon, IconProps>;
31
+ export type IconAttrs = React.JSX.LibraryManagedAttributes<typeof Icon, IconProps>;
32
32
  export { Color, Size };
@@ -70,7 +70,7 @@ export declare class Input extends PureComponent<InputProps> {
70
70
  handleTextareaChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
71
71
  render(): import("react/jsx-runtime").JSX.Element;
72
72
  }
73
- export type ContainerProps<P extends InputProps> = JSX.LibraryManagedAttributes<typeof Input, P>;
73
+ export type ContainerProps<P extends InputProps> = React.JSX.LibraryManagedAttributes<typeof Input, P>;
74
74
  export type InputSpecificAttrs = ContainerProps<InputSpecificProps>;
75
75
  export type TextAreaSpecificAttrs = ContainerProps<TextAreaSpecificProps>;
76
76
  export type InputAttrs = InputSpecificAttrs | TextAreaSpecificAttrs;
@@ -166,4 +166,4 @@ export default class List<T = unknown> extends Component<ListProps<T>, ListState
166
166
  /** @override */
167
167
  render(): import("react/jsx-runtime").JSX.Element;
168
168
  }
169
- export type ListAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof List, ListProps<T>>;
169
+ export type ListAttrs<T = unknown> = React.JSX.LibraryManagedAttributes<typeof List, ListProps<T>>;
@@ -8,5 +8,5 @@ export interface LoaderInlineProps extends HTMLAttributes<HTMLDivElement> {
8
8
  declare class LoaderInline extends PureComponent<LoaderInlineProps> {
9
9
  render(): import("react/jsx-runtime").JSX.Element;
10
10
  }
11
- export type LoaderInlineAtrrs = JSX.LibraryManagedAttributes<typeof LoaderInline, LoaderInlineProps>;
11
+ export type LoaderInlineAtrrs = React.JSX.LibraryManagedAttributes<typeof LoaderInline, LoaderInlineProps>;
12
12
  export default LoaderInline;
@@ -33,4 +33,4 @@ export default class LoginDialog extends Component<LoginDialogProps> {
33
33
  onMessage: (event: MessageEvent) => void;
34
34
  render(): import("react/jsx-runtime").JSX.Element;
35
35
  }
36
- export type LoginDialogAttrs = JSX.LibraryManagedAttributes<typeof LoginDialog, LoginDialogProps>;
36
+ export type LoginDialogAttrs = React.JSX.LibraryManagedAttributes<typeof LoginDialog, LoginDialogProps>;
@@ -51,5 +51,5 @@ export default class Message extends Component<MessageProps> {
51
51
  getTailOffset(): number;
52
52
  render(): import("react/jsx-runtime").JSX.Element;
53
53
  }
54
- export type MessageAttrs = JSX.LibraryManagedAttributes<typeof Message, MessageProps>;
54
+ export type MessageAttrs = React.JSX.LibraryManagedAttributes<typeof Message, MessageProps>;
55
55
  export {};
@@ -76,5 +76,5 @@ export default class Pager extends PureComponent<PagerProps> {
76
76
  getPagerContent(): import("react/jsx-runtime").JSX.Element;
77
77
  render(): import("react/jsx-runtime").JSX.Element;
78
78
  }
79
- export type PagerAttrs = JSX.LibraryManagedAttributes<typeof Pager, PagerProps>;
79
+ export type PagerAttrs = React.JSX.LibraryManagedAttributes<typeof Pager, PagerProps>;
80
80
  export {};
@@ -145,5 +145,5 @@ export default class Popup<P extends BasePopupProps = PopupProps> extends PureCo
145
145
  };
146
146
  render(): import("react/jsx-runtime").JSX.Element;
147
147
  }
148
- export type PopupAttrs = JSX.LibraryManagedAttributes<typeof Popup, PopupProps>;
149
- export type BasePopupAttrs = JSX.LibraryManagedAttributes<typeof Popup, BasePopupProps>;
148
+ export type PopupAttrs = React.JSX.LibraryManagedAttributes<typeof Popup, PopupProps>;
149
+ export type BasePopupAttrs = React.JSX.LibraryManagedAttributes<typeof Popup, BasePopupProps>;
@@ -64,7 +64,7 @@ export default class PopupMenu<T = unknown> extends Popup<PopupMenuProps<T>> {
64
64
  /** @override */
65
65
  getInternalContent(): import("react/jsx-runtime").JSX.Element;
66
66
  }
67
- export type PopupMenuAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof PopupMenu, PopupMenuProps<T>>;
67
+ export type PopupMenuAttrs<T = unknown> = React.JSX.LibraryManagedAttributes<typeof PopupMenu, PopupMenuProps<T>>;
68
68
  export declare const ListProps: {
69
69
  Type: typeof import("../list/consts").Type;
70
70
  Dimension: {
@@ -47,4 +47,4 @@ export default class ProgressBar extends PureComponent<ProgressBarProps> {
47
47
  progressbarRef: (el: HTMLElement | null) => void;
48
48
  render(): import("react/jsx-runtime").JSX.Element;
49
49
  }
50
- export type ProgressBarAttrs = JSX.LibraryManagedAttributes<typeof ProgressBar, ProgressBarProps>;
50
+ export type ProgressBarAttrs = React.JSX.LibraryManagedAttributes<typeof ProgressBar, ProgressBarProps>;
@@ -272,6 +272,6 @@ export default class QueryAssist extends Component<QueryAssistProps> {
272
272
  renderActions(): ReactNode[];
273
273
  render(): import("react/jsx-runtime").JSX.Element;
274
274
  }
275
- export type QueryAssistAttrs = JSX.LibraryManagedAttributes<typeof QueryAssist, QueryAssistProps>;
275
+ export type QueryAssistAttrs = React.JSX.LibraryManagedAttributes<typeof QueryAssist, QueryAssistProps>;
276
276
  export declare const RerenderableQueryAssist: React.ForwardRefExoticComponent<QueryAssistProps & React.RefAttributes<QueryAssist>>;
277
277
  export {};
@@ -277,8 +277,8 @@ export default class Select<T = unknown> extends Component<SelectProps<T>, Selec
277
277
  renderSelect(activeItemId: string | undefined): import("react/jsx-runtime").JSX.Element;
278
278
  render(): import("react/jsx-runtime").JSX.Element;
279
279
  }
280
- export type SingleSelectAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof Select, SingleSelectProps<T>>;
281
- export type MultipleSelectAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof Select, MultipleSelectProps<T>>;
282
- export type SelectAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof Select, SelectProps<T>>;
280
+ export type SingleSelectAttrs<T = unknown> = React.JSX.LibraryManagedAttributes<typeof Select, SingleSelectProps<T>>;
281
+ export type MultipleSelectAttrs<T = unknown> = React.JSX.LibraryManagedAttributes<typeof Select, MultipleSelectProps<T>>;
282
+ export type SelectAttrs<T = unknown> = React.JSX.LibraryManagedAttributes<typeof Select, SelectProps<T>>;
283
283
  export declare const RerenderableSelect: React.ForwardRefExoticComponent<SelectProps<unknown> & React.RefAttributes<Select<unknown>>>;
284
284
  export {};
@@ -134,4 +134,4 @@ export default class SelectPopup<T = unknown> extends PureComponent<SelectPopupP
134
134
  popupFilterShortcutsMap: ShortcutsMap;
135
135
  render(): import("react/jsx-runtime").JSX.Element;
136
136
  }
137
- export type SelectPopupAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof SelectPopup, SelectPopupProps<T>>;
137
+ export type SelectPopupAttrs<T = unknown> = React.JSX.LibraryManagedAttributes<typeof SelectPopup, SelectPopupProps<T>>;