import React from 'react'; import { AnyTheme, Interpolation, OptionalThemedProps } from '@splunk/themes'; import { ComponentProps } from '../utils/types'; type Color = React.CSSProperties['color'] | Interpolation>; type SpotLightAnchorElement = HTMLElement | null; type SpotLightAnchorEdge = 'top' | 'right' | 'bottom' | 'left'; interface SpotLightColorStop { /** * Position of the stop within the radial gradient. */ at?: string; /** * The color used at this gradient stop. */ color: Color; /** * The amount of color mixed into the stop, expressed as a CSS percentage. */ opacity?: string; } interface SpotLightAnchor { /** * The edge whose center should be used as the spotlight origin. */ edge: SpotLightAnchorEdge; /** * The element used to position the spotlight. Falls back to the spotlight host when omitted. */ element?: SpotLightAnchorElement; /** * Distance applied perpendicular to the chosen edge. */ inset?: string; /** * Offset applied along the chosen edge axis. */ offset?: string; } interface SpotLightLayer { /** * Positions the spotlight relative to an element instead of explicit coordinates. */ anchor?: SpotLightAnchor; /** * The radial gradient height. When paired with `width`, this creates an elliptical spotlight. */ height: string; /** * Explicit gradient stops for multicolor spotlights. */ stops: SpotLightColorStop[]; /** * The radial gradient width. When paired with `height`, this creates an elliptical spotlight. */ width: string; /** * Horizontal position for the spotlight center when `anchor` is not provided. */ x?: string; /** * Vertical position for the spotlight center when `anchor` is not provided. */ y?: string; } interface SpotLightPropsBase { /** * Applies a blur filter to the combined spotlight surface. */ blur?: string; /** * A React ref which is set to the DOM element when the component mounts, and null when it unmounts. */ elementRef?: React.Ref; /** * Decorative radial gradient layers to render behind the content. */ layers: SpotLightLayer[]; } type SpotLightProps = ComponentProps; /** * SpotLight renders decorative radial gradients as a positioned sibling layer. */ export declare function SpotLight({ blur, elementRef, layers, ...otherProps }: SpotLightProps): React.JSX.Element; export declare namespace SpotLight { var propTypes: React.WeakValidationMap; } export default SpotLight; export type { Color, SpotLightColorStop, SpotLightAnchor, SpotLightAnchorEdge, SpotLightAnchorElement, SpotLightLayer, SpotLightProps, SpotLightPropsBase, };