@jetbrains/ring-ui-built 6.0.35 → 6.0.37
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/components/_helpers/_rollupPluginBabelHelpers.js +1 -10
- package/components/_helpers/anchor.js +9 -6
- package/components/_helpers/caption.js +5 -4
- package/components/_helpers/card.js +65 -49
- package/components/_helpers/icon__svg.js +4 -3
- package/components/_helpers/input.js +45 -36
- package/components/_helpers/query-assist__suggestions.js +18 -14
- package/components/_helpers/select__filter.js +22 -17
- package/components/_helpers/services-link.js +14 -12
- package/components/_helpers/sidebar.js +20 -16
- package/components/_helpers/tab-link.js +21 -13
- package/components/_helpers/theme.js +18 -11
- package/components/_helpers/title.js +20 -16
- package/components/alert/alert.d.ts +2 -1
- package/components/alert/alert.js +20 -17
- package/components/alert/container.d.ts +2 -2
- package/components/alert/container.js +14 -11
- package/components/alert-service/alert-service.d.ts +2 -2
- package/components/alert-service/alert-service.js +14 -14
- package/components/analytics/analytics.js +1 -1
- package/components/analytics/analytics__custom-plugin.js +1 -1
- package/components/auth/auth.js +1 -0
- package/components/auth/auth__core.js +3 -2
- package/components/auth/background-flow.js +1 -1
- package/components/auth/down-notification.d.ts +1 -1
- package/components/auth/down-notification.js +21 -14
- package/components/auth/iframe-flow.js +7 -5
- package/components/auth/request-builder.d.ts +0 -1
- package/components/auth/request-builder.js +1 -1
- package/components/auth/response-parser.js +1 -1
- package/components/auth/storage.js +3 -2
- package/components/auth/token-validator.d.ts +1 -1
- package/components/auth/token-validator.js +1 -1
- package/components/auth/window-flow.js +1 -1
- package/components/auth-dialog/auth-dialog.d.ts +2 -2
- package/components/auth-dialog/auth-dialog.js +42 -32
- package/components/auth-dialog-service/auth-dialog-service.d.ts +0 -1
- package/components/auth-dialog-service/auth-dialog-service.js +6 -7
- package/components/avatar/avatar.d.ts +2 -2
- package/components/avatar/avatar.js +29 -28
- package/components/avatar/fallback-avatar.d.ts +1 -2
- package/components/avatar/fallback-avatar.js +50 -37
- package/components/badge/badge.d.ts +2 -2
- package/components/badge/badge.js +7 -8
- package/components/breadcrumbs/breadcrumbs.d.ts +6 -0
- package/components/breadcrumbs/breadcrumbs.js +27 -0
- package/components/button/button.d.ts +2 -1
- package/components/button/button.js +26 -25
- package/components/button-group/button-group.d.ts +4 -2
- package/components/button-group/button-group.js +19 -10
- package/components/button-group/caption.d.ts +2 -2
- package/components/button-group/caption.js +1 -0
- package/components/button-set/button-set.d.ts +2 -2
- package/components/button-set/button-set.js +7 -8
- package/components/button-toolbar/button-toolbar.d.ts +2 -2
- package/components/button-toolbar/button-toolbar.js +4 -6
- package/components/caret/caret.js +1 -1
- package/components/checkbox/checkbox.d.ts +3 -2
- package/components/checkbox/checkbox.js +33 -28
- package/components/clipboard/clipboard.js +3 -2
- package/components/code/code.d.ts +3 -4
- package/components/code/code.js +14 -11
- package/components/collapse/collapse-content.d.ts +2 -1
- package/components/collapse/collapse-content.js +13 -10
- package/components/collapse/collapse-context.d.ts +0 -1
- package/components/collapse/collapse-control.d.ts +1 -1
- package/components/collapse/collapse-control.js +10 -11
- package/components/collapse/collapse.d.ts +2 -1
- package/components/collapse/collapse.js +16 -16
- package/components/confirm/confirm.d.ts +2 -1
- package/components/confirm/confirm.js +29 -21
- package/components/confirm-service/confirm-service.js +6 -4
- package/components/content-layout/content-layout.d.ts +2 -2
- package/components/content-layout/content-layout.js +12 -12
- package/components/content-layout/sidebar.d.ts +2 -2
- package/components/content-layout/sidebar.js +1 -0
- package/components/contenteditable/contenteditable.d.ts +3 -3
- package/components/contenteditable/contenteditable.js +5 -7
- package/components/control-help/control-help.d.ts +4 -0
- package/components/control-help/control-help.js +16 -0
- package/components/control-label/control-label.d.ts +2 -1
- package/components/control-label/control-label.js +7 -4
- package/components/data-list/data-list.d.ts +15 -15
- package/components/data-list/data-list.js +44 -40
- package/components/data-list/data-list.mock.d.ts +2 -2
- package/components/data-list/data-list.mock.js +165 -73
- package/components/data-list/item.d.ts +3 -3
- package/components/data-list/item.js +49 -40
- package/components/data-list/selection.js +1 -1
- package/components/data-list/title.d.ts +3 -3
- package/components/data-list/title.js +2 -0
- package/components/date-picker/date-input.d.ts +1 -1
- package/components/date-picker/date-input.js +5 -3
- package/components/date-picker/date-picker.d.ts +2 -1
- package/components/date-picker/date-picker.js +43 -34
- package/components/date-picker/date-popup.d.ts +2 -1
- package/components/date-picker/date-popup.js +51 -45
- package/components/date-picker/day.d.ts +3 -3
- package/components/date-picker/day.js +11 -8
- package/components/date-picker/month-names.d.ts +1 -2
- package/components/date-picker/month-names.js +27 -25
- package/components/date-picker/month-slider.d.ts +2 -2
- package/components/date-picker/month-slider.js +15 -13
- package/components/date-picker/month.d.ts +1 -2
- package/components/date-picker/month.js +18 -15
- package/components/date-picker/months.d.ts +1 -2
- package/components/date-picker/months.js +18 -15
- package/components/date-picker/weekdays.d.ts +1 -2
- package/components/date-picker/weekdays.js +14 -13
- package/components/date-picker/years.d.ts +3 -3
- package/components/date-picker/years.js +19 -17
- package/components/dialog/dialog.d.ts +2 -1
- package/components/dialog/dialog.js +48 -45
- package/components/dropdown/anchor.d.ts +2 -3
- package/components/dropdown/anchor.js +1 -0
- package/components/dropdown/dropdown.d.ts +2 -1
- package/components/dropdown/dropdown.js +12 -12
- package/components/dropdown-menu/dropdown-menu.d.ts +3 -3
- package/components/dropdown-menu/dropdown-menu.js +41 -29
- package/components/editable-heading/editable-heading.d.ts +2 -1
- package/components/editable-heading/editable-heading.js +74 -58
- package/components/error-bubble/error-bubble.d.ts +2 -2
- package/components/error-bubble/error-bubble.js +20 -19
- package/components/error-message/error-message.d.ts +2 -2
- package/components/error-message/error-message.js +22 -20
- package/components/footer/footer.d.ts +2 -2
- package/components/footer/footer.js +31 -27
- package/components/form/form.js +1 -1
- package/components/global/controls-height.d.ts +0 -1
- package/components/global/create-stateful-context.d.ts +5 -5
- package/components/global/create-stateful-context.js +10 -7
- package/components/global/data-tests.js +1 -1
- package/components/global/dom.d.ts +2 -2
- package/components/global/dom.js +1 -1
- package/components/global/focus-sensor-hoc.js +4 -3
- package/components/global/fuzzy-highlight.js +1 -1
- package/components/global/get-event-key.d.ts +1 -1
- package/components/global/inject-styles.js +1 -1
- package/components/global/listeners.js +1 -1
- package/components/global/normalize-indent.js +1 -1
- package/components/global/react-dom-renderer.d.ts +2 -2
- package/components/global/react-dom-renderer.js +4 -3
- package/components/global/rerender-hoc.d.ts +2 -2
- package/components/global/rerender-hoc.js +5 -4
- package/components/global/theme.d.ts +3 -3
- package/components/global/theme.js +1 -0
- package/components/global/trivial-template-tag.js +1 -1
- package/components/global/typescript-utils.d.ts +1 -1
- package/components/grid/col.d.ts +2 -2
- package/components/grid/col.js +7 -5
- package/components/grid/grid.d.ts +2 -2
- package/components/grid/grid.js +7 -8
- package/components/grid/row.d.ts +2 -2
- package/components/grid/row.js +7 -5
- package/components/group/group.d.ts +2 -2
- package/components/group/group.js +7 -8
- package/components/header/header.d.ts +2 -2
- package/components/header/header.js +12 -14
- package/components/header/logo.d.ts +2 -2
- package/components/header/logo.js +7 -5
- package/components/header/profile.d.ts +4 -3
- package/components/header/profile.js +40 -29
- package/components/header/services-link.d.ts +2 -2
- package/components/header/services-link.js +1 -0
- package/components/header/services.d.ts +2 -2
- package/components/header/services.js +31 -31
- package/components/header/smart-profile.d.ts +2 -2
- package/components/header/smart-profile.js +5 -3
- package/components/header/smart-services.d.ts +2 -2
- package/components/header/smart-services.js +4 -3
- package/components/header/tray-icon.d.ts +2 -2
- package/components/header/tray-icon.js +4 -3
- package/components/header/tray.d.ts +2 -2
- package/components/header/tray.js +11 -8
- package/components/heading/heading.d.ts +6 -6
- package/components/heading/heading.js +8 -9
- package/components/http/http.js +1 -1
- package/components/http/http.mock.js +1 -1
- package/components/hub-source/hub-source.js +1 -1
- package/components/hub-source/hub-source__user.js +1 -1
- package/components/hub-source/hub-source__users-groups.js +1 -1
- package/components/i18n/i18n-context.d.ts +1 -1
- package/components/i18n/i18n-context.js +7 -4
- package/components/icon/icon.d.ts +2 -2
- package/components/icon/icon.js +12 -10
- package/components/icon/icon__svg.d.ts +3 -3
- package/components/icon/icon__svg.js +1 -0
- package/components/icon/index.js +1 -0
- package/components/input/input.d.ts +3 -2
- package/components/input/input.js +2 -0
- package/components/island/adaptive-island-hoc.d.ts +15 -15
- package/components/island/adaptive-island-hoc.js +10 -7
- package/components/island/content.d.ts +3 -3
- package/components/island/content.js +29 -23
- package/components/island/header.d.ts +2 -2
- package/components/island/header.js +18 -13
- package/components/island/island.d.ts +14 -14
- package/components/island/island.js +7 -8
- package/components/island-legacy/content-legacy.d.ts +2 -2
- package/components/island-legacy/content-legacy.js +7 -5
- package/components/island-legacy/header-legacy.d.ts +2 -2
- package/components/island-legacy/header-legacy.js +10 -7
- package/components/island-legacy/island-legacy.d.ts +2 -2
- package/components/island-legacy/island-legacy.js +7 -5
- package/components/link/clickableLink.d.ts +2 -1
- package/components/link/clickableLink.js +8 -6
- package/components/link/link.d.ts +23 -23
- package/components/link/link.js +12 -9
- package/components/list/consts.d.ts +2 -1
- package/components/list/list.d.ts +11 -11
- package/components/list/list.js +109 -95
- package/components/list/list__custom.d.ts +2 -1
- package/components/list/list__custom.js +7 -5
- package/components/list/list__hint.d.ts +2 -2
- package/components/list/list__hint.js +7 -9
- package/components/list/list__item.d.ts +2 -2
- package/components/list/list__item.js +73 -65
- package/components/list/list__link.d.ts +2 -2
- package/components/list/list__link.js +8 -10
- package/components/list/list__separator.d.ts +2 -2
- package/components/list/list__separator.js +7 -5
- package/components/list/list__title.d.ts +2 -2
- package/components/list/list__title.js +15 -11
- package/components/list/list__users-groups-source.js +3 -1
- package/components/loader/loader.d.ts +2 -2
- package/components/loader/loader.js +5 -10
- package/components/loader/loader__core.js +1 -1
- package/components/loader-inline/loader-inline.d.ts +2 -2
- package/components/loader-inline/loader-inline.js +10 -9
- package/components/loader-screen/loader-screen.d.ts +2 -2
- package/components/loader-screen/loader-screen.js +10 -11
- package/components/login-dialog/login-dialog.d.ts +2 -2
- package/components/login-dialog/login-dialog.js +21 -16
- package/components/login-dialog/service.js +6 -4
- package/components/markdown/markdown.d.ts +2 -2
- package/components/markdown/markdown.js +7 -8
- package/components/message/message.d.ts +2 -2
- package/components/message/message.js +50 -41
- package/components/old-browsers-message/white-list.js +1 -1
- package/components/pager/pager.d.ts +2 -1
- package/components/pager/pager.js +71 -53
- package/components/panel/panel.d.ts +2 -2
- package/components/panel/panel.js +7 -8
- package/components/permissions/permissions.js +1 -1
- package/components/permissions/permissions__cache.js +1 -1
- package/components/popup/popup.d.ts +4 -3
- package/components/popup/popup.js +46 -39
- package/components/popup/popup.target.d.ts +3 -3
- package/components/popup/popup.target.js +11 -8
- package/components/popup-menu/popup-menu.d.ts +2 -2
- package/components/popup-menu/popup-menu.js +13 -9
- package/components/progress-bar/progress-bar.d.ts +2 -2
- package/components/progress-bar/progress-bar.js +17 -18
- package/components/query-assist/query-assist.d.ts +3 -2
- package/components/query-assist/query-assist.js +122 -109
- package/components/query-assist/query-assist__suggestions.d.ts +1 -2
- package/components/query-assist/query-assist__suggestions.js +3 -1
- package/components/radio/radio.d.ts +3 -3
- package/components/radio/radio.js +8 -8
- package/components/radio/radio__item.d.ts +9 -6
- package/components/radio/radio__item.js +46 -37
- package/components/select/select.d.ts +5 -2
- package/components/select/select.js +201 -180
- package/components/select/select__filter.d.ts +2 -2
- package/components/select/select__filter.js +2 -0
- package/components/select/select__popup.d.ts +4 -35
- package/components/select/select__popup.js +101 -84
- package/components/shortcuts/core.d.ts +0 -1
- package/components/shortcuts/core.js +1 -1
- package/components/shortcuts/shortcuts-hoc.d.ts +12 -12
- package/components/shortcuts/shortcuts-hoc.js +10 -8
- package/components/shortcuts/shortcuts.js +1 -1
- package/components/slider/slider.d.ts +2 -1
- package/components/slider/slider.js +78 -78
- package/components/slider/slider.utils.js +1 -1
- package/components/storage/storage.js +2 -1
- package/components/storage/storage__fallback.js +1 -1
- package/components/storage/storage__local.js +3 -2
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.d.ts +2 -1
- package/components/tab-trap/tab-trap.js +25 -20
- package/components/table/cell.d.ts +2 -2
- package/components/table/cell.js +7 -5
- package/components/table/disable-hover-hoc.d.ts +13 -13
- package/components/table/disable-hover-hoc.js +4 -3
- package/components/table/header-cell.d.ts +2 -2
- package/components/table/header-cell.js +17 -13
- package/components/table/header.d.ts +3 -3
- package/components/table/header.js +34 -26
- package/components/table/multitable.d.ts +2 -2
- package/components/table/multitable.js +12 -10
- package/components/table/row-with-focus-sensor.d.ts +3 -3
- package/components/table/row-with-focus-sensor.js +5 -3
- package/components/table/row.d.ts +2 -1
- package/components/table/row.js +50 -44
- package/components/table/selection-adapter.js +1 -1
- package/components/table/selection-shortcuts-hoc.js +4 -3
- package/components/table/selection.js +1 -1
- package/components/table/smart-table.d.ts +44 -44
- package/components/table/smart-table.js +5 -3
- package/components/table/table.d.ts +6 -5
- package/components/table/table.js +55 -45
- package/components/tabs/collapsible-more.d.ts +4 -4
- package/components/tabs/collapsible-more.js +37 -30
- package/components/tabs/collapsible-tab.d.ts +2 -1
- package/components/tabs/collapsible-tab.js +6 -6
- package/components/tabs/collapsible-tabs.d.ts +4 -4
- package/components/tabs/collapsible-tabs.js +51 -46
- package/components/tabs/custom-item.d.ts +1 -1
- package/components/tabs/dumb-tabs.d.ts +2 -1
- package/components/tabs/dumb-tabs.js +24 -18
- package/components/tabs/smart-tabs.d.ts +2 -2
- package/components/tabs/smart-tabs.js +8 -4
- package/components/tabs/tab-link.d.ts +3 -3
- package/components/tabs/tab-link.js +1 -0
- package/components/tabs/tab.d.ts +2 -2
- package/components/tabs/tab.js +7 -5
- package/components/tabs/tabs.js +2 -0
- package/components/tag/tag.d.ts +2 -1
- package/components/tag/tag.js +31 -28
- package/components/tags-input/tags-input.d.ts +3 -2
- package/components/tags-input/tags-input.js +52 -47
- package/components/tags-list/tags-list.d.ts +2 -1
- package/components/tags-list/tags-list.js +8 -5
- package/components/text/text.d.ts +2 -2
- package/components/text/text.js +7 -4
- package/components/toggle/toggle.d.ts +2 -2
- package/components/toggle/toggle.js +25 -20
- package/components/tooltip/tooltip.d.ts +2 -1
- package/components/tooltip/tooltip.js +26 -21
- package/components/user-agreement/service.js +20 -12
- package/components/user-agreement/user-agreement.d.ts +2 -2
- package/components/user-agreement/user-agreement.js +56 -39
- package/components/user-card/card.d.ts +2 -1
- package/components/user-card/card.js +1 -0
- package/components/user-card/smart-user-card-tooltip.d.ts +3 -3
- package/components/user-card/smart-user-card-tooltip.js +11 -7
- package/components/user-card/tooltip.d.ts +3 -3
- package/components/user-card/tooltip.js +15 -11
- package/components/user-card/user-card.js +1 -0
- package/package.json +5 -5
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { PureComponent, ReactNode } from 'react';
|
2
2
|
export interface MarkdownProps {
|
3
3
|
inline?: boolean | null | undefined;
|
4
4
|
children: ReactNode;
|
@@ -8,5 +8,5 @@ export interface MarkdownProps {
|
|
8
8
|
* @name Markdown
|
9
9
|
*/
|
10
10
|
export default class Markdown extends PureComponent<MarkdownProps> {
|
11
|
-
render():
|
11
|
+
render(): import("react").JSX.Element;
|
12
12
|
}
|
@@ -1,15 +1,13 @@
|
|
1
|
-
import { a as _inherits, b as _createClass,
|
2
|
-
import
|
1
|
+
import { a as _inherits, b as _createClass, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import { PureComponent } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import classNames from 'classnames';
|
5
5
|
import { m as modules_901b77ec } from '../_helpers/heading.js';
|
6
6
|
import { m as modules_607b0772 } from '../_helpers/link.js';
|
7
|
+
import { jsx } from 'react/jsx-runtime';
|
7
8
|
|
8
9
|
var modules_9c709e64 = {"p-margin":"10px","light":"light_rui_2ac4","inline":"inline_rui_9a22","markdown":"markdown_rui_9a22 font_rui_f295"};
|
9
10
|
|
10
|
-
/**
|
11
|
-
* @name Markdown
|
12
|
-
*/
|
13
11
|
var Markdown = /*#__PURE__*/function (_PureComponent) {
|
14
12
|
function Markdown() {
|
15
13
|
_classCallCheck(this, Markdown);
|
@@ -27,9 +25,10 @@ var Markdown = /*#__PURE__*/function (_PureComponent) {
|
|
27
25
|
[modules_9c709e64.markdown]: !inline,
|
28
26
|
[modules_9c709e64.inline]: inline
|
29
27
|
});
|
30
|
-
return /*#__PURE__*/
|
31
|
-
className: classes
|
32
|
-
|
28
|
+
return /*#__PURE__*/jsx("div", {
|
29
|
+
className: classes,
|
30
|
+
children: children
|
31
|
+
});
|
33
32
|
}
|
34
33
|
}]);
|
35
34
|
}(PureComponent);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { Component, ReactNode } from 'react';
|
2
2
|
import Popup, { PopupAttrs } from '../popup/popup';
|
3
3
|
import { Directions } from '../popup/popup.consts';
|
4
4
|
import { IconType } from '../icon/icon';
|
@@ -49,7 +49,7 @@ export default class Message extends Component<MessageProps> {
|
|
49
49
|
node?: HTMLElement | null;
|
50
50
|
popupRef: (el: Popup | null) => void;
|
51
51
|
getTailOffset(): number;
|
52
|
-
render():
|
52
|
+
render(): import("react").JSX.Element;
|
53
53
|
}
|
54
54
|
export type MessageAttrs = JSX.LibraryManagedAttributes<typeof Message, MessageProps>;
|
55
55
|
export {};
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createClass,
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, d as _objectSpread2, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.symbol.js';
|
3
3
|
import 'core-js/modules/es.symbol.description.js';
|
4
4
|
import 'core-js/modules/es.array.concat.js';
|
5
5
|
import 'core-js/modules/es.array.includes.js';
|
6
6
|
import 'core-js/modules/es.string.includes.js';
|
7
|
-
import
|
7
|
+
import { Component } from 'react';
|
8
8
|
import PropTypes from 'prop-types';
|
9
9
|
import classNames from 'classnames';
|
10
10
|
import gift from '@jetbrains/icons/gift';
|
@@ -14,6 +14,7 @@ import Icon from '../icon/icon.js';
|
|
14
14
|
import { Button } from '../button/button.js';
|
15
15
|
import { I18nContext } from '../i18n/i18n-context.js';
|
16
16
|
import { T as Theme, m as modules_59717246, W as WithThemeClasses, a as ThemeProvider } from '../_helpers/theme.js';
|
17
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
17
18
|
import 'core-js/modules/es.object.entries.js';
|
18
19
|
import 'core-js/modules/es.object.to-string.js';
|
19
20
|
import 'core-js/modules/es.regexp.exec.js';
|
@@ -61,9 +62,6 @@ import '../i18n/i18n.js';
|
|
61
62
|
|
62
63
|
var modules_8b837449 = {"light":"light_rui_2ac4","container":"container_rui_a216","message":"message_rui_a216","icon":"icon_rui_a216","title":"title_rui_a216 font-lower_rui_f295 font_rui_f295","description":"description_rui_a216","button":"button_rui_a216","tail":"tail_rui_a216"};
|
63
64
|
|
64
|
-
/**
|
65
|
-
* @name Message
|
66
|
-
*/
|
67
65
|
var UNIT = 8;
|
68
66
|
var TAIL_SIZE = 11;
|
69
67
|
var getTailOffsets = function getTailOffsets(offset) {
|
@@ -182,7 +180,7 @@ var Message = /*#__PURE__*/function (_Component) {
|
|
182
180
|
value: function render() {
|
183
181
|
var _this2 = this;
|
184
182
|
var _this$props = this.props,
|
185
|
-
|
183
|
+
_children = _this$props.children,
|
186
184
|
className = _this$props.className,
|
187
185
|
tailClassName = _this$props.tailClassName,
|
188
186
|
title = _this$props.title,
|
@@ -199,42 +197,53 @@ var Message = /*#__PURE__*/function (_Component) {
|
|
199
197
|
var tailClasses = classNames(modules_8b837449.tail, tailClassName);
|
200
198
|
var popupDirections = this.props.direction ? [this.props.direction] : this.props.directions;
|
201
199
|
var direction = this.state.direction;
|
202
|
-
return /*#__PURE__*/
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
}, function (themeClasses) {
|
207
|
-
var _translations$gotIt, _translations$dismiss;
|
208
|
-
return /*#__PURE__*/React.createElement(Popup, _extends({
|
209
|
-
ref: _this2.popupRef,
|
210
|
-
hidden: false,
|
211
|
-
directions: popupDirections,
|
212
|
-
className: classNames(classes, themeClasses),
|
213
|
-
offset: UNIT * 2,
|
214
|
-
onDirectionChange: _this2._onDirectionChange
|
215
|
-
}, popupProps), /*#__PURE__*/React.createElement(ThemeProvider, {
|
200
|
+
return /*#__PURE__*/jsx(I18nContext.Consumer, {
|
201
|
+
children: function children(_ref) {
|
202
|
+
var translate = _ref.translate;
|
203
|
+
return /*#__PURE__*/jsx(WithThemeClasses, {
|
216
204
|
theme: theme,
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
205
|
+
children: function children(themeClasses) {
|
206
|
+
var _translations$gotIt, _translations$dismiss;
|
207
|
+
return /*#__PURE__*/jsx(Popup, _objectSpread2(_objectSpread2({
|
208
|
+
ref: _this2.popupRef,
|
209
|
+
hidden: false,
|
210
|
+
directions: popupDirections,
|
211
|
+
className: classNames(classes, themeClasses),
|
212
|
+
offset: UNIT * 2,
|
213
|
+
onDirectionChange: _this2._onDirectionChange
|
214
|
+
}, popupProps), {}, {
|
215
|
+
children: /*#__PURE__*/jsxs(ThemeProvider, {
|
216
|
+
theme: theme,
|
217
|
+
passToPopups: true,
|
218
|
+
children: [direction && /*#__PURE__*/jsx("div", {
|
219
|
+
className: tailClasses,
|
220
|
+
style: getTailOffsets(_this2.getTailOffset())[direction]
|
221
|
+
}), icon && /*#__PURE__*/jsx(Icon, {
|
222
|
+
className: modules_8b837449.icon,
|
223
|
+
glyph: icon
|
224
|
+
}), title && /*#__PURE__*/jsx("h1", {
|
225
|
+
"data-test": "rgMessageTitle",
|
226
|
+
className: modules_8b837449.title,
|
227
|
+
children: title
|
228
|
+
}), _children && /*#__PURE__*/jsx("div", {
|
229
|
+
className: modules_8b837449.description,
|
230
|
+
children: _children
|
231
|
+
}), (onClose || buttonProps) && /*#__PURE__*/jsx(Button, _objectSpread2(_objectSpread2({
|
232
|
+
className: modules_8b837449.button,
|
233
|
+
onClick: onClose,
|
234
|
+
primary: true
|
235
|
+
}, buttonProps), {}, {
|
236
|
+
children: (_translations$gotIt = translations === null || translations === void 0 ? void 0 : translations.gotIt) !== null && _translations$gotIt !== void 0 ? _translations$gotIt : translate('gotIt')
|
237
|
+
})), onDismiss && /*#__PURE__*/jsx(Button, {
|
238
|
+
onClick: onDismiss,
|
239
|
+
text: true,
|
240
|
+
children: (_translations$dismiss = translations === null || translations === void 0 ? void 0 : translations.dismiss) !== null && _translations$dismiss !== void 0 ? _translations$dismiss : translate('dismiss')
|
241
|
+
})]
|
242
|
+
})
|
243
|
+
}));
|
244
|
+
}
|
245
|
+
});
|
246
|
+
}
|
238
247
|
});
|
239
248
|
}
|
240
249
|
}]);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { i as _slicedToArray, d as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.includes.js';
|
3
3
|
import 'core-js/modules/es.array.reduce.js';
|
4
4
|
import 'core-js/modules/es.object.to-string.js';
|
@@ -1,7 +1,8 @@
|
|
1
1
|
/**
|
2
2
|
* @name Pager
|
3
3
|
*/
|
4
|
-
import
|
4
|
+
import { PureComponent, ReactNode } from 'react';
|
5
|
+
import * as React from 'react';
|
5
6
|
import { SelectItem } from '../select/select';
|
6
7
|
export interface PagerTranslations {
|
7
8
|
perPage: string;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createClass,
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, d as _objectSpread2, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import 'core-js/modules/es.array.find.js';
|
4
4
|
import 'core-js/modules/es.array.map.js';
|
5
5
|
import 'core-js/modules/es.object.to-string.js';
|
6
|
-
import
|
6
|
+
import { PureComponent } from 'react';
|
7
7
|
import PropTypes from 'prop-types';
|
8
8
|
import classNames from 'classnames';
|
9
9
|
import chevronLeftIcon from '@jetbrains/icons/chevron-left';
|
@@ -16,6 +16,7 @@ import memoize from '../global/memoize.js';
|
|
16
16
|
import Link from '../link/link.js';
|
17
17
|
import Icon from '../icon/icon.js';
|
18
18
|
import { I18nContext } from '../i18n/i18n-context.js';
|
19
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
19
20
|
import '@jetbrains/icons/chevron-10px';
|
20
21
|
import '../link/clickableLink.js';
|
21
22
|
import '../global/controls-height.js';
|
@@ -34,6 +35,8 @@ import 'core-js/modules/es.string.split.js';
|
|
34
35
|
import '../global/data-tests.js';
|
35
36
|
import 'core-js/modules/es.array.reduce.js';
|
36
37
|
import 'core-js/modules/es.object.entries.js';
|
38
|
+
import '../control-label/control-label.js';
|
39
|
+
import '../control-help/control-help.js';
|
37
40
|
import '../_helpers/caption.js';
|
38
41
|
import 'core-js/modules/es.array.filter.js';
|
39
42
|
import 'core-js/modules/es.array.index-of.js';
|
@@ -99,7 +102,6 @@ import '../list/list__separator.js';
|
|
99
102
|
import '../list/list__hint.js';
|
100
103
|
import '../list/consts.js';
|
101
104
|
import '../_helpers/input.js';
|
102
|
-
import '../control-label/control-label.js';
|
103
105
|
import '../global/rerender-hoc.js';
|
104
106
|
import '../global/fuzzy-highlight.js';
|
105
107
|
import '../select/select__popup.js';
|
@@ -197,13 +199,14 @@ var Pager = /*#__PURE__*/function (_PureComponent) {
|
|
197
199
|
}, {
|
198
200
|
key: "getButton",
|
199
201
|
value: function getButton(page, content, key, active) {
|
200
|
-
return /*#__PURE__*/
|
202
|
+
return /*#__PURE__*/jsx(Button, _objectSpread2(_objectSpread2({
|
201
203
|
href: this.generateHref(page),
|
202
|
-
key: key,
|
203
204
|
active: active,
|
204
205
|
disabled: this.props.loader && !active && !this.props.loaderNavigation,
|
205
206
|
loader: this.props.loader && active
|
206
|
-
}, this.getClickProps(this.handlePageChange(page))),
|
207
|
+
}, this.getClickProps(this.handlePageChange(page))), {}, {
|
208
|
+
children: content
|
209
|
+
}), key);
|
207
210
|
}
|
208
211
|
}, {
|
209
212
|
key: "getClickProps",
|
@@ -227,18 +230,19 @@ var Pager = /*#__PURE__*/function (_PureComponent) {
|
|
227
230
|
key: "getPageSizeSelector",
|
228
231
|
value: function getPageSizeSelector() {
|
229
232
|
var selectOptions = this.getSelectOptions();
|
230
|
-
return !this.props.disablePageSizeSelector && /*#__PURE__*/
|
233
|
+
return !this.props.disablePageSizeSelector && /*#__PURE__*/jsx("div", {
|
231
234
|
"data-test": "ring-pager-page-size-selector",
|
232
235
|
style: {
|
233
236
|
float: 'right'
|
234
|
-
}
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
237
|
+
},
|
238
|
+
children: /*#__PURE__*/jsx(Select, {
|
239
|
+
data: selectOptions.data,
|
240
|
+
selected: selectOptions.selected,
|
241
|
+
onSelect: this.handlePageSizeChange,
|
242
|
+
type: Select.Type.INLINE,
|
243
|
+
disabled: this.props.loader
|
244
|
+
})
|
245
|
+
});
|
242
246
|
}
|
243
247
|
}, {
|
244
248
|
key: "getPagerLinks",
|
@@ -247,45 +251,50 @@ var Pager = /*#__PURE__*/function (_PureComponent) {
|
|
247
251
|
var translate = this.context.translate;
|
248
252
|
var prevLinkAvailable = this.props.currentPage !== 1;
|
249
253
|
var nextLinkAvailable = this.props.openTotal || this.props.currentPage !== this.getTotalPages();
|
250
|
-
var nextIcon = /*#__PURE__*/
|
251
|
-
glyph: chevronRightIcon
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
key: "icon"
|
257
|
-
});
|
254
|
+
var nextIcon = /*#__PURE__*/jsx(Icon, {
|
255
|
+
glyph: chevronRightIcon
|
256
|
+
}, "icon");
|
257
|
+
var prevIcon = /*#__PURE__*/jsx(Icon, {
|
258
|
+
glyph: chevronLeftIcon
|
259
|
+
}, "icon");
|
258
260
|
var prevText = (_this$props$translati = (_this$props$translati2 = this.props.translations) === null || _this$props$translati2 === void 0 ? void 0 : _this$props$translati2.previousPage) !== null && _this$props$translati !== void 0 ? _this$props$translati : translate('previousPage');
|
259
261
|
var nextText = (_this$props$translati3 = (_this$props$translati4 = this.props.translations) === null || _this$props$translati4 === void 0 ? void 0 : _this$props$translati4.nextPage) !== null && _this$props$translati3 !== void 0 ? _this$props$translati3 : translate('nextPage');
|
260
|
-
var nextLinkContent = [/*#__PURE__*/
|
261
|
-
|
262
|
-
},
|
263
|
-
var prevLinkContent = [prevIcon, /*#__PURE__*/
|
264
|
-
|
265
|
-
},
|
262
|
+
var nextLinkContent = [/*#__PURE__*/jsx("span", {
|
263
|
+
children: nextText
|
264
|
+
}, "text"), nextIcon];
|
265
|
+
var prevLinkContent = [prevIcon, /*#__PURE__*/jsx("span", {
|
266
|
+
children: prevText
|
267
|
+
}, "text")];
|
266
268
|
var prevLinkHref = this.generateHref(this.props.currentPage - 1);
|
267
269
|
var nextLinkHref = this.generateHref(this.props.currentPage + 1);
|
268
270
|
var disabledLinkClasses = classNames({
|
269
271
|
[modules_1a5f0d42.link]: true,
|
270
272
|
[modules_1a5f0d42.linkDisabled]: true
|
271
273
|
});
|
272
|
-
return /*#__PURE__*/
|
273
|
-
className: modules_1a5f0d42.links
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
274
|
+
return /*#__PURE__*/jsxs("div", {
|
275
|
+
className: modules_1a5f0d42.links,
|
276
|
+
children: [prevLinkAvailable && (!this.props.loader || this.props.loaderNavigation) ? /*#__PURE__*/jsx(Link, _objectSpread2(_objectSpread2({
|
277
|
+
href: prevLinkHref,
|
278
|
+
className: modules_1a5f0d42.link
|
279
|
+
}, this.getClickProps(this.handlePrevClick)), {}, {
|
280
|
+
children: prevLinkContent
|
281
|
+
})) : /*#__PURE__*/jsxs("span", {
|
282
|
+
className: disabledLinkClasses,
|
283
|
+
children: [prevIcon, /*#__PURE__*/jsx("span", {
|
284
|
+
children: prevText
|
285
|
+
}, "text")]
|
286
|
+
}), nextLinkAvailable && (!this.props.loader || this.props.loaderNavigation) ? /*#__PURE__*/jsx(Link, _objectSpread2(_objectSpread2({
|
287
|
+
href: nextLinkHref,
|
288
|
+
className: modules_1a5f0d42.link
|
289
|
+
}, this.getClickProps(this.handleNextClick)), {}, {
|
290
|
+
children: nextLinkContent
|
291
|
+
})) : /*#__PURE__*/jsxs("span", {
|
292
|
+
className: disabledLinkClasses,
|
293
|
+
children: [/*#__PURE__*/jsx("span", {
|
294
|
+
children: nextText
|
295
|
+
}, "text"), nextIcon]
|
296
|
+
})]
|
297
|
+
});
|
289
298
|
}
|
290
299
|
}, {
|
291
300
|
key: "generateHref",
|
@@ -335,19 +344,28 @@ var Pager = /*#__PURE__*/function (_PureComponent) {
|
|
335
344
|
buttons.push(this.getButton(i, i, i, i === currentPage));
|
336
345
|
}
|
337
346
|
var lastPageButtonAvailable = end < totalPages && !this.props.openTotal || this.props.openTotal && this.props.canLoadLastPageWithOpenTotal;
|
338
|
-
return /*#__PURE__*/
|
339
|
-
|
340
|
-
|
341
|
-
|
347
|
+
return /*#__PURE__*/jsxs("div", {
|
348
|
+
children: [this.getPagerLinks(), /*#__PURE__*/jsxs(ButtonToolbar, {
|
349
|
+
children: [start > 1 && this.getButton(1, (_this$props$translati5 = (_this$props$translati6 = this.props.translations) === null || _this$props$translati6 === void 0 ? void 0 : _this$props$translati6.firstPage) !== null && _this$props$translati5 !== void 0 ? _this$props$translati5 : translate('firstPage')), /*#__PURE__*/jsxs(ButtonGroup, {
|
350
|
+
children: [start > 1 && this.getButton(start - 1, '...'), buttons, end < totalPages && this.getButton(end + 1, '...'), end === totalPages && this.props.openTotal && /*#__PURE__*/jsx(Button, _objectSpread2(_objectSpread2({
|
351
|
+
href: this.generateHref(end + 1),
|
352
|
+
disabled: this.props.loader
|
353
|
+
}, this.getClickProps(this.handleLoadMore(end + 1))), {}, {
|
354
|
+
children: '...'
|
355
|
+
}))]
|
356
|
+
}), lastPageButtonAvailable && this.getButton(this.props.openTotal ? -1 : totalPages, (_this$props$translati7 = (_this$props$translati8 = this.props.translations) === null || _this$props$translati8 === void 0 ? void 0 : _this$props$translati8.lastPage) !== null && _this$props$translati7 !== void 0 ? _this$props$translati7 : translate('lastPage'))]
|
357
|
+
}), this.getPageSizeSelector()]
|
358
|
+
});
|
342
359
|
}
|
343
360
|
}, {
|
344
361
|
key: "render",
|
345
362
|
value: function render() {
|
346
363
|
var classes = classNames(modules_1a5f0d42.pager, this.props.className);
|
347
|
-
return /*#__PURE__*/
|
364
|
+
return /*#__PURE__*/jsx("div", {
|
348
365
|
"data-test": "ring-pager",
|
349
|
-
className: classes
|
350
|
-
|
366
|
+
className: classes,
|
367
|
+
children: this.getTotalPages() > 1 || this.props.openTotal ? this.getPagerContent() : this.getPageSizeSelector()
|
368
|
+
});
|
351
369
|
}
|
352
370
|
}]);
|
353
371
|
}(PureComponent);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { HTMLAttributes, PureComponent } from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
/**
|
4
4
|
* @name Panel
|
@@ -8,5 +8,5 @@ export default class Panel extends PureComponent<HTMLAttributes<HTMLElement>> {
|
|
8
8
|
className: PropTypes.Requireable<string>;
|
9
9
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
10
10
|
};
|
11
|
-
render():
|
11
|
+
render(): import("react").JSX.Element;
|
12
12
|
}
|
@@ -1,14 +1,12 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties,
|
2
|
-
import
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, d as _objectSpread2, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import { PureComponent } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import classNames from 'classnames';
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
5
6
|
|
6
7
|
var modules_cf670408 = {"light":"light_rui_2ac4","panel":"panel_rui_e32c panel_rui_027b"};
|
7
8
|
|
8
9
|
var _excluded = ["className", "children"];
|
9
|
-
/**
|
10
|
-
* @name Panel
|
11
|
-
*/
|
12
10
|
var Panel = /*#__PURE__*/function (_PureComponent) {
|
13
11
|
function Panel() {
|
14
12
|
_classCallCheck(this, Panel);
|
@@ -23,9 +21,10 @@ var Panel = /*#__PURE__*/function (_PureComponent) {
|
|
23
21
|
children = _this$props.children,
|
24
22
|
props = _objectWithoutProperties(_this$props, _excluded);
|
25
23
|
var classes = classNames(modules_cf670408.panel, className);
|
26
|
-
return /*#__PURE__*/
|
27
|
-
className: classes
|
28
|
-
|
24
|
+
return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, props), {}, {
|
25
|
+
className: classes,
|
26
|
+
children: children
|
27
|
+
}));
|
29
28
|
}
|
30
29
|
}]);
|
31
30
|
}(PureComponent);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, b as _createClass,
|
1
|
+
import { _ as _defineProperty, b as _createClass, e as _classCallCheck } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.index-of.js';
|
3
3
|
import 'core-js/modules/es.array.map.js';
|
4
4
|
import 'core-js/modules/es.object.to-string.js';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, b as _createClass,
|
1
|
+
import { _ as _defineProperty, b as _createClass, e as _classCallCheck } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.reduce.js';
|
3
3
|
import 'core-js/modules/es.object.to-string.js';
|
4
4
|
|
@@ -1,7 +1,8 @@
|
|
1
1
|
/**
|
2
2
|
* @name Popup
|
3
3
|
*/
|
4
|
-
import
|
4
|
+
import { PureComponent, ReactNode, CSSProperties, SyntheticEvent } from 'react';
|
5
|
+
import * as React from 'react';
|
5
6
|
import { Listeners } from '../global/dom';
|
6
7
|
import { PositionStyles } from './position';
|
7
8
|
import { Dimension, Directions, Display, MaxHeight, MinWidth } from './popup.consts';
|
@@ -97,8 +98,8 @@ export default class Popup<P extends BasePopupProps = PopupProps> extends PureCo
|
|
97
98
|
uid: string;
|
98
99
|
calculateDisplay: (prevState: PopupState) => {
|
99
100
|
display: Display;
|
100
|
-
client?: boolean
|
101
|
-
direction?: Directions
|
101
|
+
client?: boolean;
|
102
|
+
direction?: Directions;
|
102
103
|
};
|
103
104
|
static PopupProps: {
|
104
105
|
Directions: typeof Directions;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createClass,
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, e as _classCallCheck, f as _callSuper, d as _objectSpread2, i as _slicedToArray } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import 'core-js/modules/es.object.entries.js';
|
4
4
|
import 'core-js/modules/es.object.to-string.js';
|
@@ -6,7 +6,7 @@ import 'core-js/modules/es.regexp.exec.js';
|
|
6
6
|
import 'core-js/modules/es.regexp.to-string.js';
|
7
7
|
import 'core-js/modules/es.string.replace.js';
|
8
8
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
9
|
-
import
|
9
|
+
import { PureComponent } from 'react';
|
10
10
|
import { createPortal } from 'react-dom';
|
11
11
|
import PropTypes from 'prop-types';
|
12
12
|
import classNames from 'classnames';
|
@@ -17,8 +17,9 @@ import Shortcuts from '../shortcuts/shortcuts.js';
|
|
17
17
|
import joinDataTestAttributes from '../global/data-tests.js';
|
18
18
|
import TabTrap from '../tab-trap/tab-trap.js';
|
19
19
|
import position from './position.js';
|
20
|
-
import {
|
20
|
+
import { DEFAULT_DIRECTIONS, Directions, Dimension, MinWidth, MaxHeight, Display } from './popup.consts.js';
|
21
21
|
import { PopupTargetContext, PopupTarget } from './popup.target.js';
|
22
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
22
23
|
import 'core-js/modules/es.array.filter.js';
|
23
24
|
import 'core-js/modules/es.array.iterator.js';
|
24
25
|
import 'core-js/modules/es.object.assign.js';
|
@@ -313,10 +314,11 @@ var Popup = /*#__PURE__*/function (_PureComponent) {
|
|
313
314
|
trapFocus = _this$props3.trapFocus,
|
314
315
|
autoFocusFirst = _this$props3.autoFocusFirst,
|
315
316
|
children = _this$props3.children;
|
316
|
-
return trapFocus ? /*#__PURE__*/
|
317
|
+
return trapFocus ? /*#__PURE__*/jsx(TabTrap, {
|
317
318
|
autoFocusFirst: autoFocusFirst,
|
318
|
-
focusBackOnExit: true
|
319
|
-
|
319
|
+
focusBackOnExit: true,
|
320
|
+
children: children
|
321
|
+
}) : children;
|
320
322
|
}
|
321
323
|
}, {
|
322
324
|
key: "render",
|
@@ -342,39 +344,44 @@ var Popup = /*#__PURE__*/function (_PureComponent) {
|
|
342
344
|
[modules_2f69e2e2.showing]: showing
|
343
345
|
});
|
344
346
|
var direction = (this.state.direction || '').toLowerCase().replace(/[_]/g, '-');
|
345
|
-
return /*#__PURE__*/
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
347
|
+
return /*#__PURE__*/jsx(PopupTargetContext.Consumer, {
|
348
|
+
children: function children(value) {
|
349
|
+
_this3.ringPopupTarget = value;
|
350
|
+
return /*#__PURE__*/jsxs("span", {
|
351
|
+
// prevent bubbling through portal
|
352
|
+
onClick: stop
|
353
|
+
// This handler only blocks bubbling through React portal
|
354
|
+
,
|
355
|
+
role: "presentation",
|
356
|
+
ref: _this3.portalRef,
|
357
|
+
children: [_this3.shouldUseShortcuts() && /*#__PURE__*/jsx(Shortcuts, {
|
358
|
+
map: _this3.shortcutsMap,
|
359
|
+
scope: _this3.shortcutsScope
|
360
|
+
}), (client || _this3.state.client) && (keepMounted || !hidden) && /*#__PURE__*/createPortal( /*#__PURE__*/jsx(PopupTarget, {
|
361
|
+
id: _this3.uid,
|
362
|
+
ref: _this3.containerRef,
|
363
|
+
onMouseOver: onMouseOver,
|
364
|
+
onFocus: onMouseOver,
|
365
|
+
onMouseOut: onMouseOut,
|
366
|
+
onBlur: onMouseOut,
|
367
|
+
onContextMenu: onContextMenu,
|
368
|
+
children: /*#__PURE__*/jsx("div", {
|
369
|
+
"data-test": joinDataTestAttributes('ring-popup', dataTest),
|
370
|
+
"data-test-shown": !hidden && !showing,
|
371
|
+
"data-test-direction": direction,
|
372
|
+
ref: _this3.popupRef,
|
373
|
+
className: classes,
|
374
|
+
style: style,
|
375
|
+
onMouseDown: onMouseDown,
|
376
|
+
onMouseUp: onMouseUp
|
377
|
+
// mouse handlers are used to track clicking on inner elements
|
378
|
+
,
|
379
|
+
role: "presentation",
|
380
|
+
children: _this3.getInternalContent()
|
381
|
+
})
|
382
|
+
}), _this3.getContainer() || document.body)]
|
383
|
+
});
|
384
|
+
}
|
378
385
|
});
|
379
386
|
}
|
380
387
|
}]);
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import
|
2
|
-
export declare const PopupTargetContext:
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
2
|
+
export declare const PopupTargetContext: import("react").Context<string | Element | undefined>;
|
3
3
|
export interface PopupTargetProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
4
4
|
id: string;
|
5
5
|
children: ReactNode | ((target: ReactNode) => ReactNode);
|
6
6
|
}
|
7
|
-
export declare const PopupTarget:
|
7
|
+
export declare const PopupTarget: import("react").ForwardRefExoticComponent<PopupTargetProps & import("react").RefAttributes<HTMLDivElement>>;
|