@retray-dev/ui-kit 10.1.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 (192) hide show
  1. package/COMPONENTS.md +419 -38
  2. package/README.md +14 -5
  3. package/dist/Accordion.js +1 -1
  4. package/dist/Accordion.mjs +3 -3
  5. package/dist/AlertBanner.js +1 -1
  6. package/dist/AlertBanner.mjs +3 -3
  7. package/dist/AppHeader.js +1 -1
  8. package/dist/AppHeader.mjs +4 -4
  9. package/dist/Avatar.mjs +2 -2
  10. package/dist/Badge.js +1 -1
  11. package/dist/Badge.mjs +3 -3
  12. package/dist/Button.js +1 -1
  13. package/dist/Button.mjs +3 -3
  14. package/dist/Card.mjs +2 -2
  15. package/dist/CategoryStrip.js +1 -1
  16. package/dist/CategoryStrip.mjs +3 -3
  17. package/dist/Checkbox.mjs +2 -2
  18. package/dist/Chip.js +1 -1
  19. package/dist/Chip.mjs +3 -3
  20. package/dist/ConfirmDialog.d.mts +1 -6
  21. package/dist/ConfirmDialog.d.ts +1 -6
  22. package/dist/ConfirmDialog.js +30 -24
  23. package/dist/ConfirmDialog.mjs +4 -4
  24. package/dist/CurrencyDisplay.mjs +2 -2
  25. package/dist/CurrencyInput.d.mts +3 -8
  26. package/dist/CurrencyInput.d.ts +3 -8
  27. package/dist/CurrencyInput.js +4 -2
  28. package/dist/CurrencyInput.mjs +4 -4
  29. package/dist/DetailRow.d.mts +1 -1
  30. package/dist/DetailRow.d.ts +1 -1
  31. package/dist/DetailRow.js +1 -1
  32. package/dist/DetailRow.mjs +3 -3
  33. package/dist/EmptyState.js +1 -1
  34. package/dist/EmptyState.mjs +4 -4
  35. package/dist/ErrorBoundary.js +1 -1
  36. package/dist/ErrorBoundary.mjs +3 -3
  37. package/dist/Form.mjs +2 -2
  38. package/dist/IconButton.js +1 -1
  39. package/dist/IconButton.mjs +3 -3
  40. package/dist/IconPicker.d.mts +17 -0
  41. package/dist/IconPicker.d.ts +17 -0
  42. package/dist/IconPicker.js +1424 -0
  43. package/dist/IconPicker.mjs +8 -0
  44. package/dist/ImageUpload.d.mts +3 -1
  45. package/dist/ImageUpload.d.ts +3 -1
  46. package/dist/ImageUpload.js +28 -10
  47. package/dist/ImageUpload.mjs +3 -3
  48. package/dist/ImageViewer.js +1 -1
  49. package/dist/ImageViewer.mjs +5 -5
  50. package/dist/Input.js +1 -1
  51. package/dist/Input.mjs +3 -3
  52. package/dist/LabelValue.js +1 -1
  53. package/dist/LabelValue.mjs +3 -3
  54. package/dist/ListGroup.mjs +2 -2
  55. package/dist/ListItem.d.mts +7 -7
  56. package/dist/ListItem.d.ts +7 -7
  57. package/dist/ListItem.js +13 -8
  58. package/dist/ListItem.mjs +3 -3
  59. package/dist/MediaCard.js +1 -1
  60. package/dist/MediaCard.mjs +3 -3
  61. package/dist/MenuGroup.mjs +2 -2
  62. package/dist/MenuItem.js +1 -1
  63. package/dist/MenuItem.mjs +3 -3
  64. package/dist/MonthPicker.mjs +2 -2
  65. package/dist/NumberStepper.d.mts +19 -0
  66. package/dist/NumberStepper.d.ts +19 -0
  67. package/dist/NumberStepper.js +410 -0
  68. package/dist/NumberStepper.mjs +9 -0
  69. package/dist/PagerDots.js +1 -1
  70. package/dist/PagerDots.mjs +3 -3
  71. package/dist/Pressable.d.mts +15 -7
  72. package/dist/Pressable.d.ts +15 -7
  73. package/dist/Pressable.js +7 -3
  74. package/dist/Pressable.mjs +1 -1
  75. package/dist/PricingCard.js +1 -1
  76. package/dist/PricingCard.mjs +5 -5
  77. package/dist/Progress.mjs +2 -2
  78. package/dist/RadioGroup.mjs +2 -2
  79. package/dist/RetrayProvider.mjs +3 -3
  80. package/dist/Select.mjs +2 -2
  81. package/dist/SelectableGrid.js +1 -1
  82. package/dist/SelectableGrid.mjs +3 -3
  83. package/dist/Separator.mjs +2 -2
  84. package/dist/Sheet.d.mts +4 -46
  85. package/dist/Sheet.d.ts +4 -46
  86. package/dist/Sheet.js +46 -114
  87. package/dist/Sheet.mjs +2 -3
  88. package/dist/SheetSelect.js +1 -1
  89. package/dist/SheetSelect.mjs +3 -3
  90. package/dist/Skeleton.mjs +2 -2
  91. package/dist/Slider.mjs +2 -2
  92. package/dist/Spinner.mjs +2 -2
  93. package/dist/Stats.d.mts +30 -0
  94. package/dist/Stats.d.ts +30 -0
  95. package/dist/Stats.js +429 -0
  96. package/dist/Stats.mjs +9 -0
  97. package/dist/Switch.mjs +2 -2
  98. package/dist/TabBar.js +1 -1
  99. package/dist/TabBar.mjs +3 -3
  100. package/dist/Tabs.mjs +2 -2
  101. package/dist/Text.d.mts +3 -1
  102. package/dist/Text.d.ts +3 -1
  103. package/dist/Text.js +3 -3
  104. package/dist/Text.mjs +2 -2
  105. package/dist/Textarea.js +1 -1
  106. package/dist/Textarea.mjs +3 -3
  107. package/dist/Toast.mjs +2 -2
  108. package/dist/Toggle.js +1 -1
  109. package/dist/Toggle.mjs +3 -3
  110. package/dist/{chunk-DJ7RN37L.mjs → chunk-265G6A46.mjs} +2 -2
  111. package/dist/{chunk-WOEYDUJZ.mjs → chunk-2A2LEFZG.mjs} +2 -2
  112. package/dist/{chunk-ID72TK46.mjs → chunk-2CBQKU7H.mjs} +1 -1
  113. package/dist/{chunk-OB4JUQ3O.mjs → chunk-2I2AYECM.mjs} +1 -1
  114. package/dist/{chunk-WJLKJMKR.mjs → chunk-357YO24D.mjs} +4 -4
  115. package/dist/{chunk-GQYFLP3D.mjs → chunk-3GEYJ7I5.mjs} +1 -1
  116. package/dist/{chunk-AV4EMIRH.mjs → chunk-3N2M3WZL.mjs} +1 -1
  117. package/dist/{chunk-TERDKCLE.mjs → chunk-3UYAZ7I4.mjs} +2 -2
  118. package/dist/{chunk-JMOZEC77.mjs → chunk-4WFMPFZB.mjs} +1 -1
  119. package/dist/chunk-5OLNXP3S.mjs +144 -0
  120. package/dist/{chunk-6OAZJ577.mjs → chunk-7HSILTC4.mjs} +3 -3
  121. package/dist/{chunk-IRRY3CRZ.mjs → chunk-AKM4EPOT.mjs} +1 -1
  122. package/dist/{chunk-VGTDN7SW.mjs → chunk-AQEVCEXV.mjs} +2 -2
  123. package/dist/{chunk-WBOOUHSS.mjs → chunk-BCWEHE34.mjs} +1 -1
  124. package/dist/{chunk-AJ7ZDNBT.mjs → chunk-BOVUP27T.mjs} +1 -1
  125. package/dist/{chunk-BRKYVJVV.mjs → chunk-BQZE3HAW.mjs} +1 -1
  126. package/dist/{chunk-MLF3EZFW.mjs → chunk-D3Y2T42P.mjs} +2 -2
  127. package/dist/{chunk-3U4SSNWP.mjs → chunk-DF6DU42P.mjs} +2 -2
  128. package/dist/{chunk-ZJKGQMYH.mjs → chunk-DI7CBDL6.mjs} +2 -2
  129. package/dist/{chunk-2TFTAWVJ.mjs → chunk-DOGIPOF5.mjs} +2 -2
  130. package/dist/{chunk-MBMXYJJV.mjs → chunk-E7NEHHXV.mjs} +7 -3
  131. package/dist/{chunk-MX6HRKMI.mjs → chunk-EFLFRAHD.mjs} +1 -1
  132. package/dist/{chunk-SOYNZDVY.mjs → chunk-EMUWGDWC.mjs} +6 -1
  133. package/dist/{chunk-4I7D47FH.mjs → chunk-F4V6XLP4.mjs} +4 -4
  134. package/dist/{chunk-UREA2GYY.mjs → chunk-FA2KMTH5.mjs} +2 -2
  135. package/dist/{chunk-Y2NS74WS.mjs → chunk-FFTYLPSB.mjs} +46 -98
  136. package/dist/{chunk-OHBNABL5.mjs → chunk-FUVYSVGR.mjs} +14 -9
  137. package/dist/{chunk-KIHCWCWL.mjs → chunk-FVTVCJAH.mjs} +2 -2
  138. package/dist/{chunk-Y4GL2MHX.mjs → chunk-GK4VRMNE.mjs} +30 -12
  139. package/dist/{chunk-6Q64UFIA.mjs → chunk-HJ46DTJE.mjs} +1 -1
  140. package/dist/{chunk-WF2XDFRK.mjs → chunk-HLMPMUK2.mjs} +1 -1
  141. package/dist/{chunk-GD6KXMG5.mjs → chunk-I4V5XZPS.mjs} +1 -1
  142. package/dist/{chunk-AZJF2BLK.mjs → chunk-ISY26JQJ.mjs} +2 -2
  143. package/dist/{chunk-X4G6APW6.mjs → chunk-J6Q2YJEV.mjs} +1 -1
  144. package/dist/{chunk-KZL5VTYK.mjs → chunk-JCZQOY4O.mjs} +31 -24
  145. package/dist/{chunk-CZCQZHG6.mjs → chunk-JNVAIDLK.mjs} +2 -2
  146. package/dist/{chunk-SOA2Z4RB.mjs → chunk-JULSIZDM.mjs} +1 -1
  147. package/dist/{chunk-T7XZ7H7Y.mjs → chunk-KA7LTET3.mjs} +17 -3
  148. package/dist/chunk-KHYX4IOM.mjs +1114 -0
  149. package/dist/{chunk-LXJIIOYQ.mjs → chunk-LRM4AVYY.mjs} +2 -2
  150. package/dist/{chunk-VQ57HWPL.mjs → chunk-MYZ2EDYU.mjs} +2 -2
  151. package/dist/chunk-N4ZPVCJH.mjs +126 -0
  152. package/dist/{chunk-NA7PARID.mjs → chunk-NXI4YDZ2.mjs} +2 -2
  153. package/dist/{chunk-4K625MVM.mjs → chunk-OULVKTWL.mjs} +2 -2
  154. package/dist/{chunk-A4MDAP7G.mjs → chunk-P64WHW4A.mjs} +2 -2
  155. package/dist/{chunk-URI2WBIV.mjs → chunk-P73V2EKS.mjs} +2 -2
  156. package/dist/{chunk-ZUR7AU5R.mjs → chunk-PGERH3P7.mjs} +2 -2
  157. package/dist/{chunk-2UYENBLV.mjs → chunk-QSFV2P7O.mjs} +1 -1
  158. package/dist/{chunk-JT7HKXRB.mjs → chunk-S3KJCPEJ.mjs} +1 -1
  159. package/dist/{chunk-6MKGPAR2.mjs → chunk-V6NFJXKO.mjs} +2 -2
  160. package/dist/{chunk-A3A6KNQN.mjs → chunk-WOEWGSTU.mjs} +1 -1
  161. package/dist/{chunk-JUXSWN54.mjs → chunk-X26S5EVZ.mjs} +4 -2
  162. package/dist/{chunk-YFZ3ELX5.mjs → chunk-XBAGGKLW.mjs} +2 -2
  163. package/dist/{chunk-JB67UOB5.mjs → chunk-ZHMSAYLT.mjs} +2 -2
  164. package/dist/fonts.d.mts +1 -7
  165. package/dist/fonts.d.ts +1 -7
  166. package/dist/fonts.js +0 -2
  167. package/dist/fonts.mjs +1 -2
  168. package/dist/index.d.mts +7 -1
  169. package/dist/index.d.ts +7 -1
  170. package/dist/index.js +1831 -475
  171. package/dist/index.mjs +54 -51
  172. package/package.json +3 -3
  173. package/src/components/ConfirmDialog/ConfirmDialog.tsx +39 -30
  174. package/src/components/CurrencyInput/CurrencyInput.tsx +4 -7
  175. package/src/components/DetailRow/DetailRow.tsx +1 -1
  176. package/src/components/IconPicker/IconPicker.tsx +395 -0
  177. package/src/components/IconPicker/index.ts +1 -0
  178. package/src/components/ImageUpload/ImageUpload.tsx +34 -12
  179. package/src/components/ListItem/ListItem.tsx +43 -28
  180. package/src/components/NumberStepper/NumberStepper.tsx +147 -0
  181. package/src/components/NumberStepper/index.ts +1 -0
  182. package/src/components/Pressable/Pressable.tsx +20 -8
  183. package/src/components/Sheet/Sheet.tsx +64 -172
  184. package/src/components/Stats/Stats.tsx +226 -0
  185. package/src/components/Stats/index.ts +2 -0
  186. package/src/components/Text/Text.tsx +4 -2
  187. package/src/fonts.ts +0 -7
  188. package/src/index.ts +7 -1
  189. package/src/theme/colorUtils.ts +9 -0
  190. package/src/utils/curatedIcons.ts +849 -0
  191. package/src/utils/fontGuard.ts +2 -1
  192. package/src/utils/icons.ts +20 -2
