@retray-dev/ui-kit 12.1.0 → 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COMPONENTS.md +183 -147
- package/CONSUMER.md +2 -2
- package/DESIGN.md +2 -2
- package/README.md +13 -8
- package/dist/Accordion.d.mts +6 -0
- package/dist/Accordion.d.ts +6 -0
- package/dist/Accordion.js +62 -208
- package/dist/Accordion.mjs +6 -5
- package/dist/AlertBanner.js +29 -151
- package/dist/AlertBanner.mjs +3 -3
- package/dist/AppHeader.js +37 -233
- package/dist/AppHeader.mjs +6 -7
- package/dist/Avatar.d.mts +17 -1
- package/dist/Avatar.d.ts +17 -1
- package/dist/Avatar.js +80 -113
- package/dist/Avatar.mjs +2 -2
- package/dist/Badge.js +24 -147
- package/dist/Badge.mjs +3 -3
- package/dist/Button.js +86 -274
- package/dist/Button.mjs +6 -6
- package/dist/Card.js +15 -198
- package/dist/Card.mjs +4 -5
- package/dist/CategoryStrip.d.mts +0 -5
- package/dist/CategoryStrip.d.ts +0 -5
- package/dist/CategoryStrip.js +47 -263
- package/dist/CategoryStrip.mjs +6 -6
- package/dist/Checkbox.js +15 -198
- package/dist/Checkbox.mjs +5 -5
- package/dist/Chip.js +44 -234
- package/dist/Chip.mjs +7 -6
- package/dist/ConfirmDialog.js +100 -296
- package/dist/ConfirmDialog.mjs +7 -7
- package/dist/CurrencyDisplay.js +1 -112
- package/dist/CurrencyDisplay.mjs +2 -2
- package/dist/CurrencyInput.js +35 -160
- package/dist/CurrencyInput.mjs +5 -5
- package/dist/DetailRow.js +25 -148
- package/dist/DetailRow.mjs +3 -3
- package/dist/EmptyState.js +87 -275
- package/dist/EmptyState.mjs +7 -7
- package/dist/ErrorBoundary.js +32 -197
- package/dist/ErrorBoundary.mjs +4 -4
- package/dist/Form.js +1 -112
- package/dist/Form.mjs +2 -2
- package/dist/HolographicCard.d.mts +0 -28
- package/dist/HolographicCard.d.ts +0 -28
- package/dist/HolographicCard.js +20 -130
- package/dist/HolographicCard.mjs +9 -32
- package/dist/IconButton.js +36 -232
- package/dist/IconButton.mjs +5 -6
- package/dist/IconPicker.js +222 -927
- package/dist/IconPicker.mjs +5 -5
- package/dist/ImageUpload.d.mts +5 -1
- package/dist/ImageUpload.d.ts +5 -1
- package/dist/ImageUpload.js +32 -215
- package/dist/ImageUpload.mjs +5 -6
- package/dist/ImageViewer.js +75 -264
- package/dist/ImageViewer.mjs +8 -8
- package/dist/Input.d.mts +1 -1
- package/dist/Input.d.ts +1 -1
- package/dist/Input.js +35 -160
- package/dist/Input.mjs +4 -4
- package/dist/LabelValue.js +24 -147
- package/dist/LabelValue.mjs +3 -3
- package/dist/ListGroup.js +1 -112
- package/dist/ListGroup.mjs +2 -2
- package/dist/ListItem.js +38 -233
- package/dist/ListItem.mjs +5 -6
- package/dist/MediaCard.d.mts +0 -14
- package/dist/MediaCard.d.ts +0 -14
- package/dist/MediaCard.js +69 -313
- package/dist/MediaCard.mjs +5 -6
- package/dist/MenuGroup.js +1 -112
- package/dist/MenuGroup.mjs +2 -2
- package/dist/MenuItem.js +36 -232
- package/dist/MenuItem.mjs +5 -6
- package/dist/MonthPicker.js +8 -161
- package/dist/MonthPicker.mjs +3 -3
- package/dist/NumberStepper.js +40 -236
- package/dist/NumberStepper.mjs +5 -6
- package/dist/PagerDots.d.mts +1 -1
- package/dist/PagerDots.d.ts +1 -1
- package/dist/PagerDots.js +69 -222
- package/dist/PagerDots.mjs +6 -5
- package/dist/Pressable.js +14 -85
- package/dist/Pressable.mjs +4 -4
- package/dist/PricingCard.js +94 -279
- package/dist/PricingCard.mjs +8 -8
- package/dist/Progress.js +3 -121
- package/dist/Progress.mjs +3 -3
- package/dist/RadioGroup.js +52 -263
- package/dist/RadioGroup.mjs +5 -5
- package/dist/RetrayProvider.d.mts +1 -1
- package/dist/RetrayProvider.d.ts +1 -1
- package/dist/RetrayProvider.js +5 -6
- package/dist/RetrayProvider.mjs +3 -3
- package/dist/Select.d.mts +2 -1
- package/dist/Select.d.ts +2 -1
- package/dist/Select.js +24 -230
- package/dist/Select.mjs +4 -5
- package/dist/SelectableCard.d.mts +27 -0
- package/dist/SelectableCard.d.ts +27 -0
- package/dist/SelectableCard.js +335 -0
- package/dist/SelectableCard.mjs +8 -0
- package/dist/SelectableGrid.d.mts +0 -21
- package/dist/SelectableGrid.d.ts +0 -21
- package/dist/SelectableGrid.js +49 -269
- package/dist/SelectableGrid.mjs +5 -6
- package/dist/Separator.js +1 -112
- package/dist/Separator.mjs +2 -2
- package/dist/Sheet.js +16 -163
- package/dist/Sheet.mjs +3 -3
- package/dist/SheetSelect.js +39 -234
- package/dist/SheetSelect.mjs +6 -6
- package/dist/Skeleton.d.mts +3 -1
- package/dist/Skeleton.d.ts +3 -1
- package/dist/Skeleton.js +7 -124
- package/dist/Skeleton.mjs +3 -3
- package/dist/Slider.js +6 -159
- package/dist/Slider.mjs +3 -3
- package/dist/Spinner.js +3 -114
- package/dist/Spinner.mjs +2 -2
- package/dist/Stats.d.mts +4 -1
- package/dist/Stats.d.ts +4 -1
- package/dist/Stats.js +60 -234
- package/dist/Stats.mjs +5 -6
- package/dist/Switch.js +24 -173
- package/dist/Switch.mjs +5 -4
- package/dist/TabBar.js +43 -198
- package/dist/TabBar.mjs +5 -4
- package/dist/Tabs.js +15 -197
- package/dist/Tabs.mjs +5 -5
- package/dist/Text.js +9 -128
- package/dist/Text.mjs +2 -2
- package/dist/Textarea.d.mts +2 -1
- package/dist/Textarea.d.ts +2 -1
- package/dist/Textarea.js +71 -217
- package/dist/Textarea.mjs +4 -4
- package/dist/Toast.js +1 -112
- package/dist/Toast.mjs +2 -2
- package/dist/Toggle.js +39 -234
- package/dist/Toggle.mjs +6 -6
- package/dist/{chunk-FFTYLPSB.mjs → chunk-2QOHHBJC.mjs} +13 -7
- package/dist/{chunk-BCWEHE34.mjs → chunk-2VIDP72N.mjs} +3 -3
- package/dist/{chunk-PGERH3P7.mjs → chunk-4NQFTHN3.mjs} +13 -7
- package/dist/{chunk-3N2M3WZL.mjs → chunk-4ZO5PTKF.mjs} +4 -4
- package/dist/{chunk-MYZ2EDYU.mjs → chunk-5MYNAAFE.mjs} +13 -17
- package/dist/{chunk-E7NEHHXV.mjs → chunk-62BBSSUF.mjs} +3 -3
- package/dist/{chunk-ISY26JQJ.mjs → chunk-6CR4S6W2.mjs} +3 -3
- package/dist/{chunk-FUVYSVGR.mjs → chunk-6QLBHUEG.mjs} +8 -7
- package/dist/chunk-ARONDO7M.mjs +40 -0
- package/dist/{chunk-3UYAZ7I4.mjs → chunk-AZV7KNJI.mjs} +3 -3
- package/dist/{chunk-HLMPMUK2.mjs → chunk-BTUW5LSG.mjs} +11 -8
- package/dist/chunk-BULKGOIZ.mjs +235 -0
- package/dist/{chunk-265G6A46.mjs → chunk-CBIZLRYH.mjs} +29 -12
- package/dist/chunk-CM2DG4MR.mjs +142 -0
- package/dist/{chunk-2I2AYECM.mjs → chunk-DBHSUUKU.mjs} +2 -2
- package/dist/{chunk-P64WHW4A.mjs → chunk-DE25XTVQ.mjs} +3 -3
- package/dist/{chunk-DI7CBDL6.mjs → chunk-E4EQSCKR.mjs} +5 -5
- package/dist/{chunk-357YO24D.mjs → chunk-EHGBHFMH.mjs} +9 -17
- package/dist/{chunk-GK4VRMNE.mjs → chunk-EROPDCB5.mjs} +24 -27
- package/dist/{chunk-XBAGGKLW.mjs → chunk-ERWJPVX7.mjs} +2 -2
- package/dist/{chunk-LRM4AVYY.mjs → chunk-ESQDPO5E.mjs} +7 -7
- package/dist/{chunk-EFLFRAHD.mjs → chunk-EW2FIDSM.mjs} +1 -1
- package/dist/{chunk-7HSILTC4.mjs → chunk-FTTI6T5Q.mjs} +4 -4
- package/dist/{chunk-X26S5EVZ.mjs → chunk-HUSSF6TF.mjs} +1 -1
- package/dist/chunk-IFYMBOEN.mjs +14 -0
- package/dist/{chunk-S3KJCPEJ.mjs → chunk-IGU223UM.mjs} +80 -4
- package/dist/chunk-IJCMPVW5.mjs +121 -0
- package/dist/{chunk-I4V5XZPS.mjs → chunk-ITG4JQM3.mjs} +4 -4
- package/dist/{chunk-F4V6XLP4.mjs → chunk-K3QX2M26.mjs} +11 -8
- package/dist/{chunk-V6NFJXKO.mjs → chunk-K7TKID3V.mjs} +8 -7
- package/dist/{chunk-ZHMSAYLT.mjs → chunk-KAGADD2O.mjs} +4 -4
- package/dist/{chunk-3GEYJ7I5.mjs → chunk-KC5QDYGZ.mjs} +4 -4
- package/dist/{chunk-HJ46DTJE.mjs → chunk-KPTY7UYQ.mjs} +1 -1
- package/dist/{chunk-EMUWGDWC.mjs → chunk-KSSVIFYR.mjs} +11 -12
- package/dist/chunk-L3YKPTJQ.mjs +119 -0
- package/dist/chunk-M53LC4Q7.mjs +35 -0
- package/dist/{chunk-NXI4YDZ2.mjs → chunk-MP7GLMIR.mjs} +17 -25
- package/dist/chunk-MZ6WRTD2.mjs +40 -0
- package/dist/chunk-NGEN2EES.mjs +581 -0
- package/dist/{chunk-JULSIZDM.mjs → chunk-OBV72JD4.mjs} +1 -1
- package/dist/{chunk-2A2LEFZG.mjs → chunk-PGQ6FMXS.mjs} +6 -5
- package/dist/{chunk-BQZE3HAW.mjs → chunk-PI6RULJX.mjs} +1 -1
- package/dist/{chunk-FA2KMTH5.mjs → chunk-RA6SAAFE.mjs} +9 -8
- package/dist/{chunk-FVTVCJAH.mjs → chunk-RRKM4MKB.mjs} +7 -7
- package/dist/{chunk-AKM4EPOT.mjs → chunk-S2VGME7X.mjs} +1 -1
- package/dist/{chunk-OULVKTWL.mjs → chunk-S44XWTTC.mjs} +35 -25
- package/dist/{chunk-QSFV2P7O.mjs → chunk-SZEKQAOY.mjs} +1 -1
- package/dist/{chunk-N4ZPVCJH.mjs → chunk-TETMEKZE.mjs} +9 -9
- package/dist/{chunk-2CBQKU7H.mjs → chunk-TMH263OK.mjs} +5 -4
- package/dist/{chunk-D3Y2T42P.mjs → chunk-U6DEBYU5.mjs} +10 -9
- package/dist/{chunk-4WFMPFZB.mjs → chunk-UOKFSFNJ.mjs} +2 -2
- package/dist/{chunk-WOEWGSTU.mjs → chunk-URIH43IJ.mjs} +13 -21
- package/dist/{chunk-JCZQOY4O.mjs → chunk-V2ZB2XNS.mjs} +16 -10
- package/dist/{chunk-P73V2EKS.mjs → chunk-WIPEDNSD.mjs} +7 -7
- package/dist/{chunk-BOVUP27T.mjs → chunk-XCIG6HT2.mjs} +6 -5
- package/dist/chunk-Y6YS33GM.mjs +131 -0
- package/dist/{chunk-5OLNXP3S.mjs → chunk-ZKDKKQCE.mjs} +29 -7
- package/dist/{chunk-DF6DU42P.mjs → chunk-ZTPYUU5C.mjs} +5 -5
- package/dist/{index-wt-orHUi.d.ts → index-CY34hxPN.d.mts} +1 -0
- package/dist/{index-wt-orHUi.d.mts → index-CY34hxPN.d.ts} +1 -0
- package/dist/index.d.mts +15 -74
- package/dist/index.d.ts +15 -74
- package/dist/index.js +1055 -1562
- package/dist/index.mjs +81 -84
- package/package.json +8 -10
- package/src/components/Accordion/Accordion.tsx +32 -9
- package/src/components/AlertBanner/AlertBanner.tsx +7 -6
- package/src/components/AppHeader/AppHeader.tsx +1 -1
- package/src/components/Avatar/Avatar.tsx +92 -1
- package/src/components/Avatar/index.ts +2 -2
- package/src/components/Badge/Badge.tsx +2 -2
- package/src/components/Button/Button.tsx +64 -57
- package/src/components/Card/Card.tsx +1 -0
- package/src/components/CategoryStrip/CategoryStrip.tsx +36 -49
- package/src/components/Chip/Chip.tsx +5 -4
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +13 -6
- package/src/components/DetailRow/DetailRow.tsx +3 -3
- package/src/components/EmptyState/EmptyState.tsx +2 -2
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +6 -6
- package/src/components/HolographicCard/HolographicCard.tsx +14 -95
- package/src/components/IconButton/IconButton.tsx +2 -2
- package/src/components/IconPicker/IconPicker.tsx +13 -12
- package/src/components/ImageUpload/ImageUpload.tsx +24 -28
- package/src/components/ImageViewer/ImageViewer.tsx +3 -3
- package/src/components/Input/Input.tsx +11 -5
- package/src/components/LabelValue/LabelValue.tsx +2 -2
- package/src/components/ListItem/ListItem.tsx +4 -4
- package/src/components/MediaCard/MediaCard.tsx +21 -59
- package/src/components/MenuItem/MenuItem.tsx +2 -2
- package/src/components/MonthPicker/MonthPicker.tsx +2 -2
- package/src/components/NumberStepper/NumberStepper.tsx +6 -6
- package/src/components/PagerDots/PagerDots.tsx +38 -28
- package/src/components/PricingCard/PricingCard.tsx +6 -6
- package/src/components/RadioGroup/RadioGroup.tsx +18 -31
- package/src/components/Select/Select.tsx +32 -39
- package/src/components/SelectableCard/SelectableCard.tsx +302 -0
- package/src/components/SelectableCard/index.ts +1 -0
- package/src/components/SelectableGrid/SelectableGrid.tsx +38 -72
- package/src/components/Sheet/Sheet.tsx +11 -4
- package/src/components/SheetSelect/SheetSelect.tsx +3 -3
- package/src/components/Skeleton/Skeleton.tsx +6 -3
- package/src/components/Spinner/Spinner.tsx +2 -2
- package/src/components/Stats/Stats.tsx +36 -8
- package/src/components/Switch/Switch.tsx +9 -6
- package/src/components/TabBar/TabBar.tsx +9 -8
- package/src/components/Text/Text.tsx +12 -1
- package/src/components/Textarea/Textarea.tsx +18 -32
- package/src/components/Toggle/Toggle.tsx +3 -3
- package/src/hooks/useConfirmDialog.ts +31 -42
- package/src/index.ts +4 -4
- package/src/theme/ThemeProvider.tsx +1 -4
- package/src/theme/colorUtils.ts +1 -72
- package/src/theme/colors.ts +47 -1
- package/src/theme/types.ts +6 -3
- package/src/utils/animations.ts +0 -47
- package/src/utils/curatedIcons.ts +93 -801
- package/src/utils/haptics.ts +13 -208
- package/src/utils/icons.ts +27 -91
- package/src/utils/pressable.ts +10 -61
- package/dist/VirtualList.d.mts +0 -19
- package/dist/VirtualList.d.ts +0 -19
- package/dist/VirtualList.js +0 -38
- package/dist/VirtualList.mjs +0 -2
- package/dist/chunk-3DKJ2GIC.mjs +0 -30
- package/dist/chunk-AQEVCEXV.mjs +0 -164
- package/dist/chunk-DOGIPOF5.mjs +0 -131
- package/dist/chunk-DVK4G2GT.mjs +0 -59
- package/dist/chunk-EJ7ZPXOH.mjs +0 -163
- package/dist/chunk-J6Q2YJEV.mjs +0 -134
- package/dist/chunk-JNVAIDLK.mjs +0 -136
- package/dist/chunk-KA7LTET3.mjs +0 -71
- package/dist/chunk-KHYX4IOM.mjs +0 -1114
- package/dist/chunk-NC5ZTR2Y.mjs +0 -32
- package/dist/chunk-YNROWHQJ.mjs +0 -46
- package/src/components/VirtualList/VirtualList.tsx +0 -60
- package/src/components/VirtualList/index.ts +0 -1
- package/src/utils/fontGuard.ts +0 -35
- package/src/utils/hover.ts +0 -25
- package/src/utils/useColorTransition.ts +0 -40
- package/src/utils/usePressScale.ts +0 -75
|
@@ -1,56 +1,51 @@
|
|
|
1
|
-
import { Spinner } from './chunk-
|
|
2
|
-
import { PressableCard } from './chunk-
|
|
3
|
-
import { impactLight } from './chunk-
|
|
1
|
+
import { Spinner } from './chunk-2VIDP72N.mjs';
|
|
2
|
+
import { PressableCard } from './chunk-IFYMBOEN.mjs';
|
|
3
|
+
import { impactLight } from './chunk-ARONDO7M.mjs';
|
|
4
4
|
import { RADIUS } from './chunk-QY3X2UYR.mjs';
|
|
5
|
-
import { useTheme } from './chunk-
|
|
5
|
+
import { useTheme } from './chunk-KSSVIFYR.mjs';
|
|
6
6
|
import { s, vs, ms } from './chunk-2CE3TQVY.mjs';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import { __require } from './chunk-Y6FXYEAI.mjs';
|
|
8
|
+
import React, { useState } from 'react';
|
|
9
|
+
import { Image } from 'expo-image';
|
|
10
|
+
import { StyleSheet, View, Text } from 'react-native';
|
|
9
11
|
import { Feather } from '@expo/vector-icons';
|
|
10
12
|
|
|
11
13
|
function ImageUpload({
|
|
12
14
|
value,
|
|
13
15
|
onChange,
|
|
14
16
|
loading = false,
|
|
15
|
-
placeholder = "
|
|
17
|
+
placeholder = "Toca para a\xF1adir imagen",
|
|
16
18
|
showPlaceholderText = true,
|
|
17
19
|
width,
|
|
18
20
|
height = 200,
|
|
19
21
|
borderRadius = RADIUS.lg,
|
|
20
22
|
resizeMode = "cover",
|
|
23
|
+
allowsEditing = true,
|
|
21
24
|
disabled = false,
|
|
22
25
|
style,
|
|
23
|
-
accessibilityLabel
|
|
26
|
+
accessibilityLabel,
|
|
27
|
+
onPickerStarting
|
|
24
28
|
}) {
|
|
25
29
|
const { colors } = useTheme();
|
|
30
|
+
const [imageLoaded, setImageLoaded] = useState(false);
|
|
26
31
|
const handlePress = async () => {
|
|
27
32
|
if (disabled || loading) return;
|
|
28
33
|
impactLight();
|
|
34
|
+
onPickerStarting?.();
|
|
29
35
|
let picker;
|
|
30
36
|
try {
|
|
31
|
-
|
|
32
|
-
picker = mod.default;
|
|
37
|
+
picker = __require("expo-image-picker");
|
|
33
38
|
} catch {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} catch {
|
|
37
|
-
if (__DEV__) console.warn("[ImageUpload] expo-image-picker not installed.");
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
if (Platform.OS !== "web") {
|
|
42
|
-
try {
|
|
43
|
-
const { status } = await picker.requestMediaLibraryPermissionsAsync();
|
|
44
|
-
if (status !== "granted") return;
|
|
45
|
-
} catch {
|
|
46
|
-
}
|
|
39
|
+
if (__DEV__) console.warn("[ImageUpload] expo-image-picker not installed.");
|
|
40
|
+
return;
|
|
47
41
|
}
|
|
48
42
|
const result = await picker.launchImageLibraryAsync({
|
|
49
43
|
mediaTypes: ["images"],
|
|
50
|
-
allowsEditing
|
|
44
|
+
allowsEditing,
|
|
51
45
|
quality: 0.8
|
|
52
46
|
});
|
|
53
47
|
if (!result.canceled && result.assets?.[0]) {
|
|
48
|
+
setImageLoaded(false);
|
|
54
49
|
onChange?.(result.assets[0].uri);
|
|
55
50
|
}
|
|
56
51
|
};
|
|
@@ -61,7 +56,7 @@ function ImageUpload({
|
|
|
61
56
|
borderWidth: value ? 0 : 1,
|
|
62
57
|
borderStyle: "dashed",
|
|
63
58
|
borderColor: colors.border,
|
|
64
|
-
backgroundColor: value ? "transparent" : colors.surface,
|
|
59
|
+
backgroundColor: value && imageLoaded ? "transparent" : colors.surface,
|
|
65
60
|
overflow: "hidden"
|
|
66
61
|
};
|
|
67
62
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -72,7 +67,7 @@ function ImageUpload({
|
|
|
72
67
|
rippleColor: "transparent",
|
|
73
68
|
touchSoundDisabled: true,
|
|
74
69
|
accessibilityRole: "button",
|
|
75
|
-
accessibilityLabel: accessibilityLabel ?? (value ? "
|
|
70
|
+
accessibilityLabel: accessibilityLabel ?? (value ? "Cambiar imagen" : placeholder),
|
|
76
71
|
accessibilityState: { disabled: disabled || loading },
|
|
77
72
|
style: [containerStyle, style]
|
|
78
73
|
},
|
|
@@ -81,7 +76,9 @@ function ImageUpload({
|
|
|
81
76
|
{
|
|
82
77
|
source: { uri: value },
|
|
83
78
|
style: [StyleSheet.absoluteFillObject, { borderRadius }],
|
|
84
|
-
resizeMode
|
|
79
|
+
contentFit: resizeMode === "stretch" ? "fill" : resizeMode,
|
|
80
|
+
onLoad: () => setImageLoaded(true),
|
|
81
|
+
onError: () => setImageLoaded(true)
|
|
85
82
|
}
|
|
86
83
|
) : /* @__PURE__ */ React.createElement(View, { style: styles.placeholder }, /* @__PURE__ */ React.createElement(Feather, { name: "image", size: ms(28), color: colors.foregroundMuted }), showPlaceholderText ? /* @__PURE__ */ React.createElement(
|
|
87
84
|
Text,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ToastProvider } from './chunk-
|
|
2
|
-
import { ThemeProvider } from './chunk-
|
|
1
|
+
import { ToastProvider } from './chunk-SZEKQAOY.mjs';
|
|
2
|
+
import { ThemeProvider } from './chunk-KSSVIFYR.mjs';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { StyleSheet } from 'react-native';
|
|
5
5
|
import { SafeAreaProvider, initialWindowMetrics } from 'react-native-safe-area-context';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { impactLight } from './chunk-
|
|
1
|
+
import { impactLight } from './chunk-ARONDO7M.mjs';
|
|
2
2
|
import { RADIUS } from './chunk-QY3X2UYR.mjs';
|
|
3
|
-
import {
|
|
4
|
-
import { useTheme } from './chunk-
|
|
3
|
+
import { Icon } from './chunk-MZ6WRTD2.mjs';
|
|
4
|
+
import { useTheme } from './chunk-KSSVIFYR.mjs';
|
|
5
5
|
import { ms, vs, s, mvs } from './chunk-2CE3TQVY.mjs';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { StyleSheet, View, Text, TouchableOpacity } from 'react-native';
|
|
@@ -9,11 +9,11 @@ import { StyleSheet, View, Text, TouchableOpacity } from 'react-native';
|
|
|
9
9
|
function DefaultErrorFallback({
|
|
10
10
|
error,
|
|
11
11
|
reset,
|
|
12
|
-
title = "
|
|
12
|
+
title = "Algo sali\xF3 mal",
|
|
13
13
|
message
|
|
14
14
|
}) {
|
|
15
15
|
const { colors } = useTheme();
|
|
16
|
-
return /* @__PURE__ */ React.createElement(View, { style: [styles.container, { backgroundColor: colors.background }], accessibilityRole: "alert" }, /* @__PURE__ */ React.createElement(View, { style: [styles.iconCircle, { backgroundColor: colors.destructiveTint }] },
|
|
16
|
+
return /* @__PURE__ */ React.createElement(View, { style: [styles.container, { backgroundColor: colors.background }], accessibilityRole: "alert" }, /* @__PURE__ */ React.createElement(View, { style: [styles.iconCircle, { backgroundColor: colors.destructiveTint }] }, /* @__PURE__ */ React.createElement(Icon, { name: "alert-triangle", size: ms(28), color: colors.destructive })), /* @__PURE__ */ React.createElement(Text, { style: [styles.title, { color: colors.foreground }], allowFontScaling: true }, title), /* @__PURE__ */ React.createElement(Text, { style: [styles.message, { color: colors.foregroundMuted }], allowFontScaling: true }, message ?? error.message ?? "Ocurri\xF3 un error inesperado."), /* @__PURE__ */ React.createElement(
|
|
17
17
|
TouchableOpacity,
|
|
18
18
|
{
|
|
19
19
|
style: [styles.button, { backgroundColor: colors.primary }],
|
|
@@ -24,9 +24,9 @@ function DefaultErrorFallback({
|
|
|
24
24
|
activeOpacity: 0.85,
|
|
25
25
|
touchSoundDisabled: true,
|
|
26
26
|
accessibilityRole: "button",
|
|
27
|
-
accessibilityLabel: "
|
|
27
|
+
accessibilityLabel: "Intentar de nuevo"
|
|
28
28
|
},
|
|
29
|
-
/* @__PURE__ */ React.createElement(Text, { style: [styles.buttonLabel, { color: colors.primaryForeground }], allowFontScaling: true }, "
|
|
29
|
+
/* @__PURE__ */ React.createElement(Text, { style: [styles.buttonLabel, { color: colors.primaryForeground }], allowFontScaling: true }, "Intentar de nuevo")
|
|
30
30
|
));
|
|
31
31
|
}
|
|
32
32
|
var ErrorBoundary = class extends React.Component {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Button } from './chunk-
|
|
2
|
-
import {
|
|
3
|
-
import { useTheme } from './chunk-
|
|
1
|
+
import { Button } from './chunk-Y6YS33GM.mjs';
|
|
2
|
+
import { Icon } from './chunk-MZ6WRTD2.mjs';
|
|
3
|
+
import { useTheme } from './chunk-KSSVIFYR.mjs';
|
|
4
4
|
import { s, vs, mvs, ms } from './chunk-2CE3TQVY.mjs';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { StyleSheet, View, Text } from 'react-native';
|
|
@@ -8,7 +8,7 @@ import { StyleSheet, View, Text } from 'react-native';
|
|
|
8
8
|
function EmptyState({ icon, iconName, iconColor, title, description, action, actionLabel, onAction, size = "default", style }) {
|
|
9
9
|
const { colors } = useTheme();
|
|
10
10
|
const isCompact = size === "compact";
|
|
11
|
-
const effectiveIcon = iconName ?
|
|
11
|
+
const effectiveIcon = iconName ? /* @__PURE__ */ React.createElement(Icon, { name: iconName, size: isCompact ? 32 : 48, color: iconColor ?? colors.foregroundMuted }) : icon;
|
|
12
12
|
return /* @__PURE__ */ React.createElement(
|
|
13
13
|
View,
|
|
14
14
|
{
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createAnimatedPressable } from 'pressto';
|
|
2
|
+
|
|
3
|
+
// src/utils/pressable.ts
|
|
4
|
+
var makePressable = (scale) => createAnimatedPressable((progress) => {
|
|
5
|
+
"worklet";
|
|
6
|
+
return { transform: [{ scale: 1 - (1 - scale) * progress }] };
|
|
7
|
+
});
|
|
8
|
+
var PressableButton = makePressable(0.95);
|
|
9
|
+
var PressableCard = makePressable(0.98);
|
|
10
|
+
var PressableRow = makePressable(0.97);
|
|
11
|
+
var PressableChip = makePressable(0.94);
|
|
12
|
+
var PressableTab = makePressable(0.95);
|
|
13
|
+
|
|
14
|
+
export { PressableButton, PressableCard, PressableChip, PressableRow, PressableTab };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { useTheme } from './chunk-
|
|
2
|
-
import { s, ms } from './chunk-2CE3TQVY.mjs';
|
|
1
|
+
import { useTheme } from './chunk-KSSVIFYR.mjs';
|
|
2
|
+
import { s, ms, vs } from './chunk-2CE3TQVY.mjs';
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { Image } from 'expo-image';
|
|
5
|
+
import { StyleSheet, View, Text, TouchableOpacity } from 'react-native';
|
|
5
6
|
|
|
6
7
|
var sizeMap = {
|
|
7
8
|
sm: s(28),
|
|
@@ -92,6 +93,66 @@ function AvatarBase({ src, fallback, fallbackText, size = "md", status, style })
|
|
|
92
93
|
);
|
|
93
94
|
}
|
|
94
95
|
var Avatar = React.memo(AvatarBase);
|
|
96
|
+
function AvatarGroup({
|
|
97
|
+
users,
|
|
98
|
+
max = 3,
|
|
99
|
+
size = "sm",
|
|
100
|
+
overlap = vs(8),
|
|
101
|
+
onOverflowPress,
|
|
102
|
+
style
|
|
103
|
+
}) {
|
|
104
|
+
const { colors } = useTheme();
|
|
105
|
+
const visible = users.slice(0, max);
|
|
106
|
+
const overflowCount = users.length - max;
|
|
107
|
+
const dimension = sizeMap[size];
|
|
108
|
+
return /* @__PURE__ */ React.createElement(View, { style: [styles.group, style], accessibilityLabel: `${users.length} avatares` }, visible.map((user, i) => /* @__PURE__ */ React.createElement(
|
|
109
|
+
View,
|
|
110
|
+
{
|
|
111
|
+
key: `${user.name}-${i}`,
|
|
112
|
+
style: [
|
|
113
|
+
styles.groupItem,
|
|
114
|
+
i > 0 && { marginLeft: -overlap },
|
|
115
|
+
{ zIndex: visible.length - i }
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
/* @__PURE__ */ React.createElement(
|
|
119
|
+
Avatar,
|
|
120
|
+
{
|
|
121
|
+
src: user.src,
|
|
122
|
+
fallbackText: user.name,
|
|
123
|
+
size
|
|
124
|
+
}
|
|
125
|
+
)
|
|
126
|
+
)), overflowCount > 0 ? /* @__PURE__ */ React.createElement(
|
|
127
|
+
TouchableOpacity,
|
|
128
|
+
{
|
|
129
|
+
style: [
|
|
130
|
+
styles.overflowBadge,
|
|
131
|
+
{
|
|
132
|
+
width: dimension,
|
|
133
|
+
height: dimension,
|
|
134
|
+
borderRadius: dimension / 2,
|
|
135
|
+
backgroundColor: colors.surfaceStrong,
|
|
136
|
+
marginLeft: -overlap
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
onPress: onOverflowPress,
|
|
140
|
+
disabled: !onOverflowPress,
|
|
141
|
+
activeOpacity: 0.7,
|
|
142
|
+
accessibilityRole: "button",
|
|
143
|
+
accessibilityLabel: `${overflowCount} avatares m\xE1s`
|
|
144
|
+
},
|
|
145
|
+
/* @__PURE__ */ React.createElement(
|
|
146
|
+
Text,
|
|
147
|
+
{
|
|
148
|
+
style: [styles.overflowText, { color: colors.foregroundMuted }],
|
|
149
|
+
allowFontScaling: true
|
|
150
|
+
},
|
|
151
|
+
"+",
|
|
152
|
+
overflowCount
|
|
153
|
+
)
|
|
154
|
+
) : null);
|
|
155
|
+
}
|
|
95
156
|
var styles = StyleSheet.create({
|
|
96
157
|
wrapper: {
|
|
97
158
|
alignSelf: "flex-start",
|
|
@@ -108,7 +169,22 @@ var styles = StyleSheet.create({
|
|
|
108
169
|
position: "absolute",
|
|
109
170
|
bottom: 0,
|
|
110
171
|
right: 0
|
|
172
|
+
},
|
|
173
|
+
group: {
|
|
174
|
+
flexDirection: "row",
|
|
175
|
+
alignItems: "center"
|
|
176
|
+
},
|
|
177
|
+
groupItem: {
|
|
178
|
+
borderRadius: 999
|
|
179
|
+
},
|
|
180
|
+
overflowBadge: {
|
|
181
|
+
alignItems: "center",
|
|
182
|
+
justifyContent: "center"
|
|
183
|
+
},
|
|
184
|
+
overflowText: {
|
|
185
|
+
fontFamily: "Sohne-SemiBold",
|
|
186
|
+
fontSize: ms(11)
|
|
111
187
|
}
|
|
112
188
|
});
|
|
113
189
|
|
|
114
|
-
export { Avatar };
|
|
190
|
+
export { Avatar, AvatarGroup };
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { COLOR_TRANSITION, SPRING_ELASTIC } from './chunk-M53LC4Q7.mjs';
|
|
2
|
+
import { PressableButton } from './chunk-IFYMBOEN.mjs';
|
|
3
|
+
import { selectionAsync } from './chunk-ARONDO7M.mjs';
|
|
4
|
+
import { useTheme } from './chunk-KSSVIFYR.mjs';
|
|
5
|
+
import { mvs, ms, s, vs } from './chunk-2CE3TQVY.mjs';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { StyleSheet, View, Text } from 'react-native';
|
|
8
|
+
import { EaseView } from 'react-native-ease';
|
|
9
|
+
|
|
10
|
+
function RadioItem({
|
|
11
|
+
option,
|
|
12
|
+
selected,
|
|
13
|
+
onSelect
|
|
14
|
+
}) {
|
|
15
|
+
const { colors } = useTheme();
|
|
16
|
+
return /* @__PURE__ */ React.createElement(
|
|
17
|
+
PressableButton,
|
|
18
|
+
{
|
|
19
|
+
style: [styles.row, option.disabled && styles.rowDisabled],
|
|
20
|
+
onPress: () => {
|
|
21
|
+
if (!option.disabled) {
|
|
22
|
+
selectionAsync();
|
|
23
|
+
onSelect();
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
enabled: !option.disabled,
|
|
27
|
+
rippleColor: "transparent",
|
|
28
|
+
touchSoundDisabled: true,
|
|
29
|
+
accessibilityRole: "radio",
|
|
30
|
+
accessibilityLabel: option.label,
|
|
31
|
+
accessibilityState: { checked: selected, disabled: !!option.disabled }
|
|
32
|
+
},
|
|
33
|
+
/* @__PURE__ */ React.createElement(
|
|
34
|
+
EaseView,
|
|
35
|
+
{
|
|
36
|
+
style: styles.radio,
|
|
37
|
+
animate: { borderColor: selected ? colors.primary : colors.border },
|
|
38
|
+
transition: COLOR_TRANSITION
|
|
39
|
+
},
|
|
40
|
+
/* @__PURE__ */ React.createElement(
|
|
41
|
+
EaseView,
|
|
42
|
+
{
|
|
43
|
+
style: [styles.dot, { backgroundColor: colors.primary }],
|
|
44
|
+
animate: { scale: selected ? 1 : 0, opacity: selected ? 1 : 0 },
|
|
45
|
+
transition: SPRING_ELASTIC
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ React.createElement(
|
|
50
|
+
Text,
|
|
51
|
+
{
|
|
52
|
+
style: [styles.label, { color: colors.foreground }],
|
|
53
|
+
allowFontScaling: true
|
|
54
|
+
},
|
|
55
|
+
option.label
|
|
56
|
+
)
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
function RadioGroup({
|
|
60
|
+
options,
|
|
61
|
+
value,
|
|
62
|
+
onValueChange,
|
|
63
|
+
orientation = "vertical",
|
|
64
|
+
style,
|
|
65
|
+
accessibilityLabel
|
|
66
|
+
}) {
|
|
67
|
+
return /* @__PURE__ */ React.createElement(
|
|
68
|
+
View,
|
|
69
|
+
{
|
|
70
|
+
style: [styles.container, orientation === "horizontal" && styles.horizontal, style],
|
|
71
|
+
accessibilityRole: "radiogroup",
|
|
72
|
+
accessibilityLabel
|
|
73
|
+
},
|
|
74
|
+
options.map((option) => /* @__PURE__ */ React.createElement(
|
|
75
|
+
RadioItem,
|
|
76
|
+
{
|
|
77
|
+
key: option.value,
|
|
78
|
+
option,
|
|
79
|
+
selected: option.value === value,
|
|
80
|
+
onSelect: () => onValueChange?.(option.value)
|
|
81
|
+
}
|
|
82
|
+
))
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
var styles = StyleSheet.create({
|
|
86
|
+
container: {
|
|
87
|
+
gap: vs(12)
|
|
88
|
+
},
|
|
89
|
+
horizontal: {
|
|
90
|
+
flexDirection: "row",
|
|
91
|
+
flexWrap: "wrap"
|
|
92
|
+
},
|
|
93
|
+
row: {
|
|
94
|
+
flexDirection: "row",
|
|
95
|
+
alignItems: "center",
|
|
96
|
+
gap: s(12)
|
|
97
|
+
},
|
|
98
|
+
rowDisabled: {
|
|
99
|
+
opacity: 0.45
|
|
100
|
+
},
|
|
101
|
+
radio: {
|
|
102
|
+
width: s(24),
|
|
103
|
+
height: s(24),
|
|
104
|
+
borderRadius: s(12),
|
|
105
|
+
borderWidth: 1.5,
|
|
106
|
+
alignItems: "center",
|
|
107
|
+
justifyContent: "center"
|
|
108
|
+
},
|
|
109
|
+
dot: {
|
|
110
|
+
width: s(10),
|
|
111
|
+
height: s(10),
|
|
112
|
+
borderRadius: s(5)
|
|
113
|
+
},
|
|
114
|
+
label: {
|
|
115
|
+
fontFamily: "Sohne-Regular",
|
|
116
|
+
fontSize: ms(14),
|
|
117
|
+
lineHeight: mvs(20)
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
export { RadioGroup };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { selectionAsync } from './chunk-
|
|
2
|
-
import { useTheme } from './chunk-
|
|
1
|
+
import { selectionAsync } from './chunk-ARONDO7M.mjs';
|
|
2
|
+
import { useTheme } from './chunk-KSSVIFYR.mjs';
|
|
3
3
|
import { s, mvs, ms } from './chunk-2CE3TQVY.mjs';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { StyleSheet, View, TouchableOpacity, Text } from 'react-native';
|
|
@@ -50,7 +50,7 @@ function MonthPicker({ value, onChange, minValue, maxValue, locale = "en", forma
|
|
|
50
50
|
activeOpacity: 0.6,
|
|
51
51
|
touchSoundDisabled: true,
|
|
52
52
|
accessibilityRole: "button",
|
|
53
|
-
accessibilityLabel: "
|
|
53
|
+
accessibilityLabel: "Mes anterior",
|
|
54
54
|
accessibilityState: { disabled: prevDisabled },
|
|
55
55
|
hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }
|
|
56
56
|
},
|
|
@@ -72,7 +72,7 @@ function MonthPicker({ value, onChange, minValue, maxValue, locale = "en", forma
|
|
|
72
72
|
activeOpacity: 0.6,
|
|
73
73
|
touchSoundDisabled: true,
|
|
74
74
|
accessibilityRole: "button",
|
|
75
|
-
accessibilityLabel: "
|
|
75
|
+
accessibilityLabel: "Mes siguiente",
|
|
76
76
|
accessibilityState: { disabled: nextDisabled },
|
|
77
77
|
hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }
|
|
78
78
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Badge } from './chunk-
|
|
2
|
-
import { Button } from './chunk-
|
|
1
|
+
import { Badge } from './chunk-AZV7KNJI.mjs';
|
|
2
|
+
import { Button } from './chunk-Y6YS33GM.mjs';
|
|
3
3
|
import { RADIUS, SHADOWS } from './chunk-QY3X2UYR.mjs';
|
|
4
|
-
import {
|
|
5
|
-
import { useTheme } from './chunk-
|
|
4
|
+
import { Icon } from './chunk-MZ6WRTD2.mjs';
|
|
5
|
+
import { useTheme } from './chunk-KSSVIFYR.mjs';
|
|
6
6
|
import { mvs, ms, vs, s } from './chunk-2CE3TQVY.mjs';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { StyleSheet, View, Text } from 'react-native';
|
|
@@ -40,10 +40,13 @@ function PricingCard({
|
|
|
40
40
|
/* @__PURE__ */ React.createElement(View, { style: styles.header }, /* @__PURE__ */ React.createElement(Text, { style: [styles.name, { color: colors.foreground }], allowFontScaling: true }, name), badge ? /* @__PURE__ */ React.createElement(Badge, { label: badge, variant: highlighted ? "default" : "secondary", size: "sm" }) : null),
|
|
41
41
|
/* @__PURE__ */ React.createElement(View, { style: styles.priceRow }, /* @__PURE__ */ React.createElement(Text, { style: [styles.price, { color: colors.foreground }], allowFontScaling: true }, price), period ? /* @__PURE__ */ React.createElement(Text, { style: [styles.period, { color: colors.foregroundMuted }], allowFontScaling: true }, period) : null),
|
|
42
42
|
description ? /* @__PURE__ */ React.createElement(Text, { style: [styles.description, { color: colors.foregroundMuted }], allowFontScaling: true }, description) : null,
|
|
43
|
-
features.length > 0 ? /* @__PURE__ */ React.createElement(View, { style: styles.features }, features.map(normalize).map((f, i) => /* @__PURE__ */ React.createElement(View, { key: i, style: styles.featureRow },
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
features.length > 0 ? /* @__PURE__ */ React.createElement(View, { style: styles.features }, features.map(normalize).map((f, i) => /* @__PURE__ */ React.createElement(View, { key: i, style: styles.featureRow }, /* @__PURE__ */ React.createElement(
|
|
44
|
+
Icon,
|
|
45
|
+
{
|
|
46
|
+
name: f.included ? "check" : "minus",
|
|
47
|
+
size: ms(16),
|
|
48
|
+
color: f.included ? colors.success : colors.foregroundMuted
|
|
49
|
+
}
|
|
47
50
|
), /* @__PURE__ */ React.createElement(
|
|
48
51
|
Text,
|
|
49
52
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RADIUS } from './chunk-QY3X2UYR.mjs';
|
|
2
|
-
import {
|
|
3
|
-
import { useTheme } from './chunk-
|
|
2
|
+
import { Icon } from './chunk-MZ6WRTD2.mjs';
|
|
3
|
+
import { useTheme } from './chunk-KSSVIFYR.mjs';
|
|
4
4
|
import { s, vs, ms } from './chunk-2CE3TQVY.mjs';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { StyleSheet, View, Text, TouchableOpacity } from 'react-native';
|
|
@@ -18,7 +18,7 @@ function AlertBanner({ title, description, variant = "default", icon, iconName,
|
|
|
18
18
|
// a meaningful chromatic signal when an accent is defined.
|
|
19
19
|
/* @__PURE__ */ React.createElement(Entypo, { name: "info-with-circle", size: ms(16), color: accentColor })
|
|
20
20
|
);
|
|
21
|
-
const effectiveIcon = iconName ?
|
|
21
|
+
const effectiveIcon = iconName ? /* @__PURE__ */ React.createElement(Icon, { name: iconName, size: ms(16), color: iconColor ?? accentColor }) : icon ?? defaultIcon;
|
|
22
22
|
const a11yLabel = description ? `${title}. ${description}` : title;
|
|
23
23
|
return /* @__PURE__ */ React.createElement(
|
|
24
24
|
View,
|
|
@@ -38,9 +38,10 @@ function AlertBanner({ title, description, variant = "default", icon, iconName,
|
|
|
38
38
|
{
|
|
39
39
|
onPress: onDismiss,
|
|
40
40
|
style: styles.dismissButton,
|
|
41
|
+
hitSlop: { top: 10, bottom: 10, left: 10, right: 10 },
|
|
41
42
|
activeOpacity: 0.6,
|
|
42
43
|
accessibilityRole: "button",
|
|
43
|
-
accessibilityLabel: "
|
|
44
|
+
accessibilityLabel: "Descartar"
|
|
44
45
|
},
|
|
45
46
|
/* @__PURE__ */ React.createElement(Feather, { name: "x", size: ms(16), color: colors.foregroundMuted })
|
|
46
47
|
) : null
|
|
@@ -71,9 +72,9 @@ var styles = StyleSheet.create({
|
|
|
71
72
|
fontSize: ms(12)
|
|
72
73
|
},
|
|
73
74
|
dismissButton: {
|
|
74
|
-
padding: s(
|
|
75
|
-
marginTop: vs(-
|
|
76
|
-
marginRight: -s(
|
|
75
|
+
padding: s(10),
|
|
76
|
+
marginTop: vs(-8),
|
|
77
|
+
marginRight: -s(10)
|
|
77
78
|
}
|
|
78
79
|
});
|
|
79
80
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useTheme } from './chunk-
|
|
1
|
+
import { Icon } from './chunk-MZ6WRTD2.mjs';
|
|
2
|
+
import { useTheme } from './chunk-KSSVIFYR.mjs';
|
|
3
3
|
import { mvs, ms, s } from './chunk-2CE3TQVY.mjs';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { StyleSheet, View, Text } from 'react-native';
|
|
@@ -26,8 +26,8 @@ function DetailRowBase({
|
|
|
26
26
|
valueStyle
|
|
27
27
|
}) {
|
|
28
28
|
const { colors } = useTheme();
|
|
29
|
-
const resolvedLeftIcon = leftIconName ?
|
|
30
|
-
const resolvedRightIcon = rightIconName ?
|
|
29
|
+
const resolvedLeftIcon = leftIconName ? /* @__PURE__ */ React.createElement(Icon, { name: leftIconName, size: ms(14), color: leftIconColor ?? colors.foregroundMuted }) : leftIcon;
|
|
30
|
+
const resolvedRightIcon = rightIconName ? /* @__PURE__ */ React.createElement(Icon, { name: rightIconName, size: ms(14), color: rightIconColor ?? colors.foregroundMuted }) : null;
|
|
31
31
|
const separatorStyle = separator === "none" ? null : {
|
|
32
32
|
flex: 1,
|
|
33
33
|
height: 1,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useTheme } from './chunk-
|
|
1
|
+
import { SPRINGS } from './chunk-M53LC4Q7.mjs';
|
|
2
|
+
import { PressableTab } from './chunk-IFYMBOEN.mjs';
|
|
3
|
+
import { selectionAsync } from './chunk-ARONDO7M.mjs';
|
|
4
|
+
import { useTheme } from './chunk-KSSVIFYR.mjs';
|
|
5
5
|
import { ms, s, vs } from './chunk-2CE3TQVY.mjs';
|
|
6
6
|
import React, { useState, useRef, useCallback, useEffect } from 'react';
|
|
7
7
|
import { StyleSheet, View, Text } from 'react-native';
|
|
@@ -12,6 +12,13 @@ function hexToRgb(hex) {
|
|
|
12
12
|
b: parseInt(full.slice(4, 6), 16)
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
+
function withAlpha(hex, alpha) {
|
|
16
|
+
const rgb = hexToRgb(hex);
|
|
17
|
+
if (!rgb) return hex;
|
|
18
|
+
return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${alpha})`;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// src/theme/colors.ts
|
|
15
22
|
function componentToHex(c) {
|
|
16
23
|
return Math.round(Math.max(0, Math.min(255, c))).toString(16).padStart(2, "0");
|
|
17
24
|
}
|
|
@@ -52,13 +59,6 @@ function darken(hex, amount) {
|
|
|
52
59
|
if (!rgb) return hex;
|
|
53
60
|
return rgbToHex(rgb.r * (1 - amount), rgb.g * (1 - amount), rgb.b * (1 - amount));
|
|
54
61
|
}
|
|
55
|
-
function withAlpha(hex, alpha) {
|
|
56
|
-
const rgb = hexToRgb(hex);
|
|
57
|
-
if (!rgb) return hex;
|
|
58
|
-
return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${alpha})`;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// src/theme/colors.ts
|
|
62
62
|
var defaultLight = {
|
|
63
63
|
background: "#ffffff",
|
|
64
64
|
foreground: "#1a1a1a",
|
|
@@ -104,6 +104,7 @@ function deriveColors(t, scheme) {
|
|
|
104
104
|
const foregroundMuted = mixWithBackground(t.foreground, bg, 0.62);
|
|
105
105
|
const surface = dark ? lighten(bg, -0.06) : darken(bg, 0.04);
|
|
106
106
|
const surfaceStrong = dark ? lighten(bg, -0.12) : darken(bg, 0.08);
|
|
107
|
+
const skeleton = dark ? lighten(bg, -0.1) : darken(bg, 0.1);
|
|
107
108
|
const destructiveTint = dark ? withAlphaOnDark(t.destructive, 0.15, bg) : withAlphaOnWhite(t.destructive, 0.08);
|
|
108
109
|
const destructiveBorder = dark ? withAlphaOnDark(t.destructive, 0.45, bg) : withAlphaOnWhite(t.destructive, 0.3);
|
|
109
110
|
const successTint = dark ? withAlphaOnDark(t.success, 0.15, bg) : withAlphaOnWhite(t.success, 0.08);
|
|
@@ -116,6 +117,7 @@ function deriveColors(t, scheme) {
|
|
|
116
117
|
foregroundMuted,
|
|
117
118
|
surface,
|
|
118
119
|
surfaceStrong,
|
|
120
|
+
skeleton,
|
|
119
121
|
destructiveTint,
|
|
120
122
|
destructiveBorder,
|
|
121
123
|
successTint,
|
|
@@ -130,10 +132,7 @@ function deriveColors(t, scheme) {
|
|
|
130
132
|
separator: dark ? lighten(t.border, 0.22) : darken(t.border, 0.16)
|
|
131
133
|
};
|
|
132
134
|
}
|
|
133
|
-
var ThemeContext = createContext(
|
|
134
|
-
colors: deriveColors(defaultLight, "light"),
|
|
135
|
-
colorScheme: "light"
|
|
136
|
-
});
|
|
135
|
+
var ThemeContext = createContext(void 0);
|
|
137
136
|
function ThemeProvider({ children, theme, colorScheme = "system" }) {
|
|
138
137
|
const systemScheme = useColorScheme() ?? "light";
|
|
139
138
|
const resolvedScheme = colorScheme === "system" ? systemScheme : colorScheme;
|
|
@@ -153,4 +152,4 @@ function useTheme() {
|
|
|
153
152
|
return context;
|
|
154
153
|
}
|
|
155
154
|
|
|
156
|
-
export { ThemeProvider, defaultDark, defaultLight, deriveColors, useTheme, withAlpha };
|
|
155
|
+
export { ThemeProvider, defaultDark, defaultLight, deriveColors, hexToRgb, useTheme, withAlpha };
|