@taiga-ui/experimental 3.62.0 → 3.64.0-canary.0c1cd7d

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 (152) hide show
  1. package/bundles/taiga-ui-experimental-components-app-bar.umd.js +157 -0
  2. package/bundles/taiga-ui-experimental-components-app-bar.umd.js.map +1 -0
  3. package/bundles/taiga-ui-experimental-components-avatar-labeled.umd.js +71 -0
  4. package/bundles/taiga-ui-experimental-components-avatar-labeled.umd.js.map +1 -0
  5. package/bundles/taiga-ui-experimental-components-badge-notification.umd.js +22 -7
  6. package/bundles/taiga-ui-experimental-components-badge-notification.umd.js.map +1 -1
  7. package/bundles/taiga-ui-experimental-components-badge.umd.js +1 -1
  8. package/bundles/taiga-ui-experimental-components-badge.umd.js.map +1 -1
  9. package/bundles/taiga-ui-experimental-components-chip.umd.js +1 -1
  10. package/bundles/taiga-ui-experimental-components-chip.umd.js.map +1 -1
  11. package/bundles/taiga-ui-experimental-components-segmented.umd.js +231 -0
  12. package/bundles/taiga-ui-experimental-components-segmented.umd.js.map +1 -0
  13. package/bundles/taiga-ui-experimental-components-swipe-action.umd.js +119 -0
  14. package/bundles/taiga-ui-experimental-components-swipe-action.umd.js.map +1 -0
  15. package/bundles/taiga-ui-experimental-components-thumbnail-card.umd.js +1 -1
  16. package/bundles/taiga-ui-experimental-components-thumbnail-card.umd.js.map +1 -1
  17. package/bundles/taiga-ui-experimental-components-tooltip.umd.js +7 -7
  18. package/bundles/taiga-ui-experimental-components-tooltip.umd.js.map +1 -1
  19. package/bundles/taiga-ui-experimental-components.umd.js +28 -4
  20. package/bundles/taiga-ui-experimental-components.umd.js.map +1 -1
  21. package/bundles/taiga-ui-experimental-directives-card.umd.js +40 -17
  22. package/bundles/taiga-ui-experimental-directives-card.umd.js.map +1 -1
  23. package/bundles/taiga-ui-experimental-directives-cell.umd.js +1 -1
  24. package/bundles/taiga-ui-experimental-directives-cell.umd.js.map +1 -1
  25. package/bundles/taiga-ui-experimental-directives-header.umd.js +112 -0
  26. package/bundles/taiga-ui-experimental-directives-header.umd.js.map +1 -0
  27. package/bundles/taiga-ui-experimental-directives-icons.umd.js +2 -2
  28. package/bundles/taiga-ui-experimental-directives-icons.umd.js.map +1 -1
  29. package/bundles/taiga-ui-experimental-directives-sensitive.umd.js +344 -8
  30. package/bundles/taiga-ui-experimental-directives-sensitive.umd.js.map +1 -1
  31. package/bundles/taiga-ui-experimental-directives-surface.umd.js +1 -1
  32. package/bundles/taiga-ui-experimental-directives-surface.umd.js.map +1 -1
  33. package/bundles/taiga-ui-experimental-directives.umd.js +10 -4
  34. package/bundles/taiga-ui-experimental-directives.umd.js.map +1 -1
  35. package/components/app-bar/app-bar-back.component.d.ts +5 -0
  36. package/components/app-bar/app-bar.component.d.ts +13 -0
  37. package/components/app-bar/app-bar.directive.d.ts +6 -0
  38. package/components/app-bar/app-bar.module.d.ts +12 -0
  39. package/components/app-bar/app-bar.providers.d.ts +2 -0
  40. package/components/app-bar/index.d.ts +5 -0
  41. package/components/app-bar/package.json +10 -0
  42. package/components/app-bar/taiga-ui-experimental-components-app-bar.d.ts +5 -0
  43. package/components/avatar-labeled/avatar-labeled.component.d.ts +5 -0
  44. package/components/avatar-labeled/avatar-labeled.module.d.ts +7 -0
  45. package/components/avatar-labeled/index.d.ts +2 -0
  46. package/components/avatar-labeled/package.json +10 -0
  47. package/components/avatar-labeled/taiga-ui-experimental-components-avatar-labeled.d.ts +5 -0
  48. package/components/badge-notification/badge-notification.component.d.ts +3 -1
  49. package/components/badge-notification/badge-notification.options.d.ts +8 -0
  50. package/components/badge-notification/index.d.ts +1 -0
  51. package/components/index.d.ts +4 -0
  52. package/components/segmented/index.d.ts +3 -0
  53. package/components/segmented/package.json +10 -0
  54. package/components/segmented/segmented.component.d.ts +20 -0
  55. package/components/segmented/segmented.directive.d.ts +20 -0
  56. package/components/segmented/segmented.module.d.ts +8 -0
  57. package/components/segmented/taiga-ui-experimental-components-segmented.d.ts +5 -0
  58. package/components/swipe-action/index.d.ts +3 -0
  59. package/components/swipe-action/package.json +10 -0
  60. package/components/swipe-action/swipe-actions-auto-close.directive.d.ts +11 -0
  61. package/components/swipe-action/swipe-actions.component.d.ts +7 -0
  62. package/components/swipe-action/swipe-actions.module.d.ts +10 -0
  63. package/components/swipe-action/taiga-ui-experimental-components-swipe-action.d.ts +5 -0
  64. package/directives/card/card.directive.d.ts +9 -5
  65. package/directives/card/card.module.d.ts +1 -1
  66. package/directives/header/header.component.d.ts +5 -0
  67. package/directives/header/header.directive.d.ts +9 -0
  68. package/directives/header/header.module.d.ts +8 -0
  69. package/directives/header/index.d.ts +3 -0
  70. package/directives/header/package.json +10 -0
  71. package/directives/header/taiga-ui-experimental-directives-header.d.ts +5 -0
  72. package/directives/icons/icons.directive.d.ts +1 -1
  73. package/directives/index.d.ts +1 -0
  74. package/directives/sensitive/sensitive.directive.d.ts +4 -2
  75. package/esm2015/components/app-bar/app-bar-back.component.js +16 -0
  76. package/esm2015/components/app-bar/app-bar.component.js +51 -0
  77. package/esm2015/components/app-bar/app-bar.directive.js +18 -0
  78. package/esm2015/components/app-bar/app-bar.module.js +22 -0
  79. package/esm2015/components/app-bar/app-bar.providers.js +21 -0
  80. package/esm2015/components/app-bar/index.js +6 -0
  81. package/esm2015/components/app-bar/taiga-ui-experimental-components-app-bar.js +5 -0
  82. package/esm2015/components/avatar-labeled/avatar-labeled.component.js +17 -0
  83. package/esm2015/components/avatar-labeled/avatar-labeled.module.js +16 -0
  84. package/esm2015/components/avatar-labeled/index.js +3 -0
  85. package/esm2015/components/avatar-labeled/taiga-ui-experimental-components-avatar-labeled.js +5 -0
  86. package/esm2015/components/badge/badge.component.js +1 -1
  87. package/esm2015/components/badge-notification/badge-notification.component.js +9 -4
  88. package/esm2015/components/badge-notification/badge-notification.options.js +9 -0
  89. package/esm2015/components/badge-notification/index.js +2 -1
  90. package/esm2015/components/chip/chip.component.js +1 -1
  91. package/esm2015/components/index.js +5 -1
  92. package/esm2015/components/segmented/index.js +4 -0
  93. package/esm2015/components/segmented/segmented.component.js +87 -0
  94. package/esm2015/components/segmented/segmented.directive.js +77 -0
  95. package/esm2015/components/segmented/segmented.module.js +17 -0
  96. package/esm2015/components/segmented/taiga-ui-experimental-components-segmented.js +5 -0
  97. package/esm2015/components/swipe-action/index.js +4 -0
  98. package/esm2015/components/swipe-action/swipe-actions-auto-close.directive.js +38 -0
  99. package/esm2015/components/swipe-action/swipe-actions.component.js +26 -0
  100. package/esm2015/components/swipe-action/swipe-actions.module.js +20 -0
  101. package/esm2015/components/swipe-action/taiga-ui-experimental-components-swipe-action.js +5 -0
  102. package/esm2015/components/thumbnail-card/thumbnail-card.component.js +1 -1
  103. package/esm2015/components/tooltip/tooltip.component.js +3 -3
  104. package/esm2015/directives/card/card.component.js +1 -1
  105. package/esm2015/directives/card/card.directive.js +30 -11
  106. package/esm2015/directives/card/card.module.js +5 -5
  107. package/esm2015/directives/cell/cell.component.js +1 -1
  108. package/esm2015/directives/header/header.component.js +19 -0
  109. package/esm2015/directives/header/header.directive.js +40 -0
  110. package/esm2015/directives/header/header.module.js +17 -0
  111. package/esm2015/directives/header/index.js +4 -0
  112. package/esm2015/directives/header/taiga-ui-experimental-directives-header.js +5 -0
  113. package/esm2015/directives/icons/icons.directive.js +3 -3
  114. package/esm2015/directives/index.js +2 -1
  115. package/esm2015/directives/sensitive/sensitive.component.js +1 -1
  116. package/esm2015/directives/sensitive/sensitive.directive.js +18 -5
  117. package/esm2015/directives/surface/surface.component.js +1 -1
  118. package/fesm2015/taiga-ui-experimental-components-app-bar.js +123 -0
  119. package/fesm2015/taiga-ui-experimental-components-app-bar.js.map +1 -0
  120. package/fesm2015/taiga-ui-experimental-components-avatar-labeled.js +37 -0
  121. package/fesm2015/taiga-ui-experimental-components-avatar-labeled.js.map +1 -0
  122. package/fesm2015/taiga-ui-experimental-components-badge-notification.js +17 -4
  123. package/fesm2015/taiga-ui-experimental-components-badge-notification.js.map +1 -1
  124. package/fesm2015/taiga-ui-experimental-components-badge.js +1 -1
  125. package/fesm2015/taiga-ui-experimental-components-badge.js.map +1 -1
  126. package/fesm2015/taiga-ui-experimental-components-chip.js +1 -1
  127. package/fesm2015/taiga-ui-experimental-components-chip.js.map +1 -1
  128. package/fesm2015/taiga-ui-experimental-components-segmented.js +177 -0
  129. package/fesm2015/taiga-ui-experimental-components-segmented.js.map +1 -0
  130. package/fesm2015/taiga-ui-experimental-components-swipe-action.js +84 -0
  131. package/fesm2015/taiga-ui-experimental-components-swipe-action.js.map +1 -0
  132. package/fesm2015/taiga-ui-experimental-components-thumbnail-card.js +1 -1
  133. package/fesm2015/taiga-ui-experimental-components-thumbnail-card.js.map +1 -1
  134. package/fesm2015/taiga-ui-experimental-components-tooltip.js +3 -3
  135. package/fesm2015/taiga-ui-experimental-components-tooltip.js.map +1 -1
  136. package/fesm2015/taiga-ui-experimental-components.js +4 -0
  137. package/fesm2015/taiga-ui-experimental-components.js.map +1 -1
  138. package/fesm2015/taiga-ui-experimental-directives-card.js +34 -15
  139. package/fesm2015/taiga-ui-experimental-directives-card.js.map +1 -1
  140. package/fesm2015/taiga-ui-experimental-directives-cell.js +1 -1
  141. package/fesm2015/taiga-ui-experimental-directives-cell.js.map +1 -1
  142. package/fesm2015/taiga-ui-experimental-directives-header.js +76 -0
  143. package/fesm2015/taiga-ui-experimental-directives-header.js.map +1 -0
  144. package/fesm2015/taiga-ui-experimental-directives-icons.js +2 -2
  145. package/fesm2015/taiga-ui-experimental-directives-icons.js.map +1 -1
  146. package/fesm2015/taiga-ui-experimental-directives-sensitive.js +18 -5
  147. package/fesm2015/taiga-ui-experimental-directives-sensitive.js.map +1 -1
  148. package/fesm2015/taiga-ui-experimental-directives-surface.js +1 -1
  149. package/fesm2015/taiga-ui-experimental-directives-surface.js.map +1 -1
  150. package/fesm2015/taiga-ui-experimental-directives.js +1 -0
  151. package/fesm2015/taiga-ui-experimental-directives.js.map +1 -1
  152. package/package.json +31 -31
