@jetbrains/ring-ui-built 7.0.72 → 7.0.73
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 +55 -13
- package/components/_helpers/avatar-info.js +44 -11
- package/components/_helpers/caption.js +2 -2
- package/components/_helpers/card.js +21 -21
- package/components/_helpers/icon-svg.js +75 -17
- package/components/_helpers/input.js +13 -13
- package/components/_helpers/query-assist-suggestions.js +5 -5
- package/components/_helpers/select-filter.js +5 -5
- package/components/_helpers/services-link.js +5 -5
- package/components/_helpers/sidebar.js +6 -6
- package/components/_helpers/tab-link.js +69 -17
- package/components/_helpers/theme.js +231 -54
- package/components/_helpers/title.js +5 -5
- package/components/alert/alert.d.ts +1 -1
- package/components/alert/alert.js +12 -10
- package/components/alert/container.js +4 -4
- package/components/alert-service/alert-service.d.ts +1 -1
- package/components/alert-service/alert-service.js +5 -4
- package/components/auth/auth-core.js +8 -8
- package/components/auth/auth.js +3 -2
- package/components/auth/down-notification.js +61 -17
- package/components/auth/iframe-flow.js +7 -6
- package/components/auth/storage.js +3 -2
- package/components/auth/token-validator.js +1 -1
- package/components/auth/window-flow.js +2 -2
- package/components/auth-dialog/auth-dialog.d.ts +1 -1
- package/components/auth-dialog/auth-dialog.js +15 -14
- package/components/auth-dialog-service/auth-dialog-service.js +4 -6
- package/components/avatar/avatar-info.d.ts +1 -1
- package/components/avatar/avatar-info.js +3 -2
- package/components/avatar/avatar.d.ts +1 -1
- package/components/avatar/avatar.js +16 -15
- package/components/avatar/fallback-avatar.d.ts +1 -1
- package/components/avatar/fallback-avatar.js +183 -59
- package/components/avatar-stack/avatar-stack.d.ts +1 -1
- package/components/avatar-stack/avatar-stack.js +115 -29
- package/components/banner/banner.d.ts +1 -1
- package/components/banner/banner.js +11 -10
- package/components/breadcrumbs/breadcrumbs.d.ts +1 -1
- package/components/breadcrumbs/breadcrumbs.js +3 -2
- package/components/button/button.d.ts +1 -1
- package/components/button/button.js +11 -10
- package/components/button-group/button-group.d.ts +1 -1
- package/components/button-group/button-group.js +6 -8
- package/components/button-group/caption.d.ts +1 -1
- package/components/button-group/caption.js +1 -1
- package/components/button-set/button-set.d.ts +1 -1
- package/components/button-set/button-set.js +2 -5
- package/components/button-toolbar/button-toolbar.d.ts +1 -1
- package/components/button-toolbar/button-toolbar.js +2 -5
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/checkbox/checkbox.js +12 -17
- package/components/clipboard/clipboard.js +2 -1
- package/components/code/code.d.ts +1 -1
- package/components/code/code.js +5 -5
- package/components/collapse/collapse-content.js +161 -77
- package/components/collapse/collapse-control.js +69 -22
- package/components/collapse/collapse.js +83 -31
- package/components/confirm/confirm.d.ts +1 -1
- package/components/confirm/confirm.js +11 -13
- package/components/confirm-service/confirm-service.js +4 -3
- package/components/content-layout/content-layout.d.ts +1 -1
- package/components/content-layout/content-layout.js +4 -7
- package/components/content-layout/sidebar.d.ts +1 -1
- package/components/content-layout/sidebar.js +1 -1
- package/components/contenteditable/contenteditable.d.ts +2 -2
- package/components/contenteditable/contenteditable.js +50 -14
- package/components/control-help/control-help.d.ts +1 -1
- package/components/control-help/control-help.js +45 -9
- package/components/control-label/control-label.js +62 -13
- package/components/data-list/data-list.d.ts +1 -1
- package/components/data-list/data-list.js +10 -9
- package/components/data-list/data-list.mock.d.ts +1 -1
- package/components/data-list/data-list.mock.js +79 -78
- package/components/data-list/item.d.ts +2 -2
- package/components/data-list/item.js +18 -17
- package/components/data-list/title.d.ts +1 -1
- package/components/data-list/title.js +2 -1
- package/components/date-picker/consts.js +1 -1
- package/components/date-picker/date-input.d.ts +1 -1
- package/components/date-picker/date-input.js +4 -3
- package/components/date-picker/date-picker.d.ts +1 -1
- package/components/date-picker/date-picker.js +97 -31
- package/components/date-picker/date-popup.d.ts +1 -1
- package/components/date-picker/date-popup.js +11 -10
- package/components/date-picker/day.d.ts +1 -1
- package/components/date-picker/day.js +4 -3
- package/components/date-picker/month-names.d.ts +1 -1
- package/components/date-picker/month-names.js +98 -22
- package/components/date-picker/month-slider.d.ts +1 -1
- package/components/date-picker/month-slider.js +4 -4
- package/components/date-picker/month.d.ts +1 -1
- package/components/date-picker/month.js +79 -18
- package/components/date-picker/months.d.ts +1 -1
- package/components/date-picker/months.js +163 -53
- package/components/date-picker/weekdays.d.ts +1 -1
- package/components/date-picker/weekdays.js +56 -16
- package/components/date-picker/years.d.ts +1 -1
- package/components/date-picker/years.js +5 -5
- package/components/dialog/dialog.d.ts +1 -1
- package/components/dialog/dialog.js +21 -23
- package/components/dropdown/anchor.d.ts +1 -1
- package/components/dropdown/anchor.js +2 -1
- package/components/dropdown/dropdown.d.ts +1 -1
- package/components/dropdown/dropdown.js +7 -8
- package/components/dropdown-menu/dropdown-menu.js +299 -83
- package/components/editable-heading/editable-heading.d.ts +2 -2
- package/components/editable-heading/editable-heading.js +523 -174
- package/components/error-bubble/error-bubble.d.ts +1 -1
- package/components/error-bubble/error-bubble.js +7 -9
- package/components/error-message/error-message.d.ts +1 -1
- package/components/error-message/error-message.js +8 -10
- package/components/footer/footer.js +205 -61
- package/components/global/create-stateful-context.d.ts +1 -1
- package/components/global/create-stateful-context.js +73 -18
- package/components/global/focus-sensor-hoc.js +2 -2
- package/components/global/get-uid.js +1 -1
- package/components/global/react-dom-renderer.d.ts +1 -1
- package/components/global/react-dom-renderer.js +2 -2
- package/components/global/rerender-hoc.js +23 -6
- package/components/global/theme.js +3 -2
- package/components/global/use-event-callback.js +37 -13
- package/components/grid/col.d.ts +1 -1
- package/components/grid/col.js +3 -3
- package/components/grid/grid.d.ts +1 -1
- package/components/grid/grid.js +3 -6
- package/components/grid/row.d.ts +1 -1
- package/components/grid/row.js +3 -3
- package/components/group/group.d.ts +1 -1
- package/components/group/group.js +3 -6
- package/components/header/header-icon.d.ts +1 -1
- package/components/header/header-icon.js +3 -2
- package/components/header/header.d.ts +1 -1
- package/components/header/header.js +7 -12
- package/components/header/links.d.ts +1 -1
- package/components/header/links.js +45 -10
- package/components/header/logo.d.ts +1 -1
- package/components/header/logo.js +4 -3
- package/components/header/profile.js +17 -16
- package/components/header/services-link.d.ts +1 -1
- package/components/header/services-link.js +1 -1
- package/components/header/services.d.ts +1 -1
- package/components/header/services.js +35 -16
- package/components/header/smart-profile.d.ts +1 -1
- package/components/header/smart-profile.js +6 -5
- package/components/header/smart-services.d.ts +1 -1
- package/components/header/smart-services.js +3 -2
- package/components/header/tray.d.ts +1 -1
- package/components/header/tray.js +3 -3
- package/components/heading/heading.js +188 -44
- package/components/i18n/i18n-context.js +51 -13
- package/components/icon/icon-svg.d.ts +1 -1
- package/components/icon/icon-svg.js +2 -1
- package/components/icon/icon.d.ts +1 -1
- package/components/icon/icon.js +6 -5
- package/components/icon/index.js +2 -1
- package/components/input/input.d.ts +1 -1
- package/components/input/input.js +2 -1
- package/components/island/adaptive-island-hoc.js +4 -4
- package/components/island/content.d.ts +1 -1
- package/components/island/content.js +36 -17
- package/components/island/header.d.ts +1 -1
- package/components/island/header.js +32 -14
- package/components/island/island.d.ts +1 -1
- package/components/island/island.js +3 -5
- package/components/link/clickable-link.d.ts +1 -1
- package/components/link/clickable-link.js +2 -2
- package/components/link/link.js +4 -4
- package/components/list/list-custom.d.ts +1 -1
- package/components/list/list-custom.js +2 -2
- package/components/list/list-hint.d.ts +1 -1
- package/components/list/list-hint.js +3 -7
- package/components/list/list-item.d.ts +1 -1
- package/components/list/list-item.js +23 -26
- package/components/list/list-separator.d.ts +1 -1
- package/components/list/list-separator.js +3 -3
- package/components/list/list-title.d.ts +1 -1
- package/components/list/list-title.js +7 -7
- package/components/list/list-users-groups-source.js +6 -5
- package/components/list/list.d.ts +6 -6
- package/components/list/list.js +33 -31
- package/components/loader/loader.d.ts +1 -1
- package/components/loader/loader.js +8 -14
- package/components/loader-inline/loader-inline.d.ts +1 -1
- package/components/loader-inline/loader-inline.js +4 -7
- package/components/loader-screen/loader-screen.d.ts +1 -1
- package/components/loader-screen/loader-screen.js +3 -6
- package/components/login-dialog/login-dialog.d.ts +1 -1
- package/components/login-dialog/login-dialog.js +10 -9
- package/components/login-dialog/service.js +4 -3
- package/components/markdown/markdown.d.ts +1 -1
- package/components/markdown/markdown.js +3 -6
- package/components/message/message.d.ts +1 -1
- package/components/message/message.js +13 -15
- package/components/old-browsers-message/white-list.js +2 -2
- package/components/pager/pager.d.ts +5 -5
- package/components/pager/pager.js +28 -27
- package/components/panel/panel.d.ts +1 -1
- package/components/panel/panel.js +3 -6
- package/components/popup/popup.d.ts +2 -2
- package/components/popup/popup.js +14 -11
- package/components/popup/popup.target.js +68 -16
- package/components/popup-menu/popup-menu.d.ts +1 -1
- package/components/popup-menu/popup-menu.js +7 -9
- package/components/progress-bar/progress-bar.d.ts +1 -1
- package/components/progress-bar/progress-bar.js +4 -7
- package/components/query-assist/query-assist-suggestions.d.ts +1 -1
- package/components/query-assist/query-assist-suggestions.js +5 -4
- package/components/query-assist/query-assist.d.ts +2 -2
- package/components/query-assist/query-assist.js +37 -34
- package/components/radio/radio-item.d.ts +1 -1
- package/components/radio/radio-item.js +40 -20
- package/components/radio/radio.d.ts +1 -1
- package/components/radio/radio.js +3 -5
- package/components/scrollable-section/scrollable-section.d.ts +1 -1
- package/components/scrollable-section/scrollable-section.js +100 -38
- package/components/select/select-filter.d.ts +1 -1
- package/components/select/select-filter.js +5 -4
- package/components/select/select-popup.d.ts +7 -7
- package/components/select/select-popup.js +26 -25
- package/components/select/select.d.ts +3 -3
- package/components/select/select.js +52 -52
- package/components/shortcuts/shortcuts-hoc.js +3 -3
- package/components/slider/slider.js +591 -196
- package/components/storage/storage-local.js +2 -1
- package/components/storage/storage.js +2 -1
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +247 -102
- package/components/table/cell.d.ts +1 -1
- package/components/table/cell.js +2 -2
- package/components/table/disable-hover-hoc.js +3 -3
- package/components/table/header-cell.d.ts +1 -1
- package/components/table/header-cell.js +7 -6
- package/components/table/header.d.ts +2 -2
- package/components/table/header.js +14 -13
- package/components/table/multitable.d.ts +1 -1
- package/components/table/multitable.js +3 -3
- package/components/table/row-with-focus-sensor.d.ts +1 -1
- package/components/table/row-with-focus-sensor.js +3 -2
- package/components/table/row.d.ts +1 -1
- package/components/table/row.js +51 -24
- package/components/table/selection-shortcuts-hoc.js +2 -2
- package/components/table/simple-table.d.ts +1 -1
- package/components/table/simple-table.js +4 -3
- package/components/table/smart-table.d.ts +1 -1
- package/components/table/smart-table.js +4 -3
- package/components/table/table.d.ts +2 -2
- package/components/table/table.js +21 -23
- package/components/tabs/collapsible-more.d.ts +3 -3
- package/components/tabs/collapsible-more.js +253 -83
- package/components/tabs/collapsible-tab.d.ts +1 -1
- package/components/tabs/collapsible-tab.js +4 -3
- package/components/tabs/collapsible-tabs.d.ts +2 -2
- package/components/tabs/collapsible-tabs.js +450 -188
- package/components/tabs/dumb-tabs.d.ts +2 -2
- package/components/tabs/dumb-tabs.js +10 -9
- package/components/tabs/smart-tabs.d.ts +1 -1
- package/components/tabs/smart-tabs.js +6 -5
- package/components/tabs/tab-link.d.ts +1 -1
- package/components/tabs/tab-link.js +2 -1
- package/components/tabs/tab.d.ts +1 -1
- package/components/tabs/tab.js +2 -2
- package/components/tabs/tabs.js +5 -4
- package/components/tag/tag.d.ts +5 -5
- package/components/tag/tag.js +14 -13
- package/components/tags-input/tags-input.d.ts +1 -1
- package/components/tags-input/tags-input.js +10 -9
- package/components/tags-list/tags-list.d.ts +2 -2
- package/components/tags-list/tags-list.js +4 -3
- package/components/text/text.d.ts +1 -1
- package/components/text/text.js +2 -2
- package/components/toggle/toggle.d.ts +1 -1
- package/components/toggle/toggle.js +12 -11
- package/components/tooltip/tooltip.d.ts +1 -1
- package/components/tooltip/tooltip.js +7 -6
- package/components/upload/upload.js +10 -9
- package/components/user-agreement/service.js +11 -10
- package/components/user-agreement/user-agreement.d.ts +1 -1
- package/components/user-agreement/user-agreement.js +19 -18
- package/components/user-card/card.d.ts +1 -1
- package/components/user-card/card.js +3 -2
- package/components/user-card/smart-user-card-tooltip.d.ts +2 -2
- package/components/user-card/smart-user-card-tooltip.js +7 -6
- package/components/user-card/tooltip.d.ts +2 -2
- package/components/user-card/tooltip.js +7 -6
- package/components/user-card/user-card.js +4 -3
- package/package.json +3 -9
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
1
|
import { PureComponent } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import joinDataTestAttributes from '../global/data-tests.js';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
var styles = {"button":"ring-button-button","buttonSet":"ring-button-set-buttonSet"};
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* @name Button Set
|
|
10
|
-
*/
|
|
11
8
|
class ButtonSet extends PureComponent {
|
|
12
9
|
render() {
|
|
13
10
|
const {
|
|
@@ -17,7 +14,7 @@ class ButtonSet extends PureComponent {
|
|
|
17
14
|
...restProps
|
|
18
15
|
} = this.props;
|
|
19
16
|
const classes = classNames(styles.buttonSet, className);
|
|
20
|
-
return jsx("div", {
|
|
17
|
+
return /*#__PURE__*/jsx("div", {
|
|
21
18
|
...restProps,
|
|
22
19
|
"data-test": joinDataTestAttributes('ring-button-set', dataTest),
|
|
23
20
|
className: classes,
|
|
@@ -6,5 +6,5 @@ export interface ButtonToolbarProps extends HTMLAttributes<HTMLElement> {
|
|
|
6
6
|
* @name Button Toolbar
|
|
7
7
|
*/
|
|
8
8
|
export default class ButtonToolbar extends PureComponent<ButtonToolbarProps> {
|
|
9
|
-
render(): import("react
|
|
9
|
+
render(): import("react").JSX.Element;
|
|
10
10
|
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
1
|
import { PureComponent } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import joinDataTestAttributes from '../global/data-tests.js';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
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
|
-
/**
|
|
9
|
-
* @name Button Toolbar
|
|
10
|
-
*/
|
|
11
8
|
class ButtonToolbar extends PureComponent {
|
|
12
9
|
render() {
|
|
13
10
|
const {
|
|
@@ -16,7 +13,7 @@ class ButtonToolbar extends PureComponent {
|
|
|
16
13
|
...restProps
|
|
17
14
|
} = this.props;
|
|
18
15
|
const classes = classNames(styles.buttonToolbar, className);
|
|
19
|
-
return jsx("div", {
|
|
16
|
+
return /*#__PURE__*/jsx("div", {
|
|
20
17
|
...restProps,
|
|
21
18
|
"data-test": joinDataTestAttributes('ring-button-toolbar', dataTest),
|
|
22
19
|
className: classes
|
|
@@ -24,5 +24,5 @@ export default class Checkbox extends PureComponent<CheckboxProps> {
|
|
|
24
24
|
input?: HTMLInputElement | null;
|
|
25
25
|
inputRef: (el: HTMLInputElement | null) => void;
|
|
26
26
|
composedInputRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement> | undefined)[]) => (value: T | null) => void>;
|
|
27
|
-
render(): import("react
|
|
27
|
+
render(): import("react").JSX.Element;
|
|
28
28
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
1
|
import { PureComponent } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import checkmarkIcon from '@jetbrains/icons/checkmark-12px';
|
|
@@ -6,20 +5,16 @@ import minusIcon from '@jetbrains/icons/remove-12px';
|
|
|
6
5
|
import Icon from '../icon/icon.js';
|
|
7
6
|
import { createComposedRef } from '../global/compose-refs.js';
|
|
8
7
|
import ControlHelp from '../control-help/control-help.js';
|
|
8
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
9
9
|
import 'util-deprecate';
|
|
10
10
|
import '../icon/icon.constants.js';
|
|
11
11
|
import '../_helpers/icon-svg.js';
|
|
12
|
+
import 'react-compiler-runtime';
|
|
12
13
|
import '../global/memoize.js';
|
|
13
14
|
import 'memoize-one';
|
|
14
15
|
|
|
15
16
|
var styles = {"checkbox":"ring-checkbox-checkbox","cell":"ring-checkbox-cell","icon":"ring-checkbox-icon","check":"ring-checkbox-check ring-checkbox-icon","minus":"ring-checkbox-minus ring-checkbox-icon","input":"ring-checkbox-input","cellWrapper":"ring-checkbox-cellWrapper","focus":"ring-checkbox-focus","label":"ring-checkbox-label"};
|
|
16
17
|
|
|
17
|
-
/**
|
|
18
|
-
* @name Checkbox
|
|
19
|
-
*/
|
|
20
|
-
/**
|
|
21
|
-
* Displays a checkbox.
|
|
22
|
-
*/
|
|
23
18
|
class Checkbox extends PureComponent {
|
|
24
19
|
static defaultProps = {
|
|
25
20
|
indeterminate: false
|
|
@@ -63,31 +58,31 @@ class Checkbox extends PureComponent {
|
|
|
63
58
|
const containerClasses = classNames(styles.checkbox, containerClassName);
|
|
64
59
|
const cellClasses = classNames(styles.cell, cellClassName);
|
|
65
60
|
const labelClasses = classNames(styles.label, labelClassName);
|
|
66
|
-
return jsxs("label", {
|
|
61
|
+
return /*#__PURE__*/jsxs("label", {
|
|
67
62
|
className: containerClasses,
|
|
68
63
|
style: containerStyle,
|
|
69
|
-
"data-test":
|
|
70
|
-
children: [jsx("input", {
|
|
64
|
+
"data-test": "ring-checkbox",
|
|
65
|
+
children: [/*#__PURE__*/jsx("input", {
|
|
71
66
|
...restProps,
|
|
72
67
|
"data-checked": restProps.checked,
|
|
73
68
|
ref: this.composedInputRef(this.inputRef, inputRef),
|
|
74
|
-
type:
|
|
69
|
+
type: "checkbox",
|
|
75
70
|
className: classes
|
|
76
|
-
}), jsx("div", {
|
|
71
|
+
}), /*#__PURE__*/jsx("div", {
|
|
77
72
|
className: styles.cellWrapper,
|
|
78
|
-
children: jsxs("span", {
|
|
73
|
+
children: /*#__PURE__*/jsxs("span", {
|
|
79
74
|
className: cellClasses,
|
|
80
|
-
children: [jsx(Icon, {
|
|
75
|
+
children: [/*#__PURE__*/jsx(Icon, {
|
|
81
76
|
glyph: checkmarkIcon,
|
|
82
77
|
className: styles.check
|
|
83
|
-
}), jsx(Icon, {
|
|
78
|
+
}), /*#__PURE__*/jsx(Icon, {
|
|
84
79
|
glyph: minusIcon,
|
|
85
80
|
className: styles.minus
|
|
86
81
|
})]
|
|
87
82
|
})
|
|
88
|
-
}), jsxs("span", {
|
|
83
|
+
}), /*#__PURE__*/jsxs("span", {
|
|
89
84
|
className: labelClasses,
|
|
90
|
-
children: [label || children, help && jsx(ControlHelp, {
|
|
85
|
+
children: [label || children, help && /*#__PURE__*/jsx(ControlHelp, {
|
|
91
86
|
children: help
|
|
92
87
|
})]
|
|
93
88
|
})]
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import alertService from '../alert-service/alert-service.js';
|
|
2
2
|
import { copyHTMLToClipboard, copyTextToClipboard } from './clipboard-fallback.js';
|
|
3
|
-
import 'react/jsx-runtime';
|
|
4
3
|
import 'react-dom/client';
|
|
5
4
|
import '../global/get-uid.js';
|
|
6
5
|
import '../alert/alert.js';
|
|
@@ -14,7 +13,9 @@ import '../icon/icon.js';
|
|
|
14
13
|
import 'util-deprecate';
|
|
15
14
|
import '../icon/icon.constants.js';
|
|
16
15
|
import '../_helpers/icon-svg.js';
|
|
16
|
+
import 'react-compiler-runtime';
|
|
17
17
|
import '../global/memoize.js';
|
|
18
|
+
import 'react/jsx-runtime';
|
|
18
19
|
import '../loader-inline/loader-inline.js';
|
|
19
20
|
import '../global/data-tests.js';
|
|
20
21
|
import '../global/dom.js';
|
|
@@ -25,7 +25,7 @@ export default class Code extends PureComponent<CodeProps> {
|
|
|
25
25
|
highlight(): Promise<void>;
|
|
26
26
|
get codeRef(): HTMLElement | null | undefined;
|
|
27
27
|
get initCodeRef(): import("react").RefObject<HTMLElement | null> | ((ref: HTMLElement | null) => void);
|
|
28
|
-
render(): import("react
|
|
28
|
+
render(): import("react").JSX.Element;
|
|
29
29
|
}
|
|
30
30
|
declare const code: (strings: TemplateStringsArray, ...interpolations: unknown[]) => void;
|
|
31
31
|
export { code, highlight };
|
package/components/code/code.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
1
|
import { PureComponent } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import highlight from 'highlight.js/lib/core';
|
|
@@ -6,6 +5,7 @@ export { default as highlight } from 'highlight.js/lib/core';
|
|
|
6
5
|
import normalizeIndent from '../global/normalize-indent.js';
|
|
7
6
|
import trivialTemplateTag from '../global/trivial-template-tag.js';
|
|
8
7
|
import memoize from '../global/memoize.js';
|
|
8
|
+
import { jsx } from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
10
|
var styles = {"code":"ring-code-code","inline":"ring-code-inline","softWrap":"ring-code-softWrap"};
|
|
11
11
|
|
|
@@ -86,10 +86,10 @@ class Code extends PureComponent {
|
|
|
86
86
|
[styles.inline]: inline,
|
|
87
87
|
[styles.softWrap]: softWrap
|
|
88
88
|
});
|
|
89
|
-
return jsx(Tag, {
|
|
89
|
+
return /*#__PURE__*/jsx(Tag, {
|
|
90
90
|
className: classes,
|
|
91
|
-
"data-test":
|
|
92
|
-
children: jsx("code", {
|
|
91
|
+
"data-test": "ring-code",
|
|
92
|
+
children: /*#__PURE__*/jsx("code", {
|
|
93
93
|
// should be focusable because it can be scrollable
|
|
94
94
|
tabIndex: inline ? -1 : 0,
|
|
95
95
|
ref: this.initCodeRef,
|
|
@@ -99,7 +99,7 @@ class Code extends PureComponent {
|
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
const code = trivialTemplateTag(source => jsx(Code, {
|
|
102
|
+
const code = trivialTemplateTag(source => /*#__PURE__*/jsx(Code, {
|
|
103
103
|
code: source
|
|
104
104
|
}));
|
|
105
105
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useContext, useRef, useState, useEffect
|
|
1
|
+
import { c } from 'react-compiler-runtime';
|
|
2
|
+
import { useContext, 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
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
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
10
|
|
|
10
11
|
var styles = {"container":"ring-collapse-container","transition":"ring-collapse-transition","summary":"ring-collapse-summary","trigger":"ring-collapse-trigger","fade":"ring-collapse-fade"};
|
|
11
12
|
|
|
@@ -16,11 +17,20 @@ const HIDDEN = 0;
|
|
|
16
17
|
/**
|
|
17
18
|
* @name CollapseContent
|
|
18
19
|
*/
|
|
19
|
-
const CollapseContent =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
const CollapseContent = t0 => {
|
|
21
|
+
const $ = c(29);
|
|
22
|
+
if ($[0] !== "9f131fd4c1a474c465851e87970886be6fcc71e4c0f7e3864c0cebddbc13aaca") {
|
|
23
|
+
for (let $i = 0; $i < 29; $i += 1) {
|
|
24
|
+
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
25
|
+
}
|
|
26
|
+
$[0] = "9f131fd4c1a474c465851e87970886be6fcc71e4c0f7e3864c0cebddbc13aaca";
|
|
27
|
+
}
|
|
28
|
+
const {
|
|
29
|
+
children,
|
|
30
|
+
minHeight: t1,
|
|
31
|
+
"data-test": dataTest
|
|
32
|
+
} = t0;
|
|
33
|
+
const minHeight = t1 === undefined ? DEFAULT_HEIGHT : t1;
|
|
24
34
|
const {
|
|
25
35
|
collapsed,
|
|
26
36
|
duration,
|
|
@@ -29,83 +39,157 @@ const CollapseContent = ({
|
|
|
29
39
|
} = useContext(CollapseContext);
|
|
30
40
|
const containerRef = useRef(null);
|
|
31
41
|
const contentRef = useRef(null);
|
|
32
|
-
const initialContentHeight =
|
|
33
|
-
const contentHeight =
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
const [initialContentHeight] = useState(minHeight);
|
|
43
|
+
const [contentHeight, setContentHeight] = useState(DEFAULT_HEIGHT);
|
|
44
|
+
const nextHeight = collapsed ? initialContentHeight : contentHeight;
|
|
45
|
+
let t2;
|
|
46
|
+
if ($[1] !== nextHeight) {
|
|
47
|
+
t2 = toPx(nextHeight);
|
|
48
|
+
$[1] = nextHeight;
|
|
49
|
+
$[2] = t2;
|
|
50
|
+
} else {
|
|
51
|
+
t2 = $[2];
|
|
52
|
+
}
|
|
53
|
+
const height = t2;
|
|
40
54
|
const [shouldHideContent, setShouldHideContent] = useState(collapsed && minHeight <= DEFAULT_HEIGHT);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
55
|
+
let t3;
|
|
56
|
+
let t4;
|
|
57
|
+
if ($[3] !== collapsed || $[4] !== initialContentHeight) {
|
|
58
|
+
t3 = () => {
|
|
59
|
+
const onTransitionEnd = function onTransitionEnd() {
|
|
60
|
+
if (initialContentHeight <= DEFAULT_HEIGHT) {
|
|
61
|
+
setShouldHideContent(collapsed);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const container = containerRef.current;
|
|
65
|
+
container?.addEventListener("transitionend", onTransitionEnd);
|
|
66
|
+
return () => {
|
|
67
|
+
container?.removeEventListener("transitionend", onTransitionEnd);
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
t4 = [collapsed, initialContentHeight];
|
|
71
|
+
$[3] = collapsed;
|
|
72
|
+
$[4] = initialContentHeight;
|
|
73
|
+
$[5] = t3;
|
|
74
|
+
$[6] = t4;
|
|
75
|
+
} else {
|
|
76
|
+
t3 = $[5];
|
|
77
|
+
t4 = $[6];
|
|
78
|
+
}
|
|
79
|
+
useEffect(t3, t4);
|
|
80
|
+
if (!collapsed && shouldHideContent) {
|
|
81
|
+
setShouldHideContent(false);
|
|
82
|
+
}
|
|
83
|
+
let t5;
|
|
84
|
+
let t6;
|
|
85
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
86
|
+
t5 = () => {
|
|
87
|
+
if (contentRef.current) {
|
|
88
|
+
const observer = new ResizeObserver(() => {
|
|
89
|
+
setContentHeight(getRect(contentRef.current).height);
|
|
90
|
+
});
|
|
91
|
+
observer.observe(contentRef.current);
|
|
45
92
|
}
|
|
46
|
-
}
|
|
47
|
-
const container = containerRef.current;
|
|
48
|
-
container?.addEventListener('transitionend', onTransitionEnd);
|
|
49
|
-
return () => {
|
|
50
|
-
container?.removeEventListener('transitionend', onTransitionEnd);
|
|
51
93
|
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if (contentRef.current) {
|
|
68
|
-
const observer = new ResizeObserver(([entry]) => {
|
|
69
|
-
if (entry && entry.borderBoxSize) {
|
|
70
|
-
const {
|
|
71
|
-
inlineSize,
|
|
72
|
-
blockSize
|
|
73
|
-
} = entry.borderBoxSize[0];
|
|
74
|
-
setDimensions({
|
|
75
|
-
width: inlineSize,
|
|
76
|
-
height: blockSize
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
observer.observe(contentRef.current);
|
|
81
|
-
}
|
|
82
|
-
}, []);
|
|
83
|
-
const style = useMemo(() => {
|
|
84
|
-
const calculatedDuration = duration + contentHeight.current * DURATION_FACTOR;
|
|
85
|
-
return {
|
|
86
|
-
'--duration': `${calculatedDuration}ms`,
|
|
94
|
+
t6 = [];
|
|
95
|
+
$[7] = t5;
|
|
96
|
+
$[8] = t6;
|
|
97
|
+
} else {
|
|
98
|
+
t5 = $[7];
|
|
99
|
+
t6 = $[8];
|
|
100
|
+
}
|
|
101
|
+
useEffect(t5, t6);
|
|
102
|
+
const calculatedDuration = duration + contentHeight * DURATION_FACTOR;
|
|
103
|
+
const t7 = `${calculatedDuration}ms`;
|
|
104
|
+
const t8 = collapsed && !minHeight ? HIDDEN : VISIBLE;
|
|
105
|
+
let t9;
|
|
106
|
+
if ($[9] !== height || $[10] !== t7 || $[11] !== t8) {
|
|
107
|
+
t9 = {
|
|
108
|
+
"--duration": t7,
|
|
87
109
|
height,
|
|
88
|
-
opacity:
|
|
110
|
+
opacity: t8
|
|
89
111
|
};
|
|
90
|
-
|
|
91
|
-
|
|
112
|
+
$[9] = height;
|
|
113
|
+
$[10] = t7;
|
|
114
|
+
$[11] = t8;
|
|
115
|
+
$[12] = t9;
|
|
116
|
+
} else {
|
|
117
|
+
t9 = $[12];
|
|
118
|
+
}
|
|
119
|
+
const style = t9;
|
|
120
|
+
const fadeShouldBeVisible = Boolean(minHeight && collapsed);
|
|
92
121
|
const shouldRenderContent = disableAnimation ? !collapsed : !shouldHideContent;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
122
|
+
const t10 = `collapse-content-${id}`;
|
|
123
|
+
let t11;
|
|
124
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
125
|
+
t11 = joinDataTestAttributes(COLLAPSE_CONTENT_CONTAINER_TEST_ID);
|
|
126
|
+
$[13] = t11;
|
|
127
|
+
} else {
|
|
128
|
+
t11 = $[13];
|
|
129
|
+
}
|
|
130
|
+
const t12 = !disableAnimation;
|
|
131
|
+
let t13;
|
|
132
|
+
if ($[14] !== t12) {
|
|
133
|
+
t13 = classNames(styles.container, {
|
|
134
|
+
[styles.transition]: t12
|
|
135
|
+
});
|
|
136
|
+
$[14] = t12;
|
|
137
|
+
$[15] = t13;
|
|
138
|
+
} else {
|
|
139
|
+
t13 = $[15];
|
|
140
|
+
}
|
|
141
|
+
let t14;
|
|
142
|
+
if ($[16] !== dataTest) {
|
|
143
|
+
t14 = joinDataTestAttributes(COLLAPSE_CONTENT_TEST_ID, dataTest);
|
|
144
|
+
$[16] = dataTest;
|
|
145
|
+
$[17] = t14;
|
|
146
|
+
} else {
|
|
147
|
+
t14 = $[17];
|
|
148
|
+
}
|
|
149
|
+
const t15 = shouldRenderContent ? children : null;
|
|
150
|
+
let t16;
|
|
151
|
+
if ($[18] !== t14 || $[19] !== t15) {
|
|
152
|
+
t16 = /*#__PURE__*/jsx("div", {
|
|
102
153
|
ref: contentRef,
|
|
103
|
-
"data-test":
|
|
104
|
-
children:
|
|
105
|
-
})
|
|
154
|
+
"data-test": t14,
|
|
155
|
+
children: t15
|
|
156
|
+
});
|
|
157
|
+
$[18] = t14;
|
|
158
|
+
$[19] = t15;
|
|
159
|
+
$[20] = t16;
|
|
160
|
+
} else {
|
|
161
|
+
t16 = $[20];
|
|
162
|
+
}
|
|
163
|
+
let t17;
|
|
164
|
+
if ($[21] !== fadeShouldBeVisible) {
|
|
165
|
+
t17 = fadeShouldBeVisible && /*#__PURE__*/jsx("div", {
|
|
106
166
|
className: styles.fade
|
|
107
|
-
})
|
|
108
|
-
|
|
167
|
+
});
|
|
168
|
+
$[21] = fadeShouldBeVisible;
|
|
169
|
+
$[22] = t17;
|
|
170
|
+
} else {
|
|
171
|
+
t17 = $[22];
|
|
172
|
+
}
|
|
173
|
+
let t18;
|
|
174
|
+
if ($[23] !== style || $[24] !== t10 || $[25] !== t13 || $[26] !== t16 || $[27] !== t17) {
|
|
175
|
+
t18 = /*#__PURE__*/jsxs("div", {
|
|
176
|
+
ref: containerRef,
|
|
177
|
+
id: t10,
|
|
178
|
+
"data-test": t11,
|
|
179
|
+
className: t13,
|
|
180
|
+
style: style,
|
|
181
|
+
children: [t16, t17]
|
|
182
|
+
});
|
|
183
|
+
$[23] = style;
|
|
184
|
+
$[24] = t10;
|
|
185
|
+
$[25] = t13;
|
|
186
|
+
$[26] = t16;
|
|
187
|
+
$[27] = t17;
|
|
188
|
+
$[28] = t18;
|
|
189
|
+
} else {
|
|
190
|
+
t18 = $[28];
|
|
191
|
+
}
|
|
192
|
+
return t18;
|
|
109
193
|
};
|
|
110
194
|
|
|
111
195
|
export { CollapseContent, CollapseContent as default };
|
|
@@ -1,36 +1,83 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useContext,
|
|
1
|
+
import { c } from 'react-compiler-runtime';
|
|
2
|
+
import { useContext, 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';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
const CollapseControl = t0 => {
|
|
9
|
+
const $ = c(14);
|
|
10
|
+
if ($[0] !== "c08d56828661e71eca0e3f115b12585590bbebb907f6399b722daeb5173d93d4") {
|
|
11
|
+
for (let $i = 0; $i < 14; $i += 1) {
|
|
12
|
+
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
13
|
+
}
|
|
14
|
+
$[0] = "c08d56828661e71eca0e3f115b12585590bbebb907f6399b722daeb5173d93d4";
|
|
15
|
+
}
|
|
16
|
+
const {
|
|
17
|
+
children,
|
|
18
|
+
"data-test": dataTest
|
|
19
|
+
} = t0;
|
|
14
20
|
const {
|
|
15
21
|
setCollapsed,
|
|
16
22
|
collapsed,
|
|
17
23
|
id
|
|
18
24
|
} = useContext(CollapseContext);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (typeof children ===
|
|
22
|
-
|
|
25
|
+
let t1;
|
|
26
|
+
bb0: {
|
|
27
|
+
if (typeof children === "function") {
|
|
28
|
+
let t2;
|
|
29
|
+
if ($[1] !== children || $[2] !== collapsed) {
|
|
30
|
+
t2 = children(collapsed);
|
|
31
|
+
$[1] = children;
|
|
32
|
+
$[2] = collapsed;
|
|
33
|
+
$[3] = t2;
|
|
34
|
+
} else {
|
|
35
|
+
t2 = $[3];
|
|
36
|
+
}
|
|
37
|
+
t1 = t2;
|
|
38
|
+
break bb0;
|
|
23
39
|
}
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
40
|
+
t1 = children;
|
|
41
|
+
}
|
|
42
|
+
const child = t1;
|
|
43
|
+
let t2;
|
|
44
|
+
if ($[4] !== dataTest) {
|
|
45
|
+
t2 = joinDataTestAttributes(COLLAPSE_CONTROL_TEST_ID, dataTest);
|
|
46
|
+
$[4] = dataTest;
|
|
47
|
+
$[5] = t2;
|
|
48
|
+
} else {
|
|
49
|
+
t2 = $[5];
|
|
50
|
+
}
|
|
51
|
+
const t3 = `collapse-content-${id}`;
|
|
52
|
+
const t4 = String(!collapsed);
|
|
53
|
+
let t5;
|
|
54
|
+
if ($[6] !== child || $[7] !== setCollapsed || $[8] !== t3 || $[9] !== t4) {
|
|
55
|
+
t5 = /*#__PURE__*/cloneElement(child, {
|
|
29
56
|
onClick: setCollapsed,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
})
|
|
33
|
-
|
|
57
|
+
"aria-controls": t3,
|
|
58
|
+
"aria-expanded": t4
|
|
59
|
+
});
|
|
60
|
+
$[6] = child;
|
|
61
|
+
$[7] = setCollapsed;
|
|
62
|
+
$[8] = t3;
|
|
63
|
+
$[9] = t4;
|
|
64
|
+
$[10] = t5;
|
|
65
|
+
} else {
|
|
66
|
+
t5 = $[10];
|
|
67
|
+
}
|
|
68
|
+
let t6;
|
|
69
|
+
if ($[11] !== t2 || $[12] !== t5) {
|
|
70
|
+
t6 = /*#__PURE__*/jsx("p", {
|
|
71
|
+
"data-test": t2,
|
|
72
|
+
children: t5
|
|
73
|
+
});
|
|
74
|
+
$[11] = t2;
|
|
75
|
+
$[12] = t5;
|
|
76
|
+
$[13] = t6;
|
|
77
|
+
} else {
|
|
78
|
+
t6 = $[13];
|
|
79
|
+
}
|
|
80
|
+
return t6;
|
|
34
81
|
};
|
|
35
82
|
|
|
36
83
|
export { CollapseControl, CollapseControl as default };
|