import * as _angular_core from '@angular/core'; import { Signal } from '@angular/core'; /** * @license * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE */ /** * Button size variant. */ type WrButtonSize = 'sm' | 'md' | 'lg'; /** * @license * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE */ /** * Corner treatment for ``. * * - `rounded` (default) — small radius, matches the rest of the form vocabulary. * - `pill` — fully rounded ends; ideal for solitary CTAs. * - `squircle` — iOS-style continuous-curvature corners via the * `corner-shape: squircle` CSS spec (Chrome 145+, falls back to a * plain rounded corner elsewhere). For a deterministic * clip-path-based squircle that works across browsers, wrap the * button in `[wrSquircle]` instead. */ type WrButtonShape = 'rounded' | 'pill' | 'squircle'; /** * @license * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE */ /** * Where the icon sits relative to the button label. */ type WrButtonIconPosition = 'start' | 'end'; /** * Trigger an action. Renders as a `` element, or attach to a * native ` * Cancel * Delete * Pill * ``` * * **Squircle?** Wrap with `[wrSquircle]` — the directive is the only * way ngwr ships smooth-corner clip-paths: * * ```html * Squircle * ``` * * Inside a ``, the group's shape is enforced on * every child — child `[shape]` inputs are ignored so the group reads as * one coherent control. * * @see https://ngwr.dev/components/button */ declare class WrButton { /** Color variant. Omit for the neutral default style. @default null */ readonly color: _angular_core.InputSignal<"primary" | "secondary" | "success" | "warning" | "danger" | "light" | "medium" | "dark" | null>; /** Size variant. @default 'md' */ readonly size: _angular_core.InputSignal; /** * Corner treatment — `rounded` or `pill`. `null` (default) falls back * to `rounded`. Inside a ``, the group's shape * ALWAYS wins over this input — the group enforces a consistent corner * treatment across its members. * * @default null */ readonly shape: _angular_core.InputSignal; /** * Icon name to render alongside the label. The icon is hidden while * `loading` is `true` so the spinner can take its place. * * @default null */ readonly icon: _angular_core.InputSignal; /** Position of the icon relative to the label. @default 'start' */ readonly iconPosition: _angular_core.InputSignal; /** Disable the button. @default false */ readonly disabled: _angular_core.InputSignalWithTransform; /** Outlined variant — colored text and border on a transparent background. @default false */ readonly outlined: _angular_core.InputSignalWithTransform; /** Stretch the button to fill its parent's width. @default false */ readonly block: _angular_core.InputSignalWithTransform; /** Show a spinner overlaying the label. Layout is preserved. @default false */ readonly loading: _angular_core.InputSignalWithTransform; /** * When `loading` is `true` and this is also `true`, pointer events are * suppressed and the button reports as disabled to assistive tech. * * @default true */ readonly isDisabledWhenLoading: _angular_core.InputSignalWithTransform; private readonly group; /** * Resolved shape. Inside a ``, the group ALWAYS wins — * child `[shape]` is ignored entirely so the group reads as one * coherent control. Outside a group, the button's own `[shape]` is * used, falling back to `rounded`. */ protected readonly effectiveShape: _angular_core.Signal; protected readonly nativeDisabled: _angular_core.Signal<"" | null>; protected readonly classes: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * @license * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE */ /** * Contract a child `` reads from its enclosing ``. * * @internal */ interface WrButtonGroupContext { /** Shape cascade — child buttons fall back to this when they don't set their own. */ readonly shape: Signal; } /** * Visually group buttons by merging their borders. Optionally enforce a * single corner treatment across every child via `[shape]` — child * `` `[shape]` inputs are ignored when set on the group. * * @example * ```html * * * * * * * * * * * * ``` * * @see https://ngwr.dev/components/button-group */ declare class WrButtonGroup implements WrButtonGroupContext { /** * Corner treatment enforced on every child ``. Child `[shape]` * inputs are ignored when this is set — the group exists to make a * uniform control. `null` (default) leaves children alone. * * @default null */ readonly shape: _angular_core.InputSignal; protected readonly hostClasses: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } export { WrButton, WrButtonGroup }; export type { WrButtonIconPosition, WrButtonShape, WrButtonSize };