@@ -0,0 +1,231 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk'), require('@taiga-ui/experimental/components/badge-notification'), require('rxjs/operators'), require('rxjs'), require('@angular/forms'), require('@angular/router')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/experimental/components/segmented', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/experimental/components/badge-notification', 'rxjs/operators', 'rxjs', '@angular/forms', '@angular/router'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].experimental = global["taiga-ui"].experimental || {}, global["taiga-ui"].experimental.components = global["taiga-ui"].experimental.components || {}, global["taiga-ui"].experimental.components.segmented = {}), global.ng.core, global.cdk, global["taiga-ui"].experimental.components["badge-notification"], global.rxjs.operators, global.rxjs, global.ng.forms, global.ng.router));
5
+ })(this, (function (exports, i0, cdk, badgeNotification, operators, i1, forms, router) { 'use strict';
6
+
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
20
+ }
21
+ n["default"] = e;
22
+ return Object.freeze(n);
23
+ }
24
+
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
27
+
28
+ var TuiSegmentedComponent = /** @class */ (function () {
29
+ function TuiSegmentedComponent(el, resize$, destroy$) {
30
+ var _this = this;
31
+ this.el = el;
32
+ this.size = 's';
33
+ this.activeItemIndex = 0;
34
+ this.activeItemIndexChange = new i0.EventEmitter();
35
+ resize$.pipe(operators.takeUntil(destroy$)).subscribe(function () { return _this.refresh(); });
36
+ }
37
+ Object.defineProperty(TuiSegmentedComponent.prototype, "tabs", {
38
+ get: function () {
39
+ return this.el.nativeElement.children;
40
+ },
41
+ enumerable: false,
42
+ configurable: true
43
+ });
44
+ TuiSegmentedComponent.prototype.ngOnChanges = function () {
45
+ this.refresh();
46
+ };
47
+ TuiSegmentedComponent.prototype.update = function (activeItemIndex) {
48
+ if (activeItemIndex === this.activeItemIndex) {
49
+ return;
50
+ }
51
+ this.activeItemIndex = activeItemIndex;
52
+ this.activeItemIndexChange.emit(activeItemIndex);
53
+ this.refresh();
54
+ };
55
+ Object.defineProperty(TuiSegmentedComponent.prototype, "left", {
56
+ get: function () {
57
+ var element = this.activeElement;
58
+ return cdk.tuiIsHTMLElement(element) ? element.offsetLeft : 0;
59
+ },
60
+ enumerable: false,
61
+ configurable: true
62
+ });
63
+ Object.defineProperty(TuiSegmentedComponent.prototype, "width", {
64
+ get: function () {
65
+ var _a;
66
+ return ((_a = this.activeElement) === null || _a === void 0 ? void 0 : _a.clientWidth) || 0;
67
+ },
68
+ enumerable: false,
69
+ configurable: true
70
+ });
71
+ Object.defineProperty(TuiSegmentedComponent.prototype, "activeElement", {
72
+ get: function () {
73
+ return this.tabs.item(this.activeItemIndex);
74
+ },
75
+ enumerable: false,
76
+ configurable: true
77
+ });
78
+ // TODO: Switch to HostBinding signals in Angular 17+
79
+ TuiSegmentedComponent.prototype.refresh = function () {
80
+ this.el.nativeElement.style.setProperty('--t-left', cdk.tuiPx(this.left));
81
+ this.el.nativeElement.style.setProperty('--t-width', cdk.tuiPx(this.width));
82
+ };
83
+ return TuiSegmentedComponent;
84
+ }());
85
+ TuiSegmentedComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSegmentedComponent, deps: [{ token: i0.ElementRef }, { token: cdk.TuiResizeService }, { token: cdk.TuiDestroyService, self: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
86
+ TuiSegmentedComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiSegmentedComponent, selector: "tui-segmented", inputs: { size: "size", activeItemIndex: "activeItemIndex" }, outputs: { activeItemIndexChange: "activeItemIndexChange" }, host: { properties: { "attr.data-size": "this.size" } }, providers: [
87
+ cdk.TuiDestroyService,
88
+ cdk.TuiResizeService,
89
+ badgeNotification.tuiBadgeNotificationOptionsProvider({ size: 's' }),
90
+ ], usesOnChanges: true, ngImport: i0__namespace, template: '<ng-content></ng-content>', isInline: true, styles: ["tui-segmented{position:relative;display:flex;box-sizing:border-box;isolation:isolate;color:var(--tui-clear);border:.125rem solid transparent}tui-segmented[data-size=s]{--t-padding: .625rem;--t-gap: .5rem;--t-margin: -.125rem;height:var(--tui-height-s);font:var(--tui-font-text-s);border-radius:var(--tui-radius-s)}tui-segmented[data-size=s]>*:before,tui-segmented[data-size=s]>*:after,tui-segmented[data-size=s] tui-icon{font-size:1rem}tui-segmented[data-size=m]{--t-padding: .875rem;--t-gap: 1rem;--t-margin: -.375rem;height:var(--tui-height-m);font:var(--tui-font-text-m);border-radius:var(--tui-radius-s)}tui-segmented[data-size=l]{--t-padding: 1.125rem;--t-gap: 1rem;--t-margin: -.375rem;height:var(--tui-height-l);font:var(--tui-font-text-l);border-radius:var(--tui-radius-m);border-width:.25rem}tui-segmented[data-size=l]:after{box-shadow:0 0 0 .25rem}tui-segmented>a,tui-segmented>button,tui-segmented>label,tui-segmented>label>input:not([tuiRadio]){transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;justify-content:center;white-space:nowrap;grid-gap:var(--t-gap);gap:var(--t-gap);margin:0;padding:0 var(--t-padding);color:var(--tui-text-01);overflow:hidden;cursor:pointer;font:inherit;border-radius:inherit}tui-segmented>a>*,tui-segmented>button>*,tui-segmented>label>*,tui-segmented>label>input:not([tuiRadio])>*,tui-segmented>a:before,tui-segmented>button:before,tui-segmented>label:before,tui-segmented>label>input:not([tuiRadio]):before,tui-segmented>a:after,tui-segmented>button:after,tui-segmented>label:after,tui-segmented>label>input:not([tuiRadio]):after{margin:0 var(--t-margin)}tui-segmented>a:focus-visible,tui-segmented>button:focus-visible,tui-segmented>label:focus-visible,tui-segmented>label>input:not([tuiRadio]):focus-visible{outline:.125rem solid var(--tui-focus);outline-offset:-.125rem}tui-segmented>label>input:not([tuiRadio]){position:absolute;top:0;left:0;width:100%;height:100%}tui-segmented:after{position:absolute;top:0;left:0;width:100%;height:100%;content:\"\";z-index:-1;border-radius:inherit;background:currentColor;box-shadow:0 0 0 .125rem}tui-segmented:before{transition-property:left,width;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;left:var(--t-left);height:100%;width:var(--t-width);border-radius:inherit;background:currentColor;color:var(--tui-base-01);box-shadow:0 .25rem 1.25rem #0000001a}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
91
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSegmentedComponent, decorators: [{
92
+ type: i0.Component,
93
+ args: [{
94
+ selector: 'tui-segmented',
95
+ template: '<ng-content></ng-content>',
96
+ styleUrls: ['./segmented.style.less'],
97
+ encapsulation: i0.ViewEncapsulation.None,
98
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
99
+ providers: [
100
+ cdk.TuiDestroyService,
101
+ cdk.TuiResizeService,
102
+ badgeNotification.tuiBadgeNotificationOptionsProvider({ size: 's' }),
103
+ ],
104
+ }]
105
+ }], ctorParameters: function () {
106
+ return [{ type: i0__namespace.ElementRef, decorators: [{
107
+ type: i0.Inject,
108
+ args: [i0.ElementRef]
109
+ }] }, { type: i1__namespace.Observable, decorators: [{
110
+ type: i0.Inject,
111
+ args: [cdk.TuiResizeService]
112
+ }] }, { type: i1__namespace.Observable, decorators: [{
113
+ type: i0.Self
114
+ }, {
115
+ type: i0.Inject,
116
+ args: [cdk.TuiDestroyService]
117
+ }] }];
118
+ }, propDecorators: { size: [{
119
+ type: i0.Input
120
+ }, {
121
+ type: i0.HostBinding,
122
+ args: ['attr.data-size']
123
+ }], activeItemIndex: [{
124
+ type: i0.Input
125
+ }], activeItemIndexChange: [{
126
+ type: i0.Output
127
+ }] } });
128
+
129
+ var TuiSegmentedDirective = /** @class */ (function () {
130
+ function TuiSegmentedDirective(destroy$, component, el) {
131
+ this.destroy$ = destroy$;
132
+ this.component = component;
133
+ this.el = el;
134
+ this.controls = cdk.EMPTY_QUERY;
135
+ this.links = cdk.EMPTY_QUERY;
136
+ this.elements = cdk.EMPTY_QUERY;
137
+ }
138
+ TuiSegmentedDirective.prototype.update = function (target) {
139
+ var index = this.getIndex(target);
140
+ if (index >= 0) {
141
+ this.component.update(index);
142
+ }
143
+ };
144
+ TuiSegmentedDirective.prototype.ngAfterContentInit = function () {
145
+ var _this = this;
146
+ cdk.tuiQueryListChanges(this.controls)
147
+ .pipe(operators.switchMap(function () { var _a; return ((_a = _this.controls.last) === null || _a === void 0 ? void 0 : _a.valueChanges) || i1.EMPTY; }), operators.takeUntil(this.destroy$))
148
+ .subscribe(function () {
149
+ _this.update(_this.el.nativeElement.querySelector(':checked'));
150
+ });
151
+ };
152
+ TuiSegmentedDirective.prototype.ngAfterContentChecked = function () {
153
+ var _a;
154
+ if (this.links.length) {
155
+ this.update(((_a = this.elements.get(this.linkIndex)) === null || _a === void 0 ? void 0 : _a.nativeElement) || null);
156
+ }
157
+ };
158
+ Object.defineProperty(TuiSegmentedDirective.prototype, "linkIndex", {
159
+ get: function () {
160
+ return this.links.toArray().findIndex(function (link) { return link.isActive; });
161
+ },
162
+ enumerable: false,
163
+ configurable: true
164
+ });
165
+ TuiSegmentedDirective.prototype.getIndex = function (element) {
166
+ return Array.from(this.component.tabs).findIndex(function (tab) { return tab.contains(element); });
167
+ };
168
+ return TuiSegmentedDirective;
169
+ }());
170
+ TuiSegmentedDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSegmentedDirective, deps: [{ token: cdk.TuiDestroyService, self: true }, { token: TuiSegmentedComponent }, { token: i0.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
171
+ TuiSegmentedDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiSegmentedDirective, selector: "tui-segmented", host: { listeners: { "click": "update($event.target)" } }, queries: [{ propertyName: "controls", predicate: forms.NgControl, descendants: true }, { propertyName: "links", predicate: router.RouterLinkActive }, { propertyName: "elements", predicate: router.RouterLinkActive, read: i0.ElementRef }], ngImport: i0__namespace });
172
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSegmentedDirective, decorators: [{
173
+ type: i0.Directive,
174
+ args: [{
175
+ selector: 'tui-segmented',
176
+ }]
177
+ }], ctorParameters: function () {
178
+ return [{ type: i1__namespace.Observable, decorators: [{
179
+ type: i0.Self
180
+ }, {
181
+ type: i0.Inject,
182
+ args: [cdk.TuiDestroyService]
183
+ }] }, { type: TuiSegmentedComponent, decorators: [{
184
+ type: i0.Inject,
185
+ args: [TuiSegmentedComponent]
186
+ }] }, { type: i0__namespace.ElementRef, decorators: [{
187
+ type: i0.Inject,
188
+ args: [i0.ElementRef]
189
+ }] }];
190
+ }, propDecorators: { controls: [{
191
+ type: i0.ContentChildren,
192
+ args: [forms.NgControl, { descendants: true }]
193
+ }], links: [{
194
+ type: i0.ContentChildren,
195
+ args: [router.RouterLinkActive]
196
+ }], elements: [{
197
+ type: i0.ContentChildren,
198
+ args: [router.RouterLinkActive, { read: i0.ElementRef }]
199
+ }], update: [{
200
+ type: i0.HostListener,
201
+ args: ['click', ['$event.target']]
202
+ }] } });
203
+
204
+ var TuiSegmentedModule = /** @class */ (function () {
205
+ function TuiSegmentedModule() {
206
+ }
207
+ return TuiSegmentedModule;
208
+ }());
209
+ TuiSegmentedModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSegmentedModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
210
+ TuiSegmentedModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSegmentedModule, declarations: [TuiSegmentedComponent, TuiSegmentedDirective], exports: [TuiSegmentedComponent, TuiSegmentedDirective] });
211
+ TuiSegmentedModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSegmentedModule });
212
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSegmentedModule, decorators: [{
213
+ type: i0.NgModule,
214
+ args: [{
215
+ declarations: [TuiSegmentedComponent, TuiSegmentedDirective],
216
+ exports: [TuiSegmentedComponent, TuiSegmentedDirective],
217
+ }]
218
+ }] });
219
+
220
+ /**
221
+ * Generated bundle index. Do not edit.
222
+ */
223
+
224
+ exports.TuiSegmentedComponent = TuiSegmentedComponent;
225
+ exports.TuiSegmentedDirective = TuiSegmentedDirective;
226
+ exports.TuiSegmentedModule = TuiSegmentedModule;
227
+
228
+ Object.defineProperty(exports, '__esModule', { value: true });
229
+
230
+ }));
231
+ //# sourceMappingURL=taiga-ui-experimental-components-segmented.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-experimental-components-segmented.umd.js","sources":["../../../projects/experimental/components/segmented/segmented.component.ts","../../../projects/experimental/components/segmented/segmented.directive.ts","../../../projects/experimental/components/segmented/segmented.module.ts","../../../projects/experimental/components/segmented/taiga-ui-experimental-components-segmented.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n OnChanges,\n Output,\n Self,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n TuiDestroyService,\n tuiIsHTMLElement,\n tuiPx,\n TuiResizeService,\n} from '@taiga-ui/cdk';\nimport {TuiSizeL, TuiSizeS} from '@taiga-ui/core';\nimport {tuiBadgeNotificationOptionsProvider} from '@taiga-ui/experimental/components/badge-notification';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\n@Component({\n selector: 'tui-segmented',\n template: '<ng-content></ng-content>',\n styleUrls: ['./segmented.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n TuiDestroyService,\n TuiResizeService,\n tuiBadgeNotificationOptionsProvider({size: 's'}),\n ],\n})\nexport class TuiSegmentedComponent implements OnChanges {\n @Input()\n @HostBinding('attr.data-size')\n size: TuiSizeL | TuiSizeS = 's';\n\n @Input()\n activeItemIndex = 0;\n\n @Output()\n readonly activeItemIndexChange = new EventEmitter<number>();\n\n constructor(\n @Inject(ElementRef) private readonly el: ElementRef<HTMLElement>,\n @Inject(TuiResizeService) resize$: Observable<unknown>,\n @Self() @Inject(TuiDestroyService) destroy$: Observable<unknown>,\n ) {\n resize$.pipe(takeUntil(destroy$)).subscribe(() => this.refresh());\n }\n\n get tabs(): HTMLCollection {\n return this.el.nativeElement.children;\n }\n\n ngOnChanges(): void {\n this.refresh();\n }\n\n update(activeItemIndex: number): void {\n if (activeItemIndex === this.activeItemIndex) {\n return;\n }\n\n this.activeItemIndex = activeItemIndex;\n this.activeItemIndexChange.emit(activeItemIndex);\n this.refresh();\n }\n\n private get left(): number {\n const element = this.activeElement;\n\n return tuiIsHTMLElement(element) ? element.offsetLeft : 0;\n }\n\n private get width(): number {\n return this.activeElement?.clientWidth || 0;\n }\n\n private get activeElement(): Element | null {\n return this.tabs.item(this.activeItemIndex);\n }\n\n // TODO: Switch to HostBinding signals in Angular 17+\n private refresh(): void {\n this.el.nativeElement.style.setProperty('--t-left', tuiPx(this.left));\n this.el.nativeElement.style.setProperty('--t-width', tuiPx(this.width));\n }\n}\n","import {\n AfterContentChecked,\n AfterContentInit,\n ContentChildren,\n Directive,\n ElementRef,\n HostListener,\n Inject,\n QueryList,\n Self,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {RouterLinkActive} from '@angular/router';\nimport {EMPTY_QUERY, TuiDestroyService, tuiQueryListChanges} from '@taiga-ui/cdk';\nimport {EMPTY, Observable} from 'rxjs';\nimport {switchMap, takeUntil} from 'rxjs/operators';\n\nimport {TuiSegmentedComponent} from './segmented.component';\n\n@Directive({\n selector: 'tui-segmented',\n})\nexport class TuiSegmentedDirective implements AfterContentChecked, AfterContentInit {\n @ContentChildren(NgControl, {descendants: true})\n private readonly controls: QueryList<NgControl> = EMPTY_QUERY;\n\n @ContentChildren(RouterLinkActive)\n private readonly links: QueryList<RouterLinkActive> = EMPTY_QUERY;\n\n @ContentChildren(RouterLinkActive, {read: ElementRef})\n private readonly elements: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n constructor(\n @Self() @Inject(TuiDestroyService) private readonly destroy$: Observable<unknown>,\n @Inject(TuiSegmentedComponent) private readonly component: TuiSegmentedComponent,\n @Inject(ElementRef) private readonly el: ElementRef<HTMLElement>,\n ) {}\n\n @HostListener('click', ['$event.target'])\n update(target: Element | null): void {\n const index = this.getIndex(target);\n\n if (index >= 0) {\n this.component.update(index);\n }\n }\n\n ngAfterContentInit(): void {\n tuiQueryListChanges(this.controls)\n .pipe(\n switchMap(() => this.controls.last?.valueChanges || EMPTY),\n takeUntil(this.destroy$),\n )\n .subscribe(() => {\n this.update(this.el.nativeElement.querySelector(':checked'));\n });\n }\n\n ngAfterContentChecked(): void {\n if (this.links.length) {\n this.update(this.elements.get(this.linkIndex)?.nativeElement || null);\n }\n }\n\n private get linkIndex(): number {\n return this.links.toArray().findIndex(link => link.isActive);\n }\n\n private getIndex(element: Element | null): number {\n return Array.from(this.component.tabs).findIndex(tab => tab.contains(element));\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiSegmentedComponent} from './segmented.component';\nimport {TuiSegmentedDirective} from './segmented.directive';\n\n@NgModule({\n declarations: [TuiSegmentedComponent, TuiSegmentedDirective],\n exports: [TuiSegmentedComponent, TuiSegmentedDirective],\n})\nexport class TuiSegmentedModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["EventEmitter","takeUntil","tuiIsHTMLElement","tuiPx","i0","ElementRef","TuiResizeService","TuiDestroyService","tuiBadgeNotificationOptionsProvider","Component","ViewEncapsulation","ChangeDetectionStrategy","Inject","Self","Input","HostBinding","Output","EMPTY_QUERY","tuiQueryListChanges","switchMap","EMPTY","NgControl","RouterLinkActive","Directive","ContentChildren","HostListener","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,QAAA,qBAAA,kBAAA,YAAA;IAWI,IAAA,SAAA,qBAAA,CACyC,EAA2B,EACtC,OAA4B,EACnB,QAA6B,EAAA;YAHpE,IAMC,KAAA,GAAA,IAAA,CAAA;IALwC,QAAA,IAAE,CAAA,EAAA,GAAF,EAAE,CAAyB;IATpE,QAAA,IAAI,CAAA,IAAA,GAAwB,GAAG,CAAC;IAGhC,QAAA,IAAe,CAAA,eAAA,GAAG,CAAC,CAAC;IAGX,QAAA,IAAA,CAAA,qBAAqB,GAAG,IAAIA,eAAY,EAAU,CAAC;YAOxD,OAAO,CAAC,IAAI,CAACC,mBAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,YAAM,EAAA,OAAA,KAAI,CAAC,OAAO,EAAE,CAAd,EAAc,CAAC,CAAC;SACrE;IAED,IAAA,MAAA,CAAA,cAAA,CAAI,qBAAI,CAAA,SAAA,EAAA,MAAA,EAAA;IAAR,QAAA,GAAA,EAAA,YAAA;IAC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,EAAA,OAAA,EAAA,CAAA,qBAAqB,EAAE,qBAAqB,CAAA,EAAA,CAAA,CAAA;2IAE7C,kBAAkB,EAAA,CAAA,CAAA;sHAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;sBAJ9BsB,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;IACN,oBAAA,YAAY,EAAE,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;IAC5D,oBAAA,OAAO,EAAE,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;qBAC1D,CAAA;;;ICRD;;IAEG;;;;;;;;;;;;"}
@@ -0,0 +1,119 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk'), require('@angular/common')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/experimental/components/swipe-action', ['exports', '@angular/core', '@taiga-ui/cdk', '@angular/common'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].experimental = global["taiga-ui"].experimental || {}, global["taiga-ui"].experimental.components = global["taiga-ui"].experimental.components || {}, global["taiga-ui"].experimental.components["swipe-action"] = {}), global.ng.core, global.i1, global.ng.common));
5
+ })(this, (function (exports, i0, i1, common) { 'use strict';
6
+
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
20
+ }
21
+ n["default"] = e;
22
+ return Object.freeze(n);
23
+ }
24
+
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
27
+
28
+ var TuiSwipeActionsComponent = /** @class */ (function () {
29
+ function TuiSwipeActionsComponent() {
30
+ this.actionsWidth = 0;
31
+ }
32
+ TuiSwipeActionsComponent.prototype.onResize = function (_a) {
33
+ var target = _a.target;
34
+ this.actionsWidth = target.clientWidth;
35
+ };
36
+ return TuiSwipeActionsComponent;
37
+ }());
38
+ TuiSwipeActionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSwipeActionsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
39
+ TuiSwipeActionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiSwipeActionsComponent, selector: "tui-swipe-actions", host: { properties: { "style.--t-actions-width": "actionsWidth" } }, ngImport: i0__namespace, template: "<div class=\"t-content\">\n <ng-content></ng-content>\n</div>\n\n<div\n class=\"t-actions\"\n (tuiResize)=\"onResize($event[0])\"\n>\n <ng-content select=\"[tuiSwipeAction]\"></ng-content>\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;--tui-action-gap: 24;--tui-actions-padding: .5rem;--tui-item-size: 44;display:flex;width:-webkit-fill-available;width:stretch;align-items:center;overflow-x:scroll;overflow-y:hidden;scroll-snap-type:x mandatory;perspective:1px;perspective-origin:calc(100% + calc(1px * var(--tui-item-size) / 2) + var(--tui-actions-padding))}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}.t-content{scroll-snap-align:start;flex-shrink:0;width:100%}.t-actions{display:flex;grid-gap:calc(1px * var(--tui-action-gap));gap:calc(1px * var(--tui-action-gap));padding:0 1rem 0 var(--tui-actions-padding);scroll-snap-align:start;align-items:center;transform-style:preserve-3d}::ng-deep .t-actions>*:nth-child(2){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * calc(2 - 1);--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% - calc(1px * var(--tui-action-gap))) * (2 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(3){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * calc(3 - 1);--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% - calc(1px * var(--tui-action-gap))) * (3 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(4){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * calc(4 - 1);--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% - calc(1px * var(--tui-action-gap))) * (4 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(5){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * calc(5 - 1);--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% - calc(1px * var(--tui-action-gap))) * (5 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(6){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * calc(6 - 1);--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% - calc(1px * var(--tui-action-gap))) * (6 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}\n"], directives: [{ type: i1__namespace.TuiResizeDirective, selector: "[tuiResize]", outputs: ["tuiResize"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
40
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSwipeActionsComponent, decorators: [{
41
+ type: i0.Component,
42
+ args: [{
43
+ selector: 'tui-swipe-actions',
44
+ templateUrl: './swipe-actions.template.html',
45
+ styleUrls: ['./swipe-actions.style.less'],
46
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
47
+ host: {
48
+ '[style.--t-actions-width]': 'actionsWidth',
49
+ },
50
+ }]
51
+ }] });
52
+
53
+ var TuiSwipeActionsAutoCloseDirective = /** @class */ (function () {
54
+ function TuiSwipeActionsAutoCloseDirective(el) {
55
+ this.el = el;
56
+ this.autoClose = true;
57
+ }
58
+ TuiSwipeActionsAutoCloseDirective.prototype.onPointer = function (event) {
59
+ var target = i1.tuiGetActualTarget(event);
60
+ if (this.autoClose && !this.el.nativeElement.contains(target)) {
61
+ this.close();
62
+ }
63
+ };
64
+ TuiSwipeActionsAutoCloseDirective.prototype.close = function () {
65
+ this.el.nativeElement.scrollTo({
66
+ left: 0,
67
+ behavior: 'smooth',
68
+ });
69
+ };
70
+ return TuiSwipeActionsAutoCloseDirective;
71
+ }());
72
+ TuiSwipeActionsAutoCloseDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSwipeActionsAutoCloseDirective, deps: [{ token: i0.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
73
+ TuiSwipeActionsAutoCloseDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiSwipeActionsAutoCloseDirective, selector: "tui-swipe-actions[autoClose]", inputs: { autoClose: "autoClose" }, host: { listeners: { "document:pointerdown.silent": "onPointer($event)" } }, ngImport: i0__namespace });
74
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSwipeActionsAutoCloseDirective, decorators: [{
75
+ type: i0.Directive,
76
+ args: [{
77
+ selector: 'tui-swipe-actions[autoClose]',
78
+ host: {
79
+ '(document:pointerdown.silent)': 'onPointer($event)',
80
+ },
81
+ }]
82
+ }], ctorParameters: function () {
83
+ return [{ type: i0__namespace.ElementRef, decorators: [{
84
+ type: i0.Inject,
85
+ args: [i0.ElementRef]
86
+ }] }];
87
+ }, propDecorators: { autoClose: [{
88
+ type: i0.Input
89
+ }] } });
90
+
91
+ var TuiSwipeActionsModule = /** @class */ (function () {
92
+ function TuiSwipeActionsModule() {
93
+ }
94
+ return TuiSwipeActionsModule;
95
+ }());
96
+ TuiSwipeActionsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSwipeActionsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
97
+ TuiSwipeActionsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSwipeActionsModule, declarations: [TuiSwipeActionsComponent, TuiSwipeActionsAutoCloseDirective], imports: [common.CommonModule, i1.TuiResizeModule], exports: [TuiSwipeActionsComponent, TuiSwipeActionsAutoCloseDirective] });
98
+ TuiSwipeActionsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSwipeActionsModule, imports: [[common.CommonModule, i1.TuiResizeModule]] });
99
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSwipeActionsModule, decorators: [{
100
+ type: i0.NgModule,
101
+ args: [{
102
+ imports: [common.CommonModule, i1.TuiResizeModule],
103
+ declarations: [TuiSwipeActionsComponent, TuiSwipeActionsAutoCloseDirective],
104
+ exports: [TuiSwipeActionsComponent, TuiSwipeActionsAutoCloseDirective],
105
+ }]
106
+ }] });
107
+
108
+ /**
109
+ * Generated bundle index. Do not edit.
110
+ */
111
+
112
+ exports.TuiSwipeActionsAutoCloseDirective = TuiSwipeActionsAutoCloseDirective;
113
+ exports.TuiSwipeActionsComponent = TuiSwipeActionsComponent;
114
+ exports.TuiSwipeActionsModule = TuiSwipeActionsModule;
115
+
116
+ Object.defineProperty(exports, '__esModule', { value: true });
117
+
118
+ }));
119
+ //# sourceMappingURL=taiga-ui-experimental-components-swipe-action.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-experimental-components-swipe-action.umd.js","sources":["../../../projects/experimental/components/swipe-action/swipe-actions.component.ts","../../../projects/experimental/components/swipe-action/swipe-actions.template.html","../../../projects/experimental/components/swipe-action/swipe-actions-auto-close.directive.ts","../../../projects/experimental/components/swipe-action/swipe-actions.module.ts","../../../projects/experimental/components/swipe-action/taiga-ui-experimental-components-swipe-action.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component} from '@angular/core';\n\n@Component({\n selector: 'tui-swipe-actions',\n templateUrl: './swipe-actions.template.html',\n styleUrls: ['./swipe-actions.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.--t-actions-width]': 'actionsWidth',\n },\n})\nexport class TuiSwipeActionsComponent {\n actionsWidth = 0;\n\n onResize({target}: ResizeObserverEntry): void {\n this.actionsWidth = target.clientWidth;\n }\n}\n","<div class=\"t-content\">\n <ng-content></ng-content>\n</div>\n\n<div\n class=\"t-actions\"\n (tuiResize)=\"onResize($event[0])\"\n>\n <ng-content select=\"[tuiSwipeAction]\"></ng-content>\n</div>\n","import {Directive, ElementRef, Inject, Input} from '@angular/core';\nimport {tuiGetActualTarget} from '@taiga-ui/cdk';\n\n@Directive({\n selector: 'tui-swipe-actions[autoClose]',\n host: {\n '(document:pointerdown.silent)': 'onPointer($event)',\n },\n})\nexport class TuiSwipeActionsAutoCloseDirective {\n @Input()\n autoClose = true;\n\n constructor(@Inject(ElementRef) private readonly el: ElementRef<HTMLElement>) {}\n\n onPointer(event: PointerEvent): void {\n const target = tuiGetActualTarget(event);\n\n if (this.autoClose && !this.el.nativeElement.contains(target)) {\n this.close();\n }\n }\n\n private close(): void {\n this.el.nativeElement.scrollTo({\n left: 0,\n behavior: 'smooth',\n });\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiResizeModule} from '@taiga-ui/cdk';\n\nimport {TuiSwipeActionsComponent} from './swipe-actions.component';\nimport {TuiSwipeActionsAutoCloseDirective} from './swipe-actions-auto-close.directive';\n\n@NgModule({\n imports: [CommonModule, TuiResizeModule],\n declarations: [TuiSwipeActionsComponent, TuiSwipeActionsAutoCloseDirective],\n exports: [TuiSwipeActionsComponent, TuiSwipeActionsAutoCloseDirective],\n})\nexport class TuiSwipeActionsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i0","i1","Component","ChangeDetectionStrategy","tuiGetActualTarget","ElementRef","Directive","Inject","Input","CommonModule","TuiResizeModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,QAAA,wBAAA,kBAAA,YAAA;IATA,IAAA,SAAA,wBAAA,GAAA;IAUI,QAAA,IAAY,CAAA,YAAA,GAAG,CAAC,CAAC;SAKpB;QAHG,wBAAQ,CAAA,SAAA,CAAA,QAAA,GAAR,UAAS,EAA6B,EAAA;IAA5B,QAAA,IAAA,MAAM,GAAA,EAAA,CAAA,MAAA,CAAA;IACZ,QAAA,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC;SAC1C,CAAA;;;gJALQ,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAAA,aAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;IAAxB,wBAAA,CAAA,IAAA,GAAAA,aAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EA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;IAE5D,qBAAA,CAAA,IAAA,GAAAV,aAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAAA,aAAA,EAAA,IAAA,EAAA,qBAAqB,EAJrB,OAAA,EAAA,CAAA,CAACS,mBAAY,EAAEC,kBAAe,CAAC,CAAA,EAAA,CAAA,CAAA;sHAI/B,qBAAqB,EAAA,UAAA,EAAA,CAAA;sBALjCC,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;IACN,oBAAA,OAAO,EAAE,CAACF,mBAAY,EAAEC,kBAAe,CAAC;IACxC,oBAAA,YAAY,EAAE,CAAC,wBAAwB,EAAE,iCAAiC,CAAC;IAC3E,oBAAA,OAAO,EAAE,CAAC,wBAAwB,EAAE,iCAAiC,CAAC;qBACzE,CAAA;;;ICXD;;IAEG;;;;;;;;;;;;"}
@@ -53,7 +53,7 @@
53
53
  return TuiThumbnailCardComponent;
