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.95 kB
import { CommonModule } from '@angular/common'; import * as i0 from '@angular/core'; import { Injectable, inject, Component, ChangeDetectionStrategy, ViewEncapsulation, 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 { 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-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 = /*@__PURE__*/ (() => { let ɵIftaLabelStyle_BaseFactory; return function IftaLabelStyle_Factory(__ngFactoryType__) { return (ɵIftaLabelStyle_BaseFactory || (ɵIftaLabelStyle_BaseFactory = i0.ɵɵgetInheritedFactory(IftaLabelStyle)))(__ngFactoryType__ || IftaLabelStyle); }; })(); static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: IftaLabelStyle, factory: IftaLabelStyle.ɵfac }); } (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IftaLabelStyle, [{ type: Injectable }], null, null); })(); /** * * 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 = {})); const _c0 = ["*"]; /** * IftaLabel is used to create infield top aligned labels. * @group Components */ class IftaLabel extends BaseComponent { _componentStyle = inject(IftaLabelStyle); static ɵfac = /*@__PURE__*/ (() => { let ɵIftaLabel_BaseFactory; return function IftaLabel_Factory(__ngFactoryType__) { return (ɵIftaLabel_BaseFactory || (ɵIftaLabel_BaseFactory = i0.ɵɵgetInheritedFactory(IftaLabel)))(__ngFactoryType__ || IftaLabel); }; })(); static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: IftaLabel, selectors: [["p-iftalabel"], ["p-iftaLabel"], ["p-ifta-label"]], hostAttrs: [1, "p-iftalabel"], features: [i0.ɵɵProvidersFeature([IftaLabelStyle]), i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function IftaLabel_Template(rf, ctx) { if (rf & 1) { i0.ɵɵprojectionDef(); i0.ɵɵprojection(0); } }, encapsulation: 2, changeDetection: 0 }); } (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IftaLabel, [{ 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' } }] }], null, null); })(); (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(IftaLabel, { className: "IftaLabel", filePath: "iftalabel.ts", lineNumber: 23 }); })(); class IftaLabelModule { static ɵfac = function IftaLabelModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IftaLabelModule)(); }; static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: IftaLabelModule }); static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule, SharedModule, RouterModule, SharedModule] }); } (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IftaLabelModule, [{ type: NgModule, args: [{ imports: [IftaLabel, CommonModule, SharedModule, RouterModule], exports: [IftaLabel, SharedModule] }] }], null, null); })(); (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(IftaLabelModule, { imports: [IftaLabel, CommonModule, SharedModule, RouterModule], exports: [IftaLabel, SharedModule] }); })(); /** * Generated bundle index. Do not edit. */ export { IftaLabel, IftaLabelClasses, IftaLabelModule, IftaLabelStyle }; //# sourceMappingURL=primeng-iftalabel.mjs.map