@taiga-ui/kit 4.38.0 → 4.39.0-canary.ad6c629

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 (122) hide show
  1. package/components/action-bar/action-bar.component.d.ts +2 -2
  2. package/components/badge-notification/badge-notification.component.d.ts +2 -2
  3. package/components/carousel/carousel.directive.d.ts +1 -0
  4. package/components/combo-box/combo-box.directive.d.ts +27 -0
  5. package/components/combo-box/index.d.ts +1 -0
  6. package/components/drawer/drawer.component.d.ts +3 -6
  7. package/components/files/input-files/input-files-validator.directive.d.ts +4 -5
  8. package/components/index.d.ts +2 -0
  9. package/components/input-date/index.d.ts +5 -0
  10. package/components/input-date/input-date.component.d.ts +9 -0
  11. package/components/input-date/input-date.d.ts +5 -0
  12. package/components/input-date/input-date.directive.d.ts +34 -0
  13. package/components/input-date/input-date.options.d.ts +17 -0
  14. package/components/input-date/input-date.validator.d.ts +10 -0
  15. package/components/input-month/index.d.ts +1 -1
  16. package/components/input-month/{native-month-picker/native-month-picker.component.d.ts → input-month.component.d.ts} +4 -5
  17. package/components/input-month/input-month.d.ts +2 -2
  18. package/components/input-month/input-month.directive.d.ts +3 -3
  19. package/components/input-month/input-month.options.d.ts +7 -13
  20. package/components/input-month-range/index.d.ts +1 -0
  21. package/components/input-month-range/input-month-range.options.d.ts +11 -0
  22. package/components/line-clamp/line-clamp-box.component.d.ts +2 -1
  23. package/components/pdf-viewer/pdf-viewer.component.d.ts +2 -2
  24. package/components/preview/preview-dialog/preview-dialog.component.d.ts +2 -8
  25. package/components/pulse/pulse.component.d.ts +2 -2
  26. package/components/push/push-alert.component.d.ts +2 -2
  27. package/components/select/select.directive.d.ts +1 -1
  28. package/directives/unfinished-validator/unfinished-validator.directive.d.ts +3 -1
  29. package/esm2022/components/action-bar/action-bar.component.mjs +8 -12
  30. package/esm2022/components/badge-notification/badge-notification.component.mjs +6 -9
  31. package/esm2022/components/calendar-month/calendar-month.component.mjs +2 -2
  32. package/esm2022/components/carousel/carousel.directive.mjs +5 -4
  33. package/esm2022/components/combo-box/combo-box.directive.mjs +113 -0
  34. package/esm2022/components/combo-box/index.mjs +2 -0
  35. package/esm2022/components/combo-box/taiga-ui-kit-components-combo-box.mjs +5 -0
  36. package/esm2022/components/drawer/drawer.component.mjs +13 -16
  37. package/esm2022/components/files/input-files/input-files-validator.directive.mjs +16 -19
  38. package/esm2022/components/index.mjs +3 -1
  39. package/esm2022/components/input-date/index.mjs +6 -0
  40. package/esm2022/components/input-date/input-date.component.mjs +33 -0
  41. package/esm2022/components/input-date/input-date.directive.mjs +137 -0
  42. package/esm2022/components/input-date/input-date.mjs +11 -0
  43. package/esm2022/components/input-date/input-date.options.mjs +11 -0
  44. package/esm2022/components/input-date/input-date.validator.mjs +31 -0
  45. package/esm2022/components/input-date/taiga-ui-kit-components-input-date.mjs +5 -0
  46. package/esm2022/components/input-month/index.mjs +2 -2
  47. package/esm2022/components/input-month/input-month.component.mjs +53 -0
  48. package/esm2022/components/input-month/input-month.directive.mjs +17 -10
  49. package/esm2022/components/input-month/input-month.mjs +3 -3
  50. package/esm2022/components/input-month/input-month.options.mjs +12 -12
  51. package/esm2022/components/input-month-range/index.mjs +2 -1
  52. package/esm2022/components/input-month-range/input-month-range.directive.mjs +13 -6
  53. package/esm2022/components/input-month-range/input-month-range.options.mjs +11 -0
  54. package/esm2022/components/input-number/input-number.directive.mjs +3 -7
  55. package/esm2022/components/line-clamp/line-clamp-box.component.mjs +7 -6
  56. package/esm2022/components/pdf-viewer/pdf-viewer.component.mjs +8 -11
  57. package/esm2022/components/preview/preview-dialog/preview-dialog.component.mjs +10 -20
  58. package/esm2022/components/preview/preview.component.mjs +3 -4
  59. package/esm2022/components/pulse/pulse.component.mjs +6 -10
  60. package/esm2022/components/push/push-alert.component.mjs +8 -21
  61. package/esm2022/components/push/push.component.mjs +2 -2
  62. package/esm2022/components/select/select.directive.mjs +3 -2
  63. package/esm2022/components/slider/slider.component.mjs +2 -2
  64. package/esm2022/directives/chevron/chevron.directive.mjs +2 -2
  65. package/esm2022/directives/unfinished-validator/unfinished-validator.directive.mjs +10 -4
  66. package/esm2022/directives/unfinished-validator/unfinished.validator.mjs +2 -2
  67. package/esm2022/pipes/filter-by-input/filter-by-input.pipe.mjs +7 -2
  68. package/esm2022/tokens/calendar-date-stream.mjs +2 -1
  69. package/esm2022/tokens/date-inputs-value-transformers.mjs +3 -3
  70. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +7 -11
  71. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  72. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +5 -8
  73. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  74. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +1 -1
  75. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  76. package/fesm2022/taiga-ui-kit-components-carousel.mjs +4 -3
  77. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  78. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +119 -0
  79. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -0
  80. package/fesm2022/taiga-ui-kit-components-drawer.mjs +12 -15
  81. package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
  82. package/fesm2022/taiga-ui-kit-components-files.mjs +16 -20
  83. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  84. package/fesm2022/taiga-ui-kit-components-input-date.mjs +208 -0
  85. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -0
  86. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +21 -6
  87. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  88. package/fesm2022/taiga-ui-kit-components-input-month.mjs +44 -41
  89. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  90. package/fesm2022/taiga-ui-kit-components-input-number.mjs +2 -6
  91. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  92. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +8 -7
  93. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  94. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs +7 -10
  95. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs.map +1 -1
  96. package/fesm2022/taiga-ui-kit-components-preview-preview-dialog.mjs +9 -19
  97. package/fesm2022/taiga-ui-kit-components-preview-preview-dialog.mjs.map +1 -1
  98. package/fesm2022/taiga-ui-kit-components-preview.mjs +10 -20
  99. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  100. package/fesm2022/taiga-ui-kit-components-pulse.mjs +5 -9
  101. package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
  102. package/fesm2022/taiga-ui-kit-components-push.mjs +8 -20
  103. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  104. package/fesm2022/taiga-ui-kit-components-select.mjs +2 -2
  105. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  106. package/fesm2022/taiga-ui-kit-components-slider.mjs +1 -1
  107. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
  108. package/fesm2022/taiga-ui-kit-components.mjs +2 -0
  109. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  110. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +2 -2
  111. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  112. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +10 -4
  113. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
  114. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +6 -1
  115. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  116. package/fesm2022/taiga-ui-kit-tokens.mjs +3 -2
  117. package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
  118. package/package.json +22 -10
  119. package/pipes/filter-by-input/filter-by-input.pipe.d.ts +1 -0
  120. package/tokens/calendar-date-stream.d.ts +1 -0
  121. package/tokens/i18n.d.ts +1 -0
  122. package/esm2022/components/input-month/native-month-picker/native-month-picker.component.mjs +0 -55
