@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
package/dist/ListItem.js CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  var React3 = require('react');
4
4
  var reactNative = require('react-native');
5
- var Animated = require('react-native-reanimated');
6
5
  var vectorIcons = require('@expo/vector-icons');
7
6
  var reactNativeSizeMatters = require('react-native-size-matters');
8
7
  var AntDesign = require('@expo/vector-icons/AntDesign');
@@ -11,11 +10,12 @@ var Feather = require('@expo/vector-icons/Feather');
11
10
  var FontAwesome5 = require('@expo/vector-icons/FontAwesome5');
12
11
  var MaterialIcons = require('@expo/vector-icons/MaterialIcons');
13
12
  var Ionicons = require('@expo/vector-icons/Ionicons');
13
+ var pressto = require('pressto');
14
+ var reactNativeReanimated = require('react-native-reanimated');
14
15
 
15
16
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
16
17
 
17
18
  var React3__default = /*#__PURE__*/_interopDefault(React3);
18
- var Animated__default = /*#__PURE__*/_interopDefault(Animated);
19
19
  var AntDesign__default = /*#__PURE__*/_interopDefault(AntDesign);
20
20
  var Entypo__default = /*#__PURE__*/_interopDefault(Entypo);
21
21
  var Feather__default = /*#__PURE__*/_interopDefault(Feather);
@@ -23,18 +23,65 @@ var FontAwesome5__default = /*#__PURE__*/_interopDefault(FontAwesome5);
23
23
  var MaterialIcons__default = /*#__PURE__*/_interopDefault(MaterialIcons);
24
24
  var Ionicons__default = /*#__PURE__*/_interopDefault(Ionicons);
25
25
 
26
- // src/components/ListItem/ListItem.tsx
26
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
27
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
28
+ }) : x)(function(x) {
29
+ if (typeof require !== "undefined") return require.apply(this, arguments);
30
+ throw Error('Dynamic require of "' + x + '" is not supported');
31
+ });
27
32
  var _haptics = null;
