native-pytech 1.0.42 → 1.0.44

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.
@@ -1,7 +1,7 @@
1
1
  import { MeshGradientView } from 'expo-mesh-gradient';
2
2
  import { memo } from 'react';
3
3
  import { StyleSheet } from 'react-native';
4
- import Utils from '../../../../libs/constants/utils';
4
+ import Utils from '../../../../../libs/constants/utils';
5
5
  export default memo(({ backgroundColorPage }) => {
6
6
  const c06 = Utils.applyOpacity(backgroundColorPage, 0.6);
7
7
  const c08 = Utils.applyOpacity(backgroundColorPage, 0.8);
@@ -2,7 +2,7 @@ import MaskedView from '@react-native-masked-view/masked-view';
2
2
  import { LinearGradient } from 'expo-linear-gradient';
3
3
  import { memo } from 'react';
4
4
  import { StyleSheet, View } from 'react-native';
5
- import Utils from '../../../../libs/constants/utils';
5
+ import Utils from '../../../../../libs/constants/utils';
6
6
  export default memo(({ backgroundColorPage }) => {
7
7
  const c06 = Utils.applyOpacity(backgroundColorPage, 0.6);
8
8
  const c08 = Utils.applyOpacity(backgroundColorPage, 0.8);
@@ -1,5 +1,5 @@
1
- import colors from '../constants';
2
- import { useApp } from "../../../../libs/providers/App";
1
+ import colors from '../../constants';
2
+ import { useApp } from "../../../../../libs/providers/App";
3
3
  import { memo, useMemo } from 'react';
4
4
  import { StyleSheet, Text } from 'react-native';
5
5
  export default memo(({ text, enabled, themeColor = 'default' }) => {
@@ -1,9 +1,9 @@
1
- import colors from '../constants';
1
+ import colors from '../../constants';
2
2
  import { GlassView } from 'expo-glass-effect';
3
- import { useApp } from "../../../../libs/providers/App";
3
+ import { useApp } from "../../../../../libs/providers/App";
4
4
  import { memo, useCallback, useMemo, useState } from 'react';
5
5
  import { ActivityIndicator, Pressable, StyleSheet } from 'react-native';
6
- import Utils from '../../../../libs/constants/utils';
6
+ import Utils from '../../../../../libs/constants/utils';
7
7
  import Text from './Text';
8
8
  export default memo(({ text, onPress, onSubmit, backgroundColorPage, enabled = true, themeColor = 'default' }) => {
9
9
  const { colorScheme } = useApp();
@@ -1,8 +1,8 @@
1
- import colors from '../constants';
2
- import { useApp } from "../../../../libs/providers/App";
1
+ import colors from '../../constants';
2
+ import { useApp } from "../../../../../libs/providers/App";
3
3
  import { memo, useCallback, useMemo, useState } from 'react';
4
4
  import { ActivityIndicator, Pressable, StyleSheet } from 'react-native';
5
- import Utils from '../../../../libs/constants/utils';
5
+ import Utils from '../../../../../libs/constants/utils';
6
6
  import Text from './Text';
7
7
  export default memo(({ text, onPress, onSubmit, backgroundColorPage, enabled = true, themeColor = 'default' }) => {
8
8
  const { colorScheme } = useApp();
@@ -12,10 +12,10 @@ export default memo(({ text, onPress, onSubmit, backgroundColorPage, enabled = t
12
12
  return enabled ? (pressed ?
13
13
  themeColor === 'default' ?
14
14
  colors.especiales.azul_pressed :
15
- colorScheme === 'dark' ? Utils.adjustLightness(backgroundColorPage, 10) : backgroundColorPage
15
+ colorScheme === 'dark' ? Utils.adjustLightness(backgroundColorPage ?? 'white', 10) : backgroundColorPage ?? 'white'
16
16
  : themeColor === 'default' ?
17
17
  Utils.adjustLightness(colors.especiales.azul, -10) :
18
- colorScheme === 'dark' ? backgroundColorPage : Utils.adjustLightness(backgroundColorPage, -1))
18
+ colorScheme === 'dark' ? backgroundColorPage : Utils.adjustLightness(backgroundColorPage ?? 'white', -1))
19
19
  : Theme.colorButtonFooterDisabled;
20
20
  }, [enabled, themeColor, backgroundColorPage, colorScheme]);
21
21
  const _onPress = useCallback(async () => {
@@ -15,6 +15,8 @@ export type Props = {
15
15
  onSubmit?: () => void;
16
16
  /**
17
17
  Color de fondo de la página.
18
+ @android
19
+ @web
18
20
  */
19
- backgroundColorPage: string;
21
+ backgroundColorPage?: string;
20
22
  } & TextProps;
@@ -0,0 +1,6 @@
1
+ type Props = {
2
+ children: React.ReactNode;
3
+ backgroundColorPage?: string;
4
+ };
5
+ declare const _default: import("react").MemoExoticComponent<({ children, backgroundColorPage }: Props) => import("react").JSX.Element>;
6
+ export default _default;
@@ -0,0 +1,38 @@
1
+ import { View, StyleSheet } from 'react-native';
2
+ import MaskedView from '@react-native-masked-view/masked-view';
3
+ import { BlurView } from 'expo-blur';
4
+ import { LinearGradient } from 'expo-linear-gradient';
5
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
+ import { memo } from 'react';
7
+ import Background from './Background';
8
+ import ButtonView from './View';
9
+ export default memo(({ children, backgroundColorPage }) => {
10
+ const insets = useSafeAreaInsets();
11
+ return (<View style={styles.footer}>
12
+ <MaskedView style={[StyleSheet.absoluteFillObject]} maskElement={<LinearGradient colors={['transparent', 'transparent', 'rgba(0, 0, 0, 0.8)', 'black', 'black']} locations={[0, 0.05, 0.2, 0.5, 1]} style={StyleSheet.absoluteFillObject}/>}>
13
+ <BlurView intensity={6} tint='dark' style={StyleSheet.absoluteFillObject}/>
14
+ </MaskedView>
15
+
16
+ {backgroundColorPage && <Background backgroundColorPage={backgroundColorPage}/>}
17
+
18
+ <View style={[styles.view, { paddingBottom: insets.bottom + 5 }]}>
19
+ <ButtonView>
20
+ {children}
21
+ </ButtonView>
22
+ </View>
23
+
24
+ </View>);
25
+ });
26
+ const styles = StyleSheet.create({
27
+ footer: {
28
+ position: 'absolute',
29
+ bottom: 0,
30
+ width: '100%',
31
+ },
32
+ view: {
33
+ position: 'relative',
34
+ paddingTop: 70,
35
+ justifyContent: 'center',
36
+ alignItems: 'center'
37
+ }
38
+ });
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ declare const _default: React.MemoExoticComponent<({ children }: {
3
+ children: React.ReactNode;
4
+ }) => React.JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { View, StyleSheet } from 'react-native';
2
+ import React, { memo } from 'react';
3
+ export default memo(({ children }) => (<View style={styles.view}>
4
+ {children}
5
+ </View>));
6
+ const styles = StyleSheet.create({
7
+ view: {
8
+ paddingHorizontal: 17 * 2,
9
+ gap: 10,
10
+ }
11
+ });
@@ -1,3 +1,9 @@
1
- import { Component } from './types';
2
- declare const Footer: Component;
3
- export default Footer;
1
+ import Footer from './components/Footer';
2
+ import View from './components/View';
3
+ import Button from './components/Button';
4
+ type Component = typeof Footer & {
5
+ ButtonView: typeof View;
6
+ Button: typeof Button;
7
+ };
8
+ declare const FooterComponent: Component;
9
+ export default FooterComponent;
@@ -1,40 +1,7 @@
1
- import { View, StyleSheet } from 'react-native';
2
- import MaskedView from '@react-native-masked-view/masked-view';
3
- import { BlurView } from 'expo-blur';
4
- import { LinearGradient } from 'expo-linear-gradient';
5
- import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
- import { memo } from 'react';
7
- import Background from './Background';
8
- import Button from './Button';
9
- const Footer = memo(({ children, backgroundColorPage }) => {
10
- const insets = useSafeAreaInsets();
11
- return (<View style={styles.footer}>
12
- <MaskedView style={[StyleSheet.absoluteFillObject]} maskElement={<LinearGradient colors={['transparent', 'transparent', 'rgba(0, 0, 0, 0.8)', 'black', 'black']} locations={[0, 0.05, 0.2, 0.5, 1]} style={StyleSheet.absoluteFillObject}/>}>
13
- <BlurView intensity={6} tint='dark' style={StyleSheet.absoluteFillObject}/>
14
- </MaskedView>
15
-
16
- <Background backgroundColorPage={backgroundColorPage}/>
17
-
18
- <View style={[styles.view, { paddingBottom: insets.bottom + 5 }]}>
19
- {children}
20
- </View>
21
-
22
- </View>);
23
- });
24
- Footer.Button = Button;
25
- export default Footer;
26
- const styles = StyleSheet.create({
27
- footer: {
28
- position: 'absolute',
29
- bottom: 0,
30
- width: '100%',
31
- },
32
- view: {
33
- position: 'relative',
34
- paddingHorizontal: 17 * 2,
35
- paddingTop: 70,
36
- justifyContent: 'center',
37
- alignItems: 'center',
38
- gap: 10,
39
- }
40
- });
1
+ import Footer from './components/Footer';
2
+ import View from './components/View';
3
+ import Button from './components/Button';
4
+ const FooterComponent = Footer;
5
+ FooterComponent.ButtonView = View;
6
+ FooterComponent.Button = Button;
7
+ export default FooterComponent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-pytech",
3
- "version": "1.0.42",
3
+ "version": "1.0.44",
4
4
  "description": "Libreria de React Native Pytech",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,9 +0,0 @@
1
- import Button from './Button';
2
- type Props = {
3
- children: React.ReactNode;
4
- backgroundColorPage: string;
5
- };
6
- export type Component = React.MemoExoticComponent<React.FC<Props>> & {
7
- Button: typeof Button;
8
- };
9
- export default Props;
@@ -1 +0,0 @@
1
- export {};