@taiga-ui/experimental 3.54.0 → 3.55.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 (144) hide show
  1. package/bundles/taiga-ui-experimental-components-avatar.umd.js +19 -15
  2. package/bundles/taiga-ui-experimental-components-avatar.umd.js.map +1 -1
  3. package/bundles/taiga-ui-experimental-components-badge.umd.js +117 -96
  4. package/bundles/taiga-ui-experimental-components-badge.umd.js.map +1 -1
  5. package/bundles/taiga-ui-experimental-components-badged-content.umd.js +1 -1
  6. package/bundles/taiga-ui-experimental-components-badged-content.umd.js.map +1 -1
  7. package/bundles/taiga-ui-experimental-components-button.umd.js +30 -23
  8. package/bundles/taiga-ui-experimental-components-button.umd.js.map +1 -1
  9. package/bundles/taiga-ui-experimental-components-checkbox.umd.js +9 -14
  10. package/bundles/taiga-ui-experimental-components-checkbox.umd.js.map +1 -1
  11. package/bundles/taiga-ui-experimental-components-icon.umd.js +23 -43
  12. package/bundles/taiga-ui-experimental-components-icon.umd.js.map +1 -1
  13. package/bundles/taiga-ui-experimental-components-toggle.umd.js +14 -30
  14. package/bundles/taiga-ui-experimental-components-toggle.umd.js.map +1 -1
  15. package/bundles/taiga-ui-experimental-directives-appearance.umd.js +82 -0
  16. package/bundles/taiga-ui-experimental-directives-appearance.umd.js.map +1 -0
  17. package/bundles/taiga-ui-experimental-directives-button-vertical.umd.js +95 -0
  18. package/bundles/taiga-ui-experimental-directives-button-vertical.umd.js.map +1 -0
  19. package/bundles/taiga-ui-experimental-directives-card.umd.js +89 -88
  20. package/bundles/taiga-ui-experimental-directives-card.umd.js.map +1 -1
  21. package/bundles/taiga-ui-experimental-directives-cell.umd.js +1 -1
  22. package/bundles/taiga-ui-experimental-directives-progress-segmented.umd.js +1 -1
  23. package/bundles/taiga-ui-experimental-directives-progress-segmented.umd.js.map +1 -1
  24. package/bundles/taiga-ui-experimental-directives-sensitive.umd.js +3 -3
  25. package/bundles/taiga-ui-experimental-directives-sensitive.umd.js.map +1 -1
  26. package/bundles/taiga-ui-experimental-directives-surface.umd.js +6 -5
  27. package/bundles/taiga-ui-experimental-directives-surface.umd.js.map +1 -1
  28. package/bundles/taiga-ui-experimental-directives.umd.js +16 -4
  29. package/bundles/taiga-ui-experimental-directives.umd.js.map +1 -1
  30. package/bundles/taiga-ui-experimental-tokens.umd.js +31 -0
  31. package/bundles/taiga-ui-experimental-tokens.umd.js.map +1 -0
  32. package/bundles/taiga-ui-experimental.umd.js +10 -4
  33. package/bundles/taiga-ui-experimental.umd.js.map +1 -1
  34. package/components/avatar/avatar.component.d.ts +5 -4
  35. package/components/avatar/avatar.module.d.ts +2 -2
  36. package/components/badge/badge.component.d.ts +1 -11
  37. package/components/badge/badge.directive.d.ts +13 -0
  38. package/components/badge/badge.module.d.ts +2 -1
  39. package/components/badge/badge.options.d.ts +2 -3
  40. package/components/badge/index.d.ts +1 -0
  41. package/components/button/button.component.d.ts +1 -3
  42. package/components/button/button.directive.d.ts +6 -3
  43. package/components/checkbox/checkbox.component.d.ts +5 -6
  44. package/components/icon/icon.component.d.ts +5 -1
  45. package/components/icon/icon.module.d.ts +1 -2
  46. package/components/icon/index.d.ts +0 -1
  47. package/components/toggle/toggle.component.d.ts +5 -10
  48. package/directives/appearance/appearance.directive.d.ts +9 -0
  49. package/directives/appearance/appearance.module.d.ts +7 -0
  50. package/directives/appearance/index.d.ts +2 -0
  51. package/directives/appearance/package.json +10 -0
  52. package/directives/appearance/taiga-ui-experimental-directives-appearance.d.ts +5 -0
  53. package/directives/button-vertical/button-vertical.component.d.ts +5 -0
  54. package/directives/button-vertical/button-vertical.directive.d.ts +7 -0
  55. package/directives/button-vertical/button-vertical.module.d.ts +8 -0
  56. package/directives/button-vertical/index.d.ts +3 -0
  57. package/directives/button-vertical/package.json +10 -0
  58. package/directives/button-vertical/taiga-ui-experimental-directives-button-vertical.d.ts +5 -0
  59. package/directives/card/card.component.d.ts +5 -0
  60. package/directives/card/card.directive.d.ts +0 -4
  61. package/directives/card/card.module.d.ts +3 -2
  62. package/directives/card/index.d.ts +1 -0
  63. package/directives/index.d.ts +2 -0
  64. package/directives/sensitive/sensitive.module.d.ts +2 -1
  65. package/esm2015/components/avatar/avatar.component.js +17 -12
  66. package/esm2015/components/avatar/avatar.module.js +5 -5
  67. package/esm2015/components/badge/badge.component.js +8 -36
  68. package/esm2015/components/badge/badge.directive.js +47 -0
  69. package/esm2015/components/badge/badge.module.js +5 -4
  70. package/esm2015/components/badge/badge.options.js +2 -2
  71. package/esm2015/components/badge/index.js +2 -1
  72. package/esm2015/components/badged-content/badged-content.component.js +1 -1
  73. package/esm2015/components/button/button.component.js +3 -10
  74. package/esm2015/components/button/button.directive.js +22 -7
  75. package/esm2015/components/checkbox/checkbox.component.js +9 -13
  76. package/esm2015/components/icon/icon.component.js +19 -7
  77. package/esm2015/components/icon/icon.module.js +4 -5
  78. package/esm2015/components/icon/index.js +1 -2
  79. package/esm2015/components/toggle/toggle.component.js +13 -29
  80. package/esm2015/directives/appearance/appearance.directive.js +30 -0
  81. package/esm2015/directives/appearance/appearance.module.js +16 -0
  82. package/esm2015/directives/appearance/index.js +3 -0
  83. package/esm2015/directives/appearance/taiga-ui-experimental-directives-appearance.js +5 -0
  84. package/esm2015/directives/button-vertical/button-vertical.component.js +19 -0
  85. package/esm2015/directives/button-vertical/button-vertical.directive.js +22 -0
  86. package/esm2015/directives/button-vertical/button-vertical.module.js +17 -0
  87. package/esm2015/directives/button-vertical/index.js +4 -0
  88. package/esm2015/directives/button-vertical/taiga-ui-experimental-directives-button-vertical.js +5 -0
  89. package/esm2015/directives/card/card.component.js +19 -0
  90. package/esm2015/directives/card/card.directive.js +3 -18
  91. package/esm2015/directives/card/card.module.js +3 -2
  92. package/esm2015/directives/card/index.js +2 -1
  93. package/esm2015/directives/cell/cell.component.js +1 -1
  94. package/esm2015/directives/index.js +3 -1
  95. package/esm2015/directives/progress-segmented/progress-segmented.component.js +1 -1
  96. package/esm2015/directives/sensitive/sensitive.component.js +1 -1
  97. package/esm2015/directives/sensitive/sensitive.module.js +4 -3
  98. package/esm2015/directives/surface/surface.component.js +1 -1
  99. package/esm2015/directives/surface/surface.directive.js +7 -6
  100. package/esm2015/index.js +2 -1
  101. package/esm2015/tokens/icon-resolver.js +15 -0
  102. package/esm2015/tokens/index.js +2 -0
  103. package/esm2015/tokens/taiga-ui-experimental-tokens.js +5 -0
  104. package/fesm2015/taiga-ui-experimental-components-avatar.js +20 -15
  105. package/fesm2015/taiga-ui-experimental-components-avatar.js.map +1 -1
  106. package/fesm2015/taiga-ui-experimental-components-badge.js +41 -25
  107. package/fesm2015/taiga-ui-experimental-components-badge.js.map +1 -1
  108. package/fesm2015/taiga-ui-experimental-components-badged-content.js +1 -1
  109. package/fesm2015/taiga-ui-experimental-components-badged-content.js.map +1 -1
  110. package/fesm2015/taiga-ui-experimental-components-button.js +25 -17
  111. package/fesm2015/taiga-ui-experimental-components-button.js.map +1 -1
  112. package/fesm2015/taiga-ui-experimental-components-checkbox.js +8 -12
  113. package/fesm2015/taiga-ui-experimental-components-checkbox.js.map +1 -1
  114. package/fesm2015/taiga-ui-experimental-components-icon.js +21 -37
  115. package/fesm2015/taiga-ui-experimental-components-icon.js.map +1 -1
  116. package/fesm2015/taiga-ui-experimental-components-toggle.js +12 -28
  117. package/fesm2015/taiga-ui-experimental-components-toggle.js.map +1 -1
  118. package/fesm2015/taiga-ui-experimental-directives-appearance.js +50 -0
  119. package/fesm2015/taiga-ui-experimental-directives-appearance.js.map +1 -0
  120. package/fesm2015/taiga-ui-experimental-directives-button-vertical.js +58 -0
  121. package/fesm2015/taiga-ui-experimental-directives-button-vertical.js.map +1 -0
  122. package/fesm2015/taiga-ui-experimental-directives-card.js +1 -0
  123. package/fesm2015/taiga-ui-experimental-directives-card.js.map +1 -1
  124. package/fesm2015/taiga-ui-experimental-directives-cell.js +1 -1
  125. package/fesm2015/taiga-ui-experimental-directives-progress-segmented.js +1 -1
  126. package/fesm2015/taiga-ui-experimental-directives-progress-segmented.js.map +1 -1
  127. package/fesm2015/taiga-ui-experimental-directives-sensitive.js +3 -3
  128. package/fesm2015/taiga-ui-experimental-directives-sensitive.js.map +1 -1
  129. package/fesm2015/taiga-ui-experimental-directives-surface.js +7 -6
  130. package/fesm2015/taiga-ui-experimental-directives-surface.js.map +1 -1
  131. package/fesm2015/taiga-ui-experimental-directives.js +2 -0
  132. package/fesm2015/taiga-ui-experimental-directives.js.map +1 -1
  133. package/fesm2015/taiga-ui-experimental-tokens.js +22 -0
  134. package/fesm2015/taiga-ui-experimental-tokens.js.map +1 -0
  135. package/fesm2015/taiga-ui-experimental.js +1 -0
  136. package/fesm2015/taiga-ui-experimental.js.map +1 -1
  137. package/index.d.ts +1 -0
  138. package/package.json +5 -5
  139. package/tokens/icon-resolver.d.ts +4 -0
  140. package/tokens/index.d.ts +1 -0
  141. package/tokens/package.json +10 -0
  142. package/tokens/taiga-ui-experimental-tokens.d.ts +5 -0
  143. package/components/icon/icon.pipe.d.ts +0 -12
  144. package/esm2015/components/icon/icon.pipe.js +0 -30
