Skip to content

Commit 8f809af

Browse files
committed
chore: use named export for styled-components
1 parent c5e66bd commit 8f809af

File tree

91 files changed

+91
-91
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+91
-91
lines changed

docs/.storybook/preview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { parse } from 'qs';
66
import { DesignSystemProvider, Box, darkTheme, lightTheme, type BoxProps } from '@strapi/design-system';
77

88
import { DocsContainer, Unstyled } from '@storybook/blocks';
9-
import styled, { DefaultTheme } from 'styled-components';
9+
import { styled, DefaultTheme } from 'styled-components';
1010
import { MARKDOWN_OVERRIDES, Markdown } from '../components/Markdown';
1111

1212
const createCustomTheme = (theme: DefaultTheme, base: 'light' | 'dark' = 'light') => {

docs/components/Image.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ComponentPropsWithoutRef } from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
interface ImageProps extends ComponentPropsWithoutRef<'img'> {}
66

docs/components/Markdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Markdown as MarkdownImpl } from '@storybook/blocks';
22
import { BaseLink } from '@strapi/design-system';
3-
import styled, { css } from 'styled-components';
3+
import { styled, css } from 'styled-components';
44

55
import { DeprecationNotice } from './DeprecationNotice';
66
import { Image } from './Image';

docs/components/Typescale.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Typography } from '@strapi/design-system';
2-
import styled from 'styled-components';
2+
import { styled } from 'styled-components';
33

44
const TEXT_VARIANTS = ['alpha', 'beta', 'delta', 'epsilon', 'omega', 'pi', 'sigma'] as const;
55

docs/components/Typography.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Typography, TypographyProps } from '@strapi/design-system';
2-
import styled, { css } from 'styled-components';
2+
import { styled, css } from 'styled-components';
33

44
const H1 = (props: TypographyProps) => (
55
<Typography tag="h1" variant="alpha" textColor="neutral800" marginBottom="0.5em" {...props} />

docs/stories/foundations/icons/Icons.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Typography, lightTheme } from '@strapi/design-system';
22
import * as Icons from '@strapi/icons';
3-
import styled, { DefaultTheme } from 'styled-components';
3+
import { styled, type DefaultTheme } from 'styled-components';
44

55
import type { Meta, StoryObj } from '@storybook/react';
66

docs/stories/foundations/icons/Symbols.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Typography } from '@strapi/design-system';
22
import * as Icons from '@strapi/icons/symbols';
3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import type { Meta, StoryObj } from '@storybook/react';
66

packages/strapi-design-system/src/Accordion/Accordion.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled, { DefaultTheme } from 'styled-components';
3+
import { styled, type DefaultTheme } from 'styled-components';
44

55
import { AccordionContext } from './AccordionContext';
66
import { AccordionDescription, AccordionTitle } from './AccordionToggle';

packages/strapi-design-system/src/Accordion/AccordionGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import { AccordionWrapper } from './Accordion';
66
import { Box, BoxComponent } from '../Box';

packages/strapi-design-system/src/Accordion/AccordionToggle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22

33
import { CaretDown } from '@strapi/icons';
4-
import styled, { DefaultTheme } from 'styled-components';
4+
import { styled, type DefaultTheme } from 'styled-components';
55

66
import { AccordionSize } from './Accordion';
77
import { useAccordion } from './AccordionContext';

packages/strapi-design-system/src/Alert/Alert.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22

33
import { Information, CheckCircle, WarningCircle, Cross } from '@strapi/icons';
4-
import styled from 'styled-components';
4+
import { styled } from 'styled-components';
55

66
import { handleBackgroundColor, handleBorderColor, handleIconColor } from './utils';
77
import { Box, BoxComponent, BoxProps } from '../Box';

packages/strapi-design-system/src/Avatar/Avatar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import { avatarSize, previewSize } from './constants';
66
import { Box, BoxComponent } from '../Box';

packages/strapi-design-system/src/Avatar/AvatarGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import styled from 'styled-components';
1+
import { styled } from 'styled-components';
22

33
import { avatarSize } from './constants';
44
import { Flex, FlexComponent } from '../Flex';

packages/strapi-design-system/src/Badge/Badge.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import styled, { DefaultTheme } from 'styled-components';
1+
import { styled, type DefaultTheme } from 'styled-components';
22

33
import { Flex, FlexComponent, FlexProps } from '../Flex';
44
import { Typography } from '../Typography';

packages/strapi-design-system/src/BaseButton/BaseButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import { Flex, FlexComponent, FlexProps } from '../Flex';
66
import { focus } from '../styles/buttons';

