import { KbqFormFieldModule } from '@koobiq/components/form-field';

KbqCleaner

componentСкопировать ссылку на KbqCleaner

Element to be placed in end of the form field. Resets form control by click.

@Component({ selector: 'kbq-cleaner', exportAs: 'kbqCleaner' })
class KbqCleaner extends KbqIconButton {
    readonly ariaLabel = input<string | undefined>(undefined, {
        alias: 'aria-label'
    });
    readonly size = input<KbqIconButtonSize>('normal');
    tabindex = input<number | null | undefined>();
    disabled = input<boolean | undefined>();
    readonly ariaHidden = input<boolean | undefined>(undefined, {
        alias: 'aria-hidden'
    });
    readonly iconSize = input<number | undefined>();
    autoColor = input<boolean | undefined>();
    readonly color = input<T | null | undefined>();
    hasError: boolean;
    iconName: string | undefined;
    get colorClassName(): string;
    getHostElement(): HTMLElement;
    setDefaultColor(color: T): void;
}
aria-labelinputСкопировать ссылку на aria-labelstring | undefined

Accessible name of the cleaner. Defaults to the localized "Clear".

localeOverridesinputСкопировать ссылку на localeOverridesKbqPartialLocaleData | undefined

Localized strings for this element and its subtree, keyed by locale section. Every key is optional at every depth.

tabindexinputСкопировать ссылку на tabindexnumber | null | undefined

Position of the button in the tab order. A disabled button is taken out of it entirely.

disabledinputСкопировать ссылку на disabledboolean | undefined

Whether the button is disabled.

aria-hiddeninputСкопировать ссылку на aria-hiddenboolean | undefined

Whether the icon is hidden from assistive technology. Left unbound, it falls back to defaultAriaHidden, which is true for a decorative icon and false for an interactive one.

iconSizeinputСкопировать ссылку на iconSizenumber | undefined

Rendered size of the icon in pixels. Left unset, the size is read from the _<px> suffix of the icon name (kbq-plus_16 → 16), which is the @koobiq/icons convention; a name without one is rendered at whatever size the surrounding styles give it.

autoColorinputСкопировать ссылку на autoColorboolean | undefined

Whether the icon follows the error state of the host it sits in (a form field, for one), painting itself red while that host reports an error.

colorinputСкопировать ссылку на colorT | null | undefined

Color of the component. A value set in code holds until the input changes, and the default color is used while both are unset or falsy.

hasErrorСкопировать ссылку на hasErrorboolean

Whether the icon takes the error color whatever its color is. Set by a host that tints the icons it holds, such as KbqEmptyState.

iconNameСкопировать ссылку на iconNamestring | undefined

Name of an icon within a @koobiq/icons. Accepts "namespace:name" syntax.

colorClassNameСкопировать ссылку на colorClassNamestring

current class name of color

setDefaultColor()Скопировать ссылку на setDefaultColor()void

this color will be used as a default value. For example [color]="'' | false | undefined | null".

KbqError

componentСкопировать ссылку на KbqError

Error text to be shown below the form field control. It keeps the error color under a disabled control too.

@Component({ selector: 'kbq-error', exportAs: 'kbqError' })
class KbqError extends KbqHint {
    readonly id = input<string>(`kbq-hint-${nextUniqueId++}`);
    readonly fillTextOff = input<boolean>(false);
    readonly compact = input<boolean>(false);
    readonly color = input<T | null | undefined>();
    get colorClassName(): string;
    setDefaultColor(color: T): void;
}
idinputСкопировать ссылку на idstring

Unique ID for the hint. Referenced by the aria-describedby of the form field control.

fillTextOffinputСкопировать ссылку на fillTextOffboolean

Disables color for the hint text.

compactinputСкопировать ссылку на compactboolean

Makes the hint size smaller.

colorinputСкопировать ссылку на colorT | null | undefined

Color of the component. A value set in code holds until the input changes, and the default color is used while both are unset or falsy.

colorClassNameСкопировать ссылку на colorClassNamestring

current class name of color

setDefaultColor()Скопировать ссылку на setDefaultColor()void

this color will be used as a default value. For example [color]="'' | false | undefined | null".

KbqFieldset

componentСкопировать ссылку на KbqFieldset