@@ -1,8 +1,8 @@
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('@angular/common'), require('@taiga-ui/kit')) :
3
- typeof define === 'function' && define.amd ? define('@taiga-ui/experimental/components/avatar', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/core', '@angular/common', '@taiga-ui/kit'], 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.avatar = {}), global.ng.core, global.cdk, global.i1, global.ng.common, global.i3));
5
- })(this, (function (exports, i0, cdk, i1, i2, i3) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk'), require('@taiga-ui/experimental/tokens'), require('@angular/common'), require('@taiga-ui/kit'), require('@taiga-ui/experimental/components/icon')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/experimental/components/avatar', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/experimental/tokens', '@angular/common', '@taiga-ui/kit', '@taiga-ui/experimental/components/icon'], 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.avatar = {}), global.ng.core, global.cdk, global["taiga-ui"].experimental.tokens, global.ng.common, global.i2, global["taiga-ui"].experimental.components.icon));
5
+ })(this, (function (exports, i0, cdk, tokens, i1, i2, icon) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -25,7 +25,6 @@
25
25
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
26
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
27
27
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
28
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
29
28
 
30
29
  var TUI_AVATAR_DEFAULT_OPTIONS = {
31
30
  round: true,
@@ -37,12 +36,13 @@
37
36
  }
38
37
 
39
38
  var TuiAvatarComponent = /** @class */ (function () {
40
- function TuiAvatarComponent(options, platform) {
39
+ function TuiAvatarComponent(options, resolver) {
41
40
  this.options = options;
42
- this.platform = platform;
41
+ this.resolver = resolver;
43
42
  this.size = this.options.size;
44
43
  this.round = this.options.round;
45
44
  this.src = null;
45
+ this.appearance = '';
46
46
  }
47
47
  Object.defineProperty(TuiAvatarComponent.prototype, "value", {
48
48
  get: function () {
@@ -69,8 +69,8 @@
69
69
  });
70
70
  return TuiAvatarComponent;
71
71
  }());
72
- TuiAvatarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAvatarComponent, deps: [{ token: TUI_AVATAR_OPTIONS }, { token: cdk.TUI_PLATFORM }], target: i0__namespace.ɵɵFactoryTarget.Component });
73
- TuiAvatarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiAvatarComponent, selector: "tui-avatar", inputs: { size: "size", round: "round", src: "src" }, host: { properties: { "attr.data-size": "size", "attr.data-platform": "platform", "class._round": "round", "class._img": "type === \"img\"" } }, ngImport: i0__namespace, template: "<ng-container [ngSwitch]=\"type\">\n <tui-svg\n *ngSwitchCase=\"'icon'\"\n class=\"t-icon\"\n [src]=\"value\"\n ></tui-svg>\n <span\n *ngSwitchCase=\"'text'\"\n class=\"t-text\"\n >\n {{ value }}\n </span>\n <img\n *ngSwitchCase=\"'img'\"\n alt=\"\"\n loading=\"lazy\"\n [src]=\"value\"\n />\n <div\n *ngSwitchDefault\n class=\"t-content\"\n >\n <ng-content></ng-content>\n </div>\n</ng-container>\n", styles: [":host{--t-size: 3.5rem;--t-radius: .75rem;position:relative;display:inline-flex;flex-shrink:0;width:var(--t-size);height:var(--t-size);align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;border-radius:var(--t-radius);background:var(--tui-secondary);color:var(--tui-text-02);vertical-align:middle;opacity:.999}:host[data-size=xxs]{--t-size: 1.5rem;--t-radius: .5rem;font:var(--tui-font-text-xs);font-weight:bold}:host[data-size=xxs] .t-content{font:var(--tui-font-text-m);font-size:.5625rem}:host[data-size=xs]{--t-size: 2rem;--t-radius: .5rem;font:var(--tui-font-text-s);font-weight:bold}:host[data-size=xs] .t-content{font:var(--tui-font-text-xs);font-weight:bold}:host[data-size=s]{--t-size: 2.5rem;--t-radius: .75rem;font:var(--tui-font-text-l);font-weight:bold}:host[data-size=s] .t-content{font:var(--tui-font-text-m);font-weight:bold}:host[data-size=m]{--t-size: 3.5rem;--t-radius: .75rem;font:var(--tui-font-heading-5)}:host[data-size=m] .t-content{font:var(--tui-font-text-l);font-weight:bold}:host[data-size=l]{--t-size: 5rem;--t-radius: .75rem;font:var(--tui-font-heading-3)}:host[data-size=l] .t-content{font:var(--tui-font-heading-4)}:host[data-size=xl]{--t-size: 6rem;--t-radius: 1rem;font:var(--tui-font-heading-3)}:host[data-size=xl] .t-content{font:var(--tui-font-heading-3)}:host[data-size=xxl]{--t-size: 8rem;--t-radius: 1.25rem;font:var(--tui-font-heading-2)}:host[data-size=xxl] .t-content{font:var(--tui-font-heading-3)}:host._round{--t-radius: calc(var(--t-size) / 2)}:host._img{background:transparent}:host ::ng-deep img,:host ::ng-deep picture,:host ::ng-deep video{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover}.t-icon{width:60%;height:60%}.t-content{max-width:100%;padding:.25rem;box-sizing:border-box}\n"], components: [{ type: i1__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i2__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3__namespace.TuiLazyLoadingDirective, selector: "img[loading=\"lazy\"]", inputs: ["src"] }, { type: i2__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
72
+ TuiAvatarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAvatarComponent, deps: [{ token: TUI_AVATAR_OPTIONS }, { token: tokens.TUI_ICON_RESOLVER }], target: i0__namespace.ɵɵFactoryTarget.Component });
73
+ TuiAvatarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiAvatarComponent, selector: "tui-avatar", inputs: { size: "size", round: "round", src: "src", appearance: "appearance" }, host: { attributes: { "tuiAppearance": "" }, properties: { "attr.data-appearance": "appearance", "attr.data-size": "size", "attr.data-type": "type", "style.--t-mask": "\"url(\" + resolver(src) + \")\"", "class._round": "round" } }, ngImport: i0__namespace, template: "<ng-container [ngSwitch]=\"type\">\n <img\n *ngSwitchCase=\"'img'\"\n alt=\"\"\n loading=\"lazy\"\n [src]=\"value\"\n />\n <ng-container *ngSwitchCase=\"'text'\">{{ value }}</ng-container>\n <ng-container *ngSwitchDefault>\n <ng-content></ng-content>\n </ng-container>\n</ng-container>\n", styles: [":host{--t-size: 3.5rem;--t-radius: .75rem;position:relative;display:inline-flex;flex-shrink:0;width:var(--t-size);height:var(--t-size);align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;border-radius:var(--t-radius);background:var(--tui-secondary);color:var(--tui-text-02);vertical-align:middle;box-sizing:border-box;padding:.25rem;opacity:.999}:host:before{position:absolute;top:0;left:0;width:100%;height:100%;background:currentColor;-webkit-mask:var(--t-mask) no-repeat center / 60%;mask:var(--t-mask) no-repeat center / 60%}:host[data-size=xxs]{--t-size: 1.5rem;--t-radius: .5rem;font:var(--tui-font-text-xs);font-weight:bold}:host[data-size=xxs][data-type=content]{font:var(--tui-font-text-m);font-size:.5625rem}:host[data-size=xs]{--t-size: 2rem;--t-radius: .5rem;font:var(--tui-font-text-s);font-weight:bold}:host[data-size=xs][data-type=content]{font:var(--tui-font-text-xs);font-weight:bold}:host[data-size=s]{--t-size: 2.5rem;--t-radius: .75rem;font:var(--tui-font-text-l);font-weight:bold}:host[data-size=s][data-type=content]{font:var(--tui-font-text-m);font-weight:bold}:host[data-size=m]{--t-size: 3.5rem;--t-radius: .75rem;font:var(--tui-font-heading-5)}:host[data-size=m][data-type=content]{font:var(--tui-font-text-l);font-weight:bold}:host[data-size=l]{--t-size: 5rem;--t-radius: .75rem;font:var(--tui-font-heading-3)}:host[data-size=l][data-type=content]{font:var(--tui-font-heading-4)}:host[data-size=xl]{--t-size: 6rem;--t-radius: 1rem;font:var(--tui-font-heading-3)}:host[data-size=xl][data-type=content]{font:var(--tui-font-heading-3)}:host[data-size=xxl]{--t-size: 8rem;--t-radius: 1.25rem;font:var(--tui-font-heading-2)}:host[data-size=xxl][data-type=content]{font:var(--tui-font-heading-3)}:host[data-type=img]{background:transparent}:host[data-type=icon]:before{content:\"\"}:host._round{--t-radius: calc(var(--t-size) / 2)}:host ::ng-deep img,:host ::ng-deep picture,:host ::ng-deep video{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover}\n"], directives: [{ type: i1__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace.TuiLazyLoadingDirective, selector: "img[loading=\"lazy\"]", inputs: ["src"] }, { type: i1__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
74
74
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAvatarComponent, decorators: [{
75
75
  type: i0.Component,
76
76
  args: [{
@@ -79,10 +79,12 @@
79
79
  styleUrls: ['./avatar.style.less'],
80
80
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
81
81
  host: {
82
+ tuiAppearance: '',
83
+ '[attr.data-appearance]': 'appearance',
82
84
  '[attr.data-size]': 'size',
83
- '[attr.data-platform]': 'platform',
85
+ '[attr.data-type]': 'type',
86
+ '[style.--t-mask]': '"url(" + resolver(src) + ")"',
84
87
  '[class._round]': 'round',
85
- '[class._img]': 'type === "img"',
86
88
  },
87
89
  }]
88
90
  }], ctorParameters: function () {
@@ -91,7 +93,7 @@
91
93
  args: [TUI_AVATAR_OPTIONS]
92
94
  }] }, { type: undefined, decorators: [{
93
95
  type: i0.Inject,
94
- args: [cdk.TUI_PLATFORM]
96
+ args: [tokens.TUI_ICON_RESOLVER]
95
97
  }] }];
96
98
  }, propDecorators: { size: [{
97
99
  type: i0.Input
@@ -99,6 +101,8 @@
99
101
  type: i0.Input
100
102
  }], src: [{
101
103
  type: i0.Input
104
+ }], appearance: [{
105
+ type: i0.Input
102
106
  }] } });
