@luoluoyu/fluentui-plus 0.1.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -11
- package/dist/.storybook/decorators.d.ts +14 -0
- package/dist/.storybook/decorators.d.ts.map +1 -0
- package/dist/.storybook/main.d.ts +4 -0
- package/dist/.storybook/main.d.ts.map +1 -0
- package/dist/.storybook/preview.d.ts +4 -0
- package/dist/.storybook/preview.d.ts.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +4921 -748
- package/dist/index.esm.js.map +1 -1
- package/dist/src/components/InputTag/Input.d.ts +5 -0
- package/dist/src/components/InputTag/Input.d.ts.map +1 -0
- package/dist/src/components/InputTag/InputTag.d.ts +6 -0
- package/dist/src/components/InputTag/InputTag.d.ts.map +1 -0
- package/dist/src/components/InputTag/TagList.d.ts +5 -0
- package/dist/src/components/InputTag/TagList.d.ts.map +1 -0
- package/dist/src/components/InputTag/hooks/index.d.ts +5 -0
- package/dist/src/components/InputTag/hooks/index.d.ts.map +1 -0
- package/dist/src/components/InputTag/hooks/useInputHandlers.d.ts +21 -0
- package/dist/src/components/InputTag/hooks/useInputHandlers.d.ts.map +1 -0
- package/dist/src/components/InputTag/hooks/useInputTag.d.ts +16 -0
- package/dist/src/components/InputTag/hooks/useInputTag.d.ts.map +1 -0
- package/dist/src/components/InputTag/index.d.ts +3 -0
- package/dist/src/components/InputTag/index.d.ts.map +1 -0
- package/dist/src/components/InputTag/types.d.ts +49 -0
- package/dist/src/components/InputTag/types.d.ts.map +1 -0
- package/dist/src/components/Nav/Nav.d.ts +6 -0
- package/dist/src/components/Nav/Nav.d.ts.map +1 -0
- package/dist/src/components/Nav/NavItem.d.ts +5 -0
- package/dist/src/components/Nav/NavItem.d.ts.map +1 -0
- package/dist/src/components/Nav/NavSubmenu.d.ts +9 -0
- package/dist/src/components/Nav/NavSubmenu.d.ts.map +1 -0
- package/dist/src/components/Nav/hooks/index.d.ts +2 -0
- package/dist/src/components/Nav/hooks/index.d.ts.map +1 -0
- package/dist/src/components/Nav/hooks/useNavigation.d.ts +25 -0
- package/dist/src/components/Nav/hooks/useNavigation.d.ts.map +1 -0
- package/dist/src/components/Nav/index.d.ts +3 -0
- package/dist/src/components/Nav/index.d.ts.map +1 -0
- package/dist/src/components/Nav/types.d.ts +43 -0
- package/dist/src/components/Nav/types.d.ts.map +1 -0
- package/dist/src/components/Nav/utils.d.ts +43 -0
- package/dist/src/components/Nav/utils.d.ts.map +1 -0
- package/dist/src/components/Tag/CheckableTag.d.ts +6 -0
- package/dist/src/components/Tag/CheckableTag.d.ts.map +1 -0
- package/dist/src/components/Tag/Tag.d.ts +9 -0
- package/dist/src/components/Tag/Tag.d.ts.map +1 -0
- package/dist/src/components/Tag/index.d.ts.map +1 -0
- package/dist/{components/Tag/Tag.d.ts → src/components/Tag/types.d.ts} +4 -6
- package/dist/src/components/Tag/types.d.ts.map +1 -0
- package/dist/src/components/index.d.ts +7 -0
- package/dist/src/components/index.d.ts.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/style.css +1 -1
- package/package.json +14 -2
- package/dist/components/Tag/CheckableTag.d.ts +0 -9
- package/dist/components/Tag/CheckableTag.d.ts.map +0 -1
- package/dist/components/Tag/Tag.d.ts.map +0 -1
- package/dist/components/Tag/index.d.ts.map +0 -1
- package/dist/components/index.d.ts +0 -3
- package/dist/components/index.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- /package/dist/{components → src/components}/Tag/index.d.ts +0 -0
- /package/dist/{types → src/types}/less.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# FluentUI Plus
|
|
2
2
|
|
|
3
|
-
[](https://badge.fury.io/js/@luoluoyu%2Ffluentui-plus)
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
|
|
6
6
|
基于 Fluent UI 的企业级组件库,专为中后台项目设计
|
|
@@ -18,27 +18,36 @@
|
|
|
18
18
|
## 📦 安装
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
npm install fluentui-plus @fluentui/react-components
|
|
21
|
+
npm install @luoluoyu/fluentui-plus @fluentui/react-components
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
或者使用 yarn:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
yarn add fluentui-plus @fluentui/react-components
|
|
27
|
+
yarn add @luoluoyu/fluentui-plus @fluentui/react-components
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
## 🔨 使用
|
|
31
31
|
|
|
32
32
|
```jsx
|
|
33
33
|
import React from 'react';
|
|
34
|
-
import {
|
|
34
|
+
import { Tag, InputTag, Nav } from '@luoluoyu/fluentui-plus';
|
|
35
35
|
// 样式会自动导入,无需手动引入
|
|
36
36
|
|
|
37
37
|
function App() {
|
|
38
|
+
const navItems = [
|
|
39
|
+
{ key: 'home', label: '首页', icon: '🏠', title: '首页' },
|
|
40
|
+
{ key: 'components', label: '组件', icon: '📦', title: '组件' },
|
|
41
|
+
];
|
|
42
|
+
|
|
38
43
|
return (
|
|
39
44
|
<div>
|
|
40
|
-
<
|
|
41
|
-
<Tag
|
|
45
|
+
<Tag color='#1890ff'>蓝色标签</Tag>
|
|
46
|
+
<Tag.CheckableTag checked={true} onChange={checked => console.log(checked)}>
|
|
47
|
+
可选择标签
|
|
48
|
+
</Tag.CheckableTag>
|
|
49
|
+
<InputTag defaultValue={['React', 'TypeScript']} placeholder='输入标签...' maxTags={10} allowDuplicates={false} />
|
|
50
|
+
<Nav items={navItems} defaultSelectedKeys={['home']} onSelect={info => console.log('选择了:', info.key)} />
|
|
42
51
|
</div>
|
|
43
52
|
);
|
|
44
53
|
}
|
|
@@ -50,7 +59,7 @@ function App() {
|
|
|
50
59
|
|
|
51
60
|
```less
|
|
52
61
|
// your-theme.less
|
|
53
|
-
@import '
|
|
62
|
+
@import '~@luoluoyu/fluentui-plus/dist/styles/variables.less';
|
|
54
63
|
|
|
55
64
|
// 覆盖品牌色
|
|
56
65
|
@brand-primary: #your-brand-color;
|
|
@@ -62,20 +71,21 @@ function App() {
|
|
|
62
71
|
你可以直接从主包按需引入组件(推荐方式,支持 tree-shaking):
|
|
63
72
|
|
|
64
73
|
```jsx
|
|
65
|
-
import {
|
|
74
|
+
import { Tag, InputTag, Nav } from '@luoluoyu/fluentui-plus';
|
|
66
75
|
```
|
|
67
76
|
|
|
68
77
|
如果需要兼容某些工具链或自定义打包方式,也可以使用子路径导入:
|
|
69
78
|
|
|
70
79
|
```jsx
|
|
71
|
-
import
|
|
72
|
-
import
|
|
80
|
+
import Tag from '@luoluoyu/fluentui-plus/lib/Tag';
|
|
81
|
+
import InputTag from '@luoluoyu/fluentui-plus/lib/InputTag';
|
|
73
82
|
```
|
|
74
83
|
|
|
75
84
|
## 👥 开发指南
|
|
76
85
|
|
|
77
86
|
如果你是团队成员或想要为项目贡献代码,请参考以下文档:
|
|
78
87
|
|
|
88
|
+
- **[API 参考文档](./docs/API_REFERENCE.md)** - 详细的组件 API 文档和使用示例
|
|
79
89
|
- **[开发规范与工作流指南](./docs/DEVELOPMENT_GUIDE.md)** - 详细的开发规范、提交规范和工作流说明
|
|
80
90
|
- **[快速参考](./docs/QUICK_REFERENCE.md)** - 常用命令和规范的快速参考卡片
|
|
81
91
|
- **[贡献指南](./docs/CONTRIBUTING.md)** - 如何参与项目贡献
|
|
@@ -109,7 +119,7 @@ git commit -m "fix(Button): resolve click event issue"
|
|
|
109
119
|
|
|
110
120
|
- [📖 文档地址](https://your-docs-site.com)
|
|
111
121
|
- [🐛 问题反馈](https://github.com/HuiruDong/fluentui-plus/issues)
|
|
112
|
-
- [📦 NPM 包](https://www.npmjs.com/package/fluentui-plus)
|
|
122
|
+
- [📦 NPM 包](https://www.npmjs.com/package/@luoluoyu/fluentui-plus)
|
|
113
123
|
|
|
114
124
|
## 🤝 参与贡献
|
|
115
125
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Decorator } from '@storybook/react';
|
|
2
|
+
/**
|
|
3
|
+
* FluentProvider 装饰器,为所有 Stories 提供统一的 Fluent UI 主题
|
|
4
|
+
* 支持浅色主题 (webLightTheme) 和深色主题 (webDarkTheme)
|
|
5
|
+
*
|
|
6
|
+
* 注意:MDX 文档文件会被跳过,不会应用 FluentProvider
|
|
7
|
+
*/
|
|
8
|
+
export declare const withFluentProvider: Decorator;
|
|
9
|
+
/**
|
|
10
|
+
* 简化的 FluentProvider 装饰器(无额外样式)
|
|
11
|
+
* 默认使用浅色主题
|
|
12
|
+
*/
|
|
13
|
+
export declare const withFluentProviderSimple: Decorator;
|
|
14
|
+
//# sourceMappingURL=decorators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../.storybook/decorators.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAoBhC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAItC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../.storybook/main.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,QAAA,MAAM,MAAM,EAAE,eAab,CAAC;AACF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../.storybook/preview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAGpD,QAAA,MAAM,OAAO,EAAE,OA2Bd,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
|
|
1
|
+
export * from './src/index'
|
|
2
|
+
export {}
|