@adecore/ui 0.31.12 → 0.32.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
|
@@ -1,9 +1,56 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PromptDialog } from
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { PromptDialog } from "../PromptDialog.js";
|
|
3
3
|
/* One destructive step, asked before it happens, over whichever dialog it was opened from. */
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
export function ConfirmDialog(t0) {
|
|
6
|
+
const $ = _c(12);
|
|
7
|
+
const {
|
|
8
|
+
open,
|
|
9
|
+
onOpenChange,
|
|
10
|
+
title,
|
|
11
|
+
description,
|
|
12
|
+
confirmLabel,
|
|
13
|
+
onConfirm,
|
|
14
|
+
className,
|
|
15
|
+
ref
|
|
16
|
+
} = t0;
|
|
17
|
+
let t1;
|
|
18
|
+
if ($[0] !== onConfirm || $[1] !== onOpenChange) {
|
|
19
|
+
t1 = async () => {
|
|
20
|
+
await onConfirm();
|
|
21
|
+
onOpenChange(false);
|
|
22
|
+
};
|
|
23
|
+
$[0] = onConfirm;
|
|
24
|
+
$[1] = onOpenChange;
|
|
25
|
+
$[2] = t1;
|
|
26
|
+
} else {
|
|
27
|
+
t1 = $[2];
|
|
28
|
+
}
|
|
29
|
+
let t2;
|
|
30
|
+
if ($[3] !== className || $[4] !== confirmLabel || $[5] !== description || $[6] !== onOpenChange || $[7] !== open || $[8] !== ref || $[9] !== t1 || $[10] !== title) {
|
|
31
|
+
t2 = /*#__PURE__*/_jsx(PromptDialog, {
|
|
32
|
+
ref: ref,
|
|
33
|
+
className: className,
|
|
34
|
+
open: open,
|
|
35
|
+
nested: true,
|
|
36
|
+
danger: true,
|
|
37
|
+
title: title,
|
|
38
|
+
description: description,
|
|
39
|
+
confirmLabel: confirmLabel,
|
|
40
|
+
onConfirm: t1,
|
|
41
|
+
onOpenChange: onOpenChange
|
|
42
|
+
});
|
|
43
|
+
$[3] = className;
|
|
44
|
+
$[4] = confirmLabel;
|
|
45
|
+
$[5] = description;
|
|
46
|
+
$[6] = onOpenChange;
|
|
47
|
+
$[7] = open;
|
|
48
|
+
$[8] = ref;
|
|
49
|
+
$[9] = t1;
|
|
50
|
+
$[10] = title;
|
|
51
|
+
$[11] = t2;
|
|
52
|
+
} else {
|
|
53
|
+
t2 = $[11];
|
|
54
|
+
}
|
|
55
|
+
return t2;
|
|
56
|
+
}
|
|
@@ -1,6 +1,74 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
/* The head of a detail: a mark, the name, a line under it, and the actions of the thing. */
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
export function DetailHeader(t0) {
|
|
6
|
+
const $ = _c(15);
|
|
7
|
+
const {
|
|
8
|
+
mark,
|
|
9
|
+
title,
|
|
10
|
+
subtitle,
|
|
11
|
+
actions,
|
|
12
|
+
className,
|
|
13
|
+
ref
|
|
14
|
+
} = t0;
|
|
15
|
+
let t1;
|
|
16
|
+
if ($[0] !== className) {
|
|
17
|
+
t1 = clsx("flex min-w-0 flex-wrap items-start gap-3", className);
|
|
18
|
+
$[0] = className;
|
|
19
|
+
$[1] = t1;
|
|
20
|
+
} else {
|
|
21
|
+
t1 = $[1];
|
|
22
|
+
}
|
|
23
|
+
let t2;
|
|
24
|
+
if ($[2] !== title) {
|
|
25
|
+
t2 = /*#__PURE__*/_jsx("h3", {
|
|
26
|
+
className: "truncate text-lg font-semibold text-text",
|
|
27
|
+
children: title
|
|
28
|
+
});
|
|
29
|
+
$[2] = title;
|
|
30
|
+
$[3] = t2;
|
|
31
|
+
} else {
|
|
32
|
+
t2 = $[3];
|
|
33
|
+
}
|
|
34
|
+
let t3;
|
|
35
|
+
if ($[4] !== subtitle) {
|
|
36
|
+
t3 = /*#__PURE__*/_jsx("div", {
|
|
37
|
+
className: "flex min-w-0 items-center gap-1.5 text-xs break-words text-text-muted",
|
|
38
|
+
children: subtitle
|
|
39
|
+
});
|
|
40
|
+
$[4] = subtitle;
|
|
41
|
+
$[5] = t3;
|
|
42
|
+
} else {
|
|
43
|
+
t3 = $[5];
|
|
44
|
+
}
|
|
45
|
+
let t4;
|
|
46
|
+
if ($[6] !== t2 || $[7] !== t3) {
|
|
47
|
+
t4 = /*#__PURE__*/_jsxs("div", {
|
|
48
|
+
className: "min-w-0 grow basis-48",
|
|
49
|
+
children: [t2, t3]
|
|
50
|
+
});
|
|
51
|
+
$[6] = t2;
|
|
52
|
+
$[7] = t3;
|
|
53
|
+
$[8] = t4;
|
|
54
|
+
} else {
|
|
55
|
+
t4 = $[8];
|
|
56
|
+
}
|
|
57
|
+
let t5;
|
|
58
|
+
if ($[9] !== actions || $[10] !== mark || $[11] !== ref || $[12] !== t1 || $[13] !== t4) {
|
|
59
|
+
t5 = /*#__PURE__*/_jsxs("header", {
|
|
60
|
+
ref: ref,
|
|
61
|
+
className: t1,
|
|
62
|
+
children: [mark, t4, actions]
|
|
63
|
+
});
|
|
64
|
+
$[9] = actions;
|
|
65
|
+
$[10] = mark;
|
|
66
|
+
$[11] = ref;
|
|
67
|
+
$[12] = t1;
|
|
68
|
+
$[13] = t4;
|
|
69
|
+
$[14] = t5;
|
|
70
|
+
} else {
|
|
71
|
+
t5 = $[14];
|
|
72
|
+
}
|
|
73
|
+
return t5;
|
|
74
|
+
}
|
|
@@ -1,16 +1,128 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
const LIST_WIDTHS = {
|
|
5
|
+
280: 'w-70',
|
|
6
|
+
320: 'w-80',
|
|
7
|
+
340: 'w-85'
|
|
8
|
+
};
|
|
4
9
|
/*
|
|
5
10
|
* A list beside the detail of what is picked in it, for a pane of many things of one kind (accounts,
|
|
6
11
|
* devices, shortcut categories). Each side scrolls on its own, and the detail takes the rest of the
|
|
7
12
|
* width, like a single-column pane. Its section must be `split`, so the dialog hands the pane its whole height
|
|
8
13
|
* instead of a padded scrolling column.
|
|
9
14
|
*/
|
|
10
|
-
export function MasterDetail(
|
|
11
|
-
|
|
15
|
+
export function MasterDetail(t0) {
|
|
16
|
+
const $ = _c(15);
|
|
17
|
+
const {
|
|
18
|
+
list,
|
|
19
|
+
listWidth,
|
|
20
|
+
listLabel,
|
|
21
|
+
detail,
|
|
22
|
+
className,
|
|
23
|
+
ref
|
|
24
|
+
} = t0;
|
|
25
|
+
let t1;
|
|
26
|
+
if ($[0] !== className) {
|
|
27
|
+
t1 = clsx("flex min-h-0 min-w-0 grow border-t border-border max-[640px]:flex-col", className);
|
|
28
|
+
$[0] = className;
|
|
29
|
+
$[1] = t1;
|
|
30
|
+
} else {
|
|
31
|
+
t1 = $[1];
|
|
32
|
+
}
|
|
33
|
+
const t2 = LIST_WIDTHS[listWidth];
|
|
34
|
+
let t3;
|
|
35
|
+
if ($[2] !== t2) {
|
|
36
|
+
t3 = clsx("flex shrink-0 flex-col gap-0.5 overflow-y-auto border-r border-border p-2 max-[640px]:max-h-60 max-[640px]:w-auto max-[640px]:border-r-0 max-[640px]:border-b", t2);
|
|
37
|
+
$[2] = t2;
|
|
38
|
+
$[3] = t3;
|
|
39
|
+
} else {
|
|
40
|
+
t3 = $[3];
|
|
41
|
+
}
|
|
42
|
+
let t4;
|
|
43
|
+
if ($[4] !== list || $[5] !== listLabel || $[6] !== t3) {
|
|
44
|
+
t4 = /*#__PURE__*/_jsx("nav", {
|
|
45
|
+
"aria-label": listLabel,
|
|
46
|
+
className: t3,
|
|
47
|
+
children: list
|
|
48
|
+
});
|
|
49
|
+
$[4] = list;
|
|
50
|
+
$[5] = listLabel;
|
|
51
|
+
$[6] = t3;
|
|
52
|
+
$[7] = t4;
|
|
53
|
+
} else {
|
|
54
|
+
t4 = $[7];
|
|
55
|
+
}
|
|
56
|
+
let t5;
|
|
57
|
+
if ($[8] !== detail) {
|
|
58
|
+
t5 = /*#__PURE__*/_jsx("div", {
|
|
59
|
+
className: "min-h-0 min-w-0 grow overflow-y-auto",
|
|
60
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
61
|
+
className: "flex min-w-0 flex-col gap-7 px-8 pt-6 pb-10 max-[960px]:px-4",
|
|
62
|
+
children: detail
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
$[8] = detail;
|
|
66
|
+
$[9] = t5;
|
|
67
|
+
} else {
|
|
68
|
+
t5 = $[9];
|
|
69
|
+
}
|
|
70
|
+
let t6;
|
|
71
|
+
if ($[10] !== ref || $[11] !== t1 || $[12] !== t4 || $[13] !== t5) {
|
|
72
|
+
t6 = /*#__PURE__*/_jsxs("div", {
|
|
73
|
+
ref: ref,
|
|
74
|
+
className: t1,
|
|
75
|
+
children: [t4, t5]
|
|
76
|
+
});
|
|
77
|
+
$[10] = ref;
|
|
78
|
+
$[11] = t1;
|
|
79
|
+
$[12] = t4;
|
|
80
|
+
$[13] = t5;
|
|
81
|
+
$[14] = t6;
|
|
82
|
+
} else {
|
|
83
|
+
t6 = $[14];
|
|
84
|
+
}
|
|
85
|
+
return t6;
|
|
12
86
|
}
|
|
13
87
|
/* One row of the list. The picked one is lifted a shade. */
|
|
14
|
-
export function MasterItem(
|
|
15
|
-
|
|
16
|
-
|
|
88
|
+
export function MasterItem(t0) {
|
|
89
|
+
const $ = _c(9);
|
|
90
|
+
const {
|
|
91
|
+
selected,
|
|
92
|
+
onSelect,
|
|
93
|
+
children,
|
|
94
|
+
className,
|
|
95
|
+
ref
|
|
96
|
+
} = t0;
|
|
97
|
+
const t1 = selected ? "true" : undefined;
|
|
98
|
+
const t2 = selected ? "bg-text/5" : "hover:bg-surface-hover";
|
|
99
|
+
let t3;
|
|
100
|
+
if ($[0] !== className || $[1] !== t2) {
|
|
101
|
+
t3 = clsx("flex w-full min-w-0 shrink-0 items-center gap-3 rounded-lg px-3 py-2 text-left text-sm text-text focus-visible:-outline-offset-2", t2, className);
|
|
102
|
+
$[0] = className;
|
|
103
|
+
$[1] = t2;
|
|
104
|
+
$[2] = t3;
|
|
105
|
+
} else {
|
|
106
|
+
t3 = $[2];
|
|
107
|
+
}
|
|
108
|
+
let t4;
|
|
109
|
+
if ($[3] !== children || $[4] !== onSelect || $[5] !== ref || $[6] !== t1 || $[7] !== t3) {
|
|
110
|
+
t4 = /*#__PURE__*/_jsx("button", {
|
|
111
|
+
ref: ref,
|
|
112
|
+
type: "button",
|
|
113
|
+
"aria-current": t1,
|
|
114
|
+
className: t3,
|
|
115
|
+
onClick: onSelect,
|
|
116
|
+
children: children
|
|
117
|
+
});
|
|
118
|
+
$[3] = children;
|
|
119
|
+
$[4] = onSelect;
|
|
120
|
+
$[5] = ref;
|
|
121
|
+
$[6] = t1;
|
|
122
|
+
$[7] = t3;
|
|
123
|
+
$[8] = t4;
|
|
124
|
+
} else {
|
|
125
|
+
t4 = $[8];
|
|
126
|
+
}
|
|
127
|
+
return t4;
|
|
128
|
+
}
|