@hero-design/rn 8.115.1 → 8.117.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 (35) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +118 -0
  3. package/es/index.js +216 -7433
  4. package/jest.config.js +1 -1
  5. package/lib/index.js +216 -7433
  6. package/package.json +22 -22
  7. package/sonar-project.properties +2 -2
  8. package/src/components/AppCue/index.tsx +4 -1
  9. package/src/components/Button/Button.tsx +2 -2
  10. package/src/components/Button/UtilityButton/index.tsx +2 -2
  11. package/src/components/Chip/index.tsx +4 -0
  12. package/src/components/FloatingIsland/index.tsx +2 -2
  13. package/src/components/Search/SearchOneLine.tsx +1 -1
  14. package/src/components/Select/BaseOptionList.tsx +2 -2
  15. package/src/components/Select/SingleSelect/OptionList.tsx +1 -1
  16. package/src/components/StatusScreens/Error/index.tsx +3 -2
  17. package/src/components/Tabs/ScrollableTabs.tsx +2 -3
  18. package/src/components/Tabs/index.tsx +117 -55
  19. package/src/components/TextInput/index.tsx +7 -9
  20. package/src/components/Toolbar/ToolbarMessage.tsx +1 -1
  21. package/src/utils/hooks.ts +1 -1
  22. package/testUtils/setup.tsx +0 -6
  23. package/types/components/AppCue/index.d.ts +4 -1
  24. package/types/components/Button/Button.d.ts +2 -2
  25. package/types/components/Button/UtilityButton/index.d.ts +2 -2
  26. package/types/components/Chip/index.d.ts +1 -1
  27. package/types/components/FloatingIsland/index.d.ts +2 -2
  28. package/types/components/Select/BaseOptionList.d.ts +1 -1
  29. package/types/components/Select/SingleSelect/OptionList.d.ts +1 -1
  30. package/types/components/StatusScreens/Error/index.d.ts +1 -1
  31. package/types/components/Swipeable/index.d.ts +1 -1
  32. package/types/components/Tabs/ScrollableTabs.d.ts +2 -3
  33. package/types/components/Tabs/index.d.ts +24 -1
  34. package/types/components/Tabs/useHandlePageScroll.d.ts +1 -1
  35. package/types/components/TextInput/index.d.ts +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @hero-design/rn
2
2
 
