@sincpro/mobile-ui 0.2.0 → 0.3.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 +76 -19
- package/dist/Dialog/BottomSheet/BottomSheet.Root.d.ts +11 -7
- package/dist/Dialog/BottomSheet/BottomSheet.Root.js +4 -0
- package/dist/Dialog/Confirmation.context.d.ts +1 -1
- package/dist/Dialog/Dialog.ActionSheet.d.ts +17 -0
- package/dist/Dialog/Dialog.ActionSheet.js +16 -0
- package/dist/Dialog/Dialog.EditValue.d.ts +1 -1
- package/dist/Dialog/Dialog.Sheet.d.ts +26 -0
- package/dist/Dialog/Dialog.Sheet.js +55 -0
- package/dist/Dialog/index.d.ts +9 -7
- package/dist/Dialog/index.js +2 -0
- package/dist/Display/Display.Accordion.d.ts +18 -0
- package/dist/Display/Display.Accordion.js +22 -0
- package/dist/Display/Display.AvatarGroup.d.ts +12 -0
- package/dist/Display/Display.AvatarGroup.js +23 -0
- package/dist/Display/Display.Badge.d.ts +1 -1
- package/dist/Display/Display.Card.d.ts +46 -0
- package/dist/Display/Display.Card.js +36 -0
- package/dist/Display/Display.Carousel.d.ts +13 -0
- package/dist/Display/Display.Carousel.js +19 -0
- package/dist/Display/Display.Chip.d.ts +105 -0
- package/dist/Display/Display.Chip.js +45 -0
- package/dist/Display/Display.CopyableText.d.ts +1 -1
- package/dist/Display/Display.CountRecords.d.ts +1 -1
- package/dist/Display/Display.DataTable.d.ts +19 -0
- package/dist/Display/Display.DataTable.js +22 -0
- package/dist/Display/Display.Date.d.ts +15 -2
- package/dist/Display/Display.Date.js +34 -4
- package/dist/Display/Display.Divider.d.ts +1 -1
- package/dist/Display/Display.IconBadge.d.ts +13 -0
- package/dist/Display/Display.IconBadge.js +30 -0
- package/dist/Display/Display.Image.d.ts +15 -0
- package/dist/Display/Display.Image.js +17 -0
- package/dist/Display/Display.KeyValue.d.ts +10 -0
- package/dist/Display/Display.KeyValue.js +9 -0
- package/dist/Display/Display.ListItem.d.ts +13 -0
- package/dist/Display/Display.ListItem.js +14 -0
- package/dist/Display/Display.Logo.js +3 -1
- package/dist/Display/Display.MediaCard.d.ts +17 -0
- package/dist/Display/Display.MediaCard.js +12 -0
- package/dist/Display/Display.MediaEmbed.d.ts +19 -0
- package/dist/Display/Display.MediaEmbed.js +39 -0
- package/dist/Display/Display.MenuButton.d.ts +1 -1
- package/dist/Display/Display.Monetary.d.ts +1 -1
- package/dist/Display/Display.PriceTag.d.ts +10 -0
- package/dist/Display/Display.PriceTag.js +23 -0
- package/dist/Display/Display.ProductCard.d.ts +17 -0
- package/dist/Display/Display.ProductCard.js +13 -0
- package/dist/Display/Display.Rating.d.ts +11 -0
- package/dist/Display/Display.Rating.js +16 -0
- package/dist/Display/Display.SearchHistory.d.ts +12 -0
- package/dist/Display/Display.SearchHistory.js +13 -0
- package/dist/Display/Display.SectionHeader.d.ts +13 -0
- package/dist/Display/Display.SectionHeader.js +9 -0
- package/dist/Display/Display.Stat.d.ts +10 -0
- package/dist/Display/Display.Stat.js +9 -0
- package/dist/Display/Display.StatCard.d.ts +14 -0
- package/dist/Display/Display.StatCard.js +13 -0
- package/dist/Display/Display.StatusDot.d.ts +11 -0
- package/dist/Display/Display.StatusDot.js +28 -0
- package/dist/Display/Display.Story.d.ts +15 -0
- package/dist/Display/Display.Story.js +43 -0
- package/dist/Display/Display.StoryTray.d.ts +26 -0
- package/dist/Display/Display.StoryTray.js +43 -0
- package/dist/Display/Display.StoryViewer.d.ts +26 -0
- package/dist/Display/Display.StoryViewer.js +79 -0
- package/dist/Display/Display.SwipeableRow.d.ts +15 -0
- package/dist/Display/Display.SwipeableRow.js +28 -0
- package/dist/Display/Display.Tag.d.ts +11 -0
- package/dist/Display/Display.Tag.js +9 -0
- package/dist/Display/Display.Timeline.d.ts +13 -0
- package/dist/Display/Display.Timeline.js +19 -0
- package/dist/Display/Display.Tooltip.d.ts +10 -0
- package/dist/Display/Display.Tooltip.js +24 -0
- package/dist/Display/index.d.ts +66 -0
- package/dist/Display/index.js +54 -0
- package/dist/Feedback/ErrorBoundary.d.ts +1 -1
- package/dist/Feedback/Feedback.Banner.d.ts +82 -0
- package/dist/Feedback/Feedback.Banner.js +35 -0
- package/dist/Feedback/Feedback.DomainSplashScreen.d.ts +2 -1
- package/dist/Feedback/Feedback.DomainSplashScreen.js +1 -1
- package/dist/Feedback/Feedback.Empty.d.ts +1 -1
- package/dist/Feedback/Feedback.EmptyState.d.ts +15 -0
- package/dist/Feedback/Feedback.EmptyState.js +11 -0
- package/dist/Feedback/Feedback.Error.d.ts +1 -1
- package/dist/Feedback/Feedback.Loading.d.ts +2 -1
- package/dist/Feedback/Feedback.PermissionCard.d.ts +15 -0
- package/dist/Feedback/Feedback.PermissionCard.js +11 -0
- package/dist/Feedback/Feedback.Progress.d.ts +9 -0
- package/dist/Feedback/Feedback.Progress.js +35 -0
- package/dist/Feedback/Feedback.ProgressCircle.d.ts +12 -0
- package/dist/Feedback/Feedback.ProgressCircle.js +15 -0
- package/dist/Feedback/Feedback.Skeleton.d.ts +11 -0
- package/dist/Feedback/Feedback.Skeleton.js +29 -0
- package/dist/Feedback/Feedback.Splash.d.ts +1 -1
- package/dist/Feedback/Toast.context.d.ts +35 -0
- package/dist/Feedback/Toast.context.js +119 -0
- package/dist/Feedback/index.d.ts +15 -0
- package/dist/Feedback/index.js +15 -0
- package/dist/Form/Form.Button.d.ts +6 -0
- package/dist/Form/Form.Button.js +12 -1
- package/dist/Form/Form.Checkbox.d.ts +1 -1
- package/dist/Form/Form.ControlledCheckbox.d.ts +1 -1
- package/dist/Form/Form.ControlledInput.d.ts +1 -1
- package/dist/Form/Form.ControlledMonetaryInput.d.ts +1 -1
- package/dist/Form/Form.ControlledRadioButton.d.ts +1 -1
- package/dist/Form/Form.DatePicker.d.ts +20 -0
- package/dist/Form/Form.DatePicker.js +38 -0
- package/dist/Form/Form.Dropdown.d.ts +1 -1
- package/dist/Form/Form.FAB.d.ts +10 -0
- package/dist/Form/Form.FAB.js +17 -0
- package/dist/Form/Form.FilterButton.d.ts +1 -1
- package/dist/Form/Form.FractionalQuantityInput.d.ts +1 -1
- package/dist/Form/Form.IconButton.d.ts +1 -1
- package/dist/Form/Form.Input.d.ts +2 -1
- package/dist/Form/Form.MonetaryInput.d.ts +1 -1
- package/dist/Form/Form.PinInput.d.ts +12 -0
- package/dist/Form/Form.PinInput.js +23 -0
- package/dist/Form/Form.QuantitySelector.d.ts +2 -1
- package/dist/Form/Form.QuantitySelector.js +1 -1
- package/dist/Form/Form.RadioButton.d.ts +1 -1
- package/dist/Form/Form.SearchBar.d.ts +6 -1
- package/dist/Form/Form.SearchBar.js +4 -0
- package/dist/Form/Form.Select.d.ts +17 -0
- package/dist/Form/Form.Select.js +26 -0
- package/dist/Form/Form.Slider.d.ts +20 -0
- package/dist/Form/Form.Slider.js +16 -0
- package/dist/Form/Form.Switch.d.ts +10 -0
- package/dist/Form/Form.Switch.js +9 -0
- package/dist/Form/index.d.ts +12 -0
- package/dist/Form/index.js +12 -0
- package/dist/Navigation/Navigation.AppBar.d.ts +41 -0
- package/dist/Navigation/Navigation.AppBar.js +33 -0
- package/dist/Navigation/Navigation.BottomNav.d.ts +29 -0
- package/dist/Navigation/Navigation.BottomNav.js +35 -0
- package/dist/Navigation/Navigation.CollapsingHeader.d.ts +34 -0
- package/dist/Navigation/Navigation.CollapsingHeader.js +47 -0
- package/dist/Navigation/Navigation.FloatingBar.d.ts +15 -0
- package/dist/Navigation/Navigation.FloatingBar.js +21 -0
- package/dist/Navigation/Navigation.Header.d.ts +6 -2
- package/dist/Navigation/Navigation.Header.js +4 -0
- package/dist/Navigation/Navigation.HeaderToolbar.d.ts +1 -1
- package/dist/Navigation/Navigation.Menu.d.ts +21 -0
- package/dist/Navigation/Navigation.Menu.js +42 -0
- package/dist/Navigation/Navigation.RowItem.d.ts +1 -1
- package/dist/Navigation/Navigation.SearchBar.d.ts +18 -0
- package/dist/Navigation/Navigation.SearchBar.js +22 -0
- package/dist/Navigation/Navigation.SegmentedControl.d.ts +14 -0
- package/dist/Navigation/Navigation.SegmentedControl.js +13 -0
- package/dist/Navigation/Navigation.Steps.d.ts +8 -0
- package/dist/Navigation/Navigation.Steps.js +17 -0
- package/dist/Navigation/Navigation.TabIcon.d.ts +1 -1
- package/dist/Navigation/Navigation.Tabs.d.ts +28 -0
- package/dist/Navigation/Navigation.Tabs.js +45 -0
- package/dist/Navigation/index.d.ts +32 -1
- package/dist/Navigation/index.js +18 -0
- package/dist/Typography/Typography.Text.d.ts +2 -1
- package/dist/branding.d.ts +6 -0
- package/dist/branding.js +7 -0
- package/dist/icons/ArrowDownIcon.d.ts +2 -1
- package/dist/icons/ArrowUpIcon.d.ts +2 -1
- package/dist/icons/CreditIcon.d.ts +1 -1
- package/dist/icons/OdooIcon.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/layouts/AuthContainer.d.ts +1 -1
- package/dist/layouts/Container.d.ts +1 -0
- package/dist/layouts/Container.js +2 -3
- package/dist/layouts/GradientContainer.d.ts +1 -1
- package/dist/layouts/PlainLayout.d.ts +1 -1
- package/dist/layouts/ScrollContainer.d.ts +2 -2
- package/dist/layouts/ScrollContainer.js +1 -1
- package/dist/layouts/TabNavigatorLayout.d.ts +2 -2
- package/dist/layouts/TabNavigatorLayout.js +4 -0
- package/dist/primitives/AspectRatio.d.ts +10 -0
- package/dist/primitives/AspectRatio.js +8 -0
- package/dist/primitives/Box.d.ts +1 -1
- package/dist/primitives/Pressable.d.ts +10 -0
- package/dist/primitives/Pressable.js +9 -0
- package/dist/primitives/Row.d.ts +1 -1
- package/dist/primitives/Spacer.d.ts +8 -0
- package/dist/primitives/Spacer.js +9 -0
- package/dist/primitives/Stack.d.ts +1 -1
- package/dist/primitives/index.d.ts +3 -0
- package/dist/primitives/index.js +3 -0
- package/dist/theme/active.d.ts +2 -0
- package/dist/theme/active.js +13 -0
- package/dist/theme/components/ThemedActivityIndicator.d.ts +1 -1
- package/dist/theme/components/index.d.ts +1 -1
- package/dist/theme/components/index.js +1 -1
- package/dist/theme/dark.d.ts +7 -0
- package/dist/theme/dark.js +84 -0
- package/dist/theme/define.d.ts +5 -5
- package/dist/theme/define.js +5 -5
- package/dist/theme/index.d.ts +3 -1
- package/dist/theme/index.js +3 -1
- package/dist/theme/theme.d.ts +1 -1
- package/dist/theme/theme.js +1 -1
- package/dist/theme/types.d.ts +14 -14
- package/dist/theme/types.js +2 -2
- package/dist/theme/useTheme.d.ts +3 -1
- package/dist/theme/useTheme.js +6 -1
- package/dist/tokens/index.d.ts +2 -0
- package/dist/tokens/index.js +2 -0
- package/dist/tokens/motion.d.ts +71 -0
- package/dist/tokens/motion.js +25 -0
- package/dist/utils/date.d.ts +33 -33
- package/dist/utils/date.js +39 -39
- package/dist/views/AuthFormView.d.ts +1 -1
- package/dist/views/FormViewV2.context.d.ts +1 -1
- package/dist/views/FormViewV2.d.ts +10 -10
- package/dist/views/FormViewV2.js +2 -2
- package/dist/views/ListViewV2.context.d.ts +1 -1
- package/dist/views/ListViewV2.d.ts +20 -20
- package/dist/views/ListViewV2.js +2 -2
- package/dist/views/Wizard/Wizard.context.d.ts +1 -1
- package/dist/widgets/CircleButton.d.ts +6 -2
- package/dist/widgets/CircleButton.js +4 -0
- package/dist/widgets/GeoPermissionCard.d.ts +1 -1
- package/dist/widgets/HomeHeader.d.ts +4 -0
- package/dist/widgets/HomeHeader.js +4 -0
- package/dist/widgets/JSONViewer.d.ts +2 -1
- package/dist/widgets/JSONViewer.js +6 -6
- package/dist/widgets/MenuCard.d.ts +1 -1
- package/dist/widgets/ScreenHeader.d.ts +6 -2
- package/dist/widgets/ScreenHeader.js +15 -4
- package/dist/widgets/TimeZoneSelector.d.ts +1 -1
- package/dist/widgets/TimeZoneSelectorModal.d.ts +1 -1
- package/package.json +38 -25
- package/tailwind.preset.js +14 -0
- package/dist/notifications/index.d.ts +0 -1
- package/dist/notifications/index.js +0 -1
- package/dist/providers/index.d.ts +0 -1
- package/dist/providers/index.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EVariantScreenHeader } from "../widgets/ScreenHeader";
|
|
2
|
-
import { ReactNode } from "react";
|
|
2
|
+
import React, { ReactNode } from "react";
|
|
3
3
|
import { StyleProp, ViewStyle } from "react-native";
|
|
4
4
|
interface ListViewProps<T> {
|
|
5
5
|
name: string;
|
|
@@ -19,43 +19,43 @@ interface ListViewProps<T> {
|
|
|
19
19
|
withContainer?: boolean;
|
|
20
20
|
children: ReactNode;
|
|
21
21
|
}
|
|
22
|
-
declare function ListViewRoot<T>({ name, description, items, isLoading, hasError, errorMessage, readonly, onRefresh, onRetry, onPressItem, onDeleteItem, onSearch, onBack, backgroundColor, withContainer, children, }: ListViewProps<T>):
|
|
22
|
+
declare function ListViewRoot<T>({ name, description, items, isLoading, hasError, errorMessage, readonly, onRefresh, onRetry, onPressItem, onDeleteItem, onSearch, onBack, backgroundColor, withContainer, children, }: ListViewProps<T>): React.JSX.Element;
|
|
23
23
|
declare function Header({ variant, children, }: {
|
|
24
24
|
variant?: EVariantScreenHeader;
|
|
25
25
|
children?: ReactNode;
|
|
26
|
-
}):
|
|
26
|
+
}): React.JSX.Element;
|
|
27
27
|
declare function HeaderSearch({ searchQuery }: {
|
|
28
28
|
searchQuery?: string;
|
|
29
|
-
}):
|
|
29
|
+
}): React.JSX.Element | null;
|
|
30
30
|
declare function HeaderActions({ children }: {
|
|
31
31
|
children: ReactNode;
|
|
32
|
-
}):
|
|
32
|
+
}): React.JSX.Element;
|
|
33
33
|
declare function HeaderFilters({ children }: {
|
|
34
34
|
children: ReactNode;
|
|
35
|
-
}):
|
|
35
|
+
}): React.JSX.Element;
|
|
36
36
|
interface FilterChipProps {
|
|
37
37
|
label: string;
|
|
38
38
|
active?: boolean;
|
|
39
39
|
onPress: () => void;
|
|
40
40
|
}
|
|
41
|
-
declare function FilterChip({ label, active, onPress }: FilterChipProps):
|
|
41
|
+
declare function FilterChip({ label, active, onPress }: FilterChipProps): React.JSX.Element;
|
|
42
42
|
declare function FilterChips({ children }: {
|
|
43
43
|
children: ReactNode;
|
|
44
|
-
}):
|
|
44
|
+
}): React.JSX.Element;
|
|
45
45
|
declare function Content({ children, withMargin, }: {
|
|
46
46
|
children?: (item: any) => ReactNode;
|
|
47
47
|
withMargin?: boolean;
|
|
48
|
-
}):
|
|
48
|
+
}): React.JSX.Element;
|
|
49
49
|
declare function ContentList({ children, contentWithMargin, }: {
|
|
50
50
|
children?: (item: any) => ReactNode;
|
|
51
51
|
contentWithMargin: boolean;
|
|
52
|
-
}):
|
|
52
|
+
}): React.JSX.Element;
|
|
53
53
|
declare function Footer({ children }: {
|
|
54
54
|
children: ReactNode;
|
|
55
|
-
}):
|
|
55
|
+
}): React.JSX.Element | null;
|
|
56
56
|
declare function FloatingButton({ children }: {
|
|
57
57
|
children: ReactNode;
|
|
58
|
-
}):
|
|
58
|
+
}): React.JSX.Element;
|
|
59
59
|
interface RowRootProps {
|
|
60
60
|
children: ReactNode;
|
|
61
61
|
onPress?: () => void;
|
|
@@ -64,45 +64,45 @@ interface RowRootProps {
|
|
|
64
64
|
style?: StyleProp<ViewStyle>;
|
|
65
65
|
backgroundColor?: string;
|
|
66
66
|
}
|
|
67
|
-
declare function RowRoot({ children, onPress, onLongPress, showDivider, style, backgroundColor, }: RowRootProps):
|
|
67
|
+
declare function RowRoot({ children, onPress, onLongPress, showDivider, style, backgroundColor, }: RowRootProps): React.JSX.Element;
|
|
68
68
|
interface RowAvatarProps {
|
|
69
69
|
children: ReactNode;
|
|
70
70
|
style?: StyleProp<ViewStyle>;
|
|
71
71
|
}
|
|
72
|
-
declare function RowAvatar({ children, style }: RowAvatarProps):
|
|
72
|
+
declare function RowAvatar({ children, style }: RowAvatarProps): React.JSX.Element;
|
|
73
73
|
interface RowContentProps {
|
|
74
74
|
children: ReactNode;
|
|
75
75
|
style?: StyleProp<ViewStyle>;
|
|
76
76
|
}
|
|
77
|
-
declare function RowContent({ children, style }: RowContentProps):
|
|
77
|
+
declare function RowContent({ children, style }: RowContentProps): React.JSX.Element;
|
|
78
78
|
interface RowTitleProps {
|
|
79
79
|
children: ReactNode;
|
|
80
80
|
badge?: ReactNode;
|
|
81
81
|
rightComponent?: ReactNode;
|
|
82
82
|
numberOfLines?: number;
|
|
83
83
|
}
|
|
84
|
-
declare function RowTitle({ children, badge, rightComponent, numberOfLines }: RowTitleProps):
|
|
84
|
+
declare function RowTitle({ children, badge, rightComponent, numberOfLines }: RowTitleProps): React.JSX.Element;
|
|
85
85
|
interface RowSubtitleProps {
|
|
86
86
|
children: ReactNode;
|
|
87
87
|
className?: string;
|
|
88
88
|
}
|
|
89
|
-
declare function RowSubtitle({ children, className }: RowSubtitleProps):
|
|
89
|
+
declare function RowSubtitle({ children, className }: RowSubtitleProps): React.JSX.Element;
|
|
90
90
|
interface RowFooterProps {
|
|
91
91
|
left?: ReactNode;
|
|
92
92
|
right?: ReactNode;
|
|
93
93
|
children?: ReactNode;
|
|
94
94
|
}
|
|
95
|
-
declare function RowFooter({ left, right, children }: RowFooterProps):
|
|
95
|
+
declare function RowFooter({ left, right, children }: RowFooterProps): React.JSX.Element;
|
|
96
96
|
interface RowActionsProps {
|
|
97
97
|
children: ReactNode;
|
|
98
98
|
style?: StyleProp<ViewStyle>;
|
|
99
99
|
}
|
|
100
|
-
declare function RowActions({ children, style }: RowActionsProps):
|
|
100
|
+
declare function RowActions({ children, style }: RowActionsProps): React.JSX.Element;
|
|
101
101
|
interface RowActionButtonProps {
|
|
102
102
|
icon: ReactNode;
|
|
103
103
|
onPress?: () => void;
|
|
104
104
|
}
|
|
105
|
-
declare function RowActionButton({ icon, onPress }: RowActionButtonProps):
|
|
105
|
+
declare function RowActionButton({ icon, onPress }: RowActionButtonProps): React.JSX.Element;
|
|
106
106
|
export declare const ListViewV2: {
|
|
107
107
|
Root: typeof ListViewRoot;
|
|
108
108
|
Header: typeof Header & {
|
package/dist/views/ListViewV2.js
CHANGED
|
@@ -9,7 +9,7 @@ import { cn, tv } from "../theme/tw";
|
|
|
9
9
|
import { Typography } from "../Typography";
|
|
10
10
|
import { ListViewProvider, useListView } from "../views/ListViewV2.context";
|
|
11
11
|
import { toRowItems } from "../views/types/IListView";
|
|
12
|
-
import ScreenHeader from "../widgets/ScreenHeader";
|
|
12
|
+
import ScreenHeader, { EVariantScreenHeader } from "../widgets/ScreenHeader";
|
|
13
13
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
14
14
|
import { FlatList, RefreshControl, ScrollView, TouchableOpacity, View, } from "react-native";
|
|
15
15
|
function ListViewRoot({ name, description, items, isLoading = false, hasError = false, errorMessage, readonly = false, onRefresh, onRetry, onPressItem, onDeleteItem, onSearch, onBack, backgroundColor, withContainer = true, children, }) {
|
|
@@ -20,7 +20,7 @@ function ListViewRoot({ name, description, items, isLoading = false, hasError =
|
|
|
20
20
|
// Propagate contentWithMargin to ContentList via context
|
|
21
21
|
return (_jsx(ListViewProvider, { description: description, errorMessage: errorMessage, hasError: hasError, isLoading: isLoading, items: items, name: name, onBack: onBack, onDeleteItem: onDeleteItem, onPressItem: onPressItem, onRefresh: onRefresh, onRetry: onRetry, onSearch: onSearch, readonly: readonly, children: _jsx(ErrorBoundary, { children: _jsx(Wrapper, { ...wrapperProps, children: children }) }) }));
|
|
22
22
|
}
|
|
23
|
-
function Header({ variant =
|
|
23
|
+
function Header({ variant = EVariantScreenHeader.ROUNDED_HEADER, children, }) {
|
|
24
24
|
const { name, description, onBack } = useListView();
|
|
25
25
|
return (_jsx(ScreenHeader, { onBack: onBack, subtitle: description ? description : `Seleccionar ${name}`, title: name, variant: variant, children: children }));
|
|
26
26
|
}
|
|
@@ -22,5 +22,5 @@ export interface WizardProviderProps {
|
|
|
22
22
|
isLoading?: boolean;
|
|
23
23
|
loadingMessage?: string;
|
|
24
24
|
}
|
|
25
|
-
export declare function WizardProvider({ children, initialStep, steps, onComplete, onCancel, isLoading, loadingMessage, }: WizardProviderProps): import("react
|
|
25
|
+
export declare function WizardProvider({ children, initialStep, steps, onComplete, onCancel, isLoading, loadingMessage, }: WizardProviderProps): import("react").JSX.Element;
|
|
26
26
|
export declare function useWizard(): WizardContextValue;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IconType } from "../utils/icon";
|
|
2
|
-
import { ComponentType } from "react";
|
|
2
|
+
import React, { ComponentType } from "react";
|
|
3
3
|
interface CircleButtonProps {
|
|
4
4
|
iconType?: IconType;
|
|
5
5
|
size?: "sm" | "md" | "lg";
|
|
@@ -11,5 +11,9 @@ interface CircleButtonProps {
|
|
|
11
11
|
color?: string;
|
|
12
12
|
}>;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Duplicates the icon-button. Use `Form.IconButton` (general) or
|
|
16
|
+
* `Navigation.AppBar.Action` (headers). Kept for backwards compatibility.
|
|
17
|
+
*/
|
|
18
|
+
export declare function CircleButton({ iconType, size, color, variant, className, customIcon, }: CircleButtonProps): React.JSX.Element;
|
|
15
19
|
export {};
|
|
@@ -31,6 +31,10 @@ const SIZE_MAP = {
|
|
|
31
31
|
md: { container: 60, icon: 30 },
|
|
32
32
|
lg: { container: 80, icon: 40 },
|
|
33
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Duplicates the icon-button. Use `Form.IconButton` (general) or
|
|
36
|
+
* `Navigation.AppBar.Action` (headers). Kept for backwards compatibility.
|
|
37
|
+
*/
|
|
34
38
|
export function CircleButton({ iconType = "ionicons", size = "md", color = theme.text.inverse, variant = "accent", className, customIcon, }) {
|
|
35
39
|
const iconSize = SIZE_MAP[size].icon;
|
|
36
40
|
return (_jsx(View, { className: cn(circleButtonVariants({ size, variant }), className), children: _jsx(Display.Icon, { color: color, customIcon: customIcon, size: iconSize, type: iconType }) }));
|
|
@@ -4,5 +4,5 @@ interface GeoPermissionCardProps {
|
|
|
4
4
|
loading?: boolean;
|
|
5
5
|
handleRequestPermission?: () => void;
|
|
6
6
|
}
|
|
7
|
-
declare function GeoPermissionCard({ title, loading, handleRequestPermission, hasPermission, }: GeoPermissionCardProps): import("react
|
|
7
|
+
declare function GeoPermissionCard({ title, loading, handleRequestPermission, hasPermission, }: GeoPermissionCardProps): import("react").JSX.Element;
|
|
8
8
|
export default GeoPermissionCard;
|
|
@@ -7,5 +7,9 @@ interface HomeHeaderProps {
|
|
|
7
7
|
readonly backButton?: boolean;
|
|
8
8
|
readonly onBack?: () => void;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Legacy style (gradient). For new top bars use `Navigation.AppBar`.
|
|
12
|
+
* Kept for backwards compatibility.
|
|
13
|
+
*/
|
|
10
14
|
export declare const HomeHeader: React.FC<HomeHeaderProps>;
|
|
11
15
|
export {};
|
|
@@ -3,6 +3,10 @@ import { Display, Typography } from "../index";
|
|
|
3
3
|
import GradientContainer from "../layouts/GradientContainer";
|
|
4
4
|
import { theme } from "../theme";
|
|
5
5
|
import { TouchableOpacity, View } from "react-native";
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Legacy style (gradient). For new top bars use `Navigation.AppBar`.
|
|
8
|
+
* Kept for backwards compatibility.
|
|
9
|
+
*/
|
|
6
10
|
export const HomeHeader = ({ title = "Distribución", logo, logoSource, backButton = false, onBack, }) => {
|
|
7
11
|
const handleBackPress = onBack ?? (() => { });
|
|
8
12
|
return (_jsx(GradientContainer, { className: "pt-10 pb-4 px-4", children: _jsxs(View, { className: "relative items-center justify-center", children: [backButton && (_jsx(TouchableOpacity, { className: "absolute top-0 left-0 z-10 border border-text-inverse p-1.5 rounded", onPress: handleBackPress, children: _jsx(Display.Icon, { color: theme.text.inverse, name: "chevron-back", size: 25, type: "ionicons" }) })), _jsxs(View, { className: "items-center justify-center", children: [logo || _jsx(Display.Logo, { size: "medium", source: logoSource }), !!title && (_jsx(Typography.Text, { className: "text-text-inverse", variant: "h4", children: title }))] })] }) }));
|
|
@@ -35,7 +35,7 @@ const JSON_COLORS = {
|
|
|
35
35
|
const MAX_JSON_SIZE = 500_000; // 500KB límite
|
|
36
36
|
const MAX_LINES = 500; // Máximo 500 líneas con colores
|
|
37
37
|
function parseJsonToColoredLines(jsonString) {
|
|
38
|
-
//
|
|
38
|
+
// Guard 1: check size
|
|
39
39
|
if (jsonString.length > MAX_JSON_SIZE) {
|
|
40
40
|
return [
|
|
41
41
|
{
|
|
@@ -47,7 +47,7 @@ function parseJsonToColoredLines(jsonString) {
|
|
|
47
47
|
];
|
|
48
48
|
}
|
|
49
49
|
const lines = jsonString.split("\n");
|
|
50
|
-
//
|
|
50
|
+
// Guard 2: check line count
|
|
51
51
|
if (lines.length > MAX_LINES) {
|
|
52
52
|
return [
|
|
53
53
|
{
|
|
@@ -98,7 +98,7 @@ function parseJsonToColoredLines(jsonString) {
|
|
|
98
98
|
}
|
|
99
99
|
const JsonPreview = ({ selectedJson }) => {
|
|
100
100
|
const [isProcessing, setIsProcessing] = useState(false);
|
|
101
|
-
//
|
|
101
|
+
// Guard 3: format with a robust try-catch
|
|
102
102
|
const formattedJson = useMemo(() => {
|
|
103
103
|
if (!selectedJson || selectedJson.trim() === "") {
|
|
104
104
|
return "{}";
|
|
@@ -113,7 +113,7 @@ const JsonPreview = ({ selectedJson }) => {
|
|
|
113
113
|
return selectedJson; // Mostrar original si falla
|
|
114
114
|
}
|
|
115
115
|
}, [selectedJson]);
|
|
116
|
-
//
|
|
116
|
+
// Guard 4: colorize with processing control
|
|
117
117
|
const coloredLines = useMemo(() => {
|
|
118
118
|
setIsProcessing(true);
|
|
119
119
|
try {
|
|
@@ -125,11 +125,11 @@ const JsonPreview = ({ selectedJson }) => {
|
|
|
125
125
|
return [{ text: formattedJson, color: "#333333" }];
|
|
126
126
|
}
|
|
127
127
|
finally {
|
|
128
|
-
//
|
|
128
|
+
// Small delay so the loading state is visible if needed
|
|
129
129
|
setTimeout(() => setIsProcessing(false), 50);
|
|
130
130
|
}
|
|
131
131
|
}, [formattedJson]);
|
|
132
|
-
//
|
|
132
|
+
// Guard 5: show loading while processing large JSON
|
|
133
133
|
if (isProcessing && formattedJson.length > 50_000) {
|
|
134
134
|
return (_jsxs(View, { className: "p-4 items-center justify-center min-h-[200px]", children: [_jsx(ThemedActivityIndicator, { size: "large" }), _jsx(Text, { className: "mt-2 text-text-secondary text-sm", children: "Procesando JSON..." })] }));
|
|
135
135
|
}
|
|
@@ -9,5 +9,5 @@ interface MenuCardProps {
|
|
|
9
9
|
color?: string;
|
|
10
10
|
}>;
|
|
11
11
|
}
|
|
12
|
-
export declare function MenuCard({ title, iconType, onPress, customIcon, }: MenuCardProps): import("react
|
|
12
|
+
export declare function MenuCard({ title, iconType, onPress, customIcon, }: MenuCardProps): import("react").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ImageSourcePropType } from "react-native";
|
|
2
|
-
export declare
|
|
2
|
+
export declare enum EVariantScreenHeader {
|
|
3
3
|
FLAT_HEADER = "FLAT_HEADER",
|
|
4
4
|
ROUNDED_HEADER = "ROUNDED_HEADER",
|
|
5
5
|
LOGO_WITH_BACK_BUTTON = "LOGO_WITH_BACK_BUTTON",
|
|
@@ -17,5 +17,9 @@ interface ScreenHeaderProps {
|
|
|
17
17
|
withGradientContainer?: boolean;
|
|
18
18
|
onBack?: () => void;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Legacy style (gradient variants). For new top bars use
|
|
22
|
+
* `Navigation.AppBar` (flat). Kept for backwards compatibility (used by FormViewV2/ListViewV2).
|
|
23
|
+
*/
|
|
24
|
+
declare function ScreenHeader({ variant, title, subtitle, logoSource, onBack, children, }: ScreenHeaderProps): import("react").JSX.Element | null;
|
|
21
25
|
export default ScreenHeader;
|
|
@@ -4,15 +4,26 @@ import { Navigation } from "../Navigation";
|
|
|
4
4
|
import { View } from "react-native";
|
|
5
5
|
const Header = Navigation.Header;
|
|
6
6
|
const HeaderToolbar = Navigation.HeaderToolbar;
|
|
7
|
+
export var EVariantScreenHeader;
|
|
8
|
+
(function (EVariantScreenHeader) {
|
|
9
|
+
EVariantScreenHeader["FLAT_HEADER"] = "FLAT_HEADER";
|
|
10
|
+
EVariantScreenHeader["ROUNDED_HEADER"] = "ROUNDED_HEADER";
|
|
11
|
+
EVariantScreenHeader["LOGO_WITH_BACK_BUTTON"] = "LOGO_WITH_BACK_BUTTON";
|
|
12
|
+
EVariantScreenHeader["ONLY_LOGO"] = "ONLY_LOGO";
|
|
13
|
+
})(EVariantScreenHeader || (EVariantScreenHeader = {}));
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Legacy style (gradient variants). For new top bars use
|
|
16
|
+
* `Navigation.AppBar` (flat). Kept for backwards compatibility (used by FormViewV2/ListViewV2).
|
|
17
|
+
*/
|
|
7
18
|
function ScreenHeader({ variant, title = "Distribución", subtitle, logoSource, onBack, children, }) {
|
|
8
19
|
switch (variant) {
|
|
9
|
-
case
|
|
20
|
+
case EVariantScreenHeader.FLAT_HEADER:
|
|
10
21
|
return (_jsxs(_Fragment, { children: [_jsx(HeaderToolbar, { flat: true, onBack: onBack, subtitle: subtitle, title: title, withBackground: true }), _jsx(View, { children: children })] }));
|
|
11
|
-
case
|
|
22
|
+
case EVariantScreenHeader.ROUNDED_HEADER:
|
|
12
23
|
return (_jsx(GradientContainer, { className: "pt-0.5 shadow-lg shadow-black/70 rounded-b-[18px] pb-6", children: _jsx(HeaderToolbar, { flat: true, onBack: onBack, subtitle: subtitle, title: title, withBackground: false, children: children }) }));
|
|
13
|
-
case
|
|
24
|
+
case EVariantScreenHeader.LOGO_WITH_BACK_BUTTON:
|
|
14
25
|
return (_jsx(Header, { backButton: true, handleBackButton: onBack, logoSource: logoSource, title: "" }));
|
|
15
|
-
case
|
|
26
|
+
case EVariantScreenHeader.ONLY_LOGO:
|
|
16
27
|
return _jsx(Header, { logoSource: logoSource, title: title });
|
|
17
28
|
default:
|
|
18
29
|
return null;
|
|
@@ -3,5 +3,5 @@ interface TimeZoneSelectorProps {
|
|
|
3
3
|
onSelect?: (tz: TimezoneLocale) => void;
|
|
4
4
|
timezone?: string | null;
|
|
5
5
|
}
|
|
6
|
-
export declare function TimeZoneSelector({ onSelect, timezone }: TimeZoneSelectorProps): import("react
|
|
6
|
+
export declare function TimeZoneSelector({ onSelect, timezone }: TimeZoneSelectorProps): import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -5,5 +5,5 @@ interface TimeZoneSelectorModalProps {
|
|
|
5
5
|
onSelect: (tz: TimezoneLocale) => void;
|
|
6
6
|
currentTimezone?: string | null;
|
|
7
7
|
}
|
|
8
|
-
declare function TimeZoneSelectorModal({ visible, onClose, onSelect, currentTimezone, }: TimeZoneSelectorModalProps): import("react
|
|
8
|
+
declare function TimeZoneSelectorModal({ visible, onClose, onSelect, currentTimezone, }: TimeZoneSelectorModalProps): import("react").JSX.Element;
|
|
9
9
|
export { TimeZoneSelectorModal };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sincpro/mobile-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Sincpro Mobile design system: generic, presentational React Native components (no domain logic)",
|
|
5
5
|
"main": "expo/AppEntry.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -17,12 +17,14 @@
|
|
|
17
17
|
"./theme": "./dist/theme/index.js",
|
|
18
18
|
"./Dialog": "./dist/Dialog/index.js",
|
|
19
19
|
"./Dialog/BottomSheet": "./dist/Dialog/BottomSheet/index.js",
|
|
20
|
+
"./Dialog/Sheet": "./dist/Dialog/Dialog.Sheet.js",
|
|
20
21
|
"./Display": "./dist/Display/index.js",
|
|
21
22
|
"./Feedback": "./dist/Feedback/index.js",
|
|
22
23
|
"./Form": "./dist/Form/index.js",
|
|
23
24
|
"./Navigation": "./dist/Navigation/index.js",
|
|
24
25
|
"./Typography": "./dist/Typography/index.js",
|
|
25
26
|
"./primitives": "./dist/primitives/index.js",
|
|
27
|
+
"./tokens": "./dist/tokens/index.js",
|
|
26
28
|
"./widgets": "./dist/widgets/index.js",
|
|
27
29
|
"./views/Wizard": "./dist/views/Wizard/index.js",
|
|
28
30
|
"./tailwind.preset": "./tailwind.preset.js",
|
|
@@ -46,6 +48,7 @@
|
|
|
46
48
|
"license": "MIT",
|
|
47
49
|
"peerDependencies": {
|
|
48
50
|
"@expo-google-fonts/montserrat": "*",
|
|
51
|
+
"@expo/ui": "*",
|
|
49
52
|
"@expo/vector-icons": "*",
|
|
50
53
|
"expo-checkbox": "*",
|
|
51
54
|
"expo-clipboard": "*",
|
|
@@ -60,7 +63,14 @@
|
|
|
60
63
|
"react-native-reanimated": "*",
|
|
61
64
|
"react-native-safe-area-context": "*",
|
|
62
65
|
"react-native-svg": "*",
|
|
63
|
-
"react-native-worklets": "*"
|
|
66
|
+
"react-native-worklets": "*",
|
|
67
|
+
"@react-native-community/slider": "*",
|
|
68
|
+
"@react-native-community/datetimepicker": "*"
|
|
69
|
+
},
|
|
70
|
+
"peerDependenciesMeta": {
|
|
71
|
+
"@expo/ui": {
|
|
72
|
+
"optional": true
|
|
73
|
+
}
|
|
64
74
|
},
|
|
65
75
|
"dependencies": {
|
|
66
76
|
"big.js": "^7.0.1",
|
|
@@ -72,43 +82,46 @@
|
|
|
72
82
|
"devDependencies": {
|
|
73
83
|
"@expo-google-fonts/montserrat": "^0.4.2",
|
|
74
84
|
"@expo/vector-icons": "^15.0.3",
|
|
75
|
-
"@gorhom/bottom-sheet": "^5",
|
|
76
85
|
"@react-native-async-storage/async-storage": "^2",
|
|
77
|
-
"@react-native-community/datetimepicker": "
|
|
78
|
-
"@storybook/addon-ondevice-actions": "^10.4.
|
|
79
|
-
"@storybook/addon-ondevice-controls": "^10.4.
|
|
80
|
-
"@storybook/react-native": "^10.4.
|
|
86
|
+
"@react-native-community/datetimepicker": "9.1.0",
|
|
87
|
+
"@storybook/addon-ondevice-actions": "^10.4.6",
|
|
88
|
+
"@storybook/addon-ondevice-controls": "^10.4.6",
|
|
89
|
+
"@storybook/react-native": "^10.4.6",
|
|
81
90
|
"@types/big.js": "^6.2.2",
|
|
82
|
-
"@types/react": "~19.
|
|
91
|
+
"@types/react": "~19.2.14",
|
|
83
92
|
"babel-plugin-module-resolver": "^5.0.3",
|
|
84
93
|
"eslint": "^9.35.0",
|
|
85
|
-
"eslint-config-expo": "~
|
|
94
|
+
"eslint-config-expo": "~56.0.4",
|
|
86
95
|
"eslint-config-prettier": "^10.1.8",
|
|
87
96
|
"eslint-plugin-prettier": "^5.5.4",
|
|
88
97
|
"eslint-plugin-react": "^7.37.2",
|
|
89
98
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
90
|
-
"expo": "
|
|
91
|
-
"expo-checkbox": "~
|
|
92
|
-
"expo-clipboard": "~
|
|
93
|
-
"expo-
|
|
94
|
-
"expo-
|
|
95
|
-
"expo-
|
|
99
|
+
"expo": "^56.0.0",
|
|
100
|
+
"expo-checkbox": "~56.0.1",
|
|
101
|
+
"expo-clipboard": "~56.0.4",
|
|
102
|
+
"expo-font": "~56.0.7",
|
|
103
|
+
"expo-linear-gradient": "~56.0.4",
|
|
104
|
+
"expo-localization": "~56.0.6",
|
|
105
|
+
"expo-status-bar": "~56.0.4",
|
|
96
106
|
"nativewind": "^4.0.1",
|
|
107
|
+
"patch-package": "^8.0.1",
|
|
97
108
|
"prettier": "^3.6.2",
|
|
98
|
-
"react": "19.
|
|
109
|
+
"react": "19.2.3",
|
|
99
110
|
"react-hook-form": "^7.62.0",
|
|
100
|
-
"react-native": "0.
|
|
111
|
+
"react-native": "0.85.3",
|
|
101
112
|
"react-native-currency-input": "^1.1.1",
|
|
102
|
-
"react-native-gesture-handler": "~2.
|
|
103
|
-
"react-native-keyboard-controller": "1.
|
|
104
|
-
"react-native-reanimated": "
|
|
105
|
-
"react-native-safe-area-context": "~5.
|
|
106
|
-
"react-native-svg": "15.
|
|
107
|
-
"react-native-worklets": "0.
|
|
108
|
-
"storybook": "^10.4.
|
|
113
|
+
"react-native-gesture-handler": "~2.31.1",
|
|
114
|
+
"react-native-keyboard-controller": "1.21.6",
|
|
115
|
+
"react-native-reanimated": "4.3.1",
|
|
116
|
+
"react-native-safe-area-context": "~5.7.0",
|
|
117
|
+
"react-native-svg": "15.15.4",
|
|
118
|
+
"react-native-worklets": "0.8.3",
|
|
119
|
+
"storybook": "^10.4.6",
|
|
109
120
|
"tailwindcss": "^3.4.17",
|
|
110
121
|
"tsc-alias": "^1.8.17",
|
|
111
|
-
"typescript": "~
|
|
122
|
+
"typescript": "~6.0.3",
|
|
123
|
+
"@expo/ui": "~56.0.18",
|
|
124
|
+
"@react-native-community/slider": "5.2.0"
|
|
112
125
|
},
|
|
113
126
|
"scripts": {
|
|
114
127
|
"start": "expo start",
|
package/tailwind.preset.js
CHANGED
|
@@ -140,6 +140,20 @@ module.exports = {
|
|
|
140
140
|
"2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
|
|
141
141
|
none: "none",
|
|
142
142
|
},
|
|
143
|
+
// Escala semántica de layering (NativeWind-first): clases z-dropdown, z-modal,
|
|
144
|
+
// z-toast… para evitar números mágicos. No reemplaza z-0..50 de Tailwind.
|
|
145
|
+
zIndex: {
|
|
146
|
+
base: "0",
|
|
147
|
+
raised: "10",
|
|
148
|
+
dropdown: "1000",
|
|
149
|
+
sticky: "1100",
|
|
150
|
+
header: "1200",
|
|
151
|
+
overlay: "1300",
|
|
152
|
+
modal: "1400",
|
|
153
|
+
popover: "1500",
|
|
154
|
+
toast: "1600",
|
|
155
|
+
tooltip: "1700",
|
|
156
|
+
},
|
|
143
157
|
},
|
|
144
158
|
},
|
|
145
159
|
plugins: [],
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/providers/index.js
DELETED