@retray-dev/ui-kit 10.2.0 → 12.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/COMPONENTS.md +287 -37
  2. package/README.md +11 -2
  3. package/dist/Accordion.mjs +2 -2
  4. package/dist/AlertBanner.mjs +2 -2
  5. package/dist/AppHeader.mjs +3 -3
  6. package/dist/Avatar.mjs +2 -2
  7. package/dist/Badge.mjs +2 -2
  8. package/dist/Button.mjs +2 -2
  9. package/dist/Card.mjs +2 -2
  10. package/dist/CategoryStrip.mjs +2 -2
  11. package/dist/Checkbox.mjs +2 -2
  12. package/dist/Chip.mjs +2 -2
  13. package/dist/ConfirmDialog.d.mts +1 -6
  14. package/dist/ConfirmDialog.d.ts +1 -6
  15. package/dist/ConfirmDialog.js +29 -23
  16. package/dist/ConfirmDialog.mjs +3 -3
  17. package/dist/CurrencyDisplay.mjs +2 -2
  18. package/dist/CurrencyInput.d.mts +3 -8
  19. package/dist/CurrencyInput.d.ts +3 -8
  20. package/dist/CurrencyInput.js +3 -1
  21. package/dist/CurrencyInput.mjs +3 -3
  22. package/dist/DetailRow.mjs +2 -2
  23. package/dist/EmptyState.mjs +3 -3
  24. package/dist/ErrorBoundary.mjs +2 -2
  25. package/dist/Form.mjs +2 -2
  26. package/dist/IconButton.mjs +2 -2
  27. package/dist/IconPicker.js +675 -248
  28. package/dist/IconPicker.mjs +3 -2
  29. package/dist/ImageUpload.mjs +3 -3
  30. package/dist/ImageViewer.mjs +4 -4
  31. package/dist/Input.mjs +2 -2
  32. package/dist/LabelValue.mjs +2 -2
  33. package/dist/ListGroup.mjs +2 -2
  34. package/dist/ListItem.d.mts +7 -7
  35. package/dist/ListItem.d.ts +7 -7
  36. package/dist/ListItem.js +12 -7
  37. package/dist/ListItem.mjs +2 -2
  38. package/dist/MediaCard.mjs +2 -2
  39. package/dist/MenuGroup.mjs +2 -2
  40. package/dist/MenuItem.mjs +2 -2
  41. package/dist/MonthPicker.mjs +2 -2
  42. package/dist/NumberStepper.mjs +2 -2
  43. package/dist/PagerDots.mjs +2 -2
  44. package/dist/Pressable.d.mts +15 -7
  45. package/dist/Pressable.d.ts +15 -7
  46. package/dist/Pressable.js +7 -3
  47. package/dist/Pressable.mjs +1 -1
  48. package/dist/PricingCard.mjs +4 -4
  49. package/dist/Progress.mjs +2 -2
  50. package/dist/RadioGroup.mjs +2 -2
  51. package/dist/RetrayProvider.mjs +3 -3
  52. package/dist/Select.mjs +2 -2
  53. package/dist/SelectableGrid.mjs +2 -2
  54. package/dist/Separator.mjs +2 -2
  55. package/dist/Sheet.d.mts +4 -46
  56. package/dist/Sheet.d.ts +4 -46
  57. package/dist/Sheet.js +46 -114
  58. package/dist/Sheet.mjs +2 -3
  59. package/dist/SheetSelect.mjs +2 -2
  60. package/dist/Skeleton.mjs +2 -2
  61. package/dist/Slider.mjs +2 -2
  62. package/dist/Spinner.mjs +2 -2
  63. package/dist/Stats.d.mts +30 -0
  64. package/dist/Stats.d.ts +30 -0
  65. package/dist/Stats.js +429 -0
  66. package/dist/Stats.mjs +9 -0
  67. package/dist/Switch.mjs +2 -2
  68. package/dist/TabBar.mjs +2 -2
  69. package/dist/Tabs.mjs +2 -2
  70. package/dist/Text.d.mts +3 -1
  71. package/dist/Text.d.ts +3 -1
  72. package/dist/Text.js +3 -3
  73. package/dist/Text.mjs +2 -2
  74. package/dist/Textarea.mjs +2 -2
  75. package/dist/Toast.mjs +2 -2
  76. package/dist/Toggle.mjs +2 -2
  77. package/dist/{chunk-YJ7I257J.mjs → chunk-265G6A46.mjs} +1 -1
  78. package/dist/{chunk-ELXBDILQ.mjs → chunk-2A2LEFZG.mjs} +2 -2
  79. package/dist/{chunk-ID72TK46.mjs → chunk-2CBQKU7H.mjs} +1 -1
  80. package/dist/{chunk-OB4JUQ3O.mjs → chunk-2I2AYECM.mjs} +1 -1
  81. package/dist/{chunk-WJLKJMKR.mjs → chunk-357YO24D.mjs} +4 -4
  82. package/dist/{chunk-GQYFLP3D.mjs → chunk-3GEYJ7I5.mjs} +1 -1
  83. package/dist/{chunk-AV4EMIRH.mjs → chunk-3N2M3WZL.mjs} +1 -1
  84. package/dist/{chunk-VF2ATYN3.mjs → chunk-3UYAZ7I4.mjs} +1 -1
  85. package/dist/{chunk-JMOZEC77.mjs → chunk-4WFMPFZB.mjs} +1 -1
  86. package/dist/chunk-5OLNXP3S.mjs +144 -0
  87. package/dist/{chunk-6SECQ2ZF.mjs → chunk-7HSILTC4.mjs} +2 -2
  88. package/dist/{chunk-IRRY3CRZ.mjs → chunk-AKM4EPOT.mjs} +1 -1
  89. package/dist/{chunk-IX3NYLYQ.mjs → chunk-AQEVCEXV.mjs} +1 -1
  90. package/dist/{chunk-WBOOUHSS.mjs → chunk-BCWEHE34.mjs} +1 -1
  91. package/dist/{chunk-AJ7ZDNBT.mjs → chunk-BOVUP27T.mjs} +1 -1
  92. package/dist/{chunk-BRKYVJVV.mjs → chunk-BQZE3HAW.mjs} +1 -1
  93. package/dist/{chunk-Z6SFHN6T.mjs → chunk-D3Y2T42P.mjs} +1 -1
  94. package/dist/{chunk-T2KCAHOS.mjs → chunk-DF6DU42P.mjs} +1 -1
  95. package/dist/{chunk-TB6SD2FT.mjs → chunk-DI7CBDL6.mjs} +1 -1
  96. package/dist/{chunk-HTHGSXFG.mjs → chunk-DOGIPOF5.mjs} +1 -1
  97. package/dist/{chunk-MBMXYJJV.mjs → chunk-E7NEHHXV.mjs} +7 -3
  98. package/dist/{chunk-MX6HRKMI.mjs → chunk-EFLFRAHD.mjs} +1 -1
  99. package/dist/{chunk-SOYNZDVY.mjs → chunk-EMUWGDWC.mjs} +6 -1
  100. package/dist/{chunk-AJRVDP2H.mjs → chunk-F4V6XLP4.mjs} +3 -3
  101. package/dist/{chunk-DYT7BG5I.mjs → chunk-FA2KMTH5.mjs} +1 -1
  102. package/dist/{chunk-Y2NS74WS.mjs → chunk-FFTYLPSB.mjs} +46 -98
  103. package/dist/{chunk-VKID2D2I.mjs → chunk-FUVYSVGR.mjs} +13 -8
  104. package/dist/{chunk-7LWRKMF5.mjs → chunk-FVTVCJAH.mjs} +1 -1
  105. package/dist/{chunk-TZDGAP5N.mjs → chunk-GK4VRMNE.mjs} +2 -2
  106. package/dist/{chunk-6Q64UFIA.mjs → chunk-HJ46DTJE.mjs} +1 -1
  107. package/dist/{chunk-WF2XDFRK.mjs → chunk-HLMPMUK2.mjs} +1 -1
  108. package/dist/{chunk-GD6KXMG5.mjs → chunk-I4V5XZPS.mjs} +1 -1
  109. package/dist/{chunk-TBNZHU6C.mjs → chunk-ISY26JQJ.mjs} +2 -2
  110. package/dist/{chunk-X4G6APW6.mjs → chunk-J6Q2YJEV.mjs} +1 -1
  111. package/dist/{chunk-WYEUNUTP.mjs → chunk-JCZQOY4O.mjs} +31 -24
  112. package/dist/{chunk-U2XJFYED.mjs → chunk-JNVAIDLK.mjs} +1 -1
  113. package/dist/{chunk-SOA2Z4RB.mjs → chunk-JULSIZDM.mjs} +1 -1
  114. package/dist/chunk-KHYX4IOM.mjs +1114 -0
  115. package/dist/{chunk-RYZC432S.mjs → chunk-LRM4AVYY.mjs} +1 -1
  116. package/dist/{chunk-6L4G6PBT.mjs → chunk-MYZ2EDYU.mjs} +1 -1
  117. package/dist/{chunk-BUMAMSTZ.mjs → chunk-N4ZPVCJH.mjs} +1 -1
  118. package/dist/{chunk-Z4VHZ7B5.mjs → chunk-NXI4YDZ2.mjs} +1 -1
  119. package/dist/{chunk-ZZ2R6KZ3.mjs → chunk-OULVKTWL.mjs} +1 -1
  120. package/dist/{chunk-FCSSQK3L.mjs → chunk-P64WHW4A.mjs} +1 -1
  121. package/dist/{chunk-KOO4WITD.mjs → chunk-P73V2EKS.mjs} +1 -1
  122. package/dist/{chunk-SXLKNTA4.mjs → chunk-PGERH3P7.mjs} +1 -1
  123. package/dist/{chunk-2UYENBLV.mjs → chunk-QSFV2P7O.mjs} +1 -1
  124. package/dist/{chunk-JT7HKXRB.mjs → chunk-S3KJCPEJ.mjs} +1 -1
  125. package/dist/{chunk-BEMIQXXU.mjs → chunk-V6NFJXKO.mjs} +1 -1
  126. package/dist/{chunk-A3A6KNQN.mjs → chunk-WOEWGSTU.mjs} +1 -1
  127. package/dist/{chunk-NMU5FMQJ.mjs → chunk-X26S5EVZ.mjs} +4 -2
  128. package/dist/{chunk-YFZ3ELX5.mjs → chunk-XBAGGKLW.mjs} +2 -2
  129. package/dist/{chunk-S2R7UVOE.mjs → chunk-ZHMSAYLT.mjs} +1 -1
  130. package/dist/fonts.d.mts +1 -7
  131. package/dist/fonts.d.ts +1 -7
  132. package/dist/fonts.js +0 -2
  133. package/dist/fonts.mjs +1 -2
  134. package/dist/index.d.mts +4 -1
  135. package/dist/index.d.ts +4 -1
  136. package/dist/index.js +1184 -708
  137. package/dist/index.mjs +53 -52
  138. package/package.json +3 -3
  139. package/src/components/ConfirmDialog/ConfirmDialog.tsx +39 -30
  140. package/src/components/CurrencyInput/CurrencyInput.tsx +4 -7
  141. package/src/components/IconPicker/IconPicker.tsx +124 -112
  142. package/src/components/ListItem/ListItem.tsx +43 -28
  143. package/src/components/Pressable/Pressable.tsx +20 -8
  144. package/src/components/Sheet/Sheet.tsx +64 -172
  145. package/src/components/Stats/Stats.tsx +226 -0
  146. package/src/components/Stats/index.ts +2 -0
  147. package/src/components/Text/Text.tsx +4 -2
  148. package/src/fonts.ts +0 -7
  149. package/src/index.ts +4 -0
  150. package/src/theme/colorUtils.ts +9 -0
  151. package/src/utils/curatedIcons.ts +698 -135
  152. package/src/utils/fontGuard.ts +2 -1
  153. package/dist/chunk-53Z3NYGE.mjs +0 -742
