Skip to content

Commit f69ca2a

Browse files
committed
revamp
1 parent a479272 commit f69ca2a

34 files changed

Lines changed: 13881 additions & 9266 deletions

.eslintrc.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"extends": ["eslint:recommended"],
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": "latest",
6+
"sourceType": "module",
7+
"ecmaFeatures": {
8+
"jsx": true
9+
}
10+
},
11+
"plugins": ["@typescript-eslint", "react", "react-hooks"],
12+
"rules": {
13+
"react/react-in-jsx-scope": "off",
14+
"react/prop-types": "off",
15+
"@typescript-eslint/no-unused-vars": [
16+
"error",
17+
{ "argsIgnorePattern": "^_" }
18+
],
19+
"react-hooks/exhaustive-deps": "warn",
20+
"no-unused-vars": "off"
21+
},
22+
"settings": {
23+
"react": {
24+
"version": "detect"
25+
}
26+
},
27+
"env": {
28+
"browser": true,
29+
"es2021": true,
30+
"node": true
31+
}
32+
}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
2-
example
2+
3+
example/node_modules

.prettierrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "es5",
4+
"singleQuote": false,
5+
"printWidth": 80,
6+
"tabWidth": 2,
7+
"useTabs": false,
8+
"bracketSpacing": true,
9+
"arrowParens": "avoid",
10+
"endOfLine": "lf"
11+
}

CHANGELOG.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
## [2.0.0] - 2024-12-29
6+
7+
### ✨ Major Features & Improvements
8+
9+
#### 🚀 Performance Enhancements
10+
11+
- **60fps animations**: Optimized rendering with `requestAnimationFrame` and CSS transforms
12+
- **Memory optimization**: Proper cleanup of event listeners and animation frames
13+
- **React.memo**: Memoized component to prevent unnecessary re-renders
14+
- **useCallback/useMemo**: Optimized hook dependencies for better performance
15+
16+
#### ♿ Accessibility Improvements
17+
18+
- **ARIA support**: Added `aria-label` and `aria-labelledby` props
19+
- **Keyboard navigation**: Press Escape key to close action sheet
20+
- **Focus management**: Automatic focus handling when opening/closing
21+
- **Screen reader support**: Proper semantic HTML with role="dialog"
22+
23+
#### 🎨 Enhanced Styling & UX
24+
25+
- **Better default styles**: Modern design with improved border radius and shadows
26+
- **CSS backdrop-filter**: Beautiful blur effect for background overlay
27+
- **Improved animations**: Smoother transitions with cubic-bezier easing
28+
- **Responsive design**: Better mobile experience
29+
30+
#### 🔧 Developer Experience
31+
32+
- **TypeScript 5.x**: Updated to latest TypeScript with strict mode
33+
- **Modern React**: Support for React 18+ with latest hooks patterns
34+
- **Better type definitions**: Improved TypeScript support with generic types
35+
- **ESLint & Prettier**: Code quality tools configured
36+
- **Modern build system**: Updated Rollup configuration
37+
38+
#### 📦 Build & Dependencies
39+
40+
- **Updated dependencies**: All packages updated to latest versions
41+
- **Modern ES modules**: ESM support with proper tree-shaking
42+
- **Peer dependencies**: Support for React 16.8+ (hooks support)
43+
- **Bundle size**: Optimized bundle with zero runtime dependencies
44+
45+
### 🔄 Breaking Changes
46+
47+
1. **React version requirement**: Now requires React 16.8+ (for hooks support)
48+
2. **TypeScript**: Better type definitions may require type updates
49+
3. **Props changes**:
50+
- Added accessibility props (`aria-label`, `aria-labelledby`)
51+
- Updated default transition timings for better performance
52+
4. **Build output**: ES modules format with better tree-shaking
53+
54+
### 📱 Example Application
55+
56+
- **Comprehensive demo**: Four different action sheet examples
57+
- **Interactive playground**: Test all features and customizations
58+
- **Modern UI**: Beautiful gradient design with responsive layout
59+
- **Feature showcase**: Performance, accessibility, and customization demos
60+
61+
### 🐛 Bug Fixes
62+
63+
- Fixed memory leaks in animation handling
64+
- Improved touch/mouse event handling
65+
- Better edge case handling for dragging gestures
66+
- Fixed focus management issues
67+
68+
### 📚 Documentation
69+
70+
- **Complete rewrite**: Comprehensive API documentation
71+
- **Usage examples**: Multiple real-world examples
72+
- **Migration guide**: Step-by-step migration from v1.x
73+
- **Performance tips**: Best practices for optimal performance
74+
- **Accessibility guide**: How to make your action sheets accessible
75+
76+
## [1.0.14] - Previous Version
77+
78+
### Features
79+
80+
- Basic action sheet functionality
81+
- Touch and mouse drag support
82+
- Background tap to close
83+
- Customizable styling
84+
- TypeScript support
85+
86+
---
87+
88+
For older versions, please check the git history.

0 commit comments

Comments
 (0)