@taiga-ui/experimental 3.54.0 → 3.55.0-canary.f5fbcc5
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-notification.umd.js +7 -12
- package/bundles/taiga-ui-experimental-components-badge-notification.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-badge.umd.js +112 -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 +29 -27
- package/bundles/taiga-ui-experimental-components-button.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-checkbox.umd.js +13 -29
- package/bundles/taiga-ui-experimental-components-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-icon.umd.js +24 -43
- package/bundles/taiga-ui-experimental-components-icon.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-radio.umd.js +10 -21
- package/bundles/taiga-ui-experimental-components-radio.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-rating.umd.js +7 -7
- package/bundles/taiga-ui-experimental-components-rating.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-thumbnail-card.umd.js +29 -10
- package/bundles/taiga-ui-experimental-components-thumbnail-card.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 +6 -11
- package/bundles/taiga-ui-experimental-directives-cell.umd.js.map +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-title.umd.js +5 -10
- package/bundles/taiga-ui-experimental-directives-title.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 +12 -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/badge-notification/badge-notification.component.d.ts +1 -3
- package/components/button/button.component.d.ts +1 -3
- package/components/button/button.directive.d.ts +6 -4
- package/components/checkbox/checkbox.component.d.ts +5 -9
- 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/radio/radio.component.d.ts +3 -7
- package/components/rating/rating.module.d.ts +3 -3
- package/components/thumbnail-card/thumbnail-card.component.d.ts +4 -1
- package/components/thumbnail-card/thumbnail-card.module.d.ts +2 -2
- 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/cell/cell.directive.d.ts +2 -3
- package/directives/index.d.ts +2 -0
- package/directives/sensitive/sensitive.module.d.ts +2 -1
- package/directives/title/title.directive.d.ts +2 -3
- 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 +42 -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/badge-notification/badge-notification.component.js +4 -10
- 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 +21 -11
- package/esm2015/components/checkbox/checkbox.component.js +13 -29
- package/esm2015/components/icon/icon.component.js +20 -7
- package/esm2015/components/icon/icon.module.js +4 -5
- package/esm2015/components/icon/index.js +1 -2
- package/esm2015/components/radio/radio.component.js +7 -20
- package/esm2015/components/rating/rating.component.js +3 -3
- package/esm2015/components/rating/rating.module.js +5 -5
- package/esm2015/components/thumbnail-card/thumbnail-card.component.js +21 -5
- package/esm2015/components/thumbnail-card/thumbnail-card.module.js +5 -5
- 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/cell/cell.directive.js +7 -12
- 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/directives/title/title.component.js +1 -1
- package/esm2015/directives/title/title.directive.js +6 -11
- 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-notification.js +3 -9
- package/fesm2015/taiga-ui-experimental-components-badge-notification.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-badge.js +40 -29
- 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 -22
- package/fesm2015/taiga-ui-experimental-components-button.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-checkbox.js +12 -28
- package/fesm2015/taiga-ui-experimental-components-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-icon.js +22 -37
- package/fesm2015/taiga-ui-experimental-components-icon.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-radio.js +7 -20
- package/fesm2015/taiga-ui-experimental-components-radio.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-rating.js +6 -6
- package/fesm2015/taiga-ui-experimental-components-rating.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-thumbnail-card.js +24 -8
- package/fesm2015/taiga-ui-experimental-components-thumbnail-card.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 +7 -12
- package/fesm2015/taiga-ui-experimental-directives-cell.js.map +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-title.js +6 -11
- package/fesm2015/taiga-ui-experimental-directives-title.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components-badged-content.js","sources":["../../../projects/experimental/components/badged-content/badged-content.component.ts","../../../projects/experimental/components/badged-content/badged-content.template.html","../../../projects/experimental/components/badged-content/badged-content.directive.ts","../../../projects/experimental/components/badged-content/badged-content.module.ts","../../../projects/experimental/components/badged-content/taiga-ui-experimental-components-badged-content.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component} from '@angular/core';\n\n@Component({\n selector: 'tui-badged-content',\n templateUrl: './badged-content.template.html',\n styleUrls: ['./badged-content.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiBadgedContentComponent {}\n","<ng-content></ng-content>\n\n<div\n #badgeTop\n class=\"t-badge t-badge_top\"\n [style.--t-badge-height.px]=\"badgeTop.offsetHeight\"\n (tuiResize)=\"(0)\"\n>\n <ng-content select=\"tui-badge-notification[tuiSlot='top']\"></ng-content>\n <div class=\"t-border\">\n <ng-content select=\"[tuiSlot='top']\"></ng-content>\n </div>\n</div>\n\n<div\n #badgeBottom\n class=\"t-badge t-badge_bottom\"\n [style.--t-badge-height.px]=\"badgeBottom.offsetHeight\"\n (tuiResize)=\"(0)\"\n>\n <ng-content select=\"tui-badge-notification[tuiSlot='bottom']\"></ng-content>\n <div class=\"t-border\">\n <ng-content select=\"[tuiSlot='bottom']\"></ng-content>\n </div>\n</div>\n","import {Directive, Input} from '@angular/core';\n\n@Directive({\n selector: '[tuiSlot]',\n})\nexport class TuiBadgedContentDirective {\n @Input()\n tuiSlot: string | 'bottom' | 'top' = 'top';\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiResizeModule} from '@taiga-ui/cdk';\n\nimport {TuiBadgedContentComponent} from './badged-content.component';\nimport {TuiBadgedContentDirective} from './badged-content.directive';\n\n@NgModule({\n imports: [CommonModule, TuiResizeModule],\n declarations: [TuiBadgedContentComponent, TuiBadgedContentDirective],\n exports: [TuiBadgedContentComponent, TuiBadgedContentDirective],\n})\nexport class TuiBadgedContentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAQa,yBAAyB,CAAA;;uHAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAzB,yBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,yBAAyB,0DCRtC,8sBAyBA,EAAA,MAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-badged-content.js","sources":["../../../projects/experimental/components/badged-content/badged-content.component.ts","../../../projects/experimental/components/badged-content/badged-content.template.html","../../../projects/experimental/components/badged-content/badged-content.directive.ts","../../../projects/experimental/components/badged-content/badged-content.module.ts","../../../projects/experimental/components/badged-content/taiga-ui-experimental-components-badged-content.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component} from '@angular/core';\n\n@Component({\n selector: 'tui-badged-content',\n templateUrl: './badged-content.template.html',\n styleUrls: ['./badged-content.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiBadgedContentComponent {}\n","<ng-content></ng-content>\n\n<div\n #badgeTop\n class=\"t-badge t-badge_top\"\n [style.--t-badge-height.px]=\"badgeTop.offsetHeight\"\n (tuiResize)=\"(0)\"\n>\n <ng-content select=\"tui-badge-notification[tuiSlot='top']\"></ng-content>\n <div class=\"t-border\">\n <ng-content select=\"[tuiSlot='top']\"></ng-content>\n </div>\n</div>\n\n<div\n #badgeBottom\n class=\"t-badge t-badge_bottom\"\n [style.--t-badge-height.px]=\"badgeBottom.offsetHeight\"\n (tuiResize)=\"(0)\"\n>\n <ng-content select=\"tui-badge-notification[tuiSlot='bottom']\"></ng-content>\n <div class=\"t-border\">\n <ng-content select=\"[tuiSlot='bottom']\"></ng-content>\n </div>\n</div>\n","import {Directive, Input} from '@angular/core';\n\n@Directive({\n selector: '[tuiSlot]',\n})\nexport class TuiBadgedContentDirective {\n @Input()\n tuiSlot: string | 'bottom' | 'top' = 'top';\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiResizeModule} from '@taiga-ui/cdk';\n\nimport {TuiBadgedContentComponent} from './badged-content.component';\nimport {TuiBadgedContentDirective} from './badged-content.directive';\n\n@NgModule({\n imports: [CommonModule, TuiResizeModule],\n declarations: [TuiBadgedContentComponent, TuiBadgedContentDirective],\n exports: [TuiBadgedContentComponent, TuiBadgedContentDirective],\n})\nexport class TuiBadgedContentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAQa,yBAAyB,CAAA;;uHAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAzB,yBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CA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AAA;qHAAtB,sBAAsB,EAAA,YAAA,EAAA,CAHhB,yBAAyB,EAAE,yBAAyB,CAAA,EAAA,OAAA,EAAA,CADzD,YAAY,EAAE,eAAe,CAAA,EAAA,OAAA,EAAA,CAE7B,yBAAyB,EAAE,yBAAyB,CAAA,EAAA,CAAA,CAAA;AAErD,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,EAJtB,OAAA,EAAA,CAAA,CAAC,YAAY,EAAE,eAAe,CAAC,CAAA,EAAA,CAAA,CAAA;4FAI/B,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBALlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,CAAC;AACxC,oBAAA,YAAY,EAAE,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;AACpE,oBAAA,OAAO,EAAE,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;AAClE,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Component, ChangeDetectionStrategy, Inject, Input, HostListener, ViewEncapsulation, Directive, NgModule } from '@angular/core';
|
|
3
|
-
import * as i2
|
|
4
|
-
import { tuiCreateToken, tuiProvideOptions, tuiIsString,
|
|
3
|
+
import * as i2 from '@taiga-ui/cdk';
|
|
4
|
+
import { tuiCreateToken, tuiProvideOptions, tuiIsString, TuiDirectiveStylesService } from '@taiga-ui/cdk';
|
|
5
5
|
import * as i1 from '@taiga-ui/core';
|
|
6
6
|
import { tuiSizeBigger, TUI_MODE, MODE_PROVIDER, TuiSvgModule, TuiLoaderModule } from '@taiga-ui/core';
|
|
7
|
-
import
|
|
8
|
-
import { CommonModule } from '@angular/common';
|
|
7
|
+
import { TUI_ICON_RESOLVER } from '@taiga-ui/experimental/tokens';
|
|
9
8
|
import * as i1$1 from 'rxjs';
|
|
9
|
+
import { CommonModule } from '@angular/common';
|
|
10
10
|
|
|
11
11
|
const TUI_BUTTON_DEFAULT_OPTIONS = {
|
|
12
12
|
size: `l`,
|
|
@@ -22,8 +22,6 @@ class TuiButtonComponent {
|
|
|
22
22
|
this.options = options;
|
|
23
23
|
this.size = this.options.size;
|
|
24
24
|
this.loading = false;
|
|
25
|
-
this.iconLeft = '';
|
|
26
|
-
this.iconRight = '';
|
|
27
25
|
}
|
|
28
26
|
get loaderSize() {
|
|
29
27
|
return tuiSizeBigger(this.size) ? 'm' : 's';
|
|
@@ -38,11 +36,11 @@ class TuiButtonComponent {
|
|
|
38
36
|
}
|
|
39
37
|
}
|
|
40
38
|
TuiButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiButtonComponent, deps: [{ token: TUI_BUTTON_OPTIONS }], target: i0.ɵɵFactoryTarget.Component });
|
|
41
|
-
TuiButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiButtonComponent, selector: "[tuiButton][loading],[tuiIconButton][loading]
|
|
39
|
+
TuiButtonComponent.ɵcmp = i0.ɵɵ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, 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.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
42
40
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiButtonComponent, decorators: [{
|
|
43
41
|
type: Component,
|
|
44
42
|
args: [{
|
|
45
|
-
selector: '[tuiButton][loading],[tuiIconButton][loading]
|
|
43
|
+
selector: '[tuiButton][loading],[tuiIconButton][loading]',
|
|
46
44
|
templateUrl: './button.template.html',
|
|
47
45
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
48
46
|
host: {
|
|
@@ -57,10 +55,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
57
55
|
type: Input
|
|
58
56
|
}], loading: [{
|
|
59
57
|
type: Input
|
|
60
|
-
}], iconLeft: [{
|
|
61
|
-
type: Input
|
|
62
|
-
}], iconRight: [{
|
|
63
|
-
type: Input
|
|
64
58
|
}], onClick: [{
|
|
65
59
|
type: HostListener,
|
|
66
60
|
args: ['click.capture', ['$event']]
|
|
@@ -69,7 +63,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
69
63
|
class TuiButtonStylesComponent {
|
|
70
64
|
}
|
|
71
65
|
TuiButtonStylesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiButtonStylesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
72
|
-
TuiButtonStylesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiButtonStylesComponent, selector: "ng-component", host: { classAttribute: "tui-button-styles" }, ngImport: i0, 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;
|
|
66
|
+
TuiButtonStylesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiButtonStylesComponent, selector: "ng-component", host: { classAttribute: "tui-button-styles" }, ngImport: i0, 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] tui-icon,[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] tui-icon,[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] *{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}[tuiIconButton][tuiButtonNew]{width:var(--t-size);font-size:0;padding:0;text-indent:0;grid-gap:0;gap:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
73
67
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiButtonStylesComponent, decorators: [{
|
|
74
68
|
type: Component,
|
|
75
69
|
args: [{
|
|
@@ -83,17 +77,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
83
77
|
}]
|
|
84
78
|
}] });
|
|
85
79
|
class TuiButtonDirective {
|
|
86
|
-
constructor(
|
|
80
|
+
constructor(resolver, options, mode$, directiveStyles) {
|
|
81
|
+
this.resolver = resolver;
|
|
87
82
|
this.options = options;
|
|
88
|
-
this.platform = platform;
|
|
89
83
|
this.mode$ = mode$;
|
|
90
84
|
this.size = this.options.size;
|
|
91
85
|
this.appearance = this.options.appearance;
|
|
86
|
+
this.iconLeft = '';
|
|
87
|
+
this.iconRight = '';
|
|
92
88
|
directiveStyles.addComponent(TuiButtonStylesComponent);
|
|
93
89
|
}
|
|
94
90
|
}
|
|
95
|
-
TuiButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiButtonDirective, deps: [{ token:
|
|
96
|
-
TuiButtonDirective.ɵdir = i0.ɵɵ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": "", "
|
|
91
|
+
TuiButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiButtonDirective, deps: [{ token: TUI_ICON_RESOLVER }, { token: TUI_BUTTON_OPTIONS }, { token: TUI_MODE }, { token: TuiDirectiveStylesService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
92
|
+
TuiButtonDirective.ɵdir = i0.ɵɵ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" } }, providers: [MODE_PROVIDER], ngImport: i0 });
|
|
97
93
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiButtonDirective, decorators: [{
|
|
98
94
|
type: Directive,
|
|
99
95
|
args: [{
|
|
@@ -101,29 +97,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
101
97
|
providers: [MODE_PROVIDER],
|
|
102
98
|
host: {
|
|
103
99
|
tuiButtonNew: '',
|
|
104
|
-
|
|
100
|
+
tuiAppearance: '',
|
|
101
|
+
'[class._icon-left]': 'iconLeft',
|
|
102
|
+
'[class._icon-right]': 'iconRight',
|
|
103
|
+
'[style.--t-mask-left]': '"url(" + resolver(iconLeft) + ")"',
|
|
104
|
+
'[style.--t-mask-right]': '"url(" + resolver(iconRight) + ")"',
|
|
105
105
|
'[attr.data-size]': 'size',
|
|
106
106
|
'[attr.data-appearance]': 'appearance',
|
|
107
|
-
'[attr.data-platform]': 'platform',
|
|
108
107
|
'($.data-mode.attr)': 'mode$',
|
|
109
108
|
},
|
|
110
109
|
}]
|
|
111
110
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
112
111
|
type: Inject,
|
|
113
|
-
args: [
|
|
112
|
+
args: [TUI_ICON_RESOLVER]
|
|
114
113
|
}] }, { type: undefined, decorators: [{
|
|
115
114
|
type: Inject,
|
|
116
|
-
args: [
|
|
115
|
+
args: [TUI_BUTTON_OPTIONS]
|
|
117
116
|
}] }, { type: i1$1.Observable, decorators: [{
|
|
118
117
|
type: Inject,
|
|
119
118
|
args: [TUI_MODE]
|
|
120
|
-
}] }, { type: i2
|
|
119
|
+
}] }, { type: i2.TuiDirectiveStylesService, decorators: [{
|
|
121
120
|
type: Inject,
|
|
122
121
|
args: [TuiDirectiveStylesService]
|
|
123
122
|
}] }]; }, propDecorators: { size: [{
|
|
124
123
|
type: Input
|
|
125
124
|
}], appearance: [{
|
|
126
125
|
type: Input
|
|
126
|
+
}], iconLeft: [{
|
|
127
|
+
type: Input
|
|
128
|
+
}], iconRight: [{
|
|
129
|
+
type: Input
|
|
127
130
|
}] } });
|
|
128
131
|
|
|
129
132
|
class TuiButtonModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components-button.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":[],"mappings":";;;;;;;;;;AASa,MAAA,0BAA0B,GAAqB;AACxD,IAAA,IAAI,EAAE,CAAG,CAAA,CAAA;AACT,IAAA,UAAU,EAAE,CAAS,OAAA,CAAA;EACvB;MAEW,kBAAkB,GAAG,cAAc,CAAC,0BAA0B,EAAE;AAEvE,SAAU,wBAAwB,CAAC,OAAkC,EAAA;IACvE,OAAO,iBAAiB,CAAC,kBAAkB,EAAE,OAAO,EAAE,0BAA0B,CAAC,CAAC;AACtF;;MCIa,kBAAkB,CAAA;AAa3B,IAAA,WAAA,CAAyD,OAAyB,EAAA;QAAzB,IAAO,CAAA,OAAA,GAAP,OAAO,CAAkB;AAXlF,QAAA,IAAA,CAAA,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;QAGzB,IAAO,CAAA,OAAA,GAA4B,KAAK,CAAC;QAGzC,IAAQ,CAAA,QAAA,GAAG,EAAE,CAAC;QAGd,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;KAEuE;AAEtF,IAAA,IAAI,UAAU,GAAA;AACV,QAAA,OAAO,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,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A,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAJf,CAAC,YAAY,EAAE,YAAY,EAAE,eAAe,CAAC,CAAA,EAAA,CAAA,CAAA;4FAI7C,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,eAAe,CAAC;AACtD,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,wBAAwB,CAAC;AAChF,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;AACpD,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-button.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 {TuiDirectiveStylesService, TuiStringHandler} 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 '($.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_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":[],"mappings":";;;;;;;;;;AASa,MAAA,0BAA0B,GAAqB;AACxD,IAAA,IAAI,EAAE,CAAG,CAAA,CAAA;AACT,IAAA,UAAU,EAAE,CAAS,OAAA,CAAA;EACvB;MAEW,kBAAkB,GAAG,cAAc,CAAC,0BAA0B,EAAE;AAEvE,SAAU,wBAAwB,CAAC,OAAkC,EAAA;IACvE,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AA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAf,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAHT,YAAA,EAAA,CAAA,kBAAkB,EAAE,kBAAkB,EAAE,wBAAwB,CAAA,EAAA,OAAA,EAAA,CADrE,YAAY,EAAE,YAAY,EAAE,eAAe,CAE3C,EAAA,OAAA,EAAA,CAAA,kBAAkB,EAAE,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAEvC,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAJf,CAAC,YAAY,EAAE,YAAY,EAAE,eAAe,CAAC,CAAA,EAAA,CAAA,CAAA;4FAI7C,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,eAAe,CAAC;AACtD,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,wBAAwB,CAAC;AAChF,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;AACpD,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ChangeDetectorRef, ElementRef, Component, ChangeDetectionStrategy, Inject, Self, Optional, Input,
|
|
2
|
+
import { ChangeDetectorRef, ElementRef, Component, ChangeDetectionStrategy, Inject, Self, Optional, Input, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/forms';
|
|
4
4
|
import { NgControl } from '@angular/forms';
|
|
5
|
-
import { tuiCreateToken, tuiProvideOptions, tuiIsString, tuiControlValue, tuiWatch,
|
|
6
|
-
import {
|
|
5
|
+
import { tuiCreateToken, tuiProvideOptions, tuiIsString, tuiControlValue, tuiWatch, TuiDestroyService } from '@taiga-ui/cdk';
|
|
6
|
+
import { TUI_ICON_RESOLVER } from '@taiga-ui/experimental/tokens';
|
|
7
7
|
import { distinctUntilChanged, takeUntil } from 'rxjs/operators';
|
|
8
8
|
import * as i1 from 'rxjs';
|
|
9
9
|
|
|
@@ -20,15 +20,12 @@ function tuiCheckboxOptionsProvider(options) {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
class TuiCheckboxComponent {
|
|
23
|
-
constructor(cdr,
|
|
23
|
+
constructor(cdr, resolver, options, destroy$, el, control) {
|
|
24
24
|
this.cdr = cdr;
|
|
25
|
-
this.
|
|
26
|
-
this.svg = svg;
|
|
25
|
+
this.resolver = resolver;
|
|
27
26
|
this.options = options;
|
|
28
27
|
this.destroy$ = destroy$;
|
|
29
28
|
this.el = el;
|
|
30
|
-
this.mode$ = mode$;
|
|
31
|
-
this.platform = platform;
|
|
32
29
|
this.control = control;
|
|
33
30
|
this.size = this.options.size;
|
|
34
31
|
}
|
|
@@ -37,8 +34,7 @@ class TuiCheckboxComponent {
|
|
|
37
34
|
? this.options.icons.indeterminate
|
|
38
35
|
: this.options.icons.checked;
|
|
39
36
|
const icon = tuiIsString(option) ? option : option(this.size);
|
|
40
|
-
|
|
41
|
-
return `url(${mask})`;
|
|
37
|
+
return `url(${this.resolver(icon)})`;
|
|
42
38
|
}
|
|
43
39
|
ngOnInit() {
|
|
44
40
|
var _a;
|
|
@@ -52,8 +48,8 @@ class TuiCheckboxComponent {
|
|
|
52
48
|
});
|
|
53
49
|
}
|
|
54
50
|
}
|
|
55
|
-
TuiCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiCheckboxComponent, deps: [{ token: ChangeDetectorRef }, { token:
|
|
56
|
-
TuiCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiCheckboxComponent, selector: "input[type=\"checkbox\"][tuiCheckbox]", inputs: { size: "size" }, host: {
|
|
51
|
+
TuiCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiCheckboxComponent, deps: [{ token: ChangeDetectorRef }, { token: TUI_ICON_RESOLVER }, { token: TUI_CHECKBOX_OPTIONS }, { token: TuiDestroyService, self: true }, { token: ElementRef }, { token: NgControl, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
52
|
+
TuiCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiCheckboxComponent, selector: "input[type=\"checkbox\"][tuiCheckbox]", inputs: { size: "size" }, host: { attributes: { "tuiAppearance": "" }, properties: { "disabled": "!control || control.disabled", "attr.data-size": "size", "class._invalid": "control?.invalid && control?.touched", "class._readonly": "!control", "style.--t-mask": "icon" } }, providers: [TuiDestroyService], ngImport: i0, template: '', isInline: true, styles: [":host{width:1.5rem;height:1.5rem;border-radius:var(--tui-radius-s);color:var(--tui-primary-text);cursor:pointer;margin:0;box-shadow:inset 0 0 0 .0625rem var(--tui-clear-active)}:host:before{position:absolute;top:0;left:0;width:100%;height:100%;content:\"\";background:currentColor;-webkit-mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>') center / 100%;mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>') center / 100%;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:disabled._readonly{opacity:1}:host:checked,:host:indeterminate{box-shadow:none;background:var(--tui-primary)}:host:checked:hover,:host:indeterminate:hover{background:var(--tui-primary-hover)}:host:checked:active,:host:indeterminate:active{background:var(--tui-primary-active)}:host:checked:before,:host:indeterminate:before{-webkit-mask-image:var(--t-mask);mask-image:var(--t-mask);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-size=s]{width:1rem;height:1rem;border-radius:var(--tui-radius-xs)}:host._invalid{box-shadow:inset 0 0 0 .0625rem var(--tui-error-bg-hover)}:host._invalid:checked,:host._invalid:indeterminate{background:var(--tui-error-fill)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
57
53
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiCheckboxComponent, decorators: [{
|
|
58
54
|
type: Component,
|
|
59
55
|
args: [{
|
|
@@ -61,14 +57,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
61
57
|
template: '',
|
|
62
58
|
styleUrls: ['./checkbox.style.less'],
|
|
63
59
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
64
|
-
providers: [
|
|
60
|
+
providers: [TuiDestroyService],
|
|
65
61
|
host: {
|
|
66
|
-
|
|
62
|
+
tuiAppearance: '',
|
|
67
63
|
'[disabled]': '!control || control.disabled',
|
|
68
64
|
'[attr.data-size]': 'size',
|
|
69
|
-
'[attr.data-platform]': 'platform',
|
|
70
65
|
'[class._invalid]': 'control?.invalid && control?.touched',
|
|
71
66
|
'[class._readonly]': '!control',
|
|
67
|
+
'[style.--t-mask]': 'icon',
|
|
72
68
|
},
|
|
73
69
|
}]
|
|
74
70
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef, decorators: [{
|
|
@@ -76,10 +72,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
76
72
|
args: [ChangeDetectorRef]
|
|
77
73
|
}] }, { type: undefined, decorators: [{
|
|
78
74
|
type: Inject,
|
|
79
|
-
args: [
|
|
80
|
-
}] }, { type: undefined, decorators: [{
|
|
81
|
-
type: Inject,
|
|
82
|
-
args: [TUI_SVG_OPTIONS]
|
|
75
|
+
args: [TUI_ICON_RESOLVER]
|
|
83
76
|
}] }, { type: undefined, decorators: [{
|
|
84
77
|
type: Inject,
|
|
85
78
|
args: [TUI_CHECKBOX_OPTIONS]
|
|
@@ -91,12 +84,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
91
84
|
}] }, { type: i0.ElementRef, decorators: [{
|
|
92
85
|
type: Inject,
|
|
93
86
|
args: [ElementRef]
|
|
94
|
-
}] }, { type: i1.Observable, decorators: [{
|
|
95
|
-
type: Inject,
|
|
96
|
-
args: [TUI_MODE]
|
|
97
|
-
}] }, { type: undefined, decorators: [{
|
|
98
|
-
type: Inject,
|
|
99
|
-
args: [TUI_PLATFORM]
|
|
100
87
|
}] }, { type: i2.NgControl, decorators: [{
|
|
101
88
|
type: Optional
|
|
102
89
|
}, {
|
|
@@ -104,9 +91,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
104
91
|
args: [NgControl]
|
|
105
92
|
}] }]; }, propDecorators: { size: [{
|
|
106
93
|
type: Input
|
|
107
|
-
}], icon: [{
|
|
108
|
-
type: HostBinding,
|
|
109
|
-
args: ['style.--t-mask']
|
|
110
94
|
}] } });
|
|
111
95
|
|
|
112
96
|
class TuiCheckboxModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components-checkbox.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
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-checkbox.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 Inject,\n Input,\n OnInit,\n Optional,\n Self,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n tuiControlValue,\n TuiDestroyService,\n tuiIsString,\n TuiStringHandler,\n tuiWatch,\n} from '@taiga-ui/cdk';\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: [TuiDestroyService],\n host: {\n tuiAppearance: '', // Apply base appearance\n '[disabled]': '!control || control.disabled',\n '[attr.data-size]': 'size',\n '[class._invalid]': 'control?.invalid && control?.touched',\n '[class._readonly]': '!control',\n '[style.--t-mask]': 'icon',\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 @Optional() @Inject(NgControl) readonly control: NgControl | null,\n ) {}\n\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":[],"mappings":";;;;;;;;;AAYa,MAAA,4BAA4B,GAAuB;AAC5D,IAAA,IAAI,EAAE,CAAG,CAAA,CAAA;AACT,IAAA,KAAK,EAAE;AACH,QAAA,OAAO,EAAE,IAAI,KAAK,IAAI,KAAK,CAAG,CAAA,CAAA,GAAG,CAAA,iBAAA,CAAmB,GAAG,cAAc,CAAC;AACtE,QAAA,aAAa,EAAE,IAAI,KAAK,IAAI,KAAK,CAAG,CAAA,CAAA,GAAG,CAAA,iBAAA,CAAmB,GAAG,cAAc,CAAC;AAC/E,KAAA;EACH;MAEW,oBAAoB,GAAG,cAAc,CAAC,4BAA4B,EAAE;AAE3E,SAAU,0BAA0B,CACtC,OAAoC,EAAA;IAEpC,OAAO,iBAAiB,CAAC,oBAAoB,EAAE,OAAO,EAAE,4BAA4B,CAAC,CAAC;AAC1F;;MCca,oBAAoB,CAAA;IAI7B,WACgD,CAAA,GAAsB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';
|
|
2
|
-
import { Component, ChangeDetectionStrategy,
|
|
3
|
-
import {
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Inject, Input, NgModule } from '@angular/core';
|
|
3
|
+
import { TUI_ICON_RESOLVER } from '@taiga-ui/experimental/tokens';
|
|
4
4
|
|
|
5
5
|
class TuiIconComponent {
|
|
6
|
-
constructor() {
|
|
6
|
+
constructor(resolver) {
|
|
7
|
+
this.resolver = resolver;
|
|
7
8
|
this.icon = '';
|
|
9
|
+
this.background = '';
|
|
8
10
|
}
|
|
9
11
|
}
|
|
10
|
-
TuiIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11
|
-
TuiIconComponent.ɵcmp = i0.ɵɵ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, template: '', isInline: true, styles: [":host{position:relative;display:inline-block;width:1.5rem;height:1.5rem;vertical-align:middle
|
|
12
|
+
TuiIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiIconComponent, deps: [{ token: TUI_ICON_RESOLVER }], target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
+
TuiIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiIconComponent, selector: "tui-icon", inputs: { icon: "icon", background: "background" }, host: { properties: { "class._duo": "background", "style.--t-mask": "\"url(\" + resolver(icon) + \")\"", "style.--t-mask-bg": "background ? \"url(\" + resolver(background).replace(\"Outline\", \"\") + \")\" : null" } }, ngImport: i0, template: '', isInline: true, styles: [":host{position:relative;display:inline-block;width:1.5rem;height:1.5rem;vertical-align:middle}:host._duo{-webkit-mask:var(--t-mask-bg) no-repeat center / contain;mask:var(--t-mask-bg) 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.ChangeDetectionStrategy.OnPush });
|
|
12
14
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiIconComponent, decorators: [{
|
|
13
15
|
type: Component,
|
|
14
16
|
args: [{
|
|
15
17
|
selector: 'tui-icon',
|
|
16
18
|
template: '',
|
|
17
|
-
host: {
|
|
19
|
+
host: {
|
|
20
|
+
'[class._duo]': 'background',
|
|
21
|
+
'[style.--t-mask]': '"url(" + resolver(icon) + ")"',
|
|
22
|
+
// TODO: remove Outline hack in 4.0
|
|
23
|
+
'[style.--t-mask-bg]': 'background ? "url(" + resolver(background).replace("Outline", "") + ")" : null',
|
|
24
|
+
},
|
|
18
25
|
styleUrls: ['./icon.style.less'],
|
|
19
26
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
20
27
|
}]
|
|
21
|
-
}], propDecorators: { icon: [{
|
|
22
|
-
type: Input
|
|
23
|
-
}] } });
|
|
24
|
-
|
|
25
|
-
const TUI_ICON_RESOLVER = tuiCreateTokenFromFactory(() => icon => `/assets/taiga-ui/icons/${icon}.svg`);
|
|
26
|
-
function tuiIconResolverProvider(useValue) {
|
|
27
|
-
return {
|
|
28
|
-
provide: TUI_ICON_RESOLVER,
|
|
29
|
-
useValue,
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
class TuiIconPipe {
|
|
33
|
-
constructor(resolver) {
|
|
34
|
-
this.resolver = resolver;
|
|
35
|
-
}
|
|
36
|
-
transform(icon) {
|
|
37
|
-
return this.resolver(icon);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
TuiIconPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiIconPipe, deps: [{ token: TUI_ICON_RESOLVER }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
41
|
-
TuiIconPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiIconPipe, name: "tuiIcon" });
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiIconPipe, decorators: [{
|
|
43
|
-
type: Pipe,
|
|
44
|
-
args: [{
|
|
45
|
-
name: `tuiIcon`,
|
|
46
|
-
}]
|
|
47
28
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
48
29
|
type: Inject,
|
|
49
30
|
args: [TUI_ICON_RESOLVER]
|
|
50
|
-
}] }]; }
|
|
31
|
+
}] }]; }, propDecorators: { icon: [{
|
|
32
|
+
type: Input
|
|
33
|
+
}], background: [{
|
|
34
|
+
type: Input
|
|
35
|
+
}] } });
|
|
51
36
|
|
|
52
37
|
class TuiIconModule {
|
|
53
38
|
}
|
|
54
39
|
TuiIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
55
|
-
TuiIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiIconModule, declarations: [TuiIconComponent
|
|
40
|
+
TuiIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiIconModule, declarations: [TuiIconComponent], exports: [TuiIconComponent] });
|
|
56
41
|
TuiIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiIconModule });
|
|
57
42
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiIconModule, decorators: [{
|
|
58
43
|
type: NgModule,
|
|
59
44
|
args: [{
|
|
60
|
-
declarations: [TuiIconComponent
|
|
61
|
-
exports: [TuiIconComponent
|
|
45
|
+
declarations: [TuiIconComponent],
|
|
46
|
+
exports: [TuiIconComponent],
|
|
62
47
|
}]
|
|
63
48
|
}] });
|
|
64
49
|
|
|
@@ -66,5 +51,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
66
51
|
* Generated bundle index. Do not edit.
|
|
67
52
|
*/
|
|
68
53
|
|
|
69
|
-
export {
|
|
54
|
+
export { TuiIconComponent, TuiIconModule };
|
|
70
55
|
//# sourceMappingURL=taiga-ui-experimental-components-icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components-icon.js","sources":["../../../projects/experimental/components/icon/icon.component.ts","../../../projects/experimental/components/icon/icon.
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-icon.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 '[class._duo]': 'background',\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":[],"mappings":";;;;MAiBa,gBAAgB,CAAA;AAOzB,IAAA,WAAA,CAAgD,QAAkC,EAAA;QAAlC,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAA0B;QALlF,IAAI,CAAA,IAAA,GAAG,EAAE,CAAC;QAGV,IAAU,CAAA,UAAA,GAAG,EAAE,CAAC;KAEsE;;AAP7E,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,kBAOL,iBAAiB,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAP5B,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,gBAAgB,gUAXf,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,kaAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;4FAWH,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAb5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,UAAU;AACpB,oBAAA,QAAQ,EAAE,EAAE;AACZ,oBAAA,IAAI,EAAE;AACF,wBAAA,cAAc,EAAE,YAAY;AAC5B,wBAAA,kBAAkB,EAAE,+BAA+B;;AAEnD,wBAAA,qBAAqB,EACjB,gFAAgF;AACvF,qBAAA;oBACD,SAAS,EAAE,CAAC,mBAAmB,CAAC;oBAChC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAClD,iBAAA,CAAA;;0BAQgB,MAAM;2BAAC,iBAAiB,CAAA;4CALrC,IAAI,EAAA,CAAA;sBADH,KAAK;gBAIN,UAAU,EAAA,CAAA;sBADT,KAAK;;;MCbG,aAAa,CAAA;;2GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;4GAAb,aAAa,EAAA,YAAA,EAAA,CAHP,gBAAgB,CAAA,EAAA,OAAA,EAAA,CACrB,gBAAgB,CAAA,EAAA,CAAA,CAAA;4GAEjB,aAAa,EAAA,CAAA,CAAA;4FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,gBAAgB,CAAC;oBAChC,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC9B,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy,
|
|
3
|
-
import * as
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Optional, Inject, Input, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
4
|
import { NgControl } from '@angular/forms';
|
|
5
|
-
import { TUI_PLATFORM } from '@taiga-ui/cdk';
|
|
6
|
-
import { TUI_MODE, MODE_PROVIDER } from '@taiga-ui/core';
|
|
7
|
-
import * as i1 from 'rxjs';
|
|
8
5
|
|
|
9
6
|
class TuiRadioComponent {
|
|
10
|
-
constructor(
|
|
11
|
-
this.mode$ = mode$;
|
|
12
|
-
this.platform = platform;
|
|
7
|
+
constructor(control) {
|
|
13
8
|
this.control = control;
|
|
14
9
|
this.size = 'm';
|
|
15
10
|
}
|
|
16
11
|
}
|
|
17
|
-
TuiRadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiRadioComponent, deps: [{ token:
|
|
18
|
-
TuiRadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiRadioComponent, selector: "input[type=\"radio\"][tuiRadio]", inputs: { size: "size" }, host: {
|
|
12
|
+
TuiRadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiRadioComponent, deps: [{ token: NgControl, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
+
TuiRadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiRadioComponent, selector: "input[type=\"radio\"][tuiRadio]", inputs: { size: "size" }, host: { attributes: { "tuiAppearance": "" }, properties: { "disabled": "!control || control.disabled", "attr.data-size": "size", "class._invalid": "control?.invalid && control?.touched", "class._readonly": "!control" } }, ngImport: i0, template: '', isInline: true, styles: [":host{transition-property:background,box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;width:var(--t-size);height:var(--t-size);cursor:pointer;margin:0;border-radius:100%;box-shadow:inset 0 0 0 .0625rem var(--tui-clear-active);color:var(--tui-primary-text);--t-size: 1.5rem}:host:disabled._readonly{opacity:1}:host:before{position:absolute;top:0;left:0;width:100%;height:100%;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";border-radius:100%;background:currentColor;transform:scale(0)}:host:checked{box-shadow:none;background:var(--tui-primary)}:host:checked:hover{background:var(--tui-primary-hover)}:host:checked:active{background:var(--tui-primary-active)}:host:checked:before{transform:scale(.5)}:host[data-size=s]{--t-size: 1rem}:host._invalid{box-shadow:inset 0 0 0 .0625rem var(--tui-error-bg-hover)}:host._invalid:checked{background:var(--tui-error-fill)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
19
14
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiRadioComponent, decorators: [{
|
|
20
15
|
type: Component,
|
|
21
16
|
args: [{
|
|
@@ -23,23 +18,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
23
18
|
template: '',
|
|
24
19
|
styleUrls: ['./radio.style.less'],
|
|
25
20
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
26
|
-
providers: [MODE_PROVIDER],
|
|
27
21
|
host: {
|
|
28
|
-
|
|
22
|
+
tuiAppearance: '',
|
|
29
23
|
'[disabled]': '!control || control.disabled',
|
|
30
24
|
'[attr.data-size]': 'size',
|
|
31
|
-
'[attr.data-platform]': 'platform',
|
|
32
25
|
'[class._invalid]': 'control?.invalid && control?.touched',
|
|
33
26
|
'[class._readonly]': '!control',
|
|
34
27
|
},
|
|
35
28
|
}]
|
|
36
|
-
}], ctorParameters: function () { return [{ type: i1.
|
|
37
|
-
type: Inject,
|
|
38
|
-
args: [TUI_MODE]
|
|
39
|
-
}] }, { type: undefined, decorators: [{
|
|
40
|
-
type: Inject,
|
|
41
|
-
args: [TUI_PLATFORM]
|
|
42
|
-
}] }, { type: i2.NgControl, decorators: [{
|
|
29
|
+
}], ctorParameters: function () { return [{ type: i1.NgControl, decorators: [{
|
|
43
30
|
type: Optional
|
|
44
31
|
}, {
|
|
45
32
|
type: Inject,
|