@adecore/ui 0.53.3 → 0.54.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/Banner.d.ts +1 -1
- package/dist/ButtonGroup.js +1 -1
- package/dist/Checkbox.js +1 -1
- package/dist/ChoiceCards.d.ts +1 -1
- package/dist/ChoiceCards.js +2 -2
- package/dist/CloseButton.js +1 -1
- package/dist/ColorSwatch.d.ts +1 -1
- package/dist/ColorSwatch.js +1 -1
- package/dist/ColorWheelPicker.js +1 -1
- package/dist/CopyButton.js +1 -1
- package/dist/DockShell.js +1 -1
- package/dist/EmptyState.d.ts +1 -1
- package/dist/EmptyState.js +1 -1
- package/dist/ErrorBoundary.js +122 -112
- package/dist/Field.d.ts +1 -1
- package/dist/Field.js +2 -2
- package/dist/FileIcon.js +1 -1
- package/dist/Icon.d.ts +1 -1
- package/dist/IconButton.d.ts +3 -3
- package/dist/IconButton.js +2 -2
- package/dist/IconPicker.js +35 -32
- package/dist/Input.d.ts +1 -1
- package/dist/ListRow.js +1 -1
- package/dist/MiddleTruncate.js +2 -2
- package/dist/PanelEmpty.d.ts +1 -1
- package/dist/PanelHeader.d.ts +1 -1
- package/dist/PanelHeader.js +1 -1
- package/dist/ProjectSwitcher.js +1 -1
- package/dist/PromptDialog.d.ts +1 -1
- package/dist/ScrollArea.d.ts +12 -0
- package/dist/ScrollArea.js +144 -0
- package/dist/SectionLabel.js +1 -1
- package/dist/SegmentBar.js +1 -1
- package/dist/Segmented.d.ts +1 -1
- package/dist/Select.d.ts +1 -1
- package/dist/Select.js +22 -16
- package/dist/SelectSearch.js +49 -33
- package/dist/ShortcutHints.js +1 -1
- package/dist/Slider.js +2 -2
- package/dist/SlidingColumn.js +1 -1
- package/dist/SplitButton.js +1 -1
- package/dist/Surface.js +1 -1
- package/dist/Switch.js +1 -1
- package/dist/TextMenu.js +2 -2
- package/dist/Toasts.js +2 -2
- package/dist/Tooltip.d.ts +1 -1
- package/dist/Tooltip.js +1 -1
- package/dist/UIProvider.d.ts +1 -1
- package/dist/Waveform.js +1 -1
- package/dist/Wipe.js +2 -2
- package/dist/combobox/parts.d.ts +3 -3
- package/dist/combobox/parts.js +53 -32
- package/dist/command-palette/parts.d.ts +1 -1
- package/dist/command-palette/parts.js +22 -7
- package/dist/command-palette/virtual.js +4 -4
- package/dist/dialog/parts.d.ts +1 -1
- package/dist/dialog/parts.js +2 -2
- package/dist/file-tree/parts.d.ts +2 -2
- package/dist/file-tree/parts.js +3 -3
- package/dist/file-tree/use-file-tree-shift.d.ts +1 -1
- package/dist/file-tree/use-file-tree-shift.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/key-value-list/parts.js +1 -1
- package/dist/menu/parts.d.ts +3 -3
- package/dist/menu/parts.js +46 -30
- package/dist/popover/parts.d.ts +3 -3
- package/dist/popover/parts.js +110 -71
- package/dist/project-switcher-row.js +1 -1
- package/dist/scrollbar-geometry.d.ts +15 -0
- package/dist/scrollbar-geometry.js +48 -0
- package/dist/settings/MasterDetail.js +40 -30
- package/dist/settings/SettingsDialog.d.ts +1 -1
- package/dist/settings/SettingsDialog.js +27 -11
- package/dist/settings/SettingsRow.d.ts +1 -1
- package/dist/settings/SettingsRow.js +1 -1
- package/dist/settings/SettingsSection.d.ts +1 -1
- package/dist/tabs/parts.d.ts +1 -1
- package/dist/tabs/parts.js +3 -3
- package/dist/testing/dedupe.js +1 -1
- package/dist/theme.css +91 -1
- package/dist/tree/parts.js +2 -2
- package/dist/useOverlayScrollbars.d.ts +7 -0
- package/dist/useOverlayScrollbars.js +281 -0
- package/dist/workspace/PaneBar.js +2 -2
- package/dist/workspace/SplitView.d.ts +1 -1
- package/dist/workspace/SplitView.js +4 -4
- package/dist/workspace/TabStrip.d.ts +1 -1
- package/dist/workspace/TabStrip.js +2 -2
- package/dist/workspace/Workspace.d.ts +1 -1
- package/dist/workspace/Workspace.js +2 -2
- package/dist/workspace/WorkspaceRail.js +1 -1
- package/dist/workspace/WorkspaceTopRow.js +1 -1
- package/package.json +1 -1
- package/src/AccentSwatches.tsx +1 -1
- package/src/Banner.tsx +1 -1
- package/src/Button.tsx +1 -1
- package/src/ButtonGroup.tsx +1 -1
- package/src/Checkbox.tsx +2 -2
- package/src/ChoiceCards.tsx +3 -3
- package/src/CloseButton.tsx +2 -2
- package/src/ColorSwatch.tsx +2 -2
- package/src/ColorWheelPicker.tsx +1 -1
- package/src/ColumnResizeHandle.tsx +1 -1
- package/src/CopyButton.tsx +1 -1
- package/src/DockShell.tsx +1 -1
- package/src/EmptyState.tsx +2 -2
- package/src/ErrorBoundary.tsx +4 -3
- package/src/Field.tsx +2 -2
- package/src/FileIcon.tsx +1 -1
- package/src/Icon.tsx +2 -2
- package/src/IconButton.tsx +3 -3
- package/src/IconPicker.tsx +7 -6
- package/src/Input.tsx +2 -2
- package/src/Kbd.tsx +1 -1
- package/src/ListRow.tsx +1 -1
- package/src/Meter.tsx +1 -1
- package/src/MiddleTruncate.tsx +2 -2
- package/src/PanelEmpty.tsx +2 -2
- package/src/PanelHeader.tsx +2 -2
- package/src/Pill.tsx +1 -1
- package/src/ProjectSwitcher.tsx +2 -2
- package/src/PromptDialog.tsx +1 -1
- package/src/RelativeTime.tsx +1 -1
- package/src/ScrollArea.tsx +47 -0
- package/src/SectionLabel.tsx +1 -1
- package/src/SegmentBar.tsx +1 -1
- package/src/Segmented.tsx +1 -1
- package/src/Select.tsx +6 -2
- package/src/SelectSearch.tsx +19 -12
- package/src/Separator.tsx +1 -1
- package/src/ShortcutHints.tsx +1 -1
- package/src/Skeleton.tsx +1 -1
- package/src/Slider.tsx +2 -2
- package/src/SlidingColumn.tsx +1 -1
- package/src/Spinner.tsx +1 -1
- package/src/SplitButton.tsx +1 -1
- package/src/Stepper.tsx +1 -1
- package/src/Surface.tsx +1 -1
- package/src/Switch.tsx +2 -2
- package/src/TextMenu.tsx +2 -2
- package/src/Tile.tsx +1 -1
- package/src/Toasts.tsx +2 -2
- package/src/Tooltip.tsx +2 -2
- package/src/UIProvider.tsx +1 -1
- package/src/Waveform.tsx +1 -1
- package/src/Wipe.tsx +2 -2
- package/src/ZoomControls.tsx +1 -1
- package/src/combobox/parts.tsx +9 -4
- package/src/command-palette/parts.tsx +25 -19
- package/src/command-palette/virtual.tsx +4 -4
- package/src/dialog/parts.tsx +2 -2
- package/src/file-tree/parts.tsx +6 -6
- package/src/file-tree/use-empty-lines.ts +1 -1
- package/src/file-tree/use-file-tree-shift.tsx +2 -2
- package/src/file-tree/use-slots.ts +2 -2
- package/src/index.ts +2 -0
- package/src/key-value-list/parts.tsx +1 -1
- package/src/menu/parts.tsx +11 -6
- package/src/popover/parts.tsx +13 -5
- package/src/project-switcher-row.tsx +2 -2
- package/src/scrollbar-geometry.ts +67 -0
- package/src/select-shared.ts +1 -1
- package/src/settings/DetailHeader.tsx +1 -1
- package/src/settings/MasterDetail.tsx +9 -6
- package/src/settings/SettingsDialog.tsx +16 -9
- package/src/settings/SettingsRow.tsx +1 -1
- package/src/settings/SettingsSection.tsx +1 -1
- package/src/tabs/parts.tsx +4 -4
- package/src/testing/dedupe.ts +1 -1
- package/src/theme.css +91 -1
- package/src/tree/parts.tsx +2 -2
- package/src/useOverlayScrollbars.tsx +263 -0
- package/src/workspace/DropPreview.tsx +1 -1
- package/src/workspace/PaneBar.tsx +2 -2
- package/src/workspace/SplitView.tsx +5 -5
- package/src/workspace/TabStrip.tsx +3 -3
- package/src/workspace/Workspace.tsx +2 -2
- package/src/workspace/WorkspaceRail.tsx +1 -1
- package/src/workspace/WorkspaceTopRow.tsx +1 -1
package/dist/combobox/parts.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { Autocomplete } from '@base-ui/react/autocomplete';
|
|
2
3
|
import clsx from 'clsx';
|
|
4
|
+
import { useState } from 'react';
|
|
3
5
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { Autocomplete } from '@base-ui/react/autocomplete';
|
|
5
6
|
import { withClass } from '../class-name.js';
|
|
6
7
|
import { fieldControlProps, useFieldControl } from '../field-context.js';
|
|
7
8
|
import { Icon } from "../Icon.js";
|
|
8
9
|
import { Kbd } from "../Kbd.js";
|
|
9
10
|
import { MENU_LABEL } from "../menu/parts.js";
|
|
11
|
+
import { mergeRefs } from '../merge-refs.js';
|
|
10
12
|
import { splitPlacement } from '../placement.js';
|
|
11
13
|
import { renderPositioner } from '../popup-layer.js';
|
|
14
|
+
import { useOverlayScrollbars } from "../useOverlayScrollbars.js";
|
|
12
15
|
/* It takes no room while it has nothing to say. */
|
|
13
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
17
|
const LIST_NOTE = 'text-center text-xs text-text-faint not-empty:px-3 not-empty:py-4';
|
|
@@ -172,9 +175,10 @@ export function ComboboxInput(t0) {
|
|
|
172
175
|
return t15;
|
|
173
176
|
}
|
|
174
177
|
export function ComboboxPopup(t0) {
|
|
175
|
-
const $ = _c(
|
|
178
|
+
const $ = _c(22);
|
|
176
179
|
let align;
|
|
177
180
|
let className;
|
|
181
|
+
let ref;
|
|
178
182
|
let side;
|
|
179
183
|
let sideOffset;
|
|
180
184
|
let t1;
|
|
@@ -184,9 +188,11 @@ export function ComboboxPopup(t0) {
|
|
|
184
188
|
align: t3,
|
|
185
189
|
sideOffset: t4,
|
|
186
190
|
className: t5,
|
|
191
|
+
ref: t6,
|
|
187
192
|
...props
|
|
188
193
|
} = t0;
|
|
189
194
|
className = t5;
|
|
195
|
+
ref = t6;
|
|
190
196
|
side = t2 === undefined ? "bottom" : t2;
|
|
191
197
|
align = t3 === undefined ? "start" : t3;
|
|
192
198
|
sideOffset = t4 === undefined ? 6 : t4;
|
|
@@ -194,60 +200,75 @@ export function ComboboxPopup(t0) {
|
|
|
194
200
|
$[0] = t0;
|
|
195
201
|
$[1] = align;
|
|
196
202
|
$[2] = className;
|
|
197
|
-
$[3] =
|
|
198
|
-
$[4] =
|
|
199
|
-
$[5] =
|
|
203
|
+
$[3] = ref;
|
|
204
|
+
$[4] = side;
|
|
205
|
+
$[5] = sideOffset;
|
|
206
|
+
$[6] = t1;
|
|
200
207
|
} else {
|
|
201
208
|
align = $[1];
|
|
202
209
|
className = $[2];
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
210
|
+
ref = $[3];
|
|
211
|
+
side = $[4];
|
|
212
|
+
sideOffset = $[5];
|
|
213
|
+
t1 = $[6];
|
|
206
214
|
}
|
|
207
215
|
const [placement, popupProps] = t1;
|
|
216
|
+
const [popup, setPopup] = useState(null);
|
|
217
|
+
const scrollbars = useOverlayScrollbars(popup);
|
|
208
218
|
let t2;
|
|
209
|
-
if ($[
|
|
210
|
-
t2 =
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
219
|
+
if ($[7] !== ref) {
|
|
220
|
+
t2 = mergeRefs(setPopup, ref);
|
|
221
|
+
$[7] = ref;
|
|
222
|
+
$[8] = t2;
|
|
213
223
|
} else {
|
|
214
|
-
t2 = $[
|
|
224
|
+
t2 = $[8];
|
|
215
225
|
}
|
|
216
226
|
let t3;
|
|
217
|
-
if ($[
|
|
218
|
-
t3 =
|
|
219
|
-
|
|
220
|
-
...popupProps
|
|
221
|
-
});
|
|
222
|
-
$[8] = popupProps;
|
|
223
|
-
$[9] = t2;
|
|
227
|
+
if ($[9] !== className) {
|
|
228
|
+
t3 = withClass("menu-popup min-w-(--anchor-width)", className);
|
|
229
|
+
$[9] = className;
|
|
224
230
|
$[10] = t3;
|
|
225
231
|
} else {
|
|
226
232
|
t3 = $[10];
|
|
227
233
|
}
|
|
228
234
|
let t4;
|
|
229
|
-
if ($[11] !==
|
|
230
|
-
t4 = /*#__PURE__*/_jsx(Autocomplete.
|
|
231
|
-
|
|
235
|
+
if ($[11] !== popupProps || $[12] !== t2 || $[13] !== t3) {
|
|
236
|
+
t4 = /*#__PURE__*/_jsx(Autocomplete.Popup, {
|
|
237
|
+
ref: t2,
|
|
238
|
+
className: t3,
|
|
239
|
+
...popupProps
|
|
240
|
+
});
|
|
241
|
+
$[11] = popupProps;
|
|
242
|
+
$[12] = t2;
|
|
243
|
+
$[13] = t3;
|
|
244
|
+
$[14] = t4;
|
|
245
|
+
} else {
|
|
246
|
+
t4 = $[14];
|
|
247
|
+
}
|
|
248
|
+
let t5;
|
|
249
|
+
if ($[15] !== align || $[16] !== placement || $[17] !== scrollbars || $[18] !== side || $[19] !== sideOffset || $[20] !== t4) {
|
|
250
|
+
t5 = /*#__PURE__*/_jsx(Autocomplete.Portal, {
|
|
251
|
+
children: /*#__PURE__*/_jsxs(Autocomplete.Positioner, {
|
|
232
252
|
className: "popup-positioner",
|
|
233
253
|
render: renderPositioner,
|
|
234
254
|
...placement,
|
|
235
255
|
side: side,
|
|
236
256
|
align: align,
|
|
237
257
|
sideOffset: sideOffset,
|
|
238
|
-
children:
|
|
258
|
+
children: [t4, scrollbars]
|
|
239
259
|
})
|
|
240
260
|
});
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
261
|
+
$[15] = align;
|
|
262
|
+
$[16] = placement;
|
|
263
|
+
$[17] = scrollbars;
|
|
264
|
+
$[18] = side;
|
|
265
|
+
$[19] = sideOffset;
|
|
266
|
+
$[20] = t4;
|
|
267
|
+
$[21] = t5;
|
|
247
268
|
} else {
|
|
248
|
-
|
|
269
|
+
t5 = $[21];
|
|
249
270
|
}
|
|
250
|
-
return
|
|
271
|
+
return t5;
|
|
251
272
|
}
|
|
252
273
|
export function ComboboxList(props) {
|
|
253
274
|
const $ = _c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
1
|
import { Autocomplete } from '@base-ui/react/autocomplete';
|
|
3
2
|
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import { type ComponentProps, type ReactNode } from 'react';
|
|
4
4
|
import { DialogRoot, type DialogPopupProps } from '../dialog/parts.tsx';
|
|
5
5
|
declare const SIZE: {
|
|
6
6
|
readonly md: 'w-[576px]';
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Autocomplete } from '@base-ui/react/autocomplete';
|
|
3
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { Search } from 'lucide-react';
|
|
6
|
+
import { useContext, useLayoutEffect, useRef, useState } from 'react';
|
|
7
|
+
import { flushSync } from 'react-dom';
|
|
6
8
|
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { Autocomplete } from '@base-ui/react/autocomplete';
|
|
8
|
-
import { useRender } from '@base-ui/react/use-render';
|
|
9
9
|
import { withClass } from '../class-name.js';
|
|
10
10
|
import { DialogPopup, DialogRoot } from "../dialog/parts.js";
|
|
11
11
|
import { Icon } from "../Icon.js";
|
|
12
12
|
import { Kbd } from "../Kbd.js";
|
|
13
13
|
import { mergeRefs } from '../merge-refs.js';
|
|
14
14
|
import { KEY_SHORTCUTS } from '../shortcut.js';
|
|
15
|
+
import { useOverlayScrollbars } from "../useOverlayScrollbars.js";
|
|
15
16
|
import { PaletteRefsContext } from './context.js';
|
|
16
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
18
|
const NO_ITEMS = [];
|
|
@@ -306,7 +307,7 @@ export function CommandPaletteInput(t0) {
|
|
|
306
307
|
}
|
|
307
308
|
/* It scrolls on its own, so the field and the footer stay put. */
|
|
308
309
|
export function CommandPaletteList(t0) {
|
|
309
|
-
const $ = _c(
|
|
310
|
+
const $ = _c(24);
|
|
310
311
|
let className;
|
|
311
312
|
let onFocus;
|
|
312
313
|
let props;
|
|
@@ -333,10 +334,12 @@ export function CommandPaletteList(t0) {
|
|
|
333
334
|
t
|
|
334
335
|
} = useTranslation("ui");
|
|
335
336
|
const refs = useContext(PaletteRefsContext);
|
|
337
|
+
const [list, setList] = useState(null);
|
|
338
|
+
const scrollbars = useOverlayScrollbars(list);
|
|
336
339
|
const t1 = refs?.list;
|
|
337
340
|
let t2;
|
|
338
341
|
if ($[5] !== ref || $[6] !== t1) {
|
|
339
|
-
t2 = mergeRefs(ref, t1);
|
|
342
|
+
t2 = mergeRefs(ref, t1, setList);
|
|
340
343
|
$[5] = ref;
|
|
341
344
|
$[6] = t1;
|
|
342
345
|
$[7] = t2;
|
|
@@ -396,7 +399,19 @@ export function CommandPaletteList(t0) {
|
|
|
396
399
|
} else {
|
|
397
400
|
t6 = $[20];
|
|
398
401
|
}
|
|
399
|
-
|
|
402
|
+
let t7;
|
|
403
|
+
if ($[21] !== scrollbars || $[22] !== t6) {
|
|
404
|
+
t7 = /*#__PURE__*/_jsxs("div", {
|
|
405
|
+
className: "relative flex min-h-0 flex-col",
|
|
406
|
+
children: [t6, scrollbars]
|
|
407
|
+
});
|
|
408
|
+
$[21] = scrollbars;
|
|
409
|
+
$[22] = t6;
|
|
410
|
+
$[23] = t7;
|
|
411
|
+
} else {
|
|
412
|
+
t7 = $[23];
|
|
413
|
+
}
|
|
414
|
+
return t7;
|
|
400
415
|
}
|
|
401
416
|
export function CommandPaletteFooter(t0) {
|
|
402
417
|
const $ = _c(14);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Fragment, useLayoutEffect, useMemo, useRef } from 'react';
|
|
2
|
-
import { useVirtualizer } from '@tanstack/react-virtual';
|
|
3
1
|
import { Autocomplete } from '@base-ui/react/autocomplete';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { useVirtualizer } from '@tanstack/react-virtual';
|
|
3
|
+
import { Fragment, useLayoutEffect, useMemo, useRef } from 'react';
|
|
6
4
|
import { MENU_LABEL } from "../menu/parts.js";
|
|
7
5
|
import { mergeRefs } from '../merge-refs.js';
|
|
6
|
+
import { useCommandPaletteVirtualScroll } from './context.js';
|
|
7
|
+
import { CommandPaletteList } from "./parts.js";
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
function virtualRowsOf(values, labelled) {
|
|
10
10
|
const groups = [];
|
package/dist/dialog/parts.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ComponentProps } from 'react';
|
|
2
1
|
import { Dialog as BaseDialog } from '@base-ui/react/dialog';
|
|
3
2
|
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import { type ComponentProps } from 'react';
|
|
4
4
|
declare const SIZE: {
|
|
5
5
|
readonly sm: 'w-[420px] p-5';
|
|
6
6
|
};
|
package/dist/dialog/parts.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { createContext, useContext, useState } from 'react';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
2
|
import { Dialog as BaseDialog } from '@base-ui/react/dialog';
|
|
5
3
|
import { useRender } from '@base-ui/react/use-render';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { createContext, useContext, useState } from 'react';
|
|
6
6
|
import { withClass } from '../class-name.js';
|
|
7
7
|
import { useDialogLayer } from '../dialog-layer.js';
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
1
|
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
-
import { type FileTreeProps as PierreProps } from '@pierre/trees/react';
|
|
4
2
|
import type { FileTree, FileTreeVisibleRow } from '@pierre/trees';
|
|
3
|
+
import { type FileTreeProps as PierreProps } from '@pierre/trees/react';
|
|
5
4
|
import type { LucideIcon } from 'lucide-react';
|
|
5
|
+
import { type ReactNode } from 'react';
|
|
6
6
|
import type { FileTreeEmptyLabel } from './empty-lines.ts';
|
|
7
7
|
import { type FileTreeDecorationOrder } from './use-slots.ts';
|
|
8
8
|
export type FileTreeRootProps = useRender.ComponentProps<'div'> & {
|
package/dist/file-tree/parts.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore } from 'react';
|
|
3
|
-
import { createPortal } from 'react-dom';
|
|
4
2
|
import { useRender } from '@base-ui/react/use-render';
|
|
5
3
|
import { FileTree as PierreFileTree } from '@pierre/trees/react';
|
|
6
|
-
import { useTranslation } from 'react-i18next';
|
|
7
4
|
import clsx from 'clsx';
|
|
5
|
+
import { useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore } from 'react';
|
|
6
|
+
import { createPortal } from 'react-dom';
|
|
7
|
+
import { useTranslation } from 'react-i18next';
|
|
8
8
|
import { Icon } from "../Icon.js";
|
|
9
9
|
import { mergeRefs } from '../merge-refs.js';
|
|
10
10
|
import { directoryHandle, extendsSelection, followFocus, movesFocus, menuTargetsOf, rowPathOf, visibleRows } from './helpers.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ReactElement } from 'react';
|
|
2
1
|
import type { FileTree } from '@pierre/trees';
|
|
2
|
+
import { type ReactElement } from 'react';
|
|
3
3
|
export declare function useFileTreeShift(model: FileTree, resetKey?: string): {
|
|
4
4
|
attach(node: HTMLElement | null): void;
|
|
5
5
|
bar: ReactElement;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import 'react';
|
|
3
|
-
import { useTreeShift } from "../tree/use-tree-shift.js";
|
|
4
3
|
import { shiftNeed } from '../tree/shift.js';
|
|
4
|
+
import { useTreeShift } from "../tree/use-tree-shift.js";
|
|
5
5
|
const ROWS = '[data-type="item"]:not([data-item-parked="true"])';
|
|
6
6
|
function boxesOf(element) {
|
|
7
7
|
return element.getClientRects().length > 0 ? [element] : [...element.children].flatMap(child => boxesOf(child));
|
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export { Pill, type PillProps } from './Pill.tsx';
|
|
|
48
48
|
export { PromptDialog, type PromptDialogProps } from './PromptDialog.tsx';
|
|
49
49
|
export { RelativeTime, type RelativeTimeProps } from './RelativeTime.tsx';
|
|
50
50
|
export { ProjectSwitcher, ProjectSwitcherGroups, type ProjectSwitcherItem, type ProjectSwitcherProps } from './ProjectSwitcher.tsx';
|
|
51
|
+
export { ScrollArea, type ScrollAreaProps } from './ScrollArea.tsx';
|
|
51
52
|
export { SectionLabel, type SectionLabelProps } from './SectionLabel.tsx';
|
|
52
53
|
export { SegmentBar, type SegmentBarPart, type SegmentBarProps } from './SegmentBar.tsx';
|
|
53
54
|
export { Segmented, type SegmentedOption, type SegmentedProps } from './Segmented.tsx';
|
|
@@ -92,6 +93,7 @@ export { clampColumnSize, useColumnResize, type ColumnEdge, type ColumnResize, t
|
|
|
92
93
|
export { useContentSize, type ContentSize } from './useContentSize.ts';
|
|
93
94
|
export { useMeasuredWidth } from './useMeasuredWidth.ts';
|
|
94
95
|
export { useNow, useTickingText } from './useNow.ts';
|
|
96
|
+
export { useOverlayScrollbars, type OverlayScrollbarsOptions, type ScrollAreaAxis } from './useOverlayScrollbars.tsx';
|
|
95
97
|
export { useFileTree, type FileTreeOptions } from './file-tree/use-file-tree.ts';
|
|
96
98
|
export type { FileTreeRootProps } from './file-tree/parts.tsx';
|
|
97
99
|
export type { FileTree as FileTreeModel, FileTreeVisibleRow, FileTreeDragAndDropConfig, FileTreeDropContext, FileTreeDropResult } from '@pierre/trees';
|
package/dist/index.js
CHANGED
|
@@ -45,6 +45,7 @@ export { Pill } from "./Pill.js";
|
|
|
45
45
|
export { PromptDialog } from "./PromptDialog.js";
|
|
46
46
|
export { RelativeTime } from "./RelativeTime.js";
|
|
47
47
|
export { ProjectSwitcher, ProjectSwitcherGroups } from "./ProjectSwitcher.js";
|
|
48
|
+
export { ScrollArea } from "./ScrollArea.js";
|
|
48
49
|
export { SectionLabel } from "./SectionLabel.js";
|
|
49
50
|
export { SegmentBar } from "./SegmentBar.js";
|
|
50
51
|
export { Segmented } from "./Segmented.js";
|
|
@@ -86,6 +87,7 @@ export { clampColumnSize, useColumnResize } from './useColumnResize.js';
|
|
|
86
87
|
export { useContentSize } from './useContentSize.js';
|
|
87
88
|
export { useMeasuredWidth } from './useMeasuredWidth.js';
|
|
88
89
|
export { useNow, useTickingText } from './useNow.js';
|
|
90
|
+
export { useOverlayScrollbars } from "./useOverlayScrollbars.js";
|
|
89
91
|
export { useFileTree } from './file-tree/use-file-tree.js';
|
|
90
92
|
export { Workspace } from "./workspace/Workspace.js";
|
|
91
93
|
export { WorkspaceRail, WorkspaceRailSeparator, WorkspaceRailSpacer } from "./workspace/WorkspaceRail.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
/* Every item is a subgrid of the list, so the names line up across rows and a hairline runs under both columns. */
|
|
5
5
|
export function KeyValueListRoot(t0) {
|
|
6
6
|
const $ = _c(16);
|
package/dist/menu/parts.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type ComponentProps, type ReactNode, type Ref } from 'react';
|
|
2
|
-
import { type LucideIcon } from 'lucide-react';
|
|
3
1
|
import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu';
|
|
4
2
|
import { Menu as BaseMenu } from '@base-ui/react/menu';
|
|
5
3
|
import { Separator as BaseSeparator } from '@base-ui/react/separator';
|
|
6
4
|
import { useRender } from '@base-ui/react/use-render';
|
|
5
|
+
import { type LucideIcon } from 'lucide-react';
|
|
6
|
+
import { type ComponentProps, type ReactNode, type Ref } from 'react';
|
|
7
7
|
import { type PlacementKey } from '../placement.ts';
|
|
8
8
|
type PositionerProps = ComponentProps<typeof BaseMenu.Positioner>;
|
|
9
9
|
type Placement = Pick<PositionerProps, PlacementKey>;
|
|
@@ -14,7 +14,7 @@ export declare function MenuSubmenuRoot(props: ComponentProps<typeof BaseMenu.Su
|
|
|
14
14
|
export declare const MenuTrigger: BaseMenu.Trigger;
|
|
15
15
|
export declare const ContextMenuTrigger: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuTriggerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
16
|
export type MenuPopupProps = ComponentProps<typeof BaseMenu.Popup> & Placement;
|
|
17
|
-
export declare function MenuPopup({ className, ...props }: MenuPopupProps): import("react").JSX.Element;
|
|
17
|
+
export declare function MenuPopup({ className, ref, ...props }: MenuPopupProps): import("react").JSX.Element;
|
|
18
18
|
type ItemLook = {
|
|
19
19
|
unstyled?: boolean;
|
|
20
20
|
};
|
package/dist/menu/parts.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { createContext, useContext } from 'react';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import { Check, ChevronRight } from 'lucide-react';
|
|
5
2
|
import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu';
|
|
6
3
|
import { Menu as BaseMenu } from '@base-ui/react/menu';
|
|
7
4
|
import { Separator as BaseSeparator } from '@base-ui/react/separator';
|
|
8
5
|
import { useRender } from '@base-ui/react/use-render';
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
import { Check, ChevronRight } from 'lucide-react';
|
|
8
|
+
import { createContext, useContext, useState } from 'react';
|
|
9
9
|
import { withClass } from '../class-name.js';
|
|
10
10
|
import { Icon } from "../Icon.js";
|
|
11
|
-
import {
|
|
11
|
+
import { mergeRefs } from '../merge-refs.js';
|
|
12
12
|
import { splitPlacement } from '../placement.js';
|
|
13
13
|
import { renderPositioner } from '../popup-layer.js';
|
|
14
|
-
import {
|
|
14
|
+
import { Tooltip } from "../Tooltip.js";
|
|
15
|
+
import { useOverlayScrollbars } from "../useOverlayScrollbars.js";
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
17
|
const MenuKindContext = createContext('menu');
|
|
16
18
|
/* A context menu opens at the pointer, which its positioner already knows. A submenu is pulled up by the popup's padding so its first row lines up with the row that opened it. */
|
|
17
19
|
const PLACEMENT = {
|
|
@@ -86,41 +88,54 @@ export function MenuSubmenuRoot(props) {
|
|
|
86
88
|
export const MenuTrigger = BaseMenu.Trigger;
|
|
87
89
|
export const ContextMenuTrigger = BaseContextMenu.Trigger;
|
|
88
90
|
export function MenuPopup(t0) {
|
|
89
|
-
const $ = _c(
|
|
91
|
+
const $ = _c(16);
|
|
90
92
|
const {
|
|
91
93
|
className,
|
|
94
|
+
ref,
|
|
92
95
|
...props
|
|
93
96
|
} = t0;
|
|
94
97
|
const defaults = PLACEMENT[useContext(MenuKindContext)];
|
|
95
98
|
const [placement, popupProps] = splitPlacement(props);
|
|
99
|
+
const [popup, setPopup] = useState(null);
|
|
100
|
+
const scrollbars = useOverlayScrollbars(popup);
|
|
96
101
|
const t1 = placement.side ?? defaults.side;
|
|
97
102
|
const t2 = placement.align ?? defaults.align;
|
|
98
103
|
const t3 = placement.sideOffset ?? defaults.sideOffset;
|
|
99
104
|
const t4 = placement.alignOffset ?? defaults.alignOffset;
|
|
100
105
|
let t5;
|
|
101
|
-
if ($[0] !==
|
|
102
|
-
t5 =
|
|
103
|
-
$[0] =
|
|
106
|
+
if ($[0] !== ref) {
|
|
107
|
+
t5 = mergeRefs(setPopup, ref);
|
|
108
|
+
$[0] = ref;
|
|
104
109
|
$[1] = t5;
|
|
105
110
|
} else {
|
|
106
111
|
t5 = $[1];
|
|
107
112
|
}
|
|
108
113
|
let t6;
|
|
109
|
-
if ($[2] !==
|
|
110
|
-
t6 =
|
|
111
|
-
|
|
114
|
+
if ($[2] !== className) {
|
|
115
|
+
t6 = withClass("menu-popup", className);
|
|
116
|
+
$[2] = className;
|
|
117
|
+
$[3] = t6;
|
|
118
|
+
} else {
|
|
119
|
+
t6 = $[3];
|
|
120
|
+
}
|
|
121
|
+
let t7;
|
|
122
|
+
if ($[4] !== popupProps || $[5] !== t5 || $[6] !== t6) {
|
|
123
|
+
t7 = /*#__PURE__*/_jsx(BaseMenu.Popup, {
|
|
124
|
+
ref: t5,
|
|
125
|
+
className: t6,
|
|
112
126
|
...popupProps
|
|
113
127
|
});
|
|
114
|
-
$[
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
128
|
+
$[4] = popupProps;
|
|
129
|
+
$[5] = t5;
|
|
130
|
+
$[6] = t6;
|
|
131
|
+
$[7] = t7;
|
|
117
132
|
} else {
|
|
118
|
-
|
|
133
|
+
t7 = $[7];
|
|
119
134
|
}
|
|
120
|
-
let
|
|
121
|
-
if ($[
|
|
122
|
-
|
|
123
|
-
children: /*#__PURE__*/
|
|
135
|
+
let t8;
|
|
136
|
+
if ($[8] !== placement || $[9] !== scrollbars || $[10] !== t1 || $[11] !== t2 || $[12] !== t3 || $[13] !== t4 || $[14] !== t7) {
|
|
137
|
+
t8 = /*#__PURE__*/_jsx(BaseMenu.Portal, {
|
|
138
|
+
children: /*#__PURE__*/_jsxs(BaseMenu.Positioner, {
|
|
124
139
|
className: "popup-positioner",
|
|
125
140
|
render: renderPositioner,
|
|
126
141
|
...placement,
|
|
@@ -128,20 +143,21 @@ export function MenuPopup(t0) {
|
|
|
128
143
|
align: t2,
|
|
129
144
|
sideOffset: t3,
|
|
130
145
|
alignOffset: t4,
|
|
131
|
-
children:
|
|
146
|
+
children: [t7, scrollbars]
|
|
132
147
|
})
|
|
133
148
|
});
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
136
|
-
$[
|
|
137
|
-
$[
|
|
138
|
-
$[
|
|
139
|
-
$[
|
|
140
|
-
$[
|
|
149
|
+
$[8] = placement;
|
|
150
|
+
$[9] = scrollbars;
|
|
151
|
+
$[10] = t1;
|
|
152
|
+
$[11] = t2;
|
|
153
|
+
$[12] = t3;
|
|
154
|
+
$[13] = t4;
|
|
155
|
+
$[14] = t7;
|
|
156
|
+
$[15] = t8;
|
|
141
157
|
} else {
|
|
142
|
-
|
|
158
|
+
t8 = $[15];
|
|
143
159
|
}
|
|
144
|
-
return
|
|
160
|
+
return t8;
|
|
145
161
|
}
|
|
146
162
|
export function MenuItem(t0) {
|
|
147
163
|
const $ = _c(10);
|
package/dist/popover/parts.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ComponentProps } from 'react';
|
|
2
1
|
import { Popover as BasePopover } from '@base-ui/react/popover';
|
|
3
2
|
import { PreviewCard as BasePreviewCard } from '@base-ui/react/preview-card';
|
|
3
|
+
import { type ComponentProps } from 'react';
|
|
4
4
|
import { type PlacementKey } from '../placement.ts';
|
|
5
5
|
declare const POPUP_VARIANT: {
|
|
6
6
|
readonly menu: 'menu-popup';
|
|
@@ -17,11 +17,11 @@ export declare const PopoverDescription: import("react").ForwardRefExoticCompone
|
|
|
17
17
|
export type PopoverPopupProps = ComponentProps<typeof BasePopover.Popup> & Placement & {
|
|
18
18
|
variant?: PopupVariant;
|
|
19
19
|
};
|
|
20
|
-
export declare function PopoverPopup({ variant, side, align, sideOffset, className, ...props }: PopoverPopupProps): import("react").JSX.Element;
|
|
20
|
+
export declare function PopoverPopup({ variant, side, align, sideOffset, className, ref, ...props }: PopoverPopupProps): import("react").JSX.Element;
|
|
21
21
|
export declare const PreviewCardRoot: <Payload>(props: BasePreviewCard.Root.Props<Payload>) => React.JSX.Element;
|
|
22
22
|
export declare const PreviewCardTrigger: BasePreviewCard.Trigger;
|
|
23
23
|
export type PreviewCardPopupProps = ComponentProps<typeof BasePreviewCard.Popup> & Placement & {
|
|
24
24
|
variant?: PopupVariant;
|
|
25
25
|
};
|
|
26
|
-
export declare function PreviewCardPopup({ variant, side, align, sideOffset, className, ...props }: PreviewCardPopupProps): import("react").JSX.Element;
|
|
26
|
+
export declare function PreviewCardPopup({ variant, side, align, sideOffset, className, ref, ...props }: PreviewCardPopupProps): import("react").JSX.Element;
|
|
27
27
|
export {};
|