From 3ca7632922008db824a1ab302c8cf099ebe8d8aa Mon Sep 17 00:00:00 2001 From: Vivek jain Date: Thu, 23 Nov 2023 10:37:21 +0530 Subject: [PATCH 1/3] fix(story structure): updated stroies structure to be in same component --- .../components/Calendar/story}/Calendar.stories.tsx | 2 +- .../components/Card/story}/Card.stories.tsx | 2 +- .../components/Checkbox/story}/Checkbox.stories.tsx | 2 +- .../components/Collapse/story}/Collapse.stories.tsx | 2 +- .../components/Combobox/story}/Combobox.stories.tsx | 2 +- .../components/DataTable/story}/DataTable.stories.tsx | 4 ++-- .../components/DatePicker/story}/DatePicker.stories.tsx | 2 +- .../DateRangePicker/story}/DateRangePicker.stories.tsx | 9 +++------ .../components/Dialog/story}/Dialog.stories.tsx | 2 +- .../components/Dropdown/story}/Dropdown.stories.tsx | 2 +- .../components/Fade/story}/Fade.stories.tsx | 2 +- .../FormControl/story}/FormControl.stories.tsx | 2 +- .../components/Icon/story}/icon-button.stories.tsx | 2 +- .../components/Link/story}/Link.stories.tsx | 2 +- .../components/ListBox/story}/ListBox.stories.tsx | 2 +- .../LocalNavigation/story}/LocalNavigation.stories.tsx | 4 ++-- .../components/Menu/story}/Menu.stories.tsx | 2 +- .../MultiCombobox/story}/MultiCombobox.stories.tsx | 2 +- .../MultiSelect/story}/MultiSelect.stories.tsx | 2 +- .../NumberField/story}/NumberField.stories.tsx | 2 +- .../components/Pagination/story}/Pagination.stories.tsx | 2 +- .../components/Pill/story}/Pill.stories.tsx | 2 +- .../components/Popover/story}/Popover.stories.tsx | 2 +- .../components/Popover/story}/Provder.stories.tsx | 2 +- .../components/Portal/story}/Portal.stories.tsx | 2 +- .../components/Radio/story}/Radio.stories.tsx | 2 +- .../SegmentedControl/story}/SegmentedControl.stories.tsx | 2 +- .../components/Select/story}/Select.stories.tsx | 2 +- .../components/Separator/story}/Separator.stories.tsx | 2 +- .../SideNavigation/story}/SideNavigation.stories.tsx | 2 +- .../components/Skeleton/story}/Skeleton.stories.tsx | 2 +- .../components/Spinner/story}/Spinner.stories.tsx | 2 +- .../components/Switch/story}/Switch.stories.tsx | 2 +- .../components/Table/story}/Table.stories.tsx | 2 +- .../components/Tag/story}/Tag.stories.tsx | 2 +- .../components/TextArea/story}/TextArea.stories.tsx | 2 +- .../components/TextField/story}/TextField.stories.tsx | 2 +- .../components/Toast/story}/Toast.stories.tsx | 2 +- .../components/Tooltip/story}/Tooltip.stories.tsx | 2 +- .../action-card/story}/action-card.stories.tsx | 9 ++++++++- .../components/avatar/story}/avatar.stories.tsx | 2 +- .../components/box/story}/box.stories.tsx | 2 +- .../components/breadcrumb/story}/breadcrumb.stories.tsx | 2 +- .../components/button/story}/button-group.stories.tsx | 2 +- .../components/button/story}/button.stories.tsx | 2 +- .../components/container/story}/container.stories.tsx | 2 +- .../components/flex/story}/flex.stories.tsx | 2 +- .../components/grid/story}/grid.stories.tsx | 2 +- .../components/stack/story}/stack.stories.tsx | 2 +- 49 files changed, 60 insertions(+), 56 deletions(-) rename packages/react/{stories => src/components/Calendar/story}/Calendar.stories.tsx (97%) rename packages/react/{stories => src/components/Card/story}/Card.stories.tsx (96%) rename packages/react/{stories => src/components/Checkbox/story}/Checkbox.stories.tsx (95%) rename packages/react/{stories => src/components/Collapse/story}/Collapse.stories.tsx (95%) rename packages/react/{stories => src/components/Combobox/story}/Combobox.stories.tsx (99%) rename packages/react/{stories => src/components/DataTable/story}/DataTable.stories.tsx (99%) rename packages/react/{stories => src/components/DatePicker/story}/DatePicker.stories.tsx (96%) rename packages/react/{stories => src/components/DateRangePicker/story}/DateRangePicker.stories.tsx (94%) rename packages/react/{stories => src/components/Dialog/story}/Dialog.stories.tsx (97%) rename packages/react/{stories => src/components/Dropdown/story}/Dropdown.stories.tsx (99%) rename packages/react/{stories => src/components/Fade/story}/Fade.stories.tsx (95%) rename packages/react/{stories => src/components/FormControl/story}/FormControl.stories.tsx (94%) rename packages/react/{stories => src/components/Icon/story}/icon-button.stories.tsx (95%) rename packages/react/{stories => src/components/Link/story}/Link.stories.tsx (87%) rename packages/react/{stories => src/components/ListBox/story}/ListBox.stories.tsx (97%) rename packages/react/{stories => src/components/LocalNavigation/story}/LocalNavigation.stories.tsx (95%) rename packages/react/{stories => src/components/Menu/story}/Menu.stories.tsx (94%) rename packages/react/{stories => src/components/MultiCombobox/story}/MultiCombobox.stories.tsx (92%) rename packages/react/{stories => src/components/MultiSelect/story}/MultiSelect.stories.tsx (99%) rename packages/react/{stories => src/components/NumberField/story}/NumberField.stories.tsx (99%) rename packages/react/{stories => src/components/Pagination/story}/Pagination.stories.tsx (95%) rename packages/react/{stories => src/components/Pill/story}/Pill.stories.tsx (97%) rename packages/react/{stories => src/components/Popover/story}/Popover.stories.tsx (99%) rename packages/react/{stories => src/components/Popover/story}/Provder.stories.tsx (95%) rename packages/react/{stories => src/components/Portal/story}/Portal.stories.tsx (96%) rename packages/react/{stories => src/components/Radio/story}/Radio.stories.tsx (95%) rename packages/react/{stories => src/components/SegmentedControl/story}/SegmentedControl.stories.tsx (96%) rename packages/react/{stories => src/components/Select/story}/Select.stories.tsx (99%) rename packages/react/{stories => src/components/Separator/story}/Separator.stories.tsx (90%) rename packages/react/{stories => src/components/SideNavigation/story}/SideNavigation.stories.tsx (99%) rename packages/react/{stories => src/components/Skeleton/story}/Skeleton.stories.tsx (98%) rename packages/react/{stories => src/components/Spinner/story}/Spinner.stories.tsx (90%) rename packages/react/{stories => src/components/Switch/story}/Switch.stories.tsx (95%) rename packages/react/{stories => src/components/Table/story}/Table.stories.tsx (99%) rename packages/react/{stories => src/components/Tag/story}/Tag.stories.tsx (98%) rename packages/react/{stories => src/components/TextArea/story}/TextArea.stories.tsx (96%) rename packages/react/{stories => src/components/TextField/story}/TextField.stories.tsx (96%) rename packages/react/{stories => src/components/Toast/story}/Toast.stories.tsx (98%) rename packages/react/{stories => src/components/Tooltip/story}/Tooltip.stories.tsx (95%) rename packages/react/{stories => src/components/action-card/story}/action-card.stories.tsx (93%) rename packages/react/{stories => src/components/avatar/story}/avatar.stories.tsx (94%) rename packages/react/{stories => src/components/box/story}/box.stories.tsx (92%) rename packages/react/{stories => src/components/breadcrumb/story}/breadcrumb.stories.tsx (93%) rename packages/react/{stories => src/components/button/story}/button-group.stories.tsx (90%) rename packages/react/{stories => src/components/button/story}/button.stories.tsx (97%) rename packages/react/{stories => src/components/container/story}/container.stories.tsx (96%) rename packages/react/{stories => src/components/flex/story}/flex.stories.tsx (98%) rename packages/react/{stories => src/components/grid/story}/grid.stories.tsx (98%) rename packages/react/{stories => src/components/stack/story}/stack.stories.tsx (97%) diff --git a/packages/react/stories/Calendar.stories.tsx b/packages/react/src/components/Calendar/story/Calendar.stories.tsx similarity index 97% rename from packages/react/stories/Calendar.stories.tsx rename to packages/react/src/components/Calendar/story/Calendar.stories.tsx index d74b99c04..df4c44044 100644 --- a/packages/react/stories/Calendar.stories.tsx +++ b/packages/react/src/components/Calendar/story/Calendar.stories.tsx @@ -4,7 +4,7 @@ import type { DateValue } from '@react-types/calendar'; import type { RangeValue } from '@react-types/shared'; import { CalendarDate, isWeekend } from '@internationalized/date'; import type { ComponentStory } from '@storybook/react'; -import { Box, Calendar, CalendarRange } from '../src'; +import { Box, Calendar, CalendarRange } from '../../..'; export default { title: 'Components/Calendar', diff --git a/packages/react/stories/Card.stories.tsx b/packages/react/src/components/Card/story/Card.stories.tsx similarity index 96% rename from packages/react/stories/Card.stories.tsx rename to packages/react/src/components/Card/story/Card.stories.tsx index e3563989f..b4c320ab7 100644 --- a/packages/react/stories/Card.stories.tsx +++ b/packages/react/src/components/Card/story/Card.stories.tsx @@ -1,4 +1,4 @@ -import { Button, ButtonGroup, Card, CardBody, CardFooter, CardHeader } from '../src'; +import { Button, ButtonGroup, Card, CardBody, CardFooter, CardHeader } from '../../..'; export default { title: 'Components/Card', diff --git a/packages/react/stories/Checkbox.stories.tsx b/packages/react/src/components/Checkbox/story/Checkbox.stories.tsx similarity index 95% rename from packages/react/stories/Checkbox.stories.tsx rename to packages/react/src/components/Checkbox/story/Checkbox.stories.tsx index 3af40dc76..0e4e9b1e2 100644 --- a/packages/react/stories/Checkbox.stories.tsx +++ b/packages/react/src/components/Checkbox/story/Checkbox.stories.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { ComponentStory } from '@storybook/react'; -import { Checkbox } from '../src'; +import { Checkbox } from '../../..'; export default { title: 'Components/Checkbox', diff --git a/packages/react/stories/Collapse.stories.tsx b/packages/react/src/components/Collapse/story/Collapse.stories.tsx similarity index 95% rename from packages/react/stories/Collapse.stories.tsx rename to packages/react/src/components/Collapse/story/Collapse.stories.tsx index ba39fc37f..1fe67e034 100644 --- a/packages/react/stories/Collapse.stories.tsx +++ b/packages/react/src/components/Collapse/story/Collapse.stories.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { Button, Collapse } from '../src'; +import { Button, Collapse } from '../../..'; export default { title: 'Components/Collapse', diff --git a/packages/react/stories/Combobox.stories.tsx b/packages/react/src/components/Combobox/story/Combobox.stories.tsx similarity index 99% rename from packages/react/stories/Combobox.stories.tsx rename to packages/react/src/components/Combobox/story/Combobox.stories.tsx index f833af8e0..59b4bac89 100644 --- a/packages/react/stories/Combobox.stories.tsx +++ b/packages/react/src/components/Combobox/story/Combobox.stories.tsx @@ -1,5 +1,5 @@ import type { ComponentStory } from '@storybook/react'; -import { Combobox, ComboboxItem, ComboboxSection, Flex, Icon, Typography } from '../src'; +import { Combobox, ComboboxItem, ComboboxSection, Flex, Icon, Typography } from '../../..'; export default { title: 'Components/Combobox', diff --git a/packages/react/stories/DataTable.stories.tsx b/packages/react/src/components/DataTable/story/DataTable.stories.tsx similarity index 99% rename from packages/react/stories/DataTable.stories.tsx rename to packages/react/src/components/DataTable/story/DataTable.stories.tsx index 6873b5c6d..8650d0560 100644 --- a/packages/react/stories/DataTable.stories.tsx +++ b/packages/react/src/components/DataTable/story/DataTable.stories.tsx @@ -1,8 +1,8 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { faker } from '@faker-js/faker'; import { ClipboardWithCheck, Clock } from '@project44-manifest/react-icons'; -import { createDataTableColumnHelper, DataTable, DataTableColumnDef, Link, Pill } from '../src'; -import { TotalsDataObj } from '../src/components/DataTable/DataTable.types'; +import { createDataTableColumnHelper, DataTable, DataTableColumnDef, Link, Pill } from '../../..'; +import { TotalsDataObj } from '../DataTable.types'; export default { title: 'Components/DataTable', diff --git a/packages/react/stories/DatePicker.stories.tsx b/packages/react/src/components/DatePicker/story/DatePicker.stories.tsx similarity index 96% rename from packages/react/stories/DatePicker.stories.tsx rename to packages/react/src/components/DatePicker/story/DatePicker.stories.tsx index 3f68a1da0..3e74c7d8d 100644 --- a/packages/react/stories/DatePicker.stories.tsx +++ b/packages/react/src/components/DatePicker/story/DatePicker.stories.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { CalendarDate, DateValue } from '@internationalized/date'; import type { ComponentStory } from '@storybook/react'; -import { DatePicker, Flex, Icon } from '../src'; +import { DatePicker, Flex, Icon } from '../../..'; export default { title: 'Components/DatePicker', diff --git a/packages/react/stories/DateRangePicker.stories.tsx b/packages/react/src/components/DateRangePicker/story/DateRangePicker.stories.tsx similarity index 94% rename from packages/react/stories/DateRangePicker.stories.tsx rename to packages/react/src/components/DateRangePicker/story/DateRangePicker.stories.tsx index 95ad7392e..ca641e6fe 100644 --- a/packages/react/stories/DateRangePicker.stories.tsx +++ b/packages/react/src/components/DateRangePicker/story/DateRangePicker.stories.tsx @@ -1,12 +1,9 @@ import * as React from 'react'; import { CalendarDate, DateValue, endOfMonth, startOfMonth } from '@internationalized/date'; import type { ComponentStory } from '@storybook/react'; -import { DateRangePicker, Flex, Icon } from '../src'; -import type { RangeValue } from '../src/components/CalendarRange'; -import { - addMonths, - createCalendarDate, -} from '../src/components/CalendarRanges/defaultDefinedRanges'; +import { DateRangePicker, Flex, Icon } from '../../..'; +import type { RangeValue } from '../../CalendarRange'; +import { addMonths, createCalendarDate } from '../../CalendarRanges/defaultDefinedRanges'; export default { title: 'Components/DateRangePicker', diff --git a/packages/react/stories/Dialog.stories.tsx b/packages/react/src/components/Dialog/story/Dialog.stories.tsx similarity index 97% rename from packages/react/stories/Dialog.stories.tsx rename to packages/react/src/components/Dialog/story/Dialog.stories.tsx index 0467942e3..6119065d9 100644 --- a/packages/react/stories/Dialog.stories.tsx +++ b/packages/react/src/components/Dialog/story/Dialog.stories.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { Meta, Story } from '@storybook/react'; -import { Button, Dialog, DialogContent, DialogFooter, DialogHeader, DialogProps } from '../src'; +import { Button, Dialog, DialogContent, DialogFooter, DialogHeader, DialogProps } from '../../..'; const meta: Meta = { component: Dialog, diff --git a/packages/react/stories/Dropdown.stories.tsx b/packages/react/src/components/Dropdown/story/Dropdown.stories.tsx similarity index 99% rename from packages/react/stories/Dropdown.stories.tsx rename to packages/react/src/components/Dropdown/story/Dropdown.stories.tsx index 1dec9e90d..e6fae95a8 100644 --- a/packages/react/stories/Dropdown.stories.tsx +++ b/packages/react/src/components/Dropdown/story/Dropdown.stories.tsx @@ -8,7 +8,7 @@ import { DropdownProps, DropdownSection, IconButton, -} from '../src'; +} from '../../..'; const meta: Meta = { title: 'Components/Dropdown', diff --git a/packages/react/stories/Fade.stories.tsx b/packages/react/src/components/Fade/story/Fade.stories.tsx similarity index 95% rename from packages/react/stories/Fade.stories.tsx rename to packages/react/src/components/Fade/story/Fade.stories.tsx index 54adc70ef..4df487336 100644 --- a/packages/react/stories/Fade.stories.tsx +++ b/packages/react/src/components/Fade/story/Fade.stories.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { Button, Fade } from '../src'; +import { Button, Fade } from '../../..'; export default { title: 'Components/Fade', diff --git a/packages/react/stories/FormControl.stories.tsx b/packages/react/src/components/FormControl/story/FormControl.stories.tsx similarity index 94% rename from packages/react/stories/FormControl.stories.tsx rename to packages/react/src/components/FormControl/story/FormControl.stories.tsx index 093bcf1f3..1398b6402 100644 --- a/packages/react/stories/FormControl.stories.tsx +++ b/packages/react/src/components/FormControl/story/FormControl.stories.tsx @@ -1,5 +1,5 @@ import type { ComponentStory } from '@storybook/react'; -import { FormControl } from '../src'; +import { FormControl } from '../../..'; export default { title: 'Components/FormControl', diff --git a/packages/react/stories/icon-button.stories.tsx b/packages/react/src/components/Icon/story/icon-button.stories.tsx similarity index 95% rename from packages/react/stories/icon-button.stories.tsx rename to packages/react/src/components/Icon/story/icon-button.stories.tsx index ad630661a..860fb0070 100644 --- a/packages/react/stories/icon-button.stories.tsx +++ b/packages/react/src/components/Icon/story/icon-button.stories.tsx @@ -1,5 +1,5 @@ import type { ComponentStory } from '@storybook/react'; -import { IconButton } from '../src'; +import { IconButton } from '../../..'; export default { title: 'Components/IconButton', diff --git a/packages/react/stories/Link.stories.tsx b/packages/react/src/components/Link/story/Link.stories.tsx similarity index 87% rename from packages/react/stories/Link.stories.tsx rename to packages/react/src/components/Link/story/Link.stories.tsx index df4834b24..586c66423 100644 --- a/packages/react/stories/Link.stories.tsx +++ b/packages/react/src/components/Link/story/Link.stories.tsx @@ -1,4 +1,4 @@ -import { Link, Typography } from '../src'; +import { Link, Typography } from '../../..'; export default { title: 'Components/Link', diff --git a/packages/react/stories/ListBox.stories.tsx b/packages/react/src/components/ListBox/story/ListBox.stories.tsx similarity index 97% rename from packages/react/stories/ListBox.stories.tsx rename to packages/react/src/components/ListBox/story/ListBox.stories.tsx index 9802fed60..ba597c3ff 100644 --- a/packages/react/stories/ListBox.stories.tsx +++ b/packages/react/src/components/ListBox/story/ListBox.stories.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { ComponentStory } from '@storybook/react'; -import { ListBox, ListBoxItem, ListBoxSection } from '../src'; +import { ListBox, ListBoxItem, ListBoxSection } from '../../..'; export default { title: 'Components/ListBox', diff --git a/packages/react/stories/LocalNavigation.stories.tsx b/packages/react/src/components/LocalNavigation/story/LocalNavigation.stories.tsx similarity index 95% rename from packages/react/stories/LocalNavigation.stories.tsx rename to packages/react/src/components/LocalNavigation/story/LocalNavigation.stories.tsx index 1994bc40a..958dee3c7 100644 --- a/packages/react/stories/LocalNavigation.stories.tsx +++ b/packages/react/src/components/LocalNavigation/story/LocalNavigation.stories.tsx @@ -5,8 +5,8 @@ import { LocalNavigationItem, Stack, Typography, -} from '../src'; -import { LocalNavigationDropdownItem } from '../src/components/LocalNavigation'; +} from '../../..'; +import { LocalNavigationDropdownItem } from '../../LocalNavigation'; export default { title: 'Components/LocalNavigation', diff --git a/packages/react/stories/Menu.stories.tsx b/packages/react/src/components/Menu/story/Menu.stories.tsx similarity index 94% rename from packages/react/stories/Menu.stories.tsx rename to packages/react/src/components/Menu/story/Menu.stories.tsx index a29762ef8..93dd2c231 100644 --- a/packages/react/stories/Menu.stories.tsx +++ b/packages/react/src/components/Menu/story/Menu.stories.tsx @@ -1,5 +1,5 @@ import { Carrier, Route } from '@project44-manifest/react-icons'; -import { Menu, MenuGroup, MenuItem } from '../src'; +import { Menu, MenuGroup, MenuItem } from '../../..'; export default { title: 'Components/Menu', diff --git a/packages/react/stories/MultiCombobox.stories.tsx b/packages/react/src/components/MultiCombobox/story/MultiCombobox.stories.tsx similarity index 92% rename from packages/react/stories/MultiCombobox.stories.tsx rename to packages/react/src/components/MultiCombobox/story/MultiCombobox.stories.tsx index 8b4b6c48e..3b96f24ef 100644 --- a/packages/react/stories/MultiCombobox.stories.tsx +++ b/packages/react/src/components/MultiCombobox/story/MultiCombobox.stories.tsx @@ -1,6 +1,6 @@ import { Search } from '@project44-manifest/react-icons'; import type { ComponentStory } from '@storybook/react'; -import { MultiCombobox, SelectItem, SelectSection } from '../src'; +import { MultiCombobox, SelectItem, SelectSection } from '../../..'; export default { title: 'Components/MultiCombobox', diff --git a/packages/react/stories/MultiSelect.stories.tsx b/packages/react/src/components/MultiSelect/story/MultiSelect.stories.tsx similarity index 99% rename from packages/react/stories/MultiSelect.stories.tsx rename to packages/react/src/components/MultiSelect/story/MultiSelect.stories.tsx index cabdc2567..053937afd 100644 --- a/packages/react/stories/MultiSelect.stories.tsx +++ b/packages/react/src/components/MultiSelect/story/MultiSelect.stories.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { ComponentStory } from '@storybook/react'; -import { Icon, MultiSelect, SelectItem, SelectSection } from '../src'; +import { Icon, MultiSelect, SelectItem, SelectSection } from '../../..'; export default { title: 'Components/MultiSelect', diff --git a/packages/react/stories/NumberField.stories.tsx b/packages/react/src/components/NumberField/story/NumberField.stories.tsx similarity index 99% rename from packages/react/stories/NumberField.stories.tsx rename to packages/react/src/components/NumberField/story/NumberField.stories.tsx index d7ab2ccb2..9f694e28c 100644 --- a/packages/react/stories/NumberField.stories.tsx +++ b/packages/react/src/components/NumberField/story/NumberField.stories.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { ComponentStory } from '@storybook/react'; -import { Flex, NumberField, Select, SelectItem, Separator, Switch } from '../src'; +import { Flex, NumberField, Select, SelectItem, Separator, Switch } from '../../..'; export default { title: 'Components/NumberField', diff --git a/packages/react/stories/Pagination.stories.tsx b/packages/react/src/components/Pagination/story/Pagination.stories.tsx similarity index 95% rename from packages/react/stories/Pagination.stories.tsx rename to packages/react/src/components/Pagination/story/Pagination.stories.tsx index c02cf3f3d..36124965d 100644 --- a/packages/react/stories/Pagination.stories.tsx +++ b/packages/react/src/components/Pagination/story/Pagination.stories.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { ComponentStory } from '@storybook/react'; -import { Pagination } from '../src'; +import { Pagination } from '../../..'; export default { title: 'Components/Pagination', diff --git a/packages/react/stories/Pill.stories.tsx b/packages/react/src/components/Pill/story/Pill.stories.tsx similarity index 97% rename from packages/react/stories/Pill.stories.tsx rename to packages/react/src/components/Pill/story/Pill.stories.tsx index aa49995d0..5845b17ab 100644 --- a/packages/react/stories/Pill.stories.tsx +++ b/packages/react/src/components/Pill/story/Pill.stories.tsx @@ -1,6 +1,6 @@ import { AirplaneFilled, Clock } from '@project44-manifest/react-icons'; import type { ComponentStory } from '@storybook/react'; -import { Flex, Pill } from '../src'; +import { Flex, Pill } from '../../..'; export default { title: 'Components/Pill', diff --git a/packages/react/stories/Popover.stories.tsx b/packages/react/src/components/Popover/story/Popover.stories.tsx similarity index 99% rename from packages/react/stories/Popover.stories.tsx rename to packages/react/src/components/Popover/story/Popover.stories.tsx index e844e5287..ce624596b 100644 --- a/packages/react/stories/Popover.stories.tsx +++ b/packages/react/src/components/Popover/story/Popover.stories.tsx @@ -10,7 +10,7 @@ import { PopoverProps, usePopoverTrigger, usePopoverTriggerState, -} from '../src'; +} from '../../..'; function PlacementComponent(props: { placement: PopoverPlacement }) { const { placement } = props; diff --git a/packages/react/stories/Provder.stories.tsx b/packages/react/src/components/Popover/story/Provder.stories.tsx similarity index 95% rename from packages/react/stories/Provder.stories.tsx rename to packages/react/src/components/Popover/story/Provder.stories.tsx index 02ff796c3..b5528c611 100644 --- a/packages/react/stories/Provder.stories.tsx +++ b/packages/react/src/components/Popover/story/Provder.stories.tsx @@ -1,6 +1,6 @@ import { createTheme } from '@project44-manifest/react-styles'; import { Meta, Story } from '@storybook/react'; -import { Button, Provider, ProviderProps } from '../src'; +import { Button, Provider, ProviderProps } from '../../..'; const meta: Meta = { component: Provider, diff --git a/packages/react/stories/Portal.stories.tsx b/packages/react/src/components/Portal/story/Portal.stories.tsx similarity index 96% rename from packages/react/stories/Portal.stories.tsx rename to packages/react/src/components/Portal/story/Portal.stories.tsx index ebf3026d0..080775d6e 100644 --- a/packages/react/stories/Portal.stories.tsx +++ b/packages/react/src/components/Portal/story/Portal.stories.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { Portal } from '../src'; +import { Portal } from '../../..'; export default { title: 'Components/Portal', diff --git a/packages/react/stories/Radio.stories.tsx b/packages/react/src/components/Radio/story/Radio.stories.tsx similarity index 95% rename from packages/react/stories/Radio.stories.tsx rename to packages/react/src/components/Radio/story/Radio.stories.tsx index e63371bd6..4b82f5b16 100644 --- a/packages/react/stories/Radio.stories.tsx +++ b/packages/react/src/components/Radio/story/Radio.stories.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { ComponentStory } from '@storybook/react'; -import { Radio, RadioGroup } from '../src'; +import { Radio, RadioGroup } from '../../..'; export default { title: 'Components/Radio', diff --git a/packages/react/stories/SegmentedControl.stories.tsx b/packages/react/src/components/SegmentedControl/story/SegmentedControl.stories.tsx similarity index 96% rename from packages/react/stories/SegmentedControl.stories.tsx rename to packages/react/src/components/SegmentedControl/story/SegmentedControl.stories.tsx index edd11ec0b..c192e979a 100644 --- a/packages/react/stories/SegmentedControl.stories.tsx +++ b/packages/react/src/components/SegmentedControl/story/SegmentedControl.stories.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { CheckCircleFilled, InfoCircleFilled } from '@project44-manifest/react-icons'; -import { Segment, SegmentedControl } from '../src'; +import { Segment, SegmentedControl } from '../../..'; export default { title: 'Components/SegmentedControl', diff --git a/packages/react/stories/Select.stories.tsx b/packages/react/src/components/Select/story/Select.stories.tsx similarity index 99% rename from packages/react/stories/Select.stories.tsx rename to packages/react/src/components/Select/story/Select.stories.tsx index 6ff34249b..2c7b62973 100644 --- a/packages/react/stories/Select.stories.tsx +++ b/packages/react/src/components/Select/story/Select.stories.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { ComponentStory } from '@storybook/react'; -import { Flex, Icon, Select, SelectItem, SelectSection } from '../src'; +import { Flex, Icon, Select, SelectItem, SelectSection } from '../../..'; export default { title: 'Components/Select', diff --git a/packages/react/stories/Separator.stories.tsx b/packages/react/src/components/Separator/story/Separator.stories.tsx similarity index 90% rename from packages/react/stories/Separator.stories.tsx rename to packages/react/src/components/Separator/story/Separator.stories.tsx index e90f1e997..e8a6b0e3e 100644 --- a/packages/react/stories/Separator.stories.tsx +++ b/packages/react/src/components/Separator/story/Separator.stories.tsx @@ -1,5 +1,5 @@ import type { ComponentStory } from '@storybook/react'; -import { Flex, Separator } from '../src'; +import { Flex, Separator } from '../../..'; export default { title: 'Components/Separator', diff --git a/packages/react/stories/SideNavigation.stories.tsx b/packages/react/src/components/SideNavigation/story/SideNavigation.stories.tsx similarity index 99% rename from packages/react/stories/SideNavigation.stories.tsx rename to packages/react/src/components/SideNavigation/story/SideNavigation.stories.tsx index 83d70a05f..6c5b25b38 100644 --- a/packages/react/stories/SideNavigation.stories.tsx +++ b/packages/react/src/components/SideNavigation/story/SideNavigation.stories.tsx @@ -12,7 +12,7 @@ import { SideNavigationMenu, SideNavigationMenuGroup, SideNavigationMenuItem, -} from '../src'; +} from '../../..'; function Logo() { return ( diff --git a/packages/react/stories/Skeleton.stories.tsx b/packages/react/src/components/Skeleton/story/Skeleton.stories.tsx similarity index 98% rename from packages/react/stories/Skeleton.stories.tsx rename to packages/react/src/components/Skeleton/story/Skeleton.stories.tsx index ec9818875..49f695d23 100644 --- a/packages/react/stories/Skeleton.stories.tsx +++ b/packages/react/src/components/Skeleton/story/Skeleton.stories.tsx @@ -1,4 +1,4 @@ -import { Grid, GridItem, Skeleton } from '../src'; +import { Grid, GridItem, Skeleton } from '../../..'; export default { title: 'Components/Skeleton', diff --git a/packages/react/stories/Spinner.stories.tsx b/packages/react/src/components/Spinner/story/Spinner.stories.tsx similarity index 90% rename from packages/react/stories/Spinner.stories.tsx rename to packages/react/src/components/Spinner/story/Spinner.stories.tsx index edd6eee3b..310fe4041 100644 --- a/packages/react/stories/Spinner.stories.tsx +++ b/packages/react/src/components/Spinner/story/Spinner.stories.tsx @@ -1,4 +1,4 @@ -import { Spinner } from '../src'; +import { Spinner } from '../../..'; export default { title: 'Components/Spinner', diff --git a/packages/react/stories/Switch.stories.tsx b/packages/react/src/components/Switch/story/Switch.stories.tsx similarity index 95% rename from packages/react/stories/Switch.stories.tsx rename to packages/react/src/components/Switch/story/Switch.stories.tsx index 05c394536..b2821672c 100644 --- a/packages/react/stories/Switch.stories.tsx +++ b/packages/react/src/components/Switch/story/Switch.stories.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { ComponentStory } from '@storybook/react'; -import { Switch } from '../src'; +import { Switch } from '../../..'; export default { title: 'Components/Switch', diff --git a/packages/react/stories/Table.stories.tsx b/packages/react/src/components/Table/story/Table.stories.tsx similarity index 99% rename from packages/react/stories/Table.stories.tsx rename to packages/react/src/components/Table/story/Table.stories.tsx index 53970e81f..acdb5285b 100644 --- a/packages/react/stories/Table.stories.tsx +++ b/packages/react/src/components/Table/story/Table.stories.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { ComponentStory } from '@storybook/react'; -import { Table, TableBody, TableCell, TableColumn, TableHeader, TableRow } from '../src'; +import { Table, TableBody, TableCell, TableColumn, TableHeader, TableRow } from '../../..'; export default { title: 'Components/Table', diff --git a/packages/react/stories/Tag.stories.tsx b/packages/react/src/components/Tag/story/Tag.stories.tsx similarity index 98% rename from packages/react/stories/Tag.stories.tsx rename to packages/react/src/components/Tag/story/Tag.stories.tsx index bacfe3c42..0a863dad2 100644 --- a/packages/react/stories/Tag.stories.tsx +++ b/packages/react/src/components/Tag/story/Tag.stories.tsx @@ -1,5 +1,5 @@ import { Flatbed } from '@project44-manifest/react-icons'; -import { Stack, Tag } from '../src'; +import { Stack, Tag } from '../../..'; export default { title: 'Components/Tag', diff --git a/packages/react/stories/TextArea.stories.tsx b/packages/react/src/components/TextArea/story/TextArea.stories.tsx similarity index 96% rename from packages/react/stories/TextArea.stories.tsx rename to packages/react/src/components/TextArea/story/TextArea.stories.tsx index 2899d95ca..c4f99a09c 100644 --- a/packages/react/stories/TextArea.stories.tsx +++ b/packages/react/src/components/TextArea/story/TextArea.stories.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { ComponentStory } from '@storybook/react'; -import { TextArea } from '../src'; +import { TextArea } from '../../..'; export default { title: 'Components/TextArea', diff --git a/packages/react/stories/TextField.stories.tsx b/packages/react/src/components/TextField/story/TextField.stories.tsx similarity index 96% rename from packages/react/stories/TextField.stories.tsx rename to packages/react/src/components/TextField/story/TextField.stories.tsx index 867bba0d7..8d82cad1a 100644 --- a/packages/react/stories/TextField.stories.tsx +++ b/packages/react/src/components/TextField/story/TextField.stories.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { ComponentStory } from '@storybook/react'; -import { Flex, Icon, IconButton, TextField } from '../src'; +import { Flex, Icon, IconButton, TextField } from '../../..'; export default { title: 'Components/TextField', diff --git a/packages/react/stories/Toast.stories.tsx b/packages/react/src/components/Toast/story/Toast.stories.tsx similarity index 98% rename from packages/react/stories/Toast.stories.tsx rename to packages/react/src/components/Toast/story/Toast.stories.tsx index 4327e717f..f68fe9a52 100644 --- a/packages/react/stories/Toast.stories.tsx +++ b/packages/react/src/components/Toast/story/Toast.stories.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { Button, toast, Toaster } from '../src'; +import { Button, toast, Toaster } from '../../..'; export default { title: 'Components/Toast', diff --git a/packages/react/stories/Tooltip.stories.tsx b/packages/react/src/components/Tooltip/story/Tooltip.stories.tsx similarity index 95% rename from packages/react/stories/Tooltip.stories.tsx rename to packages/react/src/components/Tooltip/story/Tooltip.stories.tsx index c1a4a7111..c1e2cee35 100644 --- a/packages/react/stories/Tooltip.stories.tsx +++ b/packages/react/src/components/Tooltip/story/Tooltip.stories.tsx @@ -1,4 +1,4 @@ -import { Button, Stack, Tooltip } from '../src'; +import { Button, Stack, Tooltip } from '../../..'; export default { title: 'Components/Tooltip', diff --git a/packages/react/stories/action-card.stories.tsx b/packages/react/src/components/action-card/story/action-card.stories.tsx similarity index 93% rename from packages/react/stories/action-card.stories.tsx rename to packages/react/src/components/action-card/story/action-card.stories.tsx index f27456ce7..8536bbfdf 100644 --- a/packages/react/stories/action-card.stories.tsx +++ b/packages/react/src/components/action-card/story/action-card.stories.tsx @@ -1,5 +1,12 @@ import type { StoryFn } from '@storybook/react'; -import { ActionCard, ActionCardBody, ActionCardHeader, ActionCardImage, Box, Stack } from '../src'; +import { + ActionCard, + ActionCardBody, + ActionCardHeader, + ActionCardImage, + Box, + Stack, +} from '../../../'; export default { title: 'Components/ActionCard', diff --git a/packages/react/stories/avatar.stories.tsx b/packages/react/src/components/avatar/story/avatar.stories.tsx similarity index 94% rename from packages/react/stories/avatar.stories.tsx rename to packages/react/src/components/avatar/story/avatar.stories.tsx index 576837c4d..2097f4df0 100644 --- a/packages/react/stories/avatar.stories.tsx +++ b/packages/react/src/components/avatar/story/avatar.stories.tsx @@ -1,5 +1,5 @@ import type { StoryFn } from '@storybook/react'; -import { Avatar, Stack } from '../src'; +import { Avatar, Stack } from '../../..'; export default { title: 'Components/Avatar', diff --git a/packages/react/stories/box.stories.tsx b/packages/react/src/components/box/story/box.stories.tsx similarity index 92% rename from packages/react/stories/box.stories.tsx rename to packages/react/src/components/box/story/box.stories.tsx index 3554fd8e2..a040c1890 100644 --- a/packages/react/stories/box.stories.tsx +++ b/packages/react/src/components/box/story/box.stories.tsx @@ -1,4 +1,4 @@ -import { Box } from '../src'; +import { Box } from '../../..'; export default { title: 'Components/Box', diff --git a/packages/react/stories/breadcrumb.stories.tsx b/packages/react/src/components/breadcrumb/story/breadcrumb.stories.tsx similarity index 93% rename from packages/react/stories/breadcrumb.stories.tsx rename to packages/react/src/components/breadcrumb/story/breadcrumb.stories.tsx index 405965423..6c9a4111c 100644 --- a/packages/react/stories/breadcrumb.stories.tsx +++ b/packages/react/src/components/breadcrumb/story/breadcrumb.stories.tsx @@ -1,4 +1,4 @@ -import { Breadcrumb, BreadcrumbItem } from '../src'; +import { Breadcrumb, BreadcrumbItem } from '../../..'; export default { title: 'Components/Breadcrumb', diff --git a/packages/react/stories/button-group.stories.tsx b/packages/react/src/components/button/story/button-group.stories.tsx similarity index 90% rename from packages/react/stories/button-group.stories.tsx rename to packages/react/src/components/button/story/button-group.stories.tsx index 038ce40a4..e4ed7a04e 100644 --- a/packages/react/stories/button-group.stories.tsx +++ b/packages/react/src/components/button/story/button-group.stories.tsx @@ -1,5 +1,5 @@ import type { ComponentStory } from '@storybook/react'; -import { Button, ButtonGroup } from '../src'; +import { Button, ButtonGroup } from '../../..'; export default { title: 'Components/ButtonGroup', diff --git a/packages/react/stories/button.stories.tsx b/packages/react/src/components/button/story/button.stories.tsx similarity index 97% rename from packages/react/stories/button.stories.tsx rename to packages/react/src/components/button/story/button.stories.tsx index b539ebcdd..e6140f36f 100644 --- a/packages/react/stories/button.stories.tsx +++ b/packages/react/src/components/button/story/button.stories.tsx @@ -1,5 +1,5 @@ import { StoryFn } from '@storybook/react'; -import { Button, Stack } from '../src'; +import { Button, Stack } from '../../..'; export default { title: 'Components/Button', diff --git a/packages/react/stories/container.stories.tsx b/packages/react/src/components/container/story/container.stories.tsx similarity index 96% rename from packages/react/stories/container.stories.tsx rename to packages/react/src/components/container/story/container.stories.tsx index c5b0534c2..dc28767a5 100644 --- a/packages/react/stories/container.stories.tsx +++ b/packages/react/src/components/container/story/container.stories.tsx @@ -1,4 +1,4 @@ -import { Container } from '../src'; +import { Container } from '../../..'; export default { title: 'Components/Container', diff --git a/packages/react/stories/flex.stories.tsx b/packages/react/src/components/flex/story/flex.stories.tsx similarity index 98% rename from packages/react/stories/flex.stories.tsx rename to packages/react/src/components/flex/story/flex.stories.tsx index 26a5dad8b..ef17536c8 100644 --- a/packages/react/stories/flex.stories.tsx +++ b/packages/react/src/components/flex/story/flex.stories.tsx @@ -1,4 +1,4 @@ -import { Box, Flex } from '../src'; +import { Box, Flex } from '../../..'; export default { title: 'Components/Flex', diff --git a/packages/react/stories/grid.stories.tsx b/packages/react/src/components/grid/story/grid.stories.tsx similarity index 98% rename from packages/react/stories/grid.stories.tsx rename to packages/react/src/components/grid/story/grid.stories.tsx index 93e05591a..680a3e8b9 100644 --- a/packages/react/stories/grid.stories.tsx +++ b/packages/react/src/components/grid/story/grid.stories.tsx @@ -1,4 +1,4 @@ -import { Grid, GridItem } from '../src'; +import { Grid, GridItem } from '../../..'; export default { title: 'Components/Grid', diff --git a/packages/react/stories/stack.stories.tsx b/packages/react/src/components/stack/story/stack.stories.tsx similarity index 97% rename from packages/react/stories/stack.stories.tsx rename to packages/react/src/components/stack/story/stack.stories.tsx index 03de7f013..bafa22ac7 100644 --- a/packages/react/stories/stack.stories.tsx +++ b/packages/react/src/components/stack/story/stack.stories.tsx @@ -1,4 +1,4 @@ -import { Box, Stack } from '../src'; +import { Box, Stack } from '../../..'; export default { title: 'Components/Stack', From 0d1e4714909e37bcf05016725a735b6fc0eb859c Mon Sep 17 00:00:00 2001 From: Vivek jain Date: Thu, 23 Nov 2023 10:39:05 +0530 Subject: [PATCH 2/3] fix(story structure): added changeset --- .changeset/shaggy-snails-dress.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/shaggy-snails-dress.md diff --git a/.changeset/shaggy-snails-dress.md b/.changeset/shaggy-snails-dress.md new file mode 100644 index 000000000..2a282691e --- /dev/null +++ b/.changeset/shaggy-snails-dress.md @@ -0,0 +1,5 @@ +--- +'@project44-manifest/react': patch +--- + +Updated story structure so that stories can be in component folder itself From 7829d1715e89af4ea959f95a55b208ae8bdec877 Mon Sep 17 00:00:00 2001 From: Vivek jain Date: Thu, 23 Nov 2023 10:51:26 +0530 Subject: [PATCH 3/3] fix(story structure): fix lint error --- .../LocalNavigation/story/LocalNavigation.stories.tsx | 2 +- .../src/components/action-card/story/action-card.stories.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/src/components/LocalNavigation/story/LocalNavigation.stories.tsx b/packages/react/src/components/LocalNavigation/story/LocalNavigation.stories.tsx index 958dee3c7..cf2b0d052 100644 --- a/packages/react/src/components/LocalNavigation/story/LocalNavigation.stories.tsx +++ b/packages/react/src/components/LocalNavigation/story/LocalNavigation.stories.tsx @@ -2,11 +2,11 @@ import { DropdownItem, DropdownMenu, LocalNavigation, + LocalNavigationDropdownItem, LocalNavigationItem, Stack, Typography, } from '../../..'; -import { LocalNavigationDropdownItem } from '../../LocalNavigation'; export default { title: 'Components/LocalNavigation', diff --git a/packages/react/src/components/action-card/story/action-card.stories.tsx b/packages/react/src/components/action-card/story/action-card.stories.tsx index 8536bbfdf..2f7456dc2 100644 --- a/packages/react/src/components/action-card/story/action-card.stories.tsx +++ b/packages/react/src/components/action-card/story/action-card.stories.tsx @@ -6,7 +6,7 @@ import { ActionCardImage, Box, Stack, -} from '../../../'; +} from '../../..'; export default { title: 'Components/ActionCard',