vue3-steppy 1.3.1 → 1.4.0
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/README.md +21 -135
- package/package.json +10 -7
package/README.md
CHANGED
|
@@ -24,6 +24,7 @@ You can try a live demo [here](https://laximas.github.io/vue3-steppy/)
|
|
|
24
24
|
* Change step content
|
|
25
25
|
* Configure finalization
|
|
26
26
|
* Show loading spinner
|
|
27
|
+
* Typescript support
|
|
27
28
|
* Customizable
|
|
28
29
|
- Colors
|
|
29
30
|
- Titles
|
|
@@ -40,141 +41,25 @@ Import
|
|
|
40
41
|
```js
|
|
41
42
|
import {Steppy} from 'vue3-steppy'
|
|
42
43
|
```
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Contains the steps with custom titles and icons.
|
|
66
|
-
* @type {Array}
|
|
67
|
-
*
|
|
68
|
-
* @param {Image} iconSuccess - You can point to an imported icon from you assets like:
|
|
69
|
-
* import CheckMark from '../assets/check-mark.png'
|
|
70
|
-
* If you set it to null, a default SVG will be used with primary color 1.
|
|
71
|
-
*
|
|
72
|
-
* @param {boolean} isValid - Used to determine if the user can move to the next step.
|
|
73
|
-
*/
|
|
74
|
-
tabs: {
|
|
75
|
-
type: Array,
|
|
76
|
-
default: reactive([
|
|
77
|
-
{
|
|
78
|
-
title: 'Step 1',
|
|
79
|
-
iconSuccess: null,
|
|
80
|
-
isValid: true
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
title: 'Step 2',
|
|
84
|
-
iconSuccess: null,
|
|
85
|
-
isValid: true
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
title: 'Step 3',
|
|
89
|
-
iconSuccess: null,
|
|
90
|
-
isValid: true
|
|
91
|
-
}
|
|
92
|
-
])
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Function that will run after all steps are completed (done button is clicked).
|
|
97
|
-
* @type {Function}
|
|
98
|
-
*/
|
|
99
|
-
finalize: {
|
|
100
|
-
type: Function,
|
|
101
|
-
default: function () {
|
|
102
|
-
return {}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Text for back button.
|
|
108
|
-
* @type {String}
|
|
109
|
-
*/
|
|
110
|
-
backText: {
|
|
111
|
-
type: String,
|
|
112
|
-
default: 'Back'
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Text for next button.
|
|
117
|
-
* @type {String}
|
|
118
|
-
*/
|
|
119
|
-
nextText: {
|
|
120
|
-
type: String,
|
|
121
|
-
default: 'Next'
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Text for done button.
|
|
126
|
-
* @type {String}
|
|
127
|
-
*/
|
|
128
|
-
doneText: {
|
|
129
|
-
type: String,
|
|
130
|
-
default: 'Done'
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Show loading spinner on done button
|
|
135
|
-
* @type {Boolean}
|
|
136
|
-
*/
|
|
137
|
-
loading: {
|
|
138
|
-
type: Boolean,
|
|
139
|
-
default: false
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Primary Color 1
|
|
144
|
-
* @type {String}
|
|
145
|
-
*/
|
|
146
|
-
primaryColor1: {
|
|
147
|
-
type: String,
|
|
148
|
-
default: 'orange'
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Background Color of the content box
|
|
153
|
-
* @type {String}
|
|
154
|
-
*/
|
|
155
|
-
backgroundColor: {
|
|
156
|
-
type: String,
|
|
157
|
-
default: "#fff",
|
|
158
|
-
},
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Primary Color 2
|
|
162
|
-
* @type {String}
|
|
163
|
-
*/
|
|
164
|
-
primaryColor2: {
|
|
165
|
-
type: String,
|
|
166
|
-
default: '#fff'
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Adjust the size of the circles
|
|
171
|
-
* @type {Number}
|
|
172
|
-
*/
|
|
173
|
-
circleSize: {
|
|
174
|
-
type: Number,
|
|
175
|
-
default: 68,
|
|
176
|
-
}
|
|
177
|
-
```
|
|
44
|
+
|
|
45
|
+
For an implementation example, see the [App.vue](./src/App.vue) file in the repository.
|
|
46
|
+
|
|
47
|
+
## Props
|
|
48
|
+
|
|
49
|
+
| Prop | Type | Default | Description |
|
|
50
|
+
|-------------------|----------|------------|-----------------------------------------------------------------------------|
|
|
51
|
+
| `step` | Number | `1` | The current step number. |
|
|
52
|
+
| `tabs` | Array | `[]` | Array of step objects with titles and flags for validity and success icons. |
|
|
53
|
+
| `finalize` | Function | `() => {}` | Function to call when the final step is completed. |
|
|
54
|
+
| `backText` | String | `"Back"` | Text displayed on the back button. |
|
|
55
|
+
| `nextText` | String | `"Next"` | Text displayed on the next button. |
|
|
56
|
+
| `doneText` | String | `"Done"` | Text displayed on the done button. |
|
|
57
|
+
| `loading` | Boolean | `false` | Indicates whether the final step is in a loading state. |
|
|
58
|
+
| `primaryColor1` | String | `"orange"` | Primary color for the stepper's theme. |
|
|
59
|
+
| `primaryColor2` | String | `"#fff"` | Secondary color for the stepper's theme. |
|
|
60
|
+
| `backgroundColor` | String | `"#fff"` | Background color for the stepper. |
|
|
61
|
+
| `circleSize` | Number | `68` | Size of the circles in the step indicators. |
|
|
62
|
+
|
|
178
63
|
|
|
179
64
|
## Dependencies
|
|
180
65
|
|
|
@@ -184,6 +69,7 @@ This software uses the following open source packages:
|
|
|
184
69
|
|
|
185
70
|
#### Dev Dependencies
|
|
186
71
|
- [Vite](https://vitejs.dev)
|
|
72
|
+
- [Typescript](https://www.typescriptlang.org/)
|
|
187
73
|
- [sass](https://www.npmjs.com/package/sass)
|
|
188
74
|
- [Eslint](https://eslint.org)
|
|
189
75
|
- [Prettier](https://prettier.io)
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue3-steppy",
|
|
3
3
|
"description": "A customizable Vue 3 Stepper plugin",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.4.0",
|
|
5
|
+
"types": "index.d.ts",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"private": false,
|
|
7
8
|
"author": "Mike Konstantakos",
|
|
@@ -44,19 +45,21 @@
|
|
|
44
45
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
|
|
45
46
|
},
|
|
46
47
|
"dependencies": {
|
|
47
|
-
"vue": "^3.4.
|
|
48
|
+
"vue": "^3.4.21"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
|
-
"@rushstack/eslint-patch": "^1.
|
|
51
|
+
"@rushstack/eslint-patch": "^1.8.0",
|
|
51
52
|
"@vitejs/plugin-vue": "^4.6.2",
|
|
53
|
+
"@vue/cli-plugin-typescript": "^5.0.8",
|
|
52
54
|
"@vue/cli-service": "~5.0.8",
|
|
53
55
|
"@vue/eslint-config-prettier": "^7.1.0",
|
|
54
|
-
"eslint": "^8.
|
|
55
|
-
"eslint-plugin-vue": "^9.
|
|
56
|
+
"eslint": "^8.57.0",
|
|
57
|
+
"eslint-plugin-vue": "^9.23.0",
|
|
56
58
|
"gh-pages": "^5.0.0",
|
|
57
59
|
"prettier": "^2.8.8",
|
|
58
|
-
"sass": "^1.
|
|
59
|
-
"
|
|
60
|
+
"sass": "^1.72.0",
|
|
61
|
+
"typescript": "^5.4.3",
|
|
62
|
+
"vite": "^4.5.2",
|
|
60
63
|
"vite-plugin-css-injected-by-js": "^2.4.0"
|
|
61
64
|
},
|
|
62
65
|
"directories": {
|