Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inputotp #15102

Merged
merged 14 commits into from
Mar 20, 2024
3 changes: 3 additions & 0 deletions src/app/components/inputotp/inputotp.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@layer primeng {

}
65 changes: 65 additions & 0 deletions src/app/components/inputotp/inputotp.interface.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import { TemplateRef } from '@angular/core';

/**
* Defines the custom events used by the component's emit.
* @group Events
*/
export interface InputOtpTemplateEvents {
/**
* Input event.
*/
input: Function;
/**
* Keydown event.
*/
keydown: Function;
/**
* Focus event.
*/
focus: Function;
/**
* Blur event.
*/
blur: Function;
/**
* Paste event.
*/
paste: Function;
}

/**
* Defines valid templates in InputOtp.
* @group Templates
*/
export interface InputOtpTemplates {
/**
* Custom template of input.
* @param {Object} context
*/
input(context: {
/**
* Input value.
*/
$implicit: any;
/**
* Events of the component
*/
events: InputOtpTemplateEvents;
}): TemplateRef<{ $implicit: any; events: InputOtpTemplateEvents }>;
}

/**
* Custom change event.
* @see {@link InputOtp.onChange}
* @group Events
*/
export interface InputOtpChangeEvent {
/**
* Browser event.
*/
originalEvent: Event;
/**
* Selected value.
*/
value: any;
}
Loading
Loading