@retray-dev/ui-kit 7.0.1 → 9.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.
Files changed (234) hide show
  1. package/COMPONENTS.md +554 -11
  2. package/EXAMPLES.md +2 -2
  3. package/README.md +14 -8
  4. package/dist/Accordion.js +57 -5
  5. package/dist/Accordion.mjs +4 -3
  6. package/dist/AlertBanner.js +4 -1
  7. package/dist/AlertBanner.mjs +3 -2
  8. package/dist/AppHeader.d.mts +40 -0
  9. package/dist/AppHeader.d.ts +40 -0
  10. package/dist/AppHeader.js +515 -0
  11. package/dist/AppHeader.mjs +10 -0
  12. package/dist/Avatar.js +39 -29
  13. package/dist/Avatar.mjs +2 -1
  14. package/dist/Badge.js +11 -1
  15. package/dist/Badge.mjs +2 -1
  16. package/dist/Button.d.mts +8 -3
  17. package/dist/Button.d.ts +8 -3
  18. package/dist/Button.js +126 -108
  19. package/dist/Button.mjs +6 -5
  20. package/dist/ButtonGroup.mjs +1 -0
  21. package/dist/Card.js +90 -70
  22. package/dist/Card.mjs +5 -4
  23. package/dist/CategoryStrip.js +79 -22
  24. package/dist/CategoryStrip.mjs +6 -6
  25. package/dist/Checkbox.js +118 -86
  26. package/dist/Checkbox.mjs +5 -5
  27. package/dist/Chip.js +113 -80
  28. package/dist/Chip.mjs +5 -5
  29. package/dist/ConfirmDialog.js +140 -110
  30. package/dist/ConfirmDialog.mjs +7 -6
  31. package/dist/CurrencyDisplay.mjs +1 -0
  32. package/dist/CurrencyInput.d.mts +1 -1
  33. package/dist/CurrencyInput.d.ts +1 -1
  34. package/dist/CurrencyInput.js +9 -5
  35. package/dist/CurrencyInput.mjs +5 -4
  36. package/dist/DetailRow.mjs +1 -0
  37. package/dist/EmptyState.js +131 -111
  38. package/dist/EmptyState.mjs +7 -6
  39. package/dist/ErrorBoundary.d.mts +42 -0
  40. package/dist/ErrorBoundary.d.ts +42 -0
  41. package/dist/ErrorBoundary.js +351 -0
  42. package/dist/ErrorBoundary.mjs +7 -0
  43. package/dist/Form.mjs +1 -0
  44. package/dist/HolographicCard.d.mts +55 -0
  45. package/dist/HolographicCard.d.ts +55 -0
  46. package/dist/HolographicCard.js +316 -0
  47. package/dist/HolographicCard.mjs +191 -0
  48. package/dist/IconButton.d.mts +8 -3
  49. package/dist/IconButton.d.ts +8 -3
  50. package/dist/IconButton.js +115 -98
  51. package/dist/IconButton.mjs +5 -4
  52. package/dist/ImageViewer.d.mts +23 -0
  53. package/dist/ImageViewer.d.ts +23 -0
  54. package/dist/ImageViewer.js +582 -0
  55. package/dist/ImageViewer.mjs +8 -0
  56. package/dist/Input.mjs +4 -3
  57. package/dist/LabelValue.mjs +1 -0
  58. package/dist/ListGroup.mjs +1 -0
  59. package/dist/ListItem.js +131 -117
  60. package/dist/ListItem.mjs +6 -5
  61. package/dist/MediaCard.js +54 -6
  62. package/dist/MediaCard.mjs +6 -5
  63. package/dist/MenuGroup.mjs +1 -0
  64. package/dist/MenuItem.js +91 -79
  65. package/dist/MenuItem.mjs +6 -5
  66. package/dist/MonthPicker.d.mts +10 -2
  67. package/dist/MonthPicker.d.ts +10 -2
  68. package/dist/MonthPicker.js +80 -17
  69. package/dist/MonthPicker.mjs +3 -2
  70. package/dist/PagerDots.d.mts +35 -0
  71. package/dist/PagerDots.d.ts +35 -0
  72. package/dist/PagerDots.js +392 -0
  73. package/dist/PagerDots.mjs +7 -0
  74. package/dist/Pressable.d.mts +5 -5
  75. package/dist/Pressable.d.ts +5 -5
  76. package/dist/Pressable.js +97 -86
  77. package/dist/Pressable.mjs +5 -4
  78. package/dist/PricingCard.d.mts +50 -0
  79. package/dist/PricingCard.d.ts +50 -0
  80. package/dist/PricingCard.js +636 -0
  81. package/dist/PricingCard.mjs +11 -0
  82. package/dist/Progress.mjs +3 -2
  83. package/dist/RadioGroup.js +81 -30
  84. package/dist/RadioGroup.mjs +5 -5
  85. package/dist/RetrayProvider.d.mts +2 -0
  86. package/dist/RetrayProvider.d.ts +2 -0
  87. package/dist/RetrayProvider.js +214 -0
  88. package/dist/RetrayProvider.mjs +5 -0
  89. package/dist/Select.js +51 -4
  90. package/dist/Select.mjs +5 -4
  91. package/dist/SelectableGrid.d.mts +44 -0
  92. package/dist/SelectableGrid.d.ts +44 -0
  93. package/dist/SelectableGrid.js +448 -0
  94. package/dist/SelectableGrid.mjs +9 -0
  95. package/dist/Separator.mjs +1 -0
  96. package/dist/Sheet.d.mts +13 -1
  97. package/dist/Sheet.d.ts +13 -1
  98. package/dist/Sheet.js +115 -5
  99. package/dist/Sheet.mjs +4 -2
  100. package/dist/Skeleton.d.mts +50 -0
  101. package/dist/Skeleton.d.ts +50 -0
  102. package/dist/Skeleton.js +61 -0
  103. package/dist/Skeleton.mjs +4 -2
  104. package/dist/Slider.js +51 -4
  105. package/dist/Slider.mjs +3 -2
  106. package/dist/Spinner.js +28 -7
  107. package/dist/Spinner.mjs +2 -1
  108. package/dist/Switch.js +98 -48
  109. package/dist/Switch.mjs +4 -3
  110. package/dist/TabBar.d.mts +42 -0
  111. package/dist/TabBar.d.ts +42 -0
  112. package/dist/TabBar.js +361 -0
  113. package/dist/TabBar.mjs +6 -0
  114. package/dist/Tabs.js +92 -62
  115. package/dist/Tabs.mjs +5 -4
  116. package/dist/Text.js +16 -0
  117. package/dist/Text.mjs +2 -1
  118. package/dist/Textarea.mjs +4 -3
  119. package/dist/Toast.d.mts +7 -7
  120. package/dist/Toast.d.ts +7 -7
  121. package/dist/Toast.mjs +1 -0
  122. package/dist/Toggle.d.mts +6 -3
  123. package/dist/Toggle.d.ts +6 -3
  124. package/dist/Toggle.js +135 -120
  125. package/dist/Toggle.mjs +5 -5
  126. package/dist/VirtualList.mjs +1 -0
  127. package/dist/{chunk-7H2OR44A.mjs → chunk-26BCI223.mjs} +1 -1
  128. package/dist/{chunk-CRYBX2CM.mjs → chunk-2TFTAWVJ.mjs} +44 -59
  129. package/dist/chunk-3DKJ2GIC.mjs +30 -0
  130. package/dist/{chunk-KWCPOM6W.mjs → chunk-3U4SSNWP.mjs} +32 -48
  131. package/dist/chunk-4I7D47FH.mjs +139 -0
  132. package/dist/chunk-4K625MVM.mjs +142 -0
  133. package/dist/{chunk-MN7OG7IY.mjs → chunk-6OAZJ577.mjs} +6 -4
  134. package/dist/{chunk-L7E7TVEZ.mjs → chunk-756RAKE4.mjs} +2 -2
  135. package/dist/{chunk-HSPSMN6U.mjs → chunk-7QHVVCB3.mjs} +2 -2
  136. package/dist/{chunk-URLL5JBR.mjs → chunk-A3A6KNQN.mjs} +3 -3
  137. package/dist/chunk-AJ7ZDNBT.mjs +120 -0
  138. package/dist/{chunk-FTLJOUOQ.mjs → chunk-AV4EMIRH.mjs} +25 -28
  139. package/dist/chunk-AZJF2BLK.mjs +115 -0
  140. package/dist/chunk-BNP626TY.mjs +159 -0
  141. package/dist/{chunk-5IKW3VNC.mjs → chunk-DVK4G2GT.mjs} +17 -1
  142. package/dist/{chunk-6LQYY7HC.mjs → chunk-EH745HE5.mjs} +2 -2
  143. package/dist/chunk-EJ7ZPXOH.mjs +163 -0
  144. package/dist/{chunk-RKLHUDZS.mjs → chunk-GD6KXMG5.mjs} +29 -15
  145. package/dist/{chunk-RR2VQLKE.mjs → chunk-GQYFLP3D.mjs} +14 -17
  146. package/dist/{chunk-Y6MXOREN.mjs → chunk-ID72TK46.mjs} +8 -17
  147. package/dist/{chunk-NQGVLMWG.mjs → chunk-JMOZEC77.mjs} +1 -1
  148. package/dist/{chunk-GCWOGZYL.mjs → chunk-JT7HKXRB.mjs} +39 -29
  149. package/dist/{chunk-LWG526VX.mjs → chunk-KIHCWCWL.mjs} +47 -62
  150. package/dist/chunk-LXJIIOYQ.mjs +104 -0
  151. package/dist/{chunk-SBZYEV4S.mjs → chunk-M6ZXVBTK.mjs} +5 -2
  152. package/dist/{chunk-XDMN67KV.mjs → chunk-MAC465BB.mjs} +10 -8
  153. package/dist/chunk-MBMXYJJV.mjs +36 -0
  154. package/dist/chunk-MLF3EZFW.mjs +119 -0
  155. package/dist/chunk-NA7PARID.mjs +147 -0
  156. package/dist/{chunk-QXGYKWI7.mjs → chunk-O3HA6TYM.mjs} +9 -4
  157. package/dist/{chunk-63357L2X.mjs → chunk-OB4JUQ3O.mjs} +1 -1
  158. package/dist/{chunk-AU2VDY4P.mjs → chunk-PFZTM6D5.mjs} +52 -4
  159. package/dist/chunk-QKH5ZOD5.mjs +97 -0
  160. package/dist/{chunk-KZJRQOIU.mjs → chunk-TERDKCLE.mjs} +11 -1
  161. package/dist/{chunk-U4N7WF4Z.mjs → chunk-UREA2GYY.mjs} +28 -23
  162. package/dist/{chunk-TAJ2PQ2O.mjs → chunk-VGTDN7SW.mjs} +7 -6
  163. package/dist/{chunk-URDE3EUU.mjs → chunk-VQ57HWPL.mjs} +27 -15
  164. package/dist/chunk-WBOOUHSS.mjs +62 -0
  165. package/dist/{chunk-GNGLDL6Z.mjs → chunk-WJLKJMKR.mjs} +18 -0
  166. package/dist/{chunk-YZJAFS4P.mjs → chunk-X4G6APW6.mjs} +22 -19
  167. package/dist/chunk-Y6FXYEAI.mjs +8 -0
  168. package/dist/chunk-YFZ3ELX5.mjs +16 -0
  169. package/dist/{chunk-QCNARS3X.mjs → chunk-YNROWHQJ.mjs} +1 -1
  170. package/dist/chunk-Z4BVUWW6.mjs +196 -0
  171. package/dist/{chunk-GPOUINK5.mjs → chunk-ZJKGQMYH.mjs} +10 -27
  172. package/dist/index-wt-orHUi.d.mts +85 -0
  173. package/dist/index-wt-orHUi.d.ts +85 -0
  174. package/dist/index.d.mts +59 -51
  175. package/dist/index.d.ts +59 -51
  176. package/dist/index.js +1940 -744
  177. package/dist/index.mjs +49 -39
  178. package/package.json +35 -5
  179. package/src/components/Accordion/Accordion.tsx +12 -1
  180. package/src/components/AlertBanner/AlertBanner.tsx +5 -0
  181. package/src/components/AppHeader/AppHeader.tsx +172 -0
  182. package/src/components/AppHeader/index.ts +1 -0
  183. package/src/components/Avatar/Avatar.tsx +10 -2
  184. package/src/components/Badge/Badge.tsx +8 -1
  185. package/src/components/Button/Button.tsx +20 -27
  186. package/src/components/Card/Card.tsx +12 -23
  187. package/src/components/CategoryStrip/CategoryStrip.tsx +17 -21
  188. package/src/components/Checkbox/Checkbox.tsx +26 -40
  189. package/src/components/Chip/Chip.tsx +24 -33
  190. package/src/components/CurrencyInput/CurrencyInput.tsx +10 -8
  191. package/src/components/EmptyState/EmptyState.tsx +2 -1
  192. package/src/components/ErrorBoundary/ErrorBoundary.tsx +153 -0
  193. package/src/components/ErrorBoundary/index.ts +1 -0
  194. package/src/components/HolographicCard/HolographicCard.tsx +315 -0
  195. package/src/components/HolographicCard/index.ts +1 -0
  196. package/src/components/IconButton/IconButton.tsx +19 -27
  197. package/src/components/ImageViewer/ImageViewer.tsx +290 -0
  198. package/src/components/ImageViewer/index.ts +1 -0
  199. package/src/components/ListItem/ListItem.tsx +70 -67
  200. package/src/components/MediaCard/MediaCard.tsx +8 -2
  201. package/src/components/MenuItem/MenuItem.tsx +10 -25
  202. package/src/components/MonthPicker/MonthPicker.tsx +39 -13
  203. package/src/components/MonthPicker/index.ts +1 -1
  204. package/src/components/PagerDots/PagerDots.tsx +200 -0
  205. package/src/components/PagerDots/index.ts +1 -0
  206. package/src/components/Pressable/Pressable.tsx +19 -35
  207. package/src/components/PricingCard/PricingCard.tsx +220 -0
  208. package/src/components/PricingCard/index.ts +1 -0
  209. package/src/components/RadioGroup/RadioGroup.tsx +14 -27
  210. package/src/components/RetrayProvider/RetrayProvider.tsx +59 -0
  211. package/src/components/RetrayProvider/index.ts +1 -0
  212. package/src/components/SelectableGrid/SelectableGrid.tsx +205 -0
  213. package/src/components/SelectableGrid/index.ts +1 -0
  214. package/src/components/Sheet/Sheet.tsx +65 -1
  215. package/src/components/Skeleton/Skeleton.tsx +142 -1
  216. package/src/components/Spinner/Spinner.tsx +17 -2
  217. package/src/components/Switch/Switch.tsx +30 -58
  218. package/src/components/TabBar/TabBar.tsx +169 -0
  219. package/src/components/TabBar/index.ts +1 -0
  220. package/src/components/Tabs/Tabs.tsx +23 -26
  221. package/src/components/Text/Text.tsx +2 -0
  222. package/src/components/Toggle/Toggle.tsx +35 -51
  223. package/src/fonts.ts +4 -1
  224. package/src/index.ts +23 -2
  225. package/src/utils/animations.ts +29 -1
  226. package/src/utils/fontGuard.ts +34 -0
  227. package/src/utils/haptics.ts +211 -9
  228. package/src/utils/pressable.ts +66 -0
  229. package/dist/chunk-76PFOSM2.mjs +0 -41
  230. package/dist/chunk-DITNP6PL.mjs +0 -106
  231. package/dist/chunk-JBLL7U3U.mjs +0 -64
  232. package/dist/chunk-LG4DO3DK.mjs +0 -174
  233. package/dist/chunk-RMMK64W5.mjs +0 -54
  234. package/dist/chunk-RTC3CFXF.mjs +0 -29
