fotwn-ui 0.1.0 → 0.1.2

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.
Files changed (61) hide show
  1. package/README.md +87 -113
  2. package/dist/components/anchor/index.d.ts +1 -1
  3. package/dist/components/avatar/Avatar.vue.d.ts +8 -6
  4. package/dist/components/back-top/BackTop.vue.d.ts +6 -4
  5. package/dist/components/breadcrumb/Breadcrumb.vue.d.ts +5 -3
  6. package/dist/components/breadcrumb/BreadcrumbItem.vue.d.ts +5 -3
  7. package/dist/components/button/Button.vue.d.ts +9 -7
  8. package/dist/components/button/ButtonGroup.vue.d.ts +5 -3
  9. package/dist/components/button/index.d.ts +1 -1
  10. package/dist/components/card/Card.vue.d.ts +21 -19
  11. package/dist/components/checkbox/Checkbox.vue.d.ts +6 -4
  12. package/dist/components/checkbox/CheckboxGroup.vue.d.ts +7 -5
  13. package/dist/components/collapse/Collapse.vue.d.ts +5 -3
  14. package/dist/components/collapse/CollapseItem.vue.d.ts +9 -7
  15. package/dist/components/date-picker/DatePicker.vue.d.ts +7 -5
  16. package/dist/components/descriptions/DescriptionItem.vue.d.ts +7 -5
  17. package/dist/components/descriptions/Descriptions.vue.d.ts +13 -11
  18. package/dist/components/divider/Divider.vue.d.ts +5 -3
  19. package/dist/components/dropdown/Dropdown.vue.d.ts +10 -8
  20. package/dist/components/ellipsis/Ellipsis.vue.d.ts +5 -3
  21. package/dist/components/feedback/Alert.vue.d.ts +9 -7
  22. package/dist/components/feedback/Dialog.vue.d.ts +13 -11
  23. package/dist/components/feedback/Message.vue.d.ts +7 -5
  24. package/dist/components/feedback/Modal.vue.d.ts +9 -7
  25. package/dist/components/feedback/Notification.vue.d.ts +11 -9
  26. package/dist/components/feedback/Tooltip.vue.d.ts +7 -5
  27. package/dist/components/feedback/index.d.ts +1 -1
  28. package/dist/components/form/Form.vue.d.ts +5 -3
  29. package/dist/components/form/FormItem.vue.d.ts +12 -10
  30. package/dist/components/gradient-text/GradientText.vue.d.ts +5 -3
  31. package/dist/components/icon/Icon.vue.d.ts +5 -3
  32. package/dist/components/input/Input.vue.d.ts +12 -10
  33. package/dist/components/input/InputGroup.vue.d.ts +8 -6
  34. package/dist/components/list/List.vue.d.ts +9 -7
  35. package/dist/components/list/ListItem.vue.d.ts +15 -13
  36. package/dist/components/login/Login.vue.d.ts +14 -12
  37. package/dist/components/menu/MenuCollapseTransition.vue.d.ts +5 -3
  38. package/dist/components/navbar/Navbar.vue.d.ts +10 -8
  39. package/dist/components/page-header/PageHeader.vue.d.ts +19 -17
  40. package/dist/components/pagination/Pagination.vue.d.ts +9 -7
  41. package/dist/components/popconfirm/Popconfirm.vue.d.ts +15 -13
  42. package/dist/components/popover/Popover.vue.d.ts +10 -8
  43. package/dist/components/popover/index.d.ts +1 -1
  44. package/dist/components/progress/Progress.vue.d.ts +14 -12
  45. package/dist/components/radio/Radio.vue.d.ts +6 -4
  46. package/dist/components/radio/RadioGroup.vue.d.ts +5 -3
  47. package/dist/components/result/Result.vue.d.ts +13 -11
  48. package/dist/components/select/Select.vue.d.ts +15 -13
  49. package/dist/components/select/SelectGroup.vue.d.ts +8 -6
  50. package/dist/components/switch/Switch.vue.d.ts +8 -6
  51. package/dist/components/switch/index.d.ts +1 -1
  52. package/dist/components/table/Table.vue.d.ts +38 -36
  53. package/dist/components/tabs/Tabs.vue.d.ts +13 -11
  54. package/dist/components/tag/Tag.vue.d.ts +7 -5
  55. package/dist/components/typography/Typography.vue.d.ts +5 -3
  56. package/dist/components/upload/Upload.vue.d.ts +13 -11
  57. package/dist/components/upload/index.d.ts +2 -2
  58. package/dist/fotwn-ui.css +1 -1
  59. package/dist/fotwn-ui.js +262 -262
  60. package/dist/index.d.ts +2 -2
  61. package/package.json +13 -2
