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

1 lines 6.33 kB
{"version":3,"file":"primeng-iftalabel.mjs","sources":["../../src/iftalabel/style/iftalabelstyle.ts","../../src/iftalabel/iftalabel.ts","../../src/iftalabel/primeng-iftalabel.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BaseStyle } from 'primeng/base';\n\nconst theme = ({ dt }) => `\n.p-iftalabel {\n display: block;\n position: relative;\n}\n\n.p-iftalabel label {\n position: absolute;\n pointer-events: none;\n top: ${dt('iftalabel.top')};\n transition-property: all;\n transition-timing-function: ease;\n line-height: 1;\n font-size: ${dt('iftalabel.font.size')};\n font-weight: ${dt('iftalabel.font.weight')};\n inset-inline-start: ${dt('iftalabel.position.x')};\n color: ${dt('iftalabel.color')};\n transition-duration: ${dt('iftalabel.transition.duration')};\n}\n\n.p-iftalabel > .p-inputtext,\n.p-iftalabel .p-textarea,\n.p-iftalabel .p-select-label,\n.p-iftalabel .p-multiselect-label-container,\n.p-iftalabel .p-autocomplete-input-multiple,\n.p-iftalabel .p-cascadeselect-label,\n.p-iftalabel .p-treeselect-label,\n.p-iftalabel .p-datepicker-input,\n.p-iftalabel .p-inputmask,\n.p-iftalabel .p-autocomplete .p-inputtext,\n.p-iftalabel .p-inputnumber .p-inputtext,\n.p-iftalabel .p-password .p-inputtext,\n.p-iftalabel > .p-iconfield .p-inputtext {\n padding-top: ${dt('iftalabel.input.padding.top')};\n}\n\n.p-iftalabel:has(.ng-invalid.ng-dirty) label {\n color: ${dt('iftalabel.invalid.color')};\n}\n\n.p-iftalabel:has(input:focus) label,\n.p-iftalabel:has(input:-webkit-autofill) label,\n.p-iftalabel:has(textarea:focus) label,\n.p-iftalabel:has(.p-inputwrapper-focus) label {\n color: ${dt('iftalabel.focus.color')};\n}\n\n.p-iftalabel > .p-iconfield .p-inputicon {\n top: ${dt('iftalabel.input.padding.top')};\n transform: translateY(25%);\n margin-top: 0;\n}\n\n/*.p-iftalabel .p-placeholder,\n.p-iftalabel input::placeholder,\n.p-iftalabel .p-inputtext::placeholder {\n opacity: 0;\n transition-property: all;\n transition-timing-function: ease;\n}\n\n.p-iftalabel .p-focus .p-placeholder,\n.p-iftalabel input:focus::placeholder,\n.p-iftalabel .p-inputtext:focus::placeholder {\n opacity: 1;\n transition-property: all;\n transition-timing-function: ease;\n}*/\n`;\n\nconst classes = {\n root: 'p-iftalabel'\n};\n\n@Injectable()\nexport class IftaLabelStyle extends BaseStyle {\n name = 'iftalabel';\n\n theme = theme;\n\n classes = classes;\n}\n\n/**\n *\n * IftaLabel visually integrates a label within its form element.\n *\n * [Live Demo](https://www.primeng.org/iftalabel/)\n *\n * @module iftalabelstyle\n *\n */\nexport enum IftaLabelClasses {\n /**\n * Class name of the root element\n */\n root = 'p-iftalabel'\n}\n\nexport interface IftaLabelStyle extends BaseStyle {}\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject, NgModule, ViewEncapsulation } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { SharedModule } from 'primeng/api';\nimport { BaseComponent } from 'primeng/basecomponent';\nimport { IftaLabelStyle } from './style/iftalabelstyle';\n\n/**\n * IftaLabel is used to create infield top aligned labels.\n * @group Components\n */\n@Component({\n selector: 'p-iftalabel, p-iftaLabel, p-ifta-label',\n standalone: true,\n template: ` <ng-content></ng-content> `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [IftaLabelStyle],\n host: {\n class: 'p-iftalabel'\n }\n})\nexport class IftaLabel extends BaseComponent {\n _componentStyle = inject(IftaLabelStyle);\n}\n\n@NgModule({\n imports: [IftaLabel, CommonModule, SharedModule, RouterModule],\n exports: [IftaLabel, SharedModule]\n})\nexport class IftaLabelModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";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