odui-build
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBuild an Open Design UI component
构建 Open Design UI 组件
Read AGENTS.md, the component guide, the shared design system and the registry before editing.
- Start with the real use case. Define the states, keyboard behavior, accessible contract, responsive behavior and token roles before writing the recipe.
- Change the control source in . Add the component source, registry item, interactive example, API notes and a real Studio consumer in the same change. Use the
packages/open-design-uialias from the registry.open-design-ui/* - Register a new control as with a review condition. Keep it optional until one representative Studio use case is verified. Change to
adoption.mode: "opt-in"only when the native rule and baseline are updated in the same change.enforced - Keep feature data, domain validation and persistence in the consumer. The component owns shared visual states and interaction mechanics.
- Run ,
npm run design:check,npm run components:buildand focused consumer tests. Usenpm run typecheck:studioto inspect both themes, keyboard states and the narrow layout.odui-dev
A component is ready for review only when its preview, registry entry, real consumer and verification evidence are present.
编辑前,请阅读 AGENTS.md、组件指南、共享设计系统 和 registry。
- 从真实使用场景出发。在编写 recipe 前,先定义状态、键盘行为、无障碍契约、响应式行为和 token 角色。
- 修改 中的控件源码。在同一次变更中添加组件源码、registry 条目、交互式示例、API 说明和真实的 Studio 使用方。使用 registry 中的
packages/open-design-uialias。open-design-ui/* - 将新控件注册为 ,并设置审查条件。在一个具有代表性的 Studio 使用场景得到验证之前,保持其为可选状态。仅当同一次变更中同时更新原生规则和基线时,才能将其改为
adoption.mode: "opt-in"。enforced - 将功能数据、领域验证和持久化逻辑保留在使用方中。组件负责共享的视觉状态和交互机制。
- 运行 、
npm run design:check、npm run components:build和聚焦的使用方测试。使用npm run typecheck:studio检查两种主题、键盘状态和窄屏布局。odui-dev
只有在预览、registry 条目、真实使用方和验证证据均已就绪时,组件才能进入审查阶段。