Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.0.0 #2038

Merged
merged 248 commits into from
Mar 26, 2024
Merged

v2.0.0 #2038

Changes from 1 commit
Commits
Show all changes
248 commits
Select commit Hold shift + click to select a range
3cdc13e
Set up deployment environment for 2.0.0 alpha version (#1474)
sungik-choi Jul 7, 2023
731688d
chore(changeset): update initial pkg versions of prerelease config (#…
sungik-choi Jul 11, 2023
13fba5e
Implement layered structure of Sass-based styled-system (#1484)
sungik-choi Jul 11, 2023
1eb7b1a
Set up SCSS module environment(ts, storybook) and change `Spinner` to…
sungik-choi Jul 13, 2023
75722d3
Set up rollup and package json for SCSS (#1491)
sungik-choi Jul 13, 2023
d3853f6
ci(changesets): version packages (alpha) (#1493)
github-actions[bot] Jul 13, 2023
5d71142
Merge branch 'main' into alpha
sungik-choi Oct 10, 2023
b92b389
Merge branch 'main' into alpha
sungik-choi Oct 19, 2023
03035e8
Merge branch 'main' into alpha
sungik-choi Nov 16, 2023
a265aff
Add postcss preset env (#1510)
sungik-choi Nov 20, 2023
576616a
Implement bezier-tokens package (#1685)
sungik-choi Nov 22, 2023
fd4799f
chore(bezier-tokens): set initial version to 0.0.0 (#1750)
sungik-choi Nov 22, 2023
3de94c5
ci(changesets): version packages (alpha) (#1749)
github-actions[bot] Nov 22, 2023
e9968a6
Apply bezier-tokens to bezier-react's style sheet (#1495)
sungik-choi Nov 22, 2023
5fd1095
fix invalid design token config (#1752)
sungik-choi Nov 22, 2023
11b3587
ci(changesets): version packages (alpha) (#1753)
github-actions[bot] Nov 23, 2023
d9c8334
Merge branch 'main' into alpha
sungik-choi Nov 29, 2023
a8c6523
Add z-index and opacity tokens, Add token category to js build artifa…
sungik-choi Nov 30, 2023
49e464b
docs(bezier-tokens): apply changes from #1766 (#1768)
sungik-choi Nov 30, 2023
8f88a03
Implement multi theme feature based on data attributes (#1756)
sungik-choi Dec 1, 2023
d1e0fc7
feat(bezier-tokens): create a CSS entry point and add composition tok…
sungik-choi Dec 5, 2023
b5cacba
Merge branch 'main' into alpha
sungik-choi Dec 12, 2023
957e4f8
feat(bezier-tokens): Implementing composition tokens and removing dup…
sungik-choi Dec 12, 2023
c59d2b2
Add codmod to transform foundation to css variable (#1781)
yangwooseong Dec 12, 2023
8cdbc47
ci(changesets): version packages (alpha) (#1767)
github-actions[bot] Dec 12, 2023
027234f
Remove `LegacySegmentedControl` and related utils (#1786)
sungik-choi Dec 13, 2023
ef56dc1
Add codemod for mixin interpolation (#1787)
yangwooseong Dec 13, 2023
a1dafd8
Minify the CSS output (#1791)
sungik-choi Dec 14, 2023
920c18b
Add codemod for import of `styled` object (#1789)
yangwooseong Dec 14, 2023
987b41d
chore(storybook): setting up AlphaAppProvider (#1796)
sungik-choi Dec 15, 2023
3e1ecae
refactor(utils): remove unused utils (#1797)
sungik-choi Dec 15, 2023
bbc5d68
Migrate `DisabledOpacity` constant (#1795)
sungik-choi Dec 15, 2023
7d98d23
Implement Box layout component (#1785)
sungik-choi Dec 18, 2023
316320e
fix(bezier-tokens): fix invalid letter spacing token values (#1821)
sungik-choi Dec 18, 2023
f47144d
chore(deps): update node orb to v5.1.1 (#1828)
renovate[bot] Dec 18, 2023
7a20e1a
chore(deps): update react monorepo (#1829)
renovate[bot] Dec 18, 2023
ec7fed5
chore(deps): update dependency ts-node to v10.9.2 (#1827)
renovate[bot] Dec 18, 2023
aa59e5d
chore(deps): update dependency style-dictionary to v3.9.1 (#1826)
renovate[bot] Dec 18, 2023
9096513
chore(deps): update dependency @storybook/addon-styling to v1.3.7 (#1…
renovate[bot] Dec 18, 2023
8829101
chore(deps): update dependency autoprefixer to v10.4.16 (#1825)
renovate[bot] Dec 18, 2023
4677329
Rename `AlphaAppProvider` to `AppProvider` (#1834)
sungik-choi Dec 18, 2023
b00dcf3
Remove runtime overhead related with css variables (#1819)
sungik-choi Dec 18, 2023
f6dfaaf
chore(deps): update chuhlomin/render-template action to v1.9 (#1838)
renovate[bot] Dec 18, 2023
5ac03cc
chore(deps): update dependency @changesets/get-github-info to ^0.6.0 …
renovate[bot] Dec 18, 2023
7d5a246
chore(deps): update dependency @swc/core to v1.3.101 (#1831)
renovate[bot] Dec 18, 2023
ff2c9b4
fix(package): change the CSS file path (#1840)
sungik-choi Dec 18, 2023
b6bc6aa
Implement css dimension util function (#1823)
sungik-choi Dec 19, 2023
29ea8a4
feat(Overlay.stories): fix not working containerWidth/Height and add …
jintak0401 Dec 19, 2023
89a34f5
fix(bezier-tokens): add the missing `bg-header-float` semantic color …
sungik-choi Dec 19, 2023
37d79d2
ci(changesets): version packages (alpha) (#1790)
github-actions[bot] Dec 19, 2023
a510882
Enhancement `Text` component to support new typography token (#1820)
sungik-choi Dec 19, 2023
ee8661b
Add `Typography` interpolation transform (#1841)
yangwooseong Dec 19, 2023
7aa1702
Add codemod for `Stack` component (#1836)
yangwooseong Dec 19, 2023
8e06b40
fix(beizer-figma-plugin): fix deps version of bezier-react (#1847)
sungik-choi Dec 20, 2023
16ad5b9
Enhancing `AlphaStack` component and changing to stable component (#1…
sungik-choi Dec 20, 2023
ca47057
fix(styles): fix to explicitly initialize CSS variables (#1846)
sungik-choi Dec 20, 2023
2601714
Enhance margin, layout common css module (#1848)
sungik-choi Dec 21, 2023
f1c05b9
Refactor directory sturcture in bezier-codemod package (#1844)
yangwooseong Dec 21, 2023
f33060f
Add codemod for z-index interpolation (#1845)
yangwooseong Dec 22, 2023
7cb0f2e
Add codemod for `Text` component interface (#1849)
yangwooseong Dec 22, 2023
136da6b
Enhance `import-styled-from-styled-component` codemod to cover other …
yangwooseong Dec 22, 2023
062f8a8
ci(changesets): version packages (alpha) (#1843)
github-actions[bot] Dec 22, 2023
e91c4aa
Migrate `Divider` component with scss (#1861)
yangwooseong Dec 28, 2023
3ad9a88
Migrate `Icon` component with scss (#1863)
yangwooseong Dec 28, 2023
a6f5c1a
Use `:where` pseudo class to `Text`, `Stack` components (#1869)
yangwooseong Jan 3, 2024
b999ae6
Migrate `Status` component with scss (#1870)
yangwooseong Jan 3, 2024
3537ac7
Migrate `Tooltip`, `Help` component with scss (#1862)
yangwooseong Jan 3, 2024
78a6b6b
feat: use :where pseudo class to all components (#1874)
sungik-choi Jan 4, 2024
2a49fc4
Make CSS module scope names more unique (#1873)
sungik-choi Jan 4, 2024
0e98fa3
Refactoring common props related names (#1875)
sungik-choi Jan 4, 2024
829a994
Migrate `Avatar`, `AvatarGroup` component with scss (#1871)
yangwooseong Jan 5, 2024
4aba3da
Migrate `Tag`, `Badge` component with scss (#1872)
yangwooseong Jan 5, 2024
324fe17
Migrate `SegmentedControl` component with scss (#1866)
sungik-choi Jan 8, 2024
cfcfe70
Enhancement `AlphaCenter` layout component and remove Alpha prefix (#…
sungik-choi Jan 8, 2024
1b333bf
Migrate `Button` component with scss (#1882)
sungik-choi Jan 9, 2024
27188d8
chore(changeset): fix invalid changelog in #1866 (#1889)
sungik-choi Jan 9, 2024
2764c72
Migrate `Emoji` component with scss (#1881)
yangwooseong Jan 9, 2024
f4b6ff0
Migrate `Switch` component with scss (#1885)
yangwooseong Jan 9, 2024
7b4fb30
Migrate `Slider` component with scss (#1883)
yangwooseong Jan 9, 2024
9cccddc
Enchance to add `@layer components` at-rule in CSS post-processing (#…
sungik-choi Jan 9, 2024
e8fd089
Add codemod for `AlphaCenter` component (#1894)
yangwooseong Jan 10, 2024
fd16fd2
Migrate `Banner` component with scss (#1891)
sungik-choi Jan 10, 2024
66923cc
Migrate `AlphaSmoothCornerBox` with scss and deprecate `smoothCorners…
sungik-choi Jan 11, 2024
3f781aa
Resolve some warning message during test (#1895)
yangwooseong Jan 11, 2024
6e57104
Drop `ListMenuTitle` component (#1900)
yangwooseong Jan 11, 2024
6ee03ef
Deprecating common margin prop support in some components and other i…
sungik-choi Jan 11, 2024
0f9ee21
feat(button-group): update interface (#1890)
sungik-choi Jan 11, 2024
996fa9a
Change the `as` prop to allow all element types and button to allow `…
sungik-choi Jan 11, 2024
f4ffdad
Migrate `Modal` and `ConfirmModal` component with scss (#1903)
sungik-choi Jan 12, 2024
3af5d3a
chore(changeset): update changeset (#1906)
sungik-choi Jan 12, 2024
99ea328
chore(changeset): apply missing changes (#1909)
sungik-choi Jan 12, 2024
ea0a709
ci(changesets): version packages (alpha) (#1864)
github-actions[bot] Jan 12, 2024
4f0e6eb
refactor(banner): remove postcss build warning (#1911)
sungik-choi Jan 15, 2024
d23b739
fix(bezier-tokens): fix scoping issues with common semantic tokens (#…
sungik-choi Jan 15, 2024
de7c879
Add codemod for transforming spacing to px (#1907)
yangwooseong Jan 15, 2024
9939387
Apply stylelint for scss (#1912)
sungik-choi Jan 15, 2024
1d6c349
Fix unused import in transition codemod (#1917)
yangwooseong Jan 16, 2024
c83cb1b
Migrate `FormHelperText`, `FormErrorMessage`, and `FormLabel` compone…
yangwooseong Jan 16, 2024
2cbaa1d
Migrate `NavItem` and `NavGroup` component with scss (#1905)
yangwooseong Jan 16, 2024
5c37c51
Merge branch 'main' into alpha
sungik-choi Jan 16, 2024
6df50cc
Add bezier-tokens to Readme (#1927)
yangwooseong Jan 18, 2024
4ea1e5c
Migrate `TextField` component with scss (#1904)
sungik-choi Jan 18, 2024
3080afa
Fix typo in z-index interpolation codemod (#1924)
yangwooseong Jan 18, 2024
676da98
Migrate `TextArea` component with scss (#1914)
sungik-choi Jan 18, 2024
20d640f
Add missed `inputPlaceholderStyle` migration logic to codemod (#1926)
yangwooseong Jan 18, 2024
c6109c7
Migrate `Select` component with scss (#1913)
sungik-choi Jan 18, 2024
73e0d2f
Migrate `Checkbox` component with scss (#1918)
sungik-choi Jan 18, 2024
ec556c6
Migrate `CheckableAvatar` component with scss (#1921)
sungik-choi Jan 18, 2024
3a80139
Migrate `RadioGroup` component with scss (#1923)
sungik-choi Jan 18, 2024
aaf68be
ci(changesets): version packages (alpha) (#1916)
github-actions[bot] Jan 18, 2024
af1c419
feat(navigators): rename `leftIcon` property of `NavItem` and `NavGro…
sungik-choi Jan 19, 2024
a4647d3
Add rounding to interpolation transform (#1928)
yangwooseong Jan 19, 2024
4538dd2
Modify `v2-text-component-interface` codemod to cover more case (#1932)
yangwooseong Jan 19, 2024
6e62fb6
Migrate `ListItem` component with scss (#1925)
sungik-choi Jan 19, 2024
5855713
Migrate `FormControl` component with scss (#1935)
yangwooseong Jan 22, 2024
6529cbf
fix(bezier-tokens): remove invalid radius tokens (#1934)
sungik-choi Jan 22, 2024
5be87a1
Migrate(Reorganize) `OutlineItem` component with scss (#1930)
sungik-choi Jan 22, 2024
bce76cf
Migrate(Reorganize) `SectionLabel` component with scss (#1936)
sungik-choi Jan 22, 2024
7c2c205
ci(changesets): version packages (alpha) (#1933)
github-actions[bot] Jan 22, 2024
cd650a0
Migrate `KeyValueListItem` component with scss (#1941)
sungik-choi Jan 24, 2024
c7d5c23
Migrate `LegacyTooltip` component with scss (#1945)
sungik-choi Jan 24, 2024
041954b
Remove `LegacyRadio` and make `Radio` available without labels (#1943)
sungik-choi Jan 24, 2024
f271c69
Migrate `LegacyStack` component with scss (#1944)
sungik-choi Jan 24, 2024
c687ed9
ci(changesets): version packages (alpha) (#1946)
github-actions[bot] Jan 24, 2024
a7dad85
Migrate `Overlay` component with scss (#1949)
sungik-choi Jan 29, 2024
d92a099
Migrate `ProgressBar` component with scss (#1947)
sungik-choi Jan 29, 2024
8b447c4
fix(smooth-corners): add a separator(,) to the shadow custom property…
sungik-choi Jan 29, 2024
e9687f3
refactor(radio-group): change to do division outside of calc() (#1957)
sungik-choi Jan 29, 2024
a698026
Migrate `Tabs` components with scss (#1960)
sungik-choi Jan 30, 2024
6a69ac8
Migrate `Toast` component with scss (#1950)
sungik-choi Jan 30, 2024
da67b91
Change `FormFieldSize` enum to classname shared through component (#…
yangwooseong Jan 30, 2024
8324c77
ci(changesets): version packages (alpha) (#1958)
github-actions[bot] Jan 30, 2024
fe5f125
Clean up styled-components-related legacy (#1962)
sungik-choi Feb 1, 2024
e839652
Deprecate internal use modules (#1963)
sungik-choi Feb 1, 2024
42ce367
Clean up providers and types directory (#1964)
sungik-choi Feb 2, 2024
8bfb85e
Add & Apply eslint-plugin-jsdoc (#1965)
sungik-choi Feb 2, 2024
6ac0f84
Change `components` directory to a flat structure (#1966)
sungik-choi Feb 5, 2024
599114b
Clean up module exports (#1968)
sungik-choi Feb 5, 2024
05dcbab
Enhance common types (#1969)
sungik-choi Feb 5, 2024
6bfaa1d
refactor(form-helper-text): fix invalid object key of get form contex…
sungik-choi Feb 5, 2024
a086f0f
Improve performance of `Tooltip` and remove `TooltipProvider` (#1974)
sungik-choi Feb 6, 2024
108d23b
feat(banner): enhance to render link even when content is not a strin…
sungik-choi Feb 6, 2024
d108b29
Clean up utils (#1970)
sungik-choi Feb 6, 2024
e77d8f4
Remove `testId` property from the public component API (#1971)
sungik-choi Feb 6, 2024
3faa301
Fix bug where overlay would close when clicking inside it (#1977)
yangwooseong Feb 6, 2024
716e9bc
build(rollup): shorten css module's scope name (#1980)
sungik-choi Feb 7, 2024
aebd594
refactor: remove default value of event handler props (#1979)
sungik-choi Feb 7, 2024
17eb321
feat(window-provider): Add `useRootElement` and JSDoc (#1981)
sungik-choi Feb 7, 2024
ee34b77
refactor: colocation (#1982)
sungik-choi Feb 7, 2024
9eade79
Modify styles globally (#1975)
sungik-choi Feb 7, 2024
2a373cc
fix(feature-provider): add missing export module (#1983)
sungik-choi Feb 7, 2024
6472068
ci(changesets): version packages (alpha) (#1967)
github-actions[bot] Feb 7, 2024
cc85564
fix(deps): move bezier-tokens from dev-deps to deps (#1985)
sungik-choi Feb 8, 2024
626aee5
Fix bug in `v2-import-from-bezier-to-styled-components` (#1987)
yangwooseong Feb 8, 2024
a6dbfa5
feat(theme-provider): spread props (#1986)
sungik-choi Feb 8, 2024
1e7de8a
ci(changesets): version packages (alpha) (#1988)
github-actions[bot] Feb 8, 2024
09e466a
Convert enum type of component props to string literal type - Button,…
yangwooseong Feb 8, 2024
f765692
Convert enum type of component props to string literal type - Toast, …
yangwooseong Feb 13, 2024
6cb2aa7
Resolve warning message of `KeyValueItem` component during test (#1991)
yangwooseong Feb 15, 2024
25979f7
Revert "Convert enum type of component props to string literal type -…
sungik-choi Feb 15, 2024
fbf60d9
Revert "Convert enum type of component props to string literal type -…
sungik-choi Feb 15, 2024
2948efe
Exports the tokens object from bezier-tokens (#1992)
sungik-choi Feb 15, 2024
137e0bc
Fixes an issue where multi line truncated in `Text` was not being app…
sungik-choi Feb 15, 2024
7305476
ci(changesets): version packages (alpha) (#1989)
github-actions[bot] Feb 15, 2024
c6dc116
refactor(bezier-figma-plugin): migrate to use bezier-react v2 alpha (…
sungik-choi Feb 19, 2024
d897d28
ci(changesets): version packages (alpha) (#2003)
github-actions[bot] Feb 20, 2024
ec19483
fix(components): change incorrect default value of css variable 'inhe…
sungik-choi Feb 21, 2024
2d51bbd
fix(legacy-stack): add missing default margin style (#2004)
sungik-choi Feb 21, 2024
2a191cd
ci(changesets): version packages (alpha) (#2011)
github-actions[bot] Feb 21, 2024
4e04a11
fix(component): make `smoothCornerScript` not throw error when called…
chaejunlee Feb 21, 2024
f72f7fc
Add overflow: hidden to `ListItem` component (#2013)
yangwooseong Feb 23, 2024
d54ca7f
fix(tabs): fix invalid migration (#2014)
sungik-choi Feb 23, 2024
52afe9c
fix(modal): fix styling issues when subcomponents are used alone (#2017)
sungik-choi Feb 26, 2024
27ab0b1
feat(text-field): update background color of secondary varient (#2016)
sungik-choi Feb 26, 2024
c4735df
ci(changesets): version packages (alpha) (#2012)
github-actions[bot] Feb 26, 2024
ce53920
fix(list-item): fix left icon color specificity issue (#2018)
sungik-choi Feb 26, 2024
59135e0
ci(changesets): version packages (alpha) (#2019)
github-actions[bot] Feb 26, 2024
959aca2
Upgrade dependencies (#1997)
sungik-choi Feb 27, 2024
bb69bec
chore(deps): update node orb to v5.2.0 (#2020)
renovate[bot] Feb 27, 2024
ab13782
chore(deps): update actions/cache action to v4 (#2021)
renovate[bot] Feb 27, 2024
dba19ea
chore(deps): update actions/github-script action to v7 (#2022)
renovate[bot] Feb 27, 2024
bff04b5
chore(deps): update actions/setup-node action to v4 (#2023)
renovate[bot] Feb 27, 2024
0f3d53e
chore(deps): update actions/upload-artifact action to v4 (#2024)
renovate[bot] Feb 27, 2024
c4b882a
chore(deps): update chromaui/action action to v11 (#2025)
renovate[bot] Feb 27, 2024
9e572cc
chore(deps): update codecov orb to v4 (#2026)
renovate[bot] Feb 27, 2024
ba541e6
chore(deps): update github/codeql-action action to v3 (#2029)
renovate[bot] Feb 27, 2024
6008d62
chore(deps): update peter-evans/create-or-update-comment action to v4…
renovate[bot] Feb 27, 2024
701d435
chore(deps): update peter-evans/find-comment action to v3 (#2031)
renovate[bot] Feb 27, 2024
dae5658
chore(deps): update dependency @types/react to v18.2.60 (#2032)
renovate[bot] Feb 27, 2024
e5f5bfb
chore(deps): update dependency @types/node to v20.11.21 (#1857)
renovate[bot] Feb 28, 2024
c412093
Upgrade to Rollup 4 (#1999)
sungik-choi Feb 28, 2024
020b4ec
docs: Update README (#2033)
sungik-choi Feb 28, 2024
fd54b6e
Upgrade to yarn v4 (#2000)
sungik-choi Feb 28, 2024
accbe99
chore(deps): update dependency node to v18.19.1 (#1860)
renovate[bot] Feb 28, 2024
88c9907
Revert "chore(deps): update dependency node to v18.19.1" (#2034)
sungik-choi Feb 28, 2024
857a20f
Install Syncpack (#2027)
sungik-choi Feb 29, 2024
56ebe3c
fix(deps): update style (#2028)
sungik-choi Feb 29, 2024
10ed283
Merge branch 'main' into alpha
sungik-choi Feb 29, 2024
f6c3a88
Fix TabAction typography style for Tab size M (#2035)
sungik-choi Mar 4, 2024
71a07de
fix(key-value-item): add overflow hidden style to item wrapper elemen…
sungik-choi Mar 4, 2024
160082a
Fixes `Overlay` not closing in other windows (#2037)
sungik-choi Mar 4, 2024
35c3a7d
ci(changesets): version packages (alpha) (#2043)
github-actions[bot] Mar 4, 2024
0775731
Customizing theme for Storybook (#2050)
sungik-choi Mar 11, 2024
c25b329
fix(modal): fix invalid aria-modal value (#2052)
sungik-choi Mar 11, 2024
3baaf80
chore(deps): update dependency @figma/plugin-typings to v1.88.0 (#1855)
renovate[bot] Mar 12, 2024
b901e11
chore(deps): update dependency @types/node to v20.11.26 (#2039)
renovate[bot] Mar 12, 2024
2db872d
chore(deps): update react monorepo (#2040)
renovate[bot] Mar 12, 2024
d54052c
chore(deps): update commitlint monorepo to v19 (major) (#2045)
renovate[bot] Mar 12, 2024
b91652d
chore(deps): update dependency @swc/core to v1.4.6 (#2053)
renovate[bot] Mar 12, 2024
2663034
chore(deps): update dependency chromatic to v11.0.8 (#2054)
renovate[bot] Mar 12, 2024
00bfcda
chore(deps): update dependency rollup to v4.12.1 (#2055)
renovate[bot] Mar 12, 2024
15f68e7
chore(deps): update dependency turbo to v1.12.5 (#2056)
renovate[bot] Mar 12, 2024
a84fed9
chore(deps): update yarn to v4.1.1 (#2058)
renovate[bot] Mar 12, 2024
bc41c3b
Apply enum transform codemod - Revert #1995, #1993 (#2059)
yangwooseong Mar 12, 2024
9244bbe
ci(changesets): version packages (alpha) (#2057)
github-actions[bot] Mar 12, 2024
3970353
Fix `hasNamedImportInImportDeclaration` util to check all named impor…
yangwooseong Mar 12, 2024
bb642ba
ci(changesets): version packages (alpha) (#2061)
github-actions[bot] Mar 12, 2024
0d11c6c
Change classname of `Badge` component for style issue (#2068)
yangwooseong Mar 13, 2024
fbeff37
ci(changesets): version packages (alpha) (#2069)
github-actions[bot] Mar 13, 2024
b291b50
Set `noImplicitAny` true in tsconfig.json (#2071)
sungik-choi Mar 13, 2024
ccf773c
Merge branch 'main' into alpha
sungik-choi Mar 14, 2024
72ea77c
ci(changesets): version packages (alpha) (#2072)
github-actions[bot] Mar 14, 2024
97de8a5
Add error catch logic on figma plugin (#2073)
yangwooseong Mar 15, 2024
f826e71
remove Alpha prefix from AlphaSmoothCornersBox (#2079)
sungik-choi Mar 18, 2024
9d94ab5
chore(deps): update dependency lightningcss to v1.24.1 (#2084)
renovate[bot] Mar 18, 2024
ee86bd2
chore(deps): update dependency @swc/core to v1.4.8 (#2082)
renovate[bot] Mar 18, 2024
685d032
chore(deps): update dependency postcss to v8.4.36 (#2085)
renovate[bot] Mar 18, 2024
2f73c7b
chore(deps): update dependency @types/node to v20.11.28 (#2083)
renovate[bot] Mar 18, 2024
63c2353
Merge branch 'main' into alpha
sungik-choi Mar 18, 2024
9802f9c
Add `TooltipPrimitive` and `DialogPrimitive` components via radix-ui …
sungik-choi Mar 19, 2024
2fe23e3
ci(changesets): version packages (alpha) (#2077)
github-actions[bot] Mar 19, 2024
d5f85e2
docs(legacy-stack): add deprecation warning (#2095)
sungik-choi Mar 20, 2024
67d6f4b
docs(primitives): add storybook documentation (#2094)
sungik-choi Mar 20, 2024
075a0a5
Apply shared eslint/typescript config & upgrade to typescript v5 (#2096)
sungik-choi Mar 21, 2024
8ea58f4
Apply prettier & format the entire code (#2097)
sungik-choi Mar 21, 2024
481cad7
build(bezier-react): improve type build settings (#2100)
sungik-choi Mar 22, 2024
ce79395
docs: apply the new logo to storybook (#2101)
sungik-choi Mar 22, 2024
6c5a7c4
Implement `bezier-vscode` package (#2091)
yangwooseong Mar 22, 2024
654604b
Set `private` true in bezier-vscode package.jon (#2104)
yangwooseong Mar 22, 2024
b57b05a
ci(changesets): version packages (alpha) (#2103)
github-actions[bot] Mar 22, 2024
ef2ed60
remove deprecated comment in tag related types (#2110)
yangwooseong Mar 25, 2024
e4fefa1
chore(deps): rm unnecessary stylelintignore & upgrade stylelint (#2115)
sungik-choi Mar 26, 2024
c15dddd
fix(toast): remove the default offset(GNB_OFFSET, 68) (#2117)
sungik-choi Mar 26, 2024
6f6d019
fix(toast): fix timeout for frequently failing asynchronous test case…
sungik-choi Mar 26, 2024
bc70fdc
Remove `color` props from `Tag` component & TagBadge common type (#2114)
sungik-choi Mar 26, 2024
b6d9aa3
Merge branch 'main' into alpha
sungik-choi Mar 26, 2024
f00fe73
ci(changesets): version packages (alpha) (#2119)
github-actions[bot] Mar 26, 2024
5d5f16a
feat(toast): assign default value to each property of Toast offset (#…
sungik-choi Mar 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Enhance import-styled-from-styled-component codemod to cover other …
…APIs (#1852)

<!--
  How to write a good PR title:
- Follow [the Conventional Commits
specification](https://www.conventionalcommits.org/en/v1.0.0/).
  - Give as much context as necessary and as little as possible
  - Prefix it with [WIP] while it’s a work in progress
-->

## Self Checklist

- [x] I wrote a PR title in **English** and added an appropriate
**label** to the PR.
- [x] I wrote the commit message in **English** and to follow [**the
Conventional Commits
specification**](https://www.conventionalcommits.org/en/v1.0.0/).
- [x] I [added the
**changeset**](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md)
about the changes that needed to be released. (or didn't have to)
- [x] I wrote or updated **documentation** related to the changes. (or
didn't have to)
- [x] I wrote or updated **tests** related to the changes. (or didn't
have to)
- [x] I tested the changes in various browsers. (or didn't have to)
  - Windows: Chrome, Edge, (Optional) Firefox
  - macOS: Chrome, Edge, Safari, (Optional) Firefox

## Related Issue
<!-- Please link to issue if one exists -->

<!-- Fixes #0000 -->

- Fixes #1851

## Summary
<!-- Please brief explanation of the changes made -->

- `import-styled-from-styled-component` codemod 가 `styled` 뿐만 아니라 `css`,
`createGlobalStyle` 와 같은 `styled-components`의 다른 API 까지 포함하도록 변경하고,
`v2-import-from-bezier-to-styled-components` 으로 rename 합니다.

## Details
<!-- Please elaborate description of the changes -->

- 원래 코드에서는 세미콜론 제거를 transform 이 끝나기 직전에 호출하고 있었는데, 이번에 namedImport 를
추가하고 나니 세미콜론 제거에서 아래의 runtime error 를 뱉습니다. `ts-morph` 이슈를 찾아봐도 정보가 안나와서
디버깅이 어렵다고 판단하여 namedImport 추가 전에 넣었습니다. 대부분의 경우는 namedImport (`css`,
`keyframes` 등)를 추가하기 전에 default import (`styled`)를 먼저 추가하기 때문에 세미콜론이 제거
된채로 변환이 되서 문제가 없습니다.

```
 Manipulation error: Error replacing tree: The children of the old and new trees were expected to have the same count 
```

### Breaking change? (Yes/No)
<!-- If Yes, please describe the impact and migration path for users -->

- No

## References
<!-- Please list any other resources or points the reviewer should be
aware of -->

- #1851
yangwooseong authored Dec 22, 2023
commit 136da6ba64b04b3c2cfc440437e8c17417c72584
5 changes: 5 additions & 0 deletions .changeset/moody-snakes-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@channel.io/bezier-codemod": minor
---

Enhance `import-styled-from-styled-component` codemod to cover other APIs from `styled-components`
53 changes: 15 additions & 38 deletions packages/bezier-codemod/README.md
Original file line number Diff line number Diff line change
@@ -203,57 +203,34 @@ const Wrapper = styled.div`
`;
```

**`v2-z-index-interpolation-to-css-variable`**
### import directly from styled-components

Replace z-index interpolation to css variable
For example:

```tsx
import { ZIndex, styled } from "@channel.io/bezier-react";

const OVERLAY_POSITION = {
zIndex: ZIndex.Modal,
};

const Wrapper = styled.div`
z-index: ${ZIndex.Hide};
`;
```

Transforms into:

```tsx
import { styled } from "@channel.io/bezier-react";

const OVERLAY_POSITION = {
zIndex: "var(--z-index-modal)",
};
**`v2-import-from-bezier-to-styled-components`**

const Wrapper = styled.div`
z-index: var(--z-index-hidden);
`;
```

### Styled from @channel.io/bezier-react to styled-components

**`v2-styled-to-styled-components`**

Switch library to import `styled` object from `@channel.io/bezier-react` to `styled-components`
Switch library to import `styled`, `css`, `StyleSheetManager`, `keyframes`, `createGlobalStyle`, `ServerStyleSheet` object from `@channel.io/bezier-react` to `styled-components`
For example:

```tsx
import { styled, Button } from "@channel.io/bezier-react";
import { styled, Button, css } from "@channel.io/bezier-react";

export const Wrapper = styled(Button)``;
export const Wrapper = styled(Button)`
${css`
background: red;
`}
`;
```

Transforms into:

```tsx
import styled from "styled-components";
import styled, { css } from "styled-components";
import { Button } from "@channel.io/bezier-react";

export const Wrapper = styled(Button)``;
export const Wrapper = styled(Button)`
${css`
background: red;
`}
`;
```

### Remove Alpha prefix from `AlphaStack` and add Legacy prefix to `Stack`
6 changes: 3 additions & 3 deletions packages/bezier-codemod/src/App.tsx
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ import foundationToCssVariableRounding from './transforms/v2-foundation-to-css-v
import foundationToCssVariableTheme from './transforms/v2-foundation-to-css-variable/theme.js'
import foundationToCssVariable from './transforms/v2-foundation-to-css-variable/transform.js'
import foundationToCssVariableTransition from './transforms/v2-foundation-to-css-variable/transition.js'
import styledToStyledComponents from './transforms/v2-import-styled-from-styled-components/transform.js'
import importFromBezierToStyledComponents from './transforms/v2-import-from-bezier-to-styled-components/transform.js'
import inputInterpolationToCssVariable from './transforms/v2-input-interpolation-to-css-variable/transform.js'
import removeAlphaFromAlphaStack from './transforms/v2-remove-alpha-from-alpha-stack/transform.js'
import textComponentInterface from './transforms/v2-text-component-interface/transform.js'
@@ -53,10 +53,10 @@ enum Option {
V2FoundationToCssVariable = 'v2-foundation-to-css-variable',
V2InputInterpolationToCssVariable = 'v2-input-interpolation-to-css-variable',
V2TypographyInterpolationToCssVariable = 'v2-typography-interpolation-to-css-variable',
V2StyledToStyledComponents = 'v2-styled-to-styled-components',
V2RemoveAlphaFromAlphaStack = 'v2-remove-alpha-from-alpha-stack',
V2ZIndexInterpolationToCssVariable = 'v2-z-index-interpolation-to-css-variable',
V2TextComponentInterface = 'v2-text-component-interface',
V2ImportFromBezierToStyledComponents = 'v2-import-from-bezier-to-styled-components',
Exit = 'Exit',
}

@@ -74,7 +74,7 @@ const transformMap = {
[Option.V2FoundationToCssVariable]: foundationToCssVariable,
[Option.V2InputInterpolationToCssVariable]: inputInterpolationToCssVariable,
[Option.V2TypographyInterpolationToCssVariable]: typographyInterpolationToCssVariable,
[Option.V2StyledToStyledComponents]: styledToStyledComponents,
[Option.V2ImportFromBezierToStyledComponents]: importFromBezierToStyledComponents,
[Option.V2RemoveAlphaFromAlphaStack]: removeAlphaFromAlphaStack,
[Option.V2ZIndexInterpolationToCssVariable]: zIndexInterpolationToCssVariable,
[Option.V2TextComponentInterface]: textComponentInterface,
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import '@channel.io/bezier-react/styles.css'
import { styled } from '@channel.io/bezier-react'

export const Wrapper = styled.div``
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import styled from 'styled-components'
import '@channel.io/bezier-react/styles.css'
export const Wrapper = styled.div``
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { styled, Text } from '@channel.io/bezier-react'
import { keyframes } from 'styled-components'
import { Text, keyframes } from '@channel.io/bezier-react'
import styled from 'styled-components'

const fadeIn = keyframes`
0% {
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import type { InterpolationProps } from '@channel.io/bezier-react'
import { styled, css, keyframes } from '@channel.io/bezier-react'

const Enter = keyframes`
from {
opacity: 0;
}

to {
opacity: 1;
}
`

const EnterTransition = () => css`
animation: ${Enter} 150ms 1000ms ease-out forwards;
`

export const Wrapper = styled.div<InterpolationProps>`
${css`
background: red;
`}

${EnterTransition}
`
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import styled, { css, keyframes } from 'styled-components'
import type { InterpolationProps } from '@channel.io/bezier-react'
const Enter = keyframes`
from {
opacity: 0;
}

to {
opacity: 1;
}
`

const EnterTransition = () => css`
animation: ${Enter} 150ms 1000ms ease-out forwards;
`

export const Wrapper = styled.div<InterpolationProps>`
${css`
background: red;
`}

${EnterTransition}
`
Original file line number Diff line number Diff line change
@@ -18,4 +18,8 @@ describe('import transform', () => {
it('should transform styled import from bezier-react to styled-components (4)', () => {
testTransformFunction(__dirname, 'styled4', importTransform)
})

it('should transform styled import from bezier-react to styled-components, and not remove other import declarations', () => {
testTransformFunction(__dirname, 'import-without-import-clause', importTransform)
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import {
type SourceFile,
ts,
} from 'ts-morph'

import {
getImportDeclaration,
getImportDeclarations,
hasNamedImport,
removeNamedImport,
} from '../../utils/import.js'

const STYLED = 'styled'
const NAMED_IMPORTS = ['css', 'createGlobalStyle', 'keyframes', 'StyleSheetManager', 'ServerStyleSheet']
const STYLED_COMPONENTS = 'styled-components'
const BEZIER_REACT = '@channel.io/bezier-react'

const addImportToStyledComponents = (sourceFile: SourceFile, importSpecifier: string, isDefault: boolean = false) => {
const styledComponentsImport = getImportDeclaration(sourceFile, STYLED_COMPONENTS)
if (styledComponentsImport) {
if (isDefault) {
styledComponentsImport.setDefaultImport(importSpecifier)
} else {
styledComponentsImport.addNamedImport(importSpecifier)
}
} else {
sourceFile.insertImportDeclaration(0, {
defaultImport: STYLED,
moduleSpecifier: STYLED_COMPONENTS,
})
}
}

const replaceStyledImport = (sourceFile: SourceFile) => {
const oldSourceFileText = sourceFile.getText()

if (hasNamedImport(sourceFile, STYLED)) {
removeNamedImport(sourceFile, STYLED)
addImportToStyledComponents(sourceFile, STYLED, true)
}

// NOTE: semicolon 제거를 namedImport 추가 후 하면 ts-morph 에서 runtime error 를 낸다
sourceFile.formatText({
semicolons: ts.SemicolonPreference.Remove,
})

NAMED_IMPORTS.forEach((namedImport) => {
if (hasNamedImport(sourceFile, namedImport)) {
removeNamedImport(sourceFile, namedImport)
addImportToStyledComponents(sourceFile, namedImport, false)
}
})

getImportDeclarations(sourceFile, BEZIER_REACT)
.forEach((importDeclaration) => {
if (!importDeclaration.getImportClause()?.getText()) {
importDeclaration.remove()
}
})

return oldSourceFileText !== sourceFile.getText()
}

export default replaceStyledImport

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 3 additions & 7 deletions packages/bezier-codemod/src/utils/import.ts
Original file line number Diff line number Diff line change
@@ -8,14 +8,10 @@ export const getImportDeclaration = (sourceFile: SourceFile, specifier: string)
.getImportDeclarations()
.find((declaration) => declaration.getModuleSpecifier().getLiteralValue() === specifier)

export const removeImportDeclarationWithoutImport = (sourceFile: SourceFile) => {
export const getImportDeclarations = (sourceFile: SourceFile, specifier: string) =>
sourceFile
.getDescendantsOfKind(SyntaxKind.ImportDeclaration)
.filter((v) => v.getDescendantsOfKind(SyntaxKind.ImportClause).length === 0)
.forEach((v) => {
v.remove()
})
}
.getImportDeclarations()
.filter((declaration) => declaration.getModuleSpecifier().getLiteralValue() === specifier)

export const hasNamedImportInImportDeclaration = (sourceFile: SourceFile, namedImport: string, moduleName: string) => {
const importDeclaration = getImportDeclaration(sourceFile, moduleName)