A group of form-fields and related controls. Container component emulating the native fieldset element.

@Component({ selector: 'kbq-fieldset', exportAs: 'kbqFieldset' })
class KbqFieldset {}

KbqFormField

componentСкопировать ссылку на KbqFormField

Container for form controls that applies styling and behavior.

@Component({ selector: 'kbq-form-field', exportAs: 'kbqFormField' })
class KbqFormField extends KbqColorDirective {
    readonly noBorders = input<boolean | undefined>(
        this.defaultOptions?.noBorders
    );
    readonly inOverlay = model<boolean | undefined>(
        this.defaultOptions?.inOverlay
    );
    readonly horizontal = input<boolean | undefined>(
        this.defaultOptions?.horizontal
    );
    readonly labelClass = input<string | string[] | Set<string> | undefined>(
        this.defaultOptions?.labelClass
    );
    readonly contentClass = input<string | string[] | Set<string> | undefined>(
        this.defaultOptions?.contentClass
    );
    readonly showRequiredMarker = input<boolean>(
        !!this.defaultOptions?.showRequiredMarker
    );
    readonly color = input<T | null | undefined>();
    get invalid(): boolean;
    readonly labelId: Signal<string | null>;
    readonly isNativeLabelSupported: Signal<boolean>;
    get disabled(): boolean;
    readonly readonly: Signal<boolean>;
    get autofilled(): boolean;
    get colorClassName(): string;
    focus(options?: FocusOptions): void;
    getConnectedOverlayOrigin(): ElementRef;
    setDefaultColor(color: T): void;
}
noBordersinputСкопировать ссылку на noBordersboolean | undefined

Disables form field borders and shadows.

inOverlaymodelСкопировать ссылку на inOverlayboolean | undefined

Use when KbqFormField is in an overlay container.

horizontalinputСкопировать ссылку на horizontalboolean | undefined

Whether the form field is displayed horizontally.

labelClassinputСкопировать ссылку на labelClassstring | string[] | Set<string> | undefined

Additional CSS classes applied to the label element.

contentClassinputСкопировать ссылку на contentClassstring | string[] | Set<string> | undefined

Additional CSS classes applied to the content wrapper element.

showRequiredMarkerinputСкопировать ссылку на showRequiredMarkerboolean

Whether the label of a required control ends with the * marker. A control is required by its required state or by Validators.required on its form control.

colorinputСкопировать ссылку на colorT | null | undefined

Color of the component. A value set in code holds until the input changes, and the default color is used while both are unset or falsy.

invalidСкопировать ссылку на invalidboolean

Whether the form field is invalid.

labelIdСкопировать ссылку на labelIdSignal<string | null>

Id of the rendered label, or null when the form field has no label.

for only associates a label with a native form control, so a control that is a custom element (kbq-select, for one) has to point back at the label through aria-labelledby instead.

isNativeLabelSupportedСкопировать ссылку на isNativeLabelSupportedSignal<boolean>

Whether the control is a native labelable element, so that a <label> can associate with it.

A custom control (kbq-select, for one) reports isNativeLabelSupported: false; the caption is then rendered as a <span> instead of a <label>, because a label that neither has a for matching a labelable element nor wraps one is invalid, and the control is named through aria-labelledby instead.

disabledСкопировать ссылку на disabledboolean

Whether the form field is disabled.

readonlyСкопировать ссылку на readonlySignal<boolean>

Whether the form field control is read-only.

autofilledСкопировать ссылку на autofilledboolean

Whether the form field control's value was filled in by the browser. Controls that cannot be autofilled do not implement autofilled, and report false here.

Reflected as kbq-form-field_autofilled for application code to key on. The autofill styling does not use it: CSS matches :autofill directly, in the same style pass the browser fills the field, where this arrives a frame or two later. Keeping the paint on one source also means a class left behind by a detached or re-attached control cannot tint a field the browser no longer considers autofilled.

colorClassNameСкопировать ссылку на colorClassNamestring

current class name of color

getConnectedOverlayOrigin()Скопировать ссылку на getConnectedOverlayOrigin()ElementRef

Gets an ElementRef for the element that a overlay attached to the form-field should be positioned relative to.