54
54
  }());
55
55
  TuiThumbnailCardComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiThumbnailCardComponent, deps: [{ token: tokens.TUI_ICON_RESOLVER }, { token: addonCommerce.TUI_INPUT_CARD_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Component });
56
- TuiThumbnailCardComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiThumbnailCardComponent, selector: "tui-thumbnail-card", inputs: { size: "size", paymentSystem: "paymentSystem", iconLeft: "iconLeft", iconRight: "iconRight" }, host: { properties: { "attr.data-size": "this.size" } }, ngImport: i0__namespace, template: "<div class=\"t-front\">\n <div\n *ngIf=\"iconLeft\"\n class=\"t-left\"\n >\n <tui-icon\n class=\"t-icon\"\n [icon]=\"iconLeft\"\n ></tui-icon>\n </div>\n <div\n *ngIf=\"iconRight\"\n class=\"t-right\"\n >\n <tui-icon\n class=\"t-icon\"\n [icon]=\"iconRight\"\n ></tui-icon>\n </div>\n <ng-content></ng-content>\n <ng-container *ngIf=\"paymentSystem\">\n <tui-icon\n *ngIf=\"isMono; else colored\"\n class=\"t-logo\"\n [icon]=\"options.icons[paymentSystem]\"\n ></tui-icon>\n <ng-template #colored>\n <img\n class=\"t-logo\"\n [alt]=\"paymentSystem\"\n [src]=\"resolver(options.icons[paymentSystem]).replace('Outline', '')\"\n />\n </ng-template>\n </ng-container>\n</div>\n<div class=\"t-back\"></div>\n", styles: [":host{position:relative;display:inline-flex;background:#000;color:#fff;transform-style:preserve-3d;overflow:hidden}:host:before{position:absolute;top:0;left:0;width:100%;height:100%;content:\"\"}:host[data-size=s]{width:2.5rem;height:1.625rem;border-radius:.25rem;font-size:0}:host[data-size=s] .t-left{transform:translate(.125rem,.125rem) scale(.625)}:host[data-size=s] .t-right{display:none}:host[data-size=s] .t-logo{bottom:-.375rem;transform:scale(.55)}:host[data-size=m]{width:3rem;height:2rem;border-radius:.3125rem;text-indent:.1875rem;font:normal .5625rem/.875rem var(--tui-font-text)}:host[data-size=m] .t-left{transform:translate(.1875rem,.25rem) scale(.75)}:host[data-size=m] .t-right{transform:translate(-.1875rem,.1875rem) scale(.875)}:host[data-size=m] .t-right .t-icon{transform:scale(.714)}:host[data-size=m] .t-logo{bottom:-.3125rem;transform:scale(.55)}:host[data-size=l]{width:3.375rem;height:2.25rem;border-radius:.375rem;text-indent:.3125rem;font:normal .625rem/1.125rem var(--tui-font-text)}:host[data-size=l] .t-left{transform:translate(.1875rem,.1875rem)}:host[data-size=l] .t-right{transform:translate(-.1875rem,.1875rem)}:host[data-size=l] .t-logo{bottom:-.1875rem;transform:scale(.75)}.t-left,.t-right{position:absolute;top:0;display:flex}.t-left{left:0;transform-origin:top left}.t-right{right:0;transform-origin:top right}.t-right:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;border-radius:100%;background:currentColor;opacity:.35}.t-right .t-icon{color:#fff;transform:scale(.625)}.t-logo{position:absolute;right:.1875rem;width:1.5rem;height:1.5rem;transform-origin:right}.t-icon{width:1rem;height:1rem}.t-front{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:flex-end;-webkit-backface-visibility:hidden;backface-visibility:hidden;box-shadow:inset 0 0 0 1px var(--tui-clear);border-radius:inherit}.t-back{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:rotateY(180deg) translateZ(1px);background:#b0b0b0;border-radius:inherit}.t-back:after{position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";top:20%;bottom:60%;background:#959595}\n"], components: [{ type: i1__namespace.TuiIconComponent, selector: "tui-icon", inputs: ["icon", "background"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
56
+ TuiThumbnailCardComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiThumbnailCardComponent, selector: "tui-thumbnail-card", inputs: { size: "size", paymentSystem: "paymentSystem", iconLeft: "iconLeft", iconRight: "iconRight" }, host: { properties: { "attr.data-size": "this.size" } }, ngImport: i0__namespace, template: "<div class=\"t-front\">\n <div\n *ngIf=\"iconLeft\"\n class=\"t-left\"\n >\n <tui-icon\n class=\"t-icon\"\n [icon]=\"iconLeft\"\n ></tui-icon>\n </div>\n <div\n *ngIf=\"iconRight\"\n class=\"t-right\"\n >\n <tui-icon\n class=\"t-icon\"\n [icon]=\"iconRight\"\n ></tui-icon>\n </div>\n <ng-content></ng-content>\n <ng-container *ngIf=\"paymentSystem\">\n <tui-icon\n *ngIf=\"isMono; else colored\"\n class=\"t-logo\"\n [icon]=\"options.icons[paymentSystem]\"\n ></tui-icon>\n <ng-template #colored>\n <img\n class=\"t-logo\"\n [alt]=\"paymentSystem\"\n [src]=\"resolver(options.icons[paymentSystem]).replace('Outline', '')\"\n />\n </ng-template>\n </ng-container>\n</div>\n<div class=\"t-back\"></div>\n", styles: [":host{position:relative;display:inline-flex;flex-shrink:0;background:#000;color:#fff;transform-style:preserve-3d;overflow:hidden}:host:before{position:absolute;top:0;left:0;width:100%;height:100%;content:\"\"}:host[data-size=s]{width:2.5rem;height:1.625rem;border-radius:.25rem;font-size:0}:host[data-size=s] .t-left{transform:translate(.125rem,.125rem) scale(.625)}:host[data-size=s] .t-right{display:none}:host[data-size=s] .t-logo{bottom:-.375rem;transform:scale(.55)}:host[data-size=m]{width:3rem;height:2rem;border-radius:.3125rem;text-indent:.1875rem;font:normal .5625rem/.875rem var(--tui-font-text)}:host[data-size=m] .t-left{transform:translate(.1875rem,.25rem) scale(.75)}:host[data-size=m] .t-right{transform:translate(-.1875rem,.1875rem) scale(.875)}:host[data-size=m] .t-right .t-icon{transform:scale(.714)}:host[data-size=m] .t-logo{bottom:-.3125rem;transform:scale(.55)}:host[data-size=l]{width:3.375rem;height:2.25rem;border-radius:.375rem;text-indent:.3125rem;font:normal .625rem/1.125rem var(--tui-font-text)}:host[data-size=l] .t-left{transform:translate(.1875rem,.1875rem)}:host[data-size=l] .t-right{transform:translate(-.1875rem,.1875rem)}:host[data-size=l] .t-logo{bottom:-.1875rem;transform:scale(.75)}.t-left,.t-right{position:absolute;top:0;display:flex}.t-left{left:0;transform-origin:top left}.t-right{right:0;transform-origin:top right}.t-right:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;border-radius:100%;background:currentColor;opacity:.35}.t-right .t-icon{color:#fff;transform:scale(.625)}.t-logo{position:absolute;right:.1875rem;width:1.5rem;height:1.5rem;transform-origin:right}.t-icon{width:1rem;height:1rem}.t-front{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:flex-end;-webkit-backface-visibility:hidden;backface-visibility:hidden;box-shadow:inset 0 0 0 1px var(--tui-clear);border-radius:inherit}.t-back{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:rotateY(180deg) translateZ(1px);background:#b0b0b0;border-radius:inherit}.t-back:after{position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";top:20%;bottom:60%;background:#959595}\n"], components: [{ type: i1__namespace.TuiIconComponent, selector: "tui-icon", inputs: ["icon", "background"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
57
57
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiThumbnailCardComponent, decorators: [{
58
58
  type: i0.Component,
59
59
  args: [{
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-experimental-components-thumbnail-card.umd.js","sources":["../../../projects/experimental/components/thumbnail-card/thumbnail-card.component.ts","../../../projects/experimental/components/thumbnail-card/thumbnail-card.template.html","../../../projects/experimental/components/thumbnail-card/thumbnail-card.module.ts","../../../projects/experimental/components/thumbnail-card/taiga-ui-experimental-components-thumbnail-card.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {\n TUI_INPUT_CARD_OPTIONS,\n TuiInputCardOptions,\n TuiPaymentSystem,\n} from '@taiga-ui/addon-commerce';\nimport {TuiStringHandler} from '@taiga-ui/cdk';\nimport {TuiSizeL, TuiSizeS} from '@taiga-ui/core';\nimport {TUI_ICON_RESOLVER} from '@taiga-ui/experimental/tokens';\n\n@Component({\n selector: 'tui-thumbnail-card',\n templateUrl: './thumbnail-card.template.html',\n styleUrls: ['./thumbnail-card.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiThumbnailCardComponent {\n @Input()\n @HostBinding('attr.data-size')\n size: TuiSizeL | TuiSizeS = 'm';\n\n @Input()\n paymentSystem: TuiPaymentSystem | null = null;\n\n @Input()\n iconLeft = '';\n\n @Input()\n iconRight = '';\n\n constructor(\n @Inject(TUI_ICON_RESOLVER) readonly resolver: TuiStringHandler<string>,\n @Inject(TUI_INPUT_CARD_OPTIONS) readonly options: TuiInputCardOptions,\n ) {}\n\n // TODO: Revisit this approach in 4.0 when icons are moved away from InputCard options\n get isMono(): boolean {\n switch (this.paymentSystem) {\n case 'mir':\n case 'visa':\n case 'electron':\n return true;\n default:\n return false;\n }\n }\n}\n","<div class=\"t-front\">\n <div\n *ngIf=\"iconLeft\"\n class=\"t-left\"\n >\n <tui-icon\n class=\"t-icon\"\n [icon]=\"iconLeft\"\n ></tui-icon>\n </div>\n <div\n *ngIf=\"iconRight\"\n class=\"t-right\"\n >\n <tui-icon\n class=\"t-icon\"\n [icon]=\"iconRight\"\n ></tui-icon>\n </div>\n <ng-content></ng-content>\n <ng-container *ngIf=\"paymentSystem\">\n <tui-icon\n *ngIf=\"isMono; else colored\"\n class=\"t-logo\"\n [icon]=\"options.icons[paymentSystem]\"\n ></tui-icon>\n <ng-template #colored>\n <img\n class=\"t-logo\"\n [alt]=\"paymentSystem\"\n [src]=\"resolver(options.icons[paymentSystem]).replace('Outline', '')\"\n />\n </ng-template>\n </ng-container>\n</div>\n<div class=\"t-back\"></div>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiIconModule} from '@taiga-ui/experimental/components/icon';\n\nimport {TuiThumbnailCardComponent} from './thumbnail-card.component';\n\n@NgModule({\n imports: [CommonModule, TuiIconModule],\n declarations: [TuiThumbnailCardComponent],\n exports: [TuiThumbnailCardComponent],\n})\nexport class TuiThumbnailCardModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TUI_ICON_RESOLVER","TUI_INPUT_CARD_OPTIONS","i0","i1","i2","Component","ChangeDetectionStrategy","Inject","Input","HostBinding","CommonModule","TuiIconModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,QAAA,yBAAA,kBAAA,YAAA;QAcI,SACwC,yBAAA,CAAA,QAAkC,EAC7B,OAA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A,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAAA,aAAA,EAAA,IAAA,EAAA,sBAAsB,EAJtB,OAAA,EAAA,CAAA,CAACQ,eAAY,EAAEC,gBAAa,CAAC,CAAA,EAAA,CAAA,CAAA;sHAI7B,sBAAsB,EAAA,UAAA,EAAA,CAAA;sBALlCC,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;IACN,oBAAA,OAAO,EAAE,CAACF,eAAY,EAAEC,gBAAa,CAAC;wBACtC,YAAY,EAAE,CAAC,yBAAyB,CAAC;wBACzC,OAAO,EAAE,CAAC,yBAAyB,CAAC;qBACvC,CAAA;;;ICVD;;IAEG;;;;;;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-experimental-components-thumbnail-card.umd.js","sources":["../../../projects/experimental/components/thumbnail-card/thumbnail-card.component.ts","../../../projects/experimental/components/thumbnail-card/thumbnail-card.template.html","../../../projects/experimental/components/thumbnail-card/thumbnail-card.module.ts","../../../projects/experimental/components/thumbnail-card/taiga-ui-experimental-components-thumbnail-card.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {\n TUI_INPUT_CARD_OPTIONS,\n TuiInputCardOptions,\n TuiPaymentSystem,\n} from '@taiga-ui/addon-commerce';\nimport {TuiStringHandler} from '@taiga-ui/cdk';\nimport {TuiSizeL, TuiSizeS} from '@taiga-ui/core';\nimport {TUI_ICON_RESOLVER} from '@taiga-ui/experimental/tokens';\n\n@Component({\n selector: 'tui-thumbnail-card',\n templateUrl: './thumbnail-card.template.html',\n styleUrls: ['./thumbnail-card.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiThumbnailCardComponent {\n @Input()\n @HostBinding('attr.data-size')\n size: TuiSizeL | TuiSizeS = 'm';\n\n @Input()\n paymentSystem: TuiPaymentSystem | null = null;\n\n @Input()\n iconLeft = '';\n\n @Input()\n iconRight = '';\n\n constructor(\n @Inject(TUI_ICON_RESOLVER) readonly resolver: TuiStringHandler<string>,\n @Inject(TUI_INPUT_CARD_OPTIONS) readonly options: TuiInputCardOptions,\n ) {}\n\n // TODO: Revisit this approach in 4.0 when icons are moved away from InputCard options\n get isMono(): boolean {\n switch (this.paymentSystem) {\n case 'mir':\n case 'visa':\n case 'electron':\n return true;\n default:\n return false;\n }\n }\n}\n","<div class=\"t-front\">\n <div\n *ngIf=\"iconLeft\"\n class=\"t-left\"\n >\n <tui-icon\n class=\"t-icon\"\n [icon]=\"iconLeft\"\n ></tui-icon>\n </div>\n <div\n *ngIf=\"iconRight\"\n class=\"t-right\"\n >\n <tui-icon\n class=\"t-icon\"\n [icon]=\"iconRight\"\n ></tui-icon>\n </div>\n <ng-content></ng-content>\n <ng-container *ngIf=\"paymentSystem\">\n <tui-icon\n *ngIf=\"isMono; else colored\"\n class=\"t-logo\"\n [icon]=\"options.icons[paymentSystem]\"\n ></tui-icon>\n <ng-template #colored>\n <img\n class=\"t-logo\"\n [alt]=\"paymentSystem\"\n [src]=\"resolver(options.icons[paymentSystem]).replace('Outline', '')\"\n />\n </ng-template>\n </ng-container>\n</div>\n<div class=\"t-back\"></div>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiIconModule} from '@taiga-ui/experimental/components/icon';\n\nimport {TuiThumbnailCardComponent} from './thumbnail-card.component';\n\n@NgModule({\n imports: [CommonModule, TuiIconModule],\n declarations: [TuiThumbnailCardComponent],\n exports: [TuiThumbnailCardComponent],\n})\nexport class TuiThumbnailCardModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TUI_ICON_RESOLVER","TUI_INPUT_CARD_OPTIONS","i0","i1","i2","Component","ChangeDetectionStrategy","Inject","Input","HostBinding","CommonModule","TuiIconModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,QAAA,yBAAA,kBAAA,YAAA;QAcI,SACwC,yBAAA,CAAA,QAAkC,E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AAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAAA,aAAA,EAAA,IAAA,EAAA,sBAAsB,EAJtB,OAAA,EAAA,CAAA,CAACQ,eAAY,EAAEC,gBAAa,CAAC,CAAA,EAAA,CAAA,CAAA;sHAI7B,sBAAsB,EAAA,UAAA,EAAA,CAAA;sBALlCC,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;IACN,oBAAA,OAAO,EAAE,CAACF,eAAY,EAAEC,gBAAa,CAAC;wBACtC,YAAY,EAAE,CAAC,yBAAyB,CAAC;wBACzC,OAAO,EAAE,CAAC,yBAAyB,CAAC;qBACvC,CAAA;;;ICVD;;IAEG;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@taiga-ui/experimental/directives/appearance'), require('rxjs/operators'), require('@taiga-ui/experimental/components/button'), require('@taiga-ui/experimental/directives/icons'), require('@angular/common'), require('rxjs'), require('@taiga-ui/experimental/components/icon'), require('@tinkoff/ng-polymorpheus')) :
3
- typeof define === 'function' && define.amd ? define('@taiga-ui/experimental/components/tooltip', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/experimental/directives/appearance', 'rxjs/operators', '@taiga-ui/experimental/components/button', '@taiga-ui/experimental/directives/icons', '@angular/common', 'rxjs', '@taiga-ui/experimental/components/icon', '@tinkoff/ng-polymorpheus'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].experimental = global["taiga-ui"].experimental || {}, global["taiga-ui"].experimental.components = global["taiga-ui"].experimental.components || {}, global["taiga-ui"].experimental.components.tooltip = {}), global.ng.core, global.cdk, global.i4, global["taiga-ui"].experimental.directives.appearance, global.rxjs.operators, global["taiga-ui"].experimental.components.button, global.i2, global.ng.common, global.rxjs, global["taiga-ui"].experimental.components.icon, global.ngPolymorpheus));
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@taiga-ui/experimental/directives/appearance'), require('rxjs/operators'), require('@taiga-ui/experimental/directives/icons'), require('@taiga-ui/experimental/components/button'), require('@angular/common'), require('rxjs'), require('@taiga-ui/experimental/components/icon'), require('@tinkoff/ng-polymorpheus')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/experimental/components/tooltip', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/experimental/directives/appearance', 'rxjs/operators', '@taiga-ui/experimental/directives/icons', '@taiga-ui/experimental/components/button', '@angular/common', 'rxjs', '@taiga-ui/experimental/components/icon', '@tinkoff/ng-polymorpheus'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].experimental = global["taiga-ui"].experimental || {}, global["taiga-ui"].experimental.components = global["taiga-ui"].experimental.components || {}, global["taiga-ui"].experimental.components.tooltip = {}), global.ng.core, global.cdk, global.i4, global["taiga-ui"].experimental.directives.appearance, global.rxjs.operators, global.i1, global["taiga-ui"].experimental.components.button, global.ng.common, global.rxjs, global["taiga-ui"].experimental.components.icon, global.ngPolymorpheus));
5
5
  })(this, (function (exports, i0, cdk, i4, i3, operators, i1, i2, i5, i6, icon, ngPolymorpheus) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
@@ -397,7 +397,7 @@
397
397
  return TuiTooltipComponent;
398
398
  }(i4.TuiHintOptionsDirective));
399
399
  TuiTooltipComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiTooltipComponent, deps: [{ token: cdk.TuiDestroyService, self: true }, { token: i4.TUI_MODE }, { token: i4.TUI_HINT_OPTIONS }, { token: TUI_TOOLTIP_OPTIONS }, { token: cdk.TUI_PLATFORM }, { token: i3.TuiAppearanceDirective, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
400
- TuiTooltipComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiTooltipComponent, selector: "tui-tooltip", inputs: { content: "content", direction: "direction", appearance: "appearance", showDelay: "showDelay", hideDelay: "hideDelay", describeId: "describeId", context: "context" }, host: { listeners: { "mousedown": "stopOnMobile($event)" } }, providers: [cdk.TuiDestroyService, i4.MODE_PROVIDER], viewQueries: [{ propertyName: "driver$", first: true, predicate: i4.TuiHintHoverDirective, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<button\n #driver=\"tuiHintHover\"\n automation-id=\"tui-tooltip__icon\"\n size=\"xs\"\n tuiIconButton\n class=\"t-tooltip-button\"\n [attr.tabindex]=\"describeId ? -1 : 0\"\n [iconLeft]=\"tooltipIcon\"\n [tuiAppearance]=\"iconAppearance?.tuiAppearance || 'icon'\"\n [tuiAppearanceState]=\"(driver | async) ? 'active' : null\"\n [tuiHint]=\"content\"\n [tuiHintAppearance]=\"computedAppearance\"\n [tuiHintContext]=\"context\"\n [tuiHintDescribe]=\"describeId\"\n [tuiHintDirection]=\"direction\"\n [tuiHintHideDelay]=\"hideDelay\"\n [tuiHintShowDelay]=\"showDelay\"\n></button>\n", styles: [":host{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;font-size:0;line-height:0;pointer-events:auto;border-radius:100%;cursor:pointer}.t-tooltip-button{border-radius:inherit;outline-offset:-4px}.t-tooltip-button:before{width:1rem;height:1rem}:host-context([tuiWrapper][data-appearance=\"textfield\"][data-state=\"disabled\"]) .t-tooltip-button{opacity:1}\n"], directives: [{ type: i1__namespace.TuiButtonDirective, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size", "appearance"] }, { type: i2__namespace.TuiIconsDirective, selector: "[iconLeft]:is(button,tui-badge,tui-chip),[iconRight]:is(button,tui-badge,tui-chip),[tuiBadge][iconLeft],[tuiBadge][iconRight],[tuiChip][iconLeft],[tuiChip][iconRight],[tuiButtonClose]", inputs: ["iconLeft", "iconRight"] }, { type: i3__namespace.TuiAppearanceDirective, selector: "[tuiAppearance]", inputs: ["tuiAppearance", "tuiAppearanceState", "tuiAppearanceFocus"] }, { type: i4__namespace.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"] }, { type: i4__namespace.TuiHintDriverDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)" }, { type: i4__namespace.TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintShowDelay", "tuiHintHideDelay"], exportAs: ["tuiHintHover"] }, { type: i4__namespace.TuiHintPositionDirective, selector: "[tuiHint]:not([tuiHintCustomPosition]):not(ng-container):not(ng-template)", inputs: ["tuiHintDirection"] }, { type: i4__namespace.TuiHintDescribeDirective, selector: "[tuiHintDescribe]", inputs: ["tuiHintDescribe"] }], pipes: { "async": i5__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
400
+ TuiTooltipComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiTooltipComponent, selector: "tui-tooltip", inputs: { content: "content", direction: "direction", appearance: "appearance", showDelay: "showDelay", hideDelay: "hideDelay", describeId: "describeId", context: "context" }, host: { listeners: { "mousedown": "stopOnMobile($event)" } }, providers: [cdk.TuiDestroyService, i4.MODE_PROVIDER], viewQueries: [{ propertyName: "driver$", first: true, predicate: i4.TuiHintHoverDirective, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<button\n #driver=\"tuiHintHover\"\n automation-id=\"tui-tooltip__icon\"\n size=\"xs\"\n tuiIconButton\n class=\"t-tooltip-button\"\n [attr.tabindex]=\"describeId ? -1 : 0\"\n [iconLeft]=\"tooltipIcon\"\n [tuiAppearance]=\"iconAppearance?.tuiAppearance || 'icon'\"\n [tuiAppearanceState]=\"(driver | async) ? 'active' : null\"\n [tuiHint]=\"content\"\n [tuiHintAppearance]=\"computedAppearance\"\n [tuiHintContext]=\"context\"\n [tuiHintDescribe]=\"describeId\"\n [tuiHintDirection]=\"direction\"\n [tuiHintHideDelay]=\"hideDelay\"\n [tuiHintShowDelay]=\"showDelay\"\n></button>\n", styles: [":host{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;font-size:0;line-height:0;pointer-events:auto;border-radius:100%;cursor:pointer}.t-tooltip-button{border-radius:inherit;outline-offset:-4px}.t-tooltip-button:before{width:1rem;height:1rem}:host-context([tuiWrapper][data-appearance=\"textfield\"][data-state=\"disabled\"]) .t-tooltip-button{opacity:1}\n"], directives: [{ type: i1__namespace.TuiIconsDirective, selector: "[iconLeft]:is(a,button,tui-badge,tui-chip),[iconRight]:is(a,button,tui-badge,tui-chip),[tuiBadge][iconLeft],[tuiBadge][iconRight],[tuiChip][iconLeft],[tuiChip][iconRight],[tuiButtonClose]", inputs: ["iconLeft", "iconRight"] }, { type: i2__namespace.TuiButtonDirective, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size", "appearance"] }, { type: i3__namespace.TuiAppearanceDirective, selector: "[tuiAppearance]", inputs: ["tuiAppearance", "tuiAppearanceState", "tuiAppearanceFocus"] }, { type: i4__namespace.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"] }, { type: i4__namespace.TuiHintDriverDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)" }, { type: i4__namespace.TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintShowDelay", "tuiHintHideDelay"], exportAs: ["tuiHintHover"] }, { type: i4__namespace.TuiHintPositionDirective, selector: "[tuiHint]:not([tuiHintCustomPosition]):not(ng-container):not(ng-template)", inputs: ["tuiHintDirection"] }, { type: i4__namespace.TuiHintDescribeDirective, selector: "[tuiHintDescribe]", inputs: ["tuiHintDescribe"] }], pipes: { "async": i5__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
401
401
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiTooltipComponent, decorators: [{
402
402
  type: i0.Component,
403
403
  args: [{
@@ -451,14 +451,14 @@
451
451
  }());
452
452
  TuiTooltipModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiTooltipModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
453
453
  TuiTooltipModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiTooltipModule, declarations: [TuiTooltipComponent], imports: [i5.CommonModule,
454
- i1.TuiButtonModule,
454
+ i2.TuiButtonModule,
455
455
  i3.TuiAppearanceModule,
456
456
  i4.TuiHintModule,
457
457
  icon.TuiIconModule,
458
458
  ngPolymorpheus.PolymorpheusModule], exports: [TuiTooltipComponent] });
459
459
  TuiTooltipModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiTooltipModule, imports: [[
460
460
  i5.CommonModule,
461
- i1.TuiButtonModule,
461
+ i2.TuiButtonModule,
462
462
  i3.TuiAppearanceModule,
463
463
  i4.TuiHintModule,
464
464
  icon.TuiIconModule,
@@ -469,7 +469,7 @@
469
469
  args: [{
470
470
  imports: [
471
471
  i5.CommonModule,
472
- i1.TuiButtonModule,
472
+ i2.TuiButtonModule,
473
473
  i3.TuiAppearanceModule,
474
474
  i4.TuiHintModule,
475
475
  icon.TuiIconModule,