¥Releases
Radix Primitives 版本及其更新日志。
¥May 5, 2025
此版本在预览版中引入了一个全新基础组件:PasswordToggleField
。
¥This release introduces a brand new primitive in preview: PasswordToggleField
.
这个新的基础组件提供了用于渲染密码输入框以及用于切换其可见性的按钮的组件。除了其主要功能外,它还包括:
¥This new primitive provides components for rendering a password input alongside a button to toggle its visibility. Aside from its primary functionality, it also includes:
使用指针切换时将焦点返回到输入框
¥Returning focus to the input when toggling with a pointer
使用键盘或虚拟导航切换时保持焦点
¥Maintaining focus when toggling with keyboard or virtual navigation
表单提交后将可见性重置为隐藏状态,以防止意外存储
¥Resetting visibility to hidden after form submission to prevent accidental storage
基于图标的切换按钮的隐式可访问标签
¥Implicit accessible labeling for icon-based toggle buttons
此 API 目前不稳定,我们希望你能帮助我们测试!使用 unstable_
前缀导入基础组件。
¥This API is currently unstable, and we hope you'll help us test it out! Import the primitive using the unstable_
prefix.
¥Other updates
将不稳定的 Provider
、Trigger
和 BubbleInput
部件添加到复选框 (#3459)
¥Add unstable Provider
, Trigger
and BubbleInput
parts to Checkbox (#3459)
将默认输入类型更新为 text
并传递给底层输入元素 (#3510)
¥Update default input type to text
and pass to the underlying input element (#3510)
¥April 22, 2025
更新 use-sync-external-store
的依赖,以确保入口点有效 – #3491
¥Update the dependency for use-sync-external-store
to ensure entrypoint is valid – #3491
¥April 17, 2025
此版本在预览版中引入了一个全新基础组件:OneTimePasswordField
。
¥This release introduces a brand new primitive in preview: OneTimePasswordField
.
这组新组件旨在实现一种通用的设计模式,即一次性密码字段显示为每个字符的单独输入字段。此 UI 实现起来看似复杂,但其交互方式却符合用户的预期。新的基础组件可为你处理所有这些复杂性,包括:
¥This new group of components are designed to implement a common design pattern for one-time password fields displayed as separate input fields for each character. This UI is deceptively complex to implement in such a way that interactions follow user expectations. The new primitive handles all of this complexity for you, including:
键盘导航模仿单个输入字段的行为
¥Keyboard navigation mimicking the behavior of a single input field
粘贴时覆盖值
¥Overriding values on paste
密码管理器自动填充支持
¥Password manager autofill support
数字和字母数字值的输入验证
¥Input validation for numeric and alphanumeric values
完成时自动提交
¥Auto-submit on completion
焦点管理
¥Focus management
隐藏输入框,为表单数据提供单一值
¥Hidden input to provide a single value to form data
由于这是预览版本,API 目前不稳定。我们希望你能帮助我们测试,并告诉我们测试结果。
¥As this is a preview release, the API is currently unstable. We hope you'll help us test it out and let us know how it goes.
使用 unstable_
前缀导入基础组件。
¥Import the primitive using the unstable_
prefix.
¥Other updates
所有带有内部气泡输入的表单控件现在默认使用 Radix Primitive
组件。这将使我们能够在未来的版本中公开这些组件,以便用户将来可以更好地控制此行为。
¥All form controls with internal bubble inputs now use the Radix Primitive
component by default. This will allow us to expose these components in a future release so users can better control this behavior in the future.
对 useControllableState
进行细微改进,以提高性能,减少 bug 的暴露区域,并在误用时记录警告
¥Minor improvements to useControllableState
to enhance performance, reduce surface area for bugs, and log warnings when misused
¥April 8, 2025
改进了 Tooltip 提供程序 – #2720 的渲染性能
¥Improved rendering performance for the Tooltip provider – #2720
确保在触发器 – #3380 上触发 pointerdown
时工具提示已关闭
¥Ensure Tooltip is closed when pointerdown
is fired on the trigger – #3380
在 Avatar 图片 – #3261 中添加对 crossOrigin
的支持
¥Add support for crossOrigin
in Avatar images – #3261
修复图片已缓存时头像闪烁的问题 – #3008
¥Fix Avatar flashing when an image is already cached – #3008
改进 displayName
以便更好地调试可插槽组件 – #3441
¥Improve displayName
for better debugging of slottable components – #3441
¥February 5, 2025
更新依赖,以移除 react
和 react-dom
– #3350 的同级依赖警告
¥Updated dependencies to remove peer dependency warnings for react
and react-dom
– #3350
当子组件为 Fragment
– #3229 时,跳过将引用转发到 SlotClone
¥Skip forwarding refs to SlotClone
when the child is a Fragment
– #3229
¥January 22, 2025
添加了一个 radix-ui
包,可从一处访问所有 Radix 基元的最新版本。这个可摇树优化的入口点让你可以更轻松地引入所需的任何组件并使其保持最新,而无需担心冲突或重复的依赖。
¥Added a radix-ui
package that exposes the latest version of all Radix Primitives from a single place. This tree-shakable entrypoint makes it easier to bring in whatever components you need and keep them up-to-date without worrying about conflicting or duplicate dependencies.
更新以下组件的 aria-hidden
和 react-remove-scroll
依赖:
¥Updated aria-hidden
and react-remove-scroll
dependencies for the following components:
警告对话框
¥Alert Dialog
上下文菜单
¥Context Menu
对话框
¥Dialog
下拉菜单
¥Dropdown Menu
悬停卡片
¥Hover Card
菜单栏
¥Menubar
导航菜单
¥Navigation Menu
弹出框
¥Popover
选择
¥Select
提示框
¥Toast
工具提示
¥Tooltip
¥October 1, 2024
检查图片加载状态 – #2772 时检查 referrerPolicy
。
¥Check for referrerPolicy
when checking the image loading status – #2772
修复 defaultChecked
因不受控制的复选框 – #2135 而意外更改的错误。
¥Fix a bug where defaultChecked
unexpectedly changed for uncontrolled checkboxes – #2135
将 form
属性转发到气泡输入元素,以修复非父级表单提交问题 – #3161
¥Forward the form
prop to the bubble input element to fix non-parent form submissions – #3161
将 form
属性转发到气泡输入元素,以修复非父级表单提交问题 – #3161
¥Forward the form
prop to the bubble input element to fix non-parent form submissions – #3161
修复 asChild
属性在 Viewport
– #2945 上无法正常工作的问题
¥Fix asChild
prop not working as expected on the Viewport
– #2945
更新内部样式以修复 Viewport
– #2945 的其他问题
¥Update internal styles to fix other issues with Viewport
– #2945
修复项目初始未定义时抛出的错误 – #2623
¥Fix error thrown when items are initially undefined – #2623
修复触摸设备的几个错误 – #2939
¥Fix several bugs for touch devices – #2939
将 form
属性转发到气泡输入元素,以修复非父级表单提交问题 – #3161
¥Forward the form
prop to the bubble input element to fix non-parent form submissions – #3161
修复长项目弹出窗口可能在屏幕外启动的位置错误 – #3149
¥Fix position bug where popover may start off-screen for long items – #3149
将根 form
属性转发到每个缩略图的气泡输入元素,以修复非父级表单提交问题 – #3161
¥Forward the root form
prop to each thumb's bubble input element to fix non-parent form submissions – #3161
将 form
属性转发到气泡输入元素,以修复非父级表单提交问题 – #3161
¥Forward the form
prop to the bubble input element to fix non-parent form submissions – #3161
¥June 28, 2024
导出 CheckedState
类型
¥Export CheckedState
type
导出 TooltipProviderProps
类型
¥Export TooltipProviderProps
type
¥June 21, 2024
为 package.json
添加一个缺失的内部实用程序。提供 Portal 部分的相应软件包也收到了补丁更新。
¥Add a missing internal utility to package.json
. The corresponding packages that provide a Portal part also received a patch update. – #2966
¥June 19, 2024
已发布所有基础组件的次要版本,并进行了以下更改:
¥Released minor versions for all primitives with the following changes:
完全兼容 React 19 – #2952
¥Full React 19 compatability – #2952
完全兼容 RSC 的 – #2923
¥Full RSC compatibility – #2923
更新并固定 react-remove-scroll
依赖版本,以避免在 – #2776 边缘情况下出现双滚动条错误
¥Update and pin react-remove-scroll
dependency version to avoid double scrollbar bugs in edge cases – #2776
悬停时不滚动菜单项 – #2451
¥Don’t scroll menu items in response to hover – #2451
确保按下 Esc 键时关闭的组件能够捕获相应的键盘事件。如果你需要在另一个组件中更好地控制 Radix 组件的渲染(该组件在按下 Esc 键时关闭),则可以在 onEscapeKeyDown
中调用 stopPropagation
。
¥Make sure that components that close on Escape key press capture the corresponding keyboard event. This way you can call stopPropagation
in onEscapeKeyDown
if you need more control rendering Radix components within another component that closes on Escape key press.
确保具有移动焦点的组件不会干扰浏览器或系统热键,例如返回导航 – #2739
¥Make sure that components with roving focus do not interfere with browser or system hotkeys, such as back navigation – #2739
确保支持 hideWhenDetached
prop 的组件不允许与隐藏内容 – #2743 – #2745 交互
¥Make sure that components that support hideWhenDetached
prop do not allow interactions with hidden content – #2743 – #2745
当 – #2948 部分缺少可访问的标题时,记录错误
¥Log an error when an accessible title via the Dialog.Title
part is missing – #2948
当 Dialog.Description
部分缺少可访问的描述时,记录警告
¥Log a warning when an accessible description via the Dialog.Description
part is missing – #2948
确保点击数字输入框的加载控件时,组件不会干扰操作。
¥Make sure that the component doesn’t interfere when clicking on the spinner of a number input
移除不受支持的 disableOutsidePointerEvents
属性
¥Remove unsupported disableOutsidePointerEvents
prop
明确允许 value={undefined}
表示不确定状态,与当前的实际行为 – #2947 一致
¥Explicitly allow value={undefined}
to represent an indeterminate state, matching the current practical behaviour – #2947
添加 nonce
属性,以便能够将 CSP nonce 传递给内联样式 – #2728
¥Add nonce
prop to be able to pass CSP nonce to the inline styles – #2728
添加 nonce
属性,以便能够将 CSP nonce 传递给内联样式 – #2728
¥Add nonce
prop to be able to pass CSP nonce to the inline styles – #2728
¥September 25, 2023
修复在 – #2177 外部点击时指针事件的问题
¥Fix pointer-events issue when clicking outside – #2177
修复 Portal
部分类型在接受 DOM 属性时出现错误的问题 – #2178
¥Fix Portal
part types lying about accepting DOM props – #2178
修复在 – #2177 外部点击时指针事件的问题
¥Fix pointer-events issue when clicking outside – #2177
修复 Portal
部分类型在接受 DOM 属性时出现错误的问题 – #2178
¥Fix Portal
part types lying about accepting DOM props – #2178
修复在 – #2177 外部点击时指针事件的问题
¥Fix pointer-events issue when clicking outside – #2177
修复 Portal
部分类型在接受 DOM 属性时出现错误的问题 – #2178
¥Fix Portal
part types lying about accepting DOM props – #2178
修复在 – #2177 外部点击时指针事件的问题
¥Fix pointer-events issue when clicking outside – #2177
修复 Portal
部分类型在接受 DOM 属性时出现错误的问题 – #2178
¥Fix Portal
part types lying about accepting DOM props – #2178
修复在 – #2177 外部点击时指针事件的问题
¥Fix pointer-events issue when clicking outside – #2177
修复 Portal
部分类型在接受 DOM 属性时出现错误的问题 – #2178
¥Fix Portal
part types lying about accepting DOM props – #2178
修复在 – #2177 外部点击时指针事件的问题
¥Fix pointer-events issue when clicking outside – #2177
修复 Portal
部分类型在接受 DOM 属性时出现错误的问题 – #2178
¥Fix Portal
part types lying about accepting DOM props – #2178
修复在 – #2177 外部点击时指针事件的问题
¥Fix pointer-events issue when clicking outside – #2177
修复 Portal
部分类型在接受 DOM 属性时出现错误的问题 – #2178
¥Fix Portal
part types lying about accepting DOM props – #2178
修复在 – #2177 外部点击时指针事件的问题
¥Fix pointer-events issue when clicking outside – #2177
修复 Portal
部分类型在接受 DOM 属性时出现错误的问题 – #2178
¥Fix Portal
part types lying about accepting DOM props – #2178
修复嵌套在 Dialog
中的 Popover
无法打开的问题 – #2182
¥Fix Popover
nested inside Dialog
not opening – #2182
[Breaking] 添加使用 ""
value
重置为占位符的功能。请注意,只有当你使用的 value
为 ""
的选项时,这才是重大变更。
¥[Breaking] Add ability to reset to placeholder using ""
value
. Note that this is only a breaking change if you were using an option with a value
of ""
. – #2174
修复在 – #2177 外部点击时指针事件的问题
¥Fix pointer-events issue when clicking outside – #2177
修复 Portal
部分类型在接受 DOM 属性时出现错误的问题 – #2178
¥Fix Portal
part types lying about accepting DOM props – #2178
修复在 – #2177 外部点击时指针事件的问题
¥Fix pointer-events issue when clicking outside – #2177
修复 Portal
部分类型在接受 DOM 属性时出现错误的问题 – #2178
¥Fix Portal
part types lying about accepting DOM props – #2178
修复边界填充计算问题 – #2185
¥Fix issue with boundary padding calculations – #2185
添加选项,用于始终动态重新定位 Content
– #2092
¥Add option to always re-position Content
on the fly – #2092
¥May 26, 2023
此版本确保我们所有的基础组件都与 ESM 兼容。我们还将所有 popper 定位的基础组件更新到了 浮动 UI 的最新版本。
¥This release ensures all of our primitives are ESM compatible. We have also updated to the latest version of Floating UI for all of our popper-positioned primitives.
改进 ESM 兼容性 – #2130
¥Improve ESM compatibility – #2130
修复可能存在的上游编译器错误(@types/react
幻像依赖)– #1896
¥Fix possible upstream compiler errors (@types/react
phantom dependency) – #1896
防止在 Safari 中使用触发器关闭菜单时重新打开非模态对话框 – #2110
¥Prevent non-modal dialog from re-opening when closing using trigger in Safari – #2110
确保在删除聚焦项时保持焦点捕获 – #2145
¥Ensure focus trapping is maintained when the focused item is deleted – #2145
匹配触发器大小 – #1995 时正确定位内容
¥Position content correctly when matching trigger size – #1995
防止在 Safari 中使用触发器关闭菜单时再次打开非模态弹出窗口 – #2110
¥Prevent non-modal popover from re-opening when closing using trigger in Safari – #2110
确保使用 collisionBoundary
时 --radix-popper-available-width
计算正确 – #2032
¥Ensure --radix-popper-available-width
is calculated correctly when using collisionBoundary
– #2032
匹配触发器大小 – #1995 时正确定位内容
¥Position content correctly when matching trigger size – #1995
改进滚动按钮的触摸屏支持 – #1771
¥Improve scroll buttons touch screen support – #1771
匹配触发器大小 – #1995 时正确定位内容
¥Position content correctly when matching trigger size – #1995
改进大内容悬停性能 – #2155
¥Improve large content hoverability – #2155
¥March 8, 2023
此版本在预览版中引入了一个全新基础组件:Form
。
¥This release introduces a brand new primitive in preview: Form
.
¥February 24, 2023
公开新的 CSS 自定义属性以启用尺寸约束 – #1942
¥Expose new CSS custom properties to enable size constraints – #1942
按下 Esc 键从子菜单关闭时不退出全屏模式 – #1752
¥Don't exit fullscreen mode when pressing escape to dismiss from submenu – #1752
在 ContextMenu.CheckboxItem
– #1778 上放宽 onCheckedChange
类型
¥Relax onCheckedChange
type on ContextMenu.CheckboxItem
– #1778
公开新的 CSS 自定义属性以启用尺寸约束 – #1942
¥Expose new CSS custom properties to enable size constraints – #1942
按下 Esc 键从子菜单关闭时不退出全屏模式 – #1752
¥Don't exit fullscreen mode when pressing escape to dismiss from submenu – #1752
在 DropdownMenu.CheckboxItem
– #1778 上放宽 onCheckedChange
类型
¥Relax onCheckedChange
type on DropdownMenu.CheckboxItem
– #1778
公开新的 CSS 自定义属性以启用尺寸约束 – #1943
¥Expose new CSS custom properties to enable size constraints – #1943
按下 Esc 键从子菜单关闭时不退出全屏模式 – #1752
¥Don't exit fullscreen mode when pressing escape to dismiss from submenu – #1752
在 Menubar.CheckboxItem
– #1778 上放宽 onCheckedChange
类型
¥Relax onCheckedChange
type on Menubar.CheckboxItem
– #1778
¥January 17, 2023
此版本引入了一个全新基础组件:Menubar
。它还增加了对 Select
中一项呼声极高的新功能的支持:能够以类似于 Popover
或 DropdownMenu
的方式定位内容。
¥This release introduces a brand new primitive: Menubar
. It also adds support for a highly requested feature for Select
: the ability to position the content in a similar way to Popover
or DropdownMenu
.
使用新的 orientation
属性添加水平方向支持,并为 dir
– #1850 添加 RTL 支持。
¥Add horizontal orientation support with new orientation
prop, as well as RTL support with dir
– #1850
将 position
属性添加到 Select.Content
,以启用 popper 定位 – #1853
¥Add position
prop to Select.Content
to enable popper positioning – #1853
¥December 14, 2022
¥November 15, 2022
修复在运行 Firefox – #1753 时 Cypress 中无效的 pointerId
问题
¥Fix invalid pointerId
in Cypress when running Firefox – #1753
¥October 17, 2022
修复 Firefox 和 Safari 中的初始动画播放问题 – #1710
¥Fix initial animation playback in Firefox and Safari – #1710
修复 Firefox – #1550 中文本区域元素无法滚动的问题
¥Fix issue with textarea elements not being scrollable in Firefox – #1550
修复 Firefox 和 Safari 中的初始动画播放问题 – #1710
¥Fix initial animation playback in Firefox and Safari – #1710
[Breaking] 添加对 ContextMenu.CheckboxItem
不确定状态的支持。请注意,只有当你当前正在使用 CheckboxItem
部分并且你的代码库是用 TypeScript 编写的时,这才是重大变更。
¥[Breaking] Add support for indeterminate state on ContextMenu.CheckboxItem
. Note that this is only a breaking change if you are currently using the CheckboxItem
part and your codebase is written in TypeScript. – #1624
修复 Firefox – #1550 中文本区域元素无法滚动的问题
¥Fix issue with textarea elements not being scrollable in Firefox – #1550
[Breaking] 添加对 DropdownMenu.CheckboxItem
不确定状态的支持。请注意,只有当你当前正在使用 CheckboxItem
部分并且你的代码库是用 TypeScript 编写的时,这才是重大变更。
¥[Breaking] Add support for indeterminate state on DropdownMenu.CheckboxItem
. Note that this is only a breaking change if you are currently using the CheckboxItem
part and your codebase is written in TypeScript. – #1624
正确将 DropdownMenu.Trigger
打开状态与 aria-expanded
关闭状态配对 – #1644
¥Correctly pair DropdownMenu.Trigger
open state with aria-expanded
when closed – #1644
修复使用 asChild
– #1647 时项目立即选择的问题
¥Fix issue with eager selection of items when using asChild
– #1647
修复在单独的弹出窗口中使用组件时组件被关闭的问题 – #1677
¥Fix issue with dismissing when the component is used in a separate popup window – #1677
[Breaking] 移除 useLabelContext
并支持完全自定义控件。为了使原生标签能够正常工作,请确保你的自定义控件基于原生元素,例如 button
或 input
。
¥[Breaking] Remove useLabelContext
and support for fully custom controls. For native labelling to work, ensure your custom controls are based on native elements such as button
or input
. – #1686
使用原生 label
元素改进原生行为 – #1686
¥Improve native behavior by using the native label
element – #1686
防止使用退出键关闭菜单后再次使用指针打开菜单 – #1579
¥Prevent menu from re-opening with the pointer after being dismissed with escape – #1579
将 delayDuration
和 skipDelayDuration
属性添加到 NavigationMenu.Root
。请注意,默认情况下,触发器现在在打开前会有短暂的延迟,以改善用户体验,你可以使用提供的属性进行修改。
¥Add delayDuration
and skipDelayDuration
props to NavigationMenu.Root
. Note that by default, triggers now have a brief delay before opening in order to improve UX, this can be modified using the props provided. – #1716
将 disabled
属性添加到 RadioGroup.Root
– #1530
¥Add disabled
prop to RadioGroup.Root
– #1530
修复所有项目均已禁用时 RadioGroup.Root
可聚焦的问题 – #1530
¥Fix issue where RadioGroup.Root
was focusable when all items were disabled – #1530
将 disabled
属性添加到 Select.Root
– #1699
¥Add disabled
prop to Select.Root
– #1699
将 required
属性添加到 Select.Root
– #1598
¥Add required
prop to Select.Root
– #1598
在 Slider.Root
– #1695 上使用新的 inverted
属性添加可视化反转滑块的功能。
¥Add ability to visually invert the slider using the new inverted
prop on Slider.Root
– #1695
将 onValueCommit
属性添加到 Slider.Root
以便更好地处理 – #1696 中的离散值变化
¥Add onValueCommit
prop to Slider.Root
to better handle discrete value changes – #1696
修复屏幕阅读器读出 "group" 而不是 "status" – #1556 的回归问题
¥Fix regression with screen readers announcing as "group" rather than "status" – #1556
修复 ref
子元素赋值返回 null
的回归问题 – #1668
¥Fix regression with ref
assignments on child elements returning null
– #1668
将 onPause
和 onResume
属性添加到 Toast.Root
– #1669
¥Add onPause
and onResume
props to Toast.Root
– #1669
修复计时器重置问题,该问题在某些情况下会导致 Toast 提前消失 – #1682
¥Fix timer reset issue which would cause toasts to dismiss early in some cases – #1682
确保在打开计时器到期之前与触发器交互时不会打开工具提示 – #1693
¥Ensure tooltip doesn't open if interacting with the trigger before the open timer expires – #1693
¥July 21, 2022
从此版本开始,我们开始严格遵循语义版本控制。所有基础组件现在都已版本化为 1.0.0。
¥With this release, we start following semantic versioning strictly. All primitives are now versioned 1.0.0.
我们还将 Select
、Toast
和 NavigationMenu
从预览版迁移到稳定版。
¥We also move the Select
, Toast
and NavigationMenu
from preview to stable.
改进对 React 18 的支持 – #1329
¥Improve support for React 18 – #1329
[Breaking] 提升 RTL 性能。如果你依赖于从文档(或任何元素)继承 dir
属性,则需要使用 DirectionProvider
。
¥[Breaking] Improve RTL performance. You need to use DirectionProvider
if you were relying on dir
attribute inheritance from document (or any element). – #1119
[Breaking] 移除 allowPinchZoom
属性,现在默认为 true
– #1514
¥[Breaking] Remove allowPinchZoom
prop, now defaults to true
– #1514
提升与 AlertDialog.Portal
– #1075 上 forceMount
与 JS 动画库的兼容性
¥Improve compatibility with JS animation libraries with forceMount
on AlertDialog.Portal
– #1075
修复关闭对话框时/关闭对话框后页面交互性的回归问题 – #1401
¥Fix regressions with page interactivity while/after closing dialog – #1401
[Breaking] 改进上下文菜单的间接嵌套。子菜单现在必须使用显式部分创建。
¥[Breaking] Improve indirect nesting of context menus. Submenus must now be created using explicit parts. – #1394
[Breaking] 移除 allowPinchZoom
属性,现在默认为 true
– #1514
¥[Breaking] Remove allowPinchZoom
prop, now defaults to true
– #1514
[Breaking] 添加新的 Portal
部件。为避免回归问题,如果你需要门户网站行为,请使用此部分。请注意,z-index
不再受管理,因此你可以完全控制分层。
¥[Breaking] Add new Portal
part. To avoid regressions, use this part if you want portalling behavior. Note that z-index
isn't managed anymore so you have full control of layering. – #1429
[Breaking] 从 Arrow
部件 – #1531 中移除 offset
¥[Breaking] Remove offset
on Arrow
part – #1531
[Breaking] 将 Content
部分的 collisionTolerance
重命名为 collisionPadding
,并接受数字或填充对象 – #1531
¥[Breaking] Rename collisionTolerance
to collisionPadding
on Content
part and accepts a number or a padding object – #1531
修复 React 18 – #1378 中出现原生上下文菜单的问题
¥Fix issue with native context menu appearing in React 18 – #1378
添加 data-highlighted
属性以支持 – #1388 样式
¥Add data-highlighted
attribute to support styling – #1388
将 data-state
属性添加到 Trigger
部分 – #1455
¥Add data-state
attribute to Trigger
part – #1455
在 Content
部分 – #1531 上添加 collisionBoundary
、arrowPadding
、sticky
、hideWhenDetached
属性。
¥Add collisionBoundary
, arrowPadding
, sticky
, hideWhenDetached
props on Content
part – #1531
[Breaking] 移除 allowPinchZoom
属性,现在默认为 true
– #1514
¥[Breaking] Remove allowPinchZoom
prop, now defaults to true
– #1514
提升与 Dialog.Portal
– #1075 上 forceMount
与 JS 动画库的兼容性
¥Improve compatibility with JS animation libraries with forceMount
on Dialog.Portal
– #1075
修复关闭对话框时/关闭对话框后页面交互性的回归问题 – #1401
¥Fix regressions with page interactivity while/after closing dialog – #1401
[Breaking] 改进下拉菜单的间接嵌套。子菜单现在必须使用显式部分创建。
¥[Breaking] Improve indirect nesting of dropdown menus. Submenus must now be created using explicit parts. – #1394
[Breaking] 移除 allowPinchZoom
属性,现在默认为 true
– #1514
¥[Breaking] Remove allowPinchZoom
prop, now defaults to true
– #1514
[Breaking] 添加新的 Portal
部件。为避免回归问题,如果你需要门户网站行为,请使用此部分。请注意,z-index
不再受管理,因此你可以完全控制分层。
¥[Breaking] Add new Portal
part. To avoid regressions, use this part if you want portalling behavior. Note that z-index
isn't managed anymore so you have full control of layering. – #1429
[Breaking] 从 Arrow
部件 – #1531 中移除 offset
¥[Breaking] Remove offset
on Arrow
part – #1531
[Breaking] 将 Content
部分的 collisionTolerance
重命名为 collisionPadding
,并接受数字或填充对象 – #1531
¥[Breaking] Rename collisionTolerance
to collisionPadding
on Content
part and accepts a number or a padding object – #1531
添加 data-highlighted
属性以支持 – #1388 样式
¥Add data-highlighted
attribute to support styling – #1388
防止在 Firefox 和 Safari 中按 Esc 键退出全屏模式 – #1423
¥Prevent escape key from exiting fullscreen mode in Firefox & Safari – #1423
在 Content
部分 – #1531 上添加 collisionBoundary
、arrowPadding
、sticky
、hideWhenDetached
属性。
¥Add collisionBoundary
, arrowPadding
, sticky
, hideWhenDetached
props on Content
part – #1531
[Breaking] 添加新的 Portal
部件。为避免回归问题,如果你需要门户网站行为,请使用此部分。请注意,z-index
不再受管理,因此你可以完全控制分层。
¥[Breaking] Add new Portal
part. To avoid regressions, use this part if you want portalling behavior. Note that z-index
isn't managed anymore so you have full control of layering. – #1426
[Breaking] 从 Arrow
部件 – #1531 中移除 offset
¥[Breaking] Remove offset
on Arrow
part – #1531
[Breaking] 将 Content
部分的 collisionTolerance
重命名为 collisionPadding
,并接受数字或填充对象 – #1531
¥[Breaking] Rename collisionTolerance
to collisionPadding
on Content
part and accepts a number or a padding object – #1531
在 Content
部分 – #1531 上添加 collisionBoundary
、arrowPadding
、sticky
、hideWhenDetached
属性。
¥Add collisionBoundary
, arrowPadding
, sticky
, hideWhenDetached
props on Content
part – #1531
确保点击后菜单关闭 NavigationMenu.Link
– #1347
¥Ensure menu closes after clicking NavigationMenu.Link
– #1347
将 onSelect
属性添加到 NavigationMenu.Link
– #1372
¥Add onSelect
prop to NavigationMenu.Link
– #1372
[Breaking] 移除 allowPinchZoom
属性,现在默认为 true
– #1514
¥[Breaking] Remove allowPinchZoom
prop, now defaults to true
– #1514
[Breaking] 添加新的 Portal
部件。为避免回归问题,如果你需要门户网站行为,请使用此部分。请注意,z-index
不再受管理,因此你可以完全控制分层。
¥[Breaking] Add new Portal
part. To avoid regressions, use this part if you want portalling behavior. Note that z-index
isn't managed anymore so you have full control of layering. – #1425
[Breaking] 从 Arrow
部件 – #1531 中移除 offset
¥[Breaking] Remove offset
on Arrow
part – #1531
[Breaking] 将 Content
部分的 collisionTolerance
重命名为 collisionPadding
,并接受数字或填充对象 – #1531
¥[Breaking] Rename collisionTolerance
to collisionPadding
on Content
part and accepts a number or a padding object – #1531
在 Content
部分 – #1531 上添加 collisionBoundary
、arrowPadding
、sticky
、hideWhenDetached
属性。
¥Add collisionBoundary
, arrowPadding
, sticky
, hideWhenDetached
props on Content
part – #1531
[Breaking] 请注意,z-index
不再受管理,因此你可以完全控制分层。提供自定义容器的属性从 containerRef
(ref)演变为 container
(element)。data-radix-portal
已被移除,因为你可以使用 asChild
来控制元素。
¥[Breaking] Note that z-index
isn't managed anymore so you have full control of layering. The prop to provide a custom container evolves from containerRef
(ref) to container
(element). The data-radix-portal
was removed because you can use asChild
to control the element. – #1463
[Breaking] 将 data-state
的值从 active|inactive
重命名为 checked|unchecked
– #1388
¥[Breaking] Renamed data-state
values from active|inactive
to checked|unchecked
– #1388
[Breaking] 添加新的 Portal
部件。为避免回归问题,如果你需要门户网站行为,请使用此部分。请注意,z-index
不再受管理,因此你可以完全控制分层。
¥[Breaking] Add new Portal
part. To avoid regressions, use this part if you want portalling behavior. Note that z-index
isn't managed anymore so you have full control of layering. – #1459
修复在 Select.Content
上使用 asChild
时的位置中断问题 – #1245
¥Fix position breaking when using asChild
on Select.Content
– #1245
改进 Select.Content
有内边距时触发器/内容的对齐方式 – #1312
¥Improve trigger/content alignment when Select.Content
has padding – #1312
修复项目少于 5 个时触发器/内容对齐的问题 – #1355
¥Fix trigger/content alignment when there are less than 5 items – #1355
支持在未提供任何值时触发器/内容对齐 – #1379
¥Support trigger/content alignment when no value is provided – #1379
添加 data-highlighted
属性以支持 – #1388 样式
¥Add data-highlighted
attribute to support styling – #1388
通过 Select.Value
– #1384 上的 placeholder
属性添加对占位符的支持
¥Add support for placeholder via placeholder
prop on Select.Value
– #1384
解决与底层原生 select – #1421 的值不匹配的问题
¥Resolve value mismatch with underlying native select – #1421
[Breaking] 默认的 Toast 顺序已更改,现在它们将按从上到下的顺序呈现 – #1469
¥[Breaking] The default toast order has changed, they now render top to bottom from oldest to newest – #1469
改进使用 asChild
– #1300 时的 Typescript 类型
¥Improve Typescript types when using asChild
– #1300
修复更新 React 的 key
属性时 Toast 重新排序的问题 – #1283
¥Fix issue with toast reordering when updating React's key
prop – #1283
提升与动画库的兼容性 – #1468
¥Improve compatability with animation libraries – #1468
[Breaking] 添加新的 Portal
部件。为避免回归问题,如果你需要门户网站行为,请使用此部分。请注意,z-index
不再受管理,因此你可以完全控制分层。
¥[Breaking] Add new Portal
part. To avoid regressions, use this part if you want portalling behavior. Note that z-index
isn't managed anymore so you have full control of layering. – #1427
[Breaking] 默认情况下,Tooltip.Content
在悬停时将保持打开状态(符合 WCAG 2.1 悬停内容规范)。可以将 disableHoverableContent
传递给 Tooltip.Provider
以恢复之前的行为 – #1490
¥[Breaking] By default Tooltip.Content
will remain open when hovering (WCAG 2.1 Content on Hover compliance). disableHoverableContent
can be supplied to Tooltip.Provider
to restore previous behavior – #1490
[Breaking] Tooltip.Content
上的 side
现在默认为 top
– #1490
¥[Breaking] side
on Tooltip.Content
now defaults to top
– #1490
[Breaking] 现在需要 Tooltip.Provider
,你必须封装你的应用以避免回归。
¥[Breaking] Tooltip.Provider
is now required, you must wrap your app to avoid regressions. – #1490
[Breaking] 从 Arrow
部件 – #1531 中移除 offset
¥[Breaking] Remove offset
on Arrow
part – #1531
[Breaking] 将 Content
部分的 collisionTolerance
重命名为 collisionPadding
,并接受数字或填充对象 – #1531
¥[Breaking] Rename collisionTolerance
to collisionPadding
on Content
part and accepts a number or a padding object – #1531
改进工具提示与其他基元的分层 – #1314
¥Improve layering of tooltip with other primitives – #1314
修复变形/动画触发器时工具提示关闭的问题 – #937
¥Fix tooltip closing when transforming/animation trigger – #937
在 Content
部分 – #1531 上添加 collisionBoundary
、arrowPadding
、sticky
、hideWhenDetached
属性。
¥Add collisionBoundary
, arrowPadding
, sticky
, hideWhenDetached
props on Content
part – #1531
¥February 28, 2022
此版本在预览版中引入了 3 个全新基础组件:Select
、Toast
和 NavigationMenu
,同时还包含大量修复和改进。
¥This release introduces 3 brand new primitives in preview: Select
, Toast
and NavigationMenu
, whilst also shipping a ton of fixes and improvements.
防止按下 Accordion.Trigger
时提交表单 – #1085
¥Prevent form submission when pressing Accordion.Trigger
– #1085
修复 React 18 的动画问题 – #1125
¥Fix animation issue with React 18 – #1125
防止 DropdownMenu.TriggerItem
点击触发两次 – #1057
¥Prevent DropdownMenu.TriggerItem
click from firing twice – #1057
改进空闲性能 – #1040
¥Improve idle performance – #1040
改进指针事件管理 – #1079
¥Improve pointer-events management – #1079
[Breaking] Dialog.Title
现在是必需部分,因此如果未使用将会引发错误。如果不需要描述,则必须将 aria-describedby={undefined}
传递给 Dialog.Content
。
¥[Breaking] Dialog.Title
is now a required part so will throw an error if not used. aria-describedby={undefined}
must be passed to Dialog.Content
if no description is needed. – #1098
提升与 Dialog
/AlertDialog
– #1097 的可组合性
¥Improve composability with Dialog
/AlertDialog
– #1097
防止在非模态模式下点击关闭触发器后立即重新打开 – #1059
¥Prevent clicking trigger to close from immediately reopening in non-modal mode – #1059
防止 DropdownMenu.TriggerItem
点击触发两次 – #1057
¥Prevent DropdownMenu.TriggerItem
click from firing twice – #1057
改进空闲性能 – #1040
¥Improve idle performance – #1040
通过使用单选按钮角色来提升单个切换组 – #1118 的可访问性
¥Improve accessibility by using radio role for single toggle group – #1118
¥December 13, 2021
此版本专注于对 React 18 的支持,并对一些软件包引入了一些重大更改,主要与门户对话框有关。
¥This release focuses on React 18 support and introduces a number of breaking changes to some packages, mostly related to portalling dialogs.
[Breaking] 弃用 IdProvider
。改进了对 React 18 及更高版本的支持,旧版本中不再需要该提供程序。请从你的应用中移除该属性,以避免出现弃用警告。
¥[Breaking] Deprecate IdProvider
. Improves support for React 18 going forward and is no longer needed in older versions. Remove from your app to avoid deprecation warnings. – #1006
改进 React 18 对 – #984 的支持
¥Improve React 18 support – #984
改进 type
和 value
属性不匹配时导致的开发模式错误 – #979
¥Improve dev mode errors with mismatched type
and value
props – #979
防止页面初始加载时 Accordion.Content
高度动画 – #977
¥Prevent Accordion.Content
height animation on initial page load – #977
[Breaking] 添加新的 Portal
部件。为避免回归问题,如果你需要门户网站行为,请使用此部分。
¥[Breaking] Add new Portal
part. To avoid regressions, use this part if you want portalling behavior. – #936
[Breaking] 支持 AlertDialog.Overlay
内的滚动。将 allowPinchZoom
移至根目录。
¥[Breaking] Support scrolling within AlertDialog.Overlay
. Move allowPinchZoom
to root. – #963
修复 asChild
TypeScript 错误 – #924
¥Fix asChild
TypeScript error – #924
防止页面初始加载时 Collapsible.Content
高度动画 – #977
¥Prevent Collapsible.Content
height animation on initial page load – #977
[Breaking] 添加新的 Portal
部件。为避免回归问题,如果你需要门户网站行为,请使用此部分。
¥[Breaking] Add new Portal
part. To avoid regressions, use this part if you want portalling behavior. – #936
[Breaking] 支持 Dialog.Overlay
内的滚动。将 allowPinchZoom
移至根目录。
¥[Breaking] Support scrolling within Dialog.Overlay
. Move allowPinchZoom
to root. – #963
[Breaking] 将 Tabs.Trigger
元素更改为 button
元素 – #981
¥[Breaking] Change Tabs.Trigger
to button
element – #981
改进 TSDocs – #978
¥Improve TSDocs – #978
移除 role=group
元素 – #965 上无效的 aria-orientation
属性
¥Remove invalid aria-orientation
attribute on role=group
element – #965
修复 asChild
TypeScript 错误 – #924
¥Fix asChild
TypeScript error – #924
移除无效的 toolbaritem
角色 – #950
¥Remove invalid toolbaritem
role – #950
[Breaking] 添加新的 TooltipProvider
部件。你必须封装你的应用以避免回归。
¥[Breaking] Add new TooltipProvider
part. You must wrap your app to avoid regressions. – #1007
[Breaking] 从 Tooltip.Trigger
– #1011 中移除 type=button
属性
¥[Breaking] Remove type=button
attribute from Tooltip.Trigger
– #1011
修复工具提示激活回归问题 – #1035
¥Fix tooltip activation regression – #1035
¥October 15, 2021
所有基础组件现在都已版本化为 0.1.1
¥All primitives are now versioned 0.1.1
修复通过限定上下文范围来解决基元之间的可组合性问题 – #906
¥Fix composability issues between primitives by scoping context – #906
修复 CSS 卸载动画 – #851
¥Fix CSS unmount animations – #851
在 Accordion.Content
中添加新的 CSS 变量,以辅助宽度动画 – #879
¥Add new CSS variable to Accordion.Content
to help with width animations – #879
提升与 Dialog
– #906 的可组合性
¥Improve composability with Dialog
– #906
[Breaking] 移除 AlertDialog.Content
onInteractOutside
属性 – #846
¥[Breaking] Remove AlertDialog.Content
onInteractOutside
prop – #846
提升与 AlertDialog
– #906 的可组合性
¥Improve composability with AlertDialog
– #906
通过 allowPinchZoom
属性 – #884 为 DropdownMenu.Content
添加捏合缩放支持
¥Add pinch to zoom support to DropdownMenu.Content
via allowPinchZoom
prop – #884
通过 allowPinchZoom
属性 – #884 为 ContextMenu.Content
添加捏合缩放支持
¥Add pinch to zoom support to ContextMenu.Content
via allowPinchZoom
prop – #884
防止在子菜单触发器上通过按下箭头键滚动 – #908
¥Prevent scroll via arrow keypress on submenu triggers – #908
在 Collapsible.Content
中添加新的 CSS 变量,以辅助宽度动画 – #879
¥Add new CSS variable to Collapsible.Content
to help with width animations – #879
提升与 Tooltip
– #906 的可组合性
¥Improve composability with Tooltip
– #906
通过 allowPinchZoom
属性 – #884 为 DropdownMenu.Content
添加捏合缩放支持
¥Add pinch to zoom support to DropdownMenu.Content
via allowPinchZoom
prop – #884
防止在子菜单触发器上通过按下箭头键滚动 – #908
¥Prevent scroll via arrow keypress on submenu triggers – #908
聚焦时打开以改进键盘支持 – #902
¥Open on focus to improve keyboard support – #902
在 – #893 内部组合正确的指针事件
¥Compose correct pointer events internally – #893
通过 allowPinchZoom
属性 – #884 为 Popover.Content
添加捏合缩放支持
¥Add pinch to zoom support to Popover.Content
via allowPinchZoom
prop – #884
[Breaking] 当选项卡处于非活动状态时,卸载 Tabs.Content
中的内容 – #859
¥[Breaking] Unmount content within Tabs.Content
when tab is inactive – #859
¥September 7, 2021
所有基础组件已移至 Beta 版,版本化为 0.1.0
¥All primitives moved to Beta and are now versioned 0.1.0
[Breaking] 将多态 as
属性替换为 asChild
布尔属性。了解更多关于如何使用 更改此处渲染元素 – #835 的信息
¥[Breaking] Replace polymorphic as
prop with asChild
boolean prop. Learn more
about how to change the rendered element here – #835
提升与 Dialog
– #818 的可组合性
¥Improve composability with Dialog
– #818
关闭 – #819 后重新启用 pointer-events
¥Re-enable pointer-events
when closed – #819
防止关闭时选择正文(Firefox)– #812
¥Prevent body text from selecting on close (Firefox) – #812
确保子触发器在点击时获得焦点(iOS Safari)– #820
¥Ensure sub triggers receive focus on click (iOS Safari) – #820
¥August 4, 2021
[Breaking] 移除 AlertDialog.Content
onPointerDownOutside
属性 – #700
¥[Breaking] Remove AlertDialog.Content
onPointerDownOutside
prop – #700
防止在触摸设备上过早触发外部指针事件 – #767
¥Prevent outside pointer events triggering prematurely on touch devices – #767
通过 modal
属性 – #700 添加模态支持
¥Add modality support via modal
prop – #700
[Breaking] 移除 ContextMenu.Content
disableOutsidePointerEvents
属性 – #700
¥[Breaking] Remove ContextMenu.Content
disableOutsidePointerEvents
prop – #700
防止在触摸设备上过早触发外部指针事件 – #767
¥Prevent outside pointer events triggering prematurely on touch devices – #767
通过 modal
属性 – #700 添加模态支持
¥Add modality support via modal
prop – #700
提升 React 18 – #776 中的动画渲染
¥Improve animation rendering in React 18 – #776
确保在子元素上使用 autofocus
属性时,焦点在关闭时恢复到触发器 – #739
¥Ensure focus is restored to trigger on close when using the autofocus
attribute on a child element – #739
防止在触摸设备上过早触发外部指针事件 – #767
¥Prevent outside pointer events triggering prematurely on touch devices – #767
确保 iOS Safari 始终聚焦于第一个可聚焦元素 – #776
¥Ensure iOS Safari consistently focuses the first focusable element – #776
通过 modal
属性 – #700 添加模态支持
¥Add modality support via modal
prop – #700
[Breaking] 移除 DropdownMenu.Content
disableOutsideScroll
属性 – #700
¥[Breaking] Remove DropdownMenu.Content
disableOutsideScroll
prop – #700
[Breaking] 移除 DropdownMenu.Content
disableOutsidePointerEvents
属性 – #700
¥[Breaking] Remove DropdownMenu.Content
disableOutsidePointerEvents
prop – #700
防止在触摸设备上过早触发外部指针事件 – #767
¥Prevent outside pointer events triggering prematurely on touch devices – #767
通过 modal
属性 – #700 添加模态支持
¥Add modality support via modal
prop – #700
[Breaking] 移除 Popover.Content
disableOutsideScroll
属性 – #700
¥[Breaking] Remove Popover.Content
disableOutsideScroll
prop – #700
[Breaking] 移除 Popover.Content
disableOutsidePointerEvents
属性 – #700
¥[Breaking] Remove Popover.Content
disableOutsidePointerEvents
prop – #700
[Breaking] 移除 Popover.Content
trapFocus
属性 – #700
¥[Breaking] Remove Popover.Content
trapFocus
prop – #700
提升 React 18 – #776 中的动画渲染
¥Improve animation rendering in React 18 – #776
确保在子元素上使用 autofocus
属性时,焦点在关闭时恢复到触发器 – #739
¥Ensure focus is restored to trigger on close when using the autofocus
attribute on a child element – #739
防止在触摸设备上过早触发外部指针事件 – #767
¥Prevent outside pointer events triggering prematurely on touch devices – #767
确保 iOS Safari 始终聚焦于第一个可聚焦元素 – #776
¥Ensure iOS Safari consistently focuses the first focusable element – #776
防止禁用时拇指获得焦点 – #777
¥Prevent thumb receiving focus when disabled – #777
防止使用 React.StrictMode
时拇指失去焦点 – #794
¥Prevent focus loss on thumb when using React.StrictMode
– #794
¥June 24, 2021
添加可选的 Title
和 Description
部分,以便更轻松地进行标签 – #741
¥Add optional Title
and Description
parts for simpler labelling – #741
将 data-orientation
添加到 Scrollbar
以方便样式设置 – #720
¥Add data-orientation
to Scrollbar
for styling convenience – #720
修复 Scrollbar
– #738 上的 forceMount
类型问题
¥Fix forceMount
type issue on Scrollbar
– #738
确保使用键盘并跨过另一个拇指按钮时,正确的拇指按钮获得焦点 – #731
¥Ensure the correct thumb is focused when using keyboard and crossing another thumb – #731
确保穿过另一个滑块时只需按一次箭头 – #733
¥Ensure only one arrow press is needed when crossing another thumb – #733
确保只需单击一次即可切换单个受控切换组 – #722
¥Ensure only one click is needed to toggle a single controlled toggle group – #722
确保焦点行为在 Safari – #727 上保持一致
¥Ensure focus behavior is consistent on Safari – #727
¥June 15, 2021
[Breaking] 将 Accordion.Button
重命名为 Accordion.Trigger
– #651
¥[Breaking] Rename Accordion.Button
to Accordion.Trigger
– #651
[Breaking] 将 Accordion.Panel
重命名为 Accordion.Content
– #651
¥[Breaking] Rename Accordion.Panel
to Accordion.Content
– #651
[Breaking] 相应地重命名自定义属性 (--radix-accordion-content-height
) – #651
¥[Breaking] Rename custom property accordingly (--radix-accordion-content-height
) – #651
[Breaking] type=“single”
Accordion
现在有一个新的 collapsible
属性,默认为 false
。这意味着默认行为现已更改。默认情况下,用户无法关闭所有项目。
¥[Breaking] type=“single”
Accordion
now has a new collapsible
prop which is false
by default. This means that the default behavior has now changed. By default a user cannot close all items. – #651
[Breaking] 允许在 onPointerDownOutside
中防止出现默认值,而不会意外阻止 – #654 的焦点。
¥[Breaking] Allow preventing default in onPointerDownOutside
without inadvertently preventing focus – #654
[Breaking] onCheckedChange(event)
现在是 onCheckedChange(checked: CheckedState)
– #672
¥[Breaking] onCheckedChange(event)
is now onCheckedChange(checked: CheckedState)
– #672
提升与原生表单验证的兼容性 – #650
¥Improve compatibility with native form validation – #650
允许停止 Checkbox
onClick
– #672 上的传播
¥Allow stopping propagation on Checkbox
onClick
– #672
提升与原生 label
– #672 的兼容性
¥Improve compatibility with native label
– #672
提升原生 label
– #672 封装后的可访问性
¥Improve accessibility when wrapped in native label
– #672
[Breaking] 将 Collapsible.Button
重命名为 Collapsible.Trigger
– #651
¥[Breaking] Rename Collapsible.Button
to Collapsible.Trigger
– #651
添加子菜单支持 – #682
¥Add submenu support – #682
添加 ContextMenu.TriggerItem
– #682
¥Add ContextMenu.TriggerItem
– #682
添加 ContextMenu.Arrow
– #682
¥Add ContextMenu.Arrow
– #682
添加 dir
属性,以便通过子菜单 – #682 支持 RTL
¥Add dir
prop for RTL support with submenus – #682
[Breaking] 允许在 onPointerDownOutside
中防止出现默认值,而不会意外阻止 – #654 的焦点。
¥[Breaking] Allow preventing default in onPointerDownOutside
without inadvertently preventing focus – #654
[Breaking] 移除 ContextMenu.Content
side
属性 – #658
¥[Breaking] Remove ContextMenu.Content
side
prop – #658
[Breaking] 移除 ContextMenu.Content
align
属性 – #658
¥[Breaking] Remove ContextMenu.Content
align
prop – #658
[Breaking] 如果你之前在 ContextMenu.Content
上使用过 sideOffset
,现在应该使用 alignOffset
。这是为了标准化根菜单和子菜单的垂直对齐方式。
¥[Breaking] If you had sideOffset
on ContextMenu.Content
before, you should now use alignOffset
. This is to standardize vertical alignment for both root and sub-menus. – #712
[Breaking] onFocusOutside
现在是自定义事件 – #671
¥[Breaking] onFocusOutside
is now a custom event – #671
改进对无内边距内容和项目的支持 – #658
¥Improve support of content and item with no padding – #658
通过键盘打开 – #694 时,聚焦第一个项目,与 WAI-ARIA 规范保持一致。
¥Align with WAI-ARIA spec by focusing first item when opening via keyboard – #694
[Breaking] 允许在 onPointerDownOutside
中防止出现默认值,而不会意外阻止 – #654 的焦点。
¥[Breaking] Allow preventing default in onPointerDownOutside
without inadvertently preventing focus – #654
添加子菜单支持 – #682
¥Add submenu support – #682
添加 DropdownMenu.TriggerItem
– #682
¥Add DropdownMenu.TriggerItem
– #682
添加 dir
属性,以便通过子菜单 – #682 支持 RTL
¥Add dir
prop for RTL support with submenus – #682
[Breaking] 允许在 onPointerDownOutside
中防止出现默认值,而不会意外阻止 – #654 的焦点。
¥[Breaking] Allow preventing default in onPointerDownOutside
without inadvertently preventing focus – #654
[Breaking] onFocusOutside
现在是自定义事件 – #671
¥[Breaking] onFocusOutside
is now a custom event – #671
[Breaking] 向上箭头不再打开菜单 – #702
¥[Breaking] The up arrow no longer opens the menu – #702
通过键盘打开 – #694 时,聚焦第一个项目,与 WAI-ARIA 规范保持一致。
¥Align with WAI-ARIA spec by focusing first item when opening via keyboard – #694
[Breaking] 允许在 onPointerDownOutside
中防止出现默认值,而不会意外阻止 – #654 的焦点。
¥[Breaking] Allow preventing default in onPointerDownOutside
without inadvertently preventing focus – #654
[Breaking] onFocusOutside
现在是自定义事件 – #671
¥[Breaking] onFocusOutside
is now a custom event – #671
[Breaking] onValueChange(event)
现在是 onValueChange(value: string)
– #685
¥[Breaking] onValueChange(event)
is now onValueChange(value: string)
– #685
[Breaking] 移除 RadioGroup.Item
onCheckedChange
属性 – #685
¥[Breaking] Remove RadioGroup.Item
onCheckedChange
prop – #685
提升与原生表单验证的兼容性 – #650
¥Improve compatibility with native form validation – #650
改进表单内部的使用 – #685
¥Improve usage within forms – #685
全新版本,更简洁的 API – #624
¥Brand new version with a simpler API – #624
改进 Safari 支持 – #624
¥Improve Safari support – #624
改进 RTL 支持 – #624
¥Improve RTL support – #624
改进触摸支持 – #624
¥Improve touch support – #624
Scrollbar
的挂载/卸载现在可以动画化 – #624
¥Scrollbar
mount/unmount can now be animated – #624
为滑块添加最小宽度/高度,使其始终可抓取 – #624
¥Add minimum width/height to thumb so it's always grabbable – #624
将函数式 CSS 移入组件以改进 DX – #624
¥Move functional CSS into component to improve DX – #624
显著减小了 – #624 的包大小
¥Bundle size significantly reduced – #624
[Breaking] 移除 overflowX
和 overflowY
属性 – #624
¥[Breaking] Remove overflowX
and overflowY
props – #624
[Breaking] 移除 ScrollAreaButtonStart
、ScrollAreaButtonEnd
和 ScrollAreaTrack
– #624
¥[Breaking] Remove ScrollAreaButtonStart
, ScrollAreaButtonEnd
and ScrollAreaTrack
– #624
[Breaking] 将 scrollbarVisibility
属性重命名为 type
。值为 auto
、always
、scroll
或 hover
– #624
¥[Breaking] Rename scrollbarVisibility
prop to type
. The values are auto
, always
, scroll
or hover
– #624
[Breaking] 将 scrollbarVisibilityRestTimeout
属性重命名为 scrollHideDelay
– #624
¥[Breaking] Rename scrollbarVisibilityRestTimeout
prop to scrollHideDelay
– #624
[Breaking] 移除 trackClickBehavior
属性,因为我们已移除内置动画。点击轨道始终会捕捉到指针位置 – #624。
¥[Breaking] Remove trackClickBehavior
prop as we've removed built-in animation. Clicking on track always snaps to pointer position – #624
[Breaking] ScrollAreaScrollbarX
和 ScrollAreaScrollbarY
现在是 <ScrollAreaScrollbar orientation="horizontal" />
和 <ScrollAreaScrollbar orientation="vertical" />
– #624
¥[Breaking] ScrollAreaScrollbarX
and ScrollAreaScrollbarY
are now <ScrollAreaScrollbar orientation="horizontal" />
and <ScrollAreaScrollbar orientation="vertical" />
– #624
确保滚动功能禁用时不显示滚动条 – #624
¥Ensure no scrollbars are shown when scrolling is disabled – #624
确保子事件处理程序不会破坏 – #624
¥Ensure children event handlers don't break – #624
确保在子项内容大小发生变化时更新滚动区域 – #624
¥Ensure scroll area updates when children content size changes – #624
改进表单内部的使用 – #678
¥Improve usage within forms – #678
修复 LTR – #718 中的按键绑定问题
¥Fix key binding issue in LTR – #718
[Breaking] onCheckedChange(event)
现在是 onCheckedChange(checked: boolean)
– #679
¥[Breaking] onCheckedChange(event)
is now onCheckedChange(checked: boolean)
– #679
提升与原生表单验证的兼容性 – #650
¥Improve compatibility with native form validation – #650
改进表单内部的使用 – #679
¥Improve usage within forms – #679
提升原生 label
– #679 封装后的可访问性
¥Improve accessibility when wrapped in native label
– #679
[Breaking] 将 Tabs.Tab
重命名为 Tabs.Trigger
– #652
¥[Breaking] Rename Tabs.Tab
to Tabs.Trigger
– #652
[Breaking] 将 Tabs.Panel
重命名为 Tabs.Content
– #652
¥[Breaking] Rename Tabs.Panel
to Tabs.Content
– #652
¥May 3, 2021
确保只需单击一次即可关闭单个受控折叠面板 – #594
¥Ensure only one click is needed to close a single controlled accordion – #594
确保在模糊窗口并重新聚焦时焦点位置不会丢失 – #589
¥Ensure focus position isn't lost when blurring out window and re-focusing it – #589
考虑不可见项目 – #618
¥Take into account non-visible items – #618
[Breaking] 移除 anchorRef
属性 – #580
¥[Breaking] Remove anchorRef
prop – #580
防止使用空格键选择项目时页面滚动 – #626
¥Prevent page from scrolling when selecting an item with space key – #626
[Breaking] 移除 anchorRef
属性,并用可选的 Anchor
部件 – #580 替换
¥[Breaking] Remove anchorRef
prop and replace with optional Anchor
part – #580
添加可选的 orientation
、dir
、loop
属性 – #618
¥Add optional orientation
, dir
, loop
props – #618
[Breaking] 移除 readOnly
属性 – #600
¥[Breaking] Remove readOnly
prop – #600
¥March 26, 2021
[Breaking] 将 ToggleButton
基础组件重命名为 Toggle
– #546
¥[Breaking] Rename ToggleButton
primitive to Toggle
– #546
[Breaking] 将 toggled
属性重命名为 pressed
– #546
¥[Breaking] Rename toggled
prop to pressed
– #546
[Breaking] 将 defaultToggled
属性重命名为 defaultPressed
– #546
¥[Breaking] Rename defaultToggled
prop to defaultPressed
– #546
[Breaking] 将 onToggledChange
属性重命名为 onPressedChange
– #546
¥[Breaking] Rename onToggledChange
prop to onPressedChange
– #546
¥March 5, 2021
为面板添加高度 CSS 自定义属性,以便更轻松地实现 – #537 动画。
¥Add height CSS custom property to panel for easier animation – #537
为内容添加高度 CSS 自定义属性,以便更轻松地实现 – #537 动画。
¥Add height CSS custom property to content for easier animation – #537
¥March 3, 2021
添加对 SSR 的支持
¥Add support for SSR
[Breaking] 移除 selector
属性和 data-radix-*
属性 – #517
¥[Breaking] Remove selector
prop and data-radix-*
atributes – #517
[Breaking] 添加对多个值的支持。请注意,这是一个重大变更,因为新的 type
属性是 – #527 所必需的。
¥[Breaking] Add support for multiple values. Note that this is a breaking change because the new type
prop is required – #527
¥February 17, 2021
确保使用 <Trigger as={Slot}>
时事件已组合 – #461
¥Ensure events are composed when using <Trigger as={Slot}>
– #461
¥February 15, 2021
¥February 10, 2021
¥February 1, 2021
¥January 29, 2021
¥January 25, 2021
¥January 22, 2021
确保将 disabled={false}
设置为开启 Root
无法启用已禁用项目 – #400
¥Ensure setting disabled={false}
on Root
doesn't enable disabled items – #400
在触发器 – #381 上添加回车键支持。
¥Add enter key support on trigger – #381
防止焦点竞争条件 – #394
¥Prevent focus race condition – #394
确保窗口调整大小时 Content
重新定位 – #359
¥Ensure Content
repositions on window resize – #359
确保 Content
中的最后一个元素触发模糊事件 – #395
¥Ensure last element inside Content
triggers blur event – #395
¥December 15, 2020
首次发布!🎉
¥Initial release! 🎉 – #338