setDefaultColor()Скопировать ссылку на setDefaultColor()void

this color will be used as a default value. For example [color]="'' | false | undefined | null".

KbqHint

componentСкопировать ссылку на KbqHint

Hint text to be shown below the form field control.

@Component({ selector: 'kbq-hint', exportAs: 'kbqHint' })
class KbqHint extends KbqColorDirective {
    readonly id = input<string>(`kbq-hint-${nextUniqueId++}`);
    readonly fillTextOff = input<boolean>(false);
    readonly compact = input<boolean>(false);
    readonly color = input<T | null | undefined>();
    get colorClassName(): string;
    setDefaultColor(color: T): void;
}
idinputСкопировать ссылку на idstring

Unique ID for the hint. Referenced by the aria-describedby of the form field control.

fillTextOffinputСкопировать ссылку на fillTextOffboolean

Disables color for the hint text.

compactinputСкопировать ссылку на compactboolean

Makes the hint size smaller.

colorinputСкопировать ссылку на colorT | null | undefined

Color of the component. A value set in code holds until the input changes, and the default color is used while both are unset or falsy.

colorClassNameСкопировать ссылку на colorClassNamestring

current class name of color

setDefaultColor()Скопировать ссылку на setDefaultColor()void

this color will be used as a default value. For example [color]="'' | false | undefined | null".

KbqPasswordToggle

componentСкопировать ссылку на KbqPasswordToggle

Component which changes password visibility.

@Component({ selector: 'kbq-password-toggle', exportAs: 'kbqPasswordToggle' })
class KbqPasswordToggle extends KbqTooltipTrigger {
    readonly tabindex = input<number>(0);
    readonly kbqTooltipHidden = input<string | TemplateRef<any>>();
    readonly forDisabledComponent = input<Record<'disabledSignal', WritableSignal<boolean>>>();
    readonly ignoreTooltipPointerEvents = input<boolean>(false);
    readonly singleInstance = input<boolean>(
        inject(KBQ_TOOLTIP_SINGLE_INSTANCE_DEFAULT),
        { alias: 'kbqTooltipSingleInstance' }
    );
    hideWithTimeout = input<boolean | undefined>();
    content: string | TemplateRef<any>;
    tooltipVisible: boolean;
    tooltipPlacement: KbqPopUpPlacementValues;
    relativeToPointer: boolean;
    relativeToCaret: boolean;
    relativeToCaretVertical: KbqCaretVerticalAnchor;
    tooltipPlacementPriority: string | string[] | null;
    disabled: boolean;
    enterDelay: number;
    leaveDelay: number;
    trigger: string;
    customClass: string;
    context: unknown;
    color: KbqComponentColors | string;
    arrow: boolean;
    arrowCentered: boolean;
    offset: number | null;
    readonly placementChange: EventEmitter<KbqPopUpPlacementValues>;
    readonly visibleChange: EventEmitter<boolean>;
    modifier: KbqEnumValues<TooltipModifier>;
    header: string | TemplateRef<unknown>;
    isOpen: boolean;
    get isAttached(): boolean;
    get openedChange(): Observable<boolean>;
    show(delay?: number): void;
    hide(delay?: number): void;
    showForMouseEvent(event: MouseEvent): void;
    showForElement(element: HTMLElement): void;
    updateOrigin(origin: KbqOverlayOrigin | null): void;
}
kbqTooltipHiddeninputСкопировать ссылку на kbqTooltipHiddenstring | TemplateRef<any>

Tooltip shown while the password is hidden.

localeOverridesinputСкопировать ссылку на localeOverridesKbqPartialLocaleData | undefined

Localized strings for this element and its subtree, keyed by locale section. Every key is optional at every depth.

forDisabledComponentinputСкопировать ссылку на forDisabledComponentRecord<'disabledSignal', WritableSignal<boolean>>

Input for controlling the disabled state of a component.

The input expects a component containing disabledSignal property, which is a writable signal emitting boolean values.

ignoreTooltipPointerEventsinputСкопировать ссылку на ignoreTooltipPointerEventsboolean

Determines whether pointer events should be ignored on tooltips.