package/README.md CHANGED
@@ -4,8 +4,8 @@
4
4
 
5
5
  Fotwn UI 是一个面向现代 Web 应用的 Vue 3 组件库。项目采用 TypeScript 开发,组件逻辑与样式自主实现,不依赖现成的完整 UI 组件库,并通过 CSS Variables 提供灵活的主题定制能力。图标资产使用 MIT 许可的 Ant Design Icons。
6
6
 
7
- > [!IMPORTANT]
8
- > 项目目前处于早期开发阶段,尚未发布到 npm,组件 API 仍可能调整。你可以克隆仓库并运行 Playground 查看当前效果。
7
+ > [!NOTE]
8
+ > 当前公开版本为 `fotwn-ui@0.1.1`。在 `1.0.0` 之前组件 API 仍可能调整,你也可以克隆仓库并运行 Playground 查看最新效果。
9
9
 
10
10
  ## 特性
11
11
 
@@ -19,58 +19,58 @@ Fotwn UI 是一个面向现代 Web 应用的 Vue 3 组件库。项目采用 Type
19
19
 
20
20
  ## 当前组件
21
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) | ✅ 可用 | 排序筛选、行选择、分组表头、固定列、树形子行、展开详情和分页 |
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
74
 
75
75
  ## 本地运行
76
76
 
@@ -91,7 +91,7 @@ Playground 是工作区中的独立 Vue 3 应用。每个组件拥有单独路
91
91
 
92
92
  ### 全局注册
93
93
 
94
- Fotwn UI 发布后,可以在应用入口一次性注册全部组件:
94
+ Fotwn UI 可以在应用入口一次性注册全部组件:
95
95
 
96
96
  ```ts
97
97
  import { createApp } from 'vue'
@@ -133,30 +133,30 @@ Fotwn UI 的视觉样式由 `--ft-*` CSS Variables 控制。请在引入组件
133
133
 
134
134
  当前提供的主要变量:
135
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` | 带边框描述项的标签背景 |
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
160
 
161
161
  ## 项目结构
162
162
 
@@ -197,15 +197,15 @@ fotwn-ui/
197
197
 
198
198
  ## 开发命令
199
199
 
200
- | 命令 | 说明 |
201
- | --- | --- |
202
- | `pnpm dev` | 启动 Playground |
200
+ | 命令 | 说明 |
201
+ | --------------------------- | -------------------- |
202
+ | `pnpm dev` | 启动 Playground |
203
203
  | `pnpm typecheck:playground` | 检查 Playground 类型 |
204
- | `pnpm build:playground` | 构建 Playground 应用 |
205
- | `pnpm typecheck` | 检查 TypeScript 类型 |
206
- | `pnpm test` | 运行单元测试 |
207
- | `pnpm test:watch` | 以监听模式运行测试 |
208
- | `pnpm build` | 构建组件库和类型声明 |
204
+ | `pnpm build:playground` | 构建 Playground 应用 |
205
+ | `pnpm typecheck` | 检查 TypeScript 类型 |
206
+ | `pnpm test` | 运行单元测试 |
207
+ | `pnpm test:watch` | 以监听模式运行测试 |
208
+ | `pnpm build` | 构建组件库和类型声明 |
209
209
 
