@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,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import { Typography } from "../Typography/index.js";
|
|
3
3
|
import { TouchableOpacity, View } from "react-native";
|
|
4
4
|
import { tv } from "tailwind-variants";
|
|
5
5
|
const radioButton = tv({
|
|
@@ -12,9 +12,9 @@ const radioButton = tv({
|
|
|
12
12
|
variants: {
|
|
13
13
|
selected: {
|
|
14
14
|
true: {
|
|
15
|
-
container: "border-
|
|
16
|
-
radioCircle: "border-
|
|
17
|
-
radioInner: "bg-
|
|
15
|
+
container: "border-primary bg-primary/10",
|
|
16
|
+
radioCircle: "border-primary",
|
|
17
|
+
radioInner: "bg-primary",
|
|
18
18
|
label: "text-text-primary font-semibold",
|
|
19
19
|
},
|
|
20
20
|
false: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { Display } from "../Display";
|
|
3
|
-
import { theme } from "../theme";
|
|
4
|
-
import { cn, tv } from "../theme/tw";
|
|
2
|
+
import { Display } from "../Display/index.js";
|
|
3
|
+
import { theme } from "../theme/index.js";
|
|
4
|
+
import { cn, tv } from "../theme/tw.js";
|
|
5
5
|
import { useState } from "react";
|
|
6
6
|
import { TextInput, TouchableOpacity, View } from "react-native";
|
|
7
7
|
const Icon = Display.Icon;
|
|
@@ -21,6 +21,6 @@ const searchBarContainer = tv({
|
|
|
21
21
|
*/
|
|
22
22
|
function SearchBar({ value, onChangeText, placeholder = "Search", className, }) {
|
|
23
23
|
const [isFocused, setIsFocused] = useState(false);
|
|
24
|
-
return (_jsxs(View, { className: cn(searchBarContainer({ focused: isFocused }), className), children: [_jsx(View, { className: "mr-1 ml-0.5 items-center justify-center h-full", children: _jsx(Icon, { className: "text-text-tertiary", name: "search", size: 18, type: "ionicons" }) }), _jsx(TextInput, { className: "flex-1 h-full text-sm py-0 px-1.5 text-text-primary", onBlur: () => setIsFocused(false), onChangeText: onChangeText, onFocus: () => setIsFocused(true), placeholder: placeholder, placeholderTextColor: theme.text.tertiary, value: value }), value.length > 0 && (_jsx(TouchableOpacity, { activeOpacity: 0.7, className: "mr-0.5 ml-1 items-center justify-center h-full px-1", onPress: () => onChangeText(""), children: _jsx(Icon, { className: "text-text-tertiary", name: "x", size: 18, type: "feather" }) }))] }));
|
|
24
|
+
return (_jsxs(View, { className: cn(searchBarContainer({ focused: isFocused }), className), children: [_jsx(View, { className: "mr-1 ml-0.5 items-center justify-center h-full", children: _jsx(Icon, { className: "text-text-tertiary", name: "search", size: 18, type: "ionicons" }) }), _jsx(TextInput, { className: "flex-1 h-full text-sm py-0 px-1.5 text-text-primary", onBlur: () => setIsFocused(false), onChangeText: onChangeText, onFocus: () => setIsFocused(true), placeholder: placeholder, placeholderTextColor: theme.text.tertiary, selectionColor: theme.primary, underlineColorAndroid: "transparent", value: value }), value.length > 0 && (_jsx(TouchableOpacity, { activeOpacity: 0.7, className: "mr-0.5 ml-1 items-center justify-center h-full px-1", onPress: () => onChangeText(""), children: _jsx(Icon, { className: "text-text-tertiary", name: "x", size: 18, type: "feather" }) }))] }));
|
|
25
25
|
}
|
|
26
26
|
export default SearchBar;
|
package/dist/Form/Form.Select.js
CHANGED
|
@@ -1,26 +1,41 @@
|
|
|
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";
|
|
7
|
-
import { useState } from "react";
|
|
8
|
-
import { Modal, Pressable as RNPressable, ScrollView, View } from "react-native";
|
|
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
|
+
import { useEffect, useRef, useState } from "react";
|
|
8
|
+
import { Animated, Modal, Pressable as RNPressable, ScrollView, View } from "react-native";
|
|
9
9
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
10
10
|
function Select({ options, value, onChange, label, placeholder = "Seleccionar…", title, disabled = false, className, testID, }) {
|
|
11
11
|
const insets = useSafeAreaInsets();
|
|
12
12
|
const [open, setOpen] = useState(false);
|
|
13
13
|
const selected = options.find((o) => o.value === value) ?? null;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
// eslint-disable-next-line react-hooks/refs
|
|
15
|
+
const translateY = useRef(new Animated.Value(800)).current;
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
if (open) {
|
|
18
|
+
Animated.spring(translateY, {
|
|
19
|
+
toValue: 0,
|
|
20
|
+
useNativeDriver: true,
|
|
21
|
+
damping: 20,
|
|
22
|
+
stiffness: 300,
|
|
23
|
+
}).start();
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
translateY.setValue(800);
|
|
27
|
+
}
|
|
28
|
+
}, [open, translateY]);
|
|
29
|
+
return (_jsxs(View, { className: cn("gap-1", className), testID: testID, children: [label ? (_jsx(Typography.Text, { className: "font-medium text-text-primary", variant: "bodySmall", children: label })) : null, _jsxs(Pressable, { accessibilityHint: "Abre la lista de opciones", accessibilityLabel: label ?? placeholder, accessibilityRole: "button", accessibilityState: { disabled }, className: "flex-row items-center justify-between rounded-lg border border-input bg-bg-card px-3 min-h-[44px]", disabled: disabled, onPress: () => setOpen(true), children: [_jsx(Typography.Text, { className: cn("flex-1 text-sm", selected ? "text-text-primary" : "text-text-tertiary"), numberOfLines: 1, children: selected ? selected.label : placeholder }), _jsx(Icon, { color: theme.icon.secondary, name: "chevron-down", size: 18 })] }), _jsx(Modal, { animationType: "none", onRequestClose: () => setOpen(false), presentationStyle: "overFullScreen", transparent: true, visible: open, children: _jsx(RNPressable, { className: "flex-1 justify-end bg-black/50", onPress: () => setOpen(false), children: _jsx(Animated.View, { style: { transform: [{ translateY }] }, children: _jsxs(RNPressable, { className: "rounded-t-3xl", style: {
|
|
30
|
+
backgroundColor: theme.bg.card,
|
|
31
|
+
paddingBottom: insets.bottom + 8,
|
|
32
|
+
maxHeight: "70%",
|
|
33
|
+
}, children: [_jsx(View, { className: "items-center pt-3 pb-1", children: _jsx(View, { className: "w-10 h-1 rounded-full bg-border-strong" }) }), title ? (_jsx(Typography.Text, { className: "text-text-primary px-4 py-2", semibold: true, variant: "body", children: title })) : null, _jsx(ScrollView, { children: options.map((option) => {
|
|
34
|
+
const isSelected = option.value === value;
|
|
35
|
+
return (_jsxs(Pressable, { accessibilityRole: "menuitem", accessibilityState: { selected: isSelected }, className: "flex-row items-center justify-between px-4 py-3 border-b border-border-light", onPress: () => {
|
|
36
|
+
onChange(option.value);
|
|
37
|
+
setOpen(false);
|
|
38
|
+
}, children: [_jsx(Typography.Text, { className: cn("flex-1 text-sm", isSelected ? "text-text-accent font-semibold" : "text-text-primary"), children: option.label }), isSelected ? (_jsx(Icon, { color: theme.text.accent, name: "checkmark", size: 18 })) : null] }, String(option.value)));
|
|
39
|
+
}) })] }) }) }) })] }));
|
|
25
40
|
}
|
|
26
41
|
export default Select;
|
package/dist/Form/Form.Slider.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
2
|
import RNSlider from "@react-native-community/slider";
|
|
3
|
-
import { theme } from "../theme";
|
|
4
|
-
import { cn } from "../theme/tw";
|
|
5
|
-
import { Typography } from "../Typography";
|
|
3
|
+
import { theme } from "../theme/index.js";
|
|
4
|
+
import { cn } from "../theme/tw.js";
|
|
5
|
+
import { Typography } from "../Typography/index.js";
|
|
6
6
|
import { View } from "react-native";
|
|
7
7
|
/**
|
|
8
8
|
* **Tokenized** slider (track in `primary`) on `@react-native-community/slider` — clean,
|
package/dist/Form/Form.Switch.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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 { Switch as RNSwitch, View } from "react-native";
|
|
6
6
|
function Switch({ value, onValueChange, label, disabled = false, className, testID, }) {
|
|
7
|
-
return (_jsxs(View, { className: cn("flex-row items-center justify-between gap-3", className), children: [label ? (_jsx(Typography.Text, { className: cn("flex-1 text-text-primary", disabled && "text-text-disabled"), children: label })) : null, _jsx(RNSwitch, { accessibilityLabel: label, accessibilityRole: "switch", accessibilityState: { checked: value, disabled }, disabled: disabled, ios_backgroundColor: theme.bg.muted, onValueChange: onValueChange, testID: testID, thumbColor: theme.bg.card, trackColor: { false: theme.bg.muted, true: theme.
|
|
7
|
+
return (_jsxs(View, { className: cn("flex-row items-center justify-between gap-3", className), children: [label ? (_jsx(Typography.Text, { className: cn("flex-1 text-text-primary", disabled && "text-text-disabled"), children: label })) : null, _jsx(RNSwitch, { accessibilityLabel: label, accessibilityRole: "switch", accessibilityState: { checked: value, disabled }, disabled: disabled, ios_backgroundColor: theme.bg.muted, onValueChange: onValueChange, testID: testID, thumbColor: theme.bg.card, trackColor: { false: theme.bg.muted, true: theme.primary }, value: value })] }));
|
|
8
8
|
}
|
|
9
9
|
export default Switch;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } 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 { TextInput } from "react-native";
|
|
5
5
|
const TextInputF = ({ className, ...props }) => {
|
|
6
|
-
return (_jsx(TextInput, { ...props, className: cn("border border-input rounded-md h-11 px-3 py-2 text-text-primary", className), placeholderTextColor: theme.text.tertiary, style: props.style }));
|
|
6
|
+
return (_jsx(TextInput, { ...props, className: cn("border border-input rounded-md h-11 px-3 py-2 text-text-primary", className), placeholderTextColor: theme.text.tertiary, selectionColor: theme.primary, style: props.style, underlineColorAndroid: "transparent" }));
|
|
7
7
|
};
|
|
8
8
|
export default TextInputF;
|
package/dist/Form/index.d.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import Checkbox from "
|
|
2
|
-
import ControlledCheckbox from "
|
|
3
|
-
import ControlledDropdown, { type DropdownOption } from "
|
|
4
|
-
import ControlledInput from "
|
|
5
|
-
import ControlledMonetaryInput from "
|
|
6
|
-
import ControlledRadioButton from "
|
|
7
|
-
import DatePicker from "
|
|
8
|
-
import Dropdown from "
|
|
9
|
-
import FAB from "
|
|
10
|
-
import { FilterButtonGroup } from "
|
|
11
|
-
import FractionalQuantityInput from "
|
|
12
|
-
import IconButton from "
|
|
13
|
-
import Input from "
|
|
14
|
-
import MonetaryInput from "
|
|
15
|
-
import PinInput from "
|
|
16
|
-
import QuantitySelector from "
|
|
17
|
-
import RadioButton from "
|
|
18
|
-
import SearchBar from "
|
|
19
|
-
import Select from "
|
|
20
|
-
import Slider from "
|
|
21
|
-
import Switch from "
|
|
1
|
+
import Checkbox from "./Form.Checkbox.js";
|
|
2
|
+
import ControlledCheckbox from "./Form.ControlledCheckbox.js";
|
|
3
|
+
import ControlledDropdown, { type DropdownOption } from "./Form.ControlledDropdown.js";
|
|
4
|
+
import ControlledInput from "./Form.ControlledInput.js";
|
|
5
|
+
import ControlledMonetaryInput from "./Form.ControlledMonetaryInput.js";
|
|
6
|
+
import ControlledRadioButton from "./Form.ControlledRadioButton.js";
|
|
7
|
+
import DatePicker from "./Form.DatePicker.js";
|
|
8
|
+
import Dropdown from "./Form.Dropdown.js";
|
|
9
|
+
import FAB from "./Form.FAB.js";
|
|
10
|
+
import { FilterButtonGroup } from "./Form.FilterButton.js";
|
|
11
|
+
import FractionalQuantityInput from "./Form.FractionalQuantityInput.js";
|
|
12
|
+
import IconButton from "./Form.IconButton.js";
|
|
13
|
+
import Input from "./Form.Input.js";
|
|
14
|
+
import MonetaryInput from "./Form.MonetaryInput.js";
|
|
15
|
+
import PinInput from "./Form.PinInput.js";
|
|
16
|
+
import QuantitySelector from "./Form.QuantitySelector.js";
|
|
17
|
+
import RadioButton from "./Form.RadioButton.js";
|
|
18
|
+
import SearchBar from "./Form.SearchBar.js";
|
|
19
|
+
import Select from "./Form.Select.js";
|
|
20
|
+
import Slider from "./Form.Slider.js";
|
|
21
|
+
import Switch from "./Form.Switch.js";
|
|
22
22
|
export declare const Form: {
|
|
23
|
-
TextInput: import("react").FC<import("
|
|
23
|
+
TextInput: import("react").FC<import("./Form.TextInput.js").TextInputFProps>;
|
|
24
24
|
Input: typeof Input;
|
|
25
|
-
InputField: import("react").FC<import("
|
|
26
|
-
Button: import("react").FC<import("
|
|
27
|
-
Icon: import("react").FC<import("
|
|
25
|
+
InputField: import("react").FC<import("./Form.InputField.js").InputFieldProps>;
|
|
26
|
+
Button: import("react").FC<import("./Form.Button.js").ButtonProps> & {
|
|
27
|
+
Icon: import("react").FC<import("./Form.Button.js").ButtonIconProps>;
|
|
28
28
|
};
|
|
29
29
|
IconButton: typeof IconButton;
|
|
30
|
-
PasswordInput: import("react").FC<import("
|
|
30
|
+
PasswordInput: import("react").FC<import("./Form.PasswordInput.js").PasswordFieldProps>;
|
|
31
31
|
QuantitySelector: typeof QuantitySelector;
|
|
32
32
|
FractionalQuantityInput: typeof FractionalQuantityInput;
|
|
33
33
|
RadioButton: typeof RadioButton;
|
|
@@ -46,7 +46,7 @@ export declare const Form: {
|
|
|
46
46
|
ControlledCheckbox: typeof ControlledCheckbox;
|
|
47
47
|
ControlledDropdown: typeof ControlledDropdown;
|
|
48
48
|
ControlledMonetaryInput: typeof ControlledMonetaryInput;
|
|
49
|
-
FilterButton: import("react").FC<import("
|
|
49
|
+
FilterButton: import("react").FC<import("./Form.FilterButton.js").FilterButtonProps>;
|
|
50
50
|
FilterButtonGroup: typeof FilterButtonGroup;
|
|
51
51
|
};
|
|
52
52
|
export { type DropdownOption };
|
package/dist/Form/index.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import ButtonWithIcon from "
|
|
2
|
-
import Checkbox from "
|
|
3
|
-
import ControlledCheckbox from "
|
|
4
|
-
import ControlledDropdown from "
|
|
5
|
-
import ControlledInput from "
|
|
6
|
-
import ControlledMonetaryInput from "
|
|
7
|
-
import ControlledRadioButton from "
|
|
8
|
-
import DatePicker from "
|
|
9
|
-
import Dropdown from "
|
|
10
|
-
import FAB from "
|
|
11
|
-
import { FilterButton, FilterButtonGroup } from "
|
|
12
|
-
import FractionalQuantityInput from "
|
|
13
|
-
import IconButton from "
|
|
14
|
-
import Input from "
|
|
15
|
-
import InputField from "
|
|
16
|
-
import MonetaryInput from "
|
|
17
|
-
import PasswordInput from "
|
|
18
|
-
import PinInput from "
|
|
19
|
-
import QuantitySelector from "
|
|
20
|
-
import RadioButton from "
|
|
21
|
-
import SearchBar from "
|
|
22
|
-
import Select from "
|
|
23
|
-
import Slider from "
|
|
24
|
-
import Switch from "
|
|
25
|
-
import TextInput from "
|
|
1
|
+
import ButtonWithIcon from "./Form.Button.js";
|
|
2
|
+
import Checkbox from "./Form.Checkbox.js";
|
|
3
|
+
import ControlledCheckbox from "./Form.ControlledCheckbox.js";
|
|
4
|
+
import ControlledDropdown from "./Form.ControlledDropdown.js";
|
|
5
|
+
import ControlledInput from "./Form.ControlledInput.js";
|
|
6
|
+
import ControlledMonetaryInput from "./Form.ControlledMonetaryInput.js";
|
|
7
|
+
import ControlledRadioButton from "./Form.ControlledRadioButton.js";
|
|
8
|
+
import DatePicker from "./Form.DatePicker.js";
|
|
9
|
+
import Dropdown from "./Form.Dropdown.js";
|
|
10
|
+
import FAB from "./Form.FAB.js";
|
|
11
|
+
import { FilterButton, FilterButtonGroup } from "./Form.FilterButton.js";
|
|
12
|
+
import FractionalQuantityInput from "./Form.FractionalQuantityInput.js";
|
|
13
|
+
import IconButton from "./Form.IconButton.js";
|
|
14
|
+
import Input from "./Form.Input.js";
|
|
15
|
+
import InputField from "./Form.InputField.js";
|
|
16
|
+
import MonetaryInput from "./Form.MonetaryInput.js";
|
|
17
|
+
import PasswordInput from "./Form.PasswordInput.js";
|
|
18
|
+
import PinInput from "./Form.PinInput.js";
|
|
19
|
+
import QuantitySelector from "./Form.QuantitySelector.js";
|
|
20
|
+
import RadioButton from "./Form.RadioButton.js";
|
|
21
|
+
import SearchBar from "./Form.SearchBar.js";
|
|
22
|
+
import Select from "./Form.Select.js";
|
|
23
|
+
import Slider from "./Form.Slider.js";
|
|
24
|
+
import Switch from "./Form.Switch.js";
|
|
25
|
+
import TextInput from "./Form.TextInput.js";
|
|
26
26
|
export const Form = {
|
|
27
27
|
TextInput,
|
|
28
28
|
Input,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type GradientPreset } from "../Display/Display.GradientSurface";
|
|
2
|
-
import { type PatternKind } from "../Display/Display.Pattern";
|
|
1
|
+
import { type GradientPreset } from "../Display/Display.GradientSurface.js";
|
|
2
|
+
import { type PatternKind } from "../Display/Display.Pattern.js";
|
|
3
3
|
import type { LinearGradientPoint } from "expo-linear-gradient";
|
|
4
4
|
import type { ReactNode } from "react";
|
|
5
5
|
export interface AppBarActionProps {
|
|
@@ -57,7 +57,7 @@ export interface AppBarProps {
|
|
|
57
57
|
* (no need to also set `tone="dark"`). Overrides the solid `tone` background.
|
|
58
58
|
*
|
|
59
59
|
* Preset: `background={{ surface: "mesh" }}`
|
|
60
|
-
* Custom: `background={{ colors: ["#
|
|
60
|
+
* Custom: `background={{ colors: ["#4A3100", "#C9A84C", "#8B6914", "#F0D060"] }}`
|
|
61
61
|
* With texture: `background={{ surface: "night-green", pattern: "dots" }}`
|
|
62
62
|
*/
|
|
63
63
|
background?: AppBarBackground;
|
|
@@ -78,7 +78,8 @@ export interface AppBarProps {
|
|
|
78
78
|
* Pass as the `background` prop — white text/icons are activated automatically.
|
|
79
79
|
*/
|
|
80
80
|
export interface AppBarBackground {
|
|
81
|
-
/** Named gradient preset: `"
|
|
81
|
+
/** Named gradient preset: `"warm"` (default), or `"brand"` (themeable). Legacy
|
|
82
|
+
* `"mesh" | "neon-teal" | "night-green" | "emerald"` presets still work but are deprecated. */
|
|
82
83
|
surface?: GradientPreset;
|
|
83
84
|
/** Custom color stops — overrides `surface`. Minimum 2 colors. */
|
|
84
85
|
colors?: readonly [string, string, ...string[]];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import GradientSurface from "../Display/Display.GradientSurface";
|
|
3
|
-
import Icon from "../Display/Display.Icon";
|
|
4
|
-
import { Pattern } from "../Display/Display.Pattern";
|
|
5
|
-
import Pressable from "../primitives/Pressable";
|
|
6
|
-
import { useTheme } from "../theme";
|
|
7
|
-
import { cn } from "../theme/tw";
|
|
8
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import GradientSurface from "../Display/Display.GradientSurface.js";
|
|
3
|
+
import Icon from "../Display/Display.Icon.js";
|
|
4
|
+
import { Pattern } from "../Display/Display.Pattern.js";
|
|
5
|
+
import Pressable from "../primitives/Pressable.js";
|
|
6
|
+
import { useTheme } from "../theme/index.js";
|
|
7
|
+
import { cn } from "../theme/tw.js";
|
|
8
|
+
import { Typography } from "../Typography/index.js";
|
|
9
9
|
import { StyleSheet, View } from "react-native";
|
|
10
10
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
11
11
|
/** Fallback for the `tone="dark"` hero surface when the theme has no `bg.inverse` token. */
|
|
@@ -22,7 +22,7 @@ function AppBarAction({ icon, label, onPress, badge, accessibilityLabel, tone =
|
|
|
22
22
|
: onDark
|
|
23
23
|
? "rgba(255,255,255,0.14)"
|
|
24
24
|
: tone === "tinted"
|
|
25
|
-
? theme.accent // solid brand-
|
|
25
|
+
? theme.accent // solid brand-gold squircle (FAB-style)
|
|
26
26
|
: theme.bg.card;
|
|
27
27
|
const iconColor = tone === "tinted"
|
|
28
28
|
? theme.text.onAccent // dark token on green surface
|
|
@@ -71,7 +71,7 @@ function AppBar({ title, subtitle, onBack, leading, actions, subheader, variant
|
|
|
71
71
|
const showTopBar = !large;
|
|
72
72
|
// Colored = any rich surface. `background` alone activates colored mode (white text/icons).
|
|
73
73
|
const colored = dark || gradient || hasBackground;
|
|
74
|
-
// gradient (
|
|
74
|
+
// gradient (brand gold) → dark text via onAccent. background → textColor prop (default white, since
|
|
75
75
|
// gradient surfaces are dark). dark tone → white always. text.inverse is NOT used here: it flips to
|
|
76
76
|
// near-black in dark-mode themes (semantic: "text on light surfaces"), wrong for dark gradient AppBars.
|
|
77
77
|
const onColoredText = gradient && !hasBackground
|
|
@@ -106,7 +106,7 @@ function AppBar({ title, subtitle, onBack, leading, actions, subheader, variant
|
|
|
106
106
|
? { borderBottomLeftRadius: 24, borderBottomRightRadius: 24, overflow: "hidden" }
|
|
107
107
|
: null),
|
|
108
108
|
...(showShadow ? theme.shadow.md : null),
|
|
109
|
-
}, testID: testID, children: [hasBackground ? (_jsx(GradientSurface, { colors: background.colors, end: background.end, padding: "none", preset: background.surface ?? "
|
|
109
|
+
}, testID: testID, children: [hasBackground ? (_jsx(GradientSurface, { colors: background.colors, end: background.end, padding: "none", preset: background.surface ?? "warm", radius: "none", start: background.start, style: StyleSheet.absoluteFill })) : gradient ? (_jsx(GradientSurface, { colors: theme.gradient.accent, padding: "none", radius: "none", style: StyleSheet.absoluteFill })) : null, background?.pattern ? (_jsx(Pattern, { color: background.patternColor ?? "#FFFFFF", kind: background.pattern, opacity: background.patternOpacity ?? 0.18 })) : null, showTopBar ? (_jsxs(View, { className: "flex-row items-center px-3 gap-2 min-h-[56px]", children: [_jsxs(View, { className: "flex-row items-center gap-2", style: { minWidth: 38 }, children: [onBack ? (_jsx(AppBarAction, { accessibilityLabel: "Volver", bare: backVariant === "plain", icon: "chevron-back", onDark: dark || gradient || hasBackground, onPress: onBack })) : null, leading] }), _jsxs(View, { className: cn("flex-1", centered && "items-center"), children: [title ? (_jsx(Typography.Text, { className: colored ? "" : "text-text-primary", numberOfLines: 1, semibold: true, style: titleStyle, variant: "subtitle", children: title })) : null, subtitle ? (_jsx(Typography.Text, { className: colored ? "" : "text-text-secondary", numberOfLines: 1, style: subtitleStyle, variant: "caption", children: subtitle })) : null] }), _jsx(View, { className: "flex-row items-center justify-end gap-2", style: { minWidth: 38 }, children: actions })] })) : null, large && title ? (_jsxs(View, { className: cn("flex-row px-4 pb-3", largeHasNav ? "items-center gap-2" : ""), style: { paddingTop: topSpacing != null ? topSpacing : 8 }, children: [onBack ? (_jsx(AppBarAction, { accessibilityLabel: "Volver", bare: backVariant === "plain", icon: "chevron-back", onDark: dark || gradient || hasBackground, onPress: onBack })) : null, leading, accentBar && !largeHasNav ? (_jsx(View, { style: {
|
|
110
110
|
width: 4,
|
|
111
111
|
marginRight: 10,
|
|
112
112
|
marginVertical: 2,
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "../Display/Display.Icon";
|
|
3
|
-
import Pressable from "../primitives/Pressable";
|
|
4
|
-
import { useTheme } 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 { relativeLuminance, useTheme } 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
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
9
|
-
|
|
9
|
+
/** Forced-dark chrome: prefer `bg.inverse` when it is actually dark, else `bg.card`. */
|
|
10
|
+
function resolveDarkSurface(theme) {
|
|
11
|
+
const candidate = theme.bg.inverse ?? theme.bg.card;
|
|
12
|
+
return relativeLuminance(candidate) < 0.25 ? candidate : theme.bg.card;
|
|
13
|
+
}
|
|
10
14
|
/**
|
|
11
15
|
* The single bottom-navigation component. Extensible by props, not by forking:
|
|
12
16
|
* `shape` (bar/floating), `tone` (light/dark), `indicator` (none/pill/pill-text/bar/glow),
|
|
@@ -19,9 +23,10 @@ function BottomNav({ items, value, onChange, showLabels = true, centerAction, sa
|
|
|
19
23
|
const rounded = shape === "floating" || dark;
|
|
20
24
|
const bottomPad = rounded ? 6 : safeArea ? insets.bottom : 0;
|
|
21
25
|
const activeTint = activeColor === "accent" ? theme.accent : theme.primary;
|
|
22
|
-
const onActive = activeColor === "accent" ? theme.text.onAccent : theme.
|
|
26
|
+
const onActive = activeColor === "accent" ? theme.text.onAccent : theme.text.onPrimary;
|
|
27
|
+
const brandText = theme.text.accent;
|
|
23
28
|
const inactiveColor = dark ? "rgba(255,255,255,0.55)" : theme.icon.secondary;
|
|
24
|
-
const surfaceColor = dark ?
|
|
29
|
+
const surfaceColor = dark ? resolveDarkSurface(theme) : theme.bg.card;
|
|
25
30
|
const containerStyle = rounded
|
|
26
31
|
? {
|
|
27
32
|
borderRadius: 32,
|
|
@@ -53,14 +58,18 @@ function BottomNav({ items, value, onChange, showLabels = true, centerAction, sa
|
|
|
53
58
|
}
|
|
54
59
|
// Variants none / pill / bar / glow — vertical icon + optional indicator + optional label.
|
|
55
60
|
const inPill = indicator === "pill" && active;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
let iconColor = inactiveColor;
|
|
62
|
+
if (inPill)
|
|
63
|
+
iconColor = onActive;
|
|
64
|
+
else if (active)
|
|
65
|
+
iconColor = brandText;
|
|
66
|
+
let labelColor = inactiveColor;
|
|
67
|
+
if (active && inPill)
|
|
68
|
+
labelColor = onActive;
|
|
69
|
+
else if (active && dark)
|
|
70
|
+
labelColor = theme.text.inverse;
|
|
71
|
+
else if (active)
|
|
72
|
+
labelColor = brandText;
|
|
64
73
|
return (_jsxs(Pressable, { accessibilityLabel: item.label ?? item.key, accessibilityRole: "tab", accessibilityState: { selected: active }, className: "flex-1 items-center justify-center py-1.5", onPress: () => onChange(item.key), children: [indicator === "bar" && active ? (_jsx(View, { style: {
|
|
65
74
|
position: "absolute",
|
|
66
75
|
top: 0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import AppBar from "
|
|
3
|
-
import { theme } from "../theme";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import AppBar from "./Navigation.AppBar.js";
|
|
3
|
+
import { theme } from "../theme/index.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { Animated, View } from "react-native";
|
|
6
6
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } 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 { View } from "react-native";
|
|
5
5
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
6
6
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "../Display/Display.Icon";
|
|
3
|
-
import Logo from "../Display/Display.Logo";
|
|
4
|
-
import GradientContainer from "../layouts/GradientContainer";
|
|
5
|
-
import { theme } from "../theme";
|
|
6
|
-
import { cn } from "../theme/tw";
|
|
7
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import Icon from "../Display/Display.Icon.js";
|
|
3
|
+
import Logo from "../Display/Display.Logo.js";
|
|
4
|
+
import GradientContainer from "../layouts/GradientContainer.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 { TouchableOpacity, View } from "react-native";
|
|
9
9
|
/**
|
|
10
10
|
* @deprecated Legacy style (forced gradient via `GradientContainer`). Use
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "nativewind/jsx-runtime";
|
|
2
|
-
import { Display } from "../Display";
|
|
3
|
-
import GradientContainer from "../layouts/GradientContainer";
|
|
4
|
-
import { theme } from "../theme";
|
|
5
|
-
import { cn } from "../theme/tw";
|
|
6
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import { Display } from "../Display/index.js";
|
|
3
|
+
import GradientContainer from "../layouts/GradientContainer.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 { TouchableOpacity, View } from "react-native";
|
|
8
8
|
const Icon = Display.Icon;
|
|
9
9
|
const Text = Typography.Text;
|
|
@@ -1,11 +1,11 @@
|
|
|
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 { useTheme } 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 { useTheme } from "../theme/index.js";
|
|
5
|
+
import { cn } from "../theme/tw.js";
|
|
6
|
+
import { Typography } from "../Typography/index.js";
|
|
7
7
|
import { cloneElement, useRef, useState } from "react";
|
|
8
|
-
import { Dimensions, Modal, Pressable as RNPressable, View } from "react-native";
|
|
8
|
+
import { Dimensions, Modal, Pressable as RNPressable, View, } from "react-native";
|
|
9
9
|
function Menu({ items, trigger, menuWidth = 220, testID }) {
|
|
10
10
|
const theme = useTheme();
|
|
11
11
|
const triggerRef = useRef(null);
|
|
@@ -21,7 +21,7 @@ function Menu({ items, trigger, menuWidth = 220, testID }) {
|
|
|
21
21
|
const top = anchor ? anchor.y + anchor.height + 4 : 0;
|
|
22
22
|
return (_jsxs(View, { collapsable: false, ref: triggerRef, testID: testID, children: [trigger ? (
|
|
23
23
|
// eslint-disable-next-line react-hooks/refs
|
|
24
|
-
cloneElement(trigger, { onPress: open })) : (_jsx(Pressable, { accessibilityLabel: "M\u00E1s opciones", accessibilityRole: "button", onPress: open, children: _jsx(Icon, { color: theme.icon.secondary, name: "ellipsis-vertical", size: 22 }) })), _jsx(Modal, { animationType: "fade", onRequestClose: close, transparent: true, visible: anchor !== null, children: _jsx(RNPressable, { onPress: close, style: { flex: 1 }, children: _jsx(View, { className: "rounded-lg py-1", style: {
|
|
24
|
+
cloneElement(trigger, { onPress: open })) : (_jsx(Pressable, { accessibilityLabel: "M\u00E1s opciones", accessibilityRole: "button", onPress: open, children: _jsx(Icon, { color: theme.icon.secondary, name: "ellipsis-vertical", size: 22 }) })), _jsx(Modal, { animationType: "fade", onRequestClose: close, presentationStyle: "overFullScreen", transparent: true, visible: anchor !== null, children: _jsx(RNPressable, { onPress: close, style: { flex: 1 }, children: _jsx(View, { className: "rounded-lg py-1", style: {
|
|
25
25
|
position: "absolute",
|
|
26
26
|
top,
|
|
27
27
|
right,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { useTheme } from "../theme";
|
|
3
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import { useTheme } from "../theme/index.js";
|
|
3
|
+
import { Typography } from "../Typography/index.js";
|
|
4
4
|
import { View } from "react-native";
|
|
5
5
|
/**
|
|
6
6
|
* Titled card that groups `Display.MenuButton` rows into a visual section.
|
|
@@ -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 { TouchableOpacity, View } from "react-native";
|
|
5
5
|
function RowItem({ item, className }) {
|
|
6
6
|
function rowContent() {
|
|
@@ -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 { useState } from "react";
|
|
8
8
|
import { TextInput, View } from "react-native";
|
|
9
9
|
/**
|
|
@@ -16,7 +16,7 @@ function SearchBar({ value, onChangeText, placeholder = "Buscar", onSubmit, onCl
|
|
|
16
16
|
height: 44,
|
|
17
17
|
borderWidth: 1,
|
|
18
18
|
borderColor: focused ? theme.border.focus : "transparent",
|
|
19
|
-
}, children: [_jsx(Icon, { color: focused ? theme.border.focus : theme.icon.tertiary, name: "search", size: 18 }), editable ? (_jsx(TextInput, { autoFocus: autoFocus, className: "flex-1 text-sm text-text-primary", onBlur: () => setFocused(false), onChangeText: onChangeText, onFocus: () => setFocused(true), onSubmitEditing: (e) => onSubmit?.(e.nativeEvent.text), placeholder: placeholder, placeholderTextColor: theme.text.tertiary, returnKeyType: "search", value: value })) : (_jsx(Typography.Text, { className: "flex-1 text-text-tertiary text-sm", numberOfLines: 1, children: value || placeholder })), editable && value.length > 0 ? (_jsx(Pressable, { accessibilityLabel: "Limpiar", hitSlop: 8, onPress: () => {
|
|
19
|
+
}, children: [_jsx(Icon, { color: focused ? theme.border.focus : theme.icon.tertiary, name: "search", size: 18 }), editable ? (_jsx(TextInput, { autoFocus: autoFocus, className: "flex-1 text-sm text-text-primary", onBlur: () => setFocused(false), onChangeText: onChangeText, onFocus: () => setFocused(true), onSubmitEditing: (e) => onSubmit?.(e.nativeEvent.text), placeholder: placeholder, placeholderTextColor: theme.text.tertiary, returnKeyType: "search", selectionColor: theme.primary, underlineColorAndroid: "transparent", value: value })) : (_jsx(Typography.Text, { className: "flex-1 text-text-tertiary text-sm", numberOfLines: 1, children: value || placeholder })), editable && value.length > 0 ? (_jsx(Pressable, { accessibilityLabel: "Limpiar", hitSlop: 8, onPress: () => {
|
|
20
20
|
onChangeText("");
|
|
21
21
|
onClear?.();
|
|
22
22
|
}, children: _jsx(Icon, { color: theme.icon.tertiary, name: "close-circle", size: 18 }) })) : null] }));
|
|
@@ -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 { useTheme } from "../theme";
|
|
4
|
-
import { cn } from "../theme/tw";
|
|
5
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import Icon from "../Display/Display.Icon.js";
|
|
3
|
+
import { useTheme } from "../theme/index.js";
|
|
4
|
+
import { cn } from "../theme/tw.js";
|
|
5
|
+
import { Typography } from "../Typography/index.js";
|
|
6
6
|
import { TouchableOpacity, View } from "react-native";
|
|
7
7
|
function SegmentedControl({ options, value, onChange, iconLayout = "top", className, testID, }) {
|
|
8
8
|
const theme = useTheme();
|