@@ -0,0 +1,119 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, effect, untracked, Directive, Input } from '@angular/core';
3
+ import { TuiControl, tuiAsControl } from '@taiga-ui/cdk/classes';
4
+ import { TUI_ALLOW_SIGNAL_WRITES, TUI_STRICT_MATCHER } from '@taiga-ui/cdk/constants';
5
+ import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
6
+ import { tuiIsString } from '@taiga-ui/cdk/utils/miscellaneous';
7
+ import { tuiAsOptionContent } from '@taiga-ui/core/components/data-list';
8
+ import * as i1 from '@taiga-ui/core/components/textfield';
9
+ import { TuiTextfieldComponent, TuiTextfieldDirective, tuiInjectAuxiliary, tuiAsTextfieldAccessor, TuiWithTextfield } from '@taiga-ui/core/components/textfield';
10
+ import { tuiDropdownOpen, TuiDropdownDirective, tuiDropdownEnabled } from '@taiga-ui/core/directives/dropdown';
11
+ import { TUI_ITEMS_HANDLERS } from '@taiga-ui/core/directives/items-handlers';
12
+ import { tuiAsAuxiliary } from '@taiga-ui/core/tokens';
13
+ import { TuiSelectOption } from '@taiga-ui/kit/components/select';
14
+
15
+ class TuiComboBox extends TuiControl {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.el = tuiInjectElement();
19
+ this.host = inject(TuiTextfieldComponent);
20
+ this.textfield = inject(TuiTextfieldDirective);
21
+ this.open = tuiDropdownOpen();
22
+ this.dropdown = inject(TuiDropdownDirective);
23
+ this.itemsHandlers = inject(TUI_ITEMS_HANDLERS);
24
+ this.datalist = tuiInjectAuxiliary((x) => 'getOptions' in x);
25
+ this.dropdownEnabled = tuiDropdownEnabled(this.interactive);
26
+ this.valueEffect = effect(() => {
27
+ const value = this.value() ?? '';
28
+ const stringified = tuiIsString(value)
29
+ ? value
30
+ : this.itemsHandlers.stringify()(value);
31
+ const match = this.match(stringified);
32
+ this.textfield.value.update((x) => stringified || x);
33
+ if (match) {
34
+ setTimeout((end = this.el.value.length) => this.el.setSelectionRange(end, end));
35
+ }
36
+ }, TUI_ALLOW_SIGNAL_WRITES);
37
+ this.blurEffect = effect(() => {
38
+ const value = untracked(() => this.value());
39
+ if (!this.host.focused() && this.strict && !value) {
40
+ this.textfield.value.set('');
41
+ }
42
+ }, TUI_ALLOW_SIGNAL_WRITES);
43
+ this.strict = true;
44
+ this.matcher = TUI_STRICT_MATCHER;
45
+ }
46
+ setValue(value) {
47
+ this.onChange(value);
48
+ if (!value) {
49
+ this.toggleDropdown(true);
50
+ this.textfield.value.set('');
51
+ }
52
+ }
53
+ toggleDropdown(open = !this.open()) {
54
+ if (this.dropdownEnabled() && this.dropdown.content) {
55
+ this.open.set(open);
56
+ }
57
+ }
58
+ onInput(value) {
59
+ const match = this.match(value);
60
+ const fallback = this.strict || !value ? null : value;
61
+ this.onChange(match ?? fallback);
62
+ setTimeout(() => this.toggleDropdown(true));
63
+ }
64
+ keydownEnter(event) {
65
+ if (!this.open()) {
66
+ return;
67
+ }
68
+ event.preventDefault();
69
+ if (this.options.length === 1) {
70
+ this.onChange(this.options[0]);
71
+ this.toggleDropdown(false);
72
+ }
73
+ }
74
+ get options() {
75
+ return this.datalist()?.getOptions() || [];
76
+ }
77
+ match(value) {
78
+ return (this.options.find((item) => this.matcher?.(item, value, this.itemsHandlers.stringify())) ?? null);
79
+ }
80
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiComboBox, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
81
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiComboBox, isStandalone: true, selector: "input[tuiComboBox]", inputs: { strict: "strict", matcher: "matcher" }, host: { listeners: { "blur": "onTouched()", "click": "toggleDropdown()", "input": "onInput($event.target.value)", "keydown.enter": "keydownEnter($event)" }, properties: { "disabled": "disabled()" } }, providers: [
82
+ tuiAsOptionContent(TuiSelectOption),
83
+ tuiAsTextfieldAccessor(TuiComboBox),
84
+ tuiAsControl(TuiComboBox),
85
+ tuiAsAuxiliary(TuiComboBox),
86
+ ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithTextfield }], ngImport: i0 }); }
87
+ }
88
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiComboBox, decorators: [{
89
+ type: Directive,
90
+ args: [{
91
+ standalone: true,
92
+ selector: 'input[tuiComboBox]',
93
+ providers: [
94
+ tuiAsOptionContent(TuiSelectOption),
95
+ tuiAsTextfieldAccessor(TuiComboBox),
96
+ tuiAsControl(TuiComboBox),
97
+ tuiAsAuxiliary(TuiComboBox),
98
+ ],
99
+ hostDirectives: [TuiWithTextfield],
100
+ host: {
101
+ '[disabled]': 'disabled()',
102
+ '(blur)': 'onTouched()',
103
+ '(click)': 'toggleDropdown()',
104
+ '(input)': 'onInput($event.target.value)',
105
+ '(keydown.enter)': 'keydownEnter($event)',
106
+ },
107
+ }]
108
+ }], propDecorators: { strict: [{
109
+ type: Input
110
+ }], matcher: [{
111
+ type: Input
112
+ }] } });
113
+
114
+ /**
115
+ * Generated bundle index. Do not edit.
116
+ */
117
+
118
+ export { TuiComboBox };
119
+ //# sourceMappingURL=taiga-ui-kit-components-combo-box.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-kit-components-combo-box.mjs","sources":["../../../projects/kit/components/combo-box/combo-box.directive.ts","../../../projects/kit/components/combo-box/taiga-ui-kit-components-combo-box.ts"],"sourcesContent":["import {Directive, effect, inject, Input, untracked} from '@angular/core';\nimport {tuiAsControl, TuiControl} from '@taiga-ui/cdk/classes';\nimport {TUI_ALLOW_SIGNAL_WRITES, TUI_STRICT_MATCHER} from '@taiga-ui/cdk/constants';\nimport type {TuiStringMatcher} from '@taiga-ui/cdk/types';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport type {TuiDataListAccessor} from '@taiga-ui/core/components/data-list';\nimport {tuiAsOptionContent} from '@taiga-ui/core/components/data-list';\nimport type {TuiTextfieldAccessor} from '@taiga-ui/core/components/textfield';\nimport {\n tuiAsTextfieldAccessor,\n tuiInjectAuxiliary,\n TuiTextfieldComponent,\n TuiTextfieldDirective,\n TuiWithTextfield,\n} from '@taiga-ui/core/components/textfield';\nimport {\n TuiDropdownDirective,\n tuiDropdownEnabled,\n tuiDropdownOpen,\n} from '@taiga-ui/core/directives/dropdown';\nimport type {TuiItemsHandlers} from '@taiga-ui/core/directives/items-handlers';\nimport {TUI_ITEMS_HANDLERS} from '@taiga-ui/core/directives/items-handlers';\nimport {tuiAsAuxiliary} from '@taiga-ui/core/tokens';\nimport {TuiSelectOption} from '@taiga-ui/kit/components/select';\n\n@Directive({\n standalone: true,\n selector: 'input[tuiComboBox]',\n providers: [\n tuiAsOptionContent(TuiSelectOption),\n tuiAsTextfieldAccessor(TuiComboBox),\n tuiAsControl(TuiComboBox),\n tuiAsAuxiliary(TuiComboBox),\n ],\n hostDirectives: [TuiWithTextfield],\n host: {\n '[disabled]': 'disabled()',\n '(blur)': 'onTouched()',\n '(click)': 'toggleDropdown()',\n '(input)': 'onInput($event.target.value)',\n '(keydown.enter)': 'keydownEnter($event)',\n },\n})\nexport class TuiComboBox<T>\n extends TuiControl<T | string | null>\n implements TuiTextfieldAccessor<T>\n{\n private readonly el = tuiInjectElement<HTMLInputElement>();\n private readonly host: TuiTextfieldComponent<T> = inject(TuiTextfieldComponent);\n private readonly textfield: TuiTextfieldDirective<T> = inject(TuiTextfieldDirective);\n\n private readonly open = tuiDropdownOpen();\n private readonly dropdown = inject(TuiDropdownDirective);\n private readonly itemsHandlers: TuiItemsHandlers<T> = inject(TUI_ITEMS_HANDLERS);\n private readonly datalist = tuiInjectAuxiliary<TuiDataListAccessor<T>>(\n (x) => 'getOptions' in x,\n );\n\n protected readonly dropdownEnabled = tuiDropdownEnabled(this.interactive);\n\n protected readonly valueEffect = effect(() => {\n const value = this.value() ?? '';\n const stringified = tuiIsString(value)\n ? value\n : this.itemsHandlers.stringify()(value);\n const match = this.match(stringified);\n\n this.textfield.value.update((x) => stringified || x);\n\n if (match) {\n setTimeout((end = this.el.value.length) =>\n this.el.setSelectionRange(end, end),\n );\n }\n }, TUI_ALLOW_SIGNAL_WRITES);\n\n protected readonly blurEffect = effect(() => {\n const value = untracked(() => this.value());\n\n if (!this.host.focused() && this.strict && !value) {\n this.textfield.value.set('');\n }\n }, TUI_ALLOW_SIGNAL_WRITES);\n\n @Input()\n public strict = true;\n\n @Input()\n public matcher: TuiStringMatcher<T> | null = TUI_STRICT_MATCHER;\n\n public setValue(value: T): void {\n this.onChange(value);\n\n if (!value) {\n this.toggleDropdown(true);\n this.textfield.value.set('');\n }\n }\n\n protected toggleDropdown(open = !this.open()): void {\n if (this.dropdownEnabled() && this.dropdown.content) {\n this.open.set(open);\n }\n }\n\n protected onInput(value: string): void {\n const match = this.match(value);\n const fallback = this.strict || !value ? null : value;\n\n this.onChange(match ?? fallback);\n setTimeout(() => this.toggleDropdown(true));\n }\n\n protected keydownEnter(event: KeyboardEvent): void {\n if (!this.open()) {\n return;\n }\n\n event.preventDefault();\n\n if (this.options.length === 1) {\n this.onChange(this.options[0]!);\n this.toggleDropdown(false);\n }\n }\n\n private get options(): readonly T[] {\n return this.datalist()?.getOptions() || [];\n }\n\n private match(value: string): T | null {\n return (\n this.options.find((item) =>\n this.matcher?.(item, value, this.itemsHandlers.stringify()),\n ) ?? null\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AA0BA,MAkBa,WACT,SAAQ,UAA6B,CAAA;AAnBzC,IAAA,WAAA,GAAA;;QAsBqB,IAAE,CAAA,EAAA,GAAG,g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AAA,EAAA,8BAAA,EAAA,eAAA,EAAA,sBAAA,EAAA,EAAA,UAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,EAAA,SAAA,EAAA;YACP,kBAAkB,CAAC,eAAe,CAAC;YACnC,sBAAsB,CAAC,WAAW,CAAC;YACnC,YAAY,CAAC,WAAW,CAAC;YACzB,cAAc,CAAC,WAAW,CAAC;AAC9B,SAAA,EAAA,eAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAUQ,WAAW,EAAA,UAAA,EAAA,CAAA;kBAlBvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,SAAS,EAAE;wBACP,kBAAkB,CAAC,eAAe,CAAC;AACnC,wBAAA,sBAAsB,CAAa,WAAA,CAAA;AACnC,wBAAA,YAAY,CAAa,WAAA,CAAA;AACzB,wBAAA,cAAc,CAAa,WAAA,CAAA;AAC9B,qBAAA;oBACD,cAAc,EAAE,CAAC,gBAAgB,CAAC;AAClC,oBAAA,IAAI,EAAE;AACF,wBAAA,YAAY,EAAE,YAAY;AAC1B,wBAAA,QAAQ,EAAE,aAAa;AACvB,wBAAA,SAAS,EAAE,kBAAkB;AAC7B,wBAAA,SAAS,EAAE,8BAA8B;AACzC,wBAAA,iBAAiB,EAAE,sBAAsB;AAC5C,qBAAA;AACJ,iBAAA,CAAA;8BA2CU,MAAM,EAAA,CAAA;sBADZ,KAAK;gBAIC,OAAO,EAAA,CAAA;sBADb,KAAK;;;ACxFV;;AAEG;;;;"}
@@ -1,44 +1,41 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, Component, ChangeDetectionStrategy, Input } from '@angular/core';
3
- import { tuiSlideIn, tuiFadeIn } from '@taiga-ui/core/animations';
4
- import { tuiButtonOptionsProvider, TuiButton } from '@taiga-ui/core/components/button';
2
+ import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
3
+ import * as i1 from '@taiga-ui/cdk/directives/animated';
4
+ import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
5
+ import { tuiButtonOptionsProvider } from '@taiga-ui/core/components/button';
5
6
  import { TuiScrollbar } from '@taiga-ui/core/components/scrollbar';
