@jetbrains/ring-ui-built 7.0.7 → 7.0.9
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 -0
- package/components/_helpers/anchor.js +1 -1
- package/components/_helpers/button__classes.js +1 -1
- package/components/_helpers/caption.js +1 -1
- package/components/_helpers/card.js +1 -1
- 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/heading.js +1 -1
- package/components/_helpers/icon__svg.js +1 -1
- package/components/_helpers/input.js +1 -1
- package/components/_helpers/island.js +1 -1
- package/components/_helpers/link.js +1 -1
- package/components/_helpers/list.js +1 -1
- package/components/_helpers/query-assist__suggestions.js +1 -1
- package/components/_helpers/select__filter.js +1 -1
- package/components/_helpers/services-link.js +1 -1
- package/components/_helpers/sidebar.js +1 -1
- package/components/_helpers/tab-link.js +1 -1
- package/components/_helpers/table.js +1 -1
- package/components/_helpers/theme.js +4 -4
- package/components/_helpers/title.js +1 -1
- package/components/alert/alert.js +1 -1
- package/components/alert/container.js +1 -1
- package/components/auth/auth__core.js +1 -1
- package/components/auth/down-notification.js +1 -1
- package/components/auth-dialog/auth-dialog.js +1 -1
- package/components/avatar/avatar.js +1 -1
- package/components/breadcrumbs/breadcrumbs.js +1 -1
- package/components/button-set/button-set.js +1 -1
- package/components/button-toolbar/button-toolbar.js +1 -1
- package/components/checkbox/checkbox.js +1 -1
- package/components/clipboard/clipboard.js +1 -1
- package/components/code/code.js +2 -2
- package/components/collapse/collapse-content.d.ts +1 -2
- package/components/collapse/collapse-content.js +19 -8
- package/components/collapse/collapse.d.ts +2 -0
- package/components/collapse/collapse.js +10 -7
- package/components/confirm/confirm.js +1 -1
- package/components/confirm-service/confirm-service.js +1 -1
- package/components/control-help/control-help.js +1 -1
- package/components/control-label/control-label.js +1 -1
- package/components/data-list/data-list.js +2 -2
- package/components/date-picker/month-names.js +1 -1
- package/components/date-picker/months.js +1 -1
- package/components/date-picker/years.js +1 -1
- package/components/editable-heading/editable-heading.js +1 -1
- package/components/error-bubble/error-bubble.js +1 -1
- 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/focus-sensor-hoc.js +1 -1
- package/components/group/group.js +1 -1
- package/components/header/services.js +1 -1
- package/components/heading/heading.js +1 -1
- package/components/i18n/i18n-context.js +1 -1
- package/components/input/input-legacy.js +1 -1
- package/components/island/adaptive-island-hoc.js +1 -1
- package/components/island/content.js +2 -2
- package/components/island/header.js +2 -2
- package/components/list/list.d.ts +0 -6
- package/components/list/list.js +3 -48
- package/components/list/list__item.js +2 -2
- package/components/loader/loader__core.js +1 -1
- package/components/loader-inline/loader-inline.js +1 -1
- package/components/loader-screen/loader-screen.js +1 -1
- package/components/login-dialog/login-dialog.js +1 -1
- package/components/markdown/markdown.js +1 -1
- package/components/message/message.js +1 -1
- package/components/old-browsers-message/white-list.js +2 -2
- package/components/pager/pager.js +1 -1
- package/components/panel/panel.js +1 -1
- package/components/popup/popup.d.ts +1 -0
- package/components/popup/popup.js +6 -4
- package/components/popup/position.js +2 -2
- package/components/popup-menu/popup-menu.d.ts +1 -0
- package/components/popup-menu/popup-menu.js +3 -5
- package/components/progress-bar/progress-bar.js +1 -1
- package/components/query-assist/query-assist.js +1 -4
- package/components/radio/radio__item.js +4 -4
- package/components/scrollable-section/scrollable-section.js +1 -1
- package/components/select/select.js +1 -4
- package/components/select/select__popup.js +1 -0
- package/components/slider/slider.js +2 -2
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +1 -1
- package/components/table/selection-shortcuts-hoc.js +1 -1
- package/components/table/table.js +6 -4
- package/components/tabs/collapsible-more.d.ts +1 -1
- package/components/tabs/collapsible-more.js +3 -3
- package/components/tabs/collapsible-tab.js +1 -2
- package/components/tabs/collapsible-tabs.d.ts +1 -1
- package/components/tabs/dumb-tabs.d.ts +2 -5
- package/components/tabs/dumb-tabs.js +14 -12
- package/components/tag/tag.js +1 -1
- package/components/tags-input/tags-input.js +1 -1
- package/components/text/text.js +1 -1
- package/components/toggle/toggle.js +1 -1
- package/components/tooltip/tooltip.js +1 -1
- package/components/user-agreement/service.js +1 -1
- package/components/user-agreement/user-agreement.js +1 -1
- package/components/user-card/tooltip.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
@@ -8,6 +8,7 @@ This collection of UI components aims to provide all the necessary building bloc
|
|
8
8
|
## Try now
|
9
9
|
* Try the [codesandbox](https://codesandbox.io/p/sandbox/ring-ui-7-0-demo-z6v6ym), based on `create-react-app` tooling, to see and try the UI components
|
10
10
|
* Check out [list of examples](https://jetbrains.github.io/ring-ui/master/index.html) for each component
|
11
|
+
* Check out [Ring UI Design Guidelines](http://www.jetbrains.com/help/ring-ui)
|
11
12
|
|
12
13
|
## Installation
|
13
14
|
|
@@ -4,7 +4,7 @@ import classNames from 'classnames';
|
|
4
4
|
import { Button } from '../button/button.js';
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
6
6
|
|
7
|
-
var styles = {"dropdown":"
|
7
|
+
var styles = {"dropdown":"dropdown_rui_13c4","anchor":"anchor_rui_13c4"};
|
8
8
|
|
9
9
|
const _excluded = ["children", "className"];
|
10
10
|
const Anchor = _ref => {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import classNames from 'classnames';
|
2
2
|
|
3
|
-
var styles = {"glyph":"
|
3
|
+
var styles = {"glyph":"glyph_rui_2d39","heightS":"heightS_rui_0b90","heightM":"heightM_rui_0b90","heightL":"heightL_rui_0b90","button":"button_rui_0b90","block":"block_rui_0b90","inline":"inline_rui_0b90","icon":"icon_rui_0b90","withNormalIcon":"withNormalIcon_rui_0b90","active":"active_rui_0b90","primaryBlock":"primaryBlock_rui_0b90","disabled":"disabled_rui_0b90","loader":"loader_rui_0b90","loaderBackground":"loaderBackground_rui_0b90","danger":"danger_rui_0b90","iconOnly":"iconOnly_rui_0b90","text-loading":"text-loading_rui_0b90","progress":"progress_rui_0b90","delayed":"delayed_rui_0b90","short":"short_rui_0b90","dropdownIcon":"dropdownIcon_rui_0b90","primary":"primary_rui_0b90"};
|
4
4
|
|
5
5
|
function getButtonClasses(_ref) {
|
6
6
|
let {
|
@@ -3,7 +3,7 @@ import { PureComponent } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
5
5
|
|
6
|
-
var styles = {"button":"
|
6
|
+
var styles = {"button":"button_rui_0b90","active":"active_rui_0b90","primary":"primary_rui_0b90","buttonGroup":"buttonGroup_rui_bbca common_rui_bbca buttonGroup_rui_f4fc","common":"common_rui_bbca","split":"split_rui_bbca common_rui_bbca buttonGroup_rui_f4fc","caption":"caption_rui_bbca font_rui_8bff","help":"help_rui_bbca"};
|
7
7
|
|
8
8
|
class Caption extends PureComponent {
|
9
9
|
render() {
|
@@ -13,7 +13,7 @@ import Tooltip from '../tooltip/tooltip.js';
|
|
13
13
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
14
14
|
import { Size as Size$1 } from '../icon/icon__constants.js';
|
15
15
|
|
16
|
-
var styles = {"userCardSpaced":"
|
16
|
+
var styles = {"userCardSpaced":"userCardSpaced_rui_6e59","userInformationContainer":"userInformationContainer_rui_6e59","userAvatar":"userAvatar_rui_6e59","userInformation":"userInformation_rui_6e59","userInformationGeneral":"userInformationGeneral_rui_6e59","userNameLine":"userNameLine_rui_6e59","userName":"userName_rui_6e59","userLogin":"userLogin_rui_6e59","userEmail":"userEmail_rui_6e59","userCopyIcon":"userCopyIcon_rui_6e59","userEmailWrapper":"userEmailWrapper_rui_6e59","unverifiedLabel":"unverifiedLabel_rui_6e59","userNameInfo":"userNameInfo_rui_6e59","banLabel":"banLabel_rui_6e59","userActiveStatus":"userActiveStatus_rui_6e59","online":"online_rui_6e59"};
|
17
17
|
|
18
18
|
const _excluded = ["children", "info", "className", "user", "avatarInfo"];
|
19
19
|
class UserCard extends PureComponent {
|
@@ -1,3 +1,3 @@
|
|
1
|
-
var styles = {"container":"
|
1
|
+
var styles = {"container":"container_rui_e0bd","hoverable":"hoverable_rui_e0bd","datePicker":"datePicker_rui_e0bd","inline":"inline_rui_e0bd","sizeS":"sizeS_rui_e0bd","sizeM":"sizeM_rui_e0bd","sizeL":"sizeL_rui_e0bd","sizeFULL":"sizeFULL_rui_e0bd","sizeAUTO":"sizeAUTO_rui_e0bd","displayDate":"displayDate_rui_e0bd","displayRange":"displayRange_rui_e0bd","clear":"clear_rui_e0bd","datePopup":"datePopup_rui_e0bd","filterWrapper":"filterWrapper_rui_e0bd filterWrapper_rui_531d","filter":"filter_rui_e0bd filter_rui_531d","calendarIcon":"calendarIcon_rui_e0bd","anchor":"anchor_rui_e0bd","anchorContent":"anchorContent_rui_e0bd","chevronDownIcon":"chevronDownIcon_rui_e0bd","fromInput":"fromInput_rui_e0bd","fromInputWithDivider":"fromInputWithDivider_rui_e0bd","toInput":"toInput_rui_e0bd","dateInput":"dateInput_rui_e0bd","timeInputWithDivider":"timeInputWithDivider_rui_e0bd","weekdays":"weekdays_rui_e0bd","weekday":"weekday_rui_e0bd","weekend":"weekend_rui_e0bd","calendar":"calendar_rui_e0bd","months":"months_rui_e0bd","days":"days_rui_e0bd","month":"month_rui_e0bd","monthTitle":"monthTitle_rui_e0bd","day":"day_rui_e0bd resetButton_rui_8bff","between":"between_rui_e0bd","activeBetween":"activeBetween_rui_e0bd","current":"current_rui_e0bd","active":"active_rui_e0bd","disabled":"disabled_rui_e0bd","from":"from_rui_e0bd","to":"to_rui_e0bd","Day1":"Day1_rui_e0bd","spread":"spread_rui_e0bd","activeSpread":"activeSpread_rui_e0bd","first":"first_rui_e0bd","Day2":"Day2_rui_e0bd","Day5":"Day5_rui_e0bd","Day6":"Day6_rui_e0bd","Day7":"Day7_rui_e0bd","empty":"empty_rui_e0bd","today":"today_rui_e0bd","year":"year_rui_e0bd hoverable_rui_e0bd resetButton_rui_8bff","monthNames":"monthNames_rui_e0bd","monthName":"monthName_rui_e0bd hoverable_rui_e0bd resetButton_rui_8bff","monthSlider":"monthSlider_rui_e0bd resetButton_rui_8bff","dragging":"dragging_rui_e0bd","range":"range_rui_e0bd","years":"years_rui_e0bd","currentYear":"currentYear_rui_e0bd"};
|
2
2
|
|
3
3
|
export { styles as s };
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
2
2
|
import scrollbarWidth from 'scrollbar-width';
|
3
3
|
|
4
|
-
var styles = {"header":"
|
4
|
+
var styles = {"header":"header_rui_1d72","scrollableWrapper":"scrollableWrapper_rui_1d72","container":"container_rui_381e","nativeDialog":"nativeDialog_rui_381e","innerContainer":"innerContainer_rui_381e","content":"content_rui_381e","panel":"panel_rui_381e","clickableOverlay":"clickableOverlay_rui_381e","closeIconOutside":"closeIconOutside_rui_381e","closeIconInside":"closeIconInside_rui_381e","closeButton":"closeButton_rui_381e","closeIcon":"closeIcon_rui_381e","closeButtonOutside":"closeButtonOutside_rui_381e","closeButtonInside":"closeButtonInside_rui_381e","documentWithoutScroll":"documentWithoutScroll_rui_381e","popupTarget":"popupTarget_rui_381e","dense":"dense_rui_381e"};
|
5
5
|
|
6
6
|
const isPrevented = new Set();
|
7
7
|
let previousDocumentWidth = null;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
var styles = {"breakpoint-small":"640px","breakpoint-middle":"960px","breakpoint-large":"1200px","large-screen-media":"(min-width: 1200px)","middle-screen-media":"(min-width: 960px) and (max-width: 1199px)","small-screen-media":"(min-width: 640px) and (max-width: 959px)","container-fluid":"container-
|
1
|
+
var styles = {"breakpoint-small":"640px","breakpoint-middle":"960px","breakpoint-large":"1200px","large-screen-media":"(min-width: 1200px)","middle-screen-media":"(min-width: 960px) and (max-width: 1199px)","small-screen-media":"(min-width: 640px) and (max-width: 959px)","container-fluid":"container-fluid_rui_a74c","container":"container_rui_a74c","row":"row_rui_a74c","reverse":"reverse_rui_a74c","col":"col_rui_a74c","col-xs":"col-xs_rui_a74c","col-xs-1":"col-xs-1_rui_a74c","col-xs-2":"col-xs-2_rui_a74c","col-xs-3":"col-xs-3_rui_a74c","col-xs-4":"col-xs-4_rui_a74c","col-xs-5":"col-xs-5_rui_a74c","col-xs-6":"col-xs-6_rui_a74c","col-xs-7":"col-xs-7_rui_a74c","col-xs-8":"col-xs-8_rui_a74c","col-xs-9":"col-xs-9_rui_a74c","col-xs-10":"col-xs-10_rui_a74c","col-xs-11":"col-xs-11_rui_a74c","col-xs-12":"col-xs-12_rui_a74c","col-xs-offset-0":"col-xs-offset-0_rui_a74c","col-xs-offset-1":"col-xs-offset-1_rui_a74c","col-xs-offset-2":"col-xs-offset-2_rui_a74c","col-xs-offset-3":"col-xs-offset-3_rui_a74c","col-xs-offset-4":"col-xs-offset-4_rui_a74c","col-xs-offset-5":"col-xs-offset-5_rui_a74c","col-xs-offset-6":"col-xs-offset-6_rui_a74c","col-xs-offset-7":"col-xs-offset-7_rui_a74c","col-xs-offset-8":"col-xs-offset-8_rui_a74c","col-xs-offset-9":"col-xs-offset-9_rui_a74c","col-xs-offset-10":"col-xs-offset-10_rui_a74c","col-xs-offset-11":"col-xs-offset-11_rui_a74c","col-xs-offset-12":"col-xs-offset-12_rui_a74c","start-xs":"start-xs_rui_a74c","center-xs":"center-xs_rui_a74c","end-xs":"end-xs_rui_a74c","top-xs":"top-xs_rui_a74c","middle-xs":"middle-xs_rui_a74c","baseline-xs":"baseline-xs_rui_a74c","bottom-xs":"bottom-xs_rui_a74c","around-xs":"around-xs_rui_a74c","between-xs":"between-xs_rui_a74c","first-xs":"first-xs_rui_a74c","last-xs":"last-xs_rui_a74c","col-sm":"col-sm_rui_a74c","col-sm-1":"col-sm-1_rui_a74c","col-sm-2":"col-sm-2_rui_a74c","col-sm-3":"col-sm-3_rui_a74c","col-sm-4":"col-sm-4_rui_a74c","col-sm-5":"col-sm-5_rui_a74c","col-sm-6":"col-sm-6_rui_a74c","col-sm-7":"col-sm-7_rui_a74c","col-sm-8":"col-sm-8_rui_a74c","col-sm-9":"col-sm-9_rui_a74c","col-sm-10":"col-sm-10_rui_a74c","col-sm-11":"col-sm-11_rui_a74c","col-sm-12":"col-sm-12_rui_a74c","col-sm-offset-0":"col-sm-offset-0_rui_a74c","col-sm-offset-1":"col-sm-offset-1_rui_a74c","col-sm-offset-2":"col-sm-offset-2_rui_a74c","col-sm-offset-3":"col-sm-offset-3_rui_a74c","col-sm-offset-4":"col-sm-offset-4_rui_a74c","col-sm-offset-5":"col-sm-offset-5_rui_a74c","col-sm-offset-6":"col-sm-offset-6_rui_a74c","col-sm-offset-7":"col-sm-offset-7_rui_a74c","col-sm-offset-8":"col-sm-offset-8_rui_a74c","col-sm-offset-9":"col-sm-offset-9_rui_a74c","col-sm-offset-10":"col-sm-offset-10_rui_a74c","col-sm-offset-11":"col-sm-offset-11_rui_a74c","col-sm-offset-12":"col-sm-offset-12_rui_a74c","start-sm":"start-sm_rui_a74c","center-sm":"center-sm_rui_a74c","end-sm":"end-sm_rui_a74c","top-sm":"top-sm_rui_a74c","middle-sm":"middle-sm_rui_a74c","baseline-sm":"baseline-sm_rui_a74c","bottom-sm":"bottom-sm_rui_a74c","around-sm":"around-sm_rui_a74c","between-sm":"between-sm_rui_a74c","first-sm":"first-sm_rui_a74c","last-sm":"last-sm_rui_a74c","col-md":"col-md_rui_a74c","col-md-1":"col-md-1_rui_a74c","col-md-2":"col-md-2_rui_a74c","col-md-3":"col-md-3_rui_a74c","col-md-4":"col-md-4_rui_a74c","col-md-5":"col-md-5_rui_a74c","col-md-6":"col-md-6_rui_a74c","col-md-7":"col-md-7_rui_a74c","col-md-8":"col-md-8_rui_a74c","col-md-9":"col-md-9_rui_a74c","col-md-10":"col-md-10_rui_a74c","col-md-11":"col-md-11_rui_a74c","col-md-12":"col-md-12_rui_a74c","col-md-offset-0":"col-md-offset-0_rui_a74c","col-md-offset-1":"col-md-offset-1_rui_a74c","col-md-offset-2":"col-md-offset-2_rui_a74c","col-md-offset-3":"col-md-offset-3_rui_a74c","col-md-offset-4":"col-md-offset-4_rui_a74c","col-md-offset-5":"col-md-offset-5_rui_a74c","col-md-offset-6":"col-md-offset-6_rui_a74c","col-md-offset-7":"col-md-offset-7_rui_a74c","col-md-offset-8":"col-md-offset-8_rui_a74c","col-md-offset-9":"col-md-offset-9_rui_a74c","col-md-offset-10":"col-md-offset-10_rui_a74c","col-md-offset-11":"col-md-offset-11_rui_a74c","col-md-offset-12":"col-md-offset-12_rui_a74c","start-md":"start-md_rui_a74c","center-md":"center-md_rui_a74c","end-md":"end-md_rui_a74c","top-md":"top-md_rui_a74c","middle-md":"middle-md_rui_a74c","baseline-md":"baseline-md_rui_a74c","bottom-md":"bottom-md_rui_a74c","around-md":"around-md_rui_a74c","between-md":"between-md_rui_a74c","first-md":"first-md_rui_a74c","last-md":"last-md_rui_a74c","col-lg":"col-lg_rui_a74c","col-lg-1":"col-lg-1_rui_a74c","col-lg-2":"col-lg-2_rui_a74c","col-lg-3":"col-lg-3_rui_a74c","col-lg-4":"col-lg-4_rui_a74c","col-lg-5":"col-lg-5_rui_a74c","col-lg-6":"col-lg-6_rui_a74c","col-lg-7":"col-lg-7_rui_a74c","col-lg-8":"col-lg-8_rui_a74c","col-lg-9":"col-lg-9_rui_a74c","col-lg-10":"col-lg-10_rui_a74c","col-lg-11":"col-lg-11_rui_a74c","col-lg-12":"col-lg-12_rui_a74c","col-lg-offset-0":"col-lg-offset-0_rui_a74c","col-lg-offset-1":"col-lg-offset-1_rui_a74c","col-lg-offset-2":"col-lg-offset-2_rui_a74c","col-lg-offset-3":"col-lg-offset-3_rui_a74c","col-lg-offset-4":"col-lg-offset-4_rui_a74c","col-lg-offset-5":"col-lg-offset-5_rui_a74c","col-lg-offset-6":"col-lg-offset-6_rui_a74c","col-lg-offset-7":"col-lg-offset-7_rui_a74c","col-lg-offset-8":"col-lg-offset-8_rui_a74c","col-lg-offset-9":"col-lg-offset-9_rui_a74c","col-lg-offset-10":"col-lg-offset-10_rui_a74c","col-lg-offset-11":"col-lg-offset-11_rui_a74c","col-lg-offset-12":"col-lg-offset-12_rui_a74c","start-lg":"start-lg_rui_a74c","center-lg":"center-lg_rui_a74c","end-lg":"end-lg_rui_a74c","top-lg":"top-lg_rui_a74c","middle-lg":"middle-lg_rui_a74c","baseline-lg":"baseline-lg_rui_a74c","bottom-lg":"bottom-lg_rui_a74c","around-lg":"around-lg_rui_a74c","between-lg":"between-lg_rui_a74c","first-lg":"first-lg_rui_a74c","last-lg":"last-lg_rui_a74c"};
|
2
2
|
|
3
3
|
export { styles as s };
|
@@ -1,3 +1,3 @@
|
|
1
|
-
var styles = {"link":"
|
1
|
+
var styles = {"link":"link_rui_d382","active":"active_rui_d382","header":"header_rui_1238","headerSpaced":"headerSpaced_rui_1238","headerVertical":"headerVertical_rui_1238","logo":"logo_rui_1238","links":"links_rui_1238","tray":"tray_rui_1238","trayItemContent":"trayItemContent_rui_1238","icon":"icon_rui_1238","main":"main_rui_1238","rotatable":"rotatable_rui_1238","rotated":"rotated_rui_1238","profileEmpty":"profileEmpty_rui_1238","profile":"profile_rui_1238 profileEmpty_rui_1238","anchorClassName":"anchorClassName_rui_1238 resetButton_rui_8bff","avatarWrapper":"avatarWrapper_rui_1238","hasUpdates":"hasUpdates_rui_1238"};
|
2
2
|
|
3
3
|
export { styles as s };
|
@@ -1,3 +1,3 @@
|
|
1
|
-
var styles = {"contentWithHeadings":"
|
1
|
+
var styles = {"contentWithHeadings":"contentWithHeadings_rui_4b24","heading":"heading_rui_4b24 font_rui_8bff contentWithHeadings_rui_4b24","caps":"caps_rui_4b24","bold":"bold_rui_4b24"};
|
2
2
|
|
3
3
|
export { styles as s };
|
@@ -6,7 +6,7 @@ import classNames from 'classnames';
|
|
6
6
|
import memoize from '../global/memoize.js';
|
7
7
|
import { jsx } from 'react/jsx-runtime';
|
8
8
|
|
9
|
-
var styles = {"icon":"
|
9
|
+
var styles = {"icon":"icon_rui_2d39","glyph":"glyph_rui_2d39","compatibilityMode":"compatibilityMode_rui_2d39","gray":"gray_rui_2d39","hover":"hover_rui_2d39","green":"green_rui_2d39","magenta":"magenta_rui_2d39","red":"red_rui_2d39","blue":"blue_rui_2d39","white":"white_rui_2d39","loading":"loading_rui_2d39","icon-loading":"icon-loading_rui_2d39"};
|
10
10
|
|
11
11
|
const _excluded = ["src", "className"];
|
12
12
|
function convertReactSVGDOMProperty(str) {
|
@@ -13,7 +13,7 @@ import { ControlLabel } from '../control-label/control-label.js';
|
|
13
13
|
import ControlHelp from '../control-help/control-help.js';
|
14
14
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
15
15
|
|
16
|
-
var inputStyles = {"outerContainer":"
|
16
|
+
var inputStyles = {"outerContainer":"outerContainer_rui_e356","borderless":"borderless_rui_e356","container":"container_rui_e356","input":"input_rui_e356","error":"error_rui_e356","withIcon":"withIcon_rui_e356","clearable":"clearable_rui_e356","icon":"icon_rui_e356","clear":"clear_rui_e356","empty":"empty_rui_e356","errorText":"errorText_rui_e356","helpText":"helpText_rui_e356","sizeS":"sizeS_rui_e356","sizeM":"sizeM_rui_e356","sizeL":"sizeL_rui_e356","sizeFULL":"sizeFULL_rui_e356","heightS":"heightS_rui_e356","heightM":"heightM_rui_e356","heightL":"heightL_rui_e356"};
|
17
17
|
|
18
18
|
const _excluded = ["size", "multiline", "borderless", "label", "labelType", "error", "help", "className", "inputClassName", "children", "value", "onClear", "disabled", "inputRef", "onChange", "enableShortcuts", "id", "placeholder", "icon", "translations", "height", "afterInput"];
|
19
19
|
function noop() {}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
var styles = {"island":"
|
1
|
+
var styles = {"island":"island_rui_1d72","withTransparentBottomBorder":"withTransparentBottomBorder_rui_1d72","header":"header_rui_1d72","withBottomBorder":"withBottomBorder_rui_1d72","title":"title_rui_1d72","narrowIsland":"narrowIsland_rui_1d72","content":"content_rui_1d72","scrollableWrapper":"scrollableWrapper_rui_1d72","withoutPaddings":"withoutPaddings_rui_1d72","contentWithTopFade":"contentWithTopFade_rui_1d72","contentWithBottomFade":"contentWithBottomFade_rui_1d72"};
|
2
2
|
|
3
3
|
export { styles as s };
|
@@ -1,3 +1,3 @@
|
|
1
|
-
var linkStyles = {"link":"
|
1
|
+
var linkStyles = {"link":"link_rui_d382","withLinks":"withLinks_rui_d382","hover":"hover_rui_d382","pseudo":"pseudo_rui_d382","active":"active_rui_d382","inherit":"inherit_rui_d382"};
|
2
2
|
|
3
3
|
export { linkStyles as l };
|
@@ -1,3 +1,3 @@
|
|
1
|
-
var styles = {"list":"
|
1
|
+
var styles = {"list":"list_rui_93ef","simpleInner":"simpleInner_rui_93ef","scrolling":"scrolling_rui_93ef","separator":"separator_rui_93ef","separator_first":"separator_first_rui_93ef","item":"item_rui_93ef","itemContainer":"itemContainer_rui_93ef","compact":"compact_rui_93ef","error":"error_rui_93ef","add":"add_rui_93ef","top":"top_rui_93ef","left":"left_rui_93ef","label":"label_rui_93ef","description":"description_rui_93ef","right":"right_rui_93ef","details":"details_rui_93ef","padded":"padded_rui_93ef","hint":"hint_rui_93ef","action":"action_rui_93ef","actionLink":"actionLink_rui_93ef","hover":"hover_rui_93ef","icon":"icon_rui_93ef","highlight":"highlight_rui_93ef","service":"service_rui_93ef","glyph":"glyph_rui_93ef","avatar":"avatar_rui_93ef glyph_rui_93ef","rightGlyph":"rightGlyph_rui_93ef glyph_rui_93ef","checkboxContainer":"checkboxContainer_rui_93ef","title":"title_rui_93ef","title_first":"title_first_rui_93ef","text":"text_rui_93ef","fade":"fade_rui_93ef","overscrollNone":"overscrollNone_rui_93ef","disabled":"disabled_rui_93ef"};
|
2
2
|
|
3
3
|
export { styles as s };
|
@@ -2,7 +2,7 @@ import 'core-js/modules/es.symbol.description.js';
|
|
2
2
|
import List from '../list/list.js';
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
4
4
|
|
5
|
-
var styles = {"queryAssist":"
|
5
|
+
var styles = {"queryAssist":"queryAssist_rui_d22e","error":"error_rui_d22e","queryAssistDisabled":"queryAssistDisabled_rui_d22e","huge":"huge_rui_d22e","actions":"actions_rui_d22e","input":"input_rui_d22e","letter-text":"letter-text_rui_d22e","letterDefault":"letterDefault_rui_d22e","letter-field-name":"letter-field-name_rui_d22e","letter-field-value":"letter-field-value_rui_d22e","letter-operator":"letter-operator_rui_d22e","letter-error":"letter-error_rui_d22e","highlight":"highlight_rui_d22e","service":"service_rui_d22e","placeholder":"placeholder_rui_d22e resetButton_rui_8bff","hugePlaceholder":"hugePlaceholder_rui_d22e","letter":"letter_rui_d22e","icon":"icon_rui_d22e","rightSearchButton":"rightSearchButton_rui_d22e","clear":"clear_rui_d22e","withoutGlass":"withoutGlass_rui_d22e","loaderActive":"loaderActive_rui_d22e","loaderOnTheRight":"loaderOnTheRight_rui_d22e","inputRevertOrder":"inputRevertOrder_rui_d22e"};
|
6
6
|
|
7
7
|
const ICON_ID_LENGTH = 44;
|
8
8
|
class QueryAssistSuggestions {
|
@@ -8,7 +8,7 @@ import { ActiveItemContext } from '../list/list.js';
|
|
8
8
|
import { I18nContext } from '../i18n/i18n-context.js';
|
9
9
|
import { jsx } from 'react/jsx-runtime';
|
10
10
|
|
11
|
-
var styles = {"filterWithTagsFocused":"
|
11
|
+
var styles = {"filterWithTagsFocused":"filterWithTagsFocused_rui_531d","filterWithTags":"filterWithTags_rui_531d","filterWrapper":"filterWrapper_rui_531d","filterWithTagsInput":"filterWithTagsInput_rui_531d","filter":"filter_rui_531d","popup":"popup_rui_531d","filterIcon":"filterIcon_rui_531d","bottomLine":"bottomLine_rui_531d","bottomLineOverItem":"bottomLineOverItem_rui_531d","message":"message_rui_531d","selectAll":"selectAll_rui_531d"};
|
12
12
|
|
13
13
|
const _excluded = ["className", "listId"];
|
14
14
|
function noop() {}
|
@@ -3,7 +3,7 @@ import { PureComponent } from 'react';
|
|
3
3
|
import Link from '../link/link.js';
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
5
5
|
|
6
|
-
var styles = {"services":"
|
6
|
+
var styles = {"services":"services_rui_e0d5","active":"active_rui_e0d5","item":"item_rui_e0d5","itemLogo":"itemLogo_rui_e0d5","activeItem":"activeItem_rui_e0d5 item_rui_e0d5 active_rui_e0d5","line":"line_rui_e0d5","itemStacked":"itemStacked_rui_e0d5","activeItemStacked":"activeItemStacked_rui_e0d5 itemStacked_rui_e0d5 active_rui_e0d5"};
|
7
7
|
|
8
8
|
const _excluded = ["service"];
|
9
9
|
class ServicesLink extends PureComponent {
|
@@ -5,7 +5,7 @@ import classNames from 'classnames';
|
|
5
5
|
import { Waypoint } from 'react-waypoint';
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
7
7
|
|
8
|
-
var styles = {"extra-small-screen-media":"(max-width: 639px)","small-screen-media":"(min-width: 640px) and (max-width: 959px)","contentLayout":"
|
8
|
+
var styles = {"extra-small-screen-media":"(max-width: 639px)","small-screen-media":"(min-width: 640px) and (max-width: 959px)","contentLayout":"contentLayout_rui_8468","contentLayoutContent":"contentLayoutContent_rui_8468","sidebarContainer":"sidebarContainer_rui_8468","sidebarContainerRight":"sidebarContainerRight_rui_8468","sidebar":"sidebar_rui_8468","sidebarRight":"sidebarRight_rui_8468","sidebarFixedTop":"sidebarFixedTop_rui_8468","sidebarFixedBottom":"sidebarFixedBottom_rui_8468","bottomMarker":"bottomMarker_rui_8468","contentLayoutResponsive":"contentLayoutResponsive_rui_8468"};
|
9
9
|
|
10
10
|
const _excluded = ["right", "children", "className", "containerClassName", "fixedClassName", "contentNode"];
|
11
11
|
const ABOVE = 'above';
|
@@ -3,7 +3,7 @@ import { memo } from 'react';
|
|
3
3
|
import Link from '../link/link.js';
|
4
4
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
5
5
|
|
6
|
-
var styles = {"tabs":"
|
6
|
+
var styles = {"tabs":"tabs_rui_aa34 font_rui_8bff","titles":"titles_rui_aa34","title":"title_rui_aa34 font_rui_8bff","selected":"selected_rui_aa34","collapsed":"collapsed_rui_aa34","titleLegacy":"titleLegacy_rui_aa34","visible":"visible_rui_aa34","container":"container_rui_aa34","hidden":"hidden_rui_aa34","hiddenBold":"hiddenBold_rui_aa34","hiddenRegular":"hiddenRegular_rui_aa34","tabCounter":"tabCounter_rui_aa34","autoCollapseContainer":"autoCollapseContainer_rui_aa34","autoCollapse":"autoCollapse_rui_aa34","rendered":"rendered_rui_aa34","adjusted":"adjusted_rui_aa34","measure":"measure_rui_aa34","morePopup":"morePopup_rui_aa34","morePopupBeforeEnd":"morePopupBeforeEnd_rui_aa34"};
|
7
7
|
|
8
8
|
const _excluded = ["isSelected", "title", "collapsed"];
|
9
9
|
function TabLink(_ref) {
|
@@ -1,3 +1,3 @@
|
|
1
|
-
var style = {"row":"
|
1
|
+
var style = {"row":"row_rui_23fe","dragHandle":"dragHandle_rui_23fe","tableWrapper":"tableWrapper_rui_23fe","table":"table_rui_23fe","userSelectNone":"userSelectNone_rui_23fe","headerCell":"headerCell_rui_23fe font-smaller-lower_rui_8bff font-smaller_rui_8bff font-lower_rui_8bff font_rui_8bff","headerCellSorted":"headerCellSorted_rui_23fe","headerCellSortable":"headerCellSortable_rui_23fe","sorter":"sorter_rui_23fe","sortedUp":"sortedUp_rui_23fe","icon":"icon_rui_23fe","caption":"caption_rui_23fe","tableHead":"tableHead_rui_23fe","subHeaderSticky":"subHeaderSticky_rui_23fe","disabledHover":"disabledHover_rui_23fe","rowSelected":"rowSelected_rui_23fe","rowFocused":"rowFocused_rui_23fe","cell":"cell_rui_23fe ellipsis_rui_8bff","loadingOverlay":"loadingOverlay_rui_23fe","wideFirstColumn":"wideFirstColumn_rui_23fe","cellUnlimited":"cellUnlimited_rui_23fe","cellRight":"cellRight_rui_23fe","metaColumn":"metaColumn_rui_23fe","headerMetaColumn":"headerMetaColumn_rui_23fe","visibleDragHandle":"visibleDragHandle_rui_23fe","rowCollapseExpandButton":"rowCollapseExpandButton_rui_23fe","draggingRow":"draggingRow_rui_23fe","draggingTable":"draggingTable_rui_23fe","tableMessage":"tableMessage_rui_23fe"};
|
2
2
|
|
3
3
|
export { style as s };
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import {
|
1
|
+
import { a as _objectWithoutProperties, b as _objectSpread2 } from './_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
3
|
-
import { createContext,
|
3
|
+
import { createContext, useState, useEffect, forwardRef, useMemo, useContext } from 'react';
|
4
4
|
import classNames from 'classnames';
|
5
5
|
import { createPortal } from 'react-dom';
|
6
6
|
import { PopupTargetContext, PopupTarget } from '../popup/popup.target.js';
|
@@ -8,9 +8,9 @@ import { getPopupContainer } from '../popup/popup.js';
|
|
8
8
|
import getUID from '../global/get-uid.js';
|
9
9
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
10
10
|
|
11
|
-
var defaultStyles = {"light":"
|
11
|
+
var defaultStyles = {"light":"light_rui_6155"};
|
12
12
|
|
13
|
-
var darkStyles = {"dark":"
|
13
|
+
var darkStyles = {"dark":"dark_rui_eb55"};
|
14
14
|
|
15
15
|
const _excluded = ["theme", "className", "passToPopups", "children", "WrapperComponent", "target"];
|
16
16
|
var Theme;
|
@@ -7,7 +7,7 @@ import Checkbox from '../checkbox/checkbox.js';
|
|
7
7
|
import getUID from '../global/get-uid.js';
|
8
8
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
9
9
|
|
10
|
-
var styles = {"dataListWrapper":"
|
10
|
+
var styles = {"dataListWrapper":"dataListWrapper_rui_9f76","dataList":"dataList_rui_9f76","itemContent":"itemContent_rui_9f76","title":"title_rui_9f76","disabledHover":"disabledHover_rui_9f76","titleSelected":"titleSelected_rui_9f76","titleFocused":"titleFocused_rui_9f76","showMore":"showMore_rui_9f76","boxes":"boxes_rui_9f76","checkboxBox":"checkboxBox_rui_9f76","collapseButton":"collapseButton_rui_9f76","collapseIcon":"collapseIcon_rui_9f76","loadingOverlay":"loadingOverlay_rui_9f76","showMoreLoader":"showMoreLoader_rui_9f76"};
|
11
11
|
|
12
12
|
class Title extends PureComponent {
|
13
13
|
constructor() {
|
@@ -40,7 +40,7 @@ import '../popup/position.js';
|
|
40
40
|
import 'core-js/modules/es.array.sort.js';
|
41
41
|
import '../popup/popup.consts.js';
|
42
42
|
|
43
|
-
var styles = {"alert":"
|
43
|
+
var styles = {"alert":"alert_rui_2b32","alertInline":"alertInline_rui_2b32","error":"error_rui_2b32","icon":"icon_rui_2b32","caption":"caption_rui_2b32","withCloseButton":"withCloseButton_rui_2b32","badge":"badge_rui_2b32","loader":"loader_rui_2b32","close":"close_rui_2b32","animationOpen":"animationOpen_rui_2b32","show":"show_rui_2b32","animationClosing":"animationClosing_rui_2b32","animationShaking":"animationShaking_rui_2b32","shaking":"shaking_rui_2b32"};
|
44
44
|
|
45
45
|
const ANIMATION_TIME = 500;
|
46
46
|
/**
|
@@ -4,7 +4,7 @@ import { createPortal } from 'react-dom';
|
|
4
4
|
import classNames from 'classnames';
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
6
6
|
|
7
|
-
var styles = {"alertContainer":"
|
7
|
+
var styles = {"alertContainer":"alertContainer_rui_a9a3","alertInContainer":"alertInContainer_rui_a9a3 alert_rui_2b32"};
|
8
8
|
|
9
9
|
const _excluded = ["children", "className"];
|
10
10
|
class Alerts extends PureComponent {
|
@@ -9,7 +9,7 @@ import { getAbsoluteBaseURL, fixUrl } from '../global/url.js';
|
|
9
9
|
import Listeners from '../global/listeners.js';
|
10
10
|
import HTTP from '../http/http.js';
|
11
11
|
import promiseWithTimeout from '../global/promise-with-timeout.js';
|
12
|
-
import { getTranslationsWithFallback,
|
12
|
+
import { getTranslationsWithFallback, translate, getTranslations } from '../i18n/i18n.js';
|
13
13
|
import AuthStorage from './storage.js';
|
14
14
|
import AuthResponseParser from './response-parser.js';
|
15
15
|
import AuthRequestBuilder from './request-builder.js';
|
@@ -46,7 +46,7 @@ import 'core-js/modules/es.array.sort.js';
|
|
46
46
|
import '../popup/popup.consts.js';
|
47
47
|
import '../_helpers/link.js';
|
48
48
|
|
49
|
-
var styles = {"title":"
|
49
|
+
var styles = {"title":"title_rui_b890","error":"error_rui_b890"};
|
50
50
|
|
51
51
|
let key = null;
|
52
52
|
function renderAlert(message) {
|
@@ -42,7 +42,7 @@ import '../global/controls-height.js';
|
|
42
42
|
import '../_helpers/button__classes.js';
|
43
43
|
import '../_helpers/heading.js';
|
44
44
|
|
45
|
-
var styles = {"dialog":"
|
45
|
+
var styles = {"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"};
|
46
46
|
|
47
47
|
class AuthDialog extends Component {
|
48
48
|
constructor() {
|
@@ -10,7 +10,7 @@ import 'core-js/modules/es.regexp.exec.js';
|
|
10
10
|
import 'core-js/modules/es.string.replace.js';
|
11
11
|
import '../global/get-uid.js';
|
12
12
|
|
13
|
-
var styles = {"avatar":"
|
13
|
+
var styles = {"avatar":"avatar_rui_a03e","subavatar":"subavatar_rui_a03e","empty":"empty_rui_a03e"};
|
14
14
|
|
15
15
|
const _excluded = ["size", "url", "dpr", "style", "round", "subavatar", "subavatarSize", "username", "skipParams"];
|
16
16
|
var Size;
|
@@ -2,7 +2,7 @@ import classNames from 'classnames';
|
|
2
2
|
import { Children, Fragment } from 'react';
|
3
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
4
4
|
|
5
|
-
var styles = {"separator":"
|
5
|
+
var styles = {"separator":"separator_rui_faa8"};
|
6
6
|
|
7
7
|
function Breadcrumbs(_ref) {
|
8
8
|
let {
|
@@ -5,7 +5,7 @@ import joinDataTestAttributes from '../global/data-tests.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
6
6
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
7
7
|
|
8
|
-
var styles = {"button":"
|
8
|
+
var styles = {"button":"button_rui_0b90","buttonSet":"buttonSet_rui_b2a9"};
|
9
9
|
|
10
10
|
const _excluded = ["className", "data-test", "children"];
|
11
11
|
class ButtonSet extends PureComponent {
|
@@ -5,7 +5,7 @@ import joinDataTestAttributes from '../global/data-tests.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
6
6
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
7
7
|
|
8
|
-
var styles = {"button":"
|
8
|
+
var styles = {"button":"button_rui_0b90","buttonToolbar":"buttonToolbar_rui_f4fc","buttonGroup":"buttonGroup_rui_f4fc","split":"split_rui_f4fc"};
|
9
9
|
|
10
10
|
const _excluded = ["className", "data-test"];
|
11
11
|
class ButtonToolbar extends PureComponent {
|
@@ -16,7 +16,7 @@ import 'core-js/modules/es.string.replace.js';
|
|
16
16
|
import '../global/memoize.js';
|
17
17
|
import 'memoize-one';
|
18
18
|
|
19
|
-
var styles = {"checkbox":"
|
19
|
+
var styles = {"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","cellWrapper":"cellWrapper_rui_d990","focus":"focus_rui_d990","label":"label_rui_d990"};
|
20
20
|
|
21
21
|
const _excluded = ["children", "label", "className", "containerClassName", "containerStyle", "cellClassName", "labelClassName", "indeterminate", "inputRef", "help"];
|
22
22
|
class Checkbox extends PureComponent {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import alertService from '../alert-service/alert-service.js';
|
2
|
-
import {
|
2
|
+
import { copyTextToClipboard, copyHTMLToClipboard } from './clipboard-fallback.js';
|
3
3
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
4
4
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
5
5
|
import 'react-dom/client';
|
package/components/code/code.js
CHANGED
@@ -11,9 +11,9 @@ import { jsx } from 'react/jsx-runtime';
|
|
11
11
|
import 'core-js/modules/es.array.reverse.js';
|
12
12
|
import 'core-js/modules/es.regexp.exec.js';
|
13
13
|
|
14
|
-
var styles = {"code":"
|
14
|
+
var styles = {"code":"code_rui_7185","inline":"inline_rui_7185","softWrap":"softWrap_rui_7185"};
|
15
15
|
|
16
|
-
var highlightStyles = {"highlightContainer":"
|
16
|
+
var highlightStyles = {"highlightContainer":"highlightContainer_rui_6e02"};
|
17
17
|
|
18
18
|
function noop() {}
|
19
19
|
const registerLanguage = memoize(async language => {
|
@@ -5,12 +5,12 @@ import joinDataTestAttributes from '../global/data-tests.js';
|
|
5
5
|
import { getRect } from '../global/dom.js';
|
6
6
|
import { toPx } from './utils.js';
|
7
7
|
import { CollapseContext } from './collapse-context.js';
|
8
|
-
import {
|
8
|
+
import { COLLAPSE_CONTENT_CONTAINER_TEST_ID, COLLAPSE_CONTENT_TEST_ID } from './consts.js';
|
9
9
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
10
10
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
11
11
|
import 'core-js/modules/es.regexp.exec.js';
|
12
12
|
|
13
|
-
var styles = {"container":"
|
13
|
+
var styles = {"container":"container_rui_88de","transition":"transition_rui_88de","summary":"summary_rui_88de","trigger":"trigger_rui_88de","fade":"fade_rui_88de"};
|
14
14
|
|
15
15
|
const DURATION_FACTOR = 0.5;
|
16
16
|
const DEFAULT_HEIGHT = 0;
|
@@ -40,13 +40,23 @@ const CollapseContent = _ref => {
|
|
40
40
|
height: 0
|
41
41
|
});
|
42
42
|
const [height, setHeight] = useState(toPx(minHeight));
|
43
|
-
const [showFade, setShowFade] = useState(
|
43
|
+
const [showFade, setShowFade] = useState(collapsed);
|
44
|
+
const [shouldHideContent, setShouldHideContent] = useState(collapsed && minHeight <= DEFAULT_HEIGHT);
|
44
45
|
useEffect(() => {
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
46
|
+
function onTransitionEnd() {
|
47
|
+
if (initialContentHeight.current <= DEFAULT_HEIGHT) {
|
48
|
+
setShouldHideContent(collapsed);
|
49
|
+
}
|
49
50
|
}
|
51
|
+
const container = containerRef.current;
|
52
|
+
container === null || container === void 0 || container.addEventListener('transitionend', onTransitionEnd);
|
53
|
+
return () => {
|
54
|
+
container === null || container === void 0 || container.removeEventListener('transitionend', onTransitionEnd);
|
55
|
+
};
|
56
|
+
}, [collapsed]);
|
57
|
+
useEffect(() => {
|
58
|
+
setShowFade(collapsed);
|
59
|
+
if (!collapsed) setShouldHideContent(false);
|
50
60
|
}, [collapsed]);
|
51
61
|
useEffect(() => {
|
52
62
|
if (contentRef.current) {
|
@@ -84,6 +94,7 @@ const CollapseContent = _ref => {
|
|
84
94
|
};
|
85
95
|
}, [duration, height, collapsed, minHeight]);
|
86
96
|
const fadeShouldBeVisible = useMemo(() => Boolean(minHeight && showFade), [minHeight, showFade]);
|
97
|
+
const shouldRenderContent = disableAnimation ? !collapsed : !shouldHideContent;
|
87
98
|
return /*#__PURE__*/jsxs("div", {
|
88
99
|
ref: containerRef,
|
89
100
|
id: "collapse-content-".concat(id),
|
@@ -95,7 +106,7 @@ const CollapseContent = _ref => {
|
|
95
106
|
children: [/*#__PURE__*/jsx("div", {
|
96
107
|
ref: contentRef,
|
97
108
|
"data-test": joinDataTestAttributes(COLLAPSE_CONTENT_TEST_ID, dataTest),
|
98
|
-
children: children
|
109
|
+
children: shouldRenderContent ? children : null
|
99
110
|
}), fadeShouldBeVisible && /*#__PURE__*/jsx("div", {
|
100
111
|
className: styles.fade
|
101
112
|
})]
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
2
|
-
import { useState, useId, useCallback } from 'react';
|
2
|
+
import { useState, useId, useMemo, useCallback } from 'react';
|
3
3
|
import { CollapseContext } from './collapse-context.js';
|
4
4
|
import { BASE_ANIMATION_DURATION } from './consts.js';
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
@@ -10,19 +10,22 @@ const Collapse = _ref => {
|
|
10
10
|
duration = BASE_ANIMATION_DURATION,
|
11
11
|
disableAnimation = false,
|
12
12
|
className = '',
|
13
|
-
onChange = () => {}
|
13
|
+
onChange = () => {},
|
14
|
+
defaultCollapsed = true,
|
15
|
+
collapsed = null
|
14
16
|
} = _ref;
|
15
|
-
const [
|
17
|
+
const [innerCollapsed, setInnerCollapsed] = useState(defaultCollapsed);
|
16
18
|
const id = useId();
|
19
|
+
const finalCollapsedValue = useMemo(() => collapsed !== null && collapsed !== void 0 ? collapsed : innerCollapsed, [innerCollapsed, collapsed]);
|
17
20
|
const setCollapsed = useCallback(() => {
|
18
|
-
|
19
|
-
onChange(!
|
20
|
-
}, [
|
21
|
+
setInnerCollapsed(!finalCollapsedValue);
|
22
|
+
onChange(!finalCollapsedValue);
|
23
|
+
}, [setInnerCollapsed, onChange, finalCollapsedValue]);
|
21
24
|
return /*#__PURE__*/jsx("div", {
|
22
25
|
className: className,
|
23
26
|
children: /*#__PURE__*/jsx(CollapseContext.Provider, {
|
24
27
|
value: {
|
25
|
-
collapsed,
|
28
|
+
collapsed: finalCollapsedValue,
|
26
29
|
setCollapsed,
|
27
30
|
duration,
|
28
31
|
disableAnimation,
|