@retray-dev/ui-kit 12.1.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.
Files changed (190) hide show
  1. package/COMPONENTS.md +98 -4
  2. package/README.md +4 -4
  3. package/dist/Accordion.d.mts +6 -0
  4. package/dist/Accordion.d.ts +6 -0
  5. package/dist/Accordion.js +16 -0
  6. package/dist/Accordion.mjs +2 -2
  7. package/dist/AlertBanner.js +2 -0
  8. package/dist/AlertBanner.mjs +2 -2
  9. package/dist/AppHeader.js +2 -0
  10. package/dist/AppHeader.mjs +3 -3
  11. package/dist/Avatar.js +2 -0
  12. package/dist/Avatar.mjs +2 -2
  13. package/dist/Badge.js +2 -0
  14. package/dist/Badge.mjs +2 -2
  15. package/dist/Button.js +17 -17
  16. package/dist/Button.mjs +2 -2
  17. package/dist/Card.js +2 -0
  18. package/dist/Card.mjs +2 -2
  19. package/dist/CategoryStrip.js +2 -0
  20. package/dist/CategoryStrip.mjs +2 -2
  21. package/dist/Checkbox.js +2 -0
  22. package/dist/Checkbox.mjs +2 -2
  23. package/dist/Chip.js +2 -0
  24. package/dist/Chip.mjs +2 -2
  25. package/dist/ConfirmDialog.js +26 -20
  26. package/dist/ConfirmDialog.mjs +3 -3
  27. package/dist/CurrencyDisplay.js +2 -0
  28. package/dist/CurrencyDisplay.mjs +2 -2
  29. package/dist/CurrencyInput.js +2 -0
  30. package/dist/CurrencyInput.mjs +3 -3
  31. package/dist/DetailRow.js +2 -0
  32. package/dist/DetailRow.mjs +2 -2
  33. package/dist/EmptyState.js +17 -17
  34. package/dist/EmptyState.mjs +3 -3
  35. package/dist/ErrorBoundary.js +2 -0
  36. package/dist/ErrorBoundary.mjs +2 -2
  37. package/dist/Form.js +2 -0
  38. package/dist/Form.mjs +2 -2
  39. package/dist/IconButton.js +2 -0
  40. package/dist/IconButton.mjs +2 -2
  41. package/dist/IconPicker.js +2 -0
  42. package/dist/IconPicker.mjs +3 -3
  43. package/dist/ImageUpload.d.mts +3 -1
  44. package/dist/ImageUpload.d.ts +3 -1
  45. package/dist/ImageUpload.js +10 -3
  46. package/dist/ImageUpload.mjs +3 -3
  47. package/dist/ImageViewer.js +2 -0
  48. package/dist/ImageViewer.mjs +4 -4
  49. package/dist/Input.js +2 -0
  50. package/dist/Input.mjs +2 -2
  51. package/dist/LabelValue.js +2 -0
  52. package/dist/LabelValue.mjs +2 -2
  53. package/dist/ListGroup.js +2 -0
  54. package/dist/ListGroup.mjs +2 -2
  55. package/dist/ListItem.js +2 -0
  56. package/dist/ListItem.mjs +2 -2
  57. package/dist/MediaCard.js +2 -0
  58. package/dist/MediaCard.mjs +2 -2
  59. package/dist/MenuGroup.js +2 -0
  60. package/dist/MenuGroup.mjs +2 -2
  61. package/dist/MenuItem.js +2 -0
  62. package/dist/MenuItem.mjs +2 -2
  63. package/dist/MonthPicker.js +2 -0
  64. package/dist/MonthPicker.mjs +2 -2
  65. package/dist/NumberStepper.js +2 -0
  66. package/dist/NumberStepper.mjs +2 -2
  67. package/dist/PagerDots.js +2 -0
  68. package/dist/PagerDots.mjs +2 -2
  69. package/dist/PricingCard.js +17 -17
  70. package/dist/PricingCard.mjs +4 -4
  71. package/dist/Progress.js +2 -0
  72. package/dist/Progress.mjs +2 -2
  73. package/dist/RadioGroup.js +2 -0
  74. package/dist/RadioGroup.mjs +2 -2
  75. package/dist/RetrayProvider.d.mts +1 -1
  76. package/dist/RetrayProvider.d.ts +1 -1
  77. package/dist/RetrayProvider.js +2 -0
  78. package/dist/RetrayProvider.mjs +3 -3
  79. package/dist/Select.js +2 -0
  80. package/dist/Select.mjs +2 -2
  81. package/dist/SelectableCard.d.mts +27 -0
  82. package/dist/SelectableCard.d.ts +27 -0
  83. package/dist/SelectableCard.js +511 -0
  84. package/dist/SelectableCard.mjs +8 -0
  85. package/dist/SelectableGrid.js +2 -0
  86. package/dist/SelectableGrid.mjs +2 -2
  87. package/dist/Separator.js +2 -0
  88. package/dist/Separator.mjs +2 -2
  89. package/dist/Sheet.js +11 -3
  90. package/dist/Sheet.mjs +2 -2
  91. package/dist/SheetSelect.js +2 -0
  92. package/dist/SheetSelect.mjs +2 -2
  93. package/dist/Skeleton.d.mts +3 -1
  94. package/dist/Skeleton.d.ts +3 -1
  95. package/dist/Skeleton.js +5 -2
  96. package/dist/Skeleton.mjs +2 -2
  97. package/dist/Slider.js +2 -0
  98. package/dist/Slider.mjs +2 -2
  99. package/dist/Spinner.js +2 -0
  100. package/dist/Spinner.mjs +2 -2
  101. package/dist/Stats.d.mts +4 -1
  102. package/dist/Stats.d.ts +4 -1
  103. package/dist/Stats.js +27 -3
  104. package/dist/Stats.mjs +2 -2
  105. package/dist/Switch.js +2 -0
  106. package/dist/Switch.mjs +2 -2
  107. package/dist/TabBar.js +2 -0
  108. package/dist/TabBar.mjs +2 -2
  109. package/dist/Tabs.js +2 -0
  110. package/dist/Tabs.mjs +2 -2
  111. package/dist/Text.js +2 -0
  112. package/dist/Text.mjs +2 -2
  113. package/dist/Textarea.js +2 -0
  114. package/dist/Textarea.mjs +2 -2
  115. package/dist/Toast.js +2 -0
  116. package/dist/Toast.mjs +2 -2
  117. package/dist/Toggle.js +2 -0
  118. package/dist/Toggle.mjs +2 -2
  119. package/dist/{chunk-JNVAIDLK.mjs → chunk-2BA3JMKK.mjs} +1 -1
  120. package/dist/{chunk-X26S5EVZ.mjs → chunk-2HFD4IHU.mjs} +1 -1
  121. package/dist/{chunk-ZHMSAYLT.mjs → chunk-2LG326TT.mjs} +1 -1
  122. package/dist/chunk-2P2CB235.mjs +236 -0
  123. package/dist/{chunk-MYZ2EDYU.mjs → chunk-3XCFYSX4.mjs} +1 -1
  124. package/dist/{chunk-DOGIPOF5.mjs → chunk-4J2PXL36.mjs} +16 -18
  125. package/dist/{chunk-V6NFJXKO.mjs → chunk-4OORJ2DY.mjs} +1 -1
  126. package/dist/{chunk-5OLNXP3S.mjs → chunk-4XOB5TTD.mjs} +26 -4
  127. package/dist/{chunk-P64WHW4A.mjs → chunk-57V2LXCK.mjs} +1 -1
  128. package/dist/{chunk-HJ46DTJE.mjs → chunk-7AFZWSCI.mjs} +1 -1
  129. package/dist/{chunk-AQEVCEXV.mjs → chunk-7ELGZ66G.mjs} +1 -1
  130. package/dist/{chunk-I4V5XZPS.mjs → chunk-AENAVIKT.mjs} +1 -1
  131. package/dist/{chunk-2CBQKU7H.mjs → chunk-BXF4AMHY.mjs} +1 -1
  132. package/dist/{chunk-JULSIZDM.mjs → chunk-C43HRKXH.mjs} +1 -1
  133. package/dist/{chunk-GK4VRMNE.mjs → chunk-CF27NBXO.mjs} +11 -6
  134. package/dist/{chunk-PGERH3P7.mjs → chunk-DF7JA72E.mjs} +1 -1
  135. package/dist/{chunk-F4V6XLP4.mjs → chunk-E5UKLSJZ.mjs} +3 -3
  136. package/dist/{chunk-FUVYSVGR.mjs → chunk-EDLCGYIO.mjs} +1 -1
  137. package/dist/{chunk-N4ZPVCJH.mjs → chunk-ELGEOM7I.mjs} +1 -1
  138. package/dist/{chunk-FA2KMTH5.mjs → chunk-F3YTWO3T.mjs} +1 -1
  139. package/dist/{chunk-3UYAZ7I4.mjs → chunk-GH67YXG6.mjs} +1 -1
  140. package/dist/{chunk-357YO24D.mjs → chunk-GUTDFUNF.mjs} +1 -1
  141. package/dist/{chunk-7HSILTC4.mjs → chunk-HC4VVCWY.mjs} +2 -2
  142. package/dist/{chunk-WOEWGSTU.mjs → chunk-HEDQPK4I.mjs} +1 -1
  143. package/dist/{chunk-3GEYJ7I5.mjs → chunk-IVSRW4HS.mjs} +1 -1
  144. package/dist/{chunk-P73V2EKS.mjs → chunk-KSUWPU2F.mjs} +1 -1
  145. package/dist/{chunk-BCWEHE34.mjs → chunk-LIS6I5UP.mjs} +1 -1
  146. package/dist/{chunk-J6Q2YJEV.mjs → chunk-LNPKGWBG.mjs} +1 -1
  147. package/dist/{chunk-DF6DU42P.mjs → chunk-LOBLCFMN.mjs} +1 -1
  148. package/dist/{chunk-2A2LEFZG.mjs → chunk-LPV4NJJK.mjs} +2 -2
  149. package/dist/{chunk-FFTYLPSB.mjs → chunk-M3C7XM2M.mjs} +11 -5
  150. package/dist/{chunk-BQZE3HAW.mjs → chunk-MEPSKGBO.mjs} +1 -1
  151. package/dist/{chunk-ISY26JQJ.mjs → chunk-MVMGPZN6.mjs} +2 -2
  152. package/dist/{chunk-265G6A46.mjs → chunk-NHDI3VQB.mjs} +15 -1
  153. package/dist/{chunk-D3Y2T42P.mjs → chunk-NJG7DHVF.mjs} +1 -1
  154. package/dist/{chunk-LRM4AVYY.mjs → chunk-NLZY4TXU.mjs} +1 -1
  155. package/dist/{chunk-OULVKTWL.mjs → chunk-OLVJFKXS.mjs} +1 -1
  156. package/dist/{chunk-BOVUP27T.mjs → chunk-QDAZGZUF.mjs} +4 -3
  157. package/dist/{chunk-S3KJCPEJ.mjs → chunk-QOLWA2PW.mjs} +1 -1
  158. package/dist/{chunk-JCZQOY4O.mjs → chunk-QXDGGOLC.mjs} +12 -6
  159. package/dist/{chunk-4WFMPFZB.mjs → chunk-RJNLAH76.mjs} +1 -1
  160. package/dist/{chunk-HLMPMUK2.mjs → chunk-RMRS44MQ.mjs} +1 -1
  161. package/dist/{chunk-KHYX4IOM.mjs → chunk-SAWUXP3A.mjs} +2 -2
  162. package/dist/{chunk-2I2AYECM.mjs → chunk-TS7DGUIR.mjs} +1 -1
  163. package/dist/{chunk-3N2M3WZL.mjs → chunk-UBUXUMER.mjs} +1 -1
  164. package/dist/{chunk-AKM4EPOT.mjs → chunk-ULGNQPNE.mjs} +1 -1
  165. package/dist/{chunk-FVTVCJAH.mjs → chunk-UNNRUJTM.mjs} +1 -1
  166. package/dist/{chunk-DI7CBDL6.mjs → chunk-UQ4742ET.mjs} +1 -1
  167. package/dist/{chunk-EFLFRAHD.mjs → chunk-VJBUCITV.mjs} +1 -1
  168. package/dist/{chunk-QSFV2P7O.mjs → chunk-YMYIEVZP.mjs} +1 -1
  169. package/dist/{chunk-EMUWGDWC.mjs → chunk-YTXRIXNZ.mjs} +2 -0
  170. package/dist/{chunk-XBAGGKLW.mjs → chunk-ZIMY2QUM.mjs} +2 -2
  171. package/dist/{chunk-NXI4YDZ2.mjs → chunk-ZR6HSEAB.mjs} +1 -1
  172. package/dist/{index-wt-orHUi.d.ts → index-CY34hxPN.d.mts} +1 -0
  173. package/dist/{index-wt-orHUi.d.mts → index-CY34hxPN.d.ts} +1 -0
  174. package/dist/index.d.mts +3 -2
  175. package/dist/index.d.ts +3 -2
  176. package/dist/index.js +733 -453
  177. package/dist/index.mjs +53 -52
  178. package/package.json +1 -1
  179. package/src/components/Accordion/Accordion.tsx +20 -0
  180. package/src/components/Button/Button.tsx +29 -26
  181. package/src/components/ConfirmDialog/ConfirmDialog.tsx +10 -3
  182. package/src/components/ImageUpload/ImageUpload.tsx +10 -3
  183. package/src/components/SelectableCard/SelectableCard.tsx +304 -0
  184. package/src/components/SelectableCard/index.ts +1 -0
  185. package/src/components/Sheet/Sheet.tsx +10 -3
  186. package/src/components/Skeleton/Skeleton.tsx +5 -2
  187. package/src/components/Stats/Stats.tsx +35 -7
  188. package/src/index.ts +1 -0
  189. package/src/theme/colors.ts +7 -0
  190. package/src/theme/types.ts +4 -1