@@ -1,6 +1,6 @@
1
- import { IconButton } from './chunk-T2KCAHOS.mjs';
1
+ import { IconButton } from './chunk-DF6DU42P.mjs';
2
2
  import { BREAKPOINTS } from './chunk-QY3X2UYR.mjs';
3
- import { useTheme } from './chunk-SOYNZDVY.mjs';
3
+ import { useTheme } from './chunk-EMUWGDWC.mjs';
4
4
  import { mvs, ms, vs, s } from './chunk-2CE3TQVY.mjs';
5
5
  import React from 'react';
6
6
  import { StyleSheet, useWindowDimensions, View, Text } from 'react-native';
@@ -1,7 +1,7 @@
1
1
  import { usePressScale } from './chunk-YNROWHQJ.mjs';
2
2
  import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
3
3
  import { PRESS_SCALE, COLOR_TRANSITION, SPRING_ELASTIC } from './chunk-DVK4G2GT.mjs';
4
- import { useTheme } from './chunk-SOYNZDVY.mjs';
4
+ import { useTheme } from './chunk-EMUWGDWC.mjs';
5
5
  import { mvs, ms, s, vs } from './chunk-2CE3TQVY.mjs';
6
6
  import React from 'react';
7
7
  import { StyleSheet, View, TouchableOpacity, Text } from 'react-native';
