# API of `@koobiq/components/search-expandable`

Documented on [Search expandable](https://koobiq.io/en/components/search-expandable.md). NgModule: `KbqSearchExpandableModule`.

## Components

### KbqSearchExpandable (component)

```ts
@Component({ selector: 'kbq-search-expandable' })
class KbqSearchExpandable implements ControlValueAccessor {
    isOpened = model<boolean | undefined>();
    readonly isEmitValueByEnterEnabled = input<boolean>(false);
    readonly emitValueTimeout = input<number>(defaultEmitValueTimeout);
    tooltipText = input<string | null | undefined>();
    placeholder = input<string | null | undefined>();
    disabled = input<boolean | undefined>();
    readonly localeConfiguration: Signal<KbqSearchExpandableLocaleConfiguration>;
    readonly value: WritableSignal<string>;
    toggle(): void;
}
```

- `[(isOpened)]`: `boolean | undefined` — state of component.
- `[isEmitValueByEnterEnabled]`: `boolean` — Emit event by enter or not. Default is false
- `[emitValueTimeout]`: `number` — Timeout in milliseconds for emit event. The default value is taken from defaultEmitValueTimeout
- `[tooltipText]`: `string | null | undefined` — Tooltip text for the search button. When set, overrides the locale tooltip
- `[placeholder]`: `string | null | undefined` — Placeholder for input when expanded
- `[disabled]`: `boolean | undefined` — Whether the component is disabled. Also set by the bound control through `setDisabledState`.
- `[localeOverrides]`: `KbqPartialLocaleData | undefined` — Localized strings for this element and its subtree, keyed by locale section. Every key is optional at
  every depth.
- `localeConfiguration`: `Signal<KbqSearchExpandableLocaleConfiguration>` — Strings currently rendered by the component.
- `value`: `WritableSignal<string>` — Current value in input. A write reaches the field, and the bound control once `emitValueTimeout` passes.

## Constants

### defaultEmitValueTimeout (const)

```ts
const defaultEmitValueTimeout: number;
```

### defaultValue (const)

```ts
const defaultValue: string;
```

### KBQ_SEARCH_EXPANDABLE_CONFIGURATION (const)

Deprecated: Use `KBQ_SEARCH_EXPANDABLE_LOCALE_CONFIGURATION`. Will be removed in 22.0.0.

```ts
const KBQ_SEARCH_EXPANDABLE_CONFIGURATION: InjectionToken<KbqSearchExpandableLocaleConfiguration>;
```

### KBQ_SEARCH_EXPANDABLE_DEFAULT_CONFIGURATION (const)

Deprecated: Use `KBQ_SEARCH_EXPANDABLE_DEFAULT_LOCALE_CONFIGURATION`. Will be removed in 22.0.0.

```ts
const KBQ_SEARCH_EXPANDABLE_DEFAULT_CONFIGURATION: KbqSearchExpandableLocaleConfiguration;
```

### KBQ_SEARCH_EXPANDABLE_DEFAULT_LOCALE_CONFIGURATION (const)

default configuration of search-expandable

```ts
const KBQ_SEARCH_EXPANDABLE_DEFAULT_LOCALE_CONFIGURATION: KbqSearchExpandableLocaleConfiguration;
```

### KBQ_SEARCH_EXPANDABLE_LOCALE_CONFIGURATION (const)

Injection Token for providing configuration of search-expandable

```ts
const KBQ_SEARCH_EXPANDABLE_LOCALE_CONFIGURATION: InjectionToken<KbqSearchExpandableLocaleConfiguration>;
```

### kbqSearchExpandableLocaleConfigurationProvider (const)

Utility provider for `KBQ_SEARCH_EXPANDABLE_LOCALE_CONFIGURATION`. Only the strings you pass are overridden; the
rest keep following the active locale.

```ts
const kbqSearchExpandableLocaleConfigurationProvider: (
    configuration: KbqDeepPartial<KbqSearchExpandableLocaleConfiguration>
) => Provider;
```