103
107
 
104
108
  var TuiAvatarModule = /** @class */ (function () {
@@ -107,12 +111,12 @@
107
111
  return TuiAvatarModule;
108
112
  }());
109
113
  TuiAvatarModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAvatarModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
110
- TuiAvatarModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAvatarModule, declarations: [TuiAvatarComponent], imports: [i2.CommonModule, i1.TuiSvgModule, i3.TuiLazyLoadingModule], exports: [TuiAvatarComponent] });
111
- TuiAvatarModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAvatarModule, imports: [[i2.CommonModule, i1.TuiSvgModule, i3.TuiLazyLoadingModule]] });
114
+ TuiAvatarModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAvatarModule, declarations: [TuiAvatarComponent], imports: [i1.CommonModule, icon.TuiIconModule, i2.TuiLazyLoadingModule], exports: [TuiAvatarComponent] });
115
+ TuiAvatarModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAvatarModule, imports: [[i1.CommonModule, icon.TuiIconModule, i2.TuiLazyLoadingModule]] });
112
116
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAvatarModule, decorators: [{
113
117
  type: i0.NgModule,
114
118
  args: [{
115
- imports: [i2.CommonModule, i1.TuiSvgModule, i3.TuiLazyLoadingModule],
119
+ imports: [i1.CommonModule, icon.TuiIconModule, i2.TuiLazyLoadingModule],
116
120
  declarations: [TuiAvatarComponent],
117
121
  exports: [TuiAvatarComponent],
118
122
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-experimental-components-avatar.umd.js","sources":["../../../projects/experimental/components/avatar/avatar.options.ts","../../../projects/experimental/components/avatar/avatar.component.ts","../../../projects/experimental/components/avatar/avatar.template.html","../../../projects/experimental/components/avatar/avatar.module.ts","../../../projects/experimental/components/avatar/taiga-ui-experimental-components-avatar.ts"],"sourcesContent":["import {Provider} from '@angular/core';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk';\nimport {TuiSizeXXL, TuiSizeXXS} from '@taiga-ui/core';\n\nexport interface TuiAvatarOptions {\n readonly round: boolean;\n readonly size: TuiSizeXXL | TuiSizeXXS;\n}\n\nexport const TUI_AVATAR_DEFAULT_OPTIONS: TuiAvatarOptions = {\n round: true,\n size: `m`,\n};\n\nexport const TUI_AVATAR_OPTIONS = tuiCreateToken(TUI_AVATAR_DEFAULT_OPTIONS);\n\nexport function tuiAvatarOptionsProvider(options: Partial<TuiAvatarOptions>): Provider {\n return tuiProvideOptions(TUI_AVATAR_OPTIONS, options, TUI_AVATAR_DEFAULT_OPTIONS);\n}\n","import {ChangeDetectionStrategy, Component, Inject, Input} from '@angular/core';\nimport {SafeResourceUrl} from '@angular/platform-browser';\nimport {TUI_PLATFORM, tuiIsString, TuiPlatform} from '@taiga-ui/cdk';\n\nimport {TUI_AVATAR_OPTIONS, TuiAvatarOptions} from './avatar.options';\n\n@Component({\n selector: 'tui-avatar',\n templateUrl: './avatar.template.html',\n styleUrls: ['./avatar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.data-size]': 'size',\n '[attr.data-platform]': 'platform',\n '[class._round]': 'round',\n '[class._img]': 'type === \"img\"',\n },\n})\nexport class TuiAvatarComponent {\n @Input()\n size = this.options.size;\n\n @Input()\n round = this.options.round;\n\n @Input()\n src: SafeResourceUrl | string | null = null;\n\n constructor(\n @Inject(TUI_AVATAR_OPTIONS) private readonly options: TuiAvatarOptions,\n @Inject(TUI_PLATFORM) readonly platform: TuiPlatform,\n ) {}\n\n get value(): SafeResourceUrl | string {\n return this.src || '';\n }\n\n get type(): 'content' | 'icon' | 'img' | 'text' {\n if (this.value && !tuiIsString(this.value)) {\n return 'img';\n }\n\n if (this.value.startsWith('tuiIcon') || this.value.endsWith('.svg')) {\n return 'icon';\n }\n\n if (this.value.length > 0 && this.value.length < 3) {\n return 'text';\n }\n\n return this.value.length ? 'img' : 'content';\n }\n}\n","<ng-container [ngSwitch]=\"type\">\n <tui-svg\n *ngSwitchCase=\"'icon'\"\n class=\"t-icon\"\n [src]=\"value\"\n ></tui-svg>\n <span\n *ngSwitchCase=\"'text'\"\n class=\"t-text\"\n >\n {{ value }}\n </span>\n <img\n *ngSwitchCase=\"'img'\"\n alt=\"\"\n loading=\"lazy\"\n [src]=\"value\"\n />\n <div\n *ngSwitchDefault\n class=\"t-content\"\n >\n <ng-content></ng-content>\n </div>\n</ng-container>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core';\nimport {TuiLazyLoadingModule} from '@taiga-ui/kit';\n\nimport {TuiAvatarComponent} from './avatar.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule, TuiLazyLoadingModule],\n declarations: [TuiAvatarComponent],\n exports: [TuiAvatarComponent],\n})\nexport class TuiAvatarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["tuiCreateToken","tuiProvideOptions","tuiIsString","TUI_PLATFORM","i0","i1","i2","i3","Component","ChangeDetectionStrategy","Inject","Input","CommonModule","TuiSvgModule","TuiLazyLoadingModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASa,QAAA,0BAA0B,GAAqB;IACxD,IAAA,KAA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BAL3BC,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;IACN,oBAAA,OAAO,EAAE,CAACH,eAAY,EAAEC,eAAY,EAAEC,uBAAoB,CAAC;wBAC3D,YAAY,EAAE,CAAC,kBAAkB,CAAC;wBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;qBAChC,CAAA;;;ICXD;;IAEG;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-experimental-components-avatar.umd.js","sources":["../../../projects/experimental/components/avatar/avatar.options.ts","../../../projects/experimental/components/avatar/avatar.component.ts","../../../projects/experimental/components/avatar/avatar.template.html","../../../projects/experimental/components/avatar/avatar.module.ts","../../../projects/experimental/components/avatar/taiga-ui-experimental-components-avatar.ts"],"sourcesContent":["import {Provider} from '@angular/core';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk';\nimport {TuiSizeXXL, TuiSizeXXS} from '@taiga-ui/core';\n\nexport interface TuiAvatarOptions {\n readonly round: boolean;\n readonly size: TuiSizeXXL | TuiSizeXXS;\n}\n\nexport const TUI_AVATAR_DEFAULT_OPTIONS: TuiAvatarOptions = {\n round: true,\n size: `m`,\n};\n\nexport const TUI_AVATAR_OPTIONS = tuiCreateToken(TUI_AVATAR_DEFAULT_OPTIONS);\n\nexport function tuiAvatarOptionsProvider(options: Partial<TuiAvatarOptions>): Provider {\n return tuiProvideOptions(TUI_AVATAR_OPTIONS, options, TUI_AVATAR_DEFAULT_OPTIONS);\n}\n","import {ChangeDetectionStrategy, Component, Inject, Input} from '@angular/core';\nimport {SafeResourceUrl} from '@angular/platform-browser';\nimport {tuiIsString, TuiStringHandler} from '@taiga-ui/cdk';\nimport {TUI_ICON_RESOLVER} from '@taiga-ui/experimental/tokens';\n\nimport {TUI_AVATAR_OPTIONS, TuiAvatarOptions} from './avatar.options';\n\n@Component({\n selector: 'tui-avatar',\n templateUrl: './avatar.template.html',\n styleUrls: ['./avatar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n tuiAppearance: '',\n '[attr.data-appearance]': 'appearance',\n '[attr.data-size]': 'size',\n '[attr.data-type]': 'type',\n '[style.--t-mask]': '\"url(\" + resolver(src) + \")\"',\n '[class._round]': 'round',\n },\n})\nexport class TuiAvatarComponent {\n @Input()\n size = this.options.size;\n\n @Input()\n round = this.options.round;\n\n @Input()\n src: SafeResourceUrl | string | null = null;\n\n @Input()\n appearance = '';\n\n constructor(\n @Inject(TUI_AVATAR_OPTIONS) private readonly options: TuiAvatarOptions,\n @Inject(TUI_ICON_RESOLVER) readonly resolver: TuiStringHandler<string>,\n ) {}\n\n get value(): SafeResourceUrl | string {\n return this.src || '';\n }\n\n get type(): 'content' | 'icon' | 'img' | 'text' {\n if (this.value && !tuiIsString(this.value)) {\n return 'img';\n }\n\n if (this.value.startsWith('tuiIcon') || this.value.endsWith('.svg')) {\n return 'icon';\n }\n\n if (this.value.length > 0 && this.value.length < 3) {\n return 'text';\n }\n\n return this.value.length ? 'img' : 'content';\n }\n}\n","<ng-container [ngSwitch]=\"type\">\n <img\n *ngSwitchCase=\"'img'\"\n alt=\"\"\n loading=\"lazy\"\n [src]=\"value\"\n />\n <ng-container *ngSwitchCase=\"'text'\">{{ value }}</ng-container>\n <ng-container *ngSwitchDefault>\n <ng-content></ng-content>\n </ng-container>\n</ng-container>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiIconModule} from '@taiga-ui/experimental/components/icon';\nimport {TuiLazyLoadingModule} from '@taiga-ui/kit';\n\nimport {TuiAvatarComponent} from './avatar.component';\n\n@NgModule({\n imports: [CommonModule, TuiIconModule, TuiLazyLoadingModule],\n declarations: [TuiAvatarComponent],\n exports: [TuiAvatarComponent],\n})\nexport class TuiAvatarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["tuiCreateToken","tuiProvideOptions","tuiIsString","TUI_ICON_RESOLVER","i0","i1","i2","Component","ChangeDetectionStrategy","Inject","Input","CommonModule","T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AAA,IAAA,EAAA,eAAe,YAJf,CAACO,eAAY,EAAEC,kBAAa,EAAEC,uBAAoB,CAAC,CAAA,EAAA,CAAA,CAAA;sHAInD,eAAe,EAAA,UAAA,EAAA,CAAA;sBAL3BC,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;IACN,oBAAA,OAAO,EAAE,CAACH,eAAY,EAAEC,kBAAa,EAAEC,uBAAoB,CAAC;wBAC5D,YAAY,EAAE,CAAC,kBAAkB,CAAC;wBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;qBAChC,CAAA;;;ICXD;;IAEG;;;;;;;;;;;;;;"}
@@ -1,111 +1,132 @@
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('rxjs')) :
3
- typeof define === 'function' && define.amd ? define('@taiga-ui/experimental/components/badge', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/core', 'rxjs'], 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.badge = {}), global.ng.core, global.cdk, global.core, global.rxjs));
5
- })(this, (function (exports, i0, cdk, core, i1) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/experimental/components/badge', ['exports', '@angular/core', '@taiga-ui/cdk'], 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.badge = {}), global.ng.core, global.i1));
5
+ })(this, (function (exports, i0, i1) { 'use strict';
6
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
- });
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
+ });
18
20
  }
