@turinhub/atomix-common-ui 0.1.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/LICENSE +21 -0
- package/README.md +307 -0
- package/dist/components/DataTable.d.ts +89 -0
- package/dist/components/DataTable.d.ts.map +1 -0
- package/dist/components/DeleteConfirmDialog.d.ts +38 -0
- package/dist/components/DeleteConfirmDialog.d.ts.map +1 -0
- package/dist/components/TableHeader.d.ts +28 -0
- package/dist/components/TableHeader.d.ts.map +1 -0
- package/dist/components/TablePagination.d.ts +30 -0
- package/dist/components/TablePagination.d.ts.map +1 -0
- package/dist/components/ui/button.d.ts +12 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/dialog.d.ts +20 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/input.d.ts +6 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/label.d.ts +6 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/select.d.ts +14 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/index.c.js +23 -0
- package/dist/index.c.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +765 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/types/component-types.d.ts +83 -0
- package/dist/types/component-types.d.ts.map +1 -0
- package/package.json +92 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 TurinHub
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
# @turinhub/atomix-common-ui
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@turinhub/atomix-common-ui)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
> 基于 shadcn/ui 的业务组件库 - 保持最大灵活性
|
|
7
|
+
|
|
8
|
+
## 🎯 设计理念
|
|
9
|
+
|
|
10
|
+
这个包采用 **组件注入** 模式,而不是传统的全打包模式:
|
|
11
|
+
|
|
12
|
+
- ✅ **保留 shadcn/ui 的灵活性**:UI 组件源码在你的项目中,随时可以修改
|
|
13
|
+
- ✅ **避免版本冲突**:不会与你自己安装的 shadcn/ui 冲突
|
|
14
|
+
- ✅ **类型安全**:完整的 TypeScript 类型支持
|
|
15
|
+
- ✅ **零额外依赖**:只打包业务逻辑
|
|
16
|
+
|
|
17
|
+
## ✨ 特性
|
|
18
|
+
|
|
19
|
+
- 📦 **开箱即用** - 提供常用的业务组件,无需从零开始
|
|
20
|
+
- 🎨 **美观设计** - 基于 shadcn/ui,遵循现代设计规范
|
|
21
|
+
- 🔧 **完全可定制** - UI 组件注入模式,保持最大灵活性
|
|
22
|
+
- 📝 **类型安全** - 完整的 TypeScript 类型定义
|
|
23
|
+
- 🧪 **测试覆盖** - 使用 Vitest + Testing Library,确保代码质量
|
|
24
|
+
- 📚 **详细文档** - 完整的使用文档和示例
|
|
25
|
+
- 🔌 **零额外依赖** - 只打包业务逻辑,UI 组件由项目提供
|
|
26
|
+
|
|
27
|
+
## 📦 安装
|
|
28
|
+
|
|
29
|
+
**环境要求:**
|
|
30
|
+
- Node.js >= 18
|
|
31
|
+
- React >= 18.0.0 || >= 19.0.0
|
|
32
|
+
- pnpm (推荐) 或 npm/yarn
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pnpm add @turinhub/atomix-common-ui
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## 🔗 快速链接
|
|
39
|
+
|
|
40
|
+
- 📖 [完整使用文档](./USAGE.md)
|
|
41
|
+
- 📦 [npm 包](https://www.npmjs.com/package/@turinhub/atomix-common-ui)
|
|
42
|
+
- 🎨 基于 [shadcn/ui](https://ui.shadcn.com/)
|
|
43
|
+
- 🐛 [问题反馈](https://github.com/turinhub/atomix-common-ui/issues)
|
|
44
|
+
|
|
45
|
+
## 📋 前置要求
|
|
46
|
+
|
|
47
|
+
你需要自己在项目中安装 shadcn/ui 的 UI 组件:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# 如果你还没有 shadcn/ui
|
|
51
|
+
npx shadcn-ui@latest init
|
|
52
|
+
|
|
53
|
+
# 安装需要的 UI 组件
|
|
54
|
+
npx shadcn-ui@latest add button card dialog input label select table skeleton dropdown-menu
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## 🚀 快速开始
|
|
58
|
+
|
|
59
|
+
### 1. 创建 UI 组件适配器
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
// src/lib/ui-adapter.ts
|
|
63
|
+
import {
|
|
64
|
+
Card,
|
|
65
|
+
CardContent,
|
|
66
|
+
CardFooter,
|
|
67
|
+
} from '@/components/ui/card';
|
|
68
|
+
import { Button } from '@/components/ui/button';
|
|
69
|
+
import {
|
|
70
|
+
TableHeader as DataTableHeader,
|
|
71
|
+
TablePagination as DataTablePagination,
|
|
72
|
+
} from '@turinhub/atomix-common-ui';
|
|
73
|
+
// ... 其他 UI 组件
|
|
74
|
+
|
|
75
|
+
import type { UIComponents } from '@turinhub/atomix-common-ui';
|
|
76
|
+
|
|
77
|
+
export const dataTableUI: UIComponents = {
|
|
78
|
+
Card,
|
|
79
|
+
CardContent,
|
|
80
|
+
CardFooter,
|
|
81
|
+
Button,
|
|
82
|
+
TableHeaderComponent: DataTableHeader,
|
|
83
|
+
TablePaginationComponent: DataTablePagination,
|
|
84
|
+
// ... 其他 UI 组件
|
|
85
|
+
};
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 2. 使用 DataTable 组件
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
import { DataTable } from '@turinhub/atomix-common-ui';
|
|
92
|
+
import { dataTableUI } from '@/lib/ui-adapter';
|
|
93
|
+
|
|
94
|
+
<DataTable
|
|
95
|
+
components={dataTableUI}
|
|
96
|
+
data={users}
|
|
97
|
+
columns={columns}
|
|
98
|
+
rowKey="id"
|
|
99
|
+
/>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## 📚 组件列表
|
|
103
|
+
|
|
104
|
+
- **DataTable** - 功能强大的数据表格组件
|
|
105
|
+
- **DeleteConfirmDialog** - 删除确认对话框
|
|
106
|
+
- **TableHeader** - 表格头部(支持搜索和操作按钮)
|
|
107
|
+
- **TablePagination** - 分页组件
|
|
108
|
+
|
|
109
|
+
## 📁 项目结构
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
atomix-common-ui/
|
|
113
|
+
├── src/
|
|
114
|
+
│ ├── components/ # 业务组件
|
|
115
|
+
│ │ ├── DataTable.tsx # 数据表格组件
|
|
116
|
+
│ │ ├── DeleteConfirmDialog.tsx # 删除确认对话框
|
|
117
|
+
│ │ ├── TableHeader.tsx # 表格头部
|
|
118
|
+
│ │ ├── TablePagination.tsx # 分页组件
|
|
119
|
+
│ │ ├── ui/ # shadcn/ui 组件类型定义
|
|
120
|
+
│ │ └── __tests__/ # 组件测试
|
|
121
|
+
│ ├── types/ # TypeScript 类型定义
|
|
122
|
+
│ │ └── component-types.ts # UI 组件类型
|
|
123
|
+
│ ├── lib/ # 工具函数
|
|
124
|
+
│ │ └── utils.ts # cn 工具函数
|
|
125
|
+
│ ├── index.ts # 主入口文件
|
|
126
|
+
│ └── test/ # 测试配置
|
|
127
|
+
│ └── setup.ts # 测试环境设置
|
|
128
|
+
├── playground/ # 开发调试环境
|
|
129
|
+
├── dist/ # 构建输出
|
|
130
|
+
├── README.md # 项目说明
|
|
131
|
+
└── USAGE.md # 使用文档
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## 🛠️ 工具函数
|
|
135
|
+
|
|
136
|
+
### cn
|
|
137
|
+
|
|
138
|
+
`cn` 函数是一个用于合并 className 的工具函数,基于 `clsx` 和 `tailwind-merge`。
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
import { cn } from '@turinhub/atomix-common-ui';
|
|
142
|
+
|
|
143
|
+
// 合并多个 className
|
|
144
|
+
cn('px-4 py-2', 'bg-blue-500');
|
|
145
|
+
|
|
146
|
+
// 条件 className
|
|
147
|
+
cn('base-class', isActive && 'active-class', isError && 'error-class');
|
|
148
|
+
|
|
149
|
+
// 合并 Tailwind 类(自动去重)
|
|
150
|
+
cn('px-4 py-2 bg-blue-500', 'px-2 bg-red-500');
|
|
151
|
+
// 结果: 'py-2 bg-red-500' (px-2 覆盖 px-4)
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## 🔷 TypeScript 支持
|
|
155
|
+
|
|
156
|
+
本项目完全使用 TypeScript 编写,提供完整的类型定义:
|
|
157
|
+
|
|
158
|
+
```typescript
|
|
159
|
+
import type {
|
|
160
|
+
Column,
|
|
161
|
+
DataTableProps,
|
|
162
|
+
UIComponents,
|
|
163
|
+
DeleteConfirmDialogProps,
|
|
164
|
+
DialogUIComponents,
|
|
165
|
+
TableHeaderProps,
|
|
166
|
+
HeaderUIComponents,
|
|
167
|
+
TablePaginationProps,
|
|
168
|
+
PaginationUIComponents,
|
|
169
|
+
} from '@turinhub/atomix-common-ui';
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
所有组件都有严格的类型检查,确保使用时的类型安全。
|
|
173
|
+
|
|
174
|
+
## 🧪 测试
|
|
175
|
+
|
|
176
|
+
本项目使用 Vitest 和 Testing Library 进行单元测试和集成测试。
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
# 运行所有测试
|
|
180
|
+
pnpm test
|
|
181
|
+
|
|
182
|
+
# 运行测试并生成覆盖率报告
|
|
183
|
+
pnpm test:coverage
|
|
184
|
+
|
|
185
|
+
# 以 UI 模式运行测试
|
|
186
|
+
pnpm test:ui
|
|
187
|
+
|
|
188
|
+
# 运行测试(不监听文件变化)
|
|
189
|
+
pnpm test:run
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
测试文件位于 `src/components/__tests__/` 目录下。
|
|
193
|
+
|
|
194
|
+
## 🎮 Playground
|
|
195
|
+
|
|
196
|
+
Playground 是一个本地开发环境,用于调试和预览组件。
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
# 启动开发服务器
|
|
200
|
+
pnpm playground:dev
|
|
201
|
+
|
|
202
|
+
# 构建 playground
|
|
203
|
+
pnpm playground:build
|
|
204
|
+
|
|
205
|
+
# 预览构建后的 playground
|
|
206
|
+
pnpm playground:preview
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Playground 源码位于 `playground/` 目录,你可以随意修改来测试组件。
|
|
210
|
+
|
|
211
|
+
## 🔧 开发
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
# 安装依赖
|
|
215
|
+
pnpm install
|
|
216
|
+
|
|
217
|
+
# 构建
|
|
218
|
+
pnpm build
|
|
219
|
+
|
|
220
|
+
# 监听模式构建
|
|
221
|
+
pnpm dev
|
|
222
|
+
|
|
223
|
+
# 类型检查
|
|
224
|
+
pnpm typecheck
|
|
225
|
+
|
|
226
|
+
# 代码检查
|
|
227
|
+
pnpm lint
|
|
228
|
+
|
|
229
|
+
# 自动修复代码问题
|
|
230
|
+
pnpm lint:fix
|
|
231
|
+
|
|
232
|
+
# 格式化代码
|
|
233
|
+
pnpm format
|
|
234
|
+
|
|
235
|
+
# 检查代码格式
|
|
236
|
+
pnpm format:check
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## 🤔 为什么这样设计?
|
|
240
|
+
|
|
241
|
+
### ❌ 传统方式(全打包)
|
|
242
|
+
|
|
243
|
+
```typescript
|
|
244
|
+
// 问题:UI 组件被打包进 npm 包
|
|
245
|
+
import { DataTable, Button, Dialog } from '@some-ui-lib'
|
|
246
|
+
|
|
247
|
+
// 缺点:
|
|
248
|
+
// 1. ❌ 无法修改 Button、Dialog 的源码
|
|
249
|
+
// 2. ❌ 与项目自己的 shadcn/ui 冲突
|
|
250
|
+
// 3. ❌ shadcn/ui 更新时需要等这个包更新
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### ✅ 我们的方式(组件注入)
|
|
254
|
+
|
|
255
|
+
```typescript
|
|
256
|
+
// 优势:UI 组件由业务项目提供
|
|
257
|
+
import { DataTable } from '@turinhub/atomix-common-ui'
|
|
258
|
+
import { Button, Dialog } from '@/components/ui' // 自己的 shadcn/ui
|
|
259
|
+
|
|
260
|
+
// 优点:
|
|
261
|
+
// 1. ✅ 可以随时修改 UI 组件源码
|
|
262
|
+
// 2. ✅ 不会有版本冲突
|
|
263
|
+
// 3. ✅ 符合 shadcn/ui 的设计理念
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
## 🤝 贡献指南
|
|
267
|
+
|
|
268
|
+
欢迎贡献代码!请遵循以下步骤:
|
|
269
|
+
|
|
270
|
+
1. Fork 本仓库
|
|
271
|
+
2. 创建特性分支 (`git checkout -b feature/AmazingFeature`)
|
|
272
|
+
3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)
|
|
273
|
+
4. 推送到分支 (`git push origin feature/AmazingFeature`)
|
|
274
|
+
5. 开启 Pull Request
|
|
275
|
+
|
|
276
|
+
### 代码规范
|
|
277
|
+
|
|
278
|
+
- 使用 TypeScript 编写代码
|
|
279
|
+
- 遵循 ESLint 配置的代码风格
|
|
280
|
+
- 为新功能添加测试
|
|
281
|
+
- 更新相关文档
|
|
282
|
+
|
|
283
|
+
## 🌐 浏览器支持
|
|
284
|
+
|
|
285
|
+
- Chrome (最新版本)
|
|
286
|
+
- Firefox (最新版本)
|
|
287
|
+
- Safari (最新版本)
|
|
288
|
+
- Edge (最新版本)
|
|
289
|
+
|
|
290
|
+
由于使用 React 18+,不支持 Internet Explorer。
|
|
291
|
+
|
|
292
|
+
## 🐛 问题反馈
|
|
293
|
+
|
|
294
|
+
如果你发现 bug 或有功能建议,请:
|
|
295
|
+
|
|
296
|
+
1. 查看现有的 [Issues](https://github.com/turinhub/atomix-common-ui/issues)
|
|
297
|
+
2. 如果问题不存在,创建新的 Issue
|
|
298
|
+
3. 提供详细的复现步骤和环境信息
|
|
299
|
+
|
|
300
|
+
## 📮 联系方式
|
|
301
|
+
|
|
302
|
+
- 作者: TurinHub
|
|
303
|
+
- Email: support@turinhub.com
|
|
304
|
+
|
|
305
|
+
## 📄 License
|
|
306
|
+
|
|
307
|
+
MIT
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { UIComponent, ButtonComponent, CardComponent, TableComponent, TableRowComponent, TableCellComponent } from '../types/component-types';
|
|
3
|
+
import { TableHeaderProps } from './TableHeader';
|
|
4
|
+
import { TablePaginationProps } from './TablePagination';
|
|
5
|
+
type ColumnKey<T> = Extract<keyof T, string>;
|
|
6
|
+
type ActionMenuItem<T> = {
|
|
7
|
+
label: ReactNode;
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
onClick: (record: T, index: number) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
separator?: never;
|
|
12
|
+
};
|
|
13
|
+
type ActionSeparatorItem = {
|
|
14
|
+
separator: true;
|
|
15
|
+
className?: string;
|
|
16
|
+
label?: never;
|
|
17
|
+
icon?: never;
|
|
18
|
+
onClick?: never;
|
|
19
|
+
};
|
|
20
|
+
type ActionItem<T> = ActionMenuItem<T> | ActionSeparatorItem;
|
|
21
|
+
export interface Column<T = unknown> {
|
|
22
|
+
key: ColumnKey<T>;
|
|
23
|
+
title: ReactNode;
|
|
24
|
+
render?: (value: T[ColumnKey<T>], record: T, index: number) => ReactNode;
|
|
25
|
+
width?: string;
|
|
26
|
+
align?: 'left' | 'center' | 'right';
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* UI 组件适配器接口
|
|
30
|
+
* 业务项目应该传入自己项目中的 shadcn/ui 组件
|
|
31
|
+
*/
|
|
32
|
+
export interface UIComponents {
|
|
33
|
+
Card: CardComponent;
|
|
34
|
+
CardContent: UIComponent<HTMLAttributes<HTMLDivElement>>;
|
|
35
|
+
CardFooter: UIComponent<HTMLAttributes<HTMLDivElement>>;
|
|
36
|
+
Table: TableComponent;
|
|
37
|
+
TableBody: UIComponent<HTMLAttributes<HTMLTableSectionElement>>;
|
|
38
|
+
TableCell: TableCellComponent;
|
|
39
|
+
TableHead: TableCellComponent;
|
|
40
|
+
TableHeader: UIComponent<HTMLAttributes<HTMLTableSectionElement>>;
|
|
41
|
+
TableRow: TableRowComponent;
|
|
42
|
+
Button: ButtonComponent;
|
|
43
|
+
DropdownMenu: UIComponent<HTMLAttributes<HTMLDivElement>>;
|
|
44
|
+
DropdownMenuTrigger: ButtonComponent;
|
|
45
|
+
DropdownMenuContent: UIComponent<HTMLAttributes<HTMLDivElement> & {
|
|
46
|
+
align?: 'start' | 'end' | 'center';
|
|
47
|
+
}>;
|
|
48
|
+
DropdownMenuItem: UIComponent<ButtonHTMLAttributes<HTMLDivElement> & {
|
|
49
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
50
|
+
}>;
|
|
51
|
+
DropdownMenuSeparator: UIComponent;
|
|
52
|
+
Skeleton: UIComponent<HTMLAttributes<HTMLDivElement>>;
|
|
53
|
+
TableHeaderComponent: React.ComponentType<TableHeaderProps>;
|
|
54
|
+
TablePaginationComponent: React.ComponentType<TablePaginationProps>;
|
|
55
|
+
}
|
|
56
|
+
export interface DataTableProps<T = unknown> {
|
|
57
|
+
data: T[];
|
|
58
|
+
loading?: boolean;
|
|
59
|
+
columns: Column<T>[];
|
|
60
|
+
rowKey: keyof T | ((record: T) => string);
|
|
61
|
+
emptyText?: string;
|
|
62
|
+
searchActiveEmptyText?: string;
|
|
63
|
+
header?: TableHeaderProps;
|
|
64
|
+
pagination?: TablePaginationProps & {
|
|
65
|
+
show?: boolean;
|
|
66
|
+
};
|
|
67
|
+
rowClassName?: (record: T, index: number) => string;
|
|
68
|
+
onRow?: (record: T, index: number) => {
|
|
69
|
+
onClick?: () => void;
|
|
70
|
+
onDoubleClick?: () => void;
|
|
71
|
+
};
|
|
72
|
+
actions?: {
|
|
73
|
+
title?: string;
|
|
74
|
+
mode?: 'expanded' | 'collapsed';
|
|
75
|
+
render?: (record: T, index: number) => ReactNode;
|
|
76
|
+
items?: ActionItem<T>[];
|
|
77
|
+
};
|
|
78
|
+
components?: UIComponents;
|
|
79
|
+
renderCard?: (content: ReactNode) => ReactNode;
|
|
80
|
+
renderTable?: (header: ReactNode, body: ReactNode) => ReactNode;
|
|
81
|
+
renderActions?: (record: T, index: number) => ReactNode;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* 默认的 DataTable 实现
|
|
85
|
+
* 需要通过 components prop 注入 UI 组件
|
|
86
|
+
*/
|
|
87
|
+
export declare function DataTable<T extends Record<string, any>>({ data, loading, columns, rowKey, emptyText, searchActiveEmptyText, header, pagination, rowClassName, onRow, actions, components, renderCard, renderTable, renderActions, }: DataTableProps<T>): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
88
|
+
export {};
|
|
89
|
+
//# sourceMappingURL=DataTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../src/components/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElE,OAAO,KAAK,EACV,WAAW,EACX,eAAe,EACf,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,KAAK,SAAS,CAAC,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;AAE7C,KAAK,cAAc,CAAC,CAAC,IAAI;IACvB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,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,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACpD,KAAK,CAAC,EAAE,CACN,MAAM,EAAE,CAAC,EACT,KAAK,EAAE,MAAM,KACV;QACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;KAC5B,CAAC;IAGF,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC;QAChC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;QACjD,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;KACzB,CAAC;IAGF,UAAU,CAAC,EAAE,YAAY,CAAC;IAG1B,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,KAAK,SAAS,CAAC;IAC/C,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,KAAK,SAAS,CAAC;IAChE,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;CACzD;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,EACvD,IAAI,EACJ,OAAe,EACf,OAAO,EACP,MAAM,EACN,SAAkB,EAClB,qBAAkC,EAClC,MAAM,EACN,UAAU,EACV,YAAY,EACZ,KAAK,EACL,OAAO,EACP,UAAU,EACV,UAAU,EACV,WAAW,EACX,aAAa,GACd,EAAE,cAAc,CAAC,CAAC,CAAC,2UA8RnB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ButtonComponent, InputComponent, LabelComponent, DialogComponent, DialogContentComponent, DialogHeaderComponent, DialogFooterComponent, DialogTitleComponent, DialogDescriptionComponent } from '../types/component-types';
|
|
2
|
+
/**
|
|
3
|
+
* UI 组件适配器接口
|
|
4
|
+
*/
|
|
5
|
+
export interface DialogUIComponents {
|
|
6
|
+
Dialog: DialogComponent;
|
|
7
|
+
DialogContent: DialogContentComponent;
|
|
8
|
+
DialogHeader: DialogHeaderComponent;
|
|
9
|
+
DialogFooter: DialogFooterComponent;
|
|
10
|
+
DialogTitle: DialogTitleComponent;
|
|
11
|
+
DialogDescription: DialogDescriptionComponent;
|
|
12
|
+
Button: ButtonComponent;
|
|
13
|
+
Input: InputComponent;
|
|
14
|
+
Label: LabelComponent;
|
|
15
|
+
}
|
|
16
|
+
export interface DeleteConfirmDialogProps {
|
|
17
|
+
open: boolean;
|
|
18
|
+
onOpenChange: (open: boolean) => void;
|
|
19
|
+
title: React.ReactNode;
|
|
20
|
+
description: React.ReactNode;
|
|
21
|
+
onConfirm: () => void;
|
|
22
|
+
loading?: boolean;
|
|
23
|
+
confirmText?: string;
|
|
24
|
+
cancelText?: string;
|
|
25
|
+
confirmButtonVariant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
|
|
26
|
+
verification?: {
|
|
27
|
+
targetValue: string;
|
|
28
|
+
label?: string;
|
|
29
|
+
placeholder?: string;
|
|
30
|
+
};
|
|
31
|
+
components?: DialogUIComponents;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 删除确认对话框
|
|
35
|
+
* 需要通过 components prop 注入 UI 组件
|
|
36
|
+
*/
|
|
37
|
+
export declare function DeleteConfirmDialog({ open, onOpenChange, title, description, onConfirm, loading, confirmText, cancelText, confirmButtonVariant, verification, components, }: DeleteConfirmDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
//# sourceMappingURL=DeleteConfirmDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeleteConfirmDialog.d.ts","sourceRoot":"","sources":["../../src/components/DeleteConfirmDialog.t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EACT,OAAe,EACf,WAAoB,EACpB,UAAiB,EACjB,oBAAoC,EACpC,YAAY,EACZ,UAAU,GACX,EAAE,wBAAwB,2CA4G1B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { InputComponent, ButtonComponent } from '../types/component-types';
|
|
3
|
+
/**
|
|
4
|
+
* UI 组件适配器接口
|
|
5
|
+
*/
|
|
6
|
+
export interface HeaderUIComponents {
|
|
7
|
+
Input: InputComponent;
|
|
8
|
+
Button: ButtonComponent;
|
|
9
|
+
}
|
|
10
|
+
export interface TableHeaderProps {
|
|
11
|
+
title: ReactNode;
|
|
12
|
+
searchPlaceholder?: string;
|
|
13
|
+
searchValue?: string;
|
|
14
|
+
onSearchChange?: (value: string) => void;
|
|
15
|
+
onSearch?: () => void;
|
|
16
|
+
showSearch?: boolean;
|
|
17
|
+
action?: ReactNode;
|
|
18
|
+
actionLabel?: string;
|
|
19
|
+
onActionClick?: () => void;
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
components?: HeaderUIComponents;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 表格头部组件
|
|
25
|
+
* 支持搜索框和操作按钮
|
|
26
|
+
*/
|
|
27
|
+
export declare function TableHeader({ title, searchPlaceholder, searchValue, onSearchChange, onSearch, showSearch, action, actionLabel, onActionClick, loading, components, }: TableHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
//# sourceMappingURL=TableHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../src/components/TableHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,cAAc,CAAC;IACtB,MAAM,EAAE,eAAe,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAGlB,UAAU,CAAC,EAAE,kBAAkB,CAAC;CACjC;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,iBAA2B,EAC3B,WAAgB,EAChB,cAAc,EACd,QAAQ,EACR,UAAiB,EACjB,MAAM,EACN,WAAW,EACX,aAAa,EACb,OAAe,EACf,UAAU,GACX,EAAE,gBAAgB,2CAoFlB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ButtonComponent, SelectComponent, SelectTriggerComponent, SelectContentComponent, SelectItemComponent, SelectValueComponent } from '../types/component-types';
|
|
2
|
+
/**
|
|
3
|
+
* UI 组件适配器接口
|
|
4
|
+
*/
|
|
5
|
+
export interface PaginationUIComponents {
|
|
6
|
+
Button: ButtonComponent;
|
|
7
|
+
Select: SelectComponent;
|
|
8
|
+
SelectTrigger: SelectTriggerComponent;
|
|
9
|
+
SelectContent: SelectContentComponent;
|
|
10
|
+
SelectItem: SelectItemComponent;
|
|
11
|
+
SelectValue: SelectValueComponent;
|
|
12
|
+
}
|
|
13
|
+
export interface TablePaginationProps {
|
|
14
|
+
currentPage: number;
|
|
15
|
+
pageSize: number;
|
|
16
|
+
total: number;
|
|
17
|
+
onPageChange: (page: number) => void;
|
|
18
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
19
|
+
pageSizeOptions?: number[];
|
|
20
|
+
showPageSizeSelector?: boolean;
|
|
21
|
+
showTotal?: boolean;
|
|
22
|
+
searchActive?: boolean;
|
|
23
|
+
components?: PaginationUIComponents;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 表格分页组件
|
|
27
|
+
* 支持页码切换和每页条数选择
|
|
28
|
+
*/
|
|
29
|
+
export declare function TablePagination({ currentPage, pageSize, total, onPageChange, onPageSizeChange, pageSizeOptions, showPageSizeSelector, showTotal, searchActive, components, }: TablePaginationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
30
|
+
//# sourceMappingURL=TablePagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TablePagination.d.ts","sourceRoot":"","sources":["../../src/components/TablePagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,eAAe,CAAC;IACxB,MAAM,EAAE,eAAe,CAAC;IACxB,aAAa,EAAE,sBAAsB,CAAC;IACtC,aAAa,EAAE,sBAAsB,CAAC;IACtC,UAAU,EAAE,mBAAmB,CAAC;IAChC,WAAW,EAAE,oBAAoB,CAAC;CACnC;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IAGvB,UAAU,CAAC,EAAE,sBAAsB,CAAC;CACrC;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,eAA8B,EAC9B,oBAA2B,EAC3B,SAAgB,EAChB,YAAoB,EACpB,UAAU,GACX,EAAE,oBAAoB,kDAyHtB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { Button, buttonVariants };
|
|
12
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,cAAc;;;8EA4BnB,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,MAAM,uFAWX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, };
|
|
9
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/ui/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,IAAI,6GAYR,CAAC;AAGH,QAAA,MAAM,UAAU,6GASd,CAAC;AAGH,QAAA,MAAM,SAAS,6GASb,CAAC;AAGH,QAAA,MAAM,eAAe,6GASnB,CAAC;AAGH,QAAA,MAAM,WAAW,6GAKf,CAAC;AAGH,QAAA,MAAM,UAAU,6GASd,CAAC;AAGH,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,eAAe,EACf,WAAW,GACZ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
4
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
6
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DialogHeader: {
|
|
10
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
declare const DialogFooter: {
|
|
14
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
18
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
19
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
20
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,MAAM,uCAAuB,CAAC;AAEpC,QAAA,MAAM,aAAa,8GAA0B,CAAC;AAE9C,QAAA,MAAM,YAAY,6CAAyB,CAAC;AAE5C,QAAA,MAAM,WAAW,4GAAwB,CAAC;AAE1C,QAAA,MAAM,aAAa,8JAYjB,CAAC;AAGH,QAAA,MAAM,aAAa,8JAqBjB,CAAC;AAGH,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAC;AAGF,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAC;AAGF,QAAA,MAAM,WAAW,oKAYf,CAAC;AAGH,QAAA,MAAM,iBAAiB,8KASrB,CAAC;AAGH,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
7
|
+
declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
8
|
+
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
10
|
+
inset?: boolean;
|
|
11
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
15
|
+
inset?: boolean;
|
|
16
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
20
|
+
inset?: boolean;
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const DropdownMenuShortcut: {
|
|
24
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
|
|
28
|
+
//# sourceMappingURL=dropdown-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../src/components/ui/dropdown-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AAEvE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,YAAY,mDAA6B,CAAC;AAEhD,QAAA,MAAM,mBAAmB,0HAAgC,CAAC;AAE1D,QAAA,MAAM,iBAAiB,qHAA8B,CAAC;AAEtD,QAAA,MAAM,kBAAkB,yDAA+B,CAAC;AAExD,QAAA,MAAM,eAAe,sDAA4B,CAAC;AAElD,QAAA,MAAM,sBAAsB,0HAAmC,CAAC;AAEhE,QAAA,MAAM,sBAAsB;YAGhB,OAAO;wCAejB,CAAC;AAIH,QAAA,MAAM,sBAAsB,6KAY1B,CAAC;AAIH,QAAA,MAAM,mBAAmB,0KAgBvB,CAAC;AAGH,QAAA,MAAM,gBAAgB;YAGV,OAAO;wCAYjB,CAAC;AAGH,QAAA,MAAM,wBAAwB,+KAoB5B,CAAC;AAIH,QAAA,MAAM,qBAAqB,4KAmBzB,CAAC;AAGH,QAAA,MAAM,iBAAiB;YAGX,OAAO;wCAYjB,CAAC;AAGH,QAAA,MAAM,qBAAqB,4KASzB,CAAC;AAGH,QAAA,MAAM,oBAAoB;8BAGvB,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAOvC,CAAC;AAGF,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
}
|
|
4
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
5
|
+
export { Input };
|
|
6
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/components/ui/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;CAAG;AAExD,QAAA,MAAM,KAAK,qFAcV,CAAC;AAGF,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import('class-variance-authority/types').ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
+
export { Label };
|
|
6
|
+
//# sourceMappingURL=label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/components/ui/label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,QAAA,MAAM,KAAK,4PAUT,CAAC;AAGH,OAAO,EAAE,KAAK,EAAE,CAAC"}
|