@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,6 +1,7 @@
|
|
1
|
-
import { c as _objectWithoutProperties,
|
2
|
-
import
|
1
|
+
import { c as _objectWithoutProperties, d as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import { createContext, forwardRef } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
4
5
|
|
5
6
|
var _excluded = ["id", "children"];
|
6
7
|
var PopupTargetContext = /*#__PURE__*/createContext(undefined);
|
@@ -8,13 +9,15 @@ var PopupTarget = /*#__PURE__*/forwardRef(function PopupTarget(_ref, ref) {
|
|
8
9
|
var id = _ref.id,
|
9
10
|
children = _ref.children,
|
10
11
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
11
|
-
var target = /*#__PURE__*/
|
12
|
+
var target = /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
|
12
13
|
"data-portaltarget": id,
|
13
|
-
ref: ref
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
ref: ref,
|
15
|
+
children: typeof children !== 'function' && children
|
16
|
+
}));
|
17
|
+
return /*#__PURE__*/jsx(PopupTargetContext.Provider, {
|
18
|
+
value: id,
|
19
|
+
children: typeof children === 'function' ? children(target) : target
|
20
|
+
});
|
18
21
|
});
|
19
22
|
PopupTarget.propTypes = {
|
20
23
|
id: PropTypes.string.isRequired,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { SyntheticEvent } from 'react';
|
2
2
|
import Popup, { BasePopupProps } from '../popup/popup';
|
3
3
|
import List, { ListProps as ListPropsType } from '../list/list';
|
4
4
|
import { ListDataItem } from '../list/consts';
|
@@ -61,7 +61,7 @@ export default class PopupMenu<T = unknown> extends Popup<PopupMenuProps<T>> {
|
|
61
61
|
list?: List<T> | null;
|
62
62
|
listRef: (el: List<T> | null) => void;
|
63
63
|
/** @override */
|
64
|
-
getInternalContent():
|
64
|
+
getInternalContent(): import("react").JSX.Element;
|
65
65
|
}
|
66
66
|
export type PopupMenuAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof PopupMenu, PopupMenuProps<T>>;
|
67
67
|
export declare const ListProps: {
|
@@ -1,15 +1,16 @@
|
|
1
|
-
import { c as _objectWithoutProperties, _ as _defineProperty, d as _objectSpread2, a as _inherits, b as _createClass, e as
|
1
|
+
import { c as _objectWithoutProperties, _ as _defineProperty, d as _objectSpread2, a as _inherits, b as _createClass, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
|
-
import React from 'react';
|
4
3
|
import PropTypes from 'prop-types';
|
5
4
|
import Popup from '../popup/popup.js';
|
6
5
|
import List from '../list/list.js';
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
7
7
|
import 'core-js/modules/es.object.entries.js';
|
8
8
|
import 'core-js/modules/es.object.to-string.js';
|
9
9
|
import 'core-js/modules/es.regexp.exec.js';
|
10
10
|
import 'core-js/modules/es.regexp.to-string.js';
|
11
11
|
import 'core-js/modules/es.string.replace.js';
|
12
12
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
13
|
+
import 'react';
|
13
14
|
import 'react-dom';
|
14
15
|
import 'classnames';
|
15
16
|
import '../global/get-uid.js';
|
@@ -73,6 +74,7 @@ import '../_helpers/icon__svg.js';
|
|
73
74
|
import 'core-js/modules/es.string.starts-with.js';
|
74
75
|
import '../global/prop-types.js';
|
75
76
|
import '../global/composeRefs.js';
|
77
|
+
import '../control-help/control-help.js';
|
76
78
|
import '../list/list__custom.js';
|
77
79
|
import '../global/get-event-key.js';
|
78
80
|
import '../list/list__title.js';
|
@@ -115,13 +117,15 @@ var PopupMenu = /*#__PURE__*/function (_Popup) {
|
|
115
117
|
var _this$props = this.props;
|
116
118
|
_this$props.className;
|
117
119
|
var props = _objectWithoutProperties(_this$props, _excluded);
|
118
|
-
return /*#__PURE__*/
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
120
|
+
return /*#__PURE__*/jsx("div", {
|
121
|
+
children: /*#__PURE__*/jsx(List, _objectSpread2(_objectSpread2({
|
122
|
+
ref: this.listRef
|
123
|
+
}, props), {}, {
|
124
|
+
maxHeight: this.popup && parseFloat(this.popup.style.maxHeight),
|
125
|
+
shortcuts: this.shouldUseShortcuts(),
|
126
|
+
onSelect: this.onSelect
|
127
|
+
}))
|
128
|
+
});
|
125
129
|
}
|
126
130
|
}]);
|
127
131
|
}(Popup);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { HTMLAttributes, PureComponent } from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
export interface ProgressBarProps extends HTMLAttributes<HTMLElement> {
|
4
4
|
max: number;
|
@@ -59,6 +59,6 @@ export default class ProgressBar extends PureComponent<ProgressBarProps> {
|
|
59
59
|
progressbarWrapperRef: (el: HTMLElement | null) => void;
|
60
60
|
progressbar?: (HTMLElement | null);
|
61
61
|
progressbarRef: (el: HTMLElement | null) => void;
|
62
|
-
render():
|
62
|
+
render(): import("react").JSX.Element;
|
63
63
|
}
|
64
64
|
export type ProgressBarAttrs = JSX.LibraryManagedAttributes<typeof ProgressBar, ProgressBarProps>;
|
@@ -1,15 +1,13 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties,
|
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
2
|
import 'core-js/modules/es.array.concat.js';
|
3
|
-
import
|
3
|
+
import { PureComponent } from 'react';
|
4
4
|
import PropTypes from 'prop-types';
|
5
5
|
import classNames from 'classnames';
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
6
7
|
|
7
8
|
var modules_fb7af416 = {"dark":"dark_rui_f090","light":"light_rui_2ac4","progressBar":"progressBar_rui_7662","globalMode":"globalMode_rui_7662","line":"line_rui_7662","progress-bar":"progress-bar_rui_7662","staticLineColor":"staticLineColor_rui_7662"};
|
8
9
|
|
9
10
|
var _excluded = ["className", "global", "max", "value", "label", "staticColor"];
|
10
|
-
/**
|
11
|
-
* @name Progress Bar
|
12
|
-
*/
|
13
11
|
var ProgressBar = /*#__PURE__*/function (_PureComponent) {
|
14
12
|
function ProgressBar() {
|
15
13
|
var _this;
|
@@ -45,20 +43,21 @@ var ProgressBar = /*#__PURE__*/function (_PureComponent) {
|
|
45
43
|
[modules_fb7af416.globalMode]: global,
|
46
44
|
[modules_fb7af416.staticLineColor]: staticColor
|
47
45
|
});
|
48
|
-
return /*#__PURE__*/
|
46
|
+
return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, otherProps), {}, {
|
49
47
|
className: classes,
|
50
|
-
ref: this.progressbarWrapperRef
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
48
|
+
ref: this.progressbarWrapperRef,
|
49
|
+
children: /*#__PURE__*/jsx("div", {
|
50
|
+
className: modules_fb7af416.line,
|
51
|
+
ref: this.progressbarRef,
|
52
|
+
role: "progressbar",
|
53
|
+
"aria-label": label,
|
54
|
+
"aria-valuenow": value,
|
55
|
+
"aria-valuemin": 0,
|
56
|
+
"aria-valuemax": max,
|
57
|
+
style: {
|
58
|
+
width
|
59
|
+
}
|
60
|
+
})
|
62
61
|
}));
|
63
62
|
}
|
64
63
|
}], [{
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import
|
1
|
+
import { Component, ComponentRef, ReactNode, SyntheticEvent } from 'react';
|
2
|
+
import * as React from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
import Caret, { Position } from '../caret/caret';
|
4
5
|
import PopupMenu from '../popup-menu/popup-menu';
|
@@ -298,7 +299,7 @@ export default class QueryAssist extends Component<QueryAssistProps> {
|
|
298
299
|
shortcutsScope: string;
|
299
300
|
shortcutsMap: ShortcutsMap;
|
300
301
|
listShortcutsMap: ShortcutsMap;
|
301
|
-
renderActions():
|
302
|
+
renderActions(): ReactNode[];
|
302
303
|
render(): React.JSX.Element;
|
303
304
|
}
|
304
305
|
export type QueryAssistAttrs = JSX.LibraryManagedAttributes<typeof QueryAssist, QueryAssistProps>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createClass,
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, j as _toConsumableArray, e as _classCallCheck, f as _callSuper, l as _get, m as _getPrototypeOf, c as _objectWithoutProperties } 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';
|
@@ -13,7 +13,7 @@ import 'core-js/modules/es.promise.js';
|
|
13
13
|
import 'core-js/modules/es.regexp.exec.js';
|
14
14
|
import 'core-js/modules/es.string.replace.js';
|
15
15
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
16
|
-
import
|
16
|
+
import { Component } from 'react';
|
17
17
|
import PropTypes from 'prop-types';
|
18
18
|
import debounce from 'just-debounce-it';
|
19
19
|
import classNames from 'classnames';
|
@@ -35,6 +35,7 @@ import { ControlsHeightContext, ControlsHeight } from '../global/controls-height
|
|
35
35
|
import { S as Size, m as modules_88cfaf40 } from '../_helpers/input.js';
|
36
36
|
import { I18nContext } from '../i18n/i18n-context.js';
|
37
37
|
import { Q as QueryAssistSuggestions, m as modules_da7ab055 } from '../_helpers/query-assist__suggestions.js';
|
38
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
38
39
|
import 'core-js/modules/es.regexp.to-string.js';
|
39
40
|
import 'core-js/modules/es.array.reduce.js';
|
40
41
|
import 'core-js/modules/es.object.entries.js';
|
@@ -82,6 +83,7 @@ import '@jetbrains/icons/checkmark-12px';
|
|
82
83
|
import '@jetbrains/icons/remove-12px';
|
83
84
|
import '../global/prop-types.js';
|
84
85
|
import '../global/composeRefs.js';
|
86
|
+
import '../control-help/control-help.js';
|
85
87
|
import '../list/list__custom.js';
|
86
88
|
import '../global/get-event-key.js';
|
87
89
|
import '../list/list__title.js';
|
@@ -800,12 +802,11 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
800
802
|
var className = classNames(modules_da7ab055.letter, classes[index] || LETTER_DEFAULT_CLASS);
|
801
803
|
var dataTest = letters.length - 1 === index ? 'ring-query-assist-last-letter' : null;
|
802
804
|
// \u00a0 ===
|
803
|
-
return /*#__PURE__*/
|
804
|
-
// eslint-disable-next-line react/no-array-index-key
|
805
|
-
key: index + letter,
|
805
|
+
return /*#__PURE__*/jsx("span", {
|
806
806
|
className: className,
|
807
|
-
"data-test": dataTest
|
808
|
-
|
807
|
+
"data-test": dataTest,
|
808
|
+
children: letter === ' ' ? '\u00a0' : letter
|
809
|
+
}, index + letter);
|
809
810
|
});
|
810
811
|
}
|
811
812
|
}, {
|
@@ -832,20 +833,20 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
832
833
|
var actions = _toConsumableArray(this.props.actions || []);
|
833
834
|
var renderClear = this.props.clear && !!this.state.query;
|
834
835
|
if (renderClear) {
|
835
|
-
actions.push( /*#__PURE__*/
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
}
|
848
|
-
}));
|
836
|
+
actions.push( /*#__PURE__*/jsx(I18nContext.Consumer, {
|
837
|
+
children: function children(_ref4) {
|
838
|
+
var _this7$props$translat, _this7$props$translat2;
|
839
|
+
var translate = _ref4.translate;
|
840
|
+
return /*#__PURE__*/jsx(Button, {
|
841
|
+
icon: closeIcon,
|
842
|
+
className: modules_da7ab055.clear,
|
843
|
+
title: (_this7$props$translat = (_this7$props$translat2 = _this7.props.translations) === null || _this7$props$translat2 === void 0 ? void 0 : _this7$props$translat2.clearTitle) !== null && _this7$props$translat !== void 0 ? _this7$props$translat : translate('clearTitle'),
|
844
|
+
ref: _this7.clearRef,
|
845
|
+
onClick: _this7.clearQuery,
|
846
|
+
"data-test": "query-assist-clear-icon"
|
847
|
+
});
|
848
|
+
}
|
849
|
+
}, 'clearAction'));
|
849
850
|
}
|
850
851
|
return actions;
|
851
852
|
}
|
@@ -883,96 +884,108 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
883
884
|
[modules_da7ab055.hugePlaceholder]: huge,
|
884
885
|
[modules_da7ab055.withoutGlass]: !glass || !renderLoader && huge
|
885
886
|
});
|
886
|
-
return /*#__PURE__*/
|
887
|
-
value: ControlsHeight.M
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
887
|
+
return /*#__PURE__*/jsx(ControlsHeightContext.Provider, {
|
888
|
+
value: ControlsHeight.M,
|
889
|
+
children: /*#__PURE__*/jsx(I18nContext.Consumer, {
|
890
|
+
children: function children(_ref5) {
|
891
|
+
var _translations$searchT, _translations$searchT2, _translations$searchT3;
|
892
|
+
var translate = _ref5.translate;
|
893
|
+
return /*#__PURE__*/jsxs("div", {
|
894
|
+
"data-test": joinDataTestAttributes('ring-query-assist', dataTest),
|
895
|
+
className: containerClasses,
|
896
|
+
role: "presentation",
|
897
|
+
ref: _this8.nodeRef,
|
898
|
+
children: [_this8.state.shortcuts && /*#__PURE__*/jsx(Shortcuts, {
|
899
|
+
map: _this8.shortcutsMap,
|
900
|
+
scope: _this8.shortcutsScope
|
901
|
+
}), renderGlass && !huge && /*#__PURE__*/jsx(Icon, {
|
902
|
+
glyph: searchIcon,
|
903
|
+
className: modules_da7ab055.icon,
|
904
|
+
title: (_translations$searchT = translations === null || translations === void 0 ? void 0 : translations.searchTitle) !== null && _translations$searchT !== void 0 ? _translations$searchT : translate('searchTitle'),
|
905
|
+
ref: _this8.glassRef,
|
906
|
+
"data-test": "query-assist-search-icon"
|
907
|
+
}), renderLoader && /*#__PURE__*/jsx("div", {
|
908
|
+
className: classNames(modules_da7ab055.icon, modules_da7ab055.loader, {
|
909
|
+
[modules_da7ab055.loaderOnTheRight]: !glass && !huge,
|
910
|
+
[modules_da7ab055.loaderActive]: renderLoader
|
911
|
+
}),
|
912
|
+
ref: _this8.loaderRef,
|
913
|
+
children: /*#__PURE__*/jsx(LoaderInline, {})
|
914
|
+
}), /*#__PURE__*/jsx(ContentEditable, {
|
915
|
+
"aria-label": (_translations$searchT2 = translations === null || translations === void 0 ? void 0 : translations.searchTitle) !== null && _translations$searchT2 !== void 0 ? _translations$searchT2 : translate('searchTitle'),
|
916
|
+
className: inputClasses,
|
917
|
+
"data-test": "ring-query-assist-input",
|
918
|
+
inputRef: _this8.inputRef,
|
919
|
+
disabled: _this8.props.disabled,
|
920
|
+
onComponentUpdate: function onComponentUpdate() {
|
921
|
+
return _this8.setCaretPosition({
|
922
|
+
fromContentEditable: true
|
923
|
+
});
|
924
|
+
},
|
925
|
+
onBlur: _this8.handleFocusChange,
|
926
|
+
onClick: _this8.handleCaretMove,
|
927
|
+
onCompositionStart: _this8.trackCompositionState,
|
928
|
+
onCompositionEnd: _this8.trackCompositionState,
|
929
|
+
onFocus: _this8.handleFocusChange,
|
930
|
+
onInput: _this8.handleInput // To support IE use the same method
|
931
|
+
,
|
932
|
+
onKeyUp: _this8.handleInput // to handle input and key up
|
933
|
+
,
|
934
|
+
onKeyDown: _this8.handleEnter,
|
935
|
+
onPaste: _this8.handlePaste,
|
936
|
+
spellCheck: "false",
|
937
|
+
children: _this8.state.query && /*#__PURE__*/jsx("span", {
|
938
|
+
children: _this8.renderQuery()
|
939
|
+
})
|
940
|
+
}), renderPlaceholder && /*#__PURE__*/jsx("button", {
|
941
|
+
type: "button",
|
942
|
+
className: placeholderStyles,
|
943
|
+
ref: _this8.placeholderRef,
|
944
|
+
onClick: _this8.handleCaretMove,
|
945
|
+
"data-test": "query-assist-placeholder",
|
946
|
+
disabled: _this8.props.disabled,
|
947
|
+
children: _this8.props.placeholder
|
948
|
+
}), actions.length ? /*#__PURE__*/jsx("div", {
|
949
|
+
"data-test": "ring-query-assist-actions",
|
950
|
+
className: modules_da7ab055.actions,
|
951
|
+
children: actions
|
952
|
+
}) : null, /*#__PURE__*/jsx(PopupMenu, {
|
953
|
+
hidden: !_this8.state.showPopup,
|
954
|
+
onCloseAttempt: _this8.closePopup,
|
955
|
+
ref: _this8.popupRef,
|
956
|
+
anchorElement: _this8.node,
|
957
|
+
keepMounted: true,
|
958
|
+
attached: true,
|
959
|
+
className: _this8.props.popupClassName,
|
960
|
+
directions: [PopupMenu.PopupProps.Directions.BOTTOM_RIGHT],
|
961
|
+
data: useCustomItemRender ? _this8.state.suggestions : _this8.renderSuggestions(),
|
962
|
+
"data-test": "ring-query-assist-popup",
|
963
|
+
hint: _this8.props.hint,
|
964
|
+
shortcutsMap: _this8.listShortcutsMap,
|
965
|
+
hintOnSelection: _this8.props.hintOnSelection,
|
966
|
+
left: _this8.getPopupOffset(_this8.state.suggestions),
|
967
|
+
maxHeight: PopupMenu.PopupProps.MaxHeight.SCREEN,
|
968
|
+
onMouseDown: _this8.trackPopupMouseState,
|
969
|
+
onMouseUp: _this8.trackPopupMouseState,
|
970
|
+
onSelect: function onSelect(item) {
|
971
|
+
return _this8.handleComplete(item);
|
972
|
+
}
|
973
|
+
}), glass && huge && /*#__PURE__*/jsx("div", {
|
974
|
+
className: modules_da7ab055.rightSearchButton,
|
975
|
+
"data-test": "query-assist-search-button",
|
976
|
+
children: /*#__PURE__*/jsx(Icon, {
|
977
|
+
glyph: searchIcon,
|
978
|
+
className: modules_da7ab055.rightSearchIcon,
|
979
|
+
title: (_translations$searchT3 = translations === null || translations === void 0 ? void 0 : translations.searchTitle) !== null && _translations$searchT3 !== void 0 ? _translations$searchT3 : translate('searchTitle'),
|
980
|
+
onClick: _this8.handleApply,
|
981
|
+
ref: _this8.glassRef,
|
982
|
+
"data-test": "query-assist-search-icon"
|
983
|
+
})
|
984
|
+
})]
|
920
985
|
});
|
921
|
-
},
|
922
|
-
onBlur: _this8.handleFocusChange,
|
923
|
-
onClick: _this8.handleCaretMove,
|
924
|
-
onCompositionStart: _this8.trackCompositionState,
|
925
|
-
onCompositionEnd: _this8.trackCompositionState,
|
926
|
-
onFocus: _this8.handleFocusChange,
|
927
|
-
onInput: _this8.handleInput // To support IE use the same method
|
928
|
-
,
|
929
|
-
onKeyUp: _this8.handleInput // to handle input and key up
|
930
|
-
,
|
931
|
-
onKeyDown: _this8.handleEnter,
|
932
|
-
onPaste: _this8.handlePaste,
|
933
|
-
spellCheck: "false"
|
934
|
-
}, _this8.state.query && /*#__PURE__*/React.createElement("span", null, _this8.renderQuery())), renderPlaceholder && /*#__PURE__*/React.createElement("button", {
|
935
|
-
type: "button",
|
936
|
-
className: placeholderStyles,
|
937
|
-
ref: _this8.placeholderRef,
|
938
|
-
onClick: _this8.handleCaretMove,
|
939
|
-
"data-test": "query-assist-placeholder"
|
940
|
-
}, _this8.props.placeholder), actions.length ? /*#__PURE__*/React.createElement("div", {
|
941
|
-
"data-test": "ring-query-assist-actions",
|
942
|
-
className: modules_da7ab055.actions
|
943
|
-
}, actions) : null, /*#__PURE__*/React.createElement(PopupMenu, {
|
944
|
-
hidden: !_this8.state.showPopup,
|
945
|
-
onCloseAttempt: _this8.closePopup,
|
946
|
-
ref: _this8.popupRef,
|
947
|
-
anchorElement: _this8.node,
|
948
|
-
keepMounted: true,
|
949
|
-
attached: true,
|
950
|
-
className: _this8.props.popupClassName,
|
951
|
-
directions: [PopupMenu.PopupProps.Directions.BOTTOM_RIGHT],
|
952
|
-
data: useCustomItemRender ? _this8.state.suggestions : _this8.renderSuggestions(),
|
953
|
-
"data-test": "ring-query-assist-popup",
|
954
|
-
hint: _this8.props.hint,
|
955
|
-
shortcutsMap: _this8.listShortcutsMap,
|
956
|
-
hintOnSelection: _this8.props.hintOnSelection,
|
957
|
-
left: _this8.getPopupOffset(_this8.state.suggestions),
|
958
|
-
maxHeight: PopupMenu.PopupProps.MaxHeight.SCREEN,
|
959
|
-
onMouseDown: _this8.trackPopupMouseState,
|
960
|
-
onMouseUp: _this8.trackPopupMouseState,
|
961
|
-
onSelect: function onSelect(item) {
|
962
|
-
return _this8.handleComplete(item);
|
963
986
|
}
|
964
|
-
})
|
965
|
-
|
966
|
-
"data-test": "query-assist-search-button"
|
967
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
968
|
-
glyph: searchIcon,
|
969
|
-
className: modules_da7ab055.rightSearchIcon,
|
970
|
-
title: (_translations$searchT3 = translations === null || translations === void 0 ? void 0 : translations.searchTitle) !== null && _translations$searchT3 !== void 0 ? _translations$searchT3 : translate('searchTitle'),
|
971
|
-
onClick: _this8.handleApply,
|
972
|
-
ref: _this8.glassRef,
|
973
|
-
"data-test": "query-assist-search-icon"
|
974
|
-
})));
|
975
|
-
}));
|
987
|
+
})
|
988
|
+
});
|
976
989
|
}
|
977
990
|
}], [{
|
978
991
|
key: "getDerivedStateFromProps",
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import React from 'react';
|
2
1
|
import { ListDataItem } from '../list/consts';
|
3
2
|
export interface QueryAssistSuggestion {
|
4
3
|
description: string;
|
@@ -19,7 +18,7 @@ export interface SuggestionItem {
|
|
19
18
|
}
|
20
19
|
export default class QueryAssistSuggestions {
|
21
20
|
static createKey(suggestion: QueryAssistSuggestion): string;
|
22
|
-
static renderLabel(suggestion: QueryAssistSuggestion):
|
21
|
+
static renderLabel(suggestion: QueryAssistSuggestion): import("react").JSX.Element;
|
23
22
|
static renderGroupSeparator(suggestion: QueryAssistSuggestion, prevSuggestion: string): {
|
24
23
|
key: string;
|
25
24
|
description: string;
|
@@ -3,9 +3,9 @@ import 'core-js/modules/es.symbol.js';
|
|
3
3
|
import 'core-js/modules/es.symbol.description.js';
|
4
4
|
import 'core-js/modules/es.object.to-string.js';
|
5
5
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
6
|
-
import 'react';
|
7
6
|
import '../list/list.js';
|
8
7
|
export { Q as default } from '../_helpers/query-assist__suggestions.js';
|
8
|
+
import 'react/jsx-runtime';
|
9
9
|
import 'core-js/modules/es.array.concat.js';
|
10
10
|
import 'core-js/modules/es.array.find.js';
|
11
11
|
import 'core-js/modules/es.array.find-index.js';
|
@@ -13,6 +13,7 @@ import 'core-js/modules/es.array.includes.js';
|
|
13
13
|
import 'core-js/modules/es.array.map.js';
|
14
14
|
import 'core-js/modules/es.object.assign.js';
|
15
15
|
import 'core-js/modules/es.string.includes.js';
|
16
|
+
import 'react';
|
16
17
|
import 'prop-types';
|
17
18
|
import 'classnames';
|
18
19
|
import 'react-virtualized/dist/es/List';
|
@@ -67,6 +68,7 @@ import '../_helpers/icon__svg.js';
|
|
67
68
|
import 'core-js/modules/es.string.starts-with.js';
|
68
69
|
import '../global/prop-types.js';
|
69
70
|
import '../global/composeRefs.js';
|
71
|
+
import '../control-help/control-help.js';
|
70
72
|
import '../list/list__custom.js';
|
71
73
|
import '../global/get-event-key.js';
|
72
74
|
import '../list/list__title.js';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { Component } from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import { RadioProps } from './radio__item';
|
4
4
|
/**
|
@@ -12,7 +12,7 @@ export default class Radio extends Component<RadioProps> {
|
|
12
12
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
13
13
|
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
14
14
|
};
|
15
|
-
static Item:
|
15
|
+
static Item: import("react").ForwardRefExoticComponent<import("./radio__item").RadioItemProps & import("react").RefAttributes<import("./radio__item").RadioItemInner>>;
|
16
16
|
uid: string;
|
17
|
-
render():
|
17
|
+
render(): import("react").JSX.Element;
|
18
18
|
}
|
@@ -1,16 +1,15 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createClass, d as _objectSpread2,
|
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
|
-
import
|
3
|
+
import { Component } from 'react';
|
4
4
|
import PropTypes from 'prop-types';
|
5
5
|
import getUID from '../global/get-uid.js';
|
6
6
|
import RadioItem, { RadioContext } from './radio__item.js';
|
7
|
+
import { jsx } from 'react/jsx-runtime';
|
7
8
|
import 'core-js/modules/es.object.to-string.js';
|
8
9
|
import 'core-js/modules/es.regexp.to-string.js';
|
9
10
|
import 'classnames';
|
11
|
+
import '../control-help/control-help.js';
|
10
12
|
|
11
|
-
/**
|
12
|
-
* @name Radio
|
13
|
-
*/
|
14
13
|
var Radio = /*#__PURE__*/function (_Component) {
|
15
14
|
function Radio() {
|
16
15
|
var _this;
|
@@ -26,11 +25,12 @@ var Radio = /*#__PURE__*/function (_Component) {
|
|
26
25
|
return _createClass(Radio, [{
|
27
26
|
key: "render",
|
28
27
|
value: function render() {
|
29
|
-
return /*#__PURE__*/
|
28
|
+
return /*#__PURE__*/jsx(RadioContext.Provider, {
|
30
29
|
value: _objectSpread2({
|
31
30
|
name: this.uid
|
32
|
-
}, this.props)
|
33
|
-
|
31
|
+
}, this.props),
|
32
|
+
children: this.props.children
|
33
|
+
});
|
34
34
|
}
|
35
35
|
}]);
|
36
36
|
}(Component);
|
@@ -1,11 +1,14 @@
|
|
1
|
-
import
|
1
|
+
import { Component, InputHTMLAttributes, ReactNode } from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
export interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
4
4
|
value?: string | undefined;
|
5
5
|
onChange?: ((value: string) => void) | null | undefined;
|
6
6
|
}
|
7
|
-
export declare const RadioContext:
|
8
|
-
export
|
7
|
+
export declare const RadioContext: import("react").Context<RadioProps>;
|
8
|
+
export interface RadioItemInnerProps extends InputHTMLAttributes<HTMLInputElement> {
|
9
|
+
help?: ReactNode;
|
10
|
+
}
|
11
|
+
export declare class RadioItemInner extends Component<RadioItemInnerProps> {
|
9
12
|
static propTypes: {
|
10
13
|
className: PropTypes.Requireable<string>;
|
11
14
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
@@ -19,10 +22,10 @@ export declare class Radio extends Component<InputHTMLAttributes<HTMLInputElemen
|
|
19
22
|
inputRef: (el: HTMLElement | null) => void;
|
20
23
|
label?: HTMLElement | null;
|
21
24
|
labelRef: (el: HTMLElement | null) => void;
|
22
|
-
render():
|
25
|
+
render(): import("react").JSX.Element;
|
23
26
|
}
|
24
|
-
export interface RadioItemProps extends
|
27
|
+
export interface RadioItemProps extends RadioItemInnerProps {
|
25
28
|
value: string;
|
26
29
|
}
|
27
|
-
declare const RadioItem:
|
30
|
+
declare const RadioItem: import("react").ForwardRefExoticComponent<RadioItemProps & import("react").RefAttributes<RadioItemInner>>;
|
28
31
|
export default RadioItem;
|