@taiga-ui/experimental 4.51.0 → 4.52.0-canary.05c3268

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/components/index.d.ts +0 -5
  2. package/components/search-results/search-results.options.d.ts +2 -2
  3. package/fesm2022/taiga-ui-experimental-components-search-results.mjs +17 -19
  4. package/fesm2022/taiga-ui-experimental-components-search-results.mjs.map +1 -1
  5. package/fesm2022/taiga-ui-experimental-components.mjs +0 -5
  6. package/fesm2022/taiga-ui-experimental-components.mjs.map +1 -1
  7. package/package.json +8 -44
  8. package/components/accordion/accordion.component.d.ts +0 -20
  9. package/components/accordion/accordion.d.ts +0 -5
  10. package/components/accordion/accordion.directive.d.ts +0 -15
  11. package/components/accordion/index.d.ts +0 -3
  12. package/components/dialog/dialog.component.d.ts +0 -15
  13. package/components/dialog/dialog.directive.d.ts +0 -7
  14. package/components/dialog/dialog.options.d.ts +0 -27
  15. package/components/dialog/dialog.service.d.ts +0 -7
  16. package/components/dialog/index.d.ts +0 -4
  17. package/components/expand/expand.component.d.ts +0 -13
  18. package/components/expand/index.d.ts +0 -1
  19. package/components/hint/hint.component.d.ts +0 -26
  20. package/components/hint/index.d.ts +0 -1
  21. package/components/input-phone-international/index.d.ts +0 -1
  22. package/components/input-phone-international/input-phone-international.component.d.ts +0 -45
  23. package/esm2022/components/accordion/accordion.component.mjs +0 -80
  24. package/esm2022/components/accordion/accordion.directive.mjs +0 -58
  25. package/esm2022/components/accordion/accordion.mjs +0 -11
  26. package/esm2022/components/accordion/index.mjs +0 -4
  27. package/esm2022/components/accordion/taiga-ui-experimental-components-accordion.mjs +0 -5
  28. package/esm2022/components/dialog/dialog.component.mjs +0 -73
  29. package/esm2022/components/dialog/dialog.directive.mjs +0 -21
  30. package/esm2022/components/dialog/dialog.options.mjs +0 -12
  31. package/esm2022/components/dialog/dialog.service.mjs +0 -19
  32. package/esm2022/components/dialog/index.mjs +0 -5
  33. package/esm2022/components/dialog/taiga-ui-experimental-components-dialog.mjs +0 -5
  34. package/esm2022/components/expand/expand.component.mjs +0 -59
  35. package/esm2022/components/expand/index.mjs +0 -2
  36. package/esm2022/components/expand/taiga-ui-experimental-components-expand.mjs +0 -5
  37. package/esm2022/components/hint/hint.component.mjs +0 -112
  38. package/esm2022/components/hint/index.mjs +0 -2
  39. package/esm2022/components/hint/taiga-ui-experimental-components-hint.mjs +0 -5
  40. package/esm2022/components/index.mjs +0 -7
  41. package/esm2022/components/input-phone-international/index.mjs +0 -2
  42. package/esm2022/components/input-phone-international/input-phone-international.component.mjs +0 -184
  43. package/esm2022/components/input-phone-international/taiga-ui-experimental-components-input-phone-international.mjs +0 -5
  44. package/esm2022/components/search-results/index.mjs +0 -6
  45. package/esm2022/components/search-results/search-history.component.mjs +0 -59
  46. package/esm2022/components/search-results/search-hotkey.directive.mjs +0 -30
  47. package/esm2022/components/search-results/search-results.component.mjs +0 -88
  48. package/esm2022/components/search-results/search-results.mjs +0 -9
  49. package/esm2022/components/search-results/search-results.options.mjs +0 -9
  50. package/esm2022/components/search-results/taiga-ui-experimental-components-search-results.mjs +0 -5
  51. package/esm2022/components/taiga-ui-experimental-components.mjs +0 -5
  52. package/esm2022/index.mjs +0 -2
  53. package/esm2022/taiga-ui-experimental.mjs +0 -5
  54. package/fesm2022/taiga-ui-experimental-components-accordion.mjs +0 -147
  55. package/fesm2022/taiga-ui-experimental-components-accordion.mjs.map +0 -1
  56. package/fesm2022/taiga-ui-experimental-components-dialog.mjs +0 -120
  57. package/fesm2022/taiga-ui-experimental-components-dialog.mjs.map +0 -1
  58. package/fesm2022/taiga-ui-experimental-components-expand.mjs +0 -65
  59. package/fesm2022/taiga-ui-experimental-components-expand.mjs.map +0 -1
  60. package/fesm2022/taiga-ui-experimental-components-hint.mjs +0 -118
  61. package/fesm2022/taiga-ui-experimental-components-hint.mjs.map +0 -1
  62. package/fesm2022/taiga-ui-experimental-components-input-phone-international.mjs +0 -190
  63. package/fesm2022/taiga-ui-experimental-components-input-phone-international.mjs.map +0 -1
@@ -1,6 +1 @@
1
- export * from '@taiga-ui/experimental/components/accordion';
2
- export * from '@taiga-ui/experimental/components/dialog';
3
- export * from '@taiga-ui/experimental/components/expand';
4
- export * from '@taiga-ui/experimental/components/hint';
5
- export * from '@taiga-ui/experimental/components/input-phone-international';
6
1
  export * from '@taiga-ui/experimental/components/search-results';
@@ -10,10 +10,10 @@ export declare const TUI_SEARCH_RESULTS_OPTIONS: import("@angular/core").Injecti
10
10
  popular: string;
11
11
  empty: string;
12
12
  remove: string;
13
- }> | import("@angular/core").ProviderToken<Partial<{
13
+ }> | (() => Partial<{
14
14
  key: string;
15
15
  history: string;
16
16
  popular: string;
17
17
  empty: string;
18
18
  remove: string;
19
- }>>) => import("@angular/core").FactoryProvider;
19
+ }>)) => import("@angular/core").FactoryProvider;
@@ -1,27 +1,27 @@
1
- import { NgForOf, NgIf, KeyValuePipe, NgTemplateOutlet } from '@angular/common';
2
1
  import * as i0 from '@angular/core';
3
- import { inject, Component, ChangeDetectionStrategy, Input, Directive, TemplateRef, ContentChild } from '@angular/core';
2
+ import { inject, Input, ChangeDetectionStrategy, Component, Directive, TemplateRef, ContentChild } from '@angular/core';
4
3
  import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
4
  import { NgControl } from '@angular/forms';
6
5
  import { WA_LOCAL_STORAGE, WA_NAVIGATOR } from '@ng-web-apis/common';
7
6
  import { TuiButton } from '@taiga-ui/core/components/button';
7
+ import { TuiCell } from '@taiga-ui/core/components/cell';
8
8
  import { TuiTextfieldComponent } from '@taiga-ui/core/components/textfield';
9
9
  import { TuiTitle } from '@taiga-ui/core/directives/title';
10
10
  import { TUI_CLOSE_WORD } from '@taiga-ui/core/tokens';
11
11
  import { TuiAvatar } from '@taiga-ui/kit/components/avatar';
12
- import { TuiCell } from '@taiga-ui/layout/components/cell';
13
12
  import { TUI_INPUT_SEARCH } from '@taiga-ui/layout/tokens';
14
13
  import { map, filter } from 'rxjs';
15
14
  import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
16
15
  import { TuiInputSearch } from '@taiga-ui/layout/components/input-search';
17
16
  import { __decorate } from 'tslib';
17
+ import { KeyValuePipe, NgTemplateOutlet } from '@angular/common';
18
18
  import { TuiLet } from '@taiga-ui/cdk/directives/let';
19
19
  import { TuiFilterPipe } from '@taiga-ui/cdk/pipes/filter';
20
20
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
21
21
  import { tuiMoveFocus } from '@taiga-ui/cdk/utils/focus';
22
22
  import { tuiClamp } from '@taiga-ui/cdk/utils/math';
23
23
  import { tuiPure } from '@taiga-ui/cdk/utils/miscellaneous';
24
- import { TuiIconPipe } from '@taiga-ui/core/components/icon';
24
+ import { TuiIcon } from '@taiga-ui/core/components/icon';
25
25
  import { TuiLoader } from '@taiga-ui/core/components/loader';
26
26
  import { TuiScrollbar } from '@taiga-ui/core/components/scrollbar';
27
27
  import * as i2 from '@taiga-ui/kit/components/tabs';
