native-pytech 1.0.136 → 1.0.137

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.
@@ -0,0 +1 @@
1
+ export { default } from '../../libs/sections/Icon';
@@ -0,0 +1 @@
1
+ export { default } from '../../libs/sections/Icon';
@@ -0,0 +1 @@
1
+ export { default } from './src';
@@ -0,0 +1 @@
1
+ export { default } from './src';
@@ -0,0 +1,7 @@
1
+ import { VStackProps } from '@expo/ui/swift-ui';
2
+ import React from 'react';
3
+ type Props = VStackProps & {
4
+ children: React.ReactNode;
5
+ };
6
+ declare const _default: React.MemoExoticComponent<({ children, modifiers, ...vStackProps }: Props) => React.JSX.Element>;
7
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import { Section, VStack } from '@expo/ui/swift-ui';
2
+ import { containerRelativeFrame, listRowBackground, frame, listRowInsets } from '@expo/ui/swift-ui/modifiers';
3
+ import React, { memo, useMemo } from 'react';
4
+ export default memo(({ children, modifiers, ...vStackProps }) => {
5
+ const _modifiers = useMemo(() => [
6
+ ...(modifiers ?? []),
7
+ frame({ alignment: 'center' }),
8
+ containerRelativeFrame({ axes: 'horizontal' }),
9
+ listRowBackground('transparent'),
10
+ listRowInsets({ bottom: 0.1 })
11
+ ], [modifiers]);
12
+ return (<Section>
13
+ <VStack spacing={20} modifiers={_modifiers} {...vStackProps}>
14
+ {children}
15
+ </VStack>
16
+ </Section>);
17
+ });
@@ -0,0 +1,3 @@
1
+ import Props from '../types';
2
+ declare const _default: import("react").MemoExoticComponent<({ title, subtitle, gradientProps, buttonProps }: Props) => import("react").JSX.Element>;
3
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import Props from '../types';
3
+ declare const _default: React.MemoExoticComponent<({ title, subtitle, gradientProps, buttonProps }: Props) => React.JSX.Element>;
4
+ export default _default;
@@ -0,0 +1,26 @@
1
+ import { Button, VStack } from '@expo/ui/swift-ui';
2
+ import { frame, font, buttonStyle } from '@expo/ui/swift-ui/modifiers';
3
+ import React, { memo } from 'react';
4
+ import Gradient from '../../../../libs/components/Gradient';
5
+ import Text from '../../../../libs/swiftui/src/components/Text';
6
+ import Section from './Section.ios';
7
+ export default memo(({ title, subtitle, gradientProps, buttonProps }) => {
8
+ const spacing = gradientProps?.type === 'extraLarge' ? 10 : 20;
9
+ return (<Section spacing={spacing}>
10
+ {gradientProps && (<Gradient {...gradientProps}/>)}
11
+
12
+ {(title || subtitle) && (subtitle ? (<VStack modifiers={[frame({ alignment: 'center' })]} spacing={2}>
13
+ <Title title={title}/>
14
+ <Text secondary>
15
+ {subtitle}
16
+ </Text>
17
+ </VStack>) : (<Title title={title}/>))}
18
+
19
+ {buttonProps && (<Button {...buttonProps} modifiers={[buttonStyle('bordered')]}/>)}
20
+ </Section>);
21
+ });
22
+ const Title = memo(({ title }) => {
23
+ return (<Text modifiers={[font({ weight: 'bold', size: 30 })]}>
24
+ {title}
25
+ </Text>);
26
+ });
@@ -0,0 +1,59 @@
1
+ import { View, Text, Pressable, StyleSheet } from "react-native";
2
+ import { memo } from 'react';
3
+ import Gradient from "native-pytech/components/gradient";
4
+ import Colors from "native-pytech/constants/colors";
5
+ import { useApp } from "native-pytech/providers/app";
6
+ export default memo(({ title, subtitle, gradientProps, buttonProps }) => {
7
+ const { colorScheme } = useApp();
8
+ const spacing = gradientProps?.type === 'extraLarge' ? 10 : 20;
9
+ return (<View style={[styles.container, { gap: spacing }]}>
10
+ {gradientProps && (<Gradient {...gradientProps}/>)}
11
+
12
+ {(title || subtitle) && (subtitle ? (<View style={styles.containerTitle}>
13
+ <Title title={title} colorScheme={colorScheme}/>
14
+ <Text style={[styles.subtitle, { color: Colors[colorScheme].text2 }]}>
15
+ {subtitle}
16
+ </Text>
17
+ </View>) : (<Title title={title} colorScheme={colorScheme}/>))}
18
+
19
+ {buttonProps && (<Pressable onPress={buttonProps.onPress} style={styles.pressable}>
20
+ <Text style={styles.label}>{buttonProps.label}</Text>
21
+ </Pressable>)}
22
+ </View>);
23
+ });
24
+ const Title = memo(({ title, colorScheme }) => {
25
+ return (<Text style={[styles.title, { color: Colors[colorScheme].text }]}>
26
+ {title}
27
+ </Text>);
28
+ });
29
+ const styles = StyleSheet.create({
30
+ container: {
31
+ padding: 16,
32
+ flex: 1,
33
+ marginBottom: 30,
34
+ justifyContent: 'center',
35
+ alignItems: 'center'
36
+ },
37
+ containerTitle: {
38
+ flexDirection: 'column',
39
+ alignItems: 'center',
40
+ gap: 2
41
+ },
42
+ title: {
43
+ fontWeight: 'bold',
44
+ fontSize: 30
45
+ },
46
+ subtitle: {
47
+ fontSize: 30
48
+ },
49
+ pressable: {
50
+ backgroundColor: Colors.especiales.azul,
51
+ padding: 10,
52
+ borderRadius: 10
53
+ },
54
+ label: {
55
+ color: 'white',
56
+ fontSize: 17,
57
+ fontWeight: 'semibold'
58
+ }
59
+ });
@@ -0,0 +1,25 @@
1
+ import { Props as GradientProps } from '../../../libs/components/Gradient';
2
+ type Props = {
3
+ /**
4
+ The title of the icon section.
5
+ */
6
+ title?: string;
7
+ /**
8
+ The subtitle of the icon section.
9
+ */
10
+ subtitle?: string;
11
+ /**
12
+ If it is given, displays a gradient.
13
+ */
14
+ gradientProps?: Omit<GradientProps, 'type'> & {
15
+ type: 'extraLarge' | 'extraExtraLarge';
16
+ };
17
+ /**
18
+ If it is given, displays a button.
19
+ */
20
+ buttonProps?: {
21
+ label: string;
22
+ onPress: () => void;
23
+ };
24
+ };
25
+ export default Props;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-pytech",
3
- "version": "1.0.136",
3
+ "version": "1.0.137",
4
4
  "description": "Libreria de React Native Pytech",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",