@@ -1,21 +1,13 @@
1
- import { usePressScale } from './chunk-QCNARS3X.mjs';
2
- import { impactLight } from './chunk-RTC3CFXF.mjs';
3
- import { SPRINGS, PRESS_SCALE } from './chunk-5IKW3VNC.mjs';
1
+ import { PressableCard } from './chunk-3DKJ2GIC.mjs';
2
+ import { impactLight } from './chunk-EJ7ZPXOH.mjs';
4
3
  import { RADIUS } from './chunk-QY3X2UYR.mjs';
5
4
  import { useTheme } from './chunk-SOYNZDVY.mjs';
6
5
  import { vs, s, mvs, ms } from './chunk-2CE3TQVY.mjs';
7
6
  import React from 'react';
8
- import { StyleSheet, View, TouchableOpacity, Text } from 'react-native';
9
- import Animated from 'react-native-reanimated';
7
+ import { StyleSheet, View, Text } from 'react-native';
10
8
 
11
9
  function Card({ children, variant = "elevated", onPress, style, accessibilityLabel }) {
12
10
  const { colors } = useTheme();
13
- const { animatedStyle, onPressIn, onPressOut, hoverHandlers } = usePressScale({
14
- pressScale: PRESS_SCALE.card,
15
- pressInSpring: SPRINGS.surfacePressIn,
16
- pressOutSpring: SPRINGS.surfacePressOut,
17
- disabled: !onPress
18
- });
19
11
  const handlePress = () => {
20
12
  if (!onPress) return;
21
13
  impactLight();
@@ -49,19 +41,18 @@ function Card({ children, variant = "elevated", onPress, style, accessibilityLab
49
41
  }[variant];
50
42
  const cardContent = /* @__PURE__ */ React.createElement(View, { style: [styles.card, variantStyle, style] }, children);
51
43
  if (onPress) {
52
- return /* @__PURE__ */ React.createElement(Animated.View, { style: animatedStyle, ...hoverHandlers }, /* @__PURE__ */ React.createElement(
53
- TouchableOpacity,
44
+ return /* @__PURE__ */ React.createElement(
45
+ PressableCard,
54
46
  {
55
47
  onPress: handlePress,
56
- onPressIn,
57
- onPressOut,
58
- activeOpacity: 1,
48
+ rippleColor: "transparent",
59
49
  touchSoundDisabled: true,
50
+ activateOnHover: true,
60
51
  accessibilityRole: "button",
61
52
  accessibilityLabel
62
53
  },
63
54
  cardContent
64
- ));
55
+ );
65
56
  }
66
57
  return cardContent;
67
58
  }
@@ -1,4 +1,4 @@
1
- import { selectionAsync } from './chunk-RTC3CFXF.mjs';
1
+ import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
2
2
  import { useTheme } from './chunk-SOYNZDVY.mjs';
3
3
  import { vs, ms } from './chunk-2CE3TQVY.mjs';
4
4
  import React, { useRef } from 'react';
@@ -38,7 +38,7 @@ function AvatarBase({ src, fallback, fallbackText, size = "md", status, style })
38
38
  const showFallback = !src || imageError;
39
39
  const statusSize = typeof size === "number" ? size * 0.25 : statusSizeMap[size];
40
40
  const statusColor = {
41
- online: "#22c55e",
41
+ online: colors.success,
42
42
  offline: "transparent",
43
43
  busy: colors.destructive,
44
44
  away: colors.warning
@@ -50,36 +50,46 @@ function AvatarBase({ src, fallback, fallbackText, size = "md", status, style })
50
50
  backgroundColor: colors.surface,
51
51
  overflow: "hidden"
52
52
  };
53
- return /* @__PURE__ */ React.createElement(View, { style: [styles.wrapper, style] }, /* @__PURE__ */ React.createElement(View, { style: [styles.base, containerStyle] }, !showFallback ? /* @__PURE__ */ React.createElement(
54
- Image,
55
- {
56
- source: { uri: src },
57
- style: { width: dimension, height: dimension },
58
- onError: () => setImageError(true)
59
- }
60
- ) : /* @__PURE__ */ React.createElement(
61
- Text,
62
- {
63
- style: [styles.fallback, { color: colors.foregroundMuted, fontSize }],
64
- allowFontScaling: true
65
- },
66
- getInitials(fallback, fallbackText)
67
- )), status && /* @__PURE__ */ React.createElement(
53
+ const a11yLabel = fallbackText || fallback || "Avatar";
54
+ return /* @__PURE__ */ React.createElement(
68
55
  View,
69
56
  {
70
- style: [
71
- styles.statusDot,
72
- {
73
- width: statusSize,
74
- height: statusSize,
75
- borderRadius: statusSize / 2,
76
- backgroundColor: statusColor[status],
77
- borderWidth: status === "offline" ? 2 : 1.5,
78
- borderColor: status === "offline" ? colors.border : colors.background
79
- }
80
- ]
81
- }
82
- ));
57
+ style: [styles.wrapper, style],
58
+ accessibilityRole: "image",
59
+ accessibilityLabel: a11yLabel
60
+ },
61
+ /* @__PURE__ */ React.createElement(View, { style: [styles.base, containerStyle] }, !showFallback ? /* @__PURE__ */ React.createElement(
62
+ Image,
63
+ {
64
+ source: { uri: src },
65
+ style: { width: dimension, height: dimension },
66
+ onError: () => setImageError(true)
67
+ }
68
+ ) : /* @__PURE__ */ React.createElement(
69
+ Text,
70
+ {
71
+ style: [styles.fallback, { color: colors.foregroundMuted, fontSize }],
72
+ allowFontScaling: true
73
+ },
74
+ getInitials(fallback, fallbackText)
75
+ )),
76
+ status && /* @__PURE__ */ React.createElement(
77
+ View,
78
+ {
79
+ style: [
80
+ styles.statusDot,
81
+ {
82
+ width: statusSize,
83
+ height: statusSize,
84
+ borderRadius: statusSize / 2,
85
+ backgroundColor: statusColor[status],
86
+ borderWidth: status === "offline" ? 2 : 1.5,
87
+ borderColor: status === "offline" ? colors.border : colors.background
88
+ }
89
+ ]
90
+ }
91
+ )
92
+ );
83
93
  }
