@sabrenski/spire-ui-vue 0.3.8 → 0.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Stepper/Stepper.vue.d.ts +43 -0
- package/dist/components/Stepper/StepperContent.vue.d.ts +21 -0
- package/dist/components/Stepper/StepperStep.vue.d.ts +26 -0
- package/dist/components/Stepper/index.d.ts +4 -0
- package/dist/components/Stepper/types.d.ts +141 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/spire-ui.cjs +36 -36
- package/dist/spire-ui.css +1 -1
- package/dist/spire-ui.js +14289 -13938
- package/dist/theme/semantic.css +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { StepperProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {};
|
|
8
|
+
rootEl: HTMLDivElement;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<StepperProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (value: number) => any;
|
|
13
|
+
error: (stepIndex: number) => any;
|
|
14
|
+
complete: (stepIndex: number) => any;
|
|
15
|
+
change: (payload: {
|
|
16
|
+
current: number;
|
|
17
|
+
previous: number;
|
|
18
|
+
}) => any;
|
|
19
|
+
}, string, import('vue').PublicProps, Readonly<StepperProps> & Readonly<{
|
|
20
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
21
|
+
onError?: ((stepIndex: number) => any) | undefined;
|
|
22
|
+
onComplete?: ((stepIndex: number) => any) | undefined;
|
|
23
|
+
onChange?: ((payload: {
|
|
24
|
+
current: number;
|
|
25
|
+
previous: number;
|
|
26
|
+
}) => any) | undefined;
|
|
27
|
+
}>, {
|
|
28
|
+
size: import('./types').StepperSize;
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
disableAnimation: boolean;
|
|
31
|
+
linear: boolean;
|
|
32
|
+
color: import('./types').StepperColor;
|
|
33
|
+
orientation: import('./types').StepperOrientation;
|
|
34
|
+
showConnector: boolean;
|
|
35
|
+
autoComplete: boolean;
|
|
36
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
37
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StepperContentProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
default?(_: {}): any;
|
|
7
|
+
};
|
|
8
|
+
refs: {};
|
|
9
|
+
rootEl: any;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
+
declare const __VLS_component: import('vue').DefineComponent<StepperContentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StepperContentProps> & Readonly<{}>, {
|
|
13
|
+
forceVisible: boolean;
|
|
14
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { StepperStepProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
icon?(_: {}): any;
|
|
6
|
+
title?(_: {}): any;
|
|
7
|
+
description?(_: {}): any;
|
|
8
|
+
};
|
|
9
|
+
refs: {};
|
|
10
|
+
rootEl: HTMLDivElement;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<StepperStepProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StepperStepProps> & Readonly<{}>, {
|
|
14
|
+
warning: boolean;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
error: boolean;
|
|
17
|
+
completed: boolean;
|
|
18
|
+
hideConnector: boolean;
|
|
19
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
20
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { InjectionKey, Ref, ComputedRef } from 'vue';
|
|
2
|
+
import { IconProp } from '../Icon/types';
|
|
3
|
+
export type StepperOrientation = 'horizontal' | 'vertical';
|
|
4
|
+
export type StepperSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
5
|
+
export type StepperColor = 'primary' | 'success' | 'secondary';
|
|
6
|
+
export type StepState = 'pending' | 'active' | 'completed' | 'error' | 'warning' | 'disabled';
|
|
7
|
+
export interface StepData {
|
|
8
|
+
/** Registration index */
|
|
9
|
+
index: number;
|
|
10
|
+
/** Custom key identifier */
|
|
11
|
+
key?: string;
|
|
12
|
+
/** DOM element reference */
|
|
13
|
+
element: HTMLElement | null;
|
|
14
|
+
/** Step is disabled */
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
/** Step is completed */
|
|
17
|
+
completed: boolean;
|
|
18
|
+
/** Step has error */
|
|
19
|
+
error: boolean;
|
|
20
|
+
/** Step has warning */
|
|
21
|
+
warning: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface StepperProps {
|
|
24
|
+
/** Currently active step index (v-model) */
|
|
25
|
+
modelValue?: number;
|
|
26
|
+
/** Default active step for uncontrolled mode */
|
|
27
|
+
defaultValue?: number;
|
|
28
|
+
/** Orientation of the stepper layout */
|
|
29
|
+
orientation?: StepperOrientation;
|
|
30
|
+
/** Allow navigation to any step or require sequential completion */
|
|
31
|
+
linear?: boolean;
|
|
32
|
+
/** Size variant */
|
|
33
|
+
size?: StepperSize;
|
|
34
|
+
/** Color scheme for active/completed states */
|
|
35
|
+
color?: StepperColor;
|
|
36
|
+
/** Disable all steps */
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
/** Disable transition animations */
|
|
39
|
+
disableAnimation?: boolean;
|
|
40
|
+
/** Show connector lines between steps */
|
|
41
|
+
showConnector?: boolean;
|
|
42
|
+
/** Completed steps (set of step indices) */
|
|
43
|
+
completedSteps?: Set<number> | number[];
|
|
44
|
+
/** Steps with error state */
|
|
45
|
+
errorSteps?: Set<number> | number[];
|
|
46
|
+
/** Steps with warning state */
|
|
47
|
+
warningSteps?: Set<number> | number[];
|
|
48
|
+
/** Auto-mark previous steps as completed when navigating forward */
|
|
49
|
+
autoComplete?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface StepperStepProps {
|
|
52
|
+
/** Unique key for this step (uses index if not provided) */
|
|
53
|
+
stepKey?: string;
|
|
54
|
+
/** Step title/label */
|
|
55
|
+
title?: string;
|
|
56
|
+
/** Optional description text */
|
|
57
|
+
description?: string;
|
|
58
|
+
/** Icon for default state */
|
|
59
|
+
icon?: IconProp;
|
|
60
|
+
/** Icon for completed state (defaults to checkmark) */
|
|
61
|
+
completedIcon?: IconProp;
|
|
62
|
+
/** Icon for error state (defaults to X) */
|
|
63
|
+
errorIcon?: IconProp;
|
|
64
|
+
/** Icon for warning state (defaults to exclamation) */
|
|
65
|
+
warningIcon?: IconProp;
|
|
66
|
+
/** Disable this specific step */
|
|
67
|
+
disabled?: boolean;
|
|
68
|
+
/** Force this step to show as completed */
|
|
69
|
+
completed?: boolean;
|
|
70
|
+
/** Force this step to show error state */
|
|
71
|
+
error?: boolean;
|
|
72
|
+
/** Force this step to show warning state */
|
|
73
|
+
warning?: boolean;
|
|
74
|
+
/** Hide the connector after this step */
|
|
75
|
+
hideConnector?: boolean;
|
|
76
|
+
}
|
|
77
|
+
export interface StepperContentProps {
|
|
78
|
+
/** Index of the step this content belongs to */
|
|
79
|
+
stepIndex: number;
|
|
80
|
+
/** Force visibility regardless of active state */
|
|
81
|
+
forceVisible?: boolean;
|
|
82
|
+
}
|
|
83
|
+
export interface StepperContext {
|
|
84
|
+
/** Currently active step index */
|
|
85
|
+
activeStep: ComputedRef<number>;
|
|
86
|
+
/** Total number of registered steps */
|
|
87
|
+
totalSteps: ComputedRef<number>;
|
|
88
|
+
/** Stepper orientation */
|
|
89
|
+
orientation: Ref<StepperOrientation>;
|
|
90
|
+
/** Linear navigation mode */
|
|
91
|
+
linear: Ref<boolean>;
|
|
92
|
+
/** Size variant */
|
|
93
|
+
size: Ref<StepperSize>;
|
|
94
|
+
/** Color scheme */
|
|
95
|
+
color: Ref<StepperColor>;
|
|
96
|
+
/** Global disabled state */
|
|
97
|
+
disabled: Ref<boolean>;
|
|
98
|
+
/** Animation disabled */
|
|
99
|
+
disableAnimation: Ref<boolean>;
|
|
100
|
+
/** Show connectors */
|
|
101
|
+
showConnector: Ref<boolean>;
|
|
102
|
+
/** Auto-complete previous steps */
|
|
103
|
+
autoComplete: Ref<boolean>;
|
|
104
|
+
/** Set of completed step indices */
|
|
105
|
+
completedSteps: ComputedRef<Set<number>>;
|
|
106
|
+
/** Set of error step indices */
|
|
107
|
+
errorSteps: ComputedRef<Set<number>>;
|
|
108
|
+
/** Set of warning step indices */
|
|
109
|
+
warningSteps: ComputedRef<Set<number>>;
|
|
110
|
+
/** Registered steps data */
|
|
111
|
+
registeredSteps: Ref<Map<number, StepData>>;
|
|
112
|
+
/** Step indices in registration order */
|
|
113
|
+
stepKeys: Ref<number[]>;
|
|
114
|
+
/** Navigate to a specific step */
|
|
115
|
+
goToStep: (step: number) => void;
|
|
116
|
+
/** Go to next step */
|
|
117
|
+
nextStep: () => void;
|
|
118
|
+
/** Go to previous step */
|
|
119
|
+
previousStep: () => void;
|
|
120
|
+
/** Mark a step as completed */
|
|
121
|
+
completeStep: (step: number) => void;
|
|
122
|
+
/** Set error state on a step */
|
|
123
|
+
setStepError: (step: number, hasError: boolean) => void;
|
|
124
|
+
/** Set warning state on a step */
|
|
125
|
+
setStepWarning: (step: number, hasWarning: boolean) => void;
|
|
126
|
+
/** Register a step */
|
|
127
|
+
registerStep: (index: number, data: Omit<StepData, 'index'>) => void;
|
|
128
|
+
/** Unregister a step */
|
|
129
|
+
unregisterStep: (index: number) => void;
|
|
130
|
+
/** Update step element reference */
|
|
131
|
+
updateStepElement: (index: number, element: HTMLElement | null) => void;
|
|
132
|
+
/** Get step state */
|
|
133
|
+
getStepState: (index: number) => StepState;
|
|
134
|
+
/** Check if step is navigable */
|
|
135
|
+
canNavigateTo: (index: number) => boolean;
|
|
136
|
+
/** Get unique ID for step indicator */
|
|
137
|
+
getStepId: (index: number) => string;
|
|
138
|
+
/** Get unique ID for content panel */
|
|
139
|
+
getPanelId: (index: number) => string;
|
|
140
|
+
}
|
|
141
|
+
export declare const STEPPER_INJECTION_KEY: InjectionKey<StepperContext>;
|