@@ -1,7 +1,7 @@
1
1
  import { PressableTab } from './chunk-3DKJ2GIC.mjs';
2
2
  import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
3
3
  import { SPRINGS } from './chunk-DVK4G2GT.mjs';
4
- import { useTheme } from './chunk-SOYNZDVY.mjs';
4
+ import { useTheme } from './chunk-EMUWGDWC.mjs';
5
5
  import { ms, s, vs } from './chunk-2CE3TQVY.mjs';
6
6
  import React, { useState, useRef, useCallback, useEffect } from 'react';
7
7
  import { StyleSheet, View, Text } from 'react-native';
@@ -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-SOYNZDVY.mjs';
4
+ import { useTheme } from './chunk-EMUWGDWC.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
- import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
2
- import { useTheme } from './chunk-SOYNZDVY.mjs';
1
+ import { renderIcon } from './chunk-KA7LTET3.mjs';
2
+ import { useTheme } from './chunk-EMUWGDWC.mjs';
3
3
  import { vs, s, ms } from './chunk-2CE3TQVY.mjs';
4
4
  import React from 'react';
5
5
  import { StyleSheet, View, Text } from 'react-native';
@@ -1,5 +1,5 @@
1
1
  import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
2
- import { useTheme } from './chunk-SOYNZDVY.mjs';
2
+ import { useTheme } from './chunk-EMUWGDWC.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';
@@ -0,0 +1,144 @@
1
+ import { PressableCard } from './chunk-3DKJ2GIC.mjs';
2
+ import { impactLight } from './chunk-EJ7ZPXOH.mjs';
3
+ import { RADIUS } from './chunk-QY3X2UYR.mjs';
4
+ import { renderIcon } from './chunk-KA7LTET3.mjs';
5
+ import { useTheme } from './chunk-EMUWGDWC.mjs';
6
+ import { s, vs, mvs, ms } from './chunk-2CE3TQVY.mjs';
7
+ import React, { useState, useCallback } from 'react';
8
+ import { StyleSheet, View, Text } from 'react-native';
9
+
10
+ var COMPACT_THRESHOLD = s(150);
11
+ function StatsComponent({
12
+ value,
13
+ label,
14
+ description,
15
+ icon,
16
+ iconName,
17
+ iconColor,
18
+ variant = "elevated",
19
+ onPress,
20
+ style,
21
+ accessibilityLabel
22
+ }) {
23
+ const { colors } = useTheme();
24
+ const [containerWidth, setContainerWidth] = useState(0);
25
+ const handleLayout = useCallback((e) => {
26
+ const w = e.nativeEvent.layout.width;
27
+ if (w > 0 && w !== containerWidth) {
28
+ setContainerWidth(w);
29
+ }
30
+ }, [containerWidth]);
31
+ const handlePress = () => {
32
+ if (!onPress) return;
33
+ impactLight();
34
+ onPress();
35
+ };
36
+ const isCompact = containerWidth > 0 && containerWidth < COMPACT_THRESHOLD && !!(icon ?? iconName);
37
+ const variantStyle = {
38
+ elevated: {
39
+ backgroundColor: colors.card,
40
+ borderWidth: 0,
41
+ shadowColor: "#000",
42
+ shadowOffset: { width: 0, height: 4 },
43
+ shadowOpacity: 0.09,
44
+ shadowRadius: 14,
45
+ elevation: 4
46
+ },
47
+ outlined: {
48
+ backgroundColor: colors.card,
49
+ borderColor: colors.border,
50
+ shadowOpacity: 0,
51
+ elevation: 0
52
+ },
53
+ filled: {
54
+ backgroundColor: colors.surfaceStrong,
55
+ borderColor: colors.border,
56
+ shadowOpacity: 0,
57
+ elevation: 0
58
+ }
59
+ }[variant];
60
+ const iconColorResolved = iconColor ?? colors.primary;
61
+ const resolvedIcon = iconName ? renderIcon(iconName, ms(22), iconColorResolved) : icon;
62
+ const iconElement = resolvedIcon ? /* @__PURE__ */ React.createElement(View, { style: styles.iconWrapper }, resolvedIcon) : null;
63
+ const valueElement = /* @__PURE__ */ React.createElement(Text, { style: [styles.value, { color: colors.foreground }], allowFontScaling: true }, value);
64
+ const cardContent = /* @__PURE__ */ React.createElement(View, { style: [styles.card, variantStyle, style], onLayout: handleLayout }, isCompact ? /* @__PURE__ */ React.createElement(React.Fragment, null, iconElement, /* @__PURE__ */ React.createElement(View, { style: styles.compactValue }, valueElement), /* @__PURE__ */ React.createElement(Text, { style: [styles.label, { color: colors.foregroundSubtle }], allowFontScaling: true }, label), description ? /* @__PURE__ */ React.createElement(Text, { style: [styles.description, { color: colors.foregroundMuted }], allowFontScaling: true }, description) : null) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(View, { style: styles.valueRow }, iconElement, valueElement), /* @__PURE__ */ React.createElement(Text, { style: [styles.label, { color: colors.foregroundSubtle }], allowFontScaling: true }, label), description ? /* @__PURE__ */ React.createElement(Text, { style: [styles.description, { color: colors.foregroundMuted }], allowFontScaling: true }, description) : null));
65
+ if (onPress) {
66
+ return /* @__PURE__ */ React.createElement(
67
+ PressableCard,
68
+ {
69
+ onPress: handlePress,
70
+ rippleColor: "transparent",
71
+ touchSoundDisabled: true,
72
+ activateOnHover: true,
73
+ accessibilityRole: "button",
74
+ accessibilityLabel
75
+ },
76
+ cardContent
77
+ );
78
+ }
79
+ return cardContent;
80
+ }
81
+ function StatsGroup({ children, gap = s(12), style }) {
82
+ return /* @__PURE__ */ React.createElement(View, { style: [styles.group, { gap }, style] }, React.Children.map(children, (child) => {
83
+ if (!React.isValidElement(child)) return child;
84
+ const childStyle = child.props.style;
85
+ const mergedStyle = childStyle ? [childStyle, { alignSelf: "stretch" }] : [{ alignSelf: "stretch" }];
86
+ return /* @__PURE__ */ React.createElement(View, { style: styles.groupItem }, React.cloneElement(
87
+ child,
88
+ { style: mergedStyle }
89
+ ));
90
+ }));
91
+ }
92
+ var Stats = Object.assign(React.memo(StatsComponent), { Group: StatsGroup });
93
+ var styles = StyleSheet.create({
94
+ card: {
95
+ borderRadius: RADIUS.md,
96
+ borderWidth: 1,
97
+ padding: s(16),
98
+ alignSelf: "flex-start",
99
+ alignItems: "center",
100
+ justifyContent: "center"
101
+ },
102
+ valueRow: {
103
+ flexDirection: "row",
104
+ alignItems: "center",
105
+ justifyContent: "center",
106
+ gap: s(8)
107
+ },
108
+ iconWrapper: {
109
+ alignItems: "center",
110
+ justifyContent: "center"
111
+ },
112
+ compactValue: {
113
+ marginTop: vs(8)
114
+ },
115
+ value: {
116
+ fontFamily: "Sohne-Bold",
117
+ fontSize: ms(28),
118
+ lineHeight: mvs(32),
119
+ textAlign: "center"
120
+ },
121
+ label: {
122
+ fontFamily: "Sohne-Regular",
123
+ fontSize: ms(13),
124
+ lineHeight: mvs(18),
125
+ marginTop: vs(8),
126
+ textAlign: "center"
127
+ },
128
+ description: {
129
+ fontFamily: "Sohne-Regular",
130
+ fontSize: ms(12),
131
+ lineHeight: mvs(16),
132
+ marginTop: vs(4),
133
+ textAlign: "center"
134
+ },
135
+ group: {
136
+ flexDirection: "row",
137
+ width: "100%"
138
+ },
139
+ groupItem: {
140
+ flex: 1
141
+ }
142
+ });
143
+
144
+ export { Stats };
@@ -1,6 +1,6 @@
1
- import { Button } from './chunk-2TFTAWVJ.mjs';
2
- import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
3
- import { useTheme } from './chunk-SOYNZDVY.mjs';
1
+ import { Button } from './chunk-DOGIPOF5.mjs';
2
+ import { renderIcon } from './chunk-KA7LTET3.mjs';
3
+ import { useTheme } from './chunk-EMUWGDWC.mjs';
4
4
  import { s, vs, mvs, ms } from './chunk-2CE3TQVY.mjs';
