Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed May 6, 2024
1 parent f2218fa commit 0ecd394
Show file tree
Hide file tree
Showing 242 changed files with 232 additions and 276 deletions.
1 change: 0 additions & 1 deletion code/addons/a11y/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.5",
"@storybook/manager-api": "workspace:*",
"@storybook/theming": "workspace:*",
"@testing-library/react": "^14.0.0",
"lodash": "^4.17.21",
"react": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/components/A11YPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useCallback, useMemo, useState } from 'react';

import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';

import { ActionBar, ScrollArea } from '@storybook/components';
import { SyncIcon, CheckIcon } from '@storybook/icons';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/components/A11yContext.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { themes, convert } from '@storybook/theming';
import { themes, convert } from '@storybook/core/dist/theming';
import type { Result } from 'axe-core';
import { useChannel, useAddonState, useStorybookApi } from '@storybook/manager-api';
import { STORY_CHANGED, STORY_RENDERED } from '@storybook/core/dist/core-events';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/components/Report/Elements.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC } from 'react';
import React from 'react';

import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';

import type { NodeResult } from 'axe-core';
import { Rules } from './Rules';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/components/Report/HighlightToggle.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';

import type { NodeResult } from 'axe-core';
import { useA11yContext } from '../A11yContext';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/components/Report/Info.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC } from 'react';
import React from 'react';

import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';
import type { Result } from 'axe-core';

const Wrapper = styled.div({
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/components/Report/Item.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Fragment, useState } from 'react';

import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';

import type { Result } from 'axe-core';
import { Info } from './Info';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/components/Report/Rules.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { FC } from 'react';
import React from 'react';
import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';
import { Badge } from '@storybook/components';
import type { CheckResult } from 'axe-core';
import { useResizeDetector } from 'react-resize-detector';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/components/Report/Tags.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC } from 'react';
import React from 'react';

import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';
import type { TagValue } from 'axe-core';