19
- });
21
+ n["default"] = e;
22
+ return Object.freeze(n);
20
23
  }
21
- n["default"] = e;
22
- return Object.freeze(n);
23
- }
24
24
 
25
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
27
27
 
28
- var TUI_BADGE_DEFAULT_OPTIONS = {
29
- size: "l",
30
- appearance: "default",
31
- hoverable: false,
32
- };
33
- var TUI_BADGE_OPTIONS = cdk.tuiCreateToken(TUI_BADGE_DEFAULT_OPTIONS);
34
- function tuiBadgeOptionsProvider(options) {
35
- return cdk.tuiProvideOptions(TUI_BADGE_OPTIONS, options, TUI_BADGE_DEFAULT_OPTIONS);
36
- }
28
+ var TuiBadgeComponent = /** @class */ (function () {
29
+ function TuiBadgeComponent() {
30
+ }
31
+ return TuiBadgeComponent;
32
+ }());
33
+ TuiBadgeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
34
+ TuiBadgeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiBadgeComponent, selector: "ng-component", host: { classAttribute: "tui-badge" }, ngImport: i0__namespace, template: '', isInline: true, styles: ["tui-badge,[tuiBadge]{-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:inline-flex;align-items:center;box-sizing:border-box;background:#959595;color:var(--tui-base-01);border-radius:6rem;white-space:nowrap;overflow:hidden;vertical-align:middle;font:var(--tui-font-text-s);flex-shrink:0;max-width:100%;padding:var(--t-padding);height:var(--t-size);min-width:var(--t-size);--t-dot: currentColor;--t-icon-size: 1rem}tui-badge._dot:before,[tuiBadge]._dot:before{content:\"\";display:block;background:var(--t-dot);margin:0 .125rem 0 .25rem;width:.25rem;height:.25rem;border-radius:100%}tui-badge>tui-svg,[tuiBadge]>tui-svg,tui-badge>tui-icon,[tuiBadge]>tui-icon{width:var(--t-icon-size)!important;height:var(--t-icon-size)!important}tui-badge[data-appearance=error],[tuiBadge][data-appearance=error]{--t-dot: var(--tui-error-fill)}tui-badge[data-appearance=success],[tuiBadge][data-appearance=success]{--t-dot: var(--tui-success-fill)}tui-badge[data-appearance=warning],[tuiBadge][data-appearance=warning]{--t-dot: var(--tui-warning-fill)}tui-badge[data-appearance=info],[tuiBadge][data-appearance=info]{--t-dot: var(--tui-info-fill)}tui-badge[data-appearance=neutral],[tuiBadge][data-appearance=neutral]{--t-dot: var(--tui-neutral-fill)}tui-badge[data-appearance=neutral][data-platform=ios],[tuiBadge][data-appearance=neutral][data-platform=ios],tui-badge[data-appearance=neutral][data-platform=android],[tuiBadge][data-appearance=neutral][data-platform=android]{background:var(--tui-base-06)}tui-badge[data-size=s],[tuiBadge][data-size=s]{text-indent:.125rem;--t-padding: 0 .3125rem 0 .1875rem;--t-size: 1rem;--t-icon-size: .625rem}tui-badge[data-size=s][data-platform=ios],[tuiBadge][data-size=s][data-platform=ios],tui-badge[data-size=s][data-platform=android],[tuiBadge][data-size=s][data-platform=android]{font:var(--tui-font-text-xs);font-weight:bold}tui-badge[data-size=m],[tuiBadge][data-size=m]{text-indent:.125rem;--t-padding: 0 .375rem 0 .25rem;--t-size: 1.25rem;--t-icon-size: .75rem}tui-badge[data-size=l],[tuiBadge][data-size=l]{text-indent:.25rem;--t-padding: 0 .5rem 0 .25rem;--t-size: var(--tui-height-xs)}tui-badge[data-size=xl],[tuiBadge][data-size=xl]{font:var(--tui-font-text-m);text-indent:.25rem;--t-padding: 0 .75rem 0 .5rem;--t-size: var(--tui-height-s)}tui-badge[data-size=xl][data-platform=ios],[tuiBadge][data-size=xl][data-platform=ios],tui-badge[data-size=xl][data-platform=android],[tuiBadge][data-size=xl][data-platform=android]{font:var(--tui-font-text-s);font-weight:bold;--t-padding: 0 .625rem 0 .375rem;--t-size: 1.75rem}tui-badge[data-platform=ios],[tuiBadge][data-platform=ios],tui-badge[data-platform=android],[tuiBadge][data-platform=android]{font-weight:bold}img[tuiBadge]{padding:0}tui-icon[tuiBadge]{-webkit-mask:none;mask:none;height:var(--t-size);width:var(--t-size)}tui-icon[tuiBadge][data-size=s]:after{-webkit-mask-size:.625rem;mask-size:.625rem}tui-icon[tuiBadge][data-size=m]:after{-webkit-mask-size:.75rem;mask-size:.75rem}tui-icon[tuiBadge][data-size=l]:after,tui-icon[tuiBadge][data-size=xl]:after{-webkit-mask-size:1rem;mask-size:1rem}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
35
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeComponent, decorators: [{
36
+ type: i0.Component,
37
+ args: [{
38
+ template: '',
39
+ styleUrls: ['./badge.style.less'],
40
+ encapsulation: i0.ViewEncapsulation.None,
41
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
42
+ host: {
43
+ class: 'tui-badge',
44
+ },
45
+ }]
46
+ }] });
37
47
 
