import type { MdyStateName } from "../state.js"; import type { MdyWidgetSemanticElement } from "../structure.js"; import type { MdyWidgetDefinition, MdyWidgetKind, MdyWidgetVariant } from "./kinds.js"; /** * Carried by every `popup` part, whatever widget owns it. * * An overlay must never take part in layout: a popup left in flow resizes its field and pushes the * rest of the form down the page the moment it opens. Naming the guarantee in the contract — rather * than leaving each renderer and each theme to arrange it — is what makes it hold everywhere. */ export declare const MDY_POPUP_CLASS = "mdy-popup"; /** * The popup's *appearance*, carried separately from the popup itself. * * {@link MDY_POPUP_CLASS} says where a popup is and that it is out of flow. This says what it looks * like — a surface, an edge, a radius, an elevation, the room its content sits in — and the two are * separate because they are separate questions with different owners. * * They were one class, and a container that paints is a wrapper around the thing it was supposed to * present: a material applied to the content then sits on an opaque panel rather than on the page, * which is a translucent effect with nothing to be translucent against. A theme dressing the popup * had no way to decline the surface without also fighting the positioning that shares its selector. * * Every popup carries it, so nothing changes by not asking. A theme that wants the content to * present itself neutralises this one class and leaves the coordinates alone. */ export declare const MDY_POPUP_SURFACE_CLASS = "mdy-popup--surface"; /** * Where each part hangs. Candidates are tried in order and the first one the widget actually * declares wins, so the same table serves a control with an input wrapper and one without. * The anatomy is nested rather than flat because containment is part of what an adapter must * reproduce: a control outside its wrapper is a different control. */ export declare const PARENT_CANDIDATES: Readonly>; /** * The class a shell part carries when its widget does not override it. * * `MDY_FIELD_SHELL_CLASSES` declared this vocabulary from the start and nothing checked it: every * shell part came out of `define()` with an empty class list, so `mdy-label` could be renamed to * anything and the conformance suite agreed. Declaring it here is what gives the existing * `PART_CLASS_MISSING` rule something to enforce. * * `control` is deliberately absent. The shell maps it to `mdy-input-wrapper__inliner`, which is the * box *around* the control rather than the control itself — requiring it of the `control` part would * assert something no renderer means. */ export declare const SHELL_CLASS_FALLBACK: Readonly>; /** Per-widget deviations from the shared tables: where a part hangs, and the class it carries. */ interface MdyWidgetShape { /** The native control this kind is rendered with — see {@link MdyWidgetDefinition.controlType}. */ readonly controlType?: string; /** Whether the control conceals what is typed into it — see {@link MdyWidgetDefinition.concealed}. */ readonly concealed?: boolean; readonly parents?: Readonly>>; readonly classes?: Readonly>>; /** * The ARIA role a part must carry, where the contract requires one. * * Distinct from `element`, which says what a part may *be*: `SEMANTIC_ELEMENTS` lists the roles a * semantic admits, and this names the one it has to have. Without it the contract could say a part * may be a listbox and never say that it is one. */ readonly roles?: Readonly>; /** States this widget's parts may be in, over and above {@link SHARED_STATES}. */ readonly states?: Readonly>; /** * Semantic element overrides. A boolean control wraps its text in the `