Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
YannLynn committed Dec 16, 2024
2 parents b6216f4 + 2c43674 commit 6de732f
Show file tree
Hide file tree
Showing 32 changed files with 313 additions and 224 deletions.
12 changes: 12 additions & 0 deletions content/start/changelog/index-en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ Version:Major.Minor.Patch (follow the **Semver** specification)

---


#### 🎉 2.71.2 (2024-12-13)
- 【Fix】
- Remove redundant calculations to determine whether the properties have changed when the Collapsible component is updated. [#2631](https://github.com/DouyinFE/semi-design/pull/2631)
- Fixed the issue where in react18, regardless of whether animation is on or not, when the mouse is quickly moved over the tooltip trigger, the DOM would become transparent but not disappear, causing the page element to be unclickable [#2605](https://github.com/DouyinFE/semi-design/pull/2605)
- Fixed the problem that the dynamic mode change of the Chat component did not take effect [#2625](https://github.com/DouyinFE/semi-design/pull/2625)
- Set the max-width of the img node of the image preview to none to avoid enlargement display errors when using tailwind at the same time. [#2624](https://github.com/DouyinFE/semi-design/pull/2624)

#### 🎉 2.71.1 (2024-12-11)
- 【Feat】
- Button icon mode add $height-button_iconOnly_small $width-button_iconOnly_small $height-button_iconOnly_default $width-button_iconOnly_default $height-button_iconOnly_large $width-button_iconOnly_large token [#2618](https://github.com/DouyinFE/semi-design/pull/2618)

#### 🎉 2.71.0 (2024-12-06)
- 【Fix】
- For invisible Tooltips, position calculation is not performed when resizing [#2606](https://github.com/DouyinFE/semi-design/pull/2606)
Expand Down
11 changes: 11 additions & 0 deletions content/start/changelog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ Semi 版本号遵循 **Semver** 规范(主版本号-次版本号-修订版本
- 不同版本间的详细关系,可查阅 [FAQ](/zh-CN/start/faq)


#### 🎉 2.71.2 (2024-12-13)
- 【Fix】
- 去除 Collapsible 组件更新时多余的属性前后是否变化对比 [#2631](https://github.com/DouyinFE/semi-design/pull/2631)
- 修复在 React18 下无论是否动画开启,快速移动鼠标在 tooltip trigger 上时,概率性 dom 只透明但不消失,导致无法点击页面元素的问题 [#2605](https://github.com/DouyinFE/semi-design/pull/2605)
- 修复 Chat 组件 mode 动态变化未生效问题 [#2625](https://github.com/DouyinFE/semi-design/pull/2625)
- 设置图片预览的 img 节点的 max-width 为 none,避免同时使用 tailwind 时放大显示错误问题 [#2624](https://github.com/DouyinFE/semi-design/pull/2624)

#### 🎉 2.71.1 (2024-12-11)
- 【Feat】
- 图标模式按钮新增 $height-button_iconOnly_small $width-button_iconOnly_small $height-button_iconOnly_default $width-button_iconOnly_default $height-button_iconOnly_large $width-button_iconOnly_large token [#2618](https://github.com/DouyinFE/semi-design/pull/2618)

#### 🎉 2.71.0 (2024-12-06)
- 【Fix】
- 对于非展示状态的 Tooltip,页面尺寸变化时不做位置计算 [#2606](https://github.com/DouyinFE/semi-design/pull/2606)
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"useWorkspaces": true,
"npmClient": "yarn",
"version": "2.71.0"
"version": "2.71.2"
}
6 changes: 3 additions & 3 deletions packages/semi-animation-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-animation-react",
"version": "2.71.0",
"version": "2.71.2",
"description": "motion library for semi-ui-react",
"keywords": [
"motion",
Expand All @@ -25,8 +25,8 @@
"prepublishOnly": "npm run build:lib"
},
"dependencies": {
"@douyinfe/semi-animation": "2.71.0",
"@douyinfe/semi-animation-styled": "2.71.0",
"@douyinfe/semi-animation": "2.71.2",
"@douyinfe/semi-animation-styled": "2.71.2",
"classnames": "^2.2.6"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-animation-styled/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-animation-styled",
"version": "2.71.0",
"version": "2.71.2",
"description": "semi styled animation",
"keywords": [
"semi",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-animation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-animation",
"version": "2.71.0",
"version": "2.71.2",
"description": "animation base library for semi-ui",
"keywords": [
"animation",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-eslint-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-semi-design",
"version": "2.71.0",
"version": "2.71.2",
"description": "semi ui eslint plugin",
"keywords": [
"semi",
Expand Down
6 changes: 6 additions & 0 deletions packages/semi-foundation/button/iconButton.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ $module: #{$prefix}-button;
padding-right: $spacing-button_iconOnly_default-paddingRight;
padding-top: $spacing-button_iconOnly_default-paddingTop;
padding-bottom: $spacing-button_iconOnly_default-paddingRight;
height: $height-button_iconOnly_default;
width: $width-button_iconOnly_default;
justify-content: center;
align-items: center;

Expand All @@ -45,13 +47,17 @@ $module: #{$prefix}-button;
padding-right: $spacing-button_iconOnly_small-paddingRight;
padding-top: $spacing-button_iconOnly_small-paddingTop;
padding-bottom: $spacing-button_iconOnly_small-paddingBottom;
height: $height-button_iconOnly_small;
width: $width-button_iconOnly_small;
}

&-large {
padding-left: $spacing-button_iconOnly_large-paddingLeft;
padding-right: $spacing-button_iconOnly_large-paddingRight;
padding-top: $spacing-button_iconOnly_large-paddingTop;
padding-bottom: $spacing-button_iconOnly_large-paddingBottom;
height: $height-button_iconOnly_large;
width: $width-button_iconOnly_large;
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions packages/semi-foundation/button/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ $spacing-button_iconOnly_small-paddingLeft: $spacing-extra-tight; // 图标按
$spacing-button_iconOnly_small-paddingRight: $spacing-extra-tight; // 图标按钮右侧内边距 - 小尺寸
$spacing-button_iconOnly_small-paddingTop: $spacing-extra-tight; // 图标按钮顶部内边距 - 小尺寸
$spacing-button_iconOnly_small-paddingBottom: $spacing-extra-tight; // 图标按钮底部内边距 - 小尺寸
$height-button_iconOnly_small: $height-control-small; // 图标按钮 height - 小尺寸
$width-button_iconOnly_small: $height-control-small; // 图标按钮 width - 小尺寸
$height-button_iconOnly_default:$height-control-default; // 图标按钮 height - 默认
$width-button_iconOnly_default: $height-control-default; // 图标按钮 width - 默认
$height-button_iconOnly_large: $height-control-large; // 图标按钮 height - 大尺寸
$width-button_iconOnly_large: $height-control-large; // 图标按钮 width - 大尺寸

// margin
$spacing-button_iconOnly_content-marginLeft: $spacing-tight; // 按钮左侧图标距离文字间距
Expand Down
7 changes: 4 additions & 3 deletions packages/semi-foundation/carousel/foundation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ export interface CarouselAdapter<P = Record<string, any>, S = Record<string, any
setNewActiveIndex: (activeIndex: number) => void;
setPreActiveIndex: (activeIndex: number) => void;
setIsReverse: (isReverse: boolean) => void;
setIsInit: (isInit: boolean) => void
setIsInit: (isInit: boolean) => void;
getChildren: () => any[]
}

class CarouselFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<CarouselAdapter<P, S>, P, S> {
Expand Down Expand Up @@ -102,7 +103,7 @@ class CarouselFoundation<P = Record<string, any>, S = Record<string, any>> exten
}

getValidIndex(index: number): number {
const { children } = this.getStates();
const children = this._adapter.getChildren();
return (index + children.length) % children.length;
}

Expand All @@ -124,7 +125,7 @@ class CarouselFoundation<P = Record<string, any>, S = Record<string, any>> exten

handleAutoPlay(): void {
const { autoPlay } = this.getProps();
const { children } = this.getStates();
const children = this._adapter.getChildren();
const autoPlayType = typeof autoPlay;
// when user manually call the play function, force play
// only when carousel children length > 1 to start play
Expand Down
6 changes: 6 additions & 0 deletions packages/semi-foundation/image/image.scss
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,12 @@ $module: #{$prefix}-image;
// transition: transform $transition_duration-image_preview_image_img $transition_delay-image_preview_image_img;
z-index: 0;
user-select: none;
/**
* In tailwind, the max-width of img/video is set to 100%,
* which will affect the amplification effect of the picture.
* So we need to set max-width to none.
*/
max-width: none;
}

&-spin {
Expand Down
6 changes: 3 additions & 3 deletions packages/semi-foundation/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@douyinfe/semi-foundation",
"version": "2.71.0",
"version": "2.71.2",
"description": "",
"scripts": {
"build:lib": "node ./scripts/compileLib.js",
"prepublishOnly": "npm run build:lib"
},
"dependencies": {
"@douyinfe/semi-animation": "2.71.0",
"@douyinfe/semi-json-viewer-core": "2.71.0",
"@douyinfe/semi-animation": "2.71.2",
"@douyinfe/semi-json-viewer-core": "2.71.2",
"@mdx-js/mdx": "^3.0.1",
"async-validator": "^3.5.0",
"classnames": "^2.2.6",
Expand Down
3 changes: 2 additions & 1 deletion packages/semi-foundation/tooltip/foundation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e

_togglePortalVisible(isVisible: boolean) {
const nowVisible = this.getState('visible');
if (nowVisible !== isVisible) {
const isInsert = this.getState("isInsert");
if (nowVisible !== isVisible || isInsert !== isVisible) {
this._adapter.togglePortalVisible(isVisible, () => {
if (isVisible) {
this._adapter.setInitialFocus();
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-icons-lab/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-icons-lab",
"version": "2.71.0",
"version": "2.71.2",
"description": "semi icons lab",
"keywords": [
"semi",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-icons/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-icons",
"version": "2.71.0",
"version": "2.71.2",
"description": "semi icons",
"keywords": [
"semi",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-illustrations/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-illustrations",
"version": "2.71.0",
"version": "2.71.2",
"description": "semi illustrations",
"keywords": [
"semi",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-json-viewer-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-json-viewer-core",
"version": "2.71.0",
"version": "2.71.2",
"description": "",
"main": "lib/index.js",
"module": "lib/index.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/semi-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-next",
"version": "2.71.0",
"version": "2.71.2",
"description": "Plugin that support Semi Design in Next.js",
"author": "伍浩威 <wuhaowei.whw@bytedance.com>",
"homepage": "",
Expand All @@ -22,7 +22,7 @@
"typescript": "^4"
},
"dependencies": {
"@douyinfe/semi-webpack-plugin": "2.71.0"
"@douyinfe/semi-webpack-plugin": "2.71.2"
},
"gitHead": "eb34a4f25f002bb4cbcfa51f3df93bed868c831a"
}
2 changes: 1 addition & 1 deletion packages/semi-rspack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-rspack-plugin",
"version": "2.71.0",
"version": "2.71.2",
"description": "",
"homepage": "",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-scss-compile/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-scss-compile",
"version": "2.71.0",
"version": "2.71.2",
"description": "compile semi scss to css",
"author": "daiqiang@bytedance.com",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-theme-default/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-theme-default",
"version": "2.71.0",
"version": "2.71.2",
"description": "semi-theme-default",
"keywords": [
"semi-theme",
Expand Down
21 changes: 20 additions & 1 deletion packages/semi-ui/carousel/_story/carousel.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -517,4 +517,23 @@ export const OnlyOneChildrenNotPlay = () => (
<h3>1</h3>
</div>
</Carousel>
);
);

export const renderStateInChildren = () => {
const [curIndex, setCurIndex] = useState(0);

return (
<Carousel style={style}
autoPlay={false}
activeIndex={curIndex}
onChange={(index) => {setCurIndex(index)}}>
{[1, 2, 3, 4].map((src, index) => {
return (
<div style={contentPinkStyle} key={index}>
{curIndex}
</div>
)
})}
</Carousel>
)
};
Loading

0 comments on commit 6de732f

Please sign in to comment.