@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.
Files changed (72) hide show
  1. package/README.md +75 -19
  2. package/dist/Avatar/Avatar.svelte +33 -0
  3. package/dist/Avatar/Avatar.svelte.d.ts +10 -0
  4. package/dist/Breadcrumbs/Breadcrumbs.svelte +10 -20
  5. package/dist/Button/Button.svelte +66 -115
  6. package/dist/Button/Button.svelte.d.ts +8 -6
  7. package/dist/Card/Card.svelte +18 -44
  8. package/dist/Card/Card.svelte.d.ts +1 -1
  9. package/dist/Chips/Chips.svelte +40 -46
  10. package/dist/Chips/Chips.svelte.d.ts +2 -1
  11. package/dist/Chips/chipsState.svelte.d.ts +7 -0
  12. package/dist/Chips/chipsState.svelte.js +8 -0
  13. package/dist/ErrorPage/ErrorPage.svelte +96 -0
  14. package/dist/ErrorPage/ErrorPage.svelte.d.ts +7 -0
  15. package/dist/Footer/Footer.svelte +29 -135
  16. package/dist/Footer/Footer.svelte.d.ts +1 -1
  17. package/dist/Form/Input/Input.svelte +393 -0
  18. package/dist/Form/Input/Input.svelte.d.ts +14 -0
  19. package/dist/Form/Input/InputIcon.svelte +97 -0
  20. package/dist/Form/Input/InputIcon.svelte.d.ts +9 -0
  21. package/dist/Form/TextArea/TextArea.svelte +260 -0
  22. package/dist/Form/TextArea/TextArea.svelte.d.ts +13 -0
  23. package/dist/Form/Toggle/Toggle.svelte +120 -0
  24. package/dist/{Toggle → Form/Toggle}/Toggle.svelte.d.ts +4 -3
  25. package/dist/Header/Header.svelte +54 -136
  26. package/dist/Header/Header.svelte.d.ts +2 -2
  27. package/dist/Header/HeaderAccount.svelte +14 -35
  28. package/dist/Header/HeaderLoader.svelte +2 -2
  29. package/dist/Header/HeaderLogo.svelte +7 -4
  30. package/dist/Header/HeaderLogo.svelte.d.ts +14 -6
  31. package/dist/HighlightPanel/HighlightPanel.svelte +125 -0
  32. package/dist/HighlightPanel/HighlightPanel.svelte.d.ts +10 -0
  33. package/dist/HighlightPanel/highlightPanelState.svelte.d.ts +35 -0
  34. package/dist/HighlightPanel/highlightPanelState.svelte.js +13 -0
  35. package/dist/Menu/Menu.svelte +158 -0
  36. package/dist/Menu/Menu.svelte.d.ts +8 -0
  37. package/dist/Menu/MenuItem.svelte +149 -0
  38. package/dist/Menu/MenuItem.svelte.d.ts +11 -0
  39. package/dist/Menu/Sidebar.svelte +228 -0
  40. package/dist/Menu/Sidebar.svelte.d.ts +11 -0
  41. package/dist/Menu/SidebarState.svelte.d.ts +6 -0
  42. package/dist/Menu/SidebarState.svelte.js +1 -0
  43. package/dist/Modal/Modal.svelte +81 -29
  44. package/dist/Modal/Modal.svelte.d.ts +2 -9
  45. package/dist/Modal/ModalContent.svelte +8 -88
  46. package/dist/Modal/ModalContent.svelte.d.ts +2 -3
  47. package/dist/Modal/ModalFooter.svelte +21 -66
  48. package/dist/Modal/ModalFooter.svelte.d.ts +5 -5
  49. package/dist/Modal/ModalHeader.svelte +50 -34
  50. package/dist/Modal/ModalHeader.svelte.d.ts +5 -4
  51. package/dist/Modal/modalState.svelte.d.ts +15 -0
  52. package/dist/Modal/modalState.svelte.js +1 -0
  53. package/dist/ProgressWizard/ProgressWizard.svelte +273 -294
  54. package/dist/ProgressWizard/ProgressWizard.svelte.d.ts +11 -13
  55. package/dist/ProgressWizard/progressWizardState.svelte.d.ts +6 -0
  56. package/dist/ProgressWizard/progressWizardState.svelte.js +1 -0
  57. package/dist/Search/Search.svelte +154 -0
  58. package/dist/Search/Search.svelte.d.ts +10 -0
  59. package/dist/Tabs/Tabs.svelte +111 -0
  60. package/dist/Tabs/Tabs.svelte.d.ts +8 -0
  61. package/dist/Tabs/tabsState.svelte.d.ts +7 -0
  62. package/dist/Tabs/tabsState.svelte.js +1 -0
  63. package/dist/Toast/Toast.svelte +116 -49
  64. package/dist/Toast/toastState.svelte.d.ts +7 -3
  65. package/dist/Toast/toastState.svelte.js +13 -10
  66. package/dist/Tooltip/Tooltip.svelte +168 -0
  67. package/dist/Tooltip/Tooltip.svelte.d.ts +13 -0
  68. package/dist/assets/icons/feedback.svg +5 -0
  69. package/dist/index.d.ts +28 -8
  70. package/dist/index.js +24 -9
  71. package/package.json +4 -5
  72. package/dist/Toggle/Toggle.svelte +0 -170
