[59329aa] | 1 | import * as i0 from '@angular/core';
|
---|
| 2 | import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, NgModule } from '@angular/core';
|
---|
| 3 | import * as i1 from '@angular/common';
|
---|
| 4 | import { CommonModule } from '@angular/common';
|
---|
| 5 |
|
---|
| 6 | class Divider {
|
---|
| 7 | constructor() {
|
---|
| 8 | this.layout = "horizontal";
|
---|
| 9 | this.type = "solid";
|
---|
| 10 | }
|
---|
| 11 | containerClass() {
|
---|
| 12 | return {
|
---|
| 13 | 'p-divider p-component': true,
|
---|
| 14 | 'p-divider-horizontal': this.layout === "horizontal",
|
---|
| 15 | 'p-divider-vertical': this.layout === "vertical",
|
---|
| 16 | 'p-divider-solid': this.type === "solid",
|
---|
| 17 | 'p-divider-dashed': this.type === "dashed",
|
---|
| 18 | 'p-divider-dotted': this.type === "dotted",
|
---|
| 19 | 'p-divider-left': this.layout === 'horizontal' && (!this.align || this.align === 'left'),
|
---|
| 20 | 'p-divider-center': (this.layout === 'horizontal' && this.align === 'center') || (this.layout === 'vertical' && (!this.align || this.align === 'center')),
|
---|
| 21 | 'p-divider-right': this.layout === 'horizontal' && this.align === 'right',
|
---|
| 22 | 'p-divider-top': this.layout === 'vertical' && (this.align === 'top'),
|
---|
| 23 | 'p-divider-bottom': this.layout === 'vertical' && this.align === 'bottom'
|
---|
| 24 | };
|
---|
| 25 | }
|
---|
| 26 | }
|
---|
| 27 | Divider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Divider, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
---|
| 28 | Divider.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: Divider, selector: "p-divider", inputs: { styleClass: "styleClass", style: "style", layout: "layout", type: "type", align: "align" }, host: { classAttribute: "p-element" }, ngImport: i0, template: `
|
---|
| 29 | <div [ngClass]="containerClass()" [class]="styleClass" [ngStyle]="style" role="separator">
|
---|
| 30 | <div class="p-divider-content">
|
---|
| 31 | <ng-content></ng-content>
|
---|
| 32 | </div>
|
---|
| 33 | </div>
|
---|
| 34 | `, isInline: true, styles: [".p-divider-horizontal{display:flex;width:100%;position:relative;align-items:center}.p-divider-horizontal:before{position:absolute;display:block;top:50%;left:0;width:100%;content:\"\"}.p-divider-horizontal.p-divider-left{justify-content:flex-start}.p-divider-horizontal.p-divider-right{justify-content:flex-end}.p-divider-horizontal.p-divider-center{justify-content:center}.p-divider-content{z-index:1}.p-divider-vertical{min-height:100%;margin:0 1rem;display:flex;position:relative;justify-content:center}.p-divider-vertical:before{position:absolute;display:block;top:0;left:50%;height:100%;content:\"\"}.p-divider-vertical.p-divider-top{align-items:flex-start}.p-divider-vertical.p-divider-center{align-items:center}.p-divider-vertical.p-divider-bottom{align-items:flex-end}.p-divider-solid.p-divider-horizontal:before{border-top-style:solid}.p-divider-solid.p-divider-vertical:before{border-left-style:solid}.p-divider-dashed.p-divider-horizontal:before{border-top-style:dashed}.p-divider-dashed.p-divider-vertical:before{border-left-style:dashed}.p-divider-dotted.p-divider-horizontal:before{border-top-style:dotted}.p-divider-dotted.p-divider-horizontal:before{border-left-style:dotted}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
---|
| 35 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Divider, decorators: [{
|
---|
| 36 | type: Component,
|
---|
| 37 | args: [{ selector: 'p-divider', template: `
|
---|
| 38 | <div [ngClass]="containerClass()" [class]="styleClass" [ngStyle]="style" role="separator">
|
---|
| 39 | <div class="p-divider-content">
|
---|
| 40 | <ng-content></ng-content>
|
---|
| 41 | </div>
|
---|
| 42 | </div>
|
---|
| 43 | `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
---|
| 44 | 'class': 'p-element'
|
---|
| 45 | }, styles: [".p-divider-horizontal{display:flex;width:100%;position:relative;align-items:center}.p-divider-horizontal:before{position:absolute;display:block;top:50%;left:0;width:100%;content:\"\"}.p-divider-horizontal.p-divider-left{justify-content:flex-start}.p-divider-horizontal.p-divider-right{justify-content:flex-end}.p-divider-horizontal.p-divider-center{justify-content:center}.p-divider-content{z-index:1}.p-divider-vertical{min-height:100%;margin:0 1rem;display:flex;position:relative;justify-content:center}.p-divider-vertical:before{position:absolute;display:block;top:0;left:50%;height:100%;content:\"\"}.p-divider-vertical.p-divider-top{align-items:flex-start}.p-divider-vertical.p-divider-center{align-items:center}.p-divider-vertical.p-divider-bottom{align-items:flex-end}.p-divider-solid.p-divider-horizontal:before{border-top-style:solid}.p-divider-solid.p-divider-vertical:before{border-left-style:solid}.p-divider-dashed.p-divider-horizontal:before{border-top-style:dashed}.p-divider-dashed.p-divider-vertical:before{border-left-style:dashed}.p-divider-dotted.p-divider-horizontal:before{border-top-style:dotted}.p-divider-dotted.p-divider-horizontal:before{border-left-style:dotted}\n"] }]
|
---|
| 46 | }], propDecorators: { styleClass: [{
|
---|
| 47 | type: Input
|
---|
| 48 | }], style: [{
|
---|
| 49 | type: Input
|
---|
| 50 | }], layout: [{
|
---|
| 51 | type: Input
|
---|
| 52 | }], type: [{
|
---|
| 53 | type: Input
|
---|
| 54 | }], align: [{
|
---|
| 55 | type: Input
|
---|
| 56 | }] } });
|
---|
| 57 | class DividerModule {
|
---|
| 58 | }
|
---|
| 59 | DividerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: DividerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
---|
| 60 | DividerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: DividerModule, declarations: [Divider], imports: [CommonModule], exports: [Divider] });
|
---|
| 61 | DividerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: DividerModule, imports: [[CommonModule]] });
|
---|
| 62 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: DividerModule, decorators: [{
|
---|
| 63 | type: NgModule,
|
---|
| 64 | args: [{
|
---|
| 65 | imports: [CommonModule],
|
---|
| 66 | exports: [Divider],
|
---|
| 67 | declarations: [Divider]
|
---|
| 68 | }]
|
---|
| 69 | }] });
|
---|
| 70 |
|
---|
| 71 | /**
|
---|
| 72 | * Generated bundle index. Do not edit.
|
---|
| 73 | */
|
---|
| 74 |
|
---|
| 75 | export { Divider, DividerModule };
|
---|