From 59259f544e0539084217ff6b800ff9eb2f5503e8 Mon Sep 17 00:00:00 2001 From: Cassandra Tam Date: Tue, 10 Oct 2023 17:12:57 +1100 Subject: [PATCH] fix Workflow and update entrypoint --- packages/components/src/Workflow/Workflow.tsx | 20 +++--- .../src/__future__/Workflow/Workflow.tsx | 14 ++-- packages/components/src/__future__/index.ts | 6 +- packages/components/src/index.ts | 67 ++++++++++--------- 4 files changed, 52 insertions(+), 55 deletions(-) diff --git a/packages/components/src/Workflow/Workflow.tsx b/packages/components/src/Workflow/Workflow.tsx index 558f896263a..387d31f9e31 100644 --- a/packages/components/src/Workflow/Workflow.tsx +++ b/packages/components/src/Workflow/Workflow.tsx @@ -14,7 +14,10 @@ export type WorkflowProps = OverrideClassName> & FooterProps & HeaderProps -const WorkflowComponent = ({ +/** + * @deprecated Use { Workflow } from `@kaizen/components/future` + */ +export const Workflow = ({ stepName, steps, isComplete, @@ -45,13 +48,8 @@ const WorkflowComponent = ({ ) -/** - * @deprecated Use { Workflow } from `@kaizen/components/future` - */ -export const Workflow = Object.assign(WorkflowComponent, { - Header, - Footer, - Main, - ProgressStepper, - Wrapper, -}) +Workflow.Header = Header; +Workflow.Footer = Footer; +Workflow.Main = Main; +Workflow.ProgressStepper = ProgressStepper; +Workflow.Wrapper = Wrapper; diff --git a/packages/components/src/__future__/Workflow/Workflow.tsx b/packages/components/src/__future__/Workflow/Workflow.tsx index 7fd980b09f3..15699de8e1a 100644 --- a/packages/components/src/__future__/Workflow/Workflow.tsx +++ b/packages/components/src/__future__/Workflow/Workflow.tsx @@ -14,7 +14,7 @@ export type WorkflowProps = OverrideClassName> & FooterProps & Pick -const WorkflowComponent = ({ +export const Workflow = ({ steps, currentStepId, isComplete, @@ -48,10 +48,8 @@ const WorkflowComponent = ({ ) } -export const Workflow = Object.assign(WorkflowComponent, { - Header, - Footer, - Main, - ProgressStepper, - Wrapper, -}) +Workflow.Header = Header; +Workflow.Footer = Footer; +Workflow.Main = Main; +Workflow.ProgressStepper = ProgressStepper; +Workflow.Wrapper = Wrapper; diff --git a/packages/components/src/__future__/index.ts b/packages/components/src/__future__/index.ts index 190513fa5bd..b6ea3209270 100644 --- a/packages/components/src/__future__/index.ts +++ b/packages/components/src/__future__/index.ts @@ -1,3 +1,3 @@ -// export * from "./Select" -// export * from "./Tag" -// export * from "./Workflow" +export * from "./Select" +export * from "./Tag" +export * from "./Workflow" diff --git a/packages/components/src/index.ts b/packages/components/src/index.ts index 69d402a00bd..373bf3ef544 100644 --- a/packages/components/src/index.ts +++ b/packages/components/src/index.ts @@ -1,41 +1,42 @@ // TODO: Remove when Date Picker is migrated to KAIO -// export * from "./types/DatePicker" +export * from "./types/DatePicker" -// export * from "./Avatar" -// export * from "./AvatarGroup" -// export * from "./Badge" -// export * from "./Brand" -// export * from "./Card" -// export * from "./Checkbox" -// export * from "./ClearButton" -// export * from "./Divider" -// export * from "./EmptyState" -// export * from "./FieldGroup" -// export * from "./FieldMessage" -// export * from "./Heading" -// export * from "./Icon" -// export * from "./Input" -// export * from "./Label" -// export * from "./LabelledMessage" -// export * from "./Radio" -// export * from "./SearchField" -// export * from "./Slider" -// export * from "./Text" -export * from "./FilterButton/subcomponents/FilterButtonBase" +export * from "./Avatar" +export * from "./AvatarGroup" +export * from "./Badge" +export * from "./Brand" +export * from "./Card" +export * from "./Checkbox" +export * from "./ClearButton" +export * from "./Divider" +export * from "./EmptyState" +export * from "./FieldGroup" +export * from "./FieldMessage" +export * from "./Heading" +export * from "./Icon" +export * from "./Input" +export * from "./Label" +export * from "./LabelledMessage" +export * from "./Radio" +export * from "./SearchField" +export * from "./Slider" +export * from "./Text" + +// RESOLVED +export * from "./BrandMoment" +export * from "./Button" +export * from "./ButtonGroup" +export * from "./ErrorPage" +export * from "./Filter" +export * from "./FilterButton" +export * from "./FilterDatePicker" +export * from "./FilterDateRangePicker" +export * from "./FilterSelect" +export * from "./KaizenProvider" +export * from "./Workflow" // PROBLEMS -// export * from "./BrandMoment" -// export * from "./Button" -// export * from "./ButtonGroup" // export * from "./Collapsible" -// export * from "./ErrorPage" -// export * from "./Filter" // export * from "./FilterBar" -// export * from "./FilterButton" -// export * from "./FilterDatePicker" -// export * from "./FilterDateRangePicker" // export * from "./FilterMultiSelect" -// export * from "./FilterSelect" -// export * from "./KaizenProvider" // export * from "./Notification" -// export * from "./Workflow"