@jetbrains/ring-ui-built 8.0.0-beta.4 → 8.0.0-beta.6
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/alert.js +3 -0
- package/components/_helpers/caption.js +1 -1
- package/components/_helpers/header.js +1 -1
- package/components/_helpers/table.js +1 -1
- package/components/alert/alert-actions.d.ts +4 -0
- package/components/alert/alert-actions.js +51 -0
- package/components/alert/alert-heading.d.ts +4 -0
- package/components/alert/alert-heading.js +62 -0
- package/components/alert/alert.d.ts +14 -1
- package/components/alert/alert.js +43 -25
- package/components/alert-service/alert-service.d.ts +2 -1
- package/components/alert-service/alert-service.js +15 -5
- package/components/auth/auth-core.d.ts +5 -9
- package/components/auth/auth-core.js +71 -17
- package/components/auth/auth.js +7 -1
- package/components/auth/down-notification.js +7 -1
- package/components/auth/storage.js +7 -1
- package/components/clipboard/clipboard.js +7 -1
- package/components/collapse/collapse-content.d.ts +7 -0
- package/components/collapse/collapse-content.js +67 -35
- package/components/collapse/collapse-context.d.ts +1 -0
- package/components/collapse/collapse-context.js +1 -0
- package/components/collapse/collapse.d.ts +9 -0
- package/components/collapse/collapse.js +42 -38
- package/components/collapsible-group/collapsible-group.d.ts +14 -1
- package/components/collapsible-group/collapsible-group.js +82 -64
- package/components/date-picker/consts.d.ts +1 -0
- package/components/date-picker/date-input.js +3 -2
- package/components/expand/collapsible-group.js +1 -0
- package/components/header/header.js +7 -1
- package/components/header/smart-profile.js +7 -1
- package/components/http/http.d.ts +2 -2
- package/components/http/http.js +2 -2
- package/components/i18n/i18n.d.ts +1 -0
- package/components/i18n/i18n.js +2 -0
- package/components/internal/reorder-animation-context.js +159 -0
- package/components/internal/reorder-handle.js +750 -0
- package/components/internal/reorder-layout-context.js +141 -0
- package/components/internal/table-header.js +221 -645
- package/components/internal/{virtual-items.js → virtualization.js} +29 -14
- package/components/old-browsers-message/white-list.js +2 -2
- package/components/storage/storage-local.js +7 -1
- package/components/storage/storage.js +7 -1
- package/components/style.css +1 -1
- package/components/table/default-item-renderer.d.ts +7 -1
- package/components/table/default-item-renderer.js +119 -67
- package/components/table/internal/reorder-animation-context.d.ts +21 -0
- package/components/table/internal/reorder-handle.d.ts +9 -0
- package/components/table/internal/reorder-layout-context.d.ts +16 -0
- package/components/table/internal/table-header.d.ts +1 -4
- package/components/table/internal/{virtual-items.d.ts → virtualization.d.ts} +10 -3
- package/components/table/item-virtualization.d.ts +5 -3
- package/components/table/item-virtualization.js +13 -11
- package/components/table/reorder-animation.d.ts +37 -0
- package/components/table/reorder-animation.js +18 -0
- package/components/table/reorder-item-layout.d.ts +32 -0
- package/components/table/reorder-item-layout.js +57 -0
- package/components/table/table-const.d.ts +0 -32
- package/components/table/table-const.js +1 -8
- package/components/table/table-primitives.d.ts +43 -0
- package/components/table/table-primitives.js +62 -5
- package/components/table/table-props.d.ts +29 -5
- package/components/table/table.d.ts +31 -5
- package/components/table/table.js +177 -170
- package/components/user-agreement/service.js +7 -1
- package/components/user-card/card.js +7 -1
- package/components/user-card/smart-user-card-tooltip.d.ts +1 -1
- package/components/user-card/smart-user-card-tooltip.js +7 -1
- package/components/user-card/tooltip.js +7 -1
- package/components/user-card/user-card.js +7 -1
- package/components/util-stories.d.ts +2 -2
- package/package.json +2 -2
- package/components/internal/column-animation.js +0 -133
- package/components/table/internal/column-animation.d.ts +0 -16
package/components/auth/auth.js
CHANGED
|
@@ -12,8 +12,9 @@ import '../global/get-uid.js';
|
|
|
12
12
|
import '../alert/alert.js';
|
|
13
13
|
import 'classnames';
|
|
14
14
|
import '@jetbrains/icons/exception';
|
|
15
|
-
import '@jetbrains/icons/
|
|
15
|
+
import '@jetbrains/icons/success';
|
|
16
16
|
import '@jetbrains/icons/warning';
|
|
17
|
+
import '@jetbrains/icons/info-filled';
|
|
17
18
|
import '@jetbrains/icons/close';
|
|
18
19
|
import '../icon/icon.js';
|
|
19
20
|
import 'util-deprecate';
|
|
@@ -32,6 +33,11 @@ import '../global/controls-height.js';
|
|
|
32
33
|
import '../global/configuration.js';
|
|
33
34
|
import '../_helpers/button.classes.js';
|
|
34
35
|
import '../_helpers/theme.js';
|
|
36
|
+
import '../alert/alert-heading.js';
|
|
37
|
+
import '../heading/heading.js';
|
|
38
|
+
import '../_helpers/heading.js';
|
|
39
|
+
import '../_helpers/alert.js';
|
|
40
|
+
import '../alert/alert-actions.js';
|
|
35
41
|
import '../alert/container.js';
|
|
36
42
|
import 'react-dom';
|
|
37
43
|
import '../link/link.js';
|
|
@@ -11,8 +11,9 @@ import '../alert/container.js';
|
|
|
11
11
|
import 'react-dom';
|
|
12
12
|
import 'classnames';
|
|
13
13
|
import '@jetbrains/icons/exception';
|
|
14
|
-
import '@jetbrains/icons/
|
|
14
|
+
import '@jetbrains/icons/success';
|
|
15
15
|
import '@jetbrains/icons/warning';
|
|
16
|
+
import '@jetbrains/icons/info-filled';
|
|
16
17
|
import '@jetbrains/icons/close';
|
|
17
18
|
import '../icon/icon.js';
|
|
18
19
|
import 'util-deprecate';
|
|
@@ -30,6 +31,11 @@ import '../global/controls-height.js';
|
|
|
30
31
|
import '../global/configuration.js';
|
|
31
32
|
import '../_helpers/button.classes.js';
|
|
32
33
|
import '../_helpers/theme.js';
|
|
34
|
+
import '../alert/alert-heading.js';
|
|
35
|
+
import '../heading/heading.js';
|
|
36
|
+
import '../_helpers/heading.js';
|
|
37
|
+
import '../_helpers/alert.js';
|
|
38
|
+
import '../alert/alert-actions.js';
|
|
33
39
|
import '../_helpers/link.js';
|
|
34
40
|
|
|
35
41
|
var styles = {"title":"ring-down-notification-title","error":"ring-down-notification-error"};
|
|
@@ -6,8 +6,9 @@ import '../alert/alert.js';
|
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'classnames';
|
|
8
8
|
import '@jetbrains/icons/exception';
|
|
9
|
-
import '@jetbrains/icons/
|
|
9
|
+
import '@jetbrains/icons/success';
|
|
10
10
|
import '@jetbrains/icons/warning';
|
|
11
|
+
import '@jetbrains/icons/info-filled';
|
|
11
12
|
import '@jetbrains/icons/close';
|
|
12
13
|
import '../icon/icon.js';
|
|
13
14
|
import 'util-deprecate';
|
|
@@ -27,6 +28,11 @@ import '../global/controls-height.js';
|
|
|
27
28
|
import '../global/configuration.js';
|
|
28
29
|
import '../_helpers/button.classes.js';
|
|
29
30
|
import '../_helpers/theme.js';
|
|
31
|
+
import '../alert/alert-heading.js';
|
|
32
|
+
import '../heading/heading.js';
|
|
33
|
+
import '../_helpers/heading.js';
|
|
34
|
+
import '../_helpers/alert.js';
|
|
35
|
+
import '../alert/alert-actions.js';
|
|
30
36
|
import '../alert/container.js';
|
|
31
37
|
import 'react-dom';
|
|
32
38
|
|
|
@@ -6,8 +6,9 @@ import '../alert/alert.js';
|
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'classnames';
|
|
8
8
|
import '@jetbrains/icons/exception';
|
|
9
|
-
import '@jetbrains/icons/
|
|
9
|
+
import '@jetbrains/icons/success';
|
|
10
10
|
import '@jetbrains/icons/warning';
|
|
11
|
+
import '@jetbrains/icons/info-filled';
|
|
11
12
|
import '@jetbrains/icons/close';
|
|
12
13
|
import '../icon/icon.js';
|
|
13
14
|
import 'util-deprecate';
|
|
@@ -27,6 +28,11 @@ import '../global/controls-height.js';
|
|
|
27
28
|
import '../global/configuration.js';
|
|
28
29
|
import '../_helpers/button.classes.js';
|
|
29
30
|
import '../_helpers/theme.js';
|
|
31
|
+
import '../alert/alert-heading.js';
|
|
32
|
+
import '../heading/heading.js';
|
|
33
|
+
import '../_helpers/heading.js';
|
|
34
|
+
import '../_helpers/alert.js';
|
|
35
|
+
import '../alert/alert-actions.js';
|
|
30
36
|
import '../alert/container.js';
|
|
31
37
|
import 'react-dom';
|
|
32
38
|
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import React, { type PropsWithChildren } from 'react';
|
|
2
2
|
interface Props {
|
|
3
|
+
/**
|
|
4
|
+
* Height of the always-visible preview of the collapsed content.
|
|
5
|
+
* The collapsed subtree is inert until expanded, matching `aria-expanded`.
|
|
6
|
+
* The preview is only a visual clip of that subtree, so it is inert too and
|
|
7
|
+
* assistive technology will not perceive it — if the preview carries essential
|
|
8
|
+
* information, expose an accessible summary outside the collapsed content.
|
|
9
|
+
*/
|
|
3
10
|
minHeight?: number;
|
|
4
11
|
className?: string;
|
|
5
12
|
'data-test'?: string | null | undefined;
|
|
@@ -3,6 +3,7 @@ import { use, useRef, useState, useEffect } from 'react';
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import joinDataTestAttributes from '../global/data-tests.js';
|
|
5
5
|
import { getRect } from '../global/dom.js';
|
|
6
|
+
import { parseCssDuration } from '../global/parse-css-duration.js';
|
|
6
7
|
import { toPx } from './utils.js';
|
|
7
8
|
import { CollapseContext } from './collapse-context.js';
|
|
8
9
|
import { COLLAPSE_CONTENT_CONTAINER_TEST_ID, COLLAPSE_CONTENT_TEST_ID } from './consts.js';
|
|
@@ -14,16 +15,19 @@ const DURATION_FACTOR = 0.5;
|
|
|
14
15
|
const DEFAULT_HEIGHT = 0;
|
|
15
16
|
const VISIBLE = 1;
|
|
16
17
|
const HIDDEN = 0;
|
|
18
|
+
// margin for the hide fallback timer, so it fires only if transitionend never did
|
|
19
|
+
const HIDE_FALLBACK_EXTRA_DELAY = 100;
|
|
20
|
+
const isFullyCollapsed = (collapsed, initialContentHeight) => collapsed && initialContentHeight <= DEFAULT_HEIGHT;
|
|
17
21
|
/**
|
|
18
22
|
* @name CollapseContent
|
|
19
23
|
*/
|
|
20
24
|
const CollapseContent = t0 => {
|
|
21
|
-
const $ = c(
|
|
22
|
-
if ($[0] !== "
|
|
23
|
-
for (let $i = 0; $i <
|
|
25
|
+
const $ = c(33);
|
|
26
|
+
if ($[0] !== "e428f8c30c8f8cfdd43da215eea42f35a3b93ebf1af57f7e14bd2e082111ea3f") {
|
|
27
|
+
for (let $i = 0; $i < 33; $i += 1) {
|
|
24
28
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
25
29
|
}
|
|
26
|
-
$[0] = "
|
|
30
|
+
$[0] = "e428f8c30c8f8cfdd43da215eea42f35a3b93ebf1af57f7e14bd2e082111ea3f";
|
|
27
31
|
}
|
|
28
32
|
const {
|
|
29
33
|
children,
|
|
@@ -35,7 +39,8 @@ const CollapseContent = t0 => {
|
|
|
35
39
|
collapsed,
|
|
36
40
|
duration,
|
|
37
41
|
id,
|
|
38
|
-
disableAnimation
|
|
42
|
+
disableAnimation,
|
|
43
|
+
keepMounted
|
|
39
44
|
} = use(CollapseContext);
|
|
40
45
|
const containerRef = useRef(null);
|
|
41
46
|
const contentRef = useRef(null);
|
|
@@ -56,15 +61,23 @@ const CollapseContent = t0 => {
|
|
|
56
61
|
let t4;
|
|
57
62
|
if ($[3] !== collapsed || $[4] !== initialContentHeight) {
|
|
58
63
|
t3 = () => {
|
|
59
|
-
const
|
|
64
|
+
const container = containerRef.current;
|
|
65
|
+
const finalizeCollapse = function finalizeCollapse() {
|
|
60
66
|
if (initialContentHeight <= DEFAULT_HEIGHT) {
|
|
61
67
|
setShouldHideContent(collapsed);
|
|
62
68
|
}
|
|
63
69
|
};
|
|
64
|
-
const
|
|
70
|
+
const onTransitionEnd = function onTransitionEnd(event) {
|
|
71
|
+
if (event.target === container && event.propertyName === "height") {
|
|
72
|
+
finalizeCollapse();
|
|
73
|
+
}
|
|
74
|
+
};
|
|
65
75
|
container?.addEventListener("transitionend", onTransitionEnd);
|
|
76
|
+
const cssDuration = parseCssDuration(container?.style.getPropertyValue("--duration") || "");
|
|
77
|
+
const fallbackTimeout = window.setTimeout(finalizeCollapse, cssDuration + HIDE_FALLBACK_EXTRA_DELAY);
|
|
66
78
|
return () => {
|
|
67
79
|
container?.removeEventListener("transitionend", onTransitionEnd);
|
|
80
|
+
window.clearTimeout(fallbackTimeout);
|
|
68
81
|
};
|
|
69
82
|
};
|
|
70
83
|
t4 = [collapsed, initialContentHeight];
|
|
@@ -80,6 +93,9 @@ const CollapseContent = t0 => {
|
|
|
80
93
|
if (!collapsed && shouldHideContent) {
|
|
81
94
|
setShouldHideContent(false);
|
|
82
95
|
}
|
|
96
|
+
if (disableAnimation && !shouldHideContent && isFullyCollapsed(collapsed, initialContentHeight)) {
|
|
97
|
+
setShouldHideContent(true);
|
|
98
|
+
}
|
|
83
99
|
let t5;
|
|
84
100
|
let t6;
|
|
85
101
|
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -118,7 +134,9 @@ const CollapseContent = t0 => {
|
|
|
118
134
|
}
|
|
119
135
|
const style = t9;
|
|
120
136
|
const fadeShouldBeVisible = Boolean(minHeight && collapsed);
|
|
121
|
-
const
|
|
137
|
+
const contentVisible = !shouldHideContent;
|
|
138
|
+
const contentHidden = Boolean(keepMounted) && !contentVisible;
|
|
139
|
+
const contentInert = collapsed;
|
|
122
140
|
const t10 = `collapse-content-${id}`;
|
|
123
141
|
let t11;
|
|
124
142
|
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -146,50 +164,64 @@ const CollapseContent = t0 => {
|
|
|
146
164
|
} else {
|
|
147
165
|
t14 = $[17];
|
|
148
166
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
167
|
+
let t15;
|
|
168
|
+
if ($[18] !== contentHidden) {
|
|
169
|
+
t15 = contentHidden ? {
|
|
170
|
+
visibility: "hidden"
|
|
171
|
+
} : undefined;
|
|
172
|
+
$[18] = contentHidden;
|
|
173
|
+
$[19] = t15;
|
|
174
|
+
} else {
|
|
175
|
+
t15 = $[19];
|
|
176
|
+
}
|
|
177
|
+
const t16 = keepMounted || contentVisible ? children : null;
|
|
178
|
+
let t17;
|
|
179
|
+
if ($[20] !== contentInert || $[21] !== t14 || $[22] !== t15 || $[23] !== t16) {
|
|
180
|
+
t17 = /*#__PURE__*/jsx("div", {
|
|
153
181
|
ref: contentRef,
|
|
154
182
|
"data-test": t14,
|
|
155
|
-
|
|
183
|
+
style: t15,
|
|
184
|
+
inert: contentInert,
|
|
185
|
+
children: t16
|
|
156
186
|
});
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
$[
|
|
187
|
+
$[20] = contentInert;
|
|
188
|
+
$[21] = t14;
|
|
189
|
+
$[22] = t15;
|
|
190
|
+
$[23] = t16;
|
|
191
|
+
$[24] = t17;
|
|
160
192
|
} else {
|
|
161
|
-
|
|
193
|
+
t17 = $[24];
|
|
162
194
|
}
|
|
163
|
-
let
|
|
164
|
-
if ($[
|
|
165
|
-
|
|
195
|
+
let t18;
|
|
196
|
+
if ($[25] !== fadeShouldBeVisible) {
|
|
197
|
+
t18 = fadeShouldBeVisible && /*#__PURE__*/jsx("div", {
|
|
166
198
|
className: styles.fade
|
|
167
199
|
});
|
|
168
|
-
$[
|
|
169
|
-
$[
|
|
200
|
+
$[25] = fadeShouldBeVisible;
|
|
201
|
+
$[26] = t18;
|
|
170
202
|
} else {
|
|
171
|
-
|
|
203
|
+
t18 = $[26];
|
|
172
204
|
}
|
|
173
|
-
let
|
|
174
|
-
if ($[
|
|
175
|
-
|
|
205
|
+
let t19;
|
|
206
|
+
if ($[27] !== style || $[28] !== t10 || $[29] !== t13 || $[30] !== t17 || $[31] !== t18) {
|
|
207
|
+
t19 = /*#__PURE__*/jsxs("div", {
|
|
176
208
|
ref: containerRef,
|
|
177
209
|
id: t10,
|
|
178
210
|
"data-test": t11,
|
|
179
211
|
className: t13,
|
|
180
212
|
style: style,
|
|
181
|
-
children: [
|
|
213
|
+
children: [t17, t18]
|
|
182
214
|
});
|
|
183
|
-
$[
|
|
184
|
-
$[
|
|
185
|
-
$[
|
|
186
|
-
$[
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
215
|
+
$[27] = style;
|
|
216
|
+
$[28] = t10;
|
|
217
|
+
$[29] = t13;
|
|
218
|
+
$[30] = t17;
|
|
219
|
+
$[31] = t18;
|
|
220
|
+
$[32] = t19;
|
|
189
221
|
} else {
|
|
190
|
-
|
|
222
|
+
t19 = $[32];
|
|
191
223
|
}
|
|
192
|
-
return
|
|
224
|
+
return t19;
|
|
193
225
|
};
|
|
194
226
|
|
|
195
227
|
export { CollapseContent, CollapseContent as default };
|
|
@@ -4,6 +4,15 @@ interface Props {
|
|
|
4
4
|
onChange?: (collapsed: boolean) => void;
|
|
5
5
|
duration?: number;
|
|
6
6
|
disableAnimation?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Keep children mounted while collapsed (hidden via `visibility: hidden`
|
|
9
|
+
* and the `inert` attribute) instead of unmounting them, preserving their state.
|
|
10
|
+
* Note: hidden form controls still participate in form validation
|
|
11
|
+
* and submission — disable them while collapsed if needed.
|
|
12
|
+
* Content rendered through portals (e.g. Popup) escapes the hidden
|
|
13
|
+
* wrapper and is not hidden — close overlays on collapse.
|
|
14
|
+
*/
|
|
15
|
+
keepMounted?: boolean;
|
|
7
16
|
className?: string;
|
|
8
17
|
defaultCollapsed?: boolean;
|
|
9
18
|
collapsed?: boolean | null;
|
|
@@ -5,87 +5,91 @@ import { BASE_ANIMATION_DURATION } from './consts.js';
|
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
const Collapse = t0 => {
|
|
8
|
-
const $ = c(
|
|
9
|
-
if ($[0] !== "
|
|
10
|
-
for (let $i = 0; $i <
|
|
8
|
+
const $ = c(17);
|
|
9
|
+
if ($[0] !== "c01294e8c8f1b12e5881d26b9c4bcfc3b1ba5726fff07b53471c113b3a63b1f5") {
|
|
10
|
+
for (let $i = 0; $i < 17; $i += 1) {
|
|
11
11
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
12
12
|
}
|
|
13
|
-
$[0] = "
|
|
13
|
+
$[0] = "c01294e8c8f1b12e5881d26b9c4bcfc3b1ba5726fff07b53471c113b3a63b1f5";
|
|
14
14
|
}
|
|
15
15
|
const {
|
|
16
16
|
children,
|
|
17
17
|
duration: t1,
|
|
18
18
|
disableAnimation: t2,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
keepMounted: t3,
|
|
20
|
+
className: t4,
|
|
21
|
+
onChange: t5,
|
|
22
|
+
defaultCollapsed: t6,
|
|
23
|
+
collapsed: t7
|
|
23
24
|
} = t0;
|
|
24
25
|
const duration = t1 === undefined ? BASE_ANIMATION_DURATION : t1;
|
|
25
26
|
const disableAnimation = t2 === undefined ? false : t2;
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
27
|
+
const keepMounted = t3 === undefined ? false : t3;
|
|
28
|
+
const className = t4 === undefined ? "" : t4;
|
|
29
|
+
const onChange = t5 === undefined ? _temp : t5;
|
|
30
|
+
const defaultCollapsed = t6 === undefined ? true : t6;
|
|
31
|
+
const collapsed = t7 === undefined ? null : t7;
|
|
30
32
|
const [innerCollapsed, setInnerCollapsed] = useState(defaultCollapsed);
|
|
31
33
|
const id = useId();
|
|
32
34
|
const finalCollapsedValue = collapsed !== null && collapsed !== void 0 ? collapsed : innerCollapsed;
|
|
33
|
-
let
|
|
35
|
+
let t8;
|
|
34
36
|
if ($[1] !== finalCollapsedValue || $[2] !== onChange) {
|
|
35
|
-
|
|
37
|
+
t8 = () => {
|
|
36
38
|
setInnerCollapsed(!finalCollapsedValue);
|
|
37
39
|
onChange(!finalCollapsedValue);
|
|
38
40
|
};
|
|
39
41
|
$[1] = finalCollapsedValue;
|
|
40
42
|
$[2] = onChange;
|
|
41
|
-
$[3] =
|
|
43
|
+
$[3] = t8;
|
|
42
44
|
} else {
|
|
43
|
-
|
|
45
|
+
t8 = $[3];
|
|
44
46
|
}
|
|
45
|
-
const setCollapsed =
|
|
46
|
-
let
|
|
47
|
-
if ($[4] !== disableAnimation || $[5] !== duration || $[6] !== finalCollapsedValue || $[7] !== id || $[8] !== setCollapsed) {
|
|
48
|
-
|
|
47
|
+
const setCollapsed = t8;
|
|
48
|
+
let t9;
|
|
49
|
+
if ($[4] !== disableAnimation || $[5] !== duration || $[6] !== finalCollapsedValue || $[7] !== id || $[8] !== keepMounted || $[9] !== setCollapsed) {
|
|
50
|
+
t9 = {
|
|
49
51
|
collapsed: finalCollapsedValue,
|
|
50
52
|
setCollapsed,
|
|
51
53
|
duration,
|
|
52
54
|
disableAnimation,
|
|
55
|
+
keepMounted,
|
|
53
56
|
id
|
|
54
57
|
};
|
|
55
58
|
$[4] = disableAnimation;
|
|
56
59
|
$[5] = duration;
|
|
57
60
|
$[6] = finalCollapsedValue;
|
|
58
61
|
$[7] = id;
|
|
59
|
-
$[8] =
|
|
60
|
-
$[9] =
|
|
62
|
+
$[8] = keepMounted;
|
|
63
|
+
$[9] = setCollapsed;
|
|
64
|
+
$[10] = t9;
|
|
61
65
|
} else {
|
|
62
|
-
|
|
66
|
+
t9 = $[10];
|
|
63
67
|
}
|
|
64
|
-
let
|
|
65
|
-
if ($[
|
|
66
|
-
|
|
67
|
-
value:
|
|
68
|
+
let t10;
|
|
69
|
+
if ($[11] !== children || $[12] !== t9) {
|
|
70
|
+
t10 = /*#__PURE__*/jsx(CollapseContext, {
|
|
71
|
+
value: t9,
|
|
68
72
|
children: children
|
|
69
73
|
});
|
|
70
|
-
$[
|
|
71
|
-
$[11] = t8;
|
|
74
|
+
$[11] = children;
|
|
72
75
|
$[12] = t9;
|
|
76
|
+
$[13] = t10;
|
|
73
77
|
} else {
|
|
74
|
-
|
|
78
|
+
t10 = $[13];
|
|
75
79
|
}
|
|
76
|
-
let
|
|
77
|
-
if ($[
|
|
78
|
-
|
|
80
|
+
let t11;
|
|
81
|
+
if ($[14] !== className || $[15] !== t10) {
|
|
82
|
+
t11 = /*#__PURE__*/jsx("div", {
|
|
79
83
|
className: className,
|
|
80
|
-
children:
|
|
84
|
+
children: t10
|
|
81
85
|
});
|
|
82
|
-
$[
|
|
83
|
-
$[14] = t9;
|
|
86
|
+
$[14] = className;
|
|
84
87
|
$[15] = t10;
|
|
88
|
+
$[16] = t11;
|
|
85
89
|
} else {
|
|
86
|
-
|
|
90
|
+
t11 = $[16];
|
|
87
91
|
}
|
|
88
|
-
return
|
|
92
|
+
return t11;
|
|
89
93
|
};
|
|
90
94
|
function _temp() {}
|
|
91
95
|
|
|
@@ -11,10 +11,23 @@ export interface CollapsibleGroupProps {
|
|
|
11
11
|
onChange?: (expanded: boolean) => void;
|
|
12
12
|
disableAnimation?: boolean;
|
|
13
13
|
interactive?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Keep children mounted while collapsed (hidden via `visibility: hidden`
|
|
16
|
+
* and the `inert` attribute) instead of unmounting them, preserving their state.
|
|
17
|
+
* Note: hidden form controls still participate in form validation
|
|
18
|
+
* and submission — disable them while collapsed if needed.
|
|
19
|
+
* Content rendered through portals (e.g. Popup) escapes the hidden
|
|
20
|
+
* wrapper and is not hidden — close overlays on collapse.
|
|
21
|
+
*/
|
|
22
|
+
keepMounted?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Wraps the header in an <h2>–<h6> to keep the document outline.
|
|
25
|
+
*/
|
|
26
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
14
27
|
'data-test'?: string | null | undefined;
|
|
15
28
|
}
|
|
16
29
|
declare const CollapsibleGroup: {
|
|
17
|
-
({ ref, avatar, title, subtitle, children, className, defaultExpanded, expanded, onChange, disableAnimation, interactive, "data-test": dataTest, }: CollapsibleGroupProps): React.JSX.Element;
|
|
30
|
+
({ ref, avatar, title, subtitle, children, className, defaultExpanded, expanded, onChange, disableAnimation, interactive, keepMounted, headingLevel, "data-test": dataTest, }: CollapsibleGroupProps): React.JSX.Element;
|
|
18
31
|
displayName: string;
|
|
19
32
|
};
|
|
20
33
|
export default CollapsibleGroup;
|