@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 Icon from "../Display/Display.Icon";
|
|
3
|
-
import { cn } from "../theme/tw";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import Icon from "../Display/Display.Icon.js";
|
|
3
|
+
import { cn } from "../theme/tw.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { View } from "react-native";
|
|
6
6
|
function Empty({ handleGoHome, className }) {
|
|
7
7
|
return (_jsxs(View, { className: cn("flex-1 items-center justify-center px-4", className), children: [_jsx(Icon, { name: "sad-cry", size: 80, type: "fontawesome5" }), _jsx(Typography.Text, { className: "pt-4 text-text-primary", semibold: true, variant: "h3", children: "\u00A1Oops!" }), _jsx(Typography.Text, { className: "pt-2 text-center text-base leading-5.5 text-text-secondary", variant: "h5", children: "No se encontraron registros disponibles." })] }));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "../Display/Display.Icon";
|
|
3
|
-
import { BaseButton } from "../primitives/BaseButton";
|
|
4
|
-
import { theme } from "../theme";
|
|
5
|
-
import { cn } from "../theme/tw";
|
|
6
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import Icon from "../Display/Display.Icon.js";
|
|
3
|
+
import { BaseButton } from "../primitives/BaseButton.js";
|
|
4
|
+
import { theme } from "../theme/index.js";
|
|
5
|
+
import { cn } from "../theme/tw.js";
|
|
6
|
+
import { Typography } from "../Typography/index.js";
|
|
7
7
|
import { Image, View } from "react-native";
|
|
8
8
|
function EmptyState({ title, description, icon = "file-tray-outline", image, actionLabel, onAction, children, className, testID, }) {
|
|
9
9
|
return (_jsxs(View, { className: cn("flex-1 items-center justify-center px-8 gap-3", className), testID: testID, children: [image ? (_jsx(Image, { resizeMode: "contain", source: image, style: { width: 140, height: 140 } })) : (_jsx(View, { className: "w-20 h-20 rounded-full bg-bg-muted items-center justify-center", children: _jsx(Icon, { color: theme.icon.tertiary, name: icon, size: 40 }) })), _jsx(Typography.Text, { align: "center", className: "text-text-primary", semibold: true, variant: "subtitle", children: title }), description ? (_jsx(Typography.Text, { align: "center", className: "text-text-secondary", variant: "body", children: description })) : null, actionLabel && onAction ? (_jsx(View, { className: "mt-2", children: _jsx(BaseButton, { onPress: onAction, title: actionLabel, variant: "primary" }) })) : null, children] }));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "../Display/Display.Icon";
|
|
3
|
-
import Button from "../Form/Form.Button";
|
|
4
|
-
import { cn } from "../theme/tw";
|
|
5
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import Icon from "../Display/Display.Icon.js";
|
|
3
|
+
import Button from "../Form/Form.Button.js";
|
|
4
|
+
import { cn } from "../theme/tw.js";
|
|
5
|
+
import { Typography } from "../Typography/index.js";
|
|
6
6
|
import { View } from "react-native";
|
|
7
7
|
function Error({ message, onRetry, onBack, onHome, className }) {
|
|
8
8
|
return (_jsxs(View, { className: cn("flex-1 items-center justify-center px-4", className), children: [_jsx(Icon, { color: "#ef4444", name: "exclamation-circle", size: 80, type: "fontawesome5" }), _jsx(Typography.Text, { className: "pt-4 text-text-primary", semibold: true, variant: "h3", children: "\u00A1Error!" }), _jsx(Typography.Text, { className: "pt-2 text-center text-base leading-5.5 text-text-secondary", variant: "h5", children: message || "Ocurrió un error al cargar la información" }), _jsxs(View, { className: "mt-8 w-full gap-3", children: [onRetry && _jsx(Button, { className: "w-full", onPress: onRetry, title: "Reintentar" }), onBack && (_jsx(Button, { className: "w-full", onPress: onBack, title: "Volver", variant: "secondary" })), onHome && (_jsx(Button, { className: "w-full", onPress: onHome, title: "Ir al inicio", variant: "outline" }))] })] }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import Spinner from "
|
|
3
|
-
import { cn } from "../theme/tw";
|
|
2
|
+
import Spinner from "./Feedback.Spinner.js";
|
|
3
|
+
import { cn } from "../theme/tw.js";
|
|
4
4
|
import { View } from "react-native";
|
|
5
5
|
function LoadingState({ message = "Cargando…", size = "small", variant = "spinner", style = {}, className, }) {
|
|
6
6
|
return (_jsx(View, { className: cn("flex-1 justify-center items-center", className), style: style, children: _jsx(Spinner, { className: "mb-5", size: size, text: message, variant: variant }) }));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "../Display/Display.Icon";
|
|
3
|
-
import { BaseButton } from "../primitives/BaseButton";
|
|
4
|
-
import { theme } from "../theme";
|
|
5
|
-
import { cn } from "../theme/tw";
|
|
6
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import Icon from "../Display/Display.Icon.js";
|
|
3
|
+
import { BaseButton } from "../primitives/BaseButton.js";
|
|
4
|
+
import { theme } from "../theme/index.js";
|
|
5
|
+
import { cn } from "../theme/tw.js";
|
|
6
|
+
import { Typography } from "../Typography/index.js";
|
|
7
7
|
import { View } from "react-native";
|
|
8
8
|
function PermissionCard({ title, description, granted = false, icon = "lock-closed", grantedLabel = "Permiso activo", deniedLabel = "Permiso inactivo", actionLabel = "Permitir", loading = false, onRequest, className, testID, }) {
|
|
9
9
|
return (_jsx(View, { className: cn("bg-bg-card rounded-xl p-4 border border-border-light", className), style: theme.shadow.sm, testID: testID, children: _jsxs(View, { className: "flex-row items-start gap-3", children: [_jsx(Icon, { color: granted ? theme.success : theme.danger, name: granted ? "checkmark-circle" : icon, size: 32 }), _jsxs(View, { className: "flex-1 gap-1", children: [_jsx(Typography.Text, { className: "text-text-primary", semibold: true, variant: "body", children: title }), description ? (_jsx(Typography.Text, { className: "text-text-secondary", variant: "bodySmall", children: description })) : null, _jsx(Typography.Text, { style: { color: granted ? theme.success : theme.danger }, variant: "bodySmall", children: granted ? grantedLabel : deniedLabel }), !granted && onRequest ? (_jsx(View, { className: "mt-2 self-start", children: _jsx(BaseButton, { loading: loading, onPress: onRequest, size: "small", title: actionLabel }) })) : null] })] }) }));
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import { cn } from "../theme/tw";
|
|
3
|
-
import { motion } from "../tokens/motion";
|
|
4
|
-
import { useEffect,
|
|
2
|
+
import { cn } from "../theme/tw.js";
|
|
3
|
+
import { motion } from "../tokens/motion.js";
|
|
4
|
+
import { useEffect, useRef } from "react";
|
|
5
5
|
import { Animated, Easing, View } from "react-native";
|
|
6
6
|
function clamp(n) {
|
|
7
7
|
return Math.max(0, Math.min(1, n));
|
|
8
8
|
}
|
|
9
9
|
function Progress({ value = 0, indeterminate = false, height = 6, className, testID, }) {
|
|
10
|
-
|
|
10
|
+
// eslint-disable-next-line react-hooks/refs
|
|
11
|
+
const translate = useRef(new Animated.Value(0)).current;
|
|
11
12
|
useEffect(() => {
|
|
12
13
|
if (!indeterminate)
|
|
13
14
|
return;
|
|
@@ -24,6 +25,7 @@ function Progress({ value = 0, indeterminate = false, height = 6, className, tes
|
|
|
24
25
|
width: "40%",
|
|
25
26
|
transform: [
|
|
26
27
|
{
|
|
28
|
+
// eslint-disable-next-line react-hooks/refs
|
|
27
29
|
translateX: translate.interpolate({
|
|
28
30
|
inputRange: [0, 1],
|
|
29
31
|
outputRange: ["-40%", "250%"],
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import { cn } from "../theme/tw";
|
|
3
|
-
import { motion } from "../tokens/motion";
|
|
4
|
-
import { useEffect,
|
|
2
|
+
import { cn } from "../theme/tw.js";
|
|
3
|
+
import { motion } from "../tokens/motion.js";
|
|
4
|
+
import { useEffect, useRef } from "react";
|
|
5
5
|
import { Animated, Easing } from "react-native";
|
|
6
6
|
function Skeleton({ width = "100%", height = 16, radius = 8, circle = false, className, style, }) {
|
|
7
|
-
|
|
7
|
+
// eslint-disable-next-line react-hooks/refs
|
|
8
|
+
const opacity = useRef(new Animated.Value(0.5)).current;
|
|
8
9
|
useEffect(() => {
|
|
9
10
|
const pulse = Animated.loop(Animated.sequence([
|
|
10
11
|
Animated.timing(opacity, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { theme } from "../theme";
|
|
3
|
-
import { cn } from "../theme/tw";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import { theme } from "../theme/index.js";
|
|
3
|
+
import { cn } from "../theme/tw.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { useEffect } from "react";
|
|
6
6
|
import { ActivityIndicator, View } from "react-native";
|
|
7
7
|
import Animated, { Easing, useAnimatedStyle, useSharedValue, withDelay, withRepeat, withSequence, withTiming, } from "react-native-reanimated";
|
|
@@ -13,5 +13,5 @@ interface SplashScreenProps {
|
|
|
13
13
|
subtitle?: string;
|
|
14
14
|
children?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
declare function Splash({ isReady, logo, minDuration, message, variant, title, subtitle, children, }: SplashScreenProps): string | number | bigint | boolean |
|
|
16
|
+
declare function Splash({ isReady, logo, minDuration, message, variant, title, subtitle, children, }: SplashScreenProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
17
17
|
export default Splash;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import GradientSurface from "../Display/Display.GradientSurface";
|
|
3
|
-
import Pattern from "../Display/Display.Pattern";
|
|
4
|
-
import Loading from "
|
|
5
|
-
import GradientContainer from "../layouts/GradientContainer";
|
|
6
|
-
import {
|
|
2
|
+
import GradientSurface from "../Display/Display.GradientSurface.js";
|
|
3
|
+
import Pattern from "../Display/Display.Pattern.js";
|
|
4
|
+
import Loading from "./Feedback.Loading.js";
|
|
5
|
+
import GradientContainer from "../layouts/GradientContainer.js";
|
|
6
|
+
import { theme } from "../theme/index.js";
|
|
7
|
+
import { Typography } from "../Typography/index.js";
|
|
7
8
|
import { useEffect, useRef, useState } from "react";
|
|
8
9
|
import { ActivityIndicator, Image, View } from "react-native";
|
|
9
10
|
function renderLogo(logo) {
|
|
@@ -13,7 +14,7 @@ function renderLogo(logo) {
|
|
|
13
14
|
return _jsx(Image, { className: "w-[250px] h-[200px] mb-12", resizeMode: "contain", source: logo });
|
|
14
15
|
}
|
|
15
16
|
function HeroSplash({ logo, message, title, subtitle, }) {
|
|
16
|
-
return (_jsxs(GradientSurface, { className: "flex-1 items-center justify-center", preset: "
|
|
17
|
+
return (_jsxs(GradientSurface, { className: "flex-1 items-center justify-center", preset: "warm", radius: "none", children: [_jsx(Pattern, { color: theme.primary, kind: "dots", opacity: 0.16, size: 26 }), _jsxs(View, { className: "items-center", children: [logo ? (_jsx(Image, { className: "w-28 h-28 mb-7", resizeMode: "contain", source: logo, style: { shadowColor: theme.primary, shadowOpacity: 0.7, shadowRadius: 28 } })) : null, title ? (_jsx(Typography.Text, { bold: true, style: { color: "#FFFFFF", fontSize: 28, letterSpacing: 1 }, children: title })) : null, subtitle ? (_jsx(Typography.Text, { style: { color: "rgba(255,255,255,0.6)", fontSize: 13, marginTop: 6 }, children: subtitle })) : null, _jsx(View, { className: "mt-10", children: _jsx(ActivityIndicator, { accessibilityLabel: message, color: theme.primary, size: "small" }) })] })] }));
|
|
17
18
|
}
|
|
18
19
|
function Splash({ isReady, logo, minDuration = 800, message = "Inicializando...", variant = "default", title, subtitle, children, }) {
|
|
19
20
|
const [showContent, setShowContent] = useState(false);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "../Display/Display.Icon";
|
|
3
|
-
import Pressable from "../primitives/Pressable";
|
|
4
|
-
import { theme } from "../theme";
|
|
5
|
-
import { tv } from "../theme/tw";
|
|
6
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import Icon from "../Display/Display.Icon.js";
|
|
3
|
+
import Pressable from "../primitives/Pressable.js";
|
|
4
|
+
import { theme } from "../theme/index.js";
|
|
5
|
+
import { tv } from "../theme/tw.js";
|
|
6
|
+
import { Typography } from "../Typography/index.js";
|
|
7
7
|
import { createContext, useCallback, useContext, useMemo, useRef, useState, } from "react";
|
|
8
8
|
import { ActivityIndicator, View } from "react-native";
|
|
9
9
|
import Animated, { FadeInDown, FadeInUp, FadeOutDown, FadeOutUp, } from "react-native-reanimated";
|
|
@@ -32,10 +32,10 @@ function ToastItem({ entry, onHide, position, }) {
|
|
|
32
32
|
const exiting = position === "top" ? FadeOutUp : FadeOutDown;
|
|
33
33
|
const resolvedDuration = entry.duration ?? (variant === "loading" ? 0 : DEFAULT_DURATION);
|
|
34
34
|
const showClose = entry.dismissible ?? resolvedDuration === 0;
|
|
35
|
-
return (_jsxs(Animated.View, { accessibilityLiveRegion: "polite", accessible: true, className: styles.root(), entering: entering.duration(220), exiting: exiting.duration(180), children: [variant === "loading" ? (_jsx(ActivityIndicator, { color: theme.
|
|
35
|
+
return (_jsxs(Animated.View, { accessibilityLiveRegion: "polite", accessible: true, className: styles.root(), entering: entering.duration(220), exiting: exiting.duration(180), children: [variant === "loading" ? (_jsx(ActivityIndicator, { color: theme.text.accent, size: "small" })) : (_jsx(Icon, { color: iconByVariant[variant].color, name: iconByVariant[variant].name, size: 22 })), _jsxs(View, { className: "flex-1", children: [entry.title ? (_jsx(Typography.Text, { className: styles.title(), children: entry.title })) : null, _jsx(Typography.Text, { className: styles.message(), children: entry.message })] }), entry.action ? (_jsx(Pressable, { accessibilityLabel: entry.action.label, onPress: () => {
|
|
36
36
|
entry.action?.onPress();
|
|
37
37
|
onHide(entry.id);
|
|
38
|
-
}, children: _jsx(Typography.Text, { className: "text-
|
|
38
|
+
}, children: _jsx(Typography.Text, { className: "text-text-accent text-sm font-semibold", children: entry.action.label }) })) : null, showClose ? (_jsx(Pressable, { accessibilityLabel: "Cerrar", hitSlop: 8, onPress: () => onHide(entry.id), children: _jsx(Icon, { color: theme.text.tertiary, name: "close", size: 18 }) })) : null] }));
|
|
39
39
|
}
|
|
40
40
|
export function ToastProvider({ children, position = "bottom", }) {
|
|
41
41
|
const insets = useSafeAreaInsets();
|
package/dist/Feedback/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import Banner from "
|
|
2
|
-
import Empty from "
|
|
3
|
-
import EmptyState from "
|
|
4
|
-
import Error from "
|
|
5
|
-
import Loading from "
|
|
6
|
-
import PermissionCard from "
|
|
7
|
-
import Progress from "
|
|
8
|
-
import ProgressCircle from "
|
|
9
|
-
import Skeleton from "
|
|
10
|
-
import SplashScreen from "
|
|
11
|
-
export { ErrorBoundary } from "
|
|
12
|
-
export { type ToastAction, type ToastContextValue, type ToastOptions, type ToastPromiseMessages, ToastProvider, type ToastVariant, useToast, } from "
|
|
1
|
+
import Banner from "./Feedback.Banner.js";
|
|
2
|
+
import Empty from "./Feedback.Empty.js";
|
|
3
|
+
import EmptyState from "./Feedback.EmptyState.js";
|
|
4
|
+
import Error from "./Feedback.Error.js";
|
|
5
|
+
import Loading from "./Feedback.Loading.js";
|
|
6
|
+
import PermissionCard from "./Feedback.PermissionCard.js";
|
|
7
|
+
import Progress from "./Feedback.Progress.js";
|
|
8
|
+
import ProgressCircle from "./Feedback.ProgressCircle.js";
|
|
9
|
+
import Skeleton from "./Feedback.Skeleton.js";
|
|
10
|
+
import SplashScreen from "./Feedback.Splash.js";
|
|
11
|
+
export { ErrorBoundary } from "./ErrorBoundary.js";
|
|
12
|
+
export { type ToastAction, type ToastContextValue, type ToastOptions, type ToastPromiseMessages, ToastProvider, type ToastVariant, useToast, } from "./Toast.context.js";
|
|
13
13
|
export declare const Feedback: {
|
|
14
14
|
Loading: typeof Loading;
|
|
15
|
-
Spinner: import("react").FC<import("
|
|
15
|
+
Spinner: import("react").FC<import("./Feedback.Spinner.js").SpinnerProps>;
|
|
16
16
|
Skeleton: typeof Skeleton;
|
|
17
17
|
Progress: typeof Progress;
|
|
18
18
|
ProgressCircle: typeof ProgressCircle;
|
package/dist/Feedback/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import Banner from "
|
|
2
|
-
import Empty from "
|
|
3
|
-
import EmptyState from "
|
|
4
|
-
import Error from "
|
|
5
|
-
import Loading from "
|
|
6
|
-
import PermissionCard from "
|
|
7
|
-
import Progress from "
|
|
8
|
-
import ProgressCircle from "
|
|
9
|
-
import Skeleton from "
|
|
10
|
-
import Spinner from "
|
|
11
|
-
import SplashScreen from "
|
|
12
|
-
export { ErrorBoundary } from "
|
|
13
|
-
export { ToastProvider, useToast, } from "
|
|
1
|
+
import Banner from "./Feedback.Banner.js";
|
|
2
|
+
import Empty from "./Feedback.Empty.js";
|
|
3
|
+
import EmptyState from "./Feedback.EmptyState.js";
|
|
4
|
+
import Error from "./Feedback.Error.js";
|
|
5
|
+
import Loading from "./Feedback.Loading.js";
|
|
6
|
+
import PermissionCard from "./Feedback.PermissionCard.js";
|
|
7
|
+
import Progress from "./Feedback.Progress.js";
|
|
8
|
+
import ProgressCircle from "./Feedback.ProgressCircle.js";
|
|
9
|
+
import Skeleton from "./Feedback.Skeleton.js";
|
|
10
|
+
import Spinner from "./Feedback.Spinner.js";
|
|
11
|
+
import SplashScreen from "./Feedback.Splash.js";
|
|
12
|
+
export { ErrorBoundary } from "./ErrorBoundary.js";
|
|
13
|
+
export { ToastProvider, useToast, } from "./Toast.context.js";
|
|
14
14
|
export const Feedback = {
|
|
15
15
|
Loading,
|
|
16
16
|
Spinner,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** @deprecated Use `Actions.Button` from `@sincpro/mobile-ui/Actions` instead. */
|
|
2
|
-
export type { ButtonIconProps, ButtonProps } from "../Actions/Actions.Button";
|
|
3
|
-
export { default as ButtonWithIcon, default, } from "../Actions/Actions.Button";
|
|
2
|
+
export type { ButtonIconProps, ButtonProps } from "../Actions/Actions.Button.js";
|
|
3
|
+
export { default as ButtonWithIcon, default, } from "../Actions/Actions.Button.js";
|
package/dist/Form/Form.Button.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as ButtonWithIcon, default, } from "../Actions/Actions.Button";
|
|
1
|
+
export { default as ButtonWithIcon, default, } from "../Actions/Actions.Button.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { theme } from "../theme";
|
|
3
|
-
import { cn } from "../theme/tw";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import { theme } from "../theme/index.js";
|
|
3
|
+
import { cn } from "../theme/tw.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { Checkbox } from "expo-checkbox";
|
|
6
6
|
import { Pressable, View } from "react-native";
|
|
7
7
|
function RowCheckBox({ mainText, subText, rightText, rightComponent, leftComponent, isChecked = false, onCheck = () => { }, disabled = false, className, }) {
|
|
@@ -25,6 +25,6 @@ function RowCheckBox({ mainText, subText, rightText, rightComponent, leftCompone
|
|
|
25
25
|
}
|
|
26
26
|
return null;
|
|
27
27
|
};
|
|
28
|
-
return (_jsxs(Pressable, { className: cn("flex-row justify-between items-center", disabled && "opacity-50", className), disabled: disabled, onPress: handlePress, children: [_jsx(View, { children: renderLeftComponent() }), _jsxs(View, { className: "flex-row items-center", children: [renderRightComponent(), _jsx(Checkbox, { className: "ml-2", color: theme.
|
|
28
|
+
return (_jsxs(Pressable, { className: cn("flex-row justify-between items-center", disabled && "opacity-50", className), disabled: disabled, onPress: handlePress, children: [_jsx(View, { children: renderLeftComponent() }), _jsxs(View, { className: "flex-row items-center", children: [renderRightComponent(), _jsx(Checkbox, { className: "ml-2", color: theme.primary, disabled: disabled, pointerEvents: "none", value: isChecked })] })] }));
|
|
29
29
|
}
|
|
30
30
|
export default RowCheckBox;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import Checkbox from "
|
|
2
|
+
import Checkbox from "./Form.Checkbox.js";
|
|
3
3
|
import { Controller } from "react-hook-form";
|
|
4
4
|
function ControlledCheckbox({ control, name, label, subText, }) {
|
|
5
5
|
return (_jsx(Controller, { control: control, name: name, render: ({ field: { onChange, value } }) => (_jsx(Checkbox, { isChecked: value || false, mainText: label, onCheck: onChange, subText: subText })) }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import Input from "
|
|
2
|
+
import Input from "./Form.Input.js";
|
|
3
3
|
import { Controller } from "react-hook-form";
|
|
4
4
|
function ControlledInput({ control, name, label, placeholder, keyboardType, autoCapitalize, multiline, numberOfLines, rules, error, }) {
|
|
5
5
|
return (_jsx(Controller, { control: control, name: name, render: ({ field: { onChange, onBlur, value } }) => (_jsx(Input, { autoCapitalize: autoCapitalize, error: error, keyboardType: keyboardType, label: label, multiline: multiline, numberOfLines: numberOfLines, onBlur: onBlur, onChangeText: onChange, placeholder: placeholder, value: value })), rules: rules }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import MonetaryInput from "
|
|
2
|
+
import MonetaryInput from "./Form.MonetaryInput.js";
|
|
3
3
|
import { Controller } from "react-hook-form";
|
|
4
4
|
function ControlledMonetaryInput({ control, name, label, placeholder, currency = "CRC", rules, error, }) {
|
|
5
5
|
return (_jsx(Controller, { control: control, name: name, render: ({ field: { onChange, onBlur, value } }) => (_jsx(MonetaryInput, { amount: value, currencySymbol: currency, onChange: onChange, placeholder: placeholder })), rules: rules }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import RadioButton from "
|
|
2
|
+
import RadioButton from "./Form.RadioButton.js";
|
|
3
3
|
import { Controller } from "react-hook-form";
|
|
4
4
|
function ControlledRadioButton({ control, name, label, value, }) {
|
|
5
5
|
return (_jsx(Controller, { control: control, name: name, render: ({ field: { onChange, value: selectedValue } }) => (_jsx(RadioButton, { label: label, onPress: () => onChange(value), selected: selectedValue === value })) }));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
2
|
import DateTimePicker from "@react-native-community/datetimepicker";
|
|
3
|
-
import Icon from "../Display/Display.Icon";
|
|
4
|
-
import Pressable from "../primitives/Pressable";
|
|
5
|
-
import { theme } from "../theme";
|
|
6
|
-
import { cn } from "../theme/tw";
|
|
7
|
-
import { Typography } from "../Typography";
|
|
3
|
+
import Icon from "../Display/Display.Icon.js";
|
|
4
|
+
import Pressable from "../primitives/Pressable.js";
|
|
5
|
+
import { theme } from "../theme/index.js";
|
|
6
|
+
import { cn } from "../theme/tw.js";
|
|
7
|
+
import { Typography } from "../Typography/index.js";
|
|
8
8
|
import { useState } from "react";
|
|
9
9
|
import { Platform, View } from "react-native";
|
|
10
10
|
function defaultFormat(value, mode) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "nativewind/jsx-runtime";
|
|
2
|
-
import { Display } from "../Display";
|
|
3
|
-
import { theme } from "../theme";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import { Display } from "../Display/index.js";
|
|
3
|
+
import { theme } from "../theme/index.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { useState } from "react";
|
|
6
6
|
import { Modal, TouchableOpacity, TouchableWithoutFeedback, View } from "react-native";
|
|
7
7
|
import { tv } from "tailwind-variants";
|
|
@@ -63,13 +63,13 @@ function DropdownButton({ title, options, variant = "secondary", size = "small",
|
|
|
63
63
|
const styles = dropdown({ variant, size });
|
|
64
64
|
const textColorClass = {
|
|
65
65
|
primary: "text-text-on-primary",
|
|
66
|
-
outline: "text-
|
|
67
|
-
secondary: "text-
|
|
66
|
+
outline: "text-text-accent",
|
|
67
|
+
secondary: "text-text-accent",
|
|
68
68
|
}[variant];
|
|
69
69
|
const iconColor = {
|
|
70
70
|
primary: theme.text.onPrimary,
|
|
71
|
-
outline: theme.
|
|
72
|
-
secondary: theme.
|
|
71
|
+
outline: theme.text.accent,
|
|
72
|
+
secondary: theme.text.accent,
|
|
73
73
|
}[variant];
|
|
74
74
|
const textVariant = {
|
|
75
75
|
large: "body",
|
|
@@ -77,7 +77,7 @@ function DropdownButton({ title, options, variant = "secondary", size = "small",
|
|
|
77
77
|
xs: "bodySmall",
|
|
78
78
|
small: "bodySmall",
|
|
79
79
|
}[size];
|
|
80
|
-
return (_jsxs(_Fragment, { children: [_jsxs(TouchableOpacity, { activeOpacity: 0.7, className: styles.button(), onPress: () => setIsOpen(true), children: [_jsx(Typography.Text, { className: textColorClass, variant: textVariant, children: title }), _jsx(Display.Icon, { color: iconColor, name: "chevron-down", size: 16, type: "feather" })] }), _jsx(Modal, { animationType: "fade", transparent: true, visible: isOpen, children: _jsx(TouchableWithoutFeedback, { onPress: () => setIsOpen(false), children: _jsx(View, { className: styles.overlay(), children: _jsx(TouchableWithoutFeedback, { children: _jsxs(View, { className: styles.dropdownContainer(), style: {
|
|
80
|
+
return (_jsxs(_Fragment, { children: [_jsxs(TouchableOpacity, { activeOpacity: 0.7, className: styles.button(), onPress: () => setIsOpen(true), children: [_jsx(Typography.Text, { className: textColorClass, variant: textVariant, children: title }), _jsx(Display.Icon, { color: iconColor, name: "chevron-down", size: 16, type: "feather" })] }), _jsx(Modal, { animationType: "fade", presentationStyle: "overFullScreen", transparent: true, visible: isOpen, children: _jsx(TouchableWithoutFeedback, { onPress: () => setIsOpen(false), children: _jsx(View, { className: styles.overlay(), children: _jsx(TouchableWithoutFeedback, { children: _jsxs(View, { className: styles.dropdownContainer(), style: {
|
|
81
81
|
backgroundColor: theme.bg.popover,
|
|
82
82
|
...theme.shadow.lg,
|
|
83
83
|
}, children: [_jsxs(View, { className: styles.header(), children: [_jsx(Typography.Text, { className: "text-text-primary", semibold: true, variant: "bodyLarge", children: title }), _jsx(TouchableOpacity, { onPress: () => setIsOpen(false), children: _jsx(Display.Icon, { name: "x", size: 20, type: "feather" }) })] }), _jsx(View, { className: styles.optionsList(), children: options.map((option, index) => (_jsxs(View, { children: [_jsx(TouchableOpacity, { activeOpacity: 0.7, className: dropdown({ disabled: option.disabled }).option(), disabled: option.disabled, onPress: () => handleOptionPress(option), children: _jsx(Typography.Text, { className: option.disabled ? "text-text-disabled" : "text-text-primary", variant: "body", children: option.title }) }), index < options.length - 1 && _jsx(View, { className: styles.separator() })] }, option.id))) })] }) }) }) }) })] }));
|
package/dist/Form/Form.FAB.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** @deprecated Use `Actions.FAB` from `@sincpro/mobile-ui/Actions` instead. */
|
|
2
|
-
export type { FABProps } from "../Actions/Actions.FAB";
|
|
3
|
-
export { default } from "../Actions/Actions.FAB";
|
|
2
|
+
export type { FABProps } from "../Actions/Actions.FAB.js";
|
|
3
|
+
export { default } from "../Actions/Actions.FAB.js";
|
package/dist/Form/Form.FAB.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from "../Actions/Actions.FAB";
|
|
1
|
+
export { default } from "../Actions/Actions.FAB.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** @deprecated Use `Actions.FilterButton` from `@sincpro/mobile-ui/Actions` instead. */
|
|
2
|
-
export type { FilterButtonProps } from "../Actions/Actions.FilterButton";
|
|
3
|
-
export { FilterButton, FilterButtonGroup, } from "../Actions/Actions.FilterButton";
|
|
2
|
+
export type { FilterButtonProps } from "../Actions/Actions.FilterButton.js";
|
|
3
|
+
export { FilterButton, FilterButtonGroup, } from "../Actions/Actions.FilterButton.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FilterButton, FilterButtonGroup, } from "../Actions/Actions.FilterButton";
|
|
1
|
+
export { FilterButton, FilterButtonGroup, } from "../Actions/Actions.FilterButton.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { Dialog } from "../Dialog";
|
|
3
|
-
import { Display } from "../Display";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
5
|
-
import { normalizeQuantity, roundTo } from "../utils/quantity";
|
|
2
|
+
import { Dialog } from "../Dialog/index.js";
|
|
3
|
+
import { Display } from "../Display/index.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
|
+
import { normalizeQuantity, roundTo } from "../utils/quantity.js";
|
|
6
6
|
import { useCallback, useMemo, useState } from "react";
|
|
7
7
|
import { TouchableOpacity, View } from "react-native";
|
|
8
8
|
import { tv } from "tailwind-variants";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** @deprecated Use `Actions.IconButton` from `@sincpro/mobile-ui/Actions` instead. */
|
|
2
|
-
export type { IconButtonProps } from "../Actions/Actions.IconButton";
|
|
3
|
-
export { default } from "../Actions/Actions.IconButton";
|
|
2
|
+
export type { IconButtonProps } from "../Actions/Actions.IconButton.js";
|
|
3
|
+
export { default } from "../Actions/Actions.IconButton.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from "../Actions/Actions.IconButton";
|
|
1
|
+
export { default } from "../Actions/Actions.IconButton.js";
|
package/dist/Form/Form.Input.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { theme } from "../theme";
|
|
3
|
-
import { cn, tv } from "../theme/tw";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import { theme } from "../theme/index.js";
|
|
3
|
+
import { cn, tv } from "../theme/tw.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { useState } from "react";
|
|
6
6
|
import { TextInput, View } from "react-native";
|
|
7
7
|
const inputContainer = tv({
|
|
@@ -33,6 +33,6 @@ function FormInput({ label, error, tooltip, style, multiline = false, numberOfLi
|
|
|
33
33
|
return "focused";
|
|
34
34
|
return "default";
|
|
35
35
|
};
|
|
36
|
-
return (_jsxs(View, { className: cn("mb-2", className), children: [_jsx(Typography.Text, { className: "mb-1 font-medium text-text-primary", variant: "bodySmall", children: label }), _jsx(View, { className: inputContainer({ state: getState() }), children: _jsx(TextInput, { className: cn("px-3 py-2.5 text-sm min-h-[44px] text-text-primary", multiline && "min-h-[64px] pt-2.5"), multiline: multiline, numberOfLines: numberOfLines, onBlur: handleBlur, onFocus: handleFocus, placeholderTextColor: theme.text.tertiary, textAlignVertical: multiline ? "top" : "center", ...props }) }), hasError && (_jsx(Typography.Text, { className: "mt-0.5 text-danger", variant: "bodySmall", children: error }))] }));
|
|
36
|
+
return (_jsxs(View, { className: cn("mb-2", className), children: [_jsx(Typography.Text, { className: "mb-1 font-medium text-text-primary", variant: "bodySmall", children: label }), _jsx(View, { className: inputContainer({ state: getState() }), children: _jsx(TextInput, { className: cn("px-3 py-2.5 text-sm min-h-[44px] text-text-primary", multiline && "min-h-[64px] pt-2.5"), multiline: multiline, numberOfLines: numberOfLines, onBlur: handleBlur, onFocus: handleFocus, placeholderTextColor: theme.text.tertiary, selectionColor: theme.primary, textAlignVertical: multiline ? "top" : "center", underlineColorAndroid: "transparent", ...props }) }), hasError && (_jsx(Typography.Text, { className: "mt-0.5 text-danger", variant: "bodySmall", children: error }))] }));
|
|
37
37
|
}
|
|
38
38
|
export default FormInput;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import TextInputF from "
|
|
3
|
-
import { tv } from "../theme/tw";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import TextInputF from "./Form.TextInput.js";
|
|
3
|
+
import { tv } from "../theme/tw.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { useState } from "react";
|
|
6
6
|
import { View } from "react-native";
|
|
7
7
|
const inputFieldBorder = tv({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { theme } from "../theme/index.js";
|
|
3
|
+
import { tv } from "../theme/tw.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
|
+
import { parseToMonetaryNumber } from "../utils/monetary.js";
|
|
5
6
|
import { useState } from "react";
|
|
6
7
|
import { View } from "react-native";
|
|
7
8
|
import CurrencyInput from "react-native-currency-input";
|
|
@@ -22,6 +23,6 @@ function MonetaryInput({ amount, onChange, currencySymbol = "₡", placeholder =
|
|
|
22
23
|
setRaw(amount);
|
|
23
24
|
onChange?.(parseToMonetaryNumber(amount));
|
|
24
25
|
};
|
|
25
|
-
return (_jsxs(View, { className: "flex-row", children: [_jsx(View, { className: monetaryBox({ focused: isFocused, className: "w-10 h-10" }), children: _jsx(Typography.Text, { className: "text-xl", variant: "body", children: currencySymbol }) }), _jsx(View, { className: monetaryBox({ focused: isFocused, className: "flex-1 h-10 ml-2 px-4" }), children: _jsx(CurrencyInput, { delimiter: ".", keyboardType: "numeric", onBlur: () => setIsFocused(false), onChangeValue: handleChange, onFocus: () => setIsFocused(true), placeholder: placeholder, separator: ",", value: raw }) })] }));
|
|
26
|
+
return (_jsxs(View, { className: "flex-row", children: [_jsx(View, { className: monetaryBox({ focused: isFocused, className: "w-10 h-10" }), children: _jsx(Typography.Text, { className: "text-xl", variant: "body", children: currencySymbol }) }), _jsx(View, { className: monetaryBox({ focused: isFocused, className: "flex-1 h-10 ml-2 px-4" }), children: _jsx(CurrencyInput, { delimiter: ".", keyboardType: "numeric", onBlur: () => setIsFocused(false), onChangeValue: handleChange, onFocus: () => setIsFocused(true), placeholder: placeholder, placeholderTextColor: theme.text.tertiary, selectionColor: theme.primary, separator: ",", underlineColorAndroid: "transparent", value: raw }) })] }));
|
|
26
27
|
}
|
|
27
28
|
export default MonetaryInput;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { Display } from "../Display";
|
|
3
|
-
import InputField from "
|
|
4
|
-
import { useTheme } from "../theme";
|
|
2
|
+
import { Display } from "../Display/index.js";
|
|
3
|
+
import InputField from "./Form.InputField.js";
|
|
4
|
+
import { useTheme } from "../theme/index.js";
|
|
5
5
|
import { useState } from "react";
|
|
6
6
|
import { TouchableOpacity, View } from "react-native";
|
|
7
7
|
const PasswordField = ({ label, error, inputProps }) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Pressable from "../primitives/Pressable";
|
|
3
|
-
import { theme } from "../theme";
|
|
4
|
-
import { cn } from "../theme/tw";
|
|
5
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import Pressable from "../primitives/Pressable.js";
|
|
3
|
+
import { theme } from "../theme/index.js";
|
|
4
|
+
import { cn } from "../theme/tw.js";
|
|
5
|
+
import { Typography } from "../Typography/index.js";
|
|
6
6
|
import { useRef } from "react";
|
|
7
7
|
import { TextInput, View } from "react-native";
|
|
8
8
|
function PinInput({ value, onChange, length = 6, secure = false, autoFocus = false, onComplete, className, testID, }) {
|
|
@@ -18,6 +18,6 @@ function PinInput({ value, onChange, length = 6, secure = false, autoFocus = fal
|
|
|
18
18
|
const filled = index < value.length;
|
|
19
19
|
const active = index === value.length;
|
|
20
20
|
return (_jsx(View, { className: "flex-1 aspect-square max-w-[52px] rounded-lg border bg-bg-card items-center justify-center", style: { borderColor: active ? theme.border.focus : theme.border.default }, children: _jsx(Typography.Text, { className: "text-text-primary", variant: "h4", children: filled ? (secure ? "•" : chars[index]) : "" }) }, index));
|
|
21
|
-
}), _jsx(TextInput, { autoFocus: autoFocus, caretHidden: true, keyboardType: "number-pad", maxLength: length, onChangeText: handleChange, ref: inputRef, style: { position: "absolute", opacity: 0, width: 1, height: 1 }, textContentType: "oneTimeCode", value: value })] }));
|
|
21
|
+
}), _jsx(TextInput, { autoFocus: autoFocus, caretHidden: true, keyboardType: "number-pad", maxLength: length, onChangeText: handleChange, ref: inputRef, selectionColor: theme.primary, style: { position: "absolute", opacity: 0, width: 1, height: 1 }, textContentType: "oneTimeCode", underlineColorAndroid: "transparent", value: value })] }));
|
|
22
22
|
}
|
|
23
23
|
export default PinInput;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { Display } from "../Display";
|
|
3
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import { Display } from "../Display/index.js";
|
|
3
|
+
import { Typography } from "../Typography/index.js";
|
|
4
4
|
import { TouchableOpacity, View } from "react-native";
|
|
5
5
|
import { tv } from "tailwind-variants";
|
|
6
6
|
const quantitySelector = tv({
|
|
7
7
|
slots: {
|
|
8
|
-
container: "flex-row items-center self-start border border-
|
|
8
|
+
container: "flex-row items-center self-start border border-primary rounded-full px-1",
|
|
9
9
|
button: "w-9 h-9 rounded-full justify-center items-center",
|
|
10
10
|
valueContainer: "min-w-[40px] items-center px-3",
|
|
11
11
|
},
|