diff --git a/.changeset/violet-cheetahs-kneel.md b/.changeset/violet-cheetahs-kneel.md new file mode 100644 index 00000000000..d5666881569 --- /dev/null +++ b/.changeset/violet-cheetahs-kneel.md @@ -0,0 +1,5 @@ +--- +"@kaizen/components": minor +--- + +Move Menu v3 to Future diff --git a/packages/components/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.tsx b/packages/components/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.tsx index ed80394376b..94b14116d76 100644 --- a/packages/components/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.tsx +++ b/packages/components/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.tsx @@ -1,7 +1,8 @@ import React from "react" import { useIntl } from "@cultureamp/i18n-react-intl" import { AddIcon } from "~components/Icon" -import { Menu, MenuList, MenuItem, Button } from "~components/__actions__/v2" +import { Menu, MenuList, MenuItem } from "~components/Menu" +import { Button } from "~components/__actions__/v2" import { useFilterBarContext } from "../../context/FilterBarContext" export const AddFiltersMenu = (): JSX.Element => { diff --git a/packages/components/src/__actions__/Menu/v1/Menu.spec.tsx b/packages/components/src/Menu/Menu.spec.tsx similarity index 100% rename from packages/components/src/__actions__/Menu/v1/Menu.spec.tsx rename to packages/components/src/Menu/Menu.spec.tsx diff --git a/packages/components/src/__actions__/Menu/v1/Menu.tsx b/packages/components/src/Menu/Menu.tsx similarity index 100% rename from packages/components/src/__actions__/Menu/v1/Menu.tsx rename to packages/components/src/Menu/Menu.tsx diff --git a/packages/components/src/__actions__/Menu/v1/_docs/Menu.mdx b/packages/components/src/Menu/_docs/Menu.mdx similarity index 89% rename from packages/components/src/__actions__/Menu/v1/_docs/Menu.mdx rename to packages/components/src/Menu/_docs/Menu.mdx index f75f9c21cfa..16cc3e70d56 100644 --- a/packages/components/src/__actions__/Menu/v1/_docs/Menu.mdx +++ b/packages/components/src/Menu/_docs/Menu.mdx @@ -4,7 +4,7 @@ import * as MenuStories from "./Menu.stories" -# Menu (v1) +# Menu -It is recommended that you import from the `v2` entry point. - ## Overview A menu contains links to places or button actions. It does NOT show a selected item at all and the menu button text never changes. diff --git a/packages/components/src/__actions__/Menu/v1/_docs/Menu.stickersheet.stories.tsx b/packages/components/src/Menu/_docs/Menu.stickersheet.stories.tsx similarity index 98% rename from packages/components/src/__actions__/Menu/v1/_docs/Menu.stickersheet.stories.tsx rename to packages/components/src/Menu/_docs/Menu.stickersheet.stories.tsx index 4290912da35..0d831d117e0 100644 --- a/packages/components/src/__actions__/Menu/v1/_docs/Menu.stickersheet.stories.tsx +++ b/packages/components/src/Menu/_docs/Menu.stickersheet.stories.tsx @@ -10,7 +10,7 @@ import { Menu } from "../index" import { MenuContentExample } from "./MenuContentExample" export default { - title: "Actions/Menu/v1", + title: "Actions/Menu", parameters: { chromatic: { disable: false }, controls: { disable: true }, diff --git a/packages/components/src/__actions__/Menu/v1/_docs/Menu.stories.tsx b/packages/components/src/Menu/_docs/Menu.stories.tsx similarity index 98% rename from packages/components/src/__actions__/Menu/v1/_docs/Menu.stories.tsx rename to packages/components/src/Menu/_docs/Menu.stories.tsx index 460f76191fc..63a3653cb47 100644 --- a/packages/components/src/__actions__/Menu/v1/_docs/Menu.stories.tsx +++ b/packages/components/src/Menu/_docs/Menu.stories.tsx @@ -8,7 +8,7 @@ import { MenuItem } from "../subcomponents/MenuItem" import { MenuList } from "../subcomponents/MenuList" const meta = { - title: "Actions/Menu/v1", + title: "Actions/Menu", component: Menu, args: { button: ( diff --git a/packages/components/src/__actions__/Menu/v1/_docs/MenuContentExample.tsx b/packages/components/src/Menu/_docs/MenuContentExample.tsx similarity index 100% rename from packages/components/src/__actions__/Menu/v1/_docs/MenuContentExample.tsx rename to packages/components/src/Menu/_docs/MenuContentExample.tsx diff --git a/packages/components/src/__actions__/Menu/v1/_docs/examples.tsx b/packages/components/src/Menu/_docs/examples.tsx similarity index 100% rename from packages/components/src/__actions__/Menu/v1/_docs/examples.tsx rename to packages/components/src/Menu/_docs/examples.tsx diff --git a/packages/components/src/__actions__/Menu/v1/index.ts b/packages/components/src/Menu/index.ts similarity index 94% rename from packages/components/src/__actions__/Menu/v1/index.ts rename to packages/components/src/Menu/index.ts index 4519a268837..2f0d54c455b 100644 --- a/packages/components/src/__actions__/Menu/v1/index.ts +++ b/packages/components/src/Menu/index.ts @@ -17,7 +17,7 @@ import { StatelessMenuProps as StatelessMenuPropsV1, } from "./subcomponents/StatelessMenu" -// Note: deprecate all of these once we have Button v3 +// Note: deprecate all of these once we have RAC Button export const Menu = MenuV1 export type MenuProps = MenuPropsV1 diff --git a/packages/components/src/__actions__/Menu/v1/subcomponents/MenuDropdown/MenuDropdown.module.scss b/packages/components/src/Menu/subcomponents/MenuDropdown/MenuDropdown.module.scss similarity index 100% rename from packages/components/src/__actions__/Menu/v1/subcomponents/MenuDropdown/MenuDropdown.module.scss rename to packages/components/src/Menu/subcomponents/MenuDropdown/MenuDropdown.module.scss diff --git a/packages/components/src/__actions__/Menu/v1/subcomponents/MenuDropdown/MenuDropdown.tsx b/packages/components/src/Menu/subcomponents/MenuDropdown/MenuDropdown.tsx similarity index 100% rename from packages/components/src/__actions__/Menu/v1/subcomponents/MenuDropdown/MenuDropdown.tsx rename to packages/components/src/Menu/subcomponents/MenuDropdown/MenuDropdown.tsx diff --git a/packages/components/src/__actions__/Menu/v1/subcomponents/MenuDropdown/index.ts b/packages/components/src/Menu/subcomponents/MenuDropdown/index.ts similarity index 100% rename from packages/components/src/__actions__/Menu/v1/subcomponents/MenuDropdown/index.ts rename to packages/components/src/Menu/subcomponents/MenuDropdown/index.ts diff --git a/packages/components/src/__actions__/Menu/v1/subcomponents/MenuHeading/MenuHeading.module.scss b/packages/components/src/Menu/subcomponents/MenuHeading/MenuHeading.module.scss similarity index 100% rename from packages/components/src/__actions__/Menu/v1/subcomponents/MenuHeading/MenuHeading.module.scss rename to packages/components/src/Menu/subcomponents/MenuHeading/MenuHeading.module.scss diff --git a/packages/components/src/__actions__/Menu/v1/subcomponents/MenuHeading/MenuHeading.tsx b/packages/components/src/Menu/subcomponents/MenuHeading/MenuHeading.tsx similarity index 100% rename from packages/components/src/__actions__/Menu/v1/subcomponents/MenuHeading/MenuHeading.tsx rename to packages/components/src/Menu/subcomponents/MenuHeading/MenuHeading.tsx diff --git a/packages/components/src/__actions__/Menu/v1/subcomponents/MenuHeading/index.ts b/packages/components/src/Menu/subcomponents/MenuHeading/index.ts similarity index 100% rename from packages/components/src/__actions__/Menu/v1/subcomponents/MenuHeading/index.ts rename to packages/components/src/Menu/subcomponents/MenuHeading/index.ts diff --git a/packages/components/src/__actions__/Menu/v1/subcomponents/MenuItem/MenuItem.module.scss b/packages/components/src/Menu/subcomponents/MenuItem/MenuItem.module.scss similarity index 100% rename from packages/components/src/__actions__/Menu/v1/subcomponents/MenuItem/MenuItem.module.scss rename to packages/components/src/Menu/subcomponents/MenuItem/MenuItem.module.scss diff --git a/packages/components/src/__actions__/Menu/v1/subcomponents/MenuItem/MenuItem.tsx b/packages/components/src/Menu/subcomponents/MenuItem/MenuItem.tsx similarity index 100% rename from packages/components/src/__actions__/Menu/v1/subcomponents/MenuItem/MenuItem.tsx rename to packages/components/src/Menu/subcomponents/MenuItem/MenuItem.tsx diff --git a/packages/components/src/__actions__/Menu/v1/subcomponents/MenuItem/index.ts b/packages/components/src/Menu/subcomponents/MenuItem/index.ts similarity index 100% rename from packages/components/src/__actions__/Menu/v1/subcomponents/MenuItem/index.ts rename to packages/components/src/Menu/subcomponents/MenuItem/index.ts diff --git a/packages/components/src/__actions__/Menu/v1/subcomponents/MenuList/MenuList.module.scss b/packages/components/src/Menu/subcomponents/MenuList/MenuList.module.scss similarity index 100% rename from packages/components/src/__actions__/Menu/v1/subcomponents/MenuList/MenuList.module.scss rename to packages/components/src/Menu/subcomponents/MenuList/MenuList.module.scss diff --git a/packages/components/src/__actions__/Menu/v1/subcomponents/MenuList/MenuList.spec.tsx b/packages/components/src/Menu/subcomponents/MenuList/MenuList.spec.tsx similarity index 100% rename from packages/components/src/__actions__/Menu/v1/subcomponents/MenuList/MenuList.spec.tsx rename to packages/components/src/Menu/subcomponents/MenuList/MenuList.spec.tsx diff --git a/packages/components/src/__actions__/Menu/v1/subcomponents/MenuList/MenuList.tsx b/packages/components/src/Menu/subcomponents/MenuList/MenuList.tsx similarity index 100% rename from packages/components/src/__actions__/Menu/v1/subcomponents/MenuList/MenuList.tsx rename to packages/components/src/Menu/subcomponents/MenuList/MenuList.tsx diff --git a/packages/components/src/__actions__/Menu/v1/subcomponents/MenuList/index.ts b/packages/components/src/Menu/subcomponents/MenuList/index.ts similarity index 100% rename from packages/components/src/__actions__/Menu/v1/subcomponents/MenuList/index.ts rename to packages/components/src/Menu/subcomponents/MenuList/index.ts diff --git a/packages/components/src/__actions__/Menu/v1/subcomponents/StatelessMenu/StatelessMenu.module.scss b/packages/components/src/Menu/subcomponents/StatelessMenu/StatelessMenu.module.scss similarity index 100% rename from packages/components/src/__actions__/Menu/v1/subcomponents/StatelessMenu/StatelessMenu.module.scss rename to packages/components/src/Menu/subcomponents/StatelessMenu/StatelessMenu.module.scss diff --git a/packages/components/src/__actions__/Menu/v1/subcomponents/StatelessMenu/StatelessMenu.tsx b/packages/components/src/Menu/subcomponents/StatelessMenu/StatelessMenu.tsx similarity index 100% rename from packages/components/src/__actions__/Menu/v1/subcomponents/StatelessMenu/StatelessMenu.tsx rename to packages/components/src/Menu/subcomponents/StatelessMenu/StatelessMenu.tsx diff --git a/packages/components/src/__actions__/Menu/v1/subcomponents/StatelessMenu/index.ts b/packages/components/src/Menu/subcomponents/StatelessMenu/index.ts similarity index 100% rename from packages/components/src/__actions__/Menu/v1/subcomponents/StatelessMenu/index.ts rename to packages/components/src/Menu/subcomponents/StatelessMenu/index.ts diff --git a/packages/components/src/SplitButton/SplitButton.spec.tsx b/packages/components/src/SplitButton/SplitButton.spec.tsx index e5b1c132f78..ac50284d46b 100644 --- a/packages/components/src/SplitButton/SplitButton.spec.tsx +++ b/packages/components/src/SplitButton/SplitButton.spec.tsx @@ -2,7 +2,7 @@ import React from "react" import { screen, waitFor, render } from "@testing-library/react" import userEvent from "@testing-library/user-event" import { vi } from "vitest" -import { MenuItem, MenuList } from "~components/__actions__/v2" +import { MenuItem, MenuList } from "~components/Menu" import { SplitButton, SplitButtonProps } from "./SplitButton" const user = userEvent.setup() diff --git a/packages/components/src/SplitButton/SplitButton.tsx b/packages/components/src/SplitButton/SplitButton.tsx index cd93168b7b4..18570e6bdfe 100644 --- a/packages/components/src/SplitButton/SplitButton.tsx +++ b/packages/components/src/SplitButton/SplitButton.tsx @@ -1,6 +1,6 @@ import React, { HTMLAttributes } from "react" import classnames from "classnames" -import { Menu } from "~components/__actions__/v2" +import { Menu } from "~components/Menu" import { DataAttributes } from "~components/types/DataAttributes" import { OverrideClassName } from "~components/types/OverrideClassName" import { ActionButton, ActionButtonProps } from "./subcomponents/ActionButton" diff --git a/packages/components/src/SplitButton/_docs/SplitButton.stickersheet.stories.tsx b/packages/components/src/SplitButton/_docs/SplitButton.stickersheet.stories.tsx index 5f30ba074dd..b85108179e9 100644 --- a/packages/components/src/SplitButton/_docs/SplitButton.stickersheet.stories.tsx +++ b/packages/components/src/SplitButton/_docs/SplitButton.stickersheet.stories.tsx @@ -4,7 +4,7 @@ import { exampleActionButtonPropsAnchor, exampleActionButtonPropsButton, exampleDropdownContentEnabled, -} from "~components/__actions__/Menu/v1/_docs/examples" +} from "~components/Menu/_docs/examples" import { StickerSheet, StickerSheetStory, diff --git a/packages/components/src/SplitButton/_docs/SplitButton.stories.tsx b/packages/components/src/SplitButton/_docs/SplitButton.stories.tsx index 5aee45e3c6c..1de05fa68af 100644 --- a/packages/components/src/SplitButton/_docs/SplitButton.stories.tsx +++ b/packages/components/src/SplitButton/_docs/SplitButton.stories.tsx @@ -4,7 +4,7 @@ import { exampleActionButtonPropsButton, exampleDropdownContentEnabled, exampleDropdownContentOneDisabled, -} from "~components/__actions__/Menu/v1/_docs/examples" +} from "~components/Menu/_docs/examples" import { SplitButton } from "../index" const meta = { diff --git a/packages/components/src/TitleBlockZen/subcomponents/MainActions.tsx b/packages/components/src/TitleBlockZen/subcomponents/MainActions.tsx index 7bd71abc5b5..1d4472bf269 100644 --- a/packages/components/src/TitleBlockZen/subcomponents/MainActions.tsx +++ b/packages/components/src/TitleBlockZen/subcomponents/MainActions.tsx @@ -1,6 +1,7 @@ import React from "react" import { ChevronDownIcon, MeatballsIcon } from "~components/Icon" -import { Menu, MenuList, Button, IconButton } from "~components/__actions__/v2" +import { Menu, MenuList } from "~components/Menu" +import { Button, IconButton } from "~components/__actions__/v2" import { TITLE_BLOCK_ZEN_SECONDARY_MENU_HTML_ID } from "../constants" import { DefaultActionProps, diff --git a/packages/components/src/TitleBlockZen/subcomponents/MobileActions.tsx b/packages/components/src/TitleBlockZen/subcomponents/MobileActions.tsx index 7a222bd4a33..45b6be3c367 100644 --- a/packages/components/src/TitleBlockZen/subcomponents/MobileActions.tsx +++ b/packages/components/src/TitleBlockZen/subcomponents/MobileActions.tsx @@ -2,12 +2,8 @@ import React, { useCallback, useEffect, useState } from "react" import classnames from "classnames" import { FocusOn } from "react-focus-on" import { ChevronDownIcon, ChevronUpIcon } from "~components/Icon" -import { - MenuItem, - MenuList, - MenuHeading, - ButtonProps, -} from "~components/__actions__/v2" +import { MenuItem, MenuList, MenuHeading } from "~components/Menu" +import { ButtonProps } from "~components/__actions__/v2" import { TITLE_BLOCK_ZEN_OTHER_ACTIONS_HTML_ID } from "../constants" import { DefaultActionProps, diff --git a/packages/components/src/TitleBlockZen/subcomponents/SecondaryActions.tsx b/packages/components/src/TitleBlockZen/subcomponents/SecondaryActions.tsx index ba2646b4d5a..1fdcda3356b 100644 --- a/packages/components/src/TitleBlockZen/subcomponents/SecondaryActions.tsx +++ b/packages/components/src/TitleBlockZen/subcomponents/SecondaryActions.tsx @@ -1,6 +1,7 @@ import React from "react" import { ChevronDownIcon, MeatballsIcon } from "~components/Icon" -import { Menu, MenuList, Button, IconButton } from "~components/__actions__/v2" +import { Menu, MenuList } from "~components/Menu" +import { Button, IconButton } from "~components/__actions__/v2" import styles from "../TitleBlockZen.module.scss" import { TITLE_BLOCK_ZEN_SECONDARY_MENU_HTML_ID } from "../constants" import { SecondaryActionsProps, TitleBlockMenuItemProps } from "../types" diff --git a/packages/components/src/TitleBlockZen/subcomponents/TitleBlockMenuItem.tsx b/packages/components/src/TitleBlockZen/subcomponents/TitleBlockMenuItem.tsx index 359678fab1a..ceee17c9234 100644 --- a/packages/components/src/TitleBlockZen/subcomponents/TitleBlockMenuItem.tsx +++ b/packages/components/src/TitleBlockZen/subcomponents/TitleBlockMenuItem.tsx @@ -1,6 +1,6 @@ import React from "react" import classnames from "classnames" -import { MenuItem } from "~components/__actions__/v2" +import { MenuItem } from "~components/Menu" import { TitleBlockMenuItemProps } from "../types" import styles from "./TitleBlockMenuItem.module.scss" diff --git a/packages/components/src/TitleBlockZen/subcomponents/Toolbar.tsx b/packages/components/src/TitleBlockZen/subcomponents/Toolbar.tsx index a540f41ec5d..2dfc55d439a 100644 --- a/packages/components/src/TitleBlockZen/subcomponents/Toolbar.tsx +++ b/packages/components/src/TitleBlockZen/subcomponents/Toolbar.tsx @@ -4,7 +4,8 @@ import React from "react" import classnames from "classnames" -import { MenuProps, ButtonProps } from "~components/__actions__/v2" +import { MenuProps } from "~components/Menu" +import { ButtonProps } from "~components/__actions__/v2" import styles from "./Toolbar.module.scss" type ToolbarProps = { diff --git a/packages/components/src/TitleBlockZen/types.ts b/packages/components/src/TitleBlockZen/types.ts index 12680a7a53b..810053edb1d 100644 --- a/packages/components/src/TitleBlockZen/types.ts +++ b/packages/components/src/TitleBlockZen/types.ts @@ -1,10 +1,7 @@ import { CompanyAvatarProps, GenericAvatarProps } from "~components/Avatar" +import { MenuItemProps } from "~components/Menu" import { Select } from "~components/Select" -import { - ButtonProps, - CustomButtonProps, - MenuItemProps, -} from "~components/__actions__/v2" +import { ButtonProps, CustomButtonProps } from "~components/__actions__/v2" import { NavigationTabProps } from "./subcomponents/NavigationTabs" /** diff --git a/packages/components/src/__actions__/Menu/v2/_docs/Menu.mdx b/packages/components/src/__actions__/Menu/v2/_docs/Menu.mdx deleted file mode 100644 index 11de8259dd2..00000000000 --- a/packages/components/src/__actions__/Menu/v2/_docs/Menu.mdx +++ /dev/null @@ -1,27 +0,0 @@ -import { Canvas, Controls, Meta } from "@storybook/blocks" -import { ResourceLinks, KAIOInstallation } from "~storybook/components" -import * as MenuStories from "./Menu.stories" - - - -# Menu (v2) - - - - - -## Overview - -A menu contains links to places or button actions. It does NOT show a selected item at all and the menu button text never changes. - - - - -## API - -Coming soon. diff --git a/packages/components/src/__actions__/Menu/v2/_docs/Menu.stories.tsx b/packages/components/src/__actions__/Menu/v2/_docs/Menu.stories.tsx deleted file mode 100644 index 396a84280d3..00000000000 --- a/packages/components/src/__actions__/Menu/v2/_docs/Menu.stories.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import React from "react" -import { Meta, StoryObj } from "@storybook/react" -import { ChevronDownIcon, DuplicateIcon } from "~components/Icon" -import { Button } from "~components/__actions__/v2" -import * as MenuV1Stories from "../../v1/_docs/Menu.stories" -import { Menu, MenuList, MenuItem, MenuHeading } from "../index" - -const meta = { - title: "Actions/Menu/v2", - component: Menu, - args: { - button: ( -