@taiga-ui/kit 3.10.0 → 3.11.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.
Files changed (67) hide show
  1. package/bundles/taiga-ui-kit-components-input-date-time.umd.js +3 -1
  2. package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
  3. package/bundles/taiga-ui-kit-components-input-date.umd.js +3 -1
  4. package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
  5. package/bundles/taiga-ui-kit-components-input-files.umd.js +246 -69
  6. package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
  7. package/bundles/taiga-ui-kit-components-input-month-range.umd.js +16 -2
  8. package/bundles/taiga-ui-kit-components-input-month-range.umd.js.map +1 -1
  9. package/bundles/taiga-ui-kit-components-input-month.umd.js +17 -3
  10. package/bundles/taiga-ui-kit-components-input-month.umd.js.map +1 -1
  11. package/bundles/taiga-ui-kit-components-stepper.umd.js +20 -13
  12. package/bundles/taiga-ui-kit-components-stepper.umd.js.map +1 -1
  13. package/bundles/taiga-ui-kit-components-tiles.umd.js +619 -0
  14. package/bundles/taiga-ui-kit-components-tiles.umd.js.map +1 -0
  15. package/bundles/taiga-ui-kit-components.umd.js +10 -4
  16. package/bundles/taiga-ui-kit-components.umd.js.map +1 -1
  17. package/components/index.d.ts +1 -0
  18. package/components/input-files/index.d.ts +2 -0
  19. package/components/input-files/input-files.component.d.ts +19 -5
  20. package/components/input-files/input-files.directive.d.ts +20 -0
  21. package/components/input-files/input-files.module.d.ts +8 -7
  22. package/components/input-files/input-files.options.d.ts +17 -0
  23. package/components/input-month/input-month.component.d.ts +4 -2
  24. package/components/input-month-range/input-month-range.component.d.ts +4 -2
  25. package/components/stepper/stepper.component.d.ts +3 -2
  26. package/components/tiles/index.d.ts +4 -0
  27. package/components/tiles/package.json +10 -0
  28. package/components/tiles/taiga-ui-kit-components-tiles.d.ts +5 -0
  29. package/components/tiles/tile-handle.directive.d.ts +13 -0
  30. package/components/tiles/tile.component.d.ts +30 -0
  31. package/components/tiles/tiles.component.d.ts +12 -0
  32. package/components/tiles/tiles.module.d.ts +10 -0
  33. package/esm2015/components/index.js +2 -1
  34. package/esm2015/components/input-date/input-date.component.js +5 -3
  35. package/esm2015/components/input-date-time/input-date-time.component.js +5 -3
  36. package/esm2015/components/input-files/index.js +3 -1
  37. package/esm2015/components/input-files/input-files.component.js +75 -26
  38. package/esm2015/components/input-files/input-files.directive.js +77 -0
  39. package/esm2015/components/input-files/input-files.module.js +12 -3
  40. package/esm2015/components/input-files/input-files.options.js +16 -0
  41. package/esm2015/components/input-month/input-month.component.js +15 -5
  42. package/esm2015/components/input-month-range/input-month-range.component.js +14 -4
  43. package/esm2015/components/stepper/step/step.component.js +1 -1
  44. package/esm2015/components/stepper/stepper.component.js +12 -9
  45. package/esm2015/components/tiles/index.js +5 -0
  46. package/esm2015/components/tiles/taiga-ui-kit-components-tiles.js +5 -0
  47. package/esm2015/components/tiles/tile-handle.directive.js +53 -0
  48. package/esm2015/components/tiles/tile.component.js +101 -0
  49. package/esm2015/components/tiles/tiles.component.js +77 -0
  50. package/esm2015/components/tiles/tiles.module.js +20 -0
  51. package/fesm2015/taiga-ui-kit-components-input-date-time.js +4 -2
  52. package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
  53. package/fesm2015/taiga-ui-kit-components-input-date.js +4 -2
  54. package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
  55. package/fesm2015/taiga-ui-kit-components-input-files.js +167 -29
  56. package/fesm2015/taiga-ui-kit-components-input-files.js.map +1 -1
  57. package/fesm2015/taiga-ui-kit-components-input-month-range.js +13 -3
  58. package/fesm2015/taiga-ui-kit-components-input-month-range.js.map +1 -1
  59. package/fesm2015/taiga-ui-kit-components-input-month.js +14 -4
  60. package/fesm2015/taiga-ui-kit-components-input-month.js.map +1 -1
  61. package/fesm2015/taiga-ui-kit-components-stepper.js +12 -9
  62. package/fesm2015/taiga-ui-kit-components-stepper.js.map +1 -1
  63. package/fesm2015/taiga-ui-kit-components-tiles.js +241 -0
  64. package/fesm2015/taiga-ui-kit-components-tiles.js.map +1 -0
  65. package/fesm2015/taiga-ui-kit-components.js +1 -0
  66. package/fesm2015/taiga-ui-kit-components.js.map +1 -1
  67. package/package.json +4 -4