packages/strapi-design-system/src/BaseCheckbox/BaseCheckbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import checkmarkIconDisabled from './assets/checkmark-black.svg';
66
import checkmarkIcon from './assets/checkmark.svg';

packages/strapi-design-system/src/BaseRadio/BaseRadio.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import { RadioContext } from './context';
66
import { RadioGroupSize } from './RadioGroup';

packages/strapi-design-system/src/Box/Box.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled, { CSSProperties, DefaultTheme } from 'styled-components';
3+
import { styled, type CSSProperties, type DefaultTheme } from 'styled-components';
44

55
import handleResponsiveValues, { ResponsiveValue } from '../helpers/handleResponsiveValues';
66
import { extractStyleFromTheme } from '../helpers/theme';

packages/strapi-design-system/src/Breadcrumbs/Breadcrumbs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import { Divider } from './Divider';
66
import { Box } from '../Box';

packages/strapi-design-system/src/Breadcrumbs/CrumbLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import { BaseLink, BaseLinkProps } from '../BaseLink';
66

packages/strapi-design-system/src/Breadcrumbs/CrumbSimpleMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import { SimpleMenu, SimpleMenuProps } from '../SimpleMenu';
66

packages/strapi-design-system/src/Button/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22

33
import { Loader } from '@strapi/icons';
4-
import styled, { keyframes } from 'styled-components';
4+
import { styled, keyframes } from 'styled-components';
55

66
import { BUTTON_SIZES, Variant, ButtonSizes, DEFAULT } from './constants';
77
import { getDisabledStyle, getHoverStyle, getActiveStyle, getVariantStyle } from './utils';

packages/strapi-design-system/src/Card/CardAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import styled from 'styled-components';
1+
import { styled } from 'styled-components';
22

33
import { Flex, FlexComponent } from '../Flex';
44

packages/strapi-design-system/src/Card/CardAsset.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import { Flex } from '../Flex';
66

packages/strapi-design-system/src/Card/CardBadge.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import styled from 'styled-components';
1+
import { styled } from 'styled-components';
22

33
import { Badge, BadgeProps } from '../Badge';
44

packages/strapi-design-system/src/Card/CardContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import { Box, BoxComponent, BoxProps } from '../Box';
66

packages/strapi-design-system/src/Card/CardHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import styled from 'styled-components';
1+
import { styled } from 'styled-components';
22

33
import { Flex, FlexComponent, FlexProps } from '../Flex';
44

packages/strapi-design-system/src/CarouselInput/Carousel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22

33
import { ChevronRight, ChevronLeft } from '@strapi/icons';
4-
import styled from 'styled-components';
4+
import { styled } from 'styled-components';
55

66
import { Box, BoxComponent, BoxProps } from '../Box';
77
import { Flex, FlexComponent } from '../Flex';

packages/strapi-design-system/src/CarouselInput/CarouselImage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import { Box, BoxComponent, BoxProps } from '../Box';
66
import { ellipsis } from '../styles/type';

packages/strapi-design-system/src/Checkbox/Checkbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import { BaseCheckbox, BaseCheckboxProps, CheckboxElement } from '../BaseCheckbox';
66
import { Box } from '../Box';

packages/strapi-design-system/src/Combobox/Combobox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react';
22

33
import { CaretDown, Cross } from '@strapi/icons';
44
import { Combobox as ComboboxPrimitive } from '@strapi/ui-primitives';
5-
import styled from 'styled-components';
5+
import { styled } from 'styled-components';
66

77
import { Box, BoxComponent } from '../Box';
88
import { FieldProps } from '../Field';

packages/strapi-design-system/src/DatePicker/DatePicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { Calendar, Cross } from '@strapi/icons';
2222
import { composeEventHandlers } from '@strapi/ui-primitives';
2323
import { createPortal } from 'react-dom';
2424
import { RemoveScroll } from 'react-remove-scroll';
25-
import styled, { DefaultTheme } from 'styled-components';
25+
import { styled, type DefaultTheme } from 'styled-components';
2626

2727
import { Box, BoxComponent, BoxProps } from '../Box';
2828
import { useDesignSystem } from '../DesignSystemProvider';

packages/strapi-design-system/src/DateTimePicker/DateTimePicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22

33
import { CalendarDateTime, parseAbsoluteToLocal, toCalendarDateTime, getLocalTimeZone } from '@internationalized/date';
4-
import styled from 'styled-components';
4+
import { styled } from 'styled-components';
55

66
import { DatePicker as DatePickerInput, DatePickerProps, DatePickerElement } from '../DatePicker/DatePicker';
77
import { useDesignSystem } from '../DesignSystemProvider';

