diff --git a/packages/carbon-react/__tests__/index-test.js b/packages/carbon-react/__tests__/index-test.js index bc88e46c1483..143f980a3486 100644 --- a/packages/carbon-react/__tests__/index-test.js +++ b/packages/carbon-react/__tests__/index-test.js @@ -50,6 +50,7 @@ Array [ "ErrorBoundaryContext", "ExpandableSearch", "ExpandableTile", + "FeatureFlags", "FileUploader", "FileUploaderButton", "FileUploaderDropContainer", @@ -74,6 +75,7 @@ Array [ "HeaderNavigation", "HeaderPanel", "HeaderSideNavItems", + "Heading", "IconButton", "IconSkeleton", "InlineLoading", @@ -115,6 +117,7 @@ Array [ "SearchLayoutButton", "SearchSkeleton", "SecondaryButton", + "Section", "Select", "SelectItem", "SelectItemGroup", @@ -201,14 +204,21 @@ Array [ "Tooltip", "UnorderedList", "VStack", - "unstable_Heading", + "unstable_Menu", + "unstable_MenuDivider", + "unstable_MenuGroup", + "unstable_MenuItem", + "unstable_MenuRadioGroup", + "unstable_MenuSelectableItem", "unstable_PageSelector", "unstable_Pagination", "unstable_ProgressBar", - "unstable_Section", "unstable_TreeNode", "unstable_TreeView", "unstable_useContextMenu", + "useFeatureFlag", + "useFeatureFlags", + "usePrefix", "useTheme", ] `); diff --git a/packages/carbon-react/src/components/Accordion/Accordion.stories.js b/packages/carbon-react/src/components/Accordion/Accordion.stories.js deleted file mode 100644 index e7f90babcb9a..000000000000 --- a/packages/carbon-react/src/components/Accordion/Accordion.stories.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -import { Accordion, AccordionItem } from 'carbon-components-react'; -import React from 'react'; - -export default { - title: 'Components/Accordion', -}; - -export const Default = () => { - return ( - - -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do - eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad - minim veniam, quis nostrud exercitation ullamco laboris nisi ut - aliquip ex ea commodo consequat. -

-
- -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do - eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad - minim veniam, quis nostrud exercitation ullamco laboris nisi ut - aliquip ex ea commodo consequat. -

-
- -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do - eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad - minim veniam, quis nostrud exercitation ullamco laboris nisi ut - aliquip ex ea commodo consequat. -

-
- -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do - eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad - minim veniam, quis nostrud exercitation ullamco laboris nisi ut - aliquip ex ea commodo consequat. -

-
-
- ); -}; diff --git a/packages/carbon-react/src/components/Accordion/index.js b/packages/carbon-react/src/components/Accordion/index.js deleted file mode 100644 index bff58f4e97a1..000000000000 --- a/packages/carbon-react/src/components/Accordion/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { Accordion, AccordionItem } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/Breadcrumb/Breadcrumb.stories.js b/packages/carbon-react/src/components/Breadcrumb/Breadcrumb.stories.js deleted file mode 100644 index 4f7b28a3f04b..000000000000 --- a/packages/carbon-react/src/components/Breadcrumb/Breadcrumb.stories.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -import { Breadcrumb, BreadcrumbItem } from 'carbon-components-react'; -import React from 'react'; - -export default { - title: 'Components/Breadcrumb', -}; - -export const Default = () => { - return ( - - - Breadcrumb 1 - - Breadcrumb 2 - Breadcrumb 3 - - ); -}; diff --git a/packages/carbon-react/src/components/Breadcrumb/index.js b/packages/carbon-react/src/components/Breadcrumb/index.js deleted file mode 100644 index bf7ea0d8f2c9..000000000000 --- a/packages/carbon-react/src/components/Breadcrumb/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { Breadcrumb, BreadcrumbItem } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/Button/index.js b/packages/carbon-react/src/components/Button/index.js deleted file mode 100644 index 4f6fe378c051..000000000000 --- a/packages/carbon-react/src/components/Button/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { Button } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/Checkbox/index.js b/packages/carbon-react/src/components/Checkbox/index.js deleted file mode 100644 index 2d416d305309..000000000000 --- a/packages/carbon-react/src/components/Checkbox/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { Checkbox, CheckboxSkeleton } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/CodeSnippet/index.js b/packages/carbon-react/src/components/CodeSnippet/index.js deleted file mode 100644 index 5d05afe46385..000000000000 --- a/packages/carbon-react/src/components/CodeSnippet/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { CodeSnippet, CodeSnippetSkeleton } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/ComboBox/index.js b/packages/carbon-react/src/components/ComboBox/index.js deleted file mode 100644 index 812f8f64edae..000000000000 --- a/packages/carbon-react/src/components/ComboBox/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { ComboBox } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/ContentSwitcher/index.js b/packages/carbon-react/src/components/ContentSwitcher/index.js deleted file mode 100644 index cbe75aaa8400..000000000000 --- a/packages/carbon-react/src/components/ContentSwitcher/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { ContentSwitcher } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/DatePicker/index.js b/packages/carbon-react/src/components/DatePicker/index.js deleted file mode 100644 index ee8c2506dd30..000000000000 --- a/packages/carbon-react/src/components/DatePicker/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { DatePicker, DatePickerSkeleton } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/Dropdown/index.js b/packages/carbon-react/src/components/Dropdown/index.js deleted file mode 100644 index c91a3883d825..000000000000 --- a/packages/carbon-react/src/components/Dropdown/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { Dropdown } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/FeatureFlags/index.js b/packages/carbon-react/src/components/FeatureFlags/index.js deleted file mode 100644 index 550400a59090..000000000000 --- a/packages/carbon-react/src/components/FeatureFlags/index.js +++ /dev/null @@ -1 +0,0 @@ -export { FeatureFlags } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/FileUploader/index.js b/packages/carbon-react/src/components/FileUploader/index.js deleted file mode 100644 index 752b023ecfb7..000000000000 --- a/packages/carbon-react/src/components/FileUploader/index.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { - FileUploader, - Filename, - FileUploaderSkeleton, - FileUploaderButton, - FileUploaderDropContainer, - FileUploaderItem, -} from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/Form/index.js b/packages/carbon-react/src/components/Form/index.js deleted file mode 100644 index 1f547995bd96..000000000000 --- a/packages/carbon-react/src/components/Form/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { Form, FormGroup } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/InlineLoading/index.js b/packages/carbon-react/src/components/InlineLoading/index.js deleted file mode 100644 index b9e4fa9b1a57..000000000000 --- a/packages/carbon-react/src/components/InlineLoading/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { InlineLoading } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/MultiSelect/index.js b/packages/carbon-react/src/components/MultiSelect/index.js deleted file mode 100644 index f324a71eea03..000000000000 --- a/packages/carbon-react/src/components/MultiSelect/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { MultiSelect } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/Notification/index.js b/packages/carbon-react/src/components/Notification/index.js deleted file mode 100644 index 0daee3af6fd9..000000000000 --- a/packages/carbon-react/src/components/Notification/index.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { - ToastNotification, - InlineNotification, - NotificationActionButton, -} from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/NumberInput/index.js b/packages/carbon-react/src/components/NumberInput/index.js deleted file mode 100644 index f6f2b761d96e..000000000000 --- a/packages/carbon-react/src/components/NumberInput/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { NumberInput } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/Overflow/OverflowMenu.stories.js b/packages/carbon-react/src/components/Overflow/OverflowMenu.stories.js deleted file mode 100644 index b0b46cbf9538..000000000000 --- a/packages/carbon-react/src/components/Overflow/OverflowMenu.stories.js +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -import { OverflowMenu, OverflowMenuItem } from 'carbon-components-react'; -import React from 'react'; -import { Layer } from '../Layer'; - -export default { - title: 'Components/OverflowMenu', -}; - -export const Default = () => { - return ( - - - - - - - - ); -}; - -export const withLayer = () => { - return ( - <> - - - - - - - - - - - - - - - - - - - - - - - - - - - ); -}; diff --git a/packages/carbon-react/src/components/Overflow/index.js b/packages/carbon-react/src/components/Overflow/index.js deleted file mode 100644 index c83c7d3f7f47..000000000000 --- a/packages/carbon-react/src/components/Overflow/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { OverflowMenu, OverflowMenuItem } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/PaginationNav/index.js b/packages/carbon-react/src/components/PaginationNav/index.js deleted file mode 100644 index 70aa246f1cbc..000000000000 --- a/packages/carbon-react/src/components/PaginationNav/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { PaginationNav } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/ProgressBar/index.js b/packages/carbon-react/src/components/ProgressBar/index.js deleted file mode 100644 index 9d7069e6c540..000000000000 --- a/packages/carbon-react/src/components/ProgressBar/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { ProgressBar } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/ProgressIndicator/index.js b/packages/carbon-react/src/components/ProgressIndicator/index.js deleted file mode 100644 index 6e2ba2014067..000000000000 --- a/packages/carbon-react/src/components/ProgressIndicator/index.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { - ProgressIndicator, - ProgressStep, - ProgressIndicatorSkeleton, -} from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/RadioButton/index.js b/packages/carbon-react/src/components/RadioButton/index.js deleted file mode 100644 index 6da29016ae15..000000000000 --- a/packages/carbon-react/src/components/RadioButton/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { RadioButton, RadioButtonGroup } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/Search/index.js b/packages/carbon-react/src/components/Search/index.js deleted file mode 100644 index b61cc218e0fc..000000000000 --- a/packages/carbon-react/src/components/Search/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { Search } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/Select/index.js b/packages/carbon-react/src/components/Select/index.js deleted file mode 100644 index 92d5367b166a..000000000000 --- a/packages/carbon-react/src/components/Select/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { Select } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/Skeleton/index.js b/packages/carbon-react/src/components/Skeleton/index.js deleted file mode 100644 index 68afb0c1c120..000000000000 --- a/packages/carbon-react/src/components/Skeleton/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { SkeletonPlaceholder, SkeletonText } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/Slider/index.js b/packages/carbon-react/src/components/Slider/index.js deleted file mode 100644 index 6b3362b6750f..000000000000 --- a/packages/carbon-react/src/components/Slider/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { Slider, SliderSkeleton } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/StructuredList/index.js b/packages/carbon-react/src/components/StructuredList/index.js deleted file mode 100644 index 680a0cafa458..000000000000 --- a/packages/carbon-react/src/components/StructuredList/index.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { - StructuredListWrapper, - StructuredListHead, - StructuredListBody, - StructuredListRow, - StructuredListInput, - StructuredListCell, - StructuredListSkeleton, -} from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/Tabs/index.js b/packages/carbon-react/src/components/Tabs/index.js deleted file mode 100644 index 7f726f5b2010..000000000000 --- a/packages/carbon-react/src/components/Tabs/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { Tab, Tabs, TabsSkeleton, Button } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/Tag/index.js b/packages/carbon-react/src/components/Tag/index.js deleted file mode 100644 index 5cf3e720b86f..000000000000 --- a/packages/carbon-react/src/components/Tag/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { Tag } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/TextArea/index.js b/packages/carbon-react/src/components/TextArea/index.js deleted file mode 100644 index 78e41d69cdb9..000000000000 --- a/packages/carbon-react/src/components/TextArea/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { TextArea, TextAreaSkeleton } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/TextInput/index.js b/packages/carbon-react/src/components/TextInput/index.js deleted file mode 100644 index f8f33218f032..000000000000 --- a/packages/carbon-react/src/components/TextInput/index.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { - TextInput, - TextInputSkeleton, - FluidForm, -} from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/Tile/index.js b/packages/carbon-react/src/components/Tile/index.js deleted file mode 100644 index 71e473cc663e..000000000000 --- a/packages/carbon-react/src/components/Tile/index.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { - Tile, - ClickableTile, - SelectableTile, - ExpandableTile, - TileAboveTheFoldContent, - TileBelowTheFoldContent, -} from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/TimePicker/index.js b/packages/carbon-react/src/components/TimePicker/index.js deleted file mode 100644 index cd4ee0ddecad..000000000000 --- a/packages/carbon-react/src/components/TimePicker/index.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { - TimePicker, - TimePickerSelect, - SelectItem, -} from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/Toggle/index.js b/packages/carbon-react/src/components/Toggle/index.js deleted file mode 100644 index 9b4ce0a43846..000000000000 --- a/packages/carbon-react/src/components/Toggle/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { Toggle } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/Treeview/index.js b/packages/carbon-react/src/components/Treeview/index.js deleted file mode 100644 index 33ecd39e454a..000000000000 --- a/packages/carbon-react/src/components/Treeview/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { InlineNotification, Treeview } from 'carbon-components-react'; diff --git a/packages/carbon-react/src/components/UIShell/index.js b/packages/carbon-react/src/components/UIShell/index.js deleted file mode 100644 index 7048ae9c5d9a..000000000000 --- a/packages/carbon-react/src/components/UIShell/index.js +++ /dev/null @@ -1,24 +0,0 @@ -export { - Content, - Header, - HeaderContainer, - HeaderMenuButton, - HeaderName, - HeaderNavigation, - HeaderMenu, - HeaderMenuItem, - HeaderGlobalBar, - HeaderGlobalAction, - HeaderPanel, - HeaderSideNavItems, - SkipToContent, - SideNav, - SideNavDivider, - SideNavItems, - SideNavLink, - SideNavMenu, - SideNavMenuItem, - Switcher, - SwitcherItem, - SwitcherDivider, -} from 'carbon-components-react'; diff --git a/packages/carbon-react/src/index.js b/packages/carbon-react/src/index.js index 37b23689ce0c..bfa0c516c2dc 100644 --- a/packages/carbon-react/src/index.js +++ b/packages/carbon-react/src/index.js @@ -185,29 +185,37 @@ export { SideNavMenuItem, SideNavSwitcher, // Experimental - unstable_ProgressBar, - unstable_PageSelector, - unstable_Pagination, - unstable_TreeView, - unstable_TreeNode, unstable_useContextMenu, - unstable_Heading, - unstable_Section, + unstable_FeatureFlags as FeatureFlags, + unstable_Heading as Heading, unstable_HStack as HStack, - unstable_Stack as Stack, - unstable_VStack as VStack, - unstable_Tooltip as Tooltip, + unstable_IconButton as IconButton, + unstable_Layer as Layer, + unstable_Menu, + unstable_MenuDivider, + unstable_MenuGroup, + unstable_MenuItem, + unstable_MenuRadioGroup, + unstable_MenuSelectableItem, + unstable_PageSelector, + unstable_Pagination, unstable_Popover as Popover, unstable_PopoverContent as PopoverContent, - unstable_IconButton as IconButton, + unstable_ProgressBar, + unstable_Section as Section, + unstable_Stack as Stack, + unstable_Theme as Theme, + unstable_Tooltip as Tooltip, + unstable_TreeNode, + unstable_TreeView, + unstable_useFeatureFlag as useFeatureFlag, + unstable_useFeatureFlags as useFeatureFlags, + unstable_usePrefix as usePrefix, + unstable_useTheme as useTheme, + unstable_VStack as VStack, } from 'carbon-components-react'; - export { // Grid Grid, Column, } from './components/Grid'; - -export { Theme, useTheme } from './components/Theme'; - -export { Layer } from './components/Layer'; diff --git a/packages/carbon-react/src/internal/usePrefix.js b/packages/carbon-react/src/internal/usePrefix.js deleted file mode 100644 index 54906b16cc06..000000000000 --- a/packages/carbon-react/src/internal/usePrefix.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -import { unstable_usePrefix } from 'carbon-components-react'; - -export const usePrefix = unstable_usePrefix; diff --git a/packages/react/.storybook/main.js b/packages/react/.storybook/main.js index 03822fcaf028..d6137072aa1f 100644 --- a/packages/react/.storybook/main.js +++ b/packages/react/.storybook/main.js @@ -14,7 +14,6 @@ const customProperties = require('postcss-custom-properties'); const rtlcss = require('rtlcss'); const { - CARBON_ENABLE_V11_RELEASE = 'false', CARBON_REACT_STORYBOOK_USE_CUSTOM_PROPERTIES = 'false', CARBON_REACT_STORYBOOK_USE_RTL, CARBON_REACT_STORYBOOK_USE_SASS_LOADER, @@ -76,7 +75,6 @@ module.exports = { $feature-flags: ( ui-shell: true, enable-css-custom-properties: ${CARBON_REACT_STORYBOOK_USE_CUSTOM_PROPERTIES}, - enable-v11-release: ${CARBON_ENABLE_V11_RELEASE}, ); ${content} `; @@ -96,7 +94,6 @@ module.exports = { $feature-flags: ( ui-shell: true, enable-css-custom-properties: ${CARBON_REACT_STORYBOOK_USE_CUSTOM_PROPERTIES}, - enable-v11-release: ${CARBON_ENABLE_V11_RELEASE}, ); `, implementation: require('sass'), @@ -168,18 +165,6 @@ module.exports = { ); } - // Enable process.env variables other than STORYBOOK_* in our preview - // environment - // @see https://github.com/storybookjs/storybook/issues/12270#issuecomment-755398949 - const definePlugin = config.plugins.find((plugin) => { - return plugin.definitions && plugin.definitions['process.env']; - }); - - definePlugin.definitions['process.env'] = { - ...definePlugin.definitions['process.env'], - CARBON_ENABLE_V11_RELEASE: JSON.stringify(CARBON_ENABLE_V11_RELEASE), - }; - return config; }, }; diff --git a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap index c53c5fa2e00d..580ba15890c8 100644 --- a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap +++ b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap @@ -8369,6 +8369,7 @@ Map { }, "render": [Function], }, + "unstable_useContextMenu" => Object {}, "unstable_FeatureFlags" => Object { "propTypes": Object { "children": Object { @@ -8386,425 +8387,163 @@ Map { }, "unstable_useFeatureFlag" => Object {}, "unstable_useFeatureFlags" => Object {}, - "unstable_PageSelector" => Object { - "defaultProps": Object { - "className": null, - "id": 1, - "labelText": "Current page number", + "unstable_Heading" => Object { + "propTypes": Object { + "children": Object { + "type": "node", + }, + "className": Object { + "type": "string", + }, }, + }, + "unstable_Section" => Object { "propTypes": Object { + "as": Object { + "type": "elementType", + }, + "children": Object { + "type": "node", + }, "className": Object { "type": "string", }, - "currentPage": Object { - "isRequired": true, + }, + }, + "unstable_IconButton" => Object { + "$$typeof": Symbol(react.forward_ref), + "propTypes": Object { + "align": Object { + "args": Array [ + Array [ + "top", + "top-left", + "top-right", + "bottom", + "bottom-left", + "bottom-right", + "left", + "right", + ], + ], + "type": "oneOf", + }, + "children": Object { + "type": "node", + }, + "defaultOpen": Object { + "type": "bool", + }, + "enterDelayMs": Object { "type": "number", }, - "id": Object { + "kind": Object { "args": Array [ Array [ - Object { - "type": "string", - }, - Object { - "type": "number", - }, + "primary", + "secondary", + "ghost", + "tertiary", ], ], - "type": "oneOfType", - }, - "labelText": Object { - "type": "string", + "type": "oneOf", }, - "totalPages": Object { + "label": Object { "isRequired": true, + "type": "node", + }, + "leaveDelayMs": Object { "type": "number", }, }, + "render": [Function], }, - "unstable_Pagination" => Object { - "defaultProps": Object { - "backwardText": "Previous page", - "children": undefined, - "className": null, - "disabled": false, - "forwardText": "Next page", - "id": 1, - "initialPage": 1, - "itemRangeText": [Function], - "itemText": [Function], - "itemsPerPageText": "Items per page:", - "pageRangeText": [Function], - "pageSize": 10, - "pageSizes": undefined, - "pageText": [Function], - "pagesUnknown": false, - "totalItems": undefined, - }, + "unstable_Layer" => Object { "propTypes": Object { - "backwardText": Object { - "type": "string", - }, - "children": Object { + "as": Object { "args": Array [ Array [ - Object { - "type": "node", - }, Object { "type": "func", }, - ], - ], - "type": "oneOfType", - }, - "className": Object { - "type": "string", - }, - "disabled": Object { - "type": "bool", - }, - "forwardText": Object { - "type": "string", - }, - "id": Object { - "args": Array [ - Array [ Object { "type": "string", }, Object { - "type": "number", + "type": "elementType", }, ], ], "type": "oneOfType", }, - "initialPage": Object { - "type": "number", - }, - "itemRangeText": Object { - "type": "func", - }, - "itemText": Object { - "type": "func", + "children": Object { + "type": "node", }, - "itemsPerPageText": Object { + "className": Object { "type": "string", }, - "onChange": Object { - "type": "func", - }, - "pageRangeText": Object { - "type": "func", - }, - "pageSize": Object { - "type": "number", - }, - "pageSizes": Object { - "args": Array [ - Object { - "type": "number", - }, - ], - "type": "arrayOf", - }, - "pageText": Object { - "type": "func", - }, - "pagesUnknown": Object { - "type": "bool", - }, - "totalItems": Object { - "type": "number", - }, }, }, - "unstable_TreeView" => Object { - "TreeNode": Object { + "unstable_Menu" => Object { + "MenuDivider": Object {}, + "MenuGroup": Object { "propTypes": Object { - "active": Object { - "args": Array [ - Array [ - Object { - "type": "string", - }, - Object { - "type": "number", - }, - ], - ], - "type": "oneOfType", - }, "children": Object { "type": "node", }, - "className": Object { - "type": "string", + "label": Object { + "isRequired": true, + "type": "node", }, - "depth": Object { - "type": "number", + }, + }, + "MenuItem": Object { + "propTypes": Object { + "children": Object { + "type": "node", }, "disabled": Object { "type": "bool", }, - "isExpanded": Object { - "type": "bool", + "kind": Object { + "args": Array [ + Array [ + "default", + "danger", + ], + ], + "type": "oneOf", }, "label": Object { + "isRequired": true, "type": "node", }, - "onNodeFocusEvent": Object { - "type": "func", - }, - "onSelect": Object { - "type": "func", - }, - "onToggle": Object { - "type": "func", - }, - "onTreeSelect": Object { - "type": "func", + "shortcut": Object { + "type": "node", }, - "renderIcon": Object { - "args": Array [ - Array [ - Object { - "type": "func", - }, - Object { - "type": "object", - }, - ], - ], - "type": "oneOfType", + }, + }, + "MenuRadioGroup": Object { + "propTypes": Object { + "initialSelectedItem": Object { + "type": "string", }, - "selected": Object { + "items": Object { "args": Array [ Object { - "args": Array [ - Array [ - Object { - "type": "string", - }, - Object { - "type": "number", - }, - ], - ], - "type": "oneOfType", + "type": "string", }, ], + "isRequired": true, "type": "arrayOf", }, - "value": Object { + "label": Object { + "isRequired": true, "type": "string", }, - }, - }, - "propTypes": Object { - "active": Object { - "args": Array [ - Array [ - Object { - "type": "string", - }, - Object { - "type": "number", - }, - ], - ], - "type": "oneOfType", - }, - "children": Object { - "type": "node", - }, - "className": Object { - "type": "string", - }, - "hideLabel": Object { - "type": "bool", - }, - "label": Object { - "isRequired": true, - "type": "string", - }, - "multiselect": Object { - "type": "bool", - }, - "onSelect": Object { - "type": "func", - }, - "selected": Object { - "args": Array [ - Object { - "args": Array [ - Array [ - Object { - "type": "string", - }, - Object { - "type": "number", - }, - ], - ], - "type": "oneOfType", - }, - ], - "type": "arrayOf", - }, - "size": Object { - "args": Array [ - Array [ - "default", - "compact", - ], - ], - "type": "oneOf", - }, - }, - }, - "unstable_TreeNode" => Object { - "propTypes": Object { - "active": Object { - "args": Array [ - Array [ - Object { - "type": "string", - }, - Object { - "type": "number", - }, - ], - ], - "type": "oneOfType", - }, - "children": Object { - "type": "node", - }, - "className": Object { - "type": "string", - }, - "depth": Object { - "type": "number", - }, - "disabled": Object { - "type": "bool", - }, - "isExpanded": Object { - "type": "bool", - }, - "label": Object { - "type": "node", - }, - "onNodeFocusEvent": Object { - "type": "func", - }, - "onSelect": Object { - "type": "func", - }, - "onToggle": Object { - "type": "func", - }, - "onTreeSelect": Object { - "type": "func", - }, - "renderIcon": Object { - "args": Array [ - Array [ - Object { - "type": "func", - }, - Object { - "type": "object", - }, - ], - ], - "type": "oneOfType", - }, - "selected": Object { - "args": Array [ - Object { - "args": Array [ - Array [ - Object { - "type": "string", - }, - Object { - "type": "number", - }, - ], - ], - "type": "oneOfType", - }, - ], - "type": "arrayOf", - }, - "value": Object { - "type": "string", - }, - }, - }, - "unstable_Menu" => Object { - "MenuDivider": Object {}, - "MenuGroup": Object { - "propTypes": Object { - "children": Object { - "type": "node", - }, - "label": Object { - "isRequired": true, - "type": "node", - }, - }, - }, - "MenuItem": Object { - "propTypes": Object { - "children": Object { - "type": "node", - }, - "disabled": Object { - "type": "bool", - }, - "kind": Object { - "args": Array [ - Array [ - "default", - "danger", - ], - ], - "type": "oneOf", - }, - "label": Object { - "isRequired": true, - "type": "node", - }, - "shortcut": Object { - "type": "node", - }, - }, - }, - "MenuRadioGroup": Object { - "propTypes": Object { - "initialSelectedItem": Object { - "type": "string", - }, - "items": Object { - "args": Array [ - Object { - "type": "string", - }, - ], - "isRequired": true, - "type": "arrayOf", - }, - "label": Object { - "isRequired": true, - "type": "string", - }, - "onChange": Object { - "type": "func", - }, + "onChange": Object { + "type": "func", + }, }, }, "MenuSelectableItem": Object { @@ -8966,20 +8705,243 @@ Map { }, }, }, - "unstable_useContextMenu" => Object {}, - "unstable_Heading" => Object { + "unstable_PageSelector" => Object { + "defaultProps": Object { + "className": null, + "id": 1, + "labelText": "Current page number", + }, "propTypes": Object { - "children": Object { - "type": "node", - }, "className": Object { "type": "string", }, + "currentPage": Object { + "isRequired": true, + "type": "number", + }, + "id": Object { + "args": Array [ + Array [ + Object { + "type": "string", + }, + Object { + "type": "number", + }, + ], + ], + "type": "oneOfType", + }, + "labelText": Object { + "type": "string", + }, + "totalPages": Object { + "isRequired": true, + "type": "number", + }, }, }, - "unstable_Section" => Object { + "unstable_Pagination" => Object { + "defaultProps": Object { + "backwardText": "Previous page", + "children": undefined, + "className": null, + "disabled": false, + "forwardText": "Next page", + "id": 1, + "initialPage": 1, + "itemRangeText": [Function], + "itemText": [Function], + "itemsPerPageText": "Items per page:", + "pageRangeText": [Function], + "pageSize": 10, + "pageSizes": undefined, + "pageText": [Function], + "pagesUnknown": false, + "totalItems": undefined, + }, "propTypes": Object { - "as": Object { + "backwardText": Object { + "type": "string", + }, + "children": Object { + "args": Array [ + Array [ + Object { + "type": "node", + }, + Object { + "type": "func", + }, + ], + ], + "type": "oneOfType", + }, + "className": Object { + "type": "string", + }, + "disabled": Object { + "type": "bool", + }, + "forwardText": Object { + "type": "string", + }, + "id": Object { + "args": Array [ + Array [ + Object { + "type": "string", + }, + Object { + "type": "number", + }, + ], + ], + "type": "oneOfType", + }, + "initialPage": Object { + "type": "number", + }, + "itemRangeText": Object { + "type": "func", + }, + "itemText": Object { + "type": "func", + }, + "itemsPerPageText": Object { + "type": "string", + }, + "onChange": Object { + "type": "func", + }, + "pageRangeText": Object { + "type": "func", + }, + "pageSize": Object { + "type": "number", + }, + "pageSizes": Object { + "args": Array [ + Object { + "type": "number", + }, + ], + "type": "arrayOf", + }, + "pageText": Object { + "type": "func", + }, + "pagesUnknown": Object { + "type": "bool", + }, + "totalItems": Object { + "type": "number", + }, + }, + }, + "unstable_Popover" => Object { + "$$typeof": Symbol(react.forward_ref), + "propTypes": Object { + "align": Object { + "args": Array [ + Array [ + "top", + "top-left", + "top-right", + "bottom", + "bottom-left", + "bottom-right", + "left", + "left-bottom", + "left-top", + "right", + "right-bottom", + "right-top", + ], + ], + "type": "oneOf", + }, + "as": Object { + "args": Array [ + Array [ + Object { + "type": "string", + }, + Object { + "type": "elementType", + }, + ], + ], + "type": "oneOfType", + }, + "caret": Object { + "type": "bool", + }, + "children": Object { + "type": "node", + }, + "className": Object { + "type": "string", + }, + "dropShadow": Object { + "type": "bool", + }, + "highContrast": Object { + "type": "bool", + }, + "light": Object { + "type": "bool", + }, + "open": Object { + "isRequired": true, + "type": "bool", + }, + }, + "render": [Function], + }, + "unstable_PopoverContent" => Object { + "$$typeof": Symbol(react.forward_ref), + "propTypes": Object { + "children": Object { + "type": "node", + }, + "className": Object { + "type": "string", + }, + }, + "render": [Function], + }, + "unstable_ProgressBar" => Object { + "propTypes": Object { + "className": Object { + "type": "string", + }, + "helperText": Object { + "type": "string", + }, + "hideLabel": Object { + "type": "bool", + }, + "label": Object { + "isRequired": true, + "type": "string", + }, + "max": Object { + "type": "number", + }, + "value": Object { + "type": "number", + }, + }, + }, + "unstable_HStack" => Object { + "$$typeof": Symbol(react.forward_ref), + "render": [Function], + }, + "unstable_Stack" => Object { + "$$typeof": Symbol(react.forward_ref), + "propTypes": Object { + "as": Object { "type": "elementType", }, "children": Object { @@ -8988,16 +8950,197 @@ Map { "className": Object { "type": "string", }, - }, - }, - "unstable_ProgressBar" => Object { - "propTypes": Object { - "className": Object { - "type": "string", - }, - "helperText": Object { - "type": "string", - }, + "gap": Object { + "args": Array [ + Array [ + Object { + "type": "string", + }, + Object { + "args": Array [ + Array [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + ], + ], + "type": "oneOf", + }, + ], + ], + "type": "oneOfType", + }, + "orientation": Object { + "args": Array [ + Array [ + "horizontal", + "vertical", + ], + ], + "type": "oneOf", + }, + }, + "render": [Function], + }, + "unstable_VStack" => Object { + "$$typeof": Symbol(react.forward_ref), + "render": [Function], + }, + "unstable_Tooltip" => Object { + "propTypes": Object { + "align": Object { + "args": Array [ + Array [ + "top", + "top-left", + "top-right", + "bottom", + "bottom-left", + "bottom-right", + "left", + "left-bottom", + "left-top", + "right", + "right-bottom", + "right-top", + ], + ], + "type": "oneOf", + }, + "children": Object { + "type": "node", + }, + "className": Object { + "type": "string", + }, + "defaultOpen": Object { + "type": "bool", + }, + "description": Object { + "type": "node", + }, + "enterDelayMs": Object { + "type": "number", + }, + "label": Object { + "type": "node", + }, + "leaveDelayMs": Object { + "type": "number", + }, + }, + }, + "unstable_TreeView" => Object { + "TreeNode": Object { + "propTypes": Object { + "active": Object { + "args": Array [ + Array [ + Object { + "type": "string", + }, + Object { + "type": "number", + }, + ], + ], + "type": "oneOfType", + }, + "children": Object { + "type": "node", + }, + "className": Object { + "type": "string", + }, + "depth": Object { + "type": "number", + }, + "disabled": Object { + "type": "bool", + }, + "isExpanded": Object { + "type": "bool", + }, + "label": Object { + "type": "node", + }, + "onNodeFocusEvent": Object { + "type": "func", + }, + "onSelect": Object { + "type": "func", + }, + "onToggle": Object { + "type": "func", + }, + "onTreeSelect": Object { + "type": "func", + }, + "renderIcon": Object { + "args": Array [ + Array [ + Object { + "type": "func", + }, + Object { + "type": "object", + }, + ], + ], + "type": "oneOfType", + }, + "selected": Object { + "args": Array [ + Object { + "args": Array [ + Array [ + Object { + "type": "string", + }, + Object { + "type": "number", + }, + ], + ], + "type": "oneOfType", + }, + ], + "type": "arrayOf", + }, + "value": Object { + "type": "string", + }, + }, + }, + "propTypes": Object { + "active": Object { + "args": Array [ + Array [ + Object { + "type": "string", + }, + Object { + "type": "number", + }, + ], + ], + "type": "oneOfType", + }, + "children": Object { + "type": "node", + }, + "className": Object { + "type": "string", + }, "hideLabel": Object { "type": "bool", }, @@ -9005,239 +9148,160 @@ Map { "isRequired": true, "type": "string", }, - "max": Object { - "type": "number", + "multiselect": Object { + "type": "bool", }, - "value": Object { - "type": "number", + "onSelect": Object { + "type": "func", }, - }, - }, - "unstable_usePrefix" => Object {}, - "unstable_Popover" => Object { - "$$typeof": Symbol(react.forward_ref), - "propTypes": Object { - "align": Object { + "selected": Object { + "args": Array [ + Object { + "args": Array [ + Array [ + Object { + "type": "string", + }, + Object { + "type": "number", + }, + ], + ], + "type": "oneOfType", + }, + ], + "type": "arrayOf", + }, + "size": Object { "args": Array [ Array [ - "top", - "top-left", - "top-right", - "bottom", - "bottom-left", - "bottom-right", - "left", - "left-bottom", - "left-top", - "right", - "right-bottom", - "right-top", + "default", + "compact", ], ], "type": "oneOf", }, - "as": Object { + }, + }, + "unstable_TreeNode" => Object { + "propTypes": Object { + "active": Object { "args": Array [ Array [ Object { "type": "string", }, Object { - "type": "elementType", + "type": "number", }, ], ], "type": "oneOfType", }, - "caret": Object { - "type": "bool", - }, "children": Object { "type": "node", }, "className": Object { "type": "string", }, - "dropShadow": Object { - "type": "bool", - }, - "highContrast": Object { - "type": "bool", + "depth": Object { + "type": "number", }, - "light": Object { + "disabled": Object { "type": "bool", }, - "open": Object { - "isRequired": true, + "isExpanded": Object { "type": "bool", }, - }, - "render": [Function], - }, - "unstable_PopoverContent" => Object { - "$$typeof": Symbol(react.forward_ref), - "propTypes": Object { - "children": Object { + "label": Object { "type": "node", }, - "className": Object { - "type": "string", + "onNodeFocusEvent": Object { + "type": "func", }, - }, - "render": [Function], - }, - "unstable_HStack" => Object { - "$$typeof": Symbol(react.forward_ref), - "render": [Function], - }, - "unstable_Stack" => Object { - "$$typeof": Symbol(react.forward_ref), - "propTypes": Object { - "as": Object { - "type": "elementType", + "onSelect": Object { + "type": "func", }, - "children": Object { - "type": "node", + "onToggle": Object { + "type": "func", }, - "className": Object { - "type": "string", + "onTreeSelect": Object { + "type": "func", }, - "gap": Object { + "renderIcon": Object { "args": Array [ Array [ Object { - "type": "string", + "type": "func", }, Object { - "args": Array [ - Array [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - ], - ], - "type": "oneOf", + "type": "object", }, ], ], "type": "oneOfType", }, - "orientation": Object { - "args": Array [ - Array [ - "horizontal", - "vertical", - ], - ], - "type": "oneOf", - }, - }, - "render": [Function], - }, - "unstable_VStack" => Object { - "$$typeof": Symbol(react.forward_ref), - "render": [Function], - }, - "unstable_Tooltip" => Object { - "propTypes": Object { - "align": Object { + "selected": Object { "args": Array [ - Array [ - "top", - "top-left", - "top-right", - "bottom", - "bottom-left", - "bottom-right", - "left", - "left-bottom", - "left-top", - "right", - "right-bottom", - "right-top", - ], + Object { + "args": Array [ + Array [ + Object { + "type": "string", + }, + Object { + "type": "number", + }, + ], + ], + "type": "oneOfType", + }, ], - "type": "oneOf", - }, - "children": Object { - "type": "node", + "type": "arrayOf", }, - "className": Object { + "value": Object { "type": "string", }, - "defaultOpen": Object { - "type": "bool", - }, - "description": Object { - "type": "node", - }, - "enterDelayMs": Object { - "type": "number", - }, - "label": Object { - "type": "node", - }, - "leaveDelayMs": Object { - "type": "number", - }, }, }, - "unstable_IconButton" => Object { - "$$typeof": Symbol(react.forward_ref), + "unstable_usePrefix" => Object {}, + "unstable_Theme" => Object { "propTypes": Object { - "align": Object { + "as": Object { "args": Array [ Array [ - "top", - "top-left", - "top-right", - "bottom", - "bottom-left", - "bottom-right", - "left", - "right", + Object { + "type": "func", + }, + Object { + "type": "string", + }, + Object { + "type": "elementType", + }, ], ], - "type": "oneOf", + "type": "oneOfType", }, "children": Object { "type": "node", }, - "defaultOpen": Object { - "type": "bool", - }, - "enterDelayMs": Object { - "type": "number", + "className": Object { + "type": "string", }, - "kind": Object { + "theme": Object { "args": Array [ Array [ - "primary", - "secondary", - "ghost", - "tertiary", + "white", + "g10", + "g90", + "g100", ], ], "type": "oneOf", }, - "label": Object { - "isRequired": true, - "type": "node", - }, - "leaveDelayMs": Object { - "type": "number", - }, }, - "render": [Function], }, + "unstable_useTheme" => Object {}, } `; diff --git a/packages/react/package.json b/packages/react/package.json index c538d91763de..8225ec564756 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -34,7 +34,6 @@ "postinstall": "carbon-telemetry collect --install", "prepublish": "yarn build", "start": "yarn storybook", - "start:v11": "CARBON_ENABLE_V11_RELEASE=true yarn storybook", "storybook": "rimraf node_modules/.cache/storybook && start-storybook -p 9000 -s ./.storybook/assets", "snapshot": "build-storybook && percy-storybook --widths=320,1280", "test:e2e": "cypress run-ct --config video=false,screenshotOnRunFailure=false" diff --git a/packages/react/src/__tests__/index-test.js b/packages/react/src/__tests__/index-test.js index 0b5dfc96b828..f9f725768662 100644 --- a/packages/react/src/__tests__/index-test.js +++ b/packages/react/src/__tests__/index-test.js @@ -205,6 +205,7 @@ Array [ "unstable_HStack", "unstable_Heading", "unstable_IconButton", + "unstable_Layer", "unstable_Menu", "unstable_MenuDivider", "unstable_MenuGroup", @@ -218,6 +219,7 @@ Array [ "unstable_ProgressBar", "unstable_Section", "unstable_Stack", + "unstable_Theme", "unstable_Tooltip", "unstable_TreeNode", "unstable_TreeView", @@ -226,6 +228,7 @@ Array [ "unstable_useFeatureFlag", "unstable_useFeatureFlags", "unstable_usePrefix", + "unstable_useTheme", ] `); }); diff --git a/packages/react/src/components/Button/index.js b/packages/react/src/components/Button/index.js index c7ec880afd0f..9dbd0aabdb56 100644 --- a/packages/react/src/components/Button/index.js +++ b/packages/react/src/components/Button/index.js @@ -5,5 +5,5 @@ * LICENSE file in the root directory of this source tree. */ -export * from './Button.Skeleton'; +export { default as ButtonSkeleton } from './Button.Skeleton'; export default from './Button'; diff --git a/packages/carbon-react/src/components/Button/Button.stories.js b/packages/react/src/components/Button/next/Button.stories.js similarity index 93% rename from packages/carbon-react/src/components/Button/Button.stories.js rename to packages/react/src/components/Button/next/Button.stories.js index 6e28ee6584f7..c0de89a35f72 100644 --- a/packages/carbon-react/src/components/Button/Button.stories.js +++ b/packages/react/src/components/Button/next/Button.stories.js @@ -8,7 +8,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import { Add16 } from '@carbon/icons-react'; -import { Button, ButtonSet, ButtonSkeleton } from 'carbon-components-react'; +import { default as Button, ButtonSkeleton } from '../'; +import ButtonSet from '../../ButtonSet'; export default { title: 'Components/Button', diff --git a/packages/react/src/components/Checkbox/index.js b/packages/react/src/components/Checkbox/index.js index 9d7e85c11759..238e66098c48 100644 --- a/packages/react/src/components/Checkbox/index.js +++ b/packages/react/src/components/Checkbox/index.js @@ -5,5 +5,5 @@ * LICENSE file in the root directory of this source tree. */ -export * from './Checkbox.Skeleton'; +export { default as CheckboxSkeleton } from './Checkbox.Skeleton'; export default from './Checkbox'; diff --git a/packages/carbon-react/src/components/Checkbox/Checkbox.stories.js b/packages/react/src/components/Checkbox/next/Checkbox.stories.js similarity index 91% rename from packages/carbon-react/src/components/Checkbox/Checkbox.stories.js rename to packages/react/src/components/Checkbox/next/Checkbox.stories.js index 2b3952b44093..70a04702ea6d 100644 --- a/packages/carbon-react/src/components/Checkbox/Checkbox.stories.js +++ b/packages/react/src/components/Checkbox/next/Checkbox.stories.js @@ -6,7 +6,7 @@ */ import React from 'react'; -import { Checkbox, CheckboxSkeleton } from 'carbon-components-react'; +import { default as Checkbox, CheckboxSkeleton } from '../'; import { settings } from 'carbon-components'; const { prefix } = settings; diff --git a/packages/carbon-react/src/components/CodeSnippet/CodeSnippet.stories.js b/packages/react/src/components/CodeSnippet/next/CodeSnippet.stories.js similarity index 98% rename from packages/carbon-react/src/components/CodeSnippet/CodeSnippet.stories.js rename to packages/react/src/components/CodeSnippet/next/CodeSnippet.stories.js index 8b6a05b3f7ae..edf71e9f01d8 100644 --- a/packages/carbon-react/src/components/CodeSnippet/CodeSnippet.stories.js +++ b/packages/react/src/components/CodeSnippet/next/CodeSnippet.stories.js @@ -6,8 +6,8 @@ */ import React from 'react'; -import { CodeSnippet, CodeSnippetSkeleton } from 'carbon-components-react'; -import { Layer } from '../Layer'; +import { default as CodeSnippet, CodeSnippetSkeleton } from '../'; +import { Layer } from '../../Layer'; export default { title: 'Components/CodeSnippet', diff --git a/packages/carbon-react/src/components/ComboBox/ComboBox.stories.js b/packages/react/src/components/ComboBox/next/ComboBox.stories.js similarity index 95% rename from packages/carbon-react/src/components/ComboBox/ComboBox.stories.js rename to packages/react/src/components/ComboBox/next/ComboBox.stories.js index c33250881192..57d15cf77b5d 100644 --- a/packages/carbon-react/src/components/ComboBox/ComboBox.stories.js +++ b/packages/react/src/components/ComboBox/next/ComboBox.stories.js @@ -6,8 +6,8 @@ */ import React from 'react'; -import { ComboBox } from 'carbon-components-react'; -import { Layer } from '../Layer'; +import ComboBox from '../'; +import { Layer } from '../../Layer'; const items = [ { diff --git a/packages/carbon-react/src/components/ContentSwitcher/ContentSwitcher.stories.js b/packages/react/src/components/ContentSwitcher/next/ContentSwitcher.stories.js similarity index 93% rename from packages/carbon-react/src/components/ContentSwitcher/ContentSwitcher.stories.js rename to packages/react/src/components/ContentSwitcher/next/ContentSwitcher.stories.js index 82daf616a49a..33e656bf35d3 100644 --- a/packages/carbon-react/src/components/ContentSwitcher/ContentSwitcher.stories.js +++ b/packages/react/src/components/ContentSwitcher/next/ContentSwitcher.stories.js @@ -6,8 +6,9 @@ */ import React from 'react'; -import { ContentSwitcher, Switch } from 'carbon-components-react'; -import { Layer } from '../Layer'; +import ContentSwitcher from '../'; +import Switch from '../../Switch'; +import { Layer } from '../../Layer'; export default { title: 'Components/ContentSwitcher', diff --git a/packages/react/src/components/DatePicker/index.js b/packages/react/src/components/DatePicker/index.js index e30c4b516ac0..766467c59ac7 100644 --- a/packages/react/src/components/DatePicker/index.js +++ b/packages/react/src/components/DatePicker/index.js @@ -5,5 +5,5 @@ * LICENSE file in the root directory of this source tree. */ -export * from './DatePicker.Skeleton'; +export { default as DatePickerSkeleton } from './DatePicker.Skeleton'; export default from './DatePicker'; diff --git a/packages/carbon-react/src/components/DatePicker/DatePicker.stories.js b/packages/react/src/components/DatePicker/next/DatePicker.stories.js similarity index 97% rename from packages/carbon-react/src/components/DatePicker/DatePicker.stories.js rename to packages/react/src/components/DatePicker/next/DatePicker.stories.js index bfb80349c536..e38b798d52d0 100644 --- a/packages/carbon-react/src/components/DatePicker/DatePicker.stories.js +++ b/packages/react/src/components/DatePicker/next/DatePicker.stories.js @@ -7,12 +7,9 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import { - DatePicker, - DatePickerInput, - DatePickerSkeleton, -} from 'carbon-components-react'; -import { Layer } from '../Layer'; +import { default as DatePicker, DatePickerSkeleton } from '../'; +import DatePickerInput from '../../DatePickerInput'; +import { Layer } from '../../Layer'; // const patterns = { // 'Short (d{1,2}/d{4})': '\\d{1,2}/\\d{4}', diff --git a/packages/react/src/components/Dropdown/index.js b/packages/react/src/components/Dropdown/index.js index 30f0232a316f..1c0abbb10b66 100644 --- a/packages/react/src/components/Dropdown/index.js +++ b/packages/react/src/components/Dropdown/index.js @@ -5,5 +5,5 @@ * LICENSE file in the root directory of this source tree. */ -export * from './Dropdown.Skeleton'; +export { default as DropdownSkeleton } from './Dropdown.Skeleton'; export default from './Dropdown'; diff --git a/packages/carbon-react/src/components/Dropdown/Dropdown.stories.js b/packages/react/src/components/Dropdown/next/Dropdown.stories.js similarity index 96% rename from packages/carbon-react/src/components/Dropdown/Dropdown.stories.js rename to packages/react/src/components/Dropdown/next/Dropdown.stories.js index 1ba8f50ad75e..0ab3f7ee4f15 100644 --- a/packages/carbon-react/src/components/Dropdown/Dropdown.stories.js +++ b/packages/react/src/components/Dropdown/next/Dropdown.stories.js @@ -6,8 +6,8 @@ */ import React from 'react'; -import { Dropdown, DropdownSkeleton } from 'carbon-components-react'; -import { Layer } from '../Layer'; +import { default as Dropdown, DropdownSkeleton } from '../'; +import { Layer } from '../../Layer'; const items = [ { diff --git a/packages/carbon-react/src/components/FileUploader/FileUploader-story.scss b/packages/react/src/components/FileUploader/next/FileUploader-story.scss similarity index 100% rename from packages/carbon-react/src/components/FileUploader/FileUploader-story.scss rename to packages/react/src/components/FileUploader/next/FileUploader-story.scss diff --git a/packages/carbon-react/src/components/FileUploader/FileUploader.mdx b/packages/react/src/components/FileUploader/next/FileUploader.mdx similarity index 100% rename from packages/carbon-react/src/components/FileUploader/FileUploader.mdx rename to packages/react/src/components/FileUploader/next/FileUploader.mdx diff --git a/packages/carbon-react/src/components/FileUploader/FileUploader.stories.js b/packages/react/src/components/FileUploader/next/FileUploader.stories.js similarity index 98% rename from packages/carbon-react/src/components/FileUploader/FileUploader.stories.js rename to packages/react/src/components/FileUploader/next/FileUploader.stories.js index a93a5fcc6649..c593ce502984 100644 --- a/packages/carbon-react/src/components/FileUploader/FileUploader.stories.js +++ b/packages/react/src/components/FileUploader/next/FileUploader.stories.js @@ -10,12 +10,12 @@ import React from 'react'; import { settings } from 'carbon-components'; import { - FileUploader, + default as FileUploader, FileUploaderButton, FileUploaderDropContainer, FileUploaderItem, FileUploaderSkeleton, -} from 'carbon-components-react'; +} from '../'; import mdx from './FileUploader.mdx'; import './FileUploader-story.scss'; diff --git a/packages/carbon-react/src/components/FileUploader/stories/drop-container.js b/packages/react/src/components/FileUploader/next/stories/drop-container.js similarity index 100% rename from packages/carbon-react/src/components/FileUploader/stories/drop-container.js rename to packages/react/src/components/FileUploader/next/stories/drop-container.js diff --git a/packages/carbon-react/src/components/Form/Form.stories.js b/packages/react/src/components/Form/next/Form.stories.js similarity index 88% rename from packages/carbon-react/src/components/Form/Form.stories.js rename to packages/react/src/components/Form/next/Form.stories.js index 9c07f3133af5..d5374d971072 100644 --- a/packages/carbon-react/src/components/Form/Form.stories.js +++ b/packages/react/src/components/Form/next/Form.stories.js @@ -6,23 +6,21 @@ */ import React from 'react'; -import { - Checkbox, - Form, - FormGroup, - FileUploader, - NumberInput, - RadioButton, - RadioButtonGroup, - Button, - Search, - Select, - SelectItem, - TextArea, - TextInput, - Toggle, - unstable_Stack as Stack, -} from 'carbon-components-react'; +import Checkbox from '../../Checkbox'; +import Form from '../'; +import FormGroup from '../../FormGroup'; +import FileUploader from '../../FileUploader'; +import NumberInput from '../../NumberInput'; +import RadioButton from '../../RadioButton'; +import RadioButtonGroup from '../../RadioButtonGroup'; +import Button from '../../Button'; +import Search from '../../Search'; +import Select from '../../Select'; +import SelectItem from '../../SelectItem'; +import TextArea from '../../TextArea'; +import TextInput from '../../TextInput'; +import Toggle from '../../Toggle'; +import { Stack } from '../../Stack'; const checkboxEvents = { className: 'some-class', diff --git a/packages/carbon-react/src/components/InlineLoading/InlineLoading.stories.js b/packages/react/src/components/InlineLoading/next/InlineLoading.stories.js similarity index 96% rename from packages/carbon-react/src/components/InlineLoading/InlineLoading.stories.js rename to packages/react/src/components/InlineLoading/next/InlineLoading.stories.js index 0c603a4a312c..6e3117170e3f 100644 --- a/packages/carbon-react/src/components/InlineLoading/InlineLoading.stories.js +++ b/packages/react/src/components/InlineLoading/next/InlineLoading.stories.js @@ -6,7 +6,8 @@ */ import React, { useState } from 'react'; -import { Button, InlineLoading } from 'carbon-components-react'; +import Button from '../../Button'; +import InlineLoading from '../'; export default { title: 'Components/InlineLoading', diff --git a/packages/carbon-react/src/components/Layer/Layer-test.js b/packages/react/src/components/Layer/__tests__/Layer-test.js similarity index 96% rename from packages/carbon-react/src/components/Layer/Layer-test.js rename to packages/react/src/components/Layer/__tests__/Layer-test.js index fa3b5553184d..80f97c72eebf 100644 --- a/packages/carbon-react/src/components/Layer/Layer-test.js +++ b/packages/react/src/components/Layer/__tests__/Layer-test.js @@ -7,7 +7,7 @@ import { screen, render } from '@testing-library/react'; import React from 'react'; -import { Layer } from '../Layer'; +import { Layer } from '../../Layer'; describe('Layer', () => { it('should render the children passed in as a prop', () => { diff --git a/packages/carbon-react/src/components/Layer/index.js b/packages/react/src/components/Layer/index.js similarity index 100% rename from packages/carbon-react/src/components/Layer/index.js rename to packages/react/src/components/Layer/index.js diff --git a/packages/carbon-react/src/components/Layer/Layer-story.scss b/packages/react/src/components/Layer/next/Layer-story.scss similarity index 100% rename from packages/carbon-react/src/components/Layer/Layer-story.scss rename to packages/react/src/components/Layer/next/Layer-story.scss diff --git a/packages/carbon-react/src/components/Layer/Layer.mdx b/packages/react/src/components/Layer/next/Layer.mdx similarity index 100% rename from packages/carbon-react/src/components/Layer/Layer.mdx rename to packages/react/src/components/Layer/next/Layer.mdx diff --git a/packages/carbon-react/src/components/Layer/Layer.stories.js b/packages/react/src/components/Layer/next/Layer.stories.js similarity index 96% rename from packages/carbon-react/src/components/Layer/Layer.stories.js rename to packages/react/src/components/Layer/next/Layer.stories.js index ce1525efeec5..a38038c376b1 100644 --- a/packages/carbon-react/src/components/Layer/Layer.stories.js +++ b/packages/react/src/components/Layer/next/Layer.stories.js @@ -7,7 +7,7 @@ import './Layer-story.scss'; import React from 'react'; -import { Layer } from '../Layer'; +import { Layer } from '../../Layer'; import mdx from './Layer.mdx'; export default { diff --git a/packages/carbon-react/src/components/MultiSelect/MultiSelect.stories.js b/packages/react/src/components/MultiSelect/next/MultiSelect.stories.js similarity index 98% rename from packages/carbon-react/src/components/MultiSelect/MultiSelect.stories.js rename to packages/react/src/components/MultiSelect/next/MultiSelect.stories.js index d30f81f1ca0b..8637fc29c9df 100644 --- a/packages/carbon-react/src/components/MultiSelect/MultiSelect.stories.js +++ b/packages/react/src/components/MultiSelect/next/MultiSelect.stories.js @@ -6,8 +6,8 @@ */ import React from 'react'; -import { MultiSelect } from 'carbon-components-react'; -import { Layer } from '../Layer'; +import MultiSelect from '../'; +import { Layer } from '../../Layer'; const items = [ { diff --git a/packages/carbon-react/src/components/Notification/Notification.stories.js b/packages/react/src/components/Notification/next/Notification.stories.js similarity index 96% rename from packages/carbon-react/src/components/Notification/Notification.stories.js rename to packages/react/src/components/Notification/next/Notification.stories.js index 4b4f61f3b74b..8432ec33d731 100644 --- a/packages/carbon-react/src/components/Notification/Notification.stories.js +++ b/packages/react/src/components/Notification/next/Notification.stories.js @@ -5,12 +5,12 @@ * LICENSE file in the root directory of this source tree. */ +import { FeatureFlags } from '../../FeatureFlags'; import { ActionableNotification, ToastNotification, InlineNotification, - unstable_FeatureFlags as FeatureFlags, -} from 'carbon-components-react'; +} from '../'; import React from 'react'; import { action } from '@storybook/addon-actions'; diff --git a/packages/react/src/components/NumberInput/index.js b/packages/react/src/components/NumberInput/index.js index 02cae5acca83..8d7b6ab655ad 100644 --- a/packages/react/src/components/NumberInput/index.js +++ b/packages/react/src/components/NumberInput/index.js @@ -5,5 +5,5 @@ * LICENSE file in the root directory of this source tree. */ -export * from './NumberInput.Skeleton'; +export { default as NumberInputSkeleton } from './NumberInput.Skeleton'; export default from './NumberInput'; diff --git a/packages/carbon-react/src/components/NumberInput/NumberInput.stories.js b/packages/react/src/components/NumberInput/next/NumberInput.stories.js similarity index 90% rename from packages/carbon-react/src/components/NumberInput/NumberInput.stories.js rename to packages/react/src/components/NumberInput/next/NumberInput.stories.js index 8109f350e78a..c1880505cb56 100644 --- a/packages/carbon-react/src/components/NumberInput/NumberInput.stories.js +++ b/packages/react/src/components/NumberInput/next/NumberInput.stories.js @@ -6,8 +6,8 @@ */ import React from 'react'; -import { NumberInput, NumberInputSkeleton } from 'carbon-components-react'; -import { Layer } from '../Layer'; +import { default as NumberInput, NumberInputSkeleton } from '../'; +import { Layer } from '../../Layer'; export default { title: 'Components/NumberInput', diff --git a/packages/carbon-react/src/components/PaginationNav/PaginationNav.stories.js b/packages/react/src/components/PaginationNav/next/PaginationNav.stories.js similarity index 90% rename from packages/carbon-react/src/components/PaginationNav/PaginationNav.stories.js rename to packages/react/src/components/PaginationNav/next/PaginationNav.stories.js index d38e1436ddab..c86510bb1e5f 100644 --- a/packages/carbon-react/src/components/PaginationNav/PaginationNav.stories.js +++ b/packages/react/src/components/PaginationNav/next/PaginationNav.stories.js @@ -6,7 +6,7 @@ */ import React from 'react'; -import { PaginationNav } from 'carbon-components-react'; +import PaginationNav from '../'; const props = () => ({ loop: false, diff --git a/packages/carbon-react/src/components/ProgressBar/ProgressBar.stories.js b/packages/react/src/components/ProgressBar/next/ProgressBar.stories.js similarity index 94% rename from packages/carbon-react/src/components/ProgressBar/ProgressBar.stories.js rename to packages/react/src/components/ProgressBar/next/ProgressBar.stories.js index 2afc1805db69..090f124379ff 100644 --- a/packages/carbon-react/src/components/ProgressBar/ProgressBar.stories.js +++ b/packages/react/src/components/ProgressBar/next/ProgressBar.stories.js @@ -7,7 +7,7 @@ import React, { useState, useEffect } from 'react'; -import { unstable_ProgressBar as ProgressBar } from 'carbon-components-react'; +import ProgressBar from '../'; export default { title: 'Experimental/unstable_ProgressBar', diff --git a/packages/react/src/components/ProgressIndicator/index.js b/packages/react/src/components/ProgressIndicator/index.js index 1c4e22393a92..52b92fd26258 100644 --- a/packages/react/src/components/ProgressIndicator/index.js +++ b/packages/react/src/components/ProgressIndicator/index.js @@ -5,5 +5,5 @@ * LICENSE file in the root directory of this source tree. */ -export * from './ProgressIndicator.Skeleton'; +export { default as ProgressIndicatorSkeleton } from './ProgressIndicator.Skeleton'; export * from './ProgressIndicator'; diff --git a/packages/carbon-react/src/components/ProgressIndicator/ProgressIndicator.stories.js b/packages/react/src/components/ProgressIndicator/next/ProgressIndicator.stories.js similarity index 97% rename from packages/carbon-react/src/components/ProgressIndicator/ProgressIndicator.stories.js rename to packages/react/src/components/ProgressIndicator/next/ProgressIndicator.stories.js index d497e463f566..53c62a25eb42 100644 --- a/packages/carbon-react/src/components/ProgressIndicator/ProgressIndicator.stories.js +++ b/packages/react/src/components/ProgressIndicator/next/ProgressIndicator.stories.js @@ -10,9 +10,8 @@ import { ProgressIndicator, ProgressStep, ProgressIndicatorSkeleton, - Tooltip, -} from 'carbon-components-react'; -// import Tooltip from '../Tooltip'; +} from '../'; +import Tooltip from '../../Tooltip'; export default { title: 'Components/ProgressIndicator', diff --git a/packages/react/src/components/RadioButton/index.js b/packages/react/src/components/RadioButton/index.js index ed8282a48210..4dbf158df0c5 100644 --- a/packages/react/src/components/RadioButton/index.js +++ b/packages/react/src/components/RadioButton/index.js @@ -14,4 +14,4 @@ const RadioButton = FeatureFlags.enabled('enable-v11-release') : RadioButtonClassic; export default RadioButton; -export * from './RadioButton.Skeleton'; +export { default as RadioButtonSkeleton } from './RadioButton.Skeleton'; diff --git a/packages/carbon-react/src/components/RadioButton/RadioButton.stories.js b/packages/react/src/components/RadioButton/next/RadioButton.stories.js similarity index 88% rename from packages/carbon-react/src/components/RadioButton/RadioButton.stories.js rename to packages/react/src/components/RadioButton/next/RadioButton.stories.js index 1285ec0fe2de..4c1edec2605e 100644 --- a/packages/carbon-react/src/components/RadioButton/RadioButton.stories.js +++ b/packages/react/src/components/RadioButton/next/RadioButton.stories.js @@ -5,7 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import { RadioButton, RadioButtonGroup } from 'carbon-components-react'; +import RadioButton from '../'; +import RadioButtonGroup from '../../RadioButtonGroup'; import React from 'react'; export default { title: 'Components/RadioButton' }; diff --git a/packages/carbon-react/src/components/Search/Search.stories.js b/packages/react/src/components/Search/next/Search.stories.js similarity index 98% rename from packages/carbon-react/src/components/Search/Search.stories.js rename to packages/react/src/components/Search/next/Search.stories.js index a99ab03d57d0..7d8dcb722ded 100644 --- a/packages/carbon-react/src/components/Search/Search.stories.js +++ b/packages/react/src/components/Search/next/Search.stories.js @@ -7,7 +7,7 @@ import { Search, ExpandableSearch } from 'carbon-components-react'; import React from 'react'; -import { Layer } from '../Layer'; +import { Layer } from '../../Layer'; export default { title: 'Components/Search' }; diff --git a/packages/react/src/components/Select/index.js b/packages/react/src/components/Select/index.js index ea77a930793e..7180e2d99b42 100644 --- a/packages/react/src/components/Select/index.js +++ b/packages/react/src/components/Select/index.js @@ -5,5 +5,5 @@ * LICENSE file in the root directory of this source tree. */ -export * from './Select.Skeleton'; +export { default as SelectSkeleton } from './Select.Skeleton'; export default from './Select'; diff --git a/packages/carbon-react/src/components/Select/Select.stories.js b/packages/react/src/components/Select/next/Select.stories.js similarity index 95% rename from packages/carbon-react/src/components/Select/Select.stories.js rename to packages/react/src/components/Select/next/Select.stories.js index 779e3497c1ae..d64ed5e2dc19 100644 --- a/packages/carbon-react/src/components/Select/Select.stories.js +++ b/packages/react/src/components/Select/next/Select.stories.js @@ -6,13 +6,10 @@ */ import React from 'react'; -import { - Select, - SelectItem, - SelectItemGroup, - SelectSkeleton, -} from 'carbon-components-react'; -import { Layer } from '../Layer'; +import { default as Select, SelectSkeleton } from '../'; +import SelectItem from '../../SelectItem'; +import SelectItemGroup from '../../SelectItemGroup'; +import { Layer } from '../../Layer'; export default { title: 'Components/Select', diff --git a/packages/carbon-react/src/components/Skeleton/Skeleton.stories.js b/packages/react/src/components/Skeleton/next/Skeleton.stories.js similarity index 85% rename from packages/carbon-react/src/components/Skeleton/Skeleton.stories.js rename to packages/react/src/components/Skeleton/next/Skeleton.stories.js index be7685aa9bec..f2cbfc586941 100644 --- a/packages/carbon-react/src/components/Skeleton/Skeleton.stories.js +++ b/packages/react/src/components/Skeleton/next/Skeleton.stories.js @@ -1,5 +1,13 @@ +/** + * Copyright IBM Corp. 2016, 2018 + * + * This source code is licensed under the Apache-2.0 license found in the + * LICENSE file in the root directory of this source tree. + */ + import React from 'react'; -import { SkeletonPlaceholder, SkeletonText } from 'carbon-components-react'; +import SkeletonText from '../../SkeletonText'; +import SkeletonPlaceholder from '../../SkeletonPlaceholder'; import { withKnobs, select, boolean, number } from '@storybook/addon-knobs'; const classNames = { diff --git a/packages/react/src/components/Slider/index.js b/packages/react/src/components/Slider/index.js index d9926caecf89..aded4244448f 100644 --- a/packages/react/src/components/Slider/index.js +++ b/packages/react/src/components/Slider/index.js @@ -5,5 +5,5 @@ * LICENSE file in the root directory of this source tree. */ -export * from './Slider.Skeleton'; +export { default as SliderSkeleton } from './Slider.Skeleton'; export default from './Slider'; diff --git a/packages/carbon-react/src/components/Slider/Slider.mdx b/packages/react/src/components/Slider/next/Slider.mdx similarity index 100% rename from packages/carbon-react/src/components/Slider/Slider.mdx rename to packages/react/src/components/Slider/next/Slider.mdx diff --git a/packages/carbon-react/src/components/Slider/Slider.stories.js b/packages/react/src/components/Slider/next/Slider.stories.js similarity index 96% rename from packages/carbon-react/src/components/Slider/Slider.stories.js rename to packages/react/src/components/Slider/next/Slider.stories.js index 802a63d55843..097b376934dc 100644 --- a/packages/carbon-react/src/components/Slider/Slider.stories.js +++ b/packages/react/src/components/Slider/next/Slider.stories.js @@ -9,9 +9,9 @@ import React, { useState } from 'react'; // import { action } from '@storybook/addon-actions'; // import { withKnobs, boolean, number, text } from '@storybook/addon-knobs'; -import { Slider, SliderSkeleton } from '.'; +import { default as Slider, SliderSkeleton } from '../../Slider'; // import { sliderValuePropSync } from '../../../../react/src/internal/FeatureFlags'; -import { Layer } from '../Layer'; +import { Layer } from '../../Layer'; import mdx from './Slider.mdx'; export default { diff --git a/packages/carbon-react/src/components/StructuredList/StructuredList.mdx b/packages/react/src/components/StructuredList/next/StructuredList.mdx similarity index 100% rename from packages/carbon-react/src/components/StructuredList/StructuredList.mdx rename to packages/react/src/components/StructuredList/next/StructuredList.mdx diff --git a/packages/carbon-react/src/components/StructuredList/StructuredList.stories.js b/packages/react/src/components/StructuredList/next/StructuredList.stories.js similarity index 99% rename from packages/carbon-react/src/components/StructuredList/StructuredList.stories.js rename to packages/react/src/components/StructuredList/next/StructuredList.stories.js index 13ab83343931..6d41bb8068f8 100644 --- a/packages/carbon-react/src/components/StructuredList/StructuredList.stories.js +++ b/packages/react/src/components/StructuredList/next/StructuredList.stories.js @@ -17,7 +17,7 @@ import { StructuredListInput, StructuredListCell, StructuredListSkeleton, -} from '../StructuredList'; +} from '../../StructuredList'; import { settings } from 'carbon-components'; import mdx from './StructuredList.mdx'; diff --git a/packages/carbon-react/src/components/Tag/Tag.stories.js b/packages/react/src/components/Tag/next/Tag.stories.js similarity index 100% rename from packages/carbon-react/src/components/Tag/Tag.stories.js rename to packages/react/src/components/Tag/next/Tag.stories.js diff --git a/packages/react/src/components/TextArea/index.js b/packages/react/src/components/TextArea/index.js index 3c5119b86c28..d74055bb4d3b 100644 --- a/packages/react/src/components/TextArea/index.js +++ b/packages/react/src/components/TextArea/index.js @@ -5,5 +5,5 @@ * LICENSE file in the root directory of this source tree. */ -export * from './TextArea.Skeleton'; +export { default as TextAreaSkeleton } from './TextArea.Skeleton'; export default from './TextArea'; diff --git a/packages/carbon-react/src/components/TextArea/TextArea.stories.js b/packages/react/src/components/TextArea/next/TextArea.stories.js similarity index 93% rename from packages/carbon-react/src/components/TextArea/TextArea.stories.js rename to packages/react/src/components/TextArea/next/TextArea.stories.js index 3992c2be6984..57bee4e66a50 100644 --- a/packages/carbon-react/src/components/TextArea/TextArea.stories.js +++ b/packages/react/src/components/TextArea/next/TextArea.stories.js @@ -6,8 +6,8 @@ */ import React from 'react'; -import { TextArea, TextAreaSkeleton } from 'carbon-components-react'; -import { Layer } from '../Layer'; +import { default as TextArea, TextAreaSkeleton } from '../'; +import { Layer } from '../../Layer'; export default { title: 'Components/TextArea', diff --git a/packages/react/src/components/TextInput/index.js b/packages/react/src/components/TextInput/index.js index a4bad4443c14..928d8e098791 100644 --- a/packages/react/src/components/TextInput/index.js +++ b/packages/react/src/components/TextInput/index.js @@ -6,7 +6,6 @@ */ import { deprecateFieldOnObject } from '../../internal/deprecateFieldOnObject'; -export * from './TextInput.Skeleton'; import ControlledPasswordInput from './ControlledPasswordInput'; import PasswordInput from './PasswordInput'; import TextInput from './TextInput'; @@ -23,4 +22,5 @@ if (__DEV__) { deprecateFieldOnObject(TextInput, 'PasswordInput', PasswordInput); } +export { default as TextInputSkeleton } from './TextInput.Skeleton'; export default TextInput; diff --git a/packages/carbon-react/src/components/TextInput/TextInput.mdx b/packages/react/src/components/TextInput/next/TextInput.mdx similarity index 100% rename from packages/carbon-react/src/components/TextInput/TextInput.mdx rename to packages/react/src/components/TextInput/next/TextInput.mdx diff --git a/packages/carbon-react/src/components/TextInput/TextInput.stories.js b/packages/react/src/components/TextInput/next/TextInput.stories.js similarity index 92% rename from packages/carbon-react/src/components/TextInput/TextInput.stories.js rename to packages/react/src/components/TextInput/next/TextInput.stories.js index efb9622a7cf6..bb8b7958288e 100644 --- a/packages/carbon-react/src/components/TextInput/TextInput.stories.js +++ b/packages/react/src/components/TextInput/next/TextInput.stories.js @@ -6,8 +6,9 @@ */ import React from 'react'; -import { TextInput, TextInputSkeleton, FluidForm } from '.'; -import { Layer } from '../Layer'; +import FluidForm from '../../FluidForm'; +import { default as TextInput, TextInputSkeleton } from '../../TextInput'; +import { Layer } from '../../Layer'; import mdx from './TextInput.mdx'; export default { diff --git a/packages/carbon-react/src/components/Theme/__tests__/Theme-test.js b/packages/react/src/components/Theme/__tests__/Theme-test.js similarity index 100% rename from packages/carbon-react/src/components/Theme/__tests__/Theme-test.js rename to packages/react/src/components/Theme/__tests__/Theme-test.js diff --git a/packages/carbon-react/src/components/Theme/index.js b/packages/react/src/components/Theme/index.js similarity index 100% rename from packages/carbon-react/src/components/Theme/index.js rename to packages/react/src/components/Theme/index.js diff --git a/packages/carbon-react/src/components/Theme/Theme-story.scss b/packages/react/src/components/Theme/next/Theme-story.scss similarity index 100% rename from packages/carbon-react/src/components/Theme/Theme-story.scss rename to packages/react/src/components/Theme/next/Theme-story.scss diff --git a/packages/carbon-react/src/components/Theme/Theme.mdx b/packages/react/src/components/Theme/next/Theme.mdx similarity index 100% rename from packages/carbon-react/src/components/Theme/Theme.mdx rename to packages/react/src/components/Theme/next/Theme.mdx diff --git a/packages/carbon-react/src/components/Theme/Theme.stories.js b/packages/react/src/components/Theme/next/Theme.stories.js similarity index 97% rename from packages/carbon-react/src/components/Theme/Theme.stories.js rename to packages/react/src/components/Theme/next/Theme.stories.js index 8e9ca9235038..481e0e936ae2 100644 --- a/packages/carbon-react/src/components/Theme/Theme.stories.js +++ b/packages/react/src/components/Theme/next/Theme.stories.js @@ -7,7 +7,7 @@ import './Theme-story.scss'; import React from 'react'; -import { Theme, useTheme } from '../Theme'; +import { Theme, useTheme } from '../../Theme'; import mdx from './Theme.mdx'; export default { diff --git a/packages/carbon-react/src/components/Tile/Tile.stories.js b/packages/react/src/components/Tile/next/Tile.stories.js similarity index 97% rename from packages/carbon-react/src/components/Tile/Tile.stories.js rename to packages/react/src/components/Tile/next/Tile.stories.js index 44f9fc01a8ad..11aed93be756 100644 --- a/packages/carbon-react/src/components/Tile/Tile.stories.js +++ b/packages/react/src/components/Tile/next/Tile.stories.js @@ -6,19 +6,19 @@ */ import React from 'react'; +import Link from '../../Link'; +import TextInput from '../../TextInput'; +import RadioTile from '../../RadioTile'; import { ClickableTile, ExpandableTile, - Link, - RadioTile, SelectableTile, - TextInput, Tile, - TileGroup, TileAboveTheFoldContent, TileBelowTheFoldContent, -} from 'carbon-components-react'; -import { Layer } from '../Layer'; +} from '../'; +import TileGroup from '../../TileGroup'; +import { Layer } from '../../Layer'; import './tile-story.scss'; export default { diff --git a/packages/carbon-react/src/components/Tile/tile-story.scss b/packages/react/src/components/Tile/next/tile-story.scss similarity index 100% rename from packages/carbon-react/src/components/Tile/tile-story.scss rename to packages/react/src/components/Tile/next/tile-story.scss diff --git a/packages/carbon-react/src/components/TimePicker/TimePicker.stories.js b/packages/react/src/components/TimePicker/next/TimePicker.stories.js similarity index 95% rename from packages/carbon-react/src/components/TimePicker/TimePicker.stories.js rename to packages/react/src/components/TimePicker/next/TimePicker.stories.js index 96ef1e5ebdc1..68849fba92bb 100644 --- a/packages/carbon-react/src/components/TimePicker/TimePicker.stories.js +++ b/packages/react/src/components/TimePicker/next/TimePicker.stories.js @@ -6,12 +6,10 @@ */ import React from 'react'; -import { - TimePicker, - TimePickerSelect, - SelectItem, -} from 'carbon-components-react'; -import { Layer } from '../Layer'; +import SelectItem from '../../SelectItem'; +import TimePicker from '../'; +import TimePickerSelect from '../../TimePickerSelect'; +import { Layer } from '../../Layer'; // const props = { // timepicker: () => ({ diff --git a/packages/carbon-react/src/components/Toggle/Toggle.stories.js b/packages/react/src/components/Toggle/next/Toggle.stories.js similarity index 100% rename from packages/carbon-react/src/components/Toggle/Toggle.stories.js rename to packages/react/src/components/Toggle/next/Toggle.stories.js diff --git a/packages/carbon-react/src/components/Treeview/Treeview.stories.js b/packages/react/src/components/TreeView/next/Treeview.stories.js similarity index 97% rename from packages/carbon-react/src/components/Treeview/Treeview.stories.js rename to packages/react/src/components/TreeView/next/Treeview.stories.js index b7abe8994b1b..e2a18164d069 100644 --- a/packages/carbon-react/src/components/Treeview/Treeview.stories.js +++ b/packages/react/src/components/TreeView/next/Treeview.stories.js @@ -7,11 +7,8 @@ import React, { useState } from 'react'; import { Document16, Folder16 } from '@carbon/icons-react'; -import { - unstable_TreeView as TreeView, - unstable_TreeNode as TreeNode, - InlineNotification, -} from 'carbon-components-react'; +import { InlineNotification } from '../../Notification'; +import { default as TreeView, TreeNode } from '../'; import './story.scss'; const props = () => ({ diff --git a/packages/carbon-react/src/components/Treeview/story.scss b/packages/react/src/components/TreeView/next/story.scss similarity index 100% rename from packages/carbon-react/src/components/Treeview/story.scss rename to packages/react/src/components/TreeView/next/story.scss diff --git a/packages/carbon-react/src/components/UIShell/UIShell.stories.js b/packages/react/src/components/UIShell/next/UIShell.stories.js similarity index 99% rename from packages/carbon-react/src/components/UIShell/UIShell.stories.js rename to packages/react/src/components/UIShell/next/UIShell.stories.js index d8fe9b15dca9..fb5102ccb30d 100644 --- a/packages/carbon-react/src/components/UIShell/UIShell.stories.js +++ b/packages/react/src/components/UIShell/next/UIShell.stories.js @@ -31,7 +31,7 @@ import { Switcher, SwitcherItem, SwitcherDivider, -} from 'carbon-components-react'; +} from '../'; import { Modal, Button } from 'carbon-components-react'; import { Search20, diff --git a/packages/react/src/index.js b/packages/react/src/index.js index 9337e31e1711..8e08033611e1 100644 --- a/packages/react/src/index.js +++ b/packages/react/src/index.js @@ -206,18 +206,18 @@ export { } from './components/UIShell'; // Experimental +export { useContextMenu as unstable_useContextMenu } from './components/ContextMenu'; export { FeatureFlags as unstable_FeatureFlags, useFeatureFlag as unstable_useFeatureFlag, useFeatureFlags as unstable_useFeatureFlags, } from './components/FeatureFlags'; export { - PageSelector as unstable_PageSelector, - Pagination as unstable_Pagination, -} from './components/Pagination/experimental'; -export unstable_TreeView, { - TreeNode as unstable_TreeNode, -} from './components/TreeView'; + Heading as unstable_Heading, + Section as unstable_Section, +} from './components/Heading'; +export { IconButton as unstable_IconButton } from './components/IconButton'; +export { Layer as unstable_Layer } from './components/Layer'; export unstable_Menu, { MenuDivider as unstable_MenuDivider, MenuGroup as unstable_MenuGroup, @@ -225,23 +225,28 @@ export unstable_Menu, { MenuRadioGroup as unstable_MenuRadioGroup, MenuSelectableItem as unstable_MenuSelectableItem, } from './components/Menu'; -export { useContextMenu as unstable_useContextMenu } from './components/ContextMenu'; export { - Heading as unstable_Heading, - Section as unstable_Section, -} from './components/Heading'; -export { default as unstable_ProgressBar } from './components/ProgressBar'; -export { usePrefix as unstable_usePrefix } from './internal/usePrefix'; + PageSelector as unstable_PageSelector, + Pagination as unstable_Pagination, +} from './components/Pagination/experimental'; export { Popover as unstable_Popover, PopoverContent as unstable_PopoverContent, } from './components/Popover'; +export { default as unstable_ProgressBar } from './components/ProgressBar'; export { HStack as unstable_HStack, Stack as unstable_Stack, VStack as unstable_VStack, } from './components/Stack'; -export { Tooltip as unstable_Tooltip } from './components/Tooltip/next'; export { ContainedTab as unstable_ContainedTab } from './components/Tab'; export { ContainedTabs as unstable_ContainedTabs } from './components/Tabs'; -export { IconButton as unstable_IconButton } from './components/IconButton'; +export { Tooltip as unstable_Tooltip } from './components/Tooltip/next'; +export unstable_TreeView, { + TreeNode as unstable_TreeNode, +} from './components/TreeView'; +export { usePrefix as unstable_usePrefix } from './internal/usePrefix'; +export { + Theme as unstable_Theme, + useTheme as unstable_useTheme, +} from './components/Theme';