import { type PressableAndroidRippleConfig, type StyleProp, type ViewStyle } from "react-native"; import { type ThemeValue } from "../theme.js"; import { type BorderSides, type GlassLayer } from "./glass-surface.shared.js"; /** * The props of `GlassPane`: the layer and material options of the host it paints behind, * the host's shape, and its tint. */ export interface GlassPaneProps { /** * The layer of the glass model the host belongs to, which picks the pane's tint and * blur: `control` (fields, buttons, chips, badges, pucks), `content` (cards, alerts, * lists, charts), `functional` (bars, tracks) or `dense` (menus, tooltips). Defaults to * `control`. */ layer?: GlassLayer; /** * Frost in place of Liquid Glass: on iOS 26 a pane renders Apple's Liquid Glass unless * it is static. Defaults to true on the `content` layer and false on the others. */ static?: boolean; /** An unblurred translucent fill instead of the frost (a field on its pane), as Dark Factory draws its inputs on the web. */ clear?: boolean; /** * The host's shape style. Only its corner radii and `borderCurve` are read: they shape * the pane's clip and rim. Its fill and border are the host's own. */ shape?: StyleProp; /** * The host keeps its border over this pane: a border showing a state, `paneStyle`'s * third argument (a focused field, an open trigger, the current step). The pane fills * the host's padding box inside that border, and its corners take the shape's radii less * the border's width, so the material meets the border with no gap. Defaults to false, * where the host's resting border is padding under glass and the pane covers the host's * whole footprint with the shape's own radii. */ stateBorder?: boolean; /** The under-fill in place of the layer's tint: a toned wash, held legible by `legibleWash`. */ tint?: string; /** A brand colour for a brand-tinted puck (a primary Button, a selected tab), its under-fill solved for the ink painted on it. */ brand?: string; /** * The surface floats over the page: a bar, a dialog, a sheet, a popover, a toast. On the * web only a floating surface takes the material, as the v4 hand-off draws its glass; * every surface in the page keeps its complete solid skin in glass mode there. Native * platforms keep their material either way. Defaults to false. */ floating?: boolean; /** E2E hook forwarded to the pane. */ testID?: string; } /** * The glass material of a host's layer, painted as the host's first child: an absolutely * filled, pointer-transparent layer behind the host's content, clipped to the host's * corners, for a host that keeps its own node because it owns something else (a * Pressable's press and ripple, a live region, a native text input). It renders nothing * wherever its material resolves solid: in solid mode, under Reduce Transparency or * Increase Contrast, and where glass is requested but cannot render. * * Geometry: the pane fills the host's padding box. Under glass `paneStyle` turns a resting * border into padding of the same width, so that box is the host's whole solid footprint * and the material covers the control's full size, the material's rim its edge. A host * that keeps a state border passes `stateBorder`, and the pane sits flush inside that * border with concentric corners. A pane beside a text field (a sibling inside a * borderless wrapper the field fills) covers the wrapper, the field's whole footprint, * and the field's own state border paints over it. * * Accessibility: the pane adds nothing to the accessibility tree and takes nothing from * it. It has no role, no label and no focus stop, its material is hidden from VoiceOver * and TalkBack, and on the web its node is an empty, pointer-transparent box, so a screen * reader and the keyboard meet only the host, with the host's name, role and state as in * solid mode. Taps pass through it to the host and its hit slop, and a Pressable host hands * its Android ripple to `paneRipple`, so the press draws over the pane. Under Reduce * Transparency and Increase Contrast it renders nothing and the host keeps its opaque * skin, with the contrasting border under Increase Contrast (`paneStyle`). */ export declare function GlassPane({ layer, shape, stateBorder, tint, brand, testID, static: stable, clear, floating }: GlassPaneProps): import("react").JSX.Element | null; /** * What makes a node the stacking context its pane orders itself in: `isolation: "isolate"`. * A React Native Web View is one already. Natively a node is one only when something makes it * a view of its own, and a host whose paint `paneStyle` clears under glass may have nothing * left that does: iOS's and Android's renderers then flatten it away and hand its children to * the nearest ancestor view, where the pane's `zIndex: -1` sorts it beneath every earlier * sibling there (a Badge's frost drawn under the text before it). Isolation keeps the host a * view of its own on every platform, as GlassBox's `collapsable={false}` keeps its own host, * and paints nothing: Android offscreens a group only for a child's blend mode, and a browser * makes a backdrop root of a filter, never of isolation, so the pane's frost still samples the * page. `paneStyle` adds it under glass; a host that renders a pane without `paneStyle` (a * wrapper with no paint of its own) adds it where its pane renders. */ export declare const PANE_HOST: ViewStyle; /** * `PANE_HOST` for a node that renders a GlassPane without handing its style to `paneStyle` (a * wrapper with no paint of its own around a field and its pane, a pressable cell whose pane is * its indicator), wherever the pane renders, and null everywhere else, so the solid tree is * byte-identical. `appearance` is what the pane mounts from, as for `paneStyle`. */ export declare function paneHost(appearance: boolean | ThemeValue): ViewStyle | null; /** * A surface style for a node that renders a GlassPane behind its content. In solid mode * it is returned unchanged (under Increase Contrast with the contrasting border, see * `contrastBorderFor`). Under glass the node's opaque fill is dropped, the pane's material * carries it, and so is its border's paint: * * - A resting border becomes padding of the same width on each side. The node keeps its * size and its content stays where it was, while its padding box, the box the pane * fills, grows to the node's whole footprint: the material covers the control's full * solid size and the material's rim is its edge. * - A border that shows a state (`stateBorder`: a focused or errored field, an open * trigger, the current step) stays a border, in its own colour, over the pane, as * GlassBox keeps one over its material; give the pane `stateBorder` too, so it sits * flush inside it. Under Increase Contrast the contrasting border does not overwrite it. * * Under glass the node is also a stacking context of its own (`PANE_HOST`), so the pane * stays inside it on every platform. * * Hand it the node's whole box, every style that sets its padding or its border: a padding * set after it would replace the padding a border became. An absolutely placed child of * the node counts its offsets from the grown padding box, so it takes `panePlaced` to keep * its place. * * `appearance` is the resolved material the pane mounts from, for the pane's layer and * `static`, so the node keeps its own fill and border exactly where the pane renders * nothing (the kit's components read it from their material resolution). A theme from * `useTheme()` is the requested surface: wherever requested glass resolves solid (an * Android surface in the page, a missing optional peer, a browser without a backdrop * filter) the node would drop its fill and border while its pane renders nothing. */ export declare function paneStyle(appearance: boolean | ThemeValue, style: StyleProp, stateBorder?: boolean): StyleProp; /** * The Android ripple of a Pressable whose press a GlassPane would hide: the host's own ripple * config moved to the foreground wherever the pane renders, and returned as given (the same * object) everywhere else, so the solid tree is byte-identical. * * A ripple is the Pressable's background drawable, which Android draws before the view's * children. A pane painting the Pressable's own surface is one of those children, so where * its frost renders (an overlay outlet, a bridged Modal) it covers a bounded ripple, and a * borderless ripple, which Android projects onto the nearest ancestor's background, lands * beneath the host and its pane alike: the press shows nothing. That holds for the host's * own Pressable and for a borderless control inside a pane host (an Alert's dismiss, a * field's clear and reveal buttons). `foreground: true` draws the ripple after the view's * children, over the pane and over the label, in the ripple's own translucent colour, as * Compose draws Material 3's state layer over a control's content; a borderless foreground * ripple is not projected and radiates on the Pressable's own canvas, clipped as its * children are. * * `appearance` is what the host mounts its pane on, as for `paneStyle`: the resolved * material of the pane's layer and `static` (the kit's components read it from their * material resolution), or the boolean the host already renders its pane on (a surfaced * puck, the active row). Never the requested surface from `useTheme()`: on Android in the * page, where glass resolves solid, the pane renders nothing and the ripple stays in the * background. iOS and the web ignore `android_ripple`. */ export declare function paneRipple(appearance: boolean | ThemeValue, ripple: PressableAndroidRippleConfig | null | undefined): PressableAndroidRippleConfig | null | undefined; /** * How far a pane host's padding box reaches over its border under glass, per side: the * resting border `paneStyle` turns into padding. Absolute offsets count from that box, so an * absolutely placed child adds these to keep the place solid gives it (`panePlaced`). All * zero wherever `paneStyle` returns the host's style unchanged: in solid mode, and for a host * that keeps its border (`stateBorder`). */ export declare function paneEdges(appearance: boolean | ThemeValue, style: StyleProp, stateBorder?: boolean): BorderSides; /** * An absolutely placed child of a pane host (a Select's floating label, the Calendar's * fallback anchor), or of a GlassSurface whose resting border became padding the same way * (CodeBlock's floating copy chip), kept where solid places it: each side the child is * pinned to by a number gains the host's `paneEdges` there (a physical left or right read as * start or end). Returned unchanged where those are all zero, so the solid tree is * untouched. For a GlassSurface, * `appearance` is the host's resolved material (`useMaterialTheme` with the surface's * `layer` and `static`), as for a pane. */ export declare function panePlaced(appearance: boolean | ThemeValue, host: StyleProp, child: StyleProp, stateBorder?: boolean): StyleProp; /** * The style the kit gave a TextInput beside a GlassPane, `position: relative`, kept for * compatibility. It once restored the input's paint order over the pane on the web, where * React Native Web leaves a text input unpositioned and CSS paints positioned boxes after * in-flow ones. It changes nothing now: the pane orders itself behind its siblings on * every platform (`zIndex: -1` inside its host). */ export declare const PANE_SIBLING_INPUT: ViewStyle; //# sourceMappingURL=glass-pane.d.ts.map