@taiga-ui/core 4.6.0 → 4.7.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/components/calendar/calendar-sheet.component.d.ts +3 -3
- package/components/calendar/calendar-year.component.d.ts +3 -6
- package/components/data-list/data-list.component.d.ts +2 -0
- package/components/textfield/select.directive.d.ts +4 -4
- package/components/textfield/textfield.component.d.ts +3 -1
- package/components/textfield/textfield.directive.d.ts +11 -8
- package/directives/appearance/appearance.bindings.d.ts +3 -0
- package/directives/appearance/appearance.directive.d.ts +4 -1
- package/directives/appearance/with-appearance.d.ts +1 -1
- package/directives/dropdown/dropdown-options.directive.d.ts +1 -1
- package/directives/hint/hint-describe.directive.d.ts +1 -0
- package/directives/hint/hint-options.directive.d.ts +1 -1
- package/esm2022/components/calendar/calendar-sheet.component.mjs +27 -29
- package/esm2022/components/calendar/calendar-year.component.mjs +20 -50
- package/esm2022/components/data-list/data-list.component.mjs +10 -4
- package/esm2022/components/root/root.component.mjs +8 -2
- package/esm2022/components/textfield/select.directive.mjs +2 -3
- package/esm2022/components/textfield/textfield.component.mjs +9 -5
- package/esm2022/components/textfield/textfield.directive.mjs +11 -7
- package/esm2022/directives/appearance/appearance.bindings.mjs +4 -1
- package/esm2022/directives/appearance/appearance.directive.mjs +12 -4
- package/esm2022/directives/appearance/with-appearance.mjs +3 -2
- package/esm2022/directives/dropdown/dropdown-options.directive.mjs +3 -2
- package/esm2022/directives/group/group.directive.mjs +2 -2
- package/esm2022/directives/hint/hint-describe.directive.mjs +5 -4
- package/esm2022/directives/hint/hint-options.directive.mjs +3 -2
- package/fesm2022/taiga-ui-core-components-calendar.mjs +44 -76
- package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-data-list.mjs +9 -3
- package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-root.mjs +7 -1
- package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-textfield.mjs +19 -12
- package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-appearance.mjs +17 -5
- package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs +2 -2
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-group.mjs +2 -2
- package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-hint.mjs +5 -4
- package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
- package/package.json +13 -13
- package/styles/components/appearance.less +1 -1
- package/styles/components/group.less +6 -5
- package/styles/components/textfield.less +14 -5
- package/styles/mixins/date-picker.less +152 -0
- package/styles/mixins/picker.less +1 -0
- package/styles/mixins/picker.scss +1 -0
- package/styles/taiga-ui-local.less +1 -0
- package/styles/theme/appearance/floating.less +2 -2
- package/styles/theme/appearance/glass.less +3 -3
- package/styles/theme/appearance/opposite.less +2 -2
- package/styles/theme/appearance/outline.less +6 -5
- package/styles/theme/appearance/primary.less +2 -1
- package/styles/theme/appearance/secondary.less +11 -6
- package/styles/theme/appearance/status.less +12 -6
- package/styles/theme/appearance/textfield.less +3 -3
- package/styles/theme/palette.less +58 -58
- package/styles/theme/wrapper.less +11 -9
|
@@ -9,7 +9,7 @@ import * as i1$1 from '@taiga-ui/cdk/directives/native-validator';
|
|
|
9
9
|
import { TuiNativeValidator } from '@taiga-ui/cdk/directives/native-validator';
|
|
10
10
|
import { tuiCreateToken, tuiProvide } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
11
11
|
import * as i2 from '@taiga-ui/core/directives/appearance';
|
|
12
|
-
import { tuiAppearance, tuiAppearanceState, tuiAppearanceFocus, TuiAppearance } from '@taiga-ui/core/directives/appearance';
|
|
12
|
+
import { tuiAppearance, tuiAppearanceState, tuiAppearanceMode, tuiAppearanceFocus, TuiAppearance } from '@taiga-ui/core/directives/appearance';
|
|
13
13
|
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
14
14
|
import { WaResizeObserver } from '@ng-web-apis/resize-observer';
|
|
15
15
|
import { tuiInjectId } from '@taiga-ui/cdk/services';
|
|
@@ -127,8 +127,11 @@ class TuiTextfieldComponent {
|
|
|
127
127
|
get id() {
|
|
128
128
|
return this.el?.nativeElement.id || this.autoId;
|
|
129
129
|
}
|
|
130
|
+
get size() {
|
|
131
|
+
return this.options.size();
|
|
132
|
+
}
|
|
130
133
|
handleOption(option) {
|
|
131
|
-
this.directive?.setValue(
|
|
134
|
+
this.directive?.setValue(option);
|
|
132
135
|
this.open.set(false);
|
|
133
136
|
}
|
|
134
137
|
get computedFiller() {
|
|
@@ -149,10 +152,10 @@ class TuiTextfieldComponent {
|
|
|
149
152
|
this.cdr.detectChanges();
|
|
150
153
|
}
|
|
151
154
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiTextfieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
152
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiTextfieldComponent, isStandalone: true, selector: "tui-textfield", inputs: { filler: "filler", stringify: "stringify", content: "content" }, host: { properties: { "style.--t-side.px": "side", "attr.data-size": "options.size()", "class._with-label": "hasLabel", "class._disabled": "el?.nativeElement.disabled" } }, providers: [
|
|
155
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiTextfieldComponent, isStandalone: true, selector: "tui-textfield", inputs: { filler: "filler", stringify: "stringify", content: "content" }, host: { properties: { "style.--t-side.px": "side", "attr.data-size": "options.size()", "class._with-label": "hasLabel", "class._with-template": "content", "class._disabled": "el?.nativeElement.disabled" } }, providers: [
|
|
153
156
|
tuiAsDataListHost(TuiTextfieldComponent),
|
|
154
157
|
tuiDropdownOptionsProvider({ limitWidth: 'fixed' }),
|
|
155
|
-
], queries: [{ propertyName: "directive", first: true, predicate: i0.forwardRef(function () { return TuiTextfieldDirective; }), descendants: true }, { propertyName: "label", first: true, predicate: i0.forwardRef(function () { return TuiLabel; }), descendants: true, read: ElementRef }, { propertyName: "control", first: true, predicate: NgControl, descendants: true }, { propertyName: "el", first: true, predicate: i0.forwardRef(function () { return TuiTextfieldDirective; }), descendants: true, read: ElementRef, static: true }], viewQueries: [{ propertyName: "vcr", first: true, predicate: ["vcr"], descendants: true, read: ViewContainerRef, static: true }], hostDirectives: [{ directive: i1.TuiDropdownDirective }, { directive: i1.TuiWithDropdownOpen }, { directive: TuiWithTextfieldDropdown }, { directive: i3.TuiWithIcons }], ngImport: i0, template: "<ng-content select=\"input\" />\n<ng-content select=\"select\" />\n<ng-content select=\"label\" />\n<span\n class=\"t-content\"\n (mousedown.prevent)=\"el?.nativeElement?.focus()\"\n (waResizeObserver)=\"onResize($event)\"\n>\n <ng-content />\n <button\n *ngIf=\"options.cleaner()\"\n appearance=\"icon\"\n size=\"xs\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-clear\"\n [iconStart]=\"icons.close\"\n (click)=\"directive?.setValue('')\"\n (pointerdown.silent.prevent)=\"el?.nativeElement?.focus()\"\n ></button>\n <ng-container #vcr />\n <ng-content select=\"tui-icon\" />\n</span>\n<span class=\"t-template\">\n <ng-container *polymorpheusOutlet=\"content as text; context: {$implicit: control?.value}\">\n {{ text }}\n </ng-container>\n</span>\n<input\n *ngIf=\"showFiller\"\n aria-hidden=\"true\"\n disabled\n class=\"t-filler\"\n [value]=\"computedFiller\"\n/>\n", styles: ["tui-textfield{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;--t-height: var(--tui-height-l);position:relative;display:flex;align-items:center;pointer-events:none;cursor:pointer;block-size:var(--t-height);color:var(--tui-text-tertiary);padding:0 var(--tui-padding-l);border-radius:var(--tui-radius-l);font:var(--tui-font-text-m);box-sizing:border-box}tui-textfield[style*=\"--t-icon-start:\"]{--t-left: 2.25rem}tui-textfield[style*=\"--t-icon-end:\"]{--t-right: 2.25rem}tui-textfield:after{margin-inline-start:.25rem}tui-textfield input,tui-textfield select{font:var(--tui-font-text-m)}tui-textfield[data-size=s]{--t-height: var(--tui-height-s);padding:0 var(--tui-padding-s);border-radius:var(--tui-radius-m);font:var(--tui-font-text-s)}tui-textfield[data-size=s][style*=\"--t-icon-start:\"]{--t-left: 1.25rem}tui-textfield[data-size=s][style*=\"--t-icon-end:\"]{--t-right: 1.25rem}tui-textfield[data-size=s]:before{margin:0 .5rem 0 -.125rem;font-size:1rem}tui-textfield[data-size=s]:after{margin:0 -.175rem 0 .575rem;font-size:1rem}tui-textfield[data-size=s] input,tui-textfield[data-size=s] select{font:var(--tui-font-text-s)}tui-textfield[data-size=s] .t-content{gap:0;margin-inline-end:-.325rem}tui-textfield[data-size=m]{--t-height: var(--tui-height-m);padding:0 var(--tui-padding-m);border-radius:var(--tui-radius-m);font:var(--tui-font-text-s)}tui-textfield[data-size=m][style*=\"--t-icon-start:\"]{--t-left: 1.75rem}tui-textfield[data-size=m][style*=\"--t-icon-end:\"]{--t-right: 1.75rem}tui-textfield[data-size=m]:before{margin:0 .375rem 0 -.125rem}tui-textfield[data-size=m]:after{margin:0 -.125rem 0 .5rem}tui-textfield[data-size=m] input,tui-textfield[data-size=m] select{font:var(--tui-font-text-s)}tui-textfield[data-size=m] .t-content{margin-inline-end:-.125rem}tui-textfield:hover{color:var(--tui-text-secondary)}tui-textfield:hover:has(input:read-only),tui-textfield:hover:has(select[data-mode=readonly]){color:var(--tui-text-tertiary)}tui-textfield:before{z-index:1;margin-inline-end:.75rem}tui-textfield:has(:disabled:not(.t-filler,button,option)):before,tui-textfield:has(:disabled:not(.t-filler,button,option)):after,tui-textfield:has(:disabled:not(.t-filler,button,option)) .t-template{opacity:var(--tui-disabled-opacity)}tui-textfield._disabled:before,tui-textfield._disabled:after,tui-textfield._disabled .t-template{opacity:var(--tui-disabled-opacity)}tui-textfield:has(label:not(:empty)) .t-template,tui-textfield:has(label:not(:empty)) input,tui-textfield:has(label:not(:empty)) select{padding-top:calc(var(--t-height) / 3)}tui-textfield:has(label:not(:empty)) .t-template:not(:-webkit-autofill)::placeholder,tui-textfield:has(label:not(:empty)) input:not(:-webkit-autofill)::placeholder,tui-textfield:has(label:not(:empty)) select:not(:-webkit-autofill)::placeholder,tui-textfield:has(label:not(:empty)) .t-template._empty,tui-textfield:has(label:not(:empty)) input._empty,tui-textfield:has(label:not(:empty)) select._empty{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:transparent!important}tui-textfield._with-label .t-template,tui-textfield._with-label input,tui-textfield._with-label select{padding-top:calc(var(--t-height) / 3)}tui-textfield._with-label .t-template:not(:-webkit-autofill)::placeholder,tui-textfield._with-label input:not(:-webkit-autofill)::placeholder,tui-textfield._with-label select:not(:-webkit-autofill)::placeholder,tui-textfield._with-label .t-template._empty,tui-textfield._with-label input._empty,tui-textfield._with-label select._empty{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:transparent!important}tui-textfield .t-template,tui-textfield input:defined,tui-textfield select:defined{position:absolute;top:0;left:0;bottom:0;right:0;-webkit-appearance:none;appearance:none;box-sizing:border-box;border:none;border-inline-start:var(--t-left, 0) solid transparent!important;border-inline-end:calc(var(--t-right, var(--t-0, 0rem)) + var(--t-side)) solid transparent!important;border-radius:inherit;padding:inherit}tui-textfield input:defined,tui-textfield select:defined{pointer-events:auto;background:transparent no-repeat center right 1rem / 2rem;background-clip:border-box,padding-box}tui-textfield input:defined:read-only~.t-filler,tui-textfield select:defined:read-only~.t-filler{display:none}tui-textfield input:defined:disabled~label,tui-textfield select:defined:disabled~label,tui-textfield input:defined:disabled~.t-content,tui-textfield select:defined:disabled~.t-content{opacity:var(--tui-disabled-opacity)}tui-textfield input:defined:disabled~label tui-icon,tui-textfield select:defined:disabled~label tui-icon,tui-textfield input:defined:disabled~.t-content tui-icon,tui-textfield select:defined:disabled~.t-content tui-icon{display:none}tui-textfield input:defined:-webkit-autofill~label,tui-textfield select:defined:-webkit-autofill~label,tui-textfield input:defined:not(._empty):not(:placeholder-shown)~label,tui-textfield select:defined:not(._empty):not(:placeholder-shown)~label{font-size:.83em;transform:translateY(-.7em)}tui-textfield input:defined:-webkit-autofill:not(:disabled)[data-mode=invalid]~label,tui-textfield select:defined:-webkit-autofill:not(:disabled)[data-mode=invalid]~label,tui-textfield input:defined:not(._empty):not(:placeholder-shown):not(:disabled)[data-mode=invalid]~label,tui-textfield select:defined:not(._empty):not(:placeholder-shown):not(:disabled)[data-mode=invalid]~label,tui-textfield input:defined:-webkit-autofill:invalid:not(:disabled):not([data-mode])~label,tui-textfield select:defined:-webkit-autofill:invalid:not(:disabled):not([data-mode])~label,tui-textfield input:defined:not(._empty):not(:placeholder-shown):invalid:not(:disabled):not([data-mode])~label,tui-textfield select:defined:not(._empty):not(:placeholder-shown):invalid:not(:disabled):not([data-mode])~label{color:var(--tui-text-negative)}tui-textfield input:defined:-webkit-autofill:not(:disabled):not([data-mode=readonly])~.t-content .t-clear,tui-textfield select:defined:-webkit-autofill:not(:disabled):not([data-mode=readonly])~.t-content .t-clear,tui-textfield input:defined:not(._empty):not(:placeholder-shown):not(:disabled):not([data-mode=readonly])~.t-content .t-clear,tui-textfield select:defined:not(._empty):not(:placeholder-shown):not(:disabled):not([data-mode=readonly])~.t-content .t-clear{display:flex}tui-textfield input:defined:not([data-mode=readonly]):focus-visible:not([data-focus=false])::placeholder,tui-textfield select:defined:not([data-mode=readonly]):focus-visible:not([data-focus=false])::placeholder,tui-textfield input:defined:not([data-mode=readonly]):focus-visible:not([data-focus=false])._empty,tui-textfield select:defined:not([data-mode=readonly]):focus-visible:not([data-focus=false])._empty{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:var(--tui-text-tertiary)!important}tui-textfield input:defined:not([data-mode=readonly]):focus-visible:not([data-focus=false])~label,tui-textfield select:defined:not([data-mode=readonly]):focus-visible:not([data-focus=false])~label{color:var(--tui-text-primary)!important;font-size:.83em;transform:translateY(-.7em)}tui-textfield input:defined:not([data-mode=readonly])[data-focus=true]::placeholder,tui-textfield select:defined:not([data-mode=readonly])[data-focus=true]::placeholder,tui-textfield input:defined:not([data-mode=readonly])[data-focus=true]._empty,tui-textfield select:defined:not([data-mode=readonly])[data-focus=true]._empty{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:var(--tui-text-tertiary)!important}tui-textfield input:defined:not([data-mode=readonly])[data-focus=true]~label,tui-textfield select:defined:not([data-mode=readonly])[data-focus=true]~label{color:var(--tui-text-primary)!important;font-size:.83em;transform:translateY(-.7em)}@supports (-webkit-touch-callout: none){tui-textfield input:defined._ios-fix,tui-textfield select:defined._ios-fix{position:fixed;left:1000rem}}tui-textfield label:not([data-orientation=vertical]){transition-property:all;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;display:block;flex:1;font-size:inherit}tui-textfield label:defined,tui-textfield input:defined::placeholder,tui-textfield select:defined._empty{color:var(--tui-text-secondary)}tui-textfield select:not([data-mode=readonly]){cursor:pointer}tui-textfield button,tui-textfield a{pointer-events:auto}tui-textfield .t-content{display:flex;align-items:center;gap:.25rem;margin-inline-start:auto;isolation:isolate}tui-textfield .t-content tui-icon{pointer-events:auto}tui-textfield .t-clear{display:none;pointer-events:auto}tui-textfield .t-filler:defined{pointer-events:none;background:none;color:var(--tui-text-tertiary);opacity:1}tui-textfield [tuiFluidTypography]{font-weight:700}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: WaResizeObserver, selector: "[waResizeObserver]", inputs: ["box"], outputs: ["waResizeObserver"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
158
|
+
], queries: [{ propertyName: "directive", first: true, predicate: i0.forwardRef(function () { return TuiTextfieldDirective; }), descendants: true }, { propertyName: "label", first: true, predicate: i0.forwardRef(function () { return TuiLabel; }), descendants: true, read: ElementRef }, { propertyName: "control", first: true, predicate: NgControl, descendants: true }, { propertyName: "el", first: true, predicate: i0.forwardRef(function () { return TuiTextfieldDirective; }), descendants: true, read: ElementRef, static: true }], viewQueries: [{ propertyName: "vcr", first: true, predicate: ["vcr"], descendants: true, read: ViewContainerRef, static: true }], hostDirectives: [{ directive: i1.TuiDropdownDirective }, { directive: i1.TuiWithDropdownOpen }, { directive: TuiWithTextfieldDropdown }, { directive: i3.TuiWithIcons }], ngImport: i0, template: "<ng-content select=\"input\" />\n<ng-content select=\"select\" />\n<ng-content select=\"label\" />\n<span\n class=\"t-content\"\n (mousedown.prevent)=\"el?.nativeElement?.focus()\"\n (waResizeObserver)=\"onResize($event)\"\n>\n <ng-content />\n <button\n *ngIf=\"options.cleaner()\"\n appearance=\"icon\"\n size=\"xs\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-clear\"\n [iconStart]=\"icons.close\"\n (click)=\"directive?.setValue(null)\"\n (pointerdown.silent.prevent)=\"el?.nativeElement?.focus()\"\n ></button>\n <ng-container #vcr />\n <ng-content select=\"tui-icon\" />\n</span>\n<span class=\"t-template\">\n <ng-container *polymorpheusOutlet=\"content as text; context: {$implicit: control?.value}\">\n {{ text }}\n </ng-container>\n</span>\n<input\n *ngIf=\"showFiller\"\n aria-hidden=\"true\"\n disabled\n class=\"t-filler\"\n [value]=\"computedFiller\"\n/>\n", styles: ["tui-textfield{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;--t-height: var(--tui-height-l);position:relative;display:flex;align-items:center;pointer-events:none;cursor:pointer;block-size:var(--t-height);color:var(--tui-text-tertiary);padding:0 var(--tui-padding-l);border-radius:var(--tui-radius-l);font:var(--tui-font-text-m);box-sizing:border-box}tui-textfield[style*=\"--t-icon-start:\"]{--t-left: 2.25rem}tui-textfield[style*=\"--t-icon-end:\"]{--t-right: 2.25rem}tui-textfield:after{margin-inline-start:.25rem}tui-textfield input,tui-textfield select{font:var(--tui-font-text-m)}tui-textfield[data-size=s]{--t-height: var(--tui-height-s);padding:0 var(--tui-padding-s);border-radius:var(--tui-radius-m);font:var(--tui-font-text-s)}tui-textfield[data-size=s][style*=\"--t-icon-start:\"]{--t-left: 1.25rem}tui-textfield[data-size=s][style*=\"--t-icon-end:\"]{--t-right: 1.25rem}tui-textfield[data-size=s]:before{margin:0 .5rem 0 -.125rem;font-size:1rem}tui-textfield[data-size=s]:after{margin:0 -.175rem 0 .575rem;font-size:1rem}tui-textfield[data-size=s] input,tui-textfield[data-size=s] select{font:var(--tui-font-text-s)}tui-textfield[data-size=s] .t-content{gap:0;margin-inline-end:-.325rem}tui-textfield[data-size=m]{--t-height: var(--tui-height-m);padding:0 var(--tui-padding-m);border-radius:var(--tui-radius-m);font:var(--tui-font-text-s)}tui-textfield[data-size=m][style*=\"--t-icon-start:\"]{--t-left: 1.75rem}tui-textfield[data-size=m][style*=\"--t-icon-end:\"]{--t-right: 1.75rem}tui-textfield[data-size=m]:before{margin:0 .375rem 0 -.125rem}tui-textfield[data-size=m]:after{margin:0 -.125rem 0 .5rem}tui-textfield[data-size=m] input,tui-textfield[data-size=m] select{font:var(--tui-font-text-s)}tui-textfield[data-size=m] .t-content{margin-inline-end:-.125rem}tui-textfield:hover{color:var(--tui-text-secondary)}tui-textfield:hover:has(input:read-only),tui-textfield:hover:has(select[data-mode~=readonly]){color:var(--tui-text-tertiary)}tui-textfield:before{z-index:1;margin-inline-end:.75rem}tui-textfield:has(:disabled:not(.t-filler,button,option)):before,tui-textfield:has(:disabled:not(.t-filler,button,option)):after,tui-textfield:has(:disabled:not(.t-filler,button,option)) .t-template{opacity:var(--tui-disabled-opacity)}tui-textfield._disabled:before,tui-textfield._disabled:after,tui-textfield._disabled .t-template{opacity:var(--tui-disabled-opacity)}tui-textfield:has(label:not(:empty)) .t-template,tui-textfield:has(label:not(:empty)) input,tui-textfield:has(label:not(:empty)) select{padding-top:calc(var(--t-height) / 3)}tui-textfield:has(label:not(:empty)) .t-template:not(:-webkit-autofill)::placeholder,tui-textfield:has(label:not(:empty)) input:not(:-webkit-autofill)::placeholder,tui-textfield:has(label:not(:empty)) select:not(:-webkit-autofill)::placeholder,tui-textfield:has(label:not(:empty)) .t-template._empty,tui-textfield:has(label:not(:empty)) input._empty,tui-textfield:has(label:not(:empty)) select._empty{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:transparent!important}tui-textfield._with-label .t-template,tui-textfield._with-label input,tui-textfield._with-label select{padding-top:calc(var(--t-height) / 3)}tui-textfield._with-label .t-template:not(:-webkit-autofill)::placeholder,tui-textfield._with-label input:not(:-webkit-autofill)::placeholder,tui-textfield._with-label select:not(:-webkit-autofill)::placeholder,tui-textfield._with-label .t-template._empty,tui-textfield._with-label input._empty,tui-textfield._with-label select._empty{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:transparent!important}tui-textfield .t-template,tui-textfield input:defined,tui-textfield select:defined{position:absolute;top:0;left:0;bottom:0;right:0;-webkit-appearance:none;appearance:none;box-sizing:border-box;border:none;border-inline-start:var(--t-left, 0) solid transparent!important;border-inline-end:calc(var(--t-right, var(--t-0, 0rem)) + var(--t-side)) solid transparent!important;border-radius:inherit;padding:inherit}tui-textfield .t-template{display:flex;align-items:center}tui-textfield._with-template select{color:transparent!important}tui-textfield input:defined,tui-textfield select:defined{pointer-events:auto;background:transparent no-repeat center right 1rem / 2rem;background-clip:border-box,padding-box}tui-textfield input:defined:read-only~.t-filler,tui-textfield select:defined:read-only~.t-filler{display:none}tui-textfield input:defined:disabled~label,tui-textfield select:defined:disabled~label,tui-textfield input:defined:disabled~.t-content,tui-textfield select:defined:disabled~.t-content{opacity:var(--tui-disabled-opacity)}tui-textfield input:defined:disabled~label tui-icon,tui-textfield select:defined:disabled~label tui-icon,tui-textfield input:defined:disabled~.t-content tui-icon,tui-textfield select:defined:disabled~.t-content tui-icon{display:none}tui-textfield input:defined:-webkit-autofill~label,tui-textfield select:defined:-webkit-autofill~label,tui-textfield input:defined:not(._empty):not(:placeholder-shown)~label,tui-textfield select:defined:not(._empty):not(:placeholder-shown)~label{font-size:.83em;transform:translateY(-.7em)}tui-textfield input:defined:-webkit-autofill:not(:disabled)[data-mode~=invalid]~label,tui-textfield select:defined:-webkit-autofill:not(:disabled)[data-mode~=invalid]~label,tui-textfield input:defined:not(._empty):not(:placeholder-shown):not(:disabled)[data-mode~=invalid]~label,tui-textfield select:defined:not(._empty):not(:placeholder-shown):not(:disabled)[data-mode~=invalid]~label,tui-textfield input:defined:-webkit-autofill:invalid:not(:disabled):not([data-mode])~label,tui-textfield select:defined:-webkit-autofill:invalid:not(:disabled):not([data-mode])~label,tui-textfield input:defined:not(._empty):not(:placeholder-shown):invalid:not(:disabled):not([data-mode])~label,tui-textfield select:defined:not(._empty):not(:placeholder-shown):invalid:not(:disabled):not([data-mode])~label{color:var(--tui-text-negative)}tui-textfield input:defined:-webkit-autofill:not(:disabled):not([data-mode~=readonly])~.t-content .t-clear,tui-textfield select:defined:-webkit-autofill:not(:disabled):not([data-mode~=readonly])~.t-content .t-clear,tui-textfield input:defined:not(._empty):not(:placeholder-shown):not(:disabled):not([data-mode~=readonly])~.t-content .t-clear,tui-textfield select:defined:not(._empty):not(:placeholder-shown):not(:disabled):not([data-mode~=readonly])~.t-content .t-clear{display:flex}tui-textfield input:defined:not([data-mode~=readonly]):focus-visible:not([data-focus=false])::placeholder,tui-textfield select:defined:not([data-mode~=readonly]):focus-visible:not([data-focus=false])::placeholder,tui-textfield input:defined:not([data-mode~=readonly]):focus-visible:not([data-focus=false])._empty,tui-textfield select:defined:not([data-mode~=readonly]):focus-visible:not([data-focus=false])._empty{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:var(--tui-text-tertiary)!important}tui-textfield input:defined:not([data-mode~=readonly]):focus-visible:not([data-focus=false])~label,tui-textfield select:defined:not([data-mode~=readonly]):focus-visible:not([data-focus=false])~label{color:var(--tui-text-primary)!important;font-size:.83em;transform:translateY(-.7em)}tui-textfield input:defined:not([data-mode~=readonly])[data-focus=true]::placeholder,tui-textfield select:defined:not([data-mode~=readonly])[data-focus=true]::placeholder,tui-textfield input:defined:not([data-mode~=readonly])[data-focus=true]._empty,tui-textfield select:defined:not([data-mode~=readonly])[data-focus=true]._empty{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:var(--tui-text-tertiary)!important}tui-textfield input:defined:not([data-mode~=readonly])[data-focus=true]~label,tui-textfield select:defined:not([data-mode~=readonly])[data-focus=true]~label{color:var(--tui-text-primary)!important;font-size:.83em;transform:translateY(-.7em)}@supports (-webkit-touch-callout: none){tui-textfield input:defined._ios-fix,tui-textfield select:defined._ios-fix{position:fixed;left:1000rem}}tui-textfield label:not([data-orientation=vertical]){transition-property:all;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;display:block;flex:1;font-size:inherit}tui-textfield label:defined,tui-textfield input:defined::placeholder,tui-textfield select:defined._empty{color:var(--tui-text-secondary)}tui-textfield select:not([data-mode~=readonly]){cursor:pointer}tui-textfield button,tui-textfield a{pointer-events:auto}tui-textfield .t-content{display:flex;align-items:center;gap:.25rem;margin-inline-start:auto;isolation:isolate}tui-textfield .t-content tui-icon{pointer-events:auto}tui-textfield .t-clear{display:none;pointer-events:auto}tui-textfield .t-filler:defined{pointer-events:none;background:none;color:var(--tui-text-tertiary);opacity:1}tui-textfield [tuiFluidTypography]{font-weight:700}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: WaResizeObserver, selector: "[waResizeObserver]", inputs: ["box"], outputs: ["waResizeObserver"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
156
159
|
}
|
|
157
160
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiTextfieldComponent, decorators: [{
|
|
158
161
|
type: Component,
|
|
@@ -168,8 +171,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
168
171
|
'[style.--t-side.px]': 'side',
|
|
169
172
|
'[attr.data-size]': 'options.size()',
|
|
170
173
|
'[class._with-label]': 'hasLabel',
|
|
174
|
+
'[class._with-template]': 'content',
|
|
171
175
|
'[class._disabled]': 'el?.nativeElement.disabled',
|
|
172
|
-
}, template: "<ng-content select=\"input\" />\n<ng-content select=\"select\" />\n<ng-content select=\"label\" />\n<span\n class=\"t-content\"\n (mousedown.prevent)=\"el?.nativeElement?.focus()\"\n (waResizeObserver)=\"onResize($event)\"\n>\n <ng-content />\n <button\n *ngIf=\"options.cleaner()\"\n appearance=\"icon\"\n size=\"xs\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-clear\"\n [iconStart]=\"icons.close\"\n (click)=\"directive?.setValue('')\"\n (pointerdown.silent.prevent)=\"el?.nativeElement?.focus()\"\n ></button>\n <ng-container #vcr />\n <ng-content select=\"tui-icon\" />\n</span>\n<span class=\"t-template\">\n <ng-container *polymorpheusOutlet=\"content as text; context: {$implicit: control?.value}\">\n {{ text }}\n </ng-container>\n</span>\n<input\n *ngIf=\"showFiller\"\n aria-hidden=\"true\"\n disabled\n class=\"t-filler\"\n [value]=\"computedFiller\"\n/>\n", styles: ["tui-textfield{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;--t-height: var(--tui-height-l);position:relative;display:flex;align-items:center;pointer-events:none;cursor:pointer;block-size:var(--t-height);color:var(--tui-text-tertiary);padding:0 var(--tui-padding-l);border-radius:var(--tui-radius-l);font:var(--tui-font-text-m);box-sizing:border-box}tui-textfield[style*=\"--t-icon-start:\"]{--t-left: 2.25rem}tui-textfield[style*=\"--t-icon-end:\"]{--t-right: 2.25rem}tui-textfield:after{margin-inline-start:.25rem}tui-textfield input,tui-textfield select{font:var(--tui-font-text-m)}tui-textfield[data-size=s]{--t-height: var(--tui-height-s);padding:0 var(--tui-padding-s);border-radius:var(--tui-radius-m);font:var(--tui-font-text-s)}tui-textfield[data-size=s][style*=\"--t-icon-start:\"]{--t-left: 1.25rem}tui-textfield[data-size=s][style*=\"--t-icon-end:\"]{--t-right: 1.25rem}tui-textfield[data-size=s]:before{margin:0 .5rem 0 -.125rem;font-size:1rem}tui-textfield[data-size=s]:after{margin:0 -.175rem 0 .575rem;font-size:1rem}tui-textfield[data-size=s] input,tui-textfield[data-size=s] select{font:var(--tui-font-text-s)}tui-textfield[data-size=s] .t-content{gap:0;margin-inline-end:-.325rem}tui-textfield[data-size=m]{--t-height: var(--tui-height-m);padding:0 var(--tui-padding-m);border-radius:var(--tui-radius-m);font:var(--tui-font-text-s)}tui-textfield[data-size=m][style*=\"--t-icon-start:\"]{--t-left: 1.75rem}tui-textfield[data-size=m][style*=\"--t-icon-end:\"]{--t-right: 1.75rem}tui-textfield[data-size=m]:before{margin:0 .375rem 0 -.125rem}tui-textfield[data-size=m]:after{margin:0 -.125rem 0 .5rem}tui-textfield[data-size=m] input,tui-textfield[data-size=m] select{font:var(--tui-font-text-s)}tui-textfield[data-size=m] .t-content{margin-inline-end:-.125rem}tui-textfield:hover{color:var(--tui-text-secondary)}tui-textfield:hover:has(input:read-only),tui-textfield:hover:has(select[data-mode=readonly]){color:var(--tui-text-tertiary)}tui-textfield:before{z-index:1;margin-inline-end:.75rem}tui-textfield:has(:disabled:not(.t-filler,button,option)):before,tui-textfield:has(:disabled:not(.t-filler,button,option)):after,tui-textfield:has(:disabled:not(.t-filler,button,option)) .t-template{opacity:var(--tui-disabled-opacity)}tui-textfield._disabled:before,tui-textfield._disabled:after,tui-textfield._disabled .t-template{opacity:var(--tui-disabled-opacity)}tui-textfield:has(label:not(:empty)) .t-template,tui-textfield:has(label:not(:empty)) input,tui-textfield:has(label:not(:empty)) select{padding-top:calc(var(--t-height) / 3)}tui-textfield:has(label:not(:empty)) .t-template:not(:-webkit-autofill)::placeholder,tui-textfield:has(label:not(:empty)) input:not(:-webkit-autofill)::placeholder,tui-textfield:has(label:not(:empty)) select:not(:-webkit-autofill)::placeholder,tui-textfield:has(label:not(:empty)) .t-template._empty,tui-textfield:has(label:not(:empty)) input._empty,tui-textfield:has(label:not(:empty)) select._empty{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:transparent!important}tui-textfield._with-label .t-template,tui-textfield._with-label input,tui-textfield._with-label select{padding-top:calc(var(--t-height) / 3)}tui-textfield._with-label .t-template:not(:-webkit-autofill)::placeholder,tui-textfield._with-label input:not(:-webkit-autofill)::placeholder,tui-textfield._with-label select:not(:-webkit-autofill)::placeholder,tui-textfield._with-label .t-template._empty,tui-textfield._with-label input._empty,tui-textfield._with-label select._empty{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:transparent!important}tui-textfield .t-template,tui-textfield input:defined,tui-textfield select:defined{position:absolute;top:0;left:0;bottom:0;right:0;-webkit-appearance:none;appearance:none;box-sizing:border-box;border:none;border-inline-start:var(--t-left, 0) solid transparent!important;border-inline-end:calc(var(--t-right, var(--t-0, 0rem)) + var(--t-side)) solid transparent!important;border-radius:inherit;padding:inherit}tui-textfield input:defined,tui-textfield select:defined{pointer-events:auto;background:transparent no-repeat center right 1rem / 2rem;background-clip:border-box,padding-box}tui-textfield input:defined:read-only~.t-filler,tui-textfield select:defined:read-only~.t-filler{display:none}tui-textfield input:defined:disabled~label,tui-textfield select:defined:disabled~label,tui-textfield input:defined:disabled~.t-content,tui-textfield select:defined:disabled~.t-content{opacity:var(--tui-disabled-opacity)}tui-textfield input:defined:disabled~label tui-icon,tui-textfield select:defined:disabled~label tui-icon,tui-textfield input:defined:disabled~.t-content tui-icon,tui-textfield select:defined:disabled~.t-content tui-icon{display:none}tui-textfield input:defined:-webkit-autofill~label,tui-textfield select:defined:-webkit-autofill~label,tui-textfield input:defined:not(._empty):not(:placeholder-shown)~label,tui-textfield select:defined:not(._empty):not(:placeholder-shown)~label{font-size:.83em;transform:translateY(-.7em)}tui-textfield input:defined:-webkit-autofill:not(:disabled)[data-mode=invalid]~label,tui-textfield select:defined:-webkit-autofill:not(:disabled)[data-mode=invalid]~label,tui-textfield input:defined:not(._empty):not(:placeholder-shown):not(:disabled)[data-mode=invalid]~label,tui-textfield select:defined:not(._empty):not(:placeholder-shown):not(:disabled)[data-mode=invalid]~label,tui-textfield input:defined:-webkit-autofill:invalid:not(:disabled):not([data-mode])~label,tui-textfield select:defined:-webkit-autofill:invalid:not(:disabled):not([data-mode])~label,tui-textfield input:defined:not(._empty):not(:placeholder-shown):invalid:not(:disabled):not([data-mode])~label,tui-textfield select:defined:not(._empty):not(:placeholder-shown):invalid:not(:disabled):not([data-mode])~label{color:var(--tui-text-negative)}tui-textfield input:defined:-webkit-autofill:not(:disabled):not([data-mode=readonly])~.t-content .t-clear,tui-textfield select:defined:-webkit-autofill:not(:disabled):not([data-mode=readonly])~.t-content .t-clear,tui-textfield input:defined:not(._empty):not(:placeholder-shown):not(:disabled):not([data-mode=readonly])~.t-content .t-clear,tui-textfield select:defined:not(._empty):not(:placeholder-shown):not(:disabled):not([data-mode=readonly])~.t-content .t-clear{display:flex}tui-textfield input:defined:not([data-mode=readonly]):focus-visible:not([data-focus=false])::placeholder,tui-textfield select:defined:not([data-mode=readonly]):focus-visible:not([data-focus=false])::placeholder,tui-textfield input:defined:not([data-mode=readonly]):focus-visible:not([data-focus=false])._empty,tui-textfield select:defined:not([data-mode=readonly]):focus-visible:not([data-focus=false])._empty{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:var(--tui-text-tertiary)!important}tui-textfield input:defined:not([data-mode=readonly]):focus-visible:not([data-focus=false])~label,tui-textfield select:defined:not([data-mode=readonly]):focus-visible:not([data-focus=false])~label{color:var(--tui-text-primary)!important;font-size:.83em;transform:translateY(-.7em)}tui-textfield input:defined:not([data-mode=readonly])[data-focus=true]::placeholder,tui-textfield select:defined:not([data-mode=readonly])[data-focus=true]::placeholder,tui-textfield input:defined:not([data-mode=readonly])[data-focus=true]._empty,tui-textfield select:defined:not([data-mode=readonly])[data-focus=true]._empty{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:var(--tui-text-tertiary)!important}tui-textfield input:defined:not([data-mode=readonly])[data-focus=true]~label,tui-textfield select:defined:not([data-mode=readonly])[data-focus=true]~label{color:var(--tui-text-primary)!important;font-size:.83em;transform:translateY(-.7em)}@supports (-webkit-touch-callout: none){tui-textfield input:defined._ios-fix,tui-textfield select:defined._ios-fix{position:fixed;left:1000rem}}tui-textfield label:not([data-orientation=vertical]){transition-property:all;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;display:block;flex:1;font-size:inherit}tui-textfield label:defined,tui-textfield input:defined::placeholder,tui-textfield select:defined._empty{color:var(--tui-text-secondary)}tui-textfield select:not([data-mode=readonly]){cursor:pointer}tui-textfield button,tui-textfield a{pointer-events:auto}tui-textfield .t-content{display:flex;align-items:center;gap:.25rem;margin-inline-start:auto;isolation:isolate}tui-textfield .t-content tui-icon{pointer-events:auto}tui-textfield .t-clear{display:none;pointer-events:auto}tui-textfield .t-filler:defined{pointer-events:none;background:none;color:var(--tui-text-tertiary);opacity:1}tui-textfield [tuiFluidTypography]{font-weight:700}\n"] }]
|
|
176
|
+
}, template: "<ng-content select=\"input\" />\n<ng-content select=\"select\" />\n<ng-content select=\"label\" />\n<span\n class=\"t-content\"\n (mousedown.prevent)=\"el?.nativeElement?.focus()\"\n (waResizeObserver)=\"onResize($event)\"\n>\n <ng-content />\n <button\n *ngIf=\"options.cleaner()\"\n appearance=\"icon\"\n size=\"xs\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-clear\"\n [iconStart]=\"icons.close\"\n (click)=\"directive?.setValue(null)\"\n (pointerdown.silent.prevent)=\"el?.nativeElement?.focus()\"\n ></button>\n <ng-container #vcr />\n <ng-content select=\"tui-icon\" />\n</span>\n<span class=\"t-template\">\n <ng-container *polymorpheusOutlet=\"content as text; context: {$implicit: control?.value}\">\n {{ text }}\n </ng-container>\n</span>\n<input\n *ngIf=\"showFiller\"\n aria-hidden=\"true\"\n disabled\n class=\"t-filler\"\n [value]=\"computedFiller\"\n/>\n", styles: ["tui-textfield{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;--t-height: var(--tui-height-l);position:relative;display:flex;align-items:center;pointer-events:none;cursor:pointer;block-size:var(--t-height);color:var(--tui-text-tertiary);padding:0 var(--tui-padding-l);border-radius:var(--tui-radius-l);font:var(--tui-font-text-m);box-sizing:border-box}tui-textfield[style*=\"--t-icon-start:\"]{--t-left: 2.25rem}tui-textfield[style*=\"--t-icon-end:\"]{--t-right: 2.25rem}tui-textfield:after{margin-inline-start:.25rem}tui-textfield input,tui-textfield select{font:var(--tui-font-text-m)}tui-textfield[data-size=s]{--t-height: var(--tui-height-s);padding:0 var(--tui-padding-s);border-radius:var(--tui-radius-m);font:var(--tui-font-text-s)}tui-textfield[data-size=s][style*=\"--t-icon-start:\"]{--t-left: 1.25rem}tui-textfield[data-size=s][style*=\"--t-icon-end:\"]{--t-right: 1.25rem}tui-textfield[data-size=s]:before{margin:0 .5rem 0 -.125rem;font-size:1rem}tui-textfield[data-size=s]:after{margin:0 -.175rem 0 .575rem;font-size:1rem}tui-textfield[data-size=s] input,tui-textfield[data-size=s] select{font:var(--tui-font-text-s)}tui-textfield[data-size=s] .t-content{gap:0;margin-inline-end:-.325rem}tui-textfield[data-size=m]{--t-height: var(--tui-height-m);padding:0 var(--tui-padding-m);border-radius:var(--tui-radius-m);font:var(--tui-font-text-s)}tui-textfield[data-size=m][style*=\"--t-icon-start:\"]{--t-left: 1.75rem}tui-textfield[data-size=m][style*=\"--t-icon-end:\"]{--t-right: 1.75rem}tui-textfield[data-size=m]:before{margin:0 .375rem 0 -.125rem}tui-textfield[data-size=m]:after{margin:0 -.125rem 0 .5rem}tui-textfield[data-size=m] input,tui-textfield[data-size=m] select{font:var(--tui-font-text-s)}tui-textfield[data-size=m] .t-content{margin-inline-end:-.125rem}tui-textfield:hover{color:var(--tui-text-secondary)}tui-textfield:hover:has(input:read-only),tui-textfield:hover:has(select[data-mode~=readonly]){color:var(--tui-text-tertiary)}tui-textfield:before{z-index:1;margin-inline-end:.75rem}tui-textfield:has(:disabled:not(.t-filler,button,option)):before,tui-textfield:has(:disabled:not(.t-filler,button,option)):after,tui-textfield:has(:disabled:not(.t-filler,button,option)) .t-template{opacity:var(--tui-disabled-opacity)}tui-textfield._disabled:before,tui-textfield._disabled:after,tui-textfield._disabled .t-template{opacity:var(--tui-disabled-opacity)}tui-textfield:has(label:not(:empty)) .t-template,tui-textfield:has(label:not(:empty)) input,tui-textfield:has(label:not(:empty)) select{padding-top:calc(var(--t-height) / 3)}tui-textfield:has(label:not(:empty)) .t-template:not(:-webkit-autofill)::placeholder,tui-textfield:has(label:not(:empty)) input:not(:-webkit-autofill)::placeholder,tui-textfield:has(label:not(:empty)) select:not(:-webkit-autofill)::placeholder,tui-textfield:has(label:not(:empty)) .t-template._empty,tui-textfield:has(label:not(:empty)) input._empty,tui-textfield:has(label:not(:empty)) select._empty{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:transparent!important}tui-textfield._with-label .t-template,tui-textfield._with-label input,tui-textfield._with-label select{padding-top:calc(var(--t-height) / 3)}tui-textfield._with-label .t-template:not(:-webkit-autofill)::placeholder,tui-textfield._with-label input:not(:-webkit-autofill)::placeholder,tui-textfield._with-label select:not(:-webkit-autofill)::placeholder,tui-textfield._with-label .t-template._empty,tui-textfield._with-label input._empty,tui-textfield._with-label select._empty{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:transparent!important}tui-textfield .t-template,tui-textfield input:defined,tui-textfield select:defined{position:absolute;top:0;left:0;bottom:0;right:0;-webkit-appearance:none;appearance:none;box-sizing:border-box;border:none;border-inline-start:var(--t-left, 0) solid transparent!important;border-inline-end:calc(var(--t-right, var(--t-0, 0rem)) + var(--t-side)) solid transparent!important;border-radius:inherit;padding:inherit}tui-textfield .t-template{display:flex;align-items:center}tui-textfield._with-template select{color:transparent!important}tui-textfield input:defined,tui-textfield select:defined{pointer-events:auto;background:transparent no-repeat center right 1rem / 2rem;background-clip:border-box,padding-box}tui-textfield input:defined:read-only~.t-filler,tui-textfield select:defined:read-only~.t-filler{display:none}tui-textfield input:defined:disabled~label,tui-textfield select:defined:disabled~label,tui-textfield input:defined:disabled~.t-content,tui-textfield select:defined:disabled~.t-content{opacity:var(--tui-disabled-opacity)}tui-textfield input:defined:disabled~label tui-icon,tui-textfield select:defined:disabled~label tui-icon,tui-textfield input:defined:disabled~.t-content tui-icon,tui-textfield select:defined:disabled~.t-content tui-icon{display:none}tui-textfield input:defined:-webkit-autofill~label,tui-textfield select:defined:-webkit-autofill~label,tui-textfield input:defined:not(._empty):not(:placeholder-shown)~label,tui-textfield select:defined:not(._empty):not(:placeholder-shown)~label{font-size:.83em;transform:translateY(-.7em)}tui-textfield input:defined:-webkit-autofill:not(:disabled)[data-mode~=invalid]~label,tui-textfield select:defined:-webkit-autofill:not(:disabled)[data-mode~=invalid]~label,tui-textfield input:defined:not(._empty):not(:placeholder-shown):not(:disabled)[data-mode~=invalid]~label,tui-textfield select:defined:not(._empty):not(:placeholder-shown):not(:disabled)[data-mode~=invalid]~label,tui-textfield input:defined:-webkit-autofill:invalid:not(:disabled):not([data-mode])~label,tui-textfield select:defined:-webkit-autofill:invalid:not(:disabled):not([data-mode])~label,tui-textfield input:defined:not(._empty):not(:placeholder-shown):invalid:not(:disabled):not([data-mode])~label,tui-textfield select:defined:not(._empty):not(:placeholder-shown):invalid:not(:disabled):not([data-mode])~label{color:var(--tui-text-negative)}tui-textfield input:defined:-webkit-autofill:not(:disabled):not([data-mode~=readonly])~.t-content .t-clear,tui-textfield select:defined:-webkit-autofill:not(:disabled):not([data-mode~=readonly])~.t-content .t-clear,tui-textfield input:defined:not(._empty):not(:placeholder-shown):not(:disabled):not([data-mode~=readonly])~.t-content .t-clear,tui-textfield select:defined:not(._empty):not(:placeholder-shown):not(:disabled):not([data-mode~=readonly])~.t-content .t-clear{display:flex}tui-textfield input:defined:not([data-mode~=readonly]):focus-visible:not([data-focus=false])::placeholder,tui-textfield select:defined:not([data-mode~=readonly]):focus-visible:not([data-focus=false])::placeholder,tui-textfield input:defined:not([data-mode~=readonly]):focus-visible:not([data-focus=false])._empty,tui-textfield select:defined:not([data-mode~=readonly]):focus-visible:not([data-focus=false])._empty{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:var(--tui-text-tertiary)!important}tui-textfield input:defined:not([data-mode~=readonly]):focus-visible:not([data-focus=false])~label,tui-textfield select:defined:not([data-mode~=readonly]):focus-visible:not([data-focus=false])~label{color:var(--tui-text-primary)!important;font-size:.83em;transform:translateY(-.7em)}tui-textfield input:defined:not([data-mode~=readonly])[data-focus=true]::placeholder,tui-textfield select:defined:not([data-mode~=readonly])[data-focus=true]::placeholder,tui-textfield input:defined:not([data-mode~=readonly])[data-focus=true]._empty,tui-textfield select:defined:not([data-mode~=readonly])[data-focus=true]._empty{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:var(--tui-text-tertiary)!important}tui-textfield input:defined:not([data-mode~=readonly])[data-focus=true]~label,tui-textfield select:defined:not([data-mode~=readonly])[data-focus=true]~label{color:var(--tui-text-primary)!important;font-size:.83em;transform:translateY(-.7em)}@supports (-webkit-touch-callout: none){tui-textfield input:defined._ios-fix,tui-textfield select:defined._ios-fix{position:fixed;left:1000rem}}tui-textfield label:not([data-orientation=vertical]){transition-property:all;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;display:block;flex:1;font-size:inherit}tui-textfield label:defined,tui-textfield input:defined::placeholder,tui-textfield select:defined._empty{color:var(--tui-text-secondary)}tui-textfield select:not([data-mode~=readonly]){cursor:pointer}tui-textfield button,tui-textfield a{pointer-events:auto}tui-textfield .t-content{display:flex;align-items:center;gap:.25rem;margin-inline-start:auto;isolation:isolate}tui-textfield .t-content tui-icon{pointer-events:auto}tui-textfield .t-clear{display:none;pointer-events:auto}tui-textfield .t-filler:defined{pointer-events:none;background:none;color:var(--tui-text-tertiary);opacity:1}tui-textfield [tuiFluidTypography]{font-weight:700}\n"] }]
|
|
173
177
|
}], propDecorators: { directive: [{
|
|
174
178
|
type: ContentChild,
|
|
175
179
|
args: [forwardRef(() => TuiTextfieldDirective)]
|
|
@@ -202,9 +206,10 @@ class TuiTextfieldBase {
|
|
|
202
206
|
this.focused = signal(null);
|
|
203
207
|
this.a = tuiAppearance(inject(TUI_TEXTFIELD_OPTIONS).appearance);
|
|
204
208
|
this.s = tuiAppearanceState(null);
|
|
209
|
+
this.m = tuiAppearanceMode(this.mode);
|
|
205
210
|
this.f = tuiAppearanceFocus(computed(() => this.focused() || this.textfield.focused()));
|
|
206
|
-
this.textfield = inject(TuiTextfieldComponent);
|
|
207
211
|
this.el = tuiInjectElement();
|
|
212
|
+
this.textfield = inject(TuiTextfieldComponent);
|
|
208
213
|
this.readOnly = false;
|
|
209
214
|
this.invalid = null;
|
|
210
215
|
}
|
|
@@ -226,12 +231,16 @@ class TuiTextfieldBase {
|
|
|
226
231
|
}
|
|
227
232
|
return null;
|
|
228
233
|
}
|
|
234
|
+
// TODO: refactor to signal inputs after Angular update
|
|
235
|
+
ngOnChanges() {
|
|
236
|
+
this.m.set(this.mode);
|
|
237
|
+
}
|
|
229
238
|
setValue(value) {
|
|
230
|
-
this.el.value = value;
|
|
239
|
+
this.el.value = value == null ? '' : this.textfield.stringify(value);
|
|
231
240
|
this.el.dispatchEvent(new Event('input', { bubbles: true }));
|
|
232
241
|
}
|
|
233
242
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiTextfieldBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
234
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiTextfieldBase, inputs: { readOnly: "readOnly", invalid: "invalid", focusedSetter: ["focused", "focusedSetter"], stateSetter: ["state", "stateSetter"] }, ngImport: i0 }); }
|
|
243
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiTextfieldBase, inputs: { readOnly: "readOnly", invalid: "invalid", focusedSetter: ["focused", "focusedSetter"], stateSetter: ["state", "stateSetter"] }, usesOnChanges: true, ngImport: i0 }); }
|
|
235
244
|
}
|
|
236
245
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiTextfieldBase, decorators: [{
|
|
237
246
|
type: Directive
|
|
@@ -248,7 +257,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
248
257
|
}] } });
|
|
249
258
|
class TuiTextfieldDirective extends TuiTextfieldBase {
|
|
250
259
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiTextfieldDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
251
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiTextfieldDirective, isStandalone: true, selector: "input[tuiTextfield]", host: { listeners: { "input": "0", "focusin": "0", "focusout": "0" }, properties: { "id": "textfield.id", "readOnly": "readOnly", "class._empty": "el.value === \"\""
|
|
260
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiTextfieldDirective, isStandalone: true, selector: "input[tuiTextfield]", host: { listeners: { "input": "0", "focusin": "0", "focusout": "0" }, properties: { "id": "textfield.id", "readOnly": "readOnly", "class._empty": "el.value === \"\"" } }, usesInheritance: true, hostDirectives: [{ directive: i1$1.TuiNativeValidator }, { directive: i2.TuiAppearance }], ngImport: i0 }); }
|
|
252
261
|
}
|
|
253
262
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiTextfieldDirective, decorators: [{
|
|
254
263
|
type: Directive,
|
|
@@ -260,7 +269,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
260
269
|
'[id]': 'textfield.id',
|
|
261
270
|
'[readOnly]': 'readOnly',
|
|
262
271
|
'[class._empty]': 'el.value === ""',
|
|
263
|
-
'[attr.data-mode]': 'mode',
|
|
264
272
|
'(input)': '0',
|
|
265
273
|
'(focusin)': '0',
|
|
266
274
|
'(focusout)': '0',
|
|
@@ -291,13 +299,12 @@ class TuiSelect extends TuiTextfieldBase {
|
|
|
291
299
|
await this.nav.clipboard.writeText(this.value);
|
|
292
300
|
}
|
|
293
301
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSelect, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
294
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiSelect, isStandalone: true, selector: "select[tuiTextfield]", inputs: { placeholder: "placeholder" }, host: { listeners: { "input": "0", "focusin": "0", "focusout": "0", "keydown.space.prevent": "0", "keydown.enter.prevent": "0", "keydown.backspace": "setValue(\"\")", "mousedown.prevent": "focus()", "keydown.control.c": "onCopy()", "keydown.meta.c": "onCopy()" }, properties: { "id": "textfield.id", "
|
|
302
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiSelect, isStandalone: true, selector: "select[tuiTextfield]", inputs: { placeholder: "placeholder" }, host: { listeners: { "input": "0", "focusin": "0", "focusout": "0", "keydown.space.prevent": "0", "keydown.enter.prevent": "0", "keydown.backspace": "setValue(\"\")", "mousedown.prevent": "focus()", "keydown.control.c": "onCopy()", "keydown.meta.c": "onCopy()" }, properties: { "id": "textfield.id", "class._empty": "value === \"\"" } }, providers: [tuiProvide(TuiTextfieldDirective, TuiSelect)], usesInheritance: true, hostDirectives: [{ directive: i1$1.TuiNativeValidator }, { directive: i2.TuiAppearance }], ngImport: i0, template: "<option\n *ngIf=\"placeholder && !value; else selected\"\n disabled\n selected\n value=\"\"\n>\n {{ placeholder }}\n</option>\n<ng-template #selected>\n <option\n *ngFor=\"let item of [value]\"\n selected\n >\n {{ item }}\n </option>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
|
|
295
303
|
}
|
|
296
304
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSelect, decorators: [{
|
|
297
305
|
type: Component,
|
|
298
306
|
args: [{ standalone: true, selector: 'select[tuiTextfield]', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.Default, providers: [tuiProvide(TuiTextfieldDirective, TuiSelect)], hostDirectives: [TuiNativeValidator, TuiAppearance], host: {
|
|
299
307
|
'[id]': 'textfield.id',
|
|
300
|
-
'[attr.data-mode]': 'mode',
|
|
301
308
|
'[class._empty]': 'value === ""',
|
|
302
309
|
'(input)': '0',
|
|
303
310
|
'(focusin)': '0',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-textfield.mjs","sources":["../../../projects/core/components/textfield/textfield.options.ts","../../../projects/core/components/textfield/textfield-dropdown.directive.ts","../../../projects/core/components/textfield/textfield.component.ts","../../../projects/core/components/textfield/textfield.template.html","../../../projects/core/components/textfield/textfield.directive.ts","../../../projects/core/components/textfield/select.directive.ts","../../../projects/core/components/textfield/select.template.html","../../../projects/core/components/textfield/textfield.ts","../../../projects/core/components/textfield/textfield-content.directive.ts","../../../projects/core/components/textfield/taiga-ui-core-components-textfield.ts"],"sourcesContent":["import type {Provider, WritableSignal} from '@angular/core';\nimport {Directive, inject, Input, Optional, signal, SkipSelf} from '@angular/core';\nimport {tuiCreateToken, tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport type {TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\n\nconst DEFAULT = {\n appearance: 'textfield',\n size: 'l',\n cleaner: true,\n} as const;\n\nexport interface TuiTextfieldOptions {\n readonly appearance: WritableSignal<string>;\n readonly size: WritableSignal<TuiSizeL | TuiSizeS>;\n readonly cleaner: WritableSignal<boolean>;\n}\n\nexport const TUI_TEXTFIELD_OPTIONS = tuiCreateToken<TuiTextfieldOptions>({\n appearance: signal(DEFAULT.appearance),\n size: signal(DEFAULT.size),\n cleaner: signal(DEFAULT.cleaner),\n});\n\nexport function tuiTextfieldOptionsProvider(\n options: Partial<TuiTextfieldOptions>,\n): Provider {\n return {\n provide: TUI_TEXTFIELD_OPTIONS,\n deps: [[new Optional(), new SkipSelf(), TUI_TEXTFIELD_OPTIONS]],\n useFactory: (parent: TuiTextfieldOptions | null) => ({\n appearance: signal(parent?.appearance() ?? DEFAULT.appearance),\n size: signal(parent?.size() ?? DEFAULT.size),\n cleaner: signal(parent?.cleaner() ?? DEFAULT.cleaner),\n ...options,\n }),\n };\n}\n\n@Directive({\n standalone: true,\n selector: '[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]',\n providers: [tuiProvide(TUI_TEXTFIELD_OPTIONS, TuiTextfieldOptionsDirective)],\n})\nexport class TuiTextfieldOptionsDirective implements TuiTextfieldOptions {\n private readonly options = inject(TUI_TEXTFIELD_OPTIONS, {skipSelf: true});\n\n // TODO: refactor to signal inputs after Angular update\n public appearance = signal(this.options.appearance());\n public size = signal(this.options.size());\n public cleaner = signal(this.options.cleaner());\n\n @Input()\n public set tuiTextfieldAppearance(appearance: string) {\n this.appearance.set(appearance);\n }\n\n @Input()\n public set tuiTextfieldSize(size: TuiSizeL | TuiSizeS) {\n this.size.set(size);\n }\n\n @Input()\n public set tuiTextfieldCleaner(enabled: boolean) {\n this.cleaner.set(enabled);\n }\n}\n","import {ContentChild, Directive, TemplateRef} from '@angular/core';\nimport {tuiDropdown} from '@taiga-ui/core/directives/dropdown';\nimport type {PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiTextfieldDropdown]',\n})\nexport class TuiTextfieldDropdownDirective {}\n\n@Directive({\n standalone: true,\n})\nexport class TuiWithTextfieldDropdown {\n private readonly dropdown = tuiDropdown(null);\n\n @ContentChild(TuiTextfieldDropdownDirective, {read: TemplateRef})\n protected set template(template: PolymorpheusContent) {\n this.dropdown.set(template);\n }\n}\n","import {NgIf} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n computed,\n ContentChild,\n ElementRef,\n forwardRef,\n inject,\n Input,\n ViewChild,\n ViewContainerRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {WaResizeObserver} from '@ng-web-apis/resize-observer';\nimport {tuiInjectId} from '@taiga-ui/cdk/services';\nimport type {TuiContext, TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiFocusedIn} from '@taiga-ui/cdk/utils/focus';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport type {TuiDataListHost} from '@taiga-ui/core/components/data-list';\nimport {tuiAsDataListHost} from '@taiga-ui/core/components/data-list';\nimport {TuiLabel} from '@taiga-ui/core/components/label';\nimport {\n TuiDropdownDirective,\n tuiDropdownOpen,\n tuiDropdownOptionsProvider,\n TuiWithDropdownOpen,\n} from '@taiga-ui/core/directives/dropdown';\nimport {TuiWithIcons} from '@taiga-ui/core/directives/icons';\nimport {TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport type {PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiTextfieldDirective} from './textfield.directive';\nimport {TUI_TEXTFIELD_OPTIONS} from './textfield.options';\nimport {TuiWithTextfieldDropdown} from './textfield-dropdown.directive';\n\n@Component({\n standalone: true,\n selector: 'tui-textfield',\n imports: [NgIf, PolymorpheusOutlet, TuiButton, WaResizeObserver],\n templateUrl: './textfield.template.html',\n styles: ['@import \"@taiga-ui/core/styles/components/textfield.less\";'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsDataListHost(TuiTextfieldComponent),\n tuiDropdownOptionsProvider({limitWidth: 'fixed'}),\n ],\n hostDirectives: [\n TuiDropdownDirective,\n TuiWithDropdownOpen,\n TuiWithTextfieldDropdown,\n TuiWithIcons,\n ],\n host: {\n '[style.--t-side.px]': 'side',\n '[attr.data-size]': 'options.size()',\n '[class._with-label]': 'hasLabel',\n '[class._disabled]': 'el?.nativeElement.disabled',\n },\n})\nexport class TuiTextfieldComponent<T> implements TuiDataListHost<T> {\n private readonly open = tuiDropdownOpen();\n private readonly focusedIn = tuiFocusedIn(tuiInjectElement());\n\n @ContentChild(forwardRef(() => TuiTextfieldDirective))\n protected readonly directive?: TuiTextfieldDirective;\n\n @ContentChild(forwardRef(() => TuiLabel), {read: ElementRef})\n protected readonly label?: ElementRef<HTMLElement>;\n\n @ContentChild(NgControl)\n protected readonly control?: NgControl;\n\n protected side = 0;\n\n protected readonly autoId = tuiInjectId();\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly cdr = inject(ChangeDetectorRef);\n\n @ViewChild('vcr', {read: ViewContainerRef, static: true})\n public readonly vcr?: ViewContainerRef;\n\n @ContentChild(forwardRef(() => TuiTextfieldDirective), {\n read: ElementRef,\n static: true,\n })\n public readonly el?: ElementRef<HTMLInputElement>;\n\n @Input()\n public filler = '';\n\n @Input()\n public stringify: TuiStringHandler<T> = String;\n\n @Input()\n public content: PolymorpheusContent<TuiContext<T>>;\n\n public readonly focused = computed(() => this.open() || this.focusedIn());\n public readonly options = inject(TUI_TEXTFIELD_OPTIONS);\n\n public get id(): string {\n return this.el?.nativeElement.id || this.autoId;\n }\n\n public handleOption(option: T): void {\n this.directive?.setValue(this.stringify(option));\n this.open.set(false);\n }\n\n protected get computedFiller(): string {\n const value = this.el?.nativeElement.value || '';\n const filler = value + this.filler.slice(value.length);\n\n return filler.length > value.length ? filler : '';\n }\n\n protected get showFiller(): boolean {\n return (\n this.focused() &&\n !!this.computedFiller &&\n (!!this.el?.nativeElement.value || !this.el?.nativeElement.placeholder)\n );\n }\n\n protected get hasLabel(): boolean {\n return Boolean(this.label?.nativeElement?.childNodes.length);\n }\n\n protected onResize(entry: readonly ResizeObserverEntry[]): void {\n this.side = entry[0]?.contentRect?.width || 0;\n this.cdr.detectChanges();\n }\n}\n","<ng-content select=\"input\" />\n<ng-content select=\"select\" />\n<ng-content select=\"label\" />\n<span\n class=\"t-content\"\n (mousedown.prevent)=\"el?.nativeElement?.focus()\"\n (waResizeObserver)=\"onResize($event)\"\n>\n <ng-content />\n <button\n *ngIf=\"options.cleaner()\"\n appearance=\"icon\"\n size=\"xs\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-clear\"\n [iconStart]=\"icons.close\"\n (click)=\"directive?.setValue('')\"\n (pointerdown.silent.prevent)=\"el?.nativeElement?.focus()\"\n ></button>\n <ng-container #vcr />\n <ng-content select=\"tui-icon\" />\n</span>\n<span class=\"t-template\">\n <ng-container *polymorpheusOutlet=\"content as text; context: {$implicit: control?.value}\">\n {{ text }}\n </ng-container>\n</span>\n<input\n *ngIf=\"showFiller\"\n aria-hidden=\"true\"\n disabled\n class=\"t-filler\"\n [value]=\"computedFiller\"\n/>\n","import {computed, Directive, inject, Input, signal} from '@angular/core';\nimport {TuiNativeValidator} from '@taiga-ui/cdk/directives/native-validator';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {\n TuiAppearance,\n tuiAppearance,\n tuiAppearanceFocus,\n tuiAppearanceState,\n} from '@taiga-ui/core/directives/appearance';\nimport type {TuiInteractiveState} from '@taiga-ui/core/types';\n\nimport {TuiTextfieldComponent} from './textfield.component';\nimport {TUI_TEXTFIELD_OPTIONS} from './textfield.options';\n\n@Directive()\nexport class TuiTextfieldBase {\n // TODO: refactor to signal inputs after Angular update\n private readonly focused = signal<boolean | null>(null);\n\n protected readonly a = tuiAppearance(inject(TUI_TEXTFIELD_OPTIONS).appearance);\n protected readonly s = tuiAppearanceState(null);\n protected readonly f = tuiAppearanceFocus(\n computed(() => this.focused() || this.textfield.focused()),\n );\n\n protected readonly textfield = inject(TuiTextfieldComponent);\n protected readonly el = tuiInjectElement<HTMLInputElement>();\n\n @Input()\n public readOnly = false;\n\n @Input()\n public invalid: boolean | null = null;\n\n @Input('focused')\n public set focusedSetter(focused: boolean | null) {\n this.focused.set(focused);\n }\n\n @Input('state')\n public set stateSetter(state: TuiInteractiveState | null) {\n this.s.set(state);\n }\n\n public get mode(): string | null {\n if (this.readOnly) {\n return 'readonly';\n }\n\n if (this.invalid === false) {\n return 'valid';\n }\n\n if (this.invalid) {\n return 'invalid';\n }\n\n return null;\n }\n\n public setValue(value: string): void {\n this.el.value = value;\n this.el.dispatchEvent(new Event('input', {bubbles: true}));\n }\n}\n\n@Directive({\n standalone: true,\n selector: 'input[tuiTextfield]',\n hostDirectives: [TuiNativeValidator, TuiAppearance],\n host: {\n '[id]': 'textfield.id',\n '[readOnly]': 'readOnly',\n '[class._empty]': 'el.value === \"\"',\n '[attr.data-mode]': 'mode',\n '(input)': '0',\n '(focusin)': '0',\n '(focusout)': '0',\n },\n})\nexport class TuiTextfieldDirective extends TuiTextfieldBase {}\n","import {CommonModule} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, inject, Input} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {WA_NAVIGATOR} from '@ng-web-apis/common';\nimport {TuiNativeValidator} from '@taiga-ui/cdk/directives/native-validator';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiAppearance} from '@taiga-ui/core/directives/appearance';\n\nimport {TuiTextfieldBase, TuiTextfieldDirective} from './textfield.directive';\n\n@Component({\n standalone: true,\n selector: 'select[tuiTextfield]',\n imports: [CommonModule],\n templateUrl: './select.template.html',\n // We want this template to follow change detection to parent textfield.\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n providers: [tuiProvide(TuiTextfieldDirective, TuiSelect)],\n hostDirectives: [TuiNativeValidator, TuiAppearance],\n host: {\n '[id]': 'textfield.id',\n '[attr.data-mode]': 'mode',\n '[class._empty]': 'value === \"\"',\n '(input)': '0',\n '(focusin)': '0',\n '(focusout)': '0',\n '(keydown.space.prevent)': '0',\n '(keydown.enter.prevent)': '0',\n '(keydown.backspace)': 'setValue(\"\")',\n '(mousedown.prevent)': 'focus()',\n '(keydown.control.c)': 'onCopy()',\n '(keydown.meta.c)': 'onCopy()',\n },\n})\nexport class TuiSelect extends TuiTextfieldBase {\n private readonly nav = inject(WA_NAVIGATOR);\n private readonly control = inject(NgControl);\n\n @Input()\n public placeholder = '';\n\n public override setValue(value: string): void {\n this.control.control?.setValue(value);\n this.el.dispatchEvent(new Event('input', {bubbles: true}));\n }\n\n public focus(): void {\n this.el.classList.add('_ios-fix');\n this.el.focus();\n this.el.classList.remove('_ios-fix');\n }\n\n protected get value(): string {\n return this.textfield.stringify(this.control.value ?? '');\n }\n\n protected async onCopy(): Promise<void> {\n await this.nav.clipboard.writeText(this.value);\n }\n}\n","<option\n *ngIf=\"placeholder && !value; else selected\"\n disabled\n selected\n value=\"\"\n>\n {{ placeholder }}\n</option>\n<ng-template #selected>\n <option\n *ngFor=\"let item of [value]\"\n selected\n >\n {{ item }}\n </option>\n</ng-template>\n","import {TuiLabel} from '@taiga-ui/core/components/label';\n\nimport {TuiSelect} from './select.directive';\nimport {TuiTextfieldComponent} from './textfield.component';\nimport {TuiTextfieldDirective} from './textfield.directive';\nimport {TuiTextfieldOptionsDirective} from './textfield.options';\nimport {TuiTextfieldDropdownDirective} from './textfield-dropdown.directive';\n\nexport const TuiTextfield = [\n TuiLabel,\n TuiSelect,\n TuiTextfieldComponent,\n TuiTextfieldDirective,\n TuiTextfieldOptionsDirective,\n TuiTextfieldDropdownDirective,\n] as const;\n","import {Directive, inject, TemplateRef} from '@angular/core';\n\nimport {TuiTextfieldComponent} from './textfield.component';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiTextfieldContent]',\n})\nexport class TuiTextfieldContent {\n constructor() {\n inject(TuiTextfieldComponent).vcr?.createEmbeddedView(inject(TemplateRef));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2.TuiWithTextfieldDropdown","i1","i3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM,OAAO,GAAG;AACZ,IAAA,UAAU,EAAE,WAAW;AACvB,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,OAAO,EAA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AA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,kCAAkC;AAC/C,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-textfield.mjs","sources":["../../../projects/core/components/textfield/textfield.options.ts","../../../projects/core/components/textfield/textfield-dropdown.directive.ts","../../../projects/core/components/textfield/textfield.component.ts","../../../projects/core/components/textfield/textfield.template.html","../../../projects/core/components/textfield/textfield.directive.ts","../../../projects/core/components/textfield/select.directive.ts","../../../projects/core/components/textfield/select.template.html","../../../projects/core/components/textfield/textfield.ts","../../../projects/core/components/textfield/textfield-content.directive.ts","../../../projects/core/components/textfield/taiga-ui-core-components-textfield.ts"],"sourcesContent":["import type {Provider, WritableSignal} from '@angular/core';\nimport {Directive, inject, Input, Optional, signal, SkipSelf} from '@angular/core';\nimport {tuiCreateToken, tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport type {TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\n\nconst DEFAULT = {\n appearance: 'textfield',\n size: 'l',\n cleaner: true,\n} as const;\n\nexport interface TuiTextfieldOptions {\n readonly appearance: WritableSignal<string>;\n readonly size: WritableSignal<TuiSizeL | TuiSizeS>;\n readonly cleaner: WritableSignal<boolean>;\n}\n\nexport const TUI_TEXTFIELD_OPTIONS = tuiCreateToken<TuiTextfieldOptions>({\n appearance: signal(DEFAULT.appearance),\n size: signal(DEFAULT.size),\n cleaner: signal(DEFAULT.cleaner),\n});\n\nexport function tuiTextfieldOptionsProvider(\n options: Partial<TuiTextfieldOptions>,\n): Provider {\n return {\n provide: TUI_TEXTFIELD_OPTIONS,\n deps: [[new Optional(), new SkipSelf(), TUI_TEXTFIELD_OPTIONS]],\n useFactory: (parent: TuiTextfieldOptions | null) => ({\n appearance: signal(parent?.appearance() ?? DEFAULT.appearance),\n size: signal(parent?.size() ?? DEFAULT.size),\n cleaner: signal(parent?.cleaner() ?? DEFAULT.cleaner),\n ...options,\n }),\n };\n}\n\n@Directive({\n standalone: true,\n selector: '[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]',\n providers: [tuiProvide(TUI_TEXTFIELD_OPTIONS, TuiTextfieldOptionsDirective)],\n})\nexport class TuiTextfieldOptionsDirective implements TuiTextfieldOptions {\n private readonly options = inject(TUI_TEXTFIELD_OPTIONS, {skipSelf: true});\n\n // TODO: refactor to signal inputs after Angular update\n public appearance = signal(this.options.appearance());\n public size = signal(this.options.size());\n public cleaner = signal(this.options.cleaner());\n\n @Input()\n public set tuiTextfieldAppearance(appearance: string) {\n this.appearance.set(appearance);\n }\n\n @Input()\n public set tuiTextfieldSize(size: TuiSizeL | TuiSizeS) {\n this.size.set(size);\n }\n\n @Input()\n public set tuiTextfieldCleaner(enabled: boolean) {\n this.cleaner.set(enabled);\n }\n}\n","import {ContentChild, Directive, TemplateRef} from '@angular/core';\nimport {tuiDropdown} from '@taiga-ui/core/directives/dropdown';\nimport type {PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiTextfieldDropdown]',\n})\nexport class TuiTextfieldDropdownDirective {}\n\n@Directive({\n standalone: true,\n})\nexport class TuiWithTextfieldDropdown {\n private readonly dropdown = tuiDropdown(null);\n\n @ContentChild(TuiTextfieldDropdownDirective, {read: TemplateRef})\n protected set template(template: PolymorpheusContent) {\n this.dropdown.set(template);\n }\n}\n","import {NgIf} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n computed,\n ContentChild,\n ElementRef,\n forwardRef,\n inject,\n Input,\n ViewChild,\n ViewContainerRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {WaResizeObserver} from '@ng-web-apis/resize-observer';\nimport {tuiInjectId} from '@taiga-ui/cdk/services';\nimport type {TuiContext, TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiFocusedIn} from '@taiga-ui/cdk/utils/focus';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport type {TuiDataListHost} from '@taiga-ui/core/components/data-list';\nimport {tuiAsDataListHost} from '@taiga-ui/core/components/data-list';\nimport {TuiLabel} from '@taiga-ui/core/components/label';\nimport {\n TuiDropdownDirective,\n tuiDropdownOpen,\n tuiDropdownOptionsProvider,\n TuiWithDropdownOpen,\n} from '@taiga-ui/core/directives/dropdown';\nimport {TuiWithIcons} from '@taiga-ui/core/directives/icons';\nimport {TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport type {TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\nimport type {PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiTextfieldDirective} from './textfield.directive';\nimport {TUI_TEXTFIELD_OPTIONS} from './textfield.options';\nimport {TuiWithTextfieldDropdown} from './textfield-dropdown.directive';\n\n@Component({\n standalone: true,\n selector: 'tui-textfield',\n imports: [NgIf, PolymorpheusOutlet, TuiButton, WaResizeObserver],\n templateUrl: './textfield.template.html',\n styles: ['@import \"@taiga-ui/core/styles/components/textfield.less\";'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsDataListHost(TuiTextfieldComponent),\n tuiDropdownOptionsProvider({limitWidth: 'fixed'}),\n ],\n hostDirectives: [\n TuiDropdownDirective,\n TuiWithDropdownOpen,\n TuiWithTextfieldDropdown,\n TuiWithIcons,\n ],\n host: {\n '[style.--t-side.px]': 'side',\n '[attr.data-size]': 'options.size()',\n '[class._with-label]': 'hasLabel',\n '[class._with-template]': 'content',\n '[class._disabled]': 'el?.nativeElement.disabled',\n },\n})\nexport class TuiTextfieldComponent<T> implements TuiDataListHost<T> {\n private readonly open = tuiDropdownOpen();\n private readonly focusedIn = tuiFocusedIn(tuiInjectElement());\n\n @ContentChild(forwardRef(() => TuiTextfieldDirective))\n protected readonly directive?: TuiTextfieldDirective<T>;\n\n @ContentChild(forwardRef(() => TuiLabel), {read: ElementRef})\n protected readonly label?: ElementRef<HTMLElement>;\n\n @ContentChild(NgControl)\n protected readonly control?: NgControl;\n\n protected side = 0;\n\n protected readonly autoId = tuiInjectId();\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly cdr = inject(ChangeDetectorRef);\n\n @ViewChild('vcr', {read: ViewContainerRef, static: true})\n public readonly vcr?: ViewContainerRef;\n\n @ContentChild(forwardRef(() => TuiTextfieldDirective), {\n read: ElementRef,\n static: true,\n })\n public readonly el?: ElementRef<HTMLInputElement>;\n\n @Input()\n public filler = '';\n\n @Input()\n public stringify: TuiStringHandler<T> = String;\n\n @Input()\n public content: PolymorpheusContent<TuiContext<T>>;\n\n public readonly focused = computed(() => this.open() || this.focusedIn());\n public readonly options = inject(TUI_TEXTFIELD_OPTIONS);\n\n public get id(): string {\n return this.el?.nativeElement.id || this.autoId;\n }\n\n public get size(): TuiSizeL | TuiSizeS {\n return this.options.size();\n }\n\n public handleOption(option: T): void {\n this.directive?.setValue(option);\n this.open.set(false);\n }\n\n protected get computedFiller(): string {\n const value = this.el?.nativeElement.value || '';\n const filler = value + this.filler.slice(value.length);\n\n return filler.length > value.length ? filler : '';\n }\n\n protected get showFiller(): boolean {\n return (\n this.focused() &&\n !!this.computedFiller &&\n (!!this.el?.nativeElement.value || !this.el?.nativeElement.placeholder)\n );\n }\n\n protected get hasLabel(): boolean {\n return Boolean(this.label?.nativeElement?.childNodes.length);\n }\n\n protected onResize(entry: readonly ResizeObserverEntry[]): void {\n this.side = entry[0]?.contentRect?.width || 0;\n this.cdr.detectChanges();\n }\n}\n","<ng-content select=\"input\" />\n<ng-content select=\"select\" />\n<ng-content select=\"label\" />\n<span\n class=\"t-content\"\n (mousedown.prevent)=\"el?.nativeElement?.focus()\"\n (waResizeObserver)=\"onResize($event)\"\n>\n <ng-content />\n <button\n *ngIf=\"options.cleaner()\"\n appearance=\"icon\"\n size=\"xs\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-clear\"\n [iconStart]=\"icons.close\"\n (click)=\"directive?.setValue(null)\"\n (pointerdown.silent.prevent)=\"el?.nativeElement?.focus()\"\n ></button>\n <ng-container #vcr />\n <ng-content select=\"tui-icon\" />\n</span>\n<span class=\"t-template\">\n <ng-container *polymorpheusOutlet=\"content as text; context: {$implicit: control?.value}\">\n {{ text }}\n </ng-container>\n</span>\n<input\n *ngIf=\"showFiller\"\n aria-hidden=\"true\"\n disabled\n class=\"t-filler\"\n [value]=\"computedFiller\"\n/>\n","import {computed, Directive, inject, Input, type OnChanges, signal} from '@angular/core';\nimport {TuiNativeValidator} from '@taiga-ui/cdk/directives/native-validator';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {\n TuiAppearance,\n tuiAppearance,\n tuiAppearanceFocus,\n tuiAppearanceMode,\n tuiAppearanceState,\n} from '@taiga-ui/core/directives/appearance';\nimport type {TuiInteractiveState} from '@taiga-ui/core/types';\n\nimport {TuiTextfieldComponent} from './textfield.component';\nimport {TUI_TEXTFIELD_OPTIONS} from './textfield.options';\n\n@Directive()\nexport class TuiTextfieldBase<T> implements OnChanges {\n // TODO: refactor to signal inputs after Angular update\n private readonly focused = signal<boolean | null>(null);\n\n protected readonly a = tuiAppearance(inject(TUI_TEXTFIELD_OPTIONS).appearance);\n protected readonly s = tuiAppearanceState(null);\n protected readonly m = tuiAppearanceMode(this.mode);\n protected readonly f = tuiAppearanceFocus(\n computed(() => this.focused() || this.textfield.focused()),\n );\n\n protected readonly el = tuiInjectElement<HTMLInputElement>();\n protected readonly textfield: TuiTextfieldComponent<T> =\n inject(TuiTextfieldComponent);\n\n @Input()\n public readOnly = false;\n\n @Input()\n public invalid: boolean | null = null;\n\n @Input('focused')\n public set focusedSetter(focused: boolean | null) {\n this.focused.set(focused);\n }\n\n @Input('state')\n public set stateSetter(state: TuiInteractiveState | null) {\n this.s.set(state);\n }\n\n public get mode(): string | null {\n if (this.readOnly) {\n return 'readonly';\n }\n\n if (this.invalid === false) {\n return 'valid';\n }\n\n if (this.invalid) {\n return 'invalid';\n }\n\n return null;\n }\n\n // TODO: refactor to signal inputs after Angular update\n public ngOnChanges(): void {\n this.m.set(this.mode);\n }\n\n public setValue(value: T | null): void {\n this.el.value = value == null ? '' : this.textfield.stringify(value);\n this.el.dispatchEvent(new Event('input', {bubbles: true}));\n }\n}\n\n@Directive({\n standalone: true,\n selector: 'input[tuiTextfield]',\n hostDirectives: [TuiNativeValidator, TuiAppearance],\n host: {\n '[id]': 'textfield.id',\n '[readOnly]': 'readOnly',\n '[class._empty]': 'el.value === \"\"',\n '(input)': '0',\n '(focusin)': '0',\n '(focusout)': '0',\n },\n})\nexport class TuiTextfieldDirective<T> extends TuiTextfieldBase<T> {}\n","import {CommonModule} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, inject, Input} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {WA_NAVIGATOR} from '@ng-web-apis/common';\nimport {TuiNativeValidator} from '@taiga-ui/cdk/directives/native-validator';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiAppearance} from '@taiga-ui/core/directives/appearance';\n\nimport {TuiTextfieldBase, TuiTextfieldDirective} from './textfield.directive';\n\n@Component({\n standalone: true,\n selector: 'select[tuiTextfield]',\n imports: [CommonModule],\n templateUrl: './select.template.html',\n // We want this template to follow change detection to parent textfield.\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n providers: [tuiProvide(TuiTextfieldDirective, TuiSelect)],\n hostDirectives: [TuiNativeValidator, TuiAppearance],\n host: {\n '[id]': 'textfield.id',\n '[class._empty]': 'value === \"\"',\n '(input)': '0',\n '(focusin)': '0',\n '(focusout)': '0',\n '(keydown.space.prevent)': '0',\n '(keydown.enter.prevent)': '0',\n '(keydown.backspace)': 'setValue(\"\")',\n '(mousedown.prevent)': 'focus()',\n '(keydown.control.c)': 'onCopy()',\n '(keydown.meta.c)': 'onCopy()',\n },\n})\nexport class TuiSelect<T> extends TuiTextfieldBase<T> {\n private readonly nav = inject(WA_NAVIGATOR);\n private readonly control = inject(NgControl);\n\n @Input()\n public placeholder = '';\n\n public override setValue(value: T): void {\n this.control.control?.setValue(value);\n this.el.dispatchEvent(new Event('input', {bubbles: true}));\n }\n\n public focus(): void {\n this.el.classList.add('_ios-fix');\n this.el.focus();\n this.el.classList.remove('_ios-fix');\n }\n\n protected get value(): string {\n return this.textfield.stringify(this.control.value ?? '');\n }\n\n protected async onCopy(): Promise<void> {\n await this.nav.clipboard.writeText(this.value);\n }\n}\n","<option\n *ngIf=\"placeholder && !value; else selected\"\n disabled\n selected\n value=\"\"\n>\n {{ placeholder }}\n</option>\n<ng-template #selected>\n <option\n *ngFor=\"let item of [value]\"\n selected\n >\n {{ item }}\n </option>\n</ng-template>\n","import {TuiLabel} from '@taiga-ui/core/components/label';\n\nimport {TuiSelect} from './select.directive';\nimport {TuiTextfieldComponent} from './textfield.component';\nimport {TuiTextfieldDirective} from './textfield.directive';\nimport {TuiTextfieldOptionsDirective} from './textfield.options';\nimport {TuiTextfieldDropdownDirective} from './textfield-dropdown.directive';\n\nexport const TuiTextfield = [\n TuiLabel,\n TuiSelect,\n TuiTextfieldComponent,\n TuiTextfieldDirective,\n TuiTextfieldOptionsDirective,\n TuiTextfieldDropdownDirective,\n] as const;\n","import {Directive, inject, TemplateRef} from '@angular/core';\n\nimport {TuiTextfieldComponent} from './textfield.component';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiTextfieldContent]',\n})\nexport class TuiTextfieldContent {\n constructor() {\n inject(TuiTextfieldComponent).vcr?.createEmbeddedView(inject(TemplateRef));\n }\n}\n","/**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WAAW,EAAA,CAAA;sBADjB,KAAK;;;AE9BG,MAAA,YAAY,GAAG;IACxB,QAAQ;IACR,SAAS;IACT,qBAAqB;IACrB,qBAAqB;IACrB,4BAA4B;IAC5B,6BAA6B;;;ACVjC,MAIa,mBAAmB,CAAA;AAC5B,IAAA,WAAA,GAAA;AACI,QAAA,MAAM,CAAC,qBAAqB,CAAC,CAAC,GAAG,EAAE,kBAAkB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;KAC9E;+GAHQ,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kCAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,kCAAkC;AAC/C,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { tuiCreateToken, tuiProvide, tuiWithStyles, tuiDirectiveBinding } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
1
|
+
import { tuiCreateToken, tuiProvide, tuiWithStyles, tuiIsString, tuiDirectiveBinding } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Component, ViewEncapsulation, ChangeDetectionStrategy, signal, inject, Directive, Input } from '@angular/core';
|
|
3
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, computed, signal, inject, Directive, Input } from '@angular/core';
|
|
4
4
|
|
|
5
5
|
const TUI_APPEARANCE_DEFAULT_OPTIONS = {
|
|
6
6
|
appearance: '',
|
|
@@ -23,10 +23,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
23
23
|
class TuiAppearance {
|
|
24
24
|
constructor() {
|
|
25
25
|
this.nothing = tuiWithStyles(TuiAppearanceStyles);
|
|
26
|
+
this.modes = computed((mode = this.mode()) => !mode || tuiIsString(mode) ? mode : mode.join(' '));
|
|
26
27
|
// TODO: refactor to signal inputs after Angular update
|
|
27
28
|
this.appearance = signal(inject(TUI_APPEARANCE_OPTIONS).appearance);
|
|
28
29
|
this.state = signal(null);
|
|
29
30
|
this.focus = signal(null);
|
|
31
|
+
this.mode = signal(null);
|
|
30
32
|
}
|
|
31
33
|
set tuiAppearance(appearance) {
|
|
32
34
|
this.appearance.set(appearance);
|
|
@@ -37,8 +39,11 @@ class TuiAppearance {
|
|
|
37
39
|
set tuiAppearanceFocus(focus) {
|
|
38
40
|
this.focus.set(focus);
|
|
39
41
|
}
|
|
42
|
+
set tuiAppearanceMode(mode) {
|
|
43
|
+
this.mode.set(mode);
|
|
44
|
+
}
|
|
40
45
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiAppearance, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
41
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiAppearance, isStandalone: true, selector: "[tuiAppearance]", inputs: { tuiAppearance: "tuiAppearance", tuiAppearanceState: "tuiAppearanceState", tuiAppearanceFocus: "tuiAppearanceFocus" }, host: { attributes: { "tuiAppearance": "" }, properties: { "attr.data-appearance": "appearance()", "attr.data-state": "state()", "attr.data-focus": "focus()" } }, ngImport: i0 }); }
|
|
46
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiAppearance, isStandalone: true, selector: "[tuiAppearance]", inputs: { tuiAppearance: "tuiAppearance", tuiAppearanceState: "tuiAppearanceState", tuiAppearanceFocus: "tuiAppearanceFocus", tuiAppearanceMode: "tuiAppearanceMode" }, host: { attributes: { "tuiAppearance": "" }, properties: { "attr.data-appearance": "appearance()", "attr.data-state": "state()", "attr.data-focus": "focus()", "attr.data-mode": "modes()" } }, ngImport: i0 }); }
|
|
42
47
|
}
|
|
43
48
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiAppearance, decorators: [{
|
|
44
49
|
type: Directive,
|
|
@@ -50,6 +55,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
50
55
|
'[attr.data-appearance]': 'appearance()',
|
|
51
56
|
'[attr.data-state]': 'state()',
|
|
52
57
|
'[attr.data-focus]': 'focus()',
|
|
58
|
+
'[attr.data-mode]': 'modes()',
|
|
53
59
|
},
|
|
54
60
|
}]
|
|
55
61
|
}], propDecorators: { tuiAppearance: [{
|
|
@@ -58,6 +64,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
58
64
|
type: Input
|
|
59
65
|
}], tuiAppearanceFocus: [{
|
|
60
66
|
type: Input
|
|
67
|
+
}], tuiAppearanceMode: [{
|
|
68
|
+
type: Input
|
|
61
69
|
}] } });
|
|
62
70
|
|
|
63
71
|
function tuiAppearance(value) {
|
|
@@ -69,10 +77,13 @@ function tuiAppearanceState(value) {
|
|
|
69
77
|
function tuiAppearanceFocus(value) {
|
|
70
78
|
return tuiDirectiveBinding(TuiAppearance, 'focus', value);
|
|
71
79
|
}
|
|
80
|
+
function tuiAppearanceMode(value) {
|
|
81
|
+
return tuiDirectiveBinding(TuiAppearance, 'mode', value);
|
|
82
|
+
}
|
|
72
83
|
|
|
73
84
|
class TuiWithAppearance {
|
|
74
85
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiWithAppearance, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
75
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiWithAppearance, isStandalone: true, hostDirectives: [{ directive: TuiAppearance, inputs: ["tuiAppearance", "appearance", "tuiAppearanceState", "tuiAppearanceState", "tuiAppearanceFocus", "tuiAppearanceFocus"] }], ngImport: i0 }); }
|
|
86
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiWithAppearance, isStandalone: true, hostDirectives: [{ directive: TuiAppearance, inputs: ["tuiAppearance", "appearance", "tuiAppearanceState", "tuiAppearanceState", "tuiAppearanceFocus", "tuiAppearanceFocus", "tuiAppearanceMode", "tuiAppearanceMode"] }], ngImport: i0 }); }
|
|
76
87
|
}
|
|
77
88
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiWithAppearance, decorators: [{
|
|
78
89
|
type: Directive,
|
|
@@ -85,6 +96,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
85
96
|
'tuiAppearance: appearance',
|
|
86
97
|
'tuiAppearanceState',
|
|
87
98
|
'tuiAppearanceFocus',
|
|
99
|
+
'tuiAppearanceMode',
|
|
88
100
|
],
|
|
89
101
|
},
|
|
90
102
|
],
|
|
@@ -95,5 +107,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
95
107
|
* Generated bundle index. Do not edit.
|
|
96
108
|
*/
|
|
97
109
|
|
|
98
|
-
export { TUI_APPEARANCE_DEFAULT_OPTIONS, TUI_APPEARANCE_OPTIONS, TuiAppearance, TuiWithAppearance, tuiAppearance, tuiAppearanceFocus, tuiAppearanceOptionsProvider, tuiAppearanceState };
|
|
110
|
+
export { TUI_APPEARANCE_DEFAULT_OPTIONS, TUI_APPEARANCE_OPTIONS, TuiAppearance, TuiWithAppearance, tuiAppearance, tuiAppearanceFocus, tuiAppearanceMode, tuiAppearanceOptionsProvider, tuiAppearanceState };
|
|
99
111
|
//# sourceMappingURL=taiga-ui-core-directives-appearance.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-directives-appearance.mjs","sources":["../../../projects/core/directives/appearance/appearance.options.ts","../../../projects/core/directives/appearance/appearance.directive.ts","../../../projects/core/directives/appearance/appearance.bindings.ts","../../../projects/core/directives/appearance/with-appearance.ts","../../../projects/core/directives/appearance/taiga-ui-core-directives-appearance.ts"],"sourcesContent":["import type {ExistingProvider, ProviderToken} from '@angular/core';\nimport {tuiCreateToken, tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\n\n/**\n * Bundled appearances for autocomplete purposes, not exported on purpose\n */\ntype Appearance =\n | 'accent'\n | 'destructive'\n | 'error'\n | 'flat'\n | 'floating'\n | 'glass'\n | 'info'\n | 'link'\n | 'neutral'\n | 'opposite'\n | 'outline'\n | 'primary'\n | 'secondary'\n | 'success'\n | 'textfield'\n | 'warning'\n | 'whiteblock'\n | (Record<never, never> & string);\n\nexport interface TuiAppearanceOptions {\n readonly appearance: Appearance;\n}\n\nexport const TUI_APPEARANCE_DEFAULT_OPTIONS: TuiAppearanceOptions = {\n appearance: '',\n};\n\nexport const TUI_APPEARANCE_OPTIONS = tuiCreateToken(TUI_APPEARANCE_DEFAULT_OPTIONS);\n\nexport function tuiAppearanceOptionsProvider(\n token: ProviderToken<TuiAppearanceOptions>,\n): ExistingProvider {\n return tuiProvide(TUI_APPEARANCE_OPTIONS, token);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport type {TuiInteractiveState} from '@taiga-ui/core/types';\n\nimport {TUI_APPEARANCE_OPTIONS, type TuiAppearanceOptions} from './appearance.options';\n\n@Component({\n standalone: true,\n template: '',\n styles: ['@import \"@taiga-ui/core/styles/components/appearance.less\";'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-appearance',\n },\n})\nclass TuiAppearanceStyles {}\n\n@Directive({\n standalone: true,\n selector: '[tuiAppearance]',\n host: {\n tuiAppearance: '',\n '[attr.data-appearance]': 'appearance()',\n '[attr.data-state]': 'state()',\n '[attr.data-focus]': 'focus()',\n },\n})\nexport class TuiAppearance {\n protected readonly nothing = tuiWithStyles(TuiAppearanceStyles);\n\n // TODO: refactor to signal inputs after Angular update\n public readonly appearance = signal(inject(TUI_APPEARANCE_OPTIONS).appearance);\n public readonly state = signal<TuiInteractiveState | null>(null);\n public readonly focus = signal<boolean | null>(null);\n\n @Input()\n public set tuiAppearance(appearance: TuiAppearanceOptions['appearance']) {\n this.appearance.set(appearance);\n }\n\n @Input()\n public set tuiAppearanceState(state: TuiInteractiveState | null) {\n this.state.set(state);\n }\n\n @Input()\n public set tuiAppearanceFocus(focus: boolean | null) {\n this.focus.set(focus);\n }\n}\n","import type {Signal, WritableSignal} from '@angular/core';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/miscellaneous';\nimport type {TuiInteractiveState} from '@taiga-ui/core/types';\n\nimport {TuiAppearance} from './appearance.directive';\n\ntype A = string;\n\ntype S = TuiInteractiveState | null;\n\ntype F = boolean | null;\n\nexport function tuiAppearance(value: A | WritableSignal<A>): WritableSignal<A>;\nexport function tuiAppearance(value: Signal<A>): Signal<A>;\nexport function tuiAppearance(value: A | Signal<A>): Signal<A> {\n return tuiDirectiveBinding(TuiAppearance, 'appearance', value);\n}\n\nexport function tuiAppearanceState(value: S | WritableSignal<S>): WritableSignal<S>;\nexport function tuiAppearanceState(value: Signal<S>): Signal<S>;\nexport function tuiAppearanceState(value: S | Signal<S>): Signal<S> {\n return tuiDirectiveBinding(TuiAppearance, 'state', value);\n}\n\nexport function tuiAppearanceFocus(value: F | WritableSignal<F>): WritableSignal<F>;\nexport function tuiAppearanceFocus(value: Signal<F>): Signal<F>;\nexport function tuiAppearanceFocus(value: F | Signal<F>): Signal<F> {\n return tuiDirectiveBinding(TuiAppearance, 'focus', value);\n}\n","import {Directive} from '@angular/core';\n\nimport {TuiAppearance} from './appearance.directive';\n\n@Directive({\n standalone: true,\n hostDirectives: [\n {\n directive: TuiAppearance,\n inputs: [\n 'tuiAppearance: appearance',\n 'tuiAppearanceState',\n 'tuiAppearanceFocus',\n ],\n },\n ],\n})\nexport class TuiWithAppearance {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.TuiAppearance"],"mappings":";;;;AA8Ba,MAAA,8BAA8B,GAAyB;AAChE,IAAA,UAAU,EAAE,EAAE;EAChB;MAEW,sBAAsB,GAAG,cAAc,CAAC,8BAA8B,EAAE;AAE/E,SAAU,4BAA4B,CACxC,KAA0C,EAAA;AAE1C,IAAA,OAAO,UAAU,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;AACrD;;
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-directives-appearance.mjs","sources":["../../../projects/core/directives/appearance/appearance.options.ts","../../../projects/core/directives/appearance/appearance.directive.ts","../../../projects/core/directives/appearance/appearance.bindings.ts","../../../projects/core/directives/appearance/with-appearance.ts","../../../projects/core/directives/appearance/taiga-ui-core-directives-appearance.ts"],"sourcesContent":["import type {ExistingProvider, ProviderToken} from '@angular/core';\nimport {tuiCreateToken, tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\n\n/**\n * Bundled appearances for autocomplete purposes, not exported on purpose\n */\ntype Appearance =\n | 'accent'\n | 'destructive'\n | 'error'\n | 'flat'\n | 'floating'\n | 'glass'\n | 'info'\n | 'link'\n | 'neutral'\n | 'opposite'\n | 'outline'\n | 'primary'\n | 'secondary'\n | 'success'\n | 'textfield'\n | 'warning'\n | 'whiteblock'\n | (Record<never, never> & string);\n\nexport interface TuiAppearanceOptions {\n readonly appearance: Appearance;\n}\n\nexport const TUI_APPEARANCE_DEFAULT_OPTIONS: TuiAppearanceOptions = {\n appearance: '',\n};\n\nexport const TUI_APPEARANCE_OPTIONS = tuiCreateToken(TUI_APPEARANCE_DEFAULT_OPTIONS);\n\nexport function tuiAppearanceOptionsProvider(\n token: ProviderToken<TuiAppearanceOptions>,\n): ExistingProvider {\n return tuiProvide(TUI_APPEARANCE_OPTIONS, token);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n Directive,\n inject,\n Input,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiIsString, tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport type {TuiInteractiveState} from '@taiga-ui/core/types';\n\nimport {TUI_APPEARANCE_OPTIONS, type TuiAppearanceOptions} from './appearance.options';\n\n@Component({\n standalone: true,\n template: '',\n styles: ['@import \"@taiga-ui/core/styles/components/appearance.less\";'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-appearance',\n },\n})\nclass TuiAppearanceStyles {}\n\n@Directive({\n standalone: true,\n selector: '[tuiAppearance]',\n host: {\n tuiAppearance: '',\n '[attr.data-appearance]': 'appearance()',\n '[attr.data-state]': 'state()',\n '[attr.data-focus]': 'focus()',\n '[attr.data-mode]': 'modes()',\n },\n})\nexport class TuiAppearance {\n protected readonly nothing = tuiWithStyles(TuiAppearanceStyles);\n protected readonly modes = computed((mode = this.mode()) =>\n !mode || tuiIsString(mode) ? mode : mode.join(' '),\n );\n\n // TODO: refactor to signal inputs after Angular update\n public readonly appearance = signal(inject(TUI_APPEARANCE_OPTIONS).appearance);\n public readonly state = signal<TuiInteractiveState | null>(null);\n public readonly focus = signal<boolean | null>(null);\n public readonly mode = signal<string | readonly string[] | null>(null);\n\n @Input()\n public set tuiAppearance(appearance: TuiAppearanceOptions['appearance']) {\n this.appearance.set(appearance);\n }\n\n @Input()\n public set tuiAppearanceState(state: TuiInteractiveState | null) {\n this.state.set(state);\n }\n\n @Input()\n public set tuiAppearanceFocus(focus: boolean | null) {\n this.focus.set(focus);\n }\n\n @Input()\n public set tuiAppearanceMode(mode: string | readonly string[] | null) {\n this.mode.set(mode);\n }\n}\n","import type {Signal, WritableSignal} from '@angular/core';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/miscellaneous';\nimport type {TuiInteractiveState} from '@taiga-ui/core/types';\n\nimport {TuiAppearance} from './appearance.directive';\n\ntype A = string;\n\ntype S = TuiInteractiveState | null;\n\ntype F = boolean | null;\n\ntype M = string | readonly string[] | null;\n\nexport function tuiAppearance(value: A | WritableSignal<A>): WritableSignal<A>;\nexport function tuiAppearance(value: Signal<A>): Signal<A>;\nexport function tuiAppearance(value: A | Signal<A>): Signal<A> {\n return tuiDirectiveBinding(TuiAppearance, 'appearance', value);\n}\n\nexport function tuiAppearanceState(value: S | WritableSignal<S>): WritableSignal<S>;\nexport function tuiAppearanceState(value: Signal<S>): Signal<S>;\nexport function tuiAppearanceState(value: S | Signal<S>): Signal<S> {\n return tuiDirectiveBinding(TuiAppearance, 'state', value);\n}\n\nexport function tuiAppearanceFocus(value: F | WritableSignal<F>): WritableSignal<F>;\nexport function tuiAppearanceFocus(value: Signal<F>): Signal<F>;\nexport function tuiAppearanceFocus(value: F | Signal<F>): Signal<F> {\n return tuiDirectiveBinding(TuiAppearance, 'focus', value);\n}\n\nexport function tuiAppearanceMode(value: M | WritableSignal<M>): WritableSignal<M>;\nexport function tuiAppearanceMode(value: Signal<M>): Signal<M>;\nexport function tuiAppearanceMode(value: M | Signal<M>): Signal<M> {\n return tuiDirectiveBinding(TuiAppearance, 'mode', value);\n}\n","import {Directive} from '@angular/core';\n\nimport {TuiAppearance} from './appearance.directive';\n\n@Directive({\n standalone: true,\n hostDirectives: [\n {\n directive: TuiAppearance,\n inputs: [\n 'tuiAppearance: appearance',\n 'tuiAppearanceState',\n 'tuiAppearanceFocus',\n 'tuiAppearanceMode',\n ],\n },\n ],\n})\nexport class TuiWithAppearance {}\n","/**\n *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AC7D;;AChCA,MAca,iBAAiB,CAAA;+GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAA,aAAA,EAAA,MAAA,EAAA,CAAA,eAAA,EAAA,YAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,mBAAA,EAAA,mBAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAd7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,cAAc,EAAE;AACZ,wBAAA;AACI,4BAAA,SAAS,EAAE,aAAa;AACxB,4BAAA,MAAM,EAAE;gCACJ,2BAA2B;gCAC3B,oBAAoB;gCACpB,oBAAoB;gCACpB,mBAAmB;AACtB,6BAAA;AACJ,yBAAA;AACJ,qBAAA;AACJ,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Directive, InjectionToken, Optional, SkipSelf, inject, Input, ChangeDetectorRef, INJECTOR, signal, TemplateRef, Component, ChangeDetectionStrategy, computed, EventEmitter, ElementRef, ContentChild, Output, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { Injectable, Directive, InjectionToken, Optional, Self, SkipSelf, inject, Input, ChangeDetectorRef, INJECTOR, signal, TemplateRef, Component, ChangeDetectionStrategy, computed, EventEmitter, ElementRef, ContentChild, Output, ViewContainerRef } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { WA_WINDOW } from '@ng-web-apis/common';
|
|
5
5
|
import * as i1 from '@taiga-ui/cdk/directives/active-zone';
|
|
@@ -88,7 +88,7 @@ const TUI_DROPDOWN_OPTIONS = tuiCreateToken(TUI_DROPDOWN_DEFAULT_OPTIONS);
|
|
|
88
88
|
const tuiDropdownOptionsProvider = (override) => ({
|
|
89
89
|
provide: TUI_DROPDOWN_OPTIONS,
|
|
90
90
|
deps: [
|
|
91
|
-
[new Optional(), TuiDropdownOptionsDirective],
|
|
91
|
+
[new Optional(), new Self(), TuiDropdownOptionsDirective],
|
|
92
92
|
[new Optional(), new SkipSelf(), TUI_DROPDOWN_OPTIONS],
|
|
93
93
|
],
|
|
94
94
|
useFactory: tuiOverrideOptions(override, TUI_DROPDOWN_DEFAULT_OPTIONS),
|