@taiga-ui/experimental 3.55.0 → 3.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/taiga-ui-experimental-components-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 +13 -16
- package/bundles/taiga-ui-experimental-components-badge.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-button.umd.js +12 -31
- package/bundles/taiga-ui-experimental-components-button.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-checkbox.umd.js +10 -21
- package/bundles/taiga-ui-experimental-components-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-chip.umd.js +140 -0
- package/bundles/taiga-ui-experimental-components-chip.umd.js.map +1 -0
- package/bundles/taiga-ui-experimental-components-icon.umd.js +2 -1
- package/bundles/taiga-ui-experimental-components-icon.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-components-pin.umd.js +76 -0
- package/bundles/taiga-ui-experimental-components-pin.umd.js.map +1 -0
- 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-tooltip.umd.js +496 -0
- package/bundles/taiga-ui-experimental-components-tooltip.umd.js.map +1 -0
- package/bundles/taiga-ui-experimental-components.umd.js +22 -4
- package/bundles/taiga-ui-experimental-components.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-directives-button-close.umd.js +88 -0
- package/bundles/taiga-ui-experimental-directives-button-close.umd.js.map +1 -0
- package/bundles/taiga-ui-experimental-directives-button-vertical.umd.js +1 -1
- package/bundles/taiga-ui-experimental-directives-button-vertical.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-directives-cell.umd.js +5 -10
- package/bundles/taiga-ui-experimental-directives-cell.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-directives-icons.umd.js +113 -0
- package/bundles/taiga-ui-experimental-directives-icons.umd.js.map +1 -0
- package/bundles/taiga-ui-experimental-directives-sensitive.umd.js +1 -1
- package/bundles/taiga-ui-experimental-directives-sensitive.umd.js.map +1 -1
- package/bundles/taiga-ui-experimental-directives-surface.umd.js +1 -1
- 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/components/badge/badge.directive.d.ts +2 -3
- package/components/badge/badge.module.d.ts +2 -1
- package/components/badge-notification/badge-notification.component.d.ts +1 -3
- package/components/button/button.directive.d.ts +3 -7
- package/components/button/button.module.d.ts +2 -1
- package/components/checkbox/checkbox.component.d.ts +4 -7
- package/components/chip/chip.component.d.ts +5 -0
- package/components/chip/chip.directive.d.ts +11 -0
- package/components/chip/chip.module.d.ts +9 -0
- package/components/chip/chip.options.d.ts +9 -0
- package/components/chip/index.d.ts +4 -0
- package/components/chip/package.json +10 -0
- package/components/chip/taiga-ui-experimental-components-chip.d.ts +5 -0
- package/components/index.d.ts +3 -0
- package/components/pin/index.d.ts +2 -0
- package/components/pin/package.json +10 -0
- package/components/pin/pin.component.d.ts +6 -0
- package/components/pin/pin.module.d.ts +7 -0
- package/components/pin/taiga-ui-experimental-components-pin.d.ts +5 -0
- 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/tooltip/index.d.ts +3 -0
- package/components/tooltip/package.json +10 -0
- package/components/tooltip/taiga-ui-experimental-components-tooltip.d.ts +5 -0
- package/components/tooltip/tooltip.component.d.ts +21 -0
- package/components/tooltip/tooltip.module.d.ts +13 -0
- package/components/tooltip/tooltip.options.d.ts +8 -0
- package/directives/button-close/button-close.directive.d.ts +9 -0
- package/directives/button-close/button-close.module.d.ts +7 -0
- package/directives/button-close/button-close.options.d.ts +1 -0
- package/directives/button-close/index.d.ts +3 -0
- package/directives/button-close/package.json +10 -0
- package/directives/button-close/taiga-ui-experimental-directives-button-close.d.ts +5 -0
- package/directives/cell/cell.directive.d.ts +2 -3
- package/directives/icons/icons.component.d.ts +5 -0
- package/directives/icons/icons.directive.d.ts +10 -0
- package/directives/icons/icons.module.d.ts +8 -0
- package/directives/icons/index.d.ts +3 -0
- package/directives/icons/package.json +10 -0
- package/directives/icons/taiga-ui-experimental-directives-icons.d.ts +5 -0
- package/directives/index.d.ts +2 -0
- package/directives/title/title.directive.d.ts +2 -3
- package/esm2015/components/badge/badge.component.js +1 -1
- package/esm2015/components/badge/badge.directive.js +6 -10
- package/esm2015/components/badge/badge.module.js +6 -4
- package/esm2015/components/badge-notification/badge-notification.component.js +4 -10
- package/esm2015/components/button/button.directive.js +6 -26
- package/esm2015/components/button/button.module.js +6 -5
- package/esm2015/components/checkbox/checkbox.component.js +9 -21
- package/esm2015/components/chip/chip.component.js +19 -0
- package/esm2015/components/chip/chip.directive.js +59 -0
- package/esm2015/components/chip/chip.module.js +19 -0
- package/esm2015/components/chip/chip.options.js +10 -0
- package/esm2015/components/chip/index.js +5 -0
- package/esm2015/components/chip/taiga-ui-experimental-components-chip.js +5 -0
- package/esm2015/components/icon/icon.component.js +3 -2
- package/esm2015/components/index.js +4 -1
- package/esm2015/components/pin/index.js +3 -0
- package/esm2015/components/pin/pin.component.js +24 -0
- package/esm2015/components/pin/pin.module.js +16 -0
- package/esm2015/components/pin/taiga-ui-experimental-components-pin.js +5 -0
- 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/tooltip/index.js +4 -0
- package/esm2015/components/tooltip/taiga-ui-experimental-components-tooltip.js +5 -0
- package/esm2015/components/tooltip/tooltip.component.js +88 -0
- package/esm2015/components/tooltip/tooltip.module.js +42 -0
- package/esm2015/components/tooltip/tooltip.options.js +9 -0
- package/esm2015/directives/button-close/button-close.directive.js +34 -0
- package/esm2015/directives/button-close/button-close.module.js +16 -0
- package/esm2015/directives/button-close/button-close.options.js +3 -0
- package/esm2015/directives/button-close/index.js +4 -0
- package/esm2015/directives/button-close/taiga-ui-experimental-directives-button-close.js +5 -0
- package/esm2015/directives/button-vertical/button-vertical.component.js +1 -1
- package/esm2015/directives/cell/cell.directive.js +7 -12
- package/esm2015/directives/icons/icons.component.js +19 -0
- package/esm2015/directives/icons/icons.directive.js +41 -0
- package/esm2015/directives/icons/icons.module.js +17 -0
- package/esm2015/directives/icons/index.js +4 -0
- package/esm2015/directives/icons/taiga-ui-experimental-directives-icons.js +5 -0
- package/esm2015/directives/index.js +3 -1
- package/esm2015/directives/sensitive/sensitive.component.js +1 -1
- package/esm2015/directives/surface/surface.component.js +1 -1
- package/esm2015/directives/title/title.component.js +1 -1
- package/esm2015/directives/title/title.directive.js +6 -11
- 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 +11 -13
- package/fesm2015/taiga-ui-experimental-components-badge.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-button.js +10 -29
- package/fesm2015/taiga-ui-experimental-components-button.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-checkbox.js +8 -20
- package/fesm2015/taiga-ui-experimental-components-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-chip.js +105 -0
- package/fesm2015/taiga-ui-experimental-components-chip.js.map +1 -0
- package/fesm2015/taiga-ui-experimental-components-icon.js +2 -1
- package/fesm2015/taiga-ui-experimental-components-icon.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-components-pin.js +44 -0
- package/fesm2015/taiga-ui-experimental-components-pin.js.map +1 -0
- 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-tooltip.js +139 -0
- package/fesm2015/taiga-ui-experimental-components-tooltip.js.map +1 -0
- package/fesm2015/taiga-ui-experimental-components.js +3 -0
- package/fesm2015/taiga-ui-experimental-components.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-directives-button-close.js +56 -0
- package/fesm2015/taiga-ui-experimental-directives-button-close.js.map +1 -0
- package/fesm2015/taiga-ui-experimental-directives-button-vertical.js +1 -1
- package/fesm2015/taiga-ui-experimental-directives-button-vertical.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-directives-cell.js +6 -11
- package/fesm2015/taiga-ui-experimental-directives-cell.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-directives-icons.js +77 -0
- package/fesm2015/taiga-ui-experimental-directives-icons.js.map +1 -0
- package/fesm2015/taiga-ui-experimental-directives-sensitive.js +1 -1
- package/fesm2015/taiga-ui-experimental-directives-sensitive.js.map +1 -1
- package/fesm2015/taiga-ui-experimental-directives-surface.js +1 -1
- 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/package.json +7 -7
|
@@ -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.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":[],"mappings":";;;;
|
|
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,2bAAA,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;;;;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Input, HostBinding, NgModule } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
class TuiPinComponent {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.open = false;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
TuiPinComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiPinComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10
|
+
TuiPinComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiPinComponent, selector: "tui-pin,[tuiPin]", inputs: { open: "open" }, host: { properties: { "class._open": "this.open" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{transition-property:width,height,border,margin;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;-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:flex;width:var(--t-size);height:var(--t-size);align-items:stretch;flex-direction:column;justify-content:center;text-align:center;border-radius:100%;font:var(--tui-font-text-s);font-weight:bold;box-sizing:border-box;color:var(--tui-accent-text);background:var(--tui-accent);box-shadow:0 0 0 .125rem var(--tui-elevation-01);border:0 solid var(--tui-accent);transform:translate(-50%,-50%);--t-size: 2rem}:host:-webkit-any(a,button,select,textarea,input,label){cursor:pointer}:host:-moz-any(a,button,select,textarea,input,label){cursor:pointer}:host:empty{--t-size: .75rem}:host:empty:before{display:none}:host ::ng-deep>img{max-height:100%;box-sizing:border-box;border-radius:100%;background:var(--tui-base-01)}:host ::ng-deep>tui-icon,:host ::ng-deep>tui-svg{transition-property:width,height;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;width:1.25rem;height:1.25rem;align-self:center}:host._open{font:var(--tui-font-text-m);font-weight:bold;border-width:0;margin-top:-2.75rem;--t-size: 3.5rem}:host._open ::ng-deep>img{padding:.125rem}:host._open ::ng-deep>tui-icon,:host._open ::ng-deep>tui-svg{width:2.125rem;height:2.125rem}:host._open:before{transform:scale(.99) translate(-1.875rem,-1.875rem);opacity:1}:host._open:after{top:4.5rem;opacity:1}:host:before{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;top:50%;left:50%;right:-.25rem;bottom:-.625rem;box-sizing:border-box;border-width:2.2rem 2rem;border-style:solid;border-color:inherit;opacity:0;transform:scale(.57) translate(-1.875rem,-1.875rem);transform-origin:top left;pointer-events:none;-webkit-mask:url('data:image/svg+xml,<svg width=\"60\" height=\"66\" viewBox=\"0 0 60 66\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 30.0917C0 13.4726 13.4313 0 30.0002 0C46.5687 0 60 13.4726 60 30.0917C60 44.2105 50.4927 56.0529 37.4162 59.2986C32.5552 60.5551 31.0408 65.275 31.0408 65.275C30.8892 65.697 30.4909 66 30.0183 66C29.5453 66 29.147 65.697 28.9938 65.275C28.9938 65.275 27.481 60.5551 22.6199 59.2986C9.46433 56.0206 0 43.5901 0 30.0917ZM30 57.75C45.3259 57.75 57.75 45.3259 57.75 30C57.75 14.6741 45.3259 2.25 30 2.25C14.6741 2.25 2.25 14.6741 2.25 30C2.25 45.3259 14.6741 57.75 30 57.75Z\" /></svg>') no-repeat;mask:url('data:image/svg+xml,<svg width=\"60\" height=\"66\" viewBox=\"0 0 60 66\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 30.0917C0 13.4726 13.4313 0 30.0002 0C46.5687 0 60 13.4726 60 30.0917C60 44.2105 50.4927 56.0529 37.4162 59.2986C32.5552 60.5551 31.0408 65.275 31.0408 65.275C30.8892 65.697 30.4909 66 30.0183 66C29.5453 66 29.147 65.697 28.9938 65.275C28.9938 65.275 27.481 60.5551 22.6199 59.2986C9.46433 56.0206 0 43.5901 0 30.0917ZM30 57.75C45.3259 57.75 57.75 45.3259 57.75 30C57.75 14.6741 45.3259 2.25 30 2.25C14.6741 2.25 2.25 14.6741 2.25 30C2.25 45.3259 14.6741 57.75 30 57.75Z\" /></svg>') no-repeat}:host:after{transition-property:top,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;top:50%;left:50%;border:.1875rem solid currentColor;border-color:inherit;border-radius:100%;box-sizing:border-box;box-shadow:inherit;transform:translate(-50%,-50%);opacity:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiPinComponent, decorators: [{
|
|
12
|
+
type: Component,
|
|
13
|
+
args: [{
|
|
14
|
+
selector: 'tui-pin,[tuiPin]',
|
|
15
|
+
template: '<ng-content></ng-content>',
|
|
16
|
+
styleUrls: ['./pin.styles.less'],
|
|
17
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
18
|
+
}]
|
|
19
|
+
}], propDecorators: { open: [{
|
|
20
|
+
type: Input
|
|
21
|
+
}, {
|
|
22
|
+
type: HostBinding,
|
|
23
|
+
args: ['class._open']
|
|
24
|
+
}] } });
|
|
25
|
+
|
|
26
|
+
class TuiPinModule {
|
|
27
|
+
}
|
|
28
|
+
TuiPinModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiPinModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
29
|
+
TuiPinModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiPinModule, declarations: [TuiPinComponent], exports: [TuiPinComponent] });
|
|
30
|
+
TuiPinModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiPinModule });
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiPinModule, decorators: [{
|
|
32
|
+
type: NgModule,
|
|
33
|
+
args: [{
|
|
34
|
+
declarations: [TuiPinComponent],
|
|
35
|
+
exports: [TuiPinComponent],
|
|
36
|
+
}]
|
|
37
|
+
}] });
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Generated bundle index. Do not edit.
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
export { TuiPinComponent, TuiPinModule };
|
|
44
|
+
//# sourceMappingURL=taiga-ui-experimental-components-pin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-pin.js","sources":["../../../projects/experimental/components/pin/pin.component.ts","../../../projects/experimental/components/pin/pin.module.ts","../../../projects/experimental/components/pin/taiga-ui-experimental-components-pin.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, HostBinding, Input} from '@angular/core';\n\n@Component({\n selector: 'tui-pin,[tuiPin]',\n template: '<ng-content></ng-content>',\n styleUrls: ['./pin.styles.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiPinComponent {\n @Input()\n @HostBinding('class._open')\n open = false;\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiPinComponent} from './pin.component';\n\n@NgModule({\n declarations: [TuiPinComponent],\n exports: [TuiPinComponent],\n})\nexport class TuiPinModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAQa,eAAe,CAAA;AAN5B,IAAA,WAAA,GAAA;QASI,IAAI,CAAA,IAAA,GAAG,KAAK,CAAC;AAChB,KAAA;;6GAJY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,eAAe,wIAJd,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,yhHAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;4FAI5B,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,2BAA2B;oBACrC,SAAS,EAAE,CAAC,mBAAmB,CAAC;oBAChC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAClD,iBAAA,CAAA;8BAIG,IAAI,EAAA,CAAA;sBAFH,KAAK;;sBACL,WAAW;uBAAC,aAAa,CAAA;;;MCFjB,YAAY,CAAA;;0GAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;2GAAZ,YAAY,EAAA,YAAA,EAAA,CAHN,eAAe,CAAA,EAAA,OAAA,EAAA,CACpB,eAAe,CAAA,EAAA,CAAA,CAAA;2GAEhB,YAAY,EAAA,CAAA,CAAA;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,eAAe,CAAC;oBAC/B,OAAO,EAAE,CAAC,eAAe,CAAC;AAC7B,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,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components-radio.js","sources":["../../../projects/experimental/components/radio/radio.component.ts","../../../projects/experimental/components/radio/radio.module.ts","../../../projects/experimental/components/radio/taiga-ui-experimental-components-radio.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, Inject, Input, Optional} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-radio.js","sources":["../../../projects/experimental/components/radio/radio.component.ts","../../../projects/experimental/components/radio/radio.module.ts","../../../projects/experimental/components/radio/taiga-ui-experimental-components-radio.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, Inject, Input, Optional} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {TuiSizeS} from '@taiga-ui/core';\n\n@Component({\n selector: 'input[type=\"radio\"][tuiRadio]',\n template: '',\n styleUrls: ['./radio.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\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 },\n})\nexport class TuiRadioComponent {\n @Input()\n size: TuiSizeS = 'm';\n\n constructor(@Optional() @Inject(NgControl) readonly control: NgControl | null) {}\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiRadioComponent} from './radio.component';\n\n@NgModule({\n declarations: [TuiRadioComponent],\n exports: [TuiRadioComponent],\n})\nexport class TuiRadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAiBa,iBAAiB,CAAA;AAI1B,IAAA,WAAA,CAAoD,OAAyB,EAAA;QAAzB,IAAO,CAAA,OAAA,GAAP,OAAO,CAAkB;QAF7E,IAAI,CAAA,IAAA,GAAa,GAAG,CAAC;KAE4D;;AAJxE,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,kBAIM,SAAS,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAJhC,iBAAA,CAAA,IAAA,GAAA,EAAA,CA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;;ACPD;;AAEG;;;;"}
|
|
@@ -4,8 +4,8 @@ import * as i4 from '@angular/forms';
|
|
|
4
4
|
import { NgControl, FormsModule } from '@angular/forms';
|
|
5
5
|
import * as i2 from '@taiga-ui/cdk';
|
|
6
6
|
import { tuiCreateToken, tuiProvideOptions, AbstractTuiControl, tuiIsNativeFocused, tuiClamp, TuiRepeatTimesModule } from '@taiga-ui/cdk';
|
|
7
|
-
import * as i1 from '@taiga-ui/
|
|
8
|
-
import {
|
|
7
|
+
import * as i1 from '@taiga-ui/experimental/components/icon';
|
|
8
|
+
import { TuiIconModule } from '@taiga-ui/experimental/components/icon';
|
|
9
9
|
import * as i3 from '@tinkoff/ng-polymorpheus';
|
|
10
10
|
import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
11
11
|
import { CommonModule } from '@angular/common';
|
|
@@ -63,7 +63,7 @@ class TuiRatingComponent extends AbstractTuiControl {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
TuiRatingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiRatingComponent, deps: [{ token: NgControl, optional: true, self: true }, { token: ChangeDetectorRef }, { token: TUI_RATING_OPTIONS }], target: i0.ɵɵFactoryTarget.Component });
|
|
66
|
-
TuiRatingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiRatingComponent, selector: "tui-rating", inputs: { icon: "icon", max: "max" }, host: { listeners: { "keydown.capture": "onKeyDown($event)", "pointerdown": "onPointer(1)", "pointercancel": "onPointer(-1)", "document:pointerup": "onPointer(-1)" }, properties: { "class._active": "this.active" } }, viewQueries: [{ propertyName: "input", first: true, predicate: NgControl, descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"t-items\">\n <div\n *tuiRepeatTimes=\"let index of max\"\n class=\"t-item\"\n [class.t-item_active]=\"isActive(index)\"\n (pointerup)=\"onClick(max - index)\"\n >\n <tui-
|
|
66
|
+
TuiRatingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiRatingComponent, selector: "tui-rating", inputs: { icon: "icon", max: "max" }, host: { listeners: { "keydown.capture": "onKeyDown($event)", "pointerdown": "onPointer(1)", "pointercancel": "onPointer(-1)", "document:pointerup": "onPointer(-1)" }, properties: { "class._active": "this.active" } }, viewQueries: [{ propertyName: "input", first: true, predicate: NgControl, descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"t-items\">\n <div\n *tuiRepeatTimes=\"let index of max\"\n class=\"t-item\"\n [class.t-item_active]=\"isActive(index)\"\n (pointerup)=\"onClick(max - index)\"\n >\n <tui-icon\n *polymorpheusOutlet=\"icon as src; context: {$implicit: max - index}\"\n class=\"t-icon t-icon_blank\"\n [class.t-icon_fraction]=\"isFraction(index)\"\n [icon]=\"src.toString()\"\n [style.--t-cut.%]=\"100 - getCut(index)\"\n ></tui-icon>\n <tui-icon\n *polymorpheusOutlet=\"icon as src; context: {$implicit: max - index}\"\n class=\"t-icon\"\n [icon]=\"src.toString()\"\n [style.--t-cut.%]=\"getCut(index)\"\n ></tui-icon>\n </div>\n</div>\n<input\n min=\"1\"\n type=\"range\"\n class=\"t-range\"\n [attr.aria-disabled]=\"readOnly\"\n [disabled]=\"computedDisabled\"\n [max]=\"max\"\n [(ngModel)]=\"value\"\n/>\n", styles: [":host{position:relative;display:block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content;font-size:1rem;color:var(--tui-support-12);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host._readonly{pointer-events:none}:host._disabled{pointer-events:none;opacity:var(--tui-disabled-opacity)}.t-range{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;box-sizing:border-box;padding:0 .75em;pointer-events:none}.t-range:focus-visible+.t-items{box-shadow:inset 0 0 0 .125rem var(--tui-focus)}.t-items{position:relative;display:flex;flex-direction:row-reverse}.t-items:hover .t-icon{-webkit-clip-path:inset(0 0 0 0);clip-path:inset(0 0 0 0)}.t-items:hover .t-icon_blank{-webkit-clip-path:inset(0 0 0 100%);clip-path:inset(0 0 0 100%)}.t-item{position:relative;flex:1 0 0;color:var(--tui-base-06);transition-property:color,transform;transition-duration:var(--tui-duration);transition-timing-function:ease-in-out,cubic-bezier(.35,1.5,.4,2.5)}.t-item:first-child{max-width:2.5em}.t-item:hover,.t-item:hover~.t-item,.t-items:not(:hover) .t-item_active{color:currentColor}.t-items:active .t-item:hover,.t-items:active .t-item:hover~.t-item{transform:scale(.85);transition-duration:var(--tui-duration),calc(var(--tui-duration) / 3);transition-timing-function:ease-in-out}.t-icon{transition-property:-webkit-clip-path;transition-property:clip-path;transition-property:clip-path,-webkit-clip-path;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;width:2.5em;height:2.5em;font-size:inherit;-webkit-clip-path:inset(0 var(--t-cut) 0 0);clip-path:inset(0 var(--t-cut) 0 0)}.t-icon ::ng-deep>*{font-size:1rem}.t-icon_blank{position:absolute;top:0;left:0;display:none;color:var(--tui-base-06);-webkit-clip-path:inset(0 0 0 var(--t-cut));clip-path:inset(0 0 0 var(--t-cut))}.t-icon_fraction{display:block}@media (any-pointer: coarse){:host._active .t-item_active{transform:scale(.85);transition-timing-function:ease-in-out}.t-range{pointer-events:auto}.t-icon{transition:none}}\n"], components: [{ type: i1.TuiIconComponent, selector: "tui-icon", inputs: ["icon", "background"] }], directives: [{ type: i2.TuiRepeatTimesDirective, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: ["tuiRepeatTimesOf"] }, { type: i3.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i4.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
67
67
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiRatingComponent, decorators: [{
|
|
68
68
|
type: Component,
|
|
69
69
|
args: [{
|
|
@@ -113,14 +113,14 @@ class TuiRatingModule {
|
|
|
113
113
|
}
|
|
114
114
|
TuiRatingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiRatingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
115
115
|
TuiRatingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiRatingModule, declarations: [TuiRatingComponent], imports: [CommonModule,
|
|
116
|
-
TuiSvgModule,
|
|
117
116
|
FormsModule,
|
|
117
|
+
TuiIconModule,
|
|
118
118
|
TuiRepeatTimesModule,
|
|
119
119
|
PolymorpheusModule], exports: [TuiRatingComponent] });
|
|
120
120
|
TuiRatingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiRatingModule, imports: [[
|
|
121
121
|
CommonModule,
|
|
122
|
-
TuiSvgModule,
|
|
123
122
|
FormsModule,
|
|
123
|
+
TuiIconModule,
|
|
124
124
|
TuiRepeatTimesModule,
|
|
125
125
|
PolymorpheusModule,
|
|
126
126
|
]] });
|
|
@@ -129,8 +129,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
129
129
|
args: [{
|
|
130
130
|
imports: [
|
|
131
131
|
CommonModule,
|
|
132
|
-
TuiSvgModule,
|
|
133
132
|
FormsModule,
|
|
133
|
+
TuiIconModule,
|
|
134
134
|
TuiRepeatTimesModule,
|
|
135
135
|
PolymorpheusModule,
|
|
136
136
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components-rating.js","sources":["../../../projects/experimental/components/rating/rating.options.ts","../../../projects/experimental/components/rating/rating.component.ts","../../../projects/experimental/components/rating/rating.template.html","../../../projects/experimental/components/rating/rating.module.ts","../../../projects/experimental/components/rating/taiga-ui-experimental-components-rating.ts"],"sourcesContent":["import {Provider} from '@angular/core';\nimport {TuiContextWithImplicit, tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiRatingOptions {\n readonly icon: PolymorpheusContent<TuiContextWithImplicit<number>>;\n readonly max: number;\n}\n\nexport const TUI_RATING_DEFAULT_OPTIONS: TuiRatingOptions = {\n icon: `tuiIconStarLarge`,\n max: 5,\n};\n\nexport const TUI_RATING_OPTIONS = tuiCreateToken(TUI_RATING_DEFAULT_OPTIONS);\n\nexport function tuiRatingOptionsProvider(options: Partial<TuiRatingOptions>): Provider {\n return tuiProvideOptions(TUI_RATING_OPTIONS, options, TUI_RATING_DEFAULT_OPTIONS);\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n tuiClamp,\n TuiFocusableElementAccessor,\n tuiIsNativeFocused,\n} from '@taiga-ui/cdk';\n\nimport {TUI_RATING_OPTIONS, TuiRatingOptions} from './rating.options';\n\n@Component({\n selector: 'tui-rating',\n templateUrl: './rating.template.html',\n styleUrls: ['./rating.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiRatingComponent\n extends AbstractTuiControl<number>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(NgControl, {read: ElementRef, static: true})\n private readonly input?: ElementRef<HTMLInputElement>;\n\n @Input()\n icon = this.options.icon;\n\n @Input()\n max = this.options.max;\n\n @HostBinding('class._active')\n active = 0;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) cdr: ChangeDetectorRef,\n @Inject(TUI_RATING_OPTIONS) private readonly options: TuiRatingOptions,\n ) {\n super(control, cdr);\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return this.computedDisabled ? null : this.input?.nativeElement || null;\n }\n\n get focused(): boolean {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n\n @HostListener('keydown.capture', ['$event'])\n onKeyDown(event: KeyboardEvent): void {\n if (this.readOnly) {\n event.preventDefault();\n }\n }\n\n @HostListener('pointerdown', ['1'])\n @HostListener('pointercancel', ['-1'])\n @HostListener('document:pointerup', ['-1'])\n onPointer(delta: number): void {\n this.active = tuiClamp(this.active + delta, 0, 1);\n }\n\n onClick(value: number): void {\n if (this.active) {\n this.value = value;\n }\n }\n\n isActive(index: number): boolean {\n return Math.ceil(this.value) >= this.max - index;\n }\n\n isFraction(index: number): boolean {\n return this.value > this.max - index - 1 && this.value < this.max - index;\n }\n\n getCut(index: number): number {\n return this.isFraction(index)\n ? 100 * Math.max(this.max - index - this.value, 0)\n : 0;\n }\n\n protected getFallbackValue(): number {\n return 0;\n }\n}\n","<div class=\"t-items\">\n <div\n *tuiRepeatTimes=\"let index of max\"\n class=\"t-item\"\n [class.t-item_active]=\"isActive(index)\"\n (pointerup)=\"onClick(max - index)\"\n >\n <tui-svg\n *polymorpheusOutlet=\"icon as src; context: {$implicit: max - index}\"\n class=\"t-icon t-icon_blank\"\n [class.t-icon_fraction]=\"isFraction(index)\"\n [src]=\"src\"\n [style.--t-cut.%]=\"100 - getCut(index)\"\n ></tui-svg>\n <tui-svg\n *polymorpheusOutlet=\"icon as src; context: {$implicit: max - index}\"\n class=\"t-icon\"\n [src]=\"src\"\n [style.--t-cut.%]=\"getCut(index)\"\n ></tui-svg>\n </div>\n</div>\n<input\n min=\"1\"\n type=\"range\"\n class=\"t-range\"\n [attr.aria-disabled]=\"readOnly\"\n [disabled]=\"computedDisabled\"\n [max]=\"max\"\n [(ngModel)]=\"value\"\n/>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiRepeatTimesModule} from '@taiga-ui/cdk';\nimport {TuiSvgModule} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiRatingComponent} from './rating.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiSvgModule,\n FormsModule,\n TuiRepeatTimesModule,\n PolymorpheusModule,\n ],\n declarations: [TuiRatingComponent],\n exports: [TuiRatingComponent],\n})\nexport class TuiRatingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AASa,MAAA,0BAA0B,GAAqB;AACxD,IAAA,IAAI,EAAE,CAAkB,gBAAA,CAAA;AACxB,IAAA,GAAG,EAAE,CAAC;EACR;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;;ACWM,MAAO,kBACT,SAAQ,kBAA0B,CAAA;AAelC,IAAA,WAAA,CAII,OAAyB,EACE,GAAsB,EACJ,OAAyB,EAAA;AAEtE,QAAA,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAFyB,IAAO,CAAA,OAAA,GAAP,OAAO,CAAkB;AAd1E,QAAA,IAAA,CAAA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AAA,UAAA,EAAA,CAAA;kBAX3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,YAAY;wBACZ,WAAW;wBACX,oBAAoB;wBACpB,kBAAkB;AACrB,qBAAA;oBACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAChC,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-rating.js","sources":["../../../projects/experimental/components/rating/rating.options.ts","../../../projects/experimental/components/rating/rating.component.ts","../../../projects/experimental/components/rating/rating.template.html","../../../projects/experimental/components/rating/rating.module.ts","../../../projects/experimental/components/rating/taiga-ui-experimental-components-rating.ts"],"sourcesContent":["import {Provider} from '@angular/core';\nimport {TuiContextWithImplicit, tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiRatingOptions {\n readonly icon: PolymorpheusContent<TuiContextWithImplicit<number>>;\n readonly max: number;\n}\n\nexport const TUI_RATING_DEFAULT_OPTIONS: TuiRatingOptions = {\n icon: `tuiIconStarLarge`,\n max: 5,\n};\n\nexport const TUI_RATING_OPTIONS = tuiCreateToken(TUI_RATING_DEFAULT_OPTIONS);\n\nexport function tuiRatingOptionsProvider(options: Partial<TuiRatingOptions>): Provider {\n return tuiProvideOptions(TUI_RATING_OPTIONS, options, TUI_RATING_DEFAULT_OPTIONS);\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n tuiClamp,\n TuiFocusableElementAccessor,\n tuiIsNativeFocused,\n} from '@taiga-ui/cdk';\n\nimport {TUI_RATING_OPTIONS, TuiRatingOptions} from './rating.options';\n\n@Component({\n selector: 'tui-rating',\n templateUrl: './rating.template.html',\n styleUrls: ['./rating.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiRatingComponent\n extends AbstractTuiControl<number>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(NgControl, {read: ElementRef, static: true})\n private readonly input?: ElementRef<HTMLInputElement>;\n\n @Input()\n icon = this.options.icon;\n\n @Input()\n max = this.options.max;\n\n @HostBinding('class._active')\n active = 0;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) cdr: ChangeDetectorRef,\n @Inject(TUI_RATING_OPTIONS) private readonly options: TuiRatingOptions,\n ) {\n super(control, cdr);\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return this.computedDisabled ? null : this.input?.nativeElement || null;\n }\n\n get focused(): boolean {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n\n @HostListener('keydown.capture', ['$event'])\n onKeyDown(event: KeyboardEvent): void {\n if (this.readOnly) {\n event.preventDefault();\n }\n }\n\n @HostListener('pointerdown', ['1'])\n @HostListener('pointercancel', ['-1'])\n @HostListener('document:pointerup', ['-1'])\n onPointer(delta: number): void {\n this.active = tuiClamp(this.active + delta, 0, 1);\n }\n\n onClick(value: number): void {\n if (this.active) {\n this.value = value;\n }\n }\n\n isActive(index: number): boolean {\n return Math.ceil(this.value) >= this.max - index;\n }\n\n isFraction(index: number): boolean {\n return this.value > this.max - index - 1 && this.value < this.max - index;\n }\n\n getCut(index: number): number {\n return this.isFraction(index)\n ? 100 * Math.max(this.max - index - this.value, 0)\n : 0;\n }\n\n protected getFallbackValue(): number {\n return 0;\n }\n}\n","<div class=\"t-items\">\n <div\n *tuiRepeatTimes=\"let index of max\"\n class=\"t-item\"\n [class.t-item_active]=\"isActive(index)\"\n (pointerup)=\"onClick(max - index)\"\n >\n <tui-icon\n *polymorpheusOutlet=\"icon as src; context: {$implicit: max - index}\"\n class=\"t-icon t-icon_blank\"\n [class.t-icon_fraction]=\"isFraction(index)\"\n [icon]=\"src.toString()\"\n [style.--t-cut.%]=\"100 - getCut(index)\"\n ></tui-icon>\n <tui-icon\n *polymorpheusOutlet=\"icon as src; context: {$implicit: max - index}\"\n class=\"t-icon\"\n [icon]=\"src.toString()\"\n [style.--t-cut.%]=\"getCut(index)\"\n ></tui-icon>\n </div>\n</div>\n<input\n min=\"1\"\n type=\"range\"\n class=\"t-range\"\n [attr.aria-disabled]=\"readOnly\"\n [disabled]=\"computedDisabled\"\n [max]=\"max\"\n [(ngModel)]=\"value\"\n/>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiRepeatTimesModule} from '@taiga-ui/cdk';\nimport {TuiIconModule} from '@taiga-ui/experimental/components/icon';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiRatingComponent} from './rating.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiIconModule,\n TuiRepeatTimesModule,\n PolymorpheusModule,\n ],\n declarations: [TuiRatingComponent],\n exports: [TuiRatingComponent],\n})\nexport class TuiRatingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AASa,MAAA,0BAA0B,GAAqB;AACxD,IAAA,IAAI,EAAE,CAAkB,gBAAA,CAAA;AACxB,IAAA,GAAG,EAAE,CAAC;EACR;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;;ACWM,MAAO,kBACT,SAAQ,kBAA0B,CAAA;AAelC,IAAA,WAAA,CAII,OAAyB,EACE,GAAsB,EACJ,OAAyB,EAAA;AAEtE,QAAA,KAAK,CAAC,OAAO,EA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Z,WAAW;YACX,aAAa;YACb,oBAAoB;YACpB,kBAAkB;AACrB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAIQ,eAAe,EAAA,UAAA,EAAA,CAAA;kBAX3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,aAAa;wBACb,oBAAoB;wBACpB,kBAAkB;AACrB,qBAAA;oBACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAChC,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
|
|
@@ -1,22 +1,35 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Component, ChangeDetectionStrategy, Inject, Input, HostBinding, NgModule } from '@angular/core';
|
|
3
3
|
import { TUI_INPUT_CARD_OPTIONS } from '@taiga-ui/addon-commerce';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import { TUI_ICON_RESOLVER } from '@taiga-ui/experimental/tokens';
|
|
5
|
+
import * as i1 from '@taiga-ui/experimental/components/icon';
|
|
6
|
+
import { TuiIconModule } from '@taiga-ui/experimental/components/icon';
|
|
6
7
|
import * as i2 from '@angular/common';
|
|
7
8
|
import { CommonModule } from '@angular/common';
|
|
8
9
|
|
|
9
10
|
class TuiThumbnailCardComponent {
|
|
10
|
-
constructor(options) {
|
|
11
|
+
constructor(resolver, options) {
|
|
12
|
+
this.resolver = resolver;
|
|
11
13
|
this.options = options;
|
|
12
14
|
this.size = 'm';
|
|
13
15
|
this.paymentSystem = null;
|
|
14
16
|
this.iconLeft = '';
|
|
15
17
|
this.iconRight = '';
|
|
16
18
|
}
|
|
19
|
+
// TODO: Revisit this approach in 4.0 when icons are moved away from InputCard options
|
|
20
|
+
get isMono() {
|
|
21
|
+
switch (this.paymentSystem) {
|
|
22
|
+
case 'mir':
|
|
23
|
+
case 'visa':
|
|
24
|
+
case 'electron':
|
|
25
|
+
return true;
|
|
26
|
+
default:
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
17
30
|
}
|
|
18
|
-
TuiThumbnailCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiThumbnailCardComponent, deps: [{ token: TUI_INPUT_CARD_OPTIONS }], target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
-
TuiThumbnailCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiThumbnailCardComponent, selector: "tui-thumbnail-card", inputs: { size: "size", paymentSystem: "paymentSystem", iconLeft: "iconLeft", iconRight: "iconRight" }, host: { properties: { "attr.data-size": "this.size" } }, ngImport: i0, template: "<div class=\"t-front\">\n <div\n *ngIf=\"iconLeft\"\n class=\"t-left\"\n >\n <tui-
|
|
31
|
+
TuiThumbnailCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiThumbnailCardComponent, deps: [{ token: TUI_ICON_RESOLVER }, { token: TUI_INPUT_CARD_OPTIONS }], target: i0.ɵɵFactoryTarget.Component });
|
|
32
|
+
TuiThumbnailCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiThumbnailCardComponent, selector: "tui-thumbnail-card", inputs: { size: "size", paymentSystem: "paymentSystem", iconLeft: "iconLeft", iconRight: "iconRight" }, host: { properties: { "attr.data-size": "this.size" } }, ngImport: i0, template: "<div class=\"t-front\">\n <div\n *ngIf=\"iconLeft\"\n class=\"t-left\"\n >\n <tui-icon\n class=\"t-icon\"\n [icon]=\"iconLeft\"\n ></tui-icon>\n </div>\n <div\n *ngIf=\"iconRight\"\n class=\"t-right\"\n >\n <tui-icon\n class=\"t-icon\"\n [icon]=\"iconRight\"\n ></tui-icon>\n </div>\n <ng-content></ng-content>\n <ng-container *ngIf=\"paymentSystem\">\n <tui-icon\n *ngIf=\"isMono; else colored\"\n class=\"t-logo\"\n [icon]=\"options.icons[paymentSystem]\"\n ></tui-icon>\n <ng-template #colored>\n <img\n class=\"t-logo\"\n [alt]=\"paymentSystem\"\n [src]=\"resolver(options.icons[paymentSystem]).replace('Outline', '')\"\n />\n </ng-template>\n </ng-container>\n</div>\n<div class=\"t-back\"></div>\n", styles: [":host{position:relative;display:inline-flex;background:#000;color:#fff;transform-style:preserve-3d;overflow:hidden}:host:before{position:absolute;top:0;left:0;width:100%;height:100%;content:\"\"}:host[data-size=s]{width:2.5rem;height:1.625rem;border-radius:.25rem;font-size:0}:host[data-size=s] .t-left{transform:translate(.125rem,.125rem) scale(.625)}:host[data-size=s] .t-right{display:none}:host[data-size=s] .t-logo{bottom:-.375rem;transform:scale(.55)}:host[data-size=m]{width:3rem;height:2rem;border-radius:.3125rem;text-indent:.1875rem;font:normal .5625rem/.875rem var(--tui-font-text)}:host[data-size=m] .t-left{transform:translate(.1875rem,.25rem) scale(.75)}:host[data-size=m] .t-right{transform:translate(-.1875rem,.1875rem) scale(.875)}:host[data-size=m] .t-right .t-icon{transform:scale(.714)}:host[data-size=m] .t-logo{bottom:-.3125rem;transform:scale(.55)}:host[data-size=l]{width:3.375rem;height:2.25rem;border-radius:.375rem;text-indent:.3125rem;font:normal .625rem/1.125rem var(--tui-font-text)}:host[data-size=l] .t-left{transform:translate(.1875rem,.1875rem)}:host[data-size=l] .t-right{transform:translate(-.1875rem,.1875rem)}:host[data-size=l] .t-logo{bottom:-.1875rem;transform:scale(.75)}.t-left,.t-right{position:absolute;top:0;display:flex}.t-left{left:0;transform-origin:top left}.t-right{right:0;transform-origin:top right}.t-right:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;border-radius:100%;background:currentColor;opacity:.35}.t-right .t-icon{color:#fff;transform:scale(.625)}.t-logo{position:absolute;right:.1875rem;width:1.5rem;height:1.5rem;transform-origin:right}.t-icon{width:1rem;height:1rem}.t-front{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:flex-end;-webkit-backface-visibility:hidden;backface-visibility:hidden;box-shadow:inset 0 0 0 1px var(--tui-clear);border-radius:inherit}.t-back{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:rotateY(180deg) translateZ(1px);background:#b0b0b0;border-radius:inherit}.t-back:after{position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";top:20%;bottom:60%;background:#959595}\n"], components: [{ type: i1.TuiIconComponent, selector: "tui-icon", inputs: ["icon", "background"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
20
33
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiThumbnailCardComponent, decorators: [{
|
|
21
34
|
type: Component,
|
|
22
35
|
args: [{
|
|
@@ -26,6 +39,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
26
39
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
27
40
|
}]
|
|
28
41
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
42
|
+
type: Inject,
|
|
43
|
+
args: [TUI_ICON_RESOLVER]
|
|
44
|
+
}] }, { type: undefined, decorators: [{
|
|
29
45
|
type: Inject,
|
|
30
46
|
args: [TUI_INPUT_CARD_OPTIONS]
|
|
31
47
|
}] }]; }, propDecorators: { size: [{
|
|
@@ -44,12 +60,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
44
60
|
class TuiThumbnailCardModule {
|
|
45
61
|
}
|
|
46
62
|
TuiThumbnailCardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiThumbnailCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
47
|
-
TuiThumbnailCardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiThumbnailCardModule, declarations: [TuiThumbnailCardComponent], imports: [CommonModule,
|
|
48
|
-
TuiThumbnailCardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiThumbnailCardModule, imports: [[CommonModule,
|
|
63
|
+
TuiThumbnailCardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiThumbnailCardModule, declarations: [TuiThumbnailCardComponent], imports: [CommonModule, TuiIconModule], exports: [TuiThumbnailCardComponent] });
|
|
64
|
+
TuiThumbnailCardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiThumbnailCardModule, imports: [[CommonModule, TuiIconModule]] });
|
|
49
65
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiThumbnailCardModule, decorators: [{
|
|
50
66
|
type: NgModule,
|
|
51
67
|
args: [{
|
|
52
|
-
imports: [CommonModule,
|
|
68
|
+
imports: [CommonModule, TuiIconModule],
|
|
53
69
|
declarations: [TuiThumbnailCardComponent],
|
|
54
70
|
exports: [TuiThumbnailCardComponent],
|
|
55
71
|
}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components-thumbnail-card.js","sources":["../../../projects/experimental/components/thumbnail-card/thumbnail-card.component.ts","../../../projects/experimental/components/thumbnail-card/thumbnail-card.template.html","../../../projects/experimental/components/thumbnail-card/thumbnail-card.module.ts","../../../projects/experimental/components/thumbnail-card/taiga-ui-experimental-components-thumbnail-card.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {\n TUI_INPUT_CARD_OPTIONS,\n TuiInputCardOptions,\n TuiPaymentSystem,\n} from '@taiga-ui/addon-commerce';\nimport {TuiSizeL, TuiSizeS} from '@taiga-ui/core';\n\n@Component({\n selector: 'tui-thumbnail-card',\n templateUrl: './thumbnail-card.template.html',\n styleUrls: ['./thumbnail-card.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiThumbnailCardComponent {\n @Input()\n @HostBinding('attr.data-size')\n size: TuiSizeL | TuiSizeS = 'm';\n\n @Input()\n paymentSystem: TuiPaymentSystem | null = null;\n\n @Input()\n iconLeft = '';\n\n @Input()\n iconRight = '';\n\n constructor(@Inject(TUI_INPUT_CARD_OPTIONS) readonly options: TuiInputCardOptions) {}\n}\n","<div class=\"t-front\">\n <div\n *ngIf=\"iconLeft\"\n class=\"t-left\"\n >\n <tui-
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-thumbnail-card.js","sources":["../../../projects/experimental/components/thumbnail-card/thumbnail-card.component.ts","../../../projects/experimental/components/thumbnail-card/thumbnail-card.template.html","../../../projects/experimental/components/thumbnail-card/thumbnail-card.module.ts","../../../projects/experimental/components/thumbnail-card/taiga-ui-experimental-components-thumbnail-card.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {\n TUI_INPUT_CARD_OPTIONS,\n TuiInputCardOptions,\n TuiPaymentSystem,\n} from '@taiga-ui/addon-commerce';\nimport {TuiStringHandler} from '@taiga-ui/cdk';\nimport {TuiSizeL, TuiSizeS} from '@taiga-ui/core';\nimport {TUI_ICON_RESOLVER} from '@taiga-ui/experimental/tokens';\n\n@Component({\n selector: 'tui-thumbnail-card',\n templateUrl: './thumbnail-card.template.html',\n styleUrls: ['./thumbnail-card.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiThumbnailCardComponent {\n @Input()\n @HostBinding('attr.data-size')\n size: TuiSizeL | TuiSizeS = 'm';\n\n @Input()\n paymentSystem: TuiPaymentSystem | null = null;\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_INPUT_CARD_OPTIONS) readonly options: TuiInputCardOptions,\n ) {}\n\n // TODO: Revisit this approach in 4.0 when icons are moved away from InputCard options\n get isMono(): boolean {\n switch (this.paymentSystem) {\n case 'mir':\n case 'visa':\n case 'electron':\n return true;\n default:\n return false;\n }\n }\n}\n","<div class=\"t-front\">\n <div\n *ngIf=\"iconLeft\"\n class=\"t-left\"\n >\n <tui-icon\n class=\"t-icon\"\n [icon]=\"iconLeft\"\n ></tui-icon>\n </div>\n <div\n *ngIf=\"iconRight\"\n class=\"t-right\"\n >\n <tui-icon\n class=\"t-icon\"\n [icon]=\"iconRight\"\n ></tui-icon>\n </div>\n <ng-content></ng-content>\n <ng-container *ngIf=\"paymentSystem\">\n <tui-icon\n *ngIf=\"isMono; else colored\"\n class=\"t-logo\"\n [icon]=\"options.icons[paymentSystem]\"\n ></tui-icon>\n <ng-template #colored>\n <img\n class=\"t-logo\"\n [alt]=\"paymentSystem\"\n [src]=\"resolver(options.icons[paymentSystem]).replace('Outline', '')\"\n />\n </ng-template>\n </ng-container>\n</div>\n<div class=\"t-back\"></div>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiIconModule} from '@taiga-ui/experimental/components/icon';\n\nimport {TuiThumbnailCardComponent} from './thumbnail-card.component';\n\n@NgModule({\n imports: [CommonModule, TuiIconModule],\n declarations: [TuiThumbnailCardComponent],\n exports: [TuiThumbnailCardComponent],\n})\nexport class TuiThumbnailCardModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAsBa,yBAAyB,CAAA;IAclC,WACwC,CAAA,QAAkC,EAC7B,OAA4B,EAAA;QADjC,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAA0B;QAC7B,IAAO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EAAE,aAAa,CAAC;oBACtC,YAAY,EAAE,CAAC,yBAAyB,CAAC;oBACzC,OAAO,EAAE,CAAC,yBAAyB,CAAC;AACvC,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Self, Inject, Optional, ViewChild, Input, HostListener, NgModule } from '@angular/core';
|
|
3
|
+
import { tuiCreateToken, tuiProvideOptions, tuiIsString, TuiDestroyService, TUI_PLATFORM } from '@taiga-ui/cdk';
|
|
4
|
+
import * as i4 from '@taiga-ui/core';
|
|
5
|
+
import { TuiHintOptionsDirective, TUI_MODE, TUI_HINT_OPTIONS, MODE_PROVIDER, TuiHintHoverDirective, TuiHintModule } from '@taiga-ui/core';
|
|
6
|
+
import * as i3 from '@taiga-ui/experimental/directives/appearance';
|
|
7
|
+
import { TuiAppearanceDirective, TuiAppearanceModule } from '@taiga-ui/experimental/directives/appearance';
|
|
8
|
+
import { takeUntil } from 'rxjs/operators';
|
|
9
|
+
import * as i1 from '@taiga-ui/experimental/components/button';
|
|
10
|
+
import { TuiButtonModule } from '@taiga-ui/experimental/components/button';
|
|
11
|
+
import * as i2 from '@taiga-ui/experimental/directives/icons';
|
|
12
|
+
import * as i5 from '@angular/common';
|
|
13
|
+
import { CommonModule } from '@angular/common';
|
|
14
|
+
import * as i6 from 'rxjs';
|
|
15
|
+
import { TuiIconModule } from '@taiga-ui/experimental/components/icon';
|
|
16
|
+
import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
17
|
+
|
|
18
|
+
const TUI_TOOLTIP_DEFAULT_OPTIONS = {
|
|
19
|
+
icons: `tuiIconHelpCircle`,
|
|
20
|
+
};
|
|
21
|
+
const TUI_TOOLTIP_OPTIONS = tuiCreateToken(TUI_TOOLTIP_DEFAULT_OPTIONS);
|
|
22
|
+
function tuiTooltipOptionsProvider(options) {
|
|
23
|
+
return tuiProvideOptions(TUI_TOOLTIP_OPTIONS, options, TUI_TOOLTIP_DEFAULT_OPTIONS);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// TODO: Turn into a directive with hint as hostDirective in 4.0
|
|
27
|
+
class TuiTooltipComponent extends TuiHintOptionsDirective {
|
|
28
|
+
constructor(destroy$, mode$, options, tooltipOptions, platform, iconAppearance) {
|
|
29
|
+
super(options);
|
|
30
|
+
this.tooltipOptions = tooltipOptions;
|
|
31
|
+
this.platform = platform;
|
|
32
|
+
this.iconAppearance = iconAppearance;
|
|
33
|
+
this.mode = null;
|
|
34
|
+
this.describeId = '';
|
|
35
|
+
mode$.pipe(takeUntil(destroy$)).subscribe(mode => {
|
|
36
|
+
this.mode = mode;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
get computedAppearance() {
|
|
40
|
+
return this.appearance || this.mode || '';
|
|
41
|
+
}
|
|
42
|
+
get tooltipIcon() {
|
|
43
|
+
const { icons } = this.tooltipOptions;
|
|
44
|
+
return tuiIsString(icons) ? icons : icons[this.platform];
|
|
45
|
+
}
|
|
46
|
+
stopOnMobile(event) {
|
|
47
|
+
var _a;
|
|
48
|
+
if (this.platform !== 'web') {
|
|
49
|
+
event.preventDefault();
|
|
50
|
+
event.stopPropagation();
|
|
51
|
+
}
|
|
52
|
+
(_a = this.driver$) === null || _a === void 0 ? void 0 : _a.toggle();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
TuiTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiTooltipComponent, deps: [{ token: TuiDestroyService, self: true }, { token: TUI_MODE }, { token: TUI_HINT_OPTIONS }, { token: TUI_TOOLTIP_OPTIONS }, { token: TUI_PLATFORM }, { token: TuiAppearanceDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
56
|
+
TuiTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiTooltipComponent, selector: "tui-tooltip", inputs: { content: "content", direction: "direction", appearance: "appearance", showDelay: "showDelay", hideDelay: "hideDelay", describeId: "describeId", context: "context" }, host: { listeners: { "mousedown": "stopOnMobile($event)" } }, providers: [TuiDestroyService, MODE_PROVIDER], viewQueries: [{ propertyName: "driver$", first: true, predicate: TuiHintHoverDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<button\n #driver=\"tuiHintHover\"\n automation-id=\"tui-tooltip__icon\"\n size=\"xs\"\n tuiIconButton\n class=\"t-tooltip-button\"\n [attr.tabindex]=\"describeId ? -1 : 0\"\n [iconLeft]=\"tooltipIcon\"\n [tuiAppearance]=\"iconAppearance?.tuiAppearance || 'icon'\"\n [tuiAppearanceState]=\"(driver | async) ? 'active' : null\"\n [tuiHint]=\"content\"\n [tuiHintAppearance]=\"computedAppearance\"\n [tuiHintContext]=\"context\"\n [tuiHintDescribe]=\"describeId\"\n [tuiHintDirection]=\"direction\"\n [tuiHintHideDelay]=\"hideDelay\"\n [tuiHintShowDelay]=\"showDelay\"\n></button>\n", styles: [":host{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;font-size:0;line-height:0;pointer-events:auto;border-radius:100%;cursor:pointer}.t-tooltip-button{border-radius:inherit;outline-offset:-4px}.t-tooltip-button:before{width:1rem;height:1rem}:host-context([tuiWrapper][data-appearance=\"textfield\"][data-state=\"disabled\"]) .t-tooltip-button{opacity:1}\n"], directives: [{ type: i1.TuiButtonDirective, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size", "appearance"] }, { type: i2.TuiIconsDirective, selector: "[iconLeft]:is(button,tui-badge,tui-chip),[iconRight]:is(button,tui-badge,tui-chip),[tuiBadge][iconLeft],[tuiBadge][iconRight],[tuiChip][iconLeft],[tuiChip][iconRight],[tuiButtonClose]", inputs: ["iconLeft", "iconRight"] }, { type: i3.TuiAppearanceDirective, selector: "[tuiAppearance]", inputs: ["tuiAppearance", "tuiAppearanceState", "tuiAppearanceFocus"] }, { type: i4.TuiHintDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"] }, { type: i4.TuiHintDriverDirective, selector: "[tuiHint]" }, { type: i4.TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHintShowDelay", "tuiHintHideDelay"], exportAs: ["tuiHintHover"] }, { type: i4.TuiHintPositionDirective, selector: "[tuiHint]:not([tuiHintCustomPosition])", inputs: ["tuiHintDirection"] }, { type: i4.TuiHintDescribeDirective, selector: "[tuiHintDescribe]", inputs: ["tuiHintDescribe"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiTooltipComponent, decorators: [{
|
|
58
|
+
type: Component,
|
|
59
|
+
args: [{
|
|
60
|
+
selector: 'tui-tooltip',
|
|
61
|
+
templateUrl: './tooltip.template.html',
|
|
62
|
+
styleUrls: ['./tooltip.style.less'],
|
|
63
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
64
|
+
providers: [TuiDestroyService, MODE_PROVIDER],
|
|
65
|
+
inputs: ['content', 'direction', 'appearance', 'showDelay', 'hideDelay'],
|
|
66
|
+
}]
|
|
67
|
+
}], ctorParameters: function () { return [{ type: i6.Observable, decorators: [{
|
|
68
|
+
type: Self
|
|
69
|
+
}, {
|
|
70
|
+
type: Inject,
|
|
71
|
+
args: [TuiDestroyService]
|
|
72
|
+
}] }, { type: i6.Observable, decorators: [{
|
|
73
|
+
type: Inject,
|
|
74
|
+
args: [TUI_MODE]
|
|
75
|
+
}] }, { type: undefined, decorators: [{
|
|
76
|
+
type: Inject,
|
|
77
|
+
args: [TUI_HINT_OPTIONS]
|
|
78
|
+
}] }, { type: undefined, decorators: [{
|
|
79
|
+
type: Inject,
|
|
80
|
+
args: [TUI_TOOLTIP_OPTIONS]
|
|
81
|
+
}] }, { type: undefined, decorators: [{
|
|
82
|
+
type: Inject,
|
|
83
|
+
args: [TUI_PLATFORM]
|
|
84
|
+
}] }, { type: i3.TuiAppearanceDirective, decorators: [{
|
|
85
|
+
type: Optional
|
|
86
|
+
}, {
|
|
87
|
+
type: Inject,
|
|
88
|
+
args: [TuiAppearanceDirective]
|
|
89
|
+
}] }]; }, propDecorators: { driver$: [{
|
|
90
|
+
type: ViewChild,
|
|
91
|
+
args: [TuiHintHoverDirective]
|
|
92
|
+
}], describeId: [{
|
|
93
|
+
type: Input
|
|
94
|
+
}], context: [{
|
|
95
|
+
type: Input
|
|
96
|
+
}], stopOnMobile: [{
|
|
97
|
+
type: HostListener,
|
|
98
|
+
args: ['mousedown', ['$event']]
|
|
99
|
+
}] } });
|
|
100
|
+
|
|
101
|
+
class TuiTooltipModule {
|
|
102
|
+
}
|
|
103
|
+
TuiTooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
104
|
+
TuiTooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiTooltipModule, declarations: [TuiTooltipComponent], imports: [CommonModule,
|
|
105
|
+
TuiAppearanceModule,
|
|
106
|
+
TuiHintModule,
|
|
107
|
+
TuiIconModule,
|
|
108
|
+
TuiButtonModule,
|
|
109
|
+
PolymorpheusModule], exports: [TuiTooltipComponent] });
|
|
110
|
+
TuiTooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiTooltipModule, imports: [[
|
|
111
|
+
CommonModule,
|
|
112
|
+
TuiAppearanceModule,
|
|
113
|
+
TuiHintModule,
|
|
114
|
+
TuiIconModule,
|
|
115
|
+
TuiButtonModule,
|
|
116
|
+
PolymorpheusModule,
|
|
117
|
+
]] });
|
|
118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiTooltipModule, decorators: [{
|
|
119
|
+
type: NgModule,
|
|
120
|
+
args: [{
|
|
121
|
+
imports: [
|
|
122
|
+
CommonModule,
|
|
123
|
+
TuiAppearanceModule,
|
|
124
|
+
TuiHintModule,
|
|
125
|
+
TuiIconModule,
|
|
126
|
+
TuiButtonModule,
|
|
127
|
+
PolymorpheusModule,
|
|
128
|
+
],
|
|
129
|
+
declarations: [TuiTooltipComponent],
|
|
130
|
+
exports: [TuiTooltipComponent],
|
|
131
|
+
}]
|
|
132
|
+
}] });
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Generated bundle index. Do not edit.
|
|
136
|
+
*/
|
|
137
|
+
|
|
138
|
+
export { TUI_TOOLTIP_DEFAULT_OPTIONS, TUI_TOOLTIP_OPTIONS, TuiTooltipComponent, TuiTooltipModule, tuiTooltipOptionsProvider };
|
|
139
|
+
//# sourceMappingURL=taiga-ui-experimental-components-tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-tooltip.js","sources":["../../../projects/experimental/components/tooltip/tooltip.options.ts","../../../projects/experimental/components/tooltip/tooltip.component.ts","../../../projects/experimental/components/tooltip/tooltip.template.html","../../../projects/experimental/components/tooltip/tooltip.module.ts","../../../projects/experimental/components/tooltip/taiga-ui-experimental-components-tooltip.ts"],"sourcesContent":["import {Provider} from '@angular/core';\nimport {tuiCreateToken, TuiPlatform, tuiProvideOptions} from '@taiga-ui/cdk';\n\nexport interface TuiTooltipOptions {\n readonly icons: Record<TuiPlatform, string> | string;\n}\n\nexport const TUI_TOOLTIP_DEFAULT_OPTIONS: TuiTooltipOptions = {\n icons: `tuiIconHelpCircle`,\n};\n\nexport const TUI_TOOLTIP_OPTIONS = tuiCreateToken(TUI_TOOLTIP_DEFAULT_OPTIONS);\n\nexport function tuiTooltipOptionsProvider(options: Partial<TuiTooltipOptions>): Provider {\n return tuiProvideOptions(TUI_TOOLTIP_OPTIONS, options, TUI_TOOLTIP_DEFAULT_OPTIONS);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n HostListener,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {TUI_PLATFORM, TuiDestroyService, tuiIsString, TuiPlatform} from '@taiga-ui/cdk';\nimport {\n MODE_PROVIDER,\n TUI_HINT_OPTIONS,\n TUI_MODE,\n TuiBrightness,\n TuiHintHoverDirective,\n TuiHintOptions,\n TuiHintOptionsDirective,\n} from '@taiga-ui/core';\nimport {TuiAppearanceDirective} from '@taiga-ui/experimental/directives/appearance';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nimport {TUI_TOOLTIP_OPTIONS, TuiTooltipOptions} from './tooltip.options';\n\n// TODO: Turn into a directive with hint as hostDirective in 4.0\n\n@Component({\n selector: 'tui-tooltip',\n templateUrl: './tooltip.template.html',\n styleUrls: ['./tooltip.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService, MODE_PROVIDER],\n inputs: ['content', 'direction', 'appearance', 'showDelay', 'hideDelay'],\n})\nexport class TuiTooltipComponent<C = any> extends TuiHintOptionsDirective {\n private mode: TuiBrightness | null = null;\n\n @ViewChild(TuiHintHoverDirective)\n readonly driver$?: TuiHintHoverDirective;\n\n @Input()\n describeId = '';\n\n @Input()\n context?: C;\n\n constructor(\n @Self() @Inject(TuiDestroyService) destroy$: Observable<unknown>,\n @Inject(TUI_MODE) mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_HINT_OPTIONS) options: TuiHintOptions,\n @Inject(TUI_TOOLTIP_OPTIONS) readonly tooltipOptions: TuiTooltipOptions,\n @Inject(TUI_PLATFORM) private readonly platform: TuiPlatform,\n @Optional()\n @Inject(TuiAppearanceDirective)\n readonly iconAppearance: TuiAppearanceDirective | null,\n ) {\n super(options);\n\n mode$.pipe(takeUntil(destroy$)).subscribe(mode => {\n this.mode = mode;\n });\n }\n\n get computedAppearance(): string {\n return this.appearance || this.mode || '';\n }\n\n get tooltipIcon(): string {\n const {icons} = this.tooltipOptions;\n\n return tuiIsString(icons) ? icons : icons[this.platform];\n }\n\n @HostListener('mousedown', ['$event'])\n stopOnMobile(event: MouseEvent): void {\n if (this.platform !== 'web') {\n event.preventDefault();\n event.stopPropagation();\n }\n\n this.driver$?.toggle();\n }\n}\n","<button\n #driver=\"tuiHintHover\"\n automation-id=\"tui-tooltip__icon\"\n size=\"xs\"\n tuiIconButton\n class=\"t-tooltip-button\"\n [attr.tabindex]=\"describeId ? -1 : 0\"\n [iconLeft]=\"tooltipIcon\"\n [tuiAppearance]=\"iconAppearance?.tuiAppearance || 'icon'\"\n [tuiAppearanceState]=\"(driver | async) ? 'active' : null\"\n [tuiHint]=\"content\"\n [tuiHintAppearance]=\"computedAppearance\"\n [tuiHintContext]=\"context\"\n [tuiHintDescribe]=\"describeId\"\n [tuiHintDirection]=\"direction\"\n [tuiHintHideDelay]=\"hideDelay\"\n [tuiHintShowDelay]=\"showDelay\"\n></button>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiHintModule} from '@taiga-ui/core';\nimport {TuiButtonModule} from '@taiga-ui/experimental/components/button';\nimport {TuiIconModule} from '@taiga-ui/experimental/components/icon';\nimport {TuiAppearanceModule} from '@taiga-ui/experimental/directives/appearance';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiTooltipComponent} from './tooltip.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiAppearanceModule,\n TuiHintModule,\n TuiIconModule,\n TuiButtonModule,\n PolymorpheusModule,\n ],\n declarations: [TuiTooltipComponent],\n exports: [TuiTooltipComponent],\n})\nexport class TuiTooltipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"m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QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,EAXhB,OAAA,EAAA,CAAA;YACL,YAAY;YACZ,mBAAmB;YACnB,aAAa;YACb,aAAa;YACb,eAAe;YACf,kBAAkB;AACrB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAIQ,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAZ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,mBAAmB;wBACnB,aAAa;wBACb,aAAa;wBACb,eAAe;wBACf,kBAAkB;AACrB,qBAAA;oBACD,YAAY,EAAE,CAAC,mBAAmB,CAAC;oBACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;AACjC,iBAAA,CAAA;;;ACrBD;;AAEG;;;;"}
|
|
@@ -5,12 +5,15 @@ export * from '@taiga-ui/experimental/components/badge-notification';
|
|
|
5
5
|
export * from '@taiga-ui/experimental/components/badged-content';
|
|
6
6
|
export * from '@taiga-ui/experimental/components/button';
|
|
7
7
|
export * from '@taiga-ui/experimental/components/checkbox';
|
|
8
|
+
export * from '@taiga-ui/experimental/components/chip';
|
|
8
9
|
export * from '@taiga-ui/experimental/components/compass';
|
|
9
10
|
export * from '@taiga-ui/experimental/components/icon';
|
|
11
|
+
export * from '@taiga-ui/experimental/components/pin';
|
|
10
12
|
export * from '@taiga-ui/experimental/components/radio';
|
|
11
13
|
export * from '@taiga-ui/experimental/components/rating';
|
|
12
14
|
export * from '@taiga-ui/experimental/components/thumbnail-card';
|
|
13
15
|
export * from '@taiga-ui/experimental/components/toggle';
|
|
16
|
+
export * from '@taiga-ui/experimental/components/tooltip';
|
|
14
17
|
|
|
15
18
|
/**
|
|
16
19
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components.js","sources":["../../../projects/experimental/components/taiga-ui-experimental-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components.js","sources":["../../../projects/experimental/components/taiga-ui-experimental-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;AAEG"}
|