feat(ui): 重构核心 UI 组件库,新增 shadcn/ui 组件
- 重构 Button、Card、Badge、Input、Textarea 等基础组件 - 新增 Accordion、Alert、Dialog、Dropdown、Form 等 shadcn/ui 组件 - 新增 AnimatedCounter、StatsShowcase、MetricCard 等数据展示组件 - 新增 ScrollReveal 滚动动画组件 - 重构 Toast 通知系统与 Tooltip 提示组件 - 更新设计令牌系统,对齐新品牌视觉
This commit is contained in:
@@ -40,9 +40,9 @@ describe('Badge', () => {
|
||||
expect(badge).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('should render destructive variant', () => {
|
||||
const { container } = render(<Badge variant="destructive">Destructive</Badge>);
|
||||
const badge = container.querySelector('[data-variant="destructive"]');
|
||||
it('should render error variant', () => {
|
||||
const { container } = render(<Badge variant="error">Error</Badge>);
|
||||
const badge = container.querySelector('[data-variant="error"]');
|
||||
expect(badge).toBeInTheDocument();
|
||||
});
|
||||
|
||||
@@ -86,7 +86,8 @@ describe('Badge', () => {
|
||||
|
||||
it('should have rounded-full class', () => {
|
||||
const { container } = render(<Badge>Badge</Badge>);
|
||||
const badge = container.querySelector('.rounded-full');
|
||||
// Badge 使用 rounded-sm(shadcn/ui 规范)
|
||||
const badge = container.querySelector('.rounded-sm');
|
||||
expect(badge).toBeInTheDocument();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user