Skip to content

Commit

Permalink
Remove alpha dimension token & Add alpha radius token (#2540)
Browse files Browse the repository at this point in the history
<!--
  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 -->

## Summary

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

Remove alpha dimension token & Add alpha radius token

## Details

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

- 스펙 변경에 따라 내부적으로만 alpha dimension 토큰은 디자인 토큰에서 제거했습니다.
- alpha radius 토큰을 추가했습니다.
- alpha button에서 사용하던 dimension 토큰을 radius로 변경했습니다.
- 데스크에 dimension 토큰 몇 사용처가 있어서, 버전 업데이트할 때 유의해야합니다.

### Breaking change? (Yes/No)

<!-- If Yes, please describe the impact and migration path for users -->

No (alpha version)

## References

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

- Figma Variable 참고
  • Loading branch information
sungik-choi authored Dec 5, 2024
1 parent a0959f5 commit 9fc055d
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 229 deletions.
5 changes: 5 additions & 0 deletions .changeset/flat-birds-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@channel.io/bezier-tokens': patch
---

The alpha version dimension token is removed. The alpha version radius token is added.
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ $chromatic-colors: 'blue', 'red', 'green', 'cobalt', 'orange', 'pink', 'purple';
/* border-radius */
&:where(.variant-primary, .variant-secondary, .variant-tertiary) {
$border-radius-by-size: (
xs: var(--alpha-dimension-6),
s: var(--alpha-dimension-7),
m: var(--alpha-dimension-10),
l: var(--alpha-dimension-12),
xl: var(--alpha-dimension-14),
xs: var(--alpha-radius-6),
s: var(--alpha-radius-7),
m: var(--alpha-radius-10),
l: var(--alpha-radius-12),
xl: var(--alpha-radius-14),
);

@each $size, $border-radius in $border-radius-by-size {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ $chromatic-colors: 'blue', 'red', 'green', 'cobalt', 'orange', 'pink', 'purple';
/* border-radius */
&:where(.shape-rectangle) {
$border-radius-by-size: (
xs: var(--alpha-dimension-6),
s: var(--alpha-dimension-7),
m: var(--alpha-dimension-10),
l: var(--alpha-dimension-12),
xl: var(--alpha-dimension-14),
xs: var(--alpha-radius-6),
s: var(--alpha-radius-7),
m: var(--alpha-radius-10),
l: var(--alpha-radius-12),
xl: var(--alpha-radius-14),
);

@each $size, $border-radius in $border-radius-by-size {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}

&:where(.shape-rectangle) {
border-radius: var(--alpha-dimension-10);
border-radius: var(--alpha-radius-10);
}

&:where(.shape-capsule) {
Expand Down
218 changes: 0 additions & 218 deletions packages/bezier-tokens/src/alpha/global/dimension.json

This file was deleted.

60 changes: 60 additions & 0 deletions packages/bezier-tokens/src/alpha/global/radius.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"radius": {
"2": {
"value": "2px",
"type": "dimension"
},
"3": {
"value": "3px",
"type": "dimension"
},
"4": {
"value": "4px",
"type": "dimension"
},
"6": {
"value": "6px",
"type": "dimension"
},
"7": {
"value": "7px",
"type": "dimension"
},
"8": {
"value": "8px",
"type": "dimension"
},
"10": {
"value": "10px",
"type": "dimension"
},
"12": {
"value": "12px",
"type": "dimension"
},
"14": {
"value": "14px",
"type": "dimension"
},
"16": {
"value": "16px",
"type": "dimension"
},
"20": {
"value": "20px",
"type": "dimension"
},
"32": {
"value": "32px",
"type": "dimension"
},
"rounded-half": {
"value": "9999px",
"type": "dimension"
},
"smooth-corner": {
"value": "42%",
"type": "dimension"
}
}
}

0 comments on commit 9fc055d

Please sign in to comment.