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

86 lines (82 loc) 4.71 kB
import * as i0 from '@angular/core'; import { inject, input, booleanAttribute, computed, Directive } from '@angular/core'; import { BaseEditableHolder } from 'primeng/baseeditableholder'; import { Fluid } from 'primeng/fluid'; class BaseInput extends BaseEditableHolder { pcFluid = inject(Fluid, { optional: true, host: true, skipSelf: true }); /** * Spans 100% width of the container when enabled. * @defaultValue false * @group Props */ fluid = input(undefined, ...(ngDevMode ? [{ debugName: "fluid", transform: booleanAttribute }] : [{ transform: booleanAttribute }])); /** * Specifies the input variant of the component. * @defaultValue 'outlined' * @group Props */ variant = input(...(ngDevMode ? [undefined, { debugName: "variant" }] : [])); /** * Specifies the size of the component. * @defaultValue undefined * @group Props */ size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : [])); /** * Specifies the visible width of the input element in characters. * @defaultValue undefined * @group Props */ inputSize = input(...(ngDevMode ? [undefined, { debugName: "inputSize" }] : [])); /** * Specifies the value must match the pattern. * @defaultValue undefined * @group Props */ pattern = input(...(ngDevMode ? [undefined, { debugName: "pattern" }] : [])); /** * The value must be greater than or equal to the value. * @defaultValue undefined * @group Props */ min = input(...(ngDevMode ? [undefined, { debugName: "min" }] : [])); /** * The value must be less than or equal to the value. * @defaultValue undefined * @group Props */ max = input(...(ngDevMode ? [undefined, { debugName: "max" }] : [])); /** * Unless the step is set to the any literal, the value must be min + an integral multiple of the step. * @defaultValue undefined * @group Props */ step = input(...(ngDevMode ? [undefined, { debugName: "step" }] : [])); /** * The number of characters (code points) must not be less than the value of the attribute, if non-empty. * @defaultValue undefined * @group Props */ minlength = input(...(ngDevMode ? [undefined, { debugName: "minlength" }] : [])); /** * The number of characters (code points) must not exceed the value of the attribute. * @defaultValue undefined * @group Props */ maxlength = input(...(ngDevMode ? [undefined, { debugName: "maxlength" }] : [])); $variant = computed(() => this.variant() || this.config.inputStyle() || this.config.inputVariant(), ...(ngDevMode ? [{ debugName: "$variant" }] : [])); get hasFluid() { return this.fluid() ?? !!this.pcFluid; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: BaseInput, deps: null, target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.3", type: BaseInput, isStandalone: true, inputs: { fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, inputSize: { classPropertyName: "inputSize", publicName: "inputSize", isSignal: true, isRequired: false, transformFunction: null }, pattern: { classPropertyName: "pattern", publicName: "pattern", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, minlength: { classPropertyName: "minlength", publicName: "minlength", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: BaseInput, decorators: [{ type: Directive, args: [{ standalone: true }] }] }); /** * Generated bundle index. Do not edit. */ export { BaseInput }; //# sourceMappingURL=primeng-baseinput.mjs.map