@@ -0,0 +1,241 @@
1
+ import { __decorate } from 'tslib';
2
+ import * as i0 from '@angular/core';
3
+ import { EventEmitter, ElementRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, Input, Output, HostBinding, HostListener, NgZone, Directive, NgModule } from '@angular/core';
4
+ import { MutationObserverService, MUTATION_OBSERVER_INIT } from '@ng-web-apis/mutation-observer';
5
+ import { TuiResizeService, tuiDefaultProp, tuiDebounce, tuiArrayShallowEquals, tuiZonefull, tuiIsElement } from '@taiga-ui/cdk';
6
+ import * as i3 from 'rxjs';
7
+ import { BehaviorSubject, combineLatest } from 'rxjs';
8
+ import { distinctUntilChanged, startWith, map } from 'rxjs/operators';
9
+ import * as i1 from '@angular/common';
10
+ import { CommonModule } from '@angular/common';
11
+
12
+ class TuiTilesComponent {
13
+ constructor(elementRef) {
14
+ this.elementRef = elementRef;
15
+ this.items = [];
16
+ this.itemsChange = new EventEmitter();
17
+ this.element = null;
18
+ }
19
+ reorder(element) {
20
+ if (!this.element || !element || this.element === element) {
21
+ return;
22
+ }
23
+ const elements = Array.from(this.elementRef.nativeElement.children);
24
+ const currentIndex = elements.indexOf(this.element);
25
+ const newIndex = elements.indexOf(element);
26
+ const items = [...this.items];
27
+ const dragged = items[currentIndex];
28
+ items[currentIndex] = items[newIndex];
29
+ items[newIndex] = dragged;
30
+ this.itemsChange.emit(items);
31
+ }
32
+ }
33
+ TuiTilesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTilesComponent, deps: [{ token: ElementRef }], target: i0.ɵɵFactoryTarget.Component });
34
+ TuiTilesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiTilesComponent, selector: "tui-tiles", inputs: { items: "items" }, outputs: { itemsChange: "itemsChange" }, host: { listeners: { "pointerleave": "reorder()" }, properties: { "class._dragged": "this.element" } }, providers: [
35
+ TuiResizeService,
36
+ MutationObserverService,
37
+ {
38
+ provide: MUTATION_OBSERVER_INIT,
39
+ useValue: { childList: true },
40
+ },
41
+ ], ngImport: i0, template: `
42
+ <ng-content></ng-content>
43
+ `, isInline: true, styles: ["tui-tiles{position:relative;z-index:0;display:grid;grid-auto-flow:dense;justify-items:stretch}tui-tiles._dragged tui-tile>.t-wrapper{pointer-events:none}tui-tiles._dragged tui-tile:not(._dragged)>.t-wrapper{transition:all .3s}tui-tiles:not(._dragged) tui-tile._dragged>.t-wrapper{transition:all .3s}tui-tile>.t-wrapper{position:absolute;z-index:0}tui-tile._dragged>.t-wrapper{z-index:1;transition:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
44
+ __decorate([
45
+ tuiDefaultProp()
46
+ ], TuiTilesComponent.prototype, "items", void 0);
47
+ __decorate([
48
+ tuiDebounce(500)
49
+ ], TuiTilesComponent.prototype, "reorder", null);
50
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTilesComponent, decorators: [{
51
+ type: Component,
52
+ args: [{
53
+ selector: `tui-tiles`,
54
+ template: `
55
+ <ng-content></ng-content>
56
+ `,
57
+ styleUrls: [`tiles.style.less`],
58
+ encapsulation: ViewEncapsulation.None,
59
+ changeDetection: ChangeDetectionStrategy.OnPush,
60
+ providers: [
61
+ TuiResizeService,
62
+ MutationObserverService,
63
+ {
64
+ provide: MUTATION_OBSERVER_INIT,
65
+ useValue: { childList: true },
66
+ },
67
+ ],
68
+ }]
69
+ }], ctorParameters: function () { return [{ type: i0.ElementRef, decorators: [{
70
+ type: Inject,
71
+ args: [ElementRef]
72
+ }] }]; }, propDecorators: { items: [{
73
+ type: Input
74
+ }], itemsChange: [{
75
+ type: Output
76
+ }], element: [{
77
+ type: HostBinding,
78
+ args: [`class._dragged`]
79
+ }], reorder: [{
80
+ type: HostListener,
81
+ args: [`pointerleave`]
82
+ }] } });
83
+
84
+ class TuiTileComponent {
85
+ constructor(ngZone, elementRef, tiles, resize$, mutation$) {
86
+ this.ngZone = ngZone;
87
+ this.elementRef = elementRef;
88
+ this.tiles = tiles;
89
+ this.resize$ = resize$;
90
+ this.mutation$ = mutation$;
91
+ this.width = 0;
92
+ this.height = 0;
93
+ this.dragged = false;
94
+ this.offset$ = new BehaviorSubject([0, 0]);
95
+ this.position$ = combineLatest([
96
+ this.offset$.pipe(distinctUntilChanged(tuiArrayShallowEquals)),
97
+ this.resize$.pipe(startWith(null)),
98
+ this.mutation$.pipe(startWith(null)),
99
+ ]).pipe(map(([[left, top]]) => ({
100
+ top: top || this.element.offsetTop,
101
+ left: left || this.element.offsetLeft,
102
+ width: this.element.clientWidth,
103
+ height: this.element.clientHeight,
104
+ })), tuiZonefull(this.ngZone));
105
+ }
106
+ get column() {
107
+ return `span ${this.width}`;
108
+ }
109
+ get row() {
110
+ return `span ${this.height}`;
111
+ }
112
+ get element() {
113
+ return this.elementRef.nativeElement;
114
+ }
115
+ onEnter() {
116
+ this.tiles.reorder(this.element);
117
+ }
118
+ onDrag(dragged) {
119
+ this.dragged = this.dragged || dragged;
120
+ this.tiles.element = dragged ? this.element : null;
121
+ }
122
+ onTransitionEnd() {
123
+ this.dragged = false;
124
+ }
125
+ }
126
+ TuiTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTileComponent, deps: [{ token: NgZone }, { token: ElementRef }, { token: TuiTilesComponent }, { token: TuiResizeService }, { token: MutationObserverService }], target: i0.ɵɵFactoryTarget.Component });
127
+ TuiTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiTileComponent, selector: "tui-tile", inputs: { width: "width", height: "height" }, host: { listeners: { "pointerenter": "onEnter()" }, properties: { "class._dragged": "this.dragged", "style.gridColumn": "this.column", "style.gridRow": "this.row" } }, ngImport: i0, template: "<div\n *ngIf=\"position$ | async as position\"\n class=\"t-wrapper\"\n [style.top.px]=\"position.top\"\n [style.left.px]=\"position.left\"\n [style.width.px]=\"position.width\"\n [style.height.px]=\"position.height\"\n (transitionend.self)=\"onTransitionEnd()\"\n>\n <ng-content></ng-content>\n</div>\n", directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
128
+ __decorate([
129
+ tuiDefaultProp()
130
+ ], TuiTileComponent.prototype, "width", void 0);
131
+ __decorate([
132
+ tuiDefaultProp()
133
+ ], TuiTileComponent.prototype, "height", void 0);
134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTileComponent, decorators: [{
135
+ type: Component,
136
+ args: [{
137
+ selector: `tui-tile`,
138
+ templateUrl: `tile.template.html`,
139
+ changeDetection: ChangeDetectionStrategy.OnPush,
140
+ }]
141
+ }], ctorParameters: function () { return [{ type: i0.NgZone, decorators: [{
142
+ type: Inject,
143
+ args: [NgZone]
144
+ }] }, { type: i0.ElementRef, decorators: [{
145
+ type: Inject,
146
+ args: [ElementRef]
147
+ }] }, { type: TuiTilesComponent, decorators: [{
148
+ type: Inject,
149
+ args: [TuiTilesComponent]
150
+ }] }, { type: i3.Observable, decorators: [{
151
+ type: Inject,
152
+ args: [TuiResizeService]
153
+ }] }, { type: i3.Observable, decorators: [{
154
+ type: Inject,
155
+ args: [MutationObserverService]
156
+ }] }]; }, propDecorators: { width: [{
157
+ type: Input
158
+ }], height: [{
159
+ type: Input
160
+ }], dragged: [{
161
+ type: HostBinding,
162
+ args: [`class._dragged`]
163
+ }], column: [{
164
+ type: HostBinding,
165
+ args: [`style.gridColumn`]
166
+ }], row: [{
167
+ type: HostBinding,
168
+ args: [`style.gridRow`]
169
+ }], onEnter: [{
170
+ type: HostListener,
171
+ args: [`pointerenter`]
172
+ }] } });
173
+
174
+ class TuiTileHandleDirective {
175
+ constructor(tile) {
176
+ this.tile = tile;
177
+ this.x = NaN;
178
+ this.y = NaN;
179
+ }
180
+ onStart({ x, y, pointerId, target }) {
181
+ if (tuiIsElement(target)) {
182
+ target.releasePointerCapture(pointerId);
183
+ }
184
+ this.onPointer(x, y);
185
+ }
186
+ onPointer(x = NaN, y = NaN) {
187
+ this.x = x - this.tile.element.offsetLeft;
188
+ this.y = y - this.tile.element.offsetTop;
189
+ this.tile.onDrag(!Number.isNaN(x));
190
+ this.tile.offset$.next([0, 0]);
191
+ }
192
+ onMove(x, y) {
193
+ if (!Number.isNaN(this.x)) {
194
+ this.tile.offset$.next([x - this.x, y - this.y]);
195
+ }
196
+ }
197
+ }
198
+ TuiTileHandleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTileHandleDirective, deps: [{ token: TuiTileComponent }], target: i0.ɵɵFactoryTarget.Directive });
199
+ TuiTileHandleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiTileHandleDirective, selector: "[tuiTileHandle]", host: { listeners: { "pointerdown.silent.prevent": "onStart($event)", "document:pointerup.silent": "onPointer()", "document:pointermove.silent": "onMove($event.x,$event.y)" }, properties: { "style.touchAction": "\"none\"" } }, ngImport: i0 });
200
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTileHandleDirective, decorators: [{
201
+ type: Directive,
202
+ args: [{
203
+ selector: `[tuiTileHandle]`,
204
+ host: {
205
+ '[style.touchAction]': `"none"`,
206
+ },
207
+ }]
208
+ }], ctorParameters: function () { return [{ type: TuiTileComponent, decorators: [{
209
+ type: Inject,
210
+ args: [TuiTileComponent]
211
+ }] }]; }, propDecorators: { onStart: [{
212
+ type: HostListener,
213
+ args: [`pointerdown.silent.prevent`, [`$event`]]
214
+ }], onPointer: [{
215
+ type: HostListener,
216
+ args: [`document:pointerup.silent`]
217
+ }], onMove: [{
218
+ type: HostListener,
219
+ args: [`document:pointermove.silent`, [`$event.x`, `$event.y`]]
220
+ }] } });
221
+
222
+ class TuiTilesModule {
223
+ }
224
+ TuiTilesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTilesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
225
+ TuiTilesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTilesModule, declarations: [TuiTilesComponent, TuiTileComponent, TuiTileHandleDirective], imports: [CommonModule], exports: [TuiTilesComponent, TuiTileComponent, TuiTileHandleDirective] });
226
+ TuiTilesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTilesModule, imports: [[CommonModule]] });
227
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTilesModule, decorators: [{
228
+ type: NgModule,
229
+ args: [{
230
+ imports: [CommonModule],
231
+ declarations: [TuiTilesComponent, TuiTileComponent, TuiTileHandleDirective],
232
+ exports: [TuiTilesComponent, TuiTileComponent, TuiTileHandleDirective],
233
+ }]
234
+ }] });
235
+
236
+ /**
237
+ * Generated bundle index. Do not edit.
238
+ */
239
+
240
+ export { TuiTileComponent, TuiTileHandleDirective, TuiTilesComponent, TuiTilesModule };
241
+ //# sourceMappingURL=taiga-ui-kit-components-tiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-kit-components-tiles.js","sources":["../../../projects/kit/components/tiles/tiles.component.ts","../../../projects/kit/components/tiles/tile.component.ts","../../../projects/kit/components/tiles/tile.template.html","../../../projects/kit/components/tiles/tile-handle.directive.ts","../../../projects/kit/components/tiles/tiles.module.ts","../../../projects/kit/components/tiles/taiga-ui-kit-components-tiles.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n MUTATION_OBSERVER_INIT,\n MutationObserverService,\n} from '@ng-web-apis/mutation-observer';\nimport {tuiDebounce, tuiDefaultProp, TuiResizeService} from '@taiga-ui/cdk';\n\n@Component({\n selector: `tui-tiles`,\n template: `\n <ng-content></ng-content>\n `,\n styleUrls: [`tiles.style.less`],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n TuiResizeService,\n MutationObserverService,\n {\n provide: MUTATION_OBSERVER_INIT,\n useValue: {childList: true},\n },\n ],\n})\nexport class TuiTilesComponent<T> {\n @Input()\n @tuiDefaultProp()\n items: readonly T[] = [];\n\n @Output()\n readonly itemsChange = new EventEmitter<T[]>();\n\n @HostBinding(`class._dragged`)\n element: Element | null = null;\n\n constructor(@Inject(ElementRef) private readonly elementRef: ElementRef<Element>) {}\n\n @tuiDebounce(500)\n @HostListener(`pointerleave`)\n reorder(element?: Element): void {\n if (!this.element || !element || this.element === element) {\n return;\n }\n\n const elements = Array.from(this.elementRef.nativeElement.children);\n const currentIndex = elements.indexOf(this.element);\n const newIndex = elements.indexOf(element);\n const items = [...this.items];\n const dragged = items[currentIndex];\n\n items[currentIndex] = items[newIndex];\n items[newIndex] = dragged;\n\n this.itemsChange.emit(items);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n NgZone,\n} from '@angular/core';\nimport {MutationObserverService} from '@ng-web-apis/mutation-observer';\nimport {\n tuiArrayShallowEquals,\n tuiDefaultProp,\n TuiResizeService,\n tuiZonefull,\n} from '@taiga-ui/cdk';\nimport {BehaviorSubject, combineLatest, Observable} from 'rxjs';\nimport {distinctUntilChanged, map, startWith} from 'rxjs/operators';\n\nimport {TuiTilesComponent} from './tiles.component';\n\n@Component({\n selector: `tui-tile`,\n templateUrl: `tile.template.html`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiTileComponent {\n @Input()\n @tuiDefaultProp()\n width = 0;\n\n @Input()\n @tuiDefaultProp()\n height = 0;\n\n @HostBinding(`class._dragged`)\n dragged = false;\n\n readonly offset$ = new BehaviorSubject<[number, number]>([0, 0]);\n\n readonly position$ = combineLatest([\n this.offset$.pipe(distinctUntilChanged(tuiArrayShallowEquals)),\n this.resize$.pipe(startWith(null)),\n this.mutation$.pipe(startWith(null)),\n ]).pipe(\n map(([[left, top]]) => ({\n top: top || this.element.offsetTop,\n left: left || this.element.offsetLeft,\n width: this.element.clientWidth,\n height: this.element.clientHeight,\n })),\n tuiZonefull(this.ngZone),\n );\n\n constructor(\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TuiTilesComponent) private readonly tiles: TuiTilesComponent<unknown>,\n @Inject(TuiResizeService) private readonly resize$: Observable<unknown>,\n @Inject(MutationObserverService) private readonly mutation$: Observable<unknown>,\n ) {}\n\n @HostBinding(`style.gridColumn`)\n get column(): string {\n return `span ${this.width}`;\n }\n\n @HostBinding(`style.gridRow`)\n get row(): string {\n return `span ${this.height}`;\n }\n\n get element(): HTMLElement {\n return this.elementRef.nativeElement;\n }\n\n @HostListener(`pointerenter`)\n onEnter(): void {\n this.tiles.reorder(this.element);\n }\n\n onDrag(dragged: boolean): void {\n this.dragged = this.dragged || dragged;\n this.tiles.element = dragged ? this.element : null;\n }\n\n onTransitionEnd(): void {\n this.dragged = false;\n }\n}\n","<div\n *ngIf=\"position$ | async as position\"\n class=\"t-wrapper\"\n [style.top.px]=\"position.top\"\n [style.left.px]=\"position.left\"\n [style.width.px]=\"position.width\"\n [style.height.px]=\"position.height\"\n (transitionend.self)=\"onTransitionEnd()\"\n>\n <ng-content></ng-content>\n</div>\n","import {Directive, HostListener, Inject} from '@angular/core';\nimport {tuiIsElement} from '@taiga-ui/cdk';\n\nimport {TuiTileComponent} from './tile.component';\n\n@Directive({\n selector: `[tuiTileHandle]`,\n host: {\n '[style.touchAction]': `\"none\"`,\n },\n})\nexport class TuiTileHandleDirective {\n private x = NaN;\n private y = NaN;\n\n constructor(@Inject(TuiTileComponent) private readonly tile: TuiTileComponent) {}\n\n @HostListener(`pointerdown.silent.prevent`, [`$event`])\n onStart({x, y, pointerId, target}: PointerEvent): void {\n if (tuiIsElement(target)) {\n target.releasePointerCapture(pointerId);\n }\n\n this.onPointer(x, y);\n }\n\n @HostListener(`document:pointerup.silent`)\n onPointer(x = NaN, y = NaN): void {\n this.x = x - this.tile.element.offsetLeft;\n this.y = y - this.tile.element.offsetTop;\n this.tile.onDrag(!Number.isNaN(x));\n this.tile.offset$.next([0, 0]);\n }\n\n @HostListener(`document:pointermove.silent`, [`$event.x`, `$event.y`])\n onMove(x: number, y: number): void {\n if (!Number.isNaN(this.x)) {\n this.tile.offset$.next([x - this.x, y - this.y]);\n }\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\n\nimport {TuiTileComponent} from './tile.component';\nimport {TuiTileHandleDirective} from './tile-handle.directive';\nimport {TuiTilesComponent} from './tiles.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [TuiTilesComponent, TuiTileComponent, TuiTileHandleDirective],\n exports: [TuiTilesComponent, TuiTileComponent, TuiTileHandleDirective],\n})\nexport class TuiTilesModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAmCa,iBAAiB,CAAA;AAW1B,IAAA,WAAA,CAAiD,UAA+B,EAAA;QAA/B,IAAU,CAAA,UAAA,GAAV,UAAU,CAAqB;QARhF,IAAK,CAAA,KAAA,GAAiB,EAAE,CAAC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AAA,CAAQ,CAAC,CAAA;gBAUtD,SAAS,EAAA,CAAA;sBADR,YAAY;uBAAC,CAA2B,yBAAA,CAAA,CAAA;gBASzC,MAAM,EAAA,CAAA;sBADL,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,CAAA,2BAAA,CAA6B,EAAE,CAAC,CAAU,QAAA,CAAA,EAAE,UAAU,CAAC,CAAA;;;MCtB5D,cAAc,CAAA;;4GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAHR,YAAA,EAAA,CAAA,iBAAiB,EAAE,gBAAgB,EAAE,sBAAsB,CADhE,EAAA,OAAA,EAAA,CAAA,YAAY,CAEZ,EAAA,OAAA,EAAA,CAAA,iBAAiB,EAAE,gBAAgB,EAAE,sBAAsB,CAAA,EAAA,CAAA,CAAA;6GAE5D,cAAc,EAAA,OAAA,EAAA,CAJd,CAAC,YAAY,CAAC,CAAA,EAAA,CAAA,CAAA;4FAId,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,YAAY,EAAE,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,sBAAsB,CAAC;AAC3E,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,sBAAsB,CAAC;AACzE,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
@@ -57,6 +57,7 @@ export * from '@taiga-ui/kit/components/stepper';
57
57
  export * from '@taiga-ui/kit/components/tabs';
