@taiga-ui/kit 3.88.0 → 3.89.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-kit-components-checkbox.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.js +6 -0
- package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-textarea.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-textarea.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js +2 -2
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js.map +1 -1
- package/components/input-time/input-time.component.d.ts +1 -0
- package/esm2015/components/checkbox/checkbox.component.js +1 -1
- package/esm2015/components/input-password/input-password.component.js +2 -2
- package/esm2015/components/input-tag/input-tag.component.js +2 -2
- package/esm2015/components/input-time/input-time.component.js +7 -1
- package/esm2015/components/radio/radio.component.js +1 -1
- package/esm2015/components/tag/tag.component.js +1 -1
- package/esm2015/components/textarea/deprecated.js +1 -1
- package/esm2015/components/textarea/textarea.component.js +1 -1
- package/esm2015/components/toggle/toggle.component.js +1 -1
- package/esm2015/internal/primitive-calendar-range/primitive-calendar-range.component.js +3 -3
- package/fesm2015/taiga-ui-kit-components-checkbox.js +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js +6 -0
- package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio.js +1 -1
- package/fesm2015/taiga-ui-kit-components-radio.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tag.js +1 -1
- package/fesm2015/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-textarea.js +2 -2
- package/fesm2015/taiga-ui-kit-components-textarea.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-toggle.js +1 -1
- package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js +2 -2
- package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js.map +1 -1
- package/package.json +4 -4
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
return TuiTagComponent;
|
|
167
167
|
}());
|
|
168
168
|
TuiTagComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiTagComponent, deps: [{ token: i0.ElementRef }, { token: i1.TUI_MODE }, { token: TUI_TAG_OPTIONS }, { token: i1.TUI_COMMON_ICONS }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
169
|
-
TuiTagComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiTagComponent, selector: "tui-tag, a[tuiTag], button[tuiTag]", inputs: { value: "value", editable: "editable", separator: "separator", maxLength: "maxLength", size: "size", showLoader: "showLoader", status: "status", hoverable: "hoverable", removable: "removable", disabled: "disabled", autoColor: "autoColor", leftContent: "leftContent" }, outputs: { edited: "edited" }, host: { listeners: { "$.data-mode.attr": "mode$", "keydown.enter": "edit($event)", "keydown.delete": "remove($event)", "keydown.backspace": "remove($event)" }, properties: { "attr.data-size": "this.size", "attr.data-status": "this.status", "class._hoverable": "this.hoverable", "class._disabled": "this.disabled", "class._autocolor": "this.autoColor", "class._editing": "this.editing" } }, providers: [i1.MODE_PROVIDER], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, read: i0.ElementRef }], ngImport: i0__namespace, template: "<div\n class=\"t-tag\"\n [style.backgroundColor]=\"backgroundColor\"\n (dblclick)=\"edit($event)\"\n>\n <div\n *ngIf=\"leftContent\"\n class=\"t-content\"\n >\n <ng-container *polymorpheusOutlet=\"leftContent as text\">\n {{ text }}\n </ng-container>\n </div>\n <span\n automation-id=\"tui-tag__text\"\n class=\"t-text\"\n [textContent]=\"displayText\"\n ></span>\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"t-content\"\n [inheritColor]=\"true\"\n [size]=\"loaderSize\"\n ></tui-loader>\n <tui-svg\n *ngIf=\"canRemove\"\n automation-id=\"tui-tag__remove\"\n class=\"t-icon\"\n [src]=\"icons.close\"\n (click)=\"remove($event)\"\n (mousedown.stop.prevent.silent)=\"(0)\"\n ></tui-svg>\n</div>\n<input\n *ngIf=\"editing\"\n #input\n automation-id=\"tui-tag__edit\"\n type=\"text\"\n class=\"t-edit\"\n [attr.maxLength]=\"maxLength\"\n [ngModel]=\"editedText\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\"\n (ngModelChange)=\"onInput($event)\"\n/>\n", styles: [":host{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:inline-block;font:var(--tui-font-text-s);line-height:1.25rem;max-width:100%;cursor:default;outline:none;text-decoration:none;padding:0;border:0}:host:after{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:0;left:0;width:100%;height:100%;content:\"\";box-sizing:border-box;border-radius:inherit;pointer-events:none}:host._hoverable:hover[data-status=custom]:after,:host._hoverable:active[data-status=custom]:after{background-color:var(--tui-clear)}:host:focus:after{border:2px solid var(--tui-focus)}:host[data-size=s]{font:var(--tui-font-text-xs);line-height:1.25rem;border-radius:var(--tui-radius-xs)}:host[data-size=m]{border-radius:var(--tui-radius-xs)}:host[data-size=l]{border-radius:var(--tui-radius-s)}:host[data-status=primary]{background-color:var(--tui-primary);color:var(--tui-primary-text)}:host[data-status=primary]._hoverable:hover{background-color:var(--tui-primary-hover)}:host[data-status=primary]._hoverable:active{background-color:var(--tui-primary-active)}:host[data-status=error]{background-color:var(--tui-error-bg);color:var(--tui-text-01)}:host[data-status=error]._hoverable:hover,:host[data-status=error]._hoverable:active{background-color:var(--tui-error-bg-hover)}:host[data-status=error][data-mode=onDark]{background-color:var(--tui-error-bg-night);color:var(--tui-text-01-night)}:host[data-status=error][data-mode=onDark]._hoverable:hover,:host[data-status=error][data-mode=onDark]._hoverable:active{background-color:var(--tui-error-bg-night-hover)}:host[data-status=success]{background-color:var(--tui-success-bg);color:var(--tui-text-01)}:host[data-status=success]._hoverable:hover,:host[data-status=success]._hoverable:active{background-color:var(--tui-success-bg-hover)}:host[data-status=success][data-mode=onDark]{background-color:var(--tui-success-bg-night);color:var(--tui-text-01-night)}:host[data-status=success][data-mode=onDark]._hoverable:hover,:host[data-status=success][data-mode=onDark]._hoverable:active{background-color:var(--tui-success-bg-night-hover)}:host[data-status=warning]{background-color:var(--tui-warning-bg);color:var(--tui-text-01)}:host[data-status=warning]._hoverable:hover,:host[data-status=warning]._hoverable:active{background-color:var(--tui-warning-bg-hover)}:host[data-status=warning][data-mode=onDark]{background-color:var(--tui-warning-bg-night);color:var(--tui-text-01-night)}:host[data-status=warning][data-mode=onDark]._hoverable:hover,:host[data-status=warning][data-mode=onDark]._hoverable:active{background-color:var(--tui-warning-bg-night-hover)}:host[data-status=default]{color:var(--tui-text-01-night);background-color:var(--tui-base-06)}:host[data-status=default]:not([data-mode])._hoverable:hover{background-color:var(--tui-base-07)}:host[data-status=default]:not([data-mode])._hoverable:active{background-color:var(--tui-base-08)}:host[data-status=default][data-mode=onDark]{color:var(--tui-text-01-night);background-color:var(--tui-clear-inverse)}:host[data-status=default][data-mode=onDark]._hoverable:hover{background-color:var(--tui-clear-inverse-hover)}:host[data-status=default][data-mode=onDark]._hoverable:active{background-color:var(--tui-clear-inverse-active)}:host[data-status=default][data-mode=onDark]:focus:after{border:2px solid var(--tui-base-01)}:host[data-status=default][data-mode=onLight]{background-color:var(--tui-clear);color:var(--tui-text-01)}:host[data-status=default][data-mode=onLight]._hoverable:hover{background-color:var(--tui-clear-hover)}:host[data-status=default][data-mode=onLight]._hoverable:active{background-color:var(--tui-clear-active)}:host._editing{background:transparent!important}:host._disabled{pointer-events:none;opacity:var(--tui-disabled-opacity)}:host._hoverable{cursor:pointer}:host._autocolor{color:#000c}.t-text{white-space:pre;overflow:hidden;text-overflow:ellipsis;padding-right:.02em}.t-tag{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;display:flex;width:auto;align-items:center;font:inherit;border-radius:inherit}:host[data-size=s] .t-tag{height:1.25rem;padding:0 .375rem}:host[data-size=m] .t-tag{height:var(--tui-height-xs);padding:0 .5rem}:host[data-size=l] .t-tag{height:var(--tui-height-s);padding:0 .75rem}:host._editing .t-tag{visibility:hidden}.t-edit{margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;font:inherit;color:var(--tui-text-01);width:100%;height:100%;box-sizing:border-box;padding:0 .5rem}.t-edit:-webkit-autofill,.t-edit:-webkit-autofill:hover,.t-edit:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}
|
|
169
|
+
TuiTagComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiTagComponent, selector: "tui-tag, a[tuiTag], button[tuiTag]", inputs: { value: "value", editable: "editable", separator: "separator", maxLength: "maxLength", size: "size", showLoader: "showLoader", status: "status", hoverable: "hoverable", removable: "removable", disabled: "disabled", autoColor: "autoColor", leftContent: "leftContent" }, outputs: { edited: "edited" }, host: { listeners: { "$.data-mode.attr": "mode$", "keydown.enter": "edit($event)", "keydown.delete": "remove($event)", "keydown.backspace": "remove($event)" }, properties: { "attr.data-size": "this.size", "attr.data-status": "this.status", "class._hoverable": "this.hoverable", "class._disabled": "this.disabled", "class._autocolor": "this.autoColor", "class._editing": "this.editing" } }, providers: [i1.MODE_PROVIDER], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, read: i0.ElementRef }], ngImport: i0__namespace, template: "<div\n class=\"t-tag\"\n [style.backgroundColor]=\"backgroundColor\"\n (dblclick)=\"edit($event)\"\n>\n <div\n *ngIf=\"leftContent\"\n class=\"t-content\"\n >\n <ng-container *polymorpheusOutlet=\"leftContent as text\">\n {{ text }}\n </ng-container>\n </div>\n <span\n automation-id=\"tui-tag__text\"\n class=\"t-text\"\n [textContent]=\"displayText\"\n ></span>\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"t-content\"\n [inheritColor]=\"true\"\n [size]=\"loaderSize\"\n ></tui-loader>\n <tui-svg\n *ngIf=\"canRemove\"\n automation-id=\"tui-tag__remove\"\n class=\"t-icon\"\n [src]=\"icons.close\"\n (click)=\"remove($event)\"\n (mousedown.stop.prevent.silent)=\"(0)\"\n ></tui-svg>\n</div>\n<input\n *ngIf=\"editing\"\n #input\n automation-id=\"tui-tag__edit\"\n type=\"text\"\n class=\"t-edit\"\n [attr.maxLength]=\"maxLength\"\n [ngModel]=\"editedText\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\"\n (ngModelChange)=\"onInput($event)\"\n/>\n", styles: [":host{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:inline-block;font:var(--tui-font-text-s);line-height:1.25rem;max-width:100%;cursor:default;outline:none;text-decoration:none;padding:0;border:0}:host:after{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:0;left:0;width:100%;height:100%;content:\"\";box-sizing:border-box;border-radius:inherit;pointer-events:none}:host._hoverable:hover[data-status=custom]:after,:host._hoverable:active[data-status=custom]:after{background-color:var(--tui-clear)}:host:focus:after{border:2px solid var(--tui-focus)}:host[data-size=s]{font:var(--tui-font-text-xs);line-height:1.25rem;border-radius:var(--tui-radius-xs)}:host[data-size=m]{border-radius:var(--tui-radius-xs)}:host[data-size=l]{border-radius:var(--tui-radius-s)}:host[data-status=primary]{background-color:var(--tui-primary);color:var(--tui-primary-text)}:host[data-status=primary]._hoverable:hover{background-color:var(--tui-primary-hover)}:host[data-status=primary]._hoverable:active{background-color:var(--tui-primary-active)}:host[data-status=error]{background-color:var(--tui-error-bg);color:var(--tui-text-01)}:host[data-status=error]._hoverable:hover,:host[data-status=error]._hoverable:active{background-color:var(--tui-error-bg-hover)}:host[data-status=error][data-mode=onDark]{background-color:var(--tui-error-bg-night);color:var(--tui-text-01-night)}:host[data-status=error][data-mode=onDark]._hoverable:hover,:host[data-status=error][data-mode=onDark]._hoverable:active{background-color:var(--tui-error-bg-night-hover)}:host[data-status=success]{background-color:var(--tui-success-bg);color:var(--tui-text-01)}:host[data-status=success]._hoverable:hover,:host[data-status=success]._hoverable:active{background-color:var(--tui-success-bg-hover)}:host[data-status=success][data-mode=onDark]{background-color:var(--tui-success-bg-night);color:var(--tui-text-01-night)}:host[data-status=success][data-mode=onDark]._hoverable:hover,:host[data-status=success][data-mode=onDark]._hoverable:active{background-color:var(--tui-success-bg-night-hover)}:host[data-status=warning]{background-color:var(--tui-warning-bg);color:var(--tui-text-01)}:host[data-status=warning]._hoverable:hover,:host[data-status=warning]._hoverable:active{background-color:var(--tui-warning-bg-hover)}:host[data-status=warning][data-mode=onDark]{background-color:var(--tui-warning-bg-night);color:var(--tui-text-01-night)}:host[data-status=warning][data-mode=onDark]._hoverable:hover,:host[data-status=warning][data-mode=onDark]._hoverable:active{background-color:var(--tui-warning-bg-night-hover)}:host[data-status=default]{color:var(--tui-text-01-night);background-color:var(--tui-base-06)}:host[data-status=default]:not([data-mode])._hoverable:hover{background-color:var(--tui-base-07)}:host[data-status=default]:not([data-mode])._hoverable:active{background-color:var(--tui-base-08)}:host[data-status=default][data-mode=onDark]{color:var(--tui-text-01-night);background-color:var(--tui-clear-inverse)}:host[data-status=default][data-mode=onDark]._hoverable:hover{background-color:var(--tui-clear-inverse-hover)}:host[data-status=default][data-mode=onDark]._hoverable:active{background-color:var(--tui-clear-inverse-active)}:host[data-status=default][data-mode=onDark]:focus:after{border:2px solid var(--tui-base-01)}:host[data-status=default][data-mode=onLight]{background-color:var(--tui-clear);color:var(--tui-text-01)}:host[data-status=default][data-mode=onLight]._hoverable:hover{background-color:var(--tui-clear-hover)}:host[data-status=default][data-mode=onLight]._hoverable:active{background-color:var(--tui-clear-active)}:host._editing{background:transparent!important}:host._disabled{pointer-events:none;opacity:var(--tui-disabled-opacity)}:host._hoverable{cursor:pointer}:host._autocolor{color:#000c}.t-text{white-space:pre;overflow:hidden;text-overflow:ellipsis;padding-right:.02em}.t-tag{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;display:flex;width:auto;align-items:center;font:inherit;border-radius:inherit}:host[data-size=s] .t-tag{height:1.25rem;padding:0 .375rem}:host[data-size=m] .t-tag{height:var(--tui-height-xs);padding:0 .5rem}:host[data-size=l] .t-tag{height:var(--tui-height-s);padding:0 .75rem}:host._editing .t-tag{visibility:hidden}.t-edit{margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;font:inherit;color:var(--tui-text-01);width:100%;height:100%;box-sizing:border-box;padding:0 .5rem}.t-edit:-webkit-autofill,.t-edit:-webkit-autofill:hover,.t-edit:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}:host[data-size=s] .t-edit{padding:0 .375rem}:host[data-size=m] .t-edit{padding:0 .5rem}:host[data-size=l] .t-edit{padding:0 .75rem}.t-icon{width:1rem;height:100%;cursor:pointer;pointer-events:all;opacity:var(--tui-disabled-opacity);-webkit-margin-start:.25rem;margin-inline-start:.25rem;-webkit-margin-end:-.25rem;margin-inline-end:-.25rem}.t-icon:hover{opacity:1}:host[data-size=s] .t-icon{-webkit-margin-start:0;margin-inline-start:0}:host[data-size=s] .t-icon ::ng-deep svg{transform:scale(.75)}.t-content{width:1rem;height:1rem;-webkit-margin-end:.25rem;margin-inline-end:.25rem}\n"], components: [{ type: i1__namespace.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { type: i1__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i4__namespace.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__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
170
170
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiTagComponent, decorators: [{
|
|
171
171
|
type: i0.Component,
|
|
172
172
|
args: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-tag.umd.js","sources":["../../../projects/kit/components/tag/tag.options.ts","../../../projects/kit/components/tag/tag.component.ts","../../../projects/kit/components/tag/tag.template.html","../../../projects/kit/components/tag/tag.module.ts","../../../projects/kit/components/tag/taiga-ui-kit-components-tag.ts"],"sourcesContent":["import {Provider} from '@angular/core';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk';\nimport {TuiSizeL, TuiSizeS} from '@taiga-ui/core';\nimport {TuiStatus} from '@taiga-ui/kit/types';\n\nexport interface TuiTagOptions {\n readonly autoColor: boolean;\n readonly size: TuiSizeL | TuiSizeS;\n readonly status: TuiStatus;\n}\n\n/** Default values for the tag options. */\nexport const TUI_TAG_DEFAULT_OPTIONS: TuiTagOptions = {\n size: 'm',\n status: 'default',\n autoColor: false,\n};\n\n/**\n * Default parameters for Tag component\n */\nexport const TUI_TAG_OPTIONS = tuiCreateToken(TUI_TAG_DEFAULT_OPTIONS);\n\nexport function tuiTagOptionsProvider(options: Partial<TuiTagOptions>): Provider {\n return tuiProvideOptions(TUI_TAG_OPTIONS, options, TUI_TAG_DEFAULT_OPTIONS);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport {\n MODE_PROVIDER,\n TUI_COMMON_ICONS,\n TUI_MODE,\n TuiBrightness,\n TuiCommonIcons,\n tuiSizeBigger,\n TuiSizeL,\n TuiSizeS,\n TuiSizeXS,\n} from '@taiga-ui/core';\nimport {TuiStatus} from '@taiga-ui/kit/types';\nimport {tuiStringHashToHsl} from '@taiga-ui/kit/utils/format';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TUI_TAG_OPTIONS, TuiTagOptions} from './tag.options';\n\n@Component({\n selector: 'tui-tag, a[tuiTag], button[tuiTag]',\n templateUrl: './tag.template.html',\n styleUrls: ['./tag.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [MODE_PROVIDER],\n host: {\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiTagComponent {\n // TODO: Possibly implement standard focus mechanisms and outline\n @Input()\n value = '';\n\n @Input()\n editable = false;\n\n @Input()\n separator: RegExp | string = ',';\n\n @Input()\n maxLength: number | null = null;\n\n @Input()\n @HostBinding('attr.data-size')\n size: TuiSizeL | TuiSizeS = this.options.size;\n\n @Input()\n showLoader = false;\n\n @Input()\n @HostBinding('attr.data-status')\n status: TuiStatus = this.options.status;\n\n @Input()\n @HostBinding('class._hoverable')\n hoverable = false;\n\n @Input()\n removable = false;\n\n @Input()\n @HostBinding('class._disabled')\n disabled = false;\n\n @Input()\n @HostBinding('class._autocolor')\n autoColor: boolean = this.options.autoColor;\n\n @Input()\n leftContent: PolymorpheusContent;\n\n @Output()\n readonly edited = new EventEmitter<string>();\n\n @HostBinding('class._editing')\n editing = false;\n\n editedText: string | null = null;\n\n @ViewChild('input', {read: ElementRef})\n set input(input: ElementRef<HTMLInputElement>) {\n if (input) {\n input.nativeElement.focus();\n }\n }\n\n constructor(\n @Inject(ElementRef) private readonly el: ElementRef<HTMLElement>,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_TAG_OPTIONS) private readonly options: TuiTagOptions,\n @Inject(TUI_COMMON_ICONS) readonly icons: TuiCommonIcons,\n ) {}\n\n get backgroundColor(): string | null {\n return this.autoColor ? tuiStringHashToHsl(this.value) : null;\n }\n\n get canRemove(): boolean {\n return this.removable && !this.disabled && !this.showLoader;\n }\n\n get displayText(): string {\n return this.editedText === null ? this.value : this.editedText;\n }\n\n get loaderSize(): TuiSizeXS {\n return tuiSizeBigger(this.size) ? 's' : 'xs';\n }\n\n @HostListener('keydown.enter', ['$event'])\n edit(event: Event): void {\n if (!this.canEdit) {\n return;\n }\n\n event.preventDefault();\n this.editing = true;\n this.editedText = this.value;\n }\n\n @HostListener('keydown.delete', ['$event'])\n @HostListener('keydown.backspace', ['$event'])\n remove(event: Event): void {\n if (!this.canRemove) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n this.edited.emit('');\n }\n\n onInput(value: string): void {\n const newTags = value.split(this.separator);\n\n if (newTags.length > 1) {\n this.save(String(newTags));\n\n return;\n }\n\n this.editedText = value;\n }\n\n onKeyDown(event: KeyboardEvent): void {\n event.stopPropagation();\n\n switch (event.key.toLowerCase()) {\n case 'enter':\n event.preventDefault();\n this.save(this.editedText || '');\n break;\n case 'escape':\n case 'esc':\n event.preventDefault();\n this.stopEditing();\n this.el.nativeElement.focus();\n break;\n default:\n break;\n }\n }\n\n onBlur(): void {\n if (this.editedText !== null) {\n this.save(this.editedText);\n }\n }\n\n private get canEdit(): boolean {\n return this.editable && !this.disabled && !this.showLoader;\n }\n\n private stopEditing(): void {\n this.editing = false;\n this.editedText = null;\n }\n\n private save(value: string): void {\n this.stopEditing();\n this.edited.emit(value.trim());\n }\n}\n","<div\n class=\"t-tag\"\n [style.backgroundColor]=\"backgroundColor\"\n (dblclick)=\"edit($event)\"\n>\n <div\n *ngIf=\"leftContent\"\n class=\"t-content\"\n >\n <ng-container *polymorpheusOutlet=\"leftContent as text\">\n {{ text }}\n </ng-container>\n </div>\n <span\n automation-id=\"tui-tag__text\"\n class=\"t-text\"\n [textContent]=\"displayText\"\n ></span>\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"t-content\"\n [inheritColor]=\"true\"\n [size]=\"loaderSize\"\n ></tui-loader>\n <tui-svg\n *ngIf=\"canRemove\"\n automation-id=\"tui-tag__remove\"\n class=\"t-icon\"\n [src]=\"icons.close\"\n (click)=\"remove($event)\"\n (mousedown.stop.prevent.silent)=\"(0)\"\n ></tui-svg>\n</div>\n<input\n *ngIf=\"editing\"\n #input\n automation-id=\"tui-tag__edit\"\n type=\"text\"\n class=\"t-edit\"\n [attr.maxLength]=\"maxLength\"\n [ngModel]=\"editedText\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\"\n (ngModelChange)=\"onInput($event)\"\n/>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiLoaderModule, TuiSvgModule} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiTagComponent} from './tag.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiSvgModule,\n TuiLoaderModule,\n PolymorpheusModule,\n ],\n declarations: [TuiTagComponent],\n exports: [TuiTagComponent],\n})\nexport class TuiTagModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["tuiCreateToken","tuiProvideOptions","EventEmitter","tuiStringHashToHsl","tuiSizeBigger","i0","ElementRef","TUI_MODE","TUI_COMMON_ICONS","MODE_PROVIDER","i1","i2","i3","i4","Component","ChangeDetectionStrategy","Inject","Input","HostBinding","Output","ViewChild","HostListener","CommonModule","FormsModule","TuiSvgModule","TuiLoaderModule","PolymorpheusModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWA;AACa,QAAA,uBAAuB,GAAkB;IAClD,IAAA,IAAI,EAAE,GAAG;IACT,IAAA,MAAM,EAAE,SAAS;IACjB,IAAA,SAAS,EAAE,KAAK;MAClB;IAEF;;IAEG;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AA,EAAA,CAAA,CAAA;sHAIQ,YAAY,EAAA,UAAA,EAAA,CAAA;sBAXxBC,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;IACN,oBAAA,OAAO,EAAE;4BACLL,eAAY;4BACZC,cAAW;4BACXC,eAAY;4BACZC,kBAAe;4BACfC,qBAAkB;IACrB,qBAAA;wBACD,YAAY,EAAE,CAAC,eAAe,CAAC;wBAC/B,OAAO,EAAE,CAAC,eAAe,CAAC;qBAC7B,CAAA;;;IClBD;;IAEG;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-tag.umd.js","sources":["../../../projects/kit/components/tag/tag.options.ts","../../../projects/kit/components/tag/tag.component.ts","../../../projects/kit/components/tag/tag.template.html","../../../projects/kit/components/tag/tag.module.ts","../../../projects/kit/components/tag/taiga-ui-kit-components-tag.ts"],"sourcesContent":["import {Provider} from '@angular/core';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk';\nimport {TuiSizeL, TuiSizeS} from '@taiga-ui/core';\nimport {TuiStatus} from '@taiga-ui/kit/types';\n\nexport interface TuiTagOptions {\n readonly autoColor: boolean;\n readonly size: TuiSizeL | TuiSizeS;\n readonly status: TuiStatus;\n}\n\n/** Default values for the tag options. */\nexport const TUI_TAG_DEFAULT_OPTIONS: TuiTagOptions = {\n size: 'm',\n status: 'default',\n autoColor: false,\n};\n\n/**\n * Default parameters for Tag component\n */\nexport const TUI_TAG_OPTIONS = tuiCreateToken(TUI_TAG_DEFAULT_OPTIONS);\n\nexport function tuiTagOptionsProvider(options: Partial<TuiTagOptions>): Provider {\n return tuiProvideOptions(TUI_TAG_OPTIONS, options, TUI_TAG_DEFAULT_OPTIONS);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport {\n MODE_PROVIDER,\n TUI_COMMON_ICONS,\n TUI_MODE,\n TuiBrightness,\n TuiCommonIcons,\n tuiSizeBigger,\n TuiSizeL,\n TuiSizeS,\n TuiSizeXS,\n} from '@taiga-ui/core';\nimport {TuiStatus} from '@taiga-ui/kit/types';\nimport {tuiStringHashToHsl} from '@taiga-ui/kit/utils/format';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TUI_TAG_OPTIONS, TuiTagOptions} from './tag.options';\n\n@Component({\n selector: 'tui-tag, a[tuiTag], button[tuiTag]',\n templateUrl: './tag.template.html',\n styleUrls: ['./tag.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [MODE_PROVIDER],\n host: {\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiTagComponent {\n // TODO: Possibly implement standard focus mechanisms and outline\n @Input()\n value = '';\n\n @Input()\n editable = false;\n\n @Input()\n separator: RegExp | string = ',';\n\n @Input()\n maxLength: number | null = null;\n\n @Input()\n @HostBinding('attr.data-size')\n size: TuiSizeL | TuiSizeS = this.options.size;\n\n @Input()\n showLoader = false;\n\n @Input()\n @HostBinding('attr.data-status')\n status: TuiStatus = this.options.status;\n\n @Input()\n @HostBinding('class._hoverable')\n hoverable = false;\n\n @Input()\n removable = false;\n\n @Input()\n @HostBinding('class._disabled')\n disabled = false;\n\n @Input()\n @HostBinding('class._autocolor')\n autoColor: boolean = this.options.autoColor;\n\n @Input()\n leftContent: PolymorpheusContent;\n\n @Output()\n readonly edited = new EventEmitter<string>();\n\n @HostBinding('class._editing')\n editing = false;\n\n editedText: string | null = null;\n\n @ViewChild('input', {read: ElementRef})\n set input(input: ElementRef<HTMLInputElement>) {\n if (input) {\n input.nativeElement.focus();\n }\n }\n\n constructor(\n @Inject(ElementRef) private readonly el: ElementRef<HTMLElement>,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_TAG_OPTIONS) private readonly options: TuiTagOptions,\n @Inject(TUI_COMMON_ICONS) readonly icons: TuiCommonIcons,\n ) {}\n\n get backgroundColor(): string | null {\n return this.autoColor ? tuiStringHashToHsl(this.value) : null;\n }\n\n get canRemove(): boolean {\n return this.removable && !this.disabled && !this.showLoader;\n }\n\n get displayText(): string {\n return this.editedText === null ? this.value : this.editedText;\n }\n\n get loaderSize(): TuiSizeXS {\n return tuiSizeBigger(this.size) ? 's' : 'xs';\n }\n\n @HostListener('keydown.enter', ['$event'])\n edit(event: Event): void {\n if (!this.canEdit) {\n return;\n }\n\n event.preventDefault();\n this.editing = true;\n this.editedText = this.value;\n }\n\n @HostListener('keydown.delete', ['$event'])\n @HostListener('keydown.backspace', ['$event'])\n remove(event: Event): void {\n if (!this.canRemove) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n this.edited.emit('');\n }\n\n onInput(value: string): void {\n const newTags = value.split(this.separator);\n\n if (newTags.length > 1) {\n this.save(String(newTags));\n\n return;\n }\n\n this.editedText = value;\n }\n\n onKeyDown(event: KeyboardEvent): void {\n event.stopPropagation();\n\n switch (event.key.toLowerCase()) {\n case 'enter':\n event.preventDefault();\n this.save(this.editedText || '');\n break;\n case 'escape':\n case 'esc':\n event.preventDefault();\n this.stopEditing();\n this.el.nativeElement.focus();\n break;\n default:\n break;\n }\n }\n\n onBlur(): void {\n if (this.editedText !== null) {\n this.save(this.editedText);\n }\n }\n\n private get canEdit(): boolean {\n return this.editable && !this.disabled && !this.showLoader;\n }\n\n private stopEditing(): void {\n this.editing = false;\n this.editedText = null;\n }\n\n private save(value: string): void {\n this.stopEditing();\n this.edited.emit(value.trim());\n }\n}\n","<div\n class=\"t-tag\"\n [style.backgroundColor]=\"backgroundColor\"\n (dblclick)=\"edit($event)\"\n>\n <div\n *ngIf=\"leftContent\"\n class=\"t-content\"\n >\n <ng-container *polymorpheusOutlet=\"leftContent as text\">\n {{ text }}\n </ng-container>\n </div>\n <span\n automation-id=\"tui-tag__text\"\n class=\"t-text\"\n [textContent]=\"displayText\"\n ></span>\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"t-content\"\n [inheritColor]=\"true\"\n [size]=\"loaderSize\"\n ></tui-loader>\n <tui-svg\n *ngIf=\"canRemove\"\n automation-id=\"tui-tag__remove\"\n class=\"t-icon\"\n [src]=\"icons.close\"\n (click)=\"remove($event)\"\n (mousedown.stop.prevent.silent)=\"(0)\"\n ></tui-svg>\n</div>\n<input\n *ngIf=\"editing\"\n #input\n automation-id=\"tui-tag__edit\"\n type=\"text\"\n class=\"t-edit\"\n [attr.maxLength]=\"maxLength\"\n [ngModel]=\"editedText\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\"\n (ngModelChange)=\"onInput($event)\"\n/>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiLoaderModule, TuiSvgModule} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiTagComponent} from './tag.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiSvgModule,\n TuiLoaderModule,\n PolymorpheusModule,\n ],\n declarations: [TuiTagComponent],\n exports: [TuiTagComponent],\n})\nexport class TuiTagModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["tuiCreateToken","tuiProvideOptions","EventEmitter","tuiStringHashToHsl","tuiSizeBigger","i0","ElementRef","TUI_MODE","TUI_COMMON_ICONS","MODE_PROVIDER","i1","i2","i3","i4","Component","ChangeDetectionStrategy","Inject","Input","HostBinding","Output","ViewChild","HostListener","CommonModule","FormsModule","TuiSvgModule","TuiLoaderModule","PolymorpheusModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWA;AACa,QAAA,uBAAuB,GAAkB;IAClD,IAAA,IAAI,EAAE,GAAG;IACT,IAAA,MAAM,EAAE,SAAS;IACjB,IAAA,SAAS,EAAE,KAAK;MAClB;IAEF;;IAEG;QACU,eAAe,GAAGA,kBAAc,CAAC,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AAY,EAAA,UAAA,EAAA,CAAA;sBAXxBC,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;IACN,oBAAA,OAAO,EAAE;4BACLL,eAAY;4BACZC,cAAW;4BACXC,eAAY;4BACZC,kBAAe;4BACfC,qBAAkB;IACrB,qBAAA;wBACD,YAAY,EAAE,CAAC,eAAe,CAAC;wBAC/B,OAAO,EAAE,CAAC,eAAe,CAAC;qBAC7B,CAAA;;;IClBD;;IAEG;;;;;;;;;;;;;;"}
|
|
@@ -562,7 +562,7 @@
|
|
|
562
562
|
i4.tuiAsControl(TuiTextareaComponent),
|
|
563
563
|
i1.TEXTFIELD_CONTROLLER_PROVIDER,
|
|
564
564
|
i1.MODE_PROVIDER,
|
|
565
|
-
], queries: [{ propertyName: "textfield", first: true, predicate: i1.TuiTextfieldComponent, descendants: true, read: i0.ElementRef }], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"hintOptions?.change$ | async\"></ng-container>\n<div\n automation-id=\"tui-text-area__wrapper\"\n tuiWrapper\n class=\"t-outline\"\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [invalid]=\"computedInvalid\"\n [readOnly]=\"readOnly\"\n>\n <div\n *ngIf=\"hasCounter\"\n automation-id=\"tui-text-area__counter\"\n class=\"t-counter\"\n >\n {{ value.length }}/{{ maxLength }}\n </div>\n\n <label\n class=\"t-content\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <div class=\"t-wrapper\">\n <div\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-text-area__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n >\n <ng-content></ng-content>\n </div>\n <tui-scrollbar\n automation-id=\"tui-text-area__scrollbar\"\n class=\"t-box\"\n [style.maxHeight.px]=\"computeMaxHeight\"\n >\n <div class=\"t-input-wrapper\">\n <div class=\"t-relative\">\n <div\n aria-hidden=\"true\"\n class=\"t-pseudo-content\"\n >\n <span [textContent]=\"fittedContent || nativeFocusableElement?.placeholder\"></span>\n <span\n class=\"t-pseudo-content__extra\"\n [textContent]=\"extraContent\"\n ></span>\n <span class=\"t-caret\"></span>\n </div>\n <textarea\n #focusableElement\n automation-id=\"tui-text-area__native\"\n class=\"t-input\"\n [disabled]=\"computedDisabled\"\n [id]=\"id\"\n [readOnly]=\"readOnly\"\n [tuiFocusable]=\"computedFocusable\"\n [(ngModel)]=\"value\"\n ></textarea>\n <ng-content select=\"textarea\"></ng-content>\n </div>\n </div>\n </tui-scrollbar>\n </div>\n <div class=\"t-icons\">\n <div\n *ngIf=\"iconLeftContent\"\n class=\"t-icon t-icon_left t-textfield-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconLeftContent as src; context: {$implicit: size}\"\n appearance=\"icon\"\n tuiWrapper\n [src]=\"src\"\n ></tui-svg>\n </div>\n <ng-container *ngIf=\"hasCustomContent\">\n <tui-svg\n *polymorpheusOutlet=\"controller.customContent as src\"\n [src]=\"src\"\n ></tui-svg>\n </ng-container>\n <ng-container *ngIf=\"hasCleaner\">\n <tui-svg\n *polymorpheusOutlet=\"iconCleaner as src; context: {$implicit: size}\"\n appearance=\"icon\"\n tuiWrapper\n class=\"t-cleaner\"\n [src]=\"src\"\n (click.stop)=\"onValueChange('')\"\n ></tui-svg>\n </ng-container>\n <tui-tooltip\n *ngIf=\"hasTooltip\"\n automation-id=\"tui-text-area__tooltip\"\n [content]=\"hintOptions?.content\"\n [describeId]=\"id\"\n ></tui-tooltip>\n <div\n *ngIf=\"iconContent\"\n class=\"t-icon t-textfield-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconContent as src; context: {$implicit: size}\"\n appearance=\"icon\"\n tuiWrapper\n [src]=\"src\"\n ></tui-svg>\n </div>\n </div>\n </label>\n</div>\n", styles: [":host{position:relative;z-index:0;display:flex;flex-direction:column;min-height:var(--tui-textarea-height);border-radius:var(--tui-radius-m);color:var(--tui-text-01)}:host[data-mode=onDark]{color:var(--tui-text-01-night)}:host[data-size=s]{--tui-height: var(--tui-height-s);--tui-textarea-height: 4.5625rem;font:var(--tui-font-text-s)}:host[data-size=m]{--tui-height: var(--tui-height-m);--tui-textarea-height: 5.5rem;font:var(--tui-font-text-s)}:host[data-size=l]{--tui-height: var(--tui-height-l);--tui-textarea-height: 6.75rem;font:var(--tui-font-text-m)}:host[data-size=m]._has-counter{--tui-textarea-height: 6.625rem}:host[data-size=l]._has-counter{--tui-textarea-height: 7.875rem}.t-outline{min-height:inherit}.t-content{display:block;margin-top:0;margin-bottom:0;min-height:inherit;box-sizing:border-box;overflow:hidden;cursor:text}:host._disabled .t-content{cursor:auto;opacity:var(--tui-disabled-opacity)}:host:not(._expandable) .t-content{position:absolute;top:0;left:0;bottom:1px;right:0;min-height:auto}:host._has-counter:not(._expandable) .t-content{bottom:1.6875rem}:host._label-outside._has-counter:not(._expandable) .t-content{bottom:1rem}.t-wrapper{position:relative;width:100%;height:100%;min-height:inherit;box-sizing:border-box;padding:calc((var(--tui-height) - 1.25rem) / 2) 0}:host[data-size=l]._label-outside .t-wrapper{padding:calc((var(--tui-height) - 1.5rem) / 2) 0}:host[data-size=m]:not(._label-outside) .t-wrapper{padding:calc((var(--tui-height) - 2.25rem) / 2) 0}:host[data-size=l]:not(._label-outside) .t-wrapper{padding:calc((var(--tui-height) - 2.625rem) / 2) 0}:host-context(table)[data-size=m]._label-outside .t-wrapper{padding-bottom:.75rem}:host-context(table)[data-size=l]._label-outside .t-wrapper{padding-bottom:1rem}.t-input-wrapper{min-height:inherit;width:100%;flex:1}.t-relative{position:relative;min-height:inherit}.t-box{display:flex;min-height:calc(100% - 1rem);width:100%}:host:not(._expandable) .t-box{height:calc(100% - 1rem)}:host:not(._expandable)._label-outside .t-box{height:100%}:host._has-counter._expandable .t-box{margin-bottom:1.25rem}:host[data-size=m]:not(._label-outside) .t-box{border-top:1rem solid transparent}:host[data-size=l]:not(._label-outside) .t-box{border-top:1.25rem solid transparent}.t-pseudo-content{white-space:pre-wrap;word-wrap:break-word;word-break:keep-all;pointer-events:none;color:transparent;overflow:hidden;border:0 solid transparent;border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0)}:host[data-size=s] .t-pseudo-content,:host[data-size=m] .t-pseudo-content{padding:0 .75rem}:host[data-size=l] .t-pseudo-content{padding:0 1rem}.t-pseudo-content__extra{background-color:var(--tui-error-bg-night)}.t-input{padding:0;margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;box-sizing:border-box;resize:none;overflow:hidden;outline:none;border:0 solid transparent;border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0)}.t-input:-webkit-autofill,.t-input:-webkit-autofill:hover,.t-input:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}@supports (-webkit-touch-callout: none){.t-input:active{font-size:1rem}}.t-input:not(:last-of-type){display:none}.t-input::placeholder{color:var(--tui-text-03);opacity:0}:host[data-mode=onDark] .t-input::placeholder{color:var(--tui-text-03-night)}:host._focused .t-input:not(:-moz-read-only)::placeholder{opacity:1}:host._focused .t-input:not(:read-only)::placeholder{opacity:1}:host[data-size=s] .t-input,:host[data-size=m] .t-input{padding:0 .75rem;font:var(--tui-font-text-s)}:host[data-size=l] .t-input{padding:0 1rem;font:var(--tui-font-text-m)}:host[data-mode=onDark]._disabled .t-input{color:var(--tui-text-03-night)}@supports (-webkit-marquee-repetition: infinite) and (object-fit: fill){:host._ios .t-input{padding-left:.8125rem}}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;font:var(--tui-font-text-s);color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0);position:absolute;top:calc(var(--tui-height) / 2 - .625rem);left:0;max-width:100%;border:0 solid transparent;border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0);box-sizing:border-box}@supports (-webkit-hyphens: none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size=m] .t-placeholder_raised{font:var(--tui-font-text-xs);line-height:1.25rem;transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill)}:host._invalid:not(._focused) [tuiWrapper][data-mode=onDark] .t-placeholder_raised,:host._invalid:not(._focused):hover [tuiWrapper][data-mode=onDark] .t-placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .t-placeholder,:host[data-size=m]._focused._label-outside .t-placeholder,:host[data-size=l]._focused._label-outside .t-placeholder{color:var(--tui-text-03)}:host[data-size=l] .t-placeholder{font:var(--tui-font-text-m);line-height:1.25rem}:host[data-size=l] .t-placeholder_raised{font-size:.8156rem}:host[data-size=m]._focused:not(._label-outside) .t-placeholder,:host[data-size=l]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01)}[tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size=m]._focused:not(._label-outside) [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=l]._focused:not(._label-outside) [tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-01-night)}:host._focused [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=m]._focused._label-outside [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=l]._focused._label-outside [tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size=s] .t-placeholder{padding:0 .75rem}:host[data-size=m] .t-placeholder{padding:0 .75rem}:host[data-size=l] .t-placeholder{padding:0 1rem}:host._label-outside .t-placeholder{overflow:initial;height:auto;white-space:initial}.t-icons{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;justify-content:flex-end;pointer-events:none;padding:calc((var(--tui-height) - 1.5rem) / 2) 1rem}:host[data-size=m] .t-icons{padding:calc((var(--tui-height) - 1.5rem) / 2) .625rem}.t-icons>:not(:first-child){-webkit-margin-start:.25rem;margin-inline-start:.25rem}.t-icon{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none}.t-icon_left{-webkit-margin-end:auto;margin-inline-end:auto}.t-cleaner{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none;pointer-events:auto}:host._readonly .t-cleaner,:host._disabled .t-cleaner{pointer-events:none}.t-caret{display:inline-block;height:1rem;width:0}.t-counter{position:absolute;right:.75rem;bottom:.5rem;font:var(--tui-font-text-s);pointer-events:none;margin-top:auto;text-align:right;color:var(--tui-text-03)}:host[data-mode=onDark] .t-counter{color:var(--tui-text-03-night)}\n"], components: [{ type: i1__namespace.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i1__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1__namespace.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId", "context"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i3__namespace.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__namespace.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i3__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i2__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
565
|
+
], queries: [{ propertyName: "textfield", first: true, predicate: i1.TuiTextfieldComponent, descendants: true, read: i0.ElementRef }], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"hintOptions?.change$ | async\"></ng-container>\n<div\n automation-id=\"tui-text-area__wrapper\"\n tuiWrapper\n class=\"t-outline\"\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [invalid]=\"computedInvalid\"\n [readOnly]=\"readOnly\"\n>\n <div\n *ngIf=\"hasCounter\"\n automation-id=\"tui-text-area__counter\"\n class=\"t-counter\"\n >\n {{ value.length }}/{{ maxLength }}\n </div>\n\n <label\n class=\"t-content\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <div class=\"t-wrapper\">\n <div\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-text-area__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n >\n <ng-content></ng-content>\n </div>\n <tui-scrollbar\n automation-id=\"tui-text-area__scrollbar\"\n class=\"t-box\"\n [style.maxHeight.px]=\"computeMaxHeight\"\n >\n <div class=\"t-input-wrapper\">\n <div class=\"t-relative\">\n <div\n aria-hidden=\"true\"\n class=\"t-pseudo-content\"\n >\n <span [textContent]=\"fittedContent || nativeFocusableElement?.placeholder\"></span>\n <span\n class=\"t-pseudo-content__extra\"\n [textContent]=\"extraContent\"\n ></span>\n <span class=\"t-caret\"></span>\n </div>\n <textarea\n #focusableElement\n automation-id=\"tui-text-area__native\"\n class=\"t-input\"\n [disabled]=\"computedDisabled\"\n [id]=\"id\"\n [readOnly]=\"readOnly\"\n [tuiFocusable]=\"computedFocusable\"\n [(ngModel)]=\"value\"\n ></textarea>\n <ng-content select=\"textarea\"></ng-content>\n </div>\n </div>\n </tui-scrollbar>\n </div>\n <div class=\"t-icons\">\n <div\n *ngIf=\"iconLeftContent\"\n class=\"t-icon t-icon_left t-textfield-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconLeftContent as src; context: {$implicit: size}\"\n appearance=\"icon\"\n tuiWrapper\n [src]=\"src\"\n ></tui-svg>\n </div>\n <ng-container *ngIf=\"hasCustomContent\">\n <tui-svg\n *polymorpheusOutlet=\"controller.customContent as src\"\n [src]=\"src\"\n ></tui-svg>\n </ng-container>\n <ng-container *ngIf=\"hasCleaner\">\n <tui-svg\n *polymorpheusOutlet=\"iconCleaner as src; context: {$implicit: size}\"\n appearance=\"icon\"\n tuiWrapper\n class=\"t-cleaner\"\n [src]=\"src\"\n (click.stop)=\"onValueChange('')\"\n ></tui-svg>\n </ng-container>\n <tui-tooltip\n *ngIf=\"hasTooltip\"\n automation-id=\"tui-text-area__tooltip\"\n [content]=\"hintOptions?.content\"\n [describeId]=\"id\"\n ></tui-tooltip>\n <div\n *ngIf=\"iconContent\"\n class=\"t-icon t-textfield-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconContent as src; context: {$implicit: size}\"\n appearance=\"icon\"\n tuiWrapper\n [src]=\"src\"\n ></tui-svg>\n </div>\n </div>\n </label>\n</div>\n", styles: [":host{position:relative;z-index:0;display:flex;flex-direction:column;min-height:var(--tui-textarea-height);border-radius:var(--tui-radius-m);color:var(--tui-text-01)}:host[data-mode=onDark]{color:var(--tui-text-01-night)}:host[data-size=s]{--tui-height: var(--tui-height-s);--tui-textarea-height: 4.5625rem;font:var(--tui-font-text-s)}:host[data-size=m]{--tui-height: var(--tui-height-m);--tui-textarea-height: 5.5rem;font:var(--tui-font-text-s)}:host[data-size=l]{--tui-height: var(--tui-height-l);--tui-textarea-height: 6.75rem;font:var(--tui-font-text-m)}:host[data-size=m]._has-counter{--tui-textarea-height: 6.625rem}:host[data-size=l]._has-counter{--tui-textarea-height: 7.875rem}.t-outline{min-height:inherit}.t-content{display:block;margin-top:0;margin-bottom:0;min-height:inherit;box-sizing:border-box;overflow:hidden;cursor:text}:host._disabled .t-content{cursor:auto;opacity:var(--tui-disabled-opacity)}:host:not(._expandable) .t-content{position:absolute;top:0;left:0;bottom:1px;right:0;min-height:auto}:host._has-counter:not(._expandable) .t-content{bottom:1.6875rem}:host._label-outside._has-counter:not(._expandable) .t-content{bottom:1rem}.t-wrapper{position:relative;width:100%;height:100%;min-height:inherit;box-sizing:border-box;padding:calc((var(--tui-height) - 1.25rem) / 2) 0}:host[data-size=l]._label-outside .t-wrapper{padding:calc((var(--tui-height) - 1.5rem) / 2) 0}:host[data-size=m]:not(._label-outside) .t-wrapper{padding:calc((var(--tui-height) - 2.25rem) / 2) 0}:host[data-size=l]:not(._label-outside) .t-wrapper{padding:calc((var(--tui-height) - 2.625rem) / 2) 0}:host-context(table)[data-size=m]._label-outside .t-wrapper{padding-bottom:.75rem}:host-context(table)[data-size=l]._label-outside .t-wrapper{padding-bottom:1rem}.t-input-wrapper{min-height:inherit;width:100%;flex:1}.t-relative{position:relative;min-height:inherit}.t-box{display:flex;min-height:calc(100% - 1rem);width:100%}:host:not(._expandable) .t-box{height:calc(100% - 1rem)}:host:not(._expandable)._label-outside .t-box{height:100%}:host._has-counter._expandable .t-box{margin-bottom:1.25rem}:host[data-size=m]:not(._label-outside) .t-box{border-top:1rem solid transparent}:host[data-size=l]:not(._label-outside) .t-box{border-top:1.25rem solid transparent}.t-pseudo-content{white-space:pre-wrap;word-wrap:break-word;word-break:keep-all;pointer-events:none;color:transparent;overflow:hidden;border:0 solid transparent;border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0)}:host[data-size=s] .t-pseudo-content,:host[data-size=m] .t-pseudo-content{padding:0 .75rem}:host[data-size=l] .t-pseudo-content{padding:0 1rem}.t-pseudo-content__extra{background-color:var(--tui-error-bg-night)}.t-input{padding:0;margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;box-sizing:border-box;resize:none;overflow:hidden;outline:none;border:0 solid transparent;border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0)}.t-input:-webkit-autofill,.t-input:-webkit-autofill:hover,.t-input:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}.t-input:not(:last-of-type){display:none}.t-input::placeholder{color:var(--tui-text-03);opacity:0}:host[data-mode=onDark] .t-input::placeholder{color:var(--tui-text-03-night)}:host._focused .t-input:not(:-moz-read-only)::placeholder{opacity:1}:host._focused .t-input:not(:read-only)::placeholder{opacity:1}:host[data-size=s] .t-input,:host[data-size=m] .t-input{padding:0 .75rem;font:var(--tui-font-text-s)}:host[data-size=l] .t-input{padding:0 1rem;font:var(--tui-font-text-m)}:host[data-mode=onDark]._disabled .t-input{color:var(--tui-text-03-night)}@supports (-webkit-marquee-repetition: infinite) and (object-fit: fill){:host._ios .t-input{padding-left:.8125rem}}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;font:var(--tui-font-text-s);color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0);position:absolute;top:calc(var(--tui-height) / 2 - .625rem);left:0;max-width:100%;border:0 solid transparent;border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0);box-sizing:border-box}@supports (-webkit-hyphens: none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size=m] .t-placeholder_raised{font:var(--tui-font-text-xs);line-height:1.25rem;transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill)}:host._invalid:not(._focused) [tuiWrapper][data-mode=onDark] .t-placeholder_raised,:host._invalid:not(._focused):hover [tuiWrapper][data-mode=onDark] .t-placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .t-placeholder,:host[data-size=m]._focused._label-outside .t-placeholder,:host[data-size=l]._focused._label-outside .t-placeholder{color:var(--tui-text-03)}:host[data-size=l] .t-placeholder{font:var(--tui-font-text-m);line-height:1.25rem}:host[data-size=l] .t-placeholder_raised{font-size:.8156rem}:host[data-size=m]._focused:not(._label-outside) .t-placeholder,:host[data-size=l]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01)}[tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size=m]._focused:not(._label-outside) [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=l]._focused:not(._label-outside) [tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-01-night)}:host._focused [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=m]._focused._label-outside [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=l]._focused._label-outside [tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size=s] .t-placeholder{padding:0 .75rem}:host[data-size=m] .t-placeholder{padding:0 .75rem}:host[data-size=l] .t-placeholder{padding:0 1rem}:host._label-outside .t-placeholder{overflow:initial;height:auto;white-space:initial}.t-icons{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;justify-content:flex-end;pointer-events:none;padding:calc((var(--tui-height) - 1.5rem) / 2) 1rem}:host[data-size=m] .t-icons{padding:calc((var(--tui-height) - 1.5rem) / 2) .625rem}.t-icons>:not(:first-child){-webkit-margin-start:.25rem;margin-inline-start:.25rem}.t-icon{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none}.t-icon_left{-webkit-margin-end:auto;margin-inline-end:auto}.t-cleaner{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none;pointer-events:auto}:host._readonly .t-cleaner,:host._disabled .t-cleaner{pointer-events:none}.t-caret{display:inline-block;height:1rem;width:0}.t-counter{position:absolute;right:.75rem;bottom:.5rem;font:var(--tui-font-text-s);pointer-events:none;margin-top:auto;text-align:right;color:var(--tui-text-03)}:host[data-mode=onDark] .t-counter{color:var(--tui-text-03-night)}\n"], components: [{ type: i1__namespace.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i1__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1__namespace.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId", "context"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i3__namespace.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__namespace.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i3__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i2__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
566
566
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiTextareaComponent, decorators: [{
|
|
567
567
|
type: i0.Component,
|
|
568
568
|
args: [{
|
|
@@ -687,7 +687,7 @@
|
|
|
687
687
|
i4.tuiAsControl(TuiTextAreaComponent),
|
|
688
688
|
i1.TEXTFIELD_CONTROLLER_PROVIDER,
|
|
689
689
|
i1.MODE_PROVIDER,
|
|
690
|
-
], usesInheritance: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"hintOptions?.change$ | async\"></ng-container>\n<div\n automation-id=\"tui-text-area__wrapper\"\n tuiWrapper\n class=\"t-outline\"\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [invalid]=\"computedInvalid\"\n [readOnly]=\"readOnly\"\n>\n <div\n *ngIf=\"hasCounter\"\n automation-id=\"tui-text-area__counter\"\n class=\"t-counter\"\n >\n {{ value.length }}/{{ maxLength }}\n </div>\n\n <label\n class=\"t-content\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <div class=\"t-wrapper\">\n <div\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-text-area__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n >\n <ng-content></ng-content>\n </div>\n <tui-scrollbar\n automation-id=\"tui-text-area__scrollbar\"\n class=\"t-box\"\n [style.maxHeight.px]=\"computeMaxHeight\"\n >\n <div class=\"t-input-wrapper\">\n <div class=\"t-relative\">\n <div\n aria-hidden=\"true\"\n class=\"t-pseudo-content\"\n >\n <span [textContent]=\"fittedContent || nativeFocusableElement?.placeholder\"></span>\n <span\n class=\"t-pseudo-content__extra\"\n [textContent]=\"extraContent\"\n ></span>\n <span class=\"t-caret\"></span>\n </div>\n <textarea\n #focusableElement\n automation-id=\"tui-text-area__native\"\n class=\"t-input\"\n [disabled]=\"computedDisabled\"\n [id]=\"id\"\n [readOnly]=\"readOnly\"\n [tuiFocusable]=\"computedFocusable\"\n [(ngModel)]=\"value\"\n ></textarea>\n <ng-content select=\"textarea\"></ng-content>\n </div>\n </div>\n </tui-scrollbar>\n </div>\n <div class=\"t-icons\">\n <div\n *ngIf=\"iconLeftContent\"\n class=\"t-icon t-icon_left t-textfield-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconLeftContent as src; context: {$implicit: size}\"\n appearance=\"icon\"\n tuiWrapper\n [src]=\"src\"\n ></tui-svg>\n </div>\n <ng-container *ngIf=\"hasCustomContent\">\n <tui-svg\n *polymorpheusOutlet=\"controller.customContent as src\"\n [src]=\"src\"\n ></tui-svg>\n </ng-container>\n <ng-container *ngIf=\"hasCleaner\">\n <tui-svg\n *polymorpheusOutlet=\"iconCleaner as src; context: {$implicit: size}\"\n appearance=\"icon\"\n tuiWrapper\n class=\"t-cleaner\"\n [src]=\"src\"\n (click.stop)=\"onValueChange('')\"\n ></tui-svg>\n </ng-container>\n <tui-tooltip\n *ngIf=\"hasTooltip\"\n automation-id=\"tui-text-area__tooltip\"\n [content]=\"hintOptions?.content\"\n [describeId]=\"id\"\n ></tui-tooltip>\n <div\n *ngIf=\"iconContent\"\n class=\"t-icon t-textfield-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconContent as src; context: {$implicit: size}\"\n appearance=\"icon\"\n tuiWrapper\n [src]=\"src\"\n ></tui-svg>\n </div>\n </div>\n </label>\n</div>\n", styles: [":host{position:relative;z-index:0;display:flex;flex-direction:column;min-height:var(--tui-textarea-height);border-radius:var(--tui-radius-m);color:var(--tui-text-01)}:host[data-mode=onDark]{color:var(--tui-text-01-night)}:host[data-size=s]{--tui-height: var(--tui-height-s);--tui-textarea-height: 4.5625rem;font:var(--tui-font-text-s)}:host[data-size=m]{--tui-height: var(--tui-height-m);--tui-textarea-height: 5.5rem;font:var(--tui-font-text-s)}:host[data-size=l]{--tui-height: var(--tui-height-l);--tui-textarea-height: 6.75rem;font:var(--tui-font-text-m)}:host[data-size=m]._has-counter{--tui-textarea-height: 6.625rem}:host[data-size=l]._has-counter{--tui-textarea-height: 7.875rem}.t-outline{min-height:inherit}.t-content{display:block;margin-top:0;margin-bottom:0;min-height:inherit;box-sizing:border-box;overflow:hidden;cursor:text}:host._disabled .t-content{cursor:auto;opacity:var(--tui-disabled-opacity)}:host:not(._expandable) .t-content{position:absolute;top:0;left:0;bottom:1px;right:0;min-height:auto}:host._has-counter:not(._expandable) .t-content{bottom:1.6875rem}:host._label-outside._has-counter:not(._expandable) .t-content{bottom:1rem}.t-wrapper{position:relative;width:100%;height:100%;min-height:inherit;box-sizing:border-box;padding:calc((var(--tui-height) - 1.25rem) / 2) 0}:host[data-size=l]._label-outside .t-wrapper{padding:calc((var(--tui-height) - 1.5rem) / 2) 0}:host[data-size=m]:not(._label-outside) .t-wrapper{padding:calc((var(--tui-height) - 2.25rem) / 2) 0}:host[data-size=l]:not(._label-outside) .t-wrapper{padding:calc((var(--tui-height) - 2.625rem) / 2) 0}:host-context(table)[data-size=m]._label-outside .t-wrapper{padding-bottom:.75rem}:host-context(table)[data-size=l]._label-outside .t-wrapper{padding-bottom:1rem}.t-input-wrapper{min-height:inherit;width:100%;flex:1}.t-relative{position:relative;min-height:inherit}.t-box{display:flex;min-height:calc(100% - 1rem);width:100%}:host:not(._expandable) .t-box{height:calc(100% - 1rem)}:host:not(._expandable)._label-outside .t-box{height:100%}:host._has-counter._expandable .t-box{margin-bottom:1.25rem}:host[data-size=m]:not(._label-outside) .t-box{border-top:1rem solid transparent}:host[data-size=l]:not(._label-outside) .t-box{border-top:1.25rem solid transparent}.t-pseudo-content{white-space:pre-wrap;word-wrap:break-word;word-break:keep-all;pointer-events:none;color:transparent;overflow:hidden;border:0 solid transparent;border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0)}:host[data-size=s] .t-pseudo-content,:host[data-size=m] .t-pseudo-content{padding:0 .75rem}:host[data-size=l] .t-pseudo-content{padding:0 1rem}.t-pseudo-content__extra{background-color:var(--tui-error-bg-night)}.t-input{padding:0;margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;box-sizing:border-box;resize:none;overflow:hidden;outline:none;border:0 solid transparent;border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0)}.t-input:-webkit-autofill,.t-input:-webkit-autofill:hover,.t-input:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}@supports (-webkit-touch-callout: none){.t-input:active{font-size:1rem}}.t-input:not(:last-of-type){display:none}.t-input::placeholder{color:var(--tui-text-03);opacity:0}:host[data-mode=onDark] .t-input::placeholder{color:var(--tui-text-03-night)}:host._focused .t-input:not(:-moz-read-only)::placeholder{opacity:1}:host._focused .t-input:not(:read-only)::placeholder{opacity:1}:host[data-size=s] .t-input,:host[data-size=m] .t-input{padding:0 .75rem;font:var(--tui-font-text-s)}:host[data-size=l] .t-input{padding:0 1rem;font:var(--tui-font-text-m)}:host[data-mode=onDark]._disabled .t-input{color:var(--tui-text-03-night)}@supports (-webkit-marquee-repetition: infinite) and (object-fit: fill){:host._ios .t-input{padding-left:.8125rem}}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;font:var(--tui-font-text-s);color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0);position:absolute;top:calc(var(--tui-height) / 2 - .625rem);left:0;max-width:100%;border:0 solid transparent;border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0);box-sizing:border-box}@supports (-webkit-hyphens: none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size=m] .t-placeholder_raised{font:var(--tui-font-text-xs);line-height:1.25rem;transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill)}:host._invalid:not(._focused) [tuiWrapper][data-mode=onDark] .t-placeholder_raised,:host._invalid:not(._focused):hover [tuiWrapper][data-mode=onDark] .t-placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .t-placeholder,:host[data-size=m]._focused._label-outside .t-placeholder,:host[data-size=l]._focused._label-outside .t-placeholder{color:var(--tui-text-03)}:host[data-size=l] .t-placeholder{font:var(--tui-font-text-m);line-height:1.25rem}:host[data-size=l] .t-placeholder_raised{font-size:.8156rem}:host[data-size=m]._focused:not(._label-outside) .t-placeholder,:host[data-size=l]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01)}[tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size=m]._focused:not(._label-outside) [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=l]._focused:not(._label-outside) [tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-01-night)}:host._focused [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=m]._focused._label-outside [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=l]._focused._label-outside [tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size=s] .t-placeholder{padding:0 .75rem}:host[data-size=m] .t-placeholder{padding:0 .75rem}:host[data-size=l] .t-placeholder{padding:0 1rem}:host._label-outside .t-placeholder{overflow:initial;height:auto;white-space:initial}.t-icons{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;justify-content:flex-end;pointer-events:none;padding:calc((var(--tui-height) - 1.5rem) / 2) 1rem}:host[data-size=m] .t-icons{padding:calc((var(--tui-height) - 1.5rem) / 2) .625rem}.t-icons>:not(:first-child){-webkit-margin-start:.25rem;margin-inline-start:.25rem}.t-icon{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none}.t-icon_left{-webkit-margin-end:auto;margin-inline-end:auto}.t-cleaner{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none;pointer-events:auto}:host._readonly .t-cleaner,:host._disabled .t-cleaner{pointer-events:none}.t-caret{display:inline-block;height:1rem;width:0}.t-counter{position:absolute;right:.75rem;bottom:.5rem;font:var(--tui-font-text-s);pointer-events:none;margin-top:auto;text-align:right;color:var(--tui-text-03)}:host[data-mode=onDark] .t-counter{color:var(--tui-text-03-night)}\n"], components: [{ type: i1__namespace.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i1__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1__namespace.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId", "context"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i3__namespace.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__namespace.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i3__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i2__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
690
|
+
], usesInheritance: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"hintOptions?.change$ | async\"></ng-container>\n<div\n automation-id=\"tui-text-area__wrapper\"\n tuiWrapper\n class=\"t-outline\"\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [invalid]=\"computedInvalid\"\n [readOnly]=\"readOnly\"\n>\n <div\n *ngIf=\"hasCounter\"\n automation-id=\"tui-text-area__counter\"\n class=\"t-counter\"\n >\n {{ value.length }}/{{ maxLength }}\n </div>\n\n <label\n class=\"t-content\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <div class=\"t-wrapper\">\n <div\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-text-area__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n >\n <ng-content></ng-content>\n </div>\n <tui-scrollbar\n automation-id=\"tui-text-area__scrollbar\"\n class=\"t-box\"\n [style.maxHeight.px]=\"computeMaxHeight\"\n >\n <div class=\"t-input-wrapper\">\n <div class=\"t-relative\">\n <div\n aria-hidden=\"true\"\n class=\"t-pseudo-content\"\n >\n <span [textContent]=\"fittedContent || nativeFocusableElement?.placeholder\"></span>\n <span\n class=\"t-pseudo-content__extra\"\n [textContent]=\"extraContent\"\n ></span>\n <span class=\"t-caret\"></span>\n </div>\n <textarea\n #focusableElement\n automation-id=\"tui-text-area__native\"\n class=\"t-input\"\n [disabled]=\"computedDisabled\"\n [id]=\"id\"\n [readOnly]=\"readOnly\"\n [tuiFocusable]=\"computedFocusable\"\n [(ngModel)]=\"value\"\n ></textarea>\n <ng-content select=\"textarea\"></ng-content>\n </div>\n </div>\n </tui-scrollbar>\n </div>\n <div class=\"t-icons\">\n <div\n *ngIf=\"iconLeftContent\"\n class=\"t-icon t-icon_left t-textfield-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconLeftContent as src; context: {$implicit: size}\"\n appearance=\"icon\"\n tuiWrapper\n [src]=\"src\"\n ></tui-svg>\n </div>\n <ng-container *ngIf=\"hasCustomContent\">\n <tui-svg\n *polymorpheusOutlet=\"controller.customContent as src\"\n [src]=\"src\"\n ></tui-svg>\n </ng-container>\n <ng-container *ngIf=\"hasCleaner\">\n <tui-svg\n *polymorpheusOutlet=\"iconCleaner as src; context: {$implicit: size}\"\n appearance=\"icon\"\n tuiWrapper\n class=\"t-cleaner\"\n [src]=\"src\"\n (click.stop)=\"onValueChange('')\"\n ></tui-svg>\n </ng-container>\n <tui-tooltip\n *ngIf=\"hasTooltip\"\n automation-id=\"tui-text-area__tooltip\"\n [content]=\"hintOptions?.content\"\n [describeId]=\"id\"\n ></tui-tooltip>\n <div\n *ngIf=\"iconContent\"\n class=\"t-icon t-textfield-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconContent as src; context: {$implicit: size}\"\n appearance=\"icon\"\n tuiWrapper\n [src]=\"src\"\n ></tui-svg>\n </div>\n </div>\n </label>\n</div>\n", styles: [":host{position:relative;z-index:0;display:flex;flex-direction:column;min-height:var(--tui-textarea-height);border-radius:var(--tui-radius-m);color:var(--tui-text-01)}:host[data-mode=onDark]{color:var(--tui-text-01-night)}:host[data-size=s]{--tui-height: var(--tui-height-s);--tui-textarea-height: 4.5625rem;font:var(--tui-font-text-s)}:host[data-size=m]{--tui-height: var(--tui-height-m);--tui-textarea-height: 5.5rem;font:var(--tui-font-text-s)}:host[data-size=l]{--tui-height: var(--tui-height-l);--tui-textarea-height: 6.75rem;font:var(--tui-font-text-m)}:host[data-size=m]._has-counter{--tui-textarea-height: 6.625rem}:host[data-size=l]._has-counter{--tui-textarea-height: 7.875rem}.t-outline{min-height:inherit}.t-content{display:block;margin-top:0;margin-bottom:0;min-height:inherit;box-sizing:border-box;overflow:hidden;cursor:text}:host._disabled .t-content{cursor:auto;opacity:var(--tui-disabled-opacity)}:host:not(._expandable) .t-content{position:absolute;top:0;left:0;bottom:1px;right:0;min-height:auto}:host._has-counter:not(._expandable) .t-content{bottom:1.6875rem}:host._label-outside._has-counter:not(._expandable) .t-content{bottom:1rem}.t-wrapper{position:relative;width:100%;height:100%;min-height:inherit;box-sizing:border-box;padding:calc((var(--tui-height) - 1.25rem) / 2) 0}:host[data-size=l]._label-outside .t-wrapper{padding:calc((var(--tui-height) - 1.5rem) / 2) 0}:host[data-size=m]:not(._label-outside) .t-wrapper{padding:calc((var(--tui-height) - 2.25rem) / 2) 0}:host[data-size=l]:not(._label-outside) .t-wrapper{padding:calc((var(--tui-height) - 2.625rem) / 2) 0}:host-context(table)[data-size=m]._label-outside .t-wrapper{padding-bottom:.75rem}:host-context(table)[data-size=l]._label-outside .t-wrapper{padding-bottom:1rem}.t-input-wrapper{min-height:inherit;width:100%;flex:1}.t-relative{position:relative;min-height:inherit}.t-box{display:flex;min-height:calc(100% - 1rem);width:100%}:host:not(._expandable) .t-box{height:calc(100% - 1rem)}:host:not(._expandable)._label-outside .t-box{height:100%}:host._has-counter._expandable .t-box{margin-bottom:1.25rem}:host[data-size=m]:not(._label-outside) .t-box{border-top:1rem solid transparent}:host[data-size=l]:not(._label-outside) .t-box{border-top:1.25rem solid transparent}.t-pseudo-content{white-space:pre-wrap;word-wrap:break-word;word-break:keep-all;pointer-events:none;color:transparent;overflow:hidden;border:0 solid transparent;border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0)}:host[data-size=s] .t-pseudo-content,:host[data-size=m] .t-pseudo-content{padding:0 .75rem}:host[data-size=l] .t-pseudo-content{padding:0 1rem}.t-pseudo-content__extra{background-color:var(--tui-error-bg-night)}.t-input{padding:0;margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;box-sizing:border-box;resize:none;overflow:hidden;outline:none;border:0 solid transparent;border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0)}.t-input:-webkit-autofill,.t-input:-webkit-autofill:hover,.t-input:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}.t-input:not(:last-of-type){display:none}.t-input::placeholder{color:var(--tui-text-03);opacity:0}:host[data-mode=onDark] .t-input::placeholder{color:var(--tui-text-03-night)}:host._focused .t-input:not(:-moz-read-only)::placeholder{opacity:1}:host._focused .t-input:not(:read-only)::placeholder{opacity:1}:host[data-size=s] .t-input,:host[data-size=m] .t-input{padding:0 .75rem;font:var(--tui-font-text-s)}:host[data-size=l] .t-input{padding:0 1rem;font:var(--tui-font-text-m)}:host[data-mode=onDark]._disabled .t-input{color:var(--tui-text-03-night)}@supports (-webkit-marquee-repetition: infinite) and (object-fit: fill){:host._ios .t-input{padding-left:.8125rem}}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;font:var(--tui-font-text-s);color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0);position:absolute;top:calc(var(--tui-height) / 2 - .625rem);left:0;max-width:100%;border:0 solid transparent;border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0);box-sizing:border-box}@supports (-webkit-hyphens: none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size=m] .t-placeholder_raised{font:var(--tui-font-text-xs);line-height:1.25rem;transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill)}:host._invalid:not(._focused) [tuiWrapper][data-mode=onDark] .t-placeholder_raised,:host._invalid:not(._focused):hover [tuiWrapper][data-mode=onDark] .t-placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .t-placeholder,:host[data-size=m]._focused._label-outside .t-placeholder,:host[data-size=l]._focused._label-outside .t-placeholder{color:var(--tui-text-03)}:host[data-size=l] .t-placeholder{font:var(--tui-font-text-m);line-height:1.25rem}:host[data-size=l] .t-placeholder_raised{font-size:.8156rem}:host[data-size=m]._focused:not(._label-outside) .t-placeholder,:host[data-size=l]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01)}[tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size=m]._focused:not(._label-outside) [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=l]._focused:not(._label-outside) [tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-01-night)}:host._focused [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=m]._focused._label-outside [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=l]._focused._label-outside [tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size=s] .t-placeholder{padding:0 .75rem}:host[data-size=m] .t-placeholder{padding:0 .75rem}:host[data-size=l] .t-placeholder{padding:0 1rem}:host._label-outside .t-placeholder{overflow:initial;height:auto;white-space:initial}.t-icons{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;justify-content:flex-end;pointer-events:none;padding:calc((var(--tui-height) - 1.5rem) / 2) 1rem}:host[data-size=m] .t-icons{padding:calc((var(--tui-height) - 1.5rem) / 2) .625rem}.t-icons>:not(:first-child){-webkit-margin-start:.25rem;margin-inline-start:.25rem}.t-icon{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none}.t-icon_left{-webkit-margin-end:auto;margin-inline-end:auto}.t-cleaner{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none;pointer-events:auto}:host._readonly .t-cleaner,:host._disabled .t-cleaner{pointer-events:none}.t-caret{display:inline-block;height:1rem;width:0}.t-counter{position:absolute;right:.75rem;bottom:.5rem;font:var(--tui-font-text-s);pointer-events:none;margin-top:auto;text-align:right;color:var(--tui-text-03)}:host[data-mode=onDark] .t-counter{color:var(--tui-text-03-night)}\n"], components: [{ type: i1__namespace.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i1__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1__namespace.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId", "context"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i3__namespace.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__namespace.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i3__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i2__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
691
691
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiTextAreaComponent, decorators: [{
|
|
692
692
|
type: i0.Component,
|
|
693
693
|
args: [{
|