2024-02-13 06:22:45 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Stepper is a component that streamlines a wizard-like workflow, organizing content into coherent steps and visually guiding users through a numbered progression in a multi-step process.
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/stepper/)
|
|
|
|
*
|
|
|
|
* @module stepper
|
|
|
|
*
|
|
|
|
*/
|
2024-02-20 14:47:55 +00:00
|
|
|
import { VNode } from 'vue';
|
2024-02-13 06:22:45 +00:00
|
|
|
import { ComponentHooks } from '../basecomponent';
|
|
|
|
import { PassThroughOptions } from '../passthrough';
|
2024-05-16 10:50:43 +00:00
|
|
|
import { DefineComponent, DesignToken, EmitFn, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
2024-02-13 06:22:45 +00:00
|
|
|
|
|
|
|
export declare type StepperPassThroughOptionType = StepperPassThroughAttributes | ((options: StepperPassThroughMethodOptions) => StepperPassThroughAttributes | string) | string | null | undefined;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) option method.
|
|
|
|
*/
|
|
|
|
export interface StepperPassThroughMethodOptions {
|
|
|
|
/**
|
|
|
|
* Defines instance.
|
|
|
|
*/
|
|
|
|
instance: any;
|
|
|
|
/**
|
|
|
|
* Defines valid properties.
|
|
|
|
*/
|
|
|
|
props: StepperProps;
|
|
|
|
/**
|
|
|
|
* Defines current inline state.
|
|
|
|
*/
|
|
|
|
state: StepperState;
|
|
|
|
/**
|
|
|
|
* 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 StepperProps.pt}
|
|
|
|
*/
|
|
|
|
export interface StepperPassThroughOptions {
|
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the root's DOM element.
|
2024-02-13 06:22:45 +00:00
|
|
|
*/
|
|
|
|
root?: StepperPassThroughOptionType;
|
|
|
|
/**
|
|
|
|
* Used to manage all lifecycle hooks.
|
|
|
|
* @see {@link BaseComponent.ComponentHooks}
|
|
|
|
*/
|
|
|
|
hooks?: ComponentHooks;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough attributes for each DOM elements
|
|
|
|
*/
|
|
|
|
export interface StepperPassThroughAttributes {
|
|
|
|
[key: string]: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines current inline state in Stepper component.
|
|
|
|
*/
|
|
|
|
export interface StepperState {
|
|
|
|
/**
|
2024-06-04 06:23:00 +00:00
|
|
|
* Current active value state.
|
2024-02-13 06:22:45 +00:00
|
|
|
*/
|
2024-06-04 06:23:00 +00:00
|
|
|
d_value: any;
|
2024-02-13 06:22:45 +00:00
|
|
|
/**
|
|
|
|
* Unique id for the Stepper component.
|
|
|
|
*/
|
|
|
|
id: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines valid properties in Stepper component.
|
|
|
|
*/
|
|
|
|
export interface StepperProps {
|
|
|
|
/**
|
2024-06-04 06:23:00 +00:00
|
|
|
* Active value of stepper.
|
|
|
|
* @defaultValue null
|
2024-02-13 06:22:45 +00:00
|
|
|
*/
|
2024-06-04 06:23:00 +00:00
|
|
|
value?: string | number | undefined;
|
2024-02-13 06:22:45 +00:00
|
|
|
/**
|
|
|
|
* Whether the steps are clickable or not.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
linear?: boolean | undefined;
|
2024-04-02 08:24:31 +00:00
|
|
|
/**
|
|
|
|
* It generates scoped CSS variables using design tokens for the component.
|
|
|
|
*/
|
|
|
|
dt?: DesignToken<any>;
|
2024-02-13 06:22:45 +00:00
|
|
|
/**
|
|
|
|
* Used to pass attributes to DOM elements inside the component.
|
|
|
|
* @type {StepperPassThroughOptions}
|
|
|
|
*/
|
|
|
|
pt?: PassThrough<StepperPassThroughOptions>;
|
|
|
|
/**
|
|
|
|
* 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 Stepper component.
|
|
|
|
*/
|
2024-02-20 14:47:55 +00:00
|
|
|
export interface StepperSlots {
|
2024-06-04 06:23:00 +00:00
|
|
|
/**
|
|
|
|
* Custom default template.
|
|
|
|
*/
|
|
|
|
default(): VNode[];
|
2024-02-20 14:47:55 +00:00
|
|
|
/**
|
|
|
|
* Custom start template.
|
|
|
|
*/
|
|
|
|
start(): VNode[];
|
|
|
|
/**
|
|
|
|
* Custom end template.
|
|
|
|
*/
|
|
|
|
end(): VNode[];
|
|
|
|
}
|
2024-02-13 06:22:45 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines valid emits in Stepper component.
|
|
|
|
*/
|
2024-05-16 14:05:43 +00:00
|
|
|
export interface StepperEmitsOptions {
|
2024-02-13 06:22:45 +00:00
|
|
|
/**
|
|
|
|
* Emitted when the value changes.
|
2024-06-04 06:23:00 +00:00
|
|
|
* @param {any} value - New value.
|
2024-02-13 06:22:45 +00:00
|
|
|
*/
|
2024-06-04 06:23:00 +00:00
|
|
|
'update:value'(value: any): void;
|
2024-02-13 06:22:45 +00:00
|
|
|
}
|
|
|
|
|
2024-05-16 10:50:43 +00:00
|
|
|
export declare type StepperEmits = EmitFn<StepperEmitsOptions>;
|
|
|
|
|
2024-02-13 06:22:45 +00:00
|
|
|
/**
|
|
|
|
* **PrimeVue - Stepper**
|
|
|
|
*
|
|
|
|
* _Stepper is a component that streamlines a wizard-like workflow, organizing content into coherent steps and visually guiding users through a numbered progression in a multi-step process._
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/stepper/)
|
|
|
|
* --- ---
|
|
|
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
|
|
|
|
*
|
|
|
|
* @group Component
|
|
|
|
*
|
|
|
|
*/
|
2024-05-16 10:50:43 +00:00
|
|
|
declare const Stepper: DefineComponent<StepperProps, StepperSlots, StepperEmits>;
|
2024-02-13 06:22:45 +00:00
|
|
|
|
2024-03-14 22:58:11 +00:00
|
|
|
declare module 'vue' {
|
|
|
|
export interface GlobalComponents {
|
2024-05-16 10:50:43 +00:00
|
|
|
Stepper: GlobalComponentConstructor<StepperProps, StepperSlots, StepperEmits>;
|
2024-02-13 06:22:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Stepper;
|