-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'alpha' into refactor/bezier-codemod-directory
- Loading branch information
Showing
99 changed files
with
2,143 additions
and
2,016 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@channel.io/bezier-react": minor | ||
--- | ||
|
||
Fixes style inheritance issues by explicitly giving CSS custom properties an initial value. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@channel.io/bezier-react": minor | ||
--- | ||
|
||
Remove `borderStyle` prop from Layout props. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
"@channel.io/bezier-react": major | ||
--- | ||
|
||
`AlphaStack` component has been changed to a `Stack` component, and `Stack` component has been changed to `LegacyStack` component. Changes to remove the dependency of `Stack` and `StackItem` to allow stack layouts to be configured without additional DOM elements. And improved the existing `AlphaStack` to support more Flex layout related properties like reverse, wrap, and more align options, etc. See StackProps for more information. | ||
|
||
We also added new `HStack` and `VStack` components, which are shorthand components that fix the direction prop of `AlphaStack`. As mentioned above, the existing components become `LegacyHStack`, `LegacyVStack`. | ||
|
||
The layout implemented by `StackItem` can be partially replaced by the Layout component's `grow`, `shrink` common properties and margin common properties. Note that the `align`, `justify` (align-self, justify-self in CSS flex) properties provided by `StackItem` are not provided by the Layout component. | ||
|
||
```jsx | ||
/* AS-IS */ | ||
return ( | ||
<Stack direction="horizontal" spacing={8} style={{ width: 300, height: 50 }}> | ||
<StackItem grow shrink weight={1} /> | ||
<StackItem weight={0} size={10} marginBefore={20}> | ||
<Stack direction="vertical" /> | ||
</StackItem> | ||
</Stack> | ||
) | ||
|
||
/* TO-BE */ | ||
return ( | ||
<Stack direction="horizontal" spacing={8} width={300} height={50}> | ||
<Box grow={1} shrink={1} /> | ||
<Stack direction="vertical" shrink={0} width={10} ml={12} /> | ||
</Stack> | ||
) | ||
``` | ||
|
||
The changes also apply to other components that use `Stack` internally, and there are a few changes. | ||
|
||
- `RadioGroup` component no longer supports `as` prop. | ||
- `ButtonGroup` component now extends the interfaces of new `Stack`. It no longer supports `as` prop. | ||
- `FormGroup` component now extends the interfaces of new `Stack`. It no longer supports `as` prop. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 0 additions & 73 deletions
73
packages/bezier-react/src/components/AlphaStack/AlphaStack.stories.tsx
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
packages/bezier-react/src/components/AlphaStack/AlphaStack.styled.ts
This file was deleted.
Oops, something went wrong.
61 changes: 0 additions & 61 deletions
61
packages/bezier-react/src/components/AlphaStack/AlphaStack.test.tsx
This file was deleted.
Oops, something went wrong.
77 changes: 0 additions & 77 deletions
77
packages/bezier-react/src/components/AlphaStack/AlphaStack.tsx
This file was deleted.
Oops, something went wrong.
44 changes: 0 additions & 44 deletions
44
packages/bezier-react/src/components/AlphaStack/AlphaStack.types.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.