diff --git a/packages/ui/src/components/wizard/Wizard.svelte b/packages/ui/src/components/wizard/Wizard.svelte new file mode 100644 index 0000000000..1a4c05c576 --- /dev/null +++ b/packages/ui/src/components/wizard/Wizard.svelte @@ -0,0 +1,59 @@ + + + + + {#each items as item, i} + + {/each} + + +{#if selectedItem} + {#if typeof selectedItem.component === 'string'} + + {:else} + + {/if} +{/if} diff --git a/packages/ui/src/components/wizard/WizardStep.svelte b/packages/ui/src/components/wizard/WizardStep.svelte new file mode 100644 index 0000000000..2918a72241 --- /dev/null +++ b/packages/ui/src/components/wizard/WizardStep.svelte @@ -0,0 +1,142 @@ + + + +{#if translation} +
{translation}
+ {#if lenght > 0} +
+ +
+ + {#if position === 'start'} + + {:else if position === 'middle'} + + {:else if position === 'end'} + + {:else} + + {/if} + +
{translation}
+
+
+ {/if} +{/if} + + diff --git a/packages/ui/src/index.ts b/packages/ui/src/index.ts index 3eb4057c3d..f53a409612 100644 --- a/packages/ui/src/index.ts +++ b/packages/ui/src/index.ts @@ -163,6 +163,7 @@ export { default as notificationsStore } from './components/notifications/store' export { NotificationPosition } from './components/notifications/NotificationPosition' export { NotificationSeverity } from './components/notifications/NotificationSeverity' export { Notification } from './components/notifications/Notification' +export { default as Wizard } from './components/wizard/Wizard.svelte' export * from './types' export * from './location' diff --git a/packages/ui/src/types.ts b/packages/ui/src/types.ts index 48141a44e5..5d0a34d67d 100644 --- a/packages/ui/src/types.ts +++ b/packages/ui/src/types.ts @@ -281,3 +281,11 @@ export interface TimelineState { timelineBox: DOMRect viewBox: DOMRect } + +export interface WizardModel { + label: IntlString + component: AnyComponent | AnySvelteComponent + props?: any +} +export type WizardItemPosition = 'start' | 'middle' | 'end' +export type WizardItemPositionState = 'current' | 'prev' | 'next'