@sincpro/mobile-ui 1.1.0 → 2.0.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.
- package/README.md +156 -29
- package/dist/Actions/Actions.Button.d.ts +10 -12
- package/dist/Actions/Actions.Button.js +9 -11
- package/dist/Actions/Actions.Dock.d.ts +20 -0
- package/dist/Actions/Actions.Dock.js +89 -0
- package/dist/Actions/Actions.FAB.d.ts +1 -2
- package/dist/Actions/Actions.FAB.js +5 -7
- package/dist/Actions/Actions.IconButton.d.ts +1 -2
- package/dist/Actions/Actions.IconButton.js +2 -2
- package/dist/Actions/index.d.ts +4 -0
- package/dist/Actions/index.js +3 -0
- package/dist/Dialog/BottomSheet/BottomSheet.Root.js +22 -34
- package/dist/Dialog/Dialog.ActionSheet.js +2 -16
- package/dist/Dialog/Dialog.Confirmation.js +7 -5
- package/dist/Dialog/Dialog.EditValue.js +3 -1
- package/dist/Dialog/Dialog.Sheet.d.ts +3 -3
- package/dist/Dialog/Dialog.Sheet.js +18 -25
- package/dist/Display/Display.Accordion.js +7 -3
- package/dist/Display/Display.AmountSummary.d.ts +28 -0
- package/dist/Display/Display.AmountSummary.js +25 -0
- package/dist/Display/Display.Carousel.d.ts +27 -4
- package/dist/Display/Display.Carousel.js +112 -12
- package/dist/Display/Display.ExpoImage.d.ts +8 -0
- package/dist/Display/Display.ExpoImage.js +15 -0
- package/dist/Display/Display.Image.d.ts +10 -6
- package/dist/Display/Display.Image.js +39 -6
- package/dist/Display/Display.ListItem.d.ts +1 -2
- package/dist/Display/Display.ListItem.js +3 -3
- package/dist/Display/Display.Logo.d.ts +2 -2
- package/dist/Display/Display.Logo.js +3 -2
- package/dist/Display/Display.MediaCard.d.ts +2 -2
- package/dist/Display/Display.MediaEmbed.d.ts +2 -2
- package/dist/Display/Display.ProductCard.d.ts +2 -2
- package/dist/Display/Display.Story.d.ts +3 -3
- package/dist/Display/Display.Story.js +5 -4
- package/dist/Display/Display.StoryTray.d.ts +4 -4
- package/dist/Display/Display.StoryTray.js +3 -2
- package/dist/Display/Display.StoryViewer.d.ts +3 -3
- package/dist/Display/Display.StoryViewer.js +6 -3
- package/dist/Display/index.d.ts +9 -0
- package/dist/Display/index.js +4 -0
- package/dist/Feedback/Feedback.DomainSplashScreen.d.ts +13 -4
- package/dist/Feedback/Feedback.DomainSplashScreen.js +68 -53
- package/dist/Feedback/Feedback.EmptyState.d.ts +3 -4
- package/dist/Feedback/Feedback.EmptyState.js +4 -3
- package/dist/Feedback/Feedback.Error.d.ts +1 -2
- package/dist/Feedback/Feedback.Error.js +2 -2
- package/dist/Feedback/Feedback.Loading.d.ts +6 -2
- package/dist/Feedback/Feedback.Loading.js +2 -2
- package/dist/Feedback/Feedback.Progress.d.ts +6 -3
- package/dist/Feedback/Feedback.Progress.js +29 -19
- package/dist/Feedback/Feedback.ProgressCircle.d.ts +3 -2
- package/dist/Feedback/Feedback.ProgressCircle.js +10 -7
- package/dist/Feedback/Feedback.Skeleton.d.ts +4 -4
- package/dist/Feedback/Feedback.Skeleton.js +15 -3
- package/dist/Feedback/Feedback.Spinner.d.ts +3 -3
- package/dist/Feedback/Feedback.Spinner.js +40 -9
- package/dist/Feedback/Feedback.Splash.d.ts +2 -2
- package/dist/Feedback/Feedback.Splash.js +5 -3
- package/dist/Feedback/Toast.context.d.ts +64 -3
- package/dist/Feedback/Toast.context.js +112 -31
- package/dist/Feedback/index.d.ts +15 -1
- package/dist/Feedback/index.js +4 -1
- package/dist/Form/Form.Checkbox.d.ts +1 -2
- package/dist/Form/Form.Checkbox.js +2 -2
- package/dist/Form/Form.DatePicker.d.ts +1 -2
- package/dist/Form/Form.DatePicker.js +2 -2
- package/dist/Form/Form.Dropdown.d.ts +15 -3
- package/dist/Form/Form.Dropdown.js +21 -6
- package/dist/Form/Form.ErrorSummary.d.ts +23 -0
- package/dist/Form/Form.ErrorSummary.js +53 -0
- package/dist/Form/Form.Input.d.ts +1 -2
- package/dist/Form/Form.Input.js +2 -2
- package/dist/Form/Form.Select.d.ts +1 -2
- package/dist/Form/Form.Select.js +6 -19
- package/dist/Form/index.d.ts +3 -0
- package/dist/Form/index.js +2 -0
- package/dist/Navigation/Navigation.AppBar.d.ts +2 -6
- package/dist/Navigation/Navigation.AppBar.js +9 -7
- package/dist/Navigation/Navigation.BottomNav.d.ts +1 -3
- package/dist/Navigation/Navigation.BottomNav.js +7 -6
- package/dist/Navigation/Navigation.Header.d.ts +2 -2
- package/dist/Navigation/Navigation.Menu.js +10 -3
- package/dist/Navigation/Navigation.Search.d.ts +41 -0
- package/dist/Navigation/Navigation.Search.js +47 -0
- package/dist/Navigation/Navigation.SearchBar.d.ts +1 -2
- package/dist/Navigation/Navigation.SearchBar.js +16 -19
- package/dist/Navigation/Navigation.SegmentedControl.d.ts +11 -3
- package/dist/Navigation/Navigation.SegmentedControl.js +29 -16
- package/dist/Navigation/index.d.ts +11 -2
- package/dist/Navigation/index.js +2 -0
- package/dist/branding.d.ts +3 -2
- package/dist/primitives/BaseButton.d.ts +10 -12
- package/dist/primitives/BaseButton.js +9 -11
- package/dist/theme/typography.d.ts +1 -1
- package/dist/utils/image.d.ts +3 -0
- package/dist/utils/image.js +13 -0
- package/dist/utils/keys.d.ts +1 -0
- package/dist/utils/keys.js +7 -0
- package/dist/utils/progress.d.ts +1 -0
- package/dist/utils/progress.js +5 -0
- package/dist/utils/reorder.js +2 -5
- package/dist/utils/useReducedMotion.d.ts +1 -0
- package/dist/utils/useReducedMotion.js +43 -0
- package/dist/utils/useSheetTranslation.d.ts +5 -0
- package/dist/utils/useSheetTranslation.js +23 -0
- package/dist/views/AppSplashView.d.ts +3 -2
- package/dist/views/AppSplashView.js +3 -2
- package/dist/views/AuthFormView.d.ts +2 -2
- package/dist/views/FormViewV2.d.ts +2 -2
- package/dist/views/ListViewV2.context.d.ts +3 -1
- package/dist/views/ListViewV2.context.js +41 -21
- package/dist/views/ListViewV2.d.ts +15 -7
- package/dist/views/ListViewV2.js +44 -23
- package/dist/views/types/IListView.js +6 -5
- package/dist/widgets/CollectionOptions.js +9 -7
- package/dist/widgets/FilterBar.d.ts +1 -1
- package/dist/widgets/FilterBar.js +1 -1
- package/dist/widgets/FilterBuilder.js +7 -7
- package/dist/widgets/HomeHeader.d.ts +2 -2
- package/dist/widgets/PromoModal.js +3 -1
- package/dist/widgets/ScreenHeader.d.ts +2 -2
- package/package.json +4 -1
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { type ExpoImageProps } from "./Display.ExpoImage.js";
|
|
2
|
+
import { type ImageSource } from "../utils/image.js";
|
|
3
|
+
import { type ReactNode } from "react";
|
|
4
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
5
|
+
export interface DisplayImageProps extends Omit<ExpoImageProps, "source" | "style"> {
|
|
6
|
+
source: ImageSource;
|
|
4
7
|
width?: number | `${number}%`;
|
|
5
8
|
height?: number;
|
|
6
9
|
aspectRatio?: number;
|
|
7
10
|
radius?: number;
|
|
8
|
-
resizeMode?: ImageResizeMode;
|
|
9
11
|
fallbackIcon?: string;
|
|
10
12
|
className?: string;
|
|
11
|
-
style?:
|
|
13
|
+
style?: ExpoImageProps["style"];
|
|
14
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
15
|
+
renderError?: (retry: () => void) => ReactNode;
|
|
12
16
|
testID?: string;
|
|
13
17
|
}
|
|
14
|
-
declare function DisplayImage(
|
|
18
|
+
declare function DisplayImage(props: DisplayImageProps): import("react").JSX.Element;
|
|
15
19
|
export default DisplayImage;
|
|
@@ -1,17 +1,50 @@
|
|
|
1
|
+
import { createElement as _createElement } from "nativewind";
|
|
1
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
3
|
+
import ExpoImage from "./Display.ExpoImage.js";
|
|
2
4
|
import Icon from "./Display.Icon.js";
|
|
3
5
|
import Skeleton from "../Feedback/Feedback.Skeleton.js";
|
|
4
|
-
import {
|
|
6
|
+
import { useTheme } from "../theme/index.js";
|
|
5
7
|
import { cn } from "../theme/tw.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
8
|
+
import { imageSourceKey } from "../utils/image.js";
|
|
9
|
+
import { useLayoutEffect, useRef, useState } from "react";
|
|
10
|
+
import { View } from "react-native";
|
|
11
|
+
function ImageContent({ source, width = "100%", height, aspectRatio, radius = 12, contentFit = "cover", placeholder, fallbackIcon = "image-outline", className, style, containerStyle, renderError, testID, onError, onLoadStart, onLoadEnd, onLoad, accessibilityLabel, accessible, retry, ...imageProps }) {
|
|
12
|
+
const theme = useTheme();
|
|
9
13
|
const [loading, setLoading] = useState(true);
|
|
10
14
|
const [failed, setFailed] = useState(false);
|
|
15
|
+
const active = useRef(true);
|
|
16
|
+
useLayoutEffect(() => {
|
|
17
|
+
active.current = true;
|
|
18
|
+
return () => {
|
|
19
|
+
active.current = false;
|
|
20
|
+
};
|
|
21
|
+
}, []);
|
|
11
22
|
const dimensions = { width, height, aspectRatio, borderRadius: radius };
|
|
12
|
-
return (_jsx(View, { className: cn("overflow-hidden bg-bg-muted", className), style: dimensions, testID: testID, children: failed ? (_jsx(View, { className: "flex-1 items-center justify-center", children: _jsx(Icon, { color: theme.icon.disabled, name: fallbackIcon, size: 32 }) })) : (_jsxs(_Fragment, { children: [_jsx(
|
|
23
|
+
return (_jsx(View, { className: cn("overflow-hidden bg-bg-muted", className), style: [dimensions, containerStyle], testID: testID, children: failed ? (renderError ? (renderError(retry)) : (_jsx(View, { accessibilityLabel: accessibilityLabel ? `${accessibilityLabel}. Imagen no disponible` : undefined, accessibilityRole: "image", accessible: accessible ?? !!accessibilityLabel, className: "flex-1 items-center justify-center", children: _jsx(Icon, { color: theme.icon.disabled, name: fallbackIcon, size: 32 }) }))) : (_jsxs(_Fragment, { children: [_jsx(ExpoImage, { ...imageProps, accessibilityLabel: accessibilityLabel, accessible: accessible, contentFit: contentFit, onError: (event) => {
|
|
24
|
+
if (!active.current)
|
|
25
|
+
return;
|
|
13
26
|
setFailed(true);
|
|
14
27
|
setLoading(false);
|
|
15
|
-
|
|
28
|
+
onError?.(event);
|
|
29
|
+
}, onLoad: (event) => {
|
|
30
|
+
if (!active.current)
|
|
31
|
+
return;
|
|
32
|
+
setLoading(false);
|
|
33
|
+
onLoad?.(event);
|
|
34
|
+
}, onLoadEnd: () => {
|
|
35
|
+
if (!active.current)
|
|
36
|
+
return;
|
|
37
|
+
setLoading(false);
|
|
38
|
+
onLoadEnd?.();
|
|
39
|
+
}, onLoadStart: () => {
|
|
40
|
+
if (!active.current)
|
|
41
|
+
return;
|
|
42
|
+
setLoading(true);
|
|
43
|
+
onLoadStart?.();
|
|
44
|
+
}, placeholder: placeholder, placeholderContentFit: imageProps.placeholderContentFit ?? contentFit, source: source, style: [{ width: "100%", height: "100%" }, style] }), loading && !placeholder ? (_jsx(View, { style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0 }, children: _jsx(Skeleton, { height: "100%", radius: radius, width: "100%" }) })) : null] })) }));
|
|
45
|
+
}
|
|
46
|
+
function DisplayImage(props) {
|
|
47
|
+
const [attempt, setAttempt] = useState(0);
|
|
48
|
+
return (_createElement(ImageContent, { ...props, key: `${imageSourceKey(props.source)}:${attempt}`, retry: () => setAttempt((current) => current + 1) }));
|
|
16
49
|
}
|
|
17
50
|
export default DisplayImage;
|
|
@@ -14,7 +14,6 @@ export interface ListItemProps {
|
|
|
14
14
|
showDivider?: boolean;
|
|
15
15
|
className?: string;
|
|
16
16
|
testID?: string;
|
|
17
|
-
accessibleSizing?: boolean;
|
|
18
17
|
accessibilityLabel?: string;
|
|
19
18
|
accessibilityHint?: string;
|
|
20
19
|
disabled?: boolean;
|
|
@@ -27,5 +26,5 @@ export interface ListItemProps {
|
|
|
27
26
|
subtitleTextProps?: Omit<ComponentProps<typeof Typography.Text>, "children">;
|
|
28
27
|
valueTextProps?: Omit<ComponentProps<typeof Typography.Text>, "children">;
|
|
29
28
|
}
|
|
30
|
-
declare function ListItem({ title, subtitle, leading, trailing, chevron, onPress, showDivider, className, testID,
|
|
29
|
+
declare function ListItem({ title, subtitle, leading, trailing, chevron, onPress, showDivider, className, testID, accessibilityLabel, accessibilityHint, disabled, variant, value, layout, density, style, titleTextProps, subtitleTextProps, valueTextProps, }: ListItemProps): import("react").JSX.Element;
|
|
31
30
|
export default ListItem;
|
|
@@ -5,7 +5,7 @@ import { useTheme } from "../theme/index.js";
|
|
|
5
5
|
import { cn } from "../theme/tw.js";
|
|
6
6
|
import { Typography } from "../Typography/index.js";
|
|
7
7
|
import { Pressable as NativePressable, useWindowDimensions, View, } from "react-native";
|
|
8
|
-
function ListItem({ title, subtitle, leading, trailing, chevron = false, onPress, showDivider, className, testID,
|
|
8
|
+
function ListItem({ title, subtitle, leading, trailing, chevron = false, onPress, showDivider, className, testID, accessibilityLabel, accessibilityHint, disabled = false, variant = "default", value, layout = "auto", density = "compact", style, titleTextProps, subtitleTextProps, valueTextProps, }) {
|
|
9
9
|
const theme = useTheme();
|
|
10
10
|
const { width, fontScale } = useWindowDimensions();
|
|
11
11
|
const mobile = variant === "mobile";
|
|
@@ -15,7 +15,7 @@ function ListItem({ title, subtitle, leading, trailing, chevron = false, onPress
|
|
|
15
15
|
(layout === "stacked" || (layout === "auto" && (fontScale > 1.3 || width < 360)));
|
|
16
16
|
const right = trailing ??
|
|
17
17
|
(value || chevron ? (_jsxs(View, { className: "flex-row items-center gap-2", children: [value ? (_jsx(Typography.Text, { className: "text-text-secondary flex-shrink", variant: comfortable ? "bodyReadable" : "body", ...valueTextProps, children: value })) : null, chevron ? (_jsx(View, { accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants", children: _jsx(Icon, { color: theme.icon.tertiary, name: "chevron-forward", size: 18 }) })) : null] })) : null);
|
|
18
|
-
const content = (_jsxs(_Fragment, { children: [leading ? _jsx(View, { className: "mr-3 justify-center", children: leading }) : null, _jsxs(View, { className: cn("flex-1", mobile ? "min-w-0 gap-1" : "gap-0.5"), children: [_jsx(Typography.Text, { className: mobile && disabled ? "text-text-disabled" : "text-text-primary",
|
|
18
|
+
const content = (_jsxs(_Fragment, { children: [leading ? _jsx(View, { className: "mr-3 justify-center", children: leading }) : null, _jsxs(View, { className: cn("flex-1", mobile ? "min-w-0 gap-1" : "gap-0.5"), children: [_jsx(Typography.Text, { className: mobile && disabled ? "text-text-disabled" : "text-text-primary", semibold: !mobile || comfortable, variant: comfortable ? "bodyReadable" : "body", ...titleTextProps, children: title }), subtitle ? (_jsx(Typography.Text, { className: "text-text-secondary", variant: comfortable ? "bodyLarge" : "bodySmall", ...subtitleTextProps, children: subtitle })) : null, stacked && right ? _jsx(View, { className: "self-start mt-1", children: right }) : null] }), !stacked && right ? (_jsx(View, { className: cn("ml-3 justify-center", mobile && "flex-shrink"), style: mobile ? { maxWidth: "45%" } : undefined, children: right })) : null] }));
|
|
19
19
|
const base = cn("flex-row items-center px-4", mobile && !comfortable ? "py-2" : "py-3", !mobile && "bg-bg-card", (showDivider ?? !mobile) && "border-b border-border-default", disabled && !mobile && "opacity-50", className);
|
|
20
20
|
if (onPress) {
|
|
21
21
|
if (mobile) {
|
|
@@ -28,7 +28,7 @@ function ListItem({ title, subtitle, leading, trailing, chevron = false, onPress
|
|
|
28
28
|
style,
|
|
29
29
|
], testID: testID, children: content }));
|
|
30
30
|
}
|
|
31
|
-
return (_jsx(Pressable, { accessibilityHint: accessibilityHint, accessibilityLabel: accessibilityLabel, className: base, disabled: disabled, onPress: onPress, style: [
|
|
31
|
+
return (_jsx(Pressable, { accessibilityHint: accessibilityHint, accessibilityLabel: accessibilityLabel, className: base, disabled: disabled, onPress: onPress, style: [{ minHeight: 48, minWidth: 48 }, style], testID: testID, children: content }));
|
|
32
32
|
}
|
|
33
33
|
return (_jsx(View, { className: base, style: style, testID: testID, children: content }));
|
|
34
34
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type VariantProps } from "../theme/tw.js";
|
|
2
|
+
import type { ImageSource } from "../utils/image.js";
|
|
2
3
|
import { FC } from "react";
|
|
3
|
-
import { type ImageSourcePropType } from "react-native";
|
|
4
4
|
declare const logo: import("tailwind-variants").TVReturnType<{
|
|
5
5
|
size: {
|
|
6
6
|
small: {
|
|
@@ -48,7 +48,7 @@ declare const logo: import("tailwind-variants").TVReturnType<{
|
|
|
48
48
|
image: string;
|
|
49
49
|
}>>;
|
|
50
50
|
export interface LogoProps extends VariantProps<typeof logo> {
|
|
51
|
-
source?:
|
|
51
|
+
source?: ImageSource;
|
|
52
52
|
className?: string;
|
|
53
53
|
}
|
|
54
54
|
declare const Logo: FC<LogoProps>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
2
|
import { getBrandingLogo } from "../branding.js";
|
|
3
|
+
import ExpoImage from "./Display.ExpoImage.js";
|
|
3
4
|
import { tv } from "../theme/tw.js";
|
|
4
|
-
import {
|
|
5
|
+
import { View } from "react-native";
|
|
5
6
|
const logo = tv({
|
|
6
7
|
slots: {
|
|
7
8
|
container: "items-center justify-center",
|
|
@@ -28,7 +29,7 @@ function renderImage(imageClassName, source) {
|
|
|
28
29
|
if (!source) {
|
|
29
30
|
return null;
|
|
30
31
|
}
|
|
31
|
-
return _jsx(
|
|
32
|
+
return _jsx(ExpoImage, { className: imageClassName, contentFit: "contain", source: source });
|
|
32
33
|
}
|
|
33
34
|
const Logo = ({ source, size = "medium", className }) => {
|
|
34
35
|
const styles = logo({ size });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { ImageSource } from "../utils/image.js";
|
|
1
2
|
import type { ReactNode } from "react";
|
|
2
|
-
import { type ImageSourcePropType } from "react-native";
|
|
3
3
|
export interface MediaCardProps {
|
|
4
|
-
image:
|
|
4
|
+
image: ImageSource;
|
|
5
5
|
title?: string;
|
|
6
6
|
subtitle?: string;
|
|
7
7
|
badge?: ReactNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { ImageSource } from "../utils/image.js";
|
|
1
2
|
import type { ReactNode } from "react";
|
|
2
|
-
import { type ImageSourcePropType } from "react-native";
|
|
3
3
|
export interface MediaEmbedProps {
|
|
4
|
-
thumbnail:
|
|
4
|
+
thumbnail: ImageSource;
|
|
5
5
|
onPress: () => void;
|
|
6
6
|
duration?: string;
|
|
7
7
|
title?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import type { ImageSource } from "../utils/image.js";
|
|
1
2
|
import type { ReactNode } from "react";
|
|
2
|
-
import { type ImageSourcePropType } from "react-native";
|
|
3
3
|
export interface ProductCardProps {
|
|
4
4
|
title: string;
|
|
5
|
-
image:
|
|
5
|
+
image: ImageSource;
|
|
6
6
|
price: number;
|
|
7
7
|
originalPrice?: number;
|
|
8
8
|
currency?: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ImageSource } from "../utils/image.js";
|
|
2
2
|
export interface StoryProps {
|
|
3
|
-
image:
|
|
3
|
+
image: ImageSource;
|
|
4
4
|
label?: string;
|
|
5
5
|
seen?: boolean;
|
|
6
6
|
variant?: "circle" | "card";
|
|
7
7
|
size?: number;
|
|
8
|
-
avatar?:
|
|
8
|
+
avatar?: ImageSource;
|
|
9
9
|
/** Mostrar el círculo del autor en la card. `false` = card de historia sin avatar. */
|
|
10
10
|
showAvatar?: boolean;
|
|
11
11
|
onPress?: () => void;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
+
import ExpoImage from "./Display.ExpoImage.js";
|
|
2
3
|
import Pressable from "../primitives/Pressable.js";
|
|
3
4
|
import { theme } from "../theme/index.js";
|
|
4
5
|
import { Typography } from "../Typography/index.js";
|
|
5
6
|
import { LinearGradient } from "expo-linear-gradient";
|
|
6
|
-
import {
|
|
7
|
+
import { View } from "react-native";
|
|
7
8
|
const RING = ["#F58529", "#DD2A7B"];
|
|
8
9
|
function Story({ image, label, seen = false, variant = "circle", size = 68, avatar, showAvatar = true, onPress, testID, }) {
|
|
9
10
|
if (variant === "card") {
|
|
10
|
-
return (_jsxs(Pressable, { accessibilityLabel: label, accessibilityRole: "button", onPress: onPress, style: { width: size * 1.6, borderRadius: 14, overflow: "hidden" }, testID: testID, children: [_jsx(
|
|
11
|
+
return (_jsxs(Pressable, { accessibilityLabel: label, accessibilityRole: "button", onPress: onPress, style: { width: size * 1.6, borderRadius: 14, overflow: "hidden" }, testID: testID, children: [_jsx(ExpoImage, { source: image, style: { width: "100%", height: size * 2.6 } }), showAvatar ? (_jsx(View, { style: {
|
|
11
12
|
position: "absolute",
|
|
12
13
|
top: 8,
|
|
13
14
|
left: 8,
|
|
14
15
|
borderRadius: 999,
|
|
15
16
|
borderWidth: 3,
|
|
16
17
|
borderColor: seen ? theme.border.strong : theme.primary,
|
|
17
|
-
}, children: _jsx(
|
|
18
|
+
}, children: _jsx(ExpoImage, { source: avatar ?? image, style: { width: 34, height: 34, borderRadius: 17 } }) })) : null, label ? (_jsx(LinearGradient, { colors: ["transparent", "rgba(0,0,0,0.7)"], style: {
|
|
18
19
|
position: "absolute",
|
|
19
20
|
left: 0,
|
|
20
21
|
right: 0,
|
|
@@ -38,6 +39,6 @@ function Story({ image, label, seen = false, variant = "circle", size = 68, avat
|
|
|
38
39
|
backgroundColor: theme.bg.card,
|
|
39
40
|
alignItems: "center",
|
|
40
41
|
justifyContent: "center",
|
|
41
|
-
}, children: _jsx(
|
|
42
|
+
}, children: _jsx(ExpoImage, { source: image, style: { width: innerSize, height: innerSize, borderRadius: innerSize / 2 } }) }) }), label ? (_jsx(Typography.Text, { className: "text-text-secondary", numberOfLines: 1, style: { maxWidth: size + 6 }, variant: "caption", children: label })) : null] }));
|
|
42
43
|
}
|
|
43
44
|
export default Story;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ImageSource } from "../utils/image.js";
|
|
2
2
|
export interface StoryTrayItem {
|
|
3
3
|
id: string;
|
|
4
|
-
image:
|
|
4
|
+
image: ImageSource;
|
|
5
5
|
label?: string;
|
|
6
|
-
avatar?:
|
|
6
|
+
avatar?: ImageSource;
|
|
7
7
|
seen?: boolean;
|
|
8
8
|
}
|
|
9
9
|
export interface StoryTrayCreate {
|
|
10
10
|
label?: string;
|
|
11
|
-
image?:
|
|
11
|
+
image?: ImageSource;
|
|
12
12
|
onPress: () => void;
|
|
13
13
|
}
|
|
14
14
|
export interface StoryTrayProps {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
+
import ExpoImage from "./Display.ExpoImage.js";
|
|
2
3
|
import Icon from "./Display.Icon.js";
|
|
3
4
|
import Story from "./Display.Story.js";
|
|
4
5
|
import Pressable from "../primitives/Pressable.js";
|
|
5
6
|
import { theme } from "../theme/index.js";
|
|
6
7
|
import { Typography } from "../Typography/index.js";
|
|
7
|
-
import {
|
|
8
|
+
import { ScrollView, View } from "react-native";
|
|
8
9
|
function CreateCard({ create, size }) {
|
|
9
10
|
const w = size * 1.6;
|
|
10
11
|
return (_jsxs(Pressable, { accessibilityLabel: create.label ?? "Crear historia", accessibilityRole: "button", onPress: create.onPress, style: {
|
|
@@ -14,7 +15,7 @@ function CreateCard({ create, size }) {
|
|
|
14
15
|
backgroundColor: theme.bg.card,
|
|
15
16
|
borderWidth: 1,
|
|
16
17
|
borderColor: theme.border.light,
|
|
17
|
-
}, children: [create.image ? (_jsx(
|
|
18
|
+
}, children: [create.image ? (_jsx(ExpoImage, { source: create.image, style: { width: "100%", height: size * 1.7 } })) : (_jsx(View, { style: { width: "100%", height: size * 1.7, backgroundColor: theme.bg.muted } })), _jsxs(View, { style: { alignItems: "center", paddingVertical: 14 }, children: [_jsx(View, { style: {
|
|
18
19
|
position: "absolute",
|
|
19
20
|
top: -16,
|
|
20
21
|
width: 32,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { ImageSource } from "../utils/image.js";
|
|
1
2
|
import type { ReactNode } from "react";
|
|
2
|
-
import { type ImageSourcePropType } from "react-native";
|
|
3
3
|
export interface StoryViewerSlide {
|
|
4
|
-
image:
|
|
4
|
+
image: ImageSource;
|
|
5
5
|
}
|
|
6
6
|
export interface StoryViewerProps {
|
|
7
7
|
visible: boolean;
|
|
@@ -12,7 +12,7 @@ export interface StoryViewerProps {
|
|
|
12
12
|
title: string;
|
|
13
13
|
subtitle?: string;
|
|
14
14
|
time?: string;
|
|
15
|
-
avatar?:
|
|
15
|
+
avatar?: ImageSource;
|
|
16
16
|
progress?: number;
|
|
17
17
|
muted?: boolean;
|
|
18
18
|
paused?: boolean;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
+
import ExpoImage from "./Display.ExpoImage.js";
|
|
2
3
|
import Icon from "./Display.Icon.js";
|
|
3
4
|
import Pressable from "../primitives/Pressable.js";
|
|
4
5
|
import { theme } from "../theme/index.js";
|
|
5
6
|
import { Typography } from "../Typography/index.js";
|
|
7
|
+
import { useReducedMotion } from "../utils/useReducedMotion.js";
|
|
6
8
|
import { LinearGradient } from "expo-linear-gradient";
|
|
7
|
-
import {
|
|
9
|
+
import { Modal, Pressable as RNPressable, View } from "react-native";
|
|
8
10
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
9
11
|
function StoryViewer({ visible, slides, index, onIndexChange, onClose, title, subtitle, time, avatar, progress = 1, muted, paused, onToggleMute, onTogglePause, onMore, footer, testID, }) {
|
|
10
12
|
const insets = useSafeAreaInsets();
|
|
13
|
+
const reducedMotion = useReducedMotion();
|
|
11
14
|
const current = slides[index];
|
|
12
15
|
const goPrev = () => {
|
|
13
16
|
if (index > 0)
|
|
@@ -21,7 +24,7 @@ function StoryViewer({ visible, slides, index, onIndexChange, onClose, title, su
|
|
|
21
24
|
};
|
|
22
25
|
if (!current)
|
|
23
26
|
return null;
|
|
24
|
-
return (_jsx(Modal, { animationType: "fade", onRequestClose: onClose, statusBarTranslucent: true, transparent: false, visible: visible, children: _jsxs(View, { style: { flex: 1, backgroundColor: "#000" }, testID: testID, children: [_jsx(
|
|
27
|
+
return (_jsx(Modal, { animationType: reducedMotion ? "none" : "fade", onRequestClose: onClose, statusBarTranslucent: true, transparent: false, visible: visible, children: _jsxs(View, { style: { flex: 1, backgroundColor: "#000" }, testID: testID, children: [_jsx(ExpoImage, { contentFit: "contain", source: current.image, style: {
|
|
25
28
|
position: "absolute",
|
|
26
29
|
top: 0,
|
|
27
30
|
left: 0,
|
|
@@ -57,7 +60,7 @@ function StoryViewer({ visible, slides, index, onIndexChange, onClose, title, su
|
|
|
57
60
|
? `${Math.round(progress * 100)}%`
|
|
58
61
|
: "0%",
|
|
59
62
|
backgroundColor: "#fff",
|
|
60
|
-
} }) }, i))) }), _jsxs(View, { style: { flexDirection: "row", alignItems: "center", marginTop: 12 }, children: [avatar ? (_jsx(
|
|
63
|
+
} }) }, i))) }), _jsxs(View, { style: { flexDirection: "row", alignItems: "center", marginTop: 12 }, children: [avatar ? (_jsx(ExpoImage, { source: avatar, style: { width: 36, height: 36, borderRadius: 18, marginRight: 8 } })) : null, _jsxs(View, { style: { flex: 1 }, children: [_jsxs(View, { style: { flexDirection: "row", alignItems: "center", gap: 6 }, children: [_jsx(Typography.Text, { className: "text-white", semibold: true, variant: "body", children: title }), time ? (_jsx(Typography.Text, { style: { color: "rgba(255,255,255,0.7)" }, variant: "caption", children: time })) : null] }), subtitle ? (_jsx(Typography.Text, { numberOfLines: 1, style: { color: "rgba(255,255,255,0.8)" }, variant: "caption", children: subtitle })) : null] }), onToggleMute ? (_jsx(Pressable, { accessibilityLabel: muted ? "Activar sonido" : "Silenciar", hitSlop: 8, onPress: onToggleMute, children: _jsx(Icon, { color: "#fff", name: muted ? "volume-mute" : "volume-high", size: 22 }) })) : null, onTogglePause ? (_jsx(Pressable, { accessibilityLabel: paused ? "Reanudar" : "Pausar", hitSlop: 8, onPress: onTogglePause, style: { marginLeft: 14 }, children: _jsx(Icon, { color: "#fff", name: paused ? "play" : "pause", size: 22 }) })) : null, onMore ? (_jsx(Pressable, { accessibilityLabel: "M\u00E1s opciones", hitSlop: 8, onPress: onMore, style: { marginLeft: 14 }, children: _jsx(Icon, { color: "#fff", name: "ellipsis-horizontal", size: 22 }) })) : null, _jsx(Pressable, { accessibilityLabel: "Cerrar", hitSlop: 8, onPress: onClose, style: { marginLeft: 14 }, children: _jsx(Icon, { color: "#fff", name: "close", size: 24 }) })] })] }), index < slides.length - 1 ? (_jsx(Pressable, { accessibilityLabel: "Siguiente", onPress: goNext, style: {
|
|
61
64
|
position: "absolute",
|
|
62
65
|
right: 8,
|
|
63
66
|
top: "50%",
|
package/dist/Display/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import CountRecords from "./Display.CountRecords.js";
|
|
|
8
8
|
import DataTable from "./Display.DataTable.js";
|
|
9
9
|
import Date from "./Display.Date.js";
|
|
10
10
|
import Divider from "./Display.Divider.js";
|
|
11
|
+
import ExpoImage from "./Display.ExpoImage.js";
|
|
11
12
|
import GradientSurface from "./Display.GradientSurface.js";
|
|
12
13
|
import IconBadge from "./Display.IconBadge.js";
|
|
13
14
|
import DisplayImage from "./Display.Image.js";
|
|
@@ -37,6 +38,11 @@ import Tag from "./Display.Tag.js";
|
|
|
37
38
|
import Timeline from "./Display.Timeline.js";
|
|
38
39
|
import Tooltip from "./Display.Tooltip.js";
|
|
39
40
|
export declare const Display: {
|
|
41
|
+
AmountSummary: {
|
|
42
|
+
Root: ({ children, currencySymbol, variant, className, testID, }: import("./Display.AmountSummary.js").AmountSummaryRootProps) => import("react").JSX.Element;
|
|
43
|
+
Row: ({ label, value, currencySymbol, prefix, className, labelClassName, valueClassName, testID, }: import("./Display.AmountSummary.js").AmountSummaryRowProps) => import("react").JSX.Element;
|
|
44
|
+
Total: (props: import("./Display.AmountSummary.js").AmountSummaryTotalProps) => import("react").JSX.Element;
|
|
45
|
+
};
|
|
40
46
|
Badge: typeof Badge;
|
|
41
47
|
BadgeVariants: typeof BadgeVariants;
|
|
42
48
|
Accordion: (({ children, className }: {
|
|
@@ -61,6 +67,7 @@ export declare const Display: {
|
|
|
61
67
|
Chip: typeof Chip;
|
|
62
68
|
Tag: typeof Tag;
|
|
63
69
|
Image: typeof DisplayImage;
|
|
70
|
+
ExpoImage: typeof ExpoImage;
|
|
64
71
|
MediaCard: typeof MediaCard;
|
|
65
72
|
MediaEmbed: typeof MediaEmbed;
|
|
66
73
|
Story: typeof Story;
|
|
@@ -97,6 +104,8 @@ export declare const Display: {
|
|
|
97
104
|
Pattern: typeof Pattern;
|
|
98
105
|
};
|
|
99
106
|
export { type BadgeProps, BadgeVariants };
|
|
107
|
+
export type { AmountSummaryRootProps, AmountSummaryRowProps, AmountSummaryTotalProps, } from "./Display.AmountSummary.js";
|
|
108
|
+
export type { CarouselControlsProps, CarouselProps, } from "./Display.Carousel.js";
|
|
100
109
|
export type { CircleButtonProps } from "./Display.CircleButton.js";
|
|
101
110
|
export type { ListGroupProps } from "./Display.ListGroup.js";
|
|
102
111
|
export type { ListItemProps } from "./Display.ListItem.js";
|
package/dist/Display/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Accordion from "./Display.Accordion.js";
|
|
2
|
+
import AmountSummary from "./Display.AmountSummary.js";
|
|
2
3
|
import Avatar from "./Display.Avatar.js";
|
|
3
4
|
import AvatarGroup from "./Display.AvatarGroup.js";
|
|
4
5
|
import Badge, { BadgeVariants, } from "./Display.Badge.js";
|
|
@@ -11,6 +12,7 @@ import CountRecords from "./Display.CountRecords.js";
|
|
|
11
12
|
import DataTable from "./Display.DataTable.js";
|
|
12
13
|
import Date from "./Display.Date.js";
|
|
13
14
|
import Divider from "./Display.Divider.js";
|
|
15
|
+
import ExpoImage from "./Display.ExpoImage.js";
|
|
14
16
|
import GradientSurface from "./Display.GradientSurface.js";
|
|
15
17
|
import Icon from "./Display.Icon.js";
|
|
16
18
|
import IconBadge from "./Display.IconBadge.js";
|
|
@@ -42,6 +44,7 @@ import Tag from "./Display.Tag.js";
|
|
|
42
44
|
import Timeline from "./Display.Timeline.js";
|
|
43
45
|
import Tooltip from "./Display.Tooltip.js";
|
|
44
46
|
export const Display = {
|
|
47
|
+
AmountSummary,
|
|
45
48
|
Badge,
|
|
46
49
|
BadgeVariants,
|
|
47
50
|
Accordion,
|
|
@@ -52,6 +55,7 @@ export const Display = {
|
|
|
52
55
|
Chip,
|
|
53
56
|
Tag,
|
|
54
57
|
Image: DisplayImage,
|
|
58
|
+
ExpoImage,
|
|
55
59
|
MediaCard,
|
|
56
60
|
MediaEmbed,
|
|
57
61
|
Story,
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import {
|
|
3
|
-
interface
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
export interface DomainSplashRenderProps {
|
|
4
|
+
domainName: string;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
reducedMotion: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface DomainSplashScreenProps {
|
|
4
9
|
domainName: string;
|
|
5
10
|
isLoading: boolean;
|
|
6
11
|
children: ReactNode;
|
|
7
12
|
onComplete?: () => void;
|
|
8
13
|
minDuration?: number;
|
|
14
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
15
|
+
overlayStyle?: StyleProp<ViewStyle>;
|
|
16
|
+
renderLoading?: (props: DomainSplashRenderProps) => ReactNode;
|
|
17
|
+
testID?: string;
|
|
9
18
|
}
|
|
10
|
-
declare function DomainSplashScreen({ domainName, isLoading, children, onComplete, minDuration, }: DomainSplashScreenProps):
|
|
19
|
+
declare function DomainSplashScreen({ domainName, isLoading, children, onComplete, minDuration, containerStyle, overlayStyle, renderLoading, testID, }: DomainSplashScreenProps): import("react").JSX.Element;
|
|
11
20
|
export default DomainSplashScreen;
|
|
@@ -1,65 +1,80 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
2
|
import GradientSurface from "../Display/Display.GradientSurface.js";
|
|
3
3
|
import Pattern from "../Display/Display.Pattern.js";
|
|
4
|
-
import
|
|
4
|
+
import Progress from "./Feedback.Progress.js";
|
|
5
|
+
import { useTheme } from "../theme/index.js";
|
|
5
6
|
import { Typography } from "../Typography/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
import { useReducedMotion } from "../utils/useReducedMotion.js";
|
|
8
|
+
import { useEffect, useRef, useState } from "react";
|
|
9
|
+
import { Animated, StyleSheet, View } from "react-native";
|
|
10
|
+
function DomainSplashScreen({ domainName, isLoading, children, onComplete, minDuration = 300, containerStyle, overlayStyle, renderLoading, testID, }) {
|
|
11
|
+
if (!Number.isFinite(minDuration) || minDuration < 0)
|
|
12
|
+
throw new RangeError("DomainSplashScreen minDuration must be a finite, non-negative number.");
|
|
13
|
+
const theme = useTheme();
|
|
14
|
+
const reducedMotion = useReducedMotion();
|
|
15
|
+
const [opacity] = useState(() => new Animated.Value(isLoading ? 1 : 0));
|
|
16
|
+
const [visible, setVisible] = useState(isLoading);
|
|
17
|
+
const startedAt = useRef(null);
|
|
18
|
+
const completed = useRef(false);
|
|
19
|
+
const onCompleteRef = useRef(onComplete);
|
|
20
|
+
const busy = isLoading || visible;
|
|
21
|
+
if (isLoading && !visible)
|
|
22
|
+
setVisible(true);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
onCompleteRef.current = onComplete;
|
|
18
25
|
}, [onComplete]);
|
|
19
26
|
useEffect(() => {
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
});
|
|
30
|
-
}, 100);
|
|
27
|
+
if (isLoading) {
|
|
28
|
+
startedAt.current = Date.now();
|
|
29
|
+
completed.current = false;
|
|
30
|
+
}
|
|
31
|
+
}, [isLoading]);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (isLoading) {
|
|
34
|
+
opacity.stopAnimation();
|
|
35
|
+
opacity.setValue(1);
|
|
31
36
|
return;
|
|
32
37
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
scheduleOnRN(handleComplete);
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}, 500);
|
|
38
|
+
if (startedAt.current === null || completed.current)
|
|
39
|
+
return;
|
|
40
|
+
let active = true;
|
|
41
|
+
let animation;
|
|
42
|
+
const finish = () => {
|
|
43
|
+
if (!active || completed.current)
|
|
44
|
+
return;
|
|
45
|
+
completed.current = true;
|
|
46
|
+
setVisible(false);
|
|
47
|
+
onCompleteRef.current?.();
|
|
48
|
+
};
|
|
49
|
+
const timeout = setTimeout(() => {
|
|
50
|
+
if (reducedMotion) {
|
|
51
|
+
opacity.setValue(0);
|
|
52
|
+
finish();
|
|
52
53
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
else {
|
|
55
|
+
animation = Animated.timing(opacity, {
|
|
56
|
+
toValue: 0,
|
|
57
|
+
duration: 400,
|
|
58
|
+
useNativeDriver: true,
|
|
59
|
+
isInteraction: false,
|
|
60
|
+
});
|
|
61
|
+
animation.start(({ finished }) => {
|
|
62
|
+
if (finished)
|
|
63
|
+
finish();
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}, Math.max(0, minDuration - (Date.now() - startedAt.current)));
|
|
67
|
+
return () => {
|
|
68
|
+
active = false;
|
|
69
|
+
clearTimeout(timeout);
|
|
70
|
+
animation?.stop();
|
|
71
|
+
};
|
|
72
|
+
}, [isLoading, minDuration, opacity, reducedMotion]);
|
|
73
|
+
return (_jsxs(View, { style: [styles.container, containerStyle], testID: testID, children: [_jsx(View, { accessibilityElementsHidden: busy, importantForAccessibility: busy ? "no-hide-descendants" : "auto", pointerEvents: busy ? "none" : "auto", style: styles.container, testID: testID ? `${testID}-content` : undefined, children: children }), busy ? (_jsx(Animated.View, { style: [
|
|
74
|
+
StyleSheet.absoluteFill,
|
|
75
|
+
{ opacity: isLoading ? 1 : opacity },
|
|
76
|
+
overlayStyle,
|
|
77
|
+
], testID: testID ? `${testID}-loading` : undefined, children: renderLoading ? (renderLoading({ domainName, isLoading, reducedMotion })) : (_jsxs(GradientSurface, { className: "flex-1", preset: "warm", radius: "none", style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0 }, children: [_jsx(Pattern, { color: theme.primary, kind: "dots", opacity: 0.14, size: 26 }), _jsx(View, { className: "flex-1 justify-center items-center px-8", children: _jsxs(View, { className: "w-full items-center gap-5", children: [_jsx(Typography.Text, { bold: true, style: { color: "#FFFFFF", fontSize: 24, letterSpacing: 0.5 }, children: `Cargando ${domainName}` }), _jsx(Progress, { accessibilityLabel: `Cargando ${domainName}`, indeterminate: true, indicatorStyle: { backgroundColor: theme.primary }, style: { backgroundColor: "rgba(255,255,255,0.18)" } })] }) })] })) })) : null] }));
|
|
63
78
|
}
|
|
64
79
|
const styles = StyleSheet.create({
|
|
65
80
|
container: {
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
+
import type { ImageSource } from "../utils/image.js";
|
|
1
2
|
import type { ReactNode } from "react";
|
|
2
|
-
import { type ImageSourcePropType } from "react-native";
|
|
3
3
|
export interface EmptyStateProps {
|
|
4
4
|
title: string;
|
|
5
5
|
description?: string;
|
|
6
6
|
icon?: string;
|
|
7
|
-
image?:
|
|
7
|
+
image?: ImageSource;
|
|
8
8
|
actionLabel?: string;
|
|
9
9
|
onAction?: () => void;
|
|
10
10
|
children?: ReactNode;
|
|
11
11
|
className?: string;
|
|
12
12
|
testID?: string;
|
|
13
|
-
accessibleSizing?: boolean;
|
|
14
13
|
}
|
|
15
|
-
declare function EmptyState({ title, description, icon, image, actionLabel, onAction, children, className, testID,
|
|
14
|
+
declare function EmptyState({ title, description, icon, image, actionLabel, onAction, children, className, testID, }: EmptyStateProps): import("react").JSX.Element;
|
|
16
15
|
export default EmptyState;
|