import { PropertyValues } from 'lit'; import { SpectrumElement } from '../../element/index.js'; import { CardDensity, CardVariant } from './Card.types.js'; declare const CardBase_base: typeof SpectrumElement & { new (...args: any[]): import('../../mixins/index.js').SizedElementInterface; prototype: import('../../mixins/index.js').SizedElementInterface; } & import('../../mixins/index.js').SizedElementConstructor; /** * Abstract base class for all card-family components. Owns the semantics * shared across every card type: sizing, visual variant, and density. * * `swc-card`, `swc-user-card`, and `swc-product-card` each extend this base * directly and render the shared anatomy via `renderCardTemplate()` in * `swc/components/card/card-template.ts`. That template also carries a * collection placeholder and an avatar/thumbnail glyph, each supplied * per-component via `renderCollection`/`renderGlyph`. * * @attribute {ElementSize} size - The size of the card. * * @slot preview - Primary preview content * @slot title - Card title * @slot actions - Optional action controls * @slot description - Supporting description text * @slot footer - Optional footer content * @slot - Additional body content */ export declare abstract class CardBase extends CardBase_base { /** * @internal */ static readonly VARIANTS: readonly CardVariant[]; /** * @internal */ static readonly DENSITIES: readonly CardDensity[]; /** * The visual variant of the card. * * @default primary */ variant: CardVariant; /** * The density of the card, controlling internal spacing and gaps. * * @default regular */ density: CardDensity; /** * Indicates the consumer has wrapped their `title` slot content in a real * link. Extends that link's hit area to cover the card surface while * leaving navigation entirely consumer-owned — Card accepts no `href`. * * @todo Naming, and the `::slotted(a)::after` vs. click-proxy mechanism, * are still open. See the card family plan, A11y-3 / Q2. */ titleAsLink: boolean; /** * Makes the card focusable and captures surface clicks (excluding nested * interactive targets) to dispatch a `swc-card-click` event, independent * of `titleAsLink`. Lays groundwork for a future `CardView` selection * model without Card owning selected-state UI itself. * * @todo Event name and `tabindex` management details are still open. See * the card family plan, A11y-3 / Q3. * @todo No `role` is set when `selectable` is true — deferred rather than * defaulting to `role="button"`, since the eventual `CardView` selection * model may call for a different role (e.g. `option`/`gridcell`) that * `role="button"` would be wrong to have committed to today. See the card * family plan, A11y-3 / Q8. */ selectable: boolean; connectedCallback(): void; disconnectedCallback(): void; protected updated(changedProperties: PropertyValues): void; /** * @internal * The card's own `title` slot element, or `null` before the concrete * class's `renderCardTemplate()` call has rendered. */ protected getTitleSlotElement(): HTMLSlotElement | null; /** * @internal * The `title` slot's link, supporting both forms consumers reasonably * use: the assigned element itself is the anchor (``), or the anchor is nested inside a wrapper (``). Requires `href` — a link with no * destination can't usefully be clicked-through. */ protected getTitleLinkElement(): HTMLAnchorElement | null; /** * @internal * Whether `node` provides its own interaction/focus semantics. Checking * the `tabIndex` IDL property (rather than the `tabindex` attribute or a * tag-name list) correctly covers natively-interactive elements * (`button`, `input`, `select`, `textarea`, `a[href]`) with no explicit * attribute, excludes `tabindex="-1"` (focusable for scripting, not a * click target) and disabled controls, and works for a custom element's * internal shadow-DOM control too — `composedPath()` already traverses * into other elements' shadow roots for composed events like `click`, so * an internal `