38
- var TuiBadgeComponent = /** @class */ (function () {
39
- function TuiBadgeComponent(options, mode$, platform) {
40
- this.options = options;
41
- this.mode$ = mode$;
42
- this.platform = platform;
43
- this.size = this.options.size;
44
- this.appearance = this.options.appearance;
48
+ var TUI_BADGE_DEFAULT_OPTIONS = {
49
+ size: "l",
50
+ appearance: "default",
51
+ dot: false,
52
+ };
53
+ var TUI_BADGE_OPTIONS = i1.tuiCreateToken(TUI_BADGE_DEFAULT_OPTIONS);
54
+ function tuiBadgeOptionsProvider(options) {
55
+ return i1.tuiProvideOptions(TUI_BADGE_OPTIONS, options, TUI_BADGE_DEFAULT_OPTIONS);
45
56
  }
46
- return TuiBadgeComponent;
47
- }());
48
- TuiBadgeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeComponent, deps: [{ token: TUI_BADGE_OPTIONS }, { token: core.TUI_MODE }, { token: cdk.TUI_PLATFORM }], target: i0__namespace.ɵɵFactoryTarget.Component });
49
- TuiBadgeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiBadgeComponent, selector: "tui-badge", inputs: { size: "size", appearance: "appearance" }, host: { listeners: { "$.data-mode.attr": "mode$" }, properties: { "attr.data-platform": "platform", "attr.data-appearance": "appearance", "attr.data-size": "size" } }, providers: [core.MODE_PROVIDER], ngImport: i0__namespace, template: "<div class=\"t-image\">\n <ng-content select=\"img\"></ng-content>\n</div>\n<div\n class=\"t-icon\"\n [class._icon-only]=\"!text.innerHTML.trim()\"\n>\n <ng-content select=\"tui-svg\"></ng-content>\n</div>\n\n<span\n #text\n class=\"t-text\"\n>\n <ng-content></ng-content>\n</span>\n", styles: [":host{--left-content-color: currentColor;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;color:var(--tui-base-01);border-radius:6rem;white-space:nowrap;overflow:hidden;vertical-align:middle;font:var(--tui-font-text-s);flex-shrink:0;max-width:100%}:host:after{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:0;left:0;width:100%;height:100%;content:\"\";border-radius:inherit;pointer-events:none}:host[data-appearance=primary]{background:var(--tui-primary);color:var(--tui-primary-text)}:host[data-appearance=accent]{background:var(--tui-accent);color:var(--tui-accent-text)}:host[data-appearance=light]{background:var(--tui-secondary);color:var(--tui-text-01)}:host[data-appearance=light][data-platform=ios],:host[data-appearance=light][data-platform=android]{background:var(--tui-base-06)}:host[data-appearance=error]{--left-content-color: var(--tui-error-fill);background:var(--tui-error-bg);color:var(--tui-text-01)}:host[data-appearance=error][data-mode=onDark]{background:var(--tui-error-bg-night);color:var(--tui-text-01-night)}:host[data-appearance=success]{--left-content-color: var(--tui-success-fill);background:var(--tui-success-bg);color:var(--tui-text-01)}:host[data-appearance=success][data-mode=onDark]{background:var(--tui-success-bg-night);color:var(--tui-text-01-night)}:host[data-appearance=warning]{--left-content-color: var(--tui-warning-fill);background:var(--tui-warning-bg);color:var(--tui-text-01)}:host[data-appearance=warning][data-mode=onDark]{background:var(--tui-warning-bg-night);color:var(--tui-text-01-night)}:host[data-appearance=info]{--left-content-color: var(--tui-info-fill);background:var(--tui-info-bg);color:var(--tui-text-01)}:host[data-appearance=info][data-mode=onDark]{background:var(--tui-info-bg-night);color:var(--tui-text-01-night)}:host[data-appearance=neutral]{--left-content-color: var(--tui-neutral-fill);background:var(--tui-neutral-bg);color:var(--tui-text-01)}:host[data-appearance=neutral][data-mode=onDark]{background:var(--tui-neutral-bg-night);color:var(--tui-text-01-night)}:host[data-appearance=default]{background:var(--tui-base-06)}:host[data-appearance=default][data-mode=onDark]{background:var(--tui-clear-inverse-hover)}:host[data-appearance=default][data-mode=onLight]{background:var(--tui-clear);color:var(--tui-text-01)}:host:not(._empty-value){padding:0 .25rem}:host:not(._empty-value)[data-size=xl]{padding:0 .375rem}:host:not(._empty-value)[data-size=xl][data-platform=web]{padding:0 .5rem}:host:not(._empty-value)[data-size=s]{padding:0 .125rem}:host:not(._empty-value)[data-size=s][data-platform=web]{padding:0 .25rem}:host[data-size=s]{height:1.25rem;min-width:1.25rem}:host[data-size=s][data-platform=ios],:host[data-size=s][data-platform=android]{font:var(--tui-font-text-xs);font-weight:bold;height:1rem;min-width:1rem}:host[data-size=m]{height:1.25rem;min-width:1.25rem}:host[data-size=l]{height:var(--tui-height-xs);min-width:var(--tui-height-xs)}:host[data-size=l][data-platform=ios],:host[data-size=l][data-platform=android]{height:1.5rem;min-width:1.5rem}:host[data-size=xl]{height:var(--tui-height-s);min-width:var(--tui-height-s)}:host[data-size=xl][data-platform=ios],:host[data-size=xl][data-platform=android]{height:1.75rem;min-width:1.75rem}:host[data-size=xl][data-platform=web]{font:var(--tui-font-text-m)}:host[data-platform=ios],:host[data-platform=android]{font-weight:bold}.t-text{white-space:nowrap;padding:0 .125rem;overflow:hidden}.t-text:empty{display:none}:host[data-size=xl][data-platform=web] .t-text{padding:0 .375rem}:host[data-size=xl] .t-text{padding:0 .25rem}:host[data-size=l] .t-text{padding:0 .25rem}.t-icon{display:none;color:var(--left-content-color)}.t-icon:not(:empty){display:flex;width:1rem;height:1rem;align-items:center;justify-content:center}.t-icon:not(:empty):before{content:none}:host[data-size=m] .t-icon:not(:empty),:host[data-size=s][data-platform=web] .t-icon:not(:empty){width:.75rem;transform:scale(.75)}:host[data-size=s] .t-icon:not(:empty){width:.625rem;transform:scale(.625)}:host[data-size=s] .t-icon:not(:empty):not(._icon-only){margin-left:.0625rem}.t-icon:before{content:\"\";display:block;background:currentColor;margin:0 .125rem 0 .25rem;width:.25rem;height:.25rem;border-radius:100%}:host[data-appearance=error] .t-icon:empty,:host[data-appearance=success] .t-icon:empty,:host[data-appearance=warning] .t-icon:empty,:host[data-appearance=info] .t-icon:empty,:host[data-appearance=neutral] .t-icon:empty{display:block}:host[data-size=l] .t-icon:before{width:.375rem;height:.375rem}:host[data-size=xl] .t-icon:before{width:.5rem;height:.5rem}.t-image{display:none}:host::ng-deep .t-image img{width:100%;height:100%}.t-image:not(:empty){display:block;width:1rem;height:1rem;margin:0 -.5rem}.t-image:not(:empty)~.t-text{margin-left:.5rem}.t-image:not(:empty)~.t-icon{display:none}:host[data-size=xl] .t-image:not(:empty){height:1.75rem;width:1.75rem}:host[data-size=l] .t-image:not(:empty){height:1.5rem;width:1.5rem}:host[data-size=m] .t-image:not(:empty){height:1.25rem;width:1.25rem}:host[data-size=xl][data-platform=web] .t-image:not(:empty){width:2rem;height:2rem}:host[data-size=s][data-platform=web] .t-image:not(:empty){width:1.25rem;height:1.25rem}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
50
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeComponent, decorators: [{
51
- type: i0.Component,
52
- args: [{
53
- selector: 'tui-badge',
54
- templateUrl: './badge.template.html',
55
- styleUrls: ['./badge.style.less'],
56
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
57
- providers: [core.MODE_PROVIDER],
58
- host: {
59
- '[attr.data-platform]': 'platform',
60
- '[attr.data-appearance]': 'appearance',
61
- '[attr.data-size]': 'size',
62
- '($.data-mode.attr)': 'mode$',
63
- },
64
- }]
65
- }], ctorParameters: function () {
66
- return [{ type: undefined, decorators: [{
67
- type: i0.Inject,
68
- args: [TUI_BADGE_OPTIONS]
69
- }] }, { type: i1__namespace.Observable, decorators: [{
70
- type: i0.Inject,
71
- args: [core.TUI_MODE]
72
- }] }, { type: undefined, decorators: [{
73
- type: i0.Inject,
74
- args: [cdk.TUI_PLATFORM]
75
- }] }];
76
- }, propDecorators: { size: [{
77
- type: i0.Input
78
- }], appearance: [{
79
- type: i0.Input
80
- }] } });
81
57
 
