native-pytech 1.0.67 → 1.0.69
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/dist/libs/swiftui/src/components/List/Editable/Section/index.d.ts +1 -1
- package/dist/libs/swiftui/src/components/List/Editable/Section/index.js +2 -2
- package/dist/libs/swiftui/src/components/List/Editable/Section/types.d.ts +5 -0
- package/dist/libs/swiftui/src/components/NavigationLink/index.d.ts +1 -1
- package/dist/libs/swiftui/src/components/NavigationLink/index.js +2 -2
- package/dist/libs/swiftui/src/components/NavigationLink/types.d.ts +5 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type Props from "./types";
|
|
3
|
-
declare function Component<T>({ data, keyExtractor, onDelete, onMove, renderItem }: Props<T>): React.JSX.Element;
|
|
3
|
+
declare function Component<T>({ data, keyExtractor, onDelete, onMove, renderItem, sectionProps, }: Props<T>): React.JSX.Element;
|
|
4
4
|
declare const _default: typeof Component;
|
|
5
5
|
export default _default;
|
|
@@ -3,7 +3,7 @@ import { moveDisabled, tag, deleteDisabled } from "@expo/ui/swift-ui/modifiers";
|
|
|
3
3
|
import React, { memo, useCallback, useState } from "react";
|
|
4
4
|
import Hooks from '../../../../../../../libs/constants/hooks';
|
|
5
5
|
import { useListEditable } from "../../../../context/ListEditable";
|
|
6
|
-
function Component({ data = [], keyExtractor, onDelete, onMove, renderItem }) {
|
|
6
|
+
function Component({ data = [], keyExtractor, onDelete, onMove, renderItem, sectionProps, }) {
|
|
7
7
|
// ---------------------- Variables ----------------------
|
|
8
8
|
const { enableMove, enableDelete } = useListEditable();
|
|
9
9
|
const [_data, setData] = useState(data ?? []);
|
|
@@ -24,7 +24,7 @@ function Component({ data = [], keyExtractor, onDelete, onMove, renderItem }) {
|
|
|
24
24
|
});
|
|
25
25
|
onMove?.({ listIndexes: sourceIndices, destinationIndex: adjustedDest });
|
|
26
26
|
}, [onMove]);
|
|
27
|
-
return (<Section>
|
|
27
|
+
return (<Section {...sectionProps}>
|
|
28
28
|
<List.ForEach onDelete={handleDelete} onMove={handleMove} modifiers={[moveDisabled(!enableMove), deleteDisabled(!enableDelete)]}>
|
|
29
29
|
{_data.map((item, index) => {
|
|
30
30
|
const key = keyExtractor?.(item) ?? index;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ViewModifier } from "@expo/ui/swift-ui/modifiers";
|
|
2
|
+
import { SectionProps } from "@expo/ui/swift-ui";
|
|
2
3
|
type Props<T> = {
|
|
3
4
|
/**
|
|
4
5
|
The data items to be rendered inside the list.
|
|
@@ -33,5 +34,9 @@ type Props<T> = {
|
|
|
33
34
|
item: T;
|
|
34
35
|
tagModifier: ViewModifier;
|
|
35
36
|
}) => React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
The props to apply to the Section.
|
|
39
|
+
*/
|
|
40
|
+
sectionProps?: Omit<SectionProps, 'children'>;
|
|
36
41
|
};
|
|
37
42
|
export default Props;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type Props from './types';
|
|
3
|
-
declare const _default: React.MemoExoticComponent<({ children, systemImage, label, modifiers, maintainButtonStyle, textTrailing, textTrailingProps, ...buttonProps }: Props) => React.JSX.Element>;
|
|
3
|
+
declare const _default: React.MemoExoticComponent<({ children, systemImage, label, modifiers, maintainButtonStyle, textTrailing, textTrailingProps, hStackProps, ...buttonProps }: Props) => React.JSX.Element>;
|
|
4
4
|
export default _default;
|
|
@@ -3,7 +3,7 @@ import { foregroundStyle } from '@expo/ui/swift-ui/modifiers';
|
|
|
3
3
|
import { Color } from 'expo-router';
|
|
4
4
|
import React, { memo, useMemo } from 'react';
|
|
5
5
|
import Trailing from './Trailing';
|
|
6
|
-
export default memo(({ children, systemImage, label, modifiers, maintainButtonStyle = false, textTrailing, textTrailingProps, ...buttonProps }) => {
|
|
6
|
+
export default memo(({ children, systemImage, label, modifiers, maintainButtonStyle = false, textTrailing, textTrailingProps, hStackProps, ...buttonProps }) => {
|
|
7
7
|
// Va a poner una Label cuando no tenga que mantener el estilo del button y haya una imagen.
|
|
8
8
|
// Si no tiene que mantener el estilo del button y no hay una imagen, solo va a cambiar el foregroundColor.
|
|
9
9
|
const renderLabel = !maintainButtonStyle && systemImage !== undefined;
|
|
@@ -13,7 +13,7 @@ export default memo(({ children, systemImage, label, modifiers, maintainButtonSt
|
|
|
13
13
|
], [modifiers, maintainButtonStyle, renderLabel]);
|
|
14
14
|
const buttonSystemImage = !renderLabel ? systemImage : undefined;
|
|
15
15
|
const buttonLabel = !renderLabel ? label : undefined;
|
|
16
|
-
return (<HStack>
|
|
16
|
+
return (<HStack {...hStackProps}>
|
|
17
17
|
<Button modifiers={_modifiers} systemImage={buttonSystemImage} label={buttonLabel} {...buttonProps}>
|
|
18
18
|
{children}
|
|
19
19
|
</Button>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonProps, TextProps } from "@expo/ui/swift-ui";
|
|
1
|
+
import { ButtonProps, HStackProps, TextProps } from "@expo/ui/swift-ui";
|
|
2
2
|
export type TrailingProps = {
|
|
3
3
|
/**
|
|
4
4
|
Text to display on the Trailing Stack.
|
|
@@ -23,5 +23,9 @@ type Props = ButtonProps & {
|
|
|
23
23
|
@default false
|
|
24
24
|
*/
|
|
25
25
|
maintainButtonStyle?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
HStackProps to apply to the HStack.
|
|
28
|
+
*/
|
|
29
|
+
hStackProps?: Omit<HStackProps, 'children'>;
|
|
26
30
|
};
|
|
27
31
|
export default Props;
|