@retray-dev/ui-kit 6.1.0 → 7.0.1

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 (321) hide show
  1. package/COMPONENTS.md +447 -13
  2. package/EXAMPLES.md +248 -0
  3. package/README.md +11 -10
  4. package/dist/Accordion.d.mts +28 -0
  5. package/dist/Accordion.d.ts +28 -0
  6. package/dist/Accordion.js +340 -0
  7. package/dist/Accordion.mjs +6 -0
  8. package/dist/AlertBanner.d.mts +16 -0
  9. package/dist/AlertBanner.d.ts +16 -0
  10. package/dist/AlertBanner.js +247 -0
  11. package/dist/AlertBanner.mjs +5 -0
  12. package/dist/Avatar.d.mts +20 -0
  13. package/dist/Avatar.d.ts +20 -0
  14. package/dist/Avatar.js +234 -0
  15. package/dist/Avatar.mjs +3 -0
  16. package/dist/Badge.d.mts +26 -0
  17. package/dist/Badge.d.ts +26 -0
  18. package/dist/Badge.js +247 -0
  19. package/dist/Badge.mjs +4 -0
  20. package/dist/Button.d.mts +25 -0
  21. package/dist/Button.d.ts +25 -0
  22. package/dist/Button.js +414 -0
  23. package/dist/Button.mjs +8 -0
  24. package/dist/ButtonGroup.d.mts +26 -0
  25. package/dist/ButtonGroup.d.ts +26 -0
  26. package/dist/ButtonGroup.js +52 -0
  27. package/dist/ButtonGroup.mjs +2 -0
  28. package/dist/Card.d.mts +39 -0
  29. package/dist/Card.d.ts +39 -0
  30. package/dist/Card.js +329 -0
  31. package/dist/Card.mjs +7 -0
  32. package/dist/CategoryStrip.d.mts +26 -0
  33. package/dist/CategoryStrip.d.ts +26 -0
  34. package/dist/CategoryStrip.js +396 -0
  35. package/dist/CategoryStrip.mjs +9 -0
  36. package/dist/Checkbox.d.mts +14 -0
  37. package/dist/Checkbox.d.ts +14 -0
  38. package/dist/Checkbox.js +304 -0
  39. package/dist/Checkbox.mjs +7 -0
  40. package/dist/Chip.d.mts +31 -0
  41. package/dist/Chip.d.ts +31 -0
  42. package/dist/Chip.js +370 -0
  43. package/dist/Chip.mjs +8 -0
  44. package/dist/ConfirmDialog.d.mts +15 -0
  45. package/dist/ConfirmDialog.d.ts +15 -0
  46. package/dist/ConfirmDialog.js +530 -0
  47. package/dist/ConfirmDialog.mjs +9 -0
  48. package/dist/CurrencyDisplay.d.mts +24 -0
  49. package/dist/CurrencyDisplay.d.ts +24 -0
  50. package/dist/CurrencyDisplay.js +189 -0
  51. package/dist/CurrencyDisplay.mjs +3 -0
  52. package/dist/CurrencyInput.d.mts +26 -0
  53. package/dist/CurrencyInput.d.ts +26 -0
  54. package/dist/CurrencyInput.js +404 -0
  55. package/dist/CurrencyInput.mjs +7 -0
  56. package/dist/DetailRow.d.mts +32 -0
  57. package/dist/DetailRow.d.ts +32 -0
  58. package/dist/DetailRow.js +275 -0
  59. package/dist/DetailRow.mjs +4 -0
  60. package/dist/EmptyState.d.mts +27 -0
  61. package/dist/EmptyState.d.ts +27 -0
  62. package/dist/EmptyState.js +503 -0
  63. package/dist/EmptyState.mjs +9 -0
  64. package/dist/Form.d.mts +52 -0
  65. package/dist/Form.d.ts +52 -0
  66. package/dist/Form.js +204 -0
  67. package/dist/Form.mjs +3 -0
  68. package/dist/IconButton.d.mts +22 -0
  69. package/dist/IconButton.d.ts +22 -0
  70. package/dist/IconButton.js +383 -0
  71. package/dist/IconButton.mjs +7 -0
  72. package/dist/Input.d.mts +23 -0
  73. package/dist/Input.d.ts +23 -0
  74. package/dist/Input.js +351 -0
  75. package/dist/Input.mjs +6 -0
  76. package/dist/LabelValue.d.mts +16 -0
  77. package/dist/LabelValue.d.ts +16 -0
  78. package/dist/LabelValue.js +225 -0
  79. package/dist/LabelValue.mjs +4 -0
  80. package/dist/ListGroup.d.mts +34 -0
  81. package/dist/ListGroup.d.ts +34 -0
  82. package/dist/ListGroup.js +217 -0
  83. package/dist/ListGroup.mjs +4 -0
  84. package/dist/ListItem.d.mts +64 -0
  85. package/dist/ListItem.d.ts +64 -0
  86. package/dist/ListItem.js +430 -0
  87. package/dist/ListItem.mjs +8 -0
  88. package/dist/MediaCard.d.mts +39 -0
  89. package/dist/MediaCard.d.ts +39 -0
  90. package/dist/MediaCard.js +427 -0
  91. package/dist/MediaCard.mjs +8 -0
  92. package/dist/MenuGroup.d.mts +34 -0
  93. package/dist/MenuGroup.d.ts +34 -0
  94. package/dist/MenuGroup.js +217 -0
  95. package/dist/MenuGroup.mjs +4 -0
  96. package/dist/MenuItem.d.mts +48 -0
  97. package/dist/MenuItem.d.ts +48 -0
  98. package/dist/MenuItem.js +403 -0
  99. package/dist/MenuItem.mjs +8 -0
  100. package/dist/MonthPicker.d.mts +20 -0
  101. package/dist/MonthPicker.d.ts +20 -0
  102. package/dist/MonthPicker.js +234 -0
  103. package/dist/MonthPicker.mjs +4 -0
  104. package/dist/Pressable.d.mts +34 -0
  105. package/dist/Pressable.d.ts +34 -0
  106. package/dist/Pressable.js +132 -0
  107. package/dist/Pressable.mjs +4 -0
  108. package/dist/Progress.d.mts +14 -0
  109. package/dist/Progress.d.ts +14 -0
  110. package/dist/Progress.js +191 -0
  111. package/dist/Progress.mjs +4 -0
  112. package/dist/RadioGroup.d.mts +19 -0
  113. package/dist/RadioGroup.d.ts +19 -0
  114. package/dist/RadioGroup.js +341 -0
  115. package/dist/RadioGroup.mjs +7 -0
  116. package/dist/Select.d.mts +22 -0
  117. package/dist/Select.d.ts +22 -0
  118. package/dist/Select.js +441 -0
  119. package/dist/Select.mjs +6 -0
  120. package/dist/Separator.d.mts +10 -0
  121. package/dist/Separator.d.ts +10 -0
  122. package/dist/Separator.js +156 -0
  123. package/dist/Separator.mjs +2 -0
  124. package/dist/Sheet.d.mts +81 -0
  125. package/dist/Sheet.d.ts +81 -0
  126. package/dist/Sheet.js +340 -0
  127. package/dist/Sheet.mjs +4 -0
  128. package/dist/Skeleton.d.mts +17 -0
  129. package/dist/Skeleton.d.ts +17 -0
  130. package/dist/Skeleton.js +205 -0
  131. package/dist/Skeleton.mjs +4 -0
  132. package/dist/Slider.d.mts +20 -0
  133. package/dist/Slider.d.ts +20 -0
  134. package/dist/Slider.js +232 -0
  135. package/dist/Slider.mjs +4 -0
  136. package/dist/Spinner.d.mts +12 -0
  137. package/dist/Spinner.d.ts +12 -0
  138. package/dist/Spinner.js +172 -0
  139. package/dist/Spinner.mjs +3 -0
  140. package/dist/Switch.d.mts +13 -0
  141. package/dist/Switch.d.ts +13 -0
  142. package/dist/Switch.js +261 -0
  143. package/dist/Switch.mjs +5 -0
  144. package/dist/Tabs.d.mts +27 -0
  145. package/dist/Tabs.d.ts +27 -0
  146. package/dist/Tabs.js +389 -0
  147. package/dist/Tabs.mjs +6 -0
  148. package/dist/Text.d.mts +12 -0
  149. package/dist/Text.d.ts +12 -0
  150. package/dist/Text.js +311 -0
  151. package/dist/Text.mjs +4 -0
  152. package/dist/Textarea.d.mts +16 -0
  153. package/dist/Textarea.d.ts +16 -0
  154. package/dist/Textarea.js +333 -0
  155. package/dist/Textarea.mjs +6 -0
  156. package/dist/Toast.d.mts +47 -0
  157. package/dist/Toast.d.ts +47 -0
  158. package/dist/Toast.js +185 -0
  159. package/dist/Toast.mjs +3 -0
  160. package/dist/Toggle.d.mts +33 -0
  161. package/dist/Toggle.d.ts +33 -0
  162. package/dist/Toggle.js +397 -0
  163. package/dist/Toggle.mjs +8 -0
  164. package/dist/VirtualList.d.mts +19 -0
  165. package/dist/VirtualList.d.ts +19 -0
  166. package/dist/VirtualList.js +38 -0
  167. package/dist/VirtualList.mjs +1 -0
  168. package/dist/chunk-2CE3TQVY.mjs +11 -0
  169. package/dist/chunk-2UYENBLV.mjs +49 -0
  170. package/dist/chunk-3BBOZ3OQ.mjs +41 -0
  171. package/dist/chunk-5IKW3VNC.mjs +43 -0
  172. package/dist/chunk-63357L2X.mjs +51 -0
  173. package/dist/chunk-6LQYY7HC.mjs +127 -0
  174. package/dist/chunk-6Q64UFIA.mjs +71 -0
  175. package/dist/chunk-76PFOSM2.mjs +41 -0
  176. package/dist/chunk-7H2OR44A.mjs +14 -0
  177. package/dist/chunk-A4MDAP7G.mjs +42 -0
  178. package/dist/chunk-AU2VDY4P.mjs +190 -0
  179. package/dist/chunk-BRKYVJVV.mjs +60 -0
  180. package/dist/chunk-CRYBX2CM.mjs +146 -0
  181. package/dist/chunk-DITNP6PL.mjs +106 -0
  182. package/dist/chunk-FTLJOUOQ.mjs +97 -0
  183. package/dist/chunk-GCWOGZYL.mjs +104 -0
  184. package/dist/chunk-GNGLDL6Z.mjs +60 -0
  185. package/dist/chunk-GPOUINK5.mjs +148 -0
  186. package/dist/chunk-HSPSMN6U.mjs +115 -0
  187. package/dist/chunk-IRRY3CRZ.mjs +82 -0
  188. package/dist/chunk-JB67UOB5.mjs +92 -0
  189. package/dist/chunk-JBLL7U3U.mjs +64 -0
  190. package/dist/chunk-KWCPOM6W.mjs +136 -0
  191. package/dist/chunk-KZJRQOIU.mjs +64 -0
  192. package/dist/chunk-L7E7TVEZ.mjs +145 -0
  193. package/dist/chunk-LG4DO3DK.mjs +174 -0
  194. package/dist/chunk-LWG526VX.mjs +139 -0
  195. package/dist/chunk-MN7OG7IY.mjs +96 -0
  196. package/dist/chunk-MX6HRKMI.mjs +29 -0
  197. package/dist/chunk-NC5ZTR2Y.mjs +32 -0
  198. package/dist/chunk-NQGVLMWG.mjs +90 -0
  199. package/dist/chunk-QCNARS3X.mjs +46 -0
  200. package/dist/chunk-QXGYKWI7.mjs +134 -0
  201. package/dist/chunk-QY3X2UYR.mjs +191 -0
  202. package/dist/chunk-RKLHUDZS.mjs +92 -0
  203. package/dist/chunk-RMMK64W5.mjs +54 -0
  204. package/dist/chunk-RR2VQLKE.mjs +190 -0
  205. package/dist/chunk-RTC3CFXF.mjs +29 -0
  206. package/dist/chunk-SBZYEV4S.mjs +61 -0
  207. package/dist/chunk-SOA2Z4RB.mjs +82 -0
  208. package/dist/chunk-SOYNZDVY.mjs +151 -0
  209. package/dist/chunk-T7XZ7H7Y.mjs +57 -0
  210. package/dist/chunk-TAJ2PQ2O.mjs +163 -0
  211. package/dist/chunk-U4N7WF4Z.mjs +108 -0
  212. package/dist/chunk-URDE3EUU.mjs +132 -0
  213. package/dist/chunk-URLL5JBR.mjs +245 -0
  214. package/dist/chunk-XDMN67KV.mjs +59 -0
  215. package/dist/chunk-Y6MXOREN.mjs +120 -0
  216. package/dist/chunk-YZJAFS4P.mjs +131 -0
  217. package/dist/index.d.mts +94 -852
  218. package/dist/index.d.ts +94 -852
  219. package/dist/index.js +1387 -942
  220. package/dist/index.mjs +50 -3844
  221. package/package.json +23 -14
  222. package/src/assets/fonts/Sohne-Bold.otf +0 -0
  223. package/src/assets/fonts/Sohne-BoldItalic.otf +0 -0
  224. package/src/assets/fonts/Sohne-ExtraBold.otf +0 -0
  225. package/src/assets/fonts/Sohne-ExtraBoldItalic.otf +0 -0
  226. package/src/assets/fonts/Sohne-ExtraLight.otf +0 -0
  227. package/src/assets/fonts/Sohne-ExtraLightItalic.otf +0 -0
  228. package/src/assets/fonts/Sohne-Italic.otf +0 -0
  229. package/src/assets/fonts/Sohne-Light.otf +0 -0
  230. package/src/assets/fonts/Sohne-LightItalic.otf +0 -0
  231. package/src/assets/fonts/Sohne-Medium.otf +0 -0
  232. package/src/assets/fonts/Sohne-MediumItalic.otf +0 -0
  233. package/src/assets/fonts/Sohne-Regular.otf +0 -0
  234. package/src/assets/fonts/Sohne-SemiBold.otf +0 -0
  235. package/src/assets/fonts/Sohne-SemiBoldItalic.otf +0 -0
  236. package/src/assets/fonts/SohneMono-Bold.otf +0 -0
  237. package/src/assets/fonts/SohneMono-BoldItalic.otf +0 -0
  238. package/src/assets/fonts/SohneMono-ExtraBold.otf +0 -0
  239. package/src/assets/fonts/SohneMono-ExtraBoldItalic.otf +0 -0
  240. package/src/assets/fonts/SohneMono-ExtraLight.otf +0 -0
  241. package/src/assets/fonts/SohneMono-ExtraLightItalic.otf +0 -0
  242. package/src/assets/fonts/SohneMono-Italic.otf +0 -0
  243. package/src/assets/fonts/SohneMono-Light.otf +0 -0
  244. package/src/assets/fonts/SohneMono-LightItalic.otf +0 -0
  245. package/src/assets/fonts/SohneMono-Medium.otf +0 -0
  246. package/src/assets/fonts/SohneMono-MediumItalic.otf +0 -0
  247. package/src/assets/fonts/SohneMono-Regular.otf +0 -0
  248. package/src/assets/fonts/SohneMono-SemiBold.otf +0 -0
  249. package/src/assets/fonts/SohneMono-SemiBoldItalic.otf +0 -0
  250. package/src/components/Accordion/Accordion.tsx +13 -15
  251. package/src/components/AlertBanner/AlertBanner.tsx +33 -12
  252. package/src/components/Avatar/Avatar.tsx +4 -2
  253. package/src/components/Badge/Badge.tsx +4 -2
  254. package/src/components/Button/Button.tsx +30 -29
  255. package/src/components/ButtonGroup/ButtonGroup.tsx +13 -10
  256. package/src/components/Card/Card.tsx +36 -65
  257. package/src/components/CategoryStrip/CategoryStrip.tsx +68 -58
  258. package/src/components/Checkbox/Checkbox.tsx +41 -55
  259. package/src/components/Chip/Chip.tsx +49 -84
  260. package/src/components/ConfirmDialog/ConfirmDialog.tsx +2 -2
  261. package/src/components/CurrencyDisplay/CurrencyDisplay.tsx +4 -2
  262. package/src/components/CurrencyInput/CurrencyInput.tsx +2 -2
  263. package/src/components/DetailRow/DetailRow.tsx +9 -7
  264. package/src/components/EmptyState/EmptyState.tsx +2 -2
  265. package/src/components/Form/Form.tsx +149 -0
  266. package/src/components/Form/index.ts +1 -0
  267. package/src/components/IconButton/IconButton.tsx +24 -20
  268. package/src/components/Input/Input.tsx +63 -50
  269. package/src/components/LabelValue/LabelValue.tsx +6 -4
  270. package/src/components/ListGroup/ListGroup.tsx +145 -0
  271. package/src/components/ListGroup/index.ts +1 -0
  272. package/src/components/ListItem/ListItem.tsx +30 -43
  273. package/src/components/MediaCard/MediaCard.tsx +31 -29
  274. package/src/components/MenuGroup/MenuGroup.tsx +145 -0
  275. package/src/components/MenuGroup/index.ts +1 -0
  276. package/src/components/MenuItem/MenuItem.tsx +29 -40
  277. package/src/components/MonthPicker/MonthPicker.tsx +14 -4
  278. package/src/components/Pressable/Pressable.tsx +27 -46
  279. package/src/components/Progress/Progress.tsx +21 -12
  280. package/src/components/RadioGroup/RadioGroup.tsx +55 -32
  281. package/src/components/Select/Select.tsx +23 -21
  282. package/src/components/Separator/Separator.tsx +1 -3
  283. package/src/components/Sheet/Sheet.tsx +85 -18
  284. package/src/components/Skeleton/Skeleton.tsx +25 -14
  285. package/src/components/Slider/Slider.tsx +13 -3
  286. package/src/components/Spinner/Spinner.tsx +1 -1
  287. package/src/components/Switch/Switch.tsx +70 -52
  288. package/src/components/Tabs/Tabs.tsx +59 -47
  289. package/src/components/Text/Text.tsx +3 -1
  290. package/src/components/Textarea/Textarea.tsx +44 -23
  291. package/src/components/Toast/Toast.tsx +6 -6
  292. package/src/components/Toggle/Toggle.tsx +86 -68
  293. package/src/components/VirtualList/VirtualList.tsx +60 -0
  294. package/src/components/VirtualList/index.ts +1 -0
  295. package/src/fonts.ts +38 -20
  296. package/src/index.ts +5 -1
  297. package/src/theme/colors.ts +53 -39
  298. package/src/theme/types.ts +3 -0
  299. package/src/tokens.ts +49 -39
  300. package/src/utils/animations.ts +58 -0
  301. package/src/utils/icons.ts +47 -20
  302. package/src/utils/useColorTransition.ts +40 -0
  303. package/src/utils/usePressScale.ts +75 -0
  304. package/src/assets/fonts/Poppins-Black.ttf +0 -0
  305. package/src/assets/fonts/Poppins-BlackItalic.ttf +0 -0
  306. package/src/assets/fonts/Poppins-Bold.ttf +0 -0
  307. package/src/assets/fonts/Poppins-BoldItalic.ttf +0 -0
  308. package/src/assets/fonts/Poppins-ExtraBold.ttf +0 -0
  309. package/src/assets/fonts/Poppins-ExtraBoldItalic.ttf +0 -0
  310. package/src/assets/fonts/Poppins-ExtraLight.ttf +0 -0
  311. package/src/assets/fonts/Poppins-ExtraLightItalic.ttf +0 -0
  312. package/src/assets/fonts/Poppins-Italic.ttf +0 -0
  313. package/src/assets/fonts/Poppins-Light.ttf +0 -0
  314. package/src/assets/fonts/Poppins-LightItalic.ttf +0 -0
  315. package/src/assets/fonts/Poppins-Medium.ttf +0 -0
  316. package/src/assets/fonts/Poppins-MediumItalic.ttf +0 -0
  317. package/src/assets/fonts/Poppins-Regular.ttf +0 -0
  318. package/src/assets/fonts/Poppins-SemiBold.ttf +0 -0
  319. package/src/assets/fonts/Poppins-SemiBoldItalic.ttf +0 -0
  320. package/src/assets/fonts/Poppins-Thin.ttf +0 -0
  321. package/src/assets/fonts/Poppins-ThinItalic.ttf +0 -0