const Wrapper = styled.div({
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/components/Tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';

import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';
import type { NodeResult, Result } from 'axe-core';
import { useResizeDetector } from 'react-resize-detector';
import HighlightToggle from './Report/HighlightToggle';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/components/VisionSimulator.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ReactNode } from 'react';
import React, { useState } from 'react';
import { Global, styled } from '@storybook/theming';
import { Global, styled } from '@storybook/core/dist/theming';
import { IconButton, WithTooltip, TooltipLinkList } from '@storybook/components';

import { AccessibilityIcon } from '@storybook/icons';
Expand Down
1 change: 0 additions & 1 deletion code/addons/actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
"devDependencies": {
"@storybook/components": "workspace:*",
"@storybook/manager-api": "workspace:*",
"@storybook/theming": "workspace:*",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-inspector": "^6.0.0",
Expand Down
4 changes: 2 additions & 2 deletions code/addons/actions/src/components/ActionLogger/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ElementRef, ReactNode } from 'react';
import React, { forwardRef, Fragment, useEffect, useRef } from 'react';
import type { Theme } from '@storybook/theming';
import { styled, withTheme } from '@storybook/theming';
import type { Theme } from '@storybook/core/dist/theming';
import { styled, withTheme } from '@storybook/core/dist/theming';

import { Inspector } from 'react-inspector';
import { ActionBar, ScrollArea } from '@storybook/components';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/actions/src/components/ActionLogger/style.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';
import { opacify } from 'polished';

export const Action = styled.div({
Expand Down
1 change: 0 additions & 1 deletion code/addons/backgrounds/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
"@storybook/components": "workspace:*",
"@storybook/icons": "^1.2.5",
"@storybook/manager-api": "workspace:*",
"@storybook/theming": "workspace:*",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.2"
Expand Down
2 changes: 1 addition & 1 deletion code/addons/backgrounds/src/components/ColorIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';

export const ColorIcon = styled.span(
({ background }: { background: string }) => ({
Expand Down
1 change: 0 additions & 1 deletion code/addons/controls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"@storybook/components": "workspace:*",
"@storybook/icons": "^1.2.5",
"@storybook/manager-api": "workspace:*",
"@storybook/theming": "workspace:*",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion code/addons/controls/src/ControlsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
useStorybookState,
} from '@storybook/manager-api';
import { PureArgsTable as ArgsTable, type PresetColor, type SortType } from '@storybook/blocks';
import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';
import type { ArgTypes } from '@storybook/core/dist/types';

import { PARAM_KEY } from './constants';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/controls/src/SaveStory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
WithTooltip,
} from '@storybook/components';
import { AddIcon, CheckIcon, UndoIcon } from '@storybook/icons';
import { keyframes, styled } from '@storybook/theming';
import { keyframes, styled } from '@storybook/core/dist/theming';
import React from 'react';

const slideIn = keyframes({
Expand Down
2 changes: 1 addition & 1 deletion code/addons/controls/src/manager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
} from '@storybook/core/dist/core-events';
import { SAVE_STORY_REQUEST, SAVE_STORY_RESPONSE } from '@storybook/core/dist/core-events';
import { addons, experimental_requestResponse, types, useArgTypes } from '@storybook/manager-api';
import { color } from '@storybook/theming';
import { color } from '@storybook/core/dist/theming';
import { ControlsPanel } from './ControlsPanel';
import { ADDON_ID, PARAM_KEY } from './constants';
import type { Args } from '@storybook/csf';
Expand Down
1 change: 0 additions & 1 deletion code/addons/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
"@storybook/csf-plugin": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/react-dom-shim": "workspace:*",
"@storybook/theming": "workspace:*",
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"fs-extra": "^11.1.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/docs/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export const viteFinal = async (config: any, options: Options) => {
* The following aliases are used to ensure a single instance of these packages are used in situations where they are duplicated
* The packages will be duplicated by the package manager when the user has react installed with another version than 18.2.0
*/
'@storybook/theming': dirname(require.resolve('@storybook/theming')),
'@storybook/core/dist/theming': dirname(require.resolve('@storybook/core/dist/theming')),
'@storybook/components': dirname(require.resolve('@storybook/components')),
'@storybook/blocks': dirname(require.resolve('@storybook/blocks')),
},
Expand Down
1 change: 0 additions & 1 deletion code/addons/interactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"@storybook/components": "workspace:*",
"@storybook/icons": "^1.2.5",
"@storybook/manager-api": "workspace:*",
"@storybook/theming": "workspace:*",
"@types/node": "^18.0.0",
"formik": "^2.2.9",
"react": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/src/components/EmptyState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
import { Link, EmptyTabContent } from '@storybook/components';
import { DocumentIcon, VideoIcon } from '@storybook/icons';
import { useStorybookApi } from '@storybook/manager-api';
import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';

import { DOCUMENTATION_LINK, TUTORIAL_VIDEO_LINK } from '../constants';

Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/src/components/Interaction.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { IconButton, TooltipNote, WithTooltip } from '@storybook/components';
import { type Call, CallStates, type ControlStates } from '@storybook/core/dist/instrumenter';
import { styled, typography } from '@storybook/theming';
import { styled, typography } from '@storybook/core/dist/theming';
import { transparentize } from 'polished';

import { ListUnorderedIcon } from '@storybook/icons';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import type { StoryObj, Meta } from '@storybook/react';
import { CallStates } from '@storybook/core/dist/instrumenter';
import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';
import { userEvent, within, waitFor, expect } from '@storybook/test';
import { isChromatic } from '../../../../ui/.storybook/isChromatic';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { type Call, CallStates, type ControlStates } from '@storybook/core/dist/instrumenter';
import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';
import { transparentize } from 'polished';

import { Subnav } from './Subnav';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/src/components/List.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Fragment, useState } from 'react';
import { styled, themes, convert } from '@storybook/theming';
import { styled, themes, convert } from '@storybook/core/dist/theming';
import { ChevronSmallDownIcon } from '@storybook/icons';

const ListWrapper = styled.ul({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import dedent from 'ts-dedent';
import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';
import { MatcherResult } from './MatcherResult';

const StyledWrapper = styled.div(({ theme }) => ({
Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/src/components/MatcherResult.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { styled, typography } from '@storybook/theming';
import { styled, typography } from '@storybook/core/dist/theming';
import { Node } from './MethodCall';

const getParams = (line: string, fromIndex = 0): string => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Call } from '@storybook/core/dist/instrumenter';
import React from 'react';
import { styled, typography } from '@storybook/theming';
import { styled, typography } from '@storybook/core/dist/theming';
import { Node, MethodCall } from './MethodCall';

const StyledWrapper = styled.div(({ theme }) => ({
Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/src/components/MethodCall.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ObjectInspector } from '@devtools-ds/object-inspector';
import type { Call, CallRef, ElementRef } from '@storybook/core/dist/instrumenter';
import { useTheme } from '@storybook/theming';
import { useTheme } from '@storybook/core/dist/theming';
import type { ReactElement } from 'react';
import React, { Fragment } from 'react';

Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/src/components/StatusBadge.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { type Call, CallStates } from '@storybook/core/dist/instrumenter';
import { styled, typography } from '@storybook/theming';
import { styled, typography } from '@storybook/core/dist/theming';

export interface StatusBadgeProps {
status: Call['status'];
Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/src/components/StatusIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { type Call, CallStates } from '@storybook/core/dist/instrumenter';
import { styled, useTheme } from '@storybook/theming';
import { styled, useTheme } from '@storybook/core/dist/theming';

import { transparentize } from 'polished';
import { CheckIcon, CircleIcon, PlayIcon, StopAltIcon } from '@storybook/icons';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/src/components/Subnav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from '@storybook/components';
import type { Call, ControlStates } from '@storybook/core/dist/instrumenter';
import { CallStates } from '@storybook/core/dist/instrumenter';
import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';

import {
FastForwardIcon,
Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/src/components/TabStatus.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';

import { StatusIcon } from './StatusIcon';

Expand Down
1 change: 0 additions & 1 deletion code/addons/jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"@storybook/components": "workspace:*",
"@storybook/icons": "^1.2.5",
"@storybook/manager-api": "workspace:*",
"@storybook/theming": "workspace:*",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-resize-detector": "^7.1.2",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/jest/src/components/Message.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { FC, ReactElement } from 'react';
import React, { Fragment } from 'react';
import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';

const positiveConsoleRegex = /\[32m(.*?)\[39m/;
const negativeConsoleRegex = /\[31m(.*?)\[39m/;
Expand Down
2 changes: 1 addition & 1 deletion code/addons/jest/src/components/Panel.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { FC } from 'react';
import React, { Fragment } from 'react';
import { styled, themes, convert } from '@storybook/theming';
import { styled, themes, convert } from '@storybook/core/dist/theming';
import { ScrollArea, TabsState, Link, Placeholder } from '@storybook/components';
import { useResizeDetector } from 'react-resize-detector';
import { Result } from './Result';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/jest/src/components/Result.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Fragment, useState } from 'react';
import { styled, themes, convert } from '@storybook/theming';
import { styled, themes, convert } from '@storybook/core/dist/theming';
// eslint-disable-next-line import/no-named-as-default
import Message from './Message';
import { ChevronSmallDownIcon } from '@storybook/icons';
Expand Down
1 change: 0 additions & 1 deletion code/addons/onboarding/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"@storybook/manager-api": "workspace:*",
"@storybook/react": "workspace:*",
"@storybook/test": "workspace:*",
"@storybook/theming": "workspace:*",
"framer-motion": "^11.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/onboarding/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useCallback, useEffect, useState } from 'react';
import { ThemeProvider, convert } from '@storybook/theming';
import { ThemeProvider, convert } from '@storybook/core/dist/theming';
import { addons, type API } from '@storybook/manager-api';

import { GuidedTour } from './features/GuidedTour/GuidedTour';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/onboarding/src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ComponentProps } from 'react';
import React, { forwardRef } from 'react';
import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';

export interface ButtonProps extends ComponentProps<'button'> {
children: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ReactConfetti from 'react-confetti';
import React, { useEffect } from 'react';
import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';
import { createPortal } from 'react-dom';
import { useState } from 'react';

Expand Down
2 changes: 1 addition & 1 deletion code/addons/onboarding/src/components/List/List.styled.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';

export const ListWrapper = styled.ul(() => ({
display: 'flex',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';

export const ListItemWrapper = styled.li(() => ({
display: 'flex',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';
import { motion } from 'framer-motion';

export const SnippetWrapper = styled(motion.div)`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { styled } from '@storybook/theming';
import { styled } from '@storybook/core/dist/theming';
import { motion } from 'framer-motion';

export const Code = styled(motion.div)`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { createRef, useCallback, useLayoutEffect, useMemo, useState } from 'react';
import { Backdrop, Code, Container, SnippetWrapperFirst } from './SyntaxHighlighter.styled';
import { Snippet } from './Snippet/Snippet';
import { ThemeProvider, ensure, themes } from '@storybook/theming';
import { ThemeProvider, ensure, themes } from '@storybook/core/dist/theming';
import { SyntaxHighlighter as StorybookSyntaxHighlighter } from '@storybook/components';

type SyntaxHighlighterProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Theme } from '@storybook/theming';
import { type Theme } from '@storybook/core/dist/theming';

export const getStyles = (theme: Theme) => ({
border: 0,
Expand Down
Loading

0 comments on commit 0ecd394

Please sign in to comment.