@jescon-technologies/react-native-ui-kit 0.0.12 → 0.0.14
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/index.d.ts +8 -1
- package/index.js +8 -1
- package/package.json +1 -1
- package/src/Hoc/HView.tsx +33 -0
- package/src/Layout/LoginLayout.tsx +711 -0
- package/src/Navigation/PageNavigation.tsx +189 -0
- package/src/Navigation/useFocusEffect.ts +1 -1
- package/src/Navigation/useFocusEffect.web.ts +1 -1
- package/src/Navigation/useIsFocused.ts +1 -1
- package/src/Navigation/useIsFocused.web.ts +1 -1
- package/src/Navigation/useNavigation.ts +1 -1
- package/src/Navigation/useNavigation.web.ts +1 -1
- package/src/Screens/ForgotPassword.tsx +342 -0
- package/src/Screens/Login.tsx +331 -0
- package/src/Screens/Splash.tsx +782 -0
package/index.d.ts
CHANGED
|
@@ -3,9 +3,16 @@ export { default as AAlertIOS } from './src/Alerts/AAlertIOS';
|
|
|
3
3
|
export { default as AAlert } from './src/Alerts/AAlert';
|
|
4
4
|
export { default as ABlink } from './src/Alerts/ABlink';
|
|
5
5
|
export { default as HIcons } from './src/Hoc/HIcons';
|
|
6
|
+
export { default as HView } from './src/Hoc/HView';
|
|
7
|
+
export { default as Navigation } from './src/Navigation/PageNavigation';
|
|
8
|
+
|
|
6
9
|
export { default as NetworkServiceCall } from './src/Common/NetworkServiceCall';
|
|
7
10
|
export * from './src/Navigation/useNavigation';
|
|
8
11
|
export { default as CBackHandler } from './src/CustomComponents/CBackHandler';
|
|
9
12
|
export * from './src/CommonStyle/ComponentFunctions';
|
|
10
13
|
export * from './src/CommonStyle/commonStyle';
|
|
11
|
-
export { default as Loader } from './src/Custom/Loader';
|
|
14
|
+
export { default as Loader } from './src/Custom/Loader';
|
|
15
|
+
export { default as LoginLayout } from './src/Layout/LoginLayout';
|
|
16
|
+
export { default as Splash } from './src/Screens/Splash';
|
|
17
|
+
export { default as Login } from './src/Screens/Login';
|
|
18
|
+
export { default as ForgotPassword } from './src/Screens/ForgotPassword';
|
package/index.js
CHANGED
|
@@ -3,9 +3,16 @@ export { default as AAlertIOS } from './src/Alerts/AAlertIOS';
|
|
|
3
3
|
export { default as AAlert } from './src/Alerts/AAlert';
|
|
4
4
|
export { default as ABlink } from './src/Alerts/ABlink';
|
|
5
5
|
export { default as HIcons } from './src/Hoc/HIcons';
|
|
6
|
+
export { default as HView } from './src/Hoc/HView';
|
|
7
|
+
export { default as Navigation } from './src/Navigation/PageNavigation';
|
|
8
|
+
|
|
6
9
|
export { default as NetworkServiceCall } from './src/Common/NetworkServiceCall';
|
|
7
10
|
export * from './src/Navigation/useNavigation';
|
|
8
11
|
export { default as CBackHandler } from './src/CustomComponents/CBackHandler';
|
|
9
12
|
export * from './src/CommonStyle/ComponentFunctions';
|
|
10
13
|
export * from './src/CommonStyle/commonStyle';
|
|
11
|
-
export { default as Loader } from './src/Custom/Loader';
|
|
14
|
+
export { default as Loader } from './src/Custom/Loader';
|
|
15
|
+
export { default as LoginLayout } from './src/Layout/LoginLayout';
|
|
16
|
+
export { default as Splash } from './src/Screens/Splash';
|
|
17
|
+
export { default as Login } from './src/Screens/Login';
|
|
18
|
+
export { default as ForgotPassword } from './src/Screens/ForgotPassword';
|
package/package.json
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { createContext, useContext } from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface HViewProps {
|
|
5
|
+
component?: string;
|
|
6
|
+
components?: Record<string, React.ComponentType<any>>;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const ComponentsContext = createContext<
|
|
12
|
+
Record<string, React.ComponentType<any>> | undefined
|
|
13
|
+
>(undefined);
|
|
14
|
+
|
|
15
|
+
const HView: React.FC<HViewProps> = ({ component, components, ...props }) => {
|
|
16
|
+
const inheritedComponents = useContext(ComponentsContext);
|
|
17
|
+
|
|
18
|
+
if (!component) {
|
|
19
|
+
return components ? (
|
|
20
|
+
<ComponentsContext.Provider value={components}>
|
|
21
|
+
{props.children}
|
|
22
|
+
</ComponentsContext.Provider>
|
|
23
|
+
) : (
|
|
24
|
+
<>{props.children}</>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const ViewHOCComponent = (components ?? inheritedComponents)?.[component];
|
|
29
|
+
|
|
30
|
+
return ViewHOCComponent ? <ViewHOCComponent {...props} /> : null;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default HView;
|