diff --git a/api-generator/components/progressspinner.js b/api-generator/components/progressspinner.js index f2a190cea..493b9e054 100644 --- a/api-generator/components/progressspinner.js +++ b/api-generator/components/progressspinner.js @@ -16,6 +16,12 @@ const ProgressSpinnerProps = [ type: 'string', default: '2s', description: 'Duration of the rotate animation.' + }, + { + name: 'pt', + type: 'any', + default: 'null', + description: 'Uses to pass attributes to DOM elements inside the component.' } ]; diff --git a/components/lib/progressspinner/ProgressSpinner.d.ts b/components/lib/progressspinner/ProgressSpinner.d.ts index 533875822..23fb36c1d 100755 --- a/components/lib/progressspinner/ProgressSpinner.d.ts +++ b/components/lib/progressspinner/ProgressSpinner.d.ts @@ -9,6 +9,41 @@ */ import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; +export declare type ProgressSpinnerPassThroughOptionType = ProgressSpinnerPassThroughAttributes | ((options: ProgressSpinnerPassThroughMethodOptions) => ProgressSpinnerPassThroughAttributes) | null | undefined; + +/** + * Custom passthrough(pt) option method. + */ +export interface ProgressSpinnerPassThroughMethodOptions { + props: ProgressSpinnerProps; +} + +/** + * Custom passthrough(pt) options. + * @see {@link ProgressSpinnerProps.pt} + */ +export interface ProgressSpinnerPassThroughOptions { + /** + * Uses to pass attributes to the root's DOM element. + */ + root?: ProgressSpinnerPassThroughOptionType; + /** + * Uses to pass attributes to the spinner's DOM element. + */ + spinner?: ProgressSpinnerPassThroughOptionType; + /** + * Uses to pass attributes to the circle's DOM element. + */ + circle?: ProgressSpinnerPassThroughOptionType; +} + +/** + * Custom passthrough attributes for each DOM elements + */ +export interface ProgressSpinnerPassThroughAttributes { + [key: string]: any; +} + /** * Defines valid properties in ProgressSpinner component. */ @@ -27,6 +62,11 @@ export interface ProgressSpinnerProps { * @defaultValue 2s */ animationDuration?: string | undefined; + /** + * Uses to pass attributes to DOM elements inside the component. + * @type {ProgressSpinnerPassThroughOptions} + */ + pt?: ProgressSpinnerPassThroughOptions; } /** diff --git a/components/lib/progressspinner/ProgressSpinner.vue b/components/lib/progressspinner/ProgressSpinner.vue index 37a304eb8..c10da4e18 100755 --- a/components/lib/progressspinner/ProgressSpinner.vue +++ b/components/lib/progressspinner/ProgressSpinner.vue @@ -1,14 +1,17 @@