@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/Tooltip.js
CHANGED
|
@@ -1,21 +1,158 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import 'react';
|
|
3
3
|
import { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';
|
|
4
|
-
import { Kbd } from
|
|
4
|
+
import { Kbd } from "./Kbd.js";
|
|
5
5
|
import { registerShortcutHint } from './shortcut-hints.js';
|
|
6
6
|
/* One provider per app. Tooltips share a delay, so moving along a row of buttons feels instant. `UIProvider` mounts it. */
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
export function TooltipProvider(t0) {
|
|
9
|
+
const $ = _c(2);
|
|
10
|
+
const {
|
|
11
|
+
children
|
|
12
|
+
} = t0;
|
|
13
|
+
let t1;
|
|
14
|
+
if ($[0] !== children) {
|
|
15
|
+
t1 = /*#__PURE__*/_jsx(BaseTooltip.Provider, {
|
|
16
|
+
delay: 150,
|
|
17
|
+
closeDelay: 0,
|
|
18
|
+
children: children
|
|
19
|
+
});
|
|
20
|
+
$[0] = children;
|
|
21
|
+
$[1] = t1;
|
|
22
|
+
} else {
|
|
23
|
+
t1 = $[1];
|
|
24
|
+
}
|
|
25
|
+
return t1;
|
|
9
26
|
}
|
|
10
27
|
/* A hint on hover and on keyboard focus. Every hint in an app is one of these, never a `title`. */
|
|
11
|
-
export function Tooltip(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
export function Tooltip(t0) {
|
|
29
|
+
const $ = _c(26);
|
|
30
|
+
const {
|
|
31
|
+
label,
|
|
32
|
+
open,
|
|
33
|
+
onOpenChange,
|
|
34
|
+
anchor,
|
|
35
|
+
kbd,
|
|
36
|
+
side: t1,
|
|
37
|
+
sideOffset: t2,
|
|
38
|
+
name: t3,
|
|
39
|
+
disabled: t4,
|
|
40
|
+
children
|
|
41
|
+
} = t0;
|
|
42
|
+
const side = t1 === undefined ? "top" : t1;
|
|
43
|
+
const sideOffset = t2 === undefined ? 6 : t2;
|
|
44
|
+
const name = t3 === undefined ? false : t3;
|
|
45
|
+
const disabled = t4 === undefined ? false : t4;
|
|
46
|
+
let t5;
|
|
47
|
+
if ($[0] !== kbd) {
|
|
48
|
+
t5 = element => {
|
|
49
|
+
if (element === null || kbd === undefined || typeof kbd === "string") {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
return registerShortcutHint(element, kbd);
|
|
53
|
+
};
|
|
54
|
+
$[0] = kbd;
|
|
55
|
+
$[1] = t5;
|
|
56
|
+
} else {
|
|
57
|
+
t5 = $[1];
|
|
58
|
+
}
|
|
59
|
+
const hintRef = t5;
|
|
60
|
+
const t6 = children === undefined;
|
|
61
|
+
let t7;
|
|
62
|
+
if ($[2] !== children || $[3] !== hintRef || $[4] !== label || $[5] !== name) {
|
|
63
|
+
t7 = children && /*#__PURE__*/_jsx(BaseTooltip.Trigger, {
|
|
64
|
+
ref: hintRef,
|
|
65
|
+
render: children,
|
|
66
|
+
"aria-label": name && typeof label === "string" ? label : undefined
|
|
67
|
+
});
|
|
68
|
+
$[2] = children;
|
|
69
|
+
$[3] = hintRef;
|
|
70
|
+
$[4] = label;
|
|
71
|
+
$[5] = name;
|
|
72
|
+
$[6] = t7;
|
|
73
|
+
} else {
|
|
74
|
+
t7 = $[6];
|
|
75
|
+
}
|
|
76
|
+
let t8;
|
|
77
|
+
if ($[7] !== label) {
|
|
78
|
+
t8 = /*#__PURE__*/_jsx("span", {
|
|
79
|
+
className: "wrap-anywhere",
|
|
80
|
+
children: label
|
|
81
|
+
});
|
|
82
|
+
$[7] = label;
|
|
83
|
+
$[8] = t8;
|
|
84
|
+
} else {
|
|
85
|
+
t8 = $[8];
|
|
86
|
+
}
|
|
87
|
+
let t9;
|
|
88
|
+
if ($[9] !== kbd) {
|
|
89
|
+
t9 = kbd !== undefined && (typeof kbd === "string" ? /*#__PURE__*/_jsx(Kbd, {
|
|
90
|
+
variant: "inline",
|
|
91
|
+
className: "ml-2",
|
|
92
|
+
children: kbd
|
|
93
|
+
}) : /*#__PURE__*/_jsx(Kbd, {
|
|
94
|
+
shortcut: kbd,
|
|
95
|
+
variant: "inline",
|
|
96
|
+
className: "ml-2"
|
|
97
|
+
}));
|
|
98
|
+
$[9] = kbd;
|
|
99
|
+
$[10] = t9;
|
|
100
|
+
} else {
|
|
101
|
+
t9 = $[10];
|
|
102
|
+
}
|
|
103
|
+
let t10;
|
|
104
|
+
if ($[11] !== t8 || $[12] !== t9) {
|
|
105
|
+
t10 = /*#__PURE__*/_jsx(BaseTooltip.Popup, {
|
|
106
|
+
role: "tooltip",
|
|
107
|
+
className: "tooltip-popup",
|
|
108
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
109
|
+
className: "max-w-72 px-[9px] py-[5px] text-pretty",
|
|
110
|
+
children: [t8, t9]
|
|
111
|
+
})
|
|
112
|
+
});
|
|
113
|
+
$[11] = t8;
|
|
114
|
+
$[12] = t9;
|
|
115
|
+
$[13] = t10;
|
|
116
|
+
} else {
|
|
117
|
+
t10 = $[13];
|
|
118
|
+
}
|
|
119
|
+
let t11;
|
|
120
|
+
if ($[14] !== anchor || $[15] !== side || $[16] !== sideOffset || $[17] !== t10) {
|
|
121
|
+
t11 = /*#__PURE__*/_jsx(BaseTooltip.Portal, {
|
|
122
|
+
children: /*#__PURE__*/_jsx(BaseTooltip.Positioner, {
|
|
123
|
+
anchor: anchor,
|
|
124
|
+
side: side,
|
|
125
|
+
sideOffset: sideOffset,
|
|
126
|
+
className: "tooltip-positioner",
|
|
127
|
+
children: t10
|
|
128
|
+
})
|
|
129
|
+
});
|
|
130
|
+
$[14] = anchor;
|
|
131
|
+
$[15] = side;
|
|
132
|
+
$[16] = sideOffset;
|
|
133
|
+
$[17] = t10;
|
|
134
|
+
$[18] = t11;
|
|
135
|
+
} else {
|
|
136
|
+
t11 = $[18];
|
|
137
|
+
}
|
|
138
|
+
let t12;
|
|
139
|
+
if ($[19] !== disabled || $[20] !== onOpenChange || $[21] !== open || $[22] !== t11 || $[23] !== t6 || $[24] !== t7) {
|
|
140
|
+
t12 = /*#__PURE__*/_jsxs(BaseTooltip.Root, {
|
|
141
|
+
disabled: disabled,
|
|
142
|
+
open: open,
|
|
143
|
+
onOpenChange: onOpenChange,
|
|
144
|
+
disableHoverablePopup: t6,
|
|
145
|
+
children: [t7, t11]
|
|
146
|
+
});
|
|
147
|
+
$[19] = disabled;
|
|
148
|
+
$[20] = onOpenChange;
|
|
149
|
+
$[21] = open;
|
|
150
|
+
$[22] = t11;
|
|
151
|
+
$[23] = t6;
|
|
152
|
+
$[24] = t7;
|
|
153
|
+
$[25] = t12;
|
|
154
|
+
} else {
|
|
155
|
+
t12 = $[25];
|
|
156
|
+
}
|
|
157
|
+
return t12;
|
|
158
|
+
}
|
package/dist/UIProvider.js
CHANGED
|
@@ -1,26 +1,73 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useLayoutEffect, useState } from 'react';
|
|
3
3
|
import { I18nextProvider } from 'react-i18next';
|
|
4
4
|
import { setFormatSource } from './format/locale.js';
|
|
5
5
|
import { addUiResources } from './locales.js';
|
|
6
6
|
import { startInputModality } from './modality.js';
|
|
7
|
-
import { TooltipProvider } from
|
|
7
|
+
import { TooltipProvider } from "./Tooltip.js";
|
|
8
8
|
/*
|
|
9
9
|
* Everything the library needs from an app, once, around the whole tree: its words in the app's
|
|
10
10
|
* i18next, the source of the formatters, the shared tooltip delay and the note of which input device
|
|
11
11
|
* is in use. Mount it above the first component of the library.
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
export function UIProvider(t0) {
|
|
15
|
+
const $ = _c(7);
|
|
16
|
+
const {
|
|
17
|
+
i18n,
|
|
18
|
+
formatSource,
|
|
19
|
+
children
|
|
20
|
+
} = t0;
|
|
21
|
+
let t1;
|
|
22
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
23
|
+
t1 = {
|
|
24
|
+
i18n: null,
|
|
25
|
+
source: undefined
|
|
26
|
+
};
|
|
27
|
+
$[0] = t1;
|
|
28
|
+
} else {
|
|
29
|
+
t1 = $[0];
|
|
30
|
+
}
|
|
31
|
+
const [handed, setHanded] = useState(t1);
|
|
32
|
+
if (handed.i18n !== i18n || handed.source !== formatSource) {
|
|
33
|
+
addUiResources(i18n);
|
|
34
|
+
if (formatSource !== undefined) {
|
|
35
|
+
setFormatSource(formatSource);
|
|
23
36
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
37
|
+
setHanded({
|
|
38
|
+
i18n,
|
|
39
|
+
source: formatSource
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
let t2;
|
|
43
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
44
|
+
t2 = [];
|
|
45
|
+
$[1] = t2;
|
|
46
|
+
} else {
|
|
47
|
+
t2 = $[1];
|
|
48
|
+
}
|
|
49
|
+
useLayoutEffect(startInputModality, t2);
|
|
50
|
+
let t3;
|
|
51
|
+
if ($[2] !== children) {
|
|
52
|
+
t3 = /*#__PURE__*/_jsx(TooltipProvider, {
|
|
53
|
+
children: children
|
|
54
|
+
});
|
|
55
|
+
$[2] = children;
|
|
56
|
+
$[3] = t3;
|
|
57
|
+
} else {
|
|
58
|
+
t3 = $[3];
|
|
59
|
+
}
|
|
60
|
+
let t4;
|
|
61
|
+
if ($[4] !== i18n || $[5] !== t3) {
|
|
62
|
+
t4 = /*#__PURE__*/_jsx(I18nextProvider, {
|
|
63
|
+
i18n: i18n,
|
|
64
|
+
children: t3
|
|
65
|
+
});
|
|
66
|
+
$[4] = i18n;
|
|
67
|
+
$[5] = t3;
|
|
68
|
+
$[6] = t4;
|
|
69
|
+
} else {
|
|
70
|
+
t4 = $[6];
|
|
71
|
+
}
|
|
72
|
+
return t4;
|
|
73
|
+
}
|