@adecore/ui 0.31.12 → 0.33.0
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/dist/AccentSwatches.js +290 -13
- package/dist/Banner.js +90 -9
- package/dist/Button.js +114 -22
- package/dist/ButtonGroup.js +62 -8
- package/dist/Checkbox.js +73 -4
- package/dist/ChoiceCards.js +205 -11
- package/dist/CloseButton.js +87 -7
- package/dist/ColorSwatch.js +132 -15
- package/dist/ColorWheelPicker.js +305 -71
- package/dist/ColumnResizeHandle.js +43 -8
- package/dist/DisabledReason.js +27 -8
- package/dist/DockShell.js +144 -37
- package/dist/EmptyState.js +95 -6
- package/dist/ErrorBoundary.js +254 -31
- package/dist/Field.js +349 -31
- package/dist/FileIcon.js +67 -6
- package/dist/Icon.js +38 -6
- package/dist/IconButton.js +176 -20
- package/dist/IconPicker.js +344 -73
- package/dist/Input.js +233 -14
- package/dist/Kbd.js +150 -10
- package/dist/LazyBoundary.js +14 -5
- package/dist/ListRow.js +75 -15
- package/dist/Meter.js +108 -5
- package/dist/MiddleTruncate.js +126 -45
- package/dist/PanelEmpty.js +64 -5
- package/dist/PanelHeader.js +95 -13
- package/dist/Pill.js +114 -19
- package/dist/ProjectSwitcher.js +225 -12
- package/dist/PromptDialog.js +352 -37
- package/dist/SectionLabel.js +62 -8
- package/dist/SegmentBar.js +197 -36
- package/dist/Segmented.js +130 -23
- package/dist/Select.js +310 -19
- package/dist/SelectSearch.js +344 -29
- package/dist/Separator.js +35 -4
- package/dist/ShortcutHints.js +146 -76
- package/dist/Skeleton.js +31 -4
- package/dist/Slider.js +172 -10
- package/dist/SlidingColumn.js +194 -34
- package/dist/Spinner.js +100 -3
- package/dist/Stepper.js +232 -11
- package/dist/Surface.js +62 -8
- package/dist/Switch.js +60 -6
- package/dist/TextMenu.js +212 -17
- package/dist/Tile.js +149 -5
- package/dist/Toasts.js +391 -33
- package/dist/Tooltip.js +153 -16
- package/dist/UIProvider.js +62 -15
- package/dist/Waveform.js +362 -93
- package/dist/Wipe.js +259 -34
- package/dist/ZoomControls.js +356 -14
- package/dist/class-name.js +1 -1
- package/dist/clipboard.js +15 -17
- package/dist/context-menu/index.parts.js +1 -1
- package/dist/dialog/index.parts.js +1 -1
- package/dist/dialog/parts.js +378 -29
- package/dist/dialog-layer.js +51 -18
- package/dist/error-boundary.js +19 -19
- package/dist/error-message.js +1 -1
- package/dist/field-context.js +7 -5
- package/dist/file-icon.js +23 -21
- package/dist/file-tree/helpers.js +133 -119
- package/dist/file-tree/index.parts.js +3 -3
- package/dist/file-tree/parts.js +418 -127
- package/dist/file-tree/style.js +1 -1
- package/dist/file-tree/use-file-tree-shift.js +43 -30
- package/dist/file-tree/use-file-tree.js +60 -18
- package/dist/file-tree/use-slots.js +220 -192
- package/dist/floating.js +2 -2
- package/dist/format/datetime.js +88 -38
- package/dist/format/duration.js +59 -53
- package/dist/format/index.js +1 -1
- package/dist/format/locale.js +76 -56
- package/dist/format/number.js +77 -61
- package/dist/format/regions.js +4 -2
- package/dist/format/time-zone.js +1 -1
- package/dist/icon-button-size.js +12 -2
- package/dist/icon-picker.js +70 -61
- package/dist/index.js +57 -57
- package/dist/key-value-list/index.parts.js +1 -1
- package/dist/key-value-list/parts.js +256 -22
- package/dist/lazy-landings.js +10 -10
- package/dist/lazy.js +84 -71
- package/dist/locales/en.js +80 -80
- package/dist/locales/nl.js +80 -80
- package/dist/locales.js +10 -7
- package/dist/menu/index.parts.js +1 -1
- package/dist/menu/parts.js +882 -44
- package/dist/merge-refs.js +8 -9
- package/dist/middle-truncate.js +24 -25
- package/dist/modality.js +27 -19
- package/dist/placement.js +11 -20
- package/dist/platform.js +6 -6
- package/dist/popover/index.parts.js +1 -1
- package/dist/popover/parts.js +173 -11
- package/dist/popup-layer.js +38 -17
- package/dist/prefetch.js +78 -79
- package/dist/preview-card/index.parts.js +1 -1
- package/dist/project-switcher-row.js +153 -12
- package/dist/select-row.js +69 -5
- package/dist/select-shared.js +6 -6
- package/dist/selection.js +16 -16
- package/dist/seti-icons.js +413 -413
- package/dist/settings/ConfirmDialog.js +55 -8
- package/dist/settings/DetailHeader.js +72 -4
- package/dist/settings/MasterDetail.js +119 -7
- package/dist/settings/SettingsDialog.js +820 -80
- package/dist/settings/SettingsRow.js +205 -18
- package/dist/settings/SettingsSection.js +96 -6
- package/dist/settings/index.js +7 -7
- package/dist/settings/target.js +7 -2
- package/dist/shortcut-hints.js +73 -55
- package/dist/shortcut.js +140 -104
- package/dist/step-places.js +1 -1
- package/dist/tabs/index.parts.js +1 -1
- package/dist/tabs/overflow.js +18 -18
- package/dist/tabs/parts.js +780 -166
- package/dist/testing/dedupe.js +82 -75
- package/dist/testing/fake-source.js +12 -12
- package/dist/testing/index.js +1 -1
- package/dist/toast-store.js +65 -46
- package/dist/tree/index.parts.js +1 -1
- package/dist/tree/parts.js +721 -94
- package/dist/tree/shift.js +28 -22
- package/dist/tree/style.js +2 -2
- package/dist/tree/use-tree-shift.js +178 -117
- package/dist/useAsyncAction.js +23 -19
- package/dist/useColumnResize.js +36 -34
- package/dist/useContentSize.js +62 -18
- package/dist/useMeasuredWidth.js +14 -3
- package/dist/useNow.js +73 -30
- package/dist/wipe-split.js +14 -14
- package/dist/workspace/DropPreview.js +60 -7
- package/dist/workspace/SplitView.js +1025 -441
- package/dist/workspace/TabStrip.js +810 -191
- package/dist/workspace/Workspace.js +276 -26
- package/dist/workspace/context.js +8 -3
- package/dist/workspace/geometry.js +173 -150
- package/dist/workspace/model.js +313 -250
- package/dist/workspace/preview.js +61 -61
- package/dist/zoom.js +2 -2
- package/package.json +1 -1
- package/src/ErrorBoundary.tsx +1 -1
- package/src/Field.tsx +4 -3
- package/src/IconPicker.tsx +3 -3
- package/src/LazyBoundary.tsx +2 -0
- package/src/MiddleTruncate.tsx +2 -2
- package/src/SegmentBar.tsx +2 -2
- package/src/Toasts.tsx +3 -1
- package/src/Tooltip.tsx +7 -10
- package/src/Waveform.tsx +3 -3
- package/src/file-tree/parts.tsx +6 -9
- package/src/file-tree/use-file-tree-shift.tsx +6 -9
- package/src/lazy.tsx +4 -0
- package/src/locales/en.ts +4 -4
- package/src/locales/nl.ts +5 -5
- package/src/settings/SettingsDialog.tsx +1 -1
- package/src/tree/parts.tsx +5 -8
- package/src/useContentSize.ts +3 -3
- package/src/workspace/SplitView.tsx +2 -2
- package/src/workspace/TabStrip.tsx +2 -3
- package/src/workspace/Workspace.tsx +2 -5
package/dist/tree/parts.js
CHANGED
|
@@ -1,113 +1,740 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { useRender } from '@base-ui/react/use-render';
|
|
5
5
|
import { ChevronRight } from 'lucide-react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { Checkbox as UICheckbox } from
|
|
8
|
-
import { Icon } from
|
|
7
|
+
import { Checkbox as UICheckbox } from "../Checkbox.js";
|
|
8
|
+
import { Icon } from "../Icon.js";
|
|
9
9
|
import { mergeRefs } from '../merge-refs.js';
|
|
10
10
|
import { treeRowStyle } from './style.js';
|
|
11
|
-
import { TREE_ROWS, useTreeShift } from
|
|
11
|
+
import { TREE_ROWS, useTreeShift } from "./use-tree-shift.js";
|
|
12
12
|
/* A handler that keeps the event to the control, so the row under it never sees the press. */
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
const stopped = handler => event => {
|
|
15
|
+
event.stopPropagation();
|
|
16
|
+
handler?.(event);
|
|
16
17
|
};
|
|
17
|
-
export function TreeRoot(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
18
|
+
export function TreeRoot(t0) {
|
|
19
|
+
const $ = _c(26);
|
|
20
|
+
let children;
|
|
21
|
+
let className;
|
|
22
|
+
let props;
|
|
23
|
+
let ref;
|
|
24
|
+
let render;
|
|
25
|
+
let t1;
|
|
26
|
+
if ($[0] !== t0) {
|
|
27
|
+
({
|
|
28
|
+
overflow: t1,
|
|
29
|
+
render,
|
|
30
|
+
className,
|
|
31
|
+
ref,
|
|
32
|
+
children,
|
|
33
|
+
...props
|
|
34
|
+
} = t0);
|
|
35
|
+
$[0] = t0;
|
|
36
|
+
$[1] = children;
|
|
37
|
+
$[2] = className;
|
|
38
|
+
$[3] = props;
|
|
39
|
+
$[4] = ref;
|
|
40
|
+
$[5] = render;
|
|
41
|
+
$[6] = t1;
|
|
42
|
+
} else {
|
|
43
|
+
children = $[1];
|
|
44
|
+
className = $[2];
|
|
45
|
+
props = $[3];
|
|
46
|
+
ref = $[4];
|
|
47
|
+
render = $[5];
|
|
48
|
+
t1 = $[6];
|
|
49
|
+
}
|
|
50
|
+
const overflow = t1 === undefined ? "truncate" : t1;
|
|
51
|
+
const {
|
|
52
|
+
attach,
|
|
53
|
+
bar
|
|
54
|
+
} = useTreeShift(TREE_ROWS);
|
|
55
|
+
const scrolls = overflow === "scroll";
|
|
56
|
+
let t2;
|
|
57
|
+
if ($[7] !== attach || $[8] !== ref || $[9] !== scrolls) {
|
|
58
|
+
t2 = node => {
|
|
59
|
+
attach(scrolls ? node : null);
|
|
60
|
+
mergeRefs(ref)(node);
|
|
61
|
+
};
|
|
62
|
+
$[7] = attach;
|
|
63
|
+
$[8] = ref;
|
|
64
|
+
$[9] = scrolls;
|
|
65
|
+
$[10] = t2;
|
|
66
|
+
} else {
|
|
67
|
+
t2 = $[10];
|
|
68
|
+
}
|
|
69
|
+
const rootRef = t2;
|
|
70
|
+
let t3;
|
|
71
|
+
if ($[11] !== className) {
|
|
72
|
+
t3 = clsx("adecore-tree", className);
|
|
73
|
+
$[11] = className;
|
|
74
|
+
$[12] = t3;
|
|
75
|
+
} else {
|
|
76
|
+
t3 = $[12];
|
|
77
|
+
}
|
|
78
|
+
let t4;
|
|
79
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
80
|
+
t4 = /*#__PURE__*/_jsx("style", {
|
|
81
|
+
children: treeRowStyle(".adecore-tree-row")
|
|
35
82
|
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
'aria-selected': selected,
|
|
46
|
-
...props,
|
|
47
|
-
'data-selected': selected,
|
|
48
|
-
'data-joined-start': joinedStart,
|
|
49
|
-
'data-joined-end': joinedEnd,
|
|
50
|
-
'data-interactive': interactive,
|
|
51
|
-
className: clsx('adecore-tree-row', className),
|
|
52
|
-
style: { paddingInlineStart: 4 + (Math.max(1, level) - 1) * 16, ...style },
|
|
53
|
-
children: (_jsxs(_Fragment, { children: [Array.from({ length: Math.max(0, level - 1) }, (_, index) => (_jsx("span", { "aria-hidden": true, className: "adecore-tree-guide", style: { insetInlineStart: 11 + index * 16 } }, index))), children] }))
|
|
54
|
-
}
|
|
83
|
+
$[13] = t4;
|
|
84
|
+
} else {
|
|
85
|
+
t4 = $[13];
|
|
86
|
+
}
|
|
87
|
+
const t5 = scrolls && bar;
|
|
88
|
+
let t6;
|
|
89
|
+
if ($[14] !== children || $[15] !== t5) {
|
|
90
|
+
t6 = /*#__PURE__*/_jsxs(_Fragment, {
|
|
91
|
+
children: [t4, children, t5]
|
|
55
92
|
});
|
|
93
|
+
$[14] = children;
|
|
94
|
+
$[15] = t5;
|
|
95
|
+
$[16] = t6;
|
|
96
|
+
} else {
|
|
97
|
+
t6 = $[16];
|
|
98
|
+
}
|
|
99
|
+
let t7;
|
|
100
|
+
if ($[17] !== overflow || $[18] !== props || $[19] !== t3 || $[20] !== t6) {
|
|
101
|
+
t7 = {
|
|
102
|
+
role: "tree",
|
|
103
|
+
...props,
|
|
104
|
+
"data-overflow": overflow,
|
|
105
|
+
className: t3,
|
|
106
|
+
children: t6
|
|
107
|
+
};
|
|
108
|
+
$[17] = overflow;
|
|
109
|
+
$[18] = props;
|
|
110
|
+
$[19] = t3;
|
|
111
|
+
$[20] = t6;
|
|
112
|
+
$[21] = t7;
|
|
113
|
+
} else {
|
|
114
|
+
t7 = $[21];
|
|
115
|
+
}
|
|
116
|
+
let t8;
|
|
117
|
+
if ($[22] !== render || $[23] !== rootRef || $[24] !== t7) {
|
|
118
|
+
t8 = {
|
|
119
|
+
render,
|
|
120
|
+
ref: rootRef,
|
|
121
|
+
defaultTagName: "div",
|
|
122
|
+
props: t7
|
|
123
|
+
};
|
|
124
|
+
$[22] = render;
|
|
125
|
+
$[23] = rootRef;
|
|
126
|
+
$[24] = t7;
|
|
127
|
+
$[25] = t8;
|
|
128
|
+
} else {
|
|
129
|
+
t8 = $[25];
|
|
130
|
+
}
|
|
131
|
+
return useRender(t8);
|
|
56
132
|
}
|
|
57
|
-
export function
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
133
|
+
export function TreeRow(t0) {
|
|
134
|
+
const $ = _c(36);
|
|
135
|
+
let children;
|
|
136
|
+
let className;
|
|
137
|
+
let props;
|
|
138
|
+
let ref;
|
|
139
|
+
let render;
|
|
140
|
+
let style;
|
|
141
|
+
let t1;
|
|
142
|
+
let t2;
|
|
143
|
+
let t3;
|
|
144
|
+
let t4;
|
|
145
|
+
let t5;
|
|
146
|
+
if ($[0] !== t0) {
|
|
147
|
+
({
|
|
148
|
+
level: t1,
|
|
149
|
+
selected: t2,
|
|
150
|
+
joinedStart: t3,
|
|
151
|
+
joinedEnd: t4,
|
|
152
|
+
interactive: t5,
|
|
153
|
+
render,
|
|
154
|
+
className,
|
|
155
|
+
ref,
|
|
156
|
+
style,
|
|
157
|
+
children,
|
|
158
|
+
...props
|
|
159
|
+
} = t0);
|
|
160
|
+
$[0] = t0;
|
|
161
|
+
$[1] = children;
|
|
162
|
+
$[2] = className;
|
|
163
|
+
$[3] = props;
|
|
164
|
+
$[4] = ref;
|
|
165
|
+
$[5] = render;
|
|
166
|
+
$[6] = style;
|
|
167
|
+
$[7] = t1;
|
|
168
|
+
$[8] = t2;
|
|
169
|
+
$[9] = t3;
|
|
170
|
+
$[10] = t4;
|
|
171
|
+
$[11] = t5;
|
|
172
|
+
} else {
|
|
173
|
+
children = $[1];
|
|
174
|
+
className = $[2];
|
|
175
|
+
props = $[3];
|
|
176
|
+
ref = $[4];
|
|
177
|
+
render = $[5];
|
|
178
|
+
style = $[6];
|
|
179
|
+
t1 = $[7];
|
|
180
|
+
t2 = $[8];
|
|
181
|
+
t3 = $[9];
|
|
182
|
+
t4 = $[10];
|
|
183
|
+
t5 = $[11];
|
|
184
|
+
}
|
|
185
|
+
const level = t1 === undefined ? 1 : t1;
|
|
186
|
+
const selected = t2 === undefined ? false : t2;
|
|
187
|
+
const joinedStart = t3 === undefined ? false : t3;
|
|
188
|
+
const joinedEnd = t4 === undefined ? false : t4;
|
|
189
|
+
const interactive = t5 === undefined ? true : t5;
|
|
190
|
+
let t6;
|
|
191
|
+
if ($[12] !== className) {
|
|
192
|
+
t6 = clsx("adecore-tree-row", className);
|
|
193
|
+
$[12] = className;
|
|
194
|
+
$[13] = t6;
|
|
195
|
+
} else {
|
|
196
|
+
t6 = $[13];
|
|
197
|
+
}
|
|
198
|
+
const t7 = 4 + (Math.max(1, level) - 1) * 16;
|
|
199
|
+
let t8;
|
|
200
|
+
if ($[14] !== style || $[15] !== t7) {
|
|
201
|
+
t8 = {
|
|
202
|
+
paddingInlineStart: t7,
|
|
203
|
+
...style
|
|
204
|
+
};
|
|
205
|
+
$[14] = style;
|
|
206
|
+
$[15] = t7;
|
|
207
|
+
$[16] = t8;
|
|
208
|
+
} else {
|
|
209
|
+
t8 = $[16];
|
|
210
|
+
}
|
|
211
|
+
let t9;
|
|
212
|
+
if ($[17] !== level) {
|
|
213
|
+
t9 = Array.from({
|
|
214
|
+
length: Math.max(0, level - 1)
|
|
215
|
+
}, _temp);
|
|
216
|
+
$[17] = level;
|
|
217
|
+
$[18] = t9;
|
|
218
|
+
} else {
|
|
219
|
+
t9 = $[18];
|
|
220
|
+
}
|
|
221
|
+
let t10;
|
|
222
|
+
if ($[19] !== children || $[20] !== t9) {
|
|
223
|
+
t10 = /*#__PURE__*/_jsxs(_Fragment, {
|
|
224
|
+
children: [t9, children]
|
|
63
225
|
});
|
|
226
|
+
$[19] = children;
|
|
227
|
+
$[20] = t9;
|
|
228
|
+
$[21] = t10;
|
|
229
|
+
} else {
|
|
230
|
+
t10 = $[21];
|
|
231
|
+
}
|
|
232
|
+
let t11;
|
|
233
|
+
if ($[22] !== interactive || $[23] !== joinedEnd || $[24] !== joinedStart || $[25] !== level || $[26] !== props || $[27] !== selected || $[28] !== t10 || $[29] !== t6 || $[30] !== t8) {
|
|
234
|
+
t11 = {
|
|
235
|
+
role: "treeitem",
|
|
236
|
+
"aria-level": level,
|
|
237
|
+
"aria-selected": selected,
|
|
238
|
+
...props,
|
|
239
|
+
"data-selected": selected,
|
|
240
|
+
"data-joined-start": joinedStart,
|
|
241
|
+
"data-joined-end": joinedEnd,
|
|
242
|
+
"data-interactive": interactive,
|
|
243
|
+
className: t6,
|
|
244
|
+
style: t8,
|
|
245
|
+
children: t10
|
|
246
|
+
};
|
|
247
|
+
$[22] = interactive;
|
|
248
|
+
$[23] = joinedEnd;
|
|
249
|
+
$[24] = joinedStart;
|
|
250
|
+
$[25] = level;
|
|
251
|
+
$[26] = props;
|
|
252
|
+
$[27] = selected;
|
|
253
|
+
$[28] = t10;
|
|
254
|
+
$[29] = t6;
|
|
255
|
+
$[30] = t8;
|
|
256
|
+
$[31] = t11;
|
|
257
|
+
} else {
|
|
258
|
+
t11 = $[31];
|
|
259
|
+
}
|
|
260
|
+
let t12;
|
|
261
|
+
if ($[32] !== ref || $[33] !== render || $[34] !== t11) {
|
|
262
|
+
t12 = {
|
|
263
|
+
render,
|
|
264
|
+
ref,
|
|
265
|
+
defaultTagName: "div",
|
|
266
|
+
props: t11
|
|
267
|
+
};
|
|
268
|
+
$[32] = ref;
|
|
269
|
+
$[33] = render;
|
|
270
|
+
$[34] = t11;
|
|
271
|
+
$[35] = t12;
|
|
272
|
+
} else {
|
|
273
|
+
t12 = $[35];
|
|
274
|
+
}
|
|
275
|
+
return useRender(t12);
|
|
276
|
+
}
|
|
277
|
+
function _temp(_, index) {
|
|
278
|
+
return /*#__PURE__*/_jsx("span", {
|
|
279
|
+
"aria-hidden": true,
|
|
280
|
+
className: "adecore-tree-guide",
|
|
281
|
+
style: {
|
|
282
|
+
insetInlineStart: 11 + index * 16
|
|
283
|
+
}
|
|
284
|
+
}, index);
|
|
285
|
+
}
|
|
286
|
+
export function TreeChevronSlot(t0) {
|
|
287
|
+
const $ = _c(14);
|
|
288
|
+
let className;
|
|
289
|
+
let props;
|
|
290
|
+
let ref;
|
|
291
|
+
let render;
|
|
292
|
+
if ($[0] !== t0) {
|
|
293
|
+
({
|
|
294
|
+
render,
|
|
295
|
+
className,
|
|
296
|
+
ref,
|
|
297
|
+
...props
|
|
298
|
+
} = t0);
|
|
299
|
+
$[0] = t0;
|
|
300
|
+
$[1] = className;
|
|
301
|
+
$[2] = props;
|
|
302
|
+
$[3] = ref;
|
|
303
|
+
$[4] = render;
|
|
304
|
+
} else {
|
|
305
|
+
className = $[1];
|
|
306
|
+
props = $[2];
|
|
307
|
+
ref = $[3];
|
|
308
|
+
render = $[4];
|
|
309
|
+
}
|
|
310
|
+
let t1;
|
|
311
|
+
if ($[5] !== className) {
|
|
312
|
+
t1 = clsx("adecore-tree-chevron-slot", className);
|
|
313
|
+
$[5] = className;
|
|
314
|
+
$[6] = t1;
|
|
315
|
+
} else {
|
|
316
|
+
t1 = $[6];
|
|
317
|
+
}
|
|
318
|
+
let t2;
|
|
319
|
+
if ($[7] !== props || $[8] !== t1) {
|
|
320
|
+
t2 = {
|
|
321
|
+
"aria-hidden": true,
|
|
322
|
+
...props,
|
|
323
|
+
className: t1
|
|
324
|
+
};
|
|
325
|
+
$[7] = props;
|
|
326
|
+
$[8] = t1;
|
|
327
|
+
$[9] = t2;
|
|
328
|
+
} else {
|
|
329
|
+
t2 = $[9];
|
|
330
|
+
}
|
|
331
|
+
let t3;
|
|
332
|
+
if ($[10] !== ref || $[11] !== render || $[12] !== t2) {
|
|
333
|
+
t3 = {
|
|
334
|
+
render,
|
|
335
|
+
ref,
|
|
336
|
+
defaultTagName: "span",
|
|
337
|
+
props: t2
|
|
338
|
+
};
|
|
339
|
+
$[10] = ref;
|
|
340
|
+
$[11] = render;
|
|
341
|
+
$[12] = t2;
|
|
342
|
+
$[13] = t3;
|
|
343
|
+
} else {
|
|
344
|
+
t3 = $[13];
|
|
345
|
+
}
|
|
346
|
+
return useRender(t3);
|
|
64
347
|
}
|
|
65
|
-
export function TreeChevron(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
348
|
+
export function TreeChevron(t0) {
|
|
349
|
+
const $ = _c(33);
|
|
350
|
+
let className;
|
|
351
|
+
let expanded;
|
|
352
|
+
let onClick;
|
|
353
|
+
let onDoubleClick;
|
|
354
|
+
let onExpandedChange;
|
|
355
|
+
let props;
|
|
356
|
+
let ref;
|
|
357
|
+
let render;
|
|
358
|
+
if ($[0] !== t0) {
|
|
359
|
+
({
|
|
360
|
+
expanded,
|
|
361
|
+
onExpandedChange,
|
|
362
|
+
render,
|
|
363
|
+
className,
|
|
364
|
+
ref,
|
|
365
|
+
onClick,
|
|
366
|
+
onDoubleClick,
|
|
367
|
+
...props
|
|
368
|
+
} = t0);
|
|
369
|
+
$[0] = t0;
|
|
370
|
+
$[1] = className;
|
|
371
|
+
$[2] = expanded;
|
|
372
|
+
$[3] = onClick;
|
|
373
|
+
$[4] = onDoubleClick;
|
|
374
|
+
$[5] = onExpandedChange;
|
|
375
|
+
$[6] = props;
|
|
376
|
+
$[7] = ref;
|
|
377
|
+
$[8] = render;
|
|
378
|
+
} else {
|
|
379
|
+
className = $[1];
|
|
380
|
+
expanded = $[2];
|
|
381
|
+
onClick = $[3];
|
|
382
|
+
onDoubleClick = $[4];
|
|
383
|
+
onExpandedChange = $[5];
|
|
384
|
+
props = $[6];
|
|
385
|
+
ref = $[7];
|
|
386
|
+
render = $[8];
|
|
387
|
+
}
|
|
388
|
+
const {
|
|
389
|
+
t
|
|
390
|
+
} = useTranslation("ui");
|
|
391
|
+
const t1 = expanded ? "tree.collapse" : "tree.expand";
|
|
392
|
+
let t2;
|
|
393
|
+
if ($[9] !== t || $[10] !== t1) {
|
|
394
|
+
t2 = t(t1);
|
|
395
|
+
$[9] = t;
|
|
396
|
+
$[10] = t1;
|
|
397
|
+
$[11] = t2;
|
|
398
|
+
} else {
|
|
399
|
+
t2 = $[11];
|
|
400
|
+
}
|
|
401
|
+
let t3;
|
|
402
|
+
if ($[12] !== className) {
|
|
403
|
+
t3 = clsx("adecore-tree-chevron-slot", className);
|
|
404
|
+
$[12] = className;
|
|
405
|
+
$[13] = t3;
|
|
406
|
+
} else {
|
|
407
|
+
t3 = $[13];
|
|
408
|
+
}
|
|
409
|
+
let t4;
|
|
410
|
+
if ($[14] !== expanded || $[15] !== onClick || $[16] !== onExpandedChange) {
|
|
411
|
+
t4 = event => {
|
|
412
|
+
event.stopPropagation();
|
|
413
|
+
onClick?.(event);
|
|
414
|
+
if (!event.defaultPrevented) {
|
|
415
|
+
onExpandedChange?.(!expanded);
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
$[14] = expanded;
|
|
419
|
+
$[15] = onClick;
|
|
420
|
+
$[16] = onExpandedChange;
|
|
421
|
+
$[17] = t4;
|
|
422
|
+
} else {
|
|
423
|
+
t4 = $[17];
|
|
424
|
+
}
|
|
425
|
+
let t5;
|
|
426
|
+
if ($[18] !== onDoubleClick) {
|
|
427
|
+
t5 = stopped(onDoubleClick);
|
|
428
|
+
$[18] = onDoubleClick;
|
|
429
|
+
$[19] = t5;
|
|
430
|
+
} else {
|
|
431
|
+
t5 = $[19];
|
|
432
|
+
}
|
|
433
|
+
const t6 = expanded ? "rotate-90" : undefined;
|
|
434
|
+
let t7;
|
|
435
|
+
if ($[20] !== t6) {
|
|
436
|
+
t7 = /*#__PURE__*/_jsx(Icon, {
|
|
437
|
+
icon: ChevronRight,
|
|
438
|
+
size: 12,
|
|
439
|
+
className: t6
|
|
87
440
|
});
|
|
441
|
+
$[20] = t6;
|
|
442
|
+
$[21] = t7;
|
|
443
|
+
} else {
|
|
444
|
+
t7 = $[21];
|
|
445
|
+
}
|
|
446
|
+
let t8;
|
|
447
|
+
if ($[22] !== props || $[23] !== t2 || $[24] !== t3 || $[25] !== t4 || $[26] !== t5 || $[27] !== t7) {
|
|
448
|
+
t8 = {
|
|
449
|
+
type: "button",
|
|
450
|
+
tabIndex: -1,
|
|
451
|
+
"aria-label": t2,
|
|
452
|
+
...props,
|
|
453
|
+
className: t3,
|
|
454
|
+
onClick: t4,
|
|
455
|
+
onDoubleClick: t5,
|
|
456
|
+
children: t7
|
|
457
|
+
};
|
|
458
|
+
$[22] = props;
|
|
459
|
+
$[23] = t2;
|
|
460
|
+
$[24] = t3;
|
|
461
|
+
$[25] = t4;
|
|
462
|
+
$[26] = t5;
|
|
463
|
+
$[27] = t7;
|
|
464
|
+
$[28] = t8;
|
|
465
|
+
} else {
|
|
466
|
+
t8 = $[28];
|
|
467
|
+
}
|
|
468
|
+
let t9;
|
|
469
|
+
if ($[29] !== ref || $[30] !== render || $[31] !== t8) {
|
|
470
|
+
t9 = {
|
|
471
|
+
render,
|
|
472
|
+
ref,
|
|
473
|
+
defaultTagName: "button",
|
|
474
|
+
props: t8
|
|
475
|
+
};
|
|
476
|
+
$[29] = ref;
|
|
477
|
+
$[30] = render;
|
|
478
|
+
$[31] = t8;
|
|
479
|
+
$[32] = t9;
|
|
480
|
+
} else {
|
|
481
|
+
t9 = $[32];
|
|
482
|
+
}
|
|
483
|
+
return useRender(t9);
|
|
88
484
|
}
|
|
89
|
-
export function TreeLabel(
|
|
90
|
-
|
|
485
|
+
export function TreeLabel(t0) {
|
|
486
|
+
const $ = _c(14);
|
|
487
|
+
let className;
|
|
488
|
+
let props;
|
|
489
|
+
let ref;
|
|
490
|
+
let render;
|
|
491
|
+
if ($[0] !== t0) {
|
|
492
|
+
({
|
|
493
|
+
render,
|
|
494
|
+
className,
|
|
495
|
+
ref,
|
|
496
|
+
...props
|
|
497
|
+
} = t0);
|
|
498
|
+
$[0] = t0;
|
|
499
|
+
$[1] = className;
|
|
500
|
+
$[2] = props;
|
|
501
|
+
$[3] = ref;
|
|
502
|
+
$[4] = render;
|
|
503
|
+
} else {
|
|
504
|
+
className = $[1];
|
|
505
|
+
props = $[2];
|
|
506
|
+
ref = $[3];
|
|
507
|
+
render = $[4];
|
|
508
|
+
}
|
|
509
|
+
let t1;
|
|
510
|
+
if ($[5] !== className) {
|
|
511
|
+
t1 = clsx("adecore-tree-label", className);
|
|
512
|
+
$[5] = className;
|
|
513
|
+
$[6] = t1;
|
|
514
|
+
} else {
|
|
515
|
+
t1 = $[6];
|
|
516
|
+
}
|
|
517
|
+
let t2;
|
|
518
|
+
if ($[7] !== props || $[8] !== t1) {
|
|
519
|
+
t2 = {
|
|
520
|
+
...props,
|
|
521
|
+
className: t1
|
|
522
|
+
};
|
|
523
|
+
$[7] = props;
|
|
524
|
+
$[8] = t1;
|
|
525
|
+
$[9] = t2;
|
|
526
|
+
} else {
|
|
527
|
+
t2 = $[9];
|
|
528
|
+
}
|
|
529
|
+
let t3;
|
|
530
|
+
if ($[10] !== ref || $[11] !== render || $[12] !== t2) {
|
|
531
|
+
t3 = {
|
|
532
|
+
render,
|
|
533
|
+
ref,
|
|
534
|
+
defaultTagName: "span",
|
|
535
|
+
props: t2
|
|
536
|
+
};
|
|
537
|
+
$[10] = ref;
|
|
538
|
+
$[11] = render;
|
|
539
|
+
$[12] = t2;
|
|
540
|
+
$[13] = t3;
|
|
541
|
+
} else {
|
|
542
|
+
t3 = $[13];
|
|
543
|
+
}
|
|
544
|
+
return useRender(t3);
|
|
91
545
|
}
|
|
92
|
-
export function TreeDecoration(
|
|
93
|
-
|
|
546
|
+
export function TreeDecoration(t0) {
|
|
547
|
+
const $ = _c(14);
|
|
548
|
+
let className;
|
|
549
|
+
let props;
|
|
550
|
+
let ref;
|
|
551
|
+
let render;
|
|
552
|
+
if ($[0] !== t0) {
|
|
553
|
+
({
|
|
554
|
+
render,
|
|
555
|
+
className,
|
|
556
|
+
ref,
|
|
557
|
+
...props
|
|
558
|
+
} = t0);
|
|
559
|
+
$[0] = t0;
|
|
560
|
+
$[1] = className;
|
|
561
|
+
$[2] = props;
|
|
562
|
+
$[3] = ref;
|
|
563
|
+
$[4] = render;
|
|
564
|
+
} else {
|
|
565
|
+
className = $[1];
|
|
566
|
+
props = $[2];
|
|
567
|
+
ref = $[3];
|
|
568
|
+
render = $[4];
|
|
569
|
+
}
|
|
570
|
+
let t1;
|
|
571
|
+
if ($[5] !== className) {
|
|
572
|
+
t1 = clsx("adecore-tree-decoration", className);
|
|
573
|
+
$[5] = className;
|
|
574
|
+
$[6] = t1;
|
|
575
|
+
} else {
|
|
576
|
+
t1 = $[6];
|
|
577
|
+
}
|
|
578
|
+
let t2;
|
|
579
|
+
if ($[7] !== props || $[8] !== t1) {
|
|
580
|
+
t2 = {
|
|
581
|
+
...props,
|
|
582
|
+
className: t1
|
|
583
|
+
};
|
|
584
|
+
$[7] = props;
|
|
585
|
+
$[8] = t1;
|
|
586
|
+
$[9] = t2;
|
|
587
|
+
} else {
|
|
588
|
+
t2 = $[9];
|
|
589
|
+
}
|
|
590
|
+
let t3;
|
|
591
|
+
if ($[10] !== ref || $[11] !== render || $[12] !== t2) {
|
|
592
|
+
t3 = {
|
|
593
|
+
render,
|
|
594
|
+
ref,
|
|
595
|
+
defaultTagName: "span",
|
|
596
|
+
props: t2
|
|
597
|
+
};
|
|
598
|
+
$[10] = ref;
|
|
599
|
+
$[11] = render;
|
|
600
|
+
$[12] = t2;
|
|
601
|
+
$[13] = t3;
|
|
602
|
+
} else {
|
|
603
|
+
t3 = $[13];
|
|
604
|
+
}
|
|
605
|
+
return useRender(t3);
|
|
94
606
|
}
|
|
95
|
-
export function TreeControl(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
607
|
+
export function TreeControl(t0) {
|
|
608
|
+
const $ = _c(30);
|
|
609
|
+
let className;
|
|
610
|
+
let onClick;
|
|
611
|
+
let onDoubleClick;
|
|
612
|
+
let onKeyDown;
|
|
613
|
+
let onPointerDown;
|
|
614
|
+
let props;
|
|
615
|
+
let ref;
|
|
616
|
+
let render;
|
|
617
|
+
if ($[0] !== t0) {
|
|
618
|
+
({
|
|
619
|
+
render,
|
|
620
|
+
className,
|
|
621
|
+
ref,
|
|
622
|
+
onClick,
|
|
623
|
+
onDoubleClick,
|
|
624
|
+
onKeyDown,
|
|
625
|
+
onPointerDown,
|
|
626
|
+
...props
|
|
627
|
+
} = t0);
|
|
628
|
+
$[0] = t0;
|
|
629
|
+
$[1] = className;
|
|
630
|
+
$[2] = onClick;
|
|
631
|
+
$[3] = onDoubleClick;
|
|
632
|
+
$[4] = onKeyDown;
|
|
633
|
+
$[5] = onPointerDown;
|
|
634
|
+
$[6] = props;
|
|
635
|
+
$[7] = ref;
|
|
636
|
+
$[8] = render;
|
|
637
|
+
} else {
|
|
638
|
+
className = $[1];
|
|
639
|
+
onClick = $[2];
|
|
640
|
+
onDoubleClick = $[3];
|
|
641
|
+
onKeyDown = $[4];
|
|
642
|
+
onPointerDown = $[5];
|
|
643
|
+
props = $[6];
|
|
644
|
+
ref = $[7];
|
|
645
|
+
render = $[8];
|
|
646
|
+
}
|
|
647
|
+
let t1;
|
|
648
|
+
if ($[9] !== className) {
|
|
649
|
+
t1 = clsx("adecore-tree-control", className);
|
|
650
|
+
$[9] = className;
|
|
651
|
+
$[10] = t1;
|
|
652
|
+
} else {
|
|
653
|
+
t1 = $[10];
|
|
654
|
+
}
|
|
655
|
+
let t2;
|
|
656
|
+
if ($[11] !== onClick) {
|
|
657
|
+
t2 = stopped(onClick);
|
|
658
|
+
$[11] = onClick;
|
|
659
|
+
$[12] = t2;
|
|
660
|
+
} else {
|
|
661
|
+
t2 = $[12];
|
|
662
|
+
}
|
|
663
|
+
let t3;
|
|
664
|
+
if ($[13] !== onDoubleClick) {
|
|
665
|
+
t3 = stopped(onDoubleClick);
|
|
666
|
+
$[13] = onDoubleClick;
|
|
667
|
+
$[14] = t3;
|
|
668
|
+
} else {
|
|
669
|
+
t3 = $[14];
|
|
670
|
+
}
|
|
671
|
+
let t4;
|
|
672
|
+
if ($[15] !== onKeyDown) {
|
|
673
|
+
t4 = stopped(onKeyDown);
|
|
674
|
+
$[15] = onKeyDown;
|
|
675
|
+
$[16] = t4;
|
|
676
|
+
} else {
|
|
677
|
+
t4 = $[16];
|
|
678
|
+
}
|
|
679
|
+
let t5;
|
|
680
|
+
if ($[17] !== onPointerDown) {
|
|
681
|
+
t5 = stopped(onPointerDown);
|
|
682
|
+
$[17] = onPointerDown;
|
|
683
|
+
$[18] = t5;
|
|
684
|
+
} else {
|
|
685
|
+
t5 = $[18];
|
|
686
|
+
}
|
|
687
|
+
let t6;
|
|
688
|
+
if ($[19] !== props || $[20] !== t1 || $[21] !== t2 || $[22] !== t3 || $[23] !== t4 || $[24] !== t5) {
|
|
689
|
+
t6 = {
|
|
690
|
+
...props,
|
|
691
|
+
"data-tree-control": true,
|
|
692
|
+
className: t1,
|
|
693
|
+
onClick: t2,
|
|
694
|
+
onDoubleClick: t3,
|
|
695
|
+
onKeyDown: t4,
|
|
696
|
+
onPointerDown: t5
|
|
697
|
+
};
|
|
698
|
+
$[19] = props;
|
|
699
|
+
$[20] = t1;
|
|
700
|
+
$[21] = t2;
|
|
701
|
+
$[22] = t3;
|
|
702
|
+
$[23] = t4;
|
|
703
|
+
$[24] = t5;
|
|
704
|
+
$[25] = t6;
|
|
705
|
+
} else {
|
|
706
|
+
t6 = $[25];
|
|
707
|
+
}
|
|
708
|
+
let t7;
|
|
709
|
+
if ($[26] !== ref || $[27] !== render || $[28] !== t6) {
|
|
710
|
+
t7 = {
|
|
711
|
+
render,
|
|
712
|
+
ref,
|
|
713
|
+
defaultTagName: "span",
|
|
714
|
+
props: t6
|
|
715
|
+
};
|
|
716
|
+
$[26] = ref;
|
|
717
|
+
$[27] = render;
|
|
718
|
+
$[28] = t6;
|
|
719
|
+
$[29] = t7;
|
|
720
|
+
} else {
|
|
721
|
+
t7 = $[29];
|
|
722
|
+
}
|
|
723
|
+
return useRender(t7);
|
|
110
724
|
}
|
|
111
725
|
export function TreeCheckbox(props) {
|
|
112
|
-
|
|
113
|
-
|
|
726
|
+
const $ = _c(2);
|
|
727
|
+
let t0;
|
|
728
|
+
if ($[0] !== props) {
|
|
729
|
+
t0 = /*#__PURE__*/_jsx(TreeControl, {
|
|
730
|
+
children: /*#__PURE__*/_jsx(UICheckbox, {
|
|
731
|
+
...props
|
|
732
|
+
})
|
|
733
|
+
});
|
|
734
|
+
$[0] = props;
|
|
735
|
+
$[1] = t0;
|
|
736
|
+
} else {
|
|
737
|
+
t0 = $[1];
|
|
738
|
+
}
|
|
739
|
+
return t0;
|
|
740
|
+
}
|