@@ -1,370 +1,349 @@
1
1
  <script lang="ts">
2
- import { addToast } from '../Toast/toastState.svelte';
3
-
4
- interface Step {
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 StepProps {
11
- steps: Step[];
12
- currentStep?: number;
13
- isFormValid?: boolean;
14
- onFinalStepAction?: () => void;
15
- useAsPopUp?: boolean;
16
- children?: () => any;
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 = $bindable(),
21
- currentStep = $bindable(1),
22
- isFormValid = $bindable(),
23
- onFinalStepAction,
24
- useAsPopUp = false,
25
- children
26
- }: StepProps = $props();
27
-
28
- steps = steps.map((step) => ({
29
- ...step,
30
- isValid: step.isValid ?? true
31
- }));
32
-
33
- let completedSteps = $state<Set<number>>(new Set());
34
- let stepsFormInstance: any;
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 nextStep = () => {
46
- if (stepsFormInstance && !stepsFormInstance.validateCurrentStep()) {
47
- isFormValid = false;
48
- return;
49
- }
50
- if (currentStep < steps.length) {
51
- goToStep(currentStep + 1);
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 previousStep = () => {
61
- if (currentStep > 1) goToStep(currentStep - 1);
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
- const onClose = () => {
65
- if (useAsPopUp) {
66
- // Logic to close the pop-up
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
- <!-- Header -->
73
- <div class="progress-header">
74
- <div class="title">Create workspace</div>
75
- <div class="header-actions">
76
- {#if useAsPopUp}
77
- <button class="link close" onclick={onClose}>
78
- <span class="material-icons-outlined">close</span>
79
- </button>
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
- </div>
82
- </div>
83
-
84
- <!-- Sidebar + Content -->
85
- <div class="progress-body">
86
- <!-- Sidebar -->
87
- <div class="progress-sidebar">
88
- <ol>
89
- {#each steps as step, index}
90
- <li
91
- class:completed={completedSteps.has(index + 1)}
92
- class:active={currentStep === index + 1}
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
- <!-- Main Content -->
125
- <div class="progress-content">
126
- <div class="step-content">
127
- {@render children?.()}
128
- </div>
129
- </div>
130
- </div>
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
- </div>
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
- max-width: 97vw;
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-body {
161
+ .progress-wizard-container {
166
162
  display: flex;
167
- width: 100%;
163
+ flex: 1;
168
164
  }
169
165
 
170
- .progress-sidebar {
171
- width: 100%;
172
- min-width: 226px;
173
- max-width: 226px;
174
- min-height: 50vh;
175
- border-right: 1px solid #e6e6e6;
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-content {
179
- flex-grow: 1;
180
- padding: 24px;
181
- margin-bottom: -20px;
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
- /* Header */
185
- .progress-header {
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
- .progress-header .title {
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
- position: relative;
218
- cursor: default;
219
- padding: 16px 24px;
220
- gap: 8px;
221
- color: inherit;
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
- .progress-sidebar li.completed {
225
- color: #4caf50;
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-sidebar li.active {
229
- color: var(--brand-primary, #472aff);
213
+ .progress-wizard-step:last-child .time-line .line {
214
+ display: none;
230
215
  }
231
216
 
232
- /* Step Button */
233
- .step-button {
234
- all: unset;
235
- width: 100%;
236
- display: flex;
237
- align-items: flex-start;
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
- .step-button:hover .step-icon,
244
- li.active .step-icon {
245
- border-color: var(--brand-primary, #472aff);
246
- }
225
+ h2 {
226
+ font-size: 16px;
227
+ font-weight: 600;
228
+ color: #000;
229
+ }
247
230
 
248
- .step-button:hover .step-details,
249
- .step-button:hover .step-details small,
250
- li.active .step-button .step-details small {
251
- color: var(--brand-primary, #472aff);
231
+ p {
232
+ font-size: 12px;
233
+ word-break: keep-all;
234
+ color: var(--gray-4);
235
+ }
252
236
  }
253
237
 
254
- /* Step Icon & Line */
255
- .step-icon {
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
- li .done .step-icon {
270
- background: var(--brand-primary, #472aff);
271
- color: white;
272
- border-color: var(--brand-primary, #472aff);
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
- .step-button .step-icon.error {
276
- background: var(--alerts-danger-3, #fce8ea);
277
- color: #bb1425;
278
- border-color: var(--alerts-danger-3, #bb1425);
248
+ .progress-wizard-content {
249
+ flex: 1;
250
+ padding: 24px;
279
251
  }
280
252
 
281
- .step-line-wrapper {
282
- position: relative;
253
+ .progress-wizard-footer {
283
254
  display: flex;
284
- flex-direction: column;
285
- align-items: center;
286
- justify-content: flex-start;
287
- margin-right: 10px;
288
- }
255
+ padding: 24px;
256
+ border-top: var(--border-wizard);
289
257
 
290
- .step-line {
291
- width: 1px;
292
- height: 40px;
293
- background: #e6e6e6;
294
- position: absolute;
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
- li.completed .step-line,
303
- li .done .step-line {
304
- background: var(--brand-primary, #472aff);
305
- }
265
+ .progress-wizard-step.active {
266
+ .time-line .circle {
267
+ border: 2px solid var(--primary-color);
268
+ }
306
269
 
307
- /* Step Details */
308
- .step-details {
309
- display: flex;
310
- flex-direction: column;
311
- }
270
+ .details {
271
+ box-shadow: none;
272
+ background: transparent;
312
273
 
313
- .step-details strong {
314
- font-size: 16px;
274
+ h2,
275
+ p {
276
+ color: var(--primary-color);
277
+ }
278
+ }
315
279
  }
316
280
 
317
- .step-details small {
318
- font-size: 12px;
319
- color: #999;
320
- }
281
+ .progress-wizard-steps:is(.readonly) {
282
+ .progress-wizard-step:not(.active) {
283
+ .line {
284
+ background: var(--gray-2);
285
+ }
321
286
 
322
- .step-content {
323
- margin-bottom: 20px;
324
- }
287
+ .circle {
288
+ border: 2px solid var(--gray-2);
289
+ background: var(--gray-2);
290
+ color: var(--gray-4);
291
+ }
325
292
 
326
- /* Footer */
327
- .progress-footer {
328
- display: flex;
329
- justify-content: space-between;
330
- align-items: center;
331
- padding: 10px 20px;
332
- border-top: 1px solid #e6e6e6;
333
- }
293
+ .details {
294
+ h2 {
295
+ color: var(--gray-4);
296
+ }
297
+ p {
298
+ color: var(--gray-3);
299
+ }
300
+ }
334
301
 
335
- /* Buttons */
336
- .btn {
337
- padding: 10px 20px;
338
- border-radius: 4px;
339
- border: none;
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
- .btn.primary {
345
- background: var(--brand-primary, #472aff);
346
- color: white;
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
- .btn.secondary {
350
- background: var(--alerts-info-1, #eaecff);
351
- color: var(--brand-primary, #472aff);
352
- margin-right: 10px;
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
- .btn:disabled {
356
- cursor: not-allowed;
357
- opacity: 0.5;
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
- .link {
361
- background: transparent;
362
- color: var(--brand-primary, #472aff);
363
- font-size: 0.9rem;
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
- .close {
367
- color: #25282d;
368
- border: none;
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
- interface Step {
2
- title: string;
3
- description: string;
4
- isValid?: boolean;
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
- interface StepProps {
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,6 @@
1
+ export type ProgressWizardStep = {
2
+ title: string;
3
+ description?: string;
4
+ isValid: boolean;
5
+ disabled: boolean;
6
+ };
@@ -0,0 +1 @@
1
+ export {};