packages/strapi-design-system/src/Dialog/Dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import { Box, BoxComponent, BoxProps } from '../Box';
66
import { DismissibleLayer } from '../DismissibleLayer';

packages/strapi-design-system/src/Dialog/DialogBody.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import { Box, BoxComponent } from '../Box';
66
import { Flex } from '../Flex';

packages/strapi-design-system/src/Dialog/DialogFooter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import { Box, BoxComponent } from '../Box';
66
import { Flex } from '../Flex';

packages/strapi-design-system/src/Divider/Divider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import styled from 'styled-components';
1+
import { styled } from 'styled-components';
22

33
import { Box, BoxComponent, BoxProps } from '../Box';
44
import { PropsToTransientProps } from '../types';

packages/strapi-design-system/src/EmptyStateLayout/EmptyStateLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import styled from 'styled-components';
1+
import { styled } from 'styled-components';
22

33
import { Box, BoxComponent } from '../Box';
44
import { Flex, FlexProps } from '../Flex';

packages/strapi-design-system/src/Field/FieldAction.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import { Flex, FlexComponent, FlexProps } from '../Flex';
66
import { VisuallyHidden } from '../VisuallyHidden';

packages/strapi-design-system/src/Field/FieldInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled, { css, DefaultTheme } from 'styled-components';
3+
import { styled, css, DefaultTheme } from 'styled-components';
44

55
import { useField } from './FieldContext';
66
import { Box } from '../Box';

packages/strapi-design-system/src/Field/FieldLabel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import { useField } from './FieldContext';
66
import { Flex, FlexComponent } from '../Flex';

packages/strapi-design-system/src/Flex/Flex.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled, { CSSProperties } from 'styled-components';
3+
import { styled, type CSSProperties } from 'styled-components';
44

55
import { Box, BoxComponent, BoxProps } from '../Box';
66
import handleResponsiveValues, { ResponsiveValue } from '../helpers/handleResponsiveValues';

packages/strapi-design-system/src/Grid/Grid.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import { Box, BoxComponent, BoxProps } from '../Box';
66
import handleResponsiveValues, { ResponsiveValue } from '../helpers/handleResponsiveValues';

packages/strapi-design-system/src/Grid/GridItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import styled from 'styled-components';
1+
import { styled } from 'styled-components';
22

33
import { Box, BoxComponent, BoxProps } from '../Box';
44
import { PropsToTransientProps } from '../types';

packages/strapi-design-system/src/IconButton/IconButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import { BaseButton, BaseButtonProps } from '../BaseButton';
66
import { Flex, FlexComponent } from '../Flex';

packages/strapi-design-system/src/JSONInput/JSONInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as React from 'react';
33
import { jsonParseLinter, json } from '@codemirror/lang-json';
44
import type { ViewUpdate } from '@codemirror/view';
55
import { useCodeMirror, ReactCodeMirrorRef, ReactCodeMirrorProps } from '@uiw/react-codemirror';
6-
import styled from 'styled-components';
6+
import { styled } from 'styled-components';
77

88
import { markField, addMarks, filterMarks, lineHighlightMark } from './utils/decorationExtension';
99
import { FieldProps } from '../Field';

packages/strapi-design-system/src/Layout/GridLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import styled from 'styled-components';
1+
import { styled } from 'styled-components';
22

33
export const GridLayout = styled.div`
44
display: grid;

packages/strapi-design-system/src/Layout/Layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import styled from 'styled-components';
1+
import { styled } from 'styled-components';
22

33
import { Box, BoxComponent } from '../Box';
44

packages/strapi-design-system/src/Link/Link.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22

33
import { ExternalLink } from '@strapi/icons';
4-
import styled from 'styled-components';
4+
import { styled } from 'styled-components';
55

66
import { BaseLink, BaseLinkProps } from '../BaseLink';
77
import { focus } from '../styles/buttons';

packages/strapi-design-system/src/LinkButton/LinkButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import styled from 'styled-components';
3+
import { styled } from 'styled-components';
44

55
import { BaseLink, BaseLinkProps } from '../BaseLink';
66
import { VARIANTS, BUTTON_SIZES } from '../Button/constants';

packages/strapi-design-system/src/Main/Main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import styled from 'styled-components';
1+
import { styled } from 'styled-components';
22

33
import { Box, BoxComponent, BoxProps } from '../Box';
44

packages/strapi-design-system/src/Main/SkipToContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import styled from 'styled-components';
1+
import { styled } from 'styled-components';
22

33
import { Box, BoxComponent } from '../Box';
44

0 commit comments

Comments
 (0)