@taiga-ui/layout 4.51.0 → 4.52.0-canary.1ea42f6

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 (128) hide show
  1. package/components/app-bar/app-bar.component.d.ts +2 -2
  2. package/components/app-bar/app-bar.directive.d.ts +2 -2
  3. package/components/block-status/block-status.component.d.ts +3 -3
  4. package/components/block-status/block-status.directive.d.ts +2 -2
  5. package/components/card/collapsed.directive.d.ts +2 -2
  6. package/components/card/large.directive.d.ts +3 -2
  7. package/components/card/medium.directive.d.ts +2 -1
  8. package/components/dynamic-header/dynamic-header-container.directive.d.ts +2 -2
  9. package/components/form/form.directive.d.ts +3 -4
  10. package/components/form/form.options.d.ts +2 -2
  11. package/components/index.d.ts +1 -2
  12. package/components/input-search/input-search.component.d.ts +4 -5
  13. package/components/item-group/item-group.directive.d.ts +3 -3
  14. package/components/navigation/aside-group.component.d.ts +6 -7
  15. package/components/navigation/aside.component.d.ts +2 -3
  16. package/components/navigation/drawer.component.d.ts +3 -3
  17. package/components/search/search-filter.component.d.ts +3 -2
  18. package/components/search/search-filters.component.d.ts +6 -8
  19. package/components/surface/index.d.ts +1 -0
  20. package/components/surface/surface.directive.d.ts +6 -0
  21. package/fesm2022/taiga-ui-layout-components-app-bar.mjs +22 -30
  22. package/fesm2022/taiga-ui-layout-components-app-bar.mjs.map +1 -1
  23. package/fesm2022/taiga-ui-layout-components-block-details.mjs +10 -13
  24. package/fesm2022/taiga-ui-layout-components-block-details.mjs.map +1 -1
  25. package/fesm2022/taiga-ui-layout-components-block-status.mjs +14 -20
  26. package/fesm2022/taiga-ui-layout-components-block-status.mjs.map +1 -1
  27. package/fesm2022/taiga-ui-layout-components-card.mjs +55 -65
  28. package/fesm2022/taiga-ui-layout-components-card.mjs.map +1 -1
  29. package/fesm2022/taiga-ui-layout-components-dynamic-header.mjs +37 -54
  30. package/fesm2022/taiga-ui-layout-components-dynamic-header.mjs.map +1 -1
  31. package/fesm2022/taiga-ui-layout-components-form.mjs +22 -30
  32. package/fesm2022/taiga-ui-layout-components-form.mjs.map +1 -1
  33. package/fesm2022/taiga-ui-layout-components-input-search.mjs +14 -23
  34. package/fesm2022/taiga-ui-layout-components-input-search.mjs.map +1 -1
  35. package/fesm2022/taiga-ui-layout-components-item-group.mjs +18 -32
  36. package/fesm2022/taiga-ui-layout-components-item-group.mjs.map +1 -1
  37. package/fesm2022/taiga-ui-layout-components-navigation.mjs +72 -90
  38. package/fesm2022/taiga-ui-layout-components-navigation.mjs.map +1 -1
  39. package/fesm2022/taiga-ui-layout-components-search.mjs +31 -50
  40. package/fesm2022/taiga-ui-layout-components-search.mjs.map +1 -1
  41. package/fesm2022/taiga-ui-layout-components-surface.mjs +33 -0
  42. package/fesm2022/taiga-ui-layout-components-surface.mjs.map +1 -0
  43. package/fesm2022/taiga-ui-layout-components.mjs +1 -2
  44. package/fesm2022/taiga-ui-layout-components.mjs.map +1 -1
  45. package/fesm2022/taiga-ui-layout-tokens.mjs.map +1 -1
  46. package/package.json +14 -48
  47. package/components/cell/cell.directive.d.ts +0 -10
  48. package/components/cell/cell.options.d.ts +0 -6
  49. package/components/cell/index.d.ts +0 -2
  50. package/components/header/header.directive.d.ts +0 -18
  51. package/components/header/index.d.ts +0 -1
  52. package/esm2022/components/app-bar/app-bar-back.component.mjs +0 -20
  53. package/esm2022/components/app-bar/app-bar-size.directive.mjs +0 -24
  54. package/esm2022/components/app-bar/app-bar.component.mjs +0 -39
  55. package/esm2022/components/app-bar/app-bar.directive.mjs +0 -20
  56. package/esm2022/components/app-bar/app-bar.mjs +0 -11
  57. package/esm2022/components/app-bar/app-bar.providers.mjs +0 -19
  58. package/esm2022/components/app-bar/index.mjs +0 -7
  59. package/esm2022/components/app-bar/taiga-ui-layout-components-app-bar.mjs +0 -5
  60. package/esm2022/components/block-details/block-details.directive.mjs +0 -29
  61. package/esm2022/components/block-details/index.mjs +0 -2
  62. package/esm2022/components/block-details/taiga-ui-layout-components-block-details.mjs +0 -5
  63. package/esm2022/components/block-status/block-status.component.mjs +0 -23
  64. package/esm2022/components/block-status/block-status.directive.mjs +0 -20
  65. package/esm2022/components/block-status/block-status.mjs +0 -4
  66. package/esm2022/components/block-status/index.mjs +0 -4
  67. package/esm2022/components/block-status/taiga-ui-layout-components-block-status.mjs +0 -5
  68. package/esm2022/components/card/card.mjs +0 -11
  69. package/esm2022/components/card/collapsed.directive.mjs +0 -38
  70. package/esm2022/components/card/index.mjs +0 -6
  71. package/esm2022/components/card/large.directive.mjs +0 -37
  72. package/esm2022/components/card/medium.directive.mjs +0 -29
  73. package/esm2022/components/card/row.directive.mjs +0 -29
  74. package/esm2022/components/card/taiga-ui-layout-components-card.mjs +0 -5
  75. package/esm2022/components/cell/cell.directive.mjs +0 -53
  76. package/esm2022/components/cell/cell.options.mjs +0 -3
  77. package/esm2022/components/cell/index.mjs +0 -3
  78. package/esm2022/components/cell/taiga-ui-layout-components-cell.mjs +0 -5
  79. package/esm2022/components/dynamic-header/dynamic-header-anchor.directive.mjs +0 -34
  80. package/esm2022/components/dynamic-header/dynamic-header-container.directive.mjs +0 -41
  81. package/esm2022/components/dynamic-header/dynamic-header.component.mjs +0 -59
  82. package/esm2022/components/dynamic-header/dynamic-header.mjs +0 -9
  83. package/esm2022/components/dynamic-header/index.mjs +0 -5
  84. package/esm2022/components/dynamic-header/taiga-ui-layout-components-dynamic-header.mjs +0 -5
  85. package/esm2022/components/form/form.directive.mjs +0 -95
  86. package/esm2022/components/form/form.options.mjs +0 -3
  87. package/esm2022/components/form/index.mjs +0 -3
  88. package/esm2022/components/form/taiga-ui-layout-components-form.mjs +0 -5
  89. package/esm2022/components/header/header.directive.mjs +0 -54
  90. package/esm2022/components/header/index.mjs +0 -2
  91. package/esm2022/components/header/taiga-ui-layout-components-header.mjs +0 -5
  92. package/esm2022/components/index.mjs +0 -13
  93. package/esm2022/components/input-search/index.mjs +0 -2
  94. package/esm2022/components/input-search/input-search.component.mjs +0 -96
  95. package/esm2022/components/input-search/taiga-ui-layout-components-input-search.mjs +0 -5
  96. package/esm2022/components/item-group/index.mjs +0 -2
  97. package/esm2022/components/item-group/item-group.directive.mjs +0 -58
  98. package/esm2022/components/item-group/taiga-ui-layout-components-item-group.mjs +0 -5
  99. package/esm2022/components/navigation/aside-group.component.mjs +0 -59
  100. package/esm2022/components/navigation/aside-item.directive.mjs +0 -88
  101. package/esm2022/components/navigation/aside.component.mjs +0 -67
  102. package/esm2022/components/navigation/drawer.component.mjs +0 -97
  103. package/esm2022/components/navigation/header.component.mjs +0 -34
  104. package/esm2022/components/navigation/hint-aside.directive.mjs +0 -31
  105. package/esm2022/components/navigation/index.mjs +0 -12
  106. package/esm2022/components/navigation/logo.component.mjs +0 -12
  107. package/esm2022/components/navigation/main.component.mjs +0 -14
  108. package/esm2022/components/navigation/nav.component.mjs +0 -23
  109. package/esm2022/components/navigation/navigation.mjs +0 -24
  110. package/esm2022/components/navigation/subheader.component.mjs +0 -68
  111. package/esm2022/components/navigation/taiga-ui-layout-components-navigation.mjs +0 -5
  112. package/esm2022/components/search/index.mjs +0 -4
  113. package/esm2022/components/search/search-filter.component.mjs +0 -44
  114. package/esm2022/components/search/search-filters.component.mjs +0 -81
  115. package/esm2022/components/search/search.component.mjs +0 -26
  116. package/esm2022/components/search/search.mjs +0 -9
  117. package/esm2022/components/search/taiga-ui-layout-components-search.mjs +0 -5
  118. package/esm2022/components/taiga-ui-layout-components.mjs +0 -5
  119. package/esm2022/index.mjs +0 -3
  120. package/esm2022/taiga-ui-layout.mjs +0 -5
  121. package/esm2022/tokens/common-icons.mjs +0 -21
  122. package/esm2022/tokens/i18n.mjs +0 -6
  123. package/esm2022/tokens/index.mjs +0 -3
  124. package/esm2022/tokens/taiga-ui-layout-tokens.mjs +0 -5
  125. package/fesm2022/taiga-ui-layout-components-cell.mjs +0 -61
  126. package/fesm2022/taiga-ui-layout-components-cell.mjs.map +0 -1
  127. package/fesm2022/taiga-ui-layout-components-header.mjs +0 -60
  128. package/fesm2022/taiga-ui-layout-components-header.mjs.map +0 -1