5
5
  import React from 'react';
6
6
  import { StyleSheet, View, Text } from 'react-native';
@@ -1,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';
@@ -2,8 +2,8 @@ import { useHover, usePressScale } from './chunk-YNROWHQJ.mjs';
2
2
  import { impactLight } from './chunk-EJ7ZPXOH.mjs';
3
3
  import { SPRINGS, PRESS_SCALE } from './chunk-DVK4G2GT.mjs';
4
4
  import { RADIUS, SHADOWS } from './chunk-QY3X2UYR.mjs';
5
- import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
6
- import { useTheme } from './chunk-SOYNZDVY.mjs';
5
+ import { renderIcon } from './chunk-KA7LTET3.mjs';
6
+ import { useTheme } from './chunk-EMUWGDWC.mjs';
7
7
  import { mvs, ms, vs, s } from './chunk-2CE3TQVY.mjs';
8
8
  import React from 'react';
9
9
  import { StyleSheet, View, Platform, Image, TouchableOpacity, Text } from 'react-native';
@@ -1,4 +1,4 @@
1
- import { useTheme } from './chunk-SOYNZDVY.mjs';
1
+ import { useTheme } from './chunk-EMUWGDWC.mjs';
2
2
  import { ms, mvs, vs } from './chunk-2CE3TQVY.mjs';