3
+ ## 8.117.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#4688](https://github.com/Thinkei/hero-design/pull/4688) [`3d2afde0f5db3e46a63fc12c5ef2984085022531`](https://github.com/Thinkei/hero-design/commit/3d2afde0f5db3e46a63fc12c5ef2984085022531) Thanks [@ttkien](https://github.com/ttkien)! - Upgrade react-native 0.81
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`3d2afde0f5db3e46a63fc12c5ef2984085022531`](https://github.com/Thinkei/hero-design/commit/3d2afde0f5db3e46a63fc12c5ef2984085022531)]:
12
+ - @hero-design/react-native-month-year-picker@8.44.0
13
+
14
+ ## 8.116.0
15
+
16
+ ### Minor Changes
17
+
18
+ - [#4647](https://github.com/Thinkei/hero-design/pull/4647) [`a5254d3e57528ec951ec233be9a1c6f6d9234a7b`](https://github.com/Thinkei/hero-design/commit/a5254d3e57528ec951ec233be9a1c6f6d9234a7b) Thanks [@cuongnguyeneh](https://github.com/cuongnguyeneh)! - feat: Add support for custom tab header
19
+
3
20
  ## 8.115.1
4
21
 
5
22
  ### Patch Changes
package/README.md ADDED
@@ -0,0 +1,118 @@
1
+ # @hero-design/rn
2
+
3
+ ## Overview
4
+
5
+ `@hero-design/rn` is a React Native component library built with TypeScript and Emotion. It provides UI components, theming system, chart components (D3.js), form components, mobile-specific components (FAB, BottomSheet, Swipeable), and platform-specific implementations (iOS/Android) following Hero Design's design system principles.
6
+
7
+ ## Installation
8
+
9
+ ```sh
10
+ yarn add @hero-design/rn
11
+ ```
12
+
13
+ **Peer Dependencies:**
14
+
15
+ ```sh
16
+ yarn add react@18.3.1 react-native@0.77.3
17
+ yarn add @hero-design/react-native-month-year-picker@^8.43.2
18
+ yarn add @ptomasroos/react-native-multi-slider@^2.2.2
19
+ yarn add @react-native-community/datetimepicker@^3.5.2
20
+ yarn add @react-native-community/slider@^4.5.1
21
+ yarn add react-native-gesture-handler@~2.20.2
22
+ yarn add react-native-linear-gradient@^2.8.3
23
+ yarn add react-native-pager-view@^6.7.0
24
+ yarn add react-native-safe-area-context@^4.7.0
25
+ yarn add react-native-svg@^15.11.2
26
+ yarn add react-native-vector-icons@^9.1.0
27
+ yarn add react-native-webview@^13.10.2
28
+ ```
29
+
30
+ **Requirements:**
31
+ - React 18.3.1
32
+ - React Native 0.77.3
33
+ - Node.js >= 20.0.0 (20.19.5 recommended)
34
+ - Yarn >= 4.0.2 (enabled via Corepack: `corepack enable`)
35
+ - iOS Simulator or Android Emulator:
36
+ - **For visual tests compatibility**: iPhone 14 (iOS 18+) or Android Pixel 6 (API 30) are recommended
37
+ - **For non-visual fixes or demo purposes**: Any device frame with compatible OS version is sufficient
38
+
39
+ ## Usage
40
+
41
+ ### Basic Setup
42
+
43
+ Wrap your application with `HeroDesignProvider` to enable theming, localization, and component features (Toast, Portal):
44
+
45
+ ```tsx
46
+ import React from 'react';
47
+ import { HeroDesignProvider, getTheme, Button, Card, Typography } from '@hero-design/rn';
48
+
49
+ function App() {
50
+ const theme = getTheme();
51
+
52
+ return (
53
+ <HeroDesignProvider theme={theme}>
54
+ <Card>
55
+ <Typography.Title>Welcome to Hero Design</Typography.Title>
56
+ <Button text="Get Started" intent="primary" onPress={() => {}} />
57
+ </Card>
58
+ </HeroDesignProvider>
59
+ );
60
+ }
61
+ ```
62
+
63
+ ## Theming
64
+
65
+ Hero Design React Native uses a powerful theming system built on Emotion.
66
+
67
+ ### Using ThemeSwitcher
68
+
69
+ For product-specific themes, use `ThemeSwitcher` which provides a predefined theme. Available theme names: `ehWork`, `ehJobs`, `ehWorkDark`.
70
+
71
+ ```tsx
72
+ import { ThemeSwitcher } from '@hero-design/rn';
73
+
74
+ function App() {
75
+ return (
76
+ <ThemeSwitcher name="ehWork">
77
+ {/* Your app */}
78
+ </ThemeSwitcher>
79
+ );
80
+ }
81
+ ```
82
+
83
+ **Note:** `ThemeSwitcher` only provides theme. For Toast, Portal, and Locale features, use `HeroDesignProvider` with a theme from `getTheme()`.
84
+
85
+ ### Design Tokens
86
+
87
+ The theme includes semantic design tokens organized by category:
88
+
89
+ - **Colors**: Global colors (`defaultGlobalSurface`, `onDefaultGlobalSurface`, etc.) and brand colors (`primary`, `secondary`, etc.)
90
+ - **Typography**: `theme.fontSizes`, `theme.fonts`, `theme.lineHeights`
91
+ - **Spacing**: `theme.space` - Consistent spacing scale (`small`, `medium`, `large`, etc.)
92
+ - **Shadows**: `theme.shadows` - Elevation and depth
93
+ - **Components**: Component-specific theme configurations via `theme.__hd__`
94
+
95
+ For comprehensive design token documentation, visit the [Mobile Design Tokens](https://design.employmenthero.com/mobile/mobile-design-tokens).
96
+
97
+ ## Examples
98
+
99
+ For comprehensive examples and component documentation:
100
+
101
+ - **Documentation Site**: Visit the [Hero Design documentation site](https://design.employmenthero.com/mobile/intro)
102
+ - **Mobile Playground**: Explore the [rn-playground](https://github.com/Thinkei/hero-design/tree/master/apps/rn-playground)
103
+
104
+ ## Contributing
105
+
106
+ Contributions to `@hero-design/rn` are welcome!
107
+
108
+ To get started:
109
+
110
+ 1. Clone the repository: `git clone git@github.com:Thinkei/hero-design.git`
111
+ 2. Enable Corepack: `corepack enable`
112
+ 3. Install dependencies: `yarn install`
113
+ 4. Build the package: `yarn turbo run build --filter=@hero-design/rn`
114
+ 5. Run the playground: `yarn dev:rn`
115
+
116
+ **Note:** An Expo account is required to start the playground. Contact the Hero Design team for access.
117
+
118
+ For detailed contributing guidelines, see the main repository [Contributing documentation](https://design.employmenthero.com/mobile/Contributing/coContribution).