@luoluoyu/fluentui-plus 0.1.7 → 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.
Files changed (64) hide show
  1. package/README.md +18 -8
  2. package/dist/.storybook/decorators.d.ts +14 -0
  3. package/dist/.storybook/decorators.d.ts.map +1 -0
  4. package/dist/.storybook/main.d.ts +4 -0
  5. package/dist/.storybook/main.d.ts.map +1 -0
  6. package/dist/.storybook/preview.d.ts +4 -0
  7. package/dist/.storybook/preview.d.ts.map +1 -0
  8. package/dist/index.d.ts +2 -2
  9. package/dist/index.esm.js +4921 -748
  10. package/dist/index.esm.js.map +1 -1
  11. package/dist/src/components/InputTag/Input.d.ts +5 -0
  12. package/dist/src/components/InputTag/Input.d.ts.map +1 -0
  13. package/dist/src/components/InputTag/InputTag.d.ts +6 -0
  14. package/dist/src/components/InputTag/InputTag.d.ts.map +1 -0
  15. package/dist/src/components/InputTag/TagList.d.ts +5 -0
  16. package/dist/src/components/InputTag/TagList.d.ts.map +1 -0
  17. package/dist/src/components/InputTag/hooks/index.d.ts +5 -0
  18. package/dist/src/components/InputTag/hooks/index.d.ts.map +1 -0
  19. package/dist/src/components/InputTag/hooks/useInputHandlers.d.ts +21 -0
  20. package/dist/src/components/InputTag/hooks/useInputHandlers.d.ts.map +1 -0
  21. package/dist/src/components/InputTag/hooks/useInputTag.d.ts +16 -0
  22. package/dist/src/components/InputTag/hooks/useInputTag.d.ts.map +1 -0
  23. package/dist/src/components/InputTag/index.d.ts +3 -0
  24. package/dist/src/components/InputTag/index.d.ts.map +1 -0
  25. package/dist/src/components/InputTag/types.d.ts +49 -0
  26. package/dist/src/components/InputTag/types.d.ts.map +1 -0
  27. package/dist/src/components/Nav/Nav.d.ts +6 -0
  28. package/dist/src/components/Nav/Nav.d.ts.map +1 -0
  29. package/dist/src/components/Nav/NavItem.d.ts +5 -0
  30. package/dist/src/components/Nav/NavItem.d.ts.map +1 -0
  31. package/dist/src/components/Nav/NavSubmenu.d.ts +9 -0
  32. package/dist/src/components/Nav/NavSubmenu.d.ts.map +1 -0
  33. package/dist/src/components/Nav/hooks/index.d.ts +2 -0
  34. package/dist/src/components/Nav/hooks/index.d.ts.map +1 -0
  35. package/dist/src/components/Nav/hooks/useNavigation.d.ts +25 -0
  36. package/dist/src/components/Nav/hooks/useNavigation.d.ts.map +1 -0
  37. package/dist/src/components/Nav/index.d.ts +3 -0
  38. package/dist/src/components/Nav/index.d.ts.map +1 -0
  39. package/dist/src/components/Nav/types.d.ts +43 -0
  40. package/dist/src/components/Nav/types.d.ts.map +1 -0
  41. package/dist/src/components/Nav/utils.d.ts +43 -0
  42. package/dist/src/components/Nav/utils.d.ts.map +1 -0
  43. package/dist/src/components/Tag/CheckableTag.d.ts +6 -0
  44. package/dist/src/components/Tag/CheckableTag.d.ts.map +1 -0
  45. package/dist/src/components/Tag/Tag.d.ts +9 -0
  46. package/dist/src/components/Tag/Tag.d.ts.map +1 -0
  47. package/dist/src/components/Tag/index.d.ts.map +1 -0
  48. package/dist/{components/Tag/Tag.d.ts → src/components/Tag/types.d.ts} +4 -6
  49. package/dist/src/components/Tag/types.d.ts.map +1 -0
  50. package/dist/src/components/index.d.ts +7 -0
  51. package/dist/src/components/index.d.ts.map +1 -0
  52. package/dist/src/index.d.ts +2 -0
  53. package/dist/src/index.d.ts.map +1 -0
  54. package/dist/style.css +1 -1
  55. package/package.json +14 -2
  56. package/dist/components/Tag/CheckableTag.d.ts +0 -9
  57. package/dist/components/Tag/CheckableTag.d.ts.map +0 -1
  58. package/dist/components/Tag/Tag.d.ts.map +0 -1
  59. package/dist/components/Tag/index.d.ts.map +0 -1
  60. package/dist/components/index.d.ts +0 -3
  61. package/dist/components/index.d.ts.map +0 -1
  62. package/dist/index.d.ts.map +0 -1
  63. /package/dist/{components → src/components}/Tag/index.d.ts +0 -0
  64. /package/dist/{types → src/types}/less.d.ts +0 -0
package/README.md CHANGED
@@ -31,14 +31,23 @@ yarn add @luoluoyu/fluentui-plus @fluentui/react-components
31
31
 
32
32
  ```jsx
33
33
  import React from 'react';
34
- import { Button, Tag } from '@luoluoyu/fluentui-plus';
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
- <Button variant='primary'>主要按钮</Button>
41
- <Tag color='primary'>标签</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 '~fluentui-plus/lib/styles/variables.less';
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 { Button, Input } from 'fluentui-plus';
74
+ import { Tag, InputTag, Nav } from '@luoluoyu/fluentui-plus';
66
75
  ```
67
76
 
68
77
  如果需要兼容某些工具链或自定义打包方式,也可以使用子路径导入:
69
78
 
70
79
  ```jsx
71
- import Button from 'fluentui-plus/lib/Button';
72
- import Input from 'fluentui-plus/lib/Input';
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,4 @@
1
+ import { StorybookConfig } from '@storybook/react-vite';
2
+ declare const config: StorybookConfig;
3
+ export default config;
4
+ //# sourceMappingURL=main.d.ts.map
@@ -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,4 @@
1
+ import { Preview } from '@storybook/react-vite';
2
+ declare const preview: Preview;
3
+ export default preview;
4
+ //# sourceMappingURL=preview.d.ts.map
@@ -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 './components';
2
- //# sourceMappingURL=index.d.ts.map
1
+ export * from './src/index'
2
+ export {}