@@ -1,73 +1,67 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ViewEncapsulation, ChangeDetectionStrategy, inject, signal, Directive, Input } from '@angular/core';
2
+ import { ChangeDetectionStrategy, ViewEncapsulation, Component, inject, input, signal, Directive } from '@angular/core';
3
3
  import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
4
4
  import { TUI_BUTTON_OPTIONS } from '@taiga-ui/core/components/button';
5
+ import { TUI_HEADER_OPTIONS } from '@taiga-ui/core/components/header';
5
6
  import { TUI_NOTIFICATION_OPTIONS } from '@taiga-ui/core/components/notification';
6
7
  import * as i1 from '@taiga-ui/core/components/textfield';
7
8
  import { TUI_TEXTFIELD_OPTIONS, TuiTextfieldOptionsDirective } from '@taiga-ui/core/components/textfield';
8
9
  import { TUI_SEGMENTED_OPTIONS } from '@taiga-ui/kit/components/segmented';
9
10
  import { TUI_SWITCH_OPTIONS } from '@taiga-ui/kit/components/switch';
10
- import { TUI_HEADER_OPTIONS } from '@taiga-ui/layout/components/header';
11
11
  import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
12
12
 
13
13
  const [TUI_FORM_OPTIONS, tuiFormOptionsProvider] = tuiCreateOptions({ size: 'l' });
14
14
 
15
15
  const HEADER_SIZE = {
16
- s: 'xxxs',
17
- m: 'xs',
18
- l: 's',
16
+ s: 'body-m',
17
+ m: 'h6',
18
+ l: 'h5',
19
19
  };
20
- class TuiFormStyles {
21
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiFormStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
22
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiFormStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-form" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiForm][tuiForm]{display:flex;flex-direction:column;align-items:stretch}[tuiForm][data-size=s]{gap:.75rem;font:var(--tui-font-text-s)}[tuiForm][data-size=s] tui-error:not(.tui-space-top-none){margin-block-start:-.75rem}[tuiForm][data-size=s] [tuiHeader]{padding-block-end:.5rem}[tuiForm][data-size=s] [tuiHeader] [tuiSubtitle]{font:var(--tui-font-text-ui-s)}[tuiForm][data-size=m]{gap:1rem;font:var(--tui-font-text-s)}[tuiForm][data-size=m] tui-error:not(.tui-space-top-none){margin-block-start:-1rem}[tuiForm][data-size=l]{gap:1.25rem;font:var(--tui-font-text-m)}[tuiForm][data-size=l] tui-error:not(.tui-space-top-none){margin-block-start:-1.25rem}[tuiForm]>header{padding-block-end:.25rem}[tuiForm]>fieldset{display:grid;gap:inherit;grid-auto-flow:column;grid-auto-columns:1fr;border:none;padding:0;margin:0}[tuiForm]>footer{display:flex;gap:.75rem;margin-block-start:.25rem}tui-dialog [tuiForm]>footer{justify-content:flex-end}[tuiForm]>button,[tuiForm]>a{align-self:flex-start}[tuiForm] [tuiLabel]:not([data-orientation=vertical]){font:inherit}[tuiForm][data-size=s] [tuiLabel]:not([data-orientation=vertical]) [tuiTooltip],[tuiForm][data-size=m] [tuiLabel]:not([data-orientation=vertical]) [tuiTooltip]{block-size:1.25rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
20
+ class Styles {
21
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
22
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-form" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiForm][tuiForm]{display:flex;flex-direction:column;align-items:stretch}[tuiForm][data-size=s]{gap:.75rem;font:var(--tui-font-text-s)}[tuiForm][data-size=s] tui-error:not(.tui-space-top-none){margin-block-start:-.75rem}[tuiForm][data-size=m]{gap:1rem;font:var(--tui-font-text-s)}[tuiForm][data-size=m] tui-error:not(.tui-space-top-none){margin-block-start:-1rem}[tuiForm][data-size=l]{gap:1.25rem;font:var(--tui-font-text-m)}[tuiForm][data-size=l] tui-error:not(.tui-space-top-none){margin-block-start:-1.25rem}[tuiForm]>header{padding-block-end:.25rem}[tuiForm]>fieldset{display:grid;gap:inherit;grid-auto-flow:column;grid-auto-columns:1fr;border:none;padding:0;margin:0}[tuiForm]>footer{display:flex;gap:.75rem;margin-block-start:.25rem}tui-dialog [tuiForm]>footer{justify-content:flex-end}[tuiForm]>button,[tuiForm]>a{align-self:flex-start}[tuiForm] [tuiLabel]:not([data-orientation=vertical]){font:inherit}[tuiForm][data-size=s] [tuiLabel]:not([data-orientation=vertical]) [tuiTooltip],[tuiForm][data-size=m] [tuiLabel]:not([data-orientation=vertical]) [tuiTooltip]{block-size:1.25rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
23
23
  }
24
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiFormStyles, decorators: [{
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, decorators: [{
25
25
  type: Component,
26
- args: [{ standalone: true, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
27
- class: 'tui-form',
28
- }, styles: ["[tuiForm][tuiForm]{display:flex;flex-direction:column;align-items:stretch}[tuiForm][data-size=s]{gap:.75rem;font:var(--tui-font-text-s)}[tuiForm][data-size=s] tui-error:not(.tui-space-top-none){margin-block-start:-.75rem}[tuiForm][data-size=s] [tuiHeader]{padding-block-end:.5rem}[tuiForm][data-size=s] [tuiHeader] [tuiSubtitle]{font:var(--tui-font-text-ui-s)}[tuiForm][data-size=m]{gap:1rem;font:var(--tui-font-text-s)}[tuiForm][data-size=m] tui-error:not(.tui-space-top-none){margin-block-start:-1rem}[tuiForm][data-size=l]{gap:1.25rem;font:var(--tui-font-text-m)}[tuiForm][data-size=l] tui-error:not(.tui-space-top-none){margin-block-start:-1.25rem}[tuiForm]>header{padding-block-end:.25rem}[tuiForm]>fieldset{display:grid;gap:inherit;grid-auto-flow:column;grid-auto-columns:1fr;border:none;padding:0;margin:0}[tuiForm]>footer{display:flex;gap:.75rem;margin-block-start:.25rem}tui-dialog [tuiForm]>footer{justify-content:flex-end}[tuiForm]>button,[tuiForm]>a{align-self:flex-start}[tuiForm] [tuiLabel]:not([data-orientation=vertical]){font:inherit}[tuiForm][data-size=s] [tuiLabel]:not([data-orientation=vertical]) [tuiTooltip],[tuiForm][data-size=m] [tuiLabel]:not([data-orientation=vertical]) [tuiTooltip]{block-size:1.25rem}\n"] }]
26
+ args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-form' }, styles: ["[tuiForm][tuiForm]{display:flex;flex-direction:column;align-items:stretch}[tuiForm][data-size=s]{gap:.75rem;font:var(--tui-font-text-s)}[tuiForm][data-size=s] tui-error:not(.tui-space-top-none){margin-block-start:-.75rem}[tuiForm][data-size=m]{gap:1rem;font:var(--tui-font-text-s)}[tuiForm][data-size=m] tui-error:not(.tui-space-top-none){margin-block-start:-1rem}[tuiForm][data-size=l]{gap:1.25rem;font:var(--tui-font-text-m)}[tuiForm][data-size=l] tui-error:not(.tui-space-top-none){margin-block-start:-1.25rem}[tuiForm]>header{padding-block-end:.25rem}[tuiForm]>fieldset{display:grid;gap:inherit;grid-auto-flow:column;grid-auto-columns:1fr;border:none;padding:0;margin:0}[tuiForm]>footer{display:flex;gap:.75rem;margin-block-start:.25rem}tui-dialog [tuiForm]>footer{justify-content:flex-end}[tuiForm]>button,[tuiForm]>a{align-self:flex-start}[tuiForm] [tuiLabel]:not([data-orientation=vertical]){font:inherit}[tuiForm][data-size=s] [tuiLabel]:not([data-orientation=vertical]) [tuiTooltip],[tuiForm][data-size=m] [tuiLabel]:not([data-orientation=vertical]) [tuiTooltip]{block-size:1.25rem}\n"] }]
29
27
  }] });
