@hero-design/rn-work-uikit 1.9.0 → 1.9.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.
package/.cursorrules DELETED
@@ -1,57 +0,0 @@
1
- # RN Work UIKit Specific Rules
2
-
3
- ## Package Context
4
- This is the work-specific React Native component library that extends @hero-design/rn with work-focused components like TextInput, specialized themes, and work-specific patterns.
5
-
6
- ## Testing Rules for RN Work UIKit
7
- - Write user-behavior focused tests that describe what users see and experience
8
- - Use descriptive test names like "when user sees an empty input field" instead of "idle state"
9
- - Group related assertions with explanatory comments about user expectations
10
- - Focus on user interactions and outcomes rather than implementation details
11
- - Use `@testing-library/react-native` for all component testing
12
- - Use `renderWithTheme()` from `../../../../testUtils/renderWithTheme` for components that need theme context
13
- - Use semantic matchers like `toBeDisabled()`, `toHaveProp()` when available
14
- - For complex React Native styles, use manual checking when `toHaveStyle()` doesn't work
15
- - Handle React Native's nested style arrays with `StyleSheet.flatten()` or custom helpers
16
- - Aim for 100% line coverage on main component files
17
- - Create dedicated test files for each component (not just integration tests)
18
- - Test edge cases: undefined props, complex styles, error states
19
- - Test imperative APIs: ref methods, focus/blur behavior
20
- - Test accessibility: screen reader support, keyboard navigation
21
-
22
- ## Component Development Rules
23
- - Import `styled` from `@hero-design/rn` for consistency with base theme
24
- - Use `useTheme()` hook instead of prop drilling theme
25
- - Extend base components from `@hero-design/rn` when possible
26
- - Follow work-specific design patterns and accessibility requirements
27
- - Use TypeScript strictly - no `any` types without good reason
28
- - Fix linting errors immediately
29
- - Use proper React Native components (`Text`, `View`) instead of HTML elements
30
-
31
- ## Documentation Rules
32
- - Document Props interfaces with JSDoc comments directly on each property: `/** Description */`
33
- - Use simplified @param comments: `@param props - The component props (see [ComponentName]Props interface for details)`
34
- - Avoid mentioning implementation details like "memoized component" in JSDoc comments
35
- - Focus JSDoc comments on what the component does, not how it's implemented
36
- - Keep type information in the Props interface, not duplicated in @param comments
37
-
38
- ## File Organization
39
- - Separate large test files by component responsibility
40
- - Use consistent naming: `ComponentName.spec.tsx`
41
- - Keep test utilities in `testUtils/` directory at package root
42
- - Use snapshot testing for visual regression prevention
43
- - Create README.md files in test directories explaining testing approach
44
-
45
- ## Work-Specific Patterns
46
- - Components should work with work theme overrides
47
- - Test with work-specific color palettes and spacing
48
- - Ensure compatibility with work app requirements
49
- - Follow work accessibility guidelines
50
- - Test performance with work-typical data sizes
51
-
52
- ## Quality Gates
53
- - All tests must pass with 100% coverage on main components
54
- - No linting errors
55
- - No TypeScript errors
56
- - Components must work with both base and work themes
57
- - Accessibility compliance for work environment
@@ -1,10 +0,0 @@
1
- import { useEffect } from 'react';
2
-
3
- export const useDeprecation = (message: string, cond = true) => {
4
- useEffect(() => {
5
- // eslint-disable-next-line no-console
6
- if (cond) {
7
- console.warn(message);
8
- }
9
- }, [message, cond]);
10
- };