import { StepperContent, StepperSize, StepperStatus } from '../../utils/constants'; /** * @slot default - A step title that needs markup. Use it instead of `label`, * not together with it: a slot and its property both render. * @slot description - Supporting text that needs markup. Use it instead of * `description`, not together with it, for the same reason. */ export declare class NvStepperItem { el: HTMLNvStepperItemElement; /** Whether the last render had something slotted into the description. */ private renderedWithDescriptionSlot; private descriptionObserver?; /****************************************************************************/ /** * Where this step sits in the sequence. Drives the indicator and both * connector halves. */ readonly status: `${StepperStatus}`; /** * Marks a blocking problem on this step, such as failed validation. Recolours * the indicator and label without changing the sequence progression, so it * applies on top of any `status`. */ readonly error: boolean; /** * What the marker holds: this step's number, or a dot for a compact or purely * visual progression. Ignored at `size="xs"`, which is a status marker with * no content. */ readonly content: `${StepperContent}`; /** * Replaces the number or the dot with a check, to make completion explicit. * * It applies to a complete step only: the design gives a current or an * upcoming step nothing to be checked about, so the property is accepted on * any status and renders on `complete` alone. Ignored at `size="xs"`, and an * errored step shows its exclamation instead — the order is error, then * checked, then content. */ readonly checked: boolean; /** Step title, rendered under the indicator. Ignored at `size="xs"`. */ readonly label?: string; /** * Supporting text under the label, for a step that needs a line of * explanation. It takes the same colours as the label, so it dims on an * upcoming step and turns red on an errored one. Ignored at `size="xs"`. */ readonly description?: string; /** * Language of the state text that assistive technology reads, for example * "fr" or "nl-BE". Falls back to the `locale` of the parent `nv-stepper`, * then to the browser language. */ readonly locale?: string; /** * Size of this one step, overriding the parent `nv-stepper`. Leave it unset * to follow the parent: the step then renders at the parent's `size`, and * this property stays unset. A step on its own renders at `md`. */ readonly size?: `${StepperSize}`; /** * Puts the step in the tab order and gives it a focus ring, for hosts that * move focus between steps. The stepper is display-only otherwise: it never * handles step activation or arrow-key navigation. */ readonly focusable: boolean; /** * Dims the step and takes it out of the tab order, for a step the flow cannot * reach yet. It keeps its place and its number in the sequence, so this is * presentation only — it does not change the progression. */ readonly disabled: boolean; /****************************************************************************/ connectedCallback(): void; disconnectedCallback(): void; /****************************************************************************/ /** * Whether something is slotted into the description. * @returns {boolean} True when a `slot="description"` child exists. */ private hasDescriptionSlot; /** * Renders again when a description is slotted in or taken out after the * first render. Adding or removing a child is not a render, so without this * the wrapper stayed absent, or stayed behind empty with its gap. The watch * covers the subtree, because Stencil moves the slotted node into the * wrapper, so removing it does not touch the host's own children. It only * renders when the answer changed, because the move itself is a mutation. */ private handleDescriptionSlotChange; /** * The size this step renders at: its own `size` when set, otherwise the * parent stepper's, otherwise `md`. * * The parent's property is read, not its attribute: `size` reflects only at * the parent's next render, so a parent resized in the same update still * carries the old attribute. The attribute is the fallback for a parent that * has not upgraded yet. * @returns {string} The effective size. */ private get effectiveSize(); /** * The state of the step in words, appended to the label for assistive * technology. Status is otherwise carried by colour and by the indicator's * shape, which is not enough on its own — and at `xs` there is no content in * the indicator at all, so this text is the only thing conveying it. * @returns {string} The spoken state of this step. */ private get spokenState(); /** * Whether the indicator renders anything inside the marker. `xs` is a status * marker only: the design gives it no content size and no dot size, so the * 8px marker carries the status on its own. * @returns {boolean} True when the indicator holds a number, a check or a dot. */ private get hasIndicatorContent(); /** * This step's place in the sequence, counted from its position among its * siblings rather than passed in, so inserting or removing a step renumbers * the rest on its own. The parent `nv-stepper` re-renders its items when its * children change, which is what keeps this current. * @returns {number} The 1-based position of this step. */ private get stepNumber(); /****************************************************************************/ /** * Renders what sits inside the indicator. * * Everything here is `aria-hidden`: the number duplicates the position the * list role already gives, and the icon and the dot are decoration. The * status itself reaches assistive technology through the visually hidden * text, not through any of this. * @returns {object} The indicator's content. */ private renderIndicatorContent; render(): any; }