@taiga-ui/layout 4.30.0-canary.d74a2d2 → 4.31.0
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/index.d.ts +1 -0
- package/components/item-group/index.d.ts +1 -0
- package/components/item-group/item-group.directive.d.ts +12 -0
- package/esm2022/components/index.mjs +2 -1
- package/esm2022/components/item-group/index.mjs +2 -0
- package/esm2022/components/item-group/item-group.directive.mjs +58 -0
- package/esm2022/components/item-group/taiga-ui-layout-components-item-group.mjs +5 -0
- package/fesm2022/taiga-ui-layout-components-item-group.mjs +64 -0
- package/fesm2022/taiga-ui-layout-components-item-group.mjs.map +1 -0
- package/fesm2022/taiga-ui-layout-components.mjs +1 -0
- package/fesm2022/taiga-ui-layout-components.mjs.map +1 -1
- package/package.json +20 -14
package/components/index.d.ts
CHANGED
|
@@ -7,5 +7,6 @@ export * from '@taiga-ui/layout/components/dynamic-header';
|
|
|
7
7
|
export * from '@taiga-ui/layout/components/form';
|
|
8
8
|
export * from '@taiga-ui/layout/components/header';
|
|
9
9
|
export * from '@taiga-ui/layout/components/input-search';
|
|
10
|
+
export * from '@taiga-ui/layout/components/item-group';
|
|
10
11
|
export * from '@taiga-ui/layout/components/navigation';
|
|
11
12
|
export * from '@taiga-ui/layout/components/search';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './item-group.directive';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AfterViewInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class TuiItemGroup implements AfterViewInit {
|
|
4
|
+
private readonly el;
|
|
5
|
+
protected readonly nothing: undefined;
|
|
6
|
+
horizontal: boolean;
|
|
7
|
+
autoscroll: boolean;
|
|
8
|
+
ngAfterViewInit(): void;
|
|
9
|
+
protected onClick(target: HTMLElement): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TuiItemGroup, never>;
|
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiItemGroup, "[tuiItemGroup]", never, { "horizontal": { "alias": "horizontal"; "required": false; }; "autoscroll": { "alias": "autoscroll"; "required": false; }; }, {}, never, never, true, never>;
|
|
12
|
+
}
|
|
@@ -7,6 +7,7 @@ export * from '@taiga-ui/layout/components/dynamic-header';
|
|
|
7
7
|
export * from '@taiga-ui/layout/components/form';
|
|
8
8
|
export * from '@taiga-ui/layout/components/header';
|
|
9
9
|
export * from '@taiga-ui/layout/components/input-search';
|
|
10
|
+
export * from '@taiga-ui/layout/components/item-group';
|
|
10
11
|
export * from '@taiga-ui/layout/components/navigation';
|
|
11
12
|
export * from '@taiga-ui/layout/components/search';
|
|
12
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9sYXlvdXQvY29tcG9uZW50cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHFDQUFxQyxDQUFDO0FBQ3BELGNBQWMsMkNBQTJDLENBQUM7QUFDMUQsY0FBYywwQ0FBMEMsQ0FBQztBQUN6RCxjQUFjLGtDQUFrQyxDQUFDO0FBQ2pELGNBQWMsa0NBQWtDLENBQUM7QUFDakQsY0FBYyw0Q0FBNEMsQ0FBQztBQUMzRCxjQUFjLGtDQUFrQyxDQUFDO0FBQ2pELGNBQWMsb0NBQW9DLENBQUM7QUFDbkQsY0FBYywwQ0FBMEMsQ0FBQztBQUN6RCxjQUFjLHdDQUF3QyxDQUFDO0FBQ3ZELGNBQWMsd0NBQXdDLENBQUM7QUFDdkQsY0FBYyxvQ0FBb0MsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJ0B0YWlnYS11aS9sYXlvdXQvY29tcG9uZW50cy9hcHAtYmFyJztcbmV4cG9ydCAqIGZyb20gJ0B0YWlnYS11aS9sYXlvdXQvY29tcG9uZW50cy9ibG9jay1kZXRhaWxzJztcbmV4cG9ydCAqIGZyb20gJ0B0YWlnYS11aS9sYXlvdXQvY29tcG9uZW50cy9ibG9jay1zdGF0dXMnO1xuZXhwb3J0ICogZnJvbSAnQHRhaWdhLXVpL2xheW91dC9jb21wb25lbnRzL2NhcmQnO1xuZXhwb3J0ICogZnJvbSAnQHRhaWdhLXVpL2xheW91dC9jb21wb25lbnRzL2NlbGwnO1xuZXhwb3J0ICogZnJvbSAnQHRhaWdhLXVpL2xheW91dC9jb21wb25lbnRzL2R5bmFtaWMtaGVhZGVyJztcbmV4cG9ydCAqIGZyb20gJ0B0YWlnYS11aS9sYXlvdXQvY29tcG9uZW50cy9mb3JtJztcbmV4cG9ydCAqIGZyb20gJ0B0YWlnYS11aS9sYXlvdXQvY29tcG9uZW50cy9oZWFkZXInO1xuZXhwb3J0ICogZnJvbSAnQHRhaWdhLXVpL2xheW91dC9jb21wb25lbnRzL2lucHV0LXNlYXJjaCc7XG5leHBvcnQgKiBmcm9tICdAdGFpZ2EtdWkvbGF5b3V0L2NvbXBvbmVudHMvaXRlbS1ncm91cCc7XG5leHBvcnQgKiBmcm9tICdAdGFpZ2EtdWkvbGF5b3V0L2NvbXBvbmVudHMvbmF2aWdhdGlvbic7XG5leHBvcnQgKiBmcm9tICdAdGFpZ2EtdWkvbGF5b3V0L2NvbXBvbmVudHMvc2VhcmNoJztcbiJdfQ==
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from './item-group.directive';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9sYXlvdXQvY29tcG9uZW50cy9pdGVtLWdyb3VwL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsd0JBQXdCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2l0ZW0tZ3JvdXAuZGlyZWN0aXZlJztcbiJdfQ==
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Directive, Input, ViewEncapsulation, } from '@angular/core';
|
|
2
|
+
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
3
|
+
import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
4
|
+
import { take, timer } from 'rxjs';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
class TuiItemGroupStyles {
|
|
7
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiItemGroupStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8
|
+
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-bottom: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 }); }
|
|
9
|
+
}
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiItemGroupStyles, decorators: [{
|
|
11
|
+
type: Component,
|
|
12
|
+
args: [{ standalone: true, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
13
|
+
class: 'tui-item-group',
|
|
14
|
+
}, 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-bottom: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"] }]
|
|
15
|
+
}] });
|
|
16
|
+
class TuiItemGroup {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.el = tuiInjectElement();
|
|
19
|
+
this.nothing = tuiWithStyles(TuiItemGroupStyles);
|
|
20
|
+
this.horizontal = false;
|
|
21
|
+
this.autoscroll = false;
|
|
22
|
+
}
|
|
23
|
+
ngAfterViewInit() {
|
|
24
|
+
this.el.classList.add('_initialized');
|
|
25
|
+
}
|
|
26
|
+
onClick(target) {
|
|
27
|
+
if (this.autoscroll && this.horizontal) {
|
|
28
|
+
timer(0) // Safari bug
|
|
29
|
+
.pipe(take(1))
|
|
30
|
+
.subscribe(() => {
|
|
31
|
+
target.scrollIntoView({
|
|
32
|
+
behavior: 'smooth',
|
|
33
|
+
block: 'nearest',
|
|
34
|
+
inline: 'center',
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiItemGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
40
|
+
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 }); }
|
|
41
|
+
}
|
|
42
|
+
export { TuiItemGroup };
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiItemGroup, decorators: [{
|
|
44
|
+
type: Directive,
|
|
45
|
+
args: [{
|
|
46
|
+
standalone: true,
|
|
47
|
+
selector: '[tuiItemGroup]',
|
|
48
|
+
host: {
|
|
49
|
+
'(click)': 'onClick($event.target)',
|
|
50
|
+
'[class._horizontal]': 'horizontal',
|
|
51
|
+
},
|
|
52
|
+
}]
|
|
53
|
+
}], propDecorators: { horizontal: [{
|
|
54
|
+
type: Input
|
|
55
|
+
}], autoscroll: [{
|
|
56
|
+
type: Input
|
|
57
|
+
}] } });
|
|
58
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXRlbS1ncm91cC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN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xpYyBhdXRvc2Nyb2xsID0gZmFsc2U7XG5cbiAgICBwdWJsaWMgbmdBZnRlclZpZXdJbml0KCk6IHZvaWQge1xuICAgICAgICB0aGlzLmVsLmNsYXNzTGlzdC5hZGQoJ19pbml0aWFsaXplZCcpO1xuICAgIH1cblxuICAgIHByb3RlY3RlZCBvbkNsaWNrKHRhcmdldDogSFRNTEVsZW1lbnQpOiB2b2lkIHtcbiAgICAgICAgaWYgKHRoaXMuYXV0b3Njcm9sbCAmJiB0aGlzLmhvcml6b250YWwpIHtcbiAgICAgICAgICAgIHRpbWVyKDApIC8vIFNhZmFyaSBidWdcbiAgICAgICAgICAgICAgICAucGlwZSh0YWtlKDEpKVxuICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0YXJnZXQuc2Nyb2xsSW50b1ZpZXcoe1xuICAgICAgICAgICAgICAgICAgICAgICAgYmVoYXZpb3I6ICdzbW9vdGgnLFxuICAgICAgICAgICAgICAgICAgICAgICAgYmxvY2s6ICduZWFyZXN0JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlubGluZTogJ2NlbnRlcicsXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfVxufVxuIl19
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './index';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFpZ2EtdWktbGF5b3V0LWNvbXBvbmVudHMtaXRlbS1ncm91cC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2xheW91dC9jb21wb25lbnRzL2l0ZW0tZ3JvdXAvdGFpZ2EtdWktbGF5b3V0LWNvbXBvbmVudHMtaXRlbS1ncm91cC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Directive, Input } from '@angular/core';
|
|
3
|
+
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
4
|
+
import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
5
|
+
import { timer, take } from 'rxjs';
|
|
6
|
+
|
|
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-bottom: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
|
+
}
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiItemGroupStyles, decorators: [{
|
|
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-bottom: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
|
+
}] });
|
|
17
|
+
class TuiItemGroup {
|
|
18
|
+
constructor() {
|
|
19
|
+
this.el = tuiInjectElement();
|
|
20
|
+
this.nothing = tuiWithStyles(TuiItemGroupStyles);
|
|
21
|
+
this.horizontal = false;
|
|
22
|
+
this.autoscroll = false;
|
|
23
|
+
}
|
|
24
|
+
ngAfterViewInit() {
|
|
25
|
+
this.el.classList.add('_initialized');
|
|
26
|
+
}
|
|
27
|
+
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
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
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 }); }
|
|
42
|
+
}
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiItemGroup, decorators: [{
|
|
44
|
+
type: Directive,
|
|
45
|
+
args: [{
|
|
46
|
+
standalone: true,
|
|
47
|
+
selector: '[tuiItemGroup]',
|
|
48
|
+
host: {
|
|
49
|
+
'(click)': 'onClick($event.target)',
|
|
50
|
+
'[class._horizontal]': 'horizontal',
|
|
51
|
+
},
|
|
52
|
+
}]
|
|
53
|
+
}], propDecorators: { horizontal: [{
|
|
54
|
+
type: Input
|
|
55
|
+
}], autoscroll: [{
|
|
56
|
+
type: Input
|
|
57
|
+
}] } });
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Generated bundle index. Do not edit.
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
export { TuiItemGroup };
|
|
64
|
+
//# sourceMappingURL=taiga-ui-layout-components-item-group.mjs.map
|
|
@@ -0,0 +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 type {AfterViewInit} from '@angular/core';\nimport {\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,I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ClB,oBAAA,QAAQ,EAAE,QAAQ;AAClB,oBAAA,KAAK,EAAE,SAAS;AAChB,oBAAA,MAAM,EAAE,QAAQ;AACnB,iBAAA,CAAC,CAAC;AACP,aAAC,CAAC,CAAC;AACV,SAAA;KACJ;+GA1BQ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAAZ,YAAY,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;;;;"}
|
|
@@ -7,6 +7,7 @@ export * from '@taiga-ui/layout/components/dynamic-header';
|
|
|
7
7
|
export * from '@taiga-ui/layout/components/form';
|
|
8
8
|
export * from '@taiga-ui/layout/components/header';
|
|
9
9
|
export * from '@taiga-ui/layout/components/input-search';
|
|
10
|
+
export * from '@taiga-ui/layout/components/item-group';
|
|
10
11
|
export * from '@taiga-ui/layout/components/navigation';
|
|
11
12
|
export * from '@taiga-ui/layout/components/search';
|
|
12
13
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-layout-components.mjs","sources":["../../../projects/layout/components/taiga-ui-layout-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taiga-ui-layout-components.mjs","sources":["../../../projects/layout/components/taiga-ui-layout-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;AAEG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/layout",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.31.0",
|
|
4
4
|
"description": "A package with Taiga UI layout components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
"peerDependencies": {
|
|
14
14
|
"@angular/common": ">=16.0.0",
|
|
15
15
|
"@angular/core": ">=16.0.0",
|
|
16
|
-
"@taiga-ui/cdk": "^4.
|
|
17
|
-
"@taiga-ui/core": "^4.
|
|
18
|
-
"@taiga-ui/kit": "^4.
|
|
16
|
+
"@taiga-ui/cdk": "^4.31.0",
|
|
17
|
+
"@taiga-ui/core": "^4.31.0",
|
|
18
|
+
"@taiga-ui/kit": "^4.31.0",
|
|
19
19
|
"@taiga-ui/polymorpheus": "^4.9.0",
|
|
20
20
|
"rxjs": ">=7.0.0"
|
|
21
21
|
},
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"esm": "./esm2022/components/card/taiga-ui-layout-components-card.mjs",
|
|
68
68
|
"default": "./fesm2022/taiga-ui-layout-components-card.mjs"
|
|
69
69
|
},
|
|
70
|
-
"./components/
|
|
71
|
-
"types": "./components/
|
|
72
|
-
"esm2022": "./esm2022/components/
|
|
73
|
-
"esm": "./esm2022/components/
|
|
74
|
-
"default": "./fesm2022/taiga-ui-layout-components-
|
|
70
|
+
"./components/cell": {
|
|
71
|
+
"types": "./components/cell/index.d.ts",
|
|
72
|
+
"esm2022": "./esm2022/components/cell/taiga-ui-layout-components-cell.mjs",
|
|
73
|
+
"esm": "./esm2022/components/cell/taiga-ui-layout-components-cell.mjs",
|
|
74
|
+
"default": "./fesm2022/taiga-ui-layout-components-cell.mjs"
|
|
75
75
|
},
|
|
76
76
|
"./components/dynamic-header": {
|
|
77
77
|
"types": "./components/dynamic-header/index.d.ts",
|
|
@@ -79,11 +79,11 @@
|
|
|
79
79
|
"esm": "./esm2022/components/dynamic-header/taiga-ui-layout-components-dynamic-header.mjs",
|
|
80
80
|
"default": "./fesm2022/taiga-ui-layout-components-dynamic-header.mjs"
|
|
81
81
|
},
|
|
82
|
-
"./components/
|
|
83
|
-
"types": "./components/
|
|
84
|
-
"esm2022": "./esm2022/components/
|
|
85
|
-
"esm": "./esm2022/components/
|
|
86
|
-
"default": "./fesm2022/taiga-ui-layout-components-
|
|
82
|
+
"./components/form": {
|
|
83
|
+
"types": "./components/form/index.d.ts",
|
|
84
|
+
"esm2022": "./esm2022/components/form/taiga-ui-layout-components-form.mjs",
|
|
85
|
+
"esm": "./esm2022/components/form/taiga-ui-layout-components-form.mjs",
|
|
86
|
+
"default": "./fesm2022/taiga-ui-layout-components-form.mjs"
|
|
87
87
|
},
|
|
88
88
|
"./components/header": {
|
|
89
89
|
"types": "./components/header/index.d.ts",
|
|
@@ -97,6 +97,12 @@
|
|
|
97
97
|
"esm": "./esm2022/components/input-search/taiga-ui-layout-components-input-search.mjs",
|
|
98
98
|
"default": "./fesm2022/taiga-ui-layout-components-input-search.mjs"
|
|
99
99
|
},
|
|
100
|
+
"./components/item-group": {
|
|
101
|
+
"types": "./components/item-group/index.d.ts",
|
|
102
|
+
"esm2022": "./esm2022/components/item-group/taiga-ui-layout-components-item-group.mjs",
|
|
103
|
+
"esm": "./esm2022/components/item-group/taiga-ui-layout-components-item-group.mjs",
|
|
104
|
+
"default": "./fesm2022/taiga-ui-layout-components-item-group.mjs"
|
|
105
|
+
},
|
|
100
106
|
"./components/navigation": {
|
|
101
107
|
"types": "./components/navigation/index.d.ts",
|
|
102
108
|
"esm2022": "./esm2022/components/navigation/taiga-ui-layout-components-navigation.mjs",
|