@retray-dev/ui-kit 10.1.0 → 12.1.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 +419 -38
- package/README.md +14 -5
- package/dist/Accordion.js +1 -1
- package/dist/Accordion.mjs +3 -3
- package/dist/AlertBanner.js +1 -1
- package/dist/AlertBanner.mjs +3 -3
- package/dist/AppHeader.js +1 -1
- package/dist/AppHeader.mjs +4 -4
- package/dist/Avatar.mjs +2 -2
- package/dist/Badge.js +1 -1
- package/dist/Badge.mjs +3 -3
- package/dist/Button.js +1 -1
- package/dist/Button.mjs +3 -3
- package/dist/Card.mjs +2 -2
- package/dist/CategoryStrip.js +1 -1
- package/dist/CategoryStrip.mjs +3 -3
- package/dist/Checkbox.mjs +2 -2
- package/dist/Chip.js +1 -1
- package/dist/Chip.mjs +3 -3
- package/dist/ConfirmDialog.d.mts +1 -6
- package/dist/ConfirmDialog.d.ts +1 -6
- package/dist/ConfirmDialog.js +30 -24
- package/dist/ConfirmDialog.mjs +4 -4
- package/dist/CurrencyDisplay.mjs +2 -2
- package/dist/CurrencyInput.d.mts +3 -8
- package/dist/CurrencyInput.d.ts +3 -8
- package/dist/CurrencyInput.js +4 -2
- package/dist/CurrencyInput.mjs +4 -4
- package/dist/DetailRow.d.mts +1 -1
- package/dist/DetailRow.d.ts +1 -1
- package/dist/DetailRow.js +1 -1
- package/dist/DetailRow.mjs +3 -3
- package/dist/EmptyState.js +1 -1
- package/dist/EmptyState.mjs +4 -4
- package/dist/ErrorBoundary.js +1 -1
- package/dist/ErrorBoundary.mjs +3 -3
- package/dist/Form.mjs +2 -2
- package/dist/IconButton.js +1 -1
- package/dist/IconButton.mjs +3 -3
- package/dist/IconPicker.d.mts +17 -0
- package/dist/IconPicker.d.ts +17 -0
- package/dist/IconPicker.js +1424 -0
- package/dist/IconPicker.mjs +8 -0
- package/dist/ImageUpload.d.mts +3 -1
- package/dist/ImageUpload.d.ts +3 -1
- package/dist/ImageUpload.js +28 -10
- package/dist/ImageUpload.mjs +3 -3
- package/dist/ImageViewer.js +1 -1
- package/dist/ImageViewer.mjs +5 -5
- package/dist/Input.js +1 -1
- package/dist/Input.mjs +3 -3
- package/dist/LabelValue.js +1 -1
- package/dist/LabelValue.mjs +3 -3
- package/dist/ListGroup.mjs +2 -2
- package/dist/ListItem.d.mts +7 -7
- package/dist/ListItem.d.ts +7 -7
- package/dist/ListItem.js +13 -8
- package/dist/ListItem.mjs +3 -3
- package/dist/MediaCard.js +1 -1
- package/dist/MediaCard.mjs +3 -3
- package/dist/MenuGroup.mjs +2 -2
- package/dist/MenuItem.js +1 -1
- package/dist/MenuItem.mjs +3 -3
- package/dist/MonthPicker.mjs +2 -2
- package/dist/NumberStepper.d.mts +19 -0
- package/dist/NumberStepper.d.ts +19 -0
- package/dist/NumberStepper.js +410 -0
- package/dist/NumberStepper.mjs +9 -0
- package/dist/PagerDots.js +1 -1
- package/dist/PagerDots.mjs +3 -3
- package/dist/Pressable.d.mts +15 -7
- package/dist/Pressable.d.ts +15 -7
- package/dist/Pressable.js +7 -3
- package/dist/Pressable.mjs +1 -1
- package/dist/PricingCard.js +1 -1
- package/dist/PricingCard.mjs +5 -5
- package/dist/Progress.mjs +2 -2
- package/dist/RadioGroup.mjs +2 -2
- package/dist/RetrayProvider.mjs +3 -3
- package/dist/Select.mjs +2 -2
- package/dist/SelectableGrid.js +1 -1
- package/dist/SelectableGrid.mjs +3 -3
- package/dist/Separator.mjs +2 -2
- package/dist/Sheet.d.mts +4 -46
- package/dist/Sheet.d.ts +4 -46
- package/dist/Sheet.js +46 -114
- package/dist/Sheet.mjs +2 -3
- package/dist/SheetSelect.js +1 -1
- package/dist/SheetSelect.mjs +3 -3
- package/dist/Skeleton.mjs +2 -2
- package/dist/Slider.mjs +2 -2
- package/dist/Spinner.mjs +2 -2
- package/dist/Stats.d.mts +30 -0
- package/dist/Stats.d.ts +30 -0
- package/dist/Stats.js +429 -0
- package/dist/Stats.mjs +9 -0
- package/dist/Switch.mjs +2 -2
- package/dist/TabBar.js +1 -1
- package/dist/TabBar.mjs +3 -3
- package/dist/Tabs.mjs +2 -2
- package/dist/Text.d.mts +3 -1
- package/dist/Text.d.ts +3 -1
- package/dist/Text.js +3 -3
- package/dist/Text.mjs +2 -2
- package/dist/Textarea.js +1 -1
- package/dist/Textarea.mjs +3 -3
- package/dist/Toast.mjs +2 -2
- package/dist/Toggle.js +1 -1
- package/dist/Toggle.mjs +3 -3
- package/dist/{chunk-DJ7RN37L.mjs → chunk-265G6A46.mjs} +2 -2
- package/dist/{chunk-WOEYDUJZ.mjs → chunk-2A2LEFZG.mjs} +2 -2
- package/dist/{chunk-ID72TK46.mjs → chunk-2CBQKU7H.mjs} +1 -1
- package/dist/{chunk-OB4JUQ3O.mjs → chunk-2I2AYECM.mjs} +1 -1
- package/dist/{chunk-WJLKJMKR.mjs → chunk-357YO24D.mjs} +4 -4
- package/dist/{chunk-GQYFLP3D.mjs → chunk-3GEYJ7I5.mjs} +1 -1
- package/dist/{chunk-AV4EMIRH.mjs → chunk-3N2M3WZL.mjs} +1 -1
- package/dist/{chunk-TERDKCLE.mjs → chunk-3UYAZ7I4.mjs} +2 -2
- package/dist/{chunk-JMOZEC77.mjs → chunk-4WFMPFZB.mjs} +1 -1
- package/dist/chunk-5OLNXP3S.mjs +144 -0
- package/dist/{chunk-6OAZJ577.mjs → chunk-7HSILTC4.mjs} +3 -3
- package/dist/{chunk-IRRY3CRZ.mjs → chunk-AKM4EPOT.mjs} +1 -1
- package/dist/{chunk-VGTDN7SW.mjs → chunk-AQEVCEXV.mjs} +2 -2
- package/dist/{chunk-WBOOUHSS.mjs → chunk-BCWEHE34.mjs} +1 -1
- package/dist/{chunk-AJ7ZDNBT.mjs → chunk-BOVUP27T.mjs} +1 -1
- package/dist/{chunk-BRKYVJVV.mjs → chunk-BQZE3HAW.mjs} +1 -1
- package/dist/{chunk-MLF3EZFW.mjs → chunk-D3Y2T42P.mjs} +2 -2
- package/dist/{chunk-3U4SSNWP.mjs → chunk-DF6DU42P.mjs} +2 -2
- package/dist/{chunk-ZJKGQMYH.mjs → chunk-DI7CBDL6.mjs} +2 -2
- package/dist/{chunk-2TFTAWVJ.mjs → chunk-DOGIPOF5.mjs} +2 -2
- package/dist/{chunk-MBMXYJJV.mjs → chunk-E7NEHHXV.mjs} +7 -3
- package/dist/{chunk-MX6HRKMI.mjs → chunk-EFLFRAHD.mjs} +1 -1
- package/dist/{chunk-SOYNZDVY.mjs → chunk-EMUWGDWC.mjs} +6 -1
- package/dist/{chunk-4I7D47FH.mjs → chunk-F4V6XLP4.mjs} +4 -4
- package/dist/{chunk-UREA2GYY.mjs → chunk-FA2KMTH5.mjs} +2 -2
- package/dist/{chunk-Y2NS74WS.mjs → chunk-FFTYLPSB.mjs} +46 -98
- package/dist/{chunk-OHBNABL5.mjs → chunk-FUVYSVGR.mjs} +14 -9
- package/dist/{chunk-KIHCWCWL.mjs → chunk-FVTVCJAH.mjs} +2 -2
- package/dist/{chunk-Y4GL2MHX.mjs → chunk-GK4VRMNE.mjs} +30 -12
- package/dist/{chunk-6Q64UFIA.mjs → chunk-HJ46DTJE.mjs} +1 -1
- package/dist/{chunk-WF2XDFRK.mjs → chunk-HLMPMUK2.mjs} +1 -1
- package/dist/{chunk-GD6KXMG5.mjs → chunk-I4V5XZPS.mjs} +1 -1
- package/dist/{chunk-AZJF2BLK.mjs → chunk-ISY26JQJ.mjs} +2 -2
- package/dist/{chunk-X4G6APW6.mjs → chunk-J6Q2YJEV.mjs} +1 -1
- package/dist/{chunk-KZL5VTYK.mjs → chunk-JCZQOY4O.mjs} +31 -24
- package/dist/{chunk-CZCQZHG6.mjs → chunk-JNVAIDLK.mjs} +2 -2
- package/dist/{chunk-SOA2Z4RB.mjs → chunk-JULSIZDM.mjs} +1 -1
- package/dist/{chunk-T7XZ7H7Y.mjs → chunk-KA7LTET3.mjs} +17 -3
- package/dist/chunk-KHYX4IOM.mjs +1114 -0
- package/dist/{chunk-LXJIIOYQ.mjs → chunk-LRM4AVYY.mjs} +2 -2
- package/dist/{chunk-VQ57HWPL.mjs → chunk-MYZ2EDYU.mjs} +2 -2
- package/dist/chunk-N4ZPVCJH.mjs +126 -0
- package/dist/{chunk-NA7PARID.mjs → chunk-NXI4YDZ2.mjs} +2 -2
- package/dist/{chunk-4K625MVM.mjs → chunk-OULVKTWL.mjs} +2 -2
- package/dist/{chunk-A4MDAP7G.mjs → chunk-P64WHW4A.mjs} +2 -2
- package/dist/{chunk-URI2WBIV.mjs → chunk-P73V2EKS.mjs} +2 -2
- package/dist/{chunk-ZUR7AU5R.mjs → chunk-PGERH3P7.mjs} +2 -2
- package/dist/{chunk-2UYENBLV.mjs → chunk-QSFV2P7O.mjs} +1 -1
- package/dist/{chunk-JT7HKXRB.mjs → chunk-S3KJCPEJ.mjs} +1 -1
- package/dist/{chunk-6MKGPAR2.mjs → chunk-V6NFJXKO.mjs} +2 -2
- package/dist/{chunk-A3A6KNQN.mjs → chunk-WOEWGSTU.mjs} +1 -1
- package/dist/{chunk-JUXSWN54.mjs → chunk-X26S5EVZ.mjs} +4 -2
- package/dist/{chunk-YFZ3ELX5.mjs → chunk-XBAGGKLW.mjs} +2 -2
- package/dist/{chunk-JB67UOB5.mjs → chunk-ZHMSAYLT.mjs} +2 -2
- package/dist/fonts.d.mts +1 -7
- package/dist/fonts.d.ts +1 -7
- package/dist/fonts.js +0 -2
- package/dist/fonts.mjs +1 -2
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +1831 -475
- package/dist/index.mjs +54 -51
- package/package.json +3 -3
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +39 -30
- package/src/components/CurrencyInput/CurrencyInput.tsx +4 -7
- package/src/components/DetailRow/DetailRow.tsx +1 -1
- package/src/components/IconPicker/IconPicker.tsx +395 -0
- package/src/components/IconPicker/index.ts +1 -0
- package/src/components/ImageUpload/ImageUpload.tsx +34 -12
- package/src/components/ListItem/ListItem.tsx +43 -28
- package/src/components/NumberStepper/NumberStepper.tsx +147 -0
- package/src/components/NumberStepper/index.ts +1 -0
- package/src/components/Pressable/Pressable.tsx +20 -8
- package/src/components/Sheet/Sheet.tsx +64 -172
- package/src/components/Stats/Stats.tsx +226 -0
- package/src/components/Stats/index.ts +2 -0
- package/src/components/Text/Text.tsx +4 -2
- package/src/fonts.ts +0 -7
- package/src/index.ts +7 -1
- package/src/theme/colorUtils.ts +9 -0
- package/src/utils/curatedIcons.ts +849 -0
- package/src/utils/fontGuard.ts +2 -1
- package/src/utils/icons.ts +20 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PressableButton } from './chunk-3DKJ2GIC.mjs';
|
|
2
2
|
import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
|
|
3
3
|
import { COLOR_TRANSITION } from './chunk-DVK4G2GT.mjs';
|
|
4
|
-
import { renderIcon } from './chunk-
|
|
5
|
-
import { useTheme } from './chunk-
|
|
4
|
+
import { renderIcon } from './chunk-KA7LTET3.mjs';
|
|
5
|
+
import { useTheme } from './chunk-EMUWGDWC.mjs';
|
|
6
6
|
import { vs, s, ms } from './chunk-2CE3TQVY.mjs';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { StyleSheet, View, Text } from 'react-native';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Spinner } from './chunk-
|
|
1
|
+
import { Spinner } from './chunk-BCWEHE34.mjs';
|
|
2
2
|
import { PressableCard } from './chunk-3DKJ2GIC.mjs';
|
|
3
3
|
import { impactLight } from './chunk-EJ7ZPXOH.mjs';
|
|
4
4
|
import { RADIUS } from './chunk-QY3X2UYR.mjs';
|
|
5
|
-
import { useTheme } from './chunk-
|
|
5
|
+
import { useTheme } from './chunk-EMUWGDWC.mjs';
|
|
6
6
|
import { s, vs, ms } from './chunk-2CE3TQVY.mjs';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { StyleSheet, Image, View, Text, Platform } from 'react-native';
|
|
@@ -13,6 +13,7 @@ function ImageUpload({
|
|
|
13
13
|
onChange,
|
|
14
14
|
loading = false,
|
|
15
15
|
placeholder = "Tap to add image",
|
|
16
|
+
showPlaceholderText = true,
|
|
16
17
|
width,
|
|
17
18
|
height = 200,
|
|
18
19
|
borderRadius = RADIUS.lg,
|
|
@@ -25,23 +26,31 @@ function ImageUpload({
|
|
|
25
26
|
const handlePress = async () => {
|
|
26
27
|
if (disabled || loading) return;
|
|
27
28
|
impactLight();
|
|
28
|
-
let
|
|
29
|
+
let picker;
|
|
29
30
|
try {
|
|
30
|
-
|
|
31
|
+
const mod = await import('expo-image-picker/build/ExponentImagePicker');
|
|
32
|
+
picker = mod.default;
|
|
31
33
|
} catch {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
try {
|
|
35
|
+
picker = await import('expo-image-picker');
|
|
36
|
+
} catch {
|
|
37
|
+
if (__DEV__) console.warn("[ImageUpload] expo-image-picker not installed.");
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
34
40
|
}
|
|
35
41
|
if (Platform.OS !== "web") {
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
try {
|
|
43
|
+
const { status } = await picker.requestMediaLibraryPermissionsAsync();
|
|
44
|
+
if (status !== "granted") return;
|
|
45
|
+
} catch {
|
|
46
|
+
}
|
|
38
47
|
}
|
|
39
|
-
const result = await
|
|
48
|
+
const result = await picker.launchImageLibraryAsync({
|
|
40
49
|
mediaTypes: ["images"],
|
|
41
50
|
allowsEditing: true,
|
|
42
51
|
quality: 0.8
|
|
43
52
|
});
|
|
44
|
-
if (!result.canceled && result.assets[0]) {
|
|
53
|
+
if (!result.canceled && result.assets?.[0]) {
|
|
45
54
|
onChange?.(result.assets[0].uri);
|
|
46
55
|
}
|
|
47
56
|
};
|
|
@@ -74,7 +83,15 @@ function ImageUpload({
|
|
|
74
83
|
style: [StyleSheet.absoluteFillObject, { borderRadius }],
|
|
75
84
|
resizeMode
|
|
76
85
|
}
|
|
77
|
-
) : /* @__PURE__ */ React.createElement(View, { style: styles.placeholder }, /* @__PURE__ */ React.createElement(Feather, { name: "image", size: ms(28), color: colors.foregroundMuted }), /* @__PURE__ */ React.createElement(
|
|
86
|
+
) : /* @__PURE__ */ React.createElement(View, { style: styles.placeholder }, /* @__PURE__ */ React.createElement(Feather, { name: "image", size: ms(28), color: colors.foregroundMuted }), showPlaceholderText ? /* @__PURE__ */ React.createElement(
|
|
87
|
+
Text,
|
|
88
|
+
{
|
|
89
|
+
style: [styles.placeholderText, { color: colors.foregroundMuted }],
|
|
90
|
+
numberOfLines: 1,
|
|
91
|
+
allowFontScaling: true
|
|
92
|
+
},
|
|
93
|
+
placeholder
|
|
94
|
+
) : null),
|
|
78
95
|
loading ? /* @__PURE__ */ React.createElement(View, { style: [styles.loadingOverlay, { backgroundColor: colors.overlay }] }, /* @__PURE__ */ React.createElement(Spinner, { size: "md" })) : null,
|
|
79
96
|
value && !loading ? /* @__PURE__ */ React.createElement(View, { style: styles.editBadge, pointerEvents: "none" }, /* @__PURE__ */ React.createElement(View, { style: [styles.editBadgeInner, { backgroundColor: colors.overlay }] }, /* @__PURE__ */ React.createElement(Feather, { name: "edit-2", size: ms(12), color: "#fff" }))) : null
|
|
80
97
|
);
|
|
@@ -88,7 +105,8 @@ var styles = StyleSheet.create({
|
|
|
88
105
|
},
|
|
89
106
|
placeholderText: {
|
|
90
107
|
fontFamily: "Sohne-Regular",
|
|
91
|
-
fontSize: ms(13)
|
|
108
|
+
fontSize: ms(13),
|
|
109
|
+
textAlign: "center"
|
|
92
110
|
},
|
|
93
111
|
loadingOverlay: {
|
|
94
112
|
...StyleSheet.absoluteFillObject,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
|
|
2
2
|
import { COLOR_TRANSITION, SPRING_ELASTIC, OPACITY_TRANSITION } from './chunk-DVK4G2GT.mjs';
|
|
3
|
-
import { useTheme } from './chunk-
|
|
3
|
+
import { useTheme } from './chunk-EMUWGDWC.mjs';
|
|
4
4
|
import { s } from './chunk-2CE3TQVY.mjs';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { StyleSheet, View, TouchableOpacity } from 'react-native';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
|
|
2
|
-
import { useTheme } from './chunk-
|
|
2
|
+
import { useTheme } from './chunk-EMUWGDWC.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';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IconButton } from './chunk-
|
|
1
|
+
import { IconButton } from './chunk-DF6DU42P.mjs';
|
|
2
2
|
import { BREAKPOINTS } from './chunk-QY3X2UYR.mjs';
|
|
3
|
-
import { useTheme } from './chunk-
|
|
3
|
+
import { useTheme } from './chunk-EMUWGDWC.mjs';
|
|
4
4
|
import { mvs, ms, vs, s } from './chunk-2CE3TQVY.mjs';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { StyleSheet, useWindowDimensions, View, Text } from 'react-native';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { usePressScale } from './chunk-YNROWHQJ.mjs';
|
|
2
2
|
import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
|
|
3
3
|
import { PRESS_SCALE, COLOR_TRANSITION, SPRING_ELASTIC } from './chunk-DVK4G2GT.mjs';
|
|
4
|
-
import { useTheme } from './chunk-
|
|
4
|
+
import { useTheme } from './chunk-EMUWGDWC.mjs';
|
|
5
5
|
import { mvs, ms, s, vs } from './chunk-2CE3TQVY.mjs';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { StyleSheet, View, TouchableOpacity, Text } from 'react-native';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Button } from './chunk-
|
|
1
|
+
import { Button } from './chunk-DOGIPOF5.mjs';
|
|
2
2
|
import { impactMedium, notificationSuccess, selectionAsync } from './chunk-EJ7ZPXOH.mjs';
|
|
3
|
-
import { useTheme } from './chunk-
|
|
3
|
+
import { useTheme } from './chunk-EMUWGDWC.mjs';
|
|
4
4
|
import { vs, mvs, ms, s } from './chunk-2CE3TQVY.mjs';
|
|
5
|
-
import React, { useRef, useEffect } from 'react';
|
|
5
|
+
import React, { useRef, useId, useEffect, useCallback } from 'react';
|
|
6
6
|
import { StyleSheet, View, Text, TouchableOpacity } from 'react-native';
|
|
7
|
-
import
|
|
7
|
+
import { BottomSheetBackdrop, BottomSheetModal, BottomSheetView } from '@gorhom/bottom-sheet';
|
|
8
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
8
9
|
import { Feather } from '@expo/vector-icons';
|
|
9
10
|
|
|
10
11
|
function ConfirmDialog({
|
|
11
12
|
visible,
|
|
12
13
|
title,
|
|
13
14
|
subtitle,
|
|
14
|
-
description,
|
|
15
15
|
confirmLabel = "Confirm",
|
|
16
16
|
cancelLabel = "Cancel",
|
|
17
17
|
confirmVariant = "primary",
|
|
@@ -21,36 +21,43 @@ function ConfirmDialog({
|
|
|
21
21
|
onCancel
|
|
22
22
|
}) {
|
|
23
23
|
const { colors } = useTheme();
|
|
24
|
+
const insets = useSafeAreaInsets();
|
|
24
25
|
const ref = useRef(null);
|
|
25
|
-
const
|
|
26
|
+
const wasOpened = useRef(false);
|
|
27
|
+
const name = useId();
|
|
26
28
|
useEffect(() => {
|
|
27
29
|
if (visible) {
|
|
28
30
|
impactMedium();
|
|
29
|
-
ref.current?.
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
ref.current?.present();
|
|
32
|
+
wasOpened.current = true;
|
|
33
|
+
} else if (wasOpened.current) {
|
|
34
|
+
ref.current?.dismiss();
|
|
32
35
|
}
|
|
33
36
|
}, [visible]);
|
|
34
|
-
const renderBackdrop = (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
const renderBackdrop = useCallback(
|
|
38
|
+
(props) => /* @__PURE__ */ React.createElement(
|
|
39
|
+
BottomSheetBackdrop,
|
|
40
|
+
{
|
|
41
|
+
...props,
|
|
42
|
+
disappearsOnIndex: -1,
|
|
43
|
+
appearsOnIndex: 0,
|
|
44
|
+
pressBehavior: "close"
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
[]
|
|
42
48
|
);
|
|
43
49
|
return /* @__PURE__ */ React.createElement(
|
|
44
|
-
|
|
50
|
+
BottomSheetModal,
|
|
45
51
|
{
|
|
46
52
|
ref,
|
|
47
|
-
|
|
48
|
-
|
|
53
|
+
name,
|
|
54
|
+
onDismiss: onCancel,
|
|
49
55
|
enableDynamicSizing: true,
|
|
50
56
|
backdropComponent: renderBackdrop,
|
|
51
|
-
backgroundStyle:
|
|
52
|
-
handleIndicatorStyle:
|
|
53
|
-
enablePanDownToClose: true
|
|
57
|
+
backgroundStyle: { ...styles.background, backgroundColor: colors.card },
|
|
58
|
+
handleIndicatorStyle: { ...styles.handle, backgroundColor: colors.border },
|
|
59
|
+
enablePanDownToClose: true,
|
|
60
|
+
topInset: insets.top
|
|
54
61
|
},
|
|
55
62
|
/* @__PURE__ */ React.createElement(BottomSheetView, { style: styles.content }, /* @__PURE__ */ React.createElement(View, { style: styles.header, accessibilityRole: "header" }, /* @__PURE__ */ React.createElement(View, { style: styles.headerRow }, /* @__PURE__ */ React.createElement(Text, { style: [styles.title, { color: colors.foreground }], allowFontScaling: true }, title), showCloseButton ? /* @__PURE__ */ React.createElement(
|
|
56
63
|
TouchableOpacity,
|
|
@@ -64,7 +71,7 @@ function ConfirmDialog({
|
|
|
64
71
|
hitSlop: { top: 12, bottom: 12, left: 12, right: 12 }
|
|
65
72
|
},
|
|
66
73
|
/* @__PURE__ */ React.createElement(Feather, { name: "x", size: ms(18), color: colors.foregroundMuted })
|
|
67
|
-
) : null),
|
|
74
|
+
) : null), subtitle ? /* @__PURE__ */ React.createElement(Text, { style: [styles.subtitle, { color: colors.foregroundMuted }], allowFontScaling: true }, subtitle) : null), /* @__PURE__ */ React.createElement(View, { style: styles.actions }, /* @__PURE__ */ React.createElement(
|
|
68
75
|
Button,
|
|
69
76
|
{
|
|
70
77
|
label: confirmLabel,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TIMINGS, EASINGS } from './chunk-DVK4G2GT.mjs';
|
|
2
|
-
import { renderIcon } from './chunk-
|
|
3
|
-
import { useTheme } from './chunk-
|
|
2
|
+
import { renderIcon } from './chunk-KA7LTET3.mjs';
|
|
3
|
+
import { useTheme } from './chunk-EMUWGDWC.mjs';
|
|
4
4
|
import { vs, ms, s } from './chunk-2CE3TQVY.mjs';
|
|
5
5
|
import React, { useState, useEffect } from 'react';
|
|
6
6
|
import { Platform, StyleSheet, View, Text, TextInput } from 'react-native';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RADIUS } from './chunk-QY3X2UYR.mjs';
|
|
2
|
-
import { useTheme } from './chunk-
|
|
2
|
+
import { useTheme } from './chunk-EMUWGDWC.mjs';
|
|
3
3
|
import { vs, s } from './chunk-2CE3TQVY.mjs';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { StyleSheet, View, Text } from 'react-native';
|
|
@@ -23,9 +23,9 @@ function configureIconFamilies(families) {
|
|
|
23
23
|
activeFamilies = order.length > 0 ? order : ALL_FAMILIES;
|
|
24
24
|
resolvedCache = null;
|
|
25
25
|
}
|
|
26
|
-
function buildCache() {
|
|
26
|
+
function buildCache(families) {
|
|
27
27
|
const cache = /* @__PURE__ */ new Map();
|
|
28
|
-
for (const family of activeFamilies) {
|
|
28
|
+
for (const family of families ?? activeFamilies) {
|
|
29
29
|
const glyphMap = family.getGlyphMap();
|
|
30
30
|
for (const iconName of Object.keys(glyphMap)) {
|
|
31
31
|
cache.set(iconName, family);
|
|
@@ -39,6 +39,20 @@ function resolveFamily(name) {
|
|
|
39
39
|
}
|
|
40
40
|
return resolvedCache.get(name) ?? null;
|
|
41
41
|
}
|
|
42
|
+
var cachedIconNames = null;
|
|
43
|
+
function getValidIconNames(families) {
|
|
44
|
+
if (families && families.length > 0) {
|
|
45
|
+
const tempFamilies = families.map((n) => ALL_FAMILIES.find((f) => f.name === n)).filter((f) => f !== void 0);
|
|
46
|
+
if (tempFamilies.length === 0) return [];
|
|
47
|
+
const cache = buildCache(tempFamilies);
|
|
48
|
+
return Array.from(cache.keys());
|
|
49
|
+
}
|
|
50
|
+
if (!cachedIconNames) {
|
|
51
|
+
const cache = buildCache();
|
|
52
|
+
cachedIconNames = Array.from(cache.keys());
|
|
53
|
+
}
|
|
54
|
+
return cachedIconNames;
|
|
55
|
+
}
|
|
42
56
|
function Icon({ name, size, color, family }) {
|
|
43
57
|
let resolved = null;
|
|
44
58
|
if (family) {
|
|
@@ -54,4 +68,4 @@ function renderIcon(name, size, color) {
|
|
|
54
68
|
return React.createElement(Icon, { name, size, color });
|
|
55
69
|
}
|
|
56
70
|
|
|
57
|
-
export { Icon, configureIconFamilies, renderIcon };
|
|
71
|
+
export { Icon, configureIconFamilies, getValidIconNames, renderIcon };
|