When set to true, the tooltip pane does not receive pointer events, so clicks and hovers pass through to whatever is underneath it. Defaults to false, which keeps the tooltip hoverable: a user who needs more time to read it — or who reads at high magnification, where the pointer often ends up over the tooltip itself — can move the pointer onto it without it disappearing (WCAG 1.4.13 "Content on Hover").

Set it to true for tooltips that float over other click targets, such as the overflow hints of a scrolling option list.

kbqTooltipSingleInstanceinputСкопировать ссылку на kbqTooltipSingleInstanceboolean

Whether the tooltip takes part in the "only one tooltip is visible at a time" group: showing it hides the previously visible tooltip, and it is hidden when another tooltip is shown.

Defaults to true; the default can be changed application-wide with the KBQ_TOOLTIP_SINGLE_INSTANCE_DEFAULT token.

Tooltips without an interactive kbqTrigger (manual, none, …) never take part in the group, regardless of this input — they are shown imperatively and are expected to stay pinned.

hideWithTimeoutinputСкопировать ссылку на hideWithTimeoutboolean | undefined

Changes hiding behavior. By default, tooltip is hidden on mouseleave from trigger. Setting hideWithTimeout to true will delay tooltip hiding and will not hide when the mouse moves from trigger to tooltip.

contentСкопировать ссылку на contentstring | TemplateRef<any>

Tooltip shown while the password is visible. Reading it resolves to the tooltip matching the current visibility, so that the base trigger renders the right one.

tooltipVisibleСкопировать ссылку на tooltipVisibleboolean

Input (kbqVisible) that programmatically shows or hides the tooltip; reflects the current visible state.

tooltipPlacementСкопировать ссылку на tooltipPlacementKbqPopUpPlacementValues

Input (kbqPlacement) that sets the tooltip placement relative to its trigger; reflects the current placement.

relativeToPointerСкопировать ссылку на relativeToPointerboolean

Positions the tooltip relative to the mouse cursor. Only available for top and bottom kbqPlacement. Does not work with kbqPlacementPriority.

relativeToCaretСкопировать ссылку на relativeToCaretboolean

Positions the tooltip relative to the text caret of the field it is attached to, following it while the user types, moves the caret and scrolls the field. Anchors to the selection whenever there is one.

Every placement is available, unlike with kbqRelativeToPointer: the caret is anchored as a rectangle, so the usual fallback placements keep the tooltip on screen. Wins when both inputs are enabled.

The field is the host element itself when it is editable, otherwise the first editable it wraps.

relativeToCaretVerticalСкопировать ссылку на relativeToCaretVerticalKbqCaretVerticalAnchor

What the tooltip is vertically anchored to while kbqRelativeToCaret is enabled.

tooltipPlacementPriorityСкопировать ссылку на tooltipPlacementPrioritystring | string[] | null

Input (kbqPlacementPriority) that sets the ordered fallback placements; reflects the current placementPriority.

disabledСкопировать ссылку на disabledboolean

Input (kbqTooltipDisabled) controlling whether the tooltip is disabled; setting it to true hides it. undefined leaves the decision to the trigger, like an unset input.

Reads back the effective state, which for triggers that derive one of their own (see derivedDisabledWins) is not necessarily the value that was written.

enterDelayСкопировать ссылку на enterDelaynumber

Input (kbqEnterDelay) — delay in milliseconds before the tooltip is shown. Defaults to 400.

leaveDelayСкопировать ссылку на leaveDelaynumber

Input (kbqLeaveDelay) — delay in milliseconds before the tooltip is hidden. Defaults to 0.

triggerСкопировать ссылку на triggerstring

Input (kbqTrigger) with the comma-separated trigger events. An empty value resets to hover + focus and rebinds listeners.

customClassСкопировать ссылку на customClassstring

Input (kbqTooltipClass) with an extra CSS class applied to the tooltip; updating it refreshes the class map.

contextСкопировать ссылку на contextunknown

Input (kbqTooltipContext) with the context object passed to a template tooltip; updating it refreshes the open tooltip.

colorСкопировать ссылку на colorKbqComponentColors | string

Input (kbqTooltipColor) with the tooltip color theme. Defaults to KbqComponentColors.Contrast.

arrowСкопировать ссылку на arrowboolean

Input (kbqTooltipArrow) — whether to render the tooltip's arrow/pointer. Defaults to false.

