@taiga-ui/layout 4.51.0 → 4.52.0-canary.05c3268
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/app-bar/app-bar.component.d.ts +2 -2
- package/components/app-bar/app-bar.directive.d.ts +2 -2
- package/components/block-status/block-status.component.d.ts +3 -3
- package/components/block-status/block-status.directive.d.ts +2 -2
- package/components/card/collapsed.directive.d.ts +2 -2
- package/components/card/large.directive.d.ts +3 -2
- package/components/card/medium.directive.d.ts +2 -1
- package/components/dynamic-header/dynamic-header-container.directive.d.ts +2 -2
- package/components/form/form.directive.d.ts +3 -4
- package/components/form/form.options.d.ts +2 -2
- package/components/index.d.ts +2 -2
- package/components/input-search/input-search.component.d.ts +4 -5
- package/components/item-group/item-group.directive.d.ts +3 -3
- package/components/navigation/aside-group.component.d.ts +6 -7
- package/components/navigation/aside.component.d.ts +2 -3
- package/components/navigation/drawer.component.d.ts +3 -3
- package/components/pdf-viewer/index.d.ts +1 -0
- package/components/pdf-viewer/pdf-viewer.component.d.ts +12 -0
- package/components/search/search-filter.component.d.ts +3 -2
- package/components/search/search-filters.component.d.ts +6 -8
- package/components/surface/index.d.ts +1 -0
- package/components/surface/surface.directive.d.ts +6 -0
- package/fesm2022/taiga-ui-layout-components-app-bar.mjs +22 -30
- package/fesm2022/taiga-ui-layout-components-app-bar.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-block-details.mjs +10 -13
- package/fesm2022/taiga-ui-layout-components-block-details.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-block-status.mjs +14 -20
- package/fesm2022/taiga-ui-layout-components-block-status.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-card.mjs +55 -65
- package/fesm2022/taiga-ui-layout-components-card.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-dynamic-header.mjs +37 -54
- package/fesm2022/taiga-ui-layout-components-dynamic-header.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-form.mjs +31 -30
- package/fesm2022/taiga-ui-layout-components-form.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-input-search.mjs +14 -23
- package/fesm2022/taiga-ui-layout-components-input-search.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-item-group.mjs +18 -32
- package/fesm2022/taiga-ui-layout-components-item-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-navigation.mjs +80 -95
- package/fesm2022/taiga-ui-layout-components-navigation.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-pdf-viewer.mjs +46 -0
- package/fesm2022/taiga-ui-layout-components-pdf-viewer.mjs.map +1 -0
- package/fesm2022/taiga-ui-layout-components-search.mjs +31 -50
- package/fesm2022/taiga-ui-layout-components-search.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-surface.mjs +33 -0
- package/fesm2022/taiga-ui-layout-components-surface.mjs.map +1 -0
- package/fesm2022/taiga-ui-layout-components.mjs +2 -2
- package/fesm2022/taiga-ui-layout-tokens.mjs.map +1 -1
- package/package.json +14 -44
- package/components/cell/cell.directive.d.ts +0 -10
- package/components/cell/cell.options.d.ts +0 -6
- package/components/cell/index.d.ts +0 -2
- package/components/header/header.directive.d.ts +0 -18
- package/components/header/index.d.ts +0 -1
- package/esm2022/components/app-bar/app-bar-back.component.mjs +0 -20
- package/esm2022/components/app-bar/app-bar-size.directive.mjs +0 -24
- package/esm2022/components/app-bar/app-bar.component.mjs +0 -39
- package/esm2022/components/app-bar/app-bar.directive.mjs +0 -20
- package/esm2022/components/app-bar/app-bar.mjs +0 -11
- package/esm2022/components/app-bar/app-bar.providers.mjs +0 -19
- package/esm2022/components/app-bar/index.mjs +0 -7
- package/esm2022/components/app-bar/taiga-ui-layout-components-app-bar.mjs +0 -5
- package/esm2022/components/block-details/block-details.directive.mjs +0 -29
- package/esm2022/components/block-details/index.mjs +0 -2
- package/esm2022/components/block-details/taiga-ui-layout-components-block-details.mjs +0 -5
- package/esm2022/components/block-status/block-status.component.mjs +0 -23
- package/esm2022/components/block-status/block-status.directive.mjs +0 -20
- package/esm2022/components/block-status/block-status.mjs +0 -4
- package/esm2022/components/block-status/index.mjs +0 -4
- package/esm2022/components/block-status/taiga-ui-layout-components-block-status.mjs +0 -5
- package/esm2022/components/card/card.mjs +0 -11
- package/esm2022/components/card/collapsed.directive.mjs +0 -38
- package/esm2022/components/card/index.mjs +0 -6
- package/esm2022/components/card/large.directive.mjs +0 -37
- package/esm2022/components/card/medium.directive.mjs +0 -29
- package/esm2022/components/card/row.directive.mjs +0 -29
- package/esm2022/components/card/taiga-ui-layout-components-card.mjs +0 -5
- package/esm2022/components/cell/cell.directive.mjs +0 -53
- package/esm2022/components/cell/cell.options.mjs +0 -3
- package/esm2022/components/cell/index.mjs +0 -3
- package/esm2022/components/cell/taiga-ui-layout-components-cell.mjs +0 -5
- package/esm2022/components/dynamic-header/dynamic-header-anchor.directive.mjs +0 -34
- package/esm2022/components/dynamic-header/dynamic-header-container.directive.mjs +0 -41
- package/esm2022/components/dynamic-header/dynamic-header.component.mjs +0 -59
- package/esm2022/components/dynamic-header/dynamic-header.mjs +0 -9
- package/esm2022/components/dynamic-header/index.mjs +0 -5
- package/esm2022/components/dynamic-header/taiga-ui-layout-components-dynamic-header.mjs +0 -5
- package/esm2022/components/form/form.directive.mjs +0 -95
- package/esm2022/components/form/form.options.mjs +0 -3
- package/esm2022/components/form/index.mjs +0 -3
- package/esm2022/components/form/taiga-ui-layout-components-form.mjs +0 -5
- package/esm2022/components/header/header.directive.mjs +0 -54
- package/esm2022/components/header/index.mjs +0 -2
- package/esm2022/components/header/taiga-ui-layout-components-header.mjs +0 -5
- package/esm2022/components/index.mjs +0 -13
- package/esm2022/components/input-search/index.mjs +0 -2
- package/esm2022/components/input-search/input-search.component.mjs +0 -96
- package/esm2022/components/input-search/taiga-ui-layout-components-input-search.mjs +0 -5
- package/esm2022/components/item-group/index.mjs +0 -2
- package/esm2022/components/item-group/item-group.directive.mjs +0 -58
- package/esm2022/components/item-group/taiga-ui-layout-components-item-group.mjs +0 -5
- package/esm2022/components/navigation/aside-group.component.mjs +0 -59
- package/esm2022/components/navigation/aside-item.directive.mjs +0 -88
- package/esm2022/components/navigation/aside.component.mjs +0 -67
- package/esm2022/components/navigation/drawer.component.mjs +0 -97
- package/esm2022/components/navigation/header.component.mjs +0 -34
- package/esm2022/components/navigation/hint-aside.directive.mjs +0 -31
- package/esm2022/components/navigation/index.mjs +0 -12
- package/esm2022/components/navigation/logo.component.mjs +0 -12
- package/esm2022/components/navigation/main.component.mjs +0 -14
- package/esm2022/components/navigation/nav.component.mjs +0 -23
- package/esm2022/components/navigation/navigation.mjs +0 -24
- package/esm2022/components/navigation/subheader.component.mjs +0 -68
- package/esm2022/components/navigation/taiga-ui-layout-components-navigation.mjs +0 -5
- package/esm2022/components/search/index.mjs +0 -4
- package/esm2022/components/search/search-filter.component.mjs +0 -44
- package/esm2022/components/search/search-filters.component.mjs +0 -81
- package/esm2022/components/search/search.component.mjs +0 -26
- package/esm2022/components/search/search.mjs +0 -9
- package/esm2022/components/search/taiga-ui-layout-components-search.mjs +0 -5
- package/esm2022/components/taiga-ui-layout-components.mjs +0 -5
- package/esm2022/index.mjs +0 -3
- package/esm2022/taiga-ui-layout.mjs +0 -5
- package/esm2022/tokens/common-icons.mjs +0 -21
- package/esm2022/tokens/i18n.mjs +0 -6
- package/esm2022/tokens/index.mjs +0 -3
- package/esm2022/tokens/taiga-ui-layout-tokens.mjs +0 -5
- package/fesm2022/taiga-ui-layout-components-cell.mjs +0 -61
- package/fesm2022/taiga-ui-layout-components-cell.mjs.map +0 -1
- package/fesm2022/taiga-ui-layout-components-header.mjs +0 -60
- package/fesm2022/taiga-ui-layout-components-header.mjs.map +0 -1
|
@@ -1,73 +1,76 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
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';
|
|
9
|
+
import { TUI_BLOCK_OPTIONS } from '@taiga-ui/kit/components/block';
|
|
10
|
+
import { TUI_CHECKBOX_OPTIONS } from '@taiga-ui/kit/components/checkbox';
|
|
11
|
+
import { TUI_RADIO_OPTIONS } from '@taiga-ui/kit/components/radio';
|
|
8
12
|
import { TUI_SEGMENTED_OPTIONS } from '@taiga-ui/kit/components/segmented';
|
|
9
13
|
import { TUI_SWITCH_OPTIONS } from '@taiga-ui/kit/components/switch';
|
|
10
|
-
import { TUI_HEADER_OPTIONS } from '@taiga-ui/layout/components/header';
|
|
11
14
|
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
12
15
|
|
|
13
16
|
const [TUI_FORM_OPTIONS, tuiFormOptionsProvider] = tuiCreateOptions({ size: 'l' });
|
|
14
17
|
|
|
15
18
|
const HEADER_SIZE = {
|
|
16
|
-
s: '
|
|
17
|
-
m: '
|
|
18
|
-
l: '
|
|
19
|
+
s: 'body-m',
|
|
20
|
+
m: 'h6',
|
|
21
|
+
l: 'h5',
|
|
19
22
|
};
|
|
20
|
-
class
|
|
21
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
22
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
23
|
+
class Styles {
|
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
25
|
+
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-template-columns:repeat(auto-fit,minmax(10rem,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
26
|
}
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, decorators: [{
|
|
25
28
|
type: Component,
|
|
26
|
-
args: [{
|
|
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"] }]
|
|
29
|
+
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-template-columns:repeat(auto-fit,minmax(10rem,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
30
|
}] });
|
|
30
31
|
class TuiForm {
|
|
31
32
|
constructor() {
|
|
33
|
+
this.nothing = tuiWithStyles(Styles);
|
|
32
34
|
this.options = inject(TUI_FORM_OPTIONS);
|
|
33
|
-
this.
|
|
34
|
-
this.size = this.options.size;
|
|
35
|
+
this.size = input(this.options.size, { alias: 'tuiForm' });
|
|
35
36
|
}
|
|
36
|
-
|
|
37
|
-
|
|
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: [
|
|
37
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiForm, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
38
|
+
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
39
|
projectSize(TUI_BUTTON_OPTIONS, (size) => size),
|
|
40
|
+
projectSize(TUI_BLOCK_OPTIONS, (size) => size),
|
|
42
41
|
projectSize(TUI_NOTIFICATION_OPTIONS, (size) => size),
|
|
43
|
-
projectSize(TUI_HEADER_OPTIONS, (size) => HEADER_SIZE[size]),
|
|
42
|
+
projectSize(TUI_HEADER_OPTIONS, (size) => HEADER_SIZE[size || 'l']),
|
|
44
43
|
projectSize(TUI_SWITCH_OPTIONS, (size) => (size === 'l' ? 'm' : 's')),
|
|
44
|
+
projectSize(TUI_RADIO_OPTIONS, (size) => (size === 'l' ? 'm' : 's')),
|
|
45
|
+
projectSize(TUI_CHECKBOX_OPTIONS, (size) => (size === 'l' ? 'm' : 's')),
|
|
45
46
|
projectSize(TUI_SEGMENTED_OPTIONS, (size) => (size === 'l' ? 'm' : 's')),
|
|
46
47
|
{
|
|
47
48
|
provide: TUI_TEXTFIELD_OPTIONS,
|
|
48
49
|
useFactory: () => ({
|
|
49
50
|
...inject(TUI_TEXTFIELD_OPTIONS, { skipSelf: true }),
|
|
50
|
-
size: signal(inject(TuiForm).size),
|
|
51
|
+
size: signal(inject(TuiForm).size() || inject(TUI_FORM_OPTIONS).size || 'l'),
|
|
51
52
|
}),
|
|
52
53
|
},
|
|
53
54
|
], hostDirectives: [{ directive: i1.TuiTextfieldOptionsDirective, inputs: ["tuiTextfieldAppearance", "tuiTextfieldAppearance", "tuiTextfieldCleaner", "tuiTextfieldCleaner"] }], ngImport: i0 }); }
|
|
54
55
|
}
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiForm, decorators: [{
|
|
56
57
|
type: Directive,
|
|
57
58
|
args: [{
|
|
58
|
-
standalone: true,
|
|
59
59
|
selector: '[tuiForm]',
|
|
60
60
|
providers: [
|
|
61
61
|
projectSize(TUI_BUTTON_OPTIONS, (size) => size),
|
|
62
|
+
projectSize(TUI_BLOCK_OPTIONS, (size) => size),
|
|
62
63
|
projectSize(TUI_NOTIFICATION_OPTIONS, (size) => size),
|
|
63
|
-
projectSize(TUI_HEADER_OPTIONS, (size) => HEADER_SIZE[size]),
|
|
64
|
+
projectSize(TUI_HEADER_OPTIONS, (size) => HEADER_SIZE[size || 'l']),
|
|
64
65
|
projectSize(TUI_SWITCH_OPTIONS, (size) => (size === 'l' ? 'm' : 's')),
|
|
66
|
+
projectSize(TUI_RADIO_OPTIONS, (size) => (size === 'l' ? 'm' : 's')),
|
|
67
|
+
projectSize(TUI_CHECKBOX_OPTIONS, (size) => (size === 'l' ? 'm' : 's')),
|
|
65
68
|
projectSize(TUI_SEGMENTED_OPTIONS, (size) => (size === 'l' ? 'm' : 's')),
|
|
66
69
|
{
|
|
67
70
|
provide: TUI_TEXTFIELD_OPTIONS,
|
|
68
71
|
useFactory: () => ({
|
|
69
72
|
...inject(TUI_TEXTFIELD_OPTIONS, { skipSelf: true }),
|
|
70
|
-
size: signal(inject(TuiForm).size),
|
|
73
|
+
size: signal(inject(TuiForm).size() || inject(TUI_FORM_OPTIONS).size || 'l'),
|
|
71
74
|
}),
|
|
72
75
|
},
|
|
73
76
|
],
|
|
@@ -79,18 +82,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
79
82
|
],
|
|
80
83
|
host: {
|
|
81
84
|
tuiForm: '',
|
|
82
|
-
'[attr.data-size]': 'size',
|
|
85
|
+
'[attr.data-size]': 'size() || options.size || "l"',
|
|
83
86
|
},
|
|
84
87
|
}]
|
|
85
|
-
}]
|
|
86
|
-
type: Input
|
|
87
|
-
}] } });
|
|
88
|
+
}] });
|
|
88
89
|
function projectSize(provide, project) {
|
|
89
90
|
return {
|
|
90
91
|
provide,
|
|
91
92
|
useFactory: () => ({
|
|
92
93
|
...inject(provide, { skipSelf: true }),
|
|
93
|
-
size: project(inject(TuiForm).size),
|
|
94
|
+
size: project(inject(TuiForm).size() || inject(TUI_FORM_OPTIONS).size || 'l'),
|
|
94
95
|
}),
|
|
95
96
|
};
|
|
96
97
|
}
|
|
@@ -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
|
|
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_BLOCK_OPTIONS} from '@taiga-ui/kit/components/block';\nimport {TUI_CHECKBOX_OPTIONS} from '@taiga-ui/kit/components/checkbox';\nimport {TUI_RADIO_OPTIONS} from '@taiga-ui/kit/components/radio';\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_BLOCK_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_RADIO_OPTIONS, (size) => (size === 'l' ? 'm' : 's')),\n projectSize(TUI_CHECKBOX_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(TuiForm).size() || inject(TUI_FORM_OPTIONS).size || 'l'),\n }),\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAOa,MAAA,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,GACnD,gBAAgB,CAAiB,EAAC,IAAI,EAAE,GAAG,EAAC;;ACoBhD,MAAM,WAAW,GAAG;AAChB,IAAA,CAAC,EAAE,QAAQ;AACX,IAAA,CAAC,EAAE,IAAI;AACP,IAAA,CAAC,EAAE,IAAI;CACD;AAEV,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,8GANE,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,olCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAMV,MAAM,EAAA,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B,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;;AC7FA;;AAEG;;;;"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject,
|
|
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 {
|
|
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 {
|
|
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 =
|
|
26
|
-
this.
|
|
27
|
-
this.
|
|
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.
|
|
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.
|
|
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.
|
|
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: "
|
|
73
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
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: "
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputSearch, decorators: [{
|
|
76
73
|
type: Component,
|
|
77
|
-
args: [{
|
|
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
|
|
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
|
|
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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EAAA,aAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,4ZAgBA,yaDgBc,kBAAkB,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,EAAA,2BAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;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 {
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
static { this.ɵ
|
|
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: "
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, decorators: [{
|
|
12
12
|
type: Component,
|
|
13
|
-
args: [{
|
|
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(
|
|
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
|
-
|
|
30
|
-
|
|
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: "
|
|
41
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
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: "
|
|
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
|
-
}]
|
|
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
|
|
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,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