aha-components 1.3.4 → 1.4.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 (2) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/package.json +24 -23
package/CHANGELOG.md CHANGED
@@ -46,4 +46,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
46
46
  - Layout components
47
47
  - Animation support
48
48
  - Theme customization
49
- - Accessibility improvements
49
+ - Accessibility improvements
50
+
51
+ ## [1.4.0] - 2024-XX-XX
52
+
53
+ ### Added
54
+ - Tooltip 组件支持默认显示功能(`defaultVisible` 属性)
55
+ - Tooltip 组件支持受控模式(`visible` 和 `onVisibleChange` 属性)
56
+ - Tooltip 组件支持自定义宽度(`width` 属性)
57
+ - Tooltip 组件自动位置调整,避免遮挡触发元素
58
+ - Tooltip 组件移动端自适应宽度
59
+
60
+ ### Changed
61
+ - Tooltip 组件最大宽度:桌面端 320px,移动端自适应
62
+ - Tooltip 组件默认位置改为 `top`
63
+ - Tooltip 组件自动位置调整逻辑优化,支持多方向尝试
64
+
65
+ ### Fixed
66
+ - 修复 Tooltip 组件在隐藏动画时位置移位的问题
67
+ - 修复 Tooltip 组件在移动端宽度超出屏幕的问题
68
+ - 修复 Tooltip 组件位置计算,避免遮挡触发元素
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aha-components",
3
- "version": "1.3.4",
3
+ "version": "1.4.0",
4
4
  "description": "A React component library with tree-shaking support",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -23,6 +23,28 @@
23
23
  "README.md",
24
24
  "CHANGELOG.md"
25
25
  ],
26
+ "scripts": {
27
+ "build": "rollup -c",
28
+ "dev": "NODE_OPTIONS=--max-old-space-size=8192 rollup -c -w",
29
+ "test": "jest",
30
+ "test:watch": "jest --watch",
31
+ "storybook": "NODE_OPTIONS=--max-old-space-size=8192 storybook dev -p 6006",
32
+ "build-storybook": "NODE_OPTIONS=--max-old-space-size=8192 storybook build",
33
+ "lint": "eslint src --ext .ts,.tsx",
34
+ "lint:fix": "eslint src --ext .ts,.tsx --fix",
35
+ "type-check": "tsc --noEmit",
36
+ "dev:example": "vite examples --port 3000",
37
+ "build:example": "vite build examples",
38
+ "generate": "node scripts/generate-component.js",
39
+ "generate:advanced": "node scripts/generate-component-advanced.js",
40
+ "prepublishOnly": "npm run build",
41
+ "release": "npm run build && npm publish",
42
+ "publish:script": "node scripts/publish.js",
43
+ "deploy:docs": "node scripts/deploy-docs.js",
44
+ "deploy:netlify": "node scripts/deploy-netlify.js",
45
+ "docs:build": "npm run build-storybook",
46
+ "docs:deploy": "npm run build-storybook && npx storybook-to-ghpages"
47
+ },
26
48
  "keywords": [
27
49
  "react",
28
50
  "components",
@@ -85,26 +107,5 @@
85
107
  "ts-jest": "^29.4.0",
86
108
  "typescript": "^5.0.0",
87
109
  "vite": "^4.0.0"
88
- },
89
- "scripts": {
90
- "build": "rollup -c",
91
- "dev": "NODE_OPTIONS=--max-old-space-size=8192 rollup -c -w",
92
- "test": "jest",
93
- "test:watch": "jest --watch",
94
- "storybook": "NODE_OPTIONS=--max-old-space-size=8192 storybook dev -p 6006",
95
- "build-storybook": "NODE_OPTIONS=--max-old-space-size=8192 storybook build",
96
- "lint": "eslint src --ext .ts,.tsx",
97
- "lint:fix": "eslint src --ext .ts,.tsx --fix",
98
- "type-check": "tsc --noEmit",
99
- "dev:example": "vite examples --port 3000",
100
- "build:example": "vite build examples",
101
- "generate": "node scripts/generate-component.js",
102
- "generate:advanced": "node scripts/generate-component-advanced.js",
103
- "release": "npm run build && npm publish",
104
- "publish:script": "node scripts/publish.js",
105
- "deploy:docs": "node scripts/deploy-docs.js",
106
- "deploy:netlify": "node scripts/deploy-netlify.js",
107
- "docs:build": "npm run build-storybook",
108
- "docs:deploy": "npm run build-storybook && npx storybook-to-ghpages"
109
110
  }
110
- }
111
+ }