fotwn-ui 0.0.0-stage → 0.1.1
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 +221 -2
- package/dist/components/anchor/Anchor.vue.d.ts +17 -0
- package/dist/components/anchor/anchor.d.ts +24 -0
- package/dist/components/anchor/index.d.ts +3 -0
- package/dist/components/avatar/Avatar.vue.d.ts +32 -0
- package/dist/components/avatar/avatar.d.ts +20 -0
- package/dist/components/avatar/index.d.ts +3 -0
- package/dist/components/back-top/BackTop.vue.d.ts +27 -0
- package/dist/components/back-top/back-top.d.ts +14 -0
- package/dist/components/back-top/index.d.ts +3 -0
- package/dist/components/breadcrumb/Breadcrumb.vue.d.ts +22 -0
- package/dist/components/breadcrumb/BreadcrumbItem.vue.d.ts +18 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +25 -0
- package/dist/components/breadcrumb/index.d.ts +4 -0
- package/dist/components/button/Button.vue.d.ts +33 -0
- package/dist/components/button/ButtonGroup.vue.d.ts +20 -0
- package/dist/components/button/button-group.d.ts +13 -0
- package/dist/components/button/button.d.ts +19 -0
- package/dist/components/button/index.d.ts +5 -0
- package/dist/components/card/Card.vue.d.ts +43 -0
- package/dist/components/card/card.d.ts +15 -0
- package/dist/components/card/index.d.ts +3 -0
- package/dist/components/checkbox/Checkbox.vue.d.ts +35 -0
- package/dist/components/checkbox/CheckboxGroup.vue.d.ts +31 -0
- package/dist/components/checkbox/checkbox.d.ts +44 -0
- package/dist/components/checkbox/context.d.ts +15 -0
- package/dist/components/checkbox/index.d.ts +4 -0
- package/dist/components/collapse/Collapse.vue.d.ts +25 -0
- package/dist/components/collapse/CollapseItem.vue.d.ts +21 -0
- package/dist/components/collapse/collapse.d.ts +25 -0
- package/dist/components/collapse/context.d.ts +8 -0
- package/dist/components/collapse/index.d.ts +4 -0
- package/dist/components/date-picker/DatePicker.vue.d.ts +48 -0
- package/dist/components/date-picker/date-picker.d.ts +50 -0
- package/dist/components/date-picker/index.d.ts +3 -0
- package/dist/components/descriptions/DescriptionItem.vue.d.ts +20 -0
- package/dist/components/descriptions/Descriptions.vue.d.ts +29 -0
- package/dist/components/descriptions/descriptions.d.ts +26 -0
- package/dist/components/descriptions/index.d.ts +4 -0
- package/dist/components/divider/Divider.vue.d.ts +18 -0
- package/dist/components/divider/divider.d.ts +7 -0
- package/dist/components/divider/index.d.ts +3 -0
- package/dist/components/dropdown/Dropdown.vue.d.ts +40 -0
- package/dist/components/dropdown/DropdownMenu.vue.d.ts +18 -0
- package/dist/components/dropdown/dropdown.d.ts +34 -0
- package/dist/components/dropdown/index.d.ts +3 -0
- package/dist/components/ellipsis/Ellipsis.vue.d.ts +26 -0
- package/dist/components/ellipsis/ellipsis.d.ts +13 -0
- package/dist/components/ellipsis/index.d.ts +3 -0
- package/dist/components/feedback/Alert.vue.d.ts +32 -0
- package/dist/components/feedback/Dialog.vue.d.ts +50 -0
- package/dist/components/feedback/FeedbackIcon.vue.d.ts +9 -0
- package/dist/components/feedback/Message.vue.d.ts +30 -0
- package/dist/components/feedback/Modal.vue.d.ts +49 -0
- package/dist/components/feedback/Notification.vue.d.ts +35 -0
- package/dist/components/feedback/Tooltip.vue.d.ts +34 -0
- package/dist/components/feedback/feedback.d.ts +93 -0
- package/dist/components/feedback/index.d.ts +8 -0
- package/dist/components/form/Form.vue.d.ts +31 -0
- package/dist/components/form/FormItem.vue.d.ts +26 -0
- package/dist/components/form/context.d.ts +28 -0
- package/dist/components/form/form.d.ts +66 -0
- package/dist/components/form/index.d.ts +4 -0
- package/dist/components/gradient-text/GradientText.vue.d.ts +20 -0
- package/dist/components/gradient-text/gradient-text.d.ts +7 -0
- package/dist/components/gradient-text/index.d.ts +3 -0
- package/dist/components/icon/Icon.vue.d.ts +18 -0
- package/dist/components/icon/icon.d.ts +12 -0
- package/dist/components/icon/index.d.ts +3 -0
- package/dist/components/input/Input.vue.d.ts +46 -0
- package/dist/components/input/InputGroup.vue.d.ts +19 -0
- package/dist/components/input/index.d.ts +5 -0
- package/dist/components/input/input-group.d.ts +8 -0
- package/dist/components/input/input.d.ts +30 -0
- package/dist/components/list/List.vue.d.ts +25 -0
- package/dist/components/list/ListItem.vue.d.ts +28 -0
- package/dist/components/list/index.d.ts +4 -0
- package/dist/components/list/list.d.ts +14 -0
- package/dist/components/login/Login.vue.d.ts +74 -0
- package/dist/components/login/index.d.ts +4 -0
- package/dist/components/login/login.d.ts +119 -0
- package/dist/components/menu/Menu.vue.d.ts +25 -0
- package/dist/components/menu/MenuCollapseTransition.vue.d.ts +13 -0
- package/dist/components/menu/MenuNode.vue.d.ts +18 -0
- package/dist/components/menu/index.d.ts +3 -0
- package/dist/components/menu/menu.d.ts +34 -0
- package/dist/components/navbar/Navbar.vue.d.ts +32 -0
- package/dist/components/navbar/index.d.ts +3 -0
- package/dist/components/navbar/navbar.d.ts +9 -0
- package/dist/components/page-header/PageHeader.vue.d.ts +39 -0
- package/dist/components/page-header/index.d.ts +3 -0
- package/dist/components/page-header/page-header.d.ts +13 -0
- package/dist/components/pagination/Pagination.vue.d.ts +41 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/components/pagination/pagination.d.ts +22 -0
- package/dist/components/popconfirm/Popconfirm.vue.d.ts +50 -0
- package/dist/components/popconfirm/index.d.ts +3 -0
- package/dist/components/popconfirm/popconfirm.d.ts +19 -0
- package/dist/components/popover/Popover.vue.d.ts +38 -0
- package/dist/components/popover/index.d.ts +3 -0
- package/dist/components/popover/popover.d.ts +20 -0
- package/dist/components/progress/Progress.vue.d.ts +31 -0
- package/dist/components/progress/index.d.ts +3 -0
- package/dist/components/progress/progress.d.ts +13 -0
- package/dist/components/radio/Radio.vue.d.ts +33 -0
- package/dist/components/radio/RadioGroup.vue.d.ts +29 -0
- package/dist/components/radio/context.d.ts +13 -0
- package/dist/components/radio/index.d.ts +4 -0
- package/dist/components/radio/radio.d.ts +41 -0
- package/dist/components/result/Result.vue.d.ts +27 -0
- package/dist/components/result/ResultIllustration.vue.d.ts +7 -0
- package/dist/components/result/index.d.ts +3 -0
- package/dist/components/result/result.d.ts +7 -0
- package/dist/components/select/Select.vue.d.ts +47 -0
- package/dist/components/select/SelectGroup.vue.d.ts +19 -0
- package/dist/components/select/index.d.ts +5 -0
- package/dist/components/select/select-group.d.ts +8 -0
- package/dist/components/select/select.d.ts +28 -0
- package/dist/components/steps/Steps.vue.d.ts +18 -0
- package/dist/components/steps/index.d.ts +3 -0
- package/dist/components/steps/steps.d.ts +24 -0
- package/dist/components/switch/Switch.vue.d.ts +39 -0
- package/dist/components/switch/index.d.ts +3 -0
- package/dist/components/switch/switch.d.ts +22 -0
- package/dist/components/table/Table.vue.d.ts +91 -0
- package/dist/components/table/index.d.ts +3 -0
- package/dist/components/table/table.d.ts +89 -0
- package/dist/components/tabs/Tabs.vue.d.ts +35 -0
- package/dist/components/tabs/index.d.ts +3 -0
- package/dist/components/tabs/tabs.d.ts +25 -0
- package/dist/components/tag/Tag.vue.d.ts +35 -0
- package/dist/components/tag/index.d.ts +3 -0
- package/dist/components/tag/tag.d.ts +12 -0
- package/dist/components/typography/Typography.vue.d.ts +23 -0
- package/dist/components/typography/index.d.ts +3 -0
- package/dist/components/typography/typography.d.ts +12 -0
- package/dist/components/upload/FileTypeIcon.vue.d.ts +8 -0
- package/dist/components/upload/Upload.vue.d.ts +59 -0
- package/dist/components/upload/file-type.d.ts +11 -0
- package/dist/components/upload/index.d.ts +6 -0
- package/dist/components/upload/upload.d.ts +51 -0
- package/dist/fotwn-ui.css +2 -0
- package/dist/fotwn-ui.js +6673 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/index.d.ts +84 -0
- package/package.json +71 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Fotwn UI contributors
|
|
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
CHANGED
|
@@ -1,3 +1,222 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Fotwn UI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> A lightweight and themeable Vue 3 component library built with TypeScript for modern web applications.
|
|
4
|
+
|
|
5
|
+
Fotwn UI 是一个面向现代 Web 应用的 Vue 3 组件库。项目采用 TypeScript 开发,组件逻辑与样式自主实现,不依赖现成的完整 UI 组件库,并通过 CSS Variables 提供灵活的主题定制能力。图标资产使用 MIT 许可的 Ant Design Icons。
|
|
6
|
+
|
|
7
|
+
> [!NOTE]
|
|
8
|
+
> 当前公开版本为 `fotwn-ui@0.1.1`。在 `1.0.0` 之前组件 API 仍可能调整,你也可以克隆仓库并运行 Playground 查看最新效果。
|
|
9
|
+
|
|
10
|
+
## 特性
|
|
11
|
+
|
|
12
|
+
- 基于 Vue 3 Composition API 和 TypeScript
|
|
13
|
+
- 支持全局注册与按需引入
|
|
14
|
+
- 使用 CSS Variables 定制颜色、圆角和组件尺寸
|
|
15
|
+
- 提供 ESM 构建产物与 TypeScript 类型声明
|
|
16
|
+
- 关注键盘操作和无障碍语义
|
|
17
|
+
- 使用 Vitest 和 Vue Test Utils 进行单元测试
|
|
18
|
+
- 组件从底层实现,适合学习组件设计与工程化
|
|
19
|
+
|
|
20
|
+
## 当前组件
|
|
21
|
+
|
|
22
|
+
| 组件 | 状态 | 说明 |
|
|
23
|
+
| --- | --- | --- |
|
|
24
|
+
| [`FtAvatar`](./docs/components/avatar.md) | ✅ 可用 | 四档尺寸、图片回退、圆形方形与状态徽标 |
|
|
25
|
+
| [`FtButton`](./docs/components/button.md) | ✅ 可用 | 类型、外观、尺寸、加载、禁用、图标和形状 |
|
|
26
|
+
| [`FtButtonGroup`](./docs/components/button.md#自动配色按钮组) | ✅ 可用 | 按钮布局、自动序列配色、宽度、间距和换行 |
|
|
27
|
+
| [`FtCard`](./docs/components/card.md) | ✅ 可用 | 标题、封面、尺寸、关闭、悬浮、加载和操作区 |
|
|
28
|
+
| [`FtCollapse`](./docs/components/collapse.md) | ✅ 可用 | 多项展开、手风琴、左右箭头、嵌套和动画 |
|
|
29
|
+
| [`FtCollapseItem`](./docs/components/collapse.md#collapseitem-props) | ✅ 可用 | 标题、额外内容、禁用和面板正文 |
|
|
30
|
+
| [`FtDivider`](./docs/components/divider.md) | ✅ 可用 | 横向、垂直、标题位置和虚线分割线 |
|
|
31
|
+
| [`FtDropdown`](./docs/components/dropdown.md) | ✅ 可用 | 四档尺寸、点击悬停触发与多级菜单 |
|
|
32
|
+
| [`FtEllipsis`](./docs/components/ellipsis.md) | ✅ 可用 | 单行、多行省略、完整内容提示和点击展开 |
|
|
33
|
+
| [`FtGradientText`](./docs/components/gradient-text.md) | ✅ 可用 | 可配置颜色、方向、中间色和流动动画 |
|
|
34
|
+
| [`FtPageHeader`](./docs/components/page-header.md) | ✅ 可用 | 面包屑、标题信息、操作区和关键统计数据 |
|
|
35
|
+
| [`FtTag`](./docs/components/tag.md) | ✅ 可用 | 六种语义、尺寸、关闭、禁用、胶囊和选择状态 |
|
|
36
|
+
| [`FtTypography`](./docs/components/typography.md) | ✅ 可用 | 五级排印、品牌标记和常用文字语义 |
|
|
37
|
+
| [`FtList`](./docs/components/list.md) | ✅ 可用 | 基础与复杂清单、尺寸、加载、摘要和操作插槽 |
|
|
38
|
+
| [`FtListItem`](./docs/components/list.md) | ✅ 可用 | 标题、描述、头像、额外内容和操作区 |
|
|
39
|
+
| [`FtCheckbox`](./docs/components/checkbox.md) | ✅ 可用 | 独立勾选、全选半选、尺寸、状态与按钮外观 |
|
|
40
|
+
| [`FtCheckboxGroup`](./docs/components/checkbox.md#ftcheckboxgroup) | ✅ 可用 | 数组值管理、配置式选项、数量限制与表单校验联动 |
|
|
41
|
+
| [`FtDatePicker`](./docs/components/date-picker.md) | ✅ 可用 | 日期、日期范围、日期时间、双月面板、快捷选择与表单校验 |
|
|
42
|
+
| [`FtIcon`](./docs/components/icon.md) | ✅ 可用 | 蓝湖六类共 788 个线性、填充与双色图标,以及尺寸、颜色、旋转、动画与无障碍语义 |
|
|
43
|
+
| [`FtForm`](./docs/components/form.md) | ✅ 可用 | 横向、纵向、行内布局,规则校验、提交和重置 |
|
|
44
|
+
| [`FtFormItem`](./docs/components/form.md#ftformitem-props) | ✅ 可用 | 字段标签、必填标记、校验状态及错误反馈 |
|
|
45
|
+
| [`FtInput`](./docs/components/input.md) | ✅ 可用 | 单行、多行、尺寸、状态、清空、密码、前后缀与输入组 |
|
|
46
|
+
| [`FtInputGroup`](./docs/components/input.md#ftinputgroup-标签组合) | ✅ 可用 | 为输入控件提供语义化标签,包含蓝湖新增的“姓名 + 输入框”组合 |
|
|
47
|
+
| [`FtRadio`](./docs/components/radio.md) | ✅ 可用 | 独立单选项、尺寸、状态、禁用与按钮外观 |
|
|
48
|
+
| [`FtRadioGroup`](./docs/components/radio.md#ftradiogroup) | ✅ 可用 | 单选值管理、配置式选项、排列方向与表单校验联动 |
|
|
49
|
+
| [`FtSelect`](./docs/components/select.md) | ✅ 可用 | 单选、多选、尺寸、状态、清空、前缀及键盘操作 |
|
|
50
|
+
| [`FtSelectGroup`](./docs/components/select.md#ftselectgroup-标签组合) | ✅ 可用 | “姓名 + 选择器”等标签组合 |
|
|
51
|
+
| [`FtSwitch`](./docs/components/switch.md) | ✅ 可用 | 布尔或自定义值、尺寸、状态、加载、文字图标与表单校验 |
|
|
52
|
+
| [`FtUpload`](./docs/components/upload.md) | ✅ 可用 | 按钮、拖拽与卡片模式,文件限制、进度、重试、预览及表单校验 |
|
|
53
|
+
| [`FtFileTypeIcon`](./docs/components/upload.md#文件类型与预览) | ✅ 可用 | Word、PDF、PPT、Excel、媒体、压缩包及通用文件类型图标 |
|
|
54
|
+
| [`FtAlert`](./docs/components/alert.md) | ✅ 可用 | 信息、成功、警告和错误警示,支持关闭与自定义内容 |
|
|
55
|
+
| [`FtNotification`](./docs/components/notification.md) | ✅ 可用 | 标题、正文、时间、操作区与自动关闭 |
|
|
56
|
+
| [`FtDialog`](./docs/components/dialog.md) | ✅ 可用 | 警告、成功、信息与错误确认对话框 |
|
|
57
|
+
| [`FtMessage`](./docs/components/message.md) | ✅ 可用 | 普通、彩色、多行、加载中及手动关闭消息 |
|
|
58
|
+
| [`FtModal`](./docs/components/modal.md) | ✅ 可用 | 尺寸、默认操作、按下状态、内嵌预览、Teleport、遮罩与 ESC |
|
|
59
|
+
| [`FtTooltip`](./docs/components/tooltip.md) | ✅ 可用 | 四向弹出、悬停、聚焦、点击与手动触发 |
|
|
60
|
+
| [`FtPopover`](./docs/components/popover.md) | ✅ 可用 | 十二方位、标题正文、点击与手动控制的内容浮层 |
|
|
61
|
+
| [`FtPopconfirm`](./docs/components/popconfirm.md) | ✅ 可用 | 操作附近的二次确认、异步提交与自定义操作区 |
|
|
62
|
+
| [`FtProgress`](./docs/components/progress.md) | ✅ 可用 | 直线、环形、状态、格式化与自定义进度 |
|
|
63
|
+
| [`FtResult`](./docs/components/result.md) | ✅ 可用 | 成功、失败、警告及 403、404、500 结果页 |
|
|
64
|
+
| [`FtMenu`](./docs/components/menu.md) | ✅ 可用 | 垂直、水平、多级、折叠、禁用与链接菜单 |
|
|
65
|
+
| [`FtNavbar`](./docs/components/menu.md#ftnavbar-顶部导航) | ✅ 可用 | 品牌区、水平菜单、操作区、吸顶与自定义高度 |
|
|
66
|
+
| [`FtAnchor`](./docs/components/navigation.md#anchor-侧边导航) | ✅ 可用 | 页面锚点、层级、轨道和选中背景变体 |
|
|
67
|
+
| [`FtBackTop`](./docs/components/navigation.md#backtop-回到顶部) | ✅ 可用 | 窗口或容器滚动监听、阈值与返回顶部 |
|
|
68
|
+
| [`FtBreadcrumb`](./docs/components/navigation.md#breadcrumb-面包屑) | ✅ 可用 | 链接、状态、自定义分隔符和声明式子项 |
|
|
69
|
+
| [`FtSteps`](./docs/components/navigation.md#steps-步骤) | ✅ 可用 | 横向、纵向、尺寸、状态和可点击步骤 |
|
|
70
|
+
| [`FtTabs`](./docs/components/navigation.md#tabs-标签页) | ✅ 可用 | 线型、卡片型、尺寸、禁用与键盘操作 |
|
|
71
|
+
| [`FtDescriptions`](./docs/components/descriptions.md) | ✅ 可用 | 详情字段、边框布局、蓝湖分区标题及表格等复合内容 |
|
|
72
|
+
| [`FtPagination`](./docs/components/pagination.md) | ✅ 可用 | 页码、省略跳页、每页条数、快速跳转、总数和禁用状态 |
|
|
73
|
+
| [`FtTable`](./docs/components/table.md) | ✅ 可用 | 排序筛选、行选择、分组表头、固定列、树形子行、展开详情和分页 |
|
|
74
|
+
|
|
75
|
+
## 本地运行
|
|
76
|
+
|
|
77
|
+
环境要求:Node.js 和 pnpm。
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
git clone https://github.com/admian/fotwn-ui.git
|
|
81
|
+
cd fotwn-ui
|
|
82
|
+
pnpm install
|
|
83
|
+
pnpm dev
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
启动后打开终端显示的本地地址,通常是 <http://localhost:5173>。
|
|
87
|
+
|
|
88
|
+
Playground 是工作区中的独立 Vue 3 应用。每个组件拥有单独路由;图标页面提供全部 788 个图标的可搜索总览,可以按线性、选中和双色形态筛选。
|
|
89
|
+
|
|
90
|
+
## 使用方式
|
|
91
|
+
|
|
92
|
+
### 全局注册
|
|
93
|
+
|
|
94
|
+
Fotwn UI 可以在应用入口一次性注册全部组件:
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
import { createApp } from 'vue'
|
|
98
|
+
import FotwnUI from 'fotwn-ui'
|
|
99
|
+
import 'fotwn-ui/style.css'
|
|
100
|
+
import App from './App.vue'
|
|
101
|
+
|
|
102
|
+
createApp(App).use(FotwnUI).mount('#app')
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### 按需引入
|
|
106
|
+
|
|
107
|
+
```vue
|
|
108
|
+
<script setup lang="ts">
|
|
109
|
+
import { FtButton } from 'fotwn-ui'
|
|
110
|
+
import 'fotwn-ui/style.css'
|
|
111
|
+
</script>
|
|
112
|
+
|
|
113
|
+
<template>
|
|
114
|
+
<FtButton type="primary">保存</FtButton>
|
|
115
|
+
</template>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
每个组件的示例和 API 都维护在独立文档中,请从[组件列表](#当前组件)进入对应使用手册。
|
|
119
|
+
|
|
120
|
+
## 主题定制
|
|
121
|
+
|
|
122
|
+
Fotwn UI 的视觉样式由 `--ft-*` CSS Variables 控制。请在引入组件库样式之后覆盖变量:
|
|
123
|
+
|
|
124
|
+
```css
|
|
125
|
+
:root {
|
|
126
|
+
--ft-color-primary: #5b34c4;
|
|
127
|
+
--ft-color-success: #1fa774;
|
|
128
|
+
--ft-color-danger: #dc3d61;
|
|
129
|
+
--ft-border-radius: 6px;
|
|
130
|
+
--ft-button-height-medium: 34px;
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
当前提供的主要变量:
|
|
135
|
+
|
|
136
|
+
| 变量 | 默认值 | 用途 |
|
|
137
|
+
| --- | --- | --- |
|
|
138
|
+
| `--ft-color-primary` | `#4f2dbd` | 品牌主色 |
|
|
139
|
+
| `--ft-color-success` | `#1fa774` | 成功状态 |
|
|
140
|
+
| `--ft-color-info` | `#3284e6` | 信息状态 |
|
|
141
|
+
| `--ft-color-warning` | `#e99a24` | 警告状态 |
|
|
142
|
+
| `--ft-color-danger` | `#dc3d61` | 危险状态 |
|
|
143
|
+
| `--ft-border-radius` | `4px` | 默认圆角 |
|
|
144
|
+
| `--ft-button-height-small` | `24px` | 小按钮高度 |
|
|
145
|
+
| `--ft-button-height-medium` | `32px` | 中按钮高度 |
|
|
146
|
+
| `--ft-button-height-large` | `40px` | 大按钮高度 |
|
|
147
|
+
| `--ft-input-height-small` | `28px` | 小输入框高度 |
|
|
148
|
+
| `--ft-input-height-medium` | `34px` | 中输入框高度 |
|
|
149
|
+
| `--ft-input-height-large` | `40px` | 大输入框高度 |
|
|
150
|
+
| `--ft-select-height-small` | `28px` | 小选择器高度 |
|
|
151
|
+
| `--ft-select-height-medium` | `34px` | 中选择器高度 |
|
|
152
|
+
| `--ft-select-height-large` | `40px` | 大选择器高度 |
|
|
153
|
+
| `--ft-pagination-height-small` | `24px` | 小分页器控件高度 |
|
|
154
|
+
| `--ft-pagination-height-medium` | `28px` | 中分页器控件高度 |
|
|
155
|
+
| `--ft-pagination-height-large` | `34px` | 大分页器控件高度 |
|
|
156
|
+
| `--ft-table-header-background` | `var(--ft-color-primary)` | 表格表头背景色 |
|
|
157
|
+
| `--ft-table-row-height-medium` | `40px` | 中尺寸表格行高 |
|
|
158
|
+
| `--ft-descriptions-title-background` | `var(--ft-color-primary)` | 描述组件分区标题背景 |
|
|
159
|
+
| `--ft-descriptions-label-background` | `#f3f0fb` | 带边框描述项的标签背景 |
|
|
160
|
+
|
|
161
|
+
## 项目结构
|
|
162
|
+
|
|
163
|
+
```text
|
|
164
|
+
fotwn-ui/
|
|
165
|
+
├── docs/
|
|
166
|
+
│ └── components/ # 每个组件的独立使用手册
|
|
167
|
+
├── playground/ # 独立 Vue 3 文档与演示应用
|
|
168
|
+
│ ├── src/
|
|
169
|
+
│ │ ├── components/ # Playground 公共展示组件
|
|
170
|
+
│ │ ├── layouts/ # 文档站公共布局
|
|
171
|
+
│ │ ├── styles/ # 文档站样式
|
|
172
|
+
│ │ ├── views/ # 各组件独立路由页面
|
|
173
|
+
│ │ ├── router.ts # Vue Router 配置
|
|
174
|
+
│ │ └── main.ts # Playground 应用入口
|
|
175
|
+
│ ├── package.json # Playground 独立依赖与命令
|
|
176
|
+
│ └── vite.config.ts # Playground 构建配置
|
|
177
|
+
├── src/
|
|
178
|
+
│ ├── components/
|
|
179
|
+
│ │ ├── button/ # FtButton 实现与类型
|
|
180
|
+
│ │ ├── descriptions/ # FtDescriptions、FtDescriptionItem 实现与类型
|
|
181
|
+
│ │ ├── form/ # FtForm、FtFormItem 实现与类型
|
|
182
|
+
│ │ ├── icon/ # FtIcon 实现与类型
|
|
183
|
+
│ │ ├── input/ # FtInput、FtInputGroup 实现与类型
|
|
184
|
+
│ │ ├── menu/ # FtMenu 多级菜单实现与类型
|
|
185
|
+
│ │ ├── navbar/ # FtNavbar 顶部导航栏实现与类型
|
|
186
|
+
│ │ ├── pagination/ # FtPagination 分页器实现与类型
|
|
187
|
+
│ │ ├── select/ # FtSelect、FtSelectGroup 实现与类型
|
|
188
|
+
│ │ └── table/ # FtTable 数据表格实现与类型
|
|
189
|
+
│ ├── icons/ # 可按需引入的图标导出
|
|
190
|
+
│ ├── styles/ # 主题变量和公共样式
|
|
191
|
+
│ └── index.ts # 组件库统一入口
|
|
192
|
+
├── tests/ # 单元测试
|
|
193
|
+
├── package.json
|
|
194
|
+
├── pnpm-workspace.yaml # 组件库与 Playground 工作区
|
|
195
|
+
└── vite.config.ts # 构建与测试配置
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## 开发命令
|
|
199
|
+
|
|
200
|
+
| 命令 | 说明 |
|
|
201
|
+
| --- | --- |
|
|
202
|
+
| `pnpm dev` | 启动 Playground |
|
|
203
|
+
| `pnpm typecheck:playground` | 检查 Playground 类型 |
|
|
204
|
+
| `pnpm build:playground` | 构建 Playground 应用 |
|
|
205
|
+
| `pnpm typecheck` | 检查 TypeScript 类型 |
|
|
206
|
+
| `pnpm test` | 运行单元测试 |
|
|
207
|
+
| `pnpm test:watch` | 以监听模式运行测试 |
|
|
208
|
+
| `pnpm build` | 构建组件库和类型声明 |
|
|
209
|
+
|
|
210
|
+
提交代码前建议完整执行:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
pnpm typecheck
|
|
214
|
+
pnpm typecheck:playground
|
|
215
|
+
pnpm test
|
|
216
|
+
pnpm build
|
|
217
|
+
pnpm build:playground
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## 参与贡献
|
|
221
|
+
|
|
222
|
+
欢迎提交 Issue 或 Pull Request。在开始较大的改动前,建议先说明问题和设计方案,避免重复开发。
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AnchorExpose, AnchorItem, AnchorKey, AnchorProps, AnchorSelectInfo } from './anchor';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<AnchorProps, AnchorExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
+
"update:modelValue": (key: AnchorKey) => any;
|
|
4
|
+
select: (info: AnchorSelectInfo) => any;
|
|
5
|
+
}, string, import('vue').PublicProps, Readonly<AnchorProps> & Readonly<{
|
|
6
|
+
"onUpdate:modelValue"?: ((key: AnchorKey) => any) | undefined;
|
|
7
|
+
onSelect?: ((info: AnchorSelectInfo) => any) | undefined;
|
|
8
|
+
}>, {
|
|
9
|
+
modelValue: AnchorKey | null;
|
|
10
|
+
items: AnchorItem[];
|
|
11
|
+
showRail: boolean;
|
|
12
|
+
showBackground: boolean;
|
|
13
|
+
offset: number;
|
|
14
|
+
ariaLabel: string;
|
|
15
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type AnchorKey = string | number;
|
|
2
|
+
export interface AnchorItem {
|
|
3
|
+
key: AnchorKey;
|
|
4
|
+
title: string;
|
|
5
|
+
href?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
children?: AnchorItem[];
|
|
8
|
+
}
|
|
9
|
+
export interface AnchorSelectInfo {
|
|
10
|
+
key: AnchorKey;
|
|
11
|
+
item: AnchorItem;
|
|
12
|
+
}
|
|
13
|
+
export interface AnchorProps {
|
|
14
|
+
modelValue?: AnchorKey | null;
|
|
15
|
+
items?: AnchorItem[];
|
|
16
|
+
showRail?: boolean;
|
|
17
|
+
showBackground?: boolean;
|
|
18
|
+
offset?: number;
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface AnchorExpose {
|
|
22
|
+
readonly element: HTMLElement | undefined;
|
|
23
|
+
scrollTo: (key: AnchorKey) => void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AvatarExpose, AvatarProps } from './avatar';
|
|
2
|
+
declare var __VLS_1: {}, __VLS_8: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_1) => any;
|
|
5
|
+
} & {
|
|
6
|
+
badge?: (props: typeof __VLS_8) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<AvatarProps, AvatarExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
error: (event: Event) => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<AvatarProps> & Readonly<{
|
|
11
|
+
onError?: ((event: Event) => any) | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
size: import('./avatar').AvatarSize;
|
|
14
|
+
color: string;
|
|
15
|
+
src: string;
|
|
16
|
+
alt: string;
|
|
17
|
+
shape: import('./avatar').AvatarShape;
|
|
18
|
+
fit: import('./avatar').AvatarFit;
|
|
19
|
+
fallback: string;
|
|
20
|
+
badgeMax: number;
|
|
21
|
+
badgeDot: boolean;
|
|
22
|
+
badgeColor: string;
|
|
23
|
+
backgroundColor: string;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type AvatarSize = 'small' | 'medium' | 'large' | 'xlarge' | number;
|
|
2
|
+
export type AvatarShape = 'circle' | 'square';
|
|
3
|
+
export type AvatarFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
|
|
4
|
+
export interface AvatarProps {
|
|
5
|
+
src?: string;
|
|
6
|
+
alt?: string;
|
|
7
|
+
size?: AvatarSize;
|
|
8
|
+
shape?: AvatarShape;
|
|
9
|
+
fit?: AvatarFit;
|
|
10
|
+
fallback?: string;
|
|
11
|
+
badge?: string | number;
|
|
12
|
+
badgeMax?: number;
|
|
13
|
+
badgeDot?: boolean;
|
|
14
|
+
badgeColor?: string;
|
|
15
|
+
backgroundColor?: string;
|
|
16
|
+
color?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface AvatarExpose {
|
|
19
|
+
readonly element: HTMLElement | undefined;
|
|
20
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BackTopExpose, BackTopProps } from './back-top';
|
|
2
|
+
declare var __VLS_7: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_7) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import('vue').DefineComponent<BackTopProps, BackTopExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
click: (event: MouseEvent) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<BackTopProps> & Readonly<{
|
|
9
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
10
|
+
}>, {
|
|
11
|
+
ariaLabel: string;
|
|
12
|
+
fixed: boolean;
|
|
13
|
+
visibilityHeight: number;
|
|
14
|
+
right: string | number;
|
|
15
|
+
bottom: string | number;
|
|
16
|
+
duration: number;
|
|
17
|
+
target: string | HTMLElement | Window | null;
|
|
18
|
+
always: boolean;
|
|
19
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface BackTopProps {
|
|
2
|
+
visibilityHeight?: number;
|
|
3
|
+
right?: number | string;
|
|
4
|
+
bottom?: number | string;
|
|
5
|
+
duration?: number;
|
|
6
|
+
target?: string | HTMLElement | Window | null;
|
|
7
|
+
always?: boolean;
|
|
8
|
+
fixed?: boolean;
|
|
9
|
+
ariaLabel?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface BackTopExpose {
|
|
12
|
+
readonly element: HTMLButtonElement | undefined;
|
|
13
|
+
scrollToTop: () => void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BreadcrumbProps, BreadcrumbSelectInfo } from './breadcrumb';
|
|
2
|
+
declare var __VLS_1: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_1) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import('vue').DefineComponent<BreadcrumbProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
select: (info: BreadcrumbSelectInfo, event: MouseEvent) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<BreadcrumbProps> & Readonly<{
|
|
9
|
+
onSelect?: ((info: BreadcrumbSelectInfo, event: MouseEvent) => any) | undefined;
|
|
10
|
+
}>, {
|
|
11
|
+
items: import('./breadcrumb').BreadcrumbItemConfig[];
|
|
12
|
+
ariaLabel: string;
|
|
13
|
+
separator: string;
|
|
14
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BreadcrumbItemProps } from './breadcrumb';
|
|
2
|
+
declare var __VLS_7: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_7) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import('vue').DefineComponent<BreadcrumbItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BreadcrumbItemProps> & Readonly<{}>, {
|
|
7
|
+
label: string;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
status: import('./breadcrumb').BreadcrumbStatus;
|
|
10
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type BreadcrumbStatus = 'default' | 'current' | 'disabled';
|
|
2
|
+
export interface BreadcrumbItemConfig {
|
|
3
|
+
key?: string | number;
|
|
4
|
+
label: string;
|
|
5
|
+
href?: string;
|
|
6
|
+
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
7
|
+
status?: BreadcrumbStatus;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface BreadcrumbProps {
|
|
11
|
+
items?: BreadcrumbItemConfig[];
|
|
12
|
+
separator?: string;
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface BreadcrumbItemProps {
|
|
16
|
+
label?: string;
|
|
17
|
+
href?: string;
|
|
18
|
+
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
19
|
+
status?: BreadcrumbStatus;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface BreadcrumbSelectInfo {
|
|
23
|
+
item: BreadcrumbItemConfig;
|
|
24
|
+
index: number;
|
|
25
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { default as FtBreadcrumb } from './Breadcrumb.vue';
|
|
2
|
+
import { default as FtBreadcrumbItem } from './BreadcrumbItem.vue';
|
|
3
|
+
export { FtBreadcrumb, FtBreadcrumbItem };
|
|
4
|
+
export type { BreadcrumbItemConfig, BreadcrumbItemProps, BreadcrumbProps, BreadcrumbSelectInfo, BreadcrumbStatus, } from './breadcrumb';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ButtonExpose, ButtonProps } from './button';
|
|
2
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
icon?: (props: typeof __VLS_1) => any;
|
|
5
|
+
} & {
|
|
6
|
+
default?: (props: typeof __VLS_3) => any;
|
|
7
|
+
} & {
|
|
8
|
+
suffix?: (props: typeof __VLS_5) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import('vue').DefineComponent<ButtonProps, ButtonExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
click: (event: MouseEvent) => any;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<ButtonProps> & Readonly<{
|
|
13
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
circle: boolean;
|
|
16
|
+
type: import('./button').ButtonType;
|
|
17
|
+
size: import('./button').ButtonSize;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
variant: import('./button').ButtonVariant;
|
|
20
|
+
nativeType: "button" | "reset" | "submit";
|
|
21
|
+
loading: boolean;
|
|
22
|
+
round: boolean;
|
|
23
|
+
block: boolean;
|
|
24
|
+
autofocus: boolean;
|
|
25
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ButtonGroupExpose, ButtonGroupProps } from './button-group';
|
|
2
|
+
declare var __VLS_1: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_1) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import('vue').DefineComponent<ButtonGroupProps, ButtonGroupExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {
|
|
7
|
+
block: boolean;
|
|
8
|
+
palette: import('./button-group').ButtonGroupPalette;
|
|
9
|
+
gap: string | number;
|
|
10
|
+
wrap: boolean;
|
|
11
|
+
align: import('./button-group').ButtonGroupAlign;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type ButtonGroupPalette = 'none' | 'sequence';
|
|
2
|
+
export type ButtonGroupAlign = 'start' | 'center' | 'end';
|
|
3
|
+
export interface ButtonGroupProps {
|
|
4
|
+
palette?: ButtonGroupPalette;
|
|
5
|
+
gap?: number | string;
|
|
6
|
+
buttonWidth?: number | string;
|
|
7
|
+
wrap?: boolean;
|
|
8
|
+
block?: boolean;
|
|
9
|
+
align?: ButtonGroupAlign;
|
|
10
|
+
}
|
|
11
|
+
export interface ButtonGroupExpose {
|
|
12
|
+
readonly element: HTMLElement | undefined;
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type ButtonType = 'default' | 'primary' | 'success' | 'info' | 'warning' | 'danger';
|
|
2
|
+
export type ButtonVariant = 'solid' | 'outline' | 'dashed' | 'text' | 'link';
|
|
3
|
+
export type ButtonSize = 'small' | 'medium' | 'large';
|
|
4
|
+
export interface ButtonProps {
|
|
5
|
+
type?: ButtonType;
|
|
6
|
+
variant?: ButtonVariant;
|
|
7
|
+
size?: ButtonSize;
|
|
8
|
+
nativeType?: 'button' | 'submit' | 'reset';
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
round?: boolean;
|
|
12
|
+
circle?: boolean;
|
|
13
|
+
block?: boolean;
|
|
14
|
+
autofocus?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface ButtonExpose {
|
|
17
|
+
focus: () => void;
|
|
18
|
+
blur: () => void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as FtButton } from './Button.vue';
|
|
2
|
+
import { default as FtButtonGroup } from './ButtonGroup.vue';
|
|
3
|
+
export { FtButton, FtButtonGroup };
|
|
4
|
+
export type { ButtonExpose, ButtonProps, ButtonSize, ButtonType, ButtonVariant, } from './button';
|
|
5
|
+
export type { ButtonGroupAlign, ButtonGroupExpose, ButtonGroupPalette, ButtonGroupProps, } from './button-group';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { CardExpose, CardProps } from './card';
|
|
2
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {}, __VLS_9: {}, __VLS_11: {}, __VLS_18: {}, __VLS_20: {}, __VLS_22: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
cover?: (props: typeof __VLS_1) => any;
|
|
5
|
+
} & {
|
|
6
|
+
header?: (props: typeof __VLS_3) => any;
|
|
7
|
+
} & {
|
|
8
|
+
avatar?: (props: typeof __VLS_5) => any;
|
|
9
|
+
} & {
|
|
10
|
+
title?: (props: typeof __VLS_7) => any;
|
|
11
|
+
} & {
|
|
12
|
+
subtitle?: (props: typeof __VLS_9) => any;
|
|
13
|
+
} & {
|
|
14
|
+
extra?: (props: typeof __VLS_11) => any;
|
|
15
|
+
} & {
|
|
16
|
+
default?: (props: typeof __VLS_18) => any;
|
|
17
|
+
} & {
|
|
18
|
+
footer?: (props: typeof __VLS_20) => any;
|
|
19
|
+
} & {
|
|
20
|
+
actions?: (props: typeof __VLS_22) => any;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_base: import('vue').DefineComponent<CardProps, CardExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
23
|
+
close: (event: MouseEvent) => any;
|
|
24
|
+
}, string, import('vue').PublicProps, Readonly<CardProps> & Readonly<{
|
|
25
|
+
onClose?: ((event: MouseEvent) => any) | undefined;
|
|
26
|
+
}>, {
|
|
27
|
+
title: string;
|
|
28
|
+
size: import('./card').CardSize;
|
|
29
|
+
loading: boolean;
|
|
30
|
+
subtitle: string;
|
|
31
|
+
bordered: boolean;
|
|
32
|
+
hoverable: boolean;
|
|
33
|
+
closable: boolean;
|
|
34
|
+
shadow: import('./card').CardShadow;
|
|
35
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
36
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type CardSize = 'small' | 'medium' | 'large' | 'xlarge';
|
|
2
|
+
export type CardShadow = 'never' | 'hover' | 'always';
|
|
3
|
+
export interface CardProps {
|
|
4
|
+
title?: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
size?: CardSize;
|
|
7
|
+
bordered?: boolean;
|
|
8
|
+
hoverable?: boolean;
|
|
9
|
+
closable?: boolean;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
shadow?: CardShadow;
|
|
12
|
+
}
|
|
13
|
+
export interface CardExpose {
|
|
14
|
+
readonly element: HTMLElement | undefined;
|
|
15
|
+
}
|