diff --git a/packages/storybook/.storybook/preview.ts b/packages/storybook/.storybook/preview.ts index 232c06de0f..60a41447c1 100644 --- a/packages/storybook/.storybook/preview.ts +++ b/packages/storybook/.storybook/preview.ts @@ -31,7 +31,9 @@ import { defineCustomElement as defineSelect } from '@ovhcloud/ods-components/di import { defineCustomElement as defineSkeleton } from '@ovhcloud/ods-components/dist/components/ods-skeleton'; import { defineCustomElement as defineSpinner } from '@ovhcloud/ods-components/dist/components/ods-spinner'; import { defineCustomElement as defineSwitch } from '@ovhcloud/ods-components/dist/components/ods-switch'; +import { defineCustomElement as defineSwitchItem } from '@ovhcloud/ods-components/dist/components/ods-switch-item'; import { defineCustomElement as defineTable } from '@ovhcloud/ods-components/dist/components/ods-table'; +import { defineCustomElement as defineTab } from '@ovhcloud/ods-components/dist/components/ods-tab'; import { defineCustomElement as defineTabs } from '@ovhcloud/ods-components/dist/components/ods-tabs'; import { defineCustomElement as defineTag } from '@ovhcloud/ods-components/dist/components/ods-tag'; import { defineCustomElement as defineText } from '@ovhcloud/ods-components/dist/components/ods-text'; @@ -77,7 +79,9 @@ const preview: Preview = { defineSkeleton(); defineSpinner(); defineSwitch(); + defineSwitchItem(); defineTable(); + defineTab(); defineTabs(); defineTag(); defineText(); diff --git a/packages/storybook/stories/components/table/1_specifications.stories.mdx b/packages/storybook/stories/components/table/1_specifications.stories.mdx deleted file mode 100644 index 798b3edf22..0000000000 --- a/packages/storybook/stories/components/table/1_specifications.stories.mdx +++ /dev/null @@ -1,17 +0,0 @@ -import { Meta } from '@storybook/addon-docs'; -import SpecificationsTable from '@ovhcloud/ods-components/src/table/documentation/specifications/specifications-table.mdx'; - - - -# Table - Design Specifications ----- - -Table is a wrapper for displaying tables: -
- -
- -# Table - Technical Specification ----- - - diff --git a/packages/storybook/stories/components/table/2_usage.stories.mdx b/packages/storybook/stories/components/table/2_usage.stories.mdx deleted file mode 100644 index f66f35c1a2..0000000000 --- a/packages/storybook/stories/components/table/2_usage.stories.mdx +++ /dev/null @@ -1,9 +0,0 @@ -import { Meta } from '@storybook/addon-docs'; -import Usage from '@ovhcloud/ods-components/src/table/documentation/usage-guidelines/usage.mdx'; - - - -# Table - Usage Guidelines ----- - - diff --git a/packages/storybook/stories/components/table/3_demo.stories.ts b/packages/storybook/stories/components/table/3_demo.stories.ts deleted file mode 100644 index 74619ebbe1..0000000000 --- a/packages/storybook/stories/components/table/3_demo.stories.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { ODS_TABLE_SIZE, ODS_TABLE_SIZES, ODS_TABLE_VARIANT, ODS_TABLE_VARIANTS } from '@ovhcloud/ods-components'; -import { defineCustomElement } from '@ovhcloud/ods-components/dist/components/osds-table'; -import { html } from 'lit-html'; -import { unsafeHTML } from 'lit-html/directives/unsafe-html'; -import { extractArgTypes, extractStoryParams, getTagAttributes } from '../../../core/componentHTMLUtils'; - -defineCustomElement(); - -const variants = { - default: '', - striped: ODS_TABLE_VARIANT.striped, -} as const; - -/* Demo story parameters */ -const storyParams = { - size: { - category: 'General', - control: { type: 'select' }, - defaultValue: ODS_TABLE_SIZE.md, - options: ODS_TABLE_SIZES, - }, - tableContent: { - category: 'Slot', - defaultValue: '\n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - '
\n' + - ' Front-end web developer course 2021\n' + - '
PersonMost interest inAge
ChrisHTML tables22
DennisWeb accessibility45
SarahJavaScript frameworks29
KarenWeb performance36
', - }, - variant: { - category: 'Misc', - control: { type: 'select' }, - defaultValue: variants.default, - options: variants, - }, -}; - -export default { - title: 'ODS Components/Layout/Table [organism]/Demo', - id: 'table', - argTypes: extractArgTypes(storyParams), -}; - -/* Default */ -const TemplateDemo = (args: any) => { - return html` - - ${unsafeHTML(args.tableContent)} - - `; -}; - -export const Demo = TemplateDemo.bind({}); -// @ts-ignore -Demo.args = { - ...extractStoryParams(storyParams), -};