Skip to content

Commit

Permalink
feat: update component statuses (#1731)
Browse files Browse the repository at this point in the history
- DataBar (deprecated)
- Drawer (deprecated)
- FieldNote (promoted to mature)
- FiltersDrawer (deprecated)
- PageHeader (deprecated)
- Panel (deprecated)
- Score (deprecated)
- Section (deprecated)
- TimelineNav (deprecated)

Also mark any bound sub-components to match
  • Loading branch information
booc0mtaco authored Aug 21, 2023
1 parent c574755 commit 586a0cb
Show file tree
Hide file tree
Showing 24 changed files with 29 additions and 30 deletions.
3 changes: 2 additions & 1 deletion src/components/DataBar/DataBar.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { BADGE } from '@geometricpanda/storybook-addon-badges';
import type { StoryObj, Meta } from '@storybook/react';
import React from 'react';

Expand All @@ -18,7 +19,7 @@ export default {
],
},
parameters: {
badges: ['1.0'],
badges: ['1.0', BADGE.DEPRECATED],
backgrounds: {
default: 'eds-color-neutral-white',
},
Expand Down
1 change: 1 addition & 0 deletions src/components/DataBar/DataBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export type DataBarProps = {
* { value: 15, text: 'Segment 3' },
* ]} />
* ```
* @deprecated
*/
export const DataBar = ({
className,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Drawer/Drawer.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default {
title: 'Components/Drawer',
component: Drawer,
parameters: {
badges: ['1.0', BADGE.BETA],
badges: ['1.0', BADGE.DEPRECATED],
},
args: {
'aria-describedby': 'drawer-description-1',
Expand Down
4 changes: 2 additions & 2 deletions src/components/Drawer/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ export type Props = {
};

/**
* BETA: This component is still a work in progress and is subject to change.
*
* `import {Drawer} from "@chanzuckerberg/eds";`
*
* A window component that slides from and out of the right side of the screen.
*
* @deprecated
*/
export const Drawer = ({
'aria-describedby': ariaDescribedBy,
Expand Down
3 changes: 1 addition & 2 deletions src/components/DrawerBody/DrawerBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ export type Props = {
};

/**
* BETA: This component is still a work in progress and is subject to change.
*
* `import {DrawerBody} from "@chanzuckerberg/eds";`
*
* The main center content of the Drawer component.
* @deprecated
*/
export const DrawerBody = React.forwardRef<HTMLDivElement, Props>(
({ children, className }, ref) => {
Expand Down
3 changes: 1 addition & 2 deletions src/components/DrawerFooter/DrawerFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ export type Props = {
};

/**
* BETA: This component is still a work in progress and is subject to change.
*
* `import {DrawerFooter} from "@chanzuckerberg/eds";`
*
* The footer content of the Drawer component. Usually houses interactible component controlling the Drawer functionality.
* @deprecated
*/
export const DrawerFooter = ({ children, className, ...other }: Props) => {
const componentClassName = clsx('drawer__footer', className);
Expand Down
3 changes: 1 addition & 2 deletions src/components/DrawerHeader/DrawerHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ export type Props = {
};

/**
* BETA: This component is still a work in progress and is subject to change.
*
* `import {DrawerHeader} from "@chanzuckerberg/eds";`
*
* The header content of the Drawer component. Usually houses the heading and the close button.
* @deprecated
*/
export const DrawerHeader = ({
className,
Expand Down
3 changes: 1 addition & 2 deletions src/components/FieldNote/FieldNote.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { BADGE } from '@geometricpanda/storybook-addon-badges';
import type { StoryObj, Meta } from '@storybook/react';
import React from 'react';

Expand All @@ -10,7 +9,7 @@ export default {
title: 'Components/FieldNote',
component: FieldNote,
parameters: {
badges: ['1.0', BADGE.BETA],
badges: ['1.0'],
},
} as Meta<Args>;

Expand Down
2 changes: 0 additions & 2 deletions src/components/FieldNote/FieldNote.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ export interface Props {
}

/**
* BETA: This component is still a work in progress and is subject to change.
*
* `import {FieldNote} from "@chanzuckerberg/eds";`
*
* Fieldnote component wraps text to describe other components.
Expand Down
3 changes: 1 addition & 2 deletions src/components/FiltersButton/FiltersButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ export type FiltersButtonProps = {
} & Omit<ButtonProps, 'children' | 'variant' | 'status'>;

/**
* BETA: This component is still a work in progress and is subject to change.
*
* `import {FiltersButton} from "@chanzuckerberg/eds";`
*
* Default button for triggering Filters components.
* @deprecated
*/
export const FiltersButton = forwardRef<HTMLButtonElement, FiltersButtonProps>(
({ className, hasSelectedFilters, triggerText, ...other }, ref) => {
Expand Down
3 changes: 1 addition & 2 deletions src/components/FiltersCheckboxField/FiltersCheckboxField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ export type Props = {
};

/**
* BETA: This component is still a work in progress and is subject to change.
*
* ```tsx
* import {Filters} from "@chanzuckerberg/eds";
*
* <Filters.CheckboxField>
* ```
*
* Field of checkboxes that are placed within a FiltersDrawer component.
* @deprecated
*/
export const FiltersCheckboxField = ({
className,
Expand Down
2 changes: 1 addition & 1 deletion src/components/FiltersDrawer/FiltersDrawer.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
title: 'Components/FiltersDrawer',
component: FiltersDrawer,
parameters: {
badges: ['1.1', BADGE.BETA],
badges: ['1.1', BADGE.DEPRECATED],
},
args: {
triggerText: 'Filters',
Expand Down
3 changes: 1 addition & 2 deletions src/components/FiltersDrawer/FiltersDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,10 @@ export type FiltersDrawerProps = {
};

/**
* BETA: This component is still a work in progress and is subject to change.
*
* `import {FiltersDrawer} from "@chanzuckerberg/eds";`
*
* A drawer component with fields of checkboxes to select filters.
* @deprecated
*/
export const FiltersDrawer = ({
children,
Expand Down
3 changes: 1 addition & 2 deletions src/components/FiltersPopover/FiltersPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,10 @@ const FiltersPopoverRender = ({
};

/**
* BETA: This component is still a work in progress and is subject to change.
*
* `import {FiltersPopover} from "@chanzuckerberg/eds";`
*
* A popover component with fields of form inputs to select filters.
* @deprecated
*/
export const FiltersPopover = ({
placement = 'bottom-start',
Expand Down
3 changes: 2 additions & 1 deletion src/components/PageHeader/PageHeader.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { BADGE } from '@geometricpanda/storybook-addon-badges';
import type { StoryObj, Meta } from '@storybook/react';
import React from 'react';

Expand All @@ -10,7 +11,7 @@ export default {
title: 'Components/PageHeader',
component: PageHeader,
parameters: {
badges: ['1.0'],
badges: ['1.0', BADGE.DEPRECATED],
},
} as Meta<Args>;

Expand Down
1 change: 1 addition & 0 deletions src/components/PageHeader/PageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export interface Props {
* `import {PageHeader} from "@chanzuckerberg/eds";`
*
* Header to be used at the top of a page.
* @deprecated
*/
export const PageHeader = ({
align,
Expand Down
3 changes: 2 additions & 1 deletion src/components/Panel/Panel.stories.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { BADGE } from '@geometricpanda/storybook-addon-badges';
import type { StoryObj, Meta } from '@storybook/react';
import type { ComponentProps } from 'react';

Expand All @@ -7,7 +8,7 @@ export default {
title: 'Components/Panel',
component: Panel,
parameters: {
badges: ['1.0'],
badges: ['1.0', BADGE.DEPRECATED],
},
args: {
children: 'A Panel is a generic bordered container for content.',
Expand Down
1 change: 1 addition & 0 deletions src/components/Panel/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export interface Props {
* `import {Panel} from "@chanzuckerberg/eds";`
*
* Component Panel is the container to show the contents with props passed through for conditional styling of the panel based on variants props.
* @deprecated
*/
export const Panel = ({
className,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Score/Score.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
title: 'Components/Score',
component: Score,
parameters: {
badges: ['1.0', BADGE.BETA],
badges: ['1.0', BADGE.DEPRECATED],
},
} as Meta<Args>;

Expand Down
3 changes: 1 addition & 2 deletions src/components/Score/Score.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ export interface Props {
}

/**
* BETA: This component is still a work in progress and is subject to change.
*
* `import {Score} from "@chanzuckerberg/eds";`
*
* A (pill shaped badge) wrapper intended for use with scores.
* @deprecated
*/
export const Score = ({ className, variant, ...other }: Props) => {
const componentClassName = clsx(
Expand Down
3 changes: 2 additions & 1 deletion src/components/Section/Section.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { BADGE } from '@geometricpanda/storybook-addon-badges';
import type { StoryObj, Meta } from '@storybook/react';
import React from 'react';
import { Section } from './Section';
Expand All @@ -10,7 +11,7 @@ export default {
title: 'Components/Section',
component: Section,
parameters: {
badges: ['1.0'],
badges: ['1.0', BADGE.DEPRECATED],
},
args: {
children:
Expand Down
1 change: 1 addition & 0 deletions src/components/Section/Section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export interface Props {
*
* The Heading component requires a value for "size", so this headingAs prop is provided
* a default value of "h2" to allow it to remain optional on Section component.
* @deprecated
*/
export const Section = ({
align,
Expand Down
3 changes: 2 additions & 1 deletion src/components/TimelineNav/TimelineNav.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { BADGE } from '@geometricpanda/storybook-addon-badges';
import type { StoryObj, Meta } from '@storybook/react';
import React from 'react';

Expand All @@ -16,7 +17,7 @@ export default {
component: TimelineNav,
subcomponents: { 'TimlineNav.Panel': TimelineNav.Panel },
parameters: {
badges: ['1.0'],
badges: ['1.0', BADGE.DEPRECATED],
backgrounds: {
default: 'eds-color-neutral-white',
},
Expand Down
1 change: 1 addition & 0 deletions src/components/TimelineNav/TimelineNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ const TimelineNavPanel = ({
*
* Provides a list-view pane for item labels/titles, and a details pane for each item's content.
* When an item in the list is selected, the details pane is updated.
* @deprecated
*/
export const TimelineNav = ({
activeIndex = 0,
Expand Down

0 comments on commit 586a0cb

Please sign in to comment.