30
28
  class TuiForm {
31
29
  constructor() {
30
+ this.nothing = tuiWithStyles(Styles);
32
31
  this.options = inject(TUI_FORM_OPTIONS);
33
- this.nothing = tuiWithStyles(TuiFormStyles);
34
- this.size = this.options.size;
32
+ this.size = input(this.options.size, { alias: 'tuiForm' });
35
33
  }
36
- set tuiForm(size) {
37
- this.size = size || this.options.size;
38
- }
39
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiForm, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
40
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiForm, isStandalone: true, selector: "[tuiForm]", inputs: { tuiForm: "tuiForm" }, host: { attributes: { "tuiForm": "" }, properties: { "attr.data-size": "size" } }, providers: [
34
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiForm, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
35
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiForm, isStandalone: true, selector: "[tuiForm]", inputs: { size: { classPropertyName: "size", publicName: "tuiForm", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tuiForm": "" }, properties: { "attr.data-size": "size() || options.size || \"l\"" } }, providers: [
41
36
  projectSize(TUI_BUTTON_OPTIONS, (size) => size),
42
37
  projectSize(TUI_NOTIFICATION_OPTIONS, (size) => size),
43
- projectSize(TUI_HEADER_OPTIONS, (size) => HEADER_SIZE[size]),
38
+ projectSize(TUI_HEADER_OPTIONS, (size) => HEADER_SIZE[size || 'l']),
44
39
  projectSize(TUI_SWITCH_OPTIONS, (size) => (size === 'l' ? 'm' : 's')),
45
40
  projectSize(TUI_SEGMENTED_OPTIONS, (size) => (size === 'l' ? 'm' : 's')),
46
41
  {
47
42
  provide: TUI_TEXTFIELD_OPTIONS,
48
43
  useFactory: () => ({
49
44
  ...inject(TUI_TEXTFIELD_OPTIONS, { skipSelf: true }),
50
- size: signal(inject(TuiForm).size),
45
+ size: signal(inject(TuiForm).size() || inject(TUI_FORM_OPTIONS).size || 'l'),
51
46
  }),
52
47
  },
53
48
  ], hostDirectives: [{ directive: i1.TuiTextfieldOptionsDirective, inputs: ["tuiTextfieldAppearance", "tuiTextfieldAppearance", "tuiTextfieldCleaner", "tuiTextfieldCleaner"] }], ngImport: i0 }); }
