@jetbrains/ring-ui-built 6.0.34 → 6.0.36
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.js +1 -1
- package/components/auth/response-parser.js +1 -1
- package/components/auth/storage.js +3 -2
- 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.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 +2 -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 -3
- 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-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 +11 -11
- 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 +2 -2
- package/components/date-picker/day.js +11 -8
- package/components/date-picker/month-names.d.ts +2 -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 +2 -2
- package/components/date-picker/month.js +18 -15
- package/components/date-picker/months.d.ts +2 -2
- package/components/date-picker/months.js +18 -15
- package/components/date-picker/weekdays.d.ts +2 -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 +3 -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/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.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/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 +2 -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 +11 -11
- 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 +10 -10
- 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 +15 -15
- package/components/link/link.js +12 -9
- package/components/list/consts.d.ts +2 -1
- package/components/list/list.d.ts +10 -10
- 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 +2 -1
- 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 +2 -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 +6 -4
- 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 +8 -8
- 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 +9 -9
- 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 +2 -1
- 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/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 { _ as _defineProperty, a as _inherits, b as _createClass, d as _objectSpread2, e as
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, d as _objectSpread2, e as _classCallCheck, f as _callSuper, c as _objectWithoutProperties, n as _toPropertyKey } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import 'core-js/modules/es.array.filter.js';
|
4
4
|
import 'core-js/modules/es.array.find.js';
|
@@ -13,7 +13,7 @@ import 'core-js/modules/es.regexp.exec.js';
|
|
13
13
|
import 'core-js/modules/es.string.replace.js';
|
14
14
|
import 'core-js/modules/es.string.trim.js';
|
15
15
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
16
|
-
import
|
16
|
+
import { Fragment, Component } from 'react';
|
17
17
|
import classNames from 'classnames';
|
18
18
|
import PropTypes from 'prop-types';
|
19
19
|
import chevronDownIcon from '@jetbrains/icons/chevron-down';
|
@@ -36,8 +36,9 @@ import { I18nContext } from '../i18n/i18n-context.js';
|
|
36
36
|
import composeRefs from '../global/composeRefs.js';
|
37
37
|
import { refObject } from '../global/prop-types.js';
|
38
38
|
import { isArray } from '../global/typescript-utils.js';
|
39
|
-
import {
|
39
|
+
import { ControlsHeightContext, ControlsHeight } from '../global/controls-height.js';
|
40
40
|
import SelectPopup from './select__popup.js';
|
41
|
+
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
41
42
|
import { A as Anchor } from '../_helpers/anchor.js';
|
42
43
|
import 'core-js/modules/es.object.entries.js';
|
43
44
|
import '@jetbrains/icons/chevron-10px';
|
@@ -91,6 +92,7 @@ import '../list/list__item.js';
|
|
91
92
|
import '../checkbox/checkbox.js';
|
92
93
|
import '@jetbrains/icons/checkmark-12px';
|
93
94
|
import '@jetbrains/icons/remove-12px';
|
95
|
+
import '../control-help/control-help.js';
|
94
96
|
import '../list/list__custom.js';
|
95
97
|
import '../global/get-event-key.js';
|
96
98
|
import '../list/list__title.js';
|
@@ -109,9 +111,6 @@ import '../_helpers/select__filter.js';
|
|
109
111
|
|
110
112
|
var modules_9d0de074 = {"button-shadow":"i__const_button_shadow_0","select":"select_rui_e9c2","value":"value_rui_e9c2 ellipsis_rui_f295 font_rui_f295","icons":"icons_rui_e9c2","light":"light_rui_2ac4","toolbar":"toolbar_rui_e9c2","button":"button_rui_e9c2","buttonSpaced":"buttonSpaced_rui_e9c2","inputMode":"inputMode_rui_e9c2","selectedIcon":"selectedIcon_rui_e9c2 resetButton_rui_f295","clearIcon":"clearIcon_rui_e9c2","sizeS":"sizeS_rui_e9c2","sizeM":"sizeM_rui_e9c2","sizeL":"sizeL_rui_e9c2","sizeFULL":"sizeFULL_rui_e9c2","sizeAUTO":"sizeAUTO_rui_e9c2","buttonMode":"buttonMode_rui_e9c2","open":"open_rui_e9c2","buttonContainer":"buttonContainer_rui_e9c2","buttonValue":"buttonValue_rui_e9c2 ellipsis_rui_f295","buttonValueOpen":"buttonValueOpen_rui_e9c2","buttonValueEmpty":"buttonValueEmpty_rui_e9c2","heightS":"heightS_rui_e9c2","label":"label_rui_e9c2","disabled":"disabled_rui_e9c2","avatar":"avatar_rui_e9c2","popup":"popup_rui_e9c2","chevron":"chevron_rui_e9c2","chevronIcon":"chevronIcon_rui_e9c2"};
|
111
113
|
|
112
|
-
/**
|
113
|
-
* @name Select
|
114
|
-
*/
|
115
114
|
function noop() {}
|
116
115
|
/**
|
117
116
|
* @enum {number}
|
@@ -693,12 +692,13 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
693
692
|
separator: reset.separator,
|
694
693
|
key: reset.label,
|
695
694
|
rgItemType: List.ListProps.Type.CUSTOM,
|
696
|
-
template: /*#__PURE__*/
|
695
|
+
template: /*#__PURE__*/jsx(Button, {
|
697
696
|
text: true,
|
698
697
|
className: modules_9d0de074.button,
|
699
698
|
"data-test": "ring-select-reset-tags-button",
|
700
|
-
height: ControlsHeight.S
|
701
|
-
|
699
|
+
height: ControlsHeight.S,
|
700
|
+
children: reset.label
|
701
|
+
}),
|
702
702
|
glyph: reset.glyph,
|
703
703
|
onClick: resetHandler
|
704
704
|
};
|
@@ -727,59 +727,62 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
727
727
|
showPopup = _this$state2.showPopup,
|
728
728
|
shownData = _this$state2.shownData;
|
729
729
|
var _shownData = this._prependResetOption(shownData);
|
730
|
-
return /*#__PURE__*/
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
730
|
+
return /*#__PURE__*/jsx(I18nContext.Consumer, {
|
731
|
+
children: function children(_ref2) {
|
732
|
+
var translate = _ref2.translate;
|
733
|
+
var message;
|
734
|
+
if (_this3.props.loading) {
|
735
|
+
var _this3$props$loadingM;
|
736
|
+
message = (_this3$props$loadingM = _this3.props.loadingMessage) !== null && _this3$props$loadingM !== void 0 ? _this3$props$loadingM : translate('loading');
|
737
|
+
} else if (!shownData.length) {
|
738
|
+
var _this3$props$notFound;
|
739
|
+
message = (_this3$props$notFound = _this3.props.notFoundMessage) !== null && _this3$props$notFound !== void 0 ? _this3$props$notFound : translate('noOptionsFound');
|
740
|
+
}
|
741
|
+
return /*#__PURE__*/jsx(SelectPopup, {
|
742
|
+
data: _shownData,
|
743
|
+
message: message,
|
744
|
+
toolbar: showPopup && _this3.getToolbar(),
|
745
|
+
topbar: _this3.getTopbar(),
|
746
|
+
loading: _this3.props.loading,
|
747
|
+
activeIndex: _this3.state.selectedIndex,
|
748
|
+
hidden: !showPopup,
|
749
|
+
ref: _this3.popupRef,
|
750
|
+
maxHeight: _this3.props.maxHeight,
|
751
|
+
minWidth: _this3.props.minWidth,
|
752
|
+
directions: _this3.props.directions,
|
753
|
+
className: _this3.props.popupClassName,
|
754
|
+
style: _this3.props.popupStyle,
|
755
|
+
top: _this3.props.top,
|
756
|
+
left: _this3.props.left,
|
757
|
+
offset: _this3.props.offset,
|
758
|
+
filter: _this3.isInputMode() ? false : _this3.props.filter // disable popup filter in INPUT mode
|
759
|
+
,
|
760
|
+
filterIcon: _this3.props.filterIcon,
|
761
|
+
filterRef: _this3.props.filterRef,
|
762
|
+
multiple: _this3.props.multiple,
|
763
|
+
filterValue: _this3.state.filterValue,
|
764
|
+
anchorElement: anchorElement,
|
765
|
+
onCloseAttempt: _this3._onCloseAttempt,
|
766
|
+
onOutsideClick: _this3.props.onOutsideClick,
|
767
|
+
onSelect: _this3._listSelectHandler,
|
768
|
+
onSelectAll: _this3._listSelectAllHandler,
|
769
|
+
onFilter: _this3._filterChangeHandler,
|
770
|
+
onClear: _this3.clearFilter,
|
771
|
+
onLoadMore: _this3.props.onLoadMore,
|
772
|
+
isInputMode: _this3.isInputMode(),
|
773
|
+
selected: _this3.state.selected,
|
774
|
+
tags: _this3.props.tags,
|
775
|
+
compact: _this3.props.compact,
|
776
|
+
renderOptimization: _this3.props.renderOptimization,
|
777
|
+
ringPopupTarget: _this3.props.ringPopupTarget,
|
778
|
+
disableMoveOverflow: _this3.props.disableMoveOverflow,
|
779
|
+
disableScrollToActive: _this3.props.disableScrollToActive,
|
780
|
+
dir: _this3.props.dir,
|
781
|
+
onEmptyPopupEnter: _this3.onEmptyPopupEnter,
|
782
|
+
listId: _this3.listId,
|
783
|
+
preventListOverscroll: _this3.props.preventListOverscroll
|
784
|
+
});
|
739
785
|
}
|
740
|
-
return /*#__PURE__*/React.createElement(SelectPopup, {
|
741
|
-
data: _shownData,
|
742
|
-
message: message,
|
743
|
-
toolbar: showPopup && _this3.getToolbar(),
|
744
|
-
topbar: _this3.getTopbar(),
|
745
|
-
loading: _this3.props.loading,
|
746
|
-
activeIndex: _this3.state.selectedIndex,
|
747
|
-
hidden: !showPopup,
|
748
|
-
ref: _this3.popupRef,
|
749
|
-
maxHeight: _this3.props.maxHeight,
|
750
|
-
minWidth: _this3.props.minWidth,
|
751
|
-
directions: _this3.props.directions,
|
752
|
-
className: _this3.props.popupClassName,
|
753
|
-
style: _this3.props.popupStyle,
|
754
|
-
top: _this3.props.top,
|
755
|
-
left: _this3.props.left,
|
756
|
-
filter: _this3.isInputMode() ? false : _this3.props.filter // disable popup filter in INPUT mode
|
757
|
-
,
|
758
|
-
filterIcon: _this3.props.filterIcon,
|
759
|
-
filterRef: _this3.props.filterRef,
|
760
|
-
multiple: _this3.props.multiple,
|
761
|
-
filterValue: _this3.state.filterValue,
|
762
|
-
anchorElement: anchorElement,
|
763
|
-
onCloseAttempt: _this3._onCloseAttempt,
|
764
|
-
onOutsideClick: _this3.props.onOutsideClick,
|
765
|
-
onSelect: _this3._listSelectHandler,
|
766
|
-
onSelectAll: _this3._listSelectAllHandler,
|
767
|
-
onFilter: _this3._filterChangeHandler,
|
768
|
-
onClear: _this3.clearFilter,
|
769
|
-
onLoadMore: _this3.props.onLoadMore,
|
770
|
-
isInputMode: _this3.isInputMode(),
|
771
|
-
selected: _this3.state.selected,
|
772
|
-
tags: _this3.props.tags,
|
773
|
-
compact: _this3.props.compact,
|
774
|
-
renderOptimization: _this3.props.renderOptimization,
|
775
|
-
ringPopupTarget: _this3.props.ringPopupTarget,
|
776
|
-
disableMoveOverflow: _this3.props.disableMoveOverflow,
|
777
|
-
disableScrollToActive: _this3.props.disableScrollToActive,
|
778
|
-
dir: _this3.props.dir,
|
779
|
-
onEmptyPopupEnter: _this3.onEmptyPopupEnter,
|
780
|
-
listId: _this3.listId,
|
781
|
-
preventListOverscroll: _this3.props.preventListOverscroll
|
782
|
-
});
|
783
786
|
});
|
784
787
|
}
|
785
788
|
}, {
|
@@ -796,21 +799,23 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
796
799
|
if (!isToolbarHasElements) {
|
797
800
|
return null;
|
798
801
|
}
|
799
|
-
return /*#__PURE__*/
|
802
|
+
return /*#__PURE__*/jsxs("div", {
|
800
803
|
className: classNames({
|
801
804
|
[modules_9d0de074.toolbar]: Boolean(this.state.addButton || renderBottomToolbar)
|
802
805
|
}),
|
803
|
-
"data-test": "ring-select-toolbar"
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
806
|
+
"data-test": "ring-select-toolbar",
|
807
|
+
children: [renderBottomToolbar && renderBottomToolbar(), this.state.addButton && /*#__PURE__*/jsx(Button, {
|
808
|
+
text: true,
|
809
|
+
delayed: delayed,
|
810
|
+
className: classNames(modules_9d0de074.button, modules_9d0de074.buttonSpaced),
|
811
|
+
onClick: this.addHandler,
|
812
|
+
"data-test": "ring-select-toolbar-button",
|
813
|
+
children: prefix ? "".concat(prefix, " ").concat(label) : label
|
814
|
+
}), hint && /*#__PURE__*/jsx(List.ListHint, {
|
815
|
+
label: hint,
|
816
|
+
"data-test": "ring-select-toolbar-hint"
|
817
|
+
})]
|
818
|
+
});
|
814
819
|
}
|
815
820
|
}, {
|
816
821
|
key: "getTopbar",
|
@@ -904,41 +909,38 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
904
909
|
var icons = [];
|
905
910
|
var height = this.props.height || this.context;
|
906
911
|
if (!Array.isArray(selected) && selected !== null && selected !== void 0 && selected.icon) {
|
907
|
-
icons.push( /*#__PURE__*/
|
912
|
+
icons.push( /*#__PURE__*/jsx("button", {
|
908
913
|
title: "Toggle options popup",
|
909
914
|
type: "button",
|
910
915
|
className: modules_9d0de074.selectedIcon,
|
911
|
-
key: "selected",
|
912
916
|
disabled: this.props.disabled,
|
913
917
|
onClick: this._clickHandler,
|
914
918
|
style: {
|
915
919
|
backgroundImage: "url(".concat(selected.icon, ")")
|
916
920
|
}
|
917
|
-
}));
|
921
|
+
}, "selected"));
|
918
922
|
}
|
919
923
|
if (clear && !disabled && !this._selectionIsEmpty()) {
|
920
|
-
icons.push( /*#__PURE__*/
|
924
|
+
icons.push( /*#__PURE__*/jsx(Button, {
|
921
925
|
title: "Clear selection",
|
922
926
|
"data-test": "ring-clear-select",
|
923
927
|
className: modules_9d0de074.clearIcon,
|
924
|
-
key: "close",
|
925
928
|
disabled: this.props.disabled,
|
926
929
|
onClick: this.clear,
|
927
930
|
height: height,
|
928
931
|
icon: closeIcon
|
929
|
-
}));
|
932
|
+
}, "close"));
|
930
933
|
}
|
931
934
|
if (!hideArrow) {
|
932
|
-
icons.push( /*#__PURE__*/
|
935
|
+
icons.push( /*#__PURE__*/jsx(Button, {
|
933
936
|
title: "Toggle options popup",
|
934
937
|
className: modules_9d0de074.chevron,
|
935
938
|
iconClassName: modules_9d0de074.chevronIcon,
|
936
939
|
icon: chevronDownIcon,
|
937
|
-
key: "hide",
|
938
940
|
disabled: this.props.disabled,
|
939
941
|
height: height,
|
940
942
|
onClick: this._clickHandler
|
941
|
-
}));
|
943
|
+
}, "hide"));
|
942
944
|
}
|
943
945
|
return icons;
|
944
946
|
}
|
@@ -946,7 +948,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
946
948
|
key: "_getAvatar",
|
947
949
|
value: function _getAvatar() {
|
948
950
|
var _this$state$selected, _this$state$selected2;
|
949
|
-
return !Array.isArray(this.state.selected) && (((_this$state$selected = this.state.selected) === null || _this$state$selected === void 0 ? void 0 : _this$state$selected.avatar) || ((_this$state$selected2 = this.state.selected) === null || _this$state$selected2 === void 0 ? void 0 : _this$state$selected2.showGeneratedAvatar)) && /*#__PURE__*/
|
951
|
+
return !Array.isArray(this.state.selected) && (((_this$state$selected = this.state.selected) === null || _this$state$selected === void 0 ? void 0 : _this$state$selected.avatar) || ((_this$state$selected2 = this.state.selected) === null || _this$state$selected2 === void 0 ? void 0 : _this$state$selected2.showGeneratedAvatar)) && /*#__PURE__*/jsx(Avatar, {
|
950
952
|
className: modules_9d0de074.avatar,
|
951
953
|
url: this.state.selected.avatar,
|
952
954
|
username: this.state.selected.username,
|
@@ -981,9 +983,10 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
981
983
|
});
|
982
984
|
var icons = this._getIcons();
|
983
985
|
var style = getStyle(icons.length);
|
984
|
-
var iconsNode = /*#__PURE__*/
|
985
|
-
className: modules_9d0de074.icons
|
986
|
-
|
986
|
+
var iconsNode = /*#__PURE__*/jsx("div", {
|
987
|
+
className: modules_9d0de074.icons,
|
988
|
+
children: icons
|
989
|
+
});
|
987
990
|
var ariaProps = this.state.showPopup ? {
|
988
991
|
'aria-owns': this.listId,
|
989
992
|
'aria-activedescendant': activeItemId,
|
@@ -994,116 +997,133 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
994
997
|
switch (this.props.type) {
|
995
998
|
case Type.INPUT_WITHOUT_CONTROLS:
|
996
999
|
case Type.INPUT:
|
997
|
-
return /*#__PURE__*/
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1000
|
+
return /*#__PURE__*/jsxs(Fragment$1, {
|
1001
|
+
children: [/*#__PURE__*/jsxs("div", {
|
1002
|
+
ref: this.nodeRef,
|
1003
|
+
className: classNames(classes, modules_9d0de074.inputMode),
|
1004
|
+
"data-test": joinDataTestAttributes('ring-select', dataTest),
|
1005
|
+
children: [shortcutsEnabled && /*#__PURE__*/jsx(Shortcuts, {
|
1006
|
+
map: this.getShortcutsMap(),
|
1007
|
+
scope: this.shortcutsScope
|
1008
|
+
}), /*#__PURE__*/jsx(Input, _objectSpread2(_objectSpread2({}, ariaProps), {}, {
|
1009
|
+
height: this.props.height,
|
1010
|
+
autoComplete: "off",
|
1011
|
+
id: this.props.id,
|
1012
|
+
onClick: this._clickHandler,
|
1013
|
+
inputRef: composeRefs(this.filterRef, this.props.filterRef),
|
1014
|
+
disabled: this.props.disabled,
|
1015
|
+
value: this.state.filterValue,
|
1016
|
+
borderless: this.props.type === Type.INPUT_WITHOUT_CONTROLS,
|
1017
|
+
style: style,
|
1018
|
+
size: Size.FULL,
|
1019
|
+
onChange: this._filterChangeHandler,
|
1020
|
+
onFocus: this._focusHandler,
|
1021
|
+
onBlur: this._blurHandler
|
1022
|
+
// Input with error style without description
|
1023
|
+
,
|
1024
|
+
error: this.props.error != null ? '' : null,
|
1025
|
+
label: this.props.type === Type.INPUT ? this._getLabel() : null,
|
1026
|
+
placeholder: this.props.inputPlaceholder,
|
1027
|
+
onKeyDown: this.props.onKeyDown,
|
1028
|
+
"data-test": "ring-select__focus",
|
1029
|
+
enableShortcuts: shortcutsEnabled ? Object.keys(_objectSpread2(_objectSpread2({}, this.getShortcutsMap()), (_this$_popup5 = this._popup) === null || _this$_popup5 === void 0 || (_this$_popup5 = _this$_popup5.list) === null || _this$_popup5 === void 0 ? void 0 : _this$_popup5.shortcutsMap)) : undefined,
|
1030
|
+
icon: this.props.filterIcon,
|
1031
|
+
afterInput: this.props.type === Type.INPUT && iconsNode
|
1032
|
+
})), this._renderPopup()]
|
1033
|
+
}), this.props.error && /*#__PURE__*/jsx("div", {
|
1034
|
+
className: classNames(modules_88cfaf40.errorText, modules_88cfaf40["size".concat(this.props.size)]),
|
1035
|
+
children: this.props.error
|
1036
|
+
})]
|
1037
|
+
});
|
1031
1038
|
case Type.BUTTON:
|
1032
|
-
return /*#__PURE__*/
|
1039
|
+
return /*#__PURE__*/jsxs("div", {
|
1033
1040
|
ref: this.nodeRef,
|
1034
1041
|
className: classNames(classes, modules_9d0de074.buttonMode),
|
1035
|
-
"data-test": joinDataTestAttributes('ring-select', dataTest)
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
scope: this.shortcutsScope
|
1043
|
-
}), /*#__PURE__*/React.createElement("div", {
|
1044
|
-
className: modules_9d0de074.buttonContainer
|
1045
|
-
}, /*#__PURE__*/React.createElement(Button, _extends({}, ariaProps, {
|
1046
|
-
height: this.props.height,
|
1047
|
-
id: this.props.id,
|
1048
|
-
onClick: this._clickHandler,
|
1049
|
-
className: classNames(this.props.buttonClassName, modules_9d0de074.buttonValue, {
|
1050
|
-
[modules_9d0de074.buttonValueOpen]: this.state.showPopup,
|
1051
|
-
[modules_9d0de074.buttonValueEmpty]: this._selectionIsEmpty()
|
1052
|
-
}),
|
1053
|
-
disabled: this.props.disabled,
|
1054
|
-
style: style,
|
1055
|
-
"data-test": "ring-select__button ring-select__focus"
|
1056
|
-
}), this._getAvatar(), this._getPlaceholder()), iconsNode), this._renderPopup());
|
1057
|
-
case Type.INLINE:
|
1058
|
-
return /*#__PURE__*/React.createElement("div", {
|
1059
|
-
className: classes,
|
1060
|
-
ref: this.nodeRef,
|
1061
|
-
"data-test": joinDataTestAttributes('ring-select', dataTest)
|
1062
|
-
}, shortcutsEnabled && /*#__PURE__*/React.createElement(Shortcuts, {
|
1063
|
-
map: this.getShortcutsMap(),
|
1064
|
-
scope: this.shortcutsScope
|
1065
|
-
}), /*#__PURE__*/React.createElement(Anchor, _extends({}, ariaProps, {
|
1066
|
-
className: (_this$props$buttonCla = this.props.buttonClassName) !== null && _this$props$buttonCla !== void 0 ? _this$props$buttonCla : undefined,
|
1067
|
-
id: this.props.id,
|
1068
|
-
onClick: this._clickHandler,
|
1069
|
-
"data-test": "ring-select__focus",
|
1070
|
-
disabled: this.props.disabled,
|
1071
|
-
active: this.state.showPopup
|
1072
|
-
}), this._getPlaceholder()), this._renderPopup());
|
1073
|
-
default:
|
1074
|
-
if (this.props.customAnchor) {
|
1075
|
-
return /*#__PURE__*/React.createElement(Fragment, null, shortcutsEnabled && /*#__PURE__*/React.createElement(Shortcuts, {
|
1042
|
+
"data-test": joinDataTestAttributes('ring-select', dataTest),
|
1043
|
+
children: [selectedLabel && /*#__PURE__*/jsx(ControlLabel, {
|
1044
|
+
type: this.props.labelType,
|
1045
|
+
disabled: this.props.disabled,
|
1046
|
+
htmlFor: this.props.id,
|
1047
|
+
children: selectedLabel
|
1048
|
+
}), shortcutsEnabled && /*#__PURE__*/jsx(Shortcuts, {
|
1076
1049
|
map: this.getShortcutsMap(),
|
1077
1050
|
scope: this.shortcutsScope
|
1078
|
-
}),
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
},
|
1083
|
-
buttonProps: _objectSpread2(_objectSpread2({}, ariaProps), {}, {
|
1051
|
+
}), /*#__PURE__*/jsxs("div", {
|
1052
|
+
className: modules_9d0de074.buttonContainer,
|
1053
|
+
children: [/*#__PURE__*/jsxs(Button, _objectSpread2(_objectSpread2({}, ariaProps), {}, {
|
1054
|
+
height: this.props.height,
|
1084
1055
|
id: this.props.id,
|
1085
1056
|
onClick: this._clickHandler,
|
1057
|
+
className: classNames(this.props.buttonClassName, modules_9d0de074.buttonValue, {
|
1058
|
+
[modules_9d0de074.buttonValueOpen]: this.state.showPopup,
|
1059
|
+
[modules_9d0de074.buttonValueEmpty]: this._selectionIsEmpty()
|
1060
|
+
}),
|
1086
1061
|
disabled: this.props.disabled,
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
}))
|
1062
|
+
style: style,
|
1063
|
+
"data-test": "ring-select__button ring-select__focus",
|
1064
|
+
children: [this._getAvatar(), this._getPlaceholder()]
|
1065
|
+
})), iconsNode]
|
1066
|
+
}), this._renderPopup()]
|
1067
|
+
});
|
1068
|
+
case Type.INLINE:
|
1069
|
+
return /*#__PURE__*/jsxs("div", {
|
1070
|
+
className: classes,
|
1071
|
+
ref: this.nodeRef,
|
1072
|
+
"data-test": joinDataTestAttributes('ring-select', dataTest),
|
1073
|
+
children: [shortcutsEnabled && /*#__PURE__*/jsx(Shortcuts, {
|
1074
|
+
map: this.getShortcutsMap(),
|
1075
|
+
scope: this.shortcutsScope
|
1076
|
+
}), /*#__PURE__*/jsx(Anchor, _objectSpread2(_objectSpread2({}, ariaProps), {}, {
|
1077
|
+
className: (_this$props$buttonCla = this.props.buttonClassName) !== null && _this$props$buttonCla !== void 0 ? _this$props$buttonCla : undefined,
|
1078
|
+
id: this.props.id,
|
1079
|
+
onClick: this._clickHandler,
|
1080
|
+
"data-test": "ring-select__focus",
|
1081
|
+
disabled: this.props.disabled,
|
1082
|
+
active: this.state.showPopup,
|
1083
|
+
children: this._getPlaceholder()
|
1084
|
+
})), this._renderPopup()]
|
1085
|
+
});
|
1086
|
+
default:
|
1087
|
+
if (this.props.customAnchor) {
|
1088
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
1089
|
+
children: [shortcutsEnabled && /*#__PURE__*/jsx(Shortcuts, {
|
1090
|
+
map: this.getShortcutsMap(),
|
1091
|
+
scope: this.shortcutsScope
|
1092
|
+
}), this.props.customAnchor({
|
1093
|
+
wrapperProps: {
|
1094
|
+
ref: this.nodeRef,
|
1095
|
+
'data-test': joinDataTestAttributes('ring-select', dataTest)
|
1096
|
+
},
|
1097
|
+
buttonProps: _objectSpread2(_objectSpread2({}, ariaProps), {}, {
|
1098
|
+
id: this.props.id,
|
1099
|
+
onClick: this._clickHandler,
|
1100
|
+
disabled: this.props.disabled,
|
1101
|
+
children: this._getPlaceholder(),
|
1102
|
+
'data-test': 'ring-select__focus'
|
1103
|
+
}),
|
1104
|
+
popup: this._renderPopup()
|
1105
|
+
})]
|
1106
|
+
});
|
1092
1107
|
}
|
1093
|
-
return /*#__PURE__*/
|
1108
|
+
return /*#__PURE__*/jsx("span", {
|
1094
1109
|
id: this.props.id,
|
1095
1110
|
ref: this.nodeRef,
|
1096
|
-
"data-test": "ring-select"
|
1097
|
-
|
1111
|
+
"data-test": "ring-select",
|
1112
|
+
children: this._renderPopup()
|
1113
|
+
});
|
1098
1114
|
}
|
1099
1115
|
}
|
1100
1116
|
}, {
|
1101
1117
|
key: "render",
|
1102
1118
|
value: function render() {
|
1103
1119
|
var _this4 = this;
|
1104
|
-
return /*#__PURE__*/
|
1105
|
-
|
1106
|
-
|
1120
|
+
return /*#__PURE__*/jsx(ActiveItemContext.Provider, {
|
1121
|
+
children: /*#__PURE__*/jsx(ActiveItemContext.ValueContext.Consumer, {
|
1122
|
+
children: function children(activeItemId) {
|
1123
|
+
return _this4.renderSelect(activeItemId);
|
1124
|
+
}
|
1125
|
+
})
|
1126
|
+
});
|
1107
1127
|
}
|
1108
1128
|
}], [{
|
1109
1129
|
key: "getDerivedStateFromProps",
|
@@ -1232,7 +1252,8 @@ _defineProperty(Select, "defaultProps", {
|
|
1232
1252
|
onReset: noop,
|
1233
1253
|
tags: null,
|
1234
1254
|
ringPopupTarget: null,
|
1235
|
-
dir: 'ltr'
|
1255
|
+
dir: 'ltr',
|
1256
|
+
offset: 4
|
1236
1257
|
});
|
1237
1258
|
_defineProperty(Select, "contextType", ControlsHeightContext);
|
1238
1259
|
_defineProperty(Select, "Type", Type);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { Component, RefCallback } from 'react';
|
2
2
|
import { InputAttrs } from '../input/input';
|
3
3
|
declare function noop(): void;
|
4
4
|
type SelectFilterProps = InputAttrs & {
|
@@ -14,6 +14,6 @@ export default class SelectFilter extends Component<SelectFilterProps> {
|
|
14
14
|
blur(): void;
|
15
15
|
input?: HTMLInputElement | HTMLTextAreaElement | null;
|
16
16
|
inputRef: (el: HTMLInputElement | HTMLTextAreaElement | null) => void;
|
17
|
-
render():
|
17
|
+
render(): import("react").JSX.Element;
|
18
18
|
}
|
19
19
|
export {};
|
@@ -10,6 +10,7 @@ import '../global/sniffer.js';
|
|
10
10
|
import '../list/list.js';
|
11
11
|
import '../i18n/i18n-context.js';
|
12
12
|
export { S as default } from '../_helpers/select__filter.js';
|
13
|
+
import 'react/jsx-runtime';
|
13
14
|
import 'core-js/modules/es.object.values.js';
|
14
15
|
import '@jetbrains/icons/close-12px';
|
15
16
|
import '../global/prop-types.js';
|
@@ -35,6 +36,7 @@ import 'core-js/modules/es.regexp.to-string.js';
|
|
35
36
|
import '../global/composeRefs.js';
|
36
37
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
37
38
|
import '../control-label/control-label.js';
|
39
|
+
import '../control-help/control-help.js';
|
38
40
|
import 'sniffr';
|
39
41
|
import 'core-js/modules/es.symbol.js';
|
40
42
|
import 'core-js/modules/es.symbol.description.js';
|
@@ -1,7 +1,8 @@
|
|
1
1
|
/**
|
2
2
|
* @description Displays a popup with select's options.
|
3
3
|
*/
|
4
|
-
import
|
4
|
+
import { ComponentType, CSSProperties, PureComponent, ReactNode, Ref, SyntheticEvent } from 'react';
|
5
|
+
import * as React from 'react';
|
5
6
|
import PropTypes from 'prop-types';
|
6
7
|
import { IconType } from '../icon/icon';
|
7
8
|
import Popup from '../popup/popup';
|
@@ -74,6 +75,7 @@ export interface SelectPopupProps<T = unknown> {
|
|
74
75
|
renderOptimization?: boolean | undefined;
|
75
76
|
style?: CSSProperties | undefined;
|
76
77
|
top?: number | undefined;
|
78
|
+
offset?: number | undefined;
|
77
79
|
multiple: boolean | Multiple;
|
78
80
|
selected: ListDataItem<T> | readonly ListDataItem<T>[] | null;
|
79
81
|
tags: Tags | boolean | null;
|
@@ -130,21 +132,21 @@ export default class SelectPopup<T = unknown> extends PureComponent<SelectPopupP
|
|
130
132
|
render: PropTypes.Requireable<(...args: any[]) => any>;
|
131
133
|
}>, never> & Pick<import("../tag/tag").TagProps, never>, never> & {
|
132
134
|
className?: string | null | undefined;
|
133
|
-
children?:
|
135
|
+
children?: ReactNode;
|
134
136
|
onClick?: ((event: React.MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
135
137
|
icon?: string | undefined;
|
136
138
|
disabled?: boolean | undefined;
|
137
139
|
avatar?: string | null | undefined;
|
138
140
|
readOnly?: boolean | undefined;
|
139
141
|
focused?: boolean | undefined;
|
140
|
-
render?: ((props: import("../tag/tag").TagRenderProps) =>
|
142
|
+
render?: ((props: import("../tag/tag").TagRenderProps) => ReactNode) | undefined;
|
141
143
|
onRemove?: ((event: React.MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
142
144
|
rgTagIcon?: string | IconType | null | undefined;
|
143
145
|
rgTagTitle?: string | undefined;
|
144
146
|
angled?: boolean | null | undefined;
|
145
147
|
textColor?: string | undefined;
|
146
148
|
backgroundColor?: string | undefined;
|
147
|
-
} & {}) =>
|
149
|
+
} & {}) => ReactNode) | undefined;
|
148
150
|
getTags(): false | React.JSX.Element;
|
149
151
|
getFilterWithTags(): React.JSX.Element | null;
|
150
152
|
getBottomLine(): "" | React.JSX.Element | null;
|