33
+ var _hapticsLoaded = false;
28
34
  async function getHaptics() {
29
35
  if (reactNative.Platform.OS === "web") return null;
30
- if (!_haptics) {
31
- _haptics = await import('expo-haptics');
36
+ if (!_hapticsLoaded) {
37
+ _hapticsLoaded = true;
38
+ try {
39
+ _haptics = await import('expo-haptics');
40
+ } catch {
41
+ _haptics = null;
42
+ }
32
43
  }
33
44
  return _haptics;
34
45
  }
46
+ var _pulsar = null;
47
+ var _pulsarChecked = false;
48
+ var _pulsarAvailable = false;
49
+ function isPulsarNativeRegistered() {
50
+ try {
51
+ const g = globalThis;
52
+ if (typeof g.__turboModuleProxy === "function") {
53
+ return g.__turboModuleProxy("RNPulsar") != null;
54
+ }
55
+ return reactNative.NativeModules?.RNPulsar != null;
56
+ } catch {
57
+ return false;
58
+ }
59
+ }
60
+ function getPulsar() {
61
+ if (reactNative.Platform.OS === "web") return null;
62
+ if (!_pulsarChecked) {
63
+ _pulsarChecked = true;
64
+ try {
65
+ if (isPulsarNativeRegistered()) {
66
+ _pulsar = __require("react-native-pulsar");
67
+ _pulsarAvailable = true;
68
+ }
69
+ } catch {
70
+ _pulsar = null;
71
+ _pulsarAvailable = false;
72
+ }
73
+ }
74
+ return _pulsarAvailable ? _pulsar : null;
75
+ }
35
76
  function selectionAsync() {
36
77
  if (reactNative.Platform.OS === "web") return;
37
- getHaptics().then((h) => h?.selectionAsync());
78
+ getHaptics().then((h) => {
79
+ if (h) {
80
+ h.selectionAsync();
81
+ } else {
82
+ getPulsar()?.Presets.System.selection();
83
+ }
84
+ });
38
85
  }
39
86
 
40
87
  // src/theme/colorUtils.ts
@@ -205,65 +252,45 @@ function renderIcon(name, size, color) {
205
252
  // src/tokens.ts
206
253
  var RADIUS = {
207
254
  md: 14};
208
- var SPRINGS = {
209
- /** Tight, premium press feel — Buttons, Toggle, Tabs triggers. */
210
- pressIn: { stiffness: 600, damping: 35, mass: 0.8 },
211
- pressOut: { stiffness: 280, damping: 22, mass: 0.8 },
212
- /** Slightly softer for larger surfaces — Card, ListItem, MenuItem. */
213
- surfacePressIn: { stiffness: 380, damping: 30, mass: 0.95 },
214
- surfacePressOut: { stiffness: 220, damping: 20, mass: 0.95 }};
215
255
  ({
216
256
  /** Material-style ease-out — natural deceleration for state changes. */
217
- standard: Animated.Easing.bezier(0.2, 0, 0, 1),
257
+ standard: reactNativeReanimated.Easing.bezier(0.2, 0, 0, 1),
218
258
  /** Strong ease-out for expanding surfaces (Accordion open). */
219
- expand: Animated.Easing.bezier(0.23, 1, 0.32, 1),
259
+ expand: reactNativeReanimated.Easing.bezier(0.23, 1, 0.32, 1),
220
260
  /** Quick ease-in for collapsing. */
221
- collapse: Animated.Easing.in(Animated.Easing.ease)
261
+ collapse: reactNativeReanimated.Easing.in(reactNativeReanimated.Easing.ease)
222
262
  });
223
263
  var PRESS_SCALE = {
224
264
  button: 0.95,
225
- row: 0.97};
226
- function useHover() {
227
- const [hovered, setHovered] = React3.useState(false);
228
- const onMouseEnter = React3.useCallback(() => setHovered(true), []);
229
- const onMouseLeave = React3.useCallback(() => setHovered(false), []);
230
- if (reactNative.Platform.OS !== "web") {
231
- return { hovered: false, hoverHandlers: {} };
232
- }
233
- return { hovered, hoverHandlers: { onMouseEnter, onMouseLeave } };
234
- }
235
-
236
- // src/utils/usePressScale.ts
237
- function usePressScale({
238
- pressScale = PRESS_SCALE.button,
239
- hoverScale = 1.02,
240
- pressInSpring = SPRINGS.pressIn,
241
- pressOutSpring = SPRINGS.pressOut,
242
- disabled = false
243
- } = {}) {
244
- const scale2 = Animated.useSharedValue(1);
245
- const { hovered, hoverHandlers } = useHover();
246
- const onPressIn = React3.useCallback(() => {
247
- if (disabled) return;
248
- scale2.value = Animated.withSpring(pressScale, pressInSpring);
249
- }, [disabled, pressScale, pressInSpring, scale2]);
250
- const onPressOut = React3.useCallback(() => {
251
- if (disabled) return;
252
- scale2.value = Animated.withSpring(1, pressOutSpring);
253
- }, [disabled, pressOutSpring, scale2]);
254
- const hoverActive = reactNative.Platform.OS === "web" && hovered && hoverScale !== 1 && !disabled;
255
- const animatedStyle = Animated.useAnimatedStyle(() => ({
256
- transform: [
257
- { scale: scale2.value * (hoverActive ? hoverScale : 1) }
258
- ]
259
- }));
260
- return {
261
- animatedStyle,
262
- onPressIn,
263
- onPressOut,
264
- hoverHandlers
265
- };
266
- }
265
+ card: 0.98,
266
+ row: 0.97,
267
+ chip: 0.94
268
+ };
269
+ pressto.createAnimatedPressable((progress) => {
270
+ "worklet";
271
+ const scale2 = 1 - (1 - PRESS_SCALE.button) * progress;
272
+ return { transform: [{ scale: scale2 }] };
273
+ });
274
+ pressto.createAnimatedPressable((progress) => {
275
+ "worklet";
276
+ const scale2 = 1 - (1 - PRESS_SCALE.card) * progress;
277
+ return { transform: [{ scale: scale2 }] };
278
+ });
279
+ var PressableRow = pressto.createAnimatedPressable((progress) => {
280
+ "worklet";
281
+ const scale2 = 1 - (1 - PRESS_SCALE.row) * progress;
282
+ return { transform: [{ scale: scale2 }] };
283
+ });
284
+ pressto.createAnimatedPressable((progress) => {
285
+ "worklet";
286
+ const scale2 = 1 - (1 - PRESS_SCALE.chip) * progress;
287
+ return { transform: [{ scale: scale2 }] };
288
+ });
289
+ pressto.createAnimatedPressable((progress) => {
290
+ "worklet";
291
+ const scale2 = 1 - (1 - PRESS_SCALE.button) * progress;
292
+ return { transform: [{ scale: scale2 }] };
293
+ });
267
294
 
268
295
  // src/components/ListItem/ListItem.tsx
269
296
  function ListItemBase({
@@ -290,12 +317,6 @@ function ListItemBase({
290
317
  accessibilityLabel
291
318
  }) {
292
319
  const { colors } = useTheme();
293
- const { animatedStyle, onPressIn, onPressOut, hoverHandlers } = usePressScale({
294
- pressScale: PRESS_SCALE.row,
295
- pressInSpring: SPRINGS.surfacePressIn,
296
- pressOutSpring: SPRINGS.surfacePressOut,
297
- disabled: !onPress || disabled
298
- });
299
320
  const handlePress = () => {
300
321
  selectionAsync();
301
322
  onPress?.();
@@ -314,63 +335,56 @@ function ListItemBase({
314
335
  elevation: 2
315
336
  } : {};
316
337
  const a11yLabel = accessibilityLabel ?? [title, subtitle, caption].filter(Boolean).join(". ");
317
- return /* @__PURE__ */ React3__default.default.createElement(Animated__default.default.View, { style: [animatedStyle, disabled && styles.disabled], ...hoverHandlers }, /* @__PURE__ */ React3__default.default.createElement(
318
- reactNative.TouchableOpacity,
338
+ const content = /* @__PURE__ */ React3__default.default.createElement(React3__default.default.Fragment, null, effectiveLeft ? /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles.leftContainer }, effectiveLeft) : null, /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles.content }, /* @__PURE__ */ React3__default.default.createElement(
339
+ reactNative.Text,
319
340
  {
320
- style: [styles.container, cardStyle, style],
321
- onPress: onPress ? handlePress : void 0,
322
- onPressIn,
323
- onPressOut,
324
- disabled,
325
- activeOpacity: 1,
326
- touchSoundDisabled: true,
327
- accessibilityRole: onPress ? "button" : void 0,
328
- accessibilityLabel: onPress ? a11yLabel : void 0,
329
- accessibilityState: onPress ? { disabled: !!disabled } : void 0
341
+ style: [styles.title, { color: colors.foreground }, titleStyle],
342
+ numberOfLines: 2,
343
+ allowFontScaling: true
330
344
  },
331
- effectiveLeft ? /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles.leftContainer }, effectiveLeft) : null,
332
- /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles.content }, /* @__PURE__ */ React3__default.default.createElement(
333
- reactNative.Text,
334
- {
335
- style: [styles.title, { color: colors.foreground }, titleStyle],
336
- numberOfLines: 2,
337
- allowFontScaling: true
338
- },
339
- title
340
- ), subtitle ? /* @__PURE__ */ React3__default.default.createElement(
341
- reactNative.Text,
342
- {
343
- style: [styles.subtitle, { color: colors.foregroundMuted }, subtitleStyle],
344
- numberOfLines: 2,
345
- allowFontScaling: true
346
- },
347
- subtitle
348
- ) : null, caption ? /* @__PURE__ */ React3__default.default.createElement(
349
- reactNative.Text,
350
- {
351
- style: [styles.caption, { color: colors.foregroundMuted }, captionStyle],
352
- numberOfLines: 1,
353
- allowFontScaling: true
354
- },
355
- caption
356
- ) : null),
357
- effectiveRight !== void 0 ? /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles.rightContainer }, typeof effectiveRight === "string" ? /* @__PURE__ */ React3__default.default.createElement(
358
- reactNative.Text,
345
+ title
346
+ ), subtitle ? /* @__PURE__ */ React3__default.default.createElement(
347
+ reactNative.Text,
348
+ {
349
+ style: [styles.subtitle, { color: colors.foregroundMuted }, subtitleStyle],
350
+ numberOfLines: 2,
351
+ allowFontScaling: true
352
+ },
353
+ subtitle
354
+ ) : null, caption ? /* @__PURE__ */ React3__default.default.createElement(
355
+ reactNative.Text,
356
+ {
357
+ style: [styles.caption, { color: colors.foregroundMuted }, captionStyle],
358
+ numberOfLines: 1,
359
+ allowFontScaling: true
360
+ },
361
+ caption
362
+ ) : null), effectiveRight !== void 0 ? /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles.rightContainer }, typeof effectiveRight === "string" ? /* @__PURE__ */ React3__default.default.createElement(
363
+ reactNative.Text,
364
+ {
365
+ style: [styles.rightText, { color: colors.foregroundMuted }],
366
+ allowFontScaling: true
367
+ },
368
+ effectiveRight
369
+ ) : effectiveRight) : showChevron ? /* @__PURE__ */ React3__default.default.createElement(vectorIcons.Entypo, { name: "chevron-with-circle-right", size: 20, color: colors.foregroundMuted }) : null);
370
+ if (onPress) {
371
+ return /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: disabled && styles.disabled }, /* @__PURE__ */ React3__default.default.createElement(
372
+ PressableRow,
359
373
  {
360
- style: [styles.rightText, { color: colors.foregroundMuted }],
361
- allowFontScaling: true
374
+ style: [styles.container, cardStyle, style],
375
+ onPress: handlePress,
376
+ enabled: !disabled,
377
+ rippleColor: "transparent",
378
+ touchSoundDisabled: true,
379
+ activateOnHover: true,
380
+ accessibilityRole: "button",
381
+ accessibilityLabel: a11yLabel,
382
+ accessibilityState: { disabled: !!disabled }
362
383
  },
363
- effectiveRight
364
- ) : effectiveRight) : showChevron ? /* @__PURE__ */ React3__default.default.createElement(vectorIcons.Entypo, { name: "chevron-with-circle-right", size: 20, color: colors.foregroundMuted }) : null
365
- ), showSeparator ? /* @__PURE__ */ React3__default.default.createElement(
366
- reactNative.View,
367
- {
368
- style: [
369
- styles.separator,
370
- { backgroundColor: colors.separator }
371
- ]
372
- }
373
- ) : null);
384
+ content
385
+ ), showSeparator ? /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: [styles.separator, { backgroundColor: colors.separator }] }) : null);
386
+ }
387
+ return /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: [disabled && styles.disabled] }, /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: [styles.container, cardStyle, style] }, content), showSeparator ? /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: [styles.separator, { backgroundColor: colors.separator }] }) : null);
374
388
  }