@@ -70,12 +70,12 @@ class TuiSearchHistory {
70
70
  get items() {
71
71
  return JSON.parse(this.storage?.getItem(this.options.key) || '[]');
72
72
  }
73
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSearchHistory, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
74
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiSearchHistory, isStandalone: true, selector: "tui-search-history", inputs: { popular: "popular" }, ngImport: i0, template: "<label\n *ngIf=\"history.length\"\n class=\"t-sr-label\"\n>\n {{ i18n()?.history }}\n</label>\n<button\n *ngFor=\"let item of history\"\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (keydown.backspace)=\"remove(item)\"\n (keydown.delete)=\"remove(item)\"\n (mousedown.prevent)=\"(0)\"\n>\n <tui-avatar [src]=\"options.history\" />\n <span tuiTitle>{{ item }}</span>\n <button\n appearance=\"icon\"\n size=\"xs\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"options.remove\"\n (click.stop)=\"remove(item)\"\n >\n \uD83D\uDDD1\uFE0F\n </button>\n</button>\n<label\n *ngIf=\"popular.length\"\n class=\"t-sr-label\"\n>\n {{ i18n()?.popular }}\n</label>\n<button\n *ngFor=\"let item of popular\"\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (mousedown.prevent)=\"(0)\"\n>\n <tui-avatar [src]=\"options.popular\" />\n <span tuiTitle>{{ item }}</span>\n</button>\n", styles: [":host:not(:empty){display:block;padding:.375rem 0}\n"], dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TuiAvatar, selector: "tui-avatar,button[tuiAvatar],a[tuiAvatar]", inputs: ["size", "round", "src"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiCell, selector: "[tuiCell]:not(ng-template)", inputs: ["tuiCell", "tuiCellHeight"] }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
73
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSearchHistory, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
74
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiSearchHistory, isStandalone: true, selector: "tui-search-history", inputs: { popular: "popular" }, ngImport: i0, template: "@if (history.length) {\n <label class=\"t-sr-label\">\n {{ i18n()?.history }}\n </label>\n}\n@for (item of history; track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (keydown.backspace)=\"remove(item)\"\n (keydown.delete)=\"remove(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <div [tuiAvatar]=\"options.history\"></div>\n <span tuiTitle>{{ item }}</span>\n <button\n appearance=\"icon\"\n size=\"xs\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"options.remove\"\n (click.stop)=\"remove(item)\"\n >\n \uD83D\uDDD1\uFE0F\n </button>\n </button>\n}\n@if (popular.length) {\n <label class=\"t-sr-label\">\n {{ i18n()?.popular }}\n </label>\n}\n@for (item of popular; track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <span [tuiAvatar]=\"options.popular\"></span>\n <span tuiTitle>{{ item }}</span>\n </button>\n}\n", styles: [":host:not(:empty){display:block;padding:.375rem 0}\n"], dependencies: [{ kind: "directive", type: TuiAvatar, selector: "[tuiAvatar]", inputs: ["size", "round", "badge"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiCell, selector: "[tuiCell]:not(ng-template)", inputs: ["tuiCell", "tuiCellHeight"] }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
75
75
  }
76
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSearchHistory, decorators: [{
76
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSearchHistory, decorators: [{
77
77
  type: Component,
78
- args: [{ standalone: true, selector: 'tui-search-history', imports: [NgForOf, NgIf, TuiAvatar, TuiButton, TuiCell, TuiTitle], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label\n *ngIf=\"history.length\"\n class=\"t-sr-label\"\n>\n {{ i18n()?.history }}\n</label>\n<button\n *ngFor=\"let item of history\"\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (keydown.backspace)=\"remove(item)\"\n (keydown.delete)=\"remove(item)\"\n (mousedown.prevent)=\"(0)\"\n>\n <tui-avatar [src]=\"options.history\" />\n <span tuiTitle>{{ item }}</span>\n <button\n appearance=\"icon\"\n size=\"xs\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"options.remove\"\n (click.stop)=\"remove(item)\"\n >\n \uD83D\uDDD1\uFE0F\n </button>\n</button>\n<label\n *ngIf=\"popular.length\"\n class=\"t-sr-label\"\n>\n {{ i18n()?.popular }}\n</label>\n<button\n *ngFor=\"let item of popular\"\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (mousedown.prevent)=\"(0)\"\n>\n <tui-avatar [src]=\"options.popular\" />\n <span tuiTitle>{{ item }}</span>\n</button>\n", styles: [":host:not(:empty){display:block;padding:.375rem 0}\n"] }]
78
+ args: [{ selector: 'tui-search-history', imports: [TuiAvatar, TuiButton, TuiCell, TuiTitle], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (history.length) {\n <label class=\"t-sr-label\">\n {{ i18n()?.history }}\n </label>\n}\n@for (item of history; track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (keydown.backspace)=\"remove(item)\"\n (keydown.delete)=\"remove(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <div [tuiAvatar]=\"options.history\"></div>\n <span tuiTitle>{{ item }}</span>\n <button\n appearance=\"icon\"\n size=\"xs\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"options.remove\"\n (click.stop)=\"remove(item)\"\n >\n \uD83D\uDDD1\uFE0F\n </button>\n </button>\n}\n@if (popular.length) {\n <label class=\"t-sr-label\">\n {{ i18n()?.popular }}\n </label>\n}\n@for (item of popular; track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <span [tuiAvatar]=\"options.popular\"></span>\n <span tuiTitle>{{ item }}</span>\n </button>\n}\n", styles: [":host:not(:empty){display:block;padding:.375rem 0}\n"] }]
79
79
  }], propDecorators: { popular: [{
80
80
  type: Input
81
81
  }] } });
@@ -86,10 +86,10 @@ class TuiSearchHotkey {
86
86
  this.search = inject(TuiInputSearch);
87
87
  this.placeholder = toSignal(inject(TUI_INPUT_SEARCH).pipe(map(({ hotkey }) => this.platform.startsWith('Mac') ? `⌘+K ${hotkey}` : `Alt+K ${hotkey}`)));
88
88
  }
89
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSearchHotkey, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
90
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiSearchHotkey, isStandalone: true, selector: "input[tuiSearchHotkey]", host: { listeners: { "document:keydown.meta.k.stop": "search.open()", "document:keydown.alt.k.stop": "search.open()" }, properties: { "placeholder": "placeholder()" } }, ngImport: i0 }); }
89
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSearchHotkey, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
90
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiSearchHotkey, isStandalone: true, selector: "input[tuiSearchHotkey]", host: { listeners: { "document:keydown.meta.k.stop": "search.open()", "document:keydown.alt.k.stop": "search.open()" }, properties: { "placeholder": "placeholder()" } }, ngImport: i0 }); }
91
91
  }
