diff --git a/packages/storybook-brand-addon/package.json b/packages/storybook-brand-addon/package.json index 355e458..9b9e27e 100644 --- a/packages/storybook-brand-addon/package.json +++ b/packages/storybook-brand-addon/package.json @@ -13,21 +13,19 @@ }, "dependencies": { "@floating-ui/react": "0.26.25", - "@storybook/components": "8.3.6", - "@storybook/csf": "0.1.13", - "@storybook/manager-api": "8.3.6", "classnames": "2.5.1", - "storybook-dark-mode": "4.0.2" + "@storybook-community/storybook-dark-mode": "4.0.5" }, "peerDependencies": { - "react": "^17.0.2 || ^18.0.0", - "react-dom": "^17.0.2 || ^18.0.0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0", + "storybook": "^10.0.0" }, "devDependencies": { - "@storybook/types": "8.3.6", "@types/react": "18.2.45", "react": "18.2.0", - "react-dom": "18.2.0" + "react-dom": "18.2.0", + "storybook": "10.0.0" }, "license": "Apache-2.0", "types": "./dist/esm/index.d.ts", diff --git a/packages/storybook-brand-addon/preset.js b/packages/storybook-brand-addon/preset.js index 5b983f0..9ac4f8b 100644 --- a/packages/storybook-brand-addon/preset.js +++ b/packages/storybook-brand-addon/preset.js @@ -1,9 +1,4 @@ -function config(entry = []) { - return [...entry, require.resolve('./dist/cjs/preview.js')]; -} - -function managerEntries(entry = []) { - return [...entry, require.resolve('./dist/cjs/manager.js')]; -} - -module.exports = { managerEntries, config }; +module.exports = { + managerEntries: (entry = []) => [...entry, require.resolve('./dist/cjs/manager.js')], + previewAnnotations: (entry = []) => [...entry, require.resolve('./dist/cjs/preview.js')], +}; diff --git a/packages/storybook-brand-addon/src/components/AddBrandPanel/AddBrandPanel.tsx b/packages/storybook-brand-addon/src/components/AddBrandPanel/AddBrandPanel.tsx index 36f30f0..8bdc81f 100644 --- a/packages/storybook-brand-addon/src/components/AddBrandPanel/AddBrandPanel.tsx +++ b/packages/storybook-brand-addon/src/components/AddBrandPanel/AddBrandPanel.tsx @@ -1,4 +1,4 @@ -import { Button } from '@storybook/components'; +import { Button } from 'storybook/components'; import { SyntheticEvent, useState } from 'react'; import { useCustomBrandContext } from '../../contexts'; diff --git a/packages/storybook-brand-addon/src/components/BrandOption/BrandOption.tsx b/packages/storybook-brand-addon/src/components/BrandOption/BrandOption.tsx index 83314e0..4a9a8a9 100644 --- a/packages/storybook-brand-addon/src/components/BrandOption/BrandOption.tsx +++ b/packages/storybook-brand-addon/src/components/BrandOption/BrandOption.tsx @@ -1,5 +1,5 @@ -import { IconButton } from '@storybook/components'; -import { CircleIcon, EditIcon, TrashIcon } from '@storybook/icons'; +import { IconButton } from 'storybook/components'; +import { CircleIcon, EditIcon, TrashIcon } from 'storybook/icons'; import cn from 'classnames'; import { SyntheticEvent, useState } from 'react'; diff --git a/packages/storybook-brand-addon/src/components/BrandSelector/BrandSelector.tsx b/packages/storybook-brand-addon/src/components/BrandSelector/BrandSelector.tsx index 80b7566..559702b 100644 --- a/packages/storybook-brand-addon/src/components/BrandSelector/BrandSelector.tsx +++ b/packages/storybook-brand-addon/src/components/BrandSelector/BrandSelector.tsx @@ -1,8 +1,8 @@ import '../../styles.css'; -import { Button } from '@storybook/components'; -import { AddIcon, CircleIcon } from '@storybook/icons'; -import { useGlobals } from '@storybook/manager-api'; +import { Button } from 'storybook/components'; +import { AddIcon, CircleIcon } from 'storybook/icons'; +import { useGlobals } from 'storybook/manager-api'; import { useMemo, useState } from 'react'; import { PARAM_CAN_ADD_CUSTOM_BRAND_KEY, PARAM_COLOR_MAP_KEY, PARAM_KEY } from '../../constants'; diff --git a/packages/storybook-brand-addon/src/components/EditBrandPanel/EditBrandPanel.tsx b/packages/storybook-brand-addon/src/components/EditBrandPanel/EditBrandPanel.tsx index ab7bb38..5a3757f 100644 --- a/packages/storybook-brand-addon/src/components/EditBrandPanel/EditBrandPanel.tsx +++ b/packages/storybook-brand-addon/src/components/EditBrandPanel/EditBrandPanel.tsx @@ -1,4 +1,4 @@ -import { Button } from '@storybook/components'; +import { Button } from 'storybook/components'; import { SyntheticEvent, useState } from 'react'; import { useCustomBrandContext } from '../../contexts'; diff --git a/packages/storybook-brand-addon/src/components/Tooltip/Tooltip.tsx b/packages/storybook-brand-addon/src/components/Tooltip/Tooltip.tsx index 9781d5e..5fe0649 100644 --- a/packages/storybook-brand-addon/src/components/Tooltip/Tooltip.tsx +++ b/packages/storybook-brand-addon/src/components/Tooltip/Tooltip.tsx @@ -7,7 +7,7 @@ import { useFloating, useInteractions, } from '@floating-ui/react'; -import { StorybookTheme, useTheme } from '@storybook/theming'; +import { StorybookTheme, useTheme } from 'storybook/theming'; import { MouseEvent, ReactNode } from 'react'; type TooltipProps = { diff --git a/packages/storybook-brand-addon/src/contexts/CustomBrandsContext.tsx b/packages/storybook-brand-addon/src/contexts/CustomBrandsContext.tsx index faf9c31..f8f37ba 100644 --- a/packages/storybook-brand-addon/src/contexts/CustomBrandsContext.tsx +++ b/packages/storybook-brand-addon/src/contexts/CustomBrandsContext.tsx @@ -1,4 +1,4 @@ -import { useGlobals } from '@storybook/manager-api'; +import { useGlobals } from 'storybook/manager-api'; import { createContext, ReactNode, useCallback, useContext, useState } from 'react'; import { DEFAULT_BRAND } from '../constants'; diff --git a/packages/storybook-brand-addon/src/hooks/useStorybookBrand.ts b/packages/storybook-brand-addon/src/hooks/useStorybookBrand.ts index 85de500..4837d70 100644 --- a/packages/storybook-brand-addon/src/hooks/useStorybookBrand.ts +++ b/packages/storybook-brand-addon/src/hooks/useStorybookBrand.ts @@ -1,5 +1,5 @@ -import { Globals } from '@storybook/csf'; -import { useDarkMode } from 'storybook-dark-mode'; +import { Globals } from 'storybook/internal/types'; +import { useDarkMode } from '@storybook-community/storybook-dark-mode'; import { PARAM_COLOR_MAP_KEY } from '../constants'; import { getCustomBrands } from '../customBrands'; diff --git a/packages/storybook-brand-addon/src/manager.tsx b/packages/storybook-brand-addon/src/manager.tsx index fd4811a..6ab729b 100644 --- a/packages/storybook-brand-addon/src/manager.tsx +++ b/packages/storybook-brand-addon/src/manager.tsx @@ -1,4 +1,4 @@ -import { addons, types } from '@storybook/manager-api'; +import { addons, types } from 'storybook/manager-api'; import { BrandSelector } from './components'; import { ADDON_ID, TOOL_ID } from './constants'; diff --git a/packages/storybook-brand-addon/src/preview.ts b/packages/storybook-brand-addon/src/preview.ts index d04ba37..a493598 100644 --- a/packages/storybook-brand-addon/src/preview.ts +++ b/packages/storybook-brand-addon/src/preview.ts @@ -1,4 +1,4 @@ -import { ProjectAnnotations, Renderer } from '@storybook/csf'; +import { ProjectAnnotations, Renderer } from 'storybook/internal/types'; import { BrandProvider } from './BrandProvider';