375
389
  var ListItem = React3__default.default.memo(ListItemBase);
376
390
  var styles = reactNative.StyleSheet.create({
package/dist/ListItem.mjs CHANGED
@@ -1,8 +1,9 @@
1
- export { ListItem } from './chunk-LG4DO3DK.mjs';
2
- import './chunk-T7XZ7H7Y.mjs';
3
- import './chunk-QCNARS3X.mjs';
4
- import './chunk-RTC3CFXF.mjs';
5
- import './chunk-5IKW3VNC.mjs';
1
+ export { ListItem } from './chunk-BNP626TY.mjs';
2
+ import './chunk-3DKJ2GIC.mjs';
3
+ import './chunk-EJ7ZPXOH.mjs';
4
+ import './chunk-DVK4G2GT.mjs';
6
5
  import './chunk-QY3X2UYR.mjs';
6
+ import './chunk-T7XZ7H7Y.mjs';
7
7
  import './chunk-SOYNZDVY.mjs';
8
8
  import './chunk-2CE3TQVY.mjs';
9
+ import './chunk-Y6FXYEAI.mjs';
package/dist/MediaCard.js CHANGED
@@ -22,18 +22,65 @@ var FontAwesome5__default = /*#__PURE__*/_interopDefault(FontAwesome5);
22
22
  var MaterialIcons__default = /*#__PURE__*/_interopDefault(MaterialIcons);
23
23
  var Ionicons__default = /*#__PURE__*/_interopDefault(Ionicons);
24
24
 
25
- // src/components/MediaCard/MediaCard.tsx
25
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
26
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
27
+ }) : x)(function(x) {
28
+ if (typeof require !== "undefined") return require.apply(this, arguments);
29
+ throw Error('Dynamic require of "' + x + '" is not supported');
30
+ });
26
31
  var _haptics = null;
