@jetbrains/ring-ui-built 7.0.124 → 8.0.0-beta.10
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/anchor.js +1 -1
- package/components/_helpers/avatar-info.js +3 -5
- package/components/_helpers/caption.js +1 -1
- package/components/_helpers/icon-svg.js +37 -52
- package/components/_helpers/legacy-table.js +3 -0
- package/components/_helpers/tab-link.js +1 -1
- package/components/_helpers/table.js +2 -2
- package/components/_helpers/theme.js +49 -37
- package/components/alert/alert-actions.js +1 -1
- package/components/alert/alert-heading.js +1 -1
- package/components/alert/alert.js +2 -2
- package/components/alert-service/alert-service.js +2 -2
- package/components/auth/auth-core.js +2 -2
- package/components/auth/auth.js +2 -2
- package/components/auth/down-notification.js +2 -2
- package/components/auth/iframe-flow.js +1 -1
- package/components/auth/storage.js +2 -2
- package/components/auth-dialog/auth-dialog.js +2 -2
- package/components/auth-dialog-service/auth-dialog-service.js +2 -2
- package/components/avatar/avatar-info.js +1 -1
- package/components/avatar/avatar-size.d.ts +0 -4
- package/components/avatar/avatar-size.js +0 -4
- package/components/avatar/avatar.js +1 -8
- package/components/avatar/fallback-avatar.js +3 -48
- package/components/avatar-stack/avatar-stack.js +5 -5
- package/components/banner/banner.js +2 -2
- package/components/button/button.d.ts +0 -4
- package/components/button/button.js +4 -10
- package/components/button-group/button-group.js +1 -1
- package/components/button-toolbar/button-toolbar.js +1 -1
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/checkbox/checkbox.js +1 -2
- package/components/clipboard/clipboard.js +2 -2
- package/components/collapse/collapse-content.js +35 -43
- package/components/collapse/collapse-context.d.ts +1 -0
- package/components/collapse/collapse-context.js +1 -0
- package/components/collapse/collapse-control.js +5 -5
- package/components/collapse/collapse.js +34 -25
- package/components/collapsible-group/collapsible-group.d.ts +5 -1
- package/components/collapsible-group/collapsible-group.js +80 -98
- package/components/components/util-stories.js +63 -1
- package/components/confirm/confirm.js +2 -2
- package/components/confirm-service/confirm-service.js +4 -4
- package/components/contenteditable/contenteditable.js +4 -5
- package/components/control-help/control-help.js +1 -1
- package/components/control-label/control-label.js +1 -1
- package/components/data-list/data-list.d.ts +4 -4
- package/components/data-list/data-list.js +5 -5
- package/components/data-list/data-list.mock.d.ts +1 -1
- package/components/data-list/data-list.mock.js +2 -2
- package/components/data-list/item.d.ts +1 -1
- package/components/data-list/item.js +3 -3
- package/components/data-list/selection.d.ts +1 -1
- package/components/data-list/selection.js +2 -2
- package/components/data-list/title.js +1 -2
- package/components/date-picker/date-input.js +2 -2
- package/components/date-picker/date-picker.js +2 -3
- package/components/date-picker/date-popup.js +4 -5
- package/components/date-picker/month-names.js +1 -1
- package/components/date-picker/month-slider.js +1 -1
- package/components/date-picker/month.d.ts +0 -2
- package/components/date-picker/month.js +17 -18
- package/components/date-picker/months.js +43 -36
- package/components/date-picker/use-scroll-behavior.js +45 -45
- package/components/date-picker/weekdays.js +1 -1
- package/components/date-picker/years.js +61 -55
- package/components/dialog/dialog.d.ts +2 -2
- package/components/dialog/dialog.js +5 -5
- package/components/dropdown/anchor.js +3 -3
- package/components/dropdown/dropdown.js +3 -3
- package/components/dropdown-menu/dropdown-menu.d.ts +4 -4
- package/components/dropdown-menu/dropdown-menu.js +63 -58
- package/components/editable-heading/editable-heading.d.ts +1 -2
- package/components/editable-heading/editable-heading.js +14 -13
- package/components/error-bubble/error-bubble.js +1 -1
- package/components/error-message/error-message.js +1 -2
- package/components/footer/footer.js +1 -1
- package/components/global/compose-refs.d.ts +2 -1
- package/components/global/compose-refs.js +44 -8
- package/components/global/configuration.d.ts +0 -5
- package/components/global/configuration.js +2 -10
- package/components/global/controls-height.js +1 -1
- package/components/global/create-stateful-context.js +11 -11
- package/components/global/focus-sensor-hoc.js +1 -0
- package/components/global/focus-with-temporary-tabindex.d.ts +11 -0
- package/components/global/focus-with-temporary-tabindex.js +23 -0
- package/components/global/intersection-observer-context.d.ts +46 -0
- package/components/global/intersection-observer-context.js +138 -0
- package/components/global/is-within-interactive-element.d.ts +6 -0
- package/components/global/is-within-interactive-element.js +11 -0
- package/components/global/is-within-navigable-element.d.ts +6 -0
- package/components/global/is-within-navigable-element.js +11 -0
- package/components/global/parse-css-duration.d.ts +5 -0
- package/components/global/parse-css-duration.js +14 -0
- package/components/global/rerender-hoc.d.ts +4 -2
- package/components/global/rerender-hoc.js +11 -24
- package/components/global/schedule-with-cleanup.d.ts +12 -0
- package/components/global/schedule-with-cleanup.js +36 -0
- package/components/{table/selection.d.ts → global/table-selection.d.ts} +15 -15
- package/components/{table/selection.js → global/table-selection.js} +5 -5
- package/components/global/theme.d.ts +4 -3
- package/components/global/theme.js +1 -1
- package/components/global/variables.interface.d.ts +0 -4
- package/components/header/header-icon.js +3 -3
- package/components/header/header.js +3 -3
- package/components/header/links.js +1 -1
- package/components/header/logo.js +1 -2
- package/components/header/profile.js +5 -5
- package/components/header/services.js +3 -3
- package/components/header/smart-profile.js +3 -3
- package/components/header/smart-services.js +3 -3
- package/components/heading/heading.js +1 -1
- package/components/i18n/i18n-context.js +4 -4
- package/components/icon/icon-svg.js +1 -2
- package/components/icon/icon.d.ts +0 -1
- package/components/icon/icon.js +2 -6
- package/components/icon/index.js +1 -2
- package/components/input/input.d.ts +1 -1
- package/components/input/input.js +3 -3
- 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 +685 -0
- package/components/internal/virtualization.js +368 -0
- package/components/island/adaptive-island-hoc.js +3 -3
- package/components/island/content.d.ts +7 -2
- package/components/island/content.js +27 -18
- package/components/island/header.js +1 -1
- package/components/island/island.js +1 -1
- package/components/{table → legacy-table}/cell.js +1 -1
- package/components/{table → legacy-table}/header-cell.js +2 -3
- package/components/{table → legacy-table}/header.js +2 -3
- package/components/{table → legacy-table}/multitable.d.ts +1 -1
- package/components/{table → legacy-table}/row-with-focus-sensor.js +3 -3
- package/components/{table → legacy-table}/row.d.ts +1 -1
- package/components/{table → legacy-table}/row.js +5 -5
- package/components/legacy-table/selection-adapter.d.ts +6 -0
- package/components/{table → legacy-table}/selection-shortcuts-hoc.d.ts +5 -5
- package/components/{table → legacy-table}/simple-table.d.ts +2 -2
- package/components/{table → legacy-table}/simple-table.js +5 -5
- package/components/{table → legacy-table}/smart-table.d.ts +5 -5
- package/components/{table → legacy-table}/smart-table.js +6 -6
- package/components/legacy-table/table.d.ts +109 -0
- package/components/legacy-table/table.js +369 -0
- package/components/list/consts.d.ts +0 -1
- package/components/list/consts.js +0 -1
- package/components/list/list-item.js +3 -5
- package/components/list/list-users-groups-source.js +1 -2
- package/components/list/list.d.ts +0 -4
- package/components/list/list.js +1 -2
- package/components/login-dialog/login-dialog.js +3 -3
- package/components/login-dialog/service.js +2 -2
- package/components/message/message.js +1 -1
- package/components/pager/pager.js +3 -3
- package/components/popup/popup.js +1 -1
- package/components/popup/popup.target.d.ts +3 -2
- package/components/popup/popup.target.js +32 -28
- package/components/popup-menu/popup-menu.js +1 -1
- package/components/query-assist/query-assist-suggestions.js +1 -2
- package/components/query-assist/query-assist.d.ts +3 -1
- package/components/query-assist/query-assist.js +2 -2
- package/components/radio/radio-item.d.ts +3 -3
- package/components/radio/radio-item.js +33 -19
- package/components/radio/radio.d.ts +2 -2
- package/components/radio/radio.js +2 -2
- package/components/scrollable-section/scrollable-section.js +1 -1
- package/components/select/chevron-button.js +3 -3
- package/components/select/select-filter.js +3 -3
- package/components/select/select-popup.d.ts +3 -2
- package/components/select/select-popup.js +9 -4
- package/components/select/select.d.ts +6 -2
- package/components/select/select.js +5 -4
- package/components/selection-toolbar/selection-toolbar.d.ts +11 -0
- package/components/selection-toolbar/selection-toolbar.js +200 -0
- package/components/slider/slider.js +100 -97
- package/components/storage/storage-local.js +2 -2
- package/components/storage/storage.js +2 -2
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.d.ts +3 -3
- package/components/tab-trap/tab-trap.js +83 -80
- package/components/table/default-item-renderer.d.ts +55 -0
- package/components/table/default-item-renderer.js +240 -0
- 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 -0
- package/components/table/internal/virtualization.d.ts +41 -0
- package/components/table/item-virtualization.d.ts +37 -0
- package/components/table/item-virtualization.js +73 -0
- 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 +10 -0
- package/components/table/table-const.js +13 -0
- package/components/table/table-primitives.d.ts +64 -0
- package/components/table/table-primitives.js +180 -0
- package/components/table/table-props.d.ts +304 -0
- package/components/table/table-props.js +1 -0
- package/components/table/table.d.ts +231 -107
- package/components/table/table.js +351 -346
- package/components/tabs/collapsible-more.js +1 -1
- package/components/tabs/collapsible-tab.js +1 -1
- package/components/tabs/collapsible-tabs.js +1 -1
- package/components/tabs/dumb-tabs.js +1 -1
- package/components/tabs/smart-tabs.js +1 -1
- package/components/tabs/tab-link.js +1 -1
- package/components/tabs/tabs.js +1 -1
- package/components/tag/tag.js +1 -1
- package/components/tags-input/tags-input.d.ts +3 -1
- package/components/tags-input/tags-input.js +4 -4
- package/components/tags-list/tags-list.js +2 -2
- package/components/toggle/toggle.js +1 -1
- package/components/tooltip/tooltip.d.ts +2 -1
- package/components/tooltip/tooltip.js +5 -3
- package/components/upload/upload.d.ts +4 -3
- package/components/upload/upload.js +7 -30
- package/components/user-agreement/service.js +3 -3
- package/components/user-agreement/user-agreement.js +2 -2
- package/components/user-card/card.js +4 -4
- package/components/user-card/smart-user-card-tooltip.js +3 -3
- package/components/user-card/tooltip.js +3 -3
- package/components/user-card/user-card.js +5 -5
- package/components/util-stories.d.ts +26 -0
- package/package.json +8 -9
- package/components/__mocks__/old-browsers-message.js +0 -3
- package/components/_helpers/grid.js +0 -3
- package/components/_helpers/sidebar.js +0 -110
- package/components/content-layout/content-layout.d.ts +0 -20
- package/components/content-layout/content-layout.js +0 -50
- package/components/content-layout/sidebar.d.ts +0 -26
- package/components/content-layout/sidebar.js +0 -5
- package/components/date-picker/use-intersection-observer.d.ts +0 -6
- package/components/date-picker/use-intersection-observer.js +0 -93
- package/components/expand/collapsible-group.d.ts +0 -8
- package/components/expand/collapsible-group.js +0 -52
- package/components/global/composeRefs.d.ts +0 -6
- package/components/global/composeRefs.js +0 -9
- package/components/global/use-event-callback.d.ts +0 -4
- package/components/global/use-event-callback.js +0 -49
- package/components/grid/col.d.ts +0 -16
- package/components/grid/col.js +0 -63
- package/components/grid/grid.d.ts +0 -13
- package/components/grid/grid.js +0 -27
- package/components/grid/row.d.ts +0 -21
- package/components/grid/row.js +0 -72
- package/components/old-browsers-message/old-browsers-message-stop.d.ts +0 -1
- package/components/old-browsers-message/old-browsers-message-stop.js +0 -5
- package/components/old-browsers-message/old-browsers-message.d.ts +0 -5
- package/components/old-browsers-message/old-browsers-message.js +0 -89
- package/components/old-browsers-message/white-list.d.ts +0 -2
- package/components/old-browsers-message/white-list.js +0 -30
- package/components/table/selection-adapter.d.ts +0 -6
- /package/components/{table → legacy-table}/cell.d.ts +0 -0
- /package/components/{table → legacy-table}/disable-hover-hoc.d.ts +0 -0
- /package/components/{table → legacy-table}/disable-hover-hoc.js +0 -0
- /package/components/{table → legacy-table}/header-cell.d.ts +0 -0
- /package/components/{table → legacy-table}/header.d.ts +0 -0
- /package/components/{table → legacy-table}/multitable.js +0 -0
- /package/components/{table → legacy-table}/row-with-focus-sensor.d.ts +0 -0
- /package/components/{table → legacy-table}/selection-adapter.js +0 -0
- /package/components/{table → legacy-table}/selection-shortcuts-hoc.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c } from 'react
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import getUID from '../global/get-uid.js';
|
|
4
4
|
import { Size } from './avatar-size.js';
|
|
@@ -15,15 +15,6 @@ const SizesSquare = {
|
|
|
15
15
|
fontSize: '8px',
|
|
16
16
|
textAnchor: 'middle'
|
|
17
17
|
},
|
|
18
|
-
[Size.Size18]: {
|
|
19
|
-
radius: 4,
|
|
20
|
-
text: {
|
|
21
|
-
x: 9,
|
|
22
|
-
y: 13
|
|
23
|
-
},
|
|
24
|
-
fontSize: '11px',
|
|
25
|
-
textAnchor: 'middle'
|
|
26
|
-
},
|
|
27
18
|
[Size.Size20]: {
|
|
28
19
|
radius: 4,
|
|
29
20
|
text: {
|
|
@@ -96,21 +87,6 @@ const SizesSquare = {
|
|
|
96
87
|
height: 2.5
|
|
97
88
|
}
|
|
98
89
|
},
|
|
99
|
-
[Size.Size48]: {
|
|
100
|
-
radius: 4,
|
|
101
|
-
text: {
|
|
102
|
-
x: 3,
|
|
103
|
-
y: 21
|
|
104
|
-
},
|
|
105
|
-
fontSize: '19px',
|
|
106
|
-
letterSpacing: 1,
|
|
107
|
-
underscore: {
|
|
108
|
-
x: 5,
|
|
109
|
-
y: 32,
|
|
110
|
-
width: 15,
|
|
111
|
-
height: 2.5
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
90
|
[Size.Size56]: {
|
|
115
91
|
radius: 4,
|
|
116
92
|
text: {
|
|
@@ -138,16 +114,6 @@ const SizesRound = {
|
|
|
138
114
|
textAnchor: 'middle',
|
|
139
115
|
dominantBaseline: 'middle'
|
|
140
116
|
},
|
|
141
|
-
[Size.Size18]: {
|
|
142
|
-
radius: 4,
|
|
143
|
-
fontSize: '11px',
|
|
144
|
-
text: {
|
|
145
|
-
x: '50%',
|
|
146
|
-
y: '54%'
|
|
147
|
-
},
|
|
148
|
-
textAnchor: 'middle',
|
|
149
|
-
dominantBaseline: 'middle'
|
|
150
|
-
},
|
|
151
117
|
[Size.Size20]: {
|
|
152
118
|
radius: 4,
|
|
153
119
|
fontSize: '9px',
|
|
@@ -200,17 +166,6 @@ const SizesRound = {
|
|
|
200
166
|
textAnchor: 'middle',
|
|
201
167
|
dominantBaseline: 'middle'
|
|
202
168
|
},
|
|
203
|
-
[Size.Size48]: {
|
|
204
|
-
radius: 4,
|
|
205
|
-
fontSize: '19px',
|
|
206
|
-
letterSpacing: 1,
|
|
207
|
-
text: {
|
|
208
|
-
x: '50%',
|
|
209
|
-
y: '54%'
|
|
210
|
-
},
|
|
211
|
-
textAnchor: 'middle',
|
|
212
|
-
dominantBaseline: 'middle'
|
|
213
|
-
},
|
|
214
169
|
[Size.Size56]: {
|
|
215
170
|
radius: 4,
|
|
216
171
|
fontSize: '26px',
|
|
@@ -247,11 +202,11 @@ function hashCode(s) {
|
|
|
247
202
|
}
|
|
248
203
|
function FallbackAvatar(t0) {
|
|
249
204
|
const $ = c(38);
|
|
250
|
-
if ($[0] !== "
|
|
205
|
+
if ($[0] !== "1a4ecd5a43a79807aefab02d5c9ac8b224f24139f867e5804d91fecdd9285808") {
|
|
251
206
|
for (let $i = 0; $i < 38; $i += 1) {
|
|
252
207
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
253
208
|
}
|
|
254
|
-
$[0] = "
|
|
209
|
+
$[0] = "1a4ecd5a43a79807aefab02d5c9ac8b224f24139f867e5804d91fecdd9285808";
|
|
255
210
|
}
|
|
256
211
|
const {
|
|
257
212
|
username,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c } from 'react
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import { useState, Children } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import DropdownMenu from '../dropdown-menu/dropdown-menu.js';
|
|
@@ -32,7 +32,6 @@ import '@jetbrains/icons/remove-12px';
|
|
|
32
32
|
import '../icon/icon.js';
|
|
33
33
|
import '../icon/icon.constants.js';
|
|
34
34
|
import '../_helpers/icon-svg.js';
|
|
35
|
-
import '../global/configuration.js';
|
|
36
35
|
import '../global/compose-refs.js';
|
|
37
36
|
import '../control-help/control-help.js';
|
|
38
37
|
import '../link/link.js';
|
|
@@ -55,6 +54,7 @@ import '../button/button.js';
|
|
|
55
54
|
import '@jetbrains/icons/chevron-down';
|
|
56
55
|
import '@jetbrains/icons/chevron-12px-down';
|
|
57
56
|
import '../global/controls-height.js';
|
|
57
|
+
import '../global/configuration.js';
|
|
58
58
|
import '../_helpers/button.classes.js';
|
|
59
59
|
import '../popup-menu/popup-menu.js';
|
|
60
60
|
import '../popup/popup.js';
|
|
@@ -70,11 +70,11 @@ var styles = {"avatarStack":"ring-avatar-stack-avatarStack","extraText":"ring-av
|
|
|
70
70
|
|
|
71
71
|
function AvatarStack(t0) {
|
|
72
72
|
const $ = c(28);
|
|
73
|
-
if ($[0] !== "
|
|
73
|
+
if ($[0] !== "f469d96d157850b6a22cfb2dd7b1d71f151ee90317dbfd199eb6713e97a9ce55") {
|
|
74
74
|
for (let $i = 0; $i < 28; $i += 1) {
|
|
75
75
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
76
76
|
}
|
|
77
|
-
$[0] = "
|
|
77
|
+
$[0] = "f469d96d157850b6a22cfb2dd7b1d71f151ee90317dbfd199eb6713e97a9ce55";
|
|
78
78
|
}
|
|
79
79
|
let children;
|
|
80
80
|
let className;
|
|
@@ -108,7 +108,7 @@ function AvatarStack(t0) {
|
|
|
108
108
|
}
|
|
109
109
|
const size = t1 === undefined ? Size.Size20 : t1;
|
|
110
110
|
const [dropdownOpen, setDropdownOpen] = useState(false);
|
|
111
|
-
const sizeClass = size !== Size.Size16
|
|
111
|
+
const sizeClass = size !== Size.Size16 ? styles[`size${size}`] : undefined;
|
|
112
112
|
let t2;
|
|
113
113
|
if ($[8] !== className || $[9] !== dropdownOpen || $[10] !== sizeClass) {
|
|
114
114
|
t2 = classNames(styles.avatarStack, className, sizeClass, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c } from 'react
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import infoIcon from '@jetbrains/icons/info-filled';
|
|
@@ -13,7 +13,6 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
13
13
|
import 'util-deprecate';
|
|
14
14
|
import '../icon/icon.constants.js';
|
|
15
15
|
import '../_helpers/icon-svg.js';
|
|
16
|
-
import '../global/configuration.js';
|
|
17
16
|
import '../global/memoize.js';
|
|
18
17
|
import '../global/data-tests.js';
|
|
19
18
|
import '../link/clickable-link.js';
|
|
@@ -30,6 +29,7 @@ import 'combokeys';
|
|
|
30
29
|
import '../global/sniffer.js';
|
|
31
30
|
import 'sniffr';
|
|
32
31
|
import '../tab-trap/tab-trap.js';
|
|
32
|
+
import '../global/configuration.js';
|
|
33
33
|
import '../popup/position.js';
|
|
34
34
|
import '../popup/popup.consts.js';
|
|
35
35
|
import '../popup/popup.target.js';
|
|
@@ -15,10 +15,6 @@ export interface ButtonBaseProps {
|
|
|
15
15
|
secondary?: boolean | null | undefined;
|
|
16
16
|
ghost?: boolean | null | undefined;
|
|
17
17
|
short?: boolean | null | undefined;
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated Use inline instead
|
|
20
|
-
*/
|
|
21
|
-
text?: boolean | null | undefined;
|
|
22
18
|
inline?: boolean | null | undefined;
|
|
23
19
|
dropdown?: boolean | null | undefined;
|
|
24
20
|
disabled?: boolean | undefined;
|
|
@@ -2,19 +2,18 @@ import { PureComponent, createRef } from 'react';
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import chevronDownIcon from '@jetbrains/icons/chevron-down';
|
|
4
4
|
import chevron12pxDown from '@jetbrains/icons/chevron-12px-down';
|
|
5
|
-
import deprecate from 'util-deprecate';
|
|
6
5
|
import Icon from '../icon/icon.js';
|
|
7
6
|
import ClickableLink from '../link/clickable-link.js';
|
|
8
7
|
import { ControlsHeightContext } from '../global/controls-height.js';
|
|
9
8
|
import { g as getButtonClasses, s as styles } from '../_helpers/button.classes.js';
|
|
10
9
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
11
10
|
import { Size } from '../icon/icon.constants.js';
|
|
11
|
+
import 'util-deprecate';
|
|
12
12
|
import '../_helpers/icon-svg.js';
|
|
13
|
-
import 'react
|
|
14
|
-
import '../global/configuration.js';
|
|
13
|
+
import 'react/compiler-runtime';
|
|
15
14
|
import '../global/memoize.js';
|
|
15
|
+
import '../global/configuration.js';
|
|
16
16
|
|
|
17
|
-
const warnText = deprecate(() => {}, 'Button: "text" prop is deprecated and will be removed in 8.0. Use inline instead.');
|
|
18
17
|
function removeLinkProps(props) {
|
|
19
18
|
const {
|
|
20
19
|
download,
|
|
@@ -46,7 +45,6 @@ class Button extends PureComponent {
|
|
|
46
45
|
static contextType = ControlsHeightContext;
|
|
47
46
|
buttonRef = /*#__PURE__*/createRef();
|
|
48
47
|
render() {
|
|
49
|
-
var _ref;
|
|
50
48
|
const {
|
|
51
49
|
// Modifiers
|
|
52
50
|
active,
|
|
@@ -59,7 +57,6 @@ class Button extends PureComponent {
|
|
|
59
57
|
secondary,
|
|
60
58
|
ghost,
|
|
61
59
|
short,
|
|
62
|
-
text,
|
|
63
60
|
dropdown,
|
|
64
61
|
height,
|
|
65
62
|
// Props
|
|
@@ -75,10 +72,7 @@ class Button extends PureComponent {
|
|
|
75
72
|
disabled,
|
|
76
73
|
...props
|
|
77
74
|
} = this.props;
|
|
78
|
-
const isInline =
|
|
79
|
-
if (text) {
|
|
80
|
-
warnText();
|
|
81
|
-
}
|
|
75
|
+
const isInline = inline !== null && inline !== void 0 ? inline : !!icon;
|
|
82
76
|
const classes = getButtonClasses({
|
|
83
77
|
...this.props,
|
|
84
78
|
inline: isInline,
|
|
@@ -6,7 +6,7 @@ import ControlHelp from '../control-help/control-help.js';
|
|
|
6
6
|
import { s as styles } from '../_helpers/caption.js';
|
|
7
7
|
export { C as Caption } from '../_helpers/caption.js';
|
|
8
8
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
9
|
-
import 'react
|
|
9
|
+
import 'react/compiler-runtime';
|
|
10
10
|
|
|
11
11
|
function allChildrenDisabled(children) {
|
|
12
12
|
if (!children || typeof children !== 'object') return false;
|
|
@@ -3,7 +3,7 @@ import classNames from 'classnames';
|
|
|
3
3
|
import joinDataTestAttributes from '../global/data-tests.js';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
var styles = {"
|
|
6
|
+
var styles = {"button":"ring-button-button","buttonToolbar":"ring-button-toolbar-buttonToolbar","buttonGroup":"ring-button-toolbar-buttonGroup","split":"ring-button-toolbar-split"};
|
|
7
7
|
|
|
8
8
|
class ButtonToolbar extends PureComponent {
|
|
9
9
|
render() {
|
|
@@ -24,6 +24,6 @@ export default class Checkbox extends PureComponent<CheckboxProps> {
|
|
|
24
24
|
componentDidUpdate(prevProps: CheckboxProps): void;
|
|
25
25
|
input?: HTMLInputElement | null;
|
|
26
26
|
inputRef: (el: HTMLInputElement | null) => void;
|
|
27
|
-
composedInputRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement> | undefined)[]) => (value: T | null) => void>;
|
|
27
|
+
composedInputRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement> | undefined)[]) => (value: T | null) => () => void>;
|
|
28
28
|
render(): import("react").JSX.Element;
|
|
29
29
|
}
|
|
@@ -10,8 +10,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
10
10
|
import 'util-deprecate';
|
|
11
11
|
import '../icon/icon.constants.js';
|
|
12
12
|
import '../_helpers/icon-svg.js';
|
|
13
|
-
import 'react
|
|
14
|
-
import '../global/configuration.js';
|
|
13
|
+
import 'react/compiler-runtime';
|
|
15
14
|
import '../global/memoize.js';
|
|
16
15
|
import 'memoize-one';
|
|
17
16
|
|
|
@@ -14,8 +14,7 @@ import '../icon/icon.js';
|
|
|
14
14
|
import 'util-deprecate';
|
|
15
15
|
import '../icon/icon.constants.js';
|
|
16
16
|
import '../_helpers/icon-svg.js';
|
|
17
|
-
import 'react
|
|
18
|
-
import '../global/configuration.js';
|
|
17
|
+
import 'react/compiler-runtime';
|
|
19
18
|
import '../global/memoize.js';
|
|
20
19
|
import 'react/jsx-runtime';
|
|
21
20
|
import '../loader-inline/loader-inline.js';
|
|
@@ -26,6 +25,7 @@ import '@jetbrains/icons/chevron-down';
|
|
|
26
25
|
import '@jetbrains/icons/chevron-12px-down';
|
|
27
26
|
import '../link/clickable-link.js';
|
|
28
27
|
import '../global/controls-height.js';
|
|
28
|
+
import '../global/configuration.js';
|
|
29
29
|
import '../_helpers/button.classes.js';
|
|
30
30
|
import '../_helpers/theme.js';
|
|
31
31
|
import '../alert/alert-heading.js';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { c } from 'react
|
|
2
|
-
import
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
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';
|
|
@@ -10,30 +11,22 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
10
11
|
|
|
11
12
|
var styles = {"container":"ring-collapse-container","transition":"ring-collapse-transition","summary":"ring-collapse-summary","trigger":"ring-collapse-trigger","fade":"ring-collapse-fade"};
|
|
12
13
|
|
|
13
|
-
const DURATION_FACTOR = 0.5;
|
|
14
14
|
const DEFAULT_HEIGHT = 0;
|
|
15
15
|
const VISIBLE = 1;
|
|
16
16
|
const HIDDEN = 0;
|
|
17
17
|
// margin for the hide fallback timer, so it fires only if transitionend never did
|
|
18
18
|
const HIDE_FALLBACK_EXTRA_DELAY = 100;
|
|
19
|
-
// React 18 renders unknown attributes from strings only, while React 19 treats `inert`
|
|
20
|
-
// as a real boolean and removes the attribute when it gets ''
|
|
21
|
-
// TODO drop the React 18 branch in develop-8.0 — Ring UI 8.0 supports React 19 only
|
|
22
|
-
const REACT_MAJOR_WITH_INERT_SUPPORT = 19;
|
|
23
|
-
const getInertAttributeValue = reactMajor => reactMajor >= REACT_MAJOR_WITH_INERT_SUPPORT ? true : '';
|
|
24
|
-
// the cast is confined to the JSX assignment: React 18 actually receives the string form
|
|
25
|
-
const INERT = getInertAttributeValue(Number(React__default.version.split('.')[0]));
|
|
26
19
|
const isFullyCollapsed = (collapsed, initialContentHeight) => collapsed && initialContentHeight <= DEFAULT_HEIGHT;
|
|
27
20
|
/**
|
|
28
21
|
* @name CollapseContent
|
|
29
22
|
*/
|
|
30
23
|
const CollapseContent = t0 => {
|
|
31
24
|
const $ = c(33);
|
|
32
|
-
if ($[0] !== "
|
|
25
|
+
if ($[0] !== "e3da703013c1e2308afa08a0649f729dead9cb8e25336ece00ca1a0416bee9c3") {
|
|
33
26
|
for (let $i = 0; $i < 33; $i += 1) {
|
|
34
27
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
35
28
|
}
|
|
36
|
-
$[0] = "
|
|
29
|
+
$[0] = "e3da703013c1e2308afa08a0649f729dead9cb8e25336ece00ca1a0416bee9c3";
|
|
37
30
|
}
|
|
38
31
|
const {
|
|
39
32
|
children,
|
|
@@ -45,9 +38,10 @@ const CollapseContent = t0 => {
|
|
|
45
38
|
collapsed,
|
|
46
39
|
duration,
|
|
47
40
|
id,
|
|
41
|
+
animate,
|
|
48
42
|
disableAnimation,
|
|
49
43
|
keepMounted
|
|
50
|
-
} =
|
|
44
|
+
} = use(CollapseContext);
|
|
51
45
|
const containerRef = useRef(null);
|
|
52
46
|
const contentRef = useRef(null);
|
|
53
47
|
const [initialContentHeight] = useState(minHeight);
|
|
@@ -79,7 +73,7 @@ const CollapseContent = t0 => {
|
|
|
79
73
|
}
|
|
80
74
|
};
|
|
81
75
|
container?.addEventListener("transitionend", onTransitionEnd);
|
|
82
|
-
const cssDuration =
|
|
76
|
+
const cssDuration = parseCssDuration(container?.style.getPropertyValue("--duration") || "");
|
|
83
77
|
const fallbackTimeout = window.setTimeout(finalizeCollapse, cssDuration + HIDE_FALLBACK_EXTRA_DELAY);
|
|
84
78
|
return () => {
|
|
85
79
|
container?.removeEventListener("transitionend", onTransitionEnd);
|
|
@@ -121,8 +115,7 @@ const CollapseContent = t0 => {
|
|
|
121
115
|
t6 = $[8];
|
|
122
116
|
}
|
|
123
117
|
useEffect(t5, t6);
|
|
124
|
-
const
|
|
125
|
-
const t7 = `${calculatedDuration}ms`;
|
|
118
|
+
const t7 = `${duration}ms`;
|
|
126
119
|
const t8 = collapsed && !minHeight ? HIDDEN : VISIBLE;
|
|
127
120
|
let t9;
|
|
128
121
|
if ($[9] !== height || $[10] !== t7 || $[11] !== t8) {
|
|
@@ -151,7 +144,7 @@ const CollapseContent = t0 => {
|
|
|
151
144
|
} else {
|
|
152
145
|
t11 = $[13];
|
|
153
146
|
}
|
|
154
|
-
const t12 = !disableAnimation;
|
|
147
|
+
const t12 = animate && !disableAnimation;
|
|
155
148
|
let t13;
|
|
156
149
|
if ($[14] !== t12) {
|
|
157
150
|
t13 = classNames(styles.container, {
|
|
@@ -180,55 +173,54 @@ const CollapseContent = t0 => {
|
|
|
180
173
|
} else {
|
|
181
174
|
t15 = $[19];
|
|
182
175
|
}
|
|
183
|
-
const t16 =
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
t18 = /*#__PURE__*/jsx("div", {
|
|
176
|
+
const t16 = keepMounted || contentVisible ? children : null;
|
|
177
|
+
let t17;
|
|
178
|
+
if ($[20] !== contentInert || $[21] !== t14 || $[22] !== t15 || $[23] !== t16) {
|
|
179
|
+
t17 = /*#__PURE__*/jsx("div", {
|
|
188
180
|
ref: contentRef,
|
|
189
181
|
"data-test": t14,
|
|
190
182
|
style: t15,
|
|
191
|
-
inert:
|
|
192
|
-
children:
|
|
183
|
+
inert: contentInert,
|
|
184
|
+
children: t16
|
|
193
185
|
});
|
|
194
|
-
$[20] =
|
|
195
|
-
$[21] =
|
|
196
|
-
$[22] =
|
|
197
|
-
$[23] =
|
|
198
|
-
$[24] =
|
|
186
|
+
$[20] = contentInert;
|
|
187
|
+
$[21] = t14;
|
|
188
|
+
$[22] = t15;
|
|
189
|
+
$[23] = t16;
|
|
190
|
+
$[24] = t17;
|
|
199
191
|
} else {
|
|
200
|
-
|
|
192
|
+
t17 = $[24];
|
|
201
193
|
}
|
|
202
|
-
let
|
|
194
|
+
let t18;
|
|
203
195
|
if ($[25] !== fadeShouldBeVisible) {
|
|
204
|
-
|
|
196
|
+
t18 = fadeShouldBeVisible && /*#__PURE__*/jsx("div", {
|
|
205
197
|
className: styles.fade
|
|
206
198
|
});
|
|
207
199
|
$[25] = fadeShouldBeVisible;
|
|
208
|
-
$[26] =
|
|
200
|
+
$[26] = t18;
|
|
209
201
|
} else {
|
|
210
|
-
|
|
202
|
+
t18 = $[26];
|
|
211
203
|
}
|
|
212
|
-
let
|
|
213
|
-
if ($[27] !== style || $[28] !== t10 || $[29] !== t13 || $[30] !==
|
|
214
|
-
|
|
204
|
+
let t19;
|
|
205
|
+
if ($[27] !== style || $[28] !== t10 || $[29] !== t13 || $[30] !== t17 || $[31] !== t18) {
|
|
206
|
+
t19 = /*#__PURE__*/jsxs("div", {
|
|
215
207
|
ref: containerRef,
|
|
216
208
|
id: t10,
|
|
217
209
|
"data-test": t11,
|
|
218
210
|
className: t13,
|
|
219
211
|
style: style,
|
|
220
|
-
children: [
|
|
212
|
+
children: [t17, t18]
|
|
221
213
|
});
|
|
222
214
|
$[27] = style;
|
|
223
215
|
$[28] = t10;
|
|
224
216
|
$[29] = t13;
|
|
225
|
-
$[30] =
|
|
226
|
-
$[31] =
|
|
227
|
-
$[32] =
|
|
217
|
+
$[30] = t17;
|
|
218
|
+
$[31] = t18;
|
|
219
|
+
$[32] = t19;
|
|
228
220
|
} else {
|
|
229
|
-
|
|
221
|
+
t19 = $[32];
|
|
230
222
|
}
|
|
231
|
-
return
|
|
223
|
+
return t19;
|
|
232
224
|
};
|
|
233
225
|
|
|
234
226
|
export { CollapseContent, CollapseContent as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c } from 'react
|
|
2
|
-
import {
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
import { use, cloneElement } from 'react';
|
|
3
3
|
import joinDataTestAttributes from '../global/data-tests.js';
|
|
4
4
|
import { CollapseContext } from './collapse-context.js';
|
|
5
5
|
import { COLLAPSE_CONTROL_TEST_ID } from './consts.js';
|
|
@@ -7,11 +7,11 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
7
7
|
|
|
8
8
|
const CollapseControl = t0 => {
|
|
9
9
|
const $ = c(13);
|
|
10
|
-
if ($[0] !== "
|
|
10
|
+
if ($[0] !== "10418ecc7774e31a4915bc1ad8a8ad001213057f5df8fc3f9a59adab69451dd6") {
|
|
11
11
|
for (let $i = 0; $i < 13; $i += 1) {
|
|
12
12
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
13
13
|
}
|
|
14
|
-
$[0] = "
|
|
14
|
+
$[0] = "10418ecc7774e31a4915bc1ad8a8ad001213057f5df8fc3f9a59adab69451dd6";
|
|
15
15
|
}
|
|
16
16
|
const {
|
|
17
17
|
children,
|
|
@@ -21,7 +21,7 @@ const CollapseControl = t0 => {
|
|
|
21
21
|
setCollapsed,
|
|
22
22
|
collapsed,
|
|
23
23
|
id
|
|
24
|
-
} =
|
|
24
|
+
} = use(CollapseContext);
|
|
25
25
|
let t1;
|
|
26
26
|
let t2;
|
|
27
27
|
if ($[1] !== children || $[2] !== collapsed || $[3] !== dataTest || $[4] !== id || $[5] !== setCollapsed) {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { c } from 'react
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import { useState, useId } 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';
|
|
6
6
|
|
|
7
7
|
const Collapse = t0 => {
|
|
8
|
-
const $ = c(
|
|
9
|
-
if ($[0] !== "
|
|
10
|
-
for (let $i = 0; $i <
|
|
8
|
+
const $ = c(18);
|
|
9
|
+
if ($[0] !== "dd05ee204290a7a80b9dd7bc0906391032441237b921ff3f0a33117d0cb388ac") {
|
|
10
|
+
for (let $i = 0; $i < 18; $i += 1) {
|
|
11
11
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
12
12
|
}
|
|
13
|
-
$[0] = "
|
|
13
|
+
$[0] = "dd05ee204290a7a80b9dd7bc0906391032441237b921ff3f0a33117d0cb388ac";
|
|
14
14
|
}
|
|
15
15
|
const {
|
|
16
16
|
children,
|
|
@@ -32,9 +32,16 @@ const Collapse = t0 => {
|
|
|
32
32
|
const [innerCollapsed, setInnerCollapsed] = useState(defaultCollapsed);
|
|
33
33
|
const id = useId();
|
|
34
34
|
const finalCollapsedValue = collapsed !== null && collapsed !== void 0 ? collapsed : innerCollapsed;
|
|
35
|
+
const [previousCollapsedValue, setPreviousCollapsedValue] = useState(finalCollapsedValue);
|
|
36
|
+
const [animate, setAnimate] = useState(false);
|
|
37
|
+
if (previousCollapsedValue !== finalCollapsedValue) {
|
|
38
|
+
setPreviousCollapsedValue(finalCollapsedValue);
|
|
39
|
+
setAnimate(true);
|
|
40
|
+
}
|
|
35
41
|
let t8;
|
|
36
42
|
if ($[1] !== finalCollapsedValue || $[2] !== onChange) {
|
|
37
43
|
t8 = () => {
|
|
44
|
+
setAnimate(true);
|
|
38
45
|
setInnerCollapsed(!finalCollapsedValue);
|
|
39
46
|
onChange(!finalCollapsedValue);
|
|
40
47
|
};
|
|
@@ -46,48 +53,50 @@ const Collapse = t0 => {
|
|
|
46
53
|
}
|
|
47
54
|
const setCollapsed = t8;
|
|
48
55
|
let t9;
|
|
49
|
-
if ($[4] !==
|
|
56
|
+
if ($[4] !== animate || $[5] !== disableAnimation || $[6] !== duration || $[7] !== finalCollapsedValue || $[8] !== id || $[9] !== keepMounted || $[10] !== setCollapsed) {
|
|
50
57
|
t9 = {
|
|
51
58
|
collapsed: finalCollapsedValue,
|
|
52
59
|
setCollapsed,
|
|
53
60
|
duration,
|
|
61
|
+
animate,
|
|
54
62
|
disableAnimation,
|
|
55
63
|
keepMounted,
|
|
56
64
|
id
|
|
57
65
|
};
|
|
58
|
-
$[4] =
|
|
59
|
-
$[5] =
|
|
60
|
-
$[6] =
|
|
61
|
-
$[7] =
|
|
62
|
-
$[8] =
|
|
63
|
-
$[9] =
|
|
64
|
-
$[10] =
|
|
66
|
+
$[4] = animate;
|
|
67
|
+
$[5] = disableAnimation;
|
|
68
|
+
$[6] = duration;
|
|
69
|
+
$[7] = finalCollapsedValue;
|
|
70
|
+
$[8] = id;
|
|
71
|
+
$[9] = keepMounted;
|
|
72
|
+
$[10] = setCollapsed;
|
|
73
|
+
$[11] = t9;
|
|
65
74
|
} else {
|
|
66
|
-
t9 = $[
|
|
75
|
+
t9 = $[11];
|
|
67
76
|
}
|
|
68
77
|
let t10;
|
|
69
|
-
if ($[
|
|
70
|
-
t10 = /*#__PURE__*/jsx(CollapseContext
|
|
78
|
+
if ($[12] !== children || $[13] !== t9) {
|
|
79
|
+
t10 = /*#__PURE__*/jsx(CollapseContext, {
|
|
71
80
|
value: t9,
|
|
72
81
|
children: children
|
|
73
82
|
});
|
|
74
|
-
$[
|
|
75
|
-
$[
|
|
76
|
-
$[
|
|
83
|
+
$[12] = children;
|
|
84
|
+
$[13] = t9;
|
|
85
|
+
$[14] = t10;
|
|
77
86
|
} else {
|
|
78
|
-
t10 = $[
|
|
87
|
+
t10 = $[14];
|
|
79
88
|
}
|
|
80
89
|
let t11;
|
|
81
|
-
if ($[
|
|
90
|
+
if ($[15] !== className || $[16] !== t10) {
|
|
82
91
|
t11 = /*#__PURE__*/jsx("div", {
|
|
83
92
|
className: className,
|
|
84
93
|
children: t10
|
|
85
94
|
});
|
|
86
|
-
$[
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
95
|
+
$[15] = className;
|
|
96
|
+
$[16] = t10;
|
|
97
|
+
$[17] = t11;
|
|
89
98
|
} else {
|
|
90
|
-
t11 = $[
|
|
99
|
+
t11 = $[17];
|
|
91
100
|
}
|
|
92
101
|
return t11;
|
|
93
102
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface CollapsibleGroupProps {
|
|
3
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
3
4
|
avatar?: React.ReactNode;
|
|
4
5
|
title: React.ReactNode;
|
|
5
6
|
subtitle?: React.ReactNode;
|
|
@@ -25,5 +26,8 @@ export interface CollapsibleGroupProps {
|
|
|
25
26
|
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
26
27
|
'data-test'?: string | null | undefined;
|
|
27
28
|
}
|
|
28
|
-
declare const CollapsibleGroup:
|
|
29
|
+
declare const CollapsibleGroup: {
|
|
30
|
+
({ ref, avatar, title, subtitle, children, className, defaultExpanded, expanded, onChange, disableAnimation, interactive, keepMounted, headingLevel, "data-test": dataTest, }: CollapsibleGroupProps): React.JSX.Element;
|
|
31
|
+
displayName: string;
|
|
32
|
+
};
|
|
29
33
|
export default CollapsibleGroup;
|