@taiga-ui/kit
Version:
Taiga UI Angular main components kit
42 lines (38 loc) • 5.74 kB
JavaScript
import * as i0 from '@angular/core';
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Directive, Input } from '@angular/core';
import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
class TuiCommentStyles {
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiCommentStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiCommentStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-comment" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiComment]{position:relative;display:inline-flex;font:var(--tui-font-text-m);color:#fff;padding:.5rem .75rem;border-radius:1rem;line-height:1rem;background:var(--tui-background-accent-2);align-items:center;justify-content:center}[tuiComment]:before{content:\"\";position:absolute;bottom:100%;left:50%;inline-size:1.5625rem;block-size:.5625rem;background:inherit;transform:translate(-50%);-webkit-mask:url(\"data:image/svg+xml,%3Csvg width='25' height='9' viewBox='0 0 25 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.23309 6.67813L7.56191 3.83178C9.4546 1.5185 10.4009 0.361853 11.5998 0.10488C12.0834 0.00123882 12.5834 0.00123882 13.0669 0.10488C14.2658 0.361853 15.2121 1.5185 17.1048 3.83178L19.4337 6.67813C20.636 8.14771 22.4346 9 24.3334 9H0.333374C2.23217 9 4.0307 8.14772 5.23309 6.67813Z' fill='black'/%3E%3C/svg%3E%0A\") no-repeat;mask:url(\"data:image/svg+xml,%3Csvg width='25' height='9' viewBox='0 0 25 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.23309 6.67813L7.56191 3.83178C9.4546 1.5185 10.4009 0.361853 11.5998 0.10488C12.0834 0.00123882 12.5834 0.00123882 13.0669 0.10488C14.2658 0.361853 15.2121 1.5185 17.1048 3.83178L19.4337 6.67813C20.636 8.14771 22.4346 9 24.3334 9H0.333374C2.23217 9 4.0307 8.14772 5.23309 6.67813Z' fill='black'/%3E%3C/svg%3E%0A\") no-repeat}[tuiComment][data-direction=bottom]:before{top:100%;bottom:auto;transform:translate(-50%) rotate(180deg)}[tuiComment][data-direction=left]:before{left:auto;top:50%;right:100%;transform:translate(.785rem,-50%) rotate(-90deg)}[tuiComment][data-direction=right]:before{top:50%;left:100%;transform:translate(-.785rem,-50%) rotate(90deg)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiCommentStyles, decorators: [{
type: Component,
args: [{ standalone: true, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
class: 'tui-comment',
}, styles: ["[tuiComment]{position:relative;display:inline-flex;font:var(--tui-font-text-m);color:#fff;padding:.5rem .75rem;border-radius:1rem;line-height:1rem;background:var(--tui-background-accent-2);align-items:center;justify-content:center}[tuiComment]:before{content:\"\";position:absolute;bottom:100%;left:50%;inline-size:1.5625rem;block-size:.5625rem;background:inherit;transform:translate(-50%);-webkit-mask:url(\"data:image/svg+xml,%3Csvg width='25' height='9' viewBox='0 0 25 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.23309 6.67813L7.56191 3.83178C9.4546 1.5185 10.4009 0.361853 11.5998 0.10488C12.0834 0.00123882 12.5834 0.00123882 13.0669 0.10488C14.2658 0.361853 15.2121 1.5185 17.1048 3.83178L19.4337 6.67813C20.636 8.14771 22.4346 9 24.3334 9H0.333374C2.23217 9 4.0307 8.14772 5.23309 6.67813Z' fill='black'/%3E%3C/svg%3E%0A\") no-repeat;mask:url(\"data:image/svg+xml,%3Csvg width='25' height='9' viewBox='0 0 25 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.23309 6.67813L7.56191 3.83178C9.4546 1.5185 10.4009 0.361853 11.5998 0.10488C12.0834 0.00123882 12.5834 0.00123882 13.0669 0.10488C14.2658 0.361853 15.2121 1.5185 17.1048 3.83178L19.4337 6.67813C20.636 8.14771 22.4346 9 24.3334 9H0.333374C2.23217 9 4.0307 8.14772 5.23309 6.67813Z' fill='black'/%3E%3C/svg%3E%0A\") no-repeat}[tuiComment][data-direction=bottom]:before{top:100%;bottom:auto;transform:translate(-50%) rotate(180deg)}[tuiComment][data-direction=left]:before{left:auto;top:50%;right:100%;transform:translate(.785rem,-50%) rotate(-90deg)}[tuiComment][data-direction=right]:before{top:50%;left:100%;transform:translate(-.785rem,-50%) rotate(90deg)}\n"] }]
}] });
class TuiComment {
constructor() {
this.nothing = tuiWithStyles(TuiCommentStyles);
this.tuiComment = 'top';
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiComment, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiComment, isStandalone: true, selector: "[tuiComment]", inputs: { tuiComment: "tuiComment" }, host: { properties: { "attr.data-direction": "tuiComment" } }, ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiComment, decorators: [{
type: Directive,
args: [{
standalone: true,
selector: '[tuiComment]',
host: {
'[attr.data-direction]': 'tuiComment',
},
}]
}], propDecorators: { tuiComment: [{
type: Input
}] } });
/**
* Generated bundle index. Do not edit.
*/
export { TuiComment };
//# sourceMappingURL=taiga-ui-kit-components-comment.mjs.map