-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Workflow): Create v3 Workflow (#4978)
* feat(Workflow): Create v3 Workflow * Update story names to include Workflow name alongside version * Add package.json files for new layout category * Add deprecate docblocks to v1 and v2 * Update page title to use composable-header-title Heading variant * Adjust status prop in Header to allow ReactNode * Convert all sass to css in v3 * Rename status prop to statusTag * Update import statements * Delete KaioLegacyDocsNotification * Remove background decorator on v3 footer story
- Loading branch information
1 parent
694a081
commit 2d34341
Showing
154 changed files
with
1,660 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"@kaizen/components": minor | ||
--- | ||
|
||
Create v3 Workflow component, changing footer to a white background | ||
|
||
Two adjustments will need to be made on the implementation side when upgrading from v2 to v3: | ||
|
||
- All footer buttons should have the `reversed` prop removed | ||
- Next button in the footer should have `primary` prop added (not just the finish button as previously) |
17 changes: 0 additions & 17 deletions
17
docs/components/KaioLegacyDocsNotification/KaioLegacyDocsNotification.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export * from "./Select" | ||
export * from "./Tag" | ||
export * from "./Workflow" | ||
export * from "../__layout__/Workflow/v2" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Since we can't add a deprecation flag on a * export | ||
import { | ||
Workflow as WorkflowV1, | ||
WorkflowProps as WorkflowPropsV1, | ||
} from "./Workflow" | ||
|
||
/** * @deprecated upgrade to v3 for the latest release */ | ||
export const Workflow = WorkflowV1 | ||
/** * @deprecated upgrade to v3 for the latest release */ | ||
export type WorkflowProps = WorkflowPropsV1 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Since we can't add a deprecation flag on a * export | ||
import { | ||
Workflow as WorkflowV2, | ||
WorkflowProps as WorkflowPropsV2, | ||
} from "./Workflow" | ||
|
||
/** * @deprecated upgrade to v3 for the latest release */ | ||
export const Workflow = WorkflowV2 | ||
/** * @deprecated upgrade to v3 for the latest release */ | ||
export type WorkflowProps = WorkflowPropsV2 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
55 changes: 55 additions & 0 deletions
55
packages/components/src/__layout__/Workflow/v3/Workflow.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import React, { HTMLAttributes } from "react" | ||
import { OverrideClassName } from "~components/types/OverrideClassName" | ||
import { | ||
Footer, | ||
FooterProps, | ||
Header, | ||
Main, | ||
HeaderProps, | ||
ProgressStepper, | ||
Wrapper, | ||
} from "./subcomponents" | ||
|
||
export type WorkflowProps = OverrideClassName<HTMLAttributes<HTMLDivElement>> & | ||
FooterProps & | ||
Pick<HeaderProps, "workflowName" | "statusTag" | "headerActions"> | ||
|
||
export const Workflow = ({ | ||
steps, | ||
currentStepId, | ||
isComplete, | ||
workflowName, | ||
statusTag, | ||
headerActions, | ||
children, | ||
nextAction, | ||
previousAction, | ||
classNameOverride, | ||
...restProps | ||
}: WorkflowProps): JSX.Element => { | ||
const currentStep = steps.find(step => step.id === currentStepId) | ||
return ( | ||
<Workflow.Wrapper classNameOverride={classNameOverride} {...restProps}> | ||
<Workflow.Header | ||
workflowName={workflowName} | ||
stepName={currentStep!.label} | ||
statusTag={statusTag} | ||
headerActions={headerActions} | ||
/> | ||
<Workflow.Main>{children}</Workflow.Main> | ||
<Workflow.Footer | ||
currentStepId={currentStepId} | ||
steps={steps} | ||
isComplete={isComplete} | ||
nextAction={nextAction} | ||
previousAction={previousAction} | ||
/> | ||
</Workflow.Wrapper> | ||
) | ||
} | ||
|
||
Workflow.Header = Header | ||
Workflow.Footer = Footer | ||
Workflow.Main = Main | ||
Workflow.ProgressStepper = ProgressStepper | ||
Workflow.Wrapper = Wrapper |
Oops, something went wrong.