UNPKG

@trimble-oss/moduswebcomponents

Version:

Modus Web Components is a modern, accessible UI library built with Stencil JS that provides reusable web components following Trimble's Modus design system. This updated version focuses on improved flexibility, enhanced theming options, comprehensive cust

62 lines (61 loc) 2.31 kB
import { DaisySize, Orientation } from '../types'; /** * A draggable handle component for resizing adjacent elements */ export declare class ModusWcHandle { private inheritedAttributes; private startPos; private startLeftSize; private startRightSize; private previousBodyCursor; private previousBodyUserSelect; private readonly nonPassiveListenerOptions; /** Reference to the host element */ el: HTMLElement; /** Custom CSS class to apply to the handle element. */ customClass?: string; /** The left target element to resize (CSS selector or HTMLElement) */ leftTarget?: string | HTMLElement; /** The orientation of the handle. */ orientation?: Orientation; /** The right target element to resize (CSS selector or HTMLElement) */ rightTarget?: string | HTMLElement; /** The size of the handle. */ size?: 'default' | 'lg' | 'xl' | '2xl'; /** The density/spacing of the handle container (compact: 8px, comfortable: 12px, relaxed: 16px). */ density?: 'compact' | 'comfortable' | 'relaxed'; /** The initial split percentage for the left/top panel (1-100). The right/bottom panel gets the remaining percentage. */ defaultSplit?: number; /** The size of the button. */ buttonSize?: DaisySize | 'xl'; /** The color of the button. */ buttonColor?: 'primary' | 'secondary' | 'tertiary' | 'warning' | 'danger'; /** The variant of the button. */ buttonVariant?: 'borderless' | 'filled' | 'outlined'; /** The type of handle to display. */ type?: 'bar' | 'button'; /** Internal state for dragging */ private isDragging; private readonly handleMouseDown; private readonly handleTouchStart; private readonly handleMouseMove; private readonly handleTouchMove; private readonly handleMouseUp; private readonly handleTouchEnd; private readonly handleKeyDown; componentWillLoad(): void; componentDidLoad(): void; private applyInitialSplit; private setupDragHandlers; private getTargetElement; private startDrag; private drag; private endDrag; private getMinSize; private clampDelta; disconnectedCallback(): void; private getClasses; private renderBarHandle; private renderButtonHandle; render(): any; }