@kubex/zinc 1.0.24 → 1.0.98
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/.claude/project.md +556 -0
- package/.github/workflows/js_build_and_deploy.yaml +9 -10
- package/dist/custom-elements.json +13431 -8728
- package/dist/vscode.html-custom-data.json +571 -37
- package/dist/web-types.json +1439 -181
- package/dist/zn.d.ts +1642 -661
- package/dist/zn.min.css +1 -1
- package/dist/zn.min.js +1407 -887
- package/docs/_utilities/code-previews.cjs +10 -1
- package/docs/assets/scripts/docs.js +42 -18
- package/docs/data/data-table.json +229 -66
- package/docs/data/empty.json +6 -0
- package/docs/data/products-table.json +41 -193
- package/docs/pages/components/action-bar.md +121 -6
- package/docs/pages/components/alert.md +118 -15
- package/docs/pages/components/animated-button.md +299 -0
- package/docs/pages/components/audio-select.md +534 -0
- package/docs/pages/components/bulk-actions.md +79 -5
- package/docs/pages/components/button-group.md +235 -27
- package/docs/pages/components/button.md +139 -1
- package/docs/pages/components/chart.md +365 -9
- package/docs/pages/components/checkbox.md +387 -58
- package/docs/pages/components/chip.md +253 -33
- package/docs/pages/components/collapsible.md +393 -46
- package/docs/pages/components/cols.md +152 -30
- package/docs/pages/components/confirm.md +182 -16
- package/docs/pages/components/copy-button.md +169 -6
- package/docs/pages/components/data-select.md +194 -15
- package/docs/pages/components/data-table-filter.md +96 -5
- package/docs/pages/components/data-table-search.md +451 -0
- package/docs/pages/components/data-table-sort.md +66 -5
- package/docs/pages/components/data-table.md +727 -66
- package/docs/pages/components/datepicker.md +402 -7
- package/docs/pages/components/defined-label.md +120 -5
- package/docs/pages/components/dialog.md +339 -59
- package/docs/pages/components/dropdown.md +366 -11
- package/docs/pages/components/editor.md +604 -7
- package/docs/pages/components/empty-state.md +315 -16
- package/docs/pages/components/expanding-action.md +212 -28
- package/docs/pages/components/file.md +421 -12
- package/docs/pages/components/filter-container.md +158 -5
- package/docs/pages/components/filter-wrapper.md +167 -6
- package/docs/pages/components/form-group.md +383 -6
- package/docs/pages/components/hover-container.md +237 -6
- package/docs/pages/components/icon-picker.md +121 -0
- package/docs/pages/components/icon.md +454 -48
- package/docs/pages/components/inline-edit.md +787 -19
- package/docs/pages/components/input-group.md +207 -13
- package/docs/pages/components/input.md +194 -0
- package/docs/pages/components/key-container.md +115 -0
- package/docs/pages/components/key.md +101 -0
- package/docs/pages/components/menu.md +512 -6
- package/docs/pages/components/note.md +239 -36
- package/docs/pages/components/opt-group.md +107 -0
- package/docs/pages/components/pagination.md +332 -6
- package/docs/pages/components/pane.md +222 -6
- package/docs/pages/components/panel.md +213 -26
- package/docs/pages/components/popup.md +1354 -6
- package/docs/pages/components/priority-list.md +233 -0
- package/docs/pages/components/progress-bar.md +387 -6
- package/docs/pages/components/radio-group.md +242 -5
- package/docs/pages/components/radio.md +474 -6
- package/docs/pages/components/rating.md +331 -7
- package/docs/pages/components/reveal.md +524 -6
- package/docs/pages/components/scroll-container.md +552 -6
- package/docs/pages/components/select.md +762 -160
- package/docs/pages/components/skeleton.md +473 -30
- package/docs/pages/components/slideout.md +261 -5
- package/docs/pages/components/sp.md +99 -41
- package/docs/pages/components/split-button.md +347 -9
- package/docs/pages/components/split-pane.md +445 -6
- package/docs/pages/components/stat.md +549 -9
- package/docs/pages/components/status-indicator.md +230 -1
- package/docs/pages/components/stepper.md +563 -6
- package/docs/pages/components/tabs.md +439 -13
- package/docs/pages/components/textarea.md +415 -17
- package/docs/pages/components/tile.md +385 -26
- package/docs/pages/components/toggle.md +424 -6
- package/docs/pages/components/tooltip.md +367 -0
- package/docs/pages/components/translation-group.md +210 -0
- package/docs/pages/components/translations.md +319 -18
- package/docs/pages/components/vertical-stepper.md +401 -8
- package/docs/pages/components/well.md +300 -3
- package/docs/pages/getting-started/form-controls.md +162 -0
- package/docs/pages/index.md +116 -15
- package/package.json +5 -6
- package/scss/_global-spacing.scss +4 -0
- package/scss/_root.scss +2 -2
- package/scss/boot.scss +19 -0
- package/scss/shared/layout.scss +5 -0
- package/scss/themes/_light.scss +3 -3
- package/src/components/alert/alert.scss +1 -0
- package/src/components/animated-button/README.md +306 -0
- package/src/components/animated-button/animated-button.component.ts +229 -0
- package/src/components/animated-button/animated-button.scss +228 -0
- package/src/components/animated-button/animated-button.test.ts +143 -0
- package/src/components/animated-button/index.ts +12 -0
- package/src/components/button/button.component.ts +5 -0
- package/src/components/button-group/button-group.component.ts +25 -13
- package/src/components/button-group/button-group.scss +6 -0
- package/src/components/checkbox/checkbox.component.ts +4 -0
- package/src/components/checkbox/checkbox.scss +7 -4
- package/src/components/checkbox-group/checkbox-group.scss +7 -0
- package/src/components/chip/chip.component.ts +7 -2
- package/src/components/chip/chip.scss +16 -2
- package/src/components/collapsible/collapsible.component.ts +27 -20
- package/src/components/cols/cols.component.ts +14 -2
- package/src/components/cols/cols.scss +6 -12
- package/src/components/confirm/confirm.component.ts +7 -0
- package/src/components/copy-button/copy-button.component.ts +12 -11
- package/src/components/data-select/data-select.component.ts +215 -44
- package/src/components/data-select/data-select.scss +66 -6
- package/src/components/data-select/providers/currency-data-provider.ts +20 -6
- package/src/components/data-select/providers/provider.ts +1 -0
- package/src/components/data-select/providers/us-state-data-provider.ts +68 -0
- package/src/components/data-table/data-table.component.ts +82 -23
- package/src/components/data-table-search/data-table-search.component.ts +184 -0
- package/src/components/data-table-search/data-table-search.scss +17 -0
- package/src/components/data-table-search/data-table-search.test.ts +11 -0
- package/src/components/data-table-search/index.ts +12 -0
- package/src/components/datepicker/datepicker.component.ts +347 -13
- package/src/components/dialog/dialog.component.ts +1 -1
- package/src/components/empty-state/empty-state.scss +6 -1
- package/src/components/header/header.scss +3 -3
- package/src/components/icon/icon.component.ts +23 -1
- package/src/components/icon/icon.scss +23 -0
- package/src/components/icon-picker/brand-icons.ts +24 -0
- package/src/components/icon-picker/icon-picker.component.ts +407 -0
- package/src/components/icon-picker/icon-picker.scss +205 -0
- package/src/components/icon-picker/index.ts +12 -0
- package/src/components/icon-picker/line-icons.ts +612 -0
- package/src/components/icon-picker/material-icons.ts +14543 -0
- package/src/components/inline-edit/inline-edit.component.ts +190 -46
- package/src/components/inline-edit/inline-edit.scss +29 -0
- package/src/components/inline-edit/inline-edit.test.ts +314 -1
- package/src/components/input/input.component.ts +328 -5
- package/src/components/input/input.scss +100 -4
- package/src/components/input-group/input-group.component.ts +28 -7
- package/src/components/input-group/input-group.scss +48 -10
- package/src/components/item/item.component.ts +11 -2
- package/src/components/item/item.scss +7 -0
- package/src/components/key/index.ts +12 -0
- package/src/components/key/key.component.ts +47 -0
- package/src/components/key/key.scss +38 -0
- package/src/components/key-container/index.ts +12 -0
- package/src/components/key-container/key-container.component.ts +142 -0
- package/src/components/key-container/key-container.scss +33 -0
- package/src/components/menu-item/menu-item.component.ts +20 -0
- package/src/components/menu-item/menu-item.scss +69 -2
- package/src/components/navbar/navbar.component.ts +103 -8
- package/src/components/navbar/navbar.scss +6 -1
- package/src/components/opt-group/index.ts +12 -0
- package/src/components/opt-group/opt-group.component.ts +74 -0
- package/src/components/opt-group/opt-group.scss +37 -0
- package/src/components/opt-group/opt-group.test.ts +27 -0
- package/src/components/option/option.component.ts +1 -16
- package/src/components/option/option.scss +4 -0
- package/src/components/panel/panel.component.ts +10 -8
- package/src/components/panel/panel.scss +20 -0
- package/src/components/priority-list/index.ts +12 -0
- package/src/components/priority-list/priority-list.component.ts +611 -0
- package/src/components/priority-list/priority-list.scss +185 -0
- package/src/components/priority-list/priority-list.test.ts +139 -0
- package/src/components/progress-bar/progress-bar.component.ts +22 -16
- package/src/components/radio/radio.scss +10 -3
- package/src/components/select/select.component.ts +812 -72
- package/src/components/select/select.scss +108 -2
- package/src/components/select/select.test.ts +147 -2
- package/src/components/settings-container/settings-container.component.ts +44 -19
- package/src/components/settings-container/settings-container.scss +1 -1
- package/src/components/skeleton/skeleton.component.ts +6 -1
- package/src/components/slideout/slideout.scss +8 -3
- package/src/components/sp/sp.component.ts +3 -1
- package/src/components/sp/sp.scss +19 -0
- package/src/components/stepper/stepper.component.ts +16 -10
- package/src/components/textarea/textarea.scss +0 -4
- package/src/components/tile/tile.component.ts +12 -3
- package/src/components/tile/tile.scss +1 -1
- package/src/components/timer/timer.component.ts +15 -2
- package/src/components/toggle/toggle.component.ts +29 -26
- package/src/components/toggle/toggle.scss +13 -1
- package/src/components/translation-group/index.ts +12 -0
- package/src/components/translation-group/translation-group.component.ts +207 -0
- package/src/components/translation-group/translation-group.scss +8 -0
- package/src/components/translations/translations.component.ts +90 -42
- package/src/components/translations/translations.scss +5 -1
- package/src/components/vertical-stepper/vertical-stepper.component.ts +14 -9
- package/src/events/events.ts +12 -7
- package/src/events/zn-language-change.ts +7 -0
- package/src/events/zn-purchase.ts +11 -0
- package/src/events/zn-redirect.ts +7 -0
- package/src/events/zn-reorder.ts +7 -0
- package/src/events/zn-search-change.ts +11 -0
- package/src/events/zn-submit.ts +1 -1
- package/src/form-control.scss +4 -0
- package/src/internal/form-navigation.ts +510 -0
- package/src/internal/form.ts +6 -0
- package/src/zinc.ts +91 -83
|
@@ -1,22 +1,415 @@
|
|
|
1
1
|
---
|
|
2
2
|
meta:
|
|
3
3
|
title: Vertical Stepper
|
|
4
|
-
description:
|
|
4
|
+
description: Vertical steppers display a sequence of steps in a vertical layout, ideal for showing detailed multi-step processes with individual step descriptions.
|
|
5
5
|
layout: component
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
```html:preview
|
|
9
|
-
<zn-vertical-stepper caption="
|
|
10
|
-
<zn-vertical-stepper caption="
|
|
11
|
-
<zn-vertical-stepper caption="
|
|
9
|
+
<zn-vertical-stepper caption="Create Account" description="Enter your personal information" first active></zn-vertical-stepper>
|
|
10
|
+
<zn-vertical-stepper caption="Verify Email" description="Check your inbox for verification link" active></zn-vertical-stepper>
|
|
11
|
+
<zn-vertical-stepper caption="Complete Profile" description="Add additional details to your profile" last></zn-vertical-stepper>
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
## Examples
|
|
15
15
|
|
|
16
|
-
###
|
|
16
|
+
### Basic Vertical Stepper
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Vertical steppers are composed of individual step items arranged vertically. Use the `first`, `active`, and `last` attributes to control appearance and connection lines.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
```html:preview
|
|
21
|
+
<zn-vertical-stepper caption="Step One" description="This is the first step" first></zn-vertical-stepper>
|
|
22
|
+
<zn-vertical-stepper caption="Step Two" description="This is the second step"></zn-vertical-stepper>
|
|
23
|
+
<zn-vertical-stepper caption="Step Three" description="This is the final step" last></zn-vertical-stepper>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Active State
|
|
27
|
+
|
|
28
|
+
Use the `active` attribute to highlight the current step in the process. The active step is visually distinguished from completed and upcoming steps.
|
|
29
|
+
|
|
30
|
+
```html:preview
|
|
31
|
+
<zn-vertical-stepper caption="Account Created" description="Your account has been created successfully" first></zn-vertical-stepper>
|
|
32
|
+
<zn-vertical-stepper caption="Email Verification" description="Verify your email address" active></zn-vertical-stepper>
|
|
33
|
+
<zn-vertical-stepper caption="Profile Setup" description="Complete your profile information" last></zn-vertical-stepper>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### With Custom Icons
|
|
37
|
+
|
|
38
|
+
Use the `icon` slot to add custom icons or indicators for each step.
|
|
39
|
+
|
|
40
|
+
```html:preview
|
|
41
|
+
<zn-vertical-stepper caption="Personal Details" description="Enter your name and contact information" first active>
|
|
42
|
+
<zn-icon slot="icon" src="person"></zn-icon>
|
|
43
|
+
</zn-vertical-stepper>
|
|
44
|
+
<zn-vertical-stepper caption="Address" description="Provide your shipping address">
|
|
45
|
+
<zn-icon slot="icon" src="home"></zn-icon>
|
|
46
|
+
</zn-vertical-stepper>
|
|
47
|
+
<zn-vertical-stepper caption="Payment" description="Add payment method" last>
|
|
48
|
+
<zn-icon slot="icon" src="credit_card"></zn-icon>
|
|
49
|
+
</zn-vertical-stepper>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Completed Steps with Icons
|
|
53
|
+
|
|
54
|
+
Show completed steps with check marks or success icons.
|
|
55
|
+
|
|
56
|
+
```html:preview
|
|
57
|
+
<zn-vertical-stepper caption="Registration" description="Account created successfully" first>
|
|
58
|
+
<zn-icon slot="icon" src="check_circle" style="color: rgb(var(--zn-success))"></zn-icon>
|
|
59
|
+
</zn-vertical-stepper>
|
|
60
|
+
<zn-vertical-stepper caption="Verification" description="Email verified" active>
|
|
61
|
+
<zn-icon slot="icon" src="check_circle" style="color: rgb(var(--zn-success))"></zn-icon>
|
|
62
|
+
</zn-vertical-stepper>
|
|
63
|
+
<zn-vertical-stepper caption="Payment Setup" description="Add your payment method">
|
|
64
|
+
<zn-icon slot="icon" src="pending" style="color: rgb(var(--zn-text-secondary))"></zn-icon>
|
|
65
|
+
</zn-vertical-stepper>
|
|
66
|
+
<zn-vertical-stepper caption="Complete Profile" description="Upload profile picture" last>
|
|
67
|
+
<zn-icon slot="icon" src="pending" style="color: rgb(var(--zn-text-secondary))"></zn-icon>
|
|
68
|
+
</zn-vertical-stepper>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Order Processing Workflow
|
|
72
|
+
|
|
73
|
+
A practical example showing an order fulfillment process with different step states.
|
|
74
|
+
|
|
75
|
+
```html:preview
|
|
76
|
+
<zn-vertical-stepper caption="Order Received" description="Order #12345 received on Jan 20, 2026" first>
|
|
77
|
+
<zn-icon slot="icon" src="check_circle" style="color: rgb(var(--zn-success))"></zn-icon>
|
|
78
|
+
</zn-vertical-stepper>
|
|
79
|
+
<zn-vertical-stepper caption="Processing" description="Your order is being prepared" active>
|
|
80
|
+
<zn-icon slot="icon" src="shopping_bag" style="color: rgb(var(--zn-primary))"></zn-icon>
|
|
81
|
+
</zn-vertical-stepper>
|
|
82
|
+
<zn-vertical-stepper caption="Shipped" description="Estimated delivery: Jan 25, 2026">
|
|
83
|
+
<zn-icon slot="icon" src="local_shipping" style="color: rgb(var(--zn-text-secondary))"></zn-icon>
|
|
84
|
+
</zn-vertical-stepper>
|
|
85
|
+
<zn-vertical-stepper caption="Delivered" description="Package will arrive at your doorstep" last>
|
|
86
|
+
<zn-icon slot="icon" src="home" style="color: rgb(var(--zn-text-secondary))"></zn-icon>
|
|
87
|
+
</zn-vertical-stepper>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Without First and Last Markers
|
|
91
|
+
|
|
92
|
+
Create continuous step lists by omitting the `first` and `last` attributes when steps are part of a larger scrollable list.
|
|
93
|
+
|
|
94
|
+
```html:preview
|
|
95
|
+
<zn-vertical-stepper caption="Introductory Step" description="Beginning of the process"></zn-vertical-stepper>
|
|
96
|
+
<zn-vertical-stepper caption="Middle Step" description="Ongoing process" active></zn-vertical-stepper>
|
|
97
|
+
<zn-vertical-stepper caption="Another Step" description="More to come"></zn-vertical-stepper>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Installation Progress
|
|
101
|
+
|
|
102
|
+
Show detailed installation or setup progress with descriptive text for each phase.
|
|
103
|
+
|
|
104
|
+
```html:preview
|
|
105
|
+
<zn-vertical-stepper
|
|
106
|
+
caption="Download"
|
|
107
|
+
description="Downloading installer files (45 MB)"
|
|
108
|
+
first>
|
|
109
|
+
<zn-icon slot="icon" src="check_circle" style="color: rgb(var(--zn-success))"></zn-icon>
|
|
110
|
+
</zn-vertical-stepper>
|
|
111
|
+
<zn-vertical-stepper
|
|
112
|
+
caption="Extract"
|
|
113
|
+
description="Extracting packages and dependencies"
|
|
114
|
+
active>
|
|
115
|
+
<zn-icon slot="icon" src="folder_zip" style="color: rgb(var(--zn-primary))"></zn-icon>
|
|
116
|
+
</zn-vertical-stepper>
|
|
117
|
+
<zn-vertical-stepper
|
|
118
|
+
caption="Install"
|
|
119
|
+
description="Installing application components">
|
|
120
|
+
<zn-icon slot="icon" src="pending" style="color: rgb(var(--zn-text-secondary))"></zn-icon>
|
|
121
|
+
</zn-vertical-stepper>
|
|
122
|
+
<zn-vertical-stepper
|
|
123
|
+
caption="Configure"
|
|
124
|
+
description="Setting up initial configuration"
|
|
125
|
+
last>
|
|
126
|
+
<zn-icon slot="icon" src="pending" style="color: rgb(var(--zn-text-secondary))"></zn-icon>
|
|
127
|
+
</zn-vertical-stepper>
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Project Onboarding
|
|
131
|
+
|
|
132
|
+
A multi-step onboarding flow with clear descriptions for each phase.
|
|
133
|
+
|
|
134
|
+
```html:preview
|
|
135
|
+
<zn-vertical-stepper
|
|
136
|
+
caption="Welcome"
|
|
137
|
+
description="Introduction to the platform and key features"
|
|
138
|
+
first>
|
|
139
|
+
<zn-icon slot="icon" src="check_circle" style="color: rgb(var(--zn-success))"></zn-icon>
|
|
140
|
+
</zn-vertical-stepper>
|
|
141
|
+
<zn-vertical-stepper
|
|
142
|
+
caption="Team Setup"
|
|
143
|
+
description="Invite team members and assign roles"
|
|
144
|
+
active>
|
|
145
|
+
<zn-icon slot="icon" src="group_add" style="color: rgb(var(--zn-primary))"></zn-icon>
|
|
146
|
+
</zn-vertical-stepper>
|
|
147
|
+
<zn-vertical-stepper
|
|
148
|
+
caption="Project Configuration"
|
|
149
|
+
description="Set up your first project and workspace">
|
|
150
|
+
<zn-icon slot="icon" src="settings" style="color: rgb(var(--zn-text-secondary))"></zn-icon>
|
|
151
|
+
</zn-vertical-stepper>
|
|
152
|
+
<zn-vertical-stepper
|
|
153
|
+
caption="Integration"
|
|
154
|
+
description="Connect external tools and services">
|
|
155
|
+
<zn-icon slot="icon" src="link" style="color: rgb(var(--zn-text-secondary))"></zn-icon>
|
|
156
|
+
</zn-vertical-stepper>
|
|
157
|
+
<zn-vertical-stepper
|
|
158
|
+
caption="Launch"
|
|
159
|
+
description="Review settings and go live"
|
|
160
|
+
last>
|
|
161
|
+
<zn-icon slot="icon" src="rocket_launch" style="color: rgb(var(--zn-text-secondary))"></zn-icon>
|
|
162
|
+
</zn-vertical-stepper>
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Error State
|
|
166
|
+
|
|
167
|
+
Show error or warning states in your stepper workflow.
|
|
21
168
|
|
|
22
|
-
|
|
169
|
+
```html:preview
|
|
170
|
+
<zn-vertical-stepper
|
|
171
|
+
caption="Validation"
|
|
172
|
+
description="Form validation passed"
|
|
173
|
+
first>
|
|
174
|
+
<zn-icon slot="icon" src="check_circle" style="color: rgb(var(--zn-success))"></zn-icon>
|
|
175
|
+
</zn-vertical-stepper>
|
|
176
|
+
<zn-vertical-stepper
|
|
177
|
+
caption="Payment Processing"
|
|
178
|
+
description="Payment failed - card declined"
|
|
179
|
+
active>
|
|
180
|
+
<zn-icon slot="icon" src="error" style="color: rgb(var(--zn-error))"></zn-icon>
|
|
181
|
+
</zn-vertical-stepper>
|
|
182
|
+
<zn-vertical-stepper
|
|
183
|
+
caption="Confirmation"
|
|
184
|
+
description="Order confirmation email"
|
|
185
|
+
last>
|
|
186
|
+
<zn-icon slot="icon" src="pending" style="color: rgb(var(--zn-text-secondary))"></zn-icon>
|
|
187
|
+
</zn-vertical-stepper>
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Dynamic Vertical Stepper
|
|
191
|
+
|
|
192
|
+
Update vertical stepper states dynamically based on user actions.
|
|
193
|
+
|
|
194
|
+
```html:preview
|
|
195
|
+
<div id="dynamic-vertical-steps">
|
|
196
|
+
<zn-vertical-stepper
|
|
197
|
+
id="v-step-1"
|
|
198
|
+
caption="Step 1"
|
|
199
|
+
description="Complete this step"
|
|
200
|
+
first
|
|
201
|
+
active>
|
|
202
|
+
<zn-icon slot="icon" src="radio_button_checked"></zn-icon>
|
|
203
|
+
</zn-vertical-stepper>
|
|
204
|
+
<zn-vertical-stepper
|
|
205
|
+
id="v-step-2"
|
|
206
|
+
caption="Step 2"
|
|
207
|
+
description="Pending">
|
|
208
|
+
<zn-icon slot="icon" src="radio_button_unchecked"></zn-icon>
|
|
209
|
+
</zn-vertical-stepper>
|
|
210
|
+
<zn-vertical-stepper
|
|
211
|
+
id="v-step-3"
|
|
212
|
+
caption="Step 3"
|
|
213
|
+
description="Pending"
|
|
214
|
+
last>
|
|
215
|
+
<zn-icon slot="icon" src="radio_button_unchecked"></zn-icon>
|
|
216
|
+
</zn-vertical-stepper>
|
|
217
|
+
</div>
|
|
218
|
+
<br />
|
|
219
|
+
<zn-button id="v-next-step">Complete Current Step</zn-button>
|
|
220
|
+
<zn-button id="v-reset" color="secondary">Reset</zn-button>
|
|
221
|
+
|
|
222
|
+
<script type="module">
|
|
223
|
+
let currentVStep = 1;
|
|
224
|
+
const maxVSteps = 3;
|
|
225
|
+
|
|
226
|
+
const nextBtn = document.getElementById('v-next-step');
|
|
227
|
+
const resetBtn = document.getElementById('v-reset');
|
|
228
|
+
|
|
229
|
+
function updateVerticalSteps() {
|
|
230
|
+
for (let i = 1; i <= maxVSteps; i++) {
|
|
231
|
+
const step = document.getElementById(`v-step-${i}`);
|
|
232
|
+
const icon = step.querySelector('zn-icon');
|
|
233
|
+
|
|
234
|
+
if (i < currentVStep) {
|
|
235
|
+
// Completed step
|
|
236
|
+
step.removeAttribute('active');
|
|
237
|
+
icon.setAttribute('src', 'check_circle');
|
|
238
|
+
icon.style.color = 'rgb(var(--zn-success))';
|
|
239
|
+
step.description = 'Completed';
|
|
240
|
+
} else if (i === currentVStep) {
|
|
241
|
+
// Active step
|
|
242
|
+
step.setAttribute('active', '');
|
|
243
|
+
icon.setAttribute('src', 'radio_button_checked');
|
|
244
|
+
icon.style.color = 'rgb(var(--zn-primary))';
|
|
245
|
+
step.description = 'In Progress';
|
|
246
|
+
} else {
|
|
247
|
+
// Future step
|
|
248
|
+
step.removeAttribute('active');
|
|
249
|
+
icon.setAttribute('src', 'radio_button_unchecked');
|
|
250
|
+
icon.style.color = 'rgb(var(--zn-text-secondary))';
|
|
251
|
+
step.description = 'Pending';
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
if (currentVStep > maxVSteps) {
|
|
256
|
+
nextBtn.disabled = true;
|
|
257
|
+
} else {
|
|
258
|
+
nextBtn.disabled = false;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
nextBtn.addEventListener('click', () => {
|
|
263
|
+
if (currentVStep <= maxVSteps) {
|
|
264
|
+
currentVStep++;
|
|
265
|
+
updateVerticalSteps();
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
resetBtn.addEventListener('click', () => {
|
|
270
|
+
currentVStep = 1;
|
|
271
|
+
updateVerticalSteps();
|
|
272
|
+
});
|
|
273
|
+
</script>
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### Compact Vertical Stepper
|
|
277
|
+
|
|
278
|
+
Create a more compact layout by adjusting spacing with CSS.
|
|
279
|
+
|
|
280
|
+
```html:preview
|
|
281
|
+
<div class="compact-stepper">
|
|
282
|
+
<zn-vertical-stepper caption="Login" description="User authenticated" first>
|
|
283
|
+
<zn-icon slot="icon" src="check_circle" style="color: rgb(var(--zn-success))"></zn-icon>
|
|
284
|
+
</zn-vertical-stepper>
|
|
285
|
+
<zn-vertical-stepper caption="Dashboard" description="Loading user data" active>
|
|
286
|
+
<zn-icon slot="icon" src="dashboard"></zn-icon>
|
|
287
|
+
</zn-vertical-stepper>
|
|
288
|
+
<zn-vertical-stepper caption="Reports" description="View analytics" last>
|
|
289
|
+
<zn-icon slot="icon" src="bar_chart"></zn-icon>
|
|
290
|
+
</zn-vertical-stepper>
|
|
291
|
+
</div>
|
|
292
|
+
|
|
293
|
+
<style>
|
|
294
|
+
.compact-stepper zn-vertical-stepper {
|
|
295
|
+
margin: 8px 0;
|
|
296
|
+
}
|
|
297
|
+
</style>
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
## Integration Patterns
|
|
301
|
+
|
|
302
|
+
### Combined with Horizontal Stepper
|
|
303
|
+
|
|
304
|
+
Combine vertical and horizontal steppers for complex workflows where the horizontal stepper shows high-level progress and vertical steppers show detailed sub-steps.
|
|
305
|
+
|
|
306
|
+
```html:preview
|
|
307
|
+
<zn-stepper
|
|
308
|
+
label="Account Setup Process"
|
|
309
|
+
caption="Step 2: Profile Configuration"
|
|
310
|
+
steps="3"
|
|
311
|
+
value="2"
|
|
312
|
+
show-progress>
|
|
313
|
+
</zn-stepper>
|
|
314
|
+
<br /><br />
|
|
315
|
+
<div style="padding-left: 20px;">
|
|
316
|
+
<zn-vertical-stepper
|
|
317
|
+
caption="Basic Info"
|
|
318
|
+
description="Name, email, and contact details"
|
|
319
|
+
first>
|
|
320
|
+
<zn-icon slot="icon" src="check_circle" style="color: rgb(var(--zn-success))"></zn-icon>
|
|
321
|
+
</zn-vertical-stepper>
|
|
322
|
+
<zn-vertical-stepper
|
|
323
|
+
caption="Profile Photo"
|
|
324
|
+
description="Upload your profile picture"
|
|
325
|
+
active>
|
|
326
|
+
<zn-icon slot="icon" src="photo_camera" style="color: rgb(var(--zn-primary))"></zn-icon>
|
|
327
|
+
</zn-vertical-stepper>
|
|
328
|
+
<zn-vertical-stepper
|
|
329
|
+
caption="Preferences"
|
|
330
|
+
description="Set notification and privacy settings"
|
|
331
|
+
last>
|
|
332
|
+
<zn-icon slot="icon" src="tune" style="color: rgb(var(--zn-text-secondary))"></zn-icon>
|
|
333
|
+
</zn-vertical-stepper>
|
|
334
|
+
</div>
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### With Action Buttons
|
|
338
|
+
|
|
339
|
+
Add interactive elements next to each step for expanded functionality.
|
|
340
|
+
|
|
341
|
+
```html:preview
|
|
342
|
+
<div style="display: flex; align-items: center; gap: 10px;">
|
|
343
|
+
<div style="flex: 1;">
|
|
344
|
+
<zn-vertical-stepper
|
|
345
|
+
caption="Review Changes"
|
|
346
|
+
description="Check all modifications before committing"
|
|
347
|
+
first
|
|
348
|
+
active>
|
|
349
|
+
<zn-icon slot="icon" src="preview"></zn-icon>
|
|
350
|
+
</zn-vertical-stepper>
|
|
351
|
+
</div>
|
|
352
|
+
<zn-button size="small" icon="edit" color="transparent">Edit</zn-button>
|
|
353
|
+
</div>
|
|
354
|
+
<div style="display: flex; align-items: center; gap: 10px;">
|
|
355
|
+
<div style="flex: 1;">
|
|
356
|
+
<zn-vertical-stepper
|
|
357
|
+
caption="Run Tests"
|
|
358
|
+
description="Execute test suite">
|
|
359
|
+
<zn-icon slot="icon" src="pending"></zn-icon>
|
|
360
|
+
</zn-vertical-stepper>
|
|
361
|
+
</div>
|
|
362
|
+
<zn-button size="small" icon="play_arrow" color="transparent" disabled>Run</zn-button>
|
|
363
|
+
</div>
|
|
364
|
+
<div style="display: flex; align-items: center; gap: 10px;">
|
|
365
|
+
<div style="flex: 1;">
|
|
366
|
+
<zn-vertical-stepper
|
|
367
|
+
caption="Deploy"
|
|
368
|
+
description="Push changes to production"
|
|
369
|
+
last>
|
|
370
|
+
<zn-icon slot="icon" src="pending"></zn-icon>
|
|
371
|
+
</zn-vertical-stepper>
|
|
372
|
+
</div>
|
|
373
|
+
<zn-button size="small" icon="publish" color="transparent" disabled>Deploy</zn-button>
|
|
374
|
+
</div>
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### Nested Steps
|
|
378
|
+
|
|
379
|
+
Show hierarchical relationships by nesting vertical steppers or indenting them.
|
|
380
|
+
|
|
381
|
+
```html:preview
|
|
382
|
+
<zn-vertical-stepper
|
|
383
|
+
caption="Phase 1: Planning"
|
|
384
|
+
description="Define project scope and requirements"
|
|
385
|
+
first>
|
|
386
|
+
<zn-icon slot="icon" src="check_circle" style="color: rgb(var(--zn-success))"></zn-icon>
|
|
387
|
+
</zn-vertical-stepper>
|
|
388
|
+
|
|
389
|
+
<div style="padding-left: 40px;">
|
|
390
|
+
<zn-vertical-stepper
|
|
391
|
+
caption="1.1 Research"
|
|
392
|
+
description="Market analysis completed">
|
|
393
|
+
<zn-icon slot="icon" src="check_circle" style="color: rgb(var(--zn-success))"></zn-icon>
|
|
394
|
+
</zn-vertical-stepper>
|
|
395
|
+
<zn-vertical-stepper
|
|
396
|
+
caption="1.2 Design"
|
|
397
|
+
description="Wireframes and mockups">
|
|
398
|
+
<zn-icon slot="icon" src="check_circle" style="color: rgb(var(--zn-success))"></zn-icon>
|
|
399
|
+
</zn-vertical-stepper>
|
|
400
|
+
</div>
|
|
401
|
+
|
|
402
|
+
<zn-vertical-stepper
|
|
403
|
+
caption="Phase 2: Development"
|
|
404
|
+
description="Build and test features"
|
|
405
|
+
active>
|
|
406
|
+
<zn-icon slot="icon" src="code" style="color: rgb(var(--zn-primary))"></zn-icon>
|
|
407
|
+
</zn-vertical-stepper>
|
|
408
|
+
|
|
409
|
+
<zn-vertical-stepper
|
|
410
|
+
caption="Phase 3: Deployment"
|
|
411
|
+
description="Release to production"
|
|
412
|
+
last>
|
|
413
|
+
<zn-icon slot="icon" src="pending"></zn-icon>
|
|
414
|
+
</zn-vertical-stepper>
|
|
415
|
+
```
|