@sincpro/mobile-ui 0.7.2 → 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 +6 -6
- package/dist/Dialog/Dialog.Confirmation.js +4 -4
- package/dist/Dialog/Dialog.EditValue.js +4 -4
- package/dist/Dialog/Dialog.Sheet.js +6 -4
- 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 +2 -2
- package/dist/Feedback/Feedback.ProgressCircle.js +1 -1
- package/dist/Feedback/Feedback.Skeleton.js +2 -2
- 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 +7 -7
- 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 +6 -6
- 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 +6 -6
- 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 +3 -3
- 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,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
2
|
/* eslint-disable react-hooks/refs */
|
|
3
|
-
import { theme } from "../../theme";
|
|
3
|
+
import { theme } from "../../theme/index.js";
|
|
4
4
|
import { createContext, useContext, useEffect, useRef } from "react";
|
|
5
5
|
import { Animated, Dimensions, Modal, PanResponder, Pressable, ScrollView, Text, View, } from "react-native";
|
|
6
6
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { BottomSheet } from "
|
|
1
|
+
export { BottomSheet } from "./BottomSheet.Root.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { BottomSheet } from "
|
|
1
|
+
export { BottomSheet } from "./BottomSheet.Root.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "nativewind/jsx-runtime";
|
|
2
|
-
import { BottomSheet } from "
|
|
3
|
-
import ConfirmationDialog from "
|
|
4
|
-
import { BaseButton } from "../primitives/BaseButton";
|
|
2
|
+
import { BottomSheet } from "./BottomSheet/index.js";
|
|
3
|
+
import ConfirmationDialog from "./Dialog.Confirmation.js";
|
|
4
|
+
import { BaseButton } from "../primitives/BaseButton.js";
|
|
5
5
|
import { createContext, useCallback, useContext, useMemo, useState, } from "react";
|
|
6
6
|
const DEFAULT_STATE = {
|
|
7
7
|
isVisible: 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 { cn } 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 { cn } from "../theme/tw.js";
|
|
6
|
+
import { Typography } from "../Typography/index.js";
|
|
7
7
|
import { useEffect, useRef } from "react";
|
|
8
8
|
import { Animated, Modal, Pressable as RNPressable, View } from "react-native";
|
|
9
9
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
@@ -27,6 +27,6 @@ function ActionSheet({ visible, onClose, actions, title, message, cancelLabel =
|
|
|
27
27
|
return (_jsx(Modal, { animationType: "none", onRequestClose: onClose, presentationStyle: "overFullScreen", transparent: true, visible: visible, children: _jsx(RNPressable, { className: "flex-1 justify-end bg-black/50", onPress: onClose, children: _jsx(Animated.View, { style: { transform: [{ translateY }] }, children: _jsxs(RNPressable, { style: { paddingHorizontal: 12, paddingBottom: insets.bottom + 12 }, children: [title || message ? (_jsxs(View, { className: "rounded-xl mb-2 px-4 py-3 items-center", style: { backgroundColor: theme.bg.card }, children: [title ? (_jsx(Typography.Text, { className: "text-text-primary", semibold: true, children: title })) : null, message ? (_jsx(Typography.Text, { className: "text-text-secondary text-sm", variant: "bodySmall", children: message })) : null] })) : null, _jsx(View, { className: "rounded-xl overflow-hidden mb-2", style: { backgroundColor: theme.bg.card }, children: actions.map((action, index) => (_jsxs(Pressable, { accessibilityRole: "button", accessibilityState: { disabled: action.disabled }, className: cn("flex-row items-center justify-center gap-2 px-4 py-4", index < actions.length - 1 && "border-b border-border-light"), disabled: action.disabled, onPress: () => {
|
|
28
28
|
onClose();
|
|
29
29
|
action.onPress();
|
|
30
|
-
}, children: [action.icon ? (_jsx(Icon, { color: action.destructive ? theme.danger : theme.icon.primary, name: action.icon, size: 20 })) : null, _jsx(Typography.Text, { className: cn(action.destructive ? "text-danger" : "text-text-primary"), semibold: true, children: action.label })] }, action.label))) }), _jsx(Pressable, { accessibilityRole: "button", className: "rounded-xl px-4 py-4 items-center", onPress: onClose, style: { backgroundColor: theme.bg.card }, children: _jsx(Typography.Text, { className: "text-
|
|
30
|
+
}, children: [action.icon ? (_jsx(Icon, { color: action.destructive ? theme.danger : theme.icon.primary, name: action.icon, size: 20 })) : null, _jsx(Typography.Text, { className: cn(action.destructive ? "text-danger" : "text-text-primary"), semibold: true, children: action.label })] }, action.label))) }), _jsx(Pressable, { accessibilityRole: "button", className: "rounded-xl px-4 py-4 items-center", onPress: onClose, style: { backgroundColor: theme.bg.card }, children: _jsx(Typography.Text, { className: "text-text-accent", semibold: true, children: cancelLabel }) })] }) }) }) }));
|
|
31
31
|
}
|
|
32
32
|
export default ActionSheet;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { BaseButton } from "../primitives/BaseButton";
|
|
3
|
-
import { theme } from "../theme";
|
|
4
|
-
import Typography from "../Typography/Typography.Text";
|
|
2
|
+
import { BaseButton } from "../primitives/BaseButton.js";
|
|
3
|
+
import { theme } from "../theme/index.js";
|
|
4
|
+
import Typography from "../Typography/Typography.Text.js";
|
|
5
5
|
import { Modal, TouchableWithoutFeedback, View } from "react-native";
|
|
6
6
|
const ConfirmationDialog = ({ visible, onCancel, onConfirm, auxTitle = "cambios", subtitle = "¿Estás seguro de que quieres descartar los cambios realizados?", confirmButtonText = "Sí", cancelButtonText = "No, continuar aquí", }) => {
|
|
7
7
|
return (_jsx(Modal, { animationType: "fade", onRequestClose: onCancel, presentationStyle: "overFullScreen", transparent: true, visible: visible, children: _jsx(TouchableWithoutFeedback, { onPress: onCancel, children: _jsx(View, { className: "flex-1 justify-center items-center p-6 bg-black/50", children: _jsx(TouchableWithoutFeedback, { children: _jsxs(View, { className: "p-3 w-full max-w-xs mx-auto", style: {
|
|
8
|
-
borderRadius:
|
|
8
|
+
borderRadius: 16,
|
|
9
9
|
backgroundColor: theme.bg.popover,
|
|
10
10
|
...theme.shadow.md,
|
|
11
11
|
}, children: [_jsx(Typography, { className: "mb-1.5 text-sm", variant: "body", children: _jsx(Typography, { semibold: true, variant: "body", children: auxTitle }) }), _jsx(Typography, { className: "mb-3 text-xs leading-tight", variant: "body", children: subtitle }), _jsxs(View, { className: "flex-row gap-2", children: [_jsx(BaseButton, { className: "flex-1", onPress: onCancel, size: "small", title: cancelButtonText, variant: "outlineBlack" }), _jsx(BaseButton, { className: "flex-1", onPress: onConfirm, size: "small", title: confirmButtonText, variant: "primary" })] })] }) }) }) }) }));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { theme } from "../theme";
|
|
3
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import { theme } from "../theme/index.js";
|
|
3
|
+
import { Typography } from "../Typography/index.js";
|
|
4
4
|
import { useEffect, useRef } from "react";
|
|
5
|
-
import { FlatList, Modal, TextInput, TouchableOpacity, View } from "react-native";
|
|
5
|
+
import { FlatList, Modal, TextInput, TouchableOpacity, View, } from "react-native";
|
|
6
6
|
function EditableValueModal({ visible, title, value, onChangeValue, onConfirm, onCancel, placeholder, helperText, chips, keyboardType = "decimal-pad", rightAdornment, confirmLabel = "Aplicar", cancelLabel = "Cancelar", autoFocus = true, testID, }) {
|
|
7
7
|
const inputRef = useRef(null);
|
|
8
8
|
useEffect(() => {
|
|
@@ -11,6 +11,6 @@ function EditableValueModal({ visible, title, value, onChangeValue, onConfirm, o
|
|
|
11
11
|
return () => clearTimeout(t);
|
|
12
12
|
}
|
|
13
13
|
}, [visible, autoFocus]);
|
|
14
|
-
return (_jsx(Modal, { animationType: "fade", onRequestClose: onCancel, presentationStyle: "overFullScreen", transparent: true, visible: visible, children: _jsx(View, { className: "flex-1 justify-center p-6 bg-black/40", children: _jsxs(View, { className: "p-4", style: { borderRadius:
|
|
14
|
+
return (_jsx(Modal, { animationType: "fade", onRequestClose: onCancel, presentationStyle: "overFullScreen", transparent: true, visible: visible, children: _jsx(View, { className: "flex-1 justify-center p-6 bg-black/40", children: _jsxs(View, { className: "p-4", style: { borderRadius: 16, backgroundColor: theme.bg.popover, ...theme.shadow.md }, testID: testID, children: [_jsx(Typography.Text, { className: "mb-3", semibold: true, variant: "h6", children: title }), _jsxs(View, { className: "flex-row items-center", children: [_jsx(TextInput, { className: "flex-1 border border-input rounded-lg p-2.5 text-lg text-text-primary", keyboardType: keyboardType, onChangeText: onChangeValue, onSubmitEditing: onConfirm, placeholder: placeholder, placeholderTextColor: theme.text.tertiary, ref: inputRef, returnKeyType: "done", selectionColor: theme.primary, underlineColorAndroid: "transparent", value: value }), rightAdornment && _jsx(View, { className: "ml-2", children: rightAdornment })] }), helperText ? (_jsx(View, { className: "mt-2", children: typeof helperText === "string" ? (_jsx(Typography.Text, { className: "opacity-70", variant: "bodySmall", children: helperText })) : (helperText) })) : null, chips && chips.length > 0 && (_jsx(FlatList, { contentContainerClassName: "gap-2 py-3", data: chips, horizontal: true, keyExtractor: (c, i) => c.key || `${c.label}-${i}`, renderItem: ({ item }) => (_jsx(TouchableOpacity, { className: "px-3 py-1.5 bg-accent/10 rounded-2xl border border-accent/30", onPress: item.onPress, children: _jsx(Typography.Text, { semibold: true, variant: "bodySmall", children: item.label }) })) })), _jsxs(View, { className: "flex-row justify-end gap-3", children: [_jsx(TouchableOpacity, { className: "px-4 py-2.5 rounded-lg bg-bg-hover", onPress: onCancel, children: _jsx(Typography.Text, { semibold: true, variant: "body", children: cancelLabel }) }), _jsx(TouchableOpacity, { className: "px-4 py-2.5 rounded-lg bg-accent", onPress: onConfirm, children: _jsx(Typography.Text, { className: "text-text-inverse", semibold: true, variant: "body", children: confirmLabel }) })] })] }) }) }));
|
|
15
15
|
}
|
|
16
16
|
export default EditableValueModal;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/* eslint-disable react-hooks/refs */
|
|
3
|
+
// This file uses the canonical RN patterns: useRef(new Animated.Value()).current and PanResponder
|
|
4
|
+
// created inside useState. Those hooks rules warn — they're not bugs here. Documented at the
|
|
5
|
+
// eslint config level (see eslint.config.js:30-33).
|
|
6
|
+
import { theme } from "../theme/index.js";
|
|
7
|
+
import { Typography } from "../Typography/index.js";
|
|
4
8
|
import { useEffect, useRef, useState } from "react";
|
|
5
9
|
import { Animated, Modal, PanResponder, ScrollView, View } from "react-native";
|
|
6
10
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
@@ -20,7 +24,6 @@ function Sheet({ visible, onClose, children, title, maxHeightRatio = 0.9, dismis
|
|
|
20
24
|
const insets = useSafeAreaInsets();
|
|
21
25
|
const translateY = useRef(new Animated.Value(800)).current;
|
|
22
26
|
const onCloseRef = useRef(onClose);
|
|
23
|
-
// eslint-disable-next-line react-hooks/refs
|
|
24
27
|
onCloseRef.current = onClose;
|
|
25
28
|
useEffect(() => {
|
|
26
29
|
if (visible) {
|
|
@@ -35,7 +38,6 @@ function Sheet({ visible, onClose, children, title, maxHeightRatio = 0.9, dismis
|
|
|
35
38
|
translateY.setValue(800);
|
|
36
39
|
}
|
|
37
40
|
}, [visible, translateY]);
|
|
38
|
-
// eslint-disable-next-line react-hooks/refs
|
|
39
41
|
const [pan] = useState(() => PanResponder.create({
|
|
40
42
|
onStartShouldSetPanResponder: () => true,
|
|
41
43
|
onMoveShouldSetPanResponder: (_, g) => g.dy > 2,
|
package/dist/Dialog/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { BottomSheet } from "
|
|
2
|
-
import { ConfirmationProvider, useConfirmationContext } from "
|
|
3
|
-
import ActionSheet from "
|
|
4
|
-
import EditValue, { type EditableValueModalChip, type EditableValueModalProps } from "
|
|
1
|
+
import { BottomSheet } from "./BottomSheet/index.js";
|
|
2
|
+
import { ConfirmationProvider, useConfirmationContext } from "./Confirmation.context.js";
|
|
3
|
+
import ActionSheet from "./Dialog.ActionSheet.js";
|
|
4
|
+
import EditValue, { type EditableValueModalChip, type EditableValueModalProps } from "./Dialog.EditValue.js";
|
|
5
5
|
export declare const Dialog: {
|
|
6
|
-
Confirmation: import("react").FC<import("
|
|
6
|
+
Confirmation: import("react").FC<import("./Dialog.Confirmation.js").Props>;
|
|
7
7
|
BottomSheet: {
|
|
8
8
|
Root: ({ visible, onClose, size, dismissible, children }: import("./BottomSheet/BottomSheet.Root").RootProps) => import("react").JSX.Element;
|
|
9
9
|
Handle: ({ children }: import("./BottomSheet/BottomSheet.Root").HandleProps) => import("react").JSX.Element;
|
package/dist/Dialog/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BottomSheet } from "
|
|
2
|
-
import { ConfirmationProvider, useConfirmationContext, } from "
|
|
3
|
-
import ActionSheet from "
|
|
4
|
-
import Confirmation from "
|
|
5
|
-
import EditValue from "
|
|
1
|
+
import { BottomSheet } from "./BottomSheet/index.js";
|
|
2
|
+
import { ConfirmationProvider, useConfirmationContext, } from "./Confirmation.context.js";
|
|
3
|
+
import ActionSheet from "./Dialog.ActionSheet.js";
|
|
4
|
+
import Confirmation from "./Dialog.Confirmation.js";
|
|
5
|
+
import EditValue from "./Dialog.EditValue.js";
|
|
6
6
|
export const Dialog = {
|
|
7
7
|
Confirmation,
|
|
8
8
|
BottomSheet,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "
|
|
3
|
-
import Pressable from "../primitives/Pressable";
|
|
4
|
-
import { theme } from "../theme";
|
|
5
|
-
import { cn } from "../theme/tw";
|
|
6
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import Icon from "./Display.Icon.js";
|
|
3
|
+
import Pressable from "../primitives/Pressable.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 { useState } from "react";
|
|
8
8
|
import { LayoutAnimation, View } from "react-native";
|
|
9
9
|
function AccordionItem({ title, children, defaultOpen = false, className, testID, }) {
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { type VariantProps } from "../theme/tw";
|
|
1
|
+
import { type VariantProps } from "../theme/tw.js";
|
|
2
2
|
import { FC } from "react";
|
|
3
3
|
declare const avatar: import("tailwind-variants").TVReturnType<{
|
|
4
4
|
size: {
|
|
5
|
-
small:
|
|
6
|
-
medium:
|
|
7
|
-
large:
|
|
8
|
-
xlarge:
|
|
5
|
+
small: "w-8 h-8";
|
|
6
|
+
medium: "w-10 h-10";
|
|
7
|
+
large: "w-12 h-12";
|
|
8
|
+
xlarge: "w-16 h-16";
|
|
9
9
|
};
|
|
10
10
|
colorScheme: {
|
|
11
|
-
default:
|
|
12
|
-
primary:
|
|
13
|
-
secondary:
|
|
14
|
-
success:
|
|
15
|
-
warning:
|
|
11
|
+
default: "bg-bg-hover";
|
|
12
|
+
primary: "bg-primary/20";
|
|
13
|
+
secondary: "bg-secondary/20";
|
|
14
|
+
success: "bg-success-light";
|
|
15
|
+
warning: "bg-warning-light";
|
|
16
16
|
};
|
|
17
17
|
}, undefined, "justify-center items-center rounded-full shadow-sm", {
|
|
18
18
|
size: {
|
|
19
|
-
small:
|
|
20
|
-
medium:
|
|
21
|
-
large:
|
|
22
|
-
xlarge:
|
|
19
|
+
small: "w-8 h-8";
|
|
20
|
+
medium: "w-10 h-10";
|
|
21
|
+
large: "w-12 h-12";
|
|
22
|
+
xlarge: "w-16 h-16";
|
|
23
23
|
};
|
|
24
24
|
colorScheme: {
|
|
25
|
-
default:
|
|
26
|
-
primary:
|
|
27
|
-
secondary:
|
|
28
|
-
success:
|
|
29
|
-
warning:
|
|
25
|
+
default: "bg-bg-hover";
|
|
26
|
+
primary: "bg-primary/20";
|
|
27
|
+
secondary: "bg-secondary/20";
|
|
28
|
+
success: "bg-success-light";
|
|
29
|
+
warning: "bg-warning-light";
|
|
30
30
|
};
|
|
31
|
-
}, undefined, import("tailwind-variants").
|
|
31
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
32
32
|
size: {
|
|
33
|
-
small:
|
|
34
|
-
medium:
|
|
35
|
-
large:
|
|
36
|
-
xlarge:
|
|
33
|
+
small: "w-8 h-8";
|
|
34
|
+
medium: "w-10 h-10";
|
|
35
|
+
large: "w-12 h-12";
|
|
36
|
+
xlarge: "w-16 h-16";
|
|
37
37
|
};
|
|
38
38
|
colorScheme: {
|
|
39
|
-
default:
|
|
40
|
-
primary:
|
|
41
|
-
secondary:
|
|
42
|
-
success:
|
|
43
|
-
warning:
|
|
39
|
+
default: "bg-bg-hover";
|
|
40
|
+
primary: "bg-primary/20";
|
|
41
|
+
secondary: "bg-secondary/20";
|
|
42
|
+
success: "bg-success-light";
|
|
43
|
+
warning: "bg-warning-light";
|
|
44
44
|
};
|
|
45
|
-
}, undefined
|
|
45
|
+
}, undefined>>;
|
|
46
46
|
export interface AvatarProps extends Omit<VariantProps<typeof avatar>, "size"> {
|
|
47
47
|
initials: string;
|
|
48
48
|
size?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import { cn, tv } from "../theme/tw";
|
|
3
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import { cn, tv } from "../theme/tw.js";
|
|
3
|
+
import { Typography } from "../Typography/index.js";
|
|
4
4
|
import { View } from "react-native";
|
|
5
5
|
const avatar = tv({
|
|
6
6
|
base: "justify-center items-center rounded-full shadow-sm",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Avatar from "
|
|
3
|
-
import { theme } from "../theme";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import Avatar from "./Display.Avatar.js";
|
|
3
|
+
import { theme } from "../theme/index.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { View } from "react-native";
|
|
6
6
|
function AvatarGroup({ items, max = 4, size = 36, className, testID }) {
|
|
7
7
|
const visible = items.slice(0, max);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type VariantProps } from "../theme/tw";
|
|
1
|
+
import { type VariantProps } from "../theme/tw.js";
|
|
2
2
|
declare const badge: import("tailwind-variants").TVReturnType<{
|
|
3
3
|
variant: {
|
|
4
4
|
info: {
|
|
@@ -59,7 +59,7 @@ declare const badge: import("tailwind-variants").TVReturnType<{
|
|
|
59
59
|
}, {
|
|
60
60
|
root: string;
|
|
61
61
|
text: string;
|
|
62
|
-
}, import("tailwind-variants").
|
|
62
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
63
63
|
variant: {
|
|
64
64
|
info: {
|
|
65
65
|
root: string;
|
|
@@ -89,7 +89,7 @@ declare const badge: import("tailwind-variants").TVReturnType<{
|
|
|
89
89
|
}, {
|
|
90
90
|
root: string;
|
|
91
91
|
text: string;
|
|
92
|
-
}
|
|
92
|
+
}>>;
|
|
93
93
|
export type BadgeVariant = VariantProps<typeof badge>["variant"];
|
|
94
94
|
export declare enum BadgeVariants {
|
|
95
95
|
INFO = "info",
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { type VariantProps } from "../theme/tw";
|
|
1
|
+
import { type VariantProps } from "../theme/tw.js";
|
|
2
2
|
import type { ReactNode } from "react";
|
|
3
3
|
declare const card: import("tailwind-variants").TVReturnType<{
|
|
4
4
|
padding: {
|
|
5
|
-
none:
|
|
6
|
-
sm:
|
|
7
|
-
md:
|
|
8
|
-
lg:
|
|
5
|
+
none: "p-0";
|
|
6
|
+
sm: "p-3";
|
|
7
|
+
md: "p-4";
|
|
8
|
+
lg: "p-6";
|
|
9
9
|
};
|
|
10
10
|
}, undefined, "bg-bg-card rounded-lg border border-border-light", {
|
|
11
11
|
padding: {
|
|
12
|
-
none:
|
|
13
|
-
sm:
|
|
14
|
-
md:
|
|
15
|
-
lg:
|
|
12
|
+
none: "p-0";
|
|
13
|
+
sm: "p-3";
|
|
14
|
+
md: "p-4";
|
|
15
|
+
lg: "p-6";
|
|
16
16
|
};
|
|
17
|
-
}, undefined, import("tailwind-variants").
|
|
17
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
18
18
|
padding: {
|
|
19
|
-
none:
|
|
20
|
-
sm:
|
|
21
|
-
md:
|
|
22
|
-
lg:
|
|
19
|
+
none: "p-0";
|
|
20
|
+
sm: "p-3";
|
|
21
|
+
md: "p-4";
|
|
22
|
+
lg: "p-6";
|
|
23
23
|
};
|
|
24
|
-
}, undefined
|
|
24
|
+
}, undefined>>;
|
|
25
25
|
export interface CardProps extends VariantProps<typeof card> {
|
|
26
26
|
elevation?: "none" | "sm" | "md" | "lg";
|
|
27
27
|
onPress?: () => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import Pressable from "../primitives/Pressable";
|
|
3
|
-
import { theme } from "../theme";
|
|
4
|
-
import { cn, tv } 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, tv } from "../theme/tw.js";
|
|
5
|
+
import { Typography } from "../Typography/index.js";
|
|
6
6
|
import { View } from "react-native";
|
|
7
7
|
const card = tv({
|
|
8
8
|
base: "bg-bg-card rounded-lg border border-border-light",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { theme } from "../theme";
|
|
3
|
-
import { cn } from "../theme/tw";
|
|
2
|
+
import { theme } from "../theme/index.js";
|
|
3
|
+
import { cn } from "../theme/tw.js";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { ScrollView, View, } from "react-native";
|
|
6
6
|
function Carousel({ data, renderItem, keyExtractor, itemWidth, gap = 12, showDots = true, className, testID, }) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type VariantProps } from "../theme/tw";
|
|
1
|
+
import { type VariantProps } from "../theme/tw.js";
|
|
2
2
|
declare const chip: import("tailwind-variants").TVReturnType<{
|
|
3
3
|
tone: {
|
|
4
4
|
neutral: {
|
|
@@ -61,7 +61,7 @@ declare const chip: import("tailwind-variants").TVReturnType<{
|
|
|
61
61
|
}, {
|
|
62
62
|
root: string;
|
|
63
63
|
label: string;
|
|
64
|
-
}, import("tailwind-variants").
|
|
64
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
65
65
|
tone: {
|
|
66
66
|
neutral: {
|
|
67
67
|
root: string;
|
|
@@ -92,7 +92,7 @@ declare const chip: import("tailwind-variants").TVReturnType<{
|
|
|
92
92
|
}, {
|
|
93
93
|
root: string;
|
|
94
94
|
label: string;
|
|
95
|
-
}
|
|
95
|
+
}>>;
|
|
96
96
|
export interface ChipProps extends VariantProps<typeof chip> {
|
|
97
97
|
label: string;
|
|
98
98
|
onPress?: () => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "
|
|
3
|
-
import Pressable from "../primitives/Pressable";
|
|
4
|
-
import { theme } from "../theme";
|
|
5
|
-
import { tv } from "../theme/tw";
|
|
2
|
+
import Icon from "./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
6
|
import { Text, View } from "react-native";
|
|
7
7
|
const chip = tv({
|
|
8
8
|
slots: {
|
|
@@ -12,10 +12,10 @@ const chip = tv({
|
|
|
12
12
|
variants: {
|
|
13
13
|
tone: {
|
|
14
14
|
neutral: { root: "bg-bg-muted", label: "text-text-secondary" },
|
|
15
|
-
primary: { root: "bg-
|
|
16
|
-
success: { root: "bg-success
|
|
17
|
-
warning: { root: "bg-warning
|
|
18
|
-
danger: { root: "bg-danger
|
|
15
|
+
primary: { root: "bg-container-primary", label: "text-container-on-primary" },
|
|
16
|
+
success: { root: "bg-container-success", label: "text-container-on-success" },
|
|
17
|
+
warning: { root: "bg-container-warning", label: "text-container-on-warning" },
|
|
18
|
+
danger: { root: "bg-container-danger", label: "text-container-on-danger" },
|
|
19
19
|
},
|
|
20
20
|
selected: {
|
|
21
21
|
true: { root: "border border-primary" },
|
|
@@ -28,10 +28,10 @@ const chip = tv({
|
|
|
28
28
|
});
|
|
29
29
|
const removeIconColor = {
|
|
30
30
|
neutral: theme.text.secondary,
|
|
31
|
-
primary: theme.
|
|
32
|
-
success: theme.
|
|
33
|
-
warning: theme.
|
|
34
|
-
danger: theme.
|
|
31
|
+
primary: theme.container.onPrimary,
|
|
32
|
+
success: theme.container.onSuccess,
|
|
33
|
+
warning: theme.container.onWarning,
|
|
34
|
+
danger: theme.container.onDanger,
|
|
35
35
|
};
|
|
36
36
|
function Chip({ label, tone = "neutral", selected = false, onPress, onRemove, className, testID, }) {
|
|
37
37
|
const styles = chip({ tone, selected });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "
|
|
3
|
-
import { useTheme } from "../theme";
|
|
4
|
-
import { cn } from "../theme/tw";
|
|
2
|
+
import Icon from "./Display.Icon.js";
|
|
3
|
+
import { useTheme } from "../theme/index.js";
|
|
4
|
+
import { cn } from "../theme/tw.js";
|
|
5
5
|
import { View } from "react-native";
|
|
6
6
|
import { tv } from "tailwind-variants";
|
|
7
7
|
const circleButtonVariants = tv({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import { Typography } from "../Typography/index.js";
|
|
3
3
|
import * as Clipboard from "expo-clipboard";
|
|
4
4
|
import { TouchableOpacity } from "react-native";
|
|
5
5
|
function CopyableText({ value, getValue, label, className }) {
|
|
@@ -9,6 +9,6 @@ function CopyableText({ value, getValue, label, className }) {
|
|
|
9
9
|
const textToCopy = hasStaticValue ? value : getValue();
|
|
10
10
|
await Clipboard.setStringAsync(textToCopy);
|
|
11
11
|
};
|
|
12
|
-
return (_jsx(TouchableOpacity, { onPress: handleCopy, children: _jsx(Typography.Text, { className: className || "text-
|
|
12
|
+
return (_jsx(TouchableOpacity, { onPress: handleCopy, children: _jsx(Typography.Text, { className: className || "text-text-accent", semibold: true, variant: "bodySmall", children: displayText }) }));
|
|
13
13
|
}
|
|
14
14
|
export default CopyableText;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { cn } from "../theme/tw";
|
|
3
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import { cn } from "../theme/tw.js";
|
|
3
|
+
import { Typography } from "../Typography/index.js";
|
|
4
4
|
import { View } from "react-native";
|
|
5
5
|
function CountRecords({ name, count, withPadding = true, className }) {
|
|
6
6
|
return (_jsxs(View, { className: cn("flex-row py-2", withPadding && "px-4", className), children: [_jsxs(Typography.Text, { semibold: true, variant: "bodySmall", children: ["Total ", " ", `${name || "Registros"} `] }), _jsxs(Typography.Text, { className: "text-text-secondary", variant: "bodySmall", children: ["( ", count, " )"] })] }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { cn } from "../theme/tw";
|
|
3
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import { cn } from "../theme/tw.js";
|
|
3
|
+
import { Typography } from "../Typography/index.js";
|
|
4
4
|
import { ScrollView, View } from "react-native";
|
|
5
5
|
const alignClass = {
|
|
6
6
|
left: "text-left",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "
|
|
3
|
-
import { theme } from "../theme";
|
|
4
|
-
import { cn } from "../theme/tw";
|
|
5
|
-
import { Typography } from "../Typography";
|
|
6
|
-
import { formatDate, formatDateWithDefaultTimezone } from "../utils/date";
|
|
2
|
+
import Icon from "./Display.Icon.js";
|
|
3
|
+
import { theme } from "../theme/index.js";
|
|
4
|
+
import { cn } from "../theme/tw.js";
|
|
5
|
+
import { Typography } from "../Typography/index.js";
|
|
6
|
+
import { formatDate, formatDateWithDefaultTimezone } from "../utils/date.js";
|
|
7
7
|
import { View } from "react-native";
|
|
8
8
|
function relativeTime(value) {
|
|
9
9
|
const then = new Date(value).getTime();
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { type VariantProps } from "../theme/tw";
|
|
1
|
+
import { type VariantProps } from "../theme/tw.js";
|
|
2
2
|
declare const divider: import("tailwind-variants").TVReturnType<{
|
|
3
3
|
spacing: {
|
|
4
|
-
none:
|
|
5
|
-
sm:
|
|
6
|
-
md:
|
|
7
|
-
lg:
|
|
4
|
+
none: "my-0";
|
|
5
|
+
sm: "my-1";
|
|
6
|
+
md: "my-2";
|
|
7
|
+
lg: "my-3";
|
|
8
8
|
};
|
|
9
9
|
colorScheme: {
|
|
10
|
-
light:
|
|
11
|
-
default:
|
|
12
|
-
dark:
|
|
10
|
+
light: "bg-border-divider opacity-50";
|
|
11
|
+
default: "bg-border-divider";
|
|
12
|
+
dark: "bg-border-divider opacity-100";
|
|
13
13
|
};
|
|
14
14
|
}, undefined, "w-full bg-border-divider", {
|
|
15
15
|
spacing: {
|
|
16
|
-
none:
|
|
17
|
-
sm:
|
|
18
|
-
md:
|
|
19
|
-
lg:
|
|
16
|
+
none: "my-0";
|
|
17
|
+
sm: "my-1";
|
|
18
|
+
md: "my-2";
|
|
19
|
+
lg: "my-3";
|
|
20
20
|
};
|
|
21
21
|
colorScheme: {
|
|
22
|
-
light:
|
|
23
|
-
default:
|
|
24
|
-
dark:
|
|
22
|
+
light: "bg-border-divider opacity-50";
|
|
23
|
+
default: "bg-border-divider";
|
|
24
|
+
dark: "bg-border-divider opacity-100";
|
|
25
25
|
};
|
|
26
|
-
}, undefined, import("tailwind-variants").
|
|
26
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
27
27
|
spacing: {
|
|
28
|
-
none:
|
|
29
|
-
sm:
|
|
30
|
-
md:
|
|
31
|
-
lg:
|
|
28
|
+
none: "my-0";
|
|
29
|
+
sm: "my-1";
|
|
30
|
+
md: "my-2";
|
|
31
|
+
lg: "my-3";
|
|
32
32
|
};
|
|
33
33
|
colorScheme: {
|
|
34
|
-
light:
|
|
35
|
-
default:
|
|
36
|
-
dark:
|
|
34
|
+
light: "bg-border-divider opacity-50";
|
|
35
|
+
default: "bg-border-divider";
|
|
36
|
+
dark: "bg-border-divider opacity-100";
|
|
37
37
|
};
|
|
38
|
-
}, undefined
|
|
38
|
+
}, undefined>>;
|
|
39
39
|
interface DividerProps extends VariantProps<typeof divider> {
|
|
40
40
|
thickness?: number;
|
|
41
41
|
className?: string;
|