arrowCenteredСкопировать ссылку на arrowCenteredboolean

Input (kbqTooltipArrowCentered) — centers the arrow on the trigger while preserving the panel placement. Requires a visible arrow. Defaults to false.

offsetСкопировать ссылку на offsetnumber | null

Input (kbqTooltipOffset) — distance in pixels between the tooltip and its trigger. null keeps the gap of the stylesheet. Defaults to the offset of KBQ_TOOLTIP_DEFAULT_OPTIONS, when a provider in scope set one. Inside a provider scope such as the navbar's, null/undefined restores that inherited default.

placementChangeСкопировать ссылку на placementChangeEventEmitter<KbqPopUpPlacementValues>

Output (kbqPlacementChange) that emits the new placement whenever the tooltip repositions.

visibleChangeСкопировать ссылку на visibleChangeEventEmitter<boolean>

Output (kbqVisibleChange) that emits when the tooltip's visibility changes.

modifierСкопировать ссылку на modifierKbqEnumValues<TooltipModifier>

Visual variant of the tooltip. Accepts 'default' | 'warning' | 'extended'. Replaces the removed KbqWarningTooltipTrigger and KbqExtendedTooltipTrigger subclasses — to render a warning tooltip use kbqTooltipModifier="warning", and kbqTooltipModifier="extended" for the extended variant (combine with kbqTooltipHeader).

headerСкопировать ссылку на headerstring | TemplateRef<unknown>

Header text or template, rendered above the tooltip content. Only meaningful with kbqTooltipModifier="extended". Replaces the removed KbqExtendedTooltipTrigger.header.

isOpenСкопировать ссылку на isOpenboolean

Whether the pop-up overlay is currently open.

isAttachedСкопировать ссылку на isAttachedboolean

Whether the pop-up overlay is currently attached.

Unlike isOpen, which follows the visibility of the pop-up component and therefore lags a task behind show()/hide(), this flips synchronously — it is the window during which the overlay (and its backdrop) is present in the DOM. Part of the KbqSiblingPopup contract.

openedChangeСкопировать ссылку на openedChangeObservable<boolean>

Emits true when the pop-up opens and false when it closes. Part of the KbqSiblingPopup contract.

show()Скопировать ссылку на show()void

Shows the tooltip after delay ms. Suppresses showing while a pop-up on the same element holds the anchor or on a focus trigger that did not originate from the keyboard, and applies cursor-relative positioning when relativeToPointer is enabled.

hide()Скопировать ссылку на hide()void

Hides the tooltip after delay ms and, when the user has genuinely left the host, un-mutes a tooltip that a pop-up on the same element had muted.

mouseleave and blur are the release signals because the base class binds hide to both regardless of whether the tooltip is currently visible. A pop-up that is still attached does not count: its backdrop steals the hover from the trigger while the pointer stands still, and that mouseleave must not be mistaken for the user leaving.

showForMouseEvent()Скопировать ссылку на showForMouseEvent()void

Shows the tooltip next to the cursor position of the given mouse event, anchoring it to the event's currentTarget instead of the directive's own host element.

Use it when the trigger cannot be declared in the template — for instance for a tooltip shared by the cells of a virtualized table. The directive still has to be created in an injection context.

showForElement()Скопировать ссылку на showForElement()void

Shows the tooltip anchored to the given element instead of the directive's own host element.

Use it when the trigger cannot be declared in the template. The directive still has to be created in an injection context:

const tooltip = runInInjectionContext(injector, () => new KbqTooltipTrigger());
tooltip.showForElement(element);

Does nothing while the tooltip is disabled or has no content — there is no overlay to anchor then.

updateOrigin()Скопировать ссылку на updateOrigin()void

Positions the pop-up against origin — an element, or a rectangle in viewport coordinates such as the one kbqCreateCaretOrigin keeps on the caret — instead of the host element; null restores the host element. An open pop-up moves to the new origin at once.

This moves the position origin only. setExternalNativeElement moves the host itself, and with it the trigger's event listeners, its focus target and the scroll containers the pop-up follows.

KbqReactivePasswordHint

componentСкопировать ссылку на KbqReactivePasswordHint

Password hint to be shown below the password form field control.