58
58
  export * from '@taiga-ui/kit/components/tag';
59
59
  export * from '@taiga-ui/kit/components/text-area';
60
+ export * from '@taiga-ui/kit/components/tiles';
60
61
  export * from '@taiga-ui/kit/components/toggle';
61
62
  export * from '@taiga-ui/kit/components/tree';
62
63
 
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components.js","sources":["../../../projects/kit/components/taiga-ui-kit-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEG"}
1
+ {"version":3,"file":"taiga-ui-kit-components.js","sources":["../../../projects/kit/components/taiga-ui-kit-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/kit",
3
- "version": "3.10.0",
3
+ "version": "3.11.0",
4
4
  "description": "Taiga UI Angular main components kit",
5
5
  "keywords": [
6
6
  "angular",
@@ -24,9 +24,9 @@
24
24
  "@angular/router": ">=9.0.0",
25
25
  "@ng-web-apis/common": ">=2.0.0",
26
26
  "@ng-web-apis/mutation-observer": ">=2.0.0",
27
- "@taiga-ui/cdk": ">=3.10.0",
28
- "@taiga-ui/core": ">=3.10.0",
29
- "@taiga-ui/i18n": ">=3.10.0",
27
+ "@taiga-ui/cdk": ">=3.11.0",
28
+ "@taiga-ui/core": ">=3.11.0",
29
+ "@taiga-ui/i18n": ">=3.11.0",
30
30
  "@tinkoff/ng-polymorpheus": ">=4.0.0",
31
31
  "rxjs": ">=6.0.0"
32
32
  },