npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@finastra/wizard

v1.8.1

Published

Wizard Web Component

Downloads

149

Readme

Wizard

A wizard is a setup process where the user is guided through a series of steps to achieve a goal. The purpose of the pattern is to simplify tasks by cutting them into smaller ones.It is easy to navigate between the steps which helps the user to complete lengthy forms in less time. Also the user can save it and revisit the wizard when he/she has the relevant required information available.

See it on NPM! How big is this package in your project? Storybook

Usage

Import

npm i @finastra/wizard @finastra/button @finastra/textfield
import '@finastra/wizard';
import '@finastra/textfield';
import '@finastra/button';
...
<fds-wizard id="wizard">
  <fds-text-button slot='left-action' label="Cancel" secondary>
  </fds-text-button>
  <fds-outlined-button slot='next' label="Next" secondary>
  </fds-outlined-button>
  <fds-text-button slot='previous' label="Back" secondary icon="chevron_left">
  </fds-text-button>
  <fds-button slot='done' label="Save" secondary>
  </fds-button>
  <fds-wizard-page slot="page" title="Welcome" description="Welcome page" header>
    <div class="page-content">
      <div class="textfields">
        <fds-textfield label="Last name" icontrailing="" helper="helper text"></fds-textfield>
        <fds-textfield label="Last name" icontrailing="" helper="helper text"></fds-textfield>
        <fds-textfield label="Last name" icontrailing="" helper="helper text"></fds-textfield>
      </div>
      <div class="image">
        <img src="https://i.imgur.com/otY5WR9.png" />
      </div>
    </div>
  </fds-wizard-page>

  <fds-wizard-page slot="page" title="Preferences" description="Preferences page" disabled header>
    <p>put your content here</p>
  </fds-wizard-page>

  <fds-wizard-page slot="page" title="Confirmation" description="Confirmation page" header>
    <p>put your content here</p>
  </fds-wizard-page>
</fds-wizard>

API

Properties

| Property | Attribute | Type | Default | | -------------- | -------------- | --------- | ------- | | completed | completed | boolean | false | | current | current | boolean | false | | description | description | string | "" | | disabled | disabled | boolean | false | | header | header | boolean | false | | icon | icon | string | "" | | stepsCounter | stepsCounter | string | "" | | title | title | string | "" |

Methods

| Method | Type | | -------------------- | ----------------------- | | renderIcon | (): TemplateResult<1> | | renderStepsCounter | (): TemplateResult<1> |

fds-wizard

Properties

| Property | Attribute | Type | Default | Description | | ------------------ | ------------------ | ----------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | currentStepIndex | currentStepIndex | number | 0 | Index of current active step. | | linear | linear | boolean | false | Used to create a linear stepper that requires the user to complete previous steps before proceeding to following steps. Note that a wizard page is considered as completed when its property completed is true. | | stepperOnDark | stepperOnDark | boolean | false | Stepper on dark | | stepperPosition | stepperPosition | "left"\|"right" | "left" | Stepper position | | stepsCounter | stepsCounter | boolean | false | make the step counter visible in the stepper. |

Methods

| Method | Type | | ----------------------------- | ----------------------------------------------- | | CheckIfAllBackStepsDisabled | (current: number): boolean | | CheckIfAllNextStepsDisabled | (current: number): boolean | | UpdatePage | (): void | | checkAttributes | (page: HTMLElement, index: number): void | | checkNextStep | (): void | | checkNextStepDisabled | (pages: HTMLElement[], current: number): void | | checkPreviousStepDisabled | (pages: HTMLElement[], current: number): void | | currentPageIsDisabled | (current: number): boolean | | currentPageIsFirst | (current: number): boolean | | currentPageIsLast | (current: number): boolean | | goToNextStep | (pages: HTMLElement[]): void | | goToPreviousStep | (pages: HTMLElement[]): void | | goToStepIndex | (index: number): void | | onPagesSlotChanged | (): void | | onStepClickEvent | (event: any): void | | renderActions | (): TemplateResult<ResultType> | | renderBackSlot | (): TemplateResult<ResultType> | | renderCounterInStepper | (): TemplateResult<ResultType> | | renderNextSlot | (): TemplateResult<ResultType> | | renderSaveSlot | (): TemplateResult<ResultType> | | renderStepper | (): TemplateResult<ResultType> | | updateActionsState | (current: number): void | | updateCurrentPage | (index: number): void | | updateStepsCounter | (current: number): string |

Slots

| Name | Description | | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | left-action | Slot to place an element in the left side of the wizard actions bar. | | next | Slot to place an element that manages the transition to the next step. | | page | Defines a new page inside the wizard that generates a new step automatically.It is Used with the fds-wizard-page web component that could contain: - title: to define a title to the step- icon: to define a link to your hosted icon to be displayed next to the title- description: to define a description to your step- disabled : to disable the step- header: to enable the header display (default is false)- current: to set the step to current- completed: used when linear mode is on to indicate that the step is valid and the next one is unlocked. | | previous | Slot to place an element that manages the transition to the previous step. | | save | Slot to place an element that appears in the last step. The developer could add his own logic in the onClick Event. |

CSS Custom Properties

| Property | Type | Default | Description | | ------------------------- | ----- | --------- | ---------------------------- | | --fds-header-bg | color | "#f3f1fc" | Header background color | | --fds-icon-bg | color | "#fafafa" | Header icon background color | | --fds-icon-border-color | color | "#f3f1fc" | Header icon border color | | --fds-stepper-bg | color | "#fafafa" | Stepper background color | | --fds-title-color | color | "#694ed5" | Header title color |