-
Notifications
You must be signed in to change notification settings - Fork 481
/
Copy path22915.8186fb31e1d3f118.js
1 lines (1 loc) · 1.71 KB
/
22915.8186fb31e1d3f118.js
1
(self.webpackChunkdemo=self.webpackChunkdemo||[]).push([[22915],{22915:n=>{n.exports="import {NgForOf} from '@angular/common';\nimport {ChangeDetectionStrategy, Component} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {changeDetection} from '@demo/emulate/change-detection';\nimport {encapsulation} from '@demo/emulate/encapsulation';\nimport {tuiInjectElement, TuiPortals} from '@taiga-ui/cdk';\nimport type {TuiHintDirection, TuiRectAccessor} from '@taiga-ui/core';\nimport {tuiAsViewport, TuiButton, TuiHint, TuiLink} from '@taiga-ui/core';\nimport {TuiSegmented} from '@taiga-ui/kit';\n\n@Component({\n standalone: true,\n exportAs: \"Example3\",\n selector: 'portal-host',\n template: `\n <ng-content></ng-content>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiAsViewport(PortalHost)],\n})\nclass PortalHost extends TuiPortals implements TuiRectAccessor {\n private readonly el = tuiInjectElement();\n\n public readonly type = 'viewport';\n\n public getClientRect(): DOMRect {\n return this.el.getBoundingClientRect();\n }\n}\n\n@Component({\n standalone: true,\n imports: [\n FormsModule,\n NgForOf,\n PortalHost,\n TuiButton,\n TuiHint,\n TuiLink,\n TuiSegmented,\n ],\n templateUrl: './index.html',\n styleUrls: ['../1/index.less'],\n encapsulation,\n changeDetection,\n})\nexport default class Example {\n protected hintShown = false;\n\n protected directions: TuiHintDirection[] = ['top', 'left', 'right', 'bottom'];\n\n protected selected = this.directions[0]!;\n\n protected toggleHint(): void {\n this.hintShown = !this.hintShown;\n }\n}\n"}}]);