84
94
  var Avatar = React.memo(AvatarBase);
85
95
  var styles = StyleSheet.create({
@@ -1,13 +1,12 @@
1
- import { useColorTransition } from './chunk-7H2OR44A.mjs';
1
+ import { PressableButton } from './chunk-3DKJ2GIC.mjs';
2
+ import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
3
+ import { COLOR_TRANSITION } from './chunk-DVK4G2GT.mjs';
2
4
  import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
3
- import { usePressScale } from './chunk-QCNARS3X.mjs';
4
- import { selectionAsync } from './chunk-RTC3CFXF.mjs';
5
- import { PRESS_SCALE } from './chunk-5IKW3VNC.mjs';
6
5
  import { useTheme } from './chunk-SOYNZDVY.mjs';
7
6
  import { vs, s, ms } from './chunk-2CE3TQVY.mjs';
8
7
  import React from 'react';
9
- import { StyleSheet, TouchableOpacity, View } from 'react-native';
10
- import Animated, { useAnimatedStyle, interpolateColor } from 'react-native-reanimated';
8
+ import { StyleSheet, View, Text } from 'react-native';
9
+ import { EaseView } from 'react-native-ease';
11
10
  import { FontAwesome5 } from '@expo/vector-icons';
12
11
 
13
12
  function ToggleIcon({ pressed, iconName, activeIconName, icon, activeIcon, iconColor, activeIconColor, iconSize, primaryColor, mutedColor }) {
@@ -47,75 +46,61 @@ function Toggle({
47
46
  activeIconColor,
48
47
  disabled,
49
48
  style,
50
- accessibilityLabel,
51
- ...props
49
+ accessibilityLabel
52
50
  }) {
53
51
  const { colors } = useTheme();
54
- const { animatedStyle: scaleStyle, onPressIn, onPressOut, hoverHandlers } = usePressScale({
55
- pressScale: PRESS_SCALE.button,
56
- disabled
57
- });
58
- const progress = useColorTransition(pressed);
59
52
  const inactiveBorder = variant === "outline" ? colors.border : "transparent";
60
- const surfaceStyle = useAnimatedStyle(() => ({
61
- borderColor: interpolateColor(progress.value, [0, 1], [inactiveBorder, colors.primary]),
62
- backgroundColor: interpolateColor(progress.value, [0, 1], ["transparent", colors.surfaceStrong])
63
- }));
64
- const textStyle = useAnimatedStyle(() => ({
65
- color: interpolateColor(progress.value, [0, 1], [colors.foreground, colors.primary])
66
- }));
67
53
  const iconSize = iconSizeMap[size];
68
- return /* @__PURE__ */ React.createElement(
69
- Animated.View,
54
+ const handlePress = () => {
55
+ selectionAsync();
56
+ onPressedChange?.(!pressed);
57
+ };
58
+ return /* @__PURE__ */ React.createElement(View, { style: [disabled && styles.disabled, style] }, /* @__PURE__ */ React.createElement(
59
+ PressableButton,
70
60
  {
71
- style: [scaleStyle, disabled && styles.disabled, style],
72
- ...hoverHandlers
61
+ onPress: handlePress,
62
+ enabled: !disabled,
63
+ rippleColor: "transparent",
64
+ touchSoundDisabled: true,
65
+ activateOnHover: true,
66
+ accessibilityRole: "button",
67
+ accessibilityLabel: accessibilityLabel ?? label,
68
+ accessibilityState: { selected: pressed, disabled: !!disabled }
73
69
  },
74
70
  /* @__PURE__ */ React.createElement(
75
- TouchableOpacity,
71
+ EaseView,
76
72
  {
77
- onPress: () => {
78
- selectionAsync();
79
- onPressedChange?.(!pressed);
73
+ style: [styles.base, sizeStyles[size], { borderWidth: 2 }],
74
+ animate: {
75
+ borderColor: pressed ? colors.primary : inactiveBorder,
76
+ backgroundColor: pressed ? colors.surfaceStrong : "transparent"
80
77
  },
81
- onPressIn,
82
- onPressOut,
83
- disabled,
84
- activeOpacity: 1,
85
- touchSoundDisabled: true,
86
- accessibilityRole: "button",
87
- accessibilityLabel: accessibilityLabel ?? label,
88
- accessibilityState: { selected: pressed, disabled: !!disabled },
89
- ...props
78
+ transition: COLOR_TRANSITION
90
79
  },
91
- /* @__PURE__ */ React.createElement(
92
- Animated.View,
80
+ /* @__PURE__ */ React.createElement(View, { style: styles.inner }, /* @__PURE__ */ React.createElement(
81
+ ToggleIcon,
82
+ {
83
+ pressed,
84
+ iconName,
85
+ activeIconName,
86
+ icon,
87
+ activeIcon,
88
+ iconColor,
89
+ activeIconColor,
90
+ iconSize,
91
+ primaryColor: colors.primary,
92
+ mutedColor: colors.foregroundMuted
93
+ }
94
+ ), label ? /* @__PURE__ */ React.createElement(
95
+ Text,
93
96
  {
94
- style: [
95
- styles.base,
96
- sizeStyles[size],
97
- { borderWidth: 2 },
98
- surfaceStyle
99
- ]
97
+ style: [styles.label, { color: pressed ? colors.primary : colors.foreground }],
98
+ allowFontScaling: true
100
99
  },
101
- /* @__PURE__ */ React.createElement(View, { style: styles.inner }, /* @__PURE__ */ React.createElement(
102
- ToggleIcon,
103
- {
104
- pressed,
105
- iconName,
106
- activeIconName,
107
- icon,
108
- activeIcon,
109
- iconColor,
110
- activeIconColor,
111
- iconSize,
112
- primaryColor: colors.primary,
113
- mutedColor: colors.foregroundMuted
114
- }
115
- ), label ? /* @__PURE__ */ React.createElement(Animated.Text, { style: [styles.label, textStyle], allowFontScaling: true }, label) : null)
116
- )
100
+ label
101
+ ) : null)
117
102
  )
118
- );
103
+ ));
119
104
  }
120
105
  var styles = StyleSheet.create({
121
106
  base: {
@@ -0,0 +1,104 @@
1
+ import { impactLight } from './chunk-EJ7ZPXOH.mjs';
2
+ import { RADIUS } from './chunk-QY3X2UYR.mjs';
3
+ import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
4
+ import { useTheme } from './chunk-SOYNZDVY.mjs';
5
+ import { ms, vs, s, mvs } from './chunk-2CE3TQVY.mjs';
6
+ import React from 'react';
7
+ import { StyleSheet, View, Text, TouchableOpacity } from 'react-native';
8
+
9
+ function DefaultErrorFallback({
10
+ error,
11
+ reset,
12
+ title = "Something went wrong",
13
+ message
14
+ }) {
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 }] }, renderIcon("alert-triangle", ms(28), 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 ?? "An unexpected error occurred."), /* @__PURE__ */ React.createElement(
17
+ TouchableOpacity,
18
+ {
19
+ style: [styles.button, { backgroundColor: colors.primary }],
20
+ onPress: () => {
21
+ impactLight();
22
+ reset();
23
+ },
24
+ activeOpacity: 0.85,
25
+ touchSoundDisabled: true,
26
+ accessibilityRole: "button",
27
+ accessibilityLabel: "Try again"
28
+ },
29
+ /* @__PURE__ */ React.createElement(Text, { style: [styles.buttonLabel, { color: colors.primaryForeground }], allowFontScaling: true }, "Try again")
30
+ ));
31
+ }
32
+ var ErrorBoundary = class extends React.Component {
33
+ constructor() {
34
+ super(...arguments);
35
+ this.state = { error: null };
36
+ this.reset = () => {
37
+ this.setState({ error: null });
38
+ };
39
+ }
40
+ static getDerivedStateFromError(error) {
41
+ return { error };
42
+ }
43
+ componentDidCatch(error, info) {
44
+ this.props.onError?.(error, info);
45
+ }
46
+ render() {
47
+ const { error } = this.state;
48
+ if (error) {
49
+ const { fallback, title, message } = this.props;
50
+ if (typeof fallback === "function") {
51
+ return fallback({ error, reset: this.reset });
52
+ }
53
+ if (fallback !== void 0) {
54
+ return fallback;
55
+ }
56
+ return /* @__PURE__ */ React.createElement(DefaultErrorFallback, { error, reset: this.reset, title, message });
57
+ }
58
+ return this.props.children;
59
+ }
60
+ };
61
+ var styles = StyleSheet.create({
62
+ container: {
63
+ flex: 1,
64
+ alignItems: "center",
65
+ justifyContent: "center",
66
+ paddingHorizontal: s(32),
67
+ gap: vs(12)
68
+ },
69
+ iconCircle: {
70
+ width: s(64),
71
+ height: s(64),
72
+ borderRadius: RADIUS.full,
73
+ alignItems: "center",
74
+ justifyContent: "center",
75
+ marginBottom: vs(4)
76
+ },
77
+ title: {
78
+ fontFamily: "Sohne-SemiBold",
79
+ fontSize: ms(18),
80
+ lineHeight: mvs(24),
81
+ textAlign: "center"
82
+ },
83
+ message: {
84
+ fontFamily: "Sohne-Regular",
85
+ fontSize: ms(14),
86
+ lineHeight: mvs(20),
87
+ textAlign: "center"
88
+ },
89
+ button: {
90
+ marginTop: vs(8),
91
+ paddingHorizontal: s(20),
92
+ paddingVertical: vs(10),
93
+ borderRadius: RADIUS.md,
94
+ minHeight: vs(44),
95
+ alignItems: "center",
96
+ justifyContent: "center"
97
+ },
98
+ buttonLabel: {
99
+ fontFamily: "Sohne-Medium",
100
+ fontSize: ms(15)
101
+ }
102
+ });
103
+
104
+ export { ErrorBoundary };
@@ -1,5 +1,5 @@
1
- import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
2
1
  import { RADIUS } from './chunk-QY3X2UYR.mjs';
2
+ import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
3
3
  import { useTheme } from './chunk-SOYNZDVY.mjs';
4
4
  import { ms, vs, s } from './chunk-2CE3TQVY.mjs';
5
5
  import React from 'react';
@@ -19,6 +19,7 @@ function AlertBanner({ title, description, variant = "default", icon, iconName,
19
19
  /* @__PURE__ */ React.createElement(Entypo, { name: "info-with-circle", size: ms(16), color: accentColor })
20
20
  );
21
21
  const effectiveIcon = iconName ? renderIcon(iconName, ms(16), iconColor ?? accentColor) : icon ?? defaultIcon;
22
+ const a11yLabel = description ? `${title}. ${description}` : title;
22
23
  return /* @__PURE__ */ React.createElement(
23
24
  View,
24
25
  {
@@ -26,7 +27,9 @@ function AlertBanner({ title, description, variant = "default", icon, iconName,
26
27
  styles.container,
27
28
  { backgroundColor: bgColor, borderWidth: 1, borderColor },
28
29
  style
29
- ]
30
+ ],
31
+ accessibilityRole: "alert",
32
+ accessibilityLabel: a11yLabel
30
33
  },
31
34
  /* @__PURE__ */ React.createElement(View, { style: styles.iconSlot }, effectiveIcon),
32
35
  /* @__PURE__ */ React.createElement(View, { style: styles.content }, /* @__PURE__ */ React.createElement(Text, { style: [styles.title, { color: colors.foreground }], allowFontScaling: true }, title), description ? /* @__PURE__ */ React.createElement(Text, { style: [styles.description, { color: colors.foreground, opacity: 0.85 }], allowFontScaling: true }, description) : null)
@@ -1,6 +1,4 @@
1
- import { Input } from './chunk-L7E7TVEZ.mjs';
2
- import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
3
- import { useTheme } from './chunk-SOYNZDVY.mjs';
1
+ import { Input } from './chunk-756RAKE4.mjs';
4
2
  import { ms, vs } from './chunk-2CE3TQVY.mjs';
5
3
  import React from 'react';
6
4
 
@@ -24,7 +22,6 @@ function CurrencyInput({
24
22
  containerStyle,
25
23
  style
26
24
  }) {
27
- const { colors } = useTheme();
28
25
  const handleChange = (text) => {
29
26
  const withoutPrefix = prefix && text.startsWith(prefix) ? text.slice(prefix.length) : text;
30
27
  const formatted = formatCurrency(withoutPrefix, thousandsSeparator);
@@ -34,8 +31,12 @@ function CurrencyInput({
34
31
  const raw = parseFloat(formatted.replace(separatorRegex, "") || "0");
35
32
  onChangeValue?.(isNaN(raw) ? 0 : raw);
36
33
  };
37
- const inputStyle = size === "large" ? { fontFamily: "Sohne-Regular", fontSize: ms(36) } : { fontFamily: "Sohne-Regular" };
38
- const dollarIcon = renderIcon("dollar-sign", size === "large" ? 24 : 16, colors.foregroundMuted);
34
+ const isLarge = size === "large";
35
+ const inputStyle = isLarge ? { fontFamily: "Sohne-Regular", fontSize: ms(36) } : { fontFamily: "Sohne-Regular" };
36
+ const prefixStyle = {
37
+ fontFamily: "Sohne-Regular",
38
+ fontSize: isLarge ? ms(32) : ms(17)
39
+ };
39
40
  const displayValue = value && prefix && value.startsWith(prefix) ? value.slice(prefix.length) : value;
40
41
  return /* @__PURE__ */ React.createElement(
41
42
  Input,
@@ -48,9 +49,10 @@ function CurrencyInput({
48
49
  hint,
49
50
  placeholder: placeholder ?? "0",
50
51
  editable,
51
- prefix: dollarIcon,
52
+ prefix,
53
+ prefixStyle,
52
54
  containerStyle,
53
- inputWrapperStyle: size === "large" ? { paddingVertical: vs(16), minHeight: 72 } : void 0,
55
+ inputWrapperStyle: isLarge ? { paddingVertical: vs(16), minHeight: 72 } : void 0,
54
56
  style: [inputStyle, style]
55
57
  }
56
58
  );
@@ -0,0 +1,36 @@
1
+ import { PressableCard } from './chunk-3DKJ2GIC.mjs';
2
+ import { impactLight } from './chunk-EJ7ZPXOH.mjs';
3
+ import { PRESS_SCALE } from './chunk-DVK4G2GT.mjs';
4
+ import React from 'react';
5
+
6
+ function Pressable({
7
+ children,
8
+ onPress,
9
+ pressScale: _pressScale = PRESS_SCALE.card,
10
+ haptics = true,
11
+ style,
12
+ disabled,
13
+ hoverScale: _hoverScale = 1.02
14
+ }) {
15
+ const handlePress = () => {
16
+ if (disabled || !onPress) return;
17
+ if (haptics) impactLight();
18
+ onPress();
19
+ };
20
+ return /* @__PURE__ */ React.createElement(
21
+ PressableCard,
22
+ {
23
+ style,
24
+ onPress: handlePress,
25
+ enabled: !disabled,
26
+ rippleColor: "transparent",
27
+ touchSoundDisabled: true,
28
+ activateOnHover: true,
29
+ accessibilityRole: "button",
30
+ accessibilityState: { disabled: !!disabled }
31
+ },
32
+ children
33
+ );
34
+ }
35
+
36
+ export { Pressable };
@@ -0,0 +1,119 @@
1
+ import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
2
+ import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
3
+ import { useTheme } from './chunk-SOYNZDVY.mjs';
4
+ import { ms, s, vs, mvs } from './chunk-2CE3TQVY.mjs';
5
+ import React from 'react';
6
+ import { StyleSheet, View, TouchableOpacity, Text } from 'react-native';
7
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
8
+
9
+ function TabBar({
10
+ items,
11
+ activeKey,
12
+ onTabPress,
13
+ activeColor,
14
+ inactiveColor,
15
+ withSafeArea = true,
16
+ style
17
+ }) {
18
+ const { colors } = useTheme();
19
+ const insets = useSafeAreaInsets();
20
+ const resolvedActive = activeColor ?? colors.primary;
21
+ const resolvedInactive = inactiveColor ?? colors.foregroundMuted;
22
+ return /* @__PURE__ */ React.createElement(
23
+ View,
24
+ {
25
+ style: [
26
+ styles.container,
27
+ {
28
+ backgroundColor: colors.card,
29
+ borderTopColor: colors.border,
30
+ paddingBottom: withSafeArea ? insets.bottom : 0
31
+ },
32
+ style
33
+ ],
34
+ accessibilityRole: "tablist"
35
+ },
36
+ items.map((item) => {
37
+ const active = item.key === activeKey;
38
+ const tint = active ? resolvedActive : resolvedInactive;
39
+ const iconNode = item.icon ?? (item.iconName ? renderIcon(item.iconName, ms(24), tint) : null);
40
+ const showBadge = item.badge !== void 0 && item.badge !== false;
41
+ const badgeCount = typeof item.badge === "number" ? item.badge : void 0;
42
+ return /* @__PURE__ */ React.createElement(
43
+ TouchableOpacity,
44
+ {
45
+ key: item.key,
46
+ style: styles.tab,
47
+ onPress: () => {
48
+ if (!active) selectionAsync();
49
+ onTabPress(item.key);
50
+ },
51
+ activeOpacity: 0.7,
52
+ touchSoundDisabled: true,
53
+ accessibilityRole: "tab",
54
+ accessibilityState: { selected: active },
55
+ accessibilityLabel: item.label ?? item.key
56
+ },
57
+ /* @__PURE__ */ React.createElement(View, null, iconNode, showBadge ? /* @__PURE__ */ React.createElement(
58
+ View,
59
+ {
60
+ style: [
61
+ styles.badge,
62
+ { backgroundColor: colors.destructive, borderColor: colors.card },
63
+ badgeCount === void 0 && styles.badgeDot
64
+ ]
65
+ },
66
+ badgeCount !== void 0 ? /* @__PURE__ */ React.createElement(Text, { style: [styles.badgeText, { color: colors.destructiveForeground }], allowFontScaling: false }, badgeCount > 99 ? "99+" : badgeCount) : null
67
+ ) : null),
68
+ item.label ? /* @__PURE__ */ React.createElement(Text, { style: [styles.label, { color: tint }], numberOfLines: 1, allowFontScaling: true }, item.label) : null
69
+ );
70
+ })
71
+ );
72
+ }
73
+ var styles = StyleSheet.create({
74
+ container: {
75
+ flexDirection: "row",
76
+ borderTopWidth: StyleSheet.hairlineWidth
77
+ },
78
+ tab: {
79
+ flex: 1,
80
+ alignItems: "center",
81
+ justifyContent: "center",
82
+ paddingTop: vs(8),
83
+ paddingBottom: vs(6),
84
+ gap: vs(2),
85
+ minHeight: vs(48)
86
+ },
87
+ label: {
88
+ fontFamily: "Sohne-Medium",
89
+ fontSize: ms(11),
90
+ lineHeight: mvs(14)
91
+ },
92
+ badge: {
93
+ position: "absolute",
94
+ top: -vs(4),
95
+ right: -s(10),
96
+ minWidth: s(16),
97
+ height: s(16),
98
+ borderRadius: s(8),
99
+ borderWidth: 1.5,
100
+ alignItems: "center",
101
+ justifyContent: "center",
102
+ paddingHorizontal: s(3)
103
+ },
104
+ badgeDot: {
105
+ minWidth: s(10),
106
+ height: s(10),
107
+ borderRadius: s(5),
108
+ top: -vs(2),
109
+ right: -s(6),
110
+ paddingHorizontal: 0
111
+ },
112
+ badgeText: {
113
+ fontFamily: "Sohne-SemiBold",
114
+ fontSize: ms(9),
115
+ lineHeight: ms(11)
116
+ }
117
+ });
118
+
119
+ export { TabBar };