2025-09-18 14:30:11 +00:00
|
|
|
import { html } from '@design.estate/dees-element';
|
2026-04-11 09:28:11 +00:00
|
|
|
import { DeesStepper, type IStep } from './dees-stepper.js';
|
|
|
|
|
|
|
|
|
|
const demoSteps: IStep[] = [
|
|
|
|
|
{
|
|
|
|
|
title: 'Account Setup',
|
|
|
|
|
content: html`
|
|
|
|
|
<dees-form>
|
|
|
|
|
<dees-input-text key="email" label="Work Email" required></dees-input-text>
|
|
|
|
|
<dees-input-text key="password" label="Create Password" type="password" required></dees-input-text>
|
|
|
|
|
</dees-form>
|
|
|
|
|
`,
|
2026-04-11 10:46:56 +00:00
|
|
|
menuOptions: [
|
|
|
|
|
{ name: 'Continue', action: async (stepper) => stepper!.goNext() },
|
|
|
|
|
],
|
2026-04-11 09:28:11 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'Profile Details',
|
|
|
|
|
content: html`
|
|
|
|
|
<dees-form>
|
|
|
|
|
<dees-input-text key="firstName" label="First Name" required></dees-input-text>
|
|
|
|
|
<dees-input-text key="lastName" label="Last Name" required></dees-input-text>
|
|
|
|
|
</dees-form>
|
|
|
|
|
`,
|
2026-04-11 10:46:56 +00:00
|
|
|
menuOptions: [
|
|
|
|
|
{ name: 'Continue', action: async (stepper) => stepper!.goNext() },
|
|
|
|
|
],
|
2026-04-11 09:28:11 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'Contact Information',
|
|
|
|
|
content: html`
|
|
|
|
|
<dees-form>
|
|
|
|
|
<dees-input-phone key="phone" label="Mobile Number" required></dees-input-phone>
|
|
|
|
|
<dees-input-text key="company" label="Company"></dees-input-text>
|
|
|
|
|
</dees-form>
|
|
|
|
|
`,
|
2026-04-11 10:46:56 +00:00
|
|
|
menuOptions: [
|
|
|
|
|
{ name: 'Continue', action: async (stepper) => stepper!.goNext() },
|
|
|
|
|
],
|
2026-04-11 09:28:11 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'Team Size',
|
|
|
|
|
content: html`
|
|
|
|
|
<dees-form>
|
|
|
|
|
<dees-input-dropdown
|
|
|
|
|
key="teamSize"
|
|
|
|
|
label="How big is your team?"
|
|
|
|
|
.options=${[
|
|
|
|
|
{ label: '1-5', value: '1-5' },
|
|
|
|
|
{ label: '6-20', value: '6-20' },
|
|
|
|
|
{ label: '21-50', value: '21-50' },
|
|
|
|
|
{ label: '51+', value: '51+' },
|
|
|
|
|
]}
|
|
|
|
|
required
|
|
|
|
|
></dees-input-dropdown>
|
|
|
|
|
</dees-form>
|
|
|
|
|
`,
|
2026-04-11 10:46:56 +00:00
|
|
|
menuOptions: [
|
|
|
|
|
{ name: 'Continue', action: async (stepper) => stepper!.goNext() },
|
|
|
|
|
],
|
2026-04-11 09:28:11 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'Goals',
|
|
|
|
|
content: html`
|
|
|
|
|
<dees-form>
|
|
|
|
|
<dees-input-multitoggle
|
|
|
|
|
key="goal"
|
|
|
|
|
label="Main objective"
|
|
|
|
|
.options=${[
|
|
|
|
|
{ label: 'Onboarding', value: 'onboarding' },
|
|
|
|
|
{ label: 'Analytics', value: 'analytics' },
|
|
|
|
|
{ label: 'Automation', value: 'automation' },
|
|
|
|
|
]}
|
|
|
|
|
required
|
|
|
|
|
></dees-input-multitoggle>
|
|
|
|
|
</dees-form>
|
|
|
|
|
`,
|
2026-04-11 10:46:56 +00:00
|
|
|
menuOptions: [
|
|
|
|
|
{ name: 'Continue', action: async (stepper) => stepper!.goNext() },
|
|
|
|
|
],
|
2026-04-11 09:28:11 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'Brand Preferences',
|
|
|
|
|
content: html`
|
|
|
|
|
<dees-form>
|
|
|
|
|
<dees-input-text key="brandColor" label="Primary brand color"></dees-input-text>
|
|
|
|
|
<dees-input-text key="tone" label="Preferred tone (e.g. friendly, formal)"></dees-input-text>
|
|
|
|
|
</dees-form>
|
|
|
|
|
`,
|
2026-04-11 10:46:56 +00:00
|
|
|
menuOptions: [
|
|
|
|
|
{ name: 'Continue', action: async (stepper) => stepper!.goNext() },
|
|
|
|
|
],
|
2026-04-11 09:28:11 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'Integrations',
|
|
|
|
|
content: html`
|
|
|
|
|
<dees-form>
|
|
|
|
|
<dees-input-list
|
|
|
|
|
key="integrations"
|
|
|
|
|
label="Integrations in use"
|
|
|
|
|
placeholder="Add integration"
|
|
|
|
|
></dees-input-list>
|
|
|
|
|
</dees-form>
|
|
|
|
|
`,
|
2026-04-11 10:46:56 +00:00
|
|
|
menuOptions: [
|
|
|
|
|
{ name: 'Continue', action: async (stepper) => stepper!.goNext() },
|
|
|
|
|
],
|
2026-04-11 09:28:11 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'Review & Launch',
|
|
|
|
|
content: html`
|
|
|
|
|
<dees-panel>
|
|
|
|
|
<p>Almost there! Review your selections and launch whenever you're ready.</p>
|
|
|
|
|
</dees-panel>
|
|
|
|
|
`,
|
2026-04-11 10:46:56 +00:00
|
|
|
menuOptions: [
|
|
|
|
|
{ name: 'Launch', action: async (stepper) => stepper!.goNext() },
|
|
|
|
|
],
|
2026-04-11 09:28:11 +00:00
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const cloneSteps = (): IStep[] => demoSteps.map((step) => ({ ...step }));
|
2025-09-18 14:30:11 +00:00
|
|
|
|
|
|
|
|
export const stepperDemo = () => html`
|
2026-04-11 09:28:11 +00:00
|
|
|
<div style="position: absolute; inset: 0;">
|
|
|
|
|
<div
|
|
|
|
|
style="position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 10;"
|
|
|
|
|
>
|
|
|
|
|
<dees-button
|
|
|
|
|
@click=${async () => {
|
|
|
|
|
await DeesStepper.createAndShow({ steps: cloneSteps() });
|
|
|
|
|
}}
|
|
|
|
|
>Open stepper as overlay</dees-button>
|
|
|
|
|
</div>
|
|
|
|
|
<dees-stepper .steps=${cloneSteps()}></dees-stepper>
|
|
|
|
|
</div>
|
2025-09-18 14:30:11 +00:00
|
|
|
`;
|