@stll/ui 0.69.0 → 0.72.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/calendar/primitives.d.ts +7 -7
- package/dist/components/alert-dialog.d.ts +15 -15
- package/dist/components/animated-preview.d.ts +9 -9
- package/dist/components/animated-preview.js +3 -3
- package/dist/components/application-rail.d.ts +8 -8
- package/dist/components/bidi-text.d.ts +7 -7
- package/dist/components/brand-icons.d.ts +5 -5
- package/dist/components/breadcrumb.d.ts +8 -8
- package/dist/components/button.d.ts +13 -1
- package/dist/components/button.js +14 -5
- package/dist/components/color-picker.d.ts +4 -4
- package/dist/components/combobox.d.ts +23 -23
- package/dist/components/combobox.js +6 -6
- package/dist/components/command.d.ts +19 -19
- package/dist/components/date-picker-popover.js +8 -2
- package/dist/components/destructive-action-confirmation.d.ts +5 -5
- package/dist/components/destructive-action-confirmation.js +2 -2
- package/dist/components/destructive-confirm-dialog.d.ts +7 -7
- package/dist/components/details-grid.d.ts +6 -6
- package/dist/components/dialog.d.ts +19 -19
- package/dist/components/document-identity-badge.js +6 -0
- package/dist/components/frame.d.ts +7 -7
- package/dist/components/hex-color-picker.d.ts +16 -2
- package/dist/components/horizontal-scroller.d.ts +6 -0
- package/dist/components/horizontal-scroller.js +59 -33
- package/dist/components/identity-text.js +1 -0
- package/dist/components/input-group.d.ts +6 -6
- package/dist/components/input-otp.d.ts +7 -7
- package/dist/components/input-otp.js +2 -2
- package/dist/components/input.d.ts +5 -5
- package/dist/components/kbd.d.ts +3 -3
- package/dist/components/list.d.ts +20 -20
- package/dist/components/menu.d.ts +20 -20
- package/dist/components/outline-rail.d.ts +12 -0
- package/dist/components/pagination.d.ts +9 -9
- package/dist/components/popover.d.ts +8 -8
- package/dist/components/preview-pane.d.ts +6 -6
- package/dist/components/prose.d.ts +2 -2
- package/dist/components/scroll-to-top.d.ts +5 -0
- package/dist/components/search-field.d.ts +3 -3
- package/dist/components/select.d.ts +9 -9
- package/dist/components/select.js +11 -11
- package/dist/components/sheet.d.ts +16 -16
- package/dist/components/split-button.d.ts +6 -1
- package/dist/components/split-button.js +8 -3
- package/dist/components/steps.d.ts +6 -6
- package/dist/components/switch.d.ts +5 -5
- package/dist/components/switch.native.d.ts +3 -3
- package/dist/components/table.d.ts +16 -16
- package/dist/components/textarea.d.ts +3 -3
- package/dist/components/time-field.d.ts +3 -3
- package/dist/components/toast.d.ts +20 -20
- package/dist/components/toast.js +3 -3
- package/dist/components/toggle-group.d.ts +4 -4
- package/dist/components/toggle.d.ts +3 -3
- package/dist/components/tooltip-trigger-helper.d.ts +4 -4
- package/dist/components/truncated-text.d.ts +4 -4
- package/dist/components/truncated-text.js +3 -3
- package/dist/components/view-toolbar.d.ts +11 -3
- package/dist/components/view-toolbar.js +16 -5
- package/dist/data-table/index.d.ts +7 -0
- package/dist/hooks/use-contained-handler.d.ts +2 -2
- package/dist/hooks/use-mobile.js +2 -2
- package/dist/hooks/use-viewport-width.js +2 -2
- package/dist/icons.d.ts +29 -2
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/inspector/chrome.d.ts +22 -22
- package/dist/inspector/index.d.ts +9 -0
- package/dist/kanban/grouping.d.ts +10 -0
- package/dist/kanban/index.d.ts +9 -0
- package/dist/kanban/sortable-interactions.d.ts +8 -8
- package/dist/kanban/sortable-interactions.js +11 -11
- package/dist/lib/button-disposition.d.ts +2 -2
- package/dist/lib/file-size.d.ts +16 -0
- package/dist/lib/file-size.js +30 -0
- package/dist/lib/tooltip-content.d.ts +2 -2
- package/dist/lib/utils.d.ts +2 -2
- package/dist/review/review-out-of-date-notice.d.ts +7 -1
- package/dist/review/review-out-of-date-notice.js +4 -1
- package/dist/styles/inline-rename.css +9 -0
- package/package.json +13 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
/**
|
|
3
3
|
* - `sheet`: a fact sheet; small uppercase labels, up to three pairs per row
|
|
4
4
|
* as the container widens.
|
|
@@ -22,16 +22,16 @@ type DetailsOrientation = "horizontal" | "vertical" | "auto";
|
|
|
22
22
|
* `lg` fix it, so several grids on one page line their values up.
|
|
23
23
|
*/
|
|
24
24
|
type DetailsLabelWidth = "auto" | "sm" | "md" | "lg";
|
|
25
|
-
type DetailsGridProps = React
|
|
25
|
+
type DetailsGridProps = React.ComponentProps<"dl"> & {
|
|
26
26
|
labelWidth?: DetailsLabelWidth;
|
|
27
27
|
orientation?: DetailsOrientation;
|
|
28
28
|
variant?: DetailsVariant;
|
|
29
29
|
};
|
|
30
|
-
declare const DetailsGrid: ({ className, labelWidth, orientation, variant, ...props }: DetailsGridProps) => React
|
|
31
|
-
type DetailsItemProps = React
|
|
32
|
-
label: React
|
|
30
|
+
declare const DetailsGrid: ({ className, labelWidth, orientation, variant, ...props }: DetailsGridProps) => React.JSX.Element;
|
|
31
|
+
type DetailsItemProps = React.ComponentProps<"div"> & {
|
|
32
|
+
label: React.ReactNode;
|
|
33
33
|
/** `wide` spans every pair column of a `sheet`. */
|
|
34
34
|
span?: "wide";
|
|
35
35
|
};
|
|
36
|
-
declare const DetailsItem: ({ label, children, span, className, ...props }: DetailsItemProps) => React
|
|
36
|
+
declare const DetailsItem: ({ label, children, span, className, ...props }: DetailsItemProps) => React.JSX.Element;
|
|
37
37
|
export { DetailsGrid, DetailsItem, type DetailsLabelWidth, type DetailsOrientation, type DetailsVariant };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
3
3
|
import { DialogFormState } from "./dialog-form-state.js";
|
|
4
4
|
import { OverlayLayer } from "../lib/overlay-layer.js";
|
|
@@ -10,25 +10,25 @@ type DialogLabels = {
|
|
|
10
10
|
/** The hint after a click outside or on a close button: close again. */
|
|
11
11
|
unsavedChangesClose: string;
|
|
12
12
|
};
|
|
13
|
-
declare const DialogProvider: ({ labels, children }: React
|
|
13
|
+
declare const DialogProvider: ({ labels, children }: React.PropsWithChildren<{
|
|
14
14
|
labels: DialogLabels;
|
|
15
|
-
}>) => React
|
|
15
|
+
}>) => React.JSX.Element;
|
|
16
16
|
declare const Dialog: <Payload>({ dirty, onOpenChange, onOpenChangeComplete, ...props }: Dialog$1.Root.Props<Payload> & {
|
|
17
17
|
dirty?: boolean;
|
|
18
|
-
}) => React
|
|
19
|
-
declare const DialogPortal: React
|
|
18
|
+
}) => React.JSX.Element;
|
|
19
|
+
declare const DialogPortal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
20
|
declare function DialogTrigger({ tooltip, ...props }: Dialog$1.Trigger.Props & {
|
|
21
|
-
tooltip?: React
|
|
22
|
-
}): React
|
|
21
|
+
tooltip?: React.ReactNode;
|
|
22
|
+
}): React.JSX.Element;
|
|
23
23
|
declare function DialogClose({ tooltip, ...props }: Dialog$1.Close.Props & {
|
|
24
|
-
tooltip?: React
|
|
25
|
-
}): React
|
|
24
|
+
tooltip?: React.ReactNode;
|
|
25
|
+
}): React.JSX.Element;
|
|
26
26
|
declare const DialogBackdrop: ({ className, layer, ...props }: Dialog$1.Backdrop.Props & {
|
|
27
27
|
layer?: OverlayLayer;
|
|
28
|
-
}) => React
|
|
28
|
+
}) => React.JSX.Element;
|
|
29
29
|
declare const DialogViewport: ({ className, layer, ...props }: Dialog$1.Viewport.Props & {
|
|
30
30
|
layer?: OverlayLayer;
|
|
31
|
-
}) => React
|
|
31
|
+
}) => React.JSX.Element;
|
|
32
32
|
/** How the popup sits below `sm`; from `sm` up it is always centred. */
|
|
33
33
|
declare const DIALOG_MOBILE_LAYOUT: {
|
|
34
34
|
/** Pinned to the bottom edge, leaving the page visible above it. */
|
|
@@ -61,14 +61,14 @@ declare const DialogPopup: ({ backdropClassName, className, children, showCloseB
|
|
|
61
61
|
mobileLayout?: DialogMobileLayout;
|
|
62
62
|
layer?: OverlayLayer;
|
|
63
63
|
viewportClassName?: string;
|
|
64
|
-
}) => React
|
|
65
|
-
declare const DialogHeader: ({ className, ...props }: React
|
|
66
|
-
declare const DialogFooter: ({ className, variant, ...props }: React
|
|
64
|
+
}) => React.JSX.Element;
|
|
65
|
+
declare const DialogHeader: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
66
|
+
declare const DialogFooter: ({ className, variant, ...props }: React.ComponentProps<"div"> & {
|
|
67
67
|
variant?: "default" | "bare";
|
|
68
|
-
}) => React
|
|
69
|
-
declare const DialogTitle: ({ className, ...props }: Dialog$1.Title.Props) => React
|
|
70
|
-
declare const DialogDescription: ({ className, ...props }: Dialog$1.Description.Props) => React
|
|
71
|
-
declare const DialogPanel: ({ className, scrollFade, ...props }: React
|
|
68
|
+
}) => React.JSX.Element;
|
|
69
|
+
declare const DialogTitle: ({ className, ...props }: Dialog$1.Title.Props) => React.JSX.Element;
|
|
70
|
+
declare const DialogDescription: ({ className, ...props }: Dialog$1.Description.Props) => React.JSX.Element;
|
|
71
|
+
declare const DialogPanel: ({ className, scrollFade, ...props }: React.ComponentProps<"div"> & {
|
|
72
72
|
scrollFade?: boolean;
|
|
73
|
-
}) => React
|
|
73
|
+
}) => React.JSX.Element;
|
|
74
74
|
export { DIALOG_MOBILE_LAYOUT, DIALOG_SIZE_CLASS_NAMES, Dialog, DialogBackdrop, DialogBackdrop as DialogOverlay, DialogClose, DialogPopup as DialogContent, DialogPopup, DialogCreateHandle, DialogDescription, DialogFooter, DialogFormState, DialogHeader, type DialogLabels, type DialogMobileLayout, DialogPanel, DialogPortal, DialogProvider, type DialogSize, DialogTitle, DialogTrigger, DialogViewport };
|
|
@@ -50,15 +50,21 @@ function documentIdentityMark(identity, size) {
|
|
|
50
50
|
* in the same monospace units, so no observer or per-row state is needed; a
|
|
51
51
|
* label longer than its slot even in the short form truncates rather than
|
|
52
52
|
* spilling over its neighbour.
|
|
53
|
+
*
|
|
54
|
+
* The visible form depends on the slot, but the accessible name is always the
|
|
55
|
+
* full label: a narrow slot shows `262/06`, and a row whose title lacks the
|
|
56
|
+
* citation still exposes `262/2006`.
|
|
53
57
|
*/
|
|
54
58
|
function referenceLabelMark(labels, kind) {
|
|
55
59
|
const classes = statuteLabelClasses(labels.long.length);
|
|
56
60
|
return /* @__PURE__ */ jsxs("span", {
|
|
57
61
|
className: cn("@container/document-identity inline-flex max-w-full shrink-0 items-center justify-center font-mono leading-4 font-semibold tabular-nums", labels.short.length > 7 ? "text-[9px]" : "text-[10px]"),
|
|
58
62
|
style: { width: `${labels.long.length + .25}ch` },
|
|
63
|
+
"aria-label": labels.long,
|
|
59
64
|
"data-slot": "document-identity-badge",
|
|
60
65
|
"data-kind": kind,
|
|
61
66
|
dir: "ltr",
|
|
67
|
+
role: "img",
|
|
62
68
|
children: [/* @__PURE__ */ jsx(TruncatedText, {
|
|
63
69
|
className: classes.short,
|
|
64
70
|
hint: false,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React
|
|
2
|
-
declare const Frame: ({ className, ...props }: React
|
|
3
|
-
declare const FramePanel: ({ className, ...props }: React
|
|
4
|
-
declare const FrameHeader: ({ className, ...props }: React
|
|
5
|
-
declare const FrameTitle: ({ className, ...props }: React
|
|
6
|
-
declare const FrameDescription: ({ className, ...props }: React
|
|
7
|
-
declare const FrameFooter: ({ className, ...props }: React
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const Frame: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
3
|
+
declare const FramePanel: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
4
|
+
declare const FrameHeader: ({ className, ...props }: React.ComponentProps<"header">) => React.JSX.Element;
|
|
5
|
+
declare const FrameTitle: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
6
|
+
declare const FrameDescription: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
7
|
+
declare const FrameFooter: ({ className, ...props }: React.ComponentProps<"footer">) => React.JSX.Element;
|
|
8
8
|
export { Frame, FrameDescription, FrameFooter, FrameHeader, FramePanel, FrameTitle };
|
|
@@ -1,9 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Hex color picker — saturation/brightness square + hue strip.
|
|
3
|
+
*
|
|
4
|
+
* Adapted from react-colorful (MIT, Copyright 2020 Vlad Shilov).
|
|
5
|
+
* https://github.com/omgovich/react-colorful
|
|
6
|
+
*
|
|
7
|
+
* Changes from upstream:
|
|
8
|
+
* - Trimmed to hex-only (no RGB/HSL/alpha variants)
|
|
9
|
+
* - Dropped React.memo, useMemo, useCallback (React Compiler handles this)
|
|
10
|
+
* - Converted CSS classes to Tailwind
|
|
11
|
+
* - Merged small utility files into one module
|
|
12
|
+
* - Strict TypeScript (no `any`, no enums)
|
|
13
|
+
* - Arrow functions per project conventions
|
|
14
|
+
*/
|
|
15
|
+
import * as React from "react";
|
|
2
16
|
type HexColorPickerProps = {
|
|
3
17
|
/** Hex color with or without # (e.g. "#ff0000" or "FF0000") */
|
|
4
18
|
color?: string | undefined;
|
|
5
19
|
onChange?: (hex: string) => void;
|
|
6
20
|
className?: string;
|
|
7
21
|
};
|
|
8
|
-
declare const HexColorPicker: ({ color, onChange, className }: HexColorPickerProps) => React
|
|
22
|
+
declare const HexColorPicker: ({ color, onChange, className }: HexColorPickerProps) => React.JSX.Element;
|
|
9
23
|
export { HexColorPicker, type HexColorPickerProps };
|
|
@@ -13,6 +13,12 @@ type ScrollState = {
|
|
|
13
13
|
};
|
|
14
14
|
export declare const HorizontalScroller: ({ children, className, nextLabel, previousLabel, contentClassName, viewportClassName, ...props }: HorizontalScrollerProps) => import("react").JSX.Element;
|
|
15
15
|
export declare const scrollState: (scrollLeft: number, scrollWidth: number, clientWidth: number, direction: ScrollDirection) => ScrollState;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the content needs the controls at all, decided from `rowWidth`, the
|
|
18
|
+
* whole width the scroller has: the controls take room from the viewport once
|
|
19
|
+
* they show, and content that fits the row without them needs none.
|
|
20
|
+
*/
|
|
21
|
+
export declare const fitsRow: (scrollWidth: number, rowWidth: number) => boolean;
|
|
16
22
|
/** Wheel deltas arrive in pixels, lines or pages; scrollBy takes pixels. */
|
|
17
23
|
export declare const wheelDeltaPixels: (event: Pick<WheelEvent, "deltaMode" | "deltaY">, node: Pick<HTMLElement, "clientWidth">) => number;
|
|
18
24
|
export {};
|
|
@@ -3,10 +3,11 @@ import { containedEventHandler } from "../hooks/use-contained-handler.js";
|
|
|
3
3
|
import { ChevronLeftIcon, ChevronRightIcon } from "../icons.js";
|
|
4
4
|
import { SCROLL_EDGE_FADE_CLASS, writeScrollEdgeFade } from "../lib/scroll-edge-fade.js";
|
|
5
5
|
import { cn } from "../lib/utils.js";
|
|
6
|
-
import {
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { useCallback, useState } from "react";
|
|
8
8
|
// src/components/horizontal-scroller.tsx
|
|
9
|
-
const CONTROL_CLASS = "bg-background
|
|
9
|
+
const CONTROL_CLASS = "bg-background text-foreground shrink-0 rounded-full border p-1 shadow-sm";
|
|
10
|
+
const INERT_CONTROL_CLASS = "pointer-events-none w-0 overflow-hidden border-0 p-0 opacity-0 focus-visible:w-auto focus-visible:border focus-visible:p-1 focus-visible:opacity-100";
|
|
10
11
|
const HorizontalScroller = ({ children, className, nextLabel, previousLabel, contentClassName, viewportClassName, ...props }) => {
|
|
11
12
|
const [viewport, setViewport] = useState(null);
|
|
12
13
|
const [state, setState] = useState({
|
|
@@ -15,7 +16,11 @@ const HorizontalScroller = ({ children, className, nextLabel, previousLabel, con
|
|
|
15
16
|
});
|
|
16
17
|
const measure = useCallback((node) => {
|
|
17
18
|
writeScrollEdgeFade(node);
|
|
18
|
-
|
|
19
|
+
const rowWidth = rowContentWidth(node.parentElement) ?? node.clientWidth;
|
|
20
|
+
setState(fitsRow(node.scrollWidth, rowWidth) ? {
|
|
21
|
+
canScrollEnd: false,
|
|
22
|
+
canScrollStart: false
|
|
23
|
+
} : scrollState(node.scrollLeft, node.scrollWidth, node.clientWidth, getComputedStyle(node).direction === "rtl" ? "rtl" : "ltr"));
|
|
19
24
|
}, []);
|
|
20
25
|
const viewportRef = useCallback((node) => {
|
|
21
26
|
setViewport(node);
|
|
@@ -48,8 +53,9 @@ const HorizontalScroller = ({ children, className, nextLabel, previousLabel, con
|
|
|
48
53
|
});
|
|
49
54
|
};
|
|
50
55
|
const onScroll = (event) => measure(event.currentTarget);
|
|
56
|
+
const overflows = state.canScrollStart || state.canScrollEnd;
|
|
51
57
|
return /* @__PURE__ */ jsxs("div", {
|
|
52
|
-
className: cn("
|
|
58
|
+
className: cn("flex min-w-0 items-center", className),
|
|
53
59
|
onFocus: containedEventHandler(({ target }) => {
|
|
54
60
|
if (target instanceof HTMLElement && target !== viewport) target.scrollIntoView({
|
|
55
61
|
block: "nearest",
|
|
@@ -57,35 +63,39 @@ const HorizontalScroller = ({ children, className, nextLabel, previousLabel, con
|
|
|
57
63
|
});
|
|
58
64
|
}),
|
|
59
65
|
...props,
|
|
60
|
-
children: [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
className: cn("
|
|
66
|
-
|
|
66
|
+
children: [
|
|
67
|
+
overflows && /* @__PURE__ */ jsx("button", {
|
|
68
|
+
"aria-disabled": !state.canScrollStart,
|
|
69
|
+
tabIndex: state.canScrollStart ? void 0 : -1,
|
|
70
|
+
"aria-label": previousLabel,
|
|
71
|
+
className: cn(CONTROL_CLASS, state.canScrollStart ? "me-1" : INERT_CONTROL_CLASS),
|
|
72
|
+
onClick: () => {
|
|
73
|
+
if (state.canScrollStart) scroll(-1);
|
|
74
|
+
},
|
|
75
|
+
type: "button",
|
|
76
|
+
children: /* @__PURE__ */ jsx(ChevronLeftIcon, { className: "size-4 rtl:rotate-180" })
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ jsx("div", {
|
|
79
|
+
className: cn("scrollbar-subtle min-w-0 flex-1 overflow-x-auto overscroll-x-contain [--fade-size:2.5rem]", SCROLL_EDGE_FADE_CLASS, viewportClassName),
|
|
80
|
+
onScroll,
|
|
81
|
+
ref: viewportRef,
|
|
82
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
83
|
+
className: cn("w-max min-w-full", contentClassName),
|
|
84
|
+
children
|
|
85
|
+
})
|
|
86
|
+
}),
|
|
87
|
+
overflows && /* @__PURE__ */ jsx("button", {
|
|
88
|
+
"aria-disabled": !state.canScrollEnd,
|
|
89
|
+
tabIndex: state.canScrollEnd ? void 0 : -1,
|
|
90
|
+
"aria-label": nextLabel,
|
|
91
|
+
className: cn(CONTROL_CLASS, state.canScrollEnd ? "ms-1" : INERT_CONTROL_CLASS),
|
|
92
|
+
onClick: () => {
|
|
93
|
+
if (state.canScrollEnd) scroll(1);
|
|
94
|
+
},
|
|
95
|
+
type: "button",
|
|
96
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, { className: "size-4 rtl:rotate-180" })
|
|
67
97
|
})
|
|
68
|
-
|
|
69
|
-
"aria-disabled": !state.canScrollStart,
|
|
70
|
-
tabIndex: state.canScrollStart ? void 0 : -1,
|
|
71
|
-
"aria-label": previousLabel,
|
|
72
|
-
className: cn(CONTROL_CLASS, "start-1", !state.canScrollStart && "pointer-events-none opacity-0 focus-visible:opacity-100"),
|
|
73
|
-
onClick: () => {
|
|
74
|
-
if (state.canScrollStart) scroll(-1);
|
|
75
|
-
},
|
|
76
|
-
type: "button",
|
|
77
|
-
children: /* @__PURE__ */ jsx(ChevronLeftIcon, { className: "size-4 rtl:rotate-180" })
|
|
78
|
-
}), /* @__PURE__ */ jsx("button", {
|
|
79
|
-
"aria-disabled": !state.canScrollEnd,
|
|
80
|
-
tabIndex: state.canScrollEnd ? void 0 : -1,
|
|
81
|
-
"aria-label": nextLabel,
|
|
82
|
-
className: cn(CONTROL_CLASS, "end-1", !state.canScrollEnd && "pointer-events-none opacity-0 focus-visible:opacity-100"),
|
|
83
|
-
onClick: () => {
|
|
84
|
-
if (state.canScrollEnd) scroll(1);
|
|
85
|
-
},
|
|
86
|
-
type: "button",
|
|
87
|
-
children: /* @__PURE__ */ jsx(ChevronRightIcon, { className: "size-4 rtl:rotate-180" })
|
|
88
|
-
})] })]
|
|
98
|
+
]
|
|
89
99
|
});
|
|
90
100
|
};
|
|
91
101
|
const scrollState = (scrollLeft, scrollWidth, clientWidth, direction) => {
|
|
@@ -96,6 +106,22 @@ const scrollState = (scrollLeft, scrollWidth, clientWidth, direction) => {
|
|
|
96
106
|
canScrollEnd: maximum > 1 && position < maximum - 1
|
|
97
107
|
};
|
|
98
108
|
};
|
|
109
|
+
/**
|
|
110
|
+
* The width the row's children span: the room the controls and the viewport
|
|
111
|
+
* share, without the row's own padding, in either direction.
|
|
112
|
+
*/
|
|
113
|
+
const rowContentWidth = (row) => {
|
|
114
|
+
const first = row?.firstElementChild?.getBoundingClientRect();
|
|
115
|
+
const last = row?.lastElementChild?.getBoundingClientRect();
|
|
116
|
+
if (first === void 0 || last === void 0) return;
|
|
117
|
+
return Math.max(first.right, last.right) - Math.min(first.left, last.left);
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Whether the content needs the controls at all, decided from `rowWidth`, the
|
|
121
|
+
* whole width the scroller has: the controls take room from the viewport once
|
|
122
|
+
* they show, and content that fits the row without them needs none.
|
|
123
|
+
*/
|
|
124
|
+
const fitsRow = (scrollWidth, rowWidth) => scrollWidth - rowWidth <= 1;
|
|
99
125
|
const LINE_HEIGHT_PX = 16;
|
|
100
126
|
/** Wheel deltas arrive in pixels, lines or pages; scrollBy takes pixels. */
|
|
101
127
|
const wheelDeltaPixels = (event, node) => {
|
|
@@ -105,4 +131,4 @@ const wheelDeltaPixels = (event, node) => {
|
|
|
105
131
|
default: return event.deltaY;
|
|
106
132
|
}
|
|
107
133
|
};
|
|
108
|
-
export { HorizontalScroller, scrollState, wheelDeltaPixels };
|
|
134
|
+
export { HorizontalScroller, fitsRow, scrollState, wheelDeltaPixels };
|
|
@@ -64,6 +64,7 @@ const IdentityText = ({ children, className }) => {
|
|
|
64
64
|
}), /* @__PURE__ */ jsx(TooltipPopup, {
|
|
65
65
|
className: "max-w-sm",
|
|
66
66
|
role: "tooltip",
|
|
67
|
+
side: "inline-end",
|
|
67
68
|
children: /* @__PURE__ */ jsx("span", {
|
|
68
69
|
className: "block max-w-sm wrap-break-word",
|
|
69
70
|
dir: "auto",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { InputProps } from "./input.js";
|
|
3
3
|
import { TextareaProps } from "./textarea.js";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
|
-
declare const InputGroup: ({ className, ...props }: React
|
|
5
|
+
declare const InputGroup: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
6
6
|
declare const inputGroupAddonVariants: (props?: ({
|
|
7
7
|
align?: "block-end" | "block-start" | "inline-end" | "inline-start" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
-
declare const InputGroupAddon: ({ className, align, ...props }: React
|
|
10
|
-
declare const InputGroupText: ({ className, ...props }: React
|
|
11
|
-
declare const InputGroupInput: ({ className, ...props }: InputProps) => React
|
|
12
|
-
declare const InputGroupTextarea: ({ className, ...props }: TextareaProps) => React
|
|
9
|
+
declare const InputGroupAddon: ({ className, align, ...props }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>) => React.JSX.Element;
|
|
10
|
+
declare const InputGroupText: ({ className, ...props }: React.ComponentProps<"span">) => React.JSX.Element;
|
|
11
|
+
declare const InputGroupInput: ({ className, ...props }: InputProps) => React.JSX.Element;
|
|
12
|
+
declare const InputGroupTextarea: ({ className, ...props }: TextareaProps) => React.JSX.Element;
|
|
13
13
|
export { InputGroup, InputGroupAddon, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { OTPInput } from "input-otp";
|
|
3
|
-
declare const InputOTP: ({ className, containerClassName, ...props }: React
|
|
3
|
+
declare const InputOTP: ({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput> & {
|
|
4
4
|
containerClassName?: string;
|
|
5
|
-
}) => React
|
|
6
|
-
declare const InputOTPGroup: ({ className, ...props }: React
|
|
7
|
-
declare const InputOTPSlot: ({ index, className, ...props }: React
|
|
5
|
+
}) => React.JSX.Element;
|
|
6
|
+
declare const InputOTPGroup: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
7
|
+
declare const InputOTPSlot: ({ index, className, ...props }: React.ComponentProps<"div"> & {
|
|
8
8
|
index: number;
|
|
9
|
-
}) => React
|
|
10
|
-
declare const InputOTPSeparator: ({ ...props }: React
|
|
9
|
+
}) => React.JSX.Element;
|
|
10
|
+
declare const InputOTPSeparator: ({ ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
11
11
|
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { MinusIcon } from "../icons.js";
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import * as React
|
|
5
|
+
import * as React from "react";
|
|
6
6
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
7
7
|
// src/components/input-otp.tsx
|
|
8
8
|
const InputOTP = ({ className, containerClassName, ...props }) => /* @__PURE__ */ jsx(OTPInput, {
|
|
@@ -17,7 +17,7 @@ const InputOTPGroup = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
|
17
17
|
...props
|
|
18
18
|
});
|
|
19
19
|
const InputOTPSlot = ({ index, className, ...props }) => {
|
|
20
|
-
const { char, hasFakeCaret, isActive } = React
|
|
20
|
+
const { char, hasFakeCaret, isActive } = React.use(OTPInputContext).slots[index] ?? {};
|
|
21
21
|
return /* @__PURE__ */ jsxs("div", {
|
|
22
22
|
className: cn("border-input aria-invalid:border-destructive data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40 relative flex h-9 w-9 items-center justify-center border-y border-e text-sm shadow-xs outline-none first:rounded-s-md first:border-s last:rounded-e-md data-[active=true]:z-10 data-[active=true]:ring-[3px]", className),
|
|
23
23
|
"data-active": isActive,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { ControlSize } from "../lib/control-size.js";
|
|
3
3
|
import { Input as Input$1 } from "@base-ui/react/input";
|
|
4
|
-
type InputProps = Omit<Input$1.Props & React
|
|
5
|
-
type?: Exclude<React
|
|
4
|
+
type InputProps = Omit<Input$1.Props & React.RefAttributes<HTMLInputElement>, "size" | "style" | "type"> & {
|
|
5
|
+
type?: Exclude<React.HTMLInputTypeAttribute, "file"> | undefined;
|
|
6
6
|
size?: ControlSize | number;
|
|
7
|
-
style?: React
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
8
|
unstyled?: boolean;
|
|
9
9
|
/**
|
|
10
10
|
* A borderless field in a line of text: it edits a value where it is read,
|
|
@@ -14,5 +14,5 @@ type InputProps = Omit<Input$1.Props & React$1.RefAttributes<HTMLInputElement>,
|
|
|
14
14
|
inline?: boolean;
|
|
15
15
|
nativeInput?: boolean;
|
|
16
16
|
};
|
|
17
|
-
declare const Input: ({ className, size, unstyled, inline, nativeInput, dir, onChange, ...props }: InputProps) => React
|
|
17
|
+
declare const Input: ({ className, size, unstyled, inline, nativeInput, dir, onChange, ...props }: InputProps) => React.JSX.Element;
|
|
18
18
|
export { Input, type InputProps };
|
package/dist/components/kbd.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
/**
|
|
3
3
|
* A key or a key combination, drawn as key caps.
|
|
4
4
|
*
|
|
@@ -11,7 +11,7 @@ import * as React$1 from "react";
|
|
|
11
11
|
* `MenuShortcut` and `TooltipPopup`'s `shortcut` render through it, so a
|
|
12
12
|
* shortcut reads the same in a menu, a tooltip and a hint.
|
|
13
13
|
*/
|
|
14
|
-
declare const Kbd: ({ className, children, keys, variant, ...props }: KbdProps) => React
|
|
14
|
+
declare const Kbd: ({ className, children, keys, variant, ...props }: KbdProps) => React.JSX.Element;
|
|
15
15
|
/** A modifier or named key `Kbd` spells per platform; anything else as is. */
|
|
16
16
|
type KbdNamedKey = "mod" | "ctrl" | "alt" | "shift" | "enter" | "escape" | "backspace" | "delete" | "tab" | "up" | "down" | "left" | "right";
|
|
17
17
|
/**
|
|
@@ -32,7 +32,7 @@ type KbdPlatform = "apple" | "other";
|
|
|
32
32
|
* labels (a menu item), where caps would crowd it.
|
|
33
33
|
*/
|
|
34
34
|
type KbdVariant = "cap" | "plain";
|
|
35
|
-
type KbdProps = React
|
|
35
|
+
type KbdProps = React.ComponentProps<"kbd"> & {
|
|
36
36
|
keys?: KbdKeys | undefined;
|
|
37
37
|
variant?: KbdVariant | undefined;
|
|
38
38
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { TruncatedTextLines } from "./truncated-text.js";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
import { useRender } from "@base-ui/react/use-render";
|
|
@@ -10,40 +10,40 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
10
10
|
* truncates and the trailing column keeps its width, so actions stay on
|
|
11
11
|
* screen at any viewport.
|
|
12
12
|
*/
|
|
13
|
-
declare const ListGroup: ({ className, ...props }: React
|
|
14
|
-
declare const ListGroupHeader: ({ className, ...props }: React
|
|
13
|
+
declare const ListGroup: ({ className, ...props }: React.ComponentProps<"section">) => React.JSX.Element;
|
|
14
|
+
declare const ListGroupHeader: ({ className, ...props }: React.ComponentProps<"header">) => React.JSX.Element;
|
|
15
15
|
/** Title and description stack; takes the space the header action leaves. */
|
|
16
|
-
declare const ListGroupHeading: ({ className, ...props }: React
|
|
17
|
-
declare const ListGroupTitle: ({ className, children, ...props }: React
|
|
16
|
+
declare const ListGroupHeading: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
17
|
+
declare const ListGroupTitle: ({ className, children, ...props }: React.ComponentProps<"h2">) => React.JSX.Element;
|
|
18
18
|
/**
|
|
19
19
|
* Quiet item count after the title; shows matches while a search filters,
|
|
20
20
|
* and a changed digit fades in rather than snapping. `count` arrives
|
|
21
21
|
* formatted in the caller's locale.
|
|
22
22
|
*/
|
|
23
|
-
declare const ListGroupCount: ({ className, count, ...props }: Omit<React
|
|
23
|
+
declare const ListGroupCount: ({ className, count, ...props }: Omit<React.ComponentProps<"span">, "children"> & {
|
|
24
24
|
count: string;
|
|
25
|
-
}) => React
|
|
26
|
-
declare const ListGroupDescription: ({ className, ...props }: React
|
|
25
|
+
}) => React.JSX.Element;
|
|
26
|
+
declare const ListGroupDescription: ({ className, ...props }: React.ComponentProps<"p">) => React.JSX.Element;
|
|
27
27
|
/** Quiet trailing affordance on the header row (a link or ghost button). */
|
|
28
|
-
declare const ListGroupAction: ({ className, ...props }: React
|
|
28
|
+
declare const ListGroupAction: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
29
29
|
/** The surface. Depth comes from a ring plus a soft shadow, not a frame. */
|
|
30
|
-
declare const List: ({ className, ...props }: React
|
|
30
|
+
declare const List: ({ className, ...props }: React.ComponentProps<"ul">) => React.JSX.Element;
|
|
31
31
|
/**
|
|
32
32
|
* One row. Pass `render` (a link or button element) to make the whole row the
|
|
33
33
|
* target; then keep other interactive elements out of it. Rows with their own
|
|
34
34
|
* trailing buttons stay a plain `li` and put the actions in `ListItemActions`.
|
|
35
35
|
*/
|
|
36
|
-
declare const ListItem: ({ className, render, children, ...props }: useRender.ComponentProps<"div">) => React
|
|
36
|
+
declare const ListItem: ({ className, render, children, ...props }: useRender.ComponentProps<"div">) => React.JSX.Element;
|
|
37
37
|
declare const listItemMediaVariants: (props?: ({
|
|
38
38
|
variant?: "icon" | "initial" | null | undefined;
|
|
39
39
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
40
40
|
/** Fixed 32px tile for an icon, logo or initial. */
|
|
41
|
-
declare const ListItemMedia: ({ className, variant, ...props }: React
|
|
42
|
-
declare const ListItemContent: ({ className, ...props }: React
|
|
41
|
+
declare const ListItemMedia: ({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof listItemMediaVariants>) => React.JSX.Element;
|
|
42
|
+
declare const ListItemContent: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
43
43
|
declare const listItemTitleVariants: (props?: ({
|
|
44
44
|
variant?: "name" | "statement" | null | undefined;
|
|
45
45
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
46
|
-
declare const ListItemTitle: ({ className, variant, ...props }: React
|
|
46
|
+
declare const ListItemTitle: ({ className, variant, ...props }: React.ComponentProps<"span"> & VariantProps<typeof listItemTitleVariants>) => React.JSX.Element;
|
|
47
47
|
declare const listItemDescriptionVariants: (props?: ({
|
|
48
48
|
variant?: "code" | "paragraph" | "text" | null | undefined;
|
|
49
49
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -51,18 +51,18 @@ declare const listItemDescriptionVariants: (props?: ({
|
|
|
51
51
|
* Secondary line, one line by default. Use the `paragraph` variant (two
|
|
52
52
|
* lines) or `lines` when more is genuinely needed; never `whitespace-nowrap`.
|
|
53
53
|
*/
|
|
54
|
-
declare const ListItemDescription: ({ className, variant, lines, ...props }: React
|
|
54
|
+
declare const ListItemDescription: ({ className, variant, lines, ...props }: React.ComponentProps<"span"> & VariantProps<typeof listItemDescriptionVariants> & {
|
|
55
55
|
lines?: TruncatedTextLines;
|
|
56
|
-
}) => React
|
|
57
|
-
declare const ListItemActions: ({ className, ...props }: React
|
|
56
|
+
}) => React.JSX.Element;
|
|
57
|
+
declare const ListItemActions: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
58
58
|
/** Single-line empty row inside a `List`. Phrase it as the next action. */
|
|
59
|
-
declare const ListEmpty: ({ className, ...props }: React
|
|
59
|
+
declare const ListEmpty: ({ className, ...props }: React.ComponentProps<"li">) => React.JSX.Element;
|
|
60
60
|
type StatusTone = "neutral" | "success" | "warning" | "destructive";
|
|
61
61
|
/**
|
|
62
62
|
* Dot + label status. The label always carries the meaning; the dot only
|
|
63
63
|
* reinforces it, so colour is never the sole signal.
|
|
64
64
|
*/
|
|
65
|
-
declare const ListItemStatus: ({ tone, className, children, ...props }: React
|
|
65
|
+
declare const ListItemStatus: ({ tone, className, children, ...props }: React.ComponentProps<"span"> & {
|
|
66
66
|
tone?: StatusTone;
|
|
67
|
-
}) => React
|
|
67
|
+
}) => React.JSX.Element;
|
|
68
68
|
export { List, ListEmpty, ListGroup, ListGroupAction, ListGroupCount, ListGroupDescription, ListGroupHeader, ListGroupHeading, ListGroupTitle, ListItem, ListItemActions, ListItemContent, ListItemDescription, ListItemMedia, ListItemStatus, ListItemTitle, type StatusTone };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { Kbd } from "./kbd.js";
|
|
3
3
|
import { Menu as Menu$1 } from "@base-ui/react/menu";
|
|
4
4
|
declare const MenuCreateHandle: typeof Menu$1.createHandle;
|
|
5
5
|
declare const Menu: typeof Menu$1.Root;
|
|
6
|
-
declare const MenuPortal: React
|
|
6
|
+
declare const MenuPortal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").MenuPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
7
|
declare function MenuTrigger({ tooltip, ...props }: Menu$1.Trigger.Props & {
|
|
8
|
-
tooltip?: React
|
|
9
|
-
}): React
|
|
10
|
-
declare const MenuAnchor: () => React
|
|
8
|
+
tooltip?: React.ReactNode;
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
declare const MenuAnchor: () => React.JSX.Element;
|
|
11
11
|
declare const MenuPopup: ({ children, className, sideOffset, align, alignOffset, side, anchor, collisionAvoidance, header, viewportClassName, ...props }: Menu$1.Popup.Props & {
|
|
12
12
|
/** Content pinned above the scrolling list, such as a search field. It sits
|
|
13
13
|
* outside the list, so a row scrolled into view can never hide under it. */
|
|
14
|
-
header?: React
|
|
14
|
+
header?: React.ReactNode;
|
|
15
15
|
/** Classes for the scrolling list inside the popup, e.g. a lower height
|
|
16
16
|
* cap for a long searchable list. */
|
|
17
17
|
viewportClassName?: string;
|
|
@@ -21,12 +21,12 @@ declare const MenuPopup: ({ children, className, sideOffset, align, alignOffset,
|
|
|
21
21
|
side?: Menu$1.Positioner.Props["side"];
|
|
22
22
|
anchor?: Menu$1.Positioner.Props["anchor"];
|
|
23
23
|
collisionAvoidance?: Menu$1.Positioner.Props["collisionAvoidance"];
|
|
24
|
-
}) => React
|
|
25
|
-
declare const MenuGroup: (props: Menu$1.Group.Props) => React
|
|
24
|
+
}) => React.JSX.Element;
|
|
25
|
+
declare const MenuGroup: (props: Menu$1.Group.Props) => React.JSX.Element;
|
|
26
26
|
declare const MenuItem: ({ className, inset, variant, ...props }: Menu$1.Item.Props & {
|
|
27
27
|
inset?: boolean;
|
|
28
28
|
variant?: "default" | "destructive";
|
|
29
|
-
}) => React
|
|
29
|
+
}) => React.JSX.Element;
|
|
30
30
|
/**
|
|
31
31
|
* A menu row that navigates: an `<a>` with the item's look, so it opens in a
|
|
32
32
|
* new tab on a modified click, shows its URL on hover and is announced as a
|
|
@@ -36,33 +36,33 @@ declare const MenuItem: ({ className, inset, variant, ...props }: Menu$1.Item.Pr
|
|
|
36
36
|
*/
|
|
37
37
|
declare const MenuLinkItem: ({ className, inset, ...props }: Menu$1.LinkItem.Props & {
|
|
38
38
|
inset?: boolean;
|
|
39
|
-
}) => React
|
|
39
|
+
}) => React.JSX.Element;
|
|
40
40
|
declare const MenuCheckboxItem: ({ className, children, checked, variant, ...props }: Menu$1.CheckboxItem.Props & {
|
|
41
41
|
variant?: "default" | "switch";
|
|
42
|
-
}) => React
|
|
43
|
-
declare const MenuRadioGroup: (props: Menu$1.RadioGroup.Props) => React
|
|
42
|
+
}) => React.JSX.Element;
|
|
43
|
+
declare const MenuRadioGroup: (props: Menu$1.RadioGroup.Props) => React.JSX.Element;
|
|
44
44
|
declare const MenuRadioItem: ({ className, children, indicator, ...props }: Menu$1.RadioItem.Props & {
|
|
45
45
|
indicator?: "check" | "none";
|
|
46
|
-
}) => React
|
|
46
|
+
}) => React.JSX.Element;
|
|
47
47
|
declare const MenuGroupLabel: ({ className, inset, ...props }: Menu$1.GroupLabel.Props & {
|
|
48
48
|
inset?: boolean;
|
|
49
|
-
}) => React
|
|
50
|
-
declare const MenuSeparator: ({ className, ...props }: Menu$1.Separator.Props) => React
|
|
49
|
+
}) => React.JSX.Element;
|
|
50
|
+
declare const MenuSeparator: ({ className, ...props }: Menu$1.Separator.Props) => React.JSX.Element;
|
|
51
51
|
/**
|
|
52
52
|
* The shortcut at the end of a menu row. Pass `keys` (`["mod", "K"]`) to have
|
|
53
53
|
* it spelled for the reader's platform; see `Kbd`. It is the `plain` `Kbd`,
|
|
54
54
|
* with no key-cap box, which would crowd a row of labels.
|
|
55
55
|
*/
|
|
56
|
-
declare const MenuShortcut: ({ className, ...props }: Omit<React
|
|
57
|
-
declare const MenuSub: (props: Menu$1.SubmenuRoot.Props) => React
|
|
56
|
+
declare const MenuShortcut: ({ className, ...props }: Omit<React.ComponentProps<typeof Kbd>, "variant">) => React.JSX.Element;
|
|
57
|
+
declare const MenuSub: (props: Menu$1.SubmenuRoot.Props) => React.JSX.Element;
|
|
58
58
|
declare const MenuSubTrigger: ({ className, inset, children, ...props }: Menu$1.SubmenuTrigger.Props & {
|
|
59
59
|
inset?: boolean;
|
|
60
|
-
}) => React
|
|
60
|
+
}) => React.JSX.Element;
|
|
61
61
|
declare const MenuSubPopup: ({ className, sideOffset, alignOffset, align, ...props }: Menu$1.Popup.Props & {
|
|
62
|
-
header?: React
|
|
62
|
+
header?: React.ReactNode;
|
|
63
63
|
viewportClassName?: string;
|
|
64
64
|
align?: Menu$1.Positioner.Props["align"];
|
|
65
65
|
sideOffset?: Menu$1.Positioner.Props["sideOffset"];
|
|
66
66
|
alignOffset?: Menu$1.Positioner.Props["alignOffset"];
|
|
67
|
-
}) => React
|
|
67
|
+
}) => React.JSX.Element;
|
|
68
68
|
export { Menu as DropdownMenu, Menu, MenuCheckboxItem as DropdownMenuCheckboxItem, MenuCheckboxItem, MenuPopup as DropdownMenuContent, MenuPopup, MenuCreateHandle as DropdownMenuCreateHandle, MenuCreateHandle, MenuGroup as DropdownMenuGroup, MenuGroup, MenuItem as DropdownMenuItem, MenuItem, MenuGroupLabel as DropdownMenuLabel, MenuGroupLabel, MenuLinkItem as DropdownMenuLinkItem, MenuLinkItem, MenuPortal as DropdownMenuPortal, MenuPortal, MenuRadioGroup as DropdownMenuRadioGroup, MenuRadioGroup, MenuRadioItem as DropdownMenuRadioItem, MenuRadioItem, MenuSeparator as DropdownMenuSeparator, MenuSeparator, MenuShortcut as DropdownMenuShortcut, MenuShortcut, MenuSub as DropdownMenuSub, MenuSub, MenuSubPopup as DropdownMenuSubContent, MenuSubPopup, MenuSubTrigger as DropdownMenuSubTrigger, MenuSubTrigger, MenuTrigger as DropdownMenuTrigger, MenuTrigger, MenuAnchor };
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Outline navigation: an embedded panel, a host-owned rail, or a disclosure.
|
|
3
|
+
*
|
|
4
|
+
* Embedded presentations fill their host track. The standalone disclosure
|
|
5
|
+
* owns a thin column of ticks; hovering, focusing, or tapping the column
|
|
6
|
+
* reveals the collapsible tree. Click a tick or a row to jump.
|
|
7
|
+
*
|
|
8
|
+
* Generic over the position source: callers supply `resolvePct` (vertical % for
|
|
9
|
+
* a tick) and `onJump`. Active tracking is derived from `resolvePct` by default,
|
|
10
|
+
* or driven externally via the controlled `activeId` prop (e.g. a virtualised
|
|
11
|
+
* editor that measures rendered anchors itself).
|
|
12
|
+
*/
|
|
1
13
|
import { ReactNode, RefObject } from "react";
|
|
2
14
|
/**
|
|
3
15
|
* How prominently an entry reads next to the entries around it. A caller
|