@taiga-ui/experimental 3.54.0 → 3.55.0-canary.3cc37e7
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 +19 -15
- package/bundles/taiga-ui-experimental-components-avatar.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-badge.umd.js +117 -96
- package/bundles/taiga-ui-experimental-components-badge.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-badged-content.umd.js +1 -1
- package/bundles/taiga-ui-experimental-components-badged-content.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-button.umd.js +30 -23
- package/bundles/taiga-ui-experimental-components-button.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-checkbox.umd.js +9 -14
- package/bundles/taiga-ui-experimental-components-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-icon.umd.js +23 -43
- package/bundles/taiga-ui-experimental-components-icon.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-toggle.umd.js +14 -30
- package/bundles/taiga-ui-experimental-components-toggle.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-directives-appearance.umd.js +82 -0
- package/bundles/taiga-ui-experimental-directives-appearance.umd.js.map +1 -0
- package/bundles/taiga-ui-experimental-directives-button-vertical.umd.js +95 -0
- package/bundles/taiga-ui-experimental-directives-button-vertical.umd.js.map +1 -0
- package/bundles/taiga-ui-experimental-directives-card.umd.js +89 -88
- package/bundles/taiga-ui-experimental-directives-card.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-directives-cell.umd.js +1 -1
- package/bundles/taiga-ui-experimental-directives-progress-segmented.umd.js +1 -1
- package/bundles/taiga-ui-experimental-directives-progress-segmented.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-directives-sensitive.umd.js +3 -3
- package/bundles/taiga-ui-experimental-directives-sensitive.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-directives-surface.umd.js +6 -5
- package/bundles/taiga-ui-experimental-directives-surface.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-directives.umd.js +16 -4
- package/bundles/taiga-ui-experimental-directives.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-tokens.umd.js +31 -0
- package/bundles/taiga-ui-experimental-tokens.umd.js.map +1 -0
- package/bundles/taiga-ui-experimental.umd.js +10 -4
- package/bundles/taiga-ui-experimental.umd.js.map +1 -1
- package/components/avatar/avatar.component.d.ts +5 -4
- package/components/avatar/avatar.module.d.ts +2 -2
- package/components/badge/badge.component.d.ts +1 -11
- package/components/badge/badge.directive.d.ts +13 -0
- package/components/badge/badge.module.d.ts +2 -1
- package/components/badge/badge.options.d.ts +2 -3
- package/components/badge/index.d.ts +1 -0
- package/components/button/button.component.d.ts +1 -3
- package/components/button/button.directive.d.ts +6 -3
- package/components/checkbox/checkbox.component.d.ts +5 -6
- package/components/icon/icon.component.d.ts +5 -1
- package/components/icon/icon.module.d.ts +1 -2
- package/components/icon/index.d.ts +0 -1
- package/components/toggle/toggle.component.d.ts +5 -10
- package/directives/appearance/appearance.directive.d.ts +9 -0
- package/directives/appearance/appearance.module.d.ts +7 -0
- package/directives/appearance/index.d.ts +2 -0
- package/directives/appearance/package.json +10 -0
- package/directives/appearance/taiga-ui-experimental-directives-appearance.d.ts +5 -0
- package/directives/button-vertical/button-vertical.component.d.ts +5 -0
- package/directives/button-vertical/button-vertical.directive.d.ts +7 -0
- package/directives/button-vertical/button-vertical.module.d.ts +8 -0
- package/directives/button-vertical/index.d.ts +3 -0
- package/directives/button-vertical/package.json +10 -0
- package/directives/button-vertical/taiga-ui-experimental-directives-button-vertical.d.ts +5 -0
- package/directives/card/card.component.d.ts +5 -0
- package/directives/card/card.directive.d.ts +0 -4
- package/directives/card/card.module.d.ts +3 -2
- package/directives/card/index.d.ts +1 -0
- package/directives/index.d.ts +2 -0
- package/directives/sensitive/sensitive.module.d.ts +2 -1
- package/esm2015/components/avatar/avatar.component.js +17 -12
- package/esm2015/components/avatar/avatar.module.js +5 -5
- package/esm2015/components/badge/badge.component.js +8 -36
- package/esm2015/components/badge/badge.directive.js +47 -0
- package/esm2015/components/badge/badge.module.js +5 -4
- package/esm2015/components/badge/badge.options.js +2 -2
- package/esm2015/components/badge/index.js +2 -1
- package/esm2015/components/badged-content/badged-content.component.js +1 -1
- package/esm2015/components/button/button.component.js +3 -10
- package/esm2015/components/button/button.directive.js +22 -7
- package/esm2015/components/checkbox/checkbox.component.js +9 -13
- package/esm2015/components/icon/icon.component.js +19 -7
- package/esm2015/components/icon/icon.module.js +4 -5
- package/esm2015/components/icon/index.js +1 -2
- package/esm2015/components/toggle/toggle.component.js +13 -29
- package/esm2015/directives/appearance/appearance.directive.js +30 -0
- package/esm2015/directives/appearance/appearance.module.js +16 -0
- package/esm2015/directives/appearance/index.js +3 -0
- package/esm2015/directives/appearance/taiga-ui-experimental-directives-appearance.js +5 -0
- package/esm2015/directives/button-vertical/button-vertical.component.js +19 -0
- package/esm2015/directives/button-vertical/button-vertical.directive.js +22 -0
- package/esm2015/directives/button-vertical/button-vertical.module.js +17 -0
- package/esm2015/directives/button-vertical/index.js +4 -0
- package/esm2015/directives/button-vertical/taiga-ui-experimental-directives-button-vertical.js +5 -0
- package/esm2015/directives/card/card.component.js +19 -0
- package/esm2015/directives/card/card.directive.js +3 -18
- package/esm2015/directives/card/card.module.js +3 -2
- package/esm2015/directives/card/index.js +2 -1
- package/esm2015/directives/cell/cell.component.js +1 -1
- package/esm2015/directives/index.js +3 -1
- package/esm2015/directives/progress-segmented/progress-segmented.component.js +1 -1
- package/esm2015/directives/sensitive/sensitive.component.js +1 -1
- package/esm2015/directives/sensitive/sensitive.module.js +4 -3
- package/esm2015/directives/surface/surface.component.js +1 -1
- package/esm2015/directives/surface/surface.directive.js +7 -6
- package/esm2015/index.js +2 -1
- package/esm2015/tokens/icon-resolver.js +15 -0
- package/esm2015/tokens/index.js +2 -0
- package/esm2015/tokens/taiga-ui-experimental-tokens.js +5 -0
- package/fesm2015/taiga-ui-experimental-components-avatar.js +20 -15
- package/fesm2015/taiga-ui-experimental-components-avatar.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-badge.js +41 -25
- package/fesm2015/taiga-ui-experimental-components-badge.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-badged-content.js +1 -1
- package/fesm2015/taiga-ui-experimental-components-badged-content.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-button.js +25 -17
- package/fesm2015/taiga-ui-experimental-components-button.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-checkbox.js +8 -12
- package/fesm2015/taiga-ui-experimental-components-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-icon.js +21 -37
- package/fesm2015/taiga-ui-experimental-components-icon.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-toggle.js +12 -28
- package/fesm2015/taiga-ui-experimental-components-toggle.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-directives-appearance.js +50 -0
- package/fesm2015/taiga-ui-experimental-directives-appearance.js.map +1 -0
- package/fesm2015/taiga-ui-experimental-directives-button-vertical.js +58 -0
- package/fesm2015/taiga-ui-experimental-directives-button-vertical.js.map +1 -0
- package/fesm2015/taiga-ui-experimental-directives-card.js +1 -0
- package/fesm2015/taiga-ui-experimental-directives-card.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-directives-cell.js +1 -1
- package/fesm2015/taiga-ui-experimental-directives-progress-segmented.js +1 -1
- package/fesm2015/taiga-ui-experimental-directives-progress-segmented.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-directives-sensitive.js +3 -3
- package/fesm2015/taiga-ui-experimental-directives-sensitive.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-directives-surface.js +7 -6
- package/fesm2015/taiga-ui-experimental-directives-surface.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-directives.js +2 -0
- package/fesm2015/taiga-ui-experimental-directives.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-tokens.js +22 -0
- package/fesm2015/taiga-ui-experimental-tokens.js.map +1 -0
- package/fesm2015/taiga-ui-experimental.js +1 -0
- package/fesm2015/taiga-ui-experimental.js.map +1 -1
- package/index.d.ts +1 -0
- package/package.json +31 -31
- package/tokens/icon-resolver.d.ts +4 -0
- package/tokens/index.d.ts +1 -0
- package/tokens/package.json +10 -0
- package/tokens/taiga-ui-experimental-tokens.d.ts +5 -0
- package/components/icon/icon.pipe.d.ts +0 -12
- package/esm2015/components/icon/icon.pipe.js +0 -30
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@taiga-ui/experimental/components/button', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/core', '@
|
|
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.
|
|
5
|
-
})(this, (function (exports, i0, i2, i1,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@taiga-ui/experimental/tokens'), require('rxjs'), require('@angular/common')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/experimental/components/button', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/experimental/tokens', '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.button = {}), global.ng.core, global.i2, global.i1, global["taiga-ui"].experimental.tokens, global.rxjs, global.ng.common));
|
|
5
|
+
})(this, (function (exports, i0, i2, i1, tokens, i1$1, common) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -23,9 +23,8 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
-
var i2__namespace
|
|
26
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
27
27
|
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
28
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2$1);
|
|
29
28
|
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
30
29
|
|
|
31
30
|
var TUI_BUTTON_DEFAULT_OPTIONS = {
|
|
@@ -42,8 +41,6 @@
|
|
|
42
41
|
this.options = options;
|
|
43
42
|
this.size = this.options.size;
|
|
44
43
|
this.loading = false;
|
|
45
|
-
this.iconLeft = '';
|
|
46
|
-
this.iconRight = '';
|
|
47
44
|
}
|
|
48
45
|
Object.defineProperty(TuiButtonComponent.prototype, "loaderSize", {
|
|
49
46
|
get: function () {
|
|
@@ -67,11 +64,11 @@
|
|
|
67
64
|
return TuiButtonComponent;
|
|
68
65
|
}());
|
|
69
66
|
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]
|
|
67
|
+
TuiButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiButtonComponent, selector: "[tuiButton][loading],[tuiIconButton][loading]", inputs: { size: "size", loading: "loading" }, host: { listeners: { "click.capture": "onClick($event)" }, properties: { "attr.aria-disabled": "loading", "class._loading": "loading" } }, ngImport: i0__namespace, template: "<ng-content></ng-content>\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.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
71
68
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonComponent, decorators: [{
|
|
72
69
|
type: i0.Component,
|
|
73
70
|
args: [{
|
|
74
|
-
selector: '[tuiButton][loading],[tuiIconButton][loading]
|
|
71
|
+
selector: '[tuiButton][loading],[tuiIconButton][loading]',
|
|
75
72
|
templateUrl: './button.template.html',
|
|
76
73
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
77
74
|
host: {
|
|
@@ -88,10 +85,6 @@
|
|
|
88
85
|
type: i0.Input
|
|
89
86
|
}], loading: [{
|
|
90
87
|
type: i0.Input
|
|
91
|
-
}], iconLeft: [{
|
|
92
|
-
type: i0.Input
|
|
93
|
-
}], iconRight: [{
|
|
94
|
-
type: i0.Input
|
|
95
88
|
}], onClick: [{
|
|
96
89
|
type: i0.HostListener,
|
|
97
90
|
args: ['click.capture', ['$event']]
|
|
@@ -103,7 +96,7 @@
|
|
|
103
96
|
return TuiButtonStylesComponent;
|
|
104
97
|
}());
|
|
105
98
|
TuiButtonStylesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonStylesComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
106
|
-
TuiButtonStylesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiButtonStylesComponent, selector: "ng-component", host: { classAttribute: "tui-button-styles" }, 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;
|
|
99
|
+
TuiButtonStylesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiButtonStylesComponent, selector: "ng-component", host: { classAttribute: "tui-button-styles" }, 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;text-decoration:none;position:relative;display:inline-flex;height:var(--t-size);align-items:center;justify-content:center;white-space:nowrap;border-radius:var(--t-radius);overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}[tuiButtonNew]>.t-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}[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,[tuiButtonNew][data-size=xs]:before{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,[tuiButtonNew][data-size=s]:not([tuiIconButton][data-appearance=\"icon\"]):before{width:1rem;height: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]:after{-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]:after{-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>*,[tuiButtonNew]._loading:before,[tuiButtonNew]._loading:after{opacity:0}[tuiButtonNew]._loading>.t-loader{opacity:1}[tuiButtonNew]._icon-left:before{content:\"\"}[tuiButtonNew]._icon-right:after{content:\"\"}[tuiButtonNew]:before{width:1.5rem;height:1.5rem;background:currentColor;-webkit-mask:var(--t-mask-left) no-repeat center / contain;mask:var(--t-mask-left) no-repeat center / contain}[tuiButtonNew]:after{width:1rem;height:1rem;background:currentColor;-webkit-margin-start:.125rem;margin-inline-start:.125rem;-webkit-margin-end:-.125rem;margin-inline-end:-.125rem;-webkit-mask:var(--t-mask-right) no-repeat center / contain;mask:var(--t-mask-right) no-repeat center / contain}[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 });
|
|
107
100
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonStylesComponent, decorators: [{
|
|
108
101
|
type: i0.Component,
|
|
109
102
|
args: [{
|
|
@@ -117,18 +110,21 @@
|
|
|
117
110
|
}]
|
|
118
111
|
}] });
|
|
119
112
|
var TuiButtonDirective = /** @class */ (function () {
|
|
120
|
-
function TuiButtonDirective(options, platform, mode$, directiveStyles) {
|
|
113
|
+
function TuiButtonDirective(resolver, options, platform, mode$, directiveStyles) {
|
|
114
|
+
this.resolver = resolver;
|
|
121
115
|
this.options = options;
|
|
122
116
|
this.platform = platform;
|
|
123
117
|
this.mode$ = mode$;
|
|
124
118
|
this.size = this.options.size;
|
|
125
119
|
this.appearance = this.options.appearance;
|
|
120
|
+
this.iconLeft = '';
|
|
121
|
+
this.iconRight = '';
|
|
126
122
|
directiveStyles.addComponent(TuiButtonStylesComponent);
|
|
127
123
|
}
|
|
128
124
|
return TuiButtonDirective;
|
|
129
125
|
}());
|
|
130
|
-
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 });
|
|
131
|
-
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": "", "
|
|
126
|
+
TuiButtonDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonDirective, deps: [{ token: tokens.TUI_ICON_RESOLVER }, { token: TUI_BUTTON_OPTIONS }, { token: i2.TUI_PLATFORM }, { token: i1.TUI_MODE }, { token: i2.TuiDirectiveStylesService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
127
|
+
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", iconLeft: "iconLeft", iconRight: "iconRight" }, host: { attributes: { "tuiButtonNew": "", "tuiAppearance": "" }, listeners: { "$.data-mode.attr": "mode$" }, properties: { "class._icon-left": "iconLeft", "class._icon-right": "iconRight", "style.--t-mask-left": "\"url(\" + resolver(iconLeft) + \")\"", "style.--t-mask-right": "\"url(\" + resolver(iconRight) + \")\"", "attr.data-size": "size", "attr.data-appearance": "appearance", "attr.data-platform": "platform" } }, providers: [i1.MODE_PROVIDER], ngImport: i0__namespace });
|
|
132
128
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonDirective, decorators: [{
|
|
133
129
|
type: i0.Directive,
|
|
134
130
|
args: [{
|
|
@@ -136,7 +132,11 @@
|
|
|
136
132
|
providers: [i1.MODE_PROVIDER],
|
|
137
133
|
host: {
|
|
138
134
|
tuiButtonNew: '',
|
|
139
|
-
|
|
135
|
+
tuiAppearance: '',
|
|
136
|
+
'[class._icon-left]': 'iconLeft',
|
|
137
|
+
'[class._icon-right]': 'iconRight',
|
|
138
|
+
'[style.--t-mask-left]': '"url(" + resolver(iconLeft) + ")"',
|
|
139
|
+
'[style.--t-mask-right]': '"url(" + resolver(iconRight) + ")"',
|
|
140
140
|
'[attr.data-size]': 'size',
|
|
141
141
|
'[attr.data-appearance]': 'appearance',
|
|
142
142
|
'[attr.data-platform]': 'platform',
|
|
@@ -145,6 +145,9 @@
|
|
|
145
145
|
}]
|
|
146
146
|
}], ctorParameters: function () {
|
|
147
147
|
return [{ type: undefined, decorators: [{
|
|
148
|
+
type: i0.Inject,
|
|
149
|
+
args: [tokens.TUI_ICON_RESOLVER]
|
|
150
|
+
}] }, { type: undefined, decorators: [{
|
|
148
151
|
type: i0.Inject,
|
|
149
152
|
args: [TUI_BUTTON_OPTIONS]
|
|
150
153
|
}] }, { type: undefined, decorators: [{
|
|
@@ -153,7 +156,7 @@
|
|
|
153
156
|
}] }, { type: i1__namespace$1.Observable, decorators: [{
|
|
154
157
|
type: i0.Inject,
|
|
155
158
|
args: [i1.TUI_MODE]
|
|
156
|
-
}] }, { type: i2__namespace
|
|
159
|
+
}] }, { type: i2__namespace.TuiDirectiveStylesService, decorators: [{
|
|
157
160
|
type: i0.Inject,
|
|
158
161
|
args: [i2.TuiDirectiveStylesService]
|
|
159
162
|
}] }];
|
|
@@ -161,6 +164,10 @@
|
|
|
161
164
|
type: i0.Input
|
|
162
165
|
}], appearance: [{
|
|
163
166
|
type: i0.Input
|
|
167
|
+
}], iconLeft: [{
|
|
168
|
+
type: i0.Input
|
|
169
|
+
}], iconRight: [{
|
|
170
|
+
type: i0.Input
|
|
164
171
|
}] } });
|
|
165
172
|
|
|
166
173
|
var TuiButtonModule = /** @class */ (function () {
|
|
@@ -169,12 +176,12 @@
|
|
|
169
176
|
return TuiButtonModule;
|
|
170
177
|
}());
|
|
171
178
|
TuiButtonModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
172
|
-
TuiButtonModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonModule, declarations: [TuiButtonComponent, TuiButtonDirective, TuiButtonStylesComponent], imports: [
|
|
173
|
-
TuiButtonModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonModule, imports: [[
|
|
179
|
+
TuiButtonModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonModule, declarations: [TuiButtonComponent, TuiButtonDirective, TuiButtonStylesComponent], imports: [common.CommonModule, i1.TuiSvgModule, i1.TuiLoaderModule], exports: [TuiButtonComponent, TuiButtonDirective] });
|
|
180
|
+
TuiButtonModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonModule, imports: [[common.CommonModule, i1.TuiSvgModule, i1.TuiLoaderModule]] });
|
|
174
181
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiButtonModule, decorators: [{
|
|
175
182
|
type: i0.NgModule,
|
|
176
183
|
args: [{
|
|
177
|
-
imports: [
|
|
184
|
+
imports: [common.CommonModule, i1.TuiSvgModule, i1.TuiLoaderModule],
|
|
178
185
|
declarations: [TuiButtonComponent, TuiButtonDirective, TuiButtonStylesComponent],
|
|
179
186
|
exports: [TuiButtonComponent, TuiButtonDirective],
|
|
180
187
|
}]
|
|
@@ -1 +1 @@
|
|
|
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 encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-button-styles',\n },\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,I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Aa,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAAN,aAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;IAAf,eAAA,CAAA,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,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
|
+
{"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: '[tuiButton][loading],[tuiIconButton][loading]',\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 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","<ng-content></ng-content>\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 {\n TUI_PLATFORM,\n TuiDirectiveStylesService,\n TuiPlatform,\n TuiStringHandler,\n} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER, TUI_MODE, TuiBrightness} from '@taiga-ui/core';\nimport {TUI_ICON_RESOLVER} from '@taiga-ui/experimental/tokens';\nimport {Observable} from 'rxjs';\n\nimport {TUI_BUTTON_OPTIONS, TuiButtonOptions} from './button.options';\n\n@Component({\n template: '',\n styleUrls: ['./button.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-button-styles',\n },\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 tuiAppearance: '',\n '[class._icon-left]': 'iconLeft',\n '[class._icon-right]': 'iconRight',\n '[style.--t-mask-left]': '\"url(\" + resolver(iconLeft) + \")\"',\n '[style.--t-mask-right]': '\"url(\" + resolver(iconRight) + \")\"',\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 @Input()\n iconLeft = '';\n\n @Input()\n iconRight = '';\n\n constructor(\n @Inject(TUI_ICON_RESOLVER) readonly resolver: TuiStringHandler<string>,\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","Component","ChangeDetectionStrategy","Inject","Input","HostListener","ViewEncapsulation","TUI_ICON_RESOLVER","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;;ACGA,QAAA,kBAAA,kBAAA,YAAA;IAOI,IAAA,SAAA,kBAAA,CAAyD,OAAyB,EAAA;IAAzB,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAkB;YALlF,IAAA,CAAA,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;IAGzB,QAAA,IAAO,CAAA,OAAA,GAA4B,KAAK,CAAC;SAE6C;IAEtF,IAAA,MAAA,CAAA,cAAA,CAAI,kBAAU,CAAA,SAAA,EAAA,YAAA,EAAA;IA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,QAAK;;;AC7CV,QAAA,eAAA,kBAAA,YAAA;IAAA,IAAA,SAAA,eAAA,GAAA;;;;uIAAa,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAAL,aAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;IAAf,eAAA,CAAA,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,CADrEc,mBAAY,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,mBAAY,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,mBAAY,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,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('rxjs/operators'), require('rxjs')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@taiga-ui/experimental/components/checkbox', ['exports', '@angular/core', '@angular/forms', '@taiga-ui/cdk', '@taiga-ui/core', 'rxjs/operators', '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.checkbox = {}), global.ng.core, global.ng.forms, global.cdk, global.core, global.rxjs.operators, global.rxjs));
|
|
5
|
-
})(this, (function (exports, i0, i2, cdk, core, operators, i1) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@taiga-ui/experimental/tokens'), require('rxjs/operators'), require('rxjs')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/experimental/components/checkbox', ['exports', '@angular/core', '@angular/forms', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/experimental/tokens', 'rxjs/operators', '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.checkbox = {}), global.ng.core, global.ng.forms, global.cdk, global.core, global["taiga-ui"].experimental.tokens, global.rxjs.operators, global.rxjs));
|
|
5
|
+
})(this, (function (exports, i0, i2, cdk, core, tokens, operators, i1) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -39,10 +39,9 @@
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
var TuiCheckboxComponent = /** @class */ (function () {
|
|
42
|
-
function TuiCheckboxComponent(cdr,
|
|
42
|
+
function TuiCheckboxComponent(cdr, resolver, options, destroy$, el, mode$, platform, control) {
|
|
43
43
|
this.cdr = cdr;
|
|
44
|
-
this.
|
|
45
|
-
this.svg = svg;
|
|
44
|
+
this.resolver = resolver;
|
|
46
45
|
this.options = options;
|
|
47
46
|
this.destroy$ = destroy$;
|
|
48
47
|
this.el = el;
|
|
@@ -57,8 +56,7 @@
|
|
|
57
56
|
? this.options.icons.indeterminate
|
|
58
57
|
: this.options.icons.checked;
|
|
59
58
|
var icon = cdk.tuiIsString(option) ? option : option(this.size);
|
|
60
|
-
|
|
61
|
-
return "url(" + mask + ")";
|
|
59
|
+
return "url(" + this.resolver(icon) + ")";
|
|
62
60
|
},
|
|
63
61
|
enumerable: false,
|
|
64
62
|
configurable: true
|
|
@@ -77,7 +75,7 @@
|
|
|
77
75
|
};
|
|
78
76
|
return TuiCheckboxComponent;
|
|
79
77
|
}());
|
|
80
|
-
TuiCheckboxComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiCheckboxComponent, deps: [{ token: i0.ChangeDetectorRef }, { token:
|
|
78
|
+
TuiCheckboxComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiCheckboxComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: tokens.TUI_ICON_RESOLVER }, { token: TUI_CHECKBOX_OPTIONS }, { token: cdk.TuiDestroyService, self: true }, { token: i0.ElementRef }, { token: core.TUI_MODE }, { token: cdk.TUI_PLATFORM }, { token: i2.NgControl, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
81
79
|
TuiCheckboxComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiCheckboxComponent, selector: "input[type=\"checkbox\"][tuiCheckbox]", inputs: { size: "size" }, host: { listeners: { "$.data-mode.attr": "mode$" }, properties: { "disabled": "!control || control.disabled", "attr.data-size": "size", "attr.data-platform": "platform", "class._invalid": "control?.invalid && control?.touched", "class._readonly": "!control", "style.--t-mask": "this.icon" } }, providers: [core.MODE_PROVIDER, cdk.TuiDestroyService], ngImport: i0__namespace, template: '', isInline: true, styles: [":host{transition-property:background,box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;margin:0;outline:none;box-shadow:inset 0 0 0 .0625rem var(--tui-clear-active)}:host:disabled{pointer-events:none}:host:disabled:not(._readonly){opacity:var(--tui-disabled-opacity)}:host:focus-visible{box-shadow:inset 0 0 0 .125rem var(--tui-focus)!important}:host:checked:before,:host:indeterminate:before{-webkit-mask-image:var(--t-mask);mask-image:var(--t-mask)}:host:before{position:absolute;top:0;left:0;width:100%;height:100%;content:\"\";background:currentColor;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>');mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>');-webkit-mask-size:100%;mask-size:100%}:host._invalid{box-shadow:inset 0 0 0 .0625rem var(--tui-error-bg-hover)}:host[data-platform=ios]{width:1.375rem;height:1.375rem;border-radius:100%;color:var(--tui-base-01);transition:none}:host[data-platform=ios]:checked,:host[data-platform=ios]:indeterminate{background:var(--tui-accent);box-shadow:none}:host[data-platform=ios]:checked:disabled:not(._readonly),:host[data-platform=ios]:indeterminate:disabled:not(._readonly){background:var(--tui-base-04)}:host[data-platform=ios]:checked:before,:host[data-platform=ios]:indeterminate:before{display:block}:host[data-platform=ios]:checked._invalid,:host[data-platform=ios]:indeterminate._invalid{background:var(--tui-error-fill)}:host[data-platform=ios]:before{display:none;--t-mask: url('data:image/svg+xml,<svg viewBox=\"0 0 22 22\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6.75 11.25L9.8 15.2L15.2 7\" fill=\"none\" stroke=\"black\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>')}:host[data-platform=ios]:indeterminate:before{--t-mask: url('data:image/svg+xml,<svg viewBox=\"0 0 22 22\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6 11H16\" fill=\"none\" stroke=\"black\" stroke-width=\"1.75\" stroke-linecap=\"round\"/></svg>')}:host[data-platform=android]{width:1.125rem;height:1.125rem;color:var(--tui-base-01);border-radius:.125rem;box-shadow:inset 0 0 0 .125rem var(--tui-base-04)}:host[data-platform=android]:checked,:host[data-platform=android]:indeterminate{background:var(--tui-accent);box-shadow:none}:host[data-platform=android]:checked._invalid,:host[data-platform=android]:indeterminate._invalid{background:var(--tui-error-fill)}:host[data-platform=android]:checked:disabled:not(._readonly),:host[data-platform=android]:indeterminate:disabled:not(._readonly){background:var(--tui-base-04)}:host[data-platform=android]:checked:before,:host[data-platform=android]:indeterminate:before{-webkit-clip-path:inset(0);clip-path:inset(0);transition-delay:0s}:host[data-platform=android]:before{transition:-webkit-clip-path var(--tui-duration) ease-in-out,-webkit-mask 0s var(--tui-duration) ease-in-out;transition:clip-path var(--tui-duration) ease-in-out,mask 0s var(--tui-duration) ease-in-out;transition:clip-path var(--tui-duration) ease-in-out,mask 0s var(--tui-duration) ease-in-out,-webkit-clip-path var(--tui-duration) ease-in-out,-webkit-mask 0s var(--tui-duration) ease-in-out;-webkit-clip-path:inset(0 100% 0 0);clip-path:inset(0 100% 0 0);--t-mask: url('data:image/svg+xml,<svg viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2.7 8.5L7 12.7L15.3 4.7\" fill=\"none\" stroke=\"black\" stroke-width=\"2\"/></svg>')}:host[data-platform=android]:indeterminate:before{--t-mask: url('data:image/svg+xml,<svg viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3 9H15\" fill=\"none\" stroke=\"black\" stroke-width=\"2\"/></svg>')}:host[data-platform=android]._invalid{box-shadow:inset 0 0 0 .125rem var(--tui-error-bg-hover)}:host[data-platform=web]{width:1.5rem;height:1.5rem;border-radius:var(--tui-radius-s);color:var(--tui-primary-text)}:host[data-platform=web][data-size=s]{width:1rem;height:1rem;border-radius:var(--tui-radius-xs)}:host[data-platform=web]:checked,:host[data-platform=web]:indeterminate{box-shadow:none;background:var(--tui-primary)}:host[data-platform=web]:checked:hover,:host[data-platform=web]:indeterminate:hover{background:var(--tui-primary-hover)}:host[data-platform=web]:checked:active,:host[data-platform=web]:indeterminate:active{background:var(--tui-primary-active)}:host[data-platform=web]:checked:before,:host[data-platform=web]:indeterminate:before{transform:scale(1);transition:transform var(--tui-duration) ease-in-out,-webkit-mask 0s ease-in-out;transition:transform var(--tui-duration) ease-in-out,mask 0s ease-in-out;transition:transform var(--tui-duration) ease-in-out,mask 0s ease-in-out,-webkit-mask 0s ease-in-out}:host[data-platform=web]:before{transform:scale(0);transition:transform var(--tui-duration) ease-in-out,-webkit-mask 0s var(--tui-duration) ease-in-out;transition:transform var(--tui-duration) ease-in-out,mask 0s var(--tui-duration) ease-in-out;transition:transform var(--tui-duration) ease-in-out,mask 0s var(--tui-duration) ease-in-out,-webkit-mask 0s var(--tui-duration) ease-in-out}:host[data-platform=web]._invalid:checked,:host[data-platform=web]._invalid:indeterminate{background:var(--tui-error-fill)}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
82
80
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiCheckboxComponent, decorators: [{
|
|
83
81
|
type: i0.Component,
|
|
@@ -102,10 +100,7 @@
|
|
|
102
100
|
args: [i0.ChangeDetectorRef]
|
|
103
101
|
}] }, { type: undefined, decorators: [{
|
|
104
102
|
type: i0.Inject,
|
|
105
|
-
args: [
|
|
106
|
-
}] }, { type: undefined, decorators: [{
|
|
107
|
-
type: i0.Inject,
|
|
108
|
-
args: [core.TUI_SVG_OPTIONS]
|
|
103
|
+
args: [tokens.TUI_ICON_RESOLVER]
|
|
109
104
|
}] }, { type: undefined, decorators: [{
|
|
110
105
|
type: i0.Inject,
|
|
111
106
|
args: [TUI_CHECKBOX_OPTIONS]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components-checkbox.umd.js","sources":["../../../projects/experimental/components/checkbox/checkbox.options.ts","../../../projects/experimental/components/checkbox/checkbox.component.ts","../../../projects/experimental/components/checkbox/checkbox.module.ts","../../../projects/experimental/components/checkbox/taiga-ui-experimental-components-checkbox.ts"],"sourcesContent":["import {Provider} from '@angular/core';\nimport {tuiCreateToken, TuiMapper, tuiProvideOptions} from '@taiga-ui/cdk';\nimport {TuiSizeS} from '@taiga-ui/core';\n\nexport interface TuiCheckboxOptions {\n readonly size: TuiSizeS;\n readonly icons: Readonly<{\n checked: TuiMapper<TuiSizeS, string> | string;\n indeterminate: TuiMapper<TuiSizeS, string> | string;\n }>;\n}\n\nexport const TUI_CHECKBOX_DEFAULT_OPTIONS: TuiCheckboxOptions = {\n size: `m`,\n icons: {\n checked: size => (size === `m` ? `tuiIconCheckLarge` : `tuiIconCheck`),\n indeterminate: size => (size === `m` ? `tuiIconMinusLarge` : `tuiIconMinus`),\n },\n};\n\nexport const TUI_CHECKBOX_OPTIONS = tuiCreateToken(TUI_CHECKBOX_DEFAULT_OPTIONS);\n\nexport function tuiCheckboxOptionsProvider(\n options: Partial<TuiCheckboxOptions>,\n): Provider {\n return tuiProvideOptions(TUI_CHECKBOX_OPTIONS, options, TUI_CHECKBOX_DEFAULT_OPTIONS);\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n OnInit,\n Optional,\n Self,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-checkbox.umd.js","sources":["../../../projects/experimental/components/checkbox/checkbox.options.ts","../../../projects/experimental/components/checkbox/checkbox.component.ts","../../../projects/experimental/components/checkbox/checkbox.module.ts","../../../projects/experimental/components/checkbox/taiga-ui-experimental-components-checkbox.ts"],"sourcesContent":["import {Provider} from '@angular/core';\nimport {tuiCreateToken, TuiMapper, tuiProvideOptions} from '@taiga-ui/cdk';\nimport {TuiSizeS} from '@taiga-ui/core';\n\nexport interface TuiCheckboxOptions {\n readonly size: TuiSizeS;\n readonly icons: Readonly<{\n checked: TuiMapper<TuiSizeS, string> | string;\n indeterminate: TuiMapper<TuiSizeS, string> | string;\n }>;\n}\n\nexport const TUI_CHECKBOX_DEFAULT_OPTIONS: TuiCheckboxOptions = {\n size: `m`,\n icons: {\n checked: size => (size === `m` ? `tuiIconCheckLarge` : `tuiIconCheck`),\n indeterminate: size => (size === `m` ? `tuiIconMinusLarge` : `tuiIconMinus`),\n },\n};\n\nexport const TUI_CHECKBOX_OPTIONS = tuiCreateToken(TUI_CHECKBOX_DEFAULT_OPTIONS);\n\nexport function tuiCheckboxOptionsProvider(\n options: Partial<TuiCheckboxOptions>,\n): Provider {\n return tuiProvideOptions(TUI_CHECKBOX_OPTIONS, options, TUI_CHECKBOX_DEFAULT_OPTIONS);\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n OnInit,\n Optional,\n Self,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n TUI_PLATFORM,\n tuiControlValue,\n TuiDestroyService,\n tuiIsString,\n TuiPlatform,\n TuiStringHandler,\n tuiWatch,\n} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER, TUI_MODE, TuiBrightness} from '@taiga-ui/core';\nimport {TUI_ICON_RESOLVER} from '@taiga-ui/experimental/tokens';\nimport {Observable} from 'rxjs';\nimport {distinctUntilChanged, takeUntil} from 'rxjs/operators';\n\nimport {TUI_CHECKBOX_OPTIONS, TuiCheckboxOptions} from './checkbox.options';\n\n@Component({\n selector: 'input[type=\"checkbox\"][tuiCheckbox]',\n template: '',\n styleUrls: ['./checkbox.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [MODE_PROVIDER, TuiDestroyService],\n host: {\n '($.data-mode.attr)': 'mode$',\n '[disabled]': '!control || control.disabled',\n '[attr.data-size]': 'size',\n '[attr.data-platform]': 'platform',\n '[class._invalid]': 'control?.invalid && control?.touched',\n '[class._readonly]': '!control',\n },\n})\nexport class TuiCheckboxComponent implements OnInit {\n @Input()\n size = this.options.size;\n\n constructor(\n @Inject(ChangeDetectorRef) private readonly cdr: ChangeDetectorRef,\n @Inject(TUI_ICON_RESOLVER) private readonly resolver: TuiStringHandler<string>,\n @Inject(TUI_CHECKBOX_OPTIONS) private readonly options: TuiCheckboxOptions,\n @Self() @Inject(TuiDestroyService) private readonly destroy$: Observable<unknown>,\n @Inject(ElementRef) private readonly el: ElementRef<HTMLInputElement>,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_PLATFORM) readonly platform: TuiPlatform,\n @Optional() @Inject(NgControl) readonly control: NgControl | null,\n ) {}\n\n @HostBinding('style.--t-mask')\n get icon(): string {\n const option = this.el.nativeElement.indeterminate\n ? this.options.icons.indeterminate\n : this.options.icons.checked;\n const icon = tuiIsString(option) ? option : option(this.size);\n\n return `url(${this.resolver(icon)})`;\n }\n\n ngOnInit(): void {\n if (!this.control?.valueChanges) {\n return;\n }\n\n tuiControlValue(this.control)\n .pipe(distinctUntilChanged(), tuiWatch(this.cdr), takeUntil(this.destroy$))\n .subscribe(value => {\n this.el.nativeElement.indeterminate = value === null;\n });\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiCheckboxComponent} from './checkbox.component';\n\n@NgModule({\n declarations: [TuiCheckboxComponent],\n exports: [TuiCheckboxComponent],\n})\nexport class TuiCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["tuiCreateToken","tuiProvideOptions","tuiIsString","tuiControlValue","distinctUntilChanged","tuiWatch","takeUntil","i0","ChangeDetectorRef","TUI_ICON_RESOLVER","TuiDestroyService","ElementRef","TUI_MODE","TUI_PLATFORM","NgControl","MODE_PROVIDER","Component","ChangeDetectionStrategy","Inject","Self","Optional","Input","HostBinding","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYa,QAAA,4BAA4B,GAAuB;IAC5D,IAAA,IAAI,EAAE,GAAG;IACT,IAAA,KAAK,EAAE;IACH,QAAA,OAAO,EAAE,UAAA,IAAI,IAAI,QAAC,IAAI,KAAK,GAAG,GAAG,mBAAmB,GAAG,cAAc,IAAC;IACtE,QAAA,aAAa,EAAE,UAAA,IAAI,IAAI,QAAC,IAAI,KAAK,GAAG,GAAG,mBAAmB,GAAG,cAAc,IAAC;IAC/E,KAAA;MACH;QAEW,oBAAoB,GAAGA,kBAAc,CAAC,4BAA4B,EAAE;IAE3E,SAAU,0BAA0B,CACtC,OAAoC,EAAA;QAEpC,OAAOC,qBAAiB,CAAC,oBAAoB,EAAE,OAAO,EAAE,4BAA4B,CAAC,CAAC;IAC1F;;ACkBA,QAAA,oBAAA,kBAAA,YAAA;IAII,IAAA,SAAA,oBAAA,CACgD,GAAsB,EACtB,QAAkC,EAC/B,OAA2B,EACtB,QAA6B,EAC5C,EAAgC,EAC1C,KAAuC,EACnC,QAAqB,EACZ,OAAyB,EAAA;IAPrB,QAAA,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;IACtB,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAA0B;IAC/B,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAoB;IACtB,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAqB;IAC5C,QAAA,IAAE,CAAA,EAAA,GAAF,EAAE,CAA8B;IAC1C,QAAA,IAAK,CAAA,KAAA,GAAL,KA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;;;;;;;;"}
|
|
@@ -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/icon', ['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.icon = {}), global.ng.core, global.
|
|
5
|
-
})(this, (function (exports, i0,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/experimental/tokens')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/experimental/components/icon', ['exports', '@angular/core', '@taiga-ui/experimental/tokens'], 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.icon = {}), global.ng.core, global["taiga-ui"].experimental.tokens));
|
|
5
|
+
})(this, (function (exports, i0, tokens) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -25,55 +25,38 @@
|
|
|
25
25
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
26
|
|
|
27
27
|
var TuiIconComponent = /** @class */ (function () {
|
|
28
|
-
function TuiIconComponent() {
|
|
28
|
+
function TuiIconComponent(resolver) {
|
|
29
|
+
this.resolver = resolver;
|
|
29
30
|
this.icon = '';
|
|
31
|
+
this.background = '';
|
|
30
32
|
}
|
|
31
33
|
return TuiIconComponent;
|
|
32
34
|
}());
|
|
33
|
-
TuiIconComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIconComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
34
|
-
TuiIconComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiIconComponent, selector: "tui-icon", inputs: { icon: "icon" }, host: { properties: { "style.--t-mask": "\"url(\" + icon + \")\"" } }, ngImport: i0__namespace, template: '', isInline: true, styles: [":host{position:relative;display:inline-block;width:1.5rem;height:1.5rem;vertical-align:middle;-webkit-mask:var(--t-mask) no-repeat center / contain;mask:var(--t-mask) no-repeat center / contain}:host:after{position:absolute;top:0;left:0;width:100%;height:100%;content:\"\";-webkit-mask:
|
|
35
|
+
TuiIconComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIconComponent, deps: [{ token: tokens.TUI_ICON_RESOLVER }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
36
|
+
TuiIconComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiIconComponent, selector: "tui-icon", inputs: { icon: "icon", background: "background" }, host: { properties: { "style.--t-mask": "\"url(\" + resolver(icon) + \")\"", "style.--t-mask-bg": "background ? \"url(\" + resolver(background).replace(\"Outline\", \"\") + \")\" : null" } }, ngImport: i0__namespace, template: '', isInline: true, styles: [":host{position:relative;display:inline-block;width:1.5rem;height:1.5rem;vertical-align:middle;-webkit-mask:var(--t-mask-bg, var(--t-mask)) no-repeat center / contain;mask:var(--t-mask-bg, var(--t-mask)) no-repeat center / contain}:host:after{position:absolute;top:0;left:0;width:100%;height:100%;content:\"\";-webkit-mask:var(--t-mask) no-repeat center / contain;mask:var(--t-mask) no-repeat center / contain;background:currentColor}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
35
37
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIconComponent, decorators: [{
|
|
36
38
|
type: i0.Component,
|
|
37
39
|
args: [{
|
|
38
40
|
selector: 'tui-icon',
|
|
39
41
|
template: '',
|
|
40
|
-
host: {
|
|
42
|
+
host: {
|
|
43
|
+
'[style.--t-mask]': '"url(" + resolver(icon) + ")"',
|
|
44
|
+
// TODO: remove Outline hack in 4.0
|
|
45
|
+
'[style.--t-mask-bg]': 'background ? "url(" + resolver(background).replace("Outline", "") + ")" : null',
|
|
46
|
+
},
|
|
41
47
|
styleUrls: ['./icon.style.less'],
|
|
42
48
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
43
49
|
}]
|
|
44
|
-
}], propDecorators: { icon: [{
|
|
45
|
-
type: i0.Input
|
|
46
|
-
}] } });
|
|
47
|
-
|
|
48
|
-
var TUI_ICON_RESOLVER = cdk.tuiCreateTokenFromFactory(function () { return function (icon) { return "/assets/taiga-ui/icons/" + icon + ".svg"; }; });
|
|
49
|
-
function tuiIconResolverProvider(useValue) {
|
|
50
|
-
return {
|
|
51
|
-
provide: TUI_ICON_RESOLVER,
|
|
52
|
-
useValue: useValue,
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
var TuiIconPipe = /** @class */ (function () {
|
|
56
|
-
function TuiIconPipe(resolver) {
|
|
57
|
-
this.resolver = resolver;
|
|
58
|
-
}
|
|
59
|
-
TuiIconPipe.prototype.transform = function (icon) {
|
|
60
|
-
return this.resolver(icon);
|
|
61
|
-
};
|
|
62
|
-
return TuiIconPipe;
|
|
63
|
-
}());
|
|
64
|
-
TuiIconPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIconPipe, deps: [{ token: TUI_ICON_RESOLVER }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
65
|
-
TuiIconPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIconPipe, name: "tuiIcon" });
|
|
66
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIconPipe, decorators: [{
|
|
67
|
-
type: i0.Pipe,
|
|
68
|
-
args: [{
|
|
69
|
-
name: "tuiIcon",
|
|
70
|
-
}]
|
|
71
50
|
}], ctorParameters: function () {
|
|
72
51
|
return [{ type: undefined, decorators: [{
|
|
73
52
|
type: i0.Inject,
|
|
74
|
-
args: [TUI_ICON_RESOLVER]
|
|
53
|
+
args: [tokens.TUI_ICON_RESOLVER]
|
|
75
54
|
}] }];
|
|
76
|
-
}
|
|
55
|
+
}, propDecorators: { icon: [{
|
|
56
|
+
type: i0.Input
|
|
57
|
+
}], background: [{
|
|
58
|
+
type: i0.Input
|
|
59
|
+
}] } });
|
|
77
60
|
|
|
78
61
|
var TuiIconModule = /** @class */ (function () {
|
|
79
62
|
function TuiIconModule() {
|
|
@@ -81,13 +64,13 @@
|
|
|
81
64
|
return TuiIconModule;
|
|
82
65
|
}());
|
|
83
66
|
TuiIconModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIconModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
84
|
-
TuiIconModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIconModule, declarations: [TuiIconComponent
|
|
67
|
+
TuiIconModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIconModule, declarations: [TuiIconComponent], exports: [TuiIconComponent] });
|
|
85
68
|
TuiIconModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIconModule });
|
|
86
69
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIconModule, decorators: [{
|
|
87
70
|
type: i0.NgModule,
|
|
88
71
|
args: [{
|
|
89
|
-
declarations: [TuiIconComponent
|
|
90
|
-
exports: [TuiIconComponent
|
|
72
|
+
declarations: [TuiIconComponent],
|
|
73
|
+
exports: [TuiIconComponent],
|
|
91
74
|
}]
|
|
92
75
|
}] });
|
|
93
76
|
|
|
@@ -95,11 +78,8 @@
|
|
|
95
78
|
* Generated bundle index. Do not edit.
|
|
96
79
|
*/
|
|
97
80
|
|
|
98
|
-
exports.TUI_ICON_RESOLVER = TUI_ICON_RESOLVER;
|
|
99
81
|
exports.TuiIconComponent = TuiIconComponent;
|
|
100
82
|
exports.TuiIconModule = TuiIconModule;
|
|
101
|
-
exports.TuiIconPipe = TuiIconPipe;
|
|
102
|
-
exports.tuiIconResolverProvider = tuiIconResolverProvider;
|
|
103
83
|
|
|
104
84
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
105
85
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components-icon.umd.js","sources":["../../../projects/experimental/components/icon/icon.component.ts","../../../projects/experimental/components/icon/icon.
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-icon.umd.js","sources":["../../../projects/experimental/components/icon/icon.component.ts","../../../projects/experimental/components/icon/icon.module.ts","../../../projects/experimental/components/icon/taiga-ui-experimental-components-icon.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, Inject, Input} from '@angular/core';\nimport {TuiStringHandler} from '@taiga-ui/cdk';\nimport {TUI_ICON_RESOLVER} from '@taiga-ui/experimental/tokens';\n\n@Component({\n selector: 'tui-icon',\n template: '',\n host: {\n '[style.--t-mask]': '\"url(\" + resolver(icon) + \")\"',\n // TODO: remove Outline hack in 4.0\n '[style.--t-mask-bg]':\n 'background ? \"url(\" + resolver(background).replace(\"Outline\", \"\") + \")\" : null',\n },\n styleUrls: ['./icon.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiIconComponent {\n @Input()\n icon = '';\n\n @Input()\n background = '';\n\n constructor(@Inject(TUI_ICON_RESOLVER) readonly resolver: TuiStringHandler<string>) {}\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiIconComponent} from './icon.component';\n\n@NgModule({\n declarations: [TuiIconComponent],\n exports: [TuiIconComponent],\n})\nexport class TuiIconModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i0","TUI_ICON_RESOLVER","Component","ChangeDetectionStrategy","Inject","Input","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,QAAA,gBAAA,kBAAA,YAAA;IAOI,IAAA,SAAA,gBAAA,CAAgD,QAAkC,EAAA;IAAlC,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAA0B;IALlF,QAAA,IAAI,CAAA,IAAA,GAAG,EAAE,CAAC;IAGV,QAAA,IAAU,CAAA,UAAA,GAAG,EAAE,CAAC;SAEsE;;;IAP7E,gBAAA,CAAA,IAAA,GAAAA,aAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAAA,aAAA,EAAA,IAAA,EAAA,gBAAgB,kBAOLC,wBAAiB,EAAA,CAAA,EAAA,MAAA,EAAAD,aAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;IAP5B,gBAAA,CAAA,IAAA,GAAAA,aAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,gBAAgB,+SAVf,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,qbAAA,CAAA,EAAA,eAAA,EAAAA,aAAA,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