@taiga-ui/kit 3.92.0 → 3.93.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-calendar-range.umd.js +8 -46
- package/bundles/taiga-ui-kit-components-calendar-range.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/components/calendar-range/calendar-range.component.d.ts +3 -7
- package/esm2015/components/calendar-range/calendar-range.component.js +5 -39
- package/esm2015/components/textarea/deprecated.js +1 -1
- package/esm2015/components/textarea/textarea.component.js +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-range.js +4 -38
- package/fesm2015/taiga-ui-kit-components-calendar-range.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/package.json +4 -4
|
@@ -23,7 +23,7 @@ TuiTextAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
23
23
|
tuiAsControl(TuiTextAreaComponent),
|
|
24
24
|
TEXTFIELD_CONTROLLER_PROVIDER,
|
|
25
25
|
MODE_PROVIDER,
|
|
26
|
-
], usesInheritance: true, ngImport: i0, 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.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId", "context"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i3.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.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
26
|
+
], usesInheritance: true, ngImport: i0, 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}@supports (-webkit-hyphens: none){:host .t-pseudo-content,:host .t-input{text-wrap:balance}}.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.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId", "context"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i3.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.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
27
27
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiTextAreaComponent, decorators: [{
|
|
28
28
|
type: Component,
|
|
29
29
|
args: [{
|
|
@@ -128,7 +128,7 @@ TuiTextareaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
128
128
|
tuiAsControl(TuiTextareaComponent),
|
|
129
129
|
TEXTFIELD_CONTROLLER_PROVIDER,
|
|
130
130
|
MODE_PROVIDER,
|
|
131
|
-
], queries: [{ propertyName: "textfield", first: true, predicate: TuiTextfieldComponent, descendants: true, read: ElementRef }], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, 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.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId", "context"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i3.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.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
131
|
+
], queries: [{ propertyName: "textfield", first: true, predicate: TuiTextfieldComponent, descendants: true, read: ElementRef }], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, 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}@supports (-webkit-hyphens: none){:host .t-pseudo-content,:host .t-input{text-wrap:balance}}.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.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId", "context"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i3.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.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
132
132
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiTextareaComponent, decorators: [{
|
|
133
133
|
type: Component,
|
|
134
134
|
args: [{
|
|
@@ -35,16 +35,15 @@ class TuiCalendarRangeComponent {
|
|
|
35
35
|
this.item = null;
|
|
36
36
|
this.valueChange = new EventEmitter();
|
|
37
37
|
this.itemChange = new EventEmitter();
|
|
38
|
-
this.availableRange = null;
|
|
39
38
|
this.previousValue = null;
|
|
40
39
|
this.maxLengthMapper = MAX_DAY_RANGE_LENGTH_MAPPER;
|
|
41
40
|
this.monthOffset = (value, month) => value.append({ month });
|
|
42
|
-
this.mapper = (items, min, max, minLength, otherDateText
|
|
41
|
+
this.mapper = (items, min, max, minLength, otherDateText) => [
|
|
43
42
|
...items.filter(item => (minLength === null ||
|
|
44
43
|
item.range.from.append(minLength).daySameOrBefore(item.range.to)) &&
|
|
45
44
|
(min === null || item.range.to.daySameOrAfter(min)) &&
|
|
46
45
|
(max === null || item.range.from.daySameOrBefore(max))),
|
|
47
|
-
otherDateText,
|
|
46
|
+
otherDateText !== null && otherDateText !== void 0 ? otherDateText : '',
|
|
48
47
|
];
|
|
49
48
|
if (!valueChanges) {
|
|
50
49
|
return;
|
|
@@ -103,7 +102,6 @@ class TuiCalendarRangeComponent {
|
|
|
103
102
|
this.selectedActivePeriod = null;
|
|
104
103
|
if (value === null || !value.isSingleDay) {
|
|
105
104
|
this.value = new TuiDayRange(day, day);
|
|
106
|
-
this.availableRange = this.findAvailableRange();
|
|
107
105
|
this.itemChange.emit(this.findItemByDayRange(this.value));
|
|
108
106
|
return;
|
|
109
107
|
}
|
|
@@ -137,47 +135,15 @@ class TuiCalendarRangeComponent {
|
|
|
137
135
|
calculateDisabledItemHandler(disabledItemHandler, value, minLength) {
|
|
138
136
|
return item => {
|
|
139
137
|
if (!(value === null || value === void 0 ? void 0 : value.isSingleDay) || !minLength) {
|
|
140
|
-
return
|
|
138
|
+
return disabledItemHandler(item);
|
|
141
139
|
}
|
|
142
140
|
const negativeMinLength = tuiObjectFromEntries(Object.entries(minLength).map(([key, value]) => [key, -value]));
|
|
143
141
|
const disabledBefore = value.from.append(negativeMinLength).append({ day: 1 });
|
|
144
142
|
const disabledAfter = value.from.append(minLength).append({ day: -1 });
|
|
145
143
|
const inDisabledRange = disabledBefore.dayBefore(item) && disabledAfter.dayAfter(item);
|
|
146
|
-
return
|
|
144
|
+
return inDisabledRange || disabledItemHandler(item);
|
|
147
145
|
};
|
|
148
146
|
}
|
|
149
|
-
isDisabledItem(disabledItemHandler, value, item) {
|
|
150
|
-
return (disabledItemHandler(item) ||
|
|
151
|
-
(!!(value === null || value === void 0 ? void 0 : value.isSingleDay) && !this.availableRangeContainsItem(item)));
|
|
152
|
-
}
|
|
153
|
-
availableRangeContainsItem(item) {
|
|
154
|
-
if (this.availableRange === null) {
|
|
155
|
-
return true;
|
|
156
|
-
}
|
|
157
|
-
const { from, to } = this.availableRange;
|
|
158
|
-
return from.daySameOrBefore(item) && to.daySameOrAfter(item);
|
|
159
|
-
}
|
|
160
|
-
findAvailableRange() {
|
|
161
|
-
const { disabledItemHandler, value } = this;
|
|
162
|
-
if (!(value === null || value === void 0 ? void 0 : value.isSingleDay) || disabledItemHandler === ALWAYS_FALSE_HANDLER) {
|
|
163
|
-
return null;
|
|
164
|
-
}
|
|
165
|
-
let from = value.from;
|
|
166
|
-
let to = value.from;
|
|
167
|
-
let leftShift = true;
|
|
168
|
-
let rightShift = true;
|
|
169
|
-
while (leftShift || rightShift) {
|
|
170
|
-
leftShift = !disabledItemHandler(from.append({ day: -1 }));
|
|
171
|
-
if (leftShift) {
|
|
172
|
-
from = from.append({ day: -1 });
|
|
173
|
-
}
|
|
174
|
-
rightShift = !disabledItemHandler(to.append({ day: 1 }));
|
|
175
|
-
if (rightShift) {
|
|
176
|
-
to = to.append({ day: 1 });
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
return new TuiDayRange(from, to);
|
|
180
|
-
}
|
|
181
147
|
findItemByDayRange(dayRange) {
|
|
182
148
|
var _a;
|
|
183
149
|
return (_a = this.items.find(item => dayRange.daySame(item.range))) !== null && _a !== void 0 ? _a : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-calendar-range.js","sources":["../../../projects/kit/components/calendar-range/calendar-range.component.ts","../../../projects/kit/components/calendar-range/calendar-range.template.html","../../../projects/kit/components/calendar-range/calendar-range.module.ts","../../../projects/kit/components/calendar-range/taiga-ui-kit-components-calendar-range.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n HostListener,\n Inject,\n Input,\n Optional,\n Output,\n Self,\n} from '@angular/core';\nimport {\n ALWAYS_FALSE_HANDLER,\n TUI_FIRST_DAY,\n TUI_LAST_DAY,\n TuiBooleanHandler,\n TuiDay,\n TuiDayLike,\n TuiDayRange,\n TuiDestroyService,\n tuiIsString,\n TuiMonth,\n tuiNullableSame,\n tuiObjectFromEntries,\n tuiPure,\n TuiTypedMapper,\n tuiWatch,\n} from '@taiga-ui/cdk';\nimport {\n TUI_COMMON_ICONS,\n TUI_DEFAULT_MARKER_HANDLER,\n TuiCommonIcons,\n TuiMarkerHandler,\n TuiWithOptionalMinMax,\n} from '@taiga-ui/core';\nimport {TuiDayRangePeriod} from '@taiga-ui/kit/classes';\nimport {MAX_DAY_RANGE_LENGTH_MAPPER} from '@taiga-ui/kit/constants';\nimport {TUI_CALENDAR_DATE_STREAM, TUI_OTHER_DATE_TEXT} from '@taiga-ui/kit/tokens';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\n@Component({\n selector: 'tui-calendar-range',\n templateUrl: './calendar-range.template.html',\n styleUrls: ['./calendar-range.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService],\n})\nexport class TuiCalendarRangeComponent implements TuiWithOptionalMinMax<TuiDay> {\n /**\n * @deprecated use `item`\n */\n private selectedPeriod: TuiDayRangePeriod | null = null;\n\n @Input()\n defaultViewedMonth: TuiMonth = TuiMonth.currentLocal();\n\n @Input()\n disabledItemHandler: TuiBooleanHandler<TuiDay> = ALWAYS_FALSE_HANDLER;\n\n @Input()\n markerHandler: TuiMarkerHandler = TUI_DEFAULT_MARKER_HANDLER;\n\n @Input()\n items: readonly TuiDayRangePeriod[] = [];\n\n @Input()\n min: TuiDay | null = TUI_FIRST_DAY;\n\n @Input()\n max: TuiDay | null = TUI_LAST_DAY;\n\n @Input()\n minLength: TuiDayLike | null = null;\n\n @Input()\n maxLength: TuiDayLike | null = null;\n\n @Input()\n value: TuiDayRange | null = null;\n\n @Input()\n item: TuiDayRangePeriod | null = null;\n\n @Output()\n readonly valueChange = new EventEmitter<TuiDayRange | null>();\n\n @Output()\n readonly itemChange = new EventEmitter<TuiDayRangePeriod | null>();\n\n availableRange: TuiDayRange | null = null;\n previousValue: TuiDayRange | null = null;\n\n readonly maxLengthMapper = MAX_DAY_RANGE_LENGTH_MAPPER;\n\n get computedMin(): TuiDay {\n return this.min ?? TUI_FIRST_DAY;\n }\n\n get computedMax(): TuiDay {\n return this.max ?? TUI_LAST_DAY;\n }\n\n /**\n * @deprecated use `item`\n */\n get selectedActivePeriod(): TuiDayRangePeriod | null {\n return this.selectedPeriod;\n }\n\n /**\n * @deprecated use `item`\n */\n set selectedActivePeriod(period: TuiDayRangePeriod | null) {\n this.selectedPeriod = period;\n }\n\n constructor(\n @Optional()\n @Inject(TUI_CALENDAR_DATE_STREAM)\n valueChanges: Observable<TuiDayRange | null> | null,\n @Inject(ChangeDetectorRef) readonly cdr: ChangeDetectorRef,\n @Self() @Inject(TuiDestroyService) destroy$: TuiDestroyService,\n @Inject(TUI_OTHER_DATE_TEXT) readonly otherDateText$: Observable<string>,\n @Inject(TUI_COMMON_ICONS) readonly icons: TuiCommonIcons,\n ) {\n if (!valueChanges) {\n return;\n }\n\n valueChanges.pipe(tuiWatch(cdr), takeUntil(destroy$)).subscribe(value => {\n this.value = value;\n });\n }\n\n @HostListener('document:keydown.capture', ['$event'])\n onEsc(event: KeyboardEvent): void {\n if (event.key !== 'Escape' || !this.value?.isSingleDay) {\n return;\n }\n\n event.stopPropagation();\n this.value = this.previousValue;\n }\n\n readonly monthOffset: TuiTypedMapper<[TuiMonth, number], TuiMonth> = (value, month) =>\n value.append({month});\n\n readonly mapper: TuiTypedMapper<\n [\n readonly TuiDayRangePeriod[],\n TuiDay | null,\n TuiDay | null,\n TuiDayLike | null,\n string?,\n ],\n ReadonlyArray<TuiDayRangePeriod | string>\n > = (items, min, max, minLength, otherDateText = '') => [\n ...items.filter(\n item =>\n (minLength === null ||\n item.range.from.append(minLength).daySameOrBefore(item.range.to)) &&\n (min === null || item.range.to.daySameOrAfter(min)) &&\n (max === null || item.range.from.daySameOrBefore(max)),\n ),\n otherDateText,\n ];\n\n get calculatedDisabledItemHandler(): TuiBooleanHandler<TuiDay> {\n return this.calculateDisabledItemHandler(\n this.disabledItemHandler,\n this.value,\n this.minLength,\n );\n }\n\n get computedMonth(): TuiMonth {\n return this.value ? this.value.to : this.defaultViewedMonth;\n }\n\n isItemActive(item: TuiDayRangePeriod | string): boolean {\n const {activePeriod} = this;\n\n return (\n (tuiIsString(item) && activePeriod === null) ||\n activePeriod === item ||\n activePeriod?.toString() === item.toString()\n );\n }\n\n // TODO: investigate if it is used anywhere and (if not) delete it in v4.0\n onRangeChange(dayRange: TuiDayRange): void {\n this.updateValue(dayRange);\n }\n\n onDayClick(day: TuiDay): void {\n const {value} = this;\n\n this.previousValue = value;\n this.selectedActivePeriod = null;\n\n if (value === null || !value.isSingleDay) {\n this.value = new TuiDayRange(day, day);\n this.availableRange = this.findAvailableRange();\n this.itemChange.emit(this.findItemByDayRange(this.value));\n\n return;\n }\n\n const sortedDayRange = TuiDayRange.sort(value.from, day);\n\n this.updateValue(sortedDayRange);\n this.itemChange.emit(this.findItemByDayRange(sortedDayRange));\n }\n\n onItemSelect(item: TuiDayRangePeriod | string): void {\n if (!tuiIsString(item)) {\n this.selectedActivePeriod = item;\n this.updateValue(item.range.dayLimit(this.min, this.max));\n this.itemChange.emit(item);\n\n return;\n }\n\n if (this.activePeriod !== null) {\n this.selectedActivePeriod = null;\n this.updateValue(null);\n this.itemChange.emit(null);\n }\n }\n\n updateValue(value: TuiDayRange | null): void {\n this.value = value;\n this.valueChange.emit(value);\n }\n\n private get activePeriod(): TuiDayRangePeriod | null {\n return (\n this.item ??\n this.selectedActivePeriod ??\n (this.items.find(item =>\n tuiNullableSame<TuiDayRange>(\n this.value,\n item.range,\n (a, b) =>\n a.from.daySame(b.from.dayLimit(this.min, this.max)) &&\n a.to.daySame(b.to.dayLimit(this.min, this.max)),\n ),\n ) ||\n null)\n );\n }\n\n @tuiPure\n private calculateDisabledItemHandler(\n disabledItemHandler: TuiBooleanHandler<TuiDay>,\n value: TuiDayRange | null,\n minLength: TuiDayLike | null,\n ): TuiBooleanHandler<TuiDay> {\n return item => {\n if (!value?.isSingleDay || !minLength) {\n return this.isDisabledItem(disabledItemHandler, value, item);\n }\n\n const negativeMinLength = tuiObjectFromEntries(\n Object.entries(minLength).map(([key, value]) => [key, -value]),\n );\n const disabledBefore = value.from.append(negativeMinLength).append({day: 1});\n const disabledAfter = value.from.append(minLength).append({day: -1});\n const inDisabledRange =\n disabledBefore.dayBefore(item) && disabledAfter.dayAfter(item);\n\n return (\n inDisabledRange || this.isDisabledItem(disabledItemHandler, value, item)\n );\n };\n }\n\n private isDisabledItem(\n disabledItemHandler: TuiBooleanHandler<TuiDay>,\n value: TuiDayRange | null,\n item: TuiDay,\n ): boolean {\n return (\n disabledItemHandler(item) ||\n (!!value?.isSingleDay && !this.availableRangeContainsItem(item))\n );\n }\n\n private availableRangeContainsItem(item: TuiDay): boolean {\n if (this.availableRange === null) {\n return true;\n }\n\n const {from, to} = this.availableRange;\n\n return from.daySameOrBefore(item) && to.daySameOrAfter(item);\n }\n\n private findAvailableRange(): TuiDayRange | null {\n const {disabledItemHandler, value} = this;\n\n if (!value?.isSingleDay || disabledItemHandler === ALWAYS_FALSE_HANDLER) {\n return null;\n }\n\n let from = value.from;\n let to = value.from;\n\n let leftShift = true;\n let rightShift = true;\n\n while (leftShift || rightShift) {\n leftShift = !disabledItemHandler(from.append({day: -1}));\n\n if (leftShift) {\n from = from.append({day: -1});\n }\n\n rightShift = !disabledItemHandler(to.append({day: 1}));\n\n if (rightShift) {\n to = to.append({day: 1});\n }\n }\n\n return new TuiDayRange(from, to);\n }\n\n private findItemByDayRange(dayRange: TuiDayRange): TuiDayRangePeriod | null {\n return this.items.find(item => dayRange.daySame(item.range)) ?? null;\n }\n}\n","<tui-primitive-calendar-range\n *ngIf=\"!items.length; else presets\"\n automation-id=\"tui-calendar-range__calendars\"\n tuiPreventDefault=\"mousedown\"\n [defaultViewedMonthFirst]=\"defaultViewedMonth\"\n [defaultViewedMonthSecond]=\"defaultViewedMonth | tuiMapper: monthOffset : 1\"\n [disabledItemHandler]=\"calculatedDisabledItemHandler\"\n [markerHandler]=\"markerHandler\"\n [max]=\"computedMax | tuiMapper: maxLengthMapper : value : maxLength : false\"\n [min]=\"computedMin | tuiMapper: maxLengthMapper : value : maxLength : true\"\n [value]=\"value\"\n (dayClick)=\"onDayClick($event)\"\n></tui-primitive-calendar-range>\n<ng-template #presets>\n <div class=\"t-wrapper\">\n <tui-calendar\n automation-id=\"tui-calendar-range__calendar\"\n tuiPreventDefault=\"mousedown\"\n [disabledItemHandler]=\"calculatedDisabledItemHandler\"\n [markerHandler]=\"markerHandler\"\n [max]=\"computedMax | tuiMapper: maxLengthMapper : value : maxLength : false\"\n [min]=\"computedMin | tuiMapper: maxLengthMapper : value : maxLength : true\"\n [month]=\"computedMonth\"\n [value]=\"value\"\n (dayClick)=\"onDayClick($event)\"\n ></tui-calendar>\n <tui-data-list\n automation-id=\"tui-calendar-range__menu\"\n role=\"menu\"\n class=\"t-menu\"\n >\n <button\n *ngFor=\"let item of items | tuiMapper: mapper : min : max : minLength : (otherDateText$ | async)\"\n automation-id=\"tui-calendar-range__menu__item\"\n role=\"menuitemradio\"\n tuiOption\n tuiPreventDefault=\"mousedown\"\n [attr.aria-checked]=\"isItemActive(item)\"\n (click)=\"onItemSelect(item)\"\n (keydown.enter.prevent)=\"onItemSelect(item)\"\n (keydown.space.prevent)=\"onItemSelect(item)\"\n >\n {{ item }}\n <tui-svg\n *ngIf=\"isItemActive(item)\"\n automation-id=\"tui-calendar-range__checkmark\"\n class=\"t-checkmark\"\n [src]=\"icons.check\"\n ></tui-svg>\n </button>\n </tui-data-list>\n </div>\n</ng-template>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiMapperPipeModule, TuiPreventDefaultModule} from '@taiga-ui/cdk';\nimport {TuiCalendarModule, TuiDataListModule, TuiSvgModule} from '@taiga-ui/core';\nimport {TuiPrimitiveCalendarRangeModule} from '@taiga-ui/kit/internal/primitive-calendar-range';\n\nimport {TuiCalendarRangeComponent} from './calendar-range.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiMapperPipeModule,\n TuiPreventDefaultModule,\n TuiCalendarModule,\n TuiCalendarModule,\n TuiSvgModule,\n TuiDataListModule,\n TuiPrimitiveCalendarRangeModule,\n ],\n declarations: [TuiCalendarRangeComponent],\n exports: [TuiCalendarRangeComponent],\n})\nexport class TuiCalendarRangeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAiDa,yBAAyB,CAAA;IAqElC,WAGI,CAAA,YAAmD,EACf,GAAsB,EACvB,QAA2B,EACxB,cAAkC,EACrC,KAAqB,EAAA;QAHpB,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QAEpB,IAAc,CAAA,cAAA,GAAd,cAAc,CAAoB;QACrC,IAAK,CAAA,KAAA,GAAL,KAAK,CAAgB;AA3E5D;;AAEG;QACK,IAAc,CAAA,cAAA,GAA6B,IAAI,CAAC;AAGxD,QAAA,IAAA,CAAA,kBAAkB,GAAa,QAAQ,CAAC,YAAY,EAAE,CAAC;QAGvD,IAAmB,CAAA,mBAAA,GAA8B,oBAAoB,CAAC;QAGtE,IAAa,CAAA,aAAA,GAAqB,0BAA0B,CAAC;QAG7D,IAAK,CAAA,KAAA,GAAiC,EAAE,CAAC;QAGzC,IAAG,CAAA,GAAA,GAAkB,aAAa,CAAC;QAGnC,IAAG,CAAA,GAAA,GAAkB,YAAY,CAAC;QAGlC,IAAS,CAAA,SAAA,GAAsB,IAAI,CAAC;QAGpC,IAAS,CAAA,SAAA,GAAsB,IAAI,CAAC;QAGpC,IAAK,CAAA,KAAA,GAAuB,IAAI,CAAC;QAGjC,IAAI,CAAA,IAAA,GAA6B,IAAI,CAAC;AAG7B,QAAA,IAAA,CAAA,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,iBAAiB;YACjB,+BAA+B;AAClC,SAAA,CAAA,EAAA,CAAA,CAAA;4FAIQ,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAdlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBACvB,iBAAiB;wBACjB,iBAAiB;wBACjB,YAAY;wBACZ,iBAAiB;wBACjB,+BAA+B;AAClC,qBAAA;oBACD,YAAY,EAAE,CAAC,yBAAyB,CAAC;oBACzC,OAAO,EAAE,CAAC,yBAAyB,CAAC;AACvC,iBAAA,CAAA;;;ACrBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-calendar-range.js","sources":["../../../projects/kit/components/calendar-range/calendar-range.component.ts","../../../projects/kit/components/calendar-range/calendar-range.template.html","../../../projects/kit/components/calendar-range/calendar-range.module.ts","../../../projects/kit/components/calendar-range/taiga-ui-kit-components-calendar-range.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n HostListener,\n Inject,\n Input,\n Optional,\n Output,\n Self,\n} from '@angular/core';\nimport {\n ALWAYS_FALSE_HANDLER,\n TUI_FIRST_DAY,\n TUI_LAST_DAY,\n TuiBooleanHandler,\n TuiDay,\n TuiDayLike,\n TuiDayRange,\n TuiDestroyService,\n tuiIsString,\n TuiMonth,\n tuiNullableSame,\n tuiObjectFromEntries,\n tuiPure,\n TuiTypedMapper,\n tuiWatch,\n} from '@taiga-ui/cdk';\nimport {\n TUI_COMMON_ICONS,\n TUI_DEFAULT_MARKER_HANDLER,\n TuiCommonIcons,\n TuiMarkerHandler,\n TuiWithOptionalMinMax,\n} from '@taiga-ui/core';\nimport {TuiDayRangePeriod} from '@taiga-ui/kit/classes';\nimport {MAX_DAY_RANGE_LENGTH_MAPPER} from '@taiga-ui/kit/constants';\nimport {TUI_CALENDAR_DATE_STREAM, TUI_OTHER_DATE_TEXT} from '@taiga-ui/kit/tokens';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\n@Component({\n selector: 'tui-calendar-range',\n templateUrl: './calendar-range.template.html',\n styleUrls: ['./calendar-range.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService],\n})\nexport class TuiCalendarRangeComponent implements TuiWithOptionalMinMax<TuiDay> {\n /**\n * @deprecated use `item`\n */\n private selectedPeriod: TuiDayRangePeriod | null = null;\n\n @Input()\n defaultViewedMonth: TuiMonth = TuiMonth.currentLocal();\n\n @Input()\n disabledItemHandler: TuiBooleanHandler<TuiDay> = ALWAYS_FALSE_HANDLER;\n\n @Input()\n markerHandler: TuiMarkerHandler = TUI_DEFAULT_MARKER_HANDLER;\n\n @Input()\n items: readonly TuiDayRangePeriod[] = [];\n\n @Input()\n min: TuiDay | null = TUI_FIRST_DAY;\n\n @Input()\n max: TuiDay | null = TUI_LAST_DAY;\n\n @Input()\n minLength: TuiDayLike | null = null;\n\n @Input()\n maxLength: TuiDayLike | null = null;\n\n @Input()\n value: TuiDayRange | null = null;\n\n @Input()\n item: TuiDayRangePeriod | null = null;\n\n @Output()\n readonly valueChange = new EventEmitter<TuiDayRange | null>();\n\n @Output()\n readonly itemChange = new EventEmitter<TuiDayRangePeriod | null>();\n\n previousValue: TuiDayRange | null = null;\n\n readonly maxLengthMapper = MAX_DAY_RANGE_LENGTH_MAPPER;\n\n get computedMin(): TuiDay {\n return this.min ?? TUI_FIRST_DAY;\n }\n\n get computedMax(): TuiDay {\n return this.max ?? TUI_LAST_DAY;\n }\n\n /**\n * @deprecated use `item`\n */\n get selectedActivePeriod(): TuiDayRangePeriod | null {\n return this.selectedPeriod;\n }\n\n /**\n * @deprecated use `item`\n */\n set selectedActivePeriod(period: TuiDayRangePeriod | null) {\n this.selectedPeriod = period;\n }\n\n constructor(\n @Optional()\n @Inject(TUI_CALENDAR_DATE_STREAM)\n valueChanges: Observable<TuiDayRange | null> | null,\n @Inject(ChangeDetectorRef) readonly cdr: ChangeDetectorRef,\n @Self() @Inject(TuiDestroyService) destroy$: TuiDestroyService,\n @Inject(TUI_OTHER_DATE_TEXT) readonly otherDateText$: Observable<string | null>,\n @Inject(TUI_COMMON_ICONS) readonly icons: TuiCommonIcons,\n ) {\n if (!valueChanges) {\n return;\n }\n\n valueChanges.pipe(tuiWatch(cdr), takeUntil(destroy$)).subscribe(value => {\n this.value = value;\n });\n }\n\n @HostListener('document:keydown.capture', ['$event'])\n onEsc(event: KeyboardEvent): void {\n if (event.key !== 'Escape' || !this.value?.isSingleDay) {\n return;\n }\n\n event.stopPropagation();\n this.value = this.previousValue;\n }\n\n readonly monthOffset: TuiTypedMapper<[TuiMonth, number], TuiMonth> = (value, month) =>\n value.append({month});\n\n readonly mapper: TuiTypedMapper<\n [\n readonly TuiDayRangePeriod[],\n TuiDay | null,\n TuiDay | null,\n TuiDayLike | null,\n string | null | undefined,\n ],\n ReadonlyArray<TuiDayRangePeriod | string>\n > = (items, min, max, minLength, otherDateText) => [\n ...items.filter(\n item =>\n (minLength === null ||\n item.range.from.append(minLength).daySameOrBefore(item.range.to)) &&\n (min === null || item.range.to.daySameOrAfter(min)) &&\n (max === null || item.range.from.daySameOrBefore(max)),\n ),\n otherDateText ?? '',\n ];\n\n get calculatedDisabledItemHandler(): TuiBooleanHandler<TuiDay> {\n return this.calculateDisabledItemHandler(\n this.disabledItemHandler,\n this.value,\n this.minLength,\n );\n }\n\n get computedMonth(): TuiMonth {\n return this.value ? this.value.to : this.defaultViewedMonth;\n }\n\n isItemActive(item: TuiDayRangePeriod | string): boolean {\n const {activePeriod} = this;\n\n return (\n (tuiIsString(item) && activePeriod === null) ||\n activePeriod === item ||\n activePeriod?.toString() === item.toString()\n );\n }\n\n // TODO: investigate if it is used anywhere and (if not) delete it in v4.0\n onRangeChange(dayRange: TuiDayRange): void {\n this.updateValue(dayRange);\n }\n\n onDayClick(day: TuiDay): void {\n const {value} = this;\n\n this.previousValue = value;\n this.selectedActivePeriod = null;\n\n if (value === null || !value.isSingleDay) {\n this.value = new TuiDayRange(day, day);\n this.itemChange.emit(this.findItemByDayRange(this.value));\n\n return;\n }\n\n const sortedDayRange = TuiDayRange.sort(value.from, day);\n\n this.updateValue(sortedDayRange);\n this.itemChange.emit(this.findItemByDayRange(sortedDayRange));\n }\n\n onItemSelect(item: TuiDayRangePeriod | string): void {\n if (!tuiIsString(item)) {\n this.selectedActivePeriod = item;\n this.updateValue(item.range.dayLimit(this.min, this.max));\n this.itemChange.emit(item);\n\n return;\n }\n\n if (this.activePeriod !== null) {\n this.selectedActivePeriod = null;\n this.updateValue(null);\n this.itemChange.emit(null);\n }\n }\n\n updateValue(value: TuiDayRange | null): void {\n this.value = value;\n this.valueChange.emit(value);\n }\n\n private get activePeriod(): TuiDayRangePeriod | null {\n return (\n this.item ??\n this.selectedActivePeriod ??\n (this.items.find(item =>\n tuiNullableSame<TuiDayRange>(\n this.value,\n item.range,\n (a, b) =>\n a.from.daySame(b.from.dayLimit(this.min, this.max)) &&\n a.to.daySame(b.to.dayLimit(this.min, this.max)),\n ),\n ) ||\n null)\n );\n }\n\n @tuiPure\n private calculateDisabledItemHandler(\n disabledItemHandler: TuiBooleanHandler<TuiDay>,\n value: TuiDayRange | null,\n minLength: TuiDayLike | null,\n ): TuiBooleanHandler<TuiDay> {\n return item => {\n if (!value?.isSingleDay || !minLength) {\n return disabledItemHandler(item);\n }\n\n const negativeMinLength = tuiObjectFromEntries(\n Object.entries(minLength).map(([key, value]) => [key, -value]),\n );\n const disabledBefore = value.from.append(negativeMinLength).append({day: 1});\n const disabledAfter = value.from.append(minLength).append({day: -1});\n const inDisabledRange =\n disabledBefore.dayBefore(item) && disabledAfter.dayAfter(item);\n\n return inDisabledRange || disabledItemHandler(item);\n };\n }\n\n private findItemByDayRange(dayRange: TuiDayRange): TuiDayRangePeriod | null {\n return this.items.find(item => dayRange.daySame(item.range)) ?? null;\n }\n}\n","<tui-primitive-calendar-range\n *ngIf=\"!items.length; else presets\"\n automation-id=\"tui-calendar-range__calendars\"\n tuiPreventDefault=\"mousedown\"\n [defaultViewedMonthFirst]=\"defaultViewedMonth\"\n [defaultViewedMonthSecond]=\"defaultViewedMonth | tuiMapper: monthOffset : 1\"\n [disabledItemHandler]=\"calculatedDisabledItemHandler\"\n [markerHandler]=\"markerHandler\"\n [max]=\"computedMax | tuiMapper: maxLengthMapper : value : maxLength : false\"\n [min]=\"computedMin | tuiMapper: maxLengthMapper : value : maxLength : true\"\n [value]=\"value\"\n (dayClick)=\"onDayClick($event)\"\n></tui-primitive-calendar-range>\n<ng-template #presets>\n <div class=\"t-wrapper\">\n <tui-calendar\n automation-id=\"tui-calendar-range__calendar\"\n tuiPreventDefault=\"mousedown\"\n [disabledItemHandler]=\"calculatedDisabledItemHandler\"\n [markerHandler]=\"markerHandler\"\n [max]=\"computedMax | tuiMapper: maxLengthMapper : value : maxLength : false\"\n [min]=\"computedMin | tuiMapper: maxLengthMapper : value : maxLength : true\"\n [month]=\"computedMonth\"\n [value]=\"value\"\n (dayClick)=\"onDayClick($event)\"\n ></tui-calendar>\n <tui-data-list\n automation-id=\"tui-calendar-range__menu\"\n role=\"menu\"\n class=\"t-menu\"\n >\n <button\n *ngFor=\"let item of items | tuiMapper: mapper : min : max : minLength : (otherDateText$ | async)\"\n automation-id=\"tui-calendar-range__menu__item\"\n role=\"menuitemradio\"\n tuiOption\n tuiPreventDefault=\"mousedown\"\n [attr.aria-checked]=\"isItemActive(item)\"\n (click)=\"onItemSelect(item)\"\n (keydown.enter.prevent)=\"onItemSelect(item)\"\n (keydown.space.prevent)=\"onItemSelect(item)\"\n >\n {{ item }}\n <tui-svg\n *ngIf=\"isItemActive(item)\"\n automation-id=\"tui-calendar-range__checkmark\"\n class=\"t-checkmark\"\n [src]=\"icons.check\"\n ></tui-svg>\n </button>\n </tui-data-list>\n </div>\n</ng-template>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiMapperPipeModule, TuiPreventDefaultModule} from '@taiga-ui/cdk';\nimport {TuiCalendarModule, TuiDataListModule, TuiSvgModule} from '@taiga-ui/core';\nimport {TuiPrimitiveCalendarRangeModule} from '@taiga-ui/kit/internal/primitive-calendar-range';\n\nimport {TuiCalendarRangeComponent} from './calendar-range.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiMapperPipeModule,\n TuiPreventDefaultModule,\n TuiCalendarModule,\n TuiCalendarModule,\n TuiSvgModule,\n TuiDataListModule,\n TuiPrimitiveCalendarRangeModule,\n ],\n declarations: [TuiCalendarRangeComponent],\n exports: [TuiCalendarRangeComponent],\n})\nexport class TuiCalendarRangeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAiDa,yBAAyB,CAAA;IAoElC,WAGI,CAAA,YAAmD,EACf,GAAsB,EACvB,QAA2B,EACxB,cAAyC,EAC5C,KAAqB,EAAA;QAHpB,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QAEpB,IAAc,CAAA,cAAA,GAAd,cAAc,CAA2B;QAC5C,IAAK,CAAA,KAAA,GAAL,KAAK,CAAgB;AA1E5D;;AAEG;QACK,IAAc,CAAA,cAAA,GAA6B,IAAI,CAAC;AAGxD,QAAA,IAAA,CAAA,kBAAkB,GAAa,QAAQ,CAAC,YAAY,EAAE,CAAC;QAGvD,IAAmB,CAAA,mBAAA,GAA8B,oBAAoB,CAAC;QAGtE,IAAa,CAAA,aAAA,GAAqB,0BAA0B,CAAC;QAG7D,IAAK,CAAA,KAAA,GAAiC,EAAE,CAAC;QAGzC,IAAG,CAAA,GAAA,GAAkB,aAAa,CAAC;QAGnC,IAAG,CAAA,GAAA,GAAkB,YAAY,CAAC;QAGlC,IAAS,CAAA,SAAA,GAAsB,IAAI,CAAC;QAGpC,IAAS,CAAA,SAAA,GAAsB,IAAI,CAAC;QAGpC,IAAK,CAAA,KAAA,GAAuB,IAAI,CAAC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0", v
|
|
|
131
131
|
tuiAsControl(TuiTextareaComponent),
|
|
132
132
|
TEXTFIELD_CONTROLLER_PROVIDER,
|
|
133
133
|
MODE_PROVIDER,
|
|
134
|
-
], queries: [{ propertyName: "textfield", first: true, predicate: TuiTextfieldComponent, descendants: true, read: ElementRef }], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, 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.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId", "context"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i3.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.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
134
|
+
], queries: [{ propertyName: "textfield", first: true, predicate: TuiTextfieldComponent, descendants: true, read: ElementRef }], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, 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}@supports (-webkit-hyphens: none){:host .t-pseudo-content,:host .t-input{text-wrap:balance}}.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.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId", "context"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i3.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.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
135
135
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiTextareaComponent, decorators: [{
|
|
136
136
|
type: Component,
|
|
137
137
|
args: [{
|
|
@@ -244,7 +244,7 @@ TuiTextAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
244
244
|
tuiAsControl(TuiTextAreaComponent),
|
|
245
245
|
TEXTFIELD_CONTROLLER_PROVIDER,
|
|
246
246
|
MODE_PROVIDER,
|
|
247
|
-
], usesInheritance: true, ngImport: i0, 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.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId", "context"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i3.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.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
247
|
+
], usesInheritance: true, ngImport: i0, 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}@supports (-webkit-hyphens: none){:host .t-pseudo-content,:host .t-input{text-wrap:balance}}.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.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId", "context"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i3.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.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
248
248
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiTextAreaComponent, decorators: [{
|
|
249
249
|
type: Component,
|
|
250
250
|
args: [{
|