@Component({
    selector: 'kbq-reactive-password-hint',
    exportAs: 'kbqReactivePasswordHint'
})
class KbqReactivePasswordHint extends KbqHint {
    readonly hasError = input<boolean>(false);
    readonly fillTextOff = input<boolean>(true);
    readonly id = input<string>(`kbq-hint-${nextUniqueId++}`);
    readonly compact = input<boolean>(false);
    readonly color = input<T | null | undefined>();
    get colorClassName(): string;
    setDefaultColor(color: T): void;
}
hasErrorinputСкопировать ссылку на hasErrorboolean

Whether the form field control has an error.

fillTextOffinputСкопировать ссылку на fillTextOffboolean

Disables color for the hint text.

idinputСкопировать ссылку на idstring

Unique ID for the hint. Referenced by the aria-describedby of the form field control.

compactinputСкопировать ссылку на compactboolean

Makes the hint size smaller.

colorinputСкопировать ссылку на colorT | null | undefined

Color of the component. A value set in code holds until the input changes, and the default color is used while both are unset or falsy.

colorClassNameСкопировать ссылку на colorClassNamestring

current class name of color

setDefaultColor()Скопировать ссылку на setDefaultColor()void

this color will be used as a default value. For example [color]="'' | false | undefined | null".

KbqStepper

componentСкопировать ссылку на KbqStepper

Component which allow to increment or decrement number value.

@Component({ selector: 'kbq-stepper', exportAs: 'kbqStepper' })
class KbqStepper {
    readonly stepUp = output<void>();
    readonly stepDown = output<void>();
}
stepUpoutputСкопировать ссылку на stepUpvoid

Emitted when the stepper is incremented.

stepDownoutputСкопировать ссылку на stepDownvoid

Emitted when the stepper is decremented.

KbqFieldsetItem

directiveСкопировать ссылку на KbqFieldsetItem

Directive for marking elements as items inside KbqFieldset

@Directive({ selector: '[kbqFieldsetItem]', exportAs: 'kbqFieldsetItem' })
class KbqFieldsetItem {}

KbqLabel

directiveСкопировать ссылку на KbqLabel

Label for the form field.

@Directive({ selector: 'kbq-label', exportAs: 'kbqLabel' })
class KbqLabel {}

KbqLegend

directiveСкопировать ссылку на KbqLegend

Directive for marking an element as legend of KbqFieldset

@Directive({ selector: '[kbqLegend]', exportAs: 'kbqLegend' })
class KbqLegend {
    readonly id = input<string>(`kbq-legend-${nextLegendUniqueId++}`);
}
idinputСкопировать ссылку на idstring

Unique ID for the legend, referenced by the aria-labelledby of the fieldset.

KbqPrefix

directiveСкопировать ссылку на KbqPrefix

Element to be placed in front of the form field.

@Directive({ selector: '[kbqPrefix]', exportAs: 'kbqPrefix' })
class KbqPrefix {}

KbqSuffix

directiveСкопировать ссылку на KbqSuffix

Element to be placed at the end of the form field.

@Directive({ selector: '[kbqSuffix]', exportAs: 'kbqSuffix' })
class KbqSuffix {}

KbqFormFieldControl

abstract classСкопировать ссылку на KbqFormFieldControl

An interface which allows a control to work inside of a KbqFormField.

Every state member is a signal: the form field derives its own state from them and runs OnPush, so a change of the control reaches it without any notification of the control's own.

abstract class KbqFormFieldControl<T> {
    readonly value: Signal<T | null>;
    readonly id: Signal<string>;
    readonly placeholder: Signal<string | null | undefined>;
    readonly ngControl: NgControl | null;
    readonly focused: Signal<boolean>;
    readonly empty: Signal<boolean>;
    readonly required: Signal<boolean>;
    readonly disabled: Signal<boolean>;
    readonly errorState: Signal<boolean>;
    readonly readonly?: Signal<boolean>;
    readonly autofilled?: Signal<boolean>;
    readonly controlType?: string;
    readonly isNativeLabelSupported?: boolean;
    setDescribedByIds?: (ids: string[]) => void;
    open?: () => void;
    abstract onContainerClick(event: MouseEvent): void;
    abstract focus(options?: FocusOptions): void;
}
valueСкопировать ссылку на valueSignal<T | null>

