From 2ae65db217d1abcfb763aff09a9a95f9acc81375 Mon Sep 17 00:00:00 2001 From: Cassandra Tam Date: Thu, 5 Sep 2024 12:53:15 +1000 Subject: [PATCH] refactor(Icon): move to future --- packages/components/rollup.config.mjs | 1 - .../{Icon.stories.tsx => Icon.docs.stories.tsx} | 2 +- packages/components/src/Icon/_docs/Icon.mdx | 3 +-- .../src/Icon/_docs/Icon.stickersheet.stories.tsx | 2 +- .../Icon/v3 => __future__/Icon}/Icon.module.css | 0 .../Icon/v3 => __future__/Icon}/Icon.spec.tsx | 0 .../Icon/v3 => __future__/Icon}/Icon.tsx | 0 .../Icon}/_docs/Icon--api-specification.mdx | 14 +++++++------- .../Icon}/_docs/Icon--usage-guidelines.mdx | 10 +++++----- .../Icon/_docs/Icon.docs.stories.tsx} | 2 +- .../Icon}/_docs/Icon.stickersheet.stories.tsx | 2 +- .../Icon/v3 => __future__/Icon}/constants.ts | 0 .../Icon/v3 => __future__/Icon}/index.ts | 0 .../Icon}/material-symbols-metadata.json | 0 .../Icon/v3 => __future__/Icon}/types.ts | 0 packages/components/src/__future__/index.ts | 1 + packages/components/src/__illustrations__/v3.ts | 1 - packages/components/v3/illustrations/package.json | 5 ----- pnpm-lock.yaml | 2 -- 19 files changed, 18 insertions(+), 27 deletions(-) rename packages/components/src/Icon/_docs/{Icon.stories.tsx => Icon.docs.stories.tsx} (98%) rename packages/components/src/{__illustrations__/Icon/v3 => __future__/Icon}/Icon.module.css (100%) rename packages/components/src/{__illustrations__/Icon/v3 => __future__/Icon}/Icon.spec.tsx (100%) rename packages/components/src/{__illustrations__/Icon/v3 => __future__/Icon}/Icon.tsx (100%) rename packages/components/src/{__illustrations__/Icon/v3 => __future__/Icon}/_docs/Icon--api-specification.mdx (88%) rename packages/components/src/{__illustrations__/Icon/v3 => __future__/Icon}/_docs/Icon--usage-guidelines.mdx (89%) rename packages/components/src/{__illustrations__/Icon/v3/_docs/Icon.stories.tsx => __future__/Icon/_docs/Icon.docs.stories.tsx} (99%) rename packages/components/src/{__illustrations__/Icon/v3 => __future__/Icon}/_docs/Icon.stickersheet.stories.tsx (98%) rename packages/components/src/{__illustrations__/Icon/v3 => __future__/Icon}/constants.ts (100%) rename packages/components/src/{__illustrations__/Icon/v3 => __future__/Icon}/index.ts (100%) rename packages/components/src/{__illustrations__/Icon/v3 => __future__/Icon}/material-symbols-metadata.json (100%) rename packages/components/src/{__illustrations__/Icon/v3 => __future__/Icon}/types.ts (100%) delete mode 100644 packages/components/src/__illustrations__/v3.ts delete mode 100644 packages/components/v3/illustrations/package.json diff --git a/packages/components/rollup.config.mjs b/packages/components/rollup.config.mjs index 412cd26423f..671fed28835 100644 --- a/packages/components/rollup.config.mjs +++ b/packages/components/rollup.config.mjs @@ -9,7 +9,6 @@ export default rollupConfig({ actionsV3: "./src/__actions__/v3.ts", containersV1: "./src/__containers__/v1.ts", containersV2: "./src/__containers__/v2.ts", - illustrationsV3: "./src/__illustrations__/v3.ts", layoutV1: "./src/__layout__/v1.ts", layoutV2: "./src/__layout__/v2.ts", layoutV3: "./src/__layout__/v3.ts", diff --git a/packages/components/src/Icon/_docs/Icon.stories.tsx b/packages/components/src/Icon/_docs/Icon.docs.stories.tsx similarity index 98% rename from packages/components/src/Icon/_docs/Icon.stories.tsx rename to packages/components/src/Icon/_docs/Icon.docs.stories.tsx index f60cc281307..c813bc1ea76 100644 --- a/packages/components/src/Icon/_docs/Icon.stories.tsx +++ b/packages/components/src/Icon/_docs/Icon.docs.stories.tsx @@ -7,7 +7,7 @@ import { AddIcon } from "../index" import styles from "./icon.module.scss" const meta = { - title: "Components/Icons", + title: "Illustrations/Icon", component: AddIcon, args: { role: "presentation", diff --git a/packages/components/src/Icon/_docs/Icon.mdx b/packages/components/src/Icon/_docs/Icon.mdx index c4bdbfbcc17..6ca4f889e3a 100644 --- a/packages/components/src/Icon/_docs/Icon.mdx +++ b/packages/components/src/Icon/_docs/Icon.mdx @@ -1,6 +1,6 @@ import { Canvas, Controls, Meta, Story } from "@storybook/blocks" import { ResourceLinks } from "~storybook/components" -import * as IconStories from "./Icon.stories" +import * as IconStories from "./Icon.docs.stories" @@ -8,7 +8,6 @@ import * as IconStories from "./Icon.stories" ## Installation diff --git a/packages/components/src/Icon/_docs/Icon.stickersheet.stories.tsx b/packages/components/src/Icon/_docs/Icon.stickersheet.stories.tsx index c8e0c18f7bf..47054ca7dfa 100644 --- a/packages/components/src/Icon/_docs/Icon.stickersheet.stories.tsx +++ b/packages/components/src/Icon/_docs/Icon.stickersheet.stories.tsx @@ -7,7 +7,7 @@ import { } from "~storybook/components/StickerSheet" export default { - title: "Components/Icons", + title: "Illustrations/Icon", parameters: { chromatic: { disable: false }, controls: { disable: true }, diff --git a/packages/components/src/__illustrations__/Icon/v3/Icon.module.css b/packages/components/src/__future__/Icon/Icon.module.css similarity index 100% rename from packages/components/src/__illustrations__/Icon/v3/Icon.module.css rename to packages/components/src/__future__/Icon/Icon.module.css diff --git a/packages/components/src/__illustrations__/Icon/v3/Icon.spec.tsx b/packages/components/src/__future__/Icon/Icon.spec.tsx similarity index 100% rename from packages/components/src/__illustrations__/Icon/v3/Icon.spec.tsx rename to packages/components/src/__future__/Icon/Icon.spec.tsx diff --git a/packages/components/src/__illustrations__/Icon/v3/Icon.tsx b/packages/components/src/__future__/Icon/Icon.tsx similarity index 100% rename from packages/components/src/__illustrations__/Icon/v3/Icon.tsx rename to packages/components/src/__future__/Icon/Icon.tsx diff --git a/packages/components/src/__illustrations__/Icon/v3/_docs/Icon--api-specification.mdx b/packages/components/src/__future__/Icon/_docs/Icon--api-specification.mdx similarity index 88% rename from packages/components/src/__illustrations__/Icon/v3/_docs/Icon--api-specification.mdx rename to packages/components/src/__future__/Icon/_docs/Icon--api-specification.mdx index f136501a81e..5583c6c0a11 100644 --- a/packages/components/src/__illustrations__/Icon/v3/_docs/Icon--api-specification.mdx +++ b/packages/components/src/__future__/Icon/_docs/Icon--api-specification.mdx @@ -1,19 +1,19 @@ import { Canvas, Meta, Controls, Story } from "@storybook/blocks" import { ResourceLinks, KAIOInstallation } from "~storybook/components" -import * as IconStories from "./Icon.stories" +import * as IconStories from "./Icon.docs.stories" - + -# Icon API Specification (v3) +# Icon API Specification (Future) -Updated September 2, 2024 +Updated September 4, 2024 - + ### Set up diff --git a/packages/components/src/__illustrations__/Icon/v3/_docs/Icon--usage-guidelines.mdx b/packages/components/src/__future__/Icon/_docs/Icon--usage-guidelines.mdx similarity index 89% rename from packages/components/src/__illustrations__/Icon/v3/_docs/Icon--usage-guidelines.mdx rename to packages/components/src/__future__/Icon/_docs/Icon--usage-guidelines.mdx index 45a849bfe41..8d67cf9cb36 100644 --- a/packages/components/src/__illustrations__/Icon/v3/_docs/Icon--usage-guidelines.mdx +++ b/packages/components/src/__future__/Icon/_docs/Icon--usage-guidelines.mdx @@ -1,19 +1,19 @@ import { Canvas, Meta, Controls, Story } from "@storybook/blocks" import { ResourceLinks, KAIOInstallation, DosAndDonts, DoOrDont } from "~storybook/components" -import * as IconStories from "./Icon.stories" +import * as IconStories from "./Icon.docs.stories" - + -# Icon (v3) +# Icon (Future) -Updated September 3, 2024 +Updated September 4, 2024 - + ## Overview diff --git a/packages/components/src/__illustrations__/Icon/v3/_docs/Icon.stories.tsx b/packages/components/src/__future__/Icon/_docs/Icon.docs.stories.tsx similarity index 99% rename from packages/components/src/__illustrations__/Icon/v3/_docs/Icon.stories.tsx rename to packages/components/src/__future__/Icon/_docs/Icon.docs.stories.tsx index c40266492fd..4dcfccd7334 100644 --- a/packages/components/src/__illustrations__/Icon/v3/_docs/Icon.stories.tsx +++ b/packages/components/src/__future__/Icon/_docs/Icon.docs.stories.tsx @@ -10,7 +10,7 @@ import { iconDefaultSet } from "../constants" import { Icon } from "../index" const meta = { - title: "Illustrations/Icon/Icon (v3)", + title: "Illustrations/Icon/Icon (Future)", component: Icon, args: { name: "star", diff --git a/packages/components/src/__illustrations__/Icon/v3/_docs/Icon.stickersheet.stories.tsx b/packages/components/src/__future__/Icon/_docs/Icon.stickersheet.stories.tsx similarity index 98% rename from packages/components/src/__illustrations__/Icon/v3/_docs/Icon.stickersheet.stories.tsx rename to packages/components/src/__future__/Icon/_docs/Icon.stickersheet.stories.tsx index d005616665a..5e57ba8095b 100644 --- a/packages/components/src/__illustrations__/Icon/v3/_docs/Icon.stickersheet.stories.tsx +++ b/packages/components/src/__future__/Icon/_docs/Icon.stickersheet.stories.tsx @@ -8,7 +8,7 @@ import { handledRtlIcons, iconDefaultSet } from "../constants" import { Icon, IconProps } from "../index" export default { - title: "Illustrations/Icon/Icon (v3)", + title: "Illustrations/Icon/Icon (Future)", parameters: { chromatic: { disable: false }, controls: { disable: true }, diff --git a/packages/components/src/__illustrations__/Icon/v3/constants.ts b/packages/components/src/__future__/Icon/constants.ts similarity index 100% rename from packages/components/src/__illustrations__/Icon/v3/constants.ts rename to packages/components/src/__future__/Icon/constants.ts diff --git a/packages/components/src/__illustrations__/Icon/v3/index.ts b/packages/components/src/__future__/Icon/index.ts similarity index 100% rename from packages/components/src/__illustrations__/Icon/v3/index.ts rename to packages/components/src/__future__/Icon/index.ts diff --git a/packages/components/src/__illustrations__/Icon/v3/material-symbols-metadata.json b/packages/components/src/__future__/Icon/material-symbols-metadata.json similarity index 100% rename from packages/components/src/__illustrations__/Icon/v3/material-symbols-metadata.json rename to packages/components/src/__future__/Icon/material-symbols-metadata.json diff --git a/packages/components/src/__illustrations__/Icon/v3/types.ts b/packages/components/src/__future__/Icon/types.ts similarity index 100% rename from packages/components/src/__illustrations__/Icon/v3/types.ts rename to packages/components/src/__future__/Icon/types.ts diff --git a/packages/components/src/__future__/index.ts b/packages/components/src/__future__/index.ts index 29d478434c0..cc060efbbb0 100644 --- a/packages/components/src/__future__/index.ts +++ b/packages/components/src/__future__/index.ts @@ -1,3 +1,4 @@ +export * from "./Icon" export * from "./Select" export * from "./Tag" export * from "../__layout__/Workflow/v2" diff --git a/packages/components/src/__illustrations__/v3.ts b/packages/components/src/__illustrations__/v3.ts deleted file mode 100644 index f9a633bef80..00000000000 --- a/packages/components/src/__illustrations__/v3.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./Icon/v3" diff --git a/packages/components/v3/illustrations/package.json b/packages/components/v3/illustrations/package.json deleted file mode 100644 index 9979a374a48..00000000000 --- a/packages/components/v3/illustrations/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "main": "../../dist/cjs/illustrationsV3.cjs", - "module": "../../dist/esm/illustrationsV3.mjs", - "types": "../../dist/types/__illustrations__/v3.d.ts" -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aa0b6ff6f39..8335d15c38b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -501,8 +501,6 @@ importers: packages/components/v3/actions: {} - packages/components/v3/illustrations: {} - packages/components/v3/layout: {} packages/components/v3/overlays: {}