@softwareone/spi-sv5-library 0.1.3 → 1.1.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 +75 -19
- package/dist/Avatar/Avatar.svelte +33 -0
- package/dist/Avatar/Avatar.svelte.d.ts +10 -0
- package/dist/Breadcrumbs/Breadcrumbs.svelte +10 -20
- package/dist/Button/Button.svelte +66 -115
- package/dist/Button/Button.svelte.d.ts +8 -6
- package/dist/Card/Card.svelte +18 -44
- package/dist/Card/Card.svelte.d.ts +1 -1
- package/dist/Chips/Chips.svelte +40 -46
- package/dist/Chips/Chips.svelte.d.ts +2 -1
- package/dist/Chips/chipsState.svelte.d.ts +7 -0
- package/dist/Chips/chipsState.svelte.js +8 -0
- package/dist/ErrorPage/ErrorPage.svelte +96 -0
- package/dist/ErrorPage/ErrorPage.svelte.d.ts +7 -0
- package/dist/Footer/Footer.svelte +29 -135
- package/dist/Footer/Footer.svelte.d.ts +1 -1
- package/dist/Form/Input/Input.svelte +393 -0
- package/dist/Form/Input/Input.svelte.d.ts +14 -0
- package/dist/Form/Input/InputIcon.svelte +97 -0
- package/dist/Form/Input/InputIcon.svelte.d.ts +9 -0
- package/dist/Form/TextArea/TextArea.svelte +260 -0
- package/dist/Form/TextArea/TextArea.svelte.d.ts +13 -0
- package/dist/Form/Toggle/Toggle.svelte +120 -0
- package/dist/{Toggle → Form/Toggle}/Toggle.svelte.d.ts +4 -3
- package/dist/Header/Header.svelte +54 -136
- package/dist/Header/Header.svelte.d.ts +2 -2
- package/dist/Header/HeaderAccount.svelte +14 -35
- package/dist/Header/HeaderLoader.svelte +2 -2
- package/dist/Header/HeaderLogo.svelte +7 -4
- package/dist/Header/HeaderLogo.svelte.d.ts +14 -6
- package/dist/HighlightPanel/HighlightPanel.svelte +125 -0
- package/dist/HighlightPanel/HighlightPanel.svelte.d.ts +10 -0
- package/dist/HighlightPanel/highlightPanelState.svelte.d.ts +35 -0
- package/dist/HighlightPanel/highlightPanelState.svelte.js +13 -0
- package/dist/Menu/Menu.svelte +158 -0
- package/dist/Menu/Menu.svelte.d.ts +8 -0
- package/dist/Menu/MenuItem.svelte +149 -0
- package/dist/Menu/MenuItem.svelte.d.ts +11 -0
- package/dist/Menu/Sidebar.svelte +228 -0
- package/dist/Menu/Sidebar.svelte.d.ts +11 -0
- package/dist/Menu/SidebarState.svelte.d.ts +6 -0
- package/dist/Menu/SidebarState.svelte.js +1 -0
- package/dist/Modal/Modal.svelte +81 -29
- package/dist/Modal/Modal.svelte.d.ts +2 -9
- package/dist/Modal/ModalContent.svelte +8 -88
- package/dist/Modal/ModalContent.svelte.d.ts +2 -3
- package/dist/Modal/ModalFooter.svelte +21 -66
- package/dist/Modal/ModalFooter.svelte.d.ts +5 -5
- package/dist/Modal/ModalHeader.svelte +50 -34
- package/dist/Modal/ModalHeader.svelte.d.ts +5 -4
- package/dist/Modal/modalState.svelte.d.ts +15 -0
- package/dist/Modal/modalState.svelte.js +1 -0
- package/dist/ProgressWizard/ProgressWizard.svelte +273 -294
- package/dist/ProgressWizard/ProgressWizard.svelte.d.ts +11 -13
- package/dist/ProgressWizard/progressWizardState.svelte.d.ts +6 -0
- package/dist/ProgressWizard/progressWizardState.svelte.js +1 -0
- package/dist/Search/Search.svelte +154 -0
- package/dist/Search/Search.svelte.d.ts +10 -0
- package/dist/Tabs/Tabs.svelte +111 -0
- package/dist/Tabs/Tabs.svelte.d.ts +8 -0
- package/dist/Tabs/tabsState.svelte.d.ts +7 -0
- package/dist/Tabs/tabsState.svelte.js +1 -0
- package/dist/Toast/Toast.svelte +116 -49
- package/dist/Toast/toastState.svelte.d.ts +7 -3
- package/dist/Toast/toastState.svelte.js +13 -10
- package/dist/Tooltip/Tooltip.svelte +168 -0
- package/dist/Tooltip/Tooltip.svelte.d.ts +13 -0
- package/dist/assets/icons/feedback.svg +5 -0
- package/dist/index.d.ts +28 -8
- package/dist/index.js +24 -9
- package/package.json +4 -5
- package/dist/Toggle/Toggle.svelte +0 -170
|
@@ -1,370 +1,349 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
title: string;
|
|
6
|
-
description: string;
|
|
7
|
-
isValid?: boolean;
|
|
8
|
-
}
|
|
2
|
+
import { type Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
import { Button, ErrorPage, type ProgressWizardStep } from '../index.js';
|
|
9
5
|
|
|
10
|
-
interface
|
|
11
|
-
steps:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
interface ProgressWizardProps {
|
|
7
|
+
steps: ProgressWizardStep[];
|
|
8
|
+
readonly?: boolean;
|
|
9
|
+
currentStep: number;
|
|
10
|
+
lastActiveStep: number;
|
|
11
|
+
content: Snippet;
|
|
12
|
+
additionalButtons: Snippet;
|
|
13
|
+
oncancel: VoidFunction;
|
|
17
14
|
}
|
|
18
15
|
|
|
19
16
|
let {
|
|
20
|
-
steps
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const goToStep = (step: number) => {
|
|
37
|
-
if (step <= steps.length) {
|
|
38
|
-
for (let i = 1; i <= step; i++) {
|
|
39
|
-
completedSteps.add(i);
|
|
40
|
-
}
|
|
41
|
-
currentStep = step;
|
|
42
|
-
}
|
|
17
|
+
steps,
|
|
18
|
+
readonly = false,
|
|
19
|
+
currentStep = $bindable(0),
|
|
20
|
+
lastActiveStep = $bindable(0),
|
|
21
|
+
content,
|
|
22
|
+
additionalButtons,
|
|
23
|
+
oncancel
|
|
24
|
+
}: ProgressWizardProps = $props();
|
|
25
|
+
|
|
26
|
+
const allStepsDisabled: boolean = steps.every((step) => step.disabled);
|
|
27
|
+
const firstActiveStep: number = steps.findIndex((step) => !step.disabled) + 1;
|
|
28
|
+
|
|
29
|
+
const onclickNext = () => {
|
|
30
|
+
const nextStepIndex = steps.slice(currentStep).findIndex((step) => !step.disabled);
|
|
31
|
+
currentStep = currentStep + nextStepIndex + 1;
|
|
43
32
|
};
|
|
44
33
|
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
} else {
|
|
53
|
-
addToast({
|
|
54
|
-
type: 'success',
|
|
55
|
-
message: 'Form submitted successfully!'
|
|
56
|
-
});
|
|
57
|
-
}
|
|
34
|
+
const onclickBack = () => {
|
|
35
|
+
const previousStepIndex = steps
|
|
36
|
+
.slice(0, currentStep - 1)
|
|
37
|
+
.reverse()
|
|
38
|
+
.findIndex((step) => !step.disabled);
|
|
39
|
+
|
|
40
|
+
currentStep = currentStep - previousStepIndex - 1;
|
|
58
41
|
};
|
|
59
42
|
|
|
60
|
-
const
|
|
61
|
-
if (
|
|
43
|
+
const stepToStart = (): number => {
|
|
44
|
+
if (readonly && allStepsDisabled) return -1;
|
|
45
|
+
|
|
46
|
+
if (readonly && !allStepsDisabled) return steps.length;
|
|
47
|
+
|
|
48
|
+
return firstActiveStep;
|
|
62
49
|
};
|
|
63
50
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
51
|
+
currentStep = stepToStart();
|
|
52
|
+
lastActiveStep = steps.findLastIndex((step) => !step.disabled) + 1;
|
|
53
|
+
|
|
54
|
+
$effect(() => {
|
|
55
|
+
if (!readonly) {
|
|
56
|
+
currentStep = firstActiveStep;
|
|
67
57
|
}
|
|
68
|
-
};
|
|
58
|
+
});
|
|
69
59
|
</script>
|
|
70
60
|
|
|
71
61
|
<div class="progress-wizard">
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
62
|
+
<section class="progress-wizard-container">
|
|
63
|
+
<ol class={['progress-wizard-steps', readonly ? 'readonly' : 'editing-mode']}>
|
|
64
|
+
{#each steps as step, index}
|
|
65
|
+
{@const stepIndex = index + 1}
|
|
66
|
+
{@const isActive = stepIndex === currentStep}
|
|
67
|
+
{@const isPreviousStep = currentStep > stepIndex}
|
|
68
|
+
{@const isValid = isPreviousStep && step.isValid}
|
|
69
|
+
{@const isInvalid = isPreviousStep && !step.isValid}
|
|
70
|
+
{@const disabled = step.disabled}
|
|
71
|
+
|
|
72
|
+
{@const circleContent = (): string => {
|
|
73
|
+
if (isActive) return stepIndex.toString();
|
|
74
|
+
if (readonly || disabled) return 'ー';
|
|
75
|
+
if (isValid) return '✔';
|
|
76
|
+
if (isInvalid) return '✖';
|
|
77
|
+
return stepIndex.toString();
|
|
78
|
+
}}
|
|
79
|
+
|
|
80
|
+
<li
|
|
81
|
+
class={[
|
|
82
|
+
'progress-wizard-step',
|
|
83
|
+
isActive && 'active',
|
|
84
|
+
!readonly && [
|
|
85
|
+
isPreviousStep && 'previous',
|
|
86
|
+
isValid && 'valid',
|
|
87
|
+
isInvalid && 'invalid',
|
|
88
|
+
disabled && 'disabled'
|
|
89
|
+
]
|
|
90
|
+
]}
|
|
91
|
+
>
|
|
92
|
+
<div class="time-line">
|
|
93
|
+
<span class="circle">
|
|
94
|
+
{circleContent()}
|
|
95
|
+
</span>
|
|
96
|
+
<span class="line"></span>
|
|
97
|
+
</div>
|
|
98
|
+
<button
|
|
99
|
+
class="details"
|
|
100
|
+
disabled={disabled || readonly}
|
|
101
|
+
onclick={() => (currentStep = stepIndex)}
|
|
102
|
+
>
|
|
103
|
+
<h2>{step.title}</h2>
|
|
104
|
+
{#if step.description}
|
|
105
|
+
<p>{step.description}</p>
|
|
106
|
+
{/if}
|
|
107
|
+
</button>
|
|
108
|
+
</li>
|
|
109
|
+
{/each}
|
|
110
|
+
</ol>
|
|
111
|
+
<article class="progress-wizard-content">
|
|
112
|
+
{#if allStepsDisabled}
|
|
113
|
+
<ErrorPage status={403} title="All steps disabled" />
|
|
114
|
+
{:else}
|
|
115
|
+
{@render content()}
|
|
80
116
|
{/if}
|
|
81
|
-
</
|
|
82
|
-
</
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
117
|
+
</article>
|
|
118
|
+
</section>
|
|
119
|
+
<section class="progress-wizard-footer">
|
|
120
|
+
<Button variant="outline-none" onclick={oncancel}>Cancel</Button>
|
|
121
|
+
|
|
122
|
+
<div class="actions">
|
|
123
|
+
{#if !allStepsDisabled}
|
|
124
|
+
{#if !readonly}
|
|
125
|
+
<Button
|
|
126
|
+
variant="secondary"
|
|
127
|
+
disabled={currentStep === firstActiveStep}
|
|
128
|
+
onclick={onclickBack}>Back</Button
|
|
93
129
|
>
|
|
94
|
-
<button
|
|
95
|
-
type="button"
|
|
96
|
-
onclick={() => goToStep(index + 1)}
|
|
97
|
-
class="step-button"
|
|
98
|
-
class:done={index + 1 < currentStep}
|
|
99
|
-
>
|
|
100
|
-
<div class="step-line-wrapper">
|
|
101
|
-
{#if index < steps.length - 1}
|
|
102
|
-
<div class="step-line"></div>
|
|
103
|
-
{/if}
|
|
104
|
-
<span class="step-icon" class:error={!step.isValid && index + 1 < currentStep}>
|
|
105
|
-
{#if index + 1 < currentStep && step.isValid}
|
|
106
|
-
✔
|
|
107
|
-
{:else if !step.isValid && index + 1 < currentStep}
|
|
108
|
-
x
|
|
109
|
-
{:else}
|
|
110
|
-
{index + 1}
|
|
111
|
-
{/if}
|
|
112
|
-
</span>
|
|
113
|
-
</div>
|
|
114
|
-
<div class="step-details">
|
|
115
|
-
<strong>{step.title}</strong>
|
|
116
|
-
<small>{step.description}</small>
|
|
117
|
-
</div>
|
|
118
|
-
</button>
|
|
119
|
-
</li>
|
|
120
|
-
{/each}
|
|
121
|
-
</ol>
|
|
122
|
-
</div>
|
|
123
130
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
{
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
<!-- Footer -->
|
|
133
|
-
<div class="progress-footer">
|
|
134
|
-
<button class="btn link">Cancel</button>
|
|
135
|
-
<div class="action-buttons">
|
|
136
|
-
<button class="btn secondary" onclick={previousStep} disabled={currentStep === 1}>Back</button
|
|
137
|
-
>
|
|
138
|
-
<button
|
|
139
|
-
class="btn primary"
|
|
140
|
-
onclick={nextStep}
|
|
141
|
-
disabled={currentStep === steps.length && !isFormValid}
|
|
142
|
-
>
|
|
143
|
-
{currentStep === steps.length ? 'Create' : 'Next'}
|
|
144
|
-
</button>
|
|
131
|
+
{#if currentStep < lastActiveStep}
|
|
132
|
+
<Button variant="primary" onclick={onclickNext}>Next</Button>
|
|
133
|
+
{/if}
|
|
134
|
+
{/if}
|
|
135
|
+
|
|
136
|
+
{@render additionalButtons()}
|
|
137
|
+
{/if}
|
|
145
138
|
</div>
|
|
146
|
-
</
|
|
139
|
+
</section>
|
|
147
140
|
</div>
|
|
148
141
|
|
|
149
142
|
<style>
|
|
150
|
-
/* Layout */
|
|
151
143
|
.progress-wizard {
|
|
144
|
+
--primary-color: #472aff;
|
|
145
|
+
--red-5: #c41e3a;
|
|
146
|
+
--red-2: #fdedec;
|
|
147
|
+
--info-1: #eaecff;
|
|
148
|
+
--gray-1: #f4f6f8;
|
|
149
|
+
--gray-2: #e0e5e8;
|
|
150
|
+
--gray-3: #aeb1b9;
|
|
151
|
+
--gray-4: #6b7180;
|
|
152
|
+
--border-wizard: 1px solid var(--gray-3);
|
|
153
|
+
--circle-size: 32px;
|
|
154
|
+
|
|
152
155
|
display: flex;
|
|
153
156
|
flex-direction: column;
|
|
154
157
|
width: 100%;
|
|
155
|
-
|
|
156
|
-
margin: 0 auto;
|
|
157
|
-
background: #fff;
|
|
158
|
-
border-radius: 8px;
|
|
159
|
-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
160
|
-
overflow: hidden;
|
|
161
|
-
font-family: 'Haas Grotesk Display Pro', sans-serif;
|
|
162
|
-
font-size: 14px;
|
|
158
|
+
height: 100vh;
|
|
163
159
|
}
|
|
164
160
|
|
|
165
|
-
.progress-
|
|
161
|
+
.progress-wizard-container {
|
|
166
162
|
display: flex;
|
|
167
|
-
|
|
163
|
+
flex: 1;
|
|
168
164
|
}
|
|
169
165
|
|
|
170
|
-
.progress-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
border-right:
|
|
166
|
+
.progress-wizard-steps {
|
|
167
|
+
display: flex;
|
|
168
|
+
flex-direction: column;
|
|
169
|
+
width: fit-content;
|
|
170
|
+
max-width: 250px;
|
|
171
|
+
border-right: var(--border-wizard);
|
|
176
172
|
}
|
|
177
173
|
|
|
178
|
-
.progress-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
174
|
+
.progress-wizard-step {
|
|
175
|
+
display: grid;
|
|
176
|
+
grid-template-columns: auto 1fr;
|
|
177
|
+
max-height: 70px;
|
|
178
|
+
padding: 16px 24px;
|
|
179
|
+
gap: 8px;
|
|
180
|
+
align-items: center;
|
|
181
|
+
border: none;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
.time-line {
|
|
185
|
+
position: relative;
|
|
186
186
|
display: flex;
|
|
187
|
+
flex-direction: column;
|
|
187
188
|
align-items: center;
|
|
188
|
-
justify-content: space-between;
|
|
189
|
-
padding: 24px;
|
|
190
|
-
gap: var(--spacing-2, 16px);
|
|
191
|
-
border-bottom: 2px solid transparent;
|
|
192
|
-
border-image: linear-gradient(259deg, #00c9cd 16.32%, #472aff 59.03%, #392d9c 99.99%);
|
|
193
|
-
border-image-slice: 1;
|
|
194
189
|
}
|
|
195
190
|
|
|
196
|
-
.
|
|
197
|
-
color: var(--brand-type, #000);
|
|
198
|
-
font-size: 18px;
|
|
199
|
-
font-weight: 600;
|
|
200
|
-
line-height: 26px;
|
|
201
|
-
flex: 1 0 0;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.progress-header .header-actions button span {
|
|
205
|
-
font-size: 24px;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/* Sidebar Steps */
|
|
209
|
-
.progress-sidebar ol {
|
|
210
|
-
list-style: none;
|
|
211
|
-
padding: 0;
|
|
212
|
-
margin: 0;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.progress-sidebar li {
|
|
191
|
+
.circle {
|
|
216
192
|
display: flex;
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
193
|
+
width: var(--circle-size);
|
|
194
|
+
height: var(--circle-size);
|
|
195
|
+
align-items: center;
|
|
196
|
+
justify-content: center;
|
|
197
|
+
font-size: 12px;
|
|
198
|
+
font-weight: 600;
|
|
199
|
+
border-radius: 50%;
|
|
200
|
+
background: var(--info-1);
|
|
201
|
+
color: var(--primary-color);
|
|
222
202
|
}
|
|
223
203
|
|
|
224
|
-
.
|
|
225
|
-
|
|
204
|
+
.line {
|
|
205
|
+
position: absolute;
|
|
206
|
+
top: var(--circle-size);
|
|
207
|
+
width: 1px;
|
|
208
|
+
height: 50px;
|
|
209
|
+
background: var(--gray-2);
|
|
210
|
+
transition: background 500ms ease;
|
|
226
211
|
}
|
|
227
212
|
|
|
228
|
-
.progress-
|
|
229
|
-
|
|
213
|
+
.progress-wizard-step:last-child .time-line .line {
|
|
214
|
+
display: none;
|
|
230
215
|
}
|
|
231
216
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
border-radius: 4px;
|
|
217
|
+
.details {
|
|
218
|
+
padding: 4px 8px;
|
|
219
|
+
text-align: left;
|
|
220
|
+
border: none;
|
|
221
|
+
border-radius: 8px;
|
|
222
|
+
background: transparent;
|
|
239
223
|
cursor: pointer;
|
|
240
|
-
transition: background 0.3s;
|
|
241
|
-
}
|
|
242
224
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
225
|
+
h2 {
|
|
226
|
+
font-size: 16px;
|
|
227
|
+
font-weight: 600;
|
|
228
|
+
color: #000;
|
|
229
|
+
}
|
|
247
230
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
231
|
+
p {
|
|
232
|
+
font-size: 12px;
|
|
233
|
+
word-break: keep-all;
|
|
234
|
+
color: var(--gray-4);
|
|
235
|
+
}
|
|
252
236
|
}
|
|
253
237
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
width: 24px;
|
|
257
|
-
height: 24px;
|
|
258
|
-
display: flex;
|
|
259
|
-
align-items: center;
|
|
260
|
-
justify-content: center;
|
|
261
|
-
background: var(--brand-alert-1, #eaecff);
|
|
262
|
-
border: 2px solid var(--brand-alert-1, #eaecff);
|
|
263
|
-
border-radius: 50%;
|
|
264
|
-
margin-right: 10px;
|
|
265
|
-
font-size: 0.9rem;
|
|
266
|
-
color: var(--brand-primary, #472aff);
|
|
238
|
+
.details:hover {
|
|
239
|
+
background: var(--gray-1);
|
|
267
240
|
}
|
|
268
241
|
|
|
269
|
-
|
|
270
|
-
background: var(--
|
|
271
|
-
|
|
272
|
-
|
|
242
|
+
.details:focus-visible:not(:disabled) {
|
|
243
|
+
background: var(--gray-1);
|
|
244
|
+
box-shadow: 0px 0px 0px 3px var(--info-1);
|
|
245
|
+
outline: none;
|
|
273
246
|
}
|
|
274
247
|
|
|
275
|
-
.
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
border-color: var(--alerts-danger-3, #bb1425);
|
|
248
|
+
.progress-wizard-content {
|
|
249
|
+
flex: 1;
|
|
250
|
+
padding: 24px;
|
|
279
251
|
}
|
|
280
252
|
|
|
281
|
-
.
|
|
282
|
-
position: relative;
|
|
253
|
+
.progress-wizard-footer {
|
|
283
254
|
display: flex;
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
justify-content: flex-start;
|
|
287
|
-
margin-right: 10px;
|
|
288
|
-
}
|
|
255
|
+
padding: 24px;
|
|
256
|
+
border-top: var(--border-wizard);
|
|
289
257
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
top: 100%;
|
|
296
|
-
left: 37%;
|
|
297
|
-
transform: translateX(-50%);
|
|
298
|
-
z-index: 0;
|
|
299
|
-
transition: background 0.3s ease;
|
|
258
|
+
.actions {
|
|
259
|
+
display: flex;
|
|
260
|
+
gap: 12px;
|
|
261
|
+
margin-left: auto;
|
|
262
|
+
}
|
|
300
263
|
}
|
|
301
264
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
265
|
+
.progress-wizard-step.active {
|
|
266
|
+
.time-line .circle {
|
|
267
|
+
border: 2px solid var(--primary-color);
|
|
268
|
+
}
|
|
306
269
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
flex-direction: column;
|
|
311
|
-
}
|
|
270
|
+
.details {
|
|
271
|
+
box-shadow: none;
|
|
272
|
+
background: transparent;
|
|
312
273
|
|
|
313
|
-
|
|
314
|
-
|
|
274
|
+
h2,
|
|
275
|
+
p {
|
|
276
|
+
color: var(--primary-color);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
315
279
|
}
|
|
316
280
|
|
|
317
|
-
.
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
281
|
+
.progress-wizard-steps:is(.readonly) {
|
|
282
|
+
.progress-wizard-step:not(.active) {
|
|
283
|
+
.line {
|
|
284
|
+
background: var(--gray-2);
|
|
285
|
+
}
|
|
321
286
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
287
|
+
.circle {
|
|
288
|
+
border: 2px solid var(--gray-2);
|
|
289
|
+
background: var(--gray-2);
|
|
290
|
+
color: var(--gray-4);
|
|
291
|
+
}
|
|
325
292
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
293
|
+
.details {
|
|
294
|
+
h2 {
|
|
295
|
+
color: var(--gray-4);
|
|
296
|
+
}
|
|
297
|
+
p {
|
|
298
|
+
color: var(--gray-3);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
334
301
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
cursor: pointer;
|
|
341
|
-
font-size: 0.9rem;
|
|
302
|
+
.details:hover {
|
|
303
|
+
background: transparent;
|
|
304
|
+
cursor: not-allowed;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
342
307
|
}
|
|
343
308
|
|
|
344
|
-
.
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
309
|
+
.progress-wizard-steps:is(.editing-mode) {
|
|
310
|
+
.progress-wizard-step.previous .time-line .line {
|
|
311
|
+
background: var(--primary-color);
|
|
312
|
+
}
|
|
348
313
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
314
|
+
.progress-wizard-step.previous.valid .time-line .circle {
|
|
315
|
+
color: white;
|
|
316
|
+
background: var(--primary-color);
|
|
317
|
+
border: 2px solid var(--primary-color);
|
|
318
|
+
}
|
|
354
319
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
320
|
+
.progress-wizard-step.previous.invalid .time-line .circle {
|
|
321
|
+
color: var(--red-5);
|
|
322
|
+
background: var(--red-2);
|
|
323
|
+
border: 2px solid var(--red-5);
|
|
324
|
+
}
|
|
359
325
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
326
|
+
.progress-wizard-step:is(.disabled, .previous.disabled) {
|
|
327
|
+
.details {
|
|
328
|
+
h2 {
|
|
329
|
+
color: var(--gray-4);
|
|
330
|
+
}
|
|
331
|
+
p {
|
|
332
|
+
color: var(--gray-3);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
.details:hover {
|
|
336
|
+
background: transparent;
|
|
337
|
+
cursor: not-allowed;
|
|
338
|
+
}
|
|
365
339
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
340
|
+
.time-line {
|
|
341
|
+
.circle {
|
|
342
|
+
color: var(--gray-4);
|
|
343
|
+
background: var(--gray-2);
|
|
344
|
+
border: 2px solid var(--gray-2);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
369
348
|
}
|
|
370
349
|
</style>
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { type Snippet } from 'svelte';
|
|
2
|
+
import { type ProgressWizardStep } from '../index.js';
|
|
3
|
+
interface ProgressWizardProps {
|
|
4
|
+
steps: ProgressWizardStep[];
|
|
5
|
+
readonly?: boolean;
|
|
6
|
+
currentStep: number;
|
|
7
|
+
lastActiveStep: number;
|
|
8
|
+
content: Snippet;
|
|
9
|
+
additionalButtons: Snippet;
|
|
10
|
+
oncancel: VoidFunction;
|
|
5
11
|
}
|
|
6
|
-
|
|
7
|
-
steps: Step[];
|
|
8
|
-
currentStep?: number;
|
|
9
|
-
isFormValid?: boolean;
|
|
10
|
-
onFinalStepAction?: () => void;
|
|
11
|
-
useAsPopUp?: boolean;
|
|
12
|
-
children?: () => any;
|
|
13
|
-
}
|
|
14
|
-
declare const ProgressWizard: import("svelte").Component<StepProps, {}, "steps" | "currentStep" | "isFormValid">;
|
|
12
|
+
declare const ProgressWizard: import("svelte").Component<ProgressWizardProps, {}, "currentStep" | "lastActiveStep">;
|
|
15
13
|
type ProgressWizard = ReturnType<typeof ProgressWizard>;
|
|
16
14
|
export default ProgressWizard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|