@@ -1,5 +1,5 @@
1
- import { PagerDots } from './chunk-OULVKTWL.mjs';
2
- import { IconButton } from './chunk-DF6DU42P.mjs';
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,7 +1,7 @@
1
1
  import { impactMedium } from './chunk-EJ7ZPXOH.mjs';
2
- import { useTheme } from './chunk-EMUWGDWC.mjs';
2
+ import { useTheme } from './chunk-YTXRIXNZ.mjs';
3
3
  import { s, vs, mvs, ms } from './chunk-2CE3TQVY.mjs';
4
- import React, { useRef, useId, useEffect, useCallback } from 'react';
4
+ import React, { useRef, useId, useCallback, useEffect } from 'react';
5
5
  import { StyleSheet, View, Text, TouchableOpacity } from 'react-native';
6
6
  import { BottomSheetBackdrop, BottomSheetFooter, BottomSheetModal, BottomSheetScrollView, BottomSheetView } from '@gorhom/bottom-sheet';
7
7
  export { BottomSheetModalProvider, BottomSheetTextInput } from '@gorhom/bottom-sheet';
@@ -40,13 +40,19 @@ function Sheet({
40
40
  const insets = useSafeAreaInsets();
41
41
  const ref = useRef(null);
42
42
  const wasOpened = useRef(false);
43
+ const isPresentedRef = useRef(false);
43
44
  const name = useId();
45
+ const handleDismiss = useCallback(() => {
46
+ isPresentedRef.current = false;
47
+ onClose?.();
48
+ }, [onClose]);
44
49
  useEffect(() => {
45
- if (open) {
50
+ if (open && !isPresentedRef.current) {
46
51
  impactMedium();
47
52
  ref.current?.present();
48
53
  wasOpened.current = true;
49
- } else if (wasOpened.current) {
54
+ isPresentedRef.current = true;
55
+ } else if (!open && wasOpened.current && isPresentedRef.current) {
50
56
  ref.current?.dismiss();
51
57
  }
52
58
  }, [open]);
@@ -98,7 +104,7 @@ function Sheet({
98
104
  {
99
105
  ref,
100
106
  name,
101
- onDismiss: onClose,
107
+ onDismiss: handleDismiss,
102
108
  enableDynamicSizing: useDynamicSizing,
103
109
  snapPoints,
104
110
  maxDynamicContentSize: useDynamicSizing && maxHeight ? maxHeight : void 0,
@@ -1,4 +1,4 @@
1
- import { useTheme } from './chunk-EMUWGDWC.mjs';
1
+ import { useTheme } from './chunk-YTXRIXNZ.mjs';
2
2
  import { ms } from './chunk-2CE3TQVY.mjs';
3
3
  import React from 'react';
4
4
  import { StyleSheet, View, Text } from 'react-native';
@@ -1,6 +1,6 @@
1
- import { IconButton } from './chunk-DF6DU42P.mjs';
1
+ import { IconButton } from './chunk-LOBLCFMN.mjs';
2
2
  import { BREAKPOINTS } from './chunk-QY3X2UYR.mjs';
3
- import { useTheme } from './chunk-EMUWGDWC.mjs';
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-EMUWGDWC.mjs';
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-EMUWGDWC.mjs';
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-EMUWGDWC.mjs';
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-EMUWGDWC.mjs';
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';
@@ -1,6 +1,6 @@
1
1
  import { TIMINGS } from './chunk-DVK4G2GT.mjs';
2
2
  import { RADIUS } from './chunk-QY3X2UYR.mjs';
3
- import { useTheme } from './chunk-EMUWGDWC.mjs';
3
+ import { useTheme } from './chunk-YTXRIXNZ.mjs';
4
4
  import { vs, s } from './chunk-2CE3TQVY.mjs';
5
5
  import React, { useState, useEffect } from 'react';
6
6
  import { StyleSheet, View } from 'react-native';
@@ -13,12 +13,13 @@ function Skeleton({
13
13
  borderRadius = 6,
14
14
  preset = "base",
15
15
  diameter = 40,
16
+ backgroundColor,
16
17
  style
17
18
  }) {
18
19
  const { colors, colorScheme } = useTheme();
19
20
  const shimmer = useSharedValue(0);
20
21
  const [containerWidth, setContainerWidth] = useState(300);
21
- const shimmerHighlight = colorScheme === "dark" ? "rgba(255,255,255,0.08)" : "rgba(255,255,255,0.7)";
22
+ const shimmerHighlight = colorScheme === "dark" ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.07)";
22
23
  useEffect(() => {
23
24
  shimmer.value = withRepeat(
24
25
  withTiming(1, { duration: TIMINGS.shimmer.duration, easing: Easing.linear }),
@@ -37,7 +38,7 @@ function Skeleton({
37
38
  {
38
39
  style: [
39
40
  styles.base,
40
- { width: resolvedWidth, height: resolvedHeight, borderRadius: resolvedRadius, backgroundColor: colors.surface },
41
+ { width: resolvedWidth, height: resolvedHeight, borderRadius: resolvedRadius, backgroundColor: backgroundColor ?? colors.skeleton },
41
42
  style
42
43
  ],
43
44
  onLayout: (e) => setContainerWidth(e.nativeEvent.layout.width),
@@ -1,4 +1,4 @@
1
- import { useTheme } from './chunk-EMUWGDWC.mjs';
1
+ import { useTheme } from './chunk-YTXRIXNZ.mjs';
2
2
  import { s, ms } from './chunk-2CE3TQVY.mjs';
3
3
  import React, { useState } from 'react';
4
4
  import { StyleSheet, View, Image, Text } from 'react-native';
@@ -1,8 +1,8 @@
1
- import { Button } from './chunk-DOGIPOF5.mjs';
1
+ import { Button } from './chunk-4J2PXL36.mjs';
2
2
  import { impactMedium, notificationSuccess, selectionAsync } from './chunk-EJ7ZPXOH.mjs';
3
- import { useTheme } from './chunk-EMUWGDWC.mjs';
3
+ import { useTheme } from './chunk-YTXRIXNZ.mjs';
4
4
  import { vs, mvs, ms, s } from './chunk-2CE3TQVY.mjs';
5
- import React, { useRef, useId, useEffect, useCallback } from 'react';
5
+ import React, { useRef, useId, useCallback, useEffect } from 'react';
6
6
  import { StyleSheet, View, Text, TouchableOpacity } from 'react-native';
7
7
  import { BottomSheetBackdrop, BottomSheetModal, BottomSheetView } from '@gorhom/bottom-sheet';
8
8
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
@@ -24,13 +24,19 @@ function ConfirmDialog({
24
24
  const insets = useSafeAreaInsets();
25
25
  const ref = useRef(null);
26
26
  const wasOpened = useRef(false);
27
+ const isPresentedRef = useRef(false);
27
28
  const name = useId();
29
+ const handleDismiss = useCallback(() => {
30
+ isPresentedRef.current = false;
31
+ onCancel();
32
+ }, [onCancel]);
28
33
  useEffect(() => {
29
- if (visible) {
34
+ if (visible && !isPresentedRef.current) {
30
35
  impactMedium();
31
36
  ref.current?.present();
32
37
  wasOpened.current = true;
33
- } else if (wasOpened.current) {
38
+ isPresentedRef.current = true;
39
+ } else if (!visible && wasOpened.current && isPresentedRef.current) {
34
40
  ref.current?.dismiss();
35
41
  }
36
42
  }, [visible]);
@@ -51,7 +57,7 @@ function ConfirmDialog({
51
57
  {
52
58
  ref,
53
59
  name,
54
- onDismiss: onCancel,
60
+ onDismiss: handleDismiss,
55
61
  enableDynamicSizing: true,
56
62
  backdropComponent: renderBackdrop,
57
63
  backgroundStyle: { ...styles.background, backgroundColor: colors.card },
@@ -1,5 +1,5 @@
1
1
  import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
2
- import { useTheme } from './chunk-EMUWGDWC.mjs';
2
+ import { useTheme } from './chunk-YTXRIXNZ.mjs';
3
3
  import { vs, ms } from './chunk-2CE3TQVY.mjs';
4
4
  import React, { useRef } from 'react';
5
5
  import { StyleSheet, View, Text } from 'react-native';
@@ -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-EMUWGDWC.mjs';
3
+ import { useTheme } from './chunk-YTXRIXNZ.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,8 +1,8 @@
1
- import { Spinner } from './chunk-BCWEHE34.mjs';
1
+ import { Spinner } from './chunk-LIS6I5UP.mjs';
2
2
  import { selectionAsync, impactMedium } 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-EMUWGDWC.mjs';
5
+ import { useTheme } from './chunk-YTXRIXNZ.mjs';
6
6
  import { s, vs, ms } from './chunk-2CE3TQVY.mjs';
7
7
  import React, { useRef, useState, useId, useMemo, useCallback } from 'react';
8
8
  import { Dimensions, StyleSheet, TouchableOpacity, View, Text } from 'react-native';
@@ -1,5 +1,5 @@
1
1
  import { SPRINGS } from './chunk-DVK4G2GT.mjs';
2
- import { useTheme } from './chunk-EMUWGDWC.mjs';
2
+ import { useTheme } from './chunk-YTXRIXNZ.mjs';
3
3
  import { vs } from './chunk-2CE3TQVY.mjs';
4
4
  import React, { useState, useEffect } from 'react';
5
5
  import { StyleSheet, View } from 'react-native';
@@ -1,7 +1,7 @@
1
1
  import { PressableButton } from './chunk-3DKJ2GIC.mjs';
2
2
  import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
3
3
  import { COLOR_TRANSITION, OPACITY_TRANSITION } from './chunk-DVK4G2GT.mjs';
4
- import { useTheme } from './chunk-EMUWGDWC.mjs';
4
+ import { useTheme } from './chunk-YTXRIXNZ.mjs';
5
5
  import { mvs, ms, vs, s } from './chunk-2CE3TQVY.mjs';
6
6
  import React from 'react';
7
7
  import { StyleSheet, View, Text } from 'react-native';
@@ -1,5 +1,5 @@
1
1
  import { RADIUS } from './chunk-QY3X2UYR.mjs';
2
- import { useTheme } from './chunk-EMUWGDWC.mjs';
2
+ import { useTheme } from './chunk-YTXRIXNZ.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';
@@ -2,7 +2,7 @@ import { PressableButton } 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-EMUWGDWC.mjs';
5
+ import { useTheme } from './chunk-YTXRIXNZ.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';
@@ -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-EMUWGDWC.mjs';
5
+ import { useTheme } from './chunk-YTXRIXNZ.mjs';
6
6
  import { vs, ms, s } from './chunk-2CE3TQVY.mjs';
7
7
  import React from 'react';
8
8
  import { StyleSheet, View, Text } from 'react-native';
@@ -1,4 +1,4 @@
1
- import { useTheme } from './chunk-EMUWGDWC.mjs';
1
+ import { useTheme } from './chunk-YTXRIXNZ.mjs';
2
2
  import React from 'react';
3
3
  import { StyleSheet, View } from 'react-native';
4
4
 
@@ -1,4 +1,4 @@
1
- import { useTheme } from './chunk-EMUWGDWC.mjs';
1
+ import { useTheme } from './chunk-YTXRIXNZ.mjs';
2
2
  import { ms, vs, s } from './chunk-2CE3TQVY.mjs';
3
3
  import React from 'react';
4
4
  import { toast, Toaster } from 'sonner-native';
@@ -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,
@@ -1,5 +1,5 @@
1
- import { ToastProvider } from './chunk-QSFV2P7O.mjs';
2
- import { ThemeProvider } from './chunk-EMUWGDWC.mjs';
1
+ import { ToastProvider } from './chunk-YMYIEVZP.mjs';
2
+ import { ThemeProvider } from './chunk-YTXRIXNZ.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';
@@ -3,7 +3,7 @@ import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
3
3
  import { PRESS_SCALE } 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-EMUWGDWC.mjs';
6
+ import { useTheme } from './chunk-YTXRIXNZ.mjs';
7
7
  import { mvs, ms, vs, s } from './chunk-2CE3TQVY.mjs';
8
8
  import React, { useState } from 'react';
9
9
  import { StyleSheet, ScrollView, View, TouchableOpacity, Text } from 'react-native';
@@ -25,6 +25,7 @@ type ResolvedColors = ThemeColors & {
25
25
  foregroundMuted: string;
26
26
  surface: string;
27
27
  surfaceStrong: string;
28
+ skeleton: string;
28
29
  destructiveTint: string;
29
30
  destructiveBorder: string;
30
31
  successTint: string;
@@ -25,6 +25,7 @@ type ResolvedColors = ThemeColors & {
25
25
  foregroundMuted: string;
26
26
  surface: string;
27
27
  surfaceStrong: string;
28
+ skeleton: string;
28
29
  destructiveTint: string;
29
30
  destructiveBorder: string;
30
31
  successTint: string;
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { T as Theme, C as ColorScheme, a as ThemeContextValue, b as ThemeColors, R as ResolvedColors } from './index-wt-orHUi.mjs';
3
- export { c as RetrayProvider, d as RetrayProviderProps } from './index-wt-orHUi.mjs';
2
+ import { T as Theme, C as ColorScheme, a as ThemeContextValue, b as ThemeColors, R as ResolvedColors } from './index-CY34hxPN.mjs';
3
+ export { c as RetrayProvider, d as RetrayProviderProps } from './index-CY34hxPN.mjs';
4
4
  export { Button, ButtonProps, ButtonSize, ButtonVariant } from './Button.mjs';
5
5
  export { ButtonGroup, ButtonGroupProps } from './ButtonGroup.mjs';
6
6
  export { IconButton, IconButtonProps, IconButtonSize, IconButtonVariant } from './IconButton.mjs';
@@ -46,6 +46,7 @@ export { ErrorBoundary, ErrorBoundaryProps, ErrorFallbackProps } from './ErrorBo
46
46
  export { PagerDots, PagerDotsProps } from './PagerDots.mjs';
47
47
  export { AppHeader, AppHeaderProps } from './AppHeader.mjs';
48
48
  export { SelectableGrid, SelectableGridItem, SelectableGridProps } from './SelectableGrid.mjs';
49
+ export { SelectableCard, SelectableCardGroup, SelectableCardGroupProps, SelectableCardProps } from './SelectableCard.mjs';
49
50
  export { PricingCard, PricingCardProps, PricingFeature } from './PricingCard.mjs';
50
51
  export { TabBar, TabBarItem, TabBarProps } from './TabBar.mjs';
51
52
  export { ImageViewer, ImageViewerProps } from './ImageViewer.mjs';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { T as Theme, C as ColorScheme, a as ThemeContextValue, b as ThemeColors, R as ResolvedColors } from './index-wt-orHUi.js';
3
- export { c as RetrayProvider, d as RetrayProviderProps } from './index-wt-orHUi.js';
2
+ import { T as Theme, C as ColorScheme, a as ThemeContextValue, b as ThemeColors, R as ResolvedColors } from './index-CY34hxPN.js';
3
+ export { c as RetrayProvider, d as RetrayProviderProps } from './index-CY34hxPN.js';
4
4
  export { Button, ButtonProps, ButtonSize, ButtonVariant } from './Button.js';
5
5
  export { ButtonGroup, ButtonGroupProps } from './ButtonGroup.js';
6
6
  export { IconButton, IconButtonProps, IconButtonSize, IconButtonVariant } from './IconButton.js';
@@ -46,6 +46,7 @@ export { ErrorBoundary, ErrorBoundaryProps, ErrorFallbackProps } from './ErrorBo
46
46
  export { PagerDots, PagerDotsProps } from './PagerDots.js';
47
47
  export { AppHeader, AppHeaderProps } from './AppHeader.js';
48
48
  export { SelectableGrid, SelectableGridItem, SelectableGridProps } from './SelectableGrid.js';
49
+ export { SelectableCard, SelectableCardGroup, SelectableCardGroupProps, SelectableCardProps } from './SelectableCard.js';
49
50
  export { PricingCard, PricingCardProps, PricingFeature } from './PricingCard.js';
50
51
  export { TabBar, TabBarItem, TabBarProps } from './TabBar.js';
51
52
  export { ImageViewer, ImageViewerProps } from './ImageViewer.js';