Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 0 additions & 64 deletions .changeset/delete-wizard.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/wizard-types.md

This file was deleted.

75 changes: 75 additions & 0 deletions packages/delete-wizard/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# @leafygreen-ui/delete-wizard

## 0.1.0

### Minor Changes

- e5c39d6: Initial release of `DeleteWizard`.

```tsx
<DeleteWizard
onStepChange={...}
onCancel={...}
onDelete={...}
>
<DeleteWizard.Header
pageTitle="Demo Delete Wizard"
/>
<DeleteWizard.Step requiresAcknowledgement>
<DeleteWizard.StepContent>
<div>Step 1 contents</div>
</DeleteWizard.StepContent>
<DeleteWizard.Footer
backButtonText="Go back"
cancelButtonText="Cancel flow"
primaryButtonText='Continue to next step'
/>
</DeleteWizard.Step>

<DeleteWizard.Step requiresAcknowledgement>
<DeleteWizard.StepContent>
<div>Step 2 contents</div>
</DeleteWizard.StepContent>
<DeleteWizard.Footer
backButtonText="Go back"
cancelButtonText="Cancel flow"
primaryButtonText='Delete my thing'
/>
</DeleteWizard.Step>
</DeleteWizard>
```

### DeleteWizard

Establishes a context, and only renders the `activeStep` (managed internally, or provided with the `activeStep` prop). Accepts a `DeleteWizard.Header` and any number of `DeleteWizard.Step`s as children.

`DeleteWizard` and all sub-components include template styling.

### DeleteWizard.Header

A convenience wrapper around `CanvasHeader`

### DeleteWizard.Step

A convenience wrapper around `Wizard.Step` to ensure the correct context.
Like the basic `Wizard.Step`, if `requiresAcknowledgement` is true, the step must have `isAcknowledged` set in context, (or passed in as a controlled prop) for the Footer's primary button to be enabled. (see the Wizard and DeleteWizard demos in Storybook)

### DeleteWizard.StepContent

A styled `div` for use inside a `DeleteWizard.Step` to ensure proper page scrolling and footer positioning

### DeleteWizard.Footer

A wrapper around `Wizard.Footer` with embedded styles and convenience props for the DeleteWizard template.
`DeleteWizard.Footer` accepts optional `backButtonText`, `cancelButtonText` and `primaryButtonText` props for simpler wizard creation.
The primary button variant is defined based on the `activeStep`— `"danger"` for the final steps, and `"primary"` for all preceding steps.
Also defines the `leftGlyph` to <TrashIcon /> for the final step.

You can override this behavior by providing the button props object (see FormFooter).

Use the top level `onDelete`, `onCancel` and `onStepChange` callbacks to handle footer button clicks.

### Patch Changes

- Updated dependencies [e5c39d6]
- @leafygreen-ui/wizard@0.1.5
2 changes: 1 addition & 1 deletion packages/delete-wizard/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@leafygreen-ui/delete-wizard",
"version": "0.0.1",
"version": "0.1.0",
"description": "LeafyGreen UI Kit Delete Wizard",
"main": "./dist/umd/index.js",
"module": "./dist/esm/index.js",
Expand Down
6 changes: 6 additions & 0 deletions packages/wizard/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @leafygreen-ui/wizard

## 0.1.5

### Patch Changes

- e5c39d6: Exports `WizardStepContext` & `WizardStepContextData` types

## 0.1.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/wizard/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@leafygreen-ui/wizard",
"version": "0.1.4",
"version": "0.1.5",
"description": "LeafyGreen UI Kit Wizard",
"main": "./dist/umd/index.js",
"module": "./dist/esm/index.js",
Expand Down
1 change: 1 addition & 0 deletions tools/install/src/ALL_PACKAGES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const ALL_PACKAGES = [
'@leafygreen-ui/copyable',
'@leafygreen-ui/date-picker',
'@leafygreen-ui/date-utils',
'@leafygreen-ui/delete-wizard',
'@leafygreen-ui/descendants',
'@leafygreen-ui/drawer',
'@leafygreen-ui/emotion',
Expand Down
Loading