@@ -1,17 +1,17 @@
1
- import { Button } from './chunk-HTHGSXFG.mjs';
1
+ import { Button } from './chunk-DOGIPOF5.mjs';
2
2
  import { impactMedium, notificationSuccess, selectionAsync } from './chunk-EJ7ZPXOH.mjs';
3
- import { useTheme } from './chunk-SOYNZDVY.mjs';
3
+ import { useTheme } from './chunk-EMUWGDWC.mjs';
4
4
  import { vs, mvs, ms, s } from './chunk-2CE3TQVY.mjs';
5
- import React, { useRef, useEffect } from 'react';
5
+ import React, { useRef, useId, useEffect, useCallback } from 'react';
6
6
  import { StyleSheet, View, Text, TouchableOpacity } from 'react-native';
7
- import BottomSheet, { BottomSheetView, BottomSheetBackdrop } from '@gorhom/bottom-sheet';
7
+ import { BottomSheetBackdrop, BottomSheetModal, BottomSheetView } from '@gorhom/bottom-sheet';
8
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
8
9
  import { Feather } from '@expo/vector-icons';
9
10
 
10
11
  function ConfirmDialog({
11
12
  visible,
12
13
  title,
13
14
  subtitle,
14
- description,
15
15
  confirmLabel = "Confirm",
16
16
  cancelLabel = "Cancel",
17
17
  confirmVariant = "primary",
@@ -21,36 +21,43 @@ function ConfirmDialog({
21
21
  onCancel
22
22
  }) {
23
23
  const { colors } = useTheme();
24
+ const insets = useSafeAreaInsets();
24
25
  const ref = useRef(null);
25
- const effectiveSubtitle = subtitle ?? description;
26
+ const wasOpened = useRef(false);
27
+ const name = useId();
26
28
  useEffect(() => {
27
29
  if (visible) {
28
30
  impactMedium();
29
- ref.current?.snapToIndex(0);
30
- } else {
31
- ref.current?.close();
31
+ ref.current?.present();
32
+ wasOpened.current = true;
33
+ } else if (wasOpened.current) {
34
+ ref.current?.dismiss();
32
35
  }
33
36
  }, [visible]);
34
- const renderBackdrop = (props) => /* @__PURE__ */ React.createElement(
35
- BottomSheetBackdrop,
36
- {
37
- ...props,
38
- disappearsOnIndex: -1,
39
- appearsOnIndex: 0,
40
- pressBehavior: "close"
41
- }
37
+ const renderBackdrop = useCallback(
38
+ (props) => /* @__PURE__ */ React.createElement(
39
+ BottomSheetBackdrop,
40
+ {
41
+ ...props,
42
+ disappearsOnIndex: -1,
43
+ appearsOnIndex: 0,
44
+ pressBehavior: "close"
45
+ }
46
+ ),
47
+ []
42
48
  );
43
49
  return /* @__PURE__ */ React.createElement(
44
- BottomSheet,
50
+ BottomSheetModal,
45
51
  {
46
52
  ref,
47
- index: -1,
48
- onClose: onCancel,
53
+ name,
54
+ onDismiss: onCancel,
49
55
  enableDynamicSizing: true,
50
56
  backdropComponent: renderBackdrop,
51
- backgroundStyle: [styles.background, { backgroundColor: colors.card }],
52
- handleIndicatorStyle: [styles.handle, { backgroundColor: colors.border }],
53
- enablePanDownToClose: true
57
+ backgroundStyle: { ...styles.background, backgroundColor: colors.card },
58
+ handleIndicatorStyle: { ...styles.handle, backgroundColor: colors.border },
59
+ enablePanDownToClose: true,
60
+ topInset: insets.top
54
61
  },
55
62
  /* @__PURE__ */ React.createElement(BottomSheetView, { style: styles.content }, /* @__PURE__ */ React.createElement(View, { style: styles.header, accessibilityRole: "header" }, /* @__PURE__ */ React.createElement(View, { style: styles.headerRow }, /* @__PURE__ */ React.createElement(Text, { style: [styles.title, { color: colors.foreground }], allowFontScaling: true }, title), showCloseButton ? /* @__PURE__ */ React.createElement(
56
63
  TouchableOpacity,
@@ -64,7 +71,7 @@ function ConfirmDialog({
64
71
  hitSlop: { top: 12, bottom: 12, left: 12, right: 12 }
65
72
  },
66
73
  /* @__PURE__ */ React.createElement(Feather, { name: "x", size: ms(18), color: colors.foregroundMuted })
67
- ) : null), effectiveSubtitle ? /* @__PURE__ */ React.createElement(Text, { style: [styles.subtitle, { color: colors.foregroundMuted }], allowFontScaling: true }, effectiveSubtitle) : null), /* @__PURE__ */ React.createElement(View, { style: styles.actions }, /* @__PURE__ */ React.createElement(
74
+ ) : null), subtitle ? /* @__PURE__ */ React.createElement(Text, { style: [styles.subtitle, { color: colors.foregroundMuted }], allowFontScaling: true }, subtitle) : null), /* @__PURE__ */ React.createElement(View, { style: styles.actions }, /* @__PURE__ */ React.createElement(
68
75
  Button,
69
76
  {
70
77
  label: confirmLabel,
@@ -1,6 +1,6 @@
1
1
  import { TIMINGS, EASINGS } from './chunk-DVK4G2GT.mjs';
2
2
  import { renderIcon } from './chunk-KA7LTET3.mjs';
3
- import { useTheme } from './chunk-SOYNZDVY.mjs';
3
+ import { useTheme } from './chunk-EMUWGDWC.mjs';
4
4
  import { vs, ms, s } from './chunk-2CE3TQVY.mjs';
5
5
  import React, { useState, useEffect } from 'react';
6
6
  import { Platform, StyleSheet, View, Text, TextInput } from 'react-native';
@@ -1,5 +1,5 @@
1
1
  import { RADIUS } from './chunk-QY3X2UYR.mjs';
2
- import { useTheme } from './chunk-SOYNZDVY.mjs';
2
+ import { useTheme } from './chunk-EMUWGDWC.mjs';
3
3
  import { vs, s } from './chunk-2CE3TQVY.mjs';
4
4
  import React from 'react';
5
5
  import { StyleSheet, View, Text } from 'react-native';