@teamix-evo/ui 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +184 -184
- package/manifest.json +680 -492
- package/package.json +20 -10
- package/src/components/accordion/accordion.meta.md +5 -4
- package/src/components/accordion/accordion.stories.tsx +14 -9
- package/src/components/accordion/accordion.tsx +104 -8
- package/src/components/affix/affix.meta.md +20 -2
- package/src/components/affix/affix.stories.tsx +102 -25
- package/src/components/affix/affix.tsx +79 -9
- package/src/components/alert/alert.meta.md +44 -13
- package/src/components/alert/alert.stories.tsx +66 -21
- package/src/components/alert/alert.tsx +81 -34
- package/src/components/alert-dialog/alert-dialog.meta.md +61 -16
- package/src/components/alert-dialog/alert-dialog.stories.tsx +145 -3
- package/src/components/alert-dialog/alert-dialog.tsx +60 -13
- package/src/components/anchor/anchor.meta.md +8 -3
- package/src/components/anchor/anchor.stories.tsx +3 -3
- package/src/components/anchor/anchor.tsx +2 -2
- package/src/components/app/app.meta.md +9 -4
- package/src/components/app/app.stories.tsx +9 -7
- package/src/components/aspect-ratio/aspect-ratio.meta.md +4 -3
- package/src/components/aspect-ratio/aspect-ratio.stories.tsx +3 -3
- package/src/components/auto-complete/auto-complete.meta.md +14 -6
- package/src/components/auto-complete/auto-complete.stories.tsx +47 -4
- package/src/components/auto-complete/auto-complete.tsx +119 -71
- package/src/components/avatar/avatar.meta.md +6 -7
- package/src/components/avatar/avatar.stories.tsx +21 -3
- package/src/components/avatar/avatar.tsx +24 -23
- package/src/components/badge/badge.meta.md +10 -9
- package/src/components/badge/badge.stories.tsx +2 -2
- package/src/components/badge/badge.tsx +9 -15
- package/src/components/breadcrumb/breadcrumb.meta.md +27 -7
- package/src/components/breadcrumb/breadcrumb.stories.tsx +127 -4
- package/src/components/breadcrumb/breadcrumb.tsx +22 -8
- package/src/components/button/button.meta.md +258 -21
- package/src/components/button/button.stories.tsx +549 -41
- package/src/components/button/button.tsx +335 -33
- package/src/components/button/demo/as-child.tsx +24 -0
- package/src/components/button/demo/basic.tsx +8 -0
- package/src/components/button/demo/block.tsx +16 -0
- package/src/components/button/demo/loading.tsx +19 -0
- package/src/components/button/demo/shapes.tsx +18 -0
- package/src/components/button/demo/sizes.tsx +19 -0
- package/src/components/button/demo/variants.tsx +19 -0
- package/src/components/button/demo/with-icon.tsx +20 -0
- package/src/components/calendar/calendar.meta.md +13 -3
- package/src/components/calendar/calendar.stories.tsx +6 -6
- package/src/components/calendar/calendar.tsx +73 -8
- package/src/components/card/card.meta.md +27 -5
- package/src/components/card/card.stories.tsx +42 -3
- package/src/components/card/card.tsx +146 -63
- package/src/components/carousel/carousel.meta.md +4 -3
- package/src/components/carousel/carousel.stories.tsx +11 -6
- package/src/components/cascader/cascader.meta.md +47 -17
- package/src/components/cascader/cascader.stories.tsx +22 -10
- package/src/components/cascader/cascader.tsx +428 -85
- package/src/components/checkbox/checkbox.meta.md +75 -7
- package/src/components/checkbox/checkbox.stories.tsx +161 -3
- package/src/components/checkbox/checkbox.tsx +77 -9
- package/src/components/collapsible/collapsible.meta.md +14 -6
- package/src/components/collapsible/collapsible.stories.tsx +10 -2
- package/src/components/collapsible/collapsible.tsx +93 -6
- package/src/components/color-picker/color-picker.meta.md +12 -7
- package/src/components/color-picker/color-picker.stories.tsx +86 -7
- package/src/components/color-picker/color-picker.tsx +20 -9
- package/src/components/command/command.meta.md +29 -13
- package/src/components/command/command.stories.tsx +4 -4
- package/src/components/command/command.tsx +19 -8
- package/src/components/context-menu/context-menu.meta.md +11 -8
- package/src/components/context-menu/context-menu.stories.tsx +11 -3
- package/src/components/context-menu/context-menu.tsx +21 -8
- package/src/components/data-table/data-table.meta.md +6 -5
- package/src/components/data-table/data-table.stories.tsx +13 -6
- package/src/components/data-table/data-table.tsx +2 -2
- package/src/components/date-picker/date-picker.meta.md +88 -19
- package/src/components/date-picker/date-picker.stories.tsx +55 -5
- package/src/components/date-picker/date-picker.tsx +1489 -91
- package/src/components/descriptions/descriptions.meta.md +10 -5
- package/src/components/descriptions/descriptions.stories.tsx +3 -3
- package/src/components/descriptions/descriptions.tsx +22 -14
- package/src/components/dialog/dialog.meta.md +76 -13
- package/src/components/dialog/dialog.stories.tsx +182 -20
- package/src/components/dialog/dialog.tsx +67 -15
- package/src/components/dialog/imperative.tsx +252 -0
- package/src/components/drawer/drawer.meta.md +33 -34
- package/src/components/drawer/drawer.stories.tsx +29 -12
- package/src/components/drawer/drawer.tsx +22 -113
- package/src/components/dropdown-menu/dropdown-menu.meta.md +78 -10
- package/src/components/dropdown-menu/dropdown-menu.stories.tsx +88 -2
- package/src/components/dropdown-menu/dropdown-menu.tsx +24 -10
- package/src/components/ellipsis/ellipsis.meta.md +87 -0
- package/src/components/ellipsis/ellipsis.stories.tsx +72 -0
- package/src/components/ellipsis/ellipsis.tsx +153 -0
- package/src/components/empty/empty.meta.md +9 -4
- package/src/components/empty/empty.stories.tsx +4 -4
- package/src/components/empty/empty.tsx +10 -3
- package/src/components/field/field.meta.md +47 -9
- package/src/components/field/field.stories.tsx +385 -5
- package/src/components/field/field.tsx +263 -35
- package/src/components/filter-bar/filter-bar.meta.md +92 -0
- package/src/components/filter-bar/filter-bar.stories.tsx +1083 -0
- package/src/components/filter-bar/filter-bar.tsx +568 -0
- package/src/components/flex/flex.meta.md +54 -6
- package/src/components/flex/flex.stories.tsx +107 -20
- package/src/components/flex/flex.tsx +27 -4
- package/src/components/float-button/float-button.meta.md +8 -3
- package/src/components/float-button/float-button.stories.tsx +9 -7
- package/src/components/float-button/float-button.tsx +1 -1
- package/src/components/form/form.meta.md +39 -17
- package/src/components/form/form.stories.tsx +350 -3
- package/src/components/form/form.tsx +101 -35
- package/src/components/grid/grid.meta.md +7 -2
- package/src/components/grid/grid.stories.tsx +6 -4
- package/src/components/hover-card/hover-card.meta.md +20 -9
- package/src/components/hover-card/hover-card.stories.tsx +34 -5
- package/src/components/hover-card/hover-card.tsx +51 -13
- package/src/components/icon/DEVELOPMENT.md +809 -0
- package/src/components/icon/icon.meta.md +170 -0
- package/src/components/icon/icon.stories.tsx +344 -0
- package/src/components/icon/icon.tsx +248 -0
- package/src/components/image/image.meta.md +9 -4
- package/src/components/image/image.stories.tsx +3 -3
- package/src/components/image/image.tsx +6 -4
- package/src/components/input/demo/basic.tsx +12 -0
- package/src/components/input/demo/clearable.tsx +21 -0
- package/src/components/input/demo/show-count.tsx +18 -0
- package/src/components/input/demo/sizes.tsx +15 -0
- package/src/components/input/input.meta.md +39 -33
- package/src/components/input/input.stories.tsx +62 -35
- package/src/components/input/input.tsx +97 -98
- package/src/components/input-group/input-group.meta.md +54 -22
- package/src/components/input-group/input-group.stories.tsx +49 -16
- package/src/components/input-group/input-group.tsx +44 -8
- package/src/components/input-number/input-number.meta.md +64 -7
- package/src/components/input-number/input-number.stories.tsx +46 -8
- package/src/components/input-number/input-number.tsx +99 -26
- package/src/components/input-otp/input-otp.meta.md +4 -3
- package/src/components/input-otp/input-otp.stories.tsx +3 -3
- package/src/components/input-otp/input-otp.tsx +1 -1
- package/src/components/item/item.meta.md +8 -3
- package/src/components/item/item.stories.tsx +8 -5
- package/src/components/item/item.tsx +7 -6
- package/src/components/kbd/kbd.meta.md +13 -4
- package/src/components/kbd/kbd.stories.tsx +4 -4
- package/src/components/kbd/kbd.tsx +10 -5
- package/src/components/label/label.meta.md +18 -10
- package/src/components/label/label.stories.tsx +64 -6
- package/src/components/label/label.tsx +91 -19
- package/src/components/masonry/masonry.meta.md +8 -3
- package/src/components/masonry/masonry.stories.tsx +7 -5
- package/src/components/masonry/masonry.tsx +1 -0
- package/src/components/mentions/mentions.meta.md +36 -6
- package/src/components/mentions/mentions.stories.tsx +120 -6
- package/src/components/mentions/mentions.tsx +11 -5
- package/src/components/menubar/menubar.meta.md +30 -12
- package/src/components/menubar/menubar.stories.tsx +62 -2
- package/src/components/menubar/menubar.tsx +9 -9
- package/src/components/native-select/native-select.meta.md +8 -3
- package/src/components/native-select/native-select.stories.tsx +8 -5
- package/src/components/native-select/native-select.tsx +1 -1
- package/src/components/navigation-menu/navigation-menu.meta.md +19 -9
- package/src/components/navigation-menu/navigation-menu.stories.tsx +112 -9
- package/src/components/navigation-menu/navigation-menu.tsx +8 -4
- package/src/components/notification/notification.meta.md +52 -10
- package/src/components/notification/notification.stories.tsx +11 -9
- package/src/components/notification/notification.tsx +36 -21
- package/src/components/page-header/DEVELOPMENT.md +842 -0
- package/src/components/page-header/page-header.meta.md +208 -0
- package/src/components/page-header/page-header.stories.tsx +421 -0
- package/src/components/page-header/page-header.tsx +281 -0
- package/src/components/pagination/pagination.meta.md +140 -37
- package/src/components/pagination/pagination.stories.tsx +232 -10
- package/src/components/pagination/pagination.tsx +355 -63
- package/src/components/popconfirm/popconfirm.meta.md +9 -4
- package/src/components/popconfirm/popconfirm.stories.tsx +3 -4
- package/src/components/popconfirm/popconfirm.tsx +2 -2
- package/src/components/popover/popover.meta.md +62 -5
- package/src/components/popover/popover.stories.tsx +83 -7
- package/src/components/popover/popover.tsx +77 -28
- package/src/components/progress/progress.meta.md +38 -6
- package/src/components/progress/progress.stories.tsx +3 -3
- package/src/components/progress/progress.tsx +24 -16
- package/src/components/radio-group/radio-group.meta.md +79 -7
- package/src/components/radio-group/radio-group.stories.tsx +39 -3
- package/src/components/radio-group/radio-group.tsx +149 -18
- package/src/components/rate/rate.meta.md +35 -4
- package/src/components/rate/rate.stories.tsx +13 -5
- package/src/components/rate/rate.tsx +37 -10
- package/src/components/resizable/resizable.meta.md +7 -4
- package/src/components/resizable/resizable.stories.tsx +6 -6
- package/src/components/resizable/resizable.tsx +1 -1
- package/src/components/result/result.meta.md +7 -2
- package/src/components/result/result.stories.tsx +4 -8
- package/src/components/result/result.tsx +24 -15
- package/src/components/scroll-area/scroll-area.meta.md +4 -3
- package/src/components/scroll-area/scroll-area.stories.tsx +12 -4
- package/src/components/scroll-area/scroll-area.tsx +3 -3
- package/src/components/segmented/segmented.meta.md +7 -4
- package/src/components/segmented/segmented.stories.tsx +37 -8
- package/src/components/segmented/segmented.tsx +15 -7
- package/src/components/select/select.meta.md +197 -52
- package/src/components/select/select.stories.tsx +238 -63
- package/src/components/select/select.tsx +718 -171
- package/src/components/separator/separator.meta.md +4 -3
- package/src/components/separator/separator.stories.tsx +3 -3
- package/src/components/separator/separator.tsx +3 -7
- package/src/components/sheet/sheet.meta.md +32 -16
- package/src/components/sheet/sheet.stories.tsx +116 -10
- package/src/components/sheet/sheet.tsx +116 -29
- package/src/components/sidebar/sidebar.meta.md +37 -18
- package/src/components/sidebar/sidebar.stories.tsx +701 -29
- package/src/components/sidebar/sidebar.tsx +615 -142
- package/src/components/skeleton/skeleton.meta.md +4 -5
- package/src/components/skeleton/skeleton.stories.tsx +4 -4
- package/src/components/skeleton/skeleton.tsx +7 -7
- package/src/components/slider/slider.meta.md +57 -5
- package/src/components/slider/slider.stories.tsx +58 -6
- package/src/components/slider/slider.tsx +154 -13
- package/src/components/sonner/sonner.meta.md +58 -7
- package/src/components/sonner/sonner.stories.tsx +78 -5
- package/src/components/sonner/sonner.tsx +137 -8
- package/src/components/spinner/spinner.meta.md +62 -13
- package/src/components/spinner/spinner.stories.tsx +66 -14
- package/src/components/spinner/spinner.tsx +111 -9
- package/src/components/statistic/statistic.meta.md +7 -2
- package/src/components/statistic/statistic.stories.tsx +3 -7
- package/src/components/statistic/statistic.tsx +5 -6
- package/src/components/steps/steps.meta.md +18 -4
- package/src/components/steps/steps.stories.tsx +43 -3
- package/src/components/steps/steps.tsx +15 -12
- package/src/components/switch/switch.meta.md +51 -5
- package/src/components/switch/switch.stories.tsx +6 -6
- package/src/components/switch/switch.tsx +109 -41
- package/src/components/table/table.meta.md +17 -6
- package/src/components/table/table.stories.tsx +10 -5
- package/src/components/table/table.tsx +4 -4
- package/src/components/tabs/tabs.meta.md +38 -25
- package/src/components/tabs/tabs.stories.tsx +111 -25
- package/src/components/tabs/tabs.tsx +125 -54
- package/src/components/tag/tag.meta.md +105 -40
- package/src/components/tag/tag.stories.tsx +189 -16
- package/src/components/tag/tag.tsx +222 -21
- package/src/components/textarea/textarea.meta.md +35 -19
- package/src/components/textarea/textarea.stories.tsx +32 -6
- package/src/components/textarea/textarea.tsx +33 -9
- package/src/components/time-picker/time-picker.meta.md +124 -32
- package/src/components/time-picker/time-picker.stories.tsx +85 -15
- package/src/components/time-picker/time-picker.tsx +913 -61
- package/src/components/timeline/timeline.meta.md +14 -6
- package/src/components/timeline/timeline.stories.tsx +37 -7
- package/src/components/timeline/timeline.tsx +35 -14
- package/src/components/toggle/toggle.meta.md +5 -4
- package/src/components/toggle/toggle.stories.tsx +4 -4
- package/src/components/toggle/toggle.tsx +4 -3
- package/src/components/toggle-group/toggle-group.meta.md +5 -4
- package/src/components/toggle-group/toggle-group.stories.tsx +3 -3
- package/src/components/toggle-group/toggle-group.tsx +2 -2
- package/src/components/tooltip/tooltip.meta.md +55 -5
- package/src/components/tooltip/tooltip.stories.tsx +42 -5
- package/src/components/tooltip/tooltip.tsx +81 -21
- package/src/components/tour/tour.meta.md +9 -4
- package/src/components/tour/tour.stories.tsx +3 -3
- package/src/components/tour/tour.tsx +4 -4
- package/src/components/transfer/transfer.meta.md +11 -6
- package/src/components/transfer/transfer.stories.tsx +4 -8
- package/src/components/transfer/transfer.tsx +28 -21
- package/src/components/tree/tree.meta.md +63 -5
- package/src/components/tree/tree.stories.tsx +31 -12
- package/src/components/tree/tree.tsx +9 -8
- package/src/components/tree-select/tree-select.meta.md +59 -8
- package/src/components/tree-select/tree-select.stories.tsx +3 -3
- package/src/components/tree-select/tree-select.tsx +42 -7
- package/src/components/typography/typography.meta.md +61 -14
- package/src/components/typography/typography.stories.tsx +12 -11
- package/src/components/typography/typography.tsx +43 -28
- package/src/components/upload/upload.meta.md +49 -4
- package/src/components/upload/upload.stories.tsx +72 -12
- package/src/components/upload/upload.tsx +170 -37
- package/src/components/watermark/watermark.meta.md +7 -2
- package/src/components/watermark/watermark.stories.tsx +101 -9
- package/src/components/watermark/watermark.tsx +1 -0
- package/src/hooks/use-breakpoint.ts +117 -0
- package/src/hooks/use-debounce-callback.ts +52 -0
- package/src/hooks/use-mobile.ts +23 -0
- package/src/stories/theme-tokens.stories.tsx +747 -0
- package/src/utils/trigger-input.ts +53 -0
- package/src/components/button-group/button-group.meta.md +0 -92
- package/src/components/button-group/button-group.stories.tsx +0 -90
- package/src/components/button-group/button-group.tsx +0 -75
- package/src/components/combobox/combobox.meta.md +0 -93
- package/src/components/combobox/combobox.stories.tsx +0 -55
- package/src/components/combobox/combobox.tsx +0 -130
- package/src/components/space/space.meta.md +0 -94
- package/src/components/space/space.stories.tsx +0 -94
- package/src/components/space/space.tsx +0 -106
package/README.md
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Source-injected UI components for Teamix Evo. Based on shadcn/ui, extended with antd-level capabilities (`loading` / `icon` / `shape` / `block` / `dashed` variant). Components are written as ready-to-use React source code; users install components via `teamix-evo ui add <id>`, the source is written to their project, and they own the code.
|
|
4
4
|
|
|
5
|
-
> **🤖 Working on this package?** Read [`AGENTS.md`](./AGENTS.md) (and [`CLAUDE.md`](./CLAUDE.md)) before adding or changing components. They lay out the design-philosophy references (`@teamix-evo/
|
|
5
|
+
> **🤖 Working on this package?** Read [`AGENTS.md`](./AGENTS.md) (and [`CLAUDE.md`](./CLAUDE.md)) before adding or changing components. They lay out the design-philosophy references (`@teamix-evo/tokens`'s OpenTrek system), the AI compliance checklist, and the ui-side engineering constraints. New components MUST follow that guide.
|
|
6
6
|
|
|
7
7
|
## Architecture
|
|
8
8
|
|
|
9
9
|
- **Source injection**: components ship as `.tsx` files, not as a runtime library. `npx teamix-evo ui add button` copies `button.tsx` into the user project under `aliases.components`.
|
|
10
|
-
- **First consumer of `@teamix-evo/
|
|
11
|
-
- **No variant**: brand differences are absorbed by `@teamix-evo/
|
|
12
|
-
- **className contract**: components write `className="bg-primary"` (Tailwind v4 utility), which resolves to `var(--color-primary)`
|
|
10
|
+
- **First consumer of `@teamix-evo/tokens`**: the dev server imports OpenTrek tokens directly from the tokens package (`dev/index.css`), so components are previewed against the SAME tokens that ship to consumers — no mock values, single source of truth.
|
|
11
|
+
- **No variant**: brand differences are absorbed by `@teamix-evo/tokens` (CSS variables). One UI package serves all design variants.
|
|
12
|
+
- **className contract**: components write `className="bg-primary"` (Tailwind v4 utility), which resolves to `var(--color-primary)` from the project's `tokens.theme.css`. Semantic token names (`primary`, `destructive`, `muted`, ...) align with shadcn — see `@teamix-evo/tokens` for the token layer.
|
|
13
13
|
- **Imports**: source files use placeholder paths like `@/utils/cn`. The CLI rewrites these to user-configured aliases (e.g. `@/lib/utils`) at install time.
|
|
14
14
|
- **`updateStrategy: frozen`** is the default — once installed, the CLI never overwrites the file. Upgrades go through an AI + skill flow (v0.3, see PLAN §10.9).
|
|
15
15
|
|
|
@@ -53,11 +53,11 @@ packages/ui/
|
|
|
53
53
|
2. Append an entry to `manifest.json` with `id`, `type`, `files[]`, `meta?`, `registryDependencies?`, `dependencies?`
|
|
54
54
|
3. Run `pnpm validate`
|
|
55
55
|
|
|
56
|
-
Each component should ship a `<id>.meta.md` (frontmatter + Markdown).
|
|
56
|
+
Each component should ship a `<id>.meta.md` (frontmatter + Markdown). MCP reads it directly from `@teamix-evo/ui` at runtime — no consumer-side copy is written (per ADR 0020 §3).
|
|
57
57
|
|
|
58
58
|
---
|
|
59
59
|
|
|
60
|
-
## Component Matrix (
|
|
60
|
+
## Component Matrix (91 entries · 90 components + 1 util)
|
|
61
61
|
|
|
62
62
|
> 2026-05-16 校准 `manifest.json`,覆盖 **shadcn 60 件 ∪ antd v6 60 件** 的高频与中频集。
|
|
63
63
|
>
|
|
@@ -71,144 +71,144 @@ Each component should ship a `<id>.meta.md` (frontmatter + Markdown). On install
|
|
|
71
71
|
|
|
72
72
|
零依赖或仅依赖 `cn`,被后续大量组件依赖。
|
|
73
73
|
|
|
74
|
-
| id
|
|
75
|
-
|
|
|
76
|
-
| [cn](src/utils/cn.ts)
|
|
77
|
-
| [button](src/components/button/)
|
|
78
|
-
| [label](src/components/label/)
|
|
79
|
-
| [badge](src/components/badge/)
|
|
80
|
-
| [separator](src/components/separator/)
|
|
81
|
-
| [skeleton](src/components/skeleton/)
|
|
82
|
-
| [avatar](src/components/avatar/)
|
|
83
|
-
| [progress](src/components/progress/)
|
|
84
|
-
| [spinner](src/components/spinner/)
|
|
85
|
-
| [kbd](src/components/kbd/)
|
|
86
|
-
| [aspect-ratio](src/components/aspect-ratio/) | 等比容器
|
|
87
|
-
| [image](src/components/image/)
|
|
88
|
-
| [tag](src/components/tag/)
|
|
89
|
-
|
|
90
|
-
### 2. 布局与容器 / Layout & Container(
|
|
91
|
-
|
|
92
|
-
| id
|
|
93
|
-
|
|
|
94
|
-
| [
|
|
95
|
-
| [
|
|
96
|
-
| [
|
|
97
|
-
| [
|
|
98
|
-
| [
|
|
99
|
-
| [
|
|
100
|
-
| [
|
|
101
|
-
| [
|
|
102
|
-
| [descriptions](src/components/descriptions/) | 描述列表 | Descriptions | 🅐 | 键值对详情,items 数组驱动,bordered / span(对齐 antd Descriptions) |
|
|
74
|
+
| id | 中文名 | 英文 | 来源 | 关键能力 / antd 对应 |
|
|
75
|
+
| -------------------------------------------- | ------------ | ----------- | ---- | ------------------------------------------------------------------------------- |
|
|
76
|
+
| [cn](src/utils/cn.ts) | 类名合并工具 | cn | util | clsx + tailwind-merge,所有组件的 className 合并基础 |
|
|
77
|
+
| [button](src/components/button/) | 按钮 | Button | 🅢🅐 | shadcn Button + antd `loading` / `icon` / `shape` / `block` / `dashed` variant |
|
|
78
|
+
| [label](src/components/label/) | 表单标签 | Label | 🅢 | Radix Label,补 `required` / `disabled` 显式视觉(对齐 antd Form.Item label 部分) |
|
|
79
|
+
| [badge](src/components/badge/) | 徽标 | Badge | 🅢🅐 | 四种形态:文本徽标 / 数字气泡 / 红点 / 状态点(对齐 antd Badge) |
|
|
80
|
+
| [separator](src/components/separator/) | 分隔线 | Separator | 🅢🅐 | shadcn Separator + antd Divider 的 `dashed` / 中间装饰文本 |
|
|
81
|
+
| [skeleton](src/components/skeleton/) | 骨架屏 | Skeleton | 🅢🅐 | shadcn pulse + antd Avatar/Image/Button/Input/Paragraph 子家族 |
|
|
82
|
+
| [avatar](src/components/avatar/) | 头像 | Avatar | 🅢🅐 | Radix Avatar + antd `size` / `shape` / `Avatar.Group` |
|
|
83
|
+
| [progress](src/components/progress/) | 进度条 | Progress | 🅢🅐 | 线形 + 配套 `ProgressCircle` 环形(对齐 antd Progress) |
|
|
84
|
+
| [spinner](src/components/spinner/) | 加载指示器 | Spinner | 🅢🅐 | shadcn 2025-10 新增;4 档尺寸 + 4 档语义色(对齐 antd Spin 无遮罩版) |
|
|
85
|
+
| [kbd](src/components/kbd/) | 键位 | Kbd | 🅢 | shadcn 2025-10 新增;`Kbd` + `KbdGroup` 标注快捷键(antd 体系无) |
|
|
86
|
+
| [aspect-ratio](src/components/aspect-ratio/) | 等比容器 | AspectRatio | 🅢 | Radix AspectRatio,无 layout shift(antd 体系无) |
|
|
87
|
+
| [image](src/components/image/) | 图片 | Image | 🅐 | 自动加载占位 + 失败占位 + 点击预览(对齐 antd Image) |
|
|
88
|
+
| [tag](src/components/tag/) | 标签 | Tag | 🅐 | 关键词标签 + `closable` + 6 种语义色 + `CheckableTag(Group)`(对齐 antd Tag v6) |
|
|
89
|
+
|
|
90
|
+
### 2. 布局与容器 / Layout & Container(8 件)
|
|
91
|
+
|
|
92
|
+
| id | 中文名 | 英文 | 来源 | 关键能力 / antd 对应 |
|
|
93
|
+
| -------------------------------------------- | ---------- | ---------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------ |
|
|
94
|
+
| [flex](src/components/flex/) | 弹性布局 | Flex | 🅐 | Tailwind flex 语义封装,`as` 语义标签 + `inline` + `split`——一个原子覆盖布局容器与 inline 小集合(等价 antd Flex v5.10+ ∪ Space) |
|
|
95
|
+
| [grid](src/components/grid/) | 栅格 | Grid (Row + Col) | 🅐 | 24 栅格,CSS Grid 实现(对齐 antd Row + Col) |
|
|
96
|
+
| [masonry](src/components/masonry/) | 瀑布流 | Masonry | 🅐 | CSS column-count 0 JS 实现(对齐 antd Masonry v6.0) |
|
|
97
|
+
| [scroll-area](src/components/scroll-area/) | 滚动容器 | ScrollArea | 🅢 | Radix ScrollArea,跨浏览器一致滚动条(antd 体系无) |
|
|
98
|
+
| [resizable](src/components/resizable/) | 可拖拽分栏 | Resizable | 🅢🅐 | react-resizable-panels,VS Code / Figma 风格(对齐 antd Splitter v5.21+) |
|
|
99
|
+
| [card](src/components/card/) | 卡片 | Card | 🅢🅐 | + `hoverable` / `loading` / `Cover` / `Actions` / `Meta` / `CardAction`(2026-04 shadcn 新增子组件) |
|
|
100
|
+
| [item](src/components/item/) | 列表项 | Item | 🅢 | shadcn 2025-10 新增;5 槽 Media/Content/Title/Description/Actions + ItemGroup(替代旧 List.Item) |
|
|
101
|
+
| [descriptions](src/components/descriptions/) | 描述列表 | Descriptions | 🅐 | 键值对详情,items 数组驱动,bordered / span(对齐 antd Descriptions) |
|
|
103
102
|
|
|
104
103
|
### 3. 表单与输入 / Form & Input(28 件)
|
|
105
104
|
|
|
106
105
|
#### 3.1 表单组装
|
|
107
106
|
|
|
108
|
-
| id
|
|
109
|
-
|
|
|
110
|
-
| [form](src/components/form/)
|
|
111
|
-
| [field](src/components/field/)
|
|
112
|
-
| [input-group](src/components/input-group/)
|
|
113
|
-
| [button-group](src/components/button-group/) | 按钮组
|
|
107
|
+
| id | 中文名 | 英文 | 来源 | 关键能力 / antd 对应 |
|
|
108
|
+
| -------------------------------------------- | -------- | ----------- | ---- | ------------------------------------------------------------------------- |
|
|
109
|
+
| [form](src/components/form/) | 表单 | Form | 🅢🅐 | react-hook-form + zod + shadcn 7 件套(对齐 antd Form) |
|
|
110
|
+
| [field](src/components/field/) | 字段抽象 | Field | 🅢 | shadcn 2025-10 新增;7 槽,可搭任何状态管理(对齐 antd Form.Item 的解耦版) |
|
|
111
|
+
| [input-group](src/components/input-group/) | 输入框组 | InputGroup | 🅢 | shadcn 2025-10 新增;复合插槽(对齐 antd Input 的 prefix/suffix/addon 集合) |
|
|
112
|
+
| [button-group](src/components/button-group/) | 按钮组 | ButtonGroup | 🅢🅐 | shadcn 2025-10 新增;Split Button / Toolbar(对齐 antd Space.Compact v6) |
|
|
114
113
|
|
|
115
114
|
#### 3.2 文本类输入
|
|
116
115
|
|
|
117
|
-
| id
|
|
118
|
-
|
|
|
119
|
-
| [input](src/components/input/)
|
|
120
|
-
| [textarea](src/components/textarea/)
|
|
121
|
-
| [input-number](src/components/input-number/) | 数字输入框 | InputNumber | 🅐
|
|
122
|
-
| [input-otp](src/components/input-otp/)
|
|
123
|
-
| [mentions](src/components/mentions/)
|
|
116
|
+
| id | 中文名 | 英文 | 来源 | 关键能力 / antd 对应 |
|
|
117
|
+
| -------------------------------------------- | ---------- | ----------- | ---- | ------------------------------------------------------------------------------------------------------------- |
|
|
118
|
+
| [input](src/components/input/) | 输入框 | Input | 🅢🅐 | + `clearable` / `showCount` / `size` / `error` 四档内建(复合形态已拆出独立 `InputGroup`,对齐 antd Input 集合) |
|
|
119
|
+
| [textarea](src/components/textarea/) | 多行文本框 | Textarea | 🅢🅐 | + `autoSize` / `showCount`(对齐 antd Input.TextArea) |
|
|
120
|
+
| [input-number](src/components/input-number/) | 数字输入框 | InputNumber | 🅐 | 步进 + min/max 夹紧 + precision + 千分位 + null 空状态(对齐 antd InputNumber) |
|
|
121
|
+
| [input-otp](src/components/input-otp/) | 验证码输入 | InputOTP | 🅢🅐 | input-otp 库封装,登录 / 二步验证 / PIN(对齐 antd Input.OTP v5.21+) |
|
|
122
|
+
| [mentions](src/components/mentions/) | @ 提及输入 | Mentions | 🅐 | Textarea + @ 触发候选下拉,异步 onSearch(对齐 antd Mentions) |
|
|
124
123
|
|
|
125
124
|
#### 3.3 选择类(下拉 / 单选 / 多选)
|
|
126
125
|
|
|
127
|
-
| id
|
|
128
|
-
|
|
|
129
|
-
| [select](src/components/select/)
|
|
130
|
-
| [native-select](src/components/native-select/) | 原生选择器
|
|
131
|
-
| [combobox](src/components/combobox/)
|
|
132
|
-
| [auto-complete](src/components/auto-complete/) | 自动完成
|
|
133
|
-
| [cascader](src/components/cascader/)
|
|
134
|
-
| [tree-select](src/components/tree-select/)
|
|
135
|
-
| [checkbox](src/components/checkbox/)
|
|
136
|
-
| [radio-group](src/components/radio-group/)
|
|
137
|
-
| [switch](src/components/switch/)
|
|
138
|
-
| [slider](src/components/slider/)
|
|
139
|
-
| [toggle](src/components/toggle/)
|
|
140
|
-
| [toggle-group](src/components/toggle-group/)
|
|
141
|
-
| [segmented](src/components/segmented/)
|
|
126
|
+
| id | 中文名 | 英文 | 来源 | 关键能力 / antd 对应 |
|
|
127
|
+
| ---------------------------------------------- | ------------ | ------------ | ---- | ----------------------------------------------------------------------- |
|
|
128
|
+
| [select](src/components/select/) | 选择器 | Select | 🅢🅐 | Radix Select(对齐 antd Select 单选) |
|
|
129
|
+
| [native-select](src/components/native-select/) | 原生选择器 | NativeSelect | 🅢 | shadcn 2025-10 新增;原生 `<select>`,移动端 / SSR 友好(antd 体系无) |
|
|
130
|
+
| [combobox](src/components/combobox/) | 可搜索选择器 | Combobox | 🅢 | Command + Popover,必选(value ∈ options)(对齐 antd Select showSearch) |
|
|
131
|
+
| [auto-complete](src/components/auto-complete/) | 自动完成 | AutoComplete | 🅐 | 自由输入 + 候选建议(value 可任意 string)(对齐 antd AutoComplete) |
|
|
132
|
+
| [cascader](src/components/cascader/) | 级联选择 | Cascader | 🅐 | 多级联动,叶子触发 / 中途可选(对齐 antd Cascader) |
|
|
133
|
+
| [tree-select](src/components/tree-select/) | 树形选择 | TreeSelect | 🅐 | Tree 嵌入 Popover,单选 / 多选(对齐 antd TreeSelect) |
|
|
134
|
+
| [checkbox](src/components/checkbox/) | 多选框 | Checkbox | 🅢🅐 | Radix 原生 indeterminate + Checkbox.Group(对齐 antd Checkbox) |
|
|
135
|
+
| [radio-group](src/components/radio-group/) | 单选组 | RadioGroup | 🅢🅐 | + `variant=button` 按钮组形态(对齐 antd Radio + Radio.Button) |
|
|
136
|
+
| [switch](src/components/switch/) | 开关 | Switch | 🅢🅐 | + `loading` / `checkedChildren` / `unCheckedChildren`(对齐 antd Switch) |
|
|
137
|
+
| [slider](src/components/slider/) | 滑动输入 | Slider | 🅢🅐 | 原生支持双滑块 + antd marks 刻度(对齐 antd Slider) |
|
|
138
|
+
| [toggle](src/components/toggle/) | 切换按钮 | Toggle | 🅢 | Radix Toggle,工具栏图标级开关(antd 体系无) |
|
|
139
|
+
| [toggle-group](src/components/toggle-group/) | 切换按钮组 | ToggleGroup | 🅢 | type=single \| multiple,与 RadioButton 互补(antd 体系无) |
|
|
140
|
+
| [segmented](src/components/segmented/) | 分段控制 | Segmented | 🅐 | iOS / macOS 风格紧凑互斥单选(对齐 antd Segmented v5.0+) |
|
|
142
141
|
|
|
143
142
|
#### 3.4 日期 / 时间 / 颜色 / 评分 / 文件
|
|
144
143
|
|
|
145
|
-
| id
|
|
146
|
-
|
|
|
147
|
-
| [calendar](src/components/calendar/)
|
|
148
|
-
| [date-picker](src/components/date-picker/)
|
|
149
|
-
| [time-picker](src/components/time-picker/)
|
|
150
|
-
| [color-picker](src/components/color-picker/) | 颜色选择 | ColorPicker | 🅐
|
|
151
|
-
| [rate](src/components/rate/)
|
|
152
|
-
| [upload](src/components/upload/)
|
|
144
|
+
| id | 中文名 | 英文 | 来源 | 关键能力 / antd 对应 |
|
|
145
|
+
| -------------------------------------------- | -------- | ----------- | ---- | -------------------------------------------------------------------- |
|
|
146
|
+
| [calendar](src/components/calendar/) | 日历 | Calendar | 🅢🅐 | react-day-picker v9,单 / 多 / 范围(对齐 antd Calendar) |
|
|
147
|
+
| [date-picker](src/components/date-picker/) | 日期选择 | DatePicker | 🅢🅐 | Calendar + Popover 复合(对齐 antd DatePicker + RangePicker) |
|
|
148
|
+
| [time-picker](src/components/time-picker/) | 时间选择 | TimePicker | 🅐 | 原生 input[type=time],SSR safe(对齐 antd TimePicker) |
|
|
149
|
+
| [color-picker](src/components/color-picker/) | 颜色选择 | ColorPicker | 🅐 | 原生 color + alpha + hex + 预设色板(对齐 antd ColorPicker v5.5+) |
|
|
150
|
+
| [rate](src/components/rate/) | 评分 | Rate | 🅐 | 半星 / 清零 / 自定义图标(对齐 antd Rate) |
|
|
151
|
+
| [upload](src/components/upload/) | 上传 | Upload | 🅐 | 点击 + 拖拽双模式,内置 accept / maxCount / maxSize(对齐 antd Upload) |
|
|
153
152
|
|
|
154
153
|
### 4. 数据展示 / Data Display(8 件)
|
|
155
154
|
|
|
156
|
-
| id
|
|
157
|
-
|
|
|
158
|
-
| [table](src/components/table/)
|
|
159
|
-
| [data-table](src/components/data-table/) | 数据表
|
|
160
|
-
| [carousel](src/components/carousel/)
|
|
161
|
-
| [statistic](src/components/statistic/)
|
|
162
|
-
| [tree](src/components/tree/)
|
|
163
|
-
| [timeline](src/components/timeline/)
|
|
164
|
-
| [typography](src/components/typography/) | 排版
|
|
165
|
-
| [transfer](src/components/transfer/)
|
|
166
|
-
|
|
167
|
-
### 5. 反馈与浮层 / Feedback & Overlay(
|
|
168
|
-
|
|
169
|
-
| id
|
|
170
|
-
|
|
|
171
|
-
| [alert](src/components/alert/)
|
|
172
|
-
| [dialog](src/components/dialog/)
|
|
173
|
-
| [alert-dialog](src/components/alert-dialog/) | 确认对话框 | AlertDialog
|
|
174
|
-
| [popconfirm](src/components/popconfirm/)
|
|
175
|
-
| [popover](src/components/popover/)
|
|
176
|
-
| [
|
|
177
|
-
| [
|
|
178
|
-
| [
|
|
179
|
-
| [
|
|
180
|
-
| [
|
|
181
|
-
| [
|
|
182
|
-
| [
|
|
183
|
-
| [
|
|
184
|
-
| [
|
|
185
|
-
| [
|
|
155
|
+
| id | 中文名 | 英文 | 来源 | 关键能力 / antd 对应 |
|
|
156
|
+
| ---------------------------------------- | -------- | ------------------------- | ---- | ---------------------------------------------------------------------- |
|
|
157
|
+
| [table](src/components/table/) | 基础表格 | Table | 🅢🅐 | 原生 HTML 元素薄包装(视觉骨架,无交互) |
|
|
158
|
+
| [data-table](src/components/data-table/) | 数据表 | DataTable | 🅢🅐 | TanStack Table + Table + SimplePagination(对齐 antd Table 完整) |
|
|
159
|
+
| [carousel](src/components/carousel/) | 轮播 | Carousel | 🅢🅐 | embla-carousel-react,单 / 多 / 循环 / 垂直(对齐 antd Carousel) |
|
|
160
|
+
| [statistic](src/components/statistic/) | 统计数值 | Statistic | 🅐 | KPI 展示 + 趋势 + 千分位 + 精度 + `Timer`(对齐 antd Statistic v5.25) |
|
|
161
|
+
| [tree](src/components/tree/) | 树形控件 | Tree | 🅐 | 递归,可展开 / 选 / 勾选(级联 + 半选)(对齐 antd Tree) |
|
|
162
|
+
| [timeline](src/components/timeline/) | 时间轴 | Timeline | 🅐 | 3 种布局 + 5 种圆点色 + pending 进行中(对齐 antd Timeline) |
|
|
163
|
+
| [typography](src/components/typography/) | 排版 | Title/Paragraph/Text/Link | 🅢🅐 | Prose 容器 + 子组件 + ellipsis/copyable/editable(对齐 antd Typography) |
|
|
164
|
+
| [transfer](src/components/transfer/) | 穿梭框 | Transfer | 🅐 | 双侧 List + 移动,targetKeys 单一真值(对齐 antd Transfer) |
|
|
165
|
+
|
|
166
|
+
### 5. 反馈与浮层 / Feedback & Overlay(16 件)
|
|
167
|
+
|
|
168
|
+
| id | 中文名 | 英文 | 来源 | 关键能力 / antd 对应 |
|
|
169
|
+
| -------------------------------------------- | ---------- | --------------- | ---- | ------------------------------------------------------------------------------------------------------------------ |
|
|
170
|
+
| [alert](src/components/alert/) | 警示条 | Alert | 🅢🅐 | + `type` / `showIcon` / `closable` / `banner`(对齐 antd Alert) |
|
|
171
|
+
| [dialog](src/components/dialog/) | 对话框 | Dialog | 🅢🅐 | Radix Dialog;Header / Footer / Title / Description(对齐 antd Modal) |
|
|
172
|
+
| [alert-dialog](src/components/alert-dialog/) | 确认对话框 | AlertDialog | 🅢🅐 | Radix AlertDialog;阻塞式 Action + Cancel(对齐 antd Modal.confirm) |
|
|
173
|
+
| [popconfirm](src/components/popconfirm/) | 气泡确认 | Popconfirm | 🅐 | 轻量确认,onConfirm Promise 自动 loading(对齐 antd Popconfirm) |
|
|
174
|
+
| [popover](src/components/popover/) | 浮层 | Popover | 🅢🅐 | + antd `arrow`(对齐 antd Popover) |
|
|
175
|
+
| [command](src/components/command/) | 命令面板 | Command | 🅢 | cmdk(Linear / Raycast 风格)过滤 + 键盘导航 + a11y;同时作为 Combobox / Select / AutoComplete 同源下拉内核(ADR 0029) |
|
|
176
|
+
| [tooltip](src/components/tooltip/) | 文字提示 | Tooltip | 🅢🅐 | + `arrow` / `placement(side)` + 一行 wrapper API(对齐 antd Tooltip) |
|
|
177
|
+
| [hover-card](src/components/hover-card/) | 悬浮卡片 | HoverCard | 🅢 | hover 触发的富内容卡(@user 卡片 / 链接预览)(antd 体系无) |
|
|
178
|
+
| [sheet](src/components/sheet/) | 侧边面板 | Sheet | 🅢🅐 | Radix Dialog + side(对齐 antd Drawer top/right/left) |
|
|
179
|
+
| [drawer](src/components/drawer/) | 抽屉 | Drawer | 🅢 | vaul,iOS 风格底部可拖拽(对齐 antd Drawer placement=bottom 但加拖拽) |
|
|
180
|
+
| [sonner](src/components/sonner/) | 消息提示 | Toaster + toast | 🅢🅐 | sonner 包装;短文字 toast(对齐 antd message) |
|
|
181
|
+
| [notification](src/components/notification/) | 通知卡片 | notification | 🅐 | sonner toast.custom 二次封装;title + description 卡片(对齐 antd Notification) |
|
|
182
|
+
| [result](src/components/result/) | 结果页 | Result | 🅐 | 整页级反馈(成功 / 失败 / 404 / 403 / 500)(对齐 antd Result) |
|
|
183
|
+
| [empty](src/components/empty/) | 空状态 | Empty | 🅐 | 列表 / 表格 / 搜索为空时占位 + extra 行动按钮(对齐 antd Empty) |
|
|
184
|
+
| [tour](src/components/tour/) | 漫游引导 | Tour | 🅐 | 多步骤 spotlight + 卡片 + 步进(对齐 antd Tour v5.0+) |
|
|
185
|
+
| [watermark](src/components/watermark/) | 水印 | Watermark | 🅐 | SVG 平铺水印(前端视觉,不作安全防护)(对齐 antd Watermark v5.1+) |
|
|
186
186
|
|
|
187
187
|
### 6. 导航 / Navigation(14 件)
|
|
188
188
|
|
|
189
|
-
| id
|
|
190
|
-
|
|
|
191
|
-
| [tabs](src/components/tabs/)
|
|
192
|
-
| [accordion](src/components/accordion/)
|
|
193
|
-
| [collapsible](src/components/collapsible/)
|
|
194
|
-
| [breadcrumb](src/components/breadcrumb/)
|
|
195
|
-
| [pagination](src/components/pagination/)
|
|
196
|
-
| [steps](src/components/steps/)
|
|
197
|
-
| [dropdown-menu](src/components/dropdown-menu/)
|
|
198
|
-
| [context-menu](src/components/context-menu/)
|
|
199
|
-
| [menubar](src/components/menubar/)
|
|
200
|
-
| [navigation-menu](src/components/navigation-menu/) | 导航菜单 | NavigationMenu
|
|
201
|
-
| [sidebar](src/components/sidebar/)
|
|
202
|
-
| [anchor](src/components/anchor/)
|
|
203
|
-
| [affix](src/components/affix/)
|
|
204
|
-
| [float-button](src/components/float-button/)
|
|
189
|
+
| id | 中文名 | 英文 | 来源 | 关键能力 / antd 对应 |
|
|
190
|
+
| -------------------------------------------------- | -------- | ---------------- | ---- | ------------------------------------------------------------------------------- |
|
|
191
|
+
| [tabs](src/components/tabs/) | 标签页 | Tabs | 🅢🅐 | Radix Tabs + antd `type(line/card)` + extra(对齐 antd Tabs) |
|
|
192
|
+
| [accordion](src/components/accordion/) | 折叠面板 | Accordion | 🅢🅐 | 单 / 多展开(对齐 antd Collapse 的 accordion 模式) |
|
|
193
|
+
| [collapsible](src/components/collapsible/) | 单区折叠 | Collapsible | 🅢 | 单区域展开收起,Radix 薄包装(antd 体系无独立组件) |
|
|
194
|
+
| [breadcrumb](src/components/breadcrumb/) | 面包屑 | Breadcrumb | 🅢🅐 | + `separator` / `itemRender`(asChild 配路由)(对齐 antd Breadcrumb) |
|
|
195
|
+
| [pagination](src/components/pagination/) | 分页 | SimplePagination | 🅢🅐 | shadcn primitives + 高阶 SimplePagination(对齐 antd Pagination) |
|
|
196
|
+
| [steps](src/components/steps/) | 步骤条 | Steps | 🅐 | 多步流程,状态推导(wait/process/finish/error)(对齐 antd Steps) |
|
|
197
|
+
| [dropdown-menu](src/components/dropdown-menu/) | 下拉菜单 | DropdownMenu | 🅢🅐 | Radix 完整(Item/CheckboxItem/RadioItem/Sub/...)(对齐 antd Dropdown) |
|
|
198
|
+
| [context-menu](src/components/context-menu/) | 右键菜单 | ContextMenu | 🅢 | 与 DropdownMenu 形态一致,触发为右键(antd 体系无) |
|
|
199
|
+
| [menubar](src/components/menubar/) | 菜单栏 | Menubar | 🅢 | 应用顶部菜单栏(macOS 风格)(antd 体系无) |
|
|
200
|
+
| [navigation-menu](src/components/navigation-menu/) | 导航菜单 | NavigationMenu | 🅢 | 网站主导航(富 Content 面板)(antd 体系无独立组件) |
|
|
201
|
+
| [sidebar](src/components/sidebar/) | 侧边栏 | Sidebar | 🅢🅐 | shadcn 复合(Provider + Sidebar + Menu + Trigger)(对齐 antd Layout.Sider + Menu) |
|
|
202
|
+
| [anchor](src/components/anchor/) | 锚点 | Anchor | 🅐 | 长文档侧边锚点,IntersectionObserver 自动高亮(对齐 antd Anchor) |
|
|
203
|
+
| [affix](src/components/affix/) | 固钉 | Affix | 🅐 | 滚动吸顶 / 吸底,保留原占位(对齐 antd Affix) |
|
|
204
|
+
| [float-button](src/components/float-button/) | 悬浮按钮 | FloatButton | 🅐 | 悬浮按钮 + Group + BackTop(对齐 antd FloatButton v5.0,替代旧 BackTop) |
|
|
205
205
|
|
|
206
206
|
### 7. 应用壳 / Application Shell(2 件)
|
|
207
207
|
|
|
208
|
-
| id
|
|
209
|
-
|
|
|
210
|
-
| [app](src/components/app/)
|
|
211
|
-
| [command](src/components/command/) | 命令面板 | Command | 🅢
|
|
208
|
+
| id | 中文名 | 英文 | 来源 | 关键能力 / antd 对应 |
|
|
209
|
+
| ---------------------------------- | -------- | ------- | ---- | ------------------------------------------------------------------- |
|
|
210
|
+
| [app](src/components/app/) | 应用容器 | App | 🅐 | 根容器,挂全局 Toaster + dir / lang(不接管主题)(对齐 antd App v5.1+) |
|
|
211
|
+
| [command](src/components/command/) | 命令面板 | Command | 🅢 | cmdk(Linear / Raycast 风格),Combobox 的底座(antd 体系无) |
|
|
212
212
|
|
|
213
213
|
---
|
|
214
214
|
|
|
@@ -218,88 +218,88 @@ Each component should ship a `<id>.meta.md` (frontmatter + Markdown). On install
|
|
|
218
218
|
|
|
219
219
|
### 1. Loading 类(3 件)— Spinner / Skeleton / Progress
|
|
220
220
|
|
|
221
|
-
| 组件
|
|
222
|
-
|
|
|
223
|
-
| Spinner
|
|
221
|
+
| 组件 | 何时用 | 互斥点 |
|
|
222
|
+
| -------- | ----------------------------------------------------------- | ------------------------------------- |
|
|
223
|
+
| Spinner | 时长未知、行内 / 占位旋转(请求中、按钮提交) | 不传达进度 |
|
|
224
224
|
| Skeleton | **结构占位**(段落 / 卡片 / 图片骨架),首屏加载时承接最终布局 | 不旋转,语义是"shape 占位"而非"动作中" |
|
|
225
|
-
| Progress | 时长可知(百分比),线形 / 环形
|
|
225
|
+
| Progress | 时长可知(百分比),线形 / 环形 | 数字驱动,不可空 |
|
|
226
226
|
|
|
227
227
|
**不可合并**:三种用户感知的 affordance 完全不同。
|
|
228
228
|
|
|
229
229
|
### 2. Toast / 通知类(2 件)— sonner / notification
|
|
230
230
|
|
|
231
|
-
| 组件
|
|
232
|
-
|
|
|
233
|
-
| `toast()` (来自 sonner)
|
|
234
|
-
| `notification.success(...)` | 标题 + 描述 + 状态图标卡片 — 对齐 antd `Notification`
|
|
231
|
+
| 组件 | 何时用 | 互斥点 |
|
|
232
|
+
| --------------------------- | ----------------------------------------------------------- | --------------------------- |
|
|
233
|
+
| `toast()` (来自 sonner) | 短文字反馈("已保存"/"网络异常重试中") — 对齐 antd `message` | 无标题,单行 |
|
|
234
|
+
| `notification.success(...)` | 标题 + 描述 + 状态图标卡片 — 对齐 antd `Notification` | 多行结构,适合"操作完成详情" |
|
|
235
235
|
|
|
236
236
|
**已共用 sonner runtime**:Notification 内部就是 `sonner.toast.custom`,**已经是同源**,各自 entry 只是给消费方更清晰的 API surface — 实质代码无重复。
|
|
237
237
|
|
|
238
238
|
### 3. Modal / Overlay 阻塞类(6 件)— Dialog / AlertDialog / Popconfirm / Sheet / Drawer / Tour
|
|
239
239
|
|
|
240
|
-
| 组件
|
|
241
|
-
|
|
|
242
|
-
| Dialog
|
|
243
|
-
| AlertDialog | **不可逆 / 高风险** 二次确认(注销 / 删库)
|
|
244
|
-
| Popconfirm
|
|
245
|
-
| Sheet
|
|
246
|
-
| Drawer
|
|
247
|
-
| Tour
|
|
240
|
+
| 组件 | 何时用 | 互斥点 |
|
|
241
|
+
| ----------- | ------------------------------------------------- | ---------------------------- |
|
|
242
|
+
| Dialog | 通用模态,自由内容 | 中性,需自填语义 |
|
|
243
|
+
| AlertDialog | **不可逆 / 高风险** 二次确认(注销 / 删库) | 强 Action + Cancel,无 X 关闭 |
|
|
244
|
+
| Popconfirm | **低风险** 行内 / 行末轻量确认(删一行 / 忽略一条) | 锚定触发器,不阻塞页面 |
|
|
245
|
+
| Sheet | 侧边滑出,4 方向(antd `Drawer placement`) | 基于 Radix Dialog |
|
|
246
|
+
| Drawer | 底部可拖拽(iOS 风格) | 基于 vaul,**主打移动端** |
|
|
247
|
+
| Tour | 多步引导(spotlight + 步进) | 时间性 + 跨步骤状态 |
|
|
248
248
|
|
|
249
249
|
**Sheet ↔ Drawer 的边界值得详细说明**(下文「合并建议」单列)。
|
|
250
250
|
|
|
251
251
|
### 4. 透明覆盖层(3 件)— Tooltip / Popover / HoverCard
|
|
252
252
|
|
|
253
|
-
| 组件
|
|
254
|
-
|
|
|
255
|
-
| Tooltip
|
|
256
|
-
| Popover
|
|
253
|
+
| 组件 | 触发 | 内容 | 互斥点 |
|
|
254
|
+
| --------- | ----------- | ----------------------------------- | ------------------------- |
|
|
255
|
+
| Tooltip | hover(延迟) | **纯文本提示** | 不可交互 |
|
|
256
|
+
| Popover | **click** | **可交互复合内容** | 通常带 trigger 按钮 |
|
|
257
257
|
| HoverCard | hover(延迟) | **富 ReactNode**(头像卡 / 链接预览) | 内容静态,可点击但不"激活" |
|
|
258
258
|
|
|
259
|
-
**不可合并**:触发方式 ×
|
|
259
|
+
**不可合并**:触发方式 × 交互性 = 4 个象限,3 件覆盖 3 象限(剩 click + 纯文本 = AlertDialog)。
|
|
260
260
|
|
|
261
261
|
### 5. 选择类下拉(7 件)— Select / NativeSelect / Combobox / AutoComplete / TreeSelect / Cascader / Segmented
|
|
262
262
|
|
|
263
|
-
| 组件
|
|
264
|
-
|
|
|
265
|
-
| Select
|
|
266
|
-
| NativeSelect | options 之一
|
|
267
|
-
| Combobox
|
|
268
|
-
| AutoComplete | **任意字符串**
|
|
269
|
-
| TreeSelect
|
|
270
|
-
| Cascader
|
|
271
|
-
| Segmented
|
|
263
|
+
| 组件 | value 域 | 候选呈现 | 互斥点 |
|
|
264
|
+
| ------------ | ---------------------- | ----------------- | ------------------------- |
|
|
265
|
+
| Select | options 之一 | Radix popup | **必选**,无搜索 |
|
|
266
|
+
| NativeSelect | options 之一 | 原生 picker | **0 JS**,SSR / 移动端友好 |
|
|
267
|
+
| Combobox | options 之一 | Command + Popover | **必选 + 搜索** |
|
|
268
|
+
| AutoComplete | **任意字符串** | 自渲下拉 | **可自由输入**,候选是建议 |
|
|
269
|
+
| TreeSelect | options 之一(支持多选) | Tree 嵌入 Popover | **层级结构** |
|
|
270
|
+
| Cascader | 路径数组 | 多列面板 | **级联,每层下钻** |
|
|
271
|
+
| Segmented | options 之一 | inline 按钮组 | **2~5 档紧凑互斥** |
|
|
272
272
|
|
|
273
273
|
**不可合并**:value 形态 × 候选呈现 = 7 个独立场景。
|
|
274
274
|
|
|
275
275
|
### 6. 互斥单选可视化(4 件)— RadioGroup / Segmented / ToggleGroup(single)/ Tabs
|
|
276
276
|
|
|
277
|
-
| 组件
|
|
278
|
-
|
|
|
279
|
-
| RadioGroup
|
|
280
|
-
| Segmented
|
|
277
|
+
| 组件 | 主场景 | 互斥点 |
|
|
278
|
+
| ------------------- | ------------------------------------ | ---------------------- |
|
|
279
|
+
| RadioGroup | **表单字段**(性别 / 偏好) | 标准 radio 圆点 |
|
|
280
|
+
| Segmented | **视图切换 / 时段档**(日/周/月) | 紧凑分段,iOS 风格 |
|
|
281
281
|
| ToggleGroup(single) | **工具栏图标按钮**(B/I/U / 左/中/右) | 图标级,可切换 multiple |
|
|
282
|
-
| Tabs
|
|
282
|
+
| Tabs | **页面 / 卡片内的切换** | 内容区域跟随切换 |
|
|
283
283
|
|
|
284
284
|
**不可合并**:视觉语义和上下文不同,虽然底层都是"互斥单选"。
|
|
285
285
|
|
|
286
286
|
### 7. 容器 / 卡片 / 空状态(4 件)— Card / Item / Empty / Result
|
|
287
287
|
|
|
288
|
-
| 组件
|
|
289
|
-
|
|
|
290
|
-
| Card
|
|
291
|
-
| Item
|
|
292
|
-
| Empty
|
|
293
|
-
| Result | **整页级反馈**(成功 / 失败 / 404 / 403 / 500)
|
|
288
|
+
| 组件 | 颗粒度 | 互斥点 |
|
|
289
|
+
| ------ | ----------------------------------------------------- | ----------------------------- |
|
|
290
|
+
| Card | **完整业务卡片**(Header/Cover/Content/Footer/Actions) | 多 section |
|
|
291
|
+
| Item | **列表 / 卡片单元行**(Media + Content + Actions 5 槽) | 嵌入容器使用,取代旧 List.Item |
|
|
292
|
+
| Empty | **空状态占位** | 含插画 + extra 行动按钮 |
|
|
293
|
+
| Result | **整页级反馈**(成功 / 失败 / 404 / 403 / 500) | 占据 viewport,含状态码与建议 |
|
|
294
294
|
|
|
295
295
|
**不可合并**:颗粒度从「单元 → 卡片 → 占位 → 整页」是清晰梯度。
|
|
296
296
|
|
|
297
297
|
### 8. 表单字段抽象(2 件)— Form / Field
|
|
298
298
|
|
|
299
|
-
| 组件
|
|
300
|
-
|
|
|
301
|
-
| Form(FormField + FormItem + ...)
|
|
302
|
-
| Field(FieldLabel + FieldError + ...) | **不绑** — 跟 Server Actions / TanStack Form / 原生 form 都能搭 | 仅 UI 抽象
|
|
299
|
+
| 组件 | 状态管理 | 互斥点 |
|
|
300
|
+
| ------------------------------------ | --------------------------------------------------------------- | ---------------------- |
|
|
301
|
+
| Form(FormField + FormItem + ...) | **强绑 react-hook-form + zod** | 与 RHF schema 深度耦合 |
|
|
302
|
+
| Field(FieldLabel + FieldError + ...) | **不绑** — 跟 Server Actions / TanStack Form / 原生 form 都能搭 | 仅 UI 抽象 |
|
|
303
303
|
|
|
304
304
|
**不可合并**:Form 是"RHF 流派的快速通道",Field 是"通用 UI 槽"。共存是有意为之。
|
|
305
305
|
|
|
@@ -307,18 +307,18 @@ Each component should ship a `<id>.meta.md` (frontmatter + Markdown). On install
|
|
|
307
307
|
|
|
308
308
|
## 合并建议
|
|
309
309
|
|
|
310
|
-
| 候选合并
|
|
311
|
-
|
|
|
312
|
-
| **Sheet ↔ Drawer**
|
|
313
|
-
| **Spinner ↔ Skeleton ↔ Progress**
|
|
314
|
-
| **Tooltip ↔ Popover ↔ HoverCard**
|
|
315
|
-
| **Select ↔ Combobox ↔ AutoComplete**
|
|
316
|
-
| **RadioGroup ↔ Segmented ↔ ToggleGroup ↔ Tabs** | ❌ **保持分离**
|
|
317
|
-
| **Form ↔ Field**
|
|
318
|
-
| **toast() ↔ notification**
|
|
319
|
-
| **Pagination ↔ SimplePagination**
|
|
320
|
-
| **Tree ↔ TreeSelect**
|
|
321
|
-
| **resizable ↔ Splitter(antd)**
|
|
310
|
+
| 候选合并 | 建议 | 理由 |
|
|
311
|
+
| ----------------------------------------------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
312
|
+
| **Sheet ↔ Drawer** | ❌ **保持分离** | Sheet 走 Radix Dialog(轻、4 方向、桌面端);Drawer 走 vaul(重、仅底部、可拖拽手势、iOS 风格)。**两种不同的库 + 不同的 UX 范式**,业务侧按场景选 |
|
|
313
|
+
| **Spinner ↔ Skeleton ↔ Progress** | ❌ **保持分离** | 三种 affordance 互斥(见 §1) |
|
|
314
|
+
| **Tooltip ↔ Popover ↔ HoverCard** | ❌ **保持分离** | 触发 × 交互性 4 象限(见 §4) |
|
|
315
|
+
| **Select ↔ Combobox ↔ AutoComplete** | ❌ **保持分离** | value 域(必选 / 自由) × 是否搜索 = 4 类(见 §5) |
|
|
316
|
+
| **RadioGroup ↔ Segmented ↔ ToggleGroup ↔ Tabs** | ❌ **保持分离** | 视觉语义不同(表单 / 视图切换 / 工具栏 / 页面切换) |
|
|
317
|
+
| **Form ↔ Field** | ❌ **保持分离** | 状态管理绑定差异(见 §8) |
|
|
318
|
+
| **toast() ↔ notification** | ✅ **已合并 runtime** | 都基于 sonner;notification 是 sonner.toast.custom 的二次封装,**已是同源不同表层** |
|
|
319
|
+
| **Pagination ↔ SimplePagination** | ✅ **已合并 entry** | 在同一 `pagination` entry 内导出 shadcn primitives + 高阶 SimplePagination |
|
|
320
|
+
| **Tree ↔ TreeSelect** | ✅ **依赖关系已表达** | TreeSelect 在 `registryDependencies` 中声明 Tree,装 TreeSelect 时 Tree 会被连带装入(无重复源码) |
|
|
321
|
+
| **resizable ↔ Splitter(antd)** | ✅ **已 alias** | resizable description 已标 "等价 antd `Splitter`(v5.21+)" |
|
|
322
322
|
|
|
323
323
|
### 删除 / 替代记录
|
|
324
324
|
|
|
@@ -328,9 +328,9 @@ Each component should ship a `<id>.meta.md` (frontmatter + Markdown). On install
|
|
|
328
328
|
|
|
329
329
|
### 暂不实现(待用户需求触发)
|
|
330
330
|
|
|
331
|
-
| 组件
|
|
332
|
-
|
|
|
333
|
-
| Chart
|
|
334
|
-
| QRCode
|
|
335
|
-
| Direction Provider | 🅢(shadcn 2026-01 新)
|
|
336
|
-
| BorderBeam
|
|
331
|
+
| 组件 | 来源 | 暂缓理由 |
|
|
332
|
+
| ------------------ | --------------------------------------------- | ------------------------------------- |
|
|
333
|
+
| Chart | 🅢🅐(shadcn 2026-03 升 Recharts v3 / antd Plot) | 用户指示暂跳过 |
|
|
334
|
+
| QRCode | 🅐(antd v5.1+) | 需引入 `qrcode.react` 依赖,用户暂跳过 |
|
|
335
|
+
| Direction Provider | 🅢(shadcn 2026-01 新) | RTL provider,无业务需求暂缓 |
|
|
336
|
+
| BorderBeam | 🅐(antd v6.4 装饰类) | 装饰组件,优先级低 |
|