32
+ var _hapticsLoaded = false;
27
33
  async function getHaptics() {
28
34
  if (reactNative.Platform.OS === "web") return null;
29
- if (!_haptics) {
30
- _haptics = await import('expo-haptics');
35
+ if (!_hapticsLoaded) {
36
+ _hapticsLoaded = true;
37
+ try {
38
+ _haptics = await import('expo-haptics');
39
+ } catch {
40
+ _haptics = null;
41
+ }
31
42
  }
32
43
  return _haptics;
33
44
  }
45
+ var _pulsar = null;
46
+ var _pulsarChecked = false;
47
+ var _pulsarAvailable = false;
48
+ function isPulsarNativeRegistered() {
49
+ try {
50
+ const g = globalThis;
51
+ if (typeof g.__turboModuleProxy === "function") {
52
+ return g.__turboModuleProxy("RNPulsar") != null;
53
+ }
54
+ return reactNative.NativeModules?.RNPulsar != null;
55
+ } catch {
56
+ return false;
57
+ }
58
+ }
59
+ function getPulsar() {
60
+ if (reactNative.Platform.OS === "web") return null;
61
+ if (!_pulsarChecked) {
62
+ _pulsarChecked = true;
63
+ try {
64
+ if (isPulsarNativeRegistered()) {
65
+ _pulsar = __require("react-native-pulsar");
66
+ _pulsarAvailable = true;
67
+ }
68
+ } catch {
69
+ _pulsar = null;
70
+ _pulsarAvailable = false;
71
+ }
72
+ }
73
+ return _pulsarAvailable ? _pulsar : null;
74
+ }
34
75
  function impactLight() {
35
76
  if (reactNative.Platform.OS === "web") return;
36
- getHaptics().then((h) => h?.impactAsync(h.ImpactFeedbackStyle.Light));
77
+ getHaptics().then((h) => {
78
+ if (h) {
79
+ h.impactAsync(h.ImpactFeedbackStyle.Light);
80
+ } else {
81
+ getPulsar()?.Presets.System.impactLight();
82
+ }
83
+ });
37
84
  }
38
85
 
39
86
  // src/theme/colorUtils.ts
@@ -334,13 +381,14 @@ function MediaCardBase({
334
381
  reactNative.TouchableOpacity,
335
382
  {
336
383
  style: [styles.actionButton, { backgroundColor: "rgba(0,0,0,0.24)" }],
337
- onPress: () => {
384
+ onPress: (e) => {
385
+ e?.stopPropagation?.();
338
386
  impactLight();
339
387
  onActionPress?.();
340
388
  },
341
389
  activeOpacity: 0.8,
342
390
  touchSoundDisabled: true,
343
- accessibilityRole: "button",
391
+ accessibilityRole: reactNative.Platform.OS === "web" && onPress ? void 0 : "button",
344
392
  accessibilityLabel: actionIconName ?? "action",
345
393
  accessibilityState: { selected: actionActive }
346
394
  },
@@ -1,8 +1,9 @@
1
- export { MediaCard } from './chunk-TAJ2PQ2O.mjs';
2
- import './chunk-T7XZ7H7Y.mjs';
3
- import './chunk-QCNARS3X.mjs';
4
- import './chunk-RTC3CFXF.mjs';
5
- import './chunk-5IKW3VNC.mjs';
1
+ export { MediaCard } from './chunk-VGTDN7SW.mjs';
2
+ import './chunk-YNROWHQJ.mjs';
3
+ import './chunk-EJ7ZPXOH.mjs';
4
+ import './chunk-DVK4G2GT.mjs';
6
5
  import './chunk-QY3X2UYR.mjs';
6
+ import './chunk-T7XZ7H7Y.mjs';
7
7
  import './chunk-SOYNZDVY.mjs';
8
8
  import './chunk-2CE3TQVY.mjs';
9
+ import './chunk-Y6FXYEAI.mjs';
@@ -2,3 +2,4 @@ export { MenuGroup, MenuGroupFooter, MenuGroupHeader } from './chunk-IRRY3CRZ.mj
2
2
  import './chunk-QY3X2UYR.mjs';
3
3
  import './chunk-SOYNZDVY.mjs';
4
4
  import './chunk-2CE3TQVY.mjs';
5
+ import './chunk-Y6FXYEAI.mjs';