6
- import { TUI_ANIMATIONS_SPEED } from '@taiga-ui/core/tokens';
7
- import { tuiToAnimationOptions } from '@taiga-ui/core/utils/miscellaneous';
8
7
 
9
8
  class TuiDrawer {
10
9
  constructor() {
11
- this.options = tuiToAnimationOptions(inject(TUI_ANIMATIONS_SPEED));
12
10
  this.direction = 'right';
13
11
  this.overlay = false;
14
12
  }
15
- get animation() {
16
- return { ...this.options, value: this.direction };
13
+ get from() {
14
+ return this.direction === 'right' ? 'translateX(100%)' : 'translateX(-100%)';
17
15
  }
18
16
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
19
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDrawer, isStandalone: true, selector: "tui-drawer", inputs: { direction: "direction", overlay: "overlay" }, host: { properties: { "@tuiFadeIn": "options", "@tuiSlideIn": "animation", "class._overlay": "overlay", "style.border-top-left-radius": "direction === \"left\" ? 0 : null", "style.border-top-right-radius": "direction === \"right\" ? 0 : null", "style.left": "direction === \"left\" ? 0 : null", "style.right": "direction === \"right\" ? 0 : null" } }, providers: [
17
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDrawer, isStandalone: true, selector: "tui-drawer", inputs: { direction: "direction", overlay: "overlay" }, host: { properties: { "class._overlay": "overlay", "style.border-top-left-radius": "direction === \"left\" ? 0 : null", "style.border-top-right-radius": "direction === \"right\" ? 0 : null", "style.left": "direction === \"left\" ? 0 : null", "style.right": "direction === \"right\" ? 0 : null", "style.--tui-from": "from" } }, providers: [
20
18
  tuiButtonOptionsProvider({
21
19
  appearance: 'secondary',
22
20
  size: 's',
23
21
  }),
24
- ], ngImport: i0, template: "<aside class=\"t-aside\">\n <tui-scrollbar class=\"t-scrollbar\">\n <ng-content select=\"header\" />\n <div class=\"t-content\"><ng-content /></div>\n </tui-scrollbar>\n <tui-scrollbar\n class=\"t-footer\"\n [hidden]=\"true\"\n >\n <ng-content select=\"footer\" />\n </tui-scrollbar>\n</aside>\n", styles: [":host{position:fixed;top:3rem;bottom:0;inline-size:36.25rem;max-inline-size:calc(100vw - 3rem);background:var(--tui-background-elevation-1);box-shadow:var(--tui-shadow-medium);border-top-left-radius:1.25rem;border-top-right-radius:1.25rem}:host._overlay:before{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:fixed;top:-100vh;left:-100vw;right:-100vw;bottom:-100vh;background:var(--tui-service-backdrop);transition-timing-function:ease-out}tui-root:has(tui-dialogs .t-overlay_visible) :host._overlay:before{opacity:0;transition-timing-function:ease-in}.t-aside{position:relative;display:flex;block-size:100%;flex-direction:column;border-radius:inherit;overflow:hidden;background:inherit}.t-scrollbar{flex:1;overscroll-behavior:contain}.t-scrollbar ::ng-deep>.t-content>header{top:0;z-index:1;display:flex;flex-direction:column;gap:.75rem;padding:1.5rem 1.5rem .75rem;box-shadow:inset 0 -1px var(--tui-border-normal);background:var(--tui-background-elevation-1)}.t-scrollbar ::ng-deep>.t-content>header>*{display:flex;gap:.5rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiTitle]{font:var(--tui-font-text-xl);font-weight:700}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiSubtitle]{color:var(--tui-text-primary);font:var(--tui-font-text-s)}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories]{gap:.5rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories] [tuiIconButton][data-appearance=icon]:last-child{margin-inline-start:.25rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories] [tuiIconButton][data-appearance=icon]:last-child:before{font-size:1rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiNavigationNav]{min-block-size:var(--tui-height-m);margin-block-end:-.75rem;padding:0;border-image:none}.t-content{padding:1.25rem 1.5rem}.t-footer ::ng-deep footer{scrollbar-width:none;-ms-overflow-style:none;display:flex;min-inline-size:-webkit-min-content;min-inline-size:min-content;justify-content:flex-end;gap:.75rem;padding:.5rem 1.5rem;box-shadow:inset 0 1px var(--tui-border-normal);background:var(--tui-background-elevation-1)}.t-footer ::ng-deep footer::-webkit-scrollbar,.t-footer ::ng-deep footer::-webkit-scrollbar-thumb{display:none}\n"], dependencies: [{ kind: "component", type: TuiScrollbar, selector: "tui-scrollbar", inputs: ["hidden"] }], animations: [tuiSlideIn, tuiFadeIn], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
22
+ ], hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: "<aside class=\"t-aside\">\n <tui-scrollbar class=\"t-scrollbar\">\n <ng-content select=\"header\" />\n <div class=\"t-content\"><ng-content /></div>\n </tui-scrollbar>\n <tui-scrollbar\n class=\"t-footer\"\n [hidden]=\"true\"\n >\n <ng-content select=\"footer\" />\n </tui-scrollbar>\n</aside>\n", styles: [":host{position:fixed;top:3rem;bottom:0;inline-size:36.25rem;max-inline-size:calc(100vw - 3rem);background:var(--tui-background-elevation-1);box-shadow:var(--tui-shadow-medium);border-top-left-radius:1.25rem;border-top-right-radius:1.25rem}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host._overlay:before{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:fixed;top:-100vh;left:-100vw;right:-100vw;bottom:-100vh;background:var(--tui-service-backdrop);transition-timing-function:ease-out}tui-root:has(tui-dialogs .t-overlay_visible) :host._overlay:before{opacity:0;transition-timing-function:ease-in}.t-aside{position:relative;display:flex;block-size:100%;flex-direction:column;border-radius:inherit;overflow:hidden;background:inherit}.t-scrollbar{flex:1;overscroll-behavior:contain}.t-scrollbar ::ng-deep>.t-content>header{top:0;z-index:1;display:flex;flex-direction:column;gap:.75rem;padding:1.5rem 1.5rem .75rem;box-shadow:inset 0 -1px var(--tui-border-normal);background:var(--tui-background-elevation-1)}.t-scrollbar ::ng-deep>.t-content>header>*{display:flex;gap:.5rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiTitle]{font:var(--tui-font-text-xl);font-weight:700}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiSubtitle]{color:var(--tui-text-primary);font:var(--tui-font-text-s)}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories]{gap:.5rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories] [tuiIconButton][data-appearance=icon]:last-child{margin-inline-start:.25rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories] [tuiIconButton][data-appearance=icon]:last-child:before{font-size:1rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiNavigationNav]{min-block-size:var(--tui-height-m);margin-block-end:-.75rem;padding:0;border-image:none}.t-content{padding:1.25rem 1.5rem}.t-footer ::ng-deep footer{scrollbar-width:none;-ms-overflow-style:none;display:flex;min-inline-size:-webkit-min-content;min-inline-size:min-content;justify-content:flex-end;gap:.75rem;padding:.5rem 1.5rem;box-shadow:inset 0 1px var(--tui-border-normal);background:var(--tui-background-elevation-1)}.t-footer ::ng-deep footer::-webkit-scrollbar,.t-footer ::ng-deep footer::-webkit-scrollbar-thumb{display:none}\n"], dependencies: [{ kind: "component", type: TuiScrollbar, selector: "tui-scrollbar", inputs: ["hidden"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
25
23
  }
26
24
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDrawer, decorators: [{
27
25
  type: Component,
28
- args: [{ standalone: true, selector: 'tui-drawer', imports: [TuiButton, TuiScrollbar], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
26
+ args: [{ standalone: true, selector: 'tui-drawer', imports: [TuiScrollbar], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
29
27
  tuiButtonOptionsProvider({
30
28
  appearance: 'secondary',
31
29
  size: 's',
32
30
  }),
33
- ], animations: [tuiSlideIn, tuiFadeIn], host: {
34
- '[@tuiFadeIn]': 'options',
35
- '[@tuiSlideIn]': 'animation',
31
+ ], hostDirectives: [TuiAnimated], host: {
36
32
  '[class._overlay]': 'overlay',
37
33
  '[style.border-top-left-radius]': 'direction === "left" ? 0 : null',
38
34
  '[style.border-top-right-radius]': 'direction === "right" ? 0 : null',
39
35
  '[style.left]': 'direction === "left" ? 0 : null',
40
36
  '[style.right]': 'direction === "right" ? 0 : null',
41
- }, template: "<aside class=\"t-aside\">\n <tui-scrollbar class=\"t-scrollbar\">\n <ng-content select=\"header\" />\n <div class=\"t-content\"><ng-content /></div>\n </tui-scrollbar>\n <tui-scrollbar\n class=\"t-footer\"\n [hidden]=\"true\"\n >\n <ng-content select=\"footer\" />\n </tui-scrollbar>\n</aside>\n", styles: [":host{position:fixed;top:3rem;bottom:0;inline-size:36.25rem;max-inline-size:calc(100vw - 3rem);background:var(--tui-background-elevation-1);box-shadow:var(--tui-shadow-medium);border-top-left-radius:1.25rem;border-top-right-radius:1.25rem}:host._overlay:before{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:fixed;top:-100vh;left:-100vw;right:-100vw;bottom:-100vh;background:var(--tui-service-backdrop);transition-timing-function:ease-out}tui-root:has(tui-dialogs .t-overlay_visible) :host._overlay:before{opacity:0;transition-timing-function:ease-in}.t-aside{position:relative;display:flex;block-size:100%;flex-direction:column;border-radius:inherit;overflow:hidden;background:inherit}.t-scrollbar{flex:1;overscroll-behavior:contain}.t-scrollbar ::ng-deep>.t-content>header{top:0;z-index:1;display:flex;flex-direction:column;gap:.75rem;padding:1.5rem 1.5rem .75rem;box-shadow:inset 0 -1px var(--tui-border-normal);background:var(--tui-background-elevation-1)}.t-scrollbar ::ng-deep>.t-content>header>*{display:flex;gap:.5rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiTitle]{font:var(--tui-font-text-xl);font-weight:700}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiSubtitle]{color:var(--tui-text-primary);font:var(--tui-font-text-s)}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories]{gap:.5rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories] [tuiIconButton][data-appearance=icon]:last-child{margin-inline-start:.25rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories] [tuiIconButton][data-appearance=icon]:last-child:before{font-size:1rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiNavigationNav]{min-block-size:var(--tui-height-m);margin-block-end:-.75rem;padding:0;border-image:none}.t-content{padding:1.25rem 1.5rem}.t-footer ::ng-deep footer{scrollbar-width:none;-ms-overflow-style:none;display:flex;min-inline-size:-webkit-min-content;min-inline-size:min-content;justify-content:flex-end;gap:.75rem;padding:.5rem 1.5rem;box-shadow:inset 0 1px var(--tui-border-normal);background:var(--tui-background-elevation-1)}.t-footer ::ng-deep footer::-webkit-scrollbar,.t-footer ::ng-deep footer::-webkit-scrollbar-thumb{display:none}\n"] }]
37
+ '[style.--tui-from]': 'from',
38
+ }, template: "<aside class=\"t-aside\">\n <tui-scrollbar class=\"t-scrollbar\">\n <ng-content select=\"header\" />\n <div class=\"t-content\"><ng-content /></div>\n </tui-scrollbar>\n <tui-scrollbar\n class=\"t-footer\"\n [hidden]=\"true\"\n >\n <ng-content select=\"footer\" />\n </tui-scrollbar>\n</aside>\n", styles: [":host{position:fixed;top:3rem;bottom:0;inline-size:36.25rem;max-inline-size:calc(100vw - 3rem);background:var(--tui-background-elevation-1);box-shadow:var(--tui-shadow-medium);border-top-left-radius:1.25rem;border-top-right-radius:1.25rem}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host._overlay:before{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:fixed;top:-100vh;left:-100vw;right:-100vw;bottom:-100vh;background:var(--tui-service-backdrop);transition-timing-function:ease-out}tui-root:has(tui-dialogs .t-overlay_visible) :host._overlay:before{opacity:0;transition-timing-function:ease-in}.t-aside{position:relative;display:flex;block-size:100%;flex-direction:column;border-radius:inherit;overflow:hidden;background:inherit}.t-scrollbar{flex:1;overscroll-behavior:contain}.t-scrollbar ::ng-deep>.t-content>header{top:0;z-index:1;display:flex;flex-direction:column;gap:.75rem;padding:1.5rem 1.5rem .75rem;box-shadow:inset 0 -1px var(--tui-border-normal);background:var(--tui-background-elevation-1)}.t-scrollbar ::ng-deep>.t-content>header>*{display:flex;gap:.5rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiTitle]{font:var(--tui-font-text-xl);font-weight:700}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiSubtitle]{color:var(--tui-text-primary);font:var(--tui-font-text-s)}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories]{gap:.5rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories] [tuiIconButton][data-appearance=icon]:last-child{margin-inline-start:.25rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories] [tuiIconButton][data-appearance=icon]:last-child:before{font-size:1rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiNavigationNav]{min-block-size:var(--tui-height-m);margin-block-end:-.75rem;padding:0;border-image:none}.t-content{padding:1.25rem 1.5rem}.t-footer ::ng-deep footer{scrollbar-width:none;-ms-overflow-style:none;display:flex;min-inline-size:-webkit-min-content;min-inline-size:min-content;justify-content:flex-end;gap:.75rem;padding:.5rem 1.5rem;box-shadow:inset 0 1px var(--tui-border-normal);background:var(--tui-background-elevation-1)}.t-footer ::ng-deep footer::-webkit-scrollbar,.t-footer ::ng-deep footer::-webkit-scrollbar-thumb{display:none}\n"] }]
42
39
  }], propDecorators: { direction: [{
43
40
  type: Input
44
41
  }], overlay: [{
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-drawer.mjs","sources":["../../../projects/kit/components/drawer/drawer.component.ts","../../../projects/kit/components/drawer/drawer.template.html","../../../projects/kit/components/drawer/taiga-ui-kit-components-drawer.ts"],"sourcesContent":["import type {AnimationOptions} from '@angular/animations';\nimport {ChangeDetectionStrategy, Component, inject, Input} from '@angular/core';\nimport {tuiFadeIn, tuiSlideIn} from '@taiga-ui/core/animations';\nimport {TuiButton, tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\nimport {TuiScrollbar} from '@taiga-ui/core/components/scrollbar';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport type {TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {tuiToAnimationOptions} from '@taiga-ui/core/utils/miscellaneous';\n\n@Component({\n standalone: true,\n selector: 'tui-drawer',\n imports: [TuiButton, TuiScrollbar],\n templateUrl: './drawer.template.html',\n styleUrls: ['./drawer.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiButtonOptionsProvider({\n appearance: 'secondary',\n size: 's',\n }),\n ],\n animations: [tuiSlideIn, tuiFadeIn],\n host: {\n '[@tuiFadeIn]': 'options',\n '[@tuiSlideIn]': 'animation',\n '[class._overlay]': 'overlay',\n '[style.border-top-left-radius]': 'direction === \"left\" ? 0 : null',\n '[style.border-top-right-radius]': 'direction === \"right\" ? 0 : null',\n '[style.left]': 'direction === \"left\" ? 0 : null',\n '[style.right]': 'direction === \"right\" ? 0 : null',\n },\n})\nexport class TuiDrawer {\n protected readonly options = tuiToAnimationOptions(inject(TUI_ANIMATIONS_SPEED));\n\n @Input()\n public direction: TuiHorizontalDirection = 'right';\n\n @Input()\n public overlay = false;\n\n protected get animation(): AnimationOptions & {value: string} {\n return {...this.options, value: this.direction};\n }\n}\n","<aside class=\"t-aside\">\n <tui-scrollbar class=\"t-scrollbar\">\n <ng-content select=\"header\" />\n <div class=\"t-content\"><ng-content /></div>\n </tui-scrollbar>\n <tui-scrollbar\n class=\"t-footer\"\n [hidden]=\"true\"\n >\n <ng-content select=\"footer\" />\n </tui-scrollbar>\n</aside>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AASA,MAwBa,SAAS,CAAA;AAxBtB,IAAA,WAAA,GAAA;QAyBuB,IAAO,CAAA,OAAA,GAAG,qBAAqB,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC;QAG1E,IAAS,CAAA,SAAA,GAA2B,OAAO,CAAC;QAG5C,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;AAK1B,KAAA;AAHG,IAAA,IAAc,SAAS,GAAA;AACnB,QAAA,OAAO,EAAC,GAAG,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,EAAC,CAAC;KACnD;+GAXQ,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAT,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,SAAS,EAjBP,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,YAAA,EAAA,SAAA,EAAA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AA,EAAA,MAAA,EAAA,CAAA,swEAAA,CAAA,EAAA,CAAA;8BAMM,SAAS,EAAA,CAAA;sBADf,KAAK;gBAIC,OAAO,EAAA,CAAA;sBADb,KAAK;;;AEvCV;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-drawer.mjs","sources":["../../../projects/kit/components/drawer/drawer.component.ts","../../../projects/kit/components/drawer/drawer.template.html","../../../projects/kit/components/drawer/taiga-ui-kit-components-drawer.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, Input} from '@angular/core';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\nimport {TuiScrollbar} from '@taiga-ui/core/components/scrollbar';\nimport type {TuiHorizontalDirection} from '@taiga-ui/core/types';\n\n@Component({\n standalone: true,\n selector: 'tui-drawer',\n imports: [TuiScrollbar],\n templateUrl: './drawer.template.html',\n styleUrls: ['./drawer.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiButtonOptionsProvider({\n appearance: 'secondary',\n size: 's',\n }),\n ],\n hostDirectives: [TuiAnimated],\n host: {\n '[class._overlay]': 'overlay',\n '[style.border-top-left-radius]': 'direction === \"left\" ? 0 : null',\n '[style.border-top-right-radius]': 'direction === \"right\" ? 0 : null',\n '[style.left]': 'direction === \"left\" ? 0 : null',\n '[style.right]': 'direction === \"right\" ? 0 : null',\n '[style.--tui-from]': 'from',\n },\n})\nexport class TuiDrawer {\n @Input()\n public direction: TuiHorizontalDirection = 'right';\n\n @Input()\n public overlay = false;\n\n public get from(): string {\n return this.direction === 'right' ? 'translateX(100%)' : 'translateX(-100%)';\n }\n}\n","<aside class=\"t-aside\">\n <tui-scrollbar class=\"t-scrollbar\">\n <ng-content select=\"header\" />\n <div class=\"t-content\"><ng-content /></div>\n </tui-scrollbar>\n <tui-scrollbar\n class=\"t-footer\"\n [hidden]=\"true\"\n >\n <ng-content select=\"footer\" />\n </tui-scroll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A,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;4FAoBb,SAAS,EAAA,UAAA,EAAA,CAAA;kBAvBrB,SAAS;iCACM,IAAI,EAAA,QAAA,EACN,YAAY,EAAA,OAAA,EACb,CAAC,YAAY,CAAC,EAGN,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACpC,SAAA,EAAA;AACP,wBAAA,wBAAwB,CAAC;AACrB,4BAAA,UAAU,EAAE,WAAW;AACvB,4BAAA,IAAI,EAAE,GAAG;yBACZ,CAAC;qBACL,EACe,cAAA,EAAA,CAAC,WAAW,CAAC,EACvB,IAAA,EAAA;AACF,wBAAA,kBAAkB,EAAE,SAAS;AAC7B,wBAAA,gCAAgC,EAAE,iCAAiC;AACnE,wBAAA,iCAAiC,EAAE,kCAAkC;AACrE,wBAAA,cAAc,EAAE,iCAAiC;AACjD,wBAAA,eAAe,EAAE,kCAAkC;AACnD,wBAAA,oBAAoB,EAAE,MAAM;AAC/B,qBAAA,EAAA,QAAA,EAAA,2VAAA,EAAA,MAAA,EAAA,CAAA,s0EAAA,CAAA,EAAA,CAAA;8BAIM,SAAS,EAAA,CAAA;sBADf,KAAK;gBAIC,OAAO,EAAA,CAAA;sBADb,KAAK;;;AEjCV;;AAEG;;;;"}
@@ -5,7 +5,7 @@ import * as i0 from '@angular/core';
5
5
  import { inject, EventEmitter, Component, ChangeDetectionStrategy, Input, Output, TemplateRef, ViewEncapsulation, ContentChildren, Directive, forwardRef, ContentChild, Pipe } from '@angular/core';
6
6
  import { DomSanitizer } from '@angular/platform-browser';
7
7
  import { WA_WINDOW } from '@ng-web-apis/common';
8
- import { tuiPure, tuiCreateToken, tuiProvideOptions } from '@taiga-ui/cdk/utils/miscellaneous';
8
+ import { tuiPure, tuiCreateToken, tuiProvideOptions, tuiProvide } from '@taiga-ui/cdk/utils/miscellaneous';
9
9
  import { TuiButton } from '@taiga-ui/core/components/button';
10
10
  import { TuiIcon } from '@taiga-ui/core/components/icon';
11
11
  import { TuiLoader } from '@taiga-ui/core/components/loader';
@@ -27,12 +27,11 @@ import { tuiGroupOptionsProvider, TuiGroup } from '@taiga-ui/core/directives/gro
27
27
  import { TuiLink } from '@taiga-ui/core/components/link';
28
28
  import { TuiBreakpointService } from '@taiga-ui/core/services';
29
29
  import { TuiControl, tuiAsControl } from '@taiga-ui/cdk/classes';
30
- import * as i1$3 from '@taiga-ui/cdk/directives/native-validator';
30
+ import * as i1$2 from '@taiga-ui/cdk/directives/native-validator';
31
31
  import { TuiNativeValidator } from '@taiga-ui/cdk/directives/native-validator';
32
32
  import { tuiZonefreeScheduler, tuiControlValue } from '@taiga-ui/cdk/observables';
33
33
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
34
- import { Validators, FormControl } from '@angular/forms';
35
- import * as i1$2 from '@taiga-ui/cdk/directives/validator';
34
+ import { Validators, NG_VALIDATORS, FormControl } from '@angular/forms';
36
35
  import { TuiValidator } from '@taiga-ui/cdk/directives/validator';
37
36
 
38
37
  const TUI_SIZE_ERROR = 'tuiSize';
@@ -343,45 +342,42 @@ function tuiInputFilesOptionsProvider(options) {
343
342
  return tuiProvideOptions(TUI_INPUT_FILES_OPTIONS, options, TUI_INPUT_FILES_DEFAULT_OPTIONS);
344
343
  }
345
344
 
346
- class TuiInputFilesValidator {
345
+ class TuiInputFilesValidator extends TuiValidator {
347
346
  constructor() {
347
+ super(...arguments);
348
348
  this.options = inject(TUI_INPUT_FILES_OPTIONS);
349
- this.validator = inject(TuiValidator);
350
349
  this.accept = this.options.accept;
351
350
  this.maxFileSize = this.options.maxFileSize;
352
351
  }
353
352
  ngOnChanges() {
354
- this.validate();
353
+ this.update();
355
354
  }
356
355
  ngOnInit() {
357
- this.validate();
356
+ this.update();
358
357
  }
359
- validate() {
360
- this.validator.tuiValidator =
358
+ update() {
359
+ this.validate =
361
360
  Validators.compose([
362
361
  tuiCreateFileFormatValidator(this.accept),
363
362
  tuiCreateFileSizeValidator(this.maxFileSize),
364
363
  ]) || Validators.nullValidator;
365
- this.validator.ngOnChanges();
364
+ this.onChange();
366
365
  }
367
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiInputFilesValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
368
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiInputFilesValidator, isStandalone: true, inputs: { accept: "accept", maxFileSize: "maxFileSize" }, host: { properties: { "accept": "accept" } }, exportAs: ["tuiInputFilesValidator"], usesOnChanges: true, hostDirectives: [{ directive: i1$2.TuiValidator }], ngImport: i0 }); }
366
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiInputFilesValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
367
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiInputFilesValidator, isStandalone: true, inputs: { accept: "accept", maxFileSize: "maxFileSize" }, host: { properties: { "accept": "accept" } }, providers: [tuiProvide(NG_VALIDATORS, TuiInputFilesValidator, true)], exportAs: ["tuiInputFilesValidator"], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
369
368
  }
370
369
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiInputFilesValidator, decorators: [{
371
370
  type: Directive,
372
371
  args: [{
373
372
  standalone: true,
373
+ inputs: ['accept', 'maxFileSize'],
374
+ providers: [tuiProvide(NG_VALIDATORS, TuiInputFilesValidator, true)],
374
375
  exportAs: 'tuiInputFilesValidator',
375
- hostDirectives: [TuiValidator],
376
376
  host: {
377
377
  '[accept]': 'accept',
378
378
  },
379
379
  }]
380
- }], propDecorators: { accept: [{
381
- type: Input
382
- }], maxFileSize: [{
383
- type: Input
384
- }] } });
380
+ }] });
385
381
 
386
382
  class TuiInputFilesDirective extends TuiControl {
387
383
  constructor() {
@@ -408,7 +404,7 @@ class TuiInputFilesDirective extends TuiControl {
408
404
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiInputFilesDirective, isStandalone: true, selector: "input[tuiInputFiles]", outputs: { reject: "reject" }, host: { attributes: { "type": "file" }, listeners: { "blur": "onTouched()", "click": "onClick($event)" }, properties: { "disabled": "disabled()" } }, providers: [
409
405
  tuiAsControl(TuiInputFilesDirective),
410
406
  tuiAppearanceOptionsProvider(TuiInputFilesDirective),
411
- ], usesInheritance: true, hostDirectives: [{ directive: i1$3.TuiNativeValidator }, { directive: i1.TuiWithAppearance }, { directive: TuiInputFilesValidator, inputs: ["accept", "accept", "maxFileSize", "maxFileSize"] }], ngImport: i0 }); }
407
+ ], usesInheritance: true, hostDirectives: [{ directive: i1$2.TuiNativeValidator }, { directive: i1.TuiWithAppearance }, { directive: TuiInputFilesValidator, inputs: ["accept", "accept", "maxFileSize", "maxFileSize"] }], ngImport: i0 }); }
412
408
  }
413
409
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiInputFilesDirective, decorators: [{
414
410
  type: Directive,