@@ -0,0 +1,81 @@
1
+ import React from 'react';
2
+ import { ViewStyle } from 'react-native';
3
+ export { BottomSheetModalProvider, BottomSheetTextInput as SheetTextInput } from '@gorhom/bottom-sheet';
4
+
5
+ interface SheetHeaderProps {
6
+ children: React.ReactNode;
7
+ style?: ViewStyle;
8
+ }
9
+ interface SheetContentProps {
10
+ children: React.ReactNode;
11
+ style?: ViewStyle;
12
+ }
13
+ interface SheetFooterProps {
14
+ children: React.ReactNode;
15
+ style?: ViewStyle;
16
+ }
17
+ interface SheetProps {
18
+ open: boolean;
19
+ onClose: () => void;
20
+ title?: string;
21
+ /** Secondary text below title. */
22
+ subtitle?: string;
23
+ /** @deprecated Use `subtitle` instead. */
24
+ description?: string;
25
+ /** Show an X close button in the header. */
26
+ showCloseButton?: boolean;
27
+ children?: React.ReactNode;
28
+ /** Style for the inner content container. */
29
+ style?: ViewStyle;
30
+ /** Style for the content wrapper (outside the scroll container). */
31
+ contentStyle?: ViewStyle;
32
+ /** Render children inside BottomSheetScrollView. */
33
+ scrollable?: boolean;
34
+ /** Cap sheet height (dp). Children scroll when content exceeds this value. */
35
+ maxHeight?: number;
36
+ /**
37
+ * Keyboard behavior — how the sheet responds to keyboard appearance.
38
+ * - 'interactive': offset sheet by keyboard size (default, works on both platforms)
39
+ * - 'fillParent': extend sheet to fill parent view (can cause restore issues with dynamic sizing)
40
+ * - 'extend': extend sheet to maximum snap point
41
+ *
42
+ * Default: 'interactive' on both platforms.
43
+ */
44
+ keyboardBehavior?: 'extend' | 'fillParent' | 'interactive';
45
+ /**
46
+ * Keyboard blur behavior — what happens when keyboard dismisses.
47
+ * - 'none': do nothing
48
+ * - 'restore': restore sheet to previous position (default)
49
+ */
50
+ keyboardBlurBehavior?: 'none' | 'restore';
51
+ /**
52
+ * Blur keyboard when user starts dragging the sheet down.
53
+ * Default: true (recommended for better UX)
54
+ */
55
+ enableBlurKeyboardOnGesture?: boolean;
56
+ /**
57
+ * Android-only: defines keyboard input mode.
58
+ * - 'adjustPan': pan the sheet content (default, fixes restore issues with dynamic sizing)
59
+ * - 'adjustResize': resize the sheet container (can cause transparent gap on dismiss)
60
+ */
61
+ android_keyboardInputMode?: 'adjustPan' | 'adjustResize';
62
+ /** Sticky footer rendered below the scroll area. */
63
+ footer?: React.ReactNode;
64
+ /**
65
+ * Array of snap points for the sheet (e.g., ['50%', '85%'] or [200, 500]).
66
+ * When provided, disables enableDynamicSizing.
67
+ * When omitted, sheet uses dynamic sizing (auto-fits content).
68
+ */
69
+ snapPoints?: (string | number)[];
70
+ }
71
+ declare function SheetHeader({ children, style }: SheetHeaderProps): React.JSX.Element;
72
+ declare function SheetContent({ children, style }: SheetContentProps): React.JSX.Element;
73
+ declare function SheetFooter({ children, style }: SheetFooterProps): React.JSX.Element;
74
+ declare function Sheet({ open, onClose, title, subtitle, description, showCloseButton, children, style, contentStyle, scrollable, maxHeight, keyboardBehavior, keyboardBlurBehavior, enableBlurKeyboardOnGesture, android_keyboardInputMode, footer, snapPoints, }: SheetProps): React.JSX.Element;
75
+ declare namespace Sheet {
76
+ var Header: typeof SheetHeader;
77
+ var Content: typeof SheetContent;
78
+ var Footer: typeof SheetFooter;
79
+ }
80
+
81
+ export { Sheet, type SheetProps };
@@ -0,0 +1,81 @@
1
+ import React from 'react';
2
+ import { ViewStyle } from 'react-native';
3
+ export { BottomSheetModalProvider, BottomSheetTextInput as SheetTextInput } from '@gorhom/bottom-sheet';
4
+
5
+ interface SheetHeaderProps {
6
+ children: React.ReactNode;
7
+ style?: ViewStyle;
8
+ }
9
+ interface SheetContentProps {
10
+ children: React.ReactNode;
11
+ style?: ViewStyle;
12
+ }
13
+ interface SheetFooterProps {
14
+ children: React.ReactNode;
15
+ style?: ViewStyle;
16
+ }
17
+ interface SheetProps {
18
+ open: boolean;
19
+ onClose: () => void;
20
+ title?: string;
21
+ /** Secondary text below title. */
22
+ subtitle?: string;
23
+ /** @deprecated Use `subtitle` instead. */
24
+ description?: string;
25
+ /** Show an X close button in the header. */
26
+ showCloseButton?: boolean;
27
+ children?: React.ReactNode;
28
+ /** Style for the inner content container. */
29
+ style?: ViewStyle;
30
+ /** Style for the content wrapper (outside the scroll container). */
31
+ contentStyle?: ViewStyle;
32
+ /** Render children inside BottomSheetScrollView. */
33
+ scrollable?: boolean;
34
+ /** Cap sheet height (dp). Children scroll when content exceeds this value. */
35
+ maxHeight?: number;
36
+ /**
37
+ * Keyboard behavior — how the sheet responds to keyboard appearance.
38
+ * - 'interactive': offset sheet by keyboard size (default, works on both platforms)
39
+ * - 'fillParent': extend sheet to fill parent view (can cause restore issues with dynamic sizing)
40
+ * - 'extend': extend sheet to maximum snap point
41
+ *
42
+ * Default: 'interactive' on both platforms.
43
+ */
44
+ keyboardBehavior?: 'extend' | 'fillParent' | 'interactive';
45
+ /**
46
+ * Keyboard blur behavior — what happens when keyboard dismisses.
47
+ * - 'none': do nothing
48
+ * - 'restore': restore sheet to previous position (default)
49
+ */
50
+ keyboardBlurBehavior?: 'none' | 'restore';
51
+ /**
52
+ * Blur keyboard when user starts dragging the sheet down.
53
+ * Default: true (recommended for better UX)
54
+ */
55
+ enableBlurKeyboardOnGesture?: boolean;
56
+ /**
57
+ * Android-only: defines keyboard input mode.
58
+ * - 'adjustPan': pan the sheet content (default, fixes restore issues with dynamic sizing)
59
+ * - 'adjustResize': resize the sheet container (can cause transparent gap on dismiss)
60
+ */
61
+ android_keyboardInputMode?: 'adjustPan' | 'adjustResize';
62
+ /** Sticky footer rendered below the scroll area. */
63
+ footer?: React.ReactNode;
64
+ /**
65
+ * Array of snap points for the sheet (e.g., ['50%', '85%'] or [200, 500]).
66
+ * When provided, disables enableDynamicSizing.
67
+ * When omitted, sheet uses dynamic sizing (auto-fits content).
68
+ */
69
+ snapPoints?: (string | number)[];
70
+ }
71
+ declare function SheetHeader({ children, style }: SheetHeaderProps): React.JSX.Element;
72
+ declare function SheetContent({ children, style }: SheetContentProps): React.JSX.Element;
73
+ declare function SheetFooter({ children, style }: SheetFooterProps): React.JSX.Element;
74
+ declare function Sheet({ open, onClose, title, subtitle, description, showCloseButton, children, style, contentStyle, scrollable, maxHeight, keyboardBehavior, keyboardBlurBehavior, enableBlurKeyboardOnGesture, android_keyboardInputMode, footer, snapPoints, }: SheetProps): React.JSX.Element;
75
+ declare namespace Sheet {
76
+ var Header: typeof SheetHeader;
77
+ var Content: typeof SheetContent;
78
+ var Footer: typeof SheetFooter;
79
+ }
80
+
81
+ export { Sheet, type SheetProps };
package/dist/Sheet.js ADDED
@@ -0,0 +1,340 @@
1
+ 'use strict';
2
+
3
+ var React2 = require('react');
4
+ var reactNative = require('react-native');
5
+ var bottomSheet = require('@gorhom/bottom-sheet');
6
+ var reactNativeSafeAreaContext = require('react-native-safe-area-context');
7
+ var vectorIcons = require('@expo/vector-icons');
8
+ var reactNativeSizeMatters = require('react-native-size-matters');
9
+
10
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
11
+
12
+ var React2__default = /*#__PURE__*/_interopDefault(React2);
13
+
14
+ // src/components/Sheet/Sheet.tsx
15
+ var _haptics = null;
16
+ async function getHaptics() {
17
+ if (reactNative.Platform.OS === "web") return null;
18
+ if (!_haptics) {
19
+ _haptics = await import('expo-haptics');
20
+ }
21
+ return _haptics;
22
+ }
23
+ function impactMedium() {
24
+ if (reactNative.Platform.OS === "web") return;
25
+ getHaptics().then((h) => h?.impactAsync(h.ImpactFeedbackStyle.Medium));
26
+ }
27
+
28
+ // src/theme/colorUtils.ts
29
+ function hexToRgb(hex) {
30
+ const clean = hex.replace("#", "");
31
+ const full = clean.length === 3 ? clean.split("").map((c) => c + c).join("") : clean;
32
+ if (full.length !== 6) return null;
33
+ return {
34
+ r: parseInt(full.slice(0, 2), 16),
35
+ g: parseInt(full.slice(2, 4), 16),
36
+ b: parseInt(full.slice(4, 6), 16)
37
+ };
38
+ }
39
+ function componentToHex(c) {
40
+ return Math.round(Math.max(0, Math.min(255, c))).toString(16).padStart(2, "0");
41
+ }
42
+ function rgbToHex(r, g, b) {
43
+ return `#${componentToHex(r)}${componentToHex(g)}${componentToHex(b)}`;
44
+ }
45
+ function withAlphaOnWhite(hex, alpha) {
46
+ const rgb = hexToRgb(hex);
47
+ if (!rgb) return hex;
48
+ const r = rgb.r * alpha + 255 * (1 - alpha);
49
+ const g = rgb.g * alpha + 255 * (1 - alpha);
50
+ const b = rgb.b * alpha + 255 * (1 - alpha);
51
+ return rgbToHex(r, g, b);
52
+ }
53
+ function withAlphaOnDark(hex, alpha, bgHex = "#0f0f0f") {
54
+ const rgb = hexToRgb(hex);
55
+ const bg = hexToRgb(bgHex);
56
+ if (!rgb || !bg) return hex;
57
+ const r = rgb.r * alpha + bg.r * (1 - alpha);
58
+ const g = rgb.g * alpha + bg.g * (1 - alpha);
59
+ const b = rgb.b * alpha + bg.b * (1 - alpha);
60
+ return rgbToHex(r, g, b);
61
+ }
62
+ function mixWithBackground(fgHex, bgHex, opacity) {
63
+ const fg = hexToRgb(fgHex);
64
+ const bg = hexToRgb(bgHex);
65
+ if (!fg || !bg) return fgHex;
66
+ const r = fg.r * opacity + bg.r * (1 - opacity);
67
+ const g = fg.g * opacity + bg.g * (1 - opacity);
68
+ const b = fg.b * opacity + bg.b * (1 - opacity);
69
+ return rgbToHex(r, g, b);
70
+ }
71
+ function lighten(hex, amount) {
72
+ return withAlphaOnWhite(hex, 1 - amount);
73
+ }
74
+ function darken(hex, amount) {
75
+ const rgb = hexToRgb(hex);
76
+ if (!rgb) return hex;
77
+ return rgbToHex(rgb.r * (1 - amount), rgb.g * (1 - amount), rgb.b * (1 - amount));
78
+ }
79
+
80
+ // src/theme/colors.ts
81
+ var defaultLight = {
82
+ background: "#ffffff",
83
+ foreground: "#1a1a1a",
84
+ card: "#ffffff",
85
+ primary: "#1a1a1a",
86
+ primaryForeground: "#ffffff",
87
+ // AUDIT FIX: brand accent — was undefined; falls back to primary when omitted
88
+ accent: "#d4561d",
89
+ accentForeground: "#ffffff",
90
+ border: "#dddddd",
91
+ // AUDIT FIX: was #e53935 (4.22:1 on white — fails AA); #c72828 = 5.59:1 ✓
92
+ destructive: "#c72828",
93
+ destructiveForeground: "#ffffff",
94
+ success: "#1a7a45",
95
+ successForeground: "#ffffff",
96
+ // AUDIT FIX: was #e67e00 (2.86:1 — severe fail); #9a5200 = 5.86:1 ✓ AAA-near
97
+ warning: "#9a5200",
98
+ warningForeground: "#ffffff"
99
+ };
100
+ function deriveColors(t, scheme) {
101
+ const dark = scheme === "dark";
102
+ const bg = t.background;
103
+ const foregroundSubtle = mixWithBackground(t.foreground, bg, 0.7);
104
+ const foregroundMuted = mixWithBackground(t.foreground, bg, 0.62);
105
+ const surface = dark ? lighten(bg, -0.06) : darken(bg, 0.04);
106
+ const surfaceStrong = dark ? lighten(bg, -0.12) : darken(bg, 0.08);
107
+ const destructiveTint = dark ? withAlphaOnDark(t.destructive, 0.15, bg) : withAlphaOnWhite(t.destructive, 0.08);
108
+ const destructiveBorder = dark ? withAlphaOnDark(t.destructive, 0.45, bg) : withAlphaOnWhite(t.destructive, 0.3);
109
+ const successTint = dark ? withAlphaOnDark(t.success, 0.15, bg) : withAlphaOnWhite(t.success, 0.08);
110
+ const successBorder = dark ? withAlphaOnDark(t.success, 0.45, bg) : withAlphaOnWhite(t.success, 0.3);
111
+ const warningTint = dark ? withAlphaOnDark(t.warning, 0.15, bg) : withAlphaOnWhite(t.warning, 0.08);
112
+ const warningBorder = dark ? withAlphaOnDark(t.warning, 0.45, bg) : withAlphaOnWhite(t.warning, 0.3);
113
+ return {
114
+ ...t,
115
+ foregroundSubtle,
116
+ foregroundMuted,
117
+ surface,
118
+ surfaceStrong,
119
+ destructiveTint,
120
+ destructiveBorder,
121
+ successTint,
122
+ successBorder,
123
+ warningTint,
124
+ warningBorder,
125
+ overlay: t.overlay ?? "rgba(0,0,0,0.45)",
126
+ accentResolved: t.accent ?? t.primary,
127
+ accentForegroundResolved: t.accentForeground ?? t.primaryForeground,
128
+ ring: t.accent ?? t.primary,
129
+ input: t.border,
130
+ separator: dark ? lighten(t.border, 0.22) : darken(t.border, 0.16)
131
+ };
132
+ }
133
+
134
+ // src/theme/ThemeProvider.tsx
135
+ var ThemeContext = React2.createContext({
136
+ colors: deriveColors(defaultLight, "light"),
137
+ colorScheme: "light"
138
+ });
139
+ function useTheme() {
140
+ const context = React2.useContext(ThemeContext);
141
+ if (!context) {
142
+ throw new Error("useTheme must be used within a ThemeProvider");
143
+ }
144
+ return context;
145
+ }
146
+ var isWeb = reactNative.Platform.OS === "web";
147
+ var s = isWeb ? (n) => n : reactNativeSizeMatters.scale;
148
+ var vs = isWeb ? (n) => n : reactNativeSizeMatters.verticalScale;
149
+ var ms = isWeb ? (n, _factor) => n : reactNativeSizeMatters.moderateScale;
150
+ var mvs = isWeb ? (n, _factor) => n : reactNativeSizeMatters.moderateVerticalScale;
151
+
152
+ // src/components/Sheet/Sheet.tsx
153
+ var SCREEN_HEIGHT = reactNative.Dimensions.get("window").height;
154
+ var DEFAULT_MAX_HEIGHT = SCREEN_HEIGHT * 0.85;
155
+ var isAndroid = reactNative.Platform.OS === "android";
156
+ function SheetHeader({ children, style }) {
157
+ return /* @__PURE__ */ React2__default.default.createElement(reactNative.View, { style: [styles.header, style] }, children);
158
+ }
159
+ function SheetContent({ children, style }) {
160
+ return /* @__PURE__ */ React2__default.default.createElement(reactNative.View, { style: [styles.sheetContent, style] }, children);
161
+ }
162
+ function SheetFooter({ children, style }) {
163
+ const { colors } = useTheme();
164
+ return /* @__PURE__ */ React2__default.default.createElement(reactNative.View, { style: [styles.sheetFooter, { backgroundColor: colors.card, borderTopColor: colors.border }, style] }, children);
165
+ }
166
+ function Sheet({
167
+ open,
168
+ onClose,
169
+ title,
170
+ subtitle,
171
+ description,
172
+ showCloseButton = false,
173
+ children,
174
+ style,
175
+ contentStyle,
176
+ scrollable,
177
+ maxHeight,
178
+ keyboardBehavior,
179
+ keyboardBlurBehavior = "restore",
180
+ enableBlurKeyboardOnGesture = true,
181
+ android_keyboardInputMode = "adjustPan",
182
+ footer,
183
+ snapPoints
184
+ }) {
185
+ const { colors } = useTheme();
186
+ const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
187
+ const ref = React2.useRef(null);
188
+ const effectiveKeyboardBehavior = keyboardBehavior ?? "interactive";
189
+ React2.useEffect(() => {
190
+ if (open) {
191
+ impactMedium();
192
+ ref.current?.present();
193
+ } else {
194
+ ref.current?.dismiss();
195
+ }
196
+ }, [open]);
197
+ const renderBackdrop = React2.useCallback((props) => /* @__PURE__ */ React2__default.default.createElement(
198
+ bottomSheet.BottomSheetBackdrop,
199
+ {
200
+ ...props,
201
+ disappearsOnIndex: -1,
202
+ appearsOnIndex: 0,
203
+ pressBehavior: "close"
204
+ }
205
+ ), []);
206
+ const childArray = React2__default.default.Children.toArray(children);
207
+ const customHeader = childArray.find((child) => React2__default.default.isValidElement(child) && child.type === SheetHeader);
208
+ const customContent = childArray.find((child) => React2__default.default.isValidElement(child) && child.type === SheetContent);
209
+ const customFooter = childArray.find((child) => React2__default.default.isValidElement(child) && child.type === SheetFooter);
210
+ const filteredChildren = customHeader || customContent || customFooter ? childArray.filter(
211
+ (child) => !React2__default.default.isValidElement(child) || child.type !== SheetHeader && child.type !== SheetContent && child.type !== SheetFooter
212
+ ) : children;
213
+ const effectiveSubtitle = subtitle ?? description;
214
+ const showHeader = !!(title || effectiveSubtitle || showCloseButton) && !customHeader;
215
+ const headerNode = customHeader ? customHeader : showHeader ? /* @__PURE__ */ React2__default.default.createElement(reactNative.View, { style: styles.header, accessibilityRole: "header" }, /* @__PURE__ */ React2__default.default.createElement(reactNative.View, { style: styles.headerRow }, title ? /* @__PURE__ */ React2__default.default.createElement(reactNative.Text, { style: [styles.title, { color: colors.foreground }], allowFontScaling: true }, title) : /* @__PURE__ */ React2__default.default.createElement(reactNative.View, { style: { flex: 1 } }), showCloseButton ? /* @__PURE__ */ React2__default.default.createElement(
216
+ reactNative.TouchableOpacity,
217
+ {
218
+ onPress: onClose,
219
+ style: styles.closeButton,
220
+ activeOpacity: 0.6,
221
+ touchSoundDisabled: true,
222
+ accessibilityRole: "button",
223
+ accessibilityLabel: "Close",
224
+ hitSlop: { top: 12, bottom: 12, left: 12, right: 12 }
225
+ },
226
+ /* @__PURE__ */ React2__default.default.createElement(vectorIcons.AntDesign, { name: "close", size: ms(18), color: colors.foregroundMuted })
227
+ ) : null), effectiveSubtitle ? /* @__PURE__ */ React2__default.default.createElement(reactNative.Text, { style: [styles.subtitle, { color: colors.foregroundMuted }], allowFontScaling: true }, effectiveSubtitle) : null) : null;
228
+ const contentNode = customContent ? customContent : filteredChildren;
229
+ const effectiveFooter = customFooter ? customFooter : footer;
230
+ const renderFooter = React2.useCallback((props) => {
231
+ if (!effectiveFooter) return null;
232
+ return /* @__PURE__ */ React2__default.default.createElement(bottomSheet.BottomSheetFooter, { ...props }, effectiveFooter);
233
+ }, [effectiveFooter]);
234
+ const useScroll = scrollable || !!maxHeight;
235
+ const effectiveMaxHeight = maxHeight ?? DEFAULT_MAX_HEIGHT;
236
+ const useDynamicSizing = !snapPoints;
237
+ return /* @__PURE__ */ React2__default.default.createElement(
238
+ bottomSheet.BottomSheetModal,
239
+ {
240
+ ref,
241
+ enableDynamicSizing: useDynamicSizing,
242
+ snapPoints,
243
+ maxDynamicContentSize: useDynamicSizing ? effectiveMaxHeight : void 0,
244
+ onDismiss: onClose,
245
+ backdropComponent: renderBackdrop,
246
+ footerComponent: effectiveFooter ? renderFooter : void 0,
247
+ backgroundStyle: [styles.background, { backgroundColor: colors.card }],
248
+ handleIndicatorStyle: [styles.handle, { backgroundColor: colors.border }],
249
+ enablePanDownToClose: true,
250
+ topInset: insets.top,
251
+ keyboardBehavior: effectiveKeyboardBehavior,
252
+ keyboardBlurBehavior,
253
+ android_keyboardInputMode,
254
+ enableBlurKeyboardOnGesture
255
+ },
256
+ useScroll ? /* @__PURE__ */ React2__default.default.createElement(
257
+ bottomSheet.BottomSheetScrollView,
258
+ {
259
+ contentContainerStyle: [
260
+ styles.scrollContent,
261
+ style
262
+ ],
263
+ style: contentStyle,
264
+ showsVerticalScrollIndicator: true,
265
+ indicatorStyle: "black",
266
+ persistentScrollbar: isAndroid
267
+ },
268
+ headerNode,
269
+ contentNode
270
+ ) : /* @__PURE__ */ React2__default.default.createElement(bottomSheet.BottomSheetView, { style: [styles.content, contentStyle, style] }, headerNode, contentNode)
271
+ );
272
+ }
273
+ Sheet.Header = SheetHeader;
274
+ Sheet.Content = SheetContent;
275
+ Sheet.Footer = SheetFooter;
276
+ var styles = reactNative.StyleSheet.create({
277
+ background: {
278
+ borderTopLeftRadius: ms(16),
279
+ borderTopRightRadius: ms(16)
280
+ },
281
+ handle: {
282
+ width: s(36),
283
+ height: vs(4),
284
+ borderRadius: ms(2)
285
+ },
286
+ header: {
287
+ paddingHorizontal: s(16),
288
+ paddingTop: vs(4),
289
+ paddingBottom: vs(12),
290
+ gap: vs(4)
291
+ },
292
+ headerRow: {
293
+ flexDirection: "row",
294
+ alignItems: "center",
295
+ justifyContent: "space-between"
296
+ },
297
+ title: {
298
+ fontFamily: "Sohne-SemiBold",
299
+ fontSize: ms(18),
300
+ flex: 1
301
+ },
302
+ subtitle: {
303
+ fontFamily: "Sohne-Regular",
304
+ fontSize: ms(14),
305
+ lineHeight: mvs(20)
306
+ },
307
+ closeButton: {
308
+ padding: s(4),
309
+ marginLeft: s(8)
310
+ },
311
+ content: {
312
+ paddingHorizontal: s(16),
313
+ paddingBottom: vs(32)
314
+ },
315
+ scrollContent: {
316
+ paddingHorizontal: s(16),
317
+ paddingBottom: vs(32),
318
+ paddingRight: s(16)
319
+ },
320
+ sheetContent: {
321
+ gap: vs(16)
322
+ },
323
+ sheetFooter: {
324
+ paddingHorizontal: s(16),
325
+ paddingVertical: vs(16),
326
+ borderTopWidth: 1,
327
+ flexDirection: "row",
328
+ gap: s(12)
329
+ }
330
+ });
331
+
332
+ Object.defineProperty(exports, "BottomSheetModalProvider", {
333
+ enumerable: true,
334
+ get: function () { return bottomSheet.BottomSheetModalProvider; }
335
+ });
336
+ Object.defineProperty(exports, "SheetTextInput", {
337
+ enumerable: true,
338
+ get: function () { return bottomSheet.BottomSheetTextInput; }
339
+ });
340
+ exports.Sheet = Sheet;
package/dist/Sheet.mjs ADDED
@@ -0,0 +1,4 @@
1
+ export { BottomSheetModalProvider, Sheet, BottomSheetTextInput as SheetTextInput } from './chunk-AU2VDY4P.mjs';
2
+ import './chunk-RTC3CFXF.mjs';
3
+ import './chunk-SOYNZDVY.mjs';
4
+ import './chunk-2CE3TQVY.mjs';
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { ViewStyle } from 'react-native';
3
+
4
+ type SkeletonPreset = 'base' | 'circle' | 'text';
5
+ interface SkeletonProps {
6
+ width?: number | string;
7
+ height?: number;
8
+ borderRadius?: number;
9
+ /** Preset shape. `'circle'` forces width=height square with full radius. `'text'` renders a short line. */
10
+ preset?: SkeletonPreset;
11
+ /** Only used with `preset='circle'` — overrides the diameter. Defaults to 40. */
12
+ diameter?: number;
13
+ style?: ViewStyle;
14
+ }
15
+ declare function Skeleton({ width, height, borderRadius, preset, diameter, style, }: SkeletonProps): React.JSX.Element;
16
+
17
+ export { Skeleton, type SkeletonProps };
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { ViewStyle } from 'react-native';
3
+
4
+ type SkeletonPreset = 'base' | 'circle' | 'text';
5
+ interface SkeletonProps {
6
+ width?: number | string;
7
+ height?: number;
8
+ borderRadius?: number;
9
+ /** Preset shape. `'circle'` forces width=height square with full radius. `'text'` renders a short line. */
10
+ preset?: SkeletonPreset;
11
+ /** Only used with `preset='circle'` — overrides the diameter. Defaults to 40. */
12
+ diameter?: number;
13
+ style?: ViewStyle;
14
+ }
15
+ declare function Skeleton({ width, height, borderRadius, preset, diameter, style, }: SkeletonProps): React.JSX.Element;
16
+
17
+ export { Skeleton, type SkeletonProps };