82
- var TuiBadgeModule = /** @class */ (function () {
83
- function TuiBadgeModule() {
84
- }
85
- return TuiBadgeModule;
86
- }());
87
- TuiBadgeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
88
- TuiBadgeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeModule, declarations: [TuiBadgeComponent], exports: [TuiBadgeComponent] });
89
- TuiBadgeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeModule });
90
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeModule, decorators: [{
91
- type: i0.NgModule,
92
- args: [{
93
- declarations: [TuiBadgeComponent],
94
- exports: [TuiBadgeComponent],
95
- }]
96
- }] });
58
+ var TuiBadgeDirective = /** @class */ (function () {
59
+ function TuiBadgeDirective(options, platform, directiveStyles) {
60
+ this.options = options;
61
+ this.platform = platform;
62
+ this.size = this.options.size;
63
+ this.appearance = this.options.appearance;
64
+ this.dot = this.options.dot;
65
+ directiveStyles.addComponent(TuiBadgeComponent);
66
+ }
67
+ return TuiBadgeDirective;
68
+ }());
69
+ TuiBadgeDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeDirective, deps: [{ token: TUI_BADGE_OPTIONS }, { token: i1.TUI_PLATFORM }, { token: i1.TuiDirectiveStylesService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
70
+ TuiBadgeDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiBadgeDirective, selector: "tui-badge,[tuiBadge]", inputs: { size: "size", appearance: "appearance", dot: "dot" }, host: { attributes: { "tuiAppearance": "" }, properties: { "class._dot": "dot", "attr.data-platform": "platform", "attr.data-appearance": "appearance", "attr.data-size": "size" } }, ngImport: i0__namespace });
71
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeDirective, decorators: [{
72
+ type: i0.Directive,
73
+ args: [{
74
+ selector: 'tui-badge,[tuiBadge]',
75
+ host: {
76
+ tuiAppearance: '',
77
+ '[class._dot]': 'dot',
78
+ '[attr.data-platform]': 'platform',
79
+ '[attr.data-appearance]': 'appearance',
80
+ '[attr.data-size]': 'size',
81
+ },
82
+ }]
83
+ }], ctorParameters: function () {
84
+ return [{ type: undefined, decorators: [{
85
+ type: i0.Inject,
86
+ args: [TUI_BADGE_OPTIONS]
87
+ }] }, { type: undefined, decorators: [{
88
+ type: i0.Inject,
89
+ args: [i1.TUI_PLATFORM]
90
+ }] }, { type: i1__namespace.TuiDirectiveStylesService, decorators: [{
91
+ type: i0.Inject,
92
+ args: [i1.TuiDirectiveStylesService]
93
+ }] }];
94
+ }, propDecorators: { size: [{
95
+ type: i0.Input
96
+ }], appearance: [{
97
+ type: i0.Input
98
+ }], dot: [{
99
+ type: i0.Input
100
+ }] } });
101
+
102
+ var TuiBadgeModule = /** @class */ (function () {
103
+ function TuiBadgeModule() {
104
+ }
105
+ return TuiBadgeModule;
106
+ }());
107
+ TuiBadgeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
108
+ TuiBadgeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeModule, declarations: [TuiBadgeComponent, TuiBadgeDirective], exports: [TuiBadgeDirective] });
109
+ TuiBadgeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeModule });
110
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeModule, decorators: [{
111
+ type: i0.NgModule,
112
+ args: [{
113
+ declarations: [TuiBadgeComponent, TuiBadgeDirective],
114
+ exports: [TuiBadgeDirective],
115
+ }]
116
+ }] });
97
117
 
98
- /**
99
- * Generated bundle index. Do not edit.
100
- */
118
+ /**
119
+ * Generated bundle index. Do not edit.
120
+ */
101
121
 
102
- exports.TUI_BADGE_DEFAULT_OPTIONS = TUI_BADGE_DEFAULT_OPTIONS;
103
- exports.TUI_BADGE_OPTIONS = TUI_BADGE_OPTIONS;
104
- exports.TuiBadgeComponent = TuiBadgeComponent;
105
- exports.TuiBadgeModule = TuiBadgeModule;
106
- exports.tuiBadgeOptionsProvider = tuiBadgeOptionsProvider;
122
+ exports.TUI_BADGE_DEFAULT_OPTIONS = TUI_BADGE_DEFAULT_OPTIONS;
123
+ exports.TUI_BADGE_OPTIONS = TUI_BADGE_OPTIONS;
124
+ exports.TuiBadgeComponent = TuiBadgeComponent;
125
+ exports.TuiBadgeDirective = TuiBadgeDirective;
126
+ exports.TuiBadgeModule = TuiBadgeModule;
127
+ exports.tuiBadgeOptionsProvider = tuiBadgeOptionsProvider;
107
128
 
108
- Object.defineProperty(exports, '__esModule', { value: true });
129
+ Object.defineProperty(exports, '__esModule', { value: true });
109
130
 
110
131
  }));