The value of the control.

idСкопировать ссылку на idSignal<string>

The element ID for this control.

placeholderСкопировать ссылку на placeholderSignal<string | null | undefined>

The placeholder for this control.

ngControlСкопировать ссылку на ngControlNgControl | null

Gets the NgControl for this control.

focusedСкопировать ссылку на focusedSignal<boolean>

Whether the control is focused.

emptyСкопировать ссылку на emptySignal<boolean>

Whether the control is empty.

requiredСкопировать ссылку на requiredSignal<boolean>

Whether the control is required.

disabledСкопировать ссылку на disabledSignal<boolean>

Whether the control is disabled.

errorStateСкопировать ссылку на errorStateSignal<boolean>

Whether the control is in an error state.

readonlyoptionalСкопировать ссылку на readonlySignal<boolean>

Whether the control is read-only: it can be focused and its value selected and copied, but not changed.

Implement it only on a control that has a read-only state. KbqFormField then hides the cleaner and adds the kbq-form-field_readonly class.

autofilledoptionalСкопировать ссылку на autofilledSignal<boolean>

Whether the control's value was filled in by the browser.

Implement it only where autofill is reachable: on a control that is itself a text input or a textarea, or — like KbqTagList — on a wrapper that forwards the state of the input it hosts. Leave it out on controls the browser never fills.

controlTypeoptionalСкопировать ссылку на controlTypestring

An optional name for the control type that can be used to distinguish kbq-form-field elements based on their control type. The form field will add a class, kbq-form-field-type-{{controlType}} to its root element.

isNativeLabelSupportedoptionalСкопировать ссылку на isNativeLabelSupportedboolean

Whether the control is a native labelable element, so that the <label for> a wrapping kbq-form-field renders associates with it.

Defaults to true. A control rendered as a custom element (kbq-select, for one) sets it to false: a <label> with neither a for matching a labelable element nor a nested one is invalid, so the form field renders the caption as a <span> instead and the control is named through aria-labelledby.

setDescribedByIdsoptionalСкопировать ссылку на setDescribedByIds(ids: string[]) => void

Sets the ids of the elements (hints, errors) that describe the control.

Implement it only when aria-describedby has to be placed on an element other than the one the control is declared on: KbqFormField writes the attribute on the control's host element by default.

openoptionalСкопировать ссылку на open() => void

Opens control's overlay.

onContainerClick()Скопировать ссылку на onContainerClick()void

Handles a click on the control's container.

KbqFormFieldDefaultOptions

typeСкопировать ссылку на KbqFormFieldDefaultOptions

Default options for the kbq-form-field that can be configured using the KBQ_FORM_FIELD_DEFAULT_OPTIONS injection token.

type KbqFormFieldDefaultOptions = Partial<{
    noBorders: boolean;
    inOverlay: boolean;
    horizontal: boolean;
    labelClass: string | string[] | Set<string>;
    contentClass: string | string[] | Set<string>;
    showRequiredMarker: boolean;
}>;
noBordersoptionalСкопировать ссылку на noBordersboolean

Disables form field borders and shadows.

inOverlayoptionalСкопировать ссылку на inOverlayboolean

Use when KbqFormField is in an overlay container.

horizontaloptionalСкопировать ссылку на horizontalboolean

Whether the form field is displayed horizontally.

labelClassoptionalСкопировать ссылку на labelClassstring | string[] | Set<string>

Additional CSS classes applied to the label element.

contentClassoptionalСкопировать ссылку на contentClassstring | string[] | Set<string>

Additional CSS classes applied to the content wrapper element.

showRequiredMarkeroptionalСкопировать ссылку на showRequiredMarkerboolean

Whether the label of a required control ends with the * marker.

kbqFormFieldDefaultOptionsProvider

constСкопировать ссылку на kbqFormFieldDefaultOptionsProvider

Utility provider for KBQ_FORM_FIELD_DEFAULT_OPTIONS.

const kbqFormFieldDefaultOptionsProvider: (
    options: KbqFormFieldDefaultOptions
) => Provider;
Предложения по улучшению
Если вы нашли ошибку или хотите доработать статью, создайте запрос на GitHub.