@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
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
export interface SelectionToolbarProps extends ComponentPropsWithRef<'div'> {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
selectAll?: ReactNode;
|
|
5
|
+
closeAction: ReactNode;
|
|
6
|
+
compact?: boolean;
|
|
7
|
+
'data-test'?: string | null;
|
|
8
|
+
}
|
|
9
|
+
export declare function SelectionToolbar({ ref, label, selectAll, closeAction, compact, className, children, 'data-test': dataTest, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...restProps }: SelectionToolbarProps): import("react").JSX.Element;
|
|
10
|
+
export declare function SelectionToolbarSeparator(): import("react").JSX.Element;
|
|
11
|
+
export default SelectionToolbar;
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
import { useId } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import joinDataTestAttributes from '../global/data-tests.js';
|
|
5
|
+
import { a as ThemeProvider, T as Theme } from '../_helpers/theme.js';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var styles = {"toolbar":"ring-selection-toolbar-toolbar","content":"ring-selection-toolbar-content","selectAll":"ring-selection-toolbar-selectAll","actions":"ring-selection-toolbar-actions","closeAction":"ring-selection-toolbar-closeAction","separator":"ring-selection-toolbar-separator","compact":"ring-selection-toolbar-compact","label":"ring-selection-toolbar-label"};
|
|
9
|
+
|
|
10
|
+
function SelectionToolbar(t0) {
|
|
11
|
+
var _ariaLabelledBy;
|
|
12
|
+
const $ = c(41);
|
|
13
|
+
if ($[0] !== "5d985e52242f7f93511362d020a90fb0a34ed2fe8a96b99ea0fdb6bafcaccda2") {
|
|
14
|
+
for (let $i = 0; $i < 41; $i += 1) {
|
|
15
|
+
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
16
|
+
}
|
|
17
|
+
$[0] = "5d985e52242f7f93511362d020a90fb0a34ed2fe8a96b99ea0fdb6bafcaccda2";
|
|
18
|
+
}
|
|
19
|
+
let ariaLabel;
|
|
20
|
+
let ariaLabelledBy;
|
|
21
|
+
let children;
|
|
22
|
+
let className;
|
|
23
|
+
let closeAction;
|
|
24
|
+
let compact;
|
|
25
|
+
let dataTest;
|
|
26
|
+
let label;
|
|
27
|
+
let ref;
|
|
28
|
+
let restProps;
|
|
29
|
+
let selectAll;
|
|
30
|
+
if ($[1] !== t0) {
|
|
31
|
+
({
|
|
32
|
+
ref,
|
|
33
|
+
label,
|
|
34
|
+
selectAll,
|
|
35
|
+
closeAction,
|
|
36
|
+
compact,
|
|
37
|
+
className,
|
|
38
|
+
children,
|
|
39
|
+
"data-test": dataTest,
|
|
40
|
+
"aria-label": ariaLabel,
|
|
41
|
+
"aria-labelledby": ariaLabelledBy,
|
|
42
|
+
...restProps
|
|
43
|
+
} = t0);
|
|
44
|
+
$[1] = t0;
|
|
45
|
+
$[2] = ariaLabel;
|
|
46
|
+
$[3] = ariaLabelledBy;
|
|
47
|
+
$[4] = children;
|
|
48
|
+
$[5] = className;
|
|
49
|
+
$[6] = closeAction;
|
|
50
|
+
$[7] = compact;
|
|
51
|
+
$[8] = dataTest;
|
|
52
|
+
$[9] = label;
|
|
53
|
+
$[10] = ref;
|
|
54
|
+
$[11] = restProps;
|
|
55
|
+
$[12] = selectAll;
|
|
56
|
+
} else {
|
|
57
|
+
ariaLabel = $[2];
|
|
58
|
+
ariaLabelledBy = $[3];
|
|
59
|
+
children = $[4];
|
|
60
|
+
className = $[5];
|
|
61
|
+
closeAction = $[6];
|
|
62
|
+
compact = $[7];
|
|
63
|
+
dataTest = $[8];
|
|
64
|
+
label = $[9];
|
|
65
|
+
ref = $[10];
|
|
66
|
+
restProps = $[11];
|
|
67
|
+
selectAll = $[12];
|
|
68
|
+
}
|
|
69
|
+
const labelId = useId();
|
|
70
|
+
const hasSelectAll = selectAll != null;
|
|
71
|
+
const t1 = (_ariaLabelledBy = ariaLabelledBy) !== null && _ariaLabelledBy !== void 0 ? _ariaLabelledBy : ariaLabel == null ? labelId : undefined;
|
|
72
|
+
let t2;
|
|
73
|
+
if ($[13] !== dataTest) {
|
|
74
|
+
t2 = joinDataTestAttributes("ring-selection-toolbar", dataTest);
|
|
75
|
+
$[13] = dataTest;
|
|
76
|
+
$[14] = t2;
|
|
77
|
+
} else {
|
|
78
|
+
t2 = $[14];
|
|
79
|
+
}
|
|
80
|
+
let t3;
|
|
81
|
+
if ($[15] !== className || $[16] !== compact) {
|
|
82
|
+
t3 = classNames(styles.toolbar, {
|
|
83
|
+
[styles.compact]: compact
|
|
84
|
+
}, className);
|
|
85
|
+
$[15] = className;
|
|
86
|
+
$[16] = compact;
|
|
87
|
+
$[17] = t3;
|
|
88
|
+
} else {
|
|
89
|
+
t3 = $[17];
|
|
90
|
+
}
|
|
91
|
+
let t4;
|
|
92
|
+
if ($[18] !== label || $[19] !== labelId) {
|
|
93
|
+
t4 = /*#__PURE__*/jsx("span", {
|
|
94
|
+
id: labelId,
|
|
95
|
+
className: styles.label,
|
|
96
|
+
children: label
|
|
97
|
+
});
|
|
98
|
+
$[18] = label;
|
|
99
|
+
$[19] = labelId;
|
|
100
|
+
$[20] = t4;
|
|
101
|
+
} else {
|
|
102
|
+
t4 = $[20];
|
|
103
|
+
}
|
|
104
|
+
let t5;
|
|
105
|
+
if ($[21] !== hasSelectAll || $[22] !== selectAll) {
|
|
106
|
+
t5 = hasSelectAll && /*#__PURE__*/jsx("span", {
|
|
107
|
+
className: styles.selectAll,
|
|
108
|
+
children: selectAll
|
|
109
|
+
});
|
|
110
|
+
$[21] = hasSelectAll;
|
|
111
|
+
$[22] = selectAll;
|
|
112
|
+
$[23] = t5;
|
|
113
|
+
} else {
|
|
114
|
+
t5 = $[23];
|
|
115
|
+
}
|
|
116
|
+
let t6;
|
|
117
|
+
if ($[24] !== children) {
|
|
118
|
+
t6 = /*#__PURE__*/jsx("div", {
|
|
119
|
+
className: styles.actions,
|
|
120
|
+
children: children
|
|
121
|
+
});
|
|
122
|
+
$[24] = children;
|
|
123
|
+
$[25] = t6;
|
|
124
|
+
} else {
|
|
125
|
+
t6 = $[25];
|
|
126
|
+
}
|
|
127
|
+
let t7;
|
|
128
|
+
if ($[26] !== t4 || $[27] !== t5 || $[28] !== t6) {
|
|
129
|
+
t7 = /*#__PURE__*/jsxs("div", {
|
|
130
|
+
className: styles.content,
|
|
131
|
+
children: [t4, t5, t6]
|
|
132
|
+
});
|
|
133
|
+
$[26] = t4;
|
|
134
|
+
$[27] = t5;
|
|
135
|
+
$[28] = t6;
|
|
136
|
+
$[29] = t7;
|
|
137
|
+
} else {
|
|
138
|
+
t7 = $[29];
|
|
139
|
+
}
|
|
140
|
+
let t8;
|
|
141
|
+
if ($[30] !== closeAction) {
|
|
142
|
+
t8 = /*#__PURE__*/jsx("div", {
|
|
143
|
+
className: styles.closeAction,
|
|
144
|
+
children: closeAction
|
|
145
|
+
});
|
|
146
|
+
$[30] = closeAction;
|
|
147
|
+
$[31] = t8;
|
|
148
|
+
} else {
|
|
149
|
+
t8 = $[31];
|
|
150
|
+
}
|
|
151
|
+
let t9;
|
|
152
|
+
if ($[32] !== ariaLabel || $[33] !== ref || $[34] !== restProps || $[35] !== t1 || $[36] !== t2 || $[37] !== t3 || $[38] !== t7 || $[39] !== t8) {
|
|
153
|
+
t9 = /*#__PURE__*/jsxs(ThemeProvider, {
|
|
154
|
+
...restProps,
|
|
155
|
+
ref: ref,
|
|
156
|
+
theme: Theme.DARK,
|
|
157
|
+
role: "group",
|
|
158
|
+
"aria-label": ariaLabel,
|
|
159
|
+
"aria-labelledby": t1,
|
|
160
|
+
"data-test": t2,
|
|
161
|
+
className: t3,
|
|
162
|
+
children: [t7, t8]
|
|
163
|
+
});
|
|
164
|
+
$[32] = ariaLabel;
|
|
165
|
+
$[33] = ref;
|
|
166
|
+
$[34] = restProps;
|
|
167
|
+
$[35] = t1;
|
|
168
|
+
$[36] = t2;
|
|
169
|
+
$[37] = t3;
|
|
170
|
+
$[38] = t7;
|
|
171
|
+
$[39] = t8;
|
|
172
|
+
$[40] = t9;
|
|
173
|
+
} else {
|
|
174
|
+
t9 = $[40];
|
|
175
|
+
}
|
|
176
|
+
return t9;
|
|
177
|
+
}
|
|
178
|
+
function SelectionToolbarSeparator() {
|
|
179
|
+
const $ = c(2);
|
|
180
|
+
if ($[0] !== "5d985e52242f7f93511362d020a90fb0a34ed2fe8a96b99ea0fdb6bafcaccda2") {
|
|
181
|
+
for (let $i = 0; $i < 2; $i += 1) {
|
|
182
|
+
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
183
|
+
}
|
|
184
|
+
$[0] = "5d985e52242f7f93511362d020a90fb0a34ed2fe8a96b99ea0fdb6bafcaccda2";
|
|
185
|
+
}
|
|
186
|
+
let t0;
|
|
187
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
188
|
+
t0 = /*#__PURE__*/jsx("span", {
|
|
189
|
+
role: "separator",
|
|
190
|
+
"aria-orientation": "vertical",
|
|
191
|
+
className: styles.separator
|
|
192
|
+
});
|
|
193
|
+
$[1] = t0;
|
|
194
|
+
} else {
|
|
195
|
+
t0 = $[1];
|
|
196
|
+
}
|
|
197
|
+
return t0;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export { SelectionToolbar, SelectionToolbarSeparator, SelectionToolbar as default };
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
import { c } from 'react
|
|
2
|
-
import { useRef, useState, useEffect, Fragment } from 'react';
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
import { useRef, useState, useEffectEvent, useEffect, Fragment } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { isArray } from '../global/typescript-utils.js';
|
|
5
5
|
import Shortcuts from '../shortcuts/shortcuts.js';
|
|
6
6
|
import getUID from '../global/get-uid.js';
|
|
7
7
|
import { toRange, HUNDRED, calculateMarks, toPercent, validateValue, calculateValue, adjustValues } from './slider.utils.js';
|
|
8
|
-
import useEventCallback from '../global/use-event-callback.js';
|
|
9
8
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
10
9
|
import '../shortcuts/core.js';
|
|
11
10
|
import 'core-js/modules/es.array.includes.js';
|
|
12
11
|
import 'combokeys';
|
|
13
12
|
import '../global/sniffer.js';
|
|
14
13
|
import 'sniffr';
|
|
15
|
-
import 'util-deprecate';
|
|
16
14
|
|
|
17
15
|
var styles = {"slider":"ring-slider-slider","disabled":"ring-slider-disabled","marked":"ring-slider-marked","rail":"ring-slider-rail","rounded":"ring-slider-rounded","track":"ring-slider-track","thumb":"ring-slider-thumb ring-global-resetButton","dragged":"ring-slider-dragged","tick":"ring-slider-tick","active":"ring-slider-active","markValue":"ring-slider-markValue","tag":"ring-slider-tag"};
|
|
18
16
|
|
|
19
17
|
const Slider = t0 => {
|
|
20
|
-
const $ = c(
|
|
21
|
-
if ($[0] !== "
|
|
22
|
-
for (let $i = 0; $i <
|
|
18
|
+
const $ = c(124);
|
|
19
|
+
if ($[0] !== "df7020e348cf0691dc47b906190dfc0f4c7761c070455c6c9f1c642863a2c077") {
|
|
20
|
+
for (let $i = 0; $i < 124; $i += 1) {
|
|
23
21
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
24
22
|
}
|
|
25
|
-
$[0] = "
|
|
23
|
+
$[0] = "df7020e348cf0691dc47b906190dfc0f4c7761c070455c6c9f1c642863a2c077";
|
|
26
24
|
}
|
|
27
25
|
const {
|
|
28
26
|
defaultValue,
|
|
@@ -273,7 +271,7 @@ const Slider = t0 => {
|
|
|
273
271
|
} else {
|
|
274
272
|
t12 = $[49];
|
|
275
273
|
}
|
|
276
|
-
const handleMouseUp =
|
|
274
|
+
const handleMouseUp = useEffectEvent(t12);
|
|
277
275
|
let t13;
|
|
278
276
|
if ($[50] !== draggedIndex || $[51] !== handleValueChange || $[52] !== max || $[53] !== min || $[54] !== validStep || $[55] !== validValues) {
|
|
279
277
|
t13 = t14 => {
|
|
@@ -297,9 +295,8 @@ const Slider = t0 => {
|
|
|
297
295
|
} else {
|
|
298
296
|
t13 = $[56];
|
|
299
297
|
}
|
|
300
|
-
const handleMouseMove =
|
|
298
|
+
const handleMouseMove = useEffectEvent(t13);
|
|
301
299
|
let t14;
|
|
302
|
-
let t15;
|
|
303
300
|
if ($[57] !== disabled || $[58] !== handleMouseMove || $[59] !== handleMouseUp || $[60] !== isDragging) {
|
|
304
301
|
t14 = () => {
|
|
305
302
|
if (disabled) {
|
|
@@ -319,112 +316,118 @@ const Slider = t0 => {
|
|
|
319
316
|
window.removeEventListener("mouseup", handleMouseUp);
|
|
320
317
|
};
|
|
321
318
|
};
|
|
322
|
-
t15 = [isDragging, disabled, handleMouseMove, handleMouseUp];
|
|
323
319
|
$[57] = disabled;
|
|
324
320
|
$[58] = handleMouseMove;
|
|
325
321
|
$[59] = handleMouseUp;
|
|
326
322
|
$[60] = isDragging;
|
|
327
323
|
$[61] = t14;
|
|
328
|
-
$[62] = t15;
|
|
329
324
|
} else {
|
|
330
325
|
t14 = $[61];
|
|
331
|
-
|
|
326
|
+
}
|
|
327
|
+
let t15;
|
|
328
|
+
if ($[62] !== disabled || $[63] !== isDragging) {
|
|
329
|
+
t15 = [isDragging, disabled];
|
|
330
|
+
$[62] = disabled;
|
|
331
|
+
$[63] = isDragging;
|
|
332
|
+
$[64] = t15;
|
|
333
|
+
} else {
|
|
334
|
+
t15 = $[64];
|
|
332
335
|
}
|
|
333
336
|
useEffect(t14, t15);
|
|
334
337
|
const t16 = "presentation";
|
|
335
338
|
const t17 = !!marks || showTag;
|
|
336
339
|
let t18;
|
|
337
|
-
if ($[
|
|
340
|
+
if ($[65] !== className || $[66] !== disabled || $[67] !== t17) {
|
|
338
341
|
t18 = classNames(styles.slider, className, {
|
|
339
342
|
[styles.disabled]: disabled,
|
|
340
343
|
[styles.marked]: t17
|
|
341
344
|
});
|
|
342
|
-
$[
|
|
343
|
-
$[
|
|
344
|
-
$[
|
|
345
|
-
$[
|
|
345
|
+
$[65] = className;
|
|
346
|
+
$[66] = disabled;
|
|
347
|
+
$[67] = t17;
|
|
348
|
+
$[68] = t18;
|
|
346
349
|
} else {
|
|
347
|
-
t18 = $[
|
|
350
|
+
t18 = $[68];
|
|
348
351
|
}
|
|
349
352
|
const t19 = -1;
|
|
350
353
|
let t20;
|
|
351
|
-
if ($[
|
|
354
|
+
if ($[69] !== shortcutsMap || $[70] !== shortcutsScope) {
|
|
352
355
|
t20 = /*#__PURE__*/jsx(Shortcuts, {
|
|
353
356
|
map: shortcutsMap,
|
|
354
357
|
scope: shortcutsScope
|
|
355
358
|
});
|
|
356
|
-
$[
|
|
357
|
-
$[
|
|
358
|
-
$[
|
|
359
|
+
$[69] = shortcutsMap;
|
|
360
|
+
$[70] = shortcutsScope;
|
|
361
|
+
$[71] = t20;
|
|
359
362
|
} else {
|
|
360
|
-
t20 = $[
|
|
363
|
+
t20 = $[71];
|
|
361
364
|
}
|
|
362
365
|
const t21 = !showTicks;
|
|
363
366
|
let t22;
|
|
364
|
-
if ($[
|
|
367
|
+
if ($[72] !== disabled || $[73] !== t21) {
|
|
365
368
|
t22 = classNames(styles.rail, {
|
|
366
369
|
[styles.rounded]: t21,
|
|
367
370
|
[styles.disabled]: disabled
|
|
368
371
|
});
|
|
369
|
-
$[
|
|
370
|
-
$[
|
|
371
|
-
$[
|
|
372
|
+
$[72] = disabled;
|
|
373
|
+
$[73] = t21;
|
|
374
|
+
$[74] = t22;
|
|
372
375
|
} else {
|
|
373
|
-
t22 = $[
|
|
376
|
+
t22 = $[74];
|
|
374
377
|
}
|
|
375
378
|
let t23;
|
|
376
|
-
if ($[
|
|
379
|
+
if ($[75] !== t22) {
|
|
377
380
|
t23 = /*#__PURE__*/jsx("div", {
|
|
378
381
|
className: t22
|
|
379
382
|
});
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
383
|
+
$[75] = t22;
|
|
384
|
+
$[76] = t23;
|
|
382
385
|
} else {
|
|
383
|
-
t23 = $[
|
|
386
|
+
t23 = $[76];
|
|
384
387
|
}
|
|
385
388
|
const t24 = `${trackStart}%`;
|
|
386
389
|
const t25 = `${trackLength}%`;
|
|
387
390
|
let t26;
|
|
388
|
-
if ($[
|
|
391
|
+
if ($[77] !== t24 || $[78] !== t25) {
|
|
389
392
|
t26 = {
|
|
390
393
|
left: t24,
|
|
391
394
|
width: t25
|
|
392
395
|
};
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
395
|
-
$[
|
|
396
|
+
$[77] = t24;
|
|
397
|
+
$[78] = t25;
|
|
398
|
+
$[79] = t26;
|
|
396
399
|
} else {
|
|
397
|
-
t26 = $[
|
|
400
|
+
t26 = $[79];
|
|
398
401
|
}
|
|
399
402
|
const t27 = !showTicks;
|
|
400
403
|
let t28;
|
|
401
|
-
if ($[
|
|
404
|
+
if ($[80] !== disabled || $[81] !== t27) {
|
|
402
405
|
t28 = classNames(styles.track, {
|
|
403
406
|
[styles.rounded]: t27,
|
|
404
407
|
[styles.disabled]: disabled
|
|
405
408
|
});
|
|
406
|
-
$[
|
|
407
|
-
$[
|
|
408
|
-
$[
|
|
409
|
+
$[80] = disabled;
|
|
410
|
+
$[81] = t27;
|
|
411
|
+
$[82] = t28;
|
|
409
412
|
} else {
|
|
410
|
-
t28 = $[
|
|
413
|
+
t28 = $[82];
|
|
411
414
|
}
|
|
412
415
|
let t29;
|
|
413
|
-
if ($[
|
|
416
|
+
if ($[83] !== t26 || $[84] !== t28) {
|
|
414
417
|
t29 = /*#__PURE__*/jsx("div", {
|
|
415
418
|
style: t26,
|
|
416
419
|
className: t28
|
|
417
420
|
});
|
|
418
|
-
$[
|
|
419
|
-
$[
|
|
420
|
-
$[
|
|
421
|
+
$[83] = t26;
|
|
422
|
+
$[84] = t28;
|
|
423
|
+
$[85] = t29;
|
|
421
424
|
} else {
|
|
422
|
-
t29 = $[
|
|
425
|
+
t29 = $[85];
|
|
423
426
|
}
|
|
424
427
|
let t30;
|
|
425
|
-
if ($[
|
|
428
|
+
if ($[86] !== disabled || $[87] !== draggedIndex || $[88] !== handleMouseDown || $[89] !== isDragging || $[90] !== max || $[91] !== min || $[92] !== renderTag || $[93] !== showTag || $[94] !== validValues) {
|
|
426
429
|
let t31;
|
|
427
|
-
if ($[
|
|
430
|
+
if ($[96] !== disabled || $[97] !== draggedIndex || $[98] !== handleMouseDown || $[99] !== isDragging || $[100] !== max || $[101] !== min || $[102] !== renderTag || $[103] !== showTag) {
|
|
428
431
|
t31 = (numValue, index_5) => {
|
|
429
432
|
const percent = toPercent(numValue, min, max);
|
|
430
433
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
@@ -456,34 +459,34 @@ const Slider = t0 => {
|
|
|
456
459
|
})]
|
|
457
460
|
}, index_5);
|
|
458
461
|
};
|
|
459
|
-
$[
|
|
460
|
-
$[
|
|
461
|
-
$[
|
|
462
|
-
$[
|
|
463
|
-
$[
|
|
464
|
-
$[
|
|
465
|
-
$[
|
|
466
|
-
$[
|
|
467
|
-
$[
|
|
462
|
+
$[96] = disabled;
|
|
463
|
+
$[97] = draggedIndex;
|
|
464
|
+
$[98] = handleMouseDown;
|
|
465
|
+
$[99] = isDragging;
|
|
466
|
+
$[100] = max;
|
|
467
|
+
$[101] = min;
|
|
468
|
+
$[102] = renderTag;
|
|
469
|
+
$[103] = showTag;
|
|
470
|
+
$[104] = t31;
|
|
468
471
|
} else {
|
|
469
|
-
t31 = $[
|
|
472
|
+
t31 = $[104];
|
|
470
473
|
}
|
|
471
474
|
t30 = validValues.map(t31);
|
|
472
|
-
$[
|
|
473
|
-
$[
|
|
474
|
-
$[
|
|
475
|
-
$[
|
|
476
|
-
$[
|
|
477
|
-
$[
|
|
478
|
-
$[
|
|
479
|
-
$[
|
|
480
|
-
$[
|
|
481
|
-
$[
|
|
475
|
+
$[86] = disabled;
|
|
476
|
+
$[87] = draggedIndex;
|
|
477
|
+
$[88] = handleMouseDown;
|
|
478
|
+
$[89] = isDragging;
|
|
479
|
+
$[90] = max;
|
|
480
|
+
$[91] = min;
|
|
481
|
+
$[92] = renderTag;
|
|
482
|
+
$[93] = showTag;
|
|
483
|
+
$[94] = validValues;
|
|
484
|
+
$[95] = t30;
|
|
482
485
|
} else {
|
|
483
|
-
t30 = $[
|
|
486
|
+
t30 = $[95];
|
|
484
487
|
}
|
|
485
488
|
let t31;
|
|
486
|
-
if ($[
|
|
489
|
+
if ($[105] !== disabled || $[106] !== max || $[107] !== min) {
|
|
487
490
|
t31 = (t32, index_6) => {
|
|
488
491
|
const {
|
|
489
492
|
value: markValue,
|
|
@@ -500,16 +503,16 @@ const Slider = t0 => {
|
|
|
500
503
|
children: label !== null && label !== void 0 ? label : markValue
|
|
501
504
|
}, index_6);
|
|
502
505
|
};
|
|
503
|
-
$[
|
|
504
|
-
$[
|
|
505
|
-
$[
|
|
506
|
-
$[
|
|
506
|
+
$[105] = disabled;
|
|
507
|
+
$[106] = max;
|
|
508
|
+
$[107] = min;
|
|
509
|
+
$[108] = t31;
|
|
507
510
|
} else {
|
|
508
|
-
t31 = $[
|
|
511
|
+
t31 = $[108];
|
|
509
512
|
}
|
|
510
513
|
const t32 = markValues.map(t31);
|
|
511
514
|
let t33;
|
|
512
|
-
if ($[
|
|
515
|
+
if ($[109] !== disabled || $[110] !== isRange || $[111] !== max || $[112] !== min || $[113] !== validValues) {
|
|
513
516
|
t33 = (t34, index_7) => {
|
|
514
517
|
const {
|
|
515
518
|
value: tickValue
|
|
@@ -526,18 +529,18 @@ const Slider = t0 => {
|
|
|
526
529
|
}
|
|
527
530
|
}, index_7);
|
|
528
531
|
};
|
|
529
|
-
$[
|
|
530
|
-
$[
|
|
531
|
-
$[
|
|
532
|
-
$[
|
|
533
|
-
$[
|
|
534
|
-
$[
|
|
532
|
+
$[109] = disabled;
|
|
533
|
+
$[110] = isRange;
|
|
534
|
+
$[111] = max;
|
|
535
|
+
$[112] = min;
|
|
536
|
+
$[113] = validValues;
|
|
537
|
+
$[114] = t33;
|
|
535
538
|
} else {
|
|
536
|
-
t33 = $[
|
|
539
|
+
t33 = $[114];
|
|
537
540
|
}
|
|
538
541
|
const t34 = tickMarks.map(t33);
|
|
539
542
|
let t35;
|
|
540
|
-
if ($[
|
|
543
|
+
if ($[115] !== handleMouseDown || $[116] !== t18 || $[117] !== t20 || $[118] !== t23 || $[119] !== t29 || $[120] !== t30 || $[121] !== t32 || $[122] !== t34) {
|
|
541
544
|
t35 = /*#__PURE__*/jsxs("div", {
|
|
542
545
|
ref: ref,
|
|
543
546
|
role: t16,
|
|
@@ -546,17 +549,17 @@ const Slider = t0 => {
|
|
|
546
549
|
onMouseDown: handleMouseDown,
|
|
547
550
|
children: [t20, t23, t29, t30, t32, t34]
|
|
548
551
|
});
|
|
549
|
-
$[
|
|
550
|
-
$[
|
|
551
|
-
$[
|
|
552
|
-
$[
|
|
553
|
-
$[
|
|
554
|
-
$[
|
|
555
|
-
$[
|
|
556
|
-
$[
|
|
557
|
-
$[
|
|
552
|
+
$[115] = handleMouseDown;
|
|
553
|
+
$[116] = t18;
|
|
554
|
+
$[117] = t20;
|
|
555
|
+
$[118] = t23;
|
|
556
|
+
$[119] = t29;
|
|
557
|
+
$[120] = t30;
|
|
558
|
+
$[121] = t32;
|
|
559
|
+
$[122] = t34;
|
|
560
|
+
$[123] = t35;
|
|
558
561
|
} else {
|
|
559
|
-
t35 = $[
|
|
562
|
+
t35 = $[123];
|
|
560
563
|
}
|
|
561
564
|
return t35;
|
|
562
565
|
};
|
|
@@ -13,8 +13,7 @@ import '../icon/icon.js';
|
|
|
13
13
|
import 'util-deprecate';
|
|
14
14
|
import '../icon/icon.constants.js';
|
|
15
15
|
import '../_helpers/icon-svg.js';
|
|
16
|
-
import 'react
|
|
17
|
-
import '../global/configuration.js';
|
|
16
|
+
import 'react/compiler-runtime';
|
|
18
17
|
import '../global/memoize.js';
|
|
19
18
|
import 'react/jsx-runtime';
|
|
20
19
|
import '../loader-inline/loader-inline.js';
|
|
@@ -25,6 +24,7 @@ import '@jetbrains/icons/chevron-down';
|
|
|
25
24
|
import '@jetbrains/icons/chevron-12px-down';
|
|
26
25
|
import '../link/clickable-link.js';
|
|
27
26
|
import '../global/controls-height.js';
|
|
27
|
+
import '../global/configuration.js';
|
|
28
28
|
import '../_helpers/button.classes.js';
|
|
29
29
|
import '../_helpers/theme.js';
|
|
30
30
|
import '../alert/alert-heading.js';
|
|
@@ -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';
|