@taiga-ui/experimental 3.47.0 → 3.48.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.umd.js +22 -13
- package/bundles/taiga-ui-experimental-components-avatar.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-badge.umd.js +23 -6
- package/bundles/taiga-ui-experimental-components-badge.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-button.umd.js +59 -25
- package/bundles/taiga-ui-experimental-components-button.umd.js.map +1 -1
- package/components/avatar/avatar.component.d.ts +4 -4
- package/components/avatar/avatar.options.d.ts +9 -0
- package/components/avatar/index.d.ts +1 -0
- package/components/badge/badge.component.d.ts +6 -5
- package/components/badge/badge.options.d.ts +11 -0
- package/components/badge/index.d.ts +1 -0
- package/components/button/button.component.d.ts +9 -5
- package/components/button/button.directive.d.ts +6 -4
- package/components/button/button.options.d.ts +9 -0
- package/components/button/index.d.ts +1 -0
- package/esm2015/components/avatar/avatar.component.js +12 -10
- package/esm2015/components/avatar/avatar.options.js +10 -0
- package/esm2015/components/avatar/index.js +2 -1
- package/esm2015/components/badge/badge.component.js +13 -8
- package/esm2015/components/badge/badge.options.js +11 -0
- package/esm2015/components/badge/index.js +2 -1
- package/esm2015/components/button/button.component.js +25 -11
- package/esm2015/components/button/button.directive.js +12 -7
- package/esm2015/components/button/button.options.js +10 -0
- package/esm2015/components/button/index.js +2 -1
- package/fesm2015/taiga-ui-experimental-components-avatar.js +21 -11
- package/fesm2015/taiga-ui-experimental-components-avatar.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-badge.js +22 -8
- package/fesm2015/taiga-ui-experimental-components-badge.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-button.js +43 -18
- package/fesm2015/taiga-ui-experimental-components-button.js.map +1 -1
- package/package.json +4 -4
|
@@ -27,20 +27,23 @@
|
|
|
27
27
|
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
28
28
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
29
29
|
|
|
30
|
+
var TUI_AVATAR_DEFAULT_OPTIONS = {
|
|
31
|
+
round: true,
|
|
32
|
+
size: "m",
|
|
33
|
+
};
|
|
34
|
+
var TUI_AVATAR_OPTIONS = cdk.tuiCreateToken(TUI_AVATAR_DEFAULT_OPTIONS);
|
|
35
|
+
function tuiAvatarOptionsProvider(options) {
|
|
36
|
+
return cdk.tuiProvideOptions(TUI_AVATAR_OPTIONS, options, TUI_AVATAR_DEFAULT_OPTIONS);
|
|
37
|
+
}
|
|
38
|
+
|
|
30
39
|
var TuiAvatarComponent = /** @class */ (function () {
|
|
31
|
-
function TuiAvatarComponent(platform) {
|
|
40
|
+
function TuiAvatarComponent(options, platform) {
|
|
41
|
+
this.options = options;
|
|
32
42
|
this.platform = platform;
|
|
33
|
-
this.size =
|
|
34
|
-
this.round =
|
|
43
|
+
this.size = this.options.size;
|
|
44
|
+
this.round = this.options.round;
|
|
35
45
|
this.src = null;
|
|
36
46
|
}
|
|
37
|
-
Object.defineProperty(TuiAvatarComponent.prototype, "img", {
|
|
38
|
-
get: function () {
|
|
39
|
-
return this.type === 'img';
|
|
40
|
-
},
|
|
41
|
-
enumerable: false,
|
|
42
|
-
configurable: true
|
|
43
|
-
});
|
|
44
47
|
Object.defineProperty(TuiAvatarComponent.prototype, "value", {
|
|
45
48
|
get: function () {
|
|
46
49
|
return this.src || '';
|
|
@@ -50,7 +53,7 @@
|
|
|
50
53
|
});
|
|
51
54
|
Object.defineProperty(TuiAvatarComponent.prototype, "type", {
|
|
52
55
|
get: function () {
|
|
53
|
-
if (
|
|
56
|
+
if (this.value && !cdk.tuiIsString(this.value)) {
|
|
54
57
|
return 'img';
|
|
55
58
|
}
|
|
56
59
|
if (this.value.startsWith('tuiIcon') || this.value.endsWith('.svg')) {
|
|
@@ -66,8 +69,8 @@
|
|
|
66
69
|
});
|
|
67
70
|
return TuiAvatarComponent;
|
|
68
71
|
}());
|
|
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
|
|
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 });
|
|
71
74
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAvatarComponent, decorators: [{
|
|
72
75
|
type: i0.Component,
|
|
73
76
|
args: [{
|
|
@@ -84,6 +87,9 @@
|
|
|
84
87
|
}]
|
|
85
88
|
}], ctorParameters: function () {
|
|
86
89
|
return [{ type: undefined, decorators: [{
|
|
90
|
+
type: i0.Inject,
|
|
91
|
+
args: [TUI_AVATAR_OPTIONS]
|
|
92
|
+
}] }, { type: undefined, decorators: [{
|
|
87
93
|
type: i0.Inject,
|
|
88
94
|
args: [cdk.TUI_PLATFORM]
|
|
89
95
|
}] }];
|
|
@@ -116,8 +122,11 @@
|
|
|
116
122
|
* Generated bundle index. Do not edit.
|
|
117
123
|
*/
|
|
118
124
|
|
|
125
|
+
exports.TUI_AVATAR_DEFAULT_OPTIONS = TUI_AVATAR_DEFAULT_OPTIONS;
|
|
126
|
+
exports.TUI_AVATAR_OPTIONS = TUI_AVATAR_OPTIONS;
|
|
119
127
|
exports.TuiAvatarComponent = TuiAvatarComponent;
|
|
120
128
|
exports.TuiAvatarModule = TuiAvatarModule;
|
|
129
|
+
exports.tuiAvatarOptionsProvider = tuiAvatarOptionsProvider;
|
|
121
130
|
|
|
122
131
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
123
132
|
|
|
@@ -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, Inject, Input} from '@angular/core';\nimport {SafeResourceUrl} from '@angular/platform-browser';\nimport {TUI_PLATFORM, tuiIsString, TuiPlatform} from '@taiga-ui/cdk';\nimport {
|
|
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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,eAAe,YAJf,CAACQ,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;;;;;;;;;;;;;;"}
|
|
@@ -25,17 +25,28 @@
|
|
|
25
25
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
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
|
+
}
|
|
37
|
+
|
|
28
38
|
var TuiBadgeComponent = /** @class */ (function () {
|
|
29
|
-
function TuiBadgeComponent(mode$, platform) {
|
|
39
|
+
function TuiBadgeComponent(options, mode$, platform) {
|
|
40
|
+
this.options = options;
|
|
30
41
|
this.mode$ = mode$;
|
|
31
42
|
this.platform = platform;
|
|
32
|
-
this.size =
|
|
33
|
-
this.appearance =
|
|
34
|
-
this.hoverable =
|
|
43
|
+
this.size = this.options.size;
|
|
44
|
+
this.appearance = this.options.appearance;
|
|
45
|
+
this.hoverable = this.options.hoverable;
|
|
35
46
|
}
|
|
36
47
|
return TuiBadgeComponent;
|
|
37
48
|
}());
|
|
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 });
|
|
49
|
+
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 });
|
|
39
50
|
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{--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{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;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"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
40
51
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBadgeComponent, decorators: [{
|
|
41
52
|
type: i0.Component,
|
|
@@ -54,7 +65,10 @@
|
|
|
54
65
|
},
|
|
55
66
|
}]
|
|
56
67
|
}], ctorParameters: function () {
|
|
57
|
-
return [{ type:
|
|
68
|
+
return [{ type: undefined, decorators: [{
|
|
69
|
+
type: i0.Inject,
|
|
70
|
+
args: [TUI_BADGE_OPTIONS]
|
|
71
|
+
}] }, { type: i1__namespace.Observable, decorators: [{
|
|
58
72
|
type: i0.Inject,
|
|
59
73
|
args: [core.TUI_MODE]
|
|
60
74
|
}] }, { type: undefined, decorators: [{
|
|
@@ -89,8 +103,11 @@
|
|
|
89
103
|
* Generated bundle index. Do not edit.
|
|
90
104
|
*/
|
|
91
105
|
|
|
106
|
+
exports.TUI_BADGE_DEFAULT_OPTIONS = TUI_BADGE_DEFAULT_OPTIONS;
|
|
107
|
+
exports.TUI_BADGE_OPTIONS = TUI_BADGE_OPTIONS;
|
|
92
108
|
exports.TuiBadgeComponent = TuiBadgeComponent;
|
|
93
109
|
exports.TuiBadgeModule = TuiBadgeModule;
|
|
110
|
+
exports.tuiBadgeOptionsProvider = tuiBadgeOptionsProvider;
|
|
94
111
|
|
|
95
112
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
96
113
|
|
|
@@ -1 +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 {
|
|
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 changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './badge.template.html',\n styleUrls: ['./badge.style.less'],\n providers: [MODE_PROVIDER],\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 = this.options.size;\n\n @Input()\n appearance = this.options.appearance;\n\n @Input()\n hoverable = this.options.hoverable;\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,uB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AAA,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,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@taiga-ui/experimental/components/button', ['exports', '@angular/core', '@taiga-ui/
|
|
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.i1, global.ng.common, global.
|
|
5
|
-
})(this, (function (exports, i0,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@angular/common'), require('rxjs')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/experimental/components/button', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/core', '@angular/common', '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.i1, global.ng.common, global.rxjs));
|
|
5
|
+
})(this, (function (exports, i0, i2, i1, i2$1, i1$1) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -23,18 +23,27 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
+
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2);
|
|
26
27
|
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
27
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
28
|
-
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
28
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2$1);
|
|
29
29
|
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
30
30
|
|
|
31
|
+
var TUI_BUTTON_DEFAULT_OPTIONS = {
|
|
32
|
+
size: "l",
|
|
33
|
+
appearance: "primary",
|
|
34
|
+
};
|
|
35
|
+
var TUI_BUTTON_OPTIONS = i2.tuiCreateToken(TUI_BUTTON_DEFAULT_OPTIONS);
|
|
36
|
+
function tuiButtonOptionsProvider(options) {
|
|
37
|
+
return i2.tuiProvideOptions(TUI_BUTTON_OPTIONS, options, TUI_BUTTON_DEFAULT_OPTIONS);
|
|
38
|
+
}
|
|
39
|
+
|
|
31
40
|
var TuiButtonComponent = /** @class */ (function () {
|
|
32
|
-
function TuiButtonComponent() {
|
|
33
|
-
this.
|
|
41
|
+
function TuiButtonComponent(options) {
|
|
42
|
+
this.options = options;
|
|
43
|
+
this.size = this.options.size;
|
|
34
44
|
this.loading = false;
|
|
35
45
|
this.iconLeft = '';
|
|
36
46
|
this.iconRight = '';
|
|
37
|
-
this.disabled = false;
|
|
38
47
|
}
|
|
39
48
|
Object.defineProperty(TuiButtonComponent.prototype, "loaderSize", {
|
|
40
49
|
get: function () {
|
|
@@ -43,10 +52,22 @@
|
|
|
43
52
|
enumerable: false,
|
|
44
53
|
configurable: true
|
|
45
54
|
});
|
|
55
|
+
Object.defineProperty(TuiButtonComponent.prototype, "label", {
|
|
56
|
+
get: function () {
|
|
57
|
+
return i2.tuiIsString(this.loading) ? this.loading : '';
|
|
58
|
+
},
|
|
59
|
+
enumerable: false,
|
|
60
|
+
configurable: true
|
|
61
|
+
});
|
|
62
|
+
TuiButtonComponent.prototype.onClick = function (event) {
|
|
63
|
+
if (this.loading) {
|
|
64
|
+
event.stopPropagation();
|
|
65
|
+
}
|
|
66
|
+
};
|
|
46
67
|
return TuiButtonComponent;
|
|
47
68
|
}());
|
|
48
|
-
TuiButtonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
49
|
-
TuiButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiButtonComponent, selector: "[tuiButton][loading],[tuiIconButton][loading],[tuiButton][iconLeft],[tuiButton][iconRight],[tuiIconButton][iconLeft]", inputs: { size: "size", loading: "loading", iconLeft: "iconLeft", iconRight: "iconRight",
|
|
69
|
+
TuiButtonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonComponent, deps: [{ token: TUI_BUTTON_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
70
|
+
TuiButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiButtonComponent, selector: "[tuiButton][loading],[tuiIconButton][loading],[tuiButton][iconLeft],[tuiButton][iconRight],[tuiIconButton][iconLeft]", inputs: { size: "size", loading: "loading", iconLeft: "iconLeft", iconRight: "iconRight" }, host: { listeners: { "click.capture": "onClick($event)" }, properties: { "attr.aria-disabled": "loading", "class._loading": "loading" } }, ngImport: i0__namespace, template: "<tui-svg\n *ngIf=\"iconLeft\"\n [src]=\"iconLeft\"\n></tui-svg>\n<ng-content></ng-content>\n<tui-svg\n *ngIf=\"iconRight\"\n class=\"t-icon\"\n [src]=\"iconRight\"\n></tui-svg>\n<tui-loader\n aria-live=\"polite\"\n role=\"status\"\n class=\"t-loader\"\n [inheritColor]=\"true\"\n [showLoader]=\"!!loading\"\n [size]=\"loaderSize\"\n [textContent]=\"label\"\n></tui-loader>\n", components: [{ type: i1__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { 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 });
|
|
50
71
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonComponent, decorators: [{
|
|
51
72
|
type: i0.Component,
|
|
52
73
|
args: [{
|
|
@@ -54,11 +75,16 @@
|
|
|
54
75
|
templateUrl: './button.template.html',
|
|
55
76
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
56
77
|
host: {
|
|
57
|
-
'[disabled]': '
|
|
78
|
+
'[attr.aria-disabled]': 'loading',
|
|
58
79
|
'[class._loading]': 'loading',
|
|
59
80
|
},
|
|
60
81
|
}]
|
|
61
|
-
}],
|
|
82
|
+
}], ctorParameters: function () {
|
|
83
|
+
return [{ type: undefined, decorators: [{
|
|
84
|
+
type: i0.Inject,
|
|
85
|
+
args: [TUI_BUTTON_OPTIONS]
|
|
86
|
+
}] }];
|
|
87
|
+
}, propDecorators: { size: [{
|
|
62
88
|
type: i0.Input
|
|
63
89
|
}], loading: [{
|
|
64
90
|
type: i0.Input
|
|
@@ -66,8 +92,9 @@
|
|
|
66
92
|
type: i0.Input
|
|
67
93
|
}], iconRight: [{
|
|
68
94
|
type: i0.Input
|
|
69
|
-
}],
|
|
70
|
-
type: i0.
|
|
95
|
+
}], onClick: [{
|
|
96
|
+
type: i0.HostListener,
|
|
97
|
+
args: ['click.capture', ['$event']]
|
|
71
98
|
}] } });
|
|
72
99
|
|
|
73
100
|
var TuiButtonStylesComponent = /** @class */ (function () {
|
|
@@ -76,7 +103,7 @@
|
|
|
76
103
|
return TuiButtonStylesComponent;
|
|
77
104
|
}());
|
|
78
105
|
TuiButtonStylesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonStylesComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
79
|
-
TuiButtonStylesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiButtonStylesComponent, 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
|
|
106
|
+
TuiButtonStylesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiButtonStylesComponent, 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:unset;white-space:nowrap;border-radius:var(--t-radius);overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;outline:none;cursor:pointer}[tuiButtonNew]>.t-icon{width:1rem;-webkit-margin-start:.125rem;margin-inline-start:.125rem;-webkit-margin-end:-.125rem;margin-inline-end:-.125rem}[tuiButtonNew]>.t-loader{position:absolute;top:0;left:0;width:100%;height:100%}[tuiButtonNew]>.t-loader .t-text{position:absolute}[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=m]>.t-icon{-webkit-margin-start:.375rem;margin-inline-start:.375rem}[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-size=l]>.t-icon{-webkit-margin-start:.25rem;margin-inline-start:.25rem;-webkit-margin-end:-.25rem;margin-inline-end:-.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]._loading{--tui-disabled-opacity: 1;-webkit-text-fill-color:transparent}[tuiButtonNew]._loading>*{opacity:0}[tuiButtonNew]._loading>.t-loader{opacity:1}[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}[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 });
|
|
80
107
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonStylesComponent, decorators: [{
|
|
81
108
|
type: i0.Component,
|
|
82
109
|
args: [{
|
|
@@ -87,16 +114,17 @@
|
|
|
87
114
|
}]
|
|
88
115
|
}] });
|
|
89
116
|
var TuiButtonDirective = /** @class */ (function () {
|
|
90
|
-
function TuiButtonDirective(platform, mode$, directiveStyles) {
|
|
117
|
+
function TuiButtonDirective(options, platform, mode$, directiveStyles) {
|
|
118
|
+
this.options = options;
|
|
91
119
|
this.platform = platform;
|
|
92
120
|
this.mode$ = mode$;
|
|
93
|
-
this.size =
|
|
94
|
-
this.appearance =
|
|
121
|
+
this.size = this.options.size;
|
|
122
|
+
this.appearance = this.options.appearance;
|
|
95
123
|
directiveStyles.addComponent(TuiButtonStylesComponent);
|
|
96
124
|
}
|
|
97
125
|
return TuiButtonDirective;
|
|
98
126
|
}());
|
|
99
|
-
TuiButtonDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonDirective, deps: [{ token: i2
|
|
127
|
+
TuiButtonDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonDirective, deps: [{ token: TUI_BUTTON_OPTIONS }, { token: i2.TUI_PLATFORM }, { token: i1.TUI_MODE }, { token: i2.TuiDirectiveStylesService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
100
128
|
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: [i1.MODE_PROVIDER], ngImport: i0__namespace });
|
|
101
129
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonDirective, decorators: [{
|
|
102
130
|
type: i0.Directive,
|
|
@@ -115,13 +143,16 @@
|
|
|
115
143
|
}], ctorParameters: function () {
|
|
116
144
|
return [{ type: undefined, decorators: [{
|
|
117
145
|
type: i0.Inject,
|
|
118
|
-
args: [
|
|
146
|
+
args: [TUI_BUTTON_OPTIONS]
|
|
147
|
+
}] }, { type: undefined, decorators: [{
|
|
148
|
+
type: i0.Inject,
|
|
149
|
+
args: [i2.TUI_PLATFORM]
|
|
119
150
|
}] }, { type: i1__namespace$1.Observable, decorators: [{
|
|
120
151
|
type: i0.Inject,
|
|
121
152
|
args: [i1.TUI_MODE]
|
|
122
153
|
}] }, { type: i2__namespace$1.TuiDirectiveStylesService, decorators: [{
|
|
123
154
|
type: i0.Inject,
|
|
124
|
-
args: [i2
|
|
155
|
+
args: [i2.TuiDirectiveStylesService]
|
|
125
156
|
}] }];
|
|
126
157
|
}, propDecorators: { size: [{
|
|
127
158
|
type: i0.Input
|
|
@@ -135,12 +166,12 @@
|
|
|
135
166
|
return TuiButtonModule;
|
|
136
167
|
}());
|
|
137
168
|
TuiButtonModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
138
|
-
TuiButtonModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonModule, declarations: [TuiButtonComponent, TuiButtonDirective, TuiButtonStylesComponent], imports: [i2.CommonModule, i1.TuiSvgModule, i1.TuiLoaderModule], exports: [TuiButtonComponent, TuiButtonDirective] });
|
|
139
|
-
TuiButtonModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonModule, imports: [[i2.CommonModule, i1.TuiSvgModule, i1.TuiLoaderModule]] });
|
|
169
|
+
TuiButtonModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonModule, declarations: [TuiButtonComponent, TuiButtonDirective, TuiButtonStylesComponent], imports: [i2$1.CommonModule, i1.TuiSvgModule, i1.TuiLoaderModule], exports: [TuiButtonComponent, TuiButtonDirective] });
|
|
170
|
+
TuiButtonModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonModule, imports: [[i2$1.CommonModule, i1.TuiSvgModule, i1.TuiLoaderModule]] });
|
|
140
171
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonModule, decorators: [{
|
|
141
172
|
type: i0.NgModule,
|
|
142
173
|
args: [{
|
|
143
|
-
imports: [i2.CommonModule, i1.TuiSvgModule, i1.TuiLoaderModule],
|
|
174
|
+
imports: [i2$1.CommonModule, i1.TuiSvgModule, i1.TuiLoaderModule],
|
|
144
175
|
declarations: [TuiButtonComponent, TuiButtonDirective, TuiButtonStylesComponent],
|
|
145
176
|
exports: [TuiButtonComponent, TuiButtonDirective],
|
|
146
177
|
}]
|
|
@@ -150,10 +181,13 @@
|
|
|
150
181
|
* Generated bundle index. Do not edit.
|
|
151
182
|
*/
|
|
152
183
|
|
|
184
|
+
exports.TUI_BUTTON_DEFAULT_OPTIONS = TUI_BUTTON_DEFAULT_OPTIONS;
|
|
185
|
+
exports.TUI_BUTTON_OPTIONS = TUI_BUTTON_OPTIONS;
|
|
153
186
|
exports.TuiButtonComponent = TuiButtonComponent;
|
|
154
187
|
exports.TuiButtonDirective = TuiButtonDirective;
|
|
155
188
|
exports.TuiButtonModule = TuiButtonModule;
|
|
156
189
|
exports.TuiButtonStylesComponent = TuiButtonStylesComponent;
|
|
190
|
+
exports.tuiButtonOptionsProvider = tuiButtonOptionsProvider;
|
|
157
191
|
|
|
158
192
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
159
193
|
|
|
@@ -1 +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.template.html","../../../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, Input} from '@angular/core';\nimport {tuiSizeBigger, TuiSizeL, TuiSizeS, TuiSizeXS} from '@taiga-ui/core';\n\n@Component({\n selector:\n '[tuiButton][loading],[tuiIconButton][loading],[tuiButton][iconLeft],[tuiButton][iconRight],[tuiIconButton][iconLeft]',\n templateUrl: './button.template.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[disabled]': 'disabled || loading',\n '[class._loading]': 'loading',\n },\n})\nexport class TuiButtonComponent {\n @Input()\n size: TuiSizeL | TuiSizeXS = 'l';\n\n @Input()\n loading = false;\n\n @Input()\n iconLeft = '';\n\n @Input()\n iconRight = '';\n\n @Input()\n disabled = false;\n\n get loaderSize(): TuiSizeS {\n return tuiSizeBigger(this.size) ? 'm' : 's';\n }\n}\n","<tui-svg\n *ngIf=\"iconLeft\"\n [src]=\"iconLeft\"\n></tui-svg>\n<ng-content></ng-content>\n<tui-svg\n *ngIf=\"iconRight\"\n class=\"t-icon\"\n [src]=\"iconRight\"\n></tui-svg>\n<tui-loader\n *ngIf=\"loading\"\n class=\"t-loader\"\n [inheritColor]=\"true\"\n [size]=\"loaderSize\"\n></tui-loader>\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n Inject,\n Input,\n ViewEncapsulation,\n} 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\n@Component({\n template: '',\n styleUrls: ['./button.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiButtonStylesComponent {}\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(TuiButtonStylesComponent);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLoaderModule, TuiSvgModule} from '@taiga-ui/core';\n\nimport {TuiButtonComponent} from './button.component';\nimport {TuiButtonDirective, TuiButtonStylesComponent} from './button.directive';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule, TuiLoaderModule],\n declarations: [TuiButtonComponent, TuiButtonDirective, TuiButtonStylesComponent],\n exports: [TuiButtonComponent, TuiButtonDirective],\n})\nexport class TuiButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["tuiSizeBigger","i0","i1","i2","Component","ChangeDetectionStrategy","Input","ViewEncapsulation","TUI_PLATFORM","TUI_MODE","TuiDirectiveStylesService","MODE_PROVIDER","Directive","Inject","CommonModule","TuiSvgModule","TuiLoaderModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,QAAA,kBAAA,kBAAA,YAAA;IAVA,IAAA,SAAA,kBAAA,GAAA;IAYI,QAAA,IAAI,CAAA,IAAA,GAAyB,GAAG,CAAC;IAGjC,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;IAGhB,QAAA,IAAQ,CAAA,QAAA,GAAG,EAAE,CAAC;IAGd,QAAA,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;IAGf,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;SAKpB;IAHG,IAAA,MAAA,CAAA,cAAA,CAAI,kBAAU,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;;;0IAlBQ,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAAC,aAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;IAAlB,kBAAA,CAAA,IAAA,GAAAA,aAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,kBAAkB,mXCb/B,uUAgBA,EAAA,UAAA,EAAA,CAAA,EAAA,IAA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,IAAA,GAAAA,aAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAAA,aAAA,EAAA,IAAA,EAAA,eAAe,EAHT,YAAA,EAAA,CAAA,kBAAkB,EAAE,kBAAkB,EAAE,wBAAwB,CAAA,EAAA,OAAA,EAAA,CADrEa,eAAY,EAAEC,eAAY,EAAEC,kBAAe,CAE3C,EAAA,OAAA,EAAA,CAAA,kBAAkB,EAAE,kBAAkB,CAAA,EAAA,CAAA,CAAA;IAEvC,eAAA,CAAA,IAAA,GAAAf,aAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAAA,aAAA,EAAA,IAAA,EAAA,eAAe,YAJf,CAACa,eAAY,EAAEC,eAAY,EAAEC,kBAAe,CAAC,CAAA,EAAA,CAAA,CAAA;sHAI7C,eAAe,EAAA,UAAA,EAAA,CAAA;sBAL3BC,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;IACN,oBAAA,OAAO,EAAE,CAACH,eAAY,EAAEC,eAAY,EAAEC,kBAAe,CAAC;IACtD,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,wBAAwB,CAAC;IAChF,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;qBACpD,CAAA;;;ICXD;;IAEG;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-button.umd.js","sources":["../../../projects/experimental/components/button/button.options.ts","../../../projects/experimental/components/button/button.component.ts","../../../projects/experimental/components/button/button.template.html","../../../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 {Provider} from '@angular/core';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk';\nimport {TuiSizeXL, TuiSizeXS} from '@taiga-ui/core';\n\nexport interface TuiButtonOptions {\n readonly appearance: string;\n readonly size: TuiSizeXL | TuiSizeXS;\n}\n\nexport const TUI_BUTTON_DEFAULT_OPTIONS: TuiButtonOptions = {\n size: `l`,\n appearance: `primary`,\n};\n\nexport const TUI_BUTTON_OPTIONS = tuiCreateToken(TUI_BUTTON_DEFAULT_OPTIONS);\n\nexport function tuiButtonOptionsProvider(options: Partial<TuiButtonOptions>): Provider {\n return tuiProvideOptions(TUI_BUTTON_OPTIONS, options, TUI_BUTTON_DEFAULT_OPTIONS);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n HostListener,\n Inject,\n Input,\n} from '@angular/core';\nimport {tuiIsString} from '@taiga-ui/cdk';\nimport {tuiSizeBigger, TuiSizeS} from '@taiga-ui/core';\n\nimport {TUI_BUTTON_OPTIONS, TuiButtonOptions} from './button.options';\n\n@Component({\n selector:\n '[tuiButton][loading],[tuiIconButton][loading],[tuiButton][iconLeft],[tuiButton][iconRight],[tuiIconButton][iconLeft]',\n templateUrl: './button.template.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.aria-disabled]': 'loading',\n '[class._loading]': 'loading',\n },\n})\nexport class TuiButtonComponent {\n @Input()\n size = this.options.size;\n\n @Input()\n loading: boolean | string | null = false;\n\n @Input()\n iconLeft = '';\n\n @Input()\n iconRight = '';\n\n constructor(@Inject(TUI_BUTTON_OPTIONS) private readonly options: TuiButtonOptions) {}\n\n get loaderSize(): TuiSizeS {\n return tuiSizeBigger(this.size) ? 'm' : 's';\n }\n\n get label(): string {\n return tuiIsString(this.loading) ? this.loading : '';\n }\n\n @HostListener('click.capture', ['$event'])\n onClick(event: MouseEvent): void {\n if (this.loading) {\n event.stopPropagation();\n }\n }\n}\n","<tui-svg\n *ngIf=\"iconLeft\"\n [src]=\"iconLeft\"\n></tui-svg>\n<ng-content></ng-content>\n<tui-svg\n *ngIf=\"iconRight\"\n class=\"t-icon\"\n [src]=\"iconRight\"\n></tui-svg>\n<tui-loader\n aria-live=\"polite\"\n role=\"status\"\n class=\"t-loader\"\n [inheritColor]=\"true\"\n [showLoader]=\"!!loading\"\n [size]=\"loaderSize\"\n [textContent]=\"label\"\n></tui-loader>\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n Inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TUI_PLATFORM, TuiDirectiveStylesService, TuiPlatform} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER, TUI_MODE, TuiBrightness} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\n\nimport {TUI_BUTTON_OPTIONS, TuiButtonOptions} from './button.options';\n\n@Component({\n template: '',\n styleUrls: ['./button.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiButtonStylesComponent {}\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 = this.options.size;\n\n @Input()\n appearance = this.options.appearance;\n\n constructor(\n @Inject(TUI_BUTTON_OPTIONS) private readonly options: TuiButtonOptions,\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(TuiButtonStylesComponent);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLoaderModule, TuiSvgModule} from '@taiga-ui/core';\n\nimport {TuiButtonComponent} from './button.component';\nimport {TuiButtonDirective, TuiButtonStylesComponent} from './button.directive';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule, TuiLoaderModule],\n declarations: [TuiButtonComponent, TuiButtonDirective, TuiButtonStylesComponent],\n exports: [TuiButtonComponent, TuiButtonDirective],\n})\nexport class TuiButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["tuiCreateToken","tuiProvideOptions","tuiSizeBigger","tuiIsString","i0","i1","i2","Component","ChangeDetectionStrategy","Inject","Input","HostListener","ViewEncapsulation","TUI_PLATFORM","TUI_MODE","TuiDirectiveStylesService","MODE_PROVIDER","Directive","CommonModule","TuiSvgModule","TuiLoaderModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASa,QAAA,0BAA0B,GAAqB;IACxD,IAAA,IAAI,EAAE,GAAG;IACT,IAAA,UAAU,EAAE,SAAS;MACvB;QAEW,kBAAkB,GAAGA,iBAAc,CAAC,0BAA0B,EAAE;IAEvE,SAAU,wBAAwB,CAAC,OAAkC,EAAA;QACvE,OAAOC,oBAAiB,CAAC,kBAAkB,EAAE,OAAO,EAAE,0BAA0B,CAAC,CAAC;IACtF;;ACIA,QAAA,kBAAA,kBAAA,YAAA;IAaI,IAAA,SAAA,kBAAA,CAAyD,OAAyB,EAAA;IAAzB,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAkB;YAXlF,IAAA,CAAA,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;IAGzB,QAAA,IAAO,CAAA,OAAA,GAA4B,KAAK,CAAC;IAGzC,QAAA,IAAQ,CAAA,QAAA,GAAG,EAAE,CAAC;IAGd,QAAA,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;SAEuE;IAEtF,IAAA,MAAA,CAAA,cAAA,CAAI,kBAAU,CAAA,SAAA,EAAA,YAAA,EAAA;IAAd,QAAA,GAAA,EAAA,YAAA;IACI,YAAA,OAAOC,gBAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;aAC/C;;;IAAA,KAAA,CAAA,CAA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EAAE,kBAAkB,EAAE,wBAAwB,CAAA,EAAA,OAAA,EAAA,CADrEc,iBAAY,EAAEC,eAAY,EAAEC,kBAAe,CAE3C,EAAA,OAAA,EAAA,CAAA,kBAAkB,EAAE,kBAAkB,CAAA,EAAA,CAAA,CAAA;IAEvC,eAAA,CAAA,IAAA,GAAAhB,aAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAAA,aAAA,EAAA,IAAA,EAAA,eAAe,YAJf,CAACc,iBAAY,EAAEC,eAAY,EAAEC,kBAAe,CAAC,CAAA,EAAA,CAAA,CAAA;sHAI7C,eAAe,EAAA,UAAA,EAAA,CAAA;sBAL3BC,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;IACN,oBAAA,OAAO,EAAE,CAACH,iBAAY,EAAEC,eAAY,EAAEC,kBAAe,CAAC;IACtD,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,wBAAwB,CAAC;IAChF,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;qBACpD,CAAA;;;ICXD;;IAEG;;;;;;;;;;;;;;;;"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { SafeResourceUrl } from '@angular/platform-browser';
|
|
2
2
|
import { TuiPlatform } from '@taiga-ui/cdk';
|
|
3
|
-
import {
|
|
3
|
+
import { TuiAvatarOptions } from './avatar.options';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class TuiAvatarComponent {
|
|
6
|
+
private readonly options;
|
|
6
7
|
readonly platform: TuiPlatform;
|
|
7
|
-
size:
|
|
8
|
+
size: "m" | "l" | "xl" | "xxl" | "s" | "xs" | "xxs";
|
|
8
9
|
round: boolean;
|
|
9
10
|
src: SafeResourceUrl | string | null;
|
|
10
|
-
constructor(platform: TuiPlatform);
|
|
11
|
-
get img(): boolean;
|
|
11
|
+
constructor(options: TuiAvatarOptions, platform: TuiPlatform);
|
|
12
12
|
get value(): SafeResourceUrl | string;
|
|
13
13
|
get type(): 'content' | 'icon' | 'img' | 'text';
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiAvatarComponent, never>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Provider } from '@angular/core';
|
|
2
|
+
import { TuiSizeXXL, TuiSizeXXS } from '@taiga-ui/core';
|
|
3
|
+
export interface TuiAvatarOptions {
|
|
4
|
+
readonly round: boolean;
|
|
5
|
+
readonly size: TuiSizeXXL | TuiSizeXXS;
|
|
6
|
+
}
|
|
7
|
+
export declare const TUI_AVATAR_DEFAULT_OPTIONS: TuiAvatarOptions;
|
|
8
|
+
export declare const TUI_AVATAR_OPTIONS: import("@angular/core").InjectionToken<TuiAvatarOptions>;
|
|
9
|
+
export declare function tuiAvatarOptionsProvider(options: Partial<TuiAvatarOptions>): Provider;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { TuiPlatform } from '@taiga-ui/cdk';
|
|
2
|
-
import { TuiBrightness
|
|
3
|
-
import { TuiStatus } from '@taiga-ui/kit';
|
|
2
|
+
import { TuiBrightness } from '@taiga-ui/core';
|
|
4
3
|
import { Observable } from 'rxjs';
|
|
4
|
+
import { TuiBadgeOptions } from './badge.options';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class TuiBadgeComponent {
|
|
7
|
+
private readonly options;
|
|
7
8
|
readonly mode$: Observable<TuiBrightness | null>;
|
|
8
9
|
readonly platform: TuiPlatform;
|
|
9
|
-
size:
|
|
10
|
-
appearance: TuiStatus |
|
|
10
|
+
size: "m" | "s" | "l" | "xl";
|
|
11
|
+
appearance: import("@taiga-ui/kit/types").TuiStatus | "accent" | "light";
|
|
11
12
|
hoverable: boolean;
|
|
12
|
-
constructor(mode$: Observable<TuiBrightness | null>, platform: TuiPlatform);
|
|
13
|
+
constructor(options: TuiBadgeOptions, mode$: Observable<TuiBrightness | null>, platform: TuiPlatform);
|
|
13
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiBadgeComponent, never>;
|
|
14
15
|
static ɵcmp: i0.ɵɵComponentDeclaration<TuiBadgeComponent, "tui-badge", never, { "size": "size"; "appearance": "appearance"; "hoverable": "hoverable"; }, {}, never, ["img", "tui-svg", "*"]>;
|
|
15
16
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Provider } from '@angular/core';
|
|
2
|
+
import { TuiSizeS, TuiSizeXL } from '@taiga-ui/core';
|
|
3
|
+
import { TuiStatus } from '@taiga-ui/kit';
|
|
4
|
+
export interface TuiBadgeOptions {
|
|
5
|
+
readonly appearance: TuiStatus | 'accent' | 'light';
|
|
6
|
+
readonly size: TuiSizeS | TuiSizeXL;
|
|
7
|
+
readonly hoverable: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const TUI_BADGE_DEFAULT_OPTIONS: TuiBadgeOptions;
|
|
10
|
+
export declare const TUI_BADGE_OPTIONS: import("@angular/core").InjectionToken<TuiBadgeOptions>;
|
|
11
|
+
export declare function tuiBadgeOptionsProvider(options: Partial<TuiBadgeOptions>): Provider;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TuiSizeS } from '@taiga-ui/core';
|
|
2
|
+
import { TuiButtonOptions } from './button.options';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class TuiButtonComponent {
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
private readonly options;
|
|
6
|
+
size: "m" | "l" | "xl" | "s" | "xs";
|
|
7
|
+
loading: boolean | string | null;
|
|
6
8
|
iconLeft: string;
|
|
7
9
|
iconRight: string;
|
|
8
|
-
|
|
10
|
+
constructor(options: TuiButtonOptions);
|
|
9
11
|
get loaderSize(): TuiSizeS;
|
|
12
|
+
get label(): string;
|
|
13
|
+
onClick(event: MouseEvent): void;
|
|
10
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiButtonComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TuiButtonComponent, "[tuiButton][loading],[tuiIconButton][loading],[tuiButton][iconLeft],[tuiButton][iconRight],[tuiIconButton][iconLeft]", never, { "size": "size"; "loading": "loading"; "iconLeft": "iconLeft"; "iconRight": "iconRight";
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TuiButtonComponent, "[tuiButton][loading],[tuiIconButton][loading],[tuiButton][iconLeft],[tuiButton][iconRight],[tuiIconButton][iconLeft]", never, { "size": "size"; "loading": "loading"; "iconLeft": "iconLeft"; "iconRight": "iconRight"; }, {}, never, ["*"]>;
|
|
12
16
|
}
|