UNPKG

primeng

Version:

PrimeNG is an open source UI library for Angular featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeB

150 lines (138 loc) 5.89 kB
import { CommonModule } from '@angular/common'; import * as i0 from '@angular/core'; import { Injectable, inject, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { SharedModule } from 'primeng/api'; import { BaseComponent } from 'primeng/basecomponent'; import { BaseStyle } from 'primeng/base'; const theme = ({ dt }) => ` .p-iftalabel { display: block; position: relative; } .p-iftalabel label { position: absolute; pointer-events: none; top: ${dt('iftalabel.top')}; transition-property: all; transition-timing-function: ease; line-height: 1; font-size: ${dt('iftalabel.font.size')}; font-weight: ${dt('iftalabel.font.weight')}; inset-inline-start: ${dt('iftalabel.position.x')}; color: ${dt('iftalabel.color')}; transition-duration: ${dt('iftalabel.transition.duration')}; } .p-iftalabel > .p-inputtext, .p-iftalabel .p-textarea, .p-iftalabel .p-select-label, .p-iftalabel .p-multiselect-label-container, .p-iftalabel .p-autocomplete-input-multiple, .p-iftalabel .p-cascadeselect-label, .p-iftalabel .p-treeselect-label, .p-iftalabel .p-datepicker-input, .p-iftalabel .p-inputmask, .p-iftalabel .p-autocomplete .p-inputtext, .p-iftalabel .p-inputnumber .p-inputtext, .p-iftalabel .p-password .p-inputtext, .p-iftalabel > .p-iconfield .p-inputtext { padding-top: ${dt('iftalabel.input.padding.top')}; } .p-iftalabel:has(.ng-invalid.ng-dirty) label { color: ${dt('iftalabel.invalid.color')}; } .p-iftalabel:has(input:focus) label, .p-iftalabel:has(input:-webkit-autofill) label, .p-iftalabel:has(textarea:focus) label, .p-iftalabel:has(.p-inputwrapper-focus) label { color: ${dt('iftalabel.focus.color')}; } .p-iftalabel > .p-iconfield .p-inputicon { top: ${dt('iftalabel.input.padding.top')}; transform: translateY(25%); margin-top: 0; } /*.p-iftalabel .p-placeholder, .p-iftalabel input::placeholder, .p-iftalabel .p-inputtext::placeholder { opacity: 0; transition-property: all; transition-timing-function: ease; } .p-iftalabel .p-focus .p-placeholder, .p-iftalabel input:focus::placeholder, .p-iftalabel .p-inputtext:focus::placeholder { opacity: 1; transition-property: all; transition-timing-function: ease; }*/ `; const classes = { root: 'p-iftalabel' }; class IftaLabelStyle extends BaseStyle { name = 'iftalabel'; theme = theme; classes = classes; static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: IftaLabelStyle, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: IftaLabelStyle }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: IftaLabelStyle, decorators: [{ type: Injectable }] }); /** * * IftaLabel visually integrates a label within its form element. * * [Live Demo](https://www.primeng.org/iftalabel/) * * @module iftalabelstyle * */ var IftaLabelClasses; (function (IftaLabelClasses) { /** * Class name of the root element */ IftaLabelClasses["root"] = "p-iftalabel"; })(IftaLabelClasses || (IftaLabelClasses = {})); /** * IftaLabel is used to create infield top aligned labels. * @group Components */ class IftaLabel extends BaseComponent { _componentStyle = inject(IftaLabelStyle); static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: IftaLabel, deps: null, target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: IftaLabel, isStandalone: true, selector: "p-iftalabel, p-iftaLabel, p-ifta-label", host: { classAttribute: "p-iftalabel" }, providers: [IftaLabelStyle], usesInheritance: true, ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: IftaLabel, decorators: [{ type: Component, args: [{ selector: 'p-iftalabel, p-iftaLabel, p-ifta-label', standalone: true, template: ` <ng-content></ng-content> `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [IftaLabelStyle], host: { class: 'p-iftalabel' } }] }] }); class IftaLabelModule { static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: IftaLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: IftaLabelModule, imports: [IftaLabel, CommonModule, SharedModule, RouterModule], exports: [IftaLabel, SharedModule] }); static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: IftaLabelModule, imports: [CommonModule, SharedModule, RouterModule, SharedModule] }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: IftaLabelModule, decorators: [{ type: NgModule, args: [{ imports: [IftaLabel, CommonModule, SharedModule, RouterModule], exports: [IftaLabel, SharedModule] }] }] }); /** * Generated bundle index. Do not edit. */ export { IftaLabel, IftaLabelClasses, IftaLabelModule, IftaLabelStyle }; //# sourceMappingURL=primeng-iftalabel.mjs.map