@jetbrains/ring-ui-built 6.0.7-beta.0 → 6.0.7
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/README.md +1 -1
- package/components/_helpers/_rollupPluginBabelHelpers.js +23 -26
- package/components/_helpers/anchor.js +1 -1
- package/components/_helpers/badge.js +1 -1
- package/components/_helpers/button__classes.js +1 -1
- package/components/_helpers/caption.js +2 -2
- package/components/_helpers/card.js +2 -2
- package/components/_helpers/date-picker.js +1 -1
- package/components/_helpers/dialog__body-scroll-preventer.js +1 -1
- package/components/_helpers/grid.js +1 -1
- package/components/_helpers/header.js +1 -1
- package/components/_helpers/icon__svg.js +2 -2
- package/components/_helpers/input.js +2 -2
- package/components/_helpers/island.js +1 -1
- package/components/_helpers/list.js +1 -1
- package/components/_helpers/query-assist__suggestions.js +2 -2
- package/components/_helpers/select__filter.js +2 -2
- package/components/_helpers/services-link.js +2 -2
- package/components/_helpers/sidebar.js +2 -2
- package/components/_helpers/tab-link.js +2 -2
- package/components/_helpers/table.js +1 -1
- package/components/_helpers/theme.js +1 -1
- package/components/_helpers/title.js +2 -2
- package/components/alert/alert.js +2 -2
- package/components/alert/container.js +2 -2
- package/components/alert-service/alert-service.js +1 -1
- package/components/analytics/analytics.js +1 -1
- package/components/analytics/analytics__custom-plugin.js +1 -1
- package/components/auth/auth.js +1 -1
- package/components/auth/auth__core.js +1 -1
- package/components/auth/background-flow.js +1 -1
- package/components/auth/down-notification.js +2 -2
- package/components/auth/iframe-flow.js +1 -1
- package/components/auth/request-builder.js +1 -1
- package/components/auth/response-parser.js +1 -1
- package/components/auth/storage.js +1 -1
- package/components/auth/token-validator.js +1 -1
- package/components/auth/window-flow.js +1 -1
- package/components/auth-dialog/auth-dialog.js +2 -2
- package/components/auth-dialog-service/auth-dialog-service.js +1 -1
- package/components/avatar/avatar.js +1 -1
- package/components/avatar/fallback-avatar.js +1 -1
- package/components/badge/badge.js +1 -1
- package/components/button/button.js +1 -1
- package/components/button-group/button-group.js +1 -1
- package/components/button-set/button-set.js +2 -2
- package/components/button-toolbar/button-toolbar.js +2 -2
- package/components/caret/caret.js +1 -1
- package/components/checkbox/checkbox.js +4 -4
- package/components/clipboard/clipboard.js +1 -1
- package/components/code/code.js +2 -2
- package/components/collapse/collapse-content.d.ts +11 -0
- package/components/collapse/collapse-content.js +121 -0
- package/components/collapse/collapse-context.d.ts +10 -0
- package/components/collapse/collapse-context.js +12 -0
- package/components/collapse/collapse-control.d.ts +11 -0
- package/components/collapse/collapse-control.js +38 -0
- package/components/collapse/collapse.d.ts +12 -0
- package/components/collapse/collapse.js +41 -0
- package/components/collapse/consts.d.ts +4 -0
- package/components/collapse/consts.js +6 -0
- package/components/collapse/utils.d.ts +1 -0
- package/components/collapse/utils.js +5 -0
- package/components/confirm/confirm.js +2 -2
- package/components/confirm-service/confirm-service.js +1 -1
- package/components/content-layout/content-layout.js +1 -1
- package/components/contenteditable/contenteditable.js +1 -1
- package/components/control-label/control-label.js +1 -1
- package/components/data-list/data-list.js +3 -3
- package/components/data-list/item.js +3 -3
- package/components/data-list/selection.js +1 -1
- package/components/data-list/title.js +2 -2
- package/components/date-picker/consts.js +1 -1
- package/components/date-picker/date-input.js +1 -1
- package/components/date-picker/date-picker.js +8 -8
- package/components/date-picker/date-popup.js +5 -5
- package/components/date-picker/day.js +10 -10
- package/components/date-picker/month-names.js +7 -7
- package/components/date-picker/month-slider.js +4 -4
- package/components/date-picker/month.js +6 -6
- package/components/date-picker/months.js +7 -7
- package/components/date-picker/weekdays.js +4 -4
- package/components/date-picker/years.js +12 -12
- package/components/dialog/dialog.js +1 -1
- package/components/dropdown/dropdown.js +1 -1
- package/components/dropdown-menu/dropdown-menu.js +3 -3
- package/components/editable-heading/editable-heading.js +2 -2
- package/components/error-bubble/error-bubble.js +2 -2
- package/components/error-message/error-message.js +1 -1
- package/components/footer/footer.js +1 -1
- package/components/global/create-stateful-context.js +1 -1
- package/components/global/data-tests.js +1 -1
- package/components/global/dom.js +1 -1
- package/components/global/focus-sensor-hoc.js +1 -1
- package/components/global/inject-styles.js +1 -1
- package/components/global/listeners.js +1 -1
- package/components/global/react-dom-renderer.js +1 -1
- package/components/global/rerender-hoc.js +1 -1
- package/components/grid/col.js +1 -1
- package/components/grid/grid.js +1 -1
- package/components/grid/row.js +1 -1
- package/components/group/group.js +2 -2
- package/components/header/header.js +3 -3
- package/components/header/logo.js +1 -1
- package/components/header/profile.js +3 -3
- package/components/header/services.js +1 -1
- package/components/header/smart-profile.js +3 -3
- package/components/header/smart-services.js +1 -1
- package/components/header/tray-icon.js +1 -1
- package/components/header/tray.js +1 -1
- package/components/heading/heading.js +1 -1
- 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.js +1 -1
- package/components/icon/icon.js +1 -1
- package/components/island/adaptive-island-hoc.js +1 -1
- package/components/island/content.js +1 -1
- package/components/island/header.js +1 -1
- package/components/island/island.js +1 -1
- package/components/island-legacy/content-legacy.js +1 -1
- package/components/island-legacy/header-legacy.js +1 -1
- package/components/island-legacy/island-legacy.js +1 -1
- package/components/link/clickableLink.js +1 -1
- package/components/link/link.d.ts +2 -2
- package/components/link/link.js +2 -2
- package/components/list/list.js +3 -3
- package/components/list/list__custom.js +1 -1
- package/components/list/list__hint.js +1 -1
- package/components/list/list__item.js +4 -4
- package/components/list/list__link.js +1 -1
- package/components/list/list__separator.js +1 -1
- package/components/list/list__title.js +1 -1
- package/components/list/list__users-groups-source.js +3 -3
- package/components/loader/loader.js +1 -1
- package/components/loader/loader__core.js +2 -2
- package/components/loader-inline/loader-inline.js +2 -2
- package/components/loader-screen/loader-screen.js +1 -1
- package/components/login-dialog/login-dialog.js +2 -2
- package/components/login-dialog/service.js +1 -1
- package/components/markdown/markdown.js +2 -2
- package/components/message/message.js +2 -2
- package/components/old-browsers-message/white-list.js +3 -3
- package/components/pager/pager.js +4 -4
- package/components/panel/panel.js +2 -2
- package/components/permissions/permissions.js +1 -1
- package/components/permissions/permissions__cache.js +1 -1
- package/components/popup/popup.js +1 -1
- package/components/popup/popup.target.js +1 -1
- package/components/popup/position.js +1 -1
- package/components/popup-menu/popup-menu.js +3 -3
- package/components/progress-bar/progress-bar.js +2 -2
- package/components/query-assist/query-assist.js +3 -3
- package/components/query-assist/query-assist__suggestions.js +2 -2
- package/components/radio/radio.js +1 -1
- package/components/radio/radio__item.js +2 -2
- package/components/select/select.js +4 -4
- package/components/select/select__filter.js +2 -2
- package/components/select/select__popup.js +7 -7
- package/components/shortcuts/core.js +1 -1
- package/components/shortcuts/shortcuts-hoc.js +1 -1
- package/components/shortcuts/shortcuts.js +1 -1
- package/components/storage/storage__fallback.js +1 -1
- package/components/storage/storage__local.js +1 -1
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +1 -1
- package/components/table/cell.js +1 -1
- package/components/table/disable-hover-hoc.js +1 -1
- package/components/table/header-cell.js +1 -1
- package/components/table/header.js +3 -3
- package/components/table/multitable.js +1 -1
- package/components/table/row-with-focus-sensor.js +3 -3
- package/components/table/row.js +3 -3
- package/components/table/selection-shortcuts-hoc.js +1 -1
- package/components/table/selection.js +1 -1
- package/components/table/smart-table.js +3 -3
- package/components/table/table.js +3 -3
- package/components/tabs/collapsible-more.js +3 -3
- package/components/tabs/collapsible-tab.js +1 -1
- package/components/tabs/collapsible-tabs.js +3 -3
- package/components/tabs/dumb-tabs.js +3 -3
- package/components/tabs/smart-tabs.js +3 -3
- package/components/tabs/tab.js +1 -1
- package/components/tabs/tabs.js +2 -2
- package/components/tag/tag.js +2 -2
- package/components/tags-input/tags-input.js +5 -5
- package/components/tags-list/tags-list.js +1 -1
- package/components/text/text.js +1 -1
- package/components/toggle/toggle.js +2 -2
- package/components/tooltip/tooltip.js +2 -2
- package/components/user-agreement/service.js +1 -1
- package/components/user-agreement/user-agreement.js +2 -2
- package/components/user-card/smart-user-card-tooltip.js +46 -46
- package/components/user-card/tooltip.js +1 -1
- package/package.json +6 -6
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { f as _createClass, c as _classCallCheck, _ as _defineProperty, e as _asyncToGenerator, j as _regeneratorRuntime } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import 'core-js/modules/es.object.to-string.js';
|
4
4
|
import 'core-js/modules/es.promise.js';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck,
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, d as _assertThisInitialized, e as _asyncToGenerator, f as _createClass, j as _regeneratorRuntime } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import 'core-js/modules/es.regexp.exec.js';
|
4
4
|
import 'core-js/modules/es.string.replace.js';
|
@@ -62,7 +62,7 @@ import '../global/controls-height.js';
|
|
62
62
|
import '../_helpers/button__classes.js';
|
63
63
|
import '../_helpers/heading.js';
|
64
64
|
|
65
|
-
var modules_ae521deb = {"
|
65
|
+
var modules_ae521deb = {"light":"light_rui_2ac4","dialog":"dialog_rui_159b","content":"content_rui_159b font_rui_8bff","button":"button_rui_159b","firstButton":"firstButton_rui_159b button_rui_159b","title":"title_rui_159b","logo":"logo_rui_159b","error":"error_rui_159b"};
|
66
66
|
|
67
67
|
var AuthDialog = /*#__PURE__*/function (_Component) {
|
68
68
|
_inherits(AuthDialog, _Component);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { h as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import React from 'react';
|
3
3
|
import { createRoot } from 'react-dom/client';
|
4
4
|
import { ControlsHeightContext, getGlobalControlsHeight } from '../global/controls-height.js';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck,
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, d as _assertThisInitialized, f as _createClass, g as _objectWithoutProperties, h as _objectSpread2, i as _extends, k as _slicedToArray } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import React, { PureComponent } from 'react';
|
4
4
|
import PropTypes from 'prop-types';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { k as _slicedToArray, l as _toConsumableArray } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.map.js';
|
3
3
|
import 'core-js/modules/es.array.filter.js';
|
4
4
|
import 'core-js/modules/es.object.to-string.js';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck,
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, f as _createClass, g as _objectWithoutProperties, i as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import React, { PureComponent } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import classNames from 'classnames';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck,
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, d as _assertThisInitialized, f as _createClass, g as _objectWithoutProperties, h as _objectSpread2, i as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import React, { createRef, PureComponent } from 'react';
|
4
4
|
import PropTypes from 'prop-types';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck,
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, f as _createClass, g as _objectWithoutProperties, i as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.regexp.exec.js';
|
3
3
|
import 'core-js/modules/es.string.split.js';
|
4
4
|
import React, { PureComponent } from 'react';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck,
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, f as _createClass, g as _objectWithoutProperties, i as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import React, { PureComponent } from 'react';
|
3
3
|
import classNames from 'classnames';
|
4
4
|
import PropTypes from 'prop-types';
|
@@ -8,7 +8,7 @@ import 'core-js/modules/es.object.to-string.js';
|
|
8
8
|
import 'core-js/modules/es.object.entries.js';
|
9
9
|
import 'core-js/modules/es.array.concat.js';
|
10
10
|
|
11
|
-
var modules_fd849143 = {"
|
11
|
+
var modules_fd849143 = {"button":"button_rui_0b90","light":"light_rui_2ac4","buttonSet":"buttonSet_rui_b2a9"};
|
12
12
|
|
13
13
|
var _excluded = ["className", "data-test", "children"];
|
14
14
|
/**
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck,
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, f as _createClass, g as _objectWithoutProperties, i as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import React, { PureComponent } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import classNames from 'classnames';
|
@@ -8,7 +8,7 @@ import 'core-js/modules/es.object.to-string.js';
|
|
8
8
|
import 'core-js/modules/es.object.entries.js';
|
9
9
|
import 'core-js/modules/es.array.concat.js';
|
10
10
|
|
11
|
-
var modules_34154ec0 = {"
|
11
|
+
var modules_34154ec0 = {"button":"button_rui_0b90","light":"light_rui_2ac4","buttonToolbar":"buttonToolbar_rui_f4fc","buttonGroup":"buttonGroup_rui_f4fc","split":"split_rui_f4fc"};
|
12
12
|
|
13
13
|
var _excluded = ["className", "data-test"];
|
14
14
|
/**
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty,
|
1
|
+
import { _ as _defineProperty, f as _createClass, c as _classCallCheck } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.object.to-string.js';
|
3
3
|
import 'core-js/modules/es.regexp.to-string.js';
|
4
4
|
import 'core-js/modules/es.regexp.exec.js';
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck,
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, d as _assertThisInitialized, f as _createClass, g as _objectWithoutProperties, i as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import React, { PureComponent } from 'react';
|
4
4
|
import PropTypes from 'prop-types';
|
5
5
|
import classNames from 'classnames';
|
6
|
-
import checkmarkIcon from '@jetbrains/icons/checkmark-
|
7
|
-
import minusIcon from '@jetbrains/icons/remove-
|
6
|
+
import checkmarkIcon from '@jetbrains/icons/checkmark-12px';
|
7
|
+
import minusIcon from '@jetbrains/icons/remove-12px';
|
8
8
|
import Icon from '../icon/icon.js';
|
9
9
|
import { refObject } from '../global/prop-types.js';
|
10
10
|
import composeRefs from '../global/composeRefs.js';
|
@@ -22,7 +22,7 @@ import 'core-js/modules/web.dom-collections.iterator.js';
|
|
22
22
|
import 'core-js/modules/es.weak-map.js';
|
23
23
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
24
24
|
|
25
|
-
var modules_3199090e = {"
|
25
|
+
var modules_3199090e = {"checkboxSize":"14px","light":"light_rui_2ac4","checkbox":"checkbox_rui_d990","cell":"cell_rui_d990","icon":"icon_rui_d990","check":"check_rui_d990 icon_rui_d990","minus":"minus_rui_d990 icon_rui_d990","input":"input_rui_d990","focus":"focus_rui_d990","label":"label_rui_d990"};
|
26
26
|
|
27
27
|
var _excluded = ["children", "label", "className", "containerClassName", "containerStyle", "cellClassName", "labelClassName", "indeterminate", "inputRef"];
|
28
28
|
/**
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { e as _asyncToGenerator, j as _regeneratorRuntime } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.object.to-string.js';
|
3
3
|
import 'core-js/modules/es.promise.js';
|
4
4
|
import alertService from '../alert-service/alert-service.js';
|
package/components/code/code.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck,
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, d as _assertThisInitialized, f as _createClass, e as _asyncToGenerator, j as _regeneratorRuntime } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.object.to-string.js';
|
3
3
|
import 'core-js/modules/es.promise.js';
|
4
4
|
import 'core-js/modules/es.array.concat.js';
|
@@ -23,7 +23,7 @@ import 'core-js/modules/es.map.js';
|
|
23
23
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
24
24
|
import 'core-js/modules/es.weak-map.js';
|
25
25
|
|
26
|
-
var modules_66c414ea = {"
|
26
|
+
var modules_66c414ea = {"light":"light_rui_2ac4","code":"code_rui_7185","inline":"inline_rui_7185","softWrap":"softWrap_rui_7185"};
|
27
27
|
|
28
28
|
var modules_39cf09e8 = {"highlightContainer":"highlightContainer_rui_6e02"};
|
29
29
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
2
|
+
type Props = {
|
3
|
+
minHeight?: number;
|
4
|
+
className?: string;
|
5
|
+
'data-test'?: string | null | undefined;
|
6
|
+
};
|
7
|
+
/**
|
8
|
+
* @name CollapseContent
|
9
|
+
*/
|
10
|
+
export declare const CollapseContent: React.FC<PropsWithChildren<Props>>;
|
11
|
+
export default CollapseContent;
|
@@ -0,0 +1,121 @@
|
|
1
|
+
import { k as _slicedToArray } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import React, { useContext, useRef, useState, useEffect, useMemo } from 'react';
|
3
|
+
import classNames from 'classnames';
|
4
|
+
import joinDataTestAttributes from '../global/data-tests.js';
|
5
|
+
import { getRect } from '../global/dom.js';
|
6
|
+
import { toPx } from './utils.js';
|
7
|
+
import { CollapseContext } from './collapse-context.js';
|
8
|
+
import { COLLAPSE_CONTENT_CONTAINER_TEST_ID, COLLAPSE_CONTENT_TEST_ID } from './consts.js';
|
9
|
+
import 'core-js/modules/es.array.reduce.js';
|
10
|
+
import 'core-js/modules/es.object.to-string.js';
|
11
|
+
import 'core-js/modules/es.object.entries.js';
|
12
|
+
import 'core-js/modules/es.array.concat.js';
|
13
|
+
import 'core-js/modules/es.object.assign.js';
|
14
|
+
import 'core-js/modules/web.dom-collections.for-each.js';
|
15
|
+
import 'core-js/modules/es.array.filter.js';
|
16
|
+
import 'core-js/modules/es.regexp.exec.js';
|
17
|
+
import 'core-js/modules/es.string.split.js';
|
18
|
+
import 'core-js/modules/es.array.iterator.js';
|
19
|
+
import 'core-js/modules/es.set.js';
|
20
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
21
|
+
|
22
|
+
var modules_9c8b5b00 = {"container":"container_rui_88de","transition":"transition_rui_88de","summary":"summary_rui_88de","trigger":"trigger_rui_88de","fade":"fade_rui_88de"};
|
23
|
+
|
24
|
+
var DURATION_FACTOR = 0.5;
|
25
|
+
var DEFAULT_HEIGHT = 0;
|
26
|
+
var VISIBLE = 1;
|
27
|
+
var HIDDEN = 0;
|
28
|
+
/**
|
29
|
+
* @name CollapseContent
|
30
|
+
*/
|
31
|
+
var CollapseContent = function CollapseContent(_ref) {
|
32
|
+
var children = _ref.children,
|
33
|
+
_ref$minHeight = _ref.minHeight,
|
34
|
+
minHeight = _ref$minHeight === void 0 ? DEFAULT_HEIGHT : _ref$minHeight,
|
35
|
+
dataTest = _ref['data-test'];
|
36
|
+
var _useContext = useContext(CollapseContext),
|
37
|
+
collapsed = _useContext.collapsed,
|
38
|
+
duration = _useContext.duration,
|
39
|
+
id = _useContext.id,
|
40
|
+
disableAnimation = _useContext.disableAnimation;
|
41
|
+
var containerRef = useRef(null);
|
42
|
+
var contentRef = useRef(null);
|
43
|
+
var initialContentHeight = useRef(minHeight);
|
44
|
+
var contentHeight = useRef(DEFAULT_HEIGHT);
|
45
|
+
var _useState = useState({
|
46
|
+
width: 0,
|
47
|
+
height: 0
|
48
|
+
}),
|
49
|
+
_useState2 = _slicedToArray(_useState, 2),
|
50
|
+
dimensions = _useState2[0],
|
51
|
+
setDimensions = _useState2[1];
|
52
|
+
var _useState3 = useState(toPx(minHeight)),
|
53
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
54
|
+
height = _useState4[0],
|
55
|
+
setHeight = _useState4[1];
|
56
|
+
var _useState5 = useState(true),
|
57
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
58
|
+
showFade = _useState6[0],
|
59
|
+
setShowFade = _useState6[1];
|
60
|
+
useEffect(function () {
|
61
|
+
if (!collapsed) {
|
62
|
+
setShowFade(false);
|
63
|
+
} else {
|
64
|
+
setShowFade(true);
|
65
|
+
}
|
66
|
+
}, [collapsed]);
|
67
|
+
useEffect(function () {
|
68
|
+
if (contentRef.current) {
|
69
|
+
contentHeight.current = getRect(contentRef.current).height;
|
70
|
+
}
|
71
|
+
}, [minHeight, dimensions.height]);
|
72
|
+
useEffect(function () {
|
73
|
+
var nextHeight = collapsed ? initialContentHeight.current : contentHeight.current;
|
74
|
+
setHeight(toPx(nextHeight));
|
75
|
+
}, [collapsed, dimensions.height]);
|
76
|
+
useEffect(function () {
|
77
|
+
if (contentRef.current) {
|
78
|
+
var observer = new ResizeObserver(function (_ref2) {
|
79
|
+
var _ref3 = _slicedToArray(_ref2, 1),
|
80
|
+
entry = _ref3[0];
|
81
|
+
if (entry && entry.borderBoxSize) {
|
82
|
+
var _entry$borderBoxSize$ = entry.borderBoxSize[0],
|
83
|
+
inlineSize = _entry$borderBoxSize$.inlineSize,
|
84
|
+
blockSize = _entry$borderBoxSize$.blockSize;
|
85
|
+
setDimensions({
|
86
|
+
width: inlineSize,
|
87
|
+
height: blockSize
|
88
|
+
});
|
89
|
+
}
|
90
|
+
});
|
91
|
+
observer.observe(contentRef.current);
|
92
|
+
}
|
93
|
+
}, []);
|
94
|
+
var style = useMemo(function () {
|
95
|
+
var calculatedDuration = duration + contentHeight.current * DURATION_FACTOR;
|
96
|
+
return {
|
97
|
+
'--duration': "".concat(calculatedDuration, "ms"),
|
98
|
+
height,
|
99
|
+
opacity: collapsed && !minHeight ? HIDDEN : VISIBLE
|
100
|
+
};
|
101
|
+
}, [duration, height, collapsed, minHeight]);
|
102
|
+
var fadeShouldBeVisible = useMemo(function () {
|
103
|
+
return Boolean(minHeight && showFade);
|
104
|
+
}, [minHeight, showFade]);
|
105
|
+
return /*#__PURE__*/React.createElement("div", {
|
106
|
+
ref: containerRef,
|
107
|
+
id: "collapse-content-".concat(id),
|
108
|
+
"data-test": joinDataTestAttributes(COLLAPSE_CONTENT_CONTAINER_TEST_ID),
|
109
|
+
className: classNames(modules_9c8b5b00.container, {
|
110
|
+
[modules_9c8b5b00.transition]: !disableAnimation
|
111
|
+
}),
|
112
|
+
style: style
|
113
|
+
}, /*#__PURE__*/React.createElement("div", {
|
114
|
+
ref: contentRef,
|
115
|
+
"data-test": joinDataTestAttributes(COLLAPSE_CONTENT_TEST_ID, dataTest)
|
116
|
+
}, children), fadeShouldBeVisible && /*#__PURE__*/React.createElement("div", {
|
117
|
+
className: modules_9c8b5b00.fade
|
118
|
+
}));
|
119
|
+
};
|
120
|
+
|
121
|
+
export { CollapseContent, CollapseContent as default };
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
interface CollapseContextInterface {
|
3
|
+
collapsed: boolean;
|
4
|
+
duration: number;
|
5
|
+
disableAnimation: boolean;
|
6
|
+
setCollapsed: () => void;
|
7
|
+
id: string;
|
8
|
+
}
|
9
|
+
export declare const CollapseContext: import("react").Context<CollapseContextInterface>;
|
10
|
+
export default CollapseContext;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { createContext } from 'react';
|
2
|
+
import { BASE_ANIMATION_DURATION } from './consts.js';
|
3
|
+
|
4
|
+
var CollapseContext = /*#__PURE__*/createContext({
|
5
|
+
collapsed: true,
|
6
|
+
duration: BASE_ANIMATION_DURATION,
|
7
|
+
disableAnimation: false,
|
8
|
+
setCollapsed: function setCollapsed() {},
|
9
|
+
id: ''
|
10
|
+
});
|
11
|
+
|
12
|
+
export { CollapseContext, CollapseContext as default };
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
type ChildrenFunction = (collapsed: boolean) => React.ReactNode;
|
3
|
+
type Props = {
|
4
|
+
children: ChildrenFunction | React.ReactNode;
|
5
|
+
'data-test'?: string | null | undefined;
|
6
|
+
};
|
7
|
+
/**
|
8
|
+
* @name CollapseControl
|
9
|
+
*/
|
10
|
+
export declare const CollapseControl: React.FC<Props>;
|
11
|
+
export default CollapseControl;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import React, { useContext, useMemo, cloneElement } from 'react';
|
2
|
+
import joinDataTestAttributes from '../global/data-tests.js';
|
3
|
+
import { CollapseContext } from './collapse-context.js';
|
4
|
+
import { COLLAPSE_CONTROL_TEST_ID } from './consts.js';
|
5
|
+
import '../_helpers/_rollupPluginBabelHelpers.js';
|
6
|
+
import 'core-js/modules/es.array.reduce.js';
|
7
|
+
import 'core-js/modules/es.object.to-string.js';
|
8
|
+
import 'core-js/modules/es.object.entries.js';
|
9
|
+
import 'core-js/modules/es.array.concat.js';
|
10
|
+
|
11
|
+
/**
|
12
|
+
* @name CollapseControl
|
13
|
+
*/
|
14
|
+
var CollapseControl = function CollapseControl(_ref) {
|
15
|
+
var children = _ref.children,
|
16
|
+
dataTest = _ref['data-test'];
|
17
|
+
var _useContext = useContext(CollapseContext),
|
18
|
+
setCollapsed = _useContext.setCollapsed,
|
19
|
+
collapsed = _useContext.collapsed,
|
20
|
+
id = _useContext.id;
|
21
|
+
var child = useMemo(function () {
|
22
|
+
if (typeof children === 'function') {
|
23
|
+
return /*#__PURE__*/React.createElement("p", {
|
24
|
+
"data-test": joinDataTestAttributes(COLLAPSE_CONTROL_TEST_ID, dataTest)
|
25
|
+
}, children(collapsed));
|
26
|
+
}
|
27
|
+
return /*#__PURE__*/React.createElement("p", {
|
28
|
+
"data-test": joinDataTestAttributes(COLLAPSE_CONTROL_TEST_ID, dataTest)
|
29
|
+
}, children);
|
30
|
+
}, [children, collapsed, dataTest]);
|
31
|
+
return /*#__PURE__*/cloneElement(child, {
|
32
|
+
onClick: setCollapsed,
|
33
|
+
'aria-controls': "collapse-content-".concat(id),
|
34
|
+
'aria-expanded': String(!collapsed)
|
35
|
+
});
|
36
|
+
};
|
37
|
+
|
38
|
+
export { CollapseControl, CollapseControl as default };
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
2
|
+
type Props = {
|
3
|
+
onChange?: (collapsed: boolean) => void;
|
4
|
+
duration?: number;
|
5
|
+
disableAnimation?: boolean;
|
6
|
+
className?: string;
|
7
|
+
};
|
8
|
+
/**
|
9
|
+
* @name Collapse
|
10
|
+
*/
|
11
|
+
export declare const Collapse: React.FC<PropsWithChildren<Props>>;
|
12
|
+
export default Collapse;
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { k as _slicedToArray } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import React, { useState, useId, useCallback } from 'react';
|
3
|
+
import { CollapseContext } from './collapse-context.js';
|
4
|
+
import { BASE_ANIMATION_DURATION } from './consts.js';
|
5
|
+
|
6
|
+
/**
|
7
|
+
* @name Collapse
|
8
|
+
*/
|
9
|
+
var Collapse = function Collapse(_ref) {
|
10
|
+
var children = _ref.children,
|
11
|
+
_ref$duration = _ref.duration,
|
12
|
+
duration = _ref$duration === void 0 ? BASE_ANIMATION_DURATION : _ref$duration,
|
13
|
+
_ref$disableAnimation = _ref.disableAnimation,
|
14
|
+
disableAnimation = _ref$disableAnimation === void 0 ? false : _ref$disableAnimation,
|
15
|
+
_ref$className = _ref.className,
|
16
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
17
|
+
_ref$onChange = _ref.onChange,
|
18
|
+
onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange;
|
19
|
+
var _useState = useState(true),
|
20
|
+
_useState2 = _slicedToArray(_useState, 2),
|
21
|
+
collapsed = _useState2[0],
|
22
|
+
toggle = _useState2[1];
|
23
|
+
var id = useId();
|
24
|
+
var setCollapsed = useCallback(function () {
|
25
|
+
toggle(!collapsed);
|
26
|
+
onChange(!collapsed);
|
27
|
+
}, [toggle, onChange, collapsed]);
|
28
|
+
return /*#__PURE__*/React.createElement("div", {
|
29
|
+
className: className
|
30
|
+
}, /*#__PURE__*/React.createElement(CollapseContext.Provider, {
|
31
|
+
value: {
|
32
|
+
collapsed,
|
33
|
+
setCollapsed,
|
34
|
+
duration,
|
35
|
+
disableAnimation,
|
36
|
+
id
|
37
|
+
}
|
38
|
+
}, children));
|
39
|
+
};
|
40
|
+
|
41
|
+
export { Collapse, Collapse as default };
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export declare const COLLAPSE_CONTROL_TEST_ID = "ring-collapse-control";
|
2
|
+
export declare const COLLAPSE_CONTENT_CONTAINER_TEST_ID = "ring-collapse-content-container";
|
3
|
+
export declare const COLLAPSE_CONTENT_TEST_ID = "ring-collapse-content";
|
4
|
+
export declare const BASE_ANIMATION_DURATION = 200;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
var COLLAPSE_CONTROL_TEST_ID = 'ring-collapse-control';
|
2
|
+
var COLLAPSE_CONTENT_CONTAINER_TEST_ID = 'ring-collapse-content-container';
|
3
|
+
var COLLAPSE_CONTENT_TEST_ID = 'ring-collapse-content';
|
4
|
+
var BASE_ANIMATION_DURATION = 200;
|
5
|
+
|
6
|
+
export { BASE_ANIMATION_DURATION, COLLAPSE_CONTENT_CONTAINER_TEST_ID, COLLAPSE_CONTENT_TEST_ID, COLLAPSE_CONTROL_TEST_ID };
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const toPx: (value: number) => string;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck,
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, d as _assertThisInitialized, f as _createClass } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import 'core-js/modules/es.symbol.js';
|
4
4
|
import 'core-js/modules/es.symbol.description.js';
|
@@ -63,7 +63,7 @@ import '../link/clickableLink.js';
|
|
63
63
|
import '../global/controls-height.js';
|
64
64
|
import '../_helpers/button__classes.js';
|
65
65
|
|
66
|
-
var modules_4c9c3a3a = {"
|
66
|
+
var modules_4c9c3a3a = {"light":"light_rui_2ac4","description":"description_rui_2cda"};
|
67
67
|
|
68
68
|
/**
|
69
69
|
* @name Confirm
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { g as _objectWithoutProperties, h as _objectSpread2 } 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.object.to-string.js';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck,
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, d as _assertThisInitialized, f as _createClass, g as _objectWithoutProperties, i as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import 'core-js/modules/es.object.to-string.js';
|
4
4
|
import 'core-js/modules/es.promise.js';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty,
|
1
|
+
import { _ as _defineProperty, h as _objectSpread2, a as _inherits, b as _createSuper, c as _classCallCheck, f as _createClass, g as _objectWithoutProperties, i as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import React, { Component } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import { renderToStaticMarkup } from 'react-dom/server';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { g as _objectWithoutProperties, i as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import React from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import classNames from 'classnames';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck,
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, d as _assertThisInitialized, f as _createClass, h as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import 'core-js/modules/es.array.map.js';
|
4
4
|
import React, { Component, PureComponent } from 'react';
|
@@ -64,8 +64,8 @@ import 'core-js/modules/es.weak-map.js';
|
|
64
64
|
import '../global/controls-height.js';
|
65
65
|
import '../_helpers/button__classes.js';
|
66
66
|
import '../checkbox/checkbox.js';
|
67
|
-
import '@jetbrains/icons/checkmark-
|
68
|
-
import '@jetbrains/icons/remove-
|
67
|
+
import '@jetbrains/icons/checkmark-12px';
|
68
|
+
import '@jetbrains/icons/remove-12px';
|
69
69
|
import 'core-js/modules/es.array.find.js';
|
70
70
|
|
71
71
|
var DataList = /*#__PURE__*/function (_PureComponent) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck,
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, d as _assertThisInitialized, f as _createClass } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import 'core-js/modules/es.array.map.js';
|
4
4
|
import React, { PureComponent } from 'react';
|
@@ -41,8 +41,8 @@ import '../global/prop-types.js';
|
|
41
41
|
import '../global/composeRefs.js';
|
42
42
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
43
43
|
import '../checkbox/checkbox.js';
|
44
|
-
import '@jetbrains/icons/checkmark-
|
45
|
-
import '@jetbrains/icons/remove-
|
44
|
+
import '@jetbrains/icons/checkmark-12px';
|
45
|
+
import '@jetbrains/icons/remove-12px';
|
46
46
|
import '../global/get-uid.js';
|
47
47
|
import 'core-js/modules/es.regexp.to-string.js';
|
48
48
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { a as _inherits, b as _createSuper, c as _classCallCheck,
|
1
|
+
import { a as _inherits, b as _createSuper, c as _classCallCheck, f as _createClass, l as _toConsumableArray, n as _get, o as _getPrototypeOf } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.iterator.js';
|
3
3
|
import 'core-js/modules/es.object.to-string.js';
|
4
4
|
import 'core-js/modules/es.set.js';
|
@@ -11,8 +11,8 @@ export { T as default } from '../_helpers/title.js';
|
|
11
11
|
import '../global/composeRefs.js';
|
12
12
|
import 'core-js/modules/es.object.to-string.js';
|
13
13
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
14
|
-
import '@jetbrains/icons/checkmark-
|
15
|
-
import '@jetbrains/icons/remove-
|
14
|
+
import '@jetbrains/icons/checkmark-12px';
|
15
|
+
import '@jetbrains/icons/remove-12px';
|
16
16
|
import '../icon/icon.js';
|
17
17
|
import 'util-deprecate';
|
18
18
|
import '../icon/icon__constants.js';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { a as _inherits, b as _createSuper,
|
1
|
+
import { a as _inherits, b as _createSuper, f as _createClass, _ as _defineProperty, c as _classCallCheck, d as _assertThisInitialized } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import 'core-js/modules/es.regexp.exec.js';
|
4
4
|
import 'core-js/modules/es.string.replace.js';
|
@@ -1,17 +1,17 @@
|
|
1
|
-
import { _ as _defineProperty,
|
1
|
+
import { _ as _defineProperty, k as _slicedToArray, m as _createForOfIteratorHelper, a as _inherits, b as _createSuper, c as _classCallCheck, d as _assertThisInitialized, f as _createClass, g as _objectWithoutProperties, i as _extends, h as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import 'core-js/modules/es.object.values.js';
|
4
4
|
import 'core-js/modules/es.array.map.js';
|
5
5
|
import React, { PureComponent } from 'react';
|
6
6
|
import PropTypes from 'prop-types';
|
7
7
|
import classNames from 'classnames';
|
8
|
-
import format from 'date-fns/format';
|
9
|
-
import isSameDay from 'date-fns/isSameDay';
|
10
|
-
import isSameMonth from 'date-fns/isSameMonth';
|
11
|
-
import isSameYear from 'date-fns/isSameYear';
|
12
|
-
import isValid from 'date-fns/isValid';
|
13
|
-
import parse from 'date-fns/parse';
|
14
|
-
import set from 'date-fns/set';
|
8
|
+
import { format } from 'date-fns/format';
|
9
|
+
import { isSameDay } from 'date-fns/isSameDay';
|
10
|
+
import { isSameMonth } from 'date-fns/isSameMonth';
|
11
|
+
import { isSameYear } from 'date-fns/isSameYear';
|
12
|
+
import { isValid } from 'date-fns/isValid';
|
13
|
+
import { parse } from 'date-fns/parse';
|
14
|
+
import { set } from 'date-fns/set';
|
15
15
|
import calendarIcon from '@jetbrains/icons/calendar';
|
16
16
|
import chevronDownIcon from '@jetbrains/icons/chevron-down';
|
17
17
|
import memoize from '../global/memoize.js';
|
@@ -1,13 +1,13 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck,
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, d as _assertThisInitialized, h as _objectSpread2, f as _createClass, g as _objectWithoutProperties, i as _extends } 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
|
import 'core-js/modules/es.array.map.js';
|
5
5
|
import React, { Component } from 'react';
|
6
6
|
import PropTypes from 'prop-types';
|
7
|
-
import isAfter from 'date-fns/isAfter';
|
8
|
-
import isBefore from 'date-fns/isBefore';
|
9
|
-
import isSameDay from 'date-fns/isSameDay';
|
10
|
-
import startOfDay from 'date-fns/startOfDay';
|
7
|
+
import { isAfter } from 'date-fns/isAfter';
|
8
|
+
import { isBefore } from 'date-fns/isBefore';
|
9
|
+
import { isSameDay } from 'date-fns/isSameDay';
|
10
|
+
import { startOfDay } from 'date-fns/startOfDay';
|
11
11
|
import { set } from 'date-fns';
|
12
12
|
import memoize from '../global/memoize.js';
|
13
13
|
import DateInput from './date-input.js';
|