diff --git a/components/lib/inputicon/BaseInputIcon.vue b/components/lib/inputicon/BaseInputIcon.vue new file mode 100644 index 000000000..c1f054c89 --- /dev/null +++ b/components/lib/inputicon/BaseInputIcon.vue @@ -0,0 +1,15 @@ + diff --git a/components/lib/inputicon/InputIcon.d.ts b/components/lib/inputicon/InputIcon.d.ts new file mode 100644 index 000000000..ffab18963 --- /dev/null +++ b/components/lib/inputicon/InputIcon.d.ts @@ -0,0 +1,117 @@ +/** + * + * InputIcon displays text, icon, buttons and other content can be grouped next to an input. + * + * [Live Demo](https://www.primevue.org/inputgroup/) + * + * @module inputicon + * + */ +import { VNode } from 'vue'; +import { ComponentHooks } from '../basecomponent'; +import { PassThroughOptions } from '../passthrough'; +import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers'; + +export declare type InputIconPassThroughOptionType = InputIconPassThroughAttributes | ((options: InputIconPassThroughMethodOptions) => InputIconPassThroughAttributes | string) | string | null | undefined; + +/** + * Custom passthrough(pt) option method. + */ +export interface InputIconPassThroughMethodOptions { + /** + * Defines instance. + */ + instance: any; + /** + * Defines valid attributes. + */ + attrs: any; + /** + * Defines parent options. + */ + parent: any; + /** + * Defines passthrough(pt) options in global config. + */ + global: object | undefined; +} + +/** + * Custom passthrough(pt) options. + * @see {@link InputIconProps.pt} + */ +export interface InputIconPassThroughOptions { + /** + * Used to pass attributes to the root's DOM element. + */ + root?: InputIconPassThroughOptionType; + /** + * Used to manage all lifecycle hooks. + * @see {@link BaseComponent.ComponentHooks} + */ + hooks?: ComponentHooks; +} + +/** + * Custom passthrough attributes for each DOM elements + */ +export interface InputIconPassThroughAttributes { + [key: string]: any; +} + +/** + * Defines valid properties in InputIcon component. + */ +export interface InputIconProps { + /** + * Used to pass attributes to DOM elements inside the component. + * @type {InputIconPassThroughOptions} + */ + pt?: PassThrough; + /** + * Used to configure passthrough(pt) options of the component. + * @type {PassThroughOptions} + */ + ptOptions?: PassThroughOptions; + /** + * When enabled, it removes component related styles in the core. + * @defaultValue false + */ + unstyled?: boolean; +} + +/** + * Defines valid slots in InputIcon component. + */ +export interface InputIconSlots { + /** + * Custom default template. + */ + default(): VNode[]; +} + +/** + * Defines valid emits in InputIcon component. + */ +export interface InputIconEmits {} + +/** + * **PrimeVue - InputIcon** + * + * _InputIcon displays text, icon, buttons and other content can be grouped next to an input._ + * + * [Live Demo](https://www.primevue.org/inputtext/) + * --- --- + * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png) + * + * @group Component + */ +declare class InputIcon extends ClassComponent {} + +declare module '@vue/runtime-core' { + interface GlobalComponents { + InputIcon: GlobalComponentConstructor; + } +} + +export default InputIcon; diff --git a/components/lib/inputicon/InputIcon.vue b/components/lib/inputicon/InputIcon.vue new file mode 100644 index 000000000..9cdcdb204 --- /dev/null +++ b/components/lib/inputicon/InputIcon.vue @@ -0,0 +1,12 @@ + + + diff --git a/components/lib/inputicon/package.json b/components/lib/inputicon/package.json new file mode 100644 index 000000000..cda5678ad --- /dev/null +++ b/components/lib/inputicon/package.json @@ -0,0 +1,9 @@ +{ + "main": "./inputicon.cjs.js", + "module": "./inputicon.esm.js", + "unpkg": "./inputicon.min.js", + "types": "./InputIcon.d.ts", + "browser": { + "./sfc": "./InputIcon.vue" + } +} diff --git a/components/lib/inputicon/style/InputIconStyle.js b/components/lib/inputicon/style/InputIconStyle.js new file mode 100644 index 000000000..ff8b4c563 --- /dev/null +++ b/components/lib/inputicon/style/InputIconStyle.js @@ -0,0 +1 @@ +export default {}; diff --git a/components/lib/inputicon/style/InputIcoonStyle.d.ts b/components/lib/inputicon/style/InputIcoonStyle.d.ts new file mode 100644 index 000000000..b182f4480 --- /dev/null +++ b/components/lib/inputicon/style/InputIcoonStyle.d.ts @@ -0,0 +1,3 @@ +import { BaseStyle } from '../../base/style'; + +export interface InputIconStyle extends BaseStyle {} diff --git a/components/lib/inputicon/style/package.json b/components/lib/inputicon/style/package.json new file mode 100644 index 000000000..e32f83628 --- /dev/null +++ b/components/lib/inputicon/style/package.json @@ -0,0 +1,6 @@ +{ + "main": "./inputiconstyle.cjs.js", + "module": "./inputiconstyle.esm.js", + "unpkg": "./inputiconstyle.min.js", + "types": "./InputIconStyle.d.ts" +}