210
210
  提交代码前建议完整执行:
211
211
 
@@ -217,32 +217,6 @@ pnpm build
217
217
  pnpm build:playground
218
218
  ```
219
219
 
220
- ## Roadmap
221
-
222
- - [x] 初始化 Vue 3 + TypeScript 组件库工程
223
- - [x] 完成 `FtButton`
224
- - [x] 完成两份通用组件设计稿中的 Avatar、Card、Collapse、Divider、Dropdown、Ellipsis、GradientText、PageHeader、Tag、Typography 与 List
225
- - [x] 完成 `FtIcon`
226
- - [x] 接入蓝湖六类共 788 个可按需引入的线性、填充与双色 SVG 图标
227
- - [x] 完成 `FtInput` 与 `FtInputGroup`
228
- - [x] 完成 `FtSelect` 与 `FtSelectGroup`
229
- - [x] 完成 `FtMenu` 与 `FtNavbar`
230
- - [x] 完成导航组件 `FtAnchor`、`FtBackTop`、`FtBreadcrumb`、`FtSteps` 与 `FtTabs`
231
- - [x] 完成 `FtForm` 与 `FtFormItem`
232
- - [x] 完成 `FtRadio` 与 `FtRadioGroup`
233
- - [x] 完成 `FtCheckbox` 与 `FtCheckboxGroup`
234
- - [x] 完成 `FtSwitch`
235
- - [x] 完成 `FtDatePicker`
236
- - [x] 完成 `FtUpload`
237
- - [x] 完成反馈组件 `FtAlert`、`FtNotification`、`FtDialog`、`FtMessage`、`FtModal`、`FtTooltip`、`FtPopover`、`FtPopconfirm`、`FtProgress` 与 `FtResult`
238
- - [x] 完成 `FtDescriptions` 与 `FtDescriptionItem`
239
- - [x] 完成 `FtPagination`
240
- - [x] 完成 `FtTable`,并与 `FtPagination` 组合
241
- - [ ] 完成其余表单基础组件
242
- - [ ] 建设独立文档站点
243
- - [ ] 增加响应式与移动端适配
244
- - [ ] 发布 npm 稳定版本
245
-
246
220
  ## 参与贡献
247
221
 
248
222
  欢迎提交 Issue 或 Pull Request。在开始较大的改动前,建议先说明问题和设计方案,避免重复开发。
@@ -1,3 +1,3 @@
1
1
  import { default as FtAnchor } from './Anchor.vue';
2
2
  export { FtAnchor };
3
- export type { AnchorExpose, AnchorItem, AnchorKey, AnchorProps, AnchorSelectInfo, } from './anchor';
3
+ export type { AnchorExpose, AnchorItem, AnchorKey, AnchorProps, AnchorSelectInfo } from './anchor';
@@ -1,17 +1,19 @@
1
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;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ default?: (props: {}) => any;
5
+ } & {
6
+ badge?: (props: {}) => any;
7
+ };
7
8
  };
9
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
8
10
  declare const __VLS_base: import('vue').DefineComponent<AvatarProps, AvatarExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
11
  error: (event: Event) => any;
10
12
  }, string, import('vue').PublicProps, Readonly<AvatarProps> & Readonly<{
11
13
  onError?: ((event: Event) => any) | undefined;
12
14
  }>, {
13
- size: import('./avatar').AvatarSize;
14
15
  color: string;
16
+ size: import('./avatar').AvatarSize;
15
17
  src: string;
16
18
  alt: string;
17
19
  shape: import('./avatar').AvatarShape;
@@ -1,8 +1,10 @@
1
1
  import { BackTopExpose, BackTopProps } from './back-top';
2
- declare var __VLS_7: {};
3
- type __VLS_Slots = {} & {
4
- default?: (props: typeof __VLS_7) => any;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ default?: (props: {}) => any;
5
+ };
5
6
  };
7
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
6
8
  declare const __VLS_base: import('vue').DefineComponent<BackTopProps, BackTopExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
9
  click: (event: MouseEvent) => any;
8
10
  }, string, import('vue').PublicProps, Readonly<BackTopProps> & Readonly<{
@@ -10,11 +12,11 @@ declare const __VLS_base: import('vue').DefineComponent<BackTopProps, BackTopExp
10
12
  }>, {
11
13
  ariaLabel: string;
12
14
  fixed: boolean;
15
+ target: string | HTMLElement | Window | null;
13
16
  visibilityHeight: number;
14
17
  right: string | number;
15
18
  bottom: string | number;
16
19
  duration: number;
17
- target: string | HTMLElement | Window | null;
18
20
  always: boolean;
19
21
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
22
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,8 +1,10 @@
1
1
  import { BreadcrumbProps, BreadcrumbSelectInfo } from './breadcrumb';
2
- declare var __VLS_1: {};
3
- type __VLS_Slots = {} & {
4
- default?: (props: typeof __VLS_1) => any;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ default?: (props: {}) => any;
5
+ };
5
6
  };
7
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
6
8
  declare const __VLS_base: import('vue').DefineComponent<BreadcrumbProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
9
  select: (info: BreadcrumbSelectInfo, event: MouseEvent) => any;
8
10
  }, string, import('vue').PublicProps, Readonly<BreadcrumbProps> & Readonly<{
@@ -1,8 +1,10 @@
1
1
  import { BreadcrumbItemProps } from './breadcrumb';
2
- declare var __VLS_7: {};
3
- type __VLS_Slots = {} & {
4
- default?: (props: typeof __VLS_7) => any;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ default?: (props: {}) => any;
5
+ };
5
6
  };
7
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
6
8
  declare const __VLS_base: import('vue').DefineComponent<BreadcrumbItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BreadcrumbItemProps> & Readonly<{}>, {
7
9
  label: string;
8
10
  disabled: boolean;
@@ -1,12 +1,14 @@
1
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;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ icon?: (props: {}) => any;
5
+ } & {
6
+ default?: (props: {}) => any;
7
+ } & {
8
+ suffix?: (props: {}) => any;
9
+ };
9
10
  };
11
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
10
12
  declare const __VLS_base: import('vue').DefineComponent<ButtonProps, ButtonExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
13
  click: (event: MouseEvent) => any;
12
14
  }, string, import('vue').PublicProps, Readonly<ButtonProps> & Readonly<{
@@ -1,8 +1,10 @@
1
1
  import { ButtonGroupExpose, ButtonGroupProps } from './button-group';
2
- declare var __VLS_1: {};
3
- type __VLS_Slots = {} & {
4
- default?: (props: typeof __VLS_1) => any;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ default?: (props: {}) => any;
5
+ };
5
6
  };
7
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
6
8
  declare const __VLS_base: import('vue').DefineComponent<ButtonGroupProps, ButtonGroupExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {
7
9
  block: boolean;
8
10
  palette: import('./button-group').ButtonGroupPalette;
@@ -1,5 +1,5 @@
1
1
  import { default as FtButton } from './Button.vue';
2
2
  import { default as FtButtonGroup } from './ButtonGroup.vue';
3
3
  export { FtButton, FtButtonGroup };
4
- export type { ButtonExpose, ButtonProps, ButtonSize, ButtonType, ButtonVariant, } from './button';
4
+ export type { ButtonExpose, ButtonProps, ButtonSize, ButtonType, ButtonVariant } from './button';
5
5
  export type { ButtonGroupAlign, ButtonGroupExpose, ButtonGroupPalette, ButtonGroupProps, } from './button-group';
@@ -1,24 +1,26 @@
1
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;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ cover?: (props: {}) => any;
5
+ } & {
6
+ header?: (props: {}) => any;
7
+ } & {
8
+ avatar?: (props: {}) => any;
9
+ } & {
10
+ title?: (props: {}) => any;
11
+ } & {
12
+ subtitle?: (props: {}) => any;
13
+ } & {
14
+ extra?: (props: {}) => any;
15
+ } & {
16
+ default?: (props: {}) => any;
17
+ } & {
18
+ footer?: (props: {}) => any;
19
+ } & {
20
+ actions?: (props: {}) => any;
21
+ };
21
22
  };
23
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
22
24
  declare const __VLS_base: import('vue').DefineComponent<CardProps, CardExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
23
25
  close: (event: MouseEvent) => any;
24
26
  }, string, import('vue').PublicProps, Readonly<CardProps> & Readonly<{
@@ -1,8 +1,10 @@
1
1
  import { CheckboxExpose, CheckboxProps } from './checkbox';
2
- declare var __VLS_1: {};
3
- type __VLS_Slots = {} & {
4
- default?: (props: typeof __VLS_1) => any;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ default?: (props: {}) => any;
5
+ };
5
6
  };
7
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
6
8
  declare const __VLS_base: import('vue').DefineComponent<CheckboxProps, CheckboxExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
9
  "update:modelValue": (value: boolean) => any;
8
10
  blur: (event: FocusEvent) => any;
@@ -17,12 +19,12 @@ declare const __VLS_base: import('vue').DefineComponent<CheckboxProps, CheckboxE
17
19
  name: string;
18
20
  modelValue: boolean;
19
21
  label: string;
22
+ id: string;
20
23
  size: import('./checkbox').CheckboxSize;
21
24
  disabled: boolean;
22
25
  status: import('./checkbox').CheckboxStatus;
23
26
  variant: import('./checkbox').CheckboxVariant;
24
27
  value: import('./checkbox').CheckboxValue;
25
- id: string;
26
28
  indeterminate: boolean;
27
29
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
28
30
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,8 +1,10 @@
1
1
  import { CheckboxGroupExpose, CheckboxGroupProps, CheckboxSize, CheckboxStatus, CheckboxValue, CheckboxVariant } from './checkbox';
2
- declare var __VLS_1: {};
3
- type __VLS_Slots = {} & {
4
- default?: (props: typeof __VLS_1) => any;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ default?: (props: {}) => any;
5
+ };
5
6
  };
7
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
6
8
  declare const __VLS_base: import('vue').DefineComponent<CheckboxGroupProps, CheckboxGroupExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
9
  "update:modelValue": (value: CheckboxValue[]) => any;
8
10
  change: (value: CheckboxValue[]) => any;
@@ -16,10 +18,10 @@ declare const __VLS_base: import('vue').DefineComponent<CheckboxGroupProps, Chec
16
18
  disabled: boolean;
17
19
  status: CheckboxStatus;
18
20
  variant: CheckboxVariant;
21
+ max: number;
22
+ min: number;
19
23
  options: import('./checkbox').CheckboxOption[];
20
24
  direction: import('./checkbox').CheckboxDirection;
21
- min: number;
22
- max: number;
23
25
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
24
26
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
27
  declare const _default: typeof __VLS_export;
@@ -1,8 +1,10 @@
1
1
  import { CollapseChangeInfo, CollapseExpose, CollapseModelValue, CollapseProps } from './collapse';
2
- declare var __VLS_1: {};
3
- type __VLS_Slots = {} & {
4
- default?: (props: typeof __VLS_1) => any;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ default?: (props: {}) => any;
5
+ };
5
6
  };
7
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
6
8
  declare const __VLS_base: import('vue').DefineComponent<CollapseProps, CollapseExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
9
  "update:modelValue": (value: CollapseModelValue) => any;
8
10
  change: (info: CollapseChangeInfo) => any;
@@ -1,12 +1,14 @@
1
1
  import { CollapseItemProps } from './collapse';
2
- declare var __VLS_6: {}, __VLS_8: {}, __VLS_10: {};
3
- type __VLS_Slots = {} & {
4
- title?: (props: typeof __VLS_6) => any;
5
- } & {
6
- extra?: (props: typeof __VLS_8) => any;
7
- } & {
8
- default?: (props: typeof __VLS_10) => any;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ title?: (props: {}) => any;
5
+ } & {
6
+ extra?: (props: {}) => any;
7
+ } & {
8
+ default?: (props: {}) => any;
9
+ };
9
10
  };
11
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
10
12
  declare const __VLS_base: import('vue').DefineComponent<CollapseItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CollapseItemProps> & Readonly<{}>, {
11
13
  title: string;
12
14
  disabled: boolean;
@@ -1,8 +1,10 @@
1
1
  import { DatePickerExpose, DatePickerProps, DatePickerValue } from './date-picker';
2
- declare var __VLS_33: {};
3
- type __VLS_Slots = {} & {
4
- footer?: (props: typeof __VLS_33) => any;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ footer?: (props: {}) => any;
5
+ };
5
6
  };
7
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
6
8
  declare const __VLS_base: import('vue').DefineComponent<DatePickerProps, DatePickerExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
9
  "update:modelValue": (value: DatePickerValue) => any;
8
10
  clear: () => any;
@@ -23,12 +25,12 @@ declare const __VLS_base: import('vue').DefineComponent<DatePickerProps, DatePic
23
25
  name: string;
24
26
  modelValue: DatePickerValue;
25
27
  type: import('./date-picker').DatePickerType;
28
+ id: string;
29
+ placeholder: string;
26
30
  size: import('./date-picker').DatePickerSize;
27
31
  disabled: boolean;
28
32
  status: import('./date-picker').DatePickerStatus;
29
- id: string;
30
33
  format: string;
31
- placeholder: string;
32
34
  startPlaceholder: string;
33
35
  endPlaceholder: string;
34
36
  rangeSeparator: string;
@@ -1,10 +1,12 @@
1
1
  import { DescriptionItemProps } from './descriptions';
2
- declare var __VLS_1: {}, __VLS_3: {};
3
- type __VLS_Slots = {} & {
4
- label?: (props: typeof __VLS_1) => any;
5
- } & {
6
- default?: (props: typeof __VLS_3) => any;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ label?: (props: {}) => any;
5
+ } & {
6
+ default?: (props: {}) => any;
7
+ };
7
8
  };
9
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
8
10
  declare const __VLS_base: import('vue').DefineComponent<DescriptionItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DescriptionItemProps> & Readonly<{}>, {
9
11
  span: number;
10
12
  labelAlign: import('./descriptions').DescriptionAlign;
@@ -1,16 +1,18 @@
1
1
  import { DescriptionsExpose, DescriptionsProps } from './descriptions';
2
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {}, __VLS_9: {};
3
- type __VLS_Slots = {} & {
4
- title?: (props: typeof __VLS_1) => any;
5
- } & {
6
- extra?: (props: typeof __VLS_3) => any;
7
- } & {
8
- default?: (props: typeof __VLS_5) => any;
9
- } & {
10
- content?: (props: typeof __VLS_7) => any;
11
- } & {
12
- footer?: (props: typeof __VLS_9) => any;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ title?: (props: {}) => any;
5
+ } & {
6
+ extra?: (props: {}) => any;
7
+ } & {
8
+ default?: (props: {}) => any;
9
+ } & {
10
+ content?: (props: {}) => any;
11
+ } & {
12
+ footer?: (props: {}) => any;
13
+ };
13
14
  };
15
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
14
16
  declare const __VLS_base: import('vue').DefineComponent<DescriptionsProps, DescriptionsExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DescriptionsProps> & Readonly<{}>, {
15
17
  size: import('./descriptions').DescriptionsSize;
16
18
  bordered: boolean;