54
49
  }
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiForm, decorators: [{
50
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiForm, decorators: [{
56
51
  type: Directive,
57
52
  args: [{
58
- standalone: true,
59
53
  selector: '[tuiForm]',
60
54
  providers: [
61
55
  projectSize(TUI_BUTTON_OPTIONS, (size) => size),
62
56
  projectSize(TUI_NOTIFICATION_OPTIONS, (size) => size),
63
- projectSize(TUI_HEADER_OPTIONS, (size) => HEADER_SIZE[size]),
57
+ projectSize(TUI_HEADER_OPTIONS, (size) => HEADER_SIZE[size || 'l']),
64
58
  projectSize(TUI_SWITCH_OPTIONS, (size) => (size === 'l' ? 'm' : 's')),
65
59
  projectSize(TUI_SEGMENTED_OPTIONS, (size) => (size === 'l' ? 'm' : 's')),
66
60
  {
67
61
  provide: TUI_TEXTFIELD_OPTIONS,
68
62
  useFactory: () => ({
69
63
  ...inject(TUI_TEXTFIELD_OPTIONS, { skipSelf: true }),
70
- size: signal(inject(TuiForm).size),
64
+ size: signal(inject(TuiForm).size() || inject(TUI_FORM_OPTIONS).size || 'l'),
71
65
  }),
72
66
  },
73
67
  ],
@@ -79,18 +73,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
79
73
  ],
80
74
  host: {
81
75
  tuiForm: '',
82
- '[attr.data-size]': 'size',
76
+ '[attr.data-size]': 'size() || options.size || "l"',
83
77
  },
84
78
  }]
85
- }], propDecorators: { tuiForm: [{
86
- type: Input
87
- }] } });
79
+ }] });
88
80
  function projectSize(provide, project) {
89
81
  return {
90
82
  provide,
91
83
  useFactory: () => ({
92
84
  ...inject(provide, { skipSelf: true }),
93
- size: project(inject(TuiForm).size),
85
+ size: project(inject(TuiForm).size() || inject(TUI_FORM_OPTIONS).size || 'l'),
94
86
  }),
95
87
  };
96
88
  }
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-layout-components-form.mjs","sources":["../../../projects/layout/components/form/form.options.ts","../../../projects/layout/components/form/form.directive.ts","../../../projects/layout/components/form/taiga-ui-layout-components-form.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiFormOptions {\n readonly size: TuiSizeL | TuiSizeS;\n}\n\nexport const [TUI_FORM_OPTIONS, tuiFormOptionsProvider] =\n tuiCreateOptions<TuiFormOptions>({size: 'l'});\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n type InjectionToken,\n Input,\n type Provider,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {type TuiHandler} from '@taiga-ui/cdk/types';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_BUTTON_OPTIONS} from '@taiga-ui/core/components/button';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/components/notification';\nimport {\n TUI_TEXTFIELD_OPTIONS,\n TuiTextfieldOptionsDirective,\n} from '@taiga-ui/core/components/textfield';\nimport {TUI_SEGMENTED_OPTIONS} from '@taiga-ui/kit/components/segmented';\nimport {TUI_SWITCH_OPTIONS} from '@taiga-ui/kit/components/switch';\nimport {TUI_HEADER_OPTIONS} from '@taiga-ui/layout/components/header';\n\nimport {TUI_FORM_OPTIONS, type TuiFormOptions} from './form.options';\n\nconst HEADER_SIZE = {\n s: 'xxxs',\n m: 'xs',\n l: 's',\n} as const;\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./form.styles.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-form',\n },\n})\nclass TuiFormStyles {}\n\n@Directive({\n standalone: true,\n selector: '[tuiForm]',\n providers: [\n projectSize(TUI_BUTTON_OPTIONS, (size) => size),\n projectSize(TUI_NOTIFICATION_OPTIONS, (size) => size),\n projectSize(TUI_HEADER_OPTIONS, (size) => HEADER_SIZE[size]),\n projectSize(TUI_SWITCH_OPTIONS, (size) => (size === 'l' ? 'm' : 's')),\n projectSize(TUI_SEGMENTED_OPTIONS, (size) => (size === 'l' ? 'm' : 's')),\n {\n provide: TUI_TEXTFIELD_OPTIONS,\n useFactory: () => ({\n ...inject(TUI_TEXTFIELD_OPTIONS, {skipSelf: true}),\n size: signal(inject(TuiForm).size),\n }),\n },\n ],\n hostDirectives: [\n {\n directive: TuiTextfieldOptionsDirective,\n inputs: ['tuiTextfieldAppearance', 'tuiTextfieldCleaner'],\n },\n ],\n host: {\n tuiForm: '',\n '[attr.data-size]': 'size',\n },\n})\nexport class TuiForm {\n protected readonly options = inject(TUI_FORM_OPTIONS);\n\n protected readonly nothing = tuiWithStyles(TuiFormStyles);\n\n public size: TuiFormOptions['size'] = this.options.size;\n\n @Input()\n public set tuiForm(size: TuiFormOptions['size'] | '') {\n this.size = size || this.options.size;\n }\n}\n\nfunction projectSize(\n provide: InjectionToken<any>,\n project: TuiHandler<TuiFormOptions['size'], string>,\n): Provider {\n return {\n provide,\n useFactory: () => ({\n ...inject(provide, {skipSelf: true}),\n size: project(inject(TuiForm).size),\n }),\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAOa,M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M,EAAE,CAAC,wBAAwB,EAAE,qBAAqB,CAAC;AAC5D,yBAAA;AACJ,qBAAA;AACD,oBAAA,IAAI,EAAE;AACF,wBAAA,OAAO,EAAE,EAAE;AACX,wBAAA,kBAAkB,EAAE,MAAM;AAC7B,qBAAA;AACJ,iBAAA,CAAA;8BASc,OAAO,EAAA,CAAA;sBADjB,KAAK;;AAMV,SAAS,WAAW,CAChB,OAA4B,EAC5B,OAAmD,EAAA;IAEnD,OAAO;QACH,OAAO;AACP,QAAA,UAAU,EAAE,OAAO;YACf,GAAG,MAAM,CAAC,OAAO,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;YACpC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC;SACtC,CAAC;KACL,CAAC;AACN;;AC/FA;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-layout-components-form.mjs","sources":["../../../projects/layout/components/form/form.options.ts","../../../projects/layout/components/form/form.directive.ts","../../../projects/layout/components/form/taiga-ui-layout-components-form.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiFormOptions {\n readonly size: TuiSizeL | TuiSizeS | '';\n}\n\nexport const [TUI_FORM_OPTIONS, tuiFormOptionsProvider] =\n tuiCreateOptions<TuiFormOptions>({size: 'l'});\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n type InjectionToken,\n input,\n type Provider,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {type TuiHandler} from '@taiga-ui/cdk/types';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_BUTTON_OPTIONS} from '@taiga-ui/core/components/button';\nimport {TUI_HEADER_OPTIONS} from '@taiga-ui/core/components/header';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/components/notification';\nimport {\n TUI_TEXTFIELD_OPTIONS,\n TuiTextfieldOptionsDirective,\n} from '@taiga-ui/core/components/textfield';\nimport {TUI_SEGMENTED_OPTIONS} from '@taiga-ui/kit/components/segmented';\nimport {TUI_SWITCH_OPTIONS} from '@taiga-ui/kit/components/switch';\n\nimport {TUI_FORM_OPTIONS, type TuiFormOptions} from './form.options';\n\nconst HEADER_SIZE = {\n s: 'body-m',\n m: 'h6',\n l: 'h5',\n} as const;\n\n@Component({\n template: '',\n styleUrls: ['./form.styles.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-form'},\n})\nclass Styles {}\n\n@Directive({\n selector: '[tuiForm]',\n providers: [\n projectSize(TUI_BUTTON_OPTIONS, (size) => size),\n projectSize(TUI_NOTIFICATION_OPTIONS, (size) => size),\n projectSize(TUI_HEADER_OPTIONS, (size) => HEADER_SIZE[size || 'l']),\n projectSize(TUI_SWITCH_OPTIONS, (size) => (size === 'l' ? 'm' : 's')),\n projectSize(TUI_SEGMENTED_OPTIONS, (size) => (size === 'l' ? 'm' : 's')),\n {\n provide: TUI_TEXTFIELD_OPTIONS,\n useFactory: () => ({\n ...inject(TUI_TEXTFIELD_OPTIONS, {skipSelf: true}),\n size: signal(\n inject(TuiForm).size() || inject(TUI_FORM_OPTIONS).size || 'l',\n ),\n }),\n },\n ],\n hostDirectives: [\n {\n directive: TuiTextfieldOptionsDirective,\n inputs: ['tuiTextfieldAppearance', 'tuiTextfieldCleaner'],\n },\n ],\n host: {\n tuiForm: '',\n '[attr.data-size]': 'size() || options.size || \"l\"',\n },\n})\nexport class TuiForm {\n protected readonly nothing = tuiWithStyles(Styles);\n protected readonly options = inject(TUI_FORM_OPTIONS);\n\n public readonly size = input(this.options.size, {alias: 'tuiForm'});\n}\n\nfunction projectSize(\n provide: InjectionToken<any>,\n project: TuiHandler<TuiFormOptions['size'], string>,\n): Provider {\n return {\n provide,\n useFactory: () => ({\n ...inject(provide, {skipSelf: true}),\n size: project(inject(Tu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MAAM,CACR,MAAM,CAAA,OAAA,CAAS,CAAC,IAAI,EAAE,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAAC,IAAI,IAAI,GAAG,CACjE;6BACJ,CAAC;AACL,yBAAA;AACJ,qBAAA;AACD,oBAAA,cAAc,EAAE;AACZ,wBAAA;AACI,4BAAA,SAAS,EAAE,4BAA4B;AACvC,4BAAA,MAAM,EAAE,CAAC,wBAAwB,EAAE,qBAAqB,CAAC;AAC5D,yBAAA;AACJ,qBAAA;AACD,oBAAA,IAAI,EAAE;AACF,wBAAA,OAAO,EAAE,EAAE;AACX,wBAAA,kBAAkB,EAAE,+BAA+B;AACtD,qBAAA;AACJ,iBAAA;;AAQD,SAAS,WAAW,CAChB,OAA4B,EAC5B,OAAmD,EAAA;IAEnD,OAAO;QACH,OAAO;AACP,QAAA,UAAU,EAAE,OAAO;YACf,GAAG,MAAM,CAAC,OAAO,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AACpC,YAAA,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAAC,IAAI,IAAI,GAAG,CAAC;SAChF,CAAC;KACL;AACL;;ACvFA;;AAEG;;;;"}
@@ -1,15 +1,14 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, EventEmitter, TemplateRef, Component, ChangeDetectionStrategy, ViewChild, Input, Output } from '@angular/core';
2
+ import { inject, input, model, TemplateRef, ViewChild, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { toSignal } from '@angular/core/rxjs-interop';
4
4
  import { tuiInjectElement, tuiIsElement, tuiContainsOrAfter } from '@taiga-ui/cdk/utils/dom';
5
5
  import { tuiGetClosestFocusable } from '@taiga-ui/cdk/utils/focus';
6
- import { tuiDirectiveBinding } from '@taiga-ui/cdk/utils/miscellaneous';
6
+ import { tuiCellOptionsProvider } from '@taiga-ui/core/components/cell';
7
7
  import * as i1 from '@taiga-ui/core/components/textfield';
8
8
  import { TuiTextfieldComponent, TuiWithTextfield } from '@taiga-ui/core/components/textfield';
9
- import { TuiIcons } from '@taiga-ui/core/directives/icons';
9
+ import { tuiIconStart } from '@taiga-ui/core/directives/icons';
10
10
  import { TuiPopupService } from '@taiga-ui/core/directives/popup';
11
11
  import { TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
12
- import { tuiCellOptionsProvider } from '@taiga-ui/layout/components/cell';
13
12
  import { TUI_INPUT_SEARCH } from '@taiga-ui/layout/tokens';
14
13
  import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
15
14
 
@@ -22,12 +21,12 @@ class TuiInputSearch {
22
21
  this.parent = this.textfield.el.parentElement;
23
22
  this.neighbor = this.textfield.el.nextSibling;
24
23
  this.placeholder = '';
25
- this.icon = tuiDirectiveBinding(TuiIcons, 'iconStart', inject(TUI_COMMON_ICONS).search, {});
26
- this.tuiInputSearchOpen = false;
27
- this.tuiInputSearchOpenChange = new EventEmitter();
24
+ this.icon = tuiIconStart(inject(TUI_COMMON_ICONS).search, {});
25
+ this.tuiInputSearch = input();
26
+ this.searchOpen = model(false, { alias: 'tuiInputSearchOpen' });
28
27
  }
29
28
  ngOnChanges() {
30
- if (this.tuiInputSearchOpen) {
29
+ if (this.searchOpen()) {
31
30
  this.open();
32
31
  }
33
32
  else {
@@ -45,15 +44,13 @@ class TuiInputSearch {
45
44
  this.ref.rootNodes[0]?.insertAdjacentElement('afterbegin', this.textfield.el);
46
45
  this.el.focus({ preventScroll: true });
47
46
  this.el.placeholder = this.i18n()?.placeholder || this.el.placeholder;
48
- this.tuiInputSearchOpen = true;
49
- this.tuiInputSearchOpenChange.emit(true);
47
+ this.searchOpen.set(true);
50
48
  }
51
49
  close() {
52
50
  this.el.placeholder = this.placeholder || this.el.placeholder;
53
51
  this.parent?.insertBefore(this.textfield.el, this.neighbor);
54
52
  this.ref?.destroy();
55
- this.tuiInputSearchOpen = false;
56
- this.tuiInputSearchOpenChange.emit(false);
53
+ this.searchOpen.set(false);
57
54
  }
58
55
  onArrow() {
59
56
  tuiGetClosestFocusable({
@@ -69,29 +66,23 @@ class TuiInputSearch {
69
66
  this.close();
70
67
  }
71
68
  }
72
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiInputSearch, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
73
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiInputSearch, isStandalone: true, selector: "input[tuiInputSearch]", inputs: { tuiInputSearch: "tuiInputSearch", tuiInputSearchOpen: "tuiInputSearchOpen" }, outputs: { tuiInputSearchOpenChange: "tuiInputSearchOpenChange" }, host: { attributes: { "ngSkipHydration": "true" }, listeners: { "focus": "open()", "keydown.tab.prevent": "0", "keydown.arrowDown.prevent": "onArrow()" } }, providers: [tuiCellOptionsProvider({ size: 'm' })], viewQueries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesOnChanges: true, hostDirectives: [{ directive: i1.TuiWithTextfield }], ngImport: i0, template: "<ng-template>\n <div\n tuiTheme=\"dark\"\n class=\"t-container\"\n (document:focusin)=\"onFocus($event)\"\n (keydown.esc)=\"close()\"\n (pointerdown.self)=\"close()\"\n >\n <div\n #container\n class=\"t-content\"\n >\n <ng-container *polymorpheusOutlet=\"tuiInputSearch\" />\n </div>\n </div>\n</ng-template>\n", styles: [".t-container{position:fixed;top:0;left:0;bottom:0;right:0;display:grid;gap:.25rem;grid-template:-webkit-min-content / minmax(auto,50rem);grid-template:min-content / minmax(auto,50rem);place-content:start center;padding:.5rem;background:var(--tui-service-backdrop);box-shadow:0 0 0 5rem var(--tui-service-backdrop)}.t-container ::ng-deep>tui-textfield{background:var(--tui-background-base-alt)}.t-content{overflow:hidden}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
69
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputSearch, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
70
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: TuiInputSearch, isStandalone: true, selector: "input[tuiInputSearch]", inputs: { tuiInputSearch: { classPropertyName: "tuiInputSearch", publicName: "tuiInputSearch", isSignal: true, isRequired: false, transformFunction: null }, searchOpen: { classPropertyName: "searchOpen", publicName: "tuiInputSearchOpen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchOpen: "tuiInputSearchOpenChange" }, host: { attributes: { "ngSkipHydration": "true" }, listeners: { "focus": "open()", "keydown.tab.prevent": "0", "keydown.arrowDown.prevent": "onArrow()" } }, providers: [tuiCellOptionsProvider({ size: 'm' })], viewQueries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesOnChanges: true, hostDirectives: [{ directive: i1.TuiWithTextfield }], ngImport: i0, template: "<ng-template>\n <div\n tuiTheme=\"dark\"\n class=\"t-container\"\n (document:focusin)=\"onFocus($event)\"\n (keydown.esc)=\"close()\"\n (pointerdown.self)=\"close()\"\n >\n <div\n #container\n class=\"t-content\"\n >\n <ng-container *polymorpheusOutlet=\"tuiInputSearch()\" />\n </div>\n </div>\n</ng-template>\n", styles: [".t-container{position:fixed;top:0;left:0;bottom:0;right:0;display:grid;gap:.25rem;grid-template:min-content / minmax(auto,50rem);place-content:start center;padding:.5rem;background:var(--tui-service-backdrop);box-shadow:0 0 0 5rem var(--tui-service-backdrop)}.t-container ::ng-deep>tui-textfield{background:var(--tui-background-base-alt)}.t-content{overflow:hidden}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
74
71
  }
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiInputSearch, decorators: [{
72
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputSearch, decorators: [{
76
73
  type: Component,
77
- args: [{ standalone: true, selector: 'input[tuiInputSearch]', imports: [PolymorpheusOutlet], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiCellOptionsProvider({ size: 'm' })], hostDirectives: [TuiWithTextfield], host: {
74
+ args: [{ selector: 'input[tuiInputSearch]', imports: [PolymorpheusOutlet], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiCellOptionsProvider({ size: 'm' })], hostDirectives: [TuiWithTextfield], host: {
78
75
  ngSkipHydration: 'true',
79
76
  '(focus)': 'open()',
80
77
  '(keydown.tab.prevent)': '0',
81
78
  '(keydown.arrowDown.prevent)': 'onArrow()',
82
- }, template: "<ng-template>\n <div\n tuiTheme=\"dark\"\n class=\"t-container\"\n (document:focusin)=\"onFocus($event)\"\n (keydown.esc)=\"close()\"\n (pointerdown.self)=\"close()\"\n >\n <div\n #container\n class=\"t-content\"\n >\n <ng-container *polymorpheusOutlet=\"tuiInputSearch\" />\n </div>\n </div>\n</ng-template>\n", styles: [".t-container{position:fixed;top:0;left:0;bottom:0;right:0;display:grid;gap:.25rem;grid-template:-webkit-min-content / minmax(auto,50rem);grid-template:min-content / minmax(auto,50rem);place-content:start center;padding:.5rem;background:var(--tui-service-backdrop);box-shadow:0 0 0 5rem var(--tui-service-backdrop)}.t-container ::ng-deep>tui-textfield{background:var(--tui-background-base-alt)}.t-content{overflow:hidden}\n"] }]
79
+ }, template: "<ng-template>\n <div\n tuiTheme=\"dark\"\n class=\"t-container\"\n (document:focusin)=\"onFocus($event)\"\n (keydown.esc)=\"close()\"\n (pointerdown.self)=\"close()\"\n >\n <div\n #container\n class=\"t-content\"\n >\n <ng-container *polymorpheusOutlet=\"tuiInputSearch()\" />\n </div>\n </div>\n</ng-template>\n", styles: [".t-container{position:fixed;top:0;left:0;bottom:0;right:0;display:grid;gap:.25rem;grid-template:min-content / minmax(auto,50rem);place-content:start center;padding:.5rem;background:var(--tui-service-backdrop);box-shadow:0 0 0 5rem var(--tui-service-backdrop)}.t-container ::ng-deep>tui-textfield{background:var(--tui-background-base-alt)}.t-content{overflow:hidden}\n"] }]
83
80
  }], propDecorators: { template: [{
84
81
  type: ViewChild,
85
82
  args: [TemplateRef]
86
83
  }], container: [{
87
84
  type: ViewChild,
88
85
  args: ['container']
89
- }], tuiInputSearch: [{
90
- type: Input
91
- }], tuiInputSearchOpen: [{
92
- type: Input
93
- }], tuiInputSearchOpenChange: [{
94
- type: Output
95
86
  }] } });
96
87
 
97
88
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-layout-components-input-search.mjs","sources":["../../../projects/layout/components/input-search/input-search.component.ts","../../../projects/layout/components/input-search/input-search.component.html","../../../projects/layout/components/input-search/taiga-ui-layout-components-input-search.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n type ElementRef,\n type EmbeddedViewRef,\n EventEmitter,\n inject,\n Input,\n type OnChanges,\n Output,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {\n tuiContainsOrAfter,\n tuiInjectElement,\n tuiIsElement,\n} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetClosestFocusable} from '@taiga-ui/cdk/utils/focus';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n TuiTextfieldComponent,\n TuiWithTextfield,\n} from '@taiga-ui/core/components/textfield';\nimport {TuiIcons} from '@taiga-ui/core/directives/icons';\nimport {TuiPopupService} from '@taiga-ui/core/directives/popup';\nimport {TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {tuiCellOptionsProvider} from '@taiga-ui/layout/components/cell';\nimport {TUI_INPUT_SEARCH} from '@taiga-ui/layout/tokens';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\n@Component({\n standalone: true,\n selector: 'input[tuiInputSearch]',\n imports: [PolymorpheusOutlet],\n templateUrl: './input-search.component.html',\n styleUrls: ['./input-search.component.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiCellOptionsProvider({size: 'm'})],\n hostDirectives: [TuiWithTextfield],\n host: {\n ngSkipHydration: 'true',\n '(focus)': 'open()',\n '(keydown.tab.prevent)': '0',\n '(keydown.arrowDown.prevent)': 'onArrow()',\n },\n})\nexport class TuiInputSearch implements OnChanges {\n @ViewChild(TemplateRef)\n private readonly template?: TemplateRef<any>;\n\n @ViewChild('container')\n private readonly container?: ElementRef<HTMLElement>;\n\n private readonly el = tuiInjectElement<HTMLInputElement>();\n private readonly service = inject(TuiPopupService);\n private readonly textfield = inject(TuiTextfieldComponent);\n private readonly i18n = toSignal(inject(TUI_INPUT_SEARCH));\n private parent = this.textfield.el.parentElement;\n private neighbor = this.textfield.el.nextSibling;\n private placeholder = '';\n private ref?: EmbeddedViewRef<unknown>;\n\n protected readonly icon = tuiDirectiveBinding(\n TuiIcons,\n 'iconStart',\n inject(TUI_COMMON_ICONS).search,\n {},\n );\n\n @Input()\n public tuiInputSearch: PolymorpheusContent;\n\n @Input()\n public tuiInputSearchOpen = false;\n\n @Output()\n public readonly tuiInputSearchOpenChange = new EventEmitter<boolean>();\n\n public ngOnChanges(): void {\n if (this.tuiInputSearchOpen) {\n this.open();\n } else {\n this.close();\n }\n }\n\n public open(): void {\n if (this.ref?.destroyed === false || !this.template) {\n return;\n }\n\n this.placeholder = this.el.placeholder;\n this.parent = this.textfield.el.parentElement;\n this.neighbor = this.textfield.el.nextSibling;\n this.ref = this.service.addTemplate(this.template);\n this.ref.rootNodes[0]?.insertAdjacentElement('afterbegin', this.textfield.el);\n this.el.focus({preventScroll: true});\n this.el.placeholder = this.i18n()?.placeholder || this.el.placeholder;\n this.tuiInputSearchOpen = true;\n this.tuiInputSearchOpenChange.emit(true);\n }\n\n public close(): void {\n this.el.placeholder = this.placeholder || this.el.placeholder;\n this.parent?.insertBefore(this.textfield.el, this.neighbor);\n this.ref?.destroy();\n this.tuiInputSearchOpen = false;\n this.tuiInputSearchOpenChange.emit(false);\n }\n\n protected onArrow(): void {\n tuiGetClosestFocusable({\n initial: this.container?.nativeElement || this.el,\n root: this.container?.nativeElement || this.el,\n })?.focus();\n }\n\n protected onFocus({target}: Event): void {\n if (\n this.container &&\n target !== this.el &&\n tuiIsElement(target) &&\n !tuiContainsOrAfter(this.container.nativeElement, target)\n ) {\n this.close();\n }\n }\n}\n","<ng-template>\n <div\n tuiTheme=\"dark\"\n class=\"t-container\"\n (document:focusin)=\"onFocus($event)\"\n (keydown.esc)=\"close()\"\n (pointerdown.self)=\"close()\"\n >\n <div\n #container\n class=\"t-content\"\n >\n <ng-container *polymorpheusOutlet=\"tuiInputSearch\" />\n </div>\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAgCA,MAgBa,cAAc,CAAA;AAhB3B,IAAA,WAAA,GAAA;QAuBqB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAoB,CAAC;AAC1C,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAClC,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;QAC1C,IAAI,CAAA,IAAA,GAAG,QAAQ,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC;QACnD,IAAM,CAAA,MAAA,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,aAAa,CAAC;QACzC,IAAQ,CAAA,QAAA,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,WAA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,EAAA,QAAA,EAAA,0ZAAA,EAAA,MAAA,EAAA,CAAA,waAAA,CAAA,EAAA,CAAA;8BAIgB,QAAQ,EAAA,CAAA;sBADxB,SAAS;uBAAC,WAAW,CAAA;gBAIL,SAAS,EAAA,CAAA;sBADzB,SAAS;uBAAC,WAAW,CAAA;gBAoBf,cAAc,EAAA,CAAA;sBADpB,KAAK;gBAIC,kBAAkB,EAAA,CAAA;sBADxB,KAAK;gBAIU,wBAAwB,EAAA,CAAA;sBADvC,MAAM;;;AE7EX;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-layout-components-input-search.mjs","sources":["../../../projects/layout/components/input-search/input-search.component.ts","../../../projects/layout/components/input-search/input-search.component.html","../../../projects/layout/components/input-search/taiga-ui-layout-components-input-search.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n type ElementRef,\n type EmbeddedViewRef,\n inject,\n input,\n model,\n type OnChanges,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {\n tuiContainsOrAfter,\n tuiInjectElement,\n tuiIsElement,\n} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetClosestFocusable} from '@taiga-ui/cdk/utils/focus';\nimport {tuiCellOptionsProvider} from '@taiga-ui/core/components/cell';\nimport {\n TuiTextfieldComponent,\n TuiWithTextfield,\n} from '@taiga-ui/core/components/textfield';\nimport {tuiIconStart} from '@taiga-ui/core/directives/icons';\nimport {TuiPopupService} from '@taiga-ui/core/directives/popup';\nimport {TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {TUI_INPUT_SEARCH} from '@taiga-ui/layout/tokens';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\n@Component({\n selector: 'input[tuiInputSearch]',\n imports: [PolymorpheusOutlet],\n templateUrl: './input-search.component.html',\n styleUrls: ['./input-search.component.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiCellOptionsProvider({size: 'm'})],\n hostDirectives: [TuiWithTextfield],\n host: {\n ngSkipHydration: 'true',\n '(focus)': 'open()',\n '(keydown.tab.prevent)': '0',\n '(keydown.arrowDown.prevent)': 'onArrow()',\n },\n})\nexport class TuiInputSearch implements OnChanges {\n @ViewChild(TemplateRef)\n private readonly template?: TemplateRef<any>;\n\n @ViewChild('container')\n private readonly container?: ElementRef<HTMLElement>;\n\n private readonly el = tuiInjectElement<HTMLInputElement>();\n private readonly service = inject(TuiPopupService);\n private readonly textfield = inject(TuiTextfieldComponent);\n private readonly i18n = toSignal(inject(TUI_INPUT_SEARCH));\n private parent = this.textfield.el.parentElement;\n private neighbor = this.textfield.el.nextSibling;\n private placeholder = '';\n private ref?: EmbeddedViewRef<unknown>;\n\n protected readonly icon = tuiIconStart(inject(TUI_COMMON_ICONS).search, {});\n\n public readonly tuiInputSearch = input<PolymorpheusContent>();\n\n public searchOpen = model(false, {alias: 'tuiInputSearchOpen'});\n\n public ngOnChanges(): void {\n if (this.searchOpen()) {\n this.open();\n } else {\n this.close();\n }\n }\n\n public open(): void {\n if (this.ref?.destroyed === false || !this.template) {\n return;\n }\n\n this.placeholder = this.el.placeholder;\n this.parent = this.textfield.el.parentElement;\n this.neighbor = this.textfield.el.nextSibling;\n this.ref = this.service.addTemplate(this.template);\n this.ref.rootNodes[0]?.insertAdjacentElement('afterbegin', this.textfield.el);\n this.el.focus({preventScroll: true});\n this.el.placeholder = this.i18n()?.placeholder || this.el.placeholder;\n this.searchOpen.set(true);\n }\n\n public close(): void {\n this.el.placeholder = this.placeholder || this.el.placeholder;\n this.parent?.insertBefore(this.textfield.el, this.neighbor);\n this.ref?.destroy();\n this.searchOpen.set(false);\n }\n\n protected onArrow(): void {\n tuiGetClosestFocusable({\n initial: this.container?.nativeElement || this.el,\n root: this.container?.nativeElement || this.el,\n })?.focus();\n }\n\n protected onFocus({target}: Event): void {\n if (\n this.container &&\n target !== this.el &&\n tuiIsElement(target) &&\n !tuiContainsOrAfter(this.container.nativeElement, target)\n ) {\n this.close();\n }\n }\n}\n","<ng-template>\n <div\n tuiTheme=\"dark\"\n class=\"t-container\"\n (document:focusin)=\"onFocus($event)\"\n (keydown.esc)=\"close()\"\n (pointerdown.self)=\"close()\"\n >\n <div\n #container\n class=\"t-content\"\n >\n <ng-container *polymorpheusOutlet=\"tuiInputSearch()\" />\n </div>\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MA6Ca,cAAc,CAAA;AAf3B,IAAA,WAAA,GAAA;QAsBqB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAoB;AACzC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC;AACjC,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAC;QACzC,IAAI,CAAA,IAAA,GAAG,QAAQ,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAClD,IAAM,CAAA,MAAA,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,aAAa;QACxC,IAAQ,CAAA,QAAA,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,WAAW;QACxC,IAAW,CAAA,WAAA,GAAG,EAAE;AAGL,QAAA,IAAA,CAAA,IAAI,GAAG,YAAY,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;QAE3D,IAAc,CAAA,cAAA,GAAG,KAAK,EAAuB;QAEtD,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC,KAAK,EAAE,EAAC,KAAK,EAAE,oBAAoB,EAAC,CAAC;AAiDlE;IA/CU,WAAW,GAAA;AACd,QAAA,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE;YACnB,IAAI,CAAC,IAAI,EAAE;;aACR;YACH,IAAI,CAAC,KAAK,EAAE;;;IAIb,IAAI,GAAA;AACP,QAAA,IAAI,IAAI,CAAC,GAAG,EAA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A;;4FAanB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAf1B,SAAS;+BACI,uBAAuB,EAAA,OAAA,EACxB,CAAC,kBAAkB,CAAC,mBAGZ,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC,CAAC,sBAAsB,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,CAAC,EAChC,cAAA,EAAA,CAAC,gBAAgB,CAAC,EAC5B,IAAA,EAAA;AACF,wBAAA,eAAe,EAAE,MAAM;AACvB,wBAAA,SAAS,EAAE,QAAQ;AACnB,wBAAA,uBAAuB,EAAE,GAAG;AAC5B,wBAAA,6BAA6B,EAAE,WAAW;AAC7C,qBAAA,EAAA,QAAA,EAAA,4ZAAA,EAAA,MAAA,EAAA,CAAA,iXAAA,CAAA,EAAA;8BAIgB,QAAQ,EAAA,CAAA;sBADxB,SAAS;uBAAC,WAAW;gBAIL,SAAS,EAAA,CAAA;sBADzB,SAAS;uBAAC,WAAW;;;AEjD1B;;AAEG;;;;"}
@@ -1,60 +1,46 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ViewEncapsulation, ChangeDetectionStrategy, Directive, Input } from '@angular/core';
2
+ import { ChangeDetectionStrategy, ViewEncapsulation, Component, input, Directive } from '@angular/core';
3
3
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
4
4
  import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
5
- import { timer, take } from 'rxjs';
6
5
 
7
- class TuiItemGroupStyles {
8
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiItemGroupStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiItemGroupStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-item-group" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiItemGroup]{display:flex;flex-wrap:wrap;--tui-item-margin: .25rem}[tuiItemGroup]>*:not(tui-items-with-more){margin:0 var(--tui-item-margin) var(--tui-item-margin) 0}[tuiItemGroup]._horizontal{scrollbar-width:none;-ms-overflow-style:none;flex-wrap:nowrap;overflow:scroll}[tuiItemGroup]._horizontal::-webkit-scrollbar,[tuiItemGroup]._horizontal::-webkit-scrollbar-thumb{display:none}[tuiItemGroup]._horizontal>*:not(tui-items-with-more){margin-block-end:0}[tuiItemGroup]._initialized tui-items-with-more .t-item{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:1;transform:scale(1)}[tuiItemGroup]._initialized tui-items-with-more .t-item>*{margin:0 var(--tui-item-margin) var(--tui-item-margin) 0}[tuiItemGroup]._initialized tui-items-with-more .t-item_hidden{opacity:0;transform:scale(.9)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
6
+ const OPTIONS = { behavior: 'smooth', block: 'nearest', inline: 'center' };
7
+ class Styles {
8
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-item-group" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiItemGroup]{display:flex;flex-wrap:wrap;--tui-item-margin: .25rem}[tuiItemGroup]>*:not(tui-items-with-more){margin:0 var(--tui-item-margin) var(--tui-item-margin) 0}[tuiItemGroup]._horizontal{scrollbar-width:none;-ms-overflow-style:none;flex-wrap:nowrap;overflow:scroll}[tuiItemGroup]._horizontal::-webkit-scrollbar,[tuiItemGroup]._horizontal::-webkit-scrollbar-thumb{display:none}[tuiItemGroup]._horizontal>*:not(tui-items-with-more){margin-block-end:0}[tuiItemGroup]._initialized tui-items-with-more .t-item{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:1;transform:scale(1)}[tuiItemGroup]._initialized tui-items-with-more .t-item>*{margin:0 var(--tui-item-margin) var(--tui-item-margin) 0}[tuiItemGroup]._initialized tui-items-with-more .t-item_hidden{opacity:0;transform:scale(.9)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
10
10
  }
11
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiItemGroupStyles, decorators: [{
11
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, decorators: [{
12
12
  type: Component,
13
- args: [{ standalone: true, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
14
- class: 'tui-item-group',
15
- }, styles: ["[tuiItemGroup]{display:flex;flex-wrap:wrap;--tui-item-margin: .25rem}[tuiItemGroup]>*:not(tui-items-with-more){margin:0 var(--tui-item-margin) var(--tui-item-margin) 0}[tuiItemGroup]._horizontal{scrollbar-width:none;-ms-overflow-style:none;flex-wrap:nowrap;overflow:scroll}[tuiItemGroup]._horizontal::-webkit-scrollbar,[tuiItemGroup]._horizontal::-webkit-scrollbar-thumb{display:none}[tuiItemGroup]._horizontal>*:not(tui-items-with-more){margin-block-end:0}[tuiItemGroup]._initialized tui-items-with-more .t-item{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:1;transform:scale(1)}[tuiItemGroup]._initialized tui-items-with-more .t-item>*{margin:0 var(--tui-item-margin) var(--tui-item-margin) 0}[tuiItemGroup]._initialized tui-items-with-more .t-item_hidden{opacity:0;transform:scale(.9)}\n"] }]
13
+ args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-item-group' }, styles: ["[tuiItemGroup]{display:flex;flex-wrap:wrap;--tui-item-margin: .25rem}[tuiItemGroup]>*:not(tui-items-with-more){margin:0 var(--tui-item-margin) var(--tui-item-margin) 0}[tuiItemGroup]._horizontal{scrollbar-width:none;-ms-overflow-style:none;flex-wrap:nowrap;overflow:scroll}[tuiItemGroup]._horizontal::-webkit-scrollbar,[tuiItemGroup]._horizontal::-webkit-scrollbar-thumb{display:none}[tuiItemGroup]._horizontal>*:not(tui-items-with-more){margin-block-end:0}[tuiItemGroup]._initialized tui-items-with-more .t-item{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:1;transform:scale(1)}[tuiItemGroup]._initialized tui-items-with-more .t-item>*{margin:0 var(--tui-item-margin) var(--tui-item-margin) 0}[tuiItemGroup]._initialized tui-items-with-more .t-item_hidden{opacity:0;transform:scale(.9)}\n"] }]
16
14
  }] });
17
15
  class TuiItemGroup {
18
16
  constructor() {
19
17
  this.el = tuiInjectElement();
20
- this.nothing = tuiWithStyles(TuiItemGroupStyles);
21
- this.horizontal = false;
22
- this.autoscroll = false;
18
+ this.nothing = tuiWithStyles(Styles);
19
+ this.horizontal = input(false);
20
+ this.autoscroll = input(false);
23
21
  }
24
22
  ngAfterViewInit() {
25
23
  this.el.classList.add('_initialized');
26
24
  }
27
25
  onClick(target) {
28
- if (this.autoscroll && this.horizontal) {
29
- timer(0) // Safari bug
30
- .pipe(take(1))
31
- .subscribe(() => {
32
- target.scrollIntoView({
33
- behavior: 'smooth',
34
- block: 'nearest',
35
- inline: 'center',
36
- });
37
- });
26
+ if (this.autoscroll() && this.horizontal()) {
27
+ // Safari bug
28
+ setTimeout(() => target.scrollIntoView(OPTIONS));
38
29
  }
39
30
  }
40
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiItemGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
41
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiItemGroup, isStandalone: true, selector: "[tuiItemGroup]", inputs: { horizontal: "horizontal", autoscroll: "autoscroll" }, host: { listeners: { "click": "onClick($event.target)" }, properties: { "class._horizontal": "horizontal" } }, ngImport: i0 }); }
31
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiItemGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
32
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiItemGroup, isStandalone: true, selector: "[tuiItemGroup]", inputs: { horizontal: { classPropertyName: "horizontal", publicName: "horizontal", isSignal: true, isRequired: false, transformFunction: null }, autoscroll: { classPropertyName: "autoscroll", publicName: "autoscroll", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event.target)" }, properties: { "class._horizontal": "horizontal()" } }, ngImport: i0 }); }
42
33
  }
43
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiItemGroup, decorators: [{
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiItemGroup, decorators: [{
44
35
  type: Directive,
45
36
  args: [{
46
- standalone: true,
47
37
  selector: '[tuiItemGroup]',
48
38
  host: {
49
39
  '(click)': 'onClick($event.target)',
50
- '[class._horizontal]': 'horizontal',
40
+ '[class._horizontal]': 'horizontal()',
51
41
  },
52
42
  }]
53
- }], propDecorators: { horizontal: [{
54
- type: Input
55
- }], autoscroll: [{
56
- type: Input
57
- }] } });
43
+ }] });
58
44
 