3
3
  import React from 'react';
4
4
  import { StyleSheet, View, ActivityIndicator, Text } 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-SOYNZDVY.mjs';
3
+ import { useTheme } from './chunk-EMUWGDWC.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';
@@ -1,4 +1,4 @@
1
- import { useTheme } from './chunk-SOYNZDVY.mjs';
1
+ import { useTheme } from './chunk-EMUWGDWC.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
1
  import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
2
- import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
3
- import { useTheme } from './chunk-SOYNZDVY.mjs';
2
+ import { renderIcon } from './chunk-KA7LTET3.mjs';
3
+ import { useTheme } from './chunk-EMUWGDWC.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 { PressableButton } from './chunk-3DKJ2GIC.mjs';
2
2
  import { impactLight } from './chunk-EJ7ZPXOH.mjs';
3
- import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
4
- import { useTheme } from './chunk-SOYNZDVY.mjs';
3
+ import { renderIcon } from './chunk-KA7LTET3.mjs';
4
+ import { useTheme } from './chunk-EMUWGDWC.mjs';
5
5
  import { s, ms } from './chunk-2CE3TQVY.mjs';
6
6
  import React from 'react';
7
7
  import { StyleSheet, View, ActivityIndicator, Text } from 'react-native';
@@ -1,8 +1,8 @@
1
1
  import { PressableRow } from './chunk-3DKJ2GIC.mjs';
