>
- (
- first:
- | TemplateStringsArray
- | CSSObject
- | InterpolationFunction>,
- ...interpolations: Array>>
- ): FlattenInterpolation>
-}
-
-/* eslint-disable-next-line func-names */
-const FoundationCSS: FoundationCSSInterface = baseCSS
-
-function useFoundation() {
- return useContext(FoundationContext)
-}
-
-type GlobalStyleProp = {
- global?: CSSObject
-}
-
-type FoundationWithGlobalStyle = Foundation & GlobalStyleProp
-interface CreateFoundationGlobalStyle {
- (
- first:
- | TemplateStringsArray
- | CSSObject
- | InterpolationFunction>,
- ...interpolations: Array>>
- ): GlobalStyleComponent<
- // @ts-ignore
- P & { foundation: FoundationWithGlobalStyle },
- ThemedStyledProps
- >
-}
-
-/* eslint-disable-next-line func-names */ /* @ts-ignore */
-const createFoundationGlobalStyle: CreateFoundationGlobalStyle = baseCreateGlobalStyle
-
-export type {
- GlobalStyleProp,
-}
-
-export {
- createFoundationGlobalStyle as createGlobalStyle,
- FoundationStyled as styled,
- FoundationCSS as css,
- FoundationProvider,
- useFoundation,
- keyframes,
- StyleSheetManager,
- ServerStyleSheet,
-}
diff --git a/packages/bezier-react/src/foundation/GlobalStyle.tsx b/packages/bezier-react/src/foundation/GlobalStyle.tsx
deleted file mode 100644
index 532296b27c..0000000000
--- a/packages/bezier-react/src/foundation/GlobalStyle.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-import {
- createGlobalStyle,
- css,
-} from './FoundationStyledComponent'
-
-export const GlobalStyle = createGlobalStyle`
- html {
- font-size: 62.5%; // 10/16 = 0.625
- }
-
- ${({ foundation }) => {
- const globalStyleObject = foundation?.global
- if (!globalStyleObject) {
- return undefined
- }
-
- return css(globalStyleObject)
- }}
-`
diff --git a/packages/bezier-react/src/foundation/Mixin.test.tsx b/packages/bezier-react/src/foundation/Mixin.test.tsx
deleted file mode 100644
index 7f5f222bfc..0000000000
--- a/packages/bezier-react/src/foundation/Mixin.test.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import React from 'react'
-
-import { render } from '~/src/utils/test'
-
-import {
- css,
- styled,
-} from './FoundationStyledComponent'
-import { ellipsis } from './Mixins'
-
-const ELLIPSIS_TEST_ID = 'bezier-react-ellipsis'
-
-describe('Mixin test >', () => {
- describe('ellipsis test >', () => {
- it('return 1 line ellipsis without parameter', () => {
- const style = ellipsis()
- expect(style).toEqual(css`
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- `)
- })
-
- it('return 1 line ellipsis when line is 1', () => {
- const style = ellipsis(1)
- expect(style).toEqual(css`
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- `)
- })
-
- it('If lineHeight does not exist when line is more than 1, console.warn called and return empty style', () => {
- const spyConsole = jest.spyOn(console, 'warn').mockImplementation()
- // @ts-ignore
- const style = ellipsis(5)
- expect(spyConsole).toHaveBeenCalled()
- expect(style).toEqual(css``)
- })
-
- it('return multiline style when line is more than 1 and lineHeight exist', () => {
- const Element = styled.div`
- ${ellipsis(5, 10)}
- `
- const { getByTestId } = render()
- const renderedComponent = getByTestId(ELLIPSIS_TEST_ID)
- expect(renderedComponent).toHaveStyle(`
- display: -webkit-box;
- max-height: 50rem;
- overflow: hidden;
- line-height: 10rem;
- text-overflow: ellipsis;
- `)
- })
- })
-})
diff --git a/packages/bezier-react/src/foundation/Mixins.ts b/packages/bezier-react/src/foundation/Mixins.ts
deleted file mode 100644
index 66e915f877..0000000000
--- a/packages/bezier-react/src/foundation/Mixins.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-import type { SimpleInterpolation } from 'styled-components'
-
-import { isNil } from '~/src/utils/type'
-
-import { css } from './FoundationStyledComponent'
-
-export const absoluteCenter = (otherTransforms?: SimpleInterpolation) => css`
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%) ${otherTransforms};
-`
-
-export const disableAutoMinimum = css`
- min-width: 0;
- min-height: 0;
-`
-
-export const hideScrollbars = () => css`
- -ms-overflow-style: none;
-
- &::-webkit-scrollbar {
- display: none;
- }
-`
-
-/* line이 1이거나 undefined일때는 lineheight가 optional이지만, 1보다 큰 숫자일 경우 lineHeight를 명시하도록 합니다. */
-type One = 1
-export function ellipsis(line?: undefined, lineHeight?: undefined): ReturnType
-export function ellipsis(line?: One, lineHeight?: undefined): ReturnType
-export function ellipsis(line: number, lineHeight: number): ReturnType
-export function ellipsis(line?: number, lineHeight?: number): ReturnType {
- if (isNil(line) || line <= 1) {
- return css`
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- `
- }
-
- if (isNil(lineHeight)) {
- // eslint-disable-next-line no-console
- console.warn('lineHeight required')
- return css``
- }
-
- /* stylelint-disable value-no-vendor-prefix, property-no-vendor-prefix */
- return css`
- display: -webkit-box;
- max-height: ${(line * lineHeight)}rem;
- overflow: hidden;
- line-height: ${lineHeight}rem;
- text-overflow: ellipsis;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: ${line};
- `
- /* stylelint-enable value-no-vendor-prefix, property-no-vendor-prefix */
-}
diff --git a/packages/bezier-react/src/foundation/Rounding/Rounding.stories.tsx b/packages/bezier-react/src/foundation/Rounding/Rounding.stories.tsx
deleted file mode 100644
index 57cf01ca7c..0000000000
--- a/packages/bezier-react/src/foundation/Rounding/Rounding.stories.tsx
+++ /dev/null
@@ -1,53 +0,0 @@
-import React from 'react'
-
-import {
- type Meta,
- type StoryFn,
-} from '@storybook/react'
-
-import { styled } from '~/src/foundation'
-
-const meta: Meta = {
- title: 'Foundation/Rounding',
- argTypes: {
- round: {
- control: {
- type: 'radio',
- },
- options: [
- 'round3',
- 'round4',
- 'round6',
- 'round8',
- 'round12',
- 'round16',
- 'round20',
- 'round32',
- ],
- },
- },
-}
-export default meta
-
-interface RoundingChipProps {
- round: string
-}
-
-const RoundingChip = styled.div`
- width: 100px;
- height: 100px;
- ${({ foundation, round }) => foundation?.rounding?.[round]};
- ${({ foundation }) => foundation?.elevation?.ev3()};
-`
-
-const Template: StoryFn = (args) => (
-
-)
-
-export const Primary = {
- render: Template,
-
- args: {
- round: 'round4',
- },
-}
diff --git a/packages/bezier-react/src/foundation/Rounding/index.ts b/packages/bezier-react/src/foundation/Rounding/index.ts
deleted file mode 100644
index dc40c8fcce..0000000000
--- a/packages/bezier-react/src/foundation/Rounding/index.ts
+++ /dev/null
@@ -1,75 +0,0 @@
-import { css } from '~/src/foundation/FoundationStyledComponent'
-
-const DefaultRoundStyle = css`
- overflow: hidden;
-`
-
-export enum RoundAbsoluteNumber {
- R1 = 1,
- R3 = 3,
- R4 = 4,
- R6 = 6,
- R8 = 8,
- R12 = 12,
- R16 = 16,
- R20 = 20,
- R32 = 32,
-}
-
-const round1 = css`
- ${DefaultRoundStyle};
- border-radius: ${RoundAbsoluteNumber.R1}px;
-`
-
-const round3 = css`
- ${DefaultRoundStyle};
- border-radius: ${RoundAbsoluteNumber.R3}px;
-`
-
-const round4 = css`
- ${DefaultRoundStyle};
- border-radius: ${RoundAbsoluteNumber.R4}px;
-`
-
-const round6 = css`
- ${DefaultRoundStyle};
- border-radius: ${RoundAbsoluteNumber.R6}px;
-`
-
-const round8 = css`
- ${DefaultRoundStyle};
- border-radius: ${RoundAbsoluteNumber.R8}px;
-`
-
-const round12 = css`
- ${DefaultRoundStyle};
- border-radius: ${RoundAbsoluteNumber.R12}px;
-`
-
-const round16 = css`
- ${DefaultRoundStyle};
- border-radius: ${RoundAbsoluteNumber.R16}px;
-`
-
-const round20 = css`
- ${DefaultRoundStyle};
- border-radius: ${RoundAbsoluteNumber.R20}px;
-`
-
-const round32 = css`
- ${DefaultRoundStyle};
- border-radius: ${RoundAbsoluteNumber.R32}px;
-`
-
-export const Rounding = {
- DefaultRoundStyle,
- round1,
- round3,
- round4,
- round6,
- round8,
- round12,
- round16,
- round20,
- round32,
-}
diff --git a/packages/bezier-react/src/foundation/Spacing/Spacing.stories.tsx b/packages/bezier-react/src/foundation/Spacing/Spacing.stories.tsx
deleted file mode 100644
index 13b57685f8..0000000000
--- a/packages/bezier-react/src/foundation/Spacing/Spacing.stories.tsx
+++ /dev/null
@@ -1,89 +0,0 @@
-import React from 'react'
-
-import {
- type Meta,
- type StoryFn,
-} from '@storybook/react'
-
-import {
- Spacing,
- styled,
-} from '~/src/foundation'
-
-import { type Entries } from '~/src/types/Utils'
-
-import { Text } from '~/src/components/Text'
-
-const meta:Meta = {
- title: 'Foundation/Spacing',
-}
-export default meta
-
-interface SpacingRectProps {
- spacing: keyof typeof Spacing
-}
-
-const Wrapper = styled.div`
- > * + * {
- padding-top: 6px;
- margin-top: 6px;
- ${({ foundation }) => foundation?.border.getBorder(
- 1,
- foundation?.theme?.['bdr-black-light'],
- {
- top: true, right: false, bottom: false, left: false,
- })}
- }
-`
-
-const Cell = styled.div`
- width: 100px;
-`
-
-const Row = styled.div`
- display: flex;
- align-items: center;
-
- & > * + * {
- margin-left: 20px;
- }
-`
-
-const SpacingRect = styled.div`
- width: ${({ foundation, spacing }) => foundation?.spacing?.[spacing]};
- height: 8px;
- background-color: ${({ foundation }) => foundation?.theme?.['bgtxt-blue-normal']};
-`
-
-const Template: StoryFn = () => (
-
-
-
- Name
- |
-
- Space
- |
-
- Pixels
- |
-
- { (Object.entries(Spacing) as Entries).map(([key, value]) => (
-
-
- { key }
- |
-
- { value }
- |
-
-
- |
-
- )) }
-
-)
-
-export const Primary = {
- render: Template,
-}
diff --git a/packages/bezier-react/src/foundation/Spacing/index.ts b/packages/bezier-react/src/foundation/Spacing/index.ts
deleted file mode 100644
index e0686c0eb5..0000000000
--- a/packages/bezier-react/src/foundation/Spacing/index.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-export const Spacing = {
- s1: '2px',
- s2: '4px',
- s3: '6px',
- s4: '8px',
- s5: '12px',
- s6: '16px',
- s7: '20px',
- s8: '24px',
- s9: '30px',
- s10: '44px',
-}
diff --git a/packages/bezier-react/src/foundation/ThemeVars.ts b/packages/bezier-react/src/foundation/ThemeVars.ts
deleted file mode 100644
index 3eb0c62e83..0000000000
--- a/packages/bezier-react/src/foundation/ThemeVars.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { type AnyStyledComponent } from 'styled-components'
-
-import { isEmpty } from '~/src/utils/type'
-
-import { createGlobalStyle } from './FoundationStyledComponent'
-
-type ThemeRecord = Record
-
-export interface ThemeVarsAdditionalType {
- scope?: AnyStyledComponent | string
-}
-
-function generateCSSVar(theme?: ThemeRecord, prefix?: string) {
- if (!theme) { return undefined }
- const prefixString = !isEmpty(prefix) ? `${prefix}-` : ''
- return Object.entries(theme).reduce((varObj, [key, color]) => ({
- ...varObj,
- [`--${prefixString}${key}`]: color,
- }), {} as ThemeRecord)
-}
-
-export const ThemeVars = createGlobalStyle`
- ${({ scope }) => scope ?? ':root, :host'} {
- ${({ foundation }) => generateCSSVar(foundation?.theme)}
- ${({ foundation }) => generateCSSVar(foundation?.subTheme, 'inverted')}
- }
-`
diff --git a/packages/bezier-react/src/foundation/Transition/Transition.stories.tsx b/packages/bezier-react/src/foundation/Transition/Transition.stories.tsx
deleted file mode 100644
index b137917467..0000000000
--- a/packages/bezier-react/src/foundation/Transition/Transition.stories.tsx
+++ /dev/null
@@ -1,129 +0,0 @@
-import React, {
- useCallback,
- useMemo,
- useState,
-} from 'react'
-
-import {
- type Meta,
- type StoryFn,
-} from '@storybook/react'
-
-import { styled } from '~/src/foundation'
-
-const meta: Meta = {
- title: 'Foundation/Transition',
- argTypes: {
- property: {
- control: {
- type: 'radio',
- },
- options: [
- 'top',
- 'right',
- 'bottom',
- 'left',
- ],
- },
- },
-}
-export default meta
-
-const ElementWrapper = styled.div`
- position: relative;
- width: 300px;
- height: 300px;
- overflow: hidden;
- border: 1px solid red;
-`
-
-interface ElementProps {
- top?: number
- right?: number
- bottom?: number
- left?: number
-}
-
-const Element = styled.div.attrs(
- ({ top, right, bottom, left }) => ({
- style: {
- top,
- right,
- bottom,
- left,
- },
- }),
-)`
- position: absolute;
- width: 100px;
- height: 100px;
- background-color: lightgray;
- border-radius: 4px;
- ${({ foundation }) => foundation?.transition?.getTransitionsCSS(
- ['top', 'right', 'bottom', 'left'],
- foundation?.transition?.TransitionDuration.M,
- )};
-`
-
-const Template: StoryFn<{ property: keyof ElementProps }> = (args) => {
- const [isEntered, setIsEntered] = useState(false)
-
- const handleClick = useCallback(() => setIsEntered(prevEntered => !prevEntered), [])
-
- const props: {
- top?: number
- right?: number
- bottom?: number
- left?: number
- } = useMemo(() => {
- // eslint-disable-next-line react/destructuring-assignment
- switch (args.property) {
- case 'top':
- return {
- top: isEntered ? 100 : -100,
- left: 100,
- }
- case 'right':
- return {
- right: isEntered ? 100 : -100,
- top: 100,
- }
- case 'bottom':
- return {
- bottom: isEntered ? 100 : -100,
- left: 100,
- }
- case 'left':
- default:
- return {
- left: isEntered ? 100 : -100,
- top: 100,
- }
- }
- }, [
- args,
- isEntered,
- ])
-
- return (
- <>
-
- { /* @ts-ignore */ }
-
-
-
- >
- )
-}
-
-export const Top = {
- render: Template,
-
- args: {
- property: 'top',
- },
-}
diff --git a/packages/bezier-react/src/foundation/Transition/index.ts b/packages/bezier-react/src/foundation/Transition/index.ts
deleted file mode 100644
index 9332581f5a..0000000000
--- a/packages/bezier-react/src/foundation/Transition/index.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import { isArray } from '~/src/utils/type'
-
-// eslint-disable-next-line no-restricted-imports
-import { css } from '../FoundationStyledComponent'
-
-export enum TransitionDuration {
- S = 150,
- M = 300,
- L = 500,
-}
-
-const TransitionEasing = 'cubic-bezier(.3,0,0,1)'
-
-function getTransitionsCSS(
- transitionProperties: string | string[],
- duration: TransitionDuration = TransitionDuration.S,
- delay: number = 0,
-) {
- const properties = (
- isArray(transitionProperties)
- ? transitionProperties.join(', ')
- : transitionProperties
- )
-
- return css`
- transition-delay: ${delay}ms;
- transition-timing-function: ${TransitionEasing};
- transition-duration: ${duration}ms;
- transition-property: ${properties};
- `
-}
-
-export const Transition = {
- TransitionEasing,
- TransitionDuration,
- getTransitionsCSS,
-}
diff --git a/packages/bezier-react/src/foundation/Typography.mdx b/packages/bezier-react/src/foundation/Typography.mdx
deleted file mode 100644
index a2d2566904..0000000000
--- a/packages/bezier-react/src/foundation/Typography.mdx
+++ /dev/null
@@ -1,147 +0,0 @@
-import {
- Story,
-} from '@storybook/addon-docs'
-
-# Typography
-
-## Overview
-
-**타이포그라피는 디자인 시스템을 구성하는 가장 기본적인 요소 중 하나입니다.**
-
-디자인 시스템에서 제공하는 컴포넌트를 구성하는 텍스트의 속성은 타이포그라피를 통해 정의되어야 합니다.
-또한, 디자인 시스템을 사용하는 어플리케이션의 텍스트 또한 타이포그라피의 규칙을 따라야 합니다.
-
-- `bezier-react`의 타이포그라피는 텍스트의 크기, Line height, Letter spacing을 조절합니다.
-- 텍스트의 font face, weight, line length 와 같은 property에는 영향을 미치지 않습니다.
-
-
-
-## Usage
-
-### Text
-
-보통의 경우, `Typography`를 직접 사용하지 않아도 됩니다.
-
-베지어 디자인 시스템의 typography를 제공하는 컴포넌트인, `Text`를 사용하여 UI를 구성합니다.
-`Text` 컴포넌트를 사용할 때는, `Typography`의 속성을 prop으로 전달합니다.
-
-
-
-```tsx
-import {
- Text,
- Typography,
-} from '@channel.io/bezier-react'
-
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent bibendum elit erat, eu euismod odio tincidunt vel. Nulla non consequat ligula. Nulla quis justo at enim sodales aliquet. Proin placerat varius elit, et molestie erat ornare ut. Ut pharetra ultrices lacus. Morbi vehicula auctor lectus ac convallis. Etiam scelerisque feugiat lectus, nec gravida enim mollis eu. Cras ut urna imperdiet, blandit nisi nec, auctor ipsum. Aliquam eu nisl tellus. Phasellus non porta dui. Pellentesque fringilla enim ut volutpat commodo. In hac habitasse platea dictumst.
-
-```
-
-### Interpolation
-
-`Typography` export의 각 속성은 `FlattenedSimpleInterpolation` 타입을 가집니다.
-
-이는 원하는 `Typography`를 `styled-components`에서 사용할 수 있도록 합니다.
-
-
-
-```tsx
-import {
- Typography,
-} from '@channel.io/bezier-react'
-
-const Code = styled.code`
- ${Typography.Size13}
-`
-
-
- ...
-
-```
-
-그러나, 단순한 케이스의 경우 `Typography`를 interpolation을 통해 주입하여 사용하기보다
-`Text` 컴포넌트의 `typo` prop과 함께 사용하는 것을 권장합니다.
-
-```tsx
-// DON'T ❌
-const Code = styled.code`
- ${Typography.Size13}
-`
-
-
- { ... }
-
-
-// DO ✅
-
- { ... }
-
-```
-
-특정 element의 child element에 같은 typography 를 적용하고 싶은 경우,
-`Typography`를 interpolation의 형태로 사용할 수 있습니다.
-
-```tsx
-const Document = styled.div`
- ${Typography.Size15}
-`
-
-
- Paragraph one.
- Paragraph two.
- Some other text.
-
-`
-```
-
-### Global control
-
-`bezier-react`의 타이포그라피는 document 전체의 font size와 상대적으로 적용됩니다.
-
-보통의 경우, 이는 `font-size: 62.5%`로 지정되어 있습니다.
-즉, `bezier-react`에서 제공하는 global style을 따라가면 (font size가 기본적으로 `16px`인 대부분의 브라우저에서) 10px의 기본 크기를 가집니다.
-따라서, 각 `Typography`의 텍스트 크기는 이름과 동일한 `px`값이 됩니다. (`Typography.Size15`가 정의하는 텍스트의 `font-size`는 `15px`)
-
-전체적으로 텍스트 크기의 조정을 원하는 경우, document 전체의 font size를 조절할 수 있습니다.
-
-```css
-/* Override global font size */
-html {
- font-size: 16px;
-}
-```
-
-## API
-
-
-Typography
-
-```ts
-import { type FlattenedSimpleInterpolation } from '@channel.io/bezier-react'
-
-declare const Typography: {
- Size11: FlattenedSimpleInterpolation
- Size12: FlattenedSimpleInterpolation
- Size13: FlattenedSimpleInterpolation
- Size14: FlattenedSimpleInterpolation
- Size15: FlattenedSimpleInterpolation
- Size16: FlattenedSimpleInterpolation
- Size17: FlattenedSimpleInterpolation
- Size18: FlattenedSimpleInterpolation
- Size22: FlattenedSimpleInterpolation
- Size24: FlattenedSimpleInterpolation
-}
-```
-
-
-
-## Version
-
-- Available since v0.1.0
diff --git a/packages/bezier-react/src/foundation/Typography.stories.tsx b/packages/bezier-react/src/foundation/Typography.stories.tsx
deleted file mode 100644
index f23d9acbaa..0000000000
--- a/packages/bezier-react/src/foundation/Typography.stories.tsx
+++ /dev/null
@@ -1,156 +0,0 @@
-import React from 'react'
-
-import {
- type Meta,
- type StoryFn,
- type StoryObj,
-} from '@storybook/react'
-
-import { styled } from '~/src/foundation'
-
-import {
- LegacyStackItem,
- LegacyVStack,
-} from '~/src/components/LegacyStack'
-import { Text } from '~/src/components/Text'
-
-import { Typography } from './Typography'
-import mdx from './Typography.mdx'
-
-const meta: Meta = {
- title: 'Foundation/Typography',
- parameters: {
- docs: {
- page: mdx,
- },
- },
- argTypes: {
- typography: {
- control: {
- type: 'radio',
- },
- options: Object.keys(Typography),
- },
- },
-}
-export default meta
-
-const Span = styled.span<{ typography: keyof typeof Typography }>`
- ${({ typography }) => Typography[typography]}
-`
-
-export const Primary: StoryObj<{
- typography: keyof typeof Typography
-}> = {
- render: ({ typography }) => (
-
- Channel.io, an all-in-one business solution.
-
- ),
-
- args: {
- typography: 'Size13',
- },
-}
-
-export const Overview: StoryFn<{}> = () => (
-
-
-
- 11Aa한글 11Aa한글
-
-
-
-
- 12Aa한글 12Aa한글
-
-
-
-
- 13Aa한글 13Aa한글
-
-
-
-
- 14Aa한글 14Aa한글
-
-
-
-
- 15Aa한글 15Aa한글
-
-
-
-
- 16Aa한글 16Aa한글
-
-
-
-
- 17Aa한글 17Aa한글
-
-
-
-
- 18Aa한글 18Aa한글
-
-
-
-
- 22Aa한글 22Aa한글
-
-
-
-
- 24Aa한글 24Aa한글
-
-
-
-)
-
-export const UsageText: StoryObj<{}> = {
- render: () => (
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent bibendum
- elit erat, eu euismod odio tincidunt vel. Nulla non consequat ligula.
- Nulla quis justo at enim sodales aliquet. Proin placerat varius elit, et
- molestie erat ornare ut. Ut pharetra ultrices lacus. Morbi vehicula auctor
- lectus ac convallis. Etiam scelerisque feugiat lectus, nec gravida enim
- mollis eu. Cras ut urna imperdiet, blandit nisi nec, auctor ipsum. Aliquam
- eu nisl tellus. Phasellus non porta dui. Pellentesque fringilla enim ut
- volutpat commodo. In hac habitasse platea dictumst.
-
- ),
-
- name: 'Usage (via Text)',
-}
diff --git a/packages/bezier-react/src/foundation/Typography.ts b/packages/bezier-react/src/foundation/Typography.ts
deleted file mode 100644
index 893c00b98b..0000000000
--- a/packages/bezier-react/src/foundation/Typography.ts
+++ /dev/null
@@ -1,112 +0,0 @@
-import { css } from './FoundationStyledComponent'
-
-export enum TypoAbsoluteNumber {
- Typo11 = 1.1,
- Typo12 = 1.2,
- Typo13 = 1.3,
- Typo14 = 1.4,
- Typo15 = 1.5,
- Typo16 = 1.6,
- Typo17 = 1.7,
- Typo18 = 1.8,
- Typo22 = 2.2,
- Typo24 = 2.4,
- Typo30 = 3.0,
- Typo36 = 3.6,
-}
-
-export enum LineHeightAbsoluteNumber {
- Lh16 = 1.6,
- Lh18 = 1.8,
- Lh20 = 2.0,
- Lh22 = 2.2,
- Lh24 = 2.4,
- Lh28 = 2.8,
- Lh32 = 3.2,
- Lh36 = 3.6,
- Lh44 = 4.4,
-}
-
-const Size11 = css`
- font-size: ${TypoAbsoluteNumber.Typo11}rem;
- line-height: ${LineHeightAbsoluteNumber.Lh16}rem;
-`
-
-const Size12 = css`
- font-size: ${TypoAbsoluteNumber.Typo12}rem;
- line-height: ${LineHeightAbsoluteNumber.Lh16}rem;
-`
-
-const Size13 = css`
- font-size: ${TypoAbsoluteNumber.Typo13}rem;
- line-height: ${LineHeightAbsoluteNumber.Lh18}rem;
-`
-
-const Size14 = css`
- font-size: ${TypoAbsoluteNumber.Typo14}rem;
- line-height: ${LineHeightAbsoluteNumber.Lh18}rem;
-`
-
-const Size15 = css`
- font-size: ${TypoAbsoluteNumber.Typo15}rem;
- line-height: ${LineHeightAbsoluteNumber.Lh20}rem;
- letter-spacing: -0.1px;
-`
-
-const Size16 = css`
- font-size: ${TypoAbsoluteNumber.Typo16}rem;
- line-height: ${LineHeightAbsoluteNumber.Lh22}rem;
- letter-spacing: -0.1px;
-`
-
-const Size17 = css`
- font-size: ${TypoAbsoluteNumber.Typo17}rem;
- line-height: ${LineHeightAbsoluteNumber.Lh22}rem;
- letter-spacing: -0.1px;
-`
-
-const Size18 = css`
- font-size: ${TypoAbsoluteNumber.Typo18}rem;
- line-height: ${LineHeightAbsoluteNumber.Lh24}rem;
-`
-
-const Size22 = css`
- font-size: ${TypoAbsoluteNumber.Typo22}rem;
- line-height: ${LineHeightAbsoluteNumber.Lh28}rem;
- letter-spacing: -0.4px;
-`
-
-const Size24 = css`
- font-size: ${TypoAbsoluteNumber.Typo24}rem;
- line-height: ${LineHeightAbsoluteNumber.Lh32}rem;
- letter-spacing: -0.4px;
-`
-
-const Size30 = css`
- font-size: ${TypoAbsoluteNumber.Typo30}rem;
- line-height: ${LineHeightAbsoluteNumber.Lh36}rem;
- letter-spacing: -0.4px;
-`
-
-const Size36 = css`
- font-size: ${TypoAbsoluteNumber.Typo36}rem;
- line-height: ${LineHeightAbsoluteNumber.Lh44}rem;
- letter-spacing: -0.4px;
-`
-
-export type TypographyType = ReturnType
-
-export const Typography = {
- Size11,
- Size12,
- Size13,
- Size14,
- Size15,
- Size16,
- Size17,
- Size18,
- Size22,
- Size24,
- Size30,
- Size36,
-}
diff --git a/packages/bezier-react/src/foundation/index.ts b/packages/bezier-react/src/foundation/index.ts
deleted file mode 100644
index 20c4a1fc48..0000000000
--- a/packages/bezier-react/src/foundation/index.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-// Preset
-export * from './BaseFoundation'
-
-// Foundations
-export * from './Spacing'
-export * from './Elevation'
-export * from './Colors'
-export * from './Rounding'
-export * from './Transition'
-export * from './Border'
-export * from './Typography'
-export * from './Mixins'
-
-// Theme
-export * from './ThemeVars'
-
-// Themed Styled Component, Interface
-export * from './GlobalStyle'
-export * from './Foundation'
-export * from './FoundationStyledComponent'
diff --git a/packages/bezier-react/src/foundation/utils/domElements.ts b/packages/bezier-react/src/foundation/utils/domElements.ts
deleted file mode 100644
index 2aada9ea9b..0000000000
--- a/packages/bezier-react/src/foundation/utils/domElements.ts
+++ /dev/null
@@ -1,139 +0,0 @@
-export default [
- 'a',
- 'abbr',
- 'address',
- 'area',
- 'article',
- 'aside',
- 'audio',
- 'b',
- 'base',
- 'bdi',
- 'bdo',
- 'big',
- 'blockquote',
- 'body',
- 'br',
- 'button',
- 'canvas',
- 'caption',
- 'cite',
- 'code',
- 'col',
- 'colgroup',
- 'data',
- 'datalist',
- 'dd',
- 'del',
- 'details',
- 'dfn',
- 'dialog',
- 'div',
- 'dl',
- 'dt',
- 'em',
- 'embed',
- 'fieldset',
- 'figcaption',
- 'figure',
- 'footer',
- 'form',
- 'h1',
- 'h2',
- 'h3',
- 'h4',
- 'h5',
- 'h6',
- 'head',
- 'header',
- 'hgroup',
- 'hr',
- 'html',
- 'i',
- 'iframe',
- 'img',
- 'input',
- 'ins',
- 'kbd',
- 'keygen',
- 'label',
- 'legend',
- 'li',
- 'link',
- 'main',
- 'map',
- 'mark',
- 'marquee',
- 'menu',
- 'menuitem',
- 'meta',
- 'meter',
- 'nav',
- 'noscript',
- 'object',
- 'ol',
- 'optgroup',
- 'option',
- 'output',
- 'p',
- 'param',
- 'picture',
- 'pre',
- 'progress',
- 'q',
- 'rp',
- 'rt',
- 'ruby',
- 's',
- 'samp',
- 'script',
- 'section',
- 'select',
- 'small',
- 'source',
- 'span',
- 'strong',
- 'style',
- 'sub',
- 'summary',
- 'sup',
- 'table',
- 'tbody',
- 'td',
- 'textarea',
- 'tfoot',
- 'th',
- 'thead',
- 'time',
- 'title',
- 'tr',
- 'track',
- 'u',
- 'ul',
- 'var',
- 'video',
- 'wbr',
-
- // SVG
- 'circle',
- 'clipPath',
- 'defs',
- 'ellipse',
- 'foreignObject',
- 'g',
- 'image',
- 'line',
- 'linearGradient',
- 'marker',
- 'mask',
- 'path',
- 'pattern',
- 'polygon',
- 'polyline',
- 'radialGradient',
- 'rect',
- 'stop',
- 'svg',
- 'text',
- 'tspan',
-]
diff --git a/packages/bezier-react/src/index.ts b/packages/bezier-react/src/index.ts
index bb18213794..63d40834c5 100644
--- a/packages/bezier-react/src/index.ts
+++ b/packages/bezier-react/src/index.ts
@@ -1,25 +1,9 @@
import '~/src/styles/index.scss'
-/* Provider */
-export { default as BezierProvider } from '~/src/providers/BezierProvider'
export * from '~/src/providers/WindowProvider'
export * from '~/src/providers/AppProvider'
-export {
- useThemeName,
- useToken,
- ThemeProvider,
- LightThemeProvider,
- DarkThemeProvider,
- InvertedThemeProvider,
- type ThemeName,
- type ThemeProviderProps,
- type FixedThemeProviderProps,
-} from '~/src/providers/ThemeProvider'
+export * from '~/src/providers/ThemeProvider'
-/* Foundation */
-export * from '~/src/foundation'
-
-/* Components */
export * from '~/src/components/Box'
export * from '~/src/components/AutoFocus'
export * from '~/src/components/Avatars/Avatar'
@@ -38,7 +22,6 @@ export * from '~/src/components/Forms/FormControl'
export * from '~/src/components/Forms/FormGroup'
export * from '~/src/components/Forms/FormHelperText'
export * from '~/src/components/Forms/FormLabel'
-export * from '~/src/components/Forms/Inputs/mixins'
export * from '~/src/components/Forms/Inputs/Select'
export * from '~/src/components/Forms/Inputs/TextArea'
export * from '~/src/components/Forms/Inputs/TextField'
@@ -73,25 +56,16 @@ export * from '~/src/components/LegacyIcon'
export * from '~/src/components/LegacyStack'
export * from '~/src/components/LegacyTooltip'
-/* Types */
export * from '~/src/types/ComponentProps'
-export * from '~/src/types/Foundation'
export * from '~/src/types/Utils'
-// TODO: Remove namespace exports after removing Foundation type
-export * as Token from '~/src/types/Token'
-
-/* Constants */
-export { ZIndex } from '~/src/constants/ZIndex'
+export * from '~/src/types/Token'
-/* Hooks */
export { default as useEventHandler } from '~/src/hooks/useEventHandler'
export { default as useMergeRefs } from '~/src/hooks/useMergeRefs'
export { default as useId } from '~/src/hooks/useId'
-/* Utils */
export { getRootElement } from '~/src/utils/dom'
export * as StyleUtils from '~/src/utils/style'
export * as StringUtils from '~/src/utils/string'
-/* Features */
export * from '~/src/features'
diff --git a/packages/bezier-react/src/providers/AppProvider.tsx b/packages/bezier-react/src/providers/AppProvider.tsx
index 0ba9556e17..c442e5ee14 100644
--- a/packages/bezier-react/src/providers/AppProvider.tsx
+++ b/packages/bezier-react/src/providers/AppProvider.tsx
@@ -4,14 +4,12 @@ import {
type Feature,
FeatureProvider,
} from '~/src/features'
+import { type ThemeName } from '~/src/types/Token'
import { window as defaultWindow } from '~/src/utils/dom'
import { TooltipProvider } from '~/src/components/Tooltip'
-import {
- type ThemeName,
- TokenProvider,
-} from './ThemeProvider'
+import { TokenProvider } from './TokenProvider'
import { WindowProvider } from './WindowProvider'
export interface AppProviderProps {
diff --git a/packages/bezier-react/src/providers/BezierProvider.stories.tsx b/packages/bezier-react/src/providers/BezierProvider.stories.tsx
deleted file mode 100644
index 34bbe8c311..0000000000
--- a/packages/bezier-react/src/providers/BezierProvider.stories.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import React from 'react'
-
-import {
- type Meta,
- type StoryFn,
- type StoryObj,
-} from '@storybook/react'
-
-import {
- DarkFoundation,
- LightFoundation,
- styled,
-} from '~/src/foundation'
-
-import { Button } from '~/src/components/Button'
-import {
- ButtonColorVariant,
- ButtonSize,
- ButtonStyleVariant,
-} from '~/src/components/Button/Button.types'
-
-import BezierProvider from './BezierProvider'
-
-interface BezierProviderStorybookProps {
- foundation: 'dark' | 'light'
-}
-
-const meta: Meta = {
- component: BezierProvider,
- argTypes: {
- foundation: {
- control: {
- type: 'select',
- },
- options: ['light', 'dark'],
- },
- },
-}
-export default meta
-
-const ButtonWrapper = styled(Button)``
-
-const Template: StoryFn = ({ foundation }) => (
-
-
-
-)
-
-export const Primary: StoryObj = {
- render: Template,
-
- args: {
- foundation: 'light',
- },
-}
diff --git a/packages/bezier-react/src/providers/BezierProvider.tsx b/packages/bezier-react/src/providers/BezierProvider.tsx
deleted file mode 100644
index 69830b1c1b..0000000000
--- a/packages/bezier-react/src/providers/BezierProvider.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-import React from 'react'
-
-import {
- type Foundation,
- FoundationProvider,
- GlobalStyle,
- type GlobalStyleProp,
- ThemeVars,
- type ThemeVarsAdditionalType,
-} from '~/src/foundation'
-
-import { window as defaultWindow } from '~/src/utils/dom'
-
-import { TooltipProvider } from '~/src/components/Tooltip'
-
-import { WindowProvider } from './WindowProvider'
-
-interface BezierProviderProps {
- foundation: Foundation & GlobalStyleProp
- children: React.ReactNode
- themeVarsScope?: ThemeVarsAdditionalType['scope']
- externalWindow?: Window
-}
-
-/**
- * @deprecated Migration to `AlphaAppProvider` is in progress.
- */
-function BezierProvider({
- foundation,
- children,
- themeVarsScope,
- externalWindow = defaultWindow,
-}: BezierProviderProps) {
- return (
-
-
-
-
-
- { children }
-
-
-
- )
-}
-
-export default BezierProvider
diff --git a/packages/bezier-react/src/providers/ThemeProvider.tsx b/packages/bezier-react/src/providers/ThemeProvider.tsx
index 5a980b1c4d..c735ab368d 100644
--- a/packages/bezier-react/src/providers/ThemeProvider.tsx
+++ b/packages/bezier-react/src/providers/ThemeProvider.tsx
@@ -1,65 +1,12 @@
-import React, {
- forwardRef,
- useMemo,
-} from 'react'
+import React, { forwardRef } from 'react'
-import { tokens } from '@channel.io/bezier-tokens'
import { Slot } from '@radix-ui/react-slot'
-import { createContext } from '~/src/utils/react'
-
-type Tokens = typeof tokens
-type GlobalTokens = Tokens['global']
-type SemanticTokens = Omit
-
-interface ThemedTokenSet {
- global: GlobalTokens
- semantic: SemanticTokens[keyof SemanticTokens]
-}
-
-// TODO: Change theme name constant to import from bezier-tokens
-export type ThemeName = 'light' | 'dark'
-
-interface TokenContextValue {
- themeName: ThemeName
- tokens: ThemedTokenSet
-}
-
-const [TokenContextProvider, useTokenContext] = createContext(null, 'TokenProvider')
-
-const tokenSet: Record = Object.freeze({
- light: {
- global: tokens.global,
- semantic: tokens.lightTheme,
- },
- dark: {
- global: tokens.global,
- semantic: tokens.darkTheme,
- },
-})
-
-interface TokenProviderProps {
- themeName: ThemeName
- children: React.ReactNode
-}
-
-/**
- * @private For internal use only.
- */
-export function TokenProvider({
- themeName,
- children,
-}: TokenProviderProps) {
- return (
- ({
- themeName,
- tokens: tokenSet[themeName],
- }), [themeName])}
- >
- { children }
-
- )
-}
+import {
+ TokenProvider,
+ type TokenProviderProps,
+ useTokenContext,
+} from './TokenProvider'
/**
* `useThemeName` is a hook that returns the current theme name.
@@ -76,7 +23,7 @@ export function useToken() {
}
export interface ThemeProviderProps {
- themeName: ThemeName
+ themeName: TokenProviderProps['themeName']
children: React.ReactElement
}
diff --git a/packages/bezier-react/src/providers/TokenProvider.tsx b/packages/bezier-react/src/providers/TokenProvider.tsx
new file mode 100644
index 0000000000..5e9897a506
--- /dev/null
+++ b/packages/bezier-react/src/providers/TokenProvider.tsx
@@ -0,0 +1,58 @@
+import React, { useMemo } from 'react'
+
+import { tokens } from '@channel.io/bezier-tokens'
+
+import {
+ type GlobalToken,
+ type SemanticToken,
+ type ThemeName,
+} from '~/src/types/Token'
+import { createContext } from '~/src/utils/react'
+
+type ThemedTokenSet = {
+ global: GlobalToken
+ semantic: SemanticToken
+}
+
+interface TokenContextValue {
+ themeName: ThemeName
+ tokens: ThemedTokenSet
+}
+
+const [TokenContextProvider, useTokenContext] = createContext(null, 'TokenProvider')
+
+export { useTokenContext }
+
+const tokenSet: Record = Object.freeze({
+ light: {
+ global: tokens.global,
+ semantic: tokens.lightTheme,
+ },
+ dark: {
+ global: tokens.global,
+ semantic: tokens.darkTheme,
+ },
+})
+
+export interface TokenProviderProps {
+ themeName: ThemeName
+ children: React.ReactNode
+}
+
+/**
+ * @private For internal use only.
+ */
+export function TokenProvider({
+ themeName,
+ children,
+}: TokenProviderProps) {
+ return (
+ ({
+ themeName,
+ tokens: tokenSet[themeName],
+ }), [themeName])}
+ >
+ { children }
+
+ )
+}
diff --git a/packages/bezier-react/src/stories/ComponentConvention/PropsInterface.stories.mdx b/packages/bezier-react/src/stories/ComponentConvention/PropsInterface.stories.mdx
index e7e5c2aa4b..a58bd649a3 100644
--- a/packages/bezier-react/src/stories/ComponentConvention/PropsInterface.stories.mdx
+++ b/packages/bezier-react/src/stories/ComponentConvention/PropsInterface.stories.mdx
@@ -10,7 +10,6 @@ import {
TagIcon,
UsernameIcon,
} from '@channel.io/bezier-icons'
-import { css, Themes, Typography } from '~/src/foundation'
import { Badge, Tag, TagBadgeVariant } from '~/src/components/TagBadge'
import { Banner, BannerVariant } from '~/src/components/Banner'
import { Button, ButtonStyleVariant, ButtonColorVariant } from '~/src/components/Button'
diff --git a/packages/bezier-react/src/stories/ComponentConvention/Stories.stories.mdx b/packages/bezier-react/src/stories/ComponentConvention/Stories.stories.mdx
index 7cbaabeeb2..629529db94 100644
--- a/packages/bezier-react/src/stories/ComponentConvention/Stories.stories.mdx
+++ b/packages/bezier-react/src/stories/ComponentConvention/Stories.stories.mdx
@@ -1,16 +1,14 @@
import { Canvas, Story, Meta } from '@storybook/addon-docs'
-import {
- ArrowRightUpIcon,
+import {
+ ArrowRightUpIcon,
CommentIcon,
EditIcon,
- FaceSmileAddIcon,
- LinkIcon,
- MoreVerticalIcon,
- SplitRightIcon,
+ FaceSmileAddIcon,
+ LinkIcon,
+ MoreVerticalIcon,
+ SplitRightIcon,
} from '@channel.io/bezier-icons'
import { Button, ButtonColorVariant, ButtonStyleVariant } from '~/src/components/Button'
-import { Tooltip } from '~/src/components/Tooltip'
-import { css } from '~/src/foundation'
=
type AdditionalClassNameProps =
AdditionalProps
-type AdditionalInterpolationProps =
- AdditionalProps
-
/**
* @deprecated Migration to `AdditionalStylableProps` is in progress.
*/
export type AdditionalStylableProps =
AdditionalStyleProps &
- AdditionalClassNameProps &
- AdditionalInterpolationProps
+ AdditionalClassNameProps
export type AdditionalTestIdProps =
AdditionalProps
export type AdditionalColorProps =
- AdditionalProps
+ AdditionalProps
export interface ActivatableProps {
active?: boolean
diff --git a/packages/bezier-react/src/types/Foundation.ts b/packages/bezier-react/src/types/Foundation.ts
deleted file mode 100644
index 66b674f9f5..0000000000
--- a/packages/bezier-react/src/types/Foundation.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import {
- type Foundation,
- type css,
-} from '~/src/foundation'
-
-export interface FoundationProps {
- foundation?: Foundation
-}
-
-export type InjectedInterpolation = ReturnType
-
-export interface InterpolationProps {
- interpolation?: InjectedInterpolation
-}
diff --git a/packages/bezier-react/src/types/Token.ts b/packages/bezier-react/src/types/Token.ts
index 30512608f2..9b8cb08860 100644
--- a/packages/bezier-react/src/types/Token.ts
+++ b/packages/bezier-react/src/types/Token.ts
@@ -8,11 +8,14 @@ type RemovePrefix<
type StartsWithPrefix<
Prefix extends string,
Value extends string,
-// eslint-disable-next-line @typescript-eslint/no-unused-vars
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
> = Value extends `${Prefix}-${infer Rest}` ? Value : never
type ExtractKeys = T extends Record ? K : never
+// TODO: Change theme name constant to import from bezier-tokens
+export type ThemeName = 'light' | 'dark'
+
export type GlobalToken = typeof tokens.global
export type SemanticToken = typeof tokens.lightTheme | typeof tokens.darkTheme
diff --git a/packages/bezier-react/src/utils/props.ts b/packages/bezier-react/src/utils/props.ts
index 189fbaa511..315ca40407 100644
--- a/packages/bezier-react/src/utils/props.ts
+++ b/packages/bezier-react/src/utils/props.ts
@@ -32,7 +32,6 @@ export const splitByBezierComponentProps = <
testId,
style,
className,
- interpolation,
...rest
}: Props): [BezierComponentProps, Omit] => [
{
@@ -40,7 +39,6 @@ export const splitByBezierComponentProps = <
testId,
style,
className,
- interpolation,
},
rest,
]
diff --git a/packages/bezier-react/src/utils/style.ts b/packages/bezier-react/src/utils/style.ts
index 7b6a845758..abf5c02ae0 100644
--- a/packages/bezier-react/src/utils/style.ts
+++ b/packages/bezier-react/src/utils/style.ts
@@ -1,50 +1,9 @@
-import { css } from '~/src/foundation'
-
-import { type InjectedInterpolation } from '~/src/types/Foundation'
import { type FlattenAllToken } from '~/src/types/Token'
import {
isNil,
isString,
} from '~/src/utils/type'
-/**
- * @deprecated
- */
-export function gap(spacing: number): InjectedInterpolation {
- return css`
- gap: ${spacing}px;
-
- @supports not(gap: ${spacing}px) {
- margin-top: ${-spacing}px;
- margin-left: ${-spacing}px;
-
- > * {
- margin-top: ${spacing}px;
- margin-left: ${spacing}px;
- }
- }
- `
-}
-
-/**
- * @deprecated
- */
-export function touchableHover(interpolation: InjectedInterpolation): InjectedInterpolation {
- return css`
- @media (hover: hover) {
- &:hover {
- ${interpolation}
- }
- }
-
- @media (hover: none) {
- &:active {
- ${interpolation}
- }
- }
- `
-}
-
export function px(value?: Value) {
if (isNil(value)) {
return undefined
diff --git a/packages/bezier-react/src/utils/test.tsx b/packages/bezier-react/src/utils/test.tsx
index c455e25706..305b0c987b 100644
--- a/packages/bezier-react/src/utils/test.tsx
+++ b/packages/bezier-react/src/utils/test.tsx
@@ -5,18 +5,13 @@ import {
renderHook as baseRenderHook,
} from '@testing-library/react'
-import { LightFoundation } from '~/src/foundation'
-
import { AppProvider } from '~/src/providers/AppProvider'
-import BezierProvider from '~/src/providers/BezierProvider'
import { type ChildrenProps } from '~/src/types/ComponentProps'
-function TestProviders({ children }: ChildrenProps) {
+function TestProvider({ children }: ChildrenProps) {
return (
-
- { children }
-
+ { children }
)
}
@@ -26,7 +21,7 @@ export function render(
options?: Parameters[1],
) {
return baseRender(ui, {
- wrapper: TestProviders,
+ wrapper: TestProvider,
...options,
legacyRoot: false,
})
@@ -42,7 +37,7 @@ export function renderHook(
options?: RenderHookOptions,
) {
return baseRenderHook(hook, {
- wrapper: TestProviders,
+ wrapper: TestProvider,
...options,
})
}
diff --git a/packages/bezier-react/tsconfig.build.json b/packages/bezier-react/tsconfig.build.json
index 8935396c6e..40ece8182a 100644
--- a/packages/bezier-react/tsconfig.build.json
+++ b/packages/bezier-react/tsconfig.build.json
@@ -1,11 +1,12 @@
{
"extends": "./tsconfig.json",
+ "include": ["src/**/*"],
"exclude": [
"**/*.stories.tsx",
"**/*.test.ts",
"**/*.test.tsx",
- "./src/utils/test.tsx",
- "./src/utils/story.ts",
+ "src/utils/test.tsx",
+ "src/utils/story.ts",
],
"compilerOptions": {
"outDir": "dist/types",
diff --git a/packages/bezier-react/tsconfig.eslint.json b/packages/bezier-react/tsconfig.eslint.json
index c1e556d3a1..0d2ebeb661 100644
--- a/packages/bezier-react/tsconfig.eslint.json
+++ b/packages/bezier-react/tsconfig.eslint.json
@@ -1,9 +1,12 @@
{
- "extends": "tsconfig/eslint.json",
+ "extends": "./tsconfig.json",
"include": [
"src/**/*",
+ ".storybook/**/*",
"*.ts",
+ "*.tsx",
"*.js",
+ "*.jsx",
".*.js",
"*.mjs",
],
diff --git a/packages/bezier-react/tsconfig.json b/packages/bezier-react/tsconfig.json
index 06c29c7306..8b62024762 100644
--- a/packages/bezier-react/tsconfig.json
+++ b/packages/bezier-react/tsconfig.json
@@ -1,6 +1,5 @@
{
"compilerOptions": {
- "rootDir": "./src",
"module": "esnext",
"target": "es2020",
"lib": ["dom", "es2020"],
@@ -22,6 +21,7 @@
},
"types": ["react", "jest"],
"include": [
- "src/**/*"
+ "src/**/*",
+ ".storybook/**/*",
],
}
diff --git a/packages/bezier-react/tsconfig.prune.json b/packages/bezier-react/tsconfig.prune.json
index 63d5c136be..a2f719cc36 100644
--- a/packages/bezier-react/tsconfig.prune.json
+++ b/packages/bezier-react/tsconfig.prune.json
@@ -3,7 +3,8 @@
"exclude": [
"src/index.ts",
"**/*.stories.tsx",
- "src/utils/story.ts"
+ "src/utils/story.ts",
+ ".storybook/**/*"
],
"files": [
"./src/index.ts"
diff --git a/yarn.lock b/yarn.lock
index 3292d262e0..e2d2d1f8d7 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2963,11 +2963,9 @@ __metadata:
"@types/jest": ^29.5.4
"@types/react": ^18.2.21
"@types/react-dom": ^18.2.7
- "@types/styled-components": ^5.1.27
"@types/uuid": ^9.0.3
autoprefixer: ^10.4.14
babel-loader: ^9.1.3
- babel-plugin-styled-components: ^2.1.4
babel-preset-react-app: ^10.0.1
chromatic: ^7.0.0
classnames: ^2.3.2
@@ -2975,7 +2973,6 @@ __metadata:
eslint-config-bezier: "workspace:*"
eslint-plugin-storybook: ^0.6.13
identity-obj-proxy: ^3.0.0
- jest-styled-components: ^7.1.1
lightningcss: ^1.22.1
minimatch: ^9.0.3
paths.macro: ^3.0.1
@@ -2991,7 +2988,6 @@ __metadata:
sass: ^1.63.6
ssr-window: ^4.0.2
storybook: ^7.4.2
- styled-components: ^5.3.11
the-new-css-reset: ^1.11.2
ts-prune: ^0.10.3
tsconfig: "workspace:*"
@@ -3004,7 +3000,6 @@ __metadata:
"@channel.io/bezier-icons": ">=0.2.0"
react: ^16.8.0 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
- styled-components: ">=5"
peerDependenciesMeta:
"@channel.io/bezier-icons":
optional: true
@@ -7817,16 +7812,6 @@ __metadata:
languageName: node
linkType: hard
-"@types/hoist-non-react-statics@npm:*":
- version: 3.3.1
- resolution: "@types/hoist-non-react-statics@npm:3.3.1"
- dependencies:
- "@types/react": "*"
- hoist-non-react-statics: ^3.3.0
- checksum: 2c0778570d9a01d05afabc781b32163f28409bb98f7245c38d5eaf082416fdb73034003f5825eb5e21313044e8d2d9e1f3fe2831e345d3d1b1d20bcd12270719
- languageName: node
- linkType: hard
-
"@types/html-minifier-terser@npm:^6.0.0":
version: 6.1.0
resolution: "@types/html-minifier-terser@npm:6.1.0"
@@ -8169,17 +8154,6 @@ __metadata:
languageName: node
linkType: hard
-"@types/styled-components@npm:^5.1.27":
- version: 5.1.30
- resolution: "@types/styled-components@npm:5.1.30"
- dependencies:
- "@types/hoist-non-react-statics": "*"
- "@types/react": "*"
- csstype: ^3.0.2
- checksum: 22948191a2de0187ab20383c1d9a6b7c9dfda9e6d58f104e03fd8bb8f3ee150b800806e90efa888f1d0fbb53d404613e4b6cccf0c77eb4287e8b1aeb1d7c1cb5
- languageName: node
- linkType: hard
-
"@types/testing-library__jest-dom@npm:^5.9.1":
version: 5.14.5
resolution: "@types/testing-library__jest-dom@npm:5.14.5"
@@ -9616,7 +9590,7 @@ __metadata:
languageName: node
linkType: hard
-"babel-plugin-styled-components@npm:>= 1.12.0, babel-plugin-styled-components@npm:^2.1.4":
+"babel-plugin-styled-components@npm:>= 1.12.0":
version: 2.1.4
resolution: "babel-plugin-styled-components@npm:2.1.4"
dependencies:
@@ -14419,7 +14393,7 @@ __metadata:
languageName: node
linkType: hard
-"hoist-non-react-statics@npm:^3.0.0, hoist-non-react-statics@npm:^3.3.0":
+"hoist-non-react-statics@npm:^3.0.0":
version: 3.3.2
resolution: "hoist-non-react-statics@npm:3.3.2"
dependencies:
@@ -16058,17 +16032,6 @@ __metadata:
languageName: node
linkType: hard
-"jest-styled-components@npm:^7.1.1":
- version: 7.2.0
- resolution: "jest-styled-components@npm:7.2.0"
- dependencies:
- "@adobe/css-tools": ^4.0.1
- peerDependencies:
- styled-components: ">= 5"
- checksum: 9eb440fb98571520fa6309ebec5464bdd6a15fd29989c7a583badc24f390264459f21d1d09253e6a449f4f6e41ca0d8f630f762941794b51b327df9bfdcce030
- languageName: node
- linkType: hard
-
"jest-util@npm:^29.6.3":
version: 29.6.3
resolution: "jest-util@npm:29.6.3"