@retray-dev/ui-kit 10.2.0 → 12.2.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 +384 -40
- package/README.md +14 -5
- package/dist/Accordion.d.mts +6 -0
- package/dist/Accordion.d.ts +6 -0
- package/dist/Accordion.js +16 -0
- package/dist/Accordion.mjs +2 -2
- package/dist/AlertBanner.js +2 -0
- package/dist/AlertBanner.mjs +2 -2
- package/dist/AppHeader.js +2 -0
- package/dist/AppHeader.mjs +3 -3
- package/dist/Avatar.js +2 -0
- package/dist/Avatar.mjs +2 -2
- package/dist/Badge.js +2 -0
- package/dist/Badge.mjs +2 -2
- package/dist/Button.js +17 -17
- package/dist/Button.mjs +2 -2
- package/dist/Card.js +2 -0
- package/dist/Card.mjs +2 -2
- package/dist/CategoryStrip.js +2 -0
- package/dist/CategoryStrip.mjs +2 -2
- package/dist/Checkbox.js +2 -0
- package/dist/Checkbox.mjs +2 -2
- package/dist/Chip.js +2 -0
- package/dist/Chip.mjs +2 -2
- package/dist/ConfirmDialog.d.mts +1 -6
- package/dist/ConfirmDialog.d.ts +1 -6
- package/dist/ConfirmDialog.js +53 -41
- package/dist/ConfirmDialog.mjs +3 -3
- package/dist/CurrencyDisplay.js +2 -0
- package/dist/CurrencyDisplay.mjs +2 -2
- package/dist/CurrencyInput.d.mts +3 -8
- package/dist/CurrencyInput.d.ts +3 -8
- package/dist/CurrencyInput.js +5 -1
- package/dist/CurrencyInput.mjs +3 -3
- package/dist/DetailRow.js +2 -0
- package/dist/DetailRow.mjs +2 -2
- package/dist/EmptyState.js +17 -17
- package/dist/EmptyState.mjs +3 -3
- package/dist/ErrorBoundary.js +2 -0
- package/dist/ErrorBoundary.mjs +2 -2
- package/dist/Form.js +2 -0
- package/dist/Form.mjs +2 -2
- package/dist/IconButton.js +2 -0
- package/dist/IconButton.mjs +2 -2
- package/dist/IconPicker.js +677 -248
- package/dist/IconPicker.mjs +3 -2
- package/dist/ImageUpload.d.mts +3 -1
- package/dist/ImageUpload.d.ts +3 -1
- package/dist/ImageUpload.js +10 -3
- package/dist/ImageUpload.mjs +3 -3
- package/dist/ImageViewer.js +2 -0
- package/dist/ImageViewer.mjs +4 -4
- package/dist/Input.js +2 -0
- package/dist/Input.mjs +2 -2
- package/dist/LabelValue.js +2 -0
- package/dist/LabelValue.mjs +2 -2
- package/dist/ListGroup.js +2 -0
- package/dist/ListGroup.mjs +2 -2
- package/dist/ListItem.d.mts +7 -7
- package/dist/ListItem.d.ts +7 -7
- package/dist/ListItem.js +14 -7
- package/dist/ListItem.mjs +2 -2
- package/dist/MediaCard.js +2 -0
- package/dist/MediaCard.mjs +2 -2
- package/dist/MenuGroup.js +2 -0
- package/dist/MenuGroup.mjs +2 -2
- package/dist/MenuItem.js +2 -0
- package/dist/MenuItem.mjs +2 -2
- package/dist/MonthPicker.js +2 -0
- package/dist/MonthPicker.mjs +2 -2
- package/dist/NumberStepper.js +2 -0
- package/dist/NumberStepper.mjs +2 -2
- package/dist/PagerDots.js +2 -0
- package/dist/PagerDots.mjs +2 -2
- 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 +17 -17
- package/dist/PricingCard.mjs +4 -4
- package/dist/Progress.js +2 -0
- package/dist/Progress.mjs +2 -2
- package/dist/RadioGroup.js +2 -0
- package/dist/RadioGroup.mjs +2 -2
- package/dist/RetrayProvider.d.mts +1 -1
- package/dist/RetrayProvider.d.ts +1 -1
- package/dist/RetrayProvider.js +2 -0
- package/dist/RetrayProvider.mjs +3 -3
- package/dist/Select.js +2 -0
- package/dist/Select.mjs +2 -2
- package/dist/SelectableCard.d.mts +27 -0
- package/dist/SelectableCard.d.ts +27 -0
- package/dist/SelectableCard.js +511 -0
- package/dist/SelectableCard.mjs +8 -0
- package/dist/SelectableGrid.js +2 -0
- package/dist/SelectableGrid.mjs +2 -2
- package/dist/Separator.js +2 -0
- package/dist/Separator.mjs +2 -2
- package/dist/Sheet.d.mts +4 -46
- package/dist/Sheet.d.ts +4 -46
- package/dist/Sheet.js +55 -115
- package/dist/Sheet.mjs +2 -3
- package/dist/SheetSelect.js +2 -0
- package/dist/SheetSelect.mjs +2 -2
- package/dist/Skeleton.d.mts +3 -1
- package/dist/Skeleton.d.ts +3 -1
- package/dist/Skeleton.js +5 -2
- package/dist/Skeleton.mjs +2 -2
- package/dist/Slider.js +2 -0
- package/dist/Slider.mjs +2 -2
- package/dist/Spinner.js +2 -0
- package/dist/Spinner.mjs +2 -2
- package/dist/Stats.d.mts +33 -0
- package/dist/Stats.d.ts +33 -0
- package/dist/Stats.js +453 -0
- package/dist/Stats.mjs +9 -0
- package/dist/Switch.js +2 -0
- package/dist/Switch.mjs +2 -2
- package/dist/TabBar.js +2 -0
- package/dist/TabBar.mjs +2 -2
- package/dist/Tabs.js +2 -0
- package/dist/Tabs.mjs +2 -2
- package/dist/Text.d.mts +3 -1
- package/dist/Text.d.ts +3 -1
- package/dist/Text.js +5 -3
- package/dist/Text.mjs +2 -2
- package/dist/Textarea.js +2 -0
- package/dist/Textarea.mjs +2 -2
- package/dist/Toast.js +2 -0
- package/dist/Toast.mjs +2 -2
- package/dist/Toggle.js +2 -0
- package/dist/Toggle.mjs +2 -2
- package/dist/{chunk-U2XJFYED.mjs → chunk-2BA3JMKK.mjs} +1 -1
- package/dist/{chunk-NMU5FMQJ.mjs → chunk-2HFD4IHU.mjs} +4 -2
- package/dist/{chunk-S2R7UVOE.mjs → chunk-2LG326TT.mjs} +1 -1
- package/dist/chunk-2P2CB235.mjs +236 -0
- package/dist/{chunk-6L4G6PBT.mjs → chunk-3XCFYSX4.mjs} +1 -1
- package/dist/{chunk-HTHGSXFG.mjs → chunk-4J2PXL36.mjs} +16 -18
- package/dist/{chunk-BEMIQXXU.mjs → chunk-4OORJ2DY.mjs} +1 -1
- package/dist/chunk-4XOB5TTD.mjs +166 -0
- package/dist/{chunk-FCSSQK3L.mjs → chunk-57V2LXCK.mjs} +1 -1
- package/dist/{chunk-6Q64UFIA.mjs → chunk-7AFZWSCI.mjs} +1 -1
- package/dist/{chunk-IX3NYLYQ.mjs → chunk-7ELGZ66G.mjs} +1 -1
- package/dist/{chunk-GD6KXMG5.mjs → chunk-AENAVIKT.mjs} +1 -1
- package/dist/{chunk-ID72TK46.mjs → chunk-BXF4AMHY.mjs} +1 -1
- package/dist/{chunk-SOA2Z4RB.mjs → chunk-C43HRKXH.mjs} +1 -1
- package/dist/{chunk-TZDGAP5N.mjs → chunk-CF27NBXO.mjs} +11 -6
- package/dist/{chunk-SXLKNTA4.mjs → chunk-DF7JA72E.mjs} +1 -1
- package/dist/{chunk-AJRVDP2H.mjs → chunk-E5UKLSJZ.mjs} +3 -3
- package/dist/{chunk-MBMXYJJV.mjs → chunk-E7NEHHXV.mjs} +7 -3
- package/dist/{chunk-VKID2D2I.mjs → chunk-EDLCGYIO.mjs} +13 -8
- package/dist/{chunk-BUMAMSTZ.mjs → chunk-ELGEOM7I.mjs} +1 -1
- package/dist/{chunk-DYT7BG5I.mjs → chunk-F3YTWO3T.mjs} +1 -1
- package/dist/{chunk-VF2ATYN3.mjs → chunk-GH67YXG6.mjs} +1 -1
- package/dist/{chunk-WJLKJMKR.mjs → chunk-GUTDFUNF.mjs} +4 -4
- package/dist/{chunk-6SECQ2ZF.mjs → chunk-HC4VVCWY.mjs} +2 -2
- package/dist/{chunk-A3A6KNQN.mjs → chunk-HEDQPK4I.mjs} +1 -1
- package/dist/{chunk-GQYFLP3D.mjs → chunk-IVSRW4HS.mjs} +1 -1
- package/dist/{chunk-KOO4WITD.mjs → chunk-KSUWPU2F.mjs} +1 -1
- package/dist/{chunk-WBOOUHSS.mjs → chunk-LIS6I5UP.mjs} +1 -1
- package/dist/{chunk-X4G6APW6.mjs → chunk-LNPKGWBG.mjs} +1 -1
- package/dist/{chunk-T2KCAHOS.mjs → chunk-LOBLCFMN.mjs} +1 -1
- package/dist/{chunk-ELXBDILQ.mjs → chunk-LPV4NJJK.mjs} +2 -2
- package/dist/{chunk-Y2NS74WS.mjs → chunk-M3C7XM2M.mjs} +53 -99
- package/dist/{chunk-BRKYVJVV.mjs → chunk-MEPSKGBO.mjs} +1 -1
- package/dist/{chunk-TBNZHU6C.mjs → chunk-MVMGPZN6.mjs} +2 -2
- package/dist/{chunk-YJ7I257J.mjs → chunk-NHDI3VQB.mjs} +15 -1
- package/dist/{chunk-Z6SFHN6T.mjs → chunk-NJG7DHVF.mjs} +1 -1
- package/dist/{chunk-RYZC432S.mjs → chunk-NLZY4TXU.mjs} +1 -1
- package/dist/{chunk-ZZ2R6KZ3.mjs → chunk-OLVJFKXS.mjs} +1 -1
- package/dist/{chunk-AJ7ZDNBT.mjs → chunk-QDAZGZUF.mjs} +4 -3
- package/dist/{chunk-JT7HKXRB.mjs → chunk-QOLWA2PW.mjs} +1 -1
- package/dist/{chunk-WYEUNUTP.mjs → chunk-QXDGGOLC.mjs} +38 -25
- package/dist/{chunk-JMOZEC77.mjs → chunk-RJNLAH76.mjs} +1 -1
- package/dist/{chunk-WF2XDFRK.mjs → chunk-RMRS44MQ.mjs} +1 -1
- package/dist/chunk-SAWUXP3A.mjs +1114 -0
- package/dist/{chunk-OB4JUQ3O.mjs → chunk-TS7DGUIR.mjs} +1 -1
- package/dist/{chunk-AV4EMIRH.mjs → chunk-UBUXUMER.mjs} +1 -1
- package/dist/{chunk-IRRY3CRZ.mjs → chunk-ULGNQPNE.mjs} +1 -1
- package/dist/{chunk-7LWRKMF5.mjs → chunk-UNNRUJTM.mjs} +1 -1
- package/dist/{chunk-TB6SD2FT.mjs → chunk-UQ4742ET.mjs} +1 -1
- package/dist/{chunk-MX6HRKMI.mjs → chunk-VJBUCITV.mjs} +1 -1
- package/dist/{chunk-2UYENBLV.mjs → chunk-YMYIEVZP.mjs} +1 -1
- package/dist/{chunk-SOYNZDVY.mjs → chunk-YTXRIXNZ.mjs} +8 -1
- package/dist/{chunk-YFZ3ELX5.mjs → chunk-ZIMY2QUM.mjs} +2 -2
- package/dist/{chunk-Z4VHZ7B5.mjs → chunk-ZR6HSEAB.mjs} +1 -1
- 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-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 +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +1517 -761
- package/dist/index.mjs +54 -52
- package/package.json +3 -3
- package/src/components/Accordion/Accordion.tsx +20 -0
- package/src/components/Button/Button.tsx +29 -26
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +47 -31
- package/src/components/CurrencyInput/CurrencyInput.tsx +4 -7
- package/src/components/IconPicker/IconPicker.tsx +124 -112
- package/src/components/ImageUpload/ImageUpload.tsx +10 -3
- package/src/components/ListItem/ListItem.tsx +43 -28
- package/src/components/Pressable/Pressable.tsx +20 -8
- package/src/components/SelectableCard/SelectableCard.tsx +304 -0
- package/src/components/SelectableCard/index.ts +1 -0
- package/src/components/Sheet/Sheet.tsx +72 -173
- package/src/components/Skeleton/Skeleton.tsx +5 -2
- package/src/components/Stats/Stats.tsx +254 -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 +5 -0
- package/src/theme/colorUtils.ts +9 -0
- package/src/theme/colors.ts +7 -0
- package/src/theme/types.ts +4 -1
- package/src/utils/curatedIcons.ts +698 -135
- package/src/utils/fontGuard.ts +2 -1
- package/dist/chunk-53Z3NYGE.mjs +0 -742
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Spinner } from './chunk-
|
|
1
|
+
import { Spinner } from './chunk-LIS6I5UP.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-YTXRIXNZ.mjs';
|
|
6
6
|
import { s, vs, ms } from './chunk-2CE3TQVY.mjs';
|
|
7
|
-
import React from 'react';
|
|
7
|
+
import React, { useState } from 'react';
|
|
8
8
|
import { StyleSheet, Image, View, Text, Platform } from 'react-native';
|
|
9
9
|
import { Feather } from '@expo/vector-icons';
|
|
10
10
|
|
|
@@ -18,11 +18,13 @@ function ImageUpload({
|
|
|
18
18
|
height = 200,
|
|
19
19
|
borderRadius = RADIUS.lg,
|
|
20
20
|
resizeMode = "cover",
|
|
21
|
+
allowsEditing = true,
|
|
21
22
|
disabled = false,
|
|
22
23
|
style,
|
|
23
24
|
accessibilityLabel
|
|
24
25
|
}) {
|
|
25
26
|
const { colors } = useTheme();
|
|
27
|
+
const [imageLoaded, setImageLoaded] = useState(false);
|
|
26
28
|
const handlePress = async () => {
|
|
27
29
|
if (disabled || loading) return;
|
|
28
30
|
impactLight();
|
|
@@ -47,10 +49,11 @@ function ImageUpload({
|
|
|
47
49
|
}
|
|
48
50
|
const result = await picker.launchImageLibraryAsync({
|
|
49
51
|
mediaTypes: ["images"],
|
|
50
|
-
allowsEditing
|
|
52
|
+
allowsEditing,
|
|
51
53
|
quality: 0.8
|
|
52
54
|
});
|
|
53
55
|
if (!result.canceled && result.assets?.[0]) {
|
|
56
|
+
setImageLoaded(false);
|
|
54
57
|
onChange?.(result.assets[0].uri);
|
|
55
58
|
}
|
|
56
59
|
};
|
|
@@ -61,7 +64,7 @@ function ImageUpload({
|
|
|
61
64
|
borderWidth: value ? 0 : 1,
|
|
62
65
|
borderStyle: "dashed",
|
|
63
66
|
borderColor: colors.border,
|
|
64
|
-
backgroundColor: value ? "transparent" : colors.surface,
|
|
67
|
+
backgroundColor: value && imageLoaded ? "transparent" : colors.surface,
|
|
65
68
|
overflow: "hidden"
|
|
66
69
|
};
|
|
67
70
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -81,7 +84,9 @@ function ImageUpload({
|
|
|
81
84
|
{
|
|
82
85
|
source: { uri: value },
|
|
83
86
|
style: [StyleSheet.absoluteFillObject, { borderRadius }],
|
|
84
|
-
resizeMode
|
|
87
|
+
resizeMode,
|
|
88
|
+
onLoad: () => setImageLoaded(true),
|
|
89
|
+
onError: () => setImageLoaded(true)
|
|
85
90
|
}
|
|
86
91
|
) : /* @__PURE__ */ React.createElement(View, { style: styles.placeholder }, /* @__PURE__ */ React.createElement(Feather, { name: "image", size: ms(28), color: colors.foregroundMuted }), showPlaceholderText ? /* @__PURE__ */ React.createElement(
|
|
87
92
|
Text,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { COLOR_TRANSITION } from './chunk-DVK4G2GT.mjs';
|
|
2
2
|
import { renderIcon } from './chunk-KA7LTET3.mjs';
|
|
3
|
-
import { useTheme } from './chunk-
|
|
3
|
+
import { useTheme } from './chunk-YTXRIXNZ.mjs';
|
|
4
4
|
import { ms, s, vs } from './chunk-2CE3TQVY.mjs';
|
|
5
5
|
import React, { useState } from 'react';
|
|
6
6
|
import { Platform, StyleSheet, TouchableOpacity, View, Text, TextInput } from 'react-native';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Badge } from './chunk-
|
|
2
|
-
import { Button } from './chunk-
|
|
1
|
+
import { Badge } from './chunk-GH67YXG6.mjs';
|
|
2
|
+
import { Button } from './chunk-4J2PXL36.mjs';
|
|
3
3
|
import { RADIUS, SHADOWS } from './chunk-QY3X2UYR.mjs';
|
|
4
4
|
import { renderIcon } from './chunk-KA7LTET3.mjs';
|
|
5
|
-
import { useTheme } from './chunk-
|
|
5
|
+
import { useTheme } from './chunk-YTXRIXNZ.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';
|
|
@@ -10,7 +10,10 @@ function Pressable({
|
|
|
10
10
|
haptics = true,
|
|
11
11
|
style,
|
|
12
12
|
disabled,
|
|
13
|
-
hoverScale: _hoverScale = 1.02
|
|
13
|
+
hoverScale: _hoverScale = 1.02,
|
|
14
|
+
accessibilityRole,
|
|
15
|
+
accessibilityState,
|
|
16
|
+
accessibilityLabel
|
|
14
17
|
}) {
|
|
15
18
|
const handlePress = () => {
|
|
16
19
|
if (disabled || !onPress) return;
|
|
@@ -26,8 +29,9 @@ function Pressable({
|
|
|
26
29
|
rippleColor: "transparent",
|
|
27
30
|
touchSoundDisabled: true,
|
|
28
31
|
activateOnHover: true,
|
|
29
|
-
accessibilityRole: "button",
|
|
30
|
-
accessibilityState: { disabled: !!disabled }
|
|
32
|
+
accessibilityRole: accessibilityRole ?? "button",
|
|
33
|
+
accessibilityState: accessibilityState ?? { disabled: !!disabled },
|
|
34
|
+
accessibilityLabel
|
|
31
35
|
},
|
|
32
36
|
children
|
|
33
37
|
);
|
|
@@ -2,7 +2,7 @@ import { PressableRow } from './chunk-3DKJ2GIC.mjs';
|
|
|
2
2
|
import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
|
|
3
3
|
import { RADIUS } from './chunk-QY3X2UYR.mjs';
|
|
4
4
|
import { renderIcon } from './chunk-KA7LTET3.mjs';
|
|
5
|
-
import { useTheme } from './chunk-
|
|
5
|
+
import { useTheme } from './chunk-YTXRIXNZ.mjs';
|
|
6
6
|
import { ms, s, mvs, vs } from './chunk-2CE3TQVY.mjs';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { StyleSheet, Image, View, Text } from 'react-native';
|
|
@@ -12,8 +12,7 @@ function ListItemBase({
|
|
|
12
12
|
imageSource,
|
|
13
13
|
leftRender,
|
|
14
14
|
rightRender,
|
|
15
|
-
|
|
16
|
-
icon,
|
|
15
|
+
rightActions,
|
|
17
16
|
leftIcon,
|
|
18
17
|
rightIcon,
|
|
19
18
|
leftIconColor,
|
|
@@ -38,8 +37,8 @@ function ListItemBase({
|
|
|
38
37
|
selectionAsync();
|
|
39
38
|
onPress?.();
|
|
40
39
|
};
|
|
41
|
-
const effectiveLeft = imageSource ? /* @__PURE__ */ React.createElement(Image, { source: imageSource, style: styles.image }) : leftIcon ? renderIcon(leftIcon, 24, leftIconColor ?? colors.foreground) : leftRender
|
|
42
|
-
const
|
|
40
|
+
const effectiveLeft = imageSource ? /* @__PURE__ */ React.createElement(Image, { source: imageSource, style: styles.image }) : leftIcon ? renderIcon(leftIcon, 24, leftIconColor ?? colors.foreground) : leftRender;
|
|
41
|
+
const hasRightContent = !!(rightIcon || rightActions && rightActions.length > 0 || rightRender !== void 0 || showChevron);
|
|
43
42
|
const cardStyle = variant === "card" ? {
|
|
44
43
|
backgroundColor: colors.card,
|
|
45
44
|
borderRadius: RADIUS.md,
|
|
@@ -76,14 +75,14 @@ function ListItemBase({
|
|
|
76
75
|
allowFontScaling: true
|
|
77
76
|
},
|
|
78
77
|
caption
|
|
79
|
-
) : null),
|
|
78
|
+
) : null), hasRightContent ? rightIcon ? /* @__PURE__ */ React.createElement(View, { style: styles.rightContainer }, renderIcon(rightIcon, 24, rightIconColor ?? colors.foregroundMuted)) : rightActions && rightActions.length > 0 ? /* @__PURE__ */ React.createElement(View, { style: styles.rightActionsContainer }, rightActions.map((action, i) => /* @__PURE__ */ React.createElement(React.Fragment, { key: i }, action))) : rightRender !== void 0 ? /* @__PURE__ */ React.createElement(View, { style: styles.rightContainer }, typeof rightRender === "string" ? /* @__PURE__ */ React.createElement(
|
|
80
79
|
Text,
|
|
81
80
|
{
|
|
82
81
|
style: [styles.rightText, { color: colors.foregroundMuted }],
|
|
83
82
|
allowFontScaling: true
|
|
84
83
|
},
|
|
85
|
-
|
|
86
|
-
) :
|
|
84
|
+
rightRender
|
|
85
|
+
) : rightRender) : showChevron ? /* @__PURE__ */ React.createElement(Entypo, { name: "chevron-with-circle-right", size: 20, color: colors.foregroundMuted }) : null : null);
|
|
87
86
|
if (onPress) {
|
|
88
87
|
return /* @__PURE__ */ React.createElement(View, { style: disabled && styles.disabled }, /* @__PURE__ */ React.createElement(
|
|
89
88
|
PressableRow,
|
|
@@ -150,6 +149,12 @@ var styles = StyleSheet.create({
|
|
|
150
149
|
flexShrink: 0,
|
|
151
150
|
maxWidth: s(160)
|
|
152
151
|
},
|
|
152
|
+
rightActionsContainer: {
|
|
153
|
+
flexDirection: "row",
|
|
154
|
+
alignItems: "center",
|
|
155
|
+
gap: s(8),
|
|
156
|
+
flexShrink: 0
|
|
157
|
+
},
|
|
153
158
|
rightText: {
|
|
154
159
|
fontFamily: "Sohne-Regular",
|
|
155
160
|
fontSize: ms(14)
|
|
@@ -2,7 +2,7 @@ import { PressableButton } from './chunk-3DKJ2GIC.mjs';
|
|
|
2
2
|
import { impactLight } from './chunk-EJ7ZPXOH.mjs';
|
|
3
3
|
import { RADIUS } from './chunk-QY3X2UYR.mjs';
|
|
4
4
|
import { renderIcon } from './chunk-KA7LTET3.mjs';
|
|
5
|
-
import { useTheme } from './chunk-
|
|
5
|
+
import { useTheme } from './chunk-YTXRIXNZ.mjs';
|
|
6
6
|
import { s, mvs, ms } from './chunk-2CE3TQVY.mjs';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { StyleSheet, View, Text } from 'react-native';
|
|
@@ -2,7 +2,7 @@ import { PressableChip } from './chunk-3DKJ2GIC.mjs';
|
|
|
2
2
|
import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
|
|
3
3
|
import { COLOR_TRANSITION } from './chunk-DVK4G2GT.mjs';
|
|
4
4
|
import { renderIcon } from './chunk-KA7LTET3.mjs';
|
|
5
|
-
import { useTheme } from './chunk-
|
|
5
|
+
import { useTheme } from './chunk-YTXRIXNZ.mjs';
|
|
6
6
|
import { s, mvs, ms, vs } from './chunk-2CE3TQVY.mjs';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { StyleSheet, View, Text } from 'react-native';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { renderIcon } from './chunk-KA7LTET3.mjs';
|
|
2
|
-
import { useTheme } from './chunk-
|
|
2
|
+
import { useTheme } from './chunk-YTXRIXNZ.mjs';
|
|
3
3
|
import { vs, s, ms } from './chunk-2CE3TQVY.mjs';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { StyleSheet, View, Text } from 'react-native';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TYPOGRAPHY } from './chunk-QY3X2UYR.mjs';
|
|
2
|
-
import { useTheme } from './chunk-
|
|
2
|
+
import { useTheme } from './chunk-YTXRIXNZ.mjs';
|
|
3
3
|
import { mvs, ms } from './chunk-2CE3TQVY.mjs';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { Text as Text$1 } from 'react-native';
|
|
@@ -13,7 +13,7 @@ function warnIfFontsMissing() {
|
|
|
13
13
|
try {
|
|
14
14
|
if (!isLoaded("Sohne-Regular")) {
|
|
15
15
|
console.warn(
|
|
16
|
-
"[retray-ui-kit] Sohne fonts are not loaded \u2014 text will fall back to the system font. Load them at your app root before rendering any UI kit component:\n\n import { useFonts } from 'expo-font'\n import {
|
|
16
|
+
"[retray-ui-kit] Sohne fonts are not loaded \u2014 text will fall back to the system font. Load them at your app root before rendering any UI kit component:\n\n import { useFonts } from 'expo-font'\n import { SohneFontNames } from '@retray-dev/ui-kit/fonts'\n // Copy the SohneFonts boilerplate from CONSUMER.md into your App.tsx\n\n const [fontsLoaded] = useFonts(SohneFonts)\n if (!fontsLoaded) return null\n"
|
|
17
17
|
);
|
|
18
18
|
}
|
|
19
19
|
} catch {
|
|
@@ -58,7 +58,7 @@ var defaultColorVariant = {
|
|
|
58
58
|
"button-lg": "foreground",
|
|
59
59
|
"button-sm": "foreground"
|
|
60
60
|
};
|
|
61
|
-
function TextBase({ variant = "body-md", color, style, children, ...props }) {
|
|
61
|
+
function TextBase({ variant = "body-md", color, style, uppercase, children, ...props }) {
|
|
62
62
|
warnIfFontsMissing();
|
|
63
63
|
const { colors } = useTheme();
|
|
64
64
|
const colorKey = defaultColorVariant[variant] ?? "foreground";
|
|
@@ -66,7 +66,7 @@ function TextBase({ variant = "body-md", color, style, children, ...props }) {
|
|
|
66
66
|
return /* @__PURE__ */ React.createElement(
|
|
67
67
|
Text$1,
|
|
68
68
|
{
|
|
69
|
-
style: [variantStyles[variant], { color: resolvedColor }, style],
|
|
69
|
+
style: [variantStyles[variant], { color: resolvedColor }, uppercase && { textTransform: "uppercase" }, style],
|
|
70
70
|
allowFontScaling: true,
|
|
71
71
|
...props
|
|
72
72
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Button } from './chunk-
|
|
1
|
+
import { Button } from './chunk-4J2PXL36.mjs';
|
|
2
2
|
import { renderIcon } from './chunk-KA7LTET3.mjs';
|
|
3
|
-
import { useTheme } from './chunk-
|
|
3
|
+
import { useTheme } from './chunk-YTXRIXNZ.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';
|
|
@@ -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 } from './chunk-DVK4G2GT.mjs';
|
|
4
|
-
import { useTheme } from './chunk-
|
|
4
|
+
import { useTheme } from './chunk-YTXRIXNZ.mjs';
|
|
5
5
|
import { ms, vs, s } from './chunk-2CE3TQVY.mjs';
|
|
6
6
|
import React, { useState, useRef } from 'react';
|
|
7
7
|
import { Platform, StyleSheet, View, Text, TouchableOpacity, Modal } from 'react-native';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PressableTab } from './chunk-3DKJ2GIC.mjs';
|
|
2
2
|
import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
|
|
3
3
|
import { SPRINGS } from './chunk-DVK4G2GT.mjs';
|
|
4
|
-
import { useTheme } from './chunk-
|
|
4
|
+
import { useTheme } from './chunk-YTXRIXNZ.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';
|
|
@@ -3,7 +3,7 @@ import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
|
|
|
3
3
|
import { COLOR_TRANSITION } from './chunk-DVK4G2GT.mjs';
|
|
4
4
|
import { RADIUS } from './chunk-QY3X2UYR.mjs';
|
|
5
5
|
import { renderIcon } from './chunk-KA7LTET3.mjs';
|
|
6
|
-
import { useTheme } from './chunk-
|
|
6
|
+
import { useTheme } from './chunk-YTXRIXNZ.mjs';
|
|
7
7
|
import { ms, mvs, s, vs } from './chunk-2CE3TQVY.mjs';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { StyleSheet, View, Text, ScrollView } 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-YTXRIXNZ.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,7 +1,7 @@
|
|
|
1
1
|
import { PressableButton } from './chunk-3DKJ2GIC.mjs';
|
|
2
2
|
import { impactLight } from './chunk-EJ7ZPXOH.mjs';
|
|
3
3
|
import { renderIcon } from './chunk-KA7LTET3.mjs';
|
|
4
|
-
import { useTheme } from './chunk-
|
|
4
|
+
import { useTheme } from './chunk-YTXRIXNZ.mjs';
|
|
5
5
|
import { s, ms } from './chunk-2CE3TQVY.mjs';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { StyleSheet, View, ActivityIndicator, Text } from 'react-native';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PagerDots } from './chunk-
|
|
2
|
-
import { IconButton } from './chunk-
|
|
1
|
+
import { PagerDots } from './chunk-OLVJFKXS.mjs';
|
|
2
|
+
import { IconButton } from './chunk-LOBLCFMN.mjs';
|
|
3
3
|
import { s, vs } from './chunk-2CE3TQVY.mjs';
|
|
4
4
|
import React, { useState, useCallback } from 'react';
|
|
5
5
|
import { StyleSheet, useWindowDimensions, Dimensions, Modal, View, ScrollView, Image } from 'react-native';
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import { impactMedium } from './chunk-EJ7ZPXOH.mjs';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import BottomSheet, { BottomSheetBackdrop, BottomSheetFooter, BottomSheetScrollView, BottomSheetView } from '@gorhom/bottom-sheet';
|
|
2
|
+
import { useTheme } from './chunk-YTXRIXNZ.mjs';
|
|
3
|
+
import { s, vs, mvs, ms } from './chunk-2CE3TQVY.mjs';
|
|
4
|
+
import React, { useRef, useId, useCallback, useEffect } from 'react';
|
|
5
|
+
import { StyleSheet, View, Text, TouchableOpacity } from 'react-native';
|
|
6
|
+
import { BottomSheetBackdrop, BottomSheetFooter, BottomSheetModal, BottomSheetScrollView, BottomSheetView } from '@gorhom/bottom-sheet';
|
|
8
7
|
export { BottomSheetModalProvider, BottomSheetTextInput } from '@gorhom/bottom-sheet';
|
|
9
8
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
10
9
|
import { AntDesign } from '@expo/vector-icons';
|
|
11
10
|
|
|
12
|
-
var SCREEN_HEIGHT = Dimensions.get("window").height;
|
|
13
|
-
var DEFAULT_MAX_HEIGHT = SCREEN_HEIGHT * 0.85;
|
|
14
|
-
var isAndroid = Platform.OS === "android";
|
|
15
11
|
function SheetHeader({ children, style }) {
|
|
16
12
|
return /* @__PURE__ */ React.createElement(View, { style: [styles.header, style] }, children);
|
|
17
13
|
}
|
|
@@ -27,45 +23,51 @@ function Sheet({
|
|
|
27
23
|
onClose,
|
|
28
24
|
title,
|
|
29
25
|
subtitle,
|
|
30
|
-
description,
|
|
31
26
|
showCloseButton = false,
|
|
32
27
|
children,
|
|
33
28
|
style,
|
|
34
29
|
contentStyle,
|
|
35
|
-
scrollable,
|
|
30
|
+
scrollable = false,
|
|
36
31
|
maxHeight,
|
|
37
|
-
keyboardBehavior,
|
|
32
|
+
keyboardBehavior = "interactive",
|
|
38
33
|
keyboardBlurBehavior = "restore",
|
|
39
34
|
enableBlurKeyboardOnGesture = true,
|
|
40
35
|
android_keyboardInputMode = "adjustPan",
|
|
41
36
|
footer,
|
|
42
|
-
snapPoints
|
|
43
|
-
responsive = false,
|
|
44
|
-
dialogMaxWidth = 480
|
|
37
|
+
snapPoints
|
|
45
38
|
}) {
|
|
46
39
|
const { colors } = useTheme();
|
|
47
40
|
const insets = useSafeAreaInsets();
|
|
48
|
-
const { width: windowWidth } = useWindowDimensions();
|
|
49
41
|
const ref = useRef(null);
|
|
50
|
-
const
|
|
51
|
-
const
|
|
42
|
+
const wasOpened = useRef(false);
|
|
43
|
+
const isPresentedRef = useRef(false);
|
|
44
|
+
const name = useId();
|
|
45
|
+
const handleDismiss = useCallback(() => {
|
|
46
|
+
isPresentedRef.current = false;
|
|
47
|
+
onClose?.();
|
|
48
|
+
}, [onClose]);
|
|
52
49
|
useEffect(() => {
|
|
53
|
-
if (open) {
|
|
50
|
+
if (open && !isPresentedRef.current) {
|
|
54
51
|
impactMedium();
|
|
55
|
-
ref.current?.
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
ref.current?.present();
|
|
53
|
+
wasOpened.current = true;
|
|
54
|
+
isPresentedRef.current = true;
|
|
55
|
+
} else if (!open && wasOpened.current && isPresentedRef.current) {
|
|
56
|
+
ref.current?.dismiss();
|
|
58
57
|
}
|
|
59
58
|
}, [open]);
|
|
60
|
-
const renderBackdrop = useCallback(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
59
|
+
const renderBackdrop = useCallback(
|
|
60
|
+
(props) => /* @__PURE__ */ React.createElement(
|
|
61
|
+
BottomSheetBackdrop,
|
|
62
|
+
{
|
|
63
|
+
...props,
|
|
64
|
+
disappearsOnIndex: -1,
|
|
65
|
+
appearsOnIndex: 0,
|
|
66
|
+
pressBehavior: "close"
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
[]
|
|
70
|
+
);
|
|
69
71
|
const childArray = React.Children.toArray(children);
|
|
70
72
|
const customHeader = childArray.find((child) => React.isValidElement(child) && child.type === SheetHeader);
|
|
71
73
|
const customContent = childArray.find((child) => React.isValidElement(child) && child.type === SheetContent);
|
|
@@ -73,8 +75,7 @@ function Sheet({
|
|
|
73
75
|
const filteredChildren = customHeader || customContent || customFooter ? childArray.filter(
|
|
74
76
|
(child) => !React.isValidElement(child) || child.type !== SheetHeader && child.type !== SheetContent && child.type !== SheetFooter
|
|
75
77
|
) : children;
|
|
76
|
-
const
|
|
77
|
-
const showHeader = !!(title || effectiveSubtitle || showCloseButton) && !customHeader;
|
|
78
|
+
const showHeader = !!(title || subtitle || showCloseButton) && !customHeader;
|
|
78
79
|
const headerNode = customHeader ? customHeader : showHeader ? /* @__PURE__ */ React.createElement(View, { style: [styles.header, { backgroundColor: colors.card }], accessibilityRole: "header" }, /* @__PURE__ */ React.createElement(View, { style: styles.headerRow }, title ? /* @__PURE__ */ React.createElement(Text, { style: [styles.title, { color: colors.foreground }], allowFontScaling: true }, title) : /* @__PURE__ */ React.createElement(View, { style: { flex: 1 } }), showCloseButton ? /* @__PURE__ */ React.createElement(
|
|
79
80
|
TouchableOpacity,
|
|
80
81
|
{
|
|
@@ -87,72 +88,44 @@ function Sheet({
|
|
|
87
88
|
hitSlop: { top: 12, bottom: 12, left: 12, right: 12 }
|
|
88
89
|
},
|
|
89
90
|
/* @__PURE__ */ React.createElement(AntDesign, { name: "close", size: ms(18), color: colors.foregroundMuted })
|
|
90
|
-
) : null),
|
|
91
|
+
) : null), subtitle ? /* @__PURE__ */ React.createElement(Text, { style: [styles.subtitle, { color: colors.foregroundMuted }], allowFontScaling: true }, subtitle) : null) : null;
|
|
91
92
|
const contentNode = customContent ? customContent : filteredChildren;
|
|
92
93
|
const effectiveFooter = customFooter ? customFooter : footer;
|
|
93
|
-
const renderFooter = useCallback(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
{
|
|
101
|
-
style: [
|
|
102
|
-
styles.dialogCard,
|
|
103
|
-
{ backgroundColor: colors.card, maxWidth: dialogMaxWidth, maxHeight: SCREEN_HEIGHT * 0.85 }
|
|
104
|
-
],
|
|
105
|
-
onPress: () => {
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
headerNode,
|
|
109
|
-
/* @__PURE__ */ React.createElement(
|
|
110
|
-
ScrollView,
|
|
111
|
-
{
|
|
112
|
-
contentContainerStyle: [styles.dialogContent, style],
|
|
113
|
-
style: contentStyle,
|
|
114
|
-
showsVerticalScrollIndicator: true,
|
|
115
|
-
bounces: false
|
|
116
|
-
},
|
|
117
|
-
contentNode
|
|
118
|
-
),
|
|
119
|
-
effectiveFooter
|
|
120
|
-
)));
|
|
121
|
-
}
|
|
122
|
-
const useScroll = scrollable || !!maxHeight;
|
|
123
|
-
const effectiveMaxHeight = maxHeight ?? DEFAULT_MAX_HEIGHT;
|
|
94
|
+
const renderFooter = useCallback(
|
|
95
|
+
(props) => {
|
|
96
|
+
if (!effectiveFooter) return null;
|
|
97
|
+
return /* @__PURE__ */ React.createElement(BottomSheetFooter, { ...props }, effectiveFooter);
|
|
98
|
+
},
|
|
99
|
+
[effectiveFooter]
|
|
100
|
+
);
|
|
124
101
|
const useDynamicSizing = !snapPoints;
|
|
125
102
|
return /* @__PURE__ */ React.createElement(
|
|
126
|
-
|
|
103
|
+
BottomSheetModal,
|
|
127
104
|
{
|
|
128
105
|
ref,
|
|
129
|
-
|
|
130
|
-
|
|
106
|
+
name,
|
|
107
|
+
onDismiss: handleDismiss,
|
|
131
108
|
enableDynamicSizing: useDynamicSizing,
|
|
132
109
|
snapPoints,
|
|
133
|
-
maxDynamicContentSize: useDynamicSizing ?
|
|
110
|
+
maxDynamicContentSize: useDynamicSizing && maxHeight ? maxHeight : void 0,
|
|
134
111
|
backdropComponent: renderBackdrop,
|
|
135
112
|
footerComponent: effectiveFooter ? renderFooter : void 0,
|
|
136
|
-
backgroundStyle:
|
|
137
|
-
handleIndicatorStyle:
|
|
113
|
+
backgroundStyle: { ...styles.background, backgroundColor: colors.card },
|
|
114
|
+
handleIndicatorStyle: { ...styles.handle, backgroundColor: colors.border },
|
|
138
115
|
enablePanDownToClose: true,
|
|
139
116
|
topInset: insets.top,
|
|
140
|
-
keyboardBehavior
|
|
117
|
+
keyboardBehavior,
|
|
141
118
|
keyboardBlurBehavior,
|
|
142
119
|
android_keyboardInputMode,
|
|
143
120
|
enableBlurKeyboardOnGesture
|
|
144
121
|
},
|
|
145
|
-
|
|
122
|
+
scrollable ? /* @__PURE__ */ React.createElement(
|
|
146
123
|
BottomSheetScrollView,
|
|
147
124
|
{
|
|
148
|
-
contentContainerStyle: [
|
|
149
|
-
styles.scrollContent,
|
|
150
|
-
style
|
|
151
|
-
],
|
|
125
|
+
contentContainerStyle: [styles.scrollContent, style],
|
|
152
126
|
style: contentStyle,
|
|
153
127
|
showsVerticalScrollIndicator: true,
|
|
154
|
-
|
|
155
|
-
persistentScrollbar: isAndroid,
|
|
128
|
+
bounces: false,
|
|
156
129
|
stickyHeaderIndices: headerNode ? [0] : void 0
|
|
157
130
|
},
|
|
158
131
|
headerNode,
|
|
@@ -204,8 +177,7 @@ var styles = StyleSheet.create({
|
|
|
204
177
|
},
|
|
205
178
|
scrollContent: {
|
|
206
179
|
paddingHorizontal: s(16),
|
|
207
|
-
paddingBottom: vs(32)
|
|
208
|
-
paddingRight: s(16)
|
|
180
|
+
paddingBottom: vs(32)
|
|
209
181
|
},
|
|
210
182
|
sheetContent: {
|
|
211
183
|
gap: vs(16)
|
|
@@ -216,24 +188,6 @@ var styles = StyleSheet.create({
|
|
|
216
188
|
borderTopWidth: 1,
|
|
217
189
|
flexDirection: "row",
|
|
218
190
|
gap: s(12)
|
|
219
|
-
},
|
|
220
|
-
dialogBackdrop: {
|
|
221
|
-
flex: 1,
|
|
222
|
-
backgroundColor: "rgba(0,0,0,0.5)",
|
|
223
|
-
alignItems: "center",
|
|
224
|
-
justifyContent: "center",
|
|
225
|
-
padding: s(24)
|
|
226
|
-
},
|
|
227
|
-
dialogCard: {
|
|
228
|
-
width: "100%",
|
|
229
|
-
borderRadius: RADIUS.lg,
|
|
230
|
-
paddingTop: vs(16),
|
|
231
|
-
overflow: "hidden",
|
|
232
|
-
...SHADOWS.xl
|
|
233
|
-
},
|
|
234
|
-
dialogContent: {
|
|
235
|
-
paddingHorizontal: s(16),
|
|
236
|
-
paddingBottom: vs(16)
|
|
237
191
|
}
|
|
238
192
|
});
|
|
239
193
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IconButton } from './chunk-
|
|
1
|
+
import { IconButton } from './chunk-LOBLCFMN.mjs';
|
|
2
2
|
import { BREAKPOINTS } from './chunk-QY3X2UYR.mjs';
|
|
3
|
-
import { useTheme } from './chunk-
|
|
3
|
+
import { useTheme } from './chunk-YTXRIXNZ.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 { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
|
|
2
2
|
import { EASINGS, TIMINGS } from './chunk-DVK4G2GT.mjs';
|
|
3
3
|
import { renderIcon } from './chunk-KA7LTET3.mjs';
|
|
4
|
-
import { useTheme } from './chunk-
|
|
4
|
+
import { useTheme } from './chunk-YTXRIXNZ.mjs';
|
|
5
5
|
import { ms, vs, s } from './chunk-2CE3TQVY.mjs';
|
|
6
6
|
import React, { useState } from 'react';
|
|
7
7
|
import { StyleSheet, View, Pressable, Text } from 'react-native';
|
|
@@ -52,6 +52,14 @@ function AccordionItemComponent({
|
|
|
52
52
|
accessibilityLabel: typeof item.trigger === "string" ? item.trigger : void 0
|
|
53
53
|
},
|
|
54
54
|
/* @__PURE__ */ React.createElement(View, { style: styles.triggerContent }, resolvedIcon ? /* @__PURE__ */ React.createElement(View, { style: styles.icon }, resolvedIcon) : null, typeof item.trigger === "string" ? /* @__PURE__ */ React.createElement(Text, { style: [styles.triggerText, { color: colors.foreground }], allowFontScaling: true }, item.trigger) : item.trigger),
|
|
55
|
+
item.triggerActions ? /* @__PURE__ */ React.createElement(
|
|
56
|
+
View,
|
|
57
|
+
{
|
|
58
|
+
style: styles.triggerActions,
|
|
59
|
+
onTouchEnd: (e) => e.stopPropagation()
|
|
60
|
+
},
|
|
61
|
+
item.triggerActions
|
|
62
|
+
) : null,
|
|
55
63
|
/* @__PURE__ */ React.createElement(Animated.View, { style: [styles.chevron, rotationStyle] }, /* @__PURE__ */ React.createElement(Entypo, { name: "chevron-down", size: 18, color: colors.foregroundMuted }))
|
|
56
64
|
), /* @__PURE__ */ React.createElement(Animated.View, { style: bodyStyle }, /* @__PURE__ */ React.createElement(
|
|
57
65
|
View,
|
|
@@ -121,6 +129,12 @@ var styles = StyleSheet.create({
|
|
|
121
129
|
chevron: {
|
|
122
130
|
marginLeft: s(8)
|
|
123
131
|
},
|
|
132
|
+
triggerActions: {
|
|
133
|
+
flexDirection: "row",
|
|
134
|
+
alignItems: "center",
|
|
135
|
+
gap: s(4),
|
|
136
|
+
marginLeft: s(8)
|
|
137
|
+
},
|
|
124
138
|
// position:'absolute' is the key — the inner View escapes the animated wrapper's
|
|
125
139
|
// clipped height so onLayout always reports the true content height.
|
|
126
140
|
content: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
|
|
2
2
|
import { renderIcon } from './chunk-KA7LTET3.mjs';
|
|
3
|
-
import { useTheme } from './chunk-
|
|
3
|
+
import { useTheme } from './chunk-YTXRIXNZ.mjs';
|
|
4
4
|
import { ms, s, vs, mvs } from './chunk-2CE3TQVY.mjs';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { StyleSheet, View, TouchableOpacity, Text } from 'react-native';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { impactLight } from './chunk-EJ7ZPXOH.mjs';
|
|
2
2
|
import { RADIUS } from './chunk-QY3X2UYR.mjs';
|
|
3
3
|
import { renderIcon } from './chunk-KA7LTET3.mjs';
|
|
4
|
-
import { useTheme } from './chunk-
|
|
4
|
+
import { useTheme } from './chunk-YTXRIXNZ.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';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
|
|
2
2
|
import { SPRINGS } from './chunk-DVK4G2GT.mjs';
|
|
3
3
|
import { renderIcon } from './chunk-KA7LTET3.mjs';
|
|
4
|
-
import { useTheme } from './chunk-
|
|
4
|
+
import { useTheme } from './chunk-YTXRIXNZ.mjs';
|
|
5
5
|
import { s } from './chunk-2CE3TQVY.mjs';
|
|
6
6
|
import React, { useEffect } from 'react';
|
|
7
7
|
import { StyleSheet, View, TouchableOpacity } from 'react-native';
|