2
2
  import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
3
3
  import { RADIUS } from './chunk-QY3X2UYR.mjs';
4
- import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
5
- import { useTheme } from './chunk-SOYNZDVY.mjs';
4
+ import { renderIcon } from './chunk-KA7LTET3.mjs';
5
+ import { useTheme } from './chunk-EMUWGDWC.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,8 +1,8 @@
1
1
  import { PressableButton } from './chunk-3DKJ2GIC.mjs';
2
2
  import { impactMedium } from './chunk-EJ7ZPXOH.mjs';
3
3
  import { TYPOGRAPHY, RADIUS } from './chunk-QY3X2UYR.mjs';
4
- import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
5
- import { useTheme } from './chunk-SOYNZDVY.mjs';
4
+ import { renderIcon } from './chunk-KA7LTET3.mjs';
5
+ import { useTheme } from './chunk-EMUWGDWC.mjs';
6
6
  import { vs, s, mvs, ms } from './chunk-2CE3TQVY.mjs';
7
7
  import React from 'react';
8
8
  import { StyleSheet, View, ActivityIndicator, Text } from 'react-native';
@@ -10,7 +10,10 @@ function Pressable({
10
10
  haptics = true,
11
11
  style,
12
12
  disabled,
13
- hoverScale: _hoverScale = 1.02
13
+ hoverScale: _hoverScale = 1.02,
14
+ accessibilityRole,
15
+ accessibilityState,
16
+ accessibilityLabel
14
17
  }) {
15
18
  const handlePress = () => {
16
19
  if (disabled || !onPress) return;
@@ -26,8 +29,9 @@ function Pressable({
26
29
  rippleColor: "transparent",
27
30
  touchSoundDisabled: true,
28
31
  activateOnHover: true,
29
- accessibilityRole: "button",
30
- accessibilityState: { disabled: !!disabled }
32
+ accessibilityRole: accessibilityRole ?? "button",
33
+ accessibilityState: accessibilityState ?? { disabled: !!disabled },
34
+ accessibilityLabel
31
35
  },
32
36
  children
33
37
  );
@@ -1,4 +1,4 @@
1
- import { useTheme } from './chunk-SOYNZDVY.mjs';
1
+ import { useTheme } from './chunk-EMUWGDWC.mjs';
2
2
  import React from 'react';
3
3
  import { StyleSheet, View } from 'react-native';
4
4
 
@@ -52,6 +52,11 @@ function darken(hex, amount) {
52
52
  if (!rgb) return hex;
53
53
  return rgbToHex(rgb.r * (1 - amount), rgb.g * (1 - amount), rgb.b * (1 - amount));
54
54
  }
55
+ function withAlpha(hex, alpha) {
56
+ const rgb = hexToRgb(hex);
57
+ if (!rgb) return hex;
58
+ return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${alpha})`;
59
+ }
55
60
 
56
61
  // src/theme/colors.ts
57
62
  var defaultLight = {
@@ -148,4 +153,4 @@ function useTheme() {
148
153
  return context;
149
154
  }
150
155
 
151
- export { ThemeProvider, defaultDark, defaultLight, deriveColors, useTheme };
156
+ export { ThemeProvider, defaultDark, defaultLight, deriveColors, useTheme, withAlpha };
@@ -1,8 +1,8 @@
1
- import { Badge } from './chunk-TERDKCLE.mjs';
2
- import { Button } from './chunk-2TFTAWVJ.mjs';
1
+ import { Badge } from './chunk-3UYAZ7I4.mjs';
2
+ import { Button } from './chunk-DOGIPOF5.mjs';
3
3
  import { RADIUS, SHADOWS } from './chunk-QY3X2UYR.mjs';
4
- import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
5
- import { useTheme } from './chunk-SOYNZDVY.mjs';
4
+ import { renderIcon } from './chunk-KA7LTET3.mjs';
5
+ import { useTheme } from './chunk-EMUWGDWC.mjs';
6
6
  import { mvs, ms, vs, s } from './chunk-2CE3TQVY.mjs';
7
7
  import React from 'react';
8
8
  import { StyleSheet, View, Text } from 'react-native';
@@ -1,8 +1,8 @@
1
1
  import { PressableChip } from './chunk-3DKJ2GIC.mjs';
2
2
  import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
3
3
  import { COLOR_TRANSITION } from './chunk-DVK4G2GT.mjs';
4
- import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
5
- import { useTheme } from './chunk-SOYNZDVY.mjs';
4
+ import { renderIcon } from './chunk-KA7LTET3.mjs';
5
+ import { useTheme } from './chunk-EMUWGDWC.mjs';
6
6
  import { s, mvs, ms, vs } from './chunk-2CE3TQVY.mjs';
7
7
  import React from 'react';
8
8
  import { StyleSheet, View, Text } from 'react-native';
@@ -1,17 +1,13 @@
1
1
  import { impactMedium } from './chunk-EJ7ZPXOH.mjs';
2
- import { SHADOWS, RADIUS, BREAKPOINTS } from './chunk-QY3X2UYR.mjs';
3
- import { useTheme } from './chunk-SOYNZDVY.mjs';
4
- import { vs, s, mvs, ms } from './chunk-2CE3TQVY.mjs';
5
- import React, { useRef, useEffect, useCallback } from 'react';
6
- import { Dimensions, Platform, StyleSheet, useWindowDimensions, View, Text, TouchableOpacity, Modal, Pressable, ScrollView } from 'react-native';
7
- import BottomSheet, { BottomSheetBackdrop, BottomSheetFooter, BottomSheetScrollView, BottomSheetView } from '@gorhom/bottom-sheet';
2
+ import { useTheme } from './chunk-EMUWGDWC.mjs';
3
+ import { s, vs, mvs, ms } from './chunk-2CE3TQVY.mjs';
4
+ import React, { useRef, useId, useEffect, useCallback } from 'react';
5
+ import { StyleSheet, View, Text, TouchableOpacity } from 'react-native';
6
+ import { BottomSheetBackdrop, BottomSheetFooter, BottomSheetModal, BottomSheetScrollView, BottomSheetView } from '@gorhom/bottom-sheet';
8
7
  export { BottomSheetModalProvider, BottomSheetTextInput } from '@gorhom/bottom-sheet';
9
8
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
10
9
  import { AntDesign } from '@expo/vector-icons';
11
10
 
12
- var SCREEN_HEIGHT = Dimensions.get("window").height;
13
- var DEFAULT_MAX_HEIGHT = SCREEN_HEIGHT * 0.85;
14
- var isAndroid = Platform.OS === "android";
15
11
  function SheetHeader({ children, style }) {
16
12
  return /* @__PURE__ */ React.createElement(View, { style: [styles.header, style] }, children);
17
13
  }
@@ -27,45 +23,45 @@ function Sheet({
27
23
  onClose,
28
24
  title,
29
25
  subtitle,
30
- description,
31
26
  showCloseButton = false,
32
27
  children,
33
28
  style,
34
29
  contentStyle,
35
- scrollable,
30
+ scrollable = false,
36
31
  maxHeight,
37
- keyboardBehavior,
32
+ keyboardBehavior = "interactive",
38
33
  keyboardBlurBehavior = "restore",
39
34
  enableBlurKeyboardOnGesture = true,
40
35
  android_keyboardInputMode = "adjustPan",
41
36
  footer,
42
- snapPoints,
43
- responsive = false,
44
- dialogMaxWidth = 480
37
+ snapPoints
45
38
  }) {
46
39
  const { colors } = useTheme();
47
40
  const insets = useSafeAreaInsets();
48
- const { width: windowWidth } = useWindowDimensions();
49
41
  const ref = useRef(null);
50
- const asDialog = responsive && windowWidth >= BREAKPOINTS.wide;
51
- const effectiveKeyboardBehavior = keyboardBehavior ?? "interactive";
42
+ const wasOpened = useRef(false);
43
+ const name = useId();
52
44
  useEffect(() => {
53
45
  if (open) {
54
46
  impactMedium();
55
- ref.current?.snapToIndex(0);
56
- } else {
57
- ref.current?.close();
47
+ ref.current?.present();
48
+ wasOpened.current = true;
49
+ } else if (wasOpened.current) {
50
+ ref.current?.dismiss();
58
51
  }
59
52
  }, [open]);
60
- const renderBackdrop = useCallback((props) => /* @__PURE__ */ React.createElement(
61
- BottomSheetBackdrop,
62
- {
63
- ...props,
64
- disappearsOnIndex: -1,
65
- appearsOnIndex: 0,
66
- pressBehavior: "close"
67
- }
68
- ), []);
53
+ const renderBackdrop = useCallback(
54
+ (props) => /* @__PURE__ */ React.createElement(
55
+ BottomSheetBackdrop,
56
+ {
57
+ ...props,
58
+ disappearsOnIndex: -1,
59
+ appearsOnIndex: 0,
60
+ pressBehavior: "close"
61
+ }
62
+ ),
63
+ []
64
+ );
69
65
  const childArray = React.Children.toArray(children);
70
66
  const customHeader = childArray.find((child) => React.isValidElement(child) && child.type === SheetHeader);
71
67
  const customContent = childArray.find((child) => React.isValidElement(child) && child.type === SheetContent);
@@ -73,8 +69,7 @@ function Sheet({
73
69
  const filteredChildren = customHeader || customContent || customFooter ? childArray.filter(
74
70
  (child) => !React.isValidElement(child) || child.type !== SheetHeader && child.type !== SheetContent && child.type !== SheetFooter
75
71
  ) : children;
76
- const effectiveSubtitle = subtitle ?? description;
77
- const showHeader = !!(title || effectiveSubtitle || showCloseButton) && !customHeader;
72
+ const showHeader = !!(title || subtitle || showCloseButton) && !customHeader;
78
73
  const headerNode = customHeader ? customHeader : showHeader ? /* @__PURE__ */ React.createElement(View, { style: [styles.header, { backgroundColor: colors.card }], accessibilityRole: "header" }, /* @__PURE__ */ React.createElement(View, { style: styles.headerRow }, title ? /* @__PURE__ */ React.createElement(Text, { style: [styles.title, { color: colors.foreground }], allowFontScaling: true }, title) : /* @__PURE__ */ React.createElement(View, { style: { flex: 1 } }), showCloseButton ? /* @__PURE__ */ React.createElement(
79
74
  TouchableOpacity,
80
75
  {
@@ -87,72 +82,44 @@ function Sheet({
87
82
  hitSlop: { top: 12, bottom: 12, left: 12, right: 12 }
88
83
  },
89
84
  /* @__PURE__ */ React.createElement(AntDesign, { name: "close", size: ms(18), color: colors.foregroundMuted })
90
- ) : null), effectiveSubtitle ? /* @__PURE__ */ React.createElement(Text, { style: [styles.subtitle, { color: colors.foregroundMuted }], allowFontScaling: true }, effectiveSubtitle) : null) : null;
85
+ ) : null), subtitle ? /* @__PURE__ */ React.createElement(Text, { style: [styles.subtitle, { color: colors.foregroundMuted }], allowFontScaling: true }, subtitle) : null) : null;
91
86
  const contentNode = customContent ? customContent : filteredChildren;
92
87
  const effectiveFooter = customFooter ? customFooter : footer;
93
- const renderFooter = useCallback((props) => {
94
- if (!effectiveFooter) return null;
95
- return /* @__PURE__ */ React.createElement(BottomSheetFooter, { ...props }, effectiveFooter);
96
- }, [effectiveFooter]);
97
- if (asDialog) {
98
- return /* @__PURE__ */ React.createElement(Modal, { visible: open, transparent: true, animationType: "fade", onRequestClose: onClose }, /* @__PURE__ */ React.createElement(Pressable, { style: styles.dialogBackdrop, onPress: onClose, accessibilityRole: "button", accessibilityLabel: "Close" }, /* @__PURE__ */ React.createElement(
99
- Pressable,
100
- {
101
- style: [
102
- styles.dialogCard,
103
- { backgroundColor: colors.card, maxWidth: dialogMaxWidth, maxHeight: SCREEN_HEIGHT * 0.85 }
104
- ],
105
- onPress: () => {
106
- }
107
- },
108
- headerNode,
109
- /* @__PURE__ */ React.createElement(
110
- ScrollView,
111
- {
112
- contentContainerStyle: [styles.dialogContent, style],
113
- style: contentStyle,
114
- showsVerticalScrollIndicator: true,
115
- bounces: false
116
- },
117
- contentNode
118
- ),
119
- effectiveFooter
120
- )));
121
- }
122
- const useScroll = scrollable || !!maxHeight;
123
- const effectiveMaxHeight = maxHeight ?? DEFAULT_MAX_HEIGHT;
88
+ const renderFooter = useCallback(
89
+ (props) => {
90
+ if (!effectiveFooter) return null;
91
+ return /* @__PURE__ */ React.createElement(BottomSheetFooter, { ...props }, effectiveFooter);
92
+ },
93
+ [effectiveFooter]
94
+ );
124
95
  const useDynamicSizing = !snapPoints;
125
96
  return /* @__PURE__ */ React.createElement(
126
- BottomSheet,
97
+ BottomSheetModal,
127
98
  {
128
99
  ref,
129
- index: -1,
130
- onClose,
100
+ name,
101
+ onDismiss: onClose,
131
102
  enableDynamicSizing: useDynamicSizing,
132
103
  snapPoints,
133
- maxDynamicContentSize: useDynamicSizing ? effectiveMaxHeight : void 0,
104
+ maxDynamicContentSize: useDynamicSizing && maxHeight ? maxHeight : void 0,
134
105
  backdropComponent: renderBackdrop,
135
106
  footerComponent: effectiveFooter ? renderFooter : void 0,
136
- backgroundStyle: [styles.background, { backgroundColor: colors.card }],
137
- handleIndicatorStyle: [styles.handle, { backgroundColor: colors.border }],
107
+ backgroundStyle: { ...styles.background, backgroundColor: colors.card },
108
+ handleIndicatorStyle: { ...styles.handle, backgroundColor: colors.border },
138
109
  enablePanDownToClose: true,
139
110
  topInset: insets.top,
140
- keyboardBehavior: effectiveKeyboardBehavior,
111
+ keyboardBehavior,
141
112
  keyboardBlurBehavior,
142
113
  android_keyboardInputMode,
143
114
  enableBlurKeyboardOnGesture
144
115
  },
145
- useScroll ? /* @__PURE__ */ React.createElement(
116
+ scrollable ? /* @__PURE__ */ React.createElement(
146
117
  BottomSheetScrollView,
147
118
  {
148
- contentContainerStyle: [
149
- styles.scrollContent,
150
- style
151
- ],
119
+ contentContainerStyle: [styles.scrollContent, style],
152
120
  style: contentStyle,
153
121
  showsVerticalScrollIndicator: true,
154
- indicatorStyle: "black",
155
- persistentScrollbar: isAndroid,
122
+ bounces: false,
156
123
  stickyHeaderIndices: headerNode ? [0] : void 0
157
124
  },
158
125
  headerNode,
@@ -204,8 +171,7 @@ var styles = StyleSheet.create({
204
171
  },
205
172
  scrollContent: {
206
173
  paddingHorizontal: s(16),
207
- paddingBottom: vs(32),
208
- paddingRight: s(16)
174
+ paddingBottom: vs(32)
209
175
  },
210
176
  sheetContent: {
211
177
  gap: vs(16)
@@ -216,24 +182,6 @@ var styles = StyleSheet.create({
216
182
  borderTopWidth: 1,
217
183
  flexDirection: "row",
218
184
  gap: s(12)
219
- },
220
- dialogBackdrop: {
221
- flex: 1,
222
- backgroundColor: "rgba(0,0,0,0.5)",
223
- alignItems: "center",
224
- justifyContent: "center",
225
- padding: s(24)
226
- },
227
- dialogCard: {
228
- width: "100%",
229
- borderRadius: RADIUS.lg,
230
- paddingTop: vs(16),
231
- overflow: "hidden",
232
- ...SHADOWS.xl
233
- },
234
- dialogContent: {
235
- paddingHorizontal: s(16),
236
- paddingBottom: vs(16)
237
185
  }
238
186
  });
239
187
 
@@ -1,8 +1,8 @@
1
1
  import { PressableRow } from './chunk-3DKJ2GIC.mjs';
2
2
  import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
3
3
  import { RADIUS } from './chunk-QY3X2UYR.mjs';
4
- import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
5
- import { useTheme } from './chunk-SOYNZDVY.mjs';
4
+ import { renderIcon } from './chunk-KA7LTET3.mjs';
5
+ import { useTheme } from './chunk-EMUWGDWC.mjs';
6
6
  import { ms, s, mvs, vs } from './chunk-2CE3TQVY.mjs';
7
7
  import React from 'react';
8
8
  import { StyleSheet, Image, View, Text } from 'react-native';
@@ -12,8 +12,7 @@ function ListItemBase({
12
12
  imageSource,
13
13
  leftRender,
14
14
  rightRender,
15
- trailing,
16
- icon,
15
+ rightActions,
17
16
  leftIcon,
18
17
  rightIcon,
19
18
  leftIconColor,
@@ -38,8 +37,8 @@ function ListItemBase({
38
37
  selectionAsync();
39
38
  onPress?.();
40
39
  };
41
- const effectiveLeft = imageSource ? /* @__PURE__ */ React.createElement(Image, { source: imageSource, style: styles.image }) : leftIcon ? renderIcon(leftIcon, 24, leftIconColor ?? colors.foreground) : leftRender ?? icon;
42
- const effectiveRight = rightIcon ? renderIcon(rightIcon, 24, rightIconColor ?? colors.foregroundMuted) : rightRender ?? trailing;
40
+ const effectiveLeft = imageSource ? /* @__PURE__ */ React.createElement(Image, { source: imageSource, style: styles.image }) : leftIcon ? renderIcon(leftIcon, 24, leftIconColor ?? colors.foreground) : leftRender;
41
+ const hasRightContent = !!(rightIcon || rightActions && rightActions.length > 0 || rightRender !== void 0 || showChevron);
43
42
  const cardStyle = variant === "card" ? {
44
43
  backgroundColor: colors.card,
45
44
  borderRadius: RADIUS.md,
@@ -76,14 +75,14 @@ function ListItemBase({
76
75
  allowFontScaling: true
77
76
  },
78
77
  caption
79
- ) : null), effectiveRight !== void 0 ? /* @__PURE__ */ React.createElement(View, { style: styles.rightContainer }, typeof effectiveRight === "string" ? /* @__PURE__ */ React.createElement(
78
+ ) : null), hasRightContent ? rightIcon ? /* @__PURE__ */ React.createElement(View, { style: styles.rightContainer }, renderIcon(rightIcon, 24, rightIconColor ?? colors.foregroundMuted)) : rightActions && rightActions.length > 0 ? /* @__PURE__ */ React.createElement(View, { style: styles.rightActionsContainer }, rightActions.map((action, i) => /* @__PURE__ */ React.createElement(React.Fragment, { key: i }, action))) : rightRender !== void 0 ? /* @__PURE__ */ React.createElement(View, { style: styles.rightContainer }, typeof rightRender === "string" ? /* @__PURE__ */ React.createElement(
80
79
  Text,
81
80
  {
82
81
  style: [styles.rightText, { color: colors.foregroundMuted }],
83
82
  allowFontScaling: true
84
83
  },
85
- effectiveRight
86
- ) : effectiveRight) : showChevron ? /* @__PURE__ */ React.createElement(Entypo, { name: "chevron-with-circle-right", size: 20, color: colors.foregroundMuted }) : null);
84
+ rightRender
85
+ ) : rightRender) : showChevron ? /* @__PURE__ */ React.createElement(Entypo, { name: "chevron-with-circle-right", size: 20, color: colors.foregroundMuted }) : null : null);
87
86
  if (onPress) {
88
87
  return /* @__PURE__ */ React.createElement(View, { style: disabled && styles.disabled }, /* @__PURE__ */ React.createElement(
89
88
  PressableRow,
@@ -150,6 +149,12 @@ var styles = StyleSheet.create({
150
149
  flexShrink: 0,
151
150
  maxWidth: s(160)
152
151
  },
152
+ rightActionsContainer: {
153
+ flexDirection: "row",
154
+ alignItems: "center",
155
+ gap: s(8),
156
+ flexShrink: 0
157
+ },
153
158
  rightText: {
154
159
  fontFamily: "Sohne-Regular",
155
160
  fontSize: ms(14)