@taiga-ui/core 4.31.0 → 4.32.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/fullscreen/fullscreen.component.d.ts +14 -0
- package/components/fullscreen/index.d.ts +1 -0
- package/components/index.d.ts +1 -0
- package/components/root/root.component.d.ts +6 -2
- package/directives/dropdown/dropdown-open.directive.d.ts +3 -2
- package/directives/popup/index.d.ts +1 -0
- package/directives/popup/popups.component.d.ts +6 -0
- package/esm2022/components/dialog/dialog-close.service.mjs +7 -4
- package/esm2022/components/dialog/dialog.component.mjs +3 -3
- package/esm2022/components/fullscreen/fullscreen.component.mjs +67 -0
- package/esm2022/components/fullscreen/index.mjs +2 -0
- package/esm2022/components/fullscreen/taiga-ui-core-components-fullscreen.mjs +5 -0
- package/esm2022/components/index.mjs +2 -1
- package/esm2022/components/link/link.directive.mjs +2 -2
- package/esm2022/components/root/root.component.mjs +32 -12
- package/esm2022/components/textfield/select-like.directive.mjs +3 -2
- package/esm2022/components/textfield/textfield.component.mjs +3 -3
- package/esm2022/directives/dropdown/dropdown-open.directive.mjs +16 -9
- package/esm2022/directives/hint/hint.component.mjs +4 -4
- package/esm2022/directives/popup/index.mjs +2 -1
- package/esm2022/directives/popup/popups.component.mjs +20 -0
- package/fesm2022/taiga-ui-core-components-dialog.mjs +8 -5
- package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-fullscreen.mjs +73 -0
- package/fesm2022/taiga-ui-core-components-fullscreen.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-components-link.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-root.mjs +31 -11
- package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-textfield.mjs +4 -3
- package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components.mjs +1 -0
- package/fesm2022/taiga-ui-core-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs +14 -7
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-hint.mjs +3 -3
- package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-popup.mjs +18 -3
- package/fesm2022/taiga-ui-core-directives-popup.mjs.map +1 -1
- package/package.json +70 -64
- package/styles/components/link.less +14 -2
- package/styles/components/textfield.less +5 -6
- package/styles/theme/palette.less +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-dialog.mjs","sources":["../../../projects/core/components/dialog/dialog.tokens.ts","../../../projects/core/components/dialog/dialog-close.service.ts","../../../projects/core/components/dialog/dialog.component.ts","../../../projects/core/components/dialog/dialog.template.html","../../../projects/core/components/dialog/dialog.service.ts","../../../projects/core/components/dialog/dialog.directive.ts","../../../projects/core/components/dialog/dialog.factory.ts","../../../projects/core/components/dialog/dialogs.component.ts","../../../projects/core/components/dialog/dialogs.template.html","../../../projects/core/components/dialog/taiga-ui-core-components-dialog.ts"],"sourcesContent":["import type {Provider} from '@angular/core';\nimport type {TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport type {Observable} from 'rxjs';\nimport {BehaviorSubject, EMPTY} from 'rxjs';\n\nimport type {TuiDialogOptions} from './dialog.interfaces';\n\nexport const TUI_DIALOGS = tuiCreateToken(\n new BehaviorSubject<ReadonlyArray<TuiPopover<any, any>>>([]),\n);\n\nexport const TUI_DIALOG_DEFAULT_OPTIONS: TuiDialogOptions<void> = {\n appearance: '',\n size: 'm',\n required: false,\n closeable: true,\n dismissible: true,\n label: '',\n header: '',\n data: undefined,\n};\n\n/**\n * A stream to close dialogs\n */\nexport const TUI_DIALOGS_CLOSE = tuiCreateToken<Observable<unknown>>(EMPTY);\n\n/**\n * Default parameters for dialog component\n */\nexport const TUI_DIALOG_OPTIONS = tuiCreateToken(TUI_DIALOG_DEFAULT_OPTIONS);\n\nexport function tuiDialogOptionsProvider(\n options: Partial<TuiDialogOptions<unknown>>,\n): Provider {\n return tuiProvideOptions(TUI_DIALOG_OPTIONS, options, TUI_DIALOG_DEFAULT_OPTIONS);\n}\n","import {DOCUMENT} from '@angular/common';\nimport {inject, Injectable} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {\n tuiContainsOrAfter,\n tuiGetActualTarget,\n tuiInjectElement,\n tuiIsElement,\n} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetViewportWidth} from '@taiga-ui/core/utils';\nimport {filter, map, merge, Observable, switchMap, take} from 'rxjs';\n\nconst SCROLLBAR_PLACEHOLDER = 17;\n\n@Injectable()\nexport class TuiDialogCloseService extends Observable<unknown> {\n private readonly win = inject(WA_WINDOW);\n private readonly doc = inject(DOCUMENT);\n private readonly el = tuiInjectElement();\n\n private readonly esc$ = tuiTypedFromEvent(this.doc, 'keydown').pipe(\n filter((event) => {\n const target = tuiGetActualTarget(event);\n\n return (\n event.key === 'Escape' &&\n !event.defaultPrevented &&\n (this.el.contains(target) || this.isOutside(target))\n );\n }),\n );\n\n private readonly mousedown$ = tuiTypedFromEvent(this.doc, 'mousedown').pipe(\n filter(\n (event) =>\n tuiGetViewportWidth(this.win) - event.clientX > SCROLLBAR_PLACEHOLDER &&\n this.isOutside(tuiGetActualTarget(event)),\n ),\n switchMap(() =>\n tuiTypedFromEvent(this.doc, 'mouseup').pipe(\n take(1),\n map(tuiGetActualTarget),\n filter((target) => this.isOutside(target)),\n ),\n ),\n );\n\n constructor() {\n super((subscriber) => merge(this.esc$, this.mousedown$).subscribe(subscriber));\n }\n\n private isOutside(target: EventTarget): boolean {\n return (\n tuiIsElement(target) &&\n (!tuiContainsOrAfter(this.el, target) || target === this.el)\n );\n }\n}\n","import {AsyncPipe, NgIf} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, computed, inject} from '@angular/core';\nimport {takeUntilDestroyed, toSignal} from '@angular/core/rxjs-interop';\nimport {TUI_TRUE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {TuiAutoFocus} from '@taiga-ui/cdk/directives/auto-focus';\nimport type {TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiFadeIn, tuiSlideInTop} from '@taiga-ui/core/animations';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiBreakpointService} from '@taiga-ui/core/services';\nimport {\n TUI_ANIMATIONS_SPEED,\n TUI_CLOSE_WORD,\n TUI_COMMON_ICONS,\n} from '@taiga-ui/core/tokens';\nimport {tuiGetDuration} from '@taiga-ui/core/utils';\nimport type {PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport type {Observable} from 'rxjs';\nimport {filter, isObservable, map, merge, of, Subject, switchMap} from 'rxjs';\n\nimport type {TuiDialogOptions, TuiDialogSize} from './dialog.interfaces';\nimport {TUI_DIALOGS_CLOSE} from './dialog.tokens';\nimport {TuiDialogCloseService} from './dialog-close.service';\n\nconst REQUIRED_ERROR = new Error('Required dialog was dismissed');\n\nfunction toObservable<T>(valueOrStream: Observable<T> | T): Observable<T> {\n return isObservable(valueOrStream) ? valueOrStream : of(valueOrStream);\n}\n\n@Component({\n standalone: true,\n selector: 'tui-dialog',\n imports: [AsyncPipe, NgIf, PolymorpheusOutlet, TuiAutoFocus, TuiButton],\n templateUrl: './dialog.template.html',\n styleUrls: ['./dialog.style.less'],\n // So we don't force OnPush on dialog content\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n providers: [TuiDialogCloseService],\n animations: [tuiSlideInTop, tuiFadeIn],\n host: {\n '[@tuiSlideInTop]': 'slideInTop()',\n '[@tuiFadeIn]': 'slideInTop()',\n '[attr.data-appearance]': 'context.appearance',\n '[attr.data-size]': 'size',\n '[class._centered]': 'header',\n },\n})\nexport class TuiDialogComponent<O, I> {\n private readonly speed = inject(TUI_ANIMATIONS_SPEED);\n\n private readonly animation = {\n value: '',\n params: {\n start: '2.5rem',\n duration: tuiGetDuration(this.speed),\n },\n } as const;\n\n private readonly fullscreenAnimation = {\n value: '',\n params: {\n start: '100vh',\n duration: tuiGetDuration(this.speed),\n },\n } as const;\n\n protected readonly close$ = new Subject<void>();\n protected readonly context = injectContext<TuiPopover<TuiDialogOptions<I>, O>>();\n protected readonly closeWord$ = inject(TUI_CLOSE_WORD);\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly slideInTop = computed(() =>\n this.size === 'fullscreen' || this.size === 'page' || this.isMobile()\n ? this.fullscreenAnimation\n : this.animation,\n );\n\n protected readonly isMobile = toSignal(\n inject(TuiBreakpointService).pipe(map((breakpoint) => breakpoint === 'mobile')),\n );\n\n constructor() {\n merge(\n this.close$.pipe(switchMap(() => toObservable(this.context.closeable))),\n inject(TuiDialogCloseService).pipe(\n switchMap(() => toObservable(this.context.dismissible)),\n ),\n inject(TUI_DIALOGS_CLOSE).pipe(map(TUI_TRUE_HANDLER)),\n )\n .pipe(filter(Boolean), takeUntilDestroyed())\n .subscribe(() => {\n this.close();\n });\n }\n\n protected get size(): TuiDialogSize {\n return this.context.size;\n }\n\n protected get header(): PolymorpheusContent<TuiPopover<TuiDialogOptions<I>, O>> {\n return this.context.header;\n }\n\n private close(): void {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n}\n","<header\n *ngIf=\"header\"\n class=\"t-header\"\n>\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n</header>\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [class.t-heading_closable]=\"context.closeable && !header\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n <div class=\"t-buttons\">\n <button\n size=\"m\"\n tuiAutoFocus\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data?.button || 'OK' }}\n </button>\n </div>\n </ng-container>\n </section>\n</div>\n<div class=\"t-filler\"></div>\n\n<!-- Close button is insensitive to `context.closeable === Observable<false>` by design -->\n<button\n *ngIf=\"context.closeable\"\n automation-id=\"tui-dialog__close\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"isMobile() ? 'icon' : 'neutral'\"\n [iconStart]=\"icons.close\"\n [size]=\"isMobile() ? 'xs' : 's'\"\n [style.border-radius.%]=\"100\"\n (click)=\"close$.next()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n>\n {{ closeWord$ | async }}\n</button>\n","import {inject, Injectable} from '@angular/core';\nimport {TuiPopoverService} from '@taiga-ui/cdk/services';\n\nimport {TuiDialogComponent} from './dialog.component';\nimport type {TuiDialogOptions} from './dialog.interfaces';\nimport {TUI_DIALOG_OPTIONS, TUI_DIALOGS} from './dialog.tokens';\n\n@Injectable({\n providedIn: 'root',\n useFactory: () =>\n new TuiDialogService(TUI_DIALOGS, TuiDialogComponent, inject(TUI_DIALOG_OPTIONS)),\n})\nexport class TuiDialogService extends TuiPopoverService<TuiDialogOptions<any>> {}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport type {TuiDialogOptions} from './dialog.interfaces';\nimport {TuiDialogService} from './dialog.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiDialog]',\n inputs: ['options: tuiDialogOptions', 'open: tuiDialog'],\n outputs: ['openChange: tuiDialogChange'],\n providers: [tuiAsPopover(TuiDialogService)],\n})\nexport class TuiDialog<T> extends TuiPopoverDirective<TuiDialogOptions<T>> {}\n","import type {Injector} from '@angular/core';\nimport {assertInInjectionContext, inject, INJECTOR} from '@angular/core';\nimport {PolymorpheusComponent} from '@taiga-ui/polymorpheus';\nimport type {Observable} from 'rxjs';\n\nimport type {TuiDialogContext, TuiDialogOptions} from './dialog.interfaces';\nimport {TuiDialogService} from './dialog.service';\n\ntype SingleUnionOrNever<T, U = T> = [T] extends [never]\n ? never\n : T extends U\n ? [U] extends [T]\n ? T\n : never\n : never;\n\ntype ReplaceAny<T> = 0 extends T & 1 ? void : T;\n\ntype ContextKeys<T> = {\n [K in keyof T]: ReplaceAny<T[K]> extends TuiDialogContext<any, any> ? K : never;\n}[keyof T];\n\ntype AssertNotMultipleContexts<T, K extends keyof T> = [K] extends [never]\n ? new (...args: any[]) => T\n : [SingleUnionOrNever<K>] extends [never]\n ? 'Component has multiple context. Cannot determine the type...'\n : new (...args: any[]) => T;\n\ntype ExtractDialogData<T, K extends keyof T = ContextKeys<T>> = [K] extends [never]\n ? void\n : [SingleUnionOrNever<K>] extends [never]\n ? never\n : T[K] extends TuiDialogContext<any, infer D>\n ? D\n : void;\n\ntype ExtractDialogResult<T, K extends keyof T = ContextKeys<T>> = [K] extends [never]\n ? void\n : [SingleUnionOrNever<K>] extends [never]\n ? never\n : T[K] extends TuiDialogContext<infer R, any>\n ? R\n : void;\n\ntype Options<T> = Omit<TuiDialogOptions<T>, 'data'> & {injector: Injector};\n\nexport function tuiDialog<\n T,\n K extends ContextKeys<T>,\n D extends ExtractDialogData<T, K>,\n R extends ExtractDialogResult<T, K>,\n>(\n component: AssertNotMultipleContexts<T, K>,\n {injector, ...options}: Partial<Options<D>> = {},\n): (data: D) => Observable<R> {\n if (!injector) {\n assertInInjectionContext(tuiDialog);\n injector = inject(INJECTOR);\n }\n\n const dialogService = injector.get(TuiDialogService);\n\n return (data) =>\n dialogService.open(\n new PolymorpheusComponent(component as new () => T, injector),\n {\n ...options,\n data,\n },\n );\n}\n","import {NgForOf} from '@angular/common';\nimport type {Signal} from '@angular/core';\nimport {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {TuiFocusTrap} from '@taiga-ui/cdk/directives/focus-trap';\nimport type {TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiHost} from '@taiga-ui/core/animations';\nimport {TuiScrollControls, TuiScrollRef} from '@taiga-ui/core/components/scrollbar';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TUI_DIALOGS} from './dialog.tokens';\n\n@Component({\n standalone: true,\n selector: 'tui-dialogs',\n imports: [NgForOf, PolymorpheusOutlet, TuiFocusTrap, TuiScrollControls, TuiScrollRef],\n templateUrl: './dialogs.template.html',\n styleUrls: ['./dialogs.style.less'],\n // So that we do not force OnPush on custom dialogs\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n animations: [tuiHost],\n host: {\n '(keydown.zoneless)': 'el.scrollTop = el.scrollHeight / 2',\n },\n})\nexport class TuiDialogs {\n protected readonly el = tuiInjectElement();\n protected readonly dialogs: Signal<ReadonlyArray<TuiPopover<any, any>>> = toSignal(\n inject(TUI_DIALOGS),\n {initialValue: []},\n );\n}\n","<div\n class=\"t-overlay\"\n [class.t-overlay_visible]=\"dialogs().length\"\n></div>\n<section\n *ngFor=\"let item of dialogs()\"\n aria-modal=\"true\"\n role=\"dialog\"\n tuiFocusTrap\n tuiScrollRef\n class=\"t-dialog\"\n @tuiHost\n [attr.aria-labelledby]=\"item.id\"\n>\n <ng-container *polymorpheusOutlet=\"item.component; context: item\" />\n <tui-scroll-controls class=\"t-scrollbars\" />\n</section>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAQO,MAAM,WAAW,GAAG,cAAc,CACrC,IAAI,eAAe,CAAsC,EAAE,CAAC,EAC9D;AA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sources":["../../../projects/core/components/dialog/dialog.tokens.ts","../../../projects/core/components/dialog/dialog-close.service.ts","../../../projects/core/components/dialog/dialog.component.ts","../../../projects/core/components/dialog/dialog.template.html","../../../projects/core/components/dialog/dialog.service.ts","../../../projects/core/components/dialog/dialog.directive.ts","../../../projects/core/components/dialog/dialog.factory.ts","../../../projects/core/components/dialog/dialogs.component.ts","../../../projects/core/components/dialog/dialogs.template.html","../../../projects/core/components/dialog/taiga-ui-core-components-dialog.ts"],"sourcesContent":["import type {Provider} from '@angular/core';\nimport type {TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport type {Observable} from 'rxjs';\nimport {BehaviorSubject, EMPTY} from 'rxjs';\n\nimport type {TuiDialogOptions} from './dialog.interfaces';\n\nexport const TUI_DIALOGS = tuiCreateToken(\n new BehaviorSubject<ReadonlyArray<TuiPopover<any, any>>>([]),\n);\n\nexport const TUI_DIALOG_DEFAULT_OPTIONS: TuiDialogOptions<void> = {\n appearance: '',\n size: 'm',\n required: false,\n closeable: true,\n dismissible: true,\n label: '',\n header: '',\n data: undefined,\n};\n\n/**\n * A stream to close dialogs\n */\nexport const TUI_DIALOGS_CLOSE = tuiCreateToken<Observable<unknown>>(EMPTY);\n\n/**\n * Default parameters for dialog component\n */\nexport const TUI_DIALOG_OPTIONS = tuiCreateToken(TUI_DIALOG_DEFAULT_OPTIONS);\n\nexport function tuiDialogOptionsProvider(\n options: Partial<TuiDialogOptions<unknown>>,\n): Provider {\n return tuiProvideOptions(TUI_DIALOG_OPTIONS, options, TUI_DIALOG_DEFAULT_OPTIONS);\n}\n","import {DOCUMENT} from '@angular/common';\nimport {inject, Injectable} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {tuiCloseWatcher, tuiTypedFromEvent, tuiZonefull} from '@taiga-ui/cdk/observables';\nimport {\n tuiContainsOrAfter,\n tuiGetActualTarget,\n tuiInjectElement,\n tuiIsElement,\n} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetViewportWidth} from '@taiga-ui/core/utils';\nimport {filter, map, merge, Observable, switchMap, take} from 'rxjs';\n\nconst SCROLLBAR_PLACEHOLDER = 17;\n\n@Injectable()\nexport class TuiDialogCloseService extends Observable<unknown> {\n private readonly win = inject(WA_WINDOW);\n private readonly doc = inject(DOCUMENT);\n private readonly el = tuiInjectElement();\n\n private readonly esc$ = tuiTypedFromEvent(this.doc, 'keydown').pipe(\n filter((event) => {\n const target = tuiGetActualTarget(event);\n\n return (\n // @ts-ignore\n typeof CloseWatcher === 'undefined' &&\n event.key.toLowerCase() === 'escape' &&\n !event.defaultPrevented &&\n (this.el.contains(target) || this.isOutside(target))\n );\n }),\n );\n\n private readonly mousedown$ = tuiTypedFromEvent(this.doc, 'mousedown').pipe(\n filter(\n (event) =>\n tuiGetViewportWidth(this.win) - event.clientX > SCROLLBAR_PLACEHOLDER &&\n this.isOutside(tuiGetActualTarget(event)),\n ),\n switchMap(() =>\n tuiTypedFromEvent(this.doc, 'mouseup').pipe(\n take(1),\n map(tuiGetActualTarget),\n filter((target) => this.isOutside(target)),\n ),\n ),\n );\n\n constructor() {\n super((subscriber) =>\n merge(\n this.esc$,\n this.mousedown$,\n tuiCloseWatcher().pipe(tuiZonefull()),\n ).subscribe(subscriber),\n );\n }\n\n private isOutside(target: EventTarget): boolean {\n return (\n tuiIsElement(target) &&\n (!tuiContainsOrAfter(this.el, target) || target === this.el)\n );\n }\n}\n","import {AsyncPipe, NgIf} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, computed, inject} from '@angular/core';\nimport {takeUntilDestroyed, toSignal} from '@angular/core/rxjs-interop';\nimport {TUI_TRUE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {TuiAutoFocus} from '@taiga-ui/cdk/directives/auto-focus';\nimport type {TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiFadeIn, tuiSlideInTop} from '@taiga-ui/core/animations';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiBreakpointService} from '@taiga-ui/core/services';\nimport {\n TUI_ANIMATIONS_SPEED,\n TUI_CLOSE_WORD,\n TUI_COMMON_ICONS,\n} from '@taiga-ui/core/tokens';\nimport {tuiGetDuration} from '@taiga-ui/core/utils';\nimport type {PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport type {Observable} from 'rxjs';\nimport {\n exhaustMap,\n filter,\n isObservable,\n map,\n merge,\n of,\n Subject,\n switchMap,\n take,\n} from 'rxjs';\n\nimport type {TuiDialogOptions, TuiDialogSize} from './dialog.interfaces';\nimport {TUI_DIALOGS_CLOSE} from './dialog.tokens';\nimport {TuiDialogCloseService} from './dialog-close.service';\n\nconst REQUIRED_ERROR = new Error('Required dialog was dismissed');\n\nfunction toObservable<T>(valueOrStream: Observable<T> | T): Observable<T> {\n return isObservable(valueOrStream) ? valueOrStream : of(valueOrStream);\n}\n\n@Component({\n standalone: true,\n selector: 'tui-dialog',\n imports: [AsyncPipe, NgIf, PolymorpheusOutlet, TuiAutoFocus, TuiButton],\n templateUrl: './dialog.template.html',\n styleUrls: ['./dialog.style.less'],\n // So we don't force OnPush on dialog content\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n providers: [TuiDialogCloseService],\n animations: [tuiSlideInTop, tuiFadeIn],\n host: {\n '[@tuiSlideInTop]': 'slideInTop()',\n '[@tuiFadeIn]': 'slideInTop()',\n '[attr.data-appearance]': 'context.appearance',\n '[attr.data-size]': 'size',\n '[class._centered]': 'header',\n },\n})\nexport class TuiDialogComponent<O, I> {\n private readonly speed = inject(TUI_ANIMATIONS_SPEED);\n\n private readonly animation = {\n value: '',\n params: {\n start: '2.5rem',\n duration: tuiGetDuration(this.speed),\n },\n } as const;\n\n private readonly fullscreenAnimation = {\n value: '',\n params: {\n start: '100vh',\n duration: tuiGetDuration(this.speed),\n },\n } as const;\n\n protected readonly close$ = new Subject<void>();\n protected readonly context = injectContext<TuiPopover<TuiDialogOptions<I>, O>>();\n protected readonly closeWord$ = inject(TUI_CLOSE_WORD);\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly slideInTop = computed(() =>\n this.size === 'fullscreen' || this.size === 'page' || this.isMobile()\n ? this.fullscreenAnimation\n : this.animation,\n );\n\n protected readonly isMobile = toSignal(\n inject(TuiBreakpointService).pipe(map((breakpoint) => breakpoint === 'mobile')),\n );\n\n constructor() {\n merge(\n this.close$.pipe(switchMap(() => toObservable(this.context.closeable))),\n inject(TuiDialogCloseService).pipe(\n exhaustMap(() => toObservable(this.context.dismissible).pipe(take(1))),\n ),\n inject(TUI_DIALOGS_CLOSE).pipe(map(TUI_TRUE_HANDLER)),\n )\n .pipe(filter(Boolean), takeUntilDestroyed())\n .subscribe(() => {\n this.close();\n });\n }\n\n protected get size(): TuiDialogSize {\n return this.context.size;\n }\n\n protected get header(): PolymorpheusContent<TuiPopover<TuiDialogOptions<I>, O>> {\n return this.context.header;\n }\n\n private close(): void {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n}\n","<header\n *ngIf=\"header\"\n class=\"t-header\"\n>\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n</header>\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [class.t-heading_closable]=\"context.closeable && !header\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n <div class=\"t-buttons\">\n <button\n size=\"m\"\n tuiAutoFocus\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data?.button || 'OK' }}\n </button>\n </div>\n </ng-container>\n </section>\n</div>\n<div class=\"t-filler\"></div>\n\n<!-- Close button is insensitive to `context.closeable === Observable<false>` by design -->\n<button\n *ngIf=\"context.closeable\"\n automation-id=\"tui-dialog__close\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"isMobile() ? 'icon' : 'neutral'\"\n [iconStart]=\"icons.close\"\n [size]=\"isMobile() ? 'xs' : 's'\"\n [style.border-radius.%]=\"100\"\n (click)=\"close$.next()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n>\n {{ closeWord$ | async }}\n</button>\n","import {inject, Injectable} from '@angular/core';\nimport {TuiPopoverService} from '@taiga-ui/cdk/services';\n\nimport {TuiDialogComponent} from './dialog.component';\nimport type {TuiDialogOptions} from './dialog.interfaces';\nimport {TUI_DIALOG_OPTIONS, TUI_DIALOGS} from './dialog.tokens';\n\n@Injectable({\n providedIn: 'root',\n useFactory: () =>\n new TuiDialogService(TUI_DIALOGS, TuiDialogComponent, inject(TUI_DIALOG_OPTIONS)),\n})\nexport class TuiDialogService extends TuiPopoverService<TuiDialogOptions<any>> {}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport type {TuiDialogOptions} from './dialog.interfaces';\nimport {TuiDialogService} from './dialog.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiDialog]',\n inputs: ['options: tuiDialogOptions', 'open: tuiDialog'],\n outputs: ['openChange: tuiDialogChange'],\n providers: [tuiAsPopover(TuiDialogService)],\n})\nexport class TuiDialog<T> extends TuiPopoverDirective<TuiDialogOptions<T>> {}\n","import type {Injector} from '@angular/core';\nimport {assertInInjectionContext, inject, INJECTOR} from '@angular/core';\nimport {PolymorpheusComponent} from '@taiga-ui/polymorpheus';\nimport type {Observable} from 'rxjs';\n\nimport type {TuiDialogContext, TuiDialogOptions} from './dialog.interfaces';\nimport {TuiDialogService} from './dialog.service';\n\ntype SingleUnionOrNever<T, U = T> = [T] extends [never]\n ? never\n : T extends U\n ? [U] extends [T]\n ? T\n : never\n : never;\n\ntype ReplaceAny<T> = 0 extends T & 1 ? void : T;\n\ntype ContextKeys<T> = {\n [K in keyof T]: ReplaceAny<T[K]> extends TuiDialogContext<any, any> ? K : never;\n}[keyof T];\n\ntype AssertNotMultipleContexts<T, K extends keyof T> = [K] extends [never]\n ? new (...args: any[]) => T\n : [SingleUnionOrNever<K>] extends [never]\n ? 'Component has multiple context. Cannot determine the type...'\n : new (...args: any[]) => T;\n\ntype ExtractDialogData<T, K extends keyof T = ContextKeys<T>> = [K] extends [never]\n ? void\n : [SingleUnionOrNever<K>] extends [never]\n ? never\n : T[K] extends TuiDialogContext<any, infer D>\n ? D\n : void;\n\ntype ExtractDialogResult<T, K extends keyof T = ContextKeys<T>> = [K] extends [never]\n ? void\n : [SingleUnionOrNever<K>] extends [never]\n ? never\n : T[K] extends TuiDialogContext<infer R, any>\n ? R\n : void;\n\ntype Options<T> = Omit<TuiDialogOptions<T>, 'data'> & {injector: Injector};\n\nexport function tuiDialog<\n T,\n K extends ContextKeys<T>,\n D extends ExtractDialogData<T, K>,\n R extends ExtractDialogResult<T, K>,\n>(\n component: AssertNotMultipleContexts<T, K>,\n {injector, ...options}: Partial<Options<D>> = {},\n): (data: D) => Observable<R> {\n if (!injector) {\n assertInInjectionContext(tuiDialog);\n injector = inject(INJECTOR);\n }\n\n const dialogService = injector.get(TuiDialogService);\n\n return (data) =>\n dialogService.open(\n new PolymorpheusComponent(component as new () => T, injector),\n {\n ...options,\n data,\n },\n );\n}\n","import {NgForOf} from '@angular/common';\nimport type {Signal} from '@angular/core';\nimport {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {TuiFocusTrap} from '@taiga-ui/cdk/directives/focus-trap';\nimport type {TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiHost} from '@taiga-ui/core/animations';\nimport {TuiScrollControls, TuiScrollRef} from '@taiga-ui/core/components/scrollbar';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TUI_DIALOGS} from './dialog.tokens';\n\n@Component({\n standalone: true,\n selector: 'tui-dialogs',\n imports: [NgForOf, PolymorpheusOutlet, TuiFocusTrap, TuiScrollControls, TuiScrollRef],\n templateUrl: './dialogs.template.html',\n styleUrls: ['./dialogs.style.less'],\n // So that we do not force OnPush on custom dialogs\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n animations: [tuiHost],\n host: {\n '(keydown.zoneless)': 'el.scrollTop = el.scrollHeight / 2',\n },\n})\nexport class TuiDialogs {\n protected readonly el = tuiInjectElement();\n protected readonly dialogs: Signal<ReadonlyArray<TuiPopover<any, any>>> = toSignal(\n inject(TUI_DIALOGS),\n {initialValue: []},\n );\n}\n","<div\n class=\"t-overlay\"\n [class.t-overlay_visible]=\"dialogs().length\"\n></div>\n<section\n *ngFor=\"let item of dialogs()\"\n aria-modal=\"true\"\n role=\"dialog\"\n tuiFocusTrap\n tuiScrollRef\n class=\"t-dialog\"\n @tuiHost\n [attr.aria-labelledby]=\"item.id\"\n>\n <ng-container *polymorpheusOutlet=\"item.component; context: item\" />\n <tui-scroll-controls class=\"t-scrollbars\" />\n</section>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAQO,MAAM,WAAW,GAAG,cAAc,CACrC,IAAI,eAAe,CAAsC,EAAE,CAAC,EAC9D;AAEW,MAAA,0BAA0B,GAA2B;AAC9D,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,IAAI,EAAE,SAAS;EACjB;AAEF;;AAEG;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A,EAAA,oCAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,6bAiBA,EDDc,MAAA,EAAA,CAAA,05CAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,OAAO,mHAAE,kBAAkB,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,EAAA,2BAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,YAAY,EAAA,QAAA,EAAA,gBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,iBAAiB,EAAE,QAAA,EAAA,qBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,YAAY,EAMxE,QAAA,EAAA,gBAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAC,OAAO,CAAC,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,OAAA,EAAA,CAAA,CAAA,EAAA;;4FAKZ,UAAU,EAAA,UAAA,EAAA,CAAA;kBAdtB,SAAS;iCACM,IAAI,EAAA,QAAA,EACN,aAAa,EACd,OAAA,EAAA,CAAC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,iBAAiB,EAAE,YAAY,CAAC,mBAKpE,uBAAuB,CAAC,OAAO,EACpC,UAAA,EAAA,CAAC,OAAO,CAAC,EACf,IAAA,EAAA;AACF,wBAAA,oBAAoB,EAAE,oCAAoC;AAC7D,qBAAA,EAAA,QAAA,EAAA,6bAAA,EAAA,MAAA,EAAA,CAAA,05CAAA,CAAA,EAAA,CAAA;;;AEzBL;;AAEG;;;;"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { DOCUMENT } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { inject, signal, EventEmitter, ElementRef, Component, ChangeDetectionStrategy, ViewChild, Output, Input } from '@angular/core';
|
|
4
|
+
import { TuiRoot } from '@taiga-ui/core/components/root';
|
|
5
|
+
|
|
6
|
+
class TuiFullscreen {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.doc = inject(DOCUMENT);
|
|
9
|
+
this.open = signal(false);
|
|
10
|
+
this.opened = new EventEmitter();
|
|
11
|
+
this.options = { navigationUI: 'auto' };
|
|
12
|
+
}
|
|
13
|
+
set fullscreen(open) {
|
|
14
|
+
if (this.open() === open) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (open) {
|
|
18
|
+
this.root?.nativeElement
|
|
19
|
+
.requestFullscreen(this.options)
|
|
20
|
+
.then(() => this.fullscreenState(open));
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
this.doc
|
|
24
|
+
.exitFullscreen()
|
|
25
|
+
.then(() => this.fullscreenState(open))
|
|
26
|
+
.catch((error) => console.error('Failed to exit fullscreen:', error));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
closedByEscape(event) {
|
|
30
|
+
const escaped = !this.doc.fullscreenElement && event.target === this.root?.nativeElement;
|
|
31
|
+
if (escaped) {
|
|
32
|
+
this.fullscreenState(false);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
fullscreenState(open) {
|
|
36
|
+
this.open.set(open);
|
|
37
|
+
this.opened.emit(open);
|
|
38
|
+
}
|
|
39
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiFullscreen, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
40
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiFullscreen, isStandalone: true, selector: "[tuiFullscreen]", inputs: { options: ["tuiFullscreenOptions", "options"], fullscreen: ["tuiFullscreen", "fullscreen"] }, outputs: { opened: "tuiFullscreenChange" }, host: { listeners: { "document:fullscreenchange": "closedByEscape($event)" } }, viewQueries: [{ propertyName: "root", first: true, predicate: TuiRoot, descendants: true, read: ElementRef }], ngImport: i0, template: '<tui-root><ng-content /></tui-root>', isInline: true, dependencies: [{ kind: "component", type: TuiRoot, selector: "tui-root" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
41
|
+
}
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiFullscreen, decorators: [{
|
|
43
|
+
type: Component,
|
|
44
|
+
args: [{
|
|
45
|
+
standalone: true,
|
|
46
|
+
selector: '[tuiFullscreen]',
|
|
47
|
+
imports: [TuiRoot],
|
|
48
|
+
template: '<tui-root><ng-content /></tui-root>',
|
|
49
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
50
|
+
host: {
|
|
51
|
+
'(document:fullscreenchange)': 'closedByEscape($event)',
|
|
52
|
+
},
|
|
53
|
+
}]
|
|
54
|
+
}], propDecorators: { root: [{
|
|
55
|
+
type: ViewChild,
|
|
56
|
+
args: [TuiRoot, { read: ElementRef }]
|
|
57
|
+
}], opened: [{
|
|
58
|
+
type: Output,
|
|
59
|
+
args: ['tuiFullscreenChange']
|
|
60
|
+
}], options: [{
|
|
61
|
+
type: Input,
|
|
62
|
+
args: ['tuiFullscreenOptions']
|
|
63
|
+
}], fullscreen: [{
|
|
64
|
+
type: Input,
|
|
65
|
+
args: ['tuiFullscreen']
|
|
66
|
+
}] } });
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Generated bundle index. Do not edit.
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
export { TuiFullscreen };
|
|
73
|
+
//# sourceMappingURL=taiga-ui-core-components-fullscreen.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-fullscreen.mjs","sources":["../../../projects/core/components/fullscreen/fullscreen.component.ts","../../../projects/core/components/fullscreen/taiga-ui-core-components-fullscreen.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n Output,\n signal,\n ViewChild,\n} from '@angular/core';\nimport {TuiRoot} from '@taiga-ui/core/components/root';\n\n@Component({\n standalone: true,\n selector: '[tuiFullscreen]',\n imports: [TuiRoot],\n template: '<tui-root><ng-content /></tui-root>',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(document:fullscreenchange)': 'closedByEscape($event)',\n },\n})\nexport class TuiFullscreen {\n @ViewChild(TuiRoot, {read: ElementRef})\n private readonly root?: ElementRef<HTMLElement>;\n\n private readonly doc = inject(DOCUMENT);\n protected readonly open = signal(false);\n\n @Output('tuiFullscreenChange')\n public readonly opened = new EventEmitter<boolean>();\n\n @Input('tuiFullscreenOptions')\n public options?: FullscreenOptions = {navigationUI: 'auto'};\n\n @Input('tuiFullscreen')\n public set fullscreen(open: boolean) {\n if (this.open() === open) {\n return;\n }\n\n if (open) {\n this.root?.nativeElement\n .requestFullscreen(this.options)\n .then(() => this.fullscreenState(open));\n } else {\n this.doc\n .exitFullscreen()\n .then(() => this.fullscreenState(open))\n .catch((error: unknown) =>\n console.error('Failed to exit fullscreen:', error),\n );\n }\n }\n\n protected closedByEscape(event: Event): void {\n const escaped =\n !this.doc.fullscreenElement && event.target === this.root?.nativeElement;\n\n if (escaped) {\n this.fullscreenState(false);\n }\n }\n\n private fullscreenState(open: boolean): void {\n this.open.set(open);\n this.opened.emit(open);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAcA,MAUa,aAAa,CAAA;AAV1B,IAAA,WAAA,GAAA;AAcqB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AACrB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAGxB,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,YAAY,EAAW,CAAC;AAG9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A,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,aAAa,oVACX,OAAO,EAAA,WAAA,EAAA,IAAA,EAAA,IAAA,EAAS,UAAU,EAP3B,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,qCAAqC,4DADrC,OAAO,EAAA,QAAA,EAAA,UAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;4FAOR,aAAa,EAAA,UAAA,EAAA,CAAA;kBAVzB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,iBAAiB;oBAC3B,OAAO,EAAE,CAAC,OAAO,CAAC;AAClB,oBAAA,QAAQ,EAAE,qCAAqC;oBAC/C,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACF,wBAAA,6BAA6B,EAAE,wBAAwB;AAC1D,qBAAA;AACJ,iBAAA,CAAA;8BAGoB,IAAI,EAAA,CAAA;sBADpB,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,OAAO,EAAE,EAAC,IAAI,EAAE,UAAU,EAAC,CAAA;gBAOtB,MAAM,EAAA,CAAA;sBADrB,MAAM;uBAAC,qBAAqB,CAAA;gBAItB,OAAO,EAAA,CAAA;sBADb,KAAK;uBAAC,sBAAsB,CAAA;gBAIlB,UAAU,EAAA,CAAA;sBADpB,KAAK;uBAAC,eAAe,CAAA;;;ACrC1B;;AAEG;;;;"}
|
|
@@ -17,13 +17,13 @@ function tuiLinkOptionsProvider(options) {
|
|
|
17
17
|
|
|
18
18
|
class TuiLinkStyles {
|
|
19
19
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiLinkStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
20
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiLinkStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-link" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiLink]{--tui-text-tertiary: var(--tui-text-secondary);padding:0;background:transparent;border:none;cursor:pointer;font:inherit;color:inherit;-webkit-text-decoration:none dashed currentColor;text-decoration:none dashed currentColor;text-underline-offset:.2em;text-decoration-thickness:.7px;text-decoration-color:color-mix(in lch,currentColor,transparent)}[tuiLink]:hover{--tui-text-secondary: var(--tui-text-primary)}[tuiLink]:before{margin-inline-end:.25rem}[tuiLink]:after{margin-inline-start:.25rem}[tuiLink][tuiIcons]:before,[tuiLink][tuiIcons]:after{content:\"\\2060\";padding:calc(var(--tui-icon-size, 1rem) / 2);vertical-align:super;font-size:0;line-height:0;box-sizing:border-box}[tuiLink]:focus-visible:not([data-focus=false]){outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}[tuiLink][data-focus=true]{outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}[tuiLink][tuiWrapper]:not(._focused):has(:focus-visible),[tuiLink][tuiWrapper]._focused{outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
20
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiLinkStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-link" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiLink]{--tui-text-tertiary: var(--tui-text-secondary);padding:0;background:transparent;border:none;cursor:pointer;font:inherit;color:inherit;-webkit-text-decoration:none dashed currentColor;text-decoration:none dashed currentColor;text-underline-offset:.2em;text-decoration-thickness:.7px;text-decoration-color:color-mix(in lch,currentColor,transparent)}@media (hover: hover) and (pointer: fine){[tuiLink]:hover{--tui-text-secondary: var(--tui-text-primary)}}[tuiLink]:before{margin-inline-end:.25rem}[tuiLink]:after{margin-inline-start:.25rem}[tuiLink][tuiIcons]:before,[tuiLink][tuiIcons]:after{content:\"\\2060\";padding:calc(var(--tui-icon-size, 1rem) / 2);vertical-align:super;font-size:0;line-height:0;box-sizing:border-box}[tuiLink]:focus-visible:not([data-focus=false]){outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}[tuiLink][data-focus=true]{outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}[tuiLink][tuiWrapper]:not(._focused):has(:focus-visible),[tuiLink][tuiWrapper]._focused{outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}@media (hover: hover) and (pointer: fine){[tuiLink][data-appearance=\"\"]:hover{opacity:.7}}[tuiLink][data-appearance=\"\"]:active{opacity:.7}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
21
21
|
}
|
|
22
22
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiLinkStyles, decorators: [{
|
|
23
23
|
type: Component,
|
|
24
24
|
args: [{ standalone: true, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
25
25
|
class: 'tui-link',
|
|
26
|
-
}, styles: ["[tuiLink]{--tui-text-tertiary: var(--tui-text-secondary);padding:0;background:transparent;border:none;cursor:pointer;font:inherit;color:inherit;-webkit-text-decoration:none dashed currentColor;text-decoration:none dashed currentColor;text-underline-offset:.2em;text-decoration-thickness:.7px;text-decoration-color:color-mix(in lch,currentColor,transparent)}[tuiLink]:hover{--tui-text-secondary: var(--tui-text-primary)}[tuiLink]:before{margin-inline-end:.25rem}[tuiLink]:after{margin-inline-start:.25rem}[tuiLink][tuiIcons]:before,[tuiLink][tuiIcons]:after{content:\"\\2060\";padding:calc(var(--tui-icon-size, 1rem) / 2);vertical-align:super;font-size:0;line-height:0;box-sizing:border-box}[tuiLink]:focus-visible:not([data-focus=false]){outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}[tuiLink][data-focus=true]{outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}[tuiLink][tuiWrapper]:not(._focused):has(:focus-visible),[tuiLink][tuiWrapper]._focused{outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}\n"] }]
|
|
26
|
+
}, styles: ["[tuiLink]{--tui-text-tertiary: var(--tui-text-secondary);padding:0;background:transparent;border:none;cursor:pointer;font:inherit;color:inherit;-webkit-text-decoration:none dashed currentColor;text-decoration:none dashed currentColor;text-underline-offset:.2em;text-decoration-thickness:.7px;text-decoration-color:color-mix(in lch,currentColor,transparent)}@media (hover: hover) and (pointer: fine){[tuiLink]:hover{--tui-text-secondary: var(--tui-text-primary)}}[tuiLink]:before{margin-inline-end:.25rem}[tuiLink]:after{margin-inline-start:.25rem}[tuiLink][tuiIcons]:before,[tuiLink][tuiIcons]:after{content:\"\\2060\";padding:calc(var(--tui-icon-size, 1rem) / 2);vertical-align:super;font-size:0;line-height:0;box-sizing:border-box}[tuiLink]:focus-visible:not([data-focus=false]){outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}[tuiLink][data-focus=true]{outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}[tuiLink][tuiWrapper]:not(._focused):has(:focus-visible),[tuiLink][tuiWrapper]._focused{outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}@media (hover: hover) and (pointer: fine){[tuiLink][data-appearance=\"\"]:hover{opacity:.7}}[tuiLink][data-appearance=\"\"]:active{opacity:.7}\n"] }]
|
|
27
27
|
}] });
|
|
28
28
|
class TuiLink {
|
|
29
29
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-link.mjs","sources":["../../../projects/core/components/link/link.options.ts","../../../projects/core/components/link/link.directive.ts","../../../projects/core/components/link/taiga-ui-core-components-link.ts"],"sourcesContent":["import type {FactoryProvider} from '@angular/core';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport type {TuiAppearanceOptions} from '@taiga-ui/core/directives/appearance';\n\nexport interface TuiLinkOptions extends TuiAppearanceOptions {\n readonly pseudo: boolean;\n}\n\nexport const TUI_LINK_DEFAULT_OPTIONS: TuiLinkOptions = {\n appearance: 'action',\n pseudo: false,\n};\n\nexport const TUI_LINK_OPTIONS = tuiCreateToken(TUI_LINK_DEFAULT_OPTIONS);\n\nexport function tuiLinkOptionsProvider(\n options: Partial<TuiLinkOptions>,\n): FactoryProvider {\n return tuiProvideOptions(TUI_LINK_OPTIONS, options, TUI_LINK_DEFAULT_OPTIONS);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n tuiAppearanceOptionsProvider,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiWithIcons} from '@taiga-ui/core/directives/icons';\n\nimport {TUI_LINK_OPTIONS} from './link.options';\n\n@Component({\n standalone: true,\n template: '',\n styles: ['@import \"@taiga-ui/core/styles/components/link.less\";'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-link',\n },\n})\nclass TuiLinkStyles {}\n\n@Directive({\n standalone: true,\n selector: 'a[tuiLink], button[tuiLink]',\n providers: [tuiAppearanceOptionsProvider(TUI_LINK_OPTIONS)],\n hostDirectives: [TuiWithAppearance, TuiWithIcons],\n host: {\n tuiLink: '',\n '[style.text-decoration-line]': 'pseudo ? \"underline\" : null',\n },\n})\nexport class TuiLink {\n protected readonly nothing = tuiWithStyles(TuiLinkStyles);\n\n @Input()\n public pseudo = inject(TUI_LINK_OPTIONS).pseudo;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAQa,MAAA,wBAAwB,GAAmB;AACpD,IAAA,UAAU,EAAE,QAAQ;AACpB,IAAA,MAAM,EAAE,KAAK;EACf;MAEW,gBAAgB,GAAG,cAAc,CAAC,wBAAwB,EAAE;AAEnE,SAAU,sBAAsB,CAClC,OAAgC,EAAA;IAEhC,OAAO,iBAAiB,CAAC,gBAAgB,EAAE,OAAO,EAAE,wBAAwB,CAAC,CAAC;AAClF;;ACFA,MAUM,aAAa,CAAA;+GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,aAAa,8GARL,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-link.mjs","sources":["../../../projects/core/components/link/link.options.ts","../../../projects/core/components/link/link.directive.ts","../../../projects/core/components/link/taiga-ui-core-components-link.ts"],"sourcesContent":["import type {FactoryProvider} from '@angular/core';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport type {TuiAppearanceOptions} from '@taiga-ui/core/directives/appearance';\n\nexport interface TuiLinkOptions extends TuiAppearanceOptions {\n readonly pseudo: boolean;\n}\n\nexport const TUI_LINK_DEFAULT_OPTIONS: TuiLinkOptions = {\n appearance: 'action',\n pseudo: false,\n};\n\nexport const TUI_LINK_OPTIONS = tuiCreateToken(TUI_LINK_DEFAULT_OPTIONS);\n\nexport function tuiLinkOptionsProvider(\n options: Partial<TuiLinkOptions>,\n): FactoryProvider {\n return tuiProvideOptions(TUI_LINK_OPTIONS, options, TUI_LINK_DEFAULT_OPTIONS);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n tuiAppearanceOptionsProvider,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiWithIcons} from '@taiga-ui/core/directives/icons';\n\nimport {TUI_LINK_OPTIONS} from './link.options';\n\n@Component({\n standalone: true,\n template: '',\n styles: ['@import \"@taiga-ui/core/styles/components/link.less\";'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-link',\n },\n})\nclass TuiLinkStyles {}\n\n@Directive({\n standalone: true,\n selector: 'a[tuiLink], button[tuiLink]',\n providers: [tuiAppearanceOptionsProvider(TUI_LINK_OPTIONS)],\n hostDirectives: [TuiWithAppearance, TuiWithIcons],\n host: {\n tuiLink: '',\n '[style.text-decoration-line]': 'pseudo ? \"underline\" : null',\n },\n})\nexport class TuiLink {\n protected readonly nothing = tuiWithStyles(TuiLinkStyles);\n\n @Input()\n public pseudo = inject(TUI_LINK_OPTIONS).pseudo;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAQa,MAAA,wBAAwB,GAAmB;AACpD,IAAA,UAAU,EAAE,QAAQ;AACpB,IAAA,MAAM,EAAE,KAAK;EACf;MAEW,gBAAgB,GAAG,cAAc,CAAC,wBAAwB,EAAE;AAEnE,SAAU,sBAAsB,CAClC,OAAgC,EAAA;IAEhC,OAAO,iBAAiB,CAAC,gBAAgB,EAAE,OAAO,EAAE,wBAAwB,CAAC,CAAC;AAClF;;ACFA,M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gB,CAAC,CAAC,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAOlD,OAAO,EAAA,UAAA,EAAA,CAAA;kBAVnB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,6BAA6B;AACvC,oBAAA,SAAS,EAAE,CAAC,4BAA4B,CAAC,gBAAgB,CAAC,CAAC;AAC3D,oBAAA,cAAc,EAAE,CAAC,iBAAiB,EAAE,YAAY,CAAC;AACjD,oBAAA,IAAI,EAAE;AACF,wBAAA,OAAO,EAAE,EAAE;AACX,wBAAA,8BAA8B,EAAE,6BAA6B;AAChE,qBAAA;AACJ,iBAAA,CAAA;8BAKU,MAAM,EAAA,CAAA;sBADZ,KAAK;;;AC1CV;;AAEG;;;;"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { DOCUMENT, NgIf } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
|
|
3
|
+
import { inject, signal, Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
|
|
4
4
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
5
5
|
import { EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';
|
|
6
|
-
import { TuiPortals, tuiAsPortal } from '@taiga-ui/cdk/classes';
|
|
7
6
|
import { TUI_VERSION } from '@taiga-ui/cdk/constants';
|
|
8
7
|
import * as i3 from '@taiga-ui/cdk/directives/font-size';
|
|
9
8
|
import { TuiFontSize } from '@taiga-ui/cdk/directives/font-size';
|
|
@@ -13,12 +12,13 @@ import * as i2 from '@taiga-ui/cdk/directives/visual-viewport';
|
|
|
13
12
|
import { TuiVisualViewport } from '@taiga-ui/cdk/directives/visual-viewport';
|
|
14
13
|
import { tuiWatch } from '@taiga-ui/cdk/observables';
|
|
15
14
|
import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
|
|
15
|
+
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
16
16
|
import { TuiAlerts } from '@taiga-ui/core/components/alert';
|
|
17
17
|
import { TuiDialogs } from '@taiga-ui/core/components/dialog';
|
|
18
18
|
import { TUI_SCROLLBAR_OPTIONS, TuiScrollControls } from '@taiga-ui/core/components/scrollbar';
|
|
19
19
|
import { TuiDropdowns } from '@taiga-ui/core/directives/dropdown';
|
|
20
20
|
import { TuiHints } from '@taiga-ui/core/directives/hint';
|
|
21
|
-
import {
|
|
21
|
+
import { TuiPopups } from '@taiga-ui/core/directives/popup';
|
|
22
22
|
import { TuiBreakpointService } from '@taiga-ui/core/services';
|
|
23
23
|
import { TUI_REDUCED_MOTION, TUI_ANIMATIONS_SPEED, TUI_THEME } from '@taiga-ui/core/tokens';
|
|
24
24
|
import { tuiGetDuration } from '@taiga-ui/core/utils';
|
|
@@ -27,34 +27,54 @@ import { map } from 'rxjs';
|
|
|
27
27
|
|
|
28
28
|
/// <reference types="@taiga-ui/tsconfig/ng-dev-mode" />
|
|
29
29
|
/// <reference types="@taiga-ui/tsconfig/ng-dev-mode" />
|
|
30
|
-
class TuiRoot
|
|
30
|
+
class TuiRoot {
|
|
31
31
|
constructor() {
|
|
32
|
-
|
|
32
|
+
this.doc = inject(DOCUMENT);
|
|
33
|
+
this.el = tuiInjectElement();
|
|
33
34
|
this.reducedMotion = inject(TUI_REDUCED_MOTION);
|
|
34
35
|
this.duration = tuiGetDuration(inject(TUI_ANIMATIONS_SPEED));
|
|
36
|
+
this.isChildRoot = !!inject(TuiRoot, { optional: true, skipSelf: true });
|
|
37
|
+
this.top = signal(!this.isChildRoot);
|
|
35
38
|
this.isMobileRes = toSignal(inject(TuiBreakpointService).pipe(map((breakpoint) => breakpoint === 'mobile'), tuiWatch()), { initialValue: false });
|
|
36
39
|
this.nativeScrollbar = inject(TUI_SCROLLBAR_OPTIONS).mode === 'native';
|
|
37
|
-
this.scrollbars = !this.nativeScrollbar && !inject(TUI_IS_MOBILE);
|
|
38
|
-
|
|
40
|
+
this.scrollbars = !this.nativeScrollbar && !inject(TUI_IS_MOBILE) && !this.isChildRoot;
|
|
41
|
+
if (!this.top()) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
this.doc.documentElement.setAttribute('data-tui-theme', inject(TUI_THEME).toLowerCase());
|
|
39
45
|
if (!this.nativeScrollbar) {
|
|
40
|
-
|
|
46
|
+
this.doc.defaultView?.document.documentElement.classList.add('tui-zero-scrollbar');
|
|
41
47
|
}
|
|
42
48
|
ngDevMode &&
|
|
43
49
|
console.assert(!!inject(EVENT_MANAGER_PLUGINS).find((plugin) => plugin instanceof PreventEventPlugin), 'NG_EVENT_PLUGINS is missing from global providers');
|
|
44
50
|
}
|
|
51
|
+
get isTopLayer() {
|
|
52
|
+
return this.doc.fullscreenElement
|
|
53
|
+
? this.doc.fullscreenElement === this.el
|
|
54
|
+
: !this.isChildRoot;
|
|
55
|
+
}
|
|
45
56
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiRoot, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
46
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiRoot, isStandalone: true, selector: "tui-root", host: { attributes: { "data-tui-version": "4.
|
|
57
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiRoot, isStandalone: true, selector: "tui-root", host: { attributes: { "data-tui-version": "4.32.0" }, listeners: { "touchstart.passive.zoneless": "0", "document:fullscreenchange": "top.set(isTopLayer)" }, properties: { "style.--tui-duration.ms": "duration", "style.--tui-scroll-behavior": "reducedMotion ? \"auto\" : \"smooth\"", "class._mobile": "isMobileRes()" } }, hostDirectives: [{ directive: i1.TuiPlatform }, { directive: i2.TuiVisualViewport }, { directive: i3.TuiFontSize }], ngImport: i0, template: "<div class=\"t-root-content\"><ng-content /></div>\n<ng-container *ngIf=\"top()\">\n <tui-scroll-controls\n *ngIf=\"scrollbars\"\n class=\"t-root-scrollbar\"\n />\n <tui-popups />\n <ng-content select=\"tuiOverContent\" />\n <tui-dialogs />\n <ng-content select=\"tuiOverDialogs\" />\n <tui-alerts />\n <ng-content select=\"tuiOverAlerts\" />\n <tui-dropdowns />\n <ng-content select=\"tuiOverDropdowns\" />\n <tui-hints />\n <ng-content select=\"tuiOverHints\" />\n</ng-container>\n", styles: ["@keyframes tuiPresent{to{content:\"\"}}@keyframes tuiSkeletonVibe{to{opacity:.5}}.tui-zero-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.tui-zero-scrollbar::-webkit-scrollbar,.tui-zero-scrollbar::-webkit-scrollbar-thumb{display:none}body,input{margin:0}tui-root{position:relative;display:block;font:var(--tui-font-text-s);color:var(--tui-text-primary);flex:1;border-image:conic-gradient(var(--tui-background-base) 0 0) fill 0/0/0 0 100vh 0;-webkit-tap-highlight-color:transparent}tui-root>.t-root-scrollbar{position:fixed;top:0;left:0;bottom:0;right:0;z-index:0;display:none;margin:0}[data-tui-theme] tui-root>.t-root-scrollbar{display:block}.t-root-content{position:relative;top:var(--t-root-top);block-size:100%;isolation:isolate}.t-root-content>*{--t-root-top: 0}[tuiDropdownButton][tuiDropdownButton]{display:none}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TuiAlerts, selector: "tui-alerts" }, { kind: "component", type: TuiDialogs, selector: "tui-dialogs" }, { kind: "component", type: TuiDropdowns, selector: "tui-dropdowns" }, { kind: "component", type: TuiHints, selector: "tui-hints" }, { kind: "component", type: TuiPopups, selector: "tui-popups" }, { kind: "component", type: TuiScrollControls, selector: "tui-scroll-controls" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
|
47
58
|
}
|
|
48
59
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiRoot, decorators: [{
|
|
49
60
|
type: Component,
|
|
50
|
-
args: [{ standalone: true, selector: 'tui-root', imports: [
|
|
61
|
+
args: [{ standalone: true, selector: 'tui-root', imports: [
|
|
62
|
+
NgIf,
|
|
63
|
+
TuiAlerts,
|
|
64
|
+
TuiDialogs,
|
|
65
|
+
TuiDropdowns,
|
|
66
|
+
TuiHints,
|
|
67
|
+
TuiPopups,
|
|
68
|
+
TuiScrollControls,
|
|
69
|
+
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, hostDirectives: [TuiPlatform, TuiVisualViewport, TuiFontSize], host: {
|
|
51
70
|
'data-tui-version': TUI_VERSION,
|
|
52
71
|
'[style.--tui-duration.ms]': 'duration',
|
|
53
72
|
'[style.--tui-scroll-behavior]': 'reducedMotion ? "auto" : "smooth"',
|
|
54
73
|
'[class._mobile]': 'isMobileRes()',
|
|
55
74
|
// Required for the :active state to work in Safari. https://stackoverflow.com/a/33681490
|
|
56
75
|
'(touchstart.passive.zoneless)': '0',
|
|
57
|
-
|
|
76
|
+
'(document:fullscreenchange)': 'top.set(isTopLayer)',
|
|
77
|
+
}, template: "<div class=\"t-root-content\"><ng-content /></div>\n<ng-container *ngIf=\"top()\">\n <tui-scroll-controls\n *ngIf=\"scrollbars\"\n class=\"t-root-scrollbar\"\n />\n <tui-popups />\n <ng-content select=\"tuiOverContent\" />\n <tui-dialogs />\n <ng-content select=\"tuiOverDialogs\" />\n <tui-alerts />\n <ng-content select=\"tuiOverAlerts\" />\n <tui-dropdowns />\n <ng-content select=\"tuiOverDropdowns\" />\n <tui-hints />\n <ng-content select=\"tuiOverHints\" />\n</ng-container>\n", styles: ["@keyframes tuiPresent{to{content:\"\"}}@keyframes tuiSkeletonVibe{to{opacity:.5}}.tui-zero-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.tui-zero-scrollbar::-webkit-scrollbar,.tui-zero-scrollbar::-webkit-scrollbar-thumb{display:none}body,input{margin:0}tui-root{position:relative;display:block;font:var(--tui-font-text-s);color:var(--tui-text-primary);flex:1;border-image:conic-gradient(var(--tui-background-base) 0 0) fill 0/0/0 0 100vh 0;-webkit-tap-highlight-color:transparent}tui-root>.t-root-scrollbar{position:fixed;top:0;left:0;bottom:0;right:0;z-index:0;display:none;margin:0}[data-tui-theme] tui-root>.t-root-scrollbar{display:block}.t-root-content{position:relative;top:var(--t-root-top);block-size:100%;isolation:isolate}.t-root-content>*{--t-root-top: 0}[tuiDropdownButton][tuiDropdownButton]{display:none}\n"] }]
|
|
58
78
|
}], ctorParameters: function () { return []; } });
|
|
59
79
|
|
|
60
80
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-root.mjs","sources":["../../../projects/core/components/root/root.component.ts","../../../projects/core/components/root/root.template.html","../../../projects/core/components/root/taiga-ui-core-components-root.ts"],"sourcesContent":["/// <reference types=\"@taiga-ui/tsconfig/ng-dev-mode\" />\nimport {DOCUMENT, NgIf} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {EVENT_MANAGER_PLUGINS} from '@angular/platform-browser';\nimport {
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-root.mjs","sources":["../../../projects/core/components/root/root.component.ts","../../../projects/core/components/root/root.template.html","../../../projects/core/components/root/taiga-ui-core-components-root.ts"],"sourcesContent":["/// <reference types=\"@taiga-ui/tsconfig/ng-dev-mode\" />\nimport {DOCUMENT, NgIf} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {EVENT_MANAGER_PLUGINS} from '@angular/platform-browser';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {TuiFontSize} from '@taiga-ui/cdk/directives/font-size';\nimport {TuiPlatform} from '@taiga-ui/cdk/directives/platform';\nimport {TuiVisualViewport} from '@taiga-ui/cdk/directives/visual-viewport';\nimport {tuiWatch} from '@taiga-ui/cdk/observables';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiAlerts} from '@taiga-ui/core/components/alert';\nimport {TuiDialogs} from '@taiga-ui/core/components/dialog';\nimport {\n TUI_SCROLLBAR_OPTIONS,\n TuiScrollControls,\n} from '@taiga-ui/core/components/scrollbar';\nimport {TuiDropdowns} from '@taiga-ui/core/directives/dropdown';\nimport {TuiHints} from '@taiga-ui/core/directives/hint';\nimport {TuiPopups} from '@taiga-ui/core/directives/popup';\nimport {TuiBreakpointService} from '@taiga-ui/core/services';\nimport {TUI_ANIMATIONS_SPEED, TUI_REDUCED_MOTION, TUI_THEME} from '@taiga-ui/core/tokens';\nimport {tuiGetDuration} from '@taiga-ui/core/utils';\nimport {PreventEventPlugin} from '@taiga-ui/event-plugins';\nimport {map} from 'rxjs';\n\n@Component({\n standalone: true,\n selector: 'tui-root',\n imports: [\n NgIf,\n TuiAlerts,\n TuiDialogs,\n TuiDropdowns,\n TuiHints,\n TuiPopups,\n TuiScrollControls,\n ],\n templateUrl: './root.template.html',\n styleUrls: ['./root.style.less'],\n encapsulation: ViewEncapsulation.None,\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n hostDirectives: [TuiPlatform, TuiVisualViewport, TuiFontSize],\n host: {\n 'data-tui-version': TUI_VERSION,\n '[style.--tui-duration.ms]': 'duration',\n '[style.--tui-scroll-behavior]': 'reducedMotion ? \"auto\" : \"smooth\"',\n '[class._mobile]': 'isMobileRes()',\n // Required for the :active state to work in Safari. https://stackoverflow.com/a/33681490\n '(touchstart.passive.zoneless)': '0',\n '(document:fullscreenchange)': 'top.set(isTopLayer)',\n },\n})\nexport class TuiRoot {\n private readonly doc = inject(DOCUMENT);\n private readonly el = tuiInjectElement();\n protected readonly reducedMotion = inject(TUI_REDUCED_MOTION);\n protected readonly duration = tuiGetDuration(inject(TUI_ANIMATIONS_SPEED));\n protected readonly isChildRoot = !!inject(TuiRoot, {optional: true, skipSelf: true});\n protected readonly top = signal(!this.isChildRoot);\n protected readonly isMobileRes = toSignal(\n inject(TuiBreakpointService).pipe(\n map((breakpoint) => breakpoint === 'mobile'),\n tuiWatch(),\n ),\n {initialValue: false},\n );\n\n protected readonly nativeScrollbar = inject(TUI_SCROLLBAR_OPTIONS).mode === 'native';\n\n protected readonly scrollbars =\n !this.nativeScrollbar && !inject(TUI_IS_MOBILE) && !this.isChildRoot;\n\n constructor() {\n if (!this.top()) {\n return;\n }\n\n this.doc.documentElement.setAttribute(\n 'data-tui-theme',\n inject(TUI_THEME).toLowerCase(),\n );\n\n if (!this.nativeScrollbar) {\n this.doc.defaultView?.document.documentElement.classList.add(\n 'tui-zero-scrollbar',\n );\n }\n\n ngDevMode &&\n console.assert(\n !!inject<unknown[]>(EVENT_MANAGER_PLUGINS).find(\n (plugin) => plugin instanceof PreventEventPlugin,\n ),\n 'NG_EVENT_PLUGINS is missing from global providers',\n );\n }\n\n protected get isTopLayer(): boolean {\n return this.doc.fullscreenElement\n ? this.doc.fullscreenElement === this.el\n : !this.isChildRoot;\n }\n}\n","<div class=\"t-root-content\"><ng-content /></div>\n<ng-container *ngIf=\"top()\">\n <tui-scroll-controls\n *ngIf=\"scrollbars\"\n class=\"t-root-scrollbar\"\n />\n <tui-popups />\n <ng-content select=\"tuiOverContent\" />\n <tui-dialogs />\n <ng-content select=\"tuiOverDialogs\" />\n <tui-alerts />\n <ng-content select=\"tuiOverAlerts\" />\n <tui-dropdowns />\n <ng-content select=\"tuiOverDropdowns\" />\n <tui-hints />\n <ng-content select=\"tuiOverHints\" />\n</ng-container>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAiCA,MA4Ba,OAAO,CAAA;AAoBhB,IAAA,WAAA,GAAA;AAnBiB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE,CAAC;AACtB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAC3C,IAAQ,CAAA,QAAA,GAAG,cAAc,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC;AACxD,QAAA,IAAA,CAAA,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC;QAClE,IAAG,CAAA,GAAA,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAChC,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CACrC,MAAM,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAC7B,GAAG,CAAC,CAAC,UAAU,KAAK,UAAU,KAAK,QAAQ,CAAC,EAC5C,QAAQ,EAAE,CACb,EACD,EAAC,YAAY,EAAE,KAAK,EAAC,CACxB,CAAC;QAEiB,IAAe,CAAA,eAAA,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC;AAElE,QAAA,IAAA,CAAA,UAAU,GACzB,CAAC,IAAI,CAAC,eAAe,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;AAGrE,QAAA,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE;YACb,OAAO;AACV,S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BAAkB,EAAE,WAAW;AAC/B,wBAAA,2BAA2B,EAAE,UAAU;AACvC,wBAAA,+BAA+B,EAAE,mCAAmC;AACpE,wBAAA,iBAAiB,EAAE,eAAe;;AAElC,wBAAA,+BAA+B,EAAE,GAAG;AACpC,wBAAA,6BAA6B,EAAE,qBAAqB;AACvD,qBAAA,EAAA,QAAA,EAAA,uhBAAA,EAAA,MAAA,EAAA,CAAA,g0BAAA,CAAA,EAAA,CAAA;;;AE3DL;;AAEG;;;;"}
|
|
@@ -32,7 +32,7 @@ class TuiSelectLike {
|
|
|
32
32
|
element.value = '';
|
|
33
33
|
}
|
|
34
34
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSelectLike, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
35
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiSelectLike, isStandalone: true, host: { attributes: { "inputmode": "none" }, listeners: { "beforeinput": "$event.inputType.includes(\"delete\") || $event.preventDefault()", "input.capture": "$event.inputType?.includes(\"delete\") && clear($event.target)" } }, ngImport: i0 }); }
|
|
35
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiSelectLike, isStandalone: true, host: { attributes: { "inputmode": "none" }, listeners: { "beforeinput": "$event.inputType.includes(\"delete\") || $event.preventDefault()", "input.capture": "$event.inputType?.includes(\"delete\") && clear($event.target)" }, properties: { "style.cursor": "\"pointer\"" } }, ngImport: i0 }); }
|
|
36
36
|
}
|
|
37
37
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSelectLike, decorators: [{
|
|
38
38
|
type: Directive,
|
|
@@ -40,6 +40,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
40
40
|
standalone: true,
|
|
41
41
|
host: {
|
|
42
42
|
inputmode: 'none',
|
|
43
|
+
'[style.cursor]': '"pointer"',
|
|
43
44
|
// Click on cleaner icon does not trigger `beforeinput` event --> handle all kind of deletion in input event
|
|
44
45
|
'(beforeinput)': '$event.inputType.includes("delete") || $event.preventDefault()',
|
|
45
46
|
'(input.capture)': '$event.inputType?.includes("delete") && clear($event.target)',
|
|
@@ -198,7 +199,7 @@ class TuiTextfieldComponent {
|
|
|
198
199
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiTextfieldComponent, isStandalone: true, selector: "tui-textfield", inputs: { stringify: "stringify", content: "content", fillerSetter: ["filler", "fillerSetter"] }, host: { properties: { "attr.data-size": "options.size()", "class._with-label": "hasLabel", "class._with-template": "content", "class._disabled": "input?.nativeElement.disabled" } }, providers: [
|
|
199
200
|
tuiButtonOptionsProvider({ size: 'xs', appearance: 'icon' }),
|
|
200
201
|
tuiAsDataListHost(TuiTextfieldComponent),
|
|
201
|
-
], queries: [{ propertyName: "label", first: true, predicate: i0.forwardRef(function () { return TuiLabel; }), descendants: true, read: ElementRef }, { propertyName: "control", first: true, predicate: NgControl, descendants: true }, { propertyName: "directive", first: true, predicate: i0.forwardRef(function () { return TuiTextfieldDirective; }), descendants: true, static: true }, { propertyName: "input", first: true, predicate: i0.forwardRef(function () { return TuiTextfieldDirective; }), descendants: true, read: ElementRef, static: true }, { propertyName: "auxiliaryQuery", predicate: TUI_AUXILIARY, descendants: true }], viewQueries: [{ propertyName: "vcr", first: true, predicate: ["vcr"], descendants: true, read: ViewContainerRef, static: true }], hostDirectives: [{ directive: i1.TuiDropdownFixed }, { 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)=\"input?.nativeElement?.focus()\"\n (waResizeObserver)=\"$event[0] && onResize($event[0])\"\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.zoneless.prevent)=\"input?.nativeElement?.focus()\"\n >\n {{ clear() }}\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);--t-padding: var(--tui-padding-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(--t-padding);border-radius:var(--tui-radius-l);font:var(--tui-font-text-m);box-sizing:border-box;gap:.25rem}tui-textfield[style*=\"--t-icon-start:\"]{--t-left: 2.25rem}tui-textfield[style*=\"--t-icon-end:\"]{--t-right: 2.25rem}tui-textfield input,tui-textfield select{font:var(--tui-font-text-m)}tui-textfield input[inputmode=none],tui-textfield select[inputmode=none]{caret-color:transparent}tui-textfield[data-size=s]{--t-height: var(--tui-height-s);--t-padding: var(--tui-padding-s);border-radius:var(--tui-radius-m);gap:0;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{margin-inline-end:-.325rem}tui-textfield[data-size=m]{--t-height: var(--tui-height-m);--t-padding: 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 .125rem 0 -.125rem}tui-textfield[data-size=m]:after{margin:0 -.125rem 0 .25rem}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:.5rem}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:first-of-type,tui-textfield:has(label:not(:empty)) select:defined{padding-top:calc(var(--t-height) / 3)}tui-textfield:has(label:not(:empty)) .t-template::placeholder,tui-textfield:has(label:not(:empty)) input:first-of-type::placeholder,tui-textfield:has(label:not(:empty)) select:defined::placeholder,tui-textfield:has(label:not(:empty)) .t-template._empty,tui-textfield:has(label:not(:empty)) input:first-of-type._empty,tui-textfield:has(label:not(:empty)) select:defined._empty{color:transparent}tui-textfield._with-label .t-template,tui-textfield._with-label input:first-of-type,tui-textfield._with-label select:defined{padding-top:calc(var(--t-height) / 3)}tui-textfield._with-label .t-template::placeholder,tui-textfield._with-label input:first-of-type::placeholder,tui-textfield._with-label select:defined::placeholder,tui-textfield._with-label .t-template._empty,tui-textfield._with-label input:first-of-type._empty,tui-textfield._with-label select:defined._empty{color:transparent}tui-textfield .t-template,tui-textfield input:defined,tui-textfield select:defined{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;-webkit-appearance:none;appearance:none;box-sizing:border-box;border-radius:inherit;padding:inherit;border:none;text-indent:var(--t-left, 0);padding-inline-end:calc(var(--t-right, 0rem) + var(--t-side) + var(--t-padding))}tui-textfield .t-template{display:flex;align-items:center;color:var(--tui-text-primary)}tui-textfield._with-template input:first-of-type,tui-textfield._with-template select{color:transparent!important}tui-textfield input:first-of-type,tui-textfield select:defined{pointer-events:auto;background:transparent}tui-textfield input:first-of-type:read-only~.t-filler,tui-textfield select:defined:read-only~.t-filler{display:none}tui-textfield input:first-of-type:disabled~label,tui-textfield select:defined:disabled~label,tui-textfield input:first-of-type:disabled~.t-content,tui-textfield select:defined:disabled~.t-content{opacity:var(--tui-disabled-opacity)}tui-textfield input:first-of-type:disabled~label>tui-icon,tui-textfield select:defined:disabled~label>tui-icon,tui-textfield input:first-of-type:disabled~.t-content>tui-icon,tui-textfield select:defined:disabled~.t-content>tui-icon{display:none}tui-textfield input:first-of-type:-webkit-autofill~label,tui-textfield select:defined:-webkit-autofill~label,tui-textfield input:first-of-type: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:first-of-type:-webkit-autofill:not(:disabled)[data-mode~=invalid]~label,tui-textfield select:defined:-webkit-autofill:not(:disabled)[data-mode~=invalid]~label,tui-textfield input:first-of-type: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:first-of-type:-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:first-of-type: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:first-of-type:-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:first-of-type: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:first-of-type: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:first-of-type: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{color:var(--tui-text-tertiary)}tui-textfield input:first-of-type: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:first-of-type:not([data-mode~=readonly])[data-focus=true]::placeholder,tui-textfield select:defined:not([data-mode~=readonly])[data-focus=true]::placeholder,tui-textfield input:first-of-type:not([data-mode~=readonly])[data-focus=true]._empty,tui-textfield select:defined:not([data-mode~=readonly])[data-focus=true]._empty{color:var(--tui-text-tertiary)}tui-textfield input:first-of-type: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)}tui-textfield input:first-of-type:not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)::placeholder,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)::placeholder,tui-textfield input:first-of-type:not([data-mode~=readonly])[tuiWrapper]._focused::placeholder,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]._focused::placeholder,tui-textfield input:first-of-type:not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)._empty,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)._empty,tui-textfield input:first-of-type:not([data-mode~=readonly])[tuiWrapper]._focused._empty,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]._focused._empty{color:var(--tui-text-tertiary)}tui-textfield input:first-of-type:not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)~label,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)~label,tui-textfield input:first-of-type:not([data-mode~=readonly])[tuiWrapper]._focused~label,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]._focused~label{color:var(--tui-text-primary)!important;font-size:.83em;transform:translateY(-.7em)}@supports (-webkit-touch-callout: none){tui-textfield input:first-of-type._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:inherit;margin-inline-start:auto;isolation:isolate;border-radius:inherit}tui-textfield .t-content>tui-icon{pointer-events:auto}tui-textfield .t-clear{z-index:1;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 }); }
|
|
202
|
+
], queries: [{ propertyName: "label", first: true, predicate: i0.forwardRef(function () { return TuiLabel; }), descendants: true, read: ElementRef }, { propertyName: "control", first: true, predicate: NgControl, descendants: true }, { propertyName: "directive", first: true, predicate: i0.forwardRef(function () { return TuiTextfieldDirective; }), descendants: true, static: true }, { propertyName: "input", first: true, predicate: i0.forwardRef(function () { return TuiTextfieldDirective; }), descendants: true, read: ElementRef, static: true }, { propertyName: "auxiliaryQuery", predicate: TUI_AUXILIARY, descendants: true }], viewQueries: [{ propertyName: "vcr", first: true, predicate: ["vcr"], descendants: true, read: ViewContainerRef, static: true }], hostDirectives: [{ directive: i1.TuiDropdownFixed }, { 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)=\"input?.nativeElement?.focus()\"\n (waResizeObserver)=\"$event[0] && onResize($event[0])\"\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.zoneless.prevent)=\"input?.nativeElement?.focus()\"\n >\n {{ clear() }}\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);--t-padding: var(--tui-padding-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(--t-padding);border-radius:var(--tui-radius-l);font:var(--tui-font-text-m);box-sizing:border-box;gap:.25rem}tui-textfield[style*=\"--t-icon-start:\"]{--t-left: 2.25rem}tui-textfield[style*=\"--t-icon-end:\"]{--t-right: 2.25rem}tui-textfield input,tui-textfield select{font:var(--tui-font-text-m)}tui-textfield input[inputmode=none],tui-textfield select[inputmode=none]{caret-color:transparent}tui-textfield[data-size=s]{--t-height: var(--tui-height-s);--t-padding: var(--tui-padding-s);border-radius:var(--tui-radius-m);gap:0;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{margin-inline-end:-.325rem}tui-textfield[data-size=m]{--t-height: var(--tui-height-m);--t-padding: 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 .125rem 0 -.125rem}tui-textfield[data-size=m]:after{margin:0 -.125rem 0 .25rem}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:.5rem}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:not([type=range]),tui-textfield:has(label:not(:empty)) select:defined{padding-top:calc(var(--t-height) / 3)}tui-textfield:has(label:not(:empty)) .t-template::placeholder,tui-textfield:has(label:not(:empty)) input:not([type=range])::placeholder,tui-textfield:has(label:not(:empty)) select:defined::placeholder,tui-textfield:has(label:not(:empty)) .t-template._empty,tui-textfield:has(label:not(:empty)) input:not([type=range])._empty,tui-textfield:has(label:not(:empty)) select:defined._empty{color:transparent}tui-textfield._with-label .t-template,tui-textfield._with-label input:not([type=range]),tui-textfield._with-label select:defined{padding-top:calc(var(--t-height) / 3)}tui-textfield._with-label .t-template::placeholder,tui-textfield._with-label input:not([type=range])::placeholder,tui-textfield._with-label select:defined::placeholder,tui-textfield._with-label .t-template._empty,tui-textfield._with-label input:not([type=range])._empty,tui-textfield._with-label select:defined._empty{color:transparent}tui-textfield .t-template,tui-textfield input:defined,tui-textfield select:defined{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;-webkit-appearance:none;appearance:none;box-sizing:border-box;border-radius:inherit;border:none;padding-inline-start:calc(var(--t-left, 0rem) + var(--t-padding));padding-inline-end:calc(var(--t-right, 0rem) + var(--t-side) + var(--t-padding))}tui-textfield .t-template{display:flex;align-items:center;color:var(--tui-text-primary)}tui-textfield._with-template input:not([type=range]),tui-textfield._with-template select{color:transparent!important}tui-textfield input:not([type=range]),tui-textfield select:defined{pointer-events:auto;background:transparent}tui-textfield input:not([type=range]):read-only~.t-filler,tui-textfield select:defined:read-only~.t-filler{display:none}tui-textfield input:not([type=range]):disabled~label,tui-textfield select:defined:disabled~label,tui-textfield input:not([type=range]):disabled~.t-content,tui-textfield select:defined:disabled~.t-content{opacity:var(--tui-disabled-opacity)}tui-textfield input:not([type=range]):disabled~label>tui-icon,tui-textfield select:defined:disabled~label>tui-icon,tui-textfield input:not([type=range]):disabled~.t-content>tui-icon,tui-textfield select:defined:disabled~.t-content>tui-icon{display:none}tui-textfield input:not([type=range]):-webkit-autofill~label,tui-textfield select:defined:-webkit-autofill~label,tui-textfield input:not([type=range]):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:not([type=range]):-webkit-autofill:not(:disabled)[data-mode~=invalid]~label,tui-textfield select:defined:-webkit-autofill:not(:disabled)[data-mode~=invalid]~label,tui-textfield input:not([type=range]):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:not([type=range]):-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:not([type=range]):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:not([type=range]):-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:not([type=range]):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:not([type=range]):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:not([type=range]):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{color:var(--tui-text-tertiary)}tui-textfield input:not([type=range]):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:not([type=range]):not([data-mode~=readonly])[data-focus=true]::placeholder,tui-textfield select:defined:not([data-mode~=readonly])[data-focus=true]::placeholder,tui-textfield input:not([type=range]):not([data-mode~=readonly])[data-focus=true]._empty,tui-textfield select:defined:not([data-mode~=readonly])[data-focus=true]._empty{color:var(--tui-text-tertiary)}tui-textfield input:not([type=range]):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)}tui-textfield input:not([type=range]):not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)::placeholder,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)::placeholder,tui-textfield input:not([type=range]):not([data-mode~=readonly])[tuiWrapper]._focused::placeholder,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]._focused::placeholder,tui-textfield input:not([type=range]):not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)._empty,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)._empty,tui-textfield input:not([type=range]):not([data-mode~=readonly])[tuiWrapper]._focused._empty,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]._focused._empty{color:var(--tui-text-tertiary)}tui-textfield input:not([type=range]):not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)~label,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)~label,tui-textfield input:not([type=range]):not([data-mode~=readonly])[tuiWrapper]._focused~label,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]._focused~label{color:var(--tui-text-primary)!important;font-size:.83em;transform:translateY(-.7em)}@supports (-webkit-touch-callout: none){tui-textfield input:not([type=range])._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:inherit;margin-inline-start:auto;isolation:isolate;border-radius:inherit}tui-textfield .t-content>tui-icon{pointer-events:auto}tui-textfield .t-clear{z-index:1;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 }); }
|
|
202
203
|
}
|
|
203
204
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiTextfieldComponent, decorators: [{
|
|
204
205
|
type: Component,
|
|
@@ -216,7 +217,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
216
217
|
'[class._with-label]': 'hasLabel',
|
|
217
218
|
'[class._with-template]': 'content',
|
|
218
219
|
'[class._disabled]': 'input?.nativeElement.disabled',
|
|
219
|
-
}, template: "<ng-content select=\"input\" />\n<ng-content select=\"select\" />\n<ng-content select=\"label\" />\n<span\n class=\"t-content\"\n (mousedown.prevent)=\"input?.nativeElement?.focus()\"\n (waResizeObserver)=\"$event[0] && onResize($event[0])\"\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.zoneless.prevent)=\"input?.nativeElement?.focus()\"\n >\n {{ clear() }}\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);--t-padding: var(--tui-padding-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(--t-padding);border-radius:var(--tui-radius-l);font:var(--tui-font-text-m);box-sizing:border-box;gap:.25rem}tui-textfield[style*=\"--t-icon-start:\"]{--t-left: 2.25rem}tui-textfield[style*=\"--t-icon-end:\"]{--t-right: 2.25rem}tui-textfield input,tui-textfield select{font:var(--tui-font-text-m)}tui-textfield input[inputmode=none],tui-textfield select[inputmode=none]{caret-color:transparent}tui-textfield[data-size=s]{--t-height: var(--tui-height-s);--t-padding: var(--tui-padding-s);border-radius:var(--tui-radius-m);gap:0;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{margin-inline-end:-.325rem}tui-textfield[data-size=m]{--t-height: var(--tui-height-m);--t-padding: 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 .125rem 0 -.125rem}tui-textfield[data-size=m]:after{margin:0 -.125rem 0 .25rem}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:.5rem}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:first-of-type,tui-textfield:has(label:not(:empty)) select:defined{padding-top:calc(var(--t-height) / 3)}tui-textfield:has(label:not(:empty)) .t-template::placeholder,tui-textfield:has(label:not(:empty)) input:first-of-type::placeholder,tui-textfield:has(label:not(:empty)) select:defined::placeholder,tui-textfield:has(label:not(:empty)) .t-template._empty,tui-textfield:has(label:not(:empty)) input:first-of-type._empty,tui-textfield:has(label:not(:empty)) select:defined._empty{color:transparent}tui-textfield._with-label .t-template,tui-textfield._with-label input:first-of-type,tui-textfield._with-label select:defined{padding-top:calc(var(--t-height) / 3)}tui-textfield._with-label .t-template::placeholder,tui-textfield._with-label input:first-of-type::placeholder,tui-textfield._with-label select:defined::placeholder,tui-textfield._with-label .t-template._empty,tui-textfield._with-label input:first-of-type._empty,tui-textfield._with-label select:defined._empty{color:transparent}tui-textfield .t-template,tui-textfield input:defined,tui-textfield select:defined{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;-webkit-appearance:none;appearance:none;box-sizing:border-box;border-radius:inherit;padding:inherit;border:none;text-indent:var(--t-left, 0);padding-inline-end:calc(var(--t-right, 0rem) + var(--t-side) + var(--t-padding))}tui-textfield .t-template{display:flex;align-items:center;color:var(--tui-text-primary)}tui-textfield._with-template input:first-of-type,tui-textfield._with-template select{color:transparent!important}tui-textfield input:first-of-type,tui-textfield select:defined{pointer-events:auto;background:transparent}tui-textfield input:first-of-type:read-only~.t-filler,tui-textfield select:defined:read-only~.t-filler{display:none}tui-textfield input:first-of-type:disabled~label,tui-textfield select:defined:disabled~label,tui-textfield input:first-of-type:disabled~.t-content,tui-textfield select:defined:disabled~.t-content{opacity:var(--tui-disabled-opacity)}tui-textfield input:first-of-type:disabled~label>tui-icon,tui-textfield select:defined:disabled~label>tui-icon,tui-textfield input:first-of-type:disabled~.t-content>tui-icon,tui-textfield select:defined:disabled~.t-content>tui-icon{display:none}tui-textfield input:first-of-type:-webkit-autofill~label,tui-textfield select:defined:-webkit-autofill~label,tui-textfield input:first-of-type: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:first-of-type:-webkit-autofill:not(:disabled)[data-mode~=invalid]~label,tui-textfield select:defined:-webkit-autofill:not(:disabled)[data-mode~=invalid]~label,tui-textfield input:first-of-type: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:first-of-type:-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:first-of-type: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:first-of-type:-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:first-of-type: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:first-of-type: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:first-of-type: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{color:var(--tui-text-tertiary)}tui-textfield input:first-of-type: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:first-of-type:not([data-mode~=readonly])[data-focus=true]::placeholder,tui-textfield select:defined:not([data-mode~=readonly])[data-focus=true]::placeholder,tui-textfield input:first-of-type:not([data-mode~=readonly])[data-focus=true]._empty,tui-textfield select:defined:not([data-mode~=readonly])[data-focus=true]._empty{color:var(--tui-text-tertiary)}tui-textfield input:first-of-type: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)}tui-textfield input:first-of-type:not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)::placeholder,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)::placeholder,tui-textfield input:first-of-type:not([data-mode~=readonly])[tuiWrapper]._focused::placeholder,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]._focused::placeholder,tui-textfield input:first-of-type:not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)._empty,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)._empty,tui-textfield input:first-of-type:not([data-mode~=readonly])[tuiWrapper]._focused._empty,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]._focused._empty{color:var(--tui-text-tertiary)}tui-textfield input:first-of-type:not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)~label,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)~label,tui-textfield input:first-of-type:not([data-mode~=readonly])[tuiWrapper]._focused~label,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]._focused~label{color:var(--tui-text-primary)!important;font-size:.83em;transform:translateY(-.7em)}@supports (-webkit-touch-callout: none){tui-textfield input:first-of-type._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:inherit;margin-inline-start:auto;isolation:isolate;border-radius:inherit}tui-textfield .t-content>tui-icon{pointer-events:auto}tui-textfield .t-clear{z-index:1;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"] }]
|
|
220
|
+
}, template: "<ng-content select=\"input\" />\n<ng-content select=\"select\" />\n<ng-content select=\"label\" />\n<span\n class=\"t-content\"\n (mousedown.prevent)=\"input?.nativeElement?.focus()\"\n (waResizeObserver)=\"$event[0] && onResize($event[0])\"\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.zoneless.prevent)=\"input?.nativeElement?.focus()\"\n >\n {{ clear() }}\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);--t-padding: var(--tui-padding-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(--t-padding);border-radius:var(--tui-radius-l);font:var(--tui-font-text-m);box-sizing:border-box;gap:.25rem}tui-textfield[style*=\"--t-icon-start:\"]{--t-left: 2.25rem}tui-textfield[style*=\"--t-icon-end:\"]{--t-right: 2.25rem}tui-textfield input,tui-textfield select{font:var(--tui-font-text-m)}tui-textfield input[inputmode=none],tui-textfield select[inputmode=none]{caret-color:transparent}tui-textfield[data-size=s]{--t-height: var(--tui-height-s);--t-padding: var(--tui-padding-s);border-radius:var(--tui-radius-m);gap:0;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{margin-inline-end:-.325rem}tui-textfield[data-size=m]{--t-height: var(--tui-height-m);--t-padding: 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 .125rem 0 -.125rem}tui-textfield[data-size=m]:after{margin:0 -.125rem 0 .25rem}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:.5rem}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:not([type=range]),tui-textfield:has(label:not(:empty)) select:defined{padding-top:calc(var(--t-height) / 3)}tui-textfield:has(label:not(:empty)) .t-template::placeholder,tui-textfield:has(label:not(:empty)) input:not([type=range])::placeholder,tui-textfield:has(label:not(:empty)) select:defined::placeholder,tui-textfield:has(label:not(:empty)) .t-template._empty,tui-textfield:has(label:not(:empty)) input:not([type=range])._empty,tui-textfield:has(label:not(:empty)) select:defined._empty{color:transparent}tui-textfield._with-label .t-template,tui-textfield._with-label input:not([type=range]),tui-textfield._with-label select:defined{padding-top:calc(var(--t-height) / 3)}tui-textfield._with-label .t-template::placeholder,tui-textfield._with-label input:not([type=range])::placeholder,tui-textfield._with-label select:defined::placeholder,tui-textfield._with-label .t-template._empty,tui-textfield._with-label input:not([type=range])._empty,tui-textfield._with-label select:defined._empty{color:transparent}tui-textfield .t-template,tui-textfield input:defined,tui-textfield select:defined{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;-webkit-appearance:none;appearance:none;box-sizing:border-box;border-radius:inherit;border:none;padding-inline-start:calc(var(--t-left, 0rem) + var(--t-padding));padding-inline-end:calc(var(--t-right, 0rem) + var(--t-side) + var(--t-padding))}tui-textfield .t-template{display:flex;align-items:center;color:var(--tui-text-primary)}tui-textfield._with-template input:not([type=range]),tui-textfield._with-template select{color:transparent!important}tui-textfield input:not([type=range]),tui-textfield select:defined{pointer-events:auto;background:transparent}tui-textfield input:not([type=range]):read-only~.t-filler,tui-textfield select:defined:read-only~.t-filler{display:none}tui-textfield input:not([type=range]):disabled~label,tui-textfield select:defined:disabled~label,tui-textfield input:not([type=range]):disabled~.t-content,tui-textfield select:defined:disabled~.t-content{opacity:var(--tui-disabled-opacity)}tui-textfield input:not([type=range]):disabled~label>tui-icon,tui-textfield select:defined:disabled~label>tui-icon,tui-textfield input:not([type=range]):disabled~.t-content>tui-icon,tui-textfield select:defined:disabled~.t-content>tui-icon{display:none}tui-textfield input:not([type=range]):-webkit-autofill~label,tui-textfield select:defined:-webkit-autofill~label,tui-textfield input:not([type=range]):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:not([type=range]):-webkit-autofill:not(:disabled)[data-mode~=invalid]~label,tui-textfield select:defined:-webkit-autofill:not(:disabled)[data-mode~=invalid]~label,tui-textfield input:not([type=range]):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:not([type=range]):-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:not([type=range]):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:not([type=range]):-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:not([type=range]):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:not([type=range]):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:not([type=range]):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{color:var(--tui-text-tertiary)}tui-textfield input:not([type=range]):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:not([type=range]):not([data-mode~=readonly])[data-focus=true]::placeholder,tui-textfield select:defined:not([data-mode~=readonly])[data-focus=true]::placeholder,tui-textfield input:not([type=range]):not([data-mode~=readonly])[data-focus=true]._empty,tui-textfield select:defined:not([data-mode~=readonly])[data-focus=true]._empty{color:var(--tui-text-tertiary)}tui-textfield input:not([type=range]):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)}tui-textfield input:not([type=range]):not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)::placeholder,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)::placeholder,tui-textfield input:not([type=range]):not([data-mode~=readonly])[tuiWrapper]._focused::placeholder,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]._focused::placeholder,tui-textfield input:not([type=range]):not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)._empty,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)._empty,tui-textfield input:not([type=range]):not([data-mode~=readonly])[tuiWrapper]._focused._empty,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]._focused._empty{color:var(--tui-text-tertiary)}tui-textfield input:not([type=range]):not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)~label,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]:not(._focused):has(:focus-visible)~label,tui-textfield input:not([type=range]):not([data-mode~=readonly])[tuiWrapper]._focused~label,tui-textfield select:defined:not([data-mode~=readonly])[tuiWrapper]._focused~label{color:var(--tui-text-primary)!important;font-size:.83em;transform:translateY(-.7em)}@supports (-webkit-touch-callout: none){tui-textfield input:not([type=range])._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:inherit;margin-inline-start:auto;isolation:isolate;border-radius:inherit}tui-textfield .t-content>tui-icon{pointer-events:auto}tui-textfield .t-clear{z-index:1;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"] }]
|
|
220
221
|
}], propDecorators: { label: [{
|
|
221
222
|
type: ContentChild,
|
|
222
223
|
args: [forwardRef(() => TuiLabel), { read: ElementRef }]
|