@sincpro/mobile-ui 0.7.1 → 1.0.1
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 +7 -5
- package/dist/Actions/Actions.Button.d.ts +91 -91
- package/dist/Actions/Actions.Button.js +36 -43
- package/dist/Actions/Actions.FAB.js +5 -5
- package/dist/Actions/Actions.FilterButton.js +3 -3
- package/dist/Actions/Actions.IconButton.d.ts +31 -31
- package/dist/Actions/Actions.IconButton.js +4 -4
- package/dist/Actions/index.d.ts +11 -11
- package/dist/Actions/index.js +5 -5
- package/dist/Dialog/BottomSheet/BottomSheet.Root.js +1 -1
- package/dist/Dialog/BottomSheet/index.d.ts +1 -1
- package/dist/Dialog/BottomSheet/index.js +1 -1
- package/dist/Dialog/Confirmation.context.js +3 -3
- package/dist/Dialog/Dialog.ActionSheet.js +26 -10
- package/dist/Dialog/Dialog.Confirmation.js +5 -5
- package/dist/Dialog/Dialog.EditValue.js +4 -4
- package/dist/Dialog/Dialog.Sheet.js +19 -8
- package/dist/Dialog/index.d.ts +5 -5
- package/dist/Dialog/index.js +5 -5
- package/dist/Display/Display.Accordion.js +5 -5
- package/dist/Display/Display.Avatar.d.ts +30 -30
- package/dist/Display/Display.Avatar.js +2 -2
- package/dist/Display/Display.AvatarGroup.js +3 -3
- package/dist/Display/Display.Badge.d.ts +3 -3
- package/dist/Display/Display.Badge.js +1 -1
- package/dist/Display/Display.Card.d.ts +15 -15
- package/dist/Display/Display.Card.js +4 -4
- package/dist/Display/Display.Carousel.js +2 -2
- package/dist/Display/Display.Chip.d.ts +3 -3
- package/dist/Display/Display.Chip.js +12 -12
- package/dist/Display/Display.CircleButton.d.ts +1 -1
- package/dist/Display/Display.CircleButton.js +3 -3
- package/dist/Display/Display.CopyableText.js +2 -2
- package/dist/Display/Display.CountRecords.js +2 -2
- package/dist/Display/Display.DataTable.js +2 -2
- package/dist/Display/Display.Date.d.ts +1 -1
- package/dist/Display/Display.Date.js +5 -5
- package/dist/Display/Display.Divider.d.ts +24 -24
- package/dist/Display/Display.Divider.js +1 -1
- package/dist/Display/Display.GradientSurface.d.ts +58 -39
- package/dist/Display/Display.GradientSurface.js +31 -15
- package/dist/Display/Display.Icon.d.ts +1 -1
- package/dist/Display/Display.Icon.js +1 -1
- package/dist/Display/Display.IconBadge.js +3 -3
- package/dist/Display/Display.Image.js +4 -4
- package/dist/Display/Display.KeyValue.js +2 -2
- package/dist/Display/Display.ListItem.js +5 -5
- package/dist/Display/Display.Logo.d.ts +3 -3
- package/dist/Display/Display.Logo.js +2 -2
- package/dist/Display/Display.MediaCard.js +4 -4
- package/dist/Display/Display.MediaEmbed.js +7 -7
- package/dist/Display/Display.MenuButton.d.ts +4 -4
- package/dist/Display/Display.MenuButton.js +6 -6
- package/dist/Display/Display.MenuCard.d.ts +1 -1
- package/dist/Display/Display.MenuCard.js +3 -3
- package/dist/Display/Display.MenuGrid.d.ts +1 -1
- package/dist/Display/Display.MenuGrid.js +1 -1
- package/dist/Display/Display.Monetary.d.ts +1 -1
- package/dist/Display/Display.Monetary.js +2 -2
- package/dist/Display/Display.Pattern.d.ts +33 -12
- package/dist/Display/Display.Pattern.js +60 -14
- package/dist/Display/Display.PriceTag.js +2 -2
- package/dist/Display/Display.ProductCard.js +7 -7
- package/dist/Display/Display.Rating.js +3 -3
- package/dist/Display/Display.SearchHistory.js +6 -6
- package/dist/Display/Display.SectionHeader.js +4 -4
- package/dist/Display/Display.Stat.js +2 -2
- package/dist/Display/Display.StatCard.js +4 -4
- package/dist/Display/Display.StatusDot.js +3 -3
- package/dist/Display/Display.Story.js +3 -3
- package/dist/Display/Display.StoryTray.js +5 -5
- package/dist/Display/Display.StoryViewer.js +4 -4
- package/dist/Display/Display.SwipeableRow.js +4 -4
- package/dist/Display/Display.Tag.js +2 -2
- package/dist/Display/Display.Timeline.js +4 -4
- package/dist/Display/Display.Tooltip.js +3 -3
- package/dist/Display/index.d.ts +45 -45
- package/dist/Display/index.js +42 -42
- package/dist/Feedback/ErrorBoundary.d.ts +1 -1
- package/dist/Feedback/ErrorBoundary.js +1 -1
- package/dist/Feedback/Feedback.Banner.d.ts +3 -3
- package/dist/Feedback/Feedback.Banner.js +5 -5
- package/dist/Feedback/Feedback.DomainSplashScreen.js +5 -4
- package/dist/Feedback/Feedback.Empty.js +3 -3
- package/dist/Feedback/Feedback.EmptyState.js +5 -5
- package/dist/Feedback/Feedback.Error.js +4 -4
- package/dist/Feedback/Feedback.Loading.d.ts +1 -1
- package/dist/Feedback/Feedback.Loading.js +2 -2
- package/dist/Feedback/Feedback.PermissionCard.js +5 -5
- package/dist/Feedback/Feedback.Progress.js +6 -4
- package/dist/Feedback/Feedback.ProgressCircle.js +1 -1
- package/dist/Feedback/Feedback.Skeleton.js +5 -4
- package/dist/Feedback/Feedback.Spinner.js +3 -3
- package/dist/Feedback/Feedback.Splash.d.ts +1 -1
- package/dist/Feedback/Feedback.Splash.js +7 -6
- package/dist/Feedback/Toast.context.js +7 -7
- package/dist/Feedback/index.d.ts +13 -13
- package/dist/Feedback/index.js +13 -13
- package/dist/Form/Form.Button.d.ts +2 -2
- package/dist/Form/Form.Button.js +1 -1
- package/dist/Form/Form.Checkbox.js +4 -4
- package/dist/Form/Form.ControlledCheckbox.js +1 -1
- package/dist/Form/Form.ControlledInput.js +1 -1
- package/dist/Form/Form.ControlledMonetaryInput.js +1 -1
- package/dist/Form/Form.ControlledRadioButton.js +1 -1
- package/dist/Form/Form.DatePicker.js +5 -5
- package/dist/Form/Form.Dropdown.js +8 -8
- package/dist/Form/Form.FAB.d.ts +2 -2
- package/dist/Form/Form.FAB.js +1 -1
- package/dist/Form/Form.FilterButton.d.ts +2 -2
- package/dist/Form/Form.FilterButton.js +1 -1
- package/dist/Form/Form.FractionalQuantityInput.js +4 -4
- package/dist/Form/Form.IconButton.d.ts +2 -2
- package/dist/Form/Form.IconButton.js +1 -1
- package/dist/Form/Form.Input.js +4 -4
- package/dist/Form/Form.InputField.d.ts +1 -1
- package/dist/Form/Form.InputField.js +3 -3
- package/dist/Form/Form.MonetaryInput.js +5 -4
- package/dist/Form/Form.PasswordInput.d.ts +1 -1
- package/dist/Form/Form.PasswordInput.js +3 -3
- package/dist/Form/Form.PinInput.js +5 -5
- package/dist/Form/Form.QuantitySelector.js +3 -3
- package/dist/Form/Form.RadioButton.js +4 -4
- package/dist/Form/Form.SearchBar.js +4 -4
- package/dist/Form/Form.Select.js +33 -18
- package/dist/Form/Form.Slider.js +3 -3
- package/dist/Form/Form.Switch.js +4 -4
- package/dist/Form/Form.TextInput.js +3 -3
- package/dist/Form/index.d.ts +27 -27
- package/dist/Form/index.js +25 -25
- package/dist/Navigation/Navigation.AppBar.d.ts +5 -4
- package/dist/Navigation/Navigation.AppBar.js +10 -10
- package/dist/Navigation/Navigation.BottomNav.d.ts +1 -1
- package/dist/Navigation/Navigation.BottomNav.js +25 -16
- package/dist/Navigation/Navigation.CollapsingHeader.d.ts +1 -1
- package/dist/Navigation/Navigation.CollapsingHeader.js +3 -3
- package/dist/Navigation/Navigation.FloatingBar.js +2 -2
- package/dist/Navigation/Navigation.Header.js +6 -6
- package/dist/Navigation/Navigation.HeaderToolbar.js +5 -5
- package/dist/Navigation/Navigation.Menu.js +7 -7
- package/dist/Navigation/Navigation.MenuSection.js +2 -2
- package/dist/Navigation/Navigation.RowItem.d.ts +1 -1
- package/dist/Navigation/Navigation.RowItem.js +2 -2
- package/dist/Navigation/Navigation.SearchBar.js +6 -6
- package/dist/Navigation/Navigation.SegmentedControl.js +4 -4
- package/dist/Navigation/Navigation.Steps.js +5 -5
- package/dist/Navigation/Navigation.TabIcon.js +2 -2
- package/dist/Navigation/Navigation.TabItem.js +2 -2
- package/dist/Navigation/Navigation.Tabs.js +5 -5
- package/dist/Navigation/index.d.ts +19 -19
- package/dist/Navigation/index.js +15 -15
- package/dist/Typography/Typography.Heading.d.ts +1 -1
- package/dist/Typography/Typography.Heading.js +1 -1
- package/dist/Typography/Typography.Text.d.ts +2 -2
- package/dist/Typography/Typography.Text.js +8 -6
- package/dist/Typography/index.d.ts +2 -2
- package/dist/Typography/index.js +2 -2
- package/dist/branding.d.ts +22 -0
- package/dist/branding.js +20 -3
- package/dist/icons/AddItemIcon.d.ts +1 -1
- package/dist/icons/ArrangeCircle.d.ts +1 -1
- package/dist/icons/ArrowDownIcon.d.ts +1 -1
- package/dist/icons/ArrowUpIcon.d.ts +1 -1
- package/dist/icons/BoxIcon.d.ts +1 -1
- package/dist/icons/BoxTimeIcon.d.ts +1 -1
- package/dist/icons/CalendarIcon.d.ts +1 -1
- package/dist/icons/CardIcon.d.ts +1 -1
- package/dist/icons/CashierIcon.d.ts +1 -1
- package/dist/icons/DuoIcon.d.ts +1 -1
- package/dist/icons/HomeIcon.d.ts +1 -1
- package/dist/icons/HomeIconOutlined.d.ts +1 -1
- package/dist/icons/LogoIcon.d.ts +1 -1
- package/dist/icons/MoneyReceiveIcon.d.ts +1 -1
- package/dist/icons/PinIcon.d.ts +1 -1
- package/dist/icons/PrinterIcon.d.ts +1 -1
- package/dist/icons/ProfileIcon.d.ts +1 -1
- package/dist/icons/SettingsIcon.d.ts +1 -1
- package/dist/icons/SinpeIcon.d.ts +1 -1
- package/dist/icons/ToggleOffIcon.d.ts +1 -1
- package/dist/icons/WalletMoneyIcon.d.ts +1 -1
- package/dist/index.d.ts +24 -23
- package/dist/index.js +26 -24
- package/dist/layouts/AuthContainer.d.ts +5 -2
- package/dist/layouts/AuthContainer.js +6 -6
- package/dist/layouts/Container.js +1 -1
- package/dist/layouts/GradientContainer.js +1 -1
- package/dist/layouts/ScrollContainer.js +1 -1
- package/dist/layouts/TabNavigatorLayout.js +4 -4
- package/dist/primitives/AspectRatio.js +1 -1
- package/dist/primitives/BaseButton.d.ts +85 -85
- package/dist/primitives/BaseButton.js +34 -50
- package/dist/primitives/Box.js +1 -1
- package/dist/primitives/Pressable.js +1 -1
- package/dist/primitives/Row.js +1 -1
- package/dist/primitives/Stack.js +1 -1
- package/dist/primitives/index.d.ts +6 -6
- package/dist/primitives/index.js +6 -6
- package/dist/theme/active.d.ts +1 -1
- package/dist/theme/active.js +14 -1
- package/dist/theme/build.d.ts +33 -0
- package/dist/theme/build.js +118 -0
- package/dist/theme/color.d.ts +26 -0
- package/dist/theme/color.js +109 -0
- package/dist/theme/components/index.d.ts +1 -1
- package/dist/theme/components/index.js +1 -1
- package/dist/theme/contrast.d.ts +29 -0
- package/dist/theme/contrast.js +57 -0
- package/dist/theme/css-vars.d.ts +3 -1
- package/dist/theme/css-vars.js +29 -3
- package/dist/theme/dark.d.ts +3 -4
- package/dist/theme/dark.js +91 -48
- package/dist/theme/default.d.ts +5 -1
- package/dist/theme/default.js +89 -41
- package/dist/theme/define.d.ts +4 -1
- package/dist/theme/define.js +4 -1
- package/dist/theme/globals.css +61 -46
- package/dist/theme/index.d.ts +14 -10
- package/dist/theme/index.js +13 -9
- package/dist/theme/theme.d.ts +1 -1
- package/dist/theme/theme.js +2 -2
- package/dist/theme/types.d.ts +77 -16
- package/dist/theme/types.js +13 -3
- package/dist/theme/typography.d.ts +4 -4
- package/dist/theme/typography.js +26 -28
- package/dist/theme/useTheme.d.ts +1 -1
- package/dist/theme/useTheme.js +1 -1
- package/dist/theme/validate.d.ts +16 -0
- package/dist/theme/validate.js +200 -0
- package/dist/tokens/index.d.ts +2 -2
- package/dist/tokens/index.js +2 -2
- package/dist/views/AppSplashView.d.ts +2 -2
- package/dist/views/AppSplashView.js +3 -3
- package/dist/views/AuthFormView.d.ts +1 -1
- package/dist/views/AuthFormView.js +3 -3
- package/dist/views/FormViewV2.d.ts +2 -2
- package/dist/views/FormViewV2.js +9 -9
- package/dist/views/ListViewV2.d.ts +3 -3
- package/dist/views/ListViewV2.js +16 -16
- package/dist/views/Wizard/Wizard.context.js +1 -1
- package/dist/views/Wizard/Wizard.d.ts +1 -1
- package/dist/views/Wizard/Wizard.js +1 -1
- package/dist/views/Wizard/index.d.ts +4 -4
- package/dist/views/Wizard/index.js +2 -2
- package/dist/views/types/IFormView.d.ts +1 -1
- package/dist/views/types/IListView.d.ts +1 -1
- package/dist/widgets/CircleButton.d.ts +2 -2
- package/dist/widgets/CircleButton.js +1 -1
- package/dist/widgets/GeoPermissionCard.js +3 -3
- package/dist/widgets/HomeHeader.js +3 -3
- package/dist/widgets/JSONViewer.js +2 -2
- package/dist/widgets/MenuCard.d.ts +2 -2
- package/dist/widgets/MenuCard.js +1 -1
- package/dist/widgets/MenuGrid.d.ts +3 -3
- package/dist/widgets/MenuGrid.js +1 -1
- package/dist/widgets/MenuSection.d.ts +2 -2
- package/dist/widgets/MenuSection.js +1 -1
- package/dist/widgets/PromoBanner.js +3 -3
- package/dist/widgets/PromoModal.js +4 -4
- package/dist/widgets/QuickActions.js +3 -3
- package/dist/widgets/ScreenHeader.js +2 -2
- package/dist/widgets/TimeZoneSelector.d.ts +1 -1
- package/dist/widgets/TimeZoneSelector.js +4 -4
- package/dist/widgets/TimeZoneSelectorModal.d.ts +1 -1
- package/dist/widgets/TimeZoneSelectorModal.js +5 -5
- package/dist/widgets/index.d.ts +16 -16
- package/dist/widgets/index.js +10 -10
- package/package.json +56 -50
- package/tailwind.preset.js +19 -0
- package/dist/icons/icon_getters.d.ts +0 -6
- package/dist/icons/icon_getters.js +0 -23
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import GradientSurface from "../Display/Display.GradientSurface";
|
|
3
|
-
import { useTheme } from "../theme";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import GradientSurface from "../Display/Display.GradientSurface.js";
|
|
3
|
+
import { useTheme } from "../theme/index.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { ScrollView, TouchableOpacity, View } from "react-native";
|
|
6
6
|
function BannerCard({ item }) {
|
|
7
7
|
const theme = useTheme();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import GradientSurface from "../Display/Display.GradientSurface";
|
|
3
|
-
import { useTheme } from "../theme";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import GradientSurface from "../Display/Display.GradientSurface.js";
|
|
3
|
+
import { useTheme } from "../theme/index.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { Modal, TouchableOpacity, TouchableWithoutFeedback, View } from "react-native";
|
|
6
6
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
7
7
|
/**
|
|
@@ -25,7 +25,7 @@ export function PromoModal({ visible, onDismiss, title, body, icon: Icon, header
|
|
|
25
25
|
const theme = useTheme();
|
|
26
26
|
const insets = useSafeAreaInsets();
|
|
27
27
|
const accent = accentColor ?? theme.accent;
|
|
28
|
-
return (_jsxs(Modal, { animationType: "fade", onRequestClose: onDismiss, statusBarTranslucent: true, transparent: true, visible: visible, children: [_jsx(TouchableWithoutFeedback, { onPress: onDismiss, children: _jsx(View, { style: {
|
|
28
|
+
return (_jsxs(Modal, { animationType: "fade", onRequestClose: onDismiss, presentationStyle: "overFullScreen", statusBarTranslucent: true, transparent: true, visible: visible, children: [_jsx(TouchableWithoutFeedback, { onPress: onDismiss, children: _jsx(View, { style: {
|
|
29
29
|
flex: 1,
|
|
30
30
|
backgroundColor: "rgba(0,0,0,0.55)",
|
|
31
31
|
alignItems: "center",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "../Display/Display.Icon";
|
|
3
|
-
import { useTheme } from "../theme";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import Icon from "../Display/Display.Icon.js";
|
|
3
|
+
import { useTheme } from "../theme/index.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { ScrollView, TouchableOpacity, View } from "react-native";
|
|
6
6
|
/**
|
|
7
7
|
* Horizontal scrollable row of small icon+label shortcuts ("Acciones Rápidas").
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import GradientContainer from "../layouts/GradientContainer";
|
|
3
|
-
import { Navigation } from "../Navigation";
|
|
2
|
+
import GradientContainer from "../layouts/GradientContainer.js";
|
|
3
|
+
import { Navigation } from "../Navigation/index.js";
|
|
4
4
|
import { View } from "react-native";
|
|
5
5
|
const Header = Navigation.Header;
|
|
6
6
|
const HeaderToolbar = Navigation.HeaderToolbar;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "nativewind/jsx-runtime";
|
|
2
|
-
import { Display, Form } from "../index";
|
|
3
|
-
import { theme } from "../theme/useTheme";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
5
|
-
import { TimeZoneSelectorModal } from "
|
|
2
|
+
import { Display, Form } from "../index.js";
|
|
3
|
+
import { theme } from "../theme/useTheme.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
|
+
import { TimeZoneSelectorModal } from "./TimeZoneSelectorModal.js";
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
import { View } from "react-native";
|
|
8
8
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { BottomSheet } from "../Dialog/BottomSheet";
|
|
3
|
-
import { Display, Form } from "../index";
|
|
4
|
-
import { theme } from "../theme";
|
|
5
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import { BottomSheet } from "../Dialog/BottomSheet/index.js";
|
|
3
|
+
import { Display, Form } from "../index.js";
|
|
4
|
+
import { theme } from "../theme/index.js";
|
|
5
|
+
import { Typography } from "../Typography/index.js";
|
|
6
6
|
import { useMemo, useState } from "react";
|
|
7
7
|
import { FlatList, TextInput, TouchableOpacity, View } from "react-native";
|
|
8
8
|
const TIMEZONES_LOCALES = {
|
|
@@ -57,6 +57,6 @@ function TimeZoneSelectorModal({ visible, onClose, onSelect, currentTimezone, })
|
|
|
57
57
|
onClose();
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
return (_jsxs(BottomSheet.Root, { onClose: onClose, size: "large", visible: visible, children: [_jsxs(BottomSheet.Header, { children: [_jsxs(View, { className: "px-5 pb-3", children: [_jsx(Typography.Text, { bold: true, variant: "subtitle", children: "Zona Horaria" }), _jsx(Typography.Text, { className: "text-text-secondary text-xs", children: "Selecciona tu zona horaria" })] }), _jsx(View, { className: "px-5 pb-3", children: _jsx(TextInput, { className: "bg-bg-muted px-4 py-3 rounded-xl", onChangeText: setQuery, placeholder: "Buscar zona horaria...", placeholderTextColor: theme.text.tertiary, value: query }) })] }), _jsx(BottomSheet.Content, { scrollable: true, children: filteredTimezones.length === 0 ? (_jsx(EmptyState, {})) : (_jsx(FlatList, { data: filteredTimezones, keyExtractor: (item) => item.timezone, renderItem: ({ item }) => (_jsx(TimezoneRow, { isSelected: selectedTimezone === item.timezone, item: item, onSelect: () => setSelectedTimezone(item.timezone) })), scrollEnabled: false })) }), _jsxs(BottomSheet.Actions, { layout: "horizontal", children: [_jsx(View, { className: "flex-1", children: _jsx(Form.Button, { onPress: onClose, title: "Cancelar", variant: "outline" }) }), selectedTimezone && (_jsx(View, { className: "flex-1", children: _jsx(Form.Button, { onPress: handleConfirm, title: "Confirmar", variant: "primary" }) }))] })] }));
|
|
60
|
+
return (_jsxs(BottomSheet.Root, { onClose: onClose, size: "large", visible: visible, children: [_jsxs(BottomSheet.Header, { children: [_jsxs(View, { className: "px-5 pb-3", children: [_jsx(Typography.Text, { bold: true, variant: "subtitle", children: "Zona Horaria" }), _jsx(Typography.Text, { className: "text-text-secondary text-xs", children: "Selecciona tu zona horaria" })] }), _jsx(View, { className: "px-5 pb-3", children: _jsx(TextInput, { className: "bg-bg-muted px-4 py-3 rounded-xl", onChangeText: setQuery, placeholder: "Buscar zona horaria...", placeholderTextColor: theme.text.tertiary, selectionColor: theme.primary, underlineColorAndroid: "transparent", value: query }) })] }), _jsx(BottomSheet.Content, { scrollable: true, children: filteredTimezones.length === 0 ? (_jsx(EmptyState, {})) : (_jsx(FlatList, { data: filteredTimezones, keyExtractor: (item) => item.timezone, renderItem: ({ item }) => (_jsx(TimezoneRow, { isSelected: selectedTimezone === item.timezone, item: item, onSelect: () => setSelectedTimezone(item.timezone) })), scrollEnabled: false })) }), _jsxs(BottomSheet.Actions, { layout: "horizontal", children: [_jsx(View, { className: "flex-1", children: _jsx(Form.Button, { onPress: onClose, title: "Cancelar", variant: "outline" }) }), selectedTimezone && (_jsx(View, { className: "flex-1", children: _jsx(Form.Button, { onPress: handleConfirm, title: "Confirmar", variant: "primary" }) }))] })] }));
|
|
61
61
|
}
|
|
62
62
|
export { TimeZoneSelectorModal };
|
package/dist/widgets/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export { CircleButton } from "
|
|
2
|
-
export { default as GeoPermissionCard } from "
|
|
3
|
-
export { HomeHeader } from "
|
|
4
|
-
export { MenuCard } from "
|
|
5
|
-
export type { MenuGridItem, MenuGridProps } from "
|
|
1
|
+
export { CircleButton } from "./CircleButton.js";
|
|
2
|
+
export { default as GeoPermissionCard } from "./GeoPermissionCard.js";
|
|
3
|
+
export { HomeHeader } from "./HomeHeader.js";
|
|
4
|
+
export { MenuCard } from "./MenuCard.js";
|
|
5
|
+
export type { MenuGridItem, MenuGridProps } from "./MenuGrid.js";
|
|
6
6
|
/** @deprecated Renamed to `MenuGridItem`. */
|
|
7
|
-
export type { MenuGridItem as MenuItem } from "
|
|
8
|
-
export { MenuGrid } from "
|
|
9
|
-
export type { MenuSectionProps } from "
|
|
10
|
-
export { MenuSection } from "
|
|
11
|
-
export type { PromoBannerItem, PromoBannerProps, } from "
|
|
12
|
-
export { PromoBanner } from "
|
|
13
|
-
export type { PromoModalProps } from "
|
|
14
|
-
export { PromoModal } from "
|
|
15
|
-
export type { QuickActionItem, QuickActionsProps, } from "
|
|
16
|
-
export { QuickActions } from "
|
|
17
|
-
export { TimeZoneSelector } from "
|
|
7
|
+
export type { MenuGridItem as MenuItem } from "./MenuGrid.js";
|
|
8
|
+
export { MenuGrid } from "./MenuGrid.js";
|
|
9
|
+
export type { MenuSectionProps } from "./MenuSection.js";
|
|
10
|
+
export { MenuSection } from "./MenuSection.js";
|
|
11
|
+
export type { PromoBannerItem, PromoBannerProps, } from "./PromoBanner.js";
|
|
12
|
+
export { PromoBanner } from "./PromoBanner.js";
|
|
13
|
+
export type { PromoModalProps } from "./PromoModal.js";
|
|
14
|
+
export { PromoModal } from "./PromoModal.js";
|
|
15
|
+
export type { QuickActionItem, QuickActionsProps, } from "./QuickActions.js";
|
|
16
|
+
export { QuickActions } from "./QuickActions.js";
|
|
17
|
+
export { TimeZoneSelector } from "./TimeZoneSelector.js";
|
package/dist/widgets/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { CircleButton } from "
|
|
2
|
-
export { default as GeoPermissionCard } from "
|
|
3
|
-
export { HomeHeader } from "
|
|
4
|
-
export { MenuCard } from "
|
|
5
|
-
export { MenuGrid } from "
|
|
6
|
-
export { MenuSection } from "
|
|
7
|
-
export { PromoBanner } from "
|
|
8
|
-
export { PromoModal } from "
|
|
9
|
-
export { QuickActions } from "
|
|
10
|
-
export { TimeZoneSelector } from "
|
|
1
|
+
export { CircleButton } from "./CircleButton.js";
|
|
2
|
+
export { default as GeoPermissionCard } from "./GeoPermissionCard.js";
|
|
3
|
+
export { HomeHeader } from "./HomeHeader.js";
|
|
4
|
+
export { MenuCard } from "./MenuCard.js";
|
|
5
|
+
export { MenuGrid } from "./MenuGrid.js";
|
|
6
|
+
export { MenuSection } from "./MenuSection.js";
|
|
7
|
+
export { PromoBanner } from "./PromoBanner.js";
|
|
8
|
+
export { PromoModal } from "./PromoModal.js";
|
|
9
|
+
export { QuickActions } from "./QuickActions.js";
|
|
10
|
+
export { TimeZoneSelector } from "./TimeZoneSelector.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sincpro/mobile-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
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",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"exports": {
|
|
16
16
|
".": "./dist/index.js",
|
|
17
|
+
"./branding": "./dist/branding.js",
|
|
17
18
|
"./theme": "./dist/theme/index.js",
|
|
18
19
|
"./Dialog": "./dist/Dialog/index.js",
|
|
19
20
|
"./Dialog/BottomSheet": "./dist/Dialog/BottomSheet/index.js",
|
|
@@ -47,27 +48,30 @@
|
|
|
47
48
|
"repository": "https://github.com/Sincpro-SRL/sincpro_mobile_ui",
|
|
48
49
|
"author": "Gutierrez, Andres <andres.gutierrez@sincpro.com.bo>",
|
|
49
50
|
"license": "MIT",
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=26"
|
|
53
|
+
},
|
|
50
54
|
"peerDependencies": {
|
|
51
|
-
"@expo-google-fonts/
|
|
52
|
-
"@expo-google-fonts/
|
|
55
|
+
"@expo-google-fonts/ibm-plex-mono": ">=0.4",
|
|
56
|
+
"@expo-google-fonts/ibm-plex-sans": ">=0.4",
|
|
53
57
|
"@expo/ui": "*",
|
|
54
|
-
"@expo/vector-icons": "
|
|
55
|
-
"@react-native-community/datetimepicker": "
|
|
56
|
-
"@react-native-community/slider": "
|
|
57
|
-
"expo-checkbox": "
|
|
58
|
-
"expo-clipboard": "
|
|
59
|
-
"expo-linear-gradient": "
|
|
60
|
-
"expo-localization": "
|
|
61
|
-
"nativewind": ">=4",
|
|
62
|
-
"react": "
|
|
58
|
+
"@expo/vector-icons": ">=15.0.2",
|
|
59
|
+
"@react-native-community/datetimepicker": ">=9.2",
|
|
60
|
+
"@react-native-community/slider": ">=5.2",
|
|
61
|
+
"expo-checkbox": ">=58.0.0",
|
|
62
|
+
"expo-clipboard": ">=58.0.0",
|
|
63
|
+
"expo-linear-gradient": ">=58.0.0",
|
|
64
|
+
"expo-localization": ">=58.0.0",
|
|
65
|
+
"nativewind": ">=4.2.7",
|
|
66
|
+
"react": ">=19.3",
|
|
63
67
|
"react-hook-form": ">=7",
|
|
64
|
-
"react-native": "
|
|
65
|
-
"react-native-currency-input": "
|
|
66
|
-
"react-native-keyboard-controller": "
|
|
67
|
-
"react-native-reanimated": "
|
|
68
|
-
"react-native-safe-area-context": "
|
|
69
|
-
"react-native-svg": "
|
|
70
|
-
"react-native-worklets": "
|
|
68
|
+
"react-native": ">=0.88",
|
|
69
|
+
"react-native-currency-input": ">=1.1",
|
|
70
|
+
"react-native-keyboard-controller": ">=1.22",
|
|
71
|
+
"react-native-reanimated": ">=4.7",
|
|
72
|
+
"react-native-safe-area-context": ">=5.11",
|
|
73
|
+
"react-native-svg": ">=15.16",
|
|
74
|
+
"react-native-worklets": ">=0.13"
|
|
71
75
|
},
|
|
72
76
|
"peerDependenciesMeta": {
|
|
73
77
|
"@expo/ui": {
|
|
@@ -77,54 +81,56 @@
|
|
|
77
81
|
"dependencies": {
|
|
78
82
|
"big.js": "^7.0.1",
|
|
79
83
|
"clsx": "^2.1.1",
|
|
80
|
-
"dayjs": "^1.11.
|
|
84
|
+
"dayjs": "^1.11.21",
|
|
81
85
|
"tailwind-merge": "^3.4.0",
|
|
82
86
|
"tailwind-variants": "^3.2.2"
|
|
83
87
|
},
|
|
84
88
|
"devDependencies": {
|
|
85
|
-
"@expo-google-fonts/
|
|
86
|
-
"@expo-google-fonts/
|
|
87
|
-
"@expo/ui": "~
|
|
89
|
+
"@expo-google-fonts/ibm-plex-mono": "^0.4.1",
|
|
90
|
+
"@expo-google-fonts/ibm-plex-sans": "^0.4.1",
|
|
91
|
+
"@expo/ui": "~58.0.27",
|
|
88
92
|
"@expo/vector-icons": "^15.0.3",
|
|
89
93
|
"@gorhom/bottom-sheet": "^5",
|
|
90
|
-
"@react-native-async-storage/async-storage": "
|
|
91
|
-
"@react-native-community/datetimepicker": "9.1
|
|
92
|
-
"@react-native-community/slider": "5.2.
|
|
93
|
-
"@storybook/addon-ondevice-actions": "
|
|
94
|
-
"@storybook/addon-ondevice-controls": "
|
|
95
|
-
"@storybook/react-native": "
|
|
94
|
+
"@react-native-async-storage/async-storage": "2.2.0",
|
|
95
|
+
"@react-native-community/datetimepicker": "9.2.1",
|
|
96
|
+
"@react-native-community/slider": "5.2.1",
|
|
97
|
+
"@storybook/addon-ondevice-actions": "10.7.1",
|
|
98
|
+
"@storybook/addon-ondevice-controls": "10.7.1",
|
|
99
|
+
"@storybook/react-native": "10.7.1",
|
|
96
100
|
"@types/big.js": "^6.2.2",
|
|
97
|
-
"@types/
|
|
101
|
+
"@types/node": "^26.6.6",
|
|
102
|
+
"@types/react": "~19.3.0",
|
|
98
103
|
"babel-plugin-module-resolver": "^5.0.3",
|
|
99
104
|
"eslint": "^9.35.0",
|
|
100
|
-
"eslint-config-expo": "~
|
|
105
|
+
"eslint-config-expo": "~58.0.4",
|
|
101
106
|
"eslint-config-prettier": "^10.1.8",
|
|
102
107
|
"eslint-plugin-prettier": "^5.5.4",
|
|
103
108
|
"eslint-plugin-react": "^7.37.2",
|
|
104
109
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
105
|
-
"expo": "
|
|
106
|
-
"expo-checkbox": "~
|
|
107
|
-
"expo-clipboard": "~
|
|
108
|
-
"expo-font": "~
|
|
109
|
-
"expo-linear-gradient": "~
|
|
110
|
-
"expo-localization": "~
|
|
111
|
-
"expo-status-bar": "~
|
|
112
|
-
"nativewind": "
|
|
110
|
+
"expo": "~58.0.23",
|
|
111
|
+
"expo-checkbox": "~58.0.2",
|
|
112
|
+
"expo-clipboard": "~58.0.4",
|
|
113
|
+
"expo-font": "~58.0.11",
|
|
114
|
+
"expo-linear-gradient": "~58.0.3",
|
|
115
|
+
"expo-localization": "~58.0.5",
|
|
116
|
+
"expo-status-bar": "~58.0.4",
|
|
117
|
+
"nativewind": "4.2.7",
|
|
113
118
|
"patch-package": "^8.0.1",
|
|
114
|
-
"prettier": "^3.
|
|
115
|
-
"react": "19.
|
|
119
|
+
"prettier": "^3.9.8",
|
|
120
|
+
"react": "19.3.0",
|
|
116
121
|
"react-hook-form": "^7.62.0",
|
|
117
|
-
"react-native": "0.
|
|
122
|
+
"react-native": "0.88.1",
|
|
118
123
|
"react-native-currency-input": "^1.1.1",
|
|
119
|
-
"react-native-gesture-handler": "~
|
|
120
|
-
"react-native-keyboard-controller": "1.
|
|
121
|
-
"react-native-reanimated": "4.
|
|
122
|
-
"react-native-safe-area-context": "~5.
|
|
123
|
-
"react-native-svg": "15.
|
|
124
|
-
"react-native-worklets": "0.
|
|
125
|
-
"storybook": "
|
|
126
|
-
"tailwindcss": "
|
|
124
|
+
"react-native-gesture-handler": "~3.3.0",
|
|
125
|
+
"react-native-keyboard-controller": "1.22.7",
|
|
126
|
+
"react-native-reanimated": "4.7.1",
|
|
127
|
+
"react-native-safe-area-context": "~5.11.1",
|
|
128
|
+
"react-native-svg": "15.16.0",
|
|
129
|
+
"react-native-worklets": "0.13.0",
|
|
130
|
+
"storybook": "10.6.6",
|
|
131
|
+
"tailwindcss": "3.4.19",
|
|
127
132
|
"tsc-alias": "^1.8.17",
|
|
133
|
+
"tsx": "^4",
|
|
128
134
|
"typescript": "~6.0.3"
|
|
129
135
|
},
|
|
130
136
|
"scripts": {
|
package/tailwind.preset.js
CHANGED
|
@@ -34,6 +34,9 @@ module.exports = {
|
|
|
34
34
|
accent: "rgb(var(--bg-accent) / <alpha-value>)",
|
|
35
35
|
hover: "rgb(var(--bg-hover) / <alpha-value>)",
|
|
36
36
|
disabled: "rgb(var(--bg-disabled) / <alpha-value>)",
|
|
37
|
+
"container-lowest": "rgb(var(--bg-container-lowest) / <alpha-value>)",
|
|
38
|
+
container: "rgb(var(--bg-container) / <alpha-value>)",
|
|
39
|
+
"container-high": "rgb(var(--bg-container-high) / <alpha-value>)",
|
|
37
40
|
},
|
|
38
41
|
text: {
|
|
39
42
|
primary: "rgb(var(--text-primary) / <alpha-value>)",
|
|
@@ -70,6 +73,22 @@ module.exports = {
|
|
|
70
73
|
"warning-light": "rgb(var(--warning-light) / <alpha-value>)",
|
|
71
74
|
"danger-light": "rgb(var(--danger-light) / <alpha-value>)",
|
|
72
75
|
"info-light": "rgb(var(--info-light) / <alpha-value>)",
|
|
76
|
+
container: {
|
|
77
|
+
primary: "rgb(var(--container-primary) / <alpha-value>)",
|
|
78
|
+
"on-primary": "rgb(var(--container-on-primary) / <alpha-value>)",
|
|
79
|
+
secondary: "rgb(var(--container-secondary) / <alpha-value>)",
|
|
80
|
+
"on-secondary": "rgb(var(--container-on-secondary) / <alpha-value>)",
|
|
81
|
+
accent: "rgb(var(--container-accent) / <alpha-value>)",
|
|
82
|
+
"on-accent": "rgb(var(--container-on-accent) / <alpha-value>)",
|
|
83
|
+
success: "rgb(var(--container-success) / <alpha-value>)",
|
|
84
|
+
"on-success": "rgb(var(--container-on-success) / <alpha-value>)",
|
|
85
|
+
warning: "rgb(var(--container-warning) / <alpha-value>)",
|
|
86
|
+
"on-warning": "rgb(var(--container-on-warning) / <alpha-value>)",
|
|
87
|
+
danger: "rgb(var(--container-danger) / <alpha-value>)",
|
|
88
|
+
"on-danger": "rgb(var(--container-on-danger) / <alpha-value>)",
|
|
89
|
+
info: "rgb(var(--container-info) / <alpha-value>)",
|
|
90
|
+
"on-info": "rgb(var(--container-on-info) / <alpha-value>)",
|
|
91
|
+
},
|
|
73
92
|
ring: "rgb(var(--ring) / <alpha-value>)",
|
|
74
93
|
input: "rgb(var(--input) / <alpha-value>)",
|
|
75
94
|
},
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import ArrangeCircleIcon from "../icons/ArrangeCircle";
|
|
2
|
-
import CardIcon from "../icons/CardIcon";
|
|
3
|
-
import CreditIcon from "../icons/CreditIcon";
|
|
4
|
-
import MoneyReceiveIcon from "../icons/MoneyReceiveIcon";
|
|
5
|
-
import SinpeIcon from "../icons/SinpeIcon";
|
|
6
|
-
const paymentMethodMap = [
|
|
7
|
-
{ prefix: "créd", icon: CreditIcon, label: "Crédito" },
|
|
8
|
-
{ prefix: "cred", icon: CreditIcon, label: "Crédito" },
|
|
9
|
-
{ prefix: "tar", icon: CardIcon, label: "Tarjeta" },
|
|
10
|
-
{ prefix: "trans", icon: ArrangeCircleIcon, label: "Transferencia" },
|
|
11
|
-
{ prefix: "ef", icon: MoneyReceiveIcon, label: "Efectivo" },
|
|
12
|
-
{ prefix: "sinpe", icon: SinpeIcon, label: "Sinpe Móvil" },
|
|
13
|
-
{ prefix: "ban", icon: ArrangeCircleIcon, label: "Banco" },
|
|
14
|
-
];
|
|
15
|
-
export function getIcon(name) {
|
|
16
|
-
if (!name)
|
|
17
|
-
return { icon: CardIcon, label: "Otro" };
|
|
18
|
-
const cleaned = name.trim().toLowerCase();
|
|
19
|
-
const match = paymentMethodMap.find((m) => cleaned.startsWith(m.prefix));
|
|
20
|
-
if (match)
|
|
21
|
-
return { icon: match.icon, label: match.label };
|
|
22
|
-
return { icon: CardIcon, label: "Otro" };
|
|
23
|
-
}
|