feat(ui): support invisible resizable split separators
This commit is contained in:
@@ -3111,6 +3111,12 @@ textarea.nodedc-field__control {
|
||||
box-shadow: 0 0 0 2px rgb(var(--nodedc-accent-rgb) / 0.16);
|
||||
}
|
||||
|
||||
/* Keep the full hit area and keyboard focus cue without a visible divider. */
|
||||
.nodedc-split-pane[data-separator-appearance="invisible"] > .nodedc-split-pane__separator:not(:focus-visible)::before {
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.nodedc-split-pane[data-dragging="true"] {
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ export interface SplitPaneProps extends Omit<HTMLAttributes<HTMLDivElement>, "ch
|
||||
step?: number;
|
||||
resizable?: boolean;
|
||||
separatorLabel: string;
|
||||
separatorAppearance?: "line" | "invisible";
|
||||
}
|
||||
|
||||
const clamp = (value: number, minimum: number, maximum: number) => (
|
||||
@@ -48,6 +49,7 @@ export function SplitPane({
|
||||
step = 2,
|
||||
resizable = true,
|
||||
separatorLabel,
|
||||
separatorAppearance = "line",
|
||||
className,
|
||||
style,
|
||||
...props
|
||||
@@ -95,6 +97,7 @@ export function SplitPane({
|
||||
ref={rootRef}
|
||||
className={cn("nodedc-split-pane", className)}
|
||||
data-orientation={orientation}
|
||||
data-separator-appearance={separatorAppearance}
|
||||
data-dragging={dragging ? "true" : undefined}
|
||||
style={splitStyle}
|
||||
{...props}
|
||||
|
||||
Reference in New Issue
Block a user