@taiga-ui/experimental 3.44.1 → 3.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/taiga-ui-experimental-components-avatar-stack.umd.js +1 -1
- package/bundles/taiga-ui-experimental-components-avatar-stack.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-avatar.umd.js +24 -38
- package/bundles/taiga-ui-experimental-components-avatar.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-badge.umd.js +100 -0
- package/bundles/taiga-ui-experimental-components-badge.umd.js.map +1 -0
- package/bundles/taiga-ui-experimental-components-button-loader.umd.js +94 -0
- package/bundles/taiga-ui-experimental-components-button-loader.umd.js.map +1 -0
- package/bundles/taiga-ui-experimental-components-button.umd.js +116 -0
- package/bundles/taiga-ui-experimental-components-button.umd.js.map +1 -0
- package/bundles/taiga-ui-experimental-components.umd.js +22 -4
- package/bundles/taiga-ui-experimental-components.umd.js.map +1 -1
- package/components/avatar/avatar.component.d.ts +5 -2
- package/components/avatar/avatar.module.d.ts +1 -3
- package/components/badge/badge.component.d.ts +15 -0
- package/components/badge/badge.module.d.ts +8 -0
- package/components/badge/index.d.ts +2 -0
- package/components/badge/package.json +10 -0
- package/components/badge/taiga-ui-experimental-components-badge.d.ts +5 -0
- package/components/button/button.component.d.ts +5 -0
- package/components/button/button.directive.d.ts +13 -0
- package/components/button/button.module.d.ts +8 -0
- package/components/button/index.d.ts +3 -0
- package/components/button/package.json +10 -0
- package/components/button/taiga-ui-experimental-components-button.d.ts +5 -0
- package/components/button-loader/button-loader.component.d.ts +10 -0
- package/components/button-loader/button-loader.module.d.ts +9 -0
- package/components/button-loader/index.d.ts +2 -0
- package/components/button-loader/package.json +10 -0
- package/components/button-loader/taiga-ui-experimental-components-button-loader.d.ts +5 -0
- package/components/index.d.ts +3 -0
- package/esm2015/components/avatar/avatar.component.js +17 -17
- package/esm2015/components/avatar/avatar.module.js +5 -23
- package/esm2015/components/avatar-stack/avatar-stack.component.js +1 -1
- package/esm2015/components/badge/badge.component.js +47 -0
- package/esm2015/components/badge/badge.module.js +18 -0
- package/esm2015/components/badge/index.js +3 -0
- package/esm2015/components/badge/taiga-ui-experimental-components-badge.js +5 -0
- package/esm2015/components/button/button.component.js +16 -0
- package/esm2015/components/button/button.directive.js +47 -0
- package/esm2015/components/button/button.module.js +17 -0
- package/esm2015/components/button/index.js +4 -0
- package/esm2015/components/button/taiga-ui-experimental-components-button.js +5 -0
- package/esm2015/components/button-loader/button-loader.component.js +38 -0
- package/esm2015/components/button-loader/button-loader.module.js +19 -0
- package/esm2015/components/button-loader/index.js +3 -0
- package/esm2015/components/button-loader/taiga-ui-experimental-components-button-loader.js +5 -0
- package/esm2015/components/index.js +4 -1
- package/fesm2015/taiga-ui-experimental-components-avatar-stack.js +1 -1
- package/fesm2015/taiga-ui-experimental-components-avatar-stack.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-avatar.js +20 -38
- package/fesm2015/taiga-ui-experimental-components-avatar.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-badge.js +69 -0
- package/fesm2015/taiga-ui-experimental-components-badge.js.map +1 -0
- package/fesm2015/taiga-ui-experimental-components-button-loader.js +60 -0
- package/fesm2015/taiga-ui-experimental-components-button-loader.js.map +1 -0
- package/fesm2015/taiga-ui-experimental-components-button.js +80 -0
- package/fesm2015/taiga-ui-experimental-components-button.js.map +1 -0
- package/fesm2015/taiga-ui-experimental-components.js +3 -0
- package/fesm2015/taiga-ui-experimental-components.js.map +1 -1
- package/package.json +4 -4
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
return TuiAvatarStackComponent;
|
|
32
32
|
}());
|
|
33
33
|
TuiAvatarStackComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAvatarStackComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
34
|
-
TuiAvatarStackComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiAvatarStackComponent, selector: "tui-avatar-stack", inputs: { direction: "direction" }, host: { properties: { "attr.data-direction": "this.direction" } }, ngImport: i0__namespace, template: '<ng-content></ng-content>', isInline: true, styles: ["tui-avatar-stack{display:flex;--gap: .125rem
|
|
34
|
+
TuiAvatarStackComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiAvatarStackComponent, selector: "tui-avatar-stack", inputs: { direction: "direction" }, host: { properties: { "attr.data-direction": "this.direction" } }, ngImport: i0__namespace, template: '<ng-content></ng-content>', isInline: true, styles: ["tui-avatar-stack{display:flex;--t-gap: .125rem}tui-avatar-stack tui-avatar{-webkit-mask-size:calc(var(--t-radius) + var(--t-gap)) calc(var(--t-radius) + var(--t-gap)),calc(var(--t-radius) + var(--t-gap)) calc(var(--t-radius) + var(--t-gap)),100%;mask-size:calc(var(--t-radius) + var(--t-gap)) calc(var(--t-radius) + var(--t-gap)),calc(var(--t-radius) + var(--t-gap)) calc(var(--t-radius) + var(--t-gap)),100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}tui-avatar-stack[data-direction=left] tui-avatar:not(:first-child){-webkit-mask-image:radial-gradient(circle at 0% 100%,transparent calc(var(--t-radius) + var(--t-gap)),#000 calc(var(--t-radius) + var(--t-gap) + .2px)),radial-gradient(circle at 0% 0%,transparent calc(var(--t-radius) + var(--t-gap)),#000 calc(var(--t-radius) + var(--t-gap) + .2px)),linear-gradient(to right,transparent calc(50% + var(--t-gap)),#000 calc(50% + var(--t-gap)));mask-image:radial-gradient(circle at 0% 100%,transparent calc(var(--t-radius) + var(--t-gap)),#000 calc(var(--t-radius) + var(--t-gap) + .2px)),radial-gradient(circle at 0% 0%,transparent calc(var(--t-radius) + var(--t-gap)),#000 calc(var(--t-radius) + var(--t-gap) + .2px)),linear-gradient(to right,transparent calc(50% + var(--t-gap)),#000 calc(50% + var(--t-gap)));-webkit-mask-position:calc(50% - (var(--t-radius) - var(--t-gap)) / 2) calc(-1 * var(--t-gap)),calc(50% - (var(--t-radius) - var(--t-gap)) / 2) calc(100% + var(--t-gap)),bottom;mask-position:calc(50% - (var(--t-radius) - var(--t-gap)) / 2) calc(-1 * var(--t-gap)),calc(50% - (var(--t-radius) - var(--t-gap)) / 2) calc(100% + var(--t-gap)),bottom}tui-avatar-stack[data-direction=right] tui-avatar:not(:last-child){-webkit-mask-image:radial-gradient(circle at 150% 100%,transparent calc(var(--t-radius) + var(--t-gap)),#000 calc(var(--t-radius) + var(--t-gap) + .2px)),radial-gradient(circle at 150% 0%,transparent calc(var(--t-radius) + var(--t-gap)),#000 calc(var(--t-radius) + var(--t-gap) + .2px)),linear-gradient(to left,transparent calc(50% + var(--t-gap)),#000 calc(50% + var(--t-gap)));mask-image:radial-gradient(circle at 150% 100%,transparent calc(var(--t-radius) + var(--t-gap)),#000 calc(var(--t-radius) + var(--t-gap) + .2px)),radial-gradient(circle at 150% 0%,transparent calc(var(--t-radius) + var(--t-gap)),#000 calc(var(--t-radius) + var(--t-gap) + .2px)),linear-gradient(to left,transparent calc(50% + var(--t-gap)),#000 calc(50% + var(--t-gap)));-webkit-mask-position:calc(50% - var(--t-gap)) calc(-1 * var(--t-gap)),calc(50% - var(--t-gap)) calc(100% + var(--t-gap)),bottom;mask-position:calc(50% - var(--t-gap)) calc(-1 * var(--t-gap)),calc(50% - var(--t-gap)) calc(100% + var(--t-gap)),bottom}tui-avatar-stack tui-avatar:not(:last-child){margin-right:calc(var(--t-size) / -2)}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
35
35
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAvatarStackComponent, decorators: [{
|
|
36
36
|
type: i0.Component,
|
|
37
37
|
args: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components-avatar-stack.umd.js","sources":["../../../projects/experimental/components/avatar-stack/avatar-stack.component.ts","../../../projects/experimental/components/avatar-stack/avatar-stack.module.ts","../../../projects/experimental/components/avatar-stack/taiga-ui-experimental-components-avatar-stack.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiHorizontalDirection} from '@taiga-ui/core';\n\n@Component({\n selector: 'tui-avatar-stack',\n template: '<ng-content></ng-content>',\n styleUrls: ['./avatar-stack.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiAvatarStackComponent {\n @Input()\n @HostBinding('attr.data-direction')\n direction: TuiHorizontalDirection = 'right';\n}\n","import {NgModule} from '@angular/core';\nimport {\n TuiAvatarComponent,\n TuiAvatarModule,\n} from '@taiga-ui/experimental/components/avatar';\n\nimport {TuiAvatarStackComponent} from './avatar-stack.component';\n\n@NgModule({\n imports: [TuiAvatarModule],\n declarations: [TuiAvatarStackComponent],\n exports: [TuiAvatarStackComponent, TuiAvatarComponent],\n})\nexport class TuiAvatarStackModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i0","Component","ChangeDetectionStrategy","ViewEncapsulation","Input","HostBinding","TuiAvatarModule","TuiAvatarComponent","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,QAAA,uBAAA,kBAAA,YAAA;IAPA,IAAA,SAAA,uBAAA,GAAA;IAUI,QAAA,IAAS,CAAA,SAAA,GAA2B,OAAO,CAAC;SAC/C;;;+IAJY,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAAA,aAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;IAAvB,uBAAA,CAAA,IAAA,GAAAA,aAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,uBAAuB,0KALtB,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-avatar-stack.umd.js","sources":["../../../projects/experimental/components/avatar-stack/avatar-stack.component.ts","../../../projects/experimental/components/avatar-stack/avatar-stack.module.ts","../../../projects/experimental/components/avatar-stack/taiga-ui-experimental-components-avatar-stack.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiHorizontalDirection} from '@taiga-ui/core';\n\n@Component({\n selector: 'tui-avatar-stack',\n template: '<ng-content></ng-content>',\n styleUrls: ['./avatar-stack.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiAvatarStackComponent {\n @Input()\n @HostBinding('attr.data-direction')\n direction: TuiHorizontalDirection = 'right';\n}\n","import {NgModule} from '@angular/core';\nimport {\n TuiAvatarComponent,\n TuiAvatarModule,\n} from '@taiga-ui/experimental/components/avatar';\n\nimport {TuiAvatarStackComponent} from './avatar-stack.component';\n\n@NgModule({\n imports: [TuiAvatarModule],\n declarations: [TuiAvatarStackComponent],\n exports: [TuiAvatarStackComponent, TuiAvatarComponent],\n})\nexport class TuiAvatarStackModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i0","Component","ChangeDetectionStrategy","ViewEncapsulation","Input","HostBinding","TuiAvatarModule","TuiAvatarComponent","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,QAAA,uBAAA,kBAAA,YAAA;IAPA,IAAA,SAAA,uBAAA,GAAA;IAUI,QAAA,IAAS,CAAA,SAAA,GAA2B,OAAO,CAAC;SAC/C;;;+IAJY,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAAA,aAAA,CA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AA,EAAA,CAJpB,CAACD,sBAAe,CAAC,CAAA,EAAA,CAAA,CAAA;sHAIjB,oBAAoB,EAAA,UAAA,EAAA,CAAA;sBALhCE,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;wBACN,OAAO,EAAE,CAACF,sBAAe,CAAC;wBAC1B,YAAY,EAAE,CAAC,uBAAuB,CAAC;IACvC,oBAAA,OAAO,EAAE,CAAC,uBAAuB,EAAEC,yBAAkB,CAAC;qBACzD,CAAA;;;ICZD;;IAEG;;;;;;;;;;;"}
|
|
@@ -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'
|
|
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
|
|
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';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
27
27
|
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
28
28
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
29
|
-
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
30
29
|
|
|
31
30
|
var TuiAvatarComponent = /** @class */ (function () {
|
|
32
|
-
function TuiAvatarComponent() {
|
|
31
|
+
function TuiAvatarComponent(platform) {
|
|
32
|
+
this.platform = platform;
|
|
33
33
|
this.size = 'm';
|
|
34
34
|
this.round = false;
|
|
35
35
|
this.src = null;
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
});
|
|
67
67
|
return TuiAvatarComponent;
|
|
68
68
|
}());
|
|
69
|
-
TuiAvatarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAvatarComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
70
|
-
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": "
|
|
69
|
+
TuiAvatarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAvatarComponent, deps: [{ token: cdk.TUI_PLATFORM }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
70
|
+
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 class=\"t-img\"\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;display:inline-flex;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)}: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}.t-icon{width:60%;height:60%}.t-img{width:100%;height:100%}.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 });
|
|
71
71
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAvatarComponent, decorators: [{
|
|
72
72
|
type: i0.Component,
|
|
73
73
|
args: [{
|
|
@@ -75,22 +75,24 @@
|
|
|
75
75
|
templateUrl: './avatar.template.html',
|
|
76
76
|
styleUrls: ['./avatar.style.less'],
|
|
77
77
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
78
|
+
host: {
|
|
79
|
+
'[attr.data-size]': 'size',
|
|
80
|
+
'[attr.data-platform]': 'platform',
|
|
81
|
+
'[class._round]': 'round',
|
|
82
|
+
'[class._img]': 'type === "img"',
|
|
83
|
+
},
|
|
78
84
|
}]
|
|
79
|
-
}],
|
|
85
|
+
}], ctorParameters: function () {
|
|
86
|
+
return [{ type: undefined, decorators: [{
|
|
87
|
+
type: i0.Inject,
|
|
88
|
+
args: [cdk.TUI_PLATFORM]
|
|
89
|
+
}] }];
|
|
90
|
+
}, propDecorators: { size: [{
|
|
80
91
|
type: i0.Input
|
|
81
|
-
}, {
|
|
82
|
-
type: i0.HostBinding,
|
|
83
|
-
args: ['attr.data-size']
|
|
84
92
|
}], round: [{
|
|
85
93
|
type: i0.Input
|
|
86
|
-
}, {
|
|
87
|
-
type: i0.HostBinding,
|
|
88
|
-
args: ['class._round']
|
|
89
94
|
}], src: [{
|
|
90
95
|
type: i0.Input
|
|
91
|
-
}], img: [{
|
|
92
|
-
type: i0.HostBinding,
|
|
93
|
-
args: ['class._img']
|
|
94
96
|
}] } });
|
|
95
97
|
|
|
96
98
|
var TuiAvatarModule = /** @class */ (function () {
|
|
@@ -99,30 +101,14 @@
|
|
|
99
101
|
return TuiAvatarModule;
|
|
100
102
|
}());
|
|
101
103
|
TuiAvatarModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAvatarModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
102
|
-
TuiAvatarModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAvatarModule, declarations: [TuiAvatarComponent], imports: [i2.CommonModule,
|
|
103
|
-
|
|
104
|
-
i3.TuiLazyLoadingModule,
|
|
105
|
-
pipes.TuiFallbackSrcModule,
|
|
106
|
-
i4.TuiFadeModule], exports: [TuiAvatarComponent, pipes.TuiFallbackSrcPipe] });
|
|
107
|
-
TuiAvatarModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAvatarModule, imports: [[
|
|
108
|
-
i2.CommonModule,
|
|
109
|
-
i1.TuiSvgModule,
|
|
110
|
-
i3.TuiLazyLoadingModule,
|
|
111
|
-
pipes.TuiFallbackSrcModule,
|
|
112
|
-
i4.TuiFadeModule,
|
|
113
|
-
]] });
|
|
104
|
+
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] });
|
|
105
|
+
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
106
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAvatarModule, decorators: [{
|
|
115
107
|
type: i0.NgModule,
|
|
116
108
|
args: [{
|
|
117
|
-
imports: [
|
|
118
|
-
i2.CommonModule,
|
|
119
|
-
i1.TuiSvgModule,
|
|
120
|
-
i3.TuiLazyLoadingModule,
|
|
121
|
-
pipes.TuiFallbackSrcModule,
|
|
122
|
-
i4.TuiFadeModule,
|
|
123
|
-
],
|
|
109
|
+
imports: [i2.CommonModule, i1.TuiSvgModule, i3.TuiLazyLoadingModule],
|
|
124
110
|
declarations: [TuiAvatarComponent],
|
|
125
|
-
exports: [TuiAvatarComponent
|
|
111
|
+
exports: [TuiAvatarComponent],
|
|
126
112
|
}]
|
|
127
113
|
}] });
|
|
128
114
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components-avatar.umd.js","sources":["../../../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 {ChangeDetectionStrategy, Component,
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-avatar.umd.js","sources":["../../../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 {ChangeDetectionStrategy, Component, Inject, Input} from '@angular/core';\nimport {SafeResourceUrl} from '@angular/platform-browser';\nimport {TUI_PLATFORM, tuiIsString, TuiPlatform} from '@taiga-ui/cdk';\nimport {TuiSizeXXL, TuiSizeXXS} from '@taiga-ui/core';\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: TuiSizeXXL | TuiSizeXXS = 'm';\n\n @Input()\n round = false;\n\n @Input()\n src: SafeResourceUrl | string | null = null;\n\n constructor(@Inject(TUI_PLATFORM) readonly platform: TuiPlatform) {}\n\n get img(): boolean {\n return this.type === 'img';\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 class=\"t-img\"\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":["tuiIsString","i0","TUI_PLATFORM","i1","i2","i3","Component","ChangeDetectionStrategy","Inject","Input","CommonModule","TuiSvgModule","TuiLazyLoadingModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,QAAA,kBAAA,kBAAA,YAAA;IAUI,IAAA,SAAA,kBAAA,CAA2C,QAAqB,EAAA;IAArB,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAa;IARhE,QAAA,IAAI,CAAA,IAAA,GAA4B,GAAG,CAAC;IAGpC,QAAA,IAAK,CAAA,KAAA,GAAG,KAAK,CAAC;IAGd,QAAA,IAAG,CAAA,GAAA,GAAoC,IAAI,CAAC;SAEwB;IAEpE,IAAA,MAAA,CAAA,cAAA,CAAI,kBAAG,CAAA,SAAA,EAAA,KAAA,EAAA;IAAP,QAAA,GAAA,EAAA,YAAA;IACI,YAAA,OAAO,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC;aAC9B;;;IAAA,KAAA,CAAA,CAAA;IAED,IAAA,MAAA,CAAA,cAAA,CAAI,kBAAK,CAAA,SAAA,EAAA,OAAA,EAAA;IAAT,QAAA,GAAA,EAAA,YAAA;IACI,YAAA,OAAO,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC;aACzB;;;IAAA,KAAA,CAAA,CAAA;IAED,IAAA,MAAA,CAAA,cAAA,CAAI,kBAAI,CAAA,SAAA,EAAA,MAAA,EAAA;IAAR,QAAA,GAAA,EAAA,YAAA;IACI,YAAA,IAAI,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AAS,eAAY,EAAEC,eAAY,EAAEC,uBAAoB,CAAA,EAAA,OAAA,EAAA,CAEhD,kBAAkB,CAAA,EAAA,CAAA,CAAA;IAEnB,eAAA,CAAA,IAAA,GAAAX,aAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAAA,aAAA,EAAA,IAAA,EAAA,eAAe,YAJf,CAACS,eAAY,EAAEC,eAAY,EAAEC,uBAAoB,CAAC,CAAA,EAAA,CAAA,CAAA;sHAIlD,eAAe,EAAA,UAAA,EAAA,CAAA;sBAL3BC,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;;;;;;;;;;;"}
|
|
@@ -0,0 +1,100 @@
|
|
|
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'), require('@angular/common')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/experimental/components/badge', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/core', 'rxjs', '@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.badge = {}), global.ng.core, global.cdk, global.core, global.rxjs, global.ng.common));
|
|
5
|
+
})(this, (function (exports, i0, cdk, core, 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 TuiBadgeComponent = /** @class */ (function () {
|
|
29
|
+
function TuiBadgeComponent(mode$, platform) {
|
|
30
|
+
this.mode$ = mode$;
|
|
31
|
+
this.platform = platform;
|
|
32
|
+
this.size = 'l';
|
|
33
|
+
this.appearance = 'default';
|
|
34
|
+
this.hoverable = false;
|
|
35
|
+
}
|
|
36
|
+
return TuiBadgeComponent;
|
|
37
|
+
}());
|
|
38
|
+
TuiBadgeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeComponent, deps: [{ token: core.TUI_MODE }, { token: cdk.TUI_PLATFORM }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
39
|
+
TuiBadgeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiBadgeComponent, selector: "tui-badge", inputs: { size: "size", appearance: "appearance", hoverable: "hoverable" }, host: { listeners: { "$.data-mode.attr": "mode$" }, properties: { "attr.data-platform": "platform", "attr.data-appearance": "appearance", "attr.data-size": "size", "class._hoverable": "hoverable" } }, 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{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;--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);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._hoverable:hover[data-appearance=custom]:after,:host._hoverable:active[data-appearance=custom]:after{background:var(--tui-clear)}:host[data-appearance=primary]{background:var(--tui-primary);color:var(--tui-primary-text)}:host[data-appearance=primary]._hoverable:hover{background:var(--tui-primary-hover)}:host[data-appearance=primary]._hoverable:active{background:var(--tui-primary-active)}:host[data-appearance=accent]{background:var(--tui-accent);color:var(--tui-accent-text)}:host[data-appearance=accent]._hoverable:hover{background:var(--tui-accent-hover)}:host[data-appearance=accent]._hoverable:active{background:var(--tui-accent-active)}:host[data-appearance=light]{background:var(--tui-secondary);color:var(--tui-text-01)}:host[data-appearance=light]._hoverable:hover{background:var(--tui-secondary-hover)}:host[data-appearance=light]._hoverable:active{background:var(--tui-secondary-active)}: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]._hoverable:hover,:host[data-appearance=error]._hoverable:active{background:var(--tui-error-bg-hover)}:host[data-appearance=error][data-mode=onDark]{background:var(--tui-error-bg-night);color:var(--tui-text-01-night)}:host[data-appearance=error][data-mode=onDark]._hoverable:hover,:host[data-appearance=error][data-mode=onDark]._hoverable:active{background:var(--tui-error-bg-night-hover)}: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]._hoverable:hover,:host[data-appearance=success]._hoverable:active{background:var(--tui-success-bg-hover)}:host[data-appearance=success][data-mode=onDark]{background:var(--tui-success-bg-night);color:var(--tui-text-01-night)}:host[data-appearance=success][data-mode=onDark]._hoverable:hover,:host[data-appearance=success][data-mode=onDark]._hoverable:active{background:var(--tui-success-bg-night-hover)}: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]._hoverable:hover,:host[data-appearance=warning]._hoverable:active{background:var(--tui-warning-bg-hover)}:host[data-appearance=warning][data-mode=onDark]{background:var(--tui-warning-bg-night);color:var(--tui-text-01-night)}:host[data-appearance=warning][data-mode=onDark]._hoverable:hover,:host[data-appearance=warning][data-mode=onDark]._hoverable:active{background:var(--tui-warning-bg-night-hover)}: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]._hoverable:hover,:host[data-appearance=info]._hoverable:active{background:var(--tui-info-bg-hover)}:host[data-appearance=info][data-mode=onDark]{background:var(--tui-info-bg-night);color:var(--tui-text-01-night)}:host[data-appearance=info][data-mode=onDark]._hoverable:hover,:host[data-appearance=info][data-mode=onDark]._hoverable:active{background:var(--tui-info-bg-night-hover)}: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]._hoverable:hover,:host[data-appearance=neutral]._hoverable:active{background:var(--tui-neutral-bg-hover)}:host[data-appearance=neutral][data-mode=onDark]{background:var(--tui-neutral-bg-night);color:var(--tui-text-01-night)}:host[data-appearance=neutral][data-mode=onDark]._hoverable:hover,:host[data-appearance=neutral][data-mode=onDark]._hoverable:active{background:var(--tui-neutral-bg-night-hover)}:host[data-appearance=default]{background:var(--tui-base-06)}:host[data-appearance=default]:not([data-mode])._hoverable:hover{background:var(--tui-base-07)}:host[data-appearance=default]:not([data-mode])._hoverable:active{background:var(--tui-base-08)}:host[data-appearance=default][data-mode=onDark]{background:var(--tui-clear-inverse-hover)}:host[data-appearance=default][data-mode=onDark]._hoverable:hover{background:var(--tui-clear-inverse-active)}:host[data-appearance=default][data-mode=onDark]._hoverable:active{background:var(--tui-clear-inverse-active)}:host[data-appearance=default][data-mode=onLight]{background:var(--tui-clear);color:var(--tui-text-01)}:host[data-appearance=default][data-mode=onLight]._hoverable:hover{background:var(--tui-clear-hover)}:host[data-appearance=default][data-mode=onLight]._hoverable:active{background:var(--tui-clear-active)}:host._hoverable{cursor:pointer}: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"], animations: [core.tuiPop], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
40
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeComponent, decorators: [{
|
|
41
|
+
type: i0.Component,
|
|
42
|
+
args: [{
|
|
43
|
+
selector: 'tui-badge',
|
|
44
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
45
|
+
templateUrl: './badge.template.html',
|
|
46
|
+
styleUrls: ['./badge.style.less'],
|
|
47
|
+
providers: [core.MODE_PROVIDER],
|
|
48
|
+
animations: [core.tuiPop],
|
|
49
|
+
host: {
|
|
50
|
+
'[attr.data-platform]': 'platform',
|
|
51
|
+
'[attr.data-appearance]': 'appearance',
|
|
52
|
+
'[attr.data-size]': 'size',
|
|
53
|
+
'[class._hoverable]': 'hoverable',
|
|
54
|
+
'($.data-mode.attr)': 'mode$',
|
|
55
|
+
},
|
|
56
|
+
}]
|
|
57
|
+
}], ctorParameters: function () {
|
|
58
|
+
return [{ type: i1__namespace.Observable, decorators: [{
|
|
59
|
+
type: i0.Inject,
|
|
60
|
+
args: [core.TUI_MODE]
|
|
61
|
+
}] }, { type: undefined, decorators: [{
|
|
62
|
+
type: i0.Inject,
|
|
63
|
+
args: [cdk.TUI_PLATFORM]
|
|
64
|
+
}] }];
|
|
65
|
+
}, propDecorators: { size: [{
|
|
66
|
+
type: i0.Input
|
|
67
|
+
}], appearance: [{
|
|
68
|
+
type: i0.Input
|
|
69
|
+
}], hoverable: [{
|
|
70
|
+
type: i0.Input
|
|
71
|
+
}] } });
|
|
72
|
+
|
|
73
|
+
var TuiBadgeModule = /** @class */ (function () {
|
|
74
|
+
function TuiBadgeModule() {
|
|
75
|
+
}
|
|
76
|
+
return TuiBadgeModule;
|
|
77
|
+
}());
|
|
78
|
+
TuiBadgeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
79
|
+
TuiBadgeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeModule, declarations: [TuiBadgeComponent], imports: [common.CommonModule], exports: [TuiBadgeComponent] });
|
|
80
|
+
TuiBadgeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeModule, imports: [[common.CommonModule]] });
|
|
81
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeModule, decorators: [{
|
|
82
|
+
type: i0.NgModule,
|
|
83
|
+
args: [{
|
|
84
|
+
imports: [common.CommonModule],
|
|
85
|
+
declarations: [TuiBadgeComponent],
|
|
86
|
+
exports: [TuiBadgeComponent],
|
|
87
|
+
}]
|
|
88
|
+
}] });
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Generated bundle index. Do not edit.
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
exports.TuiBadgeComponent = TuiBadgeComponent;
|
|
95
|
+
exports.TuiBadgeModule = TuiBadgeModule;
|
|
96
|
+
|
|
97
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
98
|
+
|
|
99
|
+
}));
|
|
100
|
+
//# sourceMappingURL=taiga-ui-experimental-components-badge.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-badge.umd.js","sources":["../../../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 {ChangeDetectionStrategy, Component, Inject, Input} from '@angular/core';\nimport {TUI_PLATFORM, TuiPlatform} from '@taiga-ui/cdk';\nimport {\n MODE_PROVIDER,\n TUI_MODE,\n TuiBrightness,\n tuiPop,\n TuiSizeS,\n TuiSizeXL,\n} from '@taiga-ui/core';\nimport {TuiStatus} from '@taiga-ui/kit';\nimport {Observable} from 'rxjs';\n\n@Component({\n selector: 'tui-badge',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './badge.template.html',\n styleUrls: ['./badge.style.less'],\n providers: [MODE_PROVIDER],\n animations: [tuiPop],\n host: {\n '[attr.data-platform]': 'platform',\n '[attr.data-appearance]': 'appearance',\n '[attr.data-size]': 'size',\n '[class._hoverable]': 'hoverable',\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiBadgeComponent {\n @Input()\n size: TuiSizeS | TuiSizeXL = 'l';\n\n @Input()\n appearance: TuiStatus | 'accent' | 'light' = 'default';\n\n @Input()\n hoverable = false;\n\n constructor(\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 {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\n\nimport {TuiBadgeComponent} from './badge.component';\n\n@NgModule({\n imports: [CommonModule],\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":["TUI_MODE","TUI_PLATFORM","i0","MODE_PROVIDER","tuiPop","Component","ChangeDetectionStrategy","Inject","Input","CommonModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,QAAA,iBAAA,kBAAA,YAAA;QAUI,SAC+B,iBAAA,CAAA,KAAuC,EACnC,QAAqB,EAAA;IADzB,QAAA,IAAK,CAAA,KAAA,GAAL,KAAK,CAAkC;IACnC,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAa;IAVxD,QAAA,IAAI,CAAA,IAAA,GAAyB,GAAG,CAAC;IAGjC,QAAA,IAAU,CAAA,UAAA,GAAmC,SAAS,CAAC;IAGvD,QAAA,IAAS,CAAA,SAAA,GA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AE,OAAO;IAChC,qBAAA;qBACJ,CAAA;;;kCAYQG,SAAM;mCAACP,aAAQ,CAAA;;kCACfO,SAAM;mCAACN,gBAAY,CAAA;;6BAVxB,IAAI,EAAA,CAAA;0BADHO,QAAK;oBAIN,UAAU,EAAA,CAAA;0BADTA,QAAK;oBAIN,SAAS,EAAA,CAAA;0BADRA,QAAK;;;AEzBV,QAAA,cAAA,kBAAA,YAAA;IAAA,IAAA,SAAA,cAAA,GAAA;;;;sIAAa,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAAN,aAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;IAAd,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,CADtB,EAAA,OAAA,EAAA,CAAAO,mBAAY,aAEZ,iBAAiB,CAAA,EAAA,CAAA,CAAA;uIAElB,cAAc,EAAA,OAAA,EAAA,CAJd,CAACA,mBAAY,CAAC,CAAA,EAAA,CAAA,CAAA;sHAId,cAAc,EAAA,UAAA,EAAA,CAAA;sBAL1BC,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;wBACN,OAAO,EAAE,CAACD,mBAAY,CAAC;wBACvB,YAAY,EAAE,CAAC,iBAAiB,CAAC;wBACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;qBAC/B,CAAA;;;ICTD;;IAEG;;;;;;;;;;;"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/core'), require('@angular/common')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/experimental/components/button-loader', ['exports', '@angular/core', '@taiga-ui/core', '@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["button-loader"] = {}), global.ng.core, global.i1, global.ng.common));
|
|
5
|
+
})(this, (function (exports, i0, i1, i2) { '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
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
28
|
+
|
|
29
|
+
var TuiButtonLoaderComponent = /** @class */ (function () {
|
|
30
|
+
function TuiButtonLoaderComponent() {
|
|
31
|
+
this.size = 'l';
|
|
32
|
+
this.loading = false;
|
|
33
|
+
this.disabled = false;
|
|
34
|
+
}
|
|
35
|
+
Object.defineProperty(TuiButtonLoaderComponent.prototype, "loaderSize", {
|
|
36
|
+
get: function () {
|
|
37
|
+
return i1.tuiSizeBigger(this.size) ? 'm' : 's';
|
|
38
|
+
},
|
|
39
|
+
enumerable: false,
|
|
40
|
+
configurable: true
|
|
41
|
+
});
|
|
42
|
+
return TuiButtonLoaderComponent;
|
|
43
|
+
}());
|
|
44
|
+
TuiButtonLoaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonLoaderComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
45
|
+
TuiButtonLoaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiButtonLoaderComponent, selector: "a[tuiButton][loading],button[tuiButton][loading],a[tuiIconButton][loading],button[tuiIconButton][loading]", inputs: { size: "size", loading: "loading", disabled: "disabled" }, host: { properties: { "disabled": "disabled || loading", "class._loading": "loading" } }, ngImport: i0__namespace, template: "<ng-content></ng-content>\n<tui-loader\n *ngIf=\"loading\"\n class=\"t-loader\"\n [inheritColor]=\"true\"\n [size]=\"loaderSize\"\n></tui-loader>\n", styles: ["[tuiButtonNew]._loading{--tui-disabled-opacity: 1;-webkit-text-fill-color:transparent}[tuiButtonNew]._loading>*{opacity:0}[tuiButtonNew]._loading .t-loader{position:absolute;top:0;left:0;width:100%;height:100%;opacity:1}\n"], components: [{ type: i1__namespace.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
46
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonLoaderComponent, decorators: [{
|
|
47
|
+
type: i0.Component,
|
|
48
|
+
args: [{
|
|
49
|
+
selector: 'a[tuiButton][loading],button[tuiButton][loading],a[tuiIconButton][loading],button[tuiIconButton][loading]',
|
|
50
|
+
templateUrl: './button-loader.template.html',
|
|
51
|
+
styleUrls: ['./button-loader.style.less'],
|
|
52
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
53
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
54
|
+
host: {
|
|
55
|
+
'[disabled]': 'disabled || loading',
|
|
56
|
+
'[class._loading]': 'loading',
|
|
57
|
+
},
|
|
58
|
+
}]
|
|
59
|
+
}], propDecorators: { size: [{
|
|
60
|
+
type: i0.Input
|
|
61
|
+
}], loading: [{
|
|
62
|
+
type: i0.Input
|
|
63
|
+
}], disabled: [{
|
|
64
|
+
type: i0.Input
|
|
65
|
+
}] } });
|
|
66
|
+
|
|
67
|
+
var TuiButtonLoaderModule = /** @class */ (function () {
|
|
68
|
+
function TuiButtonLoaderModule() {
|
|
69
|
+
}
|
|
70
|
+
return TuiButtonLoaderModule;
|
|
71
|
+
}());
|
|
72
|
+
TuiButtonLoaderModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonLoaderModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
73
|
+
TuiButtonLoaderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonLoaderModule, declarations: [TuiButtonLoaderComponent], imports: [i2.CommonModule, i1.TuiLoaderModule], exports: [TuiButtonLoaderComponent] });
|
|
74
|
+
TuiButtonLoaderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonLoaderModule, imports: [[i2.CommonModule, i1.TuiLoaderModule]] });
|
|
75
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonLoaderModule, decorators: [{
|
|
76
|
+
type: i0.NgModule,
|
|
77
|
+
args: [{
|
|
78
|
+
imports: [i2.CommonModule, i1.TuiLoaderModule],
|
|
79
|
+
declarations: [TuiButtonLoaderComponent],
|
|
80
|
+
exports: [TuiButtonLoaderComponent],
|
|
81
|
+
}]
|
|
82
|
+
}] });
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Generated bundle index. Do not edit.
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
exports.TuiButtonLoaderComponent = TuiButtonLoaderComponent;
|
|
89
|
+
exports.TuiButtonLoaderModule = TuiButtonLoaderModule;
|
|
90
|
+
|
|
91
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
92
|
+
|
|
93
|
+
}));
|
|
94
|
+
//# sourceMappingURL=taiga-ui-experimental-components-button-loader.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-button-loader.umd.js","sources":["../../../projects/experimental/components/button-loader/button-loader.component.ts","../../../projects/experimental/components/button-loader/button-loader.template.html","../../../projects/experimental/components/button-loader/button-loader.module.ts","../../../projects/experimental/components/button-loader/taiga-ui-experimental-components-button-loader.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiSizeBigger, TuiSizeL, TuiSizeS, TuiSizeXS} from '@taiga-ui/core';\n\n@Component({\n selector:\n 'a[tuiButton][loading],button[tuiButton][loading],a[tuiIconButton][loading],button[tuiIconButton][loading]',\n templateUrl: './button-loader.template.html',\n styleUrls: ['./button-loader.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[disabled]': 'disabled || loading',\n '[class._loading]': 'loading',\n },\n})\nexport class TuiButtonLoaderComponent {\n @Input()\n size: TuiSizeL | TuiSizeXS = 'l';\n\n @Input()\n loading = false;\n\n @Input()\n disabled = false;\n\n get loaderSize(): TuiSizeS {\n return tuiSizeBigger(this.size) ? 'm' : 's';\n }\n}\n","<ng-content></ng-content>\n<tui-loader\n *ngIf=\"loading\"\n class=\"t-loader\"\n [inheritColor]=\"true\"\n [size]=\"loaderSize\"\n></tui-loader>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLoaderModule} from '@taiga-ui/core';\n\nimport {TuiButtonLoaderComponent} from './button-loader.component';\n\n@NgModule({\n imports: [CommonModule, TuiLoaderModule],\n declarations: [TuiButtonLoaderComponent],\n exports: [TuiButtonLoaderComponent],\n})\nexport class TuiButtonLoaderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["tuiSizeBigger","i0","i1","i2","Component","ChangeDetectionStrategy","ViewEncapsulation","Input","CommonModule","TuiLoaderModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,QAAA,wBAAA,kBAAA,YAAA;IAZA,IAAA,SAAA,wBAAA,GAAA;IAcI,QAAA,IAAI,CAAA,IAAA,GAAyB,GAAG,CAAC;IAGjC,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;IAGhB,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;SAKpB;IAHG,IAAA,MAAA,CAAA,cAAA,CAAI,wBAAU,CAAA,SAAA,EAAA,YAAA,EAAA;IAAd,QAAA,GAAA,EAAA,YAAA;IACI,YAAA,OAAOA,gBAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;aAC/C;;;IAAA,KAAA,CAAA,CAAA;;;gJAZQ,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAAC,aAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;IAAxB,wBAAA,CAAA,IAAA,GAAAA,aAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,wBAAwB,0TCpBrC,iKAOA,EAAA,MAAA,EAAA,CAAA,gOAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAAC,aAAA,CAAA,kBAAA,EAAA,QAAA,EAAA,YA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wBAAwB,CAAA,EAAA,OAAA,EAAA,CAD7BO,eAAY,EAAEC,kBAAe,aAE7B,wBAAwB,CAAA,EAAA,CAAA,CAAA;IAEzB,qBAAA,CAAA,IAAA,GAAAR,aAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAAA,aAAA,EAAA,IAAA,EAAA,qBAAqB,EAJrB,OAAA,EAAA,CAAA,CAACO,eAAY,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,eAAY,EAAEC,kBAAe,CAAC;wBACxC,YAAY,EAAE,CAAC,wBAAwB,CAAC;wBACxC,OAAO,EAAE,CAAC,wBAAwB,CAAC;qBACtC,CAAA;;;ICVD;;IAEG;;;;;;;;;;;"}
|
|
@@ -0,0 +1,116 @@
|
|
|
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/button', ['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.button = {}), global.ng.core, global.i2, global.core, global.rxjs));
|
|
5
|
+
})(this, (function (exports, i0, i2, core, i1) { '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 i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
27
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
28
|
+
|
|
29
|
+
var TuiButtonComponent = /** @class */ (function () {
|
|
30
|
+
function TuiButtonComponent() {
|
|
31
|
+
}
|
|
32
|
+
return TuiButtonComponent;
|
|
33
|
+
}());
|
|
34
|
+
TuiButtonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
35
|
+
TuiButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiButtonComponent, selector: "ng-component", ngImport: i0__namespace, template: '', isInline: true, styles: ["[tuiButtonNew]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;display:inline-flex;height:var(--t-size);align-items:center;justify-content:center;width:-webkit-min-content;width:min-content;white-space:nowrap;border-radius:var(--t-radius);-webkit-user-select:none;-moz-user-select:none;user-select:none;outline:none;cursor:pointer}[tuiButtonNew][data-size=xs]{--t-size: var(--tui-height-xs);--t-radius: var(--tui-radius-xs);font:var(--tui-font-text-s);padding:0 .375rem 0 .25rem;text-indent:.125rem;grid-gap:.125rem;gap:.125rem}[tuiButtonNew][data-size=xs] tui-svg{width:1rem}[tuiButtonNew][data-size=s]{--t-size: var(--tui-height-s);--t-radius: var(--tui-radius-s);font:var(--tui-font-text-s);padding:0 .625rem 0 .5rem;text-indent:.125rem;grid-gap:.125rem;gap:.125rem}[tuiButtonNew][data-size=s] tui-svg{width:1rem}[tuiButtonNew][data-size=m]{--t-size: var(--tui-height-m);--t-radius: var(--tui-radius-m);font:var(--tui-font-text-m);font-weight:bold;padding:0 1rem 0 .625rem;text-indent:.375rem;grid-gap:.125rem;gap:.125rem}[tuiButtonNew][data-size=l]{--t-size: var(--tui-height-l);--t-radius: var(--tui-radius-l);font:var(--tui-font-text-m);font-weight:bold;padding:0 1.25rem 0 1rem;text-indent:.25rem;grid-gap:.25rem;gap:.25rem}[tuiButtonNew][data-platform=ios],[tuiButtonNew][data-platform=android]{width:100%}[tuiButtonNew][data-platform=ios][data-size=xs],[tuiButtonNew][data-platform=android][data-size=xs],[tuiButtonNew][data-platform=ios][data-size=s],[tuiButtonNew][data-platform=android][data-size=s],[tuiButtonNew][data-platform=ios][data-size=l],[tuiButtonNew][data-platform=android][data-size=l]{--t-radius: 1rem}[tuiButtonNew][data-platform=ios][data-size=m],[tuiButtonNew][data-platform=android][data-size=m]{--t-radius: .75rem}[tuiButtonNew] *{text-indent:0}[tuiButtonNew]:disabled:not(._loading):not([data-platform=\"web\"]){background:var(--tui-clear);color:var(--tui-clear-active);opacity:1}[tuiButtonNew]:disabled:not(._loading):not([data-platform=\"web\"])[data-appearance=flat]{background:transparent}[tuiButtonNew] [tuiIconRight]{width:1rem;order:999;-webkit-margin-start:.125rem;margin-inline-start:.125rem;-webkit-margin-end:-.125rem;margin-inline-end:-.125rem}[tuiButtonNew][data-size=m] [tuiIconRight]{-webkit-margin-start:.375rem;margin-inline-start:.375rem}[tuiButtonNew][data-size=l] [tuiIconRight]{-webkit-margin-start:.25rem;margin-inline-start:.25rem;-webkit-margin-end:-.25rem;margin-inline-end:-.25rem}[tuiIconButton][tuiButtonNew]{width:var(--t-size);font-size:0;padding:0;text-indent:0;grid-gap:0;gap:0}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
36
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonComponent, decorators: [{
|
|
37
|
+
type: i0.Component,
|
|
38
|
+
args: [{
|
|
39
|
+
template: '',
|
|
40
|
+
styleUrls: ['./button.style.less'],
|
|
41
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
42
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
43
|
+
}]
|
|
44
|
+
}] });
|
|
45
|
+
|
|
46
|
+
var TuiButtonDirective = /** @class */ (function () {
|
|
47
|
+
function TuiButtonDirective(platform, mode$, directiveStyles) {
|
|
48
|
+
this.platform = platform;
|
|
49
|
+
this.mode$ = mode$;
|
|
50
|
+
this.size = 'l';
|
|
51
|
+
this.appearance = 'primary';
|
|
52
|
+
directiveStyles.addComponent(TuiButtonComponent);
|
|
53
|
+
}
|
|
54
|
+
return TuiButtonDirective;
|
|
55
|
+
}());
|
|
56
|
+
TuiButtonDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonDirective, deps: [{ token: i2.TUI_PLATFORM }, { token: core.TUI_MODE }, { token: i2.TuiDirectiveStylesService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
57
|
+
TuiButtonDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiButtonDirective, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: { size: "size", appearance: "appearance" }, host: { attributes: { "tuiButtonNew": "", "tuiWrapper": "" }, listeners: { "$.data-mode.attr": "mode$" }, properties: { "attr.data-size": "size", "attr.data-appearance": "appearance", "attr.data-platform": "platform" } }, providers: [core.MODE_PROVIDER], ngImport: i0__namespace });
|
|
58
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonDirective, decorators: [{
|
|
59
|
+
type: i0.Directive,
|
|
60
|
+
args: [{
|
|
61
|
+
selector: 'a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]',
|
|
62
|
+
providers: [core.MODE_PROVIDER],
|
|
63
|
+
host: {
|
|
64
|
+
tuiButtonNew: '',
|
|
65
|
+
tuiWrapper: '',
|
|
66
|
+
'[attr.data-size]': 'size',
|
|
67
|
+
'[attr.data-appearance]': 'appearance',
|
|
68
|
+
'[attr.data-platform]': 'platform',
|
|
69
|
+
'($.data-mode.attr)': 'mode$',
|
|
70
|
+
},
|
|
71
|
+
}]
|
|
72
|
+
}], ctorParameters: function () {
|
|
73
|
+
return [{ type: undefined, decorators: [{
|
|
74
|
+
type: i0.Inject,
|
|
75
|
+
args: [i2.TUI_PLATFORM]
|
|
76
|
+
}] }, { type: i1__namespace.Observable, decorators: [{
|
|
77
|
+
type: i0.Inject,
|
|
78
|
+
args: [core.TUI_MODE]
|
|
79
|
+
}] }, { type: i2__namespace.TuiDirectiveStylesService, decorators: [{
|
|
80
|
+
type: i0.Inject,
|
|
81
|
+
args: [i2.TuiDirectiveStylesService]
|
|
82
|
+
}] }];
|
|
83
|
+
}, propDecorators: { size: [{
|
|
84
|
+
type: i0.Input
|
|
85
|
+
}], appearance: [{
|
|
86
|
+
type: i0.Input
|
|
87
|
+
}] } });
|
|
88
|
+
|
|
89
|
+
var TuiButtonModule = /** @class */ (function () {
|
|
90
|
+
function TuiButtonModule() {
|
|
91
|
+
}
|
|
92
|
+
return TuiButtonModule;
|
|
93
|
+
}());
|
|
94
|
+
TuiButtonModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
95
|
+
TuiButtonModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonModule, declarations: [TuiButtonDirective, TuiButtonComponent], exports: [TuiButtonDirective] });
|
|
96
|
+
TuiButtonModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonModule });
|
|
97
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonModule, decorators: [{
|
|
98
|
+
type: i0.NgModule,
|
|
99
|
+
args: [{
|
|
100
|
+
declarations: [TuiButtonDirective, TuiButtonComponent],
|
|
101
|
+
exports: [TuiButtonDirective],
|
|
102
|
+
}]
|
|
103
|
+
}] });
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Generated bundle index. Do not edit.
|
|
107
|
+
*/
|
|
108
|
+
|
|
109
|
+
exports.TuiButtonComponent = TuiButtonComponent;
|
|
110
|
+
exports.TuiButtonDirective = TuiButtonDirective;
|
|
111
|
+
exports.TuiButtonModule = TuiButtonModule;
|
|
112
|
+
|
|
113
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
114
|
+
|
|
115
|
+
}));
|
|
116
|
+
//# sourceMappingURL=taiga-ui-experimental-components-button.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-button.umd.js","sources":["../../../projects/experimental/components/button/button.component.ts","../../../projects/experimental/components/button/button.directive.ts","../../../projects/experimental/components/button/button.module.ts","../../../projects/experimental/components/button/taiga-ui-experimental-components-button.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n template: '',\n styleUrls: ['./button.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiButtonComponent {}\n","import {Directive, Inject, Input} from '@angular/core';\nimport {TUI_PLATFORM, TuiDirectiveStylesService, TuiPlatform} from '@taiga-ui/cdk';\nimport {\n MODE_PROVIDER,\n TUI_MODE,\n TuiAppearance,\n TuiBrightness,\n TuiSizeL,\n TuiSizeXS,\n} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\n\nimport {TuiButtonComponent} from './button.component';\n\n@Directive({\n selector: 'a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]',\n providers: [MODE_PROVIDER],\n host: {\n tuiButtonNew: '',\n tuiWrapper: '',\n '[attr.data-size]': 'size',\n '[attr.data-appearance]': 'appearance',\n '[attr.data-platform]': 'platform',\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiButtonDirective {\n @Input()\n size: TuiSizeL | TuiSizeXS = 'l';\n\n @Input()\n appearance: string | keyof Record<TuiAppearance, string> = 'primary';\n\n constructor(\n @Inject(TUI_PLATFORM) readonly platform: TuiPlatform,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TuiDirectiveStylesService) directiveStyles: TuiDirectiveStylesService,\n ) {\n directiveStyles.addComponent(TuiButtonComponent);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiButtonComponent} from './button.component';\nimport {TuiButtonDirective} from './button.directive';\n\n@NgModule({\n declarations: [TuiButtonDirective, TuiButtonComponent],\n exports: [TuiButtonDirective],\n})\nexport class TuiButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i0","Component","ChangeDetectionStrategy","ViewEncapsulation","TUI_PLATFORM","TUI_MODE","TuiDirectiveStylesService","MODE_PROVIDER","Directive","Inject","Input","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,YAAA,kBAAA,kBAAA,YAAA;QAAA,IAAA,SAAA,kBAAA,GAAA;;;;8IAAa,kBAAk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