111
132
  //# sourceMappingURL=taiga-ui-experimental-components-badge.umd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-experimental-components-badge.umd.js","sources":["../../../projects/experimental/components/badge/badge.options.ts","../../../projects/experimental/components/badge/badge.component.ts","../../../projects/experimental/components/badge/badge.template.html","../../../projects/experimental/components/badge/badge.module.ts","../../../projects/experimental/components/badge/taiga-ui-experimental-components-badge.ts"],"sourcesContent":["import {Provider} from '@angular/core';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk';\nimport {TuiSizeS, TuiSizeXL} from '@taiga-ui/core';\nimport {TuiStatus} from '@taiga-ui/kit';\n\nexport interface TuiBadgeOptions {\n readonly appearance: TuiStatus | 'accent' | 'light';\n readonly size: TuiSizeS | TuiSizeXL;\n readonly hoverable: boolean;\n}\n\nexport const TUI_BADGE_DEFAULT_OPTIONS: TuiBadgeOptions = {\n size: `l`,\n appearance: `default`,\n hoverable: false,\n};\n\nexport const TUI_BADGE_OPTIONS = tuiCreateToken(TUI_BADGE_DEFAULT_OPTIONS);\n\nexport function tuiBadgeOptionsProvider(options: Partial<TuiBadgeOptions>): Provider {\n return tuiProvideOptions(TUI_BADGE_OPTIONS, options, TUI_BADGE_DEFAULT_OPTIONS);\n}\n","import {ChangeDetectionStrategy, Component, Inject, Input} from '@angular/core';\nimport {TUI_PLATFORM, TuiPlatform} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER, TUI_MODE, TuiBrightness} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\n\nimport {TUI_BADGE_OPTIONS, TuiBadgeOptions} from './badge.options';\n\n@Component({\n selector: 'tui-badge',\n templateUrl: './badge.template.html',\n styleUrls: ['./badge.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [MODE_PROVIDER],\n host: {\n '[attr.data-platform]': 'platform',\n '[attr.data-appearance]': 'appearance',\n '[attr.data-size]': 'size',\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiBadgeComponent {\n @Input()\n size = this.options.size;\n\n @Input()\n appearance = this.options.appearance;\n\n constructor(\n @Inject(TUI_BADGE_OPTIONS) private readonly options: TuiBadgeOptions,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_PLATFORM) readonly platform: TuiPlatform,\n ) {}\n}\n","<div class=\"t-image\">\n <ng-content select=\"img\"></ng-content>\n</div>\n<div\n class=\"t-icon\"\n [class._icon-only]=\"!text.innerHTML.trim()\"\n>\n <ng-content select=\"tui-svg\"></ng-content>\n</div>\n\n<span\n #text\n class=\"t-text\"\n>\n <ng-content></ng-content>\n</span>\n","import {NgModule} from '@angular/core';\n\nimport {TuiBadgeComponent} from './badge.component';\n\n@NgModule({\n declarations: [TuiBadgeComponent],\n exports: [TuiBadgeComponent],\n})\nexport class TuiBadgeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["tuiCreateToken","tuiProvideOptions","i0","TUI_MODE","TUI_PLATFORM","MODE_PROVIDER","Component","ChangeDetectionStrategy","Inject","Input","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAWa,QAAA,yBAAyB,GAAoB;IACtD,IAAA,IAAI,EAAE,GAAG;IACT,IAAA,UAAU,EAAE,SAAS;IACrB,IAAA,SAAS,EAAE,KAAK;MAClB;QAEW,iBAAiB,GAAGA,kBAAc,CAAC,yBAAyB,EAAE;IAErE,SAAU,uBAAuB,CAAC,OAAiC,EAAA;QACrE,OAAOC,qBAAiB,CAAC,iBAAiB,EAAE,OAAO,EAAE,yBAAyB,CAAC,CAAC;IACpF;;ACDA,QAAA,iBAAA,kBAAA,YAAA;IAOI,IAAA,SAAA,iBAAA,CACgD,OAAwB,EACzC,KAAuC,EACnC,QAAqB,EAAA;IAFR,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAiB;IACzC,QAAA,IAAK,CAAA,KAAA,GAAL,KAAK,CAAkC;IACnC,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAa;YARxD,IAAA,CAAA,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;YAGzB,IAAA,CAAA,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;SAMjC;;;IAXK,iBAAA,CAAA,IAAA,GAAAC,aAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAAA,aAAA,EAAA,IAAA,EAAA,iBAAiB,EAQd,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,iBAAiB,EACjB,EAAA,E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J,gBAAY,CAAA;;6BARxB,IAAI,EAAA,CAAA;0BADHK,QAAK;oBAIN,UAAU,EAAA,CAAA;0BADTA,QAAK;;;AEhBV,QAAA,cAAA,kBAAA,YAAA;IAAA,IAAA,SAAA,cAAA,GAAA;;;;sIAAa,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAAP,aAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;uIAAd,cAAc,EAAA,YAAA,EAAA,CAHR,iBAAiB,CAAA,EAAA,OAAA,EAAA,CACtB,iBAAiB,CAAA,EAAA,CAAA,CAAA;uIAElB,cAAc,EAAA,CAAA,CAAA;sHAAd,cAAc,EAAA,UAAA,EAAA,CAAA;sBAJ1BQ,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;wBACN,YAAY,EAAE,CAAC,iBAAiB,CAAC;wBACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;qBAC/B,CAAA;;;ICPD;;IAEG;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-experimental-components-badge.umd.js","sources":["../../../projects/experimental/components/badge/badge.component.ts","../../../projects/experimental/components/badge/badge.options.ts","../../../projects/experimental/components/badge/badge.directive.ts","../../../projects/experimental/components/badge/badge.module.ts","../../../projects/experimental/components/badge/taiga-ui-experimental-components-badge.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n template: '',\n styleUrls: ['./badge.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-badge',\n },\n})\nexport class TuiBadgeComponent {}\n","import {Provider} from '@angular/core';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk';\nimport {TuiSizeS, TuiSizeXL} from '@taiga-ui/core';\n\nexport interface TuiBadgeOptions {\n readonly appearance: string;\n readonly size: TuiSizeS | TuiSizeXL;\n readonly dot: boolean;\n}\n\nexport const TUI_BADGE_DEFAULT_OPTIONS: TuiBadgeOptions = {\n size: `l`,\n appearance: `default`,\n dot: false,\n};\n\nexport const TUI_BADGE_OPTIONS = tuiCreateToken(TUI_BADGE_DEFAULT_OPTIONS);\n\nexport function tuiBadgeOptionsProvider(options: Partial<TuiBadgeOptions>): Provider {\n return tuiProvideOptions(TUI_BADGE_OPTIONS, options, TUI_BADGE_DEFAULT_OPTIONS);\n}\n","import {Directive, Inject, Input} from '@angular/core';\nimport {TUI_PLATFORM, TuiDirectiveStylesService, TuiPlatform} from '@taiga-ui/cdk';\n\nimport {TuiBadgeComponent} from './badge.component';\nimport {TUI_BADGE_OPTIONS, TuiBadgeOptions} from './badge.options';\n\n@Directive({\n selector: 'tui-badge,[tuiBadge]',\n host: {\n tuiAppearance: '',\n '[class._dot]': 'dot',\n '[attr.data-platform]': 'platform',\n '[attr.data-appearance]': 'appearance',\n '[attr.data-size]': 'size',\n },\n})\nexport class TuiBadgeDirective {\n @Input()\n size = this.options.size;\n\n @Input()\n appearance = this.options.appearance;\n\n @Input()\n dot = this.options.dot;\n\n constructor(\n @Inject(TUI_BADGE_OPTIONS) private readonly options: TuiBadgeOptions,\n @Inject(TUI_PLATFORM) readonly platform: TuiPlatform,\n @Inject(TuiDirectiveStylesService) directiveStyles: TuiDirectiveStylesService,\n ) {\n directiveStyles.addComponent(TuiBadgeComponent);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiBadgeComponent} from './badge.component';\nimport {TuiBadgeDirective} from './badge.directive';\n\n@NgModule({\n declarations: [TuiBadgeComponent, TuiBadgeDirective],\n exports: [TuiBadgeDirective],\n})\nexport class TuiBadgeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i0","Component","ViewEncapsulation","ChangeDetectionStrategy","tuiCreateToken","tuiProvideOptions","TUI_PLATFORM","TuiDirectiveStylesService","Directive","Inject","Input","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,YAAA,iBAAA,k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,EAAE;QACjB,wBAAA,cAAc,EAAE,KAAK;QACrB,wBAAA,sBAAsB,EAAE,UAAU;QAClC,wBAAA,wBAAwB,EAAE,YAAY;QACtC,wBAAA,kBAAkB,EAAE,MAAM;QAC7B,qBAAA;yBACJ,CAAA;;;sCAYQC,SAAM;uCAAC,iBAAiB,CAAA;;sCACxBA,SAAM;uCAACH,eAAY,CAAA;;sCACnBG,SAAM;uCAACF,4BAAyB,CAAA;;iCAXrC,IAAI,EAAA,CAAA;8BADHG,QAAK;wBAIN,UAAU,EAAA,CAAA;8BADTA,QAAK;wBAIN,GAAG,EAAA,CAAA;8BADFA,QAAK;;;ACdV,YAAA,cAAA,kBAAA,YAAA;QAAA,IAAA,SAAA,cAAA,GAAA;;;;0IAAa,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAAV,aAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;QAAd,cAAA,CAAA,IAAA,GAAAA,aAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAAA,aAAA,EAAA,IAAA,EAAA,cAAc,EAHR,YAAA,EAAA,CAAA,iBAAiB,EAAE,iBAAiB,aACzC,iBAAiB,CAAA,EAAA,CAAA,CAAA;2IAElB,cAAc,EAAA,CAAA,CAAA;0HAAd,cAAc,EAAA,UAAA,EAAA,CAAA;0BAJ1BW,WAAQ;QAAC,YAAA,IAAA,EAAA,CAAA;QACN,oBAAA,YAAY,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;4BACpD,OAAO,EAAE,CAAC,iBAAiB,CAAC;yBAC/B,CAAA;;;QCRD;;QAEG;;;;;;;;;;;;;;;"}
@@ -31,7 +31,7 @@
31
31
  return TuiBadgedContentComponent;
32
32
  }());
33
33
  TuiBadgedContentComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgedContentComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
34
- TuiBadgedContentComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiBadgedContentComponent, selector: "tui-badged-content", ngImport: i0__namespace, template: "<ng-content></ng-content>\n\n<div\n #badgeTop\n class=\"t-badge t-badge_top\"\n [style.--t-badge-height.px]=\"badgeTop.offsetHeight\"\n (tuiResize)=\"(0)\"\n>\n <ng-content select=\"tui-badge-notification[tuiSlot='top']\"></ng-content>\n <div class=\"t-border\">\n <ng-content select=\"[tuiSlot='top']\"></ng-content>\n </div>\n</div>\n\n<div\n #badgeBottom\n class=\"t-badge t-badge_bottom\"\n [style.--t-badge-height.px]=\"badgeBottom.offsetHeight\"\n (tuiResize)=\"(0)\"\n>\n <ng-content select=\"tui-badge-notification[tuiSlot='bottom']\"></ng-content>\n <div class=\"t-border\">\n <ng-content select=\"[tuiSlot='bottom']\"></ng-content>\n </div>\n</div>\n", styles: [":host{--tui-radius: var(--tui-radius-l);--t-badge-height: 0;--t-corner-offset: calc((var(--tui-radius) * 1.4142 - var(--tui-radius)) * 1 / 1.4142);position:relative;display:inline-block;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-max-content;width:max-content;color:var(--tui-base-01)}.t-badge{--t-offset: calc(var(--t-badge-height) * -.5 + var(--t-corner-offset));position:absolute;display:flex}.t-badge_top{top:var(--t-offset);right:var(--t-offset)}.t-badge_bottom{bottom:var(--t-offset);right:var(--t-offset)}.t-border:not(:empty){display:flex;border-radius:6rem;box-shadow:0 0 0 1px currentColor}\n"], directives: [{ type: i1__namespace.TuiResizeDirective, selector: "[tuiResize]", outputs: ["tuiResize"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
34
+ TuiBadgedContentComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiBadgedContentComponent, selector: "tui-badged-content", ngImport: i0__namespace, template: "<ng-content></ng-content>\n\n<div\n #badgeTop\n class=\"t-badge t-badge_top\"\n [style.--t-badge-height.px]=\"badgeTop.offsetHeight\"\n (tuiResize)=\"(0)\"\n>\n <ng-content select=\"tui-badge-notification[tuiSlot='top']\"></ng-content>\n <div class=\"t-border\">\n <ng-content select=\"[tuiSlot='top']\"></ng-content>\n </div>\n</div>\n\n<div\n #badgeBottom\n class=\"t-badge t-badge_bottom\"\n [style.--t-badge-height.px]=\"badgeBottom.offsetHeight\"\n (tuiResize)=\"(0)\"\n>\n <ng-content select=\"tui-badge-notification[tuiSlot='bottom']\"></ng-content>\n <div class=\"t-border\">\n <ng-content select=\"[tuiSlot='bottom']\"></ng-content>\n </div>\n</div>\n", styles: [":host{--tui-radius: var(--tui-radius-l);--t-badge-height: 0;--t-corner-offset: calc((var(--tui-radius) * 1.4142 - var(--tui-radius)) * 1 / 1.4142);position:relative;display:inline-block;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-max-content;width:max-content;color:var(--tui-base-01)}.t-badge{--t-offset: calc(var(--t-badge-height) * -.5 + var(--t-corner-offset));position:absolute;display:flex}.t-badge_top{top:var(--t-offset);right:var(--t-offset)}.t-badge_bottom{bottom:var(--t-offset);right:var(--t-offset)}.t-border:not(:empty){display:flex;border-radius:6rem;box-shadow:0 0 0 1px currentColor;background:currentColor}\n"], directives: [{ type: i1__namespace.TuiResizeDirective, selector: "[tuiResize]", outputs: ["tuiResize"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
35
35
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgedContentComponent, decorators: [{
36
36
  type: i0.Component,
37
37
  args: [{
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-experimental-components-badged-content.umd.js","sources":["../../../projects/experimental/components/badged-content/badged-content.component.ts","../../../projects/experimental/components/badged-content/badged-content.template.html","../../../projects/experimental/components/badged-content/badged-content.directive.ts","../../../projects/experimental/components/badged-content/badged-content.module.ts","../../../projects/experimental/components/badged-content/taiga-ui-experimental-components-badged-content.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component} from '@angular/core';\n\n@Component({\n selector: 'tui-badged-content',\n templateUrl: './badged-content.template.html',\n styleUrls: ['./badged-content.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiBadgedContentComponent {}\n","<ng-content></ng-content>\n\n<div\n #badgeTop\n class=\"t-badge t-badge_top\"\n [style.--t-badge-height.px]=\"badgeTop.offsetHeight\"\n (tuiResize)=\"(0)\"\n>\n <ng-content select=\"tui-badge-notification[tuiSlot='top']\"></ng-content>\n <div class=\"t-border\">\n <ng-content select=\"[tuiSlot='top']\"></ng-content>\n </div>\n</div>\n\n<div\n #badgeBottom\n class=\"t-badge t-badge_bottom\"\n [style.--t-badge-height.px]=\"badgeBottom.offsetHeight\"\n (tuiResize)=\"(0)\"\n>\n <ng-content select=\"tui-badge-notification[tuiSlot='bottom']\"></ng-content>\n <div class=\"t-border\">\n <ng-content select=\"[tuiSlot='bottom']\"></ng-content>\n </div>\n</div>\n","import {Directive, Input} from '@angular/core';\n\n@Directive({\n selector: '[tuiSlot]',\n})\nexport class TuiBadgedContentDirective {\n @Input()\n tuiSlot: string | 'bottom' | 'top' = 'top';\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiResizeModule} from '@taiga-ui/cdk';\n\nimport {TuiBadgedContentComponent} from './badged-content.component';\nimport {TuiBadgedContentDirective} from './badged-content.directive';\n\n@NgModule({\n imports: [CommonModule, TuiResizeModule],\n declarations: [TuiBadgedContentComponent, TuiBadgedContentDirective],\n exports: [TuiBadgedContentComponent, TuiBadgedContentDirective],\n})\nexport class TuiBadgedContentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i0","i1","Component","ChangeDetectionStrategy","Directive","Input","CommonModule","TuiResizeModule","NgModule"],"mappings":";;;;;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AAA,EAAA,CAAA;0BAHrCI,YAAS;QAAC,YAAA,IAAA,EAAA,CAAA;QACP,oBAAA,QAAQ,EAAE,WAAW;yBACxB,CAAA;sCAGG,OAAO,EAAA,CAAA;8BADNC,QAAK;;;ACMV,YAAA,sBAAA,kBAAA,YAAA;QAAA,IAAA,SAAA,sBAAA,GAAA;;;;kJAAa,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAAL,aAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;mJAAtB,sBAAsB,EAAA,YAAA,EAAA,CAHhB,yBAAyB,EAAE,yBAAyB,CAAA,EAAA,OAAA,EAAA,CADzDM,mBAAY,EAAEC,kBAAe,CAAA,EAAA,OAAA,EAAA,CAE7B,yBAAyB,EAAE,yBAAyB,CAAA,EAAA,CAAA,CAAA;QAErD,sBAAA,CAAA,IAAA,GAAAP,aAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAAA,aAAA,EAAA,IAAA,EAAA,sBAAsB,EAJtB,OAAA,EAAA,CAAA,CAACM,mBAAY,EAAEC,kBAAe,CAAC,CAAA,EAAA,CAAA,CAAA;0HAI/B,sBAAsB,EAAA,UAAA,EAAA,CAAA;0BALlCC,WAAQ;QAAC,YAAA,IAAA,EAAA,CAAA;QACN,oBAAA,OAAO,EAAE,CAACF,mBAAY,EAAEC,kBAAe,CAAC;QACxC,oBAAA,YAAY,EAAE,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;QACpE,oBAAA,OAAO,EAAE,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;yBAClE,CAAA;;;QCXD;;QAEG;;;;;;;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-experimental-components-badged-content.umd.js","sources":["../../../projects/experimental/components/badged-content/badged-content.component.ts","../../../projects/experimental/components/badged-content/badged-content.template.html","../../../projects/experimental/components/badged-content/badged-content.directive.ts","../../../projects/experimental/components/badged-content/badged-content.module.ts","../../../projects/experimental/components/badged-content/taiga-ui-experimental-components-badged-content.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component} from '@angular/core';\n\n@Component({\n selector: 'tui-badged-content',\n templateUrl: './badged-content.template.html',\n styleUrls: ['./badged-content.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiBadgedContentComponent {}\n","<ng-content></ng-content>\n\n<div\n #badgeTop\n class=\"t-badge t-badge_top\"\n [style.--t-badge-height.px]=\"badgeTop.offsetHeight\"\n (tuiResize)=\"(0)\"\n>\n <ng-content select=\"tui-badge-notification[tuiSlot='top']\"></ng-content>\n <div class=\"t-border\">\n <ng-content select=\"[tuiSlot='top']\"></ng-content>\n </div>\n</div>\n\n<div\n #badgeBottom\n class=\"t-badge t-badge_bottom\"\n [style.--t-badge-height.px]=\"badgeBottom.offsetHeight\"\n (tuiResize)=\"(0)\"\n>\n <ng-content select=\"tui-badge-notification[tuiSlot='bottom']\"></ng-content>\n <div class=\"t-border\">\n <ng-content select=\"[tuiSlot='bottom']\"></ng-content>\n </div>\n</div>\n","import {Directive, Input} from '@angular/core';\n\n@Directive({\n selector: '[tuiSlot]',\n})\nexport class TuiBadgedContentDirective {\n @Input()\n tuiSlot: string | 'bottom' | 'top' = 'top';\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiResizeModule} from '@taiga-ui/cdk';\n\nimport {TuiBadgedContentComponent} from './badged-content.component';\nimport {TuiBadgedContentDirective} from './badged-content.directive';\n\n@NgModule({\n imports: [CommonModule, TuiResizeModule],\n declarations: [TuiBadgedContentComponent, TuiBadgedContentDirective],\n exports: [TuiBadgedContentComponent, TuiBadgedContentDirective],\n})\nexport class TuiBadgedContentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i0","i1","Component","ChangeDetectionStrategy","Directive","Input","CommonModule","TuiResizeModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;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