92
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSearchHotkey, decorators: [{
92
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSearchHotkey, decorators: [{
93
93
  type: Directive,
94
94
  args: [{
95
95
  standalone: true,
@@ -137,22 +137,20 @@ class TuiSearchResultsComponent {
137
137
  asIs() {
138
138
  return 0;
139
139
  }
140
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSearchResultsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
141
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiSearchResultsComponent, isStandalone: true, selector: "tui-search-results", inputs: { results: "results" }, host: { listeners: { "keydown.arrowDown.prevent": "onArrow($event.target, 1)", "keydown.arrowUp.prevent": "onArrow($event.target, -1)" } }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-content *ngIf=\"!textfield.value(); else a\" />\n<ng-template #a>\n <tui-loader\n *ngIf=\"!results; else b\"\n class=\"t-loader\"\n />\n <ng-template #b>\n <tui-block-status\n *ngIf=\"results && isEmpty(results); else c\"\n size=\"m\"\n class=\"t-status\"\n >\n <img\n alt=\"\"\n tuiSlot=\"top\"\n class=\"t-empty\"\n [src]=\"options.empty | tuiIcon\"\n />\n {{ i18n()?.empty }}\n </tui-block-status>\n <ng-template #c>\n <ng-container *tuiLet=\"(results | keyvalue: asIs) || [] as items\">\n <tui-scrollbar class=\"t-scrollbar\">\n <ng-container *ngFor=\"let group of items | tuiFilter: notEmpty; let index = index\">\n <ng-container *ngIf=\"!active || active === index + 1\">\n <label\n *ngIf=\"!active && items.length > 1\"\n class=\"t-sr-label\"\n >\n {{ group.key }}\n </label>\n <ng-container\n *ngFor=\"let item of group.value\"\n [ngTemplateOutlet]=\"template || null\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n </ng-container>\n </ng-container>\n </tui-scrollbar>\n <tui-tabs\n *ngIf=\"items.length > 1\"\n size=\"m\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"active\"\n (document:keydown.shift.tab.prevent)=\"tab(-1)\"\n (document:keydown.tab.prevent)=\"tab(1)\"\n >\n <button tuiTab>{{ i18n()?.all }}</button>\n <ng-container *ngFor=\"let group of items\">\n <button\n *ngIf=\"group.value.length\"\n tuiTab\n >\n {{ group.key }}\n </button>\n </ng-container>\n </tui-tabs>\n </ng-container>\n </ng-template>\n </ng-template>\n</ng-template>\n", styles: [":host{display:flex;flex-direction:column;border-radius:var(--tui-radius-l);background:var(--tui-background-base);box-shadow:inset 0 0 0 1px var(--tui-border-normal)}:host ::ng-deep [tuiCell]{inline-size:-webkit-fill-available;inline-size:-moz-available;inline-size:stretch;padding:.375rem;margin:.25rem .625rem;border-radius:var(--tui-radius-l)}:host ::ng-deep [tuiCell]>tui-avatar{border-radius:var(--tui-radius-m)}:host ::ng-deep .t-sr-label{display:block;font:var(--tui-font-text-ui-s);color:var(--tui-text-secondary);margin:.75rem 1rem .5rem}.t-loader{margin:1rem 0}.t-status{margin-block-end:2rem}.t-empty{margin-block-start:1.5rem;filter:invert(1)}.t-tabs{order:-1;margin:0 1rem;box-shadow:none;border-image:linear-gradient(0deg,var(--tui-border-normal) 1px,transparent 0) fill 0/0/0 1rem}.t-tabs:before{background:var(--tui-background-accent-opposite-pressed)}.t-scrollbar{max-block-size:30rem;padding:.375rem 0}\n"], dependencies: [{ kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1.TuiBlockStatusComponent, selector: "tui-block-status", inputs: ["card", "size"] }, { kind: "directive", type: i1.TuiBlockStatusDirective, selector: "[tuiSlot]", inputs: ["tuiSlot"] }, { kind: "pipe", type: TuiFilterPipe, name: "tuiFilter" }, { kind: "pipe", type: TuiIconPipe, name: "tuiIcon" }, { kind: "directive", type: TuiLet, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar", inputs: ["hidden"] }, { kind: "directive", type: i2.TuiTab, selector: "a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]" }, { kind: "directive", type: i2.TuiTabsHorizontal, selector: "tui-tabs:not([vertical]), nav[tuiTabs]:not([vertical])", inputs: ["underline"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
140
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSearchResultsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
141
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiSearchResultsComponent, isStandalone: true, selector: "tui-search-results", inputs: { results: "results" }, host: { listeners: { "keydown.arrowDown.prevent": "onArrow($event.target, 1)", "keydown.arrowUp.prevent": "onArrow($event.target, -1)" } }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (!textfield.value()) {\n <ng-content />\n} @else {\n @if (!results) {\n <tui-loader class=\"t-loader\" />\n } @else {\n @if (results && isEmpty(results)) {\n <tui-block-status\n size=\"m\"\n class=\"t-status\"\n >\n <tui-icon\n tuiSlot=\"top\"\n class=\"t-empty\"\n [icon]=\"options.empty\"\n />\n {{ i18n()?.empty }}\n </tui-block-status>\n } @else {\n <ng-container *tuiLet=\"(results | keyvalue: asIs) || [] as items\">\n <tui-scrollbar class=\"t-scrollbar\">\n @for (group of items | tuiFilter: notEmpty; track group; let index = $index) {\n @if (!active || active === index + 1) {\n @if (!active && items.length > 1) {\n <label class=\"t-sr-label\">\n {{ group.key }}\n </label>\n }\n @for (item of group.value; track item) {\n <ng-container\n [ngTemplateOutlet]=\"template || null\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n }\n }\n }\n </tui-scrollbar>\n @if (items.length > 1) {\n <tui-tabs\n size=\"m\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"active\"\n (document:keydown.shift.tab.prevent)=\"tab(-1)\"\n (document:keydown.tab.prevent)=\"tab(1)\"\n >\n <button tuiTab>{{ i18n()?.all }}</button>\n @for (group of items; track group) {\n @if (group.value.length) {\n <button tuiTab>\n {{ group.key }}\n </button>\n }\n }\n </tui-tabs>\n }\n </ng-container>\n }\n }\n}\n", styles: [":host{display:flex;flex-direction:column;border-radius:var(--tui-radius-l);background:var(--tui-background-base);box-shadow:inset 0 0 0 1px var(--tui-border-normal)}:host ::ng-deep [tuiCell]{inline-size:stretch;padding:.375rem;margin:.25rem .625rem;border-radius:var(--tui-radius-l)}:host ::ng-deep [tuiCell]>[tuiAvatar]{border-radius:var(--tui-radius-m)}:host ::ng-deep .t-sr-label{display:block;font:var(--tui-font-text-ui-s);color:var(--tui-text-secondary);margin:.75rem 1rem .5rem}.t-loader{margin:1rem 0}.t-status{margin-block-end:2rem}.t-empty{margin-block-start:1.5rem;font-size:6rem;color:var(--tui-text-primary)}.t-tabs{order:-1;margin:0 1rem;box-shadow:none;border-image:linear-gradient(0deg,var(--tui-border-normal) 1px,transparent 0) fill 0/0/0 1rem}.t-tabs:before{background:var(--tui-background-accent-opposite-pressed)}.t-scrollbar{max-block-size:30rem;padding:.375rem 0}\n"], dependencies: [{ kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1.TuiBlockStatusComponent, selector: "tui-block-status", inputs: ["card", "size"] }, { kind: "directive", type: i1.TuiBlockStatusDirective, selector: "[tuiSlot]", inputs: ["tuiSlot"] }, { kind: "pipe", type: TuiFilterPipe, name: "tuiFilter" }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "directive", type: TuiLet, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar", inputs: ["hidden"] }, { kind: "directive", type: i2.TuiTab, selector: "a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]" }, { kind: "directive", type: i2.TuiTabsHorizontal, selector: "tui-tabs:not([vertical]), nav[tuiTabs]:not([vertical])", inputs: ["underline"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
142
142
  }
143
143
  __decorate([
144
144
  tuiPure
145
145
  ], TuiSearchResultsComponent.prototype, "isEmpty", null);
146
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSearchResultsComponent, decorators: [{
146
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSearchResultsComponent, decorators: [{
147
147
  type: Component,
148
- args: [{ standalone: true, selector: 'tui-search-results', imports: [
148
+ args: [{ selector: 'tui-search-results', imports: [
149
149
  KeyValuePipe,
150
- NgForOf,
151
- NgIf,
152
150
  NgTemplateOutlet,
153
151
  TuiBlockStatus,
154
152
  TuiFilterPipe,
155
- TuiIconPipe,
153
+ TuiIcon,
156
154
  TuiLet,
157
155
  TuiLoader,
158
156
  TuiScrollbar,
@@ -160,7 +158,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
160
158
  ], changeDetection: ChangeDetectionStrategy.OnPush, host: {
161
159
  '(keydown.arrowDown.prevent)': 'onArrow($event.target, 1)',
162
160
  '(keydown.arrowUp.prevent)': 'onArrow($event.target, -1)',
163
- }, template: "<ng-content *ngIf=\"!textfield.value(); else a\" />\n<ng-template #a>\n <tui-loader\n *ngIf=\"!results; else b\"\n class=\"t-loader\"\n />\n <ng-template #b>\n <tui-block-status\n *ngIf=\"results && isEmpty(results); else c\"\n size=\"m\"\n class=\"t-status\"\n >\n <img\n alt=\"\"\n tuiSlot=\"top\"\n class=\"t-empty\"\n [src]=\"options.empty | tuiIcon\"\n />\n {{ i18n()?.empty }}\n </tui-block-status>\n <ng-template #c>\n <ng-container *tuiLet=\"(results | keyvalue: asIs) || [] as items\">\n <tui-scrollbar class=\"t-scrollbar\">\n <ng-container *ngFor=\"let group of items | tuiFilter: notEmpty; let index = index\">\n <ng-container *ngIf=\"!active || active === index + 1\">\n <label\n *ngIf=\"!active && items.length > 1\"\n class=\"t-sr-label\"\n >\n {{ group.key }}\n </label>\n <ng-container\n *ngFor=\"let item of group.value\"\n [ngTemplateOutlet]=\"template || null\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n </ng-container>\n </ng-container>\n </tui-scrollbar>\n <tui-tabs\n *ngIf=\"items.length > 1\"\n size=\"m\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"active\"\n (document:keydown.shift.tab.prevent)=\"tab(-1)\"\n (document:keydown.tab.prevent)=\"tab(1)\"\n >\n <button tuiTab>{{ i18n()?.all }}</button>\n <ng-container *ngFor=\"let group of items\">\n <button\n *ngIf=\"group.value.length\"\n tuiTab\n >\n {{ group.key }}\n </button>\n </ng-container>\n </tui-tabs>\n </ng-container>\n </ng-template>\n </ng-template>\n</ng-template>\n", styles: [":host{display:flex;flex-direction:column;border-radius:var(--tui-radius-l);background:var(--tui-background-base);box-shadow:inset 0 0 0 1px var(--tui-border-normal)}:host ::ng-deep [tuiCell]{inline-size:-webkit-fill-available;inline-size:-moz-available;inline-size:stretch;padding:.375rem;margin:.25rem .625rem;border-radius:var(--tui-radius-l)}:host ::ng-deep [tuiCell]>tui-avatar{border-radius:var(--tui-radius-m)}:host ::ng-deep .t-sr-label{display:block;font:var(--tui-font-text-ui-s);color:var(--tui-text-secondary);margin:.75rem 1rem .5rem}.t-loader{margin:1rem 0}.t-status{margin-block-end:2rem}.t-empty{margin-block-start:1.5rem;filter:invert(1)}.t-tabs{order:-1;margin:0 1rem;box-shadow:none;border-image:linear-gradient(0deg,var(--tui-border-normal) 1px,transparent 0) fill 0/0/0 1rem}.t-tabs:before{background:var(--tui-background-accent-opposite-pressed)}.t-scrollbar{max-block-size:30rem;padding:.375rem 0}\n"] }]
161
+ }, template: "@if (!textfield.value()) {\n <ng-content />\n} @else {\n @if (!results) {\n <tui-loader class=\"t-loader\" />\n } @else {\n @if (results && isEmpty(results)) {\n <tui-block-status\n size=\"m\"\n class=\"t-status\"\n >\n <tui-icon\n tuiSlot=\"top\"\n class=\"t-empty\"\n [icon]=\"options.empty\"\n />\n {{ i18n()?.empty }}\n </tui-block-status>\n } @else {\n <ng-container *tuiLet=\"(results | keyvalue: asIs) || [] as items\">\n <tui-scrollbar class=\"t-scrollbar\">\n @for (group of items | tuiFilter: notEmpty; track group; let index = $index) {\n @if (!active || active === index + 1) {\n @if (!active && items.length > 1) {\n <label class=\"t-sr-label\">\n {{ group.key }}\n </label>\n }\n @for (item of group.value; track item) {\n <ng-container\n [ngTemplateOutlet]=\"template || null\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n }\n }\n }\n </tui-scrollbar>\n @if (items.length > 1) {\n <tui-tabs\n size=\"m\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"active\"\n (document:keydown.shift.tab.prevent)=\"tab(-1)\"\n (document:keydown.tab.prevent)=\"tab(1)\"\n >\n <button tuiTab>{{ i18n()?.all }}</button>\n @for (group of items; track group) {\n @if (group.value.length) {\n <button tuiTab>\n {{ group.key }}\n </button>\n }\n }\n </tui-tabs>\n }\n </ng-container>\n }\n }\n}\n", styles: [":host{display:flex;flex-direction:column;border-radius:var(--tui-radius-l);background:var(--tui-background-base);box-shadow:inset 0 0 0 1px var(--tui-border-normal)}:host ::ng-deep [tuiCell]{inline-size:stretch;padding:.375rem;margin:.25rem .625rem;border-radius:var(--tui-radius-l)}:host ::ng-deep [tuiCell]>[tuiAvatar]{border-radius:var(--tui-radius-m)}:host ::ng-deep .t-sr-label{display:block;font:var(--tui-font-text-ui-s);color:var(--tui-text-secondary);margin:.75rem 1rem .5rem}.t-loader{margin:1rem 0}.t-status{margin-block-end:2rem}.t-empty{margin-block-start:1.5rem;font-size:6rem;color:var(--tui-text-primary)}.t-tabs{order:-1;margin:0 1rem;box-shadow:none;border-image:linear-gradient(0deg,var(--tui-border-normal) 1px,transparent 0) fill 0/0/0 1rem}.t-tabs:before{background:var(--tui-background-accent-opposite-pressed)}.t-scrollbar{max-block-size:30rem;padding:.375rem 0}\n"] }]
164
162
  }], propDecorators: { template: [{
165
163
  type: ContentChild,
166
164
  args: [TemplateRef]
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-experimental-components-search-results.mjs","sources":["../../../projects/experimental/components/search-results/search-results.options.ts","../../../projects/experimental/components/search-results/search-history.component.ts","../../../projects/experimental/components/search-results/search-history.component.html","../../../projects/experimental/components/search-results/search-hotkey.directive.ts","../../../projects/experimental/components/search-results/search-results.component.ts","../../../projects/experimental/components/search-results/search-results.component.html","../../../projects/experimental/components/search-results/search-results.ts","../../../projects/experimental/components/search-results/taiga-ui-experimental-components-search-results.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport const [TUI_SEARCH_RESULTS_OPTIONS, tuiSearchResultsOptionsProvider] =\n tuiCreateOptions({\n key: 'taiga-search-history',\n history: '@tui.clock',\n popular: '@tui.search',\n empty: '@tui.search',\n remove: '@tui.trash',\n });\n","import {NgForOf, NgIf} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, inject, Input} from '@angular/core';\nimport {takeUntilDestroyed, toSignal} from '@angular/core/rxjs-interop';\nimport {NgControl} from '@angular/forms';\nimport {WA_LOCAL_STORAGE} from '@ng-web-apis/common';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {TuiTitle} from '@taiga-ui/core/directives/title';\nimport {TUI_CLOSE_WORD} from '@taiga-ui/core/tokens';\nimport {TuiAvatar} from '@taiga-ui/kit/components/avatar';\nimport {TuiCell} from '@taiga-ui/layout/components/cell';\nimport {TUI_INPUT_SEARCH} from '@taiga-ui/layout/tokens';\nimport {filter, map} from 'rxjs';\n\nimport {TUI_SEARCH_RESULTS_OPTIONS} from './search-results.options';\n\n@Component({\n standalone: true,\n selector: 'tui-search-history',\n imports: [NgForOf, NgIf, TuiAvatar, TuiButton, TuiCell, TuiTitle],\n templateUrl: './search-history.component.html',\n styles: [\n `\n :host:not(:empty) {\n display: block;\n padding: 0.375rem 0;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiSearchHistory {\n private readonly textfield = inject(TuiTextfieldComponent);\n private readonly storage = inject(WA_LOCAL_STORAGE);\n private readonly control = inject(NgControl);\n\n protected readonly close = toSignal(inject(TUI_CLOSE_WORD));\n protected readonly i18n = toSignal(inject(TUI_INPUT_SEARCH));\n protected readonly options = inject(TUI_SEARCH_RESULTS_OPTIONS);\n protected readonly $ = this.control.valueChanges\n ?.pipe(\n map(String),\n filter((item) => !!item && !this.popular.includes(item)),\n takeUntilDestroyed(),\n )\n .subscribe((value) => {\n this.store(value);\n });\n\n protected history = this.items;\n\n @Input()\n public popular: readonly string[] = [];\n\n protected store(item: string): void {\n this.storage?.setItem(\n this.options.key,\n JSON.stringify(\n Array.from(new Set([item.trim(), ...this.items]))\n .filter((v, _, a) => v && !a.find((s) => s.startsWith(v) && s !== v))\n .slice(0, 5),\n ),\n );\n }\n\n protected remove(item: string): void {\n this.textfield.input?.nativeElement.focus();\n this.history = this.history.filter((v) => v !== item);\n this.storage?.setItem(\n this.options.key,\n JSON.stringify(this.items.filter((v) => v !== item)),\n );\n }\n\n protected select(item: string): void {\n this.control.control?.setValue(item);\n this.textfield.input?.nativeElement.focus();\n }\n\n private get items(): readonly string[] {\n return JSON.parse(this.storage?.getItem(this.options.key) || '[]');\n }\n}\n","<label\n *ngIf=\"history.length\"\n class=\"t-sr-label\"\n>\n {{ i18n()?.history }}\n</label>\n<button\n *ngFor=\"let item of history\"\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (keydown.backspace)=\"remove(item)\"\n (keydown.delete)=\"remove(item)\"\n (mousedown.prevent)=\"(0)\"\n>\n <tui-avatar [src]=\"options.history\" />\n <span tuiTitle>{{ item }}</span>\n <button\n appearance=\"icon\"\n size=\"xs\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"options.remove\"\n (click.stop)=\"remove(item)\"\n >\n 🗑️\n </button>\n</button>\n<label\n *ngIf=\"popular.length\"\n class=\"t-sr-label\"\n>\n {{ i18n()?.popular }}\n</label>\n<button\n *ngFor=\"let item of popular\"\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (mousedown.prevent)=\"(0)\"\n>\n <tui-avatar [src]=\"options.popular\" />\n <span tuiTitle>{{ item }}</span>\n</button>\n","import {Directive, inject} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {WA_NAVIGATOR} from '@ng-web-apis/common';\nimport {TuiInputSearch} from '@taiga-ui/layout/components/input-search';\nimport {TUI_INPUT_SEARCH} from '@taiga-ui/layout/tokens';\nimport {map} from 'rxjs';\n\n@Directive({\n standalone: true,\n selector: 'input[tuiSearchHotkey]',\n host: {\n '[placeholder]': 'placeholder()',\n '(document:keydown.meta.k.stop)': 'search.open()',\n '(document:keydown.alt.k.stop)': 'search.open()',\n },\n})\nexport class TuiSearchHotkey {\n private readonly platform = inject(WA_NAVIGATOR).platform;\n\n protected readonly search = inject(TuiInputSearch);\n protected readonly placeholder = toSignal(\n inject(TUI_INPUT_SEARCH).pipe(\n map(({hotkey}) =>\n this.platform.startsWith('Mac') ? `⌘+K ${hotkey}` : `Alt+K ${hotkey}`,\n ),\n ),\n );\n}\n","import {\n type KeyValue,\n KeyValuePipe,\n NgForOf,\n NgIf,\n NgTemplateOutlet,\n} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n inject,\n Input,\n type OnChanges,\n TemplateRef,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {TuiLet} from '@taiga-ui/cdk/directives/let';\nimport {TuiFilterPipe} from '@taiga-ui/cdk/pipes/filter';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiMoveFocus} from '@taiga-ui/cdk/utils/focus';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\nimport {tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiIconPipe} from '@taiga-ui/core/components/icon';\nimport {TuiLoader} from '@taiga-ui/core/components/loader';\nimport {TuiScrollbar} from '@taiga-ui/core/components/scrollbar';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {TuiTabs} from '@taiga-ui/kit/components/tabs';\nimport {TuiBlockStatus} from '@taiga-ui/layout/components/block-status';\nimport {TUI_INPUT_SEARCH} from '@taiga-ui/layout/tokens';\n\nimport {TUI_SEARCH_RESULTS_OPTIONS} from './search-results.options';\n\n@Component({\n standalone: true,\n selector: 'tui-search-results',\n imports: [\n KeyValuePipe,\n NgForOf,\n NgIf,\n NgTemplateOutlet,\n TuiBlockStatus,\n TuiFilterPipe,\n TuiIconPipe,\n TuiLet,\n TuiLoader,\n TuiScrollbar,\n TuiTabs,\n ],\n templateUrl: './search-results.component.html',\n styleUrls: ['./search-results.component.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(keydown.arrowDown.prevent)': 'onArrow($event.target, 1)',\n '(keydown.arrowUp.prevent)': 'onArrow($event.target, -1)',\n },\n})\nexport class TuiSearchResultsComponent<T> implements OnChanges {\n private readonly el = tuiInjectElement();\n\n protected readonly options = inject(TUI_SEARCH_RESULTS_OPTIONS);\n protected readonly i18n = toSignal(inject(TUI_INPUT_SEARCH));\n protected readonly textfield = inject(TuiTextfieldComponent);\n protected active = 0;\n\n @ContentChild(TemplateRef)\n public readonly template?: TemplateRef<TuiContext<T>>;\n\n @Input()\n public results: Record<string, readonly T[]> | null = {};\n\n public ngOnChanges(): void {\n this.active = 0;\n }\n\n @tuiPure\n protected isEmpty(results: Record<string, readonly T[]>): boolean {\n return !Object.values(results).reduce((total, {length}) => length + total, 0);\n }\n\n protected onArrow(current: HTMLElement, step: number): void {\n const elements = Array.from(this.el.querySelectorAll<HTMLElement>('[tuiCell]'));\n\n if (elements[0] === current && step < 0) {\n this.textfield.input?.nativeElement.focus();\n } else {\n tuiMoveFocus(elements.indexOf(current), elements, step);\n }\n }\n\n protected tab(step: number): void {\n const max = Object.values(this.results || {}).filter((v) => v.length).length;\n\n this.active = tuiClamp(this.active + step, 0, max);\n this.textfield.input?.nativeElement.focus();\n }\n\n protected notEmpty({value}: KeyValue<string, readonly T[]>): boolean {\n return !!value.length;\n }\n\n protected asIs(): number {\n return 0;\n }\n}\n","<ng-content *ngIf=\"!textfield.value(); else a\" />\n<ng-template #a>\n <tui-loader\n *ngIf=\"!results; else b\"\n class=\"t-loader\"\n />\n <ng-template #b>\n <tui-block-status\n *ngIf=\"results && isEmpty(results); else c\"\n size=\"m\"\n class=\"t-status\"\n >\n <img\n alt=\"\"\n tuiSlot=\"top\"\n class=\"t-empty\"\n [src]=\"options.empty | tuiIcon\"\n />\n {{ i18n()?.empty }}\n </tui-block-status>\n <ng-template #c>\n <ng-container *tuiLet=\"(results | keyvalue: asIs) || [] as items\">\n <tui-scrollbar class=\"t-scrollbar\">\n <ng-container *ngFor=\"let group of items | tuiFilter: notEmpty; let index = index\">\n <ng-container *ngIf=\"!active || active === index + 1\">\n <label\n *ngIf=\"!active && items.length > 1\"\n class=\"t-sr-label\"\n >\n {{ group.key }}\n </label>\n <ng-container\n *ngFor=\"let item of group.value\"\n [ngTemplateOutlet]=\"template || null\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n </ng-container>\n </ng-container>\n </tui-scrollbar>\n <tui-tabs\n *ngIf=\"items.length > 1\"\n size=\"m\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"active\"\n (document:keydown.shift.tab.prevent)=\"tab(-1)\"\n (document:keydown.tab.prevent)=\"tab(1)\"\n >\n <button tuiTab>{{ i18n()?.all }}</button>\n <ng-container *ngFor=\"let group of items\">\n <button\n *ngIf=\"group.value.length\"\n tuiTab\n >\n {{ group.key }}\n </button>\n </ng-container>\n </tui-tabs>\n </ng-container>\n </ng-template>\n </ng-template>\n</ng-template>\n","import {TuiSearchHistory} from './search-history.component';\nimport {TuiSearchHotkey} from './search-hotkey.directive';\nimport {TuiSearchResultsComponent} from './search-results.component';\n\nexport const TuiSearchResults = [\n TuiSearchHotkey,\n TuiSearchHistory,\n TuiSearchResultsComponent,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEa,CAAC,0BAA0B,EAAE,+BAA+B,CAAC,GACtE,gBAAgB,CAAC;AACb,IAAA,GAAG,EAAE,sBAAsB;AAC3B,IAAA,OAAO,EAAE,YAAY;AACrB,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,KAAK,EAAE,aAAa;AACpB,IAAA,MAAM,EAAE,YAAY;AACvB,CAAA;;ACOL,MAea,gBAAgB,CAAA;AAf7B,IAAA,WAAA,GAAA;AAgBqB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAC1C,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;AACnC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;QAE1B,IAAK,CAAA,KAAA,GAAG,QAA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yB,EAAA,UAAA,EAAA,CAAA;kBAxBrC,SAAS;iCACM,IAAI,EAAA,QAAA,EACN,oBAAoB,EACrB,OAAA,EAAA;wBACL,YAAY;wBACZ,OAAO;wBACP,IAAI;wBACJ,gBAAgB;wBAChB,cAAc;wBACd,aAAa;wBACb,WAAW;wBACX,MAAM;wBACN,SAAS;wBACT,YAAY;wBACZ,OAAO;qBACV,EAGgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACF,wBAAA,6BAA6B,EAAE,2BAA2B;AAC1D,wBAAA,2BAA2B,EAAE,4BAA4B;AAC5D,qBAAA,EAAA,QAAA,EAAA,q7EAAA,EAAA,MAAA,EAAA,CAAA,25BAAA,CAAA,EAAA,CAAA;8BAWe,QAAQ,EAAA,CAAA;sBADvB,YAAY;uBAAC,WAAW,CAAA;gBAIlB,OAAO,EAAA,CAAA;sBADb,KAAK;gBAQI,OAAO,EAAA,EAAA,EAAA,EAAA,CAAA;;AEzER,MAAA,gBAAgB,GAAG;IAC5B,eAAe;IACf,gBAAgB;IAChB,yBAAyB;;;ACP7B;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-experimental-components-search-results.mjs","sources":["../../../projects/experimental/components/search-results/search-results.options.ts","../../../projects/experimental/components/search-results/search-history.component.ts","../../../projects/experimental/components/search-results/search-history.component.html","../../../projects/experimental/components/search-results/search-hotkey.directive.ts","../../../projects/experimental/components/search-results/search-results.component.ts","../../../projects/experimental/components/search-results/search-results.component.html","../../../projects/experimental/components/search-results/search-results.ts","../../../projects/experimental/components/search-results/taiga-ui-experimental-components-search-results.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport const [TUI_SEARCH_RESULTS_OPTIONS, tuiSearchResultsOptionsProvider] =\n tuiCreateOptions({\n key: 'taiga-search-history',\n history: '@tui.clock',\n popular: '@tui.search',\n empty: '@tui.search',\n remove: '@tui.trash',\n });\n","import {ChangeDetectionStrategy, Component, inject, Input} from '@angular/core';\nimport {takeUntilDestroyed, toSignal} from '@angular/core/rxjs-interop';\nimport {NgControl} from '@angular/forms';\nimport {WA_LOCAL_STORAGE} from '@ng-web-apis/common';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiCell} from '@taiga-ui/core/components/cell';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {TuiTitle} from '@taiga-ui/core/directives/title';\nimport {TUI_CLOSE_WORD} from '@taiga-ui/core/tokens';\nimport {TuiAvatar} from '@taiga-ui/kit/components/avatar';\nimport {TUI_INPUT_SEARCH} from '@taiga-ui/layout/tokens';\nimport {filter, map} from 'rxjs';\n\nimport {TUI_SEARCH_RESULTS_OPTIONS} from './search-results.options';\n\n@Component({\n selector: 'tui-search-history',\n imports: [TuiAvatar, TuiButton, TuiCell, TuiTitle],\n templateUrl: './search-history.component.html',\n styles: [\n `\n :host:not(:empty) {\n display: block;\n padding: 0.375rem 0;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiSearchHistory {\n private readonly textfield = inject(TuiTextfieldComponent);\n private readonly storage = inject(WA_LOCAL_STORAGE);\n private readonly control = inject(NgControl);\n\n protected readonly close = toSignal(inject(TUI_CLOSE_WORD));\n protected readonly i18n = toSignal(inject(TUI_INPUT_SEARCH));\n protected readonly options = inject(TUI_SEARCH_RESULTS_OPTIONS);\n protected readonly $ = this.control.valueChanges\n ?.pipe(\n map(String),\n filter((item) => !!item && !this.popular.includes(item)),\n takeUntilDestroyed(),\n )\n .subscribe((value) => {\n this.store(value);\n });\n\n protected history = this.items;\n\n @Input()\n public popular: readonly string[] = [];\n\n protected store(item: string): void {\n this.storage?.setItem(\n this.options.key,\n JSON.stringify(\n Array.from(new Set([item.trim(), ...this.items]))\n .filter((v, _, a) => v && !a.find((s) => s.startsWith(v) && s !== v))\n .slice(0, 5),\n ),\n );\n }\n\n protected remove(item: string): void {\n this.textfield.input?.nativeElement.focus();\n this.history = this.history.filter((v) => v !== item);\n this.storage?.setItem(\n this.options.key,\n JSON.stringify(this.items.filter((v) => v !== item)),\n );\n }\n\n protected select(item: string): void {\n this.control.control?.setValue(item);\n this.textfield.input?.nativeElement.focus();\n }\n\n private get items(): readonly string[] {\n return JSON.parse(this.storage?.getItem(this.options.key) || '[]');\n }\n}\n","@if (history.length) {\n <label class=\"t-sr-label\">\n {{ i18n()?.history }}\n </label>\n}\n@for (item of history; track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (keydown.backspace)=\"remove(item)\"\n (keydown.delete)=\"remove(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <div [tuiAvatar]=\"options.history\"></div>\n <span tuiTitle>{{ item }}</span>\n <button\n appearance=\"icon\"\n size=\"xs\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"options.remove\"\n (click.stop)=\"remove(item)\"\n >\n 🗑️\n </button>\n </button>\n}\n@if (popular.length) {\n <label class=\"t-sr-label\">\n {{ i18n()?.popular }}\n </label>\n}\n@for (item of popular; track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <span [tuiAvatar]=\"options.popular\"></span>\n <span tuiTitle>{{ item }}</span>\n </button>\n}\n","import {Directive, inject} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {WA_NAVIGATOR} from '@ng-web-apis/common';\nimport {TuiInputSearch} from '@taiga-ui/layout/components/input-search';\nimport {TUI_INPUT_SEARCH} from '@taiga-ui/layout/tokens';\nimport {map} from 'rxjs';\n\n@Directive({\n standalone: true,\n selector: 'input[tuiSearchHotkey]',\n host: {\n '[placeholder]': 'placeholder()',\n '(document:keydown.meta.k.stop)': 'search.open()',\n '(document:keydown.alt.k.stop)': 'search.open()',\n },\n})\nexport class TuiSearchHotkey {\n private readonly platform = inject(WA_NAVIGATOR).platform;\n\n protected readonly search = inject(TuiInputSearch);\n protected readonly placeholder = toSignal(\n inject(TUI_INPUT_SEARCH).pipe(\n map(({hotkey}) =>\n this.platform.startsWith('Mac') ? `⌘+K ${hotkey}` : `Alt+K ${hotkey}`,\n ),\n ),\n );\n}\n","import {type KeyValue, KeyValuePipe, NgTemplateOutlet} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n inject,\n Input,\n type OnChanges,\n TemplateRef,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {TuiLet} from '@taiga-ui/cdk/directives/let';\nimport {TuiFilterPipe} from '@taiga-ui/cdk/pipes/filter';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiMoveFocus} from '@taiga-ui/cdk/utils/focus';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\nimport {tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\nimport {TuiLoader} from '@taiga-ui/core/components/loader';\nimport {TuiScrollbar} from '@taiga-ui/core/components/scrollbar';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {TuiTabs} from '@taiga-ui/kit/components/tabs';\nimport {TuiBlockStatus} from '@taiga-ui/layout/components/block-status';\nimport {TUI_INPUT_SEARCH} from '@taiga-ui/layout/tokens';\n\nimport {TUI_SEARCH_RESULTS_OPTIONS} from './search-results.options';\n\n@Component({\n selector: 'tui-search-results',\n imports: [\n KeyValuePipe,\n NgTemplateOutlet,\n TuiBlockStatus,\n TuiFilterPipe,\n TuiIcon,\n TuiLet,\n TuiLoader,\n TuiScrollbar,\n TuiTabs,\n ],\n templateUrl: './search-results.component.html',\n styleUrls: ['./search-results.component.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(keydown.arrowDown.prevent)': 'onArrow($event.target, 1)',\n '(keydown.arrowUp.prevent)': 'onArrow($event.target, -1)',\n },\n})\nexport class TuiSearchResultsComponent<T> implements OnChanges {\n private readonly el = tuiInjectElement();\n\n protected readonly options = inject(TUI_SEARCH_RESULTS_OPTIONS);\n protected readonly i18n = toSignal(inject(TUI_INPUT_SEARCH));\n protected readonly textfield = inject(TuiTextfieldComponent);\n protected active = 0;\n\n @ContentChild(TemplateRef)\n public readonly template?: TemplateRef<TuiContext<T>>;\n\n @Input()\n public results: Record<string, readonly T[]> | null = {};\n\n public ngOnChanges(): void {\n this.active = 0;\n }\n\n @tuiPure\n protected isEmpty(results: Record<string, readonly T[]>): boolean {\n return !Object.values(results).reduce((total, {length}) => length + total, 0);\n }\n\n protected onArrow(current: HTMLElement, step: number): void {\n const elements = Array.from(this.el.querySelectorAll<HTMLElement>('[tuiCell]'));\n\n if (elements[0] === current && step < 0) {\n this.textfield.input?.nativeElement.focus();\n } else {\n tuiMoveFocus(elements.indexOf(current), elements, step);\n }\n }\n\n protected tab(step: number): void {\n const max = Object.values(this.results || {}).filter((v) => v.length).length;\n\n this.active = tuiClamp(this.active + step, 0, max);\n this.textfield.input?.nativeElement.focus();\n }\n\n protected notEmpty({value}: KeyValue<string, readonly T[]>): boolean {\n return !!value.length;\n }\n\n protected asIs(): number {\n return 0;\n }\n}\n","@if (!textfield.value()) {\n <ng-content />\n} @else {\n @if (!results) {\n <tui-loader class=\"t-loader\" />\n } @else {\n @if (results && isEmpty(results)) {\n <tui-block-status\n size=\"m\"\n class=\"t-status\"\n >\n <tui-icon\n tuiSlot=\"top\"\n class=\"t-empty\"\n [icon]=\"options.empty\"\n />\n {{ i18n()?.empty }}\n </tui-block-status>\n } @else {\n <ng-container *tuiLet=\"(results | keyvalue: asIs) || [] as items\">\n <tui-scrollbar class=\"t-scrollbar\">\n @for (group of items | tuiFilter: notEmpty; track group; let index = $index) {\n @if (!active || active === index + 1) {\n @if (!active && items.length > 1) {\n <label class=\"t-sr-label\">\n {{ group.key }}\n </label>\n }\n @for (item of group.value; track item) {\n <ng-container\n [ngTemplateOutlet]=\"template || null\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n }\n }\n }\n </tui-scrollbar>\n @if (items.length > 1) {\n <tui-tabs\n size=\"m\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"active\"\n (document:keydown.shift.tab.prevent)=\"tab(-1)\"\n (document:keydown.tab.prevent)=\"tab(1)\"\n >\n <button tuiTab>{{ i18n()?.all }}</button>\n @for (group of items; track group) {\n @if (group.value.length) {\n <button tuiTab>\n {{ group.key }}\n </button>\n }\n }\n </tui-tabs>\n }\n </ng-container>\n }\n }\n}\n","import {TuiSearchHistory} from './search-history.component';\nimport {TuiSearchHotkey} from './search-hotkey.directive';\nimport {TuiSearchResultsComponent} from './search-results.component';\n\nexport const TuiSearchResults = [\n TuiSearchHotkey,\n TuiSearchHistory,\n TuiSearchResultsComponent,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEa,CAAC,0BAA0B,EAAE,+BAA+B,CAAC,GACtE,gBAAgB,CAAC;AACb,IAAA,GAAG,EAAE,sBAAsB;AAC3B,IAAA,OAAO,EAAE,YAAY;AACrB,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,KAAK,EAAE,aAAa;AACpB,IAAA,MAAM,EAAE,YAAY;AACvB,CAAA;;MCoBQ,gBAAgB,CAAA;AAd7B,IAAA,WAAA,GAAA;AAeqB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACzC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAClC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC;QAEzB,IAAK,CAAA,KAAA,GAAG,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QACxC,IAAI,CAAA,IAAA,GAAG,QAAQ,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AACzC,QAAA,IAAA,CAAA,OAAO,GAAG,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B,OAAA,EAAA;wBACL,YAAY;wBACZ,gBAAgB;wBAChB,cAAc;wBACd,aAAa;wBACb,OAAO;wBACP,MAAM;wBACN,SAAS;wBACT,YAAY;wBACZ,OAAO;qBACV,EAGgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACF,wBAAA,6BAA6B,EAAE,2BAA2B;AAC1D,wBAAA,2BAA2B,EAAE,4BAA4B;AAC5D,qBAAA,EAAA,QAAA,EAAA,g2EAAA,EAAA,MAAA,EAAA,CAAA,03BAAA,CAAA,EAAA;8BAWe,QAAQ,EAAA,CAAA;sBADvB,YAAY;uBAAC,WAAW;gBAIlB,OAAO,EAAA,CAAA;sBADb;gBAQS,OAAO,EAAA,EAAA,EAAA,EAAA,CAAA;;AEhER,MAAA,gBAAgB,GAAG;IAC5B,eAAe;IACf,gBAAgB;IAChB,yBAAyB;;;ACP7B;;AAEG;;;;"}
@@ -1,8 +1,3 @@
1
- export * from '@taiga-ui/experimental/components/accordion';
2
- export * from '@taiga-ui/experimental/components/dialog';
3
- export * from '@taiga-ui/experimental/components/expand';
4
- export * from '@taiga-ui/experimental/components/hint';
5
- export * from '@taiga-ui/experimental/components/input-phone-international';
6
1
  export * from '@taiga-ui/experimental/components/search-results';
7
2
 
8
3
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-experimental-components.mjs","sources":["../../../projects/experimental/components/taiga-ui-experimental-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;;AAEG"}
1
+ {"version":3,"file":"taiga-ui-experimental-components.mjs","sources":["../../../projects/experimental/components/taiga-ui-experimental-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;AAEG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/experimental",
3
- "version": "4.51.0",
3
+ "version": "4.52.0-canary.05c3268",
4
4
  "description": "A package with Taiga UI experimental components",
5
5
  "keywords": [
6
6
  "angular",
@@ -11,13 +11,13 @@
11
11
  "repository": "https://github.com/taiga-family/taiga-ui",
12
12
  "license": "Apache-2.0",
13
13
  "peerDependencies": {
14
- "@angular/common": ">=16.0.0",
15
- "@angular/core": ">=16.0.0",
16
- "@taiga-ui/addon-commerce": "^4.51.0",
17
- "@taiga-ui/cdk": "^4.51.0",
18
- "@taiga-ui/core": "^4.51.0",
19
- "@taiga-ui/kit": "^4.51.0",
20
- "@taiga-ui/layout": "^4.51.0",
14
+ "@angular/common": ">=19.0.0",
15
+ "@angular/core": ">=19.0.0",
16
+ "@taiga-ui/addon-commerce": "^4.52.0",
17
+ "@taiga-ui/cdk": "^4.52.0",
18
+ "@taiga-ui/core": "^4.52.0",
19
+ "@taiga-ui/kit": "^4.52.0",
20
+ "@taiga-ui/layout": "^4.52.0",
21
21
  "@taiga-ui/polymorpheus": "^4.9.0",
22
22
  "rxjs": ">=7.0.0"
23
23
  },
@@ -29,50 +29,14 @@
29
29
  },
30
30
  ".": {
31
31
  "types": "./index.d.ts",
32
- "esm2022": "./esm2022/taiga-ui-experimental.mjs",
33
- "esm": "./esm2022/taiga-ui-experimental.mjs",
34
32
  "default": "./fesm2022/taiga-ui-experimental.mjs"
35
33
  },
36
34
  "./components": {
37
35
  "types": "./components/index.d.ts",
38
- "esm2022": "./esm2022/components/taiga-ui-experimental-components.mjs",
39
- "esm": "./esm2022/components/taiga-ui-experimental-components.mjs",
40
36
  "default": "./fesm2022/taiga-ui-experimental-components.mjs"
41
37
  },
42
- "./components/accordion": {
43
- "types": "./components/accordion/index.d.ts",
44
- "esm2022": "./esm2022/components/accordion/taiga-ui-experimental-components-accordion.mjs",
45
- "esm": "./esm2022/components/accordion/taiga-ui-experimental-components-accordion.mjs",
46
- "default": "./fesm2022/taiga-ui-experimental-components-accordion.mjs"
47
- },
48
- "./components/dialog": {
49
- "types": "./components/dialog/index.d.ts",
50
- "esm2022": "./esm2022/components/dialog/taiga-ui-experimental-components-dialog.mjs",
51
- "esm": "./esm2022/components/dialog/taiga-ui-experimental-components-dialog.mjs",
52
- "default": "./fesm2022/taiga-ui-experimental-components-dialog.mjs"
53
- },
54
- "./components/expand": {
55
- "types": "./components/expand/index.d.ts",
56
- "esm2022": "./esm2022/components/expand/taiga-ui-experimental-components-expand.mjs",
57
- "esm": "./esm2022/components/expand/taiga-ui-experimental-components-expand.mjs",
58
- "default": "./fesm2022/taiga-ui-experimental-components-expand.mjs"
59
- },
60
- "./components/hint": {
61
- "types": "./components/hint/index.d.ts",
62
- "esm2022": "./esm2022/components/hint/taiga-ui-experimental-components-hint.mjs",
63
- "esm": "./esm2022/components/hint/taiga-ui-experimental-components-hint.mjs",
64
- "default": "./fesm2022/taiga-ui-experimental-components-hint.mjs"
65
- },
66
- "./components/input-phone-international": {
67
- "types": "./components/input-phone-international/index.d.ts",
68
- "esm2022": "./esm2022/components/input-phone-international/taiga-ui-experimental-components-input-phone-international.mjs",
69
- "esm": "./esm2022/components/input-phone-international/taiga-ui-experimental-components-input-phone-international.mjs",
70
- "default": "./fesm2022/taiga-ui-experimental-components-input-phone-international.mjs"
71
- },
72
38
  "./components/search-results": {
73
39
  "types": "./components/search-results/index.d.ts",
74
- "esm2022": "./esm2022/components/search-results/taiga-ui-experimental-components-search-results.mjs",
75
- "esm": "./esm2022/components/search-results/taiga-ui-experimental-components-search-results.mjs",
76
40
  "default": "./fesm2022/taiga-ui-experimental-components-search-results.mjs"
77
41
  }
78
42
  },
@@ -1,20 +0,0 @@
1
- import { type AfterViewInit, type QueryList } from '@angular/core';
2
- import { type TuiSizeL, type TuiSizeS } from '@taiga-ui/core/types';
3
- import { TuiExpand } from '@taiga-ui/experimental/components/expand';
4
- import { TuiAccordionDirective } from './accordion.directive';
5
- import * as i0 from "@angular/core";
6
- import * as i1 from "@taiga-ui/core/directives/group";
7
- export declare class TuiAccordionComponent implements AfterViewInit {
8
- private readonly destroyRef;
9
- private readonly toggle$;
10
- readonly expands: QueryList<TuiExpand>;
11
- readonly directives: QueryList<TuiAccordionDirective>;
12
- closeOthers: boolean;
13
- readonly size: import("@angular/core").WritableSignal<"s" | "m" | "l">;
14
- set sizeSetter(size: TuiSizeL | TuiSizeS);
15
- ngAfterViewInit(): void;
16
- toggle(directive: TuiAccordionDirective): void;
17
- private expand;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiAccordionComponent, never>;
19
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiAccordionComponent, "tui-accordion", never, { "closeOthers": { "alias": "closeOthers"; "required": false; }; "sizeSetter": { "alias": "size"; "required": false; }; }, {}, ["expands", "directives"], ["*"], true, [{ directive: typeof i1.TuiGroup; inputs: {}; outputs: {}; }]>;
20
- }
@@ -1,5 +0,0 @@
1
- import { TuiItem } from '@taiga-ui/cdk/directives/item';
2
- import { TuiExpand } from '@taiga-ui/experimental/components/expand';
3
- import { TuiAccordionComponent } from './accordion.component';
4
- import { TuiAccordionDirective } from './accordion.directive';
5
- export declare const TuiAccordion: readonly [typeof TuiAccordionComponent, typeof TuiAccordionDirective, typeof TuiExpand, typeof TuiItem];
@@ -1,15 +0,0 @@
1
- import { EventEmitter, type OnChanges } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@taiga-ui/core/components/button";
4
- import * as i2 from "@taiga-ui/kit/directives/chevron";
5
- export declare class TuiAccordionDirective implements OnChanges {
6
- private readonly accordion;
7
- protected readonly size: import("@angular/core").WritableSignal<"s" | "m" | "l">;
8
- tuiAccordion: boolean | string;
9
- readonly tuiAccordionChange: EventEmitter<boolean>;
10
- readonly open: import("@angular/core").WritableSignal<boolean>;
11
- ngOnChanges(): void;
12
- toggle(): void;
13
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiAccordionDirective, never>;
14
- static ɵdir: i0.ɵɵDirectiveDeclaration<TuiAccordionDirective, "button[tuiAccordion]", never, { "tuiAccordion": { "alias": "tuiAccordion"; "required": false; }; }, { "tuiAccordionChange": "tuiAccordionChange"; }, never, never, true, [{ directive: typeof i1.TuiButton; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiChevron; inputs: {}; outputs: {}; }]>;
15
- }
@@ -1,3 +0,0 @@
1
- export * from './accordion';
2
- export * from './accordion.component';
3
- export * from './accordion.directive';
@@ -1,15 +0,0 @@
1
- import { type TuiPopover } from '@taiga-ui/cdk/services';
2
- import { Subject } from 'rxjs';
3
- import { type TuiDialogOptions } from './dialog.options';
4
- import * as i0 from "@angular/core";
5
- import * as i1 from "@taiga-ui/cdk/directives/animated";
6
- export declare class TuiDialogComponent<O, I> {
7
- protected readonly close$: Subject<void>;
8
- protected readonly close: import("@angular/core").Signal<string | undefined>;
9
- protected readonly icons: import("@taiga-ui/core/tokens").TuiCommonIcons;
10
- protected readonly context: TuiPopover<TuiDialogOptions<I>, O>;
11
- protected readonly sub: import("rxjs").Subscription;
12
- protected get primitive(): boolean;
13
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiDialogComponent<any, any>, never>;
14
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiDialogComponent<any, any>, "tui-dialog", never, {}, {}, never, never, true, [{ directive: typeof i1.TuiAnimated; inputs: {}; outputs: {}; }]>;
15
- }
@@ -1,7 +0,0 @@
1
- import { TuiPopoverDirective } from '@taiga-ui/cdk/directives/popover';
2
- import { type TuiDialogOptions } from './dialog.options';
3
- import * as i0 from "@angular/core";
4
- export declare class TuiDialog<T> extends TuiPopoverDirective<TuiDialogOptions<T>> {
5
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiDialog<any>, never>;
6
- static ɵdir: i0.ɵɵDirectiveDeclaration<TuiDialog<any>, "ng-template[tuiDialog]", never, { "options": { "alias": "tuiDialogOptions"; "required": false; }; "open": { "alias": "tuiDialog"; "required": false; }; }, { "openChange": "tuiDialogChange"; }, never, never, true, never>;
7
- }
@@ -1,27 +0,0 @@
1
- import { type TuiPopoverContext } from '@taiga-ui/cdk/services';
2
- import { type TuiSizeL, type TuiSizeS } from '@taiga-ui/core/types';
3
- import { type Observable } from 'rxjs';
4
- /**
5
- * Options for a dialog
6
- *
7
- * appearance - data-appearance attribute of the dialog ('taiga' by default)
8
- * closable - show close button (true by default)
9
- * data - arbitrary data for dialog
10
- * dismissible - close dialog by Esc button or click on overlay (true by default)
11
- * label - string title for the dialog ('' by default)
12
- * required - dismissing or closing dialog by X button throws (false by default)
13
- * size - size of the dialog ('m' by default)
14
- */
15
- export interface TuiDialogOptions<I> {
16
- readonly appearance: string;
17
- readonly closable: Observable<boolean> | boolean;
18
- readonly data: I extends void ? undefined : I;
19
- readonly dismissible: Observable<boolean> | boolean;
20
- readonly label: string;
21
- readonly required: boolean;
22
- readonly size: TuiSizeL | TuiSizeS;
23
- }
24
- export interface TuiDialogContext<O = void, I = undefined> extends TuiPopoverContext<O>, TuiDialogOptions<I> {
25
- }
26
- export declare const TUI_DIALOG_DEFAULT_OPTIONS: TuiDialogOptions<void>;
27
- export declare const TUI_DIALOG_OPTIONS: import("@angular/core").InjectionToken<TuiDialogOptions<void>>, tuiDialogOptionsProvider: (item: Partial<TuiDialogOptions<void>> | import("@angular/core").ProviderToken<Partial<TuiDialogOptions<void>>>) => import("@angular/core").FactoryProvider;
@@ -1,7 +0,0 @@
1
- import { TuiPopoverService } from '@taiga-ui/cdk/services';
2
- import { type TuiDialogOptions } from './dialog.options';
3
- import * as i0 from "@angular/core";
4
- export declare class TuiDialogService extends TuiPopoverService<TuiDialogOptions<any>> {
5
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiDialogService, never>;
6
- static ɵprov: i0.ɵɵInjectableDeclaration<TuiDialogService>;
7
- }
@@ -1,4 +0,0 @@
1
- export * from './dialog.component';
2
- export * from './dialog.directive';
3
- export * from './dialog.options';
4
- export * from './dialog.service';
@@ -1,13 +0,0 @@
1
- import { TemplateRef } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class TuiExpand {
4
- private readonly el;
5
- private readonly cdr;
6
- protected content?: TemplateRef<any>;
7
- protected readonly signal: import("@angular/core").WritableSignal<boolean>;
8
- protected readonly animating: import("@angular/core").WritableSignal<boolean>;
9
- set expanded(expanded: boolean);
10
- protected onTransitionEnd({ propertyName }: TransitionEvent): void;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiExpand, never>;
12
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiExpand, "tui-expand", never, { "expanded": { "alias": "expanded"; "required": false; }; }, {}, ["content"], ["*"], true, never>;
13
- }
@@ -1 +0,0 @@
1
- export * from './expand.component';
@@ -1,26 +0,0 @@
1
- import { type Provider } from '@angular/core';
2
- import { TuiRectAccessor } from '@taiga-ui/core/classes';
3
- import { type TuiHintDirective, TuiHintPointer } from '@taiga-ui/core/directives/hint';
4
- import * as i0 from "@angular/core";
5
- import * as i1 from "@taiga-ui/core/directives/appearance";
6
- import * as i2 from "@taiga-ui/cdk/directives/animated";
7
- export declare class TuiHintComponent<C = any> {
8
- private readonly el;
9
- private readonly hover;
10
- private readonly vvs;
11
- private readonly viewport;
12
- protected readonly pointer: TuiHintPointer | null;
13
- protected readonly accessor: TuiRectAccessor;
14
- protected readonly hint: TuiHintDirective<C>;
15
- protected readonly isMobile: boolean;
16
- protected readonly content: import("@angular/core").WritableSignal<import("@taiga-ui/polymorpheus").PolymorpheusContent<C>>;
17
- protected readonly theme: string | null | undefined;
18
- protected readonly appearance: import("@angular/core").WritableSignal<string>;
19
- constructor();
20
- protected onClick(target: HTMLElement): void;
21
- private apply;
22
- private update;
23
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiHintComponent<any>, never>;
24
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiHintComponent<any>, "tui-hint", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.TuiAppearance; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiAnimated; inputs: {}; outputs: {}; }]>;
25
- }
26
- export declare function tuiProvideExperimentalHint(): Provider;
@@ -1 +0,0 @@
1
- export * from './hint.component';
@@ -1 +0,0 @@
1
- export * from './input-phone-international.component';