59
45
  /**
60
46
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-layout-components-item-group.mjs","sources":["../../../projects/layout/components/item-group/item-group.directive.ts","../../../projects/layout/components/item-group/taiga-ui-layout-components-item-group.ts"],"sourcesContent":["import {\n type AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n Directive,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {take, timer} from 'rxjs';\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./item-group.styles.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-item-group',\n },\n})\nclass TuiItemGroupStyles {}\n\n@Directive({\n standalone: true,\n selector: '[tuiItemGroup]',\n host: {\n '(click)': 'onClick($event.target)',\n '[class._horizontal]': 'horizontal',\n },\n})\nexport class TuiItemGroup implements AfterViewInit {\n private readonly el = tuiInjectElement();\n protected readonly nothing = tuiWithStyles(TuiItemGroupStyles);\n\n @Input()\n public horizontal = false;\n\n @Input()\n public autoscroll = false;\n\n public ngAfterViewInit(): void {\n this.el.classList.add('_initialized');\n }\n\n protected onClick(target: HTMLElement): void {\n if (this.autoscroll && this.horizontal) {\n timer(0) // Safari bug\n .pipe(take(1))\n .subscribe(() => {\n target.scrollIntoView({\n behavior: 'smooth',\n block: 'nearest',\n inline: 'center',\n });\n });\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAYA,MAUM,kBAAkB,CAAA;+GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,kBAAkB,oHARV,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,42BAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CA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EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,wBAAA,EAAA,EAAA,UAAA,EAAA,EAAA,mBAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBARxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,IAAI,EAAE;AACF,wBAAA,SAAS,EAAE,wBAAwB;AACnC,wBAAA,qBAAqB,EAAE,YAAY;AACtC,qBAAA;AACJ,iBAAA,CAAA;8BAMU,UAAU,EAAA,CAAA;sBADhB,KAAK;gBAIC,UAAU,EAAA,CAAA;sBADhB,KAAK;;;ACvCV;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-layout-components-item-group.mjs","sources":["../../../projects/layout/components/item-group/item-group.directive.ts","../../../projects/layout/components/item-group/taiga-ui-layout-components-item-group.ts"],"sourcesContent":["import {\n type AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n Directive,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\n\nconst OPTIONS = {behavior: 'smooth', block: 'nearest', inline: 'center'} as const;\n\n@Component({\n template: '',\n styleUrls: ['./item-group.styles.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-item-group'},\n})\nclass Styles {}\n\n@Directive({\n selector: '[tuiItemGroup]',\n host: {\n '(click)': 'onClick($event.target)',\n '[class._horizontal]': 'horizontal()',\n },\n})\nexport class TuiItemGroup implements AfterViewInit {\n private readonly el = tuiInjectElement();\n\n protected readonly nothing = tuiWithStyles(Styles);\n\n public readonly horizontal = input(false);\n public readonly autoscroll = input(false);\n\n public ngAfterViewInit(): void {\n this.el.classList.add('_initialized');\n }\n\n protected onClick(target: HTMLElement): void {\n if (this.autoscroll() && this.horizontal()) {\n // Safari bug\n setTimeout(() => target.scrollIntoView(OPTIONS));\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAWA,MAAM,OAAO,GAAG,EAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAU;AAEjF,MAOM,MAAM,CAAA;+GAAN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,MAAM,oHANE,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,42BAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAMV,MAAM,EAAA,UAAA,EAAA,CAAA;kBAPX,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAE,EAEG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA,EAAC,KAAK,EAAE,gBAAgB,EAAC,EAAA,MAAA,EAAA,CAAA,42BAAA,CAAA,EAAA;;MAWtB,YAAY,CAAA